@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 +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/bin.js
CHANGED
|
@@ -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 {
|
|
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
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
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
|
|
801
|
-
if (!
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
4118
|
+
const planner = createAdapterPlanner(resolved.adapter);
|
|
4113
4119
|
process.stderr.write(`Planning agent for: "${description}"
|
|
4114
4120
|
`);
|
|
4115
|
-
const schema = await
|
|
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-
|
|
5713
|
-
//# sourceMappingURL=chunk-
|
|
5718
|
+
//# sourceMappingURL=chunk-54AIH25E.js.map
|
|
5719
|
+
//# sourceMappingURL=chunk-54AIH25E.js.map
|