jinzd-ai-cli 0.4.261 → 0.4.263

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 (42) hide show
  1. package/README.md +29 -22
  2. package/README.zh-CN.md +32 -25
  3. package/THIRD_PARTY_NOTICES.md +88 -0
  4. package/dist/{batch-YUPAC4CK.js → batch-AN47AYCZ.js} +2 -2
  5. package/dist/{chunk-XZNRZGG2.js → chunk-3OBY7WSS.js} +1 -0
  6. package/dist/{chunk-R6DXWVVN.js → chunk-3RHY2HF7.js} +1 -1
  7. package/dist/{chunk-T7R7ILYT.js → chunk-5K2LFD7D.js} +1 -1
  8. package/dist/{chunk-KFNQESEG.js → chunk-7YCA2BD3.js} +1 -1
  9. package/dist/{chunk-NOB2OPQI.js → chunk-B27MLWFJ.js} +4 -4
  10. package/dist/{chunk-HU3IYBU5.js → chunk-GKI7B4BD.js} +7 -6
  11. package/dist/{chunk-Z5TCAE4L.js → chunk-GMZTY7DA.js} +4 -4
  12. package/dist/{chunk-GC4KA5LF.js → chunk-MJICIIBW.js} +1 -1
  13. package/dist/{chunk-YXMBP567.js → chunk-MTZ6XHJD.js} +2 -2
  14. package/dist/{chunk-DQY2DDGS.js → chunk-QG4NG7KJ.js} +1 -1
  15. package/dist/{chunk-W5XUZYQE.js → chunk-QMB7QYZC.js} +1 -1
  16. package/dist/{chunk-OIOTHBDB.js → chunk-TL5MD5XU.js} +49 -25
  17. package/dist/{chunk-323S2X5I.js → chunk-VKBGOFEO.js} +1 -1
  18. package/dist/{chunk-HGTDI5ME.js → chunk-VUZAKIZ5.js} +1 -1
  19. package/dist/{chunk-H6FND2UG.js → chunk-WM4VTGAF.js} +3 -1
  20. package/dist/{chunk-KQQHMGK7.js → chunk-XST4N2JM.js} +1 -1
  21. package/dist/{chunk-EZ6QLHOS.js → chunk-YRD6M5XI.js} +30 -5
  22. package/dist/{ci-FX26BNT2.js → ci-JTO7LN5S.js} +6 -6
  23. package/dist/{ci-format-GEWIAIZD.js → ci-format-2VGHOLBA.js} +2 -2
  24. package/dist/{constants-YN4B6C7B.js → constants-HLSJL5HQ.js} +1 -1
  25. package/dist/{doctor-cli-PXGXZYQB.js → doctor-cli-JML4FGH4.js} +6 -6
  26. package/dist/electron-server.js +112 -41
  27. package/dist/{hub-RCANK6SK.js → hub-6EYFGJRT.js} +1 -1
  28. package/dist/index.js +107 -58
  29. package/dist/{persistent-memory-P3COUZZM.js → persistent-memory-ANIMO5CF.js} +2 -2
  30. package/dist/{persistent-memory-UARSSYAA.js → persistent-memory-MPBPSZDN.js} +2 -2
  31. package/dist/{pr-7LQTAUFK.js → pr-XE7NGT6U.js} +6 -6
  32. package/dist/{run-tests-YNHESHYY.js → run-tests-ME5KED57.js} +2 -2
  33. package/dist/{run-tests-7RYU4BK5.js → run-tests-TF7UPUWW.js} +2 -2
  34. package/dist/{server-YZ37TL46.js → server-BIYJEJK3.js} +6 -6
  35. package/dist/{server-SSAWGNT7.js → server-VKA4FR2Z.js} +38 -19
  36. package/dist/{task-orchestrator-ZFL4E6NZ.js → task-orchestrator-2RAKLFWN.js} +6 -6
  37. package/dist/{usage-PDKM7J75.js → usage-5F5Q3GGR.js} +4 -4
  38. package/dist/web/client/actions.js +12 -7
  39. package/dist/web/client/app.js +5 -37
  40. package/dist/web/client/sidebar-tabs.js +48 -0
  41. package/dist/web/client/sw.js +1 -1
  42. package/package.json +13 -10
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CostTracker
4
- } from "./chunk-DQY2DDGS.js";
4
+ } from "./chunk-QG4NG7KJ.js";
5
5
  import {
6
6
  McpManager,
7
7
  SNAPSHOT_PROMPT,
@@ -17,12 +17,12 @@ import {
17
17
  scanProject,
18
18
  sessionHasMeaningfulContent,
19
19
  setupProxy
20
- } from "./chunk-YXMBP567.js";
20
+ } from "./chunk-MTZ6XHJD.js";
21
21
  import {
22
22
  computeCost,
23
23
  formatCost,
24
24
  getPricing
25
- } from "./chunk-EZ6QLHOS.js";
25
+ } from "./chunk-YRD6M5XI.js";
26
26
  import {
27
27
  buildReviewPrompt,
28
28
  buildSecurityReviewPrompt
@@ -50,7 +50,7 @@ import {
50
50
  spawnAgentContext,
51
51
  theme,
52
52
  undoStack
53
- } from "./chunk-HU3IYBU5.js";
53
+ } from "./chunk-GKI7B4BD.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-HGTDI5ME.js";
79
+ } from "./chunk-VUZAKIZ5.js";
80
80
  import "./chunk-GLSR2NR3.js";
