jinzd-ai-cli 0.4.155 → 0.4.157

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 (31) hide show
  1. package/dist/{batch-LS3IJVBK.js → batch-ATL6V3UE.js} +2 -2
  2. package/dist/{chat-index-IF4EINLQ.js → chat-index-2I7ZHRE5.js} +2 -2
  3. package/dist/{chunk-E5ICQT3P.js → chunk-3HJW556L.js} +4 -4
  4. package/dist/{chunk-JOJRBV2K.js → chunk-62CD2T5F.js} +1 -1
  5. package/dist/{chunk-D6GJTJQH.js → chunk-77DDRYFM.js} +1 -1
  6. package/dist/{chunk-CIZQZ7CC.js → chunk-A4JROOGF.js} +2 -2
  7. package/dist/{chunk-NFRTSL3N.js → chunk-GRFQ2QD5.js} +1 -1
  8. package/dist/{chunk-JXSWY54M.js → chunk-LLQMVGNP.js} +1 -1
  9. package/dist/{chunk-B3LFGPU2.js → chunk-N3VGZTEJ.js} +1 -1
  10. package/dist/chunk-NZ4X6GUC.js +230 -0
  11. package/dist/{chunk-O6MLS5QO.js → chunk-OJL3PY36.js} +0 -226
  12. package/dist/{hub-ZILVZWI2.js → chunk-Q3ZUDA6S.js} +6 -249
  13. package/dist/{persist-3EBOLHFZ.js → chunk-RUJQ5OUB.js} +1 -2
  14. package/dist/{chunk-IBBYW6PM.js → chunk-V5OQOKU3.js} +1 -1
  15. package/dist/{ci-34ZQH43L.js → ci-E7MDZSB6.js} +3 -3
  16. package/dist/{constants-DQ5VJOGS.js → constants-NL5ETRA5.js} +1 -1
  17. package/dist/{doctor-cli-TSCI4ORL.js → doctor-cli-XJNT745O.js} +6 -6
  18. package/dist/electron-server.js +758 -44
  19. package/dist/hub-RXZ5IDBY.js +260 -0
  20. package/dist/{hub-server-OH7AYQIW.js → hub-server-GSTG5MNE.js} +4 -2
  21. package/dist/index.js +40 -40
  22. package/dist/persist-UI6WRBGB.js +12 -0
  23. package/dist/{run-tests-5KWCHBQS.js → run-tests-I3EBH7O6.js} +2 -2
  24. package/dist/{run-tests-5CJRMOMI.js → run-tests-O46AI32W.js} +1 -1
  25. package/dist/{server-35OQV62B.js → server-4PJJHZWM.js} +142 -32
  26. package/dist/{server-DVIP7NLW.js → server-SVBHOHTC.js} +6 -6
  27. package/dist/{task-orchestrator-AXSS7ROD.js → task-orchestrator-NMX3CYW2.js} +6 -6
  28. package/dist/web/client/app.js +173 -0
  29. package/dist/web/client/index.html +31 -0
  30. package/package.json +1 -1
  31. package/dist/{chunk-U5MY24UZ.js → chunk-MM3F43H6.js} +3 -3
