reevesagents 1.4.0 → 1.6.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.
@@ -0,0 +1,136 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/core/skills.ts
4
+ import { mkdirSync, writeFileSync, readFileSync, rmSync, existsSync } from "fs";
5
+ import { homedir } from "os";
6
+ import { join } from "path";
7
+ var SKILL_NAME = "reevesagents";
8
+ var REEVESAGENTS_SKILL = `---
9
+ name: reevesagents
10
+ description: Drive a team of other AI coding CLIs from the current session through the reevesagents MCP server. Use when the user asks to delegate work to another model, run several agents in parallel, or orchestrate a multi-agent team: spawn Claude Code, Codex, Kimi, Qwen, OpenCode and other installed CLIs each in its own tmux window, send them prompts, read their output, and stop or reap them. Assumes the reevesagents MCP server is attached to this CLI (run: reevesagents attach).
11
+ ---
12
+
13
+ # reevesagents: drive a team of AI CLIs
14
+
15
+ reevesagents lets you, from this session, run and steer other AI coding CLIs. Each
16
+ agent is a real CLI in its own tmux window on this machine. reevesagents never
17
+ proxies model traffic; every CLI uses its own login.
18
+
19
+ The tools below come from the reevesagents MCP server. Depending on this host they
20
+ may appear as bare names (\`spawn\`), as \`mcp__reevesagents__spawn\` (Claude Code,
21
+ Kimi), or as \`reevesagents_spawn\` (OpenCode). Use whichever form your tool list
22
+ shows; the bare names are used here.
23
+
24
+ ## When to use
25
+ - The user wants to hand a slice of work to another model and keep working.
26
+ - Several independent tasks can run in parallel across different CLIs.
27
+ - The user asks for a team (a lead plus workers) or to orchestrate multiple agents.
28
+
29
+ ## Drive loop
30
+ 1. list_providers - the CLIs installed here and their models. Spawn only these.
31
+ 2. spawn { provider, task } - start an agent; returns agent_id and run_id. Omit
32
+ run_id to keep agents in one run (a team); pass run_id to add to an existing run.
33
+ Set permissions:"skip" for an autonomous worker when no human will approve prompts.
34
+ 3. read { agent_id } - the agent's recent output. spawn is fire-and-forget: it
35
+ returns ids, not answers, so poll read until the agent replies or its output
36
+ settles. A fresh agent may sit at a login or trust prompt; read first.
37
+ 4. send_text { agent_id, text } then send_key { agent_id, key: "enter" } - type a
38
+ message, then submit it. send_text alone does NOT submit.
39
+ 5. kill { agent_id } or stop { run_id } when done.
40
+
41
+ ## Worked example: hand a task to Codex, then steer it
42
+ 1. list_providers confirm "codex" is installed
43
+ 2. spawn { "provider": "codex", "task": "summarize README.md" } -> { agent_id, run_id }
44
+ 3. read { "agent_id": "..." } poll until it answers
45
+ 4. send_text { "agent_id": "...", "text": "now write tests for it" }
46
+ send_key { "agent_id": "...", "key": "enter" }
47
+ 5. kill { "agent_id": "..." } stop it when finished
48
+
49
+ ## Spawn a team
50
+ Spawn several agents with run_id omitted so they land in one run, then poll each:
51
+ spawn { "provider": "cc", "task": "lead: coordinate the others", "permissions": "skip" }
52
+ spawn { "provider": "codex", "task": "worker: the API slice", "permissions": "skip" }
53
+ spawn { "provider": "kimi", "task": "worker: the docs" }
54
+
55
+ ## Housekeeping
56
+ - list shows every live run and agent; list_history shows ended ones.
57
+ - reap ends zombie agents: any whose tmux window died, plus any older than
58
+ max_lifetime_ms. reevesagents also reaps in the background, but call reap to force
59
+ an immediate sweep.
60
+ - get_config / set_config read and change global settings, including the per-run
61
+ agent cap (max_agents) and the auto-reap age (max_lifetime_ms; 0 disables it).
62
+ - request_approval / resolve_approval gate a risky action behind a human or another
63
+ agent before it runs.
64
+
65
+ ## Notes
66
+ - send_text types but does not submit; always follow it with send_key enter.
67
+ - permissions:"skip" runs a worker autonomously; use it when no human will approve.
68
+ - Spawned agents are plain CLIs and cannot spawn others unless reevesagents is also
69
+ attached to them.
70
+ - If a spawn is rejected because a run is at the agent cap, raise max_agents with
71
+ set_config.
72
+ `;
73
+ function skillsHome() {
74
+ return process.env.REEVES_HOME || homedir();
75
+ }
76
+ function skillTargets() {
77
+ const home = skillsHome();
78
+ return [
79
+ {
80
+ key: "claude",
81
+ label: "Claude Code, OpenCode",
82
+ dir: join(home, ".claude", "skills", SKILL_NAME),
83
+ file: join(home, ".claude", "skills", SKILL_NAME, "SKILL.md")
84
+ },
85
+ {
86
+ key: "agents",
87
+ label: "Codex, Kimi, OpenCode",
88
+ dir: join(home, ".agents", "skills", SKILL_NAME),
89
+ file: join(home, ".agents", "skills", SKILL_NAME, "SKILL.md")
90
+ }
91
+ ];
92
+ }
93
+ function installSkills() {
94
+ return skillTargets().map((target) => {
95
+ try {
96
+ mkdirSync(target.dir, { recursive: true });
97
+ writeFileSync(target.file, REEVESAGENTS_SKILL, "utf-8");
98
+ return { key: target.key, label: target.label, file: target.file, ok: true, message: "installed" };
99
+ } catch (err) {
100
+ return { key: target.key, label: target.label, file: target.file, ok: false, message: err instanceof Error ? err.message : String(err) };
101
+ }
102
+ });
103
+ }
104
+ function skillsStatus() {
105
+ return skillTargets().map((target) => {
106
+ let present = false;
107
+ let current = false;
108
+ try {
109
+ const content = readFileSync(target.file, "utf-8");
110
+ present = true;
111
+ current = content === REEVESAGENTS_SKILL;
112
+ } catch {
113
+ }
114
+ return { key: target.key, label: target.label, file: target.file, present, current };
115
+ });
116
+ }
117
+ function removeSkills() {
118
+ return skillTargets().map((target) => {
119
+ try {
120
+ if (!existsSync(target.file)) {
121
+ return { key: target.key, label: target.label, file: target.file, ok: true, message: "not installed" };
122
+ }
123
+ rmSync(target.dir, { recursive: true, force: true });
124
+ return { key: target.key, label: target.label, file: target.file, ok: true, message: "removed" };
125
+ } catch (err) {
126
+ return { key: target.key, label: target.label, file: target.file, ok: false, message: err instanceof Error ? err.message : String(err) };
127
+ }
128
+ });
129
+ }
130
+
131
+ export {
132
+ installSkills,
133
+ skillsStatus,
134
+ removeSkills
135
+ };
136
+ //# sourceMappingURL=chunk-JDJW3WST.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-L5DTU6U2.js");
31
+ const { startWebServer } = await import("./server-Y5EO5QYV.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-33EB4RUP.js.map
51
+ //# sourceMappingURL=chunk-S4JLBMK4.js.map
@@ -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
  }
