jinzd-ai-cli 0.4.302 → 0.4.304

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-ZNBGBQEX.js → batch-RY2F7BX5.js} +2 -2
  2. package/dist/{chunk-AFFRHN5Q.js → chunk-2GRGLTAK.js} +1 -1
  3. package/dist/{chunk-2NTFG6TW.js → chunk-2PLYXL4P.js} +22 -6
  4. package/dist/{chunk-CMU7EW7Z.js → chunk-3FI4TE5S.js} +3 -3
  5. package/dist/{chunk-GI337HBI.js → chunk-6AGTDWO3.js} +1 -1
  6. package/dist/{chunk-H24EWAHZ.js → chunk-7L7T46PI.js} +1 -1
  7. package/dist/{chunk-FBGHQVYB.js → chunk-BSBGPDCX.js} +1 -1
  8. package/dist/{chunk-V64KKKWH.js → chunk-DNGUSTL6.js} +1 -1
  9. package/dist/{chunk-PJ2J5MUD.js → chunk-F3EJ4MIP.js} +7 -7
  10. package/dist/{chunk-2UPRXHMU.js → chunk-I2WJ44D3.js} +1 -1
  11. package/dist/{chunk-YY3MYR4F.js → chunk-OECPGCHP.js} +3 -3
  12. package/dist/{chunk-JGM5KAJD.js → chunk-RHCRE6XE.js} +1 -1
  13. package/dist/{chunk-AL6V4K6B.js → chunk-TBTVV3KK.js} +1 -1
  14. package/dist/{chunk-JOMCF5UH.js → chunk-XIMM47EG.js} +1 -1
  15. package/dist/{ci-V66GKRNA.js → ci-QYTLBM6Z.js} +4 -4
  16. package/dist/{ci-format-3OFRPZVN.js → ci-format-E5X27NC2.js} +2 -2
  17. package/dist/{constants-NSGQ4BQV.js → constants-F5WA5VPO.js} +1 -1
  18. package/dist/{constants-L32HFC6Y.js → constants-JDPKWZJP.js} +1 -1
  19. package/dist/{doctor-cli-VF45ASWG.js → doctor-cli-7NSEVW63.js} +4 -4
  20. package/dist/electron-server.js +28 -12
  21. package/dist/{hub-4PEK2GU2.js → hub-43PWTGGO.js} +1 -1
  22. package/dist/index.js +41 -29
  23. package/dist/{persistent-memory-FE6UR6BV.js → persistent-memory-A7RPDLR7.js} +2 -2
  24. package/dist/{persistent-memory-OY2LX24N.js → persistent-memory-SHG3CJCP.js} +2 -2
  25. package/dist/{pr-TTCQB4A4.js → pr-LW755EL7.js} +4 -4
  26. package/dist/{run-tests-DJXSR7HO.js → run-tests-HV37CM5U.js} +2 -2
  27. package/dist/{run-tests-FXBWWK7I.js → run-tests-MJ3SCW27.js} +2 -2
  28. package/dist/{server-3S3UJX2O.js → server-EZ5ULLDP.js} +13 -13
  29. package/dist/{server-BGUM3CRA.js → server-WI3Q4EDH.js} +5 -5
  30. package/dist/{task-orchestrator-P6KDCA46.js → task-orchestrator-PWW5I2KE.js} +5 -5
  31. package/dist/{usage-UB3WM7M5.js → usage-MAIV6XUZ.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-JOMCF5UH.js";
7
+ } from "./chunk-XIMM47EG.js";
8
8
  import "./chunk-TU3L3PW7.js";
9
9
  import {
10
10
  atomicWriteFileSync
11
11
  } from "./chunk-IW3Q7AE5.js";
12
- import "./chunk-JGM5KAJD.js";
12
+ import "./chunk-RHCRE6XE.js";
13
13
 
14
14
  // src/cli/batch.ts
15
15
  import Anthropic from "@anthropic-ai/sdk";
@@ -1,5 +1,5 @@
1
1
  // src/core/constants.ts
2
- var VERSION = "0.4.302";
2
+ var VERSION = "0.4.304";
3
3
  var APP_NAME = "ai-cli";
4
4
  var CONFIG_DIR_NAME = ".aicli";
5
5
  var CONFIG_FILE_NAME = "config.json";
@@ -11,7 +11,7 @@ import {
11
11
  searchPersistentMemories,
12
12
  touchMemoryReferences,
13
13
  updateMemoryEntry
14
- } from "./chunk-H24EWAHZ.js";
14
+ } from "./chunk-7L7T46PI.js";
15
15
  import {
16
16
  indexProject
17
17
  } from "./chunk-4DEMGCK4.js";
@@ -30,7 +30,7 @@ import {
30
30
  runHook,
31
31
  runLifecycleHooks,
32
32
  runTool
33
- } from "./chunk-2UPRXHMU.js";
33
+ } from "./chunk-I2WJ44D3.js";
34
34
  import {
35
35
  buildTruncatedArgumentsError,
36
36
  getDangerLevel,
@@ -50,7 +50,7 @@ import {
50
50
  } from "./chunk-4BKXL7SM.js";
51
51
  import {
52
52
  runTestsTool
53
- } from "./chunk-FBGHQVYB.js";
53
+ } from "./chunk-BSBGPDCX.js";
54
54
  import {
55
55
  CONFIG_DIR_NAME,
56
56
  DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
@@ -58,7 +58,7 @@ import {
58
58
  SUBAGENT_ALLOWED_TOOLS,
59
59
  SUBAGENT_DEFAULT_MAX_ROUNDS,
60
60
  SUBAGENT_MAX_ROUNDS_LIMIT
61
- } from "./chunk-JGM5KAJD.js";
61
+ } from "./chunk-RHCRE6XE.js";
62
62
 
