@mmmbuto/nexuscrew 0.8.9 → 0.8.11

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
@@ -16,7 +16,7 @@ panes, windows. tmux does the work; the browser is just a faithful client.
16
16
 
17
17
  ---
18
18
 
19
- ## What it is (v0.8.9 "Hydra Workspaces")
19
+ ## What it is (v0.8.11 "Tmux Survival")
20
20
 
21
21
  - Runs a small server on the host where your tmux sessions live.
22
22
  - Each attach spawns a real PTY running `tmux attach` and bridges its bytes over a WebSocket
@@ -24,6 +24,10 @@ panes, windows. tmux does the work; the browser is just a faithful client.
24
24
  - **Desktop grid** (≥1024px): drag sessions from the sidebar into a tiling column layout —
25
25
  live terminals side by side, draggable dividers, per-tile composer, layout remembered.
26
26
  Tiles attach with `ignore-size` so they never resize your real terminals.
27
+ - **Ordered Fleet roster**: local and remote locations are independently collapsible and
28
+ filterable by all, pinned, active, or off. The desktop chrome stays fixed while the roster
29
+ scrolls; the mobile header stays visible above its own touch-scrolling list, and the compact
30
+ version/endpoint/language footer remains readable on narrow screens.
27
31
  - **Attached decks by default**: named workspaces switch as tabs inside the same PWA without
28
32
  reloading terminals or losing a pending layout save. Use `↗` only when you want to detach a
29
33
  deck into another browser window or monitor.
@@ -33,8 +37,9 @@ panes, windows. tmux does the work; the browser is just a faithful client.
33
37
  management use the selected location through a scoped single-origin route.
34
38
  - **One-link node pairing**: paste a link or scan its QR in Settings → Nodes. A complete
35
39
  link tests SSH, exchanges the one-time invitation, confirms both directions and verifies
36
- the peer automatically; failures identify the exact connection stage. Once a rendezvous
37
- is configured, creating the link needs no repeated host or port fields.
40
+ the peer automatically; failures identify the exact connection stage. A device already
41
+ connected to a hub creates invitations through that hub; a standalone hub asks only for
42
+ the SSH address by which the receiving device can reach it.
38
43
  - **Settings and wizard**: manage roles, nodes, token rotation, and service regeneration
39
44
  from the UI; the first-run wizard uses the same pairing flow as Settings.
40
45
  - **Cell lifecycle from the UI**: the primary `+` creates a managed Fleet cell at Local or
@@ -61,7 +66,8 @@ panes, windows. tmux does the work; the browser is just a faithful client.
61
66
  inserts the saved paths without submitting Enter; ordinary text paste is unchanged.
62
67
  - **Safe npm auto-update**: global installs follow stable npm `latest` without downgrades,
63
68
  serialize installation across processes, verify the restarted runtime and roll back once
64
- to the exact previous version if the new server does not become healthy.
69
+ to the exact previous version if the new server does not become healthy. On Linux, stopping
70
+ or restarting the HTTP service preserves the independent shared tmux server and every session.
65
71
  - **Universal**: a PTY is a PTY — a coding agent, a REPL, a plain shell, anything tmux holds.
66
72
 
67
73
  ## Screenshots
@@ -153,6 +159,9 @@ entirely.
153
159
  - **Node.js ≥ 18**
154
160
  - **tmux** on the host (3.4+; the non-destructive `ignore-size` attach is honored on 3.4 and
155
161
  later)
162
+ - **OpenSSH client (`ssh`)** for Hydra nodes and a clean `nexuscrew doctor`. A local-only tmux
163
+ session does not invoke it, but the installation is reported degraded until it is present.
164
+ `autossh` is detected by doctor but is not required.
156
165
  - A PTY backend is resolved automatically per platform: Darwin ARM64/x64 and Linux ARM64/x64
157
166
  scriptless prebuilds, including the native Android ARM64 provider on Termux.
158
167
 
@@ -168,7 +177,7 @@ ssh -L 41820:127.0.0.1:41820 user@your-host
168
177
  # then run `nexuscrew show` on the machine where the browser is available
