fix: remove invalid $schema/extensions from plugin manifest; this was why the installed plugin exposed zero agents/skills
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.
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://agent-plugins.org/schemas/1.0.0/marketplace.schema.json",
|
|
||||||
"name": "redsen",
|
"name": "redsen",
|
||||||
"owner": {
|
"owner": {
|
||||||
"name": "Redsen",
|
"name": "Redsen",
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
||||||
"name": "redsen-lean-harness",
|
"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.",
|
"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",
|
"version": "0.1.0",
|
||||||
|
|||||||
+19
-6
@@ -110,14 +110,27 @@ function validatePlugin() {
|
|||||||
if (manifest.version && !/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/.test(manifest.version)) {
|
if (manifest.version && !/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/.test(manifest.version)) {
|
||||||
error(file, `version "${manifest.version}" is not semver`);
|
error(file, `version "${manifest.version}" is not semver`);
|
||||||
}
|
}
|
||||||
if (!manifest.$schema?.includes('agent-plugins.org')) {
|
// NOTE: do NOT set $schema to the agent-plugins.org Open Plugin Spec URL.
|
||||||
warn(file, 'missing the agent-plugins.org $schema reference');
|
// 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 of ['agents', 'skills']) {
|
||||||
for (const [key, target] of Object.entries(ext)) {
|
const target = manifest[key];
|
||||||
const abs = path.resolve(ROOT, target);
|
if (!target) continue;
|
||||||
if (!fs.existsSync(abs)) error(file, `extensions.com.github.copilot.${key} points at missing path "${target}"`);
|
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;
|
return manifest;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user