diff --git a/docs/protocol/draft/schema.mdx b/docs/protocol/draft/schema.mdx index 6725d12f..a90cfec6 100644 --- a/docs/protocol/draft/schema.mdx +++ b/docs/protocol/draft/schema.mdx @@ -1629,7 +1629,7 @@ The input specification for a command. **Type:** Union - + All text that was typed after the command name is provided as input. @@ -2180,7 +2180,7 @@ because of resource constraints or shutdown. **Resource not found**: A given resource, such as a file, was not found. - + Other undefined error code. @@ -2422,7 +2422,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte - + Stdio transport configuration All Agents MUST support this transport. @@ -2815,11 +2815,11 @@ The Server MUST reply with the same value in the Response object if included. Th {""} - + {""} - + {""} @@ -3062,7 +3062,7 @@ Category names that do not begin with `_` are reserved for the ACP spec. Thought/reasoning level selector. - + Unknown / uncategorized selector. @@ -3163,11 +3163,11 @@ Possible values for a session configuration option. **Type:** Union - + A flat list of options with no grouping. - + A list of options grouped under headers. diff --git a/docs/protocol/schema.mdx b/docs/protocol/schema.mdx index aca67af8..4ce95265 100644 --- a/docs/protocol/schema.mdx +++ b/docs/protocol/schema.mdx @@ -1159,7 +1159,7 @@ The input specification for a command. **Type:** Union - + All text that was typed after the command name is provided as input. @@ -1676,7 +1676,7 @@ and use the reserved range (-32000 to -32099) for protocol-specific errors. **Resource not found**: A given resource, such as a file, was not found. - + Other undefined error code. @@ -1918,7 +1918,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte - + Stdio transport configuration All Agents MUST support this transport. @@ -2271,11 +2271,11 @@ The Server MUST reply with the same value in the Response object if included. Th {""} - + {""} - + {""} diff --git a/schema/schema.json b/schema/schema.json index 0f89c457..eba17945 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -64,7 +64,8 @@ "$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)" + "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": [ @@ -72,7 +73,8 @@ "$ref": "#/$defs/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)" + "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 - use the notification methods on the [`Client`] trait instead.\n\nNotifications do not expect a response." @@ -105,7 +107,8 @@ "$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)" + "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" }, { "allOf": [ @@ -113,7 +116,8 @@ "$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)" + "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" }, { "allOf": [ @@ -121,7 +125,8 @@ "$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)" + "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" }, { "allOf": [ @@ -129,7 +134,8 @@ "$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)" + "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" }, { "allOf": [ @@ -137,7 +143,8 @@ "$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)" + "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" }, { "allOf": [ @@ -145,7 +152,8 @@ "$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)" + "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" }, { "allOf": [ @@ -153,7 +161,8 @@ "$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)" + "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" }, { "allOf": [ @@ -161,7 +170,8 @@ "$ref": "#/$defs/KillTerminalCommandRequest" } ], - "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: `terminal/release` when `TerminalId` is no longer needed.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)" + "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: `terminal/release` when `TerminalId` is no longer needed.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", + "title": "KillTerminalCommandRequest" }, { "allOf": [ @@ -169,7 +179,8 @@ "$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)" + "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 - instead, use the methods on the [`Client`] trait.\n\nThis enum encompasses all method calls from agent to client." @@ -194,31 +205,67 @@ "result": { "anyOf": [ { - "$ref": "#/$defs/InitializeResponse" + "allOf": [ + { + "$ref": "#/$defs/InitializeResponse" + } + ], + "title": "InitializeResponse" }, { - "$ref": "#/$defs/AuthenticateResponse" + "allOf": [ + { + "$ref": "#/$defs/AuthenticateResponse" + } + ], + "title": "AuthenticateResponse" }, { - "$ref": "#/$defs/NewSessionResponse" + "allOf": [ + { + "$ref": "#/$defs/NewSessionResponse" + } + ], + "title": "NewSessionResponse" }, { - "$ref": "#/$defs/LoadSessionResponse" + "allOf": [ + { + "$ref": "#/$defs/LoadSessionResponse" + } + ], + "title": "LoadSessionResponse" }, { - "$ref": "#/$defs/SetSessionModeResponse" + "allOf": [ + { + "$ref": "#/$defs/SetSessionModeResponse" + } + ], + "title": "SetSessionModeResponse" }, { - "$ref": "#/$defs/PromptResponse" + "allOf": [ + { + "$ref": "#/$defs/PromptResponse" + } + ], + "title": "PromptResponse" }, { - "$ref": "#/$defs/ExtResponse" + "allOf": [ + { + "$ref": "#/$defs/ExtResponse" + } + ], + "title": "ExtMethodResponse" } ], "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" }, { @@ -231,6 +278,7 @@ } }, "required": ["id", "error"], + "title": "Error", "type": "object" } ], @@ -382,7 +430,8 @@ "$ref": "#/$defs/UnstructuredCommandInput" } ], - "description": "All text that was typed after the command name is provided as input." + "description": "All text that was typed after the command name is provided as input.", + "title": "unstructured" } ], "description": "The input specification for a command." @@ -492,7 +541,8 @@ "$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)" + "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": [ @@ -500,7 +550,8 @@ "$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)" + "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 - use the notification methods on the [`Agent`] trait instead.\n\nNotifications do not expect a response." @@ -533,7 +584,8 @@ "$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)" + "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": [ @@ -541,7 +593,8 @@ "$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)" + "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": [ @@ -549,7 +602,8 @@ "$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)" + "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": [ @@ -557,7 +611,8 @@ "$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)" + "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": [ @@ -565,7 +620,8 @@ "$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)" + "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": [ @@ -573,7 +629,8 @@ "$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)" + "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": [ @@ -581,7 +638,8 @@ "$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)" + "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 - instead, use the methods on the [`Agent`] trait.\n\nThis enum encompasses all method calls from client to agent." @@ -606,37 +664,83 @@ "result": { "anyOf": [ { - "$ref": "#/$defs/WriteTextFileResponse" + "allOf": [ + { + "$ref": "#/$defs/WriteTextFileResponse" + } + ], + "title": "WriteTextFileResponse" }, { - "$ref": "#/$defs/ReadTextFileResponse" + "allOf": [ + { + "$ref": "#/$defs/ReadTextFileResponse" + } + ], + "title": "ReadTextFileResponse" }, { - "$ref": "#/$defs/RequestPermissionResponse" + "allOf": [ + { + "$ref": "#/$defs/RequestPermissionResponse" + } + ], + "title": "RequestPermissionResponse" }, { - "$ref": "#/$defs/CreateTerminalResponse" + "allOf": [ + { + "$ref": "#/$defs/CreateTerminalResponse" + } + ], + "title": "CreateTerminalResponse" }, { - "$ref": "#/$defs/TerminalOutputResponse" + "allOf": [ + { + "$ref": "#/$defs/TerminalOutputResponse" + } + ], + "title": "TerminalOutputResponse" }, { - "$ref": "#/$defs/ReleaseTerminalResponse" + "allOf": [ + { + "$ref": "#/$defs/ReleaseTerminalResponse" + } + ], + "title": "ReleaseTerminalResponse" }, { - "$ref": "#/$defs/WaitForTerminalExitResponse" + "allOf": [ + { + "$ref": "#/$defs/WaitForTerminalExitResponse" + } + ], + "title": "WaitForTerminalExitResponse" }, { - "$ref": "#/$defs/KillTerminalCommandResponse" + "allOf": [ + { + "$ref": "#/$defs/KillTerminalCommandResponse" + } + ], + "title": "KillTerminalResponse" }, { - "$ref": "#/$defs/ExtResponse" + "allOf": [ + { + "$ref": "#/$defs/ExtResponse" + } + ], + "title": "ExtMethodResponse" } ], "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." } }, "required": ["id", "result"], + "title": "Result", "type": "object" }, { @@ -649,6 +753,7 @@ } }, "required": ["id", "error"], + "title": "Error", "type": "object" } ], @@ -922,10 +1027,20 @@ "EmbeddedResourceResource": { "anyOf": [ { - "$ref": "#/$defs/TextResourceContents" + "allOf": [ + { + "$ref": "#/$defs/TextResourceContents" + } + ], + "title": "TextResourceContents" }, { - "$ref": "#/$defs/BlobResourceContents" + "allOf": [ + { + "$ref": "#/$defs/BlobResourceContents" + } + ], + "title": "BlobResourceContents" } ], "description": "Resource content that can be embedded in a message." @@ -1026,6 +1141,7 @@ { "description": "Other undefined error code.", "format": "int32", + "title": "Other", "type": "integer" } ], @@ -1403,7 +1519,8 @@ "$ref": "#/$defs/McpServerStdio" } ], - "description": "Stdio transport configuration\n\nAll Agents MUST support this transport." + "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)" @@ -1887,13 +2004,16 @@ "RequestId": { "anyOf": [ { + "title": "Null", "type": "null" }, { "format": "int64", + "title": "Number", "type": "integer" }, { + "title": "Str", "type": "string" } ], @@ -2907,13 +3027,28 @@ { "anyOf": [ { - "$ref": "#/$defs/AgentRequest" + "allOf": [ + { + "$ref": "#/$defs/AgentRequest" + } + ], + "title": "Request" }, { - "$ref": "#/$defs/AgentResponse" + "allOf": [ + { + "$ref": "#/$defs/AgentResponse" + } + ], + "title": "Response" }, { - "$ref": "#/$defs/AgentNotification" + "allOf": [ + { + "$ref": "#/$defs/AgentNotification" + } + ], + "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", @@ -2924,18 +3059,34 @@ } }, "required": ["jsonrpc"], + "title": "Agent", "type": "object" }, { "anyOf": [ { - "$ref": "#/$defs/ClientRequest" + "allOf": [ + { + "$ref": "#/$defs/ClientRequest" + } + ], + "title": "Request" }, { - "$ref": "#/$defs/ClientResponse" + "allOf": [ + { + "$ref": "#/$defs/ClientResponse" + } + ], + "title": "Response" }, { - "$ref": "#/$defs/ClientNotification" + "allOf": [ + { + "$ref": "#/$defs/ClientNotification" + } + ], + "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", @@ -2946,6 +3097,7 @@ } }, "required": ["jsonrpc"], + "title": "Client", "type": "object" } ], diff --git a/schema/schema.unstable.json b/schema/schema.unstable.json index 0cb478ce..c7e8534c 100644 --- a/schema/schema.unstable.json +++ b/schema/schema.unstable.json @@ -64,7 +64,8 @@ "$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)" + "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": [ @@ -72,7 +73,8 @@ "$ref": "#/$defs/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)" + "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 - use the notification methods on the [`Client`] trait instead.\n\nNotifications do not expect a response." @@ -105,7 +107,8 @@ "$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)" + "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" }, { "allOf": [ @@ -113,7 +116,8 @@ "$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)" + "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" }, { "allOf": [ @@ -121,7 +125,8 @@ "$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)" + "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" }, { "allOf": [ @@ -129,7 +134,8 @@ "$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)" + "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" }, { "allOf": [ @@ -137,7 +143,8 @@ "$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)" + "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" }, { "allOf": [ @@ -145,7 +152,8 @@ "$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)" + "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" }, { "allOf": [ @@ -153,7 +161,8 @@ "$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)" + "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" }, { "allOf": [ @@ -161,7 +170,8 @@ "$ref": "#/$defs/KillTerminalCommandRequest" } ], - "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: `terminal/release` when `TerminalId` is no longer needed.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)" + "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: `terminal/release` when `TerminalId` is no longer needed.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", + "title": "KillTerminalCommandRequest" }, { "allOf": [ @@ -169,7 +179,8 @@ "$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)" + "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 - instead, use the methods on the [`Client`] trait.\n\nThis enum encompasses all method calls from agent to client." @@ -194,46 +205,107 @@ "result": { "anyOf": [ { - "$ref": "#/$defs/InitializeResponse" + "allOf": [ + { + "$ref": "#/$defs/InitializeResponse" + } + ], + "title": "InitializeResponse" }, { - "$ref": "#/$defs/AuthenticateResponse" + "allOf": [ + { + "$ref": "#/$defs/AuthenticateResponse" + } + ], + "title": "AuthenticateResponse" }, { - "$ref": "#/$defs/NewSessionResponse" + "allOf": [ + { + "$ref": "#/$defs/NewSessionResponse" + } + ], + "title": "NewSessionResponse" }, { - "$ref": "#/$defs/LoadSessionResponse" + "allOf": [ + { + "$ref": "#/$defs/LoadSessionResponse" + } + ], + "title": "LoadSessionResponse" }, { - "$ref": "#/$defs/ListSessionsResponse" + "allOf": [ + { + "$ref": "#/$defs/ListSessionsResponse" + } + ], + "title": "ListSessionsResponse" }, { - "$ref": "#/$defs/ForkSessionResponse" + "allOf": [ + { + "$ref": "#/$defs/ForkSessionResponse" + } + ], + "title": "ForkSessionResponse" }, { - "$ref": "#/$defs/ResumeSessionResponse" + "allOf": [ + { + "$ref": "#/$defs/ResumeSessionResponse" + } + ], + "title": "ResumeSessionResponse" }, { - "$ref": "#/$defs/SetSessionModeResponse" + "allOf": [ + { + "$ref": "#/$defs/SetSessionModeResponse" + } + ], + "title": "SetSessionModeResponse" }, { - "$ref": "#/$defs/SetSessionConfigOptionResponse" + "allOf": [ + { + "$ref": "#/$defs/SetSessionConfigOptionResponse" + } + ], + "title": "SetSessionConfigOptionResponse" }, { - "$ref": "#/$defs/PromptResponse" + "allOf": [ + { + "$ref": "#/$defs/PromptResponse" + } + ], + "title": "PromptResponse" }, { - "$ref": "#/$defs/SetSessionModelResponse" + "allOf": [ + { + "$ref": "#/$defs/SetSessionModelResponse" + } + ], + "title": "SetSessionModelResponse" }, { - "$ref": "#/$defs/ExtResponse" + "allOf": [ + { + "$ref": "#/$defs/ExtResponse" + } + ], + "title": "ExtMethodResponse" } ], "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" }, { @@ -246,6 +318,7 @@ } }, "required": ["id", "error"], + "title": "Error", "type": "object" } ], @@ -397,7 +470,8 @@ "$ref": "#/$defs/UnstructuredCommandInput" } ], - "description": "All text that was typed after the command name is provided as input." + "description": "All text that was typed after the command name is provided as input.", + "title": "unstructured" } ], "description": "The input specification for a command." @@ -529,7 +603,8 @@ "$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)" + "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": [ @@ -537,7 +612,8 @@ "$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)" + "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 - use the notification methods on the [`Agent`] trait instead.\n\nNotifications do not expect a response." @@ -570,7 +646,8 @@ "$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)" + "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": [ @@ -578,7 +655,8 @@ "$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)" + "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": [ @@ -586,7 +664,8 @@ "$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)" + "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": [ @@ -594,7 +673,8 @@ "$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)" + "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": [ @@ -602,7 +682,8 @@ "$ref": "#/$defs/ListSessionsRequest" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nLists existing sessions known to the agent.\n\nThis method is only available if the agent advertises the `listSessions` capability.\n\nThe agent should return metadata about sessions with optional filtering and pagination support." + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nLists existing sessions known to the agent.\n\nThis method is only available if the agent advertises the `listSessions` capability.\n\nThe agent should return metadata about sessions with optional filtering and pagination support.", + "title": "ListSessionsRequest" }, { "allOf": [ @@ -610,7 +691,8 @@ "$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." + "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": [ @@ -618,7 +700,8 @@ "$ref": "#/$defs/ResumeSessionRequest" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResumes an existing session without returning previous messages.\n\nThis method is only available if the agent advertises the `session.resume` capability.\n\nThe agent should resume the session context, allowing the conversation to continue\nwithout replaying the message history (unlike `session/load`)." + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResumes an existing session without returning previous messages.\n\nThis method is only available if the agent advertises the `session.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": [ @@ -626,7 +709,8 @@ "$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)" + "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": [ @@ -634,7 +718,8 @@ "$ref": "#/$defs/SetSessionConfigOptionRequest" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSets the current value for a session configuration option." + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSets the current value for a session configuration option.", + "title": "SetSessionConfigOptionRequest" }, { "allOf": [ @@ -642,7 +727,8 @@ "$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)" + "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": [ @@ -650,7 +736,8 @@ "$ref": "#/$defs/SetSessionModelRequest" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSelect a model for a given session." + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSelect a model for a given session.", + "title": "SetSessionModelRequest" }, { "allOf": [ @@ -658,7 +745,8 @@ "$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)" + "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 - instead, use the methods on the [`Agent`] trait.\n\nThis enum encompasses all method calls from client to agent." @@ -683,37 +771,83 @@ "result": { "anyOf": [ { - "$ref": "#/$defs/WriteTextFileResponse" + "allOf": [ + { + "$ref": "#/$defs/WriteTextFileResponse" + } + ], + "title": "WriteTextFileResponse" }, { - "$ref": "#/$defs/ReadTextFileResponse" + "allOf": [ + { + "$ref": "#/$defs/ReadTextFileResponse" + } + ], + "title": "ReadTextFileResponse" }, { - "$ref": "#/$defs/RequestPermissionResponse" + "allOf": [ + { + "$ref": "#/$defs/RequestPermissionResponse" + } + ], + "title": "RequestPermissionResponse" }, { - "$ref": "#/$defs/CreateTerminalResponse" + "allOf": [ + { + "$ref": "#/$defs/CreateTerminalResponse" + } + ], + "title": "CreateTerminalResponse" }, { - "$ref": "#/$defs/TerminalOutputResponse" + "allOf": [ + { + "$ref": "#/$defs/TerminalOutputResponse" + } + ], + "title": "TerminalOutputResponse" }, { - "$ref": "#/$defs/ReleaseTerminalResponse" + "allOf": [ + { + "$ref": "#/$defs/ReleaseTerminalResponse" + } + ], + "title": "ReleaseTerminalResponse" }, { - "$ref": "#/$defs/WaitForTerminalExitResponse" + "allOf": [ + { + "$ref": "#/$defs/WaitForTerminalExitResponse" + } + ], + "title": "WaitForTerminalExitResponse" }, { - "$ref": "#/$defs/KillTerminalCommandResponse" + "allOf": [ + { + "$ref": "#/$defs/KillTerminalCommandResponse" + } + ], + "title": "KillTerminalResponse" }, { - "$ref": "#/$defs/ExtResponse" + "allOf": [ + { + "$ref": "#/$defs/ExtResponse" + } + ], + "title": "ExtMethodResponse" } ], "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." } }, "required": ["id", "result"], + "title": "Result", "type": "object" }, { @@ -726,6 +860,7 @@ } }, "required": ["id", "error"], + "title": "Error", "type": "object" } ], @@ -1018,10 +1153,20 @@ "EmbeddedResourceResource": { "anyOf": [ { - "$ref": "#/$defs/TextResourceContents" + "allOf": [ + { + "$ref": "#/$defs/TextResourceContents" + } + ], + "title": "TextResourceContents" }, { - "$ref": "#/$defs/BlobResourceContents" + "allOf": [ + { + "$ref": "#/$defs/BlobResourceContents" + } + ], + "title": "BlobResourceContents" } ], "description": "Resource content that can be embedded in a message." @@ -1129,6 +1274,7 @@ { "description": "Other undefined error code.", "format": "int32", + "title": "Other", "type": "integer" } ], @@ -1654,7 +1800,8 @@ "$ref": "#/$defs/McpServerStdio" } ], - "description": "Stdio transport configuration\n\nAll Agents MUST support this transport." + "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)" @@ -2188,13 +2335,16 @@ "RequestId": { "anyOf": [ { + "title": "Null", "type": "null" }, { "format": "int64", + "title": "Number", "type": "integer" }, { + "title": "Str", "type": "string" } ], @@ -2566,6 +2716,7 @@ }, { "description": "Unknown / uncategorized selector.", + "title": "other", "type": "string" } ], @@ -2660,6 +2811,7 @@ "items": { "$ref": "#/$defs/SessionConfigSelectOption" }, + "title": "Ungrouped", "type": "array" }, { @@ -2667,6 +2819,7 @@ "items": { "$ref": "#/$defs/SessionConfigSelectGroup" }, + "title": "Grouped", "type": "array" } ], @@ -3758,13 +3911,28 @@ { "anyOf": [ { - "$ref": "#/$defs/AgentRequest" + "allOf": [ + { + "$ref": "#/$defs/AgentRequest" + } + ], + "title": "Request" }, { - "$ref": "#/$defs/AgentResponse" + "allOf": [ + { + "$ref": "#/$defs/AgentResponse" + } + ], + "title": "Response" }, { - "$ref": "#/$defs/AgentNotification" + "allOf": [ + { + "$ref": "#/$defs/AgentNotification" + } + ], + "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", @@ -3775,18 +3943,34 @@ } }, "required": ["jsonrpc"], + "title": "Agent", "type": "object" }, { "anyOf": [ { - "$ref": "#/$defs/ClientRequest" + "allOf": [ + { + "$ref": "#/$defs/ClientRequest" + } + ], + "title": "Request" }, { - "$ref": "#/$defs/ClientResponse" + "allOf": [ + { + "$ref": "#/$defs/ClientResponse" + } + ], + "title": "Response" }, { - "$ref": "#/$defs/ClientNotification" + "allOf": [ + { + "$ref": "#/$defs/ClientNotification" + } + ], + "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", @@ -3797,6 +3981,7 @@ } }, "required": ["jsonrpc"], + "title": "Client", "type": "object" }, { @@ -3807,10 +3992,12 @@ "$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 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)" + "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 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": "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.", + "title": "ProtocolLevel" } ], "title": "Agent Client Protocol" diff --git a/src/bin/generate.rs b/src/bin/generate.rs index 732bf274..a3cf4bcc 100644 --- a/src/bin/generate.rs +++ b/src/bin/generate.rs @@ -36,6 +36,7 @@ enum AcpTypes { fn main() { let mut settings = SchemaSettings::draft2020_12(); + settings.untagged_enum_variant_titles = true; let mut bool_schemas = ReplaceBoolSchemas::default(); bool_schemas.skip_additional_properties = true; settings = settings