63
63
  // src/tools/shell-pool.ts
64
64
  import { spawn as spawn2 } from "child_process";
@@ -931,6 +931,11 @@ function buildErrorHint(command, stderr) {
931
931
  `Hint: On Windows, "-ErrorAction SilentlyContinue" silences the error MESSAGE but does NOT change the exit code \u2014 the process still exits 1 when the path doesn't exist (because powershell.exe -NonInteractive flips the exit code on any non-terminating error, silenced or not). If you're just probing for existence, use Test-Path instead \u2014 it returns $true/$false without raising: \`if (Test-Path ./mydir) { Get-ChildItem ./mydir }\` or unconditionally use \`New-Item -ItemType Directory -Force -Path ./mydir\` which is idempotent. Don't retry the same -ErrorAction SilentlyContinue probe expecting a different result.`
932
932
  );
933
933
  }
934
+ if (IS_WINDOWS3 && /Select-Object\s+(?:[^|]*\s)?-(?:First|Last)\s+\d+/i.test(command) && /\|/.test(command)) {
935
+ hints.push(
936
+ `Hint: "Select-Object -First N" stops the upstream pipeline as soon as it has N items (PipelineStoppedException), and PowerShell reports that as a FAILURE even when the upstream command did its job \u2014 check the output above: if it shows the work completed (e.g. "EXPORTED 25 slide(s)"), this is a false failure and you should NOT retry. To avoid it, capture first and slice after: \`$out = <command>; $out | Select-Object -First N\`, or drop the -First and let the full output through.`
937
+ );
938
+ }
934
939
  if (IS_WINDOWS3 && /\bWrite-(?:Content|File)\b/i.test(command) && /(not recognized|无法将.*识别|不是.*cmdlet|CommandNotFoundException)/i.test(stderr)) {
935
940
  hints.push(
936
941
  `Hint: 'Write-Content' / 'Write-File' are NOT PowerShell cmdlets (common LLM hallucination). To write a file, prefer the built-in 'write_file' tool \u2014 it handles encoding/escaping cleanly and supports diff preview. If you must stay in bash: use 'Set-Content -Path <file> -Value <string> -Encoding utf8' (overwrites) or 'Add-Content' (appends) or 'Out-File -FilePath <file> -Encoding utf8'.`
@@ -2401,7 +2406,12 @@ function buildErrorPreview(content) {
2401
2406
  undecorated.push(raw[i]);
2402
2407
  }
2403
2408
  const meaningful = undecorated.filter(
2404
- (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() !== ""
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() !== ""
2405
2415
  );
2406
2416
  let primary = -1;
2407
2417
  for (let i = meaningful.length - 1; i >= 0; i--) {
@@ -2902,7 +2912,7 @@ var ToolExecutor = class {
2902
2912
  ... (${lines.length - maxLines} more lines)`) : "";
2903
2913
  const truncatedNote = wasTruncated ? theme.warning(`
2904
2914
  \u26A1 Output truncated to ${getActiveMaxChars()} chars before sending to AI`) : "";
2905
- console.log(theme.toolResult("\u2713 Result: ") + theme.dim(preview) + moreLines + truncatedNote);
2915
+ console.log(theme.toolResult(`\u2713 ${name} result: `) + theme.dim(preview) + moreLines + truncatedNote);
2906
2916
  }
2907
2917
  console.log();
2908
2918
  }
@@ -3555,6 +3565,9 @@ Note: Path can be absolute or relative to cwd.`,
3555
3565
  fileCheckpoints.snapshot(filePath, ToolExecutor.currentMessageIndex);
3556
3566
  atomicWriteFileSync(filePath, res.content);
3557
3567
  }
3568
+ if (!res.ok) {
3569
+ throw new ToolError("edit_file", lines.join("\n"));
3570
+ }
3558
3571
  return lines.join("\n");
3559
3572
  }
3560
3573
  if (args["edits"] !== void 0) {
@@ -3607,6 +3620,9 @@ Note: Path can be absolute or relative to cwd.`,
3607
3620
  lines.push(` \u2717 #${r.index + 1}: ${r.error}`);
3608
3621
  }
3609
3622
  }
3623
+ if (anyFailed && stopOnError) {
3624
+ throw new ToolError("edit_file", lines.join("\n"));
3625
+ }
3610
3626
  return lines.join("\n");
3611
3627
  }
3612
3628
  const replaceArgs = normalizeReplaceArgs(args);
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  evaluateCiGate,
4
4
  normalizeCiThresholds
5
- } from "./chunk-GI337HBI.js";
5
+ } from "./chunk-6AGTDWO3.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-JOMCF5UH.js";
19
+ } from "./chunk-XIMM47EG.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-JGM5KAJD.js";
22
+ } from "./chunk-RHCRE6XE.js";
23
23
 
24
24
  // src/cli/ci.ts
25
25
  import { execFileSync } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-JGM5KAJD.js";
4
+ } from "./chunk-RHCRE6XE.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-JGM5KAJD.js";
16
+ } from "./chunk-RHCRE6XE.js";
17
17
 
18
18
  // src/memory/persistent-memory.ts
19
19
  import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-JGM5KAJD.js";
4
+ } from "./chunk-RHCRE6XE.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-AFFRHN5Q.js";
15
+ } from "./chunk-2GRGLTAK.js";
16
16
 
