jinzd-ai-cli 0.4.202 → 0.4.204

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 (66) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +435 -435
  3. package/README.zh-CN.md +450 -450
  4. package/dist/agent-client-6GX6QQDU.js +0 -0
  5. package/dist/auth-FSTAKSYF.js +0 -0
  6. package/dist/{batch-UF4EWYFD.js → batch-ZP52GVVD.js} +2 -2
  7. package/dist/chat-index-FDSGKWQV.js +0 -0
  8. package/dist/{chunk-Y6U6FMVV.js → chunk-26YWVRLT.js} +1 -1
  9. package/dist/chunk-4BKXL7SM.js +0 -0
  10. package/dist/chunk-A4GUGWEY.js +0 -0
  11. package/dist/{chunk-2YLYDFEX.js → chunk-B75A6AG4.js} +19 -5
  12. package/dist/{chunk-JCY7RQIA.js → chunk-BENRC3OO.js} +1 -1
  13. package/dist/chunk-BXP6YZ2P.js +0 -0
  14. package/dist/chunk-CITDVXXM.js +0 -0
  15. package/dist/chunk-CKH4KQ4E.js +0 -0
  16. package/dist/chunk-E44DTERW.js +0 -0
  17. package/dist/{chunk-75SUTNYY.js → chunk-GYN2PTY2.js} +1 -1
  18. package/dist/chunk-HLWUDRBO.js +0 -0
  19. package/dist/chunk-HOSJZMQS.js +0 -0
  20. package/dist/chunk-IW3Q7AE5.js +0 -0
  21. package/dist/{chunk-GOKVKOG3.js → chunk-JLZ5QA2I.js} +1 -1
  22. package/dist/chunk-JVKAL5Q3.js +0 -0
  23. package/dist/chunk-KHYD3WXE.js +0 -0
  24. package/dist/chunk-MC34ISJU.js +0 -0
  25. package/dist/chunk-NZ4X6GUC.js +0 -0
  26. package/dist/chunk-O6UFCEUZ.js +0 -0
  27. package/dist/chunk-OJL3PY36.js +0 -0
  28. package/dist/{chunk-Q2MBPMTW.js → chunk-PIZWD5JN.js} +2 -2
  29. package/dist/chunk-Q3ZUDA6S.js +0 -0
  30. package/dist/{chunk-HZKC424D.js → chunk-SCQOEDVL.js} +1 -1
  31. package/dist/chunk-SLSWPBK3.js +0 -0
  32. package/dist/{chunk-5UR6ZOF4.js → chunk-SMFRJCXB.js} +7 -0
  33. package/dist/chunk-T2NL5ZIA.js +0 -0
  34. package/dist/{chunk-SB77W6XS.js → chunk-T5RTPF2Q.js} +1 -1
  35. package/dist/chunk-TB4W4Y4T.js +0 -0
  36. package/dist/chunk-TZQHYZKT.js +0 -0
  37. package/dist/{chunk-2NINHXEZ.js → chunk-UZISJ3KZ.js} +1 -1
  38. package/dist/{ci-YOJTTP4J.js → ci-LWE2I5QW.js} +4 -4
  39. package/dist/{constants-VP7TYJL7.js → constants-JRY7PDEY.js} +1 -1
  40. package/dist/{doctor-cli-PCIKXTNV.js → doctor-cli-KPUULUPS.js} +6 -6
  41. package/dist/electron-server.js +27 -6
  42. package/dist/file-checkpoint-NKBHGC7L.js +0 -0
  43. package/dist/git-context-EXOEHQSF.js +0 -0
  44. package/dist/{hub-N2ZRAXRO.js → hub-4CDJPNIM.js} +1 -1
  45. package/dist/hub-server-LJ2JSKZ2.js +0 -0
  46. package/dist/index.js +23 -21
  47. package/dist/indexer-AKWMYNJI.js +0 -0
  48. package/dist/persist-L54DPLI7.js +0 -0
  49. package/dist/project-trust-NKYHL3VZ.js +0 -0
  50. package/dist/{run-tests-AXPZOPX7.js → run-tests-6G2F7OSC.js} +1 -1
  51. package/dist/{run-tests-RNU733RF.js → run-tests-RQWSG25U.js} +2 -2
  52. package/dist/semantic-PK7AUOJT.js +0 -0
  53. package/dist/{server-SLFGYGBO.js → server-MF6UDMBZ.js} +14 -12
  54. package/dist/{server-YIBPZJ34.js → server-XNB76DRR.js} +5 -5
  55. package/dist/store-MWNHVGJT.js +0 -0
  56. package/dist/{task-orchestrator-FM4EXIBZ.js → task-orchestrator-PKZ2UTOK.js} +5 -5
  57. package/dist/{usage-QFW2XPF3.js → usage-Z64KJASD.js} +2 -2
  58. package/dist/vector-store-BBDXB5IQ.js +0 -0
  59. package/dist/wasm/web-tree-sitter.wasm +0 -0
  60. package/dist/web/client/app.js +3351 -3351
  61. package/dist/web/client/icon.svg +22 -22
  62. package/dist/web/client/index.html +360 -360
  63. package/dist/web/client/manifest.json +15 -15
  64. package/dist/web/client/style.css +991 -991
  65. package/dist/web/client/sw.js +86 -86
  66. package/package.json +176 -176
