skiller 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -30
- package/dist/agents/AbstractAgent.js +7 -0
- package/dist/agents/AmpAgent.js +3 -36
- package/dist/agents/AugmentCodeAgent.js +9 -2
- package/dist/agents/ClaudeAgent.js +6 -2
- package/dist/agents/ClineAgent.js +8 -1
- package/dist/agents/CodexCliAgent.js +3 -2
- package/dist/agents/CopilotAgent.js +4 -37
- package/dist/agents/CrushAgent.js +8 -1
- package/dist/agents/CursorAgent.js +4 -3
- package/dist/agents/FirebenderAgent.js +8 -1
- package/dist/agents/GeminiCliAgent.js +3 -2
- package/dist/agents/GooseAgent.js +3 -2
- package/dist/agents/JunieAgent.js +8 -1
- package/dist/agents/KiloCodeAgent.js +4 -3
- package/dist/agents/KiroAgent.js +9 -2
- package/dist/agents/OpenCodeAgent.js +3 -2
- package/dist/agents/OpenHandsAgent.js +8 -1
- package/dist/agents/QwenCodeAgent.js +9 -2
- package/dist/agents/RooCodeAgent.js +3 -2
- package/dist/agents/TraeAgent.js +8 -1
- package/dist/agents/WarpAgent.js +8 -1
- package/dist/agents/WindsurfAgent.js +8 -1
- package/dist/agents/catalog.js +81 -0
- package/dist/agents/index.js +25 -46
- package/dist/cli/handlers.js +6 -6
- package/dist/core/ClaudePluginSync.js +14 -4
- package/dist/core/agent-selection.js +8 -17
- package/dist/core/apply-engine.js +1 -0
- package/dist/core/config-utils.js +12 -12
- package/dist/generated/skills-agent-catalog.js +268 -0
- package/package.json +78 -76
|
@@ -38,6 +38,7 @@ const path = __importStar(require("path"));
|
|
|
38
38
|
const fs_1 = require("fs");
|
|
39
39
|
const AgentsMdAgent_1 = require("./AgentsMdAgent");
|
|
40
40
|
const FileSystemUtils_1 = require("../core/FileSystemUtils");
|
|
41
|
+
const catalog_1 = require("./catalog");
|
|
41
42
|
/**
|
|
42
43
|
* Agent for RooCode that writes to AGENTS.md and generates .roo/mcp.json
|
|
43
44
|
* with project-level MCP server configuration.
|
|
@@ -50,7 +51,7 @@ class RooCodeAgent {
|
|
|
50
51
|
return 'roo';
|
|
51
52
|
}
|
|
52
53
|
getName() {
|
|
53
|
-
return '
|
|
54
|
+
return (0, catalog_1.getAgentDisplayName)('roo');
|
|
54
55
|
}
|
|
55
56
|
getDefaultOutputPath(projectRoot) {
|
|
56
57
|
return {
|
|
@@ -139,7 +140,7 @@ class RooCodeAgent {
|
|
|
139
140
|
return true;
|
|
140
141
|
}
|
|
141
142
|
getSkillsPath(projectRoot) {
|
|
142
|
-
return
|
|
143
|
+
return (0, catalog_1.getAgentSkillsPath)('roo', projectRoot);
|
|
143
144
|
}
|
|
144
145
|
}
|
|
145
146
|
exports.RooCodeAgent = RooCodeAgent;
|
package/dist/agents/TraeAgent.js
CHANGED
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.TraeAgent = void 0;
|
|
37
37
|
const path = __importStar(require("path"));
|
|
38
38
|
const AbstractAgent_1 = require("./AbstractAgent");
|
|
39
|
+
const catalog_1 = require("./catalog");
|
|
39
40
|
/**
|
|
40
41
|
* Trae AI agent adapter.
|
|
41
42
|
* Generates project_rules.md configuration file.
|
|
@@ -45,10 +46,16 @@ class TraeAgent extends AbstractAgent_1.AbstractAgent {
|
|
|
45
46
|
return 'trae';
|
|
46
47
|
}
|
|
47
48
|
getName() {
|
|
48
|
-
return
|
|
49
|
+
return (0, catalog_1.getAgentDisplayName)('trae');
|
|
49
50
|
}
|
|
50
51
|
getDefaultOutputPath(projectRoot) {
|
|
51
52
|
return path.join(projectRoot, '.trae', 'rules', 'project_rules.md');
|
|
52
53
|
}
|
|
54
|
+
supportsNativeSkills() {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
getSkillsPath(projectRoot) {
|
|
58
|
+
return (0, catalog_1.getAgentSkillsPath)('trae', projectRoot);
|
|
59
|
+
}
|
|
53
60
|
}
|
|
54
61
|
exports.TraeAgent = TraeAgent;
|
package/dist/agents/WarpAgent.js
CHANGED
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.WarpAgent = void 0;
|
|
37
37
|
const path = __importStar(require("path"));
|
|
38
38
|
const AbstractAgent_1 = require("./AbstractAgent");
|
|
39
|
+
const catalog_1 = require("./catalog");
|
|
39
40
|
/**
|
|
40
41
|
* Warp Agent Mode adapter.
|
|
41
42
|
* Generates WARP.md configuration file in the project root.
|
|
@@ -45,7 +46,7 @@ class WarpAgent extends AbstractAgent_1.AbstractAgent {
|
|
|
45
46
|
return 'warp';
|
|
46
47
|
}
|
|
47
48
|
getName() {
|
|
48
|
-
return '
|
|
49
|
+
return (0, catalog_1.getAgentDisplayName)('warp');
|
|
49
50
|
}
|
|
50
51
|
getDefaultOutputPath(projectRoot) {
|
|
51
52
|
return path.join(projectRoot, 'WARP.md');
|
|
@@ -57,5 +58,11 @@ class WarpAgent extends AbstractAgent_1.AbstractAgent {
|
|
|
57
58
|
supportsMcpRemote() {
|
|
58
59
|
return false;
|
|
59
60
|
}
|
|
61
|
+
supportsNativeSkills() {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
getSkillsPath(projectRoot) {
|
|
65
|
+
return (0, catalog_1.getAgentSkillsPath)('warp', projectRoot);
|
|
66
|
+
}
|
|
60
67
|
}
|
|
61
68
|
exports.WarpAgent = WarpAgent;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WindsurfAgent = void 0;
|
|
4
4
|
const AgentsMdAgent_1 = require("./AgentsMdAgent");
|
|
5
|
+
const catalog_1 = require("./catalog");
|
|
5
6
|
/**
|
|
6
7
|
* Windsurf agent adapter.
|
|
7
8
|
* Now uses AGENTS.md format like other agents.
|
|
@@ -11,7 +12,7 @@ class WindsurfAgent extends AgentsMdAgent_1.AgentsMdAgent {
|
|
|
11
12
|
return 'windsurf';
|
|
12
13
|
}
|
|
13
14
|
getName() {
|
|
14
|
-
return '
|
|
15
|
+
return (0, catalog_1.getAgentDisplayName)('windsurf');
|
|
15
16
|
}
|
|
16
17
|
// Windsurf supports MCP configuration
|
|
17
18
|
getMcpServerKey() {
|
|
@@ -23,5 +24,11 @@ class WindsurfAgent extends AgentsMdAgent_1.AgentsMdAgent {
|
|
|
23
24
|
supportsMcpRemote() {
|
|
24
25
|
return true;
|
|
25
26
|
}
|
|
27
|
+
supportsNativeSkills() {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
getSkillsPath(projectRoot) {
|
|
31
|
+
return (0, catalog_1.getAgentSkillsPath)('windsurf', projectRoot);
|
|
32
|
+
}
|
|
26
33
|
}
|
|
27
34
|
exports.WindsurfAgent = WindsurfAgent;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.PUBLIC_AGENT_IDENTIFIERS = void 0;
|
|
37
|
+
exports.getSkillsCatalogEntry = getSkillsCatalogEntry;
|
|
38
|
+
exports.getAgentDisplayName = getAgentDisplayName;
|
|
39
|
+
exports.getAgentSkillsPath = getAgentSkillsPath;
|
|
40
|
+
exports.getAgentIdentifiersForCliHelp = getAgentIdentifiersForCliHelp;
|
|
41
|
+
const path = __importStar(require("path"));
|
|
42
|
+
const constants_1 = require("../constants");
|
|
43
|
+
const skills_agent_catalog_1 = require("../generated/skills-agent-catalog");
|
|
44
|
+
exports.PUBLIC_AGENT_IDENTIFIERS = [
|
|
45
|
+
'amp',
|
|
46
|
+
'augment',
|
|
47
|
+
'claude-code',
|
|
48
|
+
'cline',
|
|
49
|
+
'codex',
|
|
50
|
+
'crush',
|
|
51
|
+
'cursor',
|
|
52
|
+
'gemini-cli',
|
|
53
|
+
'github-copilot',
|
|
54
|
+
'goose',
|
|
55
|
+
'junie',
|
|
56
|
+
'kilo',
|
|
57
|
+
'kiro-cli',
|
|
58
|
+
'opencode',
|
|
59
|
+
'openhands',
|
|
60
|
+
'qwen-code',
|
|
61
|
+
'roo',
|
|
62
|
+
'trae',
|
|
63
|
+
'warp',
|
|
64
|
+
'windsurf',
|
|
65
|
+
];
|
|
66
|
+
function getSkillsCatalogEntry(agentId) {
|
|
67
|
+
const entry = skills_agent_catalog_1.SKILLS_AGENT_CATALOG[agentId];
|
|
68
|
+
if (!entry) {
|
|
69
|
+
throw (0, constants_1.createSkillerError)(`Unknown canonical skills agent: ${agentId}`, `Known agents: ${Object.keys(skills_agent_catalog_1.SKILLS_AGENT_CATALOG).join(', ')}`);
|
|
70
|
+
}
|
|
71
|
+
return entry;
|
|
72
|
+
}
|
|
73
|
+
function getAgentDisplayName(agentId) {
|
|
74
|
+
return getSkillsCatalogEntry(agentId).displayName;
|
|
75
|
+
}
|
|
76
|
+
function getAgentSkillsPath(agentId, projectRoot) {
|
|
77
|
+
return path.join(projectRoot, getSkillsCatalogEntry(agentId).skillsDir);
|
|
78
|
+
}
|
|
79
|
+
function getAgentIdentifiersForCliHelp() {
|
|
80
|
+
return [...exports.PUBLIC_AGENT_IDENTIFIERS].join(', ');
|
|
81
|
+
}
|
package/dist/agents/index.js
CHANGED
|
@@ -10,11 +10,8 @@ const CodexCliAgent_1 = require("./CodexCliAgent");
|
|
|
10
10
|
const CursorAgent_1 = require("./CursorAgent");
|
|
11
11
|
const WindsurfAgent_1 = require("./WindsurfAgent");
|
|
12
12
|
const ClineAgent_1 = require("./ClineAgent");
|
|
13
|
-
const AiderAgent_1 = require("./AiderAgent");
|
|
14
|
-
const FirebaseAgent_1 = require("./FirebaseAgent");
|
|
15
13
|
const OpenHandsAgent_1 = require("./OpenHandsAgent");
|
|
16
14
|
const GeminiCliAgent_1 = require("./GeminiCliAgent");
|
|
17
|
-
const JulesAgent_1 = require("./JulesAgent");
|
|
18
15
|
const JunieAgent_1 = require("./JunieAgent");
|
|
19
16
|
const AugmentCodeAgent_1 = require("./AugmentCodeAgent");
|
|
20
17
|
const KiloCodeAgent_1 = require("./KiloCodeAgent");
|
|
@@ -22,56 +19,38 @@ const OpenCodeAgent_1 = require("./OpenCodeAgent");
|
|
|
22
19
|
const CrushAgent_1 = require("./CrushAgent");
|
|
23
20
|
const GooseAgent_1 = require("./GooseAgent");
|
|
24
21
|
const AmpAgent_1 = require("./AmpAgent");
|
|
25
|
-
const ZedAgent_1 = require("./ZedAgent");
|
|
26
|
-
const AgentsMdAgent_1 = require("./AgentsMdAgent");
|
|
27
22
|
const QwenCodeAgent_1 = require("./QwenCodeAgent");
|
|
28
23
|
const KiroAgent_1 = require("./KiroAgent");
|
|
29
24
|
const WarpAgent_1 = require("./WarpAgent");
|
|
30
25
|
const RooCodeAgent_1 = require("./RooCodeAgent");
|
|
31
26
|
const TraeAgent_1 = require("./TraeAgent");
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
new
|
|
36
|
-
new ClaudeAgent_1.ClaudeAgent(),
|
|
37
|
-
new
|
|
38
|
-
new
|
|
39
|
-
new
|
|
40
|
-
new
|
|
41
|
-
new
|
|
42
|
-
new
|
|
43
|
-
new
|
|
44
|
-
new
|
|
45
|
-
new
|
|
46
|
-
new
|
|
47
|
-
new
|
|
48
|
-
new
|
|
49
|
-
new
|
|
50
|
-
new
|
|
51
|
-
new
|
|
52
|
-
new
|
|
53
|
-
new
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
new KiroAgent_1.KiroAgent(),
|
|
57
|
-
new WarpAgent_1.WarpAgent(),
|
|
58
|
-
new RooCodeAgent_1.RooCodeAgent(),
|
|
59
|
-
new TraeAgent_1.TraeAgent(),
|
|
60
|
-
new AmazonQCliAgent_1.AmazonQCliAgent(),
|
|
61
|
-
new FirebenderAgent_1.FirebenderAgent(),
|
|
62
|
-
];
|
|
27
|
+
const catalog_1 = require("./catalog");
|
|
28
|
+
const publicAgentFactories = {
|
|
29
|
+
amp: () => new AmpAgent_1.AmpAgent(),
|
|
30
|
+
augment: () => new AugmentCodeAgent_1.AugmentCodeAgent(),
|
|
31
|
+
'claude-code': () => new ClaudeAgent_1.ClaudeAgent(),
|
|
32
|
+
cline: () => new ClineAgent_1.ClineAgent(),
|
|
33
|
+
codex: () => new CodexCliAgent_1.CodexCliAgent(),
|
|
34
|
+
crush: () => new CrushAgent_1.CrushAgent(),
|
|
35
|
+
cursor: () => new CursorAgent_1.CursorAgent(),
|
|
36
|
+
'gemini-cli': () => new GeminiCliAgent_1.GeminiCliAgent(),
|
|
37
|
+
'github-copilot': () => new CopilotAgent_1.CopilotAgent(),
|
|
38
|
+
goose: () => new GooseAgent_1.GooseAgent(),
|
|
39
|
+
junie: () => new JunieAgent_1.JunieAgent(),
|
|
40
|
+
kilo: () => new KiloCodeAgent_1.KiloCodeAgent(),
|
|
41
|
+
'kiro-cli': () => new KiroAgent_1.KiroAgent(),
|
|
42
|
+
opencode: () => new OpenCodeAgent_1.OpenCodeAgent(),
|
|
43
|
+
openhands: () => new OpenHandsAgent_1.OpenHandsAgent(),
|
|
44
|
+
'qwen-code': () => new QwenCodeAgent_1.QwenCodeAgent(),
|
|
45
|
+
roo: () => new RooCodeAgent_1.RooCodeAgent(),
|
|
46
|
+
trae: () => new TraeAgent_1.TraeAgent(),
|
|
47
|
+
warp: () => new WarpAgent_1.WarpAgent(),
|
|
48
|
+
windsurf: () => new WindsurfAgent_1.WindsurfAgent(),
|
|
49
|
+
};
|
|
50
|
+
exports.allAgents = catalog_1.PUBLIC_AGENT_IDENTIFIERS.map((agentId) => publicAgentFactories[agentId]());
|
|
63
51
|
/**
|
|
64
52
|
* Generates a comma-separated list of agent identifiers for CLI help text.
|
|
65
|
-
* Returns identifiers in alphabetical order, with 'agentsmd' always first.
|
|
66
53
|
*/
|
|
67
54
|
function getAgentIdentifiersForCliHelp() {
|
|
68
|
-
|
|
69
|
-
const sorted = identifiers.sort();
|
|
70
|
-
// Ensure agentsmd is first (it should already be first alphabetically, but let's be explicit)
|
|
71
|
-
const agentsMdIndex = sorted.indexOf('agentsmd');
|
|
72
|
-
if (agentsMdIndex > 0) {
|
|
73
|
-
const agentsmd = sorted.splice(agentsMdIndex, 1)[0];
|
|
74
|
-
sorted.unshift(agentsmd);
|
|
75
|
-
}
|
|
76
|
-
return sorted.join(', ');
|
|
55
|
+
return (0, catalog_1.getAgentIdentifiersForCliHelp)();
|
|
77
56
|
}
|
package/dist/cli/handlers.js
CHANGED
|
@@ -43,6 +43,7 @@ const os = __importStar(require("os"));
|
|
|
43
43
|
const fs = __importStar(require("fs/promises"));
|
|
44
44
|
const constants_1 = require("../constants");
|
|
45
45
|
const ConfigLoader_1 = require("../core/ConfigLoader");
|
|
46
|
+
const agents_1 = require("../agents");
|
|
46
47
|
/**
|
|
47
48
|
* Handler for the 'apply' command.
|
|
48
49
|
*/
|
|
@@ -143,7 +144,7 @@ async function initHandler(argv) {
|
|
|
143
144
|
|
|
144
145
|
# To specify which agents are active by default when --agents is not used,
|
|
145
146
|
# uncomment and populate the following line. If omitted, all agents are active.
|
|
146
|
-
# default_agents = ["copilot", "claude"]
|
|
147
|
+
# default_agents = ["github-copilot", "claude-code"]
|
|
147
148
|
|
|
148
149
|
# Enable nested rule loading from nested .claude directories
|
|
149
150
|
# When enabled, skiller will search for and process .claude directories throughout the project hierarchy
|
|
@@ -151,16 +152,15 @@ async function initHandler(argv) {
|
|
|
151
152
|
|
|
152
153
|
# --- Agent Specific Configurations ---
|
|
153
154
|
# You can enable/disable agents and override their default output paths here.
|
|
154
|
-
# Use
|
|
155
|
+
# Use canonical agent identifiers only: ${(0, agents_1.getAgentIdentifiersForCliHelp)()}
|
|
155
156
|
|
|
156
|
-
# [agents.copilot]
|
|
157
|
+
# [agents.github-copilot]
|
|
157
158
|
# enabled = true
|
|
158
159
|
# output_path = ".github/copilot-instructions.md"
|
|
159
160
|
|
|
160
|
-
# [agents.
|
|
161
|
+
# [agents.claude-code]
|
|
161
162
|
# enabled = true
|
|
162
|
-
#
|
|
163
|
-
# output_path_config = ".aider.conf.yml"
|
|
163
|
+
# output_path = "CLAUDE.md"
|
|
164
164
|
|
|
165
165
|
# [agents.gemini-cli]
|
|
166
166
|
# enabled = true
|
|
@@ -809,6 +809,11 @@ async function syncClaudePluginsToSkillsDirs(args) {
|
|
|
809
809
|
!taken.has(item.baseName)) {
|
|
810
810
|
continue;
|
|
811
811
|
}
|
|
812
|
+
if (reserved.has(item.baseName) &&
|
|
813
|
+
(prev === currentNamespacedBase ||
|
|
814
|
+
prev.startsWith(`${currentNamespacedBase}-`))) {
|
|
815
|
+
continue;
|
|
816
|
+
}
|
|
812
817
|
if (taken.has(prev))
|
|
813
818
|
continue;
|
|
814
819
|
assignedDestByItemKey.set(item.itemKey, prev);
|
|
@@ -824,6 +829,9 @@ async function syncClaudePluginsToSkillsDirs(args) {
|
|
|
824
829
|
taken.add(base);
|
|
825
830
|
continue;
|
|
826
831
|
}
|
|
832
|
+
if (reserved.has(base)) {
|
|
833
|
+
continue;
|
|
834
|
+
}
|
|
827
835
|
const namespacedBase = `${pluginNamespacePrefixByPluginId.get(item.pluginId) ?? sanitizeId(item.pluginId)}-${base}`;
|
|
828
836
|
let candidate = namespacedBase;
|
|
829
837
|
let i = 2;
|
|
@@ -833,10 +841,12 @@ async function syncClaudePluginsToSkillsDirs(args) {
|
|
|
833
841
|
assignedDestByItemKey.set(item.itemKey, candidate);
|
|
834
842
|
taken.add(candidate);
|
|
835
843
|
}
|
|
836
|
-
const assignedItems = sortedItems.
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
844
|
+
const assignedItems = sortedItems.flatMap((item) => {
|
|
845
|
+
const destRelPath = assignedDestByItemKey.get(item.itemKey);
|
|
846
|
+
if (!destRelPath)
|
|
847
|
+
return [];
|
|
848
|
+
return [{ ...item, destRelPath }];
|
|
849
|
+
});
|
|
840
850
|
// Install/update expected items
|
|
841
851
|
if (assignedItems.length > 0) {
|
|
842
852
|
await ensureDir(targetSkillsDir, dryRun);
|
|
@@ -13,28 +13,19 @@ const constants_1 = require("../constants");
|
|
|
13
13
|
function resolveSelectedAgents(config, allAgents) {
|
|
14
14
|
// CLI --agents > config.default_agents > per-agent.enabled flags > default all
|
|
15
15
|
let selected = allAgents;
|
|
16
|
+
const validAgentIdentifiers = new Set(allAgents.map((agent) => agent.getIdentifier()));
|
|
17
|
+
const validAgentsText = [...validAgentIdentifiers].join(', ');
|
|
16
18
|
if (config.cliAgents && config.cliAgents.length > 0) {
|
|
17
|
-
const
|
|
18
|
-
// Check if any of the specified agents don't exist
|
|
19
|
-
const validAgentIdentifiers = new Set(allAgents.map((agent) => agent.getIdentifier()));
|
|
20
|
-
const validAgentNames = new Set(allAgents.map((agent) => agent.getName().toLowerCase()));
|
|
21
|
-
const invalidAgents = filters.filter((filter) => !validAgentIdentifiers.has(filter) &&
|
|
22
|
-
![...validAgentNames].some((name) => name.includes(filter)));
|
|
19
|
+
const invalidAgents = config.cliAgents.filter((agentId) => !validAgentIdentifiers.has(agentId));
|
|
23
20
|
if (invalidAgents.length > 0) {
|
|
24
|
-
throw (0, constants_1.createSkillerError)(`Invalid agent specified: ${invalidAgents.join(', ')}`, `Valid agents are: ${
|
|
21
|
+
throw (0, constants_1.createSkillerError)(`Invalid agent specified: ${invalidAgents.join(', ')}`, `Valid agents are: ${validAgentsText}`);
|
|
25
22
|
}
|
|
26
|
-
selected = allAgents.filter((agent) =>
|
|
27
|
-
agent.getName().toLowerCase().includes(f)));
|
|
23
|
+
selected = allAgents.filter((agent) => config.cliAgents?.includes(agent.getIdentifier()));
|
|
28
24
|
}
|
|
29
25
|
else if (config.defaultAgents && config.defaultAgents.length > 0) {
|
|
30
|
-
const
|
|
31
|
-
// Check if any of the default agents don't exist
|
|
32
|
-
const validAgentIdentifiers = new Set(allAgents.map((agent) => agent.getIdentifier()));
|
|
33
|
-
const validAgentNames = new Set(allAgents.map((agent) => agent.getName().toLowerCase()));
|
|
34
|
-
const invalidAgents = defaults.filter((filter) => !validAgentIdentifiers.has(filter) &&
|
|
35
|
-
![...validAgentNames].some((name) => name.includes(filter)));
|
|
26
|
+
const invalidAgents = config.defaultAgents.filter((agentId) => !validAgentIdentifiers.has(agentId));
|
|
36
27
|
if (invalidAgents.length > 0) {
|
|
37
|
-
throw (0, constants_1.createSkillerError)(`Invalid agent specified in default_agents: ${invalidAgents.join(', ')}`, `Valid agents are: ${
|
|
28
|
+
throw (0, constants_1.createSkillerError)(`Invalid agent specified in default_agents: ${invalidAgents.join(', ')}`, `Valid agents are: ${validAgentsText}`);
|
|
38
29
|
}
|
|
39
30
|
selected = allAgents.filter((agent) => {
|
|
40
31
|
const identifier = agent.getIdentifier();
|
|
@@ -42,7 +33,7 @@ function resolveSelectedAgents(config, allAgents) {
|
|
|
42
33
|
if (override !== undefined) {
|
|
43
34
|
return override;
|
|
44
35
|
}
|
|
45
|
-
return
|
|
36
|
+
return config.defaultAgents?.includes(identifier) ?? false;
|
|
46
37
|
});
|
|
47
38
|
}
|
|
48
39
|
else {
|
|
@@ -152,6 +152,7 @@ function cloneLoadedConfig(config) {
|
|
|
152
152
|
cliAgents: config.cliAgents ? [...config.cliAgents] : undefined,
|
|
153
153
|
mcp: config.mcp ? { ...config.mcp } : undefined,
|
|
154
154
|
gitignore: config.gitignore ? { ...config.gitignore } : undefined,
|
|
155
|
+
skills: config.skills ? { ...config.skills } : undefined,
|
|
155
156
|
nested: config.nested,
|
|
156
157
|
nestedDefined: config.nestedDefined,
|
|
157
158
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.mapRawAgentConfigs = mapRawAgentConfigs;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
4
5
|
/**
|
|
5
6
|
* Maps raw agent configuration keys to their corresponding agent identifiers.
|
|
6
7
|
*
|
|
7
|
-
* This function
|
|
8
|
-
*
|
|
9
|
-
* identifiers and substring matching (case-insensitive) with agent display names
|
|
10
|
-
* for backwards compatibility.
|
|
8
|
+
* This function validates that raw configuration keys are already exact canonical
|
|
9
|
+
* agent identifiers. Any unknown or legacy keys fail hard.
|
|
11
10
|
*
|
|
12
11
|
* @param raw Raw agent configurations with user-provided keys
|
|
13
12
|
* @param agents Array of all available agents
|
|
@@ -15,16 +14,17 @@ exports.mapRawAgentConfigs = mapRawAgentConfigs;
|
|
|
15
14
|
*/
|
|
16
15
|
function mapRawAgentConfigs(raw, agents) {
|
|
17
16
|
const mappedConfigs = {};
|
|
17
|
+
const validAgentIdentifiers = new Set(agents.map((agent) => agent.getIdentifier()));
|
|
18
|
+
const invalidKeys = [];
|
|
18
19
|
for (const [key, cfg] of Object.entries(raw)) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// Exact match with identifier or substring match with display name for backwards compatibility
|
|
23
|
-
if (identifier === lowerKey ||
|
|
24
|
-
agent.getName().toLowerCase().includes(lowerKey)) {
|
|
25
|
-
mappedConfigs[identifier] = cfg;
|
|
26
|
-
}
|
|
20
|
+
if (!validAgentIdentifiers.has(key)) {
|
|
21
|
+
invalidKeys.push(key);
|
|
22
|
+
continue;
|
|
27
23
|
}
|
|
24
|
+
mappedConfigs[key] = cfg;
|
|
25
|
+
}
|
|
26
|
+
if (invalidKeys.length > 0) {
|
|
27
|
+
throw (0, constants_1.createSkillerError)(`Invalid agent config section: ${invalidKeys.join(', ')}`, `Valid agents are: ${[...validAgentIdentifiers].join(', ')}`);
|
|
28
28
|
}
|
|
29
29
|
return mappedConfigs;
|
|
30
30
|
}
|