jinzd-ai-cli 0.4.151 → 0.4.153

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 (32) hide show
  1. package/dist/{batch-IPWV3DNK.js → batch-DBRN4MCC.js} +2 -2
  2. package/dist/{chunk-ZQX2NCQK.js → chunk-D62BVFP7.js} +1 -1
  3. package/dist/{chunk-MPMEYE43.js → chunk-EIIMBVXN.js} +2 -2
  4. package/dist/{chunk-YCF6S3P3.js → chunk-EYJQJZJ6.js} +1 -1
  5. package/dist/{chunk-WCBVNY6D.js → chunk-LJPB4ZER.js} +1 -1
  6. package/dist/{chunk-YJ2CUK5O.js → chunk-M4GJOBWN.js} +2 -1
  7. package/dist/{chunk-WXVG56NI.js → chunk-OP3I24WL.js} +3 -3
  8. package/dist/{chunk-K76YV4EL.js → chunk-OT2HLGSO.js} +1 -1
  9. package/dist/{chunk-75YT3SZI.js → chunk-TURORFH2.js} +1 -1
  10. package/dist/{chunk-MEM43AE7.js → chunk-UWW3EWER.js} +1 -1
  11. package/dist/{ci-YDMKYUQC.js → ci-UEEUSELV.js} +2 -2
  12. package/dist/{constants-GRKJCSZF.js → constants-43EVHE2E.js} +1 -1
  13. package/dist/{doctor-cli-R6ODVYFR.js → doctor-cli-ZT674MCQ.js} +4 -4
  14. package/dist/electron-server.js +9 -5
  15. package/dist/{hub-3MKH3BMA.js → hub-MDQNJOMV.js} +61 -3
  16. package/dist/{hub-server-AUMVPNU6.js → hub-server-VPXCBWLA.js} +1 -1
  17. package/dist/index.js +19 -17
  18. package/dist/{run-tests-XWEHN7DF.js → run-tests-DCT5LWBB.js} +1 -1
  19. package/dist/{run-tests-HYELAYSL.js → run-tests-EYZ2JZ4X.js} +2 -2
  20. package/dist/{server-P7WY7VEX.js → server-MQWFO2GJ.js} +4 -4
  21. package/dist/{server-32HM2KMX.js → server-OIYBFKS2.js} +14 -10
  22. package/dist/{task-orchestrator-EVJVR3HL.js → task-orchestrator-BGQBNKAI.js} +4 -4
  23. package/dist/web/client/app.js +2 -1
  24. package/dist/web/client/index.html +10 -6
  25. package/dist/web/client/sw.js +15 -26
  26. package/dist/web/client/vendor/daisyui-full.min.css +20 -0
  27. package/dist/web/client/vendor/github-dark.min.css +10 -0
  28. package/dist/web/client/vendor/github.min.css +10 -0
  29. package/dist/web/client/vendor/highlight.min.js +1213 -0
  30. package/dist/web/client/vendor/marked.min.js +69 -0
  31. package/dist/web/client/vendor/tailwind.js +83 -0
  32. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigManager
4
- } from "./chunk-MEM43AE7.js";
4
+ } from "./chunk-UWW3EWER.js";
5
5
  import "./chunk-2ZD3YTVM.js";
6
- import "./chunk-ZQX2NCQK.js";
6
+ import "./chunk-D62BVFP7.js";
7
7
  import "./chunk-PDX44BCA.js";
8
8
 
9
9
  // src/cli/batch.ts
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.151";
4
+ var VERSION = "0.4.153";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  truncateForPersist
4
- } from "./chunk-WXVG56NI.js";
4
+ } from "./chunk-OP3I24WL.js";
5
5
  import {
6
6
  APP_NAME,
7
7
  CONFIG_DIR_NAME,
@@ -11,7 +11,7 @@ import {
11
11
  MCP_PROTOCOL_VERSION,
12
12
  MCP_TOOL_PREFIX,
13
13
  VERSION
14
- } from "./chunk-ZQX2NCQK.js";
14
+ } from "./chunk-D62BVFP7.js";
15
15
  import {
16
16
  redactJson
17
17
  } from "./chunk-RXM76HB7.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CONFIG_DIR_NAME
4
- } from "./chunk-ZQX2NCQK.js";
4
+ } from "./chunk-D62BVFP7.js";
5
5
 
6
6
  // src/diagnostics/tool-stats.ts
7
7
  import { existsSync, readFileSync, writeFileSync, mkdirSync, renameSync } from "fs";
