pub struct ResumableState {Show 34 fields
pub agent_id: AgentId,
pub run_id: Option<RunId>,
pub session_id: Option<SessionId>,
pub parent_run_id: Option<RunId>,
pub parent_task_id: Option<TaskId>,
pub conversation_id: Option<ConversationId>,
pub message_history: Vec<ModelMessage>,
pub pending_tool_returns: Vec<ToolReturnPart>,
pub subagent_history: BTreeMap<String, Vec<ModelMessage>>,
pub user_prompts: Option<Vec<ContentPart>>,
pub previous_assistant_response_reference: Option<String>,
pub steering_messages: Vec<String>,
pub handoff_message: Option<String>,
pub shell_env: BTreeMap<String, String>,
pub deferred_tool_metadata: BTreeMap<String, Metadata>,
pub agent_registry: BTreeMap<String, AgentInfo>,
pub approval_required_tools: Vec<String>,
pub approval_required_mcp_servers: Vec<String>,
pub security: SecurityConfig,
pub auto_load_files: Vec<String>,
pub tasks: BTreeMap<String, Value>,
pub notes: BTreeMap<String, String>,
pub tool_search_loaded_tools: Vec<String>,
pub tool_search_loaded_namespaces: Vec<String>,
pub usage: Usage,
pub usage_snapshot_entries: BTreeMap<String, UsageSnapshotEntry>,
pub model_config: ModelConfig,
pub tool_config: ToolConfig,
pub started_at: DateTime<Utc>,
pub state: StateStore,
pub message_bus: MessageBus,
pub trace_snapshot: TraceContext,
pub metadata: Metadata,
pub extra: BTreeMap<String, Value>,
}Expand description
Serializable state used to restore an agent context.
Fields§
§agent_id: AgentIdAgent identifier.
run_id: Option<RunId>Current run identifier when exported.
session_id: Option<SessionId>Stable logical session affinity identifier.
parent_run_id: Option<RunId>Parent run identifier when this state belongs to a delegated child run.
parent_task_id: Option<TaskId>Parent-scoped delegated task identifier when this state belongs to a lightweight task.
conversation_id: Option<ConversationId>Conversation identifier.
message_history: Vec<ModelMessage>Canonical message history.
pending_tool_returns: Vec<ToolReturnPart>Tool returns to inject at the start of the next run.
subagent_history: BTreeMap<String, Vec<ModelMessage>>Serialized subagent history, keyed by agent id.
user_prompts: Option<Vec<ContentPart>>User prompt content collected for the current run.
previous_assistant_response_reference: Option<String>Visible assistant response immediately before the current user prompt.
steering_messages: Vec<String>Accumulated user steering messages for compact restore.
handoff_message: Option<String>Rendered handoff message.
shell_env: BTreeMap<String, String>Legacy shell environment accepted on restore but never emitted by current exports.
deferred_tool_metadata: BTreeMap<String, Metadata>Metadata for deferred tool calls.
agent_registry: BTreeMap<String, AgentInfo>Serialized agent registry.
approval_required_tools: Vec<String>Legacy agent-owned approval selector accepted for wire compatibility but never applied.
approval_required_mcp_servers: Vec<String>Legacy MCP approval selector accepted for wire compatibility but never applied.
security: SecurityConfigSecurity-related runtime configuration.
auto_load_files: Vec<String>File paths to mention for on-demand inspection on the next request.
The legacy field name is retained for serialized-state compatibility.
tasks: BTreeMap<String, Value>Serialized tasks from the typed task manager, keyed by task id.
notes: BTreeMap<String, String>Persisted notes, keyed by note id.
tool_search_loaded_tools: Vec<String>Tool names loaded through tool search.
tool_search_loaded_namespaces: Vec<String>Namespace IDs loaded through tool search.
usage: UsageAccumulated usage. Starweaver extension.
usage_snapshot_entries: BTreeMap<String, UsageSnapshotEntry>Per-run cumulative usage ledger entries keyed by stable source id.
model_config: ModelConfigModel/runtime configuration used for injected runtime context and tool policies.
tool_config: ToolConfigTool-level configuration used by first-party and host tools.
started_at: DateTime<Utc>Context creation time used for elapsed runtime context.
state: StateStoreState domains. Starweaver extension.
message_bus: MessageBusPending bus messages. Starweaver extension.
trace_snapshot: TraceContextTrace correlation snapshot. Starweaver extension.
metadata: MetadataRun metadata. Starweaver extension.
extra: BTreeMap<String, Value>Host extension data preserved across state export and restore.
Trait Implementations§
Source§impl Clone for ResumableState
impl Clone for ResumableState
Source§fn clone(&self) -> ResumableState
fn clone(&self) -> ResumableState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more