{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://omp.sh/schemas/rpc-wire.json",
	"title": "omp RPC wire protocol",
	"description": "Generated by `bun run gen:rpc` from packages/coding-agent/src/modes/rpc/wire. Commands are JSON lines on stdin; responses and frames are JSON lines on stdout.",
	"x-rpc": {
		"notification": "RpcNotification",
		"sessionEvent": "RpcAgentEvent",
		"serverFrame": "RpcServerFrame",
		"inbound": "RpcInbound",
		"commands": [
			{
				"name": "negotiate_protocol",
				"doc": "Switch the connection to a protocol version advertised by `ready`.",
				"params": "NegotiateProtocolParams",
				"result": "NegotiateProtocolResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "prompt",
				"doc": "Submit a prompt; acknowledged once admitted, completed by its `prompt_result`.",
				"params": "PromptParams",
				"result": "PromptAck",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": "prompt_result",
				"clientOmit": []
			},
			{
				"name": "steer",
				"doc": "Queue a steering message.",
				"params": "SteerParams",
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "follow_up",
				"doc": "Queue a follow-up message.",
				"params": "FollowUpParams",
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "remove_queued_message",
				"doc": "Remove one pending queued message by its queue-chip text.",
				"params": "RemoveQueuedMessageParams",
				"result": "RemoveQueuedMessageResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "promote_queued_message",
				"doc": "Move one queued follow-up to the end of the steering queue.",
				"params": "PromoteQueuedMessageParams",
				"result": "PromoteQueuedMessageResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "abort",
				"doc": "Abort the current run.",
				"params": null,
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "abort_and_prompt",
				"doc": "Abort the current run and submit a prompt; completed by its `prompt_result`.",
				"params": "AbortAndPromptParams",
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": "prompt_result",
				"clientOmit": []
			},
			{
				"name": "abort_and_restore_queue",
				"doc": "Withdraw queued user input, then abort the current run; returns the withdrawn input.",
				"params": null,
				"result": "AbortAndRestoreQueueResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "new_session",
				"doc": "Start a new session.",
				"params": "NewSessionParams",
				"result": "CancellationResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "open_session",
				"doc": "Continue the newest non-empty session in a directory, or start a fresh one there. Give provider and modelId together to override the saved model; otherwise an unavailable saved model fails the request.",
				"params": "OpenSessionParams",
				"result": "OpenSessionResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_state",
				"doc": "Snapshot the session state.",
				"params": null,
				"result": "SessionState",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_fast_mode",
				"doc": "Enable or disable fast mode for the session.",
				"params": "SetFastModeParams",
				"result": "FastModeResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_slow_mode",
				"doc": "Turn `/slow` on or off for the active model; returns whether it is now on.",
				"params": "SetSlowModeParams",
				"result": "SetSlowModeResult",
				"nullable": false,
				"unwrap": "enabled",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "goal",
				"doc": "Read or change goal mode with the lifecycle of the interactive `/goal` command.",
				"params": "GoalParams",
				"result": "GoalResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_ask_dialog",
				"doc": "Opt in to `ask` UI requests; returns the applied setting.",
				"params": "SetAskDialogParams",
				"result": "SetAskDialogResult",
				"nullable": false,
				"unwrap": "enabled",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_available_commands",
				"doc": "List the slash-command catalog.",
				"params": null,
				"result": "GetAvailableCommandsResult",
				"nullable": false,
				"unwrap": "commands",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_entries",
				"doc": "Read the append-history; with `since`, only entries strictly after that durable entry id.",
				"params": "GetEntriesParams",
				"result": "SessionEntries",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_tree",
				"doc": "Read the raw session tree.",
				"params": null,
				"result": "SessionTree",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_todos",
				"doc": "Replace the session's todo phases.",
				"params": "SetTodosParams",
				"result": "SetTodosResult",
				"nullable": false,
				"unwrap": "todoPhases",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_host_tools",
				"doc": "Replace the host-owned tools the server may call back into.",
				"params": "SetHostToolsParams",
				"result": "SetHostToolsResult",
				"nullable": false,
				"unwrap": "toolNames",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_host_uri_schemes",
				"doc": "Replace the host-owned URI schemes.",
				"params": "SetHostUriSchemesParams",
				"result": "SetHostUriSchemesResult",
				"nullable": false,
				"unwrap": "schemes",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_subagent_subscription",
				"doc": "Select which subagent frames are forwarded.",
				"params": "SetSubagentSubscriptionParams",
				"result": "SetSubagentSubscriptionResult",
				"nullable": false,
				"unwrap": "level",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_event_filter",
				"doc": "Forward only the listed session event types; null forwards all.",
				"params": "SetEventFilterParams",
				"result": "SetEventFilterResult",
				"nullable": false,
				"unwrap": "events",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": [
					"messageUpdates"
				]
			},
			{
				"name": "get_subagents",
				"doc": "List running subagents.",
				"params": null,
				"result": "GetSubagentsResult",
				"nullable": false,
				"unwrap": "subagents",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_subagent_messages",
				"doc": "Read a subagent transcript by id or registered session file (`subagentId` wins).",
				"params": "GetSubagentMessagesParams",
				"result": "SubagentMessages",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "cancel_subagent",
				"doc": "Hard-kill one running subagent; false when it is not running.",
				"params": "CancelSubagentParams",
				"result": "CancelSubagentResult",
				"nullable": false,
				"unwrap": "cancelled",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "steer_subagent",
				"doc": "Send a message to a running subagent as its user.",
				"params": "SteerSubagentParams",
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "live_start",
				"doc": "Start a live voice session bound to this session; returns the voice in use.",
				"params": "LiveStartParams",
				"result": "LiveStartResult",
				"nullable": false,
				"unwrap": "voice",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "live_connect",
				"doc": "Start a live voice session whose audio runs on a caller-owned WebRTC peer: send its SDP offer, apply the returned answer.",
				"params": "LiveConnectParams",
				"result": "LiveConnectResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "live_stop",
				"doc": "Stop the live voice session, if any.",
				"params": null,
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "live_mute",
				"doc": "Set microphone mute, or toggle it when `muted` is omitted; returns the new state.",
				"params": "LiveMuteParams",
				"result": "LiveMuteResult",
				"nullable": false,
				"unwrap": "muted",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "dictation_start",
				"doc": "Start draft-only speech-to-text; resolves once the microphone is recording.",
				"params": "DictationStartParams",
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": 600000,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "dictation_stop",
				"doc": "Stop and flush draft-only dictation, returning the accumulated text.",
				"params": null,
				"result": "DictationStopResult",
				"nullable": false,
				"unwrap": "text",
				"timeoutMs": 600000,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_model",
				"doc": "Select a model by provider and id.",
				"params": "SetModelParams",
				"result": "ModelInfo",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "cycle_model",
				"doc": "Cycle to the next model.",
				"params": null,
				"result": "ModelCycleResult",
				"nullable": true,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_available_models",
				"doc": "List available models.",
				"params": null,
				"result": "GetAvailableModelsResult",
				"nullable": false,
				"unwrap": "models",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_thinking_level",
				"doc": "Set the thinking level.",
				"params": "SetThinkingLevelParams",
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "cycle_thinking_level",
				"doc": "Cycle to the next thinking level.",
				"params": null,
				"result": "ThinkingLevelCycleResult",
				"nullable": true,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_available_thinking_levels",
				"doc": "Selectable thinking levels for the live model, `\"off\"` first.",
				"params": null,
				"result": "GetAvailableThinkingLevelsResult",
				"nullable": false,
				"unwrap": "levels",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_steering_mode",
				"doc": "Set how queued steering is delivered.",
				"params": "SetSteeringModeParams",
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_follow_up_mode",
				"doc": "Set how queued follow-ups are delivered.",
				"params": "SetFollowUpModeParams",
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_interrupt_mode",
				"doc": "Set how steering interrupts tools.",
				"params": "SetInterruptModeParams",
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "compact",
				"doc": "Compact the conversation.",
				"params": "CompactParams",
				"result": "CompactionResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_auto_compaction",
				"doc": "Enable or disable auto-compaction.",
				"params": "SetAutoCompactionParams",
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_cache_warming",
				"doc": "Override cache warming for this session only; returns the effective mode.",
				"params": "SetCacheWarmingParams",
				"result": "SetCacheWarmingResult",
				"nullable": false,
				"unwrap": "mode",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_auto_retry",
				"doc": "Enable or disable auto-retry.",
				"params": "SetAutoRetryParams",
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "abort_retry",
				"doc": "Abort a pending auto-retry.",
				"params": null,
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "bash",
				"doc": "Run a shell command. Before excluding output, require ready.supportsBashExcludeFromContext to be true.",
				"params": "BashParams",
				"result": "BashResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "abort_bash",
				"doc": "Abort the running shell command.",
				"params": null,
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_session_stats",
				"doc": "Session statistics.",
				"params": null,
				"result": "SessionStats",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_session_lease",
				"doc": "Which of these sessions a running process (this one included) owns, probed without taking ownership. Ids in neither list are free; `unknown` could not be probed.",
				"params": "GetSessionLeaseParams",
				"result": "GetSessionLeaseResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "export_html",
				"doc": "Export the session as HTML; returns the written path.",
				"params": "ExportHtmlParams",
				"result": "ExportHtmlResult",
				"nullable": false,
				"unwrap": "path",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "switch_session",
				"doc": "Switch to another session file. Give provider and modelId together to override the saved model; otherwise an unavailable saved model fails the request and keeps the current session.",
				"params": "SwitchSessionParams",
				"result": "CancellationResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "branch",
				"doc": "Branch the session at an entry.",
				"params": "BranchParams",
				"result": "BranchResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "fork",
				"doc": "Fork into a new session file: history through `entryId`, or the whole session.",
				"params": "ForkParams",
				"result": "CancellationResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "navigate_tree",
				"doc": "Move the session's leaf to an entry in the same file, optionally summarizing the branch it leaves; refused while busy.",
				"params": "NavigateTreeParams",
				"result": "NavigateTreeResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": 600000,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "abort_branch_summary",
				"doc": "Stop a running `navigate_tree` branch summary; the navigation is cancelled.",
				"params": null,
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_label",
				"doc": "Set or clear (omit `label`) an entry's label.",
				"params": "SetLabelParams",
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_branch_messages",
				"doc": "List user messages that can be branched from.",
				"params": null,
				"result": "GetBranchMessagesResult",
				"nullable": false,
				"unwrap": "messages",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_last_assistant_text",
				"doc": "Text of the last assistant message, if any.",
				"params": null,
				"result": "GetLastAssistantTextResult",
				"nullable": false,
				"unwrap": "text",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "set_session_name",
				"doc": "Rename the session.",
				"params": "SetSessionNameParams",
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "handoff",
				"doc": "Hand the conversation off to a fresh session; null when no handoff was produced.",
				"params": "HandoffParams",
				"result": "HandoffResult",
				"nullable": true,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_messages",
				"doc": "Every message of the session in one response.",
				"params": null,
				"result": "GetMessagesResult",
				"nullable": false,
				"unwrap": "messages",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_messages_page",
				"doc": "One stable page of messages.",
				"params": "GetMessagesPageParams",
				"result": "MessagesPage",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_login_providers",
				"doc": "List OAuth providers and their authentication status.",
				"params": null,
				"result": "GetLoginProvidersResult",
				"nullable": false,
				"unwrap": "providers",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "login",
				"doc": "Run OAuth login; the flow arrives as `open_url` and `input` UI requests.",
				"params": "LoginParams",
				"result": "LoginResult",
				"nullable": false,
				"unwrap": "providerId",
				"timeoutMs": 600000,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_logout_accounts",
				"doc": "List the stored credentials `logout` can remove for a provider, active first.",
				"params": "GetLogoutAccountsParams",
				"result": "GetLogoutAccountsResult",
				"nullable": false,
				"unwrap": "accounts",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "logout",
				"doc": "Remove one stored credential; fails when it is no longer stored. `remainingSource` names auth that still applies.",
				"params": "LogoutParams",
				"result": "LogoutResult",
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "predict_word",
				"doc": "Ghost-text suffix for the prose word ending at `cursor` (a UTF-16 offset); null when none applies.",
				"params": "PredictWordParams",
				"result": "PredictWordResult",
				"nullable": false,
				"unwrap": "suffix",
				"timeoutMs": 155000,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "predict_word_feedback",
				"doc": "Report a shown suggestion as accepted or typed past.",
				"params": "PredictWordFeedbackParams",
				"result": null,
				"nullable": false,
				"unwrap": null,
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "btw",
				"doc": "Ask a side question, or a follow-up in topic `recordId`; returns the record once it is running.",
				"params": "BtwParams",
				"result": "BtwResult",
				"nullable": false,
				"unwrap": "record",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "btw_cancel",
				"doc": "Cancel the running side question (only topic `recordId` when given); false when none matches.",
				"params": "BtwCancelParams",
				"result": "BtwCancelResult",
				"nullable": false,
				"unwrap": "cancelled",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			},
			{
				"name": "get_btw_history",
				"doc": "List the session's side-question records, newest first.",
				"params": null,
				"result": "GetBtwHistoryResult",
				"nullable": false,
				"unwrap": "records",
				"timeoutMs": null,
				"completion": null,
				"clientOmit": []
			}
		]
	},
	"$defs": {
		"Attribution": {
			"enum": [
				"user",
				"agent"
			],
			"type": "string",
			"description": "Who initiated a message, for billing and attribution."
		},
		"StopReason": {
			"enum": [
				"stop",
				"length",
				"toolUse",
				"error",
				"aborted"
			],
			"type": "string"
		},
		"TextContent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "text"
				},
				"text": {
					"type": "string"
				},
				"textSignature": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"text"
			],
			"x-open": true
		},
		"ThinkingContent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "thinking"
				},
				"thinking": {
					"type": "string"
				},
				"thinkingSignature": {
					"type": "string"
				},
				"itemId": {
					"type": "string"
				},
				"narration": {
					"type": "boolean",
					"description": "Prose the model addressed to the user, returned by the provider as thinking; present it as answer text."
				}
			},
			"required": [
				"type",
				"thinking"
			],
			"x-open": true
		},
		"RedactedThinkingContent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "redactedThinking"
				},
				"data": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"data"
			],
			"x-open": true
		},
		"ImageContent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "image"
				},
				"data": {
					"type": "string",
					"description": "Base64-encoded image bytes."
				},
				"mimeType": {
					"type": "string"
				},
				"detail": {
					"enum": [
						"auto",
						"low",
						"high",
						"original"
					],
					"type": "string"
				},
				"url": {
					"type": "string"
				},
				"providerFile": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				}
			},
			"required": [
				"type",
				"data",
				"mimeType"
			],
			"description": "Inline image; also the shape hosts send with prompts.",
			"x-open": true
		},
		"ToolCall": {
			"type": "object",
			"properties": {
				"type": {
					"const": "toolCall"
				},
				"id": {
					"type": "string"
				},
				"name": {
					"type": "string"
				},
				"arguments": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				},
				"thoughtSignature": {
					"type": "string"
				},
				"intent": {
					"type": "string"
				},
				"rawBlock": {
					"type": "string"
				},
				"customWireName": {
					"type": "string"
				},
				"providerMetadata": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				}
			},
			"required": [
				"type",
				"id",
				"name",
				"arguments"
			],
			"x-open": true
		},
		"FallbackContent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "fallback"
				},
				"from": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				},
				"to": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				}
			},
			"required": [
				"type",
				"from",
				"to"
			],
			"description": "Anthropic server-side fallback boundary marker; consumers other than Anthropic ignore it.",
			"x-open": true
		},
		"AnthropicServerToolContent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "anthropicServerTool"
				},
				"block": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				}
			},
			"required": [
				"type",
				"block"
			],
			"x-open": true
		},
		"UserContent": {
			"anyOf": [
				{
					"$ref": "#/$defs/TextContent"
				},
				{
					"$ref": "#/$defs/ImageContent"
				}
			]
		},
		"MessageContent": {
			"anyOf": [
				{
					"type": "string"
				},
				{
					"type": "array",
					"items": {
						"$ref": "#/$defs/UserContent"
					}
				}
			],
			"description": "Message content: plain text or content blocks."
		},
		"AssistantContent": {
			"anyOf": [
				{
					"$ref": "#/$defs/TextContent"
				},
				{
					"$ref": "#/$defs/ThinkingContent"
				},
				{
					"$ref": "#/$defs/RedactedThinkingContent"
				},
				{
					"$ref": "#/$defs/FallbackContent"
				},
				{
					"$ref": "#/$defs/AnthropicServerToolContent"
				},
				{
					"$ref": "#/$defs/ImageContent"
				},
				{
					"$ref": "#/$defs/ToolCall"
				}
			]
		},
		"UsageCost": {
			"type": "object",
			"properties": {
				"input": {
					"type": "number"
				},
				"output": {
					"type": "number"
				},
				"cacheRead": {
					"type": "number"
				},
				"cacheWrite": {
					"type": "number"
				},
				"total": {
					"type": "number"
				}
			},
			"required": [
				"input",
				"output",
				"cacheRead",
				"cacheWrite",
				"total"
			],
			"x-open": true
		},
		"Usage": {
			"type": "object",
			"properties": {
				"input": {
					"type": "integer"
				},
				"output": {
					"type": "integer"
				},
				"cacheRead": {
					"type": "integer"
				},
				"cacheWrite": {
					"type": "integer"
				},
				"totalTokens": {
					"type": "integer"
				},
				"cost": {
					"$ref": "#/$defs/UsageCost"
				},
				"contextTokens": {
					"type": "integer"
				},
				"premiumRequests": {
					"type": "number"
				},
				"reasoningTokens": {
					"type": "integer"
				},
				"orchestration": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				},
				"cttl": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				},
				"server": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				},
				"credits": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				}
			},
			"required": [
				"input",
				"output",
				"cacheRead",
				"cacheWrite",
				"totalTokens",
				"cost"
			],
			"x-open": true
		},
		"ParentIrc": {
			"type": "object",
			"properties": {
				"from": {
					"type": "string",
					"description": "Sending parent agent id."
				},
				"body": {
					"type": "string",
					"description": "Message body as the parent wrote it."
				}
			},
			"required": [
				"from",
				"body"
			],
			"description": "Parent-agent IRC message carried by a steer; render it instead of the model-facing `content` envelope.",
			"x-open": true
		},
		"UserMessage": {
			"type": "object",
			"properties": {
				"role": {
					"const": "user"
				},
				"content": {
					"$ref": "#/$defs/MessageContent"
				},
				"timestamp": {
					"type": "number"
				},
				"parentIrc": {
					"$ref": "#/$defs/ParentIrc"
				},
				"synthetic": {
					"type": "boolean"
				},
				"steering": {
					"type": "boolean"
				},
				"liveSteered": {
					"type": "boolean"
				},
				"historyRewriteAt": {
					"type": "number"
				},
				"attribution": {
					"$ref": "#/$defs/Attribution"
				},
				"providerPayload": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				}
			},
			"required": [
				"role",
				"content",
				"timestamp"
			],
			"x-open": true
		},
		"DeveloperMessage": {
			"type": "object",
			"properties": {
				"role": {
					"const": "developer"
				},
				"content": {
					"$ref": "#/$defs/MessageContent"
				},
				"timestamp": {
					"type": "number"
				},
				"attribution": {
					"$ref": "#/$defs/Attribution"
				},
				"synthetic": {
					"type": "boolean"
				},
				"userInitiated": {
					"type": "boolean"
				},
				"providerPayload": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				}
			},
			"required": [
				"role",
				"content",
				"timestamp"
			],
			"x-open": true
		},
		"AssistantMessage": {
			"type": "object",
			"properties": {
				"role": {
					"const": "assistant"
				},
				"content": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/AssistantContent"
					}
				},
				"api": {
					"type": "string"
				},
				"provider": {
					"type": "string"
				},
				"model": {
					"type": "string"
				},
				"usage": {
					"$ref": "#/$defs/Usage"
				},
				"stopReason": {
					"$ref": "#/$defs/StopReason"
				},
				"timestamp": {
					"type": "number"
				},
				"responseId": {
					"type": "string"
				},
				"upstreamProvider": {
					"type": "string"
				},
				"upstreamModel": {
					"type": "string"
				},
				"errorMessage": {
					"type": "string"
				},
				"errorStatus": {
					"type": "integer"
				},
				"errorId": {
					"type": "number"
				},
				"providerPayload": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				},
				"duration": {
					"type": "number"
				},
				"ttft": {
					"type": "number"
				},
				"completedAt": {
					"type": "number"
				}
			},
			"required": [
				"role",
				"content",
				"api",
				"provider",
				"model",
				"usage",
				"stopReason",
				"timestamp"
			],
			"x-open": true
		},
		"ToolResultMessage": {
			"type": "object",
			"properties": {
				"role": {
					"const": "toolResult"
				},
				"toolCallId": {
					"type": "string"
				},
				"toolName": {
					"type": "string"
				},
				"content": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/UserContent"
					}
				},
				"isError": {
					"type": "boolean"
				},
				"timestamp": {
					"type": "number"
				},
				"details": {},
				"attribution": {
					"$ref": "#/$defs/Attribution"
				},
				"prunedAt": {
					"type": "number"
				},
				"useless": {
					"type": "boolean"
				}
			},
			"required": [
				"role",
				"toolCallId",
				"toolName",
				"content",
				"isError",
				"timestamp"
			],
			"x-open": true
		},
		"BashExecutionMessage": {
			"type": "object",
			"properties": {
				"role": {
					"const": "bashExecution"
				},
				"command": {
					"type": "string"
				},
				"output": {
					"type": "string"
				},
				"cancelled": {
					"type": "boolean"
				},
				"truncated": {
					"type": "boolean"
				},
				"timestamp": {
					"type": "number"
				},
				"exitCode": {
					"type": "integer"
				},
				"images": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ImageContent"
					}
				},
				"meta": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				},
				"excludeFromContext": {
					"type": "boolean"
				}
			},
			"required": [
				"role",
				"command",
				"output",
				"cancelled",
				"truncated",
				"timestamp"
			],
			"x-open": true
		},
		"PythonExecutionMessage": {
			"type": "object",
			"properties": {
				"role": {
					"const": "pythonExecution"
				},
				"code": {
					"type": "string"
				},
				"output": {
					"type": "string"
				},
				"cancelled": {
					"type": "boolean"
				},
				"truncated": {
					"type": "boolean"
				},
				"timestamp": {
					"type": "number"
				},
				"exitCode": {
					"type": "integer"
				},
				"meta": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				},
				"excludeFromContext": {
					"type": "boolean"
				}
			},
			"required": [
				"role",
				"code",
				"output",
				"cancelled",
				"truncated",
				"timestamp"
			],
			"x-open": true
		},
		"CustomMessage": {
			"type": "object",
			"properties": {
				"role": {
					"const": "custom"
				},
				"customType": {
					"type": "string"
				},
				"content": {
					"$ref": "#/$defs/MessageContent"
				},
				"display": {
					"type": "boolean"
				},
				"timestamp": {
					"type": "number"
				},
				"details": {},
				"attribution": {
					"$ref": "#/$defs/Attribution"
				}
			},
			"required": [
				"role",
				"customType",
				"content",
				"display",
				"timestamp"
			],
			"x-open": true
		},
		"HookMessage": {
			"type": "object",
			"properties": {
				"role": {
					"const": "hookMessage"
				},
				"customType": {
					"type": "string"
				},
				"content": {
					"$ref": "#/$defs/MessageContent"
				},
				"display": {
					"type": "boolean"
				},
				"timestamp": {
					"type": "number"
				},
				"details": {},
				"attribution": {
					"$ref": "#/$defs/Attribution"
				}
			},
			"required": [
				"role",
				"customType",
				"content",
				"display",
				"timestamp"
			],
			"x-open": true
		},
		"BranchSummaryMessage": {
			"type": "object",
			"properties": {
				"role": {
					"const": "branchSummary"
				},
				"summary": {
					"type": "string"
				},
				"fromId": {
					"type": "string"
				},
				"timestamp": {
					"type": "number"
				}
			},
			"required": [
				"role",
				"summary",
				"fromId",
				"timestamp"
			],
			"x-open": true
		},
		"CompactionSummaryMessage": {
			"type": "object",
			"properties": {
				"role": {
					"const": "compactionSummary"
				},
				"summary": {
					"type": "string"
				},
				"tokensBefore": {
					"type": "integer"
				},
				"timestamp": {
					"type": "number"
				},
				"shortSummary": {
					"type": "string"
				},
				"tokensAfter": {
					"type": "integer"
				},
				"method": {
					"type": "string"
				},
				"providerPayload": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				}
			},
			"required": [
				"role",
				"summary",
				"tokensBefore",
				"timestamp"
			],
			"x-open": true
		},
		"FileMentionItem": {
			"type": "object",
			"properties": {
				"path": {
					"type": "string"
				},
				"content": {
					"type": "string"
				},
				"lineCount": {
					"type": "integer"
				},
				"byteSize": {
					"type": "integer"
				},
				"skippedReason": {
					"enum": [
						"tooLarge",
						"binary"
					],
					"type": "string"
				},
				"image": {
					"$ref": "#/$defs/ImageContent"
				}
			},
			"required": [
				"path",
				"content"
			],
			"x-open": true
		},
		"FileMentionMessage": {
			"type": "object",
			"properties": {
				"role": {
					"const": "fileMention"
				},
				"files": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/FileMentionItem"
					}
				},
				"timestamp": {
					"type": "number"
				}
			},
			"required": [
				"role",
				"files",
				"timestamp"
			],
			"x-open": true
		},
		"AgentMessage": {
			"anyOf": [
				{
					"$ref": "#/$defs/UserMessage"
				},
				{
					"$ref": "#/$defs/DeveloperMessage"
				},
				{
					"$ref": "#/$defs/AssistantMessage"
				},
				{
					"$ref": "#/$defs/ToolResultMessage"
				},
				{
					"$ref": "#/$defs/BashExecutionMessage"
				},
				{
					"$ref": "#/$defs/PythonExecutionMessage"
				},
				{
					"$ref": "#/$defs/CustomMessage"
				},
				{
					"$ref": "#/$defs/HookMessage"
				},
				{
					"$ref": "#/$defs/BranchSummaryMessage"
				},
				{
					"$ref": "#/$defs/CompactionSummaryMessage"
				},
				{
					"$ref": "#/$defs/FileMentionMessage"
				}
			],
			"description": "A transcript message, discriminated by `role`."
		},
		"AssistantStartEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "start"
				},
				"partial": {
					"$ref": "#/$defs/AssistantMessage"
				}
			},
			"required": [
				"type",
				"partial"
			],
			"x-open": true
		},
		"AssistantTextStartEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "text_start"
				},
				"contentIndex": {
					"type": "integer"
				},
				"partial": {
					"$ref": "#/$defs/AssistantMessage"
				}
			},
			"required": [
				"type",
				"contentIndex",
				"partial"
			],
			"x-open": true
		},
		"AssistantTextDeltaEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "text_delta"
				},
				"contentIndex": {
					"type": "integer"
				},
				"delta": {
					"type": "string"
				},
				"partial": {
					"$ref": "#/$defs/AssistantMessage"
				}
			},
			"required": [
				"type",
				"contentIndex",
				"delta",
				"partial"
			],
			"x-open": true
		},
		"AssistantTextEndEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "text_end"
				},
				"contentIndex": {
					"type": "integer"
				},
				"content": {
					"type": "string"
				},
				"partial": {
					"$ref": "#/$defs/AssistantMessage"
				}
			},
			"required": [
				"type",
				"contentIndex",
				"content",
				"partial"
			],
			"x-open": true
		},
		"AssistantThinkingStartEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "thinking_start"
				},
				"contentIndex": {
					"type": "integer"
				},
				"partial": {
					"$ref": "#/$defs/AssistantMessage"
				}
			},
			"required": [
				"type",
				"contentIndex",
				"partial"
			],
			"x-open": true
		},
		"AssistantThinkingDeltaEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "thinking_delta"
				},
				"contentIndex": {
					"type": "integer"
				},
				"delta": {
					"type": "string"
				},
				"partial": {
					"$ref": "#/$defs/AssistantMessage"
				}
			},
			"required": [
				"type",
				"contentIndex",
				"delta",
				"partial"
			],
			"x-open": true
		},
		"AssistantThinkingEndEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "thinking_end"
				},
				"contentIndex": {
					"type": "integer"
				},
				"content": {
					"type": "string"
				},
				"partial": {
					"$ref": "#/$defs/AssistantMessage"
				}
			},
			"required": [
				"type",
				"contentIndex",
				"content",
				"partial"
			],
			"x-open": true
		},
		"AssistantImageEndEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "image_end"
				},
				"contentIndex": {
					"type": "integer"
				},
				"content": {
					"$ref": "#/$defs/ImageContent"
				},
				"partial": {
					"$ref": "#/$defs/AssistantMessage"
				}
			},
			"required": [
				"type",
				"contentIndex",
				"content",
				"partial"
			],
			"x-open": true
		},
		"AssistantToolCallStartEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "toolcall_start"
				},
				"contentIndex": {
					"type": "integer"
				},
				"partial": {
					"$ref": "#/$defs/AssistantMessage"
				}
			},
			"required": [
				"type",
				"contentIndex",
				"partial"
			],
			"x-open": true
		},
		"AssistantToolCallDeltaEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "toolcall_delta"
				},
				"contentIndex": {
					"type": "integer"
				},
				"delta": {
					"type": "string"
				},
				"partial": {
					"$ref": "#/$defs/AssistantMessage"
				}
			},
			"required": [
				"type",
				"contentIndex",
				"delta",
				"partial"
			],
			"x-open": true
		},
		"AssistantToolCallEndEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "toolcall_end"
				},
				"contentIndex": {
					"type": "integer"
				},
				"toolCall": {
					"$ref": "#/$defs/ToolCall"
				},
				"partial": {
					"$ref": "#/$defs/AssistantMessage"
				}
			},
			"required": [
				"type",
				"contentIndex",
				"toolCall",
				"partial"
			],
			"x-open": true
		},
		"AssistantDoneEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "done"
				},
				"reason": {
					"enum": [
						"stop",
						"length",
						"toolUse"
					],
					"type": "string"
				},
				"message": {
					"$ref": "#/$defs/AssistantMessage"
				}
			},
			"required": [
				"type",
				"reason",
				"message"
			],
			"x-open": true
		},
		"AssistantErrorEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "error"
				},
				"reason": {
					"enum": [
						"aborted",
						"error"
					],
					"type": "string"
				},
				"error": {
					"$ref": "#/$defs/AssistantMessage"
				}
			},
			"required": [
				"type",
				"reason",
				"error"
			],
			"x-open": true
		},
		"AssistantMessageEvent": {
			"anyOf": [
				{
					"$ref": "#/$defs/AssistantStartEvent"
				},
				{
					"$ref": "#/$defs/AssistantTextStartEvent"
				},
				{
					"$ref": "#/$defs/AssistantTextDeltaEvent"
				},
				{
					"$ref": "#/$defs/AssistantTextEndEvent"
				},
				{
					"$ref": "#/$defs/AssistantThinkingStartEvent"
				},
				{
					"$ref": "#/$defs/AssistantThinkingDeltaEvent"
				},
				{
					"$ref": "#/$defs/AssistantThinkingEndEvent"
				},
				{
					"$ref": "#/$defs/AssistantImageEndEvent"
				},
				{
					"$ref": "#/$defs/AssistantToolCallStartEvent"
				},
				{
					"$ref": "#/$defs/AssistantToolCallDeltaEvent"
				},
				{
					"$ref": "#/$defs/AssistantToolCallEndEvent"
				},
				{
					"$ref": "#/$defs/AssistantDoneEvent"
				},
				{
					"$ref": "#/$defs/AssistantErrorEvent"
				}
			],
			"description": "Streaming update for one assistant message, discriminated by `type`."
		},
		"Effort": {
			"enum": [
				"minimal",
				"low",
				"medium",
				"high",
				"xhigh",
				"max"
			],
			"type": "string"
		},
		"ThinkingLevel": {
			"enum": [
				"inherit",
				"off",
				"minimal",
				"low",
				"medium",
				"high",
				"xhigh",
				"max"
			],
			"type": "string",
			"description": "Thinking selector; `inherit` defers to a higher-level selector."
		},
		"ConfiguredThinkingLevel": {
			"enum": [
				"auto",
				"inherit",
				"off",
				"minimal",
				"low",
				"medium",
				"high",
				"xhigh",
				"max"
			],
			"type": "string",
			"description": "User-configured thinking selector, including automatic selection."
		},
		"ModelCost": {
			"type": "object",
			"properties": {
				"input": {
					"type": "number"
				},
				"output": {
					"type": "number"
				},
				"cacheRead": {
					"type": "number"
				},
				"cacheWrite": {
					"type": "number"
				}
			},
			"required": [
				"input",
				"output",
				"cacheRead",
				"cacheWrite"
			],
			"description": "Per-million-token USD rates."
		},
		"ThinkingConfig": {
			"type": "object",
			"properties": {
				"mode": {
					"type": "string"
				},
				"efforts": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/Effort"
					}
				},
				"defaultLevel": {
					"$ref": "#/$defs/Effort"
				},
				"effortMap": {
					"type": "object",
					"properties": {},
					"additionalProperties": {
						"type": "string"
					}
				},
				"supportsDisplay": {
					"type": "boolean"
				},
				"prefixBinding": {
					"type": "boolean"
				},
				"effortRouting": {
					"type": "object",
					"properties": {},
					"additionalProperties": {
						"type": "string"
					}
				},
				"effortBudgets": {
					"type": "object",
					"properties": {},
					"additionalProperties": {
						"type": "number"
					}
				},
				"suppressWhenOff": {
					"type": "boolean"
				},
				"requiresEffort": {
					"type": "boolean"
				}
			},
			"required": [
				"mode",
				"efforts"
			]
		},
		"ModelInfo": {
			"type": "object",
			"properties": {
				"id": {
					"type": "string"
				},
				"name": {
					"type": "string"
				},
				"api": {
					"type": "string"
				},
				"provider": {
					"type": "string"
				},
				"baseUrl": {
					"type": "string"
				},
				"reasoning": {
					"type": "boolean"
				},
				"input": {
					"type": "array",
					"items": {
						"type": "string"
					},
					"description": "Accepted input modalities, e.g. `text`, `image`."
				},
				"cost": {
					"$ref": "#/$defs/ModelCost"
				},
				"contextWindow": {
					"anyOf": [
						{
							"type": "integer"
						},
						{
							"type": "null"
						}
					],
					"description": "Null when the provider does not report a limit."
				},
				"maxTokens": {
					"anyOf": [
						{
							"type": "integer"
						},
						{
							"type": "null"
						}
					],
					"description": "Null when the provider does not report a limit."
				},
				"headers": {
					"type": "object",
					"properties": {},
					"additionalProperties": {
						"type": "string"
					}
				},
				"premiumMultiplier": {
					"type": "number"
				},
				"preferWebsockets": {
					"type": "boolean"
				},
				"contextPromotionTarget": {
					"type": "string"
				},
				"priority": {
					"type": "integer"
				},
				"thinking": {
					"$ref": "#/$defs/ThinkingConfig"
				},
				"compat": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				}
			},
			"required": [
				"id",
				"name",
				"api",
				"provider",
				"baseUrl",
				"reasoning",
				"input",
				"cost",
				"contextWindow",
				"maxTokens"
			],
			"description": "Model descriptor: the client-relevant subset of the server's model record."
		},
		"QueueMode": {
			"enum": [
				"all",
				"one-at-a-time"
			],
			"type": "string"
		},
		"InterruptMode": {
			"enum": [
				"immediate",
				"wait"
			],
			"type": "string"
		},
		"StreamingBehavior": {
			"enum": [
				"steer",
				"followUp"
			],
			"type": "string"
		},
		"QueuedMessageQueue": {
			"enum": [
				"steering",
				"followUp"
			],
			"type": "string"
		},
		"CacheWarmingMode": {
			"enum": [
				"off",
				"streaming",
				"idle"
			],
			"type": "string"
		},
		"MessageUpdates": {
			"enum": [
				"full",
				"delta"
			],
			"type": "string",
			"description": "`set_event_filter` projection: `delta` replaces the accumulated snapshots with the block a start/end event touches."
		},
		"TodoStatus": {
			"enum": [
				"pending",
				"in_progress",
				"completed",
				"abandoned",
				"blocked"
			],
			"type": "string"
		},
		"GoalOp": {
			"enum": [
				"get",
				"create",
				"resume",
				"pause",
				"drop"
			],
			"type": "string"
		},
		"GoalStatus": {
			"enum": [
				"active",
				"paused",
				"budget-limited",
				"complete",
				"dropped"
			],
			"type": "string"
		},
		"SlashCommandSource": {
			"enum": [
				"builtin",
				"skill",
				"extension",
				"custom",
				"mcp_prompt",
				"file"
			],
			"type": "string"
		},
		"SubagentSubscriptionLevel": {
			"enum": [
				"off",
				"progress",
				"events"
			],
			"type": "string",
			"description": "Forwarded subagent frames: none, lifecycle and progress, or also raw session events."
		},
		"AgentSource": {
			"enum": [
				"bundled",
				"user",
				"project"
			],
			"type": "string"
		},
		"SubagentStatus": {
			"enum": [
				"pending",
				"running",
				"completed",
				"failed",
				"aborted"
			],
			"type": "string"
		},
		"TodoItem": {
			"type": "object",
			"properties": {
				"content": {
					"type": "string"
				},
				"status": {
					"$ref": "#/$defs/TodoStatus"
				},
				"blocker": {
					"type": "string",
					"description": "What a `blocked` task is waiting on."
				},
				"details": {
					"type": "string"
				},
				"notes": {
					"type": "array",
					"items": {
						"type": "string"
					}
				}
			},
			"required": [
				"content",
				"status"
			]
		},
		"TodoPhase": {
			"type": "object",
			"properties": {
				"name": {
					"type": "string"
				},
				"tasks": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/TodoItem"
					}
				}
			},
			"required": [
				"name",
				"tasks"
			]
		},
		"ContextUsage": {
			"type": "object",
			"properties": {
				"tokens": {
					"type": "integer"
				},
				"contextWindow": {
					"type": "integer"
				},
				"percent": {
					"type": "number"
				}
			},
			"required": [
				"tokens",
				"contextWindow",
				"percent"
			]
		},
		"QueuedMessagesState": {
			"type": "object",
			"properties": {
				"steering": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"followUp": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"liveSteered": {
					"type": "integer",
					"description": "Leading `steering` entries are live steering already sent into the streaming response; `remove_queued_message` cannot reach them.",
					"default": 0
				}
			},
			"required": [
				"steering",
				"followUp"
			],
			"description": "Displayable queue-chip text for pending user-authored messages; accepted verbatim by `remove_queued_message`."
		},
		"ToolDescriptor": {
			"type": "object",
			"properties": {
				"name": {
					"type": "string"
				},
				"description": {
					"type": "string"
				},
				"parameters": {},
				"examples": {
					"type": "array",
					"items": {}
				}
			},
			"required": [
				"name",
				"description"
			]
		},
		"Goal": {
			"type": "object",
			"properties": {
				"id": {
					"type": "string"
				},
				"objective": {
					"type": "string"
				},
				"status": {
					"$ref": "#/$defs/GoalStatus"
				},
				"tokensUsed": {
					"type": "integer"
				},
				"timeUsedSeconds": {
					"type": "number"
				},
				"createdAt": {
					"type": "integer"
				},
				"updatedAt": {
					"type": "integer"
				},
				"tokenBudget": {
					"type": "integer"
				}
			},
			"required": [
				"id",
				"objective",
				"status",
				"tokensUsed",
				"timeUsedSeconds",
				"createdAt",
				"updatedAt"
			],
			"description": "A tracked goal: its objective, lifecycle status, and resource accounting."
		},
		"GoalModeState": {
			"type": "object",
			"properties": {
				"enabled": {
					"type": "boolean"
				},
				"mode": {
					"enum": [
						"active",
						"exiting"
					],
					"type": "string"
				},
				"goal": {
					"$ref": "#/$defs/Goal"
				},
				"reason": {
					"const": "completed"
				}
			},
			"required": [
				"enabled",
				"mode",
				"goal"
			],
			"description": "Session goal mode; `mode` is `\"exiting\"` while a completed goal unwinds."
		},
		"GoalResult": {
			"type": "object",
			"properties": {
				"goal": {
					"anyOf": [
						{
							"$ref": "#/$defs/Goal"
						},
						{
							"type": "null"
						}
					]
				},
				"state": {
					"anyOf": [
						{
							"$ref": "#/$defs/GoalModeState"
						},
						{
							"type": "null"
						}
					]
				}
			},
			"required": [
				"goal",
				"state"
			],
			"description": "Outcome of every `goal` op; both fields are null when the session has no goal."
		},
		"SlowModeScope": {
			"enum": [
				"session",
				"global"
			],
			"type": "string",
			"description": "Where `/slow` lives: persisted config shared by every session, or this session's flex tier."
		},
		"UsageLimitLowPriority": {
			"type": "object",
			"properties": {
				"stage": {
					"const": "low_priority"
				},
				"resetsAtSec": {
					"type": "number",
					"description": "Epoch seconds when the limit that was hit resets."
				},
				"allowanceLeftPercent": {
					"type": "integer",
					"description": "Percent of the low-priority allowance still available, when reported."
				}
			},
			"required": [
				"stage",
				"resetsAtSec"
			],
			"description": "Requests are served on the provider's low-priority (slow) lane."
		},
		"UsageLimitWrapUp": {
			"type": "object",
			"properties": {
				"stage": {
					"const": "wrap_up"
				},
				"extraUsage": {
					"type": "boolean",
					"description": "Whether paid extra usage serves requests once the allowance is spent."
				},
				"resetsAtSec": {
					"type": "number",
					"description": "Epoch seconds when the limit that was hit resets, if reported."
				}
			},
			"required": [
				"stage",
				"extraUsage"
			],
			"description": "Requests run on a short wrap-up allowance past the limit."
		},
		"UsageLimitState": {
			"anyOf": [
				{
					"$ref": "#/$defs/UsageLimitLowPriority"
				},
				{
					"$ref": "#/$defs/UsageLimitWrapUp"
				}
			],
			"description": "Provider-neutral state of an account past its usage limit, discriminated by `stage`."
		},
		"SessionState": {
			"type": "object",
			"properties": {
				"sessionId": {
					"type": "string"
				},
				"model": {
					"$ref": "#/$defs/ModelInfo"
				},
				"thinkingLevel": {
					"$ref": "#/$defs/ThinkingLevel"
				},
				"isStreaming": {
					"type": "boolean",
					"default": false
				},
				"isCompacting": {
					"type": "boolean",
					"default": false
				},
				"steeringMode": {
					"$ref": "#/$defs/QueueMode",
					"default": "one-at-a-time"
				},
				"followUpMode": {
					"$ref": "#/$defs/QueueMode",
					"default": "one-at-a-time"
				},
				"interruptMode": {
					"$ref": "#/$defs/InterruptMode",
					"default": "immediate"
				},
				"sessionFile": {
					"type": "string"
				},
				"sessionName": {
					"type": "string"
				},
				"autoCompactionEnabled": {
					"type": "boolean",
					"default": false
				},
				"fastModeEnabled": {
					"type": "boolean",
					"default": false
				},
				"fastModeActive": {
					"type": "boolean",
					"default": false
				},
				"slowModeSupported": {
					"type": "boolean",
					"description": "`/slow` applies to the active model.",
					"default": false
				},
				"slowModeEnabled": {
					"type": "boolean",
					"description": "`/slow` is on for the active model; always `false` when `slowModeSupported` is `false`.",
					"default": false
				},
				"slowModeScope": {
					"$ref": "#/$defs/SlowModeScope",
					"description": "Where the active model's `/slow` lives; absent when unsupported."
				},
				"usageLimit": {
					"$ref": "#/$defs/UsageLimitState",
					"description": "Usage-limit stage of the active model's account; absent outside wrap-up and low priority."
				},
				"tokensPerSecond": {
					"anyOf": [
						{
							"type": "number"
						},
						{
							"type": "null"
						}
					],
					"default": null
				},
				"messageCount": {
					"type": "integer",
					"default": 0
				},
				"queuedMessageCount": {
					"type": "integer",
					"default": 0
				},
				"hasPendingAsyncWork": {
					"type": "boolean",
					"description": "Background jobs or deliveries can still inject a follow-up and wake the session.",
					"default": false
				},
				"isSettled": {
					"type": "boolean",
					"description": "Idle with nothing queued or pending; same predicate as `session_settled`.",
					"default": false
				},
				"queuedMessages": {
					"$ref": "#/$defs/QueuedMessagesState",
					"default": {
						"steering": [],
						"followUp": [],
						"liveSteered": 0
					}
				},
				"todoPhases": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/TodoPhase"
					},
					"default": []
				},
				"systemPrompt": {
					"type": "array",
					"items": {
						"type": "string"
					},
					"description": "System prompt sections, for session dumps.",
					"default": [],
					"x-scalar-or-array": true
				},
				"dumpTools": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ToolDescriptor"
					},
					"default": []
				},
				"contextUsage": {
					"$ref": "#/$defs/ContextUsage"
				},
				"goal": {
					"anyOf": [
						{
							"$ref": "#/$defs/GoalModeState"
						},
						{
							"type": "null"
						}
					],
					"description": "Current goal mode; null when the session has no goal.",
					"default": null
				}
			},
			"required": [
				"sessionId"
			]
		},
		"BashResult": {
			"type": "object",
			"properties": {
				"output": {
					"type": "string"
				},
				"cancelled": {
					"type": "boolean"
				},
				"truncated": {
					"type": "boolean"
				},
				"totalLines": {
					"type": "integer"
				},
				"totalBytes": {
					"type": "integer"
				},
				"outputLines": {
					"type": "integer"
				},
				"outputBytes": {
					"type": "integer"
				},
				"exitCode": {
					"type": "integer"
				},
				"timedOut": {
					"type": "boolean"
				},
				"artifactId": {
					"type": "string"
				},
				"artifactElidedBytes": {
					"type": "integer"
				},
				"elidedBytes": {
					"type": "integer",
					"description": "Bytes dropped from the middle of `output`, which keeps the head and tail."
				},
				"elidedLines": {
					"type": "integer",
					"description": "Lines dropped from the middle of `output`."
				},
				"columnDroppedBytes": {
					"type": "integer",
					"description": "Bytes the per-line column cap cut from `output`, across all lines."
				},
				"columnTruncatedLines": {
					"type": "integer",
					"description": "Lines of `output` the per-line column cap cut; the artifact holds them whole."
				},
				"columnTruncatedRange": {
					"$ref": "#/$defs/LineRange",
					"description": "First and last lines the column cap cut, numbered as in the artifact; absent when the numbering cannot match it."
				},
				"columnMax": {
					"type": "integer",
					"description": "The per-line column cap in UTF-8 bytes, set when it cut a line."
				},
				"artifactError": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				},
				"minimized": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				},
				"workingDir": {
					"type": "string"
				},
				"images": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ImageContent"
					}
				},
				"trace": {
					"type": "object",
					"properties": {},
					"additionalProperties": {},
					"description": "The embedded shell's final `ShellTrace` of the run; only when the caller asked for one."
				}
			},
			"required": [
				"output",
				"cancelled",
				"truncated",
				"totalLines",
				"totalBytes",
				"outputLines",
				"outputBytes"
			]
		},
		"LineRange": {
			"type": "object",
			"properties": {
				"first": {
					"type": "integer"
				},
				"last": {
					"type": "integer"
				}
			},
			"required": [
				"first",
				"last"
			]
		},
		"FastModeResult": {
			"type": "object",
			"properties": {
				"enabled": {
					"type": "boolean"
				},
				"active": {
					"type": "boolean"
				}
			},
			"required": [
				"enabled",
				"active"
			]
		},
		"CompactionResult": {
			"type": "object",
			"properties": {
				"summary": {
					"type": "string"
				},
				"firstKeptEntryId": {
					"type": "string"
				},
				"tokensBefore": {
					"type": "integer"
				},
				"shortSummary": {
					"type": "string"
				},
				"details": {},
				"preserveData": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				},
				"providerReplayThroughEntryId": {
					"type": "string"
				}
			},
			"required": [
				"summary",
				"firstKeptEntryId",
				"tokensBefore"
			]
		},
		"ModelCycleResult": {
			"type": "object",
			"properties": {
				"model": {
					"$ref": "#/$defs/ModelInfo"
				},
				"isScoped": {
					"type": "boolean"
				},
				"thinkingLevel": {
					"$ref": "#/$defs/ThinkingLevel"
				}
			},
			"required": [
				"model",
				"isScoped"
			]
		},
		"ThinkingLevelCycleResult": {
			"type": "object",
			"properties": {
				"level": {
					"$ref": "#/$defs/Effort"
				}
			},
			"required": [
				"level"
			]
		},
		"CancellationResult": {
			"type": "object",
			"properties": {
				"cancelled": {
					"type": "boolean"
				}
			},
			"required": [
				"cancelled"
			]
		},
		"OpenSessionResult": {
			"type": "object",
			"properties": {
				"cancelled": {
					"type": "boolean"
				},
				"resumed": {
					"type": "boolean"
				},
				"sessionId": {
					"type": "string"
				},
				"sessionFile": {
					"type": "string"
				}
			},
			"required": [
				"cancelled",
				"resumed",
				"sessionId"
			],
			"description": "`open_session` outcome; `resumed` is false when a fresh session was started."
		},
		"RemoveQueuedMessageResult": {
			"type": "object",
			"properties": {
				"removed": {
					"type": "boolean"
				},
				"images": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ImageContent"
					},
					"description": "The removed message's images, so the client can restore them with its text."
				},
				"imagesDropped": {
					"type": "boolean",
					"description": "Only ever `true`: the images exceeded the transport limit and were omitted; the removal still happened."
				}
			},
			"required": [
				"removed"
			]
		},
		"PromoteQueuedMessageResult": {
			"type": "object",
			"properties": {
				"promoted": {
					"type": "boolean"
				}
			},
			"required": [
				"promoted"
			]
		},
		"RestoredQueuedMessage": {
			"type": "object",
			"properties": {
				"text": {
					"type": "string"
				},
				"images": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ImageContent"
					}
				}
			},
			"required": [
				"text"
			],
			"description": "Queued user content withdrawn from the queue, as the editor would restore it."
		},
		"AbortAndRestoreQueueResult": {
			"type": "object",
			"properties": {
				"steering": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/RestoredQueuedMessage"
					}
				},
				"followUp": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/RestoredQueuedMessage"
					}
				},
				"imagesDropped": {
					"type": "boolean",
					"description": "Only ever `true`: the full result exceeded the transport limit and every `images` was omitted."
				},
				"truncated": {
					"type": "boolean",
					"description": "Only ever `true`: even the text-only result exceeded the limit, so only an oldest-first prefix is listed."
				}
			},
			"required": [
				"steering",
				"followUp"
			],
			"description": "User-authored queued input withdrawn before the abort, oldest first."
		},
		"BranchMessage": {
			"type": "object",
			"properties": {
				"entryId": {
					"type": "string"
				},
				"text": {
					"type": "string"
				}
			},
			"required": [
				"entryId",
				"text"
			]
		},
		"BranchResult": {
			"type": "object",
			"properties": {
				"text": {
					"type": "string"
				},
				"cancelled": {
					"type": "boolean"
				}
			},
			"required": [
				"text",
				"cancelled"
			]
		},
		"NavigateTreeResult": {
			"type": "object",
			"properties": {
				"cancelled": {
					"type": "boolean"
				},
				"aborted": {
					"type": "boolean",
					"description": "Only ever `true`: `abort_branch_summary` stopped the summary; nothing moved."
				},
				"editorText": {
					"type": "string",
					"description": "The target was a user message: its text, for the editor; the leaf moved to its parent."
				}
			},
			"required": [
				"cancelled"
			]
		},
		"TokenUsage": {
			"type": "object",
			"properties": {
				"input": {
					"type": "integer"
				},
				"output": {
					"type": "integer"
				},
				"cacheRead": {
					"type": "integer"
				},
				"cacheWrite": {
					"type": "integer"
				},
				"total": {
					"type": "integer"
				},
				"reasoning": {
					"type": "integer",
					"default": 0
				}
			},
			"required": [
				"input",
				"output",
				"cacheRead",
				"cacheWrite",
				"total"
			]
		},
		"SessionCredits": {
			"type": "object",
			"properties": {
				"cost": {
					"type": "number"
				},
				"committedCost": {
					"type": "number"
				},
				"acuCost": {
					"type": "number"
				}
			},
			"required": [
				"cost",
				"committedCost",
				"acuCost"
			]
		},
		"SessionStats": {
			"type": "object",
			"properties": {
				"sessionId": {
					"type": "string"
				},
				"userMessages": {
					"type": "integer"
				},
				"assistantMessages": {
					"type": "integer"
				},
				"toolCalls": {
					"type": "integer"
				},
				"toolResults": {
					"type": "integer"
				},
				"totalMessages": {
					"type": "integer"
				},
				"tokens": {
					"$ref": "#/$defs/TokenUsage"
				},
				"premiumRequests": {
					"type": "number"
				},
				"cost": {
					"type": "number"
				},
				"sessionFile": {
					"type": "string"
				},
				"credits": {
					"$ref": "#/$defs/SessionCredits"
				},
				"routedModels": {
					"type": "object",
					"properties": {},
					"additionalProperties": {
						"type": "number"
					}
				},
				"editRejections": {
					"type": "object",
					"properties": {},
					"additionalProperties": {
						"type": "number"
					},
					"description": "Failed edits by the engine's `errorKind`."
				},
				"contextUsage": {
					"$ref": "#/$defs/ContextUsage"
				}
			},
			"required": [
				"sessionId",
				"userMessages",
				"assistantMessages",
				"toolCalls",
				"toolResults",
				"totalMessages",
				"tokens",
				"premiumRequests",
				"cost"
			]
		},
		"MessagesPage": {
			"type": "object",
			"properties": {
				"messages": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/AgentMessage"
					}
				},
				"totalMessages": {
					"type": "integer"
				},
				"nextCursor": {
					"type": "string",
					"description": "Opaque cursor for the next page; absent on the last page."
				}
			},
			"required": [
				"messages",
				"totalMessages"
			]
		},
		"SlashCommandInput": {
			"type": "object",
			"properties": {
				"hint": {
					"type": "string"
				}
			}
		},
		"SlashSubcommand": {
			"type": "object",
			"properties": {
				"name": {
					"type": "string"
				},
				"description": {
					"type": "string"
				},
				"usage": {
					"type": "string"
				}
			},
			"required": [
				"name"
			]
		},
		"AvailableSlashCommand": {
			"type": "object",
			"properties": {
				"name": {
					"type": "string"
				},
				"source": {
					"$ref": "#/$defs/SlashCommandSource"
				},
				"aliases": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"description": {
					"type": "string"
				},
				"input": {
					"$ref": "#/$defs/SlashCommandInput"
				},
				"subcommands": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/SlashSubcommand"
					}
				}
			},
			"required": [
				"name",
				"source"
			]
		},
		"SessionEntries": {
			"type": "object",
			"properties": {
				"entries": {
					"type": "array",
					"items": {
						"type": "object",
						"properties": {},
						"additionalProperties": {}
					}
				},
				"leafId": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "null"
						}
					]
				}
			},
			"required": [
				"entries",
				"leafId"
			],
			"description": "OMP-native session entries in append order."
		},
		"SessionTree": {
			"type": "object",
			"properties": {
				"tree": {
					"type": "array",
					"items": {
						"type": "object",
						"properties": {},
						"additionalProperties": {}
					}
				},
				"leafId": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "null"
						}
					]
				}
			},
			"required": [
				"tree",
				"leafId"
			],
			"description": "Raw session tree roots."
		},
		"SubagentSnapshot": {
			"type": "object",
			"properties": {
				"id": {
					"type": "string"
				},
				"index": {
					"type": "integer"
				},
				"agent": {
					"type": "string"
				},
				"agentSource": {
					"$ref": "#/$defs/AgentSource"
				},
				"status": {
					"$ref": "#/$defs/SubagentStatus"
				},
				"lastUpdate": {
					"type": "integer"
				},
				"description": {
					"type": "string"
				},
				"task": {
					"type": "string"
				},
				"assignment": {
					"type": "string"
				},
				"sessionFile": {
					"type": "string"
				},
				"progress": {
					"type": "object",
					"properties": {},
					"additionalProperties": {},
					"description": "Raw `AgentProgress` record."
				},
				"parentToolCallId": {
					"type": "string"
				}
			},
			"required": [
				"id",
				"index",
				"agent",
				"agentSource",
				"status",
				"lastUpdate"
			]
		},
		"SubagentMessages": {
			"type": "object",
			"properties": {
				"sessionFile": {
					"type": "string"
				},
				"fromByte": {
					"type": "integer"
				},
				"nextByte": {
					"type": "integer",
					"description": "Pass as the next `fromByte` to read incrementally."
				},
				"reset": {
					"type": "boolean",
					"description": "`fromByte` exceeded the file size and reading restarted at zero."
				},
				"entries": {
					"type": "array",
					"items": {
						"type": "object",
						"properties": {},
						"additionalProperties": {}
					}
				},
				"messages": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/AgentMessage"
					}
				}
			},
			"required": [
				"sessionFile",
				"fromByte",
				"nextByte",
				"reset",
				"entries",
				"messages"
			],
			"description": "Incremental subagent transcript read."
		},
		"BtwStatus": {
			"enum": [
				"running",
				"complete",
				"cancelled",
				"error",
				"interrupted"
			],
			"type": "string",
			"description": "Side-question turn lifecycle; `interrupted` marks a turn whose process died while it ran."
		},
		"BtwHistoryTurn": {
			"type": "object",
			"properties": {
				"question": {
					"type": "string"
				},
				"answer": {
					"type": "string"
				},
				"status": {
					"$ref": "#/$defs/BtwStatus"
				},
				"createdAt": {
					"type": "integer"
				},
				"updatedAt": {
					"type": "integer"
				},
				"images": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ImageContent"
					},
					"description": "Images attached to the question."
				},
				"error": {
					"type": "string"
				}
			},
			"required": [
				"question",
				"answer",
				"status",
				"createdAt",
				"updatedAt"
			],
			"description": "One question and its answer within a side-question topic."
		},
		"BtwHistoryRecord": {
			"type": "object",
			"properties": {
				"question": {
					"type": "string"
				},
				"answer": {
					"type": "string"
				},
				"status": {
					"$ref": "#/$defs/BtwStatus"
				},
				"createdAt": {
					"type": "integer"
				},
				"updatedAt": {
					"type": "integer"
				},
				"id": {
					"type": "string"
				},
				"leafId": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "null"
						}
					]
				},
				"images": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ImageContent"
					},
					"description": "Images attached to the question."
				},
				"error": {
					"type": "string"
				},
				"followUps": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/BtwHistoryTurn"
					}
				}
			},
			"required": [
				"question",
				"answer",
				"status",
				"createdAt",
				"updatedAt",
				"id",
				"leafId"
			],
			"description": "A side-question topic: its first turn's fields plus follow-ups; the latest turn is the last follow-up, else the record."
		},
		"LoginProvider": {
			"type": "object",
			"properties": {
				"id": {
					"type": "string"
				},
				"name": {
					"type": "string"
				},
				"available": {
					"type": "boolean"
				},
				"authenticated": {
					"type": "boolean"
				}
			},
			"required": [
				"id",
				"name",
				"available",
				"authenticated"
			]
		},
		"LogoutAccount": {
			"type": "object",
			"properties": {
				"credentialId": {
					"type": "integer"
				},
				"provider": {
					"type": "string"
				},
				"label": {
					"type": "string"
				},
				"detail": {
					"type": "string"
				},
				"type": {
					"enum": [
						"api_key",
						"oauth"
					],
					"type": "string"
				},
				"active": {
					"type": "boolean"
				}
			},
			"required": [
				"credentialId",
				"provider",
				"label",
				"detail",
				"type",
				"active"
			],
			"description": "A stored credential `logout` can remove; `active` marks credentials the session may be using."
		},
		"HandoffResult": {
			"type": "object",
			"properties": {
				"savedPath": {
					"type": "string"
				}
			}
		},
		"PromptAck": {
			"type": "object",
			"properties": {
				"agentInvoked": {
					"type": "boolean"
				}
			},
			"description": "`agentInvoked: false` means the prompt completed locally and no `prompt_result` follows."
		},
		"AutoCompactionReason": {
			"enum": [
				"threshold",
				"overflow",
				"idle",
				"incomplete"
			],
			"type": "string"
		},
		"AutoCompactionAction": {
			"enum": [
				"context-full",
				"remote",
				"handoff",
				"shake",
				"snapcompact"
			],
			"type": "string"
		},
		"CacheWarmingPhase": {
			"enum": [
				"streaming",
				"idle"
			],
			"type": "string"
		},
		"CacheWarmingOutcome": {
			"enum": [
				"hit",
				"miss",
				"error",
				"aborted"
			],
			"type": "string"
		},
		"NotifyType": {
			"enum": [
				"info",
				"warning",
				"error"
			],
			"type": "string"
		},
		"AgentStartEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "agent_start"
				},
				"resumedToolCallIds": {
					"type": "array",
					"items": {
						"type": "string"
					},
					"description": "Calls of an unpaired assistant tail a continued run executes before its first model request."
				}
			},
			"required": [
				"type"
			]
		},
		"AgentEndEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "agent_end"
				},
				"messages": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/AgentMessage"
					},
					"description": "Messages of the run; an oversized frame drops a prefix already delivered by `message_end` (see `messageCount`)."
				},
				"messageCount": {
					"type": "integer",
					"description": "Original message count when the frame was compacted."
				},
				"isTerminal": {
					"type": "boolean",
					"description": "False when a continuation or async delivery remains."
				},
				"yielded": {
					"type": "boolean",
					"description": "The agent finished its turn and resumes only for queued input or background-job results."
				},
				"awaitingAsyncWork": {
					"type": "boolean",
					"description": "Non-terminal end whose only possible resume is a background-job result."
				},
				"telemetry": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				},
				"coverage": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				}
			},
			"required": [
				"type",
				"messages"
			]
		},
		"TurnStartEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "turn_start"
				}
			},
			"required": [
				"type"
			]
		},
		"TurnEndEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "turn_end"
				},
				"message": {
					"$ref": "#/$defs/AgentMessage"
				},
				"toolResults": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ToolResultMessage"
					}
				}
			},
			"required": [
				"type",
				"message",
				"toolResults"
			]
		},
		"MessageStartEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "message_start"
				},
				"message": {
					"$ref": "#/$defs/AgentMessage"
				},
				"messageId": {
					"type": "string",
					"description": "Shared by the start, updates, and end of one message; unique per process."
				}
			},
			"required": [
				"type",
				"message"
			]
		},
		"MessageUpdateEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "message_update"
				},
				"message": {
					"$ref": "#/$defs/AgentMessage"
				},
				"assistantMessageEvent": {
					"$ref": "#/$defs/AssistantMessageEvent"
				},
				"messageId": {
					"type": "string",
					"description": "Shared by the start, updates, and end of one message; unique per process."
				}
			},
			"required": [
				"type",
				"message",
				"assistantMessageEvent"
			]
		},
		"MessageEndEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "message_end"
				},
				"message": {
					"$ref": "#/$defs/AgentMessage"
				},
				"messageId": {
					"type": "string",
					"description": "Shared by the start, updates, and end of one message; unique per process."
				}
			},
			"required": [
				"type",
				"message"
			]
		},
		"ToolExecutionStartEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "tool_execution_start"
				},
				"toolCallId": {
					"type": "string"
				},
				"toolName": {
					"type": "string"
				},
				"args": {},
				"intent": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"toolCallId",
				"toolName"
			]
		},
		"ToolExecutionUpdateEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "tool_execution_update"
				},
				"toolCallId": {
					"type": "string"
				},
				"toolName": {
					"type": "string"
				},
				"args": {},
				"partialResult": {}
			},
			"required": [
				"type",
				"toolCallId",
				"toolName"
			]
		},
		"ToolStreamUpdateEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "tool_stream_update"
				},
				"toolCallId": {
					"type": "string"
				},
				"toolName": {
					"type": "string"
				},
				"update": {}
			},
			"required": [
				"type",
				"toolCallId",
				"toolName"
			]
		},
		"ToolExecutionEndEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "tool_execution_end"
				},
				"toolCallId": {
					"type": "string"
				},
				"toolName": {
					"type": "string"
				},
				"result": {},
				"isError": {
					"type": "boolean"
				}
			},
			"required": [
				"type",
				"toolCallId",
				"toolName"
			]
		},
		"AutoCompactionStartEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "auto_compaction_start"
				},
				"reason": {
					"$ref": "#/$defs/AutoCompactionReason"
				},
				"action": {
					"$ref": "#/$defs/AutoCompactionAction"
				}
			},
			"required": [
				"type",
				"reason",
				"action"
			]
		},
		"AutoCompactionEndEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "auto_compaction_end"
				},
				"action": {
					"$ref": "#/$defs/AutoCompactionAction"
				},
				"aborted": {
					"type": "boolean"
				},
				"willRetry": {
					"type": "boolean"
				},
				"result": {
					"$ref": "#/$defs/CompactionResult"
				},
				"errorMessage": {
					"type": "string"
				},
				"skipped": {
					"type": "boolean",
					"description": "Compaction was skipped for a benign reason."
				}
			},
			"required": [
				"type",
				"action",
				"aborted",
				"willRetry"
			]
		},
		"ManualCompactionStartEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "manual_compaction_start"
				},
				"mode": {
					"type": "string",
					"description": "The `/compact <mode>` subcommand, when one was given."
				}
			},
			"required": [
				"type"
			],
			"description": "A manual compaction (`compact` command, `/compact`, extension `ctx.compact()`) began; the live turn is already aborted."
		},
		"ManualCompactionEndEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "manual_compaction_end"
				},
				"aborted": {
					"type": "boolean",
					"description": "The compaction was cancelled (abort, or a `session_before_compact` hook)."
				},
				"result": {
					"$ref": "#/$defs/CompactionResult",
					"description": "Present when the compaction committed."
				},
				"skipped": {
					"type": "boolean",
					"description": "There was nothing to compact; `errorMessage` says why."
				},
				"errorMessage": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"aborted"
			],
			"description": "Outcome of the compaction announced by the matching `manual_compaction_start`."
		},
		"AutoRetryStartEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "auto_retry_start"
				},
				"attempt": {
					"type": "integer"
				},
				"maxAttempts": {
					"type": "integer"
				},
				"delayMs": {
					"type": "integer"
				},
				"errorMessage": {
					"type": "string"
				},
				"errorId": {
					"type": "integer"
				}
			},
			"required": [
				"type",
				"attempt",
				"maxAttempts",
				"delayMs",
				"errorMessage"
			]
		},
		"AutoRetryEndEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "auto_retry_end"
				},
				"success": {
					"type": "boolean"
				},
				"attempt": {
					"type": "integer"
				},
				"finalError": {
					"type": "string"
				},
				"retryErrors": {
					"type": "array",
					"items": {
						"type": "object",
						"properties": {},
						"additionalProperties": {}
					},
					"description": "Persisted retry errors whose presentation changed when the retry settled.",
					"default": []
				}
			},
			"required": [
				"type",
				"success",
				"attempt"
			]
		},
		"CacheWarmingStartEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "cache_warming_start"
				},
				"phase": {
					"$ref": "#/$defs/CacheWarmingPhase"
				},
				"provider": {
					"type": "string"
				},
				"model": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"phase",
				"provider",
				"model"
			],
			"description": "A prompt-cache refresh was handed to the provider."
		},
		"CacheWarmingEndEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "cache_warming_end"
				},
				"phase": {
					"$ref": "#/$defs/CacheWarmingPhase"
				},
				"provider": {
					"type": "string"
				},
				"model": {
					"type": "string"
				},
				"outcome": {
					"$ref": "#/$defs/CacheWarmingOutcome"
				},
				"usage": {
					"$ref": "#/$defs/Usage",
					"description": "Present only when the refresh was billed."
				},
				"warmingStopReason": {
					"type": "string",
					"description": "Why warming stopped; absent while it continues."
				}
			},
			"required": [
				"type",
				"phase",
				"provider",
				"model",
				"outcome"
			],
			"description": "Outcome of the refresh announced by the matching `cache_warming_start`."
		},
		"RetryFallbackAppliedEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "retry_fallback_applied"
				},
				"from": {
					"type": "string"
				},
				"to": {
					"type": "string"
				},
				"role": {
					"type": "string"
				},
				"reason": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"from",
				"to",
				"role"
			]
		},
		"RetryFallbackSucceededEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "retry_fallback_succeeded"
				},
				"model": {
					"type": "string"
				},
				"role": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"model",
				"role"
			]
		},
		"ModelChangedEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "model_changed"
				}
			},
			"required": [
				"type"
			]
		},
		"ConfigWarningsChangedEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "config_warnings_changed"
				}
			},
			"required": [
				"type"
			]
		},
		"AdvisorCostChangedEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "advisor_cost_changed"
				}
			},
			"required": [
				"type"
			]
		},
		"AdvisorYieldedEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "advisor_yielded"
				}
			},
			"required": [
				"type"
			]
		},
		"TtsrTriggeredEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "ttsr_triggered"
				},
				"rules": {
					"type": "array",
					"items": {
						"type": "object",
						"properties": {},
						"additionalProperties": {}
					}
				}
			},
			"required": [
				"type",
				"rules"
			],
			"description": "Rule injection: a TTSR rule matched the stream and its text was injected. Each rule carries at least `name`, `path`, and `content`."
		},
		"TodoReminderEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "todo_reminder"
				},
				"todos": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/TodoItem"
					}
				},
				"attempt": {
					"type": "integer"
				},
				"maxAttempts": {
					"type": "integer"
				}
			},
			"required": [
				"type",
				"todos",
				"attempt",
				"maxAttempts"
			]
		},
		"TodoAutoClearEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "todo_auto_clear"
				}
			},
			"required": [
				"type"
			]
		},
		"IrcMessageEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "irc_message"
				},
				"message": {
					"$ref": "#/$defs/CustomMessage"
				}
			},
			"required": [
				"type",
				"message"
			]
		},
		"NoticeEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "notice"
				},
				"level": {
					"$ref": "#/$defs/NotifyType"
				},
				"message": {
					"type": "string"
				},
				"source": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"level",
				"message"
			]
		},
		"ThinkingLevelChangedEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "thinking_level_changed"
				},
				"thinkingLevel": {
					"$ref": "#/$defs/ThinkingLevel"
				},
				"configured": {
					"$ref": "#/$defs/ConfiguredThinkingLevel",
					"description": "The user's selector when it differs from the effective level."
				},
				"resolved": {
					"$ref": "#/$defs/Effort",
					"description": "The level `auto` resolved to this turn, once classified."
				}
			},
			"required": [
				"type"
			],
			"description": "The effective thinking level changed."
		},
		"GoalUpdatedEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "goal_updated"
				},
				"goal": {
					"anyOf": [
						{
							"$ref": "#/$defs/Goal"
						},
						{
							"type": "null"
						}
					]
				},
				"state": {
					"$ref": "#/$defs/GoalModeState"
				}
			},
			"required": [
				"type",
				"goal"
			],
			"description": "Goal mode changed, by a host `goal` command or the agent's `goal` tool."
		},
		"QueueUpdateEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "queue_update"
				},
				"steering": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"followUp": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"liveSteered": {
					"type": "integer",
					"description": "Leading `steering` entries are live steering already sent into the streaming response; `remove_queued_message` cannot reach them.",
					"default": 0
				}
			},
			"required": [
				"type",
				"steering",
				"followUp"
			],
			"description": "Coalesced snapshot of the displayable steering/follow-up queue, sent whenever it changes."
		},
		"RpcAgentEvent": {
			"anyOf": [
				{
					"$ref": "#/$defs/AgentStartEvent"
				},
				{
					"$ref": "#/$defs/AgentEndEvent"
				},
				{
					"$ref": "#/$defs/TurnStartEvent"
				},
				{
					"$ref": "#/$defs/TurnEndEvent"
				},
				{
					"$ref": "#/$defs/MessageStartEvent"
				},
				{
					"$ref": "#/$defs/MessageUpdateEvent"
				},
				{
					"$ref": "#/$defs/MessageEndEvent"
				},
				{
					"$ref": "#/$defs/ToolExecutionStartEvent"
				},
				{
					"$ref": "#/$defs/ToolExecutionUpdateEvent"
				},
				{
					"$ref": "#/$defs/ToolStreamUpdateEvent"
				},
				{
					"$ref": "#/$defs/ToolExecutionEndEvent"
				},
				{
					"$ref": "#/$defs/AutoCompactionStartEvent"
				},
				{
					"$ref": "#/$defs/AutoCompactionEndEvent"
				},
				{
					"$ref": "#/$defs/ManualCompactionStartEvent"
				},
				{
					"$ref": "#/$defs/ManualCompactionEndEvent"
				},
				{
					"$ref": "#/$defs/AutoRetryStartEvent"
				},
				{
					"$ref": "#/$defs/AutoRetryEndEvent"
				},
				{
					"$ref": "#/$defs/CacheWarmingStartEvent"
				},
				{
					"$ref": "#/$defs/CacheWarmingEndEvent"
				},
				{
					"$ref": "#/$defs/RetryFallbackAppliedEvent"
				},
				{
					"$ref": "#/$defs/RetryFallbackSucceededEvent"
				},
				{
					"$ref": "#/$defs/ModelChangedEvent"
				},
				{
					"$ref": "#/$defs/ConfigWarningsChangedEvent"
				},
				{
					"$ref": "#/$defs/AdvisorCostChangedEvent"
				},
				{
					"$ref": "#/$defs/AdvisorYieldedEvent"
				},
				{
					"$ref": "#/$defs/TtsrTriggeredEvent"
				},
				{
					"$ref": "#/$defs/TodoReminderEvent"
				},
				{
					"$ref": "#/$defs/TodoAutoClearEvent"
				},
				{
					"$ref": "#/$defs/IrcMessageEvent"
				},
				{
					"$ref": "#/$defs/NoticeEvent"
				},
				{
					"$ref": "#/$defs/ThinkingLevelChangedEvent"
				},
				{
					"$ref": "#/$defs/GoalUpdatedEvent"
				},
				{
					"$ref": "#/$defs/QueueUpdateEvent"
				}
			],
			"description": "A session event, discriminated by `type`; `set_event_filter` selects which are sent."
		},
		"ReadyEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "ready"
				},
				"protocolVersion": {
					"type": "integer"
				},
				"supportedProtocolVersions": {
					"type": "array",
					"items": {
						"type": "integer"
					}
				},
				"maxFrameBytes": {
					"type": "integer"
				},
				"maxReassembledFrameBytes": {
					"type": "integer"
				},
				"supportsBashExcludeFromContext": {
					"type": "boolean",
					"description": "`bash` accepts `excludeFromContext`; require exactly true before sending excluded commands."
				}
			},
			"required": [
				"type"
			],
			"description": "First frame after startup; transport fields are absent on servers without protocol v2."
		},
		"PromptStatus": {
			"enum": [
				"completed",
				"aborted",
				"error"
			],
			"type": "string"
		},
		"PromptError": {
			"type": "object",
			"properties": {
				"message": {
					"type": "string"
				},
				"retryable": {
					"type": "boolean",
					"description": "Transient: resubmitting later may succeed (omp's own retries are exhausted)."
				},
				"provider": {
					"type": "string"
				},
				"model": {
					"type": "string"
				},
				"httpStatus": {
					"type": "integer"
				},
				"code": {
					"const": "cost_cap",
					"description": "`cost_cap`: the session reached `session.maxCost` (`--max-cost`) and omp did not send the next request."
				}
			},
			"required": [
				"message",
				"retryable"
			],
			"description": "Failure detail of a `prompt_result` with `status: \"error\"`."
		},
		"PromptResultEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "prompt_result"
				},
				"agentInvoked": {
					"type": "boolean"
				},
				"status": {
					"$ref": "#/$defs/PromptStatus"
				},
				"sessionSettled": {
					"type": "boolean",
					"description": "Nothing will wake the session again; when false a `session_settled` follows once background work drains."
				},
				"id": {
					"type": "string"
				},
				"error": {
					"$ref": "#/$defs/PromptError"
				}
			},
			"required": [
				"type",
				"agentInvoked",
				"status",
				"sessionSettled"
			],
			"description": "Terminal outcome of one accepted `prompt` / `abort_and_prompt`, keyed by request `id`."
		},
		"SessionSettledEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "session_settled"
				}
			},
			"required": [
				"type"
			],
			"description": "The session went quiet: the last run yielded and no background work can wake it."
		},
		"ExtensionError": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_error"
				},
				"extensionPath": {
					"type": "string"
				},
				"event": {
					"type": "string"
				},
				"error": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"extensionPath",
				"event",
				"error"
			]
		},
		"AvailableCommandsUpdateEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "available_commands_update"
				},
				"commands": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/AvailableSlashCommand"
					}
				}
			},
			"required": [
				"type",
				"commands"
			],
			"description": "Slash-command catalog, pushed at startup and whenever command metadata changes."
		},
		"SubagentLifecycleStatus": {
			"enum": [
				"started",
				"completed",
				"failed",
				"aborted"
			],
			"type": "string"
		},
		"SubagentLifecyclePayload": {
			"type": "object",
			"properties": {
				"id": {
					"type": "string"
				},
				"agent": {
					"type": "string"
				},
				"agentSource": {
					"$ref": "#/$defs/AgentSource"
				},
				"status": {
					"$ref": "#/$defs/SubagentLifecycleStatus"
				},
				"index": {
					"type": "integer"
				},
				"description": {
					"type": "string"
				},
				"sessionFile": {
					"type": "string"
				},
				"parentToolCallId": {
					"type": "string"
				},
				"detached": {
					"type": "boolean",
					"description": "The subagent runs as a detached background job."
				}
			},
			"required": [
				"id",
				"agent",
				"agentSource",
				"status",
				"index"
			]
		},
		"SubagentProgressPayload": {
			"type": "object",
			"properties": {
				"index": {
					"type": "integer"
				},
				"agent": {
					"type": "string"
				},
				"agentSource": {
					"$ref": "#/$defs/AgentSource"
				},
				"task": {
					"type": "string"
				},
				"progress": {
					"type": "object",
					"properties": {},
					"additionalProperties": {},
					"description": "Raw `AgentProgress` record."
				},
				"parentToolCallId": {
					"type": "string"
				},
				"assignment": {
					"type": "string"
				},
				"sessionFile": {
					"type": "string"
				},
				"detached": {
					"type": "boolean"
				}
			},
			"required": [
				"index",
				"agent",
				"agentSource",
				"task",
				"progress"
			]
		},
		"SubagentEventPayload": {
			"type": "object",
			"properties": {
				"id": {
					"type": "string"
				},
				"event": {
					"$ref": "#/$defs/RpcAgentEvent",
					"x-unknown-fallback": true
				}
			},
			"required": [
				"id",
				"event"
			]
		},
		"SubagentLifecycleEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "subagent_lifecycle"
				},
				"payload": {
					"$ref": "#/$defs/SubagentLifecyclePayload"
				}
			},
			"required": [
				"type",
				"payload"
			],
			"description": "A subagent started or ended; sent at subscription level \"progress\" or \"events\"."
		},
		"SubagentProgressEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "subagent_progress"
				},
				"payload": {
					"$ref": "#/$defs/SubagentProgressPayload"
				}
			},
			"required": [
				"type",
				"payload"
			],
			"description": "Aggregated subagent progress; sent at subscription level \"progress\" or \"events\"."
		},
		"SubagentEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "subagent_event"
				},
				"payload": {
					"$ref": "#/$defs/SubagentEventPayload"
				}
			},
			"required": [
				"type",
				"payload"
			],
			"description": "A subagent's own session event; sent only at subscription level \"events\"."
		},
		"LivePhase": {
			"enum": [
				"connecting",
				"listening",
				"working",
				"speaking",
				"muted",
				"error"
			],
			"type": "string"
		},
		"LiveRole": {
			"enum": [
				"user",
				"assistant"
			],
			"type": "string"
		},
		"LivePhaseEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "live_phase"
				},
				"phase": {
					"$ref": "#/$defs/LivePhase"
				}
			},
			"required": [
				"type",
				"phase"
			]
		},
		"LiveLevelsEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "live_levels"
				},
				"input": {
					"type": "number"
				},
				"output": {
					"type": "number"
				}
			},
			"required": [
				"type",
				"input",
				"output"
			],
			"description": "Microphone (`input`) and speaker (`output`) RMS in [0, 1], at most every 100 ms."
		},
		"LiveTranscriptEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "live_transcript"
				},
				"role": {
					"$ref": "#/$defs/LiveRole"
				},
				"turn": {
					"type": "integer"
				},
				"text": {
					"type": "string"
				},
				"final": {
					"type": "boolean"
				}
			},
			"required": [
				"type",
				"role",
				"turn",
				"text",
				"final"
			],
			"description": "Accumulated text of one realtime turn; replaces earlier frames with the same `role` and `turn`."
		},
		"LiveEndEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "live_end"
				},
				"error": {
					"type": "string"
				}
			},
			"required": [
				"type"
			],
			"description": "Sent exactly once when a live session ends; `error` carries the failure cause."
		},
		"DictationStateEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "dictation_state"
				},
				"captureId": {
					"type": "string"
				},
				"state": {
					"enum": [
						"starting",
						"recording",
						"transcribing"
					],
					"type": "string"
				}
			},
			"required": [
				"type",
				"captureId",
				"state"
			],
			"description": "State of one draft-only microphone capture."
		},
		"DictationTranscriptEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "dictation_transcript"
				},
				"captureId": {
					"type": "string"
				},
				"text": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"captureId",
				"text"
			],
			"description": "Full accumulated draft preview; replaces the previous preview for this capture."
		},
		"DictationEndEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "dictation_end"
				},
				"captureId": {
					"type": "string"
				},
				"text": {
					"type": "string"
				},
				"error": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"captureId",
				"text"
			],
			"description": "Exactly one terminal frame per capture; text is the accumulated result."
		},
		"BtwDeltaEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "btw_delta"
				},
				"recordId": {
					"type": "string"
				},
				"delta": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"recordId",
				"delta"
			],
			"description": "Text appended to the running side question's latest answer."
		},
		"BtwRecordEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "btw_record"
				},
				"record": {
					"$ref": "#/$defs/BtwHistoryRecord"
				}
			},
			"required": [
				"type",
				"record"
			],
			"description": "Full side-question record on every lifecycle change (started, complete, cancelled, error); the last one per id wins."
		},
		"CommandOutputEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "command_output"
				},
				"text": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"text"
			],
			"description": "Output of a builtin slash command."
		},
		"SessionInfoUpdateEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "session_info_update"
				},
				"sessionId": {
					"type": "string"
				},
				"title": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"sessionId"
			],
			"description": "A builtin slash command changed the session title."
		},
		"ConfigUpdateEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "config_update"
				},
				"model": {
					"$ref": "#/$defs/ModelInfo"
				},
				"thinkingLevel": {
					"$ref": "#/$defs/ThinkingLevel"
				}
			},
			"required": [
				"type"
			],
			"description": "A builtin slash command changed the model configuration."
		},
		"RpcFrameErrorEvent": {
			"type": "object",
			"properties": {
				"type": {
					"const": "rpc_frame_error"
				},
				"error": {
					"type": "string"
				},
				"originalType": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"error"
			],
			"description": "An event could not fit within the transport limits and was dropped."
		},
		"WidgetPlacement": {
			"enum": [
				"aboveEditor",
				"belowEditor"
			],
			"type": "string"
		},
		"SelectOptionDetail": {
			"type": "object",
			"properties": {
				"description": {
					"type": "string"
				}
			},
			"description": "Presentation metadata aligned positionally with `options`.",
			"x-open": true
		},
		"AskOption": {
			"type": "object",
			"properties": {
				"label": {
					"type": "string"
				},
				"description": {
					"type": "string"
				},
				"preview": {
					"type": "string"
				}
			},
			"required": [
				"label"
			]
		},
		"AskQuestion": {
			"type": "object",
			"properties": {
				"id": {
					"type": "string"
				},
				"question": {
					"type": "string"
				},
				"options": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/AskOption"
					}
				},
				"header": {
					"type": "string"
				},
				"multi": {
					"type": "boolean",
					"default": false
				},
				"recommended": {
					"type": "integer",
					"description": "Index into `options` of the recommended choice."
				}
			},
			"required": [
				"id",
				"question",
				"options"
			],
			"description": "One question of an `ask` request; hosts always offer free text besides `options`."
		},
		"SelectUiRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_request"
				},
				"id": {
					"type": "string"
				},
				"method": {
					"const": "select"
				},
				"title": {
					"type": "string"
				},
				"options": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"optionDetails": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/SelectOptionDetail"
					}
				},
				"timeout": {
					"type": "integer"
				}
			},
			"required": [
				"type",
				"id",
				"method",
				"title",
				"options"
			]
		},
		"ConfirmUiRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_request"
				},
				"id": {
					"type": "string"
				},
				"method": {
					"const": "confirm"
				},
				"title": {
					"type": "string"
				},
				"message": {
					"type": "string"
				},
				"timeout": {
					"type": "integer"
				}
			},
			"required": [
				"type",
				"id",
				"method",
				"title",
				"message"
			]
		},
		"InputUiRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_request"
				},
				"id": {
					"type": "string"
				},
				"method": {
					"const": "input"
				},
				"title": {
					"type": "string"
				},
				"placeholder": {
					"type": "string"
				},
				"timeout": {
					"type": "integer"
				},
				"secret": {
					"type": "boolean"
				}
			},
			"required": [
				"type",
				"id",
				"method",
				"title"
			]
		},
		"EditorUiRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_request"
				},
				"id": {
					"type": "string"
				},
				"method": {
					"const": "editor"
				},
				"title": {
					"type": "string"
				},
				"prefill": {
					"type": "string"
				},
				"promptStyle": {
					"type": "boolean"
				}
			},
			"required": [
				"type",
				"id",
				"method",
				"title"
			]
		},
		"AskUiRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_request"
				},
				"id": {
					"type": "string"
				},
				"method": {
					"const": "ask"
				},
				"questions": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/AskQuestion"
					}
				},
				"timeout": {
					"type": "integer"
				}
			},
			"required": [
				"type",
				"id",
				"method",
				"questions"
			],
			"description": "Every question of one `ask` tool call; sent only after `set_ask_dialog` enables it."
		},
		"CancelUiRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_request"
				},
				"id": {
					"type": "string"
				},
				"method": {
					"const": "cancel"
				},
				"targetId": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"id",
				"method",
				"targetId"
			],
			"description": "Close the dialog opened by request `targetId`; a later answer to it is ignored."
		},
		"NotifyUiRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_request"
				},
				"id": {
					"type": "string"
				},
				"method": {
					"const": "notify"
				},
				"message": {
					"type": "string"
				},
				"notifyType": {
					"$ref": "#/$defs/NotifyType"
				}
			},
			"required": [
				"type",
				"id",
				"method",
				"message"
			]
		},
		"SetStatusUiRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_request"
				},
				"id": {
					"type": "string"
				},
				"method": {
					"const": "setStatus"
				},
				"statusKey": {
					"type": "string"
				},
				"statusText": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"id",
				"method",
				"statusKey"
			]
		},
		"SetWidgetUiRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_request"
				},
				"id": {
					"type": "string"
				},
				"method": {
					"const": "setWidget"
				},
				"widgetKey": {
					"type": "string"
				},
				"widgetLines": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"widgetPlacement": {
					"$ref": "#/$defs/WidgetPlacement"
				}
			},
			"required": [
				"type",
				"id",
				"method",
				"widgetKey"
			]
		},
		"SetTitleUiRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_request"
				},
				"id": {
					"type": "string"
				},
				"method": {
					"const": "setTitle"
				},
				"title": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"id",
				"method",
				"title"
			]
		},
		"SetEditorTextUiRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_request"
				},
				"id": {
					"type": "string"
				},
				"method": {
					"const": "set_editor_text"
				},
				"text": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"id",
				"method",
				"text"
			]
		},
		"OpenUrlUiRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_request"
				},
				"id": {
					"type": "string"
				},
				"method": {
					"const": "open_url"
				},
				"url": {
					"type": "string"
				},
				"launchUrl": {
					"type": "string",
					"description": "Short loopback redirect to `url`; the truncation-safe copy target."
				},
				"instructions": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"id",
				"method",
				"url"
			]
		},
		"ExtensionUiRequest": {
			"anyOf": [
				{
					"$ref": "#/$defs/SelectUiRequest"
				},
				{
					"$ref": "#/$defs/ConfirmUiRequest"
				},
				{
					"$ref": "#/$defs/InputUiRequest"
				},
				{
					"$ref": "#/$defs/EditorUiRequest"
				},
				{
					"$ref": "#/$defs/AskUiRequest"
				},
				{
					"$ref": "#/$defs/CancelUiRequest"
				},
				{
					"$ref": "#/$defs/NotifyUiRequest"
				},
				{
					"$ref": "#/$defs/SetStatusUiRequest"
				},
				{
					"$ref": "#/$defs/SetWidgetUiRequest"
				},
				{
					"$ref": "#/$defs/SetTitleUiRequest"
				},
				{
					"$ref": "#/$defs/SetEditorTextUiRequest"
				},
				{
					"$ref": "#/$defs/OpenUrlUiRequest"
				}
			],
			"description": "Extension UI request, discriminated by `method`."
		},
		"AskAnswer": {
			"type": "object",
			"properties": {
				"id": {
					"type": "string"
				},
				"selectedOptions": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"customInput": {
					"type": "string"
				}
			},
			"required": [
				"id",
				"selectedOptions"
			],
			"description": "Answer to one `ask` question: exact option labels, plus optional free text."
		},
		"ValueUiResponse": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_response"
				},
				"id": {
					"type": "string"
				},
				"value": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"id",
				"value"
			],
			"description": "Answers a `select`, `input`, or `editor` request."
		},
		"ConfirmUiResponse": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_response"
				},
				"id": {
					"type": "string"
				},
				"confirmed": {
					"type": "boolean"
				}
			},
			"required": [
				"type",
				"id",
				"confirmed"
			],
			"description": "Answers a `confirm` request."
		},
		"CancelUiResponse": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_response"
				},
				"id": {
					"type": "string"
				},
				"cancelled": {
					"const": true
				},
				"timedOut": {
					"type": "boolean"
				}
			},
			"required": [
				"type",
				"id",
				"cancelled"
			],
			"description": "Dismisses a dialog; `timedOut` reports the host's own deadline (an `ask` then takes its recommended answers)."
		},
		"AnswersUiResponse": {
			"type": "object",
			"properties": {
				"type": {
					"const": "extension_ui_response"
				},
				"id": {
					"type": "string"
				},
				"answers": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/AskAnswer"
					}
				}
			},
			"required": [
				"type",
				"id",
				"answers"
			],
			"description": "Answers an `ask` request: one `AskAnswer` per question, in question order."
		},
		"ExtensionUiResponse": {
			"anyOf": [
				{
					"$ref": "#/$defs/ValueUiResponse"
				},
				{
					"$ref": "#/$defs/ConfirmUiResponse"
				},
				{
					"$ref": "#/$defs/CancelUiResponse"
				},
				{
					"$ref": "#/$defs/AnswersUiResponse"
				}
			],
			"description": "Host reply to an extension UI request; variants share `type` and differ by their payload key."
		},
		"HostToolCallRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "host_tool_call"
				},
				"id": {
					"type": "string"
				},
				"toolCallId": {
					"type": "string"
				},
				"toolName": {
					"type": "string"
				},
				"arguments": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				}
			},
			"required": [
				"type",
				"id",
				"toolCallId",
				"toolName",
				"arguments"
			]
		},
		"HostToolCancelRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "host_tool_cancel"
				},
				"id": {
					"type": "string"
				},
				"targetId": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"id",
				"targetId"
			]
		},
		"HostToolResultPayload": {
			"type": "object",
			"properties": {
				"content": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/UserContent"
					}
				},
				"details": {},
				"isError": {
					"type": "boolean"
				},
				"useless": {
					"type": "boolean"
				},
				"providerMetadata": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				}
			},
			"required": [
				"content"
			],
			"description": "Tool output: content blocks plus optional details."
		},
		"HostToolUpdate": {
			"type": "object",
			"properties": {
				"type": {
					"const": "host_tool_update"
				},
				"id": {
					"type": "string"
				},
				"partialResult": {
					"$ref": "#/$defs/HostToolResultPayload"
				}
			},
			"required": [
				"type",
				"id",
				"partialResult"
			],
			"description": "Streams partial output of a pending host tool call."
		},
		"HostToolResult": {
			"type": "object",
			"properties": {
				"type": {
					"const": "host_tool_result"
				},
				"id": {
					"type": "string"
				},
				"result": {
					"$ref": "#/$defs/HostToolResultPayload"
				},
				"isError": {
					"type": "boolean"
				}
			},
			"required": [
				"type",
				"id",
				"result"
			],
			"description": "Completes a pending host tool call; `isError` surfaces the content as a tool error."
		},
		"HostUriOperation": {
			"enum": [
				"read",
				"write"
			],
			"type": "string"
		},
		"HostUriRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "host_uri_request"
				},
				"id": {
					"type": "string"
				},
				"operation": {
					"$ref": "#/$defs/HostUriOperation"
				},
				"url": {
					"type": "string"
				},
				"content": {
					"type": "string",
					"description": "Present for write operations."
				}
			},
			"required": [
				"type",
				"id",
				"operation",
				"url"
			]
		},
		"HostUriCancelRequest": {
			"type": "object",
			"properties": {
				"type": {
					"const": "host_uri_cancel"
				},
				"id": {
					"type": "string"
				},
				"targetId": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"id",
				"targetId"
			]
		},
		"HostUriResult": {
			"type": "object",
			"properties": {
				"type": {
					"const": "host_uri_result"
				},
				"id": {
					"type": "string"
				},
				"content": {
					"type": "string",
					"description": "Required for a successful read."
				},
				"contentType": {
					"enum": [
						"text/markdown",
						"application/json",
						"text/plain"
					],
					"type": "string"
				},
				"notes": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"immutable": {
					"type": "boolean"
				},
				"isError": {
					"type": "boolean"
				},
				"error": {
					"type": "string"
				}
			},
			"required": [
				"type",
				"id"
			],
			"description": "Completes a pending host URI request."
		},
		"RpcHostRequest": {
			"anyOf": [
				{
					"$ref": "#/$defs/HostToolCallRequest"
				},
				{
					"$ref": "#/$defs/HostToolCancelRequest"
				},
				{
					"$ref": "#/$defs/HostUriRequest"
				},
				{
					"$ref": "#/$defs/HostUriCancelRequest"
				}
			],
			"description": "Server request for host-owned tools and URI schemes, discriminated by `type`."
		},
		"RpcInbound": {
			"anyOf": [
				{
					"$ref": "#/$defs/ExtensionUiResponse"
				},
				{
					"$ref": "#/$defs/HostToolUpdate"
				},
				{
					"$ref": "#/$defs/HostToolResult"
				},
				{
					"$ref": "#/$defs/HostUriResult"
				}
			],
			"description": "Non-command frame the host sends, discriminated by `type`."
		},
		"RpcResponse": {
			"type": "object",
			"properties": {
				"type": {
					"const": "response"
				},
				"command": {
					"type": "string"
				},
				"success": {
					"type": "boolean"
				},
				"id": {
					"type": "string",
					"description": "The command's `id`; absent for failures the server could not correlate."
				},
				"data": {
					"description": "Command result on success; its shape is the command's `result`."
				},
				"error": {
					"type": "string",
					"description": "Failure message when `success` is false."
				},
				"code": {
					"type": "string",
					"description": "Machine-readable failure reason, when one applies."
				}
			},
			"required": [
				"type",
				"command",
				"success"
			],
			"description": "Response to a command, correlated by `id`."
		},
		"ToolLoadMode": {
			"enum": [
				"essential",
				"discoverable"
			],
			"type": "string"
		},
		"HostToolDefinition": {
			"type": "object",
			"properties": {
				"name": {
					"type": "string"
				},
				"description": {
					"type": "string"
				},
				"parameters": {
					"type": "object",
					"properties": {},
					"additionalProperties": {}
				},
				"label": {
					"type": "string"
				},
				"hidden": {
					"type": "boolean"
				},
				"loadMode": {
					"$ref": "#/$defs/ToolLoadMode"
				},
				"readsSkillUris": {
					"type": "boolean"
				}
			},
			"required": [
				"name",
				"description",
				"parameters"
			]
		},
		"HostUriSchemeDefinition": {
			"type": "object",
			"properties": {
				"scheme": {
					"type": "string"
				},
				"description": {
					"type": "string"
				},
				"writable": {
					"type": "boolean"
				},
				"immutable": {
					"type": "boolean"
				}
			},
			"required": [
				"scheme"
			]
		},
		"RpcNotification": {
			"anyOf": [
				{
					"$ref": "#/$defs/ReadyEvent"
				},
				{
					"$ref": "#/$defs/PromptResultEvent"
				},
				{
					"$ref": "#/$defs/SessionSettledEvent"
				},
				{
					"$ref": "#/$defs/ExtensionError"
				},
				{
					"$ref": "#/$defs/ExtensionUiRequest"
				},
				{
					"$ref": "#/$defs/AvailableCommandsUpdateEvent"
				},
				{
					"$ref": "#/$defs/SubagentLifecycleEvent"
				},
				{
					"$ref": "#/$defs/SubagentProgressEvent"
				},
				{
					"$ref": "#/$defs/SubagentEvent"
				},
				{
					"$ref": "#/$defs/LivePhaseEvent"
				},
				{
					"$ref": "#/$defs/LiveLevelsEvent"
				},
				{
					"$ref": "#/$defs/LiveTranscriptEvent"
				},
				{
					"$ref": "#/$defs/LiveEndEvent"
				},
				{
					"$ref": "#/$defs/DictationStateEvent"
				},
				{
					"$ref": "#/$defs/DictationTranscriptEvent"
				},
				{
					"$ref": "#/$defs/DictationEndEvent"
				},
				{
					"$ref": "#/$defs/BtwDeltaEvent"
				},
				{
					"$ref": "#/$defs/BtwRecordEvent"
				},
				{
					"$ref": "#/$defs/CommandOutputEvent"
				},
				{
					"$ref": "#/$defs/SessionInfoUpdateEvent"
				},
				{
					"$ref": "#/$defs/ConfigUpdateEvent"
				},
				{
					"$ref": "#/$defs/RpcFrameErrorEvent"
				},
				{
					"$ref": "#/$defs/RpcAgentEvent"
				}
			],
			"description": "Unsolicited outbound frame (everything except responses and host tool/URI requests), discriminated by `type`."
		},
		"RpcServerFrame": {
			"anyOf": [
				{
					"$ref": "#/$defs/RpcResponse"
				},
				{
					"$ref": "#/$defs/RpcHostRequest"
				},
				{
					"$ref": "#/$defs/RpcNotification"
				}
			],
			"description": "Any frame the server writes to stdout (after reassembling `rpc_chunk` sequences), discriminated by `type`."
		},
		"NegotiateProtocolParams": {
			"type": "object",
			"properties": {
				"protocolVersion": {
					"type": "integer"
				}
			},
			"required": [
				"protocolVersion"
			]
		},
		"NegotiateProtocolResult": {
			"type": "object",
			"properties": {
				"protocolVersion": {
					"type": "integer"
				}
			},
			"required": [
				"protocolVersion"
			]
		},
		"PromptParams": {
			"type": "object",
			"properties": {
				"message": {
					"type": "string"
				},
				"images": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ImageContent"
					},
					"description": "Images attached to the message."
				},
				"streamingBehavior": {
					"$ref": "#/$defs/StreamingBehavior"
				}
			},
			"required": [
				"message"
			]
		},
		"SteerParams": {
			"type": "object",
			"properties": {
				"message": {
					"type": "string"
				},
				"images": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ImageContent"
					},
					"description": "Images attached to the message."
				}
			},
			"required": [
				"message"
			]
		},
		"FollowUpParams": {
			"type": "object",
			"properties": {
				"message": {
					"type": "string"
				},
				"images": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ImageContent"
					},
					"description": "Images attached to the message."
				}
			},
			"required": [
				"message"
			]
		},
		"RemoveQueuedMessageParams": {
			"type": "object",
			"properties": {
				"message": {
					"type": "string"
				},
				"queue": {
					"$ref": "#/$defs/QueuedMessageQueue"
				}
			},
			"required": [
				"message",
				"queue"
			]
		},
		"PromoteQueuedMessageParams": {
			"type": "object",
			"properties": {
				"message": {
					"type": "string"
				}
			},
			"required": [
				"message"
			]
		},
		"AbortAndPromptParams": {
			"type": "object",
			"properties": {
				"message": {
					"type": "string"
				},
				"images": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ImageContent"
					},
					"description": "Images attached to the message."
				}
			},
			"required": [
				"message"
			]
		},
		"NewSessionParams": {
			"type": "object",
			"properties": {
				"parentSession": {
					"type": "string"
				}
			}
		},
		"OpenSessionParams": {
			"type": "object",
			"properties": {
				"sessionDir": {
					"type": "string"
				},
				"provider": {
					"type": "string"
				},
				"modelId": {
					"type": "string"
				}
			},
			"required": [
				"sessionDir"
			]
		},
		"SetFastModeParams": {
			"type": "object",
			"properties": {
				"enabled": {
					"type": "boolean"
				}
			},
			"required": [
				"enabled"
			]
		},
		"SetSlowModeParams": {
			"type": "object",
			"properties": {
				"enabled": {
					"type": "boolean"
				}
			},
			"required": [
				"enabled"
			]
		},
		"SetSlowModeResult": {
			"type": "object",
			"properties": {
				"enabled": {
					"type": "boolean"
				}
			},
			"required": [
				"enabled"
			]
		},
		"GoalParams": {
			"type": "object",
			"properties": {
				"op": {
					"$ref": "#/$defs/GoalOp"
				},
				"objective": {
					"type": "string"
				},
				"token_budget": {
					"type": "integer"
				}
			},
			"required": [
				"op"
			]
		},
		"SetAskDialogParams": {
			"type": "object",
			"properties": {
				"enabled": {
					"type": "boolean"
				}
			},
			"required": [
				"enabled"
			]
		},
		"SetAskDialogResult": {
			"type": "object",
			"properties": {
				"enabled": {
					"type": "boolean"
				}
			},
			"required": [
				"enabled"
			]
		},
		"GetAvailableCommandsResult": {
			"type": "object",
			"properties": {
				"commands": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/AvailableSlashCommand"
					}
				}
			},
			"required": [
				"commands"
			]
		},
		"GetEntriesParams": {
			"type": "object",
			"properties": {
				"since": {
					"type": "string"
				}
			}
		},
		"SetTodosParams": {
			"type": "object",
			"properties": {
				"phases": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/TodoPhase"
					}
				}
			},
			"required": [
				"phases"
			]
		},
		"SetTodosResult": {
			"type": "object",
			"properties": {
				"todoPhases": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/TodoPhase"
					}
				}
			},
			"required": [
				"todoPhases"
			]
		},
		"SetHostToolsParams": {
			"type": "object",
			"properties": {
				"tools": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/HostToolDefinition"
					}
				}
			},
			"required": [
				"tools"
			]
		},
		"SetHostToolsResult": {
			"type": "object",
			"properties": {
				"toolNames": {
					"type": "array",
					"items": {
						"type": "string"
					}
				}
			},
			"required": [
				"toolNames"
			]
		},
		"SetHostUriSchemesParams": {
			"type": "object",
			"properties": {
				"schemes": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/HostUriSchemeDefinition"
					}
				}
			},
			"required": [
				"schemes"
			]
		},
		"SetHostUriSchemesResult": {
			"type": "object",
			"properties": {
				"schemes": {
					"type": "array",
					"items": {
						"type": "string"
					}
				}
			},
			"required": [
				"schemes"
			]
		},
		"SetSubagentSubscriptionParams": {
			"type": "object",
			"properties": {
				"level": {
					"$ref": "#/$defs/SubagentSubscriptionLevel"
				}
			},
			"required": [
				"level"
			]
		},
		"SetSubagentSubscriptionResult": {
			"type": "object",
			"properties": {
				"level": {
					"$ref": "#/$defs/SubagentSubscriptionLevel"
				}
			},
			"required": [
				"level"
			]
		},
		"SetEventFilterParams": {
			"type": "object",
			"properties": {
				"events": {
					"anyOf": [
						{
							"type": "array",
							"items": {
								"type": "string"
							}
						},
						{
							"type": "null"
						}
					]
				},
				"messageUpdates": {
					"$ref": "#/$defs/MessageUpdates"
				}
			},
			"required": [
				"events"
			]
		},
		"SetEventFilterResult": {
			"type": "object",
			"properties": {
				"events": {
					"anyOf": [
						{
							"type": "array",
							"items": {
								"type": "string"
							}
						},
						{
							"type": "null"
						}
					]
				},
				"messageUpdates": {
					"$ref": "#/$defs/MessageUpdates"
				}
			},
			"required": [
				"events"
			]
		},
		"GetSubagentsResult": {
			"type": "object",
			"properties": {
				"subagents": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/SubagentSnapshot"
					}
				}
			},
			"required": [
				"subagents"
			]
		},
		"GetSubagentMessagesParams": {
			"type": "object",
			"properties": {
				"subagentId": {
					"type": "string"
				},
				"sessionFile": {
					"type": "string"
				},
				"fromByte": {
					"type": "integer"
				}
			}
		},
		"CancelSubagentParams": {
			"type": "object",
			"properties": {
				"subagentId": {
					"type": "string"
				}
			},
			"required": [
				"subagentId"
			]
		},
		"CancelSubagentResult": {
			"type": "object",
			"properties": {
				"cancelled": {
					"type": "boolean"
				}
			},
			"required": [
				"cancelled"
			]
		},
		"SteerSubagentParams": {
			"type": "object",
			"properties": {
				"subagentId": {
					"type": "string"
				},
				"message": {
					"type": "string"
				}
			},
			"required": [
				"subagentId",
				"message"
			]
		},
		"LiveStartParams": {
			"type": "object",
			"properties": {
				"voice": {
					"type": "string"
				},
				"instructions": {
					"type": "string"
				}
			}
		},
		"LiveStartResult": {
			"type": "object",
			"properties": {
				"voice": {
					"type": "string"
				}
			},
			"required": [
				"voice"
			]
		},
		"LiveConnectParams": {
			"type": "object",
			"properties": {
				"sdpOffer": {
					"type": "string"
				},
				"voice": {
					"type": "string"
				},
				"instructions": {
					"type": "string"
				}
			},
			"required": [
				"sdpOffer"
			]
		},
		"LiveConnectResult": {
			"type": "object",
			"properties": {
				"voice": {
					"type": "string"
				},
				"sdpAnswer": {
					"type": "string"
				}
			},
			"required": [
				"voice",
				"sdpAnswer"
			]
		},
		"LiveMuteParams": {
			"type": "object",
			"properties": {
				"muted": {
					"type": "boolean"
				}
			}
		},
		"LiveMuteResult": {
			"type": "object",
			"properties": {
				"muted": {
					"type": "boolean"
				}
			},
			"required": [
				"muted"
			]
		},
		"DictationStartParams": {
			"type": "object",
			"properties": {
				"captureId": {
					"type": "string"
				}
			},
			"required": [
				"captureId"
			]
		},
		"DictationStopResult": {
			"type": "object",
			"properties": {
				"text": {
					"type": "string"
				}
			},
			"required": [
				"text"
			]
		},
		"SetModelParams": {
			"type": "object",
			"properties": {
				"provider": {
					"type": "string"
				},
				"modelId": {
					"type": "string"
				}
			},
			"required": [
				"provider",
				"modelId"
			]
		},
		"GetAvailableModelsResult": {
			"type": "object",
			"properties": {
				"models": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ModelInfo"
					}
				}
			},
			"required": [
				"models"
			]
		},
		"SetThinkingLevelParams": {
			"type": "object",
			"properties": {
				"level": {
					"$ref": "#/$defs/ThinkingLevel"
				}
			},
			"required": [
				"level"
			]
		},
		"GetAvailableThinkingLevelsResult": {
			"type": "object",
			"properties": {
				"levels": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ThinkingLevel"
					}
				}
			},
			"required": [
				"levels"
			]
		},
		"SetSteeringModeParams": {
			"type": "object",
			"properties": {
				"mode": {
					"$ref": "#/$defs/QueueMode"
				}
			},
			"required": [
				"mode"
			]
		},
		"SetFollowUpModeParams": {
			"type": "object",
			"properties": {
				"mode": {
					"$ref": "#/$defs/QueueMode"
				}
			},
			"required": [
				"mode"
			]
		},
		"SetInterruptModeParams": {
			"type": "object",
			"properties": {
				"mode": {
					"$ref": "#/$defs/InterruptMode"
				}
			},
			"required": [
				"mode"
			]
		},
		"CompactParams": {
			"type": "object",
			"properties": {
				"customInstructions": {
					"type": "string"
				}
			}
		},
		"SetAutoCompactionParams": {
			"type": "object",
			"properties": {
				"enabled": {
					"type": "boolean"
				}
			},
			"required": [
				"enabled"
			]
		},
		"SetCacheWarmingParams": {
			"type": "object",
			"properties": {
				"mode": {
					"$ref": "#/$defs/CacheWarmingMode"
				}
			},
			"required": [
				"mode"
			]
		},
		"SetCacheWarmingResult": {
			"type": "object",
			"properties": {
				"mode": {
					"$ref": "#/$defs/CacheWarmingMode"
				}
			},
			"required": [
				"mode"
			]
		},
		"SetAutoRetryParams": {
			"type": "object",
			"properties": {
				"enabled": {
					"type": "boolean"
				}
			},
			"required": [
				"enabled"
			]
		},
		"BashParams": {
			"type": "object",
			"properties": {
				"command": {
					"type": "string"
				},
				"excludeFromContext": {
					"type": "boolean"
				}
			},
			"required": [
				"command"
			]
		},
		"GetSessionLeaseParams": {
			"type": "object",
			"properties": {
				"sessionIds": {
					"type": "array",
					"items": {
						"type": "string"
					}
				}
			},
			"required": [
				"sessionIds"
			]
		},
		"GetSessionLeaseResult": {
			"type": "object",
			"properties": {
				"held": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"unknown": {
					"type": "array",
					"items": {
						"type": "string"
					}
				}
			},
			"required": [
				"held",
				"unknown"
			]
		},
		"ExportHtmlParams": {
			"type": "object",
			"properties": {
				"outputPath": {
					"type": "string"
				}
			}
		},
		"ExportHtmlResult": {
			"type": "object",
			"properties": {
				"path": {
					"type": "string"
				}
			},
			"required": [
				"path"
			]
		},
		"SwitchSessionParams": {
			"type": "object",
			"properties": {
				"sessionPath": {
					"type": "string"
				},
				"provider": {
					"type": "string"
				},
				"modelId": {
					"type": "string"
				}
			},
			"required": [
				"sessionPath"
			]
		},
		"BranchParams": {
			"type": "object",
			"properties": {
				"entryId": {
					"type": "string"
				}
			},
			"required": [
				"entryId"
			]
		},
		"ForkParams": {
			"type": "object",
			"properties": {
				"entryId": {
					"type": "string"
				}
			}
		},
		"NavigateTreeParams": {
			"type": "object",
			"properties": {
				"entryId": {
					"type": "string"
				},
				"summarize": {
					"type": "boolean",
					"description": "Summarize the abandoned branch at the target."
				},
				"customInstructions": {
					"type": "string",
					"description": "Instructions for the summarizer."
				}
			},
			"required": [
				"entryId"
			]
		},
		"SetLabelParams": {
			"type": "object",
			"properties": {
				"entryId": {
					"type": "string"
				},
				"label": {
					"type": "string"
				}
			},
			"required": [
				"entryId"
			]
		},
		"GetBranchMessagesResult": {
			"type": "object",
			"properties": {
				"messages": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/BranchMessage"
					}
				}
			},
			"required": [
				"messages"
			]
		},
		"GetLastAssistantTextResult": {
			"type": "object",
			"properties": {
				"text": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "null"
						}
					]
				}
			},
			"required": [
				"text"
			]
		},
		"SetSessionNameParams": {
			"type": "object",
			"properties": {
				"name": {
					"type": "string"
				}
			},
			"required": [
				"name"
			]
		},
		"HandoffParams": {
			"type": "object",
			"properties": {
				"customInstructions": {
					"type": "string"
				}
			}
		},
		"GetMessagesResult": {
			"type": "object",
			"properties": {
				"messages": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/AgentMessage"
					}
				}
			},
			"required": [
				"messages"
			]
		},
		"GetMessagesPageParams": {
			"type": "object",
			"properties": {
				"cursor": {
					"type": "string"
				},
				"limit": {
					"type": "integer"
				}
			}
		},
		"GetLoginProvidersResult": {
			"type": "object",
			"properties": {
				"providers": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/LoginProvider"
					}
				}
			},
			"required": [
				"providers"
			]
		},
		"LoginParams": {
			"type": "object",
			"properties": {
				"providerId": {
					"type": "string"
				}
			},
			"required": [
				"providerId"
			]
		},
		"LoginResult": {
			"type": "object",
			"properties": {
				"providerId": {
					"type": "string"
				}
			},
			"required": [
				"providerId"
			]
		},
		"GetLogoutAccountsParams": {
			"type": "object",
			"properties": {
				"providerId": {
					"type": "string"
				}
			},
			"required": [
				"providerId"
			]
		},
		"GetLogoutAccountsResult": {
			"type": "object",
			"properties": {
				"accounts": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/LogoutAccount"
					}
				}
			},
			"required": [
				"accounts"
			]
		},
		"LogoutParams": {
			"type": "object",
			"properties": {
				"providerId": {
					"type": "string"
				},
				"credentialId": {
					"type": "integer"
				}
			},
			"required": [
				"providerId",
				"credentialId"
			]
		},
		"LogoutResult": {
			"type": "object",
			"properties": {
				"remainingSource": {
					"type": "string"
				}
			}
		},
		"PredictWordParams": {
			"type": "object",
			"properties": {
				"text": {
					"type": "string"
				},
				"cursor": {
					"type": "integer"
				}
			},
			"required": [
				"text",
				"cursor"
			]
		},
		"PredictWordResult": {
			"type": "object",
			"properties": {
				"suffix": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "null"
						}
					]
				}
			},
			"required": [
				"suffix"
			]
		},
		"PredictWordFeedbackParams": {
			"type": "object",
			"properties": {
				"text": {
					"type": "string"
				},
				"cursor": {
					"type": "integer"
				},
				"suggestion": {
					"type": "string"
				},
				"accepted": {
					"type": "boolean"
				}
			},
			"required": [
				"text",
				"cursor",
				"suggestion",
				"accepted"
			]
		},
		"BtwParams": {
			"type": "object",
			"properties": {
				"question": {
					"type": "string"
				},
				"recordId": {
					"type": "string"
				}
			},
			"required": [
				"question"
			]
		},
		"BtwResult": {
			"type": "object",
			"properties": {
				"record": {
					"$ref": "#/$defs/BtwHistoryRecord"
				}
			},
			"required": [
				"record"
			]
		},
		"BtwCancelParams": {
			"type": "object",
			"properties": {
				"recordId": {
					"type": "string"
				}
			}
		},
		"BtwCancelResult": {
			"type": "object",
			"properties": {
				"cancelled": {
					"type": "boolean"
				}
			},
			"required": [
				"cancelled"
			]
		},
		"GetBtwHistoryResult": {
			"type": "object",
			"properties": {
				"records": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/BtwHistoryRecord"
					}
				}
			},
			"required": [
				"records"
			]
		}
	}
}
