jinzd-ai-cli 0.4.305 → 0.4.306

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 (32) hide show
  1. package/dist/{batch-OX27K4GG.js → batch-JLGWQ7HU.js} +2 -2
  2. package/dist/{chunk-UFK5CTBU.js → chunk-3RDJEYF7.js} +3 -3
  3. package/dist/{chunk-Q4DAKI7I.js → chunk-7SSCSSC6.js} +1 -1
  4. package/dist/{chunk-GOIDKTBE.js → chunk-AYLK4EGA.js} +7 -7
  5. package/dist/{chunk-PA4C452B.js → chunk-JDT6UG6R.js} +3 -1
  6. package/dist/{chunk-AXKERUXH.js → chunk-JFNBJHR6.js} +3 -3
  7. package/dist/{chunk-4DH5LZR5.js → chunk-K5SDDTN7.js} +1 -1
  8. package/dist/{chunk-3ZABGT3S.js → chunk-LAP7TPPK.js} +1 -1
  9. package/dist/{chunk-SZ4226XY.js → chunk-NLB7JZSO.js} +1 -1
  10. package/dist/{chunk-NFLE34QG.js → chunk-OC2XHG5L.js} +1 -1
  11. package/dist/{chunk-NBYSFFCO.js → chunk-T6WQEQI4.js} +3 -1
  12. package/dist/{chunk-IPUTC5EX.js → chunk-VLDB2SVN.js} +25 -15
  13. package/dist/{chunk-I6RATYRF.js → chunk-W6PLV3EY.js} +1 -1
  14. package/dist/{chunk-YPOWDFOV.js → chunk-WZWRA7R2.js} +1 -1
  15. package/dist/{ci-IIMLOXFH.js → ci-6PHEL3C7.js} +4 -4
  16. package/dist/{ci-format-FMBJC3EY.js → ci-format-AZYUP6BL.js} +2 -2
  17. package/dist/{constants-55QQ3RYE.js → constants-AXBD2EEB.js} +3 -1
  18. package/dist/{constants-7NVAPQVR.js → constants-CPNWIUGZ.js} +3 -1
  19. package/dist/{doctor-cli-ZHZ2XOF3.js → doctor-cli-DDHHDMMJ.js} +4 -4
  20. package/dist/electron-server.js +31 -21
  21. package/dist/{hub-MF53NIM2.js → hub-DDYAWLF2.js} +1 -1
  22. package/dist/index.js +18 -18
  23. package/dist/{persistent-memory-NACQW2VB.js → persistent-memory-6XYYOMSC.js} +2 -2
  24. package/dist/{persistent-memory-LCOKUDTM.js → persistent-memory-XZISXRWT.js} +2 -2
  25. package/dist/{pr-NHWE5FW7.js → pr-UY4ZCZNI.js} +4 -4
  26. package/dist/{run-tests-ZG5X25BJ.js → run-tests-BAMLVLO6.js} +2 -2
  27. package/dist/{run-tests-EUPJLDXS.js → run-tests-UEE3OMLS.js} +2 -2
  28. package/dist/{server-PNYRE3AL.js → server-6IC33CJK.js} +5 -5
  29. package/dist/{server-PG7QCH53.js → server-DBHLVQVP.js} +13 -13
  30. package/dist/{task-orchestrator-WAJTCE6D.js → task-orchestrator-RDDETDW2.js} +5 -5
  31. package/dist/{usage-DOES3DOS.js → usage-D473ZVIP.js} +2 -2
  32. package/package.json +1 -1
@@ -4,12 +4,12 @@ import {
4
4
  } from "./chunk-RS7SKYTS.js";
5
5
  import {
6
6
  ConfigManager
7
- } from "./chunk-NFLE34QG.js";
7
+ } from "./chunk-OC2XHG5L.js";
8
8
  import "./chunk-TU3L3PW7.js";
9
9
  import {
10
10
  atomicWriteFileSync
11
11
  } from "./chunk-IW3Q7AE5.js";
12
- import "./chunk-NBYSFFCO.js";
12
+ import "./chunk-T6WQEQI4.js";
13
13
 
14
14
  // src/cli/batch.ts
15
15
  import Anthropic from "@anthropic-ai/sdk";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  evaluateCiGate,
4
4
  normalizeCiThresholds
5
- } from "./chunk-4DH5LZR5.js";
5
+ } from "./chunk-K5SDDTN7.js";
6
6
  import {
7
7
  buildReviewPrompt,
8
8
  buildSecurityReviewPrompt,
@@ -16,10 +16,10 @@ import {
16
16
  } from "./chunk-VXEF2SWG.js";
17
17
  import {
18
18
  ConfigManager
19
- } from "./chunk-NFLE34QG.js";
19
+ } from "./chunk-OC2XHG5L.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-NBYSFFCO.js";
22
+ } from "./chunk-T6WQEQI4.js";
23
23
 
24
24
  // src/cli/ci.ts
25
25
  import { execFileSync } from "child_process";
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  CONFIG_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-NBYSFFCO.js";
11
+ } from "./chunk-T6WQEQI4.js";
12
12
 
13
13
  // src/diagnostics/tool-stats.ts
14
14
  import { mkdirSync } from "fs";
@@ -16,7 +16,7 @@ import {
16
16
  setPreferredAgentName,
17
17
  truncateForPersist,
18
18
  undoStack
19
- } from "./chunk-IPUTC5EX.js";
19
+ } from "./chunk-VLDB2SVN.js";
20
20
  import {
21
21
  buildReviewPrompt,
22
22
  buildSecurityReviewPrompt
@@ -51,7 +51,7 @@ import {
51
51
  touchMemoryReferences,
52
52
  updateMemoryApproval,
53
53
  updateMemoryEntry
54
- } from "./chunk-3ZABGT3S.js";
54
+ } from "./chunk-LAP7TPPK.js";
55
55
  import {
56
56
  theme
57
57
  } from "./chunk-5C76XDDF.js";
@@ -65,7 +65,7 @@ import {
65
65
  import {
66
66
  buildDoctorReport,
67
67
  formatDoctorReport
68
- } from "./chunk-AXKERUXH.js";
68
+ } from "./chunk-JFNBJHR6.js";
69
69
  import {
70
70
  describePlugin,
71
71
  getActivePluginAssets,
@@ -80,7 +80,7 @@ import {
80
80
  trustHook,
81
81
  trustPlugin,
82
82
  untrustHook
83
- } from "./chunk-Q4DAKI7I.js";
83
+ } from "./chunk-7SSCSSC6.js";
84
84
  import {
85
85
  isCleanDocumentBody,
86
86
  stripOuterCodeFence
@@ -109,7 +109,7 @@ import {
109
109
  MCP_TOOL_PREFIX,
110
110
  REPO_URL,
111
111
  VERSION
112
- } from "./chunk-NBYSFFCO.js";
112
+ } from "./chunk-T6WQEQI4.js";
113
113
 
114
114
  // src/skills/manager.ts
115
115
  import { existsSync, readdirSync, mkdirSync, statSync } from "fs";
@@ -2426,7 +2426,7 @@ No tools match "${filter}".
2426
2426
  const { join: join6 } = await import("path");
2427
2427
  const { existsSync: existsSync6 } = await import("fs");
2428
2428
  const { getGitRoot } = await import("./git-context-EXOEHQSF.js");
2429
- const { MCP_PROJECT_CONFIG_NAME } = await import("./constants-7NVAPQVR.js");
2429
+ const { MCP_PROJECT_CONFIG_NAME } = await import("./constants-CPNWIUGZ.js");
2430
2430
  const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
