jinzd-ai-cli 0.4.255 → 0.4.256

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 (41) hide show
  1. package/README.md +2 -2
  2. package/README.zh-CN.md +2 -2
  3. package/dist/{batch-OWBKG6XZ.js → batch-A6WZTY56.js} +3 -3
  4. package/dist/{chunk-ZRBGH245.js → chunk-2CGCEN7Q.js} +2 -2
  5. package/dist/{chunk-IRSNREEO.js → chunk-3C6TKCRL.js} +3 -3
  6. package/dist/{chunk-X2V76VPG.js → chunk-3F5FAUCI.js} +1 -1
  7. package/dist/{chunk-YJ7VL7VL.js → chunk-AL3H7VI2.js} +1 -1
  8. package/dist/{chunk-B42HK6GL.js → chunk-DQW3TJ4M.js} +1 -1
  9. package/dist/{chunk-SMIQ6CBX.js → chunk-FIXDD5WC.js} +1 -1
  10. package/dist/{chunk-SVWIUNOA.js → chunk-IXGGIS3K.js} +1 -1
  11. package/dist/{chunk-CU5ZNAIX.js → chunk-KTN7YDXC.js} +1 -1
  12. package/dist/{chunk-PSXIVQ3N.js → chunk-LEZB4KKZ.js} +1 -0
  13. package/dist/{chunk-FOC2YWOF.js → chunk-P5HO5RXI.js} +1 -1
  14. package/dist/{chunk-U6OV523Y.js → chunk-TN62NEIY.js} +1 -1
  15. package/dist/{chunk-5ULLIOVC.js → chunk-TU3L3PW7.js} +5 -2
  16. package/dist/{chunk-2UZ23L5P.js → chunk-UPOFNYWD.js} +2 -2
  17. package/dist/{chunk-PSP4W2MG.js → chunk-VEBTQK3D.js} +38 -20
  18. package/dist/{chunk-3WKUKMBG.js → chunk-VUGDRRX3.js} +4 -4
  19. package/dist/{chunk-7QWFFLKV.js → chunk-X45KVQHD.js} +4 -4
  20. package/dist/ci-2YHS67DD.js +19 -0
  21. package/dist/{ci-format-CTGDLJTS.js → ci-format-AS3NBCVH.js} +2 -2
  22. package/dist/{constants-LJRYL7IN.js → constants-RMUULNCF.js} +1 -1
  23. package/dist/doctor-cli-UOSY3GL6.js +17 -0
  24. package/dist/electron-server.js +47 -23
  25. package/dist/{hub-4EEDUJED.js → hub-SIPD6DKN.js} +2 -2
  26. package/dist/{hub-server-XA7HTVLD.js → hub-server-QGUSMN22.js} +3 -0
  27. package/dist/index.js +34 -28
  28. package/dist/{persistent-memory-DMN76UB5.js → persistent-memory-ELW2QNRA.js} +2 -2
  29. package/dist/{persistent-memory-EEAGHDFR.js → persistent-memory-JIXASKVH.js} +2 -2
  30. package/dist/{pr-Q74YHWN2.js → pr-NI5ZF7LE.js} +7 -7
  31. package/dist/{run-tests-N3ES4YMU.js → run-tests-NSOI3UB5.js} +2 -2
  32. package/dist/{run-tests-ADZQ2JWI.js → run-tests-XZ4DN4NV.js} +2 -2
  33. package/dist/{server-HUWVPJKQ.js → server-52KYUXTT.js} +7 -7
  34. package/dist/{server-PMEZ3HDO.js → server-WIBGSOFE.js} +16 -14
  35. package/dist/{task-orchestrator-KLCN25OY.js → task-orchestrator-BPXLRZTU.js} +13 -7
  36. package/dist/{usage-MNMRX5OE.js → usage-K7GM44EG.js} +3 -3
  37. package/dist/web/client/app.js +3329 -3312
  38. package/dist/web/client/index.html +70 -70
  39. package/package.json +19 -9
  40. package/dist/ci-V5GVGYZO.js +0 -19
  41. package/dist/doctor-cli-GOM2GQUK.js +0 -17
