byollm 0.1.0-alpha.13 → 0.1.0-alpha.15

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
@@ -1,5 +1,5 @@
1
1
  > [!WARNING]
2
- > **Alpha (`0.1.0-alpha.13`) — under active development. Don't use this yet.**
2
+ > **Alpha (`0.1.0-alpha.15`) — under active development. Don't use this yet.**
3
3
  >
4
4
  > Install it deliberately: `npx byollm@alpha`, or `npm install byollm@alpha`.
5
5
  >
@@ -11,7 +11,20 @@
11
11
  > npm assigns `latest` on a first publish and won't let it be removed, so a
12
12
  > bare install resolves here too. This notice is the only guard — deliberately
13
13
  > not an npm deprecation, which would read as *abandoned* rather than *early*.
14
- > Ask for `@alpha` explicitly so your lockfile records that you meant to.
14
+ > Ask for `@alpha` explicitly so your lockfile records that you meant to.>
15
+ > **`alpha.15` is a breaking wire change, and it breaks daemons and relays —
16
+ > not app authors.** If you call `app.enqueue(...)` and read results, nothing
17
+ > in your code changes. If you run a daemon or an upstream, every package must
18
+ > move together: a mixed pair refuses on both sides, because both ends parse
19
+ > `.strict()`.
20
+ >
21
+ > What moved, all of it reconciling the frozen `byollm_009` with its code:
22
+ > `JobStub` gains `site` (the site's identity key id) and loses
23
+ > `audienceAllow`; `ResultRequest` gains `leaseId`; `HeartbeatResponse` loses
24
+ > `leases`, which nothing read; `WireErrorCode` gains `not-ready`,
25
+ > `clock-skew` and `forbidden`, and `403` is `forbidden` rather than
26
+ > `unauthorized`. `RESULT_PROVENANCE` is superseded by
27
+ > `PROVENANCE_NAMES_DEVICE`. See `byollm_009` Amendment A.
15
28
  >
16
29
  > **`alpha.3` is a breaking change.** A config naming `openai-http` with a
17
30
  > remote base URL and an offer scope wider than `self` is narrowed to `self`
package/dist/bin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  main
4
- } from "./chunk-6XRYOTHC.js";
4
+ } from "./chunk-QHXXCGAJ.js";
5
5
 
6
6
  // src/bin.ts
7
7
  process.exitCode = await main(process.argv.slice(2));
@@ -391,7 +391,7 @@ var ProtocolClient = class _ProtocolClient {
391
391
  case 401:
392
392
  return new ClientError("unauthorized", message, retryAfter);
393
393
  case 403:
394
- return new ClientError("revoked", message, retryAfter);
394
+ return new ClientError("forbidden", message, retryAfter);
395
395
  case 409:
396
396
  return new ClientError("not-ready", message, retryAfter);
397
397
  case 429:
@@ -1943,8 +1943,12 @@ var Runner = class {
1943
1943
  const match = matchAudience(
1944
1944
  {
1945
1945
  owner: job.owner,
1946
- audience: job.audience,
1947
- audienceAllow: job.audienceAllow
1946
+ audience: job.audience
1947
+ // No `audienceAllow`: it is not on the wire any more (cloud_008
1948
+ // §0.2), and this is the branch that made it look load-bearing. It
1949
+ // narrowed a decision `locallyAllows` below already owns — the site
1950
+ // could only ever agree with the daemon's own list or contradict it,
1951
+ // and nothing wrote down which won.
1948
1952
  },
1949
1953
  {
1950
1954
  owner: this.#options.owner,
@@ -2179,6 +2183,10 @@ var Runner = class {
2179
2183
  () => this.#options.client.result({
2180
2184
  runnerId: this.#options.runnerId,
2181
2185
  jobId: job.id,
2186
+ // The grant this work was done under, not merely who did it. A runner
2187
+ // id survives a claim-release-reclaim cycle; a lease id is the thing
2188
+ // that ended.
2189
+ leaseId: job.lease.id,
2182
2190
  envelope,
2183
2191
  disposition: outcome.outcome,
2184
2192
  model: route?.model ?? "unknown",
@@ -2278,13 +2286,19 @@ var Runner = class {
2278
2286
  );
2279
2287
  }
2280
2288
  const keys = await identity.keys();
2289
+ const pinnedKeyId = keyId(identity.sitePinned.identity);
2290
+ if (job.site !== pinnedKeyId) {
2291
+ throw new Error(
2292
+ `refusing job ${job.id}: it names site ${job.site}, but this machine is paired with ${pinnedKeyId}`
2293
+ );
2294
+ }
2281
2295
  const opened = await open({
2282
2296
  envelope,
2283
2297
  recipientKeys: keys,
2284
2298
  senderIdentityPublic: identity.sitePinned.identity,
2285
2299
  expected: {
2286
2300
  jobId: job.id,
2287
- senderKeyId: keyId(identity.sitePinned.identity),
2301
+ senderKeyId: pinnedKeyId,
2288
2302
  recipientKeyId: keyId(publicIdentityOf2(keys).identity),
2289
2303
  direction: "payload"
2290
2304
  }
@@ -3059,7 +3073,7 @@ async function main(argv) {
3059
3073
  }
3060
3074
 
3061
3075
  // src/index.ts
3062
- var DAEMON_VERSION = "0.1.0-alpha.13";
3076
+ var DAEMON_VERSION = "0.1.0-alpha.15";
3063
3077
  function daemonVersion() {
3064
3078
  return {
3065
3079
  daemon: DAEMON_VERSION,
@@ -3112,4 +3126,4 @@ export {
3112
3126
  runCli,
3113
3127
  main
3114
3128
  };
3115
- //# sourceMappingURL=chunk-6XRYOTHC.js.map
3129
+ //# sourceMappingURL=chunk-QHXXCGAJ.js.map