jinzd-ai-cli 0.4.173 → 0.4.175

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.
Files changed (26) hide show
  1. package/dist/{batch-5YHCBZZA.js → batch-WOGAEPB2.js} +2 -2
  2. package/dist/{chunk-BFFVAX6T.js → chunk-2TG4KU3U.js} +1 -1
  3. package/dist/{chunk-KPUE4DLX.js → chunk-2VQC6W5H.js} +1 -1
  4. package/dist/{chunk-HHWZXSSF.js → chunk-3TDOXLFG.js} +14 -10
  5. package/dist/{chunk-SJICV5XL.js → chunk-7XTNI3XG.js} +1 -1
  6. package/dist/{chunk-ORSIBDWI.js → chunk-BR7HYO64.js} +1 -1
  7. package/dist/{chunk-NXXNLLSG.js → chunk-HIU2SH4V.js} +2 -1
  8. package/dist/{chunk-QM6O4HZS.js → chunk-HOKHM3GP.js} +1 -1
  9. package/dist/{chunk-Z5HW5NA4.js → chunk-IILP3TAQ.js} +1 -1
  10. package/dist/{chunk-TOTEUETI.js → chunk-RIVZNS3K.js} +17 -6
  11. package/dist/{chunk-RUJQ5OUB.js → chunk-VRCBXH2W.js} +1 -1
  12. package/dist/{chunk-T2M4KWEG.js → chunk-XGOYR34D.js} +2 -2
  13. package/dist/{chunk-WC6QXBBW.js → chunk-Z4P4LVQV.js} +1 -1
  14. package/dist/{ci-VYCFNXZ3.js → ci-JJJET7WL.js} +4 -4
  15. package/dist/{constants-HD73ZEMX.js → constants-LUNDQJ4Y.js} +1 -1
  16. package/dist/{doctor-cli-RH6DBULV.js → doctor-cli-WAGOVDOE.js} +6 -6
  17. package/dist/electron-server.js +31 -15
  18. package/dist/{hub-N3WJ3IB5.js → hub-ZH2ZYZP7.js} +2 -2
  19. package/dist/index.js +18 -18
  20. package/dist/{persist-UI6WRBGB.js → persist-A3R2IAYU.js} +2 -2
  21. package/dist/{run-tests-U6GFM77T.js → run-tests-45HF76ZE.js} +2 -2
  22. package/dist/{run-tests-F35PM2HT.js → run-tests-H5ER2NJ4.js} +1 -1
  23. package/dist/{server-D2QROP6U.js → server-5VRJB5DB.js} +11 -11
  24. package/dist/{server-LYANKLNG.js → server-WHDEDJIF.js} +5 -5
  25. package/dist/{task-orchestrator-ANDRKQ25.js → task-orchestrator-VHEPV4NO.js} +5 -5
  26. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigManager
4
- } from "./chunk-Z5HW5NA4.js";
4
+ } from "./chunk-IILP3TAQ.js";
5
5
  import "./chunk-TZQHYZKT.js";
6
- import "./chunk-KPUE4DLX.js";
6
+ import "./chunk-2VQC6W5H.js";
7
7
  import "./chunk-PDX44BCA.js";
8
8
 
9
9
  // src/cli/batch.ts
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  schemaToJsonSchema
4
- } from "./chunk-NXXNLLSG.js";
4
+ } from "./chunk-HIU2SH4V.js";
5
5
  import {
6
6
  AuthError,
7
7
  ProviderError,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.173";
4
+ var VERSION = "0.4.175";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -5,14 +5,14 @@ import {
5
5
  } from "./chunk-HDSKW7Q3.js";
6
6
  import {
7
7
  runTestsTool
8
- } from "./chunk-ORSIBDWI.js";
8
+ } from "./chunk-BR7HYO64.js";
9
9
  import {
10
10
  runTool
11
- } from "./chunk-WC6QXBBW.js";
11
+ } from "./chunk-Z4P4LVQV.js";
12
12
  import {
13
13
  getDangerLevel,
14
14
  isFileWriteTool
15
- } from "./chunk-NXXNLLSG.js";
15
+ } from "./chunk-HIU2SH4V.js";
16
16
  import {
17
17
  EnvLoader,
18
18
  NetworkError,
@@ -25,7 +25,7 @@ import {
25
25
  SUBAGENT_ALLOWED_TOOLS,
26
26
  SUBAGENT_DEFAULT_MAX_ROUNDS,
27
27
  SUBAGENT_MAX_ROUNDS_LIMIT
28
- } from "./chunk-KPUE4DLX.js";
28
+ } from "./chunk-2VQC6W5H.js";
29
29
  import {
30
30
  fileCheckpoints
31
31
  } from "./chunk-4BKXL7SM.js";
