@agent-smith/cli 0.0.15 → 0.0.16
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
|
@@ -71,14 +71,12 @@ function initAliases() {
|
|
|
71
71
|
_cmds[alias.name] = {
|
|
72
72
|
cmd: (args = [], options = {}, quiet = false) => executeActionCmd([alias.name, ...args], options, quiet),
|
|
73
73
|
description: "action: " + alias.name,
|
|
74
|
-
args: "arguments: \n-args: other arguments if any for the action"
|
|
75
74
|
};
|
|
76
75
|
break;
|
|
77
76
|
case "job":
|
|
78
77
|
_cmds[alias.name] = {
|
|
79
78
|
cmd: (args = [], options) => _executeJobCmd([alias.name, ...args], options),
|
|
80
79
|
description: "job: " + alias.name,
|
|
81
|
-
args: "arguments: \n-args: other arguments if any for the job"
|
|
82
80
|
};
|
|
83
81
|
}
|
|
84
82
|
});
|
|
@@ -145,7 +143,7 @@ async function _executeJobCmd(args = [], options) {
|
|
|
145
143
|
return;
|
|
146
144
|
}
|
|
147
145
|
const name = args.shift();
|
|
148
|
-
const res = await executeJobCmd(name, args);
|
|
146
|
+
const res = await executeJobCmd(name, args, options);
|
|
149
147
|
return res;
|
|
150
148
|
}
|
|
151
149
|
async function _readTaskCmd(args = [], options) {
|
|
@@ -49,7 +49,7 @@ async function executeActionCmd(args = [], options = {}, quiet = false) {
|
|
|
49
49
|
throw new Error(`Action ext ${ext} not implemented`);
|
|
50
50
|
break;
|
|
51
51
|
}
|
|
52
|
-
const res = await act.run(args);
|
|
52
|
+
const res = await act.run(args, options);
|
|
53
53
|
if (!quiet) {
|
|
54
54
|
console.log(res.data);
|
|
55
55
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare function executeJobCmd(name: string, args?: Array<any
|
|
1
|
+
declare function executeJobCmd(name: string, args?: Array<any>, options?: any): Promise<Record<string, any>>;
|
|
2
2
|
declare function readJob(name: string): Promise<{
|
|
3
3
|
found: boolean;
|
|
4
4
|
data: Record<string, any>;
|
|
@@ -5,7 +5,7 @@ import { brain, marked, taskBuilder } from '../../agent.js';
|
|
|
5
5
|
import { getFeatureSpec } from '../../state/features.js';
|
|
6
6
|
import { formatMode } from '../../state/state.js';
|
|
7
7
|
import { initTaskVars, readTask } from './utils.js';
|
|
8
|
-
async function executeJobCmd(name, args = []) {
|
|
8
|
+
async function executeJobCmd(name, args = [], options = {}) {
|
|
9
9
|
const { job, found } = await _dispatchReadJob(name);
|
|
10
10
|
if (!found) {
|
|
11
11
|
console.log(`Job ${name} not found`);
|
|
@@ -64,10 +64,10 @@ async function executeJobCmd(name, args = []) {
|
|
|
64
64
|
else {
|
|
65
65
|
try {
|
|
66
66
|
if (i == 0) {
|
|
67
|
-
res = await job.runTask(name, args);
|
|
67
|
+
res = await job.runTask(name, args, options);
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
70
|
-
res = await job.runTask(name, params);
|
|
70
|
+
res = await job.runTask(name, params, options);
|
|
71
71
|
}
|
|
72
72
|
params = res.data;
|
|
73
73
|
}
|
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.16",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"buildrl": "rm -rf dist/* && rollup -c",
|
|
8
8
|
"build": "rm -rf dist/* && tsc",
|