{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Agent Client Protocol",
  "anyOf": [
    {
      "title": "Agent",
      "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility",
      "type": "object",
      "properties": {
        "jsonrpc": {
          "type": "string",
          "enum": ["2.0"]
        }
      },
      "required": ["jsonrpc"],
      "anyOf": [
        {
          "title": "Request",
          "allOf": [
            {
              "$ref": "#/$defs/AgentRequest"
            }
          ]
        },
        {
          "title": "Response",
          "allOf": [
            {
              "$ref": "#/$defs/AgentResponse"
            }
          ]
        },
        {
          "title": "Notification",
          "allOf": [
            {
              "$ref": "#/$defs/AgentNotification"
            }
          ]
        }
      ]
    },
    {
      "title": "Client",
      "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility",
      "type": "object",
      "properties": {
        "jsonrpc": {
          "type": "string",
          "enum": ["2.0"]
        }
      },
      "required": ["jsonrpc"],
      "anyOf": [
        {
          "title": "Request",
          "allOf": [
            {
              "$ref": "#/$defs/ClientRequest"
            }
          ]
        },
        {
          "title": "Response",
          "allOf": [
            {
              "$ref": "#/$defs/ClientResponse"
            }
          ]
        },
        {
          "title": "Notification",
          "allOf": [
            {
              "$ref": "#/$defs/ClientNotification"
            }
          ]
        }
      ]
    },
    {
      "title": "AgentBatchCall",
      "description": "A non-empty JSON-RPC 2.0 batch message.",
      "type": "array",
      "items": {
        "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility",
        "type": "object",
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"]
          }
        },
        "required": ["jsonrpc"],
        "anyOf": [
          {
            "title": "Request",
            "allOf": [
              {
                "$ref": "#/$defs/AgentRequest"
              }
            ]
          },
          {
            "title": "Notification",
            "allOf": [
              {
                "$ref": "#/$defs/AgentNotification"
              }
            ]
          },
          {
            "title": "ProtocolLevelNotification",
            "allOf": [
              {
                "$ref": "#/$defs/ProtocolLevelNotification"
              }
            ]
          }
        ]
      },
      "minItems": 1
    },
    {
      "title": "AgentBatchResponse",
      "description": "A non-empty JSON-RPC 2.0 batch message.",
      "type": "array",
      "items": {
        "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility",
        "type": "object",
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"]
          }
        },
        "required": ["jsonrpc"],
        "anyOf": [
          {
            "title": "Result",
            "description": "A successful JSON-RPC response.",
            "type": "object",
            "properties": {
              "id": {
                "description": "The id of the request this response answers.",
                "allOf": [
                  {
                    "$ref": "#/$defs/RequestId"
                  }
                ]
              },
              "result": {
                "description": "Method-specific response data.",
                "anyOf": [
                  {
                    "title": "InitializeResponse",
                    "description": "Successful result returned for a `initialize` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/InitializeResponse"
                      }
                    ]
                  },
                  {
                    "title": "LoginAuthResponse",
                    "description": "Successful result returned for an `auth/login` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/LoginAuthResponse"
                      }
                    ]
                  },
                  {
                    "title": "ListProvidersResponse",
                    "description": "Successful result returned for a `providers/list` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/ListProvidersResponse"
                      }
                    ]
                  },
                  {
                    "title": "SetProviderResponse",
                    "description": "Successful result returned for a `providers/set` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/SetProviderResponse"
                      }
                    ]
                  },
                  {
                    "title": "DisableProviderResponse",
                    "description": "Successful result returned for a `providers/disable` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/DisableProviderResponse"
                      }
                    ]
                  },
                  {
                    "title": "LogoutAuthResponse",
                    "description": "Successful result returned for an `auth/logout` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/LogoutAuthResponse"
                      }
                    ]
                  },
                  {
                    "title": "NewSessionResponse",
                    "description": "Successful result returned for a `session/new` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/NewSessionResponse"
                      }
                    ]
                  },
                  {
                    "title": "ListSessionsResponse",
                    "description": "Successful result returned for a `session/list` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/ListSessionsResponse"
                      }
                    ]
                  },
                  {
                    "title": "DeleteSessionResponse",
                    "description": "Successful result returned for a `session/delete` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/DeleteSessionResponse"
                      }
                    ]
                  },
                  {
                    "title": "ForkSessionResponse",
                    "description": "Successful result returned for a `session/fork` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/ForkSessionResponse"
                      }
                    ]
                  },
                  {
                    "title": "ResumeSessionResponse",
                    "description": "Successful result returned for a `session/resume` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/ResumeSessionResponse"
                      }
                    ]
                  },
                  {
                    "title": "CloseSessionResponse",
                    "description": "Successful result returned for a `session/close` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/CloseSessionResponse"
                      }
                    ]
                  },
                  {
                    "title": "SetSessionConfigOptionResponse",
                    "description": "Successful result returned for a `session/set_config_option` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/SetSessionConfigOptionResponse"
                      }
                    ]
                  },
                  {
                    "title": "PromptResponse",
                    "description": "Successful result returned for a `session/prompt` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/PromptResponse"
                      }
                    ]
                  },
                  {
                    "title": "ExtMethodResponse",
                    "description": "Successful result returned by an extension method outside the core ACP method set.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/ExtResponse"
                      }
                    ]
                  }
                ]
              }
            },
            "required": ["id", "result"]
          },
          {
            "title": "Error",
            "description": "A failed JSON-RPC response.",
            "type": "object",
            "properties": {
              "id": {
                "description": "The id of the request this response answers.",
                "allOf": [
                  {
                    "$ref": "#/$defs/RequestId"
                  }
                ]
              },
              "error": {
                "description": "Method-specific error data.",
                "allOf": [
                  {
                    "$ref": "#/$defs/Error"
                  }
                ]
              }
            },
            "required": ["id", "error"]
          }
        ],
        "x-docs-ignore": true
      },
      "minItems": 1
    },
    {
      "title": "ClientBatchCall",
      "description": "A non-empty JSON-RPC 2.0 batch message.",
      "type": "array",
      "items": {
        "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility",
        "type": "object",
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"]
          }
        },
        "required": ["jsonrpc"],
        "anyOf": [
          {
            "title": "Request",
            "allOf": [
              {
                "$ref": "#/$defs/ClientRequest"
              }
            ]
          },
          {
            "title": "Notification",
            "allOf": [
              {
                "$ref": "#/$defs/ClientNotification"
              }
            ]
          },
          {
            "title": "ProtocolLevelNotification",
            "allOf": [
              {
                "$ref": "#/$defs/ProtocolLevelNotification"
              }
            ]
          }
        ]
      },
      "minItems": 1
    },
    {
      "title": "ClientBatchResponse",
      "description": "A non-empty JSON-RPC 2.0 batch message.",
      "type": "array",
      "items": {
        "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility",
        "type": "object",
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"]
          }
        },
        "required": ["jsonrpc"],
        "anyOf": [
          {
            "title": "Result",
            "description": "A successful JSON-RPC response.",
            "type": "object",
            "properties": {
              "id": {
                "description": "The id of the request this response answers.",
                "allOf": [
                  {
                    "$ref": "#/$defs/RequestId"
                  }
                ]
              },
              "result": {
                "description": "Method-specific response data.",
                "anyOf": [
                  {
                    "title": "RequestPermissionResponse",
                    "description": "Successful result returned for a `session/request_permission` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/RequestPermissionResponse"
                      }
                    ]
                  },
                  {
                    "title": "CreateElicitationResponse",
                    "description": "Successful result returned for a `elicitation/create` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/CreateElicitationResponse"
                      }
                    ]
                  },
                  {
                    "title": "MessageMcpResponse",
                    "description": "Successful result returned by an MCP-over-ACP `mcp/message` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/MessageMcpResponse"
                      }
                    ]
                  },
                  {
                    "title": "ExtMethodResponse",
                    "description": "Successful result returned by an extension method outside the core ACP method set.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/ExtResponse"
                      }
                    ]
                  }
                ]
              }
            },
            "required": ["id", "result"]
          },
          {
            "title": "Error",
            "description": "A failed JSON-RPC response.",
            "type": "object",
            "properties": {
              "id": {
                "description": "The id of the request this response answers.",
                "allOf": [
                  {
                    "$ref": "#/$defs/RequestId"
                  }
                ]
              },
              "error": {
                "description": "Method-specific error data.",
                "allOf": [
                  {
                    "$ref": "#/$defs/Error"
                  }
                ]
              }
            },
            "required": ["id", "error"]
          }
        ],
        "x-docs-ignore": true
      },
      "minItems": 1
    },
    {
      "title": "ProtocolLevel",
      "description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility",
      "type": "object",
      "properties": {
        "jsonrpc": {
          "type": "string",
          "enum": ["2.0"]
        },
        "method": {
          "description": "The notification method name.",
          "type": "string"
        },
        "params": {
          "description": "Method-specific notification parameters.",
          "anyOf": [
            {
              "description": "General protocol-level notifications that all sides are expected to\nimplement.\n\nNotifications whose methods start with '$/' are messages which\nare protocol implementation dependent and might not be implementable in all\nclients or agents. For example if the implementation uses a single threaded\nsynchronous programming language then there is little it can do to react to\na `$/cancel_request` notification. If an agent or client receives\nnotifications starting with '$/' it is free to ignore the notification.\n\nNotifications do not expect a response.",
              "anyOf": [
                {
                  "title": "CancelRequestNotification",
                  "description": "Cancels an ongoing request.\n\nThis is a notification sent by the side that sent a request to cancel that request.\n\nUpon receiving this notification, the receiver:\n\n1. MAY 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/v2/draft/cancellation)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/CancelRequestNotification"
                    }
                  ]
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["jsonrpc", "method"],
      "x-docs-ignore": true
    }
  ],
  "$defs": {
    "AgentRequest": {
      "description": "A JSON-RPC request object.",
      "type": "object",
      "properties": {
        "id": {
          "description": "The request id used to correlate the matching response.",
          "allOf": [
            {
              "$ref": "#/$defs/RequestId"
            }
          ]
        },
        "method": {
          "description": "The method name to invoke.",
          "type": "string"
        },
        "params": {
          "description": "Method-specific request parameters.",
          "anyOf": [
            {
              "description": "All possible requests that an agent can send to a client.\n\nThis enum is used internally for routing RPC requests. You typically won't need\nto use this directly.\n\nThis enum encompasses all method calls from agent to client.",
              "anyOf": [
                {
                  "title": "RequestPermissionRequest",
                  "description": "Requests permission from the user for an 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 active session work via `session/cancel`, it MUST\nrespond to this request with `RequestPermissionOutcome::Cancelled`.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/v2/draft/tool-calls#requesting-permission)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/RequestPermissionRequest"
                    }
                  ]
                },
                {
                  "title": "CreateElicitationRequest",
                  "description": "Requests structured user input via a form or URL.\n\nSee protocol docs: [Elicitation](https://agentclientprotocol.com/protocol/v2/draft/elicitation)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/CreateElicitationRequest"
                    }
                  ]
                },
                {
                  "title": "MessageMcpRequest",
                  "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nExchanges an MCP-over-ACP message.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/MessageMcpRequest"
                    }
                  ]
                },
                {
                  "title": "ExtMethodRequest",
                  "description": "Handles extension method requests from the 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/v2/draft/extensibility)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ExtRequest"
                    }
                  ]
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["id", "method"],
      "x-docs-ignore": true
    },
    "RequestId": {
      "description": "JSON RPC Request Id\n\nAn identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null \\[1\\] and Numbers SHOULD NOT contain fractional parts \\[2\\]\n\nThe Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects.\n\n\\[1\\] The use of Null as a value for the id member in a Request object is discouraged, because this specification uses a value of Null for Responses with an unknown id. Also, because JSON-RPC 1.0 uses an id value of Null for Notifications this could cause confusion in handling.\n\n\\[2\\] Fractional parts may be problematic, since many decimal fractions cannot be represented exactly as binary fractions.",
      "anyOf": [
        {
          "title": "Null",
          "description": "The JSON-RPC `null` request id.",
          "type": "null"
        },
        {
          "title": "Number",
          "description": "A numeric JSON-RPC request id.",
          "type": "integer",
          "format": "int64"
        },
        {
          "title": "Str",
          "description": "A string JSON-RPC request id.",
          "type": "string"
        }
      ]
    },
    "RequestPermissionRequest": {
      "description": "Request for user permission to proceed with an operation.\n\nSent when the agent needs authorization before performing a sensitive operation.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/v2/draft/tool-calls#requesting-permission)",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The session ID for this request.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "title": {
          "description": "Human-readable title for the permission prompt.\n\nThis title is specific to the permission prompt and does not update any\nsubject's displayed title.",
          "type": "string"
        },
        "description": {
          "description": "Optional human-readable explanation of why permission is needed.\n\nThis text is specific to the permission prompt and does not update any\nsubject's displayed content. Omitted or `null` both mean no separate\npermission description was provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "subject": {
          "description": "Optional structured context about the operation requiring permission.\n\nOmitted or `null` both mean no structured subject was provided.",
          "anyOf": [
            {
              "$ref": "#/$defs/RequestPermissionSubject"
            },
            {
              "type": "null"
            }
          ]
        },
        "options": {
          "description": "Available permission options for the user to choose from.\nMust contain at least one option.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/PermissionOption"
          },
          "minItems": 1
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId", "title", "options"],
      "x-side": "client",
      "x-method": "session/request_permission"
    },
    "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/v2/draft/session-setup#session-id)",
      "type": "string"
    },
    "RequestPermissionSubject": {
      "description": "The operation requiring permission.",
      "anyOf": [
        {
          "description": "Permission is requested before executing a tool call.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "tool_call"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/ToolCallPermissionSubject"
            }
          ]
        },
        {
          "description": "Permission is requested before running a command.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "command"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/CommandPermissionSubject"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future permission subject.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nClients that do not understand this subject type should preserve the raw\npayload when storing, replaying, proxying, or forwarding permission\nrequests, and otherwise display a generic permission prompt or decline it\naccording to policy.",
          "type": "object",
          "properties": {
            "type": {
              "description": "Custom or future permission subject type.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["type"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "tool_call"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "command"
                  }
                },
                "required": ["type"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "ToolCallUpdate": {
      "description": "Represents an upsert for 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\nOnly [`ToolCallUpdate::tool_call_id`] is required. Other fields have patch semantics:\nomitted fields leave the existing tool call value unchanged, `null` clears or\nunsets the value, and concrete values replace the previous value. For\ncollection fields, concrete arrays replace the previous collection, and both\n`null` and `[]` clear the collection. A concrete `_meta` object instead\npatches the stored metadata by top-level key. When a client receives a tool\ncall ID it has not seen before, omitted fields use client defaults.\n\nSee protocol docs: [Tool Calls](https://agentclientprotocol.com/protocol/v2/draft/tool-calls)",
      "type": "object",
      "properties": {
        "toolCallId": {
          "description": "Unique identifier for this tool call within the session.",
          "allOf": [
            {
              "$ref": "#/$defs/ToolCallId"
            }
          ]
        },
        "name": {
          "description": "Programmatic name of the tool being invoked.\n\nThis field is optional and has patch semantics. Omission means no\nchange, `null` clears the name, and a string replaces it. For a tool\ncall ID the client has not seen before, omission or `null` means that no\ntool name is available.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "title": {
          "description": "Human-readable title describing what the tool is doing.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "kind": {
          "description": "The category of tool being invoked.\nHelps clients choose appropriate icons and UI treatment.",
          "anyOf": [
            {
              "$ref": "#/$defs/ToolKind"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "status": {
          "description": "Current execution status of the tool call.",
          "anyOf": [
            {
              "$ref": "#/$defs/ToolCallStatus"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "content": {
          "description": "Content produced by the tool call.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/ToolCallContent"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "locations": {
          "description": "File locations affected by this tool call.\nEnables \"follow-along\" features in clients.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/ToolCallLocation"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "rawInput": {
          "description": "Raw input parameters sent to the tool.",
          "x-deserialize-default-on-error": true
        },
        "rawOutput": {
          "description": "Raw output returned by the tool.",
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted leaves the stored metadata unchanged; `null`\nclears it. An object patches the stored metadata by top-level key: keys it omits are\nunchanged, a key set to `null` is removed, and any other value replaces that key's\nstored value without merging nested objects. Beyond this patch rule, implementations\nMUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Metadata Patches](https://agentclientprotocol.com/protocol/v2/draft/extensibility#metadata-patches)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["toolCallId"]
    },
    "ToolCallId": {
      "description": "Unique identifier for a tool call within a session.",
      "type": "string"
    },
    "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/v2/draft/tool-calls#creating)",
      "anyOf": [
        {
          "description": "Reading files or data.",
          "type": "string",
          "const": "read"
        },
        {
          "description": "Modifying files or content.",
          "type": "string",
          "const": "edit"
        },
        {
          "description": "Removing files or data.",
          "type": "string",
          "const": "delete"
        },
        {
          "description": "Moving or renaming files.",
          "type": "string",
          "const": "move"
        },
        {
          "description": "Searching for information.",
          "type": "string",
          "const": "search"
        },
        {
          "description": "Running commands or code.",
          "type": "string",
          "const": "execute"
        },
        {
          "description": "Internal reasoning or planning.",
          "type": "string",
          "const": "think"
        },
        {
          "description": "Retrieving external data.",
          "type": "string",
          "const": "fetch"
        },
        {
          "description": "Switching the current session mode.",
          "type": "string",
          "const": "switch_mode"
        },
        {
          "description": "Other tool types (default).",
          "type": "string",
          "const": "other"
        },
        {
          "title": "unknown",
          "description": "Custom or future tool kind.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "string"
        }
      ]
    },
    "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/v2/draft/tool-calls#status)",
      "anyOf": [
        {
          "description": "The tool call hasn't started running yet because the input is either\nstreaming or we're awaiting approval.",
          "type": "string",
          "const": "pending"
        },
        {
          "description": "The tool call is currently running.",
          "type": "string",
          "const": "in_progress"
        },
        {
          "description": "The tool call completed successfully.",
          "type": "string",
          "const": "completed"
        },
        {
          "description": "The tool call failed with an error.",
          "type": "string",
          "const": "failed"
        },
        {
          "description": "The tool call was cancelled before it completed.",
          "type": "string",
          "const": "cancelled"
        },
        {
          "title": "other",
          "description": "Custom or future tool call status.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "string"
        }
      ]
    },
    "ToolCallContent": {
      "description": "Content produced by a tool call.\n\nTool calls can produce different types of content including standard\ncontent blocks (text, images), file diffs, or display-only terminals.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/v2/draft/tool-calls#content)",
      "anyOf": [
        {
          "description": "Standard content block (text, images, resources).",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "content"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/Content"
            }
          ]
        },
        {
          "description": "File modification shown as a diff.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "diff"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/Diff"
            }
          ]
        },
        {
          "description": "A display-only reference to an agent-owned terminal.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "terminal"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/Terminal"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future tool call content.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nReceivers that do not understand this content type should preserve the\nraw payload when storing, replaying, proxying, or forwarding tool call\noutput, and otherwise ignore it or display it generically.",
          "type": "object",
          "properties": {
            "type": {
              "description": "Custom or future tool call content type.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["type"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "content"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "diff"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "terminal"
                  }
                },
                "required": ["type"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "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 reported through `session/update` notifications as\n  message updates or streamed chunks\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/v2/draft/content)",
      "anyOf": [
        {
          "description": "Text content. May be plain text or formatted with Markdown.\n\nAll agents MUST support text content blocks in prompts.\nClients SHOULD render this text as Markdown.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "text"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/TextContent"
            }
          ]
        },
        {
          "description": "Images for visual context or analysis.\n\nRequires the `image` prompt capability when included in prompts.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "image"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/ImageContent"
            }
          ]
        },
        {
          "description": "Audio data for transcription or analysis.\n\nRequires the `audio` prompt capability when included in prompts.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "audio"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/AudioContent"
            }
          ]
        },
        {
          "description": "References to resources that the agent can access.\n\nAll agents MUST support resource links in prompts.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "resource_link"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/ResourceLink"
            }
          ]
        },
        {
          "description": "Complete resource contents embedded directly in the message.\n\nPreferred for including context as it avoids extra round-trips.\n\nRequires the `embeddedContext` prompt capability when included in prompts.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "resource"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/EmbeddedResource"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future content block.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nReceivers that do not understand this content block type should preserve\nthe raw payload when storing, replaying, proxying, or forwarding content,\nand otherwise ignore it or display it generically.",
          "type": "object",
          "properties": {
            "type": {
              "description": "Custom or future content block type.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["type"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "text"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "image"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "audio"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "resource_link"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "resource"
                  }
                },
                "required": ["type"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "Annotations": {
      "description": "Optional annotations for the client. The client can use annotations to inform how objects are used or displayed",
      "type": "object",
      "properties": {
        "audience": {
          "description": "Intended recipients for this content, such as the user or assistant.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/Role"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "lastModified": {
          "description": "Timestamp indicating when the underlying resource was last modified.\n\nMust be an RFC 3339 formatted string (e.g., \"2025-01-12T15:00:58Z\").",
          "type": ["string", "null"],
          "format": "date-time",
          "x-deserialize-default-on-error": true
        },
        "priority": {
          "description": "Relative importance of this content when clients choose what to surface.",
          "type": ["number", "null"],
          "format": "double",
          "minimum": 0,
          "maximum": 1,
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "Role": {
      "description": "The sender or recipient of messages and data in a conversation.",
      "anyOf": [
        {
          "description": "The assistant side of a conversation.",
          "type": "string",
          "const": "assistant"
        },
        {
          "description": "The user side of a conversation.",
          "type": "string",
          "const": "user"
        },
        {
          "title": "other",
          "description": "Custom or future role.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "string"
        }
      ]
    },
    "TextContent": {
      "description": "Text provided to or from an LLM.",
      "type": "object",
      "properties": {
        "text": {
          "description": "Text payload carried by this content block.",
          "type": "string"
        },
        "annotations": {
          "description": "Optional annotations that help clients decide how to display or route this content.",
          "anyOf": [
            {
              "$ref": "#/$defs/Annotations"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["text"]
    },
    "MediaType": {
      "description": "An Internet media type identifying the format of protocol content.",
      "type": "string"
    },
    "ImageContent": {
      "description": "An image provided to or from an LLM.",
      "type": "object",
      "properties": {
        "data": {
          "description": "Base64-encoded media payload.",
          "type": "string",
          "contentEncoding": "base64"
        },
        "mimeType": {
          "description": "MIME type describing the encoded media payload.",
          "allOf": [
            {
              "$ref": "#/$defs/MediaType"
            }
          ]
        },
        "uri": {
          "description": "URI associated with this resource or media payload.",
          "type": ["string", "null"],
          "format": "uri",
          "x-deserialize-default-on-error": true
        },
        "annotations": {
          "description": "Optional annotations that help clients decide how to display or route this content.",
          "anyOf": [
            {
              "$ref": "#/$defs/Annotations"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["data", "mimeType"]
    },
    "AudioContent": {
      "description": "Audio provided to or from an LLM.",
      "type": "object",
      "properties": {
        "data": {
          "description": "Base64-encoded media payload.",
          "type": "string",
          "contentEncoding": "base64"
        },
        "mimeType": {
          "description": "MIME type describing the encoded media payload.",
          "allOf": [
            {
              "$ref": "#/$defs/MediaType"
            }
          ]
        },
        "annotations": {
          "description": "Optional annotations that help clients decide how to display or route this content.",
          "anyOf": [
            {
              "$ref": "#/$defs/Annotations"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["data", "mimeType"]
    },
    "Icon": {
      "description": "An optionally-sized icon that can be displayed in a user interface.",
      "type": "object",
      "properties": {
        "src": {
          "description": "A standard URI pointing to an icon resource.",
          "type": "string",
          "format": "uri"
        },
        "mimeType": {
          "description": "Optional MIME type override if the source MIME type is missing or generic.",
          "anyOf": [
            {
              "$ref": "#/$defs/MediaType"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "sizes": {
          "description": "Optional array of strings that specify sizes at which the icon can be used.\nEach string should be in `WxH` format (e.g., `\"48x48\"`, `\"96x96\"`) or\n`\"any\"` for scalable formats like SVG.\n\nIf not provided, the client should assume that the icon can be used at any size.",
          "type": ["array", "null"],
          "items": {
            "type": "string"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "theme": {
          "description": "Optional theme this icon is designed for.",
          "anyOf": [
            {
              "$ref": "#/$defs/IconTheme"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        }
      },
      "required": ["src"]
    },
    "IconTheme": {
      "description": "Theme an icon is designed for.",
      "anyOf": [
        {
          "description": "Icon designed for light backgrounds.",
          "type": "string",
          "const": "light"
        },
        {
          "description": "Icon designed for dark backgrounds.",
          "type": "string",
          "const": "dark"
        },
        {
          "title": "other",
          "description": "Custom or future icon theme.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "string"
        }
      ]
    },
    "ResourceLink": {
      "description": "A resource that the server is capable of reading, included in a prompt or tool call result.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Human-readable name shown for this protocol object.",
          "type": "string"
        },
        "uri": {
          "description": "URI associated with this resource or media payload.",
          "type": "string",
          "format": "uri"
        },
        "title": {
          "description": "Optional display title for end-user UI.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "description": {
          "description": "Optional human-readable details shown with this protocol object.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "icons": {
          "description": "Optional set of sized icons that the client can display in a user interface.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/Icon"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "mimeType": {
          "description": "MIME type describing the encoded media payload.",
          "anyOf": [
            {
              "$ref": "#/$defs/MediaType"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "size": {
          "description": "Optional size of the linked resource in bytes, if known.",
          "type": ["integer", "null"],
          "format": "int64",
          "x-deserialize-default-on-error": true
        },
        "annotations": {
          "description": "Optional annotations that help clients decide how to display or route this content.",
          "anyOf": [
            {
              "$ref": "#/$defs/Annotations"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["name", "uri"]
    },
    "EmbeddedResourceResource": {
      "description": "Resource content that can be embedded in a message.",
      "anyOf": [
        {
          "title": "TextResourceContents",
          "description": "Text resource contents embedded directly in the message.",
          "allOf": [
            {
              "$ref": "#/$defs/TextResourceContents"
            }
          ]
        },
        {
          "title": "BlobResourceContents",
          "description": "Binary resource contents embedded directly in the message.",
          "allOf": [
            {
              "$ref": "#/$defs/BlobResourceContents"
            }
          ]
        }
      ]
    },
    "TextResourceContents": {
      "description": "Text-based resource contents.",
      "type": "object",
      "properties": {
        "text": {
          "description": "Text payload carried by this content block.",
          "type": "string"
        },
        "uri": {
          "description": "URI associated with this resource or media payload.",
          "type": "string",
          "format": "uri"
        },
        "mimeType": {
          "description": "MIME type describing the encoded media payload.",
          "anyOf": [
            {
              "$ref": "#/$defs/MediaType"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["text", "uri"]
    },
    "BlobResourceContents": {
      "description": "Binary resource contents.",
      "type": "object",
      "properties": {
        "blob": {
          "description": "Base64-encoded bytes for a binary resource payload.",
          "type": "string",
          "contentEncoding": "base64"
        },
        "uri": {
          "description": "URI associated with this resource or media payload.",
          "type": "string",
          "format": "uri"
        },
        "mimeType": {
          "description": "MIME type describing the encoded media payload.",
          "anyOf": [
            {
              "$ref": "#/$defs/MediaType"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["blob", "uri"]
    },
    "EmbeddedResource": {
      "description": "The contents of a resource, embedded into a prompt or tool call result.",
      "type": "object",
      "properties": {
        "resource": {
          "description": "Embedded resource payload, either text or binary data.",
          "allOf": [
            {
              "$ref": "#/$defs/EmbeddedResourceResource"
            }
          ]
        },
        "annotations": {
          "description": "Optional annotations that help clients decide how to display or route this content.",
          "anyOf": [
            {
              "$ref": "#/$defs/Annotations"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["resource"]
    },
    "Content": {
      "description": "Standard content block (text, images, resources).",
      "type": "object",
      "properties": {
        "content": {
          "description": "The actual content block.",
          "allOf": [
            {
              "$ref": "#/$defs/ContentBlock"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["content"]
    },
    "DiffChange": {
      "description": "One file-level change described by a [`Diff`].\n\nStructured change metadata lets clients identify affected files and\noperations without parsing the text patch.",
      "type": "object",
      "properties": {
        "fileType": {
          "description": "File content kind.\n\nOmitted or `null` means the content kind is unknown.",
          "anyOf": [
            {
              "$ref": "#/$defs/DiffFileType"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "mimeType": {
          "description": "MIME type of the file contents.\n\nOmitted or `null` means the MIME type is unknown.",
          "anyOf": [
            {
              "$ref": "#/$defs/MediaType"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "anyOf": [
        {
          "description": "A file was added.",
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "add"
            }
          },
          "required": ["operation"],
          "allOf": [
            {
              "$ref": "#/$defs/DiffPathChange"
            }
          ]
        },
        {
          "description": "A file was deleted.",
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "delete"
            }
          },
          "required": ["operation"],
          "allOf": [
            {
              "$ref": "#/$defs/DiffPathChange"
            }
          ]
        },
        {
          "description": "A file was modified in place.",
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "modify"
            }
          },
          "required": ["operation"],
          "allOf": [
            {
              "$ref": "#/$defs/DiffPathChange"
            }
          ]
        },
        {
          "description": "A file was moved or renamed.",
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "move"
            }
          },
          "required": ["operation"],
          "allOf": [
            {
              "$ref": "#/$defs/DiffPathPairChange"
            }
          ]
        },
        {
          "description": "A file was copied.",
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "copy"
            }
          },
          "required": ["operation"],
          "allOf": [
            {
              "$ref": "#/$defs/DiffPathPairChange"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future file operation.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "object",
          "properties": {
            "operation": {
              "description": "Custom or future file operation.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["operation"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "operation": {
                    "type": "string",
                    "const": "add"
                  }
                },
                "required": ["operation"]
              },
              {
                "type": "object",
                "properties": {
                  "operation": {
                    "type": "string",
                    "const": "delete"
                  }
                },
                "required": ["operation"]
              },
              {
                "type": "object",
                "properties": {
                  "operation": {
                    "type": "string",
                    "const": "modify"
                  }
                },
                "required": ["operation"]
              },
              {
                "type": "object",
                "properties": {
                  "operation": {
                    "type": "string",
                    "const": "move"
                  }
                },
                "required": ["operation"]
              },
              {
                "type": "object",
                "properties": {
                  "operation": {
                    "type": "string",
                    "const": "copy"
                  }
                },
                "required": ["operation"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "DiffFileType": {
      "description": "Kind of file content represented by a diff change.",
      "anyOf": [
        {
          "description": "Text content.",
          "type": "string",
          "const": "text"
        },
        {
          "description": "Binary or otherwise non-text content.",
          "type": "string",
          "const": "binary"
        },
        {
          "description": "Directory entry.",
          "type": "string",
          "const": "directory"
        },
        {
          "description": "Symbolic link.",
          "type": "string",
          "const": "symlink"
        },
        {
          "title": "other",
          "description": "Custom or future file type.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "string"
        }
      ]
    },
    "AbsolutePath": {
      "description": "An absolute filesystem path used by the protocol.",
      "type": "string"
    },
    "DiffPathChange": {
      "description": "Operation metadata for add, delete, and modify changes.",
      "type": "object",
      "properties": {
        "path": {
          "description": "Absolute path for the operation.",
          "allOf": [
            {
              "$ref": "#/$defs/AbsolutePath"
            }
          ]
        }
      },
      "required": ["path"]
    },
    "DiffPathPairChange": {
      "description": "Operation metadata for move and copy changes.",
      "type": "object",
      "properties": {
        "oldPath": {
          "description": "Absolute path before the operation.",
          "allOf": [
            {
              "$ref": "#/$defs/AbsolutePath"
            }
          ]
        },
        "path": {
          "description": "Absolute path after the operation.",
          "allOf": [
            {
              "$ref": "#/$defs/AbsolutePath"
            }
          ]
        }
      },
      "required": ["oldPath", "path"]
    },
    "DiffPatch": {
      "description": "Renderable patch text and its format.",
      "type": "object",
      "properties": {
        "format": {
          "description": "Patch format. The only ACP-defined value is `git_patch`.",
          "allOf": [
            {
              "$ref": "#/$defs/DiffPatchFormat"
            }
          ]
        },
        "text": {
          "description": "Patch text in the format named by `format`.",
          "type": "string"
        }
      },
      "required": ["format", "text"]
    },
    "DiffPatchFormat": {
      "description": "Text patch format used by [`DiffPatch`].",
      "anyOf": [
        {
          "description": "One or more `diff --git` sections in Git's `--patch` (`-p`) text format.\n\nUnlike Git, which writes paths relative to the repository root, every\npath MUST be absolute, including in `rename from`, `rename to`,\n`copy from`, and `copy to` lines, and MUST NOT have a prefix such as\nGit's default `a/` and `b/`. Otherwise paths follow Git: `/dev/null`\nnames the missing side of an added or deleted file in the `---` and\n`+++` lines, and paths with unusual characters are quoted as Git quotes\nthem. Surrounding commit metadata and email envelopes MUST NOT be\nincluded.",
          "type": "string",
          "const": "git_patch"
        },
        {
          "title": "other",
          "description": "Custom or future patch format.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "string"
        }
      ]
    },
    "Diff": {
      "description": "File changes produced by a tool call.\n\n`changes` is authoritative for affected absolute paths and operations.\n`patch` optionally carries renderable text for some or all of those changes\nand MUST be consistent with `changes`. Agents SHOULD provide `patch` whenever\nfeasible. Clients MUST handle diffs where `patch` is omitted or `null`.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/v2/draft/tool-calls#content)",
      "type": "object",
      "properties": {
        "changes": {
          "description": "Structured file changes described by this diff.\n\nClients can use this field without parsing patch text to determine affected paths.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/DiffChange"
          },
          "x-deserialize-skip-invalid-items": true
        },
        "patch": {
          "description": "Renderable patch text for some or all of the structured changes.\n\nAgents SHOULD provide patch text whenever feasible. Omitted or `null`\nmeans no renderable patch text was provided.",
          "anyOf": [
            {
              "$ref": "#/$defs/DiffPatch"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["changes"]
    },
    "TerminalId": {
      "description": "Unique identifier for an agent-owned terminal within a session.",
      "type": "string"
    },
    "Terminal": {
      "description": "A display-only reference to an agent-owned terminal.\n\nTerminal state and output are delivered separately through\n[`TerminalUpdate`] and [`TerminalOutputChunk`].",
      "type": "object",
      "properties": {
        "terminalId": {
          "description": "The ID of the terminal to display.",
          "allOf": [
            {
              "$ref": "#/$defs/TerminalId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys. This metadata is scoped to the content reference. Omitted\nand `null` are equivalent and mean no item metadata was provided.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["terminalId"]
    },
    "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/v2/draft/tool-calls#following-the-agent)",
      "type": "object",
      "properties": {
        "path": {
          "description": "The absolute file path being accessed or modified.",
          "allOf": [
            {
              "$ref": "#/$defs/AbsolutePath"
            }
          ]
        },
        "line": {
          "description": "Optional line number within the file.",
          "type": ["integer", "null"],
          "format": "uint32",
          "minimum": 0,
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["path"]
    },
    "ToolCallPermissionSubject": {
      "description": "Permission request details for a tool call.",
      "type": "object",
      "properties": {
        "toolCall": {
          "description": "Details about the tool call requiring permission.",
          "allOf": [
            {
              "$ref": "#/$defs/ToolCallUpdate"
            }
          ]
        }
      },
      "required": ["toolCall"]
    },
    "CommandPermissionSubject": {
      "description": "Permission request details for a command.",
      "type": "object",
      "properties": {
        "command": {
          "description": "The command that would be run if permission is granted.",
          "type": "string"
        },
        "cwd": {
          "description": "The absolute working directory for the command.",
          "allOf": [
            {
              "$ref": "#/$defs/AbsolutePath"
            }
          ]
        },
        "toolCallId": {
          "description": "The associated tool call, when known. Omitted and `null` are equivalent.",
          "anyOf": [
            {
              "$ref": "#/$defs/ToolCallId"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "terminalId": {
          "description": "The associated terminal, when already known. Omitted and `null` are equivalent.",
          "anyOf": [
            {
              "$ref": "#/$defs/TerminalId"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys. Omitted and `null` are equivalent and mean no subject metadata was provided.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["command", "cwd"]
    },
    "PermissionOption": {
      "description": "An option presented to the user when requesting permission.",
      "type": "object",
      "properties": {
        "optionId": {
          "description": "Unique identifier for this permission option.",
          "allOf": [
            {
              "$ref": "#/$defs/PermissionOptionId"
            }
          ]
        },
        "name": {
          "description": "Human-readable label to display to the user.",
          "type": "string"
        },
        "kind": {
          "description": "Hint about the nature of this permission option.",
          "allOf": [
            {
              "$ref": "#/$defs/PermissionOptionKind"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["optionId", "name", "kind"]
    },
    "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.",
      "anyOf": [
        {
          "description": "Allow this operation only this time.",
          "type": "string",
          "const": "allow_once"
        },
        {
          "description": "Allow this operation and remember the choice.",
          "type": "string",
          "const": "allow_always"
        },
        {
          "description": "Reject this operation only this time.",
          "type": "string",
          "const": "reject_once"
        },
        {
          "description": "Reject this operation and remember the choice.",
          "type": "string",
          "const": "reject_always"
        },
        {
          "title": "other",
          "description": "Custom or future permission option kind.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "string"
        }
      ]
    },
    "CreateElicitationRequest": {
      "description": "Request from the agent to elicit structured user input.\n\nThe agent sends this to the client to request information from the user,\neither via a form or by directing them to a URL.\nElicitations are tied to a session (optionally a tool call) or a request.\n\nA session-scoped request follows the aggregate foreground-state contract:\nagents SHOULD report `requires_action` when the whole foreground workflow is\nblocked on user action. Once reported, they MUST report `running` when progress\nresumes, or `idle` if work ends without resuming. Independent background requests\nand request-scoped elicitations do not themselves change session state.\nAccepting a URL does not mean the external interaction completed.\n\nAgents SHOULD cancel pending elicitations no longer needed by cancelled work.\nThe request's scope alone does not establish that dependency.\n\nSee protocol docs: [Elicitation](https://agentclientprotocol.com/protocol/v2/draft/elicitation)",
      "type": "object",
      "properties": {
        "message": {
          "description": "A human-readable message describing what input is needed.",
          "type": "string"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "anyOf": [
        {
          "description": "Form-based elicitation where the client renders a form from the provided schema.",
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "const": "form"
            }
          },
          "required": ["mode"],
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationFormMode"
            }
          ]
        },
        {
          "description": "URL-based elicitation where the client directs the user to a URL.",
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "const": "url"
            }
          },
          "required": ["mode"],
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationUrlMode"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future elicitation mode.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nClients that do not understand this mode should preserve the raw payload\nwhen storing, replaying, proxying, or forwarding elicitation requests.\nThey MUST NOT render it as a known elicitation mode.",
          "type": "object",
          "properties": {
            "mode": {
              "description": "Custom or future elicitation mode.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["mode"],
          "anyOf": [
            {
              "title": "Session",
              "description": "Tied to a session, optionally to a specific tool call within that session.",
              "allOf": [
                {
                  "$ref": "#/$defs/ElicitationSessionScope"
                }
              ]
            },
            {
              "title": "Request",
              "description": "Tied to a specific JSON-RPC request outside of a session\n(e.g., during auth/configuration phases before any session is started).",
              "allOf": [
                {
                  "$ref": "#/$defs/ElicitationRequestScope"
                }
              ]
            }
          ],
          "unevaluatedProperties": true,
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "form"
                  }
                },
                "required": ["mode"]
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "url"
                  }
                },
                "required": ["mode"]
              }
            ]
          }
        }
      ],
      "required": ["message"],
      "x-side": "client",
      "x-method": "elicitation/create"
    },
    "ElicitationSessionScope": {
      "description": "Session-scoped elicitation, optionally tied to a specific tool call.\n\nWhen `tool_call_id` is set, the elicitation is tied to a specific tool call.\nThis is useful when an agent receives an elicitation from an MCP server\nduring a tool call and needs to redirect it to the user.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The session this elicitation is tied to.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "toolCallId": {
          "description": "Optional tool call within the session.\n\nOptional. Omitted and `null` are equivalent and mean the elicitation is scoped to the\nsession without a specific tool call.",
          "anyOf": [
            {
              "$ref": "#/$defs/ToolCallId"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        }
      },
      "required": ["sessionId"]
    },
    "ElicitationRequestScope": {
      "description": "Request-scoped elicitation, tied to a specific JSON-RPC request outside of a session\n(e.g., during auth/configuration phases before any session is started).",
      "type": "object",
      "properties": {
        "requestId": {
          "description": "The request this elicitation is tied to.",
          "allOf": [
            {
              "$ref": "#/$defs/RequestId"
            }
          ]
        }
      },
      "required": ["requestId"]
    },
    "ElicitationSchema": {
      "description": "Type-safe elicitation schema for requesting structured user input.\n\nThis represents a JSON Schema object with primitive-typed properties,\nas required by the elicitation specification.",
      "type": "object",
      "properties": {
        "type": {
          "description": "Type discriminator. Always `\"object\"`.",
          "x-deserialize-default-on-error": true,
          "default": "object",
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationSchemaType"
            }
          ]
        },
        "title": {
          "description": "Optional title for the schema.\n\nOptional. Omitted and `null` are equivalent and mean no title is provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "properties": {
          "description": "Property definitions (must be primitive types).",
          "type": "object",
          "default": {},
          "additionalProperties": {
            "$ref": "#/$defs/ElicitationPropertySchema"
          }
        },
        "required": {
          "description": "List of required property names.\n\nOptional. Omitted and `null` are equivalent and mean no property names are required.",
          "type": ["array", "null"],
          "items": {
            "type": "string"
          }
        },
        "description": {
          "description": "Optional description of what this schema represents.\n\nOptional. Omitted and `null` are equivalent and mean no schema description is provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "ElicitationSchemaType": {
      "description": "Type discriminator for elicitation schemas.",
      "oneOf": [
        {
          "description": "Object schema type.",
          "type": "string",
          "const": "object"
        }
      ]
    },
    "ElicitationPropertySchema": {
      "description": "Property schema for elicitation form fields.\n\nEach variant corresponds to a JSON Schema `\"type\"` value.\nSingle-select enums use the `String` variant with `enum` or `oneOf` set.\nMulti-select enums use the `Array` variant.",
      "anyOf": [
        {
          "description": "String property (or single-select enum when `enum`/`oneOf` is set).",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "string"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/StringPropertySchema"
            }
          ]
        },
        {
          "description": "Number (floating-point) property.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "number"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/NumberPropertySchema"
            }
          ]
        },
        {
          "description": "Integer property.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "integer"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/IntegerPropertySchema"
            }
          ]
        },
        {
          "description": "Boolean property.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "boolean"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/BooleanPropertySchema"
            }
          ]
        },
        {
          "description": "Multi-select array property.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "array"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/MultiSelectPropertySchema"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future elicitation property schema.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nClients that do not understand this property schema type should preserve\nthe raw schema when storing, replaying, proxying, or forwarding\nelicitation requests. They MUST NOT render it as a known input control.",
          "type": "object",
          "properties": {
            "type": {
              "description": "Custom or future elicitation property schema type.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["type"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "string"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "number"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "integer"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "boolean"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "array"
                  }
                },
                "required": ["type"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "StringFormat": {
      "description": "String format types for string properties in elicitation schemas.",
      "anyOf": [
        {
          "description": "Email address format.",
          "type": "string",
          "const": "email"
        },
        {
          "description": "URI format.",
          "type": "string",
          "const": "uri"
        },
        {
          "description": "Date format (YYYY-MM-DD).",
          "type": "string",
          "const": "date"
        },
        {
          "description": "Date-time format (RFC 3339).",
          "type": "string",
          "const": "date-time"
        },
        {
          "title": "other",
          "description": "Custom or future string format.\n\nUnknown formats are preserved. Implementations that do not understand a\nformat should treat it as an annotation rather than rejecting the schema.",
          "type": "string"
        }
      ]
    },
    "EnumOption": {
      "description": "A titled enum option with a const value, human-readable title, and optional description.",
      "type": "object",
      "properties": {
        "const": {
          "description": "The constant value for this option.",
          "type": "string"
        },
        "title": {
          "description": "Human-readable title for this option.",
          "type": "string"
        },
        "description": {
          "description": "Human-readable description.\n\nOptional. Omitted and `null` are equivalent and mean no description is provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["const", "title"]
    },
    "StringPropertySchema": {
      "description": "Schema for string properties in an elicitation form.\n\nWhen `enum` or `oneOf` is set, this represents a single-select enum\nwith `\"type\": \"string\"`.",
      "type": "object",
      "properties": {
        "title": {
          "description": "Optional title for the property.\n\nOptional. Omitted and `null` are equivalent and mean no title is provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "description": {
          "description": "Human-readable description.\n\nOptional. Omitted and `null` are equivalent and mean no description is provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "minLength": {
          "description": "Minimum string length.\n\nOptional. Omitted and `null` are equivalent and mean there is no minimum length constraint.",
          "type": ["integer", "null"],
          "format": "uint32",
          "minimum": 0
        },
        "maxLength": {
          "description": "Maximum string length.\n\nOptional. Omitted and `null` are equivalent and mean there is no maximum length constraint.",
          "type": ["integer", "null"],
          "format": "uint32",
          "minimum": 0
        },
        "pattern": {
          "description": "Pattern the string must match.\n\nOptional. Omitted and `null` are equivalent and mean there is no pattern constraint.",
          "type": ["string", "null"],
          "format": "regex"
        },
        "format": {
          "description": "String format.\n\nOptional. Omitted and `null` are equivalent and mean there is no format constraint.",
          "anyOf": [
            {
              "$ref": "#/$defs/StringFormat"
            },
            {
              "type": "null"
            }
          ]
        },
        "default": {
          "description": "Default value.\n\nOptional. Omitted and `null` are equivalent and mean no default value is provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "enum": {
          "description": "Enum values for untitled single-select enums.\nMust contain at least one value when present.\nOptional. Omitted and `null` are equivalent and mean no untitled single-select choices are\ndeclared by `enum`.",
          "type": ["array", "null"],
          "items": {
            "type": "string"
          },
          "minItems": 1
        },
        "oneOf": {
          "description": "Titled enum options for titled single-select enums.\nMust contain at least one option when present.\nOptional. Omitted and `null` are equivalent and mean no titled single-select choices are\ndeclared by `oneOf`.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/EnumOption"
          },
          "minItems": 1
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "NumberPropertySchema": {
      "description": "Schema for number (floating-point) properties in an elicitation form.",
      "type": "object",
      "properties": {
        "title": {
          "description": "Optional title for the property.\n\nOptional. Omitted and `null` are equivalent and mean no title is provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "description": {
          "description": "Human-readable description.\n\nOptional. Omitted and `null` are equivalent and mean no description is provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "minimum": {
          "description": "Minimum value (inclusive).\n\nOptional. Omitted and `null` are equivalent and mean there is no inclusive lower bound.",
          "type": ["number", "null"],
          "format": "double"
        },
        "maximum": {
          "description": "Maximum value (inclusive).\n\nOptional. Omitted and `null` are equivalent and mean there is no inclusive upper bound.",
          "type": ["number", "null"],
          "format": "double"
        },
        "default": {
          "description": "Default value.\n\nOptional. Omitted and `null` are equivalent and mean no default value is provided.",
          "type": ["number", "null"],
          "format": "double",
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "IntegerPropertySchema": {
      "description": "Schema for integer properties in an elicitation form.",
      "type": "object",
      "properties": {
        "title": {
          "description": "Optional title for the property.\n\nOptional. Omitted and `null` are equivalent and mean no title is provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "description": {
          "description": "Human-readable description.\n\nOptional. Omitted and `null` are equivalent and mean no description is provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "minimum": {
          "description": "Minimum value (inclusive).\n\nOptional. Omitted and `null` are equivalent and mean there is no inclusive lower bound.",
          "type": ["integer", "null"],
          "format": "int64"
        },
        "maximum": {
          "description": "Maximum value (inclusive).\n\nOptional. Omitted and `null` are equivalent and mean there is no inclusive upper bound.",
          "type": ["integer", "null"],
          "format": "int64"
        },
        "default": {
          "description": "Default value.\n\nOptional. Omitted and `null` are equivalent and mean no default value is provided.",
          "type": ["integer", "null"],
          "format": "int64",
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "BooleanPropertySchema": {
      "description": "Schema for boolean properties in an elicitation form.",
      "type": "object",
      "properties": {
        "title": {
          "description": "Optional title for the property.\n\nOptional. Omitted and `null` are equivalent and mean no title is provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "description": {
          "description": "Human-readable description.\n\nOptional. Omitted and `null` are equivalent and mean no description is provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "default": {
          "description": "Default value.\n\nOptional. Omitted and `null` are equivalent and mean no default value is provided.",
          "type": ["boolean", "null"],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "MultiSelectItems": {
      "description": "Items for a multi-select (array) property schema.",
      "anyOf": [
        {
          "description": "Multi-select string items with plain string values.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "string"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/StringMultiSelectItems"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future typed multi-select items.",
          "type": "object",
          "properties": {
            "type": {
              "description": "Custom or future multi-select item type.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["type"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "string"
                  }
                },
                "required": ["type"]
              }
            ]
          },
          "additionalProperties": true
        },
        {
          "title": "titled",
          "description": "Titled multi-select items with human-readable labels.",
          "allOf": [
            {
              "$ref": "#/$defs/TitledMultiSelectItems"
            }
          ]
        }
      ]
    },
    "StringMultiSelectItems": {
      "description": "String item schema for multi-select enum properties.",
      "type": "object",
      "properties": {
        "enum": {
          "description": "Allowed enum values. Must contain at least one value.",
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 1
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["enum"]
    },
    "TitledMultiSelectItems": {
      "description": "Items definition for titled multi-select enum properties.",
      "type": "object",
      "properties": {
        "anyOf": {
          "description": "Titled enum options. Must contain at least one option.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/EnumOption"
          },
          "minItems": 1
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["anyOf"]
    },
    "MultiSelectPropertySchema": {
      "description": "Schema for multi-select (array) properties in an elicitation form.",
      "type": "object",
      "properties": {
        "title": {
          "description": "Optional title for the property.\n\nOptional. Omitted and `null` are equivalent and mean no title is provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "description": {
          "description": "Human-readable description.\n\nOptional. Omitted and `null` are equivalent and mean no description is provided.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "minItems": {
          "description": "Minimum number of items to select.\n\nOptional. Omitted and `null` are equivalent and mean there is no minimum selection count.",
          "type": ["integer", "null"],
          "format": "uint64",
          "minimum": 0
        },
        "maxItems": {
          "description": "Maximum number of items to select.\n\nOptional. Omitted and `null` are equivalent and mean there is no maximum selection count.",
          "type": ["integer", "null"],
          "format": "uint64",
          "minimum": 0
        },
        "items": {
          "description": "The items definition describing allowed values.",
          "allOf": [
            {
              "$ref": "#/$defs/MultiSelectItems"
            }
          ]
        },
        "default": {
          "description": "Default selected values.\n\nOptional. Omitted and `null` are equivalent and mean no default selections are provided.",
          "type": ["array", "null"],
          "items": {
            "type": "string"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["items"]
    },
    "ElicitationFormMode": {
      "description": "Form-based elicitation mode where the client renders a form from the provided schema.",
      "type": "object",
      "properties": {
        "requestedSchema": {
          "description": "A JSON Schema describing the form fields to present to the user.",
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationSchema"
            }
          ]
        }
      },
      "anyOf": [
        {
          "title": "Session",
          "description": "Tied to a session, optionally to a specific tool call within that session.",
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationSessionScope"
            }
          ]
        },
        {
          "title": "Request",
          "description": "Tied to a specific JSON-RPC request outside of a session\n(e.g., during auth/configuration phases before any session is started).",
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationRequestScope"
            }
          ]
        }
      ],
      "required": ["requestedSchema"]
    },
    "ElicitationId": {
      "description": "Unique identifier for an elicitation.",
      "type": "string"
    },
    "ElicitationUrlMode": {
      "description": "URL-based elicitation mode where the client directs the user to a URL.",
      "type": "object",
      "properties": {
        "elicitationId": {
          "description": "The unique identifier for this elicitation.",
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationId"
            }
          ]
        },
        "url": {
          "description": "The URL to direct the user to.",
          "type": "string",
          "format": "uri"
        }
      },
      "anyOf": [
        {
          "title": "Session",
          "description": "Tied to a session, optionally to a specific tool call within that session.",
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationSessionScope"
            }
          ]
        },
        {
          "title": "Request",
          "description": "Tied to a specific JSON-RPC request outside of a session\n(e.g., during auth/configuration phases before any session is started).",
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationRequestScope"
            }
          ]
        }
      ],
      "required": ["elicitationId", "url"]
    },
    "MessageMcpRequest": {
      "description": "**UNSTABLE**\n\nRequest parameters for `mcp/message`, sent from consumer to provider.",
      "type": "object",
      "properties": {
        "serverId": {
          "description": "The declared ACP MCP server receiving this request.",
          "allOf": [
            {
              "$ref": "#/$defs/McpServerAcpId"
            }
          ]
        },
        "requestId": {
          "description": "The caller-generated identifier for the inner MCP request.",
          "allOf": [
            {
              "$ref": "#/$defs/McpRequestId"
            }
          ]
        },
        "method": {
          "description": "The inner MCP method name.",
          "type": "string"
        },
        "params": {
          "description": "Optional inner MCP params; null is equivalent to omission.",
          "type": ["object", "null"],
          "additionalProperties": true
        },
        "_meta": {
          "description": "ACP extension metadata (not inner MCP params._meta); null is equivalent to omission.",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["serverId", "requestId", "method"],
      "x-side": "client",
      "x-method": "mcp/message"
    },
    "McpServerAcpId": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for an MCP server using the ACP transport.\n\nThe value is opaque and generated by the ACP component providing the MCP server. It is\nused by `mcp/message` to route requests to the component that declared the server.",
      "type": "string"
    },
    "McpRequestId": {
      "description": "**UNSTABLE**\n\nIdentifies an inner MCP request active against a server on this ACP connection.\nGenerated by the caller and preserved unchanged by proxies, independently of\nthe outer ACP JSON-RPC request ID.",
      "type": "string"
    },
    "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/v2/draft/extensibility)"
    },
    "AgentResponse": {
      "description": "A JSON-RPC response object.",
      "anyOf": [
        {
          "title": "Result",
          "description": "A successful JSON-RPC response.",
          "type": "object",
          "properties": {
            "id": {
              "description": "The id of the request this response answers.",
              "allOf": [
                {
                  "$ref": "#/$defs/RequestId"
                }
              ]
            },
            "result": {
              "description": "Method-specific response data.",
              "anyOf": [
                {
                  "title": "InitializeResponse",
                  "description": "Successful result returned for a `initialize` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/InitializeResponse"
                    }
                  ]
                },
                {
                  "title": "LoginAuthResponse",
                  "description": "Successful result returned for an `auth/login` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/LoginAuthResponse"
                    }
                  ]
                },
                {
                  "title": "ListProvidersResponse",
                  "description": "Successful result returned for a `providers/list` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ListProvidersResponse"
                    }
                  ]
                },
                {
                  "title": "SetProviderResponse",
                  "description": "Successful result returned for a `providers/set` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/SetProviderResponse"
                    }
                  ]
                },
                {
                  "title": "DisableProviderResponse",
                  "description": "Successful result returned for a `providers/disable` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/DisableProviderResponse"
                    }
                  ]
                },
                {
                  "title": "LogoutAuthResponse",
                  "description": "Successful result returned for an `auth/logout` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/LogoutAuthResponse"
                    }
                  ]
                },
                {
                  "title": "NewSessionResponse",
                  "description": "Successful result returned for a `session/new` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/NewSessionResponse"
                    }
                  ]
                },
                {
                  "title": "ListSessionsResponse",
                  "description": "Successful result returned for a `session/list` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ListSessionsResponse"
                    }
                  ]
                },
                {
                  "title": "DeleteSessionResponse",
                  "description": "Successful result returned for a `session/delete` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/DeleteSessionResponse"
                    }
                  ]
                },
                {
                  "title": "ForkSessionResponse",
                  "description": "Successful result returned for a `session/fork` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ForkSessionResponse"
                    }
                  ]
                },
                {
                  "title": "ResumeSessionResponse",
                  "description": "Successful result returned for a `session/resume` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ResumeSessionResponse"
                    }
                  ]
                },
                {
                  "title": "CloseSessionResponse",
                  "description": "Successful result returned for a `session/close` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/CloseSessionResponse"
                    }
                  ]
                },
                {
                  "title": "SetSessionConfigOptionResponse",
                  "description": "Successful result returned for a `session/set_config_option` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/SetSessionConfigOptionResponse"
                    }
                  ]
                },
                {
                  "title": "PromptResponse",
                  "description": "Successful result returned for a `session/prompt` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/PromptResponse"
                    }
                  ]
                },
                {
                  "title": "ExtMethodResponse",
                  "description": "Successful result returned by an extension method outside the core ACP method set.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ExtResponse"
                    }
                  ]
                }
              ]
            }
          },
          "required": ["id", "result"]
        },
        {
          "title": "Error",
          "description": "A failed JSON-RPC response.",
          "type": "object",
          "properties": {
            "id": {
              "description": "The id of the request this response answers.",
              "allOf": [
                {
                  "$ref": "#/$defs/RequestId"
                }
              ]
            },
            "error": {
              "description": "Method-specific error data.",
              "allOf": [
                {
                  "$ref": "#/$defs/Error"
                }
              ]
            }
          },
          "required": ["id", "error"]
        }
      ],
      "x-docs-ignore": true
    },
    "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/v2/draft/initialization)",
      "type": "object",
      "properties": {
        "protocolVersion": {
          "description": "The protocol version the client specified if supported by the agent,\nor the latest protocol version supported by the agent.\n\nThe client should disconnect, if it doesn't support this version.",
          "allOf": [
            {
              "$ref": "#/$defs/ProtocolVersion"
            }
          ]
        },
        "info": {
          "description": "Information about the implementation sending this initialize response.",
          "allOf": [
            {
              "$ref": "#/$defs/Implementation"
            }
          ]
        },
        "capabilities": {
          "description": "Capabilities supported by the agent.",
          "x-deserialize-default-on-error": true,
          "default": {},
          "allOf": [
            {
              "$ref": "#/$defs/AgentCapabilities"
            }
          ]
        },
        "authMethods": {
          "description": "Authentication methods supported by the agent.\n\nOptional. Omitted or empty means the agent does not advertise the\nauthentication method surface. Supplying one or more valid methods means\nthe agent MUST support both `auth/login` and `auth/logout`.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AuthMethod"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["protocolVersion", "info"],
      "x-side": "agent",
      "x-method": "initialize"
    },
    "ProtocolVersion": {
      "description": "Protocol version identifier.\n\nThis version is only bumped for breaking changes.\nNon-breaking changes should be introduced via capabilities.",
      "type": "integer",
      "format": "uint16",
      "minimum": 0,
      "maximum": 65535
    },
    "Implementation": {
      "description": "Metadata about the implementation of the client or agent.\nDescribes the name and version of an ACP implementation, with an optional\ntitle for UI representation.",
      "type": "object",
      "properties": {
        "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"],
          "x-deserialize-default-on-error": true
        },
        "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"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["name", "version"]
    },
    "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/v2/draft/initialization#agent-capabilities)",
      "type": "object",
      "properties": {
        "session": {
          "description": "Session capabilities supported by the agent.\n\nOptional. Omitted or `null` both mean the agent does not support the\n`session/*` method surface. Supplying `{}` means the agent supports the\nbaseline session methods: `session/new`, `session/list`,\n`session/resume`, `session/close`, `session/prompt`, `session/cancel`,\nand `session/update`.",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "auth": {
          "description": "Authentication-related extension capabilities supported by the agent.\n\nOptional. Omitted or `null` both mean the agent does not advertise any\nauthentication-related extensions. This field does not advertise support\nfor `auth/login` or `auth/logout`; those methods are advertised by a\nnon-empty `authMethods` list in the `initialize` response.",
          "anyOf": [
            {
              "$ref": "#/$defs/AgentAuthCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "providers": {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nProvider configuration capabilities supported by the agent.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports provider configuration methods.",
          "anyOf": [
            {
              "$ref": "#/$defs/ProvidersCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "SessionCapabilities": {
      "description": "Session capabilities supported by the agent.\n\nSupplying `{}` means the agent supports the baseline session methods:\n`session/new`, `session/list`, `session/resume`, `session/close`,\n`session/prompt`, `session/cancel`, and `session/update`.\n\nAgents that support sessions **MAY** support additional session methods,\nprompt content types, and MCP transports by specifying additional\ncapabilities.\n\nSee protocol docs: [Session Capabilities](https://agentclientprotocol.com/protocol/v2/draft/initialization#session-capabilities)",
      "type": "object",
      "properties": {
        "prompt": {
          "description": "Prompt capabilities supported by the agent in `session/prompt` requests.\n\nOptional. Omitted or `null` both mean the agent does not advertise any\nprompt extensions beyond the baseline text and resource-link content\nrequired by `session/prompt`.",
          "anyOf": [
            {
              "$ref": "#/$defs/PromptCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "mcp": {
          "description": "MCP capabilities supported by the agent for session lifecycle requests.\n\nOptional. Omitted or `null` both mean the agent does not advertise MCP\nserver transport support for sessions.",
          "anyOf": [
            {
              "$ref": "#/$defs/McpCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "delete": {
          "description": "Whether the agent supports `session/delete`.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports deleting sessions from `session/list`.",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionDeleteCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "additionalDirectories": {
          "description": "Whether the agent supports `additionalDirectories` on supported session lifecycle requests.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports `additionalDirectories` on\nsupported session lifecycle requests.\n\nAgents may return `SessionInfo.additionalDirectories` to report the\ncomplete ordered additional-root list associated with a listed session.",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionAdditionalDirectoriesCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "systemPrompt": {
          "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 `systemPrompt` on session lifecycle requests.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports `systemPrompt` in `append` mode.",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionSystemPromptCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "fork": {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/fork`.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports forking sessions.",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionForkCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "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/v2/draft/initialization#prompt-capabilities)",
      "type": "object",
      "properties": {
        "image": {
          "description": "Agent supports [`ContentBlock::Image`].\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports image content in prompts.",
          "anyOf": [
            {
              "$ref": "#/$defs/PromptImageCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "audio": {
          "description": "Agent supports [`ContentBlock::Audio`].\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports audio content in prompts.",
          "anyOf": [
            {
              "$ref": "#/$defs/PromptAudioCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "embeddedContext": {
          "description": "Agent supports embedded context in `session/prompt` requests.\n\nWhen enabled, the Client is allowed to include [`ContentBlock::Resource`]\nin prompt requests for pieces of context that are referenced in the message.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports embedded context in prompts.",
          "anyOf": [
            {
              "$ref": "#/$defs/PromptEmbeddedContextCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "PromptImageCapabilities": {
      "description": "Capabilities for image content in prompt requests.\n\nSupplying `{}` means the agent supports image content in prompts.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "PromptAudioCapabilities": {
      "description": "Capabilities for audio content in prompt requests.\n\nSupplying `{}` means the agent supports audio content in prompts.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "PromptEmbeddedContextCapabilities": {
      "description": "Capabilities for embedded context in prompt requests.\n\nSupplying `{}` means the agent supports embedded context in prompts.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "McpCapabilities": {
      "description": "MCP capabilities supported by the agent for session lifecycle requests.",
      "type": "object",
      "properties": {
        "stdio": {
          "description": "Agent supports [`McpServer::Stdio`].\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports stdio MCP server transports.",
          "anyOf": [
            {
              "$ref": "#/$defs/McpStdioCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "http": {
          "description": "Agent supports [`McpServer::Http`].\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports HTTP MCP server transports.",
          "anyOf": [
            {
              "$ref": "#/$defs/McpHttpCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "acp": {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAgent supports [`McpServer::Acp`].\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports ACP MCP server transports.",
          "anyOf": [
            {
              "$ref": "#/$defs/McpAcpCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "McpStdioCapabilities": {
      "description": "Capabilities for stdio MCP server transports.\n\nSupplying `{}` means the agent supports stdio MCP server transports.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "McpHttpCapabilities": {
      "description": "Capabilities for HTTP MCP server transports.\n\nSupplying `{}` means the agent supports HTTP MCP server transports.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "McpAcpCapabilities": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for ACP MCP server transports.\n\nSupplying `{}` means the agent supports ACP MCP server transports.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "SessionDeleteCapabilities": {
      "description": "Capabilities for the `session/delete` method.\n\nSupplying `{}` means the agent supports deleting sessions from `session/list`.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "SessionAdditionalDirectoriesCapabilities": {
      "description": "Capabilities for additional session directories support.\n\nSupplying `{}` means the agent supports the `additionalDirectories` field on\nsupported session lifecycle requests. Agents that also support\n`session/list` may return `SessionInfo.additionalDirectories` to report the\ncomplete ordered additional-root list associated with a listed session.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "SessionSystemPromptCapabilities": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for client-provided system prompts.\n\nSupplying `{}` means the agent supports `systemPrompt` on session lifecycle\nrequests in `append` mode.",
      "type": "object",
      "properties": {
        "mode": {
          "description": "Delivery modes the agent supports in addition to `append`.\n\nOptional. Omitted or `null` both mean the agent supports only `append`.",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionSystemPromptModeCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "SessionSystemPromptModeCapabilities": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSystem prompt delivery modes the agent supports in addition to `append`.\n\n`append` has no entry because every agent advertising `session.systemPrompt`\nsupports it.",
      "type": "object",
      "properties": {
        "override": {
          "description": "Whether the agent supports `override` mode.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports replacing its built-in default\ninstructions with the client-provided system prompt.",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionSystemPromptOverrideCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "SessionSystemPromptOverrideCapabilities": {
      "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 `override` system prompt mode.\n\nSupplying `{}` means the agent supports replacing its built-in default\ninstructions with the client-provided system prompt.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "SessionForkCapabilities": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for the `session/fork` method.\n\nSupplying `{}` means the agent supports forking sessions.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "AgentAuthCapabilities": {
      "description": "Authentication-related extension capabilities supported by the agent.\n\nThis object does not advertise support for `auth/login` or `auth/logout`.\nThose methods are advertised by a non-empty `authMethods` list in the\n`initialize` response.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "ProvidersCapabilities": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nProvider configuration capabilities supported by the agent.\n\nSupplying `{}` means the agent supports provider configuration methods.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "AuthMethod": {
      "description": "Describes an available authentication method.\n\nThe `type` field acts as the discriminator in the serialized JSON form.",
      "anyOf": [
        {
          "description": "Client runs the configured agent program as a separate interactive\nprocess, without passing this method to `auth/login`.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "terminal"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/AuthMethodTerminal"
            }
          ]
        },
        {
          "description": "Agent handles authentication itself through `auth/login`.\n\nThe `type` discriminator value is `agent`.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "agent"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/AuthMethodAgent"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future authentication method.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nClients that do not understand this method type should preserve the raw\npayload when storing, replaying, proxying, or forwarding initialization\ndata, and otherwise ignore the method or display it generically.",
          "type": "object",
          "properties": {
            "type": {
              "description": "Custom or future authentication method type.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            },
            "methodId": {
              "description": "Unique identifier for this authentication method.",
              "allOf": [
                {
                  "$ref": "#/$defs/AuthMethodId"
                }
              ]
            },
            "name": {
              "description": "Human-readable name of the authentication method.",
              "type": "string"
            },
            "description": {
              "description": "Optional description providing more details about this authentication method.",
              "type": ["string", "null"],
              "x-deserialize-default-on-error": true
            },
            "_meta": {
              "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
              "type": ["object", "null"],
              "x-deserialize-default-on-error": true,
              "additionalProperties": true
            }
          },
          "required": ["type", "methodId", "name"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "agent"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "terminal"
                  }
                },
                "required": ["type"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "AuthMethodId": {
      "description": "Typed identifier used for auth method values on the wire.",
      "type": "string"
    },
    "EnvVariable": {
      "description": "An environment variable to set when launching a process.",
      "type": "object",
      "properties": {
        "name": {
          "description": "The name of the environment variable.",
          "type": "string"
        },
        "value": {
          "description": "The value to set for the environment variable.",
          "type": "string"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["name", "value"]
    },
    "AuthMethodTerminal": {
      "description": "Terminal-based authentication method.\n\nThe client runs the configured agent program as a separate interactive\nprocess for the user to authenticate via a TUI. Agents MUST advertise this\nmethod only when the client enabled its terminal authentication capability.\nA zero exit status signals success; any other termination signals failure.\nThe client MUST NOT pass this method to `auth/login`.",
      "type": "object",
      "properties": {
        "methodId": {
          "description": "Unique identifier for this authentication method.",
          "allOf": [
            {
              "$ref": "#/$defs/AuthMethodId"
            }
          ]
        },
        "name": {
          "description": "Human-readable name of the authentication method.",
          "type": "string"
        },
        "description": {
          "description": "Optional description providing more details about this authentication method.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "args": {
          "description": "Additional arguments to append to the configured agent invocation for terminal auth.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "env": {
          "description": "Additional environment variables to set on the configured agent invocation for terminal auth.\nNames MUST be unique. These values override same-named variables in the\nbase launch configuration.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/EnvVariable"
          }
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["methodId", "name"]
    },
    "AuthMethodAgent": {
      "description": "Agent handles authentication itself through `auth/login`.\n\nThe `type` discriminator value is `agent`.",
      "type": "object",
      "properties": {
        "methodId": {
          "description": "Unique identifier for this authentication method.",
          "allOf": [
            {
              "$ref": "#/$defs/AuthMethodId"
            }
          ]
        },
        "name": {
          "description": "Human-readable name of the authentication method.",
          "type": "string"
        },
        "description": {
          "description": "Optional description providing more details about this authentication method.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["methodId", "name"]
    },
    "LoginAuthResponse": {
      "description": "Response to the `auth/login` method.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "x-side": "agent",
      "x-method": "auth/login"
    },
    "ListProvidersResponse": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `providers/list`.",
      "type": "object",
      "properties": {
        "providers": {
          "description": "Configurable providers with current routing info suitable for UI display.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProviderInfo"
          }
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["providers"],
      "x-side": "agent",
      "x-method": "providers/list"
    },
    "ProviderInfo": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInformation about a configurable LLM provider.",
      "type": "object",
      "properties": {
        "providerId": {
          "description": "Provider identifier, for example \"main\" or \"openai\".",
          "allOf": [
            {
              "$ref": "#/$defs/ProviderId"
            }
          ]
        },
        "supported": {
          "description": "Supported protocol types for this provider.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/LlmProtocol"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "required": {
          "description": "Whether this provider is mandatory and cannot be disabled via `providers/disable`.\nIf true, clients must not call `providers/disable` for this provider ID.",
          "type": "boolean"
        },
        "current": {
          "description": "Current effective non-secret routing config.\nNull or omitted means provider is disabled.",
          "anyOf": [
            {
              "$ref": "#/$defs/ProviderCurrentConfig"
            },
            {
              "type": "null"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["providerId", "supported", "required"]
    },
    "ProviderId": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for a configurable LLM provider.",
      "type": "string"
    },
    "LlmProtocol": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWell-known API protocol identifiers for LLM providers.\n\nAgents and clients MUST handle unknown protocol identifiers gracefully.\n\nProtocol names beginning with `_` are free for custom use, like other ACP extension methods.\nProtocol names that do not begin with `_` are reserved for the ACP spec.",
      "anyOf": [
        {
          "description": "Anthropic API protocol.",
          "type": "string",
          "const": "anthropic"
        },
        {
          "description": "OpenAI API protocol.",
          "type": "string",
          "const": "openai"
        },
        {
          "description": "Azure OpenAI API protocol.",
          "type": "string",
          "const": "azure"
        },
        {
          "description": "Google Vertex AI API protocol.",
          "type": "string",
          "const": "vertex"
        },
        {
          "description": "AWS Bedrock API protocol.",
          "type": "string",
          "const": "bedrock"
        },
        {
          "title": "other",
          "description": "Custom or future protocol.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "string"
        }
      ]
    },
    "ProviderCurrentConfig": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCurrent effective non-secret routing configuration for a provider.",
      "type": "object",
      "properties": {
        "apiType": {
          "description": "Protocol currently used by this provider.",
          "allOf": [
            {
              "$ref": "#/$defs/LlmProtocol"
            }
          ]
        },
        "baseUrl": {
          "description": "Base URL currently used by this provider.",
          "type": "string",
          "format": "uri"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["apiType", "baseUrl"]
    },
    "SetProviderResponse": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `providers/set`.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "x-side": "agent",
      "x-method": "providers/set"
    },
    "DisableProviderResponse": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `providers/disable`.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "x-side": "agent",
      "x-method": "providers/disable"
    },
    "LogoutAuthResponse": {
      "description": "Response to the `auth/logout` method.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "x-side": "agent",
      "x-method": "auth/logout"
    },
    "NewSessionResponse": {
      "description": "Response from creating a new session.\n\nNew sessions default to `idle` until a state update reports otherwise.\nUpdates may arrive before or after this response. Clients MUST NOT overwrite\nan already-reported state when the response arrives.\n\nSee protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/v2/draft/session-setup#creating-a-session)",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "Unique identifier for the created session.\n\nUsed in all subsequent requests for this conversation.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "configOptions": {
          "description": "Initial session configuration options.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/SessionConfigOption"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "availableCommands": {
          "description": "Initial commands the agent can execute in this session.\n\nOptional. Omitted or empty means no initial commands are advertised.\nSenders MUST use an array, not `null`; receivers treat `null` like omission.\nLater `available_commands_update` notifications replace this list.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AvailableCommand"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId"],
      "x-side": "agent",
      "x-method": "session/new"
    },
    "SessionConfigOption": {
      "description": "A session configuration option selector and its current state.",
      "type": "object",
      "properties": {
        "configId": {
          "description": "Unique identifier for the configuration option.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionConfigId"
            }
          ]
        },
        "name": {
          "description": "Human-readable label for the option.",
          "type": "string"
        },
        "description": {
          "description": "Optional description for the Client to display to the user.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "category": {
          "description": "Optional semantic category for this option (UX only).",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionConfigOptionCategory"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["configId", "name"],
      "anyOf": [
        {
          "description": "Single-value selector (dropdown).",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "select"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/SessionConfigSelect"
            }
          ]
        },
        {
          "description": "Boolean on/off toggle.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "boolean"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/SessionConfigBoolean"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future session configuration option payload.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nClients that do not understand this option type should preserve the raw\npayload when storing, replaying, proxying, or forwarding configuration\ndata, and otherwise ignore the option or display it generically.",
          "type": "object",
          "properties": {
            "type": {
              "description": "Custom or future session configuration option type.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["type"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "select"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "boolean"
                  }
                },
                "required": ["type"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "SessionConfigId": {
      "description": "Unique identifier for a session configuration option.",
      "type": "string"
    },
    "SessionConfigOptionCategory": {
      "description": "Semantic category for a session configuration option.\n\nThis is intended to help Clients distinguish broadly common selectors (e.g. model selector vs\nsession mode selector vs thought/reasoning level) for UX purposes (keyboard shortcuts, icons,\nplacement). It MUST NOT be required for correctness. Clients MUST handle missing or unknown\ncategories gracefully.\n\nCategory names beginning with `_` are free for custom use, like other ACP extension methods.\nCategory names that do not begin with `_` are reserved for the ACP spec.",
      "anyOf": [
        {
          "description": "Session mode selector.",
          "type": "string",
          "const": "mode"
        },
        {
          "description": "Model selector.",
          "type": "string",
          "const": "model"
        },
        {
          "description": "Model-related configuration parameter.",
          "type": "string",
          "const": "model_config"
        },
        {
          "description": "Thought/reasoning level selector.",
          "type": "string",
          "const": "thought_level"
        },
        {
          "title": "other",
          "description": "Custom or future category.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "string"
        }
      ]
    },
    "SessionConfigValueId": {
      "description": "Unique identifier for a session configuration option value.",
      "type": "string"
    },
    "SessionConfigSelectOptions": {
      "description": "Possible values for a session configuration option.",
      "anyOf": [
        {
          "title": "Ungrouped",
          "description": "A flat list of options with no grouping.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/SessionConfigSelectOption"
          }
        },
        {
          "title": "Grouped",
          "description": "A list of options grouped under headers.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/SessionConfigSelectGroup"
          }
        }
      ]
    },
    "SessionConfigSelectOption": {
      "description": "A possible value for a session configuration option.",
      "type": "object",
      "properties": {
        "value": {
          "description": "Unique identifier for this option value.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionConfigValueId"
            }
          ]
        },
        "name": {
          "description": "Human-readable label for this option value.",
          "type": "string"
        },
        "description": {
          "description": "Optional description for this option value.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["value", "name"]
    },
    "SessionConfigSelectGroup": {
      "description": "A group of possible values for a session configuration option.",
      "type": "object",
      "properties": {
        "groupId": {
          "description": "Unique identifier for this group.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionConfigGroupId"
            }
          ]
        },
        "name": {
          "description": "Human-readable label for this group.",
          "type": "string"
        },
        "options": {
          "description": "The set of option values in this group.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/SessionConfigSelectOption"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["groupId", "name", "options"]
    },
    "SessionConfigGroupId": {
      "description": "Unique identifier for a session configuration option value group.",
      "type": "string"
    },
    "SessionConfigSelect": {
      "description": "A single-value selector (dropdown) session configuration option payload.",
      "type": "object",
      "properties": {
        "currentValue": {
          "description": "The currently selected value.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionConfigValueId"
            }
          ]
        },
        "options": {
          "description": "The set of selectable options.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionConfigSelectOptions"
            }
          ]
        }
      },
      "required": ["currentValue", "options"]
    },
    "SessionConfigBoolean": {
      "description": "A boolean on/off toggle session configuration option payload.",
      "type": "object",
      "properties": {
        "currentValue": {
          "description": "The current value of the boolean option.",
          "type": "boolean"
        }
      },
      "required": ["currentValue"]
    },
    "AvailableCommand": {
      "description": "Information about a command.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Command name (e.g., `create_plan`, `research_codebase`).",
          "type": "string"
        },
        "description": {
          "description": "Human-readable description of what the command does.",
          "type": "string"
        },
        "input": {
          "description": "Input for the command if required",
          "anyOf": [
            {
              "$ref": "#/$defs/AvailableCommandInput"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["name", "description"]
    },
    "AvailableCommandInput": {
      "description": "The input specification for a command.",
      "anyOf": [
        {
          "description": "All text that was typed after the command name is provided as input.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "text"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/TextCommandInput"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future command input specification.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nClients that do not understand this input type should preserve the raw\npayload when storing, replaying, proxying, or forwarding command\nmetadata, and otherwise ignore the input specification or display the\ncommand without structured input.",
          "type": "object",
          "properties": {
            "type": {
              "description": "Custom or future command input type.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["type"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "text"
                  }
                },
                "required": ["type"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "TextCommandInput": {
      "description": "All text that was typed after the command name is provided as input.",
      "type": "object",
      "properties": {
        "hint": {
          "description": "A hint to display when the input hasn't been provided yet",
          "type": "string"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["hint"]
    },
    "ListSessionsResponse": {
      "description": "Response from listing sessions.",
      "type": "object",
      "properties": {
        "sessions": {
          "description": "Array of session information objects.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/SessionInfo"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "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.",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionListCursor"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessions"],
      "x-side": "agent",
      "x-method": "session/list"
    },
    "SessionInfo": {
      "description": "Information about a session returned by session/list",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "Unique identifier for the session",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "cwd": {
          "description": "The working directory for this session. Must be an absolute path.",
          "allOf": [
            {
              "$ref": "#/$defs/AbsolutePath"
            }
          ]
        },
        "additionalDirectories": {
          "description": "Additional workspace roots reported for this session. Each path must be absolute.\n\nWhen present, this is the complete ordered additional-root list reported\nby the Agent. Omitted and empty values are equivalent: the response\nreports no additional roots.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AbsolutePath"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "title": {
          "description": "Human-readable title for the session",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "updatedAt": {
          "description": "RFC 3339 timestamp of last activity.",
          "type": ["string", "null"],
          "format": "date-time",
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId", "cwd"]
    },
    "SessionListCursor": {
      "description": "An opaque cursor used to paginate `session/list` results.",
      "type": "string"
    },
    "DeleteSessionResponse": {
      "description": "Response from deleting a session.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "x-side": "agent",
      "x-method": "session/delete"
    },
    "ForkSessionResponse": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse from forking an existing session.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "Unique identifier for the newly created forked session.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "configOptions": {
          "description": "Initial session configuration options.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/SessionConfigOption"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "availableCommands": {
          "description": "Initial commands the agent can execute in this session.\n\nOptional. Omitted or empty means no initial commands are advertised.\nSenders MUST use an array, not `null`; receivers treat `null` like omission.\nLater `available_commands_update` notifications replace this list.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AvailableCommand"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId"],
      "x-side": "agent",
      "x-method": "session/fork"
    },
    "ResumeSessionResponse": {
      "description": "Response from resuming an existing session.\n\nThe agent MUST send a current `state_update` after any requested history\nreplay and before this response, even without replay. The update reports\nforeground state after resuming. The response alone does not imply `idle`.\n\nSee protocol docs: [Current-State Synchronization](https://agentclientprotocol.com/protocol/v2/draft/session-setup#current-state-synchronization)",
      "type": "object",
      "properties": {
        "configOptions": {
          "description": "Initial session configuration options.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/SessionConfigOption"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "availableCommands": {
          "description": "Initial commands the agent can execute in this session.\n\nOptional. Omitted or empty means no initial commands are advertised.\nSenders MUST use an array, not `null`; receivers treat `null` like omission.\nLater `available_commands_update` notifications replace this list.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AvailableCommand"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "x-side": "agent",
      "x-method": "session/resume"
    },
    "CloseSessionResponse": {
      "description": "Response from closing a session.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "x-side": "agent",
      "x-method": "session/close"
    },
    "SetSessionConfigOptionResponse": {
      "description": "Response to `session/set_config_option` method.",
      "type": "object",
      "properties": {
        "configOptions": {
          "description": "The full set of configuration options and their current values.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/SessionConfigOption"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["configOptions"],
      "x-side": "agent",
      "x-method": "session/set_config_option"
    },
    "PromptResponse": {
      "description": "Response acknowledging that a user prompt was inserted into the ACP conversation.\n\nThis response does not indicate that the prompt was merely received or queued, nor that the\nagent has finished processing it.\nProcessing and completion are reported through `state_update` session updates.\n\nInsertion is the logical addition of a user message with a message ID and a position\nrelative to other messages in the ACP conversation.\n\nSee protocol docs: [Prompt Accepted](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#2-prompt-accepted)",
      "type": "object",
      "properties": {
        "messageId": {
          "description": "Identifies the user message inserted into the ACP conversation.\n\nRequired and non-null. Omission and explicit `null` are both invalid.\n\nThe corresponding user-message session update carries this same identifier and may arrive\nbefore or after this response. Agents must echo the message during the live session, but are\nnot required to retain it. If retained and replayed, the message keeps this identifier.",
          "allOf": [
            {
              "$ref": "#/$defs/MessageId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["messageId"],
      "x-side": "agent",
      "x-method": "session/prompt"
    },
    "MessageId": {
      "description": "Identifier for a message, unique among messages of the same type within a session.\n\nEach message type, such as user messages, agent messages, and agent thoughts,\nhas its own ID space: messages of different types may share an ID and remain\ndistinct messages.",
      "type": "string"
    },
    "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/v2/draft/extensibility)"
    },
    "Error": {
      "description": "JSON-RPC error object.\n\nRepresents an error that occurred during method execution, following the\nJSON-RPC 2.0 error object specification with optional additional data.\n\nSee protocol docs: [JSON-RPC Error Object](https://www.jsonrpc.org/specification#error_object)",
      "type": "object",
      "properties": {
        "code": {
          "description": "A number indicating the error type that occurred.\nThis must be an integer as defined in the JSON-RPC specification.",
          "allOf": [
            {
              "$ref": "#/$defs/ErrorCode"
            }
          ]
        },
        "message": {
          "description": "A string providing a short description of the error.\nThe message should be limited to a concise single sentence.",
          "type": "string"
        },
        "data": {
          "description": "Optional primitive or structured value that contains additional information about the error.\nThis may include debugging information or context-specific details.",
          "x-deserialize-default-on-error": true
        }
      },
      "required": ["code", "message"]
    },
    "ErrorCode": {
      "description": "Predefined error codes for common JSON-RPC and ACP-specific errors.\n\nThese codes follow the JSON-RPC 2.0 specification for standard errors\nand use the reserved range (-32000 to -32099) for protocol-specific errors.",
      "anyOf": [
        {
          "title": "Parse error",
          "description": "**Parse error**: Invalid JSON was received by the server.\nAn error occurred on the server while parsing the JSON text.",
          "type": "integer",
          "format": "int32",
          "const": -32700
        },
        {
          "title": "Invalid request",
          "description": "**Invalid request**: The JSON sent is not a valid Request object.",
          "type": "integer",
          "format": "int32",
          "const": -32600
        },
        {
          "title": "Method not found",
          "description": "**Method not found**: The method does not exist or is not available.",
          "type": "integer",
          "format": "int32",
          "const": -32601
        },
        {
          "title": "Invalid params",
          "description": "**Invalid params**: Invalid method parameter(s).",
          "type": "integer",
          "format": "int32",
          "const": -32602
        },
        {
          "title": "Internal error",
          "description": "**Internal error**: Internal JSON-RPC error.\nReserved for implementation-defined server errors.",
          "type": "integer",
          "format": "int32",
          "const": -32603
        },
        {
          "title": "Request cancelled",
          "description": "**Request cancelled**: Execution of the method was aborted either due to a cancellation request from the caller or\nbecause of resource constraints or shutdown.",
          "type": "integer",
          "format": "int32",
          "const": -32800
        },
        {
          "title": "Authentication required",
          "description": "**Authentication required**: Authentication is required before this operation can be performed.",
          "type": "integer",
          "format": "int32",
          "const": -32000
        },
        {
          "title": "Resource not found",
          "description": "**Resource not found**: A given resource, such as a file, was not found.",
          "type": "integer",
          "format": "int32",
          "const": -32002
        },
        {
          "title": "Other",
          "description": "Other undefined error code.",
          "type": "integer",
          "format": "int32"
        }
      ]
    },
    "AgentNotification": {
      "description": "A JSON-RPC notification object.",
      "type": "object",
      "properties": {
        "method": {
          "description": "The notification method name.",
          "type": "string"
        },
        "params": {
          "description": "Method-specific notification parameters.",
          "anyOf": [
            {
              "description": "All possible notifications that an agent can send to a client.\n\nThis enum is used internally for routing RPC notifications. You typically won't need\nto use this directly.\n\nNotifications do not expect a response.",
              "anyOf": [
                {
                  "title": "UpdateSessionNotification",
                  "description": "Handles session update notifications from the agent.\n\nThis is a notification endpoint (no response expected) that receives\nupdates about session activity, including message updates, 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 reporting an idle `state_update` with the cancelled\nstop reason.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#3-agent-reports-output)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/UpdateSessionNotification"
                    }
                  ]
                },
                {
                  "title": "CompleteElicitationNotification",
                  "description": "Notification that a URL-based elicitation has completed.\n\nSee protocol docs: [Elicitation](https://agentclientprotocol.com/protocol/v2/draft/elicitation#url-completion)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/CompleteElicitationNotification"
                    }
                  ]
                },
                {
                  "title": "ExtNotification",
                  "description": "Handles extension notifications from the agent.\n\nAllows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ExtNotification"
                    }
                  ]
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["method"],
      "x-docs-ignore": true
    },
    "UpdateSessionNotification": {
      "description": "Notification containing a session update from the agent.\n\nAgents can send session updates at any point while the session exists.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#3-agent-reports-output)",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The ID of the session this update pertains to.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "update": {
          "description": "The actual update content.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionUpdate"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId", "update"],
      "x-side": "client",
      "x-method": "session/update"
    },
    "SessionUpdate": {
      "description": "Different types of updates that can be sent while a session exists.\n\nThese updates report messages, progress, and other session activity.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#3-agent-reports-output)",
      "anyOf": [
        {
          "description": "A chunk of the user's message being streamed.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "user_message_chunk"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/ContentChunk"
            }
          ]
        },
        {
          "description": "A user message has been created or updated.\n\nAgents can send this when they accept or replay a user message. When a\nclient receives another `user_message` update with the same `messageId`,\nfields in the new update patch the previous fields for that message.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "user_message"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/UserMessage"
            }
          ]
        },
        {
          "description": "A chunk of the agent's response being streamed.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "agent_message_chunk"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/ContentChunk"
            }
          ]
        },
        {
          "description": "An agent message has been created or updated.\n\nAgents can send this in addition to streamed chunks. When a client\nreceives another `agent_message` update with the same `messageId`,\nfields in the new update patch the previous fields for that message.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "agent_message"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/AgentMessage"
            }
          ]
        },
        {
          "description": "A chunk of the agent's internal reasoning being streamed.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "agent_thought_chunk"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/ContentChunk"
            }
          ]
        },
        {
          "description": "An agent thought or reasoning message has been created or updated.\n\nAgents can send this in addition to streamed chunks. When a client\nreceives another `agent_thought` update with the same `messageId`,\nfields in the new update patch the previous fields for that message.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "agent_thought"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/AgentThought"
            }
          ]
        },
        {
          "description": "A snapshot of the session's aggregate foreground activity.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "state_update"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/StateUpdate"
            }
          ]
        },
        {
          "description": "A chunk of tool-call content being streamed.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "tool_call_content_chunk"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/ToolCallContentChunk"
            }
          ]
        },
        {
          "description": "A tool call has been created or updated.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "tool_call_update"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/ToolCallUpdate"
            }
          ]
        },
        {
          "description": "An agent-owned terminal has been created or updated.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "terminal_update"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/TerminalUpdate"
            }
          ]
        },
        {
          "description": "A chunk of bytes appended to an agent-owned terminal's output.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "terminal_output_chunk"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/TerminalOutputChunk"
            }
          ]
        },
        {
          "description": "A content update for a plan identified by ID.\nSee protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/v2/draft/agent-plan)",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "plan_update"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/PlanUpdate"
            }
          ]
        },
        {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRemoval notice for a plan identified by ID.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "plan_removed"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/PlanRemoved"
            }
          ]
        },
        {
          "description": "Available commands are ready or have changed",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "available_commands_update"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/AvailableCommandsUpdate"
            }
          ]
        },
        {
          "description": "Session configuration options have been updated.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "config_option_update"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/ConfigOptionUpdate"
            }
          ]
        },
        {
          "description": "Session metadata has been updated (title, timestamps, custom metadata)",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "session_info_update"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/SessionInfoUpdate"
            }
          ]
        },
        {
          "description": "Context window and cost update for the session.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "usage_update"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/UsageUpdate"
            }
          ]
        },
        {
          "description": "Information for the user that is not part of session history.\n\nNo Client capability is required. Clients that do not understand or\npresent notices may ignore them.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "notice"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/Notice"
            }
          ]
        },
        {
          "description": "A context compaction has been created or updated.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "compaction_update"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/CompactionUpdate"
            }
          ]
        },
        {
          "description": "A content block appended to a context compaction's retained summary.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "compaction_summary_chunk"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/CompactionSummaryChunk"
            }
          ]
        },
        {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAnnounces a child session created and owned by this session, or updates\nthat ownership association's metadata.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "subagent_update"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/SubagentUpdate"
            }
          ]
        },
        {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA message upsert observed in this session's transcript, sent to or\nreceived from another session.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "session_message"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/SessionMessage"
            }
          ]
        },
        {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nOne content block appended to a sent or received session message.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "type": "string",
              "const": "session_message_chunk"
            }
          },
          "required": ["sessionUpdate"],
          "allOf": [
            {
              "$ref": "#/$defs/SessionMessageChunk"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future session update.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nReceivers that do not understand this update type should preserve the\nraw payload when storing, replaying, proxying, or forwarding session\nhistory, and otherwise ignore it or display it generically.",
          "type": "object",
          "properties": {
            "sessionUpdate": {
              "description": "Custom or future session update type.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["sessionUpdate"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "user_message_chunk"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "user_message"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "agent_message_chunk"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "agent_message"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "agent_thought_chunk"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "agent_thought"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "state_update"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "tool_call_content_chunk"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "tool_call_update"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "terminal_update"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "terminal_output_chunk"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "plan_update"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "available_commands_update"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "config_option_update"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "session_info_update"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "plan_removed"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "usage_update"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "notice"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "compaction_update"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "compaction_summary_chunk"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "subagent_update"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "session_message"
                  }
                },
                "required": ["sessionUpdate"]
              },
              {
                "type": "object",
                "properties": {
                  "sessionUpdate": {
                    "type": "string",
                    "const": "session_message_chunk"
                  }
                },
                "required": ["sessionUpdate"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "ContentChunk": {
      "description": "A streamed item of message content.",
      "type": "object",
      "properties": {
        "messageId": {
          "description": "A unique identifier for the message this chunk belongs to.\n\nAll chunks belonging to the same message share the same `messageId`.\nA change in `messageId` indicates a new message has started.",
          "allOf": [
            {
              "$ref": "#/$defs/MessageId"
            }
          ]
        },
        "content": {
          "description": "A single item of content",
          "allOf": [
            {
              "$ref": "#/$defs/ContentBlock"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys. This field is chunk-scoped.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["messageId", "content"]
    },
    "UserMessage": {
      "description": "A user message upsert.\n\nOnly [`UserMessage::message_id`] is required. `content` has patch semantics:\nan omitted field leaves existing message content unchanged, `null` clears the\nvalue, and a concrete array replaces the previous value. For a new\n`messageId`, omitted fields use client defaults. `content` is replaced as a\nwhole array; send `[]` or `null` to clear it.\n\nMessage updates and chunks are applied in the order they are received. When\na `user_message` update includes `content`, that array replaces any content\npreviously accumulated for the message, including content from earlier\nchunks. Later chunks with the same `messageId` append to the current\ncontent.",
      "type": "object",
      "properties": {
        "messageId": {
          "description": "A unique identifier for the message.",
          "allOf": [
            {
              "$ref": "#/$defs/MessageId"
            }
          ]
        },
        "content": {
          "description": "Complete replacement content for this message.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/ContentBlock"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted leaves the stored metadata unchanged; `null`\nclears it. An object patches the stored metadata by top-level key: keys it omits are\nunchanged, a key set to `null` is removed, and any other value replaces that key's\nstored value without merging nested objects. Beyond this patch rule, implementations\nMUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Metadata Patches](https://agentclientprotocol.com/protocol/v2/draft/extensibility#metadata-patches)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["messageId"]
    },
    "AgentMessage": {
      "description": "An agent message upsert.\n\nOnly [`AgentMessage::message_id`] is required. `content` has patch semantics:\nan omitted field leaves existing message content unchanged, `null` clears the\nvalue, and a concrete array replaces the previous value. For a new\n`messageId`, omitted fields use client defaults. `content` is replaced as a\nwhole array; send `[]` or `null` to clear it.\n\nMessage updates and chunks are applied in the order they are received. When\nan `agent_message` update includes `content`, that array replaces any\ncontent previously accumulated for the message, including content from\nearlier chunks. Later chunks with the same `messageId` append to the current\ncontent.",
      "type": "object",
      "properties": {
        "messageId": {
          "description": "A unique identifier for the message.",
          "allOf": [
            {
              "$ref": "#/$defs/MessageId"
            }
          ]
        },
        "content": {
          "description": "Complete replacement content for this message.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/ContentBlock"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted leaves the stored metadata unchanged; `null`\nclears it. An object patches the stored metadata by top-level key: keys it omits are\nunchanged, a key set to `null` is removed, and any other value replaces that key's\nstored value without merging nested objects. Beyond this patch rule, implementations\nMUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Metadata Patches](https://agentclientprotocol.com/protocol/v2/draft/extensibility#metadata-patches)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["messageId"]
    },
    "AgentThought": {
      "description": "An agent thought or reasoning message upsert.\n\nOnly [`AgentThought::message_id`] is required. `content` has patch semantics:\nan omitted field leaves existing thought content unchanged, `null` clears the\nvalue, and a concrete array replaces the previous value. For a new\n`messageId`, omitted fields use client defaults. `content` is replaced as a\nwhole array; send `[]` or `null` to clear it.\n\nMessage updates and chunks are applied in the order they are received. When\nan `agent_thought` update includes `content`, that array replaces any\ncontent previously accumulated for the thought, including content from\nearlier chunks. Later chunks with the same `messageId` append to the current\ncontent.",
      "type": "object",
      "properties": {
        "messageId": {
          "description": "A unique identifier for the thought message.",
          "allOf": [
            {
              "$ref": "#/$defs/MessageId"
            }
          ]
        },
        "content": {
          "description": "Complete replacement content for this thought message.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/ContentBlock"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted leaves the stored metadata unchanged; `null`\nclears it. An object patches the stored metadata by top-level key: keys it omits are\nunchanged, a key set to `null` is removed, and any other value replaces that key's\nstored value without merging nested objects. Beyond this patch rule, implementations\nMUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Metadata Patches](https://agentclientprotocol.com/protocol/v2/draft/extensibility#metadata-patches)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["messageId"]
    },
    "RunningStateUpdate": {
      "description": "Foreground work is in progress.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "ErrorStopReason": {
      "description": "Details of a failure that ended active work.",
      "type": "object",
      "properties": {
        "error": {
          "description": "The failure, as a JSON-RPC error object.\n\nOptional. Omitted or `null` both mean the agent is not reporting failure details.\nAgents SHOULD include it.",
          "anyOf": [
            {
              "$ref": "#/$defs/Error"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        }
      }
    },
    "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 completed session work.",
      "type": "object",
      "properties": {
        "totalTokens": {
          "description": "Sum of all token types across session.",
          "type": "integer",
          "format": "uint64",
          "minimum": 0
        },
        "inputTokens": {
          "description": "Total input tokens.",
          "type": "integer",
          "format": "uint64",
          "minimum": 0
        },
        "outputTokens": {
          "description": "Total output tokens.",
          "type": "integer",
          "format": "uint64",
          "minimum": 0
        },
        "thoughtTokens": {
          "description": "Total thought/reasoning tokens",
          "type": ["integer", "null"],
          "format": "uint64",
          "minimum": 0,
          "x-deserialize-default-on-error": true
        },
        "cachedReadTokens": {
          "description": "Total cache read tokens.",
          "type": ["integer", "null"],
          "format": "uint64",
          "minimum": 0,
          "x-deserialize-default-on-error": true
        },
        "cachedWriteTokens": {
          "description": "Total cache write tokens.",
          "type": ["integer", "null"],
          "format": "uint64",
          "minimum": 0,
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["totalTokens", "inputTokens", "outputTokens"]
    },
    "IdleStateUpdate": {
      "description": "No foreground work is active. Background activity may continue.\n\nAgents SHOULD include a `stopReason` when the idle transition ends foreground\nwork. An idle update that does not end foreground work need not include one.\nReceivers treat an omitted, `null`, or malformed `stopReason` as the agent not\nreporting one.\nRepeated or resume snapshots may carry the last stop reason for context.\nThey MUST NOT be counted as new completions, cancellations, or additional usage.",
      "type": "object",
      "properties": {
        "usage": {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nToken usage for completed foreground work.\n\nOptional. Omitted or `null` both mean the agent is not reporting token\nusage for this state update.",
          "anyOf": [
            {
              "$ref": "#/$defs/Usage"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        },
        "stopReason": {
          "description": "Why foreground work stopped. The value selects one of this type's variants, which may add fields of their own.\n\nOptional. Omitted or `null` both mean the agent is not reporting a stop reason; a malformed value is treated the same way.\n\nSee protocol docs: [Stop Reasons](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#stop-reasons)",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        }
      },
      "anyOf": [
        {
          "description": "The active work ended successfully.\nIncludes locally handled commands that required no model call.",
          "type": "object",
          "properties": {
            "stopReason": {
              "type": "string",
              "const": "end_turn"
            }
          },
          "required": ["stopReason"]
        },
        {
          "description": "The active work ended because the agent reached the maximum number of tokens.",
          "type": "object",
          "properties": {
            "stopReason": {
              "type": "string",
              "const": "max_tokens"
            }
          },
          "required": ["stopReason"]
        },
        {
          "description": "The active work ended because the agent reached the maximum number of\nallowed agent requests before returning idle.",
          "type": "object",
          "properties": {
            "stopReason": {
              "type": "string",
              "const": "max_turn_requests"
            }
          },
          "required": ["stopReason"]
        },
        {
          "description": "The active work ended because the agent refused to continue. The user\nprompt and everything that comes after it won't be included in the next\nprompt, so this should be reflected in the UI.",
          "type": "object",
          "properties": {
            "stopReason": {
              "type": "string",
              "const": "refusal"
            }
          },
          "required": ["stopReason"]
        },
        {
          "description": "Active session work was cancelled by the client via `session/cancel`.\n\nAgents MUST report this stop reason on an idle `state_update` when\ncancellation ends active foreground work, even if aborting causes\nexceptions. Agents MUST catch these errors and report `cancelled`, not\n`error`.",
          "type": "object",
          "properties": {
            "stopReason": {
              "type": "string",
              "const": "cancelled"
            }
          },
          "required": ["stopReason"]
        },
        {
          "description": "The active work ended because something failed.\n\nThis includes pre-insertion foreground work. A prompt failure before\ninsertion also requires an error response to `session/prompt`; after\ninsertion, the prompt's response remains successful.",
          "type": "object",
          "properties": {
            "stopReason": {
              "type": "string",
              "const": "error"
            }
          },
          "required": ["stopReason"],
          "allOf": [
            {
              "$ref": "#/$defs/ErrorStopReason"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future stop reason.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "object",
          "properties": {
            "stopReason": {
              "description": "Custom or future stop reason.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["stopReason"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "stopReason": {
                    "type": "string",
                    "const": "end_turn"
                  }
                },
                "required": ["stopReason"]
              },
              {
                "type": "object",
                "properties": {
                  "stopReason": {
                    "type": "string",
                    "const": "max_tokens"
                  }
                },
                "required": ["stopReason"]
              },
              {
                "type": "object",
                "properties": {
                  "stopReason": {
                    "type": "string",
                    "const": "max_turn_requests"
                  }
                },
                "required": ["stopReason"]
              },
              {
                "type": "object",
                "properties": {
                  "stopReason": {
                    "type": "string",
                    "const": "refusal"
                  }
                },
                "required": ["stopReason"]
              },
              {
                "type": "object",
                "properties": {
                  "stopReason": {
                    "type": "string",
                    "const": "cancelled"
                  }
                },
                "required": ["stopReason"]
              },
              {
                "type": "object",
                "properties": {
                  "stopReason": {
                    "type": "string",
                    "const": "error"
                  }
                },
                "required": ["stopReason"]
              }
            ]
          },
          "additionalProperties": true
        },
        {
          "title": "none",
          "description": "No stop reason: `stopReason` is omitted or `null`.",
          "type": "object",
          "properties": {
            "stopReason": {
              "type": "null"
            }
          }
        }
      ]
    },
    "RequiresActionStateUpdate": {
      "description": "The foreground workflow as a whole is blocked on user action.\n\nAgents SHOULD report this state when foreground work cannot progress without\nuser action. Pending permissions or elicitations alone do not imply this\nstate if other foreground work can progress, or if the requests belong only\nto independent background activity. Once reported, agents MUST report\n`running` when progress resumes, or `idle` if the work ends without resuming.\nResponding to one request does not itself imply `running`.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "UnknownStateUpdate": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe Agent cannot currently determine foreground activity.\n\nReport this when activity becomes unobservable, not merely because the session\nhas been quiet. The Client MUST stop presenting the previous state as confirmed\ncurrent activity, but may retain it as last known. A later state replaces this\nsnapshot normally.\n\nThis is not a task outcome or session closure. It does not cancel work, resolve\npending requests, or revoke capabilities; capabilities are updated separately.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP for additional metadata.\nImplementations MUST NOT make assumptions about values at these keys.\nOptional; omitted and `null` mean no metadata for this state snapshot.",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "StateUpdate": {
      "description": "A snapshot of the session's aggregate foreground activity.\n\nForeground work is the agent's active response or workflow in the session,\nincluding model processing, tool execution, and waiting for user action needed\nto continue that work. It can start with a prompt or be agent-initiated, for\nexample to pursue an ongoing goal or follow up on a completed background task.\nEither way, the agent MUST report `running` when foreground work starts,\nor `requires_action` if it starts blocked on user action, and `idle` when it\nends. The agent SHOULD include a stop reason on that idle update.\nAgent-initiated work does not require a prompt request or a synthetic user\nmessage.\n\n`running` may precede user-message insertion, for example during a foreground\nhook. It is not acknowledgment of insertion, and rejecting a prompt does not\nitself end foreground work.\n\nBackground activity can continue and emit other `session/update` notifications\nwhile `idle`. Those notifications, including a detached task's progress or\ncompletion, do not by themselves change this state. A permission request only\nwarrants `requires_action` when foreground work is blocked on user action.\n\nThe agent SHOULD report `requires_action` when the foreground workflow as a\nwhole cannot progress without user action, including permissions or elicitations.\nOnce reported, it MUST report `running` when progress resumes, or `idle` when\nwork ends without resuming.\nIf other foreground work can progress, the state remains `running`. Resolving\none of several requests does not itself change the state. Agents SHOULD ignore\nresponses for work that has already ended rather than use them to resume it.\n\nA new session defaults to idle until a state update reports otherwise.\nResume MUST send a current-state snapshot after any replay and before its\nresponse. The snapshot reports foreground state after resuming.\nThe response alone does not imply idle.\nRepeated snapshots are idempotent, not additional work, completions, or usage.\nA repeated state may carry updated information without another state transition.\nThe agent MUST report `idle` when no foreground activity remains. Completing\nan individual activity while other foreground work continues does not require\nan idle boundary. Local commands use the same lifecycle even without model work.\n\nSee protocol docs: [Session States](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#session-states)",
      "anyOf": [
        {
          "description": "Foreground work is in progress.",
          "type": "object",
          "properties": {
            "state": {
              "type": "string",
              "const": "running"
            }
          },
          "required": ["state"],
          "allOf": [
            {
              "$ref": "#/$defs/RunningStateUpdate"
            }
          ]
        },
        {
          "description": "No foreground work is active. Background activity may continue.",
          "type": "object",
          "properties": {
            "state": {
              "type": "string",
              "const": "idle"
            }
          },
          "required": ["state"],
          "allOf": [
            {
              "$ref": "#/$defs/IdleStateUpdate"
            }
          ]
        },
        {
          "description": "Foreground work is blocked on user action.",
          "type": "object",
          "properties": {
            "state": {
              "type": "string",
              "const": "requires_action"
            }
          },
          "required": ["state"],
          "allOf": [
            {
              "$ref": "#/$defs/RequiresActionStateUpdate"
            }
          ]
        },
        {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe Agent cannot currently determine foreground activity.\nThis replaces previously confirmed activity without ending the work or session.",
          "type": "object",
          "properties": {
            "state": {
              "type": "string",
              "const": "unknown"
            }
          },
          "required": ["state"],
          "allOf": [
            {
              "$ref": "#/$defs/UnknownStateUpdate"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future session state.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "object",
          "properties": {
            "state": {
              "description": "Custom or future session state.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["state"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "const": "running"
                  }
                },
                "required": ["state"]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "const": "idle"
                  }
                },
                "required": ["state"]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "const": "requires_action"
                  }
                },
                "required": ["state"]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "const": "unknown"
                  }
                },
                "required": ["state"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "ToolCallContentChunk": {
      "description": "A streamed item of tool-call content.\n\nTool-call content chunks append one [`ToolCallContent`] item to the current\ncontent for the matching [`ToolCallId`]. Agents can use\n[`ToolCallUpdate::content`] when they need to replace the whole content\ncollection instead.",
      "type": "object",
      "properties": {
        "toolCallId": {
          "description": "The ID of the tool call this content belongs to.",
          "allOf": [
            {
              "$ref": "#/$defs/ToolCallId"
            }
          ]
        },
        "content": {
          "description": "A single item of content produced by the tool call.",
          "allOf": [
            {
              "$ref": "#/$defs/ToolCallContent"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys. This field is chunk-scoped.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["toolCallId", "content"]
    },
    "TerminalOutput": {
      "description": "An authoritative replacement snapshot of terminal output bytes.",
      "type": "object",
      "properties": {
        "data": {
          "description": "Base64-encoded replacement terminal output bytes.",
          "type": "string",
          "contentEncoding": "base64"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys. This metadata is scoped to the replacement snapshot. Omitted\nand `null` are equivalent and mean no snapshot metadata was provided.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["data"]
    },
    "TerminalExitStatus": {
      "description": "Exit information for an agent-owned terminal.\n\nThe presence of this object marks the terminal as exited, even when neither\nan exit code nor a signal is known.",
      "type": "object",
      "properties": {
        "exitCode": {
          "description": "Process exit code, when known. Omitted and `null` are equivalent.",
          "type": ["integer", "null"],
          "format": "uint32",
          "minimum": 0,
          "x-deserialize-default-on-error": true
        },
        "signal": {
          "description": "Signal that terminated the process, when known.\n\nAgents should use the conventional platform signal name. POSIX examples\ninclude `SIGTERM`, `SIGKILL`, and `SIGINT`. Other platforms may use a\nplatform-specific name. Omitted and `null` are equivalent.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys. This metadata is scoped to the exit information. Omitted\nand `null` are equivalent and mean no exit metadata was provided.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "TerminalUpdate": {
      "description": "An upsert for the stored state of an agent-owned terminal.\n\nOnly [`TerminalUpdate::terminal_id`] is required. Other fields have patch\nsemantics: omitted fields leave the stored value unchanged, `null` clears\nit, and concrete values replace it. A concrete `_meta` object instead\npatches the stored metadata by top-level key. When the terminal ID is new,\nomitted fields start unknown.",
      "type": "object",
      "properties": {
        "terminalId": {
          "description": "Unique identifier for this terminal within the session.",
          "allOf": [
            {
              "$ref": "#/$defs/TerminalId"
            }
          ]
        },
        "command": {
          "description": "The command being run.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "cwd": {
          "description": "The absolute working directory of the command.",
          "anyOf": [
            {
              "$ref": "#/$defs/AbsolutePath"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "output": {
          "description": "An authoritative replacement snapshot of terminal output bytes.",
          "anyOf": [
            {
              "$ref": "#/$defs/TerminalOutput"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "exitStatus": {
          "description": "Exit information. A concrete object marks the terminal as exited.",
          "anyOf": [
            {
              "$ref": "#/$defs/TerminalExitStatus"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted leaves the stored metadata unchanged; `null`\nclears it. An object patches the stored metadata by top-level key: keys it omits are\nunchanged, a key set to `null` is removed, and any other value replaces that key's\nstored value without merging nested objects. Beyond this patch rule, implementations\nMUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Metadata Patches](https://agentclientprotocol.com/protocol/v2/draft/extensibility#metadata-patches)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["terminalId"]
    },
    "TerminalOutputChunk": {
      "description": "A chunk of bytes appended to an agent-owned terminal's output.",
      "type": "object",
      "properties": {
        "terminalId": {
          "description": "The terminal receiving these bytes.",
          "allOf": [
            {
              "$ref": "#/$defs/TerminalId"
            }
          ]
        },
        "data": {
          "description": "Independently base64-encoded terminal output bytes.",
          "type": "string",
          "contentEncoding": "base64"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys. This field is chunk-scoped. Omitted and `null` are\nequivalent and mean no chunk metadata was provided.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["terminalId", "data"]
    },
    "PlanUpdateContent": {
      "description": "Updated content for a plan.",
      "anyOf": [
        {
          "description": "Structured plan entries.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "items"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/PlanItems"
            }
          ]
        },
        {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA URI pointing to a file containing the plan.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "file"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/PlanFile"
            }
          ]
        },
        {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRaw markdown content for the plan.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "markdown"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/PlanMarkdown"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future plan update content.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nReceivers that do not understand this content type should preserve the\nraw payload when storing, replaying, proxying, or forwarding plans, and\notherwise ignore it or display it generically.",
          "type": "object",
          "properties": {
            "type": {
              "description": "Custom or future plan update content type.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            },
            "planId": {
              "description": "The plan ID to update.",
              "allOf": [
                {
                  "$ref": "#/$defs/PlanId"
                }
              ]
            }
          },
          "required": ["type", "planId"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "items"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "file"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "markdown"
                  }
                },
                "required": ["type"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "PlanId": {
      "description": "Unique identifier for a plan within a session.",
      "type": "string"
    },
    "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/v2/draft/agent-plan#plan-entries)",
      "type": "object",
      "properties": {
        "content": {
          "description": "Human-readable description of what this task aims to accomplish.",
          "type": "string"
        },
        "priority": {
          "description": "The relative importance of this task.\nUsed to indicate which tasks are most critical to the overall goal.",
          "allOf": [
            {
              "$ref": "#/$defs/PlanEntryPriority"
            }
          ]
        },
        "status": {
          "description": "Current execution status of this task.",
          "allOf": [
            {
              "$ref": "#/$defs/PlanEntryStatus"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["content", "priority", "status"]
    },
    "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/v2/draft/agent-plan#plan-entries)",
      "anyOf": [
        {
          "description": "High priority task - critical to the overall goal.",
          "type": "string",
          "const": "high"
        },
        {
          "description": "Medium priority task - important but not critical.",
          "type": "string",
          "const": "medium"
        },
        {
          "description": "Low priority task - nice to have but not essential.",
          "type": "string",
          "const": "low"
        },
        {
          "title": "other",
          "description": "Custom or future plan entry priority.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "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/v2/draft/agent-plan#plan-entries)",
      "anyOf": [
        {
          "description": "The task has not started yet.",
          "type": "string",
          "const": "pending"
        },
        {
          "description": "The task is currently being worked on.",
          "type": "string",
          "const": "in_progress"
        },
        {
          "description": "The task has been successfully completed.",
          "type": "string",
          "const": "completed"
        },
        {
          "description": "The task was cancelled before it completed.",
          "type": "string",
          "const": "cancelled"
        },
        {
          "title": "other",
          "description": "Custom or future plan entry status.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "string"
        }
      ]
    },
    "PlanItems": {
      "description": "A plan represented as structured entries.",
      "type": "object",
      "properties": {
        "planId": {
          "description": "The plan ID to update.",
          "allOf": [
            {
              "$ref": "#/$defs/PlanId"
            }
          ]
        },
        "entries": {
          "description": "The list of tasks to be accomplished.\n\nWhen updating an item-based plan, the agent must send a complete list of all entries\nwith their current status. The client replaces that plan with each update.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/PlanEntry"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["planId", "entries"]
    },
    "PlanFile": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA plan represented by a file URI.",
      "type": "object",
      "properties": {
        "planId": {
          "description": "The plan ID to update.",
          "allOf": [
            {
              "$ref": "#/$defs/PlanId"
            }
          ]
        },
        "uri": {
          "description": "The URI of the file containing the plan.",
          "type": "string",
          "format": "uri"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["planId", "uri"]
    },
    "PlanMarkdown": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA plan represented as raw markdown content.",
      "type": "object",
      "properties": {
        "planId": {
          "description": "The plan ID to update.",
          "allOf": [
            {
              "$ref": "#/$defs/PlanId"
            }
          ]
        },
        "content": {
          "description": "Markdown content for the plan.",
          "type": "string"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["planId", "content"]
    },
    "PlanUpdate": {
      "description": "A content update for a plan identified by ID.",
      "type": "object",
      "properties": {
        "plan": {
          "description": "The updated plan content.",
          "allOf": [
            {
              "$ref": "#/$defs/PlanUpdateContent"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["plan"]
    },
    "PlanRemoved": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRemoval notice for a plan identified by ID.",
      "type": "object",
      "properties": {
        "planId": {
          "description": "The plan ID to remove.",
          "allOf": [
            {
              "$ref": "#/$defs/PlanId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["planId"]
    },
    "AvailableCommandsUpdate": {
      "description": "Available commands are ready or have changed",
      "type": "object",
      "properties": {
        "availableCommands": {
          "description": "Commands the agent can execute.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AvailableCommand"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["availableCommands"]
    },
    "ConfigOptionUpdate": {
      "description": "Session configuration options have been updated.",
      "type": "object",
      "properties": {
        "configOptions": {
          "description": "The full set of configuration options and their current values.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/SessionConfigOption"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["configOptions"]
    },
    "SessionInfoUpdate": {
      "description": "Update to session metadata. All fields are optional to support partial updates.\n\nAgents send this notification to update session information like title or custom metadata.\nThis allows clients to display dynamic session names and track session state changes.\n\nOmitted fields leave the existing session info unchanged. `null` clears the\ncorresponding value. A concrete `_meta` object patches the stored metadata by\ntop-level key.",
      "type": "object",
      "properties": {
        "title": {
          "description": "Human-readable title for the session. Set to null to clear.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "updatedAt": {
          "description": "RFC 3339 timestamp of last activity. Set to null to clear.",
          "type": ["string", "null"],
          "format": "date-time",
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted leaves the stored metadata unchanged; `null`\nclears it. An object patches the stored metadata by top-level key: keys it omits are\nunchanged, a key set to `null` is removed, and any other value replaces that key's\nstored value without merging nested objects. Beyond this patch rule, implementations\nMUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Metadata Patches](https://agentclientprotocol.com/protocol/v2/draft/extensibility#metadata-patches)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "Cost": {
      "description": "Cost information for a session.",
      "type": "object",
      "properties": {
        "amount": {
          "description": "Total cumulative cost for session.",
          "type": "number",
          "format": "double"
        },
        "currency": {
          "description": "ISO 4217 currency code (e.g., \"USD\", \"EUR\").",
          "type": "string",
          "pattern": "^[A-Z]{3}$"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["amount", "currency"]
    },
    "UsageUpdate": {
      "description": "Context window and cost update for a session.",
      "type": "object",
      "properties": {
        "used": {
          "description": "Tokens currently in context.",
          "type": "integer",
          "format": "uint64",
          "minimum": 0
        },
        "size": {
          "description": "Total context window size in tokens.",
          "type": "integer",
          "format": "uint64",
          "minimum": 0
        },
        "cost": {
          "description": "Cumulative session cost (optional).",
          "anyOf": [
            {
              "$ref": "#/$defs/Cost"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["used", "size"]
    },
    "NoticeSeverity": {
      "description": "Severity hint for a session notice.",
      "anyOf": [
        {
          "description": "Informational notice.",
          "type": "string",
          "const": "info"
        },
        {
          "description": "Warning notice.",
          "type": "string",
          "const": "warning"
        },
        {
          "description": "Error notice.",
          "type": "string",
          "const": "error"
        },
        {
          "title": "other",
          "description": "Custom or future notice severity.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Other unknown values are reserved for future ACP severities.",
          "type": "string"
        }
      ]
    },
    "Notice": {
      "description": "Fire-and-forget information for the user.\n\nNotices are live events rather than session history. Agents must not rely on\na notice being received, displayed, or seen by the user.\nNo Client capability is required, and unsupported Clients may ignore notices.\n\nSee RFD: [Session Notices](https://agentclientprotocol.com/rfds/session-notices)",
      "type": "object",
      "properties": {
        "severity": {
          "description": "Presentation severity hint.",
          "allOf": [
            {
              "$ref": "#/$defs/NoticeSeverity"
            }
          ]
        },
        "title": {
          "description": "Required non-empty plain-text title that can stand alone.",
          "type": "string",
          "minLength": 1
        },
        "description": {
          "description": "Optional plain-text detail or guidance.\n\nOmitted and `null` are equivalent and mean no description was supplied.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "Metadata scoped to this notice.\n\nOmitted and `null` are equivalent and mean no metadata was supplied.",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["severity", "title"]
    },
    "CompactionId": {
      "description": "Unique identifier for a context compaction within a session.",
      "type": "string"
    },
    "CompactionStatus": {
      "description": "Lifecycle state of a context compaction.",
      "anyOf": [
        {
          "description": "Compaction has started and has not finished.",
          "type": "string",
          "const": "in_progress"
        },
        {
          "description": "Compaction finished successfully.",
          "type": "string",
          "const": "completed"
        },
        {
          "description": "Compaction finished unsuccessfully.",
          "type": "string",
          "const": "failed"
        },
        {
          "description": "Compaction was cancelled before it finished.",
          "type": "string",
          "const": "cancelled"
        },
        {
          "title": "other",
          "description": "Custom or future compaction status.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Other unknown values are reserved for future ACP statuses.",
          "type": "string"
        }
      ]
    },
    "CompactionUpdate": {
      "description": "A context compaction upsert. The first notification fixes the compaction's\ntimeline position. Later updates with the same ID patch that entity in place.\n\n`summary`, `error`, and `_meta` have patch semantics: omission leaves the\nstored value unchanged, `null` clears it, and a concrete value replaces it.\n`summary: []` also clears the summary. A concrete `_meta` object patches the\nstored metadata by top-level key instead of replacing it.",
      "type": "object",
      "properties": {
        "compactionId": {
          "description": "The Agent-owned ID of this compaction, unique within the session.",
          "allOf": [
            {
              "$ref": "#/$defs/CompactionId"
            }
          ]
        },
        "status": {
          "description": "Current lifecycle status.",
          "allOf": [
            {
              "$ref": "#/$defs/CompactionStatus"
            }
          ]
        },
        "summary": {
          "description": "Complete replacement user-displayable summary content for the compaction.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/ContentBlock"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "error": {
          "description": "Human-readable error details for the compaction.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted leaves the stored metadata unchanged; `null`\nclears it. An object patches the stored metadata by top-level key: keys it omits are\nunchanged, a key set to `null` is removed, and any other value replaces that key's\nstored value without merging nested objects. Beyond this patch rule, implementations\nMUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Metadata Patches](https://agentclientprotocol.com/protocol/v2/draft/extensibility#metadata-patches)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["compactionId", "status"]
    },
    "CompactionSummaryChunk": {
      "description": "A content block appended to a compaction's summary. A first-seen ID creates\nan in-progress compaction. Chunks append in receive order.",
      "type": "object",
      "properties": {
        "compactionId": {
          "description": "ID of the compaction whose summary receives this content.",
          "allOf": [
            {
              "$ref": "#/$defs/CompactionId"
            }
          ]
        },
        "content": {
          "description": "One content block to append.",
          "allOf": [
            {
              "$ref": "#/$defs/ContentBlock"
            }
          ]
        },
        "_meta": {
          "description": "Metadata scoped to this chunk. Omission and `null` both mean absent.",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["compactionId", "content"]
    },
    "SubagentSessionCapabilities": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nClient-initiated session mutations permitted for a specific subagent session.\n\nA mutation requires an explicit per-child capability; support for the method\non ordinary sessions does not grant support on a child.",
      "type": "object",
      "properties": {
        "cancel": {
          "description": "Permits the client to cancel this child's current work without ending\nthe session. Omitted or `null` means unsupported; an object (including\n`{}`) means supported.",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionCancelCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "SessionCancelCapabilities": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapability to cancel work in a subagent session without ending that session.\n\nSupplying `{}` advertises support; an omitted or `null` `cancel` does not.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "SubagentUpdate": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNotification that the enclosing parent session created and owns a child session.\n\nLater updates modify the existing association's metadata, not its ownership.\n\nSent on the immediate parent session. The first update for an unknown\n[`SubagentUpdate::session_id`] announces the child and MUST be sent\nbefore any live request or notification bearing the child's session ID,\nincluding messages naming it as sender or recipient. Child events are\ndelivered automatically; no separate child load, resume, or subscription is needed.\nUnderstanding this update, registering child sessions, and applying their\noperation restrictions are baseline v2 requirements; no Client capability\nis required.\n\nOnly [`SubagentUpdate::session_id`] is required. Other fields have\npatch semantics: omitted fields leave the stored value unchanged, `null`\nclears or unsets the value, and concrete values replace it. A concrete\n`_meta` object instead patches the stored metadata by top-level key. For\n`state`, `null` removes the current state report and leaves activity\nunconfirmed; it does not report idle or cancellation. A child whose capabilities are\nunset permits no Client-initiated session mutations.\n\nThe title and description provide the parent's display metadata for the\nchild. Agents SHOULD mirror known child state changes in the parent's\n[`SubagentUpdate::state`] using the same [`StateUpdate`] snapshot as the\nordinary `state_update` notification on the child session. This reports\nchild state, not a separate parent-owned lifecycle. Consumers should\ntreat duplicate reports idempotently.\nCompleting or cancelling work does not end the association: the parent may\nmessage the same child again. Individual messages and their outcomes do not\nchange this association.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The opaque session ID identifying the child in all ACP messages.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "title": {
          "description": "The parent's human-readable display title for this child. It need not be unique.\n\nOptional and nullable. Omitted means unchanged; `null` clears it. If no\ntitle is set, the Client chooses a fallback presentation.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "description": {
          "description": "The parent's human-readable description of the child's role or purpose.\n\nOptional and nullable. Omitted means unchanged; `null` clears it. This is\ncurrent display metadata, not the history of instructions sent to the child.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "capabilities": {
          "description": "Client-initiated session mutations permitted for this subagent session.\n\nRead-only operations retain their normal protocol semantics and\ncapability requirements.",
          "anyOf": [
            {
              "$ref": "#/$defs/SubagentSessionCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "state": {
          "description": "The child's current foreground state, mirrored onto its parent association.\n\nOptional and nullable. Omitted means unchanged; `null` removes the\ncurrent report and leaves activity unconfirmed (not idle or cancelled).\nA concrete [`StateUpdate`] replaces the entire previous snapshot.",
          "anyOf": [
            {
              "$ref": "#/$defs/StateUpdate"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted leaves the stored metadata unchanged; `null`\nclears it. An object patches the stored metadata by top-level key: keys it omits are\nunchanged, a key set to `null` is removed, and any other value replaces that key's\nstored value without merging nested objects. Beyond this patch rule, implementations\nMUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Metadata Patches](https://agentclientprotocol.com/protocol/v2/draft/extensibility#metadata-patches)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId"]
    },
    "SessionMessage": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAn upsert for an inter-session message.",
      "type": "object",
      "properties": {
        "messageId": {
          "description": "Identifier of this message within the enclosing session's transcript.",
          "allOf": [
            {
              "$ref": "#/$defs/MessageId"
            }
          ]
        },
        "senderSessionId": {
          "description": "Optional sending session identity; omission or `null` retains a known value.",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionId"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "recipientSessionId": {
          "description": "Optional receiving session identity; omission or `null` retains a known value.",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionId"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "content": {
          "description": "Omitted leaves content unchanged; `null` clears it; a concrete array\nreplaces the whole content collection.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/ContentBlock"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted leaves the stored metadata unchanged; `null`\nclears it. An object patches the stored metadata by top-level key: keys it omits are\nunchanged, a key set to `null` is removed, and any other value replaces that key's\nstored value without merging nested objects. Beyond this patch rule, implementations\nMUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Metadata Patches](https://agentclientprotocol.com/protocol/v2/draft/extensibility#metadata-patches)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["messageId"]
    },
    "SessionMessageChunk": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA streamed content block of an inter-session message.",
      "type": "object",
      "properties": {
        "messageId": {
          "description": "Identifier of this message within the enclosing session's transcript.",
          "allOf": [
            {
              "$ref": "#/$defs/MessageId"
            }
          ]
        },
        "senderSessionId": {
          "description": "Optional sending session identity; omission or `null` retains a known value.",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionId"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "recipientSessionId": {
          "description": "Optional receiving session identity; omission or `null` retains a known value.",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionId"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "content": {
          "description": "A single content block appended to the message.",
          "allOf": [
            {
              "$ref": "#/$defs/ContentBlock"
            }
          ]
        },
        "_meta": {
          "description": "Optional and nullable chunk-scoped metadata; omitted or `null` means none.\n\nImplementations MUST NOT make assumptions about values in `_meta`.",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["messageId", "content"]
    },
    "CompleteElicitationNotification": {
      "description": "Notification sent by the agent when a URL-based elicitation is complete.\n\nThis notification is not a foreground state update.",
      "type": "object",
      "properties": {
        "elicitationId": {
          "description": "The ID of the elicitation that completed.",
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["elicitationId"],
      "x-side": "client",
      "x-method": "elicitation/complete"
    },
    "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/v2/draft/extensibility)"
    },
    "ClientRequest": {
      "description": "A JSON-RPC request object.",
      "type": "object",
      "properties": {
        "id": {
          "description": "The request id used to correlate the matching response.",
          "allOf": [
            {
              "$ref": "#/$defs/RequestId"
            }
          ]
        },
        "method": {
          "description": "The method name to invoke.",
          "type": "string"
        },
        "params": {
          "description": "Method-specific request parameters.",
          "anyOf": [
            {
              "description": "All possible requests that a client can send to an agent.\n\nThis enum is used internally for routing RPC requests. You typically won't need\nto use this directly.\n\nThis enum encompasses all method calls from client to agent.",
              "anyOf": [
                {
                  "title": "InitializeRequest",
                  "description": "Establishes the connection with a client and negotiates protocol capabilities.\n\nThis method is called once at the beginning of the connection to:\n- Negotiate the protocol version to use\n- Exchange capability information between client and agent\n- Determine available authentication methods\n\nThe agent should respond with its supported protocol version and capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/v2/draft/initialization)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/InitializeRequest"
                    }
                  ]
                },
                {
                  "title": "LoginAuthRequest",
                  "description": "Authenticates the client using the specified authentication method.\n\nAgents MUST support this method when their `initialize` response advertised\nat least one valid authentication method. Clients MUST call this method only\nwith a method whose type defines a protocol-driven login flow, and MUST NOT\ncall it when `authMethods` was omitted or empty.\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/v2/draft/initialization)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/LoginAuthRequest"
                    }
                  ]
                },
                {
                  "title": "ListProvidersRequest",
                  "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nLists providers that can be configured by the client.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ListProvidersRequest"
                    }
                  ]
                },
                {
                  "title": "SetProviderRequest",
                  "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nReplaces the configuration for a provider.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/SetProviderRequest"
                    }
                  ]
                },
                {
                  "title": "DisableProviderRequest",
                  "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nDisables a provider.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/DisableProviderRequest"
                    }
                  ]
                },
                {
                  "title": "LogoutAuthRequest",
                  "description": "Logs out of the current authenticated state.\n\nAgents MUST support this method when their `initialize` response advertised\nat least one valid authentication method. Clients MUST NOT call this method\nwhen `authMethods` was omitted or empty.\n\nAfter a successful logout, authentication-gated requests require the\nclient to complete an advertised authentication flow again. There is no\nguarantee about the behavior of already running sessions.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/LogoutAuthRequest"
                    }
                  ]
                },
                {
                  "title": "NewSessionRequest",
                  "description": "Creates a new conversation session with the agent.\n\nSessions represent independent conversation contexts with their own history and state.\n\nThe agent should:\n- Create a new session context\n- Connect to any specified MCP servers\n- Return a unique session ID for future requests\n\nMay return an `auth_required` error if the agent requires authentication.\n\nSee protocol docs: [Session Setup](https://agentclientprotocol.com/protocol/v2/draft/session-setup)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/NewSessionRequest"
                    }
                  ]
                },
                {
                  "title": "ListSessionsRequest",
                  "description": "Lists existing sessions known to the agent.\n\nThe agent should return metadata about sessions with optional filtering and pagination support.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ListSessionsRequest"
                    }
                  ]
                },
                {
                  "title": "DeleteSessionRequest",
                  "description": "Deletes an existing session from `session/list`.\n\nThis method is only available if the agent advertises the `session.delete` capability.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/DeleteSessionRequest"
                    }
                  ]
                },
                {
                  "title": "ForkSessionRequest",
                  "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nForks an existing session to create a new independent session.\n\nThis method is only available if the agent advertises the `session.fork` capability.\n\nThe agent should create a new session with the same conversation context as the\noriginal, allowing operations like generating summaries without affecting the\noriginal session's history.\n\nAs with `session/new`, the forked session is active once the agent responds,\nset up with the request's `cwd`, `additionalDirectories`, and `mcpServers`.\nThe client can prompt it without calling `session/resume` first.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ForkSessionRequest"
                    }
                  ]
                },
                {
                  "title": "ResumeSessionRequest",
                  "description": "Resumes an existing session.\n\nThe agent should resume the session context, allowing the conversation\nto continue. If `replayFrom` is set, the agent should replay\nretained conversation history before responding.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ResumeSessionRequest"
                    }
                  ]
                },
                {
                  "title": "CloseSessionRequest",
                  "description": "Closes an active session and frees up any resources associated with it.\n\nThe agent must cancel any ongoing work (as if `session/cancel` was called)\nand then free up any resources associated with the session.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/CloseSessionRequest"
                    }
                  ]
                },
                {
                  "title": "SetSessionConfigOptionRequest",
                  "description": "Sets the current value for a session configuration option.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/SetSessionConfigOptionRequest"
                    }
                  ]
                },
                {
                  "title": "PromptRequest",
                  "description": "Processes a user prompt within a session.\n\nAcceptance means adding a logical user message with an ID and a position\nrelative to other messages in the ACP conversation, not receipt or queueing.\nThe Agent MUST return the inserted message's ID without waiting for\nprocessing to finish.\n\nThe Agent reports the user message with the same ID through `session/update`;\nthis notification may arrive before or after the response, but neither may\nprecede insertion. Processing state, output, tool calls, and completion are\nalso reported through session updates.\n\nAn error response means the user message was not inserted. Once it is\ninserted, the Agent MUST NOT answer with an error, even if the work fails\nbefore the response is sent; it ends that work with the `error` stop reason.\n\nA rejected submission produces no user-message updates. Foreground state\nfollows its normal lifecycle independently of the request outcome:\n`running` may precede insertion, and rejection alone does not imply `idle`.\n\nSee protocol docs: [Prompt Lifecycle](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/PromptRequest"
                    }
                  ]
                },
                {
                  "title": "ExtMethodRequest",
                  "description": "Handles extension method requests from the client.\n\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ExtRequest"
                    }
                  ]
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["id", "method"],
      "x-docs-ignore": true
    },
    "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/v2/draft/initialization)",
      "type": "object",
      "properties": {
        "protocolVersion": {
          "description": "The latest protocol version supported by the client.",
          "allOf": [
            {
              "$ref": "#/$defs/ProtocolVersion"
            }
          ]
        },
        "info": {
          "description": "Information about the implementation sending this initialize request.",
          "allOf": [
            {
              "$ref": "#/$defs/Implementation"
            }
          ]
        },
        "capabilities": {
          "description": "Capabilities supported by the client.",
          "x-deserialize-default-on-error": true,
          "default": {},
          "allOf": [
            {
              "$ref": "#/$defs/ClientCapabilities"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["protocolVersion", "info"],
      "x-side": "agent",
      "x-method": "initialize"
    },
    "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/v2/draft/initialization#client-capabilities)",
      "type": "object",
      "properties": {
        "auth": {
          "description": "Authentication capabilities supported by the client.\nDetermines which authentication method types the agent may include\nin its `InitializeResponse`.\n\nOptional. Omitted or `null` both mean the client does not advertise any\nauthentication-method extensions.",
          "anyOf": [
            {
              "$ref": "#/$defs/AuthCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "elicitation": {
          "description": "Elicitation capabilities supported by the client.\nDetermines which elicitation modes the agent may use.\n\nOptional. Omitted or `null` both mean the client does not advertise\nelicitation support.",
          "anyOf": [
            {
              "$ref": "#/$defs/ElicitationCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "AuthCapabilities": {
      "description": "Authentication capabilities supported by the client.\n\nAdvertised during initialization to inform the agent which authentication\nmethod types the client can handle. This governs opt-in types that require\nadditional client-side support.",
      "type": "object",
      "properties": {
        "terminal": {
          "description": "Whether the client supports `terminal` authentication methods.\n\nOptional. Omitted or `null` both mean the client does not advertise support.\nThe client should supply `{}` only when it can reproduce the configured\nagent invocation in an interactive terminal. Supplying `{}` means the\nagent may include `terminal` entries in its authentication methods.",
          "anyOf": [
            {
              "$ref": "#/$defs/TerminalAuthCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "TerminalAuthCapabilities": {
      "description": "Capabilities for terminal authentication methods.\n\nSupplying `{}` means the client can reproduce the configured agent\ninvocation in an interactive terminal and supports terminal authentication\nmethods.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "ElicitationCapabilities": {
      "description": "Elicitation capabilities supported by the client.",
      "type": "object",
      "properties": {
        "form": {
          "description": "Whether the client supports form-based elicitation.\n\nOptional. Omitted and `null` are equivalent and mean form support is not advertised.\nSupplying `{}` explicitly advertises form support.",
          "anyOf": [
            {
              "$ref": "#/$defs/ElicitationFormCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "url": {
          "description": "Whether the client supports URL-based elicitation.\n\nOptional. Omitted or `null` both mean the client does not advertise support.\nSupplying `{}` means the client supports URL-based elicitation.",
          "anyOf": [
            {
              "$ref": "#/$defs/ElicitationUrlCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "ElicitationFormCapabilities": {
      "description": "Form-based elicitation capabilities.\n\nSupplying `{}` means the client supports form-based elicitation.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "ElicitationUrlCapabilities": {
      "description": "URL-based elicitation capabilities.\n\nSupplying `{}` means the client supports URL-based elicitation.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "LoginAuthRequest": {
      "description": "Request parameters for the `auth/login` method.\n\nSpecifies which authentication method to use.\n\nAgents MUST support this method when their `initialize` response advertised\nat least one valid authentication method. Clients MUST NOT call this method\nwhen `authMethods` was omitted or empty.",
      "type": "object",
      "properties": {
        "methodId": {
          "description": "The ID of the authentication method to use.\nMust be one of the methods advertised in the initialize response.",
          "allOf": [
            {
              "$ref": "#/$defs/AuthMethodId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["methodId"],
      "x-side": "agent",
      "x-method": "auth/login"
    },
    "ListProvidersRequest": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `providers/list`.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "x-side": "agent",
      "x-method": "providers/list"
    },
    "SetProviderRequest": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `providers/set`.\n\nReplaces the full configuration for one provider ID.",
      "type": "object",
      "properties": {
        "providerId": {
          "description": "Provider ID to configure.",
          "allOf": [
            {
              "$ref": "#/$defs/ProviderId"
            }
          ]
        },
        "apiType": {
          "description": "Protocol type for this provider.",
          "allOf": [
            {
              "$ref": "#/$defs/LlmProtocol"
            }
          ]
        },
        "baseUrl": {
          "description": "Base URL for requests sent through this provider.",
          "type": "string",
          "format": "uri"
        },
        "headers": {
          "description": "Full headers map for this provider.\nMay include authorization, routing, or other integration-specific headers.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["providerId", "apiType", "baseUrl"],
      "x-side": "agent",
      "x-method": "providers/set"
    },
    "DisableProviderRequest": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `providers/disable`.",
      "type": "object",
      "properties": {
        "providerId": {
          "description": "Provider ID to disable.",
          "allOf": [
            {
              "$ref": "#/$defs/ProviderId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["providerId"],
      "x-side": "agent",
      "x-method": "providers/disable"
    },
    "LogoutAuthRequest": {
      "description": "Request parameters for the `auth/logout` method.\n\nTerminates the current authenticated session.\n\nAgents MUST support this method when their `initialize` response advertised\nat least one valid authentication method. Clients MUST NOT call this method\nwhen `authMethods` was omitted or empty.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "x-side": "agent",
      "x-method": "auth/logout"
    },
    "NewSessionRequest": {
      "description": "Request parameters for creating a new session.\n\nSee protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/v2/draft/session-setup#creating-a-session)",
      "type": "object",
      "properties": {
        "cwd": {
          "description": "The working directory for this session. Must be an absolute path.",
          "allOf": [
            {
              "$ref": "#/$defs/AbsolutePath"
            }
          ]
        },
        "additionalDirectories": {
          "description": "Additional workspace roots for this session. Each path must be absolute.\n\nThese expand the session's workspace scope without changing `cwd`, which\nremains the base for relative paths. When omitted or empty, no\nadditional roots are activated for the new session.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AbsolutePath"
          }
        },
        "mcpServers": {
          "description": "List of MCP (Model Context Protocol) servers the agent should connect to.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/McpServer"
          }
        },
        "systemPrompt": {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSystem-level instructions for the new session.\n\nOptional. Omitted and `null` are equivalent and mean the Agent uses its\nown default instructions. Clients MUST only send this when the Agent\nadvertises `session.systemPrompt`.",
          "anyOf": [
            {
              "$ref": "#/$defs/SystemPrompt"
            },
            {
              "type": "null"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["cwd"],
      "x-side": "agent",
      "x-method": "session/new"
    },
    "McpServer": {
      "description": "Configuration for connecting to an MCP (Model Context Protocol) server.\n\nMCP servers provide tools and context that the agent can use when\nprocessing prompts.\n\nSee protocol docs: [MCP Servers](https://agentclientprotocol.com/protocol/v2/draft/session-setup#mcp-servers)",
      "anyOf": [
        {
          "description": "HTTP transport configuration\n\nOnly available when the Agent capabilities include `session.mcp.http`.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "http"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/McpServerHttp"
            }
          ]
        },
        {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nACP transport configuration\n\nOnly available when the Agent capabilities include `session.mcp.acp`.\nThe MCP server is provided by an ACP component and communicates over the ACP channel.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "acp"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/McpServerAcp"
            }
          ]
        },
        {
          "description": "Stdio transport configuration\n\nOnly available when the Agent capabilities include `session.mcp.stdio`.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "stdio"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/McpServerStdio"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future MCP server transport configuration.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nReceivers that do not understand this transport should preserve the raw\npayload when storing, replaying, proxying, or forwarding session setup\ndata, and otherwise ignore it or reject the server configuration.",
          "type": "object",
          "properties": {
            "type": {
              "description": "Custom or future MCP server transport type.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["type"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "http"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "stdio"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "acp"
                  }
                },
                "required": ["type"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "HttpHeader": {
      "description": "An HTTP header to set when making requests to the MCP server.",
      "type": "object",
      "properties": {
        "name": {
          "description": "The name of the HTTP header.",
          "type": "string"
        },
        "value": {
          "description": "The value to set for the HTTP header.",
          "type": "string"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["name", "value"]
    },
    "McpServerHttp": {
      "description": "HTTP transport configuration for MCP.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Human-readable name identifying this MCP server.",
          "type": "string"
        },
        "url": {
          "description": "URL to the MCP server.",
          "type": "string",
          "format": "uri"
        },
        "headers": {
          "description": "HTTP headers to set when making requests to the MCP server.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/HttpHeader"
          }
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["name", "url"]
    },
    "McpServerAcp": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nACP transport configuration for MCP.\n\nThe MCP server is provided by an ACP component and communicates over the ACP channel\nusing `mcp/message`.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Human-readable name identifying this MCP server.",
          "type": "string"
        },
        "serverId": {
          "description": "Unique identifier for this MCP server, generated by the component providing it.\n\nProviders MUST NOT reuse an ID for multiple ACP-transport MCP servers that are visible\non the same ACP connection.",
          "allOf": [
            {
              "$ref": "#/$defs/McpServerAcpId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["name", "serverId"]
    },
    "McpServerStdio": {
      "description": "Stdio transport configuration for MCP.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Human-readable name identifying this MCP server.",
          "type": "string"
        },
        "command": {
          "description": "Absolute path to the MCP server executable.",
          "allOf": [
            {
              "$ref": "#/$defs/AbsolutePath"
            }
          ]
        },
        "args": {
          "description": "Command-line arguments to pass to the MCP server.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "env": {
          "description": "Environment variables to set when launching the MCP server.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/EnvVariable"
          }
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["name", "command"]
    },
    "SystemPrompt": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nClient-provided system-level instructions for a session.\n\nClients MUST only send this when the Agent advertises\n`session.systemPrompt`. Agents that cannot apply it, for example because of\nan unadvertised mode or an unsupported content block type, MUST return an\nerror instead of creating, resuming, or forking the session.",
      "type": "object",
      "properties": {
        "mode": {
          "description": "How the Agent combines `content` with its own instructions.\n\nRequired on the wire, so every request states its mode. In Rust,\n[`SystemPrompt::new`] starts it as [`SystemPromptMode::Append`]. Unknown\nvalues parse as [`SystemPromptMode::Other`]; Agents MUST return an error\nfor modes they do not support.",
          "allOf": [
            {
              "$ref": "#/$defs/SystemPromptMode"
            }
          ]
        },
        "content": {
          "description": "The system prompt content.\n\nAgents advertising the capability MUST accept [`ContentBlock::Text`].\nClients MUST NOT send other content block types until a future\ncapability allows them, and Agents MUST return an error for content\nblocks they do not support, including unknown types preserved as\n[`ContentBlock::Other`].",
          "type": "array",
          "items": {
            "$ref": "#/$defs/ContentBlock"
          }
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["mode", "content"]
    },
    "SystemPromptMode": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nHow the Agent combines a client-provided system prompt with its own instructions.\n\nUnknown modes parse as [`SystemPromptMode::Other`] so they can be stored,\nproxied, or forwarded. An Agent MUST return an error for a mode it does not\nsupport rather than treating it as `append` or `override`.",
      "anyOf": [
        {
          "description": "Add the content to the Agent's own instructions rather than replacing them.\n\nEvery Agent that advertises `session.systemPrompt` supports this mode.\nAgents SHOULD give the content system-level precedence, for example in the\nmodel's system prompt or developer instructions rather than in user-turn\ncontent. Where it is placed and how it is formatted is implementation-defined.",
          "type": "string",
          "const": "append"
        },
        {
          "description": "Replace the Agent's built-in default instructions with the content.\n\nThis does not change tool availability, MCP servers, permissions, or session\nconfiguration. Context the Agent supplies from the workspace or environment\nMAY still be included. Clients that use this mode take responsibility for any\ntool guidance or safety instructions the Agent's default instructions\nprovided, and MUST only use it when the Agent advertises\n`session.systemPrompt.mode.override`.",
          "type": "string",
          "const": "override"
        },
        {
          "title": "other",
          "description": "Custom or future system prompt mode.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "string"
        }
      ]
    },
    "ListSessionsRequest": {
      "description": "Request parameters for listing existing sessions.",
      "type": "object",
      "properties": {
        "cwd": {
          "description": "Filter sessions by working directory. Must be an absolute path.",
          "anyOf": [
            {
              "$ref": "#/$defs/AbsolutePath"
            },
            {
              "type": "null"
            }
          ]
        },
        "cursor": {
          "description": "Opaque cursor token from a previous response's nextCursor field for cursor-based pagination",
          "anyOf": [
            {
              "$ref": "#/$defs/SessionListCursor"
            },
            {
              "type": "null"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "x-side": "agent",
      "x-method": "session/list"
    },
    "DeleteSessionRequest": {
      "description": "Request parameters for deleting an existing session from `session/list`.\n\nOnly available if the Agent supports the `session.delete` capability.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The ID of the session to delete.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId"],
      "x-side": "agent",
      "x-method": "session/delete"
    },
    "ForkSessionRequest": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for forking an existing session.\n\nCreates a new session based on the context of an existing one, allowing\noperations like generating summaries without affecting the original session's history.\n\nOnly available if the Agent supports the `session.fork` capability.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The ID of the session to fork.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "cwd": {
          "description": "The working directory for this session. Must be an absolute path.",
          "allOf": [
            {
              "$ref": "#/$defs/AbsolutePath"
            }
          ]
        },
        "additionalDirectories": {
          "description": "Additional workspace roots to activate for this session. Each path must be absolute.\n\nWhen omitted or empty, no additional roots are activated. When non-empty,\nthis is the complete resulting additional-root list for the forked\nsession.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AbsolutePath"
          }
        },
        "mcpServers": {
          "description": "List of MCP servers to connect to for this session.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/McpServer"
          }
        },
        "systemPrompt": {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSystem-level instructions for the forked session.\n\nOptional. Omitted and `null` are equivalent; the Agent may then keep a\nsystem prompt it stored with the source session or use its default\ninstructions. Clients MUST only send this when the Agent advertises\n`session.systemPrompt`, and SHOULD send the same value they used for the\nsource session.",
          "anyOf": [
            {
              "$ref": "#/$defs/SystemPrompt"
            },
            {
              "type": "null"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId", "cwd"],
      "x-side": "agent",
      "x-method": "session/fork"
    },
    "ResumeSessionRequest": {
      "description": "Request parameters for resuming an existing session.\n\nResumes an existing session and optionally replays retained conversation\nhistory according to `replayFrom`.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The ID of the session to resume.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "cwd": {
          "description": "The working directory for this session. Must be an absolute path.",
          "allOf": [
            {
              "$ref": "#/$defs/AbsolutePath"
            }
          ]
        },
        "additionalDirectories": {
          "description": "Additional workspace roots to activate for this session. Each path must be absolute.\n\nWhen omitted or empty, no additional roots are activated. When non-empty,\nthis is the complete resulting additional-root list for the resumed\nsession. It may differ from any previously used or reported list as long as\nthe request `cwd` matches the session's `cwd`.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AbsolutePath"
          }
        },
        "mcpServers": {
          "description": "List of MCP servers to connect to for this session.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/McpServer"
          }
        },
        "replayFrom": {
          "description": "Inclusive cursor describing where conversation replay should begin.\n\nOptional. Omitted or `null` both mean the Agent should resume without\nreplaying previous conversation history. Replay cursors are inclusive:\nreplay includes the position identified by the cursor. Supplying\n`{ \"type\": \"start\" }` means the Agent should replay all retained\nconversation history before responding.\n\nAgents MUST reject unsupported cursor types or malformed cursor values\nwith `-32602` (Invalid params), rather than substituting another cursor\nor resuming without replay.",
          "anyOf": [
            {
              "$ref": "#/$defs/ReplayFrom"
            },
            {
              "type": "null"
            }
          ]
        },
        "systemPrompt": {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSystem-level instructions for the resumed session.\n\nOptional. Omitted and `null` are equivalent; the Agent may then keep a\nsystem prompt it stored with the session or use its default instructions.\nClients MUST only send this when the Agent advertises\n`session.systemPrompt`, and SHOULD send the same value they used when the\nsession was created.",
          "anyOf": [
            {
              "$ref": "#/$defs/SystemPrompt"
            },
            {
              "type": "null"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId", "cwd"],
      "x-side": "agent",
      "x-method": "session/resume"
    },
    "ReplayFrom": {
      "description": "Inclusive cursor describing where replayed session history should begin.\n\nReplay includes the position identified by the cursor.",
      "anyOf": [
        {
          "description": "Replay all retained conversation history from its first replayable entry.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "start"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/ReplayFromStart"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future replay cursor.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nIntermediaries SHOULD preserve the raw payload when storing, replaying,\nproxying, or forwarding requests. Agents that do not support this cursor\nMUST reject the request with `-32602` (Invalid params), rather than\nsubstituting another cursor or resuming without replay.",
          "type": "object",
          "properties": {
            "type": {
              "description": "Custom or future replay cursor type.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            },
            "_meta": {
              "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
              "type": ["object", "null"],
              "x-deserialize-default-on-error": true,
              "additionalProperties": true
            }
          },
          "required": ["type"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "start"
                  }
                },
                "required": ["type"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "ReplayFromStart": {
      "description": "Inclusive replay cursor requesting replay from the start of retained conversation history.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "CloseSessionRequest": {
      "description": "Request parameters for closing an active session.\n\nThe agent **must** cancel any ongoing work related to the session (treat it\nas if `session/cancel` was called) and then free up any resources associated\nwith the session.\n\nWhen closing cancels active foreground work, the Agent MUST send the final\nupdates for that work and the idle `state_update` with `stopReason: \"cancelled\"`\nbefore responding successfully to `session/close`. Closing an idle session\ndoes not itself require another idle update.\n\nClosing may also cancel pending `session/prompt` requests, including queued\nprompts. If closing prevents a prompt's user message from being inserted, the\nAgent MUST answer that request with `-32800` (Request Cancelled). If the message\nhas already been inserted, the Agent MUST respond successfully with its\n`messageId`. Prompt responses need not precede the close response.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The ID of the session to close.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId"],
      "x-side": "agent",
      "x-method": "session/close"
    },
    "SetSessionConfigOptionRequest": {
      "description": "Request parameters for setting a session configuration option.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The ID of the session to set the configuration option for.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "configId": {
          "description": "The ID of the configuration option to set.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionConfigId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId", "configId"],
      "anyOf": [
        {
          "description": "A [`SessionConfigValueId`] string value (`type: \"id\"`).",
          "type": "object",
          "properties": {
            "value": {
              "description": "The value ID.",
              "allOf": [
                {
                  "$ref": "#/$defs/SessionConfigValueId"
                }
              ]
            },
            "type": {
              "type": "string",
              "const": "id"
            }
          },
          "required": ["type", "value"]
        },
        {
          "description": "A boolean value (`type: \"boolean\"`).",
          "type": "object",
          "properties": {
            "value": {
              "description": "The boolean value.",
              "type": "boolean"
            },
            "type": {
              "type": "string",
              "const": "boolean"
            }
          },
          "required": ["type", "value"]
        },
        {
          "title": "other",
          "description": "Custom or future session configuration option value payload.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
          "type": "object",
          "properties": {
            "type": {
              "description": "Custom or future session configuration option value type.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            },
            "value": {
              "description": "Raw value payload for the custom or future value type."
            }
          },
          "required": ["type", "value"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "id"
                  }
                },
                "required": ["type"]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "boolean"
                  }
                },
                "required": ["type"]
              }
            ]
          },
          "additionalProperties": true
        }
      ],
      "x-side": "agent",
      "x-method": "session/set_config_option"
    },
    "PromptRequest": {
      "description": "Request parameters for sending a user prompt to the agent.\n\nContains the user's message and any additional context.\n\nSee protocol docs: [User Message](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#1-user-message)",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The ID of the session to send this user message to",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "prompt": {
          "description": "The blocks of content that compose the user's message.\n\nAs a baseline, the Agent MUST support [`ContentBlock::Text`] and [`ContentBlock::ResourceLink`],\nwhile other variants are optionally enabled via [`PromptCapabilities`].\n\nThe Client MUST adapt its interface according to [`PromptCapabilities`].\n\nThe client MAY include referenced pieces of context as either\n[`ContentBlock::Resource`] or [`ContentBlock::ResourceLink`].\n\nWhen available, [`ContentBlock::Resource`] is preferred\nas it avoids extra round-trips and allows the message to include\npieces of context from sources the agent may not have access to.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/ContentBlock"
          }
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId", "prompt"],
      "x-side": "agent",
      "x-method": "session/prompt"
    },
    "ClientResponse": {
      "description": "A JSON-RPC response object.",
      "anyOf": [
        {
          "title": "Result",
          "description": "A successful JSON-RPC response.",
          "type": "object",
          "properties": {
            "id": {
              "description": "The id of the request this response answers.",
              "allOf": [
                {
                  "$ref": "#/$defs/RequestId"
                }
              ]
            },
            "result": {
              "description": "Method-specific response data.",
              "anyOf": [
                {
                  "title": "RequestPermissionResponse",
                  "description": "Successful result returned for a `session/request_permission` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/RequestPermissionResponse"
                    }
                  ]
                },
                {
                  "title": "CreateElicitationResponse",
                  "description": "Successful result returned for a `elicitation/create` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/CreateElicitationResponse"
                    }
                  ]
                },
                {
                  "title": "MessageMcpResponse",
                  "description": "Successful result returned by an MCP-over-ACP `mcp/message` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/MessageMcpResponse"
                    }
                  ]
                },
                {
                  "title": "ExtMethodResponse",
                  "description": "Successful result returned by an extension method outside the core ACP method set.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ExtResponse"
                    }
                  ]
                }
              ]
            }
          },
          "required": ["id", "result"]
        },
        {
          "title": "Error",
          "description": "A failed JSON-RPC response.",
          "type": "object",
          "properties": {
            "id": {
              "description": "The id of the request this response answers.",
              "allOf": [
                {
                  "$ref": "#/$defs/RequestId"
                }
              ]
            },
            "error": {
              "description": "Method-specific error data.",
              "allOf": [
                {
                  "$ref": "#/$defs/Error"
                }
              ]
            }
          },
          "required": ["id", "error"]
        }
      ],
      "x-docs-ignore": true
    },
    "RequestPermissionResponse": {
      "description": "Response to a permission request.",
      "type": "object",
      "properties": {
        "outcome": {
          "description": "The user's decision on the permission request.",
          "allOf": [
            {
              "$ref": "#/$defs/RequestPermissionOutcome"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["outcome"],
      "x-side": "client",
      "x-method": "session/request_permission"
    },
    "RequestPermissionOutcome": {
      "description": "The outcome of a permission request.",
      "anyOf": [
        {
          "description": "Active session work was cancelled before the user responded.\n\nWhen a client sends a `session/cancel` notification to cancel active\nsession work, it MUST respond to all pending `session/request_permission`\nrequests in that session with this `Cancelled` outcome, without answering\nany request twice. Requests in other sessions are unaffected.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#cancellation)",
          "type": "object",
          "properties": {
            "outcome": {
              "type": "string",
              "const": "cancelled"
            }
          },
          "required": ["outcome"]
        },
        {
          "description": "The user selected one of the provided options.",
          "type": "object",
          "properties": {
            "outcome": {
              "type": "string",
              "const": "selected"
            }
          },
          "required": ["outcome"],
          "allOf": [
            {
              "$ref": "#/$defs/SelectedPermissionOutcome"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future permission outcome.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nAgents that do not understand this outcome MUST NOT treat it as approval.\nThey should preserve the raw payload when storing, replaying, proxying, or\nforwarding permission responses, and otherwise fail or decline the\npermission request according to policy.",
          "type": "object",
          "properties": {
            "outcome": {
              "description": "Custom or future permission outcome.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["outcome"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "outcome": {
                    "type": "string",
                    "const": "cancelled"
                  }
                },
                "required": ["outcome"]
              },
              {
                "type": "object",
                "properties": {
                  "outcome": {
                    "type": "string",
                    "const": "selected"
                  }
                },
                "required": ["outcome"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "SelectedPermissionOutcome": {
      "description": "The user selected one of the provided options.",
      "type": "object",
      "properties": {
        "optionId": {
          "description": "The ID of the option the user selected.",
          "allOf": [
            {
              "$ref": "#/$defs/PermissionOptionId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["optionId"]
    },
    "CreateElicitationResponse": {
      "description": "Response from the client to an elicitation request.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nOptional. Omitted and `null` are equivalent and mean no metadata.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "anyOf": [
        {
          "description": "The user accepted and provided content.",
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "accept"
            }
          },
          "required": ["action"],
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationAcceptAction"
            }
          ]
        },
        {
          "description": "The user declined the elicitation.",
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "decline"
            }
          },
          "required": ["action"]
        },
        {
          "description": "The elicitation was cancelled.",
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "cancel"
            }
          },
          "required": ["action"]
        },
        {
          "title": "other",
          "description": "Custom or future elicitation action.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nAgents that do not understand this action should preserve the raw\npayload when storing, replaying, proxying, or forwarding elicitation\nresponses. They MUST NOT treat it as a known elicitation action.",
          "type": "object",
          "properties": {
            "action": {
              "description": "Custom or future elicitation action.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
              "type": "string"
            }
          },
          "required": ["action"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "accept"
                  }
                },
                "required": ["action"]
              },
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "decline"
                  }
                },
                "required": ["action"]
              },
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "cancel"
                  }
                },
                "required": ["action"]
              }
            ]
          },
          "additionalProperties": true
        }
      ],
      "x-side": "client",
      "x-method": "elicitation/create"
    },
    "ElicitationContentValue": {
      "description": "Allowed wire representations for [`ElicitationContentValue`].",
      "anyOf": [
        {
          "title": "String",
          "description": "String value accepted in elicitation response content.",
          "type": "string"
        },
        {
          "title": "Integer",
          "description": "Integer value accepted in elicitation response content.",
          "type": "integer",
          "format": "int64"
        },
        {
          "title": "Number",
          "description": "Number value accepted in elicitation response content.",
          "type": "number",
          "format": "double"
        },
        {
          "title": "Boolean",
          "description": "Boolean value accepted in elicitation response content.",
          "type": "boolean"
        },
        {
          "title": "StringArray",
          "description": "String array value accepted in elicitation response content.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "ElicitationAcceptAction": {
      "description": "The user accepted the elicitation and provided content.",
      "type": "object",
      "properties": {
        "content": {
          "description": "The user-provided content, if any, as an object matching the requested schema.",
          "type": ["object", "null"],
          "additionalProperties": {
            "$ref": "#/$defs/ElicitationContentValue"
          }
        }
      }
    },
    "MessageMcpResponse": {
      "description": "**UNSTABLE**\n\nThe successful outer ACP `mcp/message` response carries exactly one\ninner MCP outcome: an opaque result (including JSON null), or an MCP error.\nOuter ACP errors are reserved for binding and runtime failures.\n\nBoth branches require their carrier key. An error must be a non-null object.\nUnknown outer fields are ignored; inner result and error fields are preserved.\nCarrier `_meta` is optional; null or invalid values are treated as absent.\nSenders must include exactly one outcome; receivers prefer `result` if both are present.",
      "anyOf": [
        {
          "title": "Result",
          "description": "An opaque inner MCP result.",
          "type": "object",
          "properties": {
            "result": {
              "description": "Required, even if JSON null."
            },
            "_meta": {
              "description": "Optional ACP carrier metadata.",
              "type": ["object", "null"],
              "x-deserialize-default-on-error": true,
              "additionalProperties": true
            }
          },
          "required": ["result"]
        },
        {
          "title": "Error",
          "description": "A structured inner MCP error.",
          "type": "object",
          "properties": {
            "error": {
              "description": "Required, non-null MCP error object.",
              "allOf": [
                {
                  "$ref": "#/$defs/McpError"
                }
              ]
            },
            "_meta": {
              "description": "Optional ACP carrier metadata.",
              "type": ["object", "null"],
              "x-deserialize-default-on-error": true,
              "additionalProperties": true
            }
          },
          "required": ["error"]
        }
      ],
      "x-side": "client",
      "x-method": "mcp/message"
    },
    "McpError": {
      "description": "**UNSTABLE**\n\nAn inner MCP error, distinct from an outer ACP binding or runtime error.\n\n`code` and `message` are required and non-null. `data` is optional;\nexplicit `null` is preserved separately from an omitted key.",
      "type": "object",
      "properties": {
        "code": {
          "description": "Inner MCP error code; never an ACP error code.",
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "description": "Inner MCP error message.",
          "type": "string"
        },
        "data": {
          "description": "Optional error data; explicit null is retained."
        }
      },
      "required": ["code", "message"],
      "additionalProperties": true
    },
    "ClientNotification": {
      "description": "A JSON-RPC notification object.",
      "type": "object",
      "properties": {
        "method": {
          "description": "The notification method name.",
          "type": "string"
        },
        "params": {
          "description": "Method-specific notification parameters.",
          "anyOf": [
            {
              "description": "All possible notifications that a client can send to an agent.\n\nThis enum is used internally for routing RPC notifications. You typically won't need\nto use this directly.\n\nNotifications do not expect a response.",
              "anyOf": [
                {
                  "title": "CancelSessionNotification",
                  "description": "Cancels ongoing operations for a session.\n\nThis is a notification sent by the client to cancel active work in a\nsession.\n\nUpon receiving this notification, the Agent SHOULD stop all language model\nrequests and all tool call invocations as soon as possible.\n\nAfter all ongoing operations have been successfully aborted and pending\nupdates have been sent, the Agent MUST send an idle `state_update` session\nupdate with the `cancelled` stop reason if cancellation ended active\nforeground work. No additional completion update is required if no\nforeground work was active.\n\nAfter cancellation completes, the Agent SHOULD ignore late answers rather\nthan use them to resume the cancelled work.\n\nAgents MUST catch errors caused by aborting cancelled work and report the\n`cancelled` stop reason, not `error`.\n\nThe Agent MAY send content or tool call updates after receiving\n`session/cancel`, but MUST send them before the idle `state_update` that\nreports cancellation.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#cancellation)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/CancelSessionNotification"
                    }
                  ]
                },
                {
                  "title": "MessageMcpNotification",
                  "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSends an MCP-over-ACP notification.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/MessageMcpNotification"
                    }
                  ]
                },
                {
                  "title": "ExtNotification",
                  "description": "Handles extension notifications from the client.\n\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ExtNotification"
                    }
                  ]
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["method"],
      "x-docs-ignore": true
    },
    "CancelSessionNotification": {
      "description": "Notification to cancel ongoing operations for a session.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#cancellation)",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The ID of the session to cancel operations for.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId"],
      "x-side": "agent",
      "x-method": "session/cancel"
    },
    "MessageMcpNotification": {
      "description": "**UNSTABLE**\n\nNotification for an active request, sent from provider to consumer.\nIncludes subscription acknowledgements and updates.",
      "type": "object",
      "properties": {
        "serverId": {
          "description": "The declared ACP MCP server handling the associated request.",
          "allOf": [
            {
              "$ref": "#/$defs/McpServerAcpId"
            }
          ]
        },
        "requestId": {
          "description": "The identifier of the active inner MCP request.",
          "allOf": [
            {
              "$ref": "#/$defs/McpRequestId"
            }
          ]
        },
        "method": {
          "description": "The inner MCP method name.",
          "type": "string"
        },
        "params": {
          "description": "Optional inner MCP params; null is equivalent to omission.",
          "type": ["object", "null"],
          "additionalProperties": true
        },
        "_meta": {
          "description": "ACP extension metadata (not inner MCP params._meta); null is equivalent to omission.",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["serverId", "requestId", "method"],
      "x-side": "agent",
      "x-method": "mcp/message"
    },
    "ProtocolLevelNotification": {
      "description": "A JSON-RPC notification object.",
      "type": "object",
      "properties": {
        "method": {
          "description": "The notification method name.",
          "type": "string"
        },
        "params": {
          "description": "Method-specific notification parameters.",
          "anyOf": [
            {
              "description": "General protocol-level notifications that all sides are expected to\nimplement.\n\nNotifications whose methods start with '$/' are messages which\nare protocol implementation dependent and might not be implementable in all\nclients or agents. For example if the implementation uses a single threaded\nsynchronous programming language then there is little it can do to react to\na `$/cancel_request` notification. If an agent or client receives\nnotifications starting with '$/' it is free to ignore the notification.\n\nNotifications do not expect a response.",
              "anyOf": [
                {
                  "title": "CancelRequestNotification",
                  "description": "Cancels an ongoing request.\n\nThis is a notification sent by the side that sent a request to cancel that request.\n\nUpon receiving this notification, the receiver:\n\n1. MAY 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/v2/draft/cancellation)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/CancelRequestNotification"
                    }
                  ]
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["method"],
      "x-docs-ignore": true
    },
    "CancelRequestNotification": {
      "description": "Notification to cancel an ongoing request.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/v2/draft/cancellation)",
      "type": "object",
      "properties": {
        "requestId": {
          "description": "The ID of the request to cancel.",
          "allOf": [
            {
              "$ref": "#/$defs/RequestId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["requestId"],
      "x-side": "protocol",
      "x-method": "$/cancel_request"
    }
  }
}
