@staff0rd/assist 0.710.1 → 0.711.0
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 +31 -3
- package/dist/commands/sessions/web/bundle.js +1 -1
- package/dist/index.js +407 -34
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -387,7 +387,7 @@ The Config tab of the sessions web dashboard never receives secret values: `GET
|
|
|
387
387
|
- `assist sessions close` - Dismiss the current daemon-managed session: kills its process tree, removes its card from the dashboard and reaps its worktree. Outside such a session it reports there is nothing to close and exits 0
|
|
388
388
|
- `assist sessions rename <title>` - Retitle the current daemon-managed session: the given title replaces the generated title and the backlog item name on its dashboard card for the rest of its life. Outside such a session it reports there is nothing to rename and exits 0
|
|
389
389
|
- `assist sessions nodes [--json]` - List this node and every linked node with its link state (see [Linked nodes](#linked-nodes))
|
|
390
|
-
- `assist sessions nodes link <name>
|
|
390
|
+
- `assist sessions nodes link <name> [url] [--ssh <alias> --port <port>] [--local-port <port>]` - Link a peer node by its web server URL, or over an ssh tunnel
|
|
391
391
|
- `assist sessions nodes unlink <name>` - Remove a linked node
|
|
392
392
|
- `assist sessions nodes doctor [name] [--json]` - Probe each hop of every link (or one) and stop at the first failure with a remediation
|
|
393
393
|
- `assist sessions nodes logs <name> [-n, --lines <count>] [--json]` - Tail a linked node's `daemon.log` through its web server
|
|
@@ -426,14 +426,42 @@ A `run:` entry in `assist.yml` flagged `server:` (with an optional display-only
|
|
|
426
426
|
Each assist install is a **node** with its own daemon and web server. A node can link to other nodes, and its web UI then shows its own sessions merged with each linked node's, as `<node>:<id>` cards carrying a node badge. Links are flat: a node only exports its own sessions and log lines, so two nodes linked to each other show no duplicates. See [docs/multi-node-sessions.md](docs/multi-node-sessions.md).
|
|
427
427
|
|
|
428
428
|
- `assist sessions nodes [--json]` — this node and each link's state (connected / connecting / disconnected / version-blocked), peer version and last error.
|
|
429
|
-
- `assist sessions nodes link <name> <url>` — link a peer by its web server URL, e.g. `assist sessions nodes link <name> http://127.0.0.1:<port>`. `<name>` must match the peer's `sessions.nodeName`. A running daemon picks up the change immediately.
|
|
429
|
+
- `assist sessions nodes link <name> <url>` — link a peer by its web server URL, e.g. `assist sessions nodes link <name> http://127.0.0.1:<port>`. `<name>` must match the peer's `sessions.nodeName`. A running daemon picks up the change immediately. With `--ssh <alias> --port <port>` the link goes over ssh instead: the daemon keeps `ssh -N -L <local-port>:127.0.0.1:<port> <alias>` up, restarting it behind the link's circuit breaker and logging its stderr to `daemon.log` as `link <name> ssh:`, and the link and `?node=` panel requests dial the local end. `--local-port` defaults to 43000 + `port` % 1000, bumped past any other link's.
|
|
430
430
|
- `assist sessions nodes unlink <name>` — remove a link.
|
|
431
|
-
- `assist sessions nodes doctor [name] [--json]` — probes each link's hops in order: the peer's web server (`GET /api/health`, including that its `nodeName` matches the link), the peer's daemon (as its health reports it), a WebSocket `hello` (version and protocol), then this node's own link state. It stops at the first failing hop and prints the raw error with a remediation, and exits 1 on any failure. On WSL with no links, it reports a Windows node answering on `127.0.0.1:3101` and prints the command that links it.
|
|
431
|
+
- `assist sessions nodes doctor [name] [--json]` — probes each link's hops in order: for an ssh link, the SSH agent (the alias's `IdentityAgent` answering `ssh-add -l`), `ssh -o BatchMode=yes <alias>` reach and auth, and the local tunnel port accepting; then the peer's web server (`GET /api/health`, including that its `nodeName` matches the link), the peer's daemon (as its health reports it), a WebSocket `hello` (version and protocol), then this node's own link state. It stops at the first failing hop and prints the raw error with a remediation, and exits 1 on any failure. On WSL with no links, it reports a Windows node answering on `127.0.0.1:3101` and prints the command that links it.
|
|
432
432
|
- `assist sessions nodes logs <name> [-n, --lines <count>] [--json]` — tail a linked node's `daemon.log` (default 200 lines) through its web server's `GET /api/daemon-log`; naming this node reads the local log.
|
|
433
433
|
- `sessions.linkVersionCheck` — reaction to a version mismatch with a linked node: `block` (default) heals an older peer by calling its `POST /api/self-update` (runs `assist update`, then restarts its daemon and web server) and reconnects, latching with an error if the gap remains or this node is the older side; `warn` proceeds anyway; `off` skips the check.
|
|
434
434
|
|
|
435
435
|
With more than one node, a machine picker appears in the top nav and a machine selector in the new-session dialog; the dialog's selector defaults to the top nav's choice, which is remembered per browser. Linked nodes' daemon lines appear in this node's `daemon.log` tagged `[<node>]`. Every launch forwarded over a link and every `?node=` panel request carries a `traceId`, logged as `trace=<id>` by both nodes. `GET /api/health` reports the node's name, version, protocol, daemon reachability and its links' states. The retired `sessions.windows*` keys are ignored.
|
|
436
436
|
|
|
437
|
+
#### Linking machines over ssh
|
|
438
|
+
|
|
439
|
+
Peer web servers stay bound to loopback; a remote node is reached through an ssh tunnel, with keys held by the 1Password SSH agent.
|
|
440
|
+
|
|
441
|
+
1. On a Windows peer, install and start OpenSSH Server: `Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0`, then `Set-Service sshd -StartupType Automatic; Start-Service sshd`. For an administrator account, put the linking node's public key in `C:\ProgramData\ssh\administrators_authorized_keys`, otherwise in `~\.ssh\authorized_keys`.
|
|
442
|
+
2. On a Mac peer, turn on System Settings → General → Sharing → Remote Login and add the linking node's public key to `~/.ssh/authorized_keys`.
|
|
443
|
+
3. On the linking node, turn on 1Password → Settings → Developer → Use the SSH agent, and add a host entry to `~/.ssh/config`:
|
|
444
|
+
|
|
445
|
+
```
|
|
446
|
+
Host pc
|
|
447
|
+
HostName <pc hostname or IP>
|
|
448
|
+
User <user>
|
|
449
|
+
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
On Windows 1Password serves the agent on the OpenSSH pipe, so no `IdentityAgent` is needed there. Run `ssh pc` once to accept the host key.
|
|
453
|
+
|
|
454
|
+
4. Link the nodes. From the Mac to both PC nodes:
|
|
455
|
+
|
|
456
|
+
```
|
|
457
|
+
assist sessions nodes link pc-wsl --ssh pc --port 3100
|
|
458
|
+
assist sessions nodes link pc-windows --ssh pc --port 3101
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
and optionally from the PC's WSL node back to the Mac (with a `Host mac` entry): `assist sessions nodes link mac --ssh mac --port 3100`.
|
|
462
|
+
|
|
463
|
+
5. Check each link with `assist sessions nodes doctor`.
|
|
464
|
+
|
|
437
465
|
### Session config keys
|
|
438
466
|
|
|
439
467
|
- `sessions.nodeName` — this install's node label, shown at the top of the web UI's hamburger menu and reported by `GET /api/health` (with the assist version, protocol and whether the daemon is reachable). Defaults to the OS hostname, suffixed `-wsl` under WSL.
|