From 9fca22a03bdec5dc265bfdc42df316fb286a8142 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Tue, 10 Nov 2026 23:34:49 +0100 Subject: [PATCH] fix: update to @agentclientprotocol/sdk 2.6.0 (#1590) Updates `@agentclientprotocol/sdk` from 2.5.0 to 2.6.0 (schema v1.31.0 and v2.0.0-alpha.15). The new schema adds `configOptions` to session setup requests. The v2 core converts a setup request to its v1 form, and the v2 entries are not assignable to the v1 type, so `v1NewSessionRequest` leaves them out. Nothing reads them yet: a Client only sends them to an Agent that advertises `session.options`. #1592 serves them. No behavior change. `npm run check`, `npm run build` and `npm run test:run` pass. --- package-lock.json | 8 ++++---- package.json | 2 +- src/v2/session-requests.ts | 7 ++++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 73819222..6dfc6248 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.105.0", "license": "Apache-2.0", "dependencies": { - "@agentclientprotocol/sdk": "2.5.0", + "@agentclientprotocol/sdk": "2.6.0", "@anthropic-ai/claude-agent-sdk": "0.3.322", "diff": "9.0.0", "zod": "4.6.7" @@ -38,9 +38,9 @@ } }, "node_modules/@agentclientprotocol/sdk": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@agentclientprotocol/sdk/-/sdk-2.5.0.tgz", - "integrity": "sha512-MFlXeIuwN6nZSK45SAsSnVjbLgQ2r4fnthoF1lQoGJP3PdaPRpOZeCF2Dds8S4cN8yZP5QbxB1bkJccGskmcYw==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@agentclientprotocol/sdk/-/sdk-2.6.0.tgz", + "integrity": "sha512-3FtL6MkAV5F9qxg0FQV8wmBszIm2xuVPoDWOILIFSDQ+Vq3Twdh7Cw6Hk2GOPUbevgrTUpUAqZXQy7Geaj79mw==", "license": "Apache-2.0", "peerDependencies": { "@modelcontextprotocol/server": "^2.4.0", diff --git a/package.json b/package.json index 66c85b72..3b5c9acf 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "node": ">=22" }, "dependencies": { - "@agentclientprotocol/sdk": "2.5.0", + "@agentclientprotocol/sdk": "2.6.0", "@anthropic-ai/claude-agent-sdk": "0.3.322", "diff": "9.0.0", "zod": "4.6.7" diff --git a/src/v2/session-requests.ts b/src/v2/session-requests.ts index de353897..2a2e90c4 100644 --- a/src/v2/session-requests.ts +++ b/src/v2/session-requests.ts @@ -19,8 +19,13 @@ import * as v2 from "@agentclientprotocol/sdk/experimental/v2/unstable"; import { V2_SESSION_CAPABILITIES } from "./initialize.js"; import { v1ContentBlock } from "./prompt.js"; +/** + * Without `configOptions`: a client sends them only to an agent that + * advertises `session.options`, which this one does not. + */ export function v1NewSessionRequest(params: v2.NewSessionRequest): NewSessionRequest { - const { mcpServers, systemPrompt, ...request } = params; + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { mcpServers, systemPrompt, configOptions, ...request } = params; // v1 requires the list; v2 treats an omitted list as an empty one. return { ...request,