// This file is generated by the effect-acp package. Do not edit manually.// Current ACP schema release: v0.11.3 import * as Schema from "effect/Schema"; export type AuthEnvVar = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly label?: string | null; readonly name: string; readonly optional?: boolean; readonly secret?: boolean;};export const AuthEnvVar = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), label: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "Human-readable label for this variable, displayed in client UI.", }), Schema.Null, ]), ), name: Schema.String.annotate({ description: 'The environment variable name (e.g. `"OPENAI_API_KEY"`).', }), optional: Schema.optionalKey( Schema.Boolean.annotate({ description: "Whether this variable is optional.\n\nDefaults to `false`.", default: false, }), ), secret: Schema.optionalKey( Schema.Boolean.annotate({ 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`.", default: true, }), ),}).annotate({ 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.",}); export type AvailableCommandInput = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly hint: string;};export const AvailableCommandInput = Schema.Union([ Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), hint: Schema.String.annotate({ description: "A hint to display when the input hasn't been provided yet", }), }).annotate({ title: "unstructured", description: "All text that was typed after the command name is provided as input.", }),]).annotate({ description: "The input specification for a command." }); export type Cost = { readonly amount: number; readonly currency: string };export const Cost = Schema.Struct({ amount: Schema.Number.annotate({ description: "Total cumulative cost for session.", format: "double", }).check(Schema.isFinite()), currency: Schema.String.annotate({ description: 'ISO 4217 currency code (e.g., "USD", "EUR").' }),}).annotate({ description: "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCost information for a session.",}); export type ElicitationContentValue = string | number | number | boolean | ReadonlyArray<string>;export const ElicitationContentValue = Schema.Union([ Schema.String.annotate({ title: "String" }), Schema.Number.annotate({ title: "Integer", format: "int64" }).check(Schema.isInt()), Schema.Number.annotate({ title: "Number", format: "double" }).check(Schema.isFinite()), Schema.Boolean.annotate({ title: "Boolean" }), Schema.Array(Schema.String).annotate({ title: "StringArray" }),]); export type ElicitationFormCapabilities = { readonly _meta?: { readonly [x: string]: unknown } | null;};export const ElicitationFormCapabilities = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ),}).annotate({ 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.",}); export type ElicitationUrlCapabilities = { readonly _meta?: { readonly [x: string]: unknown } | null;};export const ElicitationUrlCapabilities = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ),}).annotate({ 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.",}); export type EmbeddedResourceResource = | { readonly _meta?: { readonly [x: string]: unknown } | null; readonly mimeType?: string | null; readonly text: string; readonly uri: string; } | { readonly _meta?: { readonly [x: string]: unknown } | null; readonly blob: string; readonly mimeType?: string | null; readonly uri: string; };export const EmbeddedResourceResource = Schema.Union([ Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), text: Schema.String, uri: Schema.String, }).annotate({ title: "TextResourceContents", description: "Text-based resource contents." }), Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), blob: Schema.String, mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), uri: Schema.String, }).annotate({ title: "BlobResourceContents", description: "Binary resource contents." }),]).annotate({ description: "Resource content that can be embedded in a message." }); export type EnumOption = { readonly const: string; readonly title: string };export const EnumOption = Schema.Struct({ const: Schema.String.annotate({ description: "The constant value for this option." }), title: Schema.String.annotate({ description: "Human-readable title for this option." }),}).annotate({ description: "A titled enum option with a const value and human-readable title." }); export type EnvVariable = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly name: string; readonly value: string;};export const EnvVariable = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), name: Schema.String.annotate({ description: "The name of the environment variable." }), value: Schema.String.annotate({ description: "The value to set for the environment variable." }),}).annotate({ description: "An environment variable to set when launching an MCP server." }); export type Error = { readonly code: | -32700 | -32600 | -32601 | -32602 | -32603 | -32800 | -32000 | -32002 | -32042 | number; readonly data?: unknown; readonly message: string;};export const Error = Schema.Struct({ code: Schema.Union([ Schema.Literal(-32700).annotate({ title: "Parse error", description: "**Parse error**: Invalid JSON was received by the server.\nAn error occurred on the server while parsing the JSON text.", format: "int32", }), Schema.Literal(-32600).annotate({ title: "Invalid request", description: "**Invalid request**: The JSON sent is not a valid Request object.", format: "int32", }), Schema.Literal(-32601).annotate({ title: "Method not found", description: "**Method not found**: The method does not exist or is not available.", format: "int32", }), Schema.Literal(-32602).annotate({ title: "Invalid params", description: "**Invalid params**: Invalid method parameter(s).", format: "int32", }), Schema.Literal(-32603).annotate({ title: "Internal error", description: "**Internal error**: Internal JSON-RPC error.\nReserved for implementation-defined server errors.", format: "int32", }), Schema.Literal(-32800).annotate({ title: "Request cancelled", description: "**Request cancelled**: **UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nExecution of the method was aborted either due to a cancellation request from the caller or\nbecause of resource constraints or shutdown.", format: "int32", }), Schema.Literal(-32000).annotate({ title: "Authentication required", description: "**Authentication required**: Authentication is required before this operation can be performed.", format: "int32", }), Schema.Literal(-32002).annotate({ title: "Resource not found", description: "**Resource not found**: A given resource, such as a file, was not found.", format: "int32", }), Schema.Literal(-32042).annotate({ title: "URL elicitation required", description: "**URL elicitation required**: **UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe agent requires user input via a URL-based elicitation before it can proceed.", format: "int32", }), Schema.Number.annotate({ title: "Other", description: "Other undefined error code.", format: "int32", }).check(Schema.isInt()), ]).annotate({ 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.", }), data: Schema.optionalKey( Schema.Unknown.annotate({ description: "Optional primitive or structured value that contains additional information about the error.\nThis may include debugging information or context-specific details.", }), ), message: Schema.String.annotate({ description: "A string providing a short description of the error.\nThe message should be limited to a concise single sentence.", }),}).annotate({ 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)",}); export type HttpHeader = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly name: string; readonly value: string;};export const HttpHeader = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), name: Schema.String.annotate({ description: "The name of the HTTP header." }), value: Schema.String.annotate({ description: "The value to set for the HTTP header." }),}).annotate({ description: "An HTTP header to set when making requests to the MCP server." }); export type Implementation = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly name: string; readonly title?: string | null; readonly version: string;};export const Implementation = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), name: Schema.String.annotate({ description: "Intended for programmatic or logical use, but can be used as a display\nname fallback if title isn’t present.", }), title: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ 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.", }), Schema.Null, ]), ), version: Schema.String.annotate({ description: 'Version of the implementation. Can be displayed to the user or used\nfor debugging or metrics purposes. (e.g. "1.0.0").', }),}).annotate({ description: "Metadata about the implementation of the client or agent.\nDescribes the name and version of an MCP implementation, with an optional\ntitle for UI representation.",}); export type LogoutCapabilities = { readonly _meta?: { readonly [x: string]: unknown } | null };export const LogoutCapabilities = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ),}).annotate({ description: "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nLogout capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports the logout method.",}); export type ModelInfo = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly description?: string | null; readonly modelId: string; readonly name: string;};export const ModelInfo = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), description: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "Optional description of the model." }), Schema.Null, ]), ), modelId: Schema.String.annotate({ description: "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA unique identifier for a model.", }), name: Schema.String.annotate({ description: "Human-readable name of the model." }),}).annotate({ description: "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInformation about a selectable model.",}); export type PermissionOption = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly kind: "allow_once" | "allow_always" | "reject_once" | "reject_always"; readonly name: string; readonly optionId: string;};export const PermissionOption = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), kind: Schema.Literals(["allow_once", "allow_always", "reject_once", "reject_always"]).annotate({ description: "The type of permission option being presented to the user.\n\nHelps clients choose appropriate icons and UI treatment.", }), name: Schema.String.annotate({ description: "Human-readable label to display to the user." }), optionId: Schema.String.annotate({ description: "Unique identifier for a permission option." }),}).annotate({ description: "An option presented to the user when requesting permission." }); export type PlanEntry = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly content: string; readonly priority: "high" | "medium" | "low"; readonly status: "pending" | "in_progress" | "completed";};export const PlanEntry = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), content: Schema.String.annotate({ description: "Human-readable description of what this task aims to accomplish.", }), priority: Schema.Literals(["high", "medium", "low"]).annotate({ description: "Priority levels for plan entries.\n\nUsed to indicate the relative importance or urgency of different\ntasks in the execution plan.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", }), status: Schema.Literals(["pending", "in_progress", "completed"]).annotate({ description: "Status of a plan entry in the execution flow.\n\nTracks the lifecycle of each task from planning through completion.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", }),}).annotate({ description: "A single entry in the execution plan.\n\nRepresents a task or goal that the assistant intends to accomplish\nas part of fulfilling the user's request.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)",}); export type RequestId = null | number | string;export const RequestId = Schema.Union([ Schema.Null.annotate({ title: "Null" }), Schema.Number.annotate({ title: "Number", format: "int64" }).check(Schema.isInt()), Schema.String.annotate({ title: "Str" }),]).annotate({ 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.",}); export type Role = "assistant" | "user";export const Role = Schema.Literals(["assistant", "user"]).annotate({ description: "The sender or recipient of messages and data in a conversation.",}); export type SessionCloseCapabilities = { readonly _meta?: { readonly [x: string]: unknown } | null;};export const SessionCloseCapabilities = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ),}).annotate({ 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/close` method.\n\nBy supplying `{}` it means that the agent supports closing of sessions.",}); export type SessionConfigOptionCategory = "mode" | "model" | "thought_level" | string;export const SessionConfigOptionCategory = Schema.Union([ Schema.Literal("mode").annotate({ description: "Session mode selector." }), Schema.Literal("model").annotate({ description: "Model selector." }), Schema.Literal("thought_level").annotate({ description: "Thought/reasoning level selector." }), Schema.String.annotate({ title: "other", description: "Unknown / uncategorized selector." }),]).annotate({ 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.",}); export type SessionConfigSelectOption = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly description?: string | null;Lines 1–500 of 10375. Load more
// This file is generated by the effect-acp package. Do not edit manually. // Current ACP schema release: v0.11.3 import * as Schema from "effect/Schema"; export type AuthEnvVar = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly label?: string | null; readonly name: string; readonly optional?: boolean; readonly secret?: boolean; }; export const AuthEnvVar = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), label: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "Human-readable label for this variable, displayed in client UI.", }), Schema.Null, ]), ), name: Schema.String.annotate({ description: 'The environment variable name (e.g. `"OPENAI_API_KEY"`).', }), optional: Schema.optionalKey( Schema.Boolean.annotate({ description: "Whether this variable is optional.\n\nDefaults to `false`.", default: false, }), ), secret: Schema.optionalKey( Schema.Boolean.annotate({ 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`.", default: true, }), ), }).annotate({ 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.", }); export type AvailableCommandInput = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly hint: string; }; export const AvailableCommandInput = Schema.Union([ Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), hint: Schema.String.annotate({ description: "A hint to display when the input hasn't been provided yet", }), }).annotate({ title: "unstructured", description: "All text that was typed after the command name is provided as input.", }), ]).annotate({ description: "The input specification for a command." }); export type Cost = { readonly amount: number; readonly currency: string }; export const Cost = Schema.Struct({ amount: Schema.Number.annotate({ description: "Total cumulative cost for session.", format: "double", }).check(Schema.isFinite()), currency: Schema.String.annotate({ description: 'ISO 4217 currency code (e.g., "USD", "EUR").' }), }).annotate({ description: "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCost information for a session.", }); export type ElicitationContentValue = string | number | number | boolean | ReadonlyArray<string>; export const ElicitationContentValue = Schema.Union([ Schema.String.annotate({ title: "String" }), Schema.Number.annotate({ title: "Integer", format: "int64" }).check(Schema.isInt()), Schema.Number.annotate({ title: "Number", format: "double" }).check(Schema.isFinite()), Schema.Boolean.annotate({ title: "Boolean" }), Schema.Array(Schema.String).annotate({ title: "StringArray" }), ]); export type ElicitationFormCapabilities = { readonly _meta?: { readonly [x: string]: unknown } | null; }; export const ElicitationFormCapabilities = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), }).annotate({ 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.", }); export type ElicitationUrlCapabilities = { readonly _meta?: { readonly [x: string]: unknown } | null; }; export const ElicitationUrlCapabilities = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), }).annotate({ 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.", }); export type EmbeddedResourceResource = | { readonly _meta?: { readonly [x: string]: unknown } | null; readonly mimeType?: string | null; readonly text: string; readonly uri: string; } | { readonly _meta?: { readonly [x: string]: unknown } | null; readonly blob: string; readonly mimeType?: string | null; readonly uri: string; }; export const EmbeddedResourceResource = Schema.Union([ Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), text: Schema.String, uri: Schema.String, }).annotate({ title: "TextResourceContents", description: "Text-based resource contents." }), Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), blob: Schema.String, mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), uri: Schema.String, }).annotate({ title: "BlobResourceContents", description: "Binary resource contents." }), ]).annotate({ description: "Resource content that can be embedded in a message." }); export type EnumOption = { readonly const: string; readonly title: string }; export const EnumOption = Schema.Struct({ const: Schema.String.annotate({ description: "The constant value for this option." }), title: Schema.String.annotate({ description: "Human-readable title for this option." }), }).annotate({ description: "A titled enum option with a const value and human-readable title." }); export type EnvVariable = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly name: string; readonly value: string; }; export const EnvVariable = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), name: Schema.String.annotate({ description: "The name of the environment variable." }), value: Schema.String.annotate({ description: "The value to set for the environment variable." }), }).annotate({ description: "An environment variable to set when launching an MCP server." }); export type Error = { readonly code: | -32700 | -32600 | -32601 | -32602 | -32603 | -32800 | -32000 | -32002 | -32042 | number; readonly data?: unknown; readonly message: string; }; export const Error = Schema.Struct({ code: Schema.Union([ Schema.Literal(-32700).annotate({ title: "Parse error", description: "**Parse error**: Invalid JSON was received by the server.\nAn error occurred on the server while parsing the JSON text.", format: "int32", }), Schema.Literal(-32600).annotate({ title: "Invalid request", description: "**Invalid request**: The JSON sent is not a valid Request object.", format: "int32", }), Schema.Literal(-32601).annotate({ title: "Method not found", description: "**Method not found**: The method does not exist or is not available.", format: "int32", }), Schema.Literal(-32602).annotate({ title: "Invalid params", description: "**Invalid params**: Invalid method parameter(s).", format: "int32", }), Schema.Literal(-32603).annotate({ title: "Internal error", description: "**Internal error**: Internal JSON-RPC error.\nReserved for implementation-defined server errors.", format: "int32", }), Schema.Literal(-32800).annotate({ title: "Request cancelled", description: "**Request cancelled**: **UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nExecution of the method was aborted either due to a cancellation request from the caller or\nbecause of resource constraints or shutdown.", format: "int32", }), Schema.Literal(-32000).annotate({ title: "Authentication required", description: "**Authentication required**: Authentication is required before this operation can be performed.", format: "int32", }), Schema.Literal(-32002).annotate({ title: "Resource not found", description: "**Resource not found**: A given resource, such as a file, was not found.", format: "int32", }), Schema.Literal(-32042).annotate({ title: "URL elicitation required", description: "**URL elicitation required**: **UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe agent requires user input via a URL-based elicitation before it can proceed.", format: "int32", }), Schema.Number.annotate({ title: "Other", description: "Other undefined error code.", format: "int32", }).check(Schema.isInt()), ]).annotate({ 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.", }), data: Schema.optionalKey( Schema.Unknown.annotate({ description: "Optional primitive or structured value that contains additional information about the error.\nThis may include debugging information or context-specific details.", }), ), message: Schema.String.annotate({ description: "A string providing a short description of the error.\nThe message should be limited to a concise single sentence.", }), }).annotate({ 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)", }); export type HttpHeader = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly name: string; readonly value: string; }; export const HttpHeader = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), name: Schema.String.annotate({ description: "The name of the HTTP header." }), value: Schema.String.annotate({ description: "The value to set for the HTTP header." }), }).annotate({ description: "An HTTP header to set when making requests to the MCP server." }); export type Implementation = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly name: string; readonly title?: string | null; readonly version: string; }; export const Implementation = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), name: Schema.String.annotate({ description: "Intended for programmatic or logical use, but can be used as a display\nname fallback if title isn’t present.", }), title: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ 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.", }), Schema.Null, ]), ), version: Schema.String.annotate({ description: 'Version of the implementation. Can be displayed to the user or used\nfor debugging or metrics purposes. (e.g. "1.0.0").', }), }).annotate({ description: "Metadata about the implementation of the client or agent.\nDescribes the name and version of an MCP implementation, with an optional\ntitle for UI representation.", }); export type LogoutCapabilities = { readonly _meta?: { readonly [x: string]: unknown } | null }; export const LogoutCapabilities = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), }).annotate({ description: "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nLogout capabilities supported by the agent.\n\nBy supplying `{}` it means that the agent supports the logout method.", }); export type ModelInfo = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly description?: string | null; readonly modelId: string; readonly name: string; }; export const ModelInfo = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), description: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "Optional description of the model." }), Schema.Null, ]), ), modelId: Schema.String.annotate({ description: "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA unique identifier for a model.", }), name: Schema.String.annotate({ description: "Human-readable name of the model." }), }).annotate({ description: "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInformation about a selectable model.", }); export type PermissionOption = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly kind: "allow_once" | "allow_always" | "reject_once" | "reject_always"; readonly name: string; readonly optionId: string; }; export const PermissionOption = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), kind: Schema.Literals(["allow_once", "allow_always", "reject_once", "reject_always"]).annotate({ description: "The type of permission option being presented to the user.\n\nHelps clients choose appropriate icons and UI treatment.", }), name: Schema.String.annotate({ description: "Human-readable label to display to the user." }), optionId: Schema.String.annotate({ description: "Unique identifier for a permission option." }), }).annotate({ description: "An option presented to the user when requesting permission." }); export type PlanEntry = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly content: string; readonly priority: "high" | "medium" | "low"; readonly status: "pending" | "in_progress" | "completed"; }; export const PlanEntry = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), content: Schema.String.annotate({ description: "Human-readable description of what this task aims to accomplish.", }), priority: Schema.Literals(["high", "medium", "low"]).annotate({ description: "Priority levels for plan entries.\n\nUsed to indicate the relative importance or urgency of different\ntasks in the execution plan.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", }), status: Schema.Literals(["pending", "in_progress", "completed"]).annotate({ description: "Status of a plan entry in the execution flow.\n\nTracks the lifecycle of each task from planning through completion.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", }), }).annotate({ description: "A single entry in the execution plan.\n\nRepresents a task or goal that the assistant intends to accomplish\nas part of fulfilling the user's request.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)", }); export type RequestId = null | number | string; export const RequestId = Schema.Union([ Schema.Null.annotate({ title: "Null" }), Schema.Number.annotate({ title: "Number", format: "int64" }).check(Schema.isInt()), Schema.String.annotate({ title: "Str" }), ]).annotate({ 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.", }); export type Role = "assistant" | "user"; export const Role = Schema.Literals(["assistant", "user"]).annotate({ description: "The sender or recipient of messages and data in a conversation.", }); export type SessionCloseCapabilities = { readonly _meta?: { readonly [x: string]: unknown } | null; }; export const SessionCloseCapabilities = Schema.Struct({ _meta: Schema.optionalKey( Schema.Union([ Schema.Record(Schema.String, Schema.Unknown).annotate({ description: "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", }), Schema.Null, ]), ), }).annotate({ 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/close` method.\n\nBy supplying `{}` it means that the agent supports closing of sessions.", }); export type SessionConfigOptionCategory = "mode" | "model" | "thought_level" | string; export const SessionConfigOptionCategory = Schema.Union([ Schema.Literal("mode").annotate({ description: "Session mode selector." }), Schema.Literal("model").annotate({ description: "Model selector." }), Schema.Literal("thought_level").annotate({ description: "Thought/reasoning level selector." }), Schema.String.annotate({ title: "other", description: "Unknown / uncategorized selector." }), ]).annotate({ 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.", }); export type SessionConfigSelectOption = { readonly _meta?: { readonly [x: string]: unknown } | null; readonly description?: string | null;