@viraatdas/rudder 0.7.31 → 0.7.32

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/README.md CHANGED
@@ -91,10 +91,12 @@ By default the CLI points at the hosted Rudder Cloud control plane:
91
91
  `https://mpd2pmnpep.us-east-1.awsapprunner.com`. Set `RUDDER_CLOUD_URL` to
92
92
  override it for local development or another deployment.
93
93
 
94
- Inside the dashboard, `/login` starts browser auth, `/cloud list` lists cloud
95
- workers after you are logged in, and `/cloud` starts a cloud worker with a
96
- generated memorable name. `/cloud <name>` and `/sail <name>` start named cloud
97
- workers. `/cloud help` shows the cloud command reference.
94
+ Inside the dashboard, `/login` starts browser auth and `/cloud list` lists
95
+ cloud workers after you are logged in. `/cloud` opens a confirmation pane before
96
+ anything launches. Press `Enter` or `n` to start a fresh Fly microVM from the
97
+ current repo, or press `o` to upload the selected local run and continue it in
98
+ the cloud. `/cloud <name>` uses the same prompt but gives the fresh worker a
99
+ specific name. `/cloud help` shows the cloud command reference.
98
100
 
99
101
  Cloud workers use Fly Machines by default. To bring your own workstation or
100
102
  server instead, add it to `~/.ssh/config` and run:
@@ -105,12 +107,14 @@ rudder cloud setup-byoc rudder-workstation
105
107
 
106
108
  That SSH host should use key-based auth and have Docker available to your SSH
107
109
  user. Rudder checks the host and stores it in `~/.rudder/cloud-auth.json`.
108
- After that, `rudder cloud <task>`, `/cloud <task>`, and `/sail <task>` prepare
109
- a BYOC run and Rudder tries to start it on that host over SSH. If SSH or Docker
110
- is not ready, Rudder prints the Docker command so you can run it manually on the
111
- server. Use `rudder cloud setup-fly` to switch future launches back to Fly, or
112
- `rudder cloud runtime [fly|byoc]` to inspect or change the saved runtime. For
113
- one launch without changing the default, use `rudder cloud byoc "<task>"`.
110
+ user. Rudder checks the host and stores it in `~/.rudder/cloud.json`.
111
+ After that, `rudder cloud <task>` and `/sail <task>` prepare a BYOC run and
112
+ Rudder tries to start it on that host over SSH. Dashboard `/cloud` always uses
113
+ Fly for its fresh cloud-worker path so the main cloud shortcut behaves
114
+ consistently. Use `rudder cloud setup-fly` to switch future CLI launches back to
115
+ Fly, or `rudder cloud runtime [fly|byoc]` to inspect or change the saved CLI
116
+ runtime. For one BYOC launch without changing the default, use
117
+ `rudder cloud byoc "<task>"`.
114
118
  Set `RUDDER_BYOC_AUTOSTART=0` if you always want Rudder to print the Docker
115
119
  command instead of starting it over SSH.
116
120
 
@@ -157,6 +161,159 @@ starts Fly Machines workers with one-hour presigned snapshot URLs. The local CLI
157
161
  package stays small; cloud state and worker orchestration run in the separate
158
162
  control plane.
159
163
 