@@ -1435,6 +1435,14 @@ var theme = new Proxy(DARK_THEME, {
1435
1435
  });
1436
1436
 
1437
1437
  // src/tools/executor.ts
1438
+ function buildErrorPreview(content) {
1439
+ const meaningful = content.split("\n").filter(
1440
+ (l) => !/^(?:\[[^\]]+\]\s*)?Exit code \d+:$/.test(l.trim()) && !/^Traceback \(most recent call last\):$/.test(l.trim()) && !l.startsWith("[Command failed") && !l.startsWith("\u{1F4A1} ") && l.trim() !== ""
1441
+ );
1442
+ const previewLines = meaningful.length > 2 ? [meaningful[0], meaningful[meaningful.length - 1]] : meaningful.slice(0, 2);
1443
+ const preview = previewLines.map((l) => l.length > 160 ? l.slice(0, 160) + "\u2026" : l).join(" \xB7 ") || content.slice(0, 120);
1444
+ return preview.slice(0, 240);
1445
+ }
1438
1446
  var ToolExecutor = class {
1439
1447
  constructor(registry) {
1440
1448
  this.registry = registry;
@@ -1853,15 +1861,11 @@ var ToolExecutor = class {
1853
1861
  }
1854
1862
  printToolResult(name, content, isError, wasTruncated) {
1855
1863
  if (isError) {
1856
- const lines = content.split("\n");
1857
- const meaningful = lines.filter(
1858
- (l) => !/^Exit code \d+:$/.test(l.trim()) && !l.startsWith("[Command failed") && !l.startsWith("\u{1F4A1} ") && l.trim() !== ""
1859
- );
1860
- const preview = meaningful.slice(0, 2).join(" \xB7 ") || content.slice(0, 120);
1864
+ const preview = buildErrorPreview(content);
1861
1865
  const isSoft = /no such file or directory|not found|no matches|exit 1\s*$|cannot find path/i.test(content);
1862
1866
  const renderFn = isSoft ? theme.warning : theme.error;
1863
1867
  const icon = isSoft ? "\u2139" : "\u26A0";
1864
- console.log(renderFn(`${icon} ${name} error: `) + theme.dim(preview.slice(0, 200)));
1868
+ console.log(renderFn(`${icon} ${name} error: `) + theme.dim(preview));
1865
1869
  } else {
1866
1870
  const lines = content.split("\n");
1867
1871
  const maxLines = name === "run_interactive" ? 40 : 8;
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONFIG_DIR_NAME,
4
4
  VERSION
5
- } from "./chunk-KPUE4DLX.js";
5
+ } from "./chunk-2VQC6W5H.js";
6
6
 
7
7
  // src/diagnostics/crash-log.ts
8
8
  import {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-KPUE4DLX.js";
4
+ } from "./chunk-2VQC6W5H.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -21,7 +21,8 @@ function getDangerLevel(toolName, args) {
21
21
  if (/\btee\b|\bcp\b|\bmv\b|\bln\s+-s/.test(cmd)) return "write";
22
22
  if (/\bchmod\b|\bchown\b/.test(cmd)) return "write";
23
23
  if (/\bSet-Content\b|\bOut-File\b|\bAdd-Content\b|\bCopy-Item\b|\bMove-Item\b|\bSet-ItemProperty\b|\bNew-ItemProperty\b/i.test(cmd)) return "write";
24
- if (/\b(python3?|node|deno|bun|perl|ruby|php)\b[^\n]*?\s-(?:c|e|p|r)\b/i.test(cmd)) return "write";
24
+ if (/\b(python3?|node|deno|bun|perl|ruby|php|bash|sh|zsh|pwsh|powershell)(\.exe)?\b[^\n]*?\s-(?:Command|EncodedCommand|c|e|p|r)\b/i.test(cmd)) return "write";
25
+ if (/\bcmd(\.exe)?\s+\/[ck]\b/i.test(cmd)) return "write";
25
26
  return "safe";
26
27
  }
27
28
  if (toolName === "write_file") return "write";
@@ -6,7 +6,7 @@ import { platform } from "os";
6
6
  import chalk from "chalk";
7
7
 
8
8
  // src/core/constants.ts
9
- var VERSION = "0.4.173";
9
+ var VERSION = "0.4.175";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-KPUE4DLX.js";
11
+ } from "./chunk-2VQC6W5H.js";
12
12
 
13
13
  // src/config/config-manager.ts
