@mmmbuto/nexuscrew 0.8.7 → 0.8.10
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 +77 -20
- package/frontend/dist/assets/index-CbUkgtAz.js +91 -0
- package/frontend/dist/assets/index-ChGJawuv.css +32 -0
- package/frontend/dist/index.html +2 -2
- package/frontend/dist/version.json +1 -1
- package/lib/auth/token.js +1 -1
- package/lib/cli/commands.js +236 -141
- package/lib/cli/doctor.js +17 -14
- package/lib/cli/init.js +2 -2
- package/lib/cli/pidfile.js +3 -2
- package/lib/config.js +6 -0
- package/lib/decks/store.js +5 -2
- package/lib/fleet/builtin.js +69 -5
- package/lib/fleet/routes.js +13 -2
- package/lib/mcp/server.js +161 -0
- package/lib/nodes/commands.js +95 -123
- package/lib/nodes/health.js +33 -14
- package/lib/nodes/peering.js +75 -12
- package/lib/nodes/store.js +30 -20
- package/lib/nodes/tunnel-supervisor.js +29 -9
- package/lib/nodes/tunnel.js +217 -72
- package/lib/proxy/federation.js +81 -9
- package/lib/server.js +47 -32
- package/lib/settings/routes.js +247 -92
- package/lib/update/core.js +157 -0
- package/lib/update/manager.js +245 -0
- package/lib/update/runner.js +144 -0
- package/package.json +2 -2
- package/skills/nexuscrew-agent/SKILL.md +6 -2
- package/frontend/dist/assets/index-D2TrRtWQ.js +0 -90
- package/frontend/dist/assets/index-DrEuy6A6.css +0 -32
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.
|
|
19
|
+
## What it is (v0.8.10 "Hydra Federation")
|
|
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,16 +24,21 @@ 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
|
-
- **
|
|
28
|
-
|
|
29
|
-
|
|
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.
|
|
30
|
+
- **Attached decks by default**: named workspaces switch as tabs inside the same PWA without
|
|
31
|
+
reloading terminals or losing a pending layout save. Use `↗` only when you want to detach a
|
|
32
|
+
deck into another browser window or monitor.
|
|
30
33
|
- **Federated Hydra inventory**: connect existing NexusCrew installations through the SSH
|
|
31
34
|
configuration you already control and see local, direct, and relayed tmux fleets in one UI.
|
|
32
35
|
Route labels show where every session lives; creation, attach, files, lifecycle and Fleet
|
|
33
36
|
management use the selected location through a scoped single-origin route.
|
|
34
37
|
- **One-link node pairing**: paste a link or scan its QR in Settings → Nodes. A complete
|
|
35
38
|
link tests SSH, exchanges the one-time invitation, confirms both directions and verifies
|
|
36
|
-
the peer automatically; failures identify the exact connection stage.
|
|
39
|
+
the peer automatically; failures identify the exact connection stage. A device already
|
|
40
|
+
connected to a hub creates invitations through that hub; a standalone hub asks only for
|
|
41
|
+
the SSH address by which the receiving device can reach it.
|
|
37
42
|
- **Settings and wizard**: manage roles, nodes, token rotation, and service regeneration
|
|
38
43
|
from the UI; the first-run wizard uses the same pairing flow as Settings.
|
|
39
44
|
- **Cell lifecycle from the UI**: the primary `+` creates a managed Fleet cell at Local or
|
|
@@ -42,6 +47,9 @@ panes, windows. tmux does the work; the browser is just a faithful client.
|
|
|
42
47
|
- **Legacy session adoption**: Settings → Fleet lists managed and unmanaged tmux sessions on
|
|
43
48
|
every route. A live unmanaged session can be explicitly imported as a managed cell without
|
|
44
49
|
inventing its engine, provider or model.
|
|
50
|
+
- **Selective cell backup**: export chosen cells with their engine mapping and system prompt,
|
|
51
|
+
then select exactly which definitions to restore. Provider keys and runtime session state
|
|
52
|
+
are never exported; active cells that need a restart are reported explicitly.
|
|
45
53
|
- **Rich cards**: last activity, current command, a sanitized one-line preview per session.
|
|
46
54
|
- **Fleet control**: a built-in schema-driven fleet manager handles cells, engines, model
|
|
47
55
|
selection, and boot persistence; an existing external `fleet` CLI can take ownership through
|
|
@@ -50,7 +58,14 @@ panes, windows. tmux does the work; the browser is just a faithful client.
|
|
|
50
58
|
- **localhost-only**: the server binds `127.0.0.1` and refuses any non-loopback bind.
|
|
51
59
|
- **Stateless**: tmux *is* the persistence. No database, no accounts.
|
|
52
60
|
- **Mobile terminal controls**: long-press begins local text selection, drag extends it, and
|
|
53
|
-
the composer
|
|
61
|
+
the composer sends long or multiline drafts through the terminal's real bracketed-paste
|
|
62
|
+
mode while keeping both failed drafts and the software keyboard ready.
|
|
63
|
+
- **Desktop file paste/drop**: paste a clipboard image or drop files directly on the target
|
|
64
|
+
terminal. NexusCrew uploads them to that session's inbox—locally or through Hydra—and
|
|
65
|
+
inserts the saved paths without submitting Enter; ordinary text paste is unchanged.
|
|
66
|
+
- **Safe npm auto-update**: global installs follow stable npm `latest` without downgrades,
|
|
67
|
+
serialize installation across processes, verify the restarted runtime and roll back once
|
|
68
|
+
to the exact previous version if the new server does not become healthy.
|
|
54
69
|
- **Universal**: a PTY is a PTY — a coding agent, a REPL, a plain shell, anything tmux holds.
|
|
55
70
|
|
|
56
71
|
## Screenshots
|
|
@@ -63,7 +78,7 @@ The **Fleet Deck** desktop grid (≥1024px): drag sessions into a tiling layout
|
|
|
63
78
|
terminals side by side, each a real PTY streamed to the browser.
|
|
64
79
|
|
|
65
80
|
<p align="center">
|
|
66
|
-
<img src="docs/img/fleet-mobile.
|
|
81
|
+
<img src="docs/img/fleet-mobile.gif" width="420" alt="Animated NexusCrew mobile Fleet overview with managed AI cells and direct power controls">
|
|
67
82
|
</p>
|
|
68
83
|
|
|
69
84
|
The mobile Fleet overview keeps managed cells, current engines, activity and direct power
|
|
@@ -104,6 +119,12 @@ auto-compaction window variables, including one-million-token profiles where dec
|
|
|
104
119
|
Custom argv-based engines remain supported. Their command, environment, cwd, and prompt are
|
|
105
120
|
validated against a strict trust boundary and launched without a shell.
|
|
106
121
|
|
|
122
|
+
Settings → Fleet also provides a selective **Cells backup** flow. The JSON file contains only
|
|
123
|
+
portable cell definitions (cwd, engine choice, model mapping, boot flag and system prompt),
|
|
124
|
+
never provider credentials, PWA tokens or live tmux identifiers. During restore you choose the
|
|
125
|
+
destination engine for each cell and confirm overwrites; running cells are left untouched and
|
|
126
|
+
listed as needing a restart.
|
|
127
|
+
|
|
107
128
|
### External fleet manager
|
|
108
129
|
|
|
109
130
|
NexusCrew can instead act as a control panel for a *fleet manager* you already have: any
|
|
@@ -136,6 +157,9 @@ entirely.
|
|
|
136
157
|
- **Node.js ≥ 18**
|
|
137
158
|
- **tmux** on the host (3.4+; the non-destructive `ignore-size` attach is honored on 3.4 and
|
|
138
159
|
later)
|
|
160
|
+
- **OpenSSH client (`ssh`)** for Hydra nodes and a clean `nexuscrew doctor`. A local-only tmux
|
|
161
|
+
session does not invoke it, but the installation is reported degraded until it is present.
|
|
162
|
+
`autossh` is detected by doctor but is not required.
|
|
139
163
|
- A PTY backend is resolved automatically per platform: Darwin ARM64/x64 and Linux ARM64/x64
|
|
140
164
|
scriptless prebuilds, including the native Android ARM64 provider on Termux.
|
|
141
165
|
|
|
@@ -151,7 +175,7 @@ ssh -L 41820:127.0.0.1:41820 user@your-host
|
|
|
151
175
|
# then run `nexuscrew show` on the machine where the browser is available
|
|
152
176
|
```
|
|
153
177
|
|
|
154
|
-
autossh
|
|
178
|
+
A user-managed autossh tunnel or a VPN works the same way. A local **authentication token** (0600 file,
|
|
155
179
|
auto-generated and passed directly to the browser by `nexuscrew show`) is a second factor on top of your SSH/VPN gate. The
|
|
156
180
|
token travels in the URL **fragment** (`#token=…`), so it never reaches the server logs.
|
|
157
181
|
|
|
@@ -163,9 +187,10 @@ token travels in the URL **fragment** (`#token=…`), so it never reaches the se
|
|
|
163
187
|
Every installation is always the local node and can join other NexusCrew nodes. The normal
|
|
164
188
|
flow stays entirely in the PWA:
|
|
165
189
|
|
|
166
|
-
1. On the installation being shared, open **Settings → Nodes → Invite a node
|
|
167
|
-
|
|
168
|
-
|
|
190
|
+
1. On the installation being shared, open **Settings → Nodes → Invite a node** and create the
|
|
191
|
+
ten-minute link/QR. A device already connected to a hub uses that hub automatically.
|
|
192
|
+
A standalone hub needs one value: the OpenSSH target or Host alias that the *other device*
|
|
193
|
+
uses to reach it. This is not `127.0.0.1` and not a NexusCrew HTTP URL.
|
|
169
194
|
2. On the other device, open its own NexusCrew PWA (`nexuscrew show`), go to
|
|
170
195
|
**Settings → Nodes**, and use the first card, **Connect with one link**. Paste the complete
|
|
171
196
|
link in the prominent field or scan the QR. Do not navigate to the loopback address in the
|
|
@@ -178,12 +203,21 @@ flow stays entirely in the PWA:
|
|
|
178
203
|
|
|
179
204
|
The link never contains an SSH key, identity file, API key or PWA token. Its only credential is
|
|
180
205
|
the random, one-time pairing invite; SSH routing fields are non-secret configuration. A
|
|
181
|
-
successful pairing creates
|
|
182
|
-
|
|
206
|
+
successful pairing creates one supervised SSH connection to the hub. Its normal `-L` channel
|
|
207
|
+
is private and provides access to the hub. The optional `-R` channel is added to that same SSH
|
|
208
|
+
process only when the user enables **Share this node**, after which the hub verifies it before
|
|
209
|
+
advertising the device. Both sides exchange only redacted topology.
|
|
210
|
+
|
|
211
|
+
A newly paired phone or laptop is private by default: the hub keeps it in Settings without
|
|
212
|
+
probing it as a server or showing a false red error. Enabling Share makes it routable and turns
|
|
213
|
+
authenticated reverse-channel health into a real requirement; a shared node that stops
|
|
214
|
+
responding, or a live endpoint that rejects authentication, remains a real health error.
|
|
183
215
|
|
|
184
216
|
NexusCrew does not create SSH keys or edit `authorized_keys`. OpenSSH remains authoritative for
|
|
185
217
|
identity files, agents, host keys, ports, ProxyJump and forwarding policy. NexusCrew uses
|
|
186
|
-
|
|
218
|
+
one built-in retry supervisor around `ssh`; it never nests `autossh`. `nexuscrew doctor` reports
|
|
219
|
+
whether both binaries are installed and states that OpenSSH is the transport actually used.
|
|
220
|
+
Missing `ssh` is a blocking error; `autossh` is optional. Configured links return at boot.
|
|
187
221
|
Pair credentials are random, per-peer and scoped only to the federated session/file surface—the
|
|
188
222
|
PWA token never crosses a peer link.
|
|
189
223
|
|
|
@@ -198,7 +232,7 @@ transitive nodes remain listed as offline with their last-seen time while a rela
|
|
|
198
232
|
### Linux
|
|
199
233
|
|
|
200
234
|
```bash
|
|
201
|
-
# Install Node.js 18
|
|
235
|
+
# Install Node.js 18+, tmux 3.4+ and OpenSSH with your package manager first.
|
|
202
236
|
npm install -g @mmmbuto/nexuscrew
|
|
203
237
|
nexuscrew
|
|
204
238
|
```
|
|
@@ -225,7 +259,7 @@ distribution, so it does not require Developer ID signing.
|
|
|
225
259
|
|
|
226
260
|
```bash
|
|
227
261
|
pkg update
|
|
228
|
-
pkg install nodejs-lts tmux
|
|
262
|
+
pkg install nodejs-lts tmux openssh
|
|
229
263
|
npm install -g @mmmbuto/nexuscrew
|
|
230
264
|
nexuscrew
|
|
231
265
|
```
|
|
@@ -241,6 +275,9 @@ exits:
|
|
|
241
275
|
nexuscrew # background start; opens only on first run
|
|
242
276
|
nexuscrew show # background start when needed + open the authenticated PWA
|
|
243
277
|
nexuscrew show token # print the clickable authenticated URL; do not open a browser
|
|
278
|
+
nexuscrew status # compact service, port and hub-connection state
|
|
279
|
+
nexuscrew stop # stop server and every NexusCrew-managed SSH supervisor
|
|
280
|
+
nexuscrew restart # restart server; restore only autostart-enabled hub links
|
|
244
281
|
nexuscrew boot # opt in to startup persistence
|
|
245
282
|
nexuscrew boot off # disable startup persistence, keep the current run alive
|
|
246
283
|
```
|
|
@@ -251,8 +288,20 @@ the same authenticated NexusCrew instance, it is reused.
|
|
|
251
288
|
|
|
252
289
|
Env knobs: `NEXUSCREW_PORT` (default 41820), `NEXUSCREW_CONFIG_FILE`,
|
|
253
290
|
`NEXUSCREW_TOKEN_FILE`, `NEXUSCREW_FILES_ROOT`, `NEXUSCREW_TMUX`,
|
|
254
|
-
`NEXUSCREW_FLEET=0`,
|
|
255
|
-
resolved PTY provider at
|
|
291
|
+
`NEXUSCREW_FLEET=0`, `NEXUSCREW_READONLY=1`, and `NEXUSCREW_AUTO_UPDATE=0` to disable
|
|
292
|
+
automatic stable npm updates. Set `NEXUSCREW_DEBUG=1` to log the resolved PTY provider at
|
|
293
|
+
startup.
|
|
294
|
+
|
|
295
|
+
### Automatic updates
|
|
296
|
+
|
|
297
|
+
A global npm installation checks `@mmmbuto/nexuscrew@latest` shortly after startup and then
|
|
298
|
+
periodically. A newer stable version is installed exactly once, preflighted through the CLI,
|
|
299
|
+
and the active service or detached runtime is restarted on the same loopback port. If the new
|
|
300
|
+
runtime fails its bounded health check, NexusCrew reinstalls the exact previous version and
|
|
301
|
+
restarts once; that failed version is then blocked from automatic retry. The updater never
|
|
302
|
+
accepts a prerelease from `latest`, never downgrades, and redacts registry credentials and local
|
|
303
|
+
paths from PWA errors. Its current state and manual check/apply controls live in Settings →
|
|
304
|
+
System. Set `NEXUSCREW_AUTO_UPDATE=0` (or `false`, `no`, `off`) to disable scheduling.
|
|
256
305
|
|
|
257
306
|
## CLI
|
|
258
307
|
|
|
@@ -274,7 +323,8 @@ by normal startup, help, doctor, or service output.
|
|
|
274
323
|
|
|
275
324
|
`nexuscrew mcp` runs a minimal **stdio MCP server** (JSON-RPC 2.0, one JSON message per
|
|
276
325
|
line, zero SDK dependencies) that brings NexusCrew *inside* your AI sessions. An agent
|
|
277
|
-
running in a tmux session gets
|
|
326
|
+
running in a tmux session gets six tools — the cell→human channel plus its
|
|
327
|
+
read-only deck context:
|
|
278
328
|
|
|
279
329
|
- `nc_notify {title, body?, urgency?}` — human notification: toast on every open UI +
|
|
280
330
|
web push on subscribed devices (enable push from Settings → System).
|
|
@@ -284,11 +334,17 @@ running in a tmux session gets five tools — the cell→human channel:
|
|
|
284
334
|
`NEXUSCREW_REPLY_LABEL`; bracketed paste, never submits).
|
|
285
335
|
- `nc_send_file {path, caption?}` — copies a file (absolute path under HOME) into the
|
|
286
336
|
session outbox: badge + notification, downloadable from the Files panel.
|
|
337
|
+
- `nc_deck {}` — identifies the caller's tmux session and node, then returns every local or
|
|
338
|
+
authorized shared-owner deck that contains it. Deck identity is owner-qualified; members
|
|
339
|
+
include stable owner ID, Fleet cell name (when managed), exact tmux session and the Hydra
|
|
340
|
+
route valid from the caller. Unavailable members remain visible with `cell: null`.
|
|
287
341
|
- `nc_status {}` / `nc_inbox {}` — read-only: live sessions + fleet cells / inbox files.
|
|
288
342
|
|
|
289
343
|
The caller's identity is the tmux session name (`$TMUX` → `tmux display-message`), with
|
|
290
344
|
`NEXUSCREW_MCP_SESSION` as fallback for non-tmux contexts. The bridge talks to the local
|
|
291
345
|
HTTP API (loopback + token from `~/.nexuscrew/token`); the cell↔cell bus stays out of scope.
|
|
346
|
+
`nc_deck` is discovery only: use the AI client's verified tmux-messaging workflow to contact
|
|
347
|
+
another member, and never scrape `decks.json` directly.
|
|
292
348
|
|
|
293
349
|
Register it in **Claude Code** (`.mcp.json` in your project root, or `~/.claude.json`):
|
|
294
350
|
|
|
@@ -335,7 +391,8 @@ node bin/nexuscrew.js serve
|
|
|
335
391
|
|
|
336
392
|
## Status
|
|
337
393
|
|
|
338
|
-
The current stable release is **v0.8.
|
|
394
|
+
The current stable release is **v0.8.10**. npm **`latest`**, the GitHub tag and the release
|
|
395
|
+
assets are promoted from the same verified artifact.
|
|
339
396
|
|
|
340
397
|
## License
|
|
341
398
|
|