@sailorbridge/client 0.2.2 → 0.2.4

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
@@ -17,6 +17,30 @@ writable and its `bin` directory is on `PATH`. Prefer a user-owned Node install
17
17
  from tools such as nvm/asdf over `sudo npm install -g`. Linux and macOS are the
18
18
  supported targets; Windows packaging support is deferred.
19
19
 
20
+ Upgrade an npm-installed client and reload a running managed host daemon in one
21
+ step:
22
+
23
+ ```bash
24
+ sailorbridge upgrade
25
+ ```
26
+
27
+ The command installs `@sailorbridge/client@latest`, compares the running and
28
+ installed versions, and restarts the product-managed user systemd unit or
29
+ LaunchAgent when it is running. If the host runs in the foreground or under
30
+ another supervisor, the command prints the exact manual restart action. An npm
31
+ failure is returned immediately with npm's stderr unchanged.
32
+
33
+ The host daemon also keeps itself current: the relay broadcasts the latest
34
+ released client version on every register/heartbeat, and `host run` upgrades
35
+ through the same npm channel when the host is idle (active sessions defer the
36
+ update; after 24 hours of continuous activity it upgrades at the next job gap).
37
+ A failed attempt is logged and reported to the relay as `update_error`, then
38
+ retried on a cooldown. Opt out with `sailorbridge host run
39
+ --disable-auto-update` or `"auto_update": false` in
40
+ `~/.sailorbridge/host-config.json` — but hosts below the relay's minimum
41
+ supported version are refused at the handshake (HTTP 426) until upgraded, so a
42
+ disabled host must be kept current manually.
43
+
20
44
  For a managed host daemon, use the compiled single-binary path instead of a
21
45
  Node-based global install. Build or download the native `sailorbridge` binary,
22
46
  then log in once — `login` installs and starts the user service itself:
@@ -63,6 +87,7 @@ Common commands:
63
87
  ```bash
64
88
  sailorbridge --help
65
89
  sailorbridge login
90
+ sailorbridge upgrade
66
91
  sailorbridge workflow
67
92
  sailorbridge mailbox peek "$SAILORBRIDGE_AGENT_NAME"
68
93
  sailorbridge mailbox ack MESSAGE_ID --lease-token LEASE_TOKEN
@@ -80,6 +105,10 @@ sailorbridge worker serve --worker dev-1 --workdir "$PWD"
80
105
  sailorbridge supervise --agent ab_hand --cli codex --cwd "$PWD" --i-own-this-agent
81
106
  ```
82
107
 
108
+ `worker list`, `worker run`, and `worker job` are member-runtime commands;
109
+ `worker serve` instead uses a worker enrollment credential. The paired host
110
+ credential created by `login` authorizes neither surface.
111
+
83
112
  The package ships only the built CLI/runtime files under `dist/src/` plus this
84
113
  README. It deliberately does not publish `src/`, `tests/`, or `dist/tests/`.
85
114
  Create a release tarball with `npm run pack:staged`; it stages the current build without
@@ -146,9 +175,11 @@ SAILORBRIDGE_MAX_CONCURRENCY=1
146
175
  `SAILORBRIDGE_CAPTAIN_ID` is required by `worker list`, `worker run`, and
147
176
  `worker job`; it must be a numeric string. `worker list` and `worker run` also
148
177
  require `SAILORBRIDGE_SESSION` so an unbound admin credential cannot
149
- accidentally discover workers across teams. A paired host credential can
150
- supply the captain id, but it does not contain a session, so list/run still
151
- need `SAILORBRIDGE_SESSION`. Agent routing uses the separate
178
+ accidentally discover workers across teams. These commands require a
179
+ member-runtime credential; a paired host credential is not a member credential
180
+ and is rejected before any relay request. Use the console Workers page to list
181
+ workers, or run the command inside a member workspace where the product provides
182
+ the token, captain id, and session. Agent routing uses the separate
152
183
  `SAILORBRIDGE_AGENT_NAME`.
153
184
 
154
185
  `SAILORBRIDGE_HOST_ID` and `SAILORBRIDGE_HOST_DISPLAY_NAME` identify the
@@ -197,8 +228,9 @@ status never completes a SailorBridge task lifecycle.
197
228
  `https://www.sailorbridge.com`. The command displays the one-time code and
198
229
  polls until approval. The stored credential contains a host-scoped relay key
199
230
  (`key_scope: "host"` plus `host_id`) and is used as a fallback when
200
- `SAILORBRIDGE_RELAY_URL` or `SAILORBRIDGE_TOKEN` are not set. Raw host keys are
201
- written to the credentials file only. Data commands default to
231
+ `SAILORBRIDGE_RELAY_URL` or `SAILORBRIDGE_TOKEN` are not set. Worker data
232
+ commands reject this host-scoped fallback before any relay request. Raw host
233
+ keys are written to the credentials file only. Data commands default to
202
234
  `--format plain`; login's plain success output prints the host id, credential
203
235
  path, and service status. Explicit `--format json` prints key id and host
204
236
  metadata, not the token.