reevesagents 1.3.2 → 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.
package/AGENTS.md CHANGED
@@ -63,8 +63,14 @@ half-starting a run. On success it prints the run id, each agent's id, and the e
63
63
  Useful `spawn` flags: `--name <run>`, `--cwd <dir>` (defaults to the current dir),
64
64
  `--prompt <text>` (pasted into every agent on startup), `--skip` (launch agents without
65
65
  their own permission prompts; use it when no human is there to approve), `--run <run-id>`
66
- (add agents to an existing run instead of starting a new one), `--json` (print the run
67
- and agent ids as JSON instead of text).
66
+ (add agents to an existing run instead of starting a new one), `--extra-args <args>`
67
+ (flags appended to every agent launch, for provider options ReevesAgents does not model,
68
+ e.g. `--remote-control`), `--json` (print the run and agent ids as JSON instead of text).
69
+
70
+ To grow a workspace one agent at a time, `reevesagents add <spec...>` adds to the most
71
+ recent active run without a run id (pass `--run <run-id>` to target another). It takes
72
+ the same per-agent flags as `spawn`. Agents added this way run side by side and do not
73
+ control each other; that only happens when the Agent control MCP is attached.
68
74
 
69
75
  ## Provider ids and aliases
70
76
 
@@ -93,6 +99,8 @@ reevesagents send <agent-id> "do X" # paste text at the agent's prompt
93
99
  reevesagents key <agent-id> enter # submit it (send does not submit on its own)
94
100
  reevesagents interrupt <agent-id> # ctrl-c the agent
95
101
  reevesagents open <run-id|agent-id> # jump to its tmux window
102
+ reevesagents approvals # pending approval requests (add --json)
103
+ reevesagents approve <approval-id> # resolve one; deny <approval-id> refuses it
96
104
  ```
97
105
 
98
106
  `send` only pastes; follow it with `key <agent-id> enter` to submit. Keys accepted by
@@ -106,8 +114,9 @@ reevesagents stop <run-id> --yes # end a whole run and tear down its tmux
106
114
  reevesagents kill <agent-id> --yes # end one agent
107
115
  ```
108
116
 
109
- `stop` and `kill` are the only destructive commands, so they refuse to run without
110
- `--yes`.
117
+ `stop` and `kill` refuse to run without `--yes`. The same gate covers cleanup:
118
+ `delete <agent-id>` and `delete-run <run-id>` remove ended records, and
119
+ `delete-history <id>` removes an archived one.
111
120
 
112
121
  ## A worked example: five agents, then drive them
113
122
 
@@ -164,7 +173,7 @@ Don't:
164
173
  - Don't `send` and assume it ran; nothing submits until you `key <agent-id> enter`.
165
174
  - Don't spawn a provider that is missing or signed out; spawn refuses the first, and the
166
175
  second leaves a window parked at a login prompt that never does the work.
167
- - Don't run `stop` or `kill` without `--yes`; they are the only destructive commands.
176
+ - Don't run `stop`, `kill`, or the `delete` commands without `--yes`; those are the destructive ones.
168
177
  - Don't target native Windows; run inside WSL with tmux and the CLIs installed there.
169
178
  - Don't paste secrets into a `--prompt` or `send`; output is captured and shown through `peek` and the web UI.