17
17
  // src/memory/persistent-memory.ts
18
18
  import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "fs";
@@ -16,7 +16,7 @@ import {
16
16
  setPreferredAgentName,
17
17
  truncateForPersist,
18
18
  undoStack
19
- } from "./chunk-2NTFG6TW.js";
19
+ } from "./chunk-2PLYXL4P.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-H24EWAHZ.js";
54
+ } from "./chunk-7L7T46PI.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-YY3MYR4F.js";
68
+ } from "./chunk-OECPGCHP.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-2UPRXHMU.js";
83
+ } from "./chunk-I2WJ44D3.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-JGM5KAJD.js";
112
+ } from "./chunk-RHCRE6XE.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-NSGQ4BQV.js");
2429
+ const { MCP_PROJECT_CONFIG_NAME } = await import("./constants-F5WA5VPO.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-DJXSR7HO.js");
3537
+ const { executeTests } = await import("./run-tests-HV37CM5U.js");
3538
3538
  const argStr = args.join(" ").trim();
3539
3539
  let testArgs = {};
3540
3540
  if (argStr) {
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  CONFIG_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-JGM5KAJD.js";
11
+ } from "./chunk-RHCRE6XE.js";
12
12
 
13
13
  // src/diagnostics/tool-stats.ts
14
14
  import { mkdirSync } from "fs";
@@ -8,13 +8,13 @@ import {
8
8
  listHooks,
9
9
  listInstalledPlugins,
10
10
  resetStats
11
- } from "./chunk-2UPRXHMU.js";
11
+ } from "./chunk-I2WJ44D3.js";
12
12
  import {
13
13
  ProviderRegistry
14
14
  } from "./chunk-VXEF2SWG.js";
15
15
  import {
16
16
  ConfigManager
17
- } from "./chunk-JOMCF5UH.js";
17
+ } from "./chunk-XIMM47EG.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-JGM5KAJD.js";
29
+ } from "./chunk-RHCRE6XE.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
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.302";
4
+ var VERSION = "0.4.304";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TEST_TIMEOUT
3
- } from "./chunk-AFFRHN5Q.js";
3
+ } from "./chunk-2GRGLTAK.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-JGM5KAJD.js";
14
+ } from "./chunk-RHCRE6XE.js";
15
15
 
16
16
  // src/config/config-manager.ts
17
17
  import { readFileSync, existsSync, mkdirSync } from "fs";
@@ -3,16 +3,16 @@ import {
3
3
  CI_COMMENT_MARKER,
4
4
  countSeverity,
5
5
  runCi
6
- } from "./chunk-CMU7EW7Z.js";
7
- import "./chunk-GI337HBI.js";
6
+ } from "./chunk-3FI4TE5S.js";
7
+ import "./chunk-6AGTDWO3.js";
8
8
  import "./chunk-HLWUDRBO.js";
9
9
  import "./chunk-6YZEZFX5.js";
10
10
  import "./chunk-VXEF2SWG.js";
11
- import "./chunk-JOMCF5UH.js";
11
+ import "./chunk-XIMM47EG.js";
12
12
  import "./chunk-MI4SFZGX.js";
13
13
  import "./chunk-TU3L3PW7.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
- import "./chunk-JGM5KAJD.js";
15
+ import "./chunk-RHCRE6XE.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-GI337HBI.js";
10
- import "./chunk-JGM5KAJD.js";
9
+ } from "./chunk-6AGTDWO3.js";
10
+ import "./chunk-RHCRE6XE.js";
11
11
  export {
12
12
  DEFAULT_CI_THRESHOLDS,
13
13
  detectCiGateSignals,
@@ -38,7 +38,7 @@ import {
38
38
  TEST_TIMEOUT,
39
39
  VERSION,
40
40
  buildUserIdentityPrompt
41
- } from "./chunk-JGM5KAJD.js";
41
+ } from "./chunk-RHCRE6XE.js";
42
42
  export {
43
43
  AGENTIC_BEHAVIOR_GUIDELINE,
44
44
  APP_NAME,
@@ -37,7 +37,7 @@ import {
37
37
  TEST_TIMEOUT,
38
38
  VERSION,
39
39
  buildUserIdentityPrompt
40
- } from "./chunk-AFFRHN5Q.js";
40
+ } from "./chunk-2GRGLTAK.js";
41
41
  export {
42
42
  AGENTIC_BEHAVIOR_GUIDELINE,
43
43
  APP_NAME,
@@ -2,16 +2,16 @@
2
2
  import {
3
3
  formatDoctorReport,
4
4
  runDoctorCli
5
- } from "./chunk-YY3MYR4F.js";
6
- import "./chunk-2UPRXHMU.js";
5
+ } from "./chunk-OECPGCHP.js";
6
+ import "./chunk-I2WJ44D3.js";
7
7
  import "./chunk-RS7SKYTS.js";
8
8
  import "./chunk-VXEF2SWG.js";
9
- import "./chunk-JOMCF5UH.js";
9
+ import "./chunk-XIMM47EG.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-JGM5KAJD.js";
14
+ import "./chunk-RHCRE6XE.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-V64KKKWH.js";
53
+ } from "./chunk-DNGUSTL6.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-AL6V4K6B.js";
69
+ } from "./chunk-TBTVV3KK.js";
70
70
  import {
71
71
  AGENTIC_BEHAVIOR_GUIDELINE,
72
72
  APP_NAME,
@@ -100,7 +100,7 @@ import {
100
100
  SUBAGENT_MAX_ROUNDS_LIMIT,
101
101
  VERSION,
102
102
  buildUserIdentityPrompt
103
- } from "./chunk-AFFRHN5Q.js";
103
+ } from "./chunk-2GRGLTAK.js";
104
104
 
