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.
- package/CHANGELOG.md +29 -0
- package/README.md +21 -6
- package/dist/chunk-7YW57CWK.js +55 -0
- package/dist/chunk-ICFJOMFZ.js +66 -0
- package/dist/{chunk-BELIYZTN.js → chunk-J2DD52HJ.js} +271 -2
- package/dist/chunk-JDJW3WST.js +136 -0
- package/dist/{chunk-33EB4RUP.js → chunk-S4JLBMK4.js} +2 -2
- package/dist/{chunk-KL5YFLQF.js → chunk-T7SPF4ZP.js} +272 -26
- package/dist/{chunk-EX5LH2KW.js → chunk-VYLFTVIQ.js} +2 -148
- package/dist/{chunk-NJWOKVBZ.js → chunk-WDJ6RTES.js} +2 -2
- package/dist/cli.js +167 -17
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -2
- package/dist/{router-MGXDADKM.js → router-L5IRXRCH.js} +315 -208
- package/dist/{server-KHY23W6D.js → server-AP4NN6RT.js} +118 -29
- package/dist/{server-L5DTU6U2.js → server-Y5EO5QYV.js} +19 -20
- package/dist/{tui-launch-2UWK76V3.js → tui-launch-AGR3JF4I.js} +2 -2
- package/dist/web/app.css +10 -0
- package/dist/web/app.js +57 -3
- package/dist/web/index.html +19 -0
- package/package.json +4 -2
- package/skills/reevesagents/SKILL.md +64 -0
- package/dist/chunk-PEOJCUQI.js +0 -29
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
PROVIDER_REGISTRY,
|
|
4
3
|
findAgent,
|
|
5
4
|
listRuns,
|
|
6
5
|
nowIso,
|
|
7
6
|
redactSecrets,
|
|
8
7
|
runDir,
|
|
9
8
|
withRunsLock
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-T7SPF4ZP.js";
|
|
11
10
|
|
|
12
11
|
// src/core/approvals.ts
|
|
13
12
|
import {
|
|
@@ -152,147 +151,6 @@ function resolveRunApproval(approvalId, decision, note = "") {
|
|
|
152
151
|
});
|
|
153
152
|
}
|
|
154
153
|
|
|
155
|
-
// src/mcp/installer.ts
|
|
156
|
-
import { execFileSync } from "child_process";
|
|
157
|
-
var SERVER_NAME = "reevesagents";
|
|
158
|
-
var SERVER_BIN = "reevesagents";
|
|
159
|
-
var SERVER_ARG = "mcp";
|
|
160
|
-
var MGMT_TIMEOUT_MS = 15e3;
|
|
161
|
-
var HOSTS = [
|
|
162
|
-
{
|
|
163
|
-
provider: "cc",
|
|
164
|
-
add: ["mcp", "add", SERVER_NAME, "--", SERVER_BIN, SERVER_ARG],
|
|
165
|
-
remove: ["mcp", "remove", SERVER_NAME],
|
|
166
|
-
list: ["mcp", "list"]
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
provider: "codex",
|
|
170
|
-
add: ["mcp", "add", SERVER_NAME, "--", SERVER_BIN, SERVER_ARG],
|
|
171
|
-
remove: ["mcp", "remove", SERVER_NAME],
|
|
172
|
-
list: ["mcp", "list"]
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
provider: "kimi",
|
|
176
|
-
add: ["mcp", "add", SERVER_NAME, "--", SERVER_BIN, SERVER_ARG],
|
|
177
|
-
remove: ["mcp", "remove", SERVER_NAME],
|
|
178
|
-
list: ["mcp", "list"]
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
provider: "qwen",
|
|
182
|
-
add: ["mcp", "add", SERVER_NAME, SERVER_BIN, SERVER_ARG],
|
|
183
|
-
remove: ["mcp", "remove", SERVER_NAME],
|
|
184
|
-
list: ["mcp", "list"]
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
provider: "hermes",
|
|
188
|
-
add: ["mcp", "add", SERVER_NAME, "--command", SERVER_BIN, "--args", SERVER_ARG],
|
|
189
|
-
remove: ["mcp", "remove", SERVER_NAME],
|
|
190
|
-
list: ["mcp", "list"]
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
// opencode's `mcp add` prompts interactively and has no remove subcommand,
|
|
194
|
-
// so we cannot attach or detach it without a prompt. Report it as manual.
|
|
195
|
-
provider: "opencode",
|
|
196
|
-
list: ["mcp", "list"]
|
|
197
|
-
}
|
|
198
|
-
];
|
|
199
|
-
function hostBin(host) {
|
|
200
|
-
return PROVIDER_REGISTRY[host.provider].bin;
|
|
201
|
-
}
|
|
202
|
-
function hostLabel(host) {
|
|
203
|
-
return PROVIDER_REGISTRY[host.provider].displayName;
|
|
204
|
-
}
|
|
205
|
-
function isInstalled(bin) {
|
|
206
|
-
try {
|
|
207
|
-
execFileSync("which", [bin], { stdio: "pipe" });
|
|
208
|
-
return true;
|
|
209
|
-
} catch {
|
|
210
|
-
return false;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
function isAttached(host) {
|
|
214
|
-
try {
|
|
215
|
-
const out = execFileSync(hostBin(host), host.list, {
|
|
216
|
-
encoding: "utf8",
|
|
217
|
-
timeout: MGMT_TIMEOUT_MS,
|
|
218
|
-
stdio: ["ignore", "pipe", "pipe"]
|
|
219
|
-
});
|
|
220
|
-
return /reevesagents(?![-\w])/i.test(out);
|
|
221
|
-
} catch {
|
|
222
|
-
return false;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
function runHostCommand(host, args) {
|
|
226
|
-
execFileSync(hostBin(host), args, {
|
|
227
|
-
encoding: "utf8",
|
|
228
|
-
timeout: MGMT_TIMEOUT_MS,
|
|
229
|
-
stdio: ["ignore", "pipe", "pipe"]
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
function cliError(err) {
|
|
233
|
-
const stderr = err && typeof err === "object" ? err.stderr : void 0;
|
|
234
|
-
const text = typeof stderr === "string" ? stderr.trim() : Buffer.isBuffer(stderr) ? stderr.toString("utf8").trim() : "";
|
|
235
|
-
return text || (err instanceof Error ? err.message : String(err));
|
|
236
|
-
}
|
|
237
|
-
function findHost(key) {
|
|
238
|
-
const host = HOSTS.find((item) => item.provider === key);
|
|
239
|
-
if (!host) throw new Error(`Unknown CLI: ${key}`);
|
|
240
|
-
return host;
|
|
241
|
-
}
|
|
242
|
-
function hostStatus() {
|
|
243
|
-
return HOSTS.map((host) => {
|
|
244
|
-
const installed = isInstalled(hostBin(host));
|
|
245
|
-
return {
|
|
246
|
-
key: host.provider,
|
|
247
|
-
bin: hostBin(host),
|
|
248
|
-
label: hostLabel(host),
|
|
249
|
-
installed,
|
|
250
|
-
attached: installed && isAttached(host),
|
|
251
|
-
manual: host.add === void 0
|
|
252
|
-
};
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
function attach(key) {
|
|
256
|
-
const host = findHost(key);
|
|
257
|
-
const label = hostLabel(host);
|
|
258
|
-
if (!host.add) {
|
|
259
|
-
return { key, label, ok: false, message: `${label} must be added manually` };
|
|
260
|
-
}
|
|
261
|
-
if (!isInstalled(hostBin(host))) {
|
|
262
|
-
return { key, label, ok: false, message: `${hostBin(host)} is not installed` };
|
|
263
|
-
}
|
|
264
|
-
try {
|
|
265
|
-
runHostCommand(host, host.add);
|
|
266
|
-
return { key, label, ok: true, message: "attached" };
|
|
267
|
-
} catch (err) {
|
|
268
|
-
return { key, label, ok: false, message: cliError(err) };
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
function detach(key) {
|
|
272
|
-
const host = findHost(key);
|
|
273
|
-
const label = hostLabel(host);
|
|
274
|
-
if (!host.remove) {
|
|
275
|
-
return { key, label, ok: false, message: `${label} must be removed manually` };
|
|
276
|
-
}
|
|
277
|
-
if (!isInstalled(hostBin(host))) {
|
|
278
|
-
return { key, label, ok: false, message: `${hostBin(host)} is not installed` };
|
|
279
|
-
}
|
|
280
|
-
try {
|
|
281
|
-
runHostCommand(host, host.remove);
|
|
282
|
-
return { key, label, ok: true, message: "detached" };
|
|
283
|
-
} catch (err) {
|
|
284
|
-
return { key, label, ok: false, message: cliError(err) };
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
function attachAll() {
|
|
288
|
-
return HOSTS.filter((host) => host.add && isInstalled(hostBin(host))).map((host) => {
|
|
289
|
-
if (isAttached(host)) {
|
|
290
|
-
return { key: host.provider, label: hostLabel(host), ok: true, message: "already attached" };
|
|
291
|
-
}
|
|
292
|
-
return attach(host.provider);
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
|
|
296
154
|
// src/version.ts
|
|
297
155
|
import { readFileSync as readFileSync2 } from "fs";
|
|
298
156
|
import { URL } from "url";
|
|
@@ -308,10 +166,6 @@ export {
|
|
|
308
166
|
readRunApproval,
|
|
309
167
|
listRunApprovals,
|
|
310
168
|
resolveRunApproval,
|
|
311
|
-
hostStatus,
|
|
312
|
-
attach,
|
|
313
|
-
detach,
|
|
314
|
-
attachAll,
|
|
315
169
|
REEVESAGENTS_VERSION
|
|
316
170
|
};
|
|
317
|
-
//# sourceMappingURL=chunk-
|
|
171
|
+
//# sourceMappingURL=chunk-VYLFTVIQ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
PROVIDER_DEFS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-T7SPF4ZP.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-
|
|
30
|
+
//# sourceMappingURL=chunk-WDJ6RTES.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,31 +1,42 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
installSkills,
|
|
4
|
+
removeSkills,
|
|
5
|
+
skillsStatus
|
|
6
|
+
} from "./chunk-JDJW3WST.js";
|
|
7
|
+
import {
|
|
8
|
+
buildOnboardingState,
|
|
9
|
+
runOnboarding,
|
|
10
|
+
suggestedAgentPrompt,
|
|
3
11
|
writeTuiOpenToken
|
|
4
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ICFJOMFZ.js";
|
|
13
|
+
import {
|
|
14
|
+
sweepAgents
|
|
15
|
+
} from "./chunk-7YW57CWK.js";
|
|
5
16
|
import {
|
|
6
17
|
MODEL_CATALOG
|
|
7
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WDJ6RTES.js";
|
|
8
19
|
import {
|
|
9
20
|
REEVESAGENTS_VERSION,
|
|
10
|
-
attach,
|
|
11
|
-
attachAll,
|
|
12
|
-
detach,
|
|
13
|
-
hostStatus,
|
|
14
21
|
listRunApprovals,
|
|
15
22
|
resolveRunApproval
|
|
16
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VYLFTVIQ.js";
|
|
17
24
|
import {
|
|
18
25
|
ALLOWED_KEYS,
|
|
19
26
|
CONFIG_FIELDS,
|
|
20
27
|
PROVIDERS,
|
|
21
28
|
archiveAndRemoveRun,
|
|
29
|
+
attach,
|
|
30
|
+
attachAll,
|
|
22
31
|
autoCleanupRuns,
|
|
23
32
|
coerceExtraArgs,
|
|
24
33
|
computeRunStatus,
|
|
25
34
|
deleteAgent,
|
|
26
35
|
deletePreset,
|
|
27
36
|
deleteRunHistory,
|
|
37
|
+
detach,
|
|
28
38
|
detectAvailable,
|
|
39
|
+
hostStatus,
|
|
29
40
|
interrupt,
|
|
30
41
|
killAgent,
|
|
31
42
|
latestActiveRun,
|
|
@@ -49,8 +60,9 @@ import {
|
|
|
49
60
|
spawnWorker,
|
|
50
61
|
startRun,
|
|
51
62
|
startRunFromPreset,
|
|
52
|
-
stopRun
|
|
53
|
-
|
|
63
|
+
stopRun,
|
|
64
|
+
verifyServerLaunch
|
|
65
|
+
} from "./chunk-T7SPF4ZP.js";
|
|
54
66
|
import "./chunk-D24DQQ6V.js";
|
|
55
67
|
|
|
56
68
|
// src/cli.ts
|
|
@@ -231,6 +243,10 @@ function parseAgentSpec(spec) {
|
|
|
231
243
|
}
|
|
232
244
|
return { provider, nickname: nickname || void 0, model };
|
|
233
245
|
}
|
|
246
|
+
function defaultSpawnProvider() {
|
|
247
|
+
const available = detectAvailable();
|
|
248
|
+
return PROVIDERS.find((provider) => available[provider]) ?? "codex";
|
|
249
|
+
}
|
|
234
250
|
var EFFORT_LEVELS = ["default", "low", "medium", "high", "xhigh", "max"];
|
|
235
251
|
function parseAuthModeOpt(value) {
|
|
236
252
|
if (value === void 0) return void 0;
|
|
@@ -299,7 +315,7 @@ function spawnIntoRun(run, parsed, opts, available) {
|
|
|
299
315
|
}
|
|
300
316
|
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) => {
|
|
301
317
|
try {
|
|
302
|
-
const specs = agentSpecs.length > 0 ? agentSpecs : [
|
|
318
|
+
const specs = agentSpecs.length > 0 ? agentSpecs : [defaultSpawnProvider()];
|
|
303
319
|
const parsed = specs.map(parseAgentSpec);
|
|
304
320
|
const available = preflightAvailability(parsed.map((spec) => spec.provider));
|
|
305
321
|
const permissions = opts.skip ? "skip" : void 0;
|
|
@@ -404,6 +420,21 @@ program.command("runs").description("list runs").option("--json", "output JSON a
|
|
|
404
420
|
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}` : ""}`);
|
|
405
421
|
}
|
|
406
422
|
});
|
|
423
|
+
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) => {
|
|
424
|
+
const { reaped } = sweepAgents();
|
|
425
|
+
if (opts.json) {
|
|
426
|
+
console.log(JSON.stringify(reaped, null, 2));
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
if (reaped.length === 0) {
|
|
430
|
+
console.log("no zombie agents");
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
for (const r of reaped) {
|
|
434
|
+
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}`);
|
|
435
|
+
}
|
|
436
|
+
console.log(`reaped ${reaped.length} ${reaped.length === 1 ? "agent" : "agents"}`);
|
|
437
|
+
});
|
|
407
438
|
program.command("open <id>").description("open a run tmux tab set or an agent window").action((id) => {
|
|
408
439
|
openTarget(id);
|
|
409
440
|
});
|
|
@@ -552,6 +583,61 @@ program.command("deny <approval-id> [note]").description("deny a pending approva
|
|
|
552
583
|
process.exit(1);
|
|
553
584
|
}
|
|
554
585
|
});
|
|
586
|
+
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) => {
|
|
587
|
+
try {
|
|
588
|
+
const state = buildOnboardingState();
|
|
589
|
+
if (opts.json) {
|
|
590
|
+
console.log(JSON.stringify(state, null, 2));
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
console.log(`tmux ${state.tmuxOk ? "ok" : "missing (required; install tmux 3.0+)"}`);
|
|
594
|
+
console.log(`node ${state.nodeOk ? "ok" : "too old (need >=20.19)"}`);
|
|
595
|
+
console.log(`providers ${state.installedProviders.length > 0 ? state.installedProviders.map(providerDisplayName).join(", ") : "none installed"}`);
|
|
596
|
+
if (state.installedProviders.length === 0) {
|
|
597
|
+
console.log("\nInstall a provider CLI (for example Claude Code or Codex) and sign in, then run setup again.");
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
console.log("\nTwo ways to use reevesagents:");
|
|
601
|
+
console.log(` 1. Run agents yourself reevesagents spawn ${state.installedProviders[0]}`);
|
|
602
|
+
console.log(" 2. Let one CLI drive others connect the Agent control MCP (below)");
|
|
603
|
+
const installedHosts = state.hosts.filter((host) => host.installed);
|
|
604
|
+
if (installedHosts.length > 0) {
|
|
605
|
+
console.log("\nHost CLIs (can drive the others once connected):");
|
|
606
|
+
for (const host of installedHosts) {
|
|
607
|
+
const status = host.attached ? "connected" : host.manual ? "add manually" : "not connected";
|
|
608
|
+
console.log(` ${host.key.padEnd(10)} ${status}`);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
if (!opts.attach) {
|
|
612
|
+
if (state.attachable.length > 0) {
|
|
613
|
+
console.log(`
|
|
614
|
+
To connect ${state.attachable.join(", ")}, run: reevesagents setup --attach`);
|
|
615
|
+
} else if (state.attachedHosts.length > 0) {
|
|
616
|
+
console.log("\nAll installed host CLIs are already connected. Restart them to load the tools.");
|
|
617
|
+
}
|
|
618
|
+
return;
|
|
619
|
+
}
|
|
620
|
+
console.log("\nConnecting...");
|
|
621
|
+
const result = await runOnboarding();
|
|
622
|
+
for (const attached of result.attached) {
|
|
623
|
+
console.log(` ${(attached.ok ? "ok" : "--").padEnd(3)} ${attached.key.padEnd(10)} ${attached.message}`);
|
|
624
|
+
}
|
|
625
|
+
if (result.verify?.ok) {
|
|
626
|
+
console.log(`
|
|
627
|
+
verified: ${result.verify.detail}.`);
|
|
628
|
+
const keys = result.attached.filter((attached) => attached.ok).map((attached) => attached.key);
|
|
629
|
+
console.log(`Restart ${keys.join(", ")} (start a new session), then ask it: "${suggestedAgentPrompt(state.installedProviders)}".`);
|
|
630
|
+
} else if (result.verify) {
|
|
631
|
+
console.log(`
|
|
632
|
+
warning: the server did not start here: ${result.verify.detail}`);
|
|
633
|
+
console.log("a host CLI will hit the same error. check that reevesagents is installed and re-run setup --attach.");
|
|
634
|
+
}
|
|
635
|
+
if (!result.attached.some((attached) => attached.ok) || result.verify?.ok === false) process.exitCode = 1;
|
|
636
|
+
} catch (err) {
|
|
637
|
+
console.error(err instanceof Error ? err.message : String(err));
|
|
638
|
+
process.exit(1);
|
|
639
|
+
}
|
|
640
|
+
});
|
|
555
641
|
program.command("hosts").description("list MCP host CLIs and whether reevesagents is attached").option("--json", "output JSON array").action((opts) => {
|
|
556
642
|
const hosts = hostStatus();
|
|
557
643
|
if (opts.json) {
|
|
@@ -563,16 +649,36 @@ program.command("hosts").description("list MCP host CLIs and whether reevesagent
|
|
|
563
649
|
console.log(`${host.key.padEnd(10)} ${state.padEnd(9)} ${host.label}`);
|
|
564
650
|
}
|
|
565
651
|
});
|
|
566
|
-
program.command("attach [cli]").description("attach the reevesagents MCP to one CLI, or all installed when omitted").action((cli) => {
|
|
652
|
+
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
653
|
try {
|
|
568
|
-
const results = cli ? [attach(cli)] : attachAll();
|
|
654
|
+
const results = cli ? [attach(cli, opts.force)] : attachAll(opts.force);
|
|
569
655
|
if (results.length === 0) {
|
|
570
|
-
console.log("no
|
|
656
|
+
console.log("no MCP-capable CLI is installed here.");
|
|
657
|
+
console.log('Install a host CLI (for example Claude Code or Codex) and sign in, then run "reevesagents attach" again.');
|
|
658
|
+
process.exitCode = 1;
|
|
571
659
|
return;
|
|
572
660
|
}
|
|
573
661
|
for (const result of results) {
|
|
574
662
|
console.log(`${(result.ok ? "ok" : "--").padEnd(3)} ${result.key.padEnd(10)} ${result.message}`);
|
|
575
663
|
}
|
|
664
|
+
const attached = results.filter((result) => result.ok);
|
|
665
|
+
if (attached.length > 0) {
|
|
666
|
+
const verify = await verifyServerLaunch();
|
|
667
|
+
if (verify.ok) {
|
|
668
|
+
console.log(`
|
|
669
|
+
verified: ${verify.detail}.`);
|
|
670
|
+
console.log(`restart ${attached.map((result) => result.key).join(", ")} (start a new session) to load the tools,`);
|
|
671
|
+
const available = detectAvailable();
|
|
672
|
+
console.log(`then ask it: "${suggestedAgentPrompt(PROVIDERS.filter((provider) => available[provider]))}".`);
|
|
673
|
+
} else {
|
|
674
|
+
console.log(`
|
|
675
|
+
warning: the entry was written, but the server did not start here: ${verify.detail}`);
|
|
676
|
+
console.log("a host CLI will hit the same error. check that reevesagents is installed and re-run attach.");
|
|
677
|
+
process.exitCode = 1;
|
|
678
|
+
}
|
|
679
|
+
} else {
|
|
680
|
+
process.exitCode = 1;
|
|
681
|
+
}
|
|
576
682
|
} catch (err) {
|
|
577
683
|
console.error(err instanceof Error ? err.message : String(err));
|
|
578
684
|
process.exit(1);
|
|
@@ -582,6 +688,50 @@ program.command("detach <cli>").description("detach the reevesagents MCP from on
|
|
|
582
688
|
try {
|
|
583
689
|
const result = detach(cli);
|
|
584
690
|
console.log(`${(result.ok ? "ok" : "--").padEnd(3)} ${result.key.padEnd(10)} ${result.message}`);
|
|
691
|
+
if (!result.ok) process.exitCode = 1;
|
|
692
|
+
} catch (err) {
|
|
693
|
+
console.error(err instanceof Error ? err.message : String(err));
|
|
694
|
+
process.exit(1);
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
program.command("skills [action]").description("install the reevesagents skill for skill-aware CLIs (action: status, install, remove)").option("--json", "output JSON").action((action, opts) => {
|
|
698
|
+
const verb = action ?? "status";
|
|
699
|
+
try {
|
|
700
|
+
if (verb === "install") {
|
|
701
|
+
const results = installSkills();
|
|
702
|
+
if (opts.json) {
|
|
703
|
+
console.log(JSON.stringify(results, null, 2));
|
|
704
|
+
return;
|
|
705
|
+
}
|
|
706
|
+
for (const r of results) console.log(`${(r.ok ? "ok" : "--").padEnd(3)} ${r.label.padEnd(24)} ${r.file}`);
|
|
707
|
+
console.log("\nrestart your CLIs to pick up the skill.");
|
|
708
|
+
if (results.some((r) => !r.ok)) process.exitCode = 1;
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
if (verb === "remove") {
|
|
712
|
+
const results = removeSkills();
|
|
713
|
+
if (opts.json) {
|
|
714
|
+
console.log(JSON.stringify(results, null, 2));
|
|
715
|
+
return;
|
|
716
|
+
}
|
|
717
|
+
for (const r of results) console.log(`${(r.ok ? "ok" : "--").padEnd(3)} ${r.label.padEnd(24)} ${r.message}`);
|
|
718
|
+
if (results.some((r) => !r.ok)) process.exitCode = 1;
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
if (verb === "status") {
|
|
722
|
+
const rows = skillsStatus();
|
|
723
|
+
if (opts.json) {
|
|
724
|
+
console.log(JSON.stringify(rows, null, 2));
|
|
725
|
+
return;
|
|
726
|
+
}
|
|
727
|
+
for (const r of rows) {
|
|
728
|
+
const state = !r.present ? "absent" : r.current ? "installed" : "outdated";
|
|
729
|
+
console.log(`${state.padEnd(10)} ${r.label.padEnd(24)} ${r.file}`);
|
|
730
|
+
}
|
|
731
|
+
console.log('\nrun "reevesagents skills install" to (re)install.');
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
throw new Error(`unknown action: ${verb} (use status, install, or remove)`);
|
|
585
735
|
} catch (err) {
|
|
586
736
|
console.error(err instanceof Error ? err.message : String(err));
|
|
587
737
|
process.exit(1);
|
|
@@ -695,7 +845,7 @@ program.command("web").description("start the on-demand loopback web UI for agen
|
|
|
695
845
|
});
|
|
696
846
|
program.command("mcp").description("start the agent control MCP server over stdio (for CLIs that have it attached)").action(async () => {
|
|
697
847
|
try {
|
|
698
|
-
const { startAgentMcpServer } = await import("./server-
|
|
848
|
+
const { startAgentMcpServer } = await import("./server-AP4NN6RT.js");
|
|
699
849
|
await startAgentMcpServer();
|
|
700
850
|
} catch (err) {
|
|
701
851
|
console.error(err instanceof Error ? err.message : String(err));
|
|
@@ -709,7 +859,7 @@ async function runWeb(opts) {
|
|
|
709
859
|
console.error(webExtrasMessage(extras.missing));
|
|
710
860
|
process.exit(1);
|
|
711
861
|
}
|
|
712
|
-
const { startWebServer } = await import("./server-
|
|
862
|
+
const { startWebServer } = await import("./server-Y5EO5QYV.js");
|
|
713
863
|
const parsed = opts.port ? Number.parseInt(opts.port, 10) : void 0;
|
|
714
864
|
const handle = await startWebServer({
|
|
715
865
|
port: parsed !== void 0 && Number.isFinite(parsed) ? parsed : void 0,
|
|
@@ -728,12 +878,12 @@ async function renderTui() {
|
|
|
728
878
|
const [{ default: React }, { render }, { Router }] = await Promise.all([
|
|
729
879
|
import("react"),
|
|
730
880
|
import("ink"),
|
|
731
|
-
import("./router-
|
|
881
|
+
import("./router-L5IRXRCH.js")
|
|
732
882
|
]);
|
|
733
883
|
try {
|
|
734
884
|
await render(React.createElement(Router), { alternateScreen: false }).waitUntilExit();
|
|
735
885
|
} finally {
|
|
736
|
-
const { closeTuiWebServer } = await import("./tui-launch-
|
|
886
|
+
const { closeTuiWebServer } = await import("./tui-launch-AGR3JF4I.js");
|
|
737
887
|
await closeTuiWebServer();
|
|
738
888
|
}
|
|
739
889
|
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;
|
|
@@ -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-
|
|
9
|
+
} from "./chunk-WDJ6RTES.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-
|
|
42
|
+
} from "./chunk-T7SPF4ZP.js";
|
|
43
43
|
import "./chunk-D24DQQ6V.js";
|
|
44
44
|
export {
|
|
45
45
|
BIN,
|