jinzd-ai-cli 0.4.245 → 0.4.246

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 (31) hide show
  1. package/dist/{batch-MRP2KUFC.js → batch-AHW7WALD.js} +2 -2
  2. package/dist/{chunk-M7BQVFMF.js → chunk-6Y42RN5H.js} +3 -3
  3. package/dist/{chunk-O357YW7E.js → chunk-CJ3BPLHZ.js} +1 -1
  4. package/dist/{chunk-WKXADWWK.js → chunk-DJDEXHOT.js} +3 -3
  5. package/dist/{chunk-A4MLBB4H.js → chunk-GQYRPBIQ.js} +20 -7
  6. package/dist/{chunk-XYXVTHOB.js → chunk-LEKOBVOQ.js} +2 -2
  7. package/dist/{chunk-UM2OVVLP.js → chunk-LZGPGPA6.js} +1 -1
  8. package/dist/{chunk-XH4JPEIZ.js → chunk-OMSOAFXY.js} +1 -1
  9. package/dist/{chunk-Y6KDBGY7.js → chunk-P2LB6S4I.js} +1 -1
  10. package/dist/{chunk-WWHTQHIN.js → chunk-USJF35NB.js} +1 -1
  11. package/dist/{chunk-H3PEWUFY.js → chunk-WYNPWHXB.js} +1 -1
  12. package/dist/{chunk-JM2DX7OY.js → chunk-XK22CVID.js} +1 -1
  13. package/dist/{chunk-KEAUVMKS.js → chunk-YQUBYTDR.js} +1 -1
  14. package/dist/{chunk-4UIVLJAP.js → chunk-Z7JROM3J.js} +1 -1
  15. package/dist/{ci-Q3LQQT7K.js → ci-VOGIC6S4.js} +4 -4
  16. package/dist/{ci-format-L2WPVFFC.js → ci-format-BHCSMT5U.js} +2 -2
  17. package/dist/{constants-DTPJHB6W.js → constants-J4OLBH72.js} +1 -1
  18. package/dist/{doctor-cli-AEVPW6VY.js → doctor-cli-IR3E3XHB.js} +4 -4
  19. package/dist/electron-server.js +22 -9
  20. package/dist/{hub-PPNKIMPG.js → hub-SFFFYMGO.js} +1 -1
  21. package/dist/index.js +19 -19
  22. package/dist/{persistent-memory-ZIC4UA2W.js → persistent-memory-3KH2EVHA.js} +2 -2
  23. package/dist/{persistent-memory-YLB2ZSB2.js → persistent-memory-EKZ2JF7M.js} +2 -2
  24. package/dist/{pr-Z3NX3SG5.js → pr-BNS3OHDM.js} +4 -4
  25. package/dist/{run-tests-WW6VCT23.js → run-tests-PW4WC4OG.js} +2 -2
  26. package/dist/{run-tests-42DWRQAR.js → run-tests-ZKHXKCQB.js} +2 -2
  27. package/dist/{server-KX6WKW6V.js → server-3HLBEWNZ.js} +5 -5
  28. package/dist/{server-NNDBF3SH.js → server-D2ID3GYA.js} +11 -11
  29. package/dist/{task-orchestrator-DEDL6YAZ.js → task-orchestrator-FMCI4RPX.js} +5 -5
  30. package/dist/{usage-QAMWSX52.js → usage-DPLNMDSJ.js} +2 -2
  31. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigManager
4
- } from "./chunk-XH4JPEIZ.js";
4
+ } from "./chunk-OMSOAFXY.js";
5
5
  import "./chunk-5ULLIOVC.js";
6
- import "./chunk-KEAUVMKS.js";
6
+ import "./chunk-YQUBYTDR.js";
7
7
  import {
8
8
  atomicWriteFileSync
9
9
  } from "./chunk-IW3Q7AE5.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  evaluateCiGate,
4
4
  normalizeCiThresholds
5
- } from "./chunk-Y6KDBGY7.js";
5
+ } from "./chunk-P2LB6S4I.js";
6
6
  import {
7
7
  buildReviewPrompt,
8
8
  buildSecurityReviewPrompt,
@@ -13,10 +13,10 @@ import {
13
13
  } from "./chunk-QYQI7ZWK.js";
14
14
  import {
15
15
  ConfigManager
16
- } from "./chunk-XH4JPEIZ.js";
16
+ } from "./chunk-OMSOAFXY.js";
17
17
  import {
18
18
  VERSION
19
- } from "./chunk-KEAUVMKS.js";
19
+ } from "./chunk-YQUBYTDR.js";
20
20
 
21
21
  // src/cli/ci.ts
22
22
  import { execFileSync } from "child_process";
@@ -6,7 +6,7 @@ import {
6
6
  MEMORY_FILE_NAME,
7
7
  MEMORY_MAX_CHARS,
8
8
  MEMORY_STORE_FILE_NAME
9
- } from "./chunk-UM2OVVLP.js";
9
+ } from "./chunk-LZGPGPA6.js";
10
10
  import {
11
11
  atomicWriteFileSync
12
12
  } from "./chunk-6BUTA5VW.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-QYQI7ZWK.js";