169
178
  ```
170
179
 
171
- autossh reverse tunnels or a VPN work the same way. A local **authentication token** (0600 file,
180
+ A user-managed autossh tunnel or a VPN works the same way. A local **authentication token** (0600 file,
172
181
  auto-generated and passed directly to the browser by `nexuscrew show`) is a second factor on top of your SSH/VPN gate. The
173
182
  token travels in the URL **fragment** (`#token=…`), so it never reaches the server logs.
174
183
 
@@ -181,9 +190,9 @@ Every installation is always the local node and can join other NexusCrew nodes.
181
190
  flow stays entirely in the PWA:
182
191
 
183
192
  1. On the installation being shared, open **Settings → Nodes → Invite a node** and create the
184
- ten-minute link/QR. If its rendezvous is already configured, this is a zero-field action.
185
- Otherwise expand the advanced fields once and enter the OpenSSH target or Host alias that
186
- the *other device* uses to reach this installation.
193
+ ten-minute link/QR. A device already connected to a hub uses that hub automatically.
194
+ A standalone hub needs one value: the OpenSSH target or Host alias that the *other device*
195
+ uses to reach it. This is not `127.0.0.1` and not a NexusCrew HTTP URL.
187
196
  2. On the other device, open its own NexusCrew PWA (`nexuscrew show`), go to
188
197
  **Settings → Nodes**, and use the first card, **Connect with one link**. Paste the complete
189
198
  link in the prominent field or scan the QR. Do not navigate to the loopback address in the
@@ -196,17 +205,21 @@ flow stays entirely in the PWA:
196
205
 
197
206
  The link never contains an SSH key, identity file, API key or PWA token. Its only credential is
198
207
  the random, one-time pairing invite; SSH routing fields are non-secret configuration. A
199
- successful pairing creates a reciprocal loopback-only link and both sides exchange a redacted
200
- topology automatically.
208
+ successful pairing creates one supervised SSH connection to the hub. Its normal `-L` channel
209
+ is private and provides access to the hub. The optional `-R` channel is added to that same SSH
210
+ process only when the user enables **Share this node**, after which the hub verifies it before
211
+ advertising the device. Both sides exchange only redacted topology.
201
212
 
202
- Pairing also exchanges node roles. An inbound phone or laptop that is not advertising itself as
203
- an always-reachable node is shown as **passive** while away, not as a broken red peer. A declared
204
- server/node that stops responding, or a live endpoint that rejects authentication, remains a
205
- real health error.
213
+ A newly paired phone or laptop is private by default: the hub keeps it in Settings without
214
+ probing it as a server or showing a false red error. Enabling Share makes it routable and turns
215
+ authenticated reverse-channel health into a real requirement; a shared node that stops
216
+ responding, or a live endpoint that rejects authentication, remains a real health error.
206
217
 
207
218
  NexusCrew does not create SSH keys or edit `authorized_keys`. OpenSSH remains authoritative for
208
219
  identity files, agents, host keys, ports, ProxyJump and forwarding policy. NexusCrew uses
209
- `autossh` when available and otherwise its supervised `ssh`; configured links return at boot.
220
+ one built-in retry supervisor around `ssh`; it never nests `autossh`. `nexuscrew doctor` reports
221
+ whether both binaries are installed and states that OpenSSH is the transport actually used.
222
+ Missing `ssh` is a blocking error; `autossh` is optional. Configured links return at boot.
210
223
  Pair credentials are random, per-peer and scoped only to the federated session/file surface—the
211
224
  PWA token never crosses a peer link.
212
225
 
@@ -221,7 +234,7 @@ transitive nodes remain listed as offline with their last-seen time while a rela
221
234
  ### Linux
222
235
 
223
236
  ```bash
224
- # Install Node.js 18+ and tmux 3.4+ with your distribution package manager first.
237
+ # Install Node.js 18+, tmux 3.4+ and OpenSSH with your package manager first.
225
238
  npm install -g @mmmbuto/nexuscrew
226
239
  nexuscrew
227
240
  ```
@@ -248,7 +261,7 @@ distribution, so it does not require Developer ID signing.
248
261
 
249
262
  ```bash
250
263
  pkg update
251
- pkg install nodejs-lts tmux
264
+ pkg install nodejs-lts tmux openssh
252
265
  npm install -g @mmmbuto/nexuscrew
253
266
  nexuscrew
254
267
  ```
@@ -264,6 +277,9 @@ exits:
264
277
  nexuscrew # background start; opens only on first run