105
105
  // src/web/server.ts
106
106
  import express from "express";
@@ -6448,6 +6448,11 @@ function buildErrorHint(command, stderr) {
6448
6448
  `Hint: On Windows, "-ErrorAction SilentlyContinue" silences the error MESSAGE but does NOT change the exit code \u2014 the process still exits 1 when the path doesn't exist (because powershell.exe -NonInteractive flips the exit code on any non-terminating error, silenced or not). If you're just probing for existence, use Test-Path instead \u2014 it returns $true/$false without raising: \`if (Test-Path ./mydir) { Get-ChildItem ./mydir }\` or unconditionally use \`New-Item -ItemType Directory -Force -Path ./mydir\` which is idempotent. Don't retry the same -ErrorAction SilentlyContinue probe expecting a different result.`
6449
6449
  );
6450
6450
  }
6451
+ if (IS_WINDOWS3 && /Select-Object\s+(?:[^|]*\s)?-(?:First|Last)\s+\d+/i.test(command) && /\|/.test(command)) {
6452
+ hints.push(
6453
+ `Hint: "Select-Object -First N" stops the upstream pipeline as soon as it has N items (PipelineStoppedException), and PowerShell reports that as a FAILURE even when the upstream command did its job \u2014 check the output above: if it shows the work completed (e.g. "EXPORTED 25 slide(s)"), this is a false failure and you should NOT retry. To avoid it, capture first and slice after: \`$out = <command>; $out | Select-Object -First N\`, or drop the -First and let the full output through.`
6454
+ );
6455
+ }
6451
6456
  if (IS_WINDOWS3 && /\bWrite-(?:Content|File)\b/i.test(command) && /(not recognized|无法将.*识别|不是.*cmdlet|CommandNotFoundException)/i.test(stderr)) {
6452
6457
  hints.push(
6453
6458
  `Hint: 'Write-Content' / 'Write-File' are NOT PowerShell cmdlets (common LLM hallucination). To write a file, prefer the built-in 'write_file' tool \u2014 it handles encoding/escaping cleanly and supports diff preview. If you must stay in bash: use 'Set-Content -Path <file> -Value <string> -Encoding utf8' (overwrites) or 'Add-Content' (appends) or 'Out-File -FilePath <file> -Encoding utf8'.`
@@ -8228,7 +8233,12 @@ function buildErrorPreview(content) {
8228
8233
  undecorated.push(raw[i]);
8229
8234
  }
8230
8235
  const meaningful = undecorated.filter(
8231
- (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() !== ""
8236
+ (l) => !/^(?:\[[^\]]+\]\s*)?Exit code \d+:$/.test(l.trim()) && // `formatFailureHeader()` 在拿不到退出码时打的那句 —— "Exit code N:" 同类噪声。
8237
+ // 不过滤的话它会占掉第一个展示位:2026-09-05 实战里 `export_slides.ps1 | Select-Object
8238
+ // -First 3` 提前掐断管道被 PowerShell 报成失败,预览成了
8239
+ // 「Command failed before exit code could be determined: · …\slide-02.png」——
8240
+ // 两段都没用,而真正有信息的 `EXPORTED 25 slide(s)` 就在第二行、从没上屏。
8241
+ !/^(?:\[[^\]]+\]\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() !== ""
8232
8242
  );
8233
8243
  let primary = -1;
8234
8244
  for (let i = meaningful.length - 1; i >= 0; i--) {
@@ -8729,7 +8739,7 @@ var ToolExecutor = class {
8729
8739
  ... (${lines.length - maxLines} more lines)`) : "";
8730
8740
  const truncatedNote = wasTruncated ? theme.warning(`
8731
8741
  \u26A1 Output truncated to ${getActiveMaxChars()} chars before sending to AI`) : "";
8732
- console.log(theme.toolResult("\u2713 Result: ") + theme.dim(preview) + moreLines + truncatedNote);
8742
+ console.log(theme.toolResult(`\u2713 ${name} result: `) + theme.dim(preview) + moreLines + truncatedNote);
8733
8743
  }
8734
8744
  console.log();
8735
8745
  }
@@ -9382,6 +9392,9 @@ Note: Path can be absolute or relative to cwd.`,
9382
9392
  fileCheckpoints.snapshot(filePath, ToolExecutor.currentMessageIndex);
9383
9393
  atomicWriteFileSync(filePath, res.content);
9384
9394
  }
9395
+ if (!res.ok) {
9396
+ throw new ToolError("edit_file", lines.join("\n"));
9397
+ }
9385
9398
  return lines.join("\n");
9386
9399
  }
9387
9400
  if (args["edits"] !== void 0) {
@@ -9434,6 +9447,9 @@ Note: Path can be absolute or relative to cwd.`,
9434
9447
  lines.push(` \u2717 #${r.index + 1}: ${r.error}`);
9435
9448
  }
9436
9449
  }
9450
+ if (anyFailed && stopOnError) {
9451
+ throw new ToolError("edit_file", lines.join("\n"));
9452
+ }
9437
9453
  return lines.join("\n");
9438
9454
  }
9439
9455
  const replaceArgs = normalizeReplaceArgs(args);
@@ -17198,7 +17214,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
17198
17214
  Cost: ${formatCost(cost)}` : "";
17199
17215
  let memoryLine = "";
17200
17216
  try {
17201
- const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-FE6UR6BV.js");
17217
+ const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-A7RPDLR7.js");
17202
17218
  const pending = countPendingMemories2(ctx.config.getConfigDir());
17203
17219
  if (pending > 0) memoryLine = `
