{
  "$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": "StartNesResponse",
                    "description": "Successful result returned for a `nes/start` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/StartNesResponse"
                      }
                    ]
                  },
                  {
                    "title": "SuggestNesResponse",
                    "description": "Successful result returned for a `nes/suggest` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/SuggestNesResponse"
                      }
                    ]
                  },
                  {
                    "title": "CloseNesResponse",
                    "description": "Successful result returned for a `nes/close` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/CloseNesResponse"
                      }
                    ]
                  },
                  {
                    "title": "ExtMethodResponse",
                    "description": "Successful result returned by an extension method outside the core ACP method set.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/ExtResponse"
                      }
                    ]
                  },
                  {
                    "title": "MessageMcpResponse",
                    "description": "Successful result returned by an MCP-over-ACP `mcp/message` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/MessageMcpResponse"
                      }
                    ]
                  }
                ]
              }
            },
            "required": ["id", "result"]
          },
          {
            "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": "ConnectMcpResponse",
                    "description": "Successful result returned for a `mcp/connect` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/ConnectMcpResponse"
                      }
                    ]
                  },
                  {
                    "title": "DisconnectMcpResponse",
                    "description": "Successful result returned for a `mcp/disconnect` request.",
                    "allOf": [
                      {
                        "$ref": "#/$defs/DisconnectMcpResponse"
                      }
                    ]
                  },
                  {
                    "title": "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": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequests structured user input via a form or URL.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/CreateElicitationRequest"
                    }
                  ]
                },
                {
                  "title": "ConnectMcpRequest",
                  "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nOpens an MCP-over-ACP connection.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ConnectMcpRequest"
                    }
                  ]
                },
                {
                  "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": "DisconnectMcpRequest",
                  "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCloses an MCP-over-ACP connection.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/DisconnectMcpRequest"
                    }
                  ]
                },
                {
                  "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. When a client receives a tool call ID it\nhas 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": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nProgrammatic 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 means no metadata update; `null` is an\nexplicit clear signal. Implementations MUST NOT make assumptions about values at these 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": ["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\nPaths MUST be absolute. Surrounding commit metadata and email envelopes\nMUST NOT be included.",
          "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": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest from the agent to elicit structured user input.\n\nThe agent sends this to the client to request information from the user,\neither via a form or by directing them to a URL.\nElicitations are tied to a session (optionally a tool call) or a request.",
      "type": "object",
      "properties": {
        "message": {
          "description": "A human-readable message describing what input is needed.",
          "type": "string"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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": "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": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSession-scoped elicitation, optionally tied to a specific tool call.\n\nWhen `tool_call_id` is set, the elicitation is tied to a specific tool call.\nThis is useful when an agent receives an elicitation from an MCP server\nduring a tool call and needs to redirect it to the user.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The session this elicitation is tied to.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "toolCallId": {
          "description": "Optional tool call within the session.",
          "anyOf": [
            {
              "$ref": "#/$defs/ToolCallId"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        }
      },
      "required": ["sessionId"]
    },
    "ElicitationRequestScope": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest-scoped elicitation, tied to a specific JSON-RPC request outside of a session\n(e.g., during auth/configuration phases before any session is started).",
      "type": "object",
      "properties": {
        "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.",
          "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.",
          "type": ["array", "null"],
          "items": {
            "type": "string"
          }
        },
        "description": {
          "description": "Optional description of what this schema represents.",
          "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
        }
      }
    },
    "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.",
          "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": ["const", "title"]
    },
    "StringPropertySchema": {
      "description": "Schema for string properties in an elicitation form.\n\nWhen `enum` or `oneOf` is set, this represents a single-select enum\nwith `\"type\": \"string\"`.",
      "type": "object",
      "properties": {
        "title": {
          "description": "Optional title for the property.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "description": {
          "description": "Human-readable description.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "minLength": {
          "description": "Minimum string length.",
          "type": ["integer", "null"],
          "format": "uint32",
          "minimum": 0
        },
        "maxLength": {
          "description": "Maximum string length.",
          "type": ["integer", "null"],
          "format": "uint32",
          "minimum": 0
        },
        "pattern": {
          "description": "Pattern the string must match.",
          "type": ["string", "null"],
          "format": "regex"
        },
        "format": {
          "description": "String format.",
          "anyOf": [
            {
              "$ref": "#/$defs/StringFormat"
            },
            {
              "type": "null"
            }
          ]
        },
        "default": {
          "description": "Default value.",
          "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.",
          "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.",
          "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\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.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "description": {
          "description": "Human-readable description.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "minimum": {
          "description": "Minimum value (inclusive).",
          "type": ["number", "null"],
          "format": "double"
        },
        "maximum": {
          "description": "Maximum value (inclusive).",
          "type": ["number", "null"],
          "format": "double"
        },
        "default": {
          "description": "Default value.",
          "type": ["number", "null"],
          "format": "double",
          "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
        }
      }
    },
    "IntegerPropertySchema": {
      "description": "Schema for integer properties in an elicitation form.",
      "type": "object",
      "properties": {
        "title": {
          "description": "Optional title for the property.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "description": {
          "description": "Human-readable description.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "minimum": {
          "description": "Minimum value (inclusive).",
          "type": ["integer", "null"],
          "format": "int64"
        },
        "maximum": {
          "description": "Maximum value (inclusive).",
          "type": ["integer", "null"],
          "format": "int64"
        },
        "default": {
          "description": "Default value.",
          "type": ["integer", "null"],
          "format": "int64",
          "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
        }
      }
    },
    "BooleanPropertySchema": {
      "description": "Schema for boolean properties in an elicitation form.",
      "type": "object",
      "properties": {
        "title": {
          "description": "Optional title for the property.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "description": {
          "description": "Human-readable description.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "default": {
          "description": "Default value.",
          "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\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\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\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.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "description": {
          "description": "Human-readable description.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "minItems": {
          "description": "Minimum number of items to select.",
          "type": ["integer", "null"],
          "format": "uint64",
          "minimum": 0
        },
        "maxItems": {
          "description": "Maximum number of items to select.",
          "type": ["integer", "null"],
          "format": "uint64",
          "minimum": 0
        },
        "items": {
          "description": "The items definition describing allowed values.",
          "allOf": [
            {
              "$ref": "#/$defs/MultiSelectItems"
            }
          ]
        },
        "default": {
          "description": "Default selected values.",
          "type": ["array", "null"],
          "items": {
            "type": "string"
          },
          "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": ["items"]
    },
    "ElicitationFormMode": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nForm-based elicitation mode where the client renders a form from the provided schema.",
      "type": "object",
      "properties": {
        "requestedSchema": {
          "description": "A JSON Schema describing the form fields to present to the user.",
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationSchema"
            }
          ]
        }
      },
      "anyOf": [
        {
          "title": "Session",
          "description": "Tied to a session, optionally to a specific tool call within that session.",
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationSessionScope"
            }
          ]
        },
        {
          "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": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for an elicitation.",
      "type": "string"
    },
    "ElicitationUrlMode": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nURL-based elicitation mode where the client directs the user to a URL.",
      "type": "object",
      "properties": {
        "elicitationId": {
          "description": "The unique identifier for this elicitation.",
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationId"
            }
          ]
        },
        "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"]
    },
    "ConnectMcpRequest": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `mcp/connect`.",
      "type": "object",
      "properties": {
        "serverId": {
          "description": "The ACP MCP server ID that was provided by the component declaring the MCP server.",
          "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": ["serverId"],
      "x-side": "client",
      "x-method": "mcp/connect"
    },
    "McpServerAcpId": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for an MCP server using the ACP transport.\n\nThe value is opaque and generated by the ACP component providing the MCP server. It is\nused by `mcp/connect` to route connection requests back to the component that declared the\nserver.",
      "type": "string"
    },
    "MessageMcpRequest": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `mcp/message`.",
      "type": "object",
      "properties": {
        "connectionId": {
          "description": "The MCP-over-ACP connection this message is sent on.",
          "allOf": [
            {
              "$ref": "#/$defs/McpConnectionId"
            }
          ]
        },
        "method": {
          "description": "The inner MCP method name.",
          "type": "string"
        },
        "params": {
          "description": "Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params.",
          "type": ["object", "null"],
          "additionalProperties": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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": ["connectionId", "method"],
      "x-side": "both",
      "x-method": "mcp/message"
    },
    "McpConnectionId": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA unique identifier for an active MCP-over-ACP connection.",
      "type": "string"
    },
    "DisconnectMcpRequest": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `mcp/disconnect`.",
      "type": "object",
      "properties": {
        "connectionId": {
          "description": "The MCP-over-ACP connection to close.",
          "allOf": [
            {
              "$ref": "#/$defs/McpConnectionId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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": ["connectionId"],
      "x-side": "client",
      "x-method": "mcp/disconnect"
    },
    "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": "StartNesResponse",
                  "description": "Successful result returned for a `nes/start` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/StartNesResponse"
                    }
                  ]
                },
                {
                  "title": "SuggestNesResponse",
                  "description": "Successful result returned for a `nes/suggest` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/SuggestNesResponse"
                    }
                  ]
                },
                {
                  "title": "CloseNesResponse",
                  "description": "Successful result returned for a `nes/close` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/CloseNesResponse"
                    }
                  ]
                },
                {
                  "title": "ExtMethodResponse",
                  "description": "Successful result returned by an extension method outside the core ACP method set.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ExtResponse"
                    }
                  ]
                },
                {
                  "title": "MessageMcpResponse",
                  "description": "Successful result returned by an MCP-over-ACP `mcp/message` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/MessageMcpResponse"
                    }
                  ]
                }
              ]
            }
          },
          "required": ["id", "result"]
        },
        {
          "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/prompt`,\n`session/cancel`, and `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
        },
        "nes": {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNES (Next Edit Suggestions) capabilities supported by the agent.\n\nOptional. Omitted or `null` both mean the agent does not advertise support\nfor NES methods.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "positionEncoding": {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe position encoding selected by the agent from the client's supported encodings.",
          "anyOf": [
            {
              "$ref": "#/$defs/PositionEncodingKind"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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
        },
        "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
        }
      }
    },
    "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
        }
      }
    },
    "NesCapabilities": {
      "description": "NES capabilities advertised by the agent during initialization.\n\nSupplying `{}` means the agent supports the NES method surface. Omitted or\n`null` both mean the agent does not advertise support for `nes/*` methods.",
      "type": "object",
      "properties": {
        "events": {
          "description": "Events the agent wants to receive.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesEventCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "context": {
          "description": "Context the agent wants attached to each suggestion request.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesContextCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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
        }
      }
    },
    "NesEventCapabilities": {
      "description": "Event capabilities the agent can consume.",
      "type": "object",
      "properties": {
        "document": {
          "description": "Document event capabilities.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesDocumentEventCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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
        }
      }
    },
    "NesDocumentEventCapabilities": {
      "description": "Document event capabilities the agent wants to receive.",
      "type": "object",
      "properties": {
        "didOpen": {
          "description": "Whether the agent wants `document/didOpen` events.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesDocumentDidOpenCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "didChange": {
          "description": "Whether the agent wants `document/didChange` events, and the sync kind.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesDocumentDidChangeCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "didClose": {
          "description": "Whether the agent wants `document/didClose` events.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesDocumentDidCloseCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "didSave": {
          "description": "Whether the agent wants `document/didSave` events.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesDocumentDidSaveCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "didFocus": {
          "description": "Whether the agent wants `document/didFocus` events.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesDocumentDidFocusCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "NesDocumentDidOpenCapabilities": {
      "description": "Marker for `document/didOpen` capability support.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "NesDocumentDidChangeCapabilities": {
      "description": "Capabilities for `document/didChange` events.",
      "type": "object",
      "properties": {
        "syncKind": {
          "description": "The sync kind the agent wants: `\"full\"` or `\"incremental\"`.",
          "allOf": [
            {
              "$ref": "#/$defs/TextDocumentSyncKind"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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": ["syncKind"]
    },
    "TextDocumentSyncKind": {
      "description": "How the agent wants document changes delivered.",
      "oneOf": [
        {
          "description": "Client sends the entire file content on each change.",
          "type": "string",
          "const": "full"
        },
        {
          "description": "Client sends only the changed ranges.",
          "type": "string",
          "const": "incremental"
        }
      ]
    },
    "NesDocumentDidCloseCapabilities": {
      "description": "Marker for `document/didClose` capability support.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "NesDocumentDidSaveCapabilities": {
      "description": "Marker for `document/didSave` capability support.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "NesDocumentDidFocusCapabilities": {
      "description": "Marker for `document/didFocus` capability support.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "NesContextCapabilities": {
      "description": "Context capabilities the agent wants attached to each suggestion request.",
      "type": "object",
      "properties": {
        "recentFiles": {
          "description": "Whether the agent wants recent files context.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesRecentFilesCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "relatedSnippets": {
          "description": "Whether the agent wants related snippets context.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesRelatedSnippetsCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "editHistory": {
          "description": "Whether the agent wants edit history context.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesEditHistoryCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "userActions": {
          "description": "Whether the agent wants user actions context.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesUserActionsCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "openFiles": {
          "description": "Whether the agent wants open files context.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesOpenFilesCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "diagnostics": {
          "description": "Whether the agent wants diagnostics context.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesDiagnosticsCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "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
        }
      }
    },
    "NesRecentFilesCapabilities": {
      "description": "Capabilities for recent files context.",
      "type": "object",
      "properties": {
        "maxCount": {
          "description": "Maximum number of recent files the agent can use.",
          "type": ["integer", "null"],
          "format": "uint32",
          "minimum": 0,
          "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
        }
      }
    },
    "NesRelatedSnippetsCapabilities": {
      "description": "Capabilities for related snippets context.",
      "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
        }
      }
    },
    "NesEditHistoryCapabilities": {
      "description": "Capabilities for edit history context.",
      "type": "object",
      "properties": {
        "maxCount": {
          "description": "Maximum number of edit history entries the agent can use.",
          "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
        }
      }
    },
    "NesUserActionsCapabilities": {
      "description": "Capabilities for user actions context.",
      "type": "object",
      "properties": {
        "maxCount": {
          "description": "Maximum number of user actions the agent can use.",
          "type": ["integer", "null"],
          "format": "uint32",
          "minimum": 0,
          "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
        }
      }
    },
    "NesOpenFilesCapabilities": {
      "description": "Capabilities for open files context.",
      "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
        }
      }
    },
    "NesDiagnosticsCapabilities": {
      "description": "Capabilities for diagnostics context.",
      "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
        }
      }
    },
    "PositionEncodingKind": {
      "description": "The encoding used for character offsets in positions.\n\nFollows the same conventions as LSP 3.17. The default is UTF-16.",
      "oneOf": [
        {
          "description": "Character offsets count UTF-16 code units. This is the default.",
          "type": "string",
          "const": "utf-16"
        },
        {
          "description": "Character offsets count Unicode code points.",
          "type": "string",
          "const": "utf-32"
        },
        {
          "description": "Character offsets count UTF-8 code units (bytes).",
          "type": "string",
          "const": "utf-8"
        }
      ]
    },
    "AuthMethod": {
      "description": "Describes an available authentication method.\n\nThe `type` field acts as the discriminator in the serialized JSON form.",
      "anyOf": [
        {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUser provides a key that the client passes to the agent as an environment variable.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "env_var"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/AuthMethodEnvVar"
            }
          ]
        },
        {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nClient runs an interactive terminal for the user to authenticate via a TUI.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "terminal"
            }
          },
          "required": ["type"],
          "allOf": [
            {
              "$ref": "#/$defs/AuthMethodTerminal"
            }
          ]
        },
        {
          "description": "Agent handles authentication itself.\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": "env_var"
                  }
                },
                "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"
    },
    "AuthEnvVar": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nDescribes a single environment variable for an [`AuthMethodEnvVar`] authentication method.",
      "type": "object",
      "properties": {
        "name": {
          "description": "The environment variable name (e.g. `\"OPENAI_API_KEY\"`).",
          "type": "string"
        },
        "label": {
          "description": "Human-readable label for this variable, displayed in client UI.",
          "type": ["string", "null"],
          "x-deserialize-default-on-error": true
        },
        "secret": {
          "description": "Whether this value is a secret (e.g. API key, token).\nClients should use a password-style input for secret vars.\n\nDefaults to `true`.",
          "type": "boolean",
          "x-deserialize-default-on-error": true,
          "default": true
        },
        "optional": {
          "description": "Whether this variable is optional.\n\nDefaults to `false`.",
          "type": "boolean",
          "x-deserialize-default-on-error": true,
          "default": false
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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"]
    },
    "AuthMethodEnvVar": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nEnvironment variable authentication method.\n\nThe user provides credentials that the client passes to the agent as environment variables.",
      "type": "object",
      "properties": {
        "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
        },
        "vars": {
          "description": "The environment variables the client should set.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/AuthEnvVar"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "link": {
          "description": "Optional link to a page where the user can obtain their credentials.",
          "type": ["string", "null"],
          "format": "uri",
          "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", "vars"]
    },
    "EnvVariable": {
      "description": "An environment variable to set when launching an MCP server.",
      "type": "object",
      "properties": {
        "name": {
          "description": "The name of the environment variable.",
          "type": "string"
        },
        "value": {
          "description": "The value to set for the environment variable.",
          "type": "string"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nTerminal-based authentication method.\n\nThe client runs an interactive terminal for the user to authenticate via a TUI.",
      "type": "object",
      "properties": {
        "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 pass when running the agent binary for terminal auth.",
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "env": {
          "description": "Additional environment variables to set when running the agent binary for terminal auth.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/EnvVariable"
          },
          "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": ["methodId", "name"]
    },
    "AuthMethodAgent": {
      "description": "Agent handles authentication itself.\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\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
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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"]
    },
    "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
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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.",
      "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
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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 accepted.\n\nThis response does not indicate that the agent has finished processing.\nProcessing and completion are reported through `state_update` session updates.\n\nSee protocol docs: [Prompt Accepted](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#2-prompt-accepted)",
      "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/prompt"
    },
    "StartNesResponse": {
      "description": "Response to `nes/start`.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The session ID for the newly started NES session.",
          "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": "nes/start"
    },
    "SuggestNesResponse": {
      "description": "Response to `nes/suggest`.",
      "type": "object",
      "properties": {
        "suggestions": {
          "description": "The list of suggestions.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/NesSuggestion"
          }
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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": ["suggestions"],
      "x-side": "agent",
      "x-method": "nes/suggest"
    },
    "NesSuggestion": {
      "description": "A suggestion returned by the agent.",
      "anyOf": [
        {
          "description": "A text edit suggestion.",
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "edit"
            }
          },
          "required": ["kind"],
          "allOf": [
            {
              "$ref": "#/$defs/NesEditSuggestion"
            }
          ]
        },
        {
          "description": "A jump-to-location suggestion.",
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "jump"
            }
          },
          "required": ["kind"],
          "allOf": [
            {
              "$ref": "#/$defs/NesJumpSuggestion"
            }
          ]
        },
        {
          "description": "A rename symbol suggestion.",
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "rename"
            }
          },
          "required": ["kind"],
          "allOf": [
            {
              "$ref": "#/$defs/NesRenameSuggestion"
            }
          ]
        },
        {
          "description": "A search-and-replace suggestion.",
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "searchAndReplace"
            }
          },
          "required": ["kind"],
          "allOf": [
            {
              "$ref": "#/$defs/NesSearchAndReplaceSuggestion"
            }
          ]
        },
        {
          "title": "other",
          "description": "Custom or future NES suggestion.\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 suggestion kind should preserve\nthe raw payload when storing, replaying, proxying, or forwarding\nsuggestions, and otherwise ignore it or display it generically.",
          "type": "object",
          "properties": {
            "kind": {
              "description": "Custom or future NES suggestion 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"
            },
            "suggestionId": {
              "description": "Unique identifier for accept/reject tracking.",
              "allOf": [
                {
                  "$ref": "#/$defs/NesSuggestionId"
                }
              ]
            }
          },
          "required": ["kind", "suggestionId"],
          "not": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "edit"
                  }
                },
                "required": ["kind"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "jump"
                  }
                },
                "required": ["kind"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "rename"
                  }
                },
                "required": ["kind"]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "searchAndReplace"
                  }
                },
                "required": ["kind"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "NesSuggestionId": {
      "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 NES suggestion.",
      "type": "string"
    },
    "NesTextEdit": {
      "description": "A text edit within a suggestion.",
      "type": "object",
      "properties": {
        "range": {
          "description": "The range to replace.",
          "allOf": [
            {
              "$ref": "#/$defs/Range"
            }
          ]
        },
        "newText": {
          "description": "The replacement text.",
          "type": "string"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["range", "newText"]
    },
    "Range": {
      "description": "A range in a text document, expressed as start and end positions.",
      "type": "object",
      "properties": {
        "start": {
          "description": "The start position (inclusive).",
          "allOf": [
            {
              "$ref": "#/$defs/Position"
            }
          ]
        },
        "end": {
          "description": "The end position (exclusive).",
          "allOf": [
            {
              "$ref": "#/$defs/Position"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["start", "end"]
    },
    "Position": {
      "description": "A zero-based position in a text document.\n\nThe meaning of `character` depends on the negotiated position encoding.",
      "type": "object",
      "properties": {
        "line": {
          "description": "Zero-based line number.",
          "type": "integer",
          "format": "uint32",
          "minimum": 0
        },
        "character": {
          "description": "Zero-based character offset (encoding-dependent).",
          "type": "integer",
          "format": "uint32",
          "minimum": 0
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["line", "character"]
    },
    "NesEditSuggestion": {
      "description": "A text edit suggestion.",
      "type": "object",
      "properties": {
        "suggestionId": {
          "description": "Unique identifier for accept/reject tracking.",
          "allOf": [
            {
              "$ref": "#/$defs/NesSuggestionId"
            }
          ]
        },
        "uri": {
          "description": "The URI of the file to edit.",
          "type": "string",
          "format": "uri"
        },
        "edits": {
          "description": "The text edits to apply. Must contain at least one edit.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/NesTextEdit"
          },
          "minItems": 1
        },
        "cursorPosition": {
          "description": "Optional suggested cursor position after applying edits.",
          "anyOf": [
            {
              "$ref": "#/$defs/Position"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["suggestionId", "uri", "edits"]
    },
    "NesJumpSuggestion": {
      "description": "A jump-to-location suggestion.",
      "type": "object",
      "properties": {
        "suggestionId": {
          "description": "Unique identifier for accept/reject tracking.",
          "allOf": [
            {
              "$ref": "#/$defs/NesSuggestionId"
            }
          ]
        },
        "uri": {
          "description": "The file to navigate to.",
          "type": "string",
          "format": "uri"
        },
        "position": {
          "description": "The target position within the file.",
          "allOf": [
            {
              "$ref": "#/$defs/Position"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["suggestionId", "uri", "position"]
    },
    "NesRenameSuggestion": {
      "description": "A rename symbol suggestion.",
      "type": "object",
      "properties": {
        "suggestionId": {
          "description": "Unique identifier for accept/reject tracking.",
          "allOf": [
            {
              "$ref": "#/$defs/NesSuggestionId"
            }
          ]
        },
        "uri": {
          "description": "The file URI containing the symbol.",
          "type": "string",
          "format": "uri"
        },
        "position": {
          "description": "The position of the symbol to rename.",
          "allOf": [
            {
              "$ref": "#/$defs/Position"
            }
          ]
        },
        "newName": {
          "description": "The new name for the symbol.",
          "type": "string"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["suggestionId", "uri", "position", "newName"]
    },
    "NesSearchAndReplaceSuggestion": {
      "description": "A search-and-replace suggestion.",
      "type": "object",
      "properties": {
        "suggestionId": {
          "description": "Unique identifier for accept/reject tracking.",
          "allOf": [
            {
              "$ref": "#/$defs/NesSuggestionId"
            }
          ]
        },
        "uri": {
          "description": "The file URI to search within.",
          "type": "string",
          "format": "uri"
        },
        "search": {
          "description": "The text or pattern to find.",
          "type": "string"
        },
        "replace": {
          "description": "The replacement text.",
          "type": "string"
        },
        "isRegex": {
          "description": "Whether `search` is a regular expression. Defaults to `false`.",
          "type": ["boolean", "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": ["suggestionId", "uri", "search", "replace"]
    },
    "CloseNesResponse": {
      "description": "Response from closing an NES 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": "nes/close"
    },
    "ExtResponse": {
      "description": "Allows for sending an arbitrary response to an [`ExtRequest`] that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)"
    },
    "MessageMcpResponse": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `mcp/message`.\n\nThis is the inner MCP response result payload. Any JSON value is valid.",
      "x-side": "both",
      "x-method": "mcp/message"
    },
    "Error": {
      "description": "JSON-RPC error object.\n\nRepresents an error that occurred during method execution, following the\nJSON-RPC 2.0 error object specification with optional additional data.\n\nSee protocol docs: [JSON-RPC Error Object](https://www.jsonrpc.org/specification#error_object)",
      "type": "object",
      "properties": {
        "code": {
          "description": "A number indicating the error type that occurred.\nThis must be an integer as defined in the JSON-RPC specification.",
          "allOf": [
            {
              "$ref": "#/$defs/ErrorCode"
            }
          ]
        },
        "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": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNotification that a URL-based elicitation has completed.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/CompleteElicitationNotification"
                    }
                  ]
                },
                {
                  "title": "MessageMcpNotification",
                  "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nReceives an MCP-over-ACP notification.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/MessageMcpNotification"
                    }
                  ]
                },
                {
                  "title": "ExtNotification",
                  "description": "Handles extension notifications from the agent.\n\nAllows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/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": "The state of the agent's foreground work has changed.",
          "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"
            }
          ]
        },
        {
          "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"]
              }
            ]
          },
          "additionalProperties": true
        }
      ]
    },
    "MessageId": {
      "description": "Unique identifier for a message within a session.",
      "type": "string"
    },
    "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. Implementations MUST NOT make assumptions about values at\nthese keys. Omitted means no metadata update; `null` is an explicit clear signal.\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"]
    },
    "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. Implementations MUST NOT make assumptions about values at\nthese keys. Omitted means no metadata update; `null` is an explicit clear signal.\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"]
    },
    "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. Implementations MUST NOT make assumptions about values at\nthese keys. Omitted means no metadata update; `null` is an explicit clear signal.\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"]
    },
    "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
        }
      }
    },
    "StopReason": {
      "description": "Reasons why an agent stops active session work.\n\nSee protocol docs: [Stop Reasons](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#stop-reasons)",
      "anyOf": [
        {
          "description": "The active work ended successfully.",
          "type": "string",
          "const": "end_turn"
        },
        {
          "description": "The active work ended because the agent reached the maximum number of tokens.",
          "type": "string",
          "const": "max_tokens"
        },
        {
          "description": "The active work ended because the agent reached the maximum number of\nallowed agent requests before returning idle.",
          "type": "string",
          "const": "max_turn_requests"
        },
        {
          "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": "string",
          "const": "refusal"
        },
        {
          "description": "Active session work was cancelled by the client via `session/cancel`.\n\nAgents should report this stop reason on an idle `state_update` session update\nwhen cancellation succeeds, even if cancellation causes exceptions in\nunderlying operations.",
          "type": "string",
          "const": "cancelled"
        },
        {
          "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": "string"
        }
      ]
    },
    "Usage": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nToken usage 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": "The agent is ready to process a new prompt.",
      "type": "object",
      "properties": {
        "stopReason": {
          "description": "Indicates why foreground work stopped.\n\nOptional. Omitted or `null` both mean the agent is not reporting a stop reason.\nAgents SHOULD include this when the idle transition ends foreground work.",
          "anyOf": [
            {
              "$ref": "#/$defs/StopReason"
            },
            {
              "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 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
        }
      }
    },
    "RequiresActionStateUpdate": {
      "description": "Foreground work is blocked on user action.",
      "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
        }
      }
    },
    "StateUpdate": {
      "description": "The state of the agent's foreground work has changed.\n\nBackground activity can continue and emit other `session/update` notifications\nwhile `idle`. Those notifications do not change this state.",
      "anyOf": [
        {
          "description": "Foreground work is in progress.",
          "type": "object",
          "properties": {
            "state": {
              "type": "string",
              "const": "running"
            }
          },
          "required": ["state"],
          "allOf": [
            {
              "$ref": "#/$defs/RunningStateUpdate"
            }
          ]
        },
        {
          "description": "The agent is ready to process a new prompt.",
          "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"
            }
          ]
        },
        {
          "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"]
              }
            ]
          },
          "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. When the terminal ID is new, omitted\nfields 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 means no metadata update; `null` is an\nexplicit clear signal. Implementations MUST NOT make assumptions about values at these 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": ["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"]
    },
    "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"]
    },
    "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.",
      "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 means no metadata update; `null` is an\nexplicit clear signal. Implementations MUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "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"]
    },
    "CompleteElicitationNotification": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNotification sent by the agent when a URL-based elicitation is complete.",
      "type": "object",
      "properties": {
        "elicitationId": {
          "description": "The ID of the elicitation that completed.",
          "allOf": [
            {
              "$ref": "#/$defs/ElicitationId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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": ["elicitationId"],
      "x-side": "client",
      "x-method": "elicitation/complete"
    },
    "MessageMcpNotification": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNotification parameters for `mcp/message`.\n\nThis is used when the wrapped MCP message is a notification and the outer JSON-RPC\nenvelope has no `id`.",
      "type": "object",
      "properties": {
        "connectionId": {
          "description": "The MCP-over-ACP connection this message is sent on.",
          "allOf": [
            {
              "$ref": "#/$defs/McpConnectionId"
            }
          ]
        },
        "method": {
          "description": "The inner MCP method name.",
          "type": "string"
        },
        "params": {
          "description": "Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params.",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": 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": ["connectionId", "method"],
      "x-side": "both",
      "x-method": "mcp/message"
    },
    "ExtNotification": {
      "description": "Allows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/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 NOT call this method\nwhen `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 client\nto authenticate again. There is no guarantee about the behavior of already\nrunning 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.",
                  "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\nconversation 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\nThis request accepts the prompt:\n- Receives user messages with optional context (files, images, etc.)\n- Returns once the prompt is accepted\n\nAfter acceptance, the Agent reports the accepted user message,\nprocessing state, output, tool calls, and completion through\n`session/update` notifications.\n\nSee protocol docs: [Prompt Lifecycle](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/PromptRequest"
                    }
                  ]
                },
                {
                  "title": "StartNesRequest",
                  "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nStarts an NES session.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/StartNesRequest"
                    }
                  ]
                },
                {
                  "title": "SuggestNesRequest",
                  "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequests a code suggestion.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/SuggestNesRequest"
                    }
                  ]
                },
                {
                  "title": "CloseNesRequest",
                  "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCloses an active NES session and frees up any resources associated with it.\n\nThe agent must cancel any ongoing work and then free up any resources\nassociated with the NES session.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/CloseNesRequest"
                    }
                  ]
                },
                {
                  "title": "MessageMcpRequest",
                  "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nExchanges an MCP-over-ACP message.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/MessageMcpRequest"
                    }
                  ]
                },
                {
                  "title": "ExtMethodRequest",
                  "description": "Handles extension method requests from the client.\n\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/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": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAuthentication capabilities supported by the client.\nDetermines which authentication method types the agent may include\nin its `InitializeResponse`.\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": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nElicitation capabilities supported by the client.\nDetermines which elicitation modes the agent may use.\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
        },
        "nes": {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNES (Next Edit Suggestions) capabilities supported by the client.\n\nOptional. Omitted or `null` both mean the client does not advertise any\nNES suggestion-kind extensions.",
          "anyOf": [
            {
              "$ref": "#/$defs/ClientNesCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "positionEncodings": {
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe position encodings supported by the client, in order of preference.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/PositionEncodingKind"
          },
          "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
        }
      }
    },
    "AuthCapabilities": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAuthentication capabilities supported by the client.\n\nAdvertised during initialization to inform the agent which authentication\nmethod types the client can handle. This governs opt-in types that require\nadditional client-side support.",
      "type": "object",
      "properties": {
        "terminal": {
          "description": "Whether the client supports `terminal` authentication methods.\n\nOptional. Omitted or `null` both mean the client does not advertise support.\nSupplying `{}` means the agent 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": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for terminal authentication methods.\n\nSupplying `{}` means the client supports terminal authentication 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
        }
      }
    },
    "ElicitationCapabilities": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nElicitation capabilities supported by the client.",
      "type": "object",
      "properties": {
        "form": {
          "description": "Whether the client supports form-based elicitation.\n\nOptional. Omitted or `null` both mean the client does not advertise support.\nSupplying `{}` means the client supports form-based elicitation.",
          "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\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "ElicitationFormCapabilities": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nForm-based elicitation capabilities.\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\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "ElicitationUrlCapabilities": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nURL-based elicitation capabilities.\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\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "ClientNesCapabilities": {
      "description": "NES capabilities advertised by the client during initialization.",
      "type": "object",
      "properties": {
        "jump": {
          "description": "Whether the client supports the `jump` suggestion kind.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesJumpCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "rename": {
          "description": "Whether the client supports the `rename` suggestion kind.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesRenameCapabilities"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "searchAndReplace": {
          "description": "Whether the client supports the `searchAndReplace` suggestion kind.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesSearchAndReplaceCapabilities"
            },
            {
              "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
        }
      }
    },
    "NesJumpCapabilities": {
      "description": "Marker for jump suggestion support.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "NesRenameCapabilities": {
      "description": "Marker for rename suggestion support.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      }
    },
    "NesSearchAndReplaceCapabilities": {
      "description": "Marker for search and replace suggestion support.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/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"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "mcpServers": {
          "description": "List of MCP (Model Context Protocol) servers the agent should connect to.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/McpServer"
          },
          "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": ["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/connect`, `mcp/message`, and `mcp/disconnect`.",
      "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"]
    },
    "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"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "mcpServers": {
          "description": "List of MCP servers to connect to for this session.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/McpServer"
          },
          "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", "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 prior 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"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "mcpServers": {
          "description": "List of MCP servers to connect to for this session.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/McpServer"
          },
          "x-deserialize-default-on-error": true,
          "x-deserialize-skip-invalid-items": true
        },
        "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 the whole\nconversation before responding.",
          "anyOf": [
            {
              "$ref": "#/$defs/ReplayFrom"
            },
            {
              "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": ["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 the whole conversation 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\nReceivers that do not understand this cursor should preserve the raw\npayload when storing, replaying, proxying, or forwarding requests, and\notherwise reject the request rather than guessing where to replay from.",
          "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 the conversation.",
      "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.",
      "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"
    },
    "StartNesRequest": {
      "description": "Request to start an NES session.",
      "type": "object",
      "properties": {
        "workspaceUri": {
          "description": "The root URI of the workspace.",
          "type": ["string", "null"],
          "format": "uri",
          "x-deserialize-default-on-error": true
        },
        "workspaceFolders": {
          "description": "The workspace folders.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/WorkspaceFolder"
          }
        },
        "repository": {
          "description": "Repository metadata, if the workspace is a git repository.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesRepository"
            },
            {
              "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
        }
      },
      "x-side": "agent",
      "x-method": "nes/start"
    },
    "WorkspaceFolder": {
      "description": "A workspace folder.",
      "type": "object",
      "properties": {
        "uri": {
          "description": "The URI of the folder.",
          "type": "string",
          "format": "uri"
        },
        "name": {
          "description": "The display name of the folder.",
          "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": ["uri", "name"]
    },
    "NesRepository": {
      "description": "Repository metadata for an NES session.",
      "type": "object",
      "properties": {
        "name": {
          "description": "The repository name.",
          "type": "string"
        },
        "owner": {
          "description": "The repository owner.",
          "type": "string"
        },
        "remoteUrl": {
          "description": "The remote URL of the repository.",
          "type": "string"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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", "owner", "remoteUrl"]
    },
    "SuggestNesRequest": {
      "description": "Request for a code suggestion.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The session ID for this request.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "uri": {
          "description": "The URI of the document to suggest for.",
          "type": "string",
          "format": "uri"
        },
        "version": {
          "description": "The version number of the document.",
          "type": "integer",
          "format": "int64"
        },
        "position": {
          "description": "The current cursor position.",
          "allOf": [
            {
              "$ref": "#/$defs/Position"
            }
          ]
        },
        "selection": {
          "description": "The current text selection range, if any.",
          "anyOf": [
            {
              "$ref": "#/$defs/Range"
            },
            {
              "type": "null"
            }
          ]
        },
        "triggerKind": {
          "description": "What triggered this suggestion request.",
          "allOf": [
            {
              "$ref": "#/$defs/NesTriggerKind"
            }
          ]
        },
        "context": {
          "description": "Context for the suggestion, included based on agent capabilities.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesSuggestContext"
            },
            {
              "type": "null"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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", "uri", "version", "position", "triggerKind"],
      "x-side": "agent",
      "x-method": "nes/suggest"
    },
    "NesTriggerKind": {
      "description": "What triggered the suggestion request.",
      "anyOf": [
        {
          "description": "Triggered by user typing or cursor movement.",
          "type": "string",
          "const": "automatic"
        },
        {
          "description": "Triggered by a diagnostic appearing at or near the cursor.",
          "type": "string",
          "const": "diagnostic"
        },
        {
          "description": "Triggered by an explicit user action (keyboard shortcut).",
          "type": "string",
          "const": "manual"
        },
        {
          "title": "Other",
          "description": "Custom or future suggestion trigger 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"
        }
      ]
    },
    "NesSuggestContext": {
      "description": "Context attached to a suggestion request.",
      "type": "object",
      "properties": {
        "recentFiles": {
          "description": "Recently accessed files.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/NesRecentFile"
          }
        },
        "relatedSnippets": {
          "description": "Related code snippets.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/NesRelatedSnippet"
          }
        },
        "editHistory": {
          "description": "Recent edit history.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/NesEditHistoryEntry"
          }
        },
        "userActions": {
          "description": "Recent user actions (typing, navigation, etc.).",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/NesUserAction"
          }
        },
        "openFiles": {
          "description": "Currently open files in the editor.",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/NesOpenFile"
          }
        },
        "diagnostics": {
          "description": "Current diagnostics (errors, warnings).",
          "type": ["array", "null"],
          "items": {
            "$ref": "#/$defs/NesDiagnostic"
          }
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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
        }
      }
    },
    "NesRecentFile": {
      "description": "A recently accessed file.",
      "type": "object",
      "properties": {
        "uri": {
          "description": "The URI of the file.",
          "type": "string",
          "format": "uri"
        },
        "languageId": {
          "description": "The language identifier.",
          "type": "string"
        },
        "text": {
          "description": "The full text content of the file.",
          "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": ["uri", "languageId", "text"]
    },
    "NesRelatedSnippet": {
      "description": "A related code snippet from a file.",
      "type": "object",
      "properties": {
        "uri": {
          "description": "The URI of the file containing the snippets.",
          "type": "string",
          "format": "uri"
        },
        "excerpts": {
          "description": "The code excerpts.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/NesExcerpt"
          }
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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": ["uri", "excerpts"]
    },
    "NesExcerpt": {
      "description": "A code excerpt from a file.",
      "type": "object",
      "properties": {
        "startLine": {
          "description": "The start line of the excerpt (zero-based).",
          "type": "integer",
          "format": "uint32",
          "minimum": 0
        },
        "endLine": {
          "description": "The end line of the excerpt (zero-based).",
          "type": "integer",
          "format": "uint32",
          "minimum": 0
        },
        "text": {
          "description": "The text content of the excerpt.",
          "type": "string"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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": ["startLine", "endLine", "text"]
    },
    "NesEditHistoryEntry": {
      "description": "An entry in the edit history.",
      "type": "object",
      "properties": {
        "uri": {
          "description": "The URI of the edited file.",
          "type": "string",
          "format": "uri"
        },
        "diff": {
          "description": "A diff representing the edit.",
          "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": ["uri", "diff"]
    },
    "NesUserAction": {
      "description": "A user action (typing, cursor movement, etc.).",
      "type": "object",
      "properties": {
        "action": {
          "description": "The kind of action (e.g., \"insertChar\", \"cursorMovement\").",
          "type": "string"
        },
        "uri": {
          "description": "The URI of the file where the action occurred.",
          "type": "string",
          "format": "uri"
        },
        "position": {
          "description": "The position where the action occurred.",
          "allOf": [
            {
              "$ref": "#/$defs/Position"
            }
          ]
        },
        "timestampMs": {
          "description": "Timestamp in milliseconds since epoch.",
          "type": "integer",
          "format": "uint64",
          "minimum": 0
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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": ["action", "uri", "position", "timestampMs"]
    },
    "NesOpenFile": {
      "description": "An open file in the editor.",
      "type": "object",
      "properties": {
        "uri": {
          "description": "The URI of the file.",
          "type": "string",
          "format": "uri"
        },
        "languageId": {
          "description": "The language identifier.",
          "type": "string"
        },
        "visibleRange": {
          "description": "The visible range in the editor, if any.",
          "anyOf": [
            {
              "$ref": "#/$defs/Range"
            },
            {
              "type": "null"
            }
          ],
          "x-deserialize-default-on-error": true
        },
        "lastFocusedMs": {
          "description": "Timestamp in milliseconds since epoch of when the file was last focused.",
          "type": ["integer", "null"],
          "format": "uint64",
          "minimum": 0,
          "x-deserialize-default-on-error": true
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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": ["uri", "languageId"]
    },
    "NesDiagnostic": {
      "description": "A diagnostic (error, warning, etc.).",
      "type": "object",
      "properties": {
        "uri": {
          "description": "The URI of the file containing the diagnostic.",
          "type": "string",
          "format": "uri"
        },
        "range": {
          "description": "The range of the diagnostic.",
          "allOf": [
            {
              "$ref": "#/$defs/Range"
            }
          ]
        },
        "severity": {
          "description": "The severity of the diagnostic.",
          "allOf": [
            {
              "$ref": "#/$defs/NesDiagnosticSeverity"
            }
          ]
        },
        "message": {
          "description": "The diagnostic message.",
          "type": "string"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["uri", "range", "severity", "message"]
    },
    "NesDiagnosticSeverity": {
      "description": "Severity of a diagnostic.",
      "anyOf": [
        {
          "description": "An error.",
          "type": "string",
          "const": "error"
        },
        {
          "description": "A warning.",
          "type": "string",
          "const": "warning"
        },
        {
          "description": "An informational message.",
          "type": "string",
          "const": "information"
        },
        {
          "description": "A hint.",
          "type": "string",
          "const": "hint"
        },
        {
          "title": "Other",
          "description": "Custom or future diagnostic severity.\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"
        }
      ]
    },
    "CloseNesRequest": {
      "description": "Request to close an NES session.\n\nThe agent **must** cancel any ongoing work related to the NES session\nand then free up any resources associated with the session.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The ID of the NES session to close.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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": "nes/close"
    },
    "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": "ConnectMcpResponse",
                  "description": "Successful result returned for a `mcp/connect` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/ConnectMcpResponse"
                    }
                  ]
                },
                {
                  "title": "DisconnectMcpResponse",
                  "description": "Successful result returned for a `mcp/disconnect` request.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/DisconnectMcpResponse"
                    }
                  ]
                },
                {
                  "title": "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 with this `Cancelled` outcome.\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": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse from the client to an elicitation request.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/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": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe user accepted the elicitation and provided content.",
      "type": "object",
      "properties": {
        "content": {
          "description": "The user-provided content, if any, as an object matching the requested schema.",
          "type": ["object", "null"],
          "additionalProperties": {
            "$ref": "#/$defs/ElicitationContentValue"
          }
        }
      }
    },
    "ConnectMcpResponse": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `mcp/connect`.",
      "type": "object",
      "properties": {
        "connectionId": {
          "description": "The unique identifier for this MCP-over-ACP connection.",
          "allOf": [
            {
              "$ref": "#/$defs/McpConnectionId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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": ["connectionId"],
      "x-side": "client",
      "x-method": "mcp/connect"
    },
    "DisconnectMcpResponse": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `mcp/disconnect`.",
      "type": "object",
      "properties": {
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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": "client",
      "x-method": "mcp/disconnect"
    },
    "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:\n- Stop all language model requests as soon as possible\n- Abort all tool call invocations in progress\n- Send any pending `session/update` notifications\n- Report an idle `state_update` with `StopReason::Cancelled` after\n  cancellation succeeds\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#cancellation)",
                  "allOf": [
                    {
                      "$ref": "#/$defs/CancelSessionNotification"
                    }
                  ]
                },
                {
                  "title": "DidOpenDocumentNotification",
                  "description": "**UNSTABLE**\n\nNotification sent when a file is opened in the editor.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/DidOpenDocumentNotification"
                    }
                  ]
                },
                {
                  "title": "DidChangeDocumentNotification",
                  "description": "**UNSTABLE**\n\nNotification sent when a file is edited.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/DidChangeDocumentNotification"
                    }
                  ]
                },
                {
                  "title": "DidCloseDocumentNotification",
                  "description": "**UNSTABLE**\n\nNotification sent when a file is closed.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/DidCloseDocumentNotification"
                    }
                  ]
                },
                {
                  "title": "DidSaveDocumentNotification",
                  "description": "**UNSTABLE**\n\nNotification sent when a file is saved.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/DidSaveDocumentNotification"
                    }
                  ]
                },
                {
                  "title": "DidFocusDocumentNotification",
                  "description": "**UNSTABLE**\n\nNotification sent when a file becomes the active editor tab.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/DidFocusDocumentNotification"
                    }
                  ]
                },
                {
                  "title": "AcceptNesNotification",
                  "description": "**UNSTABLE**\n\nNotification sent when a suggestion is accepted.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/AcceptNesNotification"
                    }
                  ]
                },
                {
                  "title": "RejectNesNotification",
                  "description": "**UNSTABLE**\n\nNotification sent when a suggestion is rejected.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/RejectNesNotification"
                    }
                  ]
                },
                {
                  "title": "MessageMcpNotification",
                  "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSends an MCP-over-ACP notification.",
                  "allOf": [
                    {
                      "$ref": "#/$defs/MessageMcpNotification"
                    }
                  ]
                },
                {
                  "title": "ExtNotification",
                  "description": "Handles extension notifications from the client.\n\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/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"
    },
    "DidOpenDocumentNotification": {
      "description": "Notification sent when a file is opened in the editor.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The session ID for this notification.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "uri": {
          "description": "The URI of the opened document.",
          "type": "string",
          "format": "uri"
        },
        "languageId": {
          "description": "The language identifier of the document (e.g., \"rust\", \"python\").",
          "type": "string"
        },
        "version": {
          "description": "The version number of the document.",
          "type": "integer",
          "format": "int64"
        },
        "text": {
          "description": "The full text content of the document.",
          "type": "string"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId", "uri", "languageId", "version", "text"],
      "x-side": "agent",
      "x-method": "document/didOpen"
    },
    "DidChangeDocumentNotification": {
      "description": "Notification sent when a file is edited.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The session ID for this notification.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "uri": {
          "description": "The URI of the changed document.",
          "type": "string",
          "format": "uri"
        },
        "version": {
          "description": "The new version number of the document.",
          "type": "integer",
          "format": "int64"
        },
        "contentChanges": {
          "description": "The content changes.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/TextDocumentContentChangeEvent"
          },
          "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", "uri", "version", "contentChanges"],
      "x-side": "agent",
      "x-method": "document/didChange"
    },
    "TextDocumentContentChangeEvent": {
      "description": "A content change event for a document.\n\nWhen `range` is `None`, `text` is the full content of the document.\nWhen `range` is `Some`, `text` replaces the given range.",
      "type": "object",
      "properties": {
        "range": {
          "description": "The range of the document that changed. If `None`, the entire content is replaced.",
          "anyOf": [
            {
              "$ref": "#/$defs/Range"
            },
            {
              "type": "null"
            }
          ]
        },
        "text": {
          "description": "The new text for the range, or the full document content if `range` is `None`.",
          "type": "string"
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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"]
    },
    "DidCloseDocumentNotification": {
      "description": "Notification sent when a file is closed.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The session ID for this notification.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "uri": {
          "description": "The URI of the closed document.",
          "type": "string",
          "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": ["sessionId", "uri"],
      "x-side": "agent",
      "x-method": "document/didClose"
    },
    "DidSaveDocumentNotification": {
      "description": "Notification sent when a file is saved.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The session ID for this notification.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "uri": {
          "description": "The URI of the saved document.",
          "type": "string",
          "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": ["sessionId", "uri"],
      "x-side": "agent",
      "x-method": "document/didSave"
    },
    "DidFocusDocumentNotification": {
      "description": "Notification sent when a file becomes the active editor tab.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The session ID for this notification.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "uri": {
          "description": "The URI of the focused document.",
          "type": "string",
          "format": "uri"
        },
        "version": {
          "description": "The version number of the document.",
          "type": "integer",
          "format": "int64"
        },
        "position": {
          "description": "The current cursor position.",
          "allOf": [
            {
              "$ref": "#/$defs/Position"
            }
          ]
        },
        "visibleRange": {
          "description": "The portion of the file currently visible in the editor viewport.",
          "allOf": [
            {
              "$ref": "#/$defs/Range"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
          "type": ["object", "null"],
          "x-deserialize-default-on-error": true,
          "additionalProperties": true
        }
      },
      "required": ["sessionId", "uri", "version", "position", "visibleRange"],
      "x-side": "agent",
      "x-method": "document/didFocus"
    },
    "AcceptNesNotification": {
      "description": "Notification sent when a suggestion is accepted.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The session ID for this notification.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "suggestionId": {
          "description": "The ID of the accepted suggestion.",
          "allOf": [
            {
              "$ref": "#/$defs/NesSuggestionId"
            }
          ]
        },
        "_meta": {
          "description": "The _meta property is reserved by ACP to allow clients and agents to attach 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", "suggestionId"],
      "x-side": "agent",
      "x-method": "nes/accept"
    },
    "RejectNesNotification": {
      "description": "Notification sent when a suggestion is rejected.",
      "type": "object",
      "properties": {
        "sessionId": {
          "description": "The session ID for this notification.",
          "allOf": [
            {
              "$ref": "#/$defs/SessionId"
            }
          ]
        },
        "suggestionId": {
          "description": "The ID of the rejected suggestion.",
          "allOf": [
            {
              "$ref": "#/$defs/NesSuggestionId"
            }
          ]
        },
        "reason": {
          "description": "The reason for rejection.",
          "anyOf": [
            {
              "$ref": "#/$defs/NesRejectReason"
            },
            {
              "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": ["sessionId", "suggestionId"],
      "x-side": "agent",
      "x-method": "nes/reject"
    },
    "NesRejectReason": {
      "description": "The reason a suggestion was rejected.",
      "anyOf": [
        {
          "description": "The user explicitly dismissed the suggestion.",
          "type": "string",
          "const": "rejected"
        },
        {
          "description": "The suggestion was shown but the user continued editing without interacting.",
          "type": "string",
          "const": "ignored"
        },
        {
          "description": "The suggestion was superseded by a newer suggestion.",
          "type": "string",
          "const": "replaced"
        },
        {
          "description": "The request was cancelled before the agent returned a response.",
          "type": "string",
          "const": "cancelled"
        },
        {
          "title": "Other",
          "description": "Custom or future rejection 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"
        }
      ]
    },
    "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"
    }
  }
}
