@agentskit/cli 0.13.24 → 0.13.28
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 +30 -1
- package/dist/bin.cjs +21 -15
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-RNOYLQCV.js → chunk-54AIH25E.js} +24 -18
- package/dist/chunk-54AIH25E.js.map +1 -0
- package/dist/index.cjs +21 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +13 -14
- package/dist/chunk-RNOYLQCV.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -594,13 +594,14 @@ ${lines.join("\n")}`, "info");
|
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
596
|
];
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
}
|
|
597
|
+
function buildSkillRegistry() {
|
|
598
|
+
const reg = /* @__PURE__ */ Object.create(null);
|
|
599
|
+
for (const skill of skills.getBuiltinSkills()) {
|
|
600
|
+
reg[skill.name] = skill;
|
|
601
|
+
}
|
|
602
|
+
return reg;
|
|
603
|
+
}
|
|
604
|
+
var skillRegistry = buildSkillRegistry();
|
|
604
605
|
function instantiate(kind) {
|
|
605
606
|
switch (kind) {
|
|
606
607
|
case "web_search":
|
|
@@ -649,18 +650,23 @@ function resolveTools(toolNames) {
|
|
|
649
650
|
}
|
|
650
651
|
function resolveSkill(skillName) {
|
|
651
652
|
if (!skillName) return void 0;
|
|
652
|
-
const
|
|
653
|
-
if (!
|
|
653
|
+
const key = skillName.trim();
|
|
654
|
+
if (!Object.prototype.hasOwnProperty.call(skillRegistry, key)) {
|
|
654
655
|
process.stderr.write(`Unknown skill: ${skillName}
|
|
655
656
|
`);
|
|
656
657
|
return void 0;
|
|
657
658
|
}
|
|
658
|
-
return
|
|
659
|
+
return skillRegistry[key];
|
|
659
660
|
}
|
|
660
661
|
function resolveSkills(skillNames) {
|
|
661
662
|
if (!skillNames) return void 0;
|
|
662
|
-
const names = skillNames.split(",").map((s) => s.trim());
|
|
663
|
-
const resolved =
|
|
663
|
+
const names = skillNames.split(",").map((s) => s.trim()).filter(Boolean);
|
|
664
|
+
const resolved = [];
|
|
665
|
+
for (const n of names) {
|
|
666
|
+
if (Object.prototype.hasOwnProperty.call(skillRegistry, n)) {
|
|
667
|
+
resolved.push(skillRegistry[n]);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
664
670
|
if (resolved.length === 0) {
|
|
665
671
|
process.stderr.write(`No valid skills found in: ${skillNames}
|
|
666
672
|
`);
|
|
@@ -1411,7 +1417,7 @@ function disposeMcpClients(clients) {
|
|
|
1411
1417
|
|
|
1412
1418
|
// src/commands/chat.ts
|
|
1413
1419
|
function registerChatCommand(program) {
|
|
1414
|
-
program.command("chat").description("Start a terminal chat session.").option("--provider <provider>", "Provider to use", "demo").option("--model <model>", "Model name").option("--api-key <key>", "API key for the selected provider").option("--base-url <url>", "Override provider base URL").option("--system <prompt>", "System prompt").option("--memory <path>", "Explicit memory file path (overrides session management)").option("--tools <tools>", "Comma-separated tools: web_search,fetch_url,filesystem,shell").option("--skill <skills>", "Comma-separated skills
|
|
1420
|
+
program.command("chat").description("Start a terminal chat session.").option("--provider <provider>", "Provider to use", "demo").option("--model <model>", "Model name").option("--api-key <key>", "API key for the selected provider").option("--base-url <url>", "Override provider base URL").option("--system <prompt>", "System prompt").option("--memory <path>", "Explicit memory file path (overrides session management)").option("--tools <tools>", "Comma-separated tools: web_search,fetch_url,filesystem,shell").option("--skill <skills>", "Comma-separated skill names from @agentskit/skills (e.g. researcher, pr-reviewer)").option("--memory-backend <backend>", "Memory backend: file (default), sqlite").option("--new", "Start a fresh chat session (ignore previous conversations in this directory)").option("--resume [id]", "Resume a prior session by id; omit id to resume the latest").option("--list-sessions", "List saved sessions for this directory and exit").option("--no-config", "Skip loading .agentskit.config.json").option(
|
|
1415
1421
|
"--plugin-dir <dir>",
|
|
1416
1422
|
"Extra directory to auto-discover plugin modules from (repeatable)",
|
|
1417
1423
|
(value, prev = []) => [...prev, value],
|
|
@@ -4118,10 +4124,10 @@ function registerAiCommand(program) {
|
|
|
4118
4124
|
apiKey: options.apiKey,
|
|
4119
4125
|
baseUrl: options.baseUrl
|
|
4120
4126
|
});
|
|
4121
|
-
const
|
|
4127
|
+
const planner = createAdapterPlanner(resolved.adapter);
|
|
4122
4128
|
process.stderr.write(`Planning agent for: "${description}"
|
|
4123
4129
|
`);
|
|
4124
|
-
const schema = await
|
|
4130
|
+
const schema = await planner(description);
|
|
4125
4131
|
const files = scaffoldAgent(schema);
|
|
4126
4132
|
if (options.dryRun) {
|
|
4127
4133
|
process.stdout.write(JSON.stringify({ schema, files: files.map((f) => f.path) }, null, 2) + "\n");
|