@agentskit/cli 0.13.25 → 0.13.29

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/dist/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { createCli } from './chunk-RNOYLQCV.js';
2
+ import { createCli } from './chunk-54AIH25E.js';
3
3
 
4
4
  // src/bin.ts
5
5
  async function main() {
@@ -10,7 +10,7 @@ import React2, { useMemo, useState, useEffect, useRef } from 'react';
10
10
  import { Box, Text, render } from 'ink';
11
11
  import { useChat, StatusHeader, ChatContainer, Message, ToolCallView, ToolConfirmation, ThinkingIndicator, InputBar } from '@agentskit/ink';
12
12
  import { shell, filesystem, fetchUrl, webSearch } from '@agentskit/tools';
13
- import { summarizer, critic, planner, coder, researcher, composeSkills } from '@agentskit/skills';
13
+ import { getBuiltinSkills, composeSkills } from '@agentskit/skills';
14
14
  import { fileVectorMemory, fileChatMemory, sqliteChatMemory } from '@agentskit/memory';
15
15
  import { getIntegration, integrationToolsFromEnv } from '@agentskit/integrations';
16
16
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -742,13 +742,14 @@ ${lines.join("\n")}`, "info");
742
742
  }
743
743
  }
744
744
  ];
745
- var skillRegistry = {
746
- researcher,
747
- coder,
748
- planner,
749
- critic,
750
- summarizer
751
- };
745
+ function buildSkillRegistry() {
746
+ const reg = /* @__PURE__ */ Object.create(null);
747
+ for (const skill of getBuiltinSkills()) {
748
+ reg[skill.name] = skill;
749
+ }
750
+ return reg;
751
+ }
752
+ var skillRegistry = buildSkillRegistry();
752
753
  function instantiate(kind) {
753
754
  switch (kind) {
754
755
  case "web_search":
@@ -797,18 +798,23 @@ function resolveTools(toolNames) {
797
798
  }
798
799
  function resolveSkill(skillName) {
799
800
  if (!skillName) return void 0;
800
- const skill = skillRegistry[skillName.trim()];
801
- if (!skill) {
801
+ const key = skillName.trim();
802
+ if (!Object.prototype.hasOwnProperty.call(skillRegistry, key)) {
802
803
  process.stderr.write(`Unknown skill: ${skillName}
803
804
  `);
804
805
  return void 0;
805
806
  }
806
- return skill;
807
+ return skillRegistry[key];
807
808
  }
808
809
  function resolveSkills(skillNames) {
809
810
  if (!skillNames) return void 0;
810
- const names = skillNames.split(",").map((s) => s.trim());
811
- const resolved = names.map((n) => skillRegistry[n]).filter(Boolean);
811
+ const names = skillNames.split(",").map((s) => s.trim()).filter(Boolean);
812
+ const resolved = [];
813
+ for (const n of names) {
814
+ if (Object.prototype.hasOwnProperty.call(skillRegistry, n)) {
815
+ resolved.push(skillRegistry[n]);
816
+ }
817
+ }
812
818
  if (resolved.length === 0) {
813
819
  process.stderr.write(`No valid skills found in: ${skillNames}
814
820
  `);
@@ -3381,7 +3387,7 @@ function mergeWithConfig(options, config) {
3381
3387
 
3382
3388
  // src/commands/chat.ts
3383
3389
  function registerChatCommand(program) {
3384
- 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(
3390
+ 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(
3385
3391
  "--plugin-dir <dir>",
3386
3392
  "Extra directory to auto-discover plugin modules from (repeatable)",
3387
3393
  (value, prev = []) => [...prev, value],
@@ -4109,10 +4115,10 @@ function registerAiCommand(program) {
4109
4115
  apiKey: options.apiKey,
4110
4116
  baseUrl: options.baseUrl
4111
4117
  });
4112
- const planner2 = createAdapterPlanner(resolved.adapter);
4118
+ const planner = createAdapterPlanner(resolved.adapter);
4113
4119
  process.stderr.write(`Planning agent for: "${description}"
4114
4120
  `);
4115
- const schema = await planner2(description);
4121
+ const schema = await planner(description);
4116
4122
  const files = scaffoldAgent(schema);
4117
4123
  if (options.dryRun) {
4118
4124
  process.stdout.write(JSON.stringify({ schema, files: files.map((f) => f.path) }, null, 2) + "\n");
@@ -5709,5 +5715,5 @@ function createCli() {
5709
5715
  }
5710
5716
 
5711
5717
  export { ChatApp, HookDispatcher, McpClient, applyPolicyToTool, applyPolicyToTools, bridgeMcpServers, buildRagFromConfig, computeCost, configHooksToHandlers, createCli, createOpenAiEmbedder, defaultPolicy, derivePreview, disposeMcpClients, evaluatePolicy, findLatestSession, findSession, forkSession, generateSessionId, getPricing, indexSources, listSessions, loadConfig, loadPlugins, mergePluginsIntoBundle, registerPricing, renameSession, renderChatHeader, renderReport, resolveChatProvider, resolveSession, runAgent, runDoctor, sessionFilePath, startDev, startTunnel, writeSessionMeta, writeStarterProject };
5712
- //# sourceMappingURL=chunk-RNOYLQCV.js.map
5713
- //# sourceMappingURL=chunk-RNOYLQCV.js.map
5718
+ //# sourceMappingURL=chunk-54AIH25E.js.map
5719
+ //# sourceMappingURL=chunk-54AIH25E.js.map