5
5
  import {
6
6
  ConfigManager
7
- } from "./chunk-XH4JPEIZ.js";
7
+ } from "./chunk-OMSOAFXY.js";
8
8
  import {
9
9
  getActivePluginAssets,
10
10
  getPendingHookTrust,
@@ -14,7 +14,7 @@ import {
14
14
  listHooks,
15
15
  listInstalledPlugins,
16
16
  resetStats
17
- } from "./chunk-H3PEWUFY.js";
17
+ } from "./chunk-WYNPWHXB.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-KEAUVMKS.js";
29
+ } from "./chunk-YQUBYTDR.js";
30
30
 
31
31
  // src/diagnostics/doctor-report.ts
32
32
  import { existsSync as existsSync3, statSync as statSync2 } from "fs";
@@ -7,7 +7,7 @@ import {
7
7
  searchPersistentMemories,
8
8
  touchMemoryReferences,
9
9
  updateMemoryEntry
10
- } from "./chunk-4UIVLJAP.js";
10
+ } from "./chunk-Z7JROM3J.js";
11
11
  import {
12
12
  indexProject
13
13
  } from "./chunk-K3CF65QH.js";
@@ -23,7 +23,7 @@ import {
23
23
  runHook,
24
24
  runLifecycleHooks,
25
25
  runTool
26
- } from "./chunk-H3PEWUFY.js";
26
+ } from "./chunk-WYNPWHXB.js";
27
27
  import {
28
28
  getDangerLevel,
29
29
  isFileWriteTool,
@@ -39,14 +39,14 @@ import {
39
39
  } from "./chunk-4BKXL7SM.js";
40
40
  import {
41
41
  runTestsTool
42
- } from "./chunk-JM2DX7OY.js";
42
+ } from "./chunk-XK22CVID.js";
43
43
  import {
44
44
  CONFIG_DIR_NAME,
45
45
  DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
46
46
  SUBAGENT_ALLOWED_TOOLS,
47
47
  SUBAGENT_DEFAULT_MAX_ROUNDS,
48
48
  SUBAGENT_MAX_ROUNDS_LIMIT
49
- } from "./chunk-KEAUVMKS.js";
49
+ } from "./chunk-YQUBYTDR.js";
50
50
  import {
51
51
  loadChatIndex,
52
52
  searchChatMemory
@@ -596,7 +596,7 @@ Important rules:
596
596
  }
597
597
  if (timedOut) {
598
598
  pushBashUndoEntries(beforeSnapshot, parsedTargetsBefore, effectiveCwd);
599
- throw new ToolError("bash", formatTimeoutMessage(timeout, MAX_TIMEOUT));
599
+ throw new ToolError("bash", formatTimeoutMessage(timeout, MAX_TIMEOUT, command));
600
600
  }