File without changes
File without changes
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigManager
4
- } from "./chunk-JCY7RQIA.js";
4
+ } from "./chunk-BENRC3OO.js";
5
5
  import "./chunk-TZQHYZKT.js";
6
- import "./chunk-HZKC424D.js";
6
+ import "./chunk-SCQOEDVL.js";
7
7
  import {
8
8
  atomicWriteFileSync
9
9
  } from "./chunk-IW3Q7AE5.js";
File without changes
@@ -6,7 +6,7 @@ import { platform } from "os";
6
6
  import chalk from "chalk";
7
7
 
8
8
  // src/core/constants.ts
9
- var VERSION = "0.4.202";
9
+ var VERSION = "0.4.204";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
File without changes
File without changes
@@ -5,15 +5,15 @@ import {
5
5
  } from "./chunk-T2NL5ZIA.js";
6
6
  import {
7
7
  runTestsTool
8
- } from "./chunk-75SUTNYY.js";
8
+ } from "./chunk-GYN2PTY2.js";
9
9
  import {
10
10
  runTool
11
- } from "./chunk-GOKVKOG3.js";
11
+ } from "./chunk-JLZ5QA2I.js";
12
12
  import {
13
13
  getDangerLevel,
14
14
  isFileWriteTool,
15
15
  runLeanAgentLoop
16
- } from "./chunk-5UR6ZOF4.js";
16
+ } from "./chunk-SMFRJCXB.js";
17
17
  import {
18
18
  EnvLoader,
19
19
  NetworkError,
@@ -26,7 +26,7 @@ import {
26
26
  SUBAGENT_ALLOWED_TOOLS,
27
27
  SUBAGENT_DEFAULT_MAX_ROUNDS,
28
28
  SUBAGENT_MAX_ROUNDS_LIMIT
29
- } from "./chunk-HZKC424D.js";
29
+ } from "./chunk-SCQOEDVL.js";
30
30
  import {
31
31
  fileCheckpoints
32
32
  } from "./chunk-4BKXL7SM.js";
@@ -3660,8 +3660,19 @@ function classifyBingWeakness(query, results) {
3660
3660
  if (noiseCount / results.length >= 0.4) {
3661
3661
  return `${noiseCount}/${results.length} results from known-noise domains`;
3662
3662
  }
3663
+ const homepageCount = results.filter((r) => isBareHomepage(r.url)).length;
3664
+ if (homepageCount / results.length >= 0.6) {
3665
+ return `${homepageCount}/${results.length} results are bare site homepages (popular-sites fallback)`;
3666
+ }
3663
3667
  return null;
3664
3668
  }