@@ -6,7 +6,7 @@ import { platform } from "os";
6
6
  import chalk from "chalk";
7
7
 
8
8
  // src/core/constants.ts
9
- var VERSION = "0.4.151";
9
+ var VERSION = "0.4.153";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
@@ -232,7 +232,8 @@ function renderHubBanner(topic, roles, maxRounds, contextFiles) {
232
232
  console.log(chalk.bold.white(" \u2551") + chalk.dim(" Participants:".padEnd(62)) + chalk.bold.white("\u2551"));
233
233
  for (const role of roles) {
234
234
  const color = colorMap.get(role.id) ?? chalk.white;
235
- const line = ` ${color("\u25CF")} ${color.bold(role.name)} ${chalk.dim(`(${role.id})`)}`;
235
+ const backend = role.provider ? chalk.dim(` \xB7 ${role.provider}${role.model ? `:${role.model}` : ""}`) : "";
236
+ const line = ` ${color("\u25CF")} ${color.bold(role.name)} ${chalk.dim(`(${role.id})`)}${backend}`;
236
237
  console.log(chalk.bold.white(" \u2551") + line + " ".repeat(Math.max(0, 62 - stripAnsi(line).length)) + chalk.bold.white("\u2551"));
237
238
  }
238
239
  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"));
@@ -5,10 +5,10 @@ import {
5
5
  } from "./chunk-HDSKW7Q3.js";
6
6
  import {
7
7
  runTestsTool
8
- } from "./chunk-K76YV4EL.js";
8
+ } from "./chunk-OT2HLGSO.js";
9
9
  import {
10
10
  runTool
11
- } from "./chunk-YCF6S3P3.js";
11
+ } from "./chunk-EYJQJZJ6.js";
12
12
  import {
13
13
  getDangerLevel,
14
14
  isFileWriteTool
@@ -25,7 +25,7 @@ import {
25
25
  SUBAGENT_ALLOWED_TOOLS,
26
26
  SUBAGENT_DEFAULT_MAX_ROUNDS,
27
27
  SUBAGENT_MAX_ROUNDS_LIMIT
28
- } from "./chunk-ZQX2NCQK.js";
28
+ } from "./chunk-D62BVFP7.js";
29
29
  import {
30
30
  fileCheckpoints
31
31
  } from "./chunk-4BKXL7SM.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-ZQX2NCQK.js";
4
+ } from "./chunk-D62BVFP7.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONFIG_DIR_NAME,
4
4
  VERSION
5
- } from "./chunk-ZQX2NCQK.js";
5
+ } from "./chunk-D62BVFP7.js";
6
6
 
7
7
  // src/diagnostics/crash-log.ts
8
8
  import {
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-ZQX2NCQK.js";
11
+ } from "./chunk-D62BVFP7.js";
12
12
 
13
13
  // src/config/config-manager.ts
14
14
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
@@ -9,12 +9,12 @@ import {
9
9
  } from "./chunk-AIZOARZY.js";
10
10
  import {
11
11
  ConfigManager
12
- } from "./chunk-MEM43AE7.js";
12
+ } from "./chunk-UWW3EWER.js";
13
13
  import "./chunk-NXXNLLSG.js";
14
14
  import "./chunk-2ZD3YTVM.js";
15
15
  import {
16
16
  VERSION
17
- } from "./chunk-ZQX2NCQK.js";
17
+ } from "./chunk-D62BVFP7.js";
18
18
  import "./chunk-PDX44BCA.js";
19
19
 
20
20
  // src/cli/ci.ts
@@ -36,7 +36,7 @@ import {
36
36
  TEST_TIMEOUT,
37
37
  VERSION,
38
38
  buildUserIdentityPrompt
39
- } from "./chunk-ZQX2NCQK.js";
39
+ } from "./chunk-D62BVFP7.js";
40
40
  import "./chunk-PDX44BCA.js";
41
41
  export {
42
42
  AGENTIC_BEHAVIOR_GUIDELINE,
@@ -2,26 +2,26 @@
2
2
  import {
3
3
  getConfigDirUsage,
4
4
  listRecentCrashes
5
- } from "./chunk-75YT3SZI.js";
5
+ } from "./chunk-TURORFH2.js";
6
6
  import {
7
7
  ProviderRegistry
8
8
  } from "./chunk-AIZOARZY.js";
