@agent-smith/cli 0.0.108 → 0.0.109
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/cmd/clicmds/aliases.js +0 -9
- package/dist/cmd/clicmds/base.js +2 -2
- package/dist/cmd/clicmds/cmds.d.ts +2 -3
- package/dist/cmd/clicmds/cmds.js +54 -23
- package/dist/cmd/clicmds/updateconf.d.ts +2 -1
- package/dist/cmd/clicmds/updateconf.js +38 -9
- package/dist/cmd/cmds.js +1 -4
- package/dist/cmd/lib/tasks/cmd.js +1 -1
- package/dist/cmd/sys/read_cmds.d.ts +7 -3
- package/dist/cmd/sys/read_cmds.js +20 -2
- package/dist/conf.d.ts +1 -2
- package/dist/conf.js +1 -2
- package/dist/db/write.js +18 -2
- package/dist/interfaces.d.ts +13 -2
- package/dist/main.d.ts +2 -2
- package/dist/main.js +2 -2
- package/package.json +4 -4
- package/dist/state/auto/usercmds.d.ts +0 -4
- package/dist/state/auto/usercmds.js +0 -3
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { allOptions } from "../options.js";
|
|
2
2
|
import { executeTaskCmd } from "../lib/tasks/cmd.js";
|
|
3
|
-
import { executeActionCmd } from "../lib/actions/cmd.js";
|
|
4
3
|
import { executeWorkflowCmd } from "../lib/workflows/cmd.js";
|
|
5
4
|
import { executeAgentCmd } from "../lib/agents/cmd.js";
|
|
6
5
|
function initCommandsFromAliases(program, aliases, features) {
|
|
@@ -50,14 +49,6 @@ function initCommandsFromAliases(program, aliases, features) {
|
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
51
|
break;
|
|
53
|
-
case "action":
|
|
54
|
-
const acmd = program.command(`${alias.name} [args...]`)
|
|
55
|
-
.description("action: " + alias.name)
|
|
56
|
-
.action(async (...args) => {
|
|
57
|
-
await executeActionCmd(alias.name, args);
|
|
58
|
-
});
|
|
59
|
-
allOptions.forEach(o => acmd.addOption(o));
|
|
60
|
-
break;
|
|
61
52
|
case "workflow":
|
|
62
53
|
const wcmd = program.command(`${alias.name} [args...]`)
|
|
63
54
|
.description("workflow: " + alias.name)
|
package/dist/cmd/clicmds/base.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Option } from "commander";
|
|
2
2
|
import { listBackends, setBackend } from "../../state/backends.js";
|
|
3
3
|
import { parseCommandArgs } from "../lib/options_parsers.js";
|
|
4
|
-
import { processTaskCmd, processTasksCmd, resetDbCmd
|
|
5
|
-
import { updateConfCmd } from "./updateconf.js";
|
|
4
|
+
import { processTaskCmd, processTasksCmd, resetDbCmd } from "./cmds.js";
|
|
5
|
+
import { updateConfCmd, updateFeaturesCmd } from "./updateconf.js";
|
|
6
6
|
import { displayOptions, inferenceOptions } from "../options.js";
|
|
7
7
|
function initBaseCommands(program) {
|
|
8
8
|
program.command("exit")
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import { FeatureSpec } from '../../interfaces.js';
|
|
3
|
-
declare function initUserCmds(cmdFeats: Record<string, FeatureSpec
|
|
3
|
+
declare function initUserCmds(cmdFeats: Record<string, FeatureSpec>, program: Command): Promise<Array<Command>>;
|
|
4
4
|
declare function resetDbCmd(): Promise<any>;
|
|
5
|
-
declare function updateFeaturesCmd(options: Record<string, any>): Promise<any>;
|
|
6
5
|
declare function processTasksCmd(args: Array<string>, options: Record<string, any>): Promise<void>;
|
|
7
6
|
declare function processTaskCmd(args: Array<string>, options: Record<string, any>): Promise<any>;
|
|
8
|
-
export { initUserCmds, processTaskCmd, processTasksCmd, resetDbCmd,
|
|
7
|
+
export { initUserCmds, processTaskCmd, processTasksCmd, resetDbCmd, };
|
package/dist/cmd/clicmds/cmds.js
CHANGED
|
@@ -1,25 +1,68 @@
|
|
|
1
1
|
import colors from "ansi-colors";
|
|
2
|
+
import { Option } from 'commander';
|
|
2
3
|
import path from "path";
|
|
3
4
|
import YAML from 'yaml';
|
|
4
5
|
import { dbPath } from "../../conf.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { getFeatureSpec
|
|
8
|
-
import { readPluginsPaths } from "../../state/plugins.js";
|
|
6
|
+
import { readFeaturesType, readTaskSetting } from "../../db/read.js";
|
|
7
|
+
import { deleteTaskSetting, upsertTaskSettings } from "../../db/write.js";
|
|
8
|
+
import { getFeatureSpec } from "../../state/features.js";
|
|
9
9
|
import { runMode } from "../../state/state.js";
|
|
10
10
|
import { initTaskSettings, isTaskSettingsInitialized, tasksSettings } from '../../state/tasks.js';
|
|
11
11
|
import { deleteFileIfExists } from "../sys/delete_file.js";
|
|
12
|
-
import { readCmd } from "../sys/read_cmds.js";
|
|
13
12
|
import { readTask } from "../sys/read_task.js";
|
|
14
|
-
|
|
13
|
+
import { parseCommandArgs } from "../lib/options_parsers.js";
|
|
14
|
+
import { readCmd } from "../sys/read_cmds.js";
|
|
15
|
+
import { runtimeDataError } from "../lib/user_msgs.js";
|
|
16
|
+
import { allOptions, displayOptions, inferenceOptions, ioOptions } from "../options.js";
|
|
17
|
+
async function initUserCmds(cmdFeats, program) {
|
|
15
18
|
const features = Object.values(cmdFeats);
|
|
16
19
|
const usrCmds = [];
|
|
17
20
|
for (const feat of features) {
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
const hasVariables = feat?.variables ? true : false;
|
|
22
|
+
const vars = hasVariables ? feat.variables : {};
|
|
23
|
+
let desc = "";
|
|
24
|
+
if (hasVariables) {
|
|
25
|
+
desc = vars.description;
|
|
22
26
|
}
|
|
27
|
+
const cmd = program.command(feat.variables.name)
|
|
28
|
+
.description(desc)
|
|
29
|
+
.action(async (...args) => {
|
|
30
|
+
const ca = parseCommandArgs(args);
|
|
31
|
+
const cmdPath = path.join(feat.path, feat.name + "." + feat.ext);
|
|
32
|
+
const c = await readCmd(feat.name, cmdPath);
|
|
33
|
+
if (!c) {
|
|
34
|
+
runtimeDataError(`can not import command ${feat.name}`);
|
|
35
|
+
throw new Error();
|
|
36
|
+
}
|
|
37
|
+
await c.run(ca.args, ca.options);
|
|
38
|
+
});
|
|
39
|
+
if (hasVariables) {
|
|
40
|
+
if (vars?.options) {
|
|
41
|
+
for (const opt of vars.options) {
|
|
42
|
+
if (Array.isArray(opt)) {
|
|
43
|
+
cmd.addOption(new Option(opt[0], opt[1]));
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
switch (opt) {
|
|
47
|
+
case "all":
|
|
48
|
+
allOptions.forEach(o => cmd.addOption(o));
|
|
49
|
+
break;
|
|
50
|
+
case "display":
|
|
51
|
+
displayOptions.forEach(o => cmd.addOption(o));
|
|
52
|
+
break;
|
|
53
|
+
case "inference":
|
|
54
|
+
inferenceOptions.forEach(o => cmd.addOption(o));
|
|
55
|
+
break;
|
|
56
|
+
case "io":
|
|
57
|
+
ioOptions.forEach(o => cmd.addOption(o));
|
|
58
|
+
default:
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
usrCmds.push(cmd);
|
|
23
66
|
}
|
|
24
67
|
return usrCmds;
|
|
25
68
|
}
|
|
@@ -31,18 +74,6 @@ async function resetDbCmd() {
|
|
|
31
74
|
deleteFileIfExists(dbPath);
|
|
32
75
|
console.log("Config database reset ok. Run the conf command to recreate it");
|
|
33
76
|
}
|
|
34
|
-
async function updateFeaturesCmd(options) {
|
|
35
|
-
const fp = readFeaturePaths();
|
|
36
|
-
const pp = await readPluginsPaths();
|
|
37
|
-
const paths = [...fp, ...pp];
|
|
38
|
-
const feats = readFeaturesDirs(paths, options?.debug ?? false);
|
|
39
|
-
updateFeatures(feats);
|
|
40
|
-
updateAliases(feats);
|
|
41
|
-
const deleted = cleanupFeaturePaths(paths);
|
|
42
|
-
for (const el of deleted) {
|
|
43
|
-
console.log("- [feature path]", el);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
77
|
async function processTasksCmd(args, options) {
|
|
47
78
|
if (options?.conf) {
|
|
48
79
|
if (!isTaskSettingsInitialized.value) {
|
|
@@ -92,4 +123,4 @@ async function processTaskCmd(args, options) {
|
|
|
92
123
|
console.log(colors.dim("Settings") + ":", display);
|
|
93
124
|
}
|
|
94
125
|
}
|
|
95
|
-
export { initUserCmds, processTaskCmd, processTasksCmd, resetDbCmd,
|
|
126
|
+
export { initUserCmds, processTaskCmd, processTasksCmd, resetDbCmd, };
|
|
@@ -1,10 +1,45 @@
|
|
|
1
|
+
import path from "path";
|
|
1
2
|
import { processConfPath } from "../../conf.js";
|
|
2
3
|
import { initDb } from "../../db/db.js";
|
|
3
|
-
import { readFilePath } from "../../db/read.js";
|
|
4
|
+
import { readFeaturePaths, readFilePath } from "../../db/read.js";
|
|
4
5
|
import { cleanupFeaturePaths, updateAliases, updateDataDirPath, updateFeatures, updatePromptfilePath, upsertFilePath } from "../../db/write.js";
|
|
5
6
|
import { readFeaturesDirs } from "../../state/features.js";
|
|
7
|
+
import { readPluginsPaths } from "../../state/plugins.js";
|
|
6
8
|
import { dataDirPath, promptfilePath } from "../../state/state.js";
|
|
7
9
|
import { runtimeDataError, runtimeInfo } from '../lib/user_msgs.js';
|
|
10
|
+
import { readUserCmd } from "../sys/read_cmds.js";
|
|
11
|
+
async function getUserCmdsData(feats) {
|
|
12
|
+
for (const feat of feats.cmd) {
|
|
13
|
+
const cmdPath = path.join(feat.path, feat.name + "." + feat.ext);
|
|
14
|
+
const { found, userCmd } = await readUserCmd(feat.name, cmdPath);
|
|
15
|
+
if (found) {
|
|
16
|
+
feat.variables = {
|
|
17
|
+
description: userCmd.description,
|
|
18
|
+
name: userCmd.name,
|
|
19
|
+
};
|
|
20
|
+
if (userCmd?.options) {
|
|
21
|
+
feat.variables.options = userCmd.options;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return feats;
|
|
26
|
+
}
|
|
27
|
+
async function updateAllFeatures(paths) {
|
|
28
|
+
let feats = readFeaturesDirs(paths, true);
|
|
29
|
+
feats = await getUserCmdsData(feats);
|
|
30
|
+
updateFeatures(feats);
|
|
31
|
+
updateAliases(feats);
|
|
32
|
+
const deleted = cleanupFeaturePaths(paths);
|
|
33
|
+
for (const el of deleted) {
|
|
34
|
+
console.log("- [feature path]", el);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async function updateFeaturesCmd(options) {
|
|
38
|
+
const fp = readFeaturePaths();
|
|
39
|
+
const pp = await readPluginsPaths();
|
|
40
|
+
const paths = [...fp, ...pp];
|
|
41
|
+
updateAllFeatures(paths);
|
|
42
|
+
}
|
|
8
43
|
async function updateConfCmd(args) {
|
|
9
44
|
initDb(false, true);
|
|
10
45
|
const { found, path } = readFilePath("conf");
|
|
@@ -33,12 +68,6 @@ async function updateConfCmd(args) {
|
|
|
33
68
|
updateDataDirPath(dd);
|
|
34
69
|
dataDirPath.value = dd;
|
|
35
70
|
}
|
|
36
|
-
|
|
37
|
-
updateFeatures(feats);
|
|
38
|
-
updateAliases(feats);
|
|
39
|
-
const deleted = cleanupFeaturePaths(paths);
|
|
40
|
-
for (const el of deleted) {
|
|
41
|
-
console.log("- [feature path]", el);
|
|
42
|
-
}
|
|
71
|
+
updateAllFeatures(paths);
|
|
43
72
|
}
|
|
44
|
-
export { updateConfCmd, };
|
|
73
|
+
export { updateConfCmd, updateFeaturesCmd, };
|
package/dist/cmd/cmds.js
CHANGED
|
@@ -30,10 +30,7 @@ async function buildCmds() {
|
|
|
30
30
|
const aliases = readAliases();
|
|
31
31
|
const feats = readFeatures();
|
|
32
32
|
initCommandsFromAliases(program, aliases, feats);
|
|
33
|
-
|
|
34
|
-
cmds.forEach(c => {
|
|
35
|
-
program.addCommand(c);
|
|
36
|
-
});
|
|
33
|
+
await initUserCmds(feats.cmd, program);
|
|
37
34
|
return program;
|
|
38
35
|
}
|
|
39
36
|
async function parseCmd(program) {
|
|
@@ -248,7 +248,7 @@ async function executeTask(name, payload, options) {
|
|
|
248
248
|
return;
|
|
249
249
|
}
|
|
250
250
|
else if (errMsg.includes("400 Bad Request")) {
|
|
251
|
-
runtimeError("The server answered with a 400 Bad Request error. That might mean that the model you are requesting does not exist on the server
|
|
251
|
+
runtimeError("The server answered with a 400 Bad Request error. That might mean that the model you are requesting does not exist on the server, a parameter is wrong or missing in your request.");
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
254
|
else if (errMsg.includes("fetch failed")) {
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare function readCmd(name: string, cmdPath: string): Promise<
|
|
3
|
-
|
|
1
|
+
import type { UserCmdDef } from "../../interfaces.js";
|
|
2
|
+
declare function readCmd(name: string, cmdPath: string): Promise<UserCmdDef | null>;
|
|
3
|
+
declare function readUserCmd(name: string, cmdPath: string): Promise<{
|
|
4
|
+
found: boolean;
|
|
5
|
+
userCmd: UserCmdDef;
|
|
6
|
+
}>;
|
|
7
|
+
export { readCmd, readUserCmd, };
|
|
@@ -2,7 +2,7 @@ import { pathToFileURL } from 'url';
|
|
|
2
2
|
import { runtimeWarning } from "../lib/user_msgs.js";
|
|
3
3
|
async function readCmd(name, cmdPath) {
|
|
4
4
|
const url = pathToFileURL(cmdPath).href;
|
|
5
|
-
let _cmd
|
|
5
|
+
let _cmd;
|
|
6
6
|
try {
|
|
7
7
|
const mod = await import(url);
|
|
8
8
|
_cmd = mod.cmd;
|
|
@@ -16,4 +16,22 @@ async function readCmd(name, cmdPath) {
|
|
|
16
16
|
}
|
|
17
17
|
return _cmd;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
async function readUserCmd(name, cmdPath) {
|
|
20
|
+
const url = pathToFileURL(cmdPath).href;
|
|
21
|
+
try {
|
|
22
|
+
const mod = await import(url);
|
|
23
|
+
const cmdMod = mod.cmd;
|
|
24
|
+
const uc = {
|
|
25
|
+
name: cmdMod.name,
|
|
26
|
+
description: cmdMod.description,
|
|
27
|
+
run: cmdMod.run,
|
|
28
|
+
options: cmdMod?.options ? cmdMod.options : undefined,
|
|
29
|
+
};
|
|
30
|
+
return { found: true, userCmd: uc };
|
|
31
|
+
}
|
|
32
|
+
catch (e) {
|
|
33
|
+
runtimeWarning(`command ${name} not found at ${cmdPath}, ${e}`);
|
|
34
|
+
return { found: false, userCmd: { name: "", description: "", run: async (a, b) => null } };
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export { readCmd, readUserCmd, };
|
package/dist/conf.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
declare const confDir: string, dbPath: string;
|
|
2
|
-
declare const cacheFilePath: string;
|
|
3
2
|
declare function processConfPath(confPath: string): Promise<{
|
|
4
3
|
paths: Array<string>;
|
|
5
4
|
pf: string;
|
|
6
5
|
dd: string;
|
|
7
6
|
}>;
|
|
8
|
-
export { confDir, dbPath,
|
|
7
|
+
export { confDir, dbPath, processConfPath, };
|
package/dist/conf.js
CHANGED
|
@@ -25,7 +25,6 @@ function getConfigPath(appName, filename) {
|
|
|
25
25
|
return { confDir: confDir, dbPath: dbPath };
|
|
26
26
|
}
|
|
27
27
|
const { confDir, dbPath } = getConfigPath("agent-smith", "config.db");
|
|
28
|
-
const cacheFilePath = join(import.meta.dirname, "state/auto/usercmds.js");
|
|
29
28
|
async function processConfPath(confPath) {
|
|
30
29
|
createDirectoryIfNotExists(confDir);
|
|
31
30
|
const { found, data } = readConf(confPath);
|
|
@@ -115,4 +114,4 @@ async function processConfPath(confPath) {
|
|
|
115
114
|
}
|
|
116
115
|
return { paths: allPaths, pf: pf, dd: dd };
|
|
117
116
|
}
|
|
118
|
-
export { confDir, dbPath,
|
|
117
|
+
export { confDir, dbPath, processConfPath, };
|
package/dist/db/write.js
CHANGED
|
@@ -131,8 +131,14 @@ function upsertAndCleanFeatures(feats, type) {
|
|
|
131
131
|
});
|
|
132
132
|
feats.forEach((feat) => {
|
|
133
133
|
if (!names.includes(feat.name)) {
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
if (feat?.variables) {
|
|
135
|
+
const insertStmt = db.prepare(`INSERT INTO ${type} (name, path, ext, variables) VALUES (?, ?, ?, ?)`);
|
|
136
|
+
insertStmt.run(feat.name, feat.path, feat.ext, JSON.stringify(feat.variables, null, 2));
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
const insertStmt2 = db.prepare(`INSERT INTO ${type} (name, path, ext) VALUES (?, ?, ?)`);
|
|
140
|
+
insertStmt2.run(feat.name, feat.path, feat.ext);
|
|
141
|
+
}
|
|
136
142
|
console.log("+", "[" + type + "]", feat.name, feat.path);
|
|
137
143
|
newFeatures.push(feat);
|
|
138
144
|
}
|
|
@@ -148,6 +154,15 @@ function updateVariables(name, variableDoc) {
|
|
|
148
154
|
const updateStmt = db.prepare("UPDATE task SET variables = ? WHERE id = ?");
|
|
149
155
|
updateStmt.run(variableDoc, result.id);
|
|
150
156
|
}
|
|
157
|
+
function updateUserCmd(feat) {
|
|
158
|
+
const stmt1 = db.prepare("SELECT id FROM cmd WHERE name = ?");
|
|
159
|
+
const result = stmt1.get(feat.name);
|
|
160
|
+
if (!result?.id) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const updateStmt = db.prepare("UPDATE cmd SET variables = ? WHERE id = ?");
|
|
164
|
+
updateStmt.run(JSON.stringify(feat.variables, null, 2), result.id);
|
|
165
|
+
}
|
|
151
166
|
function upsertTool(name, type, toolDoc) {
|
|
152
167
|
const stmt1 = db.prepare("SELECT * FROM tool WHERE name = ?");
|
|
153
168
|
const result = stmt1.get(name);
|
|
@@ -197,6 +212,7 @@ function updateFeatures(feats) {
|
|
|
197
212
|
});
|
|
198
213
|
upsertAndCleanFeatures(feats.adaptater, "adaptater");
|
|
199
214
|
upsertAndCleanFeatures(feats.cmd, "cmd");
|
|
215
|
+
feats.cmd.forEach(c => updateUserCmd(c));
|
|
200
216
|
}
|
|
201
217
|
function upsertFilePath(name, newPath) {
|
|
202
218
|
const selectStmt = db.prepare("SELECT * FROM filepath WHERE name = ?");
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ interface FeatureSpec {
|
|
|
5
5
|
name: string;
|
|
6
6
|
path: string;
|
|
7
7
|
ext: FeatureExtension;
|
|
8
|
-
variables?: TaskVariables
|
|
8
|
+
variables?: TaskVariables | Record<string, any>;
|
|
9
9
|
}
|
|
10
10
|
interface Features {
|
|
11
11
|
agent: Array<{
|
|
@@ -22,6 +22,11 @@ interface Features {
|
|
|
22
22
|
name: string;
|
|
23
23
|
path: string;
|
|
24
24
|
ext: CmdExtension;
|
|
25
|
+
variables?: {
|
|
26
|
+
name: string;
|
|
27
|
+
options?: Array<Array<string> | string>;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
25
30
|
}>;
|
|
26
31
|
action: Array<{
|
|
27
32
|
name: string;
|
|
@@ -39,6 +44,12 @@ interface Features {
|
|
|
39
44
|
ext: AdaptaterExtension;
|
|
40
45
|
}>;
|
|
41
46
|
}
|
|
47
|
+
interface UserCmdDef {
|
|
48
|
+
name: string;
|
|
49
|
+
description: string;
|
|
50
|
+
run: (args: any, options: Record<string, any>) => Promise<any>;
|
|
51
|
+
options?: Array<Array<string> | string>;
|
|
52
|
+
}
|
|
42
53
|
interface ConfInferenceBackend {
|
|
43
54
|
type: LmProviderType;
|
|
44
55
|
url: string;
|
|
@@ -151,4 +162,4 @@ type CmdExtension = "js";
|
|
|
151
162
|
type FeatureExtension = TaskExtension | AgentExtension | CmdExtension | ActionExtension | WorkflowExtension;
|
|
152
163
|
type AliasType = "task" | "agent" | "action" | "workflow";
|
|
153
164
|
type FeatureExecutor<I = any, O = any> = (params: I, options: Record<string, any>) => Promise<O>;
|
|
154
|
-
export { InputMode, VerbosityMode, OutputMode, RunMode, FormatMode, FeatureType, ActionExtension, TaskExtension, AgentExtension, WorkflowExtension, AdaptaterExtension, CmdExtension, FeatureSpec, Features, ConfigFile, FeatureExtension, AliasType, ToolType, Settings, DbModelDef, ModelSpec, ModelfileSpec, ModelPack, LmTaskFileSpec, LmTaskConfig, FinalLmTaskConfig, McpServerSpec, McpServerTool, InferenceBackend, ConfInferenceBackend, FeatureExecutor, WorkflowStep, TaskSettings, };
|
|
165
|
+
export { InputMode, VerbosityMode, OutputMode, RunMode, FormatMode, FeatureType, ActionExtension, TaskExtension, AgentExtension, WorkflowExtension, AdaptaterExtension, CmdExtension, FeatureSpec, Features, ConfigFile, FeatureExtension, AliasType, ToolType, Settings, DbModelDef, ModelSpec, ModelfileSpec, ModelPack, LmTaskFileSpec, LmTaskConfig, FinalLmTaskConfig, McpServerSpec, McpServerTool, InferenceBackend, ConfInferenceBackend, FeatureExecutor, WorkflowStep, TaskSettings, UserCmdDef, };
|
package/dist/main.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { executeTask } from "./cmd/lib/tasks/cmd.js";
|
|
|
3
3
|
import { executeAction } from "./cmd/lib/actions/cmd.js";
|
|
4
4
|
import { executeWorkflow } from "./cmd/lib/workflows/cmd.js";
|
|
5
5
|
import { writeToClipboard } from "./cmd/sys/clipboard.js";
|
|
6
|
-
import { initState, pluginDataDir, init } from "./state/state.js";
|
|
6
|
+
import { initState, pluginDataDir, init, isStateReady } from "./state/state.js";
|
|
7
7
|
import { usePerfTimer } from "./utils/perf.js";
|
|
8
8
|
import { parseCommandArgs } from "./cmd/lib/options_parsers.js";
|
|
9
9
|
import { extractToolDoc } from "./cmd/lib/tools.js";
|
|
@@ -13,4 +13,4 @@ import { displayOptions, ioOptions, inferenceOptions, allOptions } from "./cmd/o
|
|
|
13
13
|
import { McpClient } from "./cmd/lib/mcp.js";
|
|
14
14
|
import { readTask } from "./cmd/lib/tasks/read.js";
|
|
15
15
|
import { FeatureType } from "./interfaces.js";
|
|
16
|
-
export { execute, run, executeTask, executeAction, executeWorkflow, writeToClipboard, initState, init, pluginDataDir, usePerfTimer, parseCommandArgs, extractToolDoc, openTaskSpec, extractBetweenTags, splitThinking, displayOptions, ioOptions, inferenceOptions, allOptions, McpClient, readTask, FeatureType, };
|
|
16
|
+
export { execute, run, executeTask, executeAction, executeWorkflow, writeToClipboard, initState, init, pluginDataDir, usePerfTimer, parseCommandArgs, extractToolDoc, openTaskSpec, extractBetweenTags, splitThinking, displayOptions, ioOptions, inferenceOptions, allOptions, isStateReady, McpClient, readTask, FeatureType, };
|
package/dist/main.js
CHANGED
|
@@ -3,7 +3,7 @@ import { executeTask } from "./cmd/lib/tasks/cmd.js";
|
|
|
3
3
|
import { executeAction } from "./cmd/lib/actions/cmd.js";
|
|
4
4
|
import { executeWorkflow } from "./cmd/lib/workflows/cmd.js";
|
|
5
5
|
import { writeToClipboard } from "./cmd/sys/clipboard.js";
|
|
6
|
-
import { initState, pluginDataDir, init } from "./state/state.js";
|
|
6
|
+
import { initState, pluginDataDir, init, isStateReady } from "./state/state.js";
|
|
7
7
|
import { usePerfTimer } from "./utils/perf.js";
|
|
8
8
|
import { parseCommandArgs } from "./cmd/lib/options_parsers.js";
|
|
9
9
|
import { extractToolDoc } from "./cmd/lib/tools.js";
|
|
@@ -12,4 +12,4 @@ import { extractBetweenTags, splitThinking } from "./utils/text.js";
|
|
|
12
12
|
import { displayOptions, ioOptions, inferenceOptions, allOptions } from "./cmd/options.js";
|
|
13
13
|
import { McpClient } from "./cmd/lib/mcp.js";
|
|
14
14
|
import { readTask } from "./cmd/lib/tasks/read.js";
|
|
15
|
-
export { execute, run, executeTask, executeAction, executeWorkflow, writeToClipboard, initState, init, pluginDataDir, usePerfTimer, parseCommandArgs, extractToolDoc, openTaskSpec, extractBetweenTags, splitThinking, displayOptions, ioOptions, inferenceOptions, allOptions, McpClient, readTask, };
|
|
15
|
+
export { execute, run, executeTask, executeAction, executeWorkflow, writeToClipboard, initState, init, pluginDataDir, usePerfTimer, parseCommandArgs, extractToolDoc, openTaskSpec, extractBetweenTags, splitThinking, displayOptions, ioOptions, inferenceOptions, allOptions, isStateReady, McpClient, readTask, };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@agent-smith/cli",
|
|
3
3
|
"description": "Agent Smith: terminal client for language model agents",
|
|
4
4
|
"repository": "https://github.com/synw/agent-smith",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.109",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "rm -rf dist/* && tsc",
|
|
8
8
|
"cli": "node --loader ts-node/esm bin/index.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"ansi-colors": "^4.1.3",
|
|
23
23
|
"better-sqlite3": "^12.6.2",
|
|
24
24
|
"clipboardy": "^5.1.0",
|
|
25
|
-
"commander": "^14.0.
|
|
25
|
+
"commander": "^14.0.3",
|
|
26
26
|
"marked-terminal": "^7.3.0",
|
|
27
27
|
"ora": "^9.1.0",
|
|
28
28
|
"python-shell": "^5.0.0",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
37
37
|
"@types/better-sqlite3": "^7.6.13",
|
|
38
38
|
"@types/marked-terminal": "^6.1.1",
|
|
39
|
-
"@types/node": "^25.0
|
|
40
|
-
"openai": "^6.
|
|
39
|
+
"@types/node": "^25.1.0",
|
|
40
|
+
"openai": "^6.17.0",
|
|
41
41
|
"restmix": "^0.6.1",
|
|
42
42
|
"tslib": "2.8.1",
|
|
43
43
|
"typescript": "^5.9.3"
|