jinzd-ai-cli 0.1.70 → 0.1.72

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.
@@ -8,7 +8,7 @@ import { platform } from "os";
8
8
  import chalk from "chalk";
9
9
 
10
10
  // src/core/constants.ts
11
- var VERSION = "0.1.70";
11
+ var VERSION = "0.1.72";
12
12
  var APP_NAME = "ai-cli";
13
13
  var CONFIG_DIR_NAME = ".aicli";
14
14
  var CONFIG_FILE_NAME = "config.json";
@@ -16,7 +16,7 @@ import {
16
16
  SUBAGENT_MAX_ROUNDS_LIMIT,
17
17
  VERSION,
18
18
  runTestsTool
19
- } from "./chunk-SSLODHHT.js";
19
+ } from "./chunk-NDNEM5KI.js";
20
20
 
21
21
  // src/config/config-manager.ts
22
22
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  theme,
35
35
  truncateOutput,
36
36
  undoStack
37
- } from "./chunk-ODBHEYM2.js";
37
+ } from "./chunk-Q35734NC.js";
38
38
  import {
39
39
  AGENTIC_BEHAVIOR_GUIDELINE,
40
40
  AUTHOR,
@@ -54,7 +54,7 @@ import {
54
54
  REPO_URL,
55
55
  SKILLS_DIR_NAME,
56
56
  VERSION
57
- } from "./chunk-SSLODHHT.js";
57
+ } from "./chunk-NDNEM5KI.js";
58
58
 
59
59
  // src/index.ts
60
60
  import { program } from "commander";
