@agent-smith/cli 0.0.31 → 0.0.34

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.
@@ -1,4 +1,4 @@
1
- import { formatMode, inputMode, isChatMode, isDebug, outputMode, runMode } from "../../state/state.js";
1
+ import { formatMode, inputMode, isChatMode, isDebug, isVerbose, outputMode, runMode } from "../../state/state.js";
2
2
  const modes = {
3
3
  "-d": {
4
4
  cmd: async () => {
@@ -9,6 +9,15 @@ const modes = {
9
9
  },
10
10
  description: "use debug mode",
11
11
  },
12
+ "-v": {
13
+ cmd: async () => {
14
+ isVerbose.value = true;
15
+ if (runMode.value == "cli") {
16
+ console.log("Verbose mode is on");
17
+ }
18
+ },
19
+ description: "use verbose mode",
20
+ },
12
21
  "-c": {
13
22
  cmd: async () => {
14
23
  isChatMode.value = true;
@@ -1,2 +1,6 @@
1
+ import { AgentTask } from "@agent-smith/jobs";
2
+ import { FeatureType } from "../../interfaces.js";
3
+ declare function systemAction(path: string): AgentTask<FeatureType>;
4
+ declare function pythonAction(path: string): AgentTask<FeatureType>;
1
5
  declare function executeActionCmd(args?: Array<string>, options?: any, quiet?: boolean): Promise<any>;
2
- export { executeActionCmd };
6
+ export { executeActionCmd, systemAction, pythonAction };
@@ -4,26 +4,29 @@ import { readYmlAction } from "../sys/read_yml_action.js";
4
4
  import { execute } from "../sys/execute.js";
5
5
  import { runPyScript } from "../sys/run_python.js";
6
6
  import { pyShell } from "../../state/state.js";
7
- import { parseInputOptions, processOutput } from "./utils.js";
8
- function _systemAction(path) {
7
+ import { createJsAction, parseInputOptions, processOutput } from "./utils.js";
8
+ function systemAction(path) {
9
9
  const action = useAgentTask({
10
10
  id: "system_action",
11
11
  title: "",
12
12
  run: async (args) => {
13
13
  const actionSpec = readYmlAction(path);
14
+ if (!actionSpec.data?.args) {
15
+ actionSpec.data.args = [];
16
+ }
14
17
  const out = await execute(actionSpec.data.cmd, [...actionSpec.data.args, ...args]);
15
- return { data: out, error: "", ok: true };
18
+ return { data: out.trim(), error: "", ok: true };
16
19
  }
17
20
  });
18
21
  return action;
19
22
  }
20
- function _pythonAction(path) {
23
+ function pythonAction(path) {
21
24
  const action = useAgentTask({
22
25
  id: "python_action",
23
26
  title: "",
24
27
  run: async (args) => {
25
28
  const out = await runPyScript(pyShell, "python3", path, args);
26
- return { data: out[0], error: "", ok: true };
29
+ return { data: out.join("\n"), error: "", ok: true };
27
30
  }
28
31
  });
29
32
  return action;
@@ -40,11 +43,15 @@ async function executeActionCmd(args = [], options = {}, quiet = false) {
40
43
  const { action } = await import(path);
41
44
  act = action;
42
45
  break;
46
+ case "mjs":
47
+ const mjsa = await import(path);
48
+ act = createJsAction(mjsa.action);
49
+ break;
43
50
  case "yml":
44
- act = _systemAction(path);
51
+ act = systemAction(path);
45
52
  break;
46
53
  case "py":
47
- act = _pythonAction(path);
54
+ act = pythonAction(path);
48
55
  break;
49
56
  default:
50
57
  throw new Error(`Action ext ${ext} not implemented`);
@@ -60,4 +67,4 @@ async function executeActionCmd(args = [], options = {}, quiet = false) {
60
67
  await processOutput(res);
61
68
  return { ok: true, data: res.data, error: "" };
62
69
  }
63
- export { executeActionCmd };
70
+ export { executeActionCmd, systemAction, pythonAction };
@@ -3,10 +3,14 @@ import { default as fs } from "fs";
3
3
  import { useAgentJob } from "@agent-smith/jobs";
4
4
  import { brain, marked, taskBuilder } from '../../agent.js';
5
5
  import { getFeatureSpec } from '../../state/features.js';
6
- import { formatMode, isDebug } from '../../state/state.js';
7
- import { initTaskConf, initTaskVars, readTask } from './utils.js';
6
+ import { formatMode, isDebug, isVerbose } from '../../state/state.js';
7
+ import { createJsAction, initTaskConf, initTaskParams, initTaskVars, parseInputOptions, readTask } from './utils.js';
8
+ import { pythonAction, systemAction } from './execute_action.js';
8
9
  async function executeJobCmd(name, args = [], options = {}) {
9
10
  const { job, found } = await _dispatchReadJob(name);
11
+ if (isDebug.value || isVerbose.value) {
12
+ console.log("Running job", name, Object.keys(job.tasks).length, "tasks");
13
+ }
10
14
  if (!found) {
11
15
  console.log(`Job ${name} not found`);
12
16
  return { error: `Job ${name} not found` };
@@ -16,8 +20,10 @@ async function executeJobCmd(name, args = [], options = {}) {
16
20
  let params = {};
17
21
  brain.backendsForModelsInfo();
18
22
  let i = 0;
23
+ const finalTaskIndex = Object.keys(job.tasks).length - 1;
19
24
  for (const [name, task] of Object.entries(job.tasks)) {
20
25
  if (task.type == "task") {
26
+ const chain = task.properties?.chain;
21
27
  const { found, path } = getFeatureSpec(name, "task");
22
28
  if (!found) {
23
29
  return { ok: false, data: {}, error: `Task ${name} not found` };
@@ -27,11 +33,51 @@ async function executeJobCmd(name, args = [], options = {}) {
27
33
  throw new Error(`Task ${name}, ${path} not found`);
28
34
  }
29
35
  const taskSpec = taskBuilder.readFromYaml(tres.ymlTask);
30
- let { conf, vars } = initTaskVars(args, taskSpec?.inferParams ? taskSpec.inferParams : {});
36
+ if (params.data?.history?.length > 0) {
37
+ const taskShots = taskSpec?.shots ?? [];
38
+ taskSpec.shots = [...taskShots, ...params.data.history];
39
+ }
40
+ let conf = {};
41
+ let vars = {};
42
+ if (i == 0) {
43
+ const vs = initTaskVars(args, taskSpec?.inferParams ? taskSpec.inferParams : {});
44
+ conf = vs.conf;
45
+ vars = vs.vars;
46
+ const _pr = await parseInputOptions(options);
47
+ if (_pr) {
48
+ vars.prompt = _pr;
49
+ }
50
+ }
51
+ else {
52
+ if (!params?.prompt) {
53
+ if (params?.text) {
54
+ params.prompt = params.text;
55
+ }
56
+ else {
57
+ throw new Error(`No prompt provided for task ${name}.\Params: ${params}`);
58
+ }
59
+ }
60
+ const vs = initTaskParams(params, taskSpec?.inferParams ? taskSpec.inferParams : {});
61
+ conf = vs.conf;
62
+ vars = vs.vars;
63
+ }
64
+ const nextParams = {};
65
+ for (const [k, v] of Object.entries(vars)) {
66
+ if (taskSpec.variables?.required?.includes(k) || taskSpec.variables?.optional?.includes(k) || k == "prompt") {
67
+ continue;
68
+ }
69
+ ;
70
+ nextParams[k] = v;
71
+ delete vars[k];
72
+ }
31
73
  conf = initTaskConf(conf, taskSpec);
32
74
  if (isDebug.value) {
33
75
  console.log("Task conf:", conf);
34
76
  console.log("Task vars:", vars);
77
+ console.log("Next params:", nextParams);
78
+ }
79
+ if (isVerbose.value || isDebug.value) {
80
+ conf.verbose = true;
35
81
  }
36
82
  const ex = brain.getOrCreateExpertForModel(conf.model.name, conf.model.template);
37
83
  if (!ex) {
@@ -43,29 +89,76 @@ async function executeJobCmd(name, args = [], options = {}) {
43
89
  });
44
90
  conf["expert"] = ex;
45
91
  try {
46
- if (isDebug) {
47
- console.log("Running", name);
92
+ if (isDebug.value || isVerbose.value) {
93
+ console.log(i + 1, "Running task", name);
94
+ }
95
+ try {
96
+ const invars = { ...params, ...vars };
97
+ try {
98
+ res = await job.runTask(name, invars, conf);
99
+ }
100
+ catch (e) {
101
+ throw new Error(`Error running task ${name}: ${e}`);
102
+ }
103
+ if (chain) {
104
+ const turn = {
105
+ user: vars["prompt"],
106
+ assistant: res.text
107
+ };
108
+ if (res.data?.history) {
109
+ res.data.history.push(turn);
110
+ }
111
+ else {
112
+ res.data.history = [turn];
113
+ }
114
+ }
115
+ else {
116
+ if (res.data?.history) {
117
+ res.data.history = [];
118
+ }
119
+ }
120
+ }
121
+ catch (e) {
122
+ throw new Error(`Error running job task ${e}`);
123
+ }
124
+ if (res?.error) {
125
+ return { ok: false, data: "", conf: conf, error: `Error executing job task ${name}: ${res.error}` };
48
126
  }
49
- res = await job.runTask(name, { ...params, ...vars }, conf);
50
127
  if ("text" in res) {
51
128
  if (formatMode.value == "markdown") {
52
129
  console.log("\n\n------------------\n");
53
130
  console.log(marked.parse(res.text).trim());
54
131
  }
55
132
  }
56
- params = res;
133
+ params = { ...res, ...nextParams };
57
134
  }
58
135
  catch (err) {
59
- return { error: `Error executing (${task.type}) task ${name}: ${err}` };
136
+ return { error: `Error executing job task ${name}: ${err}` };
60
137
  }
61
138
  }
62
139
  else {
63
140
  try {
64
- if (i == 0) {
65
- res = await job.runTask(name, args, options);
141
+ const _p = i == 0 ? args : params;
142
+ if (isDebug.value) {
143
+ console.log(i + 1, "Running action", name, _p);
144
+ }
145
+ else if (isVerbose.value) {
146
+ console.log(i + 1, "Running action", name);
147
+ }
148
+ try {
149
+ res = await job.runTask(name, _p, options);
150
+ }
151
+ catch (e) {
152
+ throw new Error(`Error executing job action ${e}`);
153
+ }
154
+ if (!res.ok) {
155
+ return { ok: false, data: "", conf: {}, error: `Error executing action ${name}: ${res?.error}` };
156
+ }
157
+ if (i == finalTaskIndex) {
158
+ console.log(res.data);
66
159
  }
67
160
  else {
68
- res = await job.runTask(name, params, options);
161
+ params = res.data;
69
162
  }
70
163
  params = res.data;
71
164
  }
@@ -108,14 +201,32 @@ async function _createJobFromSpec(spec) {
108
201
  const tasks = {};
109
202
  for (const t of spec.tasks) {
110
203
  if (t.type == "action") {
111
- const { found, path } = getFeatureSpec(t.name, "action");
204
+ const { found, path, ext } = getFeatureSpec(t.name, "action");
112
205
  if (!found) {
113
206
  return { found: false, job: {} };
114
207
  }
115
- const { action } = await import(path);
116
- const at = action;
117
- at.type = "action";
118
- tasks[t.name] = at;
208
+ if (ext == "js") {
209
+ const { action } = await import(path);
210
+ const at = action;
211
+ at.type = "action";
212
+ tasks[t.name] = at;
213
+ }
214
+ else if (ext == "mjs") {
215
+ const mjsa = await import(path);
216
+ const act = createJsAction(mjsa.action);
217
+ act.type = "action";
218
+ tasks[t.name] = act;
219
+ }
220
+ else if (ext == "yml") {
221
+ const _t = systemAction(path);
222
+ _t.type = "action";
223
+ tasks[t.name] = _t;
224
+ }
225
+ else if (ext == "py") {
226
+ const _t = pythonAction(path);
227
+ _t.type = "action";
228
+ tasks[t.name] = _t;
229
+ }
119
230
  }
120
231
  else {
121
232
  const { found, path } = getFeatureSpec(t.name, "task");
@@ -126,8 +237,10 @@ async function _createJobFromSpec(spec) {
126
237
  if (!res.found) {
127
238
  throw new Error(`Task ${t.name}, ${path} not found`);
128
239
  }
129
- const at = taskBuilder.fromYaml(res.ymlTask);
130
- at.type = "task";
240
+ const at = taskBuilder.fromYaml(res.ymlTask, "task");
241
+ if (t?.chain) {
242
+ at.properties = { "chain": true };
243
+ }
131
244
  tasks[t.name] = at;
132
245
  }
133
246
  }
@@ -1,2 +1,2 @@
1
- declare function executeTaskCmd(args?: Array<string>, options?: any): Promise<any>;
1
+ declare function executeTaskCmd(args?: Array<string> | Record<string, any>, options?: any): Promise<any>;
2
2
  export { executeTaskCmd };
@@ -1,24 +1,43 @@
1
1
  import { brain, initAgent, taskBuilder } from "../../agent.js";
2
2
  import { getFeatureSpec } from "../../state/features.js";
3
3
  import { isChatMode, isDebug } from "../../state/state.js";
4
- import { initTaskConf, initTaskVars, parseInputOptions, readTask } from "./utils.js";
4
+ import { initTaskConf, initTaskParams, initTaskVars, parseInputOptions, readTask } from "./utils.js";
5
5
  async function executeTaskCmd(args = [], options = {}) {
6
6
  await initAgent();
7
7
  if (isDebug.value) {
8
8
  console.log("Task args:", args);
9
9
  console.log("Task options:", options);
10
10
  }
11
- const name = args.shift();
12
- const params = args.filter((x) => x.length > 0);
13
- let pr = await parseInputOptions(options);
14
- if (!pr) {
15
- const p = params.shift();
16
- if (p) {
17
- pr = p;
11
+ const isJob = !Array.isArray(args);
12
+ let name;
13
+ let pr;
14
+ if (!isJob) {
15
+ name = args.shift();
16
+ const _pr = await parseInputOptions(options);
17
+ if (!_pr) {
18
+ const p = args.shift();
19
+ if (p) {
20
+ pr = p;
21
+ }
22
+ else {
23
+ throw new Error("Please provide a prompt");
24
+ }
25
+ }
26
+ else {
27
+ pr = _pr;
18
28
  }
19
29
  }
20
- if (!pr) {
21
- throw new Error("Please provide a prompt");
30
+ else {
31
+ if (!args.name) {
32
+ throw new Error("Provide a task name param");
33
+ }
34
+ if (!args.prompt) {
35
+ throw new Error("Provide a task prompt param");
36
+ }
37
+ name = args.name;
38
+ delete args.name;
39
+ pr = args.prompt;
40
+ delete args.prompt;
22
41
  }
23
42
  const { found, path } = getFeatureSpec(name, "task");
24
43
  if (!found) {
@@ -30,7 +49,18 @@ async function executeTaskCmd(args = [], options = {}) {
30
49
  }
31
50
  const taskSpec = taskBuilder.readFromYaml(res.ymlTask);
32
51
  const task = taskBuilder.fromYaml(res.ymlTask);
33
- let { conf, vars } = initTaskVars(args, taskSpec?.inferParams ? taskSpec.inferParams : {});
52
+ let conf = {};
53
+ let vars = {};
54
+ if (!isJob) {
55
+ const tv = initTaskVars(args, taskSpec?.inferParams ? taskSpec.inferParams : {});
56
+ conf = tv.conf;
57
+ vars = tv.vars;
58
+ }
59
+ else {
60
+ const tv = initTaskParams(args, taskSpec?.inferParams ? taskSpec.inferParams : {});
61
+ conf = tv.conf;
62
+ vars = tv.vars;
63
+ }
34
64
  conf = initTaskConf(conf, taskSpec);
35
65
  if (isDebug.value) {
36
66
  console.log("Task conf:", conf);
@@ -57,7 +87,7 @@ async function executeTaskCmd(args = [], options = {}) {
57
87
  }
58
88
  const data = await task.run({ prompt: pr, ...vars }, conf);
59
89
  if (data?.error) {
60
- return { ok: false, data: "", conf: conf, error: `Error executing task: ${data.error}` };
90
+ return { ok: false, data: "", conf: conf, error: `Error executing task: ${name} ${data.error}` };
61
91
  }
62
92
  conf.prompt = pr;
63
93
  if (isChatMode.value) {
@@ -1,4 +1,6 @@
1
- import { LmTask } from "@agent-smith/lmtask/dist/interfaces.js";
1
+ import { AgentTask } from "@agent-smith/jobs/dist/jobsinterfaces.js";
2
+ import { LmTask } from "@agent-smith/lmtask";
3
+ import { FeatureType } from "../../interfaces.js";
2
4
  declare function setOptions(args: Array<string> | undefined, options: Record<string, any>): Promise<Array<string>>;
3
5
  declare function readPromptFile(): string;
4
6
  declare function processOutput(res: any): Promise<void>;
@@ -8,9 +10,14 @@ declare function readTask(taskpath: string): {
8
10
  };
9
11
  declare function readTasksDir(dir: string): Array<string>;
10
12
  declare function initTaskConf(conf: Record<string, any>, taskSpec: LmTask): Record<string, any>;
13
+ declare function initTaskParams(params: Record<string, any>, inferParams: Record<string, any>): {
14
+ conf: Record<string, any>;
15
+ vars: Record<string, any>;
16
+ };
11
17
  declare function initTaskVars(args: Array<any>, inferParams: Record<string, any>): {
12
18
  conf: Record<string, any>;
13
19
  vars: Record<string, any>;
14
20
  };
15
21
  declare function parseInputOptions(options: any): Promise<string | null>;
16
- export { readPromptFile, processOutput, setOptions, readTask, readTasksDir, initTaskVars, initTaskConf, parseInputOptions, };
22
+ declare function createJsAction(action: CallableFunction): AgentTask<FeatureType>;
23
+ export { createJsAction, initTaskConf, initTaskParams, initTaskVars, parseInputOptions, processOutput, readPromptFile, readTask, readTasksDir, setOptions };
@@ -1,10 +1,10 @@
1
+ import { useAgentTask } from "@agent-smith/jobs";
2
+ import { useTemplateForModel } from "@agent-smith/tfm";
1
3
  import { default as fs } from "fs";
2
4
  import { default as path } from "path";
3
- import { outputMode, promptfile } from "../../state/state.js";
4
- import { inputMode } from "../../state/state.js";
5
- import { readClipboard, writeToClipboard } from "../sys/clipboard.js";
5
+ import { inputMode, outputMode, promptfile } from "../../state/state.js";
6
6
  import { modes } from "../clicmds/modes.js";
7
- import { useTemplateForModel } from "@agent-smith/tfm";
7
+ import { readClipboard, writeToClipboard } from "../sys/clipboard.js";
8
8
  const tfm = useTemplateForModel();
9
9
  async function setOptions(args = [], options) {
10
10
  for (const k of Object.keys(options)) {
@@ -44,6 +44,7 @@ async function processOutput(res) {
44
44
  let hasOutput = false;
45
45
  if (res?.data) {
46
46
  data = res.data;
47
+ 0;
47
48
  hasOutput = true;
48
49
  }
49
50
  if (res?.text) {
@@ -58,6 +59,9 @@ async function processOutput(res) {
58
59
  data = res;
59
60
  }
60
61
  if (outputMode.value == "clipboard") {
62
+ if (typeof data == "object") {
63
+ data = JSON.stringify(data);
64
+ }
61
65
  await writeToClipboard(data);
62
66
  }
63
67
  }
@@ -122,6 +126,18 @@ function initTaskConf(conf, taskSpec) {
122
126
  }
123
127
  return _conf;
124
128
  }
129
+ function initTaskParams(params, inferParams) {
130
+ const conf = { inferParams: inferParams };
131
+ if (!params?.prompt) {
132
+ throw new Error(`Error initializing task variable: provide a prompt`);
133
+ }
134
+ if (params?.images) {
135
+ conf.inferParams.images = params.images;
136
+ delete params.images;
137
+ }
138
+ const res = { conf: conf, vars: params };
139
+ return res;
140
+ }
125
141
  function initTaskVars(args, inferParams) {
126
142
  const conf = { inferParams: inferParams };
127
143
  const vars = {};
@@ -130,27 +146,29 @@ function initTaskVars(args, inferParams) {
130
146
  const t = a.split("=");
131
147
  const k = t[0];
132
148
  const v = t[1];
133
- if (k == "m") {
134
- if (v.includes("/")) {
135
- const _s = v.split("/");
136
- conf.model = _s[0];
137
- conf.template = _s[1];
138
- }
139
- else {
140
- conf.model = v;
141
- }
142
- }
143
- else if (k == "ip") {
144
- v.split(",").forEach((p) => {
145
- const s = p.split(":");
146
- conf["inferParams"][s[0]] = parseFloat(s[1]);
147
- });
148
- }
149
- else if (k == "s") {
150
- conf.size = v;
151
- }
152
- else {
153
- vars[k] = v;
149
+ switch (k) {
150
+ case "m":
151
+ if (v.includes("/")) {
152
+ const _s = v.split("/");
153
+ conf.model = _s[0];
154
+ conf.template = _s[1];
155
+ }
156
+ else {
157
+ conf.model = v;
158
+ }
159
+ break;
160
+ case "ip":
161
+ v.split(",").forEach((p) => {
162
+ const s = p.split(":");
163
+ conf["inferParams"][s[0]] = parseFloat(s[1]);
164
+ });
165
+ break;
166
+ case "s":
167
+ conf.size = v;
168
+ break;
169
+ default:
170
+ vars[k] = v;
171
+ break;
154
172
  }
155
173
  }
156
174
  });
@@ -166,4 +184,15 @@ async function parseInputOptions(options) {
166
184
  }
167
185
  return out;
168
186
  }
169
- export { readPromptFile, processOutput, setOptions, readTask, readTasksDir, initTaskVars, initTaskConf, parseInputOptions, };
187
+ function createJsAction(action) {
188
+ const task = useAgentTask({
189
+ id: "",
190
+ title: "",
191
+ run: async (args) => {
192
+ const res = await action(args);
193
+ return { ok: true, data: res };
194
+ }
195
+ });
196
+ return task;
197
+ }
198
+ export { createJsAction, initTaskConf, initTaskParams, initTaskVars, parseInputOptions, processOutput, readPromptFile, readTask, readTasksDir, setOptions };
@@ -52,7 +52,7 @@ function readFeaturesDir(dir) {
52
52
  }
53
53
  dirpath = path.join(dir, "actions");
54
54
  if (fs.existsSync(dirpath)) {
55
- const data = _readDir(dirpath, ["yml", ".js", ".py"]);
55
+ const data = _readDir(dirpath, ["yml", ".js", "mjs", ".py"]);
56
56
  data.forEach((filename) => {
57
57
  const parts = filename.split(".");
58
58
  const ext = parts.pop();
@@ -28,7 +28,7 @@ const actions = `CREATE TABLE IF NOT EXISTS action (
28
28
  id INTEGER PRIMARY KEY AUTOINCREMENT,
29
29
  name TEXT UNIQUE NOT NULL,
30
30
  path TEXT NOT NULL,
31
- ext TEXT NOT NULL CHECK ( ext IN ('yml', 'js', 'py') )
31
+ ext TEXT NOT NULL CHECK ( ext IN ('yml', 'js', 'py', 'mjs') )
32
32
  );`;
33
33
  const cmds = `CREATE TABLE IF NOT EXISTS cmd (
34
34
  id INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -41,7 +41,7 @@ type OutputMode = "txt" | "clipboard";
41
41
  type RunMode = "cli" | "cmd";
42
42
  type FormatMode = "text" | "markdown";
43
43
  type FeatureType = "task" | "job" | "action" | "cmd";
44
- type ActionExtension = "js" | "py" | "yml";
44
+ type ActionExtension = "js" | "mjs" | "py" | "yml";
45
45
  type TaskExtension = "yml";
46
46
  type JobExtension = "yml";
47
47
  type CmdExtension = "js";
@@ -7,6 +7,7 @@ declare const runMode: import("@vue/reactivity").Ref<RunMode, RunMode>;
7
7
  declare const formatMode: import("@vue/reactivity").Ref<FormatMode, FormatMode>;
8
8
  declare const isChatMode: import("@vue/reactivity").Ref<boolean, boolean>;
9
9
  declare const isDebug: import("@vue/reactivity").Ref<boolean, boolean>;
10
+ declare const isVerbose: import("@vue/reactivity").Ref<boolean, boolean>;
10
11
  declare const promptfile: import("@vue/reactivity").Ref<string, string>;
11
12
  declare const lastCmd: {
12
13
  name: string;
@@ -14,4 +15,4 @@ declare const lastCmd: {
14
15
  };
15
16
  declare function initFeatures(): Promise<void>;
16
17
  declare function initState(): Promise<void>;
17
- export { inputMode, outputMode, isChatMode, runMode, formatMode, lastCmd, isDebug, promptfile, initState, initFeatures, pyShell, };
18
+ export { inputMode, outputMode, isChatMode, runMode, formatMode, lastCmd, isDebug, isVerbose, promptfile, initState, initFeatures, pyShell, };
@@ -12,6 +12,7 @@ const runMode = ref("cmd");
12
12
  const formatMode = ref("text");
13
13
  const isChatMode = ref(false);
14
14
  const isDebug = ref(false);
15
+ const isVerbose = ref(false);
15
16
  const promptfile = ref("");
16
17
  const lastCmd = reactive({
17
18
  name: "",
@@ -37,4 +38,4 @@ async function initState() {
37
38
  initConf();
38
39
  await initFeatures();
39
40
  }
40
- export { inputMode, outputMode, isChatMode, runMode, formatMode, lastCmd, isDebug, promptfile, initState, initFeatures, pyShell, };
41
+ export { inputMode, outputMode, isChatMode, runMode, formatMode, lastCmd, isDebug, isVerbose, promptfile, initState, initFeatures, pyShell, };
package/package.json CHANGED
@@ -2,17 +2,17 @@
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.31",
5
+ "version": "0.0.34",
6
6
  "scripts": {
7
7
  "buildrl": "rm -rf dist/* && rollup -c",
8
- "build": "rm -rf dist/* && tsc",
8
+ "build": "rm -rf dist/* && tsc --noCheck",
9
9
  "cli": "node --loader ts-node/esm bin/index.ts",
10
- "watch": "tsc -p . -w"
10
+ "watch": "tsc --noCheck -p . -w"
11
11
  },
12
12
  "dependencies": {
13
- "@agent-smith/brain": "^0.0.35",
14
- "@agent-smith/jobs": "^0.0.11",
15
- "@agent-smith/lmtask": "^0.0.28",
13
+ "@agent-smith/brain": "^0.0.37",
14
+ "@agent-smith/jobs": "^0.0.12",
15
+ "@agent-smith/lmtask": "^0.0.29",
16
16
  "@agent-smith/tfm": "^0.1.1",
17
17
  "@inquirer/prompts": "^7.3.2",
18
18
  "@inquirer/select": "^4.0.9",
@@ -21,7 +21,7 @@
21
21
  "clipboardy": "^4.0.0",
22
22
  "commander": "^13.1.0",
23
23
  "marked-terminal": "^7.3.0",
24
- "modprompt": "^0.9.5",
24
+ "modprompt": "^0.10.1",
25
25
  "python-shell": "^5.0.0",
26
26
  "yaml": "^2.7.0"
27
27
  },
@@ -33,12 +33,12 @@
33
33
  "@rollup/plugin-typescript": "^12.1.2",
34
34
  "@types/better-sqlite3": "^7.6.12",
35
35
  "@types/marked-terminal": "^6.1.1",
36
- "@types/node": "^22.13.4",
36
+ "@types/node": "^22.13.9",
37
37
  "restmix": "^0.5.0",
38
- "rollup": "^4.34.8",
38
+ "rollup": "^4.34.9",
39
39
  "ts-node": "^10.9.2",
40
40
  "tslib": "2.8.1",
41
- "typescript": "^5.7.3"
41
+ "typescript": "^5.8.2"
42
42
  },
43
43
  "type": "module",
44
44
  "preferGlobal": true,