14
14
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
@@ -383,6 +383,10 @@ var Session = class _Session {
383
383
  id: this.id,
384
384
  provider: this.provider,
385
385
  model: this.model,
386
+ // 7th audit P1: active-branch 消息数,放在 messages 数组之前,
387
+ // 保证落在文件前 1KB 内 —— readSessionMeta() 只读 header 即可拿到,
388
+ // 不再为数消息把整个 session 文件读进内存。
389
+ messageCount: this.messages.length,
386
390
  created: this.created.toISOString(),
387
391
  updated: this.updated.toISOString(),
388
392
  title: this.title,
@@ -529,6 +533,10 @@ function extractJsonField(header, field) {
529
533
  const m = header.match(re);
530
534
  return m ? m[1] : void 0;
531
535
  }
536
+ function extractJsonNumberField(header, field) {
537
+ const m = header.match(new RegExp(`"${field}"\\s*:\\s*(\\d+)`));
538
+ return m ? Number(m[1]) : void 0;
539
+ }
532
540
  var SessionManager = class {
533
541
  _current = null;
534
542
  historyDir;
@@ -643,12 +651,15 @@ var SessionManager = class {
643
651
  const updated = extractJsonField(header, "updated");
644
652
  const title = extractJsonField(header, "title");
645
653
  if (id && provider && model) {
646
- let messageCount = 0;
647
- try {
648
- const full = readFileSync(filePath, "utf-8");
649
- const matches = full.match(/"role"\s*:/g);
650
- messageCount = matches ? matches.length : 0;
651
- } catch {
654
+ let messageCount = extractJsonNumberField(header, "messageCount");
655
+ if (messageCount === void 0) {
656
+ messageCount = 0;
657
+ try {
658
+ const full = readFileSync(filePath, "utf-8");
659
+ const matches = full.match(/"role"\s*:/g);
660
+ messageCount = matches ? matches.length : 0;
661
+ } catch {
662
+ }
652
663
  }
653
664
  return {
654
665
  id,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  SessionManager
4
- } from "./chunk-TOTEUETI.js";
4
+ } from "./chunk-RIVZNS3K.js";
5
5
 
6
6
  // src/hub/persist.ts
7
7
  import { join } from "path";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  truncateForPersist
4
- } from "./chunk-HHWZXSSF.js";
4
+ } from "./chunk-3TDOXLFG.js";
5
5
  import {
6
6
  APP_NAME,
7
7
  CONFIG_DIR_NAME,
@@ -11,7 +11,7 @@ import {
11
11
  MCP_PROTOCOL_VERSION,
12
12
  MCP_TOOL_PREFIX,
13
13
  VERSION
14
- } from "./chunk-KPUE4DLX.js";
14
+ } from "./chunk-2VQC6W5H.js";
15
15
 
16
16
  // src/mcp/client.ts
17
17
  import { spawn } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CONFIG_DIR_NAME
4
- } from "./chunk-KPUE4DLX.js";
4
+ } from "./chunk-2VQC6W5H.js";
5
5
 
6
6
  // src/diagnostics/tool-stats.ts
7
7
  import { existsSync, readFileSync, writeFileSync, mkdirSync, renameSync } from "fs";
@@ -6,15 +6,15 @@ import {
6
6
  } from "./chunk-HLWUDRBO.js";
7
7
  import {
8
8
  ProviderRegistry
9
- } from "./chunk-BFFVAX6T.js";
10
- import "./chunk-NXXNLLSG.js";
9
+ } from "./chunk-2TG4KU3U.js";
10
+ import "./chunk-HIU2SH4V.js";
11
11
  import {
12
12
  ConfigManager
13
- } from "./chunk-Z5HW5NA4.js";
13
+ } from "./chunk-IILP3TAQ.js";
14
14
  import "./chunk-TZQHYZKT.js";
15
15
  import {
16
16
  VERSION
17
- } from "./chunk-KPUE4DLX.js";
17
+ } from "./chunk-2VQC6W5H.js";
18
18
  import "./chunk-PDX44BCA.js";
19
19
 
20
20
  // src/cli/ci.ts
@@ -36,7 +36,7 @@ import {
36
36
  TEST_TIMEOUT,
37
37
  VERSION,
38
38
  buildUserIdentityPrompt
39
- } from "./chunk-KPUE4DLX.js";
39
+ } from "./chunk-2VQC6W5H.js";
40
40
  import "./chunk-PDX44BCA.js";
41
41
  export {
42
42
  AGENTIC_BEHAVIOR_GUIDELINE,
@@ -2,26 +2,26 @@
2
2
  import {
3
3
  getConfigDirUsage,
4
4
  listRecentCrashes
5
- } from "./chunk-SJICV5XL.js";
5
+ } from "./chunk-7XTNI3XG.js";
6
6
  import {
7
7
  ProviderRegistry
8
- } from "./chunk-BFFVAX6T.js";
8
+ } from "./chunk-2TG4KU3U.js";
9
9
  import {
10
10
  getStatsSnapshot,
11
11
  getTopFailingTools,
12
12
  getTopUsedTools,
13
13
  resetStats
14
- } from "./chunk-WC6QXBBW.js";
15
- import "./chunk-NXXNLLSG.js";
14
+ } from "./chunk-Z4P4LVQV.js";
15
+ import "./chunk-HIU2SH4V.js";
16
16
  import {
17
17
  ConfigManager
18
- } from "./chunk-Z5HW5NA4.js";
18
+ } from "./chunk-IILP3TAQ.js";
19
19
  import "./chunk-TZQHYZKT.js";