2431
2431
  const cwd = process.cwd();
2432
2432
  const projectRoot = getGitRoot(cwd) ?? cwd;
@@ -3534,7 +3534,7 @@ function createReviewCommands() {
3534
3534
  usage: "/test [command|filter]",
3535
3535
  async execute(args, ctx) {
3536
3536
  try {
3537
- const { executeTests } = await import("./run-tests-ZG5X25BJ.js");
3537
+ const { executeTests } = await import("./run-tests-BAMLVLO6.js");
3538
3538
  const argStr = args.join(" ").trim();
3539
3539
  let testArgs = {};
3540
3540
  if (argStr) {
@@ -1,5 +1,5 @@
1
1
  // src/core/constants.ts
2
- var VERSION = "0.4.305";
2
+ var VERSION = "0.4.306";
3
3
  var APP_NAME = "ai-cli";
4
4
  var CONFIG_DIR_NAME = ".aicli";
5
5
  var CONFIG_FILE_NAME = "config.json";
@@ -18,6 +18,7 @@ var DEFAULT_TEMPERATURE = 0.7;
18
18
  var MAX_HISTORY_DAYS = 30;
19
19
  var DEFAULT_MAX_TOOL_ROUNDS = 200;
20
20
  var DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP = 5e5;
21
+ var MAX_GLOB_MATCHES = 30;
21
22
  var MCP_TOOL_PREFIX = "mcp__";
22
23
  var MCP_PROJECT_CONFIG_NAME = ".mcp.json";
23
24
  var MCP_CONNECT_TIMEOUT = 3e4;
@@ -152,6 +153,7 @@ export {
152
153
  MAX_HISTORY_DAYS,
153
154
  DEFAULT_MAX_TOOL_ROUNDS,
154
155
  DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
156
+ MAX_GLOB_MATCHES,
155
157
  MCP_TOOL_PREFIX,
156
158
  MCP_PROJECT_CONFIG_NAME,
157
159
  MCP_CONNECT_TIMEOUT,
@@ -8,13 +8,13 @@ import {
8
8
  listHooks,
9
9
  listInstalledPlugins,
10
10
  resetStats
11
- } from "./chunk-Q4DAKI7I.js";
11
+ } from "./chunk-7SSCSSC6.js";
12
12
  import {
13
13
  ProviderRegistry
14
14
  } from "./chunk-VXEF2SWG.js";
15
15
  import {
16
16
  ConfigManager
17
- } from "./chunk-NFLE34QG.js";
17
+ } from "./chunk-OC2XHG5L.js";
18
18
  import {
19
19
  getGitRoot
20
20
  } from "./chunk-HOSJZMQS.js";
@@ -26,7 +26,7 @@ import {
26
26
  MCP_PROJECT_CONFIG_NAME,
27
27
  MEMORY_FILE_NAME,
28
28
  VERSION
29
- } from "./chunk-NBYSFFCO.js";
29
+ } from "./chunk-T6WQEQI4.js";
30
30
 
31
31
  // src/diagnostics/doctor-report.ts
32
32
  import { existsSync as existsSync3, statSync as statSync2 } from "fs";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-NBYSFFCO.js";
4
+ } from "./chunk-T6WQEQI4.js";
5
5
 
6
6
  // src/cli/ci-format.ts
7
7
  var DEFAULT_CI_THRESHOLDS = {
@@ -13,7 +13,7 @@ import {
13
13
  MEMORY_FILE_NAME,
14
14
  MEMORY_MAX_CHARS,
15
15
  MEMORY_STORE_FILE_NAME
16
- } from "./chunk-NBYSFFCO.js";
16
+ } from "./chunk-T6WQEQI4.js";
17
17
 
18
18
  // src/memory/persistent-memory.ts
19
19
  import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TEST_TIMEOUT
3
- } from "./chunk-PA4C452B.js";
3
+ } from "./chunk-JDT6UG6R.js";
4
4
 
5
5
  // src/tools/builtin/run-tests.ts
6
6
  import { execSync, spawnSync } from "child_process";
@@ -11,7 +11,7 @@ import {
11
11
  CONFIG_FILE_NAME,
12
12
  HISTORY_DIR_NAME,
13
13
  PLUGINS_DIR_NAME
14
- } from "./chunk-NBYSFFCO.js";
14
+ } from "./chunk-T6WQEQI4.js";
15
15
 
16
16
  // src/config/config-manager.ts
17
17
  import { readFileSync, existsSync, mkdirSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.305";
4
+ var VERSION = "0.4.306";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -20,6 +20,7 @@ var DEFAULT_TEMPERATURE = 0.7;
20
20
  var MAX_HISTORY_DAYS = 30;
21
21
  var DEFAULT_MAX_TOOL_ROUNDS = 200;
22
22
  var DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP = 5e5;
23
+ var MAX_GLOB_MATCHES = 30;
23
24
  var MCP_TOOL_PREFIX = "mcp__";
24
25
  var MCP_PROJECT_CONFIG_NAME = ".mcp.json";
25
26
  var MCP_CONNECT_TIMEOUT = 3e4;
@@ -154,6 +155,7 @@ export {
154
155
  MAX_HISTORY_DAYS,
155
156
  DEFAULT_MAX_TOOL_ROUNDS,
156
157
  DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
158
+ MAX_GLOB_MATCHES,
157
159
  MCP_TOOL_PREFIX,
158
160
  MCP_PROJECT_CONFIG_NAME,
159
161
  MCP_CONNECT_TIMEOUT,
@@ -11,7 +11,7 @@ import {
11
11
  searchPersistentMemories,
12
12
  touchMemoryReferences,
13
13
  updateMemoryEntry
14
- } from "./chunk-3ZABGT3S.js";
14
+ } from "./chunk-LAP7TPPK.js";
15
15
  import {
16
16
  indexProject
17
17
  } from "./chunk-LF67HWWR.js";
@@ -30,7 +30,7 @@ import {
30
30
  runHook,
31
31
  runLifecycleHooks,
32
32
  runTool
33
- } from "./chunk-Q4DAKI7I.js";
33
+ } from "./chunk-7SSCSSC6.js";
34
34
  import {
35
35
  buildTruncatedArgumentsError,
36
36
  getDangerLevel,
@@ -50,15 +50,16 @@ import {
50
50
  } from "./chunk-4BKXL7SM.js";
51
51
  import {
52
52
  runTestsTool
53
- } from "./chunk-I6RATYRF.js";
53
+ } from "./chunk-W6PLV3EY.js";
54
54
  import {
55
55
  CONFIG_DIR_NAME,
56
56
  DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
57
+ MAX_GLOB_MATCHES,
57
58
  PLAN_MODE_READONLY_TOOLS,
58
59
  SUBAGENT_ALLOWED_TOOLS,
59
60
  SUBAGENT_DEFAULT_MAX_ROUNDS,
60
61
  SUBAGENT_MAX_ROUNDS_LIMIT
61
- } from "./chunk-NBYSFFCO.js";
62
+ } from "./chunk-T6WQEQI4.js";
62
63
 
63
64
  // src/tools/shell-pool.ts
64
65
  import { spawn as spawn2 } from "child_process";
@@ -1496,7 +1497,7 @@ ${err.message}`;
1496
1497
  if (IMAGE_EXTENSIONS.has(ext)) {
1497
1498
  return `[Image file: ${filePath} (${ext})]