601
601
  if (status !== 0 || timedOut) {
602
602
  const poolStdout = (stdout ?? "").trim();
@@ -659,7 +659,7 @@ ${combined || formatFailureFallback(status)}
659
659
  const execErr = err;
660
660
  const isTimeout = execErr.code === "ETIMEDOUT" || execErr.status == null && execErr.signal === "SIGTERM" || /ETIMEDOUT/i.test(execErr.message ?? "");
661
661
  if (isTimeout) {
662
- throw new ToolError("bash", formatTimeoutMessage(timeout, MAX_TIMEOUT));
662
+ throw new ToolError("bash", formatTimeoutMessage(timeout, MAX_TIMEOUT, command));
663
663
  }
664
664
  if ("status" in execErr && execErr.status !== void 0) {
665
665
  const stderr = IS_WINDOWS3 && Buffer.isBuffer(execErr.stderr) ? decodeWindowsBuffer(execErr.stderr).trim() : execErr.stderr?.toString().trim() ?? "";
@@ -684,11 +684,24 @@ ${combined || execErr.message || formatFailureFallback(execErr.status)}
684
684
  function formatFailureHeader(status) {
685
685
  return typeof status === "number" ? `Exit code ${status}:` : "Command failed before exit code could be determined:";
686
686
  }
687
- function formatTimeoutMessage(timeout, maxTimeout) {
687
+ function looksLikeTestCommand(command) {
688
+ return (
689
+ // jest / vitest / mocha / pytest(可带 npx/yarn/pnpm 前缀,或跟在 cd xxx; 之后)
690
+ /(?:^|[;&|(\s])(?:npx\s+|yarn\s+(?:run\s+)?|pnpm\s+(?:run\s+|exec\s+)?)?(?:jest|vitest|mocha|pytest)\b/.test(command) || // npm test / npm run test:xxx / yarn test / pnpm test
691
+ /(?:^|[;&|(\s])(?:npm|yarn|pnpm)\s+(?:run\s+)?test\b/.test(command) || // go test / cargo test
692
+ /(?:^|[;&|(\s])(?:go|cargo)\s+test\b/.test(command)
693
+ );
694
+ }
695
+ function formatTimeoutMessage(timeout, maxTimeout, command) {
688
696
  const seconds = Math.round(timeout / 1e3);
697
+ const testRunnerHint = command !== void 0 && looksLikeTestCommand(command) ? [
698
+ "This looks like a TEST run. Prefer the 'run_tests' tool instead of running the test runner through bash: it has a 5-minute timeout, auto-detects the framework, and returns a structured summary (no findstr/grep filtering needed).",
699
+ ""
700
+ ] : [];
689
701
  return [
690
702
  `Command timed out after ${seconds}s.`,
691
703
  "",
704
+ ...testRunnerHint,
692
705
  "The previous command ran for longer than the timeout limit and was killed. This usually means it is scanning a large filesystem tree (recursive Get-ChildItem / find), compressing a big archive, or waiting on a network request.",
693
706
  "",
694
707
  "How to recover (pick ONE \u2014 do NOT retry the same command):",
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  truncateForPersist
4
- } from "./chunk-A4MLBB4H.js";
4
+ } from "./chunk-GQYRPBIQ.js";
5
5
  import {
6
6
  APP_NAME,
7
7
  CONFIG_DIR_NAME,
@@ -11,7 +11,7 @@ import {
11
11
  MCP_PROTOCOL_VERSION,
12
12
  MCP_TOOL_PREFIX,
13
13
  VERSION
14
- } from "./chunk-KEAUVMKS.js";
14
+ } from "./chunk-YQUBYTDR.js";
15
15
  import {
16
16
  atomicWriteFileSync
17
17
  } from "./chunk-IW3Q7AE5.js";
@@ -1,5 +1,5 @@
1
1
  // src/core/constants.ts
2
- var VERSION = "0.4.245";
2
+ var VERSION = "0.4.246";
3
3
  var APP_NAME = "ai-cli";
4
4
  var CONFIG_DIR_NAME = ".aicli";
5
5
  var CONFIG_FILE_NAME = "config.json";
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-KEAUVMKS.js";
11
+ } from "./chunk-YQUBYTDR.js";
12
12
  import {
13
13
  atomicWriteFileSync
14
14
  } from "./chunk-IW3Q7AE5.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-KEAUVMKS.js";
4
+ } from "./chunk-YQUBYTDR.js";
5
5
 
6
6
  // src/cli/ci-format.ts
7
7
  var DEFAULT_CI_THRESHOLDS = {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TEST_TIMEOUT
3
- } from "./chunk-UM2OVVLP.js";
3
+ } from "./chunk-LZGPGPA6.js";
4
4
 
5
5
  // src/tools/builtin/run-tests.ts
6
6
  import { execSync, spawnSync } from "child_process";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONFIG_DIR_NAME,
4
4
  PLUGINS_DIR_NAME
5
- } from "./chunk-KEAUVMKS.js";
5
+ } from "./chunk-YQUBYTDR.js";
6
6
  import {
7
7
  atomicWriteFileSync
8
8
  } from "./chunk-IW3Q7AE5.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-KEAUVMKS.js";
4
+ } from "./chunk-YQUBYTDR.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.245";
4
+ var VERSION = "0.4.246";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -6,7 +6,7 @@ import {
6
6
  MEMORY_FILE_NAME,
7
7
  MEMORY_MAX_CHARS,
8
8
  MEMORY_STORE_FILE_NAME
9
- } from "./chunk-KEAUVMKS.js";
9
+ } from "./chunk-YQUBYTDR.js";
10
10
  import {
11
11
  DEFAULT_PATTERNS,
12
12
  redactString
@@ -3,14 +3,14 @@ import {
3
3
  CI_COMMENT_MARKER,
4
4
  countSeverity,
5
5
  runCi
6
- } from "./chunk-M7BQVFMF.js";
7
- import "./chunk-Y6KDBGY7.js";
6
+ } from "./chunk-6Y42RN5H.js";
7
+ import "./chunk-P2LB6S4I.js";
8
8
  import "./chunk-HLWUDRBO.js";
9
9
  import "./chunk-QYQI7ZWK.js";
10
- import "./chunk-XH4JPEIZ.js";
10
+ import "./chunk-OMSOAFXY.js";
11
11
  import "./chunk-O3XSFPYH.js";
12
12
  import "./chunk-5ULLIOVC.js";
13
- import "./chunk-KEAUVMKS.js";
13
+ import "./chunk-YQUBYTDR.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
15
  export {
16
16
  CI_COMMENT_MARKER,
@@ -6,8 +6,8 @@ import {
6
6
  formatCiResult,
7
7
  formatCiSarif,
8
8
  normalizeCiThresholds
9
- } from "./chunk-Y6KDBGY7.js";
10
- import "./chunk-KEAUVMKS.js";
9
+ } from "./chunk-P2LB6S4I.js";
10
+ import "./chunk-YQUBYTDR.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-KEAUVMKS.js";
41
+ } from "./chunk-YQUBYTDR.js";
42
42
  export {
43
43
  AGENTIC_BEHAVIOR_GUIDELINE,
44
44
  APP_NAME,
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  formatDoctorReport,
4
4
  runDoctorCli
5
- } from "./chunk-WKXADWWK.js";
5
+ } from "./chunk-DJDEXHOT.js";
6
6
  import "./chunk-QYQI7ZWK.js";
