wmdev 0.1.0 → 0.2.2
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 +19 -17
- package/backend/dist/server.js +8657 -0
- package/bin/wmdev.js +1 -1
- package/frontend/dist/assets/{index-CYGRCW8S.js → index-CRpS9q83.js} +18 -18
- package/frontend/dist/index.html +1 -1
- package/package.json +8 -6
- package/backend/src/config.ts +0 -101
- package/backend/src/docker.ts +0 -432
- package/backend/src/env.ts +0 -36
- package/backend/src/http.ts +0 -10
- package/backend/src/lib/log.ts +0 -14
- package/backend/src/pr.ts +0 -333
- package/backend/src/rpc-secret.ts +0 -21
- package/backend/src/rpc.ts +0 -96
- package/backend/src/server.ts +0 -471
- package/backend/src/terminal.ts +0 -310
- package/backend/src/workmux.ts +0 -483
- package/backend/tsconfig.json +0 -15
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Web dashboard for [workmux](https://github.com/raine/workmux). Provides a browser UI with embedded terminals, PR status monitoring, and CI integration on top of workmux's worktree + tmux orchestration.
|
|
4
4
|
|
|
5
|
+
https://github.com/user-attachments/assets/fa13366d-e758-4221-94bf-13a5738bf7e7
|
|
6
|
+
|
|
5
7
|
## What is workmux?
|
|
6
8
|
|
|
7
9
|
[workmux](https://github.com/raine/workmux) is a CLI tool that orchestrates git worktrees and tmux. It pairs each worktree with a tmux window, provisions files (copy/symlink), runs lifecycle hooks, and has first-class AI agent support. A single `workmux add` creates the worktree, opens a tmux window with configured panes, and starts your agent. `workmux merge` merges the branch, deletes the worktree, closes the window, and cleans up branches.
|
|
@@ -19,6 +21,7 @@ wmdev is a web UI that wraps workmux. It delegates core worktree lifecycle opera
|
|
|
19
21
|
| Open/focus a worktree's tmux window | **workmux** (`workmux open`) |
|
|
20
22
|
| List worktrees and agent status | **workmux** (`workmux list`, `workmux status`) |
|
|
21
23
|
| File provisioning and lifecycle hooks | **workmux** (`.workmux.yaml` `files` and `post_create`) |
|
|
24
|
+
| Port allocation for worktree services | **wmdev** (when `portStart` is set in `.wmdev.yaml`) or **workmux** (via `post_create` hook) |
|
|
22
25
|
| Browser terminal (xterm.js ↔ tmux) | **wmdev** |
|
|
23
26
|
| Service health monitoring (port polling) | **wmdev** |
|
|
24
27
|
| PR status tracking and badges | **wmdev** (polls `gh pr list`) |
|
|
@@ -61,9 +64,13 @@ wmdev uses two config files in the project root:
|
|
|
61
64
|
```yaml
|
|
62
65
|
# Services to monitor — each maps a display name to a port env var.
|
|
63
66
|
# The dashboard polls these ports and shows health status badges.
|
|
67
|
+
# When portStart is set, wmdev auto-allocates ports for new worktrees
|
|
68
|
+
# and writes them to .env.local (no post_create hook needed).
|
|
64
69
|
services:
|
|
65
70
|
- name: string # Display name (e.g. "BE", "FE")
|
|
66
71
|
portEnv: string # Env var holding the port (e.g. "BACKEND_PORT")
|
|
72
|
+
portStart: number # (optional) Base port for slot 0 (e.g. 5111)
|
|
73
|
+
portStep: number # (optional) Increment per worktree slot (default: 1)
|
|
67
74
|
|
|
68
75
|
# Profiles define the environment when creating a worktree via the dashboard.
|
|
69
76
|
profiles:
|
|
@@ -108,8 +115,12 @@ linkedRepos: []
|
|
|
108
115
|
services:
|
|
109
116
|
- name: BE
|
|
110
117
|
portEnv: DASHBOARD_PORT
|
|
118
|
+
portStart: 5111
|
|
119
|
+
portStep: 10
|
|
111
120
|
- name: FE
|
|
112
121
|
portEnv: FRONTEND_PORT
|
|
122
|
+
portStart: 5112
|
|
123
|
+
portStep: 10
|
|
113
124
|
|
|
114
125
|
profiles:
|
|
115
126
|
default:
|
|
@@ -140,6 +151,8 @@ linkedRepos:
|
|
|
140
151
|
|-----------|------|----------|-------------|
|
|
141
152
|
| `services[].name` | string | yes | Display name shown in the dashboard |
|
|
142
153
|
| `services[].portEnv` | string | yes | Env var containing the service port (read from each worktree's `.env.local`) |
|
|
154
|
+
| `services[].portStart` | number | no | Base port for slot 0. When set, wmdev auto-allocates ports for new worktrees |
|
|
155
|
+
| `services[].portStep` | number | no | Port increment per worktree slot (default: `1`). Slot 0 is reserved for main |
|
|
143
156
|
| `profiles.default.name` | string | yes | Identifier for the default profile |
|
|
144
157
|
| `profiles.default.systemPrompt` | string | no | System prompt for the agent; `${VAR}` placeholders expanded at runtime |
|
|
145
158
|
| `profiles.default.envPassthrough` | string[] | no | Env vars passed through to the agent process |
|
|
@@ -159,20 +172,9 @@ If your `.workmux.yaml` has `auto_name.model` configured, the create-worktree di
|
|
|
159
172
|
|
|
160
173
|
## Architecture
|
|
161
174
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
├── REST API (/api/*) ──┐
|
|
166
|
-
└── WebSocket (/ws/*) ──┤
|
|
167
|
-
│
|
|
168
|
-
Backend (Bun HTTP server)
|
|
169
|
-
│
|
|
170
|
-
┌──────────────┼──────────────┐
|
|
171
|
-
│ │ │
|
|
172
|
-
workmux CLI tmux sessions Docker
|
|
173
|
-
(worktree (terminal (sandbox
|
|
174
|
-
lifecycle) access) containers)
|
|
175
|
-
```
|
|
175
|
+
<p align="center">
|
|
176
|
+
<img src="docs/architecture.svg" alt="Architecture diagram" />
|
|
177
|
+
</p>
|
|
176
178
|
|
|
177
179
|
**Backend** — Bun/TypeScript HTTP + WebSocket server (`backend/src/server.ts`):
|
|
178
180
|
|
|
@@ -183,9 +185,9 @@ Browser (localhost:5111)
|
|
|
183
185
|
|
|
184
186
|
### Terminal streaming
|
|
185
187
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
188
|
+
<p align="center">
|
|
189
|
+
<img src="docs/terminal-streaming.svg" alt="Terminal streaming diagram" />
|
|
190
|
+
</p>
|
|
189
191
|
|
|
190
192
|
When a worktree is selected, the frontend opens a WebSocket to `/ws/<worktree>`. The backend spawns a PTY via `script` and attaches to a **grouped tmux session** — a separate view into the same windows. This allows the dashboard and a real terminal to view the same worktree simultaneously.
|
|
191
193
|
|