jinzd-ai-cli 0.4.295 → 0.4.298

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-3YJGOO27.js → batch-UFTO2RGM.js} +2 -2
  2. package/dist/{chunk-5S6TUBTA.js → chunk-2HRGMGPB.js} +3 -3
  3. package/dist/{chunk-57OZ53J3.js → chunk-543ON5UN.js} +1 -1
  4. package/dist/{chunk-NAMXORM7.js → chunk-6ILVIYFW.js} +1 -1
  5. package/dist/{chunk-TZE5CEJZ.js → chunk-BFWARWZ6.js} +1 -1
  6. package/dist/{chunk-WYKSHBLL.js → chunk-BT4JXLQU.js} +203 -166
  7. package/dist/{chunk-4LQVBW2I.js → chunk-COEXRESK.js} +1 -1
  8. package/dist/{chunk-VJQOSTNU.js → chunk-D2D65MIH.js} +48 -11
  9. package/dist/{chunk-A6O7AMFD.js → chunk-OJNKVVD6.js} +1 -1
  10. package/dist/{chunk-4VYLPFZJ.js → chunk-PNV7E7UZ.js} +1 -1
  11. package/dist/{chunk-EI5O25IE.js → chunk-PSAPNEQI.js} +1 -1
  12. package/dist/{chunk-PE3A74UB.js → chunk-TEXCRSK5.js} +3 -3
  13. package/dist/{chunk-OFRXL4RX.js → chunk-UI7I4T7J.js} +1 -1
  14. package/dist/{chunk-ZEITAL5P.js → chunk-WAXJFG2Q.js} +1 -1
  15. package/dist/{ci-ANIX7GOB.js → ci-I2UICVIW.js} +4 -4
  16. package/dist/{ci-format-PSAAKM7J.js → ci-format-BMQRW4WC.js} +2 -2
  17. package/dist/{constants-IMX6ST62.js → constants-H4QGG5YE.js} +1 -1
  18. package/dist/{constants-LUKORJS3.js → constants-SYTUPV5I.js} +1 -1
  19. package/dist/{doctor-cli-ALBAFMWO.js → doctor-cli-SZSIME44.js} +4 -4
  20. package/dist/electron-server.js +93 -19
  21. package/dist/{hub-YHUOMU6E.js → hub-3RKL7J3R.js} +1 -1
  22. package/dist/index.js +17 -17
  23. package/dist/{persistent-memory-QA46MVVY.js → persistent-memory-6S5GO7FQ.js} +2 -2
  24. package/dist/{persistent-memory-M24MHHKF.js → persistent-memory-IGWFOLMR.js} +2 -2
  25. package/dist/{pr-656V2Z3H.js → pr-BCFZ6HZJ.js} +4 -4
  26. package/dist/{run-tests-JGKTKLMH.js → run-tests-DVEVNMTC.js} +2 -2
  27. package/dist/{run-tests-PY4EEU2J.js → run-tests-G2BVEVOQ.js} +2 -2
  28. package/dist/{server-G2IOJCTM.js → server-6LKW6APS.js} +5 -5
  29. package/dist/{server-KBWU6U33.js → server-PXZ6FI65.js} +13 -13
  30. package/dist/{task-orchestrator-JNGGZIOX.js → task-orchestrator-UYABIWYV.js} +5 -5
  31. package/dist/{usage-YBWBEOBO.js → usage-H6MA2L6M.js} +2 -2
  32. package/package.json +4 -1
@@ -13,7 +13,7 @@ import {
13
13
  MEMORY_FILE_NAME,
14
14
  MEMORY_MAX_CHARS,
15
15
  MEMORY_STORE_FILE_NAME
16
- } from "./chunk-57OZ53J3.js";
16
+ } from "./chunk-543ON5UN.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-57OZ53J3.js";
4
+ } from "./chunk-543ON5UN.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -8,13 +8,13 @@ import {
8
8
  listHooks,
9
9
  listInstalledPlugins,
10
10
  resetStats
11
- } from "./chunk-4LQVBW2I.js";
11
+ } from "./chunk-COEXRESK.js";
12
12
  import {
13
13
  ProviderRegistry
14
14
  } from "./chunk-FBOVBL7P.js";