7
- import "./chunk-XH4JPEIZ.js";
8
- import "./chunk-H3PEWUFY.js";
7
+ import "./chunk-OMSOAFXY.js";
8
+ import "./chunk-WYNPWHXB.js";
9
9
  import "./chunk-O3XSFPYH.js";
10
10
  import "./chunk-5ULLIOVC.js";
11
11
  import "./chunk-HOSJZMQS.js";
12
- import "./chunk-KEAUVMKS.js";
12
+ import "./chunk-YQUBYTDR.js";
13
13
  import "./chunk-IW3Q7AE5.js";
14
14
  export {
15
15
  formatDoctorReport,
@@ -34,14 +34,14 @@ import {
34
34
  touchMemoryReferences,
35
35
  updateMemoryApproval,
36
36
  updateMemoryEntry
37
- } from "./chunk-O357YW7E.js";
37
+ } from "./chunk-CJ3BPLHZ.js";
38
38
  import {
39
39
  redactJson,
40
40
  scanString
41
41
  } from "./chunk-YVTASHS5.js";
42
42
  import {
43
43
  runTestsTool
44
- } from "./chunk-WWHTQHIN.js";
44
+ } from "./chunk-USJF35NB.js";
45
45
  import {
46
46
  AGENTIC_BEHAVIOR_GUIDELINE,
47
47
  APP_NAME,
@@ -73,7 +73,7 @@ import {
73
73
  SUBAGENT_MAX_ROUNDS_LIMIT,
74
74
  VERSION,
75
75
  buildUserIdentityPrompt
76
- } from "./chunk-UM2OVVLP.js";
76
+ } from "./chunk-LZGPGPA6.js";
77
77
  import {
78
78
  hasSemanticIndex,
79
79
  semanticSearch
@@ -5243,7 +5243,7 @@ Important rules:
5243
5243
  }
5244
5244
  if (timedOut) {
5245
5245
  pushBashUndoEntries(beforeSnapshot, parsedTargetsBefore, effectiveCwd);
5246
- throw new ToolError("bash", formatTimeoutMessage(timeout, MAX_TIMEOUT));
5246
+ throw new ToolError("bash", formatTimeoutMessage(timeout, MAX_TIMEOUT, command));
5247
5247
  }
