@agentskit/cli 0.13.25 → 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 CHANGED
@@ -1,6 +1,10 @@
1
1
  # @agentskit/cli
2
2
 
3
- <p align="center"><img src="https://raw.githubusercontent.com/AgentsKit-io/agentskit/main/apps/docs-next/public/brand/logo-wordmark.svg" alt="AgentsKit" width="180" /></p>
3
+ > The programmatic package entry is ESM-only because its Ink 7 UI dependency uses an ESM graph with top-level await.
4
+
5
+ Profile: <code>major-package</code>
6
+
7
+ <p align="center"><img alt="AgentsKit" src="https://raw.githubusercontent.com/AgentsKit-io/agentskit/main/apps/docs-next/public/brand/logo-wordmark.svg" width="180" /></p>
4
8
 
5
9
  Chat with any LLM, scaffold projects, and run agents — all from your terminal.
6
10
 
@@ -13,6 +17,12 @@ Chat with any LLM, scaffold projects, and run agents — all from your terminal.
13
17
 
14
18
  **Tags:** `ai` · `agents` · `llm` · `agentskit` · `openai` · `anthropic` · `claude` · `gemini` · `chatgpt` · `cli` · `command-line` · `scaffolding` · `ai-agents` · `autonomous-agents`
15
19
 
20
+ ## Verified proof
21
+
22
+ - Package metadata and tests live under `packages/cli/`.
23
+ - Package guide: https://www.agentskit.io/docs/packages/cli
24
+ - Stability map: [docs/STABILITY.md](../../docs/STABILITY.md)
25
+
16
26
  ## How this fits the ecosystem
17
27
 
18
28
  @agentskit/cli is the fastest path from terminal to working agent: scaffold projects, chat, run agents, inspect config, and diagnose setup.
@@ -33,6 +43,7 @@ Docs: [package guide](https://www.agentskit.io/docs/packages/cli) · [agent hand
33
43
 
34
44
  ## Install
35
45
 
46
+ <!-- readme-command:install -->
36
47
  ```bash
37
48
  npm install -g @agentskit/cli
38
49
  ```
@@ -102,3 +113,21 @@ MIT — see [LICENSE](../../LICENSE).
102
113
  ## Docs
103
114
 
104
115
  [Full documentation](https://www.agentskit.io) · [GitHub](https://github.com/AgentsKit-io/agentskit)
116
+
117
+ ## Quick start
118
+
119
+ <!-- readme-example:quickstart -->
120
+ ```ts
121
+ import '@agentskit/cli'
122
+ console.log('@agentskit/cli loaded')
123
+ ```
124
+
125
+ ## Maturity and compatibility
126
+
127
+ - Stability: **beta** — see [docs/STABILITY.md](../../docs/STABILITY.md)
128
+ - **Node.js 20+** and **TypeScript** strict mode
129
+ - Published as `@agentskit/cli`
130
+
131
+ ## Contributing
132
+
133
+ See [CONTRIBUTING.md](../../CONTRIBUTING.md) and the monorepo [LICENSE](../../LICENSE).
package/dist/bin.cjs CHANGED
@@ -590,13 +590,14 @@ ${lines.join("\n")}`, "info");
590
590
  }
591
591
  }
592
592
  ];
593
- var skillRegistry = {
594
- researcher: skills.researcher,
595
- coder: skills.coder,
596
- planner: skills.planner,
597
- critic: skills.critic,
598
- summarizer: skills.summarizer
599
- };
593
+ function buildSkillRegistry() {
594
+ const reg = /* @__PURE__ */ Object.create(null);
595
+ for (const skill of skills.getBuiltinSkills()) {
596
+ reg[skill.name] = skill;
597
+ }
598
+ return reg;
599
+ }
600
+ var skillRegistry = buildSkillRegistry();
600
601
  function instantiate(kind) {
601
602
  switch (kind) {
602
603
  case "web_search":
@@ -645,18 +646,23 @@ function resolveTools(toolNames) {
645
646
  }
646
647
  function resolveSkill(skillName) {
647
648
  if (!skillName) return void 0;
648
- const skill = skillRegistry[skillName.trim()];
649
- if (!skill) {
649
+ const key = skillName.trim();
650
+ if (!Object.prototype.hasOwnProperty.call(skillRegistry, key)) {
650
651
  process.stderr.write(`Unknown skill: ${skillName}
651
652
  `);
652
653
  return void 0;
653
654
  }
654
- return skill;
655
+ return skillRegistry[key];
655
656
  }
656
657
  function resolveSkills(skillNames) {
657
658
  if (!skillNames) return void 0;
658
- const names = skillNames.split(",").map((s) => s.trim());
659
- const resolved = names.map((n) => skillRegistry[n]).filter(Boolean);
659
+ const names = skillNames.split(",").map((s) => s.trim()).filter(Boolean);
660
+ const resolved = [];
661
+ for (const n of names) {
662
+ if (Object.prototype.hasOwnProperty.call(skillRegistry, n)) {
663
+ resolved.push(skillRegistry[n]);
664
+ }
665
+ }
660
666
  if (resolved.length === 0) {
661
667
  process.stderr.write(`No valid skills found in: ${skillNames}
662
668
  `);
@@ -1403,7 +1409,7 @@ function disposeMcpClients(clients) {
1403
1409
 
1404
1410
  // src/commands/chat.ts
1405
1411
  function registerChatCommand(program) {
1406
- 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: researcher,coder,planner,critic,summarizer").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(
1412
+ 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(
1407
1413
  "--plugin-dir <dir>",
1408
1414
  "Extra directory to auto-discover plugin modules from (repeatable)",
1409
1415
  (value, prev = []) => [...prev, value],
@@ -4110,10 +4116,10 @@ function registerAiCommand(program) {
4110
4116
  apiKey: options.apiKey,
4111
4117
  baseUrl: options.baseUrl
4112
4118
  });
4113
- const planner2 = createAdapterPlanner(resolved.adapter);
4119
+ const planner = createAdapterPlanner(resolved.adapter);
4114
4120
  process.stderr.write(`Planning agent for: "${description}"
4115
4121
  `);
4116
- const schema = await planner2(description);
4122
+ const schema = await planner(description);
4117
4123
  const files = scaffoldAgent(schema);
4118
4124
  if (options.dryRun) {
4119
4125
  process.stdout.write(JSON.stringify({ schema, files: files.map((f) => f.path) }, null, 2) + "\n");