From 1ec2c9d08ab6d0eb9dfb46bd07ff7895a856c164 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Tue, 2 Jun 2026 16:19:58 +0200 Subject: [PATCH] release: v0.13.5 Upgrade the ACP schema to v0.13.5 and regenerate bindings. The v0.13.5 protocol release removed the never-stabilized, unstable-only `session/set_model` method (and SetSessionModelRequest/Response, ModelId, ModelInfo, SessionModelState, and the `models` fields on session responses). Model selection is not going away: it now flows through the generic, stable `session/set_config_option` framework via the "model" config-option category. Hand-edited (non-generated) follow-ups to keep the tree compiling: - example/agent/main.go: drop the now-removed UnstableSetSessionModel impl - acp_test.go: drop the UnstableSetSessionModel func field and method Upstream rationale: agentclientprotocol/agent-client-protocol#1325 ("Session config options have been around long enough, so cleaning up the old iteration.") and #1324. Change-Id: I897316b046c99627fc93ca997231c3b9ec625cbe Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Thomas Kosiewski --- README.md | 2 +- acp_test.go | 9 - agent_gen.go | 19 -- client_gen.go | 4 - constants_gen.go | 1 - example/agent/main.go | 5 - schema/meta.unstable.json | 3 +- schema/schema.json | 171 ++++++++++--- schema/schema.unstable.json | 461 ++++++++++++++++-------------------- schema/version | 2 +- types_gen.go | 188 --------------- version | 2 +- 12 files changed, 346 insertions(+), 521 deletions(-) diff --git a/README.md b/README.md index fdb75eb..cdcec5b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Learn more about the protocol itself at . ```bash -go get github.com/coder/acp-go-sdk@v0.13.4 +go get github.com/coder/acp-go-sdk@v0.13.5 ``` ## Get Started diff --git a/acp_test.go b/acp_test.go index 0b63c23..22dc45c 100644 --- a/acp_test.go +++ b/acp_test.go @@ -138,7 +138,6 @@ type agentFuncs struct { UnstableSetProviderFunc func(context.Context, UnstableSetProviderRequest) (UnstableSetProviderResponse, error) UnstableDeleteSessionFunc func(context.Context, UnstableDeleteSessionRequest) (UnstableDeleteSessionResponse, error) UnstableForkSessionFunc func(context.Context, UnstableForkSessionRequest) (UnstableForkSessionResponse, error) - UnstableSetSessionModelFunc func(context.Context, UnstableSetSessionModelRequest) (UnstableSetSessionModelResponse, error) HandleExtensionMethodFunc func(context.Context, string, json.RawMessage) (any, error) } @@ -240,14 +239,6 @@ func (a agentFuncs) SetSessionConfigOption(ctx context.Context, params SetSessio return SetSessionConfigOptionResponse{}, nil } -// UnstableSetSessionModel implements AgentExperimental. -func (a agentFuncs) UnstableSetSessionModel(ctx context.Context, params UnstableSetSessionModelRequest) (UnstableSetSessionModelResponse, error) { - if a.UnstableSetSessionModelFunc != nil { - return a.UnstableSetSessionModelFunc(ctx, params) - } - return UnstableSetSessionModelResponse{}, nil -} - func (a agentFuncs) UnstableDidChangeDocument(ctx context.Context, params UnstableDidChangeDocumentNotification) error { if a.UnstableDidChangeDocumentFunc != nil { return a.UnstableDidChangeDocumentFunc(ctx, params) diff --git a/agent_gen.go b/agent_gen.go index a273b73..c90cca4 100644 --- a/agent_gen.go +++ b/agent_gen.go @@ -464,25 +464,6 @@ func (a *AgentSideConnection) handle(ctx context.Context, method string, params return nil, toReqErr(err) } return resp, nil - case AgentMethodSessionSetModel: - var p UnstableSetSessionModelRequest - if err := json.Unmarshal(params, &p); err != nil { - return nil, NewInvalidParams(map[string]any{"error": err.Error()}) - } - if err := p.Validate(); err != nil { - return nil, NewInvalidParams(map[string]any{"error": err.Error()}) - } - exp, ok := a.agent.(interface { - UnstableSetSessionModel(context.Context, UnstableSetSessionModelRequest) (UnstableSetSessionModelResponse, error) - }) - if !ok { - return nil, NewMethodNotFound(method) - } - resp, err := exp.UnstableSetSessionModel(ctx, p) - if err != nil { - return nil, toReqErr(err) - } - return resp, nil default: return nil, NewMethodNotFound(method) } diff --git a/client_gen.go b/client_gen.go index 93603c6..b6ce47d 100644 --- a/client_gen.go +++ b/client_gen.go @@ -309,7 +309,3 @@ func (c *ClientSideConnection) SetSessionMode(ctx context.Context, params SetSes resp, err := SendRequest[SetSessionModeResponse](c.conn, ctx, AgentMethodSessionSetMode, params) return resp, err } -func (c *ClientSideConnection) UnstableSetSessionModel(ctx context.Context, params UnstableSetSessionModelRequest) (UnstableSetSessionModelResponse, error) { - resp, err := SendRequest[UnstableSetSessionModelResponse](c.conn, ctx, AgentMethodSessionSetModel, params) - return resp, err -} diff --git a/constants_gen.go b/constants_gen.go index b542e65..872918f 100644 --- a/constants_gen.go +++ b/constants_gen.go @@ -35,7 +35,6 @@ const ( AgentMethodSessionResume = "session/resume" AgentMethodSessionSetConfigOption = "session/set_config_option" AgentMethodSessionSetMode = "session/set_mode" - AgentMethodSessionSetModel = "session/set_model" ) // Client method names diff --git a/example/agent/main.go b/example/agent/main.go index bf6bd6b..ac3dbfe 100644 --- a/example/agent/main.go +++ b/example/agent/main.go @@ -61,11 +61,6 @@ func (a *exampleAgent) SetSessionConfigOption(ctx context.Context, params acp.Se return acp.SetSessionConfigOptionResponse{}, acp.NewMethodNotFound(acp.AgentMethodSessionSetConfigOption) } -// UnstableSetSessionModel implements acp.AgentExperimental. -func (a *exampleAgent) UnstableSetSessionModel(ctx context.Context, params acp.UnstableSetSessionModelRequest) (acp.UnstableSetSessionModelResponse, error) { - return acp.UnstableSetSessionModelResponse{}, acp.NewMethodNotFound(acp.AgentMethodSessionSetModel) -} - // UnstableDidChangeDocument implements acp.AgentExperimental. func (a *exampleAgent) UnstableDidChangeDocument(ctx context.Context, params acp.UnstableDidChangeDocumentNotification) error { return nil diff --git a/schema/meta.unstable.json b/schema/meta.unstable.json index 5775e36..071a291 100644 --- a/schema/meta.unstable.json +++ b/schema/meta.unstable.json @@ -27,8 +27,7 @@ "session_prompt": "session/prompt", "session_resume": "session/resume", "session_set_config_option": "session/set_config_option", - "session_set_mode": "session/set_mode", - "session_set_model": "session/set_model" + "session_set_mode": "session/set_mode" }, "clientMethods": { "elicitation_complete": "elicitation/complete", diff --git a/schema/schema.json b/schema/schema.json index 559f3f4..42251b5 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -17,7 +17,8 @@ "type": "null" } ], - "description": "Whether the agent supports the logout method.\n\nBy supplying `{}` it means that the agent supports the logout method." + "description": "Whether the agent supports the logout method.\n\nBy supplying `{}` it means that the agent supports the logout method.", + "x-deserialize-default-on-error": true } }, "type": "object" @@ -367,7 +368,9 @@ "items": { "$ref": "#/$defs/Role" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "lastModified": { "type": ["string", "null"] @@ -395,7 +398,8 @@ { "type": "null" } - ] + ], + "x-deserialize-default-on-error": true }, "data": { "type": "string" @@ -497,7 +501,8 @@ "type": "null" } ], - "description": "Input for the command if required" + "description": "Input for the command if required", + "x-deserialize-default-on-error": true }, "name": { "description": "Command name (e.g., `create_plan`, `research_codebase`).", @@ -534,7 +539,9 @@ "items": { "$ref": "#/$defs/AvailableCommand" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true } }, "required": ["availableCommands"], @@ -937,7 +944,9 @@ "items": { "$ref": "#/$defs/SessionConfigOption" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true } }, "required": ["configOptions"], @@ -1199,7 +1208,8 @@ { "type": "null" } - ] + ], + "x-deserialize-default-on-error": true }, "resource": { "$ref": "#/$defs/EmbeddedResourceResource" @@ -1397,7 +1407,8 @@ { "type": "null" } - ] + ], + "x-deserialize-default-on-error": true }, "data": { "type": "string" @@ -1468,7 +1479,8 @@ "type": "null" } ], - "description": "Information about the Client name and version sent to the Agent.\n\nNote: in future versions of the protocol, this will be required." + "description": "Information about the Client name and version sent to the Agent.\n\nNote: in future versions of the protocol, this will be required.", + "x-deserialize-default-on-error": true }, "protocolVersion": { "allOf": [ @@ -1523,7 +1535,8 @@ "type": "null" } ], - "description": "Information about the Agent name and version sent to the Client.\n\nNote: in future versions of the protocol, this will be required." + "description": "Information about the Agent name and version sent to the Client.\n\nNote: in future versions of the protocol, this will be required.", + "x-deserialize-default-on-error": true }, "authMethods": { "default": [], @@ -1531,7 +1544,9 @@ "items": { "$ref": "#/$defs/AuthMethod" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "protocolVersion": { "allOf": [ @@ -1624,7 +1639,9 @@ "items": { "$ref": "#/$defs/SessionInfo" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true } }, "required": ["sessions"], @@ -1640,6 +1657,13 @@ "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": ["object", "null"] }, + "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 loaded\nsession. It may differ from any previously used or reported list as long as\nthe request `cwd` matches the session's `cwd`.", + "items": { + "type": "string" + }, + "type": "array" + }, "cwd": { "description": "The working directory for this session.", "type": "string" @@ -1678,7 +1702,9 @@ "items": { "$ref": "#/$defs/SessionConfigOption" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "modes": { "anyOf": [ @@ -1689,7 +1715,8 @@ "type": "null" } ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" + "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "x-deserialize-default-on-error": true } }, "type": "object", @@ -1896,6 +1923,13 @@ "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": ["object", "null"] }, + "additionalDirectories": { + "description": "Additional workspace roots for this session. Each path must be absolute.\n\nThese expand the session's filesystem scope without changing `cwd`, which\nremains the base for relative paths. When omitted or empty, no\nadditional roots are activated for the new session.", + "items": { + "type": "string" + }, + "type": "array" + }, "cwd": { "description": "The working directory for this session. Must be an absolute path.", "type": "string" @@ -1926,7 +1960,9 @@ "items": { "$ref": "#/$defs/SessionConfigOption" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "modes": { "anyOf": [ @@ -1937,7 +1973,8 @@ "type": "null" } ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" + "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "x-deserialize-default-on-error": true }, "sessionId": { "allOf": [ @@ -2027,7 +2064,9 @@ "items": { "$ref": "#/$defs/PlanEntry" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true } }, "required": ["entries"], @@ -2411,7 +2450,8 @@ { "type": "null" } - ] + ], + "x-deserialize-default-on-error": true }, "description": { "type": ["string", "null"] @@ -2444,6 +2484,13 @@ "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": ["object", "null"] }, + "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`.", + "items": { + "type": "string" + }, + "type": "array" + }, "cwd": { "description": "The working directory for this session.", "type": "string" @@ -2482,7 +2529,9 @@ "items": { "$ref": "#/$defs/SessionConfigOption" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "modes": { "anyOf": [ @@ -2493,7 +2542,8 @@ "type": "null" } ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" + "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "x-deserialize-default-on-error": true } }, "type": "object", @@ -2525,6 +2575,17 @@ "required": ["optionId"], "type": "object" }, + "SessionAdditionalDirectoriesCapabilities": { + "description": "Capabilities for additional session directories support.\n\nBy supplying `{}` it means that the agent supports the `additionalDirectories`\nfield on supported 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.", + "properties": { + "_meta": { + "additionalProperties": true, + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": ["object", "null"] + } + }, + "type": "object" + }, "SessionCapabilities": { "description": "Session capabilities supported by the agent.\n\nAs a baseline, all Agents **MUST** support `session/new`, `session/prompt`, `session/cancel`, and `session/update`.\n\nOptionally, they **MAY** support other session methods and notifications by specifying additional capabilities.\n\nNote: `session/load` is still handled by the top-level `load_session` capability. This will be unified in future versions of the protocol.\n\nSee protocol docs: [Session Capabilities](https://agentclientprotocol.com/protocol/initialization#session-capabilities)", "properties": { @@ -2533,6 +2594,18 @@ "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": ["object", "null"] }, + "additionalDirectories": { + "anyOf": [ + { + "$ref": "#/$defs/SessionAdditionalDirectoriesCapabilities" + }, + { + "type": "null" + } + ], + "description": "Whether the agent supports `additionalDirectories` on supported session lifecycle requests.\n\nAgents that also support `session/list` may return\n`SessionInfo.additionalDirectories` to report the complete ordered\nadditional-root list associated with a listed session.", + "x-deserialize-default-on-error": true + }, "close": { "anyOf": [ { @@ -2542,7 +2615,8 @@ "type": "null" } ], - "description": "Whether the agent supports `session/close`." + "description": "Whether the agent supports `session/close`.", + "x-deserialize-default-on-error": true }, "list": { "anyOf": [ @@ -2553,7 +2627,8 @@ "type": "null" } ], - "description": "Whether the agent supports `session/list`." + "description": "Whether the agent supports `session/list`.", + "x-deserialize-default-on-error": true }, "resume": { "anyOf": [ @@ -2564,7 +2639,8 @@ "type": "null" } ], - "description": "Whether the agent supports `session/resume`." + "description": "Whether the agent supports `session/resume`.", + "x-deserialize-default-on-error": true } }, "type": "object" @@ -2626,7 +2702,8 @@ "type": "null" } ], - "description": "Optional semantic category for this option (UX only)." + "description": "Optional semantic category for this option (UX only).", + "x-deserialize-default-on-error": true }, "description": { "description": "Optional description for the Client to display to the user.", @@ -2792,6 +2869,13 @@ "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": ["object", "null"] }, + "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.", + "items": { + "type": "string" + }, + "type": "array" + }, "cwd": { "description": "The working directory for this session. Must be an absolute path.", "type": "string" @@ -2806,11 +2890,13 @@ }, "title": { "description": "Human-readable title for the session", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "updatedAt": { "description": "ISO 8601 timestamp of last activity", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true } }, "required": ["sessionId", "cwd"], @@ -2884,7 +2970,9 @@ "items": { "$ref": "#/$defs/SessionMode" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "currentModeId": { "allOf": [ @@ -3158,7 +3246,9 @@ "items": { "$ref": "#/$defs/SessionConfigOption" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true } }, "required": ["configOptions"], @@ -3350,7 +3440,8 @@ { "type": "null" } - ] + ], + "x-deserialize-default-on-error": true }, "text": { "type": "string" @@ -3393,7 +3484,9 @@ "items": { "$ref": "#/$defs/ToolCallContent" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "kind": { "allOf": [ @@ -3408,7 +3501,9 @@ "items": { "$ref": "#/$defs/ToolCallLocation" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "rawInput": { "description": "Raw input parameters sent to the tool." @@ -3560,7 +3655,9 @@ "items": { "$ref": "#/$defs/ToolCallContent" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "kind": { "anyOf": [ @@ -3571,14 +3668,17 @@ "type": "null" } ], - "description": "Update the tool kind." + "description": "Update the tool kind.", + "x-deserialize-default-on-error": true }, "locations": { "description": "Replace the locations collection.", "items": { "$ref": "#/$defs/ToolCallLocation" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "rawInput": { "description": "Update the raw input." @@ -3595,7 +3695,8 @@ "type": "null" } ], - "description": "Update the execution status." + "description": "Update the execution status.", + "x-deserialize-default-on-error": true }, "title": { "description": "Update the human-readable title.", diff --git a/schema/schema.unstable.json b/schema/schema.unstable.json index de2fa91..70afba0 100644 --- a/schema/schema.unstable.json +++ b/schema/schema.unstable.json @@ -43,7 +43,8 @@ "type": "null" } ], - "description": "Whether the agent supports the logout method.\n\nBy supplying `{}` it means that the agent supports the logout method." + "description": "Whether the agent supports the logout method.\n\nBy supplying `{}` it means that the agent supports the logout method.", + "x-deserialize-default-on-error": true } }, "type": "object" @@ -92,7 +93,8 @@ "type": "null" } ], - "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." + "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.", + "x-deserialize-default-on-error": true }, "positionEncoding": { "anyOf": [ @@ -103,7 +105,8 @@ "type": "null" } ], - "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." + "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.", + "x-deserialize-default-on-error": true }, "promptCapabilities": { "allOf": [ @@ -127,7 +130,8 @@ "type": "null" } ], - "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\nBy supplying `{}` it means that the agent supports provider configuration methods." + "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\nBy supplying `{}` it means that the agent supports provider configuration methods.", + "x-deserialize-default-on-error": true }, "sessionCapabilities": { "allOf": [ @@ -477,14 +481,6 @@ ], "title": "PromptResponse" }, - { - "allOf": [ - { - "$ref": "#/$defs/SetSessionModelResponse" - } - ], - "title": "SetSessionModelResponse" - }, { "allOf": [ { @@ -561,7 +557,9 @@ "items": { "$ref": "#/$defs/Role" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "lastModified": { "type": ["string", "null"] @@ -589,7 +587,8 @@ { "type": "null" } - ] + ], + "x-deserialize-default-on-error": true }, "data": { "type": "string" @@ -842,7 +841,8 @@ "type": "null" } ], - "description": "Input for the command if required" + "description": "Input for the command if required", + "x-deserialize-default-on-error": true }, "name": { "description": "Command name (e.g., `create_plan`, `research_codebase`).", @@ -879,7 +879,9 @@ "items": { "$ref": "#/$defs/AvailableCommand" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true } }, "required": ["availableCommands"], @@ -996,7 +998,8 @@ "type": "null" } ], - "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." + "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.", + "x-deserialize-default-on-error": true }, "fs": { "allOf": [ @@ -1019,7 +1022,8 @@ "type": "null" } ], - "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." + "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.", + "x-deserialize-default-on-error": true }, "planCapabilities": { "anyOf": [ @@ -1030,14 +1034,17 @@ "type": "null" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the client supports `plan_update` and `plan_removed` session updates.\n\nOptional. Omitted means the client does not advertise support.\nSupplying `{}` means the client can receive both update types." + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the client supports `plan_update` and `plan_removed` session updates.\n\nOptional. Omitted means the client does not advertise support.\nSupplying `{}` means the client can receive both update types.", + "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.", "items": { "$ref": "#/$defs/PositionEncodingKind" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "terminal": { "default": false, @@ -1064,7 +1071,8 @@ "type": "null" } ], - "description": "Whether the client supports the `jump` suggestion kind." + "description": "Whether the client supports the `jump` suggestion kind.", + "x-deserialize-default-on-error": true }, "rename": { "anyOf": [ @@ -1075,7 +1083,8 @@ "type": "null" } ], - "description": "Whether the client supports the `rename` suggestion kind." + "description": "Whether the client supports the `rename` suggestion kind.", + "x-deserialize-default-on-error": true }, "searchAndReplace": { "anyOf": [ @@ -1086,7 +1095,8 @@ "type": "null" } ], - "description": "Whether the client supports the `searchAndReplace` suggestion kind." + "description": "Whether the client supports the `searchAndReplace` suggestion kind.", + "x-deserialize-default-on-error": true } }, "type": "object" @@ -1359,15 +1369,6 @@ "description": "Processes a user prompt within a session.\n\nThis method handles the whole lifecycle of a prompt:\n- Receives user messages with optional context (files, images, etc.)\n- Processes the prompt using language models\n- Reports language model content and tool calls to the Clients\n- Requests permission to run tools\n- Executes any requested tool calls\n- Returns when the turn is complete with a stop reason\n\nSee protocol docs: [Prompt Turn](https://agentclientprotocol.com/protocol/prompt-turn)", "title": "PromptRequest" }, - { - "allOf": [ - { - "$ref": "#/$defs/SetSessionModelRequest" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSelect a model for a given session.", - "title": "SetSessionModelRequest" - }, { "allOf": [ { @@ -1668,7 +1669,9 @@ "items": { "$ref": "#/$defs/SessionConfigOption" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true } }, "required": ["configOptions"], @@ -2396,7 +2399,8 @@ "type": "null" } ], - "description": "Whether the client supports form-based elicitation." + "description": "Whether the client supports form-based elicitation.", + "x-deserialize-default-on-error": true }, "url": { "anyOf": [ @@ -2407,7 +2411,8 @@ "type": "null" } ], - "description": "Whether the client supports URL-based elicitation." + "description": "Whether the client supports URL-based elicitation.", + "x-deserialize-default-on-error": true } }, "type": "object" @@ -2745,7 +2750,8 @@ { "type": "null" } - ] + ], + "x-deserialize-default-on-error": true }, "resource": { "$ref": "#/$defs/EmbeddedResourceResource" @@ -2945,7 +2951,7 @@ "type": ["object", "null"] }, "additionalDirectories": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAdditional 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.", + "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.", "items": { "type": "string" }, @@ -2989,18 +2995,9 @@ "items": { "$ref": "#/$defs/SessionConfigOption" }, - "type": ["array", "null"] - }, - "models": { - "anyOf": [ - { - "$ref": "#/$defs/SessionModelState" - }, - { - "type": "null" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent" + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "modes": { "anyOf": [ @@ -3011,7 +3008,8 @@ "type": "null" } ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" + "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "x-deserialize-default-on-error": true }, "sessionId": { "allOf": [ @@ -3063,7 +3061,8 @@ { "type": "null" } - ] + ], + "x-deserialize-default-on-error": true }, "data": { "type": "string" @@ -3137,7 +3136,8 @@ "type": "null" } ], - "description": "Information about the Client name and version sent to the Agent.\n\nNote: in future versions of the protocol, this will be required." + "description": "Information about the Client name and version sent to the Agent.\n\nNote: in future versions of the protocol, this will be required.", + "x-deserialize-default-on-error": true }, "protocolVersion": { "allOf": [ @@ -3193,7 +3193,8 @@ "type": "null" } ], - "description": "Information about the Agent name and version sent to the Client.\n\nNote: in future versions of the protocol, this will be required." + "description": "Information about the Agent name and version sent to the Client.\n\nNote: in future versions of the protocol, this will be required.", + "x-deserialize-default-on-error": true }, "authMethods": { "default": [], @@ -3201,7 +3202,9 @@ "items": { "$ref": "#/$defs/AuthMethod" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "protocolVersion": { "allOf": [ @@ -3311,7 +3314,9 @@ "items": { "$ref": "#/$defs/ProviderInfo" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true } }, "required": ["providers"], @@ -3357,7 +3362,9 @@ "items": { "$ref": "#/$defs/SessionInfo" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true } }, "required": ["sessions"], @@ -3409,7 +3416,7 @@ "type": ["object", "null"] }, "additionalDirectories": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAdditional 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 loaded\nsession. It may differ from any previously used or reported list as long as\nthe request `cwd` matches the session's `cwd`.", + "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 loaded\nsession. It may differ from any previously used or reported list as long as\nthe request `cwd` matches the session's `cwd`.", "items": { "type": "string" }, @@ -3453,18 +3460,9 @@ "items": { "$ref": "#/$defs/SessionConfigOption" }, - "type": ["array", "null"] - }, - "models": { - "anyOf": [ - { - "$ref": "#/$defs/SessionModelState" - }, - { - "type": "null" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent" + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "modes": { "anyOf": [ @@ -3475,7 +3473,8 @@ "type": "null" } ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" + "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "x-deserialize-default-on-error": true } }, "type": "object", @@ -3794,38 +3793,6 @@ "x-method": "mcp/message", "x-side": "both" }, - "ModelId": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA unique identifier for a model.", - "type": "string" - }, - "ModelInfo": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInformation about a selectable model.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "description": { - "description": "Optional description of the model.", - "type": ["string", "null"] - }, - "modelId": { - "allOf": [ - { - "$ref": "#/$defs/ModelId" - } - ], - "description": "Unique identifier for the model." - }, - "name": { - "description": "Human-readable name of the model.", - "type": "string" - } - }, - "required": ["modelId", "name"], - "type": "object" - }, "MultiSelectItems": { "anyOf": [ { @@ -3908,7 +3875,8 @@ "type": "null" } ], - "description": "Context the agent wants attached to each suggestion request." + "description": "Context the agent wants attached to each suggestion request.", + "x-deserialize-default-on-error": true }, "events": { "anyOf": [ @@ -3919,7 +3887,8 @@ "type": "null" } ], - "description": "Events the agent wants to receive." + "description": "Events the agent wants to receive.", + "x-deserialize-default-on-error": true } }, "type": "object" @@ -3941,7 +3910,8 @@ "type": "null" } ], - "description": "Whether the agent wants diagnostics context." + "description": "Whether the agent wants diagnostics context.", + "x-deserialize-default-on-error": true }, "editHistory": { "anyOf": [ @@ -3952,7 +3922,8 @@ "type": "null" } ], - "description": "Whether the agent wants edit history context." + "description": "Whether the agent wants edit history context.", + "x-deserialize-default-on-error": true }, "openFiles": { "anyOf": [ @@ -3963,7 +3934,8 @@ "type": "null" } ], - "description": "Whether the agent wants open files context." + "description": "Whether the agent wants open files context.", + "x-deserialize-default-on-error": true }, "recentFiles": { "anyOf": [ @@ -3974,7 +3946,8 @@ "type": "null" } ], - "description": "Whether the agent wants recent files context." + "description": "Whether the agent wants recent files context.", + "x-deserialize-default-on-error": true }, "relatedSnippets": { "anyOf": [ @@ -3985,7 +3958,8 @@ "type": "null" } ], - "description": "Whether the agent wants related snippets context." + "description": "Whether the agent wants related snippets context.", + "x-deserialize-default-on-error": true }, "userActions": { "anyOf": [ @@ -3996,7 +3970,8 @@ "type": "null" } ], - "description": "Whether the agent wants user actions context." + "description": "Whether the agent wants user actions context.", + "x-deserialize-default-on-error": true } }, "type": "object" @@ -4149,7 +4124,8 @@ "type": "null" } ], - "description": "Whether the agent wants `document/didChange` events, and the sync kind." + "description": "Whether the agent wants `document/didChange` events, and the sync kind.", + "x-deserialize-default-on-error": true }, "didClose": { "anyOf": [ @@ -4160,7 +4136,8 @@ "type": "null" } ], - "description": "Whether the agent wants `document/didClose` events." + "description": "Whether the agent wants `document/didClose` events.", + "x-deserialize-default-on-error": true }, "didFocus": { "anyOf": [ @@ -4171,7 +4148,8 @@ "type": "null" } ], - "description": "Whether the agent wants `document/didFocus` events." + "description": "Whether the agent wants `document/didFocus` events.", + "x-deserialize-default-on-error": true }, "didOpen": { "anyOf": [ @@ -4182,7 +4160,8 @@ "type": "null" } ], - "description": "Whether the agent wants `document/didOpen` events." + "description": "Whether the agent wants `document/didOpen` events.", + "x-deserialize-default-on-error": true }, "didSave": { "anyOf": [ @@ -4193,7 +4172,8 @@ "type": "null" } ], - "description": "Whether the agent wants `document/didSave` events." + "description": "Whether the agent wants `document/didSave` events.", + "x-deserialize-default-on-error": true } }, "type": "object" @@ -4242,7 +4222,8 @@ "type": "null" } ], - "description": "Optional suggested cursor position after applying edits." + "description": "Optional suggested cursor position after applying edits.", + "x-deserialize-default-on-error": true }, "edits": { "description": "The text edits to apply.", @@ -4280,7 +4261,8 @@ "type": "null" } ], - "description": "Document event capabilities." + "description": "Document event capabilities.", + "x-deserialize-default-on-error": true } }, "type": "object" @@ -4353,7 +4335,8 @@ "description": "Timestamp in milliseconds since epoch of when the file was last focused.", "format": "uint64", "minimum": 0, - "type": ["integer", "null"] + "type": ["integer", "null"], + "x-deserialize-default-on-error": true }, "uri": { "description": "The URI of the file.", @@ -4368,7 +4351,8 @@ "type": "null" } ], - "description": "The visible range in the editor, if any." + "description": "The visible range in the editor, if any.", + "x-deserialize-default-on-error": true } }, "required": ["uri", "languageId"], @@ -4583,42 +4567,54 @@ "items": { "$ref": "#/$defs/NesDiagnostic" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "editHistory": { "description": "Recent edit history.", "items": { "$ref": "#/$defs/NesEditHistoryEntry" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "openFiles": { "description": "Currently open files in the editor.", "items": { "$ref": "#/$defs/NesOpenFile" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "recentFiles": { "description": "Recently accessed files.", "items": { "$ref": "#/$defs/NesRecentFile" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "relatedSnippets": { "description": "Related code snippets.", "items": { "$ref": "#/$defs/NesRelatedSnippet" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "userActions": { "description": "Recent user actions (typing, navigation, etc.).", "items": { "$ref": "#/$defs/NesUserAction" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true } }, "type": "object" @@ -4789,7 +4785,7 @@ "type": ["object", "null"] }, "additionalDirectories": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAdditional workspace roots for this session. Each path must be absolute.\n\nThese expand the session's filesystem scope without changing `cwd`, which\nremains the base for relative paths. When omitted or empty, no\nadditional roots are activated for the new session.", + "description": "Additional workspace roots for this session. Each path must be absolute.\n\nThese expand the session's filesystem scope without changing `cwd`, which\nremains the base for relative paths. When omitted or empty, no\nadditional roots are activated for the new session.", "items": { "type": "string" }, @@ -4825,18 +4821,9 @@ "items": { "$ref": "#/$defs/SessionConfigOption" }, - "type": ["array", "null"] - }, - "models": { - "anyOf": [ - { - "$ref": "#/$defs/SessionModelState" - }, - { - "type": "null" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent" + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "modes": { "anyOf": [ @@ -4847,7 +4834,8 @@ "type": "null" } ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" + "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "x-deserialize-default-on-error": true }, "sessionId": { "allOf": [ @@ -4966,7 +4954,9 @@ "items": { "$ref": "#/$defs/PlanEntry" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true } }, "required": ["entries"], @@ -5096,7 +5086,9 @@ "items": { "$ref": "#/$defs/PlanEntry" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "id": { "allOf": [ @@ -5353,7 +5345,8 @@ "type": "null" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nToken usage for this turn (optional)." + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nToken usage for this turn (optional).", + "x-deserialize-default-on-error": true }, "userMessageId": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe acknowledged user message ID.\n\nIf the client provided a `messageId` in the [`PromptRequest`], the agent echoes it here\nto confirm it was recorded. If the client did not provide one, the agent MAY assign one\nand return it here. Absence of this field indicates the agent did not record a message ID.", @@ -5423,7 +5416,9 @@ "items": { "$ref": "#/$defs/LlmProtocol" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true } }, "required": ["id", "supported", "required"], @@ -5539,7 +5534,8 @@ "type": "null" } ], - "description": "The reason for rejection." + "description": "The reason for rejection.", + "x-deserialize-default-on-error": true }, "sessionId": { "allOf": [ @@ -5722,7 +5718,8 @@ { "type": "null" } - ] + ], + "x-deserialize-default-on-error": true }, "description": { "type": ["string", "null"] @@ -5756,7 +5753,7 @@ "type": ["object", "null"] }, "additionalDirectories": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAdditional 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`.", + "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`.", "items": { "type": "string" }, @@ -5800,18 +5797,9 @@ "items": { "$ref": "#/$defs/SessionConfigOption" }, - "type": ["array", "null"] - }, - "models": { - "anyOf": [ - { - "$ref": "#/$defs/SessionModelState" - }, - { - "type": "null" - } - ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent" + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "modes": { "anyOf": [ @@ -5822,7 +5810,8 @@ "type": "null" } ], - "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" + "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "x-deserialize-default-on-error": true } }, "type": "object", @@ -5855,7 +5844,7 @@ "type": "object" }, "SessionAdditionalDirectoriesCapabilities": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for additional session directories support.\n\nBy supplying `{}` it means that the agent supports the `additionalDirectories`\nfield on supported 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.", + "description": "Capabilities for additional session directories support.\n\nBy supplying `{}` it means that the agent supports the `additionalDirectories`\nfield on supported 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.", "properties": { "_meta": { "additionalProperties": true, @@ -5882,7 +5871,8 @@ "type": "null" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `additionalDirectories` on supported session lifecycle requests.\n\nAgents that also support `session/list` may return\n`SessionInfo.additionalDirectories` to report the complete ordered\nadditional-root list associated with a listed session." + "description": "Whether the agent supports `additionalDirectories` on supported session lifecycle requests.\n\nAgents that also support `session/list` may return\n`SessionInfo.additionalDirectories` to report the complete ordered\nadditional-root list associated with a listed session.", + "x-deserialize-default-on-error": true }, "close": { "anyOf": [ @@ -5893,7 +5883,8 @@ "type": "null" } ], - "description": "Whether the agent supports `session/close`." + "description": "Whether the agent supports `session/close`.", + "x-deserialize-default-on-error": true }, "delete": { "anyOf": [ @@ -5904,7 +5895,8 @@ "type": "null" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/delete`.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports deleting sessions from `session/list`." + "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/delete`.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports deleting sessions from `session/list`.", + "x-deserialize-default-on-error": true }, "fork": { "anyOf": [ @@ -5915,7 +5907,8 @@ "type": "null" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/fork`." + "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`.", + "x-deserialize-default-on-error": true }, "list": { "anyOf": [ @@ -5926,7 +5919,8 @@ "type": "null" } ], - "description": "Whether the agent supports `session/list`." + "description": "Whether the agent supports `session/list`.", + "x-deserialize-default-on-error": true }, "resume": { "anyOf": [ @@ -5937,7 +5931,8 @@ "type": "null" } ], - "description": "Whether the agent supports `session/resume`." + "description": "Whether the agent supports `session/resume`.", + "x-deserialize-default-on-error": true } }, "type": "object" @@ -6026,7 +6021,8 @@ "type": "null" } ], - "description": "Optional semantic category for this option (UX only)." + "description": "Optional semantic category for this option (UX only).", + "x-deserialize-default-on-error": true }, "description": { "description": "Optional description for the Client to display to the user.", @@ -6215,7 +6211,7 @@ "type": ["object", "null"] }, "additionalDirectories": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAdditional 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.", + "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.", "items": { "type": "string" }, @@ -6235,11 +6231,13 @@ }, "title": { "description": "Human-readable title for the session", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "updatedAt": { "description": "ISO 8601 timestamp of last activity", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true } }, "required": ["sessionId", "cwd"], @@ -6313,7 +6311,9 @@ "items": { "$ref": "#/$defs/SessionMode" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "currentModeId": { "allOf": [ @@ -6327,33 +6327,6 @@ "required": ["currentModeId", "availableModes"], "type": "object" }, - "SessionModelState": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe set of models and the one currently active.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "availableModels": { - "description": "The set of models that the Agent can use", - "items": { - "$ref": "#/$defs/ModelInfo" - }, - "type": "array" - }, - "currentModelId": { - "allOf": [ - { - "$ref": "#/$defs/ModelId" - } - ], - "description": "The current model the Agent is in." - } - }, - "required": ["currentModelId", "availableModels"], - "type": "object" - }, "SessionNotification": { "description": "Notification containing a session update from the agent.\n\nUsed to stream real-time progress and results during prompt processing.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", "properties": { @@ -6737,7 +6710,9 @@ "items": { "$ref": "#/$defs/SessionConfigOption" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true } }, "required": ["configOptions"], @@ -6788,49 +6763,6 @@ "x-method": "session/set_mode", "x-side": "agent" }, - "SetSessionModelRequest": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for setting a session model.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - }, - "modelId": { - "allOf": [ - { - "$ref": "#/$defs/ModelId" - } - ], - "description": "The ID of the model to set." - }, - "sessionId": { - "allOf": [ - { - "$ref": "#/$defs/SessionId" - } - ], - "description": "The ID of the session to set the model for." - } - }, - "required": ["sessionId", "modelId"], - "type": "object", - "x-method": "session/set_model", - "x-side": "agent" - }, - "SetSessionModelResponse": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `session/set_model` method.", - "properties": { - "_meta": { - "additionalProperties": true, - "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "type": ["object", "null"] - } - }, - "type": "object", - "x-method": "session/set_model", - "x-side": "agent" - }, "StartNesRequest": { "description": "Request to start an NES session.", "properties": { @@ -6848,14 +6780,17 @@ "type": "null" } ], - "description": "Repository metadata, if the workspace is a git repository." + "description": "Repository metadata, if the workspace is a git repository.", + "x-deserialize-default-on-error": true }, "workspaceFolders": { "description": "The workspace folders.", "items": { "$ref": "#/$defs/WorkspaceFolder" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "workspaceUri": { "description": "The root URI of the workspace.", @@ -7019,7 +6954,8 @@ "type": "null" } ], - "description": "Context for the suggestion, included based on agent capabilities." + "description": "Context for the suggestion, included based on agent capabilities.", + "x-deserialize-default-on-error": true }, "position": { "allOf": [ @@ -7038,7 +6974,8 @@ "type": "null" } ], - "description": "The current text selection range, if any." + "description": "The current text selection range, if any.", + "x-deserialize-default-on-error": true }, "sessionId": { "allOf": [ @@ -7084,7 +7021,9 @@ "items": { "$ref": "#/$defs/NesSuggestion" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true } }, "required": ["suggestions"], @@ -7203,7 +7142,8 @@ { "type": "null" } - ] + ], + "x-deserialize-default-on-error": true }, "text": { "type": "string" @@ -7297,7 +7237,9 @@ "items": { "$ref": "#/$defs/ToolCallContent" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "kind": { "allOf": [ @@ -7312,7 +7254,9 @@ "items": { "$ref": "#/$defs/ToolCallLocation" }, - "type": "array" + "type": "array", + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "rawInput": { "description": "Raw input parameters sent to the tool." @@ -7464,7 +7408,9 @@ "items": { "$ref": "#/$defs/ToolCallContent" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "kind": { "anyOf": [ @@ -7475,14 +7421,17 @@ "type": "null" } ], - "description": "Update the tool kind." + "description": "Update the tool kind.", + "x-deserialize-default-on-error": true }, "locations": { "description": "Replace the locations collection.", "items": { "$ref": "#/$defs/ToolCallLocation" }, - "type": ["array", "null"] + "type": ["array", "null"], + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "rawInput": { "description": "Update the raw input." @@ -7499,7 +7448,8 @@ "type": "null" } ], - "description": "Update the execution status." + "description": "Update the execution status.", + "x-deserialize-default-on-error": true }, "title": { "description": "Update the human-readable title.", @@ -7670,7 +7620,8 @@ "type": "null" } ], - "description": "Cumulative session cost (optional)." + "description": "Cumulative session cost (optional).", + "x-deserialize-default-on-error": true }, "size": { "description": "Total context window size in tokens.", diff --git a/schema/version b/schema/version index dffa40e..c37136a 100644 --- a/schema/version +++ b/schema/version @@ -1 +1 @@ -0.13.4 +0.13.5 diff --git a/types_gen.go b/types_gen.go index edd4944..5c83744 100644 --- a/types_gen.go +++ b/types_gen.go @@ -2474,10 +2474,6 @@ type LoadSessionRequest struct { // // See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) Meta map[string]any `json:"_meta,omitempty"` - // **UNSTABLE** - // - // This capability is not part of the spec yet, and may be removed or changed at any point. - // // Additional workspace roots to activate for this session. Each path must be absolute. // // When omitted or empty, no additional roots are activated. When non-empty, @@ -2513,12 +2509,6 @@ type LoadSessionResponse struct { Meta map[string]any `json:"_meta,omitempty"` // Initial session configuration options if supported by the Agent. ConfigOptions []SessionConfigOption `json:"configOptions,omitempty"` - // **UNSTABLE** - // - // This capability is not part of the spec yet, and may be removed or changed at any point. - // - // Initial model state if supported by the Agent - Models *SessionModelState `json:"models,omitempty"` // Initial mode state if supported by the Agent // // See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) @@ -3024,33 +3014,6 @@ type McpServerStdio struct { Name string `json:"name"` } -// **UNSTABLE** -// -// This capability is not part of the spec yet, and may be removed or changed at any point. -// -// A unique identifier for a model. -type ModelId string - -// **UNSTABLE** -// -// This capability is not part of the spec yet, and may be removed or changed at any point. -// -// Information about a selectable model. -type ModelInfo struct { - // The _meta property is reserved by ACP to allow clients and agents to attach additional - // metadata to their interactions. Implementations MUST NOT make assumptions about values at - // these keys. - // - // See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) - Meta map[string]any `json:"_meta,omitempty"` - // Optional description of the model. - Description *string `json:"description,omitempty"` - // Unique identifier for the model. - ModelId ModelId `json:"modelId"` - // Human-readable name of the model. - Name string `json:"name"` -} - // NES capabilities advertised by the agent during initialization. type NesCapabilities struct { // The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -3277,10 +3240,6 @@ type NewSessionRequest struct { // // See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) Meta map[string]any `json:"_meta,omitempty"` - // **UNSTABLE** - // - // This capability is not part of the spec yet, and may be removed or changed at any point. - // // Additional workspace roots for this session. Each path must be absolute. // // These expand the session's filesystem scope without changing 'cwd', which @@ -3315,12 +3274,6 @@ type NewSessionResponse struct { Meta map[string]any `json:"_meta,omitempty"` // Initial session configuration options if supported by the Agent. ConfigOptions []SessionConfigOption `json:"configOptions,omitempty"` - // **UNSTABLE** - // - // This capability is not part of the spec yet, and may be removed or changed at any point. - // - // Initial model state if supported by the Agent - Models *SessionModelState `json:"models,omitempty"` // Initial mode state if supported by the Agent // // See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) @@ -4378,10 +4331,6 @@ type ResumeSessionRequest struct { // // See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) Meta map[string]any `json:"_meta,omitempty"` - // **UNSTABLE** - // - // This capability is not part of the spec yet, and may be removed or changed at any point. - // // Additional workspace roots to activate for this session. Each path must be absolute. // // When omitted or empty, no additional roots are activated. When non-empty, @@ -4414,12 +4363,6 @@ type ResumeSessionResponse struct { Meta map[string]any `json:"_meta,omitempty"` // Initial session configuration options if supported by the Agent. ConfigOptions []SessionConfigOption `json:"configOptions,omitempty"` - // **UNSTABLE** - // - // This capability is not part of the spec yet, and may be removed or changed at any point. - // - // Initial model state if supported by the Agent - Models *SessionModelState `json:"models,omitempty"` // Initial mode state if supported by the Agent // // See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) @@ -4450,10 +4393,6 @@ type SelectedPermissionOutcome struct { OptionId PermissionOptionId `json:"optionId"` } -// **UNSTABLE** -// -// This capability is not part of the spec yet, and may be removed or changed at any point. -// // Capabilities for additional session directories support. // // By supplying '{}' it means that the agent supports the 'additionalDirectories' @@ -4485,10 +4424,6 @@ type SessionCapabilities struct { // // See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) Meta map[string]any `json:"_meta,omitempty"` - // **UNSTABLE** - // - // This capability is not part of the spec yet, and may be removed or changed at any point. - // // Whether the agent supports 'additionalDirectories' on supported session lifecycle requests. // // Agents that also support 'session/list' may return @@ -4952,10 +4887,6 @@ type SessionInfo struct { // // See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) Meta map[string]any `json:"_meta,omitempty"` - // **UNSTABLE** - // - // This capability is not part of the spec yet, and may be removed or changed at any point. - // // Additional workspace roots reported for this session. Each path must be absolute. // // When present, this is the complete ordered additional-root list reported @@ -5033,24 +4964,6 @@ type SessionModeState struct { CurrentModeId SessionModeId `json:"currentModeId"` } -// **UNSTABLE** -// -// This capability is not part of the spec yet, and may be removed or changed at any point. -// -// The set of models and the one currently active. -type SessionModelState struct { - // The _meta property is reserved by ACP to allow clients and agents to attach additional - // metadata to their interactions. Implementations MUST NOT make assumptions about values at - // these keys. - // - // See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) - Meta map[string]any `json:"_meta,omitempty"` - // The set of models that the Agent can use - AvailableModels []ModelInfo `json:"availableModels"` - // The current model the Agent is in. - CurrentModelId ModelId `json:"currentModelId"` -} - // Notification containing a session update from the agent. // // Used to stream real-time progress and results during prompt processing. @@ -7796,10 +7709,6 @@ type UnstableForkSessionRequest struct { // // See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) Meta map[string]any `json:"_meta,omitempty"` - // **UNSTABLE** - // - // This capability is not part of the spec yet, and may be removed or changed at any point. - // // Additional workspace roots to activate for this session. Each path must be absolute. // // When omitted or empty, no additional roots are activated. When non-empty, @@ -7835,12 +7744,6 @@ type UnstableForkSessionResponse struct { Meta map[string]any `json:"_meta,omitempty"` // Initial session configuration options if supported by the Agent. ConfigOptions []UnstableSessionConfigOption `json:"configOptions,omitempty"` - // **UNSTABLE** - // - // This capability is not part of the spec yet, and may be removed or changed at any point. - // - // Initial model state if supported by the Agent - Models *UnstableSessionModelState `json:"models,omitempty"` // Initial mode state if supported by the Agent // // See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) @@ -8330,33 +8233,6 @@ func (v *UnstableMessageMcpRequest) Validate() error { // UnstableMessageMcpResponse is a union or complex schema; represented generically. type UnstableMessageMcpResponse any -// **UNSTABLE** -// -// This capability is not part of the spec yet, and may be removed or changed at any point. -// -// A unique identifier for a model. -type UnstableModelId string - -// **UNSTABLE** -// -// This capability is not part of the spec yet, and may be removed or changed at any point. -// -// Information about a selectable model. -type UnstableModelInfo struct { - // The _meta property is reserved by ACP to allow clients and agents to attach additional - // metadata to their interactions. Implementations MUST NOT make assumptions about values at - // these keys. - // - // See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) - Meta map[string]any `json:"_meta,omitempty"` - // Optional description of the model. - Description *string `json:"description,omitempty"` - // Unique identifier for the model. - ModelId UnstableModelId `json:"modelId"` - // Human-readable name of the model. - Name string `json:"name"` -} - // A diagnostic (error, warning, etc.). type UnstableNesDiagnostic struct { // The diagnostic message. @@ -9132,24 +9008,6 @@ func (u *UnstableSessionConfigOption) Validate() error { return nil } -// **UNSTABLE** -// -// This capability is not part of the spec yet, and may be removed or changed at any point. -// -// The set of models and the one currently active. -type UnstableSessionModelState struct { - // The _meta property is reserved by ACP to allow clients and agents to attach additional - // metadata to their interactions. Implementations MUST NOT make assumptions about values at - // these keys. - // - // See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) - Meta map[string]any `json:"_meta,omitempty"` - // The set of models that the Agent can use - AvailableModels []UnstableModelInfo `json:"availableModels"` - // The current model the Agent is in. - CurrentModelId UnstableModelId `json:"currentModelId"` -} - // **UNSTABLE** // // This capability is not part of the spec yet, and may be removed or changed at any point. @@ -9203,46 +9061,6 @@ func (v *UnstableSetProviderResponse) Validate() error { return nil } -// **UNSTABLE** -// -// This capability is not part of the spec yet, and may be removed or changed at any point. -// -// Request parameters for setting a session model. -type UnstableSetSessionModelRequest struct { - // The _meta property is reserved by ACP to allow clients and agents to attach additional - // metadata to their interactions. Implementations MUST NOT make assumptions about values at - // these keys. - // - // See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) - Meta map[string]any `json:"_meta,omitempty"` - // The ID of the model to set. - ModelId UnstableModelId `json:"modelId"` - // The ID of the session to set the model for. - SessionId SessionId `json:"sessionId"` -} - -func (v *UnstableSetSessionModelRequest) Validate() error { - return nil -} - -// **UNSTABLE** -// -// This capability is not part of the spec yet, and may be removed or changed at any point. -// -// Response to 'session/set_model' method. -type UnstableSetSessionModelResponse struct { - // The _meta property is reserved by ACP to allow clients and agents to attach additional - // metadata to their interactions. Implementations MUST NOT make assumptions about values at - // these keys. - // - // See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) - Meta map[string]any `json:"_meta,omitempty"` -} - -func (v *UnstableSetSessionModelResponse) Validate() error { - return nil -} - // Request to start an NES session. type UnstableStartNesRequest struct { // The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -9609,12 +9427,6 @@ type AgentExperimental interface { // // Only available if the Agent supports the 'session.fork' capability. UnstableForkSession(ctx context.Context, params UnstableForkSessionRequest) (UnstableForkSessionResponse, error) - // **UNSTABLE** - // - // This capability is not part of the spec yet, and may be removed or changed at any point. - // - // Request parameters for setting a session model. - UnstableSetSessionModel(ctx context.Context, params UnstableSetSessionModelRequest) (UnstableSetSessionModelResponse, error) } type Client interface { // Request to read content from a text file. diff --git a/version b/version index dffa40e..c37136a 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.13.4 +0.13.5