5248
5248
  if (status !== 0 || timedOut) {
5249
5249
  const poolStdout = (stdout ?? "").trim();
@@ -5306,7 +5306,7 @@ ${combined || formatFailureFallback(status)}
5306
5306
  const execErr = err;
5307
5307
  const isTimeout = execErr.code === "ETIMEDOUT" || execErr.status == null && execErr.signal === "SIGTERM" || /ETIMEDOUT/i.test(execErr.message ?? "");
5308
5308
  if (isTimeout) {
5309
- throw new ToolError("bash", formatTimeoutMessage(timeout, MAX_TIMEOUT));
5309
+ throw new ToolError("bash", formatTimeoutMessage(timeout, MAX_TIMEOUT, command));
5310
5310
  }
5311
5311
  if ("status" in execErr && execErr.status !== void 0) {
5312
5312
  const stderr = IS_WINDOWS3 && Buffer.isBuffer(execErr.stderr) ? decodeWindowsBuffer(execErr.stderr).trim() : execErr.stderr?.toString().trim() ?? "";
@@ -5331,11 +5331,24 @@ ${combined || execErr.message || formatFailureFallback(execErr.status)}
5331
5331
  function formatFailureHeader(status) {
5332
5332
  return typeof status === "number" ? `Exit code ${status}:` : "Command failed before exit code could be determined:";
5333
5333
  }
5334
- function formatTimeoutMessage(timeout, maxTimeout) {
5334
+ function looksLikeTestCommand(command) {
5335
+ return (
5336
+ // jest / vitest / mocha / pytest(可带 npx/yarn/pnpm 前缀,或跟在 cd xxx; 之后)
5337
+ /(?:^|[;&|(\s])(?:npx\s+|yarn\s+(?:run\s+)?|pnpm\s+(?:run\s+|exec\s+)?)?(?:jest|vitest|mocha|pytest)\b/.test(command) || // npm test / npm run test:xxx / yarn test / pnpm test
5338
+ /(?:^|[;&|(\s])(?:npm|yarn|pnpm)\s+(?:run\s+)?test\b/.test(command) || // go test / cargo test
5339
+ /(?:^|[;&|(\s])(?:go|cargo)\s+test\b/.test(command)
5340
+ );
5341
+ }
5342
+ function formatTimeoutMessage(timeout, maxTimeout, command) {
5335
5343
  const seconds = Math.round(timeout / 1e3);
5344
+ const testRunnerHint = command !== void 0 && looksLikeTestCommand(command) ? [
5345
+ "This looks like a TEST run. Prefer the 'run_tests' tool instead of running the test runner through bash: it has a 5-minute timeout, auto-detects the framework, and returns a structured summary (no findstr/grep filtering needed).",
5346
+ ""
5347
+ ] : [];
5336
5348
  return [
5337
5349
  `Command timed out after ${seconds}s.`,
5338
5350
  "",
5351
+ ...testRunnerHint,
5339
5352
  "The previous command ran for longer than the timeout limit and was killed. This usually means it is scanning a large filesystem tree (recursive Get-ChildItem / find), compressing a big archive, or waiting on a network request.",
5340
5353
  "",
5341
5354
  "How to recover (pick ONE \u2014 do NOT retry the same command):",
@@ -15100,7 +15113,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
15100
15113
  Cost: ${formatCost(cost)}` : "";
15101
15114
  let memoryLine = "";
15102
15115
  try {
15103
- const { countPendingMemories } = await import("./persistent-memory-YLB2ZSB2.js");
15116
+ const { countPendingMemories } = await import("./persistent-memory-EKZ2JF7M.js");
15104
15117
  const pending = countPendingMemories(ctx.config.getConfigDir());
15105
15118
  if (pending > 0) memoryLine = `
15106
15119
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -15909,7 +15922,7 @@ async function handleSecurityReview(args, ctx) {
15909
15922
  async function handleTest(args, ctx) {
15910
15923
  ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
15911
15924
  try {
15912
- const { executeTests } = await import("./run-tests-42DWRQAR.js");
15925
+ const { executeTests } = await import("./run-tests-ZKHXKCQB.js");
15913
15926
  const argStr = args.join(" ").trim();
15914
15927
  let testArgs = {};
15915
15928
  if (argStr) {
@@ -16173,7 +16186,7 @@ async function handleMemory(args, ctx) {
16173
16186
  ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
16174
16187
  } else if (sub === "export") {
16175
16188
  if (args[1] === "md") {
16176
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-YLB2ZSB2.js");
16189
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-EKZ2JF7M.js");
16177
16190
  ctx.send({
16178
16191
  type: "export_data",
16179
16192
  format: "md",
@@ -154,7 +154,7 @@ ${content}`);
154
154
  }
155
155
  }
156
156
  async function runTaskMode(config, providers, configManager, topic) {
157
- const { TaskOrchestrator } = await import("./task-orchestrator-DEDL6YAZ.js");
157
+ const { TaskOrchestrator } = await import("./task-orchestrator-FMCI4RPX.js");
158
158
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
159
159
  let interrupted = false;
160
160
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  scanProject,
18
18
  sessionHasMeaningfulContent,
19
19
  setupProxy
20
- } from "./chunk-XYXVTHOB.js";
20
+ } from "./chunk-LEKOBVOQ.js";
21
21
  import {
22
22
  computeCost,
23
23
  formatCost,
@@ -50,7 +50,7 @@ import {
50
50
  spawnAgentContext,
51
51
  theme,
52
52
  undoStack
53
- } from "./chunk-A4MLBB4H.js";
53
+ } from "./chunk-GQYRPBIQ.js";
54
54
  import {
55
55
  addMemoryEntry,
56
56
  backupMemoryStore,
@@ -76,7 +76,7 @@ import {
76
76
  touchMemoryReferences,
77
77
  updateMemoryApproval,
78
78
  updateMemoryEntry
79
- } from "./chunk-4UIVLJAP.js";
79
+ } from "./chunk-Z7JROM3J.js";
80
80
  import "./chunk-K3CF65QH.js";
81
81
  import "./chunk-UUSRWSSX.js";
82
82
  import "./chunk-CKH4KQ4E.js";
@@ -90,13 +90,13 @@ import {
90
90
  formatDoctorReport,
91
91
  loadContextFiles,
92
92
  writeCrashLog
93
- } from "./chunk-WKXADWWK.js";
93
+ } from "./chunk-DJDEXHOT.js";
94
94
  import {
95
95
  ProviderRegistry
96
96
  } from "./chunk-QYQI7ZWK.js";
97
97
  import {
98
98
  ConfigManager
99
- } from "./chunk-XH4JPEIZ.js";
99
+ } from "./chunk-OMSOAFXY.js";
100
100
  import {
101
101
  describePlugin,
102
102
  getActivePluginAssets,
@@ -113,7 +113,7 @@ import {
113
113
  trustHook,
114
114
  trustPlugin,
115
115
  untrustHook
116
- } from "./chunk-H3PEWUFY.js";
116
+ } from "./chunk-WYNPWHXB.js";
117
117
  import {
118
118
  CONTENT_ONLY_STREAM_REMINDER,
119
119
  TEE_FINAL_USER_NUDGE,
@@ -146,7 +146,7 @@ import {
146
146
  import {
147
147
  fileCheckpoints
148
148
  } from "./chunk-4BKXL7SM.js";
149
- import "./chunk-JM2DX7OY.js";
149
+ import "./chunk-XK22CVID.js";
150
150
  import {
151
151
  AGENTIC_BEHAVIOR_GUIDELINE,
152
152
  AUTHOR,
@@ -165,7 +165,7 @@ import {
165
165
  SKILLS_DIR_NAME,
166
166
  VERSION,
167
167
  buildUserIdentityPrompt
168
- } from "./chunk-KEAUVMKS.js";
168
+ } from "./chunk-YQUBYTDR.js";
169
169
  import {
170
170
  buildChatIndex,
171
171
  clearChatIndex,
@@ -1387,7 +1387,7 @@ No tools match "${filter}".
1387
1387
  const { join: join6 } = await import("path");
1388
1388
  const { existsSync: existsSync5 } = await import("fs");
1389
1389
  const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
1390
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-DTPJHB6W.js");
1390
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-J4OLBH72.js");
1391
1391
  const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
1392
1392
  const cwd = process.cwd();
1393
1393
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -2366,7 +2366,7 @@ function createReviewCommands() {
2366
2366
  usage: "/test [command|filter]",
2367
2367
  async execute(args, ctx) {
2368
2368
  try {
2369
- const { executeTests } = await import("./run-tests-WW6VCT23.js");
2369
+ const { executeTests } = await import("./run-tests-PW4WC4OG.js");
2370
2370
  const argStr = args.join(" ").trim();
2371
2371
  let testArgs = {};
2372
2372
  if (argStr) {
@@ -8014,7 +8014,7 @@ program.command("web").description("Start Web UI server with browser-based chat
8014
8014
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
8015
8015
  process.exit(1);
8016
8016
  }
8017
- const { startWebServer } = await import("./server-NNDBF3SH.js");
8017
+ const { startWebServer } = await import("./server-D2ID3GYA.js");
8018
8018
  await startWebServer({ port, host: options.host });
8019
8019
  });
8020
8020
  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) => {
@@ -8181,11 +8181,11 @@ program.command("sessions").description("List recent conversation sessions").opt
8181
8181
  console.log(footer + "\n");
8182
8182
  });
8183
8183
  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) => {
8184
- const { runUsageCli } = await import("./usage-QAMWSX52.js");
8184
+ const { runUsageCli } = await import("./usage-DPLNMDSJ.js");
8185
8185
  await runUsageCli(options);
8186
8186
  });
8187
8187
  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) => {
8188
- const { runDoctorCli } = await import("./doctor-cli-AEVPW6VY.js");
8188
+ const { runDoctorCli } = await import("./doctor-cli-IR3E3XHB.js");
8189
8189
  const argv = process.argv.slice(2);
8190
8190
  await runDoctorCli({
8191
8191
  json: !!options.json || argv.includes("--json"),
@@ -8194,7 +8194,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
8194
8194
  });
8195
8195
  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) => {
8196
8196
  try {
8197
- const batch = await import("./batch-MRP2KUFC.js");
8197
+ const batch = await import("./batch-AHW7WALD.js");
8198
8198
  switch (action) {
8199
8199
  case "submit":
8200
8200
  if (!arg) {
@@ -8237,7 +8237,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
8237
8237
  }
8238
8238
  });
8239
8239
  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) => {
8240
- const { startMcpServer } = await import("./server-KX6WKW6V.js");
8240
+ const { startMcpServer } = await import("./server-3HLBEWNZ.js");
8241
8241
  await startMcpServer({
8242
8242
  allowDestructive: !!options.allowDestructive,
8243
8243
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -8250,7 +8250,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
8250
8250
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
8251
8251
  process.exit(1);
8252
8252
  }
8253
- const { runPrCli } = await import("./pr-Z3NX3SG5.js");
8253
+ const { runPrCli } = await import("./pr-BNS3OHDM.js");
8254
8254
  const result = await runPrCli({
8255
8255
  action,
8256
8256
  target,
@@ -8270,8 +8270,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
8270
8270
  process.exit(result.exitCode);
8271
8271
  });
8272
8272
  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) => {
8273
- const { runCi } = await import("./ci-Q3LQQT7K.js");
8274
- const { formatCiResult } = await import("./ci-format-L2WPVFFC.js");
8273
+ const { runCi } = await import("./ci-VOGIC6S4.js");
8274
+ const { formatCiResult } = await import("./ci-format-BHCSMT5U.js");
8275
8275
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
8276
8276
  if (formats > 1) {
8277
8277
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -8429,7 +8429,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
8429
8429
  config.get("customProviders"),
8430
8430
  config.getConfigDir()
8431
8431
  );
8432
- const { startHub } = await import("./hub-PPNKIMPG.js");
8432
+ const { startHub } = await import("./hub-SFFFYMGO.js");
8433
8433
  await startHub(
8434
8434
  {
8435
8435
  topic: topic ?? "",
@@ -28,9 +28,9 @@ import {
28
28
  touchMemoryReferences,
29
29
  updateMemoryApproval,
30
30
  updateMemoryEntry
31
- } from "./chunk-4UIVLJAP.js";
31
+ } from "./chunk-Z7JROM3J.js";
32
32
  import "./chunk-HOSJZMQS.js";
33
- import "./chunk-KEAUVMKS.js";
33
+ import "./chunk-YQUBYTDR.js";
34
34
  import "./chunk-B5TYJO7V.js";
35
35
  import "./chunk-IW3Q7AE5.js";
36
36
  export {
@@ -27,9 +27,9 @@ import {
27
27
  touchMemoryReferences,
28
28
  updateMemoryApproval,
29
29
  updateMemoryEntry
30
- } from "./chunk-O357YW7E.js";
30
+ } from "./chunk-CJ3BPLHZ.js";
31
31
  import "./chunk-YVTASHS5.js";
32
- import "./chunk-UM2OVVLP.js";
32
+ import "./chunk-LZGPGPA6.js";
33
33
  import "./chunk-6BUTA5VW.js";
34
34
  export {
35
35
  addMemoryEntry,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-M7BQVFMF.js";
6
- import "./chunk-Y6KDBGY7.js";
5
+ } from "./chunk-6Y42RN5H.js";
6
+ import "./chunk-P2LB6S4I.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
@@ -14,12 +14,12 @@ import {
14
14
  } from "./chunk-QYQI7ZWK.js";
15
15
  import {
16
16
  ConfigManager
17
- } from "./chunk-XH4JPEIZ.js";
17
+ } from "./chunk-OMSOAFXY.js";
18
18
  import "./chunk-O3XSFPYH.js";
19
19
  import "./chunk-5ULLIOVC.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-KEAUVMKS.js";
22
+ } from "./chunk-YQUBYTDR.js";
23
23
  import "./chunk-IW3Q7AE5.js";
24
24
 
25
25
  // src/cli/pr.ts
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-JM2DX7OY.js";
6
- import "./chunk-KEAUVMKS.js";
5
+ } from "./chunk-XK22CVID.js";
6
+ import "./chunk-YQUBYTDR.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-WWHTQHIN.js";
5
- import "./chunk-UM2OVVLP.js";
4
+ } from "./chunk-USJF35NB.js";
5
+ import "./chunk-LZGPGPA6.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-A4MLBB4H.js";
5
- import "./chunk-4UIVLJAP.js";
4
+ } from "./chunk-GQYRPBIQ.js";
5
+ import "./chunk-Z7JROM3J.js";
6
6
  import "./chunk-K3CF65QH.js";
7
7
  import "./chunk-UUSRWSSX.js";
8
8
  import "./chunk-CKH4KQ4E.js";
9
9
  import "./chunk-BXP6YZ2P.js";
10
10
  import {
11
11
  runTool
12
- } from "./chunk-H3PEWUFY.js";
12
+ } from "./chunk-WYNPWHXB.js";
13
13
  import {
14
14
  getDangerLevel,
15
15
  schemaToJsonSchema
@@ -17,10 +17,10 @@ import {
17
17
  import "./chunk-5ULLIOVC.js";
18
18
  import "./chunk-HOSJZMQS.js";
19
19
  import "./chunk-4BKXL7SM.js";
20
- import "./chunk-JM2DX7OY.js";
20
+ import "./chunk-XK22CVID.js";
21
21
  import {
22
22
  VERSION
23
- } from "./chunk-KEAUVMKS.js";
23
+ } from "./chunk-YQUBYTDR.js";
24
24
  import "./chunk-IGPFYNZA.js";
25
25
  import "./chunk-KHYD3WXE.js";
26
26
  import "./chunk-PJ3ONBWZ.js";
@@ -23,7 +23,7 @@ import {
23
23
  scanDirTree,
24
24
  scanProject,
25
25
  setupProxy
26
- } from "./chunk-XYXVTHOB.js";
26
+ } from "./chunk-LEKOBVOQ.js";
27
27
  import {
28
28
  computeCost,
29
29
  formatCost,
@@ -63,7 +63,7 @@ import {
63
63
  spawnAgentContext,
64
64
  truncateOutput,
65
65
  undoStack
66
- } from "./chunk-A4MLBB4H.js";
66
+ } from "./chunk-GQYRPBIQ.js";
67
67
  import {
68
68
  addMemoryEntry,
69
69
  clearMemoryEntries,
@@ -77,7 +77,7 @@ import {
77
77
  parseWritableScope,
78
78
  updateMemoryApproval,
79
79
  updateMemoryEntry
80
- } from "./chunk-4UIVLJAP.js";
80
+ } from "./chunk-Z7JROM3J.js";
81
81
  import "./chunk-K3CF65QH.js";
82
82
  import "./chunk-UUSRWSSX.js";
83
83
  import "./chunk-CKH4KQ4E.js";
@@ -90,13 +90,13 @@ import {
90
90
  buildDoctorReport,
91
91
  formatDoctorReport,
92
92
  loadContextFiles
93
- } from "./chunk-WKXADWWK.js";
93
+ } from "./chunk-DJDEXHOT.js";
94
94
  import {
95
95
  ProviderRegistry
96
96
  } from "./chunk-QYQI7ZWK.js";
97
97
  import {
98
98
  ConfigManager
99
- } from "./chunk-XH4JPEIZ.js";
99
+ } from "./chunk-OMSOAFXY.js";
100
100
  import {
101
101
  describePlugin,
102
102
  getActivePluginAssets,
@@ -111,7 +111,7 @@ import {
111
111
  runTool,
112
112
  setPluginEnabled,
113
113
  trustPlugin
114
- } from "./chunk-H3PEWUFY.js";
114
+ } from "./chunk-WYNPWHXB.js";
115
115
  import {
116
116
  CONTENT_ONLY_STREAM_REMINDER,
117
117
  TEE_FINAL_USER_NUDGE,
@@ -135,7 +135,7 @@ import {
135
135
  getGitRoot
136
136
  } from "./chunk-HOSJZMQS.js";
137
137
  import "./chunk-4BKXL7SM.js";
138
- import "./chunk-JM2DX7OY.js";
138
+ import "./chunk-XK22CVID.js";
139
139
  import {
140
140
  AGENTIC_BEHAVIOR_GUIDELINE,
141
141
  AUTHOR,
@@ -151,7 +151,7 @@ import {
151
151
  SKILLS_DIR_NAME,
152
152
  VERSION,
153
153
  buildUserIdentityPrompt
154
- } from "./chunk-KEAUVMKS.js";
154
+ } from "./chunk-YQUBYTDR.js";
155
155
  import "./chunk-IGPFYNZA.js";
156
156
  import "./chunk-KHYD3WXE.js";
157
157
  import "./chunk-PJ3ONBWZ.js";
@@ -803,7 +803,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
803
803
  Cost: ${formatCost(cost)}` : "";
804
804
  let memoryLine = "";
805
805
  try {
806
- const { countPendingMemories } = await import("./persistent-memory-ZIC4UA2W.js");
806
+ const { countPendingMemories } = await import("./persistent-memory-3KH2EVHA.js");
807
807
  const pending = countPendingMemories(ctx.config.getConfigDir());
808
808
  if (pending > 0) memoryLine = `
809
809
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -1612,7 +1612,7 @@ async function handleSecurityReview(args, ctx) {
1612
1612
  async function handleTest(args, ctx) {
1613
1613
  ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
1614
1614
  try {
1615
- const { executeTests } = await import("./run-tests-WW6VCT23.js");
1615
+ const { executeTests } = await import("./run-tests-PW4WC4OG.js");
1616
1616
  const argStr = args.join(" ").trim();
1617
1617
  let testArgs = {};
1618
1618
  if (argStr) {
@@ -1876,7 +1876,7 @@ async function handleMemory(args, ctx) {
1876
1876
  ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
1877
1877
  } else if (sub === "export") {
1878
1878
  if (args[1] === "md") {
1879
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-ZIC4UA2W.js");
1879
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-3KH2EVHA.js");
1880
1880
  ctx.send({
1881
1881
  type: "export_data",
1882
1882
  format: "md",
@@ -3,15 +3,15 @@ import {
3
3
  ToolRegistry,
4
4
  googleSearchContext,
5
5
  truncateOutput
6
- } from "./chunk-A4MLBB4H.js";
7
- import "./chunk-4UIVLJAP.js";
6
+ } from "./chunk-GQYRPBIQ.js";
7
+ import "./chunk-Z7JROM3J.js";
8
8
  import "./chunk-K3CF65QH.js";
9
9
  import "./chunk-UUSRWSSX.js";
10
10
  import "./chunk-CKH4KQ4E.js";
11
11
  import "./chunk-BXP6YZ2P.js";
12
12
  import {
13
13
  runTool
14
- } from "./chunk-H3PEWUFY.js";
14
+ } from "./chunk-WYNPWHXB.js";
15
15
  import {
16
16
  getDangerLevel,
17
17
  runLeanAgentLoop
@@ -19,10 +19,10 @@ import {
19
19
  import "./chunk-5ULLIOVC.js";
20
20
  import "./chunk-HOSJZMQS.js";
21
21
  import "./chunk-4BKXL7SM.js";
22
- import "./chunk-JM2DX7OY.js";
22
+ import "./chunk-XK22CVID.js";
23
23
  import {
24
24
  SUBAGENT_ALLOWED_TOOLS
25
- } from "./chunk-KEAUVMKS.js";
25
+ } from "./chunk-YQUBYTDR.js";
26
26
  import "./chunk-IGPFYNZA.js";
27
27
  import "./chunk-KHYD3WXE.js";
28
28
  import "./chunk-PJ3ONBWZ.js";
@@ -8,9 +8,9 @@ import {
8
8
  } from "./chunk-E44DTERW.js";
9
9
  import {
10
10
  ConfigManager
11
- } from "./chunk-XH4JPEIZ.js";
11
+ } from "./chunk-OMSOAFXY.js";
12
12
  import "./chunk-5ULLIOVC.js";
13
- import "./chunk-KEAUVMKS.js";
13
+ import "./chunk-YQUBYTDR.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
15
 
16
16
  // src/cli/usage.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.245",
3
+ "version": "0.4.246",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",