9
9
  import {
10
10
  ConfigManager
11
- } from "./chunk-MEM43AE7.js";
11
+ } from "./chunk-UWW3EWER.js";
12
12
  import {
13
13
  getStatsSnapshot,
14
14
  getTopFailingTools,
15
15
  getTopUsedTools,
16
16
  resetStats
17
- } from "./chunk-YCF6S3P3.js";
17
+ } from "./chunk-EYJQJZJ6.js";
18
18
  import "./chunk-NXXNLLSG.js";
19
19
  import "./chunk-2ZD3YTVM.js";
20
20
  import {
21
21
  DEV_STATE_FILE_NAME,
22
22
  MEMORY_FILE_NAME,
23
23
  VERSION
24
- } from "./chunk-ZQX2NCQK.js";
24
+ } from "./chunk-D62BVFP7.js";
25
25
  import "./chunk-PDX44BCA.js";
26
26
 
27
27
  // src/diagnostics/doctor-cli.ts
@@ -36,7 +36,7 @@ import {
36
36
  VERSION,
37
37
  buildUserIdentityPrompt,
38
38
  runTestsTool
39
- } from "./chunk-WCBVNY6D.js";
39
+ } from "./chunk-LJPB4ZER.js";
40
40
  import {
41
41
  hasSemanticIndex,
42
42
  semanticSearch
@@ -12715,7 +12715,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
12715
12715
  case "test": {
12716
12716
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
12717
12717
  try {
12718
- const { executeTests } = await import("./run-tests-XWEHN7DF.js");
12718
+ const { executeTests } = await import("./run-tests-DCT5LWBB.js");
12719
12719
  const argStr = args.join(" ").trim();
12720
12720
  let testArgs = {};
12721
12721
  if (argStr) {
@@ -14028,8 +14028,9 @@ async function startWebServer(options = {}) {
14028
14028
  }
14029
14029
  console.log(` Providers: ${availableProviders.map((p) => p.info.id).join(", ")}`);
14030
14030
  let mcpManager = null;
14031
- const globalMcpServers = config.get("mcpServers") ?? {};
14032
- const projectMcpResolved = resolveProjectMcpPath();
14031
+ const mcpEnabled = config.get("mcpEnabled") !== false;
14032
+ const globalMcpServers = mcpEnabled ? config.get("mcpServers") ?? {} : {};
14033
+ const projectMcpResolved = mcpEnabled ? resolveProjectMcpPath() : null;
14033
14034
  let projectMcpServers = {};
14034
14035
  if (projectMcpResolved) {
14035
14036
  const { checkTrust } = await import("./project-trust-EBGHD7LE.js");
@@ -14042,7 +14043,10 @@ async function startWebServer(options = {}) {
14042
14043
  }
14043
14044
  }
14044
14045
  const mergedMcpServers = { ...globalMcpServers, ...projectMcpServers };
14045
- if (Object.keys(mergedMcpServers).length > 0) {
14046
+ if (!mcpEnabled) {
14047
+ console.log(" \u{1F50C} MCP: disabled (config.mcpEnabled=false)");
14048
+ }
14049
+ if (mcpEnabled && Object.keys(mergedMcpServers).length > 0) {
14046
14050
  mcpManager = new McpManager();
14047
14051
  await mcpManager.connectAll(mergedMcpServers);
14048
14052
  const mcpTools = mcpManager.getAllTools();
@@ -4,7 +4,7 @@ import {
4
4
  assignRoleColors,
5
5
  renderHubBanner,
6
6
  renderHubEvent
7
- } from "./chunk-YJ2CUK5O.js";
7
+ } from "./chunk-M4GJOBWN.js";
8
8
  import "./chunk-PDX44BCA.js";
9
9
 
10
10
  // src/hub/discuss.ts
@@ -272,6 +272,49 @@ function listPresets() {
272
272
  return PRESETS;
273
273
  }
274
274
 
275
+ // src/hub/resolve-providers.ts
276
+ function resolveRoleProviders(roles, lookup, defaultProvider, defaultModel, available, mix) {
277
+ const warnings = [];
278
+ let pool = null;
279
+ if (mix !== void 0 && mix !== false) {
280
+ if (typeof mix === "string" && mix.trim().length > 0) {
281
+ const requested = mix.split(",").map((s) => s.trim()).filter(Boolean);
282
+ pool = [];
283
+ for (const id of requested) {
284
+ if (lookup.has(id)) pool.push(id);
285
+ else warnings.push(`--mix: provider "${id}" not configured \u2014 skipped.`);
286
+ }
287
+ } else {
288
+ pool = [...available];
289
+ }
290
+ if (pool.length === 0) {
291
+ warnings.push(`--mix: no usable providers \u2014 all roles fall back to "${defaultProvider}".`);
292
+ pool = [defaultProvider];
293
+ }
294
+ }
295
+ const providerDefaultModel = (pid) => pid === defaultProvider ? defaultModel : lookup.defaultModelFor(pid) ?? defaultModel;
296
+ const assignments = [];
297
+ const outRoles = roles.map((role, i) => {
298
+ const desired = pool ? pool[i % pool.length] : role.provider;
299
+ let providerId;
300
+ let fellBack = false;
301
+ if (desired && lookup.has(desired)) {
302
+ providerId = desired;
303
+ } else {
304
+ if (desired && !lookup.has(desired)) {
305
+ warnings.push(`role "${role.id}": provider "${desired}" not available \u2014 using "${defaultProvider}".`);
306
+ fellBack = true;
307
+ }
308
+ providerId = defaultProvider;
309
+ }
310
+ const explicitProvider = role.provider ?? defaultProvider;
311
+ const modelId = !pool && role.model && explicitProvider === providerId ? role.model : providerDefaultModel(providerId);
312
+ assignments.push({ roleId: role.id, roleName: role.name, providerId, modelId, fellBack });
313
+ return { ...role, provider: providerId, model: modelId };
314
+ });
315
+ return { roles: outRoles, assignments, warnings };
316
+ }
317
+
275
318
  // src/hub/index.ts
276
319
  import { readFileSync, existsSync } from "fs";
277
320
  import chalk from "chalk";
@@ -363,6 +406,21 @@ ${content}`);
363
406
  }
364
407
  context = parts.join("\n\n---\n\n");
365
408
  }
409
+ {
410
+ const resolution = resolveRoleProviders(
411
+ roles,
412
+ {
413
+ has: (id) => providers.has(id),
414
+ defaultModelFor: (id) => providers.has(id) ? providers.get(id).info.defaultModel : void 0
415
+ },
416
+ defaultProvider,
417
+ defaultModel,
418
+ providers.listAvailable().map((p) => p.info.id),
419
+ options.mix
420
+ );
421
+ roles = resolution.roles;
422
+ for (const w of resolution.warnings) console.error(chalk.yellow(` \u26A0 ${w}`));
423
+ }
366
424
  const mode = options.mode ?? "discuss";
367
425
  const config = {
368
426
  mode,
@@ -386,7 +444,7 @@ ${content}`);
386
444
  }
387
445
  }
388
446
  async function runTaskMode(config, providers, configManager, topic) {
389
- const { TaskOrchestrator } = await import("./task-orchestrator-EVJVR3HL.js");
447
+ const { TaskOrchestrator } = await import("./task-orchestrator-BGQBNKAI.js");
390
448
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
391
449
  let interrupted = false;
392
450
  const onSigint = () => {
@@ -422,7 +480,7 @@ async function runTaskMode(config, providers, configManager, topic) {
422
480
  }
423
481
  }
424
482
  async function runDistributedDiscussion(config, providers, topic, port) {
425
- const { HubServer } = await import("./hub-server-AUMVPNU6.js");
483
+ const { HubServer } = await import("./hub-server-VPXCBWLA.js");
426
484
  const hub = new HubServer(config, providers, port);
427
485
  let interrupted = false;
428
486
  const onSigint = () => {
@@ -11,7 +11,7 @@ import {
11
11
  renderRoundHeader,
12
12
  renderSummary,
13
13
  renderUserInterrupt
14
- } from "./chunk-YJ2CUK5O.js";
14
+ } from "./chunk-M4GJOBWN.js";
15
15
  import "./chunk-PDX44BCA.js";
16
16
 
17
17
  // src/hub/hub-server.ts
package/dist/index.js CHANGED
@@ -20,12 +20,12 @@ import {
20
20
  saveDevState,
21
21
  sessionHasMeaningfulContent,
22
22
  setupProxy
23
- } from "./chunk-MPMEYE43.js";
23
+ } from "./chunk-EIIMBVXN.js";
24
24
  import {
25
25
  getConfigDirUsage,
26
26
  listRecentCrashes,
27
27
  writeCrashLog
28
- } from "./chunk-75YT3SZI.js";
28
+ } from "./chunk-TURORFH2.js";
29
29
  import {
30
30
  CONTENT_ONLY_STREAM_REMINDER,
31
31
  HALLUCINATION_CORRECTION_MESSAGE,
@@ -46,7 +46,7 @@ import {
46
46
  } from "./chunk-AIZOARZY.js";
47
47
  import {
48
48
  ConfigManager
49
- } from "./chunk-MEM43AE7.js";
49
+ } from "./chunk-UWW3EWER.js";
50
50
  import {
51
51
  ToolExecutor,
52
52
  ToolRegistry,
@@ -65,16 +65,16 @@ import {
65
65
  spawnAgentContext,
66
66
  theme,
67
67
  undoStack
68
- } from "./chunk-WXVG56NI.js";
68
+ } from "./chunk-OP3I24WL.js";
69
69
  import "./chunk-HDSKW7Q3.js";
70
70
  import "./chunk-ZWVIDFGY.js";
71
- import "./chunk-K76YV4EL.js";
71
+ import "./chunk-OT2HLGSO.js";
72
72
  import {
73
73
  getStatsSnapshot,
74
74
  getTopFailingTools,
75
75
  getTopUsedTools,
76
76
  installFlushOnExit
77
- } from "./chunk-YCF6S3P3.js";
77
+ } from "./chunk-EYJQJZJ6.js";
78
78
  import "./chunk-NXXNLLSG.js";
79
79
  import {
80
80
  AuthError,
@@ -102,7 +102,7 @@ import {
102
102
  SKILLS_DIR_NAME,
103
103
  VERSION,
104
104
  buildUserIdentityPrompt
105
- } from "./chunk-ZQX2NCQK.js";
105
+ } from "./chunk-D62BVFP7.js";
106
106
  import {
107
107
  formatGitContextForPrompt,
108
108
  getGitContext,
@@ -1769,7 +1769,7 @@ No tools match "${filter}".
1769
1769
  const { join: join6 } = await import("path");
1770
1770
  const { existsSync: existsSync6 } = await import("fs");
1771
1771
  const { getGitRoot: getGitRoot2 } = await import("./git-context-7KIP4X2V.js");
1772
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-GRKJCSZF.js");
1772
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-43EVHE2E.js");
1773
1773
  const { approveProject, hashMcpFile } = await import("./project-trust-IFM7FXEV.js");
1774
1774
  const cwd = process.cwd();
1775
1775
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -2830,7 +2830,7 @@ ${hint}` : "")
2830
2830
  usage: "/test [command|filter]",
2831
2831
  async execute(args, ctx) {
2832
2832
  try {
2833
- const { executeTests } = await import("./run-tests-HYELAYSL.js");
2833
+ const { executeTests } = await import("./run-tests-EYZ2JZ4X.js");
2834
2834
  const argStr = args.join(" ").trim();
2835
2835
  let testArgs = {};
2836
2836
  if (argStr) {
@@ -7530,7 +7530,7 @@ program.command("web").description("Start Web UI server with browser-based chat
7530
7530
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
7531
7531
  process.exit(1);
7532
7532
  }
7533
- const { startWebServer } = await import("./server-32HM2KMX.js");
7533
+ const { startWebServer } = await import("./server-OIYBFKS2.js");
7534
7534
  await startWebServer({ port, host: options.host });
7535
7535
  });
7536
7536
  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) => {
@@ -7697,12 +7697,12 @@ program.command("sessions").description("List recent conversation sessions").opt
7697
7697
  console.log(footer + "\n");
7698
7698
  });
7699
7699
  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) => {
7700
- const { runDoctorCli } = await import("./doctor-cli-R6ODVYFR.js");
7700
+ const { runDoctorCli } = await import("./doctor-cli-ZT674MCQ.js");
7701
7701
  await runDoctorCli({ json: !!options.json, resetStats: !!options.resetStats });
7702
7702
  });
7703
7703
  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) => {
7704
7704
  try {
7705
- const batch = await import("./batch-IPWV3DNK.js");
7705
+ const batch = await import("./batch-DBRN4MCC.js");
7706
7706
  switch (action) {
7707
7707
  case "submit":
7708
7708
  if (!arg) {
@@ -7745,7 +7745,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
7745
7745
  }
7746
7746
  });
7747
7747
  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) => {
7748
- const { startMcpServer } = await import("./server-P7WY7VEX.js");
7748
+ const { startMcpServer } = await import("./server-MQWFO2GJ.js");
7749
7749
  await startMcpServer({
7750
7750
  allowDestructive: !!options.allowDestructive,
7751
7751
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -7754,7 +7754,7 @@ program.command("mcp-serve").description("Start an MCP server over STDIO, exposi
7754
7754
  });
7755
7755
  });
7756
7756
  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) => {
7757
- const { runCi } = await import("./ci-YDMKYUQC.js");
7757
+ const { runCi } = await import("./ci-UEEUSELV.js");
7758
7758
  const result = await runCi({
7759
7759
  pr: options.pr,
7760
7760
  base: options.base,
@@ -7827,6 +7827,7 @@ program.command("help").description("Show a comprehensive guide to all aicli fea
7827
7827
  `${B}${C} \u25A0 MULTI-AGENT HUB${R}`,
7828
7828
  ` ${Y}--preset <name>${R} Role preset (tech-review/brainstorm/code-review/debate)`,
7829
7829
  ` ${Y}--roles <file>${R} Custom roles JSON file`,
7830
+ ` ${Y}--mix [providers]${R} Mixed multi-model: spread providers across roles (e.g. claude,openai,deepseek)`,
7830
7831
  ` ${Y}-c, --context <file>${R} Inject context doc (repeatable: -c a.md -c b.md)`,
7831
7832
  ` ${Y}--task${R} Task mode: agents plan & write code with tools`,
7832
7833
  ` ${Y}--distributed${R} Distributed mode (WebSocket, multi-process)`,
@@ -7872,7 +7873,7 @@ program.command("help").description("Show a comprehensive guide to all aicli fea
7872
7873
  ` ${G}aicli --provider claude -m claude-sonnet-4-20250514${R} ${D}# specific model${R}`,
7873
7874
  ` ${G}aicli -p "explain this" < main.py${R} ${D}# headless + file${R}`,
7874
7875
  ` ${G}aicli web --host 0.0.0.0${R} ${D}# Web UI on LAN${R}`,
7875
- ` ${G}aicli hub --preset brainstorm "idea"${R} ${D}# multi-agent brainstorm${R}`,
7876
+ ` ${G}aicli hub --preset brainstorm --mix "idea"${R} ${D}# brainstorm across Claude/GPT/DeepSeek${R}`,
7876
7877
  ` ${G}aicli hub --task --roles team.json "build app"${R} ${D}# task mode: agents write code${R}`,
7877
7878
  ` ${G}aicli hub -c spec.md -c api.md "build it"${R} ${D}# hub + docs context${R}`,
7878
7879
  ` ${G}aicli batch submit prompts.jsonl${R} ${D}# Anthropic batch: 50% off, 24h window${R}`,
@@ -7884,7 +7885,7 @@ program.command("help").description("Show a comprehensive guide to all aicli fea
7884
7885
  ];
7885
7886
  console.log(lines.join("\n"));
7886
7887
  });