@@ -0,0 +1,260 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ assignRoleColors,
4
+ renderHubBanner,
5
+ renderHubEvent
6
+ } from "./chunk-OJL3PY36.js";
7
+ import {
8
+ DiscussionOrchestrator,
9
+ getPreset,
10
+ listPresets,
11
+ resolveRoleProviders
12
+ } from "./chunk-Q3ZUDA6S.js";
13
+ import "./chunk-NZ4X6GUC.js";
14
+ import "./chunk-PDX44BCA.js";
15
+
16
+ // src/hub/index.ts
17
+ import { readFileSync, existsSync } from "fs";
18
+ import chalk from "chalk";
19
+ async function startHub(options, configManager, providers) {
20
+ if (options.listPresets) {
21
+ console.log("\n Available discussion presets:\n");
22
+ for (const p of listPresets()) {
23
+ console.log(` ${p.id.padEnd(16)} ${p.name}`);
24
+ console.log(` ${"".padEnd(16)} ${p.description}`);
25
+ for (const r of p.roles) {
26
+ console.log(` ${"".padEnd(18)} \u2022 ${r.name} (${r.id})`);
27
+ }
28
+ console.log();
29
+ }
30
+ return;
31
+ }
32
+ let roles;
33
+ let presetUsed;
34
+ if (options.rolesFile) {
35
+ if (!existsSync(options.rolesFile)) {
36
+ console.error(` \u2717 Roles file not found: ${options.rolesFile}`);
37
+ process.exit(1);
38
+ }
39
+ try {
40
+ const raw = readFileSync(options.rolesFile, "utf-8");
41
+ const parsed = JSON.parse(raw);
42
+ const rawRoles = Array.isArray(parsed) ? parsed : parsed.roles;
43
+ if (!Array.isArray(rawRoles) || rawRoles.length === 0) {
44
+ throw new Error("roles must be a non-empty array");
45
+ }
46
+ roles = rawRoles.map((r) => ({
47
+ id: r.id ?? r.name?.toLowerCase().replace(/\s+/g, "-") ?? "agent",
48
+ name: r.name ?? r.id ?? "Agent",
49
+ persona: r.persona ?? r.description ?? `You are ${r.name ?? "an AI assistant"}.`,
50
+ ...r.provider && { provider: r.provider },
51
+ ...r.model && { model: r.model },
52
+ ...r.color && { color: r.color }
53
+ }));
54
+ } catch (err) {
55
+ console.error(` \u2717 Invalid roles file: ${err.message}`);
56
+ process.exit(1);
57
+ }
58
+ } else {
59
+ const presetId = options.preset ?? "tech-review";
60
+ presetUsed = getPreset(presetId);
61
+ if (!presetUsed) {
62
+ console.error(` \u2717 Preset "${presetId}" not found. Use --presets to list available presets.`);
63
+ process.exit(1);
64
+ }
65
+ roles = presetUsed.roles;
66
+ }
67
+ const defaultProvider = options.provider ?? configManager.get("defaultProvider");
68
+ const allDefaultModels = configManager.get("defaultModels");
69
+ let defaultModel = options.model ?? allDefaultModels[defaultProvider] ?? "";
70
+ if (!defaultModel) {
71
+ try {
72
+ const p = providers.get(defaultProvider);
73
+ defaultModel = p.info.defaultModel;
74
+ } catch {
75
+ console.error(` \u2717 Provider "${defaultProvider}" not configured. Run \`aicli config\` first.`);
76
+ process.exit(1);
77
+ }
78
+ }
79
+ if (!providers.has(defaultProvider)) {
80
+ console.error(` \u2717 Provider "${defaultProvider}" not available. Check API key configuration.`);
81
+ process.exit(1);
82
+ }
83
+ if (!options.topic?.trim()) {
84
+ console.error(" \u2717 Please provide a discussion topic.");
85
+ console.error(' Usage: aicli hub "your topic here"');
86
+ console.error(' aicli hub --preset brainstorm "your topic here"');
87
+ process.exit(1);
88
+ }
89
+ let context;
90
+ const contextFileNames = [];
91
+ if (options.contextFiles && options.contextFiles.length > 0) {
92
+ const parts = [];
93
+ for (const filePath of options.contextFiles) {
94
+ if (!existsSync(filePath)) {
95
+ console.error(` \u2717 Context file not found: ${filePath}`);
96
+ process.exit(1);
97
+ }
98
+ const content = readFileSync(filePath, "utf-8");
99
+ const fileName = filePath.replace(/\\/g, "/").split("/").pop() ?? filePath;
100
+ contextFileNames.push(fileName);
101
+ parts.push(`### ${fileName}
102
+
103
+ ${content}`);
104
+ }
105
+ context = parts.join("\n\n---\n\n");
106
+ }
107
+ {
108
+ const resolution = resolveRoleProviders(
109
+ roles,
110
+ {
111
+ has: (id) => providers.has(id),
112
+ defaultModelFor: (id) => providers.has(id) ? providers.get(id).info.defaultModel : void 0
113
+ },
114
+ defaultProvider,
115
+ defaultModel,
116
+ providers.listAvailable().map((p) => p.info.id),
117
+ options.mix
118
+ );
119
+ roles = resolution.roles;
120
+ for (const w of resolution.warnings) console.error(chalk.yellow(` \u26A0 ${w}`));
121
+ }
122
+ const mode = options.mode ?? "discuss";
123
+ const config = {
124
+ mode,
125
+ roles,
126
+ defaultProvider,
127
+ defaultModel,
128
+ maxRounds: options.maxRounds ?? (mode === "task" ? 15 : 10),
129
+ enableTools: mode === "task",
130
+ maxToolRoundsPerTurn: mode === "task" ? options.taskRounds ?? 30 : void 0,
131
+ context,
132
+ contextFiles: contextFileNames.length > 0 ? contextFileNames : void 0,
133
+ humanSteer: options.steer === true,
134
+ voteConverge: options.vote === true
135
+ };
136
+ if (mode === "discuss") {
137
+ if (options.distributed) {
138
+ await runDistributedDiscussion(config, providers, options.topic, options.port ?? 9527);
139
+ } else {
140
+ const state = await runDiscussion(config, providers, options.topic);
141
+ if (options.save !== false && state.messages.length > 0) {
142
+ try {
143
+ const { persistDiscussion } = await import("./persist-UI6WRBGB.js");
144
+ const { path } = await persistDiscussion(state, configManager, defaultProvider, defaultModel);
145
+ console.log(chalk.dim(`
146
+ \u{1F4BE} Saved to history \u2014 open it in the Web UI and hit \u{1F3AC} to replay.
147
+ ${path}`));
148
+ } catch (err) {
149
+ console.error(chalk.yellow(` \u26A0 Could not save discussion: ${err.message}`));
150
+ }
151
+ }
152
+ }
153
+ } else if (mode === "task") {
154
+ await runTaskMode(config, providers, configManager, options.topic);
155
+ }
156
+ }
157
+ async function runTaskMode(config, providers, configManager, topic) {
158
+ const { TaskOrchestrator } = await import("./task-orchestrator-NMX3CYW2.js");
159
+ const orchestrator = new TaskOrchestrator(config, providers, configManager);
160
+ let interrupted = false;
161
+ const onSigint = () => {
162
+ if (interrupted) {
163
+ console.log("\n Force exit.");
164
+ process.exit(0);
165
+ }
166
+ interrupted = true;
167
+ orchestrator.abort();
168
+ };
169
+ process.on("SIGINT", onSigint);
170
+ console.log();
171
+ console.log(chalk.bold.white(" \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"));
172
+ console.log(chalk.bold.white(" \u2551") + chalk.bold.yellow(" \u{1F680} AI-CLI Multi-Agent Hub \u2014 Task Mode ") + chalk.bold.white("\u2551"));
173
+ console.log(chalk.bold.white(" \u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563"));
174
+ console.log(chalk.bold.white(" \u2551") + chalk.dim(` Goal: ${topic.slice(0, 52)}`.padEnd(62)) + chalk.bold.white("\u2551"));
175
+ console.log(chalk.bold.white(" \u2551") + chalk.dim(` Team: ${config.roles.map((r) => r.name).join(", ")}`.slice(0, 62).padEnd(62)) + chalk.bold.white("\u2551"));
176
+ if (config.contextFiles && config.contextFiles.length > 0) {
177
+ console.log(chalk.bold.white(" \u2551") + chalk.dim(` Context: ${config.contextFiles.join(", ")}`.padEnd(62)) + chalk.bold.white("\u2551"));
178
+ }
179
+ console.log(chalk.bold.white(" \u2551") + chalk.dim(` Rounds/task: up to ${config.maxToolRoundsPerTurn ?? 15}`.padEnd(62)) + chalk.bold.white("\u2551"));
180
+ console.log(chalk.bold.white(" \u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563"));
181
+ console.log(chalk.bold.white(" \u2551") + chalk.dim(" Plan \u2192 Approve \u2192 Execute \u2192 Review".padEnd(62)) + chalk.bold.white("\u2551"));
182
+ console.log(chalk.bold.white(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"));
183
+ console.log();
184
+ try {
185
+ await orchestrator.run(topic);
186
+ } catch (err) {
187
+ console.error(chalk.red(`
188
+ \u2717 Task mode error: ${err.message}`));
189
+ } finally {
190
+ process.removeListener("SIGINT", onSigint);
191
+ }
192
+ }
193
+ async function runDistributedDiscussion(config, providers, topic, port) {
194
+ const { HubServer } = await import("./hub-server-GSTG5MNE.js");
195
+ const hub = new HubServer(config, providers, port);
196
+ let interrupted = false;
197
+ const onSigint = () => {
198
+ if (interrupted) {
199
+ console.log("\n Force exit.");
200
+ hub.shutdown();
201
+ process.exit(0);
202
+ }
203
+ interrupted = true;
204
+ hub.abort();
205
+ };
206
+ process.on("SIGINT", onSigint);
207
+ try {
208
+ await hub.start(topic);
209
+ } catch (err) {
210
+ console.error(`
211
+ \u2717 Hub error: ${err.message}`);
212
+ } finally {
213
+ process.removeListener("SIGINT", onSigint);
214
+ }
215
+ }
216
+ async function runDiscussion(config, providers, topic) {
217
+ assignRoleColors(config.roles);
218
+ const orchestrator = new DiscussionOrchestrator(config, providers);
219
+ orchestrator.onEvent = renderHubEvent;
220
+ if (config.humanSteer) {
221
+ const { createInterface } = await import("readline");
222
+ orchestrator.onRoundReview = async ({ round, maxRounds }) => {
223
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
224
+ const answer = await new Promise((resolve) => {
225
+ rl.question(
226
+ chalk.cyan(`
227
+ \u{1F9ED} Round ${round}/${maxRounds} done. Steer next round? `) + chalk.dim("[Enter=continue \xB7 type guidance \xB7 /stop=end] "),
228
+ resolve
229
+ );
230
+ });
231
+ rl.close();
232
+ const t = answer.trim();
233
+ if (t === "/stop" || t.toLowerCase() === "stop") return { action: "stop" };
234
+ return { action: "continue", message: t || void 0 };
235
+ };
236
+ }
237
+ let interrupted = false;
238
+ const onSigint = () => {
239
+ if (interrupted) {
240
+ console.log("\n Force exit.");
241
+ process.exit(0);
242
+ }
243
+ interrupted = true;
244
+ orchestrator.abort();
245
+ };
246
+ process.on("SIGINT", onSigint);
247
+ renderHubBanner(topic, config.roles, config.maxRounds ?? 10, config.contextFiles);
248
+ try {
249
+ return await orchestrator.run(topic);
250
+ } catch (err) {
251
+ console.error(`
252
+ \u2717 Hub error: ${err.message}`);
253
+ return orchestrator.getState();
254
+ } finally {
255
+ process.removeListener("SIGINT", onSigint);
256
+ }
257
+ }
258
+ export {
259
+ startHub
260
+ };
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- HubAgent,
4
3
  assignRoleColors,
5
4
  clearSpeakingLine,
6
5
  renderAgentMessage,
@@ -11,7 +10,10 @@ import {
11
10
  renderRoundHeader,
12
11
  renderSummary,
13
12
  renderUserInterrupt
14
- } from "./chunk-O6MLS5QO.js";
13
+ } from "./chunk-OJL3PY36.js";
14
+ import {
15
+ HubAgent
16
+ } from "./chunk-NZ4X6GUC.js";
15
17
  import "./chunk-PDX44BCA.js";
16
18
 
17
19
  // src/hub/hub-server.ts
package/dist/index.js CHANGED
@@ -18,7 +18,29 @@ import {
18
18
  saveDevState,
19
19
  sessionHasMeaningfulContent,
20
20
  setupProxy
21
- } from "./chunk-CIZQZ7CC.js";
21
+ } from "./chunk-A4JROOGF.js";
22
+ import {
23
+ ToolExecutor,
24
+ ToolRegistry,
25
+ askUserContext,
26
+ estimateTokens,
27
+ googleSearchContext,
28
+ initTheme,
29
+ isInterrupted,
30
+ lastResponseStore,
31
+ renderDiff,
32
+ requestInterrupt,
33
+ resetInterrupt,
34
+ rlInternal,
35
+ setContextWindow,
36
+ setMaxOutputCap,
37
+ spawnAgentContext,
38
+ theme,
39
+ undoStack
40
+ } from "./chunk-3HJW556L.js";
41
+ import "./chunk-HDSKW7Q3.js";
42
+ import "./chunk-ZWVIDFGY.js";
43
+ import "./chunk-62CD2T5F.js";
22
44
  import {
23
45
  SessionManager,
24
46
  getContentText
@@ -27,7 +49,7 @@ import {
27
49
  getConfigDirUsage,
28
50
  listRecentCrashes,
29
51
  writeCrashLog
30
- } from "./chunk-D6GJTJQH.js";
52
+ } from "./chunk-77DDRYFM.js";
31
53
  import {
32
54
  CONTENT_ONLY_STREAM_REMINDER,
33
55
  HALLUCINATION_CORRECTION_MESSAGE,
@@ -46,38 +68,16 @@ import {
46
68
  stripPseudoToolCalls,
47
69
  stripToolCallReminder
48
70
  } from "./chunk-AIZOARZY.js";
49
- import {
50
- ConfigManager
51
- } from "./chunk-IBBYW6PM.js";
52
- import {
53
- ToolExecutor,
54
- ToolRegistry,
55
- askUserContext,
56
- estimateTokens,
57
- googleSearchContext,
58
- initTheme,
59
- isInterrupted,
60
- lastResponseStore,
61
- renderDiff,
62
- requestInterrupt,
63
- resetInterrupt,
64
- rlInternal,
65
- setContextWindow,
66
- setMaxOutputCap,
67
- spawnAgentContext,
68
- theme,
69
- undoStack
70
- } from "./chunk-E5ICQT3P.js";
71
- import "./chunk-HDSKW7Q3.js";
72
- import "./chunk-ZWVIDFGY.js";
73
- import "./chunk-JOJRBV2K.js";
74
71
  import {
75
72
  getStatsSnapshot,
76
73
  getTopFailingTools,
77
74
  getTopUsedTools,
78
75
  installFlushOnExit
79
- } from "./chunk-NFRTSL3N.js";
76
+ } from "./chunk-GRFQ2QD5.js";
80
77
  import "./chunk-NXXNLLSG.js";
