@byollm/relay 0.1.0 → 0.1.1
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 +9 -103
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,105 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
>
|
|
3
|
-
>
|
|
4
|
-
>
|
|
5
|
-
> `.strict()`.
|
|
1
|
+
<!-- release-note 0.1.1 -->
|
|
2
|
+
> **`0.1.1` is documentation only — nothing to upgrade.** `PROTOCOL_VERSION`
|
|
3
|
+
> is still `2`, so a 0.1.0 party and a 0.1.1 party talk to each other in both
|
|
4
|
+
> directions. No dependency, schema, wire field or on-disk shape moved.
|
|
6
5
|
>
|
|
7
|
-
>
|
|
8
|
-
>
|
|
9
|
-
>
|
|
10
|
-
> `leases`, which nothing read; `WireErrorCode` gains `not-ready`,
|
|
11
|
-
> `clock-skew` and `forbidden`, and `403` is `forbidden` rather than
|
|
12
|
-
> `unauthorized`. `RESULT_PROVENANCE` is superseded by
|
|
13
|
-
> `PROVENANCE_NAMES_DEVICE`. See `byollm_009` Amendment A.>
|
|
14
|
-
> **`alpha.16` is a breaking wire change — daemons and relays again, not app
|
|
15
|
-
> authors.** `app.enqueue(...)` and reading results are unchanged. All five
|
|
16
|
-
> packages move together: both ends parse `.strict()`, so a mixed pair
|
|
17
|
-
> refuses.
|
|
18
|
-
>
|
|
19
|
-
> What moved, all of it Tier 2 of `cloud_008`: `model`, `backendClass` and
|
|
20
|
-
> `durationMs` come off `ResultRequest` and are sealed **inside** the result
|
|
21
|
-
> envelope as `SealedOutcome = { outcome, ran }` — so a daemon can no longer
|
|
22
|
-
> declare a model it did not sign, and a relay carries neither.
|
|
23
|
-
> `HeartbeatResponse` loses `leases` (nothing read it) and now reports real
|
|
24
|
-
> cancellations instead of an empty list. `WireErrorCode` gains `forbidden`
|
|
25
|
-
> for 403, leaving `unauthorized` at exactly 401. The relay gained a
|
|
26
|
-
> site-plane `cancel` endpoint, honours `stub.deadlineAt`, honours
|
|
27
|
-
> `stub.audience`, and remembers a refusal.>
|
|
28
|
-
> **`alpha.17` is additive** — no wire change. It exports `ReleaseReason`,
|
|
29
|
-
> which `RoutingStore.releaseLeases` names and the package did not export, so
|
|
30
|
-
> the interface was unimplementable outside this repo.>
|
|
31
|
-
> **`alpha.18` is a breaking wire change — daemons and relays, not app
|
|
32
|
-
> authors.** `app.enqueue(...)` and reading results are unchanged. All five
|
|
33
|
-
> packages move together.
|
|
34
|
-
>
|
|
35
|
-
> The **bearer token is gone**: off `PairPollResponse`, off the runner row,
|
|
36
|
-
> off the daemon's pairings file, out of the adapter's schema. It was minted,
|
|
37
|
-
> hashed and stored on two disks and never sent, looked up or compared —
|
|
38
|
-
> `REQUESTS_SIGNED_NOT_BEARER` was enforced by signatures the whole time. If
|
|
39
|
-
> you run the Supabase adapter, apply
|
|
40
|
-
> `20260819000000_drop_runner_token.sql`; `byollm_approve_pairing` now takes
|
|
41
|
-
> one argument. A pairings file written by an older daemon still loads.
|
|
42
|
-
>
|
|
43
|
-
> `model`, `backendClass` and `durationMs` moved **inside** the sealed result
|
|
44
|
-
> (`SealedOutcome = { outcome, ran }`), so a daemon cannot declare a model it
|
|
45
|
-
> did not sign and a relay carries none of them. Writing a `RoutingStore`?
|
|
46
|
-
> `releaseLeases` takes an optional `reason` and `complete` requires
|
|
47
|
-
> `leaseId`, and **an implementation that ignores either still typechecks** —
|
|
48
|
-
> run the store contract tests.>
|
|
49
|
-
> **`alpha.19` is additive on the wire and a behaviour change in every
|
|
50
|
-
> store.** `ResultResponse` gains an optional `duplicate`. Nothing is removed,
|
|
51
|
-
> so an older daemon keeps working — but the *order* two rules are checked in
|
|
52
|
-
> has changed, and a `RoutingStore` implementation must change with it.
|
|
53
|
-
>
|
|
54
|
-
> `complete` now checks **terminal state before holder**, scoped to the device
|
|
55
|
-
> that finished the job: a replay from that device is answered `duplicate:
|
|
56
|
-
> true` with a 2xx, and anyone else gets exactly the refusal they would get
|
|
57
|
-
> for a job that is not terminal. Previously `RESULT_IDEMPOTENT` held only
|
|
58
|
-
> because the lease is nulled on success, so the holder check tripped first —
|
|
59
|
-
> deleting the idempotency branch failed no test. Run the store contract
|
|
60
|
-
> tests; the compiler cannot see this.
|
|
61
|
-
|
|
62
|
-
<!-- release-note 0.1.0-alpha.21 -->
|
|
63
|
-
> [!NOTE]
|
|
64
|
-
> **`0.1.0-alpha.20` is not a complete release — do not pin it.** Four
|
|
65
|
-
> packages published and `@byollm/server` did not: a Sigstore
|
|
66
|
-
> transparency-log 409 on its provenance attestation. The workflow's
|
|
67
|
-
> "already published" guard correctly refuses to resume a partial publish,
|
|
68
|
-
> so `0.1.0-alpha.21` is that release, whole.
|
|
69
|
-
>
|
|
70
|
-
> If you run the Supabase adapter, `alpha.21` needs
|
|
71
|
-
> `20260819010000_completed_by_lease_id.sql`: alpha.19 shipped §3.6's
|
|
72
|
-
> ordering without the column it stores the grant in.
|
|
73
|
-
|
|
74
|
-
<!-- release-note 0.1.0-alpha.40 -->
|
|
75
|
-
**`byollm start` — stop keeping a terminal open.** The daemon can now run
|
|
76
|
-
under your computer's own supervisor and restart itself if it stops: a launchd
|
|
77
|
-
agent on macOS, a `systemd --user` unit on Linux, a logon task on Windows. All
|
|
78
|
-
user-level — no root, no system directories, and `byollm stop` takes it
|
|
79
|
-
away. `byollm status` gained a line saying whether it is actually supervised
|
|
80
|
-
right now, including the state that matters most: installed but not running,
|
|
81
|
-
which looks fine from an app's dashboard and serves nothing.
|
|
82
|
-
|
|
83
|
-
If you are running via `npx`, install properly first (`npm install -g
|
|
84
|
-
byollm@latest`) — `install` refuses to supervise a copy in npx's cache, because
|
|
85
|
-
npm deletes that directory and the service would fail at some later boot.
|
|
86
|
-
|
|
87
|
-
<!-- release-note 0.1.0-alpha.41 -->
|
|
88
|
-
**`onNoRunner` takes a string.** Your fallback answer is your own value, not
|
|
89
|
-
wire data, and handing back a whole result record for it was ceremony — the
|
|
90
|
-
README's own example got the shape wrong, which is how this was found.
|
|
91
|
-
|
|
92
|
-
```ts
|
|
93
|
-
const { outcome, fallback } = await job.result({
|
|
94
|
-
onNoRunner: () => runOnHostedModel(transcript),
|
|
95
|
-
});
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Whatever you return, `result()` labels it `fallback: true` — the stamp is
|
|
99
|
-
applied by the wait, not taken from you, so an answer that did not run on
|
|
100
|
-
somebody's device cannot be reported as though it did (`FALLBACK_LABELED`).
|
|
101
|
-
Both delivery channels do it, polling and Supabase Realtime. Records still
|
|
102
|
-
work; they just get labelled too.
|
|
6
|
+
> This README used to open with a stack of release notes instead of with the
|
|
7
|
+
> package. The history moved to `docs/release-notes/` and `CHANGELOG.md`,
|
|
8
|
+
> where none of it was lost. Full note: `docs/release-notes/0.1.1.md`.
|
|
103
9
|
|
|
104
10
|
# `@byollm/relay`
|
|
105
11
|
|
|
@@ -176,7 +82,7 @@ daemons pin at pairing, verified against the `sites` half of the projection.
|
|
|
176
82
|
Nothing here trusts a `siteId` in a body or a query string.
|
|
177
83
|
|
|
178
84
|
That is newer than the rest of this package. The site plane took the caller's
|
|
179
|
-
word for who it was until `0.1.0
|
|
85
|
+
word for who it was until shortly before `0.1.0`, which on a relay reachable from the
|
|
180
86
|
internet is an open enqueue endpoint into consenting users' devices and an
|
|
181
87
|
open read of who is online. It was blind the whole time — nothing could open a
|
|
182
88
|
payload — and blind is not the same as safe.
|
|
@@ -190,7 +96,7 @@ for every site its projection holds, and refuses a caller that names a site the
|
|
|
190
96
|
projection does not (cloud_009 §3). Job state is keyed by the pair, so two sites
|
|
191
97
|
may use the same job id without either seeing the other.
|
|
192
98
|
|
|
193
|
-
## Breaking
|
|
99
|
+
## Breaking before `0.1.0`: `RelayState` is async
|
|
194
100
|
|
|
195
101
|
Every method on `RelayState` now returns a `Promise`, and `Relay.sweep()` and
|
|
196
102
|
`debugPage()` with it. `RelayState.requeue` is private — it was only ever a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byollm/relay",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The reference relay: routes sealed byollm jobs between sites and daemons, holding no decryption keys by construction.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"zod": "^4.1.13",
|
|
37
|
-
"@byollm/protocol": "0.1.
|
|
37
|
+
"@byollm/protocol": "0.1.1"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@supabase/supabase-js": "^2.112.2",
|
|
44
44
|
"vitest": "^4.1.10",
|
|
45
|
-
"@byollm/
|
|
46
|
-
"@byollm/control-plane": "0.1.
|
|
47
|
-
"byollm": "0.1.
|
|
48
|
-
"
|
|
45
|
+
"@byollm/conformance": "0.1.1",
|
|
46
|
+
"@byollm/control-plane": "0.1.1",
|
|
47
|
+
"@byollm/server": "0.1.1",
|
|
48
|
+
"byollm": "0.1.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"vitest": ">=3"
|