@agent-smith/cli 0.0.11 → 0.0.12
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/cmds.js
CHANGED
|
@@ -128,7 +128,7 @@ async function _executeTaskCmd(args = [], options) {
|
|
|
128
128
|
console.warn("Provide a task name");
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
|
-
const { ok, data, error } = await executeTaskCmd(args);
|
|
131
|
+
const { ok, data, error } = await executeTaskCmd(args, options);
|
|
132
132
|
if (!ok) {
|
|
133
133
|
console.warn(error);
|
|
134
134
|
}
|
|
@@ -2,9 +2,21 @@ import { brain, initAgent, taskBuilder } from "../../agent.js";
|
|
|
2
2
|
import { getFeatureSpec } from "../../state/features.js";
|
|
3
3
|
import { runMode } from "../../state/state.js";
|
|
4
4
|
import { initTaskVars, readTask } from "./utils.js";
|
|
5
|
+
import { readClipboard } from "../sys/clipboard.js";
|
|
5
6
|
async function executeTaskCmd(args = [], options = {}) {
|
|
6
7
|
await initAgent(runMode.value);
|
|
7
8
|
const name = args.shift();
|
|
9
|
+
const params = args.filter((x) => x.length > 0);
|
|
10
|
+
let pr;
|
|
11
|
+
if (options?.Ic == true) {
|
|
12
|
+
pr = await readClipboard();
|
|
13
|
+
}
|
|
14
|
+
else if (params.length > 0) {
|
|
15
|
+
pr = params.shift();
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
throw new Error("Please provide a prompt");
|
|
19
|
+
}
|
|
8
20
|
const { found, path } = getFeatureSpec(name, "task");
|
|
9
21
|
if (!found) {
|
|
10
22
|
return { ok: false, data: {}, error: `Task ${name} not found` };
|
|
@@ -15,7 +27,6 @@ async function executeTaskCmd(args = [], options = {}) {
|
|
|
15
27
|
}
|
|
16
28
|
const taskSpec = taskBuilder.readFromYaml(res.ymlTask);
|
|
17
29
|
const task = taskBuilder.fromYaml(res.ymlTask);
|
|
18
|
-
const pr = args.shift();
|
|
19
30
|
const { conf, vars } = initTaskVars(args);
|
|
20
31
|
const ex = brain.getOrCreateExpertForModel(taskSpec.model.name, taskSpec.template.name);
|
|
21
32
|
if (!ex) {
|
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.12",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"buildrl": "rm -rf dist/* && rollup -c",
|
|
8
8
|
"build": "rm -rf dist/* && tsc",
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"watch": "tsc -p . -w"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@agent-smith/brain": "^0.0.
|
|
13
|
+
"@agent-smith/brain": "^0.0.31",
|
|
14
14
|
"@agent-smith/jobs": "^0.0.11",
|
|
15
15
|
"@agent-smith/lmtask": "^0.0.20",
|
|
16
16
|
"@inquirer/prompts": "^6.0.1",
|
|
17
17
|
"@inquirer/select": "^3.0.1",
|
|
18
|
-
"@vue/reactivity": "^3.5.
|
|
18
|
+
"@vue/reactivity": "^3.5.11",
|
|
19
19
|
"better-sqlite3": "^11.3.0",
|
|
20
20
|
"clipboardy": "^4.0.0",
|
|
21
21
|
"commander": "^12.1.0",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"@agent-smith/tmem-jobs": "^0.0.4",
|
|
30
30
|
"@commander-js/extra-typings": "^12.1.0",
|
|
31
31
|
"@locallm/types": "^0.1.5",
|
|
32
|
-
"@rollup/plugin-node-resolve": "^15.
|
|
33
|
-
"@rollup/plugin-typescript": "^
|
|
32
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
33
|
+
"@rollup/plugin-typescript": "^12.1.0",
|
|
34
34
|
"@types/better-sqlite3": "^7.6.11",
|
|
35
35
|
"@types/marked-terminal": "^6.1.1",
|
|
36
|
-
"@types/node": "^22.
|
|
36
|
+
"@types/node": "^22.7.4",
|
|
37
37
|
"restmix": "^0.5.0",
|
|
38
|
-
"rollup": "^4.
|
|
38
|
+
"rollup": "^4.24.0",
|
|
39
39
|
"ts-node": "^10.9.2",
|
|
40
40
|
"tslib": "2.7.0",
|
|
41
41
|
"typescript": "^5.6.2"
|