78
+ import {
79
+ ConfigManager
80
+ } from "./chunk-V5OQOKU3.js";
81
81
  import {
82
82
  AuthError,
83
83
  ProviderError,
@@ -104,7 +104,7 @@ import {
104
104
  SKILLS_DIR_NAME,
105
105
  VERSION,
106
106
  buildUserIdentityPrompt
107
- } from "./chunk-B3LFGPU2.js";
107
+ } from "./chunk-N3VGZTEJ.js";
108
108
  import {
109
109
  formatGitContextForPrompt,
110
110
  getGitContext,
@@ -118,12 +118,12 @@ import {
118
118
  clearChatIndex,
119
119
  getChatIndexStatus,
120
120
  searchChatMemory
121
- } from "./chunk-U5MY24UZ.js";
121
+ } from "./chunk-MM3F43H6.js";
122
+ import "./chunk-KHYD3WXE.js";
122
123
  import {
123
124
  DEFAULT_PATTERNS,
124
125
  scanString
125
126
  } from "./chunk-SLSWPBK3.js";
126
- import "./chunk-KHYD3WXE.js";
127
127
  import "./chunk-VNNYHW6N.js";
128
128
  import "./chunk-OVWE4E46.js";
129
129
  import "./chunk-PDX44BCA.js";