@@ -1903,7 +1903,7 @@ ${hint}` : "")
1903
1903
  description: "Run project tests and show structured report",
1904
1904
  usage: "/test [command|filter]",
1905
1905
  async execute(args, _ctx) {
1906
- const { executeTests } = await import("./run-tests-KY4GW73Q.js");
1906
+ const { executeTests } = await import("./run-tests-BXOOJF4E.js");
1907
1907
  const argStr = args.join(" ").trim();
1908
1908
  let testArgs = {};
1909
1909
  if (argStr) {
@@ -5290,7 +5290,7 @@ program.command("web").description("Start Web UI server with browser-based chat
5290
5290
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
5291
5291
  process.exit(1);
5292
5292
  }
5293
- const { startWebServer } = await import("./server-W442BPKY.js");
5293
+ const { startWebServer } = await import("./server-H4R2CXBP.js");
5294
5294
  await startWebServer({ port, host: options.host });
5295
5295
  });
5296
5296
  program.command("sessions").description("List recent conversation sessions").action(async () => {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-SSLODHHT.js";
5
+ } from "./chunk-NDNEM5KI.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -21,7 +21,7 @@ import {
21
21
  runHook,
22
22
  spawnAgentContext,
23
23
  truncateOutput
24
- } from "./chunk-ODBHEYM2.js";
24
+ } from "./chunk-Q35734NC.js";
25
25
  import {
26
26
  AGENTIC_BEHAVIOR_GUIDELINE,
27
27
  DEFAULT_MAX_TOKENS,
@@ -32,7 +32,7 @@ import {
32
32
  PLAN_MODE_SYSTEM_ADDON,
33
33
  SKILLS_DIR_NAME,
34
34
  VERSION
35
- } from "./chunk-SSLODHHT.js";
35
+ } from "./chunk-NDNEM5KI.js";
36
36
 
37
37
  // src/web/server.ts
38
38
  import express from "express";
@@ -438,14 +438,11 @@ var SessionHandler = class {
438
438
  }
439
439
  }
440
440
  sendStatus() {
441
- const providerList = this.providers.listAvailable().map((id) => {
442
- const p = this.providers.get(id);
443
- return {
444
- id,
445
- displayName: p?.info.displayName ?? id,
446
- models: (p?.info.models ?? []).map((m) => ({ id: m.id, name: m.name ?? m.id }))
447
- };
448
- });
441
+ const providerList = this.providers.listAvailable().map((p) => ({
442
+ id: p.info.id,
443
+ displayName: p.info.displayName,
444
+ models: p.info.models.map((m) => ({ id: m.id, name: m.name ?? m.id }))
445
+ }));
449
446
  this.send({
450
447
  type: "status",
451
448
  provider: this.currentProvider,
@@ -1004,7 +1001,7 @@ async function startWebServer(options = {}) {
1004
1001
  console.error('\u274C No providers configured. Run "aicli config" first.');
1005
1002
  process.exit(1);
1006
1003
  }
1007
- console.log(` Providers: ${availableProviders.join(", ")}`);
1004
+ console.log(` Providers: ${availableProviders.map((p) => p.info.id).join(", ")}`);
1008
1005
  let mcpManager = null;
1009
1006
  const globalMcpServers = config.get("mcpServers") ?? {};
1010
1007
  const projectMcpServers = loadProjectMcpConfig() ?? {};
@@ -1044,13 +1041,17 @@ async function startWebServer(options = {}) {
1044
1041
  const server = createServer(app);
1045
1042
  const wss = new WebSocketServer({ server });
1046
1043
  const moduleDir = getModuleDir();
1047
- let clientDir = join3(moduleDir, "client");
1044
+ let clientDir = join3(moduleDir, "web", "client");
1045
+ if (!existsSync4(clientDir)) {
1046
+ clientDir = join3(moduleDir, "client");
1047
+ }
1048
1048
  if (!existsSync4(clientDir)) {
1049
1049
  clientDir = join3(moduleDir, "..", "..", "src", "web", "client");
1050
1050
  }
1051
1051
  if (!existsSync4(clientDir)) {
1052
1052
  clientDir = join3(process.cwd(), "src", "web", "client");
1053
1053
  }
1054
+ console.log(` Static files: ${clientDir}`);
1054
1055
  app.use(express.static(clientDir));
1055
1056
  app.get("/api/status", (_req, res) => {
1056
1057
  res.json({
package/package.json CHANGED
@@ -1,100 +1,100 @@
1
- {
2
- "name": "jinzd-ai-cli",
3
- "version": "0.1.70",
4
- "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "bin": {
8
- "aicli": "dist/index.js"
9
- },
10
- "publishConfig": {
11
- "access": "public",
12
- "registry": "https://registry.npmjs.org/"
13
- },
14
- "exports": {
15
- ".": "./dist/index.js",
16
- "./core": "./dist/core/types.js",
17
- "./providers": "./dist/providers/base.js"
18
- },
19
- "scripts": {
20
- "build": "tsup",
21
- "dev": "tsx src/index.ts",
22
- "test": "vitest run",
23
- "test:watch": "vitest",
24
- "lint": "eslint src",
25
- "prepublishOnly": "npm run build",
26
- "patch": "node scripts/patch-sqlite.mjs",
27
- "pack:win": "npm run build && npm run patch && npx pkg dist-cjs/index.cjs --target node22-win-x64 --output release/ai-cli-win.exe --compress GZip --options no-deprecation",
28
- "pack:mac": "npm run build && npm run patch && npx pkg dist-cjs/index.cjs --target node22-macos-arm64 --output release/ai-cli-mac --compress GZip --options no-deprecation",
29
- "pack:mac-x64": "npm run build && npm run patch && npx pkg dist-cjs/index.cjs --target node22-macos-x64 --output release/ai-cli-mac-x64 --compress GZip --options no-deprecation",
30
- "pack:linux": "npm run build && npm run patch && npx pkg dist-cjs/index.cjs --target node22-linux-x64 --output release/ai-cli-linux --compress GZip --options no-deprecation",
31
- "pack:all": "npm run build && npm run patch && npx pkg dist-cjs/index.cjs --target node22-win-x64,node22-macos-arm64,node22-linux-x64 --out-path release --compress GZip --options no-deprecation"
32
- },
33
- "pkg": {
34
- "scripts": "dist-cjs/index.cjs",
35
- "assets": [],
36
- "targets": [
37
- "node22-win-x64",
38
- "node22-macos-arm64",
39
- "node22-linux-x64"
40
- ],
41
- "outputPath": "release",
42
- "options": "no-deprecation"
43
- },
44
- "engines": {
45
- "node": ">=20.0.0"
46
- },
47
- "files": [
48
- "dist",
49
- "README.md",
50
- "CLAUDE.md"
51
- ],
52
- "keywords": [
53
- "ai",
54
- "cli",
55
- "claude",
56
- "gemini",
57
- "deepseek",
58
- "kimi",
59
- "chatbot",
60
- "repl"
61
- ],
62
- "repository": {
63
- "type": "git",
64
- "url": "git+https://github.com/jinzhengdong/ai-cli.git"
65
- },
66
- "bugs": {
67
- "url": "https://github.com/jinzhengdong/ai-cli/issues"
68
- },
69
- "homepage": "https://github.com/jinzhengdong/ai-cli#readme",
70
- "license": "MIT",
71
- "dependencies": {
72
- "@anthropic-ai/sdk": "^0.39.0",
73
- "@google/generative-ai": "^0.24.0",
74
- "@inquirer/prompts": "^7.0.0",
75
- "@types/express": "^5.0.6",
76
- "@types/ws": "^8.18.1",
77
- "boxen": "^8.0.1",
78
- "chalk": "^5.4.1",
79
- "commander": "^13.0.0",
80
- "dotenv": "^16.4.7",
81
- "express": "^5.2.1",
82
- "marked": "^15.0.0",
83
- "marked-terminal": "^7.3.0",
84
- "openai": "^4.77.0",
85
- "ora": "^8.2.0",
86
- "undici": "^7.22.0",
87
- "uuid": "^11.0.5",
88
- "ws": "^8.19.0",
89
- "zod": "^3.24.1"
90
- },
91
- "devDependencies": {
92
- "@types/node": "^22.10.0",
93
- "@types/uuid": "^10.0.0",
94
- "@yao-pkg/pkg": "^6.14.0",
95
- "tsup": "^8.3.5",
96
- "tsx": "^4.19.2",
97
- "typescript": "^5.7.3",
98
- "vitest": "^2.1.8"
99
- }
100
- }
1
+ {
2
+ "name": "jinzd-ai-cli",
3
+ "version": "0.1.72",
4
+ "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "bin": {
8
+ "aicli": "dist/index.js"
9
+ },
10
+ "publishConfig": {
11
+ "access": "public",
12
+ "registry": "https://registry.npmjs.org/"
13
+ },
14
+ "exports": {
15
+ ".": "./dist/index.js",
16
+ "./core": "./dist/core/types.js",
17
+ "./providers": "./dist/providers/base.js"
18
+ },
19
+ "scripts": {
20
+ "build": "tsup",
21
+ "dev": "tsx src/index.ts",
22
+ "test": "vitest run",
23
+ "test:watch": "vitest",
24
+ "lint": "eslint src",
25
+ "prepublishOnly": "npm run build",
26
+ "patch": "node scripts/patch-sqlite.mjs",
27
+ "pack:win": "npm run build && npm run patch && npx pkg dist-cjs/index.cjs --target node22-win-x64 --output release/ai-cli-win.exe --compress GZip --options no-deprecation",
28
+ "pack:mac": "npm run build && npm run patch && npx pkg dist-cjs/index.cjs --target node22-macos-arm64 --output release/ai-cli-mac --compress GZip --options no-deprecation",
29
+ "pack:mac-x64": "npm run build && npm run patch && npx pkg dist-cjs/index.cjs --target node22-macos-x64 --output release/ai-cli-mac-x64 --compress GZip --options no-deprecation",
30
+ "pack:linux": "npm run build && npm run patch && npx pkg dist-cjs/index.cjs --target node22-linux-x64 --output release/ai-cli-linux --compress GZip --options no-deprecation",
31
+ "pack:all": "npm run build && npm run patch && npx pkg dist-cjs/index.cjs --target node22-win-x64,node22-macos-arm64,node22-linux-x64 --out-path release --compress GZip --options no-deprecation"
32
+ },
33
+ "pkg": {
34
+ "scripts": "dist-cjs/index.cjs",
35
+ "assets": [],
36
+ "targets": [
37
+ "node22-win-x64",
38
+ "node22-macos-arm64",
39
+ "node22-linux-x64"
40
+ ],
41
+ "outputPath": "release",
42
+ "options": "no-deprecation"
43
+ },
44
+ "engines": {
45
+ "node": ">=20.0.0"
46
+ },
47
+ "files": [
48
+ "dist",
49
+ "README.md",
50
+ "CLAUDE.md"
51
+ ],
52
+ "keywords": [
53
+ "ai",
54
+ "cli",
55
+ "claude",
56
+ "gemini",
57
+ "deepseek",
58
+ "kimi",
59
+ "chatbot",
60
+ "repl"
61
+ ],
62
+ "repository": {
63
+ "type": "git",
64
+ "url": "git+https://github.com/jinzhengdong/ai-cli.git"
65
+ },
66
+ "bugs": {
67
+ "url": "https://github.com/jinzhengdong/ai-cli/issues"
68
+ },
69
+ "homepage": "https://github.com/jinzhengdong/ai-cli#readme",
70
+ "license": "MIT",
71
+ "dependencies": {
72
+ "@anthropic-ai/sdk": "^0.39.0",
73
+ "@google/generative-ai": "^0.24.0",
74
+ "@inquirer/prompts": "^7.0.0",
75
+ "@types/express": "^5.0.6",
76
+ "@types/ws": "^8.18.1",
77
+ "boxen": "^8.0.1",
78
+ "chalk": "^5.4.1",
79
+ "commander": "^13.0.0",
80
+ "dotenv": "^16.4.7",
81
+ "express": "^5.2.1",
82
+ "marked": "^15.0.0",
83
+ "marked-terminal": "^7.3.0",
84
+ "openai": "^4.77.0",
85
+ "ora": "^8.2.0",
86
+ "undici": "^7.22.0",
87
+ "uuid": "^11.0.5",
88
+ "ws": "^8.19.0",
89
+ "zod": "^3.24.1"
90
+ },
91
+ "devDependencies": {
92
+ "@types/node": "^22.10.0",
93
+ "@types/uuid": "^10.0.0",
94
+ "@yao-pkg/pkg": "^6.14.0",
95
+ "tsup": "^8.3.5",
96
+ "tsx": "^4.19.2",
97
+ "typescript": "^5.7.3",
98
+ "vitest": "^2.1.8"
99
+ }
100
+ }