3669
+ function isBareHomepage(url) {
3670
+ try {
3671
+ return new URL(url).pathname.replace(/\/+$/, "") === "";
3672
+ } catch {
3673
+ return false;
3674
+ }
3675
+ }
3665
3676
  var NOISE_DOMAIN_RE = new RegExp(
3666
3677
  "\\b(" + [
3667
3678
  // Network/CDN noise tests
@@ -3726,11 +3737,14 @@ function hasZeroKeywordOverlap(query, results) {
3726
3737
  }
3727
3738
  return true;
3728
3739
  }
3740
+ function pickBingMarket(query) {
3741
+ return /[一-鿿぀-ヿ가-힯]/.test(query) ? "zh-CN" : "en-US";
3742
+ }
3729
3743
  async function searchBing(query, num) {
3730
3744
  const url = new URL("https://cn.bing.com/search");
3731
3745
  url.searchParams.set("q", query);
3732
3746
  url.searchParams.set("count", String(num));
3733
- url.searchParams.set("mkt", "zh-CN");
3747
+ url.searchParams.set("mkt", pickBingMarket(query));
3734
3748
  const html = await fetchHtml(url.toString());
3735
3749
  return parseBingResults(html, num);
3736
3750
  }
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-HZKC424D.js";
11
+ } from "./chunk-SCQOEDVL.js";
12
12
 
13
13
  // src/config/config-manager.ts
14
14
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
File without changes
File without changes
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-HZKC424D.js";
4
+ } from "./chunk-SCQOEDVL.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
File without changes
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CONFIG_DIR_NAME
4
- } from "./chunk-HZKC424D.js";
4
+ } from "./chunk-SCQOEDVL.js";
5
5
  import {
6
6
  atomicWriteFileSync
7
7
  } from "./chunk-IW3Q7AE5.js";
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  truncateForPersist
4
- } from "./chunk-2YLYDFEX.js";
4
+ } from "./chunk-B75A6AG4.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-HZKC424D.js";
14
+ } from "./chunk-SCQOEDVL.js";
15
15
 
16
16
  // src/mcp/client.ts
17
17
  import { spawn } from "child_process";
File without changes
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.202";
4
+ var VERSION = "0.4.204";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
File without changes
@@ -484,6 +484,12 @@ function isCleanDocumentBody(content) {
484
484
  if (detectPseudoToolCalls(content)) return false;
485
485
  return looksLikeDocumentBody(content);
486
486
  }