1498
1499
  read_file cannot return image content \u2014 tool results are text-only, so no tool can put an image into your context.
1499
- To have an image looked at, ask the USER to reference it from their input line with @${filePath} (they can use a glob for a batch, e.g. @dir/*.png, up to 20 at a time). A vision-capable model must be active, or the reference is rejected.
1500
+ To have an image looked at, ask the USER to reference it from their input line with @${filePath} (they can use a glob for a batch, e.g. @dir/*.png, up to ${MAX_GLOB_MATCHES} at a time). A vision-capable model must be active, or the reference is rejected.
1500
1501
  Do NOT claim you inspected this image \u2014 you have not seen it.`;
1501
1502
  }
1502
1503
  return `[Binary file: ${filePath} (${ext})]
@@ -2377,7 +2378,7 @@ var RuleBasedActionClassifier = class {
2377
2378
  var defaultActionClassifier = new RuleBasedActionClassifier();
2378
2379
 
2379
2380
  // src/tools/executor.ts
2380
- var PS_ERROR_RECORD_HEAD = /^(?:[\w.\-]+\s:\s)?(?:At line:\d+ char:\s*\d+|所在位置\s+行:\d+\s+字符:\s*\d+)\s*$/;
2381
+ var PS_ERROR_RECORD_HEAD = /^(?:[\w.\-]+\s:\s)?(?:At (?:line:\d+|\S+:\d+) char:\s*\d+|所在位置\s+(?:行|\S+):\d+\s+字符:\s*\d+)\s*$/;
2381
2382
  var ERROR_SIGNATURE = new RegExp(
2382
2383
  [
2383
2384
  // Python / .NET / Java: "OSError: …", "pkg.SomeException: …"
@@ -2393,11 +2394,22 @@ var ERROR_SIGNATURE = new RegExp(
2393
2394
  "i"
2394
2395
  );
2395
2396
  var PY_TRACEBACK_FRAME = /^\s*File ".*", line \d+/;
2397
+ function isPreviewNoise(line) {
2398
+ const t = line.trim();
2399
+ return /^(?:\[[^\]]+\]\s*)?Exit code \d+:$/.test(t) || // `formatFailureHeader()` 在拿不到退出码时打的那句 —— 与 "Exit code N:" 同类噪声。
2400
+ // 不过滤的话它会占掉第一个展示位:2026-09-05 实战里 `export_slides.ps1 | Select-Object
2401
+ // -First 3` 提前掐断管道被 PowerShell 报成失败,预览成了
2402
+ // 「Command failed before exit code could be determined: · …\slide-02.png」——
2403
+ // 两段都没用,而真正有信息的 `EXPORTED 25 slide(s)` 就在第二行、从没上屏。
2404
+ /^(?:\[[^\]]+\]\s*)?Command failed before exit code could be determined:$/.test(t) || /^Traceback \(most recent call last\):$/.test(t) || line.startsWith("[Command failed") || line.startsWith("\u{1F4A1} ") || t === "";
2405
+ }
2396
2406
  function buildErrorPreview(content) {
2397
2407
  const raw = content.split("\n").map((l) => l.replace(/\r+$/, ""));
2398
2408
  const undecorated = [];
2409
+ const decorationNeighbours = [];
2399
2410
  for (let i = 0; i < raw.length; i++) {
2400
2411
  if (PS_ERROR_RECORD_HEAD.test(raw[i])) {
2412
+ if (undecorated.length > 0) decorationNeighbours.push(undecorated[undecorated.length - 1]);
2401
2413
  i++;
2402
2414
  while (i < raw.length && /^\s*\+ /.test(raw[i])) i++;
2403
2415
  i--;
@@ -2405,14 +2417,7 @@ function buildErrorPreview(content) {
2405
2417
  }
2406
2418
  undecorated.push(raw[i]);
2407
2419
  }
2408
- const meaningful = undecorated.filter(
2409
- (l) => !/^(?:\[[^\]]+\]\s*)?Exit code \d+:$/.test(l.trim()) && // `formatFailureHeader()` 在拿不到退出码时打的那句 —— 与 "Exit code N:" 同类噪声。
2410
- // 不过滤的话它会占掉第一个展示位:2026-09-05 实战里 `export_slides.ps1 | Select-Object
2411
- // -First 3` 提前掐断管道被 PowerShell 报成失败,预览成了
2412
- // 「Command failed before exit code could be determined: · …\slide-02.png」——
2413
- // 两段都没用,而真正有信息的 `EXPORTED 25 slide(s)` 就在第二行、从没上屏。
2414
- !/^(?:\[[^\]]+\]\s*)?Command failed before exit code could be determined:$/.test(l.trim()) && !/^Traceback \(most recent call last\):$/.test(l.trim()) && !l.startsWith("[Command failed") && !l.startsWith("\u{1F4A1} ") && l.trim() !== ""
2415
- );
2420
+ const meaningful = undecorated.filter((l) => !isPreviewNoise(l));
2416
2421
  let primary = -1;
2417
2422
  for (let i = meaningful.length - 1; i >= 0; i--) {
2418
2423
  if (ERROR_SIGNATURE.test(meaningful[i])) {
@@ -2431,7 +2436,12 @@ function buildErrorPreview(content) {
2431
2436
  }
2432
2437
  previewLines = frame !== null ? [frame, meaningful[primary]] : [meaningful[primary]];
2433
2438
  } else {
2434
- previewLines = meaningful.length > 2 ? [meaningful[0], meaningful[meaningful.length - 1]] : meaningful.slice(0, 2);
2439
+ const neighbour = decorationNeighbours.find((l) => !isPreviewNoise(l));
2440
+ if (neighbour !== void 0) {
2441
+ previewLines = [neighbour];
2442
+ } else {
2443
+ previewLines = meaningful.length > 2 ? [meaningful[0], meaningful[meaningful.length - 1]] : meaningful.slice(0, 2);
2444
+ }
2435
2445
  }
2436
2446
  const preview = previewLines.map((l) => l.length > 160 ? l.slice(0, 160) + "\u2026" : l).join(" \xB7 ") || content.slice(0, 120);
2437
2447
  return preview.slice(0, 240);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-NBYSFFCO.js";
4
+ } from "./chunk-T6WQEQI4.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -12,7 +12,7 @@ import {
12
12
  MEMORY_FILE_NAME,
13
13
  MEMORY_MAX_CHARS,
14
14
  MEMORY_STORE_FILE_NAME
15
- } from "./chunk-PA4C452B.js";
15
+ } from "./chunk-JDT6UG6R.js";
16
16
 
17
17
  // src/memory/persistent-memory.ts
18
18
  import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "fs";
@@ -3,16 +3,16 @@ import {
3
3
  CI_COMMENT_MARKER,
4
4
  countSeverity,
5
5
  runCi
6
- } from "./chunk-UFK5CTBU.js";
7
- import "./chunk-4DH5LZR5.js";
6
+ } from "./chunk-3RDJEYF7.js";
7
+ import "./chunk-K5SDDTN7.js";
8
8
  import "./chunk-HLWUDRBO.js";
9
9
  import "./chunk-6YZEZFX5.js";
10
10
  import "./chunk-VXEF2SWG.js";
11
- import "./chunk-NFLE34QG.js";
11
+ import "./chunk-OC2XHG5L.js";
12
12
  import "./chunk-MI4SFZGX.js";
13
13
  import "./chunk-TU3L3PW7.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
- import "./chunk-NBYSFFCO.js";
15
+ import "./chunk-T6WQEQI4.js";
16
16
  export {
17
17
  CI_COMMENT_MARKER,
18
18
  countSeverity,
@@ -6,8 +6,8 @@ import {
6
6
  formatCiResult,
7
7
  formatCiSarif,
8
8
  normalizeCiThresholds
9
- } from "./chunk-4DH5LZR5.js";
10
- import "./chunk-NBYSFFCO.js";
9
+ } from "./chunk-K5SDDTN7.js";
10
+ import "./chunk-T6WQEQI4.js";
11
11
  export {
12
12
  DEFAULT_CI_THRESHOLDS,
13
13
  detectCiGateSignals,
@@ -17,6 +17,7 @@ import {
17
17
  DESCRIPTION,
18
18
  DEV_STATE_FILE_NAME,
19
19
  HISTORY_DIR_NAME,
20
+ MAX_GLOB_MATCHES,
20
21
  MAX_HISTORY_DAYS,
21
22
  MCP_CALL_TIMEOUT,
22
23
  MCP_CONNECT_TIMEOUT,
@@ -37,7 +38,7 @@ import {
37
38
  TEST_TIMEOUT,
38
39
  VERSION,
39
40
  buildUserIdentityPrompt
40
- } from "./chunk-PA4C452B.js";
41
+ } from "./chunk-JDT6UG6R.js";
41
42
  export {
42
43
  AGENTIC_BEHAVIOR_GUIDELINE,
43
44
  APP_NAME,
@@ -57,6 +58,7 @@ export {
57
58
  DESCRIPTION,
58
59
  DEV_STATE_FILE_NAME,
59
60
  HISTORY_DIR_NAME,
61
+ MAX_GLOB_MATCHES,
60
62
  MAX_HISTORY_DAYS,
61
63
  MCP_CALL_TIMEOUT,
62
64
  MCP_CONNECT_TIMEOUT,
@@ -18,6 +18,7 @@ import {
18
18
  DESCRIPTION,
19
19
  DEV_STATE_FILE_NAME,
20
20
  HISTORY_DIR_NAME,
21
+ MAX_GLOB_MATCHES,
21
22
  MAX_HISTORY_DAYS,
22
23
  MCP_CALL_TIMEOUT,
23
24
  MCP_CONNECT_TIMEOUT,
@@ -38,7 +39,7 @@ import {
38
39
  TEST_TIMEOUT,
39
40
  VERSION,
40
41
  buildUserIdentityPrompt
41
- } from "./chunk-NBYSFFCO.js";
42
+ } from "./chunk-T6WQEQI4.js";
42
43
  export {
43
44
  AGENTIC_BEHAVIOR_GUIDELINE,
44
45
  APP_NAME,
@@ -58,6 +59,7 @@ export {
58
59
  DESCRIPTION,
59
60
  DEV_STATE_FILE_NAME,
60
61
  HISTORY_DIR_NAME,
62
+ MAX_GLOB_MATCHES,
61
63
  MAX_HISTORY_DAYS,
62
64
  MCP_CALL_TIMEOUT,
63
65
  MCP_CONNECT_TIMEOUT,
@@ -2,16 +2,16 @@
2
2
  import {
3
3
  formatDoctorReport,
4
4
  runDoctorCli
5
- } from "./chunk-AXKERUXH.js";
6
- import "./chunk-Q4DAKI7I.js";
5
+ } from "./chunk-JFNBJHR6.js";
6
+ import "./chunk-7SSCSSC6.js";
7
7
  import "./chunk-RS7SKYTS.js";
8
8
  import "./chunk-VXEF2SWG.js";
9
- import "./chunk-NFLE34QG.js";
9
+ import "./chunk-OC2XHG5L.js";
10
10
  import "./chunk-MI4SFZGX.js";
11
11
  import "./chunk-TU3L3PW7.js";
12
12
  import "./chunk-HOSJZMQS.js";
13
13
  import "./chunk-IW3Q7AE5.js";
14
- import "./chunk-NBYSFFCO.js";
14
+ import "./chunk-T6WQEQI4.js";
15
15
  export {
16
16
  formatDoctorReport,
17
17
  runDoctorCli
@@ -50,7 +50,7 @@ import {
50
50
  touchMemoryReferences,
51
51
  updateMemoryApproval,
52
52
  updateMemoryEntry
53
- } from "./chunk-YPOWDFOV.js";
53
+ } from "./chunk-WZWRA7R2.js";
54
54
  import {
55
55
  DEFAULT_PATTERNS,
56
56
  redactJson,
@@ -66,7 +66,7 @@ import {
66
66
  } from "./chunk-CGLYJRFA.js";
67
67
  import {
68
68
  runTestsTool
69
- } from "./chunk-SZ4226XY.js";
69
+ } from "./chunk-NLB7JZSO.js";
70
70
  import {
71
71
  AGENTIC_BEHAVIOR_GUIDELINE,
72
72
  APP_NAME,
@@ -84,6 +84,7 @@ import {
84
84
  DESCRIPTION,
85
85
  DEV_STATE_FILE_NAME,
86
86
  HISTORY_DIR_NAME,
87
+ MAX_GLOB_MATCHES,
87
88
  MCP_CALL_TIMEOUT,
88
89
  MCP_CONNECT_TIMEOUT,
89
90
  MCP_PROJECT_CONFIG_NAME,
@@ -100,7 +101,7 @@ import {
100
101
  SUBAGENT_MAX_ROUNDS_LIMIT,
101
102
  VERSION,
102
103
  buildUserIdentityPrompt
103
- } from "./chunk-PA4C452B.js";
104
+ } from "./chunk-JDT6UG6R.js";
104
105
 
105
106
  // src/web/server.ts
106
107
  import express from "express";
@@ -7031,7 +7032,7 @@ ${err.message}`;
7031
7032
  if (IMAGE_EXTENSIONS.has(ext)) {
7032
7033
  return `[Image file: ${filePath} (${ext})]
7033
7034
  read_file cannot return image content \u2014 tool results are text-only, so no tool can put an image into your context.
7034
- To have an image looked at, ask the USER to reference it from their input line with @${filePath} (they can use a glob for a batch, e.g. @dir/*.png, up to 20 at a time). A vision-capable model must be active, or the reference is rejected.
7035
+ To have an image looked at, ask the USER to reference it from their input line with @${filePath} (they can use a glob for a batch, e.g. @dir/*.png, up to ${MAX_GLOB_MATCHES} at a time). A vision-capable model must be active, or the reference is rejected.
7035
7036
  Do NOT claim you inspected this image \u2014 you have not seen it.`;
7036
7037
  }
7037
7038
  return `[Binary file: ${filePath} (${ext})]
@@ -8207,7 +8208,7 @@ var RuleBasedActionClassifier = class {
8207
8208
  var defaultActionClassifier = new RuleBasedActionClassifier();
8208
8209
 
8209
8210
  // src/tools/executor.ts
8210
- var PS_ERROR_RECORD_HEAD = /^(?:[\w.\-]+\s:\s)?(?:At line:\d+ char:\s*\d+|所在位置\s+行:\d+\s+字符:\s*\d+)\s*$/;
8211
+ var PS_ERROR_RECORD_HEAD = /^(?:[\w.\-]+\s:\s)?(?:At (?:line:\d+|\S+:\d+) char:\s*\d+|所在位置\s+(?:行|\S+):\d+\s+字符:\s*\d+)\s*$/;
8211
8212
  var ERROR_SIGNATURE = new RegExp(
8212
8213
  [
8213
8214
  // Python / .NET / Java: "OSError: …", "pkg.SomeException: …"
@@ -8223,11 +8224,22 @@ var ERROR_SIGNATURE = new RegExp(
8223
8224
  "i"
8224
8225
  );
8225
8226
  var PY_TRACEBACK_FRAME = /^\s*File ".*", line \d+/;
8227
+ function isPreviewNoise(line) {
8228
+ const t = line.trim();
8229
+ return /^(?:\[[^\]]+\]\s*)?Exit code \d+:$/.test(t) || // `formatFailureHeader()` 在拿不到退出码时打的那句 —— 与 "Exit code N:" 同类噪声。
8230
+ // 不过滤的话它会占掉第一个展示位:2026-09-05 实战里 `export_slides.ps1 | Select-Object
8231
+ // -First 3` 提前掐断管道被 PowerShell 报成失败,预览成了
8232
+ // 「Command failed before exit code could be determined: · …\slide-02.png」——
8233
+ // 两段都没用,而真正有信息的 `EXPORTED 25 slide(s)` 就在第二行、从没上屏。
8234
+ /^(?:\[[^\]]+\]\s*)?Command failed before exit code could be determined:$/.test(t) || /^Traceback \(most recent call last\):$/.test(t) || line.startsWith("[Command failed") || line.startsWith("\u{1F4A1} ") || t === "";
8235
+ }
8226
8236
  function buildErrorPreview(content) {
8227
8237
  const raw = content.split("\n").map((l) => l.replace(/\r+$/, ""));
8228
8238
  const undecorated = [];
8239
+ const decorationNeighbours = [];
8229
8240
  for (let i = 0; i < raw.length; i++) {
8230
8241
  if (PS_ERROR_RECORD_HEAD.test(raw[i])) {
8242
+ if (undecorated.length > 0) decorationNeighbours.push(undecorated[undecorated.length - 1]);
8231
8243
  i++;
8232
8244
  while (i < raw.length && /^\s*\+ /.test(raw[i])) i++;
8233
8245
  i--;
@@ -8235,14 +8247,7 @@ function buildErrorPreview(content) {
8235
8247
  }
8236
8248
  undecorated.push(raw[i]);
8237
8249
  }
8238
- const meaningful = undecorated.filter(
8239
- (l) => !/^(?:\[[^\]]+\]\s*)?Exit code \d+:$/.test(l.trim()) && // `formatFailureHeader()` 在拿不到退出码时打的那句 —— 与 "Exit code N:" 同类噪声。
8240
- // 不过滤的话它会占掉第一个展示位:2026-09-05 实战里 `export_slides.ps1 | Select-Object
8241
- // -First 3` 提前掐断管道被 PowerShell 报成失败,预览成了
8242
- // 「Command failed before exit code could be determined: · …\slide-02.png」——
8243
- // 两段都没用,而真正有信息的 `EXPORTED 25 slide(s)` 就在第二行、从没上屏。
8244
- !/^(?:\[[^\]]+\]\s*)?Command failed before exit code could be determined:$/.test(l.trim()) && !/^Traceback \(most recent call last\):$/.test(l.trim()) && !l.startsWith("[Command failed") && !l.startsWith("\u{1F4A1} ") && l.trim() !== ""
8245
- );
8250
+ const meaningful = undecorated.filter((l) => !isPreviewNoise(l));
8246
8251
  let primary = -1;
8247
8252
  for (let i = meaningful.length - 1; i >= 0; i--) {
8248
8253
  if (ERROR_SIGNATURE.test(meaningful[i])) {
@@ -8261,7 +8266,12 @@ function buildErrorPreview(content) {
8261
8266
  }
8262
8267
  previewLines = frame !== null ? [frame, meaningful[primary]] : [meaningful[primary]];
8263
8268
  } else {
8264
- previewLines = meaningful.length > 2 ? [meaningful[0], meaningful[meaningful.length - 1]] : meaningful.slice(0, 2);
8269
+ const neighbour = decorationNeighbours.find((l) => !isPreviewNoise(l));
8270
+ if (neighbour !== void 0) {
8271
+ previewLines = [neighbour];
8272
+ } else {
8273
+ previewLines = meaningful.length > 2 ? [meaningful[0], meaningful[meaningful.length - 1]] : meaningful.slice(0, 2);
8274
+ }
8265
8275
  }
8266
8276
  const preview = previewLines.map((l) => l.length > 160 ? l.slice(0, 160) + "\u2026" : l).join(" \xB7 ") || content.slice(0, 120);
8267
8277
  return preview.slice(0, 240);
@@ -17266,7 +17276,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
17266
17276
  Cost: ${formatCost(cost)}` : "";
17267
17277
  let memoryLine = "";
17268
17278
  try {
17269
- const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-LCOKUDTM.js");
17279
+ const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-XZISXRWT.js");
17270
17280
  const pending = countPendingMemories2(ctx.config.getConfigDir());
17271
17281
  if (pending > 0) memoryLine = `
17272
17282
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -18254,7 +18264,7 @@ async function handleTest(args, ctx) {
18254
18264
  const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
18255
18265
  testArgs = isCommand ? { command: argStr } : { filter: argStr };
18256
18266
  }
18257
- const runTests = ctx.runTests ?? (await import("./run-tests-EUPJLDXS.js")).executeTests;
18267
+ const runTests = ctx.runTests ?? (await import("./run-tests-UEE3OMLS.js")).executeTests;
18258
18268
  const report = await runTests(testArgs);
18259
18269
  ctx.send({ type: "info", message: report });
18260
18270
  } catch (err) {
@@ -18645,7 +18655,7 @@ async function handleMemory(args, ctx) {
18645
18655
  }
18646
18656
  if (intent.kind === "status") {
18647
18657
  const { getChatIndexStatus: getChatIndexStatus2 } = await import("./chat-index-DGUOUUQW.js");
18648
- const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-LCOKUDTM.js");
18658
+ const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-XZISXRWT.js");
18649
18659
  const memories = listMemoryEntries2(configDir, { includeExpired: true, includeRejected: true });
18650
18660
  const injected = formatMemoryForPrompt2(configDir, process.cwd(), ctx.config.get("memory")?.maxChars);
18651
18661
  const view = buildMemoryStatusView({
@@ -18668,7 +18678,7 @@ async function handleMemory(args, ctx) {
18668
18678
  return;
18669
18679
  }
18670
18680
  if (intent.kind === "recall") {
18671
- const { searchPersistentMemories: searchPersistentMemories2, touchMemoryReferences: touchMemoryReferences2 } = await import("./persistent-memory-LCOKUDTM.js");
18681
+ const { searchPersistentMemories: searchPersistentMemories2, touchMemoryReferences: touchMemoryReferences2 } = await import("./persistent-memory-XZISXRWT.js");
18672
18682
  const { searchChatMemory: searchChatMemory2 } = await import("./chat-index-DGUOUUQW.js");
18673
18683
  const persistentHits = searchPersistentMemories2(configDir, intent.query, process.cwd(), 3);
18674
18684
  if (persistentHits.length > 0) {
@@ -18789,7 +18799,7 @@ async function handleMemory(args, ctx) {
18789
18799
  ctx.handleMemoryManage(intent.action, args[1], intent.action === "expire" ? args[2] : void 0);
18790
18800
  } else if (intent.kind === "export") {
18791
18801
  if (args[1] === "md") {
18792
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-LCOKUDTM.js");
18802
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-XZISXRWT.js");
18793
18803
  ctx.send({
18794
18804
  type: "export_data",
18795
18805
  format: "md",
@@ -19794,7 +19804,7 @@ No tools match "${filter}".
19794
19804
  const { join: join29 } = await import("path");
19795
19805
  const { existsSync: existsSync33 } = await import("fs");
19796
19806
  const { getGitRoot: getGitRoot2 } = await import("./git-context-VNCA2GU7.js");
19797
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-55QQ3RYE.js");
19807
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-AXBD2EEB.js");
19798
19808
  const { approveProject, hashMcpFile } = await import("./project-trust-MUG325AW.js");
19799
19809
  const cwd = process.cwd();
19800
19810
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -20713,7 +20723,7 @@ function createReviewCommands() {
20713
20723
  usage: "/test [command|filter]",
20714
20724
  async execute(args, ctx) {
20715
20725
  try {
20716
- const { executeTests } = await import("./run-tests-EUPJLDXS.js");
20726
+ const { executeTests } = await import("./run-tests-UEE3OMLS.js");
20717
20727
  const argStr = args.join(" ").trim();
20718
20728
  let testArgs = {};
20719
20729
  if (argStr) {
@@ -158,7 +158,7 @@ ${content}`);
158
158
  }
159
159
  }
160
160
  async function runTaskMode(config, providers, configManager, topic) {
161
- const { TaskOrchestrator } = await import("./task-orchestrator-WAJTCE6D.js");
161
+ const { TaskOrchestrator } = await import("./task-orchestrator-RDDETDW2.js");
162
162
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
163
163
  let interrupted = false;
164
164
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  setupProxy,
25
25
  snapshotFile,
26
26
  stripRoutingTags
27
- } from "./chunk-GOIDKTBE.js";
27
+ } from "./chunk-AYLK4EGA.js";
28
28
  import {
29
29
  CostTracker,
30
30
  getPricing,
@@ -50,7 +50,7 @@ import {
50
50
  setMaxOutputCap,
51
51
  spawnAgentContext,
52
52
  undoStack
53
- } from "./chunk-IPUTC5EX.js";
53
+ } from "./chunk-VLDB2SVN.js";
54
54
  import "./chunk-HLWUDRBO.js";
55
55
  import {
56
56
  NO_THINKING,
@@ -63,7 +63,7 @@ import {
63
63
  countPendingMemories,
64
64
  detectStaleLegacyMarkdownEdit,
65
65
  formatMemoryForPrompt
66
- } from "./chunk-3ZABGT3S.js";
66
+ } from "./chunk-LAP7TPPK.js";
67
67
  import "./chunk-LF67HWWR.js";
68
68
  import "./chunk-XJOK5353.js";
69
69
  import "./chunk-WQ3OMEC4.js";
@@ -84,14 +84,14 @@ import {
84
84
  import {
85
85
  loadContextFiles,
86
86
  writeCrashLog
87
- } from "./chunk-AXKERUXH.js";
87
+ } from "./chunk-JFNBJHR6.js";
88
88
  import {
89
89
  getActivePluginAssets,
90
90
  getPendingHookTrust,
91
91
  installFlushOnExit,
92
92
  mergePluginHooks,
93
93
  runLifecycleHooks
94
- } from "./chunk-Q4DAKI7I.js";
94
+ } from "./chunk-7SSCSSC6.js";
95
95
  import "./chunk-RS7SKYTS.js";
96
96
  import {
97
97
  ProviderRegistry,
@@ -99,7 +99,7 @@ import {
99
99
  } from "./chunk-VXEF2SWG.js";
100
100
  import {
101
101
  ConfigManager
102
- } from "./chunk-NFLE34QG.js";
102
+ } from "./chunk-OC2XHG5L.js";
103
103
  import {
104
104
  CONTENT_ONLY_STREAM_REMINDER,
105
105
  TEE_FINAL_USER_NUDGE,
@@ -133,7 +133,7 @@ import {
133
133
  } from "./chunk-IW3Q7AE5.js";
134
134
  import "./chunk-XNFIYS7G.js";
135
135
  import "./chunk-4BKXL7SM.js";
136
- import "./chunk-I6RATYRF.js";
136
+ import "./chunk-W6PLV3EY.js";
137
137
  import {
138
138
  AGENTIC_BEHAVIOR_GUIDELINE,
139
139
  AUTHOR,
@@ -144,13 +144,14 @@ import {
144
144
  DEFAULT_MAX_TOOL_ROUNDS,
145
145
  DESCRIPTION,
146
146
  DEV_STATE_FILE_NAME,
147
+ MAX_GLOB_MATCHES,
147
148
  MCP_PROJECT_CONFIG_NAME,
148
149
  PLAN_MODE_READONLY_TOOLS,
149
150
  PLAN_MODE_SYSTEM_ADDON,
150
151
  SKILLS_DIR_NAME,
151
152
  VERSION,
152
153
  buildUserIdentityPrompt
153
- } from "./chunk-NBYSFFCO.js";
154
+ } from "./chunk-T6WQEQI4.js";
154
155
 
155
156
  // src/index.ts
156
157
  import { program } from "commander";
@@ -1102,7 +1103,6 @@ var IMAGE_MIME = {
1102
1103
  ".webp": "image/webp"
1103
1104
  };
1104
1105
  var MAX_IMAGE_BYTES = 10 * 1024 * 1024;
1105
- var MAX_GLOB_MATCHES = 30;
1106
1106
  function expandGlob(rawPath, cwd) {
1107
1107
  const pat = basename(rawPath);
1108
1108
  if (!/[*?]/.test(pat)) return { kind: "notglob" };
@@ -4062,7 +4062,7 @@ program.command("web").description("Start Web UI server with browser-based chat
4062
4062
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
4063
4063
  process.exit(1);
4064
4064
  }
4065
- const { startWebServer } = await import("./server-PG7QCH53.js");
4065
+ const { startWebServer } = await import("./server-DBHLVQVP.js");
4066
4066
  await startWebServer({ port, host: options.host });
4067
4067
  });
4068
4068
  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) => {
@@ -4229,11 +4229,11 @@ program.command("sessions").description("List recent conversation sessions").opt
4229
4229
  console.log(footer + "\n");
4230
4230
  });
4231
4231
  program.command("usage").description("Show token + cost usage grouped by provider/model (cross-session)").option("--days <n>", "Only the last N days (inclusive of today)").option("--month <ym>", "Only a specific month, format YYYY-MM (e.g. 2026-06)").option("--json", "Output as JSON (for scripting)").action(async (options) => {
4232
- const { runUsageCli } = await import("./usage-DOES3DOS.js");
4232
+ const { runUsageCli } = await import("./usage-D473ZVIP.js");
4233
4233
  await runUsageCli(options);
4234
4234
  });
4235
4235
  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) => {
4236
- const { runDoctorCli } = await import("./doctor-cli-ZHZ2XOF3.js");
4236
+ const { runDoctorCli } = await import("./doctor-cli-DDHHDMMJ.js");
4237
4237
  const argv = process.argv.slice(2);
4238
4238
  await runDoctorCli({
4239
4239
  json: !!options.json || argv.includes("--json"),
@@ -4242,7 +4242,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
4242
4242
  });
4243
4243
  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) => {
4244
4244
  try {
4245
- const batch = await import("./batch-OX27K4GG.js");
4245
+ const batch = await import("./batch-JLGWQ7HU.js");
4246
4246
  switch (action) {
4247
4247
  case "submit":
4248
4248
  if (!arg) {
@@ -4285,7 +4285,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
4285
4285
  }
4286
4286
  });
4287
4287
  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) => {
4288
- const { startMcpServer } = await import("./server-PNYRE3AL.js");
4288
+ const { startMcpServer } = await import("./server-6IC33CJK.js");
4289
4289
  await startMcpServer({
4290
4290
  allowDestructive: !!options.allowDestructive,
4291
4291
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -4298,7 +4298,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
4298
4298
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
4299
4299
  process.exit(1);
4300
4300
  }
4301
- const { runPrCli } = await import("./pr-NHWE5FW7.js");
4301
+ const { runPrCli } = await import("./pr-UY4ZCZNI.js");
4302
4302
  const result = await runPrCli({
4303
4303
  action,
4304
4304
  target,
@@ -4318,8 +4318,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
4318
4318
  process.exit(result.exitCode);
4319
4319
  });
4320
4320
  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 or URL; diff fetched via gh pr diff <value>", (v) => /^#?\d+$/.test(v) ? parseInt(v.replace(/^#/, ""), 10) : v).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)").option("--json", "Output a structured JSON report").option("--markdown", "Output Markdown report (default)").option("--sarif", "Output SARIF 2.1.0 for code scanning artifacts").option("--fail-on-security-high", "Fail when the security review contains HIGH/CRITICAL findings (default)").option("--no-fail-on-security-high", "Do not fail on security HIGH/CRITICAL findings").option("--fail-on-test-failure", "Fail when the report mentions test failures (default)").option("--no-fail-on-test-failure", "Do not fail on test failure findings").option("--fail-on-lint-failure", "Fail when the report mentions lint/typecheck failures (default)").option("--no-fail-on-lint-failure", "Do not fail on lint/typecheck failure findings").action(async (options) => {
4321
- const { runCi } = await import("./ci-IIMLOXFH.js");
4322
- const { formatCiResult } = await import("./ci-format-FMBJC3EY.js");
4321
+ const { runCi } = await import("./ci-6PHEL3C7.js");
4322
+ const { formatCiResult } = await import("./ci-format-AZYUP6BL.js");
4323
4323
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
4324
4324
  if (formats > 1) {
4325
4325
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -4478,7 +4478,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
4478
4478
  config.get("customProviders"),
4479
4479
  config.getConfigDir()
4480
4480
  );
4481
- const { startHub } = await import("./hub-MF53NIM2.js");
4481
+ const { startHub } = await import("./hub-DDYAWLF2.js");
4482
4482
  await startHub(
4483
4483
  {
4484
4484
  topic: topic ?? "",
@@ -28,11 +28,11 @@ import {
28
28
  touchMemoryReferences,
29
29
  updateMemoryApproval,
30
30
  updateMemoryEntry
31
- } from "./chunk-3ZABGT3S.js";
31
+ } from "./chunk-LAP7TPPK.js";
32
32
  import "./chunk-3FEZSLGI.js";
33
33
  import "./chunk-HOSJZMQS.js";
34
34
  import "./chunk-IW3Q7AE5.js";
35
- import "./chunk-NBYSFFCO.js";
35
+ import "./chunk-T6WQEQI4.js";
36
36
  export {
37
37
  addMemoryEntry,
38
38
  backupMemoryStore,
@@ -27,11 +27,11 @@ import {
27
27
  touchMemoryReferences,
28
28
  updateMemoryApproval,
29
29
  updateMemoryEntry
30
- } from "./chunk-YPOWDFOV.js";
30
+ } from "./chunk-WZWRA7R2.js";
31
31
  import "./chunk-FSC6KEWU.js";
32
32
  import "./chunk-6BUTA5VW.js";
33
33
  import "./chunk-CGLYJRFA.js";
34
- import "./chunk-PA4C452B.js";
34
+ import "./chunk-JDT6UG6R.js";
35
35
  export {
36
36
  addMemoryEntry,
37
37
  backupMemoryStore,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-UFK5CTBU.js";
6
- import "./chunk-4DH5LZR5.js";
5
+ } from "./chunk-3RDJEYF7.js";
6
+ import "./chunk-K5SDDTN7.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
@@ -17,13 +17,13 @@ import {
17
17
  } from "./chunk-VXEF2SWG.js";
18
18
  import {
19
19
  ConfigManager
20
- } from "./chunk-NFLE34QG.js";
20
+ } from "./chunk-OC2XHG5L.js";
21
21
  import "./chunk-MI4SFZGX.js";
22
22
  import "./chunk-TU3L3PW7.js";
23
23
  import "./chunk-IW3Q7AE5.js";
24
24
  import {
25
25
  VERSION
26
- } from "./chunk-NBYSFFCO.js";
26
+ } from "./chunk-T6WQEQI4.js";
27
27
 
28
28
  // src/cli/pr.ts
29
29
  import { execFileSync } from "child_process";
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-I6RATYRF.js";
6
- import "./chunk-NBYSFFCO.js";
5
+ } from "./chunk-W6PLV3EY.js";
6
+ import "./chunk-T6WQEQI4.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-SZ4226XY.js";
5
- import "./chunk-PA4C452B.js";
4
+ } from "./chunk-NLB7JZSO.js";
5
+ import "./chunk-JDT6UG6R.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-IPUTC5EX.js";
4
+ } from "./chunk-VLDB2SVN.js";
5
5
  import "./chunk-GHWZVPUV.js";
6
- import "./chunk-3ZABGT3S.js";
6
+ import "./chunk-LAP7TPPK.js";
7
7
  import "./chunk-LF67HWWR.js";
8
8
  import "./chunk-XJOK5353.js";
9
9
  import "./chunk-WQ3OMEC4.js";
@@ -14,7 +14,7 @@ import "./chunk-NYNSYLFY.js";
14
14
  import "./chunk-3FEZSLGI.js";
15
15
  import {
16
16
  runTool
17
- } from "./chunk-Q4DAKI7I.js";
17
+ } from "./chunk-7SSCSSC6.js";
18
18
  import "./chunk-RS7SKYTS.js";
19
19
  import {
20
20
  getDangerLevel,
@@ -24,10 +24,10 @@ import "./chunk-TU3L3PW7.js";
24
24
  import "./chunk-HOSJZMQS.js";
25
25
  import "./chunk-IW3Q7AE5.js";
26
26
  import "./chunk-4BKXL7SM.js";
27
- import "./chunk-I6RATYRF.js";
27
+ import "./chunk-W6PLV3EY.js";
28
28
  import {
29
29
  VERSION
30
- } from "./chunk-NBYSFFCO.js";
30
+ } from "./chunk-T6WQEQI4.js";
31
31
 
32
32
  // src/mcp/server.ts
33
33
  import { createInterface } from "readline";
@@ -81,7 +81,7 @@ import {
81
81
  skillHistoryNote,
82
82
  snapshotFile,
83
83
  stripRoutingTags
84
- } from "./chunk-GOIDKTBE.js";
84
+ } from "./chunk-AYLK4EGA.js";
85
85
  import {
86
86
  CNY_PER_USD,
87
87
  CostTracker,
@@ -126,7 +126,7 @@ import {
126
126
  spawnAgentContext,
127
127
  truncateOutput,
128
128
  undoStack
129
- } from "./chunk-IPUTC5EX.js";
129
+ } from "./chunk-VLDB2SVN.js";
130
130
  import {
131
131
  buildReviewPrompt,
132
132
  buildSecurityReviewPrompt
@@ -153,7 +153,7 @@ import {
153
153
  restoreMemoryEntries,
154
154
  updateMemoryApproval,
155
155
  updateMemoryEntry
156
- } from "./chunk-3ZABGT3S.js";
156
+ } from "./chunk-LAP7TPPK.js";
157
157
  import "./chunk-LF67HWWR.js";
158
158
  import "./chunk-XJOK5353.js";
159
159
  import "./chunk-WQ3OMEC4.js";
@@ -172,7 +172,7 @@ import {
172
172
  buildDoctorReport,
173
173
  formatDoctorReport,
174
174
  loadContextFiles
175
- } from "./chunk-AXKERUXH.js";
175
+ } from "./chunk-JFNBJHR6.js";
176
176
  import {
177
177
  describePlugin,
178
178
  getActivePluginAssets,
@@ -187,14 +187,14 @@ import {
187
187
  runTool,
188
188
  setPluginEnabled,
189
189
  trustPlugin
190
- } from "./chunk-Q4DAKI7I.js";
190
+ } from "./chunk-7SSCSSC6.js";
191
191
  import "./chunk-RS7SKYTS.js";
192
192
  import {
193
193
  ProviderRegistry
194
194
  } from "./chunk-VXEF2SWG.js";
195
195
  import {
196
196
  ConfigManager
197
- } from "./chunk-NFLE34QG.js";
197
+ } from "./chunk-OC2XHG5L.js";
198
198
  import {
199
199
  CONTENT_ONLY_STREAM_REMINDER,
200
200
  TEE_FINAL_USER_NUDGE,
@@ -225,7 +225,7 @@ import {
225
225
  maskConfigSecrets
226
226
  } from "./chunk-XNFIYS7G.js";
227
227
  import "./chunk-4BKXL7SM.js";
228
- import "./chunk-I6RATYRF.js";
228
+ import "./chunk-W6PLV3EY.js";
229
229
  import {
230
230
  AGENTIC_BEHAVIOR_GUIDELINE,
231
231
  AUTHOR,
@@ -241,7 +241,7 @@ import {
241
241
  SKILLS_DIR_NAME,
242
242
  VERSION,
243
243
  buildUserIdentityPrompt
244
- } from "./chunk-NBYSFFCO.js";
244
+ } from "./chunk-T6WQEQI4.js";
245
245
 
246
246
  // src/web/server.ts
247
247
  import express from "express";
@@ -968,7 +968,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
968
968
  Cost: ${formatCost(cost)}` : "";
969
969
  let memoryLine = "";
970
970
  try {
971
- const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-NACQW2VB.js");
971
+ const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-6XYYOMSC.js");
972
972
  const pending = countPendingMemories2(ctx.config.getConfigDir());
973
973
  if (pending > 0) memoryLine = `
974
974
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -1897,7 +1897,7 @@ async function handleTest(args, ctx) {
1897
1897
  const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
1898
1898
  testArgs = isCommand ? { command: argStr } : { filter: argStr };
1899
1899
  }
1900
- const runTests = ctx.runTests ?? (await import("./run-tests-ZG5X25BJ.js")).executeTests;
1900
+ const runTests = ctx.runTests ?? (await import("./run-tests-BAMLVLO6.js")).executeTests;
1901
1901
  const report = await runTests(testArgs);
1902
1902
  ctx.send({ type: "info", message: report });
1903
1903
  } catch (err) {
@@ -2173,7 +2173,7 @@ async function handleMemory(args, ctx) {
2173
2173
  }
2174
2174
  if (intent.kind === "status") {
2175
2175
  const { getChatIndexStatus } = await import("./chat-index-2D5GK2DB.js");
2176
- const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-NACQW2VB.js");
2176
+ const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-6XYYOMSC.js");
2177
2177
  const memories = listMemoryEntries2(configDir, { includeExpired: true, includeRejected: true });
2178
2178
  const injected = formatMemoryForPrompt2(configDir, process.cwd(), ctx.config.get("memory")?.maxChars);
2179
2179
  const view = buildMemoryStatusView({
@@ -2196,7 +2196,7 @@ async function handleMemory(args, ctx) {
2196
2196
  return;
2197
2197
  }
2198
2198
  if (intent.kind === "recall") {
2199
- const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-NACQW2VB.js");
2199
+ const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-6XYYOMSC.js");
2200
2200
  const { searchChatMemory } = await import("./chat-index-2D5GK2DB.js");
2201
2201
  const persistentHits = searchPersistentMemories(configDir, intent.query, process.cwd(), 3);
2202
2202
  if (persistentHits.length > 0) {
@@ -2317,7 +2317,7 @@ async function handleMemory(args, ctx) {
2317
2317
  ctx.handleMemoryManage(intent.action, args[1], intent.action === "expire" ? args[2] : void 0);
2318
2318
  } else if (intent.kind === "export") {
2319
2319
  if (args[1] === "md") {
2320
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-NACQW2VB.js");
2320
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-6XYYOMSC.js");
2321
2321
  ctx.send({
2322
2322
  type: "export_data",
2323
2323
  format: "md",
@@ -4,9 +4,9 @@ import {
4
4
  googleSearchContext,
5
5
  isToolCapableProvider,
6
6
  truncateOutput
7
- } from "./chunk-IPUTC5EX.js";
7
+ } from "./chunk-VLDB2SVN.js";
8
8
  import "./chunk-GHWZVPUV.js";
9
- import "./chunk-3ZABGT3S.js";
9
+ import "./chunk-LAP7TPPK.js";
10
10
  import "./chunk-LF67HWWR.js";
11
11
  import "./chunk-XJOK5353.js";
12
12
  import "./chunk-WQ3OMEC4.js";
@@ -17,7 +17,7 @@ import "./chunk-NYNSYLFY.js";
17
17
  import "./chunk-3FEZSLGI.js";
18
18
  import {
19
19
  runTool
20
- } from "./chunk-Q4DAKI7I.js";
20
+ } from "./chunk-7SSCSSC6.js";
21
21
  import "./chunk-RS7SKYTS.js";
22
22
  import {
23
23
  getDangerLevel,
@@ -29,10 +29,10 @@ import {
29
29
  atomicWriteFileSync
30
30
  } from "./chunk-IW3Q7AE5.js";
31
31
  import "./chunk-4BKXL7SM.js";
32
- import "./chunk-I6RATYRF.js";
32
+ import "./chunk-W6PLV3EY.js";
33
33
  import {
34
34
  SUBAGENT_ALLOWED_TOOLS
35
- } from "./chunk-NBYSFFCO.js";
35
+ } from "./chunk-T6WQEQI4.js";
36
36
 
37
37
  // src/hub/task-orchestrator.ts
38
38
  import { createInterface } from "readline";
@@ -9,10 +9,10 @@ import {
9
9
  import "./chunk-RS7SKYTS.js";
10
10
  import {
11
11
  ConfigManager
12
- } from "./chunk-NFLE34QG.js";
12
+ } from "./chunk-OC2XHG5L.js";
13
13
  import "./chunk-TU3L3PW7.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
- import "./chunk-NBYSFFCO.js";
15
+ import "./chunk-T6WQEQI4.js";
16
16
 
17
17
  // src/cli/usage.ts
18
18
  function classifyRowCost(row) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.305",
3
+ "version": "0.4.306",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",