pub struct SubagentCard {
pub name: String,
pub dispatch_id: String,
pub agent_type: Option<String>,
pub running: bool,
pub failed: bool,
pub backgrounded: bool,
pub ended_at_ms: Option<u64>,
pub calls: usize,
pub tail: Vec<SubagentCall>,
pub usage: Option<TaskUsage>,
}Expand description
One sub-agent instance as a view draws its card: a Task/Agent
dispatch joined with the frames that ran under it.
The join itself is the core’s (forge_workspace::subagent_cards); this
is the shape it crosses in, so a client draws the instance list rather
than folding one of its own from the raw frames.
Fields§
§name: StringWhat the instance is called: the roster’s description for it, else the dispatch’s own.
dispatch_id: StringThe tool_use id of the dispatch that opened it, which is what lets
a view join its cards to the chat row the call itself drew.
agent_type: Option<String>The agent type the dispatch named (e.g. "general-purpose"), which
is the head’s own word for what ran. None for a dispatch that
named no type.
running: boolWhether the instance is still working.
failed: boolWhether it ended badly: the row answering its dispatch errored, or
the roster’s own word for the ending was a failure. A view draws its
cross from this rather than from the absence of running.
backgrounded: boolWhether it runs in the background, outliving the turn that spawned
it. From is_backgrounded on the roster frame, falling back to the
dispatch’s own run_in_background.
ended_at_ms: Option<u64>When it settled, in Unix milliseconds, when a frame stated an
instant. None while it runs and for any ending that named none.
calls: usizeEvery call the instance fired, of which Self::tail holds the
most recent.
tail: Vec<SubagentCall>The instance’s most recent calls, oldest first.
usage: Option<TaskUsage>The usage its last progress or notification frame reported.