@agent-smith/cli 0.0.95 → 0.0.97

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/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.95",
5
+ "version": "0.0.97",
6
6
  "scripts": {
7
7
  "buildrl": "rm -rf dist/* && rollup -c",
8
8
  "build": "rm -rf dist/* && tsc",
@@ -10,20 +10,19 @@
10
10
  "watch": "tsc --noCheck -p . -w"
11
11
  },
12
12
  "dependencies": {
13
- "@agent-smith/agent": "^0.1.4",
14
- "@agent-smith/task": "^0.1.6",
13
+ "@agent-smith/agent": "^0.1.6",
14
+ "@agent-smith/task": "^0.1.8",
15
15
  "@agent-smith/tfm": "^0.2.0",
16
- "@inquirer/prompts": "^7.10.1",
16
+ "@inquirer/prompts": "^8.1.0",
17
17
  "@intrinsicai/gbnfgen": "0.12.0",
18
- "@locallm/api": "^0.7.1",
19
- "@modelcontextprotocol/sdk": "^1.24.3",
20
- "@vue/reactivity": "^3.5.25",
18
+ "@locallm/api": "^0.7.3",
19
+ "@modelcontextprotocol/sdk": "^1.25.1",
20
+ "@vue/reactivity": "^3.5.26",
21
21
  "ansi-colors": "^4.1.3",
22
22
  "better-sqlite3": "^12.5.0",
23
- "clipboardy": "^5.0.1",
23
+ "clipboardy": "^5.0.2",
24
24
  "commander": "^14.0.2",
25
25
  "marked-terminal": "^7.3.0",
26
- "modprompt": "^0.12.6",
27
26
  "ora": "^9.0.0",
28
27
  "python-shell": "^5.0.0",
29
28
  "yaml": "^2.8.2"
@@ -32,15 +31,15 @@
32
31
  "@agent-smith/tmem-jobs": "^0.0.4",
33
32
  "@cfworker/json-schema": "^4.1.1",
34
33
  "@commander-js/extra-typings": "^14.0.0",
35
- "@locallm/types": "^0.6.2",
34
+ "@locallm/types": "^0.6.4",
36
35
  "@rollup/plugin-node-resolve": "^16.0.3",
37
36
  "@rollup/plugin-typescript": "^12.3.0",
38
37
  "@types/better-sqlite3": "^7.6.13",
39
38
  "@types/marked-terminal": "^6.1.1",
40
- "@types/node": "^24.10.2",
41
- "openai": "^6.10.0",
39
+ "@types/node": "^25.0.3",
40
+ "openai": "^6.15.0",
42
41
  "restmix": "^0.6.1",
43
- "rollup": "^4.53.3",
42
+ "rollup": "^4.54.0",
44
43
  "ts-node": "^10.9.2",
45
44
  "tslib": "2.8.1",
46
45
  "typescript": "^5.9.3"
@@ -64,4 +63,4 @@
64
63
  "registry": "https://registry.npmjs.org/"
65
64
  },
66
65
  "license": "MIT"
67
- }
66
+ }
@@ -1,3 +0,0 @@
1
- declare function showModelsCmd(args: Array<string>): Promise<void>;
2
- declare function updateAllModels(): void;
3
- export { updateAllModels, showModelsCmd, };
@@ -1,53 +0,0 @@
1
- import path from "path";
2
- import { readModelfiles, readModels } from "../../db/read.js";
3
- import { readModelsFile } from "../sys/read_modelfile.js";
4
- import { updateModels as dbUpdateModels } from "../../db/write.js";
5
- import color from "ansi-colors";
6
- async function showModelsCmd(args) {
7
- let models = readModels();
8
- models.sort((a, b) => a.name.localeCompare(b.name));
9
- let foundModels = new Array();
10
- if (args.length > 0) {
11
- args.forEach((a) => {
12
- const fm = models.filter((m) => m.shortname.includes(a) || m.name.includes(a));
13
- foundModels.push(...fm);
14
- });
15
- }
16
- else {
17
- foundModels = models;
18
- }
19
- foundModels.forEach((model) => {
20
- const ips = model.data.inferParams;
21
- const mt = ips.max_tokens;
22
- delete ips.max_tokens;
23
- const vip = Object.keys(ips).length > 0 ? JSON.stringify(ips) : "";
24
- const m = `- ${color.yellow(model.shortname)}: ${color.bold(model.data.name)} - ${model.data.ctx} ctx / ${mt} max tokens ${vip}`;
25
- console.log(m);
26
- });
27
- }
28
- function updateAllModels() {
29
- const mfs = readModelfiles();
30
- const modelDefs = new Array();
31
- mfs.forEach((mf) => {
32
- const filePath = path.join(mf.path + "/" + mf.name + "." + mf.ext);
33
- const { models, ctx, max_tokens, found } = readModelsFile(filePath);
34
- if (!found) {
35
- throw new Error(`model file ${filePath} not found`);
36
- }
37
- for (const [name, m] of (Object.entries(models))) {
38
- if (!m?.ctx) {
39
- m.ctx = ctx;
40
- }
41
- if (!m?.inferParams) {
42
- m.inferParams = {};
43
- }
44
- if (!m?.inferParams?.max_tokens) {
45
- m.inferParams.max_tokens = max_tokens;
46
- }
47
- const md = { name: m.name, shortname: name, data: m };
48
- modelDefs.push(md);
49
- }
50
- });
51
- dbUpdateModels(modelDefs);
52
- }
53
- export { updateAllModels, showModelsCmd, };
@@ -1,8 +0,0 @@
1
- import { ModelSpec } from "../../interfaces.js";
2
- declare function readModelsFile(fp: string): {
3
- found: boolean;
4
- ctx: number;
5
- max_tokens: number;
6
- models: Record<string, ModelSpec>;
7
- };
8
- export { readModelsFile, };
@@ -1,21 +0,0 @@
1
- import { default as fs } from "fs";
2
- import YAML from 'yaml';
3
- function readModelsFile(fp) {
4
- if (!fs.existsSync(fp)) {
5
- return { models: {}, ctx: 0, max_tokens: 0, found: false };
6
- }
7
- const data = fs.readFileSync(fp, 'utf8');
8
- const m = YAML.parse(data);
9
- if (!m?.ctx) {
10
- throw new Error(`provide a ctx param in models file`);
11
- }
12
- if (!m?.max_tokens) {
13
- throw new Error(`provide a max_tokens param in models file`);
14
- }
15
- const ctx = m.ctx;
16
- const max_tokens = m.max_tokens;
17
- delete m.ctx;
18
- delete m.max_tokens;
19
- return { models: m, ctx: ctx, max_tokens: max_tokens, found: true };
20
- }
21
- export { readModelsFile, };