{
  "$defs": {
    "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"]
        },
        "loadSession": {
          "default": false,
          "description": "Whether the agent supports `session/load`.",
          "type": "boolean"
        },
        "mcpCapabilities": {
          "allOf": [
            {
              "$ref": "#/$defs/McpCapabilities"
            }
          ],
          "default": {
            "http": false,
            "sse": false
          },
          "description": "MCP capabilities supported by the agent."
        },
        "promptCapabilities": {
          "allOf": [
            {
              "$ref": "#/$defs/PromptCapabilities"
            }
          ],
          "default": {
            "audio": false,
            "embeddedContext": false,
            "image": false
          },
          "description": "Prompt capabilities supported by the agent."
        },
        "sessionCapabilities": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionCapabilities"
            }
          ],
          "default": {}
        }
      },
      "type": "object"
    },
    "AgentNotification": {
      "properties": {
        "method": {
          "type": "string"
        },
        "params": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "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/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)",
                  "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."
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["method"],
      "type": "object",
      "x-docs-ignore": true
    },
    "AgentRequest": {
      "properties": {
        "id": {
          "$ref": "#/$defs/RequestId"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "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"
                },
                {
                  "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"
                },
                {
                  "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"
                },
                {
                  "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"
                },
                {
                  "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"
                },
                {
                  "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"
                },
                {
                  "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"
                },
                {
                  "allOf": [
                    {
                      "$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)",
                  "title": "KillTerminalCommandRequest"
                },
                {
                  "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 - instead, use the methods on the [`Client`] trait.\n\nThis enum encompasses all method calls from agent to client."
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["id", "method"],
      "type": "object",
      "x-docs-ignore": true
    },
    "AgentResponse": {
      "anyOf": [
        {
          "properties": {
            "id": {
              "$ref": "#/$defs/RequestId"
            },
            "result": {
              "anyOf": [
                {
                  "allOf": [
                    {
                      "$ref": "#/$defs/InitializeResponse"
                    }
                  ],
                  "title": "InitializeResponse"
                },
                {
                  "allOf": [
                    {
                      "$ref": "#/$defs/AuthenticateResponse"
                    }
                  ],
                  "title": "AuthenticateResponse"
                },
                {
                  "allOf": [
                    {
                      "$ref": "#/$defs/NewSessionResponse"
                    }
                  ],
                  "title": "NewSessionResponse"
                },
                {
                  "allOf": [
                    {
                      "$ref": "#/$defs/LoadSessionResponse"
                    }
                  ],
                  "title": "LoadSessionResponse"
                },
                {
                  "allOf": [
                    {
                      "$ref": "#/$defs/ListSessionsResponse"
                    }
                  ],
                  "title": "ListSessionsResponse"
                },
                {
                  "allOf": [
                    {
                      "$ref": "#/$defs/ForkSessionResponse"
                    }
                  ],
                  "title": "ForkSessionResponse"
                },
                {
                  "allOf": [
                    {
                      "$ref": "#/$defs/ResumeSessionResponse"
                    }
                  ],
                  "title": "ResumeSessionResponse"
                },
                {
                  "allOf": [
                    {
                      "$ref": "#/$defs/SetSessionModeResponse"
                    }
                  ],
                  "title": "SetSessionModeResponse"
                },
                {
                  "allOf": [
                    {
                      "$ref": "#/$defs/SetSessionConfigOptionResponse"
                    }
                  ],
                  "title": "SetSessionConfigOptionResponse"
                },
                {
                  "allOf": [
                    {
                      "$ref": "#/$defs/PromptResponse"
                    }
                  ],
                  "title": "PromptResponse"
                },
                {
                  "allOf": [
                    {
                      "$ref": "#/$defs/SetSessionModelResponse"
                    }
                  ],
                  "title": "SetSessionModelResponse"
                },
                {
                  "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"
        },
        {
          "properties": {
            "error": {
              "$ref": "#/$defs/Error"
            },
            "id": {
              "$ref": "#/$defs/RequestId"
            }
          },
          "required": ["id", "error"],
          "title": "Error",
          "type": "object"
        }
      ],
      "x-docs-ignore": true
    },
    "Annotations": {
      "description": "Optional annotations for the client. The client can use annotations to inform how objects are used or displayed",
      "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"]
        },
        "audience": {
          "items": {
            "$ref": "#/$defs/Role"
          },
          "type": ["array", "null"]
        },
        "lastModified": {
          "type": ["string", "null"]
        },
        "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"
            }
          ]
        },
        "data": {
          "type": "string"
        },
        "mimeType": {
          "type": "string"
        }
      },
      "required": ["data", "mimeType"],
      "type": "object"
    },
    "AuthMethod": {
      "description": "Describes an available authentication 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"]
        },
        "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"
    },
    "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"
        }
      },
      "required": ["methodId"],
      "type": "object",
      "x-method": "authenticate",
      "x-side": "agent"
    },
    "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"
    },
    "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"]
        },
        "description": {
          "description": "Human-readable description of what the command does.",
          "type": "string"
        },
        "input": {
          "anyOf": [
            {
              "$ref": "#/$defs/AvailableCommandInput"
            },
            {
              "type": "null"
            }
          ],
          "description": "Input for the command if required"
        },
        "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"]
        },
        "availableCommands": {
          "description": "Commands the agent can execute",
          "items": {
            "$ref": "#/$defs/AvailableCommand"
          },
          "type": "array"
        }
      },
      "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"]
        },
        "blob": {
          "type": "string"
        },
        "mimeType": {
          "type": ["string", "null"]
        },
        "uri": {
          "type": "string"
        }
      },
      "required": ["blob", "uri"],
      "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"]
        },
        "sessionId": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ],
          "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": {
          "allOf": [
            {
              "$ref": "#/$defs/RequestId"
            }
          ],
          "description": "The ID of the request to cancel."
        }
      },
      "required": ["requestId"],
      "type": "object",
      "x-method": "$/cancel_request",
      "x-side": "protocol"
    },
    "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"]
        },
        "fs": {
          "allOf": [
            {
              "$ref": "#/$defs/FileSystemCapability"
            }
          ],
          "default": {
            "readTextFile": false,
            "writeTextFile": false
          },
          "description": "File system capabilities supported by the client.\nDetermines which file operations the agent can request."
        },
        "terminal": {
          "default": false,
          "description": "Whether the Client support all `terminal/*` methods.",
          "type": "boolean"
        }
      },
      "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/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 - use the notification methods on the [`Agent`] trait instead.\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/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": "**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": [
                    {
                      "$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": "**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": [
                    {
                      "$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/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.",
                  "title": "SetSessionModelRequest"
                },
                {
                  "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 - instead, use the methods on the [`Agent`] trait.\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/KillTerminalCommandResponse"
                    }
                  ],
                  "title": "KillTerminalResponse"
                },
                {
                  "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"
        },
        {
          "properties": {
            "error": {
              "$ref": "#/$defs/Error"
            },
            "id": {
              "$ref": "#/$defs/RequestId"
            }
          },
          "required": ["id", "error"],
          "title": "Error",
          "type": "object"
        }
      ],
      "x-docs-ignore": true
    },
    "ConfigOptionUpdate": {
      "description": "Session configuration options have been updated.",
      "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": "The full set of configuration options and their current values.",
          "items": {
            "$ref": "#/$defs/SessionConfigOption"
          },
          "type": "array"
        }
      },
      "required": ["configOptions"],
      "type": "object"
    },
    "Content": {
      "description": "Standard content block (text, images, resources).",
      "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": {
          "allOf": [
            {
              "$ref": "#/$defs/ContentBlock"
            }
          ],
          "description": "The actual content block."
        }
      },
      "required": ["content"],
      "type": "object"
    },
    "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—whether\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"
        },
        {
          "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"
            }
          },
          "required": ["type"],
          "type": "object"
        },
        {
          "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"
            }
          },
          "required": ["type"],
          "type": "object"
        }
      ]
    },
    "ContentChunk": {
      "description": "A streamed item of 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"]
        },
        "content": {
          "allOf": [
            {
              "$ref": "#/$defs/ContentBlock"
            }
          ],
          "description": "A single item of content"
        }
      },
      "required": ["content"],
      "type": "object"
    },
    "Cost": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCost information for a session.",
      "properties": {
        "amount": {
          "description": "Total cumulative cost for session.",
          "format": "double",
          "type": "number"
        },
        "currency": {
          "description": "ISO 4217 currency code (e.g., \"USD\", \"EUR\").",
          "type": "string"
        }
      },
      "required": ["amount", "currency"],
      "type": "object"
    },
    "CreateTerminalRequest": {
      "description": "Request to create a new terminal and execute 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"]
        },
        "args": {
          "description": "Array of command arguments.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "command": {
          "description": "The command to execute.",
          "type": "string"
        },
        "cwd": {
          "description": "Working directory for the command (absolute path).",
          "type": ["string", "null"]
        },
        "env": {
          "description": "Environment variables for the command.",
          "items": {
            "$ref": "#/$defs/EnvVariable"
          },
          "type": "array"
        },
        "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,
          "type": ["integer", "null"]
        },
        "sessionId": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ],
          "description": "The session ID for this request."
        }
      },
      "required": ["sessionId", "command"],
      "type": "object",
      "x-method": "terminal/create",
      "x-side": "client"
    },
    "CreateTerminalResponse": {
      "description": "Response containing the ID of the created terminal.",
      "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 unique identifier for the created terminal.",
          "type": "string"
        }
      },
      "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)",
      "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"]
        },
        "currentModeId": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionModeId"
            }
          ],
          "description": "The ID of the current mode"
        }
      },
      "required": ["currentModeId"],
      "type": "object"
    },
    "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"
    },
    "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"
            }
          ]
        },
        "resource": {
          "$ref": "#/$defs/EmbeddedResourceResource"
        }
      },
      "required": ["resource"],
      "type": "object"
    },
    "EmbeddedResourceResource": {
      "anyOf": [
        {
          "allOf": [
            {
              "$ref": "#/$defs/TextResourceContents"
            }
          ],
          "title": "TextResourceContents"
        },
        {
          "allOf": [
            {
              "$ref": "#/$defs/BlobResourceContents"
            }
          ],
          "title": "BlobResourceContents"
        }
      ],
      "description": "Resource content that can be embedded in a message."
    },
    "EnvVariable": {
      "description": "An environment variable to set when launching an 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 environment variable.",
          "type": "string"
        },
        "value": {
          "description": "The value to set for the environment variable.",
          "type": "string"
        }
      },
      "required": ["name", "value"],
      "type": "object"
    },
    "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)",
      "properties": {
        "code": {
          "allOf": [
            {
              "$ref": "#/$defs/ErrorCode"
            }
          ],
          "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"
        }
      },
      "required": ["code", "message"],
      "type": "object"
    },
    "ErrorCode": {
      "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"
        },
        {
          "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)"
    },
    "FileSystemCapability": {
      "description": "Filesystem capabilities supported by the client.\nFile 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"]
        },
        "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"
    },
    "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.",
      "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"]
        },
        "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 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.",
          "items": {
            "$ref": "#/$defs/SessionConfigOption"
          },
          "type": ["array", "null"]
        },
        "models": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionModelState"
            },
            {
              "type": "null"
            }
          ],
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent"
        },
        "modes": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionModeState"
            },
            {
              "type": "null"
            }
          ],
          "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)"
        },
        "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"
        }
      },
      "required": ["name", "value"],
      "type": "object"
    },
    "ImageContent": {
      "description": "An image 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"
            }
          ]
        },
        "data": {
          "type": "string"
        },
        "mimeType": {
          "type": "string"
        },
        "uri": {
          "type": ["string", "null"]
        }
      },
      "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.",
      "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": "Intended for programmatic or logical use, but can be used as a display\nname fallback if title isn’t present.",
          "type": "string"
        },
        "title": {
          "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.",
          "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"
        }
      },
      "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)",
      "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"]
        },
        "clientCapabilities": {
          "allOf": [
            {
              "$ref": "#/$defs/ClientCapabilities"
            }
          ],
          "default": {
            "fs": {
              "readTextFile": false,
              "writeTextFile": false
            },
            "terminal": false
          },
          "description": "Capabilities supported by the client."
        },
        "clientInfo": {
          "anyOf": [
            {
              "$ref": "#/$defs/Implementation"
            },
            {
              "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."
        },
        "protocolVersion": {
          "allOf": [
            {
              "$ref": "#/$defs/ProtocolVersion"
            }
          ],
          "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"]
        },
        "agentCapabilities": {
          "allOf": [
            {
              "$ref": "#/$defs/AgentCapabilities"
            }
          ],
          "default": {
            "loadSession": false,
            "mcpCapabilities": {
              "http": false,
              "sse": false
            },
            "promptCapabilities": {
              "audio": false,
              "embeddedContext": false,
              "image": false
            },
            "sessionCapabilities": {}
          },
          "description": "Capabilities supported by the agent."
        },
        "agentInfo": {
          "anyOf": [
            {
              "$ref": "#/$defs/Implementation"
            },
            {
              "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."
        },
        "authMethods": {
          "default": [],
          "description": "Authentication methods supported by the agent.",
          "items": {
            "$ref": "#/$defs/AuthMethod"
          },
          "type": "array"
        },
        "protocolVersion": {
          "allOf": [
            {
              "$ref": "#/$defs/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."
        }
      },
      "required": ["protocolVersion"],
      "type": "object",
      "x-method": "initialize",
      "x-side": "agent"
    },
    "KillTerminalCommandRequest": {
      "description": "Request to kill a terminal command without releasing the terminal.",
      "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 request."
        },
        "terminalId": {
          "description": "The ID of the terminal to kill.",
          "type": "string"
        }
      },
      "required": ["sessionId", "terminalId"],
      "type": "object",
      "x-method": "terminal/kill",
      "x-side": "client"
    },
    "KillTerminalCommandResponse": {
      "description": "Response to terminal/kill command 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": "terminal/kill",
      "x-side": "client"
    },
    "ListSessionsRequest": {
      "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 listing existing sessions.\n\nOnly available if the Agent supports the `listSessions` 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"]
        },
        "cursor": {
          "description": "Opaque cursor token from a previous response's nextCursor field for cursor-based pagination",
          "type": ["string", "null"]
        },
        "cwd": {
          "description": "Filter sessions by working directory. Must be an absolute path.",
          "type": ["string", "null"]
        }
      },
      "type": "object",
      "x-method": "session/list",
      "x-side": "agent"
    },
    "ListSessionsResponse": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse from listing 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"]
        },
        "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"]
        },
        "sessions": {
          "description": "Array of session information objects",
          "items": {
            "$ref": "#/$defs/SessionInfo"
          },
          "type": "array"
        }
      },
      "required": ["sessions"],
      "type": "object",
      "x-method": "session/list",
      "x-side": "agent"
    },
    "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)",
      "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"]
        },
        "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."
        }
      },
      "required": ["mcpServers", "cwd", "sessionId"],
      "type": "object",
      "x-method": "session/load",
      "x-side": "agent"
    },
    "LoadSessionResponse": {
      "description": "Response from loading 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.",
          "items": {
            "$ref": "#/$defs/SessionConfigOption"
          },
          "type": ["array", "null"]
        },
        "models": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionModelState"
            },
            {
              "type": "null"
            }
          ],
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent"
        },
        "modes": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionModeState"
            },
            {
              "type": "null"
            }
          ],
          "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)"
        }
      },
      "type": "object",
      "x-method": "session/load",
      "x-side": "agent"
    },
    "McpCapabilities": {
      "description": "MCP 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"]
        },
        "http": {
          "default": false,
          "description": "Agent supports [`McpServer::Http`].",
          "type": "boolean"
        },
        "sse": {
          "default": false,
          "description": "Agent supports [`McpServer::Sse`].",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "McpServer": {
      "anyOf": [
        {
          "allOf": [
            {
              "$ref": "#/$defs/McpServerHttp"
            }
          ],
          "description": "HTTP transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.http` is `true`.",
          "properties": {
            "type": {
              "const": "http",
              "type": "string"
            }
          },
          "required": ["type"],
          "type": "object"
        },
        {
          "allOf": [
            {
              "$ref": "#/$defs/McpServerSse"
            }
          ],
          "description": "SSE transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.sse` is `true`.",
          "properties": {
            "type": {
              "const": "sse",
              "type": "string"
            }
          },
          "required": ["type"],
          "type": "object"
        },
        {
          "allOf": [
            {
              "$ref": "#/$defs/McpServerStdio"
            }
          ],
          "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)"
    },
    "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)",
          "type": ["object", "null"]
        },
        "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.",
          "type": "string"
        },
        "url": {
          "description": "URL to the MCP server.",
          "type": "string"
        }
      },
      "required": ["name", "url", "headers"],
      "type": "object"
    },
    "McpServerSse": {
      "description": "SSE 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)",
          "type": ["object", "null"]
        },
        "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.",
          "type": "string"
        },
        "url": {
          "description": "URL to the MCP server.",
          "type": "string"
        }
      },
      "required": ["name", "url", "headers"],
      "type": "object"
    },
    "McpServerStdio": {
      "description": "Stdio 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)",
          "type": ["object", "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.",
          "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"
        }
      },
      "required": ["name", "command", "args", "env"],
      "type": "object"
    },
    "ModelId": {
      "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 a model.",
      "type": "string"
    },
    "ModelInfo": {
      "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 selectable model.",
      "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 of the model.",
          "type": ["string", "null"]
        },
        "modelId": {
          "allOf": [
            {
              "$ref": "#/$defs/ModelId"
            }
          ],
          "description": "Unique identifier for the model."
        },
        "name": {
          "description": "Human-readable name of the model.",
          "type": "string"
        }
      },
      "required": ["modelId", "name"],
      "type": "object"
    },
    "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)",
      "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"]
        },
        "cwd": {
          "description": "The working directory for this session. Must be an absolute path.",
          "type": "string"
        },
        "mcpServers": {
          "description": "List of MCP (Model Context Protocol) servers the agent should connect to.",
          "items": {
            "$ref": "#/$defs/McpServer"
          },
          "type": "array"
        }
      },
      "required": ["cwd", "mcpServers"],
      "type": "object",
      "x-method": "session/new",
      "x-side": "agent"
    },
    "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"]
        },
        "configOptions": {
          "description": "Initial session configuration options if supported by the Agent.",
          "items": {
            "$ref": "#/$defs/SessionConfigOption"
          },
          "type": ["array", "null"]
        },
        "models": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionModelState"
            },
            {
              "type": "null"
            }
          ],
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent"
        },
        "modes": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionModeState"
            },
            {
              "type": "null"
            }
          ],
          "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)"
        },
        "sessionId": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ],
          "description": "Unique identifier for the created session.\n\nUsed in all subsequent requests for this conversation."
        }
      },
      "required": ["sessionId"],
      "type": "object",
      "x-method": "session/new",
      "x-side": "agent"
    },
    "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"]
        },
        "kind": {
          "allOf": [
            {
              "$ref": "#/$defs/PermissionOptionKind"
            }
          ],
          "description": "Hint about the nature of this permission option."
        },
        "name": {
          "description": "Human-readable label to display to the user.",
          "type": "string"
        },
        "optionId": {
          "allOf": [
            {
              "$ref": "#/$defs/PermissionOptionId"
            }
          ],
          "description": "Unique identifier for this permission option."
        }
      },
      "required": ["optionId", "name", "kind"],
      "type": "object"
    },
    "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": [
        {
          "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)",
      "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 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"
        }
      },
      "required": ["entries"],
      "type": "object"
    },
    "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)",
      "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": "Human-readable description of what this task aims to accomplish.",
          "type": "string"
        },
        "priority": {
          "allOf": [
            {
              "$ref": "#/$defs/PlanEntryPriority"
            }
          ],
          "description": "The relative importance of this task.\nUsed to indicate which tasks are most critical to the overall goal."
        },
        "status": {
          "allOf": [
            {
              "$ref": "#/$defs/PlanEntryStatus"
            }
          ],
          "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"
        },
        {
          "const": "in_progress",
          "description": "The task is currently being worked on.",
          "type": "string"
        },
        {
          "const": "completed",
          "description": "The task has been successfully completed.",
          "type": "string"
        }
      ]
    },
    "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)",
      "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"]
        },
        "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"
        }
      },
      "type": "object"
    },
    "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)",
      "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"]
        },
        "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": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ],
          "description": "The ID of the session to send this user message to"
        }
      },
      "required": ["sessionId", "prompt"],
      "type": "object",
      "x-method": "session/prompt",
      "x-side": "agent"
    },
    "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)",
      "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"]
        },
        "stopReason": {
          "allOf": [
            {
              "$ref": "#/$defs/StopReason"
            }
          ],
          "description": "Indicates why the agent stopped processing the turn."
        },
        "usage": {
          "anyOf": [
            {
              "$ref": "#/$defs/Usage"
            },
            {
              "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)."
        }
      },
      "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"
    },
    "ReadTextFileRequest": {
      "description": "Request to read content from a text file.\n\nOnly available if the client supports the `fs.readTextFile` 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"]
        },
        "limit": {
          "description": "Maximum number of lines to read.",
          "format": "uint32",
          "minimum": 0,
          "type": ["integer", "null"]
        },
        "line": {
          "description": "Line number to start reading from (1-based).",
          "format": "uint32",
          "minimum": 0,
          "type": ["integer", "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"
        }
      },
      "required": ["content"],
      "type": "object",
      "x-method": "fs/read_text_file",
      "x-side": "client"
    },
    "ReleaseTerminalRequest": {
      "description": "Request to release a terminal and free its resources.",
      "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 request."
        },
        "terminalId": {
          "description": "The ID of the terminal to release.",
          "type": "string"
        }
      },
      "required": ["sessionId", "terminalId"],
      "type": "object",
      "x-method": "terminal/release",
      "x-side": "client"
    },
    "ReleaseTerminalResponse": {
      "description": "Response to terminal/release 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": "terminal/release",
      "x-side": "client"
    },
    "RequestId": {
      "anyOf": [
        {
          "title": "Null",
          "type": "null"
        },
        {
          "format": "int64",
          "title": "Number",
          "type": "integer"
        },
        {
          "title": "Str",
          "type": "string"
        }
      ],
      "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."
    },
    "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"
        },
        {
          "allOf": [
            {
              "$ref": "#/$defs/SelectedPermissionOutcome"
            }
          ],
          "description": "The user selected one of the provided options.",
          "properties": {
            "outcome": {
              "const": "selected",
              "type": "string"
            }
          },
          "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"
          },
          "type": "array"
        },
        "sessionId": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ],
          "description": "The session ID for this request."
        },
        "toolCall": {
          "allOf": [
            {
              "$ref": "#/$defs/ToolCallUpdate"
            }
          ],
          "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": {
        "_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."
        }
      },
      "required": ["outcome"],
      "type": "object",
      "x-method": "session/request_permission",
      "x-side": "client"
    },
    "ResourceLink": {
      "description": "A resource that the server is capable of reading, included in 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"
            }
          ]
        },
        "description": {
          "type": ["string", "null"]
        },
        "mimeType": {
          "type": ["string", "null"]
        },
        "name": {
          "type": "string"
        },
        "size": {
          "format": "int64",
          "type": ["integer", "null"]
        },
        "title": {
          "type": ["string", "null"]
        },
        "uri": {
          "type": "string"
        }
      },
      "required": ["name", "uri"],
      "type": "object"
    },
    "ResumeSessionRequest": {
      "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 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 `session.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"]
        },
        "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 resume."
        }
      },
      "required": ["sessionId", "cwd"],
      "type": "object",
      "x-method": "session/resume",
      "x-side": "agent"
    },
    "ResumeSessionResponse": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse from resuming 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.",
          "items": {
            "$ref": "#/$defs/SessionConfigOption"
          },
          "type": ["array", "null"]
        },
        "models": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionModelState"
            },
            {
              "type": "null"
            }
          ],
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent"
        },
        "modes": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionModeState"
            },
            {
              "type": "null"
            }
          ],
          "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)"
        }
      },
      "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.",
      "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."
        }
      },
      "required": ["optionId"],
      "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)",
      "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"]
        },
        "fork": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionForkCapabilities"
            },
            {
              "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`."
        },
        "list": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionListCapabilities"
            },
            {
              "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/list`."
        },
        "resume": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionResumeCapabilities"
            },
            {
              "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/resume`."
        }
      },
      "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"
        }
      ],
      "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)."
        },
        "description": {
          "description": "Optional description for the Client to display to the user.",
          "type": ["string", "null"]
        },
        "id": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionConfigId"
            }
          ],
          "description": "Unique identifier for the configuration option."
        },
        "name": {
          "description": "Human-readable label for the option.",
          "type": "string"
        }
      },
      "required": ["id", "name"],
      "type": "object"
    },
    "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"
        }
      ],
      "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."
    },
    "SessionConfigSelect": {
      "description": "A single-value selector (dropdown) session configuration option payload.",
      "properties": {
        "currentValue": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionConfigValueId"
            }
          ],
          "description": "The currently selected value."
        },
        "options": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionConfigSelectOptions"
            }
          ],
          "description": "The set of selectable options."
        }
      },
      "required": ["currentValue", "options"],
      "type": "object"
    },
    "SessionConfigSelectGroup": {
      "description": "A group of possible values for a session configuration option.",
      "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"]
        },
        "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"
        }
      },
      "required": ["group", "name", "options"],
      "type": "object"
    },
    "SessionConfigSelectOption": {
      "description": "A possible value for a session configuration option.",
      "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 for this option value.",
          "type": ["string", "null"]
        },
        "name": {
          "description": "Human-readable label for this option value.",
          "type": "string"
        },
        "value": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionConfigValueId"
            }
          ],
          "description": "Unique identifier for this option value."
        }
      },
      "required": ["value", "name"],
      "type": "object"
    },
    "SessionConfigSelectOptions": {
      "anyOf": [
        {
          "description": "A flat list of options with no grouping.",
          "items": {
            "$ref": "#/$defs/SessionConfigSelectOption"
          },
          "title": "Ungrouped",
          "type": "array"
        },
        {
          "description": "A list of options grouped under headers.",
          "items": {
            "$ref": "#/$defs/SessionConfigSelectGroup"
          },
          "title": "Grouped",
          "type": "array"
        }
      ],
      "description": "Possible values for a session configuration option."
    },
    "SessionConfigValueId": {
      "description": "Unique identifier for a session configuration option value.",
      "type": "string"
    },
    "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.",
      "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"
    },
    "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"
    },
    "SessionInfo": {
      "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 session returned by session/list",
      "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"]
        },
        "cwd": {
          "description": "The working directory for this session. Must be an absolute path.",
          "type": "string"
        },
        "sessionId": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ],
          "description": "Unique identifier for the session"
        },
        "title": {
          "description": "Human-readable title for the session",
          "type": ["string", "null"]
        },
        "updatedAt": {
          "description": "ISO 8601 timestamp of last activity",
          "type": ["string", "null"]
        }
      },
      "required": ["sessionId", "cwd"],
      "type": "object"
    },
    "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.",
      "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": {
          "description": "Human-readable title for the session. Set to null to clear.",
          "type": ["string", "null"]
        },
        "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.\n\nFurther capabilities can be added in the future for other means of filtering or searching the list.",
      "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"
    },
    "SessionMode": {
      "description": "A mode the agent can operate in.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)",
      "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": {
          "type": ["string", "null"]
        },
        "id": {
          "$ref": "#/$defs/SessionModeId"
        },
        "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"
        },
        "currentModeId": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionModeId"
            }
          ],
          "description": "The current mode the Agent is in."
        }
      },
      "required": ["currentModeId", "availableModes"],
      "type": "object"
    },
    "SessionModelState": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe set of models 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"]
        },
        "availableModels": {
          "description": "The set of models that the Agent can use",
          "items": {
            "$ref": "#/$defs/ModelInfo"
          },
          "type": "array"
        },
        "currentModelId": {
          "allOf": [
            {
              "$ref": "#/$defs/ModelId"
            }
          ],
          "description": "The current model the Agent is in."
        }
      },
      "required": ["currentModelId", "availableModels"],
      "type": "object"
    },
    "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)",
      "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 ID of the session this update pertains to."
        },
        "update": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionUpdate"
            }
          ],
          "description": "The actual update content."
        }
      },
      "required": ["sessionId", "update"],
      "type": "object",
      "x-method": "session/update",
      "x-side": "client"
    },
    "SessionResumeCapabilities": {
      "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/resume` method.\n\nBy supplying `{}` it means that the agent supports resuming 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"]
        }
      },
      "type": "object"
    },
    "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"
        },
        {
          "allOf": [
            {
              "$ref": "#/$defs/AvailableCommandsUpdate"
            }
          ],
          "description": "Available commands are ready or have changed",
          "properties": {
            "sessionUpdate": {
              "const": "available_commands_update",
              "type": "string"
            }
          },
          "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"
        },
        {
          "allOf": [
            {
              "$ref": "#/$defs/ConfigOptionUpdate"
            }
          ],
          "description": "Session configuration options have been updated.",
          "properties": {
            "sessionUpdate": {
              "const": "config_option_update",
              "type": "string"
            }
          },
          "required": ["sessionUpdate"],
          "type": "object"
        },
        {
          "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"
        },
        {
          "allOf": [
            {
              "$ref": "#/$defs/UsageUpdate"
            }
          ],
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nContext window and cost update for the session.",
          "properties": {
            "sessionUpdate": {
              "const": "usage_update",
              "type": "string"
            }
          },
          "required": ["sessionUpdate"],
          "type": "object"
        }
      ]
    },
    "SetSessionConfigOptionRequest": {
      "description": "Request parameters for setting a session configuration option.",
      "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": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ],
          "description": "The ID of the session to set the configuration option for."
        },
        "value": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionConfigValueId"
            }
          ],
          "description": "The ID of the configuration option value to set."
        }
      },
      "required": ["sessionId", "configId", "value"],
      "type": "object",
      "x-method": "session/set_config_option",
      "x-side": "agent"
    },
    "SetSessionConfigOptionResponse": {
      "description": "Response to `session/set_config_option` 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"]
        },
        "configOptions": {
          "description": "The full set of configuration options and their current values.",
          "items": {
            "$ref": "#/$defs/SessionConfigOption"
          },
          "type": "array"
        }
      },
      "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": [
            {
              "$ref": "#/$defs/SessionModeId"
            }
          ],
          "description": "The ID of the mode to set."
        },
        "sessionId": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ],
          "description": "The ID of the session to set the mode for."
        }
      },
      "required": ["sessionId", "modeId"],
      "type": "object",
      "x-method": "session/set_mode",
      "x-side": "agent"
    },
    "SetSessionModeResponse": {
      "description": "Response to `session/set_mode` method.",
      "properties": {
        "_meta": {
          "additionalProperties": true,
          "type": ["object", "null"]
        }
      },
      "type": "object",
      "x-method": "session/set_mode",
      "x-side": "agent"
    },
    "SetSessionModelRequest": {
      "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 setting a session model.",
      "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"]
        },
        "modelId": {
          "allOf": [
            {
              "$ref": "#/$defs/ModelId"
            }
          ],
          "description": "The ID of the model to set."
        },
        "sessionId": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ],
          "description": "The ID of the session to set the model for."
        }
      },
      "required": ["sessionId", "modelId"],
      "type": "object",
      "x-method": "session/set_model",
      "x-side": "agent"
    },
    "SetSessionModelResponse": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `session/set_model` 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": "session/set_model",
      "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"
        }
      ]
    },
    "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)",
      "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": {
          "type": "string"
        }
      },
      "required": ["terminalId"],
      "type": "object"
    },
    "TerminalExitStatus": {
      "description": "Exit status of a terminal 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"]
        },
        "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"]
        }
      },
      "type": "object"
    },
    "TerminalOutputRequest": {
      "description": "Request to get the current output and status of a terminal.",
      "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 request."
        },
        "terminalId": {
          "description": "The ID of the terminal to get output from.",
          "type": "string"
        }
      },
      "required": ["sessionId", "terminalId"],
      "type": "object",
      "x-method": "terminal/output",
      "x-side": "client"
    },
    "TerminalOutputResponse": {
      "description": "Response containing the terminal output and exit status.",
      "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"]
        },
        "exitStatus": {
          "anyOf": [
            {
              "$ref": "#/$defs/TerminalExitStatus"
            },
            {
              "type": "null"
            }
          ],
          "description": "Exit status if the command has completed."
        },
        "output": {
          "description": "The terminal output captured so far.",
          "type": "string"
        },
        "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"
            }
          ]
        },
        "text": {
          "type": "string"
        }
      },
      "required": ["text"],
      "type": "object"
    },
    "TextResourceContents": {
      "description": "Text-based 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"]
        },
        "mimeType": {
          "type": ["string", "null"]
        },
        "text": {
          "type": "string"
        },
        "uri": {
          "type": "string"
        }
      },
      "required": ["text", "uri"],
      "type": "object"
    },
    "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)",
      "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": "Content produced by the tool call.",
          "items": {
            "$ref": "#/$defs/ToolCallContent"
          },
          "type": "array"
        },
        "kind": {
          "allOf": [
            {
              "$ref": "#/$defs/ToolKind"
            }
          ],
          "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"
        },
        "rawInput": {
          "description": "Raw input parameters sent to the tool."
        },
        "rawOutput": {
          "description": "Raw output returned by the tool."
        },
        "status": {
          "allOf": [
            {
              "$ref": "#/$defs/ToolCallStatus"
            }
          ],
          "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"
            }
          ],
          "description": "Unique identifier for this tool call within the session."
        }
      },
      "required": ["toolCallId", "title"],
      "type": "object"
    },
    "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"
      },
      "oneOf": [
        {
          "allOf": [
            {
              "$ref": "#/$defs/Content"
            }
          ],
          "description": "Standard content block (text, images, resources).",
          "properties": {
            "type": {
              "const": "content",
              "type": "string"
            }
          },
          "required": ["type"],
          "type": "object"
        },
        {
          "allOf": [
            {
              "$ref": "#/$defs/Diff"
            }
          ],
          "description": "File modification shown as a diff.",
          "properties": {
            "type": {
              "const": "diff",
              "type": "string"
            }
          },
          "required": ["type"],
          "type": "object"
        },
        {
          "allOf": [
            {
              "$ref": "#/$defs/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)",
          "properties": {
            "type": {
              "const": "terminal",
              "type": "string"
            }
          },
          "required": ["type"],
          "type": "object"
        }
      ]
    },
    "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)",
      "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"]
        },
        "line": {
          "description": "Optional line number within the file.",
          "format": "uint32",
          "minimum": 0,
          "type": ["integer", "null"]
        },
        "path": {
          "description": "The file path being accessed or modified.",
          "type": "string"
        }
      },
      "required": ["path"],
      "type": "object"
    },
    "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"
        },
        {
          "const": "completed",
          "description": "The tool call completed successfully.",
          "type": "string"
        },
        {
          "const": "failed",
          "description": "The tool call failed with an error.",
          "type": "string"
        }
      ]
    },
    "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)",
      "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"]
        },
        "kind": {
          "anyOf": [
            {
              "$ref": "#/$defs/ToolKind"
            },
            {
              "type": "null"
            }
          ],
          "description": "Update the tool kind."
        },
        "locations": {
          "description": "Replace the locations collection.",
          "items": {
            "$ref": "#/$defs/ToolCallLocation"
          },
          "type": ["array", "null"]
        },
        "rawInput": {
          "description": "Update the raw input."
        },
        "rawOutput": {
          "description": "Update the raw output."
        },
        "status": {
          "anyOf": [
            {
              "$ref": "#/$defs/ToolCallStatus"
            },
            {
              "type": "null"
            }
          ],
          "description": "Update the execution status."
        },
        "title": {
          "description": "Update the human-readable title.",
          "type": ["string", "null"]
        },
        "toolCallId": {
          "allOf": [
            {
              "$ref": "#/$defs/ToolCallId"
            }
          ],
          "description": "The ID of the tool call being updated."
        }
      },
      "required": ["toolCallId"],
      "type": "object"
    },
    "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": [
        {
          "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"
        },
        {
          "const": "move",
          "description": "Moving or renaming files.",
          "type": "string"
        },
        {
          "const": "search",
          "description": "Searching for information.",
          "type": "string"
        },
        {
          "const": "execute",
          "description": "Running commands or code.",
          "type": "string"
        },
        {
          "const": "think",
          "description": "Internal reasoning or planning.",
          "type": "string"
        },
        {
          "const": "fetch",
          "description": "Retrieving external data.",
          "type": "string"
        },
        {
          "const": "switch_mode",
          "description": "Switching the current session mode.",
          "type": "string"
        },
        {
          "const": "other",
          "description": "Other tool types (default).",
          "type": "string"
        }
      ]
    },
    "UnstructuredCommandInput": {
      "description": "All text that was typed after the command name is provided as input.",
      "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"]
        },
        "hint": {
          "description": "A hint to display when the input hasn't been provided yet",
          "type": "string"
        }
      },
      "required": ["hint"],
      "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"
        },
        "thoughtTokens": {
          "description": "Total thought/reasoning tokens",
          "format": "uint64",
          "minimum": 0,
          "type": ["integer", "null"]
        },
        "totalTokens": {
          "description": "Sum of all token types across session.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": ["totalTokens", "inputTokens", "outputTokens"],
      "type": "object"
    },
    "UsageUpdate": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nContext window and cost update for 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"]
        },
        "cost": {
          "anyOf": [
            {
              "$ref": "#/$defs/Cost"
            },
            {
              "type": "null"
            }
          ],
          "description": "Cumulative session cost (optional)."
        },
        "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"],
      "type": "object"
    },
    "WaitForTerminalExitRequest": {
      "description": "Request to wait for a terminal command to exit.",
      "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 request."
        },
        "terminalId": {
          "description": "The ID of the terminal to wait for.",
          "type": "string"
        }
      },
      "required": ["sessionId", "terminalId"],
      "type": "object",
      "x-method": "terminal/wait_for_exit",
      "x-side": "client"
    },
    "WaitForTerminalExitResponse": {
      "description": "Response containing the exit status of a terminal 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"]
        },
        "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"]
        }
      },
      "type": "object",
      "x-method": "terminal/wait_for_exit",
      "x-side": "client"
    },
    "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"
        },
        "sessionId": {
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ],
          "description": "The session ID for this request."
        }
      },
      "required": ["sessionId", "path", "content"],
      "type": "object",
      "x-method": "fs/write_text_file",
      "x-side": "client"
    },
    "WriteTextFileResponse": {
      "description": "Response to `fs/write_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"]
        }
      },
      "type": "object",
      "x-method": "fs/write_text_file",
      "x-side": "client"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "anyOf": [
        {
          "allOf": [
            {
              "$ref": "#/$defs/AgentRequest"
            }
          ],
          "title": "Request"
        },
        {
          "allOf": [
            {
              "$ref": "#/$defs/AgentResponse"
            }
          ],
          "title": "Response"
        },
        {
          "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",
      "properties": {
        "jsonrpc": {
          "enum": ["2.0"],
          "type": "string"
        }
      },
      "required": ["jsonrpc"],
      "title": "Agent",
      "type": "object"
    },
    {
      "anyOf": [
        {
          "allOf": [
            {
              "$ref": "#/$defs/ClientRequest"
            }
          ],
          "title": "Request"
        },
        {
          "allOf": [
            {
              "$ref": "#/$defs/ClientResponse"
            }
          ],
          "title": "Response"
        },
        {
          "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",
      "properties": {
        "jsonrpc": {
          "enum": ["2.0"],
          "type": "string"
        }
      },
      "required": ["jsonrpc"],
      "title": "Client",
      "type": "object"
    },
    {
      "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 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.",
      "title": "ProtocolLevel"
    }
  ],
  "title": "Agent Client Protocol"
}
