Skip to main content

Module subagent_cards

Module subagent_cards 

Source
Expand description

The session’s sub-agent instances, folded as the frames arrive.

One card per Task/Agent dispatch, joined with the frames that ran under it. The identity is the wire’s own link: a dispatch is an assistant frame carrying the Task tool call, and every frame the instance produces names it in parent_tool_use_id.

Two entry points, one fold. subagent_cards drives CardTracker over a conversation that already exists (a read, a resumed page); the session task drives the same tracker one frame at a time and emits when the list moves, so a live session never re-walks its conversation to push a card.

Re-exports§

use std::collections::HashMap; 🔒
use forge_primitives::runtime::SubagentCall; 🔒
use forge_primitives::runtime::SubagentCallStatus; 🔒
use forge_primitives::runtime::SubagentCard; 🔒
use forge_primitives::ContentBlock; 🔒
use forge_primitives::Message; 🔒
use forge_primitives::TaskNotificationStatus; 🔒

Structs§

Answer 🔒
What the rows answering one dispatch say about it.
CardTracker
The instances as frames arrive, one at a time.
ChildCall 🔒
One call an instance fired.
Instance 🔒
One instance while it is being folded.
Roster 🔒
What the CLI’s task roster says about one task, keyed by its task id.

Enums§

Liveness 🔒
What a session’s own frames say about whether an instance is over.

Constants§

TAIL_CAP
How many of an instance’s calls its card draws.

Functions§

child_of 🔒
One call an instance fired, as it arrives: pending until its result lands, named by the shared call builder so a card’s tail and the chat’s rows resolve a title the same way.
content_is_hand_back 🔒
Whether a result’s content carries the CLI’s hand-back marker.
dispatch_name 🔒
What the dispatch called this instance. The description is the name the CLI’s roster and its own rows use; the type is what is left when the dispatch named none.
finished 🔒
Whether the rows answering a dispatch say the instance is over.
is_failure_status 🔒
Whether an ending’s word is a failure. killed and stopped are in: a cancel is not a clean finish.
is_terminal_status 🔒
Whether a wire status word says the task is over. The CLI’s vocabulary is free-form and forge does not classify all of it, so this names the endings: a status nobody has seen is not evidence that work stopped.
subagent_cards
Every instance messages holds, in dispatch order.