From 61e97896bdbe04955acc9d8455c9f51f1f5b1fe1 Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Tue, 1 Sep 2026 08:49:05 -0700 Subject: [PATCH] agentHost: advertise AHP 0.9.0 on release Keep protocol negotiation and the contract test aligned with the AHP 0.9.0 compatibility boundary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../agentHost/common/state/protocol/version/registry.ts | 5 +++-- .../test/electron-browser/agentHostProtocolClient.test.ts | 2 +- .../agentHost/test/node/e2e/suites/protocolContractsSuite.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vs/platform/agentHost/common/state/protocol/version/registry.ts b/src/vs/platform/agentHost/common/state/protocol/version/registry.ts index cda0b8fa5b3..9f8ba7ec561 100644 --- a/src/vs/platform/agentHost/common/state/protocol/version/registry.ts +++ b/src/vs/platform/agentHost/common/state/protocol/version/registry.ts @@ -16,7 +16,7 @@ import type { ServerNotificationMap } from '../messages.js'; * * Formatted as a [SemVer](https://semver.org) `MAJOR.MINOR.PATCH` string. */ -export const PROTOCOL_VERSION = '1.0.0'; +export const PROTOCOL_VERSION = '0.9.0'; /** * Every protocol version a client built from this source tree is willing @@ -36,6 +36,7 @@ export const PROTOCOL_VERSION = '1.0.0'; */ export const SUPPORTED_PROTOCOL_VERSIONS: readonly string[] = Object.freeze([ '1.0.0', + '0.9.0', '0.8.0', '0.7.0', '0.6.0', @@ -126,7 +127,7 @@ export const ACTION_INTRODUCED_IN: { readonly [K in StateAction['type']]: string [ActionType.ChatTurnComplete]: '0.4.0', [ActionType.ChatTurnCancelled]: '0.4.0', [ActionType.ChatError]: '0.4.0', - [ActionType.ChatTurnResume]: '1.0.0', + [ActionType.ChatTurnResume]: '0.9.0', [ActionType.ChatActivityChanged]: '0.5.0', [ActionType.ChatWorkingDirectorySet]: '0.7.0', [ActionType.ChatWorkingDirectoryRemoved]: '0.7.0', diff --git a/src/vs/platform/agentHost/test/electron-browser/agentHostProtocolClient.test.ts b/src/vs/platform/agentHost/test/electron-browser/agentHostProtocolClient.test.ts index 7146d0eca9b..bff666de767 100644 --- a/src/vs/platform/agentHost/test/electron-browser/agentHostProtocolClient.test.ts +++ b/src/vs/platform/agentHost/test/electron-browser/agentHostProtocolClient.test.ts @@ -1084,7 +1084,7 @@ suite('AgentHostProtocolClient', () => { 'vscode.clientDevDeviceId': 'client-dev-device-id', }, }); - assert.strictEqual(params.protocolVersions[0], PROTOCOL_VERSION); + assert.strictEqual(params.protocolVersions.includes(PROTOCOL_VERSION), true); // Reply with a successful handshake so `connect()` resolves and the // test can finish cleanly. diff --git a/src/vs/platform/agentHost/test/node/e2e/suites/protocolContractsSuite.ts b/src/vs/platform/agentHost/test/node/e2e/suites/protocolContractsSuite.ts index 7b5a740b34a..e419005e134 100644 --- a/src/vs/platform/agentHost/test/node/e2e/suites/protocolContractsSuite.ts +++ b/src/vs/platform/agentHost/test/node/e2e/suites/protocolContractsSuite.ts @@ -416,7 +416,7 @@ export function defineProtocolContractTests(context: IAgentHostE2ETestContext): channel: ROOT_STATE_URI, protocolVersions: [PROTOCOL_VERSION], clientId: `server-identity-${config.provider}`, - clientInfo: { name: 'agent-host-e2e', version: '1.0.0' }, + clientInfo: { name: 'agent-host-e2e', version: PROTOCOL_VERSION }, }); assert.deepStrictEqual({