diff --git a/nodejs/package-lock.json b/nodejs/package-lock.json index 6c2bb94f..77f2ecf0 100644 --- a/nodejs/package-lock.json +++ b/nodejs/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.8", "license": "MIT", "dependencies": { - "@github/copilot": "^0.0.394", + "@github/copilot": "^0.0.399", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.5" }, @@ -662,26 +662,26 @@ } }, "node_modules/@github/copilot": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-0.0.394.tgz", - "integrity": "sha512-koSiaHvVwjgppgh+puxf6dgsR8ql/WST1scS5bjzMsJFfWk7f4xtEXla7TCQfSGoZkCmCsr2Tis27v5TpssiCg==", + "version": "0.0.399", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-0.0.399.tgz", + "integrity": "sha512-ULRmqkH6L6mdokjMTfLaJQDidJXDUy0EYE8lHsIDxXD4dUoGjfsNRswZ4We+JxIJiXuTF9U9KqQM55QRj/4kQA==", "license": "SEE LICENSE IN LICENSE.md", "bin": { "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "0.0.394", - "@github/copilot-darwin-x64": "0.0.394", - "@github/copilot-linux-arm64": "0.0.394", - "@github/copilot-linux-x64": "0.0.394", - "@github/copilot-win32-arm64": "0.0.394", - "@github/copilot-win32-x64": "0.0.394" + "@github/copilot-darwin-arm64": "0.0.399", + "@github/copilot-darwin-x64": "0.0.399", + "@github/copilot-linux-arm64": "0.0.399", + "@github/copilot-linux-x64": "0.0.399", + "@github/copilot-win32-arm64": "0.0.399", + "@github/copilot-win32-x64": "0.0.399" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-0.0.394.tgz", - "integrity": "sha512-qDmDFiFaYFW45UhxylN2JyQRLVGLCpkr5UmgbfH5e0aksf+69qytK/MwpD2Cq12KdTjyGMEorlADkSu5eftELA==", + "version": "0.0.399", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-0.0.399.tgz", + "integrity": "sha512-8TQWPO9PrjR5g/y13nUmKBpk8oCHPpBPgHgp7hozIGedsbNJrcuABeNEsbkxowTwTiKgXEz5A5DGo5iN2AY+Ww==", "cpu": [ "arm64" ], @@ -695,9 +695,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-0.0.394.tgz", - "integrity": "sha512-iN4YwSVFxhASiBjLk46f+AzRTNHCvYcmyTKBASxieMIhnDxznYmpo+haFKPCv2lCsEWU8s5LARCnXxxx8J1wKA==", + "version": "0.0.399", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-0.0.399.tgz", + "integrity": "sha512-Ge1a6zGpjTbVOUQyvT18NbphmyPidPoVERq7DOTTo3XdKDm8n2jFh6UjQl7atL0hnUaWsKOTx9qrgTPdQmqMDA==", "cpu": [ "x64" ], @@ -711,9 +711,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-0.0.394.tgz", - "integrity": "sha512-9NeGvmO2tGztuneXZfYAyW3fDk6Pdl6Ffg8MAUaevA/p0awvA+ti/Vh0ZSTcI81nDTjkzONvrcIcjYAN7x0oSg==", + "version": "0.0.399", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-0.0.399.tgz", + "integrity": "sha512-41TCc1zxSd6qI56xzOyVR91mW8i7SXQ6IrRbsDBAF8i1dbyzIDO2YZ4c23fn8IRJ3C0aCQvfMoFf/BpzHQ6igw==", "cpu": [ "arm64" ], @@ -727,9 +727,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-0.0.394.tgz", - "integrity": "sha512-toahsYQORrP/TPSBQ7sxj4/fJg3YUrD0ksCj/Z4y2vT6EwrE9iC2BspKgQRa4CBoCqxYDNB2blc+mQ1UuzPOxg==", + "version": "0.0.399", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-0.0.399.tgz", + "integrity": "sha512-TNjJ/Kli74wdFycayvFW8mSmBc6ssURGxc+kiJkL+DYKloefBvViqz4I9Luwee7jrCdP1sgHwcelMrGbQ9fDHQ==", "cpu": [ "x64" ], @@ -743,9 +743,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-0.0.394.tgz", - "integrity": "sha512-R7XBP3l+oeDuBrP0KD80ZBEMsZoxAW8QO2MNsDUV8eVrNJnp6KtGHoA+iCsKYKNOD6wHA/q5qm/jR+gpsz46Aw==", + "version": "0.0.399", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-0.0.399.tgz", + "integrity": "sha512-VInXjz1gaQcP0PZ18FBT0wdCNJld1huhisxUcegRpYdGgKHfUxdwU1N/2LcoZZZ+iin1NPt3mNsBJiI5W24RCA==", "cpu": [ "arm64" ], @@ -759,9 +759,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-0.0.394.tgz", - "integrity": "sha512-/XYV8srP+pMXbf9Gc3wr58zCzBZvsdA3X4poSvr2uU8yCZ6E4pD0agFaZ1c/CikANJi8nb0Id3kulhEhePz/3A==", + "version": "0.0.399", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-0.0.399.tgz", + "integrity": "sha512-ddIYUm+HPvwhTOcVFIZNoIH8a00Wp6PtE/Zq7slShSMMjzqWLuvY0s9NdNt6ijPqxtNgwuHWPfPVS4OvqfkwSA==", "cpu": [ "x64" ], diff --git a/nodejs/package.json b/nodejs/package.json index 887bac91..9ef9478d 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -40,7 +40,7 @@ "author": "GitHub", "license": "MIT", "dependencies": { - "@github/copilot": "^0.0.394", + "@github/copilot": "^0.0.399", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.5" }, diff --git a/nodejs/test/e2e/mcp-and-agents.test.ts b/nodejs/test/e2e/mcp-and-agents.test.ts index 49047a0d..9553e40e 100644 --- a/nodejs/test/e2e/mcp-and-agents.test.ts +++ b/nodejs/test/e2e/mcp-and-agents.test.ts @@ -217,6 +217,59 @@ describe("MCP Servers and Custom Agents", async () => { expect(session.sessionId).toBeDefined(); await session.destroy(); }); + + it("should surface custom agents to the assistant for listing", async () => { + const customAgents: CustomAgentConfig[] = [ + { + name: "sdk-test-agent", + displayName: "SDK Test Agent", + description: "A custom test agent configured via SDK", + prompt: "You are a helpful test agent.", + infer: true, + }, + ]; + + const session = await client.createSession({ + customAgents, + }); + + expect(session.sessionId).toBeDefined(); + + // Ask the assistant to list custom agents + // The assistant should be able to see and mention the custom agent + const message = await session.sendAndWait({ + prompt: "What custom agents are available? List them with their names and descriptions.", + }); + + // The response should mention the custom agent we defined + expect(message?.data.content).toBeDefined(); + const content = message.data.content; + + // Check that the custom agent is actually surfaced in the response + // We look for the agent name along with its description to ensure + // the agent information is being properly displayed, not just mentioned generically + const contentLowercase = content.toLowerCase(); + const hasAgentName = + contentLowercase.includes("sdk-test-agent") || + contentLowercase.includes("sdk test agent"); + const hasAgentDescription = + contentLowercase.includes("custom test agent") || + contentLowercase.includes("configured via sdk"); + + // At minimum, the agent name should be present + expect(hasAgentName).toBe(true); + + // Ideally, the description should also be present, indicating full surfacing + // Note: This may fail if the model doesn't include full details, but + // the agent name being present confirms basic visibility + if (!hasAgentDescription) { + console.warn( + "Custom agent name found but description not included in response. This may indicate partial surfacing." + ); + } + + await session.destroy(); + }); }); describe("Combined Configuration", () => { diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json index e5624654..1e05947a 100644 --- a/test/harness/package-lock.json +++ b/test/harness/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "devDependencies": { - "@github/copilot": "^0.0.394", + "@github/copilot": "^0.0.399", "@types/node": "^25.0.3", "openai": "^6.15.0", "tsx": "^4.21.0", @@ -461,27 +461,27 @@ } }, "node_modules/@github/copilot": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-0.0.394.tgz", - "integrity": "sha512-koSiaHvVwjgppgh+puxf6dgsR8ql/WST1scS5bjzMsJFfWk7f4xtEXla7TCQfSGoZkCmCsr2Tis27v5TpssiCg==", + "version": "0.0.399", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-0.0.399.tgz", + "integrity": "sha512-ULRmqkH6L6mdokjMTfLaJQDidJXDUy0EYE8lHsIDxXD4dUoGjfsNRswZ4We+JxIJiXuTF9U9KqQM55QRj/4kQA==", "dev": true, "license": "SEE LICENSE IN LICENSE.md", "bin": { "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "0.0.394", - "@github/copilot-darwin-x64": "0.0.394", - "@github/copilot-linux-arm64": "0.0.394", - "@github/copilot-linux-x64": "0.0.394", - "@github/copilot-win32-arm64": "0.0.394", - "@github/copilot-win32-x64": "0.0.394" + "@github/copilot-darwin-arm64": "0.0.399", + "@github/copilot-darwin-x64": "0.0.399", + "@github/copilot-linux-arm64": "0.0.399", + "@github/copilot-linux-x64": "0.0.399", + "@github/copilot-win32-arm64": "0.0.399", + "@github/copilot-win32-x64": "0.0.399" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-0.0.394.tgz", - "integrity": "sha512-qDmDFiFaYFW45UhxylN2JyQRLVGLCpkr5UmgbfH5e0aksf+69qytK/MwpD2Cq12KdTjyGMEorlADkSu5eftELA==", + "version": "0.0.399", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-0.0.399.tgz", + "integrity": "sha512-8TQWPO9PrjR5g/y13nUmKBpk8oCHPpBPgHgp7hozIGedsbNJrcuABeNEsbkxowTwTiKgXEz5A5DGo5iN2AY+Ww==", "cpu": [ "arm64" ], @@ -496,9 +496,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-0.0.394.tgz", - "integrity": "sha512-iN4YwSVFxhASiBjLk46f+AzRTNHCvYcmyTKBASxieMIhnDxznYmpo+haFKPCv2lCsEWU8s5LARCnXxxx8J1wKA==", + "version": "0.0.399", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-0.0.399.tgz", + "integrity": "sha512-Ge1a6zGpjTbVOUQyvT18NbphmyPidPoVERq7DOTTo3XdKDm8n2jFh6UjQl7atL0hnUaWsKOTx9qrgTPdQmqMDA==", "cpu": [ "x64" ], @@ -513,9 +513,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-0.0.394.tgz", - "integrity": "sha512-9NeGvmO2tGztuneXZfYAyW3fDk6Pdl6Ffg8MAUaevA/p0awvA+ti/Vh0ZSTcI81nDTjkzONvrcIcjYAN7x0oSg==", + "version": "0.0.399", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-0.0.399.tgz", + "integrity": "sha512-41TCc1zxSd6qI56xzOyVR91mW8i7SXQ6IrRbsDBAF8i1dbyzIDO2YZ4c23fn8IRJ3C0aCQvfMoFf/BpzHQ6igw==", "cpu": [ "arm64" ], @@ -530,9 +530,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-0.0.394.tgz", - "integrity": "sha512-toahsYQORrP/TPSBQ7sxj4/fJg3YUrD0ksCj/Z4y2vT6EwrE9iC2BspKgQRa4CBoCqxYDNB2blc+mQ1UuzPOxg==", + "version": "0.0.399", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-0.0.399.tgz", + "integrity": "sha512-TNjJ/Kli74wdFycayvFW8mSmBc6ssURGxc+kiJkL+DYKloefBvViqz4I9Luwee7jrCdP1sgHwcelMrGbQ9fDHQ==", "cpu": [ "x64" ], @@ -547,9 +547,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-0.0.394.tgz", - "integrity": "sha512-R7XBP3l+oeDuBrP0KD80ZBEMsZoxAW8QO2MNsDUV8eVrNJnp6KtGHoA+iCsKYKNOD6wHA/q5qm/jR+gpsz46Aw==", + "version": "0.0.399", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-0.0.399.tgz", + "integrity": "sha512-VInXjz1gaQcP0PZ18FBT0wdCNJld1huhisxUcegRpYdGgKHfUxdwU1N/2LcoZZZ+iin1NPt3mNsBJiI5W24RCA==", "cpu": [ "arm64" ], @@ -564,9 +564,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "0.0.394", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-0.0.394.tgz", - "integrity": "sha512-/XYV8srP+pMXbf9Gc3wr58zCzBZvsdA3X4poSvr2uU8yCZ6E4pD0agFaZ1c/CikANJi8nb0Id3kulhEhePz/3A==", + "version": "0.0.399", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-0.0.399.tgz", + "integrity": "sha512-ddIYUm+HPvwhTOcVFIZNoIH8a00Wp6PtE/Zq7slShSMMjzqWLuvY0s9NdNt6ijPqxtNgwuHWPfPVS4OvqfkwSA==", "cpu": [ "x64" ], diff --git a/test/harness/package.json b/test/harness/package.json index 55de10f5..e859b49b 100644 --- a/test/harness/package.json +++ b/test/harness/package.json @@ -11,7 +11,7 @@ "test": "vitest run" }, "devDependencies": { - "@github/copilot": "^0.0.394", + "@github/copilot": "^0.0.399", "@types/node": "^25.0.3", "openai": "^6.15.0", "tsx": "^4.21.0",