Expand description
Remote tasks: a whole agent task on another of the user’s nodes (Node companions).
asking node serving node (runs the AgentSession)
Run { request } ->
<- Started, Delta, Step, ToolStarted, ToolFinished, Skipped, Blocked ...
<- Ask { ask, prompt, tool }
Answer { ask, answer } ->
Cancel -> (optional, any time)
<- Finished { outcome, messages } | Failed { error }The serving node’s tools, budget and policy apply (its grants sync from the user’s other
devices). Approval cards are shown on the asking device: the serving session’s Approver
forwards each prompt and waits for the answer. The conversation lives with the asker: it
sends its history with each task and gets the updated history back.
Structs§
- Remote
Outcome - A finished remote task and the conversation to keep.
- Task
Request - One task for a companion that runs on the serving node.
Enums§
Constants§
- CANCEL_
GRACE - How long the asker waits for the node to wind down after a cancel.
- PROTOCOL
- Stream protocol id for remote tasks.
Traits§
- Task
Host - What the serving app offers: a session for the requested companion, built with the given approver (which forwards cards to the asker). Refuse companions that do not run here.
Functions§
- run
- Run a task on
node. Events arrive as ordinaryAgentEvents (so the app’s panel code is the same as for a local session), approval cards go toapproverhere, andcancelstops the task on the node. - serve
- Serve one task on an accepted channel. The caller has already checked that the far end is a
linked device (prefer
serve_for, which checks it here). If the asker goes away the task is cancelled. - serve_
for - Serve one task for
caller:authadmits it first (Authorize::admit; a refusal is sent back asFailed), then the session comes fromTaskHost::session_for.