jinzd-ai-cli 0.4.259 → 0.4.261

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 (33) hide show
  1. package/dist/{batch-74P2FQWX.js → batch-YUPAC4CK.js} +2 -2
  2. package/dist/{chunk-4TDVLTX2.js → chunk-323S2X5I.js} +1 -1
  3. package/dist/{chunk-PSH5O44I.js → chunk-GC4KA5LF.js} +1 -1
  4. package/dist/{chunk-G65I4DXP.js → chunk-H6FND2UG.js} +1 -1
  5. package/dist/{chunk-FGONEVTP.js → chunk-HGTDI5ME.js} +1 -1
  6. package/dist/{chunk-4RPJQJBI.js → chunk-HU3IYBU5.js} +11 -9
  7. package/dist/{chunk-V5FB72RK.js → chunk-KFNQESEG.js} +1 -1
  8. package/dist/{chunk-BWJYDG3C.js → chunk-KQQHMGK7.js} +1 -1
  9. package/dist/{chunk-ZZ5WTHKY.js → chunk-NOB2OPQI.js} +4 -4
  10. package/dist/{chunk-GDJII6TK.js → chunk-OIOTHBDB.js} +23 -5
  11. package/dist/{chunk-DLOOIAAD.js → chunk-R6DXWVVN.js} +1 -1
  12. package/dist/{chunk-KXAVUZKH.js → chunk-T7R7ILYT.js} +1 -1
  13. package/dist/{chunk-3KYUE2MD.js → chunk-W5XUZYQE.js} +1 -1
  14. package/dist/{chunk-XPNKMDBH.js → chunk-XZNRZGG2.js} +63 -26
  15. package/dist/{chunk-7DVIAK6J.js → chunk-YXMBP567.js} +2 -2
  16. package/dist/{chunk-3EWST6SE.js → chunk-Z5TCAE4L.js} +4 -4
  17. package/dist/{ci-6BANR65W.js → ci-FX26BNT2.js} +6 -6
  18. package/dist/{ci-format-2OVEQK6O.js → ci-format-GEWIAIZD.js} +2 -2
  19. package/dist/{constants-DKZEF3CE.js → constants-YN4B6C7B.js} +1 -1
  20. package/dist/{doctor-cli-6MHA7Q7M.js → doctor-cli-PXGXZYQB.js} +6 -6
  21. package/dist/electron-server.js +96 -40
  22. package/dist/{hub-L7RSDS4J.js → hub-RCANK6SK.js} +1 -1
  23. package/dist/index.js +145 -65
  24. package/dist/{persistent-memory-I4JV3CME.js → persistent-memory-P3COUZZM.js} +2 -2
  25. package/dist/{persistent-memory-WBR2DALU.js → persistent-memory-UARSSYAA.js} +2 -2
  26. package/dist/{pr-UNCWDVN3.js → pr-7LQTAUFK.js} +6 -6
  27. package/dist/{run-tests-HFT5RUXF.js → run-tests-7RYU4BK5.js} +2 -2
  28. package/dist/{run-tests-XBODGDFO.js → run-tests-YNHESHYY.js} +2 -2
  29. package/dist/{server-ILKG2672.js → server-SSAWGNT7.js} +13 -13
  30. package/dist/{server-RNBKZ6TP.js → server-YZ37TL46.js} +6 -6
  31. package/dist/{task-orchestrator-GXP5HNBZ.js → task-orchestrator-ZFL4E6NZ.js} +6 -6
  32. package/dist/{usage-KCPH75KI.js → usage-PDKM7J75.js} +2 -2
  33. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  scanProject,
18
18
  sessionHasMeaningfulContent,
19
19
  setupProxy
20
- } from "./chunk-7DVIAK6J.js";
20
+ } from "./chunk-YXMBP567.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-4RPJQJBI.js";
53
+ } from "./chunk-HU3IYBU5.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-FGONEVTP.js";
79
+ } from "./chunk-HGTDI5ME.js";
80
80
  import "./chunk-GLSR2NR3.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-ZZ5WTHKY.js";