15
15
  import {
16
16
  ConfigManager
17
- } from "./chunk-NAMXORM7.js";
17
+ } from "./chunk-6ILVIYFW.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-57OZ53J3.js";
29
+ } from "./chunk-543ON5UN.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-57OZ53J3.js";
4
+ } from "./chunk-543ON5UN.js";
5
5
 
6
6
  // src/cli/ci-format.ts
7
7
  var DEFAULT_CI_THRESHOLDS = {
@@ -1,5 +1,5 @@
1
1
  // src/core/constants.ts
2
- var VERSION = "0.4.295";
2
+ var VERSION = "0.4.298";
3
3
  var APP_NAME = "ai-cli";
4
4
  var CONFIG_DIR_NAME = ".aicli";
5
5
  var CONFIG_FILE_NAME = "config.json";
@@ -3,16 +3,16 @@ import {
3
3
  CI_COMMENT_MARKER,
4
4
  countSeverity,
5
5
  runCi
6
- } from "./chunk-5S6TUBTA.js";
7
- import "./chunk-OFRXL4RX.js";
6
+ } from "./chunk-2HRGMGPB.js";
7
+ import "./chunk-UI7I4T7J.js";
8
8
  import "./chunk-HLWUDRBO.js";
9
9
  import "./chunk-6YZEZFX5.js";
10
10
  import "./chunk-FBOVBL7P.js";
11
- import "./chunk-NAMXORM7.js";
11
+ import "./chunk-6ILVIYFW.js";
12
12
  import "./chunk-Y56UGZPX.js";
13
13
  import "./chunk-TU3L3PW7.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
- import "./chunk-57OZ53J3.js";
15
+ import "./chunk-543ON5UN.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-OFRXL4RX.js";
10
- import "./chunk-57OZ53J3.js";
9
+ } from "./chunk-UI7I4T7J.js";
10
+ import "./chunk-543ON5UN.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-57OZ53J3.js";
41
+ } from "./chunk-543ON5UN.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-ZEITAL5P.js";
40
+ } from "./chunk-WAXJFG2Q.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-PE3A74UB.js";
6
- import "./chunk-4LQVBW2I.js";
5
+ } from "./chunk-TEXCRSK5.js";
6
+ import "./chunk-COEXRESK.js";
7
7
  import "./chunk-RS7SKYTS.js";
8
8
  import "./chunk-FBOVBL7P.js";
9
- import "./chunk-NAMXORM7.js";
9
+ import "./chunk-6ILVIYFW.js";
10
10
  import "./chunk-Y56UGZPX.js";
11
11
  import "./chunk-TU3L3PW7.js";
12
12
  import "./chunk-HOSJZMQS.js";
13
13
  import "./chunk-IW3Q7AE5.js";
14
- import "./chunk-57OZ53J3.js";
14
+ import "./chunk-543ON5UN.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-A6O7AMFD.js";
53
+ } from "./chunk-OJNKVVD6.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-TZE5CEJZ.js";
69
+ } from "./chunk-BFWARWZ6.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-ZEITAL5P.js";
103
+ } from "./chunk-WAXJFG2Q.js";
104
104
 
105
105
  // src/web/server.ts
106
106
  import express from "express";
@@ -6047,7 +6047,8 @@ Important rules:
6047
6047
  3. Multiple commands can be combined with semicolons in a single call to reduce rounds.
6048
6048
  4. To delete directories, use Remove-Item -Recurse (the system will automatically optimize to a more reliable method).
6049
6049
  5. IMPORTANT: On Windows, "curl" is an alias for Invoke-WebRequest and does NOT support curl flags like -s, -X, -H. Use Invoke-RestMethod instead for HTTP requests. Example: Invoke-RestMethod -Uri "http://localhost:3000/api/health" -Method Get