17204
17220
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -18181,7 +18197,7 @@ async function handleTest(args, ctx) {
18181
18197
  const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
18182
18198
  testArgs = isCommand ? { command: argStr } : { filter: argStr };
18183
18199
  }
18184
- const runTests = ctx.runTests ?? (await import("./run-tests-FXBWWK7I.js")).executeTests;
18200
+ const runTests = ctx.runTests ?? (await import("./run-tests-MJ3SCW27.js")).executeTests;
18185
18201
  const report = await runTests(testArgs);
18186
18202
  ctx.send({ type: "info", message: report });
18187
18203
  } catch (err) {
@@ -18571,7 +18587,7 @@ async function handleMemory(args, ctx) {
18571
18587
  }
18572
18588
  if (intent.kind === "status") {
18573
18589
  const { getChatIndexStatus: getChatIndexStatus2 } = await import("./chat-index-DGUOUUQW.js");
18574
- const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-FE6UR6BV.js");
18590
+ const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-A7RPDLR7.js");
18575
18591
  const memories = listMemoryEntries2(configDir, { includeExpired: true, includeRejected: true });
18576
18592
  const injected = formatMemoryForPrompt2(configDir, process.cwd(), ctx.config.get("memory")?.maxChars);
18577
18593
  const view = buildMemoryStatusView({
@@ -18594,7 +18610,7 @@ async function handleMemory(args, ctx) {
18594
18610
  return;
18595
18611
  }
18596
18612
  if (intent.kind === "recall") {
18597
- const { searchPersistentMemories: searchPersistentMemories2, touchMemoryReferences: touchMemoryReferences2 } = await import("./persistent-memory-FE6UR6BV.js");
18613
+ const { searchPersistentMemories: searchPersistentMemories2, touchMemoryReferences: touchMemoryReferences2 } = await import("./persistent-memory-A7RPDLR7.js");
18598
18614
  const { searchChatMemory: searchChatMemory2 } = await import("./chat-index-DGUOUUQW.js");
18599
18615
  const persistentHits = searchPersistentMemories2(configDir, intent.query, process.cwd(), 3);
18600
18616
  if (persistentHits.length > 0) {
@@ -18715,7 +18731,7 @@ async function handleMemory(args, ctx) {
18715
18731
  ctx.handleMemoryManage(intent.action, args[1], intent.action === "expire" ? args[2] : void 0);
18716
18732
  } else if (intent.kind === "export") {
18717
18733
  if (args[1] === "md") {
18718
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-FE6UR6BV.js");
18734
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-A7RPDLR7.js");
18719
18735
  ctx.send({
18720
18736
  type: "export_data",
18721
18737
  format: "md",
@@ -19720,7 +19736,7 @@ No tools match "${filter}".
19720
19736
  const { join: join29 } = await import("path");
19721
19737
  const { existsSync: existsSync33 } = await import("fs");
19722
19738
  const { getGitRoot: getGitRoot2 } = await import("./git-context-VNCA2GU7.js");
19723
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-L32HFC6Y.js");
19739
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-JDPKWZJP.js");
19724
19740
  const { approveProject, hashMcpFile } = await import("./project-trust-MUG325AW.js");
19725
19741
  const cwd = process.cwd();
19726
19742
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -20639,7 +20655,7 @@ function createReviewCommands() {
20639
20655
  usage: "/test [command|filter]",
20640
20656
  async execute(args, ctx) {
20641
20657
  try {
20642
- const { executeTests } = await import("./run-tests-FXBWWK7I.js");
20658
+ const { executeTests } = await import("./run-tests-MJ3SCW27.js");
20643
20659
  const argStr = args.join(" ").trim();
20644
20660
  let testArgs = {};
20645
20661
  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-P6KDCA46.js");
161
+ const { TaskOrchestrator } = await import("./task-orchestrator-PWW5I2KE.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-PJ2J5MUD.js";
27
+ } from "./chunk-F3EJ4MIP.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-2NTFG6TW.js";
53
+ } from "./chunk-2PLYXL4P.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-H24EWAHZ.js";
66
+ } from "./chunk-7L7T46PI.js";
67
67
  import "./chunk-4DEMGCK4.js";
68
68
  import "./chunk-UUSRWSSX.js";
69
69
  import "./chunk-CKH4KQ4E.js";
@@ -84,14 +84,14 @@ import {
84
84
  import {
85
85
  loadContextFiles,
86
86
  writeCrashLog
87
- } from "./chunk-YY3MYR4F.js";
87
+ } from "./chunk-OECPGCHP.js";
88
88
  import {
89
89
  getActivePluginAssets,
90
90
  getPendingHookTrust,
91
91
  installFlushOnExit,
92
92
  mergePluginHooks,
93
93
  runLifecycleHooks
94
- } from "./chunk-2UPRXHMU.js";
94
+ } from "./chunk-I2WJ44D3.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-JOMCF5UH.js";
102
+ } from "./chunk-XIMM47EG.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-FBGHQVYB.js";
136
+ import "./chunk-BSBGPDCX.js";
137
137
  import {
138
138
  AGENTIC_BEHAVIOR_GUIDELINE,
139
139
  AUTHOR,
@@ -150,7 +150,7 @@ import {
150
150
  SKILLS_DIR_NAME,
151
151
  VERSION,
152
152
  buildUserIdentityPrompt
153
- } from "./chunk-JGM5KAJD.js";
153
+ } from "./chunk-RHCRE6XE.js";
154
154
 
155
155
  // src/index.ts
156
156
  import { program } from "commander";
@@ -1102,20 +1102,21 @@ var IMAGE_MIME = {
1102
1102
  ".webp": "image/webp"
1103
1103
  };
1104
1104
  var MAX_IMAGE_BYTES = 10 * 1024 * 1024;
1105
- var MAX_GLOB_MATCHES = 20;
1105
+ var MAX_GLOB_MATCHES = 30;
1106
1106
  function expandGlob(rawPath, cwd) {
1107
1107
  const pat = basename(rawPath);
1108
- if (!/[*?]/.test(pat)) return null;
1108
+ if (!/[*?]/.test(pat)) return { kind: "notglob" };
1109
1109
  const dirPart = dirname2(rawPath);
1110
1110
  const absDir = resolve(cwd, dirPart);
1111
1111
  let entries;
1112
1112
  try {
1113
1113
  entries = readdirSync3(absDir, { withFileTypes: true }).filter((e) => e.isFile()).map((e) => e.name);
1114
1114
  } catch {
1115
- return [];
1115
+ return { kind: "nodir", dir: dirPart };
1116
1116
  }
1117
1117
  const re = globToRegex(pat);
1118
- return entries.filter((name) => re.test(name)).sort((a, b) => a.localeCompare(b, void 0, { numeric: true, sensitivity: "base" })).map((name) => dirPart === "." ? name : join3(dirPart, name));
1118
+ const files = entries.filter((name) => re.test(name)).sort((a, b) => a.localeCompare(b, void 0, { numeric: true, sensitivity: "base" })).map((name) => dirPart === "." ? name : join3(dirPart, name));
1119
+ return { kind: "ok", files };
1119
1120
  }
1120
1121
  var MAX_PATH_SPACE_TOKENS = 8;
1121
1122
  function expandUnquotedPath(input, pathStart, rawPath, cwd) {
@@ -1185,18 +1186,22 @@ ${content}
1185
1186
  refs.push({ path: p, type: "text" });
1186
1187
  }
1187
1188
  };
1188
- const globbed = existsSync2(resolve(cwd, rawPath)) ? null : expandGlob(rawPath, cwd);
1189
- if (globbed !== null) {
1190
- if (globbed.length === 0) {
1189
+ const globbed = existsSync2(resolve(cwd, rawPath)) ? { kind: "notglob" } : expandGlob(rawPath, cwd);
1190
+ if (globbed.kind === "nodir") {
1191
+ refs.push({ path: rawPath, type: "glob-nodir", dir: globbed.dir });
1192
+ continue;
1193
+ }
1194
+ if (globbed.kind === "ok") {
1195
+ if (globbed.files.length === 0) {
1191
1196
  refs.push({ path: rawPath, type: "glob-empty" });
1192
1197
  continue;
1193
1198
  }
1194
- if (globbed.length > MAX_GLOB_MATCHES) {
1195
- refs.push({ path: rawPath, type: "glob-toomany", matched: globbed.length });
1199
+ if (globbed.files.length > MAX_GLOB_MATCHES) {
1200
+ refs.push({ path: rawPath, type: "glob-toomany", matched: globbed.files.length });
1196
1201
  continue;
1197
1202
  }
1198
1203
  textBody = textBody.replace(matchedText, "").trim();
1199
- for (const p of globbed) handleOne(p, null);
1204
+ for (const p of globbed.files) handleOne(p, null);
1200
1205
  continue;
1201
1206
  }
1202
1207
  handleOne(rawPath, matchedText);
@@ -2430,9 +2435,16 @@ Session '${this.resumeSessionId}' not found.
2430
2435
  } else if (ref.type === "toolarge") {
2431
2436
  process.stdout.write(theme.warning(` \u26A0 Image too large (> 10 MB): ${ref.path}
2432
2437
  `));
2438
+ } else if (ref.type === "glob-nodir") {
2439
+ process.stdout.write(
2440
+ theme.warning(` \u26A0 Directory does not exist: ${ref.dir ?? ""} (from ${ref.path})
2441
+ `)
2442
+ );
2433
2443
  } else if (ref.type === "glob-empty") {
2434
- process.stdout.write(theme.warning(` \u26A0 No files match: ${ref.path}
2435
- `));
2444
+ process.stdout.write(
2445
+ theme.warning(` \u26A0 No files match: ${ref.path} (directory exists but nothing matched)
2446
+ `)
2447
+ );
2436
2448
  } else if (ref.type === "glob-toomany") {
2437
2449
  process.stdout.write(
2438
2450
  theme.warning(
@@ -4049,7 +4061,7 @@ program.command("web").description("Start Web UI server with browser-based chat
4049
4061
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
4050
4062
  process.exit(1);
4051
4063
  }
4052
- const { startWebServer } = await import("./server-3S3UJX2O.js");
4064
+ const { startWebServer } = await import("./server-EZ5ULLDP.js");
4053
4065
  await startWebServer({ port, host: options.host });
4054
4066
  });
4055
4067
  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) => {
@@ -4216,11 +4228,11 @@ program.command("sessions").description("List recent conversation sessions").opt
4216
4228
  console.log(footer + "\n");
4217
4229
  });
4218
4230
  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) => {
4219
- const { runUsageCli } = await import("./usage-UB3WM7M5.js");
4231
+ const { runUsageCli } = await import("./usage-MAIV6XUZ.js");
4220
4232
  await runUsageCli(options);
4221
4233
  });
4222
4234
  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) => {
4223
- const { runDoctorCli } = await import("./doctor-cli-VF45ASWG.js");
4235
+ const { runDoctorCli } = await import("./doctor-cli-7NSEVW63.js");
4224
4236
  const argv = process.argv.slice(2);
4225
4237
  await runDoctorCli({
4226
4238
  json: !!options.json || argv.includes("--json"),
@@ -4229,7 +4241,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
4229
4241
  });
4230
4242
  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) => {
4231
4243
  try {
4232
- const batch = await import("./batch-ZNBGBQEX.js");
4244
+ const batch = await import("./batch-RY2F7BX5.js");
4233
4245
  switch (action) {
4234
4246
  case "submit":
4235
4247
  if (!arg) {
@@ -4272,7 +4284,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
4272
4284
  }
4273
4285
  });
4274
4286
  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) => {
4275
- const { startMcpServer } = await import("./server-BGUM3CRA.js");
4287
+ const { startMcpServer } = await import("./server-WI3Q4EDH.js");
4276
4288
  await startMcpServer({
4277
4289
  allowDestructive: !!options.allowDestructive,
4278
4290
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -4285,7 +4297,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
4285
4297
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
4286
4298
  process.exit(1);
4287
4299
  }
4288
- const { runPrCli } = await import("./pr-TTCQB4A4.js");
4300
+ const { runPrCli } = await import("./pr-LW755EL7.js");
4289
4301
  const result = await runPrCli({
4290
4302
  action,
4291
4303
  target,
@@ -4305,8 +4317,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
4305
4317
  process.exit(result.exitCode);
4306
4318
  });
4307
4319
  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) => {
4308
- const { runCi } = await import("./ci-V66GKRNA.js");
4309
- const { formatCiResult } = await import("./ci-format-3OFRPZVN.js");
4320
+ const { runCi } = await import("./ci-QYTLBM6Z.js");
4321
+ const { formatCiResult } = await import("./ci-format-E5X27NC2.js");
4310
4322
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
4311
4323
  if (formats > 1) {
4312
4324
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -4465,7 +4477,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
4465
4477
  config.get("customProviders"),
4466
4478
  config.getConfigDir()
4467
4479
  );
4468
- const { startHub } = await import("./hub-4PEK2GU2.js");
4480
+ const { startHub } = await import("./hub-43PWTGGO.js");
4469
4481
  await startHub(
4470
4482
  {
4471
4483
  topic: topic ?? "",
@@ -27,11 +27,11 @@ import {
27
27
  touchMemoryReferences,
28
28
  updateMemoryApproval,
29
29
  updateMemoryEntry
30
- } from "./chunk-V64KKKWH.js";
30
+ } from "./chunk-DNGUSTL6.js";
31
31
  import "./chunk-FSC6KEWU.js";
32
32
  import "./chunk-6BUTA5VW.js";
33
33
  import "./chunk-CGLYJRFA.js";
34
- import "./chunk-AFFRHN5Q.js";
34
+ import "./chunk-2GRGLTAK.js";
35
35
  export {
36
36
  addMemoryEntry,
37
37
  backupMemoryStore,
@@ -28,11 +28,11 @@ import {
28
28
  touchMemoryReferences,
29
29
  updateMemoryApproval,
30
30
  updateMemoryEntry
31
- } from "./chunk-H24EWAHZ.js";
31
+ } from "./chunk-7L7T46PI.js";
32
32
  import "./chunk-3FEZSLGI.js";
33
33
  import "./chunk-HOSJZMQS.js";
34
34
  import "./chunk-IW3Q7AE5.js";
35
- import "./chunk-JGM5KAJD.js";
35
+ import "./chunk-RHCRE6XE.js";
36
36
  export {
37
37
  addMemoryEntry,
38
38
  backupMemoryStore,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-CMU7EW7Z.js";
6
- import "./chunk-GI337HBI.js";
5
+ } from "./chunk-3FI4TE5S.js";
6
+ import "./chunk-6AGTDWO3.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-JOMCF5UH.js";
20
+ } from "./chunk-XIMM47EG.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-JGM5KAJD.js";
26
+ } from "./chunk-RHCRE6XE.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-FBGHQVYB.js";
6
- import "./chunk-JGM5KAJD.js";
5
+ } from "./chunk-BSBGPDCX.js";
6
+ import "./chunk-RHCRE6XE.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-AL6V4K6B.js";
5
- import "./chunk-AFFRHN5Q.js";
4
+ } from "./chunk-TBTVV3KK.js";
5
+ import "./chunk-2GRGLTAK.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -81,7 +81,7 @@ import {
81
81
  skillHistoryNote,
82
82
  snapshotFile,
83
83
  stripRoutingTags
84
- } from "./chunk-PJ2J5MUD.js";
84
+ } from "./chunk-F3EJ4MIP.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-2NTFG6TW.js";
129
+ } from "./chunk-2PLYXL4P.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-H24EWAHZ.js";
156
+ } from "./chunk-7L7T46PI.js";
157
157
  import "./chunk-4DEMGCK4.js";
158
158
  import "./chunk-UUSRWSSX.js";
159
159
  import "./chunk-CKH4KQ4E.js";
@@ -172,7 +172,7 @@ import {
172
172
  buildDoctorReport,
173
173
  formatDoctorReport,
174
174
  loadContextFiles
175
- } from "./chunk-YY3MYR4F.js";
175
+ } from "./chunk-OECPGCHP.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-2UPRXHMU.js";
190
+ } from "./chunk-I2WJ44D3.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-JOMCF5UH.js";
197
+ } from "./chunk-XIMM47EG.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-FBGHQVYB.js";
228
+ import "./chunk-BSBGPDCX.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-JGM5KAJD.js";
244
+ } from "./chunk-RHCRE6XE.js";
245
245
 