93
+ } from "./chunk-NOB2OPQI.js";
94
94
  import {
95
95
  ProviderRegistry
96
- } from "./chunk-GDJII6TK.js";
96
+ } from "./chunk-OIOTHBDB.js";
97
97
  import {
98
98
  ConfigManager
99
- } from "./chunk-G65I4DXP.js";
99
+ } from "./chunk-H6FND2UG.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-3KYUE2MD.js";
116
+ } from "./chunk-W5XUZYQE.js";
117
117
  import {
118
118
  CONTENT_ONLY_STREAM_REMINDER,
119
119
  TEE_FINAL_USER_NUDGE,
@@ -127,12 +127,13 @@ import {
127
127
  evaluateTeeContent,
128
128
  extractWrittenFilePaths,
129
129
  freshPriorContent,
130
+ isAbortError,
130
131
  isCleanDocumentBody,
131
132
  runAgentLoop,
132
133
  stripOuterCodeFence,
133
134
  stripToolCallReminder,
134
135
  teeStreamErrorSummary
135
- } from "./chunk-XPNKMDBH.js";
136
+ } from "./chunk-XZNRZGG2.js";
136
137
  import {
137
138
  AuthError,
138
139
  ProviderError,
@@ -146,7 +147,7 @@ import {
146
147
  import {
147
148
  fileCheckpoints
148
149
  } from "./chunk-4BKXL7SM.js";
149
- import "./chunk-BWJYDG3C.js";
150
+ import "./chunk-KQQHMGK7.js";
150
151
  import {
151
152
  AGENTIC_BEHAVIOR_GUIDELINE,
152
153
  AUTHOR,
@@ -165,7 +166,7 @@ import {
165
166
  SKILLS_DIR_NAME,
166
167
  VERSION,
167
168
  buildUserIdentityPrompt
168
- } from "./chunk-4TDVLTX2.js";
169
+ } from "./chunk-323S2X5I.js";
169
170
  import {
170
171
  buildChatIndex,
171
172
  clearChatIndex,
@@ -1397,7 +1398,7 @@ No tools match "${filter}".
1397
1398
  const { join: join6 } = await import("path");
1398
1399
  const { existsSync: existsSync6 } = await import("fs");
1399
1400
  const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
1400
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-DKZEF3CE.js");
1401
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-YN4B6C7B.js");
1401
1402
  const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
1402
1403
  const cwd = process.cwd();
1403
1404
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -1601,6 +1602,15 @@ No tools match "${filter}".
1601
1602
  // src/repl/commands/security-commands.ts
1602
1603
  import { platform as platform2 } from "os";
1603
1604
  import chalk2 from "chalk";
1605
+ function stripSurroundingQuotes(value) {
1606
+ const pairs = [['"', '"'], ["'", "'"], ["\u201C", "\u201D"], ["\u2018", "\u2019"], ["\u300C", "\u300D"]];
1607
+ for (const [open, close] of pairs) {
1608
+ if (value.length >= 2 && value.startsWith(open) && value.endsWith(close)) {
1609
+ return value.slice(open.length, value.length - close.length).trim();
1610
+ }
1611
+ }
1612
+ return value;
1613
+ }
1604
1614
  function createSecurityCommands() {
1605
1615
  return [
1606
1616
  {
@@ -1701,9 +1711,9 @@ function createSecurityCommands() {
1701
1711
  }
1702
1712
  const updated = { ...profile };
1703
1713
  if (field === "interests") {
1704
- updated.interests = value.split(",").map((s) => s.trim()).filter(Boolean);
1714
+ updated.interests = value.split(",").map((s) => stripSurroundingQuotes(s.trim())).filter(Boolean);
1705
1715
  } else {
1706
- updated[field] = value;
1716
+ updated[field] = stripSurroundingQuotes(value);
1707
1717
  }
1708
1718
  ctx.config.set("userProfile", updated);
1709
1719
  ctx.config.save();
@@ -2376,7 +2386,7 @@ function createReviewCommands() {
2376
2386
  usage: "/test [command|filter]",
2377
2387
  async execute(args, ctx) {
2378
2388
  try {
2379
- const { executeTests } = await import("./run-tests-XBODGDFO.js");
2389
+ const { executeTests } = await import("./run-tests-YNHESHYY.js");
2380
2390
  const argStr = args.join(" ").trim();
2381
2391
  let testArgs = {};
2382
2392
  if (argStr) {
@@ -5205,6 +5215,23 @@ var IMAGE_MIME = {
5205
5215
  ".webp": "image/webp"
5206
5216
  };
5207
5217
  var MAX_IMAGE_BYTES = 10 * 1024 * 1024;
5218
+ var MAX_PATH_SPACE_TOKENS = 8;
5219
+ function expandUnquotedPath(input2, pathStart, rawPath, cwd) {
5220
+ const plain = { raw: rawPath, consumed: rawPath.length };
5221
+ if (existsSync4(resolve2(cwd, rawPath))) return plain;
5222
+ let acc = rawPath;
5223
+ let consumed = rawPath.length;
5224
+ let rest = input2.slice(pathStart + rawPath.length);
5225
+ for (let i = 0; i < MAX_PATH_SPACE_TOKENS; i++) {
5226
+ const next = /^([ \t]+)(\S+)/.exec(rest);
5227
+ if (!next) break;
5228
+ acc += next[1] + next[2];
5229
+ consumed += next[0].length;
5230
+ rest = rest.slice(next[0].length);
5231
+ if (existsSync4(resolve2(cwd, acc))) return { raw: acc, consumed };
5232
+ }
5233
+ return plain;
5234
+ }
5208
5235
  function parseAtReferences(input2, cwd) {
5209
5236
  const atPattern = /@(?:"([^"]+)"|'([^']+)'|(\S+))/g;
5210
5237
  const refs = [];
@@ -5212,7 +5239,17 @@ function parseAtReferences(input2, cwd) {
5212
5239
  let textBody = input2;
5213
5240
  let match;
5214
5241
  while ((match = atPattern.exec(input2)) !== null) {
5215
- const rawPath = match[1] ?? match[2] ?? match[3] ?? "";
5242
+ let rawPath = match[1] ?? match[2] ?? match[3] ?? "";
5243
+ let matchedText = match[0];
5244
+ if (match[3] !== void 0) {
5245
+ const pathStart = match.index + 1;
5246
+ const expanded = expandUnquotedPath(input2, pathStart, rawPath, cwd);
5247
+ if (expanded.consumed > rawPath.length) {
5248
+ rawPath = expanded.raw;
5249
+ matchedText = "@" + expanded.raw;
5250
+ atPattern.lastIndex = pathStart + expanded.consumed;
5251
+ }
5252
+ }
5216
5253
  const absPath = resolve2(cwd, rawPath);
5217
5254
  const ext = extname3(rawPath).toLowerCase();
5218
5255
  const mime = IMAGE_MIME[ext];
@@ -5232,7 +5269,7 @@ function parseAtReferences(input2, cwd) {
5232
5269
  image_url: { url: `data:${mime};base64,${data}` }
5233
5270
  });
5234
5271
  refs.push({ path: rawPath, type: "image" });
5235
- textBody = textBody.replace(match[0], "").trim();
5272
+ textBody = textBody.replace(matchedText, "").trim();
5236
5273
  } else {
5237
5274
  const content = readFileSync4(absPath, "utf-8");
5238
5275
  const inlined = `
@@ -5241,7 +5278,7 @@ function parseAtReferences(input2, cwd) {
5241
5278
  \`\`\`
5242
5279
  ${content}
5243
5280
  \`\`\``;
5244
- textBody = textBody.replace(match[0], inlined);
5281
+ textBody = textBody.replace(matchedText, inlined);
5245
5282
  refs.push({ path: rawPath, type: "text" });
5246
5283
  }
5247
5284
  }
@@ -5253,6 +5290,16 @@ ${content}
5253
5290
  return { parts, hasImage: imageParts.length > 0, refs };
5254
5291
  }
5255
5292
 
5293
+ // src/repl/startup-notice.ts
5294
+ function writeStartupNotice(line, promptShown, redraw) {
5295
+ if (promptShown) {
5296
+ process.stdout.write("\n" + line);
5297
+ redraw();
5298
+ } else {
5299
+ process.stdout.write(line);
5300
+ }
5301
+ }
5302
+
5256
5303
  // src/core/model-router.ts
5257
5304
  var TAG_REGEX = /(?:^|\s)#([a-zA-Z][\w-]{0,31})\b/g;
5258
5305
  function extractTags(message) {
@@ -5596,6 +5643,8 @@ var Repl = class {
5596
5643
  config;
5597
5644
  events;
5598
5645
  rl;
5646
+ /** 第一次 prompt 是否已画出(决定启动期后台横幅要不要重画 prompt)。 */
5647
+ firstPromptShown = false;
5599
5648
  currentProvider;
5600
5649
  currentModel;
5601
5650
  running = false;
@@ -6062,7 +6111,11 @@ ${ctxLine}` : "")
6062
6111
  const promptStr = theme.success(`[${this.currentProvider}]`) + skillTag + planTag + thinkTag + chalk5.white(" > ");
6063
6112
  this.rl.setPrompt(promptStr);
6064
6113
  }
6114
+ notice(line) {
6115
+ writeStartupNotice(line, this.firstPromptShown, () => this.showPrompt());
6116
+ }
6065
6117
  showPrompt() {
6118
+ this.firstPromptShown = true;
6066
6119
  this.refreshPrompt();
6067
6120
  const rlInternal2 = this.rl;
6068
6121
  rlInternal2.prevRows = 0;
@@ -6216,12 +6269,12 @@ Session '${this.resumeSessionId}' not found.
6216
6269
  const existed = loadIndex(root);
6217
6270
  const { stats } = await indexProject(root);
6218
6271
  if (!existed) {
6219
- process.stdout.write(
6272
+ this.notice(
6220
6273
  theme.dim(` \u{1F50E} Symbol index built: ${stats.symbols} symbols across ${stats.filesParsed} files
6221
6274
  `)
6222
6275
  );
6223
6276
  } else if (stats.filesParsed > 0) {
6224
- process.stdout.write(
6277
+ this.notice(
6225
6278
  theme.dim(` \u{1F50E} Symbol index refreshed: ${stats.filesParsed} file(s) updated
6226
6279
  `)
6227
6280
  );
@@ -6242,7 +6295,7 @@ Session '${this.resumeSessionId}' not found.
6242
6295
  try {
6243
6296
  const sessionCount = this.sessions.listSessions().length;
6244
6297
  if (sessionCount >= 5) {
6245
- process.stdout.write(theme.dim(
6298
+ this.notice(theme.dim(
6246
6299
  ` \u{1F4A1} ${sessionCount} past sessions have no memory index \u2014 run /memory rebuild to enable cross-session recall (first run downloads ~117 MB)
6247
6300
  `
6248
6301
  ));
@@ -6259,7 +6312,7 @@ Session '${this.resumeSessionId}' not found.
6259
6312
  sessions: after.sessions
6260
6313
  };
6261
6314
  if (stats.sessionsIndexed > 0 || stats.chunksRemoved > 0) {
6262
- process.stdout.write(
6315
+ this.notice(
6263
6316
  theme.dim(
6264
6317
  ` \u{1F9E0} Chat memory refreshed: ${stats.chunksAdded} new \xB7 ${stats.chunksRemoved} removed \xB7 ${stats.chunksTotal} total
6265
6318
  `
@@ -6308,7 +6361,7 @@ Session '${this.resumeSessionId}' not found.
6308
6361
  this.mcpManager = new McpManager();
6309
6362
  const mcpProjectCount = Object.keys(projectMcpServers).length;
6310
6363
  let bannerEmitted = false;
6311
- const emitBanner = (afterDeadline) => {
6364
+ const emitBanner = () => {
6312
6365
  if (bannerEmitted) return;
6313
6366
  bannerEmitted = true;
6314
6367
  const statuses = this.mcpManager.getStatus();
@@ -6322,12 +6375,7 @@ Session '${this.resumeSessionId}' not found.
6322
6375
  const names = failed.map((f) => f.serverId).join(", ");
6323
6376
  line += ` \u26A0 failed: ${names}`;
6324
6377
  }
6325
- if (afterDeadline) {
6326
- process.stdout.write("\n" + theme.dim(line) + "\n");
6327
- this.showPrompt();
6328
- } else {
6329
- process.stdout.write(theme.dim(line) + "\n");
6330
- }
6378
+ this.notice(theme.dim(line) + "\n");
6331
6379
  };
6332
6380
  mcpReadyPromise = this.mcpManager.connectAll(mergedMcpServers, { quiet: true }).then(() => {
6333
6381
  const mcpTools = this.mcpManager.getAllTools();
@@ -6348,9 +6396,9 @@ Session '${this.resumeSessionId}' not found.
6348
6396
  deadlinePromise
6349
6397
  ]);
6350
6398
  if (winner === "ready") {
6351
- emitBanner(false);
6399
+ emitBanner();
6352
6400
  } else {
6353
- void mcpReadyPromise.then(() => emitBanner(true));
6401
+ void mcpReadyPromise.then(() => emitBanner());
6354
6402
  }
6355
6403
  }
6356
6404
  this.setupClipboardPaste();
@@ -6877,6 +6925,28 @@ Session '${this.resumeSessionId}' not found.
6877
6925
  * 流式生成开始前调用:创建 AbortController,监听 ESC 键(0x1b)和 Ctrl+C(0x03)原始字节。
6878
6926
  * rl.pause() 会暂停 stdin,这里临时恢复以接收原始键盘字节。
6879
6927
  */
6928
+ /**
6929
+ * 把一次**非流式**(阻塞式)模型调用包成可中断的。
6930
+ *
6931
+ * v0.4.260:非流式分支此前既没装键盘监听器、也没把 signal 传下去——
6932
+ * DeepSeek/Kimi(`supportsStreamingTools=false`)的每一轮都走这条路,于是 Ctrl+C
6933
+ * 在整个请求期间毫无作用(实测把 timeout 提到 15 分钟后,等 11 分钟退不出去)。
6934
+ * 中断视为用户主动取消,不当错误上抛:置全局 interrupt 标记后交给 onAbort 收尾。
6935
+ */
6936
+ async withInterruptibleCall(run, onAbort) {
6937
+ const ac = this.setupStreamInterrupt();
6938
+ try {
6939
+ return await run(ac.signal);
6940
+ } catch (err) {
6941
+ if (isAbortError(err) || ac.signal.aborted) {
6942
+ requestInterrupt();
6943
+ return onAbort();
6944
+ }
6945
+ throw err;
6946
+ } finally {
6947
+ this.teardownStreamInterrupt();
6948
+ }
6949
+ }
6880
6950
  setupStreamInterrupt() {
6881
6951
  const ac = new AbortController();
6882
6952
  this.streamAbortController = ac;
@@ -7220,42 +7290,52 @@ ${mcpBudgetNote}` : "");
7220
7290
  this.teardownStreamInterrupt();
7221
7291
  }
7222
7292
  }
7223
- const result = await withFallback(
7224
- this.currentProvider,
7225
- effectiveModel,
7226
- this.providers,
7227
- fallbackOpts,
7228
- (p, m) => p.chatWithTools({ ...chatRequest, model: m }, toolDefs)
7293
+ return this.withInterruptibleCall(
7294
+ (signal) => withFallback(
7295
+ this.currentProvider,
7296
+ effectiveModel,
7297
+ this.providers,
7298
+ fallbackOpts,
7299
+ (p, m) => p.chatWithTools(
7300
+ { ...chatRequest, model: m, signal },
7301
+ toolDefs
7302
+ )
7303
+ ),
7304
+ // 中断:以 host-stop 正常收尾,不为一次主动取消喷 provider 报错
7305
+ () => ({ toolCalls: [], content: "", stopLoop: true })
7229
7306
  );
7230
- return result;
7231
7307
  },
7232
7308
  // ── 轮次耗尽总结:空工具列表强制纯文本 ──
7233
7309
  callSummary: async (summaryExtra) => {
7234
7310
  spinner.stop();
7235
7311
  spinner.start("Generating summary...");
7236
7312
  try {
7237
- const summaryResult = await provider.chatWithTools(
7238
- {
7239
- messages: apiMessages,
7240
- model: effectiveModel,
7241
- systemPrompt,
7242
- systemPromptVolatile,
7243
- stream: false,
7244
- temperature: modelParams.temperature,
7245
- maxTokens: modelParams.maxTokens,
7246
- timeout: modelParams.timeout,
7247
- thinking: modelParams.thinking,
7248
- thinkingBudget: modelParams.thinkingBudget,
7249
- _extraMessages: summaryExtra
7313
+ return await this.withInterruptibleCall(
7314
+ async (signal) => {
7315
+ const r = await provider.chatWithTools(
7316
+ {
7317
+ messages: apiMessages,
7318
+ model: effectiveModel,
7319
+ systemPrompt,
7320
+ systemPromptVolatile,
7321
+ stream: false,
7322
+ temperature: modelParams.temperature,
7323
+ maxTokens: modelParams.maxTokens,
7324
+ timeout: modelParams.timeout,
7325
+ thinking: modelParams.thinking,
7326
+ thinkingBudget: modelParams.thinkingBudget,
7327
+ signal,
7328
+ _extraMessages: summaryExtra
7329
+ },
7330
+ []
7331
+ // 不提供任何工具,强制 AI 返回纯文本
7332
+ );
7333
+ return "content" in r ? { content: r.content, usage: r.usage } : { usage: r.usage };
7250
7334
  },
7251
- []
7252
- // 不提供任何工具,强制 AI 返回纯文本
7335
+ () => ({})
7253
7336
  );
7337
+ } finally {
7254
7338
  spinner.stop();
7255
- return "content" in summaryResult ? { content: summaryResult.content, usage: summaryResult.usage } : { usage: summaryResult.usage };
7256
- } catch (err) {
7257
- spinner.stop();
7258
- throw err;
7259
7339
  }
7260
7340
  },
7261
7341
  executeTools: async (toolCalls, extraMessages) => {
@@ -8033,7 +8113,7 @@ program.command("web").description("Start Web UI server with browser-based chat
8033
8113
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
8034
8114
  process.exit(1);
8035
8115
  }
8036
- const { startWebServer } = await import("./server-ILKG2672.js");
8116
+ const { startWebServer } = await import("./server-SSAWGNT7.js");
8037
8117
  await startWebServer({ port, host: options.host });
8038
8118
  });
8039
8119
  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) => {
@@ -8200,11 +8280,11 @@ program.command("sessions").description("List recent conversation sessions").opt
8200
8280
  console.log(footer + "\n");
8201
8281
  });
8202
8282
  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) => {
8203
- const { runUsageCli } = await import("./usage-KCPH75KI.js");
8283
+ const { runUsageCli } = await import("./usage-PDKM7J75.js");
8204
8284
  await runUsageCli(options);
8205
8285
  });
8206
8286
  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) => {
8207
- const { runDoctorCli } = await import("./doctor-cli-6MHA7Q7M.js");
8287
+ const { runDoctorCli } = await import("./doctor-cli-PXGXZYQB.js");
8208
8288
  const argv = process.argv.slice(2);
8209
8289
  await runDoctorCli({
8210
8290
  json: !!options.json || argv.includes("--json"),
@@ -8213,7 +8293,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
8213
8293
  });
8214
8294
  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) => {
8215
8295
  try {
8216
- const batch = await import("./batch-74P2FQWX.js");
8296
+ const batch = await import("./batch-YUPAC4CK.js");
8217
8297
  switch (action) {
8218
8298
  case "submit":
8219
8299
  if (!arg) {
@@ -8256,7 +8336,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
8256
8336
  }
8257
8337
  });
8258
8338
  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) => {
8259
- const { startMcpServer } = await import("./server-RNBKZ6TP.js");
8339
+ const { startMcpServer } = await import("./server-YZ37TL46.js");
8260
8340
  await startMcpServer({
8261
8341
  allowDestructive: !!options.allowDestructive,
8262
8342
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -8269,7 +8349,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
8269
8349
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
8270
8350
  process.exit(1);
8271
8351
  }
8272
- const { runPrCli } = await import("./pr-UNCWDVN3.js");
8352
+ const { runPrCli } = await import("./pr-7LQTAUFK.js");
8273
8353
  const result = await runPrCli({
8274
8354
  action,
8275
8355
  target,
@@ -8289,8 +8369,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
8289
8369
  process.exit(result.exitCode);
8290
8370
  });
8291
8371
  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) => {
8292
- const { runCi } = await import("./ci-6BANR65W.js");
8293
- const { formatCiResult } = await import("./ci-format-2OVEQK6O.js");
8372
+ const { runCi } = await import("./ci-FX26BNT2.js");
8373
+ const { formatCiResult } = await import("./ci-format-GEWIAIZD.js");
8294
8374
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
8295
8375
  if (formats > 1) {
8296
8376
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -8448,7 +8528,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
8448
8528
  config.get("customProviders"),
8449
8529
  config.getConfigDir()
8450
8530
  );
8451
- const { startHub } = await import("./hub-L7RSDS4J.js");
8531
+ const { startHub } = await import("./hub-RCANK6SK.js");
8452
8532
  await startHub(
8453
8533
  {
8454
8534
  topic: topic ?? "",
@@ -27,9 +27,9 @@ import {
27
27
  touchMemoryReferences,
28
28
  updateMemoryApproval,
29
29
  updateMemoryEntry
30
- } from "./chunk-KXAVUZKH.js";
30
+ } from "./chunk-T7R7ILYT.js";
31
31
  import "./chunk-YVTASHS5.js";
32
- import "./chunk-DLOOIAAD.js";
32
+ import "./chunk-R6DXWVVN.js";
33
33
  import "./chunk-6BUTA5VW.js";
34
34
  export {
35
35
  addMemoryEntry,
@@ -28,9 +28,9 @@ import {
28
28
  touchMemoryReferences,
29
29
  updateMemoryApproval,
30
30
  updateMemoryEntry
31
- } from "./chunk-FGONEVTP.js";
31
+ } from "./chunk-HGTDI5ME.js";
32
32
  import "./chunk-HOSJZMQS.js";
33
- import "./chunk-4TDVLTX2.js";
33
+ import "./chunk-323S2X5I.js";
34
34
  import "./chunk-B5TYJO7V.js";
35
35
  import "./chunk-IW3Q7AE5.js";
36
36
  export {
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-3EWST6SE.js";
6
- import "./chunk-PSH5O44I.js";
5
+ } from "./chunk-Z5TCAE4L.js";
6
+ import "./chunk-GC4KA5LF.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
@@ -11,15 +11,15 @@ import {
11
11
  } from "./chunk-HLWUDRBO.js";
12
12
  import {
13
13
  ProviderRegistry
14
- } from "./chunk-GDJII6TK.js";
14
+ } from "./chunk-OIOTHBDB.js";
15
15
  import {
16
16
  ConfigManager
17
- } from "./chunk-G65I4DXP.js";
18
- import "./chunk-XPNKMDBH.js";
17
+ } from "./chunk-H6FND2UG.js";
18
+ import "./chunk-XZNRZGG2.js";
19
19
  import "./chunk-TU3L3PW7.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-4TDVLTX2.js";
22
+ } from "./chunk-323S2X5I.js";
23
23
  import "./chunk-IW3Q7AE5.js";
24
24
 
25
25
  // src/cli/pr.ts
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-V5FB72RK.js";
5
- import "./chunk-DLOOIAAD.js";
4
+ } from "./chunk-KFNQESEG.js";
5
+ import "./chunk-R6DXWVVN.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-BWJYDG3C.js";
6
- import "./chunk-4TDVLTX2.js";
5
+ } from "./chunk-KQQHMGK7.js";
6
+ import "./chunk-323S2X5I.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool
@@ -23,7 +23,7 @@ import {
23
23
  scanDirTree,
24
24
  scanProject,
25
25
  setupProxy
26
- } from "./chunk-7DVIAK6J.js";
26
+ } from "./chunk-YXMBP567.js";
27
27
  import {
28
28
  computeCost,
29
29
  formatCost,
@@ -64,7 +64,7 @@ import {
64
64
  spawnAgentContext,
65
65
  truncateOutput,
66
66
  undoStack
67
- } from "./chunk-4RPJQJBI.js";
67
+ } from "./chunk-HU3IYBU5.js";
68
68
  import {
69
69
  addMemoryEntry,
70
70
  clearMemoryEntries,
@@ -78,7 +78,7 @@ import {
78
78
  parseWritableScope,
79
79
  updateMemoryApproval,
80
80
  updateMemoryEntry
81
- } from "./chunk-FGONEVTP.js";
81
+ } from "./chunk-HGTDI5ME.js";
82
82
  import "./chunk-GLSR2NR3.js";