6050
- 6. NEVER run long-running / never-exiting commands through bash \u2014 they block until timeout. This includes starting an Android emulator (emulator -avd X), streaming logs (adb logcat), and dev servers (node server.js, npm run dev, metro / react-native start). Use the 'task_create' tool to run these in the background, then poll status with short bash calls (e.g. adb shell getprop sys.boot_completed).` : `Execute commands in ${SHELL2}.
6050
+ 6. NEVER run long-running / never-exiting commands through bash \u2014 they block until timeout. This includes starting an Android emulator (emulator -avd X), streaming logs (adb logcat), and dev servers (node server.js, npm run dev, metro / react-native start). Use the 'task_create' tool to run these in the background, then poll status with short bash calls (e.g. adb shell getprop sys.boot_completed).
6051
+ 7. CRITICAL \u2014 this is PowerShell, NOT bash: \\ is NOT an escape character. Writing \\" inside a double-quoted string CLOSES the string and silently splits your command into fragments \u2014 it often still exits 0 with no output, so it looks like it worked when it did not. To escape a quote use \`" or "". For anything with nested quoting (especially ssh + psql -c "SELECT ..."), do NOT try to escape your way out: write the payload to a file with the 'write_file' tool, 'scp' it to the host, and run it with a single level of quoting (e.g. ssh host "psql -d db -f /tmp/x.sql").` : `Execute commands in ${SHELL2}.
6051
6052
  Important rules:
6052
6053
  1. Each bash call runs in an independent subprocess; cd commands do not persist. To run in a specific directory, use the cwd parameter, or combine commands: e.g. "cd mydir && ls" or "mkdir -p mydir && touch mydir/file.txt".
6053
6054
  2. If a command fails (returns an error or non-zero exit code), stop immediately, report the error to the user, and do not retry the same or similar commands.
@@ -6165,7 +6166,7 @@ ${combined || formatFailureFallback(status)}
6165
6166
  }
6166
6167
  pushBashUndoEntries(beforeSnapshot, parsedTargetsBefore, effectiveCwd);
6167
6168
  updateCwdFromCommand(command, effectiveCwd);
6168
- return stdout || "(command completed with no output)";
6169
+ return stdout || emptyOutputResult(command);
6169
6170
  }
