From 3913b503a35a5952217fd39e897ed1e4ffbbda61 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Mon, 13 Apr 2026 01:48:34 +1000 Subject: [PATCH] Update @github/copilot to version 1.0.24 in package.json and package-lock.json (#309257) * Update Copilot SDK to version 1.0.24 * Updates * Fix tets * Fixes --- extensions/copilot/package-lock.json | 56 +++++++++---------- extensions/copilot/package.json | 2 +- extensions/copilot/script/postinstall.ts | 4 +- .../node/copilotcliSessionService.ts | 12 ++-- .../test/copilotCliSessionService.spec.ts | 14 ++--- .../copilotCLIChatSessionParticipant.spec.ts | 2 +- 6 files changed, 47 insertions(+), 43 deletions(-) diff --git a/extensions/copilot/package-lock.json b/extensions/copilot/package-lock.json index bf17ba37648..54b9632fd62 100644 --- a/extensions/copilot/package-lock.json +++ b/extensions/copilot/package-lock.json @@ -13,7 +13,7 @@ "@anthropic-ai/claude-agent-sdk": "0.2.98", "@anthropic-ai/sdk": "^0.82.0", "@github/blackbird-external-ingest-utils": "^0.3.0", - "@github/copilot": "^1.0.21", + "@github/copilot": "^1.0.24", "@google/genai": "^1.22.0", "@humanwhocodes/gitignore-to-minimatch": "1.0.2", "@microsoft/tiktokenizer": "^1.0.10", @@ -3203,26 +3203,26 @@ "license": "MIT" }, "node_modules/@github/copilot": { - "version": "1.0.21", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.21.tgz", - "integrity": "sha512-P+nORjNKAtl92jYCG6Qr1Rsw2JoyScgeQSkIR6O2WB37WS5JVdA4ax1WVualMbfuc9V58CPHX6fwyNpkI89FkQ==", + "version": "1.0.24", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.24.tgz", + "integrity": "sha512-/nZ2GwhaGq0HeI3W+6LE0JGw25/bipC6tYVa+oQ5tIvAafBazuNt10CXkeaor+u9oBWLZtPbdTyAzE2tjy9NpQ==", "license": "SEE LICENSE IN LICENSE.md", "bin": { "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.21", - "@github/copilot-darwin-x64": "1.0.21", - "@github/copilot-linux-arm64": "1.0.21", - "@github/copilot-linux-x64": "1.0.21", - "@github/copilot-win32-arm64": "1.0.21", - "@github/copilot-win32-x64": "1.0.21" + "@github/copilot-darwin-arm64": "1.0.24", + "@github/copilot-darwin-x64": "1.0.24", + "@github/copilot-linux-arm64": "1.0.24", + "@github/copilot-linux-x64": "1.0.24", + "@github/copilot-win32-arm64": "1.0.24", + "@github/copilot-win32-x64": "1.0.24" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.21", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.21.tgz", - "integrity": "sha512-aB+s9ldTwcyCOYmzjcQ4SknV6g81z92T8aUJEJZBwOXOTBeWKAJtk16ooAKangZgdwuLgO3or1JUjx1FJAm5nQ==", + "version": "1.0.24", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.24.tgz", + "integrity": "sha512-lejn6KV+09rZEICX3nRx9a58DQFQ2kK3NJ3EICfVLngUCWIUmwn1BLezjeTQc9YNasHltA1hulvfsWqX+VjlMw==", "cpu": [ "arm64" ], @@ -3236,9 +3236,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.21", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.21.tgz", - "integrity": "sha512-aNad81DOGuGShmaiFNIxBUSZLwte0dXmDYkGfAF9WJIgY4qP4A8CPWFoNr8//gY+4CwaIf9V+f/OC6k2BdECbw==", + "version": "1.0.24", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.24.tgz", + "integrity": "sha512-r2F3keTvr4Bunz3V+waRAvsHgqsVQGyIZFBebsNPWxBX1eh3IXgtBqxCR7vXTFyZonQ8VaiJH3YYEfAhyKsk9g==", "cpu": [ "x64" ], @@ -3252,9 +3252,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.21", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.21.tgz", - "integrity": "sha512-FL0NsCnHax4czHVv1S8iBqPLGZDhZ28N3+6nT29xWGhmjBWTkIofxLThKUPcyyMsfPTTxIlrdwWa8qQc5z2Q+g==", + "version": "1.0.24", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.24.tgz", + "integrity": "sha512-B3oANXKKKLhnKYozXa/W+DxfCQAHJCs0QKR5rBwNrwJbf656twNgALSxWTSJk+1rEP6MrHCswUAcwjwZL7Q+FQ==", "cpu": [ "arm64" ], @@ -3268,9 +3268,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.21", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.21.tgz", - "integrity": "sha512-S7pWVI16hesZtxYbIyfw+MHZpc5ESoGKUVr5Y+lZJNaM2340gJGPQzQwSpvKIRMLHRKI2hXLwciAnYeMFxE/Tg==", + "version": "1.0.24", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.24.tgz", + "integrity": "sha512-NGTldizY54B+4Sfhu/GWoEQNMwqqUNgMwbSgBshFv+Hqy1EwuvNWKVov1Y0Vzhp4qAHc6ZxBk/OPIW8Ato9FUg==", "cpu": [ "x64" ], @@ -3284,9 +3284,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.21", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.21.tgz", - "integrity": "sha512-a9qc2Ku+XbyBkXCclbIvBbIVnECACTIWnPctmXWsQeSdeapGxgfHGux7y8hAFV5j6+nhCm6cnyEMS3rkZjAhdA==", + "version": "1.0.24", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.24.tgz", + "integrity": "sha512-/pd/kgef7/HIIg1SQq4q8fext39pDSC44jHB10KkhfgG1WaDFhQbc/aSSMQfxeldkRbQh6VANp8WtGQdwtMCBA==", "cpu": [ "arm64" ], @@ -3300,9 +3300,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.21", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.21.tgz", - "integrity": "sha512-9klu+7NQ6tEyb8sibb0rsbimBivDrnNltZho10Bgbf1wh3o+erTjffXDjW9Zkyaw8lZA9Fz8bqhVkKntZq58Lg==", + "version": "1.0.24", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.24.tgz", + "integrity": "sha512-RDvOiSvyEJwELqErwANJTrdRuMIHkwPE4QK7Le7WsmaSKxiuS4H1Pa8Yxnd2FWrMsCHEbase23GJlymbnGYLXQ==", "cpu": [ "x64" ], diff --git a/extensions/copilot/package.json b/extensions/copilot/package.json index 5719221edde..b00e2f1d0a6 100644 --- a/extensions/copilot/package.json +++ b/extensions/copilot/package.json @@ -6351,7 +6351,7 @@ "@anthropic-ai/claude-agent-sdk": "0.2.98", "@anthropic-ai/sdk": "^0.82.0", "@github/blackbird-external-ingest-utils": "^0.3.0", - "@github/copilot": "^1.0.21", + "@github/copilot": "^1.0.24", "@google/genai": "^1.22.0", "@humanwhocodes/gitignore-to-minimatch": "1.0.2", "@microsoft/tiktokenizer": "^1.0.10", diff --git a/extensions/copilot/script/postinstall.ts b/extensions/copilot/script/postinstall.ts index 3bc706587bb..4d86ec2c4c2 100644 --- a/extensions/copilot/script/postinstall.ts +++ b/extensions/copilot/script/postinstall.ts @@ -87,8 +87,8 @@ async function copyCopilotCliDefinitionFiles() { } async function copyCopilotCliSkillsFiles() { - const sourceDir = path.join(REPO_ROOT, 'node_modules', '@github', 'copilot', 'builtin-skills', 'customizing-copilot-cloud-agents-environment'); - const targetDir = path.join(REPO_ROOT, 'node_modules', '@github', 'copilot', 'sdk', 'builtin-skills', 'customizing-copilot-cloud-agents-environment'); + const sourceDir = path.join(REPO_ROOT, 'node_modules', '@github', 'copilot', 'builtin-skills'); + const targetDir = path.join(REPO_ROOT, 'node_modules', '@github', 'copilot', 'sdk', 'builtin-skills'); await copyCopilotCLIFolders(sourceDir, targetDir); } diff --git a/extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSessionService.ts b/extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSessionService.ts index 9ba5a880b97..d6839eb6c4b 100644 --- a/extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSessionService.ts +++ b/extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSessionService.ts @@ -173,7 +173,7 @@ export class CopilotCLISessionService extends Disposable implements ICopilotCLIS this.monitorSessionFiles(); this._sessionManager = new Lazy>(async () => { try { - const { internal } = await this.getSDKPackage(); + const { internal, createLocalFeatureFlagService, noopTelemetryBinder } = await this.getSDKPackage(); // Always enable SDK OTel so the debug panel receives native spans via the bridge. // When user OTel is disabled, we force file exporter to /dev/null so the SDK // creates OtelSessionTracker (for debug panel) but doesn't export to any collector. @@ -202,7 +202,11 @@ export class CopilotCLISessionService extends Disposable implements ICopilotCLIS process.env['COPILOT_OTEL_EXPORTER_TYPE'] = 'file'; process.env['COPILOT_OTEL_FILE_EXPORTER_PATH'] = devNull; } - return new internal.LocalSessionManager({ telemetryService: new internal.NoopTelemetryService(), telemetryBinder: undefined, flushDebounceMs: undefined, settings: undefined, version: undefined }); + return new internal.LocalSessionManager({ + featureFlagService: createLocalFeatureFlagService(), + telemetryService: new internal.NoopTelemetryService(), + telemetryBinder: noopTelemetryBinder + }, { flushDebounceMs: undefined, settings: undefined, version: undefined }); } catch (error) { this.logService.error(`Failed to initialize Copilot CLI Session Manager: ${error}`); @@ -213,8 +217,8 @@ export class CopilotCLISessionService extends Disposable implements ICopilotCLIS } private async getSDKPackage() { - const { internal, LocalSession } = await this.copilotCLISDK.getPackage(); - return { internal, LocalSession }; + const { internal, LocalSession, createLocalFeatureFlagService, noopTelemetryBinder } = await this.copilotCLISDK.getPackage(); + return { internal, LocalSession, createLocalFeatureFlagService, noopTelemetryBinder }; } getSessionWorkingDirectory(sessionId: string): Uri | undefined { diff --git a/extensions/copilot/src/extension/chatSessions/copilotcli/node/test/copilotCliSessionService.spec.ts b/extensions/copilot/src/extension/chatSessions/copilotcli/node/test/copilotCliSessionService.spec.ts index 1096fa7bcad..316a12750d9 100644 --- a/extensions/copilot/src/extension/chatSessions/copilotcli/node/test/copilotCliSessionService.spec.ts +++ b/extensions/copilot/src/extension/chatSessions/copilotcli/node/test/copilotCliSessionService.spec.ts @@ -107,7 +107,7 @@ describe('CopilotCLISessionService', () => { beforeEach(async () => { vi.useRealTimers(); const sdk = { - getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession })), + getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })), getRequestId: vi.fn(() => undefined), } as unknown as ICopilotCLISDK; @@ -340,7 +340,7 @@ describe('CopilotCLISessionService', () => { const sessionDir = URI.file(getCopilotCLISessionDir(sessionId)); const fileSystem = new MockFileSystemService(); const sdk = { - getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession })) + getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })) } as unknown as ICopilotCLISDK; const services = createExtensionUnitTestingServices(); disposables.add(services); @@ -379,7 +379,7 @@ describe('CopilotCLISessionService', () => { const sessionDir = URI.file(getCopilotCLISessionDir(sessionId)); const fileSystem = new MockFileSystemService(); const sdk = { - getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession })) + getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })) } as unknown as ICopilotCLISDK; const services = createExtensionUnitTestingServices(); disposables.add(services); @@ -444,7 +444,7 @@ describe('CopilotCLISessionService', () => { const sessionDir = URI.file(getCopilotCLISessionDir(sessionId)); const fileSystem = new MockFileSystemService(); const sdk = { - getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession })) + getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })) } as unknown as ICopilotCLISDK; const services = createExtensionUnitTestingServices(); disposables.add(services); @@ -490,7 +490,7 @@ describe('CopilotCLISessionService', () => { const sessionDir = URI.file(getCopilotCLISessionDir(sessionId)); const fileSystem = new MockFileSystemService(); const sdk = { - getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession })) + getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })) } as unknown as ICopilotCLISDK; const services = createExtensionUnitTestingServices(); disposables.add(services); @@ -742,7 +742,7 @@ describe('CopilotCLISessionService', () => { const storeMetadataSpy = vi.spyOn(metadataStore, 'storeForkedSessionMetadata'); const sdk = { - getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession })), + getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })), getRequestId: vi.fn(() => undefined), } as unknown as ICopilotCLISDK; const services = disposables.add(createExtensionUnitTestingServices()); @@ -783,7 +783,7 @@ describe('CopilotCLISessionService', () => { manager.sessions.set(sourceId, sdkSession); const sdk = { - getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession })), + getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })), getRequestId: vi.fn(() => ({ vscodeRequestId: 'vsc-req-1', copilotRequestId: 'sdk-event-1' })), } as unknown as ICopilotCLISDK; const services = disposables.add(createExtensionUnitTestingServices()); diff --git a/extensions/copilot/src/extension/chatSessions/vscode-node/test/copilotCLIChatSessionParticipant.spec.ts b/extensions/copilot/src/extension/chatSessions/vscode-node/test/copilotCLIChatSessionParticipant.spec.ts index f63dca1bc08..0ec8f9f82f5 100644 --- a/extensions/copilot/src/extension/chatSessions/vscode-node/test/copilotCLIChatSessionParticipant.spec.ts +++ b/extensions/copilot/src/extension/chatSessions/vscode-node/test/copilotCLIChatSessionParticipant.spec.ts @@ -328,7 +328,7 @@ describe('CopilotCLIChatSessionParticipant.handleRequest', () => { } }); sdk = { - getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } } })), + getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })), getAuthInfo: vi.fn(async () => ({ type: 'token' as const, token: 'valid-token', host: 'https://github.com' })), } as unknown as ICopilotCLISDK; const services = disposables.add(createExtensionUnitTestingServices());