7887
- program.command("hub [topic]").description("Start multi-agent hub (discuss / brainstorm with multiple AI roles)").option("--preset <name>", "Use a built-in role preset (default: tech-review)").option("--roles <file>", "Load roles from a JSON file").option("--provider <name>", "Override default AI provider").option("-m, --model <name>", "Override default model").option("--max-rounds <n>", "Max discussion rounds (default: 10)").option("--presets", "List available role presets").option("--task", "Task mode: plan \u2192 approve \uFFFD\uFFFD execute with tools (agents write code)").option("--task-rounds <n>", "Max tool-call rounds per task (default: 30)").option("-c, --context <file>", "Inject context document (repeatable: -c a.md -c b.md)", (val, prev) => prev.concat(val), []).option("--distributed", "Start WebSocket server so remote aicli instances can join as agents").option("--port <n>", "WebSocket port for distributed mode (default: 9527)", "9527").action(async (topic, options) => {
7888
+ program.command("hub [topic]").description("Start multi-agent hub (discuss / brainstorm with multiple AI roles)").option("--preset <name>", "Use a built-in role preset (default: tech-review)").option("--roles <file>", "Load roles from a JSON file").option("--provider <name>", "Override default AI provider").option("-m, --model <name>", "Override default model").option("--mix [providers]", "Mixed multi-model: spread configured providers across roles (or --mix claude,openai,deepseek)").option("--max-rounds <n>", "Max discussion rounds (default: 10)").option("--presets", "List available role presets").option("--task", "Task mode: plan \u2192 approve \uFFFD\uFFFD execute with tools (agents write code)").option("--task-rounds <n>", "Max tool-call rounds per task (default: 30)").option("-c, --context <file>", "Inject context document (repeatable: -c a.md -c b.md)", (val, prev) => prev.concat(val), []).option("--distributed", "Start WebSocket server so remote aicli instances can join as agents").option("--port <n>", "WebSocket port for distributed mode (default: 9527)", "9527").action(async (topic, options) => {
7888
7889
  const config = new ConfigManager();
7889
7890
  const registry = new ProviderRegistry();
7890
7891
  await registry.initialize(
@@ -7895,7 +7896,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
7895
7896
  }),
7896
7897
  config.get("customProviders")
7897
7898
  );
7898
- const { startHub } = await import("./hub-3MKH3BMA.js");
7899
+ const { startHub } = await import("./hub-MDQNJOMV.js");
7899
7900
  await startHub(
7900
7901
  {
7901
7902
  topic: topic ?? "",
@@ -7903,6 +7904,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
7903
7904
  rolesFile: options.roles,
7904
7905
  provider: options.provider,
7905
7906
  model: options.model,
7907
+ mix: options.mix,
7906
7908
  mode: options.task === true ? "task" : void 0,
7907
7909
  maxRounds: options.maxRounds ? parseInt(options.maxRounds, 10) : void 0,
7908
7910
  listPresets: options.presets === true,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-WCBVNY6D.js";
4
+ } from "./chunk-LJPB4ZER.js";
5
5
  import "./chunk-3RG5ZIWI.js";
6
6
  export {
7
7
  executeTests,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-K76YV4EL.js";
6
- import "./chunk-ZQX2NCQK.js";
5
+ } from "./chunk-OT2HLGSO.js";
6
+ import "./chunk-D62BVFP7.js";
7
7
  import "./chunk-PDX44BCA.js";
8
8
  export {
9
9
  executeTests,
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-WXVG56NI.js";
4
+ } from "./chunk-OP3I24WL.js";
5
5
  import "./chunk-HDSKW7Q3.js";
6
6
  import "./chunk-ZWVIDFGY.js";
7
- import "./chunk-K76YV4EL.js";
7
+ import "./chunk-OT2HLGSO.js";
8
8
  import {
9
9
  runTool
10
- } from "./chunk-YCF6S3P3.js";
10
+ } from "./chunk-EYJQJZJ6.js";
11
11
  import {
12
12
  getDangerLevel,
13
13
  schemaToJsonSchema
@@ -15,7 +15,7 @@ import {
15
15
  import "./chunk-2ZD3YTVM.js";
16
16
  import {
17
17
  VERSION
18
- } from "./chunk-ZQX2NCQK.js";
18
+ } from "./chunk-D62BVFP7.js";
19
19
  import "./chunk-4BKXL7SM.js";
20
20
  import "./chunk-RXM76HB7.js";
21
21
  import "./chunk-KHYD3WXE.js";
@@ -14,7 +14,7 @@ import {
14
14
  loadDevState,
15
15
  persistToolRound,
16
16
  setupProxy
17
- } from "./chunk-MPMEYE43.js";
17
+ } from "./chunk-EIIMBVXN.js";
18
18
  import {
19
19
  CONTENT_ONLY_STREAM_REMINDER,
20
20
  HALLUCINATION_CORRECTION_MESSAGE,
@@ -31,7 +31,7 @@ import {
31
31
  } from "./chunk-AIZOARZY.js";
32
32
  import {
33
33
  ConfigManager
34
- } from "./chunk-MEM43AE7.js";
34
+ } from "./chunk-UWW3EWER.js";
35
35
  import {
36
36
  ToolExecutor,
37
37
  ToolRegistry,
@@ -49,13 +49,13 @@ import {
49
49
  spawnAgentContext,
50
50
  truncateOutput,
51
51
  undoStack
52
- } from "./chunk-WXVG56NI.js";
52
+ } from "./chunk-OP3I24WL.js";
53
53
  import "./chunk-HDSKW7Q3.js";
54
54
  import "./chunk-ZWVIDFGY.js";
55
- import "./chunk-K76YV4EL.js";
55
+ import "./chunk-OT2HLGSO.js";
56
56
  import {
57
57
  runTool
58
- } from "./chunk-YCF6S3P3.js";
58
+ } from "./chunk-EYJQJZJ6.js";
59
59
  import {
60
60
  getDangerLevel
61
61
  } from "./chunk-NXXNLLSG.js";
@@ -78,7 +78,7 @@ import {
78
78
  SKILLS_DIR_NAME,
79
79
  VERSION,
80
80
  buildUserIdentityPrompt
81
- } from "./chunk-ZQX2NCQK.js";
81
+ } from "./chunk-D62BVFP7.js";
82
82
  import {
83
83
  formatGitContextForPrompt,
84
84
  getGitContext,
@@ -2462,7 +2462,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
2462
2462
  case "test": {
2463
2463
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
2464
2464
  try {
2465
- const { executeTests } = await import("./run-tests-HYELAYSL.js");
2465
+ const { executeTests } = await import("./run-tests-EYZ2JZ4X.js");
2466
2466
  const argStr = args.join(" ").trim();
2467
2467
  let testArgs = {};
2468
2468
  if (argStr) {
@@ -3477,8 +3477,9 @@ async function startWebServer(options = {}) {
3477
3477
  }
3478
3478
  console.log(` Providers: ${availableProviders.map((p) => p.info.id).join(", ")}`);
3479
3479
  let mcpManager = null;
3480
- const globalMcpServers = config.get("mcpServers") ?? {};
3481
- const projectMcpResolved = resolveProjectMcpPath();
3480
+ const mcpEnabled = config.get("mcpEnabled") !== false;
3481
+ const globalMcpServers = mcpEnabled ? config.get("mcpServers") ?? {} : {};
3482
+ const projectMcpResolved = mcpEnabled ? resolveProjectMcpPath() : null;
3482
3483
  let projectMcpServers = {};
3483
3484
  if (projectMcpResolved) {
3484
3485
  const { checkTrust } = await import("./project-trust-IFM7FXEV.js");
@@ -3491,7 +3492,10 @@ async function startWebServer(options = {}) {
3491
3492
  }
3492
3493
  }
3493
3494
  const mergedMcpServers = { ...globalMcpServers, ...projectMcpServers };
3494
- if (Object.keys(mergedMcpServers).length > 0) {
3495
+ if (!mcpEnabled) {
3496
+ console.log(" \u{1F50C} MCP: disabled (config.mcpEnabled=false)");
3497
+ }
3498
+ if (mcpEnabled && Object.keys(mergedMcpServers).length > 0) {
3495
3499
  mcpManager = new McpManager();
3496
3500
  await mcpManager.connectAll(mergedMcpServers);
3497
3501
  const mcpTools = mcpManager.getAllTools();
@@ -3,20 +3,20 @@ import {
3
3
  ToolRegistry,
4
4
  googleSearchContext,
5
5
  truncateOutput
6
- } from "./chunk-WXVG56NI.js";
6
+ } from "./chunk-OP3I24WL.js";
7
7
  import "./chunk-HDSKW7Q3.js";
8
8
  import "./chunk-ZWVIDFGY.js";
9
- import "./chunk-K76YV4EL.js";
9
+ import "./chunk-OT2HLGSO.js";
10
10
  import {
11
11
  runTool
12
- } from "./chunk-YCF6S3P3.js";
12
+ } from "./chunk-EYJQJZJ6.js";
13
13
  import {
14
14
  getDangerLevel
15
15
  } from "./chunk-NXXNLLSG.js";
16
16
  import "./chunk-2ZD3YTVM.js";
17
17
  import {
18
18
  SUBAGENT_ALLOWED_TOOLS
19
- } from "./chunk-ZQX2NCQK.js";
19
+ } from "./chunk-D62BVFP7.js";
20
20
  import "./chunk-4BKXL7SM.js";
21
21
  import "./chunk-RXM76HB7.js";
22
22
  import "./chunk-KHYD3WXE.js";
@@ -644,7 +644,8 @@ window.respondAutoPause = function(requestId, action) {
644
644
 
645
645
  // DaisyUI light themes → highlight.js light stylesheet; others → dark
646
646
  const LIGHT_DAISYUI_THEMES = new Set(['light', 'cupcake', 'bumblebee', 'emerald', 'corporate', 'garden', 'lofi', 'pastel', 'fantasy', 'wireframe', 'cmyk', 'autumn', 'acid', 'lemonade', 'winter', 'nord']);
647
- const HLJS_CDN = 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles';
647
+ // v0.4.153: vendored locally (was cdn.jsdelivr.net) — see index.html.
648
+ const HLJS_CDN = 'vendor';
648
649
 
649
650
  function updateCodeTheme(daisyTheme) {
650
651
  const isLight = LIGHT_DAISYUI_THEMES.has(daisyTheme);