@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 +43 -22
- package/dist/src/cli.js +934 -428
- package/dist/src/cli.js.map +22 -21
- package/package.json +1 -1
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
|
|
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 --
|
|
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
|
|
105
|
-
sailorbridge supervise --
|
|
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
|
|
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.
|
|
175
|
-
|
|
176
|
-
|
|
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.
|
|
226
|
-
|
|
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
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
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
|
|
309
|
-
|
|
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
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
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 --
|
|
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,
|