164
+ ## Architecture
165
+
166
+ Rudder has three layers:
167
+
168
+ ```text
169
+ ┌────────────────────────────────────────────────────────────┐
170
+ │ Local Rudder CLI │
171
+ │ native OpenTUI dashboard, task input, panes, worktrees │
172
+ ├────────────────────────────────────────────────────────────┤
173
+ │ Agent Process Layer │
174
+ │ real claude or codex terminals, not mocked transcript UIs │
175
+ ├────────────────────────────────────────────────────────────┤
176
+ │ Optional Rudder Cloud │
177
+ │ Better Auth, S3 snapshots, Fly Machines, BYOC Docker runs │
178
+ └────────────────────────────────────────────────────────────┘
179
+ ```
180
+
181
+ ### Local Dashboard
182
+
183
+ `rudder` starts the native dashboard. The native binary owns the terminal, draws
184
+ the three-pane UI, creates PTYs for workers, and routes keyboard and mouse input.
185
+
186
+ ```text
187
+ ┌───────────────┬────────────────────────────────────────────┐
188
+ │ agents │ worker │
189
+ │ task list │ live Claude Code or Codex PTY │
190
+ │ status/model │ scrollback, review view, copy selection │
191
+ ├───────────────┴────────────────────────────────────────────┤
192
+ │ task input: new tasks, slash commands, cloud launch prompts │
193
+ └────────────────────────────────────────────────────────────┘
194
+ ```
195
+
196
+ The worker pane is an actual terminal process. When you focus it, keystrokes go
197
+ to Claude Code or Codex. Rudder only intercepts global controls such as
198
+ `Ctrl-C`, pane focus, review mode, merge, and delete.
199
+
200
+ ### Worktrees And Context
201
+
202
+ Each normal task gets its own git worktree so agents do not compete inside the
203
+ same checkout.
204
+
205
+ ```text
206
+ main checkout
207
+ ├─ .rudder/runs/<run-id>/run.json local run metadata
208
+ ├─ RUDDER.md current agent map, gitignored
209
+ └─ ~/.rudder-worktrees/<repo>/<run-id> isolated agent checkout
210
+ ```
211
+
212
+ `RUDDER.md` is regenerated as agents start, finish, restart, or delete. Rudder
213
+ injects a short prompt telling each agent to read it, so a new agent can see
214
+ what other agents are doing without Rudder rewriting the user task.
215
+
216
+ Merging is intentionally git-native:
217
+
218
+ ```text
219
+ agent worktree -> optional commit -> git merge --no-ff -> main checkout
220
+ ```
221
+
222
+ If a merge conflicts, Rudder leaves the merge in place and offers to start an
223
+ AI resolver in the main checkout. It does not hide the conflicted git state.
224
+
225
+ ### Review Flow
226
+
227
+ Review mode uses Hunk when available, with git diff as the fallback path.
228
+
229
+ ```text
230
+ selected run worktree
231
+ └─ hunk diff --watch
232
+ └─ embedded PTY in the worker/review pane
233
+ ```
234
+
235
+ The review pane is also a real terminal. Mouse wheel and trackpad events scroll
236
+ Rudder's captured scrollback first; if there is no Rudder scrollback to move,
237
+ events can pass through to the inner TUI.
238
+
239
+ ### Cloud Auth
240
+
241
+ Rudder Cloud auth is separate from Claude Code and Codex auth.
242
+
243
+ ```text
244
+ /login or rudder login
245
+ -> browser opens Rudder Cloud
246
+ -> Better Auth handles Google or GitHub
247
+ -> control plane issues a Rudder CLI token
248
+ -> local CLI writes ~/.rudder/cloud.json
249
+ ```
250
+
251
+ Claude Code and Codex credentials stay in their normal locations such as
252
+ `~/.claude`, `~/.codex`, Keychain, or existing environment variables. Cloud
253
+ workers receive a filtered snapshot of useful HOME config, excluding obvious
254
+ high-risk material such as SSH keys, AWS credentials, Docker auth, kube config,
255
+ and `.env` files.
256
+
257
+ ### Fly Cloud Path
258
+
259
+ Dashboard `/cloud` always uses the Fly path for a fresh cloud worker. This keeps
260
+ the shortcut predictable even if the CLI default runtime was changed to BYOC.
261
+
262
+ ```text
263
+ task pane /cloud
264
+ -> confirmation pane
265
+ Enter or n: fresh Fly microVM
266
+ o: upload selected local run
267
+ -> local CLI creates repo snapshot
268
+ -> control plane stores snapshot in S3
269
+ -> control plane creates Fly Machine
270
+ -> worker downloads snapshot and starts Rudder
271
+ ```
272
+
273
+ The cloud indicator in the agents pane shows whether the local dashboard is
274
+ connected to Rudder Cloud and which saved CLI runtime is configured.
275
+
276
+ ### BYOC Path
277
+
278
+ BYOC is for a server you own, reachable through SSH.
279
+
280
+ ```text
281
+ rudder cloud setup-byoc <ssh-host>
282
+ -> read ~/.ssh/config
283
+ -> verify SSH and Docker
284
+ -> save host in ~/.rudder/cloud.json
285
+
286
+ rudder cloud byoc "task"
287
+ -> upload snapshot to Rudder Cloud
288
+ -> receive docker run bootstrap command
289
+ -> run it over SSH with nohup
290
+ ```
291
+
292
+ On ARM hosts, the bootstrap command switches from
293
+ `public.ecr.aws/exla/rudder-worker:latest` to
294
+ `public.ecr.aws/exla/rudder-worker:arm64`, so Jetson-style machines do not try
295
+ to run an amd64 worker image.
296
+
297
+ ### Control Plane
298
+
299
+ The hosted control plane is in `cloud/`.
300
+
301
+ ```text
302
+ cloud/src/server.ts
303
+ ├─ Better Auth pages and API routes
304
+ ├─ /api/rudder/sail launch/list/pause/resume/onload/bootstrap
305
+ ├─ S3 snapshot storage and persisted state
306
+ ├─ Fly Machines API client
307
+ └─ BYOC bootstrap command generation
308
+
309
+ cloud/worker/entrypoint.sh
310
+ ├─ download snapshot
311
+ ├─ restore selected HOME config
312
+ ├─ initialize git baseline if needed
313
+ ├─ run Rudder/Codex task
314
+ └─ heartbeat completion back to the control plane
315
+ ```
316
+
160
317
  ## Dashboard
161
318
 
162
319
  Start the native dashboard:
@@ -230,8 +387,8 @@ through suggestions and `Enter` to choose one.
230
387
  | `/plan <task>` | Start one read-only planning session without toggling plan mode |
231
388
  | `/run <task>` | Start an implementation run even when plan mode is on |
232
389
  | `/login` | Open browser login for Rudder Cloud |
233
- | `/cloud` | Start a cloud worker with a generated name; requires `/login` first |
234
- | `/cloud <name or task>` | Start a named cloud worker; with BYOC runtime, use the argument as the task |
390
+ | `/cloud` | Ask whether to start a fresh Fly cloud worker or upload the selected local run |
391
+ | `/cloud <name>` | Ask the same question, using the name for the fresh Fly worker |
235
392
  | `/cloud setup-byoc <ssh-host>` | Use an SSH host from `~/.ssh/config` for future cloud workers |
236
393
  | `/cloud runtime [fly\|byoc]` | Show or set the saved cloud runtime |
237
394
  | `/cloud list` | List cloud workers |
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viraatdas/rudder",
3
- "version": "0.7.31",
3
+ "version": "0.7.32",
4
4
  "description": "A Claude Code-style terminal app for running coding agents with worktree-isolated runs.",
5
5
  "homepage": "https://rudder.viraat.dev",
6
6
  "type": "module",