170
179
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ # [1.5.0](https://github.com/mertkayacs/reevesagents/compare/v1.4.0...v1.5.0) (2026-07-11)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * address remaining review notes across CLI, TUI, and web ([b7753c0](https://github.com/mertkayacs/reevesagents/commit/b7753c060e8ab05e6b50650d15a8a008f1c9b4f8)), closes [#8](https://github.com/mertkayacs/reevesagents/issues/8)
9
+ * **cli:** set failure exit codes and add attach --force ([a68c247](https://github.com/mertkayacs/reevesagents/commit/a68c24782f8fb2b1311fcbaf4a03cd4d9baf17c9)), closes [#8](https://github.com/mertkayacs/reevesagents/issues/8)
10
+ * **win:** guard .cmd launchers, add setup --json, shorten status probe ([6273ea7](https://github.com/mertkayacs/reevesagents/commit/6273ea7eae7d72916edf7a1b45cedcc5a4aedfee)), closes [#8](https://github.com/mertkayacs/reevesagents/issues/8)
11
+ * **win:** protect live runs in the verifier and fix cmd.exe quoting ([52dc275](https://github.com/mertkayacs/reevesagents/commit/52dc27536c8a1e6d92cf1275d3bf99356fbf6d9c)), closes [#8](https://github.com/mertkayacs/reevesagents/issues/8)
12
+
13
+
14
+ ### Features
15
+
16
+ * **cli:** add a setup command and shared onboarding core ([79dd470](https://github.com/mertkayacs/reevesagents/commit/79dd470bbaf0f4aa9598a889ecb8f7d5025b4d6b)), closes [#8](https://github.com/mertkayacs/reevesagents/issues/8)
17
+ * **mcp:** add connect-time instructions and a getting-started guide ([341c8e6](https://github.com/mertkayacs/reevesagents/commit/341c8e689b6a13057edcd8274e442bc1a71e6f5b)), closes [#8](https://github.com/mertkayacs/reevesagents/issues/8)
18
+ * **mcp:** resolve an absolute launcher and verify attach ([2315e8e](https://github.com/mertkayacs/reevesagents/commit/2315e8e494d61036f7659db82ac55d35d44fadde)), closes [#8](https://github.com/mertkayacs/reevesagents/issues/8)
19
+ * **tui:** add a first-run setup wizard ([1895611](https://github.com/mertkayacs/reevesagents/commit/18956117e6af36dbd1055ed984b3cbb589f5387b)), closes [#8](https://github.com/mertkayacs/reevesagents/issues/8)
20
+ * **web:** add a first-visit getting-started popup ([c3d909b](https://github.com/mertkayacs/reevesagents/commit/c3d909b4456052cc4398b82bf74213dc8b9af220)), closes [#8](https://github.com/mertkayacs/reevesagents/issues/8)
21
+ * **win:** add reevesagents-win, an MCP-only Windows-native package ([58dba05](https://github.com/mertkayacs/reevesagents/commit/58dba05fad8c23cf27a5ab77d97c8fd8f097468f)), closes [#8](https://github.com/mertkayacs/reevesagents/issues/8)
22
+
23
+ # [1.4.0](https://github.com/mertkayacs/reevesagents/compare/v1.3.2...v1.4.0) (2026-07-05)
24
+
25
+
26
+ ### Features
27
+
28
+ * **cli:** add an `add` command to grow a workspace one agent at a time ([07f9cde](https://github.com/mertkayacs/reevesagents/commit/07f9cdedb3b33f742f209a2f1453f5af5a5d69e4))
29
+ * **spawn:** pass extra launch flags through to the provider CLI ([011f923](https://github.com/mertkayacs/reevesagents/commit/011f9233578158d1399e2580154de56f5d17bc8c))
30
+
3
31
  ## [1.3.2](https://github.com/mertkayacs/reevesagents/compare/v1.3.1...v1.3.2) (2026-07-02)
4
32
 
5
33
 
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  <p align="center">
2
- <img src="https://raw.githubusercontent.com/mertkayacs/reevesagents/master/docs/assets/reevesagents-header.gif" alt="ReevesAgents" width="800" />
2
+ <a href="https://reevesagents.mertkayacs.com">
3
+ <img src="https://raw.githubusercontent.com/mertkayacs/reevesagents/master/docs/assets/reevesagents-header.gif" alt="ReevesAgents" width="800" />
4
+ </a>
3
5
  </p>
4
6
 
5
7
  [![npm version](https://img.shields.io/npm/v/reevesagents.svg)](https://www.npmjs.com/package/reevesagents)
@@ -8,13 +10,19 @@
8
10
  [![license](https://img.shields.io/npm/l/reevesagents.svg)](LICENSE)
9
11
  [![CI](https://img.shields.io/github/actions/workflow/status/mertkayacs/reevesagents/test.yml?branch=master&label=CI)](https://github.com/mertkayacs/reevesagents/actions/workflows/test.yml)
10
12
 
13
+ <h3 align="center"><a href="https://reevesagents.mertkayacs.com">reevesagents.mertkayacs.com</a></h3>
14
+ <p align="center">
15
+ <a href="https://reevesagents.mertkayacs.com/demo"><b>Demo</b></a> ·
16
+ <a href="https://reevesagents.mertkayacs.com/docs"><b>Docs</b></a> ·
17
+ <a href="https://reevesagents.mertkayacs.com/faq"><b>FAQ</b></a> ·
18
+ <a href="https://github.com/mertkayacs/reevesagents/issues"><b>Issues</b></a>
19
+ </p>
20
+
11
21
  **English** · [Deutsch](docs/i18n/README.de.md) · [Français](docs/i18n/README.fr.md) · [Español](docs/i18n/README.es.md) · [Português](docs/i18n/README.pt.md) · [Italiano](docs/i18n/README.it.md) · [Türkçe](docs/i18n/README.tr.md) · [Русский](docs/i18n/README.ru.md) · [简体中文](docs/i18n/README.zh-Hans.md) · [العربية](docs/i18n/README.ar.md)
12
22
 
13
23
  *Create and drive AI agents from other agents. ReevesAgents is a free, local workspace where coding agents (such as Claude Code, Codex, Hermes, DeepSeek, and Kimi) run side by side, and one agent can spawn, steer, and supervise the rest. No API keys, and no changes to your existing Agent.md or Claude.md.*
14
24
 
15
- **In more than 10 languages!**
16
-
17
- GitHub: https://github.com/mertkayacs/reevesagents
25
+ **In 10 languages!**
18
26
 
19
27
  ## Let one agent install and run the rest
20
28
 
@@ -35,7 +43,7 @@ Prefer to set it up by hand? Turn it on from the **Agent control** screen in the
35
43
 
36
44
  The TUI and the local Web UI driving the same run:
37
45
 
38
- ![ReevesAgents TUI: language picker, welcome screen, and runs](https://raw.githubusercontent.com/mertkayacs/reevesagents/master/docs/assets/reevesagents-tui.gif)
46
+ ![ReevesAgents TUI: language picker, welcome menu, and doctor](https://raw.githubusercontent.com/mertkayacs/reevesagents/master/docs/assets/reevesagents-tui.gif)
39
47
 
40
48
  ![ReevesAgents Web UI: runs and live agent panes](https://raw.githubusercontent.com/mertkayacs/reevesagents/master/docs/assets/reevesagents-web-en.png)
41
49
 
@@ -54,6 +62,19 @@ Portuguese, Italian, Turkish, Russian, Simplified Chinese, and Arabic.
54
62
  New to ReevesAgents? The [User Guide](docs/GUIDE.md) walks you through install,
55
63
  your first run, and letting one agent drive the rest.
56
64
 
65
+ ## Two ways to use it
66
+
67
+ - **As a workspace.** Spawn the agents you want and keep adding more with
68
+ `reevesagents add`, one at a time. They run side by side, each in its own tmux
69
+ window, and none of them controls another. This is the simplest way in: your
70
+ different CLIs together in one local place.
71
+ - **As an orchestrator.** Attach the opt-in Agent control MCP to one CLI, and
72
+ that agent gains the tools to spawn and drive the rest. This is the headline
73
+ feature, and it stays off until you turn it on.
74
+
75
+ Both use the same runs and the same surfaces, so you can start as a plain
76
+ workspace and reach for orchestration later, or never.
77
+
57
78
  ## Surfaces
58
79
 
59
80
  | Surface | What it is good for |
@@ -77,17 +98,24 @@ This is not a cloud agent platform. It is a small local layer around real CLIs:
77
98
 
78
99
  ## Install
79
100
 
80
- ReevesAgents is published on npm as `reevesagents`. Install it globally with the
81
- package manager you already use, then verify the machine with `doctor`.
101
+ Install ReevesAgents with Homebrew, or globally with any Node package manager
102
+ (pnpm, npm, Yarn, or Bun), then verify the machine with `doctor`.
103
+
104
+ ```sh
105
+ # Homebrew
106
+ brew install mertkayacs/reevesagents/reevesagents
107
+
108
+ # or a Node package manager, pnpm shown here
109
+ pnpm add -g reevesagents
110
+ ```
82
111
 
83
112
  ```sh
84
- npm install -g reevesagents
85
113
  reevesagents doctor
86
114
  reevesagents
87
115
  ```
88
116
 
89
117
  To pin a version, append `@<version>` to the package name, for example
90
- `npm install -g reevesagents@1.2.0`.
118
+ `pnpm add -g reevesagents@1.4.0`.
91
119
 
92
120
  <details>
93
121
  <summary><b>pnpm</b></summary>
@@ -106,6 +134,23 @@ pnpm dlx reevesagents doctor
106
134
 
107
135
  </details>
108
136
 
137
+ <details>
138
+ <summary><b>npm</b></summary>
139
+
140
+ ```sh
141
+ npm install -g reevesagents
142
+ reevesagents doctor
143
+ reevesagents
144
+ ```
145
+
146
+ One-shot, no global install:
147
+
148
+ ```sh
149
+ npx reevesagents doctor
150
+ ```
151
+
152
+ </details>
153
+
109
154
  <details>
110
155
  <summary><b>Yarn</b></summary>
111
156
 
@@ -142,15 +187,6 @@ bunx reevesagents doctor
142
187
 
143
188
  </details>
144
189
 
145
- <details>
146
- <summary><b>npx (no install)</b></summary>
147
-
148
- ```sh
149
- npx reevesagents doctor
150
- ```
151
-
152
- </details>
153
-
154
190
  <details>
155
191
  <summary><b>Homebrew</b></summary>
156
192
 
@@ -194,9 +230,9 @@ at least one provider CLI already installed.
194
230
 
195
231
  ReevesAgents can launch these provider CLIs when they are installed and
196
232
  authenticated on your machine: Claude Code, Codex CLI, OpenCode, Hermes, Kimi,
197
- DeepSeek, Pi, Qwen, and Aider. Provider login, models, tools, quotas, and
198
- permission prompts stay with each provider. ReevesAgents does not store provider
199
- API keys and does not proxy model traffic.
233
+ DeepSeek, Pi, Qwen, and Aider. Each CLI keeps its own login, models, quotas,
234
+ and permission prompts, exactly as if you had started it yourself, which is
235
+ why ReevesAgents never needs to hold an API key or sit in the traffic path.
200
236
 
201
237
  ## Quick Start
202
238
 
@@ -215,6 +251,15 @@ reevesagents spawn deepseek:backend claude-code:product codex:system hermes:rese
215
251
  --prompt "Plan the backend, product surface, design system, and research notes."
216
252
  ```
217
253
 
254
+ Or start small and grow the workspace one agent at a time. `add` joins the most
255
+ recent run, so you never have to copy a run id around:
256
+
257
+ ```sh
258
+ reevesagents spawn claude-code:product # start a workspace
259
+ reevesagents add codex:system # add to it later
260
+ reevesagents add hermes:research
261
+ ```
262
+
218
263
  For a full walkthrough, see the [User Guide](docs/GUIDE.md).
219
264
 
220
265
  ## Commands
@@ -222,24 +267,45 @@ For a full walkthrough, see the [User Guide](docs/GUIDE.md).
222
267
  No arguments launches the TUI. The subcommands are the operator surface for
223
268
  humans and scripts.
224
269
 
225
- | Command | Purpose | Key flags |
226
- | --- | --- | --- |
227
- | `reevesagents` | Launch the TUI (no subcommand). | none |
228
- | `spawn [spec...]` | Start a run with one or more provider agents. Each `spec` is `provider[:nickname[:model]]`. The first spec is the lead, the rest are workers. No spec defaults to `codex`. | `--name <name>` (default `run`), `--cwd <dir>` (default current dir), `--prompt <text>` (pasted into each agent) |
229
- | `runs` | List active runs, one per line. | `--json` (full run records as a JSON array) |
230
- | `open <id>` | Switch tmux to a run's Reeves window or an agent window. Inside tmux it switches; outside tmux on a TTY it attaches; otherwise it prints a pasteable tmux command. Accepts a run id/name or an agent id/nickname (prefix match allowed). | none |
231
- | `peek <agent-id>` | Print recent output from one agent. | `-n, --lines <n>` (default `20`), `--json` (lines as an array) |
232
- | `stop <run-id>` | Stop one run. | `-y, --yes` (or `ALLOW_DESTRUCTIVE=1`) |
233
- | `kill <agent-id>` | Stop one agent. | `-y, --yes` (or `ALLOW_DESTRUCTIVE=1`) |
234
- | `doctor` | Run environment health checks (Node, tmux, state path, provider CLIs). Exits non-zero on any failed check. | `--json` |
235
- | `web` | Start the on-demand, loopback-only Web UI. Runs in the foreground; agents keep running after you stop it. | `--port <n>` (preferred port, falls back to the next free port), `--no-open` (do not open the browser) |
236
- | `hosts` | List the agent CLIs on this machine and show which ones ReevesAgents is connected to. | none |
237
- | `attach [cli]` | Connect ReevesAgents to one agent CLI, or to every installed one when no name is given. Runs that CLI's own `mcp add`. | none |
238
- | `detach <cli>` | Disconnect ReevesAgents from one agent CLI. Runs that CLI's own `mcp remove`. | none |
239
- | `mcp` | Start the Agent control MCP server over stdio. Not run by hand; the CLI you connect it to runs it. | none |
240
-
241
- `stop` and `kill` are the only destructive commands. They refuse to run without
242
- `--yes` or `ALLOW_DESTRUCTIVE=1`.
270
+ The everyday surface:
271
+
272
+ - `reevesagents`: Launch the TUI (no subcommand).
273
+ - `spawn [spec...]`: Start a run with one or more provider agents. Each `spec` is `provider[:nickname[:model]]`. The first spec is the lead, the rest are workers. No spec defaults to `codex`. Key flags: `--name <name>` (default `run`), `--cwd <dir>` (default current dir), `--prompt <text>` (pasted into each agent), `--skip` (skip permission prompts), `--run <run-id>` (add agents to an existing run), `--auth-mode <mode>`, `--effort <level>`, `--extra-args <args>` (flags appended to every agent launch, e.g. `"--remote-control"`), `--json`.
274
+ - `add [spec...]`: Add one or more agents to the current workspace, the most recent active run, without passing a run id. Use it to grow a workspace one agent at a time. Same per-agent flags as `spawn`, plus `--run <run-id>` to target a specific run instead of the latest.
275
+ - `runs`: List active runs, one per line. Key flags: `--json` (full run records as a JSON array).
276
+ - `agents [run-id]`: List agents across all runs, or the agents in one run. Key flags: `--json`.
277
+ - `open <id>`: Switch tmux to a run's Reeves window or an agent window. Inside tmux it switches; outside tmux on a TTY it attaches; otherwise it prints a pasteable tmux command. Accepts a run id/name or an agent id/nickname (prefix match allowed).
278
+ - `peek <agent-id>`: Print recent output from one agent. Key flags: `-n, --lines <n>` (default `20`), `--json` (lines as an array).
279
+ - `send <agent-id> <text...>`: Paste text at an agent's prompt. It does not submit; follow with `key <agent-id> enter`.
280
+ - `key <agent-id> <key>`: Send one key: `enter`, `escape`, `backspace`, `tab`, `space`, `up`, `down`, `left`, `right`, or `ctrl-c`.
281
+ - `interrupt <agent-id>`: Send ctrl-c to one agent.
282
+ - `stop <run-id>`: Stop one run. Key flags: `-y, --yes` (or `ALLOW_DESTRUCTIVE=1`).
283
+ - `kill <agent-id>`: Stop one agent. Key flags: `-y, --yes` (or `ALLOW_DESTRUCTIVE=1`).
284
+ - `doctor`: Run environment health checks (Node, tmux, state path, provider CLIs). Exits non-zero on any failed check. Key flags: `--json`.
285
+ - `web`: Start the on-demand, loopback-only Web UI. Runs in the foreground; agents keep running after you stop it. Key flags: `--port <n>` (preferred port, falls back to the next free port), `--no-open` (do not open the browser).
286
+
287
+ Discovery, approvals, agent control, config, and cleanup:
288
+
289
+ - `providers`: List every provider with availability, aliases, and known models. Key flags: `--models`, `--json`.
290
+ - `approvals`: List pending approval requests from agents. Key flags: `--json`.
291
+ - `approve <approval-id> [note]`: Resolve an approval request as approved.
292
+ - `deny <approval-id> [note]`: Resolve an approval request as denied.
293
+ - `hosts`: List the agent CLIs on this machine and show which ones ReevesAgents is connected to.
294
+ - `attach [cli]`: Connect ReevesAgents to one agent CLI, or to every installed one when no name is given. Runs that CLI's own `mcp add`.
295
+ - `detach <cli>`: Disconnect ReevesAgents from one agent CLI. Runs that CLI's own `mcp remove`.
296
+ - `mcp`: Start the Agent control MCP server over stdio. Not run by hand; the CLI you connect it to runs it.
297
+ - `config [key] [value]`: Show all editable settings, read one, or set one. Key flags: `--json`.
298
+ - `presets`: List saved run presets. Key flags: `--json`.
299
+ - `save-preset <run-id> <name> [description...]`: Capture a live run as a reusable preset.
300
+ - `start-preset <name>`: Start a new run from a preset. Key flags: `--name <run>`, `--cwd <dir>`.
301
+ - `delete-preset <name>`: Delete a preset. Key flags: `-y, --yes`.
302
+ - `delete <agent-id>`: Delete one ended agent's record. Key flags: `-y, --yes`.
303
+ - `delete-run <run-id>`: Delete one ended run and archive it to history. Key flags: `-y, --yes`.
304
+ - `history`: List archived ended and stale runs. Key flags: `--json`.
305
+ - `delete-history <id>`: Delete one archived history record. Key flags: `-y, --yes`.
306
+
307
+ `stop`, `kill`, and the `delete` commands are destructive. They refuse to run
308
+ without `--yes` or `ALLOW_DESTRUCTIVE=1`.
243
309
 
244
310
  ## Agent control
245
311
 
@@ -279,7 +345,8 @@ See [docs/mcp.md](docs/mcp.md) for the full design and tool list.
279
345
 
280
346
  ## Configuration
281
347
 
282
- State and config are local JSON. No database, no daemon.
348
+ All state and config are plain JSON files on your disk, so there is nothing to
349
+ administer and nothing running when you are not using it.
283
350
 
284
351
  State lives under `~/.reeves`:
285
352
 
@@ -298,7 +365,7 @@ multi-profile use:
298
365
  for `runs/`, `history/`, and `presets/`.
299
366
  - `REEVES_CONFIG`: config file path override. Replaces `~/.reeves/config.json`.
300
367
 
301
- Text fields that can hold secrets are redacted before they are written to state.
368
+ Anything that might contain a secret is scrubbed before it reaches a file.
302
369
 
303
370
  ## Examples
304
371
 
@@ -338,10 +405,11 @@ The Web UI is local and loopback-only.
338
405
  reevesagents web
339
406
  ```
340
407
 
341
- It binds to `127.0.0.1`, runs in the foreground, and exits when you stop it.
342
- Agents keep running in tmux afterward. From the browser you can create runs, add
343
- agents, choose provider models and permission modes, stop agents, delete ended
344
- work, and inspect history while the real CLIs keep running.
408
+ It answers on `127.0.0.1` only and stays in the foreground until you stop it,
409
+ which changes nothing for the agents, because they live in tmux rather than in
410
+ the page. From the browser you can create runs, add agents with a chosen model
411
+ and permission mode, stop what needs stopping, and dig through history while
412
+ the real CLIs keep working underneath.
345
413
 
346
414
  The Web UI uses two optional runtime modules, `ws` and `@lydell/node-pty`. npm
347
415
  installs them by default. The CLI and TUI keep working without them, and the
@@ -397,6 +465,7 @@ TypeScript, tsup, Vitest, and ESLint from the repository.
397
465
 
398
466
  ## Links
399
467
 
468
+ - Website: https://reevesagents.mertkayacs.com
400
469
  - npm: https://www.npmjs.com/package/reevesagents
401
470
  - GitHub: https://github.com/mertkayacs/reevesagents
402
471
  - Releases: https://github.com/mertkayacs/reevesagents/releases
@@ -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-36SYE7IU.js";
9
+ } from "./chunk-LKJSQLX2.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-VTLLF2Z4.js.map
171
+ //# sourceMappingURL=chunk-6RPG22BH.js.map