487
+ function stripOuterCodeFence(content) {
488
+ const trimmed = content.trim();
489
+ const m = trimmed.match(/^```[^\n`]*\n([\s\S]*?)\n```\s*$/);
490
+ if (m) return m[1];
491
+ return content;
492
+ }
487
493
  function teeFileStats(content) {
488
494
  return { lines: content.split("\n").length, bytes: Buffer.byteLength(content, "utf-8") };
489
495
  }
@@ -1062,6 +1068,7 @@ export {
1062
1068
  TEE_FINAL_USER_NUDGE,
1063
1069
  CONTENT_ONLY_STREAM_REMINDER,
1064
1070
  isCleanDocumentBody,
1071
+ stripOuterCodeFence,
1065
1072
  freshPriorContent,
1066
1073
  evaluateTeeContent,
1067
1074
  buildDeferredSaveInstruction,
File without changes
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONFIG_DIR_NAME,
4
4
  VERSION
5
- } from "./chunk-HZKC424D.js";
5
+ } from "./chunk-SCQOEDVL.js";
6
6
 
7
7
  // src/diagnostics/crash-log.ts
8
8
  import {
File without changes
File without changes
@@ -3,7 +3,7 @@ import {
3
3
  detectsHallucinatedFileOp,
4
4
  repairToolCallArguments,
5
5
  schemaToJsonSchema
6
- } from "./chunk-5UR6ZOF4.js";
6
+ } from "./chunk-SMFRJCXB.js";
7
7
  import {
8
8
  AuthError,
9
9
  ProviderError,
@@ -6,15 +6,15 @@ import {
6
6
  } from "./chunk-HLWUDRBO.js";
7
7
  import {
8
8
  ProviderRegistry
9
- } from "./chunk-2NINHXEZ.js";
10
- import "./chunk-5UR6ZOF4.js";
9
+ } from "./chunk-UZISJ3KZ.js";
10
+ import "./chunk-SMFRJCXB.js";
11
11
  import {
12
12
  ConfigManager
13
- } from "./chunk-JCY7RQIA.js";
13
+ } from "./chunk-BENRC3OO.js";
14
14
  import "./chunk-TZQHYZKT.js";
15
15
  import {
16
16
  VERSION
17
- } from "./chunk-HZKC424D.js";
17
+ } from "./chunk-SCQOEDVL.js";
18
18
 
19
19
  // src/cli/ci.ts
20
20
  import { execFileSync, execSync } from "child_process";
@@ -36,7 +36,7 @@ import {
36
36
  TEST_TIMEOUT,
37
37
  VERSION,
38
38
  buildUserIdentityPrompt
39
- } from "./chunk-HZKC424D.js";
39
+ } from "./chunk-SCQOEDVL.js";
40
40
  export {
41
41
  AGENTIC_BEHAVIOR_GUIDELINE,
42
42
  APP_NAME,
@@ -2,26 +2,26 @@
2
2
  import {
3
3
  getConfigDirUsage,
4
4
  listRecentCrashes
5
- } from "./chunk-SB77W6XS.js";
5
+ } from "./chunk-T5RTPF2Q.js";
6
6
  import {
7
7
  ProviderRegistry
8
- } from "./chunk-2NINHXEZ.js";
8
+ } from "./chunk-UZISJ3KZ.js";
9
9
  import {
10
10
  getStatsSnapshot,
11
11
  getTopFailingTools,
12
12
  getTopUsedTools,
13
13
  resetStats
14
- } from "./chunk-GOKVKOG3.js";
15
- import "./chunk-5UR6ZOF4.js";
14
+ } from "./chunk-JLZ5QA2I.js";
15
+ import "./chunk-SMFRJCXB.js";
16
16
  import {
17
17
  ConfigManager
18
- } from "./chunk-JCY7RQIA.js";
18
+ } from "./chunk-BENRC3OO.js";
19
19
  import "./chunk-TZQHYZKT.js";
20
20
  import {
21
21
  DEV_STATE_FILE_NAME,
22
22
  MEMORY_FILE_NAME,
23
23
  VERSION
24
- } from "./chunk-HZKC424D.js";
24
+ } from "./chunk-SCQOEDVL.js";
25
25
  import "./chunk-IW3Q7AE5.js";
26
26
 
27
27
  // src/diagnostics/doctor-cli.ts
@@ -36,7 +36,7 @@ import {
36
36
  VERSION,
37
37
  buildUserIdentityPrompt,
38
38
  runTestsTool
39
- } from "./chunk-Y6U6FMVV.js";
39
+ } from "./chunk-26YWVRLT.js";
40
40
  import {
41
41
  hasSemanticIndex,
42
42
  semanticSearch
@@ -1986,6 +1986,12 @@ function isCleanDocumentBody(content) {
1986
1986
  if (detectPseudoToolCalls(content)) return false;
1987
1987
  return looksLikeDocumentBody(content);
1988
1988
  }
1989
+ function stripOuterCodeFence(content) {
1990
+ const trimmed = content.trim();
1991
+ const m = trimmed.match(/^```[^\n`]*\n([\s\S]*?)\n```\s*$/);
1992
+ if (m) return m[1];
1993
+ return content;
1994
+ }
1989
1995
  function teeFileStats(content) {
1990
1996
  return { lines: content.split("\n").length, bytes: Buffer.byteLength(content, "utf-8") };
1991
1997
  }
@@ -8369,8 +8375,19 @@ function classifyBingWeakness(query, results) {
8369
8375
  if (noiseCount / results.length >= 0.4) {
8370
8376
  return `${noiseCount}/${results.length} results from known-noise domains`;
8371
8377
  }
8378
+ const homepageCount = results.filter((r) => isBareHomepage(r.url)).length;
8379
+ if (homepageCount / results.length >= 0.6) {
8380
+ return `${homepageCount}/${results.length} results are bare site homepages (popular-sites fallback)`;
8381
+ }
8372
8382
  return null;
8373
8383
  }