83
83
  import "./chunk-UUSRWSSX.js";
84
84
  import "./chunk-CKH4KQ4E.js";
@@ -91,13 +91,13 @@ import {
91
91
  buildDoctorReport,
92
92
  formatDoctorReport,
93
93
  loadContextFiles
94
- } from "./chunk-ZZ5WTHKY.js";
94
+ } from "./chunk-NOB2OPQI.js";
95
95
  import {
96
96
  ProviderRegistry
97
- } from "./chunk-GDJII6TK.js";
97
+ } from "./chunk-OIOTHBDB.js";
98
98
  import {
99
99
  ConfigManager
100
- } from "./chunk-G65I4DXP.js";
100
+ } from "./chunk-H6FND2UG.js";
101
101
  import {
102
102
  describePlugin,
103
103
  getActivePluginAssets,
@@ -112,7 +112,7 @@ import {
112
112
  runTool,
113
113
  setPluginEnabled,
114
114
  trustPlugin
115
- } from "./chunk-3KYUE2MD.js";
115
+ } from "./chunk-W5XUZYQE.js";
116
116
  import {
117
117
  CONTENT_ONLY_STREAM_REMINDER,
118
118
  TEE_FINAL_USER_NUDGE,
@@ -129,7 +129,7 @@ import {
129
129
  stripOuterCodeFence,
130
130
  stripToolCallReminder,
131
131
  teeStreamErrorSummary
132
- } from "./chunk-XPNKMDBH.js";
132
+ } from "./chunk-XZNRZGG2.js";
133
133
  import "./chunk-TU3L3PW7.js";
