{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "ItemStartedNotification", "type": "object", "required": [ "item", "startedAtMs", "threadId", "turnId" ], "properties": { "item": { "$ref": "#/definitions/ThreadItem" }, "startedAtMs": { "description": "Unix timestamp (in milliseconds) when this item lifecycle started.", "type": "integer", "format": "int64" }, "threadId": { "type": "string" }, "turnId": { "type": "string" } }, "definitions": { "AbsolutePathBuf": { "description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", "type": "string" }, "ByteRange": { "type": "object", "required": [ "end", "start" ], "properties": { "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "CollabAgentState": { "type": "object", "required": [ "status" ], "properties": { "message": { "type": [ "string", "null" ] }, "status": { "$ref": "#/definitions/CollabAgentStatus" } } }, "CollabAgentStatus": { "type": "string", "enum": [ "pendingInit", "running", "interrupted", "completed", "errored", "shutdown", "notFound" ] }, "CollabAgentTool": { "type": "string", "enum": [ "spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent" ] }, "CollabAgentToolCallStatus": { "type": "string", "enum": [ "inProgress", "completed", "failed" ] }, "CommandAction": { "oneOf": [ { "type": "object", "required": [ "command", "name", "path", "type" ], "properties": { "command": { "type": "string" }, "name": { "type": "string" }, "path": { "$ref": "#/definitions/AbsolutePathBuf" }, "type": { "type": "string", "enum": [ "read" ], "title": "ReadCommandActionType" } }, "title": "ReadCommandAction" }, { "type": "object", "required": [ "command", "type" ], "properties": { "command": { "type": "string" }, "path": { "type": [ "string", "null" ] }, "type": { "type": "string", "enum": [ "listFiles" ], "title": "ListFilesCommandActionType" } }, "title": "ListFilesCommandAction" }, { "type": "object", "required": [ "command", "type" ], "properties": { "command": { "type": "string" }, "path": { "type": [ "string", "null" ] }, "query": { "type": [ "string", "null" ] }, "type": { "type": "string", "enum": [ "search" ], "title": "SearchCommandActionType" } }, "title": "SearchCommandAction" }, { "type": "object", "required": [ "command", "type" ], "properties": { "command": { "type": "string" }, "type": { "type": "string", "enum": [ "unknown" ], "title": "UnknownCommandActionType" } }, "title": "UnknownCommandAction" } ] }, "CommandExecutionSource": { "type": "string", "enum": [ "agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction" ] }, "CommandExecutionStatus": { "type": "string", "enum": [ "inProgress", "completed", "failed", "declined" ] }, "DynamicToolCallOutputContentItem": { "oneOf": [ { "type": "object", "required": [ "text", "type" ], "properties": { "text": { "type": "string" }, "type": { "type": "string", "enum": [ "inputText" ], "title": "InputTextDynamicToolCallOutputContentItemType" } }, "title": "InputTextDynamicToolCallOutputContentItem" }, { "type": "object", "required": [ "imageUrl", "type" ], "properties": { "imageUrl": { "type": "string" }, "type": { "type": "string", "enum": [ "inputImage" ], "title": "InputImageDynamicToolCallOutputContentItemType" } }, "title": "InputImageDynamicToolCallOutputContentItem" } ] }, "DynamicToolCallStatus": { "type": "string", "enum": [ "inProgress", "completed", "failed" ] }, "FileUpdateChange": { "type": "object", "required": [ "diff", "kind", "path" ], "properties": { "diff": { "type": "string" }, "kind": { "$ref": "#/definitions/PatchChangeKind" }, "path": { "type": "string" } } }, "HookPromptFragment": { "type": "object", "required": [ "hookRunId", "text" ], "properties": { "hookRunId": { "type": "string" }, "text": { "type": "string" } } }, "ImageDetail": { "type": "string", "enum": [ "high", "original" ] }, "McpToolCallError": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } }, "McpToolCallResult": { "type": "object", "required": [ "content" ], "properties": { "_meta": true, "content": { "type": "array", "items": true }, "structuredContent": true } }, "McpToolCallStatus": { "type": "string", "enum": [ "inProgress", "completed", "failed" ] }, "MemoryCitation": { "type": "object", "required": [ "entries", "threadIds" ], "properties": { "entries": { "type": "array", "items": { "$ref": "#/definitions/MemoryCitationEntry" } }, "threadIds": { "type": "array", "items": { "type": "string" } } } }, "MemoryCitationEntry": { "type": "object", "required": [ "lineEnd", "lineStart", "note", "path" ], "properties": { "lineEnd": { "type": "integer", "format": "uint32", "minimum": 0.0 }, "lineStart": { "type": "integer", "format": "uint32", "minimum": 0.0 }, "note": { "type": "string" }, "path": { "type": "string" } } }, "MessagePhase": { "description": "Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as \"phase unknown\" and keep compatibility behavior for legacy models.", "oneOf": [ { "description": "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.", "type": "string", "enum": [ "commentary" ] }, { "description": "The assistant's terminal answer text for the current turn.", "type": "string", "enum": [ "final_answer" ] } ] }, "PatchApplyStatus": { "type": "string", "enum": [ "inProgress", "completed", "failed", "declined" ] }, "PatchChangeKind": { "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "add" ], "title": "AddPatchChangeKindType" } }, "title": "AddPatchChangeKind" }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "delete" ], "title": "DeletePatchChangeKindType" } }, "title": "DeletePatchChangeKind" }, { "type": "object", "required": [ "type" ], "properties": { "move_path": { "type": [ "string", "null" ] }, "type": { "type": "string", "enum": [ "update" ], "title": "UpdatePatchChangeKindType" } }, "title": "UpdatePatchChangeKind" } ] }, "ReasoningEffort": { "description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", "type": "string", "enum": [ "none", "minimal", "low", "medium", "high", "xhigh" ] }, "TextElement": { "type": "object", "required": [ "byteRange" ], "properties": { "byteRange": { "description": "Byte range in the parent `text` buffer that this element occupies.", "allOf": [ { "$ref": "#/definitions/ByteRange" } ] }, "placeholder": { "description": "Optional human-readable placeholder for the element, displayed in the UI.", "type": [ "string", "null" ] } } }, "ThreadItem": { "oneOf": [ { "type": "object", "required": [ "content", "id", "type" ], "properties": { "content": { "type": "array", "items": { "$ref": "#/definitions/UserInput" } }, "id": { "type": "string" }, "type": { "type": "string", "enum": [ "userMessage" ], "title": "UserMessageThreadItemType" } }, "title": "UserMessageThreadItem" }, { "type": "object", "required": [ "fragments", "id", "type" ], "properties": { "fragments": { "type": "array", "items": { "$ref": "#/definitions/HookPromptFragment" } }, "id": { "type": "string" }, "type": { "type": "string", "enum": [ "hookPrompt" ], "title": "HookPromptThreadItemType" } }, "title": "HookPromptThreadItem" }, { "type": "object", "required": [ "id", "text", "type" ], "properties": { "id": { "type": "string" }, "memoryCitation": { "default": null, "anyOf": [ { "$ref": "#/definitions/MemoryCitation" }, { "type": "null" } ] }, "phase": { "default": null, "anyOf": [ { "$ref": "#/definitions/MessagePhase" }, { "type": "null" } ] }, "text": { "type": "string" }, "type": { "type": "string", "enum": [ "agentMessage" ], "title": "AgentMessageThreadItemType" } }, "title": "AgentMessageThreadItem" }, { "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.", "type": "object", "required": [ "id", "text", "type" ], "properties": { "id": { "type": "string" }, "text": { "type": "string" }, "type": { "type": "string", "enum": [ "plan" ], "title": "PlanThreadItemType" } }, "title": "PlanThreadItem" }, { "type": "object", "required": [ "id", "type" ], "properties": { "content": { "default": [], "type": "array", "items": { "type": "string" } }, "id": { "type": "string" }, "summary": { "default": [], "type": "array", "items": { "type": "string" } }, "type": { "type": "string", "enum": [ "reasoning" ], "title": "ReasoningThreadItemType" } }, "title": "ReasoningThreadItem" }, { "type": "object", "required": [ "command", "commandActions", "cwd", "id", "status", "type" ], "properties": { "aggregatedOutput": { "description": "The command's output, aggregated from stdout and stderr.", "type": [ "string", "null" ] }, "command": { "description": "The command to be executed.", "type": "string" }, "commandActions": { "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together.", "type": "array", "items": { "$ref": "#/definitions/CommandAction" } }, "cwd": { "description": "The command's working directory.", "allOf": [ { "$ref": "#/definitions/AbsolutePathBuf" } ] }, "durationMs": { "description": "The duration of the command execution in milliseconds.", "type": [ "integer", "null" ], "format": "int64" }, "exitCode": { "description": "The command's exit code.", "type": [ "integer", "null" ], "format": "int32" }, "id": { "type": "string" }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ "string", "null" ] }, "source": { "default": "agent", "allOf": [ { "$ref": "#/definitions/CommandExecutionSource" } ] }, "status": { "$ref": "#/definitions/CommandExecutionStatus" }, "type": { "type": "string", "enum": [ "commandExecution" ], "title": "CommandExecutionThreadItemType" } }, "title": "CommandExecutionThreadItem" }, { "type": "object", "required": [ "changes", "id", "status", "type" ], "properties": { "changes": { "type": "array", "items": { "$ref": "#/definitions/FileUpdateChange" } }, "id": { "type": "string" }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, "type": { "type": "string", "enum": [ "fileChange" ], "title": "FileChangeThreadItemType" } }, "title": "FileChangeThreadItem" }, { "type": "object", "required": [ "arguments", "id", "server", "status", "tool", "type" ], "properties": { "arguments": true, "durationMs": { "description": "The duration of the MCP tool call in milliseconds.", "type": [ "integer", "null" ], "format": "int64" }, "error": { "anyOf": [ { "$ref": "#/definitions/McpToolCallError" }, { "type": "null" } ] }, "id": { "type": "string" }, "mcpAppResourceUri": { "type": [ "string", "null" ] }, "result": { "anyOf": [ { "$ref": "#/definitions/McpToolCallResult" }, { "type": "null" } ] }, "server": { "type": "string" }, "status": { "$ref": "#/definitions/McpToolCallStatus" }, "tool": { "type": "string" }, "type": { "type": "string", "enum": [ "mcpToolCall" ], "title": "McpToolCallThreadItemType" } }, "title": "McpToolCallThreadItem" }, { "type": "object", "required": [ "arguments", "id", "status", "tool", "type" ], "properties": { "arguments": true, "contentItems": { "type": [ "array", "null" ], "items": { "$ref": "#/definitions/DynamicToolCallOutputContentItem" } }, "durationMs": { "description": "The duration of the dynamic tool call in milliseconds.", "type": [ "integer", "null" ], "format": "int64" }, "id": { "type": "string" }, "namespace": { "type": [ "string", "null" ] }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, "success": { "type": [ "boolean", "null" ] }, "tool": { "type": "string" }, "type": { "type": "string", "enum": [ "dynamicToolCall" ], "title": "DynamicToolCallThreadItemType" } }, "title": "DynamicToolCallThreadItem" }, { "type": "object", "required": [ "agentsStates", "id", "receiverThreadIds", "senderThreadId", "status", "tool", "type" ], "properties": { "agentsStates": { "description": "Last known status of the target agents, when available.", "type": "object", "additionalProperties": { "$ref": "#/definitions/CollabAgentState" } }, "id": { "description": "Unique identifier for this collab tool call.", "type": "string" }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ "string", "null" ] }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ "string", "null" ] }, "reasoningEffort": { "description": "Reasoning effort requested for the spawned agent, when applicable.", "anyOf": [ { "$ref": "#/definitions/ReasoningEffort" }, { "type": "null" } ] }, "receiverThreadIds": { "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.", "type": "array", "items": { "type": "string" } }, "senderThreadId": { "description": "Thread ID of the agent issuing the collab request.", "type": "string" }, "status": { "description": "Current status of the collab tool call.", "allOf": [ { "$ref": "#/definitions/CollabAgentToolCallStatus" } ] }, "tool": { "description": "Name of the collab tool that was invoked.", "allOf": [ { "$ref": "#/definitions/CollabAgentTool" } ] }, "type": { "type": "string", "enum": [ "collabAgentToolCall" ], "title": "CollabAgentToolCallThreadItemType" } }, "title": "CollabAgentToolCallThreadItem" }, { "type": "object", "required": [ "id", "query", "type" ], "properties": { "action": { "anyOf": [ { "$ref": "#/definitions/WebSearchAction" }, { "type": "null" } ] }, "id": { "type": "string" }, "query": { "type": "string" }, "type": { "type": "string", "enum": [ "webSearch" ], "title": "WebSearchThreadItemType" } }, "title": "WebSearchThreadItem" }, { "type": "object", "required": [ "id", "path", "type" ], "properties": { "id": { "type": "string" }, "path": { "$ref": "#/definitions/AbsolutePathBuf" }, "type": { "type": "string", "enum": [ "imageView" ], "title": "ImageViewThreadItemType" } }, "title": "ImageViewThreadItem" }, { "type": "object", "required": [ "id", "result", "status", "type" ], "properties": { "id": { "type": "string" }, "result": { "type": "string" }, "revisedPrompt": { "type": [ "string", "null" ] }, "savedPath": { "anyOf": [ { "$ref": "#/definitions/AbsolutePathBuf" }, { "type": "null" } ] }, "status": { "type": "string" }, "type": { "type": "string", "enum": [ "imageGeneration" ], "title": "ImageGenerationThreadItemType" } }, "title": "ImageGenerationThreadItem" }, { "type": "object", "required": [ "id", "review", "type" ], "properties": { "id": { "type": "string" }, "review": { "type": "string" }, "type": { "type": "string", "enum": [ "enteredReviewMode" ], "title": "EnteredReviewModeThreadItemType" } }, "title": "EnteredReviewModeThreadItem" }, { "type": "object", "required": [ "id", "review", "type" ], "properties": { "id": { "type": "string" }, "review": { "type": "string" }, "type": { "type": "string", "enum": [ "exitedReviewMode" ], "title": "ExitedReviewModeThreadItemType" } }, "title": "ExitedReviewModeThreadItem" }, { "type": "object", "required": [ "id", "type" ], "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "contextCompaction" ], "title": "ContextCompactionThreadItemType" } }, "title": "ContextCompactionThreadItem" } ] }, "UserInput": { "oneOf": [ { "type": "object", "required": [ "text", "type" ], "properties": { "text": { "type": "string" }, "text_elements": { "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [], "type": "array", "items": { "$ref": "#/definitions/TextElement" } }, "type": { "type": "string", "enum": [ "text" ], "title": "TextUserInputType" } }, "title": "TextUserInput" }, { "type": "object", "required": [ "type", "url" ], "properties": { "detail": { "default": null, "anyOf": [ { "$ref": "#/definitions/ImageDetail" }, { "type": "null" } ] }, "type": { "type": "string", "enum": [ "image" ], "title": "ImageUserInputType" }, "url": { "type": "string" } }, "title": "ImageUserInput" }, { "type": "object", "required": [ "path", "type" ], "properties": { "detail": { "default": null, "anyOf": [ { "$ref": "#/definitions/ImageDetail" }, { "type": "null" } ] }, "path": { "type": "string" }, "type": { "type": "string", "enum": [ "localImage" ], "title": "LocalImageUserInputType" } }, "title": "LocalImageUserInput" }, { "type": "object", "required": [ "name", "path", "type" ], "properties": { "name": { "type": "string" }, "path": { "type": "string" }, "type": { "type": "string", "enum": [ "skill" ], "title": "SkillUserInputType" } }, "title": "SkillUserInput" }, { "type": "object", "required": [ "name", "path", "type" ], "properties": { "name": { "type": "string" }, "path": { "type": "string" }, "type": { "type": "string", "enum": [ "mention" ], "title": "MentionUserInputType" } }, "title": "MentionUserInput" } ] }, "WebSearchAction": { "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "queries": { "type": [ "array", "null" ], "items": { "type": "string" } }, "query": { "type": [ "string", "null" ] }, "type": { "type": "string", "enum": [ "search" ], "title": "SearchWebSearchActionType" } }, "title": "SearchWebSearchAction" }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "openPage" ], "title": "OpenPageWebSearchActionType" }, "url": { "type": [ "string", "null" ] } }, "title": "OpenPageWebSearchAction" }, { "type": "object", "required": [ "type" ], "properties": { "pattern": { "type": [ "string", "null" ] }, "type": { "type": "string", "enum": [ "findInPage" ], "title": "FindInPageWebSearchActionType" }, "url": { "type": [ "string", "null" ] } }, "title": "FindInPageWebSearchAction" }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "other" ], "title": "OtherWebSearchActionType" } }, "title": "OtherWebSearchAction" } ] } } }