@@ -34,14 +34,14 @@ import {
34
34
  touchMemoryReferences,
35
35
  updateMemoryApproval,
36
36
  updateMemoryEntry
37
- } from "./chunk-YJ7VL7VL.js";
37
+ } from "./chunk-AL3H7VI2.js";
38
38
  import {
39
39
  redactJson,
40
40
  scanString
41
41
  } from "./chunk-YVTASHS5.js";
42
42
  import {
43
43
  runTestsTool
44
- } from "./chunk-B42HK6GL.js";
44
+ } from "./chunk-DQW3TJ4M.js";
45
45
  import {
46
46
  AGENTIC_BEHAVIOR_GUIDELINE,
47
47
  APP_NAME,
@@ -73,7 +73,7 @@ import {
73
73
  SUBAGENT_MAX_ROUNDS_LIMIT,
74
74
  VERSION,
75
75
  buildUserIdentityPrompt
76
- } from "./chunk-CU5ZNAIX.js";
76
+ } from "./chunk-KTN7YDXC.js";
77
77
  import {
78
78
  hasSemanticIndex,
79
79
  semanticSearch
@@ -473,10 +473,11 @@ var ProviderError = class extends AiCliError {
473
473
  this.providerId = providerId;
474
474
  this.name = "ProviderError";
475
475
  }
476
+ providerId;
476
477
  };
477
478
  var AuthError = class extends ProviderError {
478
479
  constructor(providerId) {
479
- super(providerId, "Invalid or missing API key. Run: ai-cli config");
480
+ super(providerId, "Invalid or missing API key. Run: aicli config");
480
481
  this.name = "AuthError";
481
482
  }
482
483
  };
