@agent-smith/cli 0.0.85 → 0.0.86

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,5 +1,4 @@
1
1
  import { Agent } from "@agent-smith/agent";
2
- import { useTemplateForModel } from "@agent-smith/tfm";
3
2
  import { input } from "@inquirer/prompts";
4
3
  import { compile, serializeGrammar } from "@intrinsicai/gbnfgen";
5
4
  import { default as color, default as colors } from "ansi-colors";
@@ -15,7 +14,6 @@ import { parseCommandArgs } from "../options_parsers.js";
15
14
  import { runtimeDataError, runtimeWarning } from "../user_msgs.js";
16
15
  import { formatStats, processOutput, readPromptFile } from "../utils.js";
17
16
  import { readTask } from "./read.js";
18
- const tfm = useTemplateForModel();
19
17
  async function executeTask(name, payload, options, quiet) {
20
18
  const agent = new Agent(backend.value);
21
19
  if (options?.debug) {
package/dist/main.d.ts CHANGED
@@ -3,7 +3,7 @@ import { executeTask } from "./cmd/lib/tasks/cmd.js";
3
3
  import { executeAction } from "./cmd/lib/actions/cmd.js";
4
4
  import { executeWorkflow } from "./cmd/lib/workflows/cmd.js";
5
5
  import { writeToClipboard } from "./cmd/sys/clipboard.js";
6
- import { initState, pluginDataDir } from "./state/state.js";
6
+ import { initState, pluginDataDir, init } from "./state/state.js";
7
7
  import { usePerfTimer } from "./utils/perf.js";
8
8
  import { parseCommandArgs } from "./cmd/lib/options_parsers.js";
9
9
  import { extractToolDoc } from "./cmd/lib/tools.js";
@@ -13,4 +13,4 @@ import { displayOptions, ioOptions, inferenceOptions, allOptions } from "./cmd/o
13
13
  import { McpClient } from "./cmd/lib/mcp.js";
14
14
  import { readTask } from "./cmd/lib/tasks/read.js";
15
15
  import { FeatureType } from "./interfaces.js";
16
- export { execute, run, executeTask, executeAction, executeWorkflow, writeToClipboard, initState, pluginDataDir, usePerfTimer, parseCommandArgs, extractToolDoc, openTaskSpec, extractBetweenTags, splitThinking, displayOptions, ioOptions, inferenceOptions, allOptions, McpClient, readTask, FeatureType, };
16
+ export { execute, run, executeTask, executeAction, executeWorkflow, writeToClipboard, initState, init, pluginDataDir, usePerfTimer, parseCommandArgs, extractToolDoc, openTaskSpec, extractBetweenTags, splitThinking, displayOptions, ioOptions, inferenceOptions, allOptions, McpClient, readTask, FeatureType, };
package/dist/main.js CHANGED
@@ -3,7 +3,7 @@ import { executeTask } from "./cmd/lib/tasks/cmd.js";
3
3
  import { executeAction } from "./cmd/lib/actions/cmd.js";
4
4
  import { executeWorkflow } from "./cmd/lib/workflows/cmd.js";
5
5
  import { writeToClipboard } from "./cmd/sys/clipboard.js";
6
- import { initState, pluginDataDir } from "./state/state.js";
6
+ import { initState, pluginDataDir, init } from "./state/state.js";
7
7
  import { usePerfTimer } from "./utils/perf.js";
8
8
  import { parseCommandArgs } from "./cmd/lib/options_parsers.js";
9
9
  import { extractToolDoc } from "./cmd/lib/tools.js";
@@ -12,4 +12,4 @@ import { extractBetweenTags, splitThinking } from "./utils/text.js";
12
12
  import { displayOptions, ioOptions, inferenceOptions, allOptions } from "./cmd/options.js";
13
13
  import { McpClient } from "./cmd/lib/mcp.js";
14
14
  import { readTask } from "./cmd/lib/tasks/read.js";
15
- export { execute, run, executeTask, executeAction, executeWorkflow, writeToClipboard, initState, pluginDataDir, usePerfTimer, parseCommandArgs, extractToolDoc, openTaskSpec, extractBetweenTags, splitThinking, displayOptions, ioOptions, inferenceOptions, allOptions, McpClient, readTask, };
15
+ export { execute, run, executeTask, executeAction, executeWorkflow, writeToClipboard, initState, init, pluginDataDir, usePerfTimer, parseCommandArgs, extractToolDoc, openTaskSpec, extractBetweenTags, splitThinking, displayOptions, ioOptions, inferenceOptions, allOptions, McpClient, readTask, };
@@ -14,6 +14,7 @@ declare const lastCmd: {
14
14
  args: Array<string>;
15
15
  };
16
16
  declare function initFilepaths(): void;
17
+ declare function init(): Promise<void>;
17
18
  declare function initState(): Promise<void>;
18
19
  declare function pluginDataDir(pluginName: string): string;
19
- export { inputMode, outputMode, isChatMode, runMode, formatMode, lastCmd, promptfilePath, dataDirPath, isStateReady, pluginDataDir, initState, initFilepaths, pyShell, };
20
+ export { inputMode, outputMode, isChatMode, runMode, formatMode, lastCmd, promptfilePath, dataDirPath, isStateReady, pluginDataDir, initState, initFilepaths, init, pyShell, };
@@ -3,6 +3,7 @@ import { initDb } from "../db/db.js";
3
3
  import { readFilePaths } from "../db/read.js";
4
4
  import path from "path";
5
5
  import { createDirectoryIfNotExists } from "../cmd/sys/dirs.js";
6
+ import { initBackends } from "./backends.js";
6
7
  let pyShell;
7
8
  const inputMode = ref("manual");
8
9
  const outputMode = ref("txt");
@@ -28,6 +29,10 @@ function initFilepaths() {
28
29
  }
29
30
  }
30
31
  }
32
+ async function init() {
33
+ await initState();
34
+ await initBackends();
35
+ }
31
36
  async function initState() {
32
37
  if (isStateReady.value) {
33
38
  return;
@@ -48,4 +53,4 @@ function pluginDataDir(pluginName) {
48
53
  createDirectoryIfNotExists(pluginDatapath);
49
54
  return pluginDatapath;
50
55
  }
51
- export { inputMode, outputMode, isChatMode, runMode, formatMode, lastCmd, promptfilePath, dataDirPath, isStateReady, pluginDataDir, initState, initFilepaths, pyShell, };
56
+ export { inputMode, outputMode, isChatMode, runMode, formatMode, lastCmd, promptfilePath, dataDirPath, isStateReady, pluginDataDir, initState, initFilepaths, init, pyShell, };
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.85",
5
+ "version": "0.0.86",
6
6
  "scripts": {
7
7
  "buildrl": "rm -rf dist/* && rollup -c",
8
8
  "build": "rm -rf dist/* && tsc",