@byollm/protocol 0.1.0-alpha.89 → 0.1.0-alpha.90

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.89`) — under active development. Don't use this yet.**
2
+ > **Alpha (`0.1.0-alpha.90`) — under active development. Don't use this yet.**
3
3
  >
4
4
  > Install it deliberately: `npm install @byollm/protocol@alpha`.
5
5
  >
@@ -187,3 +187,17 @@ to know which one happened.
187
187
  conformance id that appears in this package's `MUSTS` registry.
188
188
 
189
189
  MIT
190
+
191
+ <!-- family:start -->
192
+
193
+ ## The rest of byollm
194
+
195
+ Six packages, and they are only interesting together:
196
+
197
+ - [`byollm`](https://www.npmjs.com/package/byollm) — the daemon — runs models on your own machine and answers for it
198
+ - [`@byollm/server`](https://www.npmjs.com/package/@byollm/server) — the SDK a site uses to ask a device for work
199
+ - [`@byollm/relay`](https://www.npmjs.com/package/@byollm/relay) — the broker that holds jobs between a site and a device, and can read neither
200
+ - [`@byollm/control-plane`](https://www.npmjs.com/package/@byollm/control-plane) — who may ask whom, and the policy store behind it
201
+ - [`@byollm/conformance`](https://www.npmjs.com/package/@byollm/conformance) — the kit that proves an implementation is one — including a posture audit that holds nothing but a URL
202
+
203
+ <!-- family:end -->
package/dist/index.d.ts CHANGED
@@ -1545,6 +1545,7 @@ declare const ClaimedJob: z.ZodObject<{
1545
1545
  owner: z.ZodString;
1546
1546
  site: z.ZodOptional<z.ZodString>;
1547
1547
  service: z.ZodOptional<z.ZodString>;
1548
+ deadlineAt: z.ZodOptional<z.ZodNumber>;
1548
1549
  lease: z.ZodObject<{
1549
1550
  id: z.ZodString;
1550
1551
  runnerId: z.ZodString;
@@ -1734,6 +1735,34 @@ declare const JobRefused: z.ZodObject<{
1734
1735
  message: z.ZodString;
1735
1736
  }, z.core.$strict>;
1736
1737
  type JobRefused = z.infer<typeof JobRefused>;
1738
+ /**
1739
+ * The outward text for each reason, so a message cannot vary by call site.
1740
+ *
1741
+ * The mirror image of `REFUSAL_MESSAGES` in `audience.ts`, and the contrast is
1742
+ * worth holding in one thought. That table is read by the **owner** of the
1743
+ * device, where byollm_002's rule applies — four different truths must never
1744
+ * share a message, because a person debugging their own machine needs to know
1745
+ * which one they hit. This table is read by a **requester**, where the rule
1746
+ * inverts: two different truths must share a message exactly, because the
1747
+ * difference between them is somebody else's inventory.
1748
+ *
1749
+ * Same project, opposite requirements, and confusing them is how the oracle
1750
+ * comes back. Hence a table rather than prose at the throw site: three
1751
+ * refusals written in three places drift into three slightly different
1752
+ * sentences, and "slightly different" is all an oracle needs.
1753
+ *
1754
+ * ## Published, because the drift it prevents happens outside this repo — B103
1755
+ *
1756
+ * `JobRefused` and `RefusalReason` were exported and **this was not**, so we
1757
+ * shipped the vocabulary and withheld the sentences. Nothing here constructs a
1758
+ * refusal; the producers are sites and the hub, and every one of them would
1759
+ * have written its own message for a reason code we defined.
1760
+ *
1761
+ * **That is the drift this table argues against, made inevitable by the export
1762
+ * list** — and `message` is a required field on the envelope, so each of them
1763
+ * had to write something.
1764
+ */
1765
+ declare const REFUSAL_TEXT: Readonly<Record<RefusalReason, string>>;
1737
1766
  /**
1738
1767
  * The plaintext inside a result envelope.
1739
1768
  *
@@ -2943,4 +2972,4 @@ declare const MUST_IDS: readonly ("PAIR_ONE_USER" | "PAIR_INTERACTIVE" | "PAIR_C
2943
2972
  /** Every MUST verified a particular way. */
2944
2973
  declare function mustsVerifiedBy(kind: MustVerification): MustId[];
2945
2974
 
2946
- export { ABOUT, ABOUT_SHORT, ABOUT_SHORT_LEDE, ABOUT_SHORT_TAIL, AUDIENCES, Audience, BACKENDS, BACKEND_CLASSES, BACKEND_IDS, BackendClass, BackendCost, type BackendDescriptor, type BackendId, BackendIdSchema, CLOCK_ATTRIBUTION_MS, CLOCK_SKEW_WARN_MS, Capability, CapabilityMatrix, ChatMessage, ChatPayload, ClaimRequest, ClaimResponse, ClaimedJob, ClaimedStub, DeliveredResult, ENCRYPTION_KEY_CONTEXT, ENDPOINTS, ENVELOPE_MAX_AGE_MS, ERROR_STATUS, type Endpoint, type EnvelopeContext, EnvelopeDirection, type EnvelopeFailure, FetchRequest, FetchResponse, type FloorRefusal, GRANT_CONTEXT, GRANT_MAX_AGE_MS, GRANT_SIGNED_FIELDS, GeneratePayload, type GrantClaims, GrantRef, type GrantRefusal, HeartbeatRequest, HeartbeatResponse, JOB_KINDS, JobKind, JobOutcome, JobPayload, JobRefused, JobResultCanceled, JobResultError, JobResultOk, JobState, JobStub, KindedPayload, Lease, MAX_CLOCK_SKEW_MS, MAX_ENVELOPE_BYTES, MAX_PURPOSES, MAX_SUCCESSION_CHAIN, MIN_PROTOCOL_VERSION, MUSTS, MUST_IDS, Manifest, type MatchDaemon, type MatchJob, MatchRefusal, type MatchResult, type Must, type MustEnforcer, type MustId, type MustVerification, type MustVerifiedBy, OFFER_SCOPES, OfferScope, type OpenResult, PAYLOAD_LIMITS, PROTOCOL_PREFIX, PROTOCOL_VERSION, PairPollRequest, PairPollResponse, PairRequest, PairStartRequest, PairStartResponse, type PayloadFor, PublicIdentity, Purpose, REFUSAL_MESSAGES, RESERVED_PURPOSE, RETIREMENT_WINDOW_MS, RefusalReason, ReleaseRequest, ReleaseResponse, RequestSignature, ResultDisposition, ResultProvenance, ResultRequest, ResultResponse, RunMetadata, SIZE_CLASSES, SIZE_CLASS_LIMITS, SUCCESSION_CONTEXT, SUPPORTED_PROTOCOL_VERSIONS, SealedEnvelope, SealedOutcome, type SignatureFailure, SignedGrant, SizeClass, type SpendConsent, type StopReason, StopReasonSchema, StoredKeys, Succession, type SuccessionFailure, type SuccessionWalk, TERMINAL_STATES, UPDATE_OFFER_SINCE, UPGRADE_COMMAND, type VersionRefusal, WireError, WireErrorCode, WithheldKind, backendDescriptor, backendName, canTransition, canonicalRequest, checkDaemonFloor, checkProtocolVersion, classifyCost, compareVersions, cryptoReady, declaredVersion, describeBytes, effectiveOfferScope, envelopeBytes, fingerprint, generateKeys, grantStatement, isBackendId, isCloudTaggedModel, isJobKind, isLocalHost, isTerminal, keyId, kindsOf, matchAudience, mayOfferUpdate, mentionsWireField, mustsVerifiedBy, open, payloadTextLength, provenanceFor, publicIdentityOf, resolveCost, seal, signGrant, signRequest, signSiteRequest, signSuccession, signWith, singlePurposeManifest, sizeClassCeiling, sizeClassOf, successionStatement, tooLargeMessage, updateOfferFor, verifyGrant, verifyLink, verifyPublicIdentity, verifyRequest, verifySiteRequest, verifyWith, walkSuccession, withoutComments };
2975
+ export { ABOUT, ABOUT_SHORT, ABOUT_SHORT_LEDE, ABOUT_SHORT_TAIL, AUDIENCES, Audience, BACKENDS, BACKEND_CLASSES, BACKEND_IDS, BackendClass, BackendCost, type BackendDescriptor, type BackendId, BackendIdSchema, CLOCK_ATTRIBUTION_MS, CLOCK_SKEW_WARN_MS, Capability, CapabilityMatrix, ChatMessage, ChatPayload, ClaimRequest, ClaimResponse, ClaimedJob, ClaimedStub, DeliveredResult, ENCRYPTION_KEY_CONTEXT, ENDPOINTS, ENVELOPE_MAX_AGE_MS, ERROR_STATUS, type Endpoint, type EnvelopeContext, EnvelopeDirection, type EnvelopeFailure, FetchRequest, FetchResponse, type FloorRefusal, GRANT_CONTEXT, GRANT_MAX_AGE_MS, GRANT_SIGNED_FIELDS, GeneratePayload, type GrantClaims, GrantRef, type GrantRefusal, HeartbeatRequest, HeartbeatResponse, JOB_KINDS, JobKind, JobOutcome, JobPayload, JobRefused, JobResultCanceled, JobResultError, JobResultOk, JobState, JobStub, KindedPayload, Lease, MAX_CLOCK_SKEW_MS, MAX_ENVELOPE_BYTES, MAX_PURPOSES, MAX_SUCCESSION_CHAIN, MIN_PROTOCOL_VERSION, MUSTS, MUST_IDS, Manifest, type MatchDaemon, type MatchJob, MatchRefusal, type MatchResult, type Must, type MustEnforcer, type MustId, type MustVerification, type MustVerifiedBy, OFFER_SCOPES, OfferScope, type OpenResult, PAYLOAD_LIMITS, PROTOCOL_PREFIX, PROTOCOL_VERSION, PairPollRequest, PairPollResponse, PairRequest, PairStartRequest, PairStartResponse, type PayloadFor, PublicIdentity, Purpose, REFUSAL_MESSAGES, REFUSAL_TEXT, RESERVED_PURPOSE, RETIREMENT_WINDOW_MS, RefusalReason, ReleaseRequest, ReleaseResponse, RequestSignature, ResultDisposition, ResultProvenance, ResultRequest, ResultResponse, RunMetadata, SIZE_CLASSES, SIZE_CLASS_LIMITS, SUCCESSION_CONTEXT, SUPPORTED_PROTOCOL_VERSIONS, SealedEnvelope, SealedOutcome, type SignatureFailure, SignedGrant, SizeClass, type SpendConsent, type StopReason, StopReasonSchema, StoredKeys, Succession, type SuccessionFailure, type SuccessionWalk, TERMINAL_STATES, UPDATE_OFFER_SINCE, UPGRADE_COMMAND, type VersionRefusal, WireError, WireErrorCode, WithheldKind, backendDescriptor, backendName, canTransition, canonicalRequest, checkDaemonFloor, checkProtocolVersion, classifyCost, compareVersions, cryptoReady, declaredVersion, describeBytes, effectiveOfferScope, envelopeBytes, fingerprint, generateKeys, grantStatement, isBackendId, isCloudTaggedModel, isJobKind, isLocalHost, isTerminal, keyId, kindsOf, matchAudience, mayOfferUpdate, mentionsWireField, mustsVerifiedBy, open, payloadTextLength, provenanceFor, publicIdentityOf, resolveCost, seal, signGrant, signRequest, signSiteRequest, signSuccession, signWith, singlePurposeManifest, sizeClassCeiling, sizeClassOf, successionStatement, tooLargeMessage, updateOfferFor, verifyGrant, verifyLink, verifyPublicIdentity, verifyRequest, verifySiteRequest, verifyWith, walkSuccession, withoutComments };
package/dist/index.js CHANGED
@@ -862,6 +862,21 @@ var ClaimedJob = z7.object({
862
862
  * and the owner's own defaults answer under the ambiguity law.
863
863
  */
864
864
  service: z7.string().min(1).optional(),
865
+ /**
866
+ * When the work stops being worth doing — the stub's own TTL, carried on
867
+ * so the daemon can stop at it (B199).
868
+ *
869
+ * **A third clock, and not the lease.** The lease bounds how long this
870
+ * device holds the claim; this bounds how long the answer is wanted. A box
871
+ * ground two chat jobs toward `maxWallClockMs` — ten minutes — while their
872
+ * TTL was two, holding both slots and claiming nothing the whole time.
873
+ *
874
+ * Optional because the field is carried rather than required: a caller
875
+ * assembling a `ClaimedJob` without it gets the unclamped ceiling, which is
876
+ * the behaviour that existed before. The stub always has it, and the
877
+ * runner's own call site already spread it — this makes the type say so.
878
+ */
879
+ deadlineAt: z7.number().int().positive().optional(),
865
880
  lease: Lease
866
881
  }).strict();
867
882
  var ResultProvenance = z7.object({
@@ -2720,6 +2735,7 @@ export {
2720
2735
  PublicIdentity,
2721
2736
  Purpose,
2722
2737
  REFUSAL_MESSAGES,
2738
+ REFUSAL_TEXT,
2723
2739
  RESERVED_PURPOSE,
2724
2740
  RETIREMENT_WINDOW_MS,
2725
2741
  RefusalReason,