6170
6171
  try {
6171
6172
  const { stdout, stderr, status, signal, timedOut, aborted } = await runShell(
@@ -6202,7 +6203,7 @@ ${combined || formatFailureFallback(status)}
6202
6203
  updateCwdFromCommand(command, effectiveCwd);
6203
6204
  pushBashUndoEntries(beforeSnapshot, parsedTargetsBefore, effectiveCwd);
6204
6205
  const result = Buffer.isBuffer(stdout) ? IS_WINDOWS3 ? decodeWindowsBuffer(stdout) : stdout.toString("utf-8") : String(stdout ?? "");
6205
- return result || "(command completed with no output)";
6206
+ return result || emptyOutputResult(command);
6206
6207
  } catch (err) {
6207
6208
  pushBashUndoEntries(beforeSnapshot, parsedTargetsBefore, effectiveCwd);
6208
6209
  if (err && typeof err === "object") {
@@ -6283,6 +6284,30 @@ function fixWindowsDeleteCommand(command) {
6283
6284
  }
6284
6285
  );
6285
6286
  }
6287
+ function detectPowerShellBackslashQuote(command) {
6288
+ if (!IS_WINDOWS3) return false;
6289
+ let inSingle = false;
6290
+ let inDouble = false;
6291
+ for (let i = 0; i < command.length; i++) {
6292
+ const ch = command[i];
6293
+ if (ch === "\\" && command[i + 1] === '"') {
6294
+ if (inDouble && !inSingle) return true;
6295
+ i++;
6296
+ continue;
6297
+ }
6298
+ if (ch === "'" && !inDouble) inSingle = !inSingle;
6299
+ else if (ch === '"' && !inSingle) inDouble = !inDouble;
6300
+ }
6301
+ return false;
6302
+ }
6303
+ var BACKSLASH_QUOTE_SILENT_WARNING = `
6304
+
6305
+ \u26A0 WARNING: this command contains \\" inside a double-quoted string, but PowerShell does NOT treat \\ as an escape \u2014 that quote CLOSED the string and the command was split into fragments. It exited 0 with no output because the outer program (e.g. ssh) still ran, but it very likely did NOT run what you intended. Do NOT assume this succeeded.
6306
+ Fix: write the payload to a local file with the 'write_file' tool, then 'scp' it over and run 'ssh host "psql -d <db> -f /tmp/x.sql"' (single level of quoting). Inside PowerShell strings, escape a quote with \`" or "" \u2014 never \\".`;
6307
+ function emptyOutputResult(command) {
6308
+ const base = "(command completed with no output)";
6309
+ return detectPowerShellBackslashQuote(command) ? base + BACKSLASH_QUOTE_SILENT_WARNING : base;
6310
+ }
6286
6311
  function buildErrorHint(command, stderr) {
6287
6312
  const hints = [];
6288
6313
  if (IS_WINDOWS3 && /\|\|/.test(command) && /(\|\||is not a valid argument|不是此版本中的有效|ParserError|Unexpected token)/i.test(stderr)) {
@@ -6329,6 +6354,11 @@ function buildErrorHint(command, stderr) {
6329
6354
  `Hint: PostgreSQL says column "${colMissing[1]}" does not exist. Do NOT retry with a guess \u2014 query the actual schema first: \`psql -c "\\d <table>"\` or \`SELECT column_name FROM information_schema.columns WHERE table_name='<table>';\`. Common pitfall: not every table has a 'deleted' soft-delete column.`
6330
6355
  );
6331
6356
  }
6357
+ if (detectPowerShellBackslashQuote(command) && !/^\s*ssh\b/.test(command) && /(syntax error|unexpected|ParserError|parser|意外的|语法|所在位置\s+行|EOF)/i.test(stderr)) {
6358
+ hints.push(
6359
+ `Hint: PowerShell does NOT treat \\ as an escape character \u2014 the \\" in this command closed the double-quoted string and split the command into fragments. Escape quotes with \`" or "" instead. Better: avoid nested quoting entirely \u2014 write the payload to a file with 'write_file', 'scp' it over, and run it with one level of quoting (e.g. ssh host "psql -d <db> -f /tmp/x.sql").`
6360
+ );
6361
+ }
6332
6362
  return hints.length > 0 ? hints.map((h) => `\u{1F4A1} ${h}`).join("\n\n") : null;
6333
6363
  }
6334
6364
  function detectBlockingCommand(command) {
@@ -8299,7 +8329,8 @@ var ToolExecutor = class {
8299
8329
  return Promise.all(calls.map((call) => this.execute(call)));
8300
8330
  }
8301
8331
  console.log();
8302
- console.log(theme.heading(`\u270E Batch file writes (${calls.length} files):`));
8332
+ const roundBadge = this.totalRounds > 0 ? theme.dim(` [${this.round}/${this.totalRounds}]`) : "";
8333
+ console.log(theme.heading(`\u270E Batch file writes (${calls.length} files):`) + roundBadge);
8303
8334
  console.log(theme.dim("\u2500".repeat(50)));
8304
8335
  for (let i = 0; i < calls.length; i++) {
8305
8336
  const call = calls[i];
@@ -8685,9 +8716,15 @@ var subAgentGuard = {
8685
8716
  active: false
8686
8717
  };
8687
8718
 
8719
+ // src/tools/text-metrics.ts
8720
+ function countTextLines(text) {
8721
+ if (text === "") return 0;
8722
+ return text.replace(/\n$/, "").split("\n").length;
8723
+ }
8724
+
8688
8725
  // src/tools/builtin/write-file.ts
8689
8726
  function countFileLines(filePath) {
8690
- return readFileSync10(filePath, "utf-8").split("\n").length;
8727
+ return countTextLines(readFileSync10(filePath, "utf-8"));
8691
8728
  }
8692
8729
  var writeFileTool = {
8693
8730
  definition: {
@@ -8746,7 +8783,7 @@ Do NOT split a long document into many write_file(append=true) calls. That patte
8746
8783
  } else {
8747
8784
  atomicWriteFileSync(filePath, encoding === "utf-8" || encoding === "utf8" ? content : Buffer.from(content, encoding));
8748
8785
  }
8749
- const lines = content.split("\n").length;
8786
+ const lines = countTextLines(content);
8750
8787
  const bytes = Buffer.byteLength(content, encoding);
8751
8788
  const mode = appendMode ? "appended" : "written";
8752
8789
  void (async () => {
@@ -10602,7 +10639,7 @@ Any of these triggers means use save_last_response, NOT write_file:
10602
10639
  undoStack.push(filePath, `save_last_response: ${filePath}`);
10603
10640
  mkdirSync7(dirname6(filePath), { recursive: true });
10604
10641
  atomicWriteFileSync(filePath, content);
10605
- const lines = content.split("\n").length;
10642
+ const lines = countTextLines(content);
10606
10643
  return `File saved: ${filePath} (${lines} lines, ${Buffer.byteLength(content, "utf-8")} bytes)`;
10607
10644
  }
10608
10645
  };
@@ -13839,6 +13876,39 @@ var SkillManager = class {
13839
13876
  return this.skillsDir;
13840
13877
  }
13841
13878
  };
13879
+ function levenshtein(a, b) {
13880
+ const m = a.length, n = b.length;
13881
+ if (m === 0) return n;
13882
+ if (n === 0) return m;
13883
+ let prev = Array.from({ length: n + 1 }, (_, j) => j);
13884
+ for (let i = 1; i <= m; i++) {
13885
+ const cur = [i];
13886
+ for (let j = 1; j <= n; j++) {
13887
+ const cost = a[i - 1] === b[j - 1] ? 0 : 1;
13888
+ cur[j] = Math.min(prev[j] + 1, cur[j - 1] + 1, prev[j - 1] + cost);
13889
+ }
13890
+ prev = cur;
13891
+ }
13892
+ return prev[n];
13893
+ }
13894
+ function suggestSkillName(names, input) {
13895
+ const norm2 = (s) => s.toLowerCase().replace(/[-_\s]/g, "");
13896
+ const target = norm2(input);
13897
+ if (!target) return null;
13898
+ const exact = names.find((n) => norm2(n) === target);
13899
+ if (exact) return exact;
13900
+ const limit = Math.min(3, Math.max(1, Math.floor(target.length / 4)));
13901
+ let best = null;
13902
+ let bestScore = Infinity;
13903
+ for (const n of names) {
13904
+ const d = levenshtein(norm2(n), target);
13905
+ if (d <= limit && d < bestScore) {
13906
+ best = n;
13907
+ bestScore = d;
13908
+ }
13909
+ }
13910
+ return best;
13911
+ }
13842
13912
 
13843
13913
  // src/web/tool-executor-web.ts
13844
13914
  import { randomUUID as randomUUID2 } from "crypto";
@@ -16961,7 +17031,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
16961
17031
  Cost: ${formatCost(cost)}` : "";
16962
17032
  let memoryLine = "";
16963
17033
  try {
16964
- const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-M24MHHKF.js");
17034
+ const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-IGWFOLMR.js");
16965
17035
  const pending = countPendingMemories2(ctx.config.getConfigDir());
16966
17036
  if (pending > 0) memoryLine = `
16967
17037
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -17944,7 +18014,7 @@ async function handleTest(args, ctx) {
17944
18014
  const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
17945
18015
  testArgs = isCommand ? { command: argStr } : { filter: argStr };
17946
18016
  }
17947
- const runTests = ctx.runTests ?? (await import("./run-tests-JGKTKLMH.js")).executeTests;
18017
+ const runTests = ctx.runTests ?? (await import("./run-tests-DVEVNMTC.js")).executeTests;
17948
18018
  const report = await runTests(testArgs);
17949
18019
  ctx.send({ type: "info", message: report });
17950
18020
  } catch (err) {
@@ -18334,7 +18404,7 @@ async function handleMemory(args, ctx) {
18334
18404
  }
18335
18405
  if (intent.kind === "status") {
18336
18406
  const { getChatIndexStatus: getChatIndexStatus2 } = await import("./chat-index-DGUOUUQW.js");
18337
- const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-M24MHHKF.js");
18407
+ const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-IGWFOLMR.js");
18338
18408
  const memories = listMemoryEntries2(configDir, { includeExpired: true, includeRejected: true });
18339
18409
  const injected = formatMemoryForPrompt2(configDir, process.cwd(), ctx.config.get("memory")?.maxChars);
18340
18410
  const view = buildMemoryStatusView({
@@ -18357,7 +18427,7 @@ async function handleMemory(args, ctx) {
18357
18427
  return;
18358
18428
  }
18359
18429
  if (intent.kind === "recall") {
18360
- const { searchPersistentMemories: searchPersistentMemories2, touchMemoryReferences: touchMemoryReferences2 } = await import("./persistent-memory-M24MHHKF.js");
18430
+ const { searchPersistentMemories: searchPersistentMemories2, touchMemoryReferences: touchMemoryReferences2 } = await import("./persistent-memory-IGWFOLMR.js");
18361
18431
  const { searchChatMemory: searchChatMemory2 } = await import("./chat-index-DGUOUUQW.js");
18362
18432
  const persistentHits = searchPersistentMemories2(configDir, intent.query, process.cwd(), 3);
18363
18433
  if (persistentHits.length > 0) {
@@ -18478,7 +18548,7 @@ async function handleMemory(args, ctx) {
18478
18548
  ctx.handleMemoryManage(intent.action, args[1], intent.action === "expire" ? args[2] : void 0);
18479
18549
  } else if (intent.kind === "export") {
18480
18550
  if (args[1] === "md") {
18481
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-M24MHHKF.js");
18551
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-IGWFOLMR.js");
18482
18552
  ctx.send({
18483
18553
  type: "export_data",
18484
18554
  format: "md",
@@ -19483,7 +19553,7 @@ No tools match "${filter}".
19483
19553
  const { join: join29 } = await import("path");
19484
19554
  const { existsSync: existsSync33 } = await import("fs");
19485
19555
  const { getGitRoot: getGitRoot2 } = await import("./git-context-VNCA2GU7.js");
19486
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-LUKORJS3.js");
19556
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-SYTUPV5I.js");
19487
19557
  const { approveProject, hashMcpFile } = await import("./project-trust-MUG325AW.js");
19488
19558
  const cwd = process.cwd();
19489
19559
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -19632,9 +19702,13 @@ No tools match "${filter}".
19632
19702
  ctx.renderer.printSuccess(`Reloaded: ${count} skill(s) found.`);
19633
19703
  return;
19634
19704
  }
19635
- const target = manager.listSkills().find((s) => s.meta.name === sub);
19705
+ const allSkills = manager.listSkills();
19706
+ const target = allSkills.find((s) => s.meta.name === sub);
19636
19707
  if (!target) {
19637
- ctx.renderer.renderError(`Skill '${sub}' not found. Use /skill list to see available skills.`);
19708
+ const guess = suggestSkillName(allSkills.map((s) => s.meta.name), sub);
19709
+ ctx.renderer.renderError(
19710
+ guess ? `Skill '${sub}' not found. Did you mean '${guess}'? (/skill ${guess})` : `Skill '${sub}' not found. Use /skill list to see available skills.`
19711
+ );
19638
19712
  return;
19639
19713
  }
19640
19714
  const prev = manager.getActive();
@@ -20398,7 +20472,7 @@ function createReviewCommands() {
20398
20472
  usage: "/test [command|filter]",
20399
20473
  async execute(args, ctx) {
20400
20474
  try {
20401
- const { executeTests } = await import("./run-tests-JGKTKLMH.js");
20475
+ const { executeTests } = await import("./run-tests-DVEVNMTC.js");
20402
20476
  const argStr = args.join(" ").trim();
20403
20477
  let testArgs = {};
20404
20478
  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-JNGGZIOX.js");
161
+ const { TaskOrchestrator } = await import("./task-orchestrator-UYABIWYV.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-WYKSHBLL.js";
27
+ } from "./chunk-BT4JXLQU.js";
28
28
  import {
29
29
  CostTracker,
30
30
  getPricing,
@@ -49,7 +49,7 @@ import {
49
49
  setMaxOutputCap,
50
50
  spawnAgentContext,
51
51
  undoStack
52
- } from "./chunk-VJQOSTNU.js";
52
+ } from "./chunk-D2D65MIH.js";
53
53
  import "./chunk-HLWUDRBO.js";
54
54
  import {
55
55
  NO_THINKING,
@@ -62,7 +62,7 @@ import {
62
62
  countPendingMemories,
63
63
  detectStaleLegacyMarkdownEdit,
64
64
  formatMemoryForPrompt
65
- } from "./chunk-4VYLPFZJ.js";
65
+ } from "./chunk-PNV7E7UZ.js";
66
66
  import "./chunk-4DEMGCK4.js";
67
67
  import "./chunk-UUSRWSSX.js";
68
68
  import "./chunk-CKH4KQ4E.js";
@@ -83,14 +83,14 @@ import {
83
83
  import {
84
84
  loadContextFiles,
85
85
  writeCrashLog
86
- } from "./chunk-PE3A74UB.js";
86
+ } from "./chunk-TEXCRSK5.js";
87
87
  import {
88
88
  getActivePluginAssets,
89
89
  getPendingHookTrust,
90
90
  installFlushOnExit,
91
91
  mergePluginHooks,
92
92
  runLifecycleHooks
93
- } from "./chunk-4LQVBW2I.js";
93
+ } from "./chunk-COEXRESK.js";
94
94
  import "./chunk-RS7SKYTS.js";
95
95
  import {
96
96
  ProviderRegistry,
@@ -98,7 +98,7 @@ import {
98
98
  } from "./chunk-FBOVBL7P.js";
99
99
  import {
100
100
  ConfigManager
101
- } from "./chunk-NAMXORM7.js";
101
+ } from "./chunk-6ILVIYFW.js";
102
102
  import {
103
103
  CONTENT_ONLY_STREAM_REMINDER,
104
104
  TEE_FINAL_USER_NUDGE,
@@ -132,7 +132,7 @@ import {
132
132
  } from "./chunk-IW3Q7AE5.js";
133
133
  import "./chunk-XNFIYS7G.js";
134
134
  import "./chunk-4BKXL7SM.js";
135
- import "./chunk-EI5O25IE.js";
135
+ import "./chunk-PSAPNEQI.js";
136
136
  import {
137
137
  AGENTIC_BEHAVIOR_GUIDELINE,
138
138
  AUTHOR,
@@ -149,7 +149,7 @@ import {
149
149
  SKILLS_DIR_NAME,
150
150
  VERSION,
151
151
  buildUserIdentityPrompt
152
- } from "./chunk-57OZ53J3.js";
152
+ } from "./chunk-543ON5UN.js";
153
153
 
154
154
  // src/index.ts
155
155
  import { program } from "commander";
@@ -4005,7 +4005,7 @@ program.command("web").description("Start Web UI server with browser-based chat
4005
4005
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
4006
4006
  process.exit(1);
4007
4007
  }
4008
- const { startWebServer } = await import("./server-KBWU6U33.js");
4008
+ const { startWebServer } = await import("./server-PXZ6FI65.js");
4009
4009
  await startWebServer({ port, host: options.host });
4010
4010
  });
4011
4011
  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) => {
@@ -4172,11 +4172,11 @@ program.command("sessions").description("List recent conversation sessions").opt
4172
4172
  console.log(footer + "\n");
4173
4173
  });
4174
4174
  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) => {
4175
- const { runUsageCli } = await import("./usage-YBWBEOBO.js");
4175
+ const { runUsageCli } = await import("./usage-H6MA2L6M.js");
4176
4176
  await runUsageCli(options);
4177
4177
  });
4178
4178
  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) => {
4179
- const { runDoctorCli } = await import("./doctor-cli-ALBAFMWO.js");
4179
+ const { runDoctorCli } = await import("./doctor-cli-SZSIME44.js");
4180
4180
  const argv = process.argv.slice(2);
4181
4181
  await runDoctorCli({
4182
4182
  json: !!options.json || argv.includes("--json"),
@@ -4185,7 +4185,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
4185
4185
  });
4186
4186
  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) => {
4187
4187
  try {
4188
- const batch = await import("./batch-3YJGOO27.js");
4188
+ const batch = await import("./batch-UFTO2RGM.js");
4189
4189
  switch (action) {
4190
4190
  case "submit":
4191
4191
  if (!arg) {
@@ -4228,7 +4228,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
4228
4228
  }
4229
4229
  });
4230
4230
  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) => {
4231
- const { startMcpServer } = await import("./server-G2IOJCTM.js");
4231
+ const { startMcpServer } = await import("./server-6LKW6APS.js");
4232
4232
  await startMcpServer({
4233
4233
  allowDestructive: !!options.allowDestructive,
4234
4234
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -4241,7 +4241,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
4241
4241
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
4242
4242
  process.exit(1);
4243
4243
  }
4244
- const { runPrCli } = await import("./pr-656V2Z3H.js");
4244
+ const { runPrCli } = await import("./pr-BCFZ6HZJ.js");
4245
4245
  const result = await runPrCli({
4246
4246
  action,
4247
4247
  target,
@@ -4261,8 +4261,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
4261
4261
  process.exit(result.exitCode);
4262
4262
  });
4263
4263
  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) => {
4264
- const { runCi } = await import("./ci-ANIX7GOB.js");
4265
- const { formatCiResult } = await import("./ci-format-PSAAKM7J.js");
4264
+ const { runCi } = await import("./ci-I2UICVIW.js");
4265
+ const { formatCiResult } = await import("./ci-format-BMQRW4WC.js");
4266
4266
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
4267
4267
  if (formats > 1) {
4268
4268
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -4421,7 +4421,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
4421
4421
  config.get("customProviders"),
4422
4422
  config.getConfigDir()
4423
4423
  );
4424
- const { startHub } = await import("./hub-YHUOMU6E.js");
4424
+ const { startHub } = await import("./hub-3RKL7J3R.js");
4425
4425
  await startHub(
4426
4426
  {
4427
4427
  topic: topic ?? "",
@@ -28,11 +28,11 @@ import {
28
28
  touchMemoryReferences,
29
29
  updateMemoryApproval,
30
30
  updateMemoryEntry
31
- } from "./chunk-4VYLPFZJ.js";
31
+ } from "./chunk-PNV7E7UZ.js";
32
32
  import "./chunk-3FEZSLGI.js";
33
33
  import "./chunk-HOSJZMQS.js";
34
34
  import "./chunk-IW3Q7AE5.js";
35
- import "./chunk-57OZ53J3.js";
35
+ import "./chunk-543ON5UN.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-A6O7AMFD.js";
30
+ } from "./chunk-OJNKVVD6.js";
31
31
  import "./chunk-FSC6KEWU.js";
32
32
  import "./chunk-6BUTA5VW.js";
33
33
  import "./chunk-CGLYJRFA.js";
34
- import "./chunk-ZEITAL5P.js";
34
+ import "./chunk-WAXJFG2Q.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-5S6TUBTA.js";
6
- import "./chunk-OFRXL4RX.js";
5
+ } from "./chunk-2HRGMGPB.js";
6
+ import "./chunk-UI7I4T7J.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
@@ -17,13 +17,13 @@ import {
17
17
  } from "./chunk-FBOVBL7P.js";
18
18
  import {
19
19
  ConfigManager
20
- } from "./chunk-NAMXORM7.js";
20
+ } from "./chunk-6ILVIYFW.js";
21
21
  import "./chunk-Y56UGZPX.js";
22
22
  import "./chunk-TU3L3PW7.js";
23
23
  import "./chunk-IW3Q7AE5.js";
24
24
  import {
25
25
  VERSION
26
- } from "./chunk-57OZ53J3.js";
26
+ } from "./chunk-543ON5UN.js";
27
27
 
28
28
  // src/cli/pr.ts
29
29
  import { execFileSync } from "child_process";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-TZE5CEJZ.js";
5
- import "./chunk-ZEITAL5P.js";
4
+ } from "./chunk-BFWARWZ6.js";
5
+ import "./chunk-WAXJFG2Q.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-EI5O25IE.js";
6
- import "./chunk-57OZ53J3.js";
5
+ } from "./chunk-PSAPNEQI.js";
6
+ import "./chunk-543ON5UN.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool