Skip to main content

begin_augmented_task

Function begin_augmented_task 

Source
pub async fn begin_augmented_task(
    handler: Arc<dyn DynToolHandler>,
    store: &Arc<TaskManager>,
    params: Option<&Value>,
    client_caps: ClientCapabilities,
    server_caps: ServerCapabilities,
    protocol_version: ProtocolVersion,
    peer: Arc<dyn Peer>,
) -> AugmentedTaskOutcome
Expand description

Begin a task-augmented tools/call against a per-session task store.

Mirrors the stdio runtime’s try_begin_task: detect the task field, gate on the tool’s declared taskSupport, create the task, and return the initial CreateTaskResult plus a background future the caller spawns. Only call this for the tools/call method. The peer is carried into the background context (#153), so the tool keeps its server-to-client request capability after the initial CreateTaskResult reply.