wolfpack-bridge 1.5.9 → 1.6.1

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.
Files changed (2) hide show
  1. package/README.md +74 -20
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -35,9 +35,7 @@
35
35
  :+**++++++*++*+=-:: .. ...... .. .:..::
36
36
  ```
37
37
 
38
- I got tired of SSHing into 4 machines to check if Claude was stuck on a permission prompt. I wanted one screen on my phone, on my laptop, wherever that showed me every running agent across every box, and let me actually interact with them. So I built wolfpack.
39
-
40
- Mobile & desktop command center for AI coding agents. Control tmux-based sessions (Claude, Codex, Gemini, or any custom command) across multiple machines from your phone or browser. Secured by [Tailscale](https://tailscale.com/) — zero-config encrypted access, no ports to open.
38
+ Mobile & desktop command center for AI coding agents. Control agent sessions (Claude, Codex, Gemini, or any custom command) across multiple machines from your phone or browser. Two session backends: **pty** (lightweight, no dependencies) or **tmux** (persistent, survives restarts). Secured by [Tailscale](https://tailscale.com/) zero-config encrypted access, no ports to open.
41
39
 
42
40
  Install on your phone's home screen for a native app experience — scan the QR code after setup and tap **"Add to Home Screen"**.
43
41
 
@@ -52,8 +50,14 @@ Install on your phone's home screen for a native app experience — scan the QR
52
50
  ### Mobile
53
51
 
54
52
  <p align="center">
55
- <img src="docs/mobile-sessions.png" width="300" alt="Mobile — session list with multi-machine support" />
56
- <img src="docs/mobile-terminal.png" width="300" alt="Mobile — live terminal view" />
53
+ <img src="docs/mobile-sessions.png" width="250" alt="Mobile — session list with multi-machine support" />
54
+ </p>
55
+ <p align="center">
56
+ <kbd>Classic</kbd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<kbd>Ghostty (WASM)</kbd>
57
+ </p>
58
+ <p align="center">
59
+ <img src="docs/mobile-terminal.png" width="300" alt="Mobile — classic terminal mode" />
60
+ <img src="docs/mobile-ghostty.png" width="300" alt="Mobile — ghostty WASM terminal mode" />
57
61
  </p>
58
62
 
59
63
  ## Architecture
@@ -63,8 +67,8 @@ Install on your phone's home screen for a native app experience — scan the QR
63
67
  │ Phone / │ │ Tailscale │ │ Your Machine │
64
68
  │ Browser │◄────►│ (HTTPS) │◄────►│ │
65
69
  │ (PWA) │ │ mesh VPN │ │ ┌──────────┐ ┌──────┐ ┌─────┐ │
66
- └─────────────┘ └───────────┘ │ │ wolfpack │ │ tmux │ │Agent│ │
67
- │ │ server │◄│ │◄│(any)│ │
70
+ └─────────────┘ └───────────┘ │ │ wolfpack │ │pty or│ │Agent│ │
71
+ │ │ server │◄│ tmux │◄│(any)│ │
68
72
  │ │ HTTP/WS │ │ │ │ │ │
69
73
  │ └──────────┘ └──────┘ └─────┘ │
70
74
  └──────────────────────────────────┘
@@ -72,7 +76,7 @@ Install on your phone's home screen for a native app experience — scan the QR
72
76
 
73
77
  **Components:**
74
78
  - **PWA** — single-file vanilla JS app (~90KB), no framework. Mobile-optimized touch UI + desktop ANSI terminal
75
- - **Server** — Bun HTTP + WebSocket. Serves embedded assets, proxies tmux via `capture-pane`/`send-keys`
79
+ - **Server** — Bun HTTP + WebSocket. Serves embedded assets, manages sessions via pty (default) or tmux backend
76
80
  - **Ralph** — detached subprocess that iterates through a markdown plan file, invoking agents per-task
77
81
  - **Agents** — Claude, Codex, Gemini, or any shell command. Agent-agnostic by design
78
82
 
@@ -100,8 +104,26 @@ Supported platforms: macOS (Apple Silicon, Intel), Linux (x64, arm64).
100
104
 
101
105
  ### Prerequisites
102
106
 
103
- - **tmux**
104
- - **Tailscale** — install from [tailscale.com/download](https://tailscale.com/download), sign in, and make sure both your computer and phone are on the same tailnet
107
+ - **Tailscale** *(optional)* — install from [tailscale.com/download](https://tailscale.com/download), sign in, and make sure both your computer and phone are on the same tailnet. Required for remote access.
108
+ - **tmux** *(optional)* only needed if you choose the tmux backend. The default **pty** backend has no external dependencies.
109
+
110
+ ### Session Backends
111
+
112
+ Wolfpack supports two backends for managing terminal sessions. You choose during setup and can switch at runtime from Settings.
113
+
114
+ | | **PTY** (default) | **tmux** |
115
+ |---|---|---|
116
+ | **Dependencies** | None | Requires tmux installed |
117
+ | **Session persistence** | In-memory — sessions lost on server crash/restart | tmux server is a separate process — sessions survive wolfpack restarts, deploys, and crashes |
118
+ | **Terminal streaming** | Direct binary WebSocket (`/ws/pty`) — low latency | Capture-pane polling (`/ws/terminal`) |
119
+ | **Desktop terminal** | ghostty-web with full scrollback | ghostty-web with full scrollback |
120
+ | **Best for** | Quick setup, no-dependency environments | Long-running agent sessions where persistence matters |
121
+
122
+ **Why tmux is more robust:** tmux runs as an independent server process. Your agent sessions live inside tmux, not inside wolfpack. If wolfpack crashes, gets redeployed, or restarts (e.g. `launchctl kickstart`), tmux sessions keep running untouched. When wolfpack comes back up, it reconnects to the existing tmux sessions automatically. With the PTY backend, a wolfpack restart kills all running sessions — any in-progress agent work is lost.
123
+
124
+ **Why PTY is the default:** zero dependencies, simpler setup, and lower latency terminal streaming. For most users running short agent tasks, the convenience outweighs the persistence tradeoff.
125
+
126
+ Both backends can run simultaneously — the backend router tracks which backend owns each session. You can have tmux sessions and PTY sessions active at the same time.
105
127
 
106
128
  ### tmux History
107
129
 
@@ -130,17 +152,18 @@ wolfpack uninstall # Remove everything (service, config, global command
130
152
 
131
153
  On first run, `wolfpack` walks you through:
132
154
 
133
- 1. Checking prerequisites (tmux, Tailscale)
134
- 2. Setting your projects directory (default: `~/Dev`)
135
- 3. Choosing a port (default: `18790`)
136
- 4. Enabling Tailscale HTTPS access
137
- 5. Optionally installing as a login service
138
- 6. Displaying a QR code to scan with your phone
155
+ 1. Checking prerequisites (tmux, Tailscale — both optional)
156
+ 2. Choosing a session backend (pty or tmux, default: pty)
157
+ 3. Setting your projects directory (default: `~/Dev`)
158
+ 4. Choosing a port (default: `18790`)
159
+ 5. Enabling Tailscale HTTPS access
160
+ 6. Optionally installing as a login service
161
+ 7. Displaying a QR code to scan with your phone
139
162
 
140
163
  ## Features
141
164
 
142
165
  ### Session Management
143
- - Create, view, and kill tmux agent sessions
166
+ - Create, view, and kill agent sessions (pty or tmux backend)
144
167
  - Agent picker — Claude, Codex, Gemini, or custom commands per session
145
168
  - Session triage — running, idle, and needs-input states with color-coded indicators
146
169
  - Live terminal output preview on session cards
@@ -156,11 +179,16 @@ On first run, `wolfpack` walks you through:
156
179
  - `Cmd/Ctrl + K` — clear terminal
157
180
 
158
181
  ### Mobile
159
- - **Capture-pane polling** — real-time terminal view optimized for mobile
160
- - **Swipe gestures** — swipe between sessions and views
161
- - **Haptic feedback** — vibration on key actions
182
+ - **Two terminal modes** — choose in Settings:
183
+ - **Classic** (default) lightweight capture-pane polling. No WASM, works on all devices. Best for quick monitoring and input.
184
+ - **Ghostty (WASM)** — full terminal emulator via [ghostty-web](https://github.com/ghostty-org/ghostty). Richer output (colors, cursor, scrollback) but heavier on battery. Keyboard is suppressed by default — tap the keyboard button to open it.
185
+ - **Keyboard accessory** — quick-action bar with Enter, Esc, arrow keys, Ctrl combos, and git status
186
+ - **Touch scrolling** — momentum physics, long-press to select text and copy
187
+ - **Haptic feedback** — vibration on key actions (toggleable)
162
188
  - **PWA** — install as a standalone app on your phone's home screen
163
189
 
190
+ All settings (terminal mode, font size, haptics, etc.) persist in localStorage across sessions.
191
+
164
192
  ### Multi-Machine
165
193
  - One phone connects to multiple Wolfpack servers
166
194
  - Sessions grouped by machine with online/offline status
@@ -183,6 +211,31 @@ On first run, `wolfpack` walks you through:
183
211
 
184
212
  Tailscale's encrypted mesh network handles auth and routing — no ports to open, no DNS to configure.
185
213
 
214
+ ### Security
215
+
216
+ **Always use the Tailscale hostname** (e.g. `https://mybox.tail1234.ts.net`) — not raw IPs. The QR code from setup already points to the correct URL. Raw IP access (LAN or Tailscale `100.x.x.x`) bypasses Tailscale's DNS-based routing and may not be protected by CORS.
217
+
218
+ **JWT authentication** adds a second layer of protection. Without it, anyone who can reach the server port has full access to your tmux sessions. To enable:
219
+
220
+ 1. Generate a secret (minimum 32 characters):
221
+ ```bash
222
+ openssl rand -base64 48
223
+ ```
224
+ 2. Set the environment variable before starting wolfpack:
225
+ ```bash
226
+ export WOLFPACK_JWT_SECRET="your-secret-here"
227
+ ```
228
+ For service installs, add it to your shell profile or the service environment.
229
+
230
+ 3. Optional configuration:
231
+ - `WOLFPACK_JWT_AUDIENCE` — expected `aud` claim
232
+ - `WOLFPACK_JWT_ISSUER` — expected `iss` claim
233
+ - `WOLFPACK_JWT_CLOCK_TOLERANCE_SEC` — clock skew tolerance (default: 30s)
234
+
235
+ Tokens use HS256 (HMAC-SHA256). The server validates but does not issue tokens — generate them with any JWT library using the same secret.
236
+
237
+ **Without `WOLFPACK_JWT_SECRET` set, authentication is disabled.** This is fine for localhost-only usage but strongly recommended when the server is reachable over a network.
238
+
186
239
  ## Ralph Loop