@@ -1773,7 +1773,7 @@ No tools match "${filter}".
1773
1773
  const { join: join6 } = await import("path");
1774
1774
  const { existsSync: existsSync6 } = await import("fs");
1775
1775
  const { getGitRoot: getGitRoot2 } = await import("./git-context-7KIP4X2V.js");
1776
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-DQ5VJOGS.js");
1776
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-NL5ETRA5.js");
1777
1777
  const { approveProject, hashMcpFile } = await import("./project-trust-IFM7FXEV.js");
1778
1778
  const cwd = process.cwd();
1779
1779
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -2834,7 +2834,7 @@ ${hint}` : "")
2834
2834
  usage: "/test [command|filter]",
2835
2835
  async execute(args, ctx) {
2836
2836
  try {
2837
- const { executeTests } = await import("./run-tests-5KWCHBQS.js");
2837
+ const { executeTests } = await import("./run-tests-I3EBH7O6.js");
2838
2838
  const argStr = args.join(" ").trim();
2839
2839
  let testArgs = {};
2840
2840
  if (argStr) {
@@ -5564,7 +5564,7 @@ Session '${this.resumeSessionId}' not found.
5564
5564
  })();
5565
5565
  void (async () => {
5566
5566
  try {
5567
- const { getChatIndexStatus: getChatIndexStatus2, buildChatIndex: buildChatIndex2 } = await import("./chat-index-IF4EINLQ.js");
5567
+ const { getChatIndexStatus: getChatIndexStatus2, buildChatIndex: buildChatIndex2 } = await import("./chat-index-2I7ZHRE5.js");
5568
5568
  const initial = getChatIndexStatus2();
5569
5569
  this.chatMemoryStatus = {
5570
5570
  exists: initial.exists,
@@ -7534,7 +7534,7 @@ program.command("web").description("Start Web UI server with browser-based chat
7534
7534
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
7535
7535
  process.exit(1);
7536
7536
  }
7537
- const { startWebServer } = await import("./server-35OQV62B.js");
7537
+ const { startWebServer } = await import("./server-4PJJHZWM.js");
7538
7538
  await startWebServer({ port, host: options.host });
7539
7539
  });
7540
7540
  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) => {
@@ -7701,12 +7701,12 @@ program.command("sessions").description("List recent conversation sessions").opt
7701
7701
  console.log(footer + "\n");
7702
7702
  });
7703
7703
  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) => {
7704
- const { runDoctorCli } = await import("./doctor-cli-TSCI4ORL.js");
7704
+ const { runDoctorCli } = await import("./doctor-cli-XJNT745O.js");
7705
7705
  await runDoctorCli({ json: !!options.json, resetStats: !!options.resetStats });
7706
7706
  });
7707
7707
  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) => {
7708
7708
  try {
7709
- const batch = await import("./batch-LS3IJVBK.js");
7709
+ const batch = await import("./batch-ATL6V3UE.js");
7710
7710
  switch (action) {
7711
7711
  case "submit":
7712
7712
  if (!arg) {
@@ -7749,7 +7749,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
7749
7749
  }
7750
7750
  });
7751
7751
  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) => {
7752
- const { startMcpServer } = await import("./server-DVIP7NLW.js");
7752
+ const { startMcpServer } = await import("./server-SVBHOHTC.js");
7753
7753
  await startMcpServer({
7754
7754
  allowDestructive: !!options.allowDestructive,
7755
7755
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -7758,7 +7758,7 @@ program.command("mcp-serve").description("Start an MCP server over STDIO, exposi
7758
7758
  });
7759
7759
  });
7760
7760
  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) => {
7761
- const { runCi } = await import("./ci-34ZQH43L.js");
7761
+ const { runCi } = await import("./ci-E7MDZSB6.js");
7762
7762
  const result = await runCi({
7763
7763
  pr: options.pr,
7764
7764
  base: options.base,
@@ -7903,7 +7903,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
7903
7903
  }),
7904
7904
  config.get("customProviders")
7905
7905
  );
7906
- const { startHub } = await import("./hub-ZILVZWI2.js");
7906
+ const { startHub } = await import("./hub-RXZ5IDBY.js");
7907
7907
  await startHub(
7908
7908
  {
7909
7909
  topic: topic ?? "",
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ discussionToMessages,
4
+ persistDiscussion
5
+ } from "./chunk-RUJQ5OUB.js";
6
+ import "./chunk-TOTEUETI.js";
7
+ import "./chunk-SLSWPBK3.js";
8
+ import "./chunk-PDX44BCA.js";
9
+ export {
10
+ discussionToMessages,
11
+ persistDiscussion
12
+ };
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-JOJRBV2K.js";
6
- import "./chunk-B3LFGPU2.js";
5
+ } from "./chunk-62CD2T5F.js";
6
+ import "./chunk-N3VGZTEJ.js";
7
7
  import "./chunk-PDX44BCA.js";
8
8
  export {
9
9
  executeTests,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-JXSWY54M.js";
4
+ } from "./chunk-LLQMVGNP.js";
5
5
  import "./chunk-3RG5ZIWI.js";
6
6
  export {
7
7
  executeTests,