@byollm/server 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 +7 -127
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,131 +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
|
-
> **`alpha.7` breaks nobody who is not implementing a relay.** `@byollm/relay`'s
|
|
63
|
-
> projection gains `devices` — the device keys a control plane has approved —
|
|
64
|
-
> and the relay refuses to pair a device that is not in it. `revoked` becomes
|
|
65
|
-
> `{owner, siteId}` instead of a composite string. Sites, daemons, stores and
|
|
66
|
-
> the wire format are all untouched; no runner re-pairs.
|
|
67
|
-
>
|
|
68
|
-
> **`alpha.5` broke store adapters, and nothing else.** If you implement
|
|
69
|
-
> `JobStore` yourself, two changes are required: a new `adopt(args)` method
|
|
70
|
-
> (record a lease granted by an upstream this store does not own), and
|
|
71
|
-
> `CompleteArgs.runnerId` is replaced by `holder` — a discriminated union
|
|
72
|
-
> naming either a runner or a lease. Apps, daemons and the wire format are
|
|
73
|
-
> unaffected; `@byollm/conformance` will tell you if you missed one.
|
|
74
|
-
>
|
|
75
|
-
> **`alpha.4` broke every integration.** Three things changed for you:
|
|
76
|
-
>
|
|
77
|
-
> 1. **`siteKeys` is required.** Run `npx --package @byollm/server keygen` once,
|
|
78
|
-
> set `BYOLLM_SITE_KEYS`, and pass it to `ByollmApp` and `createHandler`.
|
|
79
|
-
> Once — not per deploy, never at startup.
|
|
80
|
-
> 2. **`createHandler` takes a function.** `next build` imports route modules
|
|
81
|
-
> with no secrets present, so a config object fails the build.
|
|
82
|
-
> 3. **Every paired runner re-pairs.** Bearer tokens are replaced by per-request
|
|
83
|
-
> signatures against a pinned device key, so old tokens authenticate nothing.
|
|
84
|
-
>
|
|
85
|
-
> Your store adapter is unaffected: payloads and results are sealed before they
|
|
86
|
-
> reach it, and `JobStore` did not change.
|
|
87
|
-
|
|
88
|
-
<!-- release-note 0.1.0-alpha.21 -->
|
|
89
|
-
> [!NOTE]
|
|
90
|
-
> **`0.1.0-alpha.20` is not a complete release — do not pin it.** Four
|
|
91
|
-
> packages published and `@byollm/server` did not: a Sigstore
|
|
92
|
-
> transparency-log 409 on its provenance attestation. The workflow's
|
|
93
|
-
> "already published" guard correctly refuses to resume a partial publish,
|
|
94
|
-
> so `0.1.0-alpha.21` is that release, whole.
|
|
95
|
-
>
|
|
96
|
-
> If you run the Supabase adapter, `alpha.21` needs
|
|
97
|
-
> `20260819010000_completed_by_lease_id.sql`: alpha.19 shipped §3.6's
|
|
98
|
-
> ordering without the column it stores the grant in.
|
|
99
|
-
|
|
100
|
-
<!-- release-note 0.1.0-alpha.40 -->
|
|
101
|
-
**`byollm start` — stop keeping a terminal open.** The daemon can now run
|
|
102
|
-
under your computer's own supervisor and restart itself if it stops: a launchd
|
|
103
|
-
agent on macOS, a `systemd --user` unit on Linux, a logon task on Windows. All
|
|
104
|
-
user-level — no root, no system directories, and `byollm stop` takes it
|
|
105
|
-
away. `byollm status` gained a line saying whether it is actually supervised
|
|
106
|
-
right now, including the state that matters most: installed but not running,
|
|
107
|
-
which looks fine from an app's dashboard and serves nothing.
|
|
108
|
-
|
|
109
|
-
If you are running via `npx`, install properly first (`npm install -g
|
|
110
|
-
byollm@latest`) — `install` refuses to supervise a copy in npx's cache, because
|
|
111
|
-
npm deletes that directory and the service would fail at some later boot.
|
|
112
|
-
|
|
113
|
-
<!-- release-note 0.1.0-alpha.41 -->
|
|
114
|
-
**`onNoRunner` takes a string.** Your fallback answer is your own value, not
|
|
115
|
-
wire data, and handing back a whole result record for it was ceremony — the
|
|
116
|
-
README's own example got the shape wrong, which is how this was found.
|
|
117
|
-
|
|
118
|
-
```ts
|
|
119
|
-
const { outcome, fallback } = await job.result({
|
|
120
|
-
onNoRunner: () => runOnHostedModel(transcript),
|
|
121
|
-
});
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
Whatever you return, `result()` labels it `fallback: true` — the stamp is
|
|
125
|
-
applied by the wait, not taken from you, so an answer that did not run on
|
|
126
|
-
somebody's device cannot be reported as though it did (`FALLBACK_LABELED`).
|
|
127
|
-
Both delivery channels do it, polling and Supabase Realtime. Records still
|
|
128
|
-
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`.
|
|
129
9
|
|
|
130
10
|
# `@byollm/server`
|
|
131
11
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byollm/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Framework-agnostic BYOLLM protocol handlers, a reference in-memory store, a Next.js mount, and a Supabase adapter.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"node": ">=22.14"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@byollm/protocol": "0.1.
|
|
33
|
+
"@byollm/protocol": "0.1.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@supabase/supabase-js": "^2.58.0"
|