reevesagents 1.2.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 ADDED
@@ -0,0 +1,104 @@
1
+ # Changelog
2
+
3
+ Entries before `0.9.0` describe internal development milestones from the reorganized pre-release history. The first public prerelease is `0.9.0`.
4
+
5
+ ## 1.2.0 - Language And Web UX Polish
6
+
7
+ ### Added
8
+ - Added TUI and Web language switching with English, German, French, Spanish, Portuguese, Italian, Turkish, Simplified Chinese, and Arabic.
9
+ - Added separate Web actions for New Run and New Agent with provider model and permission mode selection.
10
+ - Added shared TUI/Web history for archived ended and stale runs.
11
+ - Added the animated Web duck mark as the top-left brand asset.
12
+ - Added contributor branch policy, issue templates, pull request template, and security policy.
13
+
14
+ ### Changed
15
+ - Runs pages now keep active runs separate from history.
16
+ - Web beta uses direct click-to-open agent selection without drag-and-drop behavior.
17
+ - TUI pages are more responsive in narrow terminals and keep loaded pages scrollable with arrow keys.
18
+ - Visible UI copy now uses agent wording for user-facing run controls.
19
+
20
+ ## Pre-1.2.0 - Web UI Workbench Polish
21
+
22
+ ### Changed
23
+ - Refined the Web beta into a compact agent workbench with richer agent cards, improved stage framing, and better responsive behavior.
24
+ - Prepared the root package, CLI smoke expectations, README, and release docs for the release candidate.
25
+
26
+ ## 0.9.0 - Initial Public Prerelease
27
+
28
+ ### Added
29
+ - Public prerelease package metadata, README, release readiness notes, and verification docs.
30
+ - Release checks for typecheck, lint, unit tests, build, CLI smoke, and package packing.
31
+ - Spawner mode as the default low-permission multi-agent run path.
32
+ - PRE-BETA orchestrator test package kept outside the default install path.
33
+ - Install surface policy for npm, pnpm, one-off runners, GitHub release tarballs, Homebrew, and source.
34
+
35
+ ### Changed
36
+ - Set the package, CLI, README, and Credits page version to `0.9.0`.
37
+ - Cleaned up the main TUI pages with sectioned Runs, Run, Agents, and Detail layouts.
38
+ - Reorganized the changelog around versioned internal milestones.
39
+ - Clarified docs and TUI copy so the main app is spawner-first and orchestration is PRE-BETA test code.
40
+
41
+ ## 0.8.0 - Verification And Release Docs
42
+
43
+ ### Added
44
+ - `pnpm verify` for portable local verification.
45
+ - CLI smoke tests with isolated temp state.
46
+ - Real tmux and provider smoke scripts for release validation.
47
+ - Release readiness, testing, and project handoff docs.
48
+
49
+ ## 0.7.0 - Run Management Polish
50
+
51
+ ### Added
52
+ - Persistent Welcome main menu with Current Run, Runs, Doctor, Settings, Reference, Credits, and Quit.
53
+ - Runs dashboard with automatic cleanup of ended and stale runs.
54
+ - Run hub, agent list, output pages, add-agent flow, and stop-run confirmation.
55
+
56
+ ### Changed
57
+ - Moved each run to its own tmux session while keeping the local registry as the source of truth.
58
+ - Renamed visible TUI actions from Open CLI to Open Agent.
59
+
60
+ ## 0.6.0 - TUI Redesign
61
+
62
+ ### Added
63
+ - Ink-based TUI frame, header, rows, sections, status bar, pagination, dialogs, and responsive layout helpers.
64
+ - Dark ReevesAgents visual system with provider colors and terminal-friendly wordmark/mascot rendering.
65
+ - New Run wizard with basics, first agent, additional agents, review, and starting steps.
66
+
67
+ ### Removed
68
+ - Legacy slash-command and hidden-help interaction patterns.
69
+ - Old multi-pane frame model in favor of visible menu pages.
70
+
71
+ ## 0.5.0 - CLI Operator Surface
72
+
73
+ ### Added
74
+ - `reevesagents spawn`, `runs`, `open`, `peek`, `stop`, `kill`, and `doctor`.
75
+ - JSON output support for scripts and human operator workflows.
76
+ - Destructive command gates with `--yes` or `ALLOW_DESTRUCTIVE=1`.
77
+
78
+ ## 0.4.0 - Run Inspection Prototype
79
+
80
+ ### Added
81
+ - Prototype commands for run discovery, lifecycle, tmux window control, and diagnostics.
82
+ - Early status tracking for agent windows.
83
+ - Pane output peeking for local inspection.
84
+
85
+ ## 0.3.0 - Tmux Runtime
86
+
87
+ ### Added
88
+ - Runtime support for starting runs, spawning agents, opening agent windows, peeking output, closing agents, and stopping runs.
89
+ - Provider launch helpers for Claude Code, Codex CLI, OpenCode CLI, and Hermes.
90
+ - Optional startup prompt paste for newly opened provider agents.
91
+
92
+ ## 0.2.0 - Local State
93
+
94
+ ### Added
95
+ - Local JSON registry under `~/.reeves`.
96
+ - Run, agent, inbox, config, and preset state.
97
+ - State redaction and isolated registry support for tests and smoke runs.
98
+
99
+ ## 0.1.0 - Project Scaffold
100
+
101
+ ### Added
102
+ - TypeScript Node package with pnpm, tsup, Vitest, ESLint, and Ink.
103
+ - Initial CLI and programmatic package entry points.
104
+ - Apache-2.0 license and repository metadata.
package/LICENSE ADDED
@@ -0,0 +1,166 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship made available under
36
+ the License, as indicated by a copyright notice that is included in
37
+ or attached to the work (an example is provided in the Appendix below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean, as submitted to the Licensor for inclusion
48
+ in the Work by the copyright owner or by an individual or Legal Entity
49
+ authorized to submit on behalf of the copyright owner. For the purposes
50
+ of this definition, "submitted" means any form of electronic, verbal,
51
+ or written communication sent to the Licensor or its representatives,
52
+ including but not limited to communication on electronic mailing lists,
53
+ source code control systems, and issue tracking systems that are managed
54
+ by, or on behalf of, the Licensor for the purpose of discussing and
55
+ improving the Work, but excluding communication that is conspicuously
56
+ marked or designated in writing by the copyright owner as "Not a
57
+ Contribution."
58
+
59
+ "Contributor" shall mean Licensor and any Legal Entity on behalf of
60
+ whom a Contribution has been received by the Licensor and included
61
+ within the Work.
62
+
63
+ 2. Grant of Copyright License. Subject to the terms and conditions of
64
+ this License, each Contributor hereby grants to You a perpetual,
65
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
66
+ copyright license to reproduce, prepare Derivative Works of,
67
+ publicly display, publicly perform, sublicense, and distribute the
68
+ Work and such Derivative Works in Source or Object form.
69
+
70
+ 3. Grant of Patent License. Subject to the terms and conditions of
71
+ this License, each Contributor hereby grants to You a perpetual,
72
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73
+ (except as stated in this section) patent license to make, have made,
74
+ use, offer to sell, sell, import, and otherwise transfer the Work,
75
+ where such license applies only to those patent contributions
76
+ Licensable by such Contributor that are necessarily infringed by
77
+ their Contribution(s) alone or by the combination of their
78
+ Contribution(s) with the Work to which such Contribution(s) was
79
+ submitted. If You institute patent litigation against any entity
80
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
81
+ the Work or any one or more Contributions constitutes direct or
82
+ contributory patent infringement, then any patent licenses granted to
83
+ You under this License for the Work shall terminate as of the date
84
+ such litigation is filed.
85
+
86
+ 4. Redistribution. You may reproduce and distribute copies of the
87
+ Work or Derivative Works thereof in any medium, with or without
88
+ modifications, and in Source or Object form, provided that You
89
+ meet the following conditions:
90
+
91
+ (a) You must give any other recipients of the Work or Derivative
92
+ Works a copy of this License; and
93
+
94
+ (b) You must cause any modified files to carry prominent notices
95
+ stating that You changed the files; and
96
+
97
+ (c) You must retain, in the Source form of any Derivative Works
98
+ that You distribute, all copyright, patent, trademark, and
99
+ attribution notices from the Source form of the Work,
100
+ excluding those notices that do not pertain to any part of
101
+ the Derivative Works; and
102
+
103
+ (d) If the Work includes a "NOTICE" text file as part of its
104
+ distribution, You must include a readable copy of the
105
+ attribution notices contained within such NOTICE file, in
106
+ at least one of the following places: within a NOTICE text
107
+ file distributed as part of the Derivative Works; within
108
+ the Source form or documentation, if provided along with the
109
+ Derivative Works; or, within a display generated by the
110
+ Derivative Works, if and wherever such third-party notices
111
+ normally appear. The contents of the NOTICE file are for
112
+ informational purposes only and do not modify the License.
113
+ You may add Your own attribution notices within Derivative
114
+ Works that You distribute, alongside or in addition to the
115
+ NOTICE text from the Work, provided that such additional
116
+ attribution notices cannot be construed as modifying the
117
+ License.
118
+
119
+ You may add Your own license statement for Your modifications and
120
+ may provide additional grant of rights to use, copy, modify, merge,
121
+ publish, distribute, sublicense, and/or sell copies of the
122
+ Contribution, either before or after inclusion in the Work.
123
+
124
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
125
+ any Contribution intentionally submitted for inclusion in the Work
126
+ by You to the Licensor shall be under the terms and conditions of
127
+ this License, without any additional terms or conditions.
128
+ Notwithstanding the above, nothing herein shall supersede or modify
129
+ the terms of any separate license agreement you may have executed
130
+ with Licensor regarding such Contributions.
131
+
132
+ 6. Trademarks. This License does not grant permission to use the trade
133
+ names, trademarks, service marks, or product names of the Licensor,
134
+ except as required for reasonable and customary use in describing the
135
+ origin of the Work and reproducing the content of the NOTICE file.
136
+
137
+ 7. Disclaimer of Warranty. Unless required by applicable law or
138
+ agreed to in writing, Licensor provides the Work (and each
139
+ Contributor provides its Contributions) on an "AS IS" BASIS,
140
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
141
+ implied, including, without limitation, any conditions of TITLE,
142
+ MERCHANTIBILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
143
+ responsible for determining the appropriateness of using or
144
+ reproducing the Work and assume any risks associated with Your
145
+ exercise of permissions under this License.
146
+
147
+ 8. Limitation of Liability. In no event and under no legal theory,
148
+ whether in tort (including negligence), contract, or otherwise,
149
+ unless required by applicable law (such as deliberate and grossly
150
+ negligent acts) or agreed to in writing, shall any Contributor be
151
+ liable to You for damages, including any direct, indirect, special,
152
+ incidental, or exemplary damages of any character arising as a
153
+ result of this License or out of the use or inability to use the
154
+ Work (including but not limited to damages for loss of goodwill,
155
+ work stoppage, computer failure or malfunction, or all other
156
+ commercial damages or losses), even if such Contributor has been
157
+ advised of the possibility of such damages.
158
+
159
+ 9. Accepting Warranty or Additional Liability. While redistributing
160
+ the Work or Derivative Works thereof, You may choose to offer,
161
+ and charge a fee for, acceptance of support, warranty, indemnity,
162
+ or other liability obligations and/or rights consistent with this
163
+ License. However, in accepting such obligations, You may offer only
164
+ conditions consistent with this License.
165
+
166
+ END OF TERMS AND CONDITIONS
package/README.md ADDED
@@ -0,0 +1,288 @@
1
+ # reevesagents
2
+
3
+ Local tmux-first workspace manager for AI CLI agents.
4
+
5
+ The main `reevesagents` package is the stable agent-run install:
6
+
7
+ - Start one tmux workspace with multiple independent provider CLI agents.
8
+ - Keep the human in charge of coordination.
9
+ - Do not write provider config, inject ReevesAgents environment variables, or create agent roles.
10
+
11
+ ReevesAgents tracks each run in local state and opens every agent in its own tmux window. The registry is the source of truth; tmux is the execution and viewing surface. The TUI stays in the current or fallback `reeves` session, while each run gets its own tmux session to keep tabs uncluttered.
12
+
13
+ ## What It Does
14
+
15
+ - Shows active runs plus shared TUI/Web history for ended and stale runs.
16
+ - Starts multiple independent provider CLI agents.
17
+ - Opens the real provider CLI window for each agent.
18
+ - Stores local JSON state under `~/.reeves/runs`.
19
+ - Uses a small animated Welcome screen, page-specific TUI layouts, and a static Runs dashboard to reduce terminal flicker.
20
+
21
+ ReevesAgents does not store provider credentials, proxy model traffic, embed a terminal emulator, or replace provider authentication.
22
+
23
+ ## Requirements
24
+
25
+ Core runtime:
26
+
27
+ - macOS, Linux, or WSL
28
+ - Node.js 20.19+
29
+ - tmux, 3.0+ recommended
30
+ - A normal interactive shell on `PATH`
31
+
32
+ Provider runtime:
33
+
34
+ - At least one provider CLI for the provider you launch: `claude`, `codex`, `opencode`, `hermes`, `kimi`, `deepseek`, `pi`, `qwen`, or `aider`
35
+ - Provider authentication handled by that provider CLI
36
+
37
+ Agent-run mode needs only the core runtime plus the provider CLIs you launch.
38
+ The Web UI beta also needs the optional `ws` and `@lydell/node-pty` packages,
39
+ which npm installs by default. The TUI and CLI do not need those optional
40
+ packages.
41
+
42
+ Not required:
43
+
44
+ - Provider API keys in ReevesAgents config
45
+ - Database, Docker, browser runtime, background service, or daemon
46
+ - MCP or approval setup
47
+
48
+ Install is passive: no postinstall, no provider config writes, no background service.
49
+
50
+ ## Providers
51
+
52
+ | Provider spec | CLI | Launch | Notes |
53
+ | --- | --- | --- | --- |
54
+ | `claude-code` | Claude Code | `claude` | Supports model, API-key auth mode, effort, and skip permissions |
55
+ | `codex-cli` | Codex CLI | `codex` | Supports model and skip permissions; Codex app-server remote control is managed outside agent launches |
56
+ | `opencode-cli` | OpenCode CLI | `opencode` | Supports `--prompt` and `--model`; ReevesAgents does not add undocumented skip flags |
57
+ | `hermes` | Hermes | `hermes chat` | Supports model and `--yolo` skip permissions |
58
+ | `kimi-code` | Kimi Code | `kimi` | Supports model and `--yolo` skip permissions |
59
+ | `deepseek-cli` | DeepSeek CLI | `deepseek` | Supports model; ReevesAgents does not add undocumented skip flags |
60
+ | `pi` | Pi | `pi` | Supports model; ReevesAgents does not add undocumented skip flags |
61
+ | `qwen-code` | Qwen Code | `qwen` | Supports model and `--approval-mode yolo` skip permissions |
62
+ | `aider` | Aider | `aider` | Supports model and `--yes-always` skip confirmations |
63
+
64
+ The TUI model picker is provider-scoped and intentionally small. Choosing `provider default` leaves the provider CLI to use its own configured default and ReevesAgents does not pass `--model`. The curated optional values live in `src/launcher/model-data/*.ts`, with one source file per provider.
65
+
66
+ Default permissions are `ask`. Use `skip` only in trusted disposable workspaces.
67
+
68
+ ## Install
69
+
70
+ Choose the smallest install surface that matches what you want to run.
71
+
72
+ ### Core CLI/TUI Only
73
+
74
+ Use this when you do not want the optional browser agent bridge:
75
+
76
+ ```sh
77
+ npm install -g --omit=optional reevesagents
78
+ reevesagents doctor
79
+ reevesagents
80
+ ```
81
+
82
+ This installs the stable CLI and TUI. `reevesagents web` will print a clear
83
+ message explaining which optional Web package is missing.
84
+
85
+ ### CLI/TUI Plus Web Beta
86
+
87
+ This is the default stable install. It includes the CLI, TUI, and loopback-only
88
+ Web UI beta. It does not install MCP orchestration.
89
+
90
+ After npm publish:
91
+
92
+ ```sh
93
+ npm install -g reevesagents
94
+ reevesagents doctor
95
+ reevesagents web
96
+ ```
97
+
98
+ Other npm-registry clients consume the same package:
99
+
100
+ ```sh
101
+ pnpm add -g reevesagents
102
+ npx reevesagents doctor
103
+ pnpm dlx reevesagents doctor
104
+ yarn dlx reevesagents doctor
105
+ bunx reevesagents doctor
106
+ ```
107
+
108
+ ### All-In PRE-BETA Orchestrator/MCP
109
+
110
+ Use this only when you explicitly want MCP-connected root/worker orchestration.
111
+ It installs the stable app plus the separate pre-beta orchestrator package:
112
+
113
+ ```sh
114
+ npm install -g reevesagents reevesagents-orchestrator
115
+ reevesagents doctor
116
+ reevesagents web --prebeta-orchestrator
117
+ ```
118
+
119
+ The pre-beta Web mode can show and control both stable agent runs and
120
+ orchestrator runs. It can create orchestrator runs, add workers, stop runs, and
121
+ control windowed worker agents. Headless orchestrator roots are shown but
122
+ cannot be opened in the browser agent view.
123
+
124
+ Provider MCP config setup remains explicit:
125
+
126
+ ```sh
127
+ reevesagents-orchestrator setup
128
+ ```
129
+
130
+ That setup command is pre-beta and may write provider MCP config entries. The
131
+ stable `reevesagents` install never does that by itself.
132
+
133
+ After the Homebrew tap exists, use the tap command documented in that release.
134
+
135
+ From a GitHub Release tarball:
136
+
137
+ ```sh
138
+ npm install -g ./reevesagents-1.2.0.tgz
139
+ reevesagents doctor
140
+ ```
141
+
142
+ For an all-in pre-beta tarball install, install both release tarballs:
143
+
144
+ ```sh
145
+ npm install -g ./reevesagents-1.2.0.tgz ./reevesagents-orchestrator-1.2.0.tgz
146
+ reevesagents web --prebeta-orchestrator
147
+ ```
148
+
149
+ From source:
150
+
151
+ ```sh
152
+ git clone <repository-url>
153
+ cd reevesagents
154
+ pnpm install
155
+ pnpm build
156
+ pnpm link --global
157
+ ```
158
+
159
+ The source repository includes the pre-beta orchestrator package for development
160
+ and verification, but the root workspace and root npm tarball still ship only
161
+ the stable app and Web beta assets.
162
+
163
+ Verify:
164
+
165
+ ```sh
166
+ reevesagents --version
167
+ reevesagents doctor
168
+ ```
169
+
170
+ ## Quick Start
171
+
172
+ ```sh
173
+ reevesagents doctor
174
+ reevesagents
175
+ ```
176
+
177
+ The first screen is always Welcome. It is a persistent main menu: use arrows and Enter to choose New Run, Runs, Doctor, Settings, Reference, Credits, or Quit. New Run starts the agent-run wizard directly. When launched with run context, Welcome also shows Current Run. Runs auto-archives ended and stale run records on refresh.
178
+
179
+ Agent-run mode can also start from the CLI:
180
+
181
+ ```sh
182
+ reevesagents spawn codex-cli:builder claude-code:reviewer --name "release check" --prompt "Inspect the release state."
183
+ ```
184
+
185
+ Agent specs can include an optional model as `provider:nickname:model`:
186
+
187
+ ```sh
188
+ reevesagents spawn claude-code:planner:sonnet codex-cli:builder:gpt-5-codex
189
+ ```
190
+
191
+ Leave the model off to use the provider default.
192
+
193
+ ## TUI Pages
194
+
195
+ - Welcome: animated `REEVES AGENTS` block logo, chafa-rendered blocky duck mascot, and persistent main menu.
196
+ - Runs: list active runs, start new runs, and open shared run history.
197
+ - History: show archived ended and stale runs with simple metadata.
198
+ - Run hub: show agents, output, add-agent, stop, and back actions.
199
+ - Agent detail: inspect provider, status, working directory, tmux ids, recent output, prompt, open window, and close window.
200
+ - New Run wizard: configure providers, prompts, and windows.
201
+ - Settings: provider detection and state paths.
202
+ - Doctor: setup and environment health checks only.
203
+ - Reference: compact in-app map of the TUI, CLI, and tmux workflow.
204
+ - Credits: package metadata, stack, providers, license, and repository.
205
+
206
+ The TUI is visible-menu first: arrows navigate, Enter selects, and Esc/Backspace goes back. Text fields accept normal typing, non-model pickers use Left/Right, and model fields open a selectable model list with Enter. Welcome also accepts `q` to quit. There are no slash commands, Tab-driven focus panes, hidden command palette, or embedded terminal.
207
+
208
+ ## Visual Design
209
+
210
+ - The Welcome page animates the blue block logo and shows the duck hero variant.
211
+ - The Runs page uses a static sectioned list to reduce flicker during normal use.
212
+ - The interactive TUI enables color even when the parent shell exports `NO_COLOR` or `TERM=dumb`; set `REEVES_NO_COLOR=1` to force monochrome.
213
+ - The mascot is an in-house chafa-rendered blocky duck (src/brand/assets/duck.svg).
214
+ - Layouts adapt by page and terminal width instead of forcing one three-pane layout everywhere.
215
+ - The design reference is Claude Code style terminal UX: simple visible controls, compact status, and low redraw noise.
216
+
217
+ ## CLI
218
+
219
+ ```sh
220
+ reevesagents # open TUI
221
+ reevesagents spawn [spec...] # start a run with one or more agents
222
+ reevesagents runs # list runs
223
+ reevesagents open <id> # open a run's reeves window or an agent window
224
+ reevesagents peek <agent-id> # print recent agent output
225
+ reevesagents stop <run-id> # stop one run, requires --yes or ALLOW_DESTRUCTIVE=1
226
+ reevesagents kill <agent-id> # close one agent, requires --yes or ALLOW_DESTRUCTIVE=1
227
+ reevesagents doctor # setup checks
228
+ reevesagents web # start loopback Web UI beta
229
+ reevesagents web --prebeta-orchestrator # opt into MCP/orchestrator Web controls
230
+ ```
231
+
232
+ ## State Layout
233
+
234
+ ```text
235
+ ~/.reeves/
236
+ config.json
237
+ presets/
238
+ history/
239
+ runs/
240
+ <run-id>.json
241
+ runs/
242
+ <run-id>/
243
+ run.json
244
+ agents/
245
+ <agent-id>.json
246
+ ```
247
+
248
+ `REEVES_REGISTRY` can point at an isolated state root for tests and smoke runs.
249
+
250
+ ## Development
251
+
252
+ ```sh
253
+ pnpm install
254
+ pnpm typecheck
255
+ pnpm lint
256
+ pnpm test
257
+ pnpm build
258
+ ```
259
+
260
+ Contributors should open pull requests against `master`. Release stabilization
261
+ uses `release/v1.2`; tags are cut only from verified release commits. See
262
+ [CONTRIBUTING.md](CONTRIBUTING.md) and [docs/branching.md](docs/branching.md).
263
+
264
+ Portable verification:
265
+
266
+ ```sh
267
+ pnpm verify
268
+ ```
269
+
270
+ See [docs/testing.md](docs/testing.md) for the isolated test matrix and manual TUI check.
271
+
272
+ See [docs/use-cases.md](docs/use-cases.md) for the product surface map used for careful refactors.
273
+
274
+ See [docs/release-readiness.md](docs/release-readiness.md) for the 1.2.0 release checklist.
275
+
276
+ For future-agent handoff, start with [docs/agent-brief.md](docs/agent-brief.md).
277
+
278
+ ## Status
279
+
280
+ The TUI was redesigned in May 2026 with agent runs as the default low-permission path, a unified color system, responsive frame component, focused pages, auto-cleanup of ended runs, and a visible-menu interaction model. The current release-facing source of truth is this README.
281
+
282
+ - Version: `1.2.0`
283
+ - npm package: not published yet
284
+ - Homebrew formula: not available yet
285
+
286
+ ## License
287
+
288
+ Apache 2.0
@@ -0,0 +1,129 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ colors,
4
+ isProvider,
5
+ stateRoot
6
+ } from "./chunk-MVMGFG4W.js";
7
+
8
+ // src/components/ErrorBoundary.tsx
9
+ import { Component } from "react";
10
+ import { Box, Text } from "ink";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ var ErrorBoundary = class extends Component {
13
+ constructor(props) {
14
+ super(props);
15
+ this.state = { hasError: false, error: null };
16
+ }
17
+ static getDerivedStateFromError(error) {
18
+ return { hasError: true, error };
19
+ }
20
+ componentDidCatch(error) {
21
+ process.stderr.write(`[ERROR] ${error.message}
22
+ `);
23
+ }
24
+ render() {
25
+ if (this.state.hasError && this.state.error) {
26
+ return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 1, children: [
27
+ /* @__PURE__ */ jsx(Box, { marginBottom: 1, children: /* @__PURE__ */ jsx(Text, { color: colors.status.error, bold: true, children: "ERROR" }) }),
28
+ /* @__PURE__ */ jsx(Text, { color: colors.text.primary, children: this.state.error.message }),
29
+ /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: colors.text.muted, dimColor: true, children: "press Ctrl-C to quit" }) })
30
+ ] });
31
+ }
32
+ return this.props.children;
33
+ }
34
+ };
35
+
36
+ // src/state/store.ts
37
+ import { readFileSync, writeFileSync, mkdirSync, readdirSync, unlinkSync, renameSync, existsSync } from "fs";
38
+ import { join, dirname } from "path";
39
+ function stateDir() {
40
+ return stateRoot();
41
+ }
42
+ function savedTreesDir() {
43
+ return join(stateDir(), "presets");
44
+ }
45
+ var presetsDir = savedTreesDir;
46
+ function atomicWrite(path, data) {
47
+ mkdirSync(dirname(path), { recursive: true });
48
+ const tmp = `${path}.tmp`;
49
+ writeFileSync(tmp, JSON.stringify(data, null, 2), "utf-8");
50
+ try {
51
+ renameSync(tmp, path);
52
+ } catch {
53
+ writeFileSync(path, JSON.stringify(data, null, 2), "utf-8");
54
+ }
55
+ }
56
+ function isEffort(value) {
57
+ return value === "default" || value === "low" || value === "medium" || value === "high" || value === "xhigh" || value === "max";
58
+ }
59
+ function normalizeSlot(raw, fallbackDir = "") {
60
+ const promptRaw = typeof raw.initial_prompt === "string" ? raw.initial_prompt : typeof raw.task_template === "string" ? raw.task_template : "";
61
+ return {
62
+ nickname_template: typeof raw.nickname_template === "string" ? raw.nickname_template : "agent",
63
+ provider: isProvider(raw.provider) ? raw.provider : "cc",
64
+ model: typeof raw.model === "string" ? raw.model : "",
65
+ auth_mode: raw.auth_mode === "api-key" ? "api-key" : "default",
66
+ effort: isEffort(raw.effort) ? raw.effort : "default",
67
+ initial_prompt: promptRaw,
68
+ working_dir: typeof raw.working_dir === "string" ? raw.working_dir : fallbackDir,
69
+ permissions: raw.permissions === "skip" ? "skip" : "ask",
70
+ rc_enabled: typeof raw.rc_enabled === "boolean" ? raw.rc_enabled : false
71
+ };
72
+ }
73
+ function normalizeSavedTree(raw) {
74
+ if (typeof raw !== "object" || raw === null) return null;
75
+ const obj = raw;
76
+ const legacyDir = typeof obj.working_dir_pattern === "string" ? obj.working_dir_pattern : "";
77
+ const rootRaw = typeof obj.root === "object" && obj.root !== null ? obj.root : {};
78
+ const workersRaw = Array.isArray(obj.workers) ? obj.workers : [];
79
+ return {
80
+ name: typeof obj.name === "string" ? obj.name : "preset",
81
+ description: typeof obj.description === "string" ? obj.description : "",
82
+ root: normalizeSlot(rootRaw, legacyDir),
83
+ workers: workersRaw.filter((w) => typeof w === "object" && w !== null).map((w) => normalizeSlot(w, legacyDir)),
84
+ working_dir_pattern: legacyDir || void 0,
85
+ created_at: typeof obj.created_at === "string" ? obj.created_at : (/* @__PURE__ */ new Date()).toISOString(),
86
+ updated_at: typeof obj.updated_at === "string" ? obj.updated_at : (/* @__PURE__ */ new Date()).toISOString()
87
+ };
88
+ }
89
+ function listSavedTrees() {
90
+ const dir = savedTreesDir();
91
+ if (!existsSync(dir)) return [];
92
+ try {
93
+ return readdirSync(dir).filter((f) => f.endsWith(".json")).map((f) => {
94
+ try {
95
+ return normalizeSavedTree(JSON.parse(readFileSync(join(dir, f), "utf-8")));
96
+ } catch {
97
+ return null;
98
+ }
99
+ }).filter((t) => t !== null);
100
+ } catch {
101
+ return [];
102
+ }
103
+ }
104
+ function loadSavedTree(name) {
105
+ try {
106
+ return normalizeSavedTree(JSON.parse(readFileSync(join(savedTreesDir(), `${name}.json`), "utf-8")));
107
+ } catch {
108
+ return null;
109
+ }
110
+ }
111
+ function saveSavedTree(tree) {
112
+ atomicWrite(join(savedTreesDir(), `${tree.name}.json`), tree);
113
+ }
114
+ function deleteSavedTree(name) {
115
+ try {
116
+ unlinkSync(join(savedTreesDir(), `${name}.json`));
117
+ } catch {
118
+ }
119
+ }
120
+
121
+ export {
122
+ ErrorBoundary,
123
+ presetsDir,
124
+ listSavedTrees,
125
+ loadSavedTree,
126
+ saveSavedTree,
127
+ deleteSavedTree
128
+ };
129
+ //# sourceMappingURL=chunk-3IXII4H5.js.map