246
246
  // src/web/server.ts
247
247
  import express from "express";
@@ -930,7 +930,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
930
930
  Cost: ${formatCost(cost)}` : "";
931
931
  let memoryLine = "";
932
932
  try {
933
- const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-OY2LX24N.js");
933
+ const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-SHG3CJCP.js");
934
934
  const pending = countPendingMemories2(ctx.config.getConfigDir());
935
935
  if (pending > 0) memoryLine = `
936
936
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -1854,7 +1854,7 @@ async function handleTest(args, ctx) {
1854
1854
  const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
1855
1855
  testArgs = isCommand ? { command: argStr } : { filter: argStr };
1856
1856
  }
1857
- const runTests = ctx.runTests ?? (await import("./run-tests-DJXSR7HO.js")).executeTests;
1857
+ const runTests = ctx.runTests ?? (await import("./run-tests-HV37CM5U.js")).executeTests;
1858
1858
  const report = await runTests(testArgs);
1859
1859
  ctx.send({ type: "info", message: report });
1860
1860
  } catch (err) {
@@ -2129,7 +2129,7 @@ async function handleMemory(args, ctx) {
2129
2129
  }
2130
2130
  if (intent.kind === "status") {
2131
2131
  const { getChatIndexStatus } = await import("./chat-index-2D5GK2DB.js");
2132
- const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-OY2LX24N.js");
2132
+ const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-SHG3CJCP.js");
2133
2133
  const memories = listMemoryEntries2(configDir, { includeExpired: true, includeRejected: true });
2134
2134
  const injected = formatMemoryForPrompt2(configDir, process.cwd(), ctx.config.get("memory")?.maxChars);
2135
2135
  const view = buildMemoryStatusView({
@@ -2152,7 +2152,7 @@ async function handleMemory(args, ctx) {
2152
2152
  return;
2153
2153
  }
2154
2154
  if (intent.kind === "recall") {
2155
- const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-OY2LX24N.js");
2155
+ const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-SHG3CJCP.js");
2156
2156
  const { searchChatMemory } = await import("./chat-index-2D5GK2DB.js");
2157
2157
  const persistentHits = searchPersistentMemories(configDir, intent.query, process.cwd(), 3);
2158
2158
  if (persistentHits.length > 0) {
@@ -2273,7 +2273,7 @@ async function handleMemory(args, ctx) {
2273
2273
  ctx.handleMemoryManage(intent.action, args[1], intent.action === "expire" ? args[2] : void 0);
2274
2274
  } else if (intent.kind === "export") {
2275
2275
  if (args[1] === "md") {
2276
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-OY2LX24N.js");
2276
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-SHG3CJCP.js");
2277
2277
  ctx.send({
2278
2278
  type: "export_data",
2279
2279
  format: "md",
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-2NTFG6TW.js";
4
+ } from "./chunk-2PLYXL4P.js";
5
5
  import "./chunk-GHWZVPUV.js";
6
- import "./chunk-H24EWAHZ.js";
6
+ import "./chunk-7L7T46PI.js";
7
7
  import "./chunk-4DEMGCK4.js";
8
8
  import "./chunk-UUSRWSSX.js";
9
9
  import "./chunk-CKH4KQ4E.js";
@@ -14,7 +14,7 @@ import "./chunk-NYNSYLFY.js";
14
14
  import "./chunk-3FEZSLGI.js";
15
15
  import {
16
16
  runTool
17
- } from "./chunk-2UPRXHMU.js";
17
+ } from "./chunk-I2WJ44D3.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-FBGHQVYB.js";
27
+ import "./chunk-BSBGPDCX.js";
28
28
  import {
29
29
  VERSION
30
- } from "./chunk-JGM5KAJD.js";
30
+ } from "./chunk-RHCRE6XE.js";
31
31
 
32
32
  // src/mcp/server.ts
33
33
  import { createInterface } from "readline";
@@ -4,9 +4,9 @@ import {
4
4
  googleSearchContext,
5
5
  isToolCapableProvider,
6
6
  truncateOutput
7
- } from "./chunk-2NTFG6TW.js";
7
+ } from "./chunk-2PLYXL4P.js";
8
8
  import "./chunk-GHWZVPUV.js";
9
- import "./chunk-H24EWAHZ.js";
9
+ import "./chunk-7L7T46PI.js";
10
10
  import "./chunk-4DEMGCK4.js";
11
11
  import "./chunk-UUSRWSSX.js";
12
12
  import "./chunk-CKH4KQ4E.js";
@@ -17,7 +17,7 @@ import "./chunk-NYNSYLFY.js";
17
17
  import "./chunk-3FEZSLGI.js";
18
18
  import {
19
19
  runTool
20
- } from "./chunk-2UPRXHMU.js";
20
+ } from "./chunk-I2WJ44D3.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-FBGHQVYB.js";
32
+ import "./chunk-BSBGPDCX.js";
33
33
  import {
34
34
  SUBAGENT_ALLOWED_TOOLS
35
- } from "./chunk-JGM5KAJD.js";
35
+ } from "./chunk-RHCRE6XE.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-JOMCF5UH.js";
12
+ } from "./chunk-XIMM47EG.js";
13
13
  import "./chunk-TU3L3PW7.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
- import "./chunk-JGM5KAJD.js";
15
+ import "./chunk-RHCRE6XE.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.302",
3
+ "version": "0.4.304",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",