reevesagents 1.4.0 → 1.5.0

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.
@@ -987,8 +987,209 @@ function autoCleanupRuns(options = {}) {
987
987
  return { removed, archived };
988
988
  }
989
989
 
990
- // src/core/doctor.ts
990
+ // src/mcp/installer.ts
991
991
  import { execFileSync as execFileSync2 } from "child_process";
992
+ import { realpathSync } from "fs";
993
+ var SERVER_NAME = "reevesagents";
994
+ var SERVER_BIN = "reevesagents";
995
+ var SERVER_ARG = "mcp";
996
+ var MGMT_TIMEOUT_MS = 15e3;
997
+ var STATUS_TIMEOUT_MS = 5e3;
998
+ var VERIFY_TIMEOUT_MS = 2e4;
999
+ function resolveLaunchCmd(entry = process.argv[1]) {
1000
+ if (entry) {
1001
+ try {
1002
+ const real = realpathSync(entry);
1003
+ if (/\.[cm]?js$/.test(real)) return { command: process.execPath, args: [real, SERVER_ARG] };
1004
+ } catch {
1005
+ }
1006
+ }
1007
+ try {
1008
+ const abs = execFileSync2("which", [SERVER_BIN], { encoding: "utf8" }).trim();
1009
+ if (abs) return { command: abs, args: [SERVER_ARG] };
1010
+ } catch {
1011
+ }
1012
+ return { command: SERVER_BIN, args: [SERVER_ARG] };
1013
+ }
1014
+ var HOSTS = [
1015
+ {
1016
+ provider: "cc",
1017
+ // Claude Code defaults a new server to `local` (this directory only); pin
1018
+ // `user` so one attach covers every project on the machine.
1019
+ add: (cmd) => ["mcp", "add", SERVER_NAME, "-s", "user", "--", cmd.command, ...cmd.args],
1020
+ remove: ["mcp", "remove", SERVER_NAME],
1021
+ list: ["mcp", "list"]
1022
+ },
1023
+ {
1024
+ provider: "codex",
1025
+ add: (cmd) => ["mcp", "add", SERVER_NAME, "--", cmd.command, ...cmd.args],
1026
+ remove: ["mcp", "remove", SERVER_NAME],
1027
+ list: ["mcp", "list"]
1028
+ },
1029
+ {
1030
+ provider: "kimi",
1031
+ add: (cmd) => ["mcp", "add", SERVER_NAME, "--", cmd.command, ...cmd.args],
1032
+ remove: ["mcp", "remove", SERVER_NAME],
1033
+ list: ["mcp", "list"]
1034
+ },
1035
+ {
1036
+ provider: "qwen",
1037
+ // qwen (a gemini-cli fork) takes `<commandOrUrl> [args...]` with no `--`
1038
+ // separator, and already defaults its scope to `user`.
1039
+ add: (cmd) => ["mcp", "add", SERVER_NAME, cmd.command, ...cmd.args],
1040
+ remove: ["mcp", "remove", SERVER_NAME],
1041
+ list: ["mcp", "list"]
1042
+ },
1043
+ {
1044
+ provider: "hermes",
1045
+ // hermes takes --command and a variadic --args, so the entry path and `mcp`
1046
+ // both ride on one --args.
1047
+ add: (cmd) => ["mcp", "add", SERVER_NAME, "--command", cmd.command, "--args", ...cmd.args],
1048
+ remove: ["mcp", "remove", SERVER_NAME],
1049
+ list: ["mcp", "list"]
1050
+ },
1051
+ {
1052
+ // opencode's `mcp add` prompts interactively and has no remove subcommand,
1053
+ // so we cannot attach or detach it without a prompt. Report it as manual.
1054
+ provider: "opencode",
1055
+ list: ["mcp", "list"]
1056
+ }
1057
+ ];
1058
+ function hostBin(host) {
1059
+ return PROVIDER_REGISTRY[host.provider].bin;
1060
+ }
1061
+ function hostLabel(host) {
1062
+ return PROVIDER_REGISTRY[host.provider].displayName;
1063
+ }
1064
+ function isInstalled(bin) {
1065
+ try {
1066
+ execFileSync2("which", [bin], { stdio: "pipe" });
1067
+ return true;
1068
+ } catch {
1069
+ return false;
1070
+ }
1071
+ }
1072
+ function isAttached(host) {
1073
+ try {
1074
+ const out = execFileSync2(hostBin(host), host.list, {
1075
+ encoding: "utf8",
1076
+ timeout: STATUS_TIMEOUT_MS,
1077
+ stdio: ["ignore", "pipe", "pipe"]
1078
+ });
1079
+ return /reevesagents(?![-\w])/i.test(out);
1080
+ } catch {
1081
+ return false;
1082
+ }
1083
+ }
1084
+ function runHostCommand(host, args) {
1085
+ execFileSync2(hostBin(host), args, {
1086
+ encoding: "utf8",
1087
+ timeout: MGMT_TIMEOUT_MS,
1088
+ stdio: ["ignore", "pipe", "pipe"]
1089
+ });
1090
+ }
1091
+ function cliError(err) {
1092
+ const stderr = err && typeof err === "object" ? err.stderr : void 0;
1093
+ const text = typeof stderr === "string" ? stderr.trim() : Buffer.isBuffer(stderr) ? stderr.toString("utf8").trim() : "";
1094
+ return text || (err instanceof Error ? err.message : String(err));
1095
+ }
1096
+ function findHost(key) {
1097
+ const host = HOSTS.find((item) => item.provider === key);
1098
+ if (!host) throw new Error(`Unknown CLI: ${key}`);
1099
+ return host;
1100
+ }
1101
+ function hostStatus() {
1102
+ return HOSTS.map((host) => {
1103
+ const installed = isInstalled(hostBin(host));
1104
+ return {
1105
+ key: host.provider,
1106
+ bin: hostBin(host),
1107
+ label: hostLabel(host),
1108
+ installed,
1109
+ attached: installed && isAttached(host),
1110
+ manual: host.add === void 0
1111
+ };
1112
+ });
1113
+ }
1114
+ function attach(key, force = false) {
1115
+ const host = findHost(key);
1116
+ const label = hostLabel(host);
1117
+ if (!host.add) {
1118
+ return {
1119
+ key,
1120
+ label,
1121
+ ok: false,
1122
+ message: `${label} must be added manually: in OpenCode, add a stdio MCP server named "${SERVER_NAME}" that runs reevesagents mcp`
1123
+ };
1124
+ }
1125
+ if (!isInstalled(hostBin(host))) {
1126
+ return { key, label, ok: false, message: `${hostBin(host)} is not installed` };
1127
+ }
1128
+ try {
1129
+ if (force && host.remove) {
1130
+ try {
1131
+ runHostCommand(host, host.remove);
1132
+ } catch {
1133
+ }
1134
+ }
1135
+ runHostCommand(host, host.add(resolveLaunchCmd()));
1136
+ return { key, label, ok: true, message: force ? "reattached" : "attached" };
1137
+ } catch (err) {
1138
+ return { key, label, ok: false, message: cliError(err) };
1139
+ }
1140
+ }
1141
+ function detach(key) {
1142
+ const host = findHost(key);
1143
+ const label = hostLabel(host);
1144
+ if (!host.remove) {
1145
+ return { key, label, ok: false, message: `${label} must be removed manually` };
1146
+ }
1147
+ if (!isInstalled(hostBin(host))) {
1148
+ return { key, label, ok: false, message: `${hostBin(host)} is not installed` };
1149
+ }
1150
+ try {
1151
+ runHostCommand(host, host.remove);
1152
+ return { key, label, ok: true, message: "detached" };
1153
+ } catch (err) {
1154
+ return { key, label, ok: false, message: cliError(err) };
1155
+ }
1156
+ }
1157
+ function attachAll(force = false) {
1158
+ return HOSTS.filter((host) => host.add && isInstalled(hostBin(host))).map((host) => {
1159
+ if (!force && isAttached(host)) {
1160
+ return { key: host.provider, label: hostLabel(host), ok: true, message: "already attached" };
1161
+ }
1162
+ return attach(host.provider, force);
1163
+ });
1164
+ }
1165
+ async function verifyServerLaunch(cmd = resolveLaunchCmd()) {
1166
+ const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
1167
+ const { StdioClientTransport } = await import("@modelcontextprotocol/sdk/client/stdio.js");
1168
+ const client = new Client({ name: "reevesagents-verify", version: "1" }, { capabilities: {} });
1169
+ const transport = new StdioClientTransport({ command: cmd.command, args: cmd.args, stderr: "ignore" });
1170
+ let timer;
1171
+ const timeout = new Promise((_, reject) => {
1172
+ timer = setTimeout(() => reject(new Error("timed out starting the MCP server")), VERIFY_TIMEOUT_MS);
1173
+ timer.unref?.();
1174
+ });
1175
+ try {
1176
+ await Promise.race([client.connect(transport), timeout]);
1177
+ const listed = await Promise.race([client.listTools(), timeout]);
1178
+ const toolCount = Array.isArray(listed.tools) ? listed.tools.length : 0;
1179
+ return { ok: true, detail: `server started, ${toolCount} tools`, toolCount };
1180
+ } catch (err) {
1181
+ return { ok: false, detail: err instanceof Error ? err.message : String(err) };
1182
+ } finally {
1183
+ if (timer) clearTimeout(timer);
1184
+ try {
1185
+ await client.close();
1186
+ } catch {
1187
+ }
1188
+ }
1189
+ }
1190
+
1191
+ // src/core/doctor.ts
1192
+ import { execFileSync as execFileSync3 } from "child_process";
992
1193
  import { accessSync, constants, existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
993
1194
  import { createRequire } from "module";
994
1195
  import { join as join2 } from "path";
@@ -1051,7 +1252,7 @@ function platformSupportCheck(platform = process.platform, env = process.env, pr
1051
1252
  }
1052
1253
  function checkTmux() {
1053
1254
  try {
1054
- const versionStr = execFileSync2("tmux", ["-V"], { encoding: "utf8" }).trim();
1255
+ const versionStr = execFileSync3("tmux", ["-V"], { encoding: "utf8" }).trim();
1055
1256
  const match = versionStr.match(/tmux (\d+)\.(\d+)/);
1056
1257
  if (!match) return { name: "tmux", status: "warn", detail: `unexpected version format: ${versionStr}` };
1057
1258
  const major = parseInt(match[1] ?? "0", 10);
@@ -1125,6 +1326,26 @@ function checkRunsState() {
1125
1326
  };
1126
1327
  }
1127
1328
  }
1329
+ function checkMcpServerCommand() {
1330
+ const cmd = resolveLaunchCmd();
1331
+ if (cmd.command === "reevesagents") {
1332
+ return {
1333
+ name: "mcp server",
1334
+ status: "warn",
1335
+ detail: "no absolute launcher resolved; attached host CLIs will fall back to their own PATH"
1336
+ };
1337
+ }
1338
+ try {
1339
+ accessSync(cmd.command, constants.X_OK);
1340
+ return { name: "mcp server", status: "ok", detail: `${cmd.command} ${cmd.args.join(" ")}` };
1341
+ } catch {
1342
+ return {
1343
+ name: "mcp server",
1344
+ status: "warn",
1345
+ detail: `${cmd.command} is not executable; re-run reevesagents attach after reinstalling`
1346
+ };
1347
+ }
1348
+ }
1128
1349
  function runDoctor() {
1129
1350
  return {
1130
1351
  checks: [
@@ -1137,7 +1358,8 @@ function runDoctor() {
1137
1358
  checkPathAccess("runs dir", runsDir()),
1138
1359
  checkPathAccess("presets dir", join2(stateRoot(), "presets")),
1139
1360
  checkRunsState(),
1140
- checkWebExtras()
1361
+ checkWebExtras(),
1362
+ checkMcpServerCommand()
1141
1363
  ]
1142
1364
  };
1143
1365
  }
@@ -1409,7 +1631,7 @@ function savePresetFromRun(runId, name, description = "") {
1409
1631
  }
1410
1632
 
1411
1633
  // src/core/runtime.ts
1412
- import { execFileSync as execFileSync3 } from "child_process";
1634
+ import { execFileSync as execFileSync4 } from "child_process";
1413
1635
  import { randomUUID as randomUUID2 } from "crypto";
1414
1636
  import stripAnsi from "strip-ansi";
1415
1637
 
@@ -1448,7 +1670,7 @@ var ALLOWED_KEYS = [
1448
1670
  ];
1449
1671
  var realDriver = {
1450
1672
  tmux(args, input) {
1451
- return execFileSync3("tmux", args, {
1673
+ return execFileSync4("tmux", args, {
1452
1674
  encoding: "utf8",
1453
1675
  input,
1454
1676
  stdio: input === void 0 ? ["ignore", "pipe", "pipe"] : ["pipe", "pipe", "pipe"]
@@ -1987,7 +2209,6 @@ function openTmuxTarget(id, options = {}) {
1987
2209
  }
1988
2210
 
1989
2211
  export {
1990
- PROVIDER_REGISTRY,
1991
2212
  PROVIDER_DEFS,
1992
2213
  coerceExtraArgs,
1993
2214
  BIN,
@@ -2024,6 +2245,14 @@ export {
2024
2245
  findAgent,
2025
2246
  runHasLiveTmuxTarget,
2026
2247
  autoCleanupRuns,
2248
+ resolveLaunchCmd,
2249
+ hostStatus,
2250
+ attach,
2251
+ detach,
2252
+ attachAll,
2253
+ verifyServerLaunch,
2254
+ nodeVersionCheck,
2255
+ checkTmux,
2027
2256
  runDoctor,
2028
2257
  LANGUAGE_OPTIONS,
2029
2258
  DEFAULT_LANGUAGE,
@@ -2059,4 +2288,4 @@ export {
2059
2288
  stopRun,
2060
2289
  openTmuxTarget
2061
2290
  };
2062
- //# sourceMappingURL=chunk-KL5YFLQF.js.map
2291
+ //# sourceMappingURL=chunk-LKJSQLX2.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  PROVIDER_DEFS
4
- } from "./chunk-KL5YFLQF.js";
4
+ } from "./chunk-LKJSQLX2.js";
5
5
 
6
6
  // src/core/model-catalog.ts
7
7
  var PROVIDER_DEFAULT_MODEL = "";
@@ -27,4 +27,4 @@ export {
27
27
  modelDisplayName,
28
28
  modelSourceForProvider
29
29
  };
30
- //# sourceMappingURL=chunk-NJWOKVBZ.js.map
30
+ //# sourceMappingURL=chunk-LZMMFJYG.js.map
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ attachAll,
4
+ checkTmux,
5
+ detectAvailable,
6
+ hostStatus,
7
+ nodeVersionCheck,
8
+ resolveLaunchCmd,
9
+ stateRoot,
10
+ verifyServerLaunch
11
+ } from "./chunk-LKJSQLX2.js";
12
+
13
+ // src/core/onboard.ts
14
+ function buildOnboardingState() {
15
+ const available = detectAvailable();
16
+ const installedProviders = Object.keys(available).filter((p) => available[p]);
17
+ const hosts = hostStatus();
18
+ const tmuxOk = checkTmux().status !== "fail";
19
+ return {
20
+ tmuxOk,
21
+ nodeOk: nodeVersionCheck().status === "ok",
22
+ installedProviders,
23
+ hosts,
24
+ attachable: hosts.filter((h) => h.installed && !h.manual && !h.attached).map((h) => h.key),
25
+ attachedHosts: hosts.filter((h) => h.attached).map((h) => h.key),
26
+ launcherAbsolute: resolveLaunchCmd().command !== "reevesagents",
27
+ ready: tmuxOk && installedProviders.length > 0
28
+ };
29
+ }
30
+ async function runOnboarding() {
31
+ const attached = attachAll();
32
+ const verify = attached.some((result) => result.ok) ? await verifyServerLaunch() : null;
33
+ return { attached, verify };
34
+ }
35
+
36
+ // src/core/tui-open.ts
37
+ import { mkdirSync, readFileSync, writeFileSync } from "fs";
38
+ import { join } from "path";
39
+ function tokenPath() {
40
+ return join(stateRoot(), "tui-open-token");
41
+ }
42
+ function readTuiOpenToken() {
43
+ try {
44
+ return readFileSync(tokenPath(), "utf-8").trim();
45
+ } catch {
46
+ return "";
47
+ }
48
+ }
49
+ function writeTuiOpenToken() {
50
+ mkdirSync(stateRoot(), { recursive: true });
51
+ writeFileSync(tokenPath(), `${Date.now()}
52
+ `, "utf-8");
53
+ }
54
+
55
+ export {
56
+ buildOnboardingState,
57
+ runOnboarding,
58
+ readTuiOpenToken,
59
+ writeTuiOpenToken
60
+ };
61
+ //# sourceMappingURL=chunk-OHEIERAD.js.map
package/dist/cli.js CHANGED
@@ -1,31 +1,33 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ buildOnboardingState,
4
+ runOnboarding,
3
5
  writeTuiOpenToken
4
- } from "./chunk-PEOJCUQI.js";
6
+ } from "./chunk-OHEIERAD.js";
5
7
  import {
6
8
  MODEL_CATALOG
7
- } from "./chunk-NJWOKVBZ.js";
9
+ } from "./chunk-LZMMFJYG.js";
8
10
  import {
9
11
  REEVESAGENTS_VERSION,
10
- attach,
11
- attachAll,
12
- detach,
13
- hostStatus,
14
12
  listRunApprovals,
15
13
  resolveRunApproval
16
- } from "./chunk-EX5LH2KW.js";
14
+ } from "./chunk-6RPG22BH.js";
17
15
  import {
18
16
  ALLOWED_KEYS,
19
17
  CONFIG_FIELDS,
20
18
  PROVIDERS,
21
19
  archiveAndRemoveRun,
20
+ attach,
21
+ attachAll,
22
22
  autoCleanupRuns,
23
23
  coerceExtraArgs,
24
24
  computeRunStatus,
25
25
  deleteAgent,
26
26
  deletePreset,
27
27
  deleteRunHistory,
28
+ detach,
28
29
  detectAvailable,
30
+ hostStatus,
29
31
  interrupt,
30
32
  killAgent,
31
33
  latestActiveRun,
@@ -49,8 +51,9 @@ import {
49
51
  spawnWorker,
50
52
  startRun,
51
53
  startRunFromPreset,
52
- stopRun
53
- } from "./chunk-KL5YFLQF.js";
54
+ stopRun,
55
+ verifyServerLaunch
56
+ } from "./chunk-LKJSQLX2.js";
54
57
  import "./chunk-D24DQQ6V.js";
55
58
 
56
59
  // src/cli.ts
@@ -552,6 +555,61 @@ program.command("deny <approval-id> [note]").description("deny a pending approva
552
555
  process.exit(1);
553
556
  }
554
557
  });
558
+ program.command("setup").description("check your setup and connect installed CLIs (the first-run wizard)").option("--attach", "connect reevesagents to every installed host CLI (default only reports)").option("--json", "print the onboarding state as JSON").action(async (opts) => {
559
+ try {
560
+ const state = buildOnboardingState();
561
+ if (opts.json) {
562
+ console.log(JSON.stringify(state, null, 2));
563
+ return;
564
+ }
565
+ console.log(`tmux ${state.tmuxOk ? "ok" : "missing (required; install tmux 3.0+)"}`);
566
+ console.log(`node ${state.nodeOk ? "ok" : "too old (need >=20.19)"}`);
567
+ console.log(`providers ${state.installedProviders.length > 0 ? state.installedProviders.map(providerDisplayName).join(", ") : "none installed"}`);
568
+ if (state.installedProviders.length === 0) {
569
+ console.log("\nInstall a provider CLI (for example Claude Code or Codex) and sign in, then run setup again.");
570
+ return;
571
+ }
572
+ console.log("\nTwo ways to use reevesagents:");
573
+ console.log(` 1. Run agents yourself reevesagents spawn ${state.installedProviders[0]}`);
574
+ console.log(" 2. Let one CLI drive others connect the Agent control MCP (below)");
575
+ const installedHosts = state.hosts.filter((host) => host.installed);
576
+ if (installedHosts.length > 0) {
577
+ console.log("\nHost CLIs (can drive the others once connected):");
578
+ for (const host of installedHosts) {
579
+ const status = host.attached ? "connected" : host.manual ? "add manually" : "not connected";
580
+ console.log(` ${host.key.padEnd(10)} ${status}`);
581
+ }
582
+ }
583
+ if (!opts.attach) {
584
+ if (state.attachable.length > 0) {
585
+ console.log(`
586
+ To connect ${state.attachable.join(", ")}, run: reevesagents setup --attach`);
587
+ } else if (state.attachedHosts.length > 0) {
588
+ console.log("\nAll installed host CLIs are already connected. Restart them to load the tools.");
589
+ }
590
+ return;
591
+ }
592
+ console.log("\nConnecting...");
593
+ const result = await runOnboarding();
594
+ for (const attached of result.attached) {
595
+ console.log(` ${(attached.ok ? "ok" : "--").padEnd(3)} ${attached.key.padEnd(10)} ${attached.message}`);
596
+ }
597
+ if (result.verify?.ok) {
598
+ console.log(`
599
+ verified: ${result.verify.detail}.`);
600
+ const keys = result.attached.filter((attached) => attached.ok).map((attached) => attached.key);
601
+ console.log(`Restart ${keys.join(", ")} (start a new session), then ask it: "use reevesagents to spawn a codex and summarize the README".`);
602
+ } else if (result.verify) {
603
+ console.log(`
604
+ warning: the server did not start here: ${result.verify.detail}`);
605
+ console.log("a host CLI will hit the same error. check that reevesagents is installed and re-run setup --attach.");
606
+ }
607
+ if (!result.attached.some((attached) => attached.ok) || result.verify?.ok === false) process.exitCode = 1;
608
+ } catch (err) {
609
+ console.error(err instanceof Error ? err.message : String(err));
610
+ process.exit(1);
611
+ }
612
+ });
555
613
  program.command("hosts").description("list MCP host CLIs and whether reevesagents is attached").option("--json", "output JSON array").action((opts) => {
556
614
  const hosts = hostStatus();
557
615
  if (opts.json) {
@@ -563,9 +621,9 @@ program.command("hosts").description("list MCP host CLIs and whether reevesagent
563
621
  console.log(`${host.key.padEnd(10)} ${state.padEnd(9)} ${host.label}`);
564
622
  }
565
623
  });
566
- program.command("attach [cli]").description("attach the reevesagents MCP to one CLI, or all installed when omitted").action((cli) => {
624
+ program.command("attach [cli]").description("attach the reevesagents MCP to one CLI, or all installed when omitted").option("--force", "rewrite the registration even if already attached (upgrades an old launcher)").action(async (cli, opts) => {
567
625
  try {
568
- const results = cli ? [attach(cli)] : attachAll();
626
+ const results = cli ? [attach(cli, opts.force)] : attachAll(opts.force);
569
627
  if (results.length === 0) {
570
628
  console.log("no installed CLIs to attach");
571
629
  return;
@@ -573,6 +631,22 @@ program.command("attach [cli]").description("attach the reevesagents MCP to one
573
631
  for (const result of results) {
574
632
  console.log(`${(result.ok ? "ok" : "--").padEnd(3)} ${result.key.padEnd(10)} ${result.message}`);
575
633
  }
634
+ const attached = results.filter((result) => result.ok);
635
+ if (attached.length > 0) {
636
+ const verify = await verifyServerLaunch();
637
+ if (verify.ok) {
638
+ console.log(`
639
+ verified: ${verify.detail}.`);
640
+ console.log(`restart ${attached.map((result) => result.key).join(", ")} (start a new session) to load the tools.`);
641
+ } else {
642
+ console.log(`
643
+ warning: the entry was written, but the server did not start here: ${verify.detail}`);
644
+ console.log("a host CLI will hit the same error. check that reevesagents is installed and re-run attach.");
645
+ process.exitCode = 1;
646
+ }
647
+ } else {
648
+ process.exitCode = 1;
649
+ }
576
650
  } catch (err) {
577
651
  console.error(err instanceof Error ? err.message : String(err));
578
652
  process.exit(1);
@@ -582,6 +656,7 @@ program.command("detach <cli>").description("detach the reevesagents MCP from on
582
656
  try {
583
657
  const result = detach(cli);
584
658
  console.log(`${(result.ok ? "ok" : "--").padEnd(3)} ${result.key.padEnd(10)} ${result.message}`);
659
+ if (!result.ok) process.exitCode = 1;
585
660
  } catch (err) {
586
661
  console.error(err instanceof Error ? err.message : String(err));
587
662
  process.exit(1);
@@ -695,7 +770,7 @@ program.command("web").description("start the on-demand loopback web UI for agen
695
770
  });
696
771
  program.command("mcp").description("start the agent control MCP server over stdio (for CLIs that have it attached)").action(async () => {
697
772
  try {
698
- const { startAgentMcpServer } = await import("./server-KHY23W6D.js");
773
+ const { startAgentMcpServer } = await import("./server-TUKVM6PW.js");
699
774
  await startAgentMcpServer();
700
775
  } catch (err) {
701
776
  console.error(err instanceof Error ? err.message : String(err));
@@ -709,7 +784,7 @@ async function runWeb(opts) {
709
784
  console.error(webExtrasMessage(extras.missing));
710
785
  process.exit(1);
711
786
  }
712
- const { startWebServer } = await import("./server-L5DTU6U2.js");
787
+ const { startWebServer } = await import("./server-BNCUJ4YU.js");
713
788
  const parsed = opts.port ? Number.parseInt(opts.port, 10) : void 0;
714
789
  const handle = await startWebServer({
715
790
  port: parsed !== void 0 && Number.isFinite(parsed) ? parsed : void 0,
@@ -728,12 +803,12 @@ async function renderTui() {
728
803
  const [{ default: React }, { render }, { Router }] = await Promise.all([
729
804
  import("react"),
730
805
  import("ink"),
731
- import("./router-MGXDADKM.js")
806
+ import("./router-7MRY24Y5.js")
732
807
  ]);
733
808
  try {
734
809
  await render(React.createElement(Router), { alternateScreen: false }).waitUntilExit();
735
810
  } finally {
736
- const { closeTuiWebServer } = await import("./tui-launch-2UWK76V3.js");
811
+ const { closeTuiWebServer } = await import("./tui-launch-Y5YXPUHS.js");
737
812
  await closeTuiWebServer();
738
813
  }
739
814
  process.exit(0);
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ type AgentRole = 'root' | 'worker';
8
8
  type RunStatus = 'running' | 'ended';
9
9
  type RunViewStatus = RunStatus | 'stale';
10
10
  type RunHistoryStatus = 'ended' | 'stale';
11
- type ScreenName = 'Welcome' | 'LanguageSelect' | 'Runs' | 'RunHistory' | 'Run' | 'RunAgents' | 'RunOutput' | 'RunStop' | 'AgentDetail' | 'AgentOutput' | 'AgentTask' | 'AgentKill' | 'NewRun' | 'NewRunBasics' | 'NewRunRoot' | 'NewRunWorkers' | 'NewRunWorker' | 'NewRunReview' | 'NewRunStarting' | 'AddWorker' | 'Settings' | 'AgentControl' | 'Reference' | 'Credits' | 'Doctor' | 'DoctorCheck' | 'Approvals' | 'Config' | 'Presets';
11
+ type ScreenName = 'Welcome' | 'LanguageSelect' | 'Runs' | 'RunHistory' | 'Run' | 'RunAgents' | 'RunOutput' | 'RunStop' | 'AgentDetail' | 'AgentOutput' | 'AgentTask' | 'AgentKill' | 'NewRun' | 'NewRunBasics' | 'NewRunRoot' | 'NewRunWorkers' | 'NewRunWorker' | 'NewRunReview' | 'NewRunStarting' | 'AddWorker' | 'Settings' | 'AgentControl' | 'Setup' | 'Reference' | 'Credits' | 'Doctor' | 'DoctorCheck' | 'Approvals' | 'Config' | 'Presets';
12
12
  interface Message {
13
13
  id: string;
14
14
  from_id: string;
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  modelDisplayName,
7
7
  modelSourceForProvider,
8
8
  modelValuesForProvider
9
- } from "./chunk-NJWOKVBZ.js";
9
+ } from "./chunk-LZMMFJYG.js";
10
10
  import {
11
11
  BIN,
12
12
  PROVIDERS,
@@ -39,7 +39,7 @@ import {
39
39
  startRun,
40
40
  stateRoot,
41
41
  stopRun
42
- } from "./chunk-KL5YFLQF.js";
42
+ } from "./chunk-LKJSQLX2.js";
43
43
  import "./chunk-D24DQQ6V.js";
44
44
  export {
45
45
  BIN,