8384
+ function isBareHomepage(url) {
8385
+ try {
8386
+ return new URL(url).pathname.replace(/\/+$/, "") === "";
8387
+ } catch {
8388
+ return false;
8389
+ }
8390
+ }
8374
8391
  var NOISE_DOMAIN_RE = new RegExp(
8375
8392
  "\\b(" + [
8376
8393
  // Network/CDN noise tests
@@ -8435,11 +8452,14 @@ function hasZeroKeywordOverlap(query, results) {
8435
8452
  }
8436
8453
  return true;
8437
8454
  }
8455
+ function pickBingMarket(query) {
8456
+ return /[一-鿿぀-ヿ가-힯]/.test(query) ? "zh-CN" : "en-US";
8457
+ }
8438
8458
  async function searchBing(query, num) {
8439
8459
  const url = new URL("https://cn.bing.com/search");
8440
8460
  url.searchParams.set("q", query);
8441
8461
  url.searchParams.set("count", String(num));
8442
- url.searchParams.set("mkt", "zh-CN");
8462
+ url.searchParams.set("mkt", pickBingMarket(query));
8443
8463
  const html = await fetchHtml(url.toString());
8444
8464
  return parseBingResults(html, num);
8445
8465
  }
@@ -13024,10 +13044,11 @@ Try: /compact to reduce context, /clear to reset, or switch to a larger-context
13024
13044
  if (pendingTeeSave && isCleanDocumentBody(content)) {
13025
13045
  try {
13026
13046
  mkdirSync10(dirname5(pendingTeeSave), { recursive: true });
13027
- writeFileSync7(pendingTeeSave, content, "utf-8");
13047
+ const bodyToSave = stripOuterCodeFence(content);
13048
+ writeFileSync7(pendingTeeSave, bodyToSave, "utf-8");
13028
13049
  undoStack.push(pendingTeeSave, `save_last_response (deferred): ${pendingTeeSave}`);
13029
- const lines = content.split("\n").length;
13030
- this.send({ type: "info", message: `\u2705 Saved (from reply): ${pendingTeeSave} (${lines} lines, ${content.length} chars)` });
13050
+ const lines = bodyToSave.split("\n").length;
13051
+ this.send({ type: "info", message: `\u2705 Saved (from reply): ${pendingTeeSave} (${lines} lines, ${bodyToSave.length} chars)` });
13031
13052
  } catch (saveErr) {
13032
13053
  this.send({ type: "info", message: `\u2717 Could not save to ${pendingTeeSave}: ${saveErr.message ?? saveErr}` });
13033
13054
  }
@@ -14304,7 +14325,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
14304
14325
  case "test": {
14305
14326
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
14306
14327
  try {
14307
- const { executeTests } = await import("./run-tests-AXPZOPX7.js");
14328
+ const { executeTests } = await import("./run-tests-6G2F7OSC.js");
14308
14329
  const argStr = args.join(" ").trim();
14309
14330
  let testArgs = {};
14310
14331
  if (argStr) {
File without changes
File without changes
@@ -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-FM4EXIBZ.js");
157
+ const { TaskOrchestrator } = await import("./task-orchestrator-PKZ2UTOK.js");
158
158
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
159
159
  let interrupted = false;
160
160
  const onSigint = () => {
File without changes
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  saveDevState,
16
16
  sessionHasMeaningfulContent,
17
17
  setupProxy
18
- } from "./chunk-Q2MBPMTW.js";
18
+ } from "./chunk-PIZWD5JN.js";
19
19
  import {
20
20
  ToolExecutor,
21
21
  ToolRegistry,
@@ -35,10 +35,10 @@ import {
35
35
  spawnAgentContext,
36
36
  theme,
37
37
  undoStack
38
- } from "./chunk-2YLYDFEX.js";
38
+ } from "./chunk-B75A6AG4.js";
39
39
  import "./chunk-T2NL5ZIA.js";
40
40
  import "./chunk-BXP6YZ2P.js";
41
- import "./chunk-75SUTNYY.js";
41
+ import "./chunk-GYN2PTY2.js";
42
42
  import {
43
43
  SessionManager,
44
44
  getContentText
@@ -55,16 +55,16 @@ import {
55
55
  getConfigDirUsage,
56
56
  listRecentCrashes,
57
57
  writeCrashLog
58
- } from "./chunk-SB77W6XS.js";
58
+ } from "./chunk-T5RTPF2Q.js";
59
59
  import {
60
60
  ProviderRegistry
61
- } from "./chunk-2NINHXEZ.js";
61
+ } from "./chunk-UZISJ3KZ.js";
62
62
  import {
63
63
  getStatsSnapshot,
64
64
  getTopFailingTools,
65
65
  getTopUsedTools,
66
66
  installFlushOnExit
67
- } from "./chunk-GOKVKOG3.js";
67
+ } from "./chunk-JLZ5QA2I.js";
68
68
  import {
69
69
  CONTENT_ONLY_STREAM_REMINDER,
70
70
  TEE_FINAL_USER_NUDGE,
@@ -80,12 +80,13 @@ import {
80
80
  freshPriorContent,
81
81
  isCleanDocumentBody,
82
82
  runAgentLoop,
83
+ stripOuterCodeFence,
83
84
  stripToolCallReminder,
84
85
  teeStreamErrorSummary
85
- } from "./chunk-5UR6ZOF4.js";
86
+ } from "./chunk-SMFRJCXB.js";
86
87
  import {
87
88
  ConfigManager
88
- } from "./chunk-JCY7RQIA.js";
89
+ } from "./chunk-BENRC3OO.js";
89
90
  import {
90
91
  AuthError,
91
92
  ProviderError,
@@ -112,7 +113,7 @@ import {
112
113
  SKILLS_DIR_NAME,
113
114
  VERSION,
114
115
  buildUserIdentityPrompt
115
- } from "./chunk-HZKC424D.js";
116
+ } from "./chunk-SCQOEDVL.js";
116
117
  import {
117
118
  formatGitContextForPrompt,
118
119
  getGitContext,
@@ -1827,7 +1828,7 @@ No tools match "${filter}".
1827
1828
  const { join: join5 } = await import("path");
1828
1829
  const { existsSync: existsSync5 } = await import("fs");
1829
1830
  const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
1830
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-VP7TYJL7.js");
1831
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-JRY7PDEY.js");
1831
1832
  const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
1832
1833
  const cwd = process.cwd();
1833
1834
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -2888,7 +2889,7 @@ ${hint}` : "")
2888
2889
  usage: "/test [command|filter]",
2889
2890
  async execute(args, ctx) {
2890
2891
  try {
2891
- const { executeTests } = await import("./run-tests-RNU733RF.js");
2892
+ const { executeTests } = await import("./run-tests-RQWSG25U.js");
2892
2893
  const argStr = args.join(" ").trim();
2893
2894
  let testArgs = {};
2894
2895
  if (argStr) {
@@ -6640,12 +6641,13 @@ ${decision.displayMessage}
6640
6641
  if (pendingTeeSave && isCleanDocumentBody(content)) {
6641
6642
  try {
6642
6643
  mkdirSync4(dirname3(pendingTeeSave), { recursive: true });
6643
- writeFileSync2(pendingTeeSave, content, "utf-8");
6644
+ const bodyToSave = stripOuterCodeFence(content);
6645
+ writeFileSync2(pendingTeeSave, bodyToSave, "utf-8");
6644
6646
  undoStack.push(pendingTeeSave, `save_last_response (deferred): ${pendingTeeSave}`);
6645
- const lines = content.split("\n").length;
6647
+ const lines = bodyToSave.split("\n").length;
6646
6648
  process.stdout.write(theme.success(
6647
6649
  `
6648
- \u2705 Saved (from your reply): ${pendingTeeSave} (${lines} lines, ${content.length} chars)
6650
+ \u2705 Saved (from your reply): ${pendingTeeSave} (${lines} lines, ${bodyToSave.length} chars)
6649
6651
 
6650
6652
  `
6651
6653
  ));
@@ -7265,7 +7267,7 @@ program.command("web").description("Start Web UI server with browser-based chat
7265
7267
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
7266
7268
  process.exit(1);
7267
7269
  }
7268
- const { startWebServer } = await import("./server-SLFGYGBO.js");
7270
+ const { startWebServer } = await import("./server-MF6UDMBZ.js");
7269
7271
  await startWebServer({ port, host: options.host });
7270
7272
  });
7271
7273
  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) => {
@@ -7432,16 +7434,16 @@ program.command("sessions").description("List recent conversation sessions").opt
7432
7434
  console.log(footer + "\n");
7433
7435
  });
7434
7436
  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) => {
7435
- const { runUsageCli } = await import("./usage-QFW2XPF3.js");
7437
+ const { runUsageCli } = await import("./usage-Z64KJASD.js");
7436
7438
  await runUsageCli(options);
7437
7439
  });
7438
7440
  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) => {
7439
- const { runDoctorCli } = await import("./doctor-cli-PCIKXTNV.js");
7441
+ const { runDoctorCli } = await import("./doctor-cli-KPUULUPS.js");
7440
7442
  await runDoctorCli({ json: !!options.json, resetStats: !!options.resetStats });
7441
7443
  });
7442
7444
  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) => {
7443
7445
  try {
7444
- const batch = await import("./batch-UF4EWYFD.js");
7446
+ const batch = await import("./batch-ZP52GVVD.js");
7445
7447
  switch (action) {
7446
7448
  case "submit":
7447
7449
  if (!arg) {
@@ -7484,7 +7486,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
7484
7486
  }
7485
7487
  });
7486
7488
  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) => {
7487
- const { startMcpServer } = await import("./server-YIBPZJ34.js");
7489
+ const { startMcpServer } = await import("./server-XNB76DRR.js");
7488
7490
  await startMcpServer({
7489
7491
  allowDestructive: !!options.allowDestructive,
7490
7492
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -7493,7 +7495,7 @@ program.command("mcp-serve").description("Start an MCP server over STDIO, exposi
7493
7495
  });
7494
7496
  });
7495
7497
  program.command("ci").description("Headless PR review (code + security) \u2014 reads git/gh diff, optionally posts to PR. Designed for GitHub Actions.").option("--pr <num>", "PR number; diff fetched via `gh pr diff <num>`", (v) => parseInt(v, 10)).option("--base <ref>", "Base ref for `git diff <ref>...HEAD` (ignored when --pr set)").option("--post", "Post review as a PR comment (requires gh CLI + GH_TOKEN, needs --pr)").option("--no-update", "Always create a new comment instead of updating the previous aicli review").option("--skip-code", "Skip the code review section").option("--skip-security", "Skip the security review section").option("--detailed", "Use the detailed code-review prompt").option("--max-diff <n>", "Max diff chars sent to the model (default 30000)", (v) => parseInt(v, 10)).option("--provider <id>", "Override provider (default: config.defaultProvider)").option("--model <id>", "Override model").option("--dry-run", "Print result to stdout instead of posting (overrides --post)").action(async (options) => {
7496
- const { runCi } = await import("./ci-YOJTTP4J.js");
7498
+ const { runCi } = await import("./ci-LWE2I5QW.js");
7497
7499
  const result = await runCi({
7498
7500
  pr: options.pr,
7499
7501
  base: options.base,
@@ -7639,7 +7641,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
7639
7641
  }),
7640
7642
  config.get("customProviders")
7641
7643
  );
7642
- const { startHub } = await import("./hub-N2ZRAXRO.js");
7644
+ const { startHub } = await import("./hub-4CDJPNIM.js");
7643
7645
  await startHub(
7644
7646
  {
7645
7647
  topic: topic ?? "",
File without changes
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-Y6U6FMVV.js";
4
+ } from "./chunk-26YWVRLT.js";
5
5
  export {
6
6
  executeTests,
7
7
  runTestsTool
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-75SUTNYY.js";
6
- import "./chunk-HZKC424D.js";
5
+ } from "./chunk-GYN2PTY2.js";
6
+ import "./chunk-SCQOEDVL.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool
File without changes