@agent-smith/cli 0.0.12 → 0.0.13
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/lib/execute_task.js +10 -3
- package/package.json +8 -8
|
@@ -28,16 +28,23 @@ async function executeTaskCmd(args = [], options = {}) {
|
|
|
28
28
|
const taskSpec = taskBuilder.readFromYaml(res.ymlTask);
|
|
29
29
|
const task = taskBuilder.fromYaml(res.ymlTask);
|
|
30
30
|
const { conf, vars } = initTaskVars(args);
|
|
31
|
-
|
|
31
|
+
let m = taskSpec.model.name;
|
|
32
|
+
let t = taskSpec.template.name;
|
|
33
|
+
if (conf?.model) {
|
|
34
|
+
m = conf.model;
|
|
35
|
+
}
|
|
36
|
+
if (conf?.template) {
|
|
37
|
+
t = conf.template;
|
|
38
|
+
}
|
|
39
|
+
const ex = brain.getOrCreateExpertForModel(m, t);
|
|
32
40
|
if (!ex) {
|
|
33
|
-
throw new Error("No expert found for model " +
|
|
41
|
+
throw new Error("No expert found for model " + m);
|
|
34
42
|
}
|
|
35
43
|
ex.checkStatus();
|
|
36
44
|
ex.backend.setOnToken((t) => {
|
|
37
45
|
process.stdout.write(t);
|
|
38
46
|
});
|
|
39
47
|
conf.expert = ex;
|
|
40
|
-
console.log("Ingesting prompt ...");
|
|
41
48
|
const data = await task.run({ prompt: pr, ...vars }, conf);
|
|
42
49
|
if (data?.error) {
|
|
43
50
|
return { ok: false, data: {}, error: `Error executing task: ${data.error}` };
|
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.13",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"buildrl": "rm -rf dist/* && rollup -c",
|
|
8
8
|
"build": "rm -rf dist/* && tsc",
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@agent-smith/brain": "^0.0.31",
|
|
14
14
|
"@agent-smith/jobs": "^0.0.11",
|
|
15
|
-
"@agent-smith/lmtask": "^0.0.
|
|
16
|
-
"@inquirer/prompts": "^
|
|
17
|
-
"@inquirer/select": "^
|
|
18
|
-
"@vue/reactivity": "^3.5.
|
|
15
|
+
"@agent-smith/lmtask": "^0.0.21",
|
|
16
|
+
"@inquirer/prompts": "^7.0.0",
|
|
17
|
+
"@inquirer/select": "^4.0.0",
|
|
18
|
+
"@vue/reactivity": "^3.5.12",
|
|
19
19
|
"better-sqlite3": "^11.3.0",
|
|
20
20
|
"clipboardy": "^4.0.0",
|
|
21
21
|
"commander": "^12.1.0",
|
|
22
22
|
"draftlog": "^1.0.13",
|
|
23
23
|
"marked-terminal": "^7.1.0",
|
|
24
|
-
"modprompt": "^0.
|
|
24
|
+
"modprompt": "^0.8.1",
|
|
25
25
|
"python-shell": "^5.0.0",
|
|
26
26
|
"yaml": "^2.5.1"
|
|
27
27
|
},
|
|
@@ -33,12 +33,12 @@
|
|
|
33
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.7.
|
|
36
|
+
"@types/node": "^22.7.5",
|
|
37
37
|
"restmix": "^0.5.0",
|
|
38
38
|
"rollup": "^4.24.0",
|
|
39
39
|
"ts-node": "^10.9.2",
|
|
40
40
|
"tslib": "2.7.0",
|
|
41
|
-
"typescript": "^5.6.
|
|
41
|
+
"typescript": "^5.6.3"
|
|
42
42
|
},
|
|
43
43
|
"type": "module",
|
|
44
44
|
"preferGlobal": true,
|