reevesagents 1.5.0 → 1.6.1

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.
@@ -6,39 +6,43 @@ import {
6
6
  // src/core/model-data.ts
7
7
  var CC_MODEL_SOURCE = "curated Claude Code aliases";
8
8
  var CC_MODELS = [
9
- "sonnet",
9
+ "fable",
10
10
  "opus",
11
+ "sonnet",
11
12
  "haiku"
12
13
  ];
13
14
  var CODEX_MODEL_SOURCE = "curated Codex CLI model ids";
14
15
  var CODEX_MODELS = [
15
- "gpt-5-codex",
16
- "gpt-5"
16
+ "gpt-5.6-sol",
17
+ "gpt-5.5",
18
+ "gpt-5.4-mini"
17
19
  ];
18
20
  var OPENCODE_MODEL_SOURCE = "curated OpenCode provider/model ids";
19
21
  var OPENCODE_MODELS = [
20
- "anthropic/claude-sonnet-4-5",
21
- "anthropic/claude-opus-4-1",
22
+ "opencode/claude-sonnet-4-6",
23
+ "opencode/claude-opus-4-8",
24
+ "opencode/gpt-5.2-codex",
25
+ "anthropic/claude-opus-4-8",
22
26
  "anthropic/claude-haiku-4-5",
23
- "openai/gpt-5-codex",
24
- "openai/gpt-5"
27
+ "openai/gpt-5.5"
25
28
  ];
26
29
  var HERMES_MODEL_SOURCE = "curated Hermes model ids";
27
30
  var HERMES_MODELS = [
28
- "anthropic/claude-sonnet-4",
29
- "anthropic/claude-opus-4",
30
- "anthropic/claude-haiku-4-5",
31
- "openai/gpt-5"
31
+ "anthropic:claude-opus-4-8",
32
+ "anthropic:claude-fable-5",
33
+ "openai-codex:gpt-5.5",
34
+ "openai-codex:gpt-5.4-mini"
32
35
  ];
33
36
  var KIMI_MODEL_SOURCE = "curated Kimi Code model aliases";
34
37
  var KIMI_MODELS = [
35
- "kimi-code/kimi-for-coding"
38
+ "kimi-code/k3",
39
+ "kimi-code/kimi-for-coding",
40
+ "kimi-code/kimi-for-coding-highspeed"
36
41
  ];
37
42
  var DEEPSEEK_MODEL_SOURCE = "curated DeepSeek CLI model ids";
38
43
  var DEEPSEEK_MODELS = [
39
- "deepseek-coder:6.7b",
40
- "deepseek-coder:1.3b",
41
- "deepseek-coder:33b"
44
+ "deepseek-v4-pro",
45
+ "deepseek-v4-flash"
42
46
  ];
43
47
  var PI_MODEL_SOURCE = "curated Pi model aliases";
44
48
  var PI_MODELS = [
@@ -50,7 +54,8 @@ var PI_MODELS = [
50
54
  var QWEN_MODEL_SOURCE = "curated Qwen Code model ids";
51
55
  var QWEN_MODELS = [
52
56
  "qwen3-coder-plus",
53
- "qwen3-coder-flash"
57
+ "qwen3-coder-flash",
58
+ "qwen3-coder-next"
54
59
  ];
55
60
  var AIDER_MODEL_SOURCE = "curated Aider model aliases";
56
61
  var AIDER_MODELS = [
@@ -140,11 +145,17 @@ var PROVIDER_REGISTRY = {
140
145
  models: CODEX_MODELS,
141
146
  modelSource: CODEX_MODEL_SOURCE,
142
147
  helpRequirements: [
143
- { feature: "skip permissions", tokens: ["--dangerously-bypass-approvals-and-sandbox"] }
148
+ { feature: "skip permissions", tokens: ["--dangerously-bypass-approvals-and-sandbox"] },
149
+ { feature: "config override", tokens: ["--config"] }
144
150
  ],
145
- buildArgs: ({ permissions, model }) => {
151
+ supportsEffort: true,
152
+ buildArgs: ({ permissions, model, effort }) => {
146
153
  const args = [];
147
154
  if (permissions === "skip") args.push("--dangerously-bypass-approvals-and-sandbox");
155
+ if (effort !== "default") {
156
+ const codexEffort = effort === "max" ? "xhigh" : effort;
157
+ args.push("-c", `model_reasoning_effort=${codexEffort}`);
158
+ }
148
159
  if (model) args.push("--model", model);
149
160
  return args;
150
161
  }
@@ -737,13 +748,12 @@ function writeRunUnlocked(run) {
737
748
  return path;
738
749
  }
739
750
  function readRunUnlocked(runId) {
740
- let raw;
741
751
  try {
742
- raw = readFileSync(runPath(runId), "utf-8");
752
+ const raw = readFileSync(runPath(runId), "utf-8");
753
+ return normalizeRun(JSON.parse(raw));
743
754
  } catch {
744
755
  throw new Error(`Run not found: ${runId}`);
745
756
  }
746
- return normalizeRun(JSON.parse(raw));
747
757
  }
748
758
  function writeAgentUnlocked(agent) {
749
759
  const path = agentPath(agent.run_id, agent.id);
@@ -756,7 +766,11 @@ function writeRunHistoryUnlocked(record) {
756
766
  return path;
757
767
  }
758
768
  function readAgentUnlocked(runId, agentId) {
759
- return normalizeAgent(JSON.parse(readFileSync(agentPath(runId, agentId), "utf-8")));
769
+ try {
770
+ return normalizeAgent(JSON.parse(readFileSync(agentPath(runId, agentId), "utf-8")));
771
+ } catch {
772
+ throw new Error(`Agent not found: ${agentId}`);
773
+ }
760
774
  }
761
775
  function writeRun(run) {
762
776
  return withRunsLock(() => writeRunUnlocked(run));
@@ -1395,8 +1409,9 @@ var DEFAULT_GLOBAL = {
1395
1409
  peek_interval_ms: 5e3,
1396
1410
  peek_lines: 10,
1397
1411
  max_depth: 5,
1398
- max_agents: 10,
1412
+ max_agents: 100,
1399
1413
  ready_delay_ms: 5e3,
1414
+ max_lifetime_ms: 0,
1400
1415
  default_permissions: "ask",
1401
1416
  language: DEFAULT_LANGUAGE
1402
1417
  };
@@ -1433,6 +1448,7 @@ function mergeDefaults(raw) {
1433
1448
  if (typeof g.max_depth === "number" && g.max_depth > 0) merged.global.max_depth = g.max_depth;
1434
1449
  if (typeof g.max_agents === "number" && g.max_agents > 0) merged.global.max_agents = g.max_agents;
1435
1450
  if (typeof g.ready_delay_ms === "number" && g.ready_delay_ms >= 0) merged.global.ready_delay_ms = g.ready_delay_ms;
1451
+ if (typeof g.max_lifetime_ms === "number" && g.max_lifetime_ms >= 0) merged.global.max_lifetime_ms = g.max_lifetime_ms;
1436
1452
  if (g.default_permissions === "skip" || g.default_permissions === "ask") merged.global.default_permissions = g.default_permissions;
1437
1453
  if (isLanguageCode(g.language)) merged.global.language = g.language;
1438
1454
  }
@@ -1465,6 +1481,7 @@ var CONFIG_FIELDS = [
1465
1481
  { key: "max_depth", kind: "posint", label: "max depth" },
1466
1482
  { key: "max_agents", kind: "posint", label: "max agents" },
1467
1483
  { key: "ready_delay_ms", kind: "nonneg-int", label: "ready delay (ms)" },
1484
+ { key: "max_lifetime_ms", kind: "nonneg-int", label: "max agent lifetime (ms)" },
1468
1485
  { key: "default_permissions", kind: "permissions", label: "default permissions" },
1469
1486
  { key: "language", kind: "language", label: "language" }
1470
1487
  ];
@@ -1772,13 +1789,13 @@ function pickReevesAnchor(driver) {
1772
1789
  driver.tmux(["new-session", "-d", "-s", fallbackName, "-n", "reeves"]);
1773
1790
  } catch {
1774
1791
  }
1775
- let ids = readDisplayIds(driver, `${fallbackName}:reeves`);
1792
+ let ids = readDisplayIds(driver, `=${fallbackName}:reeves`);
1776
1793
  if (!ids) {
1777
1794
  try {
1778
- driver.tmux(["new-window", "-d", "-t", fallbackName, "-n", "reeves"]);
1795
+ driver.tmux(["new-window", "-d", "-t", `${fallbackName}:`, "-n", "reeves"]);
1779
1796
  } catch {
1780
1797
  }
1781
- ids = readDisplayIds(driver, `${fallbackName}:reeves`);
1798
+ ids = readDisplayIds(driver, `=${fallbackName}:reeves`);
1782
1799
  }
1783
1800
  return { sessionName: fallbackName, windowId: ids?.windowId ?? "", paneId: ids?.paneId ?? "" };
1784
1801
  }
@@ -2231,6 +2248,7 @@ export {
2231
2248
  runsDir,
2232
2249
  runDir,
2233
2250
  nowIso,
2251
+ nowMs,
2234
2252
  withRunsLock,
2235
2253
  readRun,
2236
2254
  listRuns,
@@ -2243,6 +2261,8 @@ export {
2243
2261
  archiveAndRemoveRun,
2244
2262
  listAgents,
2245
2263
  findAgent,
2264
+ defaultTmuxAvailable,
2265
+ defaultTmuxTargetExists,
2246
2266
  runHasLiveTmuxTarget,
2247
2267
  autoCleanupRuns,
2248
2268
  resolveLaunchCmd,
@@ -2288,4 +2308,4 @@ export {
2288
2308
  stopRun,
2289
2309
  openTmuxTarget
2290
2310
  };
2291
- //# sourceMappingURL=chunk-LKJSQLX2.js.map
2311
+ //# sourceMappingURL=chunk-S2NWTREO.js.map
@@ -28,7 +28,7 @@ async function startTuiWebServer() {
28
28
  const { checkWebExtras, webExtrasMessage } = await import("./extras-25AF6TAR.js");
29
29
  const extras = await checkWebExtras();
30
30
  if (!extras.ok) throw new Error(webExtrasMessage(extras.missing));
31
- const { startWebServer } = await import("./server-BNCUJ4YU.js");
31
+ const { startWebServer } = await import("./server-RXQBOR5F.js");
32
32
  return startWebServer({ open: true });
33
33
  }
34
34
  async function closeTuiWebServer() {
@@ -48,4 +48,4 @@ export {
48
48
  startWebFromTui,
49
49
  closeTuiWebServer
50
50
  };
51
- //# sourceMappingURL=chunk-HL5MTR5M.js.map
51
+ //# sourceMappingURL=chunk-S5J4E3QZ.js.map
package/dist/cli.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Command } from 'commander';
2
2
 
3
3
  declare const program: Command;
4
+ declare function tuiNewWindowArgs(session: string, window: string, command: string): string[];
4
5
 
5
- export { program };
6
+ export { program, tuiNewWindowArgs };
package/dist/cli.js CHANGED
@@ -1,17 +1,26 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ installSkills,
4
+ removeSkills,
5
+ skillsStatus
6
+ } from "./chunk-JDJW3WST.js";
2
7
  import {
3
8
  buildOnboardingState,
4
9
  runOnboarding,
10
+ suggestedAgentPrompt,
5
11
  writeTuiOpenToken
6
- } from "./chunk-OHEIERAD.js";
12
+ } from "./chunk-JZYM3JJE.js";
13
+ import {
14
+ sweepAgents
15
+ } from "./chunk-36AVBLVK.js";
7
16
  import {
8
17
  MODEL_CATALOG
9
- } from "./chunk-LZMMFJYG.js";
18
+ } from "./chunk-KHBI6CRH.js";
10
19
  import {
11
20
  REEVESAGENTS_VERSION,
12
21
  listRunApprovals,
13
22
  resolveRunApproval
14
- } from "./chunk-6RPG22BH.js";
23
+ } from "./chunk-23XREWJP.js";
15
24
  import {
16
25
  ALLOWED_KEYS,
17
26
  CONFIG_FIELDS,
@@ -53,7 +62,7 @@ import {
53
62
  startRunFromPreset,
54
63
  stopRun,
55
64
  verifyServerLaunch
56
- } from "./chunk-LKJSQLX2.js";
65
+ } from "./chunk-S2NWTREO.js";
57
66
  import "./chunk-D24DQQ6V.js";
58
67
 
59
68
  // src/cli.ts
@@ -128,9 +137,12 @@ function quoteShell(s) {
128
137
  function tmuxAttachCommand(session, windowId) {
129
138
  return `tmux select-window -t ${quoteShell(`${session}:${windowId}`)} && tmux attach -t ${quoteShell(session)}`;
130
139
  }
140
+ function exactSession(session) {
141
+ return `=${session}`;
142
+ }
131
143
  function tmuxSessionExists(session) {
132
144
  try {
133
- execFileSync("tmux", ["has-session", "-t", session], { stdio: "ignore" });
145
+ execFileSync("tmux", ["has-session", "-t", exactSession(session)], { stdio: "ignore" });
134
146
  return true;
135
147
  } catch {
136
148
  return false;
@@ -138,14 +150,14 @@ function tmuxSessionExists(session) {
138
150
  }
139
151
  function tmuxWindowIds(session) {
140
152
  try {
141
- return execFileSync("tmux", ["list-windows", "-t", session, "-F", "#{window_id}"], { encoding: "utf8" }).split("\n").map((line) => line.trim()).filter(Boolean);
153
+ return execFileSync("tmux", ["list-windows", "-t", exactSession(session), "-F", "#{window_id}"], { encoding: "utf8" }).split("\n").map((line) => line.trim()).filter(Boolean);
142
154
  } catch {
143
155
  return [];
144
156
  }
145
157
  }
146
158
  function tmuxWindowByName(session, name) {
147
159
  try {
148
- const rows = execFileSync("tmux", ["list-windows", "-t", session, "-F", "#{window_id} #{window_name} #{pane_current_command}"], { encoding: "utf8" }).split("\n").map((line) => line.trim()).filter(Boolean);
160
+ const rows = execFileSync("tmux", ["list-windows", "-t", exactSession(session), "-F", "#{window_id} #{window_name} #{pane_current_command}"], { encoding: "utf8" }).split("\n").map((line) => line.trim()).filter(Boolean);
149
161
  for (const row of rows) {
150
162
  const [windowId, windowName, command = ""] = row.split(" ");
151
163
  if (windowId && windowName === name) return { id: windowId, command };
@@ -166,19 +178,11 @@ function clearTuiSessionExcept(session, keepWindowId) {
166
178
  }
167
179
  }
168
180
  }
181
+ function tuiNewWindowArgs(session, window, command) {
182
+ return ["new-window", "-d", "-P", "-F", "#{window_id}", "-t", `${exactSession(session)}:`, "-n", window, command];
183
+ }
169
184
  function createTuiWindow(session, window, command) {
170
- return execFileSync("tmux", [
171
- "new-window",
172
- "-d",
173
- "-P",
174
- "-F",
175
- "#{window_id}",
176
- "-t",
177
- session,
178
- "-n",
179
- window,
180
- command
181
- ], { encoding: "utf8" }).trim();
185
+ return execFileSync("tmux", tuiNewWindowArgs(session, window, command), { encoding: "utf8" }).trim();
182
186
  }
183
187
  function openTuiSession(command) {
184
188
  const session = "reeves";
@@ -197,7 +201,7 @@ function openTuiSession(command) {
197
201
  const windowId = existing && isTuiCommand(existing.command) ? existing.id : createTuiWindow(session, window, command);
198
202
  execFileSync("tmux", ["select-window", "-t", windowId], { stdio: "ignore" });
199
203
  clearTuiSessionExcept(session, windowId);
200
- execFileSync("tmux", ["attach", "-t", session], { stdio: "inherit" });
204
+ execFileSync("tmux", ["attach", "-t", exactSession(session)], { stdio: "inherit" });
201
205
  }
202
206
  function openTarget(id) {
203
207
  const target = resolveOpenTarget(id);
@@ -234,6 +238,10 @@ function parseAgentSpec(spec) {
234
238
  }
235
239
  return { provider, nickname: nickname || void 0, model };
236
240
  }
241
+ function defaultSpawnProvider() {
242
+ const available = detectAvailable();
243
+ return PROVIDERS.find((provider) => available[provider]) ?? "codex";
244
+ }
237
245
  var EFFORT_LEVELS = ["default", "low", "medium", "high", "xhigh", "max"];
238
246
  function parseAuthModeOpt(value) {
239
247
  if (value === void 0) return void 0;
@@ -302,7 +310,7 @@ function spawnIntoRun(run, parsed, opts, available) {
302
310
  }
303
311
  program.command("spawn [agent...]").description("start a run with one or more provider agents").option("--name <name>", "run name", "run").option("--cwd <dir>", "working directory", process.cwd()).option("--prompt <text>", "initial prompt pasted into each agent", "").option("--skip", "skip permission prompts for every agent (sets permissions to skip)").option("--run <run-id>", "add the agents to an existing run instead of starting a new one").option("--auth-mode <mode>", "auth mode for every agent: default or api-key").option("--effort <level>", "reasoning effort for every agent: default, low, medium, high, xhigh, max").option("--extra-args <args>", 'extra flags appended to every agent launch, e.g. "--remote-control"').option("--json", "output JSON: the run id and the spawned agent ids").action((agentSpecs, opts) => {
304
312
  try {
305
- const specs = agentSpecs.length > 0 ? agentSpecs : ["codex"];
313
+ const specs = agentSpecs.length > 0 ? agentSpecs : [defaultSpawnProvider()];
306
314
  const parsed = specs.map(parseAgentSpec);
307
315
  const available = preflightAvailability(parsed.map((spec) => spec.provider));
308
316
  const permissions = opts.skip ? "skip" : void 0;
@@ -407,6 +415,21 @@ program.command("runs").description("list runs").option("--json", "output JSON a
407
415
  console.log(`${run.id.slice(0, 8)} ${run.view_status.padEnd(7)} ${"agent run".padEnd(9)} ${rootProvider.padEnd(14)} ${String(agents.length).padStart(2)} ${"agents".padEnd(9)} ${age(run.started_at).padEnd(4)} ${run.name} ${run.working_dir}${note ? ` ${note}` : ""}`);
408
416
  }
409
417
  });
418
+ program.command("reap").description("reap zombie agents: end any whose tmux window is gone or that outlive max_lifetime_ms").option("--json", "output JSON array of reaped agents").action((opts) => {
419
+ const { reaped } = sweepAgents();
420
+ if (opts.json) {
421
+ console.log(JSON.stringify(reaped, null, 2));
422
+ return;
423
+ }
424
+ if (reaped.length === 0) {
425
+ console.log("no zombie agents");
426
+ return;
427
+ }
428
+ for (const r of reaped) {
429
+ console.log(`${r.agent_id.slice(0, 8)} ${r.run_id.slice(0, 8)} ${r.reason.padEnd(17)} ${String(Math.round(r.age_ms / 1e3)).padStart(5)}s ${r.nickname}`);
430
+ }
431
+ console.log(`reaped ${reaped.length} ${reaped.length === 1 ? "agent" : "agents"}`);
432
+ });
410
433
  program.command("open <id>").description("open a run tmux tab set or an agent window").action((id) => {
411
434
  openTarget(id);
412
435
  });
@@ -598,7 +621,7 @@ To connect ${state.attachable.join(", ")}, run: reevesagents setup --attach`);
598
621
  console.log(`
599
622
  verified: ${result.verify.detail}.`);
600
623
  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".`);
624
+ console.log(`Restart ${keys.join(", ")} (start a new session), then ask it: "${suggestedAgentPrompt(state.installedProviders)}".`);
602
625
  } else if (result.verify) {
603
626
  console.log(`
604
627
  warning: the server did not start here: ${result.verify.detail}`);
@@ -625,7 +648,9 @@ program.command("attach [cli]").description("attach the reevesagents MCP to one
625
648
  try {
626
649
  const results = cli ? [attach(cli, opts.force)] : attachAll(opts.force);
627
650
  if (results.length === 0) {
628
- console.log("no installed CLIs to attach");
651
+ console.log("no MCP-capable CLI is installed here.");
652
+ console.log('Install a host CLI (for example Claude Code or Codex) and sign in, then run "reevesagents attach" again.');
653
+ process.exitCode = 1;
629
654
  return;
630
655
  }
631
656
  for (const result of results) {
@@ -637,7 +662,9 @@ program.command("attach [cli]").description("attach the reevesagents MCP to one
637
662
  if (verify.ok) {
638
663
  console.log(`
639
664
  verified: ${verify.detail}.`);
640
- console.log(`restart ${attached.map((result) => result.key).join(", ")} (start a new session) to load the tools.`);
665
+ console.log(`restart ${attached.map((result) => result.key).join(", ")} (start a new session) to load the tools,`);
666
+ const available = detectAvailable();
667
+ console.log(`then ask it: "${suggestedAgentPrompt(PROVIDERS.filter((provider) => available[provider]))}".`);
641
668
  } else {
642
669
  console.log(`
643
670
  warning: the entry was written, but the server did not start here: ${verify.detail}`);
@@ -662,6 +689,49 @@ program.command("detach <cli>").description("detach the reevesagents MCP from on
662
689
  process.exit(1);
663
690
  }
664
691
  });
692
+ program.command("skills [action]").description("install the reevesagents skill for skill-aware CLIs (action: status, install, remove)").option("--json", "output JSON").action((action, opts) => {
693
+ const verb = action ?? "status";
694
+ try {
695
+ if (verb === "install") {
696
+ const results = installSkills();
697
+ if (opts.json) {
698
+ console.log(JSON.stringify(results, null, 2));
699
+ return;
700
+ }
701
+ for (const r of results) console.log(`${(r.ok ? "ok" : "--").padEnd(3)} ${r.label.padEnd(24)} ${r.file}`);
702
+ console.log("\nrestart your CLIs to pick up the skill.");
703
+ if (results.some((r) => !r.ok)) process.exitCode = 1;
704
+ return;
705
+ }
706
+ if (verb === "remove") {
707
+ const results = removeSkills();
708
+ if (opts.json) {
709
+ console.log(JSON.stringify(results, null, 2));
710
+ return;
711
+ }
712
+ for (const r of results) console.log(`${(r.ok ? "ok" : "--").padEnd(3)} ${r.label.padEnd(24)} ${r.message}`);
713
+ if (results.some((r) => !r.ok)) process.exitCode = 1;
714
+ return;
715
+ }
716
+ if (verb === "status") {
717
+ const rows = skillsStatus();
718
+ if (opts.json) {
719
+ console.log(JSON.stringify(rows, null, 2));
720
+ return;
721
+ }
722
+ for (const r of rows) {
723
+ const state = !r.present ? "absent" : r.current ? "installed" : "outdated";
724
+ console.log(`${state.padEnd(10)} ${r.label.padEnd(24)} ${r.file}`);
725
+ }
726
+ console.log('\nrun "reevesagents skills install" to (re)install.');
727
+ return;
728
+ }
729
+ throw new Error(`unknown action: ${verb} (use status, install, or remove)`);
730
+ } catch (err) {
731
+ console.error(err instanceof Error ? err.message : String(err));
732
+ process.exit(1);
733
+ }
734
+ });
665
735
  program.command("doctor").description("run setup and environment health checks").option("--json", "output JSON").action((opts) => {
666
736
  const result = runDoctor();
667
737
  const anyFail = result.checks.some((check) => check.status === "fail");
@@ -770,7 +840,7 @@ program.command("web").description("start the on-demand loopback web UI for agen
770
840
  });
771
841
  program.command("mcp").description("start the agent control MCP server over stdio (for CLIs that have it attached)").action(async () => {
772
842
  try {
773
- const { startAgentMcpServer } = await import("./server-TUKVM6PW.js");
843
+ const { startAgentMcpServer } = await import("./server-IJXZCKR2.js");
774
844
  await startAgentMcpServer();
775
845
  } catch (err) {
776
846
  console.error(err instanceof Error ? err.message : String(err));
@@ -784,7 +854,7 @@ async function runWeb(opts) {
784
854
  console.error(webExtrasMessage(extras.missing));
785
855
  process.exit(1);
786
856
  }
787
- const { startWebServer } = await import("./server-BNCUJ4YU.js");
857
+ const { startWebServer } = await import("./server-RXQBOR5F.js");
788
858
  const parsed = opts.port ? Number.parseInt(opts.port, 10) : void 0;
789
859
  const handle = await startWebServer({
790
860
  port: parsed !== void 0 && Number.isFinite(parsed) ? parsed : void 0,
@@ -803,12 +873,12 @@ async function renderTui() {
803
873
  const [{ default: React }, { render }, { Router }] = await Promise.all([
804
874
  import("react"),
805
875
  import("ink"),
806
- import("./router-7MRY24Y5.js")
876
+ import("./router-LLZ2L6WM.js")
807
877
  ]);
808
878
  try {
809
879
  await render(React.createElement(Router), { alternateScreen: false }).waitUntilExit();
810
880
  } finally {
811
- const { closeTuiWebServer } = await import("./tui-launch-Y5YXPUHS.js");
881
+ const { closeTuiWebServer } = await import("./tui-launch-Z6RYMGNH.js");
812
882
  await closeTuiWebServer();
813
883
  }
814
884
  process.exit(0);
@@ -835,6 +905,10 @@ function runCli() {
835
905
  process.exit(1);
836
906
  }
837
907
  }
908
+ if (!process.stdout.isTTY) {
909
+ process.stderr.write('reevesagents requires an interactive terminal. Run it in a terminal, or use a subcommand like "reevesagents doctor".\n');
910
+ process.exit(1);
911
+ }
838
912
  process.on("SIGTERM", () => process.exit(0));
839
913
  if (process.stdout.isTTY) process.stdout.write("\x1B[2J\x1B[H");
840
914
  renderTui().catch((err) => {
@@ -857,6 +931,7 @@ function isEntrypoint() {
857
931
  }
858
932
  if (isEntrypoint()) runCli();
859
933
  export {
860
- program
934
+ program,
935
+ tuiNewWindowArgs
861
936
  };
862
937
  //# sourceMappingURL=cli.js.map
package/dist/index.d.ts CHANGED
@@ -112,6 +112,7 @@ interface GlobalConfig {
112
112
  max_depth: number;
113
113
  max_agents: number;
114
114
  ready_delay_ms: number;
115
+ max_lifetime_ms: number;
115
116
  default_permissions: Permissions;
116
117
  language: LanguageCode;
117
118
  }
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  modelDisplayName,
7
7
  modelSourceForProvider,
8
8
  modelValuesForProvider
9
- } from "./chunk-LZMMFJYG.js";
9
+ } from "./chunk-KHBI6CRH.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-LKJSQLX2.js";
42
+ } from "./chunk-S2NWTREO.js";
43
43
  import "./chunk-D24DQQ6V.js";
44
44
  export {
45
45
  BIN,
@@ -2,20 +2,23 @@
2
2
  import {
3
3
  buildOnboardingState,
4
4
  readTuiOpenToken
5
- } from "./chunk-OHEIERAD.js";
5
+ } from "./chunk-JZYM3JJE.js";
6
+ import {
7
+ sweepAgentsThrottled
8
+ } from "./chunk-36AVBLVK.js";
6
9
  import {
7
10
  translate,
8
11
  translatePhrase
9
- } from "./chunk-BWJKK6LM.js";
12
+ } from "./chunk-2JHA6YK3.js";
10
13
  import {
11
14
  modelDisplayName,
12
15
  modelValuesForProvider
13
- } from "./chunk-LZMMFJYG.js";
16
+ } from "./chunk-KHBI6CRH.js";
14
17
  import {
15
18
  REEVESAGENTS_VERSION,
16
19
  listRunApprovals,
17
20
  resolveRunApproval
18
- } from "./chunk-6RPG22BH.js";
21
+ } from "./chunk-23XREWJP.js";
19
22
  import {
20
23
  CONFIG_FIELDS,
21
24
  DEFAULT_LANGUAGE,
@@ -70,11 +73,11 @@ import {
70
73
  startRunFromPreset,
71
74
  stateRoot,
72
75
  stopRun
73
- } from "./chunk-LKJSQLX2.js";
76
+ } from "./chunk-S2NWTREO.js";
74
77
  import "./chunk-D24DQQ6V.js";
75
78
  import {
76
79
  startWebFromTui
77
- } from "./chunk-HL5MTR5M.js";
80
+ } from "./chunk-S5J4E3QZ.js";
78
81
 
79
82
  // src/tui/router.tsx
80
83
  import { createContext as createContext6, useContext as useContext6, useState as useState37, useCallback as useCallback5, useEffect as useEffect17, useRef as useRef4 } from "react";
@@ -1139,6 +1142,7 @@ function Runs() {
1139
1142
  const [selectedIdx, setSelectedIdx] = useState8(0);
1140
1143
  const [runScroll, setRunScroll] = useState8(0);
1141
1144
  function refresh() {
1145
+ sweepAgentsThrottled();
1142
1146
  autoCleanupRuns();
1143
1147
  const next = listRuns();
1144
1148
  setRuns((prev) => {
@@ -5318,18 +5322,20 @@ function AgentControl() {
5318
5322
  }
5319
5323
  function toggleHost(host) {
5320
5324
  if (host.manual || !host.installed) return;
5321
- const res = host.attached ? detach(host.key) : attach(host.key);
5322
- setResult(res);
5325
+ const wasAttached = host.attached;
5326
+ const res = wasAttached ? detach(host.key) : attach(host.key);
5327
+ setResult(!wasAttached && res.ok ? { ...res, message: `${res.message} \u2014 ${t("agentControl.restartHint")}` } : res);
5323
5328
  setRefreshKey((k) => k + 1);
5324
5329
  }
5325
5330
  function runAttachAll() {
5326
5331
  const results = attachAll();
5327
5332
  const ok = results.filter((r) => r.ok).length;
5333
+ const toast = t("agentControl.attachAllToast", { ok, total: results.length });
5328
5334
  setResult({
5329
5335
  key: "all",
5330
5336
  label: t("agentControl.attachAll"),
5331
5337
  ok: results.every((r) => r.ok),
5332
- message: t("agentControl.attachAllToast", { ok, total: results.length })
5338
+ message: ok > 0 ? `${toast} \u2014 ${t("agentControl.restartHint")}` : toast
5333
5339
  });
5334
5340
  setRefreshKey((k) => k + 1);
5335
5341
  }
@@ -6566,4 +6572,4 @@ export {
6566
6572
  nextHistoryOnReset,
6567
6573
  useRouter
6568
6574
  };
6569
- //# sourceMappingURL=router-7MRY24Y5.js.map
6575
+ //# sourceMappingURL=router-LLZ2L6WM.js.map