Expand description
Unified agent types shared between the agent pane (interactive) and the drone Agent block (headless). The design rationale lived in a Phase-1.5 lineage spec retired in #1928.
Wire format is camelCase via serde(rename_all) so the TS
mirror in frontend/types/srv-types.d.ts requires no field
translation.
Structs§
- Agent
Ref - Identifies “which agent.” Empty-string sentinels match the
existing mstore
AgentInstanceconventions. All fields optional so callers can construct anything from “blank claude with ambient creds” (all empty) up to a fully-pinned named-agent continuation. - Agent
RunResult - Final structured result of a complete agent run — the value the drone Agent block returns to downstream blocks. The agent pane discards this (it has already rendered the stream) but constructs the same struct for the audit log.
- Agent
Task - What the agent should do, plus the variables for
{{ }}resolution insideprompt. The agent pane usesprompt=<user-typed-text>with an emptycontext. The drone Agent block usesprompt=<block.data.task>resolved againstscope.outputs + scope.vars. - Agent
Turn - Token
Counts
Enums§
- Agent
Event - Discriminated streaming event. Same union for both the agent
pane (renders into the UI) and the drone Agent block
(accumulates until
Done, returnsAgentRunResult). - Compaction
Trigger - How compaction was triggered: the same type as
compaction_started’s trigger, whichagentmux-bashwrappublishes, so it is declared once, inagentmux-common. How compaction was triggered.Auto= context filled up and Claude Code compacted automatically;Manual= the user (or the agent itself) ran/compact.