@sailorbridge/client 0.2.3 → 0.2.5

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
@@ -89,10 +89,13 @@ sailorbridge --help
89
89
  sailorbridge login
90
90
  sailorbridge upgrade
91
91
  sailorbridge workflow
92
- sailorbridge mailbox peek "$SAILORBRIDGE_AGENT_NAME"
92
+ sailorbridge mailbox peek
93
+ sailorbridge mailbox claim
94
+ sailorbridge reply --in-reply-to MESSAGE_ID REPLY --body-file ./reply.txt
93
95
  sailorbridge mailbox ack MESSAGE_ID --lease-token LEASE_TOKEN
94
96
  printf '%s\n' 'hello $USER `date` $(pwd)' | sailorbridge mailbox send --to-agents ab_hand --tag BTW
95
- sailorbridge mailbox send --to-roles reviewer --session ab --tag PLAN-REVIEW --body-file ./plan.txt
97
+ sailorbridge mailbox send --to-roles reviewer --tag PLAN-REVIEW --body-file ./plan.txt
98
+ sailorbridge mailbox send --to-agents captain --tag REPORT --body-file ./report.txt
96
99
  sailorbridge enrollment --session ab --agent ab_hand --roles operator
97
100
  sailorbridge host register
98
101
  sailorbridge host consume --once --dry-run-start
@@ -101,10 +104,14 @@ sailorbridge host service status
101
104
  sailorbridge worker list
102
105
  sailorbridge worker run --worker dev-1 -- uname -s
103
106
  sailorbridge worker job JOB_ID
104
- sailorbridge worker serve --worker dev-1 --workdir "$PWD"
105
- sailorbridge supervise --agent ab_hand --cli codex --cwd "$PWD" --i-own-this-agent
107
+ sailorbridge worker serve
108
+ sailorbridge supervise --cli codex --cwd "$PWD" --i-own-this-agent
106
109
  ```
107
110
 
111
+ `worker list`, `worker run`, and `worker job` are member-runtime commands;
112
+ `worker serve` instead uses a worker enrollment credential. The paired host
113
+ credential created by `login` authorizes neither surface.
114
+
108
115
  The package ships only the built CLI/runtime files under `dist/src/` plus this
109
116
  README. It deliberately does not publish `src/`, `tests/`, or `dist/tests/`.
110
117
  Create a release tarball with `npm run pack:staged`; it stages the current build without
@@ -128,7 +135,7 @@ The package installs a `sailorbridge` bin after build:
128
135
  ```bash
129
136
  bun run build
130
137
  node dist/src/cli.js workflow
131
- node dist/src/cli.js mailbox peek "$SAILORBRIDGE_AGENT_NAME"
138
+ node dist/src/cli.js mailbox peek
132
139
  ```
133
140
 
134
141
  Build a native standalone binary for the current host:
@@ -171,9 +178,11 @@ SAILORBRIDGE_MAX_CONCURRENCY=1
171
178
  `SAILORBRIDGE_CAPTAIN_ID` is required by `worker list`, `worker run`, and
172
179
  `worker job`; it must be a numeric string. `worker list` and `worker run` also
173
180
  require `SAILORBRIDGE_SESSION` so an unbound admin credential cannot
174
- accidentally discover workers across teams. A paired host credential can
175
- supply the captain id, but it does not contain a session, so list/run still
176
- need `SAILORBRIDGE_SESSION`. Agent routing uses the separate
181
+ accidentally discover workers across teams. These commands require a
182
+ member-runtime credential; a paired host credential is not a member credential
183
+ and is rejected before any relay request. Use the console Workers page to list
184
+ workers, or run the command inside a member workspace where the product provides
185
+ the token, captain id, and session. Agent routing uses the separate
177
186
  `SAILORBRIDGE_AGENT_NAME`.
178
187
 
179
188
  `SAILORBRIDGE_HOST_ID` and `SAILORBRIDGE_HOST_DISPLAY_NAME` identify the
@@ -222,8 +231,9 @@ status never completes a SailorBridge task lifecycle.
222
231
  `https://www.sailorbridge.com`. The command displays the one-time code and
223
232
  polls until approval. The stored credential contains a host-scoped relay key
224
233
  (`key_scope: "host"` plus `host_id`) and is used as a fallback when
225
- `SAILORBRIDGE_RELAY_URL` or `SAILORBRIDGE_TOKEN` are not set. Raw host keys are
226
- written to the credentials file only. Data commands default to
234
+ `SAILORBRIDGE_RELAY_URL` or `SAILORBRIDGE_TOKEN` are not set. Worker data
235
+ commands reject this host-scoped fallback before any relay request. Raw host
236
+ keys are written to the credentials file only. Data commands default to
227
237
  `--format plain`; login's plain success output prints the host id, credential