@@ -495,7 +496,7 @@ var ConfigError = class extends AiCliError {
495
496
  var ProviderNotFoundError = class extends AiCliError {
496
497
  constructor(providerId) {
497
498
  super(
498
- `Provider '${providerId}' is not configured. Run: ai-cli config`
499
+ `Provider '${providerId}' is not configured. Run: aicli config`
499
500
  );
500
501
  this.name = "ProviderNotFoundError";
501
502
  }
@@ -506,6 +507,7 @@ var ToolError = class extends AiCliError {
506
507
  this.toolName = toolName;
507
508
  this.name = "ToolError";
508
509
  }
510
+ toolName;
509
511
  };
510
512
  var NetworkError = class extends AiCliError {
511
513
  constructor(message, statusCode, cause) {
@@ -513,6 +515,7 @@ var NetworkError = class extends AiCliError {
513
515
  this.statusCode = statusCode;
514
516
  this.name = "NetworkError";
515
517
  }
518
+ statusCode;
516
519
  };
517
520
 
518
521
  // src/config/config-manager.ts
@@ -537,7 +540,7 @@ var ConfigManager = class {
537
540
  return ConfigSchema.parse(raw);
538
541
  } catch (err) {
539
542
  throw new ConfigError(
540
- `Config file at ${this.configPath} is invalid. Delete it and run 'ai-cli config' to recreate.
543
+ `Config file at ${this.configPath} is invalid. Delete it and run 'aicli config' to recreate.
541
544
  ${err}`
542
545
  );
543
546
  }
@@ -2444,6 +2447,7 @@ var BudgetWarner = class {
2444
2447
  this.lowAt = Math.min(lowRaw, this.noteAt - 1);
2445
2448
  this.criticalAt = Math.min(criticalRaw, this.lowAt - 1);
2446
2449
  }
2450
+ maxToolRounds;
2447
2451
  noteAt;
2448
2452
  lowAt;
2449
2453
  criticalAt;
@@ -5032,6 +5036,7 @@ async function execInPool(sessionKey, command, timeout, cwd, abortSignal) {
5032
5036
  let resolved = false;
5033
5037
  const markerStartPattern = `AICLI_MARKER_START:${id}`;
5034
5038
  const markerEndPattern = `AICLI_MARKER_END:${id}`;
5039
+ const proc = entry.proc;
5035
5040
  const onData = (chunk) => {
5036
5041
  stdout += IS_WINDOWS2 ? decodeWindowsBuffer(chunk) : chunk.toString("utf-8");
5037
5042
  if (!resolved && stdout.includes(markerEndPattern)) {
@@ -5046,9 +5051,26 @@ async function execInPool(sessionKey, command, timeout, cwd, abortSignal) {
5046
5051
  const onErr = (chunk) => {
5047
5052
  stderr += IS_WINDOWS2 ? decodeWindowsBuffer(chunk) : chunk.toString("utf-8");
5048
5053
  };
5049
- const proc = entry.proc;
5054
+ const finishPoolFailure = (message, exitCode = null) => {
5055
+ if (resolved) return;
5056
+ resolved = true;
5057
+ stdout = stripMarkerOutput(stdout, markerStartPattern, markerEndPattern);
5058
+ stderr += `${stderr ? "\n" : ""}[pool terminated] ${message}`;
5059
+ cleanup();
5060
+ pool.delete(sessionKey);
5061
+ resolve11({ stdout, stderr, exitCode: exitCode === 0 ? null : exitCode, timedOut, aborted });
5062
+ };
5063
+ const onClose = (code, signal) => {
5064
+ const detail = signal ? `signal ${signal}` : `exit code ${code ?? "unknown"}`;
5065
+ finishPoolFailure(`Shell exited before the completion marker (${detail}).`, code);
5066
+ };
5067
+ const onStdinError = (err) => {
5068
+ finishPoolFailure(`Shell stdin failed: ${err.message}`);
5069
+ };
5050
5070
  proc.stdout?.on("data", onData);
5051
5071
  proc.stderr?.on("data", onErr);
5072
+ proc.once("close", onClose);
5073
+ proc.stdin?.once("error", onStdinError);
5052
5074
  const timeoutTimer = setTimeout(() => {
5053
5075
  if (resolved) return;
5054
5076
  timedOut = true;
@@ -5075,29 +5097,26 @@ async function execInPool(sessionKey, command, timeout, cwd, abortSignal) {
5075
5097
  abortSignal?.addEventListener("abort", onAbort, { once: true });
5076
5098
  }
5077
5099
  const onError = (err) => {
5078
- if (resolved) return;
5079
- resolved = true;
5080
- stderr += `
5081
- [pool error] ${err.message}`;
5082
- cleanup();
5083
- resolve11({ stdout, stderr, exitCode: null, timedOut, aborted });
5084
- pool.delete(sessionKey);
5100
+ finishPoolFailure(`Shell process error: ${err.message}`);
5085
5101
  };
5086
- proc.on("error", onError);
5102
+ proc.once("error", onError);
5087
5103
  function cleanup() {
5088
5104
  clearTimeout(timeoutTimer);
5089
5105
  abortSignal?.removeEventListener("abort", onAbort);
5090
5106
  proc.stdout?.removeListener("data", onData);
5091
5107
  proc.stderr?.removeListener("data", onErr);
5108
+ proc.removeListener("close", onClose);
5092
5109
  proc.removeListener("error", onError);
5110
+ proc.stdin?.removeListener("error", onStdinError);
5093
5111
  }
5094
5112
  try {
5095
- proc.stdin?.write(wrappedCmd + "\n");
5096
- } catch {
5097
- if (!resolved) {
5098
- cleanup();
5099
- pool.delete(sessionKey);
5113
+ if (!proc.stdin) {
5114
+ finishPoolFailure("Shell stdin is unavailable.");
5115
+ } else {
5116
+ proc.stdin.write(wrappedCmd + "\n");
5100
5117
  }
5118
+ } catch (err) {
5119
+ finishPoolFailure(`Shell stdin write failed: ${err instanceof Error ? err.message : String(err)}`);
5101
5120
  }
5102
5121
  });
5103
5122
  }
@@ -7080,6 +7099,7 @@ var ToolExecutor = class {
7080
7099
  constructor(registry) {
7081
7100
  this.registry = registry;
7082
7101
  }
7102
+ registry;
7083
7103
  /** 当前 session 消息索引,由 repl.ts / session-handler.ts 在每轮工具执行前设置 */
7084
7104
  static currentMessageIndex = 0;
7085
7105
  round = 0;
@@ -10700,6 +10720,8 @@ var SubAgentExecutor = class {
10700
10720
  this.runId = runId;
10701
10721
  this.prefix = agentPrefix(agentIndex);
10702
10722
  }
10723
+ registry;
10724
+ runId;
10703
10725
  round = 0;
10704
10726
  totalRounds = 0;
10705
10727
  prefix = PREFIX;
@@ -12955,6 +12977,8 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
12955
12977
  this.registry = registry;
12956
12978
  this.ws = ws;
12957
12979
  }
12980
+ registry;
12981
+ ws;
12958
12982
  round = 0;
12959
12983
  totalRounds = 0;
12960
12984
  hookConfig;
@@ -15213,7 +15237,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
15213
15237
  Cost: ${formatCost(cost)}` : "";
15214
15238
  let memoryLine = "";
15215
15239
  try {
15216
- const { countPendingMemories } = await import("./persistent-memory-EEAGHDFR.js");
15240
+ const { countPendingMemories } = await import("./persistent-memory-JIXASKVH.js");
15217
15241
  const pending = countPendingMemories(ctx.config.getConfigDir());
15218
15242
  if (pending > 0) memoryLine = `
15219
15243
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -16022,7 +16046,7 @@ async function handleSecurityReview(args, ctx) {
16022
16046
  async function handleTest(args, ctx) {
16023
16047
  ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
16024
16048
  try {
16025
- const { executeTests } = await import("./run-tests-N3ES4YMU.js");
16049
+ const { executeTests } = await import("./run-tests-NSOI3UB5.js");
16026
16050
  const argStr = args.join(" ").trim();
16027
16051
  let testArgs = {};
16028
16052
  if (argStr) {
@@ -16286,7 +16310,7 @@ async function handleMemory(args, ctx) {
16286
16310
  ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
16287
16311
  } else if (sub === "export") {
16288
16312
  if (args[1] === "md") {
16289
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-EEAGHDFR.js");
16313
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-JIXASKVH.js");
16290
16314
  ctx.send({
16291
16315
  type: "export_data",
16292
16316
  format: "md",
@@ -154,7 +154,7 @@ ${content}`);
154
154
  }
155
155
  }
156
156
  async function runTaskMode(config, providers, configManager, topic) {
157
- const { TaskOrchestrator } = await import("./task-orchestrator-KLCN25OY.js");
157
+ const { TaskOrchestrator } = await import("./task-orchestrator-BPXLRZTU.js");
158
158
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
159
159
  let interrupted = false;
160
160
  const onSigint = () => {
@@ -190,7 +190,7 @@ async function runTaskMode(config, providers, configManager, topic) {
190
190
  }
191
191
  }
192
192
  async function runDistributedDiscussion(config, providers, topic, port) {
193
- const { HubServer } = await import("./hub-server-XA7HTVLD.js");
193
+ const { HubServer } = await import("./hub-server-QGUSMN22.js");
194
194
  const hub = new HubServer(config, providers, port);
195
195
  let interrupted = false;
196
196
  const onSigint = () => {
@@ -26,6 +26,9 @@ var HubServer = class {
26
26
  this.port = port;
27
27
  this.unassignedRoles = [...config.roles];
28
28
  }
29
+ config;
30
+ providers;
31
+ port;
29
32
  wss = null;
30
33
  httpServer = null;
31
34
  agents = /* @__PURE__ */ new Map();
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  scanProject,
18
18
  sessionHasMeaningfulContent,
19
19
  setupProxy
20
- } from "./chunk-2UZ23L5P.js";
20
+ } from "./chunk-UPOFNYWD.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-PSP4W2MG.js";
53
+ } from "./chunk-VEBTQK3D.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-X2V76VPG.js";
79
+ } from "./chunk-3F5FAUCI.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-3WKUKMBG.js";
93
+ } from "./chunk-VUGDRRX3.js";
94
94
  import {
95
95
  ProviderRegistry
96
- } from "./chunk-ZRBGH245.js";
96
+ } from "./chunk-2CGCEN7Q.js";
97
97
  import {
98
98
  ConfigManager
99
- } from "./chunk-IRSNREEO.js";
99
+ } from "./chunk-3C6TKCRL.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-FOC2YWOF.js";
116
+ } from "./chunk-P5HO5RXI.js";
117
117
  import {
118
118
  CONTENT_ONLY_STREAM_REMINDER,
119
119
  TEE_FINAL_USER_NUDGE,
@@ -132,12 +132,12 @@ import {
132
132
  stripOuterCodeFence,
133
133
  stripToolCallReminder,
134
134
  teeStreamErrorSummary
135
- } from "./chunk-PSXIVQ3N.js";
135
+ } from "./chunk-LEZB4KKZ.js";
136
136
  import {
137
137
  AuthError,
138
138
  ProviderError,
139
139
  RateLimitError
140
- } from "./chunk-5ULLIOVC.js";
140
+ } from "./chunk-TU3L3PW7.js";
141
141
  import {
142
142
  formatGitContextForPrompt,
143
143
  getGitContext,
@@ -146,7 +146,7 @@ import {
146
146
  import {
147
147
  fileCheckpoints
148
148
  } from "./chunk-4BKXL7SM.js";
149
- import "./chunk-U6OV523Y.js";
149
+ import "./chunk-TN62NEIY.js";
150
150
  import {
151
151
  AGENTIC_BEHAVIOR_GUIDELINE,
152
152
  AUTHOR,
@@ -165,7 +165,7 @@ import {
165
165
  SKILLS_DIR_NAME,
166
166
  VERSION,
167
167
  buildUserIdentityPrompt
168
- } from "./chunk-SVWIUNOA.js";
168
+ } from "./chunk-IXGGIS3K.js";
169
169
  import {
170
170
  buildChatIndex,
171
171
  clearChatIndex,
@@ -944,7 +944,7 @@ function createProviderCommands() {
944
944
  targetId = args[0];
945
945
  }
946
946
  if (!ctx.providers.has(targetId)) {
947
- ctx.renderer.renderError(`Provider '${targetId}' is not configured. Run: ai-cli config`);
947
+ ctx.renderer.renderError(`Provider '${targetId}' is not configured. Run: aicli config`);
948
948
  return;
949
949
  }
950
950
  const targetProvider = ctx.providers.get(targetId);
@@ -1387,7 +1387,7 @@ No tools match "${filter}".
1387
1387
  const { join: join6 } = await import("path");
1388
1388
  const { existsSync: existsSync6 } = await import("fs");
1389
1389
  const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
1390
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-LJRYL7IN.js");
1390
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-RMUULNCF.js");
1391
1391
  const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
1392
1392
  const cwd = process.cwd();
1393
1393
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -2366,7 +2366,7 @@ function createReviewCommands() {
2366
2366
  usage: "/test [command|filter]",
2367
2367
  async execute(args, ctx) {
2368
2368
  try {
2369
- const { executeTests } = await import("./run-tests-ADZQ2JWI.js");
2369
+ const { executeTests } = await import("./run-tests-XZ4DN4NV.js");
2370
2370
  const argStr = args.join(" ").trim();
2371
2371
  let testArgs = {};
2372
2372
  if (argStr) {
@@ -4483,6 +4483,7 @@ var SetupWizard = class {
4483
4483
  constructor(config) {
4484
4484
  this.config = config;
4485
4485
  }
4486
+ config;
4486
4487
  async runFirstRun() {
4487
4488
  console.log(theme.heading("\nWelcome to ai-cli!\n"));
4488
4489
  console.log("Let's get to know you first, then set up your AI provider.\n");
@@ -4982,6 +4983,7 @@ var CustomCommandManager = class {
4982
4983
  constructor(commandsDir) {
4983
4984
  this.commandsDir = commandsDir;
4984
4985
  }
4986
+ commandsDir;
4985
4987
  commands = /* @__PURE__ */ new Map();
4986
4988
  loadCommands(extraDirs = []) {
4987
4989
  this.commands.clear();
@@ -5579,6 +5581,10 @@ var Repl = class {
5579
5581
  if (options?.maxToolRoundsOverride !== void 0) this.maxToolRoundsOverride = options.maxToolRoundsOverride;
5580
5582
  this.costTracker = new CostTracker(this.config.getConfigDir());
5581
5583
  }
5584
+ providers;
5585
+ sessions;
5586
+ config;
5587
+ events;
5582
5588
  rl;
5583
5589
  currentProvider;
5584
5590
  currentModel;
@@ -7969,7 +7975,7 @@ process.on("unhandledRejection", (reason) => {
7969
7975
  `);
7970
7976
  process.exit(1);
7971
7977
  });
7972
- program.name("ai-cli").description("Cross-platform REPL-style AI CLI with multi-provider support").version(VERSION);
7978
+ program.name("aicli").description("Cross-platform REPL-style AI CLI with multi-provider support").version(VERSION);
7973
7979
  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) => {
7974
7980
  if (options.prompt !== void 0) {
7975
7981
  await runHeadless(options);
@@ -8017,7 +8023,7 @@ program.command("web").description("Start Web UI server with browser-based chat
8017
8023
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
8018
8024
  process.exit(1);
8019
8025
  }
8020
- const { startWebServer } = await import("./server-PMEZ3HDO.js");
8026
+ const { startWebServer } = await import("./server-WIBGSOFE.js");
8021
8027
  await startWebServer({ port, host: options.host });
8022
8028
  });
8023
8029
  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) => {
@@ -8184,11 +8190,11 @@ program.command("sessions").description("List recent conversation sessions").opt
8184
8190
  console.log(footer + "\n");
8185
8191
  });
8186
8192
  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) => {
8187
- const { runUsageCli } = await import("./usage-MNMRX5OE.js");
8193
+ const { runUsageCli } = await import("./usage-K7GM44EG.js");
8188
8194
  await runUsageCli(options);
8189
8195
  });
8190
8196
  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) => {
8191
- const { runDoctorCli } = await import("./doctor-cli-GOM2GQUK.js");
8197
+ const { runDoctorCli } = await import("./doctor-cli-UOSY3GL6.js");
8192
8198
  const argv = process.argv.slice(2);
8193
8199
  await runDoctorCli({
8194
8200
  json: !!options.json || argv.includes("--json"),
@@ -8197,7 +8203,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
8197
8203
  });
8198
8204
  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) => {
8199
8205
  try {
8200
- const batch = await import("./batch-OWBKG6XZ.js");
8206
+ const batch = await import("./batch-A6WZTY56.js");
8201
8207
  switch (action) {
8202
8208
  case "submit":
8203
8209
  if (!arg) {
@@ -8240,7 +8246,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
8240
8246
  }
8241
8247
  });
8242
8248
  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) => {
8243
- const { startMcpServer } = await import("./server-HUWVPJKQ.js");
8249
+ const { startMcpServer } = await import("./server-52KYUXTT.js");
8244
8250
  await startMcpServer({
8245
8251
  allowDestructive: !!options.allowDestructive,
8246
8252
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -8253,7 +8259,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
8253
8259
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
8254
8260
  process.exit(1);
8255
8261
  }
8256
- const { runPrCli } = await import("./pr-Q74YHWN2.js");
8262
+ const { runPrCli } = await import("./pr-NI5ZF7LE.js");
8257
8263
  const result = await runPrCli({
8258
8264
  action,
8259
8265
  target,
@@ -8273,8 +8279,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
8273
8279
  process.exit(result.exitCode);
8274
8280
  });
8275
8281
  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) => {
8276
- const { runCi } = await import("./ci-V5GVGYZO.js");
8277
- const { formatCiResult } = await import("./ci-format-CTGDLJTS.js");
8282
+ const { runCi } = await import("./ci-2YHS67DD.js");
8283
+ const { formatCiResult } = await import("./ci-format-AS3NBCVH.js");
8278
8284
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
8279
8285
  if (formats > 1) {
8280
8286
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -8432,7 +8438,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
8432
8438
  config.get("customProviders"),
8433
8439
  config.getConfigDir()
8434
8440
  );
8435
- const { startHub } = await import("./hub-4EEDUJED.js");
8441
+ const { startHub } = await import("./hub-SIPD6DKN.js");
8436
8442
  await startHub(
8437
8443
  {
8438
8444
  topic: topic ?? "",
@@ -8513,7 +8519,7 @@ async function runHeadless(options) {
8513
8519
  const providerId = options.provider ?? config.getDefaultProvider();
8514
8520
  if (!providers.has(providerId)) {
8515
8521
  process.stderr.write(
8516
- `Error: Provider '${providerId}' is not configured. Run: ai-cli config
8522
+ `Error: Provider '${providerId}' is not configured. Run: aicli config
8517
8523
  `
8518
8524
  );
8519
8525
  process.exit(1);
@@ -8647,7 +8653,7 @@ async function startRepl(options) {
8647
8653
  const wizard = new SetupWizard(config);
8648
8654
  const configured = await wizard.runFirstRun();
8649
8655
  if (!configured) {
8650
- console.log('\nSetup cancelled. Run "ai-cli config" to configure later.');
8656
+ console.log('\nSetup cancelled. Run "aicli config" to configure later.');
8651
8657
  process.exit(0);
8652
8658
  }
8653
8659
  }
@@ -8672,14 +8678,14 @@ async function startRepl(options) {
8672
8678
  );
8673
8679
  if (providers.listAvailable().length === 0) {
8674
8680
  console.error(
8675
- "\nNo providers configured. Run: ai-cli config\n"
8681
+ "\nNo providers configured. Run: aicli config\n"
8676
8682
  );
8677
8683
  process.exit(1);
8678
8684
  }
8679
8685
  if (options.provider && !providers.has(options.provider)) {
8680
8686
  console.error(
8681
8687
  `
8682
- Provider '${options.provider}' is not configured. Run: ai-cli config
8688
+ Provider '${options.provider}' is not configured. Run: aicli config
8683
8689
  `
8684
8690
  );
8685
8691
  process.exit(1);
@@ -28,9 +28,9 @@ import {
28
28
  touchMemoryReferences,
29
29
  updateMemoryApproval,
30
30
  updateMemoryEntry
31
- } from "./chunk-X2V76VPG.js";
31
+ } from "./chunk-3F5FAUCI.js";
32
32
  import "./chunk-HOSJZMQS.js";
33
- import "./chunk-SVWIUNOA.js";
33
+ import "./chunk-IXGGIS3K.js";
34
34
  import "./chunk-B5TYJO7V.js";
35
35
  import "./chunk-IW3Q7AE5.js";
36
36
  export {
@@ -27,9 +27,9 @@ import {
27
27
  touchMemoryReferences,
28
28
  updateMemoryApproval,
29
29
  updateMemoryEntry
30
- } from "./chunk-YJ7VL7VL.js";
30
+ } from "./chunk-AL3H7VI2.js";
31
31
  import "./chunk-YVTASHS5.js";
32
- import "./chunk-CU5ZNAIX.js";
32
+ import "./chunk-KTN7YDXC.js";
33
33
  import "./chunk-6BUTA5VW.js";
34
34
  export {
35
35
  addMemoryEntry,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-7QWFFLKV.js";
6
- import "./chunk-SMIQ6CBX.js";
5
+ } from "./chunk-X45KVQHD.js";
6
+ import "./chunk-FIXDD5WC.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-ZRBGH245.js";
14
+ } from "./chunk-2CGCEN7Q.js";
15
15
  import {
16
16
  ConfigManager
17
- } from "./chunk-IRSNREEO.js";
18
- import "./chunk-PSXIVQ3N.js";
19
- import "./chunk-5ULLIOVC.js";
17
+ } from "./chunk-3C6TKCRL.js";
18
+ import "./chunk-LEZB4KKZ.js";
19
+ import "./chunk-TU3L3PW7.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-SVWIUNOA.js";
22
+ } from "./chunk-IXGGIS3K.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-B42HK6GL.js";
5
- import "./chunk-CU5ZNAIX.js";
4
+ } from "./chunk-DQW3TJ4M.js";
5
+ import "./chunk-KTN7YDXC.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-U6OV523Y.js";
6
- import "./chunk-SVWIUNOA.js";
5
+ } from "./chunk-TN62NEIY.js";
6
+ import "./chunk-IXGGIS3K.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool
@@ -1,26 +1,26 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-PSP4W2MG.js";
5
- import "./chunk-X2V76VPG.js";
4
+ } from "./chunk-VEBTQK3D.js";
5
+ import "./chunk-3F5FAUCI.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-FOC2YWOF.js";
12
+ } from "./chunk-P5HO5RXI.js";
13
13
  import {
14
14
  getDangerLevel,
15
15
  schemaToJsonSchema
16
- } from "./chunk-PSXIVQ3N.js";
17
- import "./chunk-5ULLIOVC.js";
16
+ } from "./chunk-LEZB4KKZ.js";
17
+ import "./chunk-TU3L3PW7.js";
18
18
  import "./chunk-HOSJZMQS.js";
19
19
  import "./chunk-4BKXL7SM.js";
20
- import "./chunk-U6OV523Y.js";
20
+ import "./chunk-TN62NEIY.js";
21
21
  import {
22
22
  VERSION
23
- } from "./chunk-SVWIUNOA.js";
23
+ } from "./chunk-IXGGIS3K.js";
24
24
  import "./chunk-6RPGQ5CG.js";
25
25
  import "./chunk-KHYD3WXE.js";
26
26
  import "./chunk-NYNSYLFY.js";