diff --git a/plugins/plugin-ops/skills/verify-plugin/scripts/validate-marketplace.test.mjs b/plugins/plugin-ops/skills/verify-plugin/scripts/validate-marketplace.test.mjs index dd3caa2..32f02cc 100644 --- a/plugins/plugin-ops/skills/verify-plugin/scripts/validate-marketplace.test.mjs +++ b/plugins/plugin-ops/skills/verify-plugin/scripts/validate-marketplace.test.mjs @@ -31,7 +31,6 @@ async function writeJson(file, value) { await writeFile(file, `${JSON.stringify(value, null, 2)}\n`); } -// --- Fixture primitives ----------------------------------------------------- // Each helper owns exactly one layer of the package (catalog entry, plugin // manifest, skill folder) and every helper starts from a valid default, so a // test mutates one field and can attribute every emitted code to that mutation. @@ -124,8 +123,6 @@ async function completePlugin(t, { directory = "sample-plugin", manifest, skill return pluginRoot; } -// --- Happy paths ------------------------------------------------------------ - test("accepts a complete local marketplace", async (t) => { const result = await validateTarget(await completeMarketplace(t)); assert.deepEqual(result.errors, []); @@ -151,8 +148,6 @@ test("plugin root target checks the manifest name against the folder name", asyn assert.deepEqual(errorCodes(result), new Set(["plugin-name-mismatch"])); }); -// --- Target detection ------------------------------------------------------- - test("rejects a directory that is neither a marketplace nor a plugin", async (t) => { const result = await validateTarget(await tempRoot(t)); assert.deepEqual(errorCodes(result), new Set(["unknown-target"])); @@ -166,8 +161,6 @@ test("treats a non-directory path component as an absent entry point", async (t) assert.deepEqual(errorCodes(result), new Set(["unknown-target"])); }); -// --- Catalog-level checks --------------------------------------------------- - test("rejects an unparsable marketplace file", async (t) => { const root = await tempRoot(t); await mkdir(path.join(root, ".agents", "plugins"), { recursive: true }); @@ -252,8 +245,6 @@ test("reports a local source whose manifest directory is a file", async (t) => { assert.deepEqual(errorCodes(result), new Set(["missing-plugin-manifest"])); }); -// --- Remote sources --------------------------------------------------------- - test("accepts complete remote sources but warns that they are not expanded", async (t) => { const root = await tempRoot(t); await writeMarketplace(root, { @@ -300,8 +291,6 @@ test("rejects an entry with no source at all", async (t) => { assert.deepEqual(errorCodes(result), new Set(["unsupported-marketplace-source"])); }); -// --- Plugin manifest checks ------------------------------------------------- - test("requires a plugin name", async (t) => { const result = await validateTarget(await completeMarketplace(t, { manifest: { name: "" } })); assert.deepEqual(errorCodes(result), new Set(["missing-plugin-name", "plugin-name-mismatch"])); @@ -346,8 +335,6 @@ for (const field of ["displayName", "shortDescription", "longDescription", "deve }); } -// --- Declared component paths (apps, mcpServers, skills) -------------------- - test("accepts a declared apps file that exists", async (t) => { const root = await completeMarketplace(t, { manifest: { apps: "./.app.json" } }); await writeJson(path.join(root, "plugins", "sample-plugin", ".app.json"), { servers: {} }); @@ -420,8 +407,6 @@ test("reports an uninspectable skills path rather than crashing", async (t) => { assert.deepEqual(errorCodes(result), new Set(["unreadable-path"])); }); -// --- Skill checks ----------------------------------------------------------- - test("rejects missing skill frontmatter", async (t) => { const result = await validateTarget(await completeMarketplace(t, { skill: { frontmatter: false } })); assert.deepEqual(errorCodes(result), new Set(["missing-skill-frontmatter"])); @@ -487,8 +472,6 @@ test("rejects the same skill name declared twice inside one plugin", async (t) = assert.deepEqual(errorCodes(result), new Set(["duplicate-skill-name", "skill-name-mismatch"])); }); -// --- Manifest layouts and precedence ---------------------------------------- - const AGENT_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json"; function agentManifest(overrides = {}) { @@ -709,8 +692,6 @@ test("accepts an inline mcpServers map and a skills list in a Claude manifest", assert.deepEqual(result.errors, []); }); -// --- Catalog layouts -------------------------------------------------------- - test("prefers api_marketplace.json over a Claude catalog", async (t) => { const root = await tempRoot(t); await writeJson(path.join(root, ".agents", "plugins", "api_marketplace.json"), { name: "sample", plugins: [marketplaceEntry()] }); @@ -809,8 +790,6 @@ test("warns that a Claude catalog is shadowed by .agents/plugins/marketplace.jso assert.equal(result.catalog, path.join(root, ".agents", "plugins", "marketplace.json")); }); -// --- Command-line behavior -------------------------------------------------- - test("command line reports PASS and exits zero for a valid target", async (t) => { const root = await completeMarketplace(t); const { stdout } = await run(process.execPath, [VALIDATOR, root]);