228
238
  path, and service status. Explicit `--format json` prints key id and host
229
239
  metadata, not the token.
@@ -291,11 +301,11 @@ non-destructive command. Add `--lease` to a claim only to include rows already
291
301
  leased by this client. A supervisor peek leaves workflow-obligation messages
292
302
  queued and claimable after it surfaces the body-free doorbell. The bound agent's
293
303
  first `mailbox claim` leases them, then the agent completes the required action.
294
- Direct workflow messages are acknowledged with the lease token returned by the
295
- claim. Durable task sources are acknowledged by their successful task
296
- transition, while task terminal replies and `UNPARKED` are auto-acked after
297
- delivery. Ordinary and control messages keep their existing acknowledgement
298
- behavior.
304
+ Plain claims expose every lease token. `HUMAN` and `MAIL` stay leased so
305
+ `reply --in-reply-to` can infer the sender and atomically record the reply plus
306
+ source ACK; untagged peer mail is shown and handled as `MAIL`.
307
+ `--no-ack` leaves the source leased. Other direct workflow messages
308
+ retain their manual ACK or durable-transition settlement.
299
309
 
300
310
  Mailbox send is footgun-free by construction: message bodies are read only from
301
311
  piped stdin or `--body-file`, never from positional argv. Every `--body-file` and
@@ -305,8 +315,9 @@ that another selected source would discard is rejected instead of silently
305
315
  ignored; commands without a stdin contract reject it before any relay request.
306
316
  This prevents the local
307
317
  shell from expanding `$VARS`, backticks, or `$()` before the client starts. A
308
- single `--to-agents A` sends directly to that agent even when `--session` is also
309
- present. Multiple explicit agents use the session mailbox endpoint. `--to-agents`
318
+ single `--to-agents A` sends directly to that agent, except reserved `captain`,
319
+ which uses the session transcript endpoint. Multiple explicit agents use the
320
+ session mailbox endpoint. `--to-agents`
310
321
  is mutually exclusive with `--to-roles` and `--to-host`; combine roles and host
311
322
  when filtering registered agents. An empty pipe sends an empty string body; an
312
323
  interactive TTY with no pipe fails fast instead of waiting for typed input.
@@ -334,10 +345,10 @@ interactive pane. Host-started agents use readable session names such as
334
345
  `sb-<team>-<role>` and append the captain number only when that default already
335
346
  exists on the host.
336
347
 
337
- Tmux launch environment is passed through tmux process mechanisms (`-e` and the
338
- child process environment), never as `KEY=value command` text typed into the
339
- pane. That still has the normal short-lived process-list exposure of command
340
- arguments; cleaner secret delivery belongs to a later transport release.
348
+ Tmux launch environment is handed directly to the new pane through a private,
349
+ one-shot FIFO. The pane imports it immediately before `exec`; bearer values
350
+ never enter tmux argv, the tmux environment store, pane input, or a regular
351
+ credential file.
341
352
 
342
353
  SDK drivers are optional implementation code and are release-gated from the
343
354
  public Phase 1 CLI. A base install or tmux-only caller does not need to
@@ -384,6 +395,16 @@ channel must have one owner, otherwise mailbox leases can be stolen. Use
384
395
  `sailorbridge supervise` only for agents not already driven by another
385
396
  listener/supervisor.
386
397
 
398
+ Context auto-checkpoint (tmux transport, claude/codex): the supervisor reads
399
+ the context percentage from the pane every ~20s and, at or above the agent's
400
+ configured `context_checkpoint_percent` (console setting; `0` disables,
401
+ default 75), posts one self-addressed `SAVE-CONTEXT`. The mailbox loop then
402
+ cues the `save_ctx` skill, waits for `SAVE-CONTEXT-DONE`, and replays
403
+ `/clear` plus the `resume_ctx` cue. Threshold changes made in the console
404
+ take effect live through the `reload_context_autopilot` resolve command.
405
+ Semantics match the engine listener's autopilot (same thresholds, same
406
+ armed-below/fire-once water-mark).
407
+
387
408
  Default transport selection:
388
409
 
389
410
  | CLI | Default transport | Default command |
@@ -441,7 +462,7 @@ message. Persistent relay errors back off instead of spinning.
441
462
  The CLI entrypoint is explicit about ownership:
442
463
 
443
464
  ```bash
444
- sailorbridge supervise --agent A --cli codex --cwd /repo --i-own-this-agent
465
+ sailorbridge supervise --cli codex --cwd /repo --i-own-this-agent
445
466
  ```
446
467
 
447
468
  `--i-own-this-agent` is required as a runtime collision guard. For tmux launches,