81
81
  import "./chunk-UUSRWSSX.js";
82
82
  import "./chunk-CKH4KQ4E.js";
@@ -90,13 +90,14 @@ import {
90
90
  formatDoctorReport,
91
91
  loadContextFiles,
92
92
  writeCrashLog
93
- } from "./chunk-NOB2OPQI.js";
93
+ } from "./chunk-B27MLWFJ.js";
94
94
  import {
95
- ProviderRegistry
96
- } from "./chunk-OIOTHBDB.js";
95
+ ProviderRegistry,
96
+ listBuiltInProviderMetadata
97
+ } from "./chunk-TL5MD5XU.js";
97
98
  import {
98
99
  ConfigManager
99
- } from "./chunk-H6FND2UG.js";
100
+ } from "./chunk-WM4VTGAF.js";
100
101
  import {
101
102
  describePlugin,
102
103
  getActivePluginAssets,
@@ -113,7 +114,7 @@ import {
113
114
  trustHook,
114
115
  trustPlugin,
115
116
  untrustHook
116
- } from "./chunk-W5XUZYQE.js";
117
+ } from "./chunk-QMB7QYZC.js";
117
118
  import {
118
119
  CONTENT_ONLY_STREAM_REMINDER,
119
120
  TEE_FINAL_USER_NUDGE,
@@ -133,7 +134,7 @@ import {
133
134
  stripOuterCodeFence,
134
135
  stripToolCallReminder,
135
136
  teeStreamErrorSummary
136
- } from "./chunk-XZNRZGG2.js";
137
+ } from "./chunk-3OBY7WSS.js";
137
138
  import {
138
139
  AuthError,
139
140
  ProviderError,
@@ -147,7 +148,7 @@ import {
147
148
  import {
148
149
  fileCheckpoints
149
150
  } from "./chunk-4BKXL7SM.js";
150
- import "./chunk-KQQHMGK7.js";
151
+ import "./chunk-XST4N2JM.js";
151
152
  import {
152
153
  AGENTIC_BEHAVIOR_GUIDELINE,
153
154
  AUTHOR,
@@ -166,7 +167,7 @@ import {
166
167
  SKILLS_DIR_NAME,
167
168
  VERSION,
168
169
  buildUserIdentityPrompt
169
- } from "./chunk-323S2X5I.js";
170
+ } from "./chunk-VKBGOFEO.js";
170
171
  import {
171
172
  buildChatIndex,
172
173
  clearChatIndex,
@@ -1138,21 +1139,28 @@ function createProviderCommands() {
1138
1139
  {
1139
1140
  name: "think",
1140
1141
  description: "Toggle Extended Thinking mode (deep reasoning for supported models)",
1141
- usage: "/think [on|off|status]",
1142
+ usage: "/think [on|off|low|high|max|status]",
1142
1143
  execute(args, ctx) {
1143
1144
  const sub = args[0]?.toLowerCase() ?? "toggle";
1144
1145
  if (sub === "on") {
1145
1146
  ctx.setThinkingMode(true);
1146
1147
  ctx.renderer.printSuccess("Extended Thinking enabled \u{1F4AD}");
1147
1148
  console.log(theme.dim(" AI will now use deep reasoning before answering."));
1148
- console.log(theme.dim(" Supported: Claude Sonnet 4.5, Claude Opus 4.6, GLM-5"));
1149
+ console.log(theme.dim(" Supported: DeepSeek V4, Claude Sonnet/Opus, GLM-5"));
1149
1150
  console.log(theme.dim(" Use /think off to disable."));
1150
1151
  console.log();
1151
1152
  return;
1152
1153
  }
1153
1154
  if (sub === "off") {
1154
- ctx.setThinkingMode(null);
1155
- ctx.renderer.printSuccess("Extended Thinking disabled \u2014 using config default.");
1155
+ ctx.setThinkingMode(false);
1156
+ ctx.renderer.printSuccess("Extended Thinking disabled.");
1157
+ console.log();
1158
+ return;
1159
+ }
1160
+ if (sub === "low" || sub === "high" || sub === "max") {
1161
+ ctx.setThinkingMode(true);
1162
+ ctx.setThinkingEffort(sub);
1163
+ ctx.renderer.printSuccess(`Extended Thinking enabled (effort: ${sub}).`);
1156
1164
  console.log();
1157
1165
  return;
1158
1166
  }
@@ -1160,13 +1168,14 @@ function createProviderCommands() {
1160
1168
  const mode = ctx.getThinkingMode();
1161
1169
  const label = mode === true ? theme.accent("ON (runtime override)") : mode === false ? theme.dim("OFF (runtime override)") : theme.dim("using config value");
1162
1170
  console.log(` Extended Thinking: ${label}`);
1171
+ console.log(` Reasoning effort: ${ctx.getThinkingEffort() ?? "using config/default (high for DeepSeek V4)"}`);
1163
1172
  console.log();
1164
1173
  return;
1165
1174
  }
1166
1175
  const current = ctx.getThinkingMode();
1167
1176
  if (current === true) {
1168
- ctx.setThinkingMode(null);
1169
- ctx.renderer.printSuccess("Extended Thinking disabled \u2014 using config default.");
1177
+ ctx.setThinkingMode(false);
1178
+ ctx.renderer.printSuccess("Extended Thinking disabled.");
1170
1179
  } else {
1171
1180
  ctx.setThinkingMode(true);
1172
1181
  ctx.renderer.printSuccess("Extended Thinking enabled \u{1F4AD}");
@@ -1398,7 +1407,7 @@ No tools match "${filter}".
1398
1407
  const { join: join6 } = await import("path");
1399
1408
  const { existsSync: existsSync6 } = await import("fs");
1400
1409
  const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
1401
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-YN4B6C7B.js");
1410
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-HLSJL5HQ.js");
1402
1411
  const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
1403
1412
  const cwd = process.cwd();
1404
1413
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -2386,7 +2395,7 @@ function createReviewCommands() {
2386
2395
  usage: "/test [command|filter]",
2387
2396
  async execute(args, ctx) {
2388
2397
  try {
2389
- const { executeTests } = await import("./run-tests-YNHESHYY.js");
2398
+ const { executeTests } = await import("./run-tests-ME5KED57.js");
2390
2399
  const argStr = args.join(" ").trim();
2391
2400
  let testArgs = {};
2392
2401
  if (argStr) {
@@ -3942,7 +3951,7 @@ function createMiscCommands() {
3942
3951
  ["/provider <name>", "Switch AI provider"],
3943
3952
  ["/model [name|refresh|cache]", "Switch model or refresh live model cache"],
3944
3953
  ["/route [on|off|show|test <msg>]", "Smart model routing rules"],
3945
- ["/think [on|off|status]", "Toggle Extended Thinking (deep reasoning)"],
3954
+ ["/think [on|off|low|high|max|status]", "Control Extended Thinking and effort"],
3946
3955
  ["/plan [execute|exit|status]", "Enter/manage Plan Mode (read-only)"],
3947
3956
  ["/auto [on|off|status]", "Rule-based low-risk auto approval"],
3948
3957
  ["/permissions recently-denied|clear-denied", "Inspect permission and Auto Mode decisions"],
@@ -5300,6 +5309,49 @@ function writeStartupNotice(line, promptShown, redraw) {
5300
5309
  }
5301
5310
  }
5302
5311
 
5312
+ // src/repl/unicode-backspace.ts
5313
+ function removePreviousGrapheme(line, cursor) {
5314
+ if (cursor <= 0) return { line, cursor };
5315
+ const prefix = line.slice(0, cursor);
5316
+ let start = 0;
5317
+ const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
5318
+ for (const segment of segmenter.segment(prefix)) start = segment.index;
5319
+ return {
5320
+ line: line.slice(0, start) + line.slice(cursor),
5321
+ cursor: start
5322
+ };
5323
+ }
5324
+ function installUnicodeBackspaceRepair(input2, rl, shouldHandle = () => true) {
5325
+ const editable = rl;
5326
+ let previous = { line: editable.line, cursor: editable.cursor };
5327
+ const onKeypress = (_character, key) => {
5328
+ const current = { line: editable.line, cursor: editable.cursor };
5329
+ if (key?.name === "backspace" && shouldHandle() && previous.cursor > 0 && current.line === previous.line && current.cursor === previous.cursor) {
5330
+ const repaired = removePreviousGrapheme(current.line, current.cursor);
5331
+ editable.line = repaired.line;
5332
+ editable.cursor = repaired.cursor;
5333
+ editable._refreshLine?.();
5334
+ previous = repaired;
5335
+ return;
5336
+ }
5337
+ previous = current;
5338
+ };
5339
+ input2.on("keypress", onKeypress);
5340
+ return () => input2.off("keypress", onKeypress);
5341
+ }
5342
+
5343
+ // src/repl/chat-params.ts
5344
+ function chatParamsFrom(params) {
5345
+ return {
5346
+ temperature: params.temperature,
5347
+ maxTokens: params.maxTokens,
5348
+ timeout: params.timeout,
5349
+ thinking: params.thinking,
5350
+ thinkingEffort: params.thinkingEffort,
5351
+ thinkingBudget: params.thinkingBudget
5352
+ };
5353
+ }
5354
+
5303
5355
  // src/core/model-router.ts
5304
5356
  var TAG_REGEX = /(?:^|\s)#([a-zA-Z][\w-]{0,31})\b/g;
5305
5357
  function extractTags(message) {
@@ -5650,6 +5702,7 @@ var Repl = class {
5650
5702
  running = false;
5651
5703
  /** 是否已注册 bracketed-paste 的 process.exit 还原钩子(只注册一次) */
5652
5704
  bracketedPasteRestoreHooked = false;
5705
+ disposeUnicodeBackspaceRepair = null;
5653
5706
  renderer;
5654
5707
  commands;
5655
5708
  toolRegistry;
@@ -6107,7 +6160,7 @@ ${ctxLine}` : "")
6107
6160
  const skillTag = activeSkill ? theme.toolCall(`[${activeSkill.meta.name}]`) : "";
6108
6161
  const planTag = this.planMode ? theme.warning("[PLAN]") : "";
6109
6162
  const modelParams = this.getModelParams();
6110
- const thinkTag = modelParams.thinking ? theme.accent("[THINK]") : "";
6163
+ const thinkTag = modelParams.thinking ? theme.accent(`[THINK:${modelParams.thinkingEffort ?? "high"}]`) : "";
6111
6164
  const promptStr = theme.success(`[${this.currentProvider}]`) + skillTag + planTag + thinkTag + chalk5.white(" > ");
6112
6165
  this.rl.setPrompt(promptStr);
6113
6166
  }
@@ -6402,6 +6455,11 @@ Session '${this.resumeSessionId}' not found.
6402
6455
  }
6403
6456
  }
6404
6457
  this.setupClipboardPaste();
6458
+ this.disposeUnicodeBackspaceRepair = installUnicodeBackspaceRepair(
6459
+ process.stdin,
6460
+ this.rl,
6461
+ () => !this.streamAbortController && !this.toolExecutor.confirming && !askUserContext.prompting && !this.selecting
6462
+ );
6405
6463
  this.enableBracketedPaste();
6406
6464
  this.rl.on("SIGINT", () => {
6407
6465
  if (this.streamAbortController) {
@@ -6646,6 +6704,7 @@ Session '${this.resumeSessionId}' not found.
6646
6704
  */
6647
6705
  /** 运行时 thinking 模式覆盖:null=使用配置值,true/false=运行时覆盖 */
6648
6706
  runtimeThinking = null;
6707
+ runtimeThinkingEffort = null;
6649
6708
  getModelParams(modelOverride) {
6650
6709
  const allParams = this.config.get("modelParams");
6651
6710
  const modelId = modelOverride ?? this.currentModel;
@@ -6654,6 +6713,7 @@ Session '${this.resumeSessionId}' not found.
6654
6713
  ...params,
6655
6714
  maxTokens: params.maxTokens ?? DEFAULT_MAX_TOKENS,
6656
6715
  thinking: this.runtimeThinking ?? params.thinking,
6716
+ thinkingEffort: this.runtimeThinkingEffort ?? params.thinkingEffort,
6657
6717
  thinkingBudget: params.thinkingBudget
6658
6718
  };
6659
6719
  }
@@ -7073,11 +7133,7 @@ Session '${this.resumeSessionId}' not found.
7073
7133
  systemPrompt: chatStable,
7074
7134
  systemPromptVolatile: chatVolatile,
7075
7135
  stream: true,
7076
- temperature: modelParams.temperature,
7077
- maxTokens: modelParams.maxTokens,
7078
- timeout: modelParams.timeout,
7079
- thinking: modelParams.thinking,
7080
- thinkingBudget: modelParams.thinkingBudget,
7136
+ ...chatParamsFrom(modelParams),
7081
7137
  signal: ac.signal
7082
7138
  });
7083
7139
  const showTokens = this.shouldShowTokens();
@@ -7108,11 +7164,7 @@ Session '${this.resumeSessionId}' not found.
7108
7164
  systemPrompt: chatStable,
7109
7165
  systemPromptVolatile: chatVolatile,
7110
7166
  stream: false,
7111
- temperature: modelParams.temperature,
7112
- maxTokens: modelParams.maxTokens,
7113
- timeout: modelParams.timeout,
7114
- thinking: modelParams.thinking,
7115
- thinkingBudget: modelParams.thinkingBudget
7167
+ ...chatParamsFrom(modelParams)
7116
7168
  });
7117
7169
  spinner.stop();
7118
7170
  this.renderer.renderResponse(response.content);
@@ -7247,11 +7299,7 @@ ${mcpBudgetNote}` : "");
7247
7299
  systemPrompt,
7248
7300
  systemPromptVolatile,
7249
7301
  stream: false,
7250
- temperature: modelParams.temperature,
7251
- maxTokens: modelParams.maxTokens,
7252
- timeout: modelParams.timeout,
7253
- thinking: modelParams.thinking,
7254
- thinkingBudget: modelParams.thinkingBudget,
7302
+ ...chatParamsFrom(modelParams),
7255
7303
  ...extraMessages.length > 0 ? { _extraMessages: extraMessages } : {}
7256
7304
  };
7257
7305
  const fallbackOpts = this.getFallbackOptions(spinner);
@@ -7319,11 +7367,7 @@ ${mcpBudgetNote}` : "");
7319
7367
  systemPrompt,
7320
7368
  systemPromptVolatile,
7321
7369
  stream: false,
7322
- temperature: modelParams.temperature,
7323
- maxTokens: modelParams.maxTokens,
7324
- timeout: modelParams.timeout,
7325
- thinking: modelParams.thinking,
7326
- thinkingBudget: modelParams.thinkingBudget,
7370
+ ...chatParamsFrom(modelParams),
7327
7371
  signal,
7328
7372
  _extraMessages: summaryExtra
7329
7373
  },
@@ -7686,11 +7730,7 @@ Tip: You can continue the conversation by asking the AI to proceed.`
7686
7730
  systemPrompt: teeSystemPrompt,
7687
7731
  systemPromptVolatile,
7688
7732
  stream: true,
7689
- temperature: modelParams.temperature,
7690
- maxTokens: modelParams.maxTokens,
7691
- timeout: modelParams.timeout,
7692
- thinking: modelParams.thinking,
7693
- thinkingBudget: modelParams.thinkingBudget,
7733
+ ...chatParamsFrom(modelParams),
7694
7734
  signal: teeAc.signal,
7695
7735
  _extraMessages: teeExtraMessages
7696
7736
  });
@@ -7937,6 +7977,11 @@ Tip: You can continue the conversation by asking the AI to proceed.`
7937
7977
  this.runtimeThinking = value;
7938
7978
  this.refreshPrompt();
7939
7979
  },
7980
+ getThinkingEffort: () => this.runtimeThinkingEffort,
7981
+ setThinkingEffort: (value) => {
7982
+ this.runtimeThinkingEffort = value;
7983
+ this.refreshPrompt();
7984
+ },
7940
7985
  getMcpManager: () => this.mcpManager,
7941
7986
  getMcpServerSource: (serverId) => this.mcpServerSources.get(serverId),
7942
7987
  chatOnce: async (prompt, options) => {
@@ -7949,6 +7994,7 @@ Tip: You can continue the conversation by asking the AI to proceed.`
7949
7994
  systemPrompt: coStable,
7950
7995
  systemPromptVolatile: coVolatile,
7951
7996
  stream: false,
7997
+ ...chatParamsFrom(modelParams),
7952
7998
  temperature: options?.temperature ?? 0.3,
7953
7999
  maxTokens: options?.maxTokens ?? modelParams.maxTokens ?? 4096,
7954
8000
  timeout: modelParams.timeout ?? 6e4
@@ -8012,6 +8058,8 @@ Tip: You can continue the conversation by asking the AI to proceed.`
8012
8058
  `);
8013
8059
  });
8014
8060
  this.disableBracketedPaste();
8061
+ this.disposeUnicodeBackspaceRepair?.();
8062
+ this.disposeUnicodeBackspaceRepair = null;
8015
8063
  this.rl.close();
8016
8064
  console.log(theme.dim("\nGoodbye!"));
8017
8065
  process.exit(0);
@@ -8065,8 +8113,9 @@ process.on("unhandledRejection", (reason) => {
8065
8113
  `);
8066
8114
  process.exit(1);
8067
8115
  });
8116
+ var builtInProviderIds = listBuiltInProviderMetadata().map(({ id }) => id).join("/");
8068
8117
  program.name("aicli").description("Cross-platform REPL-style AI CLI with multi-provider support").version(VERSION);
8069
- program.option("--provider <name>", "AI provider to use (claude/gemini/deepseek/zhipu/kimi or any custom provider)").option("-m, --model <name>", "Model to use").option("-p, --prompt <text>", "Headless mode: send a single prompt and exit (reads stdin as context if piped)").option("--system <prompt>", "System prompt override (headless mode)").option("--json", "Output result as JSON object (headless mode only)").option("--output-format <format>", "Output format: text (default) | streaming-json (NDJSON per-chunk, headless only)").option("--no-stream", "Disable streaming output").option("--allowed-tools <tools>", "Comma-separated whitelist of tools (e.g. bash,read_file)").option("--blocked-tools <tools>", "Comma-separated blacklist of tools (e.g. bash,write_file)").option("--resume <id>", "Resume a previous session by ID (prefix match supported)").option("--max-tool-rounds <n>", "Max agentic tool-call rounds per conversation (default: 200)").action(async (options) => {
8118
+ program.option("--provider <name>", `AI provider to use (${builtInProviderIds}, or any custom provider)`).option("-m, --model <name>", "Model to use").option("-p, --prompt <text>", "Headless mode: send a single prompt and exit (reads stdin as context if piped)").option("--system <prompt>", "System prompt override (headless mode)").option("--json", "Output result as JSON object (headless mode only)").option("--output-format <format>", "Output format: text (default) | streaming-json (NDJSON per-chunk, headless only)").option("--no-stream", "Disable streaming output").option("--allowed-tools <tools>", "Comma-separated whitelist of tools (e.g. bash,read_file)").option("--blocked-tools <tools>", "Comma-separated blacklist of tools (e.g. bash,write_file)").option("--resume <id>", "Resume a previous session by ID (prefix match supported)").option("--max-tool-rounds <n>", "Max agentic tool-call rounds per conversation (default: 200)").action(async (options) => {
8070
8119
  if (options.prompt !== void 0) {
8071
8120
  await runHeadless(options);
8072
8121
  } else {
@@ -8113,7 +8162,7 @@ program.command("web").description("Start Web UI server with browser-based chat
8113
8162
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
8114
8163
  process.exit(1);
8115
8164
  }
8116
- const { startWebServer } = await import("./server-SSAWGNT7.js");
8165
+ const { startWebServer } = await import("./server-VKA4FR2Z.js");
8117
8166
  await startWebServer({ port, host: options.host });
8118
8167
  });
8119
8168
  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) => {
@@ -8280,11 +8329,11 @@ program.command("sessions").description("List recent conversation sessions").opt
8280
8329
  console.log(footer + "\n");
8281
8330
  });
8282
8331
  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) => {
8283
- const { runUsageCli } = await import("./usage-PDKM7J75.js");
8332
+ const { runUsageCli } = await import("./usage-5F5Q3GGR.js");
8284
8333
  await runUsageCli(options);
8285
8334
  });
8286
8335
  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) => {
8287
- const { runDoctorCli } = await import("./doctor-cli-PXGXZYQB.js");
8336
+ const { runDoctorCli } = await import("./doctor-cli-JML4FGH4.js");
8288
8337
  const argv = process.argv.slice(2);
8289
8338
  await runDoctorCli({
8290
8339
  json: !!options.json || argv.includes("--json"),
@@ -8293,7 +8342,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
8293
8342
  });
8294
8343
  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) => {
8295
8344
  try {
8296
- const batch = await import("./batch-YUPAC4CK.js");
8345
+ const batch = await import("./batch-AN47AYCZ.js");
8297
8346
  switch (action) {
8298
8347
  case "submit":
8299
8348
  if (!arg) {
@@ -8336,7 +8385,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
8336
8385
  }
8337
8386
  });
8338
8387
  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) => {
8339
- const { startMcpServer } = await import("./server-YZ37TL46.js");
8388
+ const { startMcpServer } = await import("./server-BIYJEJK3.js");
8340
8389
  await startMcpServer({
8341
8390
  allowDestructive: !!options.allowDestructive,
8342
8391
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -8349,7 +8398,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
8349
8398
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
8350
8399
  process.exit(1);
8351
8400
  }
8352
- const { runPrCli } = await import("./pr-7LQTAUFK.js");
8401
+ const { runPrCli } = await import("./pr-XE7NGT6U.js");
8353
8402
  const result = await runPrCli({
8354
8403
  action,
8355
8404
  target,
@@ -8369,8 +8418,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
8369
8418
  process.exit(result.exitCode);
8370
8419
  });
8371
8420
  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) => {
8372
- const { runCi } = await import("./ci-FX26BNT2.js");
8373
- const { formatCiResult } = await import("./ci-format-GEWIAIZD.js");
8421
+ const { runCi } = await import("./ci-JTO7LN5S.js");
8422
+ const { formatCiResult } = await import("./ci-format-2VGHOLBA.js");
8374
8423
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
8375
8424
  if (formats > 1) {
8376
8425
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -8528,7 +8577,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
8528
8577
  config.get("customProviders"),
8529
8578
  config.getConfigDir()
8530
8579
  );
8531
- const { startHub } = await import("./hub-RCANK6SK.js");
8580
+ const { startHub } = await import("./hub-6EYFGJRT.js");
8532
8581
  await startHub(
8533
8582
  {
8534
8583
  topic: topic ?? "",
@@ -27,9 +27,9 @@ import {
27
27
  touchMemoryReferences,
28
28
  updateMemoryApproval,
29
29
  updateMemoryEntry
30
- } from "./chunk-T7R7ILYT.js";
30
+ } from "./chunk-5K2LFD7D.js";
31
31
  import "./chunk-YVTASHS5.js";
32
- import "./chunk-R6DXWVVN.js";
32
+ import "./chunk-3RHY2HF7.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-HGTDI5ME.js";
31
+ } from "./chunk-VUZAKIZ5.js";
32
32
  import "./chunk-HOSJZMQS.js";
33
- import "./chunk-323S2X5I.js";
33
+ import "./chunk-VKBGOFEO.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-Z5TCAE4L.js";
6
- import "./chunk-GC4KA5LF.js";
5
+ } from "./chunk-GMZTY7DA.js";
6
+ import "./chunk-MJICIIBW.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-OIOTHBDB.js";
14
+ } from "./chunk-TL5MD5XU.js";
15
15
  import {
16
16
  ConfigManager
17
- } from "./chunk-H6FND2UG.js";
18
- import "./chunk-XZNRZGG2.js";
17
+ } from "./chunk-WM4VTGAF.js";
18
+ import "./chunk-3OBY7WSS.js";
19
19
  import "./chunk-TU3L3PW7.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-323S2X5I.js";
22
+ } from "./chunk-VKBGOFEO.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-KQQHMGK7.js";
6
- import "./chunk-323S2X5I.js";
5
+ } from "./chunk-XST4N2JM.js";
6
+ import "./chunk-VKBGOFEO.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-KFNQESEG.js";
5
- import "./chunk-R6DXWVVN.js";
4
+ } from "./chunk-7YCA2BD3.js";
5
+ import "./chunk-3RHY2HF7.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -1,26 +1,26 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-HU3IYBU5.js";
5
- import "./chunk-HGTDI5ME.js";
4
+ } from "./chunk-GKI7B4BD.js";
5
+ import "./chunk-VUZAKIZ5.js";
6
6
  import "./chunk-GLSR2NR3.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-W5XUZYQE.js";
12
+ } from "./chunk-QMB7QYZC.js";
13
13
  import {
14
14
  getDangerLevel,
15
15
  schemaToJsonSchema
16
- } from "./chunk-XZNRZGG2.js";
16
+ } from "./chunk-3OBY7WSS.js";
17
17
  import "./chunk-TU3L3PW7.js";
18
18
  import "./chunk-HOSJZMQS.js";
19
19
  import "./chunk-4BKXL7SM.js";
20
- import "./chunk-KQQHMGK7.js";
20
+ import "./chunk-XST4N2JM.js";
21
21
  import {
22
22
  VERSION
23
- } from "./chunk-323S2X5I.js";
23
+ } from "./chunk-VKBGOFEO.js";
24
24
  import "./chunk-6RPGQ5CG.js";
25
25
  import "./chunk-KHYD3WXE.js";
26
26
  import "./chunk-NYNSYLFY.js";