134
134
  import {
135
135
  formatGitContextForPrompt,
@@ -137,7 +137,7 @@ import {
137
137
  getGitRoot
138
138
  } from "./chunk-HOSJZMQS.js";
139
139
  import "./chunk-4BKXL7SM.js";
140
- import "./chunk-BWJYDG3C.js";
140
+ import "./chunk-KQQHMGK7.js";
141
141
  import {
142
142
  AGENTIC_BEHAVIOR_GUIDELINE,
143
143
  AUTHOR,
@@ -153,7 +153,7 @@ import {
153
153
  SKILLS_DIR_NAME,
154
154
  VERSION,
155
155
  buildUserIdentityPrompt
156
- } from "./chunk-4TDVLTX2.js";
156
+ } from "./chunk-323S2X5I.js";
157
157
  import "./chunk-6RPGQ5CG.js";
158
158
  import "./chunk-KHYD3WXE.js";
159
159
  import "./chunk-NYNSYLFY.js";
@@ -815,7 +815,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
815
815
  Cost: ${formatCost(cost)}` : "";
816
816
  let memoryLine = "";
817
817
  try {
818
- const { countPendingMemories } = await import("./persistent-memory-WBR2DALU.js");
818
+ const { countPendingMemories } = await import("./persistent-memory-UARSSYAA.js");
819
819
  const pending = countPendingMemories(ctx.config.getConfigDir());
820
820
  if (pending > 0) memoryLine = `
821
821
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -1624,7 +1624,7 @@ async function handleSecurityReview(args, ctx) {
1624
1624
  async function handleTest(args, ctx) {
1625
1625
  ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
1626
1626
  try {
1627
- const { executeTests } = await import("./run-tests-XBODGDFO.js");
1627
+ const { executeTests } = await import("./run-tests-YNHESHYY.js");
1628
1628
  const argStr = args.join(" ").trim();
1629
1629
  let testArgs = {};
1630
1630
  if (argStr) {
@@ -1888,7 +1888,7 @@ async function handleMemory(args, ctx) {
1888
1888
  ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
1889
1889
  } else if (sub === "export") {
1890
1890
  if (args[1] === "md") {
1891
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-WBR2DALU.js");
1891
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-UARSSYAA.js");
1892
1892
  ctx.send({
1893
1893
  type: "export_data",
1894
1894
  format: "md",