187
240
 
188
241
  Autonomous task runner. Write a markdown plan file, pick an agent, set iterations, and let it rip. Ralph reads the plan, extracts the first incomplete task, hands it to the agent, marks it done, and moves on — implementing, testing, and committing along the way. See [full documentation](docs/ralph-macchio.md).
@@ -195,6 +248,7 @@ Stored in `~/.wolfpack/config.json`:
195
248
  {
196
249
  "devDir": "/Users/you/Dev",
197
250
  "port": 18790,
251
+ "backend": "pty",
198
252
  "tailscaleHostname": "your-machine.tailnet-name.ts.net"
199
253
  }
200
254
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wolfpack-bridge",
3
- "version": "1.5.9",
3
+ "version": "1.6.1",
4
4
  "type": "module",
5
5
  "description": "Mobile command center for tmux-based AI agent sessions",
6
6
  "bin": {
@@ -17,10 +17,10 @@
17
17
  "postinstall": "node bin/install.cjs"
18
18
  },
19
19
  "optionalDependencies": {
20
- "wolfpack-bridge-darwin-arm64": "1.5.9",
21
- "wolfpack-bridge-darwin-x64": "1.5.9",
22
- "wolfpack-bridge-linux-arm64": "1.5.9",
23
- "wolfpack-bridge-linux-x64": "1.5.9"
20
+ "wolfpack-bridge-darwin-arm64": "1.6.1",
21
+ "wolfpack-bridge-darwin-x64": "1.6.1",
22
+ "wolfpack-bridge-linux-arm64": "1.6.1",
23
+ "wolfpack-bridge-linux-x64": "1.6.1"
24
24
  },
25
25
  "keywords": [
26
26
  "tmux",