Merge pull request #1490 from gaurav0107/fix/1459-remove-agents-manifest-field

fix: remove unsupported `agents` field from plugin.json
This commit is contained in:
Affaan Mustafa
2026-04-21 18:14:12 -04:00
committed by GitHub
5 changed files with 24 additions and 121 deletions

View File

@@ -212,37 +212,11 @@ test('claude plugin.json uses published plugin name', () => {
assert.strictEqual(claudePlugin.name, 'everything-claude-code');
});
test('claude plugin.json agents is an array', () => {
assert.ok(Array.isArray(claudePlugin.agents), 'Expected agents to be an array (not a string/directory)');
});
test('claude plugin.json agents uses explicit file paths (not directories)', () => {
for (const agentPath of claudePlugin.agents) {
assertSafeRepoRelativePath(agentPath, 'Agent path');
assert.ok(
agentPath.endsWith('.md'),
`Expected explicit .md file path, got: ${agentPath}`,
);
assert.ok(
!agentPath.endsWith('/'),
`Expected explicit file path, not directory, got: ${agentPath}`,
);
}
});
test('claude plugin.json all agent files exist', () => {
for (const agentRelPath of claudePlugin.agents) {
assertSafeRepoRelativePath(agentRelPath, 'Agent path');
const absolute = path.resolve(repoRoot, agentRelPath);
assert.ok(
absolute === repoRoot || absolute.startsWith(repoRootWithSep),
`Agent path resolves outside repo root: ${agentRelPath}`,
);
assert.ok(
fs.existsSync(absolute),
`Agent file missing: ${agentRelPath}`,
);
}
test('claude plugin.json does NOT have agents field (unsupported by Claude Code validator)', () => {
assert.ok(
!('agents' in claudePlugin),
'agents field must NOT be declared — Claude Code plugin validator rejects it',
);
});
test('claude plugin.json skills is an array', () => {