Module types

Module types 

Source
Expand description

Unified agent types shared between the agent pane (interactive) and the drone Agent block (headless). See docs/specs/SPEC_UNIFIED_AGENT_TYPES_2026_05_13.md §3 for the full design rationale.

Wire format is camelCase via serde(rename_all) so the TS mirror in frontend/types/gotypes.d.ts requires no field translation.

Structs§

AgentRef
Identifies “which agent.” Empty-string sentinels match the existing wstore AgentInstance conventions. All fields optional so callers can construct anything from “blank claude with ambient creds” (all empty) up to a fully-pinned named-agent continuation.
AgentRunResult
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.
AgentTask
What the agent should do, plus the variables for {{ }} resolution inside prompt. The agent pane uses prompt=<user-typed-text> with an empty context. The drone Agent block uses prompt=<block.data.task> resolved against scope.outputs + scope.vars.
AgentTurn
TokenCounts

Enums§

AgentEvent
Discriminated streaming event. Same union for both the agent pane (renders into the UI) and the drone Agent block (accumulates until Done, returns AgentRunResult).