From 0e0e7d6bd49f956c8fd8d655ac3124dcab7ebe3b Mon Sep 17 00:00:00 2001 From: Giancarmine Salucci Date: Thu, 10 Sep 2026 01:26:38 +0200 Subject: [PATCH] fix: remove invalid $schema/extensions from plugin manifest; this was why the installed plugin exposed zero agents/skills MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root-caused live: declaring the agent-plugins.org $schema in plugin.json opts Copilot CLI into Open Plugin Spec mode, under which the flat agents/skills fields are silently ignored (0 loaded, no error). Combined with the pre-existing nested extensions.com.github.copilot.* structure (also not a real field), the installed plugin contributed zero agents and zero skills to any consuming project — only this repo's own working copy worked, because Copilot CLI separately auto-loads .github/agents and .github/skills for the current git root regardless of any plugin. Fix: drop $schema entirely, use flat top-level agents/skills/mcpServers fields (matches the documented, non-spec plugin.json schema). Updated validate.mjs to error on $schema/extensions instead of recommending them, and to check the real agents/skills path fields. --- marketplace.json | 1 - plugin.json | 1 - scripts/validate.mjs | 25 +++++++++++++++++++------ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/marketplace.json b/marketplace.json index 8bc7efb..c4a3b30 100644 --- a/marketplace.json +++ b/marketplace.json @@ -1,5 +1,4 @@ { - "$schema": "https://agent-plugins.org/schemas/1.0.0/marketplace.schema.json", "name": "redsen", "owner": { "name": "Redsen", diff --git a/plugin.json b/plugin.json index 6189662..abb4423 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,4 @@ { - "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", "name": "redsen-lean-harness", "description": "Imperative, token-lean, self-documenting agent harness. Spec-driven pipeline with a Ralph implement/verify loop, dynamic parallel worktree lanes, file-based memory, tree-sitter repo index, and zero-server telemetry. Works in GitHub Copilot CLI and VS Code Copilot.", "version": "0.1.0", diff --git a/scripts/validate.mjs b/scripts/validate.mjs index 7948366..a6f4353 100644 --- a/scripts/validate.mjs +++ b/scripts/validate.mjs @@ -110,14 +110,27 @@ function validatePlugin() { if (manifest.version && !/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/.test(manifest.version)) { error(file, `version "${manifest.version}" is not semver`); } - if (!manifest.$schema?.includes('agent-plugins.org')) { - warn(file, 'missing the agent-plugins.org $schema reference'); + // NOTE: do NOT set $schema to the agent-plugins.org Open Plugin Spec URL. + // Verified against a real Copilot CLI 1.0.83 install: declaring $schema + // opts the manifest into Open Plugin Spec mode, which silently drops the + // plugin's agents/skills (0 loaded) instead of reading the flat fields + // below. Component paths must be flat top-level fields, not nested under + // an "extensions" object (that key means something unrelated in the + // non-spec schema and is also silently ignored when present as an object). + if (manifest.$schema) { + error(file, '"$schema" must not be set \u2014 it silently disables agent/skill loading in Copilot CLI'); + } + if (manifest.extensions) { + error(file, '"extensions" is not a valid location for agents/skills \u2014 use top-level "agents"/"skills" fields'); } - const ext = manifest.extensions?.['com.github.copilot'] ?? {}; - for (const [key, target] of Object.entries(ext)) { - const abs = path.resolve(ROOT, target); - if (!fs.existsSync(abs)) error(file, `extensions.com.github.copilot.${key} points at missing path "${target}"`); + for (const key of ['agents', 'skills']) { + const target = manifest[key]; + if (!target) continue; + for (const rel of Array.isArray(target) ? target : [target]) { + const abs = path.resolve(ROOT, rel); + if (!fs.existsSync(abs)) error(file, `${key} points at missing path "${rel}"`); + } } return manifest; }