@@ -987,8 +998,209 @@ function autoCleanupRuns(options = {}) {
987
998
  return { removed, archived };
988
999
  }
989
1000
 
990
- // src/core/doctor.ts
1001
+ // src/mcp/installer.ts
991
1002
  import { execFileSync as execFileSync2 } from "child_process";
1003
+ import { realpathSync } from "fs";
1004
+ var SERVER_NAME = "reevesagents";
1005
+ var SERVER_BIN = "reevesagents";
1006
+ var SERVER_ARG = "mcp";
1007
+ var MGMT_TIMEOUT_MS = 15e3;
1008
+ var STATUS_TIMEOUT_MS = 5e3;
1009
+ var VERIFY_TIMEOUT_MS = 2e4;
1010
+ function resolveLaunchCmd(entry = process.argv[1]) {
1011
+ if (entry) {
1012
+ try {
1013
+ const real = realpathSync(entry);
1014
+ if (/\.[cm]?js$/.test(real)) return { command: process.execPath, args: [real, SERVER_ARG] };
1015
+ } catch {
1016
+ }
1017
+ }
1018
+ try {
1019
+ const abs = execFileSync2("which", [SERVER_BIN], { encoding: "utf8" }).trim();
1020
+ if (abs) return { command: abs, args: [SERVER_ARG] };
1021
+ } catch {
1022
+ }
1023
+ return { command: SERVER_BIN, args: [SERVER_ARG] };
1024
+ }
1025
+ var HOSTS = [
1026
+ {
1027
+ provider: "cc",
1028
+ // Claude Code defaults a new server to `local` (this directory only); pin
1029
+ // `user` so one attach covers every project on the machine.
1030
+ add: (cmd) => ["mcp", "add", SERVER_NAME, "-s", "user", "--", cmd.command, ...cmd.args],
1031
+ remove: ["mcp", "remove", SERVER_NAME],
1032
+ list: ["mcp", "list"]
1033
+ },
1034
+ {
1035
+ provider: "codex",
1036
+ add: (cmd) => ["mcp", "add", SERVER_NAME, "--", cmd.command, ...cmd.args],
1037
+ remove: ["mcp", "remove", SERVER_NAME],
1038
+ list: ["mcp", "list"]
1039
+ },
1040
+ {
1041
+ provider: "kimi",
1042
+ add: (cmd) => ["mcp", "add", SERVER_NAME, "--", cmd.command, ...cmd.args],
1043
+ remove: ["mcp", "remove", SERVER_NAME],
1044
+ list: ["mcp", "list"]
1045
+ },
1046
+ {
1047
+ provider: "qwen",
1048
+ // qwen (a gemini-cli fork) takes `<commandOrUrl> [args...]` with no `--`
1049
+ // separator, and already defaults its scope to `user`.
1050
+ add: (cmd) => ["mcp", "add", SERVER_NAME, cmd.command, ...cmd.args],
1051
+ remove: ["mcp", "remove", SERVER_NAME],
1052
+ list: ["mcp", "list"]
1053
+ },
1054
+ {
1055
+ provider: "hermes",
1056
+ // hermes takes --command and a variadic --args, so the entry path and `mcp`
1057
+ // both ride on one --args.
1058
+ add: (cmd) => ["mcp", "add", SERVER_NAME, "--command", cmd.command, "--args", ...cmd.args],
1059
+ remove: ["mcp", "remove", SERVER_NAME],
1060
+ list: ["mcp", "list"]
1061
+ },
1062
+ {
1063
+ // opencode's `mcp add` prompts interactively and has no remove subcommand,
1064
+ // so we cannot attach or detach it without a prompt. Report it as manual.
1065
+ provider: "opencode",
1066
+ list: ["mcp", "list"]
1067
+ }
1068
+ ];
1069
+ function hostBin(host) {
1070
+ return PROVIDER_REGISTRY[host.provider].bin;
1071
+ }
1072
+ function hostLabel(host) {
1073
+ return PROVIDER_REGISTRY[host.provider].displayName;
1074
+ }
1075
+ function isInstalled(bin) {
1076
+ try {
1077
+ execFileSync2("which", [bin], { stdio: "pipe" });
1078
+ return true;
1079
+ } catch {
1080
+ return false;
1081
+ }
1082
+ }
1083
+ function isAttached(host) {
1084
+ try {
1085
+ const out = execFileSync2(hostBin(host), host.list, {
1086
+ encoding: "utf8",
1087
+ timeout: STATUS_TIMEOUT_MS,
1088
+ stdio: ["ignore", "pipe", "pipe"]
1089
+ });
1090
+ return /reevesagents(?![-\w])/i.test(out);
1091
+ } catch {
1092
+ return false;
1093
+ }
1094
+ }
1095
+ function runHostCommand(host, args) {
1096
+ execFileSync2(hostBin(host), args, {
1097
+ encoding: "utf8",
1098
+ timeout: MGMT_TIMEOUT_MS,
1099
+ stdio: ["ignore", "pipe", "pipe"]
1100
+ });
1101
+ }
1102
+ function cliError(err) {
1103
+ const stderr = err && typeof err === "object" ? err.stderr : void 0;
1104
+ const text = typeof stderr === "string" ? stderr.trim() : Buffer.isBuffer(stderr) ? stderr.toString("utf8").trim() : "";
1105
+ return text || (err instanceof Error ? err.message : String(err));
1106
+ }
1107
+ function findHost(key) {
1108
+ const host = HOSTS.find((item) => item.provider === key);
1109
+ if (!host) throw new Error(`Unknown CLI: ${key}`);
1110
+ return host;
1111
+ }
1112
+ function hostStatus() {
1113
+ return HOSTS.map((host) => {
1114
+ const installed = isInstalled(hostBin(host));
1115
+ return {
1116
+ key: host.provider,
1117
+ bin: hostBin(host),
1118
+ label: hostLabel(host),
1119
+ installed,
1120
+ attached: installed && isAttached(host),
1121
+ manual: host.add === void 0
1122
+ };
1123
+ });
1124
+ }
1125
+ function attach(key, force = false) {
1126
+ const host = findHost(key);
1127
+ const label = hostLabel(host);
1128
+ if (!host.add) {
1129
+ return {
1130
+ key,
1131
+ label,
1132
+ ok: false,
1133
+ message: `${label} must be added manually: in OpenCode, add a stdio MCP server named "${SERVER_NAME}" that runs reevesagents mcp`
1134
+ };
1135
+ }
1136
+ if (!isInstalled(hostBin(host))) {
1137
+ return { key, label, ok: false, message: `${hostBin(host)} is not installed` };
1138
+ }
1139
+ try {
1140
+ if (force && host.remove) {
1141
+ try {
1142
+ runHostCommand(host, host.remove);
1143
+ } catch {
1144
+ }
1145
+ }
1146
+ runHostCommand(host, host.add(resolveLaunchCmd()));
1147
+ return { key, label, ok: true, message: force ? "reattached" : "attached" };
1148
+ } catch (err) {
1149
+ return { key, label, ok: false, message: cliError(err) };
1150
+ }
1151
+ }
1152
+ function detach(key) {
1153
+ const host = findHost(key);
1154
+ const label = hostLabel(host);
1155
+ if (!host.remove) {
1156
+ return { key, label, ok: false, message: `${label} must be removed manually` };
1157
+ }
1158
+ if (!isInstalled(hostBin(host))) {
1159
+ return { key, label, ok: false, message: `${hostBin(host)} is not installed` };
1160
+ }
1161
+ try {
1162
+ runHostCommand(host, host.remove);
1163
+ return { key, label, ok: true, message: "detached" };
1164
+ } catch (err) {
1165
+ return { key, label, ok: false, message: cliError(err) };
1166
+ }
1167
+ }
1168
+ function attachAll(force = false) {
1169
+ return HOSTS.filter((host) => host.add && isInstalled(hostBin(host))).map((host) => {
1170
+ if (!force && isAttached(host)) {
1171
+ return { key: host.provider, label: hostLabel(host), ok: true, message: "already attached" };
1172
+ }
1173
+ return attach(host.provider, force);
1174
+ });
1175
+ }
1176
+ async function verifyServerLaunch(cmd = resolveLaunchCmd()) {
1177
+ const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
1178
+ const { StdioClientTransport } = await import("@modelcontextprotocol/sdk/client/stdio.js");
1179
+ const client = new Client({ name: "reevesagents-verify", version: "1" }, { capabilities: {} });
1180
+ const transport = new StdioClientTransport({ command: cmd.command, args: cmd.args, stderr: "ignore" });
1181
+ let timer;
1182
+ const timeout = new Promise((_, reject) => {
1183
+ timer = setTimeout(() => reject(new Error("timed out starting the MCP server")), VERIFY_TIMEOUT_MS);
1184
+ timer.unref?.();
1185
+ });
1186
+ try {
1187
+ await Promise.race([client.connect(transport), timeout]);
1188
+ const listed = await Promise.race([client.listTools(), timeout]);
1189
+ const toolCount = Array.isArray(listed.tools) ? listed.tools.length : 0;
1190
+ return { ok: true, detail: `server started, ${toolCount} tools`, toolCount };
1191
+ } catch (err) {
1192
+ return { ok: false, detail: err instanceof Error ? err.message : String(err) };
1193
+ } finally {
1194
+ if (timer) clearTimeout(timer);
1195
+ try {
1196
+ await client.close();
1197
+ } catch {
1198
+ }
1199
+ }
1200
+ }
1201
+
1202
+ // src/core/doctor.ts
1203
+ import { execFileSync as execFileSync3 } from "child_process";
992
1204
  import { accessSync, constants, existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
993
1205
  import { createRequire } from "module";
994
1206
  import { join as join2 } from "path";
@@ -1051,7 +1263,7 @@ function platformSupportCheck(platform = process.platform, env = process.env, pr
1051
1263
  }
1052
1264
  function checkTmux() {
1053
1265
  try {
1054
- const versionStr = execFileSync2("tmux", ["-V"], { encoding: "utf8" }).trim();
1266
+ const versionStr = execFileSync3("tmux", ["-V"], { encoding: "utf8" }).trim();
1055
1267
  const match = versionStr.match(/tmux (\d+)\.(\d+)/);
1056
1268
  if (!match) return { name: "tmux", status: "warn", detail: `unexpected version format: ${versionStr}` };
1057
1269
  const major = parseInt(match[1] ?? "0", 10);
@@ -1125,6 +1337,26 @@ function checkRunsState() {
1125
1337
  };
1126
1338
  }
1127
1339
  }
1340
+ function checkMcpServerCommand() {
1341
+ const cmd = resolveLaunchCmd();
1342
+ if (cmd.command === "reevesagents") {
1343
+ return {
1344
+ name: "mcp server",
1345
+ status: "warn",
1346
+ detail: "no absolute launcher resolved; attached host CLIs will fall back to their own PATH"
1347
+ };
1348
+ }
1349
+ try {
1350
+ accessSync(cmd.command, constants.X_OK);
1351
+ return { name: "mcp server", status: "ok", detail: `${cmd.command} ${cmd.args.join(" ")}` };
1352
+ } catch {
1353
+ return {
1354
+ name: "mcp server",
1355
+ status: "warn",
1356
+ detail: `${cmd.command} is not executable; re-run reevesagents attach after reinstalling`
1357
+ };
1358
+ }
1359
+ }
1128
1360
  function runDoctor() {
1129
1361
  return {
1130
1362
  checks: [
@@ -1137,7 +1369,8 @@ function runDoctor() {
1137
1369
  checkPathAccess("runs dir", runsDir()),
1138
1370
  checkPathAccess("presets dir", join2(stateRoot(), "presets")),
1139
1371
  checkRunsState(),
1140
- checkWebExtras()
1372
+ checkWebExtras(),
1373
+ checkMcpServerCommand()
1141
1374
  ]
1142
1375
  };
1143
1376
  }
@@ -1173,8 +1406,9 @@ var DEFAULT_GLOBAL = {
1173
1406
  peek_interval_ms: 5e3,
1174
1407
  peek_lines: 10,
1175
1408
  max_depth: 5,
1176
- max_agents: 10,
1409
+ max_agents: 100,
1177
1410
  ready_delay_ms: 5e3,
1411
+ max_lifetime_ms: 0,
1178
1412
  default_permissions: "ask",
1179
1413
  language: DEFAULT_LANGUAGE
1180
1414
  };
@@ -1211,6 +1445,7 @@ function mergeDefaults(raw) {
1211
1445
  if (typeof g.max_depth === "number" && g.max_depth > 0) merged.global.max_depth = g.max_depth;
1212
1446
  if (typeof g.max_agents === "number" && g.max_agents > 0) merged.global.max_agents = g.max_agents;
1213
1447
  if (typeof g.ready_delay_ms === "number" && g.ready_delay_ms >= 0) merged.global.ready_delay_ms = g.ready_delay_ms;
1448
+ if (typeof g.max_lifetime_ms === "number" && g.max_lifetime_ms >= 0) merged.global.max_lifetime_ms = g.max_lifetime_ms;
1214
1449
  if (g.default_permissions === "skip" || g.default_permissions === "ask") merged.global.default_permissions = g.default_permissions;
1215
1450
  if (isLanguageCode(g.language)) merged.global.language = g.language;
1216
1451
  }
@@ -1243,6 +1478,7 @@ var CONFIG_FIELDS = [
1243
1478
  { key: "max_depth", kind: "posint", label: "max depth" },
1244
1479
  { key: "max_agents", kind: "posint", label: "max agents" },
1245
1480
  { key: "ready_delay_ms", kind: "nonneg-int", label: "ready delay (ms)" },
1481
+ { key: "max_lifetime_ms", kind: "nonneg-int", label: "max agent lifetime (ms)" },
1246
1482
  { key: "default_permissions", kind: "permissions", label: "default permissions" },
1247
1483
  { key: "language", kind: "language", label: "language" }
1248
1484
  ];
@@ -1409,7 +1645,7 @@ function savePresetFromRun(runId, name, description = "") {
1409
1645
  }
1410
1646
 
1411
1647
  // src/core/runtime.ts
1412
- import { execFileSync as execFileSync3 } from "child_process";
1648
+ import { execFileSync as execFileSync4 } from "child_process";
1413
1649
  import { randomUUID as randomUUID2 } from "crypto";
1414
1650
  import stripAnsi from "strip-ansi";
1415
1651
 
@@ -1448,7 +1684,7 @@ var ALLOWED_KEYS = [
1448
1684
  ];
1449
1685
  var realDriver = {
1450
1686
  tmux(args, input) {
1451
- return execFileSync3("tmux", args, {
1687
+ return execFileSync4("tmux", args, {
1452
1688
  encoding: "utf8",
1453
1689
  input,
1454
1690
  stdio: input === void 0 ? ["ignore", "pipe", "pipe"] : ["pipe", "pipe", "pipe"]
@@ -1987,7 +2223,6 @@ function openTmuxTarget(id, options = {}) {
1987
2223
  }
1988
2224
 
1989
2225
  export {
1990
- PROVIDER_REGISTRY,
1991
2226
  PROVIDER_DEFS,
1992
2227
  coerceExtraArgs,
1993
2228
  BIN,
@@ -2010,6 +2245,7 @@ export {
2010
2245
  runsDir,
2011
2246
  runDir,
2012
2247
  nowIso,
2248
+ nowMs,
2013
2249
  withRunsLock,
2014
2250
  readRun,
2015
2251
  listRuns,
@@ -2022,8 +2258,18 @@ export {
2022
2258
  archiveAndRemoveRun,
2023
2259
  listAgents,
2024
2260
  findAgent,
2261
+ defaultTmuxAvailable,
2262
+ defaultTmuxTargetExists,
2025
2263
  runHasLiveTmuxTarget,
2026
2264
  autoCleanupRuns,
2265
+ resolveLaunchCmd,
2266
+ hostStatus,
2267
+ attach,
2268
+ detach,
2269
+ attachAll,
2270
+ verifyServerLaunch,
2271
+ nodeVersionCheck,
2272
+ checkTmux,
2027
2273
  runDoctor,
2028
2274
  LANGUAGE_OPTIONS,
2029
2275
  DEFAULT_LANGUAGE,
@@ -2059,4 +2305,4 @@ export {
2059
2305
  stopRun,
2060
2306
  openTmuxTarget
2061
2307
  };
2062
- //# sourceMappingURL=chunk-KL5YFLQF.js.map
2308
+ //# sourceMappingURL=chunk-T7SPF4ZP.js.map