v2
Class info¶
Re-exported classes¶
| Class | Module | Description |
|---|---|---|
| AcceptElicitationResponse | aclientp.schema.v2.elicitation | The user accepted and provided content. |
| AddDiffChange | aclientp.schema.v2.tool_calls | A file was added. |
| AgentAuthCapabilities | aclientp.schema.v2.capabilities | Authentication-related extension capabilities supported by the agent. |
| AgentCapabilities | aclientp.schema.v2.capabilities | Capabilities supported by the agent. |
| AgentMessage | aclientp.schema.v2.messages | An agent message upsert, in addition to or instead of streamed chunks. |
| AgentMessageChunk | aclientp.schema.v2.messages | A chunk of the agent's response being streamed. |
| AgentMessageCursorAnchor | aclientp.schema.v2.cursors | UNSTABLE: The cursor is next to an agent message. |
| AgentNotification | aclientp.schema.v2.protocol | A notification the agent sends to the client. |
| AgentRequest | aclientp.schema.v2.protocol | A request the agent sends to the client (a :data:ClientMethod). |
| AgentThought | aclientp.schema.v2.messages | An agent thought (reasoning) message upsert. |
| AgentThoughtChunk | aclientp.schema.v2.messages | A chunk of the agent's internal reasoning being streamed. |
| AgentThoughtCursorAnchor | aclientp.schema.v2.cursors | UNSTABLE: The cursor is next to an agent thought. |
| AnnotatedObject | aclientp.schema.v2.base | A v2 object with the _meta extension point. |
| Annotations | aclientp.schema.v2.common | Hints for the client on how an object is used or displayed. |
| ArchiveSessionRequest | aclientp.schema.v2.sessions | UNSTABLE: Request parameters for archiving a session. |
| ArchiveSessionResponse | aclientp.schema.v2.sessions | UNSTABLE: Response from archiving a session. |
| AudioContent | aclientp.schema.v2.content | Audio provided to or from an LLM. Requires the audio prompt capability. |
| AuthAccount | aclientp.schema.v2.auth | UNSTABLE: An account or credential the agent has configured. |
| AuthMethodAgent | aclientp.schema.v2.auth | Agent handles authentication itself through auth/login. |
| AuthMethodTerminal | aclientp.schema.v2.auth | Terminal-based authentication method. |
| AuthStatusCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Auth status capabilities supported by the agent. |
| AuthStatusRequest | aclientp.schema.v2.auth | UNSTABLE: Request parameters for the auth/status method. |
| AuthStatusResponse | aclientp.schema.v2.auth | UNSTABLE: Response to the auth/status method. |
| AuthStatusUpdateNotification | aclientp.schema.v2.auth | UNSTABLE: Notification sent by the agent when its authentication status changes. |
| AvailableCommandsUpdate | aclientp.schema.v2.session_updates | The available commands are ready or have changed. |
| BackgroundSubagent | aclientp.schema.v2.prompt | A detached subagent session that has anything running. |
| BackgroundTerminal | aclientp.schema.v2.prompt | A process that keeps running after its tool call returned control to the model. |
| BackgroundToolCall | aclientp.schema.v2.prompt | Work of a tool call that continues without a process of its own, e.g. a watcher. |
| BlobResourceContents | aclientp.schema.v2.content | Binary contents of a resource. |
| BooleanPropertySchema | aclientp.schema.v2.elicitation | Schema for boolean properties in an elicitation form. |
| BooleanSessionConfigOption | aclientp.schema.v2.config_options | An on/off toggle. |
| CancelElicitationResponse | aclientp.schema.v2.elicitation | The elicitation was cancelled. |
| CancelRequestNotification | aclientp.schema.v2.protocol | Parameters of $/cancel_request: cancel an ongoing request. |
| CancelSessionNotification | aclientp.schema.v2.sessions | Notification to cancel a session's foreground work and its prompts not yet inserted. |
| CancelTerminalRequest | aclientp.schema.v2.terminals | Parameters of terminal/cancel: cancel one terminal. |
| CancelTerminalResponse | aclientp.schema.v2.terminals | Response from cancelling a terminal. |
| CancelToolCallRequest | aclientp.schema.v2.tool_calls | Parameters of tool_call/cancel: cancel one tool call. |
| CancelToolCallResponse | aclientp.schema.v2.tool_calls | Response to tool_call/cancel. |
| CancelledPermissionOutcome | aclientp.schema.v2.permissions | No option was selected, e.g. because the session's work was cancelled. |
| ClientAuthCapabilities | aclientp.schema.v2.capabilities | Authentication capabilities supported by the client. |
| ClientCapabilities | aclientp.schema.v2.capabilities | Capabilities supported by the client. |
| ClientNotification | aclientp.schema.v2.protocol | A notification the client sends to the agent. |
| ClientRequest | aclientp.schema.v2.protocol | A request the client sends to the agent (an :data:AgentMethod). |
| ClientSessionCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Session-related capabilities supported by the client. |
| CloseSessionRequest | aclientp.schema.v2.sessions | Request parameters for closing an active session. |
| CloseSessionResponse | aclientp.schema.v2.sessions | Response from closing a session. |
| Command | aclientp.schema.v2.commands | A slash command the user invokes by including /name in a prompt. |
| CommandPermissionSubject | aclientp.schema.v2.permissions | Permission is requested before running a command. |
| CommandsCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Command types the client understands in addition to command. |
| CommandsSkillCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Client support for skill command entries. |
| CompactionSummaryChunk | aclientp.schema.v2.session_updates | A content block appended to a compaction's summary. |
| CompactionUpdate | aclientp.schema.v2.session_updates | A context compaction upsert, keyed by compaction_id. |
| CompleteElicitationNotification | aclientp.schema.v2.elicitation | Notification sent by the agent when a URL-based elicitation is complete. |
| ConfigOptionUpdate | aclientp.schema.v2.session_updates | The session's config options have changed. |
| Content | aclientp.schema.v2.tool_calls | A standard content block (text, image, resource) produced by a tool call. |
| CopyDiffChange | aclientp.schema.v2.tool_calls | A file was copied. |
| Cost | aclientp.schema.v2.common | Cumulative cost of a session. |
| CursorCapabilities | aclientp.schema.v2.cursors | UNSTABLE: The methods that currently accept a cursor. |
| CursorCompactionAnchor | aclientp.schema.v2.cursors | UNSTABLE: The cursor is next to a context compaction. |
| CursorForkCapabilities | aclientp.schema.v2.cursors | UNSTABLE: The cursor can be passed to session/fork as cursorId. |
| CursorMessageAnchor | aclientp.schema.v2.cursors | UNSTABLE: A cursor anchored to a message; type names the kind of message. |
| CursorToolCallAnchor | aclientp.schema.v2.cursors | UNSTABLE: The cursor is next to a tool call. |
| CursorUpdate | aclientp.schema.v2.cursors | UNSTABLE: A session cursor upsert, keyed by cursor_id. |
| DeclineElicitationResponse | aclientp.schema.v2.elicitation | The user declined. |
| DeleteDiffChange | aclientp.schema.v2.tool_calls | A file was deleted. |
| DeleteSessionRequest | aclientp.schema.v2.sessions | Request parameters for deleting an existing session from session/list. |
| DeleteSessionResponse | aclientp.schema.v2.sessions | Response from deleting a session. |
| Diff | aclientp.schema.v2.tool_calls | File changes produced by a tool call. |
| DiffPatch | aclientp.schema.v2.tool_calls | Renderable patch text and its format. |
| DisableProviderRequest | aclientp.schema.v2.providers | UNSTABLE: Request parameters for providers/disable. |
| DisableProviderResponse | aclientp.schema.v2.providers | UNSTABLE: Response to providers/disable. |
| ElicitationCapabilities | aclientp.schema.v2.capabilities | Elicitation capabilities supported by the client. |
| ElicitationFormCapabilities | aclientp.schema.v2.capabilities | Form-based elicitation capabilities. |
| ElicitationSchema | aclientp.schema.v2.elicitation | Type-safe elicitation schema for requesting structured user input. |
| ElicitationUrlCapabilities | aclientp.schema.v2.capabilities | URL-based elicitation capabilities. |
| EmbeddedResource | aclientp.schema.v2.content | Resource contents embedded in a prompt or tool call result. |
| EnumOption | aclientp.schema.v2.elicitation | A titled enum option with a const value, human-readable title, and optional description. |
| EnvVariable | aclientp.schema.v2.common | An environment variable to set when launching a process. |
| Error | aclientp.schema.v2.common | A JSON-RPC error object. |
| ErrorResponse | aclientp.schema.v2.protocol | A failed JSON-RPC response. |
| ForkSessionRequest | aclientp.schema.v2.sessions | UNSTABLE: Request parameters for forking an existing session. |
| ForkSessionResponse | aclientp.schema.v2.sessions | UNSTABLE: Response from forking an existing session. |
| FormElicitationRequest | aclientp.schema.v2.elicitation | The client renders a form from requested_schema. |
| HttpHeader | aclientp.schema.v2.common | An HTTP header to send with requests. |
| Icon | aclientp.schema.v2.common | An optionally sized icon a user interface can display. |
| IdleStateSessionUpdate | aclientp.schema.v2.session_updates | state_update: no foreground work is active. |
| IdleStateUpdate | aclientp.schema.v2.prompt | No foreground work is active; background work may continue. |
| ImageContent | aclientp.schema.v2.content | An image provided to or from an LLM. Requires the image prompt capability. |
| Implementation | aclientp.schema.v2.common | Name and version of a client or agent implementation. |
| InitialConfigOptionBoolean | aclientp.schema.v2.config_options | UNSTABLE: Initial value of a boolean config option. |
| InitialConfigOptionId | aclientp.schema.v2.config_options | UNSTABLE: Initial value of a select config option. |
| InitialConfigOptionUnknown | aclientp.schema.v2.config_options | UNSTABLE: Initial value of a custom or future kind of config option. |
| InitializeProxyRequest | aclientp.schema.v2.protocol | UNSTABLE: Parameters of proxy/initialize, sent instead of initialize. |
| InitializeProxyResponse | aclientp.schema.v2.protocol | UNSTABLE: Response to proxy/initialize; the same as an initialize response. |
| InitializeRequest | aclientp.schema.v2.initialize | Request parameters for the initialize method. |
| InitializeResponse | aclientp.schema.v2.initialize | Response to the initialize method. |
| IntegerPropertySchema | aclientp.schema.v2.elicitation | Schema for integer properties in an elicitation form. |
| ListProvidersRequest | aclientp.schema.v2.providers | UNSTABLE: Request parameters for providers/list. |
| ListProvidersResponse | aclientp.schema.v2.providers | UNSTABLE: Response to providers/list. |
| ListSessionsRequest | aclientp.schema.v2.sessions | Request parameters for listing existing sessions. |
| ListSessionsResponse | aclientp.schema.v2.sessions | Response from listing sessions. |
| LoginAuthRequest | aclientp.schema.v2.auth | Request parameters for the auth/login method. |
| LoginAuthResponse | aclientp.schema.v2.auth | Response to the auth/login method. |
| LogoutAuthRequest | aclientp.schema.v2.auth | Request parameters for the auth/logout method. |
| LogoutAuthResponse | aclientp.schema.v2.auth | Response to the auth/logout method. |
| McpAcpCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Capabilities for ACP MCP server transports. |
| McpCapabilities | aclientp.schema.v2.capabilities | MCP capabilities supported by the agent for session lifecycle requests. |
| McpError | aclientp.schema.v2.mcp | UNSTABLE: An inner MCP error, distinct from an outer ACP error. |
| McpHttpCapabilities | aclientp.schema.v2.capabilities | Capabilities for HTTP MCP server transports. |
| McpServerAcp | aclientp.schema.v2.mcp | UNSTABLE: ACP transport configuration for MCP. |
| McpServerHttp | aclientp.schema.v2.mcp | HTTP transport configuration for MCP. |
| McpServerStdio | aclientp.schema.v2.mcp | Stdio transport configuration for MCP. |
| McpStdioCapabilities | aclientp.schema.v2.capabilities | Capabilities for stdio MCP server transports. |
| MessageMcpError | aclientp.schema.v2.mcp | UNSTABLE: Successful mcp/message call whose inner MCP request failed. |
| MessageMcpNotification | aclientp.schema.v2.mcp | UNSTABLE: Notification for an active inner MCP request, from provider to consumer. |
| MessageMcpRequest | aclientp.schema.v2.mcp | UNSTABLE: Parameters of mcp/message: an inner MCP request to the provider. |
| MessageMcpResult | aclientp.schema.v2.mcp | UNSTABLE: Successful mcp/message outcome: an opaque inner MCP result. |
| ModifyDiffChange | aclientp.schema.v2.tool_calls | A file was modified in place. |
| MoveDiffChange | aclientp.schema.v2.tool_calls | A file was moved or renamed. |
| MultiSelectPropertySchema | aclientp.schema.v2.elicitation | Schema for multi-select (array) properties in an elicitation form. |
| NewSessionRequest | aclientp.schema.v2.sessions | Request parameters for creating a new session. |
| NewSessionResponse | aclientp.schema.v2.sessions | Response from creating a new session. |
| Notice | aclientp.schema.v2.session_updates | Fire-and-forget information for the user, not part of session history. |
| NumberPropertySchema | aclientp.schema.v2.elicitation | Schema for number (floating-point) properties in an elicitation form. |
| OtherStateSessionUpdate | aclientp.schema.v2.session_updates | state_update with a custom or future state. |
| OtherStateUpdate | aclientp.schema.v2.prompt | A custom or future state; state values starting with _ are extensions. |
| PermissionOption | aclientp.schema.v2.permissions | An option offered to the user. |
| PlanEntry | aclientp.schema.v2.plans | A task or goal the agent intends to accomplish. |
| PlanItems | aclientp.schema.v2.plans | A plan as structured entries. |
| PlanMarkdown | aclientp.schema.v2.plans | UNSTABLE: A plan as raw markdown content. |
| PlanRemoved | aclientp.schema.v2.plans | UNSTABLE: The plan with this ID was removed. |
| PlanUpdate | aclientp.schema.v2.plans | New content of the plan identified by its plan_id. |
| PromptAudioCapabilities | aclientp.schema.v2.capabilities | Capabilities for audio content in prompt requests. |
| PromptCapabilities | aclientp.schema.v2.capabilities | Prompt capabilities supported by the agent in session/prompt requests. |
| PromptEmbeddedContextCapabilities | aclientp.schema.v2.capabilities | Capabilities for embedded context in prompt requests. |
| PromptImageCapabilities | aclientp.schema.v2.capabilities | Capabilities for image content in prompt requests. |
| PromptRequest | aclientp.schema.v2.prompt | Parameters of session/prompt: a user message for the session. |
| PromptResponse | aclientp.schema.v2.prompt | Acknowledges that the user message was inserted into the conversation. |
| PromptSkillCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Capabilities for skill content blocks in prompt requests. |
| PromptSkillInlineCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Capabilities for skill content blocks at any position in a prompt. |
| PromptSuggestion | aclientp.schema.v2.session_updates | UNSTABLE: A prompt the agent predicts the user will send next. |
| PromptSuggestionsAudioCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Capabilities for audio content in prompt suggestions. |
| PromptSuggestionsCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Client support for prompt_suggestions_update session updates. |
| PromptSuggestionsEmbeddedContextCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Capabilities for embedded resources in prompt suggestions. |
| PromptSuggestionsImageCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Capabilities for image content in prompt suggestions. |
| PromptSuggestionsUpdate | aclientp.schema.v2.session_updates | UNSTABLE: Replaces the session's prompt suggestions. |
| ProviderCurrentConfig | aclientp.schema.v2.providers | UNSTABLE: Current effective non-secret routing configuration for a provider. |
| ProviderInfo | aclientp.schema.v2.providers | UNSTABLE: Information about a configurable LLM provider. |
| ProvidersCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Provider configuration capabilities supported by the agent. |
| ProxyNotification | aclientp.schema.v2.protocol | UNSTABLE: A notification to a proxy in a proxy chain. |
| ProxyRequest | aclientp.schema.v2.protocol | UNSTABLE: A request to a proxy in a proxy chain (a :data:ProxyMethod). |
| ProxySuccessorNotification | aclientp.schema.v2.protocol | UNSTABLE: Parameters of a proxy/successor notification: a wrapped notification. |
| ProxySuccessorRequest | aclientp.schema.v2.protocol | UNSTABLE: Parameters of a proxy/successor request: a wrapped request. |
| ReplayComplete | aclientp.schema.v2.session_updates | The history replay requested by session/resume is complete. |
| ReplayFromStart | aclientp.schema.v2.sessions | Replay all retained conversation history from its first replayable entry. |
| RequestPermissionRequest | aclientp.schema.v2.permissions | Parameters of session/request_permission. |
| RequestPermissionResponse | aclientp.schema.v2.permissions | Response to session/request_permission. |
| RequestTypes | aclientp.schema.v2.protocol | Validators of a request method's parameters and result. |
| RequiresActionStateSessionUpdate | aclientp.schema.v2.session_updates | state_update: foreground work is blocked on user action. |
| RequiresActionStateUpdate | aclientp.schema.v2.prompt | The foreground workflow as a whole is blocked on user action. |
| ResourceLink | aclientp.schema.v2.content | A link to a resource the receiver may be able to read. All agents MUST support it. |
| ResultResponse | aclientp.schema.v2.protocol | A successful JSON-RPC response. |
| ResumeSessionRequest | aclientp.schema.v2.sessions | Request parameters for resuming an existing session. |
| ResumeSessionResponse | aclientp.schema.v2.sessions | Response from resuming an existing session. |
| RunningStateSessionUpdate | aclientp.schema.v2.session_updates | state_update: foreground work is in progress. |
| RunningStateUpdate | aclientp.schema.v2.prompt | Foreground work is in progress. |
| Schema | aclientp.schema.v2.base | Base class of all v2 models. |
| SelectSessionConfigOption | aclientp.schema.v2.config_options | A single-value selector (dropdown). |
| SelectedPermissionOutcome | aclientp.schema.v2.permissions | The user selected one of the offered options. |
| SessionAdditionalDirectoriesCapabilities | aclientp.schema.v2.capabilities | Capabilities for additional session directories support. |
| SessionArchiveCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Capabilities for session/archive and session/unarchive. |
| SessionCancelCapabilities | aclientp.schema.v2.subagents | A subagent session's work can be cancelled (session/cancel) without ending it. |
| SessionCapabilities | aclientp.schema.v2.capabilities | Session capabilities supported by the agent. |
| SessionConfigSelectGroup | aclientp.schema.v2.config_options | A group of possible values of a select config option. |
| SessionConfigSelectOption | aclientp.schema.v2.config_options | A possible value of a select config option. |
| SessionDeleteCapabilities | aclientp.schema.v2.capabilities | Capabilities for the session/delete method. |
| SessionForkCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Capabilities for the session/fork method. |
| SessionInfo | aclientp.schema.v2.sessions | Information about a session returned by session/list. |
| SessionInfoUpdate | aclientp.schema.v2.session_updates | Partial update of session metadata; None clears a field. |
| SessionMessage | aclientp.schema.v2.messages | An upsert of a message sent to or received from another session. |
| SessionMessageChunk | aclientp.schema.v2.messages | A content block appended to a session message. |
| SessionMessageCursorAnchor | aclientp.schema.v2.cursors | UNSTABLE: The cursor is next to a session-directed message. |
| SessionNotFoundErrorData | aclientp.schema.v2.common | Data of the -32002 (Resource not found) error for an unknown or inactive session. |
| SessionOptionsCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Capabilities for the session/options method. |
| SessionOptionsRequest | aclientp.schema.v2.sessions | UNSTABLE: Parameters of session/options. |
| SessionOptionsResponse | aclientp.schema.v2.sessions | UNSTABLE: Response from session/options. |
| SessionReference | aclientp.schema.v2.tool_calls | A display-only reference to another session the tool call operates on, e.g. a subagent. |
| SessionStatusCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Capabilities for the session/status method. |
| SessionStatusRequest | aclientp.schema.v2.sessions | UNSTABLE: Request parameters for checking the status of a session. |
| SessionStatusResponse | aclientp.schema.v2.sessions | UNSTABLE: Response from checking the status of a session. |
| SessionSystemPromptCapabilities | aclientp.schema.v2.capabilities | Capabilities for client-provided system prompts. |
| SessionSystemPromptModeCapabilities | aclientp.schema.v2.capabilities | System prompt delivery modes the agent supports in addition to append. |
| SessionSystemPromptOverrideCapabilities | aclientp.schema.v2.capabilities | Capabilities for the override system prompt mode. |
| SessionTitleCapabilities | aclientp.schema.v2.capabilities | UNSTABLE: Capabilities for Client-set session titles. |
| SetConfigOptionBooleanRequest | aclientp.schema.v2.config_options | Set a boolean config option. |
| SetConfigOptionIdRequest | aclientp.schema.v2.config_options | Select a value of a select config option. |
| SetConfigOptionUnknownRequest | aclientp.schema.v2.config_options | Set a custom or future kind of config option. |
| SetProviderRequest | aclientp.schema.v2.providers | UNSTABLE: Request parameters for providers/set. |
| SetProviderResponse | aclientp.schema.v2.providers | UNSTABLE: Response to providers/set. |
| SetSessionConfigOptionResponse | aclientp.schema.v2.config_options | Response to session/set_config_option. |
| SetSessionTitleRequest | aclientp.schema.v2.sessions | UNSTABLE: Request parameters for setting the title of a session. |
| SetSessionTitleResponse | aclientp.schema.v2.sessions | UNSTABLE: Response from setting the title of a session. |
| Skill | aclientp.schema.v2.commands | UNSTABLE: An Agent Skill the user invokes with a skill content block. |
| SkillReference | aclientp.schema.v2.content | UNSTABLE: A skill the user invokes with a prompt. |
| StringMultiSelectItems | aclientp.schema.v2.elicitation | String item schema for multi-select enum properties. |
| StringPropertySchema | aclientp.schema.v2.elicitation | Schema for string properties in an elicitation form. |
| SubagentSessionCapabilities | aclientp.schema.v2.subagents | Client-initiated mutations permitted for a specific subagent session. |
| SubagentUpdate | aclientp.schema.v2.subagents | The parent session created and owns a child session, or the association changed. |
| SystemPrompt | aclientp.schema.v2.sessions | Client-provided system-level instructions for a session. |
| Terminal | aclientp.schema.v2.tool_calls | A display-only reference to an agent-owned terminal. |
| TerminalAuthCapabilities | aclientp.schema.v2.capabilities | Capabilities for terminal authentication methods. |
| TerminalCancelCapabilities | aclientp.schema.v2.terminals | Capability to cancel a terminal with terminal/cancel. |
| TerminalCapabilities | aclientp.schema.v2.terminals | Client-initiated controls a terminal currently supports. |
| TerminalExitStatus | aclientp.schema.v2.terminals | Exit information for an agent-owned terminal. |
| TerminalOutput | aclientp.schema.v2.terminals | An authoritative replacement snapshot of terminal output bytes. |
| TerminalOutputChunk | aclientp.schema.v2.terminals | A chunk of bytes appended to an agent-owned terminal's output. |
| TerminalSize | aclientp.schema.v2.terminals | The size of an agent-owned terminal in character cells. |
| TerminalUpdate | aclientp.schema.v2.terminals | An upsert of an agent-owned terminal's state, keyed by terminal_id. |
| TextCommandInput | aclientp.schema.v2.commands | All text typed after the command name (and the following whitespace) is the input. |
| TextContent | aclientp.schema.v2.content | Text provided to or from an LLM. All agents MUST support it in prompts. |
| TextResourceContents | aclientp.schema.v2.content | Text contents of a resource. |
| TitledMultiSelectItems | aclientp.schema.v2.elicitation | Items definition for titled multi-select enum properties. |
| ToolCallCancelCapabilities | aclientp.schema.v2.tool_calls | The tool call can be cancelled with tool_call/cancel. |
| ToolCallCapabilities | aclientp.schema.v2.tool_calls | Client-initiated controls a tool call currently supports. |
| ToolCallContentChunk | aclientp.schema.v2.tool_calls | A content item appended to a tool call's content. |
| ToolCallLocation | aclientp.schema.v2.tool_calls | A file location a tool reads or modifies, for "follow-along" features. |
| ToolCallPermissionSubject | aclientp.schema.v2.permissions | Permission is requested before executing a tool call. |
| ToolCallSessionUpdate | aclientp.schema.v2.session_updates | tool_call_update: a tool call was created or updated. |
| ToolCallUpdate | aclientp.schema.v2.tool_calls | A tool call upsert, keyed by tool_call_id. |
| UnarchiveSessionRequest | aclientp.schema.v2.sessions | UNSTABLE: Request parameters for unarchiving a session. |
| UnarchiveSessionResponse | aclientp.schema.v2.sessions | UNSTABLE: Response from unarchiving a session. |
| Unknown | aclientp.schema.v2.base | Base of fallback variants of open unions: a custom or future variant. |
| UnknownAuthMethod | aclientp.schema.v2.auth | A custom or future auth method; type values starting with _ are extensions. |
| UnknownBackgroundWork | aclientp.schema.v2.prompt | Custom or future background work; type values starting with _ are extensions. |
| UnknownCommand | aclientp.schema.v2.commands | A custom or future command kind; type values starting with _ are extensions. |
| UnknownCommandInput | aclientp.schema.v2.commands | A custom or future input kind; type values starting with _ are extensions. |
| UnknownContent | aclientp.schema.v2.content | A custom or future content block; type values starting with _ are extensions. |
| UnknownCursorAnchor | aclientp.schema.v2.cursors | UNSTABLE: A custom or future anchor kind; the client cannot place such a cursor. |
| UnknownDiffChange | aclientp.schema.v2.tool_calls | A custom or future file operation; values starting with _ are extensions. |
| UnknownElicitationRequest | aclientp.schema.v2.elicitation | A custom or future mode; values starting with _ are extensions. |
| UnknownElicitationResponse | aclientp.schema.v2.elicitation | A custom or future action; values starting with _ are extensions. |
| UnknownMcpServer | aclientp.schema.v2.mcp | A custom or future MCP transport; type values starting with _ are extensions. |
| UnknownMultiSelectItems | aclientp.schema.v2.elicitation | Custom or future typed multi-select items. |
| UnknownPermissionOutcome | aclientp.schema.v2.permissions | A custom or future outcome; values starting with _ are extensions. |
| UnknownPermissionSubject | aclientp.schema.v2.permissions | A custom or future subject; type values starting with _ are extensions. |
| UnknownPlanContent | aclientp.schema.v2.plans | Custom or future plan content; type values starting with _ are extensions. |
| UnknownPropertySchema | aclientp.schema.v2.elicitation | A custom or future property type; values starting with _ are extensions. |
| UnknownReplayFrom | aclientp.schema.v2.sessions | A custom or future replay cursor; type values starting with _ are extensions. |
| UnknownSessionConfigOption | aclientp.schema.v2.config_options | A custom or future option kind; type values starting with _ are extensions. |
| UnknownSessionUpdate | aclientp.schema.v2.session_updates | A custom or future session update; values starting with _ are extensions. |
| UnknownStateSessionUpdate | aclientp.schema.v2.session_updates | state_update: the agent cannot currently determine foreground activity. |
| UnknownStateUpdate | aclientp.schema.v2.prompt | The agent cannot currently determine foreground activity. |
| UnknownToolCallContent | aclientp.schema.v2.tool_calls | Custom or future tool call content; type values starting with _ are extensions. |
| UnsupportedProtocolVersionErrorData | aclientp.schema.v2.common | Data of the -32022 (Unsupported protocol version) error. |
| UpdateSessionNotification | aclientp.schema.v2.session_updates | Parameters of session/update: one update of a session. |
| UrlElicitationRequest | aclientp.schema.v2.elicitation | The client directs the user to url. |
| Usage | aclientp.schema.v2.common | UNSTABLE: Token usage of the foreground work that just completed (not cumulative). |
| UsageUpdate | aclientp.schema.v2.session_updates | Context window and cost of the session. |
| UserMessage | aclientp.schema.v2.messages | A user message upsert, e.g. when the agent accepts or replaces a prompt. |
| UserMessageChunk | aclientp.schema.v2.messages | A chunk of the user's message being streamed. |
| UserMessageCursorAnchor | aclientp.schema.v2.cursors | UNSTABLE: The cursor is next to a user message. |
🛈 DocStrings¶
UNSTABLE: Models of the draft ACP v2 protocol.
Written against the pinned upstream schema in schema/v2/ and checked by
python -m aclientp.schema_reference --protocol 2 check. See :mod:aclientp.schema.v2.base
for the wire rules: optional fields default to MISSING and are left out, None
is sent as null; serialize with :func:to_wire and test fields with :func:is_set.
AGENT_NOTIFICATIONS
module-attribute
¶
AGENT_NOTIFICATIONS: dict[str, TypeAdapter[Any]] = {
"session/cancel": TypeAdapter(CancelSessionNotification),
"mcp/message": TypeAdapter(MessageMcpNotification),
}
Notifications the agent handles.
AGENT_REQUESTS
module-attribute
¶
AGENT_REQUESTS: dict[str, RequestTypes] = {
"initialize": RequestTypes.of(InitializeRequest, InitializeResponse),
"auth/login": RequestTypes.of(LoginAuthRequest, LoginAuthResponse),
"auth/logout": RequestTypes.of(LogoutAuthRequest, LogoutAuthResponse),
"auth/status": RequestTypes.of(AuthStatusRequest, AuthStatusResponse),
"providers/list": RequestTypes.of(ListProvidersRequest, ListProvidersResponse),
"providers/set": RequestTypes.of(SetProviderRequest, SetProviderResponse),
"providers/disable": RequestTypes.of(DisableProviderRequest, DisableProviderResponse),
"session/new": RequestTypes.of(NewSessionRequest, NewSessionResponse),
"session/resume": RequestTypes.of(ResumeSessionRequest, ResumeSessionResponse),
"session/fork": RequestTypes.of(ForkSessionRequest, ForkSessionResponse),
"session/close": RequestTypes.of(CloseSessionRequest, CloseSessionResponse),
"session/list": RequestTypes.of(ListSessionsRequest, ListSessionsResponse),
"session/delete": RequestTypes.of(DeleteSessionRequest, DeleteSessionResponse),
"session/archive": RequestTypes.of(ArchiveSessionRequest, ArchiveSessionResponse),
"session/unarchive": RequestTypes.of(UnarchiveSessionRequest, UnarchiveSessionResponse),
"session/status": RequestTypes.of(SessionStatusRequest, SessionStatusResponse),
"session/options": RequestTypes.of(SessionOptionsRequest, SessionOptionsResponse),
"session/set_title": RequestTypes.of(SetSessionTitleRequest, SetSessionTitleResponse),
"session/set_config_option": RequestTypes.of(
SetSessionConfigOptionRequest, SetSessionConfigOptionResponse
),
"session/prompt": RequestTypes.of(PromptRequest, PromptResponse),
"tool_call/cancel": RequestTypes.of(CancelToolCallRequest, CancelToolCallResponse),
"terminal/cancel": RequestTypes.of(CancelTerminalRequest, CancelTerminalResponse),
"mcp/message": RequestTypes.of(MessageMcpRequest, MessageMcpResponse),
}
Requests the agent handles.
AgentMethod
module-attribute
¶
AgentMethod = Literal[
"auth/login",
"auth/logout",
"auth/status",
"initialize",
"mcp/message",
"providers/disable",
"providers/list",
"providers/set",
"session/archive",
"session/cancel",
"session/close",
"session/delete",
"session/fork",
"session/list",
"session/new",
"session/options",
"session/prompt",
"session/resume",
"session/set_config_option",
"session/set_title",
"session/status",
"session/unarchive",
"terminal/cancel",
"tool_call/cancel",
]
Methods handled by the agent (session/cancel is a notification).
AgentResponse
module-attribute
¶
AgentResponse = ResultResponse | ErrorResponse
A response the agent sends to a client request.
AuthMethod
module-attribute
¶
AuthMethod = Annotated[
Annotated[AuthMethodTerminal, Tag("terminal")]
| Annotated[AuthMethodAgent, Tag("agent")]
| Annotated[UnknownAuthMethod, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", frozenset({"terminal", "agent"}))),
]
An authentication method the agent offers, discriminated by type.
AuthState
module-attribute
¶
UNSTABLE: The agent's overall authentication state.
authenticated does not guarantee valid credentials. Values starting with _ are
extensions.
AvailableCommand
module-attribute
¶
AvailableCommand = Annotated[
Annotated[Command, Tag("command")]
| Annotated[Skill, Tag("skill")]
| Annotated[UnknownCommand, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", frozenset({"command", "skill"}))),
]
A command the agent advertises to the client.
AvailableCommandInput
module-attribute
¶
AvailableCommandInput = Annotated[
Annotated[TextCommandInput, Tag("text")] | Annotated[UnknownCommandInput, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", frozenset({"text"}))),
]
How a command takes input.
BackgroundWork
module-attribute
¶
BackgroundWork = Annotated[
Annotated[BackgroundTerminal, Tag("terminal")]
| Annotated[BackgroundToolCall, Tag("tool_call")]
| Annotated[BackgroundSubagent, Tag("subagent")]
| Annotated[UnknownBackgroundWork, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", frozenset({"terminal", "tool_call", "subagent"}))),
]
One piece of work running independently of the foreground work.
Items reference entities the client already tracks; the agent announces each item before listing it.
CLIENT_NOTIFICATIONS
module-attribute
¶
CLIENT_NOTIFICATIONS: dict[str, TypeAdapter[Any]] = {
"session/update": TypeAdapter(UpdateSessionNotification),
"elicitation/complete": TypeAdapter(CompleteElicitationNotification),
"auth/status_update": TypeAdapter(AuthStatusUpdateNotification),
"mcp/message": TypeAdapter(MessageMcpNotification),
}
Notifications the client handles.
CLIENT_REQUESTS
module-attribute
¶
CLIENT_REQUESTS: dict[str, RequestTypes] = {
"session/request_permission": RequestTypes.of(
RequestPermissionRequest, RequestPermissionResponse
),
"elicitation/create": RequestTypes.of(CreateElicitationRequest, CreateElicitationResponse),
"mcp/message": RequestTypes.of(MessageMcpRequest, MessageMcpResponse),
}
Requests the client handles.
ClientMethod
module-attribute
¶
ClientMethod = Literal[
"auth/status_update",
"elicitation/complete",
"elicitation/create",
"mcp/message",
"session/request_permission",
"session/update",
]
Methods handled by the client.
ClientResponse
module-attribute
¶
ClientResponse = ResultResponse | ErrorResponse
A response the client sends to an agent request.
CompactionId
module-attribute
¶
Unique identifier of a context compaction within a session.
CompactionStatus
module-attribute
¶
Lifecycle state of a context compaction. Values starting with _ are extensions.
ContentBlock
module-attribute
¶
ContentBlock = Annotated[
Annotated[TextContent, Tag("text")]
| Annotated[ImageContent, Tag("image")]
| Annotated[AudioContent, Tag("audio")]
| Annotated[ResourceLink, Tag("resource_link")]
| Annotated[EmbeddedResource, Tag("resource")]
| Annotated[SkillReference, Tag("skill")]
| Annotated[UnknownContent, Tag(OTHER_TAG)],
Discriminator(
open_discriminator(
"type", frozenset({"text", "image", "audio", "resource_link", "resource", "skill"})
)
),
]
Displayable content: in prompts, model output, tool call results and more.
CreateElicitationRequest
module-attribute
¶
CreateElicitationRequest = Annotated[
Annotated[FormElicitationRequest, Tag("form")]
| Annotated[UrlElicitationRequest, Tag("url")]
| Annotated[UnknownElicitationRequest, Tag(OTHER_TAG)],
Discriminator(open_discriminator("mode", frozenset({"form", "url"}))),
]
Parameters of elicitation/create: structured user input the agent asks for.
CreateElicitationResponse
module-attribute
¶
CreateElicitationResponse = Annotated[
Annotated[AcceptElicitationResponse, Tag("accept")]
| Annotated[DeclineElicitationResponse, Tag("decline")]
| Annotated[CancelElicitationResponse, Tag("cancel")]
| Annotated[UnknownElicitationResponse, Tag(OTHER_TAG)],
Discriminator(open_discriminator("action", frozenset({"accept", "decline", "cancel"}))),
]
Response to elicitation/create.
CursorAnchor
module-attribute
¶
CursorAnchor = Annotated[
Annotated[UserMessageCursorAnchor, Tag("user_message")]
| Annotated[AgentMessageCursorAnchor, Tag("agent_message")]
| Annotated[AgentThoughtCursorAnchor, Tag("agent_thought")]
| Annotated[SessionMessageCursorAnchor, Tag("session_message")]
| Annotated[CursorToolCallAnchor, Tag("tool_call")]
| Annotated[CursorCompactionAnchor, Tag("compaction")]
| Annotated[UnknownCursorAnchor, Tag(OTHER_TAG)],
Discriminator(
open_discriminator(
"type",
frozenset({
"user_message",
"agent_message",
"agent_thought",
"session_message",
"tool_call",
"compaction",
}),
)
),
]
UNSTABLE: Where a cursor is, relative to an entity the client holds.
CursorAnchorPosition
module-attribute
¶
UNSTABLE: On which side of the anchored entity the cursor is.
before: the history before the cursor excludes the entity; after: it includes
it and nothing that follows. A client that does not know the value cannot place the
cursor.
CursorId
module-attribute
¶
UNSTABLE: Agent-owned identifier of a session cursor, unique within its session.
DiffChange
module-attribute
¶
DiffChange = Annotated[
Annotated[AddDiffChange, Tag("add")]
| Annotated[DeleteDiffChange, Tag("delete")]
| Annotated[ModifyDiffChange, Tag("modify")]
| Annotated[MoveDiffChange, Tag("move")]
| Annotated[CopyDiffChange, Tag("copy")]
| Annotated[UnknownDiffChange, Tag(OTHER_TAG)],
Discriminator(
open_discriminator("operation", frozenset({"add", "delete", "modify", "move", "copy"}))
),
]
One file-level change of a :class:Diff.
DiffFileType
module-attribute
¶
Kind of file content of a diff change. Values starting with _ are extensions.
DiffPatchFormat
module-attribute
¶
Format of a diff patch; git_patch is diff --git sections in Git's --patch format.
ERROR_CODES
module-attribute
¶
ERROR_CODES: dict[int, str] = {
PARSE_ERROR: "Parse error",
INVALID_REQUEST: "Invalid request",
METHOD_NOT_FOUND: "Method not found",
INVALID_PARAMS: "Invalid params",
INTERNAL_ERROR: "Internal error",
REQUEST_CANCELLED: "Request cancelled",
AUTH_REQUIRED: "Authentication required",
RESOURCE_NOT_FOUND: "Resource not found",
UNSUPPORTED_PROTOCOL_VERSION: "Unsupported protocol version",
}
Error codes the protocol defines, with their standard messages.
ElicitationContentValue
module-attribute
¶
A value in an accepted elicitation's content; other JSON values are kept.
ElicitationPropertySchema
module-attribute
¶
ElicitationPropertySchema = Annotated[
Annotated[StringPropertySchema, Tag("string")]
| Annotated[NumberPropertySchema, Tag("number")]
| Annotated[IntegerPropertySchema, Tag("integer")]
| Annotated[BooleanPropertySchema, Tag("boolean")]
| Annotated[MultiSelectPropertySchema, Tag("array")]
| Annotated[UnknownPropertySchema, Tag(OTHER_TAG)],
Discriminator(
open_discriminator("type", frozenset({"string", "number", "integer", "boolean", "array"}))
),
]
A form field: string (or single-select enum), number, integer, boolean or multi-select.
ElicitationSchemaType
module-attribute
¶
Type of an elicitation schema: always object.
EmbeddedResourceResource
module-attribute
¶
EmbeddedResourceResource = TextResourceContents | BlobResourceContents
Contents of an embedded resource: text or binary.
ErrorCode
module-attribute
¶
A JSON-RPC error code: one of :data:ERROR_CODES or another integer.
ErrorData
module-attribute
¶
ErrorData = UnsupportedProtocolVersionErrorData | SessionNotFoundErrorData | Any
Data of an :class:Error: a shape ACP defines, or any other value.
IconTheme
module-attribute
¶
Theme an icon is designed for. Values starting with _ are extensions.
IdempotencyKey
module-attribute
¶
Client-chosen key that makes a session/prompt retry insert at most one message.
InitialSessionConfigOption
module-attribute
¶
InitialSessionConfigOption = Annotated[
Annotated[InitialConfigOptionId, Tag("id")]
| Annotated[InitialConfigOptionBoolean, Tag("boolean")]
| Annotated[InitialConfigOptionUnknown, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", _VALUE_TYPES)),
]
UNSTABLE: An initial config option value, sent on session setup requests.
Unlike session/set_config_option, an unknown option or value does not fail the
request: the agent ignores it, and the response's configOptions show the result.
LlmProtocol
module-attribute
¶
UNSTABLE: API protocol of an LLM provider; unknown values MUST be handled gracefully.
McpRequestId
module-attribute
¶
UNSTABLE: Identifier of an MCP request carried over ACP.
McpServer
module-attribute
¶
McpServer = Annotated[
Annotated[McpServerHttp, Tag("http")]
| Annotated[McpServerAcp, Tag("acp")]
| Annotated[McpServerStdio, Tag("stdio")]
| Annotated[UnknownMcpServer, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", frozenset({"http", "acp", "stdio"}))),
]
An MCP server the agent should connect to.
Each transport requires the matching session.mcp agent capability.
McpServerAcpId
module-attribute
¶
UNSTABLE: Identifier of an MCP server provided over ACP.
MessageMcpResponse
module-attribute
¶
MessageMcpResponse = MessageMcpResult | MessageMcpError
UNSTABLE: Response of mcp/message: exactly one inner MCP outcome.
MultiSelectItems
module-attribute
¶
MultiSelectItems = Annotated[
Annotated[StringMultiSelectItems, Tag("string")]
| Annotated[TitledMultiSelectItems, Tag("titled")]
| Annotated[UnknownMultiSelectItems, Tag(OTHER_TAG)],
Discriminator(_multi_select_items_tag),
]
Allowed values of a multi-select property: plain strings, or titled options (no type).
NoticeSeverity
module-attribute
¶
Severity hint of a notice. Values starting with _ are extensions.
OTHER_TAG
module-attribute
¶
Tag of the fallback variant of an open union.
Not a possible protocol value, so it cannot clash with real tags such as the
unknown session state.
PROTOCOL_NOTIFICATIONS
module-attribute
¶
PROTOCOL_NOTIFICATIONS: dict[str, TypeAdapter[Any]] = {
"$/cancel_request": TypeAdapter(CancelRequestNotification)
}
Notifications either side handles.
PROXY_NOTIFICATIONS
module-attribute
¶
PROXY_NOTIFICATIONS: dict[str, TypeAdapter[Any]] = {
"proxy/successor": TypeAdapter(ProxySuccessorNotification)
}
UNSTABLE: Notifications a proxy handles.
PROXY_REQUESTS
module-attribute
¶
PROXY_REQUESTS: dict[str, RequestTypes] = {
"proxy/initialize": RequestTypes.of(InitializeProxyRequest, InitializeProxyResponse),
"proxy/successor": RequestTypes.of(ProxySuccessorRequest, ProxySuccessorResponse),
}
UNSTABLE: Requests a proxy handles.
PermissionOptionId
module-attribute
¶
Unique identifier of a permission option.
PermissionOptionKind
module-attribute
¶
Nature of a permission option, for icons and UI. Values starting with _ are extensions.
PlanEntryPriority
module-attribute
¶
Relative importance of a plan entry. Values starting with _ are extensions.
PlanEntryStatus
module-attribute
¶
Status of a plan entry. Values starting with _ are extensions.
PlanUpdateContent
module-attribute
¶
PlanUpdateContent = Annotated[
Annotated[PlanItems, Tag("items")]
| Annotated[PlanMarkdown, Tag("markdown")]
| Annotated[UnknownPlanContent, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", frozenset({"items", "markdown"}))),
]
Updated content of a plan.
ProtocolMethod
module-attribute
¶
Methods either side may send.
ProxyMethod
module-attribute
¶
UNSTABLE: Methods handled by proxies in a proxy chain.
ProxyResponse
module-attribute
¶
ProxyResponse = ResultResponse | ErrorResponse
UNSTABLE: A response of a proxy.
ProxySuccessorResponse
module-attribute
¶
UNSTABLE: Result of proxy/successor: the wrapped request's result, unchanged.
ReplayFrom
module-attribute
¶
ReplayFrom = Annotated[
Annotated[ReplayFromStart, Tag("start")] | Annotated[UnknownReplayFrom, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", frozenset({"start"}))),
]
Inclusive cursor of where replayed history begins on session/resume.
RequestId
module-attribute
¶
A JSON-RPC request ID. Unlike base JSON-RPC, it MUST NOT be null.
RequestPermissionOutcome
module-attribute
¶
RequestPermissionOutcome = Annotated[
Annotated[CancelledPermissionOutcome, Tag("cancelled")]
| Annotated[SelectedPermissionOutcome, Tag("selected")]
| Annotated[UnknownPermissionOutcome, Tag(OTHER_TAG)],
Discriminator(open_discriminator("outcome", frozenset({"cancelled", "selected"}))),
]
The user's decision on a permission request.
RequestPermissionSubject
module-attribute
¶
RequestPermissionSubject = Annotated[
Annotated[ToolCallPermissionSubject, Tag("tool_call")]
| Annotated[CommandPermissionSubject, Tag("command")]
| Annotated[UnknownPermissionSubject, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", frozenset({"tool_call", "command"}))),
]
The operation that requires permission.
Role
module-attribute
¶
Sender or recipient in a conversation. Values starting with _ are extensions.
SessionArchiveFilter
module-attribute
¶
UNSTABLE: Which sessions session/list returns by archive state (default exclude).
SessionConfigGroupId
module-attribute
¶
Unique identifier of a group of select config option values.
SessionConfigId
module-attribute
¶
Unique identifier of a session config option.
SessionConfigOption
module-attribute
¶
SessionConfigOption = Annotated[
Annotated[SelectSessionConfigOption, Tag("select")]
| Annotated[BooleanSessionConfigOption, Tag("boolean")]
| Annotated[UnknownSessionConfigOption, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", frozenset({"select", "boolean"}))),
]
A session config option and its current state.
SessionConfigOptionCategory
module-attribute
¶
SessionConfigOptionCategory = (
Literal["mode", "model", "model_config", "speed", "thought_level"] | str
)
Semantic category of a config option, for UX only.
Clients MUST handle unknown categories gracefully; values starting with _ are
extensions.
SessionConfigSelectOptions
module-attribute
¶
SessionConfigSelectOptions = (
Sequence[SessionConfigSelectOption] | Sequence[SessionConfigSelectGroup]
)
Values of a select config option: a flat list, or groups under headers.
SessionConfigValueId
module-attribute
¶
Unique identifier of a value of a select config option.
SessionListCursor
module-attribute
¶
Opaque pagination cursor of session/list.
SessionStatus
module-attribute
¶
UNSTABLE: Whether the agent has a session in memory (open) or can resume it (saved).
Clients MUST treat unknown values as saved.
SessionUpdate
module-attribute
¶
SessionUpdate = Annotated[
Annotated[UserMessageChunk, Tag("user_message_chunk")]
| Annotated[UserMessage, Tag("user_message")]
| Annotated[AgentMessageChunk, Tag("agent_message_chunk")]
| Annotated[AgentMessage, Tag("agent_message")]
| Annotated[AgentThoughtChunk, Tag("agent_thought_chunk")]
| Annotated[AgentThought, Tag("agent_thought")]
| Annotated[StateSessionUpdate, Tag("state_update")]
| Annotated[ToolCallContentChunk, Tag("tool_call_content_chunk")]
| Annotated[ToolCallSessionUpdate, Tag("tool_call_update")]
| Annotated[TerminalUpdate, Tag("terminal_update")]
| Annotated[TerminalOutputChunk, Tag("terminal_output_chunk")]
| Annotated[PlanUpdate, Tag("plan_update")]
| Annotated[PlanRemoved, Tag("plan_removed")]
| Annotated[AvailableCommandsUpdate, Tag("available_commands_update")]
| Annotated[ConfigOptionUpdate, Tag("config_option_update")]
| Annotated[SessionInfoUpdate, Tag("session_info_update")]
| Annotated[UsageUpdate, Tag("usage_update")]
| Annotated[Notice, Tag("notice")]
| Annotated[CompactionUpdate, Tag("compaction_update")]
| Annotated[CompactionSummaryChunk, Tag("compaction_summary_chunk")]
| Annotated[ReplayComplete, Tag("replay_complete")]
| Annotated[PromptSuggestionsUpdate, Tag("prompt_suggestions_update")]
| Annotated[CursorUpdate, Tag("cursor_update")]
| Annotated[SubagentUpdate, Tag("subagent_update")]
| Annotated[SessionMessage, Tag("session_message")]
| Annotated[SessionMessageChunk, Tag("session_message_chunk")]
| Annotated[UnknownSessionUpdate, Tag(OTHER_TAG)],
Discriminator(open_discriminator("sessionUpdate", _SESSION_UPDATES)),
]
An update sent while a session exists: messages, progress and other activity.
SetSessionConfigOptionRequest
module-attribute
¶
SetSessionConfigOptionRequest = Annotated[
Annotated[SetConfigOptionIdRequest, Tag("id")]
| Annotated[SetConfigOptionBooleanRequest, Tag("boolean")]
| Annotated[SetConfigOptionUnknownRequest, Tag(OTHER_TAG)],
Discriminator(open_discriminator("type", _VALUE_TYPES)),
]
Parameters of session/set_config_option.
Agents MUST support it for any session where they advertise config options, and
reject unknown options or values with -32602.
StateSessionUpdate
module-attribute
¶
StateSessionUpdate = Annotated[
Annotated[RunningStateSessionUpdate, Tag("running")]
| Annotated[IdleStateSessionUpdate, Tag("idle")]
| Annotated[RequiresActionStateSessionUpdate, Tag("requires_action")]
| Annotated[UnknownStateSessionUpdate, Tag("unknown")]
| Annotated[OtherStateSessionUpdate, Tag(OTHER_TAG)],
Discriminator(
open_discriminator("state", frozenset({"running", "idle", "requires_action", "unknown"}))
),
]
A state_update session update: a snapshot of the session's foreground activity.
StateUpdate
module-attribute
¶
StateUpdate = Annotated[
Annotated[RunningStateUpdate, Tag("running")]
| Annotated[IdleStateUpdate, Tag("idle")]
| Annotated[RequiresActionStateUpdate, Tag("requires_action")]
| Annotated[UnknownStateUpdate, Tag("unknown")]
| Annotated[OtherStateUpdate, Tag(OTHER_TAG)],
Discriminator(
open_discriminator("state", frozenset({"running", "idle", "requires_action", "unknown"}))
),
]
A snapshot of the session's aggregate foreground activity.
StopReason
module-attribute
¶
StopReason = (
Literal["end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled", "error"] | str
)
Why foreground work stopped. Values starting with _ are extensions.
StringFormat
module-attribute
¶
Format of a string property; unknown formats are kept.
SystemPromptMode
module-attribute
¶
How the agent combines a client-provided system prompt with its own instructions.
Every agent with the systemPrompt capability supports append; override
needs session.systemPrompt.mode.override. Values starting with _ are extensions.
TerminalId
module-attribute
¶
Unique identifier of a display terminal within a session.
ToolCallContent
module-attribute
¶
ToolCallContent = Annotated[
Annotated[Content, Tag("content")]
| Annotated[Diff, Tag("diff")]
| Annotated[Terminal, Tag("terminal")]
| Annotated[SessionReference, Tag("session")]
| Annotated[UnknownToolCallContent, Tag(OTHER_TAG)],
Discriminator(
open_discriminator("type", frozenset({"content", "diff", "terminal", "session"}))
),
]
Content produced by a tool call.
ToolCallStatus
module-attribute
¶
ToolCallStatus = (
Literal["pending", "in_progress", "paused", "completed", "failed", "cancelled"] | str
)
Execution status of a tool call. Values starting with _ are extensions.
ToolKind
module-attribute
¶
ToolKind = (
Literal[
"read",
"edit",
"delete",
"move",
"search",
"execute",
"think",
"fetch",
"switch_mode",
"other",
]
| str
)
Category of a tool, for icons and display. Values starting with _ are extensions.
JsonValue
¶
A JSON value: the params and results of custom (_-prefixed) methods.
AcceptElicitationResponse
¶
Bases: AnnotatedObject
The user accepted and provided content.
Source code in src/aclientp/schema/v2/elicitation.py
content
class-attribute
instance-attribute
¶
content: dict[str, ElicitationContentValue] | MISSING | None = MISSING
The content, matching the requested schema.
AddDiffChange
¶
AgentAuthCapabilities
¶
Bases: AnnotatedObject
Authentication-related extension capabilities supported by the agent.
Source code in src/aclientp/schema/v2/capabilities.py
status
class-attribute
instance-attribute
¶
status: AuthStatusCapabilities | MISSING | None = MISSING
Whether the agent supports the auth/status method.
AgentCapabilities
¶
Bases: AnnotatedObject
Capabilities supported by the agent.
Source code in src/aclientp/schema/v2/capabilities.py
auth
class-attribute
instance-attribute
¶
auth: AgentAuthCapabilities | MISSING | None = MISSING
Authentication-related extension capabilities supported by the agent.
providers
class-attribute
instance-attribute
¶
providers: ProvidersCapabilities | MISSING | None = MISSING
Provider configuration capabilities supported by the agent.
session
class-attribute
instance-attribute
¶
session: SessionCapabilities | MISSING | None = MISSING
Session capabilities supported by the agent.
AgentMessage
¶
Bases: _MessageUpsert
An agent message upsert, in addition to or instead of streamed chunks.
Source code in src/aclientp/schema/v2/messages.py
AgentMessageChunk
¶
Bases: _Chunk
A chunk of the agent's response being streamed.
Source code in src/aclientp/schema/v2/messages.py
AgentMessageCursorAnchor
¶
Bases: CursorMessageAnchor
UNSTABLE: The cursor is next to an agent message.
Source code in src/aclientp/schema/v2/cursors.py
AgentNotification
¶
AgentRequest
¶
AgentThought
¶
Bases: _MessageUpsert
An agent thought (reasoning) message upsert.
Source code in src/aclientp/schema/v2/messages.py
AgentThoughtChunk
¶
Bases: _Chunk
A chunk of the agent's internal reasoning being streamed.
Source code in src/aclientp/schema/v2/messages.py
AgentThoughtCursorAnchor
¶
Bases: CursorMessageAnchor
UNSTABLE: The cursor is next to an agent thought.
Source code in src/aclientp/schema/v2/cursors.py
AnnotatedObject
¶
Bases: Schema
A v2 object with the _meta extension point.
Source code in src/aclientp/schema/v2/base.py
field_meta
class-attribute
instance-attribute
¶
Extension point for implementations. Omitted and null mean no metadata.
On upserts, _meta is a patch: omitted leaves it unchanged, null clears it,
and an object patches the stored metadata by top-level key (a key set to null
is removed, any other value replaces that key).
Annotations
¶
Bases: AnnotatedObject
Hints for the client on how an object is used or displayed.
Source code in src/aclientp/schema/v2/common.py
audience
class-attribute
instance-attribute
¶
audience: Sequence[Role] | MISSING | None = MISSING
Intended recipients, such as the user or the assistant.
last_modified
class-attribute
instance-attribute
¶
When the underlying resource was last modified (ISO 8601).
priority
class-attribute
instance-attribute
¶
Importance from 0 (least) to 1 (most important).
ArchiveSessionRequest
¶
Bases: AnnotatedObject
UNSTABLE: Request parameters for archiving a session.
Source code in src/aclientp/schema/v2/sessions.py
ArchiveSessionResponse
¶
Bases: AnnotatedObject
UNSTABLE: Response from archiving a session.
Source code in src/aclientp/schema/v2/sessions.py
AudioContent
¶
Bases: AnnotatedObject
Audio provided to or from an LLM. Requires the audio prompt capability.
Source code in src/aclientp/schema/v2/content.py
annotations
class-attribute
instance-attribute
¶
annotations: Annotations | MISSING | None = MISSING
Display and routing hints.
AuthAccount
¶
Bases: AnnotatedObject
UNSTABLE: An account or credential the agent has configured.
For example a signed-in user account or an API key. All fields are display information only.
Source code in src/aclientp/schema/v2/auth.py
active
class-attribute
instance-attribute
¶
Whether the agent currently uses this account by default.
description
class-attribute
instance-attribute
¶
Short text shown with the label, such as the credential source, for example API key
helper. MUST NOT contain credentials.
email
class-attribute
instance-attribute
¶
Email address of the user.
label
instance-attribute
¶
Human-readable name for the account, suitable for display on its own, for example
Claude Max, OpenAI API key, or Vertex AI.
name
class-attribute
instance-attribute
¶
Display name of the user, such as a username or full name.
organization
class-attribute
instance-attribute
¶
Display name of the organization, team, or workspace the account is using.
AuthMethodAgent
¶
Bases: AnnotatedObject
Agent handles authentication itself through auth/login.
Source code in src/aclientp/schema/v2/auth.py
description
class-attribute
instance-attribute
¶
Optional human-readable description of this authentication method.
method_id
instance-attribute
¶
method_id: AuthMethodId
Unique identifier for this authentication method.
AuthMethodTerminal
¶
Bases: AnnotatedObject
Terminal-based authentication method.
The client runs the configured agent program as a separate interactive process, with
args appended and env set, for the user to authenticate in a TUI. Requires the
client's auth.terminal capability.
Source code in src/aclientp/schema/v2/auth.py
args
class-attribute
instance-attribute
¶
Additional arguments to append to the configured agent invocation for terminal auth.
description
class-attribute
instance-attribute
¶
Optional human-readable description of this authentication method.
env
class-attribute
instance-attribute
¶
env: Sequence[EnvVariable] | MISSING = MISSING
Additional environment variables to set on the configured agent invocation for terminal auth. Names MUST be unique. These values override same-named variables in the base launch configuration.
method_id
instance-attribute
¶
method_id: AuthMethodId
Unique identifier for this authentication method.
AuthStatusCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Auth status capabilities supported by the agent.
Source code in src/aclientp/schema/v2/capabilities.py
AuthStatusRequest
¶
Bases: AnnotatedObject
UNSTABLE: Request parameters for the auth/status method.
Source code in src/aclientp/schema/v2/auth.py
AuthStatusResponse
¶
Bases: AnnotatedObject
UNSTABLE: Response to the auth/status method.
Source code in src/aclientp/schema/v2/auth.py
accounts
class-attribute
instance-attribute
¶
accounts: Sequence[AuthAccount] | MISSING = MISSING
The accounts the agent has configured, for display.
AuthStatusUpdateNotification
¶
Bases: AnnotatedObject
UNSTABLE: Notification sent by the agent when its authentication status changes.
Source code in src/aclientp/schema/v2/auth.py
accounts
class-attribute
instance-attribute
¶
accounts: Sequence[AuthAccount] | MISSING = MISSING
The accounts the agent has configured, for display.
AvailableCommandsUpdate
¶
Bases: AnnotatedObject
The available commands are ready or have changed.
Source code in src/aclientp/schema/v2/session_updates.py
available_commands
instance-attribute
¶
available_commands: Sequence[AvailableCommand]
All commands the agent can execute.
BackgroundSubagent
¶
Bases: AnnotatedObject
A detached subagent session that has anything running.
Source code in src/aclientp/schema/v2/prompt.py
BackgroundTerminal
¶
Bases: AnnotatedObject
A process that keeps running after its tool call returned control to the model.
Source code in src/aclientp/schema/v2/prompt.py
BackgroundToolCall
¶
Bases: AnnotatedObject
Work of a tool call that continues without a process of its own, e.g. a watcher.
Source code in src/aclientp/schema/v2/prompt.py
BlobResourceContents
¶
Bases: AnnotatedObject
Binary contents of a resource.
Source code in src/aclientp/schema/v2/content.py
BooleanPropertySchema
¶
Bases: AnnotatedObject
Schema for boolean properties in an elicitation form.
Source code in src/aclientp/schema/v2/elicitation.py
BooleanSessionConfigOption
¶
Bases: _ConfigOptionBase
An on/off toggle.
Source code in src/aclientp/schema/v2/config_options.py
CancelElicitationResponse
¶
Bases: AnnotatedObject
The elicitation was cancelled.
Source code in src/aclientp/schema/v2/elicitation.py
CancelRequestNotification
¶
Bases: AnnotatedObject
Parameters of $/cancel_request: cancel an ongoing request.
The request must be one the sender of the notification issued.
Source code in src/aclientp/schema/v2/protocol.py
CancelSessionNotification
¶
Bases: AnnotatedObject
Notification to cancel a session's foreground work and its prompts not yet inserted.
Source code in src/aclientp/schema/v2/sessions.py
CancelTerminalRequest
¶
Bases: AnnotatedObject
Parameters of terminal/cancel: cancel one terminal.
Only for terminals that currently advertise capabilities.cancel.
Source code in src/aclientp/schema/v2/terminals.py
CancelTerminalResponse
¶
Bases: AnnotatedObject
Response from cancelling a terminal.
Source code in src/aclientp/schema/v2/terminals.py
CancelToolCallRequest
¶
Bases: AnnotatedObject
Parameters of tool_call/cancel: cancel one tool call.
Only for tool calls that currently advertise capabilities.cancel.
Source code in src/aclientp/schema/v2/tool_calls.py
CancelToolCallResponse
¶
Bases: AnnotatedObject
Response to tool_call/cancel.
Source code in src/aclientp/schema/v2/tool_calls.py
CancelledPermissionOutcome
¶
Bases: AnnotatedObject
No option was selected, e.g. because the session's work was cancelled.
Source code in src/aclientp/schema/v2/permissions.py
ClientAuthCapabilities
¶
Bases: AnnotatedObject
Authentication capabilities supported by the client.
Source code in src/aclientp/schema/v2/capabilities.py
terminal
class-attribute
instance-attribute
¶
terminal: TerminalAuthCapabilities | MISSING | None = MISSING
Whether the client supports terminal authentication methods.
ClientCapabilities
¶
Bases: AnnotatedObject
Capabilities supported by the client.
Source code in src/aclientp/schema/v2/capabilities.py
auth
class-attribute
instance-attribute
¶
auth: ClientAuthCapabilities | MISSING | None = MISSING
Authentication capabilities supported by the client. Determines which authentication
method types the agent may include in its InitializeResponse.
elicitation
class-attribute
instance-attribute
¶
elicitation: ElicitationCapabilities | MISSING | None = MISSING
Elicitation capabilities supported by the client. Determines which elicitation modes the agent may use.
session
class-attribute
instance-attribute
¶
session: ClientSessionCapabilities | MISSING | None = MISSING
Session-related capabilities supported by the client.
ClientNotification
¶
ClientRequest
¶
ClientSessionCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Session-related capabilities supported by the client.
Source code in src/aclientp/schema/v2/capabilities.py
commands
class-attribute
instance-attribute
¶
commands: CommandsCapabilities | MISSING | None = MISSING
Command types the client understands in addition to command.
prompt_suggestions
class-attribute
instance-attribute
¶
prompt_suggestions: PromptSuggestionsCapabilities | MISSING | None = MISSING
Support for prompt_suggestions_update session updates.
CloseSessionRequest
¶
Bases: AnnotatedObject
Request parameters for closing an active session.
Source code in src/aclientp/schema/v2/sessions.py
CloseSessionResponse
¶
Bases: AnnotatedObject
Response from closing a session.
Source code in src/aclientp/schema/v2/sessions.py
Command
¶
Bases: AnnotatedObject
A slash command the user invokes by including /name in a prompt.
Source code in src/aclientp/schema/v2/commands.py
input
class-attribute
instance-attribute
¶
input: AvailableCommandInput | MISSING | None = MISSING
The command's input; omitted means it takes none.
name
instance-attribute
¶
Command name without the leading /, e.g. create_plan; no whitespace.
CommandPermissionSubject
¶
Bases: AnnotatedObject
Permission is requested before running a command.
Source code in src/aclientp/schema/v2/permissions.py
terminal_id
class-attribute
instance-attribute
¶
terminal_id: TerminalId | MISSING | None = MISSING
The associated terminal, when already known.
tool_call_id
class-attribute
instance-attribute
¶
tool_call_id: ToolCallId | MISSING | None = MISSING
The associated tool call, when known.
CommandsCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Command types the client understands in addition to command.
Source code in src/aclientp/schema/v2/capabilities.py
skill
class-attribute
instance-attribute
¶
skill: CommandsSkillCapabilities | MISSING | None = MISSING
Support for skill command entries.
CommandsSkillCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Client support for skill command entries.
Source code in src/aclientp/schema/v2/capabilities.py
CompactionSummaryChunk
¶
Bases: AnnotatedObject
A content block appended to a compaction's summary.
A first-seen ID creates an in-progress compaction; chunks append in receive order.
Source code in src/aclientp/schema/v2/session_updates.py
compaction_id
instance-attribute
¶
compaction_id: CompactionId
The compaction whose summary receives the content.
CompactionUpdate
¶
Bases: AnnotatedObject
A context compaction upsert, keyed by compaction_id.
The first update fixes the compaction's position in the timeline; summary and
error are patches.
Source code in src/aclientp/schema/v2/session_updates.py
compaction_id
instance-attribute
¶
compaction_id: CompactionId
The agent-owned ID of the compaction, unique within the session.
error
class-attribute
instance-attribute
¶
Human-readable error details.
status
class-attribute
instance-attribute
¶
status: CompactionStatus | MISSING | None = MISSING
Current lifecycle status; omitted leaves it unchanged, None resets it to
in_progress. A new compaction starts as in_progress.
summary
class-attribute
instance-attribute
¶
summary: Sequence[ContentBlock] | MISSING | None = MISSING
Complete replacement summary content to show the user.
CompleteElicitationNotification
¶
Bases: AnnotatedObject
Notification sent by the agent when a URL-based elicitation is complete.
Source code in src/aclientp/schema/v2/elicitation.py
elicitation_id
instance-attribute
¶
elicitation_id: ElicitationId
The ID of the elicitation that completed.
ConfigOptionUpdate
¶
Bases: AnnotatedObject
The session's config options have changed.
Source code in src/aclientp/schema/v2/session_updates.py
config_options
instance-attribute
¶
config_options: Sequence[SessionConfigOption]
All config options and their current values.
Content
¶
Bases: AnnotatedObject
A standard content block (text, image, resource) produced by a tool call.
Source code in src/aclientp/schema/v2/tool_calls.py
CopyDiffChange
¶
Cost
¶
Bases: AnnotatedObject
Cumulative cost of a session.
Source code in src/aclientp/schema/v2/common.py
CursorCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: The methods that currently accept a cursor.
A malformed value counts as no capabilities.
Source code in src/aclientp/schema/v2/cursors.py
fork
class-attribute
instance-attribute
¶
fork: CursorForkCapabilities | MISSING | None = MISSING
session/fork accepts this cursor.
CursorCompactionAnchor
¶
Bases: AnnotatedObject
UNSTABLE: The cursor is next to a context compaction.
Source code in src/aclientp/schema/v2/cursors.py
position
instance-attribute
¶
position: CursorAnchorPosition
On which side of the compaction the cursor is.
CursorForkCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: The cursor can be passed to session/fork as cursorId.
Source code in src/aclientp/schema/v2/cursors.py
CursorMessageAnchor
¶
Bases: AnnotatedObject
UNSTABLE: A cursor anchored to a message; type names the kind of message.
Source code in src/aclientp/schema/v2/cursors.py
position
instance-attribute
¶
position: CursorAnchorPosition
On which side of the message the cursor is.
CursorToolCallAnchor
¶
Bases: AnnotatedObject
UNSTABLE: The cursor is next to a tool call.
Source code in src/aclientp/schema/v2/cursors.py
position
instance-attribute
¶
position: CursorAnchorPosition
On which side of the tool call the cursor is.
CursorUpdate
¶
Bases: AnnotatedObject
UNSTABLE: A session cursor upsert, keyed by cursor_id.
The first update for a cursor MUST include anchor, which is fixed afterwards.
capabilities and _meta are patches: omitted leaves them unchanged, None
clears them.
Source code in src/aclientp/schema/v2/cursors.py
anchor
class-attribute
instance-attribute
¶
anchor: CursorAnchor | MISSING | None = MISSING
Where the cursor is; required on the first update for a cursor.
capabilities
class-attribute
instance-attribute
¶
capabilities: CursorCapabilities | MISSING | None = MISSING
The methods that currently accept the cursor; a new cursor starts with none.
DeclineElicitationResponse
¶
DeleteDiffChange
¶
DeleteSessionRequest
¶
Bases: AnnotatedObject
Request parameters for deleting an existing session from session/list.
Source code in src/aclientp/schema/v2/sessions.py
DeleteSessionResponse
¶
Bases: AnnotatedObject
Response from deleting a session.
Source code in src/aclientp/schema/v2/sessions.py
Diff
¶
Bases: AnnotatedObject
File changes produced by a tool call.
changes is authoritative for affected paths and operations; patch optionally
carries renderable text for some or all of them.
Source code in src/aclientp/schema/v2/tool_calls.py
changes
class-attribute
instance-attribute
¶
changes: Sequence[DiffChange] = Field(min_length=1)
The structured file changes; at least one.
DiffPatch
¶
Bases: AnnotatedObject
Renderable patch text and its format.
Source code in src/aclientp/schema/v2/tool_calls.py
DisableProviderRequest
¶
Bases: AnnotatedObject
UNSTABLE: Request parameters for providers/disable.
Source code in src/aclientp/schema/v2/providers.py
DisableProviderResponse
¶
Bases: AnnotatedObject
UNSTABLE: Response to providers/disable.
Source code in src/aclientp/schema/v2/providers.py
ElicitationCapabilities
¶
Bases: AnnotatedObject
Elicitation capabilities supported by the client.
Source code in src/aclientp/schema/v2/capabilities.py
form
class-attribute
instance-attribute
¶
form: ElicitationFormCapabilities | MISSING | None = MISSING
Whether the client supports form-based elicitation.
url
class-attribute
instance-attribute
¶
url: ElicitationUrlCapabilities | MISSING | None = MISSING
Whether the client supports URL-based elicitation.
ElicitationFormCapabilities
¶
Bases: AnnotatedObject
Form-based elicitation capabilities.
Source code in src/aclientp/schema/v2/capabilities.py
ElicitationSchema
¶
Bases: AnnotatedObject
Type-safe elicitation schema for requesting structured user input.
Source code in src/aclientp/schema/v2/elicitation.py
description
class-attribute
instance-attribute
¶
Optional description of what this schema represents.
properties
instance-attribute
¶
properties: dict[str, ElicitationPropertySchema]
Property definitions (must be primitive types).
required
class-attribute
instance-attribute
¶
List of required property names.
title
class-attribute
instance-attribute
¶
Optional title for the schema.
type
class-attribute
instance-attribute
¶
type: ElicitationSchemaType = Field(default='object', init=False)
Type discriminator. Always "object". Any other value is rejected.
ElicitationUrlCapabilities
¶
Bases: AnnotatedObject
URL-based elicitation capabilities.
Source code in src/aclientp/schema/v2/capabilities.py
EmbeddedResource
¶
Bases: AnnotatedObject
Resource contents embedded in a prompt or tool call result.
Requires the embeddedContext prompt capability in prompts.
Source code in src/aclientp/schema/v2/content.py
annotations
class-attribute
instance-attribute
¶
annotations: Annotations | MISSING | None = MISSING
Display and routing hints.
EnumOption
¶
Bases: AnnotatedObject
A titled enum option with a const value, human-readable title, and optional description.
Source code in src/aclientp/schema/v2/elicitation.py
EnvVariable
¶
Bases: AnnotatedObject
An environment variable to set when launching a process.
Source code in src/aclientp/schema/v2/common.py
Error
¶
ErrorResponse
¶
Bases: _Message
A failed JSON-RPC response.
Source code in src/aclientp/schema/v2/protocol.py
ForkSessionRequest
¶
Bases: AnnotatedObject
UNSTABLE: Request parameters for forking an existing session.
Source code in src/aclientp/schema/v2/sessions.py
additional_directories
class-attribute
instance-attribute
¶
additional_directories: Sequence[AbsolutePath] | MISSING = MISSING
Additional workspace roots to activate for this session. Each path must be absolute.
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[InitialSessionConfigOption] | MISSING = MISSING
Initial values for the forked session's config options.
cursor_id
class-attribute
instance-attribute
¶
cursor_id: CursorId | MISSING | None = MISSING
The session cursor to fork at. The new session's history is the source session's history before the cursor.
cwd
instance-attribute
¶
cwd: AbsolutePath
The working directory for this session. Must be an absolute path.
mcp_servers
class-attribute
instance-attribute
¶
mcp_servers: Sequence[McpServer] | MISSING = MISSING
List of MCP servers to connect to for this session.
system_prompt
class-attribute
instance-attribute
¶
system_prompt: SystemPrompt | MISSING | None = MISSING
System-level instructions for the forked session.
ForkSessionResponse
¶
Bases: AnnotatedObject
UNSTABLE: Response from forking an existing session.
Source code in src/aclientp/schema/v2/sessions.py
available_commands
class-attribute
instance-attribute
¶
available_commands: Sequence[AvailableCommand] | MISSING = MISSING
Initial commands the agent can execute in this session.
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] | MISSING = MISSING
Initial session configuration options.
FormElicitationRequest
¶
Bases: _ScopedRequest
The client renders a form from requested_schema.
Source code in src/aclientp/schema/v2/elicitation.py
HttpHeader
¶
Bases: AnnotatedObject
An HTTP header to send with requests.
Source code in src/aclientp/schema/v2/common.py
Icon
¶
Bases: AnnotatedObject
An optionally sized icon a user interface can display.
Source code in src/aclientp/schema/v2/common.py
IdleStateSessionUpdate
¶
Bases: IdleStateUpdate
state_update: no foreground work is active.
Source code in src/aclientp/schema/v2/session_updates.py
IdleStateUpdate
¶
Bases: _StateBase
No foreground work is active; background work may continue.
Agents SHOULD include stop_reason when the transition ends foreground work.
Source code in src/aclientp/schema/v2/prompt.py
error
class-attribute
instance-attribute
¶
error: Error | MISSING | None = MISSING
For stop_reason == "error": the failure, as a JSON-RPC error object.
stop_reason
class-attribute
instance-attribute
¶
stop_reason: StopReason | MISSING | None = MISSING
Why foreground work stopped; omitted or None when there is no stop reason.
ImageContent
¶
Bases: AnnotatedObject
An image provided to or from an LLM. Requires the image prompt capability.
Source code in src/aclientp/schema/v2/content.py
annotations
class-attribute
instance-attribute
¶
annotations: Annotations | MISSING | None = MISSING
Display and routing hints.
uri
class-attribute
instance-attribute
¶
URI associated with the image.
Implementation
¶
Bases: AnnotatedObject
Name and version of a client or agent implementation.
Source code in src/aclientp/schema/v2/common.py
title
class-attribute
instance-attribute
¶
Human-readable name for user interfaces.
InitialConfigOptionBoolean
¶
Bases: _InitialConfigOptionBase
UNSTABLE: Initial value of a boolean config option.
Source code in src/aclientp/schema/v2/config_options.py
InitialConfigOptionId
¶
Bases: _InitialConfigOptionBase
UNSTABLE: Initial value of a select config option.
Source code in src/aclientp/schema/v2/config_options.py
InitialConfigOptionUnknown
¶
Bases: Unknown, _InitialConfigOptionBase
UNSTABLE: Initial value of a custom or future kind of config option.
Source code in src/aclientp/schema/v2/config_options.py
InitializeProxyRequest
¶
Bases: InitializeRequest
UNSTABLE: Parameters of proxy/initialize, sent instead of initialize.
A conductor sends it to every component that has a successor.
Source code in src/aclientp/schema/v2/protocol.py
InitializeProxyResponse
¶
Bases: InitializeResponse
UNSTABLE: Response to proxy/initialize; the same as an initialize response.
Source code in src/aclientp/schema/v2/protocol.py
InitializeRequest
¶
Bases: AnnotatedObject
Request parameters for the initialize method.
Source code in src/aclientp/schema/v2/initialize.py
capabilities
class-attribute
instance-attribute
¶
capabilities: ClientCapabilities | MISSING = MISSING
Capabilities supported by the client.
info
instance-attribute
¶
info: Implementation
Information about the implementation sending this initialize request.
protocol_version
instance-attribute
¶
protocol_version: ProtocolVersion
The latest protocol version supported by the client.
InitializeResponse
¶
Bases: AnnotatedObject
Response to the initialize method.
Source code in src/aclientp/schema/v2/initialize.py
auth_methods
class-attribute
instance-attribute
¶
auth_methods: Sequence[AuthMethod] | MISSING = MISSING
Authentication methods supported by the agent.
capabilities
class-attribute
instance-attribute
¶
capabilities: AgentCapabilities | MISSING = MISSING
Capabilities supported by the agent.
info
instance-attribute
¶
info: Implementation
Information about the implementation sending this initialize response.
protocol_version
instance-attribute
¶
protocol_version: ProtocolVersion
The highest protocol version supported by the agent that is at or below the version requested by the client. If no such version exists, initialization fails with error code -32022.
IntegerPropertySchema
¶
Bases: AnnotatedObject
Schema for integer properties in an elicitation form.
Source code in src/aclientp/schema/v2/elicitation.py
ListProvidersRequest
¶
Bases: AnnotatedObject
UNSTABLE: Request parameters for providers/list.
Source code in src/aclientp/schema/v2/providers.py
ListProvidersResponse
¶
Bases: AnnotatedObject
UNSTABLE: Response to providers/list.
Source code in src/aclientp/schema/v2/providers.py
providers
instance-attribute
¶
providers: Sequence[ProviderInfo]
Configurable providers with current routing info suitable for UI display.
ListSessionsRequest
¶
Bases: AnnotatedObject
Request parameters for listing existing sessions.
Source code in src/aclientp/schema/v2/sessions.py
archived
class-attribute
instance-attribute
¶
archived: SessionArchiveFilter | MISSING | None = MISSING
Filter sessions by archive state.
cursor
class-attribute
instance-attribute
¶
cursor: SessionListCursor | MISSING | None = MISSING
Opaque cursor token from a previous response's nextCursor field for cursor-based pagination
cwd
class-attribute
instance-attribute
¶
cwd: AbsolutePath | MISSING | None = MISSING
Filter sessions by working directory. Must be an absolute path.
ListSessionsResponse
¶
Bases: AnnotatedObject
Response from listing sessions.
Source code in src/aclientp/schema/v2/sessions.py
next_cursor
class-attribute
instance-attribute
¶
next_cursor: SessionListCursor | MISSING | None = MISSING
Opaque cursor token. If present, pass this in the next request's cursor parameter to fetch the next page. An empty string is a valid cursor, not the end of results.
LoginAuthRequest
¶
Bases: AnnotatedObject
Request parameters for the auth/login method.
Source code in src/aclientp/schema/v2/auth.py
method_id
instance-attribute
¶
method_id: AuthMethodId
The ID of the authentication method to use. Must be one of the methods advertised in the initialize response.
LoginAuthResponse
¶
Bases: AnnotatedObject
Response to the auth/login method.
Source code in src/aclientp/schema/v2/auth.py
LogoutAuthRequest
¶
Bases: AnnotatedObject
Request parameters for the auth/logout method.
Source code in src/aclientp/schema/v2/auth.py
LogoutAuthResponse
¶
Bases: AnnotatedObject
Response to the auth/logout method.
Source code in src/aclientp/schema/v2/auth.py
McpAcpCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Capabilities for ACP MCP server transports.
Source code in src/aclientp/schema/v2/capabilities.py
McpCapabilities
¶
Bases: AnnotatedObject
MCP capabilities supported by the agent for session lifecycle requests.
Source code in src/aclientp/schema/v2/capabilities.py
acp
class-attribute
instance-attribute
¶
acp: McpAcpCapabilities | MISSING | None = MISSING
Agent supports acp MCP servers.
http
class-attribute
instance-attribute
¶
http: McpHttpCapabilities | MISSING | None = MISSING
Agent supports http MCP servers.
stdio
class-attribute
instance-attribute
¶
stdio: McpStdioCapabilities | MISSING | None = MISSING
Agent supports stdio MCP servers.
McpError
¶
Bases: Schema
UNSTABLE: An inner MCP error, distinct from an outer ACP error.
Source code in src/aclientp/schema/v2/mcp.py
McpHttpCapabilities
¶
Bases: AnnotatedObject
Capabilities for HTTP MCP server transports.
Source code in src/aclientp/schema/v2/capabilities.py
McpServerAcp
¶
Bases: AnnotatedObject
UNSTABLE: ACP transport configuration for MCP.
The server is provided by an ACP component and talks over the ACP channel using
mcp/message.
Source code in src/aclientp/schema/v2/mcp.py
server_id
instance-attribute
¶
server_id: McpServerAcpId
Identifier generated by the component providing the server; never reused.
McpServerHttp
¶
Bases: AnnotatedObject
HTTP transport configuration for MCP.
Source code in src/aclientp/schema/v2/mcp.py
headers
class-attribute
instance-attribute
¶
headers: Sequence[HttpHeader] | MISSING = MISSING
HTTP headers to set when making requests to the MCP server. Headers the MCP transport defines are owned by the transport, and Agents use the transport's values for them.
McpServerStdio
¶
Bases: AnnotatedObject
Stdio transport configuration for MCP.
Source code in src/aclientp/schema/v2/mcp.py
args
class-attribute
instance-attribute
¶
Command-line arguments to pass to the MCP server.
env
class-attribute
instance-attribute
¶
env: Sequence[EnvVariable] | MISSING = MISSING
Environment variables to set when launching the MCP server. Names SHOULD be unique.
Agents MAY reject duplicates with -32602, and otherwise the last entry wins.
McpStdioCapabilities
¶
Bases: AnnotatedObject
Capabilities for stdio MCP server transports.
Source code in src/aclientp/schema/v2/capabilities.py
MessageMcpError
¶
Bases: AnnotatedObject
UNSTABLE: Successful mcp/message call whose inner MCP request failed.
Source code in src/aclientp/schema/v2/mcp.py
MessageMcpNotification
¶
Bases: AnnotatedObject
UNSTABLE: Notification for an active inner MCP request, from provider to consumer.
Source code in src/aclientp/schema/v2/mcp.py
params
class-attribute
instance-attribute
¶
The inner MCP params; None is the same as omitted.
request_id
instance-attribute
¶
request_id: McpRequestId
The identifier of the active inner MCP request.
server_id
instance-attribute
¶
server_id: McpServerAcpId
The declared ACP MCP server handling the associated request.
MessageMcpRequest
¶
Bases: AnnotatedObject
UNSTABLE: Parameters of mcp/message: an inner MCP request to the provider.
Source code in src/aclientp/schema/v2/mcp.py
params
class-attribute
instance-attribute
¶
The inner MCP params; None is the same as omitted.
request_id
instance-attribute
¶
request_id: McpRequestId
The caller-generated identifier for the inner MCP request.
server_id
instance-attribute
¶
server_id: McpServerAcpId
The declared ACP MCP server receiving this request.
MessageMcpResult
¶
Bases: AnnotatedObject
UNSTABLE: Successful mcp/message outcome: an opaque inner MCP result.
Source code in src/aclientp/schema/v2/mcp.py
ModifyDiffChange
¶
MoveDiffChange
¶
MultiSelectPropertySchema
¶
Bases: AnnotatedObject
Schema for multi-select (array) properties in an elicitation form.
Source code in src/aclientp/schema/v2/elicitation.py
default
class-attribute
instance-attribute
¶
Default selected values.
description
class-attribute
instance-attribute
¶
Human-readable description.
max_items
class-attribute
instance-attribute
¶
Maximum number of items to select.
min_items
class-attribute
instance-attribute
¶
Minimum number of items to select.
title
class-attribute
instance-attribute
¶
Optional title for the property.
NewSessionRequest
¶
Bases: AnnotatedObject
Request parameters for creating a new session.
Source code in src/aclientp/schema/v2/sessions.py
additional_directories
class-attribute
instance-attribute
¶
additional_directories: Sequence[AbsolutePath] | MISSING = MISSING
Additional workspace roots for this session. Each path must be absolute.
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[InitialSessionConfigOption] | MISSING = MISSING
Initial values for the session's config options.
cwd
instance-attribute
¶
cwd: AbsolutePath
The working directory for this session. Must be an absolute path.
mcp_servers
class-attribute
instance-attribute
¶
mcp_servers: Sequence[McpServer] | MISSING = MISSING
List of MCP (Model Context Protocol) servers the agent should connect to.
system_prompt
class-attribute
instance-attribute
¶
system_prompt: SystemPrompt | MISSING | None = MISSING
System-level instructions for the new session.
NewSessionResponse
¶
Bases: AnnotatedObject
Response from creating a new session.
New sessions are idle until a state_update says otherwise.
Source code in src/aclientp/schema/v2/sessions.py
available_commands
class-attribute
instance-attribute
¶
available_commands: Sequence[AvailableCommand] | MISSING = MISSING
Initial commands the agent can execute in this session.
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] | MISSING = MISSING
Initial session configuration options.
Notice
¶
Bases: AnnotatedObject
Fire-and-forget information for the user, not part of session history.
Agents must not rely on a notice being received or shown.
Source code in src/aclientp/schema/v2/session_updates.py
NumberPropertySchema
¶
Bases: AnnotatedObject
Schema for number (floating-point) properties in an elicitation form.
Source code in src/aclientp/schema/v2/elicitation.py
default
class-attribute
instance-attribute
¶
Default value.
description
class-attribute
instance-attribute
¶
Human-readable description.
maximum
class-attribute
instance-attribute
¶
Maximum value (inclusive).
minimum
class-attribute
instance-attribute
¶
Minimum value (inclusive).
title
class-attribute
instance-attribute
¶
Optional title for the property.
OtherStateSessionUpdate
¶
Bases: OtherStateUpdate
state_update with a custom or future state.
Source code in src/aclientp/schema/v2/session_updates.py
OtherStateUpdate
¶
Bases: Unknown, _StateBase
A custom or future state; state values starting with _ are extensions.
Source code in src/aclientp/schema/v2/prompt.py
PermissionOption
¶
Bases: AnnotatedObject
An option offered to the user.
Source code in src/aclientp/schema/v2/permissions.py
option_id
instance-attribute
¶
option_id: PermissionOptionId
Identifier of the option; unique within the request.
PlanEntry
¶
Bases: AnnotatedObject
A task or goal the agent intends to accomplish.
Source code in src/aclientp/schema/v2/plans.py
PlanItems
¶
PlanMarkdown
¶
Bases: AnnotatedObject
UNSTABLE: A plan as raw markdown content.
Source code in src/aclientp/schema/v2/plans.py
path
class-attribute
instance-attribute
¶
path: AbsolutePath | MISSING | None = MISSING
Absolute path of the file holding the plan.
PlanRemoved
¶
Bases: AnnotatedObject
UNSTABLE: The plan with this ID was removed.
Source code in src/aclientp/schema/v2/plans.py
PlanUpdate
¶
Bases: AnnotatedObject
New content of the plan identified by its plan_id.
Source code in src/aclientp/schema/v2/plans.py
PromptAudioCapabilities
¶
Bases: AnnotatedObject
Capabilities for audio content in prompt requests.
Source code in src/aclientp/schema/v2/capabilities.py
PromptCapabilities
¶
Bases: AnnotatedObject
Prompt capabilities supported by the agent in session/prompt requests.
Source code in src/aclientp/schema/v2/capabilities.py
audio
class-attribute
instance-attribute
¶
audio: PromptAudioCapabilities | MISSING | None = MISSING
Agent supports audio content blocks.
embedded_context
class-attribute
instance-attribute
¶
embedded_context: PromptEmbeddedContextCapabilities | MISSING | None = MISSING
Agent supports embedded context in session/prompt requests.
image
class-attribute
instance-attribute
¶
image: PromptImageCapabilities | MISSING | None = MISSING
Agent supports image content blocks.
skill
class-attribute
instance-attribute
¶
skill: PromptSkillCapabilities | MISSING | None = MISSING
Agent supports skill content blocks.
PromptEmbeddedContextCapabilities
¶
Bases: AnnotatedObject
Capabilities for embedded context in prompt requests.
Source code in src/aclientp/schema/v2/capabilities.py
PromptImageCapabilities
¶
Bases: AnnotatedObject
Capabilities for image content in prompt requests.
Source code in src/aclientp/schema/v2/capabilities.py
PromptRequest
¶
Bases: AnnotatedObject
Parameters of session/prompt: a user message for the session.
Agents MUST support text and resource_link content; other block types
need the matching prompt capability.
Source code in src/aclientp/schema/v2/prompt.py
idempotency_key
class-attribute
instance-attribute
¶
idempotency_key: IdempotencyKey | MISSING | None = MISSING
Identifies this submission, so a retry does not insert the message twice.
prompt
class-attribute
instance-attribute
¶
prompt: Sequence[ContentBlock] = Field(min_length=1)
The content of the user message; at least one block.
PromptResponse
¶
Bases: AnnotatedObject
Acknowledges that the user message was inserted into the conversation.
It does not mean the turn has finished; that is reported with state_update.
Source code in src/aclientp/schema/v2/prompt.py
PromptSkillCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Capabilities for skill content blocks in prompt requests.
Source code in src/aclientp/schema/v2/capabilities.py
inline
class-attribute
instance-attribute
¶
inline: PromptSkillInlineCapabilities | MISSING | None = MISSING
Agent supports skill content blocks at any position in a prompt.
PromptSkillInlineCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Capabilities for skill content blocks at any position in a prompt.
Source code in src/aclientp/schema/v2/capabilities.py
PromptSuggestion
¶
Bases: AnnotatedObject
UNSTABLE: A prompt the agent predicts the user will send next.
Source code in src/aclientp/schema/v2/session_updates.py
prompt
class-attribute
instance-attribute
¶
prompt: Sequence[ContentBlock] = Field(min_length=1)
The content of the suggested prompt.
PromptSuggestionsAudioCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Capabilities for audio content in prompt suggestions.
Source code in src/aclientp/schema/v2/capabilities.py
PromptSuggestionsCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Client support for prompt_suggestions_update session updates.
Source code in src/aclientp/schema/v2/capabilities.py
audio
class-attribute
instance-attribute
¶
audio: PromptSuggestionsAudioCapabilities | MISSING | None = MISSING
Whether prompt suggestions may include audio content blocks.
embedded_context
class-attribute
instance-attribute
¶
embedded_context: PromptSuggestionsEmbeddedContextCapabilities | MISSING | None = MISSING
Whether prompt suggestions may include resource content blocks.
image
class-attribute
instance-attribute
¶
image: PromptSuggestionsImageCapabilities | MISSING | None = MISSING
Whether prompt suggestions may include image content blocks.
PromptSuggestionsEmbeddedContextCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Capabilities for embedded resources in prompt suggestions.
Source code in src/aclientp/schema/v2/capabilities.py
PromptSuggestionsImageCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Capabilities for image content in prompt suggestions.
Source code in src/aclientp/schema/v2/capabilities.py
PromptSuggestionsUpdate
¶
Bases: AnnotatedObject
UNSTABLE: Replaces the session's prompt suggestions.
Source code in src/aclientp/schema/v2/session_updates.py
suggestions
instance-attribute
¶
suggestions: Sequence[PromptSuggestion]
Suggestions, most likely first; an empty list withdraws all.
ProviderCurrentConfig
¶
Bases: AnnotatedObject
UNSTABLE: Current effective non-secret routing configuration for a provider.
Source code in src/aclientp/schema/v2/providers.py
ProviderInfo
¶
Bases: AnnotatedObject
UNSTABLE: Information about a configurable LLM provider.
Source code in src/aclientp/schema/v2/providers.py
current
class-attribute
instance-attribute
¶
current: ProviderCurrentConfig | MISSING | None = MISSING
Current effective non-secret routing config. Null or omitted means provider is disabled.
provider_id
instance-attribute
¶
provider_id: ProviderId
Provider identifier, for example "main" or "openai".
required
instance-attribute
¶
Whether this provider is mandatory and cannot be disabled via providers/disable. If
true, clients must not call providers/disable for this provider ID.
supported
instance-attribute
¶
supported: Sequence[LlmProtocol]
Supported protocol types for this provider.
ProvidersCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Provider configuration capabilities supported by the agent.
Source code in src/aclientp/schema/v2/capabilities.py
ProxyNotification
¶
ProxyRequest
¶
ProxySuccessorNotification
¶
Bases: AnnotatedObject
UNSTABLE: Parameters of a proxy/successor notification: a wrapped notification.
Source code in src/aclientp/schema/v2/protocol.py
ProxySuccessorRequest
¶
Bases: AnnotatedObject
UNSTABLE: Parameters of a proxy/successor request: a wrapped request.
Source code in src/aclientp/schema/v2/protocol.py
ReplayComplete
¶
Bases: AnnotatedObject
The history replay requested by session/resume is complete.
Sent once per session/resume with replayFrom; a resume that ends without it
delivered a truncated replay.
Source code in src/aclientp/schema/v2/session_updates.py
ReplayFromStart
¶
Bases: AnnotatedObject
Replay all retained conversation history from its first replayable entry.
Source code in src/aclientp/schema/v2/sessions.py
RequestPermissionRequest
¶
Bases: AnnotatedObject
Parameters of session/request_permission.
Source code in src/aclientp/schema/v2/permissions.py
description
class-attribute
instance-attribute
¶
Why permission is needed.
options
class-attribute
instance-attribute
¶
options: Sequence[PermissionOption] = Field(min_length=1)
The options the user can choose from; at least one.
subject
class-attribute
instance-attribute
¶
subject: RequestPermissionSubject | MISSING | None = MISSING
Structured context about the operation.
title
instance-attribute
¶
Title of the permission prompt (not the title of a tool call).
RequestPermissionResponse
¶
Bases: AnnotatedObject
Response to session/request_permission.
Source code in src/aclientp/schema/v2/permissions.py
RequestTypes
dataclass
¶
Validators of a request method's parameters and result.
Source code in src/aclientp/schema/v2/protocol.py
params
instance-attribute
¶
Parses and validates the params of the request.
result
instance-attribute
¶
Parses and validates the result of the response.
of
classmethod
¶
of(params: Any, result: Any) -> RequestTypes
RequiresActionStateSessionUpdate
¶
Bases: RequiresActionStateUpdate
state_update: foreground work is blocked on user action.
Source code in src/aclientp/schema/v2/session_updates.py
RequiresActionStateUpdate
¶
Bases: _StateBase
The foreground workflow as a whole is blocked on user action.
Source code in src/aclientp/schema/v2/prompt.py
ResourceLink
¶
Bases: AnnotatedObject
A link to a resource the receiver may be able to read. All agents MUST support it.
Source code in src/aclientp/schema/v2/content.py
annotations
class-attribute
instance-attribute
¶
annotations: Annotations | MISSING | None = MISSING
Display and routing hints.
description
class-attribute
instance-attribute
¶
Human-readable details.
icons
class-attribute
instance-attribute
¶
icons: Sequence[Icon] | MISSING | None = MISSING
Icons a user interface can show.
mime_type
class-attribute
instance-attribute
¶
mime_type: MediaType | MISSING | None = MISSING
MIME type of the resource.
size
class-attribute
instance-attribute
¶
Size of the resource in bytes.
ResultResponse
¶
Bases: _Message
A successful JSON-RPC response.
Source code in src/aclientp/schema/v2/protocol.py
ResumeSessionRequest
¶
Bases: AnnotatedObject
Request parameters for resuming an existing session.
Source code in src/aclientp/schema/v2/sessions.py
additional_directories
class-attribute
instance-attribute
¶
additional_directories: Sequence[AbsolutePath] | MISSING = MISSING
Additional workspace roots to activate for this session. Each path must be absolute.
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[InitialSessionConfigOption] | MISSING = MISSING
Initial values for the session's config options.
cwd
instance-attribute
¶
cwd: AbsolutePath
The working directory for this session. Must be an absolute path.
mcp_servers
class-attribute
instance-attribute
¶
mcp_servers: Sequence[McpServer] | MISSING = MISSING
List of MCP servers to connect to for this session.
replay_from
class-attribute
instance-attribute
¶
replay_from: ReplayFrom | MISSING | None = MISSING
Inclusive cursor describing where conversation replay should begin.
system_prompt
class-attribute
instance-attribute
¶
system_prompt: SystemPrompt | MISSING | None = MISSING
System-level instructions for the resumed session.
ResumeSessionResponse
¶
Bases: AnnotatedObject
Response from resuming an existing session.
The agent sends a current state_update after any requested replay (ended by
replay_complete) and before this response.
Source code in src/aclientp/schema/v2/sessions.py
available_commands
class-attribute
instance-attribute
¶
available_commands: Sequence[AvailableCommand] | MISSING = MISSING
Initial commands the agent can execute in this session.
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] | MISSING = MISSING
Initial session configuration options.
RunningStateSessionUpdate
¶
Bases: RunningStateUpdate
state_update: foreground work is in progress.
Source code in src/aclientp/schema/v2/session_updates.py
RunningStateUpdate
¶
Schema
¶
SelectSessionConfigOption
¶
Bases: _ConfigOptionBase
A single-value selector (dropdown).
Source code in src/aclientp/schema/v2/config_options.py
current_value
instance-attribute
¶
current_value: SessionConfigValueId
The selected value; one of the values in options.
options
instance-attribute
¶
options: SessionConfigSelectOptions
The selectable values; at least one, each value unique.
SelectedPermissionOutcome
¶
Bases: AnnotatedObject
The user selected one of the offered options.
An option_id that matches no offered option counts as rejection.
Source code in src/aclientp/schema/v2/permissions.py
SessionAdditionalDirectoriesCapabilities
¶
Bases: AnnotatedObject
Capabilities for additional session directories support.
Source code in src/aclientp/schema/v2/capabilities.py
SessionArchiveCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Capabilities for session/archive and session/unarchive.
Source code in src/aclientp/schema/v2/capabilities.py
SessionCancelCapabilities
¶
Bases: AnnotatedObject
A subagent session's work can be cancelled (session/cancel) without ending it.
Source code in src/aclientp/schema/v2/subagents.py
SessionCapabilities
¶
Bases: AnnotatedObject
Session capabilities supported by the agent.
{} means the agent supports the baseline session methods: session/new,
session/list, session/resume, session/close, session/prompt,
session/cancel and session/update.
Source code in src/aclientp/schema/v2/capabilities.py
additional_directories
class-attribute
instance-attribute
¶
additional_directories: SessionAdditionalDirectoriesCapabilities | MISSING | None = MISSING
Whether the agent supports additionalDirectories on supported session lifecycle
requests.
archive
class-attribute
instance-attribute
¶
archive: SessionArchiveCapabilities | MISSING | None = MISSING
Whether the agent supports session/archive and session/unarchive.
delete
class-attribute
instance-attribute
¶
delete: SessionDeleteCapabilities | MISSING | None = MISSING
Whether the agent supports session/delete.
fork
class-attribute
instance-attribute
¶
fork: SessionForkCapabilities | MISSING | None = MISSING
Whether the agent supports session/fork.
mcp
class-attribute
instance-attribute
¶
mcp: McpCapabilities | MISSING | None = MISSING
MCP capabilities supported by the agent for session lifecycle requests.
options
class-attribute
instance-attribute
¶
options: SessionOptionsCapabilities | MISSING | None = MISSING
Whether the agent supports session/options.
prompt
class-attribute
instance-attribute
¶
prompt: PromptCapabilities | MISSING | None = MISSING
Prompt capabilities supported by the agent in session/prompt requests.
status
class-attribute
instance-attribute
¶
status: SessionStatusCapabilities | MISSING | None = MISSING
Whether the agent supports session/status.
system_prompt
class-attribute
instance-attribute
¶
system_prompt: SessionSystemPromptCapabilities | MISSING | None = MISSING
Whether the agent supports systemPrompt on session lifecycle requests.
title
class-attribute
instance-attribute
¶
title: SessionTitleCapabilities | MISSING | None = MISSING
Whether the agent supports session/set_title.
SessionConfigSelectGroup
¶
Bases: AnnotatedObject
A group of possible values of a select config option.
Source code in src/aclientp/schema/v2/config_options.py
options
class-attribute
instance-attribute
¶
options: Sequence[SessionConfigSelectOption] = Field(min_length=1)
The values in this group.
SessionConfigSelectOption
¶
Bases: AnnotatedObject
A possible value of a select config option.
Source code in src/aclientp/schema/v2/config_options.py
description
class-attribute
instance-attribute
¶
Description of this value.
SessionDeleteCapabilities
¶
Bases: AnnotatedObject
Capabilities for the session/delete method.
Source code in src/aclientp/schema/v2/capabilities.py
SessionForkCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Capabilities for the session/fork method.
Source code in src/aclientp/schema/v2/capabilities.py
SessionInfo
¶
Bases: AnnotatedObject
Information about a session returned by session/list.
Source code in src/aclientp/schema/v2/sessions.py
additional_directories
class-attribute
instance-attribute
¶
additional_directories: Sequence[AbsolutePath] | MISSING = MISSING
Additional workspace roots reported for this session. Each path must be absolute.
archived
class-attribute
instance-attribute
¶
Whether the session is archived.
cwd
instance-attribute
¶
cwd: AbsolutePath
The working directory for this session. Must be an absolute path.
title
class-attribute
instance-attribute
¶
Human-readable title for the session
updated_at
class-attribute
instance-attribute
¶
RFC 3339 timestamp of last activity.
SessionInfoUpdate
¶
Bases: AnnotatedObject
Partial update of session metadata; None clears a field.
Source code in src/aclientp/schema/v2/session_updates.py
SessionMessage
¶
Bases: AnnotatedObject
An upsert of a message sent to or received from another session.
Every field but message_id is a patch: omitted leaves it unchanged, None
clears it, a value replaces it.
Source code in src/aclientp/schema/v2/messages.py
content
class-attribute
instance-attribute
¶
content: Sequence[ContentBlock] | MISSING | None = MISSING
Complete replacement content.
message_id
instance-attribute
¶
message_id: MessageId
Identifier of the message in this session's transcript.
recipient_message_id
class-attribute
instance-attribute
¶
recipient_message_id: MessageId | MISSING | None = MISSING
On an outgoing view: the messageId of the incoming view in the recipient's
transcript.
recipient_session_id
class-attribute
instance-attribute
¶
recipient_session_id: SessionId | MISSING | None = MISSING
The receiving session.
SessionMessageChunk
¶
Bases: AnnotatedObject
A content block appended to a session message.
Participants and references come from session_message upserts.
Source code in src/aclientp/schema/v2/messages.py
SessionMessageCursorAnchor
¶
Bases: CursorMessageAnchor
UNSTABLE: The cursor is next to a session-directed message.
Source code in src/aclientp/schema/v2/cursors.py
SessionNotFoundErrorData
¶
Bases: AnnotatedObject
Data of the -32002 (Resource not found) error for an unknown or inactive session.
Source code in src/aclientp/schema/v2/common.py
SessionOptionsCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Capabilities for the session/options method.
Source code in src/aclientp/schema/v2/capabilities.py
SessionOptionsRequest
¶
Bases: AnnotatedObject
UNSTABLE: Parameters of session/options.
Returns the config options a session would start with, without creating or resuming one.
Source code in src/aclientp/schema/v2/sessions.py
additional_directories
class-attribute
instance-attribute
¶
additional_directories: Sequence[AbsolutePath] | MISSING = MISSING
Additional workspace roots to resolve options for. Each path must be absolute.
cwd
instance-attribute
¶
cwd: AbsolutePath
The working directory to resolve options for. Must be an absolute path.
SessionOptionsResponse
¶
Bases: AnnotatedObject
UNSTABLE: Response from session/options.
Source code in src/aclientp/schema/v2/sessions.py
available_commands
class-attribute
instance-attribute
¶
available_commands: Sequence[AvailableCommand] | MISSING = MISSING
Commands the Agent knows the session would have.
config_options
class-attribute
instance-attribute
¶
config_options: Sequence[SessionConfigOption] | MISSING = MISSING
The config options the session would start with, with the same rules as on
NewSessionResponse.
SessionReference
¶
Bases: AnnotatedObject
A display-only reference to another session the tool call operates on, e.g. a subagent.
Source code in src/aclientp/schema/v2/tool_calls.py
SessionStatusCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Capabilities for the session/status method.
Source code in src/aclientp/schema/v2/capabilities.py
SessionStatusRequest
¶
Bases: AnnotatedObject
UNSTABLE: Request parameters for checking the status of a session.
Source code in src/aclientp/schema/v2/sessions.py
SessionStatusResponse
¶
Bases: AnnotatedObject
UNSTABLE: Response from checking the status of a session.
Source code in src/aclientp/schema/v2/sessions.py
state
class-attribute
instance-attribute
¶
state: StateUpdate | MISSING | None = MISSING
The session's current foreground state, as the same snapshot the Agent sends in
state_update notifications.
SessionSystemPromptCapabilities
¶
Bases: AnnotatedObject
Capabilities for client-provided system prompts.
Source code in src/aclientp/schema/v2/capabilities.py
mode
class-attribute
instance-attribute
¶
mode: SessionSystemPromptModeCapabilities | MISSING | None = MISSING
Delivery modes the agent supports in addition to append.
SessionSystemPromptModeCapabilities
¶
Bases: AnnotatedObject
System prompt delivery modes the agent supports in addition to append.
Source code in src/aclientp/schema/v2/capabilities.py
override
class-attribute
instance-attribute
¶
override: SessionSystemPromptOverrideCapabilities | MISSING | None = MISSING
Whether the agent supports override mode.
SessionSystemPromptOverrideCapabilities
¶
Bases: AnnotatedObject
Capabilities for the override system prompt mode.
Source code in src/aclientp/schema/v2/capabilities.py
SessionTitleCapabilities
¶
Bases: AnnotatedObject
UNSTABLE: Capabilities for Client-set session titles.
Source code in src/aclientp/schema/v2/capabilities.py
SetConfigOptionBooleanRequest
¶
Bases: _SetConfigOptionBase
Set a boolean config option.
Source code in src/aclientp/schema/v2/config_options.py
SetConfigOptionIdRequest
¶
Bases: _SetConfigOptionBase
Select a value of a select config option.
Source code in src/aclientp/schema/v2/config_options.py
SetConfigOptionUnknownRequest
¶
Bases: Unknown, _SetConfigOptionBase
Set a custom or future kind of config option.
Source code in src/aclientp/schema/v2/config_options.py
SetProviderRequest
¶
Bases: AnnotatedObject
UNSTABLE: Request parameters for providers/set.
Source code in src/aclientp/schema/v2/providers.py
headers
class-attribute
instance-attribute
¶
Full headers map for this provider. May include authorization, routing, or other integration-specific headers.
SetProviderResponse
¶
Bases: AnnotatedObject
UNSTABLE: Response to providers/set.
Source code in src/aclientp/schema/v2/providers.py
SetSessionConfigOptionResponse
¶
Bases: AnnotatedObject
Response to session/set_config_option.
Source code in src/aclientp/schema/v2/config_options.py
config_options
instance-attribute
¶
config_options: Sequence[SessionConfigOption]
All config options and their current values.
SetSessionTitleRequest
¶
Bases: AnnotatedObject
UNSTABLE: Request parameters for setting the title of a session.
Source code in src/aclientp/schema/v2/sessions.py
SetSessionTitleResponse
¶
Bases: AnnotatedObject
UNSTABLE: Response from setting the title of a session.
Source code in src/aclientp/schema/v2/sessions.py
Skill
¶
Bases: AnnotatedObject
UNSTABLE: An Agent Skill the user invokes with a skill content block.
Agents MUST only send skills to clients that advertise session.commands.skill.
Source code in src/aclientp/schema/v2/commands.py
path
class-attribute
instance-attribute
¶
path: AbsolutePath | MISSING | None = MISSING
Absolute path of the file defining the skill (normally its SKILL.md) on the
agent's machine.
SkillReference
¶
Bases: AnnotatedObject
UNSTABLE: A skill the user invokes with a prompt.
Names a skill entry of the session's command list. Requires the skill
prompt capability.
Source code in src/aclientp/schema/v2/content.py
name
instance-attribute
¶
The name of a skill entry in the session's current command list.
StringMultiSelectItems
¶
Bases: AnnotatedObject
String item schema for multi-select enum properties.
Source code in src/aclientp/schema/v2/elicitation.py
enum
class-attribute
instance-attribute
¶
Allowed enum values. Must contain at least one value.
StringPropertySchema
¶
Bases: AnnotatedObject
Schema for string properties in an elicitation form.
Source code in src/aclientp/schema/v2/elicitation.py
description
class-attribute
instance-attribute
¶
Human-readable description.
enum
class-attribute
instance-attribute
¶
Enum values for untitled single-select enums. Must contain at least one value when present.
format
class-attribute
instance-attribute
¶
format: StringFormat | MISSING | None = MISSING
String format.
max_length
class-attribute
instance-attribute
¶
Maximum string length.
min_length
class-attribute
instance-attribute
¶
Minimum string length.
one_of
class-attribute
instance-attribute
¶
one_of: Sequence[EnumOption] | MISSING | None = Field(default=MISSING, min_length=1)
Titled enum options for titled single-select enums. Must contain at least one option when present.
title
class-attribute
instance-attribute
¶
Optional title for the property.
SubagentSessionCapabilities
¶
Bases: AnnotatedObject
Client-initiated mutations permitted for a specific subagent session.
Each mutation needs an explicit per-child capability.
Source code in src/aclientp/schema/v2/subagents.py
cancel
class-attribute
instance-attribute
¶
cancel: SessionCancelCapabilities | MISSING | None = MISSING
Permits cancelling the child's current work.
SubagentUpdate
¶
Bases: AnnotatedObject
The parent session created and owns a child session, or the association changed.
Fields other than session_id are patches: omitted leaves them unchanged,
None clears them.
Source code in src/aclientp/schema/v2/subagents.py
additional_directories
class-attribute
instance-attribute
¶
additional_directories: Sequence[AbsolutePath] | MISSING | None = MISSING
Additional workspace roots of the child.
capabilities
class-attribute
instance-attribute
¶
capabilities: SubagentSessionCapabilities | MISSING | None = MISSING
Client-initiated mutations permitted for the child.
cwd
class-attribute
instance-attribute
¶
cwd: AbsolutePath | MISSING | None = MISSING
The child's working directory.
description
class-attribute
instance-attribute
¶
The parent's description of the child's role or purpose.
session_id
instance-attribute
¶
session_id: SessionId
The opaque ID of the child session in all ACP messages.
state
class-attribute
instance-attribute
¶
state: StateUpdate | MISSING | None = MISSING
The child's current foreground state, mirrored onto the association.
title
class-attribute
instance-attribute
¶
The parent's display title for the child; need not be unique.
SystemPrompt
¶
Bases: AnnotatedObject
Client-provided system-level instructions for a session.
Only sent when the agent advertises session.systemPrompt; agents that cannot apply
it return an error instead of creating the session.
Source code in src/aclientp/schema/v2/sessions.py
content
class-attribute
instance-attribute
¶
content: Sequence[ContentBlock] = Field(min_length=1)
The system prompt content; at least one block.
mode
instance-attribute
¶
mode: SystemPromptMode
How the Agent combines content with its own instructions.
Terminal
¶
Bases: AnnotatedObject
A display-only reference to an agent-owned terminal.
State and output arrive separately as terminal_update and
terminal_output_chunk.
Source code in src/aclientp/schema/v2/tool_calls.py
TerminalAuthCapabilities
¶
Bases: AnnotatedObject
Capabilities for terminal authentication methods.
Source code in src/aclientp/schema/v2/capabilities.py
TerminalCancelCapabilities
¶
Bases: AnnotatedObject
Capability to cancel a terminal with terminal/cancel.
Source code in src/aclientp/schema/v2/terminals.py
TerminalCapabilities
¶
Bases: AnnotatedObject
Client-initiated controls a terminal currently supports.
Source code in src/aclientp/schema/v2/terminals.py
cancel
class-attribute
instance-attribute
¶
cancel: TerminalCancelCapabilities | MISSING | None = MISSING
Permits the Client to cancel this terminal with terminal/cancel.
TerminalExitStatus
¶
Bases: AnnotatedObject
Exit information for an agent-owned terminal.
Its presence marks the terminal as exited, even when neither code nor signal is known.
Source code in src/aclientp/schema/v2/terminals.py
TerminalOutput
¶
Bases: AnnotatedObject
An authoritative replacement snapshot of terminal output bytes.
Source code in src/aclientp/schema/v2/terminals.py
TerminalOutputChunk
¶
Bases: AnnotatedObject
A chunk of bytes appended to an agent-owned terminal's output.
Source code in src/aclientp/schema/v2/terminals.py
decode
¶
from_bytes
classmethod
¶
from_bytes(terminal_id: TerminalId, data: bytes) -> Self
Create a chunk from raw output bytes.
TerminalSize
¶
Bases: AnnotatedObject
The size of an agent-owned terminal in character cells.
Source code in src/aclientp/schema/v2/terminals.py
TerminalUpdate
¶
Bases: AnnotatedObject
An upsert of an agent-owned terminal's state, keyed by terminal_id.
Other fields are patches: omitted leaves the stored value unchanged, None
clears it.
Source code in src/aclientp/schema/v2/terminals.py
capabilities
class-attribute
instance-attribute
¶
capabilities: TerminalCapabilities | MISSING | None = MISSING
Client-initiated controls this terminal currently supports, such as cancellation.
command
class-attribute
instance-attribute
¶
The command being run.
cwd
class-attribute
instance-attribute
¶
cwd: AbsolutePath | MISSING | None = MISSING
The absolute working directory of the command.
exit_status
class-attribute
instance-attribute
¶
exit_status: TerminalExitStatus | MISSING | None = MISSING
Exit information. A concrete object marks the terminal as exited.
output
class-attribute
instance-attribute
¶
output: TerminalOutput | MISSING | None = MISSING
An authoritative replacement snapshot of terminal output bytes.
size
class-attribute
instance-attribute
¶
size: TerminalSize | MISSING | None = MISSING
The terminal size the command runs with, when known.
terminal_id
instance-attribute
¶
terminal_id: TerminalId
Unique identifier for this terminal within the session.
TextCommandInput
¶
Bases: AnnotatedObject
All text typed after the command name (and the following whitespace) is the input.
Source code in src/aclientp/schema/v2/commands.py
TextContent
¶
Bases: AnnotatedObject
Text provided to or from an LLM. All agents MUST support it in prompts.
Source code in src/aclientp/schema/v2/content.py
annotations
class-attribute
instance-attribute
¶
annotations: Annotations | MISSING | None = MISSING
Display and routing hints.
TextResourceContents
¶
Bases: AnnotatedObject
Text contents of a resource.
Source code in src/aclientp/schema/v2/content.py
TitledMultiSelectItems
¶
Bases: AnnotatedObject
Items definition for titled multi-select enum properties.
Source code in src/aclientp/schema/v2/elicitation.py
any_of
class-attribute
instance-attribute
¶
any_of: Sequence[EnumOption] = Field(min_length=1)
Titled enum options. Must contain at least one option.
ToolCallCancelCapabilities
¶
Bases: AnnotatedObject
The tool call can be cancelled with tool_call/cancel.
Source code in src/aclientp/schema/v2/tool_calls.py
ToolCallCapabilities
¶
Bases: AnnotatedObject
Client-initiated controls a tool call currently supports.
A malformed value counts as no controls.
Source code in src/aclientp/schema/v2/tool_calls.py
cancel
class-attribute
instance-attribute
¶
cancel: ToolCallCancelCapabilities | MISSING | None = MISSING
Permits tool_call/cancel for this tool call.
ToolCallContentChunk
¶
Bases: AnnotatedObject
A content item appended to a tool call's content.
Source code in src/aclientp/schema/v2/tool_calls.py
ToolCallLocation
¶
Bases: AnnotatedObject
A file location a tool reads or modifies, for "follow-along" features.
Source code in src/aclientp/schema/v2/tool_calls.py
line
class-attribute
instance-attribute
¶
1-based line number in the file; 0 is invalid.
ToolCallPermissionSubject
¶
Bases: AnnotatedObject
Permission is requested before executing a tool call.
Source code in src/aclientp/schema/v2/permissions.py
tool_call
instance-attribute
¶
tool_call: ToolCallUpdate
The tool call; clients apply it to their stored tool call like a tool_call_update.
ToolCallSessionUpdate
¶
Bases: ToolCallUpdate
tool_call_update: a tool call was created or updated.
Source code in src/aclientp/schema/v2/session_updates.py
ToolCallUpdate
¶
Bases: AnnotatedObject
A tool call upsert, keyed by tool_call_id.
Sent as the tool_call_update session update (:class:ToolCallSessionUpdate in
:mod:aclientp.schema.v2.session_updates), and embedded in tool call permission requests.
Source code in src/aclientp/schema/v2/tool_calls.py
capabilities
class-attribute
instance-attribute
¶
capabilities: ToolCallCapabilities | MISSING | None = MISSING
Controls the tool call currently supports, such as cancellation.
content
class-attribute
instance-attribute
¶
content: Sequence[ToolCallContent] | MISSING | None = MISSING
Content produced by the tool call; replaces earlier content.
kind
class-attribute
instance-attribute
¶
kind: ToolKind | MISSING | None = MISSING
Category of the tool.
locations
class-attribute
instance-attribute
¶
locations: Sequence[ToolCallLocation] | MISSING | None = MISSING
File locations affected by the tool call.
name
class-attribute
instance-attribute
¶
Programmatic name of the tool.
raw_input
class-attribute
instance-attribute
¶
Raw input parameters of the tool.
raw_output
class-attribute
instance-attribute
¶
Raw output of the tool.
status
class-attribute
instance-attribute
¶
status: ToolCallStatus | MISSING | None = MISSING
Execution status; None resets it to pending.
title
class-attribute
instance-attribute
¶
Human-readable title of what the tool is doing.
tool_call_id
instance-attribute
¶
tool_call_id: ToolCallId
Unique identifier of the tool call in the session.
UnarchiveSessionRequest
¶
Bases: AnnotatedObject
UNSTABLE: Request parameters for unarchiving a session.
Source code in src/aclientp/schema/v2/sessions.py
UnarchiveSessionResponse
¶
Bases: AnnotatedObject
UNSTABLE: Response from unarchiving a session.
Source code in src/aclientp/schema/v2/sessions.py
Unknown
¶
Bases: AnnotatedObject
Base of fallback variants of open unions: a custom or future variant.
Keeps all fields of the payload, so messages can be passed on unchanged.
Source code in src/aclientp/schema/v2/base.py
UnknownAuthMethod
¶
Bases: Unknown
A custom or future auth method; type values starting with _ are extensions.
Source code in src/aclientp/schema/v2/auth.py
method_id
instance-attribute
¶
method_id: AuthMethodId
Unique identifier for this authentication method.
UnknownBackgroundWork
¶
Bases: Unknown
Custom or future background work; type values starting with _ are extensions.
Source code in src/aclientp/schema/v2/prompt.py
UnknownCommand
¶
Bases: Unknown
A custom or future command kind; type values starting with _ are extensions.
Source code in src/aclientp/schema/v2/commands.py
UnknownCommandInput
¶
Bases: Unknown
A custom or future input kind; type values starting with _ are extensions.
Source code in src/aclientp/schema/v2/commands.py
UnknownContent
¶
Bases: Unknown
A custom or future content block; type values starting with _ are extensions.
Source code in src/aclientp/schema/v2/content.py
UnknownCursorAnchor
¶
Bases: Unknown
UNSTABLE: A custom or future anchor kind; the client cannot place such a cursor.
Source code in src/aclientp/schema/v2/cursors.py
UnknownDiffChange
¶
Bases: Unknown, _DiffChangeBase
A custom or future file operation; values starting with _ are extensions.
Source code in src/aclientp/schema/v2/tool_calls.py
UnknownElicitationRequest
¶
Bases: Unknown
A custom or future mode; values starting with _ are extensions.
Source code in src/aclientp/schema/v2/elicitation.py
UnknownElicitationResponse
¶
Bases: Unknown
A custom or future action; values starting with _ are extensions.
Source code in src/aclientp/schema/v2/elicitation.py
UnknownMcpServer
¶
Bases: Unknown
A custom or future MCP transport; type values starting with _ are extensions.
Source code in src/aclientp/schema/v2/mcp.py
UnknownMultiSelectItems
¶
Bases: Unknown
Custom or future typed multi-select items.
Source code in src/aclientp/schema/v2/elicitation.py
UnknownPermissionOutcome
¶
Bases: Unknown
A custom or future outcome; values starting with _ are extensions.
Source code in src/aclientp/schema/v2/permissions.py
UnknownPermissionSubject
¶
Bases: Unknown
A custom or future subject; type values starting with _ are extensions.
Source code in src/aclientp/schema/v2/permissions.py
UnknownPlanContent
¶
Bases: Unknown
Custom or future plan content; type values starting with _ are extensions.
Source code in src/aclientp/schema/v2/plans.py
UnknownPropertySchema
¶
Bases: Unknown
A custom or future property type; values starting with _ are extensions.
Source code in src/aclientp/schema/v2/elicitation.py
UnknownReplayFrom
¶
Bases: Unknown
A custom or future replay cursor; type values starting with _ are extensions.
Source code in src/aclientp/schema/v2/sessions.py
UnknownSessionConfigOption
¶
Bases: Unknown, _ConfigOptionBase
A custom or future option kind; type values starting with _ are extensions.
Source code in src/aclientp/schema/v2/config_options.py
UnknownSessionUpdate
¶
Bases: Unknown
A custom or future session update; values starting with _ are extensions.
Source code in src/aclientp/schema/v2/session_updates.py
UnknownStateSessionUpdate
¶
Bases: UnknownStateUpdate
state_update: the agent cannot currently determine foreground activity.
Source code in src/aclientp/schema/v2/session_updates.py
UnknownStateUpdate
¶
Bases: _StateBase
The agent cannot currently determine foreground activity.
Replaces previously confirmed states; not to be sent merely because the session has been quiet.
Source code in src/aclientp/schema/v2/prompt.py
UnknownToolCallContent
¶
Bases: Unknown
Custom or future tool call content; type values starting with _ are extensions.
Source code in src/aclientp/schema/v2/tool_calls.py
UnsupportedProtocolVersionErrorData
¶
Bases: AnnotatedObject
Data of the -32022 (Unsupported protocol version) error.
Source code in src/aclientp/schema/v2/common.py
requested
instance-attribute
¶
requested: ProtocolVersion
The protocol version the Client requested.
supported
instance-attribute
¶
supported: Sequence[ProtocolVersion]
The protocol versions the Agent supports.
UpdateSessionNotification
¶
Bases: AnnotatedObject
Parameters of session/update: one update of a session.
Source code in src/aclientp/schema/v2/session_updates.py
UrlElicitationRequest
¶
Bases: _ScopedRequest
The client directs the user to url.
Source code in src/aclientp/schema/v2/elicitation.py
elicitation_id
instance-attribute
¶
elicitation_id: ElicitationId
Unique identifier of the elicitation; completed with elicitation/complete.
Usage
¶
Bases: AnnotatedObject
UNSTABLE: Token usage of the foreground work that just completed (not cumulative).
Source code in src/aclientp/schema/v2/common.py
cached_read_tokens
class-attribute
instance-attribute
¶
Cache read tokens, if reported.
cached_write_tokens
class-attribute
instance-attribute
¶
Cache write tokens, if reported.
thought_tokens
class-attribute
instance-attribute
¶
Thought/reasoning tokens, if reported.
total_tokens
class-attribute
instance-attribute
¶
Sum of all token types.
UsageUpdate
¶
Bases: AnnotatedObject
Context window and cost of the session.
Source code in src/aclientp/schema/v2/session_updates.py
UserMessage
¶
Bases: _MessageUpsert
A user message upsert, e.g. when the agent accepts or replaces a prompt.
Source code in src/aclientp/schema/v2/messages.py
UserMessageChunk
¶
Bases: _Chunk
A chunk of the user's message being streamed.
Source code in src/aclientp/schema/v2/messages.py
UserMessageCursorAnchor
¶
Bases: CursorMessageAnchor
UNSTABLE: The cursor is next to a user message.
Source code in src/aclientp/schema/v2/cursors.py
is_set
¶
Whether a field was given (None counts as given): narrows T | MISSING to T.
MISSING is truthy, so if field: does not work for this.
supports
¶
supports(capabilities: AnnotatedObject | MISSING | None, path: str) -> bool
Whether a capability marker is present, by its dotted wire path.
path uses the spec's camelCase names, e.g.
supports(init.capabilities, "session.systemPrompt.mode.override"). Every
object on the way must be present: omitted (MISSING) or null at any
level means not supported. Unknown names mean not supported.
Source code in src/aclientp/schema/v2/capabilities.py
to_wire
¶
Serialize a v2 model: wire names, MISSING left out, None sent as null.