@agent-smith/cli 0.0.81 → 0.0.82

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.
@@ -28,6 +28,7 @@ async function executeTask(name, payload, options, quiet) {
28
28
  }
29
29
  if (options?.debug) {
30
30
  console.log("Task model:", model);
31
+ console.log("Task vars:", vars);
31
32
  }
32
33
  let c = false;
33
34
  const useTemplates = agent.lm.providerType !== "openai";
@@ -144,7 +145,6 @@ async function executeTask(name, payload, options, quiet) {
144
145
  conf.inferParams.stream = true;
145
146
  const tconf = {
146
147
  model: model,
147
- debug: options?.debug ?? false,
148
148
  onToolCall: onToolCall,
149
149
  onToolCallEnd: onToolCallEnd,
150
150
  ...conf,
@@ -26,18 +26,24 @@ async function readTask(name, payload, options, agent) {
26
26
  }
27
27
  const taskSpec = taskFileSpec;
28
28
  let vars = {};
29
- if (taskSpec.variables?.optional) {
29
+ if (taskSpec?.variables?.optional) {
30
30
  for (const k of Object.keys(taskSpec.variables.optional)) {
31
31
  if (k in options) {
32
32
  vars[k] = options[k];
33
33
  }
34
+ else if (k in payload) {
35
+ vars[k] = payload[k];
36
+ }
34
37
  }
35
38
  }
36
- if (taskSpec.variables?.required) {
39
+ if (taskSpec?.variables?.required) {
37
40
  for (const k of Object.keys(taskSpec.variables.required)) {
38
41
  if (k in options) {
39
42
  vars[k] = options[k];
40
43
  }
44
+ else if (k in payload) {
45
+ vars[k] = payload[k];
46
+ }
41
47
  }
42
48
  }
43
49
  const mcpServers = new Array();
@@ -26,7 +26,7 @@ async function executeWorkflow(name, params, options) {
26
26
  case "task":
27
27
  try {
28
28
  const tr = await executeTask(name, taskRes, options, true);
29
- taskRes = tr;
29
+ taskRes = { ...tr, ...params };
30
30
  }
31
31
  catch (e) {
32
32
  throw new Error(`workflow task ${i + 1}: ${e}`);
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.81",
5
+ "version": "0.0.82",
6
6
  "scripts": {
7
7
  "buildrl": "rm -rf dist/* && rollup -c",
8
8
  "build": "rm -rf dist/* && tsc",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@agent-smith/agent": "^0.0.7",
14
- "@agent-smith/task": "^0.0.5",
14
+ "@agent-smith/task": "^0.0.6",
15
15
  "@agent-smith/tfm": "^0.1.2",
16
16
  "@inquirer/prompts": "^7.9.0",
17
17
  "@intrinsicai/gbnfgen": "0.12.0",
@@ -36,7 +36,7 @@
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": "^24.9.1",
39
+ "@types/node": "^24.9.2",
40
40
  "restmix": "^0.5.0",
41
41
  "rollup": "^4.52.5",
42
42
  "ts-node": "^10.9.2",