@byollm/protocol 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 -105
- package/dist/index.d.ts +11 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,109 +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.3` is a breaking change.** `BackendDescriptor.account` is gone —
|
|
63
|
-
> read `cost` (`free` / `metered` / `subscription`) instead. Four new MUSTs
|
|
64
|
-
> come with it; see `byollm_007`.
|
|
65
|
-
|
|
66
|
-
<!-- release-note 0.1.0-alpha.21 -->
|
|
67
|
-
> [!NOTE]
|
|
68
|
-
> **`0.1.0-alpha.20` is not a complete release — do not pin it.** Four
|
|
69
|
-
> packages published and `@byollm/server` did not: a Sigstore
|
|
70
|
-
> transparency-log 409 on its provenance attestation. The workflow's
|
|
71
|
-
> "already published" guard correctly refuses to resume a partial publish,
|
|
72
|
-
> so `0.1.0-alpha.21` is that release, whole.
|
|
73
|
-
>
|
|
74
|
-
> If you run the Supabase adapter, `alpha.21` needs
|
|
75
|
-
> `20260819010000_completed_by_lease_id.sql`: alpha.19 shipped §3.6's
|
|
76
|
-
> ordering without the column it stores the grant in.
|
|
77
|
-
|
|
78
|
-
<!-- release-note 0.1.0-alpha.40 -->
|
|
79
|
-
**`byollm start` — stop keeping a terminal open.** The daemon can now run
|
|
80
|
-
under your computer's own supervisor and restart itself if it stops: a launchd
|
|
81
|
-
agent on macOS, a `systemd --user` unit on Linux, a logon task on Windows. All
|
|
82
|
-
user-level — no root, no system directories, and `byollm stop` takes it
|
|
83
|
-
away. `byollm status` gained a line saying whether it is actually supervised
|
|
84
|
-
right now, including the state that matters most: installed but not running,
|
|
85
|
-
which looks fine from an app's dashboard and serves nothing.
|
|
86
|
-
|
|
87
|
-
If you are running via `npx`, install properly first (`npm install -g
|
|
88
|
-
byollm@latest`) — `install` refuses to supervise a copy in npx's cache, because
|
|
89
|
-
npm deletes that directory and the service would fail at some later boot.
|
|
90
|
-
|
|
91
|
-
<!-- release-note 0.1.0-alpha.41 -->
|
|
92
|
-
**`onNoRunner` takes a string.** Your fallback answer is your own value, not
|
|
93
|
-
wire data, and handing back a whole result record for it was ceremony — the
|
|
94
|
-
README's own example got the shape wrong, which is how this was found.
|
|
95
|
-
|
|
96
|
-
```ts
|
|
97
|
-
const { outcome, fallback } = await job.result({
|
|
98
|
-
onNoRunner: () => runOnHostedModel(transcript),
|
|
99
|
-
});
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Whatever you return, `result()` labels it `fallback: true` — the stamp is
|
|
103
|
-
applied by the wait, not taken from you, so an answer that did not run on
|
|
104
|
-
somebody's device cannot be reported as though it did (`FALLBACK_LABELED`).
|
|
105
|
-
Both delivery channels do it, polling and Supabase Realtime. Records still
|
|
106
|
-
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`.
|
|
107
9
|
|
|
108
10
|
# `@byollm/protocol`
|
|
109
11
|
|
package/dist/index.d.ts
CHANGED
|
@@ -186,11 +186,17 @@ declare function checkProtocolVersion(body: unknown): VersionRefusal | null;
|
|
|
186
186
|
* starts meaning "the unstable one", and every user who followed this message
|
|
187
187
|
* is pinned to prereleases with nothing to tell them.
|
|
188
188
|
*
|
|
189
|
-
*
|
|
190
|
-
* on the docs
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
189
|
+
* This once said `scripts/check-site.mjs` deliberately enforces the OPPOSITE
|
|
190
|
+
* on the docs — *"which requires `npx byollm@alpha`"* — and drew a careful
|
|
191
|
+
* distinction between choosing a prerelease knowingly and being handed an
|
|
192
|
+
* upgrade command. **That rule inverted at the flip and this paragraph did
|
|
193
|
+
* not.** check-site now refuses any pin but `@latest`, for the reason written
|
|
194
|
+
* beside it: *"the tag that moves first is reviewed last, so asking for it
|
|
195
|
+
* explicitly is asking for the build nobody has looked at yet."* Which is what
|
|
196
|
+
* this constant already said, so the distinction it drew no longer exists.
|
|
197
|
+
*
|
|
198
|
+
* Found sweeping B341 — the same decay as B336 and B339, a third time, and
|
|
199
|
+
* every one was prose left standing over a constant that moved beneath it.
|
|
194
200
|
*/
|
|
195
201
|
declare const UPGRADE_COMMAND: "npm i -g byollm@latest";
|
|
196
202
|
/** The path prefix all endpoints mount under. */
|