From 8d09c60a5c39ae7691b0c52931816fb3ef119348 Mon Sep 17 00:00:00 2001 From: Chojan Shang Date: Tue, 30 Jun 2026 01:26:37 +0800 Subject: [PATCH] feat(schema): bump ACP schema to v1.16.0 --- docs/releasing.md | 4 +- schema/VERSION | 2 +- schema/meta.json | 64 +- schema/schema.json | 13592 +++++++++++++++++---------------- scripts/gen_all.py | 29 +- src/acp/agent/connection.py | 10 +- src/acp/client/connection.py | 12 +- src/acp/interfaces.py | 22 +- src/acp/meta.py | 60 +- src/acp/schema.py | 5877 +++++++------- tests/test_gen_all.py | 24 + 11 files changed, 10376 insertions(+), 9320 deletions(-) create mode 100644 tests/test_gen_all.py diff --git a/docs/releasing.md b/docs/releasing.md index 0e3c42a..68fd50e 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -4,9 +4,9 @@ Every package release tracks an upstream ACP schema tag from [`agentclientprotoc ## Prep checklist -1. **Choose the schema tag** (e.g. `v0.4.5`) and regenerate artifacts: +1. **Choose the schema tag** (e.g. `schema-v1.16.0`) and regenerate artifacts: ```bash - ACP_SCHEMA_VERSION=v0.4.5 make gen-all + ACP_SCHEMA_VERSION=schema-v1.16.0 make gen-all ``` This refreshes `schema/` and the generated `src/acp/schema.py`. 2. **Bump the SDK version** in `pyproject.toml` using a PEP 440 version string (for example `0.9.0a1` for an alpha release), and sync `uv.lock` if the lockfile is tracked. diff --git a/schema/VERSION b/schema/VERSION index 131bb6e..994766d 100644 --- a/schema/VERSION +++ b/schema/VERSION @@ -1 +1 @@ -refs/tags/v0.13.6 +refs/tags/schema-v1.16.0 diff --git a/schema/meta.json b/schema/meta.json index 071a291..d8937f3 100644 --- a/schema/meta.json +++ b/schema/meta.json @@ -1,52 +1,52 @@ { + "version": 1, "agentMethods": { - "authenticate": "authenticate", - "document_did_change": "document/didChange", - "document_did_close": "document/didClose", - "document_did_focus": "document/didFocus", - "document_did_open": "document/didOpen", - "document_did_save": "document/didSave", "initialize": "initialize", - "logout": "logout", - "mcp_message": "mcp/message", - "nes_accept": "nes/accept", - "nes_close": "nes/close", - "nes_reject": "nes/reject", - "nes_start": "nes/start", - "nes_suggest": "nes/suggest", - "providers_disable": "providers/disable", + "authenticate": "authenticate", "providers_list": "providers/list", "providers_set": "providers/set", + "providers_disable": "providers/disable", + "session_new": "session/new", + "session_load": "session/load", + "session_set_mode": "session/set_mode", + "session_set_config_option": "session/set_config_option", + "session_prompt": "session/prompt", "session_cancel": "session/cancel", - "session_close": "session/close", + "mcp_message": "mcp/message", + "session_list": "session/list", "session_delete": "session/delete", "session_fork": "session/fork", - "session_list": "session/list", - "session_load": "session/load", - "session_new": "session/new", - "session_prompt": "session/prompt", "session_resume": "session/resume", - "session_set_config_option": "session/set_config_option", - "session_set_mode": "session/set_mode" + "session_close": "session/close", + "logout": "logout", + "nes_start": "nes/start", + "nes_suggest": "nes/suggest", + "nes_accept": "nes/accept", + "nes_reject": "nes/reject", + "nes_close": "nes/close", + "document_did_open": "document/didOpen", + "document_did_change": "document/didChange", + "document_did_close": "document/didClose", + "document_did_save": "document/didSave", + "document_did_focus": "document/didFocus" }, "clientMethods": { - "elicitation_complete": "elicitation/complete", - "elicitation_create": "elicitation/create", - "fs_read_text_file": "fs/read_text_file", - "fs_write_text_file": "fs/write_text_file", - "mcp_connect": "mcp/connect", - "mcp_disconnect": "mcp/disconnect", - "mcp_message": "mcp/message", "session_request_permission": "session/request_permission", "session_update": "session/update", + "fs_write_text_file": "fs/write_text_file", + "fs_read_text_file": "fs/read_text_file", "terminal_create": "terminal/create", - "terminal_kill": "terminal/kill", "terminal_output": "terminal/output", "terminal_release": "terminal/release", - "terminal_wait_for_exit": "terminal/wait_for_exit" + "terminal_wait_for_exit": "terminal/wait_for_exit", + "terminal_kill": "terminal/kill", + "mcp_connect": "mcp/connect", + "mcp_message": "mcp/message", + "mcp_disconnect": "mcp/disconnect", + "elicitation_create": "elicitation/create", + "elicitation_complete": "elicitation/complete" }, "protocolMethods": { "cancel_request": "$/cancel_request" - }, - "version": 1 + } } diff --git a/schema/schema.json b/schema/schema.json index ca72e85..a117ee8 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -1,208 +1,122 @@ { - "$defs": { - "AcceptNesNotification": { - "description": "Notification sent when a suggestion is accepted.", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Agent Client Protocol", + "anyOf": [ + { + "title": "Agent", + "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "jsonrpc": { + "type": "string", + "enum": [ + "2.0" ] - }, - "id": { - "description": "The ID of the accepted suggestion.", - "type": "string" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this notification." } }, "required": [ - "sessionId", - "id" + "jsonrpc" ], - "type": "object", - "x-method": "nes/accept", - "x-side": "agent" - }, - "AgentAuthCapabilities": { - "description": "Authentication-related capabilities supported by the agent.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "logout": { - "anyOf": [ - { - "$ref": "#/$defs/LogoutCapabilities" - }, + "anyOf": [ + { + "title": "Request", + "allOf": [ { - "type": "null" + "$ref": "#/$defs/AgentRequest" } - ], - "description": "Whether the agent supports the logout method.\n\nBy supplying `{}` it means that the agent supports the logout method.", - "x-deserialize-default-on-error": true - } - }, - "type": "object" - }, - "AgentCapabilities": { - "description": "Capabilities supported by the agent.\n\nAdvertised during initialization to inform the client about\navailable features and content types.\n\nSee protocol docs: [Agent Capabilities](https://agentclientprotocol.com/protocol/initialization#agent-capabilities)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" ] }, - "auth": { + { + "title": "Response", "allOf": [ { - "$ref": "#/$defs/AgentAuthCapabilities" + "$ref": "#/$defs/AgentResponse" } - ], - "default": {}, - "description": "Authentication-related capabilities supported by the agent." - }, - "loadSession": { - "default": false, - "description": "Whether the agent supports `session/load`.", - "type": "boolean" + ] }, - "mcpCapabilities": { + { + "title": "Notification", "allOf": [ { - "$ref": "#/$defs/McpCapabilities" - } - ], - "default": { - "acp": false, - "http": false, - "sse": false - }, - "description": "MCP capabilities supported by the agent." - }, - "nes": { - "anyOf": [ - { - "$ref": "#/$defs/NesCapabilities" - }, - { - "type": "null" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNES (Next Edit Suggestions) capabilities supported by the agent.", - "x-deserialize-default-on-error": true - }, - "positionEncoding": { - "anyOf": [ - { - "$ref": "#/$defs/PositionEncodingKind" - }, - { - "type": "null" + "$ref": "#/$defs/AgentNotification" } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe position encoding selected by the agent from the client's supported encodings.", - "x-deserialize-default-on-error": true - }, - "promptCapabilities": { + ] + } + ] + }, + { + "title": "Client", + "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility", + "type": "object", + "properties": { + "jsonrpc": { + "type": "string", + "enum": [ + "2.0" + ] + } + }, + "required": [ + "jsonrpc" + ], + "anyOf": [ + { + "title": "Request", "allOf": [ { - "$ref": "#/$defs/PromptCapabilities" + "$ref": "#/$defs/ClientRequest" } - ], - "default": { - "audio": false, - "embeddedContext": false, - "image": false - }, - "description": "Prompt capabilities supported by the agent." + ] }, - "providers": { - "anyOf": [ - { - "$ref": "#/$defs/ProvidersCapabilities" - }, + { + "title": "Response", + "allOf": [ { - "type": "null" + "$ref": "#/$defs/ClientResponse" } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nProvider configuration capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports provider configuration methods.", - "x-deserialize-default-on-error": true + ] }, - "sessionCapabilities": { + { + "title": "Notification", "allOf": [ { - "$ref": "#/$defs/SessionCapabilities" + "$ref": "#/$defs/ClientNotification" } - ], - "default": {} + ] } - }, - "type": "object" + ] }, - "AgentNotification": { + { + "title": "ProtocolLevel", + "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility", + "type": "object", "properties": { + "jsonrpc": { + "type": "string", + "enum": [ + "2.0" + ] + }, "method": { + "description": "The notification method name.", "type": "string" }, "params": { + "description": "Method-specific notification parameters.", "anyOf": [ { + "description": "General protocol-level notifications that all sides are expected to\nimplement.\n\nNotifications whose methods start with '$/' are messages which\nare protocol implementation dependent and might not be implementable in all\nclients or agents. For example if the implementation uses a single threaded\nsynchronous programming language then there is little it can do to react to\na `$/cancel_request` notification. If an agent or client receives\nnotifications starting with '$/' it is free to ignore the notification.\n\nNotifications do not expect a response.", "anyOf": [ { + "title": "CancelRequestNotification", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or\nchanged at any point.\n\nCancels an ongoing request.\n\nThis is a notification sent by the side that sent a request to cancel that request.\n\nUpon receiving this notification, the receiver:\n\n1. MUST cancel the corresponding request activity and all nested activities\n2. MAY send any pending notifications.\n3. MUST send one of these responses for the original request:\n - Valid response with appropriate data (partial results or cancellation marker)\n - Error response with code `-32800` (Cancelled)\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/cancellation)", "allOf": [ { - "$ref": "#/$defs/SessionNotification" - } - ], - "description": "Handles session update notifications from the agent.\n\nThis is a notification endpoint (no response expected) that receives\nreal-time updates about session progress, including message chunks,\ntool calls, and execution plans.\n\nNote: Clients SHOULD continue accepting tool call updates even after\nsending a `session/cancel` notification, as the agent may send final\nupdates before responding with the cancelled stop reason.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", - "title": "SessionNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/CompleteElicitationNotification" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNotification that a URL-based elicitation has completed.", - "title": "CompleteElicitationNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/MessageMcpNotification" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nReceives an MCP-over-ACP notification.", - "title": "MessageMcpNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtNotification" + "$ref": "#/$defs/CancelRequestNotification" } - ], - "description": "Handles extension notifications from the agent.\n\nAllows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtNotification" + ] } - ], - "description": "All possible notifications that an agent can send to a client.\n\nThis enum is used internally for routing RPC notifications. You typically won't need\nto use this directly.\n\nNotifications do not expect a response." + ] }, { "type": "null" @@ -211,142 +125,153 @@ } }, "required": [ + "jsonrpc", "method" ], - "type": "object", "x-docs-ignore": true - }, + } + ], + "$defs": { "AgentRequest": { + "description": "A JSON-RPC request object.", + "type": "object", "properties": { "id": { - "$ref": "#/$defs/RequestId" + "description": "The request id used to correlate the matching response.", + "allOf": [ + { + "$ref": "#/$defs/RequestId" + } + ] }, "method": { + "description": "The method name to invoke.", "type": "string" }, "params": { + "description": "Method-specific request parameters.", "anyOf": [ { + "description": "All possible requests that an agent can send to a client.\n\nThis enum is used internally for routing RPC requests. You typically won't need\nto use this directly.\n\nThis enum encompasses all method calls from agent to client.", "anyOf": [ { + "title": "WriteTextFileRequest", + "description": "Writes content to a text file in the client's file system.\n\nOnly available if the client advertises the `fs.writeTextFile` capability.\nAllows the agent to create or modify files within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)", "allOf": [ { "$ref": "#/$defs/WriteTextFileRequest" } - ], - "description": "Writes content to a text file in the client's file system.\n\nOnly available if the client advertises the `fs.writeTextFile` capability.\nAllows the agent to create or modify files within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)", - "title": "WriteTextFileRequest" + ] }, { + "title": "ReadTextFileRequest", + "description": "Reads content from a text file in the client's file system.\n\nOnly available if the client advertises the `fs.readTextFile` capability.\nAllows the agent to access file contents within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)", "allOf": [ { "$ref": "#/$defs/ReadTextFileRequest" } - ], - "description": "Reads content from a text file in the client's file system.\n\nOnly available if the client advertises the `fs.readTextFile` capability.\nAllows the agent to access file contents within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)", - "title": "ReadTextFileRequest" + ] }, { + "title": "RequestPermissionRequest", + "description": "Requests permission from the user for a tool call operation.\n\nCalled by the agent when it needs user authorization before executing\na potentially sensitive operation. The client should present the options\nto the user and return their decision.\n\nIf the client cancels the prompt turn via `session/cancel`, it MUST\nrespond to this request with `RequestPermissionOutcome::Cancelled`.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)", "allOf": [ { "$ref": "#/$defs/RequestPermissionRequest" } - ], - "description": "Requests permission from the user for a tool call operation.\n\nCalled by the agent when it needs user authorization before executing\na potentially sensitive operation. The client should present the options\nto the user and return their decision.\n\nIf the client cancels the prompt turn via `session/cancel`, it MUST\nrespond to this request with `RequestPermissionOutcome::Cancelled`.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)", - "title": "RequestPermissionRequest" + ] }, { + "title": "CreateTerminalRequest", + "description": "Executes a command in a new terminal\n\nOnly available if the `terminal` Client capability is set to `true`.\n\nReturns a `TerminalId` that can be used with other terminal methods\nto get the current output, wait for exit, and kill the command.\n\nThe `TerminalId` can also be used to embed the terminal in a tool call\nby using the `ToolCallContent::Terminal` variant.\n\nThe Agent is responsible for releasing the terminal by using the `terminal/release`\nmethod.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", "allOf": [ { "$ref": "#/$defs/CreateTerminalRequest" } - ], - "description": "Executes a command in a new terminal\n\nOnly available if the `terminal` Client capability is set to `true`.\n\nReturns a `TerminalId` that can be used with other terminal methods\nto get the current output, wait for exit, and kill the command.\n\nThe `TerminalId` can also be used to embed the terminal in a tool call\nby using the `ToolCallContent::Terminal` variant.\n\nThe Agent is responsible for releasing the terminal by using the `terminal/release`\nmethod.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "CreateTerminalRequest" + ] }, { + "title": "TerminalOutputRequest", + "description": "Gets the terminal output and exit status\n\nReturns the current content in the terminal without waiting for the command to exit.\nIf the command has already exited, the exit status is included.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", "allOf": [ { "$ref": "#/$defs/TerminalOutputRequest" } - ], - "description": "Gets the terminal output and exit status\n\nReturns the current content in the terminal without waiting for the command to exit.\nIf the command has already exited, the exit status is included.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "TerminalOutputRequest" + ] }, { + "title": "ReleaseTerminalRequest", + "description": "Releases a terminal\n\nThe command is killed if it hasn't exited yet. Use `terminal/wait_for_exit`\nto wait for the command to exit before releasing the terminal.\n\nAfter release, the `TerminalId` can no longer be used with other `terminal/*` methods,\nbut tool calls that already contain it, continue to display its output.\n\nThe `terminal/kill` method can be used to terminate the command without releasing\nthe terminal, allowing the Agent to call `terminal/output` and other methods.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", "allOf": [ { "$ref": "#/$defs/ReleaseTerminalRequest" } - ], - "description": "Releases a terminal\n\nThe command is killed if it hasn't exited yet. Use `terminal/wait_for_exit`\nto wait for the command to exit before releasing the terminal.\n\nAfter release, the `TerminalId` can no longer be used with other `terminal/*` methods,\nbut tool calls that already contain it, continue to display its output.\n\nThe `terminal/kill` method can be used to terminate the command without releasing\nthe terminal, allowing the Agent to call `terminal/output` and other methods.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "ReleaseTerminalRequest" + ] }, { + "title": "WaitForTerminalExitRequest", + "description": "Waits for the terminal command to exit and return its exit status\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", "allOf": [ { "$ref": "#/$defs/WaitForTerminalExitRequest" } - ], - "description": "Waits for the terminal command to exit and return its exit status\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "WaitForTerminalExitRequest" + ] }, { + "title": "KillTerminalRequest", + "description": "Kills the terminal command without releasing the terminal\n\nWhile `terminal/release` will also kill the command, this method will keep\nthe `TerminalId` valid so it can be used with other methods.\n\nThis method can be helpful when implementing command timeouts which terminate\nthe command as soon as elapsed, and then get the final output so it can be sent\nto the model.\n\nNote: Call `terminal/release` when `TerminalId` is no longer needed.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", "allOf": [ { "$ref": "#/$defs/KillTerminalRequest" } - ], - "description": "Kills the terminal command without releasing the terminal\n\nWhile `terminal/release` will also kill the command, this method will keep\nthe `TerminalId` valid so it can be used with other methods.\n\nThis method can be helpful when implementing command timeouts which terminate\nthe command as soon as elapsed, and then get the final output so it can be sent\nto the model.\n\nNote: Call `terminal/release` when `TerminalId` is no longer needed.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "KillTerminalRequest" + ] }, { + "title": "CreateElicitationRequest", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequests structured user input via a form or URL.", "allOf": [ { "$ref": "#/$defs/CreateElicitationRequest" } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequests structured user input via a form or URL.", - "title": "CreateElicitationRequest" + ] }, { + "title": "ConnectMcpRequest", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nOpens an MCP-over-ACP connection.", "allOf": [ { "$ref": "#/$defs/ConnectMcpRequest" } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nOpens an MCP-over-ACP connection.", - "title": "ConnectMcpRequest" + ] }, { + "title": "MessageMcpRequest", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nExchanges an MCP-over-ACP message.", "allOf": [ { "$ref": "#/$defs/MessageMcpRequest" } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nExchanges an MCP-over-ACP message.", - "title": "MessageMcpRequest" + ] }, { + "title": "DisconnectMcpRequest", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCloses an MCP-over-ACP connection.", "allOf": [ { "$ref": "#/$defs/DisconnectMcpRequest" } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCloses an MCP-over-ACP connection.", - "title": "DisconnectMcpRequest" + ] }, { + "title": "ExtMethodRequest", + "description": "Handles extension method requests from the agent.\n\nAllows the Agent to send an arbitrary request that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "allOf": [ { "$ref": "#/$defs/ExtRequest" } - ], - "description": "Handles extension method requests from the agent.\n\nAllows the Agent to send an arbitrary request that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtMethodRequest" + ] } - ], - "description": "All possible requests that an agent can send to a client.\n\nThis enum is used internally for routing RPC requests. You typically won't need\nto use this directly.\n\nThis enum encompasses all method calls from agent to client." + ] }, { "type": "null" @@ -358,3116 +283,2570 @@ "id", "method" ], - "type": "object", "x-docs-ignore": true }, - "AgentResponse": { + "RequestId": { + "description": "JSON RPC Request Id\n\nAn identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \\[1\\] and Numbers SHOULD NOT contain fractional parts \\[2\\]\n\nThe Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects.\n\n\\[1\\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling.\n\n\\[2\\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions.", "anyOf": [ { - "properties": { - "id": { - "$ref": "#/$defs/RequestId" - }, - "result": { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/InitializeResponse" - } - ], - "title": "InitializeResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AuthenticateResponse" - } - ], - "title": "AuthenticateResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ListProvidersResponse" - } - ], - "title": "ListProvidersResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SetProviderResponse" - } - ], - "title": "SetProviderResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/DisableProviderResponse" - } - ], - "title": "DisableProviderResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/LogoutResponse" - } - ], - "title": "LogoutResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/NewSessionResponse" - } - ], - "title": "NewSessionResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/LoadSessionResponse" - } - ], - "title": "LoadSessionResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ListSessionsResponse" - } - ], - "title": "ListSessionsResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/DeleteSessionResponse" - } - ], - "title": "DeleteSessionResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ForkSessionResponse" - } - ], - "title": "ForkSessionResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ResumeSessionResponse" - } - ], - "title": "ResumeSessionResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/CloseSessionResponse" - } - ], - "title": "CloseSessionResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SetSessionModeResponse" - } - ], - "title": "SetSessionModeResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SetSessionConfigOptionResponse" - } - ], - "title": "SetSessionConfigOptionResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/PromptResponse" - } - ], - "title": "PromptResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/StartNesResponse" - } - ], - "title": "StartNesResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SuggestNesResponse" - } - ], - "title": "SuggestNesResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/CloseNesResponse" - } - ], - "title": "CloseNesResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtResponse" - } - ], - "title": "ExtMethodResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/MessageMcpResponse" - } - ], - "title": "MessageMcpResponse" - } - ], - "description": "All possible responses that an agent can send to a client.\n\nThis enum is used internally for routing RPC responses. You typically won't need\nto use this directly - the responses are handled automatically by the connection.\n\nThese are responses to the corresponding `ClientRequest` variants." - } - }, - "required": [ - "id", - "result" - ], - "title": "Result", - "type": "object" + "title": "Null", + "description": "The JSON-RPC `null` request id.", + "type": "null" }, { - "properties": { - "error": { - "$ref": "#/$defs/Error" - }, - "id": { - "$ref": "#/$defs/RequestId" - } - }, - "required": [ - "id", - "error" - ], - "title": "Error", - "type": "object" + "title": "Number", + "description": "A numeric JSON-RPC request id.", + "type": "integer", + "format": "int64" + }, + { + "title": "Str", + "description": "A string JSON-RPC request id.", + "type": "string" } - ], - "x-docs-ignore": true + ] }, - "Annotations": { - "description": "Optional annotations for the client. The client can use annotations to inform how objects are used or displayed", + "WriteTextFileRequest": { + "description": "Request to write content to a text file.\n\nOnly available if the client supports the `fs.writeTextFile` capability.", + "type": "object", "properties": { + "sessionId": { + "description": "The session ID for this request.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ] + }, + "path": { + "description": "Absolute path to the file to write.", + "type": "string" + }, + "content": { + "description": "The text content to write to the file.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" + ], + "additionalProperties": true + } + }, + "required": [ + "sessionId", + "path", + "content" + ], + "x-side": "client", + "x-method": "fs/write_text_file" + }, + "SessionId": { + "description": "A unique identifier for a conversation session between a client and agent.\n\nSessions maintain their own context, conversation history, and state,\nallowing multiple independent interactions with the same agent.\n\nSee protocol docs: [Session ID](https://agentclientprotocol.com/protocol/session-setup#session-id)", + "type": "string" + }, + "ReadTextFileRequest": { + "description": "Request to read content from a text file.\n\nOnly available if the client supports the `fs.readTextFile` capability.", + "type": "object", + "properties": { + "sessionId": { + "description": "The session ID for this request.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } ] }, - "audience": { - "items": { - "$ref": "#/$defs/Role" - }, + "path": { + "description": "Absolute path to the file to read.", + "type": "string" + }, + "line": { + "description": "Line number to start reading from (1-based).", "type": [ - "array", + "integer", "null" ], - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + "format": "uint32", + "minimum": 0 }, - "lastModified": { + "limit": { + "description": "Maximum number of lines to read.", "type": [ - "string", + "integer", "null" - ] + ], + "format": "uint32", + "minimum": 0 }, - "priority": { - "format": "double", - "type": [ - "number", - "null" - ] - } - }, - "type": "object" - }, - "AudioContent": { - "description": "Audio provided to or from an LLM.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "annotations": { - "anyOf": [ - { - "$ref": "#/$defs/Annotations" - }, - { - "type": "null" - } ], - "x-deserialize-default-on-error": true - }, - "data": { - "type": "string" - }, - "mimeType": { - "type": "string" + "additionalProperties": true } }, "required": [ - "data", - "mimeType" + "sessionId", + "path" ], - "type": "object" + "x-side": "client", + "x-method": "fs/read_text_file" }, - "AuthCapabilities": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAuthentication capabilities supported by the client.\n\nAdvertised during initialization to inform the agent which authentication\nmethod types the client can handle. This governs opt-in types that require\nadditional client-side support.", + "RequestPermissionRequest": { + "description": "Request for user permission to execute a tool call.\n\nSent when the agent needs authorization before performing a sensitive operation.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "sessionId": { + "description": "The session ID for this request.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } ] }, - "terminal": { - "default": false, - "description": "Whether the client supports `terminal` authentication methods.\n\nWhen `true`, the agent may include `terminal` entries in its authentication methods.", - "type": "boolean" - } - }, - "type": "object" - }, - "AuthEnvVar": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nDescribes a single environment variable for an [`AuthMethodEnvVar`] authentication method.", - "properties": { + "toolCall": { + "description": "Details about the tool call requiring permission.", + "allOf": [ + { + "$ref": "#/$defs/ToolCallUpdate" + } + ] + }, + "options": { + "description": "Available permission options for the user to choose from.", + "type": "array", + "items": { + "$ref": "#/$defs/PermissionOption" + } + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "label": { - "description": "Human-readable label for this variable, displayed in client UI.", - "type": [ - "string", - "null" - ] - }, - "name": { - "description": "The environment variable name (e.g. `\"OPENAI_API_KEY\"`).", - "type": "string" - }, - "optional": { - "default": false, - "description": "Whether this variable is optional.\n\nDefaults to `false`.", - "type": "boolean" - }, - "secret": { - "default": true, - "description": "Whether this value is a secret (e.g. API key, token).\nClients should use a password-style input for secret vars.\n\nDefaults to `true`.", - "type": "boolean" + ], + "additionalProperties": true } }, "required": [ - "name" + "sessionId", + "toolCall", + "options" ], - "type": "object" + "x-side": "client", + "x-method": "session/request_permission" }, - "AuthMethod": { - "anyOf": [ - { + "ToolCallUpdate": { + "description": "An update to an existing tool call.\n\nUsed to report progress and results as tools execute. All fields except\nthe tool call ID are optional - only changed fields need to be included.\n\nSee protocol docs: [Updating](https://agentclientprotocol.com/protocol/tool-calls#updating)", + "type": "object", + "properties": { + "toolCallId": { + "description": "The ID of the tool call being updated.", "allOf": [ { - "$ref": "#/$defs/AuthMethodEnvVar" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUser provides a key that the client passes to the agent as an environment variable.", - "properties": { - "type": { - "const": "env_var", - "type": "string" + "$ref": "#/$defs/ToolCallId" } - }, - "required": [ - "type" - ], - "type": "object" + ] }, - { - "allOf": [ + "kind": { + "description": "Update the tool kind.", + "anyOf": [ { - "$ref": "#/$defs/AuthMethodTerminal" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nClient runs an interactive terminal for the user to authenticate via a TUI.", - "properties": { - "type": { - "const": "terminal", - "type": "string" + "$ref": "#/$defs/ToolKind" + }, + { + "type": "null" } - }, - "required": [ - "type" ], - "type": "object" + "x-deserialize-default-on-error": true }, - { - "allOf": [ + "status": { + "description": "Update the execution status.", + "anyOf": [ { - "$ref": "#/$defs/AuthMethodAgent" + "$ref": "#/$defs/ToolCallStatus" + }, + { + "type": "null" } ], - "description": "Agent handles authentication itself.\n\nThis is the default when no `type` is specified.", - "title": "agent" - } - ], - "description": "Describes an available authentication method.\n\nThe `type` field acts as the discriminator in the serialized JSON form.\nWhen no `type` is present, the method is treated as `agent`." - }, - "AuthMethodAgent": { - "description": "Agent handles authentication itself.\n\nThis is the default authentication method type.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "description": { - "description": "Optional description providing more details about this authentication method.", - "type": [ - "string", - "null" - ] - }, - "id": { - "description": "Unique identifier for this authentication method.", - "type": "string" - }, - "name": { - "description": "Human-readable name of the authentication method.", - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object" - }, - "AuthMethodEnvVar": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nEnvironment variable authentication method.\n\nThe user provides credentials that the client passes to the agent as environment variables.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + "x-deserialize-default-on-error": true }, - "description": { - "description": "Optional description providing more details about this authentication method.", + "title": { + "description": "Update the human-readable title.", "type": [ "string", "null" ] }, - "id": { - "description": "Unique identifier for this authentication method.", - "type": "string" - }, - "link": { - "description": "Optional link to a page where the user can obtain their credentials.", + "content": { + "description": "Replace the content collection.", "type": [ - "string", + "array", "null" - ] - }, - "name": { - "description": "Human-readable name of the authentication method.", - "type": "string" - }, - "vars": { - "description": "The environment variables the client should set.", + ], "items": { - "$ref": "#/$defs/AuthEnvVar" + "$ref": "#/$defs/ToolCallContent" }, - "type": "array" - } - }, - "required": [ - "id", - "name", - "vars" - ], - "type": "object" - }, - "AuthMethodTerminal": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nTerminal-based authentication method.\n\nThe client runs an interactive terminal for the user to authenticate via a TUI.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true + }, + "locations": { + "description": "Replace the locations collection.", "type": [ - "object", + "array", "null" - ] - }, - "args": { - "description": "Additional arguments to pass when running the agent binary for terminal auth.", + ], "items": { - "type": "string" + "$ref": "#/$defs/ToolCallLocation" }, - "type": "array" - }, - "description": { - "description": "Optional description providing more details about this authentication method.", - "type": [ - "string", - "null" - ] + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, - "env": { - "additionalProperties": { - "type": "string" - }, - "description": "Additional environment variables to set when running the agent binary for terminal auth.", - "type": "object" + "rawInput": { + "description": "Update the raw input." }, - "id": { - "description": "Unique identifier for this authentication method.", - "type": "string" + "rawOutput": { + "description": "Update the raw output." }, - "name": { - "description": "Human-readable name of the authentication method.", - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object" - }, - "AuthenticateRequest": { - "description": "Request parameters for the authenticate method.\n\nSpecifies which authentication method to use.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "methodId": { - "description": "The ID of the authentication method to use.\nMust be one of the methods advertised in the initialize response.", - "type": "string" + ], + "additionalProperties": true } }, "required": [ - "methodId" - ], - "type": "object", - "x-method": "authenticate", - "x-side": "agent" + "toolCallId" + ] }, - "AuthenticateResponse": { - "description": "Response to the `authenticate` method.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - } - }, - "type": "object", - "x-method": "authenticate", - "x-side": "agent" + "ToolCallId": { + "description": "Unique identifier for a tool call within a session.", + "type": "string" }, - "AvailableCommand": { - "description": "Information about a command.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + "ToolKind": { + "description": "Categories of tools that can be invoked.\n\nTool kinds help clients choose appropriate icons and optimize how they\ndisplay tool execution progress.\n\nSee protocol docs: [Creating](https://agentclientprotocol.com/protocol/tool-calls#creating)", + "oneOf": [ + { + "description": "Reading files or data.", + "type": "string", + "const": "read" }, - "description": { - "description": "Human-readable description of what the command does.", - "type": "string" + { + "description": "Modifying files or content.", + "type": "string", + "const": "edit" }, - "input": { - "anyOf": [ - { - "$ref": "#/$defs/AvailableCommandInput" - }, - { - "type": "null" - } - ], - "description": "Input for the command if required", - "x-deserialize-default-on-error": true + { + "description": "Removing files or data.", + "type": "string", + "const": "delete" }, - "name": { - "description": "Command name (e.g., `create_plan`, `research_codebase`).", - "type": "string" - } - }, - "required": [ - "name", - "description" - ], - "type": "object" - }, - "AvailableCommandInput": { - "anyOf": [ { - "allOf": [ - { - "$ref": "#/$defs/UnstructuredCommandInput" - } - ], - "description": "All text that was typed after the command name is provided as input.", - "title": "unstructured" - } - ], - "description": "The input specification for a command." - }, - "AvailableCommandsUpdate": { - "description": "Available commands are ready or have changed", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + "description": "Moving or renaming files.", + "type": "string", + "const": "move" }, - "availableCommands": { - "description": "Commands the agent can execute", - "items": { - "$ref": "#/$defs/AvailableCommand" - }, - "type": "array", - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true - } - }, - "required": [ - "availableCommands" - ], - "type": "object" - }, - "BlobResourceContents": { - "description": "Binary resource contents.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + { + "description": "Searching for information.", + "type": "string", + "const": "search" }, - "blob": { - "type": "string" + { + "description": "Running commands or code.", + "type": "string", + "const": "execute" }, - "mimeType": { - "type": [ - "string", - "null" - ] + { + "description": "Internal reasoning or planning.", + "type": "string", + "const": "think" }, - "uri": { - "type": "string" + { + "description": "Retrieving external data.", + "type": "string", + "const": "fetch" + }, + { + "description": "Switching the current session mode.", + "type": "string", + "const": "switch_mode" + }, + { + "description": "Other tool types (default).", + "type": "string", + "const": "other" } - }, - "required": [ - "blob", - "uri" - ], - "type": "object" + ] }, - "BooleanPropertySchema": { - "description": "Schema for boolean properties in an elicitation form.", - "properties": { - "default": { - "description": "Default value.", - "type": [ - "boolean", - "null" - ] + "ToolCallStatus": { + "description": "Execution status of a tool call.\n\nTool calls progress through different statuses during their lifecycle.\n\nSee protocol docs: [Status](https://agentclientprotocol.com/protocol/tool-calls#status)", + "oneOf": [ + { + "description": "The tool call hasn't started running yet because the input is either\nstreaming or we're awaiting approval.", + "type": "string", + "const": "pending" }, - "description": { - "description": "Human-readable description.", - "type": [ - "string", - "null" - ] + { + "description": "The tool call is currently running.", + "type": "string", + "const": "in_progress" }, - "title": { - "description": "Optional title for the property.", - "type": [ - "string", - "null" - ] + { + "description": "The tool call completed successfully.", + "type": "string", + "const": "completed" + }, + { + "description": "The tool call failed with an error.", + "type": "string", + "const": "failed" } - }, - "type": "object" + ] }, - "CancelNotification": { - "description": "Notification to cancel ongoing operations for a session.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "ToolCallContent": { + "description": "Content produced by a tool call.\n\nTool calls can produce different types of content including\nstandard content blocks (text, images) or file diffs.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)", + "oneOf": [ + { + "description": "Standard content block (text, images, resources).", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "content" + } + }, + "required": [ + "type" + ], + "allOf": [ + { + "$ref": "#/$defs/Content" + } ] }, - "sessionId": { + { + "description": "File modification shown as a diff.", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "diff" + } + }, + "required": [ + "type" + ], "allOf": [ { - "$ref": "#/$defs/SessionId" + "$ref": "#/$defs/Diff" } - ], - "description": "The ID of the session to cancel operations for." - } - }, - "required": [ - "sessionId" - ], - "type": "object", - "x-method": "session/cancel", - "x-side": "agent" - }, - "CancelRequestNotification": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNotification to cancel an ongoing request.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/cancellation)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" ] }, - "requestId": { + { + "description": "Embed a terminal created with `terminal/create` by its id.\n\nThe terminal must be added before calling `terminal/release`.\n\nSee protocol docs: [Terminal](https://agentclientprotocol.com/protocol/terminals)", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "terminal" + } + }, + "required": [ + "type" + ], "allOf": [ { - "$ref": "#/$defs/RequestId" + "$ref": "#/$defs/Terminal" } - ], - "description": "The ID of the request to cancel." + ] } - }, - "required": [ - "requestId" ], - "type": "object", - "x-method": "$/cancel_request", - "x-side": "protocol" + "discriminator": { + "propertyName": "type" + } }, - "ClientCapabilities": { - "description": "Capabilities supported by the client.\n\nAdvertised during initialization to inform the agent about\navailable features and methods.\n\nSee protocol docs: [Client Capabilities](https://agentclientprotocol.com/protocol/initialization#client-capabilities)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "auth": { - "allOf": [ - { - "$ref": "#/$defs/AuthCapabilities" + "ContentBlock": { + "description": "Content blocks represent displayable information in the Agent Client Protocol.\n\nThey provide a structured way to handle various types of user-facing content\u2014whether\nit's text from language models, images for analysis, or embedded resources for context.\n\nContent blocks appear in:\n- User prompts sent via `session/prompt`\n- Language model output streamed through `session/update` notifications\n- Progress updates and results from tool calls\n\nThis structure is compatible with the Model Context Protocol (MCP), enabling\nagents to seamlessly forward content from MCP tool outputs without transformation.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/content)", + "oneOf": [ + { + "description": "Text content. May be plain text or formatted with Markdown.\n\nAll agents MUST support text content blocks in prompts.\nClients SHOULD render this text as Markdown.", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text" } - ], - "default": { - "terminal": false }, - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAuthentication capabilities supported by the client.\nDetermines which authentication method types the agent may include\nin its `InitializeResponse`." - }, - "elicitation": { - "anyOf": [ - { - "$ref": "#/$defs/ElicitationCapabilities" - }, - { - "type": "null" - } + "required": [ + "type" ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nElicitation capabilities supported by the client.\nDetermines which elicitation modes the agent may use.", - "x-deserialize-default-on-error": true - }, - "fs": { "allOf": [ - { - "$ref": "#/$defs/FileSystemCapabilities" - } - ], - "default": { - "readTextFile": false, - "writeTextFile": false - }, - "description": "File system capabilities supported by the client.\nDetermines which file operations the agent can request." - }, - "nes": { - "anyOf": [ - { - "$ref": "#/$defs/ClientNesCapabilities" - }, - { - "type": "null" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNES (Next Edit Suggestions) capabilities supported by the client.", - "x-deserialize-default-on-error": true - }, - "plan": { - "anyOf": [ - { - "$ref": "#/$defs/PlanCapabilities" - }, - { - "type": "null" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the client supports `plan_update` and `plan_removed` session updates.\n\nOptional. Omitted means the client does not advertise support.\nSupplying `{}` means the client can receive both update types.", - "x-deserialize-default-on-error": true - }, - "positionEncodings": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe position encodings supported by the client, in order of preference.", - "items": { - "$ref": "#/$defs/PositionEncodingKind" - }, - "type": "array", - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true - }, - "terminal": { - "default": false, - "description": "Whether the Client support all `terminal/*` methods.", - "type": "boolean" - } - }, - "type": "object" - }, - "ClientNesCapabilities": { - "description": "NES capabilities advertised by the client during initialization.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "jump": { - "anyOf": [ - { - "$ref": "#/$defs/NesJumpCapabilities" - }, - { - "type": "null" - } - ], - "description": "Whether the client supports the `jump` suggestion kind.", - "x-deserialize-default-on-error": true - }, - "rename": { - "anyOf": [ - { - "$ref": "#/$defs/NesRenameCapabilities" - }, - { - "type": "null" - } - ], - "description": "Whether the client supports the `rename` suggestion kind.", - "x-deserialize-default-on-error": true - }, - "searchAndReplace": { - "anyOf": [ - { - "$ref": "#/$defs/NesSearchAndReplaceCapabilities" - }, - { - "type": "null" - } - ], - "description": "Whether the client supports the `searchAndReplace` suggestion kind.", - "x-deserialize-default-on-error": true - } - }, - "type": "object" - }, - "ClientNotification": { - "properties": { - "method": { - "type": "string" - }, - "params": { - "anyOf": [ - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/CancelNotification" - } - ], - "description": "Cancels ongoing operations for a session.\n\nThis is a notification sent by the client to cancel an ongoing prompt turn.\n\nUpon receiving this notification, the Agent SHOULD:\n- Stop all language model requests as soon as possible\n- Abort all tool call invocations in progress\n- Send any pending `session/update` notifications\n- Respond to the original `session/prompt` request with `StopReason::Cancelled`\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", - "title": "CancelNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/DidOpenDocumentNotification" - } - ], - "description": "**UNSTABLE**\n\nNotification sent when a file is opened in the editor.", - "title": "DidOpenDocumentNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/DidChangeDocumentNotification" - } - ], - "description": "**UNSTABLE**\n\nNotification sent when a file is edited.", - "title": "DidChangeDocumentNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/DidCloseDocumentNotification" - } - ], - "description": "**UNSTABLE**\n\nNotification sent when a file is closed.", - "title": "DidCloseDocumentNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/DidSaveDocumentNotification" - } - ], - "description": "**UNSTABLE**\n\nNotification sent when a file is saved.", - "title": "DidSaveDocumentNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/DidFocusDocumentNotification" - } - ], - "description": "**UNSTABLE**\n\nNotification sent when a file becomes the active editor tab.", - "title": "DidFocusDocumentNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AcceptNesNotification" - } - ], - "description": "**UNSTABLE**\n\nNotification sent when a suggestion is accepted.", - "title": "AcceptNesNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/RejectNesNotification" - } - ], - "description": "**UNSTABLE**\n\nNotification sent when a suggestion is rejected.", - "title": "RejectNesNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/MessageMcpNotification" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSends an MCP-over-ACP notification.", - "title": "MessageMcpNotification" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtNotification" - } - ], - "description": "Handles extension notifications from the client.\n\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtNotification" - } - ], - "description": "All possible notifications that a client can send to an agent.\n\nThis enum is used internally for routing RPC notifications. You typically won't need\nto use this directly.\n\nNotifications do not expect a response." - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "method" - ], - "type": "object", - "x-docs-ignore": true - }, - "ClientRequest": { - "properties": { - "id": { - "$ref": "#/$defs/RequestId" - }, - "method": { - "type": "string" - }, - "params": { - "anyOf": [ - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/InitializeRequest" - } - ], - "description": "Establishes the connection with a client and negotiates protocol capabilities.\n\nThis method is called once at the beginning of the connection to:\n- Negotiate the protocol version to use\n- Exchange capability information between client and agent\n- Determine available authentication methods\n\nThe agent should respond with its supported protocol version and capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "title": "InitializeRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AuthenticateRequest" - } - ], - "description": "Authenticates the client using the specified authentication method.\n\nCalled when the agent requires authentication before allowing session creation.\nThe client provides the authentication method ID that was advertised during initialization.\n\nAfter successful authentication, the client can proceed to create sessions with\n`new_session` without receiving an `auth_required` error.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "title": "AuthenticateRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ListProvidersRequest" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nLists providers that can be configured by the client.", - "title": "ListProvidersRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SetProviderRequest" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nReplaces the configuration for a provider.", - "title": "SetProviderRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/DisableProviderRequest" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nDisables a provider.", - "title": "DisableProviderRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/LogoutRequest" - } - ], - "description": "Logs out of the current authenticated state.\n\nAfter a successful logout, all new sessions will require authentication.\nThere is no guarantee about the behavior of already running sessions.", - "title": "LogoutRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/NewSessionRequest" - } - ], - "description": "Creates a new conversation session with the agent.\n\nSessions represent independent conversation contexts with their own history and state.\n\nThe agent should:\n- Create a new session context\n- Connect to any specified MCP servers\n- Return a unique session ID for future requests\n\nMay return an `auth_required` error if the agent requires authentication.\n\nSee protocol docs: [Session Setup](https://agentclientprotocol.com/protocol/session-setup)", - "title": "NewSessionRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/LoadSessionRequest" - } - ], - "description": "Loads an existing session to resume a previous conversation.\n\nThis method is only available if the agent advertises the `loadSession` capability.\n\nThe agent should:\n- Restore the session context and conversation history\n- Connect to the specified MCP servers\n- Stream the entire conversation history back to the client via notifications\n\nSee protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)", - "title": "LoadSessionRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ListSessionsRequest" - } - ], - "description": "Lists existing sessions known to the agent.\n\nThis method is only available if the agent advertises the `sessionCapabilities.list` capability.\n\nThe agent should return metadata about sessions with optional filtering and pagination support.", - "title": "ListSessionsRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/DeleteSessionRequest" - } - ], - "description": "Deletes an existing session from `session/list`.\n\nThis method is only available if the agent advertises the `sessionCapabilities.delete` capability.", - "title": "DeleteSessionRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ForkSessionRequest" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nForks an existing session to create a new independent session.\n\nThis method is only available if the agent advertises the `session.fork` capability.\n\nThe agent should create a new session with the same conversation context as the\noriginal, allowing operations like generating summaries without affecting the\noriginal session's history.", - "title": "ForkSessionRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ResumeSessionRequest" - } - ], - "description": "Resumes an existing session without returning previous messages.\n\nThis method is only available if the agent advertises the `sessionCapabilities.resume` capability.\n\nThe agent should resume the session context, allowing the conversation to continue\nwithout replaying the message history (unlike `session/load`).", - "title": "ResumeSessionRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/CloseSessionRequest" - } - ], - "description": "Closes an active session and frees up any resources associated with it.\n\nThis method is only available if the agent advertises the `sessionCapabilities.close` capability.\n\nThe agent must cancel any ongoing work (as if `session/cancel` was called)\nand then free up any resources associated with the session.", - "title": "CloseSessionRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SetSessionModeRequest" - } - ], - "description": "Sets the current mode for a session.\n\nAllows switching between different agent modes (e.g., \"ask\", \"architect\", \"code\")\nthat affect system prompts, tool availability, and permission behaviors.\n\nThe mode must be one of the modes advertised in `availableModes` during session\ncreation or loading. Agents may also change modes autonomously and notify the\nclient via `current_mode_update` notifications.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", - "title": "SetSessionModeRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SetSessionConfigOptionRequest" - } - ], - "description": "Sets the current value for a session configuration option.", - "title": "SetSessionConfigOptionRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/PromptRequest" - } - ], - "description": "Processes a user prompt within a session.\n\nThis method handles the whole lifecycle of a prompt:\n- Receives user messages with optional context (files, images, etc.)\n- Processes the prompt using language models\n- Reports language model content and tool calls to the Clients\n- Requests permission to run tools\n- Executes any requested tool calls\n- Returns when the turn is complete with a stop reason\n\nSee protocol docs: [Prompt Turn](https://agentclientprotocol.com/protocol/prompt-turn)", - "title": "PromptRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/StartNesRequest" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nStarts an NES session.", - "title": "StartNesRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SuggestNesRequest" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequests a code suggestion.", - "title": "SuggestNesRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/CloseNesRequest" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCloses an active NES session and frees up any resources associated with it.\n\nThe agent must cancel any ongoing work and then free up any resources\nassociated with the NES session.", - "title": "CloseNesRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/MessageMcpRequest" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nExchanges an MCP-over-ACP message.", - "title": "MessageMcpRequest" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtRequest" - } - ], - "description": "Handles extension method requests from the client.\n\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtMethodRequest" - } - ], - "description": "All possible requests that a client can send to an agent.\n\nThis enum is used internally for routing RPC requests. You typically won't need\nto use this directly.\n\nThis enum encompasses all method calls from client to agent." - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "id", - "method" - ], - "type": "object", - "x-docs-ignore": true - }, - "ClientResponse": { - "anyOf": [ - { - "properties": { - "id": { - "$ref": "#/$defs/RequestId" - }, - "result": { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/WriteTextFileResponse" - } - ], - "title": "WriteTextFileResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ReadTextFileResponse" - } - ], - "title": "ReadTextFileResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/RequestPermissionResponse" - } - ], - "title": "RequestPermissionResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/CreateTerminalResponse" - } - ], - "title": "CreateTerminalResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/TerminalOutputResponse" - } - ], - "title": "TerminalOutputResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ReleaseTerminalResponse" - } - ], - "title": "ReleaseTerminalResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/WaitForTerminalExitResponse" - } - ], - "title": "WaitForTerminalExitResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/KillTerminalResponse" - } - ], - "title": "KillTerminalResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/CreateElicitationResponse" - } - ], - "title": "CreateElicitationResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ConnectMcpResponse" - } - ], - "title": "ConnectMcpResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/DisconnectMcpResponse" - } - ], - "title": "DisconnectMcpResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ExtResponse" - } - ], - "title": "ExtMethodResponse" - }, - { - "allOf": [ - { - "$ref": "#/$defs/MessageMcpResponse" - } - ], - "title": "MessageMcpResponse" - } - ], - "description": "All possible responses that a client can send to an agent.\n\nThis enum is used internally for routing RPC responses. You typically won't need\nto use this directly - the responses are handled automatically by the connection.\n\nThese are responses to the corresponding `AgentRequest` variants." + { + "$ref": "#/$defs/TextContent" + } + ] + }, + { + "description": "Images for visual context or analysis.\n\nRequires the `image` prompt capability when included in prompts.", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "image" } }, "required": [ - "id", - "result" + "type" ], - "title": "Result", - "type": "object" + "allOf": [ + { + "$ref": "#/$defs/ImageContent" + } + ] }, { + "description": "Audio data for transcription or analysis.\n\nRequires the `audio` prompt capability when included in prompts.", + "type": "object", "properties": { - "error": { - "$ref": "#/$defs/Error" - }, - "id": { - "$ref": "#/$defs/RequestId" + "type": { + "type": "string", + "const": "audio" } }, "required": [ - "id", - "error" + "type" ], - "title": "Error", - "type": "object" - } - ], - "x-docs-ignore": true - }, - "CloseNesRequest": { - "description": "Request to close an NES session.\n\nThe agent **must** cancel any ongoing work related to the NES session\nand then free up any resources associated with the session.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "allOf": [ + { + "$ref": "#/$defs/AudioContent" + } ] }, - "sessionId": { + { + "description": "References to resources that the agent can access.\n\nAll agents MUST support resource links in prompts.", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "resource_link" + } + }, + "required": [ + "type" + ], "allOf": [ { - "$ref": "#/$defs/SessionId" + "$ref": "#/$defs/ResourceLink" } + ] + }, + { + "description": "Complete resource contents embedded directly in the message.\n\nPreferred for including context as it avoids extra round-trips.\n\nRequires the `embeddedContext` prompt capability when included in prompts.", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "resource" + } + }, + "required": [ + "type" ], - "description": "The ID of the NES session to close." + "allOf": [ + { + "$ref": "#/$defs/EmbeddedResource" + } + ] } - }, - "required": [ - "sessionId" ], - "type": "object", - "x-method": "nes/close", - "x-side": "agent" + "discriminator": { + "propertyName": "type" + } }, - "CloseNesResponse": { - "description": "Response from closing an NES session.", + "Annotations": { + "description": "Optional annotations for the client. The client can use annotations to inform how objects are used or displayed", + "type": "object", "properties": { + "audience": { + "description": "Intended recipients for this content, such as the user or assistant.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/$defs/Role" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true + }, + "lastModified": { + "description": "Timestamp indicating when the underlying resource was last modified.", + "type": [ + "string", + "null" + ] + }, + "priority": { + "description": "Relative importance of this content when clients choose what to surface.", + "type": [ + "number", + "null" + ], + "format": "double" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } - }, - "type": "object", - "x-method": "nes/close", - "x-side": "agent" + } }, - "CloseSessionRequest": { - "description": "Request parameters for closing an active session.\n\nIf supported, the agent **must** cancel any ongoing work related to the session\n(treat it as if `session/cancel` was called) and then free up any resources\nassociated with the session.\n\nOnly available if the Agent supports the `sessionCapabilities.close` capability.", + "Role": { + "description": "The sender or recipient of messages and data in a conversation.", + "oneOf": [ + { + "description": "The assistant side of a conversation.", + "type": "string", + "const": "assistant" + }, + { + "description": "The user side of a conversation.", + "type": "string", + "const": "user" + } + ] + }, + "TextContent": { + "description": "Text provided to or from an LLM.", + "type": "object", "properties": { + "annotations": { + "description": "Optional annotations that help clients decide how to display or route this content.", + "anyOf": [ + { + "$ref": "#/$defs/Annotations" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "text": { + "description": "Text payload carried by this content block.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } ], - "description": "The ID of the session to close." + "additionalProperties": true } }, "required": [ - "sessionId" - ], - "type": "object", - "x-method": "session/close", - "x-side": "agent" + "text" + ] }, - "CloseSessionResponse": { - "description": "Response from closing a session.", + "ImageContent": { + "description": "An image provided to or from an LLM.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "annotations": { + "description": "Optional annotations that help clients decide how to display or route this content.", + "anyOf": [ + { + "$ref": "#/$defs/Annotations" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "data": { + "description": "Base64-encoded media payload.", + "type": "string" + }, + "mimeType": { + "description": "MIME type describing the encoded media payload.", + "type": "string" + }, + "uri": { + "description": "URI associated with this resource or media payload.", "type": [ - "object", + "string", "null" ] - } - }, - "type": "object", - "x-method": "session/close", - "x-side": "agent" - }, - "CompleteElicitationNotification": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNotification sent by the agent when a URL-based elicitation is complete.", - "properties": { + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "elicitationId": { - "allOf": [ - { - "$ref": "#/$defs/ElicitationId" - } ], - "description": "The ID of the elicitation that completed." + "additionalProperties": true } }, "required": [ - "elicitationId" - ], - "type": "object", - "x-method": "elicitation/complete", - "x-side": "client" + "data", + "mimeType" + ] }, - "ConfigOptionUpdate": { - "description": "Session configuration options have been updated.", + "AudioContent": { + "description": "Audio provided to or from an LLM.", + "type": "object", "properties": { + "annotations": { + "description": "Optional annotations that help clients decide how to display or route this content.", + "anyOf": [ + { + "$ref": "#/$defs/Annotations" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "data": { + "description": "Base64-encoded media payload.", + "type": "string" + }, + "mimeType": { + "description": "MIME type describing the encoded media payload.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "configOptions": { - "description": "The full set of configuration options and their current values.", - "items": { - "$ref": "#/$defs/SessionConfigOption" - }, - "type": "array", - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + ], + "additionalProperties": true } }, "required": [ - "configOptions" - ], - "type": "object" + "data", + "mimeType" + ] }, - "ConnectMcpRequest": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `mcp/connect`.", + "ResourceLink": { + "description": "A resource that the server is capable of reading, included in a prompt or tool call result.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "annotations": { + "description": "Optional annotations that help clients decide how to display or route this content.", + "anyOf": [ + { + "$ref": "#/$defs/Annotations" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "description": { + "description": "Optional human-readable details shown with this protocol object.", + "type": [ + "string", + "null" + ] + }, + "mimeType": { + "description": "MIME type describing the encoded media payload.", "type": [ - "object", + "string", "null" ] }, - "acpId": { - "allOf": [ - { - "$ref": "#/$defs/McpServerAcpId" - } + "name": { + "description": "Human-readable name shown for this protocol object.", + "type": "string" + }, + "size": { + "description": "Optional size of the linked resource in bytes, if known.", + "type": [ + "integer", + "null" ], - "description": "The ACP MCP server ID that was provided by the component declaring the MCP server." - } - }, - "required": [ - "acpId" - ], - "type": "object", - "x-method": "mcp/connect", - "x-side": "client" - }, - "ConnectMcpResponse": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `mcp/connect`.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "format": "int64" + }, + "title": { + "description": "Optional display title for end-user UI.", "type": [ - "object", + "string", "null" ] }, - "connectionId": { - "allOf": [ - { - "$ref": "#/$defs/McpConnectionId" - } - ], - "description": "The unique identifier for this MCP-over-ACP connection." - } - }, - "required": [ - "connectionId" - ], - "type": "object", - "x-method": "mcp/connect", - "x-side": "client" - }, - "Content": { - "description": "Standard content block (text, images, resources).", - "properties": { + "uri": { + "description": "URI associated with this resource or media payload.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "content": { - "allOf": [ - { - "$ref": "#/$defs/ContentBlock" - } ], - "description": "The actual content block." + "additionalProperties": true } }, "required": [ - "content" - ], - "type": "object" + "name", + "uri" + ] }, - "ContentBlock": { - "description": "Content blocks represent displayable information in the Agent Client Protocol.\n\nThey provide a structured way to handle various types of user-facing content\u2014whether\nit's text from language models, images for analysis, or embedded resources for context.\n\nContent blocks appear in:\n- User prompts sent via `session/prompt`\n- Language model output streamed through `session/update` notifications\n- Progress updates and results from tool calls\n\nThis structure is compatible with the Model Context Protocol (MCP), enabling\nagents to seamlessly forward content from MCP tool outputs without transformation.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/content)", - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/TextContent" - } - ], - "description": "Text content. May be plain text or formatted with Markdown.\n\nAll agents MUST support text content blocks in prompts.\nClients SHOULD render this text as Markdown.", - "properties": { - "type": { - "const": "text", - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ImageContent" - } - ], - "description": "Images for visual context or analysis.\n\nRequires the `image` prompt capability when included in prompts.", - "properties": { - "type": { - "const": "image", - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/AudioContent" - } - ], - "description": "Audio data for transcription or analysis.\n\nRequires the `audio` prompt capability when included in prompts.", - "properties": { - "type": { - "const": "audio", - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, + "EmbeddedResourceResource": { + "description": "Resource content that can be embedded in a message.", + "anyOf": [ { + "title": "TextResourceContents", + "description": "Text resource contents embedded directly in the message.", "allOf": [ { - "$ref": "#/$defs/ResourceLink" - } - ], - "description": "References to resources that the agent can access.\n\nAll agents MUST support resource links in prompts.", - "properties": { - "type": { - "const": "resource_link", - "type": "string" + "$ref": "#/$defs/TextResourceContents" } - }, - "required": [ - "type" - ], - "type": "object" + ] }, { + "title": "BlobResourceContents", + "description": "Binary resource contents embedded directly in the message.", "allOf": [ { - "$ref": "#/$defs/EmbeddedResource" - } - ], - "description": "Complete resource contents embedded directly in the message.\n\nPreferred for including context as it avoids extra round-trips.\n\nRequires the `embeddedContext` prompt capability when included in prompts.", - "properties": { - "type": { - "const": "resource", - "type": "string" + "$ref": "#/$defs/BlobResourceContents" } - }, - "required": [ - "type" - ], - "type": "object" + ] } ] }, - "ContentChunk": { - "description": "A streamed item of content", + "TextResourceContents": { + "description": "Text-based resource contents.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "mimeType": { + "description": "MIME type describing the encoded media payload.", "type": [ - "object", + "string", "null" ] }, - "content": { - "allOf": [ - { - "$ref": "#/$defs/ContentBlock" - } - ], - "description": "A single item of content" + "text": { + "description": "Text payload carried by this content block.", + "type": "string" }, - "messageId": { - "anyOf": [ - { - "$ref": "#/$defs/MessageId" - }, - { - "type": "null" - } + "uri": { + "description": "URI associated with this resource or media payload.", + "type": "string" + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "A unique identifier for the message this chunk belongs to.\n\nAll chunks belonging to the same message share the same `messageId`.\nA change in `messageId` indicates a new message has started." + "additionalProperties": true } }, "required": [ - "content" - ], - "type": "object" + "text", + "uri" + ] }, - "Cost": { - "description": "Cost information for a session.", + "BlobResourceContents": { + "description": "Binary resource contents.", + "type": "object", "properties": { - "amount": { - "description": "Total cumulative cost for session.", - "format": "double", - "type": "number" + "blob": { + "description": "Base64-encoded bytes for a binary resource payload.", + "type": "string" }, - "currency": { - "description": "ISO 4217 currency code (e.g., \"USD\", \"EUR\").", + "mimeType": { + "description": "MIME type describing the encoded media payload.", + "type": [ + "string", + "null" + ] + }, + "uri": { + "description": "URI associated with this resource or media payload.", "type": "string" + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ - "amount", - "currency" - ], - "type": "object" + "blob", + "uri" + ] }, - "CreateElicitationRequest": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest from the agent to elicit structured user input.\n\nThe agent sends this to the client to request information from the user,\neither via a form or by directing them to a URL.\nElicitations are tied to a session (optionally a tool call) or a request.", - "discriminator": { - "propertyName": "mode" - }, - "oneOf": [ - { - "allOf": [ + "EmbeddedResource": { + "description": "The contents of a resource, embedded into a prompt or tool call result.", + "type": "object", + "properties": { + "annotations": { + "description": "Optional annotations that help clients decide how to display or route this content.", + "anyOf": [ { - "$ref": "#/$defs/ElicitationFormMode" - } - ], - "description": "Form-based elicitation where the client renders a form from the provided schema.", - "properties": { - "mode": { - "const": "form", - "type": "string" - } - }, - "required": [ - "mode" - ], - "type": "object" - }, - { - "allOf": [ + "$ref": "#/$defs/Annotations" + }, { - "$ref": "#/$defs/ElicitationUrlMode" - } - ], - "description": "URL-based elicitation where the client directs the user to a URL.", - "properties": { - "mode": { - "const": "url", - "type": "string" + "type": "null" } - }, - "required": [ - "mode" ], - "type": "object" - } - ], - "properties": { + "x-deserialize-default-on-error": true + }, + "resource": { + "description": "Embedded resource payload, either text or binary data.", + "allOf": [ + { + "$ref": "#/$defs/EmbeddedResourceResource" + } + ] + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "message": { - "description": "A human-readable message describing what input is needed.", - "type": "string" + ], + "additionalProperties": true } }, "required": [ - "message" - ], - "type": "object", - "x-method": "elicitation/create", - "x-side": "client" + "resource" + ] }, - "CreateElicitationResponse": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse from the client to an elicitation request.", - "discriminator": { - "propertyName": "action" - }, - "oneOf": [ - { + "Content": { + "description": "Standard content block (text, images, resources).", + "type": "object", + "properties": { + "content": { + "description": "The actual content block.", "allOf": [ { - "$ref": "#/$defs/ElicitationAcceptAction" - } - ], - "description": "The user accepted and provided content.", - "properties": { - "action": { - "const": "accept", - "type": "string" - } - }, - "required": [ - "action" - ], - "type": "object" - }, - { - "description": "The user declined the elicitation.", - "properties": { - "action": { - "const": "decline", - "type": "string" + "$ref": "#/$defs/ContentBlock" } - }, - "required": [ - "action" - ], - "type": "object" + ] }, - { - "description": "The elicitation was cancelled.", - "properties": { - "action": { - "const": "cancel", - "type": "string" - } - }, - "required": [ - "action" - ], - "type": "object" - } - ], - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object", - "x-method": "elicitation/create", - "x-side": "client" + "required": [ + "content" + ] }, - "CreateTerminalRequest": { - "description": "Request to create a new terminal and execute a command.", + "Diff": { + "description": "A diff representing file modifications.\n\nShows changes to files in a format suitable for display in the client UI.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "args": { - "description": "Array of command arguments.", - "items": { - "type": "string" - }, - "type": "array" - }, - "command": { - "description": "The command to execute.", + "path": { + "description": "The file path being modified.", "type": "string" }, - "cwd": { - "description": "Working directory for the command (absolute path).", + "oldText": { + "description": "The original content (None for new files).", "type": [ "string", "null" ] }, - "env": { - "description": "Environment variables for the command.", - "items": { - "$ref": "#/$defs/EnvVariable" - }, - "type": "array" + "newText": { + "description": "The new content after modification.", + "type": "string" }, - "outputByteLimit": { - "description": "Maximum number of output bytes to retain.\n\nWhen the limit is exceeded, the Client truncates from the beginning of the output\nto stay within the limit.\n\nThe Client MUST ensure truncation happens at a character boundary to maintain valid\nstring output, even if this means the retained output is slightly less than the\nspecified limit.", - "format": "uint64", - "minimum": 0, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "integer", + "object", "null" - ] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } ], - "description": "The session ID for this request." + "additionalProperties": true } }, "required": [ - "sessionId", - "command" - ], - "type": "object", - "x-method": "terminal/create", - "x-side": "client" + "path", + "newText" + ] }, - "CreateTerminalResponse": { - "description": "Response containing the ID of the created terminal.", + "TerminalId": { + "description": "Typed identifier used for terminal values on the wire.", + "type": "string" + }, + "Terminal": { + "description": "Embed a terminal created with `terminal/create` by its id.\n\nThe terminal must be added before calling `terminal/release`.\n\nSee protocol docs: [Terminal](https://agentclientprotocol.com/protocol/terminals)", + "type": "object", "properties": { + "terminalId": { + "description": "Identifier of the terminal instance to embed in the content stream.", + "allOf": [ + { + "$ref": "#/$defs/TerminalId" + } + ] + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "terminalId": { - "description": "The unique identifier for the created terminal.", - "type": "string" + ], + "additionalProperties": true } }, "required": [ "terminalId" - ], - "type": "object", - "x-method": "terminal/create", - "x-side": "client" + ] }, - "CurrentModeUpdate": { - "description": "The current mode of the session has changed\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "ToolCallLocation": { + "description": "A file location being accessed or modified by a tool.\n\nEnables clients to implement \"follow-along\" features that track\nwhich files the agent is working with in real-time.\n\nSee protocol docs: [Following the Agent](https://agentclientprotocol.com/protocol/tool-calls#following-the-agent)", + "type": "object", "properties": { + "path": { + "description": "The file path being accessed or modified.", + "type": "string" + }, + "line": { + "description": "Optional line number within the file.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" + ], + "additionalProperties": true + } + }, + "required": [ + "path" + ] + }, + "PermissionOption": { + "description": "An option presented to the user when requesting permission.", + "type": "object", + "properties": { + "optionId": { + "description": "Unique identifier for this permission option.", + "allOf": [ + { + "$ref": "#/$defs/PermissionOptionId" + } ] }, - "currentModeId": { + "name": { + "description": "Human-readable label to display to the user.", + "type": "string" + }, + "kind": { + "description": "Hint about the nature of this permission option.", "allOf": [ { - "$ref": "#/$defs/SessionModeId" + "$ref": "#/$defs/PermissionOptionKind" } + ] + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The ID of the current mode" + "additionalProperties": true } }, "required": [ - "currentModeId" - ], - "type": "object" + "optionId", + "name", + "kind" + ] }, - "DeleteSessionRequest": { - "description": "Request parameters for deleting an existing session from `session/list`.\n\nOnly available if the Agent supports the `sessionCapabilities.delete` capability.", + "PermissionOptionId": { + "description": "Unique identifier for a permission option.", + "type": "string" + }, + "PermissionOptionKind": { + "description": "The type of permission option being presented to the user.\n\nHelps clients choose appropriate icons and UI treatment.", + "oneOf": [ + { + "description": "Allow this operation only this time.", + "type": "string", + "const": "allow_once" + }, + { + "description": "Allow this operation and remember the choice.", + "type": "string", + "const": "allow_always" + }, + { + "description": "Reject this operation only this time.", + "type": "string", + "const": "reject_once" + }, + { + "description": "Reject this operation and remember the choice.", + "type": "string", + "const": "reject_always" + } + ] + }, + "CreateTerminalRequest": { + "description": "Request to create a new terminal and execute a command.", + "type": "object", "properties": { + "sessionId": { + "description": "The session ID for this request.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ] + }, + "command": { + "description": "The command to execute.", + "type": "string" + }, + "args": { + "description": "Array of command arguments.", + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "description": "Environment variables for the command.", + "type": "array", + "items": { + "$ref": "#/$defs/EnvVariable" + } + }, + "cwd": { + "description": "Working directory for the command (absolute path).", + "type": [ + "string", + "null" + ] + }, + "outputByteLimit": { + "description": "Maximum number of output bytes to retain.\n\nWhen the limit is exceeded, the Client truncates from the beginning of the output\nto stay within the limit.\n\nThe Client MUST ensure truncation happens at a character boundary to maintain valid\nstring output, even if this means the retained output is slightly less than the\nspecified limit.", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } ], - "description": "The ID of the session to delete." + "additionalProperties": true } }, "required": [ - "sessionId" + "sessionId", + "command" ], - "type": "object", - "x-method": "session/delete", - "x-side": "agent" + "x-side": "client", + "x-method": "terminal/create" }, - "DeleteSessionResponse": { - "description": "Response from deleting a session.", + "EnvVariable": { + "description": "An environment variable to set when launching an MCP server.", + "type": "object", "properties": { + "name": { + "description": "The name of the environment variable.", + "type": "string" + }, + "value": { + "description": "The value to set for the environment variable.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object", - "x-method": "session/delete", - "x-side": "agent" + "required": [ + "name", + "value" + ] }, - "DidChangeDocumentNotification": { - "description": "Notification sent when a file is edited.", + "TerminalOutputRequest": { + "description": "Request to get the current output and status of a terminal.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "contentChanges": { - "description": "The content changes.", - "items": { - "$ref": "#/$defs/TextDocumentContentChangeEvent" - }, - "type": "array" - }, "sessionId": { + "description": "The session ID for this request.", "allOf": [ { "$ref": "#/$defs/SessionId" } - ], - "description": "The session ID for this notification." + ] }, - "uri": { - "description": "The URI of the changed document.", - "type": "string" + "terminalId": { + "description": "The ID of the terminal to get output from.", + "allOf": [ + { + "$ref": "#/$defs/TerminalId" + } + ] }, - "version": { - "description": "The new version number of the document.", - "format": "int64", - "type": "integer" - } - }, - "required": [ - "sessionId", - "uri", - "version", - "contentChanges" - ], - "type": "object", - "x-method": "document/didChange", - "x-side": "agent" - }, - "DidCloseDocumentNotification": { - "description": "Notification sent when a file is closed.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } ], - "description": "The session ID for this notification." - }, - "uri": { - "description": "The URI of the closed document.", - "type": "string" + "additionalProperties": true } }, "required": [ "sessionId", - "uri" + "terminalId" ], - "type": "object", - "x-method": "document/didClose", - "x-side": "agent" + "x-side": "client", + "x-method": "terminal/output" }, - "DidFocusDocumentNotification": { - "description": "Notification sent when a file becomes the active editor tab.", + "ReleaseTerminalRequest": { + "description": "Request to release a terminal and free its resources.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "position": { - "allOf": [ - { - "$ref": "#/$defs/Position" - } - ], - "description": "The current cursor position." - }, "sessionId": { + "description": "The session ID for this request.", "allOf": [ { "$ref": "#/$defs/SessionId" } - ], - "description": "The session ID for this notification." - }, - "uri": { - "description": "The URI of the focused document.", - "type": "string" - }, - "version": { - "description": "The version number of the document.", - "format": "int64", - "type": "integer" + ] }, - "visibleRange": { + "terminalId": { + "description": "The ID of the terminal to release.", "allOf": [ { - "$ref": "#/$defs/Range" + "$ref": "#/$defs/TerminalId" } - ], - "description": "The portion of the file currently visible in the editor viewport." - } - }, - "required": [ - "sessionId", - "uri", - "version", - "position", - "visibleRange" - ], - "type": "object", - "x-method": "document/didFocus", - "x-side": "agent" - }, - "DidOpenDocumentNotification": { - "description": "Notification sent when a file is opened in the editor.", - "properties": { + ] + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "languageId": { - "description": "The language identifier of the document (e.g., \"rust\", \"python\").", - "type": "string" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } ], - "description": "The session ID for this notification." - }, - "text": { - "description": "The full text content of the document.", - "type": "string" - }, - "uri": { - "description": "The URI of the opened document.", - "type": "string" - }, - "version": { - "description": "The version number of the document.", - "format": "int64", - "type": "integer" + "additionalProperties": true } }, "required": [ "sessionId", - "uri", - "languageId", - "version", - "text" + "terminalId" ], - "type": "object", - "x-method": "document/didOpen", - "x-side": "agent" + "x-side": "client", + "x-method": "terminal/release" }, - "DidSaveDocumentNotification": { - "description": "Notification sent when a file is saved.", + "WaitForTerminalExitRequest": { + "description": "Request to wait for a terminal command to exit.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, "sessionId": { + "description": "The session ID for this request.", "allOf": [ { "$ref": "#/$defs/SessionId" } - ], - "description": "The session ID for this notification." - }, - "uri": { - "description": "The URI of the saved document.", - "type": "string" - } - }, - "required": [ - "sessionId", - "uri" - ], - "type": "object", - "x-method": "document/didSave", - "x-side": "agent" - }, - "Diff": { - "description": "A diff representing file modifications.\n\nShows changes to files in a format suitable for display in the client UI.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "newText": { - "description": "The new content after modification.", - "type": "string" - }, - "oldText": { - "description": "The original content (None for new files).", - "type": [ - "string", - "null" ] }, - "path": { - "description": "The file path being modified.", - "type": "string" - } - }, - "required": [ - "path", - "newText" - ], - "type": "object" - }, - "DisableProviderRequest": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `providers/disable`.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "terminalId": { + "description": "The ID of the terminal to wait for.", + "allOf": [ + { + "$ref": "#/$defs/TerminalId" + } ] }, - "id": { - "description": "Provider id to disable.", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object", - "x-method": "providers/disable", - "x-side": "agent" - }, - "DisableProviderResponse": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `providers/disable`.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object", - "x-method": "providers/disable", - "x-side": "agent" + "required": [ + "sessionId", + "terminalId" + ], + "x-side": "client", + "x-method": "terminal/wait_for_exit" }, - "DisconnectMcpRequest": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `mcp/disconnect`.", + "KillTerminalRequest": { + "description": "Request to kill a terminal without releasing it.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "sessionId": { + "description": "The session ID for this request.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } ] }, - "connectionId": { + "terminalId": { + "description": "The ID of the terminal to kill.", "allOf": [ { - "$ref": "#/$defs/McpConnectionId" + "$ref": "#/$defs/TerminalId" } + ] + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The MCP-over-ACP connection to close." + "additionalProperties": true } }, "required": [ - "connectionId" + "sessionId", + "terminalId" ], - "type": "object", - "x-method": "mcp/disconnect", - "x-side": "client" + "x-side": "client", + "x-method": "terminal/kill" }, - "DisconnectMcpResponse": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `mcp/disconnect`.", + "CreateElicitationRequest": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest from the agent to elicit structured user input.\n\nThe agent sends this to the client to request information from the user,\neither via a form or by directing them to a URL.\nElicitations are tied to a session (optionally a tool call) or a request.", + "type": "object", "properties": { + "message": { + "description": "A human-readable message describing what input is needed.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object", - "x-method": "mcp/disconnect", - "x-side": "client" - }, - "ElicitationAcceptAction": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe user accepted the elicitation and provided content.", - "properties": { - "content": { - "additionalProperties": { - "$ref": "#/$defs/ElicitationContentValue" + "oneOf": [ + { + "description": "Form-based elicitation where the client renders a form from the provided schema.", + "type": "object", + "properties": { + "mode": { + "type": "string", + "const": "form" + } }, - "description": "The user-provided content, if any, as an object matching the requested schema.", - "type": [ - "object", - "null" + "required": [ + "mode" + ], + "allOf": [ + { + "$ref": "#/$defs/ElicitationFormMode" + } + ] + }, + { + "description": "URL-based elicitation where the client directs the user to a URL.", + "type": "object", + "properties": { + "mode": { + "type": "string", + "const": "url" + } + }, + "required": [ + "mode" + ], + "allOf": [ + { + "$ref": "#/$defs/ElicitationUrlMode" + } ] } + ], + "discriminator": { + "propertyName": "mode" }, - "type": "object" + "required": [ + "message" + ], + "x-side": "client", + "x-method": "elicitation/create" }, - "ElicitationCapabilities": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nElicitation capabilities supported by the client.", + "ElicitationSessionScope": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSession-scoped elicitation, optionally tied to a specific tool call.\n\nWhen `tool_call_id` is set, the elicitation is tied to a specific tool call.\nThis is useful when an agent receives an elicitation from an MCP server\nduring a tool call and needs to redirect it to the user.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "form": { - "anyOf": [ - { - "$ref": "#/$defs/ElicitationFormCapabilities" - }, + "sessionId": { + "description": "The session this elicitation is tied to.", + "allOf": [ { - "type": "null" + "$ref": "#/$defs/SessionId" } - ], - "description": "Whether the client supports form-based elicitation.", - "x-deserialize-default-on-error": true + ] }, - "url": { + "toolCallId": { + "description": "Optional tool call within the session.", "anyOf": [ { - "$ref": "#/$defs/ElicitationUrlCapabilities" + "$ref": "#/$defs/ToolCallId" }, { "type": "null" } - ], - "description": "Whether the client supports URL-based elicitation.", - "x-deserialize-default-on-error": true + ] } }, - "type": "object" - }, - "ElicitationContentValue": { - "anyOf": [ - { - "title": "String", - "type": "string" - }, - { - "format": "int64", - "title": "Integer", - "type": "integer" - }, - { - "format": "double", - "title": "Number", - "type": "number" - }, - { - "title": "Boolean", - "type": "boolean" - }, - { - "items": { - "type": "string" - }, - "title": "StringArray", - "type": "array" - } + "required": [ + "sessionId" ] }, - "ElicitationFormCapabilities": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nForm-based elicitation capabilities.", + "ElicitationRequestScope": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest-scoped elicitation, tied to a specific JSON-RPC request outside of a session\n(e.g., during auth/configuration phases before any session is started).", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "requestId": { + "description": "The request this elicitation is tied to.", + "allOf": [ + { + "$ref": "#/$defs/RequestId" + } ] } }, - "type": "object" + "required": [ + "requestId" + ] }, - "ElicitationFormMode": { - "anyOf": [ - { + "ElicitationSchema": { + "description": "Type-safe elicitation schema for requesting structured user input.\n\nThis represents a JSON Schema object with primitive-typed properties,\nas required by the elicitation specification.", + "type": "object", + "properties": { + "type": { + "description": "Type discriminator. Always `\"object\"`.", + "default": "object", "allOf": [ { - "$ref": "#/$defs/ElicitationSessionScope" + "$ref": "#/$defs/ElicitationSchemaType" } - ], - "description": "Tied to a session, optionally to a specific tool call within that session.", - "title": "Session" + ] }, - { - "allOf": [ - { - "$ref": "#/$defs/ElicitationRequestScope" - } + "title": { + "description": "Optional title for the schema.", + "type": [ + "string", + "null" + ] + }, + "properties": { + "description": "Property definitions (must be primitive types).", + "type": "object", + "default": {}, + "additionalProperties": { + "$ref": "#/$defs/ElicitationPropertySchema" + } + }, + "required": { + "description": "List of required property names.", + "type": [ + "array", + "null" ], - "description": "Tied to a specific JSON-RPC request outside of a session\n(e.g., during auth/configuration phases before any session is started).", - "title": "Request" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nForm-based elicitation mode where the client renders a form from the provided schema.", - "properties": { - "requestedSchema": { - "allOf": [ - { - "$ref": "#/$defs/ElicitationSchema" - } + "items": { + "type": "string" + } + }, + "description": { + "description": "Optional description of what this schema represents.", + "type": [ + "string", + "null" + ] + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "A JSON Schema describing the form fields to present to the user." + "additionalProperties": true } - }, - "required": [ - "requestedSchema" - ], - "type": "object" - }, - "ElicitationId": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for an elicitation.", - "type": "string" + } }, - "ElicitationPropertySchema": { - "description": "Property schema for elicitation form fields.\n\nEach variant corresponds to a JSON Schema `\"type\"` value.\nSingle-select enums use the `String` variant with `enum` or `oneOf` set.\nMulti-select enums use the `Array` variant.", - "discriminator": { - "propertyName": "type" - }, + "ElicitationSchemaType": { + "description": "Type discriminator for elicitation schemas.", + "oneOf": [ + { + "description": "Object schema type.", + "type": "string", + "const": "object" + } + ] + }, + "ElicitationPropertySchema": { + "description": "Property schema for elicitation form fields.\n\nEach variant corresponds to a JSON Schema `\"type\"` value.\nSingle-select enums use the `String` variant with `enum` or `oneOf` set.\nMulti-select enums use the `Array` variant.", "oneOf": [ { - "allOf": [ - { - "$ref": "#/$defs/StringPropertySchema" - } - ], "description": "String property (or single-select enum when `enum`/`oneOf` is set).", + "type": "object", "properties": { "type": { - "const": "string", - "type": "string" + "type": "string", + "const": "string" } }, "required": [ "type" ], - "type": "object" - }, - { "allOf": [ { - "$ref": "#/$defs/NumberPropertySchema" + "$ref": "#/$defs/StringPropertySchema" } - ], + ] + }, + { "description": "Number (floating-point) property.", + "type": "object", "properties": { "type": { - "const": "number", - "type": "string" + "type": "string", + "const": "number" } }, "required": [ "type" ], - "type": "object" - }, - { "allOf": [ { - "$ref": "#/$defs/IntegerPropertySchema" + "$ref": "#/$defs/NumberPropertySchema" } - ], + ] + }, + { "description": "Integer property.", + "type": "object", "properties": { "type": { - "const": "integer", - "type": "string" + "type": "string", + "const": "integer" } }, "required": [ "type" ], - "type": "object" - }, - { "allOf": [ { - "$ref": "#/$defs/BooleanPropertySchema" + "$ref": "#/$defs/IntegerPropertySchema" } - ], + ] + }, + { "description": "Boolean property.", + "type": "object", "properties": { "type": { - "const": "boolean", - "type": "string" + "type": "string", + "const": "boolean" } }, "required": [ "type" ], - "type": "object" - }, - { "allOf": [ { - "$ref": "#/$defs/MultiSelectPropertySchema" + "$ref": "#/$defs/BooleanPropertySchema" } - ], + ] + }, + { "description": "Multi-select array property.", + "type": "object", "properties": { "type": { - "const": "array", - "type": "string" + "type": "string", + "const": "array" } }, "required": [ "type" ], - "type": "object" + "allOf": [ + { + "$ref": "#/$defs/MultiSelectPropertySchema" + } + ] + } + ], + "discriminator": { + "propertyName": "type" + } + }, + "StringFormat": { + "description": "String format types for string properties in elicitation schemas.", + "oneOf": [ + { + "description": "Email address format.", + "type": "string", + "const": "email" + }, + { + "description": "URI format.", + "type": "string", + "const": "uri" + }, + { + "description": "Date format (YYYY-MM-DD).", + "type": "string", + "const": "date" + }, + { + "description": "Date-time format (ISO 8601).", + "type": "string", + "const": "date-time" } ] }, - "ElicitationRequestScope": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest-scoped elicitation, tied to a specific JSON-RPC request outside of a session\n(e.g., during auth/configuration phases before any session is started).", + "EnumOption": { + "description": "A titled enum option with a const value and human-readable title.", + "type": "object", "properties": { - "requestId": { - "allOf": [ + "const": { + "description": "The constant value for this option.", + "type": "string" + }, + "title": { + "description": "Human-readable title for this option.", + "type": "string" + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + }, + "required": [ + "const", + "title" + ] + }, + "StringPropertySchema": { + "description": "Schema for string properties in an elicitation form.\n\nWhen `enum` or `oneOf` is set, this represents a single-select enum\nwith `\"type\": \"string\"`.", + "type": "object", + "properties": { + "title": { + "description": "Optional title for the property.", + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "Human-readable description.", + "type": [ + "string", + "null" + ] + }, + "minLength": { + "description": "Minimum string length.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + }, + "maxLength": { + "description": "Maximum string length.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + }, + "pattern": { + "description": "Pattern the string must match.", + "type": [ + "string", + "null" + ] + }, + "format": { + "description": "String format.", + "anyOf": [ { - "$ref": "#/$defs/RequestId" + "$ref": "#/$defs/StringFormat" + }, + { + "type": "null" } + ] + }, + "default": { + "description": "Default value.", + "type": [ + "string", + "null" + ] + }, + "enum": { + "description": "Enum values for untitled single-select enums.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "oneOf": { + "description": "Titled enum options for titled single-select enums.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/$defs/EnumOption" + } + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + } + }, + "NumberPropertySchema": { + "description": "Schema for number (floating-point) properties in an elicitation form.", + "type": "object", + "properties": { + "title": { + "description": "Optional title for the property.", + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "Human-readable description.", + "type": [ + "string", + "null" + ] + }, + "minimum": { + "description": "Minimum value (inclusive).", + "type": [ + "number", + "null" + ], + "format": "double" + }, + "maximum": { + "description": "Maximum value (inclusive).", + "type": [ + "number", + "null" + ], + "format": "double" + }, + "default": { + "description": "Default value.", + "type": [ + "number", + "null" + ], + "format": "double" + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + } + }, + "IntegerPropertySchema": { + "description": "Schema for integer properties in an elicitation form.", + "type": "object", + "properties": { + "title": { + "description": "Optional title for the property.", + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "Human-readable description.", + "type": [ + "string", + "null" + ] + }, + "minimum": { + "description": "Minimum value (inclusive).", + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "maximum": { + "description": "Maximum value (inclusive).", + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "default": { + "description": "Default value.", + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The request this elicitation is tied to." + "additionalProperties": true } - }, - "required": [ - "requestId" - ], - "type": "object" + } }, - "ElicitationSchema": { - "description": "Type-safe elicitation schema for requesting structured user input.\n\nThis represents a JSON Schema object with primitive-typed properties,\nas required by the elicitation specification.", + "BooleanPropertySchema": { + "description": "Schema for boolean properties in an elicitation form.", + "type": "object", "properties": { - "description": { - "description": "Optional description of what this schema represents.", + "title": { + "description": "Optional title for the property.", "type": [ "string", "null" ] }, - "properties": { - "additionalProperties": { - "$ref": "#/$defs/ElicitationPropertySchema" - }, - "default": {}, - "description": "Property definitions (must be primitive types).", - "type": "object" - }, - "required": { - "description": "List of required property names.", - "items": { - "type": "string" - }, + "description": { + "description": "Human-readable description.", "type": [ - "array", + "string", "null" ] }, - "title": { - "description": "Optional title for the schema.", + "default": { + "description": "Default value.", "type": [ - "string", + "boolean", "null" ] }, - "type": { - "allOf": [ - { - "$ref": "#/$defs/ElicitationSchemaType" - } + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "default": "object", - "description": "Type discriminator. Always `\"object\"`." + "additionalProperties": true } - }, - "type": "object" + } }, - "ElicitationSchemaType": { - "description": "Type discriminator for elicitation schemas.", - "oneOf": [ + "MultiSelectItems": { + "description": "Items for a multi-select (array) property schema.", + "anyOf": [ { - "const": "object", - "description": "Object schema type.", - "type": "string" + "title": "Untitled", + "description": "Untitled multi-select items with plain string values.", + "allOf": [ + { + "$ref": "#/$defs/UntitledMultiSelectItems" + } + ] + }, + { + "title": "Titled", + "description": "Titled multi-select items with human-readable labels.", + "allOf": [ + { + "$ref": "#/$defs/TitledMultiSelectItems" + } + ] } ] }, - "ElicitationSessionScope": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSession-scoped elicitation, optionally tied to a specific tool call.\n\nWhen `tool_call_id` is set, the elicitation is tied to a specific tool call.\nThis is useful when an agent receives an elicitation from an MCP server\nduring a tool call and needs to redirect it to the user.", + "UntitledMultiSelectItems": { + "description": "Items definition for untitled multi-select enum properties.", + "type": "object", "properties": { - "sessionId": { + "type": { + "description": "Item type discriminator. Must be `\"string\"`.", "allOf": [ { - "$ref": "#/$defs/SessionId" + "$ref": "#/$defs/ElicitationStringType" } - ], - "description": "The session this elicitation is tied to." + ] }, - "toolCallId": { - "anyOf": [ - { - "$ref": "#/$defs/ToolCallId" - }, - { - "type": "null" - } + "enum": { + "description": "Allowed enum values.", + "type": "array", + "items": { + "type": "string" + } + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "Optional tool call within the session." + "additionalProperties": true } }, "required": [ - "sessionId" - ], - "type": "object" + "type", + "enum" + ] }, "ElicitationStringType": { "description": "Items definition for untitled multi-select enum properties.", "oneOf": [ { - "const": "string", "description": "String schema type.", - "type": "string" + "type": "string", + "const": "string" } ] }, - "ElicitationUrlCapabilities": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nURL-based elicitation capabilities.", + "TitledMultiSelectItems": { + "description": "Items definition for titled multi-select enum properties.", + "type": "object", "properties": { + "anyOf": { + "description": "Titled enum options.", + "type": "array", + "items": { + "$ref": "#/$defs/EnumOption" + } + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" + ], + "additionalProperties": true + } + }, + "required": [ + "anyOf" + ] + }, + "MultiSelectPropertySchema": { + "description": "Schema for multi-select (array) properties in an elicitation form.", + "type": "object", + "properties": { + "title": { + "description": "Optional title for the property.", + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "Human-readable description.", + "type": [ + "string", + "null" + ] + }, + "minItems": { + "description": "Minimum number of items to select.", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + }, + "maxItems": { + "description": "Maximum number of items to select.", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + }, + "items": { + "description": "The items definition describing allowed values.", + "allOf": [ + { + "$ref": "#/$defs/MultiSelectItems" + } ] + }, + "default": { + "description": "Default selected values.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, - "type": "object" + "required": [ + "items" + ] }, - "ElicitationUrlMode": { + "ElicitationFormMode": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nForm-based elicitation mode where the client renders a form from the provided schema.", + "type": "object", + "properties": { + "requestedSchema": { + "description": "A JSON Schema describing the form fields to present to the user.", + "allOf": [ + { + "$ref": "#/$defs/ElicitationSchema" + } + ] + } + }, "anyOf": [ { + "title": "Session", + "description": "Tied to a session, optionally to a specific tool call within that session.", "allOf": [ { "$ref": "#/$defs/ElicitationSessionScope" } - ], - "description": "Tied to a session, optionally to a specific tool call within that session.", - "title": "Session" + ] }, { + "title": "Request", + "description": "Tied to a specific JSON-RPC request outside of a session\n(e.g., during auth/configuration phases before any session is started).", "allOf": [ { "$ref": "#/$defs/ElicitationRequestScope" } - ], - "description": "Tied to a specific JSON-RPC request outside of a session\n(e.g., during auth/configuration phases before any session is started).", - "title": "Request" + ] } ], + "required": [ + "requestedSchema" + ] + }, + "ElicitationId": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for an elicitation.", + "type": "string" + }, + "ElicitationUrlMode": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nURL-based elicitation mode where the client directs the user to a URL.", + "type": "object", "properties": { "elicitationId": { + "description": "The unique identifier for this elicitation.", "allOf": [ { "$ref": "#/$defs/ElicitationId" } - ], - "description": "The unique identifier for this elicitation." + ] }, "url": { "description": "The URL to direct the user to.", - "format": "uri", - "type": "string" - } - }, - "required": [ - "elicitationId", - "url" - ], - "type": "object" - }, - "EmbeddedResource": { - "description": "The contents of a resource, embedded into a prompt or tool call result.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "annotations": { - "anyOf": [ - { - "$ref": "#/$defs/Annotations" - }, - { - "type": "null" - } - ], - "x-deserialize-default-on-error": true - }, - "resource": { - "$ref": "#/$defs/EmbeddedResourceResource" + "type": "string", + "format": "uri" } }, - "required": [ - "resource" - ], - "type": "object" - }, - "EmbeddedResourceResource": { "anyOf": [ { + "title": "Session", + "description": "Tied to a session, optionally to a specific tool call within that session.", "allOf": [ { - "$ref": "#/$defs/TextResourceContents" + "$ref": "#/$defs/ElicitationSessionScope" } - ], - "title": "TextResourceContents" + ] }, { + "title": "Request", + "description": "Tied to a specific JSON-RPC request outside of a session\n(e.g., during auth/configuration phases before any session is started).", "allOf": [ { - "$ref": "#/$defs/BlobResourceContents" + "$ref": "#/$defs/ElicitationRequestScope" } - ], - "title": "BlobResourceContents" + ] } ], - "description": "Resource content that can be embedded in a message." + "required": [ + "elicitationId", + "url" + ] }, - "EnumOption": { - "description": "A titled enum option with a const value and human-readable title.", + "ConnectMcpRequest": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `mcp/connect`.", + "type": "object", "properties": { - "const": { - "description": "The constant value for this option.", - "type": "string" + "acpId": { + "description": "The ACP MCP server ID that was provided by the component declaring the MCP server.", + "allOf": [ + { + "$ref": "#/$defs/McpServerAcpId" + } + ] }, - "title": { - "description": "Human-readable title for this option.", - "type": "string" + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ - "const", - "title" + "acpId" ], - "type": "object" + "x-side": "client", + "x-method": "mcp/connect" }, - "EnvVariable": { - "description": "An environment variable to set when launching an MCP server.", + "McpServerAcpId": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for an MCP server using the ACP transport.\n\nThe value is opaque and generated by the ACP component providing the MCP server. It is\nused by `mcp/connect` to route connection requests back to the component that declared the\nserver.", + "type": "string" + }, + "MessageMcpRequest": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `mcp/message`.", + "type": "object", "properties": { + "connectionId": { + "description": "The MCP-over-ACP connection this message is sent on.", + "allOf": [ + { + "$ref": "#/$defs/McpConnectionId" + } + ] + }, + "method": { + "description": "The inner MCP method name.", + "type": "string" + }, + "params": { + "description": "Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "name": { - "description": "The name of the environment variable.", - "type": "string" - }, - "value": { - "description": "The value to set for the environment variable.", - "type": "string" + ], + "additionalProperties": true } }, "required": [ - "name", - "value" + "connectionId", + "method" ], - "type": "object" + "x-side": "both", + "x-method": "mcp/message" }, - "Error": { - "description": "JSON-RPC error object.\n\nRepresents an error that occurred during method execution, following the\nJSON-RPC 2.0 error object specification with optional additional data.\n\nSee protocol docs: [JSON-RPC Error Object](https://www.jsonrpc.org/specification#error_object)", + "McpConnectionId": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA unique identifier for an active MCP-over-ACP connection.", + "type": "string" + }, + "DisconnectMcpRequest": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `mcp/disconnect`.", + "type": "object", "properties": { - "code": { + "connectionId": { + "description": "The MCP-over-ACP connection to close.", "allOf": [ { - "$ref": "#/$defs/ErrorCode" + "$ref": "#/$defs/McpConnectionId" } - ], - "description": "A number indicating the error type that occurred.\nThis must be an integer as defined in the JSON-RPC specification." - }, - "data": { - "description": "Optional primitive or structured value that contains additional information about the error.\nThis may include debugging information or context-specific details." + ] }, - "message": { - "description": "A string providing a short description of the error.\nThe message should be limited to a concise single sentence.", - "type": "string" + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ - "code", - "message" + "connectionId" ], - "type": "object" + "x-side": "client", + "x-method": "mcp/disconnect" }, - "ErrorCode": { + "ExtRequest": { + "description": "Allows for sending an arbitrary request that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" + }, + "AgentResponse": { + "description": "A JSON-RPC response object.", "anyOf": [ { - "const": -32700, - "description": "**Parse error**: Invalid JSON was received by the server.\nAn error occurred on the server while parsing the JSON text.", - "format": "int32", - "title": "Parse error", - "type": "integer" - }, - { - "const": -32600, - "description": "**Invalid request**: The JSON sent is not a valid Request object.", - "format": "int32", - "title": "Invalid request", - "type": "integer" - }, - { - "const": -32601, - "description": "**Method not found**: The method does not exist or is not available.", - "format": "int32", - "title": "Method not found", - "type": "integer" - }, - { - "const": -32602, - "description": "**Invalid params**: Invalid method parameter(s).", - "format": "int32", - "title": "Invalid params", - "type": "integer" - }, - { - "const": -32603, - "description": "**Internal error**: Internal JSON-RPC error.\nReserved for implementation-defined server errors.", - "format": "int32", - "title": "Internal error", - "type": "integer" - }, - { - "const": -32800, - "description": "**Request cancelled**: **UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nExecution of the method was aborted either due to a cancellation request from the caller or\nbecause of resource constraints or shutdown.", - "format": "int32", - "title": "Request cancelled", - "type": "integer" - }, - { - "const": -32000, - "description": "**Authentication required**: Authentication is required before this operation can be performed.", - "format": "int32", - "title": "Authentication required", - "type": "integer" - }, - { - "const": -32002, - "description": "**Resource not found**: A given resource, such as a file, was not found.", - "format": "int32", - "title": "Resource not found", - "type": "integer" - }, - { - "const": -32042, - "description": "**URL elicitation required**: **UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe agent requires user input via a URL-based elicitation before it can proceed.", - "format": "int32", - "title": "URL elicitation required", - "type": "integer" + "title": "Result", + "description": "A successful JSON-RPC response.", + "type": "object", + "properties": { + "id": { + "description": "The id of the request this response answers.", + "allOf": [ + { + "$ref": "#/$defs/RequestId" + } + ] + }, + "result": { + "description": "Method-specific response data.", + "anyOf": [ + { + "title": "InitializeResponse", + "description": "Successful result returned for a `initialize` request.", + "allOf": [ + { + "$ref": "#/$defs/InitializeResponse" + } + ] + }, + { + "title": "AuthenticateResponse", + "description": "Successful result returned for a `authenticate` request.", + "allOf": [ + { + "$ref": "#/$defs/AuthenticateResponse" + } + ] + }, + { + "title": "ListProvidersResponse", + "description": "Successful result returned for a `providers/list` request.", + "allOf": [ + { + "$ref": "#/$defs/ListProvidersResponse" + } + ] + }, + { + "title": "SetProviderResponse", + "description": "Successful result returned for a `providers/set` request.", + "allOf": [ + { + "$ref": "#/$defs/SetProviderResponse" + } + ] + }, + { + "title": "DisableProviderResponse", + "description": "Successful result returned for a `providers/disable` request.", + "allOf": [ + { + "$ref": "#/$defs/DisableProviderResponse" + } + ] + }, + { + "title": "LogoutResponse", + "description": "Successful result returned for a `logout` request.", + "allOf": [ + { + "$ref": "#/$defs/LogoutResponse" + } + ] + }, + { + "title": "NewSessionResponse", + "description": "Successful result returned for a `session/new` request.", + "allOf": [ + { + "$ref": "#/$defs/NewSessionResponse" + } + ] + }, + { + "title": "LoadSessionResponse", + "description": "Successful result returned for a `session/load` request.", + "allOf": [ + { + "$ref": "#/$defs/LoadSessionResponse" + } + ] + }, + { + "title": "ListSessionsResponse", + "description": "Successful result returned for a `session/list` request.", + "allOf": [ + { + "$ref": "#/$defs/ListSessionsResponse" + } + ] + }, + { + "title": "DeleteSessionResponse", + "description": "Successful result returned for a `session/delete` request.", + "allOf": [ + { + "$ref": "#/$defs/DeleteSessionResponse" + } + ] + }, + { + "title": "ForkSessionResponse", + "description": "Successful result returned for a `session/fork` request.", + "allOf": [ + { + "$ref": "#/$defs/ForkSessionResponse" + } + ] + }, + { + "title": "ResumeSessionResponse", + "description": "Successful result returned for a `session/resume` request.", + "allOf": [ + { + "$ref": "#/$defs/ResumeSessionResponse" + } + ] + }, + { + "title": "CloseSessionResponse", + "description": "Successful result returned for a `session/close` request.", + "allOf": [ + { + "$ref": "#/$defs/CloseSessionResponse" + } + ] + }, + { + "title": "SetSessionModeResponse", + "description": "Successful result returned for a `session/set_mode` request.", + "allOf": [ + { + "$ref": "#/$defs/SetSessionModeResponse" + } + ] + }, + { + "title": "SetSessionConfigOptionResponse", + "description": "Successful result returned for a `session/set_config_option` request.", + "allOf": [ + { + "$ref": "#/$defs/SetSessionConfigOptionResponse" + } + ] + }, + { + "title": "PromptResponse", + "description": "Successful result returned for a `session/prompt` request.", + "allOf": [ + { + "$ref": "#/$defs/PromptResponse" + } + ] + }, + { + "title": "StartNesResponse", + "description": "Successful result returned for a `nes/start` request.", + "allOf": [ + { + "$ref": "#/$defs/StartNesResponse" + } + ] + }, + { + "title": "SuggestNesResponse", + "description": "Successful result returned for a `nes/suggest` request.", + "allOf": [ + { + "$ref": "#/$defs/SuggestNesResponse" + } + ] + }, + { + "title": "CloseNesResponse", + "description": "Successful result returned for a `nes/close` request.", + "allOf": [ + { + "$ref": "#/$defs/CloseNesResponse" + } + ] + }, + { + "title": "ExtMethodResponse", + "description": "Successful result returned by an extension method outside the core ACP method set.", + "allOf": [ + { + "$ref": "#/$defs/ExtResponse" + } + ] + }, + { + "title": "MessageMcpResponse", + "description": "Successful result returned by an MCP-over-ACP `mcp/message` request.", + "allOf": [ + { + "$ref": "#/$defs/MessageMcpResponse" + } + ] + } + ] + } + }, + "required": [ + "id", + "result" + ] }, { - "description": "Other undefined error code.", - "format": "int32", - "title": "Other", - "type": "integer" - } - ], - "description": "Predefined error codes for common JSON-RPC and ACP-specific errors.\n\nThese codes follow the JSON-RPC 2.0 specification for standard errors\nand use the reserved range (-32000 to -32099) for protocol-specific errors." - }, - "ExtNotification": { - "description": "Allows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" - }, - "ExtRequest": { - "description": "Allows for sending an arbitrary request that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" - }, - "ExtResponse": { - "description": "Allows for sending an arbitrary response to an [`ExtRequest`] that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" - }, - "FileSystemCapabilities": { - "description": "File system capabilities that a client may support.\n\nSee protocol docs: [FileSystem](https://agentclientprotocol.com/protocol/initialization#filesystem)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "title": "Error", + "description": "A failed JSON-RPC response.", + "type": "object", + "properties": { + "id": { + "description": "The id of the request this response answers.", + "allOf": [ + { + "$ref": "#/$defs/RequestId" + } + ] + }, + "error": { + "description": "Method-specific error data.", + "allOf": [ + { + "$ref": "#/$defs/Error" + } + ] + } + }, + "required": [ + "id", + "error" ] - }, - "readTextFile": { - "default": false, - "description": "Whether the Client supports `fs/read_text_file` requests.", - "type": "boolean" - }, - "writeTextFile": { - "default": false, - "description": "Whether the Client supports `fs/write_text_file` requests.", - "type": "boolean" } - }, - "type": "object" + ], + "x-docs-ignore": true }, - "ForkSessionRequest": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for forking an existing session.\n\nCreates a new session based on the context of an existing one, allowing\noperations like generating summaries without affecting the original session's history.\n\nOnly available if the Agent supports the `session.fork` capability.", + "InitializeResponse": { + "description": "Response to the `initialize` method.\n\nContains the negotiated protocol version and agent capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "protocolVersion": { + "description": "The protocol version the client specified if supported by the agent,\nor the latest protocol version supported by the agent.\n\nThe client should disconnect, if it doesn't support this version.", + "allOf": [ + { + "$ref": "#/$defs/ProtocolVersion" + } ] }, - "additionalDirectories": { - "description": "Additional workspace roots to activate for this session. Each path must be absolute.\n\nWhen omitted or empty, no additional roots are activated. When non-empty,\nthis is the complete resulting additional-root list for the forked\nsession.", - "items": { - "type": "string" - }, - "type": "array" - }, - "cwd": { - "description": "The working directory for this session.", - "type": "string" - }, - "mcpServers": { - "description": "List of MCP servers to connect to for this session.", - "items": { - "$ref": "#/$defs/McpServer" + "agentCapabilities": { + "description": "Capabilities supported by the agent.", + "default": { + "loadSession": false, + "promptCapabilities": { + "image": false, + "audio": false, + "embeddedContext": false + }, + "mcpCapabilities": { + "http": false, + "sse": false, + "acp": false + }, + "sessionCapabilities": {}, + "auth": {} }, - "type": "array" - }, - "sessionId": { "allOf": [ { - "$ref": "#/$defs/SessionId" + "$ref": "#/$defs/AgentCapabilities" } - ], - "description": "The ID of the session to fork." - } - }, - "required": [ - "sessionId", - "cwd" - ], - "type": "object", - "x-method": "session/fork", - "x-side": "agent" - }, - "ForkSessionResponse": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse from forking an existing session.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" ] }, - "configOptions": { - "description": "Initial session configuration options if supported by the Agent.", + "authMethods": { + "description": "Authentication methods supported by the agent.", + "type": "array", "items": { - "$ref": "#/$defs/SessionConfigOption" + "$ref": "#/$defs/AuthMethod" }, - "type": [ - "array", - "null" - ], + "default": [], "x-deserialize-default-on-error": true, "x-deserialize-skip-invalid-items": true }, - "modes": { + "agentInfo": { + "description": "Information about the Agent name and version sent to the Client.\n\nNote: in future versions of the protocol, this will be required.", "anyOf": [ { - "$ref": "#/$defs/SessionModeState" + "$ref": "#/$defs/Implementation" }, { "type": "null" } ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", "x-deserialize-default-on-error": true }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "Unique identifier for the newly created forked session." - } - }, - "required": [ - "sessionId" - ], - "type": "object", - "x-method": "session/fork", - "x-side": "agent" - }, - "HttpHeader": { - "description": "An HTTP header to set when making requests to the MCP server.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "name": { - "description": "The name of the HTTP header.", - "type": "string" - }, - "value": { - "description": "The value to set for the HTTP header.", - "type": "string" + ], + "additionalProperties": true } }, "required": [ - "name", - "value" + "protocolVersion" ], - "type": "object" + "x-side": "agent", + "x-method": "initialize" }, - "ImageContent": { - "description": "An image provided to or from an LLM.", + "ProtocolVersion": { + "description": "Protocol version identifier.\n\nThis version is only bumped for breaking changes.\nNon-breaking changes should be introduced via capabilities.", + "type": "integer", + "format": "uint16", + "minimum": 0, + "maximum": 65535 + }, + "AgentCapabilities": { + "description": "Capabilities supported by the agent.\n\nAdvertised during initialization to inform the client about\navailable features and content types.\n\nSee protocol docs: [Agent Capabilities](https://agentclientprotocol.com/protocol/initialization#agent-capabilities)", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "loadSession": { + "description": "Whether the agent supports `session/load`.", + "type": "boolean", + "default": false + }, + "promptCapabilities": { + "description": "Prompt capabilities supported by the agent.", + "default": { + "image": false, + "audio": false, + "embeddedContext": false + }, + "allOf": [ + { + "$ref": "#/$defs/PromptCapabilities" + } ] }, - "annotations": { + "mcpCapabilities": { + "description": "MCP capabilities supported by the agent.", + "default": { + "http": false, + "sse": false, + "acp": false + }, + "allOf": [ + { + "$ref": "#/$defs/McpCapabilities" + } + ] + }, + "sessionCapabilities": { + "description": "Session lifecycle and prompt capabilities advertised by the agent.", + "default": {}, + "allOf": [ + { + "$ref": "#/$defs/SessionCapabilities" + } + ] + }, + "auth": { + "description": "Authentication-related capabilities supported by the agent.", + "default": {}, + "allOf": [ + { + "$ref": "#/$defs/AgentAuthCapabilities" + } + ] + }, + "providers": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nProvider configuration capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports provider configuration methods.", + "anyOf": [ + { + "$ref": "#/$defs/ProvidersCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "nes": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNES (Next Edit Suggestions) capabilities supported by the agent.", "anyOf": [ { - "$ref": "#/$defs/Annotations" + "$ref": "#/$defs/NesCapabilities" }, { "type": "null" @@ -3475,3141 +2854,3960 @@ ], "x-deserialize-default-on-error": true }, - "data": { - "type": "string" - }, - "mimeType": { - "type": "string" + "positionEncoding": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe position encoding selected by the agent from the client's supported encodings.", + "anyOf": [ + { + "$ref": "#/$defs/PositionEncodingKind" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true }, - "uri": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "string", + "object", "null" - ] + ], + "additionalProperties": true } - }, - "required": [ - "data", - "mimeType" - ], - "type": "object" + } }, - "Implementation": { - "description": "Metadata about the implementation of the client or agent.\nDescribes the name and version of an MCP implementation, with an optional\ntitle for UI representation.", + "PromptCapabilities": { + "description": "Prompt capabilities supported by the agent in `session/prompt` requests.\n\nBaseline agent functionality requires support for [`ContentBlock::Text`]\nand [`ContentBlock::ResourceLink`] in prompt requests.\n\nOther variants must be explicitly opted in to.\nCapabilities for different types of content in prompt requests.\n\nIndicates which content types beyond the baseline (text and resource links)\nthe agent can process.\n\nSee protocol docs: [Prompt Capabilities](https://agentclientprotocol.com/protocol/initialization#prompt-capabilities)", + "type": "object", "properties": { + "image": { + "description": "Agent supports [`ContentBlock::Image`].", + "type": "boolean", + "default": false + }, + "audio": { + "description": "Agent supports [`ContentBlock::Audio`].", + "type": "boolean", + "default": false + }, + "embeddedContext": { + "description": "Agent supports embedded context in `session/prompt` requests.\n\nWhen enabled, the Client is allowed to include [`ContentBlock::Resource`]\nin prompt requests for pieces of context that are referenced in the message.", + "type": "boolean", + "default": false + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "name": { - "description": "Intended for programmatic or logical use, but can be used as a display\nname fallback if title isn\u2019t present.", - "type": "string" - }, - "title": { - "description": "Intended for UI and end-user contexts \u2014 optimized to be human-readable\nand easily understood.\n\nIf not provided, the name should be used for display.", - "type": [ - "string", - "null" - ] - }, - "version": { - "description": "Version of the implementation. Can be displayed to the user or used\nfor debugging or metrics purposes. (e.g. \"1.0.0\").", - "type": "string" + ], + "additionalProperties": true } - }, - "required": [ - "name", - "version" - ], - "type": "object" + } }, - "InitializeRequest": { - "description": "Request parameters for the initialize method.\n\nSent by the client to establish connection and negotiate capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", + "McpCapabilities": { + "description": "MCP capabilities supported by the agent", + "type": "object", "properties": { + "http": { + "description": "Agent supports [`McpServer::Http`].", + "type": "boolean", + "default": false + }, + "sse": { + "description": "Agent supports [`McpServer::Sse`].", + "type": "boolean", + "default": false + }, + "acp": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAgent supports [`McpServer::Acp`].", + "type": "boolean", + "default": false + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "clientCapabilities": { - "allOf": [ + ], + "additionalProperties": true + } + } + }, + "SessionCapabilities": { + "description": "Session capabilities supported by the agent.\n\nAs a baseline, all Agents **MUST** support `session/new`, `session/prompt`, `session/cancel`, and `session/update`.\n\nOptionally, they **MAY** support other session methods and notifications by specifying additional capabilities.\n\nNote: `session/load` is still handled by the top-level `load_session` capability. This will be unified in future versions of the protocol.\n\nSee protocol docs: [Session Capabilities](https://agentclientprotocol.com/protocol/initialization#session-capabilities)", + "type": "object", + "properties": { + "list": { + "description": "Whether the agent supports `session/list`.", + "anyOf": [ { - "$ref": "#/$defs/ClientCapabilities" + "$ref": "#/$defs/SessionListCapabilities" + }, + { + "type": "null" } ], - "default": { - "auth": { - "terminal": false - }, - "fs": { - "readTextFile": false, - "writeTextFile": false - }, - "terminal": false - }, - "description": "Capabilities supported by the client." + "x-deserialize-default-on-error": true }, - "clientInfo": { + "delete": { + "description": "Whether the agent supports `session/delete`.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports deleting sessions from `session/list`.", "anyOf": [ { - "$ref": "#/$defs/Implementation" + "$ref": "#/$defs/SessionDeleteCapabilities" }, { "type": "null" } ], - "description": "Information about the Client name and version sent to the Agent.\n\nNote: in future versions of the protocol, this will be required.", "x-deserialize-default-on-error": true }, - "protocolVersion": { - "allOf": [ + "additionalDirectories": { + "description": "Whether the agent supports `additionalDirectories` on supported session lifecycle requests.\n\nAgents that also support `session/list` may return\n`SessionInfo.additionalDirectories` to report the complete ordered\nadditional-root list associated with a listed session.", + "anyOf": [ { - "$ref": "#/$defs/ProtocolVersion" + "$ref": "#/$defs/SessionAdditionalDirectoriesCapabilities" + }, + { + "type": "null" } ], - "description": "The latest protocol version supported by the client." - } - }, - "required": [ - "protocolVersion" - ], - "type": "object", - "x-method": "initialize", - "x-side": "agent" - }, - "InitializeResponse": { - "description": "Response to the `initialize` method.\n\nContains the negotiated protocol version and agent capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + "x-deserialize-default-on-error": true }, - "agentCapabilities": { - "allOf": [ + "fork": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/fork`.", + "anyOf": [ { - "$ref": "#/$defs/AgentCapabilities" + "$ref": "#/$defs/SessionForkCapabilities" + }, + { + "type": "null" } ], - "default": { - "auth": {}, - "loadSession": false, - "mcpCapabilities": { - "acp": false, - "http": false, - "sse": false - }, - "promptCapabilities": { - "audio": false, - "embeddedContext": false, - "image": false - }, - "sessionCapabilities": {} - }, - "description": "Capabilities supported by the agent." + "x-deserialize-default-on-error": true }, - "agentInfo": { + "resume": { + "description": "Whether the agent supports `session/resume`.", "anyOf": [ { - "$ref": "#/$defs/Implementation" + "$ref": "#/$defs/SessionResumeCapabilities" }, { "type": "null" } ], - "description": "Information about the Agent name and version sent to the Client.\n\nNote: in future versions of the protocol, this will be required.", "x-deserialize-default-on-error": true }, - "authMethods": { - "default": [], - "description": "Authentication methods supported by the agent.", - "items": { - "$ref": "#/$defs/AuthMethod" - }, - "type": "array", - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true - }, - "protocolVersion": { - "allOf": [ + "close": { + "description": "Whether the agent supports `session/close`.", + "anyOf": [ { - "$ref": "#/$defs/ProtocolVersion" + "$ref": "#/$defs/SessionCloseCapabilities" + }, + { + "type": "null" } ], - "description": "The protocol version the client specified if supported by the agent,\nor the latest protocol version supported by the agent.\n\nThe client should disconnect, if it doesn't support this version." + "x-deserialize-default-on-error": true + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } - }, - "required": [ - "protocolVersion" - ], - "type": "object", - "x-method": "initialize", - "x-side": "agent" + } }, - "IntegerPropertySchema": { - "description": "Schema for integer properties in an elicitation form.", + "SessionListCapabilities": { + "description": "Capabilities for the `session/list` method.\n\nBy supplying `{}` it means that the agent supports listing of sessions.", + "type": "object", "properties": { - "default": { - "description": "Default value.", - "format": "int64", + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "integer", + "object", "null" - ] - }, - "description": { - "description": "Human-readable description.", + ], + "additionalProperties": true + } + } + }, + "SessionDeleteCapabilities": { + "description": "Capabilities for the `session/delete` method.\n\nSupplying `{}` means the agent supports deleting sessions from `session/list`.", + "type": "object", + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "string", + "object", "null" - ] - }, - "maximum": { - "description": "Maximum value (inclusive).", - "format": "int64", + ], + "additionalProperties": true + } + } + }, + "SessionAdditionalDirectoriesCapabilities": { + "description": "Capabilities for additional session directories support.\n\nBy supplying `{}` it means that the agent supports the `additionalDirectories`\nfield on supported session lifecycle requests. Agents that also support\n`session/list` may return `SessionInfo.additionalDirectories` to report the\ncomplete ordered additional-root list associated with a listed session.", + "type": "object", + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "integer", - "null" - ] - }, - "minimum": { - "description": "Minimum value (inclusive).", - "format": "int64", + "object", + "null" + ], + "additionalProperties": true + } + } + }, + "SessionForkCapabilities": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for the `session/fork` method.\n\nBy supplying `{}` it means that the agent supports forking of sessions.", + "type": "object", + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "integer", + "object", "null" - ] - }, - "title": { - "description": "Optional title for the property.", + ], + "additionalProperties": true + } + } + }, + "SessionResumeCapabilities": { + "description": "Capabilities for the `session/resume` method.\n\nBy supplying `{}` it means that the agent supports resuming of sessions.", + "type": "object", + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "string", + "object", "null" - ] + ], + "additionalProperties": true } - }, - "type": "object" + } }, - "KillTerminalRequest": { - "description": "Request to kill a terminal without releasing it.", + "SessionCloseCapabilities": { + "description": "Capabilities for the `session/close` method.\n\nBy supplying `{}` it means that the agent supports closing of sessions.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "sessionId": { - "allOf": [ + ], + "additionalProperties": true + } + } + }, + "AgentAuthCapabilities": { + "description": "Authentication-related capabilities supported by the agent.", + "type": "object", + "properties": { + "logout": { + "description": "Whether the agent supports the logout method.\n\nBy supplying `{}` it means that the agent supports the logout method.", + "anyOf": [ { - "$ref": "#/$defs/SessionId" + "$ref": "#/$defs/LogoutCapabilities" + }, + { + "type": "null" } ], - "description": "The session ID for this request." + "x-deserialize-default-on-error": true }, - "terminalId": { - "description": "The ID of the terminal to kill.", - "type": "string" + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } - }, - "required": [ - "sessionId", - "terminalId" - ], - "type": "object", - "x-method": "terminal/kill", - "x-side": "client" + } }, - "KillTerminalResponse": { - "description": "Response to `terminal/kill` method", + "LogoutCapabilities": { + "description": "Logout capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports the logout method.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } - }, - "type": "object", - "x-method": "terminal/kill", - "x-side": "client" + } }, - "ListProvidersRequest": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `providers/list`.", + "ProvidersCapabilities": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nProvider configuration capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports provider configuration methods.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } - }, - "type": "object", - "x-method": "providers/list", - "x-side": "agent" + } }, - "ListProvidersResponse": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `providers/list`.", + "NesCapabilities": { + "description": "NES capabilities advertised by the agent during initialization.", + "type": "object", "properties": { + "events": { + "description": "Events the agent wants to receive.", + "anyOf": [ + { + "$ref": "#/$defs/NesEventCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "context": { + "description": "Context the agent wants attached to each suggestion request.", + "anyOf": [ + { + "$ref": "#/$defs/NesContextCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "providers": { - "description": "Configurable providers with current routing info suitable for UI display.", - "items": { - "$ref": "#/$defs/ProviderInfo" - }, - "type": "array", - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + ], + "additionalProperties": true } - }, - "required": [ - "providers" - ], - "type": "object", - "x-method": "providers/list", - "x-side": "agent" + } }, - "ListSessionsRequest": { - "description": "Request parameters for listing existing sessions.\n\nOnly available if the Agent supports the `sessionCapabilities.list` capability.", + "NesEventCapabilities": { + "description": "Event capabilities the agent can consume.", + "type": "object", "properties": { + "document": { + "description": "Document event capabilities.", + "anyOf": [ + { + "$ref": "#/$defs/NesDocumentEventCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true + } + } + }, + "NesDocumentEventCapabilities": { + "description": "Document event capabilities the agent wants to receive.", + "type": "object", + "properties": { + "didOpen": { + "description": "Whether the agent wants `document/didOpen` events.", + "anyOf": [ + { + "$ref": "#/$defs/NesDocumentDidOpenCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true }, - "cursor": { - "description": "Opaque cursor token from a previous response's nextCursor field for cursor-based pagination", - "type": [ - "string", - "null" - ] + "didChange": { + "description": "Whether the agent wants `document/didChange` events, and the sync kind.", + "anyOf": [ + { + "$ref": "#/$defs/NesDocumentDidChangeCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true }, - "cwd": { - "description": "Filter sessions by working directory. Must be an absolute path.", + "didClose": { + "description": "Whether the agent wants `document/didClose` events.", + "anyOf": [ + { + "$ref": "#/$defs/NesDocumentDidCloseCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "didSave": { + "description": "Whether the agent wants `document/didSave` events.", + "anyOf": [ + { + "$ref": "#/$defs/NesDocumentDidSaveCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "didFocus": { + "description": "Whether the agent wants `document/didFocus` events.", + "anyOf": [ + { + "$ref": "#/$defs/NesDocumentDidFocusCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "string", + "object", "null" - ] + ], + "additionalProperties": true } - }, - "type": "object", - "x-method": "session/list", - "x-side": "agent" + } }, - "ListSessionsResponse": { - "description": "Response from listing sessions.", + "NesDocumentDidOpenCapabilities": { + "description": "Marker for `document/didOpen` capability support.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" + ], + "additionalProperties": true + } + } + }, + "NesDocumentDidChangeCapabilities": { + "description": "Capabilities for `document/didChange` events.", + "type": "object", + "properties": { + "syncKind": { + "description": "The sync kind the agent wants: `\"full\"` or `\"incremental\"`.", + "allOf": [ + { + "$ref": "#/$defs/TextDocumentSyncKind" + } ] }, - "nextCursor": { - "description": "Opaque cursor token. If present, pass this in the next request's cursor parameter\nto fetch the next page. If absent, there are no more results.", + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "string", + "object", "null" - ] - }, - "sessions": { - "description": "Array of session information objects", - "items": { - "$ref": "#/$defs/SessionInfo" - }, - "type": "array", - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + ], + "additionalProperties": true } }, "required": [ - "sessions" - ], - "type": "object", - "x-method": "session/list", - "x-side": "agent" + "syncKind" + ] }, - "LlmProtocol": { - "anyOf": [ - { - "const": "anthropic", - "description": "Anthropic API protocol.", - "type": "string" - }, - { - "const": "openai", - "description": "OpenAI API protocol.", - "type": "string" - }, - { - "const": "azure", - "description": "Azure OpenAI API protocol.", - "type": "string" - }, - { - "const": "vertex", - "description": "Google Vertex AI API protocol.", - "type": "string" - }, + "TextDocumentSyncKind": { + "description": "How the agent wants document changes delivered.", + "oneOf": [ { - "const": "bedrock", - "description": "AWS Bedrock API protocol.", - "type": "string" + "description": "Client sends the entire file content on each change.", + "type": "string", + "const": "full" }, { - "description": "Unknown or custom protocol.", - "title": "other", - "type": "string" + "description": "Client sends only the changed ranges.", + "type": "string", + "const": "incremental" } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWell-known API protocol identifiers for LLM providers.\n\nAgents and clients MUST handle unknown protocol identifiers gracefully.\n\nProtocol names beginning with `_` are free for custom use, like other ACP extension methods.\nProtocol names that do not begin with `_` are reserved for the ACP spec." + ] }, - "LoadSessionRequest": { - "description": "Request parameters for loading an existing session.\n\nOnly available if the Agent supports the `loadSession` capability.\n\nSee protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)", + "NesDocumentDidCloseCapabilities": { + "description": "Marker for `document/didClose` capability support.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "additionalDirectories": { - "description": "Additional workspace roots to activate for this session. Each path must be absolute.\n\nWhen omitted or empty, no additional roots are activated. When non-empty,\nthis is the complete resulting additional-root list for the loaded\nsession. It may differ from any previously used or reported list as long as\nthe request `cwd` matches the session's `cwd`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "cwd": { - "description": "The working directory for this session.", - "type": "string" - }, - "mcpServers": { - "description": "List of MCP servers to connect to for this session.", - "items": { - "$ref": "#/$defs/McpServer" - }, - "type": "array" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } ], - "description": "The ID of the session to load." + "additionalProperties": true } - }, - "required": [ - "mcpServers", - "cwd", - "sessionId" - ], - "type": "object", - "x-method": "session/load", - "x-side": "agent" + } }, - "LoadSessionResponse": { - "description": "Response from loading an existing session.", + "NesDocumentDidSaveCapabilities": { + "description": "Marker for `document/didSave` capability support.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "configOptions": { - "description": "Initial session configuration options if supported by the Agent.", - "items": { - "$ref": "#/$defs/SessionConfigOption" - }, + ], + "additionalProperties": true + } + } + }, + "NesDocumentDidFocusCapabilities": { + "description": "Marker for `document/didFocus` capability support.", + "type": "object", + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "array", + "object", "null" ], - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + "additionalProperties": true + } + } + }, + "NesContextCapabilities": { + "description": "Context capabilities the agent wants attached to each suggestion request.", + "type": "object", + "properties": { + "recentFiles": { + "description": "Whether the agent wants recent files context.", + "anyOf": [ + { + "$ref": "#/$defs/NesRecentFilesCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true }, - "modes": { + "relatedSnippets": { + "description": "Whether the agent wants related snippets context.", "anyOf": [ { - "$ref": "#/$defs/SessionModeState" + "$ref": "#/$defs/NesRelatedSnippetsCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "editHistory": { + "description": "Whether the agent wants edit history context.", + "anyOf": [ + { + "$ref": "#/$defs/NesEditHistoryCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "userActions": { + "description": "Whether the agent wants user actions context.", + "anyOf": [ + { + "$ref": "#/$defs/NesUserActionsCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "openFiles": { + "description": "Whether the agent wants open files context.", + "anyOf": [ + { + "$ref": "#/$defs/NesOpenFilesCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "diagnostics": { + "description": "Whether the agent wants diagnostics context.", + "anyOf": [ + { + "$ref": "#/$defs/NesDiagnosticsCapabilities" }, { "type": "null" } ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", "x-deserialize-default-on-error": true + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } - }, - "type": "object", - "x-method": "session/load", - "x-side": "agent" + } }, - "LogoutCapabilities": { - "description": "Logout capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports the logout method.", + "NesRecentFilesCapabilities": { + "description": "Capabilities for recent files context.", + "type": "object", "properties": { + "maxCount": { + "description": "Maximum number of recent files the agent can use.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } - }, - "type": "object" + } }, - "LogoutRequest": { - "description": "Request parameters for the logout method.\n\nTerminates the current authenticated session.", + "NesRelatedSnippetsCapabilities": { + "description": "Capabilities for related snippets context.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } - }, + } + }, + "NesEditHistoryCapabilities": { + "description": "Capabilities for edit history context.", "type": "object", - "x-method": "logout", - "x-side": "agent" + "properties": { + "maxCount": { + "description": "Maximum number of edit history entries the agent can use.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + } }, - "LogoutResponse": { - "description": "Response to the `logout` method.", + "NesUserActionsCapabilities": { + "description": "Capabilities for user actions context.", + "type": "object", "properties": { + "maxCount": { + "description": "Maximum number of user actions the agent can use.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } - }, + } + }, + "NesOpenFilesCapabilities": { + "description": "Capabilities for open files context.", "type": "object", - "x-method": "logout", - "x-side": "agent" + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + } }, - "McpCapabilities": { - "description": "MCP capabilities supported by the agent", + "NesDiagnosticsCapabilities": { + "description": "Capabilities for diagnostics context.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "acp": { - "default": false, - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAgent supports [`McpServer::Acp`].", - "type": "boolean" + ], + "additionalProperties": true + } + } + }, + "PositionEncodingKind": { + "description": "The encoding used for character offsets in positions.\n\nFollows the same conventions as LSP 3.17. The default is UTF-16.", + "oneOf": [ + { + "description": "Character offsets count UTF-16 code units. This is the default.", + "type": "string", + "const": "utf-16" }, - "http": { - "default": false, - "description": "Agent supports [`McpServer::Http`].", - "type": "boolean" + { + "description": "Character offsets count Unicode code points.", + "type": "string", + "const": "utf-32" }, - "sse": { - "default": false, - "description": "Agent supports [`McpServer::Sse`].", - "type": "boolean" + { + "description": "Character offsets count UTF-8 code units (bytes).", + "type": "string", + "const": "utf-8" } - }, - "type": "object" - }, - "McpConnectionId": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA unique identifier for an active MCP-over-ACP connection.", - "type": "string" + ] }, - "McpServer": { + "AuthMethod": { + "description": "Describes an available authentication method.\n\nThe `type` field acts as the discriminator in the serialized JSON form.\nWhen no `type` is present, the method is treated as `agent`.", "anyOf": [ { - "allOf": [ - { - "$ref": "#/$defs/McpServerHttp" - } - ], - "description": "HTTP transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.http` is `true`.", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUser provides a key that the client passes to the agent as an environment variable.", + "type": "object", "properties": { "type": { - "const": "http", - "type": "string" + "type": "string", + "const": "env_var" } }, "required": [ "type" ], - "type": "object" - }, - { "allOf": [ { - "$ref": "#/$defs/McpServerSse" + "$ref": "#/$defs/AuthMethodEnvVar" } - ], - "description": "SSE transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.sse` is `true`.", + ] + }, + { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nClient runs an interactive terminal for the user to authenticate via a TUI.", + "type": "object", "properties": { "type": { - "const": "sse", - "type": "string" + "type": "string", + "const": "terminal" } }, "required": [ "type" ], - "type": "object" - }, - { "allOf": [ { - "$ref": "#/$defs/McpServerAcp" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nACP transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.acp` is `true`.\nThe MCP server is provided by an ACP component and communicates over the ACP channel.", - "properties": { - "type": { - "const": "acp", - "type": "string" + "$ref": "#/$defs/AuthMethodTerminal" } - }, - "required": [ - "type" - ], - "type": "object" + ] }, { + "title": "agent", + "description": "Agent handles authentication itself.\n\nThis is the default when no `type` is specified.", "allOf": [ { - "$ref": "#/$defs/McpServerStdio" + "$ref": "#/$defs/AuthMethodAgent" } - ], - "description": "Stdio transport configuration\n\nAll Agents MUST support this transport.", - "title": "stdio" + ] } - ], - "description": "Configuration for connecting to an MCP (Model Context Protocol) server.\n\nMCP servers provide tools and context that the agent can use when\nprocessing prompts.\n\nSee protocol docs: [MCP Servers](https://agentclientprotocol.com/protocol/session-setup#mcp-servers)" + ] }, - "McpServerAcp": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nACP transport configuration for MCP.\n\nThe MCP server is provided by an ACP component and communicates over the ACP channel\nusing `mcp/connect`, `mcp/message`, and `mcp/disconnect`.", + "AuthMethodId": { + "description": "Typed identifier used for auth method values on the wire.", + "type": "string" + }, + "AuthEnvVar": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nDescribes a single environment variable for an [`AuthMethodEnvVar`] authentication method.", + "type": "object", "properties": { + "name": { + "description": "The environment variable name (e.g. `\"OPENAI_API_KEY\"`).", + "type": "string" + }, + "label": { + "description": "Human-readable label for this variable, displayed in client UI.", + "type": [ + "string", + "null" + ] + }, + "secret": { + "description": "Whether this value is a secret (e.g. API key, token).\nClients should use a password-style input for secret vars.\n\nDefaults to `true`.", + "type": "boolean", + "default": true + }, + "optional": { + "description": "Whether this variable is optional.\n\nDefaults to `false`.", + "type": "boolean", + "default": false + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, + ], + "additionalProperties": true + } + }, + "required": [ + "name" + ] + }, + "AuthMethodEnvVar": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nEnvironment variable authentication method.\n\nThe user provides credentials that the client passes to the agent as environment variables.", + "type": "object", + "properties": { "id": { + "description": "Unique identifier for this authentication method.", "allOf": [ { - "$ref": "#/$defs/McpServerAcpId" + "$ref": "#/$defs/AuthMethodId" } - ], - "description": "Unique identifier for this MCP server, generated by the component providing it.\n\nProviders MUST NOT reuse an ID for multiple ACP-transport MCP servers that are visible\non the same ACP connection." + ] }, "name": { - "description": "Human-readable name identifying this MCP server.", + "description": "Human-readable name of the authentication method.", "type": "string" - } - }, - "required": [ - "name", - "id" - ], - "type": "object" - }, - "McpServerAcpId": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for an MCP server using the ACP transport.\n\nThe value is opaque and generated by the ACP component providing the MCP server. It is\nused by `mcp/connect` to route connection requests back to the component that declared the\nserver.", - "type": "string" - }, - "McpServerHttp": { - "description": "HTTP transport configuration for MCP.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + }, + "description": { + "description": "Optional description providing more details about this authentication method.", "type": [ - "object", + "string", "null" ] }, - "headers": { - "description": "HTTP headers to set when making requests to the MCP server.", + "vars": { + "description": "The environment variables the client should set.", + "type": "array", "items": { - "$ref": "#/$defs/HttpHeader" - }, - "type": "array" + "$ref": "#/$defs/AuthEnvVar" + } }, - "name": { - "description": "Human-readable name identifying this MCP server.", - "type": "string" + "link": { + "description": "Optional link to a page where the user can obtain their credentials.", + "type": [ + "string", + "null" + ] }, - "url": { - "description": "URL to the MCP server.", - "type": "string" + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ + "id", "name", - "url", - "headers" - ], - "type": "object" + "vars" + ] }, - "McpServerSse": { - "description": "SSE transport configuration for MCP.", + "AuthMethodTerminal": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nTerminal-based authentication method.\n\nThe client runs an interactive terminal for the user to authenticate via a TUI.", + "type": "object", "properties": { + "id": { + "description": "Unique identifier for this authentication method.", + "allOf": [ + { + "$ref": "#/$defs/AuthMethodId" + } + ] + }, + "name": { + "description": "Human-readable name of the authentication method.", + "type": "string" + }, + "description": { + "description": "Optional description providing more details about this authentication method.", + "type": [ + "string", + "null" + ] + }, + "args": { + "description": "Additional arguments to pass when running the agent binary for terminal auth.", + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "description": "Additional environment variables to set when running the agent binary for terminal auth.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" + ], + "additionalProperties": true + } + }, + "required": [ + "id", + "name" + ] + }, + "AuthMethodAgent": { + "description": "Agent handles authentication itself.\n\nThis is the default authentication method type.", + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for this authentication method.", + "allOf": [ + { + "$ref": "#/$defs/AuthMethodId" + } ] }, - "headers": { - "description": "HTTP headers to set when making requests to the MCP server.", - "items": { - "$ref": "#/$defs/HttpHeader" - }, - "type": "array" - }, "name": { - "description": "Human-readable name identifying this MCP server.", + "description": "Human-readable name of the authentication method.", "type": "string" }, - "url": { - "description": "URL to the MCP server.", - "type": "string" + "description": { + "description": "Optional description providing more details about this authentication method.", + "type": [ + "string", + "null" + ] + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ - "name", - "url", - "headers" - ], - "type": "object" - }, - "McpServerStdio": { - "description": "Stdio transport configuration for MCP.", + "id", + "name" + ] + }, + "Implementation": { + "description": "Metadata about the implementation of the client or agent.\nDescribes the name and version of an MCP implementation, with an optional\ntitle for UI representation.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "name": { + "description": "Intended for programmatic or logical use, but can be used as a display\nname fallback if title isn\u2019t present.", + "type": "string" + }, + "title": { + "description": "Intended for UI and end-user contexts \u2014 optimized to be human-readable\nand easily understood.\n\nIf not provided, the name should be used for display.", "type": [ - "object", + "string", "null" ] }, - "args": { - "description": "Command-line arguments to pass to the MCP server.", - "items": { - "type": "string" - }, - "type": "array" - }, - "command": { - "description": "Path to the MCP server executable.", + "version": { + "description": "Version of the implementation. Can be displayed to the user or used\nfor debugging or metrics purposes. (e.g. \"1.0.0\").", "type": "string" }, - "env": { - "description": "Environment variables to set when launching the MCP server.", - "items": { - "$ref": "#/$defs/EnvVariable" - }, - "type": "array" - }, - "name": { - "description": "Human-readable name identifying this MCP server.", - "type": "string" + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ "name", - "command", - "args", - "env" - ], - "type": "object" - }, - "MessageId": { - "description": "Unique identifier for a message within a session.", - "type": "string" + "version" + ] }, - "MessageMcpNotification": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNotification parameters for `mcp/message`.\n\nThis is used when the wrapped MCP message is a notification and the outer JSON-RPC\nenvelope has no `id`.", + "AuthenticateResponse": { + "description": "Response to the `authenticate` method.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "connectionId": { - "allOf": [ - { - "$ref": "#/$defs/McpConnectionId" - } ], - "description": "The MCP-over-ACP connection this message is sent on." - }, - "method": { - "description": "The inner MCP method name.", - "type": "string" + "additionalProperties": true + } + }, + "x-side": "agent", + "x-method": "authenticate" + }, + "ListProvidersResponse": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `providers/list`.", + "type": "object", + "properties": { + "providers": { + "description": "Configurable providers with current routing info suitable for UI display.", + "type": "array", + "items": { + "$ref": "#/$defs/ProviderInfo" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, - "params": { - "additionalProperties": true, - "description": "Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params.", + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, "required": [ - "connectionId", - "method" + "providers" ], - "type": "object", - "x-method": "mcp/message", - "x-side": "both" + "x-side": "agent", + "x-method": "providers/list" }, - "MessageMcpRequest": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `mcp/message`.", + "ProviderInfo": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInformation about a configurable LLM provider.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + "id": { + "description": "Provider identifier, for example \"main\" or \"openai\".", + "type": "string" }, - "connectionId": { - "allOf": [ + "supported": { + "description": "Supported protocol types for this provider.", + "type": "array", + "items": { + "$ref": "#/$defs/LlmProtocol" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true + }, + "required": { + "description": "Whether this provider is mandatory and cannot be disabled via `providers/disable`.\nIf true, clients must not call `providers/disable` for this id.", + "type": "boolean" + }, + "current": { + "description": "Current effective non-secret routing config.\nNull or omitted means provider is disabled.", + "anyOf": [ { - "$ref": "#/$defs/McpConnectionId" + "$ref": "#/$defs/ProviderCurrentConfig" + }, + { + "type": "null" } - ], - "description": "The MCP-over-ACP connection this message is sent on." - }, - "method": { - "description": "The inner MCP method name.", - "type": "string" + ] }, - "params": { - "additionalProperties": true, - "description": "Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params.", + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, "required": [ - "connectionId", - "method" - ], - "type": "object", - "x-method": "mcp/message", - "x-side": "both" - }, - "MessageMcpResponse": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `mcp/message`.\n\nThis is the inner MCP response result payload. Any JSON value is valid.", - "x-method": "mcp/message", - "x-side": "both" + "id", + "supported", + "required" + ] }, - "MultiSelectItems": { + "LlmProtocol": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWell-known API protocol identifiers for LLM providers.\n\nAgents and clients MUST handle unknown protocol identifiers gracefully.\n\nProtocol names beginning with `_` are free for custom use, like other ACP extension methods.\nProtocol names that do not begin with `_` are reserved for the ACP spec.", "anyOf": [ { - "allOf": [ - { - "$ref": "#/$defs/UntitledMultiSelectItems" - } - ], - "description": "Untitled multi-select items with plain string values.", - "title": "Untitled" + "description": "Anthropic API protocol.", + "type": "string", + "const": "anthropic" }, { - "allOf": [ - { - "$ref": "#/$defs/TitledMultiSelectItems" - } - ], - "description": "Titled multi-select items with human-readable labels.", - "title": "Titled" + "description": "OpenAI API protocol.", + "type": "string", + "const": "openai" + }, + { + "description": "Azure OpenAI API protocol.", + "type": "string", + "const": "azure" + }, + { + "description": "Google Vertex AI API protocol.", + "type": "string", + "const": "vertex" + }, + { + "description": "AWS Bedrock API protocol.", + "type": "string", + "const": "bedrock" + }, + { + "title": "other", + "description": "Unknown or custom protocol.", + "type": "string" } - ], - "description": "Items for a multi-select (array) property schema." + ] }, - "MultiSelectPropertySchema": { - "description": "Schema for multi-select (array) properties in an elicitation form.", + "ProviderCurrentConfig": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCurrent effective non-secret routing configuration for a provider.", + "type": "object", "properties": { - "default": { - "description": "Default selected values.", - "items": { - "type": "string" - }, - "type": [ - "array", - "null" - ] - }, - "description": { - "description": "Human-readable description.", - "type": [ - "string", - "null" - ] - }, - "items": { + "apiType": { + "description": "Protocol currently used by this provider.", "allOf": [ { - "$ref": "#/$defs/MultiSelectItems" + "$ref": "#/$defs/LlmProtocol" } - ], - "description": "The items definition describing allowed values." + ] }, - "maxItems": { - "description": "Maximum number of items to select.", - "format": "uint64", - "minimum": 0, + "baseUrl": { + "description": "Base URL currently used by this provider.", + "type": "string" + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "integer", + "object", "null" - ] - }, - "minItems": { - "description": "Minimum number of items to select.", - "format": "uint64", - "minimum": 0, + ], + "additionalProperties": true + } + }, + "required": [ + "apiType", + "baseUrl" + ] + }, + "SetProviderResponse": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `providers/set`.", + "type": "object", + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "integer", + "object", "null" - ] - }, - "title": { - "description": "Optional title for the property.", + ], + "additionalProperties": true + } + }, + "x-side": "agent", + "x-method": "providers/set" + }, + "DisableProviderResponse": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `providers/disable`.", + "type": "object", + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "string", + "object", "null" - ] + ], + "additionalProperties": true } }, - "required": [ - "items" - ], - "type": "object" + "x-side": "agent", + "x-method": "providers/disable" }, - "NesCapabilities": { - "description": "NES capabilities advertised by the agent during initialization.", + "LogoutResponse": { + "description": "Response to the `logout` method.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" + ], + "additionalProperties": true + } + }, + "x-side": "agent", + "x-method": "logout" + }, + "NewSessionResponse": { + "description": "Response from creating a new session.\n\nSee protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)", + "type": "object", + "properties": { + "sessionId": { + "description": "Unique identifier for the created session.\n\nUsed in all subsequent requests for this conversation.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } ] }, - "context": { + "modes": { + "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", "anyOf": [ { - "$ref": "#/$defs/NesContextCapabilities" + "$ref": "#/$defs/SessionModeState" }, { "type": "null" } ], - "description": "Context the agent wants attached to each suggestion request.", "x-deserialize-default-on-error": true }, - "events": { - "anyOf": [ - { - "$ref": "#/$defs/NesEventCapabilities" - }, - { - "type": "null" - } + "configOptions": { + "description": "Initial session configuration options if supported by the Agent.", + "type": [ + "array", + "null" ], - "description": "Events the agent wants to receive.", - "x-deserialize-default-on-error": true + "items": { + "$ref": "#/$defs/SessionConfigOption" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, - "type": "object" + "required": [ + "sessionId" + ], + "x-side": "agent", + "x-method": "session/new" }, - "NesContextCapabilities": { - "description": "Context capabilities the agent wants attached to each suggestion request.", + "SessionModeState": { + "description": "The set of modes and the one currently active.", + "type": "object", "properties": { + "currentModeId": { + "description": "The current mode the Agent is in.", + "allOf": [ + { + "$ref": "#/$defs/SessionModeId" + } + ] + }, + "availableModes": { + "description": "The set of modes that the Agent can operate in", + "type": "array", + "items": { + "$ref": "#/$defs/SessionMode" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "diagnostics": { - "anyOf": [ - { - "$ref": "#/$defs/NesDiagnosticsCapabilities" - }, - { - "type": "null" - } ], - "description": "Whether the agent wants diagnostics context.", - "x-deserialize-default-on-error": true - }, - "editHistory": { - "anyOf": [ - { - "$ref": "#/$defs/NesEditHistoryCapabilities" - }, + "additionalProperties": true + } + }, + "required": [ + "currentModeId", + "availableModes" + ] + }, + "SessionModeId": { + "description": "Unique identifier for a Session Mode.", + "type": "string" + }, + "SessionMode": { + "description": "A mode the agent can operate in.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "type": "object", + "properties": { + "id": { + "description": "Stable identifier used to refer to this protocol object in later messages.", + "allOf": [ { - "type": "null" + "$ref": "#/$defs/SessionModeId" } - ], - "description": "Whether the agent wants edit history context.", - "x-deserialize-default-on-error": true + ] }, - "openFiles": { - "anyOf": [ - { - "$ref": "#/$defs/NesOpenFilesCapabilities" - }, - { - "type": "null" - } - ], - "description": "Whether the agent wants open files context.", - "x-deserialize-default-on-error": true + "name": { + "description": "Human-readable name shown for this protocol object.", + "type": "string" }, - "recentFiles": { - "anyOf": [ - { - "$ref": "#/$defs/NesRecentFilesCapabilities" - }, + "description": { + "description": "Optional human-readable details shown with this protocol object.", + "type": [ + "string", + "null" + ] + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + }, + "required": [ + "id", + "name" + ] + }, + "SessionConfigOption": { + "description": "A session configuration option selector and its current state.", + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for the configuration option.", + "allOf": [ { - "type": "null" + "$ref": "#/$defs/SessionConfigId" } - ], - "description": "Whether the agent wants recent files context.", - "x-deserialize-default-on-error": true + ] }, - "relatedSnippets": { + "name": { + "description": "Human-readable label for the option.", + "type": "string" + }, + "description": { + "description": "Optional description for the Client to display to the user.", + "type": [ + "string", + "null" + ] + }, + "category": { + "description": "Optional semantic category for this option (UX only).", "anyOf": [ { - "$ref": "#/$defs/NesRelatedSnippetsCapabilities" + "$ref": "#/$defs/SessionConfigOptionCategory" }, { "type": "null" } ], - "description": "Whether the agent wants related snippets context.", "x-deserialize-default-on-error": true }, - "userActions": { - "anyOf": [ - { - "$ref": "#/$defs/NesUserActionsCapabilities" - }, - { - "type": "null" - } + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "Whether the agent wants user actions context.", - "x-deserialize-default-on-error": true + "additionalProperties": true } }, - "type": "object" - }, - "NesDiagnostic": { - "description": "A diagnostic (error, warning, etc.).", - "properties": { - "message": { - "description": "The diagnostic message.", - "type": "string" - }, - "range": { + "required": [ + "id", + "name" + ], + "oneOf": [ + { + "description": "Single-value selector (dropdown).", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "select" + } + }, + "required": [ + "type" + ], "allOf": [ { - "$ref": "#/$defs/Range" + "$ref": "#/$defs/SessionConfigSelect" } - ], - "description": "The range of the diagnostic." + ] }, - "severity": { + { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nBoolean on/off toggle.", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "boolean" + } + }, + "required": [ + "type" + ], "allOf": [ { - "$ref": "#/$defs/NesDiagnosticSeverity" + "$ref": "#/$defs/SessionConfigBoolean" } - ], - "description": "The severity of the diagnostic." - }, - "uri": { - "description": "The URI of the file containing the diagnostic.", - "type": "string" + ] } - }, - "required": [ - "uri", - "range", - "severity", - "message" ], - "type": "object" + "discriminator": { + "propertyName": "type" + } }, - "NesDiagnosticSeverity": { - "description": "Severity of a diagnostic.", - "oneOf": [ + "SessionConfigId": { + "description": "Unique identifier for a session configuration option.", + "type": "string" + }, + "SessionConfigOptionCategory": { + "description": "Semantic category for a session configuration option.\n\nThis is intended to help Clients distinguish broadly common selectors (e.g. model selector vs\nsession mode selector vs thought/reasoning level) for UX purposes (keyboard shortcuts, icons,\nplacement). It MUST NOT be required for correctness. Clients MUST handle missing or unknown\ncategories gracefully.\n\nCategory names beginning with `_` are free for custom use, like other ACP extension methods.\nCategory names that do not begin with `_` are reserved for the ACP spec.", + "anyOf": [ { - "const": "error", - "description": "An error.", - "type": "string" + "description": "Session mode selector.", + "type": "string", + "const": "mode" }, { - "const": "warning", - "description": "A warning.", - "type": "string" + "description": "Model selector.", + "type": "string", + "const": "model" }, { - "const": "information", - "description": "An informational message.", - "type": "string" + "description": "Model-related configuration parameter.", + "type": "string", + "const": "model_config" }, { - "const": "hint", - "description": "A hint.", + "description": "Thought/reasoning level selector.", + "type": "string", + "const": "thought_level" + }, + { + "title": "other", + "description": "Unknown / uncategorized selector.", "type": "string" } ] }, - "NesDiagnosticsCapabilities": { - "description": "Capabilities for diagnostics context.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + "SessionConfigValueId": { + "description": "Unique identifier for a session configuration option value.", + "type": "string" + }, + "SessionConfigSelectOptions": { + "description": "Possible values for a session configuration option.", + "anyOf": [ + { + "title": "Ungrouped", + "description": "A flat list of options with no grouping.", + "type": "array", + "items": { + "$ref": "#/$defs/SessionConfigSelectOption" + } + }, + { + "title": "Grouped", + "description": "A list of options grouped under headers.", + "type": "array", + "items": { + "$ref": "#/$defs/SessionConfigSelectGroup" + } } - }, - "type": "object" + ] }, - "NesDocumentDidChangeCapabilities": { - "description": "Capabilities for `document/didChange` events.", + "SessionConfigSelectOption": { + "description": "A possible value for a session configuration option.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "syncKind": { + "value": { + "description": "Unique identifier for this option value.", "allOf": [ { - "$ref": "#/$defs/TextDocumentSyncKind" + "$ref": "#/$defs/SessionConfigValueId" } - ], - "description": "The sync kind the agent wants: `\"full\"` or `\"incremental\"`." - } - }, - "required": [ - "syncKind" - ], - "type": "object" - }, - "NesDocumentDidCloseCapabilities": { - "description": "Marker for `document/didClose` capability support.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" ] - } - }, - "type": "object" - }, - "NesDocumentDidFocusCapabilities": { - "description": "Marker for `document/didFocus` capability support.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + }, + "name": { + "description": "Human-readable label for this option value.", + "type": "string" + }, + "description": { + "description": "Optional description for this option value.", "type": [ - "object", + "string", "null" ] - } - }, - "type": "object" - }, - "NesDocumentDidOpenCapabilities": { - "description": "Marker for `document/didOpen` capability support.", - "properties": { + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" + "required": [ + "value", + "name" + ] }, - "NesDocumentDidSaveCapabilities": { - "description": "Marker for `document/didSave` capability support.", + "SessionConfigSelectGroup": { + "description": "A group of possible values for a session configuration option.", + "type": "object", "properties": { + "group": { + "description": "Unique identifier for this group.", + "allOf": [ + { + "$ref": "#/$defs/SessionConfigGroupId" + } + ] + }, + "name": { + "description": "Human-readable label for this group.", + "type": "string" + }, + "options": { + "description": "The set of option values in this group.", + "type": "array", + "items": { + "$ref": "#/$defs/SessionConfigSelectOption" + } + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" + "required": [ + "group", + "name", + "options" + ] }, - "NesDocumentEventCapabilities": { - "description": "Document event capabilities the agent wants to receive.", + "SessionConfigGroupId": { + "description": "Unique identifier for a session configuration option value group.", + "type": "string" + }, + "SessionConfigSelect": { + "description": "A single-value selector (dropdown) session configuration option payload.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "didChange": { - "anyOf": [ - { - "$ref": "#/$defs/NesDocumentDidChangeCapabilities" - }, - { - "type": "null" - } - ], - "description": "Whether the agent wants `document/didChange` events, and the sync kind.", - "x-deserialize-default-on-error": true - }, - "didClose": { - "anyOf": [ - { - "$ref": "#/$defs/NesDocumentDidCloseCapabilities" - }, - { - "type": "null" - } - ], - "description": "Whether the agent wants `document/didClose` events.", - "x-deserialize-default-on-error": true - }, - "didFocus": { - "anyOf": [ - { - "$ref": "#/$defs/NesDocumentDidFocusCapabilities" - }, - { - "type": "null" - } - ], - "description": "Whether the agent wants `document/didFocus` events.", - "x-deserialize-default-on-error": true - }, - "didOpen": { - "anyOf": [ - { - "$ref": "#/$defs/NesDocumentDidOpenCapabilities" - }, + "currentValue": { + "description": "The currently selected value.", + "allOf": [ { - "type": "null" + "$ref": "#/$defs/SessionConfigValueId" } - ], - "description": "Whether the agent wants `document/didOpen` events.", - "x-deserialize-default-on-error": true + ] }, - "didSave": { - "anyOf": [ - { - "$ref": "#/$defs/NesDocumentDidSaveCapabilities" - }, + "options": { + "description": "The set of selectable options.", + "allOf": [ { - "type": "null" + "$ref": "#/$defs/SessionConfigSelectOptions" } - ], - "description": "Whether the agent wants `document/didSave` events.", - "x-deserialize-default-on-error": true - } - }, - "type": "object" - }, - "NesEditHistoryCapabilities": { - "description": "Capabilities for edit history context.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "maxCount": { - "description": "Maximum number of edit history entries the agent can use.", - "format": "uint32", - "minimum": 0, - "type": [ - "integer", - "null" ] } }, - "type": "object" + "required": [ + "currentValue", + "options" + ] }, - "NesEditHistoryEntry": { - "description": "An entry in the edit history.", - "properties": { - "diff": { - "description": "A diff representing the edit.", - "type": "string" - }, - "uri": { - "description": "The URI of the edited file.", - "type": "string" + "SessionConfigBoolean": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA boolean on/off toggle session configuration option payload.", + "type": "object", + "properties": { + "currentValue": { + "description": "The current value of the boolean option.", + "type": "boolean" } }, "required": [ - "uri", - "diff" - ], - "type": "object" + "currentValue" + ] }, - "NesEditSuggestion": { - "description": "A text edit suggestion.", + "LoadSessionResponse": { + "description": "Response from loading an existing session.", + "type": "object", "properties": { - "cursorPosition": { + "modes": { + "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", "anyOf": [ { - "$ref": "#/$defs/Position" + "$ref": "#/$defs/SessionModeState" }, { "type": "null" } ], - "description": "Optional suggested cursor position after applying edits.", "x-deserialize-default-on-error": true }, - "edits": { - "description": "The text edits to apply.", + "configOptions": { + "description": "Initial session configuration options if supported by the Agent.", + "type": [ + "array", + "null" + ], "items": { - "$ref": "#/$defs/NesTextEdit" + "$ref": "#/$defs/SessionConfigOption" }, - "type": "array" - }, - "id": { - "description": "Unique identifier for accept/reject tracking.", - "type": "string" + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, - "uri": { - "description": "The URI of the file to edit.", - "type": "string" - } - }, - "required": [ - "id", - "uri", - "edits" - ], - "type": "object" - }, - "NesEventCapabilities": { - "description": "Event capabilities the agent can consume.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "document": { - "anyOf": [ - { - "$ref": "#/$defs/NesDocumentEventCapabilities" - }, - { - "type": "null" - } ], - "description": "Document event capabilities.", - "x-deserialize-default-on-error": true + "additionalProperties": true } }, - "type": "object" + "x-side": "agent", + "x-method": "session/load" }, - "NesExcerpt": { - "description": "A code excerpt from a file.", + "ListSessionsResponse": { + "description": "Response from listing sessions.", + "type": "object", "properties": { - "endLine": { - "description": "The end line of the excerpt (zero-based).", - "format": "uint32", - "minimum": 0, - "type": "integer" + "sessions": { + "description": "Array of session information objects", + "type": "array", + "items": { + "$ref": "#/$defs/SessionInfo" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, - "startLine": { - "description": "The start line of the excerpt (zero-based).", - "format": "uint32", - "minimum": 0, - "type": "integer" + "nextCursor": { + "description": "Opaque cursor token. If present, pass this in the next request's cursor parameter\nto fetch the next page. If absent, there are no more results.", + "type": [ + "string", + "null" + ] }, - "text": { - "description": "The text content of the excerpt.", - "type": "string" - } - }, - "required": [ - "startLine", - "endLine", - "text" - ], - "type": "object" - }, - "NesJumpCapabilities": { - "description": "Marker for jump suggestion support.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" + "required": [ + "sessions" + ], + "x-side": "agent", + "x-method": "session/list" }, - "NesJumpSuggestion": { - "description": "A jump-to-location suggestion.", + "SessionInfo": { + "description": "Information about a session returned by session/list", + "type": "object", "properties": { - "id": { - "description": "Unique identifier for accept/reject tracking.", - "type": "string" - }, - "position": { + "sessionId": { + "description": "Unique identifier for the session", "allOf": [ { - "$ref": "#/$defs/Position" + "$ref": "#/$defs/SessionId" } - ], - "description": "The target position within the file." + ] }, - "uri": { - "description": "The file to navigate to.", - "type": "string" - } - }, - "required": [ - "id", - "uri", - "position" - ], - "type": "object" - }, - "NesOpenFile": { - "description": "An open file in the editor.", - "properties": { - "languageId": { - "description": "The language identifier.", + "cwd": { + "description": "The working directory for this session. Must be an absolute path.", "type": "string" }, - "lastFocusedMs": { - "description": "Timestamp in milliseconds since epoch of when the file was last focused.", - "format": "uint64", - "minimum": 0, + "additionalDirectories": { + "description": "Additional workspace roots reported for this session. Each path must be absolute.\n\nWhen present, this is the complete ordered additional-root list reported\nby the Agent. Omitted and empty values are equivalent: the response\nreports no additional roots.", + "type": "array", + "items": { + "type": "string" + } + }, + "title": { + "description": "Human-readable title for the session", "type": [ - "integer", + "string", "null" ], "x-deserialize-default-on-error": true }, - "uri": { - "description": "The URI of the file.", - "type": "string" - }, - "visibleRange": { - "anyOf": [ - { - "$ref": "#/$defs/Range" - }, - { - "type": "null" - } + "updatedAt": { + "description": "ISO 8601 timestamp of last activity", + "type": [ + "string", + "null" ], - "description": "The visible range in the editor, if any.", "x-deserialize-default-on-error": true + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ - "uri", - "languageId" - ], - "type": "object" + "sessionId", + "cwd" + ] }, - "NesOpenFilesCapabilities": { - "description": "Capabilities for open files context.", + "DeleteSessionResponse": { + "description": "Response from deleting a session.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" + "x-side": "agent", + "x-method": "session/delete" }, - "NesRecentFile": { - "description": "A recently accessed file.", + "ForkSessionResponse": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse from forking an existing session.", + "type": "object", "properties": { - "languageId": { - "description": "The language identifier.", - "type": "string" + "sessionId": { + "description": "Unique identifier for the newly created forked session.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ] }, - "text": { - "description": "The full text content of the file.", - "type": "string" + "modes": { + "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "anyOf": [ + { + "$ref": "#/$defs/SessionModeState" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true }, - "uri": { - "description": "The URI of the file.", - "type": "string" - } - }, - "required": [ - "uri", - "languageId", - "text" - ], - "type": "object" - }, - "NesRecentFilesCapabilities": { - "description": "Capabilities for recent files context.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "configOptions": { + "description": "Initial session configuration options if supported by the Agent.", "type": [ - "object", + "array", "null" - ] + ], + "items": { + "$ref": "#/$defs/SessionConfigOption" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, - "maxCount": { - "description": "Maximum number of recent files the agent can use.", - "format": "uint32", - "minimum": 0, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "integer", + "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" - }, - "NesRejectReason": { - "description": "The reason a suggestion was rejected.", - "oneOf": [ - { - "const": "rejected", - "description": "The user explicitly dismissed the suggestion.", - "type": "string" - }, - { - "const": "ignored", - "description": "The suggestion was shown but the user continued editing without interacting.", - "type": "string" - }, - { - "const": "replaced", - "description": "The suggestion was superseded by a newer suggestion.", - "type": "string" - }, - { - "const": "cancelled", - "description": "The request was cancelled before the agent returned a response.", - "type": "string" - } - ] + "required": [ + "sessionId" + ], + "x-side": "agent", + "x-method": "session/fork" }, - "NesRelatedSnippet": { - "description": "A related code snippet from a file.", + "ResumeSessionResponse": { + "description": "Response from resuming an existing session.", + "type": "object", "properties": { - "excerpts": { - "description": "The code excerpts.", + "modes": { + "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "anyOf": [ + { + "$ref": "#/$defs/SessionModeState" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "configOptions": { + "description": "Initial session configuration options if supported by the Agent.", + "type": [ + "array", + "null" + ], "items": { - "$ref": "#/$defs/NesExcerpt" + "$ref": "#/$defs/SessionConfigOption" }, - "type": "array" + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, - "uri": { - "description": "The URI of the file containing the snippets.", - "type": "string" + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, - "required": [ - "uri", - "excerpts" - ], - "type": "object" + "x-side": "agent", + "x-method": "session/resume" }, - "NesRelatedSnippetsCapabilities": { - "description": "Capabilities for related snippets context.", + "CloseSessionResponse": { + "description": "Response from closing a session.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" + "x-side": "agent", + "x-method": "session/close" }, - "NesRenameCapabilities": { - "description": "Marker for rename suggestion support.", + "SetSessionModeResponse": { + "description": "Response to `session/set_mode` method.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" + "x-side": "agent", + "x-method": "session/set_mode" }, - "NesRenameSuggestion": { - "description": "A rename symbol suggestion.", + "SetSessionConfigOptionResponse": { + "description": "Response to `session/set_config_option` method.", + "type": "object", "properties": { - "id": { - "description": "Unique identifier for accept/reject tracking.", - "type": "string" - }, - "newName": { - "description": "The new name for the symbol.", - "type": "string" + "configOptions": { + "description": "The full set of configuration options and their current values.", + "type": "array", + "items": { + "$ref": "#/$defs/SessionConfigOption" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, - "position": { - "allOf": [ - { - "$ref": "#/$defs/Position" - } + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The position of the symbol to rename." - }, - "uri": { - "description": "The file URI containing the symbol.", - "type": "string" + "additionalProperties": true } }, "required": [ - "id", - "uri", - "position", - "newName" + "configOptions" ], - "type": "object" + "x-side": "agent", + "x-method": "session/set_config_option" }, - "NesRepository": { - "description": "Repository metadata for an NES session.", + "PromptResponse": { + "description": "Response from processing a user prompt.\n\nSee protocol docs: [Check for Completion](https://agentclientprotocol.com/protocol/prompt-turn#4-check-for-completion)", + "type": "object", "properties": { - "name": { - "description": "The repository name.", - "type": "string" + "stopReason": { + "description": "Indicates why the agent stopped processing the turn.", + "allOf": [ + { + "$ref": "#/$defs/StopReason" + } + ] }, - "owner": { - "description": "The repository owner.", - "type": "string" + "usage": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nToken usage for this turn (optional).", + "anyOf": [ + { + "$ref": "#/$defs/Usage" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true }, - "remoteUrl": { - "description": "The remote URL of the repository.", - "type": "string" - } - }, - "required": [ - "name", - "owner", - "remoteUrl" - ], - "type": "object" - }, - "NesSearchAndReplaceCapabilities": { - "description": "Marker for search and replace suggestion support.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" + "required": [ + "stopReason" + ], + "x-side": "agent", + "x-method": "session/prompt" }, - "NesSearchAndReplaceSuggestion": { - "description": "A search-and-replace suggestion.", - "properties": { - "id": { - "description": "Unique identifier for accept/reject tracking.", - "type": "string" + "StopReason": { + "description": "Reasons why an agent stops processing a prompt turn.\n\nSee protocol docs: [Stop Reasons](https://agentclientprotocol.com/protocol/prompt-turn#stop-reasons)", + "oneOf": [ + { + "description": "The turn ended successfully.", + "type": "string", + "const": "end_turn" }, - "isRegex": { - "description": "Whether `search` is a regular expression. Defaults to `false`.", - "type": [ - "boolean", - "null" - ] + { + "description": "The turn ended because the agent reached the maximum number of tokens.", + "type": "string", + "const": "max_tokens" }, - "replace": { - "description": "The replacement text.", - "type": "string" + { + "description": "The turn ended because the agent reached the maximum number of allowed\nagent requests between user turns.", + "type": "string", + "const": "max_turn_requests" }, - "search": { - "description": "The text or pattern to find.", - "type": "string" + { + "description": "The turn ended because the agent refused to continue. The user prompt\nand everything that comes after it won't be included in the next\nprompt, so this should be reflected in the UI.", + "type": "string", + "const": "refusal" }, - "uri": { - "description": "The file URI to search within.", - "type": "string" + { + "description": "The turn was cancelled by the client via `session/cancel`.\n\nThis stop reason MUST be returned when the client sends a `session/cancel`\nnotification, even if the cancellation causes exceptions in underlying operations.\nAgents should catch these exceptions and return this semantically meaningful\nresponse to confirm successful cancellation.", + "type": "string", + "const": "cancelled" } - }, - "required": [ - "id", - "uri", - "search", - "replace" - ], - "type": "object" + ] }, - "NesSuggestContext": { - "description": "Context attached to a suggestion request.", + "Usage": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nToken usage information for a prompt turn.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + "totalTokens": { + "description": "Sum of all token types across session.", + "type": "integer", + "format": "uint64", + "minimum": 0 }, - "diagnostics": { - "description": "Current diagnostics (errors, warnings).", - "items": { - "$ref": "#/$defs/NesDiagnostic" - }, + "inputTokens": { + "description": "Total input tokens across all turns.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "outputTokens": { + "description": "Total output tokens across all turns.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "thoughtTokens": { + "description": "Total thought/reasoning tokens", "type": [ - "array", + "integer", "null" ], - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + "format": "uint64", + "minimum": 0 }, - "editHistory": { - "description": "Recent edit history.", - "items": { - "$ref": "#/$defs/NesEditHistoryEntry" - }, + "cachedReadTokens": { + "description": "Total cache read tokens.", "type": [ - "array", + "integer", "null" ], - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + "format": "uint64", + "minimum": 0 }, - "openFiles": { - "description": "Currently open files in the editor.", - "items": { - "$ref": "#/$defs/NesOpenFile" - }, + "cachedWriteTokens": { + "description": "Total cache write tokens.", "type": [ - "array", + "integer", "null" ], - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + "format": "uint64", + "minimum": 0 }, - "recentFiles": { - "description": "Recently accessed files.", - "items": { - "$ref": "#/$defs/NesRecentFile" - }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "array", + "object", "null" ], - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + "additionalProperties": true + } + }, + "required": [ + "totalTokens", + "inputTokens", + "outputTokens" + ] + }, + "StartNesResponse": { + "description": "Response to `nes/start`.", + "type": "object", + "properties": { + "sessionId": { + "description": "The session ID for the newly started NES session.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ] }, - "relatedSnippets": { - "description": "Related code snippets.", - "items": { - "$ref": "#/$defs/NesRelatedSnippet" - }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "array", + "object", "null" ], + "additionalProperties": true + } + }, + "required": [ + "sessionId" + ], + "x-side": "agent", + "x-method": "nes/start" + }, + "SuggestNesResponse": { + "description": "Response to `nes/suggest`.", + "type": "object", + "properties": { + "suggestions": { + "description": "The list of suggestions.", + "type": "array", + "items": { + "$ref": "#/$defs/NesSuggestion" + }, "x-deserialize-default-on-error": true, "x-deserialize-skip-invalid-items": true }, - "userActions": { - "description": "Recent user actions (typing, navigation, etc.).", - "items": { - "$ref": "#/$defs/NesUserAction" - }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "array", + "object", "null" ], - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + "additionalProperties": true } }, - "type": "object" + "required": [ + "suggestions" + ], + "x-side": "agent", + "x-method": "nes/suggest" }, "NesSuggestion": { "description": "A suggestion returned by the agent.", - "discriminator": { - "propertyName": "kind" - }, "oneOf": [ { - "allOf": [ - { - "$ref": "#/$defs/NesEditSuggestion" - } - ], "description": "A text edit suggestion.", + "type": "object", "properties": { "kind": { - "const": "edit", - "type": "string" + "type": "string", + "const": "edit" } }, "required": [ "kind" ], - "type": "object" - }, - { "allOf": [ { - "$ref": "#/$defs/NesJumpSuggestion" + "$ref": "#/$defs/NesEditSuggestion" } - ], + ] + }, + { "description": "A jump-to-location suggestion.", + "type": "object", "properties": { "kind": { - "const": "jump", - "type": "string" + "type": "string", + "const": "jump" } }, "required": [ "kind" ], - "type": "object" - }, - { "allOf": [ { - "$ref": "#/$defs/NesRenameSuggestion" + "$ref": "#/$defs/NesJumpSuggestion" } - ], + ] + }, + { "description": "A rename symbol suggestion.", + "type": "object", "properties": { "kind": { - "const": "rename", - "type": "string" + "type": "string", + "const": "rename" } }, "required": [ "kind" ], - "type": "object" - }, - { "allOf": [ { - "$ref": "#/$defs/NesSearchAndReplaceSuggestion" + "$ref": "#/$defs/NesRenameSuggestion" } - ], + ] + }, + { "description": "A search-and-replace suggestion.", + "type": "object", "properties": { "kind": { - "const": "searchAndReplace", - "type": "string" + "type": "string", + "const": "searchAndReplace" } }, "required": [ "kind" ], - "type": "object" + "allOf": [ + { + "$ref": "#/$defs/NesSearchAndReplaceSuggestion" + } + ] } - ] + ], + "discriminator": { + "propertyName": "kind" + } }, "NesTextEdit": { "description": "A text edit within a suggestion.", + "type": "object", "properties": { - "newText": { - "description": "The replacement text.", - "type": "string" - }, "range": { + "description": "The range to replace.", "allOf": [ { "$ref": "#/$defs/Range" } + ] + }, + "newText": { + "description": "The replacement text.", + "type": "string" + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The range to replace." + "additionalProperties": true } }, "required": [ "range", "newText" - ], - "type": "object" + ] }, - "NesTriggerKind": { - "description": "What triggered the suggestion request.", - "oneOf": [ - { - "const": "automatic", - "description": "Triggered by user typing or cursor movement.", + "Range": { + "description": "A range in a text document, expressed as start and end positions.", + "type": "object", + "properties": { + "start": { + "description": "The start position (inclusive).", + "allOf": [ + { + "$ref": "#/$defs/Position" + } + ] + }, + "end": { + "description": "The end position (exclusive).", + "allOf": [ + { + "$ref": "#/$defs/Position" + } + ] + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + }, + "required": [ + "start", + "end" + ] + }, + "Position": { + "description": "A zero-based position in a text document.\n\nThe meaning of `character` depends on the negotiated position encoding.", + "type": "object", + "properties": { + "line": { + "description": "Zero-based line number.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "character": { + "description": "Zero-based character offset (encoding-dependent).", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + }, + "required": [ + "line", + "character" + ] + }, + "NesEditSuggestion": { + "description": "A text edit suggestion.", + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for accept/reject tracking.", "type": "string" }, - { - "const": "diagnostic", - "description": "Triggered by a diagnostic appearing at or near the cursor.", + "uri": { + "description": "The URI of the file to edit.", "type": "string" }, - { - "const": "manual", - "description": "Triggered by an explicit user action (keyboard shortcut).", + "edits": { + "description": "The text edits to apply.", + "type": "array", + "items": { + "$ref": "#/$defs/NesTextEdit" + } + }, + "cursorPosition": { + "description": "Optional suggested cursor position after applying edits.", + "anyOf": [ + { + "$ref": "#/$defs/Position" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + }, + "required": [ + "id", + "uri", + "edits" + ] + }, + "NesJumpSuggestion": { + "description": "A jump-to-location suggestion.", + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for accept/reject tracking.", + "type": "string" + }, + "uri": { + "description": "The file to navigate to.", "type": "string" + }, + "position": { + "description": "The target position within the file.", + "allOf": [ + { + "$ref": "#/$defs/Position" + } + ] + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } + }, + "required": [ + "id", + "uri", + "position" ] }, - "NesUserAction": { - "description": "A user action (typing, cursor movement, etc.).", + "NesRenameSuggestion": { + "description": "A rename symbol suggestion.", + "type": "object", "properties": { - "action": { - "description": "The kind of action (e.g., \"insertChar\", \"cursorMovement\").", + "id": { + "description": "Unique identifier for accept/reject tracking.", + "type": "string" + }, + "uri": { + "description": "The file URI containing the symbol.", "type": "string" }, "position": { + "description": "The position of the symbol to rename.", "allOf": [ { "$ref": "#/$defs/Position" } - ], - "description": "The position where the action occurred." - }, - "timestampMs": { - "description": "Timestamp in milliseconds since epoch.", - "format": "uint64", - "minimum": 0, - "type": "integer" + ] }, - "uri": { - "description": "The URI of the file where the action occurred.", + "newName": { + "description": "The new name for the symbol.", "type": "string" + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ - "action", + "id", "uri", "position", - "timestampMs" - ], - "type": "object" + "newName" + ] }, - "NesUserActionsCapabilities": { - "description": "Capabilities for user actions context.", + "NesSearchAndReplaceSuggestion": { + "description": "A search-and-replace suggestion.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "id": { + "description": "Unique identifier for accept/reject tracking.", + "type": "string" + }, + "uri": { + "description": "The file URI to search within.", + "type": "string" + }, + "search": { + "description": "The text or pattern to find.", + "type": "string" + }, + "replace": { + "description": "The replacement text.", + "type": "string" + }, + "isRegex": { + "description": "Whether `search` is a regular expression. Defaults to `false`.", "type": [ - "object", + "boolean", "null" ] }, - "maxCount": { - "description": "Maximum number of user actions the agent can use.", - "format": "uint32", - "minimum": 0, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "integer", + "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" + "required": [ + "id", + "uri", + "search", + "replace" + ] }, - "NewSessionRequest": { - "description": "Request parameters for creating a new session.\n\nSee protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)", + "CloseNesResponse": { + "description": "Response from closing an NES session.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" + ], + "additionalProperties": true + } + }, + "x-side": "agent", + "x-method": "nes/close" + }, + "ExtResponse": { + "description": "Allows for sending an arbitrary response to an [`ExtRequest`] that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" + }, + "MessageMcpResponse": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `mcp/message`.\n\nThis is the inner MCP response result payload. Any JSON value is valid.", + "x-side": "both", + "x-method": "mcp/message" + }, + "Error": { + "description": "JSON-RPC error object.\n\nRepresents an error that occurred during method execution, following the\nJSON-RPC 2.0 error object specification with optional additional data.\n\nSee protocol docs: [JSON-RPC Error Object](https://www.jsonrpc.org/specification#error_object)", + "type": "object", + "properties": { + "code": { + "description": "A number indicating the error type that occurred.\nThis must be an integer as defined in the JSON-RPC specification.", + "allOf": [ + { + "$ref": "#/$defs/ErrorCode" + } ] }, - "additionalDirectories": { - "description": "Additional workspace roots for this session. Each path must be absolute.\n\nThese expand the session's filesystem scope without changing `cwd`, which\nremains the base for relative paths. When omitted or empty, no\nadditional roots are activated for the new session.", - "items": { - "type": "string" - }, - "type": "array" - }, - "cwd": { - "description": "The working directory for this session. Must be an absolute path.", + "message": { + "description": "A string providing a short description of the error.\nThe message should be limited to a concise single sentence.", "type": "string" }, - "mcpServers": { - "description": "List of MCP (Model Context Protocol) servers the agent should connect to.", - "items": { - "$ref": "#/$defs/McpServer" - }, - "type": "array" + "data": { + "description": "Optional primitive or structured value that contains additional information about the error.\nThis may include debugging information or context-specific details." } }, "required": [ - "cwd", - "mcpServers" - ], - "type": "object", - "x-method": "session/new", - "x-side": "agent" + "code", + "message" + ] }, - "NewSessionResponse": { - "description": "Response from creating a new session.\n\nSee protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + "ErrorCode": { + "description": "Predefined error codes for common JSON-RPC and ACP-specific errors.\n\nThese codes follow the JSON-RPC 2.0 specification for standard errors\nand use the reserved range (-32000 to -32099) for protocol-specific errors.", + "anyOf": [ + { + "title": "Parse error", + "description": "**Parse error**: Invalid JSON was received by the server.\nAn error occurred on the server while parsing the JSON text.", + "type": "integer", + "format": "int32", + "const": -32700 }, - "configOptions": { - "description": "Initial session configuration options if supported by the Agent.", - "items": { - "$ref": "#/$defs/SessionConfigOption" - }, - "type": [ - "array", - "null" - ], - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + { + "title": "Invalid request", + "description": "**Invalid request**: The JSON sent is not a valid Request object.", + "type": "integer", + "format": "int32", + "const": -32600 }, - "modes": { + { + "title": "Method not found", + "description": "**Method not found**: The method does not exist or is not available.", + "type": "integer", + "format": "int32", + "const": -32601 + }, + { + "title": "Invalid params", + "description": "**Invalid params**: Invalid method parameter(s).", + "type": "integer", + "format": "int32", + "const": -32602 + }, + { + "title": "Internal error", + "description": "**Internal error**: Internal JSON-RPC error.\nReserved for implementation-defined server errors.", + "type": "integer", + "format": "int32", + "const": -32603 + }, + { + "title": "Request cancelled", + "description": "**Request cancelled**: **UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nExecution of the method was aborted either due to a cancellation request from the caller or\nbecause of resource constraints or shutdown.", + "type": "integer", + "format": "int32", + "const": -32800 + }, + { + "title": "Authentication required", + "description": "**Authentication required**: Authentication is required before this operation can be performed.", + "type": "integer", + "format": "int32", + "const": -32000 + }, + { + "title": "Resource not found", + "description": "**Resource not found**: A given resource, such as a file, was not found.", + "type": "integer", + "format": "int32", + "const": -32002 + }, + { + "title": "URL elicitation required", + "description": "**URL elicitation required**: **UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe agent requires user input via a URL-based elicitation before it can proceed.", + "type": "integer", + "format": "int32", + "const": -32042 + }, + { + "title": "Other", + "description": "Other undefined error code.", + "type": "integer", + "format": "int32" + } + ] + }, + "AgentNotification": { + "description": "A JSON-RPC notification object.", + "type": "object", + "properties": { + "method": { + "description": "The notification method name.", + "type": "string" + }, + "params": { + "description": "Method-specific notification parameters.", "anyOf": [ { - "$ref": "#/$defs/SessionModeState" + "description": "All possible notifications that an agent can send to a client.\n\nThis enum is used internally for routing RPC notifications. You typically won't need\nto use this directly.\n\nNotifications do not expect a response.", + "anyOf": [ + { + "title": "SessionNotification", + "description": "Handles session update notifications from the agent.\n\nThis is a notification endpoint (no response expected) that receives\nreal-time updates about session progress, including message chunks,\ntool calls, and execution plans.\n\nNote: Clients SHOULD continue accepting tool call updates even after\nsending a `session/cancel` notification, as the agent may send final\nupdates before responding with the cancelled stop reason.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", + "allOf": [ + { + "$ref": "#/$defs/SessionNotification" + } + ] + }, + { + "title": "CompleteElicitationNotification", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNotification that a URL-based elicitation has completed.", + "allOf": [ + { + "$ref": "#/$defs/CompleteElicitationNotification" + } + ] + }, + { + "title": "MessageMcpNotification", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nReceives an MCP-over-ACP notification.", + "allOf": [ + { + "$ref": "#/$defs/MessageMcpNotification" + } + ] + }, + { + "title": "ExtNotification", + "description": "Handles extension notifications from the agent.\n\nAllows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "allOf": [ + { + "$ref": "#/$defs/ExtNotification" + } + ] + } + ] }, { "type": "null" } - ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", - "x-deserialize-default-on-error": true - }, + ] + } + }, + "required": [ + "method" + ], + "x-docs-ignore": true + }, + "SessionNotification": { + "description": "Notification containing a session update from the agent.\n\nUsed to stream real-time progress and results during prompt processing.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", + "type": "object", + "properties": { "sessionId": { + "description": "The ID of the session this update pertains to.", "allOf": [ { "$ref": "#/$defs/SessionId" } + ] + }, + "update": { + "description": "The actual update content.", + "allOf": [ + { + "$ref": "#/$defs/SessionUpdate" + } + ] + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "Unique identifier for the created session.\n\nUsed in all subsequent requests for this conversation." + "additionalProperties": true } }, "required": [ - "sessionId" + "sessionId", + "update" ], - "type": "object", - "x-method": "session/new", - "x-side": "agent" + "x-side": "client", + "x-method": "session/update" }, - "NumberPropertySchema": { - "description": "Schema for number (floating-point) properties in an elicitation form.", - "properties": { - "default": { - "description": "Default value.", - "format": "double", - "type": [ - "number", - "null" + "SessionUpdate": { + "description": "Different types of updates that can be sent during session processing.\n\nThese updates provide real-time feedback about the agent's progress.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", + "oneOf": [ + { + "description": "A chunk of the user's message being streamed.", + "type": "object", + "properties": { + "sessionUpdate": { + "type": "string", + "const": "user_message_chunk" + } + }, + "required": [ + "sessionUpdate" + ], + "allOf": [ + { + "$ref": "#/$defs/ContentChunk" + } ] }, - "description": { - "description": "Human-readable description.", - "type": [ - "string", - "null" + { + "description": "A chunk of the agent's response being streamed.", + "type": "object", + "properties": { + "sessionUpdate": { + "type": "string", + "const": "agent_message_chunk" + } + }, + "required": [ + "sessionUpdate" + ], + "allOf": [ + { + "$ref": "#/$defs/ContentChunk" + } ] }, - "maximum": { - "description": "Maximum value (inclusive).", - "format": "double", - "type": [ - "number", - "null" + { + "description": "A chunk of the agent's internal reasoning being streamed.", + "type": "object", + "properties": { + "sessionUpdate": { + "type": "string", + "const": "agent_thought_chunk" + } + }, + "required": [ + "sessionUpdate" + ], + "allOf": [ + { + "$ref": "#/$defs/ContentChunk" + } ] }, - "minimum": { - "description": "Minimum value (inclusive).", - "format": "double", - "type": [ - "number", - "null" + { + "description": "Notification that a new tool call has been initiated.", + "type": "object", + "properties": { + "sessionUpdate": { + "type": "string", + "const": "tool_call" + } + }, + "required": [ + "sessionUpdate" + ], + "allOf": [ + { + "$ref": "#/$defs/ToolCall" + } ] }, - "title": { - "description": "Optional title for the property.", - "type": [ - "string", - "null" + { + "description": "Update on the status or results of a tool call.", + "type": "object", + "properties": { + "sessionUpdate": { + "type": "string", + "const": "tool_call_update" + } + }, + "required": [ + "sessionUpdate" + ], + "allOf": [ + { + "$ref": "#/$defs/ToolCallUpdate" + } ] - } - }, - "type": "object" - }, - "PermissionOption": { - "description": "An option presented to the user when requesting permission.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + }, + { + "description": "The agent's execution plan for complex tasks.\nSee protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan)", + "type": "object", + "properties": { + "sessionUpdate": { + "type": "string", + "const": "plan" + } + }, + "required": [ + "sessionUpdate" + ], + "allOf": [ + { + "$ref": "#/$defs/Plan" + } ] }, - "kind": { + { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA content update for a plan identified by ID.", + "type": "object", + "properties": { + "sessionUpdate": { + "type": "string", + "const": "plan_update" + } + }, + "required": [ + "sessionUpdate" + ], "allOf": [ { - "$ref": "#/$defs/PermissionOptionKind" + "$ref": "#/$defs/PlanUpdate" } + ] + }, + { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRemoval notice for a plan identified by ID.", + "type": "object", + "properties": { + "sessionUpdate": { + "type": "string", + "const": "plan_removed" + } + }, + "required": [ + "sessionUpdate" ], - "description": "Hint about the nature of this permission option." + "allOf": [ + { + "$ref": "#/$defs/PlanRemoved" + } + ] }, - "name": { - "description": "Human-readable label to display to the user.", - "type": "string" + { + "description": "Available commands are ready or have changed", + "type": "object", + "properties": { + "sessionUpdate": { + "type": "string", + "const": "available_commands_update" + } + }, + "required": [ + "sessionUpdate" + ], + "allOf": [ + { + "$ref": "#/$defs/AvailableCommandsUpdate" + } + ] }, - "optionId": { + { + "description": "The current mode of the session has changed\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "type": "object", + "properties": { + "sessionUpdate": { + "type": "string", + "const": "current_mode_update" + } + }, + "required": [ + "sessionUpdate" + ], "allOf": [ { - "$ref": "#/$defs/PermissionOptionId" + "$ref": "#/$defs/CurrentModeUpdate" + } + ] + }, + { + "description": "Session configuration options have been updated.", + "type": "object", + "properties": { + "sessionUpdate": { + "type": "string", + "const": "config_option_update" + } + }, + "required": [ + "sessionUpdate" + ], + "allOf": [ + { + "$ref": "#/$defs/ConfigOptionUpdate" + } + ] + }, + { + "description": "Session metadata has been updated (title, timestamps, custom metadata)", + "type": "object", + "properties": { + "sessionUpdate": { + "type": "string", + "const": "session_info_update" + } + }, + "required": [ + "sessionUpdate" + ], + "allOf": [ + { + "$ref": "#/$defs/SessionInfoUpdate" + } + ] + }, + { + "description": "Context window and cost update for the session.", + "type": "object", + "properties": { + "sessionUpdate": { + "type": "string", + "const": "usage_update" } + }, + "required": [ + "sessionUpdate" ], - "description": "Unique identifier for this permission option." + "allOf": [ + { + "$ref": "#/$defs/UsageUpdate" + } + ] } - }, - "required": [ - "optionId", - "name", - "kind" ], - "type": "object" + "discriminator": { + "propertyName": "sessionUpdate" + } }, - "PermissionOptionId": { - "description": "Unique identifier for a permission option.", + "MessageId": { + "description": "Unique identifier for a message within a session.", "type": "string" }, - "PermissionOptionKind": { - "description": "The type of permission option being presented to the user.\n\nHelps clients choose appropriate icons and UI treatment.", - "oneOf": [ - { - "const": "allow_once", - "description": "Allow this operation only this time.", - "type": "string" - }, - { - "const": "allow_always", - "description": "Allow this operation and remember the choice.", - "type": "string" - }, - { - "const": "reject_once", - "description": "Reject this operation only this time.", - "type": "string" - }, - { - "const": "reject_always", - "description": "Reject this operation and remember the choice.", - "type": "string" - } - ] - }, - "Plan": { - "description": "An execution plan for accomplishing complex tasks.\n\nPlans consist of multiple entries representing individual tasks or goals.\nAgents report plans to clients to provide visibility into their execution strategy.\nPlans can evolve during execution as the agent discovers new requirements or completes tasks.\n\nSee protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan)", + "ContentChunk": { + "description": "A streamed item of content", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "content": { + "description": "A single item of content", + "allOf": [ + { + "$ref": "#/$defs/ContentBlock" + } + ] + }, + "messageId": { + "description": "A unique identifier for the message this chunk belongs to.\n\nAll chunks belonging to the same message share the same `messageId`.\nA change in `messageId` indicates a new message has started.", + "anyOf": [ + { + "$ref": "#/$defs/MessageId" + }, + { + "type": "null" + } ] }, - "entries": { - "description": "The list of tasks to be accomplished.\n\nWhen updating a plan, the agent must send a complete list of all entries\nwith their current status. The client replaces the entire plan with each update.", - "items": { - "$ref": "#/$defs/PlanEntry" - }, - "type": "array", - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true - } - }, - "required": [ - "entries" - ], - "type": "object" - }, - "PlanCapabilities": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for receiving `plan_update` and `plan_removed` session updates.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" + "required": [ + "content" + ] }, - "PlanEntry": { - "description": "A single entry in the execution plan.\n\nRepresents a task or goal that the assistant intends to accomplish\nas part of fulfilling the user's request.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", + "ToolCall": { + "description": "Represents a tool call that the language model has requested.\n\nTool calls are actions that the agent executes on behalf of the language model,\nsuch as reading files, executing code, or fetching data from external sources.\n\nSee protocol docs: [Tool Calls](https://agentclientprotocol.com/protocol/tool-calls)", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "toolCallId": { + "description": "Unique identifier for this tool call within the session.", + "allOf": [ + { + "$ref": "#/$defs/ToolCallId" + } ] }, - "content": { - "description": "Human-readable description of what this task aims to accomplish.", + "title": { + "description": "Human-readable title describing what the tool is doing.", "type": "string" }, - "priority": { + "kind": { + "description": "The category of tool being invoked.\nHelps clients choose appropriate icons and UI treatment.", "allOf": [ { - "$ref": "#/$defs/PlanEntryPriority" + "$ref": "#/$defs/ToolKind" } - ], - "description": "The relative importance of this task.\nUsed to indicate which tasks are most critical to the overall goal." + ] }, "status": { + "description": "Current execution status of the tool call.", "allOf": [ { - "$ref": "#/$defs/PlanEntryStatus" + "$ref": "#/$defs/ToolCallStatus" } - ], - "description": "Current execution status of this task." - } - }, - "required": [ - "content", - "priority", - "status" - ], - "type": "object" - }, - "PlanEntryPriority": { - "description": "Priority levels for plan entries.\n\nUsed to indicate the relative importance or urgency of different\ntasks in the execution plan.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", - "oneOf": [ - { - "const": "high", - "description": "High priority task - critical to the overall goal.", - "type": "string" - }, - { - "const": "medium", - "description": "Medium priority task - important but not critical.", - "type": "string" + ] }, - { - "const": "low", - "description": "Low priority task - nice to have but not essential.", - "type": "string" - } - ] - }, - "PlanEntryStatus": { - "description": "Status of a plan entry in the execution flow.\n\nTracks the lifecycle of each task from planning through completion.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", - "oneOf": [ - { - "const": "pending", - "description": "The task has not started yet.", - "type": "string" + "content": { + "description": "Content produced by the tool call.", + "type": "array", + "items": { + "$ref": "#/$defs/ToolCallContent" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, - { - "const": "in_progress", - "description": "The task is currently being worked on.", - "type": "string" + "locations": { + "description": "File locations affected by this tool call.\nEnables \"follow-along\" features in clients.", + "type": "array", + "items": { + "$ref": "#/$defs/ToolCallLocation" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, - { - "const": "completed", - "description": "The task has been successfully completed.", - "type": "string" - } - ] - }, - "PlanFile": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA plan represented by a file URI.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + "rawInput": { + "description": "Raw input parameters sent to the tool." }, - "id": { - "allOf": [ - { - "$ref": "#/$defs/PlanId" - } - ], - "description": "The plan ID to update." + "rawOutput": { + "description": "Raw output returned by the tool." }, - "uri": { - "description": "The URI of the file containing the plan.", - "type": "string" - } - }, - "required": [ - "id", - "uri" - ], - "type": "object" - }, - "PlanId": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for a plan within a session.", - "type": "string" - }, - "PlanItems": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA plan represented as structured entries.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "entries": { - "description": "The list of tasks to be accomplished.\n\nWhen updating an item-based plan, the agent must send a complete list of all entries\nwith their current status. The client replaces that plan with each update.", - "items": { - "$ref": "#/$defs/PlanEntry" - }, - "type": "array", - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true - }, - "id": { - "allOf": [ - { - "$ref": "#/$defs/PlanId" - } ], - "description": "The plan ID to update." + "additionalProperties": true } }, "required": [ - "id", - "entries" - ], - "type": "object" + "toolCallId", + "title" + ] }, - "PlanMarkdown": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA plan represented as raw markdown content.", + "PlanEntry": { + "description": "A single entry in the execution plan.\n\nRepresents a task or goal that the assistant intends to accomplish\nas part of fulfilling the user's request.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, "content": { - "description": "Markdown content for the plan.", + "description": "Human-readable description of what this task aims to accomplish.", "type": "string" }, - "id": { + "priority": { + "description": "The relative importance of this task.\nUsed to indicate which tasks are most critical to the overall goal.", "allOf": [ { - "$ref": "#/$defs/PlanId" + "$ref": "#/$defs/PlanEntryPriority" } - ], - "description": "The plan ID to update." - } - }, - "required": [ - "id", - "content" - ], - "type": "object" - }, - "PlanRemoved": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRemoval notice for a plan identified by ID.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" ] }, - "id": { + "status": { + "description": "Current execution status of this task.", "allOf": [ { - "$ref": "#/$defs/PlanId" + "$ref": "#/$defs/PlanEntryStatus" } + ] + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The plan ID to remove." + "additionalProperties": true } }, "required": [ - "id" - ], - "type": "object" + "content", + "priority", + "status" + ] }, - "PlanUpdate": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA content update for a plan identified by ID.", + "PlanEntryPriority": { + "description": "Priority levels for plan entries.\n\nUsed to indicate the relative importance or urgency of different\ntasks in the execution plan.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", + "oneOf": [ + { + "description": "High priority task - critical to the overall goal.", + "type": "string", + "const": "high" + }, + { + "description": "Medium priority task - important but not critical.", + "type": "string", + "const": "medium" + }, + { + "description": "Low priority task - nice to have but not essential.", + "type": "string", + "const": "low" + } + ] + }, + "PlanEntryStatus": { + "description": "Status of a plan entry in the execution flow.\n\nTracks the lifecycle of each task from planning through completion.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", + "oneOf": [ + { + "description": "The task has not started yet.", + "type": "string", + "const": "pending" + }, + { + "description": "The task is currently being worked on.", + "type": "string", + "const": "in_progress" + }, + { + "description": "The task has been successfully completed.", + "type": "string", + "const": "completed" + } + ] + }, + "Plan": { + "description": "An execution plan for accomplishing complex tasks.\n\nPlans consist of multiple entries representing individual tasks or goals.\nAgents report plans to clients to provide visibility into their execution strategy.\nPlans can evolve during execution as the agent discovers new requirements or completes tasks.\n\nSee protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan)", + "type": "object", "properties": { + "entries": { + "description": "The list of tasks to be accomplished.\n\nWhen updating a plan, the agent must send a complete list of all entries\nwith their current status. The client replaces the entire plan with each update.", + "type": "array", + "items": { + "$ref": "#/$defs/PlanEntry" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "plan": { - "allOf": [ - { - "$ref": "#/$defs/PlanUpdateContent" - } ], - "description": "The updated plan content." + "additionalProperties": true } }, "required": [ - "plan" - ], - "type": "object" + "entries" + ] }, "PlanUpdateContent": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUpdated content for a plan.", - "discriminator": { - "propertyName": "type" - }, "oneOf": [ { - "allOf": [ - { - "$ref": "#/$defs/PlanItems" - } - ], "description": "Structured plan entries.", + "type": "object", "properties": { "type": { - "const": "items", - "type": "string" + "type": "string", + "const": "items" } }, "required": [ "type" ], - "type": "object" - }, - { "allOf": [ { - "$ref": "#/$defs/PlanFile" + "$ref": "#/$defs/PlanItems" } - ], + ] + }, + { "description": "A URI pointing to a file containing the plan.", + "type": "object", "properties": { "type": { - "const": "file", - "type": "string" + "type": "string", + "const": "file" } }, "required": [ "type" ], - "type": "object" - }, - { "allOf": [ { - "$ref": "#/$defs/PlanMarkdown" + "$ref": "#/$defs/PlanFile" } - ], + ] + }, + { "description": "Raw markdown content for the plan.", + "type": "object", "properties": { "type": { - "const": "markdown", - "type": "string" + "type": "string", + "const": "markdown" } }, "required": [ "type" ], - "type": "object" + "allOf": [ + { + "$ref": "#/$defs/PlanMarkdown" + } + ] } - ] + ], + "discriminator": { + "propertyName": "type" + } }, - "Position": { - "description": "A zero-based position in a text document.\n\nThe meaning of `character` depends on the negotiated position encoding.", + "PlanId": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for a plan within a session.", + "type": "string" + }, + "PlanItems": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA plan represented as structured entries.", + "type": "object", "properties": { - "character": { - "description": "Zero-based character offset (encoding-dependent).", - "format": "uint32", - "minimum": 0, - "type": "integer" + "id": { + "description": "The plan ID to update.", + "allOf": [ + { + "$ref": "#/$defs/PlanId" + } + ] }, - "line": { - "description": "Zero-based line number.", - "format": "uint32", - "minimum": 0, - "type": "integer" + "entries": { + "description": "The list of tasks to be accomplished.\n\nWhen updating an item-based plan, the agent must send a complete list of all entries\nwith their current status. The client replaces that plan with each update.", + "type": "array", + "items": { + "$ref": "#/$defs/PlanEntry" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ - "line", - "character" - ], - "type": "object" + "id", + "entries" + ] }, - "PositionEncodingKind": { - "description": "The encoding used for character offsets in positions.\n\nFollows the same conventions as LSP 3.17. The default is UTF-16.", - "oneOf": [ - { - "const": "utf-16", - "description": "Character offsets count UTF-16 code units. This is the default.", - "type": "string" + "PlanFile": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA plan represented by a file URI.", + "type": "object", + "properties": { + "id": { + "description": "The plan ID to update.", + "allOf": [ + { + "$ref": "#/$defs/PlanId" + } + ] }, - { - "const": "utf-32", - "description": "Character offsets count Unicode code points.", + "uri": { + "description": "The URI of the file containing the plan.", "type": "string" }, - { - "const": "utf-8", - "description": "Character offsets count UTF-8 code units (bytes).", - "type": "string" + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } + }, + "required": [ + "id", + "uri" ] }, - "PromptCapabilities": { - "description": "Prompt capabilities supported by the agent in `session/prompt` requests.\n\nBaseline agent functionality requires support for [`ContentBlock::Text`]\nand [`ContentBlock::ResourceLink`] in prompt requests.\n\nOther variants must be explicitly opted in to.\nCapabilities for different types of content in prompt requests.\n\nIndicates which content types beyond the baseline (text and resource links)\nthe agent can process.\n\nSee protocol docs: [Prompt Capabilities](https://agentclientprotocol.com/protocol/initialization#prompt-capabilities)", + "PlanMarkdown": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA plan represented as raw markdown content.", + "type": "object", "properties": { + "id": { + "description": "The plan ID to update.", + "allOf": [ + { + "$ref": "#/$defs/PlanId" + } + ] + }, + "content": { + "description": "Markdown content for the plan.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "audio": { - "default": false, - "description": "Agent supports [`ContentBlock::Audio`].", - "type": "boolean" - }, - "embeddedContext": { - "default": false, - "description": "Agent supports embedded context in `session/prompt` requests.\n\nWhen enabled, the Client is allowed to include [`ContentBlock::Resource`]\nin prompt requests for pieces of context that are referenced in the message.", - "type": "boolean" - }, - "image": { - "default": false, - "description": "Agent supports [`ContentBlock::Image`].", - "type": "boolean" + ], + "additionalProperties": true } }, - "type": "object" + "required": [ + "id", + "content" + ] }, - "PromptRequest": { - "description": "Request parameters for sending a user prompt to the agent.\n\nContains the user's message and any additional context.\n\nSee protocol docs: [User Message](https://agentclientprotocol.com/protocol/prompt-turn#1-user-message)", + "PlanUpdate": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA content update for a plan identified by ID.", + "type": "object", "properties": { + "plan": { + "description": "The updated plan content.", + "allOf": [ + { + "$ref": "#/$defs/PlanUpdateContent" + } + ] + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "prompt": { - "description": "The blocks of content that compose the user's message.\n\nAs a baseline, the Agent MUST support [`ContentBlock::Text`] and [`ContentBlock::ResourceLink`],\nwhile other variants are optionally enabled via [`PromptCapabilities`].\n\nThe Client MUST adapt its interface according to [`PromptCapabilities`].\n\nThe client MAY include referenced pieces of context as either\n[`ContentBlock::Resource`] or [`ContentBlock::ResourceLink`].\n\nWhen available, [`ContentBlock::Resource`] is preferred\nas it avoids extra round-trips and allows the message to include\npieces of context from sources the agent may not have access to.", - "items": { - "$ref": "#/$defs/ContentBlock" - }, - "type": "array" - }, - "sessionId": { + ], + "additionalProperties": true + } + }, + "required": [ + "plan" + ] + }, + "PlanRemoved": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRemoval notice for a plan identified by ID.", + "type": "object", + "properties": { + "id": { + "description": "The plan ID to remove.", "allOf": [ { - "$ref": "#/$defs/SessionId" + "$ref": "#/$defs/PlanId" } + ] + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The ID of the session to send this user message to" + "additionalProperties": true } }, "required": [ - "sessionId", - "prompt" - ], - "type": "object", - "x-method": "session/prompt", - "x-side": "agent" + "id" + ] }, - "PromptResponse": { - "description": "Response from processing a user prompt.\n\nSee protocol docs: [Check for Completion](https://agentclientprotocol.com/protocol/prompt-turn#4-check-for-completion)", + "AvailableCommand": { + "description": "Information about a command.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + "name": { + "description": "Command name (e.g., `create_plan`, `research_codebase`).", + "type": "string" }, - "stopReason": { - "allOf": [ - { - "$ref": "#/$defs/StopReason" - } - ], - "description": "Indicates why the agent stopped processing the turn." + "description": { + "description": "Human-readable description of what the command does.", + "type": "string" }, - "usage": { + "input": { + "description": "Input for the command if required", "anyOf": [ { - "$ref": "#/$defs/Usage" + "$ref": "#/$defs/AvailableCommandInput" }, { "type": "null" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nToken usage for this turn (optional).", "x-deserialize-default-on-error": true + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ - "stopReason" - ], - "type": "object", - "x-method": "session/prompt", - "x-side": "agent" - }, - "ProtocolVersion": { - "description": "Protocol version identifier.\n\nThis version is only bumped for breaking changes.\nNon-breaking changes should be introduced via capabilities.", - "format": "uint16", - "maximum": 65535, - "minimum": 0, - "type": "integer" + "name", + "description" + ] }, - "ProviderCurrentConfig": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCurrent effective non-secret routing configuration for a provider.", - "properties": { - "apiType": { + "AvailableCommandInput": { + "description": "The input specification for a command.", + "anyOf": [ + { + "title": "unstructured", + "description": "All text that was typed after the command name is provided as input.", "allOf": [ { - "$ref": "#/$defs/LlmProtocol" + "$ref": "#/$defs/UnstructuredCommandInput" } - ], - "description": "Protocol currently used by this provider." - }, - "baseUrl": { - "description": "Base URL currently used by this provider.", - "type": "string" + ] } - }, - "required": [ - "apiType", - "baseUrl" - ], - "type": "object" + ] }, - "ProviderInfo": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInformation about a configurable LLM provider.", + "UnstructuredCommandInput": { + "description": "All text that was typed after the command name is provided as input.", + "type": "object", "properties": { + "hint": { + "description": "A hint to display when the input hasn't been provided yet", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "current": { - "anyOf": [ - { - "$ref": "#/$defs/ProviderCurrentConfig" - }, - { - "type": "null" - } ], - "description": "Current effective non-secret routing config.\nNull or omitted means provider is disabled." - }, - "id": { - "description": "Provider identifier, for example \"main\" or \"openai\".", - "type": "string" - }, - "required": { - "description": "Whether this provider is mandatory and cannot be disabled via `providers/disable`.\nIf true, clients must not call `providers/disable` for this id.", - "type": "boolean" - }, - "supported": { - "description": "Supported protocol types for this provider.", - "items": { - "$ref": "#/$defs/LlmProtocol" - }, - "type": "array", - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + "additionalProperties": true } }, "required": [ - "id", - "supported", - "required" - ], - "type": "object" + "hint" + ] }, - "ProvidersCapabilities": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nProvider configuration capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports provider configuration methods.", + "AvailableCommandsUpdate": { + "description": "Available commands are ready or have changed", + "type": "object", "properties": { + "availableCommands": { + "description": "Commands the agent can execute", + "type": "array", + "items": { + "$ref": "#/$defs/AvailableCommand" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" + "required": [ + "availableCommands" + ] }, - "Range": { - "description": "A range in a text document, expressed as start and end positions.", + "CurrentModeUpdate": { + "description": "The current mode of the session has changed\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "type": "object", "properties": { - "end": { + "currentModeId": { + "description": "The ID of the current mode", "allOf": [ { - "$ref": "#/$defs/Position" + "$ref": "#/$defs/SessionModeId" } - ], - "description": "The end position (exclusive)." + ] }, - "start": { - "allOf": [ - { - "$ref": "#/$defs/Position" - } + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The start position (inclusive)." + "additionalProperties": true } }, "required": [ - "start", - "end" - ], - "type": "object" + "currentModeId" + ] }, - "ReadTextFileRequest": { - "description": "Request to read content from a text file.\n\nOnly available if the client supports the `fs.readTextFile` capability.", + "ConfigOptionUpdate": { + "description": "Session configuration options have been updated.", + "type": "object", "properties": { + "configOptions": { + "description": "The full set of configuration options and their current values.", + "type": "array", + "items": { + "$ref": "#/$defs/SessionConfigOption" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "limit": { - "description": "Maximum number of lines to read.", - "format": "uint32", - "minimum": 0, + ], + "additionalProperties": true + } + }, + "required": [ + "configOptions" + ] + }, + "SessionInfoUpdate": { + "description": "Update to session metadata. All fields are optional to support partial updates.\n\nAgents send this notification to update session information like title or custom metadata.\nThis allows clients to display dynamic session names and track session state changes.", + "type": "object", + "properties": { + "title": { + "description": "Human-readable title for the session. Set to null to clear.", "type": [ - "integer", + "string", "null" ] }, - "line": { - "description": "Line number to start reading from (1-based).", - "format": "uint32", - "minimum": 0, + "updatedAt": { + "description": "ISO 8601 timestamp of last activity. Set to null to clear.", "type": [ - "integer", + "string", "null" ] }, - "path": { - "description": "Absolute path to the file to read.", - "type": "string" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - } - }, - "required": [ - "sessionId", - "path" - ], - "type": "object", - "x-method": "fs/read_text_file", - "x-side": "client" - }, - "ReadTextFileResponse": { - "description": "Response containing the contents of a text file.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "content": { - "type": "string" + ], + "additionalProperties": true } - }, - "required": [ - "content" - ], - "type": "object", - "x-method": "fs/read_text_file", - "x-side": "client" + } }, - "RejectNesNotification": { - "description": "Notification sent when a suggestion is rejected.", + "Cost": { + "description": "Cost information for a session.", + "type": "object", "properties": { + "amount": { + "description": "Total cumulative cost for session.", + "type": "number", + "format": "double" + }, + "currency": { + "description": "ISO 4217 currency code (e.g., \"USD\", \"EUR\").", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + "UsageUpdate": { + "description": "Context window and cost update for a session.", + "type": "object", + "properties": { + "used": { + "description": "Tokens currently in context.", + "type": "integer", + "format": "uint64", + "minimum": 0 }, - "id": { - "description": "The ID of the rejected suggestion.", - "type": "string" + "size": { + "description": "Total context window size in tokens.", + "type": "integer", + "format": "uint64", + "minimum": 0 }, - "reason": { + "cost": { + "description": "Cumulative session cost (optional).", "anyOf": [ { - "$ref": "#/$defs/NesRejectReason" + "$ref": "#/$defs/Cost" }, { "type": "null" } ], - "description": "The reason for rejection.", "x-deserialize-default-on-error": true }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The session ID for this notification." + "additionalProperties": true } }, "required": [ - "sessionId", - "id" - ], - "type": "object", - "x-method": "nes/reject", - "x-side": "agent" + "used", + "size" + ] }, - "ReleaseTerminalRequest": { - "description": "Request to release a terminal and free its resources.", + "CompleteElicitationNotification": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNotification sent by the agent when a URL-based elicitation is complete.", + "type": "object", "properties": { + "elicitationId": { + "description": "The ID of the elicitation that completed.", + "allOf": [ + { + "$ref": "#/$defs/ElicitationId" + } + ] + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } ], - "description": "The session ID for this request." - }, - "terminalId": { - "description": "The ID of the terminal to release.", - "type": "string" + "additionalProperties": true } }, "required": [ - "sessionId", - "terminalId" + "elicitationId" ], - "type": "object", - "x-method": "terminal/release", - "x-side": "client" + "x-side": "client", + "x-method": "elicitation/complete" }, - "ReleaseTerminalResponse": { - "description": "Response to terminal/release method", + "MessageMcpNotification": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNotification parameters for `mcp/message`.\n\nThis is used when the wrapped MCP message is a notification and the outer JSON-RPC\nenvelope has no `id`.", + "type": "object", "properties": { + "connectionId": { + "description": "The MCP-over-ACP connection this message is sent on.", + "allOf": [ + { + "$ref": "#/$defs/McpConnectionId" + } + ] + }, + "method": { + "description": "The inner MCP method name.", + "type": "string" + }, + "params": { + "description": "Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params.", + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" + ], + "additionalProperties": true + } + }, + "required": [ + "connectionId", + "method" + ], + "x-side": "both", + "x-method": "mcp/message" + }, + "ExtNotification": { + "description": "Allows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" + }, + "ClientRequest": { + "description": "A JSON-RPC request object.", + "type": "object", + "properties": { + "id": { + "description": "The request id used to correlate the matching response.", + "allOf": [ + { + "$ref": "#/$defs/RequestId" + } + ] + }, + "method": { + "description": "The method name to invoke.", + "type": "string" + }, + "params": { + "description": "Method-specific request parameters.", + "anyOf": [ + { + "description": "All possible requests that a client can send to an agent.\n\nThis enum is used internally for routing RPC requests. You typically won't need\nto use this directly.\n\nThis enum encompasses all method calls from client to agent.", + "anyOf": [ + { + "title": "InitializeRequest", + "description": "Establishes the connection with a client and negotiates protocol capabilities.\n\nThis method is called once at the beginning of the connection to:\n- Negotiate the protocol version to use\n- Exchange capability information between client and agent\n- Determine available authentication methods\n\nThe agent should respond with its supported protocol version and capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", + "allOf": [ + { + "$ref": "#/$defs/InitializeRequest" + } + ] + }, + { + "title": "AuthenticateRequest", + "description": "Authenticates the client using the specified authentication method.\n\nCalled when the agent requires authentication before allowing session creation.\nThe client provides the authentication method ID that was advertised during initialization.\n\nAfter successful authentication, the client can proceed to create sessions with\n`new_session` without receiving an `auth_required` error.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", + "allOf": [ + { + "$ref": "#/$defs/AuthenticateRequest" + } + ] + }, + { + "title": "ListProvidersRequest", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nLists providers that can be configured by the client.", + "allOf": [ + { + "$ref": "#/$defs/ListProvidersRequest" + } + ] + }, + { + "title": "SetProviderRequest", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nReplaces the configuration for a provider.", + "allOf": [ + { + "$ref": "#/$defs/SetProviderRequest" + } + ] + }, + { + "title": "DisableProviderRequest", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nDisables a provider.", + "allOf": [ + { + "$ref": "#/$defs/DisableProviderRequest" + } + ] + }, + { + "title": "LogoutRequest", + "description": "Logs out of the current authenticated state.\n\nAfter a successful logout, all new sessions will require authentication.\nThere is no guarantee about the behavior of already running sessions.", + "allOf": [ + { + "$ref": "#/$defs/LogoutRequest" + } + ] + }, + { + "title": "NewSessionRequest", + "description": "Creates a new conversation session with the agent.\n\nSessions represent independent conversation contexts with their own history and state.\n\nThe agent should:\n- Create a new session context\n- Connect to any specified MCP servers\n- Return a unique session ID for future requests\n\nMay return an `auth_required` error if the agent requires authentication.\n\nSee protocol docs: [Session Setup](https://agentclientprotocol.com/protocol/session-setup)", + "allOf": [ + { + "$ref": "#/$defs/NewSessionRequest" + } + ] + }, + { + "title": "LoadSessionRequest", + "description": "Loads an existing session to resume a previous conversation.\n\nThis method is only available if the agent advertises the `loadSession` capability.\n\nThe agent should:\n- Restore the session context and conversation history\n- Connect to the specified MCP servers\n- Stream the entire conversation history back to the client via notifications\n\nSee protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)", + "allOf": [ + { + "$ref": "#/$defs/LoadSessionRequest" + } + ] + }, + { + "title": "ListSessionsRequest", + "description": "Lists existing sessions known to the agent.\n\nThis method is only available if the agent advertises the `sessionCapabilities.list` capability.\n\nThe agent should return metadata about sessions with optional filtering and pagination support.", + "allOf": [ + { + "$ref": "#/$defs/ListSessionsRequest" + } + ] + }, + { + "title": "DeleteSessionRequest", + "description": "Deletes an existing session from `session/list`.\n\nThis method is only available if the agent advertises the `sessionCapabilities.delete` capability.", + "allOf": [ + { + "$ref": "#/$defs/DeleteSessionRequest" + } + ] + }, + { + "title": "ForkSessionRequest", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nForks an existing session to create a new independent session.\n\nThis method is only available if the agent advertises the `session.fork` capability.\n\nThe agent should create a new session with the same conversation context as the\noriginal, allowing operations like generating summaries without affecting the\noriginal session's history.", + "allOf": [ + { + "$ref": "#/$defs/ForkSessionRequest" + } + ] + }, + { + "title": "ResumeSessionRequest", + "description": "Resumes an existing session without returning previous messages.\n\nThis method is only available if the agent advertises the `sessionCapabilities.resume` capability.\n\nThe agent should resume the session context, allowing the conversation to continue\nwithout replaying the message history (unlike `session/load`).", + "allOf": [ + { + "$ref": "#/$defs/ResumeSessionRequest" + } + ] + }, + { + "title": "CloseSessionRequest", + "description": "Closes an active session and frees up any resources associated with it.\n\nThis method is only available if the agent advertises the `sessionCapabilities.close` capability.\n\nThe agent must cancel any ongoing work (as if `session/cancel` was called)\nand then free up any resources associated with the session.", + "allOf": [ + { + "$ref": "#/$defs/CloseSessionRequest" + } + ] + }, + { + "title": "SetSessionModeRequest", + "description": "Sets the current mode for a session.\n\nAllows switching between different agent modes (e.g., \"ask\", \"architect\", \"code\")\nthat affect system prompts, tool availability, and permission behaviors.\n\nThe mode must be one of the modes advertised in `availableModes` during session\ncreation or loading. Agents may also change modes autonomously and notify the\nclient via `current_mode_update` notifications.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "allOf": [ + { + "$ref": "#/$defs/SetSessionModeRequest" + } + ] + }, + { + "title": "SetSessionConfigOptionRequest", + "description": "Sets the current value for a session configuration option.", + "allOf": [ + { + "$ref": "#/$defs/SetSessionConfigOptionRequest" + } + ] + }, + { + "title": "PromptRequest", + "description": "Processes a user prompt within a session.\n\nThis method handles the whole lifecycle of a prompt:\n- Receives user messages with optional context (files, images, etc.)\n- Processes the prompt using language models\n- Reports language model content and tool calls to the Clients\n- Requests permission to run tools\n- Executes any requested tool calls\n- Returns when the turn is complete with a stop reason\n\nSee protocol docs: [Prompt Turn](https://agentclientprotocol.com/protocol/prompt-turn)", + "allOf": [ + { + "$ref": "#/$defs/PromptRequest" + } + ] + }, + { + "title": "StartNesRequest", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nStarts an NES session.", + "allOf": [ + { + "$ref": "#/$defs/StartNesRequest" + } + ] + }, + { + "title": "SuggestNesRequest", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequests a code suggestion.", + "allOf": [ + { + "$ref": "#/$defs/SuggestNesRequest" + } + ] + }, + { + "title": "CloseNesRequest", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCloses an active NES session and frees up any resources associated with it.\n\nThe agent must cancel any ongoing work and then free up any resources\nassociated with the NES session.", + "allOf": [ + { + "$ref": "#/$defs/CloseNesRequest" + } + ] + }, + { + "title": "MessageMcpRequest", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nExchanges an MCP-over-ACP message.", + "allOf": [ + { + "$ref": "#/$defs/MessageMcpRequest" + } + ] + }, + { + "title": "ExtMethodRequest", + "description": "Handles extension method requests from the client.\n\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "allOf": [ + { + "$ref": "#/$defs/ExtRequest" + } + ] + } + ] + }, + { + "type": "null" + } ] } }, - "type": "object", - "x-method": "terminal/release", - "x-side": "client" - }, - "RequestId": { - "anyOf": [ - { - "title": "Null", - "type": "null" - }, - { - "format": "int64", - "title": "Number", - "type": "integer" - }, - { - "title": "Str", - "type": "string" - } + "required": [ + "id", + "method" ], - "description": "JSON RPC Request Id\n\nAn identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \\[1\\] and Numbers SHOULD NOT contain fractional parts \\[2\\]\n\nThe Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects.\n\n\\[1\\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling.\n\n\\[2\\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions." + "x-docs-ignore": true }, - "RequestPermissionOutcome": { - "description": "The outcome of a permission request.", - "discriminator": { - "propertyName": "outcome" - }, - "oneOf": [ - { - "description": "The prompt turn was cancelled before the user responded.\n\nWhen a client sends a `session/cancel` notification to cancel an ongoing\nprompt turn, it MUST respond to all pending `session/request_permission`\nrequests with this `Cancelled` outcome.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", - "properties": { - "outcome": { - "const": "cancelled", - "type": "string" - } - }, - "required": [ - "outcome" - ], - "type": "object" - }, - { + "InitializeRequest": { + "description": "Request parameters for the initialize method.\n\nSent by the client to establish connection and negotiate capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", + "type": "object", + "properties": { + "protocolVersion": { + "description": "The latest protocol version supported by the client.", "allOf": [ { - "$ref": "#/$defs/SelectedPermissionOutcome" - } - ], - "description": "The user selected one of the provided options.", - "properties": { - "outcome": { - "const": "selected", - "type": "string" + "$ref": "#/$defs/ProtocolVersion" } - }, - "required": [ - "outcome" - ], - "type": "object" - } - ] - }, - "RequestPermissionRequest": { - "description": "Request for user permission to execute a tool call.\n\nSent when the agent needs authorization before performing a sensitive operation.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" ] }, - "options": { - "description": "Available permission options for the user to choose from.", - "items": { - "$ref": "#/$defs/PermissionOption" + "clientCapabilities": { + "description": "Capabilities supported by the client.", + "default": { + "fs": { + "readTextFile": false, + "writeTextFile": false + }, + "terminal": false, + "auth": { + "terminal": false + } }, - "type": "array" - }, - "sessionId": { "allOf": [ { - "$ref": "#/$defs/SessionId" + "$ref": "#/$defs/ClientCapabilities" } - ], - "description": "The session ID for this request." + ] }, - "toolCall": { - "allOf": [ + "clientInfo": { + "description": "Information about the Client name and version sent to the Agent.\n\nNote: in future versions of the protocol, this will be required.", + "anyOf": [ { - "$ref": "#/$defs/ToolCallUpdate" + "$ref": "#/$defs/Implementation" + }, + { + "type": "null" } ], - "description": "Details about the tool call requiring permission." - } - }, - "required": [ - "sessionId", - "toolCall", - "options" - ], - "type": "object", - "x-method": "session/request_permission", - "x-side": "client" - }, - "RequestPermissionResponse": { - "description": "Response to a permission request.", - "properties": { + "x-deserialize-default-on-error": true + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "outcome": { - "allOf": [ - { - "$ref": "#/$defs/RequestPermissionOutcome" - } ], - "description": "The user's decision on the permission request." + "additionalProperties": true } }, "required": [ - "outcome" + "protocolVersion" ], - "type": "object", - "x-method": "session/request_permission", - "x-side": "client" + "x-side": "agent", + "x-method": "initialize" }, - "ResourceLink": { - "description": "A resource that the server is capable of reading, included in a prompt or tool call result.", + "ClientCapabilities": { + "description": "Capabilities supported by the client.\n\nAdvertised during initialization to inform the agent about\navailable features and methods.\n\nSee protocol docs: [Client Capabilities](https://agentclientprotocol.com/protocol/initialization#client-capabilities)", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "fs": { + "description": "File system capabilities supported by the client.\nDetermines which file operations the agent can request.", + "default": { + "readTextFile": false, + "writeTextFile": false + }, + "allOf": [ + { + "$ref": "#/$defs/FileSystemCapabilities" + } ] }, - "annotations": { + "terminal": { + "description": "Whether the Client support all `terminal/*` methods.", + "type": "boolean", + "default": false + }, + "session": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSession-related capabilities supported by the client.", "anyOf": [ { - "$ref": "#/$defs/Annotations" + "$ref": "#/$defs/ClientSessionCapabilities" }, { "type": "null" @@ -6617,2538 +6815,2856 @@ ], "x-deserialize-default-on-error": true }, - "description": { - "type": [ - "string", - "null" - ] - }, - "mimeType": { - "type": [ - "string", - "null" - ] - }, - "name": { - "type": "string" - }, - "size": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "title": { - "type": [ - "string", - "null" - ] + "plan": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the client supports `plan_update` and `plan_removed` session updates.\n\nOptional. Omitted means the client does not advertise support.\nSupplying `{}` means the client can receive both update types.", + "anyOf": [ + { + "$ref": "#/$defs/PlanCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true }, - "uri": { - "type": "string" - } - }, - "required": [ - "name", - "uri" - ], - "type": "object" - }, - "ResumeSessionRequest": { - "description": "Request parameters for resuming an existing session.\n\nResumes an existing session without returning previous messages (unlike `session/load`).\nThis is useful for agents that can resume sessions but don't implement full session loading.\n\nOnly available if the Agent supports the `sessionCapabilities.resume` capability.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "auth": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAuthentication capabilities supported by the client.\nDetermines which authentication method types the agent may include\nin its `InitializeResponse`.", + "default": { + "terminal": false + }, + "allOf": [ + { + "$ref": "#/$defs/AuthCapabilities" + } ] }, - "additionalDirectories": { - "description": "Additional workspace roots to activate for this session. Each path must be absolute.\n\nWhen omitted or empty, no additional roots are activated. When non-empty,\nthis is the complete resulting additional-root list for the resumed\nsession. It may differ from any previously used or reported list as long as\nthe request `cwd` matches the session's `cwd`.", - "items": { - "type": "string" - }, - "type": "array" + "elicitation": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nElicitation capabilities supported by the client.\nDetermines which elicitation modes the agent may use.", + "anyOf": [ + { + "$ref": "#/$defs/ElicitationCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true }, - "cwd": { - "description": "The working directory for this session.", - "type": "string" + "nes": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNES (Next Edit Suggestions) capabilities supported by the client.", + "anyOf": [ + { + "$ref": "#/$defs/ClientNesCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true }, - "mcpServers": { - "description": "List of MCP servers to connect to for this session.", + "positionEncodings": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe position encodings supported by the client, in order of preference.", + "type": "array", "items": { - "$ref": "#/$defs/McpServer" + "$ref": "#/$defs/PositionEncodingKind" }, - "type": "array" - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The ID of the session to resume." + "additionalProperties": true } - }, - "required": [ - "sessionId", - "cwd" - ], - "type": "object", - "x-method": "session/resume", - "x-side": "agent" + } }, - "ResumeSessionResponse": { - "description": "Response from resuming an existing session.", + "FileSystemCapabilities": { + "description": "File system capabilities that a client may support.\n\nSee protocol docs: [FileSystem](https://agentclientprotocol.com/protocol/initialization#filesystem)", + "type": "object", "properties": { + "readTextFile": { + "description": "Whether the Client supports `fs/read_text_file` requests.", + "type": "boolean", + "default": false + }, + "writeTextFile": { + "description": "Whether the Client supports `fs/write_text_file` requests.", + "type": "boolean", + "default": false + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, + ], + "additionalProperties": true + } + } + }, + "ClientSessionCapabilities": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSession-related capabilities supported by the client.", + "type": "object", + "properties": { "configOptions": { - "description": "Initial session configuration options if supported by the Agent.", - "items": { - "$ref": "#/$defs/SessionConfigOption" - }, + "description": "Config option capabilities supported by the client.\n\nOmitted or `null` means the client does not advertise support for any\nconfig option extensions.", + "anyOf": [ + { + "$ref": "#/$defs/SessionConfigOptionsCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "array", + "object", "null" ], - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true - }, - "modes": { + "additionalProperties": true + } + } + }, + "SessionConfigOptionsCapabilities": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSession configuration option capabilities supported by the client.", + "type": "object", + "properties": { + "boolean": { + "description": "Whether the client supports boolean session configuration options.\n\nOmitted or `null` means the client does not advertise support.\nSupplying `{}` means agents may include `type: \"boolean\"` entries in\n`configOptions`, and the client may send `session/set_config_option`\nrequests with `type: \"boolean\"` and a boolean `value`.", "anyOf": [ { - "$ref": "#/$defs/SessionModeState" + "$ref": "#/$defs/BooleanConfigOptionCapabilities" }, { "type": "null" } ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", "x-deserialize-default-on-error": true + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } - }, - "type": "object", - "x-method": "session/resume", - "x-side": "agent" - }, - "Role": { - "description": "The sender or recipient of messages and data in a conversation.", - "enum": [ - "assistant", - "user" - ], - "type": "string" + } }, - "SelectedPermissionOutcome": { - "description": "The user selected one of the provided options.", + "BooleanConfigOptionCapabilities": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for boolean session configuration options.\n\nSupplying `{}` means the client supports boolean session configuration options.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "optionId": { - "allOf": [ - { - "$ref": "#/$defs/PermissionOptionId" - } ], - "description": "The ID of the option the user selected." + "additionalProperties": true } - }, - "required": [ - "optionId" - ], - "type": "object" + } }, - "SessionAdditionalDirectoriesCapabilities": { - "description": "Capabilities for additional session directories support.\n\nBy supplying `{}` it means that the agent supports the `additionalDirectories`\nfield on supported session lifecycle requests. Agents that also support\n`session/list` may return `SessionInfo.additionalDirectories` to report the\ncomplete ordered additional-root list associated with a listed session.", + "PlanCapabilities": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for receiving `plan_update` and `plan_removed` session updates.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } - }, - "type": "object" + } }, - "SessionCapabilities": { - "description": "Session capabilities supported by the agent.\n\nAs a baseline, all Agents **MUST** support `session/new`, `session/prompt`, `session/cancel`, and `session/update`.\n\nOptionally, they **MAY** support other session methods and notifications by specifying additional capabilities.\n\nNote: `session/load` is still handled by the top-level `load_session` capability. This will be unified in future versions of the protocol.\n\nSee protocol docs: [Session Capabilities](https://agentclientprotocol.com/protocol/initialization#session-capabilities)", + "AuthCapabilities": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAuthentication capabilities supported by the client.\n\nAdvertised during initialization to inform the agent which authentication\nmethod types the client can handle. This governs opt-in types that require\nadditional client-side support.", + "type": "object", "properties": { + "terminal": { + "description": "Whether the client supports `terminal` authentication methods.\n\nWhen `true`, the agent may include `terminal` entries in its authentication methods.", + "type": "boolean", + "default": false + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "additionalDirectories": { + ], + "additionalProperties": true + } + } + }, + "ElicitationCapabilities": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nElicitation capabilities supported by the client.", + "type": "object", + "properties": { + "form": { + "description": "Whether the client supports form-based elicitation.", "anyOf": [ { - "$ref": "#/$defs/SessionAdditionalDirectoriesCapabilities" + "$ref": "#/$defs/ElicitationFormCapabilities" }, { "type": "null" } ], - "description": "Whether the agent supports `additionalDirectories` on supported session lifecycle requests.\n\nAgents that also support `session/list` may return\n`SessionInfo.additionalDirectories` to report the complete ordered\nadditional-root list associated with a listed session.", "x-deserialize-default-on-error": true }, - "close": { + "url": { + "description": "Whether the client supports URL-based elicitation.", "anyOf": [ { - "$ref": "#/$defs/SessionCloseCapabilities" + "$ref": "#/$defs/ElicitationUrlCapabilities" }, { "type": "null" } ], - "description": "Whether the agent supports `session/close`.", "x-deserialize-default-on-error": true }, - "delete": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + } + }, + "ElicitationFormCapabilities": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nForm-based elicitation capabilities.", + "type": "object", + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + } + }, + "ElicitationUrlCapabilities": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nURL-based elicitation capabilities.", + "type": "object", + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + } + }, + "ClientNesCapabilities": { + "description": "NES capabilities advertised by the client during initialization.", + "type": "object", + "properties": { + "jump": { + "description": "Whether the client supports the `jump` suggestion kind.", "anyOf": [ { - "$ref": "#/$defs/SessionDeleteCapabilities" + "$ref": "#/$defs/NesJumpCapabilities" }, { "type": "null" } ], - "description": "Whether the agent supports `session/delete`.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports deleting sessions from `session/list`.", "x-deserialize-default-on-error": true }, - "fork": { + "rename": { + "description": "Whether the client supports the `rename` suggestion kind.", "anyOf": [ { - "$ref": "#/$defs/SessionForkCapabilities" + "$ref": "#/$defs/NesRenameCapabilities" }, { "type": "null" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/fork`.", "x-deserialize-default-on-error": true }, - "list": { + "searchAndReplace": { + "description": "Whether the client supports the `searchAndReplace` suggestion kind.", "anyOf": [ { - "$ref": "#/$defs/SessionListCapabilities" + "$ref": "#/$defs/NesSearchAndReplaceCapabilities" }, { "type": "null" } ], - "description": "Whether the agent supports `session/list`.", "x-deserialize-default-on-error": true }, - "resume": { - "anyOf": [ - { - "$ref": "#/$defs/SessionResumeCapabilities" - }, - { - "type": "null" - } + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "Whether the agent supports `session/resume`.", - "x-deserialize-default-on-error": true + "additionalProperties": true } - }, - "type": "object" + } }, - "SessionCloseCapabilities": { - "description": "Capabilities for the `session/close` method.\n\nBy supplying `{}` it means that the agent supports closing of sessions.", + "NesJumpCapabilities": { + "description": "Marker for jump suggestion support.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - } - }, - "type": "object" - }, - "SessionConfigBoolean": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA boolean on/off toggle session configuration option payload.", - "properties": { - "currentValue": { - "description": "The current value of the boolean option.", - "type": "boolean" - } - }, - "required": [ - "currentValue" - ], - "type": "object" - }, - "SessionConfigGroupId": { - "description": "Unique identifier for a session configuration option value group.", - "type": "string" - }, - "SessionConfigId": { - "description": "Unique identifier for a session configuration option.", - "type": "string" - }, - "SessionConfigOption": { - "description": "A session configuration option selector and its current state.", - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/SessionConfigSelect" - } - ], - "description": "Single-value selector (dropdown).", - "properties": { - "type": { - "const": "select", - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/SessionConfigBoolean" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nBoolean on/off toggle.", - "properties": { - "type": { - "const": "boolean", - "type": "string" - } - }, - "required": [ - "type" ], - "type": "object" + "additionalProperties": true } - ], + } + }, + "NesRenameCapabilities": { + "description": "Marker for rename suggestion support.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "category": { - "anyOf": [ - { - "$ref": "#/$defs/SessionConfigOptionCategory" - }, - { - "type": "null" - } ], - "description": "Optional semantic category for this option (UX only).", - "x-deserialize-default-on-error": true - }, - "description": { - "description": "Optional description for the Client to display to the user.", + "additionalProperties": true + } + } + }, + "NesSearchAndReplaceCapabilities": { + "description": "Marker for search and replace suggestion support.", + "type": "object", + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "string", + "object", "null" - ] - }, - "id": { + ], + "additionalProperties": true + } + } + }, + "AuthenticateRequest": { + "description": "Request parameters for the authenticate method.\n\nSpecifies which authentication method to use.", + "type": "object", + "properties": { + "methodId": { + "description": "The ID of the authentication method to use.\nMust be one of the methods advertised in the initialize response.", "allOf": [ { - "$ref": "#/$defs/SessionConfigId" + "$ref": "#/$defs/AuthMethodId" } - ], - "description": "Unique identifier for the configuration option." + ] }, - "name": { - "description": "Human-readable label for the option.", - "type": "string" + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ - "id", - "name" + "methodId" ], - "type": "object" + "x-side": "agent", + "x-method": "authenticate" }, - "SessionConfigOptionCategory": { - "anyOf": [ - { - "const": "mode", - "description": "Session mode selector.", - "type": "string" - }, - { - "const": "model", - "description": "Model selector.", - "type": "string" - }, - { - "const": "thought_level", - "description": "Thought/reasoning level selector.", - "type": "string" - }, - { - "description": "Unknown / uncategorized selector.", - "title": "other", - "type": "string" + "ListProvidersRequest": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `providers/list`.", + "type": "object", + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } - ], - "description": "Semantic category for a session configuration option.\n\nThis is intended to help Clients distinguish broadly common selectors (e.g. model selector vs\nsession mode selector vs thought/reasoning level) for UX purposes (keyboard shortcuts, icons,\nplacement). It MUST NOT be required for correctness. Clients MUST handle missing or unknown\ncategories gracefully.\n\nCategory names beginning with `_` are free for custom use, like other ACP extension methods.\nCategory names that do not begin with `_` are reserved for the ACP spec." + }, + "x-side": "agent", + "x-method": "providers/list" }, - "SessionConfigSelect": { - "description": "A single-value selector (dropdown) session configuration option payload.", + "SetProviderRequest": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `providers/set`.\n\nReplaces the full configuration for one provider id.", + "type": "object", "properties": { - "currentValue": { - "allOf": [ - { - "$ref": "#/$defs/SessionConfigValueId" - } - ], - "description": "The currently selected value." + "id": { + "description": "Provider id to configure.", + "type": "string" }, - "options": { + "apiType": { + "description": "Protocol type for this provider.", "allOf": [ { - "$ref": "#/$defs/SessionConfigSelectOptions" + "$ref": "#/$defs/LlmProtocol" } + ] + }, + "baseUrl": { + "description": "Base URL for requests sent through this provider.", + "type": "string" + }, + "headers": { + "description": "Full headers map for this provider.\nMay include authorization, routing, or other integration-specific headers.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The set of selectable options." + "additionalProperties": true } }, "required": [ - "currentValue", - "options" + "id", + "apiType", + "baseUrl" ], - "type": "object" + "x-side": "agent", + "x-method": "providers/set" }, - "SessionConfigSelectGroup": { - "description": "A group of possible values for a session configuration option.", + "DisableProviderRequest": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `providers/disable`.", + "type": "object", "properties": { + "id": { + "description": "Provider id to disable.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "group": { - "allOf": [ - { - "$ref": "#/$defs/SessionConfigGroupId" - } ], - "description": "Unique identifier for this group." - }, - "name": { - "description": "Human-readable label for this group.", - "type": "string" - }, - "options": { - "description": "The set of option values in this group.", - "items": { - "$ref": "#/$defs/SessionConfigSelectOption" - }, - "type": "array" + "additionalProperties": true } }, "required": [ - "group", - "name", - "options" + "id" ], - "type": "object" + "x-side": "agent", + "x-method": "providers/disable" }, - "SessionConfigSelectOption": { - "description": "A possible value for a session configuration option.", + "LogoutRequest": { + "description": "Request parameters for the logout method.\n\nTerminates the current authenticated session.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true + } + }, + "x-side": "agent", + "x-method": "logout" + }, + "NewSessionRequest": { + "description": "Request parameters for creating a new session.\n\nSee protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)", + "type": "object", + "properties": { + "cwd": { + "description": "The working directory for this session. Must be an absolute path.", + "type": "string" }, - "description": { - "description": "Optional description for this option value.", - "type": [ - "string", - "null" - ] + "additionalDirectories": { + "description": "Additional workspace roots for this session. Each path must be absolute.\n\nThese expand the session's filesystem scope without changing `cwd`, which\nremains the base for relative paths. When omitted or empty, no\nadditional roots are activated for the new session.", + "type": "array", + "items": { + "type": "string" + } }, - "name": { - "description": "Human-readable label for this option value.", - "type": "string" + "mcpServers": { + "description": "List of MCP (Model Context Protocol) servers the agent should connect to.", + "type": "array", + "items": { + "$ref": "#/$defs/McpServer" + } }, - "value": { - "allOf": [ - { - "$ref": "#/$defs/SessionConfigValueId" - } + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "Unique identifier for this option value." + "additionalProperties": true } }, "required": [ - "value", - "name" + "cwd", + "mcpServers" ], - "type": "object" + "x-side": "agent", + "x-method": "session/new" }, - "SessionConfigSelectOptions": { + "McpServer": { + "description": "Configuration for connecting to an MCP (Model Context Protocol) server.\n\nMCP servers provide tools and context that the agent can use when\nprocessing prompts.\n\nSee protocol docs: [MCP Servers](https://agentclientprotocol.com/protocol/session-setup#mcp-servers)", "anyOf": [ { - "description": "A flat list of options with no grouping.", - "items": { - "$ref": "#/$defs/SessionConfigSelectOption" + "description": "HTTP transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.http` is `true`.", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "http" + } }, - "title": "Ungrouped", - "type": "array" + "required": [ + "type" + ], + "allOf": [ + { + "$ref": "#/$defs/McpServerHttp" + } + ] }, { - "description": "A list of options grouped under headers.", - "items": { - "$ref": "#/$defs/SessionConfigSelectGroup" + "description": "SSE transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.sse` is `true`.", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "sse" + } }, - "title": "Grouped", - "type": "array" + "required": [ + "type" + ], + "allOf": [ + { + "$ref": "#/$defs/McpServerSse" + } + ] + }, + { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nACP transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.acp` is `true`.\nThe MCP server is provided by an ACP component and communicates over the ACP channel.", + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "acp" + } + }, + "required": [ + "type" + ], + "allOf": [ + { + "$ref": "#/$defs/McpServerAcp" + } + ] + }, + { + "title": "stdio", + "description": "Stdio transport configuration\n\nAll Agents MUST support this transport.", + "allOf": [ + { + "$ref": "#/$defs/McpServerStdio" + } + ] } - ], - "description": "Possible values for a session configuration option." - }, - "SessionConfigValueId": { - "description": "Unique identifier for a session configuration option value.", - "type": "string" + ] }, - "SessionDeleteCapabilities": { - "description": "Capabilities for the `session/delete` method.\n\nSupplying `{}` means the agent supports deleting sessions from `session/list`.", + "HttpHeader": { + "description": "An HTTP header to set when making requests to the MCP server.", + "type": "object", "properties": { + "name": { + "description": "The name of the HTTP header.", + "type": "string" + }, + "value": { + "description": "The value to set for the HTTP header.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" + "required": [ + "name", + "value" + ] }, - "SessionForkCapabilities": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for the `session/fork` method.\n\nBy supplying `{}` it means that the agent supports forking of sessions.", + "McpServerHttp": { + "description": "HTTP transport configuration for MCP.", + "type": "object", "properties": { + "name": { + "description": "Human-readable name identifying this MCP server.", + "type": "string" + }, + "url": { + "description": "URL to the MCP server.", + "type": "string" + }, + "headers": { + "description": "HTTP headers to set when making requests to the MCP server.", + "type": "array", + "items": { + "$ref": "#/$defs/HttpHeader" + } + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" - }, - "SessionId": { - "description": "A unique identifier for a conversation session between a client and agent.\n\nSessions maintain their own context, conversation history, and state,\nallowing multiple independent interactions with the same agent.\n\nSee protocol docs: [Session ID](https://agentclientprotocol.com/protocol/session-setup#session-id)", - "type": "string" + "required": [ + "name", + "url", + "headers" + ] }, - "SessionInfo": { - "description": "Information about a session returned by session/list", + "McpServerSse": { + "description": "SSE transport configuration for MCP.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "additionalDirectories": { - "description": "Additional workspace roots reported for this session. Each path must be absolute.\n\nWhen present, this is the complete ordered additional-root list reported\nby the Agent. Omitted and empty values are equivalent: the response\nreports no additional roots.", - "items": { - "type": "string" - }, - "type": "array" - }, - "cwd": { - "description": "The working directory for this session. Must be an absolute path.", + "name": { + "description": "Human-readable name identifying this MCP server.", "type": "string" }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "Unique identifier for the session" + "url": { + "description": "URL to the MCP server.", + "type": "string" }, - "title": { - "description": "Human-readable title for the session", - "type": [ - "string", - "null" - ], - "x-deserialize-default-on-error": true + "headers": { + "description": "HTTP headers to set when making requests to the MCP server.", + "type": "array", + "items": { + "$ref": "#/$defs/HttpHeader" + } }, - "updatedAt": { - "description": "ISO 8601 timestamp of last activity", + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "string", + "object", "null" ], - "x-deserialize-default-on-error": true + "additionalProperties": true } }, "required": [ - "sessionId", - "cwd" - ], - "type": "object" + "name", + "url", + "headers" + ] }, - "SessionInfoUpdate": { - "description": "Update to session metadata. All fields are optional to support partial updates.\n\nAgents send this notification to update session information like title or custom metadata.\nThis allows clients to display dynamic session names and track session state changes.", + "McpServerAcp": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nACP transport configuration for MCP.\n\nThe MCP server is provided by an ACP component and communicates over the ACP channel\nusing `mcp/connect`, `mcp/message`, and `mcp/disconnect`.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + "name": { + "description": "Human-readable name identifying this MCP server.", + "type": "string" }, - "title": { - "description": "Human-readable title for the session. Set to null to clear.", - "type": [ - "string", - "null" + "id": { + "description": "Unique identifier for this MCP server, generated by the component providing it.\n\nProviders MUST NOT reuse an ID for multiple ACP-transport MCP servers that are visible\non the same ACP connection.", + "allOf": [ + { + "$ref": "#/$defs/McpServerAcpId" + } ] }, - "updatedAt": { - "description": "ISO 8601 timestamp of last activity. Set to null to clear.", - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "SessionListCapabilities": { - "description": "Capabilities for the `session/list` method.\n\nBy supplying `{}` it means that the agent supports listing of sessions.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" + "required": [ + "name", + "id" + ] }, - "SessionMode": { - "description": "A mode the agent can operate in.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "McpServerStdio": { + "description": "Stdio transport configuration for MCP.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + "name": { + "description": "Human-readable name identifying this MCP server.", + "type": "string" }, - "description": { - "type": [ - "string", - "null" - ] + "command": { + "description": "Path to the MCP server executable.", + "type": "string" }, - "id": { - "$ref": "#/$defs/SessionModeId" + "args": { + "description": "Command-line arguments to pass to the MCP server.", + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "description": "Environment variables to set when launching the MCP server.", + "type": "array", + "items": { + "$ref": "#/$defs/EnvVariable" + } }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object" - }, - "SessionModeId": { - "description": "Unique identifier for a Session Mode.", - "type": "string" - }, - "SessionModeState": { - "description": "The set of modes and the one currently active.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "availableModes": { - "description": "The set of modes that the Agent can operate in", - "items": { - "$ref": "#/$defs/SessionMode" - }, - "type": "array", - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true - }, - "currentModeId": { - "allOf": [ - { - "$ref": "#/$defs/SessionModeId" - } ], - "description": "The current mode the Agent is in." + "additionalProperties": true } }, "required": [ - "currentModeId", - "availableModes" - ], - "type": "object" + "name", + "command", + "args", + "env" + ] }, - "SessionNotification": { - "description": "Notification containing a session update from the agent.\n\nUsed to stream real-time progress and results during prompt processing.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", + "LoadSessionRequest": { + "description": "Request parameters for loading an existing session.\n\nOnly available if the Agent supports the `loadSession` capability.\n\nSee protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + "mcpServers": { + "description": "List of MCP servers to connect to for this session.", + "type": "array", + "items": { + "$ref": "#/$defs/McpServer" + } + }, + "cwd": { + "description": "The working directory for this session.", + "type": "string" + }, + "additionalDirectories": { + "description": "Additional workspace roots to activate for this session. Each path must be absolute.\n\nWhen omitted or empty, no additional roots are activated. When non-empty,\nthis is the complete resulting additional-root list for the loaded\nsession. It may differ from any previously used or reported list as long as\nthe request `cwd` matches the session's `cwd`.", + "type": "array", + "items": { + "type": "string" + } }, "sessionId": { + "description": "The ID of the session to load.", "allOf": [ { "$ref": "#/$defs/SessionId" } - ], - "description": "The ID of the session this update pertains to." + ] }, - "update": { - "allOf": [ - { - "$ref": "#/$defs/SessionUpdate" - } + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The actual update content." + "additionalProperties": true } }, "required": [ - "sessionId", - "update" + "mcpServers", + "cwd", + "sessionId" ], - "type": "object", - "x-method": "session/update", - "x-side": "client" + "x-side": "agent", + "x-method": "session/load" }, - "SessionResumeCapabilities": { - "description": "Capabilities for the `session/resume` method.\n\nBy supplying `{}` it means that the agent supports resuming of sessions.", + "ListSessionsRequest": { + "description": "Request parameters for listing existing sessions.\n\nOnly available if the Agent supports the `sessionCapabilities.list` capability.", + "type": "object", "properties": { + "cwd": { + "description": "Filter sessions by working directory. Must be an absolute path.", + "type": [ + "string", + "null" + ] + }, + "cursor": { + "description": "Opaque cursor token from a previous response's nextCursor field for cursor-based pagination", + "type": [ + "string", + "null" + ] + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object" + "x-side": "agent", + "x-method": "session/list" }, - "SessionUpdate": { - "description": "Different types of updates that can be sent during session processing.\n\nThese updates provide real-time feedback about the agent's progress.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", - "discriminator": { - "propertyName": "sessionUpdate" - }, - "oneOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/ContentChunk" - } - ], - "description": "A chunk of the user's message being streamed.", - "properties": { - "sessionUpdate": { - "const": "user_message_chunk", - "type": "string" - } - }, - "required": [ - "sessionUpdate" - ], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ContentChunk" - } - ], - "description": "A chunk of the agent's response being streamed.", - "properties": { - "sessionUpdate": { - "const": "agent_message_chunk", - "type": "string" - } - }, - "required": [ - "sessionUpdate" - ], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ContentChunk" - } - ], - "description": "A chunk of the agent's internal reasoning being streamed.", - "properties": { - "sessionUpdate": { - "const": "agent_thought_chunk", - "type": "string" - } - }, - "required": [ - "sessionUpdate" - ], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ToolCall" - } - ], - "description": "Notification that a new tool call has been initiated.", - "properties": { - "sessionUpdate": { - "const": "tool_call", - "type": "string" - } - }, - "required": [ - "sessionUpdate" - ], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/ToolCallUpdate" - } - ], - "description": "Update on the status or results of a tool call.", - "properties": { - "sessionUpdate": { - "const": "tool_call_update", - "type": "string" - } - }, - "required": [ - "sessionUpdate" - ], - "type": "object" - }, - { - "allOf": [ - { - "$ref": "#/$defs/Plan" - } - ], - "description": "The agent's execution plan for complex tasks.\nSee protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan)", - "properties": { - "sessionUpdate": { - "const": "plan", - "type": "string" - } - }, - "required": [ - "sessionUpdate" - ], - "type": "object" - }, - { + "DeleteSessionRequest": { + "description": "Request parameters for deleting an existing session from `session/list`.\n\nOnly available if the Agent supports the `sessionCapabilities.delete` capability.", + "type": "object", + "properties": { + "sessionId": { + "description": "The ID of the session to delete.", "allOf": [ { - "$ref": "#/$defs/PlanUpdate" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA content update for a plan identified by ID.", - "properties": { - "sessionUpdate": { - "const": "plan_update", - "type": "string" + "$ref": "#/$defs/SessionId" } - }, - "required": [ - "sessionUpdate" - ], - "type": "object" + ] }, - { - "allOf": [ - { - "$ref": "#/$defs/PlanRemoved" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRemoval notice for a plan identified by ID.", - "properties": { - "sessionUpdate": { - "const": "plan_removed", - "type": "string" - } - }, - "required": [ - "sessionUpdate" + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "type": "object" - }, - { + "additionalProperties": true + } + }, + "required": [ + "sessionId" + ], + "x-side": "agent", + "x-method": "session/delete" + }, + "ForkSessionRequest": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for forking an existing session.\n\nCreates a new session based on the context of an existing one, allowing\noperations like generating summaries without affecting the original session's history.\n\nOnly available if the Agent supports the `session.fork` capability.", + "type": "object", + "properties": { + "sessionId": { + "description": "The ID of the session to fork.", "allOf": [ { - "$ref": "#/$defs/AvailableCommandsUpdate" - } - ], - "description": "Available commands are ready or have changed", - "properties": { - "sessionUpdate": { - "const": "available_commands_update", - "type": "string" + "$ref": "#/$defs/SessionId" } - }, - "required": [ - "sessionUpdate" - ], - "type": "object" + ] }, - { - "allOf": [ - { - "$ref": "#/$defs/CurrentModeUpdate" - } - ], - "description": "The current mode of the session has changed\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", - "properties": { - "sessionUpdate": { - "const": "current_mode_update", - "type": "string" - } - }, - "required": [ - "sessionUpdate" - ], - "type": "object" + "cwd": { + "description": "The working directory for this session.", + "type": "string" }, - { - "allOf": [ - { - "$ref": "#/$defs/ConfigOptionUpdate" - } - ], - "description": "Session configuration options have been updated.", - "properties": { - "sessionUpdate": { - "const": "config_option_update", - "type": "string" - } - }, - "required": [ - "sessionUpdate" - ], - "type": "object" + "additionalDirectories": { + "description": "Additional workspace roots to activate for this session. Each path must be absolute.\n\nWhen omitted or empty, no additional roots are activated. When non-empty,\nthis is the complete resulting additional-root list for the forked\nsession.", + "type": "array", + "items": { + "type": "string" + } }, - { - "allOf": [ - { - "$ref": "#/$defs/SessionInfoUpdate" - } - ], - "description": "Session metadata has been updated (title, timestamps, custom metadata)", - "properties": { - "sessionUpdate": { - "const": "session_info_update", - "type": "string" - } - }, - "required": [ - "sessionUpdate" - ], - "type": "object" + "mcpServers": { + "description": "List of MCP servers to connect to for this session.", + "type": "array", + "items": { + "$ref": "#/$defs/McpServer" + } }, - { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + }, + "required": [ + "sessionId", + "cwd" + ], + "x-side": "agent", + "x-method": "session/fork" + }, + "ResumeSessionRequest": { + "description": "Request parameters for resuming an existing session.\n\nResumes an existing session without returning previous messages (unlike `session/load`).\nThis is useful for agents that can resume sessions but don't implement full session loading.\n\nOnly available if the Agent supports the `sessionCapabilities.resume` capability.", + "type": "object", + "properties": { + "sessionId": { + "description": "The ID of the session to resume.", "allOf": [ { - "$ref": "#/$defs/UsageUpdate" - } - ], - "description": "Context window and cost update for the session.", - "properties": { - "sessionUpdate": { - "const": "usage_update", - "type": "string" + "$ref": "#/$defs/SessionId" } - }, - "required": [ - "sessionUpdate" + ] + }, + "cwd": { + "description": "The working directory for this session.", + "type": "string" + }, + "additionalDirectories": { + "description": "Additional workspace roots to activate for this session. Each path must be absolute.\n\nWhen omitted or empty, no additional roots are activated. When non-empty,\nthis is the complete resulting additional-root list for the resumed\nsession. It may differ from any previously used or reported list as long as\nthe request `cwd` matches the session's `cwd`.", + "type": "array", + "items": { + "type": "string" + } + }, + "mcpServers": { + "description": "List of MCP servers to connect to for this session.", + "type": "array", + "items": { + "$ref": "#/$defs/McpServer" + } + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "type": "object" + "additionalProperties": true } - ] + }, + "required": [ + "sessionId", + "cwd" + ], + "x-side": "agent", + "x-method": "session/resume" }, - "SetProviderRequest": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `providers/set`.\n\nReplaces the full configuration for one provider id.", + "CloseSessionRequest": { + "description": "Request parameters for closing an active session.\n\nIf supported, the agent **must** cancel any ongoing work related to the session\n(treat it as if `session/cancel` was called) and then free up any resources\nassociated with the session.\n\nOnly available if the Agent supports the `sessionCapabilities.close` capability.", + "type": "object", "properties": { + "sessionId": { + "description": "The ID of the session to close.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ] + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" + ], + "additionalProperties": true + } + }, + "required": [ + "sessionId" + ], + "x-side": "agent", + "x-method": "session/close" + }, + "SetSessionModeRequest": { + "description": "Request parameters for setting a session mode.", + "type": "object", + "properties": { + "sessionId": { + "description": "The ID of the session to set the mode for.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } ] }, - "apiType": { + "modeId": { + "description": "The ID of the mode to set.", "allOf": [ { - "$ref": "#/$defs/LlmProtocol" + "$ref": "#/$defs/SessionModeId" } - ], - "description": "Protocol type for this provider." - }, - "baseUrl": { - "description": "Base URL for requests sent through this provider.", - "type": "string" - }, - "headers": { - "additionalProperties": { - "type": "string" - }, - "description": "Full headers map for this provider.\nMay include authorization, routing, or other integration-specific headers.", - "type": "object" + ] }, - "id": { - "description": "Provider id to configure.", - "type": "string" + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ - "id", - "apiType", - "baseUrl" + "sessionId", + "modeId" ], - "type": "object", - "x-method": "providers/set", - "x-side": "agent" + "x-side": "agent", + "x-method": "session/set_mode" }, - "SetProviderResponse": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `providers/set`.", + "SetSessionConfigOptionRequest": { + "description": "Request parameters for setting a session configuration option.", + "type": "object", "properties": { + "sessionId": { + "description": "The ID of the session to set the configuration option for.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ] + }, + "configId": { + "description": "The ID of the configuration option to set.", + "allOf": [ + { + "$ref": "#/$defs/SessionConfigId" + } + ] + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object", - "x-method": "providers/set", - "x-side": "agent" - }, - "SetSessionConfigOptionRequest": { + "required": [ + "sessionId", + "configId" + ], "anyOf": [ { "description": "A boolean value (`type: \"boolean\"`).", + "type": "object", "properties": { - "type": { - "const": "boolean", - "type": "string" - }, "value": { "description": "The boolean value.", "type": "boolean" + }, + "type": { + "type": "string", + "const": "boolean" } }, "required": [ "type", "value" - ], - "type": "object" + ] }, { + "title": "value_id", "description": "A [`SessionConfigValueId`] string value.\n\nThis is the default when `type` is absent on the wire. Unknown `type`\nvalues with string payloads also gracefully deserialize into this\nvariant.", + "type": "object", "properties": { "value": { + "description": "The value ID.", "allOf": [ { "$ref": "#/$defs/SessionConfigValueId" } - ], - "description": "The value ID." + ] } }, "required": [ "value" - ], - "title": "value_id", - "type": "object" + ] } ], - "description": "Request parameters for setting a session configuration option.", + "x-side": "agent", + "x-method": "session/set_config_option" + }, + "PromptRequest": { + "description": "Request parameters for sending a user prompt to the agent.\n\nContains the user's message and any additional context.\n\nSee protocol docs: [User Message](https://agentclientprotocol.com/protocol/prompt-turn#1-user-message)", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] - }, - "configId": { - "allOf": [ - { - "$ref": "#/$defs/SessionConfigId" - } - ], - "description": "The ID of the configuration option to set." - }, "sessionId": { + "description": "The ID of the session to send this user message to", "allOf": [ { "$ref": "#/$defs/SessionId" } + ] + }, + "prompt": { + "description": "The blocks of content that compose the user's message.\n\nAs a baseline, the Agent MUST support [`ContentBlock::Text`] and [`ContentBlock::ResourceLink`],\nwhile other variants are optionally enabled via [`PromptCapabilities`].\n\nThe Client MUST adapt its interface according to [`PromptCapabilities`].\n\nThe client MAY include referenced pieces of context as either\n[`ContentBlock::Resource`] or [`ContentBlock::ResourceLink`].\n\nWhen available, [`ContentBlock::Resource`] is preferred\nas it avoids extra round-trips and allows the message to include\npieces of context from sources the agent may not have access to.", + "type": "array", + "items": { + "$ref": "#/$defs/ContentBlock" + } + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The ID of the session to set the configuration option for." + "additionalProperties": true } }, "required": [ "sessionId", - "configId" + "prompt" ], - "type": "object", - "x-method": "session/set_config_option", - "x-side": "agent" + "x-side": "agent", + "x-method": "session/prompt" }, - "SetSessionConfigOptionResponse": { - "description": "Response to `session/set_config_option` method.", + "StartNesRequest": { + "description": "Request to start an NES session.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "workspaceUri": { + "description": "The root URI of the workspace.", "type": [ - "object", + "string", "null" ] }, - "configOptions": { - "description": "The full set of configuration options and their current values.", + "workspaceFolders": { + "description": "The workspace folders.", + "type": [ + "array", + "null" + ], "items": { - "$ref": "#/$defs/SessionConfigOption" + "$ref": "#/$defs/WorkspaceFolder" }, - "type": "array", "x-deserialize-default-on-error": true, "x-deserialize-skip-invalid-items": true - } - }, - "required": [ - "configOptions" - ], - "type": "object", - "x-method": "session/set_config_option", - "x-side": "agent" - }, - "SetSessionModeRequest": { - "description": "Request parameters for setting a session mode.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] }, - "modeId": { - "allOf": [ + "repository": { + "description": "Repository metadata, if the workspace is a git repository.", + "anyOf": [ { - "$ref": "#/$defs/SessionModeId" + "$ref": "#/$defs/NesRepository" + }, + { + "type": "null" } ], - "description": "The ID of the mode to set." + "x-deserialize-default-on-error": true }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The ID of the session to set the mode for." - } - }, - "required": [ - "sessionId", - "modeId" - ], - "type": "object", - "x-method": "session/set_mode", - "x-side": "agent" + "additionalProperties": true + } + }, + "x-side": "agent", + "x-method": "nes/start" }, - "SetSessionModeResponse": { - "description": "Response to `session/set_mode` method.", + "WorkspaceFolder": { + "description": "A workspace folder.", + "type": "object", "properties": { + "uri": { + "description": "The URI of the folder.", + "type": "string" + }, + "name": { + "description": "The display name of the folder.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object", - "x-method": "session/set_mode", - "x-side": "agent" + "required": [ + "uri", + "name" + ] }, - "StartNesRequest": { - "description": "Request to start an NES session.", + "NesRepository": { + "description": "Repository metadata for an NES session.", + "type": "object", "properties": { + "name": { + "description": "The repository name.", + "type": "string" + }, + "owner": { + "description": "The repository owner.", + "type": "string" + }, + "remoteUrl": { + "description": "The remote URL of the repository.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" + ], + "additionalProperties": true + } + }, + "required": [ + "name", + "owner", + "remoteUrl" + ] + }, + "SuggestNesRequest": { + "description": "Request for a code suggestion.", + "type": "object", + "properties": { + "sessionId": { + "description": "The session ID for this request.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } ] }, - "repository": { + "uri": { + "description": "The URI of the document to suggest for.", + "type": "string" + }, + "version": { + "description": "The version number of the document.", + "type": "integer", + "format": "int64" + }, + "position": { + "description": "The current cursor position.", + "allOf": [ + { + "$ref": "#/$defs/Position" + } + ] + }, + "selection": { + "description": "The current text selection range, if any.", "anyOf": [ { - "$ref": "#/$defs/NesRepository" + "$ref": "#/$defs/Range" }, { "type": "null" } ], - "description": "Repository metadata, if the workspace is a git repository.", "x-deserialize-default-on-error": true }, - "workspaceFolders": { - "description": "The workspace folders.", - "items": { - "$ref": "#/$defs/WorkspaceFolder" - }, - "type": [ - "array", - "null" + "triggerKind": { + "description": "What triggered this suggestion request.", + "allOf": [ + { + "$ref": "#/$defs/NesTriggerKind" + } + ] + }, + "context": { + "description": "Context for the suggestion, included based on agent capabilities.", + "anyOf": [ + { + "$ref": "#/$defs/NesSuggestContext" + }, + { + "type": "null" + } ], - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + "x-deserialize-default-on-error": true }, - "workspaceUri": { - "description": "The root URI of the workspace.", - "type": [ - "string", - "null" - ] - } - }, - "type": "object", - "x-method": "nes/start", - "x-side": "agent" - }, - "StartNesResponse": { - "description": "Response to `nes/start`.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } ], - "description": "The session ID for the newly started NES session." + "additionalProperties": true } }, "required": [ - "sessionId" + "sessionId", + "uri", + "version", + "position", + "triggerKind" ], - "type": "object", - "x-method": "nes/start", - "x-side": "agent" - }, - "StopReason": { - "description": "Reasons why an agent stops processing a prompt turn.\n\nSee protocol docs: [Stop Reasons](https://agentclientprotocol.com/protocol/prompt-turn#stop-reasons)", - "oneOf": [ - { - "const": "end_turn", - "description": "The turn ended successfully.", - "type": "string" - }, - { - "const": "max_tokens", - "description": "The turn ended because the agent reached the maximum number of tokens.", - "type": "string" - }, - { - "const": "max_turn_requests", - "description": "The turn ended because the agent reached the maximum number of allowed\nagent requests between user turns.", - "type": "string" - }, - { - "const": "refusal", - "description": "The turn ended because the agent refused to continue. The user prompt\nand everything that comes after it won't be included in the next\nprompt, so this should be reflected in the UI.", - "type": "string" - }, - { - "const": "cancelled", - "description": "The turn was cancelled by the client via `session/cancel`.\n\nThis stop reason MUST be returned when the client sends a `session/cancel`\nnotification, even if the cancellation causes exceptions in underlying operations.\nAgents should catch these exceptions and return this semantically meaningful\nresponse to confirm successful cancellation.", - "type": "string" - } - ] + "x-side": "agent", + "x-method": "nes/suggest" }, - "StringFormat": { - "description": "String format types for string properties in elicitation schemas.", + "NesTriggerKind": { + "description": "What triggered the suggestion request.", "oneOf": [ { - "const": "email", - "description": "Email address format.", - "type": "string" - }, - { - "const": "uri", - "description": "URI format.", - "type": "string" + "description": "Triggered by user typing or cursor movement.", + "type": "string", + "const": "automatic" }, { - "const": "date", - "description": "Date format (YYYY-MM-DD).", - "type": "string" + "description": "Triggered by a diagnostic appearing at or near the cursor.", + "type": "string", + "const": "diagnostic" }, { - "const": "date-time", - "description": "Date-time format (ISO 8601).", - "type": "string" + "description": "Triggered by an explicit user action (keyboard shortcut).", + "type": "string", + "const": "manual" } ] }, - "StringPropertySchema": { - "description": "Schema for string properties in an elicitation form.\n\nWhen `enum` or `oneOf` is set, this represents a single-select enum\nwith `\"type\": \"string\"`.", + "NesSuggestContext": { + "description": "Context attached to a suggestion request.", + "type": "object", "properties": { - "default": { - "description": "Default value.", - "type": [ - "string", - "null" - ] - }, - "description": { - "description": "Human-readable description.", + "recentFiles": { + "description": "Recently accessed files.", "type": [ - "string", + "array", "null" - ] - }, - "enum": { - "description": "Enum values for untitled single-select enums.", + ], "items": { - "type": "string" + "$ref": "#/$defs/NesRecentFile" }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true + }, + "relatedSnippets": { + "description": "Related code snippets.", "type": [ "array", "null" - ] - }, - "format": { - "anyOf": [ - { - "$ref": "#/$defs/StringFormat" - }, - { - "type": "null" - } ], - "description": "String format." + "items": { + "$ref": "#/$defs/NesRelatedSnippet" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, - "maxLength": { - "description": "Maximum string length.", - "format": "uint32", - "minimum": 0, + "editHistory": { + "description": "Recent edit history.", "type": [ - "integer", + "array", "null" - ] + ], + "items": { + "$ref": "#/$defs/NesEditHistoryEntry" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, - "minLength": { - "description": "Minimum string length.", - "format": "uint32", - "minimum": 0, + "userActions": { + "description": "Recent user actions (typing, navigation, etc.).", "type": [ - "integer", + "array", "null" - ] - }, - "oneOf": { - "description": "Titled enum options for titled single-select enums.", + ], "items": { - "$ref": "#/$defs/EnumOption" + "$ref": "#/$defs/NesUserAction" }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true + }, + "openFiles": { + "description": "Currently open files in the editor.", "type": [ "array", "null" - ] + ], + "items": { + "$ref": "#/$defs/NesOpenFile" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, - "pattern": { - "description": "Pattern the string must match.", + "diagnostics": { + "description": "Current diagnostics (errors, warnings).", "type": [ - "string", + "array", "null" - ] + ], + "items": { + "$ref": "#/$defs/NesDiagnostic" + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, - "title": { - "description": "Optional title for the property.", + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "string", + "object", "null" - ] + ], + "additionalProperties": true } - }, - "type": "object" + } }, - "SuggestNesRequest": { - "description": "Request for a code suggestion.", + "NesRecentFile": { + "description": "A recently accessed file.", + "type": "object", "properties": { + "uri": { + "description": "The URI of the file.", + "type": "string" + }, + "languageId": { + "description": "The language identifier.", + "type": "string" + }, + "text": { + "description": "The full text content of the file.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "context": { - "anyOf": [ - { - "$ref": "#/$defs/NesSuggestContext" - }, - { - "type": "null" - } - ], - "description": "Context for the suggestion, included based on agent capabilities.", - "x-deserialize-default-on-error": true - }, - "position": { - "allOf": [ - { - "$ref": "#/$defs/Position" - } - ], - "description": "The current cursor position." - }, - "selection": { - "anyOf": [ - { - "$ref": "#/$defs/Range" - }, - { - "type": "null" - } - ], - "description": "The current text selection range, if any.", - "x-deserialize-default-on-error": true - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The session ID for this request." - }, - "triggerKind": { - "allOf": [ - { - "$ref": "#/$defs/NesTriggerKind" - } ], - "description": "What triggered this suggestion request." - }, - "uri": { - "description": "The URI of the document to suggest for.", - "type": "string" - }, - "version": { - "description": "The version number of the document.", - "format": "int64", - "type": "integer" + "additionalProperties": true } }, "required": [ - "sessionId", "uri", - "version", - "position", - "triggerKind" - ], - "type": "object", - "x-method": "nes/suggest", - "x-side": "agent" + "languageId", + "text" + ] }, - "SuggestNesResponse": { - "description": "Response to `nes/suggest`.", + "NesRelatedSnippet": { + "description": "A related code snippet from a file.", + "type": "object", "properties": { + "uri": { + "description": "The URI of the file containing the snippets.", + "type": "string" + }, + "excerpts": { + "description": "The code excerpts.", + "type": "array", + "items": { + "$ref": "#/$defs/NesExcerpt" + } + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "suggestions": { - "description": "The list of suggestions.", - "items": { - "$ref": "#/$defs/NesSuggestion" - }, - "type": "array", - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + ], + "additionalProperties": true } }, "required": [ - "suggestions" - ], - "type": "object", - "x-method": "nes/suggest", - "x-side": "agent" + "uri", + "excerpts" + ] }, - "Terminal": { - "description": "Embed a terminal created with `terminal/create` by its id.\n\nThe terminal must be added before calling `terminal/release`.\n\nSee protocol docs: [Terminal](https://agentclientprotocol.com/protocol/terminals)", + "NesExcerpt": { + "description": "A code excerpt from a file.", + "type": "object", "properties": { + "startLine": { + "description": "The start line of the excerpt (zero-based).", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "endLine": { + "description": "The end line of the excerpt (zero-based).", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "text": { + "description": "The text content of the excerpt.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "terminalId": { - "type": "string" + ], + "additionalProperties": true } }, "required": [ - "terminalId" - ], - "type": "object" + "startLine", + "endLine", + "text" + ] }, - "TerminalExitStatus": { - "description": "Exit status of a terminal command.", + "NesEditHistoryEntry": { + "description": "An entry in the edit history.", + "type": "object", "properties": { + "uri": { + "description": "The URI of the edited file.", + "type": "string" + }, + "diff": { + "description": "A diff representing the edit.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "exitCode": { - "description": "The process exit code (may be null if terminated by signal).", - "format": "uint32", - "minimum": 0, - "type": [ - "integer", - "null" - ] - }, - "signal": { - "description": "The signal that terminated the process (may be null if exited normally).", - "type": [ - "string", - "null" - ] + ], + "additionalProperties": true } }, - "type": "object" + "required": [ + "uri", + "diff" + ] }, - "TerminalOutputRequest": { - "description": "Request to get the current output and status of a terminal.", + "NesUserAction": { + "description": "A user action (typing, cursor movement, etc.).", + "type": "object", "properties": { + "action": { + "description": "The kind of action (e.g., \"insertChar\", \"cursorMovement\").", + "type": "string" + }, + "uri": { + "description": "The URI of the file where the action occurred.", + "type": "string" + }, + "position": { + "description": "The position where the action occurred.", + "allOf": [ + { + "$ref": "#/$defs/Position" + } + ] + }, + "timestampMs": { + "description": "Timestamp in milliseconds since epoch.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } ], - "description": "The session ID for this request." - }, - "terminalId": { - "description": "The ID of the terminal to get output from.", - "type": "string" + "additionalProperties": true } }, "required": [ - "sessionId", - "terminalId" - ], - "type": "object", - "x-method": "terminal/output", - "x-side": "client" + "action", + "uri", + "position", + "timestampMs" + ] }, - "TerminalOutputResponse": { - "description": "Response containing the terminal output and exit status.", + "NesOpenFile": { + "description": "An open file in the editor.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" - ] + "uri": { + "description": "The URI of the file.", + "type": "string" }, - "exitStatus": { + "languageId": { + "description": "The language identifier.", + "type": "string" + }, + "visibleRange": { + "description": "The visible range in the editor, if any.", "anyOf": [ { - "$ref": "#/$defs/TerminalExitStatus" + "$ref": "#/$defs/Range" }, { "type": "null" } ], - "description": "Exit status if the command has completed." + "x-deserialize-default-on-error": true }, - "output": { - "description": "The terminal output captured so far.", - "type": "string" + "lastFocusedMs": { + "description": "Timestamp in milliseconds since epoch of when the file was last focused.", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0, + "x-deserialize-default-on-error": true }, - "truncated": { - "description": "Whether the output was truncated due to byte limits.", - "type": "boolean" - } - }, - "required": [ - "output", - "truncated" - ], - "type": "object", - "x-method": "terminal/output", - "x-side": "client" - }, - "TextContent": { - "description": "Text provided to or from an LLM.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "annotations": { - "anyOf": [ - { - "$ref": "#/$defs/Annotations" - }, - { - "type": "null" - } ], - "x-deserialize-default-on-error": true - }, - "text": { - "type": "string" + "additionalProperties": true } }, "required": [ - "text" - ], - "type": "object" + "uri", + "languageId" + ] }, - "TextDocumentContentChangeEvent": { - "description": "A content change event for a document.\n\nWhen `range` is `None`, `text` is the full content of the document.\nWhen `range` is `Some`, `text` replaces the given range.", + "NesDiagnostic": { + "description": "A diagnostic (error, warning, etc.).", + "type": "object", "properties": { + "uri": { + "description": "The URI of the file containing the diagnostic.", + "type": "string" + }, "range": { - "anyOf": [ + "description": "The range of the diagnostic.", + "allOf": [ { "$ref": "#/$defs/Range" - }, + } + ] + }, + "severity": { + "description": "The severity of the diagnostic.", + "allOf": [ { - "type": "null" + "$ref": "#/$defs/NesDiagnosticSeverity" } - ], - "description": "The range of the document that changed. If `None`, the entire content is replaced." + ] }, - "text": { - "description": "The new text for the range, or the full document content if `range` is `None`.", + "message": { + "description": "The diagnostic message.", "type": "string" + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ - "text" - ], - "type": "object" + "uri", + "range", + "severity", + "message" + ] }, - "TextDocumentSyncKind": { - "description": "How the agent wants document changes delivered.", + "NesDiagnosticSeverity": { + "description": "Severity of a diagnostic.", "oneOf": [ { - "const": "full", - "description": "Client sends the entire file content on each change.", - "type": "string" + "description": "An error.", + "type": "string", + "const": "error" }, { - "const": "incremental", - "description": "Client sends only the changed ranges.", - "type": "string" + "description": "A warning.", + "type": "string", + "const": "warning" + }, + { + "description": "An informational message.", + "type": "string", + "const": "information" + }, + { + "description": "A hint.", + "type": "string", + "const": "hint" } ] }, - "TextResourceContents": { - "description": "Text-based resource contents.", + "CloseNesRequest": { + "description": "Request to close an NES session.\n\nThe agent **must** cancel any ongoing work related to the NES session\nand then free up any resources associated with the session.", + "type": "object", "properties": { + "sessionId": { + "description": "The ID of the NES session to close.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ] + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "mimeType": { - "type": [ - "string", - "null" - ] - }, - "text": { - "type": "string" - }, - "uri": { - "type": "string" + ], + "additionalProperties": true } }, "required": [ - "text", - "uri" + "sessionId" ], - "type": "object" + "x-side": "agent", + "x-method": "nes/close" }, - "TitledMultiSelectItems": { - "description": "Items definition for titled multi-select enum properties.", - "properties": { - "anyOf": { - "description": "Titled enum options.", - "items": { - "$ref": "#/$defs/EnumOption" + "ClientResponse": { + "description": "A JSON-RPC response object.", + "anyOf": [ + { + "title": "Result", + "description": "A successful JSON-RPC response.", + "type": "object", + "properties": { + "id": { + "description": "The id of the request this response answers.", + "allOf": [ + { + "$ref": "#/$defs/RequestId" + } + ] + }, + "result": { + "description": "Method-specific response data.", + "anyOf": [ + { + "title": "WriteTextFileResponse", + "description": "Successful result returned for a `fs/write_text_file` request.", + "allOf": [ + { + "$ref": "#/$defs/WriteTextFileResponse" + } + ] + }, + { + "title": "ReadTextFileResponse", + "description": "Successful result returned for a `fs/read_text_file` request.", + "allOf": [ + { + "$ref": "#/$defs/ReadTextFileResponse" + } + ] + }, + { + "title": "RequestPermissionResponse", + "description": "Successful result returned for a `session/request_permission` request.", + "allOf": [ + { + "$ref": "#/$defs/RequestPermissionResponse" + } + ] + }, + { + "title": "CreateTerminalResponse", + "description": "Successful result returned for a `terminal/create` request.", + "allOf": [ + { + "$ref": "#/$defs/CreateTerminalResponse" + } + ] + }, + { + "title": "TerminalOutputResponse", + "description": "Successful result returned for a `terminal/output` request.", + "allOf": [ + { + "$ref": "#/$defs/TerminalOutputResponse" + } + ] + }, + { + "title": "ReleaseTerminalResponse", + "description": "Successful result returned for a `terminal/release` request.", + "allOf": [ + { + "$ref": "#/$defs/ReleaseTerminalResponse" + } + ] + }, + { + "title": "WaitForTerminalExitResponse", + "description": "Successful result returned for a `terminal/wait_for_exit` request.", + "allOf": [ + { + "$ref": "#/$defs/WaitForTerminalExitResponse" + } + ] + }, + { + "title": "KillTerminalResponse", + "description": "Successful result returned for a `terminal/kill` request.", + "allOf": [ + { + "$ref": "#/$defs/KillTerminalResponse" + } + ] + }, + { + "title": "CreateElicitationResponse", + "description": "Successful result returned for a `elicitation/create` request.", + "allOf": [ + { + "$ref": "#/$defs/CreateElicitationResponse" + } + ] + }, + { + "title": "ConnectMcpResponse", + "description": "Successful result returned for a `mcp/connect` request.", + "allOf": [ + { + "$ref": "#/$defs/ConnectMcpResponse" + } + ] + }, + { + "title": "DisconnectMcpResponse", + "description": "Successful result returned for a `mcp/disconnect` request.", + "allOf": [ + { + "$ref": "#/$defs/DisconnectMcpResponse" + } + ] + }, + { + "title": "ExtMethodResponse", + "description": "Successful result returned by an extension method outside the core ACP method set.", + "allOf": [ + { + "$ref": "#/$defs/ExtResponse" + } + ] + }, + { + "title": "MessageMcpResponse", + "description": "Successful result returned by an MCP-over-ACP `mcp/message` request.", + "allOf": [ + { + "$ref": "#/$defs/MessageMcpResponse" + } + ] + } + ] + } + }, + "required": [ + "id", + "result" + ] + }, + { + "title": "Error", + "description": "A failed JSON-RPC response.", + "type": "object", + "properties": { + "id": { + "description": "The id of the request this response answers.", + "allOf": [ + { + "$ref": "#/$defs/RequestId" + } + ] + }, + "error": { + "description": "Method-specific error data.", + "allOf": [ + { + "$ref": "#/$defs/Error" + } + ] + } }, - "type": "array" + "required": [ + "id", + "error" + ] } - }, - "required": [ - "anyOf" ], - "type": "object" + "x-docs-ignore": true }, - "ToolCall": { - "description": "Represents a tool call that the language model has requested.\n\nTool calls are actions that the agent executes on behalf of the language model,\nsuch as reading files, executing code, or fetching data from external sources.\n\nSee protocol docs: [Tool Calls](https://agentclientprotocol.com/protocol/tool-calls)", + "WriteTextFileResponse": { + "description": "Response to `fs/write_text_file`", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, + ], + "additionalProperties": true + } + }, + "x-side": "client", + "x-method": "fs/write_text_file" + }, + "ReadTextFileResponse": { + "description": "Response containing the contents of a text file.", + "type": "object", + "properties": { "content": { - "description": "Content produced by the tool call.", - "items": { - "$ref": "#/$defs/ToolCallContent" - }, - "type": "array", - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true + "description": "Content payload returned by this response.", + "type": "string" }, - "kind": { - "allOf": [ - { - "$ref": "#/$defs/ToolKind" - } + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The category of tool being invoked.\nHelps clients choose appropriate icons and UI treatment." - }, - "locations": { - "description": "File locations affected by this tool call.\nEnables \"follow-along\" features in clients.", - "items": { - "$ref": "#/$defs/ToolCallLocation" - }, - "type": "array", - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true - }, - "rawInput": { - "description": "Raw input parameters sent to the tool." - }, - "rawOutput": { - "description": "Raw output returned by the tool." - }, - "status": { + "additionalProperties": true + } + }, + "required": [ + "content" + ], + "x-side": "client", + "x-method": "fs/read_text_file" + }, + "RequestPermissionResponse": { + "description": "Response to a permission request.", + "type": "object", + "properties": { + "outcome": { + "description": "The user's decision on the permission request.", "allOf": [ { - "$ref": "#/$defs/ToolCallStatus" + "$ref": "#/$defs/RequestPermissionOutcome" } - ], - "description": "Current execution status of the tool call." - }, - "title": { - "description": "Human-readable title describing what the tool is doing.", - "type": "string" + ] }, - "toolCallId": { - "allOf": [ - { - "$ref": "#/$defs/ToolCallId" - } + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "Unique identifier for this tool call within the session." + "additionalProperties": true } }, "required": [ - "toolCallId", - "title" + "outcome" ], - "type": "object" + "x-side": "client", + "x-method": "session/request_permission" }, - "ToolCallContent": { - "description": "Content produced by a tool call.\n\nTool calls can produce different types of content including\nstandard content blocks (text, images) or file diffs.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)", - "discriminator": { - "propertyName": "type" - }, + "RequestPermissionOutcome": { + "description": "The outcome of a permission request.", "oneOf": [ { - "allOf": [ - { - "$ref": "#/$defs/Content" - } - ], - "description": "Standard content block (text, images, resources).", + "description": "The prompt turn was cancelled before the user responded.\n\nWhen a client sends a `session/cancel` notification to cancel an ongoing\nprompt turn, it MUST respond to all pending `session/request_permission`\nrequests with this `Cancelled` outcome.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", + "type": "object", "properties": { - "type": { - "const": "content", - "type": "string" + "outcome": { + "type": "string", + "const": "cancelled" } }, "required": [ - "type" - ], - "type": "object" + "outcome" + ] }, { - "allOf": [ - { - "$ref": "#/$defs/Diff" - } - ], - "description": "File modification shown as a diff.", + "description": "The user selected one of the provided options.", + "type": "object", "properties": { - "type": { - "const": "diff", - "type": "string" + "outcome": { + "type": "string", + "const": "selected" } }, "required": [ - "type" + "outcome" ], - "type": "object" - }, - { "allOf": [ { - "$ref": "#/$defs/Terminal" + "$ref": "#/$defs/SelectedPermissionOutcome" } - ], - "description": "Embed a terminal created with `terminal/create` by its id.\n\nThe terminal must be added before calling `terminal/release`.\n\nSee protocol docs: [Terminal](https://agentclientprotocol.com/protocol/terminals)", - "properties": { - "type": { - "const": "terminal", - "type": "string" + ] + } + ], + "discriminator": { + "propertyName": "outcome" + } + }, + "SelectedPermissionOutcome": { + "description": "The user selected one of the provided options.", + "type": "object", + "properties": { + "optionId": { + "description": "The ID of the option the user selected.", + "allOf": [ + { + "$ref": "#/$defs/PermissionOptionId" } - }, - "required": [ - "type" + ] + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "type": "object" + "additionalProperties": true } + }, + "required": [ + "optionId" ] }, - "ToolCallId": { - "description": "Unique identifier for a tool call within a session.", - "type": "string" - }, - "ToolCallLocation": { - "description": "A file location being accessed or modified by a tool.\n\nEnables clients to implement \"follow-along\" features that track\nwhich files the agent is working with in real-time.\n\nSee protocol docs: [Following the Agent](https://agentclientprotocol.com/protocol/tool-calls#following-the-agent)", + "CreateTerminalResponse": { + "description": "Response containing the ID of the created terminal.", + "type": "object", "properties": { + "terminalId": { + "description": "The unique identifier for the created terminal.", + "allOf": [ + { + "$ref": "#/$defs/TerminalId" + } + ] + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" + ], + "additionalProperties": true + } + }, + "required": [ + "terminalId" + ], + "x-side": "client", + "x-method": "terminal/create" + }, + "TerminalOutputResponse": { + "description": "Response containing the terminal output and exit status.", + "type": "object", + "properties": { + "output": { + "description": "The terminal output captured so far.", + "type": "string" + }, + "truncated": { + "description": "Whether the output was truncated due to byte limits.", + "type": "boolean" + }, + "exitStatus": { + "description": "Exit status if the command has completed.", + "anyOf": [ + { + "$ref": "#/$defs/TerminalExitStatus" + }, + { + "type": "null" + } ] }, - "line": { - "description": "Optional line number within the file.", - "format": "uint32", - "minimum": 0, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "integer", + "object", "null" - ] - }, - "path": { - "description": "The file path being accessed or modified.", - "type": "string" + ], + "additionalProperties": true } }, "required": [ - "path" + "output", + "truncated" ], - "type": "object" + "x-side": "client", + "x-method": "terminal/output" }, - "ToolCallStatus": { - "description": "Execution status of a tool call.\n\nTool calls progress through different statuses during their lifecycle.\n\nSee protocol docs: [Status](https://agentclientprotocol.com/protocol/tool-calls#status)", - "oneOf": [ - { - "const": "pending", - "description": "The tool call hasn't started running yet because the input is either\nstreaming or we're awaiting approval.", - "type": "string" - }, - { - "const": "in_progress", - "description": "The tool call is currently running.", - "type": "string" + "TerminalExitStatus": { + "description": "Exit status of a terminal command.", + "type": "object", + "properties": { + "exitCode": { + "description": "The process exit code (may be null if terminated by signal).", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 }, - { - "const": "completed", - "description": "The tool call completed successfully.", - "type": "string" + "signal": { + "description": "The signal that terminated the process (may be null if exited normally).", + "type": [ + "string", + "null" + ] }, - { - "const": "failed", - "description": "The tool call failed with an error.", - "type": "string" + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } - ] + } }, - "ToolCallUpdate": { - "description": "An update to an existing tool call.\n\nUsed to report progress and results as tools execute. All fields except\nthe tool call ID are optional - only changed fields need to be included.\n\nSee protocol docs: [Updating](https://agentclientprotocol.com/protocol/tool-calls#updating)", + "ReleaseTerminalResponse": { + "description": "Response to terminal/release method", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "content": { - "description": "Replace the content collection.", - "items": { - "$ref": "#/$defs/ToolCallContent" - }, - "type": [ - "array", - "null" ], - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true - }, - "kind": { - "anyOf": [ - { - "$ref": "#/$defs/ToolKind" - }, - { - "type": "null" - } - ], - "description": "Update the tool kind.", - "x-deserialize-default-on-error": true - }, - "locations": { - "description": "Replace the locations collection.", - "items": { - "$ref": "#/$defs/ToolCallLocation" - }, + "additionalProperties": true + } + }, + "x-side": "client", + "x-method": "terminal/release" + }, + "WaitForTerminalExitResponse": { + "description": "Response containing the exit status of a terminal command.", + "type": "object", + "properties": { + "exitCode": { + "description": "The process exit code (may be null if terminated by signal).", "type": [ - "array", + "integer", "null" ], - "x-deserialize-default-on-error": true, - "x-deserialize-skip-invalid-items": true - }, - "rawInput": { - "description": "Update the raw input." - }, - "rawOutput": { - "description": "Update the raw output." - }, - "status": { - "anyOf": [ - { - "$ref": "#/$defs/ToolCallStatus" - }, - { - "type": "null" - } - ], - "description": "Update the execution status.", - "x-deserialize-default-on-error": true + "format": "uint32", + "minimum": 0 }, - "title": { - "description": "Update the human-readable title.", + "signal": { + "description": "The signal that terminated the process (may be null if exited normally).", "type": [ "string", "null" ] }, - "toolCallId": { - "allOf": [ - { - "$ref": "#/$defs/ToolCallId" - } + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The ID of the tool call being updated." + "additionalProperties": true } }, - "required": [ - "toolCallId" - ], - "type": "object" + "x-side": "client", + "x-method": "terminal/wait_for_exit" }, - "ToolKind": { - "description": "Categories of tools that can be invoked.\n\nTool kinds help clients choose appropriate icons and optimize how they\ndisplay tool execution progress.\n\nSee protocol docs: [Creating](https://agentclientprotocol.com/protocol/tool-calls#creating)", + "KillTerminalResponse": { + "description": "Response to `terminal/kill` method", + "type": "object", + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + }, + "x-side": "client", + "x-method": "terminal/kill" + }, + "CreateElicitationResponse": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse from the client to an elicitation request.", + "type": "object", + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true + } + }, "oneOf": [ { - "const": "read", - "description": "Reading files or data.", - "type": "string" - }, - { - "const": "edit", - "description": "Modifying files or content.", - "type": "string" - }, - { - "const": "delete", - "description": "Removing files or data.", - "type": "string" + "description": "The user accepted and provided content.", + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "accept" + } + }, + "required": [ + "action" + ], + "allOf": [ + { + "$ref": "#/$defs/ElicitationAcceptAction" + } + ] }, { - "const": "move", - "description": "Moving or renaming files.", - "type": "string" + "description": "The user declined the elicitation.", + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "decline" + } + }, + "required": [ + "action" + ] }, { - "const": "search", - "description": "Searching for information.", - "type": "string" - }, + "description": "The elicitation was cancelled.", + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "cancel" + } + }, + "required": [ + "action" + ] + } + ], + "discriminator": { + "propertyName": "action" + }, + "x-side": "client", + "x-method": "elicitation/create" + }, + "ElicitationContentValue": { + "description": "Allowed wire representations for [`ElicitationContentValue`].", + "anyOf": [ { - "const": "execute", - "description": "Running commands or code.", + "title": "String", + "description": "String value accepted in elicitation response content.", "type": "string" }, { - "const": "think", - "description": "Internal reasoning or planning.", - "type": "string" + "title": "Integer", + "description": "Integer value accepted in elicitation response content.", + "type": "integer", + "format": "int64" }, { - "const": "fetch", - "description": "Retrieving external data.", - "type": "string" + "title": "Number", + "description": "Number value accepted in elicitation response content.", + "type": "number", + "format": "double" }, { - "const": "switch_mode", - "description": "Switching the current session mode.", - "type": "string" + "title": "Boolean", + "description": "Boolean value accepted in elicitation response content.", + "type": "boolean" }, { - "const": "other", - "description": "Other tool types (default).", - "type": "string" + "title": "StringArray", + "description": "String array value accepted in elicitation response content.", + "type": "array", + "items": { + "type": "string" + } } ] }, - "UnstructuredCommandInput": { - "description": "All text that was typed after the command name is provided as input.", + "ElicitationAcceptAction": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe user accepted the elicitation and provided content.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "content": { + "description": "The user-provided content, if any, as an object matching the requested schema.", "type": [ "object", "null" - ] - }, - "hint": { - "description": "A hint to display when the input hasn't been provided yet", - "type": "string" - } - }, - "required": [ - "hint" - ], - "type": "object" - }, - "UntitledMultiSelectItems": { - "description": "Items definition for untitled multi-select enum properties.", - "properties": { - "enum": { - "description": "Allowed enum values.", - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "allOf": [ - { - "$ref": "#/$defs/ElicitationStringType" - } ], - "description": "Item type discriminator. Must be `\"string\"`." + "additionalProperties": { + "$ref": "#/$defs/ElicitationContentValue" + } } - }, - "required": [ - "type", - "enum" - ], - "type": "object" + } }, - "Usage": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nToken usage information for a prompt turn.", - "properties": { - "cachedReadTokens": { - "description": "Total cache read tokens.", - "format": "uint64", - "minimum": 0, - "type": [ - "integer", - "null" - ] - }, - "cachedWriteTokens": { - "description": "Total cache write tokens.", - "format": "uint64", - "minimum": 0, - "type": [ - "integer", - "null" - ] - }, - "inputTokens": { - "description": "Total input tokens across all turns.", - "format": "uint64", - "minimum": 0, - "type": "integer" - }, - "outputTokens": { - "description": "Total output tokens across all turns.", - "format": "uint64", - "minimum": 0, - "type": "integer" + "ConnectMcpResponse": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `mcp/connect`.", + "type": "object", + "properties": { + "connectionId": { + "description": "The unique identifier for this MCP-over-ACP connection.", + "allOf": [ + { + "$ref": "#/$defs/McpConnectionId" + } + ] }, - "thoughtTokens": { - "description": "Total thought/reasoning tokens", - "format": "uint64", - "minimum": 0, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "integer", + "object", "null" - ] - }, - "totalTokens": { - "description": "Sum of all token types across session.", - "format": "uint64", - "minimum": 0, - "type": "integer" + ], + "additionalProperties": true } }, "required": [ - "totalTokens", - "inputTokens", - "outputTokens" + "connectionId" ], - "type": "object" + "x-side": "client", + "x-method": "mcp/connect" }, - "UsageUpdate": { - "description": "Context window and cost update for a session.", + "DisconnectMcpResponse": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `mcp/disconnect`.", + "type": "object", "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true + } + }, + "x-side": "client", + "x-method": "mcp/disconnect" + }, + "ClientNotification": { + "description": "A JSON-RPC notification object.", + "type": "object", + "properties": { + "method": { + "description": "The notification method name.", + "type": "string" }, - "cost": { + "params": { + "description": "Method-specific notification parameters.", "anyOf": [ { - "$ref": "#/$defs/Cost" + "description": "All possible notifications that a client can send to an agent.\n\nThis enum is used internally for routing RPC notifications. You typically won't need\nto use this directly.\n\nNotifications do not expect a response.", + "anyOf": [ + { + "title": "CancelNotification", + "description": "Cancels ongoing operations for a session.\n\nThis is a notification sent by the client to cancel an ongoing prompt turn.\n\nUpon receiving this notification, the Agent SHOULD:\n- Stop all language model requests as soon as possible\n- Abort all tool call invocations in progress\n- Send any pending `session/update` notifications\n- Respond to the original `session/prompt` request with `StopReason::Cancelled`\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", + "allOf": [ + { + "$ref": "#/$defs/CancelNotification" + } + ] + }, + { + "title": "DidOpenDocumentNotification", + "description": "**UNSTABLE**\n\nNotification sent when a file is opened in the editor.", + "allOf": [ + { + "$ref": "#/$defs/DidOpenDocumentNotification" + } + ] + }, + { + "title": "DidChangeDocumentNotification", + "description": "**UNSTABLE**\n\nNotification sent when a file is edited.", + "allOf": [ + { + "$ref": "#/$defs/DidChangeDocumentNotification" + } + ] + }, + { + "title": "DidCloseDocumentNotification", + "description": "**UNSTABLE**\n\nNotification sent when a file is closed.", + "allOf": [ + { + "$ref": "#/$defs/DidCloseDocumentNotification" + } + ] + }, + { + "title": "DidSaveDocumentNotification", + "description": "**UNSTABLE**\n\nNotification sent when a file is saved.", + "allOf": [ + { + "$ref": "#/$defs/DidSaveDocumentNotification" + } + ] + }, + { + "title": "DidFocusDocumentNotification", + "description": "**UNSTABLE**\n\nNotification sent when a file becomes the active editor tab.", + "allOf": [ + { + "$ref": "#/$defs/DidFocusDocumentNotification" + } + ] + }, + { + "title": "AcceptNesNotification", + "description": "**UNSTABLE**\n\nNotification sent when a suggestion is accepted.", + "allOf": [ + { + "$ref": "#/$defs/AcceptNesNotification" + } + ] + }, + { + "title": "RejectNesNotification", + "description": "**UNSTABLE**\n\nNotification sent when a suggestion is rejected.", + "allOf": [ + { + "$ref": "#/$defs/RejectNesNotification" + } + ] + }, + { + "title": "MessageMcpNotification", + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSends an MCP-over-ACP notification.", + "allOf": [ + { + "$ref": "#/$defs/MessageMcpNotification" + } + ] + }, + { + "title": "ExtNotification", + "description": "Handles extension notifications from the client.\n\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "allOf": [ + { + "$ref": "#/$defs/ExtNotification" + } + ] + } + ] }, { "type": "null" } - ], - "description": "Cumulative session cost (optional).", - "x-deserialize-default-on-error": true - }, - "size": { - "description": "Total context window size in tokens.", - "format": "uint64", - "minimum": 0, - "type": "integer" - }, - "used": { - "description": "Tokens currently in context.", - "format": "uint64", - "minimum": 0, - "type": "integer" + ] } }, "required": [ - "used", - "size" + "method" ], - "type": "object" + "x-docs-ignore": true }, - "WaitForTerminalExitRequest": { - "description": "Request to wait for a terminal command to exit.", + "CancelNotification": { + "description": "Notification to cancel ongoing operations for a session.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", + "type": "object", "properties": { + "sessionId": { + "description": "The ID of the session to cancel operations for.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ] + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, + ], + "additionalProperties": true + } + }, + "required": [ + "sessionId" + ], + "x-side": "agent", + "x-method": "session/cancel" + }, + "DidOpenDocumentNotification": { + "description": "Notification sent when a file is opened in the editor.", + "type": "object", + "properties": { "sessionId": { + "description": "The session ID for this notification.", "allOf": [ { "$ref": "#/$defs/SessionId" } - ], - "description": "The session ID for this request." + ] }, - "terminalId": { - "description": "The ID of the terminal to wait for.", + "uri": { + "description": "The URI of the opened document.", + "type": "string" + }, + "languageId": { + "description": "The language identifier of the document (e.g., \"rust\", \"python\").", "type": "string" + }, + "version": { + "description": "The version number of the document.", + "type": "integer", + "format": "int64" + }, + "text": { + "description": "The full text content of the document.", + "type": "string" + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ "sessionId", - "terminalId" + "uri", + "languageId", + "version", + "text" ], - "type": "object", - "x-method": "terminal/wait_for_exit", - "x-side": "client" + "x-side": "agent", + "x-method": "document/didOpen" }, - "WaitForTerminalExitResponse": { - "description": "Response containing the exit status of a terminal command.", + "DidChangeDocumentNotification": { + "description": "Notification sent when a file is edited.", + "type": "object", "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": [ - "object", - "null" + "sessionId": { + "description": "The session ID for this notification.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } ] }, - "exitCode": { - "description": "The process exit code (may be null if terminated by signal).", - "format": "uint32", - "minimum": 0, - "type": [ - "integer", - "null" - ] + "uri": { + "description": "The URI of the changed document.", + "type": "string" }, - "signal": { - "description": "The signal that terminated the process (may be null if exited normally).", + "version": { + "description": "The new version number of the document.", + "type": "integer", + "format": "int64" + }, + "contentChanges": { + "description": "The content changes.", + "type": "array", + "items": { + "$ref": "#/$defs/TextDocumentContentChangeEvent" + } + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ - "string", + "object", "null" - ] + ], + "additionalProperties": true } }, - "type": "object", - "x-method": "terminal/wait_for_exit", - "x-side": "client" + "required": [ + "sessionId", + "uri", + "version", + "contentChanges" + ], + "x-side": "agent", + "x-method": "document/didChange" }, - "WorkspaceFolder": { - "description": "A workspace folder.", + "TextDocumentContentChangeEvent": { + "description": "A content change event for a document.\n\nWhen `range` is `None`, `text` is the full content of the document.\nWhen `range` is `Some`, `text` replaces the given range.", + "type": "object", "properties": { - "name": { - "description": "The display name of the folder.", + "range": { + "description": "The range of the document that changed. If `None`, the entire content is replaced.", + "anyOf": [ + { + "$ref": "#/$defs/Range" + }, + { + "type": "null" + } + ] + }, + "text": { + "description": "The new text for the range, or the full document content if `range` is `None`.", "type": "string" }, - "uri": { - "description": "The URI of the folder.", - "type": "string" - } - }, - "required": [ - "uri", - "name" - ], - "type": "object" - }, - "WriteTextFileRequest": { - "description": "Request to write content to a text file.\n\nOnly available if the client supports the `fs.writeTextFile` capability.", - "properties": { "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] - }, - "content": { - "description": "The text content to write to the file.", - "type": "string" - }, - "path": { - "description": "Absolute path to the file to write.", - "type": "string" - }, + ], + "additionalProperties": true + } + }, + "required": [ + "text" + ] + }, + "DidCloseDocumentNotification": { + "description": "Notification sent when a file is closed.", + "type": "object", + "properties": { "sessionId": { + "description": "The session ID for this notification.", "allOf": [ { "$ref": "#/$defs/SessionId" } + ] + }, + "uri": { + "description": "The URI of the closed document.", + "type": "string" + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "description": "The session ID for this request." + "additionalProperties": true } }, "required": [ "sessionId", - "path", - "content" + "uri" ], - "type": "object", - "x-method": "fs/write_text_file", - "x-side": "client" + "x-side": "agent", + "x-method": "document/didClose" }, - "WriteTextFileResponse": { - "description": "Response to `fs/write_text_file`", + "DidSaveDocumentNotification": { + "description": "Notification sent when a file is saved.", + "type": "object", "properties": { + "sessionId": { + "description": "The session ID for this notification.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ] + }, + "uri": { + "description": "The URI of the saved document.", + "type": "string" + }, "_meta": { - "additionalProperties": true, "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": [ "object", "null" - ] + ], + "additionalProperties": true } }, + "required": [ + "sessionId", + "uri" + ], + "x-side": "agent", + "x-method": "document/didSave" + }, + "DidFocusDocumentNotification": { + "description": "Notification sent when a file becomes the active editor tab.", "type": "object", - "x-method": "fs/write_text_file", - "x-side": "client" - } - }, - "$schema": "https://json-schema.org/draft/2020-12/schema", - "anyOf": [ - { - "anyOf": [ - { + "properties": { + "sessionId": { + "description": "The session ID for this notification.", "allOf": [ { - "$ref": "#/$defs/AgentRequest" + "$ref": "#/$defs/SessionId" } - ], - "title": "Request" + ] }, - { + "uri": { + "description": "The URI of the focused document.", + "type": "string" + }, + "version": { + "description": "The version number of the document.", + "type": "integer", + "format": "int64" + }, + "position": { + "description": "The current cursor position.", "allOf": [ { - "$ref": "#/$defs/AgentResponse" + "$ref": "#/$defs/Position" } - ], - "title": "Response" + ] }, - { + "visibleRange": { + "description": "The portion of the file currently visible in the editor viewport.", "allOf": [ { - "$ref": "#/$defs/AgentNotification" + "$ref": "#/$defs/Range" } + ] + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "title": "Notification" + "additionalProperties": true } + }, + "required": [ + "sessionId", + "uri", + "version", + "position", + "visibleRange" ], - "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility", + "x-side": "agent", + "x-method": "document/didFocus" + }, + "AcceptNesNotification": { + "description": "Notification sent when a suggestion is accepted.", + "type": "object", "properties": { - "jsonrpc": { - "enum": [ - "2.0" - ], + "sessionId": { + "description": "The session ID for this notification.", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ] + }, + "id": { + "description": "The ID of the accepted suggestion.", "type": "string" + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ - "jsonrpc" + "sessionId", + "id" ], - "title": "Agent", - "type": "object" + "x-side": "agent", + "x-method": "nes/accept" }, - { - "anyOf": [ - { + "RejectNesNotification": { + "description": "Notification sent when a suggestion is rejected.", + "type": "object", + "properties": { + "sessionId": { + "description": "The session ID for this notification.", "allOf": [ { - "$ref": "#/$defs/ClientRequest" + "$ref": "#/$defs/SessionId" } - ], - "title": "Request" + ] }, - { - "allOf": [ - { - "$ref": "#/$defs/ClientResponse" - } - ], - "title": "Response" + "id": { + "description": "The ID of the rejected suggestion.", + "type": "string" }, - { - "allOf": [ + "reason": { + "description": "The reason for rejection.", + "anyOf": [ { - "$ref": "#/$defs/ClientNotification" + "$ref": "#/$defs/NesRejectReason" + }, + { + "type": "null" } ], - "title": "Notification" - } - ], - "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility", - "properties": { - "jsonrpc": { - "enum": [ - "2.0" + "x-deserialize-default-on-error": true + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" ], - "type": "string" + "additionalProperties": true } }, "required": [ - "jsonrpc" + "sessionId", + "id" ], - "title": "Client", - "type": "object" + "x-side": "agent", + "x-method": "nes/reject" }, - { - "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility", - "properties": { - "jsonrpc": { - "enum": [ - "2.0" - ], - "type": "string" + "NesRejectReason": { + "description": "The reason a suggestion was rejected.", + "oneOf": [ + { + "description": "The user explicitly dismissed the suggestion.", + "type": "string", + "const": "rejected" }, - "method": { - "type": "string" + { + "description": "The suggestion was shown but the user continued editing without interacting.", + "type": "string", + "const": "ignored" }, - "params": { - "anyOf": [ - { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/$defs/CancelRequestNotification" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or\nchanged at any point.\n\nCancels an ongoing request.\n\nThis is a notification sent by the side that sent a request to cancel that request.\n\nUpon receiving this notification, the receiver:\n\n1. MUST cancel the corresponding request activity and all nested activities\n2. MAY send any pending notifications.\n3. MUST send one of these responses for the original request:\n - Valid response with appropriate data (partial results or cancellation marker)\n - Error response with code `-32800` (Cancelled)\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/cancellation)", - "title": "CancelRequestNotification" - } - ], - "description": "General protocol-level notifications that all sides are expected to\nimplement.\n\nNotifications whose methods start with '$/' are messages which\nare protocol implementation dependent and might not be implementable in all\nclients or agents. For example if the implementation uses a single threaded\nsynchronous programming language then there is little it can do to react to\na `$/cancel_request` notification. If an agent or client receives\nnotifications starting with '$/' it is free to ignore the notification.\n\nNotifications do not expect a response." - }, + { + "description": "The suggestion was superseded by a newer suggestion.", + "type": "string", + "const": "replaced" + }, + { + "description": "The request was cancelled before the agent returned a response.", + "type": "string", + "const": "cancelled" + } + ] + }, + "CancelRequestNotification": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNotification to cancel an ongoing request.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/cancellation)", + "type": "object", + "properties": { + "requestId": { + "description": "The ID of the request to cancel.", + "allOf": [ { - "type": "null" + "$ref": "#/$defs/RequestId" } ] + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": [ + "object", + "null" + ], + "additionalProperties": true } }, "required": [ - "jsonrpc", - "method" + "requestId" ], - "title": "ProtocolLevel", - "type": "object", - "x-docs-ignore": true + "x-side": "protocol", + "x-method": "$/cancel_request" } - ], - "title": "Agent Client Protocol" + } } diff --git a/scripts/gen_all.py b/scripts/gen_all.py index 43c32a6..5dda553 100644 --- a/scripts/gen_all.py +++ b/scripts/gen_all.py @@ -22,6 +22,8 @@ VERSION_FILE = SCHEMA_DIR / "VERSION" DEFAULT_REPO = "agentclientprotocol/agent-client-protocol" +LEGACY_SCHEMA_PATHS = ("schema/schema.unstable.json", "schema/meta.unstable.json") +V1_SCHEMA_PATHS = ("schema/v1/schema.unstable.json", "schema/v1/meta.unstable.json") def parse_args() -> argparse.Namespace: @@ -101,6 +103,8 @@ def resolve_ref(version: str | None) -> str: return "refs/heads/main" if version.startswith("refs/"): return version + if re.fullmatch(r"schema-v\d+\.\d+\.\d+", version): + return f"refs/tags/{version}" if re.fullmatch(r"v?\d+\.\d+\.\d+", version): value = version if version.startswith("v") else f"v{version}" return f"refs/tags/{value}" @@ -109,11 +113,8 @@ def resolve_ref(version: str | None) -> str: def download_schema(repo: str, ref: str) -> None: SCHEMA_DIR.mkdir(parents=True, exist_ok=True) - schema_url = f"https://raw.githubusercontent.com/{repo}/{ref}/schema/schema.unstable.json" - meta_url = f"https://raw.githubusercontent.com/{repo}/{ref}/schema/meta.unstable.json" try: - schema_data = fetch_json(schema_url) - meta_data = fetch_json(meta_url) + schema_data, meta_data = fetch_schema_pair(repo, ref) except RuntimeError as exc: # pragma: no cover - network error path print(exc, file=sys.stderr) sys.exit(1) @@ -124,6 +125,26 @@ def download_schema(repo: str, ref: str) -> None: print(f"Fetched schema and meta from {repo}@{ref}") +def fetch_schema_pair(repo: str, ref: str) -> tuple[dict, dict]: + errors = [] + for schema_path, meta_path in schema_source_paths(ref): + schema_url = f"https://raw.githubusercontent.com/{repo}/{ref}/{schema_path}" + meta_url = f"https://raw.githubusercontent.com/{repo}/{ref}/{meta_path}" + try: + return fetch_json(schema_url), fetch_json(meta_url) + except RuntimeError as exc: + errors.append(str(exc)) + + attempted = "\n".join(f"- {error}" for error in errors) + raise RuntimeError(f"Failed to fetch schema and meta from {repo}@{ref}. Attempts:\n{attempted}") + + +def schema_source_paths(ref: str) -> tuple[tuple[str, str], ...]: + if re.fullmatch(r"refs/tags/schema-v\d+\.\d+\.\d+", ref): + return (V1_SCHEMA_PATHS, LEGACY_SCHEMA_PATHS) + return (LEGACY_SCHEMA_PATHS, V1_SCHEMA_PATHS) + + def fetch_json(url: str) -> dict: try: with urllib.request.urlopen(url) as response: # noqa: S310 - trusted source configured by repo diff --git a/src/acp/agent/connection.py b/src/acp/agent/connection.py index f775900..90aff79 100644 --- a/src/acp/agent/connection.py +++ b/src/acp/agent/connection.py @@ -105,7 +105,7 @@ async def session_update( @param_model(RequestPermissionRequest) async def request_permission( - self, options: list[PermissionOption], session_id: str, tool_call: ToolCallUpdate, **kwargs: Any + self, session_id: str, tool_call: ToolCallUpdate, options: list[PermissionOption], **kwargs: Any ) -> RequestPermissionResponse: return await request_model( self._conn, @@ -118,7 +118,7 @@ async def request_permission( @param_model(ReadTextFileRequest) async def read_text_file( - self, path: str, session_id: str, limit: int | None = None, line: int | None = None, **kwargs: Any + self, session_id: str, path: str, line: int | None = None, limit: int | None = None, **kwargs: Any ) -> ReadTextFileResponse: return await request_model( self._conn, @@ -129,7 +129,7 @@ async def read_text_file( @param_model(WriteTextFileRequest) async def write_text_file( - self, content: str, path: str, session_id: str, **kwargs: Any + self, session_id: str, path: str, content: str, **kwargs: Any ) -> WriteTextFileResponse | None: return await request_optional_model( self._conn, @@ -141,11 +141,11 @@ async def write_text_file( @param_model(CreateTerminalRequest) async def create_terminal( self, - command: str, session_id: str, + command: str, args: list[str] | None = None, - cwd: str | None = None, env: list[EnvVariable] | None = None, + cwd: str | None = None, output_byte_limit: int | None = None, **kwargs: Any, ) -> CreateTerminalResponse: diff --git a/src/acp/client/connection.py b/src/acp/client/connection.py index 7e50a88..0f3b1cf 100644 --- a/src/acp/client/connection.py +++ b/src/acp/client/connection.py @@ -121,8 +121,8 @@ async def load_session( self, cwd: str, session_id: str, - additional_directories: list[str] | None = None, mcp_servers: list[HttpMcpServer | SseMcpServer | AcpMcpServer | McpServerStdio] | None = None, + additional_directories: list[str] | None = None, **kwargs: Any, ) -> LoadSessionResponse: resolved_mcp_servers = mcp_servers or [] @@ -141,7 +141,7 @@ async def load_session( @param_model(ListSessionsRequest) async def list_sessions( - self, cursor: str | None = None, cwd: str | None = None, **kwargs: Any + self, cwd: str | None = None, cursor: str | None = None, **kwargs: Any ) -> ListSessionsResponse: return await request_model_from_dict( self._conn, @@ -151,7 +151,7 @@ async def list_sessions( ) @param_model(SetSessionModeRequest) - async def set_session_mode(self, mode_id: str, session_id: str, **kwargs: Any) -> SetSessionModeResponse: + async def set_session_mode(self, session_id: str, mode_id: str, **kwargs: Any) -> SetSessionModeResponse: return await request_model_from_dict( self._conn, AGENT_METHODS["session_set_mode"], @@ -188,6 +188,7 @@ async def authenticate(self, method_id: str, **kwargs: Any) -> AuthenticateRespo @param_model(PromptRequest) async def prompt( self, + session_id: str, prompt: list[ TextContentBlock | ImageContentBlock @@ -195,7 +196,6 @@ async def prompt( | ResourceContentBlock | EmbeddedResourceContentBlock ], - session_id: str, **kwargs: Any, ) -> PromptResponse: return await request_model( @@ -208,8 +208,8 @@ async def prompt( @param_model(ForkSessionRequest) async def fork_session( self, - cwd: str, session_id: str, + cwd: str, additional_directories: list[str] | None = None, mcp_servers: list[HttpMcpServer | SseMcpServer | AcpMcpServer | McpServerStdio] | None = None, **kwargs: Any, @@ -230,8 +230,8 @@ async def fork_session( @param_model(ResumeSessionRequest) async def resume_session( self, - cwd: str, session_id: str, + cwd: str, additional_directories: list[str] | None = None, mcp_servers: list[HttpMcpServer | SseMcpServer | AcpMcpServer | McpServerStdio] | None = None, **kwargs: Any, diff --git a/src/acp/interfaces.py b/src/acp/interfaces.py index 245cedc..4739e9c 100644 --- a/src/acp/interfaces.py +++ b/src/acp/interfaces.py @@ -80,7 +80,7 @@ class Client(Protocol): @param_model(RequestPermissionRequest) async def request_permission( - self, options: list[PermissionOption], session_id: str, tool_call: ToolCallUpdate, **kwargs: Any + self, session_id: str, tool_call: ToolCallUpdate, options: list[PermissionOption], **kwargs: Any ) -> RequestPermissionResponse: ... @param_model(SessionNotification) @@ -105,22 +105,22 @@ async def session_update( @param_model(WriteTextFileRequest) async def write_text_file( - self, content: str, path: str, session_id: str, **kwargs: Any + self, session_id: str, path: str, content: str, **kwargs: Any ) -> WriteTextFileResponse | None: ... @param_model(ReadTextFileRequest) async def read_text_file( - self, path: str, session_id: str, limit: int | None = None, line: int | None = None, **kwargs: Any + self, session_id: str, path: str, line: int | None = None, limit: int | None = None, **kwargs: Any ) -> ReadTextFileResponse: ... @param_model(CreateTerminalRequest) async def create_terminal( self, - command: str, session_id: str, + command: str, args: list[str] | None = None, - cwd: str | None = None, env: list[EnvVariable] | None = None, + cwd: str | None = None, output_byte_limit: int | None = None, **kwargs: Any, ) -> CreateTerminalResponse: ... @@ -172,18 +172,18 @@ async def load_session( self, cwd: str, session_id: str, - additional_directories: list[str] | None = None, mcp_servers: list[HttpMcpServer | SseMcpServer | AcpMcpServer | McpServerStdio] | None = None, + additional_directories: list[str] | None = None, **kwargs: Any, ) -> LoadSessionResponse | None: ... @param_model(ListSessionsRequest) async def list_sessions( - self, cursor: str | None = None, cwd: str | None = None, **kwargs: Any + self, cwd: str | None = None, cursor: str | None = None, **kwargs: Any ) -> ListSessionsResponse: ... @param_model(SetSessionModeRequest) - async def set_session_mode(self, mode_id: str, session_id: str, **kwargs: Any) -> SetSessionModeResponse | None: ... + async def set_session_mode(self, session_id: str, mode_id: str, **kwargs: Any) -> SetSessionModeResponse | None: ... @param_models(SetSessionConfigOptionBooleanRequest, SetSessionConfigOptionSelectRequest) async def set_config_option( @@ -196,6 +196,7 @@ async def authenticate(self, method_id: str, **kwargs: Any) -> AuthenticateRespo @param_model(PromptRequest) async def prompt( self, + session_id: str, prompt: list[ TextContentBlock | ImageContentBlock @@ -203,15 +204,14 @@ async def prompt( | ResourceContentBlock | EmbeddedResourceContentBlock ], - session_id: str, **kwargs: Any, ) -> PromptResponse: ... @param_model(ForkSessionRequest) async def fork_session( self, - cwd: str, session_id: str, + cwd: str, additional_directories: list[str] | None = None, mcp_servers: list[HttpMcpServer | SseMcpServer | AcpMcpServer | McpServerStdio] | None = None, **kwargs: Any, @@ -220,8 +220,8 @@ async def fork_session( @param_model(ResumeSessionRequest) async def resume_session( self, - cwd: str, session_id: str, + cwd: str, additional_directories: list[str] | None = None, mcp_servers: list[HttpMcpServer | SseMcpServer | AcpMcpServer | McpServerStdio] | None = None, **kwargs: Any, diff --git a/src/acp/meta.py b/src/acp/meta.py index c82dcb8..a7bd914 100644 --- a/src/acp/meta.py +++ b/src/acp/meta.py @@ -1,49 +1,49 @@ # Generated from schema/meta.json. Do not edit by hand. -# Schema ref: refs/tags/v0.13.6 +# Schema ref: refs/tags/schema-v1.16.0 AGENT_METHODS = { - "authenticate": "authenticate", - "document_did_change": "document/didChange", - "document_did_close": "document/didClose", - "document_did_focus": "document/didFocus", - "document_did_open": "document/didOpen", - "document_did_save": "document/didSave", "initialize": "initialize", - "logout": "logout", - "mcp_message": "mcp/message", - "nes_accept": "nes/accept", - "nes_close": "nes/close", - "nes_reject": "nes/reject", - "nes_start": "nes/start", - "nes_suggest": "nes/suggest", - "providers_disable": "providers/disable", + "authenticate": "authenticate", "providers_list": "providers/list", "providers_set": "providers/set", + "providers_disable": "providers/disable", + "session_new": "session/new", + "session_load": "session/load", + "session_set_mode": "session/set_mode", + "session_set_config_option": "session/set_config_option", + "session_prompt": "session/prompt", "session_cancel": "session/cancel", - "session_close": "session/close", + "mcp_message": "mcp/message", + "session_list": "session/list", "session_delete": "session/delete", "session_fork": "session/fork", - "session_list": "session/list", - "session_load": "session/load", - "session_new": "session/new", - "session_prompt": "session/prompt", "session_resume": "session/resume", - "session_set_config_option": "session/set_config_option", - "session_set_mode": "session/set_mode", + "session_close": "session/close", + "logout": "logout", + "nes_start": "nes/start", + "nes_suggest": "nes/suggest", + "nes_accept": "nes/accept", + "nes_reject": "nes/reject", + "nes_close": "nes/close", + "document_did_open": "document/didOpen", + "document_did_change": "document/didChange", + "document_did_close": "document/didClose", + "document_did_save": "document/didSave", + "document_did_focus": "document/didFocus", } CLIENT_METHODS = { - "elicitation_complete": "elicitation/complete", - "elicitation_create": "elicitation/create", - "fs_read_text_file": "fs/read_text_file", - "fs_write_text_file": "fs/write_text_file", - "mcp_connect": "mcp/connect", - "mcp_disconnect": "mcp/disconnect", - "mcp_message": "mcp/message", "session_request_permission": "session/request_permission", "session_update": "session/update", + "fs_write_text_file": "fs/write_text_file", + "fs_read_text_file": "fs/read_text_file", "terminal_create": "terminal/create", - "terminal_kill": "terminal/kill", "terminal_output": "terminal/output", "terminal_release": "terminal/release", "terminal_wait_for_exit": "terminal/wait_for_exit", + "terminal_kill": "terminal/kill", + "mcp_connect": "mcp/connect", + "mcp_message": "mcp/message", + "mcp_disconnect": "mcp/disconnect", + "elicitation_create": "elicitation/create", + "elicitation_complete": "elicitation/complete", } PROTOCOL_VERSION = 1 diff --git a/src/acp/schema.py b/src/acp/schema.py index 644e1d4..f84a240 100644 --- a/src/acp/schema.py +++ b/src/acp/schema.py @@ -1,5 +1,5 @@ # Generated from schema/schema.json. Do not edit by hand. -# Schema ref: refs/tags/v0.13.6 +# Schema ref: refs/tags/schema-v1.16.0 from __future__ import annotations @@ -30,7 +30,18 @@ class Jsonrpc(Enum): field_2_0 = "2.0" -class AuthCapabilities(BaseModel): +class ReadTextFileRequest(BaseModel): + # The session ID for this request. + session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] + # Absolute path to the file to read. + path: Annotated[str, Field(description="Absolute path to the file to read.")] + # Line number to start reading from (1-based). + line: Annotated[ + Optional[int], + Field(description="Line number to start reading from (1-based).", ge=0), + ] = None + # Maximum number of lines to read. + limit: Annotated[Optional[int], Field(description="Maximum number of lines to read.", ge=0)] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -43,18 +54,21 @@ class AuthCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Whether the client supports `terminal` authentication methods. - # - # When `true`, the agent may include `terminal` entries in its authentication methods. - terminal: Annotated[ - Optional[bool], - Field( - description="Whether the client supports `terminal` authentication methods.\n\nWhen `true`, the agent may include `terminal` entries in its authentication methods." - ), - ] = False -class AuthEnvVar(BaseModel): +class TextResourceContents(BaseModel): + # MIME type describing the encoded media payload. + mime_type: Annotated[ + Optional[str], + Field( + alias="mimeType", + description="MIME type describing the encoded media payload.", + ), + ] = None + # Text payload carried by this content block. + text: Annotated[str, Field(description="Text payload carried by this content block.")] + # URI associated with this resource or media payload. + uri: Annotated[str, Field(description="URI associated with this resource or media payload.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -67,36 +81,21 @@ class AuthEnvVar(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Human-readable label for this variable, displayed in client UI. - label: Annotated[ + + +class BlobResourceContents(BaseModel): + # Base64-encoded bytes for a binary resource payload. + blob: Annotated[str, Field(description="Base64-encoded bytes for a binary resource payload.")] + # MIME type describing the encoded media payload. + mime_type: Annotated[ Optional[str], - Field(description="Human-readable label for this variable, displayed in client UI."), - ] = None - # The environment variable name (e.g. `"OPENAI_API_KEY"`). - name: Annotated[ - str, - Field(description='The environment variable name (e.g. `"OPENAI_API_KEY"`).'), - ] - # Whether this variable is optional. - # - # Defaults to `false`. - optional: Annotated[ - Optional[bool], - Field(description="Whether this variable is optional.\n\nDefaults to `false`."), - ] = False - # Whether this value is a secret (e.g. API key, token). - # Clients should use a password-style input for secret vars. - # - # Defaults to `true`. - secret: Annotated[ - Optional[bool], Field( - description="Whether this value is a secret (e.g. API key, token).\nClients should use a password-style input for secret vars.\n\nDefaults to `true`." + alias="mimeType", + description="MIME type describing the encoded media payload.", ), - ] = True - - -class AuthMethodAgent(BaseModel): + ] = None + # URI associated with this resource or media payload. + uri: Annotated[str, Field(description="URI associated with this resource or media payload.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -109,18 +108,18 @@ class AuthMethodAgent(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Optional description providing more details about this authentication method. - description: Annotated[ - Optional[str], - Field(description="Optional description providing more details about this authentication method."), - ] = None - # Unique identifier for this authentication method. - id: Annotated[str, Field(description="Unique identifier for this authentication method.")] - # Human-readable name of the authentication method. - name: Annotated[str, Field(description="Human-readable name of the authentication method.")] -class AuthMethodEnvVar(BaseModel): +class Diff(BaseModel): + # The file path being modified. + path: Annotated[str, Field(description="The file path being modified.")] + # The original content (None for new files). + old_text: Annotated[ + Optional[str], + Field(alias="oldText", description="The original content (None for new files)."), + ] = None + # The new content after modification. + new_text: Annotated[str, Field(alias="newText", description="The new content after modification.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -133,28 +132,17 @@ class AuthMethodEnvVar(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Optional description providing more details about this authentication method. - description: Annotated[ - Optional[str], - Field(description="Optional description providing more details about this authentication method."), - ] = None - # Unique identifier for this authentication method. - id: Annotated[str, Field(description="Unique identifier for this authentication method.")] - # Optional link to a page where the user can obtain their credentials. - link: Annotated[ - Optional[str], - Field(description="Optional link to a page where the user can obtain their credentials."), - ] = None - # Human-readable name of the authentication method. - name: Annotated[str, Field(description="Human-readable name of the authentication method.")] - # The environment variables the client should set. - vars: Annotated[ - List[AuthEnvVar], - Field(description="The environment variables the client should set."), - ] -class AuthMethodTerminal(BaseModel): +class Terminal(BaseModel): + # Identifier of the terminal instance to embed in the content stream. + terminal_id: Annotated[ + str, + Field( + alias="terminalId", + description="Identifier of the terminal instance to embed in the content stream.", + ), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -167,28 +155,13 @@ class AuthMethodTerminal(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Additional arguments to pass when running the agent binary for terminal auth. - args: Annotated[ - Optional[List[str]], - Field(description="Additional arguments to pass when running the agent binary for terminal auth."), - ] = None - # Optional description providing more details about this authentication method. - description: Annotated[ - Optional[str], - Field(description="Optional description providing more details about this authentication method."), - ] = None - # Additional environment variables to set when running the agent binary for terminal auth. - env: Annotated[ - Optional[Dict[str, str]], - Field(description="Additional environment variables to set when running the agent binary for terminal auth."), - ] = None - # Unique identifier for this authentication method. - id: Annotated[str, Field(description="Unique identifier for this authentication method.")] - # Human-readable name of the authentication method. - name: Annotated[str, Field(description="Human-readable name of the authentication method.")] -class AuthenticateRequest(BaseModel): +class ToolCallLocation(BaseModel): + # The file path being accessed or modified. + path: Annotated[str, Field(description="The file path being accessed or modified.")] + # Optional line number within the file. + line: Annotated[Optional[int], Field(description="Optional line number within the file.", ge=0)] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -201,18 +174,13 @@ class AuthenticateRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the authentication method to use. - # Must be one of the methods advertised in the initialize response. - method_id: Annotated[ - str, - Field( - alias="methodId", - description="The ID of the authentication method to use.\nMust be one of the methods advertised in the initialize response.", - ), - ] -class AuthenticateResponse(BaseModel): +class EnvVariable(BaseModel): + # The name of the environment variable. + name: Annotated[str, Field(description="The name of the environment variable.")] + # The value to set for the environment variable. + value: Annotated[str, Field(description="The value to set for the environment variable.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -227,7 +195,14 @@ class AuthenticateResponse(BaseModel): ] = None -class BlobResourceContents(BaseModel): +class TerminalOutputRequest(BaseModel): + # The session ID for this request. + session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] + # The ID of the terminal to get output from. + terminal_id: Annotated[ + str, + Field(alias="terminalId", description="The ID of the terminal to get output from."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -240,21 +215,13 @@ class BlobResourceContents(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - blob: str - mime_type: Annotated[Optional[str], Field(alias="mimeType")] = None - uri: str - - -class BooleanPropertySchema(BaseModel): - # Default value. - default: Annotated[Optional[bool], Field(description="Default value.")] = None - # Human-readable description. - description: Annotated[Optional[str], Field(description="Human-readable description.")] = None - # Optional title for the property. - title: Annotated[Optional[str], Field(description="Optional title for the property.")] = None -class CloseNesResponse(BaseModel): +class ReleaseTerminalRequest(BaseModel): + # The session ID for this request. + session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] + # The ID of the terminal to release. + terminal_id: Annotated[str, Field(alias="terminalId", description="The ID of the terminal to release.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -269,7 +236,14 @@ class CloseNesResponse(BaseModel): ] = None -class CloseSessionResponse(BaseModel): +class WaitForTerminalExitRequest(BaseModel): + # The session ID for this request. + session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] + # The ID of the terminal to wait for. + terminal_id: Annotated[ + str, + Field(alias="terminalId", description="The ID of the terminal to wait for."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -284,14 +258,11 @@ class CloseSessionResponse(BaseModel): ] = None -class Cost(BaseModel): - # Total cumulative cost for session. - amount: Annotated[float, Field(description="Total cumulative cost for session.")] - # ISO 4217 currency code (e.g., "USD", "EUR"). - currency: Annotated[str, Field(description='ISO 4217 currency code (e.g., "USD", "EUR").')] - - -class DeclineElicitationResponse(BaseModel): +class KillTerminalRequest(BaseModel): + # The session ID for this request. + session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] + # The ID of the terminal to kill. + terminal_id: Annotated[str, Field(alias="terminalId", description="The ID of the terminal to kill.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -304,10 +275,34 @@ class DeclineElicitationResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - action: Literal["decline"] -class CancelElicitationResponse(BaseModel): +class ElicitationSessionScope(BaseModel): + # The session this elicitation is tied to. + session_id: Annotated[ + str, + Field(alias="sessionId", description="The session this elicitation is tied to."), + ] + # Optional tool call within the session. + tool_call_id: Annotated[ + Optional[str], + Field(alias="toolCallId", description="Optional tool call within the session."), + ] = None + + +class ElicitationRequestScope(BaseModel): + # The request this elicitation is tied to. + request_id: Annotated[ + Optional[Union[int, str]], + Field(alias="requestId", description="The request this elicitation is tied to."), + ] = None + + +class EnumOption(BaseModel): + # The constant value for this option. + const: Annotated[str, Field(description="The constant value for this option.")] + # Human-readable title for this option. + title: Annotated[str, Field(description="Human-readable title for this option.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -320,10 +315,42 @@ class CancelElicitationResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - action: Literal["cancel"] -class CreateTerminalResponse(BaseModel): +class StringPropertySchema(BaseModel): + # Optional title for the property. + title: Annotated[Optional[str], Field(description="Optional title for the property.")] = None + # Human-readable description. + description: Annotated[Optional[str], Field(description="Human-readable description.")] = None + # Minimum string length. + min_length: Annotated[ + Optional[int], + Field(alias="minLength", description="Minimum string length.", ge=0), + ] = None + # Maximum string length. + max_length: Annotated[ + Optional[int], + Field(alias="maxLength", description="Maximum string length.", ge=0), + ] = None + # Pattern the string must match. + pattern: Annotated[Optional[str], Field(description="Pattern the string must match.")] = None + # String format. + format: Annotated[Optional[str], Field(description="String format.")] = None + # Default value. + default: Annotated[Optional[str], Field(description="Default value.")] = None + # Enum values for untitled single-select enums. + enum: Annotated[ + Optional[List[str]], + Field(description="Enum values for untitled single-select enums."), + ] = None + # Titled enum options for titled single-select enums. + one_of: Annotated[ + Optional[List[EnumOption]], + Field( + alias="oneOf", + description="Titled enum options for titled single-select enums.", + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -336,17 +363,19 @@ class CreateTerminalResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The unique identifier for the created terminal. - terminal_id: Annotated[ - str, - Field( - alias="terminalId", - description="The unique identifier for the created terminal.", - ), - ] -class DeleteSessionResponse(BaseModel): +class NumberPropertySchema(BaseModel): + # Optional title for the property. + title: Annotated[Optional[str], Field(description="Optional title for the property.")] = None + # Human-readable description. + description: Annotated[Optional[str], Field(description="Human-readable description.")] = None + # Minimum value (inclusive). + minimum: Annotated[Optional[float], Field(description="Minimum value (inclusive).")] = None + # Maximum value (inclusive). + maximum: Annotated[Optional[float], Field(description="Maximum value (inclusive).")] = None + # Default value. + default: Annotated[Optional[float], Field(description="Default value.")] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -361,7 +390,17 @@ class DeleteSessionResponse(BaseModel): ] = None -class Diff(BaseModel): +class IntegerPropertySchema(BaseModel): + # Optional title for the property. + title: Annotated[Optional[str], Field(description="Optional title for the property.")] = None + # Human-readable description. + description: Annotated[Optional[str], Field(description="Human-readable description.")] = None + # Minimum value (inclusive). + minimum: Annotated[Optional[int], Field(description="Minimum value (inclusive).")] = None + # Maximum value (inclusive). + maximum: Annotated[Optional[int], Field(description="Maximum value (inclusive).")] = None + # Default value. + default: Annotated[Optional[int], Field(description="Default value.")] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -374,18 +413,15 @@ class Diff(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The new content after modification. - new_text: Annotated[str, Field(alias="newText", description="The new content after modification.")] - # The original content (None for new files). - old_text: Annotated[ - Optional[str], - Field(alias="oldText", description="The original content (None for new files)."), - ] = None - # The file path being modified. - path: Annotated[str, Field(description="The file path being modified.")] -class DisableProviderRequest(BaseModel): +class BooleanPropertySchema(BaseModel): + # Optional title for the property. + title: Annotated[Optional[str], Field(description="Optional title for the property.")] = None + # Human-readable description. + description: Annotated[Optional[str], Field(description="Human-readable description.")] = None + # Default value. + default: Annotated[Optional[bool], Field(description="Default value.")] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -398,11 +434,11 @@ class DisableProviderRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Provider id to disable. - id: Annotated[str, Field(description="Provider id to disable.")] -class DisableProviderResponse(BaseModel): +class TitledMultiSelectItems(BaseModel): + # Titled enum options. + any_of: Annotated[List[EnumOption], Field(alias="anyOf", description="Titled enum options.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -417,7 +453,52 @@ class DisableProviderResponse(BaseModel): ] = None -class DisconnectMcpResponse(BaseModel): +class ElicitationUrlSessionMode(ElicitationSessionScope): + # The unique identifier for this elicitation. + elicitation_id: Annotated[ + str, + Field( + alias="elicitationId", + description="The unique identifier for this elicitation.", + ), + ] + # The URL to direct the user to. + url: Annotated[AnyUrl, Field(description="The URL to direct the user to.")] + + +class ElicitationUrlRequestMode(ElicitationRequestScope): + # The unique identifier for this elicitation. + elicitation_id: Annotated[ + str, + Field( + alias="elicitationId", + description="The unique identifier for this elicitation.", + ), + ] + # The URL to direct the user to. + url: Annotated[AnyUrl, Field(description="The URL to direct the user to.")] + + +class ElicitationUrlMode(RootModel[Union[ElicitationUrlSessionMode, ElicitationUrlRequestMode]]): + # **UNSTABLE** + # + # This capability is not part of the spec yet, and may be removed or changed at any point. + # + # URL-based elicitation mode where the client directs the user to a URL. + root: Annotated[ + Union[ElicitationUrlSessionMode, ElicitationUrlRequestMode], + Field( + description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nURL-based elicitation mode where the client directs the user to a URL." + ), + ] + + +class DisconnectMcpRequest(BaseModel): + # The MCP-over-ACP connection to close. + connection_id: Annotated[ + str, + Field(alias="connectionId", description="The MCP-over-ACP connection to close."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -432,19 +513,22 @@ class DisconnectMcpResponse(BaseModel): ] = None -class ElicitationAcceptAction(BaseModel): - # The user-provided content, if any, as an object matching the requested schema. - content: Annotated[ - Optional[Dict[str, Any]], - Field(description="The user-provided content, if any, as an object matching the requested schema."), - ] = None - - -class ElicitationContentValue(RootModel[Union[str, int, float, bool, List[str]]]): - root: Union[str, int, float, bool, List[str]] - - -class ElicitationFormCapabilities(BaseModel): +class PromptCapabilities(BaseModel): + # Agent supports [`ContentBlock::Image`]. + image: Annotated[Optional[bool], Field(description="Agent supports [`ContentBlock::Image`].")] = False + # Agent supports [`ContentBlock::Audio`]. + audio: Annotated[Optional[bool], Field(description="Agent supports [`ContentBlock::Audio`].")] = False + # Agent supports embedded context in `session/prompt` requests. + # + # When enabled, the Client is allowed to include [`ContentBlock::Resource`] + # in prompt requests for pieces of context that are referenced in the message. + embedded_context: Annotated[ + Optional[bool], + Field( + alias="embeddedContext", + description="Agent supports embedded context in `session/prompt` requests.\n\nWhen enabled, the Client is allowed to include [`ContentBlock::Resource`]\nin prompt requests for pieces of context that are referenced in the message.", + ), + ] = False # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -459,11 +543,22 @@ class ElicitationFormCapabilities(BaseModel): ] = None -class ElicitationBooleanPropertySchema(BooleanPropertySchema): - type: Literal["boolean"] - - -class ElicitationUrlCapabilities(BaseModel): +class McpCapabilities(BaseModel): + # Agent supports [`McpServer::Http`]. + http: Annotated[Optional[bool], Field(description="Agent supports [`McpServer::Http`].")] = False + # Agent supports [`McpServer::Sse`]. + sse: Annotated[Optional[bool], Field(description="Agent supports [`McpServer::Sse`].")] = False + # **UNSTABLE** + # + # This capability is not part of the spec yet, and may be removed or changed at any point. + # + # Agent supports [`McpServer::Acp`]. + acp: Annotated[ + Optional[bool], + Field( + description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAgent supports [`McpServer::Acp`]." + ), + ] = False # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -478,14 +573,7 @@ class ElicitationUrlCapabilities(BaseModel): ] = None -class EnumOption(BaseModel): - # The constant value for this option. - const: Annotated[str, Field(description="The constant value for this option.")] - # Human-readable title for this option. - title: Annotated[str, Field(description="Human-readable title for this option.")] - - -class EnvVariable(BaseModel): +class SessionListCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -498,13 +586,9 @@ class EnvVariable(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The name of the environment variable. - name: Annotated[str, Field(description="The name of the environment variable.")] - # The value to set for the environment variable. - value: Annotated[str, Field(description="The value to set for the environment variable.")] -class FileSystemCapabilities(BaseModel): +class SessionDeleteCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -517,25 +601,9 @@ class FileSystemCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Whether the Client supports `fs/read_text_file` requests. - read_text_file: Annotated[ - Optional[bool], - Field( - alias="readTextFile", - description="Whether the Client supports `fs/read_text_file` requests.", - ), - ] = False - # Whether the Client supports `fs/write_text_file` requests. - write_text_file: Annotated[ - Optional[bool], - Field( - alias="writeTextFile", - description="Whether the Client supports `fs/write_text_file` requests.", - ), - ] = False -class HttpHeader(BaseModel): +class SessionAdditionalDirectoriesCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -548,13 +616,9 @@ class HttpHeader(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The name of the HTTP header. - name: Annotated[str, Field(description="The name of the HTTP header.")] - # The value to set for the HTTP header. - value: Annotated[str, Field(description="The value to set for the HTTP header.")] -class Implementation(BaseModel): +class SessionForkCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -567,48 +631,9 @@ class Implementation(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Intended for programmatic or logical use, but can be used as a display - # name fallback if title isn’t present. - name: Annotated[ - str, - Field( - description="Intended for programmatic or logical use, but can be used as a display\nname fallback if title isn’t present." - ), - ] - # Intended for UI and end-user contexts — optimized to be human-readable - # and easily understood. - # - # If not provided, the name should be used for display. - title: Annotated[ - Optional[str], - Field( - description="Intended for UI and end-user contexts — optimized to be human-readable\nand easily understood.\n\nIf not provided, the name should be used for display." - ), - ] = None - # Version of the implementation. Can be displayed to the user or used - # for debugging or metrics purposes. (e.g. "1.0.0"). - version: Annotated[ - str, - Field( - description='Version of the implementation. Can be displayed to the user or used\nfor debugging or metrics purposes. (e.g. "1.0.0").' - ), - ] - - -class IntegerPropertySchema(BaseModel): - # Default value. - default: Annotated[Optional[int], Field(description="Default value.")] = None - # Human-readable description. - description: Annotated[Optional[str], Field(description="Human-readable description.")] = None - # Maximum value (inclusive). - maximum: Annotated[Optional[int], Field(description="Maximum value (inclusive).")] = None - # Minimum value (inclusive). - minimum: Annotated[Optional[int], Field(description="Minimum value (inclusive).")] = None - # Optional title for the property. - title: Annotated[Optional[str], Field(description="Optional title for the property.")] = None -class KillTerminalResponse(BaseModel): +class SessionResumeCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -623,7 +648,7 @@ class KillTerminalResponse(BaseModel): ] = None -class ListProvidersRequest(BaseModel): +class SessionCloseCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -638,7 +663,7 @@ class ListProvidersRequest(BaseModel): ] = None -class ListSessionsRequest(BaseModel): +class LogoutCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -651,21 +676,9 @@ class ListSessionsRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Opaque cursor token from a previous response's nextCursor field for cursor-based pagination - cursor: Annotated[ - Optional[str], - Field( - description="Opaque cursor token from a previous response's nextCursor field for cursor-based pagination" - ), - ] = None - # Filter sessions by working directory. Must be an absolute path. - cwd: Annotated[ - Optional[str], - Field(description="Filter sessions by working directory. Must be an absolute path."), - ] = None -class LogoutCapabilities(BaseModel): +class ProvidersCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -680,7 +693,7 @@ class LogoutCapabilities(BaseModel): ] = None -class LogoutRequest(BaseModel): +class NesDocumentDidOpenCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -695,7 +708,7 @@ class LogoutRequest(BaseModel): ] = None -class LogoutResponse(BaseModel): +class NesDocumentDidCloseCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -710,7 +723,7 @@ class LogoutResponse(BaseModel): ] = None -class McpCapabilities(BaseModel): +class NesDocumentDidSaveCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -723,24 +736,33 @@ class McpCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # **UNSTABLE** - # - # This capability is not part of the spec yet, and may be removed or changed at any point. + + +class NesDocumentDidFocusCapabilities(BaseModel): + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. # - # Agent supports [`McpServer::Acp`]. - acp: Annotated[ - Optional[bool], + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAgent supports [`McpServer::Acp`]." + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), - ] = False - # Agent supports [`McpServer::Http`]. - http: Annotated[Optional[bool], Field(description="Agent supports [`McpServer::Http`].")] = False - # Agent supports [`McpServer::Sse`]. - sse: Annotated[Optional[bool], Field(description="Agent supports [`McpServer::Sse`].")] = False + ] = None -class McpServerHttp(BaseModel): +class NesRecentFilesCapabilities(BaseModel): + # Maximum number of recent files the agent can use. + max_count: Annotated[ + Optional[int], + Field( + alias="maxCount", + description="Maximum number of recent files the agent can use.", + ge=0, + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -753,18 +775,9 @@ class McpServerHttp(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # HTTP headers to set when making requests to the MCP server. - headers: Annotated[ - List[HttpHeader], - Field(description="HTTP headers to set when making requests to the MCP server."), - ] - # Human-readable name identifying this MCP server. - name: Annotated[str, Field(description="Human-readable name identifying this MCP server.")] - # URL to the MCP server. - url: Annotated[str, Field(description="URL to the MCP server.")] -class McpServerSse(BaseModel): +class NesRelatedSnippetsCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -777,18 +790,18 @@ class McpServerSse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # HTTP headers to set when making requests to the MCP server. - headers: Annotated[ - List[HttpHeader], - Field(description="HTTP headers to set when making requests to the MCP server."), - ] - # Human-readable name identifying this MCP server. - name: Annotated[str, Field(description="Human-readable name identifying this MCP server.")] - # URL to the MCP server. - url: Annotated[str, Field(description="URL to the MCP server.")] -class McpServerStdio(BaseModel): +class NesEditHistoryCapabilities(BaseModel): + # Maximum number of edit history entries the agent can use. + max_count: Annotated[ + Optional[int], + Field( + alias="maxCount", + description="Maximum number of edit history entries the agent can use.", + ge=0, + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -801,23 +814,18 @@ class McpServerStdio(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Command-line arguments to pass to the MCP server. - args: Annotated[ - List[str], - Field(description="Command-line arguments to pass to the MCP server."), - ] - # Path to the MCP server executable. - command: Annotated[str, Field(description="Path to the MCP server executable.")] - # Environment variables to set when launching the MCP server. - env: Annotated[ - List[EnvVariable], - Field(description="Environment variables to set when launching the MCP server."), - ] - # Human-readable name identifying this MCP server. - name: Annotated[str, Field(description="Human-readable name identifying this MCP server.")] -class MessageMcpNotification(BaseModel): +class NesUserActionsCapabilities(BaseModel): + # Maximum number of user actions the agent can use. + max_count: Annotated[ + Optional[int], + Field( + alias="maxCount", + description="Maximum number of user actions the agent can use.", + ge=0, + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -830,28 +838,24 @@ class MessageMcpNotification(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The MCP-over-ACP connection this message is sent on. - connection_id: Annotated[ - str, - Field( - alias="connectionId", - description="The MCP-over-ACP connection this message is sent on.", - ), - ] - # The inner MCP method name. - method: Annotated[str, Field(description="The inner MCP method name.")] - # Optional inner MCP params. + + +class NesOpenFilesCapabilities(BaseModel): + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. # - # If omitted or set to `null`, the inner MCP message has no params. - params: Annotated[ + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ Optional[Dict[str, Any]], Field( - description="Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params." + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None -class MessageMcpRequest(BaseModel): +class NesDiagnosticsCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -864,28 +868,70 @@ class MessageMcpRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The MCP-over-ACP connection this message is sent on. - connection_id: Annotated[ + + +class AuthEnvVar(BaseModel): + # The environment variable name (e.g. `"OPENAI_API_KEY"`). + name: Annotated[ str, + Field(description='The environment variable name (e.g. `"OPENAI_API_KEY"`).'), + ] + # Human-readable label for this variable, displayed in client UI. + label: Annotated[ + Optional[str], + Field(description="Human-readable label for this variable, displayed in client UI."), + ] = None + # Whether this value is a secret (e.g. API key, token). + # Clients should use a password-style input for secret vars. + # + # Defaults to `true`. + secret: Annotated[ + Optional[bool], Field( - alias="connectionId", - description="The MCP-over-ACP connection this message is sent on.", + description="Whether this value is a secret (e.g. API key, token).\nClients should use a password-style input for secret vars.\n\nDefaults to `true`." ), - ] - # The inner MCP method name. - method: Annotated[str, Field(description="The inner MCP method name.")] - # Optional inner MCP params. + ] = True + # Whether this variable is optional. # - # If omitted or set to `null`, the inner MCP message has no params. - params: Annotated[ + # Defaults to `false`. + optional: Annotated[ + Optional[bool], + Field(description="Whether this variable is optional.\n\nDefaults to `false`."), + ] = False + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ Optional[Dict[str, Any]], Field( - description="Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params." + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None -class NesDiagnosticsCapabilities(BaseModel): +class AuthMethodEnvVar(BaseModel): + # Unique identifier for this authentication method. + id: Annotated[str, Field(description="Unique identifier for this authentication method.")] + # Human-readable name of the authentication method. + name: Annotated[str, Field(description="Human-readable name of the authentication method.")] + # Optional description providing more details about this authentication method. + description: Annotated[ + Optional[str], + Field(description="Optional description providing more details about this authentication method."), + ] = None + # The environment variables the client should set. + vars: Annotated[ + List[AuthEnvVar], + Field(description="The environment variables the client should set."), + ] + # Optional link to a page where the user can obtain their credentials. + link: Annotated[ + Optional[str], + Field(description="Optional link to a page where the user can obtain their credentials."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -900,7 +946,26 @@ class NesDiagnosticsCapabilities(BaseModel): ] = None -class NesDocumentDidCloseCapabilities(BaseModel): +class AuthMethodTerminal(BaseModel): + # Unique identifier for this authentication method. + id: Annotated[str, Field(description="Unique identifier for this authentication method.")] + # Human-readable name of the authentication method. + name: Annotated[str, Field(description="Human-readable name of the authentication method.")] + # Optional description providing more details about this authentication method. + description: Annotated[ + Optional[str], + Field(description="Optional description providing more details about this authentication method."), + ] = None + # Additional arguments to pass when running the agent binary for terminal auth. + args: Annotated[ + Optional[List[str]], + Field(description="Additional arguments to pass when running the agent binary for terminal auth."), + ] = None + # Additional environment variables to set when running the agent binary for terminal auth. + env: Annotated[ + Optional[Dict[str, str]], + Field(description="Additional environment variables to set when running the agent binary for terminal auth."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -915,7 +980,16 @@ class NesDocumentDidCloseCapabilities(BaseModel): ] = None -class NesDocumentDidFocusCapabilities(BaseModel): +class AuthMethodAgent(BaseModel): + # Unique identifier for this authentication method. + id: Annotated[str, Field(description="Unique identifier for this authentication method.")] + # Human-readable name of the authentication method. + name: Annotated[str, Field(description="Human-readable name of the authentication method.")] + # Optional description providing more details about this authentication method. + description: Annotated[ + Optional[str], + Field(description="Optional description providing more details about this authentication method."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -930,7 +1004,33 @@ class NesDocumentDidFocusCapabilities(BaseModel): ] = None -class NesDocumentDidOpenCapabilities(BaseModel): +class Implementation(BaseModel): + # Intended for programmatic or logical use, but can be used as a display + # name fallback if title isn’t present. + name: Annotated[ + str, + Field( + description="Intended for programmatic or logical use, but can be used as a display\nname fallback if title isn’t present." + ), + ] + # Intended for UI and end-user contexts — optimized to be human-readable + # and easily understood. + # + # If not provided, the name should be used for display. + title: Annotated[ + Optional[str], + Field( + description="Intended for UI and end-user contexts — optimized to be human-readable\nand easily understood.\n\nIf not provided, the name should be used for display." + ), + ] = None + # Version of the implementation. Can be displayed to the user or used + # for debugging or metrics purposes. (e.g. "1.0.0"). + version: Annotated[ + str, + Field( + description='Version of the implementation. Can be displayed to the user or used\nfor debugging or metrics purposes. (e.g. "1.0.0").' + ), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -945,7 +1045,7 @@ class NesDocumentDidOpenCapabilities(BaseModel): ] = None -class NesDocumentDidSaveCapabilities(BaseModel): +class AuthenticateResponse(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -960,7 +1060,17 @@ class NesDocumentDidSaveCapabilities(BaseModel): ] = None -class NesEditHistoryCapabilities(BaseModel): +class ProviderCurrentConfig(BaseModel): + # Protocol currently used by this provider. + api_type: Annotated[ + str, + Field(alias="apiType", description="Protocol currently used by this provider."), + ] + # Base URL currently used by this provider. + base_url: Annotated[ + str, + Field(alias="baseUrl", description="Base URL currently used by this provider."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -973,48 +1083,9 @@ class NesEditHistoryCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Maximum number of edit history entries the agent can use. - max_count: Annotated[ - Optional[int], - Field( - alias="maxCount", - description="Maximum number of edit history entries the agent can use.", - ge=0, - ), - ] = None - - -class NesEditHistoryEntry(BaseModel): - # A diff representing the edit. - diff: Annotated[str, Field(description="A diff representing the edit.")] - # The URI of the edited file. - uri: Annotated[str, Field(description="The URI of the edited file.")] - - -class NesExcerpt(BaseModel): - # The end line of the excerpt (zero-based). - end_line: Annotated[ - int, - Field( - alias="endLine", - description="The end line of the excerpt (zero-based).", - ge=0, - ), - ] - # The start line of the excerpt (zero-based). - start_line: Annotated[ - int, - Field( - alias="startLine", - description="The start line of the excerpt (zero-based).", - ge=0, - ), - ] - # The text content of the excerpt. - text: Annotated[str, Field(description="The text content of the excerpt.")] -class NesJumpCapabilities(BaseModel): +class SetProviderResponse(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1029,7 +1100,7 @@ class NesJumpCapabilities(BaseModel): ] = None -class NesOpenFilesCapabilities(BaseModel): +class DisableProviderResponse(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1044,16 +1115,7 @@ class NesOpenFilesCapabilities(BaseModel): ] = None -class NesRecentFile(BaseModel): - # The language identifier. - language_id: Annotated[str, Field(alias="languageId", description="The language identifier.")] - # The full text content of the file. - text: Annotated[str, Field(description="The full text content of the file.")] - # The URI of the file. - uri: Annotated[str, Field(description="The URI of the file.")] - - -class NesRecentFilesCapabilities(BaseModel): +class LogoutResponse(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1066,25 +1128,21 @@ class NesRecentFilesCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Maximum number of recent files the agent can use. - max_count: Annotated[ - Optional[int], - Field( - alias="maxCount", - description="Maximum number of recent files the agent can use.", - ge=0, - ), - ] = None - - -class NesRelatedSnippet(BaseModel): - # The code excerpts. - excerpts: Annotated[List[NesExcerpt], Field(description="The code excerpts.")] - # The URI of the file containing the snippets. - uri: Annotated[str, Field(description="The URI of the file containing the snippets.")] -class NesRelatedSnippetsCapabilities(BaseModel): +class SessionMode(BaseModel): + # Stable identifier used to refer to this protocol object in later messages. + id: Annotated[ + str, + Field(description="Stable identifier used to refer to this protocol object in later messages."), + ] + # Human-readable name shown for this protocol object. + name: Annotated[str, Field(description="Human-readable name shown for this protocol object.")] + # Optional human-readable details shown with this protocol object. + description: Annotated[ + Optional[str], + Field(description="Optional human-readable details shown with this protocol object."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1099,7 +1157,13 @@ class NesRelatedSnippetsCapabilities(BaseModel): ] = None -class NesRenameCapabilities(BaseModel): +class SessionConfigSelectOption(BaseModel): + # Unique identifier for this option value. + value: Annotated[str, Field(description="Unique identifier for this option value.")] + # Human-readable label for this option value. + name: Annotated[str, Field(description="Human-readable label for this option value.")] + # Optional description for this option value. + description: Annotated[Optional[str], Field(description="Optional description for this option value.")] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1114,16 +1178,41 @@ class NesRenameCapabilities(BaseModel): ] = None -class NesRepository(BaseModel): - # The repository name. - name: Annotated[str, Field(description="The repository name.")] - # The repository owner. - owner: Annotated[str, Field(description="The repository owner.")] - # The remote URL of the repository. - remote_url: Annotated[str, Field(alias="remoteUrl", description="The remote URL of the repository.")] +class SessionConfigBoolean(BaseModel): + # The current value of the boolean option. + current_value: Annotated[ + bool, + Field(alias="currentValue", description="The current value of the boolean option."), + ] -class NesSearchAndReplaceCapabilities(BaseModel): +class SessionInfo(BaseModel): + # Unique identifier for the session + session_id: Annotated[str, Field(alias="sessionId", description="Unique identifier for the session")] + # The working directory for this session. Must be an absolute path. + cwd: Annotated[ + str, + Field(description="The working directory for this session. Must be an absolute path."), + ] + # Additional workspace roots reported for this session. Each path must be absolute. + # + # When present, this is the complete ordered additional-root list reported + # by the Agent. Omitted and empty values are equivalent: the response + # reports no additional roots. + additional_directories: Annotated[ + Optional[List[str]], + Field( + alias="additionalDirectories", + description="Additional workspace roots reported for this session. Each path must be absolute.\n\nWhen present, this is the complete ordered additional-root list reported\nby the Agent. Omitted and empty values are equivalent: the response\nreports no additional roots.", + ), + ] = None + # Human-readable title for the session + title: Annotated[Optional[str], Field(description="Human-readable title for the session")] = None + # ISO 8601 timestamp of last activity + updated_at: Annotated[ + Optional[str], + Field(alias="updatedAt", description="ISO 8601 timestamp of last activity"), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1138,30 +1227,22 @@ class NesSearchAndReplaceCapabilities(BaseModel): ] = None -class NesSearchAndReplaceSuggestion(BaseModel): - # Unique identifier for accept/reject tracking. - id: Annotated[str, Field(description="Unique identifier for accept/reject tracking.")] - # Whether `search` is a regular expression. Defaults to `false`. - is_regex: Annotated[ - Optional[bool], +class DeleteSessionResponse(BaseModel): + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - alias="isRegex", - description="Whether `search` is a regular expression. Defaults to `false`.", + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The replacement text. - replace: Annotated[str, Field(description="The replacement text.")] - # The text or pattern to find. - search: Annotated[str, Field(description="The text or pattern to find.")] - # The file URI to search within. - uri: Annotated[str, Field(description="The file URI to search within.")] - -class NesSearchAndReplaceSuggestionVariant(NesSearchAndReplaceSuggestion): - kind: Literal["searchAndReplace"] - -class NesUserActionsCapabilities(BaseModel): +class CloseSessionResponse(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1174,31 +1255,9 @@ class NesUserActionsCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Maximum number of user actions the agent can use. - max_count: Annotated[ - Optional[int], - Field( - alias="maxCount", - description="Maximum number of user actions the agent can use.", - ge=0, - ), - ] = None - - -class NumberPropertySchema(BaseModel): - # Default value. - default: Annotated[Optional[float], Field(description="Default value.")] = None - # Human-readable description. - description: Annotated[Optional[str], Field(description="Human-readable description.")] = None - # Maximum value (inclusive). - maximum: Annotated[Optional[float], Field(description="Maximum value (inclusive).")] = None - # Minimum value (inclusive). - minimum: Annotated[Optional[float], Field(description="Minimum value (inclusive).")] = None - # Optional title for the property. - title: Annotated[Optional[str], Field(description="Optional title for the property.")] = None -class PlanCapabilities(BaseModel): +class SetSessionModeResponse(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1213,7 +1272,49 @@ class PlanCapabilities(BaseModel): ] = None -class PlanMarkdown(BaseModel): +class Usage(BaseModel): + # Sum of all token types across session. + total_tokens: Annotated[ + int, + Field( + alias="totalTokens", + description="Sum of all token types across session.", + ge=0, + ), + ] + # Total input tokens across all turns. + input_tokens: Annotated[ + int, + Field( + alias="inputTokens", + description="Total input tokens across all turns.", + ge=0, + ), + ] + # Total output tokens across all turns. + output_tokens: Annotated[ + int, + Field( + alias="outputTokens", + description="Total output tokens across all turns.", + ge=0, + ), + ] + # Total thought/reasoning tokens + thought_tokens: Annotated[ + Optional[int], + Field(alias="thoughtTokens", description="Total thought/reasoning tokens", ge=0), + ] = None + # Total cache read tokens. + cached_read_tokens: Annotated[ + Optional[int], + Field(alias="cachedReadTokens", description="Total cache read tokens.", ge=0), + ] = None + # Total cache write tokens. + cached_write_tokens: Annotated[ + Optional[int], + Field(alias="cachedWriteTokens", description="Total cache write tokens.", ge=0), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1226,13 +1327,17 @@ class PlanMarkdown(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Markdown content for the plan. - content: Annotated[str, Field(description="Markdown content for the plan.")] - # The plan ID to update. - id: Annotated[str, Field(description="The plan ID to update.")] -class PlanRemoved(BaseModel): +class StartNesResponse(BaseModel): + # The session ID for the newly started NES session. + session_id: Annotated[ + str, + Field( + alias="sessionId", + description="The session ID for the newly started NES session.", + ), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1245,25 +1350,16 @@ class PlanRemoved(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The plan ID to remove. - id: Annotated[str, Field(description="The plan ID to remove.")] - - -class PlanUpdateMarkdown(PlanMarkdown): - type: Literal["markdown"] class Position(BaseModel): + # Zero-based line number. + line: Annotated[int, Field(description="Zero-based line number.", ge=0)] # Zero-based character offset (encoding-dependent). character: Annotated[ int, Field(description="Zero-based character offset (encoding-dependent).", ge=0), ] - # Zero-based line number. - line: Annotated[int, Field(description="Zero-based line number.", ge=0)] - - -class PromptCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1276,37 +1372,15 @@ class PromptCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Agent supports [`ContentBlock::Audio`]. - audio: Annotated[Optional[bool], Field(description="Agent supports [`ContentBlock::Audio`].")] = False - # Agent supports embedded context in `session/prompt` requests. - # - # When enabled, the Client is allowed to include [`ContentBlock::Resource`] - # in prompt requests for pieces of context that are referenced in the message. - embedded_context: Annotated[ - Optional[bool], - Field( - alias="embeddedContext", - description="Agent supports embedded context in `session/prompt` requests.\n\nWhen enabled, the Client is allowed to include [`ContentBlock::Resource`]\nin prompt requests for pieces of context that are referenced in the message.", - ), - ] = False - # Agent supports [`ContentBlock::Image`]. - image: Annotated[Optional[bool], Field(description="Agent supports [`ContentBlock::Image`].")] = False - - -class ProviderCurrentConfig(BaseModel): - # Protocol currently used by this provider. - api_type: Annotated[ - str, - Field(alias="apiType", description="Protocol currently used by this provider."), - ] - # Base URL currently used by this provider. - base_url: Annotated[ - str, - Field(alias="baseUrl", description="Base URL currently used by this provider."), - ] -class ProviderInfo(BaseModel): +class NesJumpSuggestion(BaseModel): + # Unique identifier for accept/reject tracking. + id: Annotated[str, Field(description="Unique identifier for accept/reject tracking.")] + # The file to navigate to. + uri: Annotated[str, Field(description="The file to navigate to.")] + # The target position within the file. + position: Annotated[Position, Field(description="The target position within the file.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1319,27 +1393,17 @@ class ProviderInfo(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Current effective non-secret routing config. - # Null or omitted means provider is disabled. - current: Annotated[ - Optional[ProviderCurrentConfig], - Field(description="Current effective non-secret routing config.\nNull or omitted means provider is disabled."), - ] = None - # Provider identifier, for example "main" or "openai". - id: Annotated[str, Field(description='Provider identifier, for example "main" or "openai".')] - # Whether this provider is mandatory and cannot be disabled via `providers/disable`. - # If true, clients must not call `providers/disable` for this id. - required: Annotated[ - bool, - Field( - description="Whether this provider is mandatory and cannot be disabled via `providers/disable`.\nIf true, clients must not call `providers/disable` for this id." - ), - ] - # Supported protocol types for this provider. - supported: Annotated[List[str], Field(description="Supported protocol types for this provider.")] -class ProvidersCapabilities(BaseModel): +class NesRenameSuggestion(BaseModel): + # Unique identifier for accept/reject tracking. + id: Annotated[str, Field(description="Unique identifier for accept/reject tracking.")] + # The file URI containing the symbol. + uri: Annotated[str, Field(description="The file URI containing the symbol.")] + # The position of the symbol to rename. + position: Annotated[Position, Field(description="The position of the symbol to rename.")] + # The new name for the symbol. + new_name: Annotated[str, Field(alias="newName", description="The new name for the symbol.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1354,30 +1418,23 @@ class ProvidersCapabilities(BaseModel): ] = None -class Range(BaseModel): - # The end position (exclusive). - end: Annotated[Position, Field(description="The end position (exclusive).")] - # The start position (inclusive). - start: Annotated[Position, Field(description="The start position (inclusive).")] - - -class ReadTextFileResponse(BaseModel): - # The _meta property is reserved by ACP to allow clients and agents to attach additional - # metadata to their interactions. Implementations MUST NOT make assumptions about values at - # these keys. - # - # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) - field_meta: Annotated[ - Optional[Dict[str, Any]], +class NesSearchAndReplaceSuggestion(BaseModel): + # Unique identifier for accept/reject tracking. + id: Annotated[str, Field(description="Unique identifier for accept/reject tracking.")] + # The file URI to search within. + uri: Annotated[str, Field(description="The file URI to search within.")] + # The text or pattern to find. + search: Annotated[str, Field(description="The text or pattern to find.")] + # The replacement text. + replace: Annotated[str, Field(description="The replacement text.")] + # Whether `search` is a regular expression. Defaults to `false`. + is_regex: Annotated[ + Optional[bool], Field( - alias="_meta", - description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + alias="isRegex", + description="Whether `search` is a regular expression. Defaults to `false`.", ), ] = None - content: str - - -class ReleaseTerminalResponse(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1392,16 +1449,7 @@ class ReleaseTerminalResponse(BaseModel): ] = None -class DeniedOutcome(BaseModel): - outcome: Literal["cancelled"] - - -class Role(Enum): - assistant = "assistant" - user = "user" - - -class SelectedPermissionOutcome(BaseModel): +class CloseNesResponse(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1414,14 +1462,13 @@ class SelectedPermissionOutcome(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the option the user selected. - option_id: Annotated[ - str, - Field(alias="optionId", description="The ID of the option the user selected."), - ] -class SessionAdditionalDirectoriesCapabilities(BaseModel): +class PlanFile(BaseModel): + # The plan ID to update. + id: Annotated[str, Field(description="The plan ID to update.")] + # The URI of the file containing the plan. + uri: Annotated[str, Field(description="The URI of the file containing the plan.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1436,7 +1483,11 @@ class SessionAdditionalDirectoriesCapabilities(BaseModel): ] = None -class SessionCloseCapabilities(BaseModel): +class PlanMarkdown(BaseModel): + # The plan ID to update. + id: Annotated[str, Field(description="The plan ID to update.")] + # Markdown content for the plan. + content: Annotated[str, Field(description="Markdown content for the plan.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1451,15 +1502,9 @@ class SessionCloseCapabilities(BaseModel): ] = None -class SessionConfigBoolean(BaseModel): - # The current value of the boolean option. - current_value: Annotated[ - bool, - Field(alias="currentValue", description="The current value of the boolean option."), - ] - - -class SessionDeleteCapabilities(BaseModel): +class PlanRemoved(BaseModel): + # The plan ID to remove. + id: Annotated[str, Field(description="The plan ID to remove.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1474,7 +1519,12 @@ class SessionDeleteCapabilities(BaseModel): ] = None -class SessionForkCapabilities(BaseModel): +class UnstructuredCommandInput(BaseModel): + # A hint to display when the input hasn't been provided yet + hint: Annotated[ + str, + Field(description="A hint to display when the input hasn't been provided yet"), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1489,7 +1539,9 @@ class SessionForkCapabilities(BaseModel): ] = None -class SessionInfo(BaseModel): +class _CurrentModeUpdate(BaseModel): + # The ID of the current mode + current_mode_id: Annotated[str, Field(alias="currentModeId", description="The ID of the current mode")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1502,47 +1554,9 @@ class SessionInfo(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Additional workspace roots reported for this session. Each path must be absolute. - # - # When present, this is the complete ordered additional-root list reported - # by the Agent. Omitted and empty values are equivalent: the response - # reports no additional roots. - additional_directories: Annotated[ - Optional[List[str]], - Field( - alias="additionalDirectories", - description="Additional workspace roots reported for this session. Each path must be absolute.\n\nWhen present, this is the complete ordered additional-root list reported\nby the Agent. Omitted and empty values are equivalent: the response\nreports no additional roots.", - ), - ] = None - # The working directory for this session. Must be an absolute path. - cwd: Annotated[ - str, - Field(description="The working directory for this session. Must be an absolute path."), - ] - # Unique identifier for the session - session_id: Annotated[str, Field(alias="sessionId", description="Unique identifier for the session")] - # Human-readable title for the session - title: Annotated[Optional[str], Field(description="Human-readable title for the session")] = None - # ISO 8601 timestamp of last activity - updated_at: Annotated[ - Optional[str], - Field(alias="updatedAt", description="ISO 8601 timestamp of last activity"), - ] = None class _SessionInfoUpdate(BaseModel): - # The _meta property is reserved by ACP to allow clients and agents to attach additional - # metadata to their interactions. Implementations MUST NOT make assumptions about values at - # these keys. - # - # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) - field_meta: Annotated[ - Optional[Dict[str, Any]], - Field( - alias="_meta", - description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - ), - ] = None # Human-readable title for the session. Set to null to clear. title: Annotated[ Optional[str], @@ -1556,9 +1570,6 @@ class _SessionInfoUpdate(BaseModel): description="ISO 8601 timestamp of last activity. Set to null to clear.", ), ] = None - - -class SessionListCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1573,7 +1584,11 @@ class SessionListCapabilities(BaseModel): ] = None -class SessionResumeCapabilities(BaseModel): +class Cost(BaseModel): + # Total cumulative cost for session. + amount: Annotated[float, Field(description="Total cumulative cost for session.")] + # ISO 4217 currency code (e.g., "USD", "EUR"). + currency: Annotated[str, Field(description='ISO 4217 currency code (e.g., "USD", "EUR").')] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1588,15 +1603,13 @@ class SessionResumeCapabilities(BaseModel): ] = None -class AgentPlanRemovedUpdate(PlanRemoved): - session_update: Annotated[Literal["plan_removed"], Field(alias="sessionUpdate")] - - -class SessionInfoUpdate(_SessionInfoUpdate): - session_update: Annotated[Literal["session_info_update"], Field(alias="sessionUpdate")] - - -class SetProviderRequest(BaseModel): +class _UsageUpdate(BaseModel): + # Tokens currently in context. + used: Annotated[int, Field(description="Tokens currently in context.", ge=0)] + # Total context window size in tokens. + size: Annotated[int, Field(description="Total context window size in tokens.", ge=0)] + # Cumulative session cost (optional). + cost: Annotated[Optional[Cost], Field(description="Cumulative session cost (optional).")] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1609,29 +1622,17 @@ class SetProviderRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Protocol type for this provider. - api_type: Annotated[str, Field(alias="apiType", description="Protocol type for this provider.")] - # Base URL for requests sent through this provider. - base_url: Annotated[ + + +class CompleteElicitationNotification(BaseModel): + # The ID of the elicitation that completed. + elicitation_id: Annotated[ str, Field( - alias="baseUrl", - description="Base URL for requests sent through this provider.", + alias="elicitationId", + description="The ID of the elicitation that completed.", ), ] - # Full headers map for this provider. - # May include authorization, routing, or other integration-specific headers. - headers: Annotated[ - Optional[Dict[str, str]], - Field( - description="Full headers map for this provider.\nMay include authorization, routing, or other integration-specific headers." - ), - ] = None - # Provider id to configure. - id: Annotated[str, Field(description="Provider id to configure.")] - - -class SetProviderResponse(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1646,7 +1647,26 @@ class SetProviderResponse(BaseModel): ] = None -class SetSessionConfigOptionBooleanRequest(BaseModel): +class MessageMcpNotification(BaseModel): + # The MCP-over-ACP connection this message is sent on. + connection_id: Annotated[ + str, + Field( + alias="connectionId", + description="The MCP-over-ACP connection this message is sent on.", + ), + ] + # The inner MCP method name. + method: Annotated[str, Field(description="The inner MCP method name.")] + # Optional inner MCP params. + # + # If omitted or set to `null`, the inner MCP message has no params. + params: Annotated[ + Optional[Dict[str, Any]], + Field( + description="Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params." + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1659,25 +1679,25 @@ class SetSessionConfigOptionBooleanRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the configuration option to set. - config_id: Annotated[ - str, - Field(alias="configId", description="The ID of the configuration option to set."), - ] - # The ID of the session to set the configuration option for. - session_id: Annotated[ - str, - Field( - alias="sessionId", - description="The ID of the session to set the configuration option for.", - ), - ] - type: Literal["boolean"] - # The boolean value. - value: Annotated[bool, Field(description="The boolean value.")] -class SetSessionConfigOptionSelectRequest(BaseModel): +class FileSystemCapabilities(BaseModel): + # Whether the Client supports `fs/read_text_file` requests. + read_text_file: Annotated[ + Optional[bool], + Field( + alias="readTextFile", + description="Whether the Client supports `fs/read_text_file` requests.", + ), + ] = False + # Whether the Client supports `fs/write_text_file` requests. + write_text_file: Annotated[ + Optional[bool], + Field( + alias="writeTextFile", + description="Whether the Client supports `fs/write_text_file` requests.", + ), + ] = False # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1690,24 +1710,9 @@ class SetSessionConfigOptionSelectRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the configuration option to set. - config_id: Annotated[ - str, - Field(alias="configId", description="The ID of the configuration option to set."), - ] - # The ID of the session to set the configuration option for. - session_id: Annotated[ - str, - Field( - alias="sessionId", - description="The ID of the session to set the configuration option for.", - ), - ] - # The value ID. - value: Annotated[str, Field(description="The value ID.")] -class SetSessionModeRequest(BaseModel): +class BooleanConfigOptionCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1720,16 +1725,9 @@ class SetSessionModeRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the mode to set. - mode_id: Annotated[str, Field(alias="modeId", description="The ID of the mode to set.")] - # The ID of the session to set the mode for. - session_id: Annotated[ - str, - Field(alias="sessionId", description="The ID of the session to set the mode for."), - ] -class SetSessionModeResponse(BaseModel): +class PlanCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1744,7 +1742,16 @@ class SetSessionModeResponse(BaseModel): ] = None -class StartNesResponse(BaseModel): +class AuthCapabilities(BaseModel): + # Whether the client supports `terminal` authentication methods. + # + # When `true`, the agent may include `terminal` entries in its authentication methods. + terminal: Annotated[ + Optional[bool], + Field( + description="Whether the client supports `terminal` authentication methods.\n\nWhen `true`, the agent may include `terminal` entries in its authentication methods." + ), + ] = False # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1757,53 +1764,24 @@ class StartNesResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The session ID for the newly started NES session. - session_id: Annotated[ - str, - Field( - alias="sessionId", - description="The session ID for the newly started NES session.", - ), - ] -class StringPropertySchema(BaseModel): - # Default value. - default: Annotated[Optional[str], Field(description="Default value.")] = None - # Human-readable description. - description: Annotated[Optional[str], Field(description="Human-readable description.")] = None - # Enum values for untitled single-select enums. - enum: Annotated[ - Optional[List[str]], - Field(description="Enum values for untitled single-select enums."), - ] = None - # String format. - format: Annotated[Optional[str], Field(description="String format.")] = None - # Maximum string length. - max_length: Annotated[ - Optional[int], - Field(alias="maxLength", description="Maximum string length.", ge=0), - ] = None - # Minimum string length. - min_length: Annotated[ - Optional[int], - Field(alias="minLength", description="Minimum string length.", ge=0), - ] = None - # Titled enum options for titled single-select enums. - one_of: Annotated[ - Optional[List[EnumOption]], +class ElicitationFormCapabilities(BaseModel): + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - alias="oneOf", - description="Titled enum options for titled single-select enums.", + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Pattern the string must match. - pattern: Annotated[Optional[str], Field(description="Pattern the string must match.")] = None - # Optional title for the property. - title: Annotated[Optional[str], Field(description="Optional title for the property.")] = None -class Terminal(BaseModel): +class ElicitationUrlCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1816,10 +1794,9 @@ class Terminal(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - terminal_id: Annotated[str, Field(alias="terminalId")] -class TerminalExitStatus(BaseModel): +class NesJumpCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1832,23 +1809,24 @@ class TerminalExitStatus(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The process exit code (may be null if terminated by signal). - exit_code: Annotated[ - Optional[int], + + +class NesRenameCapabilities(BaseModel): + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - alias="exitCode", - description="The process exit code (may be null if terminated by signal).", - ge=0, + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The signal that terminated the process (may be null if exited normally). - signal: Annotated[ - Optional[str], - Field(description="The signal that terminated the process (may be null if exited normally)."), - ] = None -class TerminalOutputRequest(BaseModel): +class NesSearchAndReplaceCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1861,16 +1839,33 @@ class TerminalOutputRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The session ID for this request. - session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] - # The ID of the terminal to get output from. - terminal_id: Annotated[ + + +class AuthenticateRequest(BaseModel): + # The ID of the authentication method to use. + # Must be one of the methods advertised in the initialize response. + method_id: Annotated[ str, - Field(alias="terminalId", description="The ID of the terminal to get output from."), + Field( + alias="methodId", + description="The ID of the authentication method to use.\nMust be one of the methods advertised in the initialize response.", + ), ] + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), + ] = None -class TerminalOutputResponse(BaseModel): +class ListProvidersRequest(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1883,31 +1878,29 @@ class TerminalOutputResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Exit status if the command has completed. - exit_status: Annotated[ - Optional[TerminalExitStatus], - Field(alias="exitStatus", description="Exit status if the command has completed."), - ] = None - # The terminal output captured so far. - output: Annotated[str, Field(description="The terminal output captured so far.")] - # Whether the output was truncated due to byte limits. - truncated: Annotated[bool, Field(description="Whether the output was truncated due to byte limits.")] -class TextDocumentContentChangeEvent(BaseModel): - # The range of the document that changed. If `None`, the entire content is replaced. - range: Annotated[ - Optional[Range], - Field(description="The range of the document that changed. If `None`, the entire content is replaced."), - ] = None - # The new text for the range, or the full document content if `range` is `None`. - text: Annotated[ +class SetProviderRequest(BaseModel): + # Provider id to configure. + id: Annotated[str, Field(description="Provider id to configure.")] + # Protocol type for this provider. + api_type: Annotated[str, Field(alias="apiType", description="Protocol type for this provider.")] + # Base URL for requests sent through this provider. + base_url: Annotated[ str, - Field(description="The new text for the range, or the full document content if `range` is `None`."), + Field( + alias="baseUrl", + description="Base URL for requests sent through this provider.", + ), ] - - -class TextResourceContents(BaseModel): + # Full headers map for this provider. + # May include authorization, routing, or other integration-specific headers. + headers: Annotated[ + Optional[Dict[str, str]], + Field( + description="Full headers map for this provider.\nMay include authorization, routing, or other integration-specific headers." + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1920,25 +1913,26 @@ class TextResourceContents(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - mime_type: Annotated[Optional[str], Field(alias="mimeType")] = None - text: str - uri: str - - -class TitledMultiSelectItems(BaseModel): - # Titled enum options. - any_of: Annotated[List[EnumOption], Field(alias="anyOf", description="Titled enum options.")] - - -class FileEditToolCallContent(Diff): - type: Literal["diff"] -class TerminalToolCallContent(Terminal): - type: Literal["terminal"] +class DisableProviderRequest(BaseModel): + # Provider id to disable. + id: Annotated[str, Field(description="Provider id to disable.")] + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), + ] = None -class ToolCallLocation(BaseModel): +class LogoutRequest(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1951,13 +1945,13 @@ class ToolCallLocation(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Optional line number within the file. - line: Annotated[Optional[int], Field(description="Optional line number within the file.", ge=0)] = None - # The file path being accessed or modified. - path: Annotated[str, Field(description="The file path being accessed or modified.")] -class UnstructuredCommandInput(BaseModel): +class HttpHeader(BaseModel): + # The name of the HTTP header. + name: Annotated[str, Field(description="The name of the HTTP header.")] + # The value to set for the HTTP header. + value: Annotated[str, Field(description="The value to set for the HTTP header.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -1970,66 +1964,18 @@ class UnstructuredCommandInput(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # A hint to display when the input hasn't been provided yet - hint: Annotated[ - str, - Field(description="A hint to display when the input hasn't been provided yet"), - ] -class UntitledMultiSelectItems(BaseModel): - # Allowed enum values. - enum: Annotated[List[str], Field(description="Allowed enum values.")] - # Item type discriminator. Must be `"string"`. - type: Annotated[str, Field(description='Item type discriminator. Must be `"string"`.')] - - -class Usage(BaseModel): - # Total cache read tokens. - cached_read_tokens: Annotated[ - Optional[int], - Field(alias="cachedReadTokens", description="Total cache read tokens.", ge=0), - ] = None - # Total cache write tokens. - cached_write_tokens: Annotated[ - Optional[int], - Field(alias="cachedWriteTokens", description="Total cache write tokens.", ge=0), - ] = None - # Total input tokens across all turns. - input_tokens: Annotated[ - int, - Field( - alias="inputTokens", - description="Total input tokens across all turns.", - ge=0, - ), - ] - # Total output tokens across all turns. - output_tokens: Annotated[ - int, - Field( - alias="outputTokens", - description="Total output tokens across all turns.", - ge=0, - ), - ] - # Total thought/reasoning tokens - thought_tokens: Annotated[ - Optional[int], - Field(alias="thoughtTokens", description="Total thought/reasoning tokens", ge=0), - ] = None - # Sum of all token types across session. - total_tokens: Annotated[ - int, - Field( - alias="totalTokens", - description="Sum of all token types across session.", - ge=0, - ), +class McpServerHttp(BaseModel): + # Human-readable name identifying this MCP server. + name: Annotated[str, Field(description="Human-readable name identifying this MCP server.")] + # URL to the MCP server. + url: Annotated[str, Field(description="URL to the MCP server.")] + # HTTP headers to set when making requests to the MCP server. + headers: Annotated[ + List[HttpHeader], + Field(description="HTTP headers to set when making requests to the MCP server."), ] - - -class _UsageUpdate(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2042,15 +1988,18 @@ class _UsageUpdate(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Cumulative session cost (optional). - cost: Annotated[Optional[Cost], Field(description="Cumulative session cost (optional).")] = None - # Total context window size in tokens. - size: Annotated[int, Field(description="Total context window size in tokens.", ge=0)] - # Tokens currently in context. - used: Annotated[int, Field(description="Tokens currently in context.", ge=0)] -class WaitForTerminalExitRequest(BaseModel): +class McpServerSse(BaseModel): + # Human-readable name identifying this MCP server. + name: Annotated[str, Field(description="Human-readable name identifying this MCP server.")] + # URL to the MCP server. + url: Annotated[str, Field(description="URL to the MCP server.")] + # HTTP headers to set when making requests to the MCP server. + headers: Annotated[ + List[HttpHeader], + Field(description="HTTP headers to set when making requests to the MCP server."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2063,16 +2012,21 @@ class WaitForTerminalExitRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The session ID for this request. - session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] - # The ID of the terminal to wait for. - terminal_id: Annotated[ - str, - Field(alias="terminalId", description="The ID of the terminal to wait for."), - ] -class WaitForTerminalExitResponse(BaseModel): +class McpServerAcp(BaseModel): + # Human-readable name identifying this MCP server. + name: Annotated[str, Field(description="Human-readable name identifying this MCP server.")] + # Unique identifier for this MCP server, generated by the component providing it. + # + # Providers MUST NOT reuse an ID for multiple ACP-transport MCP servers that are visible + # on the same ACP connection. + id: Annotated[ + str, + Field( + description="Unique identifier for this MCP server, generated by the component providing it.\n\nProviders MUST NOT reuse an ID for multiple ACP-transport MCP servers that are visible\non the same ACP connection." + ), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2085,30 +2039,23 @@ class WaitForTerminalExitResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The process exit code (may be null if terminated by signal). - exit_code: Annotated[ - Optional[int], - Field( - alias="exitCode", - description="The process exit code (may be null if terminated by signal).", - ge=0, - ), - ] = None - # The signal that terminated the process (may be null if exited normally). - signal: Annotated[ - Optional[str], - Field(description="The signal that terminated the process (may be null if exited normally)."), - ] = None - - -class WorkspaceFolder(BaseModel): - # The display name of the folder. - name: Annotated[str, Field(description="The display name of the folder.")] - # The URI of the folder. - uri: Annotated[str, Field(description="The URI of the folder.")] -class WriteTextFileRequest(BaseModel): +class McpServerStdio(BaseModel): + # Human-readable name identifying this MCP server. + name: Annotated[str, Field(description="Human-readable name identifying this MCP server.")] + # Path to the MCP server executable. + command: Annotated[str, Field(description="Path to the MCP server executable.")] + # Command-line arguments to pass to the MCP server. + args: Annotated[ + List[str], + Field(description="Command-line arguments to pass to the MCP server."), + ] + # Environment variables to set when launching the MCP server. + env: Annotated[ + List[EnvVariable], + Field(description="Environment variables to set when launching the MCP server."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2121,15 +2068,21 @@ class WriteTextFileRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The text content to write to the file. - content: Annotated[str, Field(description="The text content to write to the file.")] - # Absolute path to the file to write. - path: Annotated[str, Field(description="Absolute path to the file to write.")] - # The session ID for this request. - session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] -class WriteTextFileResponse(BaseModel): +class ListSessionsRequest(BaseModel): + # Filter sessions by working directory. Must be an absolute path. + cwd: Annotated[ + Optional[str], + Field(description="Filter sessions by working directory. Must be an absolute path."), + ] = None + # Opaque cursor token from a previous response's nextCursor field for cursor-based pagination + cursor: Annotated[ + Optional[str], + Field( + description="Opaque cursor token from a previous response's nextCursor field for cursor-based pagination" + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2144,7 +2097,9 @@ class WriteTextFileResponse(BaseModel): ] = None -class AcceptNesNotification(BaseModel): +class DeleteSessionRequest(BaseModel): + # The ID of the session to delete. + session_id: Annotated[str, Field(alias="sessionId", description="The ID of the session to delete.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2157,16 +2112,11 @@ class AcceptNesNotification(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the accepted suggestion. - id: Annotated[str, Field(description="The ID of the accepted suggestion.")] - # The session ID for this notification. - session_id: Annotated[ - str, - Field(alias="sessionId", description="The session ID for this notification."), - ] -class AgentAuthCapabilities(BaseModel): +class CloseSessionRequest(BaseModel): + # The ID of the session to close. + session_id: Annotated[str, Field(alias="sessionId", description="The ID of the session to close.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2179,18 +2129,16 @@ class AgentAuthCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Whether the agent supports the logout method. - # - # By supplying `{}` it means that the agent supports the logout method. - logout: Annotated[ - Optional[LogoutCapabilities], - Field( - description="Whether the agent supports the logout method.\n\nBy supplying `{}` it means that the agent supports the logout method." - ), - ] = None -class Annotations(BaseModel): +class SetSessionModeRequest(BaseModel): + # The ID of the session to set the mode for. + session_id: Annotated[ + str, + Field(alias="sessionId", description="The ID of the session to set the mode for."), + ] + # The ID of the mode to set. + mode_id: Annotated[str, Field(alias="modeId", description="The ID of the mode to set.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2203,12 +2151,22 @@ class Annotations(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - audience: Optional[List[Role]] = None - last_modified: Annotated[Optional[str], Field(alias="lastModified")] = None - priority: Optional[float] = None -class AudioContent(BaseModel): +class SetSessionConfigOptionBooleanRequest(BaseModel): + # The ID of the session to set the configuration option for. + session_id: Annotated[ + str, + Field( + alias="sessionId", + description="The ID of the session to set the configuration option for.", + ), + ] + # The ID of the configuration option to set. + config_id: Annotated[ + str, + Field(alias="configId", description="The ID of the configuration option to set."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2221,28 +2179,25 @@ class AudioContent(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - annotations: Optional[Annotations] = None - data: str - mime_type: Annotated[str, Field(alias="mimeType")] - - -class EnvVarAuthMethod(AuthMethodEnvVar): - type: Literal["env_var"] - - -class TerminalAuthMethod(AuthMethodTerminal): - type: Literal["terminal"] + # The boolean value. + value: Annotated[bool, Field(description="The boolean value.")] + type: Literal["boolean"] -class AvailableCommandInput(RootModel[UnstructuredCommandInput]): - # The input specification for a command. - root: Annotated[ - UnstructuredCommandInput, - Field(description="The input specification for a command."), +class SetSessionConfigOptionSelectRequest(BaseModel): + # The ID of the session to set the configuration option for. + session_id: Annotated[ + str, + Field( + alias="sessionId", + description="The ID of the session to set the configuration option for.", + ), + ] + # The ID of the configuration option to set. + config_id: Annotated[ + str, + Field(alias="configId", description="The ID of the configuration option to set."), ] - - -class CancelNotification(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2255,17 +2210,15 @@ class CancelNotification(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the session to cancel operations for. - session_id: Annotated[ - str, - Field( - alias="sessionId", - description="The ID of the session to cancel operations for.", - ), - ] + # The value ID. + value: Annotated[str, Field(description="The value ID.")] -class CancelRequestNotification(BaseModel): +class WorkspaceFolder(BaseModel): + # The URI of the folder. + uri: Annotated[str, Field(description="The URI of the folder.")] + # The display name of the folder. + name: Annotated[str, Field(description="The display name of the folder.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2278,14 +2231,15 @@ class CancelRequestNotification(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the request to cancel. - request_id: Annotated[ - Optional[Union[int, str]], - Field(alias="requestId", description="The ID of the request to cancel."), - ] = None -class ClientNesCapabilities(BaseModel): +class NesRepository(BaseModel): + # The repository name. + name: Annotated[str, Field(description="The repository name.")] + # The repository owner. + owner: Annotated[str, Field(description="The repository owner.")] + # The remote URL of the repository. + remote_url: Annotated[str, Field(alias="remoteUrl", description="The remote URL of the repository.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2298,27 +2252,15 @@ class ClientNesCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Whether the client supports the `jump` suggestion kind. - jump: Annotated[ - Optional[NesJumpCapabilities], - Field(description="Whether the client supports the `jump` suggestion kind."), - ] = None - # Whether the client supports the `rename` suggestion kind. - rename: Annotated[ - Optional[NesRenameCapabilities], - Field(description="Whether the client supports the `rename` suggestion kind."), - ] = None - # Whether the client supports the `searchAndReplace` suggestion kind. - search_and_replace: Annotated[ - Optional[NesSearchAndReplaceCapabilities], - Field( - alias="searchAndReplace", - description="Whether the client supports the `searchAndReplace` suggestion kind.", - ), - ] = None -class CloseNesRequest(BaseModel): +class NesRecentFile(BaseModel): + # The URI of the file. + uri: Annotated[str, Field(description="The URI of the file.")] + # The language identifier. + language_id: Annotated[str, Field(alias="languageId", description="The language identifier.")] + # The full text content of the file. + text: Annotated[str, Field(description="The full text content of the file.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2331,11 +2273,29 @@ class CloseNesRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the NES session to close. - session_id: Annotated[str, Field(alias="sessionId", description="The ID of the NES session to close.")] -class CloseSessionRequest(BaseModel): +class NesExcerpt(BaseModel): + # The start line of the excerpt (zero-based). + start_line: Annotated[ + int, + Field( + alias="startLine", + description="The start line of the excerpt (zero-based).", + ge=0, + ), + ] + # The end line of the excerpt (zero-based). + end_line: Annotated[ + int, + Field( + alias="endLine", + description="The end line of the excerpt (zero-based).", + ge=0, + ), + ] + # The text content of the excerpt. + text: Annotated[str, Field(description="The text content of the excerpt.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2348,11 +2308,13 @@ class CloseSessionRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the session to close. - session_id: Annotated[str, Field(alias="sessionId", description="The ID of the session to close.")] -class CompleteElicitationNotification(BaseModel): +class NesEditHistoryEntry(BaseModel): + # The URI of the edited file. + uri: Annotated[str, Field(description="The URI of the edited file.")] + # A diff representing the edit. + diff: Annotated[str, Field(description="A diff representing the edit.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2365,17 +2327,27 @@ class CompleteElicitationNotification(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the elicitation that completed. - elicitation_id: Annotated[ + + +class NesUserAction(BaseModel): + # The kind of action (e.g., "insertChar", "cursorMovement"). + action: Annotated[ str, + Field(description='The kind of action (e.g., "insertChar", "cursorMovement").'), + ] + # The URI of the file where the action occurred. + uri: Annotated[str, Field(description="The URI of the file where the action occurred.")] + # The position where the action occurred. + position: Annotated[Position, Field(description="The position where the action occurred.")] + # Timestamp in milliseconds since epoch. + timestamp_ms: Annotated[ + int, Field( - alias="elicitationId", - description="The ID of the elicitation that completed.", + alias="timestampMs", + description="Timestamp in milliseconds since epoch.", + ge=0, ), ] - - -class ConnectMcpRequest(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2388,17 +2360,11 @@ class ConnectMcpRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ACP MCP server ID that was provided by the component declaring the MCP server. - acp_id: Annotated[ - str, - Field( - alias="acpId", - description="The ACP MCP server ID that was provided by the component declaring the MCP server.", - ), - ] -class ConnectMcpResponse(BaseModel): +class CloseNesRequest(BaseModel): + # The ID of the NES session to close. + session_id: Annotated[str, Field(alias="sessionId", description="The ID of the NES session to close.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2411,21 +2377,9 @@ class ConnectMcpResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The unique identifier for this MCP-over-ACP connection. - connection_id: Annotated[ - str, - Field( - alias="connectionId", - description="The unique identifier for this MCP-over-ACP connection.", - ), - ] - -class AudioContentBlock(AudioContent): - type: Literal["audio"] - -class AcceptElicitationResponse(ElicitationAcceptAction): +class WriteTextFileResponse(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2438,10 +2392,11 @@ class AcceptElicitationResponse(ElicitationAcceptAction): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - action: Literal["accept"] -class CreateTerminalRequest(BaseModel): +class ReadTextFileResponse(BaseModel): + # Content payload returned by this response. + content: Annotated[str, Field(description="Content payload returned by this response.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2454,41 +2409,18 @@ class CreateTerminalRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Array of command arguments. - args: Annotated[Optional[List[str]], Field(description="Array of command arguments.")] = None - # The command to execute. - command: Annotated[str, Field(description="The command to execute.")] - # Working directory for the command (absolute path). - cwd: Annotated[ - Optional[str], - Field(description="Working directory for the command (absolute path)."), - ] = None - # Environment variables for the command. - env: Annotated[ - Optional[List[EnvVariable]], - Field(description="Environment variables for the command."), - ] = None - # Maximum number of output bytes to retain. - # - # When the limit is exceeded, the Client truncates from the beginning of the output - # to stay within the limit. - # - # The Client MUST ensure truncation happens at a character boundary to maintain valid - # string output, even if this means the retained output is slightly less than the - # specified limit. - output_byte_limit: Annotated[ - Optional[int], - Field( - alias="outputByteLimit", - description="Maximum number of output bytes to retain.\n\nWhen the limit is exceeded, the Client truncates from the beginning of the output\nto stay within the limit.\n\nThe Client MUST ensure truncation happens at a character boundary to maintain valid\nstring output, even if this means the retained output is slightly less than the\nspecified limit.", - ge=0, - ), - ] = None - # The session ID for this request. - session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] -class _CurrentModeUpdate(BaseModel): +class DeniedOutcome(BaseModel): + outcome: Literal["cancelled"] + + +class SelectedPermissionOutcome(BaseModel): + # The ID of the option the user selected. + option_id: Annotated[ + str, + Field(alias="optionId", description="The ID of the option the user selected."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2501,11 +2433,17 @@ class _CurrentModeUpdate(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the current mode - current_mode_id: Annotated[str, Field(alias="currentModeId", description="The ID of the current mode")] -class DeleteSessionRequest(BaseModel): +class CreateTerminalResponse(BaseModel): + # The unique identifier for the created terminal. + terminal_id: Annotated[ + str, + Field( + alias="terminalId", + description="The unique identifier for the created terminal.", + ), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2518,11 +2456,23 @@ class DeleteSessionRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the session to delete. - session_id: Annotated[str, Field(alias="sessionId", description="The ID of the session to delete.")] -class DidChangeDocumentNotification(BaseModel): +class TerminalExitStatus(BaseModel): + # The process exit code (may be null if terminated by signal). + exit_code: Annotated[ + Optional[int], + Field( + alias="exitCode", + description="The process exit code (may be null if terminated by signal).", + ge=0, + ), + ] = None + # The signal that terminated the process (may be null if exited normally). + signal: Annotated[ + Optional[str], + Field(description="The signal that terminated the process (may be null if exited normally)."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2535,23 +2485,9 @@ class DidChangeDocumentNotification(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The content changes. - content_changes: Annotated[ - List[TextDocumentContentChangeEvent], - Field(alias="contentChanges", description="The content changes."), - ] - # The session ID for this notification. - session_id: Annotated[ - str, - Field(alias="sessionId", description="The session ID for this notification."), - ] - # The URI of the changed document. - uri: Annotated[str, Field(description="The URI of the changed document.")] - # The new version number of the document. - version: Annotated[int, Field(description="The new version number of the document.")] -class DidCloseDocumentNotification(BaseModel): +class ReleaseTerminalResponse(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2564,16 +2500,23 @@ class DidCloseDocumentNotification(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The session ID for this notification. - session_id: Annotated[ - str, - Field(alias="sessionId", description="The session ID for this notification."), - ] - # The URI of the closed document. - uri: Annotated[str, Field(description="The URI of the closed document.")] -class DidFocusDocumentNotification(BaseModel): +class WaitForTerminalExitResponse(BaseModel): + # The process exit code (may be null if terminated by signal). + exit_code: Annotated[ + Optional[int], + Field( + alias="exitCode", + description="The process exit code (may be null if terminated by signal).", + ge=0, + ), + ] = None + # The signal that terminated the process (may be null if exited normally). + signal: Annotated[ + Optional[str], + Field(description="The signal that terminated the process (may be null if exited normally)."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2586,28 +2529,9 @@ class DidFocusDocumentNotification(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The current cursor position. - position: Annotated[Position, Field(description="The current cursor position.")] - # The session ID for this notification. - session_id: Annotated[ - str, - Field(alias="sessionId", description="The session ID for this notification."), - ] - # The URI of the focused document. - uri: Annotated[str, Field(description="The URI of the focused document.")] - # The version number of the document. - version: Annotated[int, Field(description="The version number of the document.")] - # The portion of the file currently visible in the editor viewport. - visible_range: Annotated[ - Range, - Field( - alias="visibleRange", - description="The portion of the file currently visible in the editor viewport.", - ), - ] -class DidOpenDocumentNotification(BaseModel): +class KillTerminalResponse(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2620,28 +2544,9 @@ class DidOpenDocumentNotification(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The language identifier of the document (e.g., "rust", "python"). - language_id: Annotated[ - str, - Field( - alias="languageId", - description='The language identifier of the document (e.g., "rust", "python").', - ), - ] - # The session ID for this notification. - session_id: Annotated[ - str, - Field(alias="sessionId", description="The session ID for this notification."), - ] - # The full text content of the document. - text: Annotated[str, Field(description="The full text content of the document.")] - # The URI of the opened document. - uri: Annotated[str, Field(description="The URI of the opened document.")] - # The version number of the document. - version: Annotated[int, Field(description="The version number of the document.")] -class DidSaveDocumentNotification(BaseModel): +class DeclineElicitationResponse(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2654,16 +2559,10 @@ class DidSaveDocumentNotification(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The session ID for this notification. - session_id: Annotated[ - str, - Field(alias="sessionId", description="The session ID for this notification."), - ] - # The URI of the saved document. - uri: Annotated[str, Field(description="The URI of the saved document.")] + action: Literal["decline"] -class DisconnectMcpRequest(BaseModel): +class CancelElicitationResponse(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2676,14 +2575,34 @@ class DisconnectMcpRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The MCP-over-ACP connection to close. - connection_id: Annotated[ - str, - Field(alias="connectionId", description="The MCP-over-ACP connection to close."), + action: Literal["cancel"] + + +class ElicitationContentValue(RootModel[Union[str, int, float, bool, List[str]]]): + # Allowed wire representations for [`ElicitationContentValue`]. + root: Annotated[ + Union[str, int, float, bool, List[str]], + Field(description="Allowed wire representations for [`ElicitationContentValue`]."), ] -class ElicitationCapabilities(BaseModel): +class ElicitationAcceptAction(BaseModel): + # The user-provided content, if any, as an object matching the requested schema. + content: Annotated[ + Optional[Dict[str, Any]], + Field(description="The user-provided content, if any, as an object matching the requested schema."), + ] = None + + +class ConnectMcpResponse(BaseModel): + # The unique identifier for this MCP-over-ACP connection. + connection_id: Annotated[ + str, + Field( + alias="connectionId", + description="The unique identifier for this MCP-over-ACP connection.", + ), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2696,119 +2615,66 @@ class ElicitationCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Whether the client supports form-based elicitation. - form: Annotated[ - Optional[ElicitationFormCapabilities], - Field(description="Whether the client supports form-based elicitation."), - ] = None - # Whether the client supports URL-based elicitation. - url: Annotated[ - Optional[ElicitationUrlCapabilities], - Field(description="Whether the client supports URL-based elicitation."), - ] = None - - -class ElicitationStringPropertySchema(StringPropertySchema): - type: Literal["string"] - - -class ElicitationNumberPropertySchema(NumberPropertySchema): - type: Literal["number"] - - -class ElicitationIntegerPropertySchema(IntegerPropertySchema): - type: Literal["integer"] - - -class ElicitationRequestScope(BaseModel): - # The request this elicitation is tied to. - request_id: Annotated[ - Optional[Union[int, str]], - Field(alias="requestId", description="The request this elicitation is tied to."), - ] = None - - -class ElicitationSessionScope(BaseModel): - # The session this elicitation is tied to. - session_id: Annotated[ - str, - Field(alias="sessionId", description="The session this elicitation is tied to."), - ] - # Optional tool call within the session. - tool_call_id: Annotated[ - Optional[str], - Field(alias="toolCallId", description="Optional tool call within the session."), - ] = None -class ElicitationUrlSessionMode(ElicitationSessionScope): - # The unique identifier for this elicitation. - elicitation_id: Annotated[ - str, +class DisconnectMcpResponse(BaseModel): + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - alias="elicitationId", - description="The unique identifier for this elicitation.", + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), - ] - # The URL to direct the user to. - url: Annotated[AnyUrl, Field(description="The URL to direct the user to.")] + ] = None -class ElicitationUrlRequestMode(ElicitationRequestScope): - # The unique identifier for this elicitation. - elicitation_id: Annotated[ +class CancelNotification(BaseModel): + # The ID of the session to cancel operations for. + session_id: Annotated[ str, Field( - alias="elicitationId", - description="The unique identifier for this elicitation.", + alias="sessionId", + description="The ID of the session to cancel operations for.", ), ] - # The URL to direct the user to. - url: Annotated[AnyUrl, Field(description="The URL to direct the user to.")] - - -class ElicitationUrlMode(RootModel[Union[ElicitationUrlSessionMode, ElicitationUrlRequestMode]]): - # **UNSTABLE** - # - # This capability is not part of the spec yet, and may be removed or changed at any point. + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. # - # URL-based elicitation mode where the client directs the user to a URL. - root: Annotated[ - Union[ElicitationUrlSessionMode, ElicitationUrlRequestMode], + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nURL-based elicitation mode where the client directs the user to a URL." + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), - ] + ] = None -class Error(BaseModel): - # A number indicating the error type that occurred. - # This must be an integer as defined in the JSON-RPC specification. - code: Annotated[ - int, - Field( - description="A number indicating the error type that occurred.\nThis must be an integer as defined in the JSON-RPC specification." - ), +class DidOpenDocumentNotification(BaseModel): + # The session ID for this notification. + session_id: Annotated[ + str, + Field(alias="sessionId", description="The session ID for this notification."), ] - # Optional primitive or structured value that contains additional information about the error. - # This may include debugging information or context-specific details. - data: Annotated[ - Optional[Any], - Field( - description="Optional primitive or structured value that contains additional information about the error.\nThis may include debugging information or context-specific details." - ), - ] = None - # A string providing a short description of the error. - # The message should be limited to a concise single sentence. - message: Annotated[ + # The URI of the opened document. + uri: Annotated[str, Field(description="The URI of the opened document.")] + # The language identifier of the document (e.g., "rust", "python"). + language_id: Annotated[ str, Field( - description="A string providing a short description of the error.\nThe message should be limited to a concise single sentence." + alias="languageId", + description='The language identifier of the document (e.g., "rust", "python").', ), ] - - -class ImageContent(BaseModel): + # The version number of the document. + version: Annotated[int, Field(description="The version number of the document.")] + # The full text content of the document. + text: Annotated[str, Field(description="The full text content of the document.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2821,13 +2687,16 @@ class ImageContent(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - annotations: Optional[Annotations] = None - data: str - mime_type: Annotated[str, Field(alias="mimeType")] - uri: Optional[str] = None -class KillTerminalRequest(BaseModel): +class DidCloseDocumentNotification(BaseModel): + # The session ID for this notification. + session_id: Annotated[ + str, + Field(alias="sessionId", description="The session ID for this notification."), + ] + # The URI of the closed document. + uri: Annotated[str, Field(description="The URI of the closed document.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2840,13 +2709,16 @@ class KillTerminalRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The session ID for this request. - session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] - # The ID of the terminal to kill. - terminal_id: Annotated[str, Field(alias="terminalId", description="The ID of the terminal to kill.")] -class ListProvidersResponse(BaseModel): +class DidSaveDocumentNotification(BaseModel): + # The session ID for this notification. + session_id: Annotated[ + str, + Field(alias="sessionId", description="The session ID for this notification."), + ] + # The URI of the saved document. + uri: Annotated[str, Field(description="The URI of the saved document.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2859,14 +2731,16 @@ class ListProvidersResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Configurable providers with current routing info suitable for UI display. - providers: Annotated[ - List[ProviderInfo], - Field(description="Configurable providers with current routing info suitable for UI display."), - ] -class ListSessionsResponse(BaseModel): +class AcceptNesNotification(BaseModel): + # The session ID for this notification. + session_id: Annotated[ + str, + Field(alias="sessionId", description="The session ID for this notification."), + ] + # The ID of the accepted suggestion. + id: Annotated[str, Field(description="The ID of the accepted suggestion.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2879,28 +2753,14 @@ class ListSessionsResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Opaque cursor token. If present, pass this in the next request's cursor parameter - # to fetch the next page. If absent, there are no more results. - next_cursor: Annotated[ - Optional[str], - Field( - alias="nextCursor", - description="Opaque cursor token. If present, pass this in the next request's cursor parameter\nto fetch the next page. If absent, there are no more results.", - ), - ] = None - # Array of session information objects - sessions: Annotated[List[SessionInfo], Field(description="Array of session information objects")] - - -class HttpMcpServer(McpServerHttp): - type: Literal["http"] - -class SseMcpServer(McpServerSse): - type: Literal["sse"] - -class McpServerAcp(BaseModel): +class CancelRequestNotification(BaseModel): + # The ID of the request to cancel. + request_id: Annotated[ + Optional[Union[int, str]], + Field(alias="requestId", description="The ID of the request to cancel."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2913,45 +2773,15 @@ class McpServerAcp(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Unique identifier for this MCP server, generated by the component providing it. - # - # Providers MUST NOT reuse an ID for multiple ACP-transport MCP servers that are visible - # on the same ACP connection. - id: Annotated[ - str, - Field( - description="Unique identifier for this MCP server, generated by the component providing it.\n\nProviders MUST NOT reuse an ID for multiple ACP-transport MCP servers that are visible\non the same ACP connection." - ), - ] - # Human-readable name identifying this MCP server. - name: Annotated[str, Field(description="Human-readable name identifying this MCP server.")] - - -class MultiSelectPropertySchema(BaseModel): - # Default selected values. - default: Annotated[Optional[List[str]], Field(description="Default selected values.")] = None - # Human-readable description. - description: Annotated[Optional[str], Field(description="Human-readable description.")] = None - # The items definition describing allowed values. - items: Annotated[ - Union[UntitledMultiSelectItems, TitledMultiSelectItems], - Field(description="The items definition describing allowed values."), - ] - # Maximum number of items to select. - max_items: Annotated[ - Optional[int], - Field(alias="maxItems", description="Maximum number of items to select.", ge=0), - ] = None - # Minimum number of items to select. - min_items: Annotated[ - Optional[int], - Field(alias="minItems", description="Minimum number of items to select.", ge=0), - ] = None - # Optional title for the property. - title: Annotated[Optional[str], Field(description="Optional title for the property.")] = None -class NesContextCapabilities(BaseModel): +class WriteTextFileRequest(BaseModel): + # The session ID for this request. + session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] + # Absolute path to the file to write. + path: Annotated[str, Field(description="Absolute path to the file to write.")] + # The text content to write to the file. + content: Annotated[str, Field(description="The text content to write to the file.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -2964,62 +2794,92 @@ class NesContextCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Whether the agent wants diagnostics context. - diagnostics: Annotated[ - Optional[NesDiagnosticsCapabilities], - Field(description="Whether the agent wants diagnostics context."), + + +class FileEditToolCallContent(Diff): + type: Literal["diff"] + + +class TerminalToolCallContent(Terminal): + type: Literal["terminal"] + + +class Annotations(BaseModel): + # Intended recipients for this content, such as the user or assistant. + audience: Annotated[ + Optional[List[str]], + Field(description="Intended recipients for this content, such as the user or assistant."), ] = None - # Whether the agent wants edit history context. - edit_history: Annotated[ - Optional[NesEditHistoryCapabilities], + # Timestamp indicating when the underlying resource was last modified. + last_modified: Annotated[ + Optional[str], Field( - alias="editHistory", - description="Whether the agent wants edit history context.", + alias="lastModified", + description="Timestamp indicating when the underlying resource was last modified.", ), ] = None - # Whether the agent wants open files context. - open_files: Annotated[ - Optional[NesOpenFilesCapabilities], - Field(alias="openFiles", description="Whether the agent wants open files context."), + # Relative importance of this content when clients choose what to surface. + priority: Annotated[ + Optional[float], + Field(description="Relative importance of this content when clients choose what to surface."), ] = None - # Whether the agent wants recent files context. - recent_files: Annotated[ - Optional[NesRecentFilesCapabilities], + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - alias="recentFiles", - description="Whether the agent wants recent files context.", + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Whether the agent wants related snippets context. - related_snippets: Annotated[ - Optional[NesRelatedSnippetsCapabilities], - Field( - alias="relatedSnippets", - description="Whether the agent wants related snippets context.", - ), + + +class TextContent(BaseModel): + # Optional annotations that help clients decide how to display or route this content. + annotations: Annotated[ + Optional[Annotations], + Field(description="Optional annotations that help clients decide how to display or route this content."), ] = None - # Whether the agent wants user actions context. - user_actions: Annotated[ - Optional[NesUserActionsCapabilities], + # Text payload carried by this content block. + text: Annotated[str, Field(description="Text payload carried by this content block.")] + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - alias="userActions", - description="Whether the agent wants user actions context.", + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None -class NesDiagnostic(BaseModel): - # The diagnostic message. - message: Annotated[str, Field(description="The diagnostic message.")] - # The range of the diagnostic. - range: Annotated[Range, Field(description="The range of the diagnostic.")] - # The severity of the diagnostic. - severity: Annotated[str, Field(description="The severity of the diagnostic.")] - # The URI of the file containing the diagnostic. - uri: Annotated[str, Field(description="The URI of the file containing the diagnostic.")] - - -class NesDocumentDidChangeCapabilities(BaseModel): +class ImageContent(BaseModel): + # Optional annotations that help clients decide how to display or route this content. + annotations: Annotated[ + Optional[Annotations], + Field(description="Optional annotations that help clients decide how to display or route this content."), + ] = None + # Base64-encoded media payload. + data: Annotated[str, Field(description="Base64-encoded media payload.")] + # MIME type describing the encoded media payload. + mime_type: Annotated[ + str, + Field( + alias="mimeType", + description="MIME type describing the encoded media payload.", + ), + ] + # URI associated with this resource or media payload. + uri: Annotated[ + Optional[str], + Field(description="URI associated with this resource or media payload."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3032,17 +2892,24 @@ class NesDocumentDidChangeCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The sync kind the agent wants: `"full"` or `"incremental"`. - sync_kind: Annotated[ + + +class AudioContent(BaseModel): + # Optional annotations that help clients decide how to display or route this content. + annotations: Annotated[ + Optional[Annotations], + Field(description="Optional annotations that help clients decide how to display or route this content."), + ] = None + # Base64-encoded media payload. + data: Annotated[str, Field(description="Base64-encoded media payload.")] + # MIME type describing the encoded media payload. + mime_type: Annotated[ str, Field( - alias="syncKind", - description='The sync kind the agent wants: `"full"` or `"incremental"`.', + alias="mimeType", + description="MIME type describing the encoded media payload.", ), ] - - -class NesDocumentEventCapabilities(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3055,49 +2922,63 @@ class NesDocumentEventCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Whether the agent wants `document/didChange` events, and the sync kind. - did_change: Annotated[ - Optional[NesDocumentDidChangeCapabilities], - Field( - alias="didChange", - description="Whether the agent wants `document/didChange` events, and the sync kind.", - ), + + +class ResourceLink(BaseModel): + # Optional annotations that help clients decide how to display or route this content. + annotations: Annotated[ + Optional[Annotations], + Field(description="Optional annotations that help clients decide how to display or route this content."), ] = None - # Whether the agent wants `document/didClose` events. - did_close: Annotated[ - Optional[NesDocumentDidCloseCapabilities], - Field( - alias="didClose", - description="Whether the agent wants `document/didClose` events.", - ), + # Optional human-readable details shown with this protocol object. + description: Annotated[ + Optional[str], + Field(description="Optional human-readable details shown with this protocol object."), ] = None - # Whether the agent wants `document/didFocus` events. - did_focus: Annotated[ - Optional[NesDocumentDidFocusCapabilities], + # MIME type describing the encoded media payload. + mime_type: Annotated[ + Optional[str], Field( - alias="didFocus", - description="Whether the agent wants `document/didFocus` events.", + alias="mimeType", + description="MIME type describing the encoded media payload.", ), ] = None - # Whether the agent wants `document/didOpen` events. - did_open: Annotated[ - Optional[NesDocumentDidOpenCapabilities], - Field( - alias="didOpen", - description="Whether the agent wants `document/didOpen` events.", - ), + # Human-readable name shown for this protocol object. + name: Annotated[str, Field(description="Human-readable name shown for this protocol object.")] + # Optional size of the linked resource in bytes, if known. + size: Annotated[ + Optional[int], + Field(description="Optional size of the linked resource in bytes, if known."), ] = None - # Whether the agent wants `document/didSave` events. - did_save: Annotated[ - Optional[NesDocumentDidSaveCapabilities], + # Optional display title for end-user UI. + title: Annotated[Optional[str], Field(description="Optional display title for end-user UI.")] = None + # URI associated with this resource or media payload. + uri: Annotated[str, Field(description="URI associated with this resource or media payload.")] + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - alias="didSave", - description="Whether the agent wants `document/didSave` events.", + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None -class NesEventCapabilities(BaseModel): +class EmbeddedResource(BaseModel): + # Optional annotations that help clients decide how to display or route this content. + annotations: Annotated[ + Optional[Annotations], + Field(description="Optional annotations that help clients decide how to display or route this content."), + ] = None + # Embedded resource payload, either text or binary data. + resource: Annotated[ + Union[TextResourceContents, BlobResourceContents], + Field(description="Embedded resource payload, either text or binary data."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3110,91 +2991,68 @@ class NesEventCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Document event capabilities. - document: Annotated[ - Optional[NesDocumentEventCapabilities], - Field(description="Document event capabilities."), - ] = None - - -class NesJumpSuggestion(BaseModel): - # Unique identifier for accept/reject tracking. - id: Annotated[str, Field(description="Unique identifier for accept/reject tracking.")] - # The target position within the file. - position: Annotated[Position, Field(description="The target position within the file.")] - # The file to navigate to. - uri: Annotated[str, Field(description="The file to navigate to.")] -class NesOpenFile(BaseModel): - # The language identifier. - language_id: Annotated[str, Field(alias="languageId", description="The language identifier.")] - # Timestamp in milliseconds since epoch of when the file was last focused. - last_focused_ms: Annotated[ - Optional[int], +class PermissionOption(BaseModel): + # Unique identifier for this permission option. + option_id: Annotated[ + str, Field( - alias="lastFocusedMs", - description="Timestamp in milliseconds since epoch of when the file was last focused.", - ge=0, + alias="optionId", + description="Unique identifier for this permission option.", + ), + ] + # Human-readable label to display to the user. + name: Annotated[str, Field(description="Human-readable label to display to the user.")] + # Hint about the nature of this permission option. + kind: Annotated[PermissionOptionKind, Field(description="Hint about the nature of this permission option.")] + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The URI of the file. - uri: Annotated[str, Field(description="The URI of the file.")] - # The visible range in the editor, if any. - visible_range: Annotated[ - Optional[Range], - Field(alias="visibleRange", description="The visible range in the editor, if any."), - ] = None - - -class NesRenameSuggestion(BaseModel): - # Unique identifier for accept/reject tracking. - id: Annotated[str, Field(description="Unique identifier for accept/reject tracking.")] - # The new name for the symbol. - new_name: Annotated[str, Field(alias="newName", description="The new name for the symbol.")] - # The position of the symbol to rename. - position: Annotated[Position, Field(description="The position of the symbol to rename.")] - # The file URI containing the symbol. - uri: Annotated[str, Field(description="The file URI containing the symbol.")] - - -class NesJumpSuggestionVariant(NesJumpSuggestion): - kind: Literal["jump"] - - -class NesRenameSuggestionVariant(NesRenameSuggestion): - kind: Literal["rename"] -class NesTextEdit(BaseModel): - # The replacement text. - new_text: Annotated[str, Field(alias="newText", description="The replacement text.")] - # The range to replace. - range: Annotated[Range, Field(description="The range to replace.")] - - -class NesUserAction(BaseModel): - # The kind of action (e.g., "insertChar", "cursorMovement"). - action: Annotated[ - str, - Field(description='The kind of action (e.g., "insertChar", "cursorMovement").'), - ] - # The position where the action occurred. - position: Annotated[Position, Field(description="The position where the action occurred.")] - # Timestamp in milliseconds since epoch. - timestamp_ms: Annotated[ - int, +class CreateTerminalRequest(BaseModel): + # The session ID for this request. + session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] + # The command to execute. + command: Annotated[str, Field(description="The command to execute.")] + # Array of command arguments. + args: Annotated[Optional[List[str]], Field(description="Array of command arguments.")] = None + # Environment variables for the command. + env: Annotated[ + Optional[List[EnvVariable]], + Field(description="Environment variables for the command."), + ] = None + # Working directory for the command (absolute path). + cwd: Annotated[ + Optional[str], + Field(description="Working directory for the command (absolute path)."), + ] = None + # Maximum number of output bytes to retain. + # + # When the limit is exceeded, the Client truncates from the beginning of the output + # to stay within the limit. + # + # The Client MUST ensure truncation happens at a character boundary to maintain valid + # string output, even if this means the retained output is slightly less than the + # specified limit. + output_byte_limit: Annotated[ + Optional[int], Field( - alias="timestampMs", - description="Timestamp in milliseconds since epoch.", + alias="outputByteLimit", + description="Maximum number of output bytes to retain.\n\nWhen the limit is exceeded, the Client truncates from the beginning of the output\nto stay within the limit.\n\nThe Client MUST ensure truncation happens at a character boundary to maintain valid\nstring output, even if this means the retained output is slightly less than the\nspecified limit.", ge=0, ), - ] - # The URI of the file where the action occurred. - uri: Annotated[str, Field(description="The URI of the file where the action occurred.")] - - -class PermissionOption(BaseModel): + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3207,21 +3065,14 @@ class PermissionOption(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Hint about the nature of this permission option. - kind: Annotated[PermissionOptionKind, Field(description="Hint about the nature of this permission option.")] - # Human-readable label to display to the user. - name: Annotated[str, Field(description="Human-readable label to display to the user.")] - # Unique identifier for this permission option. - option_id: Annotated[ - str, - Field( - alias="optionId", - description="Unique identifier for this permission option.", - ), - ] -class PlanEntry(BaseModel): +class CreateUrlElicitationRequest(BaseModel): + # A human-readable message describing what input is needed. + message: Annotated[ + str, + Field(description="A human-readable message describing what input is needed."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3234,24 +3085,30 @@ class PlanEntry(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Human-readable description of what this task aims to accomplish. - content: Annotated[ - str, - Field(description="Human-readable description of what this task aims to accomplish."), - ] - # The relative importance of this task. - # Used to indicate which tasks are most critical to the overall goal. - priority: Annotated[ - PlanEntryPriority, - Field( - description="The relative importance of this task.\nUsed to indicate which tasks are most critical to the overall goal." - ), - ] - # Current execution status of this task. - status: Annotated[PlanEntryStatus, Field(description="Current execution status of this task.")] + mode: Literal["url"] -class PlanFile(BaseModel): +class ElicitationStringPropertySchema(StringPropertySchema): + type: Literal["string"] + + +class ElicitationNumberPropertySchema(NumberPropertySchema): + type: Literal["number"] + + +class ElicitationIntegerPropertySchema(IntegerPropertySchema): + type: Literal["integer"] + + +class ElicitationBooleanPropertySchema(BooleanPropertySchema): + type: Literal["boolean"] + + +class UntitledMultiSelectItems(BaseModel): + # Item type discriminator. Must be `"string"`. + type: Annotated[str, Field(description='Item type discriminator. Must be `"string"`.')] + # Allowed enum values. + enum: Annotated[List[str], Field(description="Allowed enum values.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3264,13 +3121,17 @@ class PlanFile(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The plan ID to update. - id: Annotated[str, Field(description="The plan ID to update.")] - # The URI of the file containing the plan. - uri: Annotated[str, Field(description="The URI of the file containing the plan.")] -class PlanItems(BaseModel): +class ConnectMcpRequest(BaseModel): + # The ACP MCP server ID that was provided by the component declaring the MCP server. + acp_id: Annotated[ + str, + Field( + alias="acpId", + description="The ACP MCP server ID that was provided by the component declaring the MCP server.", + ), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3283,29 +3144,28 @@ class PlanItems(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The list of tasks to be accomplished. - # - # When updating an item-based plan, the agent must send a complete list of all entries - # with their current status. The client replaces that plan with each update. - entries: Annotated[ - List[PlanEntry], + + +class MessageMcpRequest(BaseModel): + # The MCP-over-ACP connection this message is sent on. + connection_id: Annotated[ + str, Field( - description="The list of tasks to be accomplished.\n\nWhen updating an item-based plan, the agent must send a complete list of all entries\nwith their current status. The client replaces that plan with each update." + alias="connectionId", + description="The MCP-over-ACP connection this message is sent on.", ), ] - # The plan ID to update. - id: Annotated[str, Field(description="The plan ID to update.")] - - -class PlanUpdateItems(PlanItems): - type: Literal["items"] - - -class PlanUpdateFile(PlanFile): - type: Literal["file"] - - -class PromptResponse(BaseModel): + # The inner MCP method name. + method: Annotated[str, Field(description="The inner MCP method name.")] + # Optional inner MCP params. + # + # If omitted or set to `null`, the inner MCP message has no params. + params: Annotated[ + Optional[Dict[str, Any]], + Field( + description="Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params." + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3318,28 +3178,57 @@ class PromptResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Indicates why the agent stopped processing the turn. - stop_reason: Annotated[ - StopReason, + + +class SessionCapabilities(BaseModel): + # Whether the agent supports `session/list`. + list: Annotated[ + Optional[SessionListCapabilities], + Field(description="Whether the agent supports `session/list`."), + ] = None + # Whether the agent supports `session/delete`. + # + # Optional. Omitted or `null` both mean the agent does not advertise support. + # Supplying `{}` means the agent supports deleting sessions from `session/list`. + delete: Annotated[ + Optional[SessionDeleteCapabilities], Field( - alias="stopReason", - description="Indicates why the agent stopped processing the turn.", + description="Whether the agent supports `session/delete`.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports deleting sessions from `session/list`." ), - ] + ] = None + # Whether the agent supports `additionalDirectories` on supported session lifecycle requests. + # + # Agents that also support `session/list` may return + # `SessionInfo.additionalDirectories` to report the complete ordered + # additional-root list associated with a listed session. + additional_directories: Annotated[ + Optional[SessionAdditionalDirectoriesCapabilities], + Field( + alias="additionalDirectories", + description="Whether the agent supports `additionalDirectories` on supported session lifecycle requests.\n\nAgents that also support `session/list` may return\n`SessionInfo.additionalDirectories` to report the complete ordered\nadditional-root list associated with a listed session.", + ), + ] = None # **UNSTABLE** # # This capability is not part of the spec yet, and may be removed or changed at any point. # - # Token usage for this turn (optional). - usage: Annotated[ - Optional[Usage], + # Whether the agent supports `session/fork`. + fork: Annotated[ + Optional[SessionForkCapabilities], Field( - description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nToken usage for this turn (optional)." + description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/fork`." ), ] = None - - -class ReadTextFileRequest(BaseModel): + # Whether the agent supports `session/resume`. + resume: Annotated[ + Optional[SessionResumeCapabilities], + Field(description="Whether the agent supports `session/resume`."), + ] = None + # Whether the agent supports `session/close`. + close: Annotated[ + Optional[SessionCloseCapabilities], + Field(description="Whether the agent supports `session/close`."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3352,20 +3241,18 @@ class ReadTextFileRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Maximum number of lines to read. - limit: Annotated[Optional[int], Field(description="Maximum number of lines to read.", ge=0)] = None - # Line number to start reading from (1-based). - line: Annotated[ - Optional[int], - Field(description="Line number to start reading from (1-based).", ge=0), - ] = None - # Absolute path to the file to read. - path: Annotated[str, Field(description="Absolute path to the file to read.")] - # The session ID for this request. - session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] -class RejectNesNotification(BaseModel): +class AgentAuthCapabilities(BaseModel): + # Whether the agent supports the logout method. + # + # By supplying `{}` it means that the agent supports the logout method. + logout: Annotated[ + Optional[LogoutCapabilities], + Field( + description="Whether the agent supports the logout method.\n\nBy supplying `{}` it means that the agent supports the logout method." + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3378,21 +3265,20 @@ class RejectNesNotification(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the rejected suggestion. - id: Annotated[str, Field(description="The ID of the rejected suggestion.")] - # The reason for rejection. - reason: Annotated[Optional[str], Field(description="The reason for rejection.")] = None - # The session ID for this notification. - session_id: Annotated[ - str, - Field(alias="sessionId", description="The session ID for this notification."), - ] -class ReleaseTerminalRequest(BaseModel): - # The _meta property is reserved by ACP to allow clients and agents to attach additional - # metadata to their interactions. Implementations MUST NOT make assumptions about values at - # these keys. +class NesDocumentDidChangeCapabilities(BaseModel): + # The sync kind the agent wants: `"full"` or `"incremental"`. + sync_kind: Annotated[ + str, + Field( + alias="syncKind", + description='The sync kind the agent wants: `"full"` or `"incremental"`.', + ), + ] + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. # # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) field_meta: Annotated[ @@ -3402,17 +3288,51 @@ class ReleaseTerminalRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The session ID for this request. - session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] - # The ID of the terminal to release. - terminal_id: Annotated[str, Field(alias="terminalId", description="The ID of the terminal to release.")] -class AllowedOutcome(SelectedPermissionOutcome): - outcome: Literal["selected"] - - -class RequestPermissionResponse(BaseModel): +class NesContextCapabilities(BaseModel): + # Whether the agent wants recent files context. + recent_files: Annotated[ + Optional[NesRecentFilesCapabilities], + Field( + alias="recentFiles", + description="Whether the agent wants recent files context.", + ), + ] = None + # Whether the agent wants related snippets context. + related_snippets: Annotated[ + Optional[NesRelatedSnippetsCapabilities], + Field( + alias="relatedSnippets", + description="Whether the agent wants related snippets context.", + ), + ] = None + # Whether the agent wants edit history context. + edit_history: Annotated[ + Optional[NesEditHistoryCapabilities], + Field( + alias="editHistory", + description="Whether the agent wants edit history context.", + ), + ] = None + # Whether the agent wants user actions context. + user_actions: Annotated[ + Optional[NesUserActionsCapabilities], + Field( + alias="userActions", + description="Whether the agent wants user actions context.", + ), + ] = None + # Whether the agent wants open files context. + open_files: Annotated[ + Optional[NesOpenFilesCapabilities], + Field(alias="openFiles", description="Whether the agent wants open files context."), + ] = None + # Whether the agent wants diagnostics context. + diagnostics: Annotated[ + Optional[NesDiagnosticsCapabilities], + Field(description="Whether the agent wants diagnostics context."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3425,17 +3345,35 @@ class RequestPermissionResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The user's decision on the permission request. - outcome: Annotated[ - Union[DeniedOutcome, AllowedOutcome], + + +class EnvVarAuthMethod(AuthMethodEnvVar): + type: Literal["env_var"] + + +class TerminalAuthMethod(AuthMethodTerminal): + type: Literal["terminal"] + + +class ProviderInfo(BaseModel): + # Provider identifier, for example "main" or "openai". + id: Annotated[str, Field(description='Provider identifier, for example "main" or "openai".')] + # Supported protocol types for this provider. + supported: Annotated[List[str], Field(description="Supported protocol types for this provider.")] + # Whether this provider is mandatory and cannot be disabled via `providers/disable`. + # If true, clients must not call `providers/disable` for this id. + required: Annotated[ + bool, Field( - description="The user's decision on the permission request.", - discriminator="outcome", + description="Whether this provider is mandatory and cannot be disabled via `providers/disable`.\nIf true, clients must not call `providers/disable` for this id." ), ] - - -class ResourceLink(BaseModel): + # Current effective non-secret routing config. + # Null or omitted means provider is disabled. + current: Annotated[ + Optional[ProviderCurrentConfig], + Field(description="Current effective non-secret routing config.\nNull or omitted means provider is disabled."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3448,16 +3386,22 @@ class ResourceLink(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - annotations: Optional[Annotations] = None - description: Optional[str] = None - mime_type: Annotated[Optional[str], Field(alias="mimeType")] = None - name: str - size: Optional[int] = None - title: Optional[str] = None - uri: str -class SessionCapabilities(BaseModel): +class SessionModeState(BaseModel): + # The current mode the Agent is in. + current_mode_id: Annotated[ + str, + Field(alias="currentModeId", description="The current mode the Agent is in."), + ] + # The set of modes that the Agent can operate in + available_modes: Annotated[ + List[SessionMode], + Field( + alias="availableModes", + description="The set of modes that the Agent can operate in", + ), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3470,57 +3414,23 @@ class SessionCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Whether the agent supports `additionalDirectories` on supported session lifecycle requests. - # - # Agents that also support `session/list` may return - # `SessionInfo.additionalDirectories` to report the complete ordered - # additional-root list associated with a listed session. - additional_directories: Annotated[ - Optional[SessionAdditionalDirectoriesCapabilities], - Field( - alias="additionalDirectories", - description="Whether the agent supports `additionalDirectories` on supported session lifecycle requests.\n\nAgents that also support `session/list` may return\n`SessionInfo.additionalDirectories` to report the complete ordered\nadditional-root list associated with a listed session.", - ), - ] = None - # Whether the agent supports `session/close`. - close: Annotated[ - Optional[SessionCloseCapabilities], - Field(description="Whether the agent supports `session/close`."), - ] = None - # Whether the agent supports `session/delete`. - # - # Optional. Omitted or `null` both mean the agent does not advertise support. - # Supplying `{}` means the agent supports deleting sessions from `session/list`. - delete: Annotated[ - Optional[SessionDeleteCapabilities], - Field( - description="Whether the agent supports `session/delete`.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports deleting sessions from `session/list`." - ), - ] = None - # **UNSTABLE** - # - # This capability is not part of the spec yet, and may be removed or changed at any point. - # - # Whether the agent supports `session/fork`. - fork: Annotated[ - Optional[SessionForkCapabilities], - Field( - description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/fork`." - ), - ] = None - # Whether the agent supports `session/list`. - list: Annotated[ - Optional[SessionListCapabilities], - Field(description="Whether the agent supports `session/list`."), - ] = None - # Whether the agent supports `session/resume`. - resume: Annotated[ - Optional[SessionResumeCapabilities], - Field(description="Whether the agent supports `session/resume`."), - ] = None class SessionConfigOptionBoolean(SessionConfigBoolean): + # Unique identifier for the configuration option. + id: Annotated[str, Field(description="Unique identifier for the configuration option.")] + # Human-readable label for the option. + name: Annotated[str, Field(description="Human-readable label for the option.")] + # Optional description for the Client to display to the user. + description: Annotated[ + Optional[str], + Field(description="Optional description for the Client to display to the user."), + ] = None + # Optional semantic category for this option (UX only). + category: Annotated[ + Optional[str], + Field(description="Optional semantic category for this option (UX only)."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3533,24 +3443,19 @@ class SessionConfigOptionBoolean(SessionConfigBoolean): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Optional semantic category for this option (UX only). - category: Annotated[ - Optional[str], - Field(description="Optional semantic category for this option (UX only)."), - ] = None - # Optional description for the Client to display to the user. - description: Annotated[ - Optional[str], - Field(description="Optional description for the Client to display to the user."), - ] = None - # Unique identifier for the configuration option. - id: Annotated[str, Field(description="Unique identifier for the configuration option.")] - # Human-readable label for the option. - name: Annotated[str, Field(description="Human-readable label for the option.")] type: Literal["boolean"] -class SessionConfigSelectOption(BaseModel): +class SessionConfigSelectGroup(BaseModel): + # Unique identifier for this group. + group: Annotated[str, Field(description="Unique identifier for this group.")] + # Human-readable label for this group. + name: Annotated[str, Field(description="Human-readable label for this group.")] + # The set of option values in this group. + options: Annotated[ + List[SessionConfigSelectOption], + Field(description="The set of option values in this group."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3563,15 +3468,20 @@ class SessionConfigSelectOption(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Optional description for this option value. - description: Annotated[Optional[str], Field(description="Optional description for this option value.")] = None - # Human-readable label for this option value. - name: Annotated[str, Field(description="Human-readable label for this option value.")] - # Unique identifier for this option value. - value: Annotated[str, Field(description="Unique identifier for this option value.")] -class SessionMode(BaseModel): +class ListSessionsResponse(BaseModel): + # Array of session information objects + sessions: Annotated[List[SessionInfo], Field(description="Array of session information objects")] + # Opaque cursor token. If present, pass this in the next request's cursor parameter + # to fetch the next page. If absent, there are no more results. + next_cursor: Annotated[ + Optional[str], + Field( + alias="nextCursor", + description="Opaque cursor token. If present, pass this in the next request's cursor parameter\nto fetch the next page. If absent, there are no more results.", + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3584,13 +3494,28 @@ class SessionMode(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - description: Optional[str] = None - # Unique identifier for a Session Mode. - id: Annotated[str, Field(description="Unique identifier for a Session Mode.")] - name: str -class SessionModeState(BaseModel): +class PromptResponse(BaseModel): + # Indicates why the agent stopped processing the turn. + stop_reason: Annotated[ + StopReason, + Field( + alias="stopReason", + description="Indicates why the agent stopped processing the turn.", + ), + ] + # **UNSTABLE** + # + # This capability is not part of the spec yet, and may be removed or changed at any point. + # + # Token usage for this turn (optional). + usage: Annotated[ + Optional[Usage], + Field( + description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nToken usage for this turn (optional)." + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3603,30 +3528,25 @@ class SessionModeState(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The set of modes that the Agent can operate in - available_modes: Annotated[ - List[SessionMode], - Field( - alias="availableModes", - description="The set of modes that the Agent can operate in", - ), - ] - # The current mode the Agent is in. - current_mode_id: Annotated[ - str, - Field(alias="currentModeId", description="The current mode the Agent is in."), - ] - -class CurrentModeUpdate(_CurrentModeUpdate): - session_update: Annotated[Literal["current_mode_update"], Field(alias="sessionUpdate")] +class NesJumpSuggestionVariant(NesJumpSuggestion): + kind: Literal["jump"] -class UsageUpdate(_UsageUpdate): - session_update: Annotated[Literal["usage_update"], Field(alias="sessionUpdate")] +class NesRenameSuggestionVariant(NesRenameSuggestion): + kind: Literal["rename"] -class StartNesRequest(BaseModel): + +class NesSearchAndReplaceSuggestionVariant(NesSearchAndReplaceSuggestion): + kind: Literal["searchAndReplace"] + + +class Range(BaseModel): + # The start position (inclusive). + start: Annotated[Position, Field(description="The start position (inclusive).")] + # The end position (exclusive). + end: Annotated[Position, Field(description="The end position (exclusive).")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3639,24 +3559,67 @@ class StartNesRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Repository metadata, if the workspace is a git repository. - repository: Annotated[ - Optional[NesRepository], - Field(description="Repository metadata, if the workspace is a git repository."), - ] = None - # The workspace folders. - workspace_folders: Annotated[ - Optional[List[WorkspaceFolder]], - Field(alias="workspaceFolders", description="The workspace folders."), - ] = None - # The root URI of the workspace. - workspace_uri: Annotated[ - Optional[str], - Field(alias="workspaceUri", description="The root URI of the workspace."), + + +class Error(BaseModel): + # A number indicating the error type that occurred. + # This must be an integer as defined in the JSON-RPC specification. + code: Annotated[ + int, + Field( + description="A number indicating the error type that occurred.\nThis must be an integer as defined in the JSON-RPC specification." + ), + ] + # A string providing a short description of the error. + # The message should be limited to a concise single sentence. + message: Annotated[ + str, + Field( + description="A string providing a short description of the error.\nThe message should be limited to a concise single sentence." + ), + ] + # Optional primitive or structured value that contains additional information about the error. + # This may include debugging information or context-specific details. + data: Annotated[ + Optional[Any], + Field( + description="Optional primitive or structured value that contains additional information about the error.\nThis may include debugging information or context-specific details." + ), ] = None -class TextContent(BaseModel): +class AgentPlanRemovedUpdate(PlanRemoved): + session_update: Annotated[Literal["plan_removed"], Field(alias="sessionUpdate")] + + +class CurrentModeUpdate(_CurrentModeUpdate): + session_update: Annotated[Literal["current_mode_update"], Field(alias="sessionUpdate")] + + +class SessionInfoUpdate(_SessionInfoUpdate): + session_update: Annotated[Literal["session_info_update"], Field(alias="sessionUpdate")] + + +class UsageUpdate(_UsageUpdate): + session_update: Annotated[Literal["usage_update"], Field(alias="sessionUpdate")] + + +class PlanEntry(BaseModel): + # Human-readable description of what this task aims to accomplish. + content: Annotated[ + str, + Field(description="Human-readable description of what this task aims to accomplish."), + ] + # The relative importance of this task. + # Used to indicate which tasks are most critical to the overall goal. + priority: Annotated[ + PlanEntryPriority, + Field( + description="The relative importance of this task.\nUsed to indicate which tasks are most critical to the overall goal." + ), + ] + # Current execution status of this task. + status: Annotated[PlanEntryStatus, Field(description="Current execution status of this task.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3669,30 +3632,54 @@ class TextContent(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - annotations: Optional[Annotations] = None - text: str -class AgentErrorMessage(BaseModel): - error: Error - # JSON RPC Request Id - # - # An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \[1\] and Numbers SHOULD NOT contain fractional parts \[2\] - # - # The Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects. +class Plan(BaseModel): + # The list of tasks to be accomplished. # - # \[1\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling. + # When updating a plan, the agent must send a complete list of all entries + # with their current status. The client replaces the entire plan with each update. + entries: Annotated[ + List[PlanEntry], + Field( + description="The list of tasks to be accomplished.\n\nWhen updating a plan, the agent must send a complete list of all entries\nwith their current status. The client replaces the entire plan with each update." + ), + ] + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. # - # \[2\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions. - id: Annotated[ - Optional[Union[int, str]], + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - description="JSON RPC Request Id\n\nAn identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \\[1\\] and Numbers SHOULD NOT contain fractional parts \\[2\\]\n\nThe Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects.\n\n\\[1\\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling.\n\n\\[2\\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions." + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None -class AvailableCommand(BaseModel): +class PlanUpdateFile(PlanFile): + type: Literal["file"] + + +class PlanUpdateMarkdown(PlanMarkdown): + type: Literal["markdown"] + + +class PlanItems(BaseModel): + # The plan ID to update. + id: Annotated[str, Field(description="The plan ID to update.")] + # The list of tasks to be accomplished. + # + # When updating an item-based plan, the agent must send a complete list of all entries + # with their current status. The client replaces that plan with each update. + entries: Annotated[ + List[PlanEntry], + Field( + description="The list of tasks to be accomplished.\n\nWhen updating an item-based plan, the agent must send a complete list of all entries\nwith their current status. The client replaces that plan with each update." + ), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3705,21 +3692,29 @@ class AvailableCommand(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Human-readable description of what the command does. - description: Annotated[str, Field(description="Human-readable description of what the command does.")] - # Input for the command if required - input: Annotated[ - Optional[AvailableCommandInput], - Field(description="Input for the command if required"), - ] = None - # Command name (e.g., `create_plan`, `research_codebase`). - name: Annotated[ - str, - Field(description="Command name (e.g., `create_plan`, `research_codebase`)."), + + +class AvailableCommandInput(RootModel[UnstructuredCommandInput]): + # The input specification for a command. + root: Annotated[ + UnstructuredCommandInput, + Field(description="The input specification for a command."), ] -class _AvailableCommandsUpdate(BaseModel): +class SessionConfigOptionsCapabilities(BaseModel): + # Whether the client supports boolean session configuration options. + # + # Omitted or `null` means the client does not advertise support. + # Supplying `{}` means agents may include `type: "boolean"` entries in + # `configOptions`, and the client may send `session/set_config_option` + # requests with `type: "boolean"` and a boolean `value`. + boolean: Annotated[ + Optional[BooleanConfigOptionCapabilities], + Field( + description='Whether the client supports boolean session configuration options.\n\nOmitted or `null` means the client does not advertise support.\nSupplying `{}` means agents may include `type: "boolean"` entries in\n`configOptions`, and the client may send `session/set_config_option`\nrequests with `type: "boolean"` and a boolean `value`.' + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3732,14 +3727,19 @@ class _AvailableCommandsUpdate(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Commands the agent can execute - available_commands: Annotated[ - List[AvailableCommand], - Field(alias="availableCommands", description="Commands the agent can execute"), - ] -class ClientCapabilities(BaseModel): +class ElicitationCapabilities(BaseModel): + # Whether the client supports form-based elicitation. + form: Annotated[ + Optional[ElicitationFormCapabilities], + Field(description="Whether the client supports form-based elicitation."), + ] = None + # Whether the client supports URL-based elicitation. + url: Annotated[ + Optional[ElicitationUrlCapabilities], + Field(description="Whether the client supports URL-based elicitation."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3752,184 +3752,158 @@ class ClientCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # **UNSTABLE** - # - # This capability is not part of the spec yet, and may be removed or changed at any point. - # - # Authentication capabilities supported by the client. - # Determines which authentication method types the agent may include - # in its `InitializeResponse`. - auth: Annotated[ - Optional[AuthCapabilities], + + +class ClientNesCapabilities(BaseModel): + # Whether the client supports the `jump` suggestion kind. + jump: Annotated[ + Optional[NesJumpCapabilities], + Field(description="Whether the client supports the `jump` suggestion kind."), + ] = None + # Whether the client supports the `rename` suggestion kind. + rename: Annotated[ + Optional[NesRenameCapabilities], + Field(description="Whether the client supports the `rename` suggestion kind."), + ] = None + # Whether the client supports the `searchAndReplace` suggestion kind. + search_and_replace: Annotated[ + Optional[NesSearchAndReplaceCapabilities], Field( - description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAuthentication capabilities supported by the client.\nDetermines which authentication method types the agent may include\nin its `InitializeResponse`." + alias="searchAndReplace", + description="Whether the client supports the `searchAndReplace` suggestion kind.", ), - ] = {"terminal": False} - # **UNSTABLE** - # - # This capability is not part of the spec yet, and may be removed or changed at any point. + ] = None + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. # - # Elicitation capabilities supported by the client. - # Determines which elicitation modes the agent may use. - elicitation: Annotated[ - Optional[ElicitationCapabilities], + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nElicitation capabilities supported by the client.\nDetermines which elicitation modes the agent may use." + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # File system capabilities supported by the client. - # Determines which file operations the agent can request. - fs: Annotated[ - Optional[FileSystemCapabilities], + + +class HttpMcpServer(McpServerHttp): + type: Literal["http"] + + +class SseMcpServer(McpServerSse): + type: Literal["sse"] + + +class AcpMcpServer(McpServerAcp): + type: Literal["acp"] + + +class LoadSessionRequest(BaseModel): + # List of MCP servers to connect to for this session. + mcp_servers: Annotated[ + List[Union[HttpMcpServer, SseMcpServer, AcpMcpServer, McpServerStdio]], Field( - description="File system capabilities supported by the client.\nDetermines which file operations the agent can request." + alias="mcpServers", + description="List of MCP servers to connect to for this session.", ), - ] = FileSystemCapabilities() - # **UNSTABLE** - # - # This capability is not part of the spec yet, and may be removed or changed at any point. + ] + # The working directory for this session. + cwd: Annotated[str, Field(description="The working directory for this session.")] + # Additional workspace roots to activate for this session. Each path must be absolute. # - # NES (Next Edit Suggestions) capabilities supported by the client. - nes: Annotated[ - Optional[ClientNesCapabilities], + # When omitted or empty, no additional roots are activated. When non-empty, + # this is the complete resulting additional-root list for the loaded + # session. It may differ from any previously used or reported list as long as + # the request `cwd` matches the session's `cwd`. + additional_directories: Annotated[ + Optional[List[str]], Field( - description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNES (Next Edit Suggestions) capabilities supported by the client." + alias="additionalDirectories", + description="Additional workspace roots to activate for this session. Each path must be absolute.\n\nWhen omitted or empty, no additional roots are activated. When non-empty,\nthis is the complete resulting additional-root list for the loaded\nsession. It may differ from any previously used or reported list as long as\nthe request `cwd` matches the session's `cwd`.", ), ] = None - # **UNSTABLE** - # - # This capability is not part of the spec yet, and may be removed or changed at any point. - # - # Whether the client supports `plan_update` and `plan_removed` session updates. + # The ID of the session to load. + session_id: Annotated[str, Field(alias="sessionId", description="The ID of the session to load.")] + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. # - # Optional. Omitted means the client does not advertise support. - # Supplying `{}` means the client can receive both update types. - plan: Annotated[ - Optional[PlanCapabilities], + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the client supports `plan_update` and `plan_removed` session updates.\n\nOptional. Omitted means the client does not advertise support.\nSupplying `{}` means the client can receive both update types." + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # **UNSTABLE** - # - # This capability is not part of the spec yet, and may be removed or changed at any point. + + +class ForkSessionRequest(BaseModel): + # The ID of the session to fork. + session_id: Annotated[str, Field(alias="sessionId", description="The ID of the session to fork.")] + # The working directory for this session. + cwd: Annotated[str, Field(description="The working directory for this session.")] + # Additional workspace roots to activate for this session. Each path must be absolute. # - # The position encodings supported by the client, in order of preference. - position_encodings: Annotated[ + # When omitted or empty, no additional roots are activated. When non-empty, + # this is the complete resulting additional-root list for the forked + # session. + additional_directories: Annotated[ Optional[List[str]], Field( - alias="positionEncodings", - description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe position encodings supported by the client, in order of preference.", + alias="additionalDirectories", + description="Additional workspace roots to activate for this session. Each path must be absolute.\n\nWhen omitted or empty, no additional roots are activated. When non-empty,\nthis is the complete resulting additional-root list for the forked\nsession.", ), ] = None - # Whether the Client support all `terminal/*` methods. - terminal: Annotated[ - Optional[bool], - Field(description="Whether the Client support all `terminal/*` methods."), - ] = False - - -class ClientNotification(BaseModel): - method: str - params: Optional[ - Union[ - CancelNotification, - DidOpenDocumentNotification, - DidChangeDocumentNotification, - DidCloseDocumentNotification, - DidSaveDocumentNotification, - DidFocusDocumentNotification, - AcceptNesNotification, - RejectNesNotification, - MessageMcpNotification, - Any, - ] - ] = None - - -class ClientResponseMessage(BaseModel): - # JSON RPC Request Id - # - # An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \[1\] and Numbers SHOULD NOT contain fractional parts \[2\] - # - # The Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects. - # - # \[1\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling. - # - # \[2\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions. - id: Annotated[ - Optional[Union[int, str]], + # List of MCP servers to connect to for this session. + mcp_servers: Annotated[ + Optional[List[Union[HttpMcpServer, SseMcpServer, AcpMcpServer, McpServerStdio]]], Field( - description="JSON RPC Request Id\n\nAn identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \\[1\\] and Numbers SHOULD NOT contain fractional parts \\[2\\]\n\nThe Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects.\n\n\\[1\\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling.\n\n\\[2\\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions." + alias="mcpServers", + description="List of MCP servers to connect to for this session.", ), ] = None - # All possible responses that a client can send to an agent. - # - # This enum is used internally for routing RPC responses. You typically won't need - # to use this directly - the responses are handled automatically by the connection. + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. # - # These are responses to the corresponding `AgentRequest` variants. - result: Annotated[ - Union[ - WriteTextFileResponse, - ReadTextFileResponse, - RequestPermissionResponse, - CreateTerminalResponse, - TerminalOutputResponse, - ReleaseTerminalResponse, - WaitForTerminalExitResponse, - KillTerminalResponse, - ConnectMcpResponse, - DisconnectMcpResponse, - Union[ - AcceptElicitationResponse, - DeclineElicitationResponse, - CancelElicitationResponse, - ], - Any, - ], + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - description="All possible responses that a client can send to an agent.\n\nThis enum is used internally for routing RPC responses. You typically won't need\nto use this directly - the responses are handled automatically by the connection.\n\nThese are responses to the corresponding `AgentRequest` variants." + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), - ] + ] = None -class ClientErrorMessage(BaseModel): - error: Error - # JSON RPC Request Id - # - # An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \[1\] and Numbers SHOULD NOT contain fractional parts \[2\] - # - # The Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects. - # - # \[1\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling. +class ResumeSessionRequest(BaseModel): + # The ID of the session to resume. + session_id: Annotated[str, Field(alias="sessionId", description="The ID of the session to resume.")] + # The working directory for this session. + cwd: Annotated[str, Field(description="The working directory for this session.")] + # Additional workspace roots to activate for this session. Each path must be absolute. # - # \[2\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions. - id: Annotated[ - Optional[Union[int, str]], + # When omitted or empty, no additional roots are activated. When non-empty, + # this is the complete resulting additional-root list for the resumed + # session. It may differ from any previously used or reported list as long as + # the request `cwd` matches the session's `cwd`. + additional_directories: Annotated[ + Optional[List[str]], Field( - description="JSON RPC Request Id\n\nAn identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \\[1\\] and Numbers SHOULD NOT contain fractional parts \\[2\\]\n\nThe Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects.\n\n\\[1\\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling.\n\n\\[2\\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions." + alias="additionalDirectories", + description="Additional workspace roots to activate for this session. Each path must be absolute.\n\nWhen omitted or empty, no additional roots are activated. When non-empty,\nthis is the complete resulting additional-root list for the resumed\nsession. It may differ from any previously used or reported list as long as\nthe request `cwd` matches the session's `cwd`.", + ), + ] = None + # List of MCP servers to connect to for this session. + mcp_servers: Annotated[ + Optional[List[Union[HttpMcpServer, SseMcpServer, AcpMcpServer, McpServerStdio]]], + Field( + alias="mcpServers", + description="List of MCP servers to connect to for this session.", ), ] = None - - -class ClientResponse(RootModel[Union[ClientResponseMessage, ClientErrorMessage]]): - root: Union[ClientResponseMessage, ClientErrorMessage] - - -class TextContentBlock(TextContent): - type: Literal["text"] - - -class ImageContentBlock(ImageContent): - type: Literal["image"] - - -class ResourceContentBlock(ResourceLink): - type: Literal["resource_link"] - - -class CreateUrlElicitationRequest(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3942,49 +3916,24 @@ class CreateUrlElicitationRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # A human-readable message describing what input is needed. - message: Annotated[ - str, - Field(description="A human-readable message describing what input is needed."), - ] - mode: Literal["url"] - - -class ElicitationMultiSelectPropertySchema(MultiSelectPropertySchema): - type: Literal["array"] -class ElicitationSchema(BaseModel): - # Optional description of what this schema represents. - description: Annotated[ +class StartNesRequest(BaseModel): + # The root URI of the workspace. + workspace_uri: Annotated[ Optional[str], - Field(description="Optional description of what this schema represents."), + Field(alias="workspaceUri", description="The root URI of the workspace."), + ] = None + # The workspace folders. + workspace_folders: Annotated[ + Optional[List[WorkspaceFolder]], + Field(alias="workspaceFolders", description="The workspace folders."), + ] = None + # Repository metadata, if the workspace is a git repository. + repository: Annotated[ + Optional[NesRepository], + Field(description="Repository metadata, if the workspace is a git repository."), ] = None - # Property definitions (must be primitive types). - properties: Annotated[ - Optional[ - Dict[ - str, - Union[ - ElicitationStringPropertySchema, - ElicitationNumberPropertySchema, - ElicitationIntegerPropertySchema, - ElicitationBooleanPropertySchema, - ElicitationMultiSelectPropertySchema, - ], - ] - ], - Field(description="Property definitions (must be primitive types)."), - ] = {} - # List of required property names. - required: Annotated[Optional[List[str]], Field(description="List of required property names.")] = None - # Optional title for the schema. - title: Annotated[Optional[str], Field(description="Optional title for the schema.")] = None - # Type discriminator. Always `"object"`. - type: Annotated[Optional[str], Field(description='Type discriminator. Always `"object"`.')] = "object" - - -class EmbeddedResource(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -3997,15 +3946,13 @@ class EmbeddedResource(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - annotations: Optional[Annotations] = None - # Resource content that can be embedded in a message. - resource: Annotated[ - Union[TextResourceContents, BlobResourceContents], - Field(description="Resource content that can be embedded in a message."), - ] -class InitializeRequest(BaseModel): +class NesRelatedSnippet(BaseModel): + # The URI of the file containing the snippets. + uri: Annotated[str, Field(description="The URI of the file containing the snippets.")] + # The code excerpts. + excerpts: Annotated[List[NesExcerpt], Field(description="The code excerpts.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4018,55 +3965,50 @@ class InitializeRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Capabilities supported by the client. - client_capabilities: Annotated[ - Optional[ClientCapabilities], + + +class NesOpenFile(BaseModel): + # The URI of the file. + uri: Annotated[str, Field(description="The URI of the file.")] + # The language identifier. + language_id: Annotated[str, Field(alias="languageId", description="The language identifier.")] + # The visible range in the editor, if any. + visible_range: Annotated[ + Optional[Range], + Field(alias="visibleRange", description="The visible range in the editor, if any."), + ] = None + # Timestamp in milliseconds since epoch of when the file was last focused. + last_focused_ms: Annotated[ + Optional[int], Field( - alias="clientCapabilities", - description="Capabilities supported by the client.", + alias="lastFocusedMs", + description="Timestamp in milliseconds since epoch of when the file was last focused.", + ge=0, ), - ] = ClientCapabilities() - # Information about the Client name and version sent to the Agent. + ] = None + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. # - # Note: in future versions of the protocol, this will be required. - client_info: Annotated[ - Optional[Implementation], + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - alias="clientInfo", - description="Information about the Client name and version sent to the Agent.\n\nNote: in future versions of the protocol, this will be required.", + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The latest protocol version supported by the client. - protocol_version: Annotated[ - int, - Field( - alias="protocolVersion", - description="The latest protocol version supported by the client.", - ge=0, - le=65535, - ), - ] - - @field_validator("protocol_version", mode="before") - @classmethod - def _coerce_protocol_version(cls, value: Any) -> int: - # Some clients (e.g. Zed) send a date string like "2024-11-05" instead - # of an integer. The Rust SDK treats legacy strings as version 0; this - # SDK maps unparsable values to 1 so the connection is not rejected. - # See: https://github.com/agentclientprotocol/rust-sdk/blob/main/crates/agent-client-protocol-schema/src/version.rs - if isinstance(value, int): - return value - try: - return int(value) - except (TypeError, ValueError): - return 1 - - -class AcpMcpServer(McpServerAcp): - type: Literal["acp"] -class NesCapabilities(BaseModel): +class NesDiagnostic(BaseModel): + # The URI of the file containing the diagnostic. + uri: Annotated[str, Field(description="The URI of the file containing the diagnostic.")] + # The range of the diagnostic. + range: Annotated[Range, Field(description="The range of the diagnostic.")] + # The severity of the diagnostic. + severity: Annotated[str, Field(description="The severity of the diagnostic.")] + # The diagnostic message. + message: Annotated[str, Field(description="The diagnostic message.")] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4079,36 +4021,32 @@ class NesCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Context the agent wants attached to each suggestion request. - context: Annotated[ - Optional[NesContextCapabilities], - Field(description="Context the agent wants attached to each suggestion request."), - ] = None - # Events the agent wants to receive. - events: Annotated[ - Optional[NesEventCapabilities], - Field(description="Events the agent wants to receive."), - ] = None -class NesEditSuggestion(BaseModel): - # Optional suggested cursor position after applying edits. - cursor_position: Annotated[ - Optional[Position], - Field( - alias="cursorPosition", - description="Optional suggested cursor position after applying edits.", - ), +class ClientErrorMessage(BaseModel): + # The id of the request this response answers. + id: Annotated[ + Optional[Union[int, str]], + Field(description="The id of the request this response answers."), ] = None - # The text edits to apply. - edits: Annotated[List[NesTextEdit], Field(description="The text edits to apply.")] - # Unique identifier for accept/reject tracking. - id: Annotated[str, Field(description="Unique identifier for accept/reject tracking.")] - # The URI of the file to edit. - uri: Annotated[str, Field(description="The URI of the file to edit.")] + # Method-specific error data. + error: Annotated[Error, Field(description="Method-specific error data.")] -class NesSuggestContext(BaseModel): +class AllowedOutcome(SelectedPermissionOutcome): + outcome: Literal["selected"] + + +class TerminalOutputResponse(BaseModel): + # The terminal output captured so far. + output: Annotated[str, Field(description="The terminal output captured so far.")] + # Whether the output was truncated due to byte limits. + truncated: Annotated[bool, Field(description="Whether the output was truncated due to byte limits.")] + # Exit status if the command has completed. + exit_status: Annotated[ + Optional[TerminalExitStatus], + Field(alias="exitStatus", description="Exit status if the command has completed."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4121,46 +4059,9 @@ class NesSuggestContext(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Current diagnostics (errors, warnings). - diagnostics: Annotated[ - Optional[List[NesDiagnostic]], - Field(description="Current diagnostics (errors, warnings)."), - ] = None - # Recent edit history. - edit_history: Annotated[ - Optional[List[NesEditHistoryEntry]], - Field(alias="editHistory", description="Recent edit history."), - ] = None - # Currently open files in the editor. - open_files: Annotated[ - Optional[List[NesOpenFile]], - Field(alias="openFiles", description="Currently open files in the editor."), - ] = None - # Recently accessed files. - recent_files: Annotated[ - Optional[List[NesRecentFile]], - Field(alias="recentFiles", description="Recently accessed files."), - ] = None - # Related code snippets. - related_snippets: Annotated[ - Optional[List[NesRelatedSnippet]], - Field(alias="relatedSnippets", description="Related code snippets."), - ] = None - # Recent user actions (typing, navigation, etc.). - user_actions: Annotated[ - Optional[List[NesUserAction]], - Field( - alias="userActions", - description="Recent user actions (typing, navigation, etc.).", - ), - ] = None - - -class NesEditSuggestionVariant(NesEditSuggestion): - kind: Literal["edit"] -class NewSessionRequest(BaseModel): +class AcceptElicitationResponse(ElicitationAcceptAction): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4173,34 +4074,20 @@ class NewSessionRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Additional workspace roots for this session. Each path must be absolute. - # - # These expand the session's filesystem scope without changing `cwd`, which - # remains the base for relative paths. When omitted or empty, no - # additional roots are activated for the new session. - additional_directories: Annotated[ - Optional[List[str]], - Field( - alias="additionalDirectories", - description="Additional workspace roots for this session. Each path must be absolute.\n\nThese expand the session's filesystem scope without changing `cwd`, which\nremains the base for relative paths. When omitted or empty, no\nadditional roots are activated for the new session.", - ), + action: Literal["accept"] + + +class TextDocumentContentChangeEvent(BaseModel): + # The range of the document that changed. If `None`, the entire content is replaced. + range: Annotated[ + Optional[Range], + Field(description="The range of the document that changed. If `None`, the entire content is replaced."), ] = None - # The working directory for this session. Must be an absolute path. - cwd: Annotated[ + # The new text for the range, or the full document content if `range` is `None`. + text: Annotated[ str, - Field(description="The working directory for this session. Must be an absolute path."), - ] - # List of MCP (Model Context Protocol) servers the agent should connect to. - mcp_servers: Annotated[ - List[Union[HttpMcpServer, SseMcpServer, AcpMcpServer, McpServerStdio]], - Field( - alias="mcpServers", - description="List of MCP (Model Context Protocol) servers the agent should connect to.", - ), + Field(description="The new text for the range, or the full document content if `range` is `None`."), ] - - -class Plan(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4213,19 +4100,28 @@ class Plan(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The list of tasks to be accomplished. - # - # When updating a plan, the agent must send a complete list of all entries - # with their current status. The client replaces the entire plan with each update. - entries: Annotated[ - List[PlanEntry], + + +class DidFocusDocumentNotification(BaseModel): + # The session ID for this notification. + session_id: Annotated[ + str, + Field(alias="sessionId", description="The session ID for this notification."), + ] + # The URI of the focused document. + uri: Annotated[str, Field(description="The URI of the focused document.")] + # The version number of the document. + version: Annotated[int, Field(description="The version number of the document.")] + # The current cursor position. + position: Annotated[Position, Field(description="The current cursor position.")] + # The portion of the file currently visible in the editor viewport. + visible_range: Annotated[ + Range, Field( - description="The list of tasks to be accomplished.\n\nWhen updating a plan, the agent must send a complete list of all entries\nwith their current status. The client replaces the entire plan with each update." + alias="visibleRange", + description="The portion of the file currently visible in the editor viewport.", ), ] - - -class PlanUpdate(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4238,14 +4134,18 @@ class PlanUpdate(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The updated plan content. - plan: Annotated[ - Union[PlanUpdateItems, PlanUpdateFile, PlanUpdateMarkdown], - Field(description="The updated plan content.", discriminator="type"), - ] -class ResumeSessionRequest(BaseModel): +class RejectNesNotification(BaseModel): + # The session ID for this notification. + session_id: Annotated[ + str, + Field(alias="sessionId", description="The session ID for this notification."), + ] + # The ID of the rejected suggestion. + id: Annotated[str, Field(description="The ID of the rejected suggestion.")] + # The reason for rejection. + reason: Annotated[Optional[str], Field(description="The reason for rejection.")] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4258,34 +4158,36 @@ class ResumeSessionRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Additional workspace roots to activate for this session. Each path must be absolute. - # - # When omitted or empty, no additional roots are activated. When non-empty, - # this is the complete resulting additional-root list for the resumed - # session. It may differ from any previously used or reported list as long as - # the request `cwd` matches the session's `cwd`. - additional_directories: Annotated[ - Optional[List[str]], - Field( - alias="additionalDirectories", - description="Additional workspace roots to activate for this session. Each path must be absolute.\n\nWhen omitted or empty, no additional roots are activated. When non-empty,\nthis is the complete resulting additional-root list for the resumed\nsession. It may differ from any previously used or reported list as long as\nthe request `cwd` matches the session's `cwd`.", - ), - ] = None - # The working directory for this session. - cwd: Annotated[str, Field(description="The working directory for this session.")] - # List of MCP servers to connect to for this session. - mcp_servers: Annotated[ - Optional[List[Union[HttpMcpServer, SseMcpServer, AcpMcpServer, McpServerStdio]]], - Field( - alias="mcpServers", - description="List of MCP servers to connect to for this session.", - ), - ] = None - # The ID of the session to resume. - session_id: Annotated[str, Field(alias="sessionId", description="The ID of the session to resume.")] -class SessionConfigSelectGroup(BaseModel): +class TextContentBlock(TextContent): + type: Literal["text"] + + +class ImageContentBlock(ImageContent): + type: Literal["image"] + + +class AudioContentBlock(AudioContent): + type: Literal["audio"] + + +class ResourceContentBlock(ResourceLink): + type: Literal["resource_link"] + + +class EmbeddedResourceContentBlock(EmbeddedResource): + type: Literal["resource"] + + +class Content(BaseModel): + # The actual content block. + content: Annotated[ + Union[ + TextContentBlock, ImageContentBlock, AudioContentBlock, ResourceContentBlock, EmbeddedResourceContentBlock + ], + Field(description="The actual content block.", discriminator="type"), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4298,30 +4200,30 @@ class SessionConfigSelectGroup(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Unique identifier for this group. - group: Annotated[str, Field(description="Unique identifier for this group.")] - # Human-readable label for this group. - name: Annotated[str, Field(description="Human-readable label for this group.")] - # The set of option values in this group. - options: Annotated[ - List[SessionConfigSelectOption], - Field(description="The set of option values in this group."), - ] - - -class AgentPlanUpdate(Plan): - session_update: Annotated[Literal["plan"], Field(alias="sessionUpdate")] - - -class AgentPlanContentUpdate(PlanUpdate): - session_update: Annotated[Literal["plan_update"], Field(alias="sessionUpdate")] - - -class AvailableCommandsUpdate(_AvailableCommandsUpdate): - session_update: Annotated[Literal["available_commands_update"], Field(alias="sessionUpdate")] -class SuggestNesRequest(BaseModel): +class MultiSelectPropertySchema(BaseModel): + # Optional title for the property. + title: Annotated[Optional[str], Field(description="Optional title for the property.")] = None + # Human-readable description. + description: Annotated[Optional[str], Field(description="Human-readable description.")] = None + # Minimum number of items to select. + min_items: Annotated[ + Optional[int], + Field(alias="minItems", description="Minimum number of items to select.", ge=0), + ] = None + # Maximum number of items to select. + max_items: Annotated[ + Optional[int], + Field(alias="maxItems", description="Maximum number of items to select.", ge=0), + ] = None + # The items definition describing allowed values. + items: Annotated[ + Union[UntitledMultiSelectItems, TitledMultiSelectItems], + Field(description="The items definition describing allowed values."), + ] + # Default selected values. + default: Annotated[Optional[List[str]], Field(description="Default selected values.")] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4334,29 +4236,59 @@ class SuggestNesRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Context for the suggestion, included based on agent capabilities. - context: Annotated[ - Optional[NesSuggestContext], - Field(description="Context for the suggestion, included based on agent capabilities."), + + +class AgentErrorMessage(BaseModel): + # The id of the request this response answers. + id: Annotated[ + Optional[Union[int, str]], + Field(description="The id of the request this response answers."), ] = None - # The current cursor position. - position: Annotated[Position, Field(description="The current cursor position.")] - # The current text selection range, if any. - selection: Annotated[Optional[Range], Field(description="The current text selection range, if any.")] = None - # The session ID for this request. - session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] - # What triggered this suggestion request. - trigger_kind: Annotated[ - str, - Field(alias="triggerKind", description="What triggered this suggestion request."), - ] - # The URI of the document to suggest for. - uri: Annotated[str, Field(description="The URI of the document to suggest for.")] - # The version number of the document. - version: Annotated[int, Field(description="The version number of the document.")] + # Method-specific error data. + error: Annotated[Error, Field(description="Method-specific error data.")] -class SuggestNesResponse(BaseModel): +class NesDocumentEventCapabilities(BaseModel): + # Whether the agent wants `document/didOpen` events. + did_open: Annotated[ + Optional[NesDocumentDidOpenCapabilities], + Field( + alias="didOpen", + description="Whether the agent wants `document/didOpen` events.", + ), + ] = None + # Whether the agent wants `document/didChange` events, and the sync kind. + did_change: Annotated[ + Optional[NesDocumentDidChangeCapabilities], + Field( + alias="didChange", + description="Whether the agent wants `document/didChange` events, and the sync kind.", + ), + ] = None + # Whether the agent wants `document/didClose` events. + did_close: Annotated[ + Optional[NesDocumentDidCloseCapabilities], + Field( + alias="didClose", + description="Whether the agent wants `document/didClose` events.", + ), + ] = None + # Whether the agent wants `document/didSave` events. + did_save: Annotated[ + Optional[NesDocumentDidSaveCapabilities], + Field( + alias="didSave", + description="Whether the agent wants `document/didSave` events.", + ), + ] = None + # Whether the agent wants `document/didFocus` events. + did_focus: Annotated[ + Optional[NesDocumentDidFocusCapabilities], + Field( + alias="didFocus", + description="Whether the agent wants `document/didFocus` events.", + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4369,21 +4301,14 @@ class SuggestNesResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The list of suggestions. - suggestions: Annotated[ - List[ - Union[ - NesEditSuggestionVariant, - NesJumpSuggestionVariant, - NesRenameSuggestionVariant, - NesSearchAndReplaceSuggestionVariant, - ] - ], - Field(description="The list of suggestions."), - ] -class AgentCapabilities(BaseModel): +class ListProvidersResponse(BaseModel): + # Configurable providers with current routing info suitable for UI display. + providers: Annotated[ + List[ProviderInfo], + Field(description="Configurable providers with current routing info suitable for UI display."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4396,81 +4321,52 @@ class AgentCapabilities(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Authentication-related capabilities supported by the agent. - auth: Annotated[ - Optional[AgentAuthCapabilities], - Field(description="Authentication-related capabilities supported by the agent."), - ] = {} - # Whether the agent supports `session/load`. - load_session: Annotated[ - Optional[bool], - Field( - alias="loadSession", - description="Whether the agent supports `session/load`.", - ), - ] = False - # MCP capabilities supported by the agent. - mcp_capabilities: Annotated[ - Optional[McpCapabilities], - Field( - alias="mcpCapabilities", - description="MCP capabilities supported by the agent.", - ), - ] = McpCapabilities() - # **UNSTABLE** - # - # This capability is not part of the spec yet, and may be removed or changed at any point. - # - # NES (Next Edit Suggestions) capabilities supported by the agent. - nes: Annotated[ - Optional[NesCapabilities], - Field( - description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNES (Next Edit Suggestions) capabilities supported by the agent." - ), - ] = None - # **UNSTABLE** - # - # This capability is not part of the spec yet, and may be removed or changed at any point. + + +class SessionConfigSelect(BaseModel): + # The currently selected value. + current_value: Annotated[str, Field(alias="currentValue", description="The currently selected value.")] + # The set of selectable options. + options: Annotated[ + Union[List[SessionConfigSelectOption], List[SessionConfigSelectGroup]], + Field(description="The set of selectable options."), + ] + + +class NesTextEdit(BaseModel): + # The range to replace. + range: Annotated[Range, Field(description="The range to replace.")] + # The replacement text. + new_text: Annotated[str, Field(alias="newText", description="The replacement text.")] + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. # - # The position encoding selected by the agent from the client's supported encodings. - position_encoding: Annotated[ - Optional[str], + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - alias="positionEncoding", - description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe position encoding selected by the agent from the client's supported encodings.", + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Prompt capabilities supported by the agent. - prompt_capabilities: Annotated[ - Optional[PromptCapabilities], - Field( - alias="promptCapabilities", - description="Prompt capabilities supported by the agent.", - ), - ] = PromptCapabilities() - # **UNSTABLE** - # - # This capability is not part of the spec yet, and may be removed or changed at any point. - # - # Provider configuration capabilities supported by the agent. - # - # By supplying `{}` it means that the agent supports provider configuration methods. - providers: Annotated[ - Optional[ProvidersCapabilities], + + +class NesEditSuggestion(BaseModel): + # Unique identifier for accept/reject tracking. + id: Annotated[str, Field(description="Unique identifier for accept/reject tracking.")] + # The URI of the file to edit. + uri: Annotated[str, Field(description="The URI of the file to edit.")] + # The text edits to apply. + edits: Annotated[List[NesTextEdit], Field(description="The text edits to apply.")] + # Optional suggested cursor position after applying edits. + cursor_position: Annotated[ + Optional[Position], Field( - description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nProvider configuration capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports provider configuration methods." + alias="cursorPosition", + description="Optional suggested cursor position after applying edits.", ), ] = None - session_capabilities: Annotated[Optional[SessionCapabilities], Field(alias="sessionCapabilities")] = ( - SessionCapabilities() - ) - - -class EmbeddedResourceContentBlock(EmbeddedResource): - type: Literal["resource"] - - -class ContentChunk(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4483,6 +4379,13 @@ class ContentChunk(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None + + +class AgentPlanUpdate(Plan): + session_update: Annotated[Literal["plan"], Field(alias="sessionUpdate")] + + +class ContentChunk(BaseModel): # A single item of content content: Annotated[ Union[ @@ -4501,45 +4404,30 @@ class ContentChunk(BaseModel): description="A unique identifier for the message this chunk belongs to.\n\nAll chunks belonging to the same message share the same `messageId`.\nA change in `messageId` indicates a new message has started.", ), ] = None - - -class ElicitationFormSessionMode(ElicitationSessionScope): - # A JSON Schema describing the form fields to present to the user. - requested_schema: Annotated[ - ElicitationSchema, + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - alias="requestedSchema", - description="A JSON Schema describing the form fields to present to the user.", + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), - ] + ] = None -class ElicitationFormRequestMode(ElicitationRequestScope): - # A JSON Schema describing the form fields to present to the user. - requested_schema: Annotated[ - ElicitationSchema, - Field( - alias="requestedSchema", - description="A JSON Schema describing the form fields to present to the user.", - ), - ] +class PlanUpdateItems(PlanItems): + type: Literal["items"] -class ElicitationFormMode(RootModel[Union[ElicitationFormSessionMode, ElicitationFormRequestMode]]): - # **UNSTABLE** - # - # This capability is not part of the spec yet, and may be removed or changed at any point. - # - # Form-based elicitation mode where the client renders a form from the provided schema. - root: Annotated[ - Union[ElicitationFormSessionMode, ElicitationFormRequestMode], - Field( - description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nForm-based elicitation mode where the client renders a form from the provided schema." - ), +class PlanUpdate(BaseModel): + # The updated plan content. + plan: Annotated[ + Union[PlanUpdateItems, PlanUpdateFile, PlanUpdateMarkdown], + Field(description="The updated plan content.", discriminator="type"), ] - - -class ForkSessionRequest(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4552,33 +4440,41 @@ class ForkSessionRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Additional workspace roots to activate for this session. Each path must be absolute. - # - # When omitted or empty, no additional roots are activated. When non-empty, - # this is the complete resulting additional-root list for the forked - # session. - additional_directories: Annotated[ - Optional[List[str]], - Field( - alias="additionalDirectories", - description="Additional workspace roots to activate for this session. Each path must be absolute.\n\nWhen omitted or empty, no additional roots are activated. When non-empty,\nthis is the complete resulting additional-root list for the forked\nsession.", - ), + + +class AvailableCommand(BaseModel): + # Command name (e.g., `create_plan`, `research_codebase`). + name: Annotated[ + str, + Field(description="Command name (e.g., `create_plan`, `research_codebase`)."), + ] + # Human-readable description of what the command does. + description: Annotated[str, Field(description="Human-readable description of what the command does.")] + # Input for the command if required + input: Annotated[ + Optional[AvailableCommandInput], + Field(description="Input for the command if required"), ] = None - # The working directory for this session. - cwd: Annotated[str, Field(description="The working directory for this session.")] - # List of MCP servers to connect to for this session. - mcp_servers: Annotated[ - Optional[List[Union[HttpMcpServer, SseMcpServer, AcpMcpServer, McpServerStdio]]], + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], Field( - alias="mcpServers", - description="List of MCP servers to connect to for this session.", + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The ID of the session to fork. - session_id: Annotated[str, Field(alias="sessionId", description="The ID of the session to fork.")] -class InitializeResponse(BaseModel): +class _AvailableCommandsUpdate(BaseModel): + # Commands the agent can execute + available_commands: Annotated[ + List[AvailableCommand], + Field(alias="availableCommands", description="Commands the agent can execute"), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4591,48 +4487,20 @@ class InitializeResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Capabilities supported by the agent. - agent_capabilities: Annotated[ - Optional[AgentCapabilities], - Field( - alias="agentCapabilities", - description="Capabilities supported by the agent.", - ), - ] = AgentCapabilities() - # Information about the Agent name and version sent to the Client. + + +class ClientSessionCapabilities(BaseModel): + # Config option capabilities supported by the client. # - # Note: in future versions of the protocol, this will be required. - agent_info: Annotated[ - Optional[Implementation], + # Omitted or `null` means the client does not advertise support for any + # config option extensions. + config_options: Annotated[ + Optional[SessionConfigOptionsCapabilities], Field( - alias="agentInfo", - description="Information about the Agent name and version sent to the Client.\n\nNote: in future versions of the protocol, this will be required.", + alias="configOptions", + description="Config option capabilities supported by the client.\n\nOmitted or `null` means the client does not advertise support for any\nconfig option extensions.", ), ] = None - # Authentication methods supported by the agent. - auth_methods: Annotated[ - Optional[List[Union[EnvVarAuthMethod, TerminalAuthMethod, AuthMethodAgent]]], - Field( - alias="authMethods", - description="Authentication methods supported by the agent.", - ), - ] = [] - # The protocol version the client specified if supported by the agent, - # or the latest protocol version supported by the agent. - # - # The client should disconnect, if it doesn't support this version. - protocol_version: Annotated[ - int, - Field( - alias="protocolVersion", - description="The protocol version the client specified if supported by the agent,\nor the latest protocol version supported by the agent.\n\nThe client should disconnect, if it doesn't support this version.", - ge=0, - le=65535, - ), - ] - - -class LoadSessionRequest(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4645,34 +4513,34 @@ class LoadSessionRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Additional workspace roots to activate for this session. Each path must be absolute. + + +class NewSessionRequest(BaseModel): + # The working directory for this session. Must be an absolute path. + cwd: Annotated[ + str, + Field(description="The working directory for this session. Must be an absolute path."), + ] + # Additional workspace roots for this session. Each path must be absolute. # - # When omitted or empty, no additional roots are activated. When non-empty, - # this is the complete resulting additional-root list for the loaded - # session. It may differ from any previously used or reported list as long as - # the request `cwd` matches the session's `cwd`. + # These expand the session's filesystem scope without changing `cwd`, which + # remains the base for relative paths. When omitted or empty, no + # additional roots are activated for the new session. additional_directories: Annotated[ Optional[List[str]], Field( alias="additionalDirectories", - description="Additional workspace roots to activate for this session. Each path must be absolute.\n\nWhen omitted or empty, no additional roots are activated. When non-empty,\nthis is the complete resulting additional-root list for the loaded\nsession. It may differ from any previously used or reported list as long as\nthe request `cwd` matches the session's `cwd`.", + description="Additional workspace roots for this session. Each path must be absolute.\n\nThese expand the session's filesystem scope without changing `cwd`, which\nremains the base for relative paths. When omitted or empty, no\nadditional roots are activated for the new session.", ), ] = None - # The working directory for this session. - cwd: Annotated[str, Field(description="The working directory for this session.")] - # List of MCP servers to connect to for this session. + # List of MCP (Model Context Protocol) servers the agent should connect to. mcp_servers: Annotated[ List[Union[HttpMcpServer, SseMcpServer, AcpMcpServer, McpServerStdio]], Field( alias="mcpServers", - description="List of MCP servers to connect to for this session.", + description="List of MCP (Model Context Protocol) servers the agent should connect to.", ), ] - # The ID of the session to load. - session_id: Annotated[str, Field(alias="sessionId", description="The ID of the session to load.")] - - -class PromptRequest(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4685,6 +4553,17 @@ class PromptRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None + + +class PromptRequest(BaseModel): + # The ID of the session to send this user message to + session_id: Annotated[ + str, + Field( + alias="sessionId", + description="The ID of the session to send this user message to", + ), + ] # The blocks of content that compose the user's message. # # As a baseline, the Agent MUST support [`ContentBlock::Text`] and [`ContentBlock::ResourceLink`], @@ -4712,83 +4591,6 @@ class PromptRequest(BaseModel): description="The blocks of content that compose the user's message.\n\nAs a baseline, the Agent MUST support [`ContentBlock::Text`] and [`ContentBlock::ResourceLink`],\nwhile other variants are optionally enabled via [`PromptCapabilities`].\n\nThe Client MUST adapt its interface according to [`PromptCapabilities`].\n\nThe client MAY include referenced pieces of context as either\n[`ContentBlock::Resource`] or [`ContentBlock::ResourceLink`].\n\nWhen available, [`ContentBlock::Resource`] is preferred\nas it avoids extra round-trips and allows the message to include\npieces of context from sources the agent may not have access to." ), ] - # The ID of the session to send this user message to - session_id: Annotated[ - str, - Field( - alias="sessionId", - description="The ID of the session to send this user message to", - ), - ] - - -class SessionConfigSelect(BaseModel): - # The currently selected value. - current_value: Annotated[str, Field(alias="currentValue", description="The currently selected value.")] - # The set of selectable options. - options: Annotated[ - Union[List[SessionConfigSelectOption], List[SessionConfigSelectGroup]], - Field(description="The set of selectable options."), - ] - - -class UserMessageChunk(ContentChunk): - session_update: Annotated[Literal["user_message_chunk"], Field(alias="sessionUpdate")] - - -class AgentMessageChunk(ContentChunk): - session_update: Annotated[Literal["agent_message_chunk"], Field(alias="sessionUpdate")] - - -class AgentThoughtChunk(ContentChunk): - session_update: Annotated[Literal["agent_thought_chunk"], Field(alias="sessionUpdate")] - - -class ClientRequest(BaseModel): - # JSON RPC Request Id - # - # An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \[1\] and Numbers SHOULD NOT contain fractional parts \[2\] - # - # The Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects. - # - # \[1\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling. - # - # \[2\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions. - id: Annotated[ - Optional[Union[int, str]], - Field( - description="JSON RPC Request Id\n\nAn identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \\[1\\] and Numbers SHOULD NOT contain fractional parts \\[2\\]\n\nThe Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects.\n\n\\[1\\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling.\n\n\\[2\\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions." - ), - ] = None - method: str - params: Optional[ - Union[ - InitializeRequest, - AuthenticateRequest, - ListProvidersRequest, - SetProviderRequest, - DisableProviderRequest, - LogoutRequest, - NewSessionRequest, - LoadSessionRequest, - ListSessionsRequest, - DeleteSessionRequest, - ForkSessionRequest, - ResumeSessionRequest, - CloseSessionRequest, - SetSessionModeRequest, - PromptRequest, - StartNesRequest, - SuggestNesRequest, - CloseNesRequest, - MessageMcpRequest, - Union[SetSessionConfigOptionBooleanRequest, SetSessionConfigOptionSelectRequest], - Any, - ] - ] = None - - -class Content(BaseModel): # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4801,16 +4603,42 @@ class Content(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The actual content block. - content: Annotated[ - Union[ - TextContentBlock, ImageContentBlock, AudioContentBlock, ResourceContentBlock, EmbeddedResourceContentBlock - ], - Field(description="The actual content block.", discriminator="type"), - ] -class CreateFormElicitationRequest(BaseModel): +class NesSuggestContext(BaseModel): + # Recently accessed files. + recent_files: Annotated[ + Optional[List[NesRecentFile]], + Field(alias="recentFiles", description="Recently accessed files."), + ] = None + # Related code snippets. + related_snippets: Annotated[ + Optional[List[NesRelatedSnippet]], + Field(alias="relatedSnippets", description="Related code snippets."), + ] = None + # Recent edit history. + edit_history: Annotated[ + Optional[List[NesEditHistoryEntry]], + Field(alias="editHistory", description="Recent edit history."), + ] = None + # Recent user actions (typing, navigation, etc.). + user_actions: Annotated[ + Optional[List[NesUserAction]], + Field( + alias="userActions", + description="Recent user actions (typing, navigation, etc.).", + ), + ] = None + # Currently open files in the editor. + open_files: Annotated[ + Optional[List[NesOpenFile]], + Field(alias="openFiles", description="Currently open files in the editor."), + ] = None + # Current diagnostics (errors, warnings). + diagnostics: Annotated[ + Optional[List[NesDiagnostic]], + Field(description="Current diagnostics (errors, warnings)."), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4823,15 +4651,17 @@ class CreateFormElicitationRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # A human-readable message describing what input is needed. - message: Annotated[ - str, - Field(description="A human-readable message describing what input is needed."), - ] - mode: Literal["form"] -class SessionConfigOptionSelect(SessionConfigSelect): +class RequestPermissionResponse(BaseModel): + # The user's decision on the permission request. + outcome: Annotated[ + Union[DeniedOutcome, AllowedOutcome], + Field( + description="The user's decision on the permission request.", + discriminator="outcome", + ), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4844,24 +4674,208 @@ class SessionConfigOptionSelect(SessionConfigSelect): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Optional semantic category for this option (UX only). - category: Annotated[ - Optional[str], - Field(description="Optional semantic category for this option (UX only)."), + + +class DidChangeDocumentNotification(BaseModel): + # The session ID for this notification. + session_id: Annotated[ + str, + Field(alias="sessionId", description="The session ID for this notification."), + ] + # The URI of the changed document. + uri: Annotated[str, Field(description="The URI of the changed document.")] + # The new version number of the document. + version: Annotated[int, Field(description="The new version number of the document.")] + # The content changes. + content_changes: Annotated[ + List[TextDocumentContentChangeEvent], + Field(alias="contentChanges", description="The content changes."), + ] + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), ] = None - # Optional description for the Client to display to the user. - description: Annotated[ - Optional[str], - Field(description="Optional description for the Client to display to the user."), + + +class ContentToolCallContent(Content): + type: Literal["content"] + + +class ElicitationMultiSelectPropertySchema(MultiSelectPropertySchema): + type: Literal["array"] + + +class NesEventCapabilities(BaseModel): + # Document event capabilities. + document: Annotated[ + Optional[NesDocumentEventCapabilities], + Field(description="Document event capabilities."), + ] = None + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), ] = None + + +class SessionConfigOptionSelect(SessionConfigSelect): # Unique identifier for the configuration option. id: Annotated[str, Field(description="Unique identifier for the configuration option.")] # Human-readable label for the option. name: Annotated[str, Field(description="Human-readable label for the option.")] + # Optional description for the Client to display to the user. + description: Annotated[ + Optional[str], + Field(description="Optional description for the Client to display to the user."), + ] = None + # Optional semantic category for this option (UX only). + category: Annotated[ + Optional[str], + Field(description="Optional semantic category for this option (UX only)."), + ] = None + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), + ] = None type: Literal["select"] +class LoadSessionResponse(BaseModel): + # Initial mode state if supported by the Agent + # + # See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) + modes: Annotated[ + Optional[SessionModeState], + Field( + description="Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" + ), + ] = None + # Initial session configuration options if supported by the Agent. + config_options: Annotated[ + Optional[List[Union[SessionConfigOptionSelect, SessionConfigOptionBoolean]]], + Field( + alias="configOptions", + description="Initial session configuration options if supported by the Agent.", + ), + ] = None + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), + ] = None + + +class ForkSessionResponse(BaseModel): + # Unique identifier for the newly created forked session. + session_id: Annotated[ + str, + Field( + alias="sessionId", + description="Unique identifier for the newly created forked session.", + ), + ] + # Initial mode state if supported by the Agent + # + # See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) + modes: Annotated[ + Optional[SessionModeState], + Field( + description="Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" + ), + ] = None + # Initial session configuration options if supported by the Agent. + config_options: Annotated[ + Optional[List[Union[SessionConfigOptionSelect, SessionConfigOptionBoolean]]], + Field( + alias="configOptions", + description="Initial session configuration options if supported by the Agent.", + ), + ] = None + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), + ] = None + + +class ResumeSessionResponse(BaseModel): + # Initial mode state if supported by the Agent + # + # See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) + modes: Annotated[ + Optional[SessionModeState], + Field( + description="Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" + ), + ] = None + # Initial session configuration options if supported by the Agent. + config_options: Annotated[ + Optional[List[Union[SessionConfigOptionSelect, SessionConfigOptionBoolean]]], + Field( + alias="configOptions", + description="Initial session configuration options if supported by the Agent.", + ), + ] = None + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), + ] = None + + class SetSessionConfigOptionResponse(BaseModel): + # The full set of configuration options and their current values. + config_options: Annotated[ + List[Union[SessionConfigOptionSelect, SessionConfigOptionBoolean]], + Field( + alias="configOptions", + description="The full set of configuration options and their current values.", + ), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4874,21 +4888,482 @@ class SetSessionConfigOptionResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The full set of configuration options and their current values. + + +class NesEditSuggestionVariant(NesEditSuggestion): + kind: Literal["edit"] + + +class UserMessageChunk(ContentChunk): + session_update: Annotated[Literal["user_message_chunk"], Field(alias="sessionUpdate")] + + +class AgentMessageChunk(ContentChunk): + session_update: Annotated[Literal["agent_message_chunk"], Field(alias="sessionUpdate")] + + +class AgentThoughtChunk(ContentChunk): + session_update: Annotated[Literal["agent_thought_chunk"], Field(alias="sessionUpdate")] + + +class AgentPlanContentUpdate(PlanUpdate): + session_update: Annotated[Literal["plan_update"], Field(alias="sessionUpdate")] + + +class AvailableCommandsUpdate(_AvailableCommandsUpdate): + session_update: Annotated[Literal["available_commands_update"], Field(alias="sessionUpdate")] + + +class ToolCall(BaseModel): + # Unique identifier for this tool call within the session. + tool_call_id: Annotated[ + str, + Field( + alias="toolCallId", + description="Unique identifier for this tool call within the session.", + ), + ] + # Human-readable title describing what the tool is doing. + title: Annotated[ + str, + Field(description="Human-readable title describing what the tool is doing."), + ] + # The category of tool being invoked. + # Helps clients choose appropriate icons and UI treatment. + kind: Annotated[ + Optional[ToolKind], + Field( + description="The category of tool being invoked.\nHelps clients choose appropriate icons and UI treatment." + ), + ] = None + # Current execution status of the tool call. + status: Annotated[Optional[ToolCallStatus], Field(description="Current execution status of the tool call.")] = None + # Content produced by the tool call. + content: Annotated[ + Optional[List[Union[ContentToolCallContent, FileEditToolCallContent, TerminalToolCallContent]]], + Field(description="Content produced by the tool call."), + ] = None + # File locations affected by this tool call. + # Enables "follow-along" features in clients. + locations: Annotated[ + Optional[List[ToolCallLocation]], + Field(description='File locations affected by this tool call.\nEnables "follow-along" features in clients.'), + ] = None + # Raw input parameters sent to the tool. + raw_input: Annotated[ + Optional[Any], + Field(alias="rawInput", description="Raw input parameters sent to the tool."), + ] = None + # Raw output returned by the tool. + raw_output: Annotated[ + Optional[Any], + Field(alias="rawOutput", description="Raw output returned by the tool."), + ] = None + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), + ] = None + + +class _ConfigOptionUpdate(BaseModel): + # The full set of configuration options and their current values. + config_options: Annotated[ + List[Union[SessionConfigOptionSelect, SessionConfigOptionBoolean]], + Field( + alias="configOptions", + description="The full set of configuration options and their current values.", + ), + ] + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), + ] = None + + +class ClientCapabilities(BaseModel): + # File system capabilities supported by the client. + # Determines which file operations the agent can request. + fs: Annotated[ + Optional[FileSystemCapabilities], + Field( + description="File system capabilities supported by the client.\nDetermines which file operations the agent can request." + ), + ] = FileSystemCapabilities() + # Whether the Client support all `terminal/*` methods. + terminal: Annotated[ + Optional[bool], + Field(description="Whether the Client support all `terminal/*` methods."), + ] = False + # **UNSTABLE** + # + # This capability is not part of the spec yet, and may be removed or changed at any point. + # + # Session-related capabilities supported by the client. + session: Annotated[ + Optional[ClientSessionCapabilities], + Field( + description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSession-related capabilities supported by the client." + ), + ] = None + # **UNSTABLE** + # + # This capability is not part of the spec yet, and may be removed or changed at any point. + # + # Whether the client supports `plan_update` and `plan_removed` session updates. + # + # Optional. Omitted means the client does not advertise support. + # Supplying `{}` means the client can receive both update types. + plan: Annotated[ + Optional[PlanCapabilities], + Field( + description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the client supports `plan_update` and `plan_removed` session updates.\n\nOptional. Omitted means the client does not advertise support.\nSupplying `{}` means the client can receive both update types." + ), + ] = None + # **UNSTABLE** + # + # This capability is not part of the spec yet, and may be removed or changed at any point. + # + # Authentication capabilities supported by the client. + # Determines which authentication method types the agent may include + # in its `InitializeResponse`. + auth: Annotated[ + Optional[AuthCapabilities], + Field( + description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAuthentication capabilities supported by the client.\nDetermines which authentication method types the agent may include\nin its `InitializeResponse`." + ), + ] = {"terminal": False} + # **UNSTABLE** + # + # This capability is not part of the spec yet, and may be removed or changed at any point. + # + # Elicitation capabilities supported by the client. + # Determines which elicitation modes the agent may use. + elicitation: Annotated[ + Optional[ElicitationCapabilities], + Field( + description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nElicitation capabilities supported by the client.\nDetermines which elicitation modes the agent may use." + ), + ] = None + # **UNSTABLE** + # + # This capability is not part of the spec yet, and may be removed or changed at any point. + # + # NES (Next Edit Suggestions) capabilities supported by the client. + nes: Annotated[ + Optional[ClientNesCapabilities], + Field( + description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNES (Next Edit Suggestions) capabilities supported by the client." + ), + ] = None + # **UNSTABLE** + # + # This capability is not part of the spec yet, and may be removed or changed at any point. + # + # The position encodings supported by the client, in order of preference. + position_encodings: Annotated[ + Optional[List[str]], + Field( + alias="positionEncodings", + description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe position encodings supported by the client, in order of preference.", + ), + ] = None + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), + ] = None + + +class SuggestNesRequest(BaseModel): + # The session ID for this request. + session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] + # The URI of the document to suggest for. + uri: Annotated[str, Field(description="The URI of the document to suggest for.")] + # The version number of the document. + version: Annotated[int, Field(description="The version number of the document.")] + # The current cursor position. + position: Annotated[Position, Field(description="The current cursor position.")] + # The current text selection range, if any. + selection: Annotated[Optional[Range], Field(description="The current text selection range, if any.")] = None + # What triggered this suggestion request. + trigger_kind: Annotated[ + str, + Field(alias="triggerKind", description="What triggered this suggestion request."), + ] + # Context for the suggestion, included based on agent capabilities. + context: Annotated[ + Optional[NesSuggestContext], + Field(description="Context for the suggestion, included based on agent capabilities."), + ] = None + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), + ] = None + + +class ClientResponseMessage(BaseModel): + # The id of the request this response answers. + id: Annotated[ + Optional[Union[int, str]], + Field(description="The id of the request this response answers."), + ] = None + # Method-specific response data. + result: Annotated[ + Union[ + WriteTextFileResponse, + ReadTextFileResponse, + RequestPermissionResponse, + CreateTerminalResponse, + TerminalOutputResponse, + ReleaseTerminalResponse, + WaitForTerminalExitResponse, + KillTerminalResponse, + ConnectMcpResponse, + DisconnectMcpResponse, + Union[ + AcceptElicitationResponse, + DeclineElicitationResponse, + CancelElicitationResponse, + ], + Any, + ], + Field(description="Method-specific response data."), + ] + + +class ClientResponse(RootModel[Union[ClientResponseMessage, ClientErrorMessage]]): + # A JSON-RPC response object. + root: Annotated[ + Union[ClientResponseMessage, ClientErrorMessage], + Field(description="A JSON-RPC response object."), + ] + + +class ClientNotification(BaseModel): + # The notification method name. + method: Annotated[str, Field(description="The notification method name.")] + # Method-specific notification parameters. + params: Annotated[ + Optional[ + Union[ + CancelNotification, + DidOpenDocumentNotification, + DidChangeDocumentNotification, + DidCloseDocumentNotification, + DidSaveDocumentNotification, + DidFocusDocumentNotification, + AcceptNesNotification, + RejectNesNotification, + MessageMcpNotification, + Any, + ] + ], + Field(description="Method-specific notification parameters."), + ] = None + + +class ToolCallUpdate(BaseModel): + # The ID of the tool call being updated. + tool_call_id: Annotated[ + str, + Field(alias="toolCallId", description="The ID of the tool call being updated."), + ] + # Update the tool kind. + kind: Annotated[Optional[ToolKind], Field(description="Update the tool kind.")] = None + # Update the execution status. + status: Annotated[Optional[ToolCallStatus], Field(description="Update the execution status.")] = None + # Update the human-readable title. + title: Annotated[Optional[str], Field(description="Update the human-readable title.")] = None + # Replace the content collection. + content: Annotated[ + Optional[List[Union[ContentToolCallContent, FileEditToolCallContent, TerminalToolCallContent]]], + Field(description="Replace the content collection."), + ] = None + # Replace the locations collection. + locations: Annotated[ + Optional[List[ToolCallLocation]], + Field(description="Replace the locations collection."), + ] = None + # Update the raw input. + raw_input: Annotated[Optional[Any], Field(alias="rawInput", description="Update the raw input.")] = None + # Update the raw output. + raw_output: Annotated[Optional[Any], Field(alias="rawOutput", description="Update the raw output.")] = None + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), + ] = None + + +class ElicitationSchema(BaseModel): + # Type discriminator. Always `"object"`. + type: Annotated[Optional[str], Field(description='Type discriminator. Always `"object"`.')] = "object" + # Optional title for the schema. + title: Annotated[Optional[str], Field(description="Optional title for the schema.")] = None + # Property definitions (must be primitive types). + properties: Annotated[ + Optional[ + Dict[ + str, + Union[ + ElicitationStringPropertySchema, + ElicitationNumberPropertySchema, + ElicitationIntegerPropertySchema, + ElicitationBooleanPropertySchema, + ElicitationMultiSelectPropertySchema, + ], + ] + ], + Field(description="Property definitions (must be primitive types)."), + ] = {} + # List of required property names. + required: Annotated[Optional[List[str]], Field(description="List of required property names.")] = None + # Optional description of what this schema represents. + description: Annotated[ + Optional[str], + Field(description="Optional description of what this schema represents."), + ] = None + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), + ] = None + + +class ElicitationFormSessionMode(ElicitationSessionScope): + # A JSON Schema describing the form fields to present to the user. + requested_schema: Annotated[ + ElicitationSchema, + Field( + alias="requestedSchema", + description="A JSON Schema describing the form fields to present to the user.", + ), + ] + + +class ElicitationFormRequestMode(ElicitationRequestScope): + # A JSON Schema describing the form fields to present to the user. + requested_schema: Annotated[ + ElicitationSchema, + Field( + alias="requestedSchema", + description="A JSON Schema describing the form fields to present to the user.", + ), + ] + + +class ElicitationFormMode(RootModel[Union[ElicitationFormSessionMode, ElicitationFormRequestMode]]): + # **UNSTABLE** + # + # This capability is not part of the spec yet, and may be removed or changed at any point. + # + # Form-based elicitation mode where the client renders a form from the provided schema. + root: Annotated[ + Union[ElicitationFormSessionMode, ElicitationFormRequestMode], + Field( + description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nForm-based elicitation mode where the client renders a form from the provided schema." + ), + ] + + +class NesCapabilities(BaseModel): + # Events the agent wants to receive. + events: Annotated[ + Optional[NesEventCapabilities], + Field(description="Events the agent wants to receive."), + ] = None + # Context the agent wants attached to each suggestion request. + context: Annotated[ + Optional[NesContextCapabilities], + Field(description="Context the agent wants attached to each suggestion request."), + ] = None + # The _meta property is reserved by ACP to allow clients and agents to attach additional + # metadata to their interactions. Implementations MUST NOT make assumptions about values at + # these keys. + # + # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + field_meta: Annotated[ + Optional[Dict[str, Any]], + Field( + alias="_meta", + description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + ), + ] = None + + +class NewSessionResponse(BaseModel): + # Unique identifier for the created session. + # + # Used in all subsequent requests for this conversation. + session_id: Annotated[ + str, + Field( + alias="sessionId", + description="Unique identifier for the created session.\n\nUsed in all subsequent requests for this conversation.", + ), + ] + # Initial mode state if supported by the Agent + # + # See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) + modes: Annotated[ + Optional[SessionModeState], + Field( + description="Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" + ), + ] = None + # Initial session configuration options if supported by the Agent. config_options: Annotated[ - List[Union[SessionConfigOptionSelect, SessionConfigOptionBoolean]], + Optional[List[Union[SessionConfigOptionSelect, SessionConfigOptionBoolean]]], Field( alias="configOptions", - description="The full set of configuration options and their current values.", + description="Initial session configuration options if supported by the Agent.", ), - ] - - -class ContentToolCallContent(Content): - type: Literal["content"] - - -class ToolCallUpdate(BaseModel): + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4901,34 +5376,21 @@ class ToolCallUpdate(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Replace the content collection. - content: Annotated[ - Optional[List[Union[ContentToolCallContent, FileEditToolCallContent, TerminalToolCallContent]]], - Field(description="Replace the content collection."), - ] = None - # Update the tool kind. - kind: Annotated[Optional[ToolKind], Field(description="Update the tool kind.")] = None - # Replace the locations collection. - locations: Annotated[ - Optional[List[ToolCallLocation]], - Field(description="Replace the locations collection."), - ] = None - # Update the raw input. - raw_input: Annotated[Optional[Any], Field(alias="rawInput", description="Update the raw input.")] = None - # Update the raw output. - raw_output: Annotated[Optional[Any], Field(alias="rawOutput", description="Update the raw output.")] = None - # Update the execution status. - status: Annotated[Optional[ToolCallStatus], Field(description="Update the execution status.")] = None - # Update the human-readable title. - title: Annotated[Optional[str], Field(description="Update the human-readable title.")] = None - # The ID of the tool call being updated. - tool_call_id: Annotated[ - str, - Field(alias="toolCallId", description="The ID of the tool call being updated."), - ] -class _ConfigOptionUpdate(BaseModel): +class SuggestNesResponse(BaseModel): + # The list of suggestions. + suggestions: Annotated[ + List[ + Union[ + NesEditSuggestionVariant, + NesJumpSuggestionVariant, + NesRenameSuggestionVariant, + NesSearchAndReplaceSuggestionVariant, + ] + ], + Field(description="The list of suggestions."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4941,17 +5403,49 @@ class _ConfigOptionUpdate(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # The full set of configuration options and their current values. - config_options: Annotated[ - List[Union[SessionConfigOptionSelect, SessionConfigOptionBoolean]], + + +class ToolCallStart(ToolCall): + session_update: Annotated[Literal["tool_call"], Field(alias="sessionUpdate")] + + +class ToolCallProgress(ToolCallUpdate): + session_update: Annotated[Literal["tool_call_update"], Field(alias="sessionUpdate")] + + +class ConfigOptionUpdate(_ConfigOptionUpdate): + session_update: Annotated[Literal["config_option_update"], Field(alias="sessionUpdate")] + + +class InitializeRequest(BaseModel): + # The latest protocol version supported by the client. + protocol_version: Annotated[ + int, Field( - alias="configOptions", - description="The full set of configuration options and their current values.", + alias="protocolVersion", + description="The latest protocol version supported by the client.", + ge=0, + le=65535, ), ] - - -class ForkSessionResponse(BaseModel): + # Capabilities supported by the client. + client_capabilities: Annotated[ + Optional[ClientCapabilities], + Field( + alias="clientCapabilities", + description="Capabilities supported by the client.", + ), + ] = ClientCapabilities() + # Information about the Client name and version sent to the Agent. + # + # Note: in future versions of the protocol, this will be required. + client_info: Annotated[ + Optional[Implementation], + Field( + alias="clientInfo", + description="Information about the Client name and version sent to the Agent.\n\nNote: in future versions of the protocol, this will be required.", + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -4964,34 +5458,38 @@ class ForkSessionResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Initial session configuration options if supported by the Agent. - config_options: Annotated[ - Optional[List[Union[SessionConfigOptionSelect, SessionConfigOptionBoolean]]], - Field( - alias="configOptions", - description="Initial session configuration options if supported by the Agent.", - ), - ] = None - # Initial mode state if supported by the Agent - # - # See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) - modes: Annotated[ - Optional[SessionModeState], - Field( - description="Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" - ), - ] = None - # Unique identifier for the newly created forked session. - session_id: Annotated[ - str, + + @field_validator("protocol_version", mode="before") + @classmethod + def _coerce_protocol_version(cls, value: Any) -> int: + # Some clients (e.g. Zed) send a date string like "2024-11-05" instead + # of an integer. The Rust SDK treats legacy strings as version 0; this + # SDK maps unparsable values to 1 so the connection is not rejected. + # See: https://github.com/agentclientprotocol/rust-sdk/blob/main/crates/agent-client-protocol-schema/src/version.rs + if isinstance(value, int): + return value + try: + return int(value) + except (TypeError, ValueError): + return 1 + + +class RequestPermissionRequest(BaseModel): + # The session ID for this request. + session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] + # Details about the tool call requiring permission. + tool_call: Annotated[ + ToolCallUpdate, Field( - alias="sessionId", - description="Unique identifier for the newly created forked session.", + alias="toolCall", + description="Details about the tool call requiring permission.", ), ] - - -class LoadSessionResponse(BaseModel): + # Available permission options for the user to choose from. + options: Annotated[ + List[PermissionOption], + Field(description="Available permission options for the user to choose from."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -5004,26 +5502,14 @@ class LoadSessionResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Initial session configuration options if supported by the Agent. - config_options: Annotated[ - Optional[List[Union[SessionConfigOptionSelect, SessionConfigOptionBoolean]]], - Field( - alias="configOptions", - description="Initial session configuration options if supported by the Agent.", - ), - ] = None - # Initial mode state if supported by the Agent - # - # See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) - modes: Annotated[ - Optional[SessionModeState], - Field( - description="Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" - ), - ] = None -class NewSessionResponse(BaseModel): +class CreateFormElicitationRequest(BaseModel): + # A human-readable message describing what input is needed. + message: Annotated[ + str, + Field(description="A human-readable message describing what input is needed."), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -5036,36 +5522,83 @@ class NewSessionResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Initial session configuration options if supported by the Agent. - config_options: Annotated[ - Optional[List[Union[SessionConfigOptionSelect, SessionConfigOptionBoolean]]], + mode: Literal["form"] + + +class AgentCapabilities(BaseModel): + # Whether the agent supports `session/load`. + load_session: Annotated[ + Optional[bool], Field( - alias="configOptions", - description="Initial session configuration options if supported by the Agent.", + alias="loadSession", + description="Whether the agent supports `session/load`.", ), - ] = None - # Initial mode state if supported by the Agent + ] = False + # Prompt capabilities supported by the agent. + prompt_capabilities: Annotated[ + Optional[PromptCapabilities], + Field( + alias="promptCapabilities", + description="Prompt capabilities supported by the agent.", + ), + ] = PromptCapabilities() + # MCP capabilities supported by the agent. + mcp_capabilities: Annotated[ + Optional[McpCapabilities], + Field( + alias="mcpCapabilities", + description="MCP capabilities supported by the agent.", + ), + ] = McpCapabilities() + # Session lifecycle and prompt capabilities advertised by the agent. + session_capabilities: Annotated[ + Optional[SessionCapabilities], + Field( + alias="sessionCapabilities", + description="Session lifecycle and prompt capabilities advertised by the agent.", + ), + ] = SessionCapabilities() + # Authentication-related capabilities supported by the agent. + auth: Annotated[ + Optional[AgentAuthCapabilities], + Field(description="Authentication-related capabilities supported by the agent."), + ] = {} + # **UNSTABLE** # - # See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) - modes: Annotated[ - Optional[SessionModeState], + # This capability is not part of the spec yet, and may be removed or changed at any point. + # + # Provider configuration capabilities supported by the agent. + # + # By supplying `{}` it means that the agent supports provider configuration methods. + providers: Annotated[ + Optional[ProvidersCapabilities], Field( - description="Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" + description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nProvider configuration capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports provider configuration methods." ), ] = None - # Unique identifier for the created session. + # **UNSTABLE** # - # Used in all subsequent requests for this conversation. - session_id: Annotated[ - str, + # This capability is not part of the spec yet, and may be removed or changed at any point. + # + # NES (Next Edit Suggestions) capabilities supported by the agent. + nes: Annotated[ + Optional[NesCapabilities], Field( - alias="sessionId", - description="Unique identifier for the created session.\n\nUsed in all subsequent requests for this conversation.", + description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNES (Next Edit Suggestions) capabilities supported by the agent." + ), + ] = None + # **UNSTABLE** + # + # This capability is not part of the spec yet, and may be removed or changed at any point. + # + # The position encoding selected by the agent from the client's supported encodings. + position_encoding: Annotated[ + Optional[str], + Field( + alias="positionEncoding", + description="**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe position encoding selected by the agent from the client's supported encodings.", ), - ] - - -class RequestPermissionRequest(BaseModel): + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -5078,24 +5611,36 @@ class RequestPermissionRequest(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Available permission options for the user to choose from. - options: Annotated[ - List[PermissionOption], - Field(description="Available permission options for the user to choose from."), - ] - # The session ID for this request. - session_id: Annotated[str, Field(alias="sessionId", description="The session ID for this request.")] - # Details about the tool call requiring permission. - tool_call: Annotated[ - ToolCallUpdate, + + +class SessionNotification(BaseModel): + # The ID of the session this update pertains to. + session_id: Annotated[ + str, Field( - alias="toolCall", - description="Details about the tool call requiring permission.", + alias="sessionId", + description="The ID of the session this update pertains to.", ), ] - - -class ResumeSessionResponse(BaseModel): + # The actual update content. + update: Annotated[ + Union[ + UserMessageChunk, + AgentMessageChunk, + AgentThoughtChunk, + ToolCallStart, + ToolCallProgress, + AgentPlanUpdate, + AgentPlanContentUpdate, + AgentPlanRemovedUpdate, + AvailableCommandsUpdate, + CurrentModeUpdate, + ConfigOptionUpdate, + SessionInfoUpdate, + UsageUpdate, + ], + Field(description="The actual update content.", discriminator="session_update"), + ] # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -5108,34 +5653,118 @@ class ResumeSessionResponse(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Initial session configuration options if supported by the Agent. - config_options: Annotated[ - Optional[List[Union[SessionConfigOptionSelect, SessionConfigOptionBoolean]]], - Field( - alias="configOptions", - description="Initial session configuration options if supported by the Agent.", - ), - ] = None - # Initial mode state if supported by the Agent - # - # See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) - modes: Annotated[ - Optional[SessionModeState], - Field( - description="Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" - ), - ] = None -class ToolCallProgress(ToolCallUpdate): - session_update: Annotated[Literal["tool_call_update"], Field(alias="sessionUpdate")] +class ClientRequest(BaseModel): + # The request id used to correlate the matching response. + id: Annotated[ + Optional[Union[int, str]], + Field(description="The request id used to correlate the matching response."), + ] = None + # The method name to invoke. + method: Annotated[str, Field(description="The method name to invoke.")] + # Method-specific request parameters. + params: Annotated[ + Optional[ + Union[ + InitializeRequest, + AuthenticateRequest, + ListProvidersRequest, + SetProviderRequest, + DisableProviderRequest, + LogoutRequest, + NewSessionRequest, + LoadSessionRequest, + ListSessionsRequest, + DeleteSessionRequest, + ForkSessionRequest, + ResumeSessionRequest, + CloseSessionRequest, + SetSessionModeRequest, + PromptRequest, + StartNesRequest, + SuggestNesRequest, + CloseNesRequest, + MessageMcpRequest, + Union[SetSessionConfigOptionBooleanRequest, SetSessionConfigOptionSelectRequest], + Any, + ] + ], + Field(description="Method-specific request parameters."), + ] = None -class ConfigOptionUpdate(_ConfigOptionUpdate): - session_update: Annotated[Literal["config_option_update"], Field(alias="sessionUpdate")] +class AgentRequest(BaseModel): + # The request id used to correlate the matching response. + id: Annotated[ + Optional[Union[int, str]], + Field(description="The request id used to correlate the matching response."), + ] = None + # The method name to invoke. + method: Annotated[str, Field(description="The method name to invoke.")] + # Method-specific request parameters. + params: Annotated[ + Optional[ + Union[ + WriteTextFileRequest, + ReadTextFileRequest, + RequestPermissionRequest, + CreateTerminalRequest, + TerminalOutputRequest, + ReleaseTerminalRequest, + WaitForTerminalExitRequest, + KillTerminalRequest, + ConnectMcpRequest, + MessageMcpRequest, + DisconnectMcpRequest, + Union[CreateFormElicitationRequest, CreateUrlElicitationRequest], + Any, + ] + ], + Field(description="Method-specific request parameters."), + ] = None -class ToolCall(BaseModel): +class InitializeResponse(BaseModel): + # The protocol version the client specified if supported by the agent, + # or the latest protocol version supported by the agent. + # + # The client should disconnect, if it doesn't support this version. + protocol_version: Annotated[ + int, + Field( + alias="protocolVersion", + description="The protocol version the client specified if supported by the agent,\nor the latest protocol version supported by the agent.\n\nThe client should disconnect, if it doesn't support this version.", + ge=0, + le=65535, + ), + ] + # Capabilities supported by the agent. + agent_capabilities: Annotated[ + Optional[AgentCapabilities], + Field( + alias="agentCapabilities", + description="Capabilities supported by the agent.", + ), + ] = AgentCapabilities() + # Authentication methods supported by the agent. + auth_methods: Annotated[ + Optional[List[Union[EnvVarAuthMethod, TerminalAuthMethod, AuthMethodAgent]]], + Field( + alias="authMethods", + description="Authentication methods supported by the agent.", + ), + ] = [] + # Information about the Agent name and version sent to the Client. + # + # Note: in future versions of the protocol, this will be required. + agent_info: Annotated[ + Optional[Implementation], + Field( + alias="agentInfo", + description="Information about the Agent name and version sent to the Client.\n\nNote: in future versions of the protocol, this will be required.", + ), + ] = None # The _meta property is reserved by ACP to allow clients and agents to attach additional # metadata to their interactions. Implementations MUST NOT make assumptions about values at # these keys. @@ -5148,110 +5777,32 @@ class ToolCall(BaseModel): description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", ), ] = None - # Content produced by the tool call. - content: Annotated[ - Optional[List[Union[ContentToolCallContent, FileEditToolCallContent, TerminalToolCallContent]]], - Field(description="Content produced by the tool call."), - ] = None - # The category of tool being invoked. - # Helps clients choose appropriate icons and UI treatment. - kind: Annotated[ - Optional[ToolKind], - Field( - description="The category of tool being invoked.\nHelps clients choose appropriate icons and UI treatment." - ), - ] = None - # File locations affected by this tool call. - # Enables "follow-along" features in clients. - locations: Annotated[ - Optional[List[ToolCallLocation]], - Field(description='File locations affected by this tool call.\nEnables "follow-along" features in clients.'), - ] = None - # Raw input parameters sent to the tool. - raw_input: Annotated[ - Optional[Any], - Field(alias="rawInput", description="Raw input parameters sent to the tool."), - ] = None - # Raw output returned by the tool. - raw_output: Annotated[ - Optional[Any], - Field(alias="rawOutput", description="Raw output returned by the tool."), - ] = None - # Current execution status of the tool call. - status: Annotated[Optional[ToolCallStatus], Field(description="Current execution status of the tool call.")] = None - # Human-readable title describing what the tool is doing. - title: Annotated[ - str, - Field(description="Human-readable title describing what the tool is doing."), - ] - # Unique identifier for this tool call within the session. - tool_call_id: Annotated[ - str, - Field( - alias="toolCallId", - description="Unique identifier for this tool call within the session.", - ), - ] -class AgentRequest(BaseModel): - # JSON RPC Request Id - # - # An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \[1\] and Numbers SHOULD NOT contain fractional parts \[2\] - # - # The Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects. - # - # \[1\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling. - # - # \[2\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions. - id: Annotated[ - Optional[Union[int, str]], - Field( - description="JSON RPC Request Id\n\nAn identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \\[1\\] and Numbers SHOULD NOT contain fractional parts \\[2\\]\n\nThe Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects.\n\n\\[1\\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling.\n\n\\[2\\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions." - ), - ] = None - method: str - params: Optional[ - Union[ - WriteTextFileRequest, - ReadTextFileRequest, - RequestPermissionRequest, - CreateTerminalRequest, - TerminalOutputRequest, - ReleaseTerminalRequest, - WaitForTerminalExitRequest, - KillTerminalRequest, - ConnectMcpRequest, - MessageMcpRequest, - DisconnectMcpRequest, - Union[CreateFormElicitationRequest, CreateUrlElicitationRequest], - Any, - ] +class AgentNotification(BaseModel): + # The notification method name. + method: Annotated[str, Field(description="The notification method name.")] + # Method-specific notification parameters. + params: Annotated[ + Optional[ + Union[ + SessionNotification, + CompleteElicitationNotification, + MessageMcpNotification, + Any, + ] + ], + Field(description="Method-specific notification parameters."), ] = None class AgentResponseMessage(BaseModel): - # JSON RPC Request Id - # - # An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \[1\] and Numbers SHOULD NOT contain fractional parts \[2\] - # - # The Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects. - # - # \[1\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling. - # - # \[2\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions. + # The id of the request this response answers. id: Annotated[ Optional[Union[int, str]], - Field( - description="JSON RPC Request Id\n\nAn identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \\[1\\] and Numbers SHOULD NOT contain fractional parts \\[2\\]\n\nThe Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects.\n\n\\[1\\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling.\n\n\\[2\\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions." - ), + Field(description="The id of the request this response answers."), ] = None - # All possible responses that an agent can send to a client. - # - # This enum is used internally for routing RPC responses. You typically won't need - # to use this directly - the responses are handled automatically by the connection. - # - # These are responses to the corresponding `ClientRequest` variants. + # Method-specific response data. result: Annotated[ Union[ InitializeResponse, @@ -5275,69 +5826,13 @@ class AgentResponseMessage(BaseModel): CloseNesResponse, Any, ], - Field( - description="All possible responses that an agent can send to a client.\n\nThis enum is used internally for routing RPC responses. You typically won't need\nto use this directly - the responses are handled automatically by the connection.\n\nThese are responses to the corresponding `ClientRequest` variants." - ), + Field(description="Method-specific response data."), ] class AgentResponse(RootModel[Union[AgentResponseMessage, AgentErrorMessage]]): - root: Union[AgentResponseMessage, AgentErrorMessage] - - -class ToolCallStart(ToolCall): - session_update: Annotated[Literal["tool_call"], Field(alias="sessionUpdate")] - - -class SessionNotification(BaseModel): - # The _meta property is reserved by ACP to allow clients and agents to attach additional - # metadata to their interactions. Implementations MUST NOT make assumptions about values at - # these keys. - # - # See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) - field_meta: Annotated[ - Optional[Dict[str, Any]], - Field( - alias="_meta", - description="The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - ), - ] = None - # The ID of the session this update pertains to. - session_id: Annotated[ - str, - Field( - alias="sessionId", - description="The ID of the session this update pertains to.", - ), - ] - # The actual update content. - update: Annotated[ - Union[ - UserMessageChunk, - AgentMessageChunk, - AgentThoughtChunk, - ToolCallStart, - ToolCallProgress, - AgentPlanUpdate, - AgentPlanContentUpdate, - AgentPlanRemovedUpdate, - AvailableCommandsUpdate, - CurrentModeUpdate, - ConfigOptionUpdate, - SessionInfoUpdate, - UsageUpdate, - ], - Field(description="The actual update content.", discriminator="session_update"), + # A JSON-RPC response object. + root: Annotated[ + Union[AgentResponseMessage, AgentErrorMessage], + Field(description="A JSON-RPC response object."), ] - - -class AgentNotification(BaseModel): - method: str - params: Optional[ - Union[ - SessionNotification, - CompleteElicitationNotification, - MessageMcpNotification, - Any, - ] - ] = None diff --git a/tests/test_gen_all.py b/tests/test_gen_all.py new file mode 100644 index 0000000..51aa38d --- /dev/null +++ b/tests/test_gen_all.py @@ -0,0 +1,24 @@ +from scripts.gen_all import resolve_ref, schema_source_paths + + +def test_resolve_ref_accepts_schema_release_tags() -> None: + assert resolve_ref("schema-v1.16.0") == "refs/tags/schema-v1.16.0" + + +def test_resolve_ref_keeps_legacy_version_tags() -> None: + assert resolve_ref("0.13.6") == "refs/tags/v0.13.6" + assert resolve_ref("v0.13.6") == "refs/tags/v0.13.6" + + +def test_schema_release_tags_prefer_v1_schema_layout() -> None: + assert schema_source_paths("refs/tags/schema-v1.16.0")[0] == ( + "schema/v1/schema.unstable.json", + "schema/v1/meta.unstable.json", + ) + + +def test_legacy_tags_keep_legacy_schema_layout_first() -> None: + assert schema_source_paths("refs/tags/v0.13.6")[0] == ( + "schema/schema.unstable.json", + "schema/meta.unstable.json", + )