pub struct TurnSpec {Show 14 fields
pub kind: TurnKind,
pub system: String,
pub messages: Vec<Msg>,
pub tools: Vec<ToolDef>,
pub internal: Vec<String>,
pub mcp_routes: BTreeMap<String, (String, String)>,
pub output_schema: Option<Value>,
pub max_rounds: u32,
pub budget_admission: bool,
pub idempotency_prefix: String,
pub tool_meta: Option<Value>,
pub temperature: Option<f32>,
pub max_tokens_per_call: u32,
pub turn_id: String,
}Expand description
The turn worker’s input: everything the child needs to run exactly one turn — the system prompt, the context slice, the tool definitions and which of them round-trip to the supervisor, the output schema, and the knobs. The worker holds no state of its own between turns; whatever it needs is here.
Fields§
§kind: TurnKind§system: StringThe full system prompt (instruction + capabilities + skills + summary).
messages: Vec<Msg>The transcript slice (context messages incl. the triggering event).
tools: Vec<ToolDef>LLM-facing tool definitions (every class).
internal: Vec<String>Tool names that ROUND-TRIP to the supervisor (internal + mapped).
mcp_routes: BTreeMap<String, (String, String)>MCP-class tools the child calls itself: tool name → (server, wire tool).
output_schema: Option<Value>Validate the final answer against this schema (structured turns).
max_rounds: u32Max model rounds in this turn (0 = the payload’s limits.max_steps).
budget_admission: boolAsk the supervisor for budget admission before every model call.
idempotency_prefix: StringThe idempotency-key prefix for effects (<ctx>/<turn>). Every effect this
turn issues derives its key from this prefix, so a replayed turn reuses
the same keys and a retried effect is deduplicated instead of repeated.
tool_meta: Option<Value>Extra _meta stamped on MCP tool calls (run/ctx/principal).
temperature: Option<f32>§max_tokens_per_call: u32Per-response completion cap (0 = default).
turn_id: StringThe turn id (for logs and idempotency).