20
20
  import {
21
21
  DEV_STATE_FILE_NAME,
22
22
  MEMORY_FILE_NAME,
23
23
  VERSION
24
- } from "./chunk-KPUE4DLX.js";
24
+ } from "./chunk-2VQC6W5H.js";
25
25
  import "./chunk-PDX44BCA.js";
26
26
 
27
27
  // src/diagnostics/doctor-cli.ts
@@ -36,7 +36,7 @@ import {
36
36
  VERSION,
37
37
  buildUserIdentityPrompt,
38
38
  runTestsTool
39
- } from "./chunk-QM6O4HZS.js";
39
+ } from "./chunk-HOKHM3GP.js";
40
40
  import {
41
41
  hasSemanticIndex,
42
42
  semanticSearch
@@ -639,7 +639,8 @@ function getDangerLevel(toolName, args) {
639
639
  if (/\btee\b|\bcp\b|\bmv\b|\bln\s+-s/.test(cmd)) return "write";
640
640
  if (/\bchmod\b|\bchown\b/.test(cmd)) return "write";
641
641
  if (/\bSet-Content\b|\bOut-File\b|\bAdd-Content\b|\bCopy-Item\b|\bMove-Item\b|\bSet-ItemProperty\b|\bNew-ItemProperty\b/i.test(cmd)) return "write";
642
- if (/\b(python3?|node|deno|bun|perl|ruby|php)\b[^\n]*?\s-(?:c|e|p|r)\b/i.test(cmd)) return "write";
642
+ if (/\b(python3?|node|deno|bun|perl|ruby|php|bash|sh|zsh|pwsh|powershell)(\.exe)?\b[^\n]*?\s-(?:Command|EncodedCommand|c|e|p|r)\b/i.test(cmd)) return "write";
643
+ if (/\bcmd(\.exe)?\s+\/[ck]\b/i.test(cmd)) return "write";
643
644
  return "safe";
644
645
  }
645
646
  if (toolName === "write_file") return "write";
@@ -3581,6 +3582,10 @@ var Session = class _Session {
3581
3582
  id: this.id,
3582
3583
  provider: this.provider,
3583
3584
  model: this.model,
3585
+ // 7th audit P1: active-branch 消息数,放在 messages 数组之前,
3586
+ // 保证落在文件前 1KB 内 —— readSessionMeta() 只读 header 即可拿到,
3587
+ // 不再为数消息把整个 session 文件读进内存。
3588
+ messageCount: this.messages.length,
3584
3589
  created: this.created.toISOString(),
3585
3590
  updated: this.updated.toISOString(),
3586
3591
  title: this.title,
@@ -3727,6 +3732,10 @@ function extractJsonField(header, field) {
3727
3732
  const m = header.match(re);
3728
3733
  return m ? m[1] : void 0;
3729
3734
  }
3735
+ function extractJsonNumberField(header, field) {
3736
+ const m = header.match(new RegExp(`"${field}"\\s*:\\s*(\\d+)`));
3737
+ return m ? Number(m[1]) : void 0;
3738
+ }
3730
3739
  var SessionManager = class {
3731
3740
  _current = null;
3732
3741
  historyDir;
@@ -3841,12 +3850,15 @@ var SessionManager = class {
3841
3850
  const updated = extractJsonField(header, "updated");
3842
3851
  const title = extractJsonField(header, "title");
3843
3852
  if (id && provider && model) {
3844
- let messageCount = 0;
3845
- try {
3846
- const full = readFileSync2(filePath, "utf-8");
3847
- const matches = full.match(/"role"\s*:/g);
3848
- messageCount = matches ? matches.length : 0;
3849
- } catch {
3853
+ let messageCount = extractJsonNumberField(header, "messageCount");
3854
+ if (messageCount === void 0) {
3855
+ messageCount = 0;
3856
+ try {
3857
+ const full = readFileSync2(filePath, "utf-8");
3858
+ const matches = full.match(/"role"\s*:/g);
3859
+ messageCount = matches ? matches.length : 0;
3860
+ } catch {
3861
+ }
3850
3862
  }
3851
3863
  return {
3852
3864
  id,
@@ -5391,6 +5403,14 @@ function flush() {
5391
5403
  }
5392
5404
 
5393
5405
  // src/tools/executor.ts
5406
+ function buildErrorPreview(content) {
5407
+ const meaningful = content.split("\n").filter(
5408
+ (l) => !/^(?:\[[^\]]+\]\s*)?Exit code \d+:$/.test(l.trim()) && !/^Traceback \(most recent call last\):$/.test(l.trim()) && !l.startsWith("[Command failed") && !l.startsWith("\u{1F4A1} ") && l.trim() !== ""
5409
+ );
5410
+ const previewLines = meaningful.length > 2 ? [meaningful[0], meaningful[meaningful.length - 1]] : meaningful.slice(0, 2);
5411
+ const preview = previewLines.map((l) => l.length > 160 ? l.slice(0, 160) + "\u2026" : l).join(" \xB7 ") || content.slice(0, 120);
5412
+ return preview.slice(0, 240);
5413
+ }
5394
5414
  var ToolExecutor = class {
5395
5415
  constructor(registry) {
5396
5416
  this.registry = registry;
@@ -5809,15 +5829,11 @@ var ToolExecutor = class {
5809
5829
  }
5810
5830
  printToolResult(name, content, isError, wasTruncated) {
5811
5831
  if (isError) {
5812
- const lines = content.split("\n");
5813
- const meaningful = lines.filter(
5814
- (l) => !/^Exit code \d+:$/.test(l.trim()) && !l.startsWith("[Command failed") && !l.startsWith("\u{1F4A1} ") && l.trim() !== ""
5815
- );
5816
- const preview = meaningful.slice(0, 2).join(" \xB7 ") || content.slice(0, 120);
5832
+ const preview = buildErrorPreview(content);
5817
5833
  const isSoft = /no such file or directory|not found|no matches|exit 1\s*$|cannot find path/i.test(content);
5818
5834
  const renderFn = isSoft ? theme.warning : theme.error;
5819
5835
  const icon = isSoft ? "\u2139" : "\u26A0";
5820
- console.log(renderFn(`${icon} ${name} error: `) + theme.dim(preview.slice(0, 200)));
5836
+ console.log(renderFn(`${icon} ${name} error: `) + theme.dim(preview));
5821
5837
  } else {
5822
5838
  const lines = content.split("\n");
5823
5839
  const maxLines = name === "run_interactive" ? 40 : 8;
@@ -13590,7 +13606,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
13590
13606
  case "test": {
13591
13607
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
13592
13608
  try {
13593
- const { executeTests } = await import("./run-tests-F35PM2HT.js");
13609
+ const { executeTests } = await import("./run-tests-H5ER2NJ4.js");
13594
13610
  const argStr = args.join(" ").trim();
13595
13611
  let testArgs = {};
13596
13612
  if (argStr) {
@@ -140,7 +140,7 @@ ${content}`);
140
140
  const state = await runDiscussion(config, providers, options.topic);
141
141
  if (options.save !== false && state.messages.length > 0) {
142
142
  try {
143
- const { persistDiscussion } = await import("./persist-UI6WRBGB.js");
143
+ const { persistDiscussion } = await import("./persist-A3R2IAYU.js");
144
144
  const { path } = await persistDiscussion(state, configManager, defaultProvider, defaultModel);
145
145
  console.log(chalk.dim(`
146
146
  \u{1F4BE} Saved to history \u2014 open it in the Web UI and hit \u{1F3AC} to replay.
@@ -155,7 +155,7 @@ ${content}`);
155
155
  }
156
156
  }
157
157
  async function runTaskMode(config, providers, configManager, topic) {
158
- const { TaskOrchestrator } = await import("./task-orchestrator-ANDRKQ25.js");
158
+ const { TaskOrchestrator } = await import("./task-orchestrator-VHEPV4NO.js");
159
159
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
160
160
  let interrupted = false;
161
161
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  saveDevState,
19
19
  sessionHasMeaningfulContent,
20
20
  setupProxy
21
- } from "./chunk-T2M4KWEG.js";
21
+ } from "./chunk-XGOYR34D.js";
22
22
  import {
23
23
  ToolExecutor,
24
24
  ToolRegistry,
@@ -37,19 +37,19 @@ import {
37
37
  spawnAgentContext,
38
38
  theme,
39
39
  undoStack
40
- } from "./chunk-HHWZXSSF.js";
40
+ } from "./chunk-3TDOXLFG.js";
41
41
  import "./chunk-HDSKW7Q3.js";
42
42
  import "./chunk-ZWVIDFGY.js";
43
- import "./chunk-ORSIBDWI.js";
43
+ import "./chunk-BR7HYO64.js";
44
44
  import {
45
45
  SessionManager,
46
46
  getContentText
47
- } from "./chunk-TOTEUETI.js";
47
+ } from "./chunk-RIVZNS3K.js";
48
48
  import {
49
49
  getConfigDirUsage,
50
50
  listRecentCrashes,
51
51
  writeCrashLog
52
- } from "./chunk-SJICV5XL.js";
52
+ } from "./chunk-7XTNI3XG.js";
53
53
  import {
54
54
  CONTENT_ONLY_STREAM_REMINDER,
55
55
  HALLUCINATION_CORRECTION_MESSAGE,
@@ -68,17 +68,17 @@ import {
68
68
  looksLikeDocumentBody,
69
69
  stripPseudoToolCalls,
70
70
  stripToolCallReminder
71
- } from "./chunk-BFFVAX6T.js";
71
+ } from "./chunk-2TG4KU3U.js";
72
72
  import {
73
73
  getStatsSnapshot,
74
74
  getTopFailingTools,
75
75
  getTopUsedTools,
76
76
  installFlushOnExit
77
- } from "./chunk-WC6QXBBW.js";
78
- import "./chunk-NXXNLLSG.js";
77
+ } from "./chunk-Z4P4LVQV.js";
78
+ import "./chunk-HIU2SH4V.js";
79
79
  import {
80
80
  ConfigManager
81
- } from "./chunk-Z5HW5NA4.js";
81
+ } from "./chunk-IILP3TAQ.js";
82
82
  import {
83
83
  AuthError,
84
84
  ProviderError,
@@ -105,7 +105,7 @@ import {
105
105
  SKILLS_DIR_NAME,
106
106
  VERSION,
107
107
  buildUserIdentityPrompt
108
- } from "./chunk-KPUE4DLX.js";
108
+ } from "./chunk-2VQC6W5H.js";
109
109
  import {
110
110
  formatGitContextForPrompt,
111
111
  getGitContext,
@@ -1786,7 +1786,7 @@ No tools match "${filter}".
1786
1786
  const { join: join6 } = await import("path");
1787
1787
  const { existsSync: existsSync6 } = await import("fs");
1788
1788
  const { getGitRoot: getGitRoot2 } = await import("./git-context-7KIP4X2V.js");
1789
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-HD73ZEMX.js");
1789
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-LUNDQJ4Y.js");
1790
1790
  const { approveProject, hashMcpFile } = await import("./project-trust-IFM7FXEV.js");
1791
1791
  const cwd = process.cwd();
1792
1792
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -2847,7 +2847,7 @@ ${hint}` : "")
2847
2847
  usage: "/test [command|filter]",
2848
2848
  async execute(args, ctx) {
2849
2849
  try {
2850
- const { executeTests } = await import("./run-tests-U6GFM77T.js");
2850
+ const { executeTests } = await import("./run-tests-45HF76ZE.js");
2851
2851
  const argStr = args.join(" ").trim();
2852
2852
  let testArgs = {};
2853
2853
  if (argStr) {
@@ -7633,7 +7633,7 @@ program.command("web").description("Start Web UI server with browser-based chat
7633
7633
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
7634
7634
  process.exit(1);
7635
7635
  }
7636
- const { startWebServer } = await import("./server-D2QROP6U.js");
7636
+ const { startWebServer } = await import("./server-5VRJB5DB.js");
7637
7637
  await startWebServer({ port, host: options.host });
7638
7638
  });
7639
7639
  program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | logout-all <name> | migrate <name>)").action(async (action, username) => {
@@ -7800,12 +7800,12 @@ program.command("sessions").description("List recent conversation sessions").opt
7800
7800
  console.log(footer + "\n");
7801
7801
  });
7802
7802
  program.command("doctor").description("Health check: API keys, config, MCP, recent crashes, tool usage, disk usage").option("--json", "Output as JSON (for scripting)").option("--reset-stats", "Reset accumulated tool usage statistics").action(async (options) => {
7803
- const { runDoctorCli } = await import("./doctor-cli-RH6DBULV.js");
7803
+ const { runDoctorCli } = await import("./doctor-cli-WAGOVDOE.js");
7804
7804
  await runDoctorCli({ json: !!options.json, resetStats: !!options.resetStats });
7805
7805
  });
7806
7806
  program.command("batch <action> [arg] [arg2]").description("Anthropic Message Batches: submit | list | status <id> | results <id> [out] | cancel <id>").option("--dry-run", "Parse and validate input without submitting (submit only)").action(async (action, arg, arg2, options) => {
7807
7807
  try {
7808
- const batch = await import("./batch-5YHCBZZA.js");
7808
+ const batch = await import("./batch-WOGAEPB2.js");
7809
7809
  switch (action) {
7810
7810
  case "submit":
7811
7811
  if (!arg) {
@@ -7848,7 +7848,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
7848
7848
  }
7849
7849
  });
7850
7850
  program.command("mcp-serve").description("Start an MCP server over STDIO, exposing aicli's built-in tools to Claude Desktop / Cursor / other MCP clients").option("--allow-destructive", "Allow bash / run_interactive / task_create (always destructive in MCP mode)").option("--allow-outside-cwd", "Allow tool path arguments to escape the sandbox root \u2014 disabled by default").option("--tools <list>", "Comma-separated whitelist of tools to expose (default: all eligible tools)").option("--cwd <path>", "Working directory AND sandbox root (default: current directory)").action(async (options) => {
7851
- const { startMcpServer } = await import("./server-LYANKLNG.js");
7851
+ const { startMcpServer } = await import("./server-WHDEDJIF.js");
7852
7852
  await startMcpServer({
7853
7853
  allowDestructive: !!options.allowDestructive,
7854
7854
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -7857,7 +7857,7 @@ program.command("mcp-serve").description("Start an MCP server over STDIO, exposi
7857
7857
  });
7858
7858
  });
7859
7859
  program.command("ci").description("Headless PR review (code + security) \u2014 reads git/gh diff, optionally posts to PR. Designed for GitHub Actions.").option("--pr <num>", "PR number; diff fetched via `gh pr diff <num>`", (v) => parseInt(v, 10)).option("--base <ref>", "Base ref for `git diff <ref>...HEAD` (ignored when --pr set)").option("--post", "Post review as a PR comment (requires gh CLI + GH_TOKEN, needs --pr)").option("--no-update", "Always create a new comment instead of updating the previous aicli review").option("--skip-code", "Skip the code review section").option("--skip-security", "Skip the security review section").option("--detailed", "Use the detailed code-review prompt").option("--max-diff <n>", "Max diff chars sent to the model (default 30000)", (v) => parseInt(v, 10)).option("--provider <id>", "Override provider (default: config.defaultProvider)").option("--model <id>", "Override model").option("--dry-run", "Print result to stdout instead of posting (overrides --post)").action(async (options) => {
7860
- const { runCi } = await import("./ci-VYCFNXZ3.js");
7860
+ const { runCi } = await import("./ci-JJJET7WL.js");
7861
7861
  const result = await runCi({
7862
7862
  pr: options.pr,
7863
7863
  base: options.base,
@@ -8002,7 +8002,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
8002
8002
  }),
8003
8003
  config.get("customProviders")
8004
8004
  );
8005
- const { startHub } = await import("./hub-N3WJ3IB5.js");
8005
+ const { startHub } = await import("./hub-ZH2ZYZP7.js");
8006
8006
  await startHub(
8007
8007
  {
8008
8008
  topic: topic ?? "",
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  discussionToMessages,
4
4
  persistDiscussion
5
- } from "./chunk-RUJQ5OUB.js";
6
- import "./chunk-TOTEUETI.js";
5
+ } from "./chunk-VRCBXH2W.js";
6
+ import "./chunk-RIVZNS3K.js";
7
7
  import "./chunk-SLSWPBK3.js";
8
8
  import "./chunk-PDX44BCA.js";
9
9
  export {
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-ORSIBDWI.js";
6
- import "./chunk-KPUE4DLX.js";
5
+ } from "./chunk-BR7HYO64.js";
6
+ import "./chunk-2VQC6W5H.js";
7
7
  import "./chunk-PDX44BCA.js";
8
8
  export {
9
9
  executeTests,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-QM6O4HZS.js";
4
+ } from "./chunk-HOKHM3GP.js";
5
5
  import "./chunk-3RG5ZIWI.js";
6
6
  export {
7
7
  executeTests,
@@ -7,7 +7,7 @@ import {
7
7
  import "./chunk-NZ4X6GUC.js";
8
8
  import {
9
9
  persistDiscussion
10
- } from "./chunk-RUJQ5OUB.js";
10
+ } from "./chunk-VRCBXH2W.js";
11
11
  import {
12
12
  AuthManager,
13
13
  TOKEN_EXPIRY_MS
@@ -21,7 +21,7 @@ import {
21
21
  loadDevState,
22
22
  persistToolRound,
23
23
  setupProxy
24
- } from "./chunk-T2M4KWEG.js";
24
+ } from "./chunk-XGOYR34D.js";
25
25
  import {
26
26
  ToolExecutor,
27
27
  ToolRegistry,
@@ -39,14 +39,14 @@ import {
39
39
  spawnAgentContext,
40
40
  truncateOutput,
41
41
  undoStack
42
- } from "./chunk-HHWZXSSF.js";
42
+ } from "./chunk-3TDOXLFG.js";
43
43
  import "./chunk-HDSKW7Q3.js";
44
44
  import "./chunk-ZWVIDFGY.js";
45
- import "./chunk-ORSIBDWI.js";
45
+ import "./chunk-BR7HYO64.js";
46
46
  import {
47
47
  SessionManager,
48
48
  getContentText
49
- } from "./chunk-TOTEUETI.js";
49
+ } from "./chunk-RIVZNS3K.js";
50
50
  import {
51
51
  CONTENT_ONLY_STREAM_REMINDER,
52
52
  HALLUCINATION_CORRECTION_MESSAGE,
@@ -61,16 +61,16 @@ import {
61
61
  looksLikeDocumentBody,
62
62
  stripPseudoToolCalls,
63
63
  stripToolCallReminder
64
- } from "./chunk-BFFVAX6T.js";
64
+ } from "./chunk-2TG4KU3U.js";
65
65
  import {
66
66
  runTool
67
- } from "./chunk-WC6QXBBW.js";
67
+ } from "./chunk-Z4P4LVQV.js";
68
68
  import {
69
69
  getDangerLevel
70
- } from "./chunk-NXXNLLSG.js";
70
+ } from "./chunk-HIU2SH4V.js";
71
71
  import {
72
72
  ConfigManager
73
- } from "./chunk-Z5HW5NA4.js";
73
+ } from "./chunk-IILP3TAQ.js";
74
74
  import "./chunk-TZQHYZKT.js";
75
75
  import {
76
76
  AGENTIC_BEHAVIOR_GUIDELINE,
@@ -90,7 +90,7 @@ import {
90
90
  SKILLS_DIR_NAME,
91
91
  VERSION,
92
92
  buildUserIdentityPrompt
93
- } from "./chunk-KPUE4DLX.js";
93
+ } from "./chunk-2VQC6W5H.js";
94
94
  import {
95
95
  formatGitContextForPrompt,
96
96
  getGitContext,
@@ -2577,7 +2577,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
2577
2577
  case "test": {
2578
2578
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
2579
2579
  try {
2580
- const { executeTests } = await import("./run-tests-U6GFM77T.js");
2580
+ const { executeTests } = await import("./run-tests-45HF76ZE.js");
2581
2581
  const argStr = args.join(" ").trim();
2582
2582
  let testArgs = {};
2583
2583
  if (argStr) {
@@ -1,21 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-HHWZXSSF.js";
4
+ } from "./chunk-3TDOXLFG.js";
5
5
  import "./chunk-HDSKW7Q3.js";
6
6
  import "./chunk-ZWVIDFGY.js";
7
- import "./chunk-ORSIBDWI.js";
7
+ import "./chunk-BR7HYO64.js";
8
8
  import {
9
9
  runTool
10
- } from "./chunk-WC6QXBBW.js";
10
+ } from "./chunk-Z4P4LVQV.js";
11
11
  import {
12
12
  getDangerLevel,
13
13
  schemaToJsonSchema
14
- } from "./chunk-NXXNLLSG.js";
14
+ } from "./chunk-HIU2SH4V.js";
15
15
  import "./chunk-TZQHYZKT.js";
16
16
  import {
17
17
  VERSION
18
- } from "./chunk-KPUE4DLX.js";
18
+ } from "./chunk-2VQC6W5H.js";
19
19
  import "./chunk-4BKXL7SM.js";
20
20
  import "./chunk-MM3F43H6.js";
21
21
  import "./chunk-KHYD3WXE.js";
@@ -3,20 +3,20 @@ import {
3
3
  ToolRegistry,
4
4
  googleSearchContext,
5
5
  truncateOutput
6
- } from "./chunk-HHWZXSSF.js";
6
+ } from "./chunk-3TDOXLFG.js";
7
7
  import "./chunk-HDSKW7Q3.js";
8
8
  import "./chunk-ZWVIDFGY.js";
9
- import "./chunk-ORSIBDWI.js";
9
+ import "./chunk-BR7HYO64.js";
10
10
  import {
11
11
  runTool
12
- } from "./chunk-WC6QXBBW.js";
12
+ } from "./chunk-Z4P4LVQV.js";
13
13
  import {
14
14
  getDangerLevel
15
- } from "./chunk-NXXNLLSG.js";
15
+ } from "./chunk-HIU2SH4V.js";
16
16
  import "./chunk-TZQHYZKT.js";
17
17
  import {
18
18
  SUBAGENT_ALLOWED_TOOLS
19
- } from "./chunk-KPUE4DLX.js";
19
+ } from "./chunk-2VQC6W5H.js";
20
20
  import "./chunk-4BKXL7SM.js";
21
21
  import "./chunk-MM3F43H6.js";
22
22
  import "./chunk-KHYD3WXE.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.173",
3
+ "version": "0.4.175",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",