265
278
  nexuscrew show # background start when needed + open the authenticated PWA
266
279
  nexuscrew show token # print the clickable authenticated URL; do not open a browser
280
+ nexuscrew status # compact service, port and hub-connection state
281
+ nexuscrew stop # stop server/tunnels; preserve every tmux session
282
+ nexuscrew restart # restart server safely; restore autostart hub links, preserve tmux
267
283
  nexuscrew boot # opt in to startup persistence
268
284
  nexuscrew boot off # disable startup persistence, keep the current run alive
269
285
  ```
@@ -289,6 +305,11 @@ accepts a prerelease from `latest`, never downgrades, and redacts registry crede
289
305
  paths from PWA errors. Its current state and manual check/apply controls live in Settings →
290
306
  System. Set `NEXUSCREW_AUTO_UPDATE=0` (or `false`, `no`, `off`) to disable scheduling.
291
307
 
308
+ On Linux, the installed service uses `KillMode=process`: service lifecycle affects NexusCrew,
309
+ not the shared tmux server. Existing units are protected by an atomic drop-in before any CLI or
310
+ auto-update restart; if systemd cannot apply that guard, the restart fails closed. `nexuscrew
311
+ doctor` reports the effective runtime `KillMode`.
312
+
292
313
  ## CLI
293
314
 
294
315
  ```
@@ -309,7 +330,8 @@ by normal startup, help, doctor, or service output.
309
330
 
310
331
  `nexuscrew mcp` runs a minimal **stdio MCP server** (JSON-RPC 2.0, one JSON message per
311
332
  line, zero SDK dependencies) that brings NexusCrew *inside* your AI sessions. An agent
312
- running in a tmux session gets five tools — the cell→human channel:
333
+ running in a tmux session gets six tools — the cell→human channel plus its
334
+ read-only deck context:
313
335
 
314
336
  - `nc_notify {title, body?, urgency?}` — human notification: toast on every open UI +
315
337
  web push on subscribed devices (enable push from Settings → System).
@@ -319,11 +341,17 @@ running in a tmux session gets five tools — the cell→human channel:
319
341
  `NEXUSCREW_REPLY_LABEL`; bracketed paste, never submits).
320
342
  - `nc_send_file {path, caption?}` — copies a file (absolute path under HOME) into the
321
343
  session outbox: badge + notification, downloadable from the Files panel.
344
+ - `nc_deck {}` — identifies the caller's tmux session and node, then returns every local or
345
+ authorized shared-owner deck that contains it. Deck identity is owner-qualified; members
346
+ include stable owner ID, Fleet cell name (when managed), exact tmux session and the Hydra
347
+ route valid from the caller. Unavailable members remain visible with `cell: null`.
322
348
  - `nc_status {}` / `nc_inbox {}` — read-only: live sessions + fleet cells / inbox files.
323
349
 
324
350
  The caller's identity is the tmux session name (`$TMUX` → `tmux display-message`), with
325
351
  `NEXUSCREW_MCP_SESSION` as fallback for non-tmux contexts. The bridge talks to the local
326
352
  HTTP API (loopback + token from `~/.nexuscrew/token`); the cell↔cell bus stays out of scope.
353
+ `nc_deck` is discovery only: use the AI client's verified tmux-messaging workflow to contact
354
+ another member, and never scrape `decks.json` directly.
327
355
 
328
356
  Register it in **Claude Code** (`.mcp.json` in your project root, or `~/.claude.json`):
329
357
 
@@ -363,14 +391,14 @@ holding.** On a screen smaller than the session you'll see a clipped view (expec
363
391
  ## Develop
364
392
 
365
393
  ```bash
366
- npm test # node --test (config, tmux list, pty attach smoke, ws bridge, token)
394
+ npm test # node --test on a private tmux socket (never the operator's server)
367
395
  npm run build # builds the frontend into frontend/dist
368
396
  node bin/nexuscrew.js serve
369
397
  ```
370
398
 
371
399
  ## Status
372
400
 
373
- The current stable release is **v0.8.9**. npm **`latest`**, the GitHub tag and the release
401
+ The current release candidate is **v0.8.11**. npm **`latest`**, the GitHub tag and the release
374
402
  assets are promoted from the same verified artifact.
375
403
 
376
404
  ## License