From 9f3f64ad9ea3bbb5a9a08643cfe00cd1cfd270f2 Mon Sep 17 00:00:00 2001 From: YC Date: Wed, 11 Nov 2026 09:28:39 +0000 Subject: [PATCH 1/2] fix(plugin): publish the public MCP server config Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- plugin/mcp.json | 9 +++++++++ scripts/plugin-conformance.test.ts | 29 +++++++++++++++++++++++++++++ scripts/plugin-publish.test.ts | 7 +++++-- scripts/plugin-publish.ts | 3 ++- 4 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 plugin/mcp.json diff --git a/plugin/mcp.json b/plugin/mcp.json new file mode 100644 index 0000000..2a2d1b6 --- /dev/null +++ b/plugin/mcp.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json", + "mcpServers": { + "wego": { + "type": "streamable-http", + "url": "https://mcp.wego.com/public-app/v1/mcp" + } + } +} diff --git a/scripts/plugin-conformance.test.ts b/scripts/plugin-conformance.test.ts index 015b200..4e7b720 100644 --- a/scripts/plugin-conformance.test.ts +++ b/scripts/plugin-conformance.test.ts @@ -89,6 +89,35 @@ describe("plugin.json conformance (Agent Plugins §5.2)", () => { }); }); +describe("mcp.json conformance (Agent Plugins)", () => { + const mcp = JSON.parse( + readFileSync(join(cliRoot, "plugin/mcp.json"), "utf8"), + ); + + it("uses the same schema version as plugin.json", () => { + expect(mcp.$schema).toBe( + (manifest.$schema as string).replace( + "/plugin.schema.json", + "/mcp.schema.json", + ), + ); + }); + + it("has closed field sets and exactly one server named wego", () => { + expect(Object.keys(mcp).sort()).toEqual(["$schema", "mcpServers"]); + expect(Object.keys(mcp.mcpServers)).toEqual(["wego"]); + expect(Object.keys(mcp.mcpServers.wego).sort()).toEqual(["type", "url"]); + }); + + it("uses the public HTTPS endpoint over streamable HTTP without headers", () => { + const server = mcp.mcpServers.wego; + expect(server.type).toBe("streamable-http"); + expect(server.url).toBe("https://mcp.wego.com/public-app/v1/mcp"); + expect(new URL(server.url).protocol).toBe("https:"); + expect(Object.hasOwn(server, "headers")).toBe(false); + }); +}); + /** * SHA-256 of the canonical Apache 2.0 text, over LF line endings. * diff --git a/scripts/plugin-publish.test.ts b/scripts/plugin-publish.test.ts index 9544af5..c442588 100644 --- a/scripts/plugin-publish.test.ts +++ b/scripts/plugin-publish.test.ts @@ -14,7 +14,6 @@ import { afterEach, describe, expect, it } from "bun:test"; import { spawnSync } from "node:child_process"; import { - existsSync, mkdirSync, mkdtempSync, readdirSync, @@ -134,6 +133,9 @@ describe("publish-plugin against a file:// bare repo", () => { expect(remote.read("plugin.json")).toBe( readFileSync(join(cliRoot, "plugin/plugin.json"), "utf8"), ); + expect(remote.read("mcp.json")).toBe( + readFileSync(join(cliRoot, "plugin/mcp.json"), "utf8"), + ); expect(remote.read("skills/wego/SKILL.md")).toBe( readFileSync(join(cliRoot, "skills/wego/SKILL.md"), "utf8"), ); @@ -371,9 +373,10 @@ describe("unexpectedPluginFiles", () => { }); describe("pluginPublishPlan", () => { - it("publishes the manifest, the readme, the licence, and one SKILL.md per skill", () => { + it("publishes the manifest, MCP config, readme, licence, and one SKILL.md per skill", () => { expect(PLAN).toEqual([ { from: "plugin/plugin.json", to: "plugin.json" }, + { from: "plugin/mcp.json", to: "mcp.json" }, { from: "plugin/README.md", to: "README.md" }, { from: "plugin/LICENSE", to: "LICENSE" }, { from: "skills/wego/SKILL.md", to: "skills/wego/SKILL.md" }, diff --git a/scripts/plugin-publish.ts b/scripts/plugin-publish.ts index 63aebdd..8ccd657 100644 --- a/scripts/plugin-publish.ts +++ b/scripts/plugin-publish.ts @@ -48,7 +48,7 @@ export interface PluginPublishPair { * The published set is a DATA structure rather than a sequence of copy calls, so * the three things that need it can share one answer: the publisher copies it, * `--print-plan` prints it, and the after-clone predicate uses its destinations - * as the expected set. Adding `mcp.json` later is one entry here; relocating the + * as the expected set. Adding a published file is one entry here; relocating the * sources is {@link PLUGIN_SOURCE_DIR}. Neither touches publisher logic. * * The skill body is included because the plugin repo is where third-party @@ -68,6 +68,7 @@ export function pluginPublishPlan( ): PluginPublishPair[] { return [ { from: `${PLUGIN_SOURCE_DIR}/plugin.json`, to: "plugin.json" }, + { from: `${PLUGIN_SOURCE_DIR}/mcp.json`, to: "mcp.json" }, { from: `${PLUGIN_SOURCE_DIR}/README.md`, to: "README.md" }, { from: `${PLUGIN_SOURCE_DIR}/LICENSE`, to: "LICENSE" }, ...skillIds.map((id) => ({ From 2dd04dd792a2a885d0757db9be4cd6f16a9e430d Mon Sep 17 00:00:00 2001 From: YC Date: Thu, 12 Nov 2026 08:12:05 +0000 Subject: [PATCH 2/2] test(plugin): tighten MCP conformance checks - PET-428 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- scripts/plugin-conformance.test.ts | 7 ++++--- scripts/plugin-publish.test.ts | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/plugin-conformance.test.ts b/scripts/plugin-conformance.test.ts index 4e7b720..6716b2a 100644 --- a/scripts/plugin-conformance.test.ts +++ b/scripts/plugin-conformance.test.ts @@ -92,7 +92,10 @@ describe("plugin.json conformance (Agent Plugins §5.2)", () => { describe("mcp.json conformance (Agent Plugins)", () => { const mcp = JSON.parse( readFileSync(join(cliRoot, "plugin/mcp.json"), "utf8"), - ); + ) as { + $schema: unknown; + mcpServers: Record>; + }; it("uses the same schema version as plugin.json", () => { expect(mcp.$schema).toBe( @@ -113,8 +116,6 @@ describe("mcp.json conformance (Agent Plugins)", () => { const server = mcp.mcpServers.wego; expect(server.type).toBe("streamable-http"); expect(server.url).toBe("https://mcp.wego.com/public-app/v1/mcp"); - expect(new URL(server.url).protocol).toBe("https:"); - expect(Object.hasOwn(server, "headers")).toBe(false); }); }); diff --git a/scripts/plugin-publish.test.ts b/scripts/plugin-publish.test.ts index c442588..11383a0 100644 --- a/scripts/plugin-publish.test.ts +++ b/scripts/plugin-publish.test.ts @@ -14,6 +14,7 @@ import { afterEach, describe, expect, it } from "bun:test"; import { spawnSync } from "node:child_process"; import { + existsSync, mkdirSync, mkdtempSync, readdirSync,