Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Refresh Python SDK generated types (#14646)

sayan-oai8ca358a13cd2
diff --git a/sdk/python/src/codex_app_server/generated/notification_registry.py b/sdk/python/src/codex_app_server/generated/notification_registry.py
index ef5b182d78..fa5217affe 100644
--- a/sdk/python/src/codex_app_server/generated/notification_registry.py
+++ b/sdk/python/src/codex_app_server/generated/notification_registry.py
@@ -22,6 +22,8 @@ from .v2_all import FuzzyFileSearchSessionUpdatedNotification
from .v2_all import HookCompletedNotification
from .v2_all import HookStartedNotification
from .v2_all import ItemCompletedNotification
+from .v2_all import ItemGuardianApprovalReviewCompletedNotification
+from .v2_all import ItemGuardianApprovalReviewStartedNotification
from .v2_all import ItemStartedNotification
from .v2_all import McpServerOauthLoginCompletedNotification
from .v2_all import McpToolCallProgressNotification
@@ -66,6 +68,8 @@ NOTIFICATION_MODELS: dict[str, type[BaseModel]] = {
"hook/completed": HookCompletedNotification,
"hook/started": HookStartedNotification,
"item/agentMessage/delta": AgentMessageDeltaNotification,
+ "item/autoApprovalReview/completed": ItemGuardianApprovalReviewCompletedNotification,
+ "item/autoApprovalReview/started": ItemGuardianApprovalReviewStartedNotification,
"item/commandExecution/outputDelta": CommandExecutionOutputDeltaNotification,
"item/commandExecution/terminalInteraction": TerminalInteractionNotification,
"item/completed": ItemCompletedNotification,
diff --git a/sdk/python/src/codex_app_server/generated/v2_all.py b/sdk/python/src/codex_app_server/generated/v2_all.py
index f746fc771f..e953baaac7 100644
--- a/sdk/python/src/codex_app_server/generated/v2_all.py
+++ b/sdk/python/src/codex_app_server/generated/v2_all.py
@@ -42,21 +42,6 @@ class AccountLoginCompletedNotification(BaseModel):
success: bool
-class TextAgentMessageContent(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- text: str
- type: Annotated[Literal["Text"], Field(title="TextAgentMessageContentType")]
-
-
-class AgentMessageContent(RootModel[TextAgentMessageContent]):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- root: TextAgentMessageContent
-
-
class AgentMessageDeltaNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -67,46 +52,6 @@ class AgentMessageDeltaNotification(BaseModel):
turn_id: Annotated[str, Field(alias="turnId")]
-class CompletedAgentStatus(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- populate_by_name=True,
- )
- completed: str | None = None
-
-
-class ErroredAgentStatus(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- populate_by_name=True,
- )
- errored: str
-
-
-class AgentStatus(
- RootModel[
- Literal["pending_init"]
- | Literal["running"]
- | CompletedAgentStatus
- | ErroredAgentStatus
- | Literal["shutdown"]
- | Literal["not_found"]
- ]
-):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- root: Annotated[
- Literal["pending_init"]
- | Literal["running"]
- | CompletedAgentStatus
- | ErroredAgentStatus
- | Literal["shutdown"]
- | Literal["not_found"],
- Field(description="Agent lifecycle status, derived from emitted events."),
- ]
-
-
class AnalyticsConfig(BaseModel):
model_config = ConfigDict(
extra="allow",
@@ -174,6 +119,11 @@ class AppToolsConfig(BaseModel):
)
+class ApprovalsReviewer(Enum):
+ user = "user"
+ guardian_subagent = "guardian_subagent"
+
+
class AppsDefaultConfig(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -221,7 +171,7 @@ class AskForApprovalValue(Enum):
never = "never"
-class Reject(BaseModel):
+class Granular(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
@@ -232,19 +182,19 @@ class Reject(BaseModel):
skill_approval: bool | None = False
-class RejectAskForApproval(BaseModel):
+class GranularAskForApproval(BaseModel):
model_config = ConfigDict(
extra="forbid",
populate_by_name=True,
)
- reject: Reject
+ granular: Granular
-class AskForApproval(RootModel[AskForApprovalValue | RejectAskForApproval]):
+class AskForApproval(RootModel[AskForApprovalValue | GranularAskForApproval]):
model_config = ConfigDict(
populate_by_name=True,
)
- root: AskForApprovalValue | RejectAskForApproval
+ root: AskForApprovalValue | GranularAskForApproval
class AuthMode(Enum):
@@ -261,16 +211,6 @@ class ByteRange(BaseModel):
start: Annotated[int, Field(ge=0)]
-class CallToolResult(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- field_meta: Annotated[Any | None, Field(alias="_meta")] = None
- content: list
- is_error: Annotated[bool | None, Field(alias="isError")] = None
- structured_content: Annotated[Any | None, Field(alias="structuredContent")] = None
-
-
class CancelLoginAccountParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -746,17 +686,6 @@ class CreditsSnapshot(BaseModel):
unlimited: bool
-class CustomPrompt(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- argument_hint: str | None = None
- content: str
- description: str | None = None
- name: str
- path: str
-
-
class DeprecationNoticeNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -770,14 +699,6 @@ class DeprecationNoticeNotification(BaseModel):
summary: Annotated[str, Field(description="Concise summary of what is deprecated.")]
-class Duration(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- nanos: Annotated[int, Field(ge=0)]
- secs: Annotated[int, Field(ge=0)]
-
-
class InputTextDynamicToolCallOutputContentItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -830,783 +751,731 @@ class DynamicToolSpec(BaseModel):
name: str
-class FormElicitationRequest(BaseModel):
+class ExperimentalFeatureListParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- field_meta: Annotated[Any | None, Field(alias="_meta")] = None
- message: str
- mode: Annotated[Literal["form"], Field(title="FormElicitationRequestMode")]
- requested_schema: Any
+ cursor: Annotated[
+ str | None,
+ Field(description="Opaque pagination cursor returned by a previous call."),
+ ] = None
+ limit: Annotated[
+ int | None,
+ Field(
+ description="Optional page size; defaults to a reasonable server-side value.",
+ ge=0,
+ ),
+ ] = None
-class UrlElicitationRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- field_meta: Annotated[Any | None, Field(alias="_meta")] = None
- elicitation_id: str
- message: str
- mode: Annotated[Literal["url"], Field(title="UrlElicitationRequestMode")]
- url: str
+class ExperimentalFeatureStage(Enum):
+ beta = "beta"
+ under_development = "underDevelopment"
+ stable = "stable"
+ deprecated = "deprecated"
+ removed = "removed"
-class ElicitationRequest(RootModel[FormElicitationRequest | UrlElicitationRequest]):
+class ExternalAgentConfigDetectParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: FormElicitationRequest | UrlElicitationRequest
+ cwds: Annotated[
+ list[str] | None,
+ Field(
+ description="Zero or more working directories to include for repo-scoped detection."
+ ),
+ ] = None
+ include_home: Annotated[
+ bool | None,
+ Field(
+ alias="includeHome",
+ description="If true, include detection under the user's home (~/.claude, ~/.codex, etc.).",
+ ),
+ ] = None
-class ErrorEventMsg(BaseModel):
+class ExternalAgentConfigImportResponse(BaseModel):
+ pass
model_config = ConfigDict(
populate_by_name=True,
)
- codex_error_info: CodexErrorInfo | None = None
- message: str
- type: Annotated[Literal["error"], Field(title="ErrorEventMsgType")]
-class WarningEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- message: str
- type: Annotated[Literal["warning"], Field(title="WarningEventMsgType")]
+class ExternalAgentConfigMigrationItemType(Enum):
+ agents_md = "AGENTS_MD"
+ config = "CONFIG"
+ skills = "SKILLS"
+ mcp_server_config = "MCP_SERVER_CONFIG"
-class RealtimeConversationStartedEventMsg(BaseModel):
+class FeedbackUploadParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- session_id: str | None = None
- type: Annotated[
- Literal["realtime_conversation_started"],
- Field(title="RealtimeConversationStartedEventMsgType"),
- ]
+ classification: str
+ extra_log_files: Annotated[list[str] | None, Field(alias="extraLogFiles")] = None
+ include_logs: Annotated[bool, Field(alias="includeLogs")]
+ reason: str | None = None
+ thread_id: Annotated[str | None, Field(alias="threadId")] = None
-class RealtimeConversationClosedEventMsg(BaseModel):
+class FeedbackUploadResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- reason: str | None = None
- type: Annotated[
- Literal["realtime_conversation_closed"],
- Field(title="RealtimeConversationClosedEventMsgType"),
- ]
+ thread_id: Annotated[str, Field(alias="threadId")]
-class ContextCompactedEventMsg(BaseModel):
+class FileChangeOutputDeltaNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[
- Literal["context_compacted"], Field(title="ContextCompactedEventMsgType")
- ]
+ delta: str
+ item_id: Annotated[str, Field(alias="itemId")]
+ thread_id: Annotated[str, Field(alias="threadId")]
+ turn_id: Annotated[str, Field(alias="turnId")]
+
+
+class ForcedLoginMethod(Enum):
+ chatgpt = "chatgpt"
+ api = "api"
-class ThreadRolledBackEventMsg(BaseModel):
+class FsCopyParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- num_turns: Annotated[
- int,
- Field(description="Number of user turns that were removed from context.", ge=0),
+ destination_path: Annotated[
+ AbsolutePathBuf,
+ Field(alias="destinationPath", description="Absolute destination path."),
]
- type: Annotated[
- Literal["thread_rolled_back"], Field(title="ThreadRolledBackEventMsgType")
+ recursive: Annotated[
+ bool | None,
+ Field(description="Required for directory copies; ignored for file copies."),
+ ] = None
+ source_path: Annotated[
+ AbsolutePathBuf, Field(alias="sourcePath", description="Absolute source path.")
]
-class TaskCompleteEventMsg(BaseModel):
+class FsCopyResponse(BaseModel):
+ pass
model_config = ConfigDict(
populate_by_name=True,
)
- last_agent_message: str | None = None
- turn_id: str
- type: Annotated[Literal["task_complete"], Field(title="TaskCompleteEventMsgType")]
-class AgentMessageDeltaEventMsg(BaseModel):
+class FsCreateDirectoryParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- delta: str
- type: Annotated[
- Literal["agent_message_delta"], Field(title="AgentMessageDeltaEventMsgType")
+ path: Annotated[
+ AbsolutePathBuf, Field(description="Absolute directory path to create.")
]
+ recursive: Annotated[
+ bool | None,
+ Field(
+ description="Whether parent directories should also be created. Defaults to `true`."
+ ),
+ ] = None
-class AgentReasoningEventMsg(BaseModel):
+class FsCreateDirectoryResponse(BaseModel):
+ pass
model_config = ConfigDict(
populate_by_name=True,
)
- text: str
- type: Annotated[
- Literal["agent_reasoning"], Field(title="AgentReasoningEventMsgType")
- ]
-class AgentReasoningDeltaEventMsg(BaseModel):
+class FsGetMetadataParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- delta: str
- type: Annotated[
- Literal["agent_reasoning_delta"], Field(title="AgentReasoningDeltaEventMsgType")
- ]
+ path: Annotated[AbsolutePathBuf, Field(description="Absolute path to inspect.")]
-class AgentReasoningRawContentEventMsg(BaseModel):
+class FsGetMetadataResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- text: str
- type: Annotated[
- Literal["agent_reasoning_raw_content"],
- Field(title="AgentReasoningRawContentEventMsgType"),
+ created_at_ms: Annotated[
+ int,
+ Field(
+ alias="createdAtMs",
+ description="File creation time in Unix milliseconds when available, otherwise `0`.",
+ ),
+ ]
+ is_directory: Annotated[
+ bool,
+ Field(
+ alias="isDirectory",
+ description="Whether the path currently resolves to a directory.",
+ ),
+ ]
+ is_file: Annotated[
+ bool,
+ Field(
+ alias="isFile",
+ description="Whether the path currently resolves to a regular file.",
+ ),
+ ]
+ modified_at_ms: Annotated[
+ int,
+ Field(
+ alias="modifiedAtMs",
+ description="File modification time in Unix milliseconds when available, otherwise `0`.",
+ ),
]
-class AgentReasoningRawContentDeltaEventMsg(BaseModel):
+class FsReadDirectoryEntry(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- delta: str
- type: Annotated[
- Literal["agent_reasoning_raw_content_delta"],
- Field(title="AgentReasoningRawContentDeltaEventMsgType"),
+ file_name: Annotated[
+ str,
+ Field(
+ alias="fileName",
+ description="Direct child entry name only, not an absolute or relative path.",
+ ),
+ ]
+ is_directory: Annotated[
+ bool,
+ Field(
+ alias="isDirectory",
+ description="Whether this entry resolves to a directory.",
+ ),
+ ]
+ is_file: Annotated[
+ bool,
+ Field(
+ alias="isFile", description="Whether this entry resolves to a regular file."
+ ),
]
-class AgentReasoningSectionBreakEventMsg(BaseModel):
+class FsReadDirectoryParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- item_id: str | None = ""
- summary_index: int | None = 0
- type: Annotated[
- Literal["agent_reasoning_section_break"],
- Field(title="AgentReasoningSectionBreakEventMsgType"),
+ path: Annotated[
+ AbsolutePathBuf, Field(description="Absolute directory path to read.")
]
-class WebSearchBeginEventMsg(BaseModel):
+class FsReadDirectoryResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: str
- type: Annotated[
- Literal["web_search_begin"], Field(title="WebSearchBeginEventMsgType")
+ entries: Annotated[
+ list[FsReadDirectoryEntry],
+ Field(description="Direct child entries in the requested directory."),
]
-class ImageGenerationBeginEventMsg(BaseModel):
+class FsReadFileParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: str
- type: Annotated[
- Literal["image_generation_begin"],
- Field(title="ImageGenerationBeginEventMsgType"),
- ]
+ path: Annotated[AbsolutePathBuf, Field(description="Absolute path to read.")]
-class ImageGenerationEndEventMsg(BaseModel):
+class FsReadFileResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: str
- result: str
- revised_prompt: str | None = None
- saved_path: str | None = None
- status: str
- type: Annotated[
- Literal["image_generation_end"], Field(title="ImageGenerationEndEventMsgType")
+ data_base64: Annotated[
+ str, Field(alias="dataBase64", description="File contents encoded as base64.")
]
-class TerminalInteractionEventMsg(BaseModel):
+class FsRemoveParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: Annotated[
- str,
+ force: Annotated[
+ bool | None,
Field(
- description="Identifier for the ExecCommandBegin that produced this chunk."
+ description="Whether missing paths should be ignored. Defaults to `true`."
),
- ]
- process_id: Annotated[
- str, Field(description="Process id associated with the running command.")
- ]
- stdin: Annotated[str, Field(description="Stdin sent to the running session.")]
- type: Annotated[
- Literal["terminal_interaction"], Field(title="TerminalInteractionEventMsgType")
- ]
+ ] = None
+ path: Annotated[AbsolutePathBuf, Field(description="Absolute path to remove.")]
+ recursive: Annotated[
+ bool | None,
+ Field(
+ description="Whether directory removal should recurse. Defaults to `true`."
+ ),
+ ] = None
-class ViewImageToolCallEventMsg(BaseModel):
+class FsRemoveResponse(BaseModel):
+ pass
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: Annotated[
- str, Field(description="Identifier for the originating tool call.")
- ]
- path: Annotated[
- str, Field(description="Local filesystem path provided to the tool.")
- ]
- type: Annotated[
- Literal["view_image_tool_call"], Field(title="ViewImageToolCallEventMsgType")
- ]
-class DynamicToolCallRequestEventMsg(BaseModel):
+class FsWriteFileParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- arguments: Any
- call_id: Annotated[str, Field(alias="callId")]
- tool: str
- turn_id: Annotated[str, Field(alias="turnId")]
- type: Annotated[
- Literal["dynamic_tool_call_request"],
- Field(title="DynamicToolCallRequestEventMsgType"),
+ data_base64: Annotated[
+ str, Field(alias="dataBase64", description="File contents encoded as base64.")
]
+ path: Annotated[AbsolutePathBuf, Field(description="Absolute path to write.")]
-class DynamicToolCallResponseEventMsg(BaseModel):
+class FsWriteFileResponse(BaseModel):
+ pass
model_config = ConfigDict(
populate_by_name=True,
)
- arguments: Annotated[Any, Field(description="Dynamic tool call arguments.")]
- call_id: Annotated[
- str,
- Field(description="Identifier for the corresponding DynamicToolCallRequest."),
- ]
- content_items: Annotated[
- list[DynamicToolCallOutputContentItem],
- Field(description="Dynamic tool response content items."),
- ]
- duration: Annotated[
- Duration, Field(description="The duration of the dynamic tool call.")
- ]
- error: Annotated[
- str | None,
- Field(
- description="Optional error text when the tool call failed before producing a response."
- ),
- ] = None
- success: Annotated[bool, Field(description="Whether the tool call succeeded.")]
- tool: Annotated[str, Field(description="Dynamic tool name.")]
- turn_id: Annotated[
- str, Field(description="Turn ID that this dynamic tool call belongs to.")
- ]
- type: Annotated[
- Literal["dynamic_tool_call_response"],
- Field(title="DynamicToolCallResponseEventMsgType"),
- ]
-class DeprecationNoticeEventMsg(BaseModel):
+class InputTextFunctionCallOutputContentItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- details: Annotated[
- str | None,
- Field(
- description="Optional extra guidance, such as migration steps or rationale."
- ),
- ] = None
- summary: Annotated[str, Field(description="Concise summary of what is deprecated.")]
+ text: str
type: Annotated[
- Literal["deprecation_notice"], Field(title="DeprecationNoticeEventMsgType")
+ Literal["input_text"], Field(title="InputTextFunctionCallOutputContentItemType")
]
-class BackgroundEventEventMsg(BaseModel):
+class FuzzyFileSearchParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- message: str
- type: Annotated[
- Literal["background_event"], Field(title="BackgroundEventEventMsgType")
- ]
+ cancellation_token: Annotated[str | None, Field(alias="cancellationToken")] = None
+ query: str
+ roots: list[str]
-class UndoStartedEventMsg(BaseModel):
+class Indice(RootModel[int]):
model_config = ConfigDict(
populate_by_name=True,
)
- message: str | None = None
- type: Annotated[Literal["undo_started"], Field(title="UndoStartedEventMsgType")]
+ root: Annotated[int, Field(ge=0)]
-class UndoCompletedEventMsg(BaseModel):
+class FuzzyFileSearchResult(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- message: str | None = None
- success: bool
- type: Annotated[Literal["undo_completed"], Field(title="UndoCompletedEventMsgType")]
+ file_name: str
+ indices: list[Indice] | None = None
+ path: str
+ root: str
+ score: Annotated[int, Field(ge=0)]
-class StreamErrorEventMsg(BaseModel):
+class FuzzyFileSearchSessionCompletedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- additional_details: Annotated[
- str | None,
- Field(
- description="Optional details about the underlying stream failure (often the same human-readable message that is surfaced as the terminal error if retries are exhausted)."
- ),
- ] = None
- codex_error_info: CodexErrorInfo | None = None
- message: str
- type: Annotated[Literal["stream_error"], Field(title="StreamErrorEventMsgType")]
+ session_id: Annotated[str, Field(alias="sessionId")]
-class TurnDiffEventMsg(BaseModel):
+class FuzzyFileSearchSessionUpdatedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[Literal["turn_diff"], Field(title="TurnDiffEventMsgType")]
- unified_diff: str
+ files: list[FuzzyFileSearchResult]
+ query: str
+ session_id: Annotated[str, Field(alias="sessionId")]
-class ListCustomPromptsResponseEventMsg(BaseModel):
+class GetAccountParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- custom_prompts: list[CustomPrompt]
- type: Annotated[
- Literal["list_custom_prompts_response"],
- Field(title="ListCustomPromptsResponseEventMsgType"),
- ]
+ refresh_token: Annotated[
+ bool | None,
+ Field(
+ alias="refreshToken",
+ description="When `true`, requests a proactive token refresh before returning.\n\nIn managed auth mode this triggers the normal refresh-token flow. In external auth mode this flag is ignored. Clients should refresh tokens themselves and call `account/login/start` with `chatgptAuthTokens`.",
+ ),
+ ] = False
-class RemoteSkillDownloadedEventMsg(BaseModel):
+class GhostCommit(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
id: str
- name: str
- path: str
- type: Annotated[
- Literal["remote_skill_downloaded"],
- Field(title="RemoteSkillDownloadedEventMsgType"),
- ]
+ parent: str | None = None
+ preexisting_untracked_dirs: list[str]
+ preexisting_untracked_files: list[str]
-class SkillsUpdateAvailableEventMsg(BaseModel):
+class GitInfo(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[
- Literal["skills_update_available"],
- Field(title="SkillsUpdateAvailableEventMsgType"),
- ]
+ branch: str | None = None
+ origin_url: Annotated[str | None, Field(alias="originUrl")] = None
+ sha: str | None = None
-class ShutdownCompleteEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- type: Annotated[
- Literal["shutdown_complete"], Field(title="ShutdownCompleteEventMsgType")
- ]
+class GuardianApprovalReviewStatus(Enum):
+ in_progress = "inProgress"
+ approved = "approved"
+ denied = "denied"
+ aborted = "aborted"
-class AgentMessageContentDeltaEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- delta: str
- item_id: str
- thread_id: str
- turn_id: str
- type: Annotated[
- Literal["agent_message_content_delta"],
- Field(title="AgentMessageContentDeltaEventMsgType"),
- ]
+class GuardianRiskLevel(Enum):
+ low = "low"
+ medium = "medium"
+ high = "high"
-class PlanDeltaEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- delta: str
- item_id: str
- thread_id: str
- turn_id: str
- type: Annotated[Literal["plan_delta"], Field(title="PlanDeltaEventMsgType")]
+class HazelnutScope(Enum):
+ example = "example"
+ workspace_shared = "workspace-shared"
+ all_shared = "all-shared"
+ personal = "personal"
-class ReasoningContentDeltaEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- delta: str
- item_id: str
- summary_index: int | None = 0
- thread_id: str
- turn_id: str
- type: Annotated[
- Literal["reasoning_content_delta"],
- Field(title="ReasoningContentDeltaEventMsgType"),
- ]
+class HookEventName(Enum):
+ session_start = "sessionStart"
+ stop = "stop"
-class ReasoningRawContentDeltaEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- content_index: int | None = 0
- delta: str
- item_id: str
- thread_id: str
- turn_id: str
- type: Annotated[
- Literal["reasoning_raw_content_delta"],
- Field(title="ReasoningRawContentDeltaEventMsgType"),
- ]
+class HookExecutionMode(Enum):
+ sync = "sync"
+ async_ = "async"
-class ExecApprovalRequestSkillMetadata(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- path_to_skills_md: str
+class HookHandlerType(Enum):
+ command = "command"
+ prompt = "prompt"
+ agent = "agent"
-class ExecCommandSource(Enum):
- agent = "agent"
- user_shell = "user_shell"
- unified_exec_startup = "unified_exec_startup"
- unified_exec_interaction = "unified_exec_interaction"
+class HookOutputEntryKind(Enum):
+ warning = "warning"
+ stop = "stop"
+ feedback = "feedback"
+ context = "context"
+ error = "error"
-class ExecCommandStatus(Enum):
+class HookRunStatus(Enum):
+ running = "running"
completed = "completed"
failed = "failed"
- declined = "declined"
-
-
-class ExecOutputStream(Enum):
- stdout = "stdout"
- stderr = "stderr"
+ blocked = "blocked"
+ stopped = "stopped"
-class ExperimentalFeatureListParams(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- cursor: Annotated[
- str | None,
- Field(description="Opaque pagination cursor returned by a previous call."),
- ] = None
- limit: Annotated[
- int | None,
- Field(
- description="Optional page size; defaults to a reasonable server-side value.",
- ge=0,
- ),
- ] = None
+class HookScope(Enum):
+ thread = "thread"
+ turn = "turn"
-class ExperimentalFeatureStage(Enum):
- beta = "beta"
- under_development = "underDevelopment"
- stable = "stable"
- deprecated = "deprecated"
- removed = "removed"
+class ImageDetail(Enum):
+ auto = "auto"
+ low = "low"
+ high = "high"
+ original = "original"
-class ExternalAgentConfigDetectParams(BaseModel):
+class InitializeCapabilities(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- cwds: Annotated[
- list[str] | None,
+ experimental_api: Annotated[
+ bool | None,
Field(
- description="Zero or more working directories to include for repo-scoped detection."
+ alias="experimentalApi",
+ description="Opt into receiving experimental API methods and fields.",
),
- ] = None
- include_home: Annotated[
- bool | None,
+ ] = False
+ opt_out_notification_methods: Annotated[
+ list[str] | None,
Field(
- alias="includeHome",
- description="If true, include detection under the user's home (~/.claude, ~/.codex, etc.).",
+ alias="optOutNotificationMethods",
+ description="Exact notification method names that should be suppressed for this connection (for example `thread/started`).",
),
] = None
-class ExternalAgentConfigImportResponse(BaseModel):
- pass
+class InitializeParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
+ capabilities: InitializeCapabilities | None = None
+ client_info: Annotated[ClientInfo, Field(alias="clientInfo")]
-class ExternalAgentConfigMigrationItemType(Enum):
- agents_md = "AGENTS_MD"
- config = "CONFIG"
- skills = "SKILLS"
- mcp_server_config = "MCP_SERVER_CONFIG"
+class InputModality(Enum):
+ text = "text"
+ image = "image"
-class FeedbackUploadParams(BaseModel):
+class ListMcpServerStatusParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- classification: str
- extra_log_files: Annotated[list[str] | None, Field(alias="extraLogFiles")] = None
- include_logs: Annotated[bool, Field(alias="includeLogs")]
- reason: str | None = None
- thread_id: Annotated[str | None, Field(alias="threadId")] = None
+ cursor: Annotated[
+ str | None,
+ Field(description="Opaque pagination cursor returned by a previous call."),
+ ] = None
+ limit: Annotated[
+ int | None,
+ Field(
+ description="Optional page size; defaults to a server-defined value.", ge=0
+ ),
+ ] = None
-class FeedbackUploadResponse(BaseModel):
+class ExecLocalShellAction(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- thread_id: Annotated[str, Field(alias="threadId")]
+ command: list[str]
+ env: dict[str, Any] | None = None
+ timeout_ms: Annotated[int | None, Field(ge=0)] = None
+ type: Annotated[Literal["exec"], Field(title="ExecLocalShellActionType")]
+ user: str | None = None
+ working_directory: str | None = None
-class AddFileChange(BaseModel):
+class LocalShellAction(RootModel[ExecLocalShellAction]):
model_config = ConfigDict(
populate_by_name=True,
)
- content: str
- type: Annotated[Literal["add"], Field(title="AddFileChangeType")]
+ root: ExecLocalShellAction
+
+
+class LocalShellStatus(Enum):
+ completed = "completed"
+ in_progress = "in_progress"
+ incomplete = "incomplete"
-class DeleteFileChange(BaseModel):
+class ApiKeyLoginAccountParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- content: str
- type: Annotated[Literal["delete"], Field(title="DeleteFileChangeType")]
+ api_key: Annotated[str, Field(alias="apiKey")]
+ type: Annotated[Literal["apiKey"], Field(title="ApiKeyv2::LoginAccountParamsType")]
-class UpdateFileChange(BaseModel):
+class ChatgptLoginAccountParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- move_path: str | None = None
- type: Annotated[Literal["update"], Field(title="UpdateFileChangeType")]
- unified_diff: str
+ type: Annotated[
+ Literal["chatgpt"], Field(title="Chatgptv2::LoginAccountParamsType")
+ ]
-class FileChange(RootModel[AddFileChange | DeleteFileChange | UpdateFileChange]):
+class ChatgptAuthTokensLoginAccountParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: AddFileChange | DeleteFileChange | UpdateFileChange
+ access_token: Annotated[
+ str,
+ Field(
+ alias="accessToken",
+ description="Access token (JWT) supplied by the client. This token is used for backend API requests and email extraction.",
+ ),
+ ]
+ chatgpt_account_id: Annotated[
+ str,
+ Field(
+ alias="chatgptAccountId",
+ description="Workspace/account identifier supplied by the client.",
+ ),
+ ]
+ chatgpt_plan_type: Annotated[
+ str | None,
+ Field(
+ alias="chatgptPlanType",
+ description="Optional plan type supplied by the client.\n\nWhen `null`, Codex attempts to derive the plan type from access-token claims. If unavailable, the plan defaults to `unknown`.",
+ ),
+ ] = None
+ type: Annotated[
+ Literal["chatgptAuthTokens"],
+ Field(title="ChatgptAuthTokensv2::LoginAccountParamsType"),
+ ]
-class FileChangeOutputDeltaNotification(BaseModel):
+class LoginAccountParams(
+ RootModel[
+ ApiKeyLoginAccountParams
+ | ChatgptLoginAccountParams
+ | ChatgptAuthTokensLoginAccountParams
+ ]
+):
model_config = ConfigDict(
populate_by_name=True,
)
- delta: str
- item_id: Annotated[str, Field(alias="itemId")]
- thread_id: Annotated[str, Field(alias="threadId")]
- turn_id: Annotated[str, Field(alias="turnId")]
+ root: Annotated[
+ ApiKeyLoginAccountParams
+ | ChatgptLoginAccountParams
+ | ChatgptAuthTokensLoginAccountParams,
+ Field(title="LoginAccountParams"),
+ ]
-class FileSystemPermissions(BaseModel):
+class ApiKeyLoginAccountResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- read: list[AbsolutePathBuf] | None = None
- write: list[AbsolutePathBuf] | None = None
-
-
-class ForcedLoginMethod(Enum):
- chatgpt = "chatgpt"
- api = "api"
+ type: Annotated[
+ Literal["apiKey"], Field(title="ApiKeyv2::LoginAccountResponseType")
+ ]
-class InputTextFunctionCallOutputContentItem(BaseModel):
+class ChatgptLoginAccountResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- text: str
+ auth_url: Annotated[
+ str,
+ Field(
+ alias="authUrl",
+ description="URL the client should open in a browser to initiate the OAuth flow.",
+ ),
+ ]
+ login_id: Annotated[str, Field(alias="loginId")]
type: Annotated[
- Literal["input_text"], Field(title="InputTextFunctionCallOutputContentItemType")
+ Literal["chatgpt"], Field(title="Chatgptv2::LoginAccountResponseType")
]
-class FuzzyFileSearchParams(BaseModel):
+class ChatgptAuthTokensLoginAccountResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- cancellation_token: Annotated[str | None, Field(alias="cancellationToken")] = None
- query: str
- roots: list[str]
+ type: Annotated[
+ Literal["chatgptAuthTokens"],
+ Field(title="ChatgptAuthTokensv2::LoginAccountResponseType"),
+ ]
-class Indice(RootModel[int]):
+class LoginAccountResponse(
+ RootModel[
+ ApiKeyLoginAccountResponse
+ | ChatgptLoginAccountResponse
+ | ChatgptAuthTokensLoginAccountResponse
+ ]
+):
model_config = ConfigDict(
populate_by_name=True,
)
- root: Annotated[int, Field(ge=0)]
+ root: Annotated[
+ ApiKeyLoginAccountResponse
+ | ChatgptLoginAccountResponse
+ | ChatgptAuthTokensLoginAccountResponse,
+ Field(title="LoginAccountResponse"),
+ ]
-class FuzzyFileSearchResult(BaseModel):
+class LogoutAccountResponse(BaseModel):
+ pass
model_config = ConfigDict(
populate_by_name=True,
)
- file_name: str
- indices: list[Indice] | None = None
- path: str
- root: str
- score: Annotated[int, Field(ge=0)]
-class FuzzyFileSearchSessionCompletedNotification(BaseModel):
+class McpAuthStatus(Enum):
+ unsupported = "unsupported"
+ not_logged_in = "notLoggedIn"
+ bearer_token = "bearerToken"
+ o_auth = "oAuth"
+
+
+class McpServerOauthLoginCompletedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- session_id: Annotated[str, Field(alias="sessionId")]
+ error: str | None = None
+ name: str
+ success: bool
-class FuzzyFileSearchSessionUpdatedNotification(BaseModel):
+class McpServerOauthLoginParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- files: list[FuzzyFileSearchResult]
- query: str
- session_id: Annotated[str, Field(alias="sessionId")]
+ name: str
+ scopes: list[str] | None = None
+ timeout_secs: Annotated[int | None, Field(alias="timeoutSecs")] = None
-class GetAccountParams(BaseModel):
+class McpServerOauthLoginResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- refresh_token: Annotated[
- bool | None,
- Field(
- alias="refreshToken",
- description="When `true`, requests a proactive token refresh before returning.\n\nIn managed auth mode this triggers the normal refresh-token flow. In external auth mode this flag is ignored. Clients should refresh tokens themselves and call `account/login/start` with `chatgptAuthTokens`.",
- ),
- ] = False
+ authorization_url: Annotated[str, Field(alias="authorizationUrl")]
-class GhostCommit(BaseModel):
+class McpServerRefreshResponse(BaseModel):
+ pass
model_config = ConfigDict(
populate_by_name=True,
)
- id: str
- parent: str | None = None
- preexisting_untracked_dirs: list[str]
- preexisting_untracked_files: list[str]
-class GitInfo(BaseModel):
+class McpToolCallError(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- branch: str | None = None
- origin_url: Annotated[str | None, Field(alias="originUrl")] = None
- sha: str | None = None
-
-
-class HazelnutScope(Enum):
- example = "example"
- workspace_shared = "workspace-shared"
- all_shared = "all-shared"
- personal = "personal"
+ message: str
-class HistoryEntry(BaseModel):
+class McpToolCallProgressNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- conversation_id: str
- text: str
- ts: Annotated[int, Field(ge=0)]
-
-
-class HookEventName(Enum):
- session_start = "sessionStart"
- stop = "stop"
-
-
-class HookExecutionMode(Enum):
- sync = "sync"
- async_ = "async"
-
-
-class HookHandlerType(Enum):
- command = "command"
- prompt = "prompt"
- agent = "agent"
+ item_id: Annotated[str, Field(alias="itemId")]
+ message: str
+ thread_id: Annotated[str, Field(alias="threadId")]
+ turn_id: Annotated[str, Field(alias="turnId")]
-class HookOutputEntryKind(Enum):
- warning = "warning"
- stop = "stop"
- feedback = "feedback"
- context = "context"
- error = "error"
+class McpToolCallResult(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True,
+ )
+ content: list
+ structured_content: Annotated[Any | None, Field(alias="structuredContent")] = None
-class HookRunStatus(Enum):
- running = "running"
+class McpToolCallStatus(Enum):
+ in_progress = "inProgress"
completed = "completed"
failed = "failed"
- blocked = "blocked"
- stopped = "stopped"
-class HookScope(Enum):
- thread = "thread"
- turn = "turn"
+class MergeStrategy(Enum):
+ replace = "replace"
+ upsert = "upsert"
-class ImageDetail(Enum):
- auto = "auto"
- low = "low"
- high = "high"
- original = "original"
+class MessagePhase(Enum):
+ commentary = "commentary"
+ final_answer = "final_answer"
-class InitializeCapabilities(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- experimental_api: Annotated[
- bool | None,
- Field(
- alias="experimentalApi",
- description="Opt into receiving experimental API methods and fields.",
- ),
- ] = False
- opt_out_notification_methods: Annotated[
- list[str] | None,
- Field(
- alias="optOutNotificationMethods",
- description="Exact notification method names that should be suppressed for this connection (for example `thread/started`).",
- ),
- ] = None
+class ModeKind(Enum):
+ plan = "plan"
+ default = "default"
-class InitializeParams(BaseModel):
+class ModelAvailabilityNux(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- capabilities: InitializeCapabilities | None = None
- client_info: Annotated[ClientInfo, Field(alias="clientInfo")]
-
-
-class InputModality(Enum):
- text = "text"
- image = "image"
+ message: str
-class ListMcpServerStatusParams(BaseModel):
+class ModelListParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
@@ -1614,4275 +1483,2923 @@ class ListMcpServerStatusParams(BaseModel):
str | None,
Field(description="Opaque pagination cursor returned by a previous call."),
] = None
+ include_hidden: Annotated[
+ bool | None,
+ Field(
+ alias="includeHidden",
+ description="When true, include models that are hidden from the default picker list.",
+ ),
+ ] = None
limit: Annotated[
int | None,
Field(
- description="Optional page size; defaults to a server-defined value.", ge=0
+ description="Optional page size; defaults to a reasonable server-side value.",
+ ge=0,
),
] = None
-class ExecLocalShellAction(BaseModel):
+class ModelRerouteReason(RootModel[Literal["highRiskCyberActivity"]]):
model_config = ConfigDict(
populate_by_name=True,
)
- command: list[str]
- env: dict[str, Any] | None = None
- timeout_ms: Annotated[int | None, Field(ge=0)] = None
- type: Annotated[Literal["exec"], Field(title="ExecLocalShellActionType")]
- user: str | None = None
- working_directory: str | None = None
+ root: Literal["highRiskCyberActivity"]
-class LocalShellAction(RootModel[ExecLocalShellAction]):
+class ModelReroutedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: ExecLocalShellAction
-
-
-class LocalShellStatus(Enum):
- completed = "completed"
- in_progress = "in_progress"
- incomplete = "incomplete"
+ from_model: Annotated[str, Field(alias="fromModel")]
+ reason: ModelRerouteReason
+ thread_id: Annotated[str, Field(alias="threadId")]
+ to_model: Annotated[str, Field(alias="toModel")]
+ turn_id: Annotated[str, Field(alias="turnId")]
-class ApiKeyLoginAccountParams(BaseModel):
+class ModelUpgradeInfo(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- api_key: Annotated[str, Field(alias="apiKey")]
- type: Annotated[Literal["apiKey"], Field(title="ApiKeyv2::LoginAccountParamsType")]
+ migration_markdown: Annotated[str | None, Field(alias="migrationMarkdown")] = None
+ model: str
+ model_link: Annotated[str | None, Field(alias="modelLink")] = None
+ upgrade_copy: Annotated[str | None, Field(alias="upgradeCopy")] = None
-class ChatgptLoginAccountParams(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- type: Annotated[
- Literal["chatgpt"], Field(title="Chatgptv2::LoginAccountParamsType")
- ]
+class NetworkAccess(Enum):
+ restricted = "restricted"
+ enabled = "enabled"
-class ChatgptAuthTokensLoginAccountParams(BaseModel):
+class NetworkRequirements(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- access_token: Annotated[
- str,
- Field(
- alias="accessToken",
- description="Access token (JWT) supplied by the client. This token is used for backend API requests and email extraction.",
- ),
- ]
- chatgpt_account_id: Annotated[
- str,
- Field(
- alias="chatgptAccountId",
- description="Workspace/account identifier supplied by the client.",
- ),
- ]
- chatgpt_plan_type: Annotated[
- str | None,
- Field(
- alias="chatgptPlanType",
- description="Optional plan type supplied by the client.\n\nWhen `null`, Codex attempts to derive the plan type from access-token claims. If unavailable, the plan defaults to `unknown`.",
- ),
+ allow_local_binding: Annotated[bool | None, Field(alias="allowLocalBinding")] = None
+ allow_unix_sockets: Annotated[list[str] | None, Field(alias="allowUnixSockets")] = (
+ None
+ )
+ allow_upstream_proxy: Annotated[bool | None, Field(alias="allowUpstreamProxy")] = (
+ None
+ )
+ allowed_domains: Annotated[list[str] | None, Field(alias="allowedDomains")] = None
+ dangerously_allow_all_unix_sockets: Annotated[
+ bool | None, Field(alias="dangerouslyAllowAllUnixSockets")
] = None
- type: Annotated[
- Literal["chatgptAuthTokens"],
- Field(title="ChatgptAuthTokensv2::LoginAccountParamsType"),
- ]
+ dangerously_allow_non_loopback_proxy: Annotated[
+ bool | None, Field(alias="dangerouslyAllowNonLoopbackProxy")
+ ] = None
+ denied_domains: Annotated[list[str] | None, Field(alias="deniedDomains")] = None
+ enabled: bool | None = None
+ http_port: Annotated[int | None, Field(alias="httpPort", ge=0)] = None
+ socks_port: Annotated[int | None, Field(alias="socksPort", ge=0)] = None
-class LoginAccountParams(
- RootModel[
- ApiKeyLoginAccountParams
- | ChatgptLoginAccountParams
- | ChatgptAuthTokensLoginAccountParams
- ]
-):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- root: Annotated[
- ApiKeyLoginAccountParams
- | ChatgptLoginAccountParams
- | ChatgptAuthTokensLoginAccountParams,
- Field(title="LoginAccountParams"),
- ]
+class PatchApplyStatus(Enum):
+ in_progress = "inProgress"
+ completed = "completed"
+ failed = "failed"
+ declined = "declined"
-class ApiKeyLoginAccountResponse(BaseModel):
+class AddPatchChangeKind(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[
- Literal["apiKey"], Field(title="ApiKeyv2::LoginAccountResponseType")
- ]
+ type: Annotated[Literal["add"], Field(title="AddPatchChangeKindType")]
-class ChatgptLoginAccountResponse(BaseModel):
+class DeletePatchChangeKind(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- auth_url: Annotated[
- str,
- Field(
- alias="authUrl",
- description="URL the client should open in a browser to initiate the OAuth flow.",
- ),
- ]
- login_id: Annotated[str, Field(alias="loginId")]
- type: Annotated[
- Literal["chatgpt"], Field(title="Chatgptv2::LoginAccountResponseType")
- ]
+ type: Annotated[Literal["delete"], Field(title="DeletePatchChangeKindType")]
-class ChatgptAuthTokensLoginAccountResponse(BaseModel):
+class UpdatePatchChangeKind(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[
- Literal["chatgptAuthTokens"],
- Field(title="ChatgptAuthTokensv2::LoginAccountResponseType"),
- ]
+ move_path: str | None = None
+ type: Annotated[Literal["update"], Field(title="UpdatePatchChangeKindType")]
-class LoginAccountResponse(
- RootModel[
- ApiKeyLoginAccountResponse
- | ChatgptLoginAccountResponse
- | ChatgptAuthTokensLoginAccountResponse
- ]
+class PatchChangeKind(
+ RootModel[AddPatchChangeKind | DeletePatchChangeKind | UpdatePatchChangeKind]
):
model_config = ConfigDict(
populate_by_name=True,
)
- root: Annotated[
- ApiKeyLoginAccountResponse
- | ChatgptLoginAccountResponse
- | ChatgptAuthTokensLoginAccountResponse,
- Field(title="LoginAccountResponse"),
- ]
-
-
-class LogoutAccountResponse(BaseModel):
- pass
- model_config = ConfigDict(
- populate_by_name=True,
- )
+ root: AddPatchChangeKind | DeletePatchChangeKind | UpdatePatchChangeKind
-class MacOsAutomationPermissionValue(Enum):
+class Personality(Enum):
none = "none"
- all = "all"
-
-
-class BundleIdsMacOsAutomationPermission(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- populate_by_name=True,
- )
- bundle_ids: list[str]
+ friendly = "friendly"
+ pragmatic = "pragmatic"
-class MacOsAutomationPermission(
- RootModel[MacOsAutomationPermissionValue | BundleIdsMacOsAutomationPermission]
-):
+class PlanDeltaNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: MacOsAutomationPermissionValue | BundleIdsMacOsAutomationPermission
+ delta: str
+ item_id: Annotated[str, Field(alias="itemId")]
+ thread_id: Annotated[str, Field(alias="threadId")]
+ turn_id: Annotated[str, Field(alias="turnId")]
-class MacOsContactsPermission(Enum):
- none = "none"
- read_only = "read_only"
- read_write = "read_write"
+class PlanType(Enum):
+ free = "free"
+ go = "go"
+ plus = "plus"
+ pro = "pro"
+ team = "team"
+ business = "business"
+ enterprise = "enterprise"
+ edu = "edu"
+ unknown = "unknown"
-class MacOsPreferencesPermission(Enum):
- none = "none"
- read_only = "read_only"
- read_write = "read_write"
+class PluginAuthPolicy(Enum):
+ on_install = "ON_INSTALL"
+ on_use = "ON_USE"
-class MacOsSeatbeltProfileExtensions(BaseModel):
+class PluginInstallParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- macos_accessibility: bool | None = False
- macos_automation: Annotated[MacOsAutomationPermission | None, Field()] = "none"
- macos_calendar: bool | None = False
- macos_contacts: MacOsContactsPermission | None = "none"
- macos_launch_services: bool | None = False
- macos_preferences: MacOsPreferencesPermission | None = "read_only"
- macos_reminders: bool | None = False
+ marketplace_path: Annotated[AbsolutePathBuf, Field(alias="marketplacePath")]
+ plugin_name: Annotated[str, Field(alias="pluginName")]
-class McpAuthStatus(Enum):
- unsupported = "unsupported"
- not_logged_in = "notLoggedIn"
- bearer_token = "bearerToken"
- o_auth = "oAuth"
+class PluginInstallPolicy(Enum):
+ not_available = "NOT_AVAILABLE"
+ available = "AVAILABLE"
+ installed_by_default = "INSTALLED_BY_DEFAULT"
-class McpInvocation(BaseModel):
+class PluginInstallResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- arguments: Annotated[
- Any | None, Field(description="Arguments to the tool call.")
- ] = None
- server: Annotated[
- str, Field(description="Name of the MCP server as defined in the config.")
- ]
- tool: Annotated[
- str, Field(description="Name of the tool as given by the MCP server.")
- ]
+ apps_needing_auth: Annotated[list[AppSummary], Field(alias="appsNeedingAuth")]
+ auth_policy: Annotated[PluginAuthPolicy, Field(alias="authPolicy")]
-class McpServerOauthLoginCompletedNotification(BaseModel):
+class PluginInterface(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- error: str | None = None
- name: str
- success: bool
+ brand_color: Annotated[str | None, Field(alias="brandColor")] = None
+ capabilities: list[str]
+ category: str | None = None
+ composer_icon: Annotated[AbsolutePathBuf | None, Field(alias="composerIcon")] = None
+ default_prompt: Annotated[str | None, Field(alias="defaultPrompt")] = None
+ developer_name: Annotated[str | None, Field(alias="developerName")] = None
+ display_name: Annotated[str | None, Field(alias="displayName")] = None
+ logo: AbsolutePathBuf | None = None
+ long_description: Annotated[str | None, Field(alias="longDescription")] = None
+ privacy_policy_url: Annotated[str | None, Field(alias="privacyPolicyUrl")] = None
+ screenshots: list[AbsolutePathBuf]
+ short_description: Annotated[str | None, Field(alias="shortDescription")] = None
+ terms_of_service_url: Annotated[str | None, Field(alias="termsOfServiceUrl")] = None
+ website_url: Annotated[str | None, Field(alias="websiteUrl")] = None
-class McpServerOauthLoginParams(BaseModel):
+class PluginListParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- name: str
- scopes: list[str] | None = None
- timeout_secs: Annotated[int | None, Field(alias="timeoutSecs")] = None
+ cwds: Annotated[
+ list[AbsolutePathBuf] | None,
+ Field(
+ description="Optional working directories used to discover repo marketplaces. When omitted, only home-scoped marketplaces and the official curated marketplace are considered."
+ ),
+ ] = None
+ force_remote_sync: Annotated[
+ bool | None,
+ Field(
+ alias="forceRemoteSync",
+ description="When true, reconcile the official curated marketplace against the remote plugin state before listing marketplaces.",
+ ),
+ ] = None
-class McpServerOauthLoginResponse(BaseModel):
+class PluginReadParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- authorization_url: Annotated[str, Field(alias="authorizationUrl")]
+ marketplace_path: Annotated[AbsolutePathBuf, Field(alias="marketplacePath")]
+ plugin_name: Annotated[str, Field(alias="pluginName")]
-class McpServerRefreshResponse(BaseModel):
- pass
+class LocalPluginSource(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
+ path: AbsolutePathBuf
+ type: Annotated[Literal["local"], Field(title="LocalPluginSourceType")]
-class McpStartupFailure(BaseModel):
+class PluginSource(RootModel[LocalPluginSource]):
model_config = ConfigDict(
populate_by_name=True,
)
- error: str
- server: str
+ root: LocalPluginSource
-class StartingMcpStartupStatus(BaseModel):
+class PluginSummary(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- state: Annotated[Literal["starting"], Field(title="StartingMcpStartupStatusState")]
+ auth_policy: Annotated[PluginAuthPolicy, Field(alias="authPolicy")]
+ enabled: bool
+ id: str
+ install_policy: Annotated[PluginInstallPolicy, Field(alias="installPolicy")]
+ installed: bool
+ interface: PluginInterface | None = None
+ name: str
+ source: PluginSource
-class ReadyMcpStartupStatus(BaseModel):
+class PluginUninstallParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- state: Annotated[Literal["ready"], Field(title="ReadyMcpStartupStatusState")]
+ plugin_id: Annotated[str, Field(alias="pluginId")]
-class FailedMcpStartupStatus(BaseModel):
+class PluginUninstallResponse(BaseModel):
+ pass
model_config = ConfigDict(
populate_by_name=True,
)
- error: str
- state: Annotated[Literal["failed"], Field(title="FailedMcpStartupStatusState")]
-class CancelledMcpStartupStatus(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- state: Annotated[
- Literal["cancelled"], Field(title="CancelledMcpStartupStatusState")
- ]
+class ProductSurface(Enum):
+ chatgpt = "chatgpt"
+ codex = "codex"
+ api = "api"
+ atlas = "atlas"
-class McpStartupStatus(
- RootModel[
- StartingMcpStartupStatus
- | ReadyMcpStartupStatus
- | FailedMcpStartupStatus
- | CancelledMcpStartupStatus
- ]
-):
+class RateLimitWindow(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: (
- StartingMcpStartupStatus
- | ReadyMcpStartupStatus
- | FailedMcpStartupStatus
- | CancelledMcpStartupStatus
+ resets_at: Annotated[int | None, Field(alias="resetsAt")] = None
+ used_percent: Annotated[int, Field(alias="usedPercent")]
+ window_duration_mins: Annotated[int | None, Field(alias="windowDurationMins")] = (
+ None
)
-class McpToolCallError(BaseModel):
+class RestrictedReadOnlyAccess(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- message: str
+ include_platform_defaults: Annotated[
+ bool | None, Field(alias="includePlatformDefaults")
+ ] = True
+ readable_roots: Annotated[
+ list[AbsolutePathBuf] | None, Field(alias="readableRoots")
+ ] = []
+ type: Annotated[Literal["restricted"], Field(title="RestrictedReadOnlyAccessType")]
-class McpToolCallProgressNotification(BaseModel):
+class FullAccessReadOnlyAccess(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- item_id: Annotated[str, Field(alias="itemId")]
- message: str
- thread_id: Annotated[str, Field(alias="threadId")]
- turn_id: Annotated[str, Field(alias="turnId")]
+ type: Annotated[Literal["fullAccess"], Field(title="FullAccessReadOnlyAccessType")]
-class McpToolCallResult(BaseModel):
+class ReadOnlyAccess(RootModel[RestrictedReadOnlyAccess | FullAccessReadOnlyAccess]):
model_config = ConfigDict(
populate_by_name=True,
)
- content: list
- structured_content: Annotated[Any | None, Field(alias="structuredContent")] = None
-
+ root: RestrictedReadOnlyAccess | FullAccessReadOnlyAccess
-class McpToolCallStatus(Enum):
- in_progress = "inProgress"
- completed = "completed"
- failed = "failed"
-
-class MergeStrategy(Enum):
- replace = "replace"
- upsert = "upsert"
-
-
-class MessagePhase(Enum):
- commentary = "commentary"
- final_answer = "final_answer"
+class ReasoningEffort(Enum):
+ none = "none"
+ minimal = "minimal"
+ low = "low"
+ medium = "medium"
+ high = "high"
+ xhigh = "xhigh"
-class ModeKind(Enum):
- plan = "plan"
- default = "default"
+class ReasoningEffortOption(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True,
+ )
+ description: str
+ reasoning_effort: Annotated[ReasoningEffort, Field(alias="reasoningEffort")]
-class ModelAvailabilityNux(BaseModel):
+class ReasoningTextReasoningItemContent(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- message: str
+ text: str
+ type: Annotated[
+ Literal["reasoning_text"], Field(title="ReasoningTextReasoningItemContentType")
+ ]
-class ModelListParams(BaseModel):
+class TextReasoningItemContent(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- cursor: Annotated[
- str | None,
- Field(description="Opaque pagination cursor returned by a previous call."),
- ] = None
- include_hidden: Annotated[
- bool | None,
- Field(
- alias="includeHidden",
- description="When true, include models that are hidden from the default picker list.",
- ),
- ] = None
- limit: Annotated[
- int | None,
- Field(
- description="Optional page size; defaults to a reasonable server-side value.",
- ge=0,
- ),
- ] = None
+ text: str
+ type: Annotated[Literal["text"], Field(title="TextReasoningItemContentType")]
-class ModelRerouteReason(RootModel[Literal["highRiskCyberActivity"]]):
+class ReasoningItemContent(
+ RootModel[ReasoningTextReasoningItemContent | TextReasoningItemContent]
+):
model_config = ConfigDict(
populate_by_name=True,
)
- root: Literal["highRiskCyberActivity"]
+ root: ReasoningTextReasoningItemContent | TextReasoningItemContent
-class ModelReroutedNotification(BaseModel):
+class SummaryTextReasoningItemReasoningSummary(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- from_model: Annotated[str, Field(alias="fromModel")]
- reason: ModelRerouteReason
- thread_id: Annotated[str, Field(alias="threadId")]
- to_model: Annotated[str, Field(alias="toModel")]
- turn_id: Annotated[str, Field(alias="turnId")]
+ text: str
+ type: Annotated[
+ Literal["summary_text"],
+ Field(title="SummaryTextReasoningItemReasoningSummaryType"),
+ ]
-class ModelUpgradeInfo(BaseModel):
+class ReasoningItemReasoningSummary(
+ RootModel[SummaryTextReasoningItemReasoningSummary]
+):
model_config = ConfigDict(
populate_by_name=True,
)
- migration_markdown: Annotated[str | None, Field(alias="migrationMarkdown")] = None
- model: str
- model_link: Annotated[str | None, Field(alias="modelLink")] = None
- upgrade_copy: Annotated[str | None, Field(alias="upgradeCopy")] = None
+ root: SummaryTextReasoningItemReasoningSummary
-class NetworkAccess(Enum):
- restricted = "restricted"
- enabled = "enabled"
+class ReasoningSummaryValue(Enum):
+ auto = "auto"
+ concise = "concise"
+ detailed = "detailed"
-class NetworkApprovalProtocol(Enum):
- http = "http"
- https = "https"
- socks5_tcp = "socks5Tcp"
- socks5_udp = "socks5Udp"
+class ReasoningSummary(RootModel[ReasoningSummaryValue | Literal["none"]]):
+ model_config = ConfigDict(
+ populate_by_name=True,
+ )
+ root: Annotated[
+ ReasoningSummaryValue | Literal["none"],
+ Field(
+ description="A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries"
+ ),
+ ]
-class NetworkPermissions(BaseModel):
+class ReasoningSummaryPartAddedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- enabled: bool | None = None
+ item_id: Annotated[str, Field(alias="itemId")]
+ summary_index: Annotated[int, Field(alias="summaryIndex")]
+ thread_id: Annotated[str, Field(alias="threadId")]
+ turn_id: Annotated[str, Field(alias="turnId")]
-class NetworkPolicyRuleAction(Enum):
- allow = "allow"
- deny = "deny"
+class ReasoningSummaryTextDeltaNotification(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True,
+ )
+ delta: str
+ item_id: Annotated[str, Field(alias="itemId")]
+ summary_index: Annotated[int, Field(alias="summaryIndex")]
+ thread_id: Annotated[str, Field(alias="threadId")]
+ turn_id: Annotated[str, Field(alias="turnId")]
-class NetworkRequirements(BaseModel):
+class ReasoningTextDeltaNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- allow_local_binding: Annotated[bool | None, Field(alias="allowLocalBinding")] = None
- allow_unix_sockets: Annotated[list[str] | None, Field(alias="allowUnixSockets")] = (
- None
- )
- allow_upstream_proxy: Annotated[bool | None, Field(alias="allowUpstreamProxy")] = (
- None
- )
- allowed_domains: Annotated[list[str] | None, Field(alias="allowedDomains")] = None
- dangerously_allow_all_unix_sockets: Annotated[
- bool | None, Field(alias="dangerouslyAllowAllUnixSockets")
- ] = None
- dangerously_allow_non_loopback_proxy: Annotated[
- bool | None, Field(alias="dangerouslyAllowNonLoopbackProxy")
- ] = None
- denied_domains: Annotated[list[str] | None, Field(alias="deniedDomains")] = None
- enabled: bool | None = None
- http_port: Annotated[int | None, Field(alias="httpPort", ge=0)] = None
- socks_port: Annotated[int | None, Field(alias="socksPort", ge=0)] = None
+ content_index: Annotated[int, Field(alias="contentIndex")]
+ delta: str
+ item_id: Annotated[str, Field(alias="itemId")]
+ thread_id: Annotated[str, Field(alias="threadId")]
+ turn_id: Annotated[str, Field(alias="turnId")]
-class ReadParsedCommand(BaseModel):
+class RemoteSkillSummary(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- cmd: str
+ description: str
+ id: str
name: str
- path: Annotated[
- str,
- Field(
- description="(Best effort) Path to the file being read by the command. When possible, this is an absolute path, though when relative, it should be resolved against the `cwd`` that will be used to run the command to derive the absolute path."
- ),
- ]
- type: Annotated[Literal["read"], Field(title="ReadParsedCommandType")]
-class ListFilesParsedCommand(BaseModel):
+class RequestId(RootModel[str | int]):
model_config = ConfigDict(
populate_by_name=True,
)
- cmd: str
- path: str | None = None
- type: Annotated[Literal["list_files"], Field(title="ListFilesParsedCommandType")]
+ root: str | int
-class SearchParsedCommand(BaseModel):
+class ResidencyRequirement(RootModel[Literal["us"]]):
model_config = ConfigDict(
populate_by_name=True,
)
- cmd: str
- path: str | None = None
- query: str | None = None
- type: Annotated[Literal["search"], Field(title="SearchParsedCommandType")]
+ root: Literal["us"]
-class UnknownParsedCommand(BaseModel):
+class Resource(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- cmd: str
- type: Annotated[Literal["unknown"], Field(title="UnknownParsedCommandType")]
+ field_meta: Annotated[Any | None, Field(alias="_meta")] = None
+ annotations: Any | None = None
+ description: str | None = None
+ icons: list | None = None
+ mime_type: Annotated[str | None, Field(alias="mimeType")] = None
+ name: str
+ size: int | None = None
+ title: str | None = None
+ uri: str
-class ParsedCommand(
- RootModel[
- ReadParsedCommand
- | ListFilesParsedCommand
- | SearchParsedCommand
- | UnknownParsedCommand
- ]
-):
+class ResourceTemplate(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: (
- ReadParsedCommand
- | ListFilesParsedCommand
- | SearchParsedCommand
- | UnknownParsedCommand
- )
-
-
-class PatchApplyStatus(Enum):
- in_progress = "inProgress"
- completed = "completed"
- failed = "failed"
- declined = "declined"
+ annotations: Any | None = None
+ description: str | None = None
+ mime_type: Annotated[str | None, Field(alias="mimeType")] = None
+ name: str
+ title: str | None = None
+ uri_template: Annotated[str, Field(alias="uriTemplate")]
-class AddPatchChangeKind(BaseModel):
+class MessageResponseItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[Literal["add"], Field(title="AddPatchChangeKindType")]
+ content: list[ContentItem]
+ end_turn: bool | None = None
+ id: str | None = None
+ phase: MessagePhase | None = None
+ role: str
+ type: Annotated[Literal["message"], Field(title="MessageResponseItemType")]
-class DeletePatchChangeKind(BaseModel):
+class ReasoningResponseItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[Literal["delete"], Field(title="DeletePatchChangeKindType")]
+ content: list[ReasoningItemContent] | None = None
+ encrypted_content: str | None = None
+ id: str
+ summary: list[ReasoningItemReasoningSummary]
+ type: Annotated[Literal["reasoning"], Field(title="ReasoningResponseItemType")]
-class UpdatePatchChangeKind(BaseModel):
+class LocalShellCallResponseItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- move_path: str | None = None
- type: Annotated[Literal["update"], Field(title="UpdatePatchChangeKindType")]
+ action: LocalShellAction
+ call_id: Annotated[
+ str | None, Field(description="Set when using the Responses API.")
+ ] = None
+ id: Annotated[
+ str | None,
+ Field(
+ description="Legacy id field retained for compatibility with older payloads."
+ ),
+ ] = None
+ status: LocalShellStatus
+ type: Annotated[
+ Literal["local_shell_call"], Field(title="LocalShellCallResponseItemType")
+ ]
-class PatchChangeKind(
- RootModel[AddPatchChangeKind | DeletePatchChangeKind | UpdatePatchChangeKind]
-):
+class FunctionCallResponseItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: AddPatchChangeKind | DeletePatchChangeKind | UpdatePatchChangeKind
+ arguments: str
+ call_id: str
+ id: str | None = None
+ name: str
+ namespace: str | None = None
+ type: Annotated[
+ Literal["function_call"], Field(title="FunctionCallResponseItemType")
+ ]
-class PermissionProfile(BaseModel):
+class ToolSearchCallResponseItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- file_system: FileSystemPermissions | None = None
- macos: MacOsSeatbeltProfileExtensions | None = None
- network: NetworkPermissions | None = None
-
-
-class Personality(Enum):
- none = "none"
- friendly = "friendly"
- pragmatic = "pragmatic"
+ arguments: Any
+ call_id: str | None = None
+ execution: str
+ id: str | None = None
+ status: str | None = None
+ type: Annotated[
+ Literal["tool_search_call"], Field(title="ToolSearchCallResponseItemType")
+ ]
-class PlanDeltaNotification(BaseModel):
+class CustomToolCallResponseItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- delta: str
- item_id: Annotated[str, Field(alias="itemId")]
- thread_id: Annotated[str, Field(alias="threadId")]
- turn_id: Annotated[str, Field(alias="turnId")]
-
-
-class PlanType(Enum):
- free = "free"
- go = "go"
- plus = "plus"
- pro = "pro"
- team = "team"
- business = "business"
- enterprise = "enterprise"
- edu = "edu"
- unknown = "unknown"
-
-
-class PluginAuthPolicy(Enum):
- on_install = "ON_INSTALL"
- on_use = "ON_USE"
+ call_id: str
+ id: str | None = None
+ input: str
+ name: str
+ status: str | None = None
+ type: Annotated[
+ Literal["custom_tool_call"], Field(title="CustomToolCallResponseItemType")
+ ]
-class PluginInstallParams(BaseModel):
+class ToolSearchOutputResponseItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- marketplace_path: Annotated[AbsolutePathBuf, Field(alias="marketplacePath")]
- plugin_name: Annotated[str, Field(alias="pluginName")]
-
-
-class PluginInstallPolicy(Enum):
- not_available = "NOT_AVAILABLE"
- available = "AVAILABLE"
- installed_by_default = "INSTALLED_BY_DEFAULT"
+ call_id: str | None = None
+ execution: str
+ status: str
+ tools: list
+ type: Annotated[
+ Literal["tool_search_output"], Field(title="ToolSearchOutputResponseItemType")
+ ]
-class PluginInstallResponse(BaseModel):
+class ImageGenerationCallResponseItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- apps_needing_auth: Annotated[list[AppSummary], Field(alias="appsNeedingAuth")]
- auth_policy: Annotated[PluginAuthPolicy, Field(alias="authPolicy")]
+ id: str
+ result: str
+ revised_prompt: str | None = None
+ status: str
+ type: Annotated[
+ Literal["image_generation_call"],
+ Field(title="ImageGenerationCallResponseItemType"),
+ ]
-class PluginInterface(BaseModel):
+class GhostSnapshotResponseItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- brand_color: Annotated[str | None, Field(alias="brandColor")] = None
- capabilities: list[str]
- category: str | None = None
- composer_icon: Annotated[AbsolutePathBuf | None, Field(alias="composerIcon")] = None
- default_prompt: Annotated[str | None, Field(alias="defaultPrompt")] = None
- developer_name: Annotated[str | None, Field(alias="developerName")] = None
- display_name: Annotated[str | None, Field(alias="displayName")] = None
- logo: AbsolutePathBuf | None = None
- long_description: Annotated[str | None, Field(alias="longDescription")] = None
- privacy_policy_url: Annotated[str | None, Field(alias="privacyPolicyUrl")] = None
- screenshots: list[AbsolutePathBuf]
- short_description: Annotated[str | None, Field(alias="shortDescription")] = None
- terms_of_service_url: Annotated[str | None, Field(alias="termsOfServiceUrl")] = None
- website_url: Annotated[str | None, Field(alias="websiteUrl")] = None
+ ghost_commit: GhostCommit
+ type: Annotated[
+ Literal["ghost_snapshot"], Field(title="GhostSnapshotResponseItemType")
+ ]
-class PluginListParams(BaseModel):
+class CompactionResponseItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- cwds: Annotated[
- list[AbsolutePathBuf] | None,
- Field(
- description="Optional working directories used to discover repo marketplaces. When omitted, only home-scoped marketplaces and the official curated marketplace are considered."
- ),
- ] = None
- force_remote_sync: Annotated[
- bool | None,
- Field(
- alias="forceRemoteSync",
- description="When true, reconcile the official curated marketplace against the remote plugin state before listing marketplaces.",
- ),
- ] = None
+ encrypted_content: str
+ type: Annotated[Literal["compaction"], Field(title="CompactionResponseItemType")]
-class LocalPluginSource(BaseModel):
+class OtherResponseItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- path: AbsolutePathBuf
- type: Annotated[Literal["local"], Field(title="LocalPluginSourceType")]
+ type: Annotated[Literal["other"], Field(title="OtherResponseItemType")]
-class PluginSource(RootModel[LocalPluginSource]):
+class SearchResponsesApiWebSearchAction(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: LocalPluginSource
+ queries: list[str] | None = None
+ query: str | None = None
+ type: Annotated[
+ Literal["search"], Field(title="SearchResponsesApiWebSearchActionType")
+ ]
-class PluginSummary(BaseModel):
+class OpenPageResponsesApiWebSearchAction(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- auth_policy: Annotated[PluginAuthPolicy, Field(alias="authPolicy")]
- enabled: bool
- id: str
- install_policy: Annotated[PluginInstallPolicy, Field(alias="installPolicy")]
- installed: bool
- interface: PluginInterface | None = None
- name: str
- source: PluginSource
+ type: Annotated[
+ Literal["open_page"], Field(title="OpenPageResponsesApiWebSearchActionType")
+ ]
+ url: str | None = None
-class PluginUninstallParams(BaseModel):
+class FindInPageResponsesApiWebSearchAction(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- plugin_id: Annotated[str, Field(alias="pluginId")]
+ pattern: str | None = None
+ type: Annotated[
+ Literal["find_in_page"],
+ Field(title="FindInPageResponsesApiWebSearchActionType"),
+ ]
+ url: str | None = None
-class PluginUninstallResponse(BaseModel):
- pass
+class OtherResponsesApiWebSearchAction(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
+ type: Annotated[
+ Literal["other"], Field(title="OtherResponsesApiWebSearchActionType")
+ ]
-class ProductSurface(Enum):
- chatgpt = "chatgpt"
- codex = "codex"
- api = "api"
- atlas = "atlas"
-
-
-class RateLimitWindow(BaseModel):
+class ResponsesApiWebSearchAction(
+ RootModel[
+ SearchResponsesApiWebSearchAction
+ | OpenPageResponsesApiWebSearchAction
+ | FindInPageResponsesApiWebSearchAction
+ | OtherResponsesApiWebSearchAction
+ ]
+):
model_config = ConfigDict(
populate_by_name=True,
)
- resets_at: Annotated[int | None, Field(alias="resetsAt")] = None
- used_percent: Annotated[int, Field(alias="usedPercent")]
- window_duration_mins: Annotated[int | None, Field(alias="windowDurationMins")] = (
- None
+ root: (
+ SearchResponsesApiWebSearchAction
+ | OpenPageResponsesApiWebSearchAction
+ | FindInPageResponsesApiWebSearchAction
+ | OtherResponsesApiWebSearchAction
)
-class RestrictedReadOnlyAccess(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- include_platform_defaults: Annotated[
- bool | None, Field(alias="includePlatformDefaults")
- ] = True
- readable_roots: Annotated[
- list[AbsolutePathBuf] | None, Field(alias="readableRoots")
- ] = []
- type: Annotated[Literal["restricted"], Field(title="RestrictedReadOnlyAccessType")]
+class ReviewDelivery(Enum):
+ inline = "inline"
+ detached = "detached"
-class FullAccessReadOnlyAccess(BaseModel):
+class UncommittedChangesReviewTarget(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[Literal["fullAccess"], Field(title="FullAccessReadOnlyAccessType")]
+ type: Annotated[
+ Literal["uncommittedChanges"], Field(title="UncommittedChangesReviewTargetType")
+ ]
-class ReadOnlyAccess(RootModel[RestrictedReadOnlyAccess | FullAccessReadOnlyAccess]):
+class BaseBranchReviewTarget(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: RestrictedReadOnlyAccess | FullAccessReadOnlyAccess
+ branch: str
+ type: Annotated[Literal["baseBranch"], Field(title="BaseBranchReviewTargetType")]
-class RealtimeAudioFrame(BaseModel):
+class CommitReviewTarget(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- data: str
- num_channels: Annotated[int, Field(ge=0)]
- sample_rate: Annotated[int, Field(ge=0)]
- samples_per_channel: Annotated[int | None, Field(ge=0)] = None
+ sha: str
+ title: Annotated[
+ str | None,
+ Field(
+ description="Optional human-readable label (e.g., commit subject) for UIs."
+ ),
+ ] = None
+ type: Annotated[Literal["commit"], Field(title="CommitReviewTargetType")]
-class SessionUpdated(BaseModel):
+class CustomReviewTarget(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- instructions: str | None = None
- session_id: str
+ instructions: str
+ type: Annotated[Literal["custom"], Field(title="CustomReviewTargetType")]
-class SessionUpdatedRealtimeEvent(BaseModel):
+class ReviewTarget(
+ RootModel[
+ UncommittedChangesReviewTarget
+ | BaseBranchReviewTarget
+ | CommitReviewTarget
+ | CustomReviewTarget
+ ]
+):
model_config = ConfigDict(
- extra="forbid",
populate_by_name=True,
)
- session_updated: Annotated[SessionUpdated, Field(alias="SessionUpdated")]
+ root: (
+ UncommittedChangesReviewTarget
+ | BaseBranchReviewTarget
+ | CommitReviewTarget
+ | CustomReviewTarget
+ )
-class AudioOutRealtimeEvent(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- populate_by_name=True,
- )
- audio_out: Annotated[RealtimeAudioFrame, Field(alias="AudioOut")]
+class SandboxMode(Enum):
+ read_only = "read-only"
+ workspace_write = "workspace-write"
+ danger_full_access = "danger-full-access"
-class ConversationItemAddedRealtimeEvent(BaseModel):
+class DangerFullAccessSandboxPolicy(BaseModel):
model_config = ConfigDict(
- extra="forbid",
populate_by_name=True,
)
- conversation_item_added: Annotated[Any, Field(alias="ConversationItemAdded")]
+ type: Annotated[
+ Literal["dangerFullAccess"], Field(title="DangerFullAccessSandboxPolicyType")
+ ]
-class ConversationItemDone(BaseModel):
+class ReadOnlySandboxPolicy(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- item_id: str
+ access: Annotated[ReadOnlyAccess | None, Field()] = {"type": "fullAccess"}
+ network_access: Annotated[bool | None, Field(alias="networkAccess")] = False
+ type: Annotated[Literal["readOnly"], Field(title="ReadOnlySandboxPolicyType")]
-class ConversationItemDoneRealtimeEvent(BaseModel):
+class ExternalSandboxSandboxPolicy(BaseModel):
model_config = ConfigDict(
- extra="forbid",
populate_by_name=True,
)
- conversation_item_done: Annotated[
- ConversationItemDone, Field(alias="ConversationItemDone")
+ network_access: Annotated[NetworkAccess | None, Field(alias="networkAccess")] = (
+ "restricted"
+ )
+ type: Annotated[
+ Literal["externalSandbox"], Field(title="ExternalSandboxSandboxPolicyType")
]
-class ErrorRealtimeEvent(BaseModel):
+class WorkspaceWriteSandboxPolicy(BaseModel):
model_config = ConfigDict(
- extra="forbid",
populate_by_name=True,
)
- error: Annotated[str, Field(alias="Error")]
+ exclude_slash_tmp: Annotated[bool | None, Field(alias="excludeSlashTmp")] = False
+ exclude_tmpdir_env_var: Annotated[
+ bool | None, Field(alias="excludeTmpdirEnvVar")
+ ] = False
+ network_access: Annotated[bool | None, Field(alias="networkAccess")] = False
+ read_only_access: Annotated[
+ ReadOnlyAccess | None, Field(alias="readOnlyAccess")
+ ] = {"type": "fullAccess"}
+ type: Annotated[
+ Literal["workspaceWrite"], Field(title="WorkspaceWriteSandboxPolicyType")
+ ]
+ writable_roots: Annotated[
+ list[AbsolutePathBuf] | None, Field(alias="writableRoots")
+ ] = []
-class RealtimeTranscriptDelta(BaseModel):
+class SandboxPolicy(
+ RootModel[
+ DangerFullAccessSandboxPolicy
+ | ReadOnlySandboxPolicy
+ | ExternalSandboxSandboxPolicy
+ | WorkspaceWriteSandboxPolicy
+ ]
+):
model_config = ConfigDict(
populate_by_name=True,
)
- delta: str
+ root: (
+ DangerFullAccessSandboxPolicy
+ | ReadOnlySandboxPolicy
+ | ExternalSandboxSandboxPolicy
+ | WorkspaceWriteSandboxPolicy
+ )
-class RealtimeTranscriptEntry(BaseModel):
+class SandboxWorkspaceWrite(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- role: str
- text: str
-
-
-class ReasoningEffort(Enum):
- none = "none"
- minimal = "minimal"
- low = "low"
- medium = "medium"
- high = "high"
- xhigh = "xhigh"
+ exclude_slash_tmp: bool | None = False
+ exclude_tmpdir_env_var: bool | None = False
+ network_access: bool | None = False
+ writable_roots: list[str] | None = []
-class ReasoningEffortOption(BaseModel):
+class ItemAgentMessageDeltaServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- description: str
- reasoning_effort: Annotated[ReasoningEffort, Field(alias="reasoningEffort")]
+ method: Annotated[
+ Literal["item/agentMessage/delta"],
+ Field(title="Item/agentMessage/deltaNotificationMethod"),
+ ]
+ params: AgentMessageDeltaNotification
-class ReasoningTextReasoningItemContent(BaseModel):
+class ItemPlanDeltaServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- text: str
- type: Annotated[
- Literal["reasoning_text"], Field(title="ReasoningTextReasoningItemContentType")
+ method: Annotated[
+ Literal["item/plan/delta"], Field(title="Item/plan/deltaNotificationMethod")
]
+ params: PlanDeltaNotification
-class TextReasoningItemContent(BaseModel):
+class ItemCommandExecutionOutputDeltaServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- text: str
- type: Annotated[Literal["text"], Field(title="TextReasoningItemContentType")]
+ method: Annotated[
+ Literal["item/commandExecution/outputDelta"],
+ Field(title="Item/commandExecution/outputDeltaNotificationMethod"),
+ ]
+ params: CommandExecutionOutputDeltaNotification
-class ReasoningItemContent(
- RootModel[ReasoningTextReasoningItemContent | TextReasoningItemContent]
-):
+class ItemFileChangeOutputDeltaServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: ReasoningTextReasoningItemContent | TextReasoningItemContent
+ method: Annotated[
+ Literal["item/fileChange/outputDelta"],
+ Field(title="Item/fileChange/outputDeltaNotificationMethod"),
+ ]
+ params: FileChangeOutputDeltaNotification
-class SummaryTextReasoningItemReasoningSummary(BaseModel):
+class ItemMcpToolCallProgressServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- text: str
- type: Annotated[
- Literal["summary_text"],
- Field(title="SummaryTextReasoningItemReasoningSummaryType"),
+ method: Annotated[
+ Literal["item/mcpToolCall/progress"],
+ Field(title="Item/mcpToolCall/progressNotificationMethod"),
]
+ params: McpToolCallProgressNotification
-class ReasoningItemReasoningSummary(
- RootModel[SummaryTextReasoningItemReasoningSummary]
-):
+class McpServerOauthLoginCompletedServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: SummaryTextReasoningItemReasoningSummary
+ method: Annotated[
+ Literal["mcpServer/oauthLogin/completed"],
+ Field(title="McpServer/oauthLogin/completedNotificationMethod"),
+ ]
+ params: McpServerOauthLoginCompletedNotification
-class ReasoningSummaryValue(Enum):
- auto = "auto"
- concise = "concise"
- detailed = "detailed"
+class ItemReasoningSummaryTextDeltaServerNotification(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True,
+ )
+ method: Annotated[
+ Literal["item/reasoning/summaryTextDelta"],
+ Field(title="Item/reasoning/summaryTextDeltaNotificationMethod"),
+ ]
+ params: ReasoningSummaryTextDeltaNotification
-class ReasoningSummary(RootModel[ReasoningSummaryValue | Literal["none"]]):
+class ItemReasoningSummaryPartAddedServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: Annotated[
- ReasoningSummaryValue | Literal["none"],
- Field(
- description="A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries"
- ),
+ method: Annotated[
+ Literal["item/reasoning/summaryPartAdded"],
+ Field(title="Item/reasoning/summaryPartAddedNotificationMethod"),
]
+ params: ReasoningSummaryPartAddedNotification
-class ReasoningSummaryPartAddedNotification(BaseModel):
+class ItemReasoningTextDeltaServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- item_id: Annotated[str, Field(alias="itemId")]
- summary_index: Annotated[int, Field(alias="summaryIndex")]
- thread_id: Annotated[str, Field(alias="threadId")]
- turn_id: Annotated[str, Field(alias="turnId")]
+ method: Annotated[
+ Literal["item/reasoning/textDelta"],
+ Field(title="Item/reasoning/textDeltaNotificationMethod"),
+ ]
+ params: ReasoningTextDeltaNotification
-class ReasoningSummaryTextDeltaNotification(BaseModel):
+class ThreadCompactedServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- delta: str
- item_id: Annotated[str, Field(alias="itemId")]
- summary_index: Annotated[int, Field(alias="summaryIndex")]
- thread_id: Annotated[str, Field(alias="threadId")]
- turn_id: Annotated[str, Field(alias="turnId")]
+ method: Annotated[
+ Literal["thread/compacted"], Field(title="Thread/compactedNotificationMethod")
+ ]
+ params: ContextCompactedNotification
-class ReasoningTextDeltaNotification(BaseModel):
+class ModelReroutedServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- content_index: Annotated[int, Field(alias="contentIndex")]
- delta: str
- item_id: Annotated[str, Field(alias="itemId")]
- thread_id: Annotated[str, Field(alias="threadId")]
- turn_id: Annotated[str, Field(alias="turnId")]
+ method: Annotated[
+ Literal["model/rerouted"], Field(title="Model/reroutedNotificationMethod")
+ ]
+ params: ModelReroutedNotification
-class RemoteSkillSummary(BaseModel):
+class DeprecationNoticeServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- description: str
- id: str
- name: str
+ method: Annotated[
+ Literal["deprecationNotice"], Field(title="DeprecationNoticeNotificationMethod")
+ ]
+ params: DeprecationNoticeNotification
-class RequestId(RootModel[str | int]):
+class FuzzyFileSearchSessionUpdatedServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: str | int
+ method: Annotated[
+ Literal["fuzzyFileSearch/sessionUpdated"],
+ Field(title="FuzzyFileSearch/sessionUpdatedNotificationMethod"),
+ ]
+ params: FuzzyFileSearchSessionUpdatedNotification
-class RequestUserInputQuestionOption(BaseModel):
+class FuzzyFileSearchSessionCompletedServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- description: str
- label: str
+ method: Annotated[
+ Literal["fuzzyFileSearch/sessionCompleted"],
+ Field(title="FuzzyFileSearch/sessionCompletedNotificationMethod"),
+ ]
+ params: FuzzyFileSearchSessionCompletedNotification
-class ResidencyRequirement(RootModel[Literal["us"]]):
+class AccountLoginCompletedServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: Literal["us"]
+ method: Annotated[
+ Literal["account/login/completed"],
+ Field(title="Account/login/completedNotificationMethod"),
+ ]
+ params: AccountLoginCompletedNotification
-class Resource(BaseModel):
+class ServerRequestResolvedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- field_meta: Annotated[Any | None, Field(alias="_meta")] = None
- annotations: Any | None = None
- description: str | None = None
- icons: list | None = None
- mime_type: Annotated[str | None, Field(alias="mimeType")] = None
- name: str
- size: int | None = None
- title: str | None = None
- uri: str
+ request_id: Annotated[RequestId, Field(alias="requestId")]
+ thread_id: Annotated[str, Field(alias="threadId")]
-class ResourceTemplate(BaseModel):
+class ServiceTier(Enum):
+ fast = "fast"
+ flex = "flex"
+
+
+class SessionSourceValue(Enum):
+ cli = "cli"
+ vscode = "vscode"
+ exec = "exec"
+ app_server = "appServer"
+ unknown = "unknown"
+
+
+class Settings(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- annotations: Any | None = None
- description: str | None = None
- mime_type: Annotated[str | None, Field(alias="mimeType")] = None
- name: str
- title: str | None = None
- uri_template: Annotated[str, Field(alias="uriTemplate")]
+ developer_instructions: str | None = None
+ model: str
+ reasoning_effort: ReasoningEffort | None = None
-class MessageResponseItem(BaseModel):
+class SkillErrorInfo(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- content: list[ContentItem]
- end_turn: bool | None = None
- id: str | None = None
- phase: MessagePhase | None = None
- role: str
- type: Annotated[Literal["message"], Field(title="MessageResponseItemType")]
+ message: str
+ path: str
-class ReasoningResponseItem(BaseModel):
+class SkillInterface(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- content: list[ReasoningItemContent] | None = None
- encrypted_content: str | None = None
- id: str
- summary: list[ReasoningItemReasoningSummary]
- type: Annotated[Literal["reasoning"], Field(title="ReasoningResponseItemType")]
+ brand_color: Annotated[str | None, Field(alias="brandColor")] = None
+ default_prompt: Annotated[str | None, Field(alias="defaultPrompt")] = None
+ display_name: Annotated[str | None, Field(alias="displayName")] = None
+ icon_large: Annotated[str | None, Field(alias="iconLarge")] = None
+ icon_small: Annotated[str | None, Field(alias="iconSmall")] = None
+ short_description: Annotated[str | None, Field(alias="shortDescription")] = None
-class LocalShellCallResponseItem(BaseModel):
+class SkillScope(Enum):
+ user = "user"
+ repo = "repo"
+ system = "system"
+ admin = "admin"
+
+
+class SkillSummary(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- action: LocalShellAction
- call_id: Annotated[
- str | None, Field(description="Set when using the Responses API.")
- ] = None
- id: Annotated[
- str | None,
- Field(
- description="Legacy id field retained for compatibility with older payloads."
- ),
- ] = None
- status: LocalShellStatus
- type: Annotated[
- Literal["local_shell_call"], Field(title="LocalShellCallResponseItemType")
- ]
+ description: str
+ interface: SkillInterface | None = None
+ name: str
+ path: str
+ short_description: Annotated[str | None, Field(alias="shortDescription")] = None
-class FunctionCallResponseItem(BaseModel):
+class SkillToolDependency(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- arguments: str
- call_id: str
- id: str | None = None
- name: str
- namespace: str | None = None
- type: Annotated[
- Literal["function_call"], Field(title="FunctionCallResponseItemType")
- ]
+ command: str | None = None
+ description: str | None = None
+ transport: str | None = None
+ type: str
+ url: str | None = None
+ value: str
-class ToolSearchCallResponseItem(BaseModel):
+class SkillsChangedNotification(BaseModel):
+ pass
model_config = ConfigDict(
populate_by_name=True,
)
- arguments: Any
- call_id: str | None = None
- execution: str
- id: str | None = None
- status: str | None = None
- type: Annotated[
- Literal["tool_search_call"], Field(title="ToolSearchCallResponseItemType")
- ]
-class CustomToolCallResponseItem(BaseModel):
+class SkillsConfigWriteParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: str
- id: str | None = None
- input: str
- name: str
- status: str | None = None
- type: Annotated[
- Literal["custom_tool_call"], Field(title="CustomToolCallResponseItemType")
- ]
+ enabled: bool
+ path: str
-class ToolSearchOutputResponseItem(BaseModel):
+class SkillsConfigWriteResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: str | None = None
- execution: str
- status: str
- tools: list
- type: Annotated[
- Literal["tool_search_output"], Field(title="ToolSearchOutputResponseItemType")
- ]
+ effective_enabled: Annotated[bool, Field(alias="effectiveEnabled")]
-class ImageGenerationCallResponseItem(BaseModel):
+class SkillsListExtraRootsForCwd(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- id: str
- result: str
- revised_prompt: str | None = None
- status: str
- type: Annotated[
- Literal["image_generation_call"],
- Field(title="ImageGenerationCallResponseItemType"),
- ]
+ cwd: str
+ extra_user_roots: Annotated[list[str], Field(alias="extraUserRoots")]
-class GhostSnapshotResponseItem(BaseModel):
+class SkillsListParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- ghost_commit: GhostCommit
- type: Annotated[
- Literal["ghost_snapshot"], Field(title="GhostSnapshotResponseItemType")
- ]
+ cwds: Annotated[
+ list[str] | None,
+ Field(
+ description="When empty, defaults to the current session working directory."
+ ),
+ ] = None
+ force_reload: Annotated[
+ bool | None,
+ Field(
+ alias="forceReload",
+ description="When true, bypass the skills cache and re-scan skills from disk.",
+ ),
+ ] = None
+ per_cwd_extra_user_roots: Annotated[
+ list[SkillsListExtraRootsForCwd] | None,
+ Field(
+ alias="perCwdExtraUserRoots",
+ description="Optional per-cwd extra roots to scan as user-scoped skills.",
+ ),
+ ] = None
-class CompactionResponseItem(BaseModel):
+class SkillsRemoteReadParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- encrypted_content: str
- type: Annotated[Literal["compaction"], Field(title="CompactionResponseItemType")]
+ enabled: bool | None = False
+ hazelnut_scope: Annotated[HazelnutScope | None, Field(alias="hazelnutScope")] = (
+ "example"
+ )
+ product_surface: Annotated[ProductSurface | None, Field(alias="productSurface")] = (
+ "codex"
+ )
-class OtherResponseItem(BaseModel):
+class SkillsRemoteReadResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[Literal["other"], Field(title="OtherResponseItemType")]
+ data: list[RemoteSkillSummary]
-class SearchResponsesApiWebSearchAction(BaseModel):
+class SkillsRemoteWriteParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- queries: list[str] | None = None
- query: str | None = None
- type: Annotated[
- Literal["search"], Field(title="SearchResponsesApiWebSearchActionType")
- ]
+ hazelnut_id: Annotated[str, Field(alias="hazelnutId")]
-class OpenPageResponsesApiWebSearchAction(BaseModel):
+class SkillsRemoteWriteResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[
- Literal["open_page"], Field(title="OpenPageResponsesApiWebSearchActionType")
- ]
- url: str | None = None
+ id: str
+ path: str
-class FindInPageResponsesApiWebSearchAction(BaseModel):
+class SubAgentSourceValue(Enum):
+ review = "review"
+ compact = "compact"
+ memory_consolidation = "memory_consolidation"
+
+
+class OtherSubAgentSource(BaseModel):
model_config = ConfigDict(
+ extra="forbid",
populate_by_name=True,
)
- pattern: str | None = None
- type: Annotated[
- Literal["find_in_page"],
- Field(title="FindInPageResponsesApiWebSearchActionType"),
- ]
- url: str | None = None
+ other: str
-class OtherResponsesApiWebSearchAction(BaseModel):
+class TerminalInteractionNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[
- Literal["other"], Field(title="OtherResponsesApiWebSearchActionType")
- ]
+ item_id: Annotated[str, Field(alias="itemId")]
+ process_id: Annotated[str, Field(alias="processId")]
+ stdin: str
+ thread_id: Annotated[str, Field(alias="threadId")]
+ turn_id: Annotated[str, Field(alias="turnId")]
-class ResponsesApiWebSearchAction(
- RootModel[
- SearchResponsesApiWebSearchAction
- | OpenPageResponsesApiWebSearchAction
- | FindInPageResponsesApiWebSearchAction
- | OtherResponsesApiWebSearchAction
- ]
-):
+class TextElement(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: (
- SearchResponsesApiWebSearchAction
- | OpenPageResponsesApiWebSearchAction
- | FindInPageResponsesApiWebSearchAction
- | OtherResponsesApiWebSearchAction
- )
+ byte_range: Annotated[
+ ByteRange,
+ Field(
+ alias="byteRange",
+ description="Byte range in the parent `text` buffer that this element occupies.",
+ ),
+ ]
+ placeholder: Annotated[
+ str | None,
+ Field(
+ description="Optional human-readable placeholder for the element, displayed in the UI."
+ ),
+ ] = None
-class OkResultOfCallToolResultOrString(BaseModel):
+class TextPosition(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- ok: Annotated[CallToolResult, Field(alias="Ok")]
+ column: Annotated[
+ int,
+ Field(description="1-based column number (in Unicode scalar values).", ge=0),
+ ]
+ line: Annotated[int, Field(description="1-based line number.", ge=0)]
-class ErrResultOfCallToolResultOrString(BaseModel):
+class TextRange(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- err: Annotated[str, Field(alias="Err")]
+ end: TextPosition
+ start: TextPosition
-class ResultOfCallToolResultOrString(
- RootModel[OkResultOfCallToolResultOrString | ErrResultOfCallToolResultOrString]
-):
+class ThreadActiveFlag(Enum):
+ waiting_on_approval = "waitingOnApproval"
+ waiting_on_user_input = "waitingOnUserInput"
+
+
+class ThreadArchiveParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: OkResultOfCallToolResultOrString | ErrResultOfCallToolResultOrString
+ thread_id: Annotated[str, Field(alias="threadId")]
-class ApprovedExecpolicyAmendment(BaseModel):
+class ThreadArchiveResponse(BaseModel):
+ pass
model_config = ConfigDict(
populate_by_name=True,
)
- proposed_execpolicy_amendment: list[str]
-class ApprovedExecpolicyAmendmentReviewDecision(BaseModel):
+class ThreadArchivedNotification(BaseModel):
model_config = ConfigDict(
- extra="forbid",
populate_by_name=True,
)
- approved_execpolicy_amendment: ApprovedExecpolicyAmendment
-
-
-class ReviewDelivery(Enum):
- inline = "inline"
- detached = "detached"
+ thread_id: Annotated[str, Field(alias="threadId")]
-class ReviewLineRange(BaseModel):
+class ThreadClosedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- end: Annotated[int, Field(ge=0)]
- start: Annotated[int, Field(ge=0)]
+ thread_id: Annotated[str, Field(alias="threadId")]
-class UncommittedChangesReviewTarget(BaseModel):
+class ThreadCompactStartParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[
- Literal["uncommittedChanges"], Field(title="UncommittedChangesReviewTargetType")
- ]
+ thread_id: Annotated[str, Field(alias="threadId")]
-class BaseBranchReviewTarget(BaseModel):
+class ThreadCompactStartResponse(BaseModel):
+ pass
model_config = ConfigDict(
populate_by_name=True,
)
- branch: str
- type: Annotated[Literal["baseBranch"], Field(title="BaseBranchReviewTargetType")]
-class CommitReviewTarget(BaseModel):
+class ThreadForkParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- sha: str
- title: Annotated[
- str | None,
+ approval_policy: Annotated[AskForApproval | None, Field(alias="approvalPolicy")] = (
+ None
+ )
+ approvals_reviewer: Annotated[
+ ApprovalsReviewer | None,
Field(
- description="Optional human-readable label (e.g., commit subject) for UIs."
+ alias="approvalsReviewer",
+ description="Override where approval requests are routed for review on this thread and subsequent turns.",
),
] = None
- type: Annotated[Literal["commit"], Field(title="CommitReviewTargetType")]
+ base_instructions: Annotated[str | None, Field(alias="baseInstructions")] = None
+ config: dict[str, Any] | None = None
+ cwd: str | None = None
+ developer_instructions: Annotated[
+ str | None, Field(alias="developerInstructions")
+ ] = None
+ ephemeral: bool | None = None
+ model: Annotated[
+ str | None,
+ Field(description="Configuration overrides for the forked thread, if any."),
+ ] = None
+ model_provider: Annotated[str | None, Field(alias="modelProvider")] = None
+ sandbox: SandboxMode | None = None
+ service_tier: Annotated[ServiceTier | None, Field(alias="serviceTier")] = None
+ thread_id: Annotated[str, Field(alias="threadId")]
-class CustomReviewTarget(BaseModel):
+class ThreadId(RootModel[str]):
model_config = ConfigDict(
populate_by_name=True,
)
- instructions: str
- type: Annotated[Literal["custom"], Field(title="CustomReviewTargetType")]
+ root: str
-class ReviewTarget(
- RootModel[
- UncommittedChangesReviewTarget
- | BaseBranchReviewTarget
- | CommitReviewTarget
- | CustomReviewTarget
- ]
-):
+class AgentMessageThreadItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: (
- UncommittedChangesReviewTarget
- | BaseBranchReviewTarget
- | CommitReviewTarget
- | CustomReviewTarget
- )
-
-
-class SandboxMode(Enum):
- read_only = "read-only"
- workspace_write = "workspace-write"
- danger_full_access = "danger-full-access"
+ id: str
+ phase: MessagePhase | None = None
+ text: str
+ type: Annotated[Literal["agentMessage"], Field(title="AgentMessageThreadItemType")]
-class DangerFullAccessSandboxPolicy(BaseModel):
+class PlanThreadItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[
- Literal["dangerFullAccess"], Field(title="DangerFullAccessSandboxPolicyType")
- ]
+ id: str
+ text: str
+ type: Annotated[Literal["plan"], Field(title="PlanThreadItemType")]
-class ReadOnlySandboxPolicy(BaseModel):
+class ReasoningThreadItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- access: Annotated[ReadOnlyAccess | None, Field()] = {"type": "fullAccess"}
- network_access: Annotated[bool | None, Field(alias="networkAccess")] = False
- type: Annotated[Literal["readOnly"], Field(title="ReadOnlySandboxPolicyType")]
+ content: list[str] | None = []
+ id: str
+ summary: list[str] | None = []
+ type: Annotated[Literal["reasoning"], Field(title="ReasoningThreadItemType")]
-class ExternalSandboxSandboxPolicy(BaseModel):
+class CommandExecutionThreadItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- network_access: Annotated[NetworkAccess | None, Field(alias="networkAccess")] = (
- "restricted"
- )
+ aggregated_output: Annotated[
+ str | None,
+ Field(
+ alias="aggregatedOutput",
+ description="The command's output, aggregated from stdout and stderr.",
+ ),
+ ] = None
+ command: Annotated[str, Field(description="The command to be executed.")]
+ command_actions: Annotated[
+ list[CommandAction],
+ Field(
+ alias="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.",
+ ),
+ ]
+ cwd: Annotated[str, Field(description="The command's working directory.")]
+ duration_ms: Annotated[
+ int | None,
+ Field(
+ alias="durationMs",
+ description="The duration of the command execution in milliseconds.",
+ ),
+ ] = None
+ exit_code: Annotated[
+ int | None, Field(alias="exitCode", description="The command's exit code.")
+ ] = None
+ id: str
+ process_id: Annotated[
+ str | None,
+ Field(
+ alias="processId",
+ description="Identifier for the underlying PTY process (when available).",
+ ),
+ ] = None
+ status: CommandExecutionStatus
type: Annotated[
- Literal["externalSandbox"], Field(title="ExternalSandboxSandboxPolicyType")
+ Literal["commandExecution"], Field(title="CommandExecutionThreadItemType")
]
-class WorkspaceWriteSandboxPolicy(BaseModel):
+class McpToolCallThreadItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- exclude_slash_tmp: Annotated[bool | None, Field(alias="excludeSlashTmp")] = False
- exclude_tmpdir_env_var: Annotated[
- bool | None, Field(alias="excludeTmpdirEnvVar")
- ] = False
- network_access: Annotated[bool | None, Field(alias="networkAccess")] = False
- read_only_access: Annotated[
- ReadOnlyAccess | None, Field(alias="readOnlyAccess")
- ] = {"type": "fullAccess"}
- type: Annotated[
- Literal["workspaceWrite"], Field(title="WorkspaceWriteSandboxPolicyType")
- ]
- writable_roots: Annotated[
- list[AbsolutePathBuf] | None, Field(alias="writableRoots")
- ] = []
+ arguments: Any
+ duration_ms: Annotated[
+ int | None,
+ Field(
+ alias="durationMs",
+ description="The duration of the MCP tool call in milliseconds.",
+ ),
+ ] = None
+ error: McpToolCallError | None = None
+ id: str
+ result: McpToolCallResult | None = None
+ server: str
+ status: McpToolCallStatus
+ tool: str
+ type: Annotated[Literal["mcpToolCall"], Field(title="McpToolCallThreadItemType")]
-class SandboxPolicy(
- RootModel[
- DangerFullAccessSandboxPolicy
- | ReadOnlySandboxPolicy
- | ExternalSandboxSandboxPolicy
- | WorkspaceWriteSandboxPolicy
- ]
-):
+class DynamicToolCallThreadItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: (
- DangerFullAccessSandboxPolicy
- | ReadOnlySandboxPolicy
- | ExternalSandboxSandboxPolicy
- | WorkspaceWriteSandboxPolicy
- )
+ arguments: Any
+ content_items: Annotated[
+ list[DynamicToolCallOutputContentItem] | None, Field(alias="contentItems")
+ ] = None
+ duration_ms: Annotated[
+ int | None,
+ Field(
+ alias="durationMs",
+ description="The duration of the dynamic tool call in milliseconds.",
+ ),
+ ] = None
+ id: str
+ status: DynamicToolCallStatus
+ success: bool | None = None
+ tool: str
+ type: Annotated[
+ Literal["dynamicToolCall"], Field(title="DynamicToolCallThreadItemType")
+ ]
-class SandboxWorkspaceWrite(BaseModel):
+class ImageViewThreadItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- exclude_slash_tmp: bool | None = False
- exclude_tmpdir_env_var: bool | None = False
- network_access: bool | None = False
- writable_roots: list[str] | None = []
+ id: str
+ path: str
+ type: Annotated[Literal["imageView"], Field(title="ImageViewThreadItemType")]
-class ItemAgentMessageDeltaServerNotification(BaseModel):
+class ImageGenerationThreadItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["item/agentMessage/delta"],
- Field(title="Item/agentMessage/deltaNotificationMethod"),
+ id: str
+ result: str
+ revised_prompt: Annotated[str | None, Field(alias="revisedPrompt")] = None
+ status: str
+ type: Annotated[
+ Literal["imageGeneration"], Field(title="ImageGenerationThreadItemType")
]
- params: AgentMessageDeltaNotification
-class ItemPlanDeltaServerNotification(BaseModel):
+class EnteredReviewModeThreadItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["item/plan/delta"], Field(title="Item/plan/deltaNotificationMethod")
+ id: str
+ review: str
+ type: Annotated[
+ Literal["enteredReviewMode"], Field(title="EnteredReviewModeThreadItemType")
]
- params: PlanDeltaNotification
-class ItemCommandExecutionOutputDeltaServerNotification(BaseModel):
+class ExitedReviewModeThreadItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["item/commandExecution/outputDelta"],
- Field(title="Item/commandExecution/outputDeltaNotificationMethod"),
+ id: str
+ review: str
+ type: Annotated[
+ Literal["exitedReviewMode"], Field(title="ExitedReviewModeThreadItemType")
]
- params: CommandExecutionOutputDeltaNotification
-class ItemFileChangeOutputDeltaServerNotification(BaseModel):
+class ContextCompactionThreadItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["item/fileChange/outputDelta"],
- Field(title="Item/fileChange/outputDeltaNotificationMethod"),
+ id: str
+ type: Annotated[
+ Literal["contextCompaction"], Field(title="ContextCompactionThreadItemType")
]
- params: FileChangeOutputDeltaNotification
-class ItemMcpToolCallProgressServerNotification(BaseModel):
+class ThreadLoadedListParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["item/mcpToolCall/progress"],
- Field(title="Item/mcpToolCall/progressNotificationMethod"),
- ]
- params: McpToolCallProgressNotification
+ cursor: Annotated[
+ str | None,
+ Field(description="Opaque pagination cursor returned by a previous call."),
+ ] = None
+ limit: Annotated[
+ int | None, Field(description="Optional page size; defaults to no limit.", ge=0)
+ ] = None
-class McpServerOauthLoginCompletedServerNotification(BaseModel):
+class ThreadLoadedListResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["mcpServer/oauthLogin/completed"],
- Field(title="McpServer/oauthLogin/completedNotificationMethod"),
+ data: Annotated[
+ list[str],
+ Field(description="Thread ids for sessions currently loaded in memory."),
]
- params: McpServerOauthLoginCompletedNotification
+ next_cursor: Annotated[
+ str | None,
+ Field(
+ alias="nextCursor",
+ description="Opaque cursor to pass to the next call to continue after the last item. if None, there are no more items to return.",
+ ),
+ ] = None
-class ItemReasoningSummaryTextDeltaServerNotification(BaseModel):
+class ThreadMetadataGitInfoUpdateParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["item/reasoning/summaryTextDelta"],
- Field(title="Item/reasoning/summaryTextDeltaNotificationMethod"),
- ]
- params: ReasoningSummaryTextDeltaNotification
+ branch: Annotated[
+ str | None,
+ Field(
+ description="Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it."
+ ),
+ ] = None
+ origin_url: Annotated[
+ str | None,
+ Field(
+ alias="originUrl",
+ description="Omit to leave the stored origin URL unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
+ ),
+ ] = None
+ sha: Annotated[
+ str | None,
+ Field(
+ description="Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it."
+ ),
+ ] = None
-class ItemReasoningSummaryPartAddedServerNotification(BaseModel):
+class ThreadMetadataUpdateParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["item/reasoning/summaryPartAdded"],
- Field(title="Item/reasoning/summaryPartAddedNotificationMethod"),
- ]
- params: ReasoningSummaryPartAddedNotification
+ git_info: Annotated[
+ ThreadMetadataGitInfoUpdateParams | None,
+ Field(
+ alias="gitInfo",
+ description="Patch the stored Git metadata for this thread. Omit a field to leave it unchanged, set it to `null` to clear it, or provide a string to replace the stored value.",
+ ),
+ ] = None
+ thread_id: Annotated[str, Field(alias="threadId")]
-class ItemReasoningTextDeltaServerNotification(BaseModel):
+class ThreadNameUpdatedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["item/reasoning/textDelta"],
- Field(title="Item/reasoning/textDeltaNotificationMethod"),
- ]
- params: ReasoningTextDeltaNotification
+ thread_id: Annotated[str, Field(alias="threadId")]
+ thread_name: Annotated[str | None, Field(alias="threadName")] = None
-class ThreadCompactedServerNotification(BaseModel):
+class ThreadReadParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["thread/compacted"], Field(title="Thread/compactedNotificationMethod")
- ]
- params: ContextCompactedNotification
+ include_turns: Annotated[
+ bool | None,
+ Field(
+ alias="includeTurns",
+ description="When true, include turns and their items from rollout history.",
+ ),
+ ] = False
+ thread_id: Annotated[str, Field(alias="threadId")]
-class ModelReroutedServerNotification(BaseModel):
+class ThreadRealtimeAudioChunk(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["model/rerouted"], Field(title="Model/reroutedNotificationMethod")
- ]
- params: ModelReroutedNotification
+ data: str
+ num_channels: Annotated[int, Field(alias="numChannels", ge=0)]
+ sample_rate: Annotated[int, Field(alias="sampleRate", ge=0)]
+ samples_per_channel: Annotated[
+ int | None, Field(alias="samplesPerChannel", ge=0)
+ ] = None
-class DeprecationNoticeServerNotification(BaseModel):
+class ThreadRealtimeClosedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["deprecationNotice"], Field(title="DeprecationNoticeNotificationMethod")
- ]
- params: DeprecationNoticeNotification
+ reason: str | None = None
+ thread_id: Annotated[str, Field(alias="threadId")]
-class FuzzyFileSearchSessionUpdatedServerNotification(BaseModel):
+class ThreadRealtimeErrorNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["fuzzyFileSearch/sessionUpdated"],
- Field(title="FuzzyFileSearch/sessionUpdatedNotificationMethod"),
- ]
- params: FuzzyFileSearchSessionUpdatedNotification
+ message: str
+ thread_id: Annotated[str, Field(alias="threadId")]
-class FuzzyFileSearchSessionCompletedServerNotification(BaseModel):
+class ThreadRealtimeItemAddedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["fuzzyFileSearch/sessionCompleted"],
- Field(title="FuzzyFileSearch/sessionCompletedNotificationMethod"),
- ]
- params: FuzzyFileSearchSessionCompletedNotification
+ item: Any
+ thread_id: Annotated[str, Field(alias="threadId")]
-class AccountLoginCompletedServerNotification(BaseModel):
+class ThreadRealtimeOutputAudioDeltaNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- method: Annotated[
- Literal["account/login/completed"],
- Field(title="Account/login/completedNotificationMethod"),
- ]
- params: AccountLoginCompletedNotification
+ audio: ThreadRealtimeAudioChunk
+ thread_id: Annotated[str, Field(alias="threadId")]
-class ServerRequestResolvedNotification(BaseModel):
+class ThreadRealtimeStartedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- request_id: Annotated[RequestId, Field(alias="requestId")]
+ session_id: Annotated[str | None, Field(alias="sessionId")] = None
thread_id: Annotated[str, Field(alias="threadId")]
-class ServiceTier(Enum):
- fast = "fast"
- flex = "flex"
-
-
-class SessionNetworkProxyRuntime(BaseModel):
+class ThreadResumeParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- http_addr: str
- socks_addr: str
-
-
-class SessionSourceValue(Enum):
- cli = "cli"
- vscode = "vscode"
- exec = "exec"
- app_server = "appServer"
- unknown = "unknown"
+ approval_policy: Annotated[AskForApproval | None, Field(alias="approvalPolicy")] = (
+ None
+ )
+ approvals_reviewer: Annotated[
+ ApprovalsReviewer | None,
+ Field(
+ alias="approvalsReviewer",
+ description="Override where approval requests are routed for review on this thread and subsequent turns.",
+ ),
+ ] = None
+ base_instructions: Annotated[str | None, Field(alias="baseInstructions")] = None
+ config: dict[str, Any] | None = None
+ cwd: str | None = None
+ developer_instructions: Annotated[
+ str | None, Field(alias="developerInstructions")
+ ] = None
+ model: Annotated[
+ str | None,
+ Field(description="Configuration overrides for the resumed thread, if any."),
+ ] = None
+ model_provider: Annotated[str | None, Field(alias="modelProvider")] = None
+ personality: Personality | None = None
+ sandbox: SandboxMode | None = None
+ service_tier: Annotated[ServiceTier | None, Field(alias="serviceTier")] = None
+ thread_id: Annotated[str, Field(alias="threadId")]
-class Settings(BaseModel):
+class ThreadRollbackParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- developer_instructions: str | None = None
- model: str
- reasoning_effort: ReasoningEffort | None = None
+ num_turns: Annotated[
+ int,
+ Field(
+ alias="numTurns",
+ description="The number of turns to drop from the end of the thread. Must be >= 1.\n\nThis only modifies the thread's history and does not revert local file changes that have been made by the agent. Clients are responsible for reverting these changes.",
+ ge=0,
+ ),
+ ]
+ thread_id: Annotated[str, Field(alias="threadId")]
-class SkillErrorInfo(BaseModel):
+class ThreadSetNameParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- message: str
- path: str
+ name: str
+ thread_id: Annotated[str, Field(alias="threadId")]
-class SkillInterface(BaseModel):
+class ThreadSetNameResponse(BaseModel):
+ pass
model_config = ConfigDict(
populate_by_name=True,
)
- brand_color: Annotated[str | None, Field(alias="brandColor")] = None
- default_prompt: Annotated[str | None, Field(alias="defaultPrompt")] = None
- display_name: Annotated[str | None, Field(alias="displayName")] = None
- icon_large: Annotated[str | None, Field(alias="iconLarge")] = None
- icon_small: Annotated[str | None, Field(alias="iconSmall")] = None
- short_description: Annotated[str | None, Field(alias="shortDescription")] = None
-class SkillScope(Enum):
- user = "user"
- repo = "repo"
- system = "system"
- admin = "admin"
+class ThreadSortKey(Enum):
+ created_at = "created_at"
+ updated_at = "updated_at"
-class SkillToolDependency(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- command: str | None = None
- description: str | None = None
- transport: str | None = None
- type: str
- url: str | None = None
- value: str
+class ThreadSourceKind(Enum):
+ cli = "cli"
+ vscode = "vscode"
+ exec = "exec"
+ app_server = "appServer"
+ sub_agent = "subAgent"
+ sub_agent_review = "subAgentReview"
+ sub_agent_compact = "subAgentCompact"
+ sub_agent_thread_spawn = "subAgentThreadSpawn"
+ sub_agent_other = "subAgentOther"
+ unknown = "unknown"
-class SkillsChangedNotification(BaseModel):
- pass
+class ThreadStartParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
+ approval_policy: Annotated[AskForApproval | None, Field(alias="approvalPolicy")] = (
+ None
+ )
+ approvals_reviewer: Annotated[
+ ApprovalsReviewer | None,
+ Field(
+ alias="approvalsReviewer",
+ description="Override where approval requests are routed for review on this thread and subsequent turns.",
+ ),
+ ] = None
+ base_instructions: Annotated[str | None, Field(alias="baseInstructions")] = None
+ config: dict[str, Any] | None = None
+ cwd: str | None = None
+ developer_instructions: Annotated[
+ str | None, Field(alias="developerInstructions")
+ ] = None
+ ephemeral: bool | None = None
+ model: str | None = None
+ model_provider: Annotated[str | None, Field(alias="modelProvider")] = None
+ personality: Personality | None = None
+ sandbox: SandboxMode | None = None
+ service_name: Annotated[str | None, Field(alias="serviceName")] = None
+ service_tier: Annotated[ServiceTier | None, Field(alias="serviceTier")] = None
-class SkillsConfigWriteParams(BaseModel):
+class NotLoadedThreadStatus(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- enabled: bool
- path: str
+ type: Annotated[Literal["notLoaded"], Field(title="NotLoadedThreadStatusType")]
-class SkillsConfigWriteResponse(BaseModel):
+class IdleThreadStatus(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- effective_enabled: Annotated[bool, Field(alias="effectiveEnabled")]
+ type: Annotated[Literal["idle"], Field(title="IdleThreadStatusType")]
-class SkillsListExtraRootsForCwd(BaseModel):
+class SystemErrorThreadStatus(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- cwd: str
- extra_user_roots: Annotated[list[str], Field(alias="extraUserRoots")]
+ type: Annotated[Literal["systemError"], Field(title="SystemErrorThreadStatusType")]
-class SkillsListParams(BaseModel):
+class ActiveThreadStatus(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- cwds: Annotated[
- list[str] | None,
- Field(
- description="When empty, defaults to the current session working directory."
- ),
- ] = None
- force_reload: Annotated[
- bool | None,
- Field(
- alias="forceReload",
- description="When true, bypass the skills cache and re-scan skills from disk.",
- ),
- ] = None
- per_cwd_extra_user_roots: Annotated[
- list[SkillsListExtraRootsForCwd] | None,
- Field(
- alias="perCwdExtraUserRoots",
- description="Optional per-cwd extra roots to scan as user-scoped skills.",
- ),
- ] = None
+ active_flags: Annotated[list[ThreadActiveFlag], Field(alias="activeFlags")]
+ type: Annotated[Literal["active"], Field(title="ActiveThreadStatusType")]
-class SkillsRemoteReadParams(BaseModel):
+class ThreadStatus(
+ RootModel[
+ NotLoadedThreadStatus
+ | IdleThreadStatus
+ | SystemErrorThreadStatus
+ | ActiveThreadStatus
+ ]
+):
model_config = ConfigDict(
populate_by_name=True,
)
- enabled: bool | None = False
- hazelnut_scope: Annotated[HazelnutScope | None, Field(alias="hazelnutScope")] = (
- "example"
- )
- product_surface: Annotated[ProductSurface | None, Field(alias="productSurface")] = (
- "codex"
+ root: (
+ NotLoadedThreadStatus
+ | IdleThreadStatus
+ | SystemErrorThreadStatus
+ | ActiveThreadStatus
)
-class SkillsRemoteReadResponse(BaseModel):
+class ThreadStatusChangedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- data: list[RemoteSkillSummary]
+ status: ThreadStatus
+ thread_id: Annotated[str, Field(alias="threadId")]
-class SkillsRemoteWriteParams(BaseModel):
+class ThreadUnarchiveParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- hazelnut_id: Annotated[str, Field(alias="hazelnutId")]
+ thread_id: Annotated[str, Field(alias="threadId")]
-class SkillsRemoteWriteResponse(BaseModel):
+class ThreadUnarchivedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- id: str
- path: str
+ thread_id: Annotated[str, Field(alias="threadId")]
-class StepStatus(Enum):
- pending = "pending"
- in_progress = "in_progress"
- completed = "completed"
+class ThreadUnsubscribeParams(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True,
+ )
+ thread_id: Annotated[str, Field(alias="threadId")]
-class SubAgentSourceValue(Enum):
- review = "review"
- compact = "compact"
- memory_consolidation = "memory_consolidation"
+class ThreadUnsubscribeStatus(Enum):
+ not_loaded = "notLoaded"
+ not_subscribed = "notSubscribed"
+ unsubscribed = "unsubscribed"
-class OtherSubAgentSource(BaseModel):
+class TokenUsageBreakdown(BaseModel):
model_config = ConfigDict(
- extra="forbid",
populate_by_name=True,
)
- other: str
+ cached_input_tokens: Annotated[int, Field(alias="cachedInputTokens")]
+ input_tokens: Annotated[int, Field(alias="inputTokens")]
+ output_tokens: Annotated[int, Field(alias="outputTokens")]
+ reasoning_output_tokens: Annotated[int, Field(alias="reasoningOutputTokens")]
+ total_tokens: Annotated[int, Field(alias="totalTokens")]
-class TerminalInteractionNotification(BaseModel):
+class Tool(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- item_id: Annotated[str, Field(alias="itemId")]
- process_id: Annotated[str, Field(alias="processId")]
- stdin: str
+ field_meta: Annotated[Any | None, Field(alias="_meta")] = None
+ annotations: Any | None = None
+ description: str | None = None
+ icons: list | None = None
+ input_schema: Annotated[Any, Field(alias="inputSchema")]
+ name: str
+ output_schema: Annotated[Any | None, Field(alias="outputSchema")] = None
+ title: str | None = None
+
+
+class TurnDiffUpdatedNotification(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True,
+ )
+ diff: str
thread_id: Annotated[str, Field(alias="threadId")]
turn_id: Annotated[str, Field(alias="turnId")]
-class TextElement(BaseModel):
+class TurnError(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- byte_range: Annotated[
- ByteRange,
- Field(
- alias="byteRange",
- description="Byte range in the parent `text` buffer that this element occupies.",
- ),
- ]
- placeholder: Annotated[
- str | None,
- Field(
- description="Optional human-readable placeholder for the element, displayed in the UI."
- ),
+ additional_details: Annotated[str | None, Field(alias="additionalDetails")] = None
+ codex_error_info: Annotated[
+ CodexErrorInfo | None, Field(alias="codexErrorInfo")
] = None
+ message: str
-class TextPosition(BaseModel):
+class TurnInterruptParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- column: Annotated[
- int,
- Field(description="1-based column number (in Unicode scalar values).", ge=0),
- ]
- line: Annotated[int, Field(description="1-based line number.", ge=0)]
+ thread_id: Annotated[str, Field(alias="threadId")]
+ turn_id: Annotated[str, Field(alias="turnId")]
-class TextRange(BaseModel):
+class TurnInterruptResponse(BaseModel):
+ pass
model_config = ConfigDict(
populate_by_name=True,
)
- end: TextPosition
- start: TextPosition
-class ThreadActiveFlag(Enum):
- waiting_on_approval = "waitingOnApproval"
- waiting_on_user_input = "waitingOnUserInput"
+class TurnPlanStepStatus(Enum):
+ pending = "pending"
+ in_progress = "inProgress"
+ completed = "completed"
-class ThreadArchiveParams(BaseModel):
+class TurnStatus(Enum):
+ completed = "completed"
+ interrupted = "interrupted"
+ failed = "failed"
+ in_progress = "inProgress"
+
+
+class TurnSteerResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- thread_id: Annotated[str, Field(alias="threadId")]
+ turn_id: Annotated[str, Field(alias="turnId")]
-class ThreadArchiveResponse(BaseModel):
- pass
+class TextUserInput(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
+ text: str
+ text_elements: Annotated[
+ list[TextElement] | None,
+ Field(
+ description="UI-defined spans within `text` used to render or persist special elements."
+ ),
+ ] = []
+ type: Annotated[Literal["text"], Field(title="TextUserInputType")]
-class ThreadArchivedNotification(BaseModel):
+class ImageUserInput(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- thread_id: Annotated[str, Field(alias="threadId")]
+ type: Annotated[Literal["image"], Field(title="ImageUserInputType")]
+ url: str
-class ThreadClosedNotification(BaseModel):
+class LocalImageUserInput(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- thread_id: Annotated[str, Field(alias="threadId")]
+ path: str
+ type: Annotated[Literal["localImage"], Field(title="LocalImageUserInputType")]
-class ThreadCompactStartParams(BaseModel):
+class SkillUserInput(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- thread_id: Annotated[str, Field(alias="threadId")]
+ name: str
+ path: str
+ type: Annotated[Literal["skill"], Field(title="SkillUserInputType")]
-class ThreadCompactStartResponse(BaseModel):
- pass
+class MentionUserInput(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
+ name: str
+ path: str
+ type: Annotated[Literal["mention"], Field(title="MentionUserInputType")]
-class ThreadForkParams(BaseModel):
+class UserInput(
+ RootModel[
+ TextUserInput
+ | ImageUserInput
+ | LocalImageUserInput
+ | SkillUserInput
+ | MentionUserInput
+ ]
+):
model_config = ConfigDict(
populate_by_name=True,
)
- approval_policy: Annotated[AskForApproval | None, Field(alias="approvalPolicy")] = (
- None
+ root: (
+ TextUserInput
+ | ImageUserInput
+ | LocalImageUserInput
+ | SkillUserInput
+ | MentionUserInput
)
- base_instructions: Annotated[str | None, Field(alias="baseInstructions")] = None
- config: dict[str, Any] | None = None
- cwd: str | None = None
- developer_instructions: Annotated[
- str | None, Field(alias="developerInstructions")
- ] = None
- ephemeral: bool | None = None
- model: Annotated[
- str | None,
- Field(description="Configuration overrides for the forked thread, if any."),
- ] = None
- model_provider: Annotated[str | None, Field(alias="modelProvider")] = None
- sandbox: SandboxMode | None = None
- service_tier: Annotated[ServiceTier | None, Field(alias="serviceTier")] = None
- thread_id: Annotated[str, Field(alias="threadId")]
-class ThreadId(RootModel[str]):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- root: str
+class Verbosity(Enum):
+ low = "low"
+ medium = "medium"
+ high = "high"
-class AgentMessageThreadItem(BaseModel):
+class SearchWebSearchAction(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- id: str
- phase: MessagePhase | None = None
- text: str
- type: Annotated[Literal["agentMessage"], Field(title="AgentMessageThreadItemType")]
+ queries: list[str] | None = None
+ query: str | None = None
+ type: Annotated[Literal["search"], Field(title="SearchWebSearchActionType")]
-class PlanThreadItem(BaseModel):
+class OpenPageWebSearchAction(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- id: str
- text: str
- type: Annotated[Literal["plan"], Field(title="PlanThreadItemType")]
+ type: Annotated[Literal["openPage"], Field(title="OpenPageWebSearchActionType")]
+ url: str | None = None
-class ReasoningThreadItem(BaseModel):
+class FindInPageWebSearchAction(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- content: list[str] | None = []
- id: str
- summary: list[str] | None = []
- type: Annotated[Literal["reasoning"], Field(title="ReasoningThreadItemType")]
+ pattern: str | None = None
+ type: Annotated[Literal["findInPage"], Field(title="FindInPageWebSearchActionType")]
+ url: str | None = None
-class CommandExecutionThreadItem(BaseModel):
+class OtherWebSearchAction(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- aggregated_output: Annotated[
- str | None,
- Field(
- alias="aggregatedOutput",
- description="The command's output, aggregated from stdout and stderr.",
- ),
- ] = None
- command: Annotated[str, Field(description="The command to be executed.")]
- command_actions: Annotated[
- list[CommandAction],
- Field(
- alias="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.",
- ),
- ]
- cwd: Annotated[str, Field(description="The command's working directory.")]
- duration_ms: Annotated[
- int | None,
- Field(
- alias="durationMs",
- description="The duration of the command execution in milliseconds.",
- ),
- ] = None
- exit_code: Annotated[
- int | None, Field(alias="exitCode", description="The command's exit code.")
- ] = None
- id: str
- process_id: Annotated[
- str | None,
- Field(
- alias="processId",
- description="Identifier for the underlying PTY process (when available).",
- ),
- ] = None
- status: CommandExecutionStatus
- type: Annotated[
- Literal["commandExecution"], Field(title="CommandExecutionThreadItemType")
- ]
+ type: Annotated[Literal["other"], Field(title="OtherWebSearchActionType")]
-class McpToolCallThreadItem(BaseModel):
+class WebSearchAction(
+ RootModel[
+ SearchWebSearchAction
+ | OpenPageWebSearchAction
+ | FindInPageWebSearchAction
+ | OtherWebSearchAction
+ ]
+):
model_config = ConfigDict(
populate_by_name=True,
)
- arguments: Any
- duration_ms: Annotated[
- int | None,
- Field(
- alias="durationMs",
- description="The duration of the MCP tool call in milliseconds.",
- ),
- ] = None
- error: McpToolCallError | None = None
- id: str
- result: McpToolCallResult | None = None
- server: str
- status: McpToolCallStatus
- tool: str
- type: Annotated[Literal["mcpToolCall"], Field(title="McpToolCallThreadItemType")]
+ root: (
+ SearchWebSearchAction
+ | OpenPageWebSearchAction
+ | FindInPageWebSearchAction
+ | OtherWebSearchAction
+ )
-class DynamicToolCallThreadItem(BaseModel):
+class WebSearchContextSize(Enum):
+ low = "low"
+ medium = "medium"
+ high = "high"
+
+
+class WebSearchLocation(BaseModel):
model_config = ConfigDict(
+ extra="forbid",
populate_by_name=True,
)
- arguments: Any
- content_items: Annotated[
- list[DynamicToolCallOutputContentItem] | None, Field(alias="contentItems")
- ] = None
- duration_ms: Annotated[
- int | None,
- Field(
- alias="durationMs",
- description="The duration of the dynamic tool call in milliseconds.",
- ),
- ] = None
- id: str
- status: DynamicToolCallStatus
- success: bool | None = None
- tool: str
- type: Annotated[
- Literal["dynamicToolCall"], Field(title="DynamicToolCallThreadItemType")
- ]
+ city: str | None = None
+ country: str | None = None
+ region: str | None = None
+ timezone: str | None = None
-class ImageViewThreadItem(BaseModel):
+class WebSearchMode(Enum):
+ disabled = "disabled"
+ cached = "cached"
+ live = "live"
+
+
+class WebSearchToolConfig(BaseModel):
model_config = ConfigDict(
+ extra="forbid",
populate_by_name=True,
)
- id: str
- path: str
- type: Annotated[Literal["imageView"], Field(title="ImageViewThreadItemType")]
+ allowed_domains: list[str] | None = None
+ context_size: WebSearchContextSize | None = None
+ location: WebSearchLocation | None = None
-class ImageGenerationThreadItem(BaseModel):
+class WindowsSandboxSetupMode(Enum):
+ elevated = "elevated"
+ unelevated = "unelevated"
+
+
+class WindowsSandboxSetupStartParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- id: str
- result: str
- revised_prompt: Annotated[str | None, Field(alias="revisedPrompt")] = None
- status: str
- type: Annotated[
- Literal["imageGeneration"], Field(title="ImageGenerationThreadItemType")
- ]
+ cwd: AbsolutePathBuf | None = None
+ mode: WindowsSandboxSetupMode
-class EnteredReviewModeThreadItem(BaseModel):
+class WindowsSandboxSetupStartResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- id: str
- review: str
- type: Annotated[
- Literal["enteredReviewMode"], Field(title="EnteredReviewModeThreadItemType")
- ]
+ started: bool
-class ExitedReviewModeThreadItem(BaseModel):
+class WindowsWorldWritableWarningNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- id: str
- review: str
- type: Annotated[
- Literal["exitedReviewMode"], Field(title="ExitedReviewModeThreadItemType")
- ]
+ extra_count: Annotated[int, Field(alias="extraCount", ge=0)]
+ failed_scan: Annotated[bool, Field(alias="failedScan")]
+ sample_paths: Annotated[list[str], Field(alias="samplePaths")]
-class ContextCompactionThreadItem(BaseModel):
+class WriteStatus(Enum):
+ ok = "ok"
+ ok_overridden = "okOverridden"
+
+
+class ChatgptAccount(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- id: str
- type: Annotated[
- Literal["contextCompaction"], Field(title="ContextCompactionThreadItemType")
- ]
+ email: str
+ plan_type: Annotated[PlanType, Field(alias="planType")]
+ type: Annotated[Literal["chatgpt"], Field(title="ChatgptAccountType")]
-class ThreadLoadedListParams(BaseModel):
+class Account(RootModel[ApiKeyAccount | ChatgptAccount]):
model_config = ConfigDict(
populate_by_name=True,
)
- cursor: Annotated[
- str | None,
- Field(description="Opaque pagination cursor returned by a previous call."),
- ] = None
- limit: Annotated[
- int | None, Field(description="Optional page size; defaults to no limit.", ge=0)
- ] = None
+ root: ApiKeyAccount | ChatgptAccount
-class ThreadLoadedListResponse(BaseModel):
+class AccountUpdatedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- data: Annotated[
- list[str],
- Field(description="Thread ids for sessions currently loaded in memory."),
- ]
- next_cursor: Annotated[
- str | None,
- Field(
- alias="nextCursor",
- description="Opaque cursor to pass to the next call to continue after the last item. if None, there are no more items to return.",
- ),
- ] = None
+ auth_mode: Annotated[AuthMode | None, Field(alias="authMode")] = None
+ plan_type: Annotated[PlanType | None, Field(alias="planType")] = None
-class ThreadMetadataGitInfoUpdateParams(BaseModel):
+class AppConfig(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- branch: Annotated[
- str | None,
- Field(
- description="Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it."
- ),
- ] = None
- origin_url: Annotated[
- str | None,
- Field(
- alias="originUrl",
- description="Omit to leave the stored origin URL unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
- ),
- ] = None
- sha: Annotated[
- str | None,
- Field(
- description="Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it."
- ),
- ] = None
+ default_tools_approval_mode: AppToolApproval | None = None
+ default_tools_enabled: bool | None = None
+ destructive_enabled: bool | None = None
+ enabled: bool | None = True
+ open_world_enabled: bool | None = None
+ tools: AppToolsConfig | None = None
-class ThreadMetadataUpdateParams(BaseModel):
+class AppMetadata(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- git_info: Annotated[
- ThreadMetadataGitInfoUpdateParams | None,
- Field(
- alias="gitInfo",
- description="Patch the stored Git metadata for this thread. Omit a field to leave it unchanged, set it to `null` to clear it, or provide a string to replace the stored value.",
- ),
+ categories: list[str] | None = None
+ developer: str | None = None
+ first_party_requires_install: Annotated[
+ bool | None, Field(alias="firstPartyRequiresInstall")
] = None
- thread_id: Annotated[str, Field(alias="threadId")]
+ first_party_type: Annotated[str | None, Field(alias="firstPartyType")] = None
+ review: AppReview | None = None
+ screenshots: list[AppScreenshot] | None = None
+ seo_description: Annotated[str | None, Field(alias="seoDescription")] = None
+ show_in_composer_when_unlinked: Annotated[
+ bool | None, Field(alias="showInComposerWhenUnlinked")
+ ] = None
+ sub_categories: Annotated[list[str] | None, Field(alias="subCategories")] = None
+ version: str | None = None
+ version_id: Annotated[str | None, Field(alias="versionId")] = None
+ version_notes: Annotated[str | None, Field(alias="versionNotes")] = None
-class ThreadNameUpdatedNotification(BaseModel):
+class AppsConfig(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- thread_id: Annotated[str, Field(alias="threadId")]
- thread_name: Annotated[str | None, Field(alias="threadName")] = None
+ field_default: Annotated[AppsDefaultConfig | None, Field(alias="_default")] = None
-class ThreadReadParams(BaseModel):
+class CancelLoginAccountResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- include_turns: Annotated[
- bool | None,
- Field(
- alias="includeTurns",
- description="When true, include turns and their items from rollout history.",
- ),
- ] = False
- thread_id: Annotated[str, Field(alias="threadId")]
+ status: CancelLoginAccountStatus
-class ThreadRealtimeAudioChunk(BaseModel):
+class InitializeRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- data: str
- num_channels: Annotated[int, Field(alias="numChannels", ge=0)]
- sample_rate: Annotated[int, Field(alias="sampleRate", ge=0)]
- samples_per_channel: Annotated[
- int | None, Field(alias="samplesPerChannel", ge=0)
- ] = None
+ id: RequestId
+ method: Annotated[Literal["initialize"], Field(title="InitializeRequestMethod")]
+ params: InitializeParams
-class ThreadRealtimeClosedNotification(BaseModel):
+class ThreadStartRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- reason: str | None = None
- thread_id: Annotated[str, Field(alias="threadId")]
+ id: RequestId
+ method: Annotated[Literal["thread/start"], Field(title="Thread/startRequestMethod")]
+ params: ThreadStartParams
-class ThreadRealtimeErrorNotification(BaseModel):
+class ThreadResumeRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- message: str
- thread_id: Annotated[str, Field(alias="threadId")]
+ id: RequestId
+ method: Annotated[
+ Literal["thread/resume"], Field(title="Thread/resumeRequestMethod")
+ ]
+ params: ThreadResumeParams
-class ThreadRealtimeItemAddedNotification(BaseModel):
+class ThreadForkRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- item: Any
- thread_id: Annotated[str, Field(alias="threadId")]
+ id: RequestId
+ method: Annotated[Literal["thread/fork"], Field(title="Thread/forkRequestMethod")]
+ params: ThreadForkParams
-class ThreadRealtimeOutputAudioDeltaNotification(BaseModel):
+class ThreadArchiveRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- audio: ThreadRealtimeAudioChunk
- thread_id: Annotated[str, Field(alias="threadId")]
+ id: RequestId
+ method: Annotated[
+ Literal["thread/archive"], Field(title="Thread/archiveRequestMethod")
+ ]
+ params: ThreadArchiveParams
-class ThreadRealtimeStartedNotification(BaseModel):
+class ThreadUnsubscribeRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- session_id: Annotated[str | None, Field(alias="sessionId")] = None
- thread_id: Annotated[str, Field(alias="threadId")]
+ id: RequestId
+ method: Annotated[
+ Literal["thread/unsubscribe"], Field(title="Thread/unsubscribeRequestMethod")
+ ]
+ params: ThreadUnsubscribeParams
-class ThreadResumeParams(BaseModel):
+class ThreadNameSetRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- approval_policy: Annotated[AskForApproval | None, Field(alias="approvalPolicy")] = (
- None
- )
- base_instructions: Annotated[str | None, Field(alias="baseInstructions")] = None
- config: dict[str, Any] | None = None
- cwd: str | None = None
- developer_instructions: Annotated[
- str | None, Field(alias="developerInstructions")
- ] = None
- model: Annotated[
- str | None,
- Field(description="Configuration overrides for the resumed thread, if any."),
- ] = None
- model_provider: Annotated[str | None, Field(alias="modelProvider")] = None
- personality: Personality | None = None
- sandbox: SandboxMode | None = None
- service_tier: Annotated[ServiceTier | None, Field(alias="serviceTier")] = None
- thread_id: Annotated[str, Field(alias="threadId")]
+ id: RequestId
+ method: Annotated[
+ Literal["thread/name/set"], Field(title="Thread/name/setRequestMethod")
+ ]
+ params: ThreadSetNameParams
-class ThreadRollbackParams(BaseModel):
+class ThreadMetadataUpdateRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- num_turns: Annotated[
- int,
- Field(
- alias="numTurns",
- description="The number of turns to drop from the end of the thread. Must be >= 1.\n\nThis only modifies the thread's history and does not revert local file changes that have been made by the agent. Clients are responsible for reverting these changes.",
- ge=0,
- ),
+ id: RequestId
+ method: Annotated[
+ Literal["thread/metadata/update"],
+ Field(title="Thread/metadata/updateRequestMethod"),
]
- thread_id: Annotated[str, Field(alias="threadId")]
+ params: ThreadMetadataUpdateParams
-class ThreadSetNameParams(BaseModel):
+class ThreadUnarchiveRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- name: str
- thread_id: Annotated[str, Field(alias="threadId")]
+ id: RequestId
+ method: Annotated[
+ Literal["thread/unarchive"], Field(title="Thread/unarchiveRequestMethod")
+ ]
+ params: ThreadUnarchiveParams
-class ThreadSetNameResponse(BaseModel):
- pass
+class ThreadCompactStartRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
+ id: RequestId
+ method: Annotated[
+ Literal["thread/compact/start"],
+ Field(title="Thread/compact/startRequestMethod"),
+ ]
+ params: ThreadCompactStartParams
-class ThreadSortKey(Enum):
- created_at = "created_at"
- updated_at = "updated_at"
-
-
-class ThreadSourceKind(Enum):
- cli = "cli"
- vscode = "vscode"
- exec = "exec"
- app_server = "appServer"
- sub_agent = "subAgent"
- sub_agent_review = "subAgentReview"
- sub_agent_compact = "subAgentCompact"
- sub_agent_thread_spawn = "subAgentThreadSpawn"
- sub_agent_other = "subAgentOther"
- unknown = "unknown"
-
-
-class ThreadStartParams(BaseModel):
+class ThreadRollbackRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- approval_policy: Annotated[AskForApproval | None, Field(alias="approvalPolicy")] = (
- None
- )
- base_instructions: Annotated[str | None, Field(alias="baseInstructions")] = None
- config: dict[str, Any] | None = None
- cwd: str | None = None
- developer_instructions: Annotated[
- str | None, Field(alias="developerInstructions")
- ] = None
- ephemeral: bool | None = None
- model: str | None = None
- model_provider: Annotated[str | None, Field(alias="modelProvider")] = None
- personality: Personality | None = None
- sandbox: SandboxMode | None = None
- service_name: Annotated[str | None, Field(alias="serviceName")] = None
- service_tier: Annotated[ServiceTier | None, Field(alias="serviceTier")] = None
+ id: RequestId
+ method: Annotated[
+ Literal["thread/rollback"], Field(title="Thread/rollbackRequestMethod")
+ ]
+ params: ThreadRollbackParams
-class NotLoadedThreadStatus(BaseModel):
+class ThreadLoadedListRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[Literal["notLoaded"], Field(title="NotLoadedThreadStatusType")]
+ id: RequestId
+ method: Annotated[
+ Literal["thread/loaded/list"], Field(title="Thread/loaded/listRequestMethod")
+ ]
+ params: ThreadLoadedListParams
-class IdleThreadStatus(BaseModel):
+class ThreadReadRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[Literal["idle"], Field(title="IdleThreadStatusType")]
+ id: RequestId
+ method: Annotated[Literal["thread/read"], Field(title="Thread/readRequestMethod")]
+ params: ThreadReadParams
-class SystemErrorThreadStatus(BaseModel):
+class SkillsListRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[Literal["systemError"], Field(title="SystemErrorThreadStatusType")]
+ id: RequestId
+ method: Annotated[Literal["skills/list"], Field(title="Skills/listRequestMethod")]
+ params: SkillsListParams
-class ActiveThreadStatus(BaseModel):
+class PluginListRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- active_flags: Annotated[list[ThreadActiveFlag], Field(alias="activeFlags")]
- type: Annotated[Literal["active"], Field(title="ActiveThreadStatusType")]
+ id: RequestId
+ method: Annotated[Literal["plugin/list"], Field(title="Plugin/listRequestMethod")]
+ params: PluginListParams
-class ThreadStatus(
- RootModel[
- NotLoadedThreadStatus
- | IdleThreadStatus
- | SystemErrorThreadStatus
- | ActiveThreadStatus
- ]
-):
+class PluginReadRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: (
- NotLoadedThreadStatus
- | IdleThreadStatus
- | SystemErrorThreadStatus
- | ActiveThreadStatus
- )
+ id: RequestId
+ method: Annotated[Literal["plugin/read"], Field(title="Plugin/readRequestMethod")]
+ params: PluginReadParams
-class ThreadStatusChangedNotification(BaseModel):
+class SkillsRemoteListRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- status: ThreadStatus
- thread_id: Annotated[str, Field(alias="threadId")]
+ id: RequestId
+ method: Annotated[
+ Literal["skills/remote/list"], Field(title="Skills/remote/listRequestMethod")
+ ]
+ params: SkillsRemoteReadParams
-class ThreadUnarchiveParams(BaseModel):
+class SkillsRemoteExportRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- thread_id: Annotated[str, Field(alias="threadId")]
+ id: RequestId
+ method: Annotated[
+ Literal["skills/remote/export"],
+ Field(title="Skills/remote/exportRequestMethod"),
+ ]
+ params: SkillsRemoteWriteParams
-class ThreadUnarchivedNotification(BaseModel):
+class AppListRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- thread_id: Annotated[str, Field(alias="threadId")]
+ id: RequestId
+ method: Annotated[Literal["app/list"], Field(title="App/listRequestMethod")]
+ params: AppsListParams
-class ThreadUnsubscribeParams(BaseModel):
+class FsReadFileRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- thread_id: Annotated[str, Field(alias="threadId")]
-
-
-class ThreadUnsubscribeStatus(Enum):
- not_loaded = "notLoaded"
- not_subscribed = "notSubscribed"
- unsubscribed = "unsubscribed"
+ id: RequestId
+ method: Annotated[Literal["fs/readFile"], Field(title="Fs/readFileRequestMethod")]
+ params: FsReadFileParams
-class TokenUsage(BaseModel):
+class FsWriteFileRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- cached_input_tokens: int
- input_tokens: int
- output_tokens: int
- reasoning_output_tokens: int
- total_tokens: int
+ id: RequestId
+ method: Annotated[Literal["fs/writeFile"], Field(title="Fs/writeFileRequestMethod")]
+ params: FsWriteFileParams
-class TokenUsageBreakdown(BaseModel):
+class FsCreateDirectoryRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- cached_input_tokens: Annotated[int, Field(alias="cachedInputTokens")]
- input_tokens: Annotated[int, Field(alias="inputTokens")]
- output_tokens: Annotated[int, Field(alias="outputTokens")]
- reasoning_output_tokens: Annotated[int, Field(alias="reasoningOutputTokens")]
- total_tokens: Annotated[int, Field(alias="totalTokens")]
+ id: RequestId
+ method: Annotated[
+ Literal["fs/createDirectory"], Field(title="Fs/createDirectoryRequestMethod")
+ ]
+ params: FsCreateDirectoryParams
-class TokenUsageInfo(BaseModel):
+class FsGetMetadataRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- last_token_usage: TokenUsage
- model_context_window: int | None = None
- total_token_usage: TokenUsage
+ id: RequestId
+ method: Annotated[
+ Literal["fs/getMetadata"], Field(title="Fs/getMetadataRequestMethod")
+ ]
+ params: FsGetMetadataParams
-class Tool(BaseModel):
+class FsReadDirectoryRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- field_meta: Annotated[Any | None, Field(alias="_meta")] = None
- annotations: Any | None = None
- description: str | None = None
- icons: list | None = None
- input_schema: Annotated[Any, Field(alias="inputSchema")]
- name: str
- output_schema: Annotated[Any | None, Field(alias="outputSchema")] = None
- title: str | None = None
-
-
-class TurnAbortReason(Enum):
- interrupted = "interrupted"
- replaced = "replaced"
- review_ended = "review_ended"
+ id: RequestId
+ method: Annotated[
+ Literal["fs/readDirectory"], Field(title="Fs/readDirectoryRequestMethod")
+ ]
+ params: FsReadDirectoryParams
-class TurnDiffUpdatedNotification(BaseModel):
+class FsRemoveRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- diff: str
- thread_id: Annotated[str, Field(alias="threadId")]
- turn_id: Annotated[str, Field(alias="turnId")]
+ id: RequestId
+ method: Annotated[Literal["fs/remove"], Field(title="Fs/removeRequestMethod")]
+ params: FsRemoveParams
-class TurnError(BaseModel):
+class FsCopyRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- additional_details: Annotated[str | None, Field(alias="additionalDetails")] = None
- codex_error_info: Annotated[
- CodexErrorInfo | None, Field(alias="codexErrorInfo")
- ] = None
- message: str
+ id: RequestId
+ method: Annotated[Literal["fs/copy"], Field(title="Fs/copyRequestMethod")]
+ params: FsCopyParams
-class TurnInterruptParams(BaseModel):
+class SkillsConfigWriteRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- thread_id: Annotated[str, Field(alias="threadId")]
- turn_id: Annotated[str, Field(alias="turnId")]
+ id: RequestId
+ method: Annotated[
+ Literal["skills/config/write"], Field(title="Skills/config/writeRequestMethod")
+ ]
+ params: SkillsConfigWriteParams
-class TurnInterruptResponse(BaseModel):
- pass
+class PluginInstallRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
+ id: RequestId
+ method: Annotated[
+ Literal["plugin/install"], Field(title="Plugin/installRequestMethod")
+ ]
+ params: PluginInstallParams
-class AgentMessageTurnItem(BaseModel):
+class PluginUninstallRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- content: list[AgentMessageContent]
- id: str
- phase: Annotated[
- MessagePhase | None,
- Field(
- description="Optional phase metadata carried through from `ResponseItem::Message`.\n\nThis is currently used by TUI rendering to distinguish mid-turn commentary from a final answer and avoid status-indicator jitter."
- ),
- ] = None
- type: Annotated[Literal["AgentMessage"], Field(title="AgentMessageTurnItemType")]
+ id: RequestId
+ method: Annotated[
+ Literal["plugin/uninstall"], Field(title="Plugin/uninstallRequestMethod")
+ ]
+ params: PluginUninstallParams
-class PlanTurnItem(BaseModel):
+class TurnInterruptRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- id: str
- text: str
- type: Annotated[Literal["Plan"], Field(title="PlanTurnItemType")]
+ id: RequestId
+ method: Annotated[
+ Literal["turn/interrupt"], Field(title="Turn/interruptRequestMethod")
+ ]
+ params: TurnInterruptParams
-class ReasoningTurnItem(BaseModel):
+class ModelListRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- id: str
- raw_content: list[str] | None = []
- summary_text: list[str]
- type: Annotated[Literal["Reasoning"], Field(title="ReasoningTurnItemType")]
+ id: RequestId
+ method: Annotated[Literal["model/list"], Field(title="Model/listRequestMethod")]
+ params: ModelListParams
-class WebSearchTurnItem(BaseModel):
+class ExperimentalFeatureListRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- action: ResponsesApiWebSearchAction
- id: str
- query: str
- type: Annotated[Literal["WebSearch"], Field(title="WebSearchTurnItemType")]
-
-
-class ImageGenerationTurnItem(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: str
- result: str
- revised_prompt: str | None = None
- saved_path: str | None = None
- status: str
- type: Annotated[
- Literal["ImageGeneration"], Field(title="ImageGenerationTurnItemType")
+ id: RequestId
+ method: Annotated[
+ Literal["experimentalFeature/list"],
+ Field(title="ExperimentalFeature/listRequestMethod"),
]
+ params: ExperimentalFeatureListParams
-class ContextCompactionTurnItem(BaseModel):
+class McpServerOauthLoginRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- id: str
- type: Annotated[
- Literal["ContextCompaction"], Field(title="ContextCompactionTurnItemType")
+ id: RequestId
+ method: Annotated[
+ Literal["mcpServer/oauth/login"],
+ Field(title="McpServer/oauth/loginRequestMethod"),
]
+ params: McpServerOauthLoginParams
-class TurnPlanStepStatus(Enum):
- pending = "pending"
- in_progress = "inProgress"
- completed = "completed"
-
-
-class TurnStatus(Enum):
- completed = "completed"
- interrupted = "interrupted"
- failed = "failed"
- in_progress = "inProgress"
-
-
-class TurnSteerResponse(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- turn_id: Annotated[str, Field(alias="turnId")]
-
-
-class TextUserInput(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- text: str
- text_elements: Annotated[
- list[TextElement] | None,
- Field(
- description="UI-defined spans within `text` used to render or persist special elements."
- ),
- ] = []
- type: Annotated[Literal["text"], Field(title="TextUserInputType")]
-
-
-class ImageUserInput(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- type: Annotated[Literal["image"], Field(title="ImageUserInputType")]
- url: str
-
-
-class LocalImageUserInput(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- path: str
- type: Annotated[Literal["localImage"], Field(title="LocalImageUserInputType")]
-
-
-class SkillUserInput(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- name: str
- path: str
- type: Annotated[Literal["skill"], Field(title="SkillUserInputType")]
-
-
-class MentionUserInput(BaseModel):
+class ConfigMcpServerReloadRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- name: str
- path: str
- type: Annotated[Literal["mention"], Field(title="MentionUserInputType")]
-
-
-class UserInput(
- RootModel[
- TextUserInput
- | ImageUserInput
- | LocalImageUserInput
- | SkillUserInput
- | MentionUserInput
+ id: RequestId
+ method: Annotated[
+ Literal["config/mcpServer/reload"],
+ Field(title="Config/mcpServer/reloadRequestMethod"),
]
-):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- root: (
- TextUserInput
- | ImageUserInput
- | LocalImageUserInput
- | SkillUserInput
- | MentionUserInput
- )
-
-
-class Verbosity(Enum):
- low = "low"
- medium = "medium"
- high = "high"
-
-
-class SearchWebSearchAction(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- queries: list[str] | None = None
- query: str | None = None
- type: Annotated[Literal["search"], Field(title="SearchWebSearchActionType")]
-
-
-class OpenPageWebSearchAction(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- type: Annotated[Literal["openPage"], Field(title="OpenPageWebSearchActionType")]
- url: str | None = None
+ params: None = None
-class FindInPageWebSearchAction(BaseModel):
+class McpServerStatusListRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- pattern: str | None = None
- type: Annotated[Literal["findInPage"], Field(title="FindInPageWebSearchActionType")]
- url: str | None = None
+ id: RequestId
+ method: Annotated[
+ Literal["mcpServerStatus/list"],
+ Field(title="McpServerStatus/listRequestMethod"),
+ ]
+ params: ListMcpServerStatusParams
-class OtherWebSearchAction(BaseModel):
+class WindowsSandboxSetupStartRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- type: Annotated[Literal["other"], Field(title="OtherWebSearchActionType")]
-
-
-class WebSearchAction(
- RootModel[
- SearchWebSearchAction
- | OpenPageWebSearchAction
- | FindInPageWebSearchAction
- | OtherWebSearchAction
+ id: RequestId
+ method: Annotated[
+ Literal["windowsSandbox/setupStart"],
+ Field(title="WindowsSandbox/setupStartRequestMethod"),
]
-):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- root: (
- SearchWebSearchAction
- | OpenPageWebSearchAction
- | FindInPageWebSearchAction
- | OtherWebSearchAction
- )
-
-
-class WebSearchContextSize(Enum):
- low = "low"
- medium = "medium"
- high = "high"
+ params: WindowsSandboxSetupStartParams
-class WebSearchLocation(BaseModel):
+class AccountLoginStartRequest(BaseModel):
model_config = ConfigDict(
- extra="forbid",
populate_by_name=True,
)
- city: str | None = None
- country: str | None = None
- region: str | None = None
- timezone: str | None = None
-
-
-class WebSearchMode(Enum):
- disabled = "disabled"
- cached = "cached"
- live = "live"
+ id: RequestId
+ method: Annotated[
+ Literal["account/login/start"], Field(title="Account/login/startRequestMethod")
+ ]
+ params: LoginAccountParams
-class WebSearchToolConfig(BaseModel):
+class AccountLoginCancelRequest(BaseModel):
model_config = ConfigDict(
- extra="forbid",
populate_by_name=True,
)
- allowed_domains: list[str] | None = None
- context_size: WebSearchContextSize | None = None
- location: WebSearchLocation | None = None
-
-
-class WindowsSandboxSetupMode(Enum):
- elevated = "elevated"
- unelevated = "unelevated"
+ id: RequestId
+ method: Annotated[
+ Literal["account/login/cancel"],
+ Field(title="Account/login/cancelRequestMethod"),
+ ]
+ params: CancelLoginAccountParams
-class WindowsSandboxSetupStartParams(BaseModel):
+class AccountLogoutRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- cwd: AbsolutePathBuf | None = None
- mode: WindowsSandboxSetupMode
+ id: RequestId
+ method: Annotated[
+ Literal["account/logout"], Field(title="Account/logoutRequestMethod")
+ ]
+ params: None = None
-class WindowsSandboxSetupStartResponse(BaseModel):
+class AccountRateLimitsReadRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- started: bool
+ id: RequestId
+ method: Annotated[
+ Literal["account/rateLimits/read"],
+ Field(title="Account/rateLimits/readRequestMethod"),
+ ]
+ params: None = None
-class WindowsWorldWritableWarningNotification(BaseModel):
+class FeedbackUploadRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- extra_count: Annotated[int, Field(alias="extraCount", ge=0)]
- failed_scan: Annotated[bool, Field(alias="failedScan")]
- sample_paths: Annotated[list[str], Field(alias="samplePaths")]
-
-
-class WriteStatus(Enum):
- ok = "ok"
- ok_overridden = "okOverridden"
+ id: RequestId
+ method: Annotated[
+ Literal["feedback/upload"], Field(title="Feedback/uploadRequestMethod")
+ ]
+ params: FeedbackUploadParams
-class ChatgptAccount(BaseModel):
+class CommandExecWriteRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- email: str
- plan_type: Annotated[PlanType, Field(alias="planType")]
- type: Annotated[Literal["chatgpt"], Field(title="ChatgptAccountType")]
+ id: RequestId
+ method: Annotated[
+ Literal["command/exec/write"], Field(title="Command/exec/writeRequestMethod")
+ ]
+ params: CommandExecWriteParams
-class Account(RootModel[ApiKeyAccount | ChatgptAccount]):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- root: ApiKeyAccount | ChatgptAccount
-
-
-class AccountUpdatedNotification(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- auth_mode: Annotated[AuthMode | None, Field(alias="authMode")] = None
- plan_type: Annotated[PlanType | None, Field(alias="planType")] = None
-
-
-class AppConfig(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- default_tools_approval_mode: AppToolApproval | None = None
- default_tools_enabled: bool | None = None
- destructive_enabled: bool | None = None
- enabled: bool | None = True
- open_world_enabled: bool | None = None
- tools: AppToolsConfig | None = None
-
-
-class AppMetadata(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- categories: list[str] | None = None
- developer: str | None = None
- first_party_requires_install: Annotated[
- bool | None, Field(alias="firstPartyRequiresInstall")
- ] = None
- first_party_type: Annotated[str | None, Field(alias="firstPartyType")] = None
- review: AppReview | None = None
- screenshots: list[AppScreenshot] | None = None
- seo_description: Annotated[str | None, Field(alias="seoDescription")] = None
- show_in_composer_when_unlinked: Annotated[
- bool | None, Field(alias="showInComposerWhenUnlinked")
- ] = None
- sub_categories: Annotated[list[str] | None, Field(alias="subCategories")] = None
- version: str | None = None
- version_id: Annotated[str | None, Field(alias="versionId")] = None
- version_notes: Annotated[str | None, Field(alias="versionNotes")] = None
-
-
-class AppsConfig(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- field_default: Annotated[AppsDefaultConfig | None, Field(alias="_default")] = None
-
-
-class CancelLoginAccountResponse(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- status: CancelLoginAccountStatus
-
-
-class InitializeRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[Literal["initialize"], Field(title="InitializeRequestMethod")]
- params: InitializeParams
-
-
-class ThreadStartRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[Literal["thread/start"], Field(title="Thread/startRequestMethod")]
- params: ThreadStartParams
-
-
-class ThreadResumeRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["thread/resume"], Field(title="Thread/resumeRequestMethod")
- ]
- params: ThreadResumeParams
-
-
-class ThreadForkRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[Literal["thread/fork"], Field(title="Thread/forkRequestMethod")]
- params: ThreadForkParams
-
-
-class ThreadArchiveRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["thread/archive"], Field(title="Thread/archiveRequestMethod")
- ]
- params: ThreadArchiveParams
-
-
-class ThreadUnsubscribeRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["thread/unsubscribe"], Field(title="Thread/unsubscribeRequestMethod")
- ]
- params: ThreadUnsubscribeParams
-
-
-class ThreadNameSetRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["thread/name/set"], Field(title="Thread/name/setRequestMethod")
- ]
- params: ThreadSetNameParams
-
-
-class ThreadMetadataUpdateRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["thread/metadata/update"],
- Field(title="Thread/metadata/updateRequestMethod"),
- ]
- params: ThreadMetadataUpdateParams
-
-
-class ThreadUnarchiveRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["thread/unarchive"], Field(title="Thread/unarchiveRequestMethod")
- ]
- params: ThreadUnarchiveParams
-
-
-class ThreadCompactStartRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["thread/compact/start"],
- Field(title="Thread/compact/startRequestMethod"),
- ]
- params: ThreadCompactStartParams
-
-
-class ThreadRollbackRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["thread/rollback"], Field(title="Thread/rollbackRequestMethod")
- ]
- params: ThreadRollbackParams
-
-
-class ThreadLoadedListRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["thread/loaded/list"], Field(title="Thread/loaded/listRequestMethod")
- ]
- params: ThreadLoadedListParams
-
-
-class ThreadReadRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[Literal["thread/read"], Field(title="Thread/readRequestMethod")]
- params: ThreadReadParams
-
-
-class SkillsListRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[Literal["skills/list"], Field(title="Skills/listRequestMethod")]
- params: SkillsListParams
-
-
-class PluginListRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[Literal["plugin/list"], Field(title="Plugin/listRequestMethod")]
- params: PluginListParams
-
-
-class SkillsRemoteListRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["skills/remote/list"], Field(title="Skills/remote/listRequestMethod")
- ]
- params: SkillsRemoteReadParams
-
-
-class SkillsRemoteExportRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["skills/remote/export"],
- Field(title="Skills/remote/exportRequestMethod"),
- ]
- params: SkillsRemoteWriteParams
-
-
-class AppListRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[Literal["app/list"], Field(title="App/listRequestMethod")]
- params: AppsListParams
-
-
-class SkillsConfigWriteRequest(BaseModel):
+class CommandExecTerminateRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
id: RequestId
method: Annotated[
- Literal["skills/config/write"], Field(title="Skills/config/writeRequestMethod")
- ]
- params: SkillsConfigWriteParams
-
-
-class PluginInstallRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["plugin/install"], Field(title="Plugin/installRequestMethod")
- ]
- params: PluginInstallParams
-
-
-class PluginUninstallRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["plugin/uninstall"], Field(title="Plugin/uninstallRequestMethod")
- ]
- params: PluginUninstallParams
-
-
-class TurnInterruptRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["turn/interrupt"], Field(title="Turn/interruptRequestMethod")
- ]
- params: TurnInterruptParams
-
-
-class ModelListRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[Literal["model/list"], Field(title="Model/listRequestMethod")]
- params: ModelListParams
-
-
-class ExperimentalFeatureListRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["experimentalFeature/list"],
- Field(title="ExperimentalFeature/listRequestMethod"),
- ]
- params: ExperimentalFeatureListParams
-
-
-class McpServerOauthLoginRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["mcpServer/oauth/login"],
- Field(title="McpServer/oauth/loginRequestMethod"),
- ]
- params: McpServerOauthLoginParams
-
-
-class ConfigMcpServerReloadRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["config/mcpServer/reload"],
- Field(title="Config/mcpServer/reloadRequestMethod"),
- ]
- params: None = None
-
-
-class McpServerStatusListRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["mcpServerStatus/list"],
- Field(title="McpServerStatus/listRequestMethod"),
- ]
- params: ListMcpServerStatusParams
-
-
-class WindowsSandboxSetupStartRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["windowsSandbox/setupStart"],
- Field(title="WindowsSandbox/setupStartRequestMethod"),
- ]
- params: WindowsSandboxSetupStartParams
-
-
-class AccountLoginStartRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["account/login/start"], Field(title="Account/login/startRequestMethod")
- ]
- params: LoginAccountParams
-
-
-class AccountLoginCancelRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["account/login/cancel"],
- Field(title="Account/login/cancelRequestMethod"),
- ]
- params: CancelLoginAccountParams
-
-
-class AccountLogoutRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["account/logout"], Field(title="Account/logoutRequestMethod")
- ]
- params: None = None
-
-
-class AccountRateLimitsReadRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["account/rateLimits/read"],
- Field(title="Account/rateLimits/readRequestMethod"),
- ]
- params: None = None
-
-
-class FeedbackUploadRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["feedback/upload"], Field(title="Feedback/uploadRequestMethod")
- ]
- params: FeedbackUploadParams
-
-
-class CommandExecWriteRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["command/exec/write"], Field(title="Command/exec/writeRequestMethod")
- ]
- params: CommandExecWriteParams
-
-
-class CommandExecTerminateRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["command/exec/terminate"],
- Field(title="Command/exec/terminateRequestMethod"),
- ]
- params: CommandExecTerminateParams
-
-
-class ConfigReadRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[Literal["config/read"], Field(title="Config/readRequestMethod")]
- params: ConfigReadParams
-
-
-class ExternalAgentConfigDetectRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["externalAgentConfig/detect"],
- Field(title="ExternalAgentConfig/detectRequestMethod"),
- ]
- params: ExternalAgentConfigDetectParams
-
-
-class ConfigRequirementsReadRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["configRequirements/read"],
- Field(title="ConfigRequirements/readRequestMethod"),
- ]
- params: None = None
-
-
-class AccountReadRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[Literal["account/read"], Field(title="Account/readRequestMethod")]
- params: GetAccountParams
-
-
-class FuzzyFileSearchRequest(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- method: Annotated[
- Literal["fuzzyFileSearch"], Field(title="FuzzyFileSearchRequestMethod")
- ]
- params: FuzzyFileSearchParams
-
-
-class CollabAgentRef(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- agent_nickname: Annotated[
- str | None,
- Field(
- description="Optional nickname assigned to an AgentControl-spawned sub-agent."
- ),
- ] = None
- agent_role: Annotated[
- str | None,
- Field(
- description="Optional role (agent_role) assigned to an AgentControl-spawned sub-agent."
- ),
- ] = None
- thread_id: Annotated[
- ThreadId, Field(description="Thread ID of the receiver/new agent.")
- ]
-
-
-class CollabAgentState(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- message: str | None = None
- status: CollabAgentStatus
-
-
-class CollabAgentStatusEntry(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- agent_nickname: Annotated[
- str | None,
- Field(
- description="Optional nickname assigned to an AgentControl-spawned sub-agent."
- ),
- ] = None
- agent_role: Annotated[
- str | None,
- Field(
- description="Optional role (agent_role) assigned to an AgentControl-spawned sub-agent."
- ),
- ] = None
- status: Annotated[AgentStatus, Field(description="Last known status of the agent.")]
- thread_id: Annotated[
- ThreadId, Field(description="Thread ID of the receiver/new agent.")
- ]
-
-
-class CollaborationMode(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- mode: ModeKind
- settings: Settings
-
-
-class CollaborationModeMask(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- mode: ModeKind | None = None
- model: str | None = None
- name: str
- reasoning_effort: ReasoningEffort | None = None
-
-
-class CommandExecOutputDeltaNotification(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- cap_reached: Annotated[
- bool,
- Field(
- alias="capReached",
- description="`true` on the final streamed chunk for a stream when `outputBytesCap` truncated later output on that stream.",
- ),
- ]
- delta_base64: Annotated[
- str, Field(alias="deltaBase64", description="Base64-encoded output bytes.")
- ]
- process_id: Annotated[
- str,
- Field(
- alias="processId",
- description="Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
- ),
- ]
- stream: Annotated[
- CommandExecOutputStream, Field(description="Output stream for this chunk.")
- ]
-
-
-class CommandExecParams(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- command: Annotated[
- list[str], Field(description="Command argv vector. Empty arrays are rejected.")
- ]
- cwd: Annotated[
- str | None,
- Field(description="Optional working directory. Defaults to the server cwd."),
- ] = None
- disable_output_cap: Annotated[
- bool | None,
- Field(
- alias="disableOutputCap",
- description="Disable stdout/stderr capture truncation for this request.\n\nCannot be combined with `outputBytesCap`.",
- ),
- ] = None
- disable_timeout: Annotated[
- bool | None,
- Field(
- alias="disableTimeout",
- description="Disable the timeout entirely for this request.\n\nCannot be combined with `timeoutMs`.",
- ),
- ] = None
- env: Annotated[
- dict[str, Any] | None,
- Field(
- description="Optional environment overrides merged into the server-computed environment.\n\nMatching names override inherited values. Set a key to `null` to unset an inherited variable."
- ),
- ] = None
- output_bytes_cap: Annotated[
- int | None,
- Field(
- alias="outputBytesCap",
- description="Optional per-stream stdout/stderr capture cap in bytes.\n\nWhen omitted, the server default applies. Cannot be combined with `disableOutputCap`.",
- ge=0,
- ),
- ] = None
- process_id: Annotated[
- str | None,
- Field(
- alias="processId",
- description="Optional client-supplied, connection-scoped process id.\n\nRequired for `tty`, `streamStdin`, `streamStdoutStderr`, and follow-up `command/exec/write`, `command/exec/resize`, and `command/exec/terminate` calls. When omitted, buffered execution gets an internal id that is not exposed to the client.",
- ),
- ] = None
- sandbox_policy: Annotated[
- SandboxPolicy | None,
- Field(
- alias="sandboxPolicy",
- description="Optional sandbox policy for this command.\n\nUses the same shape as thread/turn execution sandbox configuration and defaults to the user's configured policy when omitted.",
- ),
- ] = None
- size: Annotated[
- CommandExecTerminalSize | None,
- Field(
- description="Optional initial PTY size in character cells. Only valid when `tty` is true."
- ),
- ] = None
- stream_stdin: Annotated[
- bool | None,
- Field(
- alias="streamStdin",
- description="Allow follow-up `command/exec/write` requests to write stdin bytes.\n\nRequires a client-supplied `processId`.",
- ),
- ] = None
- stream_stdout_stderr: Annotated[
- bool | None,
- Field(
- alias="streamStdoutStderr",
- description="Stream stdout/stderr via `command/exec/outputDelta` notifications.\n\nStreamed bytes are not duplicated into the final response and require a client-supplied `processId`.",
- ),
- ] = None
- timeout_ms: Annotated[
- int | None,
- Field(
- alias="timeoutMs",
- description="Optional timeout in milliseconds.\n\nWhen omitted, the server default applies. Cannot be combined with `disableTimeout`.",
- ),
- ] = None
- tty: Annotated[
- bool | None,
- Field(
- description="Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`."
- ),
- ] = None
-
-
-class CommandExecResizeParams(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- process_id: Annotated[
- str,
- Field(
- alias="processId",
- description="Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
- ),
- ]
- size: Annotated[
- CommandExecTerminalSize, Field(description="New PTY size in character cells.")
- ]
-
-
-class ConfigEdit(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- key_path: Annotated[str, Field(alias="keyPath")]
- merge_strategy: Annotated[MergeStrategy, Field(alias="mergeStrategy")]
- value: Any
-
-
-class ConfigLayer(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- config: Any
- disabled_reason: Annotated[str | None, Field(alias="disabledReason")] = None
- name: ConfigLayerSource
- version: str
-
-
-class ConfigLayerMetadata(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- name: ConfigLayerSource
- version: str
-
-
-class ConfigRequirements(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- allowed_approval_policies: Annotated[
- list[AskForApproval] | None, Field(alias="allowedApprovalPolicies")
- ] = None
- allowed_sandbox_modes: Annotated[
- list[SandboxMode] | None, Field(alias="allowedSandboxModes")
- ] = None
- allowed_web_search_modes: Annotated[
- list[WebSearchMode] | None, Field(alias="allowedWebSearchModes")
- ] = None
- enforce_residency: Annotated[
- ResidencyRequirement | None, Field(alias="enforceResidency")
- ] = None
- feature_requirements: Annotated[
- dict[str, Any] | None, Field(alias="featureRequirements")
- ] = None
-
-
-class ConfigRequirementsReadResponse(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- requirements: Annotated[
- ConfigRequirements | None,
- Field(
- description="Null if no requirements are configured (e.g. no requirements.toml/MDM entries)."
- ),
- ] = None
-
-
-class ConfigValueWriteParams(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- expected_version: Annotated[str | None, Field(alias="expectedVersion")] = None
- file_path: Annotated[
- str | None,
- Field(
- alias="filePath",
- description="Path to the config file to write; defaults to the user's `config.toml` when omitted.",
- ),
- ] = None
- key_path: Annotated[str, Field(alias="keyPath")]
- merge_strategy: Annotated[MergeStrategy, Field(alias="mergeStrategy")]
- value: Any
-
-
-class ConfigWarningNotification(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- details: Annotated[
- str | None, Field(description="Optional extra guidance or error details.")
- ] = None
- path: Annotated[
- str | None,
- Field(
- description="Optional path to the config file that triggered the warning."
- ),
- ] = None
- range: Annotated[
- TextRange | None,
- Field(
- description="Optional range for the error location inside the config file."
- ),
- ] = None
- summary: Annotated[str, Field(description="Concise summary of the warning.")]
-
-
-class ErrorNotification(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- error: TurnError
- thread_id: Annotated[str, Field(alias="threadId")]
- turn_id: Annotated[str, Field(alias="turnId")]
- will_retry: Annotated[bool, Field(alias="willRetry")]
-
-
-class ModelRerouteEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- from_model: str
- reason: ModelRerouteReason
- to_model: str
- type: Annotated[Literal["model_reroute"], Field(title="ModelRerouteEventMsgType")]
-
-
-class TaskStartedEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- collaboration_mode_kind: ModeKind | None = "default"
- model_context_window: int | None = None
- turn_id: str
- type: Annotated[Literal["task_started"], Field(title="TaskStartedEventMsgType")]
-
-
-class AgentMessageEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- message: str
- phase: MessagePhase | None = None
- type: Annotated[Literal["agent_message"], Field(title="AgentMessageEventMsgType")]
-
-
-class UserMessageEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- images: Annotated[
- list[str] | None,
- Field(
- description="Image URLs sourced from `UserInput::Image`. These are safe to replay in legacy UI history events and correspond to images sent to the model."
- ),
- ] = None
- local_images: Annotated[
- list[str] | None,
- Field(
- description="Local file paths sourced from `UserInput::LocalImage`. These are kept so the UI can reattach images when editing history, and should not be sent to the model or treated as API-ready URLs."
- ),
- ] = []
- message: str
- text_elements: Annotated[
- list[TextElement] | None,
- Field(
- description="UI-defined spans within `message` used to render or persist special elements."
- ),
- ] = []
- type: Annotated[Literal["user_message"], Field(title="UserMessageEventMsgType")]
+ Literal["command/exec/terminate"],
+ Field(title="Command/exec/terminateRequestMethod"),
+ ]
+ params: CommandExecTerminateParams
-class ThreadNameUpdatedEventMsg(BaseModel):
+class ConfigReadRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- thread_id: ThreadId
- thread_name: str | None = None
- type: Annotated[
- Literal["thread_name_updated"], Field(title="ThreadNameUpdatedEventMsgType")
- ]
+ id: RequestId
+ method: Annotated[Literal["config/read"], Field(title="Config/readRequestMethod")]
+ params: ConfigReadParams
-class McpStartupUpdateEventMsg(BaseModel):
+class ExternalAgentConfigDetectRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- server: Annotated[str, Field(description="Server name being started.")]
- status: Annotated[McpStartupStatus, Field(description="Current startup status.")]
- type: Annotated[
- Literal["mcp_startup_update"], Field(title="McpStartupUpdateEventMsgType")
+ id: RequestId
+ method: Annotated[
+ Literal["externalAgentConfig/detect"],
+ Field(title="ExternalAgentConfig/detectRequestMethod"),
]
+ params: ExternalAgentConfigDetectParams
-class McpStartupCompleteEventMsg(BaseModel):
+class ConfigRequirementsReadRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- cancelled: list[str]
- failed: list[McpStartupFailure]
- ready: list[str]
- type: Annotated[
- Literal["mcp_startup_complete"], Field(title="McpStartupCompleteEventMsgType")
+ id: RequestId
+ method: Annotated[
+ Literal["configRequirements/read"],
+ Field(title="ConfigRequirements/readRequestMethod"),
]
+ params: None = None
-class McpToolCallBeginEventMsg(BaseModel):
+class AccountReadRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: Annotated[
- str,
- Field(
- description="Identifier so this can be paired with the McpToolCallEnd event."
- ),
- ]
- invocation: McpInvocation
- type: Annotated[
- Literal["mcp_tool_call_begin"], Field(title="McpToolCallBeginEventMsgType")
- ]
+ id: RequestId
+ method: Annotated[Literal["account/read"], Field(title="Account/readRequestMethod")]
+ params: GetAccountParams
-class McpToolCallEndEventMsg(BaseModel):
+class FuzzyFileSearchRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: Annotated[
- str,
- Field(
- description="Identifier for the corresponding McpToolCallBegin that finished."
- ),
- ]
- duration: Duration
- invocation: McpInvocation
- result: Annotated[
- ResultOfCallToolResultOrString,
- Field(description="Result of the tool call. Note this could be an error."),
- ]
- type: Annotated[
- Literal["mcp_tool_call_end"], Field(title="McpToolCallEndEventMsgType")
+ id: RequestId
+ method: Annotated[
+ Literal["fuzzyFileSearch"], Field(title="FuzzyFileSearchRequestMethod")
]
+ params: FuzzyFileSearchParams
-class WebSearchEndEventMsg(BaseModel):
+class CollabAgentState(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- action: ResponsesApiWebSearchAction
- call_id: str
- query: str
- type: Annotated[Literal["web_search_end"], Field(title="WebSearchEndEventMsgType")]
+ message: str | None = None
+ status: CollabAgentStatus
-class ExecCommandBeginEventMsg(BaseModel):
+class CollaborationMode(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: Annotated[
- str,
- Field(
- description="Identifier so this can be paired with the ExecCommandEnd event."
- ),
- ]
- command: Annotated[list[str], Field(description="The command to be executed.")]
- cwd: Annotated[
- str,
- Field(
- description="The command's working directory if not the default cwd for the agent."
- ),
- ]
- interaction_input: Annotated[
- str | None,
- Field(
- description="Raw input sent to a unified exec session (if this is an interaction event)."
- ),
- ] = None
- parsed_cmd: list[ParsedCommand]
- process_id: Annotated[
- str | None,
- Field(
- description="Identifier for the underlying PTY process (when available)."
- ),
- ] = None
- source: Annotated[
- ExecCommandSource | None,
- Field(
- description="Where the command originated. Defaults to Agent for backward compatibility."
- ),
- ] = "agent"
- turn_id: Annotated[str, Field(description="Turn ID that this command belongs to.")]
- type: Annotated[
- Literal["exec_command_begin"], Field(title="ExecCommandBeginEventMsgType")
- ]
+ mode: ModeKind
+ settings: Settings
-class ExecCommandOutputDeltaEventMsg(BaseModel):
+class CollaborationModeMask(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: Annotated[
- str,
- Field(
- description="Identifier for the ExecCommandBegin that produced this chunk."
- ),
- ]
- chunk: Annotated[
- str, Field(description="Raw bytes from the stream (may not be valid UTF-8).")
- ]
- stream: Annotated[
- ExecOutputStream, Field(description="Which stream produced this chunk.")
- ]
- type: Annotated[
- Literal["exec_command_output_delta"],
- Field(title="ExecCommandOutputDeltaEventMsgType"),
- ]
+ mode: ModeKind | None = None
+ model: str | None = None
+ name: str
+ reasoning_effort: ReasoningEffort | None = None
-class ExecCommandEndEventMsg(BaseModel):
+class CommandExecOutputDeltaNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- aggregated_output: Annotated[
- str | None, Field(description="Captured aggregated output")
- ] = ""
- call_id: Annotated[
- str, Field(description="Identifier for the ExecCommandBegin that finished.")
- ]
- command: Annotated[list[str], Field(description="The command that was executed.")]
- cwd: Annotated[
- str,
+ cap_reached: Annotated[
+ bool,
Field(
- description="The command's working directory if not the default cwd for the agent."
+ alias="capReached",
+ description="`true` on the final streamed chunk for a stream when `outputBytesCap` truncated later output on that stream.",
),
]
- duration: Annotated[
- Duration, Field(description="The duration of the command execution.")
- ]
- exit_code: Annotated[int, Field(description="The command's exit code.")]
- formatted_output: Annotated[
- str,
- Field(description="Formatted output from the command, as seen by the model."),
+ delta_base64: Annotated[
+ str, Field(alias="deltaBase64", description="Base64-encoded output bytes.")
]
- interaction_input: Annotated[
- str | None,
- Field(
- description="Raw input sent to a unified exec session (if this is an interaction event)."
- ),
- ] = None
- parsed_cmd: list[ParsedCommand]
process_id: Annotated[
- str | None,
- Field(
- description="Identifier for the underlying PTY process (when available)."
- ),
- ] = None
- source: Annotated[
- ExecCommandSource | None,
+ str,
Field(
- description="Where the command originated. Defaults to Agent for backward compatibility."
+ alias="processId",
+ description="Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
),
- ] = "agent"
- status: Annotated[
- ExecCommandStatus,
- Field(description="Completion status for this command execution."),
]
- stderr: Annotated[str, Field(description="Captured stderr")]
- stdout: Annotated[str, Field(description="Captured stdout")]
- turn_id: Annotated[str, Field(description="Turn ID that this command belongs to.")]
- type: Annotated[
- Literal["exec_command_end"], Field(title="ExecCommandEndEventMsgType")
+ stream: Annotated[
+ CommandExecOutputStream, Field(description="Output stream for this chunk.")
]
-class RequestPermissionsEventMsg(BaseModel):
+class CommandExecParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: Annotated[
- str,
- Field(
- description="Responses API call id for the associated tool call, if available."
- ),
+ command: Annotated[
+ list[str], Field(description="Command argv vector. Empty arrays are rejected.")
]
- permissions: PermissionProfile
- reason: str | None = None
- turn_id: Annotated[
+ cwd: Annotated[
str | None,
+ Field(description="Optional working directory. Defaults to the server cwd."),
+ ] = None
+ disable_output_cap: Annotated[
+ bool | None,
Field(
- description="Turn ID that this request belongs to. Uses `#[serde(default)]` for backwards compatibility."
+ alias="disableOutputCap",
+ description="Disable stdout/stderr capture truncation for this request.\n\nCannot be combined with `outputBytesCap`.",
),
- ] = ""
- type: Annotated[
- Literal["request_permissions"], Field(title="RequestPermissionsEventMsgType")
- ]
-
-
-class ElicitationRequestEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- id: RequestId
- request: ElicitationRequest
- server_name: str
- turn_id: Annotated[
- str | None,
- Field(description="Turn ID that this elicitation belongs to, when known."),
] = None
- type: Annotated[
- Literal["elicitation_request"], Field(title="ElicitationRequestEventMsgType")
- ]
-
-
-class ApplyPatchApprovalRequestEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- call_id: Annotated[
- str,
+ disable_timeout: Annotated[
+ bool | None,
Field(
- description="Responses API call id for the associated patch apply call, if available."
+ alias="disableTimeout",
+ description="Disable the timeout entirely for this request.\n\nCannot be combined with `timeoutMs`.",
),
- ]
- changes: dict[str, FileChange]
- grant_root: Annotated[
- str | None,
+ ] = None
+ env: Annotated[
+ dict[str, Any] | None,
Field(
- description="When set, the agent is asking the user to allow writes under this root for the remainder of the session."
+ description="Optional environment overrides merged into the server-computed environment.\n\nMatching names override inherited values. Set a key to `null` to unset an inherited variable."
),
] = None
- reason: Annotated[
- str | None,
+ output_bytes_cap: Annotated[
+ int | None,
Field(
- description="Optional explanatory reason (e.g. request for extra write access)."
+ alias="outputBytesCap",
+ description="Optional per-stream stdout/stderr capture cap in bytes.\n\nWhen omitted, the server default applies. Cannot be combined with `disableOutputCap`.",
+ ge=0,
),
] = None
- turn_id: Annotated[
+ process_id: Annotated[
str | None,
Field(
- description="Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility with older senders."
+ alias="processId",
+ description="Optional client-supplied, connection-scoped process id.\n\nRequired for `tty`, `streamStdin`, `streamStdoutStderr`, and follow-up `command/exec/write`, `command/exec/resize`, and `command/exec/terminate` calls. When omitted, buffered execution gets an internal id that is not exposed to the client.",
),
- ] = ""
- type: Annotated[
- Literal["apply_patch_approval_request"],
- Field(title="ApplyPatchApprovalRequestEventMsgType"),
- ]
-
-
-class PatchApplyBeginEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- auto_approved: Annotated[
- bool,
+ ] = None
+ sandbox_policy: Annotated[
+ SandboxPolicy | None,
Field(
- description="If true, there was no ApplyPatchApprovalRequest for this patch."
+ alias="sandboxPolicy",
+ description="Optional sandbox policy for this command.\n\nUses the same shape as thread/turn execution sandbox configuration and defaults to the user's configured policy when omitted.",
),
- ]
- call_id: Annotated[
- str,
+ ] = None
+ size: Annotated[
+ CommandExecTerminalSize | None,
Field(
- description="Identifier so this can be paired with the PatchApplyEnd event."
+ description="Optional initial PTY size in character cells. Only valid when `tty` is true."
),
- ]
- changes: Annotated[
- dict[str, FileChange], Field(description="The changes to be applied.")
- ]
- turn_id: Annotated[
- str | None,
+ ] = None
+ stream_stdin: Annotated[
+ bool | None,
Field(
- description="Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility."
+ alias="streamStdin",
+ description="Allow follow-up `command/exec/write` requests to write stdin bytes.\n\nRequires a client-supplied `processId`.",
),
- ] = ""
- type: Annotated[
- Literal["patch_apply_begin"], Field(title="PatchApplyBeginEventMsgType")
- ]
-
-
-class PatchApplyEndEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- call_id: Annotated[
- str, Field(description="Identifier for the PatchApplyBegin that finished.")
- ]
- changes: Annotated[
- dict[str, FileChange] | None,
+ ] = None
+ stream_stdout_stderr: Annotated[
+ bool | None,
Field(
- description="The changes that were applied (mirrors PatchApplyBeginEvent::changes)."
+ alias="streamStdoutStderr",
+ description="Stream stdout/stderr via `command/exec/outputDelta` notifications.\n\nStreamed bytes are not duplicated into the final response and require a client-supplied `processId`.",
),
- ] = {}
- status: Annotated[
- PatchApplyStatus,
- Field(description="Completion status for this patch application."),
- ]
- stderr: Annotated[
- str, Field(description="Captured stderr (parser errors, IO failures, etc.).")
- ]
- stdout: Annotated[
- str, Field(description="Captured stdout (summary printed by apply_patch).")
- ]
- success: Annotated[
- bool, Field(description="Whether the patch was applied successfully.")
- ]
- turn_id: Annotated[
- str | None,
+ ] = None
+ timeout_ms: Annotated[
+ int | None,
Field(
- description="Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility."
+ alias="timeoutMs",
+ description="Optional timeout in milliseconds.\n\nWhen omitted, the server default applies. Cannot be combined with `disableTimeout`.",
),
- ] = ""
- type: Annotated[
- Literal["patch_apply_end"], Field(title="PatchApplyEndEventMsgType")
- ]
-
-
-class GetHistoryEntryResponseEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- entry: Annotated[
- HistoryEntry | None,
+ ] = None
+ tty: Annotated[
+ bool | None,
Field(
- description="The entry at the requested offset, if available and parseable."
+ description="Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`."
),
] = None
- log_id: Annotated[int, Field(ge=0)]
- offset: Annotated[int, Field(ge=0)]
- type: Annotated[
- Literal["get_history_entry_response"],
- Field(title="GetHistoryEntryResponseEventMsgType"),
- ]
-
-
-class McpListToolsResponseEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- auth_statuses: Annotated[
- dict[str, McpAuthStatus],
- Field(description="Authentication status for each configured MCP server."),
- ]
- resource_templates: Annotated[
- dict[str, list[ResourceTemplate]],
- Field(description="Known resource templates grouped by server name."),
- ]
- resources: Annotated[
- dict[str, list[Resource]],
- Field(description="Known resources grouped by server name."),
- ]
- tools: Annotated[
- dict[str, Tool],
- Field(description="Fully qualified tool name -> tool definition."),
- ]
- type: Annotated[
- Literal["mcp_list_tools_response"],
- Field(title="McpListToolsResponseEventMsgType"),
- ]
-class ListRemoteSkillsResponseEventMsg(BaseModel):
+class CommandExecResizeParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- skills: list[RemoteSkillSummary]
- type: Annotated[
- Literal["list_remote_skills_response"],
- Field(title="ListRemoteSkillsResponseEventMsgType"),
+ process_id: Annotated[
+ str,
+ Field(
+ alias="processId",
+ description="Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
+ ),
+ ]
+ size: Annotated[
+ CommandExecTerminalSize, Field(description="New PTY size in character cells.")
]
-class TurnAbortedEventMsg(BaseModel):
+class ConfigEdit(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- reason: TurnAbortReason
- turn_id: str | None = None
- type: Annotated[Literal["turn_aborted"], Field(title="TurnAbortedEventMsgType")]
+ key_path: Annotated[str, Field(alias="keyPath")]
+ merge_strategy: Annotated[MergeStrategy, Field(alias="mergeStrategy")]
+ value: Any
-class EnteredReviewModeEventMsg(BaseModel):
+class ConfigLayer(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- target: ReviewTarget
- type: Annotated[
- Literal["entered_review_mode"], Field(title="EnteredReviewModeEventMsgType")
- ]
- user_facing_hint: str | None = None
+ config: Any
+ disabled_reason: Annotated[str | None, Field(alias="disabledReason")] = None
+ name: ConfigLayerSource
+ version: str
-class CollabAgentSpawnBeginEventMsg(BaseModel):
+class ConfigLayerMetadata(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: Annotated[str, Field(description="Identifier for the collab tool call.")]
- model: str
- prompt: Annotated[
- str,
- Field(
- description="Initial prompt sent to the agent. Can be empty to prevent CoT leaking at the beginning."
- ),
- ]
- reasoning_effort: ReasoningEffort
- sender_thread_id: Annotated[ThreadId, Field(description="Thread ID of the sender.")]
- type: Annotated[
- Literal["collab_agent_spawn_begin"],
- Field(title="CollabAgentSpawnBeginEventMsgType"),
- ]
+ name: ConfigLayerSource
+ version: str
-class CollabAgentSpawnEndEventMsg(BaseModel):
+class ConfigRequirements(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: Annotated[str, Field(description="Identifier for the collab tool call.")]
- model: Annotated[str, Field(description="Model requested for the spawned agent.")]
- new_agent_nickname: Annotated[
- str | None, Field(description="Optional nickname assigned to the new agent.")
+ allowed_approval_policies: Annotated[
+ list[AskForApproval] | None, Field(alias="allowedApprovalPolicies")
] = None
- new_agent_role: Annotated[
- str | None, Field(description="Optional role assigned to the new agent.")
+ allowed_sandbox_modes: Annotated[
+ list[SandboxMode] | None, Field(alias="allowedSandboxModes")
] = None
- new_thread_id: Annotated[
- ThreadId | None,
- Field(description="Thread ID of the newly spawned agent, if it was created."),
+ allowed_web_search_modes: Annotated[
+ list[WebSearchMode] | None, Field(alias="allowedWebSearchModes")
+ ] = None
+ enforce_residency: Annotated[
+ ResidencyRequirement | None, Field(alias="enforceResidency")
+ ] = None
+ feature_requirements: Annotated[
+ dict[str, Any] | None, Field(alias="featureRequirements")
] = None
- prompt: Annotated[
- str,
- Field(
- description="Initial prompt sent to the agent. Can be empty to prevent CoT leaking at the beginning."
- ),
- ]
- reasoning_effort: Annotated[
- ReasoningEffort,
- Field(description="Reasoning effort requested for the spawned agent."),
- ]
- sender_thread_id: Annotated[ThreadId, Field(description="Thread ID of the sender.")]
- status: Annotated[
- AgentStatus,
- Field(
- description="Last known status of the new agent reported to the sender agent."
- ),
- ]
- type: Annotated[
- Literal["collab_agent_spawn_end"],
- Field(title="CollabAgentSpawnEndEventMsgType"),
- ]
-class CollabAgentInteractionBeginEventMsg(BaseModel):
+class ConfigRequirementsReadResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: Annotated[str, Field(description="Identifier for the collab tool call.")]
- prompt: Annotated[
- str,
+ requirements: Annotated[
+ ConfigRequirements | None,
Field(
- description="Prompt sent from the sender to the receiver. Can be empty to prevent CoT leaking at the beginning."
+ description="Null if no requirements are configured (e.g. no requirements.toml/MDM entries)."
),
- ]
- receiver_thread_id: Annotated[
- ThreadId, Field(description="Thread ID of the receiver.")
- ]
- sender_thread_id: Annotated[ThreadId, Field(description="Thread ID of the sender.")]
- type: Annotated[
- Literal["collab_agent_interaction_begin"],
- Field(title="CollabAgentInteractionBeginEventMsgType"),
- ]
+ ] = None
-class CollabAgentInteractionEndEventMsg(BaseModel):
+class ConfigValueWriteParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: Annotated[str, Field(description="Identifier for the collab tool call.")]
- prompt: Annotated[
- str,
- Field(
- description="Prompt sent from the sender to the receiver. Can be empty to prevent CoT leaking at the beginning."
- ),
- ]
- receiver_agent_nickname: Annotated[
+ expected_version: Annotated[str | None, Field(alias="expectedVersion")] = None
+ file_path: Annotated[
str | None,
- Field(description="Optional nickname assigned to the receiver agent."),
- ] = None
- receiver_agent_role: Annotated[
- str | None, Field(description="Optional role assigned to the receiver agent.")
- ] = None
- receiver_thread_id: Annotated[
- ThreadId, Field(description="Thread ID of the receiver.")
- ]
- sender_thread_id: Annotated[ThreadId, Field(description="Thread ID of the sender.")]
- status: Annotated[
- AgentStatus,
Field(
- description="Last known status of the receiver agent reported to the sender agent."
+ alias="filePath",
+ description="Path to the config file to write; defaults to the user's `config.toml` when omitted.",
),
- ]
- type: Annotated[
- Literal["collab_agent_interaction_end"],
- Field(title="CollabAgentInteractionEndEventMsgType"),
- ]
-
-
-class CollabWaitingBeginEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- call_id: Annotated[str, Field(description="ID of the waiting call.")]
- receiver_agents: Annotated[
- list[CollabAgentRef] | None,
- Field(description="Optional nicknames/roles for receivers."),
] = None
- receiver_thread_ids: Annotated[
- list[ThreadId], Field(description="Thread ID of the receivers.")
- ]
- sender_thread_id: Annotated[ThreadId, Field(description="Thread ID of the sender.")]
- type: Annotated[
- Literal["collab_waiting_begin"], Field(title="CollabWaitingBeginEventMsgType")
- ]
+ key_path: Annotated[str, Field(alias="keyPath")]
+ merge_strategy: Annotated[MergeStrategy, Field(alias="mergeStrategy")]
+ value: Any
-class CollabWaitingEndEventMsg(BaseModel):
+class ConfigWarningNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- agent_statuses: Annotated[
- list[CollabAgentStatusEntry] | None,
- Field(description="Optional receiver metadata paired with final statuses."),
+ details: Annotated[
+ str | None, Field(description="Optional extra guidance or error details.")
] = None
- call_id: Annotated[str, Field(description="ID of the waiting call.")]
- sender_thread_id: Annotated[ThreadId, Field(description="Thread ID of the sender.")]
- statuses: Annotated[
- dict[str, AgentStatus],
+ path: Annotated[
+ str | None,
Field(
- description="Last known status of the receiver agents reported to the sender agent."
+ description="Optional path to the config file that triggered the warning."
),
- ]
- type: Annotated[
- Literal["collab_waiting_end"], Field(title="CollabWaitingEndEventMsgType")
- ]
-
-
-class CollabCloseBeginEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- call_id: Annotated[str, Field(description="Identifier for the collab tool call.")]
- receiver_thread_id: Annotated[
- ThreadId, Field(description="Thread ID of the receiver.")
- ]
- sender_thread_id: Annotated[ThreadId, Field(description="Thread ID of the sender.")]
- type: Annotated[
- Literal["collab_close_begin"], Field(title="CollabCloseBeginEventMsgType")
- ]
-
-
-class CollabCloseEndEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- call_id: Annotated[str, Field(description="Identifier for the collab tool call.")]
- receiver_agent_nickname: Annotated[
- str | None,
- Field(description="Optional nickname assigned to the receiver agent."),
- ] = None
- receiver_agent_role: Annotated[
- str | None, Field(description="Optional role assigned to the receiver agent.")
] = None
- receiver_thread_id: Annotated[
- ThreadId, Field(description="Thread ID of the receiver.")
- ]
- sender_thread_id: Annotated[ThreadId, Field(description="Thread ID of the sender.")]
- status: Annotated[
- AgentStatus,
+ range: Annotated[
+ TextRange | None,
Field(
- description="Last known status of the receiver agent reported to the sender agent before the close."
+ description="Optional range for the error location inside the config file."
),
- ]
- type: Annotated[
- Literal["collab_close_end"], Field(title="CollabCloseEndEventMsgType")
- ]
-
-
-class CollabResumeBeginEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- call_id: Annotated[str, Field(description="Identifier for the collab tool call.")]
- receiver_agent_nickname: Annotated[
- str | None,
- Field(description="Optional nickname assigned to the receiver agent."),
] = None
- receiver_agent_role: Annotated[
- str | None, Field(description="Optional role assigned to the receiver agent.")
- ] = None
- receiver_thread_id: Annotated[
- ThreadId, Field(description="Thread ID of the receiver.")
- ]
- sender_thread_id: Annotated[ThreadId, Field(description="Thread ID of the sender.")]
- type: Annotated[
- Literal["collab_resume_begin"], Field(title="CollabResumeBeginEventMsgType")
- ]
+ summary: Annotated[str, Field(description="Concise summary of the warning.")]
-class CollabResumeEndEventMsg(BaseModel):
+class ErrorNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- call_id: Annotated[str, Field(description="Identifier for the collab tool call.")]
- receiver_agent_nickname: Annotated[
- str | None,
- Field(description="Optional nickname assigned to the receiver agent."),
- ] = None
- receiver_agent_role: Annotated[
- str | None, Field(description="Optional role assigned to the receiver agent.")
- ] = None
- receiver_thread_id: Annotated[
- ThreadId, Field(description="Thread ID of the receiver.")
- ]
- sender_thread_id: Annotated[ThreadId, Field(description="Thread ID of the sender.")]
- status: Annotated[
- AgentStatus,
- Field(
- description="Last known status of the receiver agent reported to the sender agent after resume."
- ),
- ]
- type: Annotated[
- Literal["collab_resume_end"], Field(title="CollabResumeEndEventMsgType")
- ]
+ error: TurnError
+ thread_id: Annotated[str, Field(alias="threadId")]
+ turn_id: Annotated[str, Field(alias="turnId")]
+ will_retry: Annotated[bool, Field(alias="willRetry")]
class ExperimentalFeature(BaseModel):
@@ -6004,6 +4521,16 @@ class GetAccountResponse(BaseModel):
requires_openai_auth: Annotated[bool, Field(alias="requiresOpenaiAuth")]
+class GuardianApprovalReview(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True,
+ )
+ rationale: str | None = None
+ risk_level: Annotated[GuardianRiskLevel | None, Field(alias="riskLevel")] = None
+ risk_score: Annotated[int | None, Field(alias="riskScore", ge=0)] = None
+ status: GuardianApprovalReviewStatus
+
+
class HookOutputEntry(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -6040,6 +4567,28 @@ class HookStartedNotification(BaseModel):
turn_id: Annotated[str | None, Field(alias="turnId")] = None
+class ItemGuardianApprovalReviewCompletedNotification(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True,
+ )
+ action: Any | None = None
+ review: GuardianApprovalReview
+ target_item_id: Annotated[str, Field(alias="targetItemId")]
+ thread_id: Annotated[str, Field(alias="threadId")]
+ turn_id: Annotated[str, Field(alias="turnId")]
+
+
+class ItemGuardianApprovalReviewStartedNotification(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True,
+ )
+ action: Any | None = None
+ review: GuardianApprovalReview
+ target_item_id: Annotated[str, Field(alias="targetItemId")]
+ thread_id: Annotated[str, Field(alias="threadId")]
+ turn_id: Annotated[str, Field(alias="turnId")]
+
+
class McpServerStatus(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -6096,22 +4645,6 @@ class ModelListResponse(BaseModel):
] = None
-class NetworkApprovalContext(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- host: str
- protocol: NetworkApprovalProtocol
-
-
-class NetworkPolicyAmendment(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- action: NetworkPolicyRuleAction
- host: str
-
-
class OverriddenMetadata(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -6121,13 +4654,17 @@ class OverriddenMetadata(BaseModel):
overriding_layer: Annotated[ConfigLayerMetadata, Field(alias="overridingLayer")]
-class PlanItemArg(BaseModel):
+class PluginDetail(BaseModel):
model_config = ConfigDict(
- extra="forbid",
populate_by_name=True,
)
- status: StepStatus
- step: str
+ apps: list[AppSummary]
+ description: str | None = None
+ marketplace_name: Annotated[str, Field(alias="marketplaceName")]
+ marketplace_path: Annotated[AbsolutePathBuf, Field(alias="marketplacePath")]
+ mcp_servers: Annotated[list[str], Field(alias="mcpServers")]
+ skills: list[SkillSummary]
+ summary: PluginSummary
class PluginMarketplaceEntry(BaseModel):
@@ -6139,138 +4676,35 @@ class PluginMarketplaceEntry(BaseModel):
plugins: list[PluginSummary]
-class RateLimitSnapshot(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- credits: CreditsSnapshot | None = None
- limit_id: Annotated[str | None, Field(alias="limitId")] = None
- limit_name: Annotated[str | None, Field(alias="limitName")] = None
- plan_type: Annotated[PlanType | None, Field(alias="planType")] = None
- primary: RateLimitWindow | None = None
- secondary: RateLimitWindow | None = None
-
-
-class InputTranscriptDeltaRealtimeEvent(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- populate_by_name=True,
- )
- input_transcript_delta: Annotated[
- RealtimeTranscriptDelta, Field(alias="InputTranscriptDelta")
- ]
-
-
-class OutputTranscriptDeltaRealtimeEvent(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- populate_by_name=True,
- )
- output_transcript_delta: Annotated[
- RealtimeTranscriptDelta, Field(alias="OutputTranscriptDelta")
- ]
-
-
-class RealtimeHandoffRequested(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- active_transcript: list[RealtimeTranscriptEntry]
- handoff_id: str
- input_transcript: str
- item_id: str
-
-
-class RequestUserInputQuestion(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- header: str
- id: str
- is_other: Annotated[bool | None, Field(alias="isOther")] = False
- is_secret: Annotated[bool | None, Field(alias="isSecret")] = False
- options: list[RequestUserInputQuestionOption] | None = None
- question: str
-
-
-class WebSearchCallResponseItem(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- action: ResponsesApiWebSearchAction | None = None
- id: str | None = None
- status: str | None = None
- type: Annotated[
- Literal["web_search_call"], Field(title="WebSearchCallResponseItemType")
- ]
-
-
-class ReviewCodeLocation(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- absolute_file_path: str
- line_range: ReviewLineRange
-
-
-class NetworkPolicyAmendment1(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- network_policy_amendment: NetworkPolicyAmendment
-
-
-class NetworkPolicyAmendmentReviewDecision(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- populate_by_name=True,
- )
- network_policy_amendment: NetworkPolicyAmendment1
-
-
-class ReviewDecision(
- RootModel[
- Literal["approved"]
- | ApprovedExecpolicyAmendmentReviewDecision
- | Literal["approved_for_session"]
- | NetworkPolicyAmendmentReviewDecision
- | Literal["denied"]
- | Literal["abort"]
- ]
-):
+class PluginReadResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- root: Annotated[
- Literal["approved"]
- | ApprovedExecpolicyAmendmentReviewDecision
- | Literal["approved_for_session"]
- | NetworkPolicyAmendmentReviewDecision
- | Literal["denied"]
- | Literal["abort"],
- Field(description="User's decision in response to an ExecApprovalRequest."),
- ]
+ plugin: PluginDetail
-class ReviewFinding(BaseModel):
+class RateLimitSnapshot(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- body: str
- code_location: ReviewCodeLocation
- confidence_score: float
- priority: int
- title: str
+ credits: CreditsSnapshot | None = None
+ limit_id: Annotated[str | None, Field(alias="limitId")] = None
+ limit_name: Annotated[str | None, Field(alias="limitName")] = None
+ plan_type: Annotated[PlanType | None, Field(alias="planType")] = None
+ primary: RateLimitWindow | None = None
+ secondary: RateLimitWindow | None = None
-class ReviewOutputEvent(BaseModel):
+class WebSearchCallResponseItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
- findings: list[ReviewFinding]
- overall_confidence_score: float
- overall_correctness: str
- overall_explanation: str
+ action: ResponsesApiWebSearchAction | None = None
+ id: str | None = None
+ status: str | None = None
+ type: Annotated[
+ Literal["web_search_call"], Field(title="WebSearchCallResponseItemType")
+ ]
class ReviewStartParams(BaseModel):
@@ -6377,6 +4811,28 @@ class TurnDiffUpdatedServerNotification(BaseModel):
params: TurnDiffUpdatedNotification
+class ItemAutoApprovalReviewStartedServerNotification(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True,
+ )
+ method: Annotated[
+ Literal["item/autoApprovalReview/started"],
+ Field(title="Item/autoApprovalReview/startedNotificationMethod"),
+ ]
+ params: ItemGuardianApprovalReviewStartedNotification
+
+
+class ItemAutoApprovalReviewCompletedServerNotification(BaseModel):
+ model_config = ConfigDict(
+ populate_by_name=True,
+ )
+ method: Annotated[
+ Literal["item/autoApprovalReview/completed"],
+ Field(title="Item/autoApprovalReview/completedNotificationMethod"),
+ ]
+ params: ItemGuardianApprovalReviewCompletedNotification
+
+
class CommandExecOutputDeltaServerNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -6810,40 +5266,6 @@ class TurnCompletedNotification(BaseModel):
turn: Turn
-class UserMessageTurnItem(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- content: list[UserInput]
- id: str
- type: Annotated[Literal["UserMessage"], Field(title="UserMessageTurnItemType")]
-
-
-class TurnItem(
- RootModel[
- UserMessageTurnItem
- | AgentMessageTurnItem
- | PlanTurnItem
- | ReasoningTurnItem
- | WebSearchTurnItem
- | ImageGenerationTurnItem
- | ContextCompactionTurnItem
- ]
-):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- root: (
- UserMessageTurnItem
- | AgentMessageTurnItem
- | PlanTurnItem
- | ReasoningTurnItem
- | WebSearchTurnItem
- | ImageGenerationTurnItem
- | ContextCompactionTurnItem
- )
-
-
class TurnPlanStep(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -6873,6 +5295,13 @@ class TurnStartParams(BaseModel):
description="Override the approval policy for this turn and subsequent turns.",
),
] = None
+ approvals_reviewer: Annotated[
+ ApprovalsReviewer | None,
+ Field(
+ alias="approvalsReviewer",
+ description="Override where approval requests are routed for review on this turn and subsequent turns.",
+ ),
+ ] = None
cwd: Annotated[
str | None,
Field(
@@ -7129,178 +5558,6 @@ class ConfigWriteResponse(BaseModel):
version: str
-class TokenCountEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- info: TokenUsageInfo | None = None
- rate_limits: RateLimitSnapshot | None = None
- type: Annotated[Literal["token_count"], Field(title="TokenCountEventMsgType")]
-
-
-class ExecApprovalRequestEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- additional_permissions: Annotated[
- PermissionProfile | None,
- Field(
- description="Optional additional filesystem permissions requested for this command."
- ),
- ] = None
- approval_id: Annotated[
- str | None,
- Field(
- description="Identifier for this specific approval callback.\n\nWhen absent, the approval is for the command item itself (`call_id`). This is present for subcommand approvals (via execve intercept)."
- ),
- ] = None
- available_decisions: Annotated[
- list[ReviewDecision] | None,
- Field(
- description="Ordered list of decisions the client may present for this prompt.\n\nWhen absent, clients should derive the legacy default set from the other fields on this request."
- ),
- ] = None
- call_id: Annotated[
- str, Field(description="Identifier for the associated command execution item.")
- ]
- command: Annotated[list[str], Field(description="The command to be executed.")]
- cwd: Annotated[str, Field(description="The command's working directory.")]
- network_approval_context: Annotated[
- NetworkApprovalContext | None,
- Field(
- description="Optional network context for a blocked request that can be approved."
- ),
- ] = None
- parsed_cmd: list[ParsedCommand]
- proposed_execpolicy_amendment: Annotated[
- list[str] | None,
- Field(
- description="Proposed execpolicy amendment that can be applied to allow future runs."
- ),
- ] = None
- proposed_network_policy_amendments: Annotated[
- list[NetworkPolicyAmendment] | None,
- Field(
- description="Proposed network policy amendments (for example allow/deny this host in future)."
- ),
- ] = None
- reason: Annotated[
- str | None,
- Field(
- description="Optional human-readable reason for the approval (e.g. retry without sandbox)."
- ),
- ] = None
- skill_metadata: Annotated[
- ExecApprovalRequestSkillMetadata | None,
- Field(
- description="Optional skill metadata when the approval was triggered by a skill script."
- ),
- ] = None
- turn_id: Annotated[
- str | None,
- Field(
- description="Turn ID that this command belongs to. Uses `#[serde(default)]` for backwards compatibility."
- ),
- ] = ""
- type: Annotated[
- Literal["exec_approval_request"], Field(title="ExecApprovalRequestEventMsgType")
- ]
-
-
-class RequestUserInputEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- call_id: Annotated[
- str,
- Field(
- description="Responses API call id for the associated tool call, if available."
- ),
- ]
- questions: list[RequestUserInputQuestion]
- turn_id: Annotated[
- str | None,
- Field(
- description="Turn ID that this request belongs to. Uses `#[serde(default)]` for backwards compatibility."
- ),
- ] = ""
- type: Annotated[
- Literal["request_user_input"], Field(title="RequestUserInputEventMsgType")
- ]
-
-
-class ListSkillsResponseEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- skills: list[SkillsListEntry]
- type: Annotated[
- Literal["list_skills_response"], Field(title="ListSkillsResponseEventMsgType")
- ]
-
-
-class PlanUpdateEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- explanation: Annotated[
- str | None,
- Field(
- description="Arguments for the `update_plan` todo/checklist tool (not plan mode)."
- ),
- ] = None
- plan: list[PlanItemArg]
- type: Annotated[Literal["plan_update"], Field(title="PlanUpdateEventMsgType")]
-
-
-class ExitedReviewModeEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- review_output: ReviewOutputEvent | None = None
- type: Annotated[
- Literal["exited_review_mode"], Field(title="ExitedReviewModeEventMsgType")
- ]
-
-
-class ItemStartedEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- item: TurnItem
- thread_id: ThreadId
- turn_id: str
- type: Annotated[Literal["item_started"], Field(title="ItemStartedEventMsgType")]
-
-
-class ItemCompletedEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- item: TurnItem
- thread_id: ThreadId
- turn_id: str
- type: Annotated[Literal["item_completed"], Field(title="ItemCompletedEventMsgType")]
-
-
-class HookStartedEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- run: HookRunSummary
- turn_id: str | None = None
- type: Annotated[Literal["hook_started"], Field(title="HookStartedEventMsgType")]
-
-
-class HookCompletedEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- run: HookRunSummary
- turn_id: str | None = None
- type: Annotated[Literal["hook_completed"], Field(title="HookCompletedEventMsgType")]
-
-
class ExternalAgentConfigDetectResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -7407,6 +5664,12 @@ class ProfileV2(BaseModel):
populate_by_name=True,
)
approval_policy: AskForApproval | None = None
+ approvals_reviewer: Annotated[
+ ApprovalsReviewer | None,
+ Field(
+ description="[UNSTABLE] Optional profile-level override for where approval requests are routed for review. If omitted, the enclosing config default is used."
+ ),
+ ] = None
chatgpt_base_url: str | None = None
model: str | None = None
model_provider: str | None = None
@@ -7418,43 +5681,6 @@ class ProfileV2(BaseModel):
web_search: WebSearchMode | None = None
-class HandoffRequestedRealtimeEvent(BaseModel):
- model_config = ConfigDict(
- extra="forbid",
- populate_by_name=True,
- )
- handoff_requested: Annotated[
- RealtimeHandoffRequested, Field(alias="HandoffRequested")
- ]
-
-
-class RealtimeEvent(
- RootModel[
- SessionUpdatedRealtimeEvent
- | InputTranscriptDeltaRealtimeEvent
- | OutputTranscriptDeltaRealtimeEvent
- | AudioOutRealtimeEvent
- | ConversationItemAddedRealtimeEvent
- | ConversationItemDoneRealtimeEvent
- | HandoffRequestedRealtimeEvent
- | ErrorRealtimeEvent
- ]
-):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- root: (
- SessionUpdatedRealtimeEvent
- | InputTranscriptDeltaRealtimeEvent
- | OutputTranscriptDeltaRealtimeEvent
- | AudioOutRealtimeEvent
- | ConversationItemAddedRealtimeEvent
- | ConversationItemDoneRealtimeEvent
- | HandoffRequestedRealtimeEvent
- | ErrorRealtimeEvent
- )
-
-
class FunctionCallOutputResponseItem(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -7745,6 +5971,13 @@ class ThreadForkResponse(BaseModel):
populate_by_name=True,
)
approval_policy: Annotated[AskForApproval, Field(alias="approvalPolicy")]
+ approvals_reviewer: Annotated[
+ ApprovalsReviewer,
+ Field(
+ alias="approvalsReviewer",
+ description="Reviewer currently used for approval requests on this thread.",
+ ),
+ ]
cwd: str
model: str
model_provider: Annotated[str, Field(alias="modelProvider")]
@@ -7789,6 +6022,13 @@ class ThreadResumeResponse(BaseModel):
populate_by_name=True,
)
approval_policy: Annotated[AskForApproval, Field(alias="approvalPolicy")]
+ approvals_reviewer: Annotated[
+ ApprovalsReviewer,
+ Field(
+ alias="approvalsReviewer",
+ description="Reviewer currently used for approval requests on this thread.",
+ ),
+ ]
cwd: str
model: str
model_provider: Annotated[str, Field(alias="modelProvider")]
@@ -7817,6 +6057,13 @@ class ThreadStartResponse(BaseModel):
populate_by_name=True,
)
approval_policy: Annotated[AskForApproval, Field(alias="approvalPolicy")]
+ approvals_reviewer: Annotated[
+ ApprovalsReviewer,
+ Field(
+ alias="approvalsReviewer",
+ description="Reviewer currently used for approval requests on this thread.",
+ ),
+ ]
cwd: str
model: str
model_provider: Annotated[str, Field(alias="modelProvider")]
@@ -7883,9 +6130,17 @@ class ClientRequest(
| ThreadReadRequest
| SkillsListRequest
| PluginListRequest
+ | PluginReadRequest
| SkillsRemoteListRequest
| SkillsRemoteExportRequest
| AppListRequest
+ | FsReadFileRequest
+ | FsWriteFileRequest
+ | FsCreateDirectoryRequest
+ | FsGetMetadataRequest
+ | FsReadDirectoryRequest
+ | FsRemoveRequest
+ | FsCopyRequest
| SkillsConfigWriteRequest
| PluginInstallRequest
| PluginUninstallRequest
@@ -7938,9 +6193,17 @@ class ClientRequest(
| ThreadReadRequest
| SkillsListRequest
| PluginListRequest
+ | PluginReadRequest
| SkillsRemoteListRequest
| SkillsRemoteExportRequest
| AppListRequest
+ | FsReadFileRequest
+ | FsWriteFileRequest
+ | FsCreateDirectoryRequest
+ | FsGetMetadataRequest
+ | FsReadDirectoryRequest
+ | FsRemoveRequest
+ | FsCopyRequest
| SkillsConfigWriteRequest
| PluginInstallRequest
| PluginUninstallRequest
@@ -7984,6 +6247,12 @@ class Config(BaseModel):
)
analytics: AnalyticsConfig | None = None
approval_policy: AskForApproval | None = None
+ approvals_reviewer: Annotated[
+ ApprovalsReviewer | None,
+ Field(
+ description="[UNSTABLE] Optional default for where approval requests are routed for review."
+ ),
+ ] = None
compact_prompt: str | None = None
developer_instructions: str | None = None
forced_chatgpt_workspace_id: str | None = None
@@ -8015,27 +6284,6 @@ class ConfigReadResponse(BaseModel):
origins: dict[str, ConfigLayerMetadata]
-class RealtimeConversationRealtimeEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- payload: RealtimeEvent
- type: Annotated[
- Literal["realtime_conversation_realtime"],
- Field(title="RealtimeConversationRealtimeEventMsgType"),
- ]
-
-
-class RawResponseItemEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- item: ResponseItem
- type: Annotated[
- Literal["raw_response_item"], Field(title="RawResponseItemEventMsgType")
- ]
-
-
class RawResponseItemCompletedNotification(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -8073,6 +6321,8 @@ class ServerNotification(
| TurnDiffUpdatedServerNotification
| TurnPlanUpdatedServerNotification
| ItemStartedServerNotification
+ | ItemAutoApprovalReviewStartedServerNotification
+ | ItemAutoApprovalReviewCompletedServerNotification
| ItemCompletedServerNotification
| ItemAgentMessageDeltaServerNotification
| ItemPlanDeltaServerNotification
@@ -8125,6 +6375,8 @@ class ServerNotification(
| TurnDiffUpdatedServerNotification
| TurnPlanUpdatedServerNotification
| ItemStartedServerNotification
+ | ItemAutoApprovalReviewStartedServerNotification
+ | ItemAutoApprovalReviewCompletedServerNotification
| ItemCompletedServerNotification
| ItemAgentMessageDeltaServerNotification
| ItemPlanDeltaServerNotification
@@ -8160,248 +6412,3 @@ class ServerNotification(
title="ServerNotification",
),
]
-
-
-class SessionConfiguredEventMsg(BaseModel):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- approval_policy: Annotated[
- AskForApproval, Field(description="When to escalate for approval for execution")
- ]
- cwd: Annotated[
- str,
- Field(
- description="Working directory that should be treated as the *root* of the session."
- ),
- ]
- forked_from_id: ThreadId | None = None
- history_entry_count: Annotated[
- int, Field(description="Current number of entries in the history log.", ge=0)
- ]
- history_log_id: Annotated[
- int,
- Field(
- description="Identifier of the history log file (inode on Unix, 0 otherwise).",
- ge=0,
- ),
- ]
- initial_messages: Annotated[
- list[EventMsg] | None,
- Field(
- description="Optional initial messages (as events) for resumed sessions. When present, UIs can use these to seed the history."
- ),
- ] = None
- model: Annotated[
- str, Field(description="Tell the client what model is being queried.")
- ]
- model_provider_id: str
- network_proxy: Annotated[
- SessionNetworkProxyRuntime | None,
- Field(
- description="Runtime proxy bind addresses, when the managed proxy was started for this session."
- ),
- ] = None
- reasoning_effort: Annotated[
- ReasoningEffort | None,
- Field(
- description="The effort the model is putting into reasoning about the user's request."
- ),
- ] = None
- rollout_path: Annotated[
- str | None,
- Field(
- description="Path in which the rollout is stored. Can be `None` for ephemeral threads"
- ),
- ] = None
- sandbox_policy: Annotated[
- SandboxPolicy,
- Field(description="How to sandbox commands executed in the system"),
- ]
- service_tier: ServiceTier | None = None
- session_id: ThreadId
- thread_name: Annotated[
- str | None,
- Field(description="Optional user-facing thread name (may be unset)."),
- ] = None
- type: Annotated[
- Literal["session_configured"], Field(title="SessionConfiguredEventMsgType")
- ]
-
-
-class EventMsg(
- RootModel[
- ErrorEventMsg
- | WarningEventMsg
- | RealtimeConversationStartedEventMsg
- | RealtimeConversationRealtimeEventMsg
- | RealtimeConversationClosedEventMsg
- | ModelRerouteEventMsg
- | ContextCompactedEventMsg
- | ThreadRolledBackEventMsg
- | TaskStartedEventMsg
- | TaskCompleteEventMsg
- | TokenCountEventMsg
- | AgentMessageEventMsg
- | UserMessageEventMsg
- | AgentMessageDeltaEventMsg
- | AgentReasoningEventMsg
- | AgentReasoningDeltaEventMsg
- | AgentReasoningRawContentEventMsg
- | AgentReasoningRawContentDeltaEventMsg
- | AgentReasoningSectionBreakEventMsg
- | SessionConfiguredEventMsg
- | ThreadNameUpdatedEventMsg
- | McpStartupUpdateEventMsg
- | McpStartupCompleteEventMsg
- | McpToolCallBeginEventMsg
- | McpToolCallEndEventMsg
- | WebSearchBeginEventMsg
- | WebSearchEndEventMsg
- | ImageGenerationBeginEventMsg
- | ImageGenerationEndEventMsg
- | ExecCommandBeginEventMsg
- | ExecCommandOutputDeltaEventMsg
- | TerminalInteractionEventMsg
- | ExecCommandEndEventMsg
- | ViewImageToolCallEventMsg
- | ExecApprovalRequestEventMsg
- | RequestPermissionsEventMsg
- | RequestUserInputEventMsg
- | DynamicToolCallRequestEventMsg
- | DynamicToolCallResponseEventMsg
- | ElicitationRequestEventMsg
- | ApplyPatchApprovalRequestEventMsg
- | DeprecationNoticeEventMsg
- | BackgroundEventEventMsg
- | UndoStartedEventMsg
- | UndoCompletedEventMsg
- | StreamErrorEventMsg
- | PatchApplyBeginEventMsg
- | PatchApplyEndEventMsg
- | TurnDiffEventMsg
- | GetHistoryEntryResponseEventMsg
- | McpListToolsResponseEventMsg
- | ListCustomPromptsResponseEventMsg
- | ListSkillsResponseEventMsg
- | ListRemoteSkillsResponseEventMsg
- | RemoteSkillDownloadedEventMsg
- | SkillsUpdateAvailableEventMsg
- | PlanUpdateEventMsg
- | TurnAbortedEventMsg
- | ShutdownCompleteEventMsg
- | EnteredReviewModeEventMsg
- | ExitedReviewModeEventMsg
- | RawResponseItemEventMsg
- | ItemStartedEventMsg
- | ItemCompletedEventMsg
- | HookStartedEventMsg
- | HookCompletedEventMsg
- | AgentMessageContentDeltaEventMsg
- | PlanDeltaEventMsg
- | ReasoningContentDeltaEventMsg
- | ReasoningRawContentDeltaEventMsg
- | CollabAgentSpawnBeginEventMsg
- | CollabAgentSpawnEndEventMsg
- | CollabAgentInteractionBeginEventMsg
- | CollabAgentInteractionEndEventMsg
- | CollabWaitingBeginEventMsg
- | CollabWaitingEndEventMsg
- | CollabCloseBeginEventMsg
- | CollabCloseEndEventMsg
- | CollabResumeBeginEventMsg
- | CollabResumeEndEventMsg
- ]
-):
- model_config = ConfigDict(
- populate_by_name=True,
- )
- root: Annotated[
- ErrorEventMsg
- | WarningEventMsg
- | RealtimeConversationStartedEventMsg
- | RealtimeConversationRealtimeEventMsg
- | RealtimeConversationClosedEventMsg
- | ModelRerouteEventMsg
- | ContextCompactedEventMsg
- | ThreadRolledBackEventMsg
- | TaskStartedEventMsg
- | TaskCompleteEventMsg
- | TokenCountEventMsg
- | AgentMessageEventMsg
- | UserMessageEventMsg
- | AgentMessageDeltaEventMsg
- | AgentReasoningEventMsg
- | AgentReasoningDeltaEventMsg
- | AgentReasoningRawContentEventMsg
- | AgentReasoningRawContentDeltaEventMsg
- | AgentReasoningSectionBreakEventMsg
- | SessionConfiguredEventMsg
- | ThreadNameUpdatedEventMsg
- | McpStartupUpdateEventMsg
- | McpStartupCompleteEventMsg
- | McpToolCallBeginEventMsg
- | McpToolCallEndEventMsg
- | WebSearchBeginEventMsg
- | WebSearchEndEventMsg
- | ImageGenerationBeginEventMsg
- | ImageGenerationEndEventMsg
- | ExecCommandBeginEventMsg
- | ExecCommandOutputDeltaEventMsg
- | TerminalInteractionEventMsg
- | ExecCommandEndEventMsg
- | ViewImageToolCallEventMsg
- | ExecApprovalRequestEventMsg
- | RequestPermissionsEventMsg
- | RequestUserInputEventMsg
- | DynamicToolCallRequestEventMsg
- | DynamicToolCallResponseEventMsg
- | ElicitationRequestEventMsg
- | ApplyPatchApprovalRequestEventMsg
- | DeprecationNoticeEventMsg
- | BackgroundEventEventMsg
- | UndoStartedEventMsg
- | UndoCompletedEventMsg
- | StreamErrorEventMsg
- | PatchApplyBeginEventMsg
- | PatchApplyEndEventMsg
- | TurnDiffEventMsg
- | GetHistoryEntryResponseEventMsg
- | McpListToolsResponseEventMsg
- | ListCustomPromptsResponseEventMsg
- | ListSkillsResponseEventMsg
- | ListRemoteSkillsResponseEventMsg
- | RemoteSkillDownloadedEventMsg
- | SkillsUpdateAvailableEventMsg
- | PlanUpdateEventMsg
- | TurnAbortedEventMsg
- | ShutdownCompleteEventMsg
- | EnteredReviewModeEventMsg
- | ExitedReviewModeEventMsg
- | RawResponseItemEventMsg
- | ItemStartedEventMsg
- | ItemCompletedEventMsg
- | HookStartedEventMsg
- | HookCompletedEventMsg
- | AgentMessageContentDeltaEventMsg
- | PlanDeltaEventMsg
- | ReasoningContentDeltaEventMsg
- | ReasoningRawContentDeltaEventMsg
- | CollabAgentSpawnBeginEventMsg
- | CollabAgentSpawnEndEventMsg
- | CollabAgentInteractionBeginEventMsg
- | CollabAgentInteractionEndEventMsg
- | CollabWaitingBeginEventMsg
- | CollabWaitingEndEventMsg
- | CollabCloseBeginEventMsg
- | CollabCloseEndEventMsg
- | CollabResumeBeginEventMsg
- | CollabResumeEndEventMsg,
- Field(
- description="Response event from the agent NOTE: Make sure none of these values have optional types, as it will mess up the extension code-gen.",
- title="EventMsg",
- ),
- ]
-
-
-SessionConfiguredEventMsg.model_rebuild()
diff --git a/sdk/python/tests/test_artifact_workflow_and_binaries.py b/sdk/python/tests/test_artifact_workflow_and_binaries.py
index 90446451d1..938de05e28 100644
--- a/sdk/python/tests/test_artifact_workflow_and_binaries.py
+++ b/sdk/python/tests/test_artifact_workflow_and_binaries.py
@@ -117,7 +117,7 @@ def test_python_codegen_schema_annotation_adds_stable_variant_titles() -> None:
]
assert ask_for_approval_titles == [
"AskForApprovalValue",
- "RejectAskForApproval",
+ "GranularAskForApproval",
]
reasoning_summary_titles = [