wire-mesh-core 3.8.0 → 3.10.0

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.
Files changed (123) hide show
  1. package/dist/adapters/byte-stream-connection.d.cts +2 -2
  2. package/dist/adapters/byte-stream-connection.d.mts +2 -2
  3. package/dist/adapters/frame-codec.d.cts +1 -1
  4. package/dist/adapters/frame-codec.d.mts +1 -1
  5. package/dist/adapters/node-identity.d.cts +2 -2
  6. package/dist/adapters/node-identity.d.mts +2 -2
  7. package/dist/adapters/tcp-transport.d.cts +1 -1
  8. package/dist/adapters/tcp-transport.d.mts +1 -1
  9. package/dist/adapters/threshold-identity.d.cts +2 -2
  10. package/dist/adapters/threshold-identity.d.mts +2 -2
  11. package/dist/adapters/threshold-wasm.d.cts +1 -1
  12. package/dist/adapters/threshold-wasm.d.mts +1 -1
  13. package/dist/adapters/tls-transport.d.cts +1 -1
  14. package/dist/adapters/tls-transport.d.mts +1 -1
  15. package/dist/domain/advert-extension-policy.d.cts +1 -1
  16. package/dist/domain/advert-extension-policy.d.mts +1 -1
  17. package/dist/domain/bulk.d.cts +2 -2
  18. package/dist/domain/bulk.d.mts +2 -2
  19. package/dist/domain/capability-grant.cjs +4 -4
  20. package/dist/domain/capability-grant.d.cts +3 -3
  21. package/dist/domain/capability-grant.d.mts +3 -3
  22. package/dist/domain/capability-grant.mjs +2 -2
  23. package/dist/domain/capability-request.cjs +18 -6
  24. package/dist/domain/capability-request.d.cts +10 -3
  25. package/dist/domain/capability-request.d.mts +10 -3
  26. package/dist/domain/capability-request.mjs +15 -4
  27. package/dist/domain/coordinator-election.d.cts +1 -1
  28. package/dist/domain/coordinator-election.d.mts +1 -1
  29. package/dist/domain/data-sync.d.cts +2 -2
  30. package/dist/domain/data-sync.d.mts +2 -2
  31. package/dist/domain/device-id.d.cts +1 -1
  32. package/dist/domain/device-id.d.mts +1 -1
  33. package/dist/domain/direct-manage-request.d.cts +2 -2
  34. package/dist/domain/direct-manage-request.d.mts +2 -2
  35. package/dist/domain/gossip-expansion.d.cts +1 -1
  36. package/dist/domain/gossip-expansion.d.mts +1 -1
  37. package/dist/domain/grant-candidates.cjs +2 -2
  38. package/dist/domain/grant-candidates.d.cts +1 -1
  39. package/dist/domain/grant-candidates.d.mts +1 -1
  40. package/dist/domain/grant-candidates.mjs +1 -1
  41. package/dist/domain/handshake.d.cts +1 -1
  42. package/dist/domain/handshake.d.mts +1 -1
  43. package/dist/domain/hub-mailbox.d.cts +1 -1
  44. package/dist/domain/hub-mailbox.d.mts +1 -1
  45. package/dist/domain/mesh-session.cjs +2 -2
  46. package/dist/domain/mesh-session.d.cts +3 -3
  47. package/dist/domain/mesh-session.d.mts +3 -3
  48. package/dist/domain/mesh-session.mjs +1 -1
  49. package/dist/domain/notice-board.d.cts +3 -3
  50. package/dist/domain/notice-board.d.mts +3 -3
  51. package/dist/domain/path-trace.d.cts +1 -1
  52. package/dist/domain/path-trace.d.mts +1 -1
  53. package/dist/domain/peer-advert.cjs +2 -2
  54. package/dist/domain/peer-advert.d.cts +2 -2
  55. package/dist/domain/peer-advert.d.mts +2 -2
  56. package/dist/domain/peer-advert.mjs +1 -1
  57. package/dist/domain/relay-advert.d.cts +1 -1
  58. package/dist/domain/relay-advert.d.mts +1 -1
  59. package/dist/domain/relay-hub.cjs +72 -15
  60. package/dist/domain/relay-hub.d.cts +6 -2
  61. package/dist/domain/relay-hub.d.mts +6 -2
  62. package/dist/domain/relay-hub.mjs +72 -15
  63. package/dist/domain/relay-use-gate.d.cts +2 -2
  64. package/dist/domain/relay-use-gate.d.mts +2 -2
  65. package/dist/domain/revocation-view.cjs +2 -2
  66. package/dist/domain/revocation-view.d.cts +2 -2
  67. package/dist/domain/revocation-view.d.mts +2 -2
  68. package/dist/domain/revocation-view.mjs +1 -1
  69. package/dist/domain/room-rekey.d.cts +3 -3
  70. package/dist/domain/room-rekey.d.mts +3 -3
  71. package/dist/domain/room-token-verification.cjs +2 -2
  72. package/dist/domain/room-token-verification.d.cts +1 -1
  73. package/dist/domain/room-token-verification.d.mts +1 -1
  74. package/dist/domain/room-token-verification.mjs +1 -1
  75. package/dist/domain/room.d.cts +4 -4
  76. package/dist/domain/room.d.mts +4 -4
  77. package/dist/domain/shard-manifest.d.cts +1 -1
  78. package/dist/domain/shard-manifest.d.mts +1 -1
  79. package/dist/domain/threshold-subject.cjs +2 -2
  80. package/dist/domain/threshold-subject.mjs +1 -1
  81. package/dist/domain/token-predicates.cjs +184 -0
  82. package/dist/domain/token-predicates.d.cts +2 -0
  83. package/dist/domain/token-predicates.d.mts +2 -0
  84. package/dist/domain/token-predicates.mjs +173 -0
  85. package/dist/{token-scope-CxHXTT3u.cjs → domain/token-scope.cjs} +3 -12
  86. package/dist/domain/token-scope.d.cts +11 -0
  87. package/dist/domain/token-scope.d.mts +11 -0
  88. package/dist/{token-scope-Z4bmci4M.mjs → domain/token-scope.mjs} +1 -1
  89. package/dist/domain/tokens.cjs +466 -9
  90. package/dist/domain/tokens.d.cts +131 -2
  91. package/dist/domain/tokens.d.mts +131 -2
  92. package/dist/domain/tokens.mjs +458 -1
  93. package/dist/domain/topology-snapshot.d.cts +1 -1
  94. package/dist/domain/topology-snapshot.d.mts +1 -1
  95. package/dist/domain/topology.d.cts +1 -1
  96. package/dist/domain/topology.d.mts +1 -1
  97. package/dist/domain/webrtc-signaling.cjs +2 -2
  98. package/dist/domain/webrtc-signaling.d.cts +2 -2
  99. package/dist/domain/webrtc-signaling.d.mts +2 -2
  100. package/dist/domain/webrtc-signaling.mjs +1 -1
  101. package/dist/generated/protocol.cjs +4 -2
  102. package/dist/generated/protocol.d.cts +1 -1
  103. package/dist/generated/protocol.d.mts +1 -1
  104. package/dist/generated/protocol.mjs +4 -2
  105. package/dist/{identity-DJbr96J3.d.cts → identity-B6nhlSOT.d.cts} +1 -1
  106. package/dist/{identity-ViYdZrIU.d.mts → identity-EV-HHv_D.d.mts} +1 -1
  107. package/dist/ports/identity.d.cts +1 -1
  108. package/dist/ports/identity.d.mts +1 -1
  109. package/dist/ports/transport.d.cts +1 -1
  110. package/dist/ports/transport.d.mts +1 -1
  111. package/dist/{protocol-BgR1e_NI.d.cts → protocol-DzmpxxUr.d.cts} +6 -0
  112. package/dist/{protocol-BgR1e_NI.d.mts → protocol-DzmpxxUr.d.mts} +6 -0
  113. package/dist/{room-token-verification-7zD4ib-A.d.mts → room-token-verification-Dh7SGJfK.d.cts} +2 -2
  114. package/dist/{room-token-verification-hFtBDZPO.d.cts → room-token-verification-Hb1LkpFh.d.mts} +2 -2
  115. package/dist/token-predicates-D4NNPLnp.d.cts +72 -0
  116. package/dist/token-predicates-DqpG8VZZ.d.mts +72 -0
  117. package/dist/{transport-Dv_LTCsF.d.mts → transport-bD3p_TO_.d.mts} +1 -1
  118. package/dist/{transport-DP3hdehk.d.cts → transport-gDbSHO-r.d.cts} +1 -1
  119. package/package.json +9 -1
  120. package/dist/tokens-BMWCnQEF.d.cts +0 -158
  121. package/dist/tokens-D8JlTJNA.mjs +0 -617
  122. package/dist/tokens-DRkm_QOR.d.mts +0 -158
  123. package/dist/tokens-tPJQ7Vzt.cjs +0 -664
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_tokens = require("../tokens-tPJQ7Vzt.cjs");
2
+ const require_domain_tokens = require("./tokens.cjs");
3
3
  //#region src/domain/webrtc-signaling.ts
4
4
  /** The one capability verb gating every core/webrtc message shape: an authority over this node's own signaling as a whole, not three separate resources, mirroring how core/exec's exec:pty gates all of its own inner verbs. webrtc.sfu-track-map is gated by this same verb (see spec/webrtc.cddl's own comment): an SFU able to shape a negotiation can already misreport whose media is on which mid, so a separate capability over the track-map itself would guard nothing a client doesn't already have to trust the SFU for. */
5
5
  const WEBRTC_SIGNAL_VERB = "webrtc:signal";
@@ -86,7 +86,7 @@ function createNegotiationIdAllocator() {
86
86
  /** True when an incoming offer's own token authorizes webrtc:signal against this node's scope: verifyCapabilityToken checks the token's own internal validity and delegation chain; the capability/scope match against what is actually being invoked here is this caller's own responsibility, same as any other domain's request handler. expectedBearer is deliberately not checked: neither a browser client's MeshSession nor an SFU's own connection handling exposes a way to learn a peer's device-id independently of the token itself, unlike a scope with a path that constrains a specific resource. */
87
87
  async function authorizeIncomingOffer(incoming, options) {
88
88
  if (incoming.token === void 0) return false;
89
- const verdict = await require_tokens.verifyCapabilityToken(incoming.token, options);
89
+ const verdict = await require_domain_tokens.verifyCapabilityToken(incoming.token, options);
90
90
  if (!verdict.ok) return false;
91
91
  return verdict.claims.capability === "webrtc:signal" && verdict.claims.scope.kind === WEBRTC_SIGNAL_SCOPE.kind;
92
92
  }
@@ -1,6 +1,6 @@
1
- import { H as ManageCommandParams, Lt as SfuTrackEntry, Rt as SfuTrackMap, V as ManageCommand, an as WebrtcAnswer, f as CapabilityScope, on as WebrtcIceCandidate, sn as WebrtcOffer, z as IceCandidateInit } from "../protocol-BgR1e_NI.cjs";
1
+ import { H as ManageCommandParams, Lt as SfuTrackEntry, Rt as SfuTrackMap, V as ManageCommand, an as WebrtcAnswer, f as CapabilityScope, on as WebrtcIceCandidate, sn as WebrtcOffer, z as IceCandidateInit } from "../protocol-DzmpxxUr.cjs";
2
2
  import { IncomingManageRequest } from "./mesh-session.cjs";
3
- import { d as VerifyCapabilityTokenOptions } from "../tokens-BMWCnQEF.cjs";
3
+ import { VerifyCapabilityTokenOptions } from "./tokens.cjs";
4
4
  //#region src/domain/webrtc-signaling.d.ts
5
5
  /** The one capability verb gating every core/webrtc message shape: an authority over this node's own signaling as a whole, not three separate resources, mirroring how core/exec's exec:pty gates all of its own inner verbs. webrtc.sfu-track-map is gated by this same verb (see spec/webrtc.cddl's own comment): an SFU able to shape a negotiation can already misreport whose media is on which mid, so a separate capability over the track-map itself would guard nothing a client doesn't already have to trust the SFU for. */
6
6
  export declare const WEBRTC_SIGNAL_VERB = "webrtc:signal";
@@ -1,6 +1,6 @@
1
- import { H as ManageCommandParams, Lt as SfuTrackEntry, Rt as SfuTrackMap, V as ManageCommand, an as WebrtcAnswer, f as CapabilityScope, on as WebrtcIceCandidate, sn as WebrtcOffer, z as IceCandidateInit } from "../protocol-BgR1e_NI.mjs";
1
+ import { H as ManageCommandParams, Lt as SfuTrackEntry, Rt as SfuTrackMap, V as ManageCommand, an as WebrtcAnswer, f as CapabilityScope, on as WebrtcIceCandidate, sn as WebrtcOffer, z as IceCandidateInit } from "../protocol-DzmpxxUr.mjs";
2
2
  import { IncomingManageRequest } from "./mesh-session.mjs";
3
- import { d as VerifyCapabilityTokenOptions } from "../tokens-DRkm_QOR.mjs";
3
+ import { VerifyCapabilityTokenOptions } from "./tokens.mjs";
4
4
  //#region src/domain/webrtc-signaling.d.ts
5
5
  /** The one capability verb gating every core/webrtc message shape: an authority over this node's own signaling as a whole, not three separate resources, mirroring how core/exec's exec:pty gates all of its own inner verbs. webrtc.sfu-track-map is gated by this same verb (see spec/webrtc.cddl's own comment): an SFU able to shape a negotiation can already misreport whose media is on which mid, so a separate capability over the track-map itself would guard nothing a client doesn't already have to trust the SFU for. */
6
6
  export declare const WEBRTC_SIGNAL_VERB = "webrtc:signal";
@@ -1,4 +1,4 @@
1
- import { s as verifyCapabilityToken } from "../tokens-D8JlTJNA.mjs";
1
+ import { verifyCapabilityToken } from "./tokens.mjs";
2
2
  //#region src/domain/webrtc-signaling.ts
3
3
  /** The one capability verb gating every core/webrtc message shape: an authority over this node's own signaling as a whole, not three separate resources, mirroring how core/exec's exec:pty gates all of its own inner verbs. webrtc.sfu-track-map is gated by this same verb (see spec/webrtc.cddl's own comment): an SFU able to shape a negotiation can already misreport whose media is on which mid, so a separate capability over the track-map itself would guard nothing a client doesn't already have to trust the SFU for. */
4
4
  const WEBRTC_SIGNAL_VERB = "webrtc:signal";
@@ -522,7 +522,8 @@ const relayOfferFrameSchema = zod.z.lazy(() => zod.z.object({
522
522
  }));
523
523
  const relayConnectFrameSchema = zod.z.lazy(() => zod.z.object({
524
524
  "type": zod.z.literal("relay-connect"),
525
- "target-device": zod.z.lazy(() => deviceIdSchema)
525
+ "target-device": zod.z.lazy(() => deviceIdSchema),
526
+ "source-device": zod.z.lazy(() => deviceIdSchema).optional()
526
527
  }));
527
528
  const relayDataFrameSchema = zod.z.lazy(() => zod.z.object({
528
529
  "type": zod.z.literal("relay-data"),
@@ -532,7 +533,8 @@ const relayDataFrameSchema = zod.z.lazy(() => zod.z.object({
532
533
  }));
533
534
  const relayInboundFrameSchema = zod.z.lazy(() => zod.z.object({
534
535
  "type": zod.z.literal("relay-inbound"),
535
- "source-device": zod.z.lazy(() => deviceIdSchema)
536
+ "source-device": zod.z.lazy(() => deviceIdSchema),
537
+ "target-device": zod.z.lazy(() => deviceIdSchema).optional()
536
538
  }));
537
539
  const coordinatorFrameSchema = zod.z.lazy(() => zod.z.object({
538
540
  "type": zod.z.literal("coordinator"),
@@ -1,2 +1,2 @@
1
- import { $ as PathTraceOk, $n as manageRequestFrameSchema, $r as thresholdCommitSchema, $t as ThresholdSubject, A as DomainId, An as coseSign1Schema, Ar as roomJoinOkSchema, At as RoomPath, B as IdentityKey, Bn as execSessionInfoSchema, Br as roomRekeySchema, Bt as StreamDataFrame, C as CoseTokenHeaders, Cn as closeFrameSchema, Cr as relayDataFrameSchema, Ct as RoomJoinOk, D as DeviceId, Dn as coseHeaderAlgSchema, Dr as revocationClaimsSchema, Dt as RoomMembersOk, E as DataRequestFrame, En as coreDomainNameSchema, Er as revocationAnnounceFrameSchema, Et as RoomMembers, F as GossipFrame, Fn as deviceIdHexSchema, Fr as roomMembersSchema, Ft as SecureHelloFrame, G as ManageRequestFrame, Gn as handleRecordSchema, Gr as sfuTrackEntrySchema, Gt as ThresholdCommit, H as ManageCommandParams, Hn as frameVariantSchema, Hr as secureDataFrameSchema, Ht as StreamSession, I as HandleClaims, In as deviceIdSchema, Ir as roomNoticeClaimsSchema, It as SessionId, J as NamespacedCapability, Jn as identityKeySchema, Jr as streamDataFrameSchema, Jt as ThresholdKeygenRound1, K as ManageResponseFrame, Kn as handshakeFrameSchema, Kr as sfuTrackMapSchema, Kt as ThresholdCommitment, L as HandleRecord, Ln as dmRoomPathSchema, Lr as roomNoticeSchema, Lt as SfuTrackEntry, M as ExecSessionInfo, Mn as dataEntriesFrameSchema, Mr as roomLeaveSchema, Mt as RoomRekey, N as Frame, Nn as dataHaveFrameSchema, Nr as roomMemberSchema, Nt as RoomSend, O as DeviceIdHex, On as coseHeaderKidSchema, Or as revocationEntrySchema, Ot as RoomNotice, P as FrameVariant, Pn as dataRequestFrameSchema, Pr as roomMembersOkSchema, Pt as SecureDataFrame, Q as PathTrace, Qn as manageOkSchema, Qr as thresholdAbortSchema, Qt as ThresholdSign, R as HandshakeFrame, Rn as domainIdSchema, Rr as roomPathSchema, Rt as SfuTrackMap, S as CoseSign1, Sn as capabilityVerbSchema, Sr as relayConnectFrameSchema, St as RoomJoin, T as DataHaveFrame, Tn as coreCapabilitySchema, Tr as relayOfferFrameSchema, Tt as RoomMember, U as ManageError, Un as gossipFrameSchema, Ur as secureHelloFrameSchema, Ut as SyncPunchFrame, V as ManageCommand, Vn as frameSchema, Vr as roomSendSchema, Vt as StreamEndFrame, W as ManageOk, Wn as handleClaimsSchema, Wr as sessionIdSchema, Wt as ThresholdAbort, X as ObservedAddressFrame, Xn as manageCommandSchema, Xr as streamSessionSchema, Xt as ThresholdShareClaims, Y as NamespacedDomainId, Yn as manageCommandParamsSchema, Yr as streamEndFrameSchema, Yt as ThresholdKeygenRound2, Z as OwnerNamedRoomPath, Zn as manageErrorSchema, Zr as syncPunchFrameSchema, Zt as ThresholdShareEnvelope, _ as CoreCapability, _n as capabilityGrantOkSchema, _r as protocolVersionSchema, _t as RelayOfferFrame, a as BulkOpen, ai as thresholdShareEnvelopeSchema, an as WebrtcAnswer, ar as ownerNamedRoomPathSchema, at as PrivateUseDomainId, b as CoseHeaderKid, bn as capabilityScopeSchema, br as ptySpawnSchema, bt as RevocationEntry, c as CandidatesFrame, ci as tokenClaimsSchema, cn as WireCandidate, cr as peerAdvertSchema, ct as ProcSpawn, d as CapabilityRequest, di as transferIdSchema, dn as bulkDataFrameSchema, dr as pongFrameSchema, dt as PtyResize, ei as thresholdCommitmentSchema, en as TokenClaims, er as manageResponseFrameSchema, et as PeerAdvert, f as CapabilityScope, fi as versionGetSchema, fn as bulkEndFrameSchema, fr as privateUseCapabilitySchema, ft as PtySpawn, g as CoordinatorFrame, gi as wireCandidateSchema, gn as candidatesFrameSchema, gr as procSpawnSchema, gt as RelayInboundFrame, h as CloseFrame, hi as webrtcOfferSchema, hn as candidateKindSchema, hr as procSignalSchema, ht as RelayDataFrame, i as BulkEndFrame, ii as thresholdShareClaimsSchema, in as VersionGet, ir as observedAddressFrameSchema, it as PrivateUseCapability, j as ExecList, jn as coseTokenHeadersSchema, jr as roomJoinSchema, jt as RoomRead, k as DmRoomPath, kn as coseHeaderLabelSchema, kr as roomInviteSchema, kt as RoomNoticeClaims, l as CapabilityGrant, li as topologyGetSchema, ln as bulkAckFrameSchema, lr as peerIdentitySchema, lt as ProtocolVersion, m as CapabilityVerb, mi as webrtcIceCandidateSchema, mn as bulkResumeSchema, mr as procKillSchema, mt as RelayConnectFrame, n as BulkCancel, ni as thresholdKeygenRound1Schema, nn as TopologyPeers, nr as namespacedCapabilitySchema, nt as PingFrame, o as BulkResume, oi as thresholdSignSchema, on as WebrtcIceCandidate, or as pathTraceOkSchema, ot as ProcKill, p as CapabilityToken, pi as webrtcAnswerSchema, pn as bulkOpenSchema, pr as privateUseDomainIdSchema, pt as PtyWrite, q as MessageRef, qn as iceCandidateInitSchema, qr as streamAckFrameSchema, qt as ThresholdKeygenConfirm, r as BulkDataFrame, ri as thresholdKeygenRound2Schema, rn as TransferId, rr as namespacedDomainIdSchema, rt as PongFrame, s as CandidateKind, si as thresholdSubjectSchema, sn as WebrtcOffer, sr as pathTraceSchema, st as ProcSignal, t as BulkAckFrame, ti as thresholdKeygenConfirmSchema, tn as TopologyGet, tr as messageRefSchema, tt as PeerIdentity, u as CapabilityGrantOk, ui as topologyPeersSchema, un as bulkCancelSchema, ur as pingFrameSchema, ut as PtyKill, v as CoreDomainName, vn as capabilityGrantSchema, vr as ptyKillSchema, vt as RevocationAnnounceFrame, w as DataEntriesFrame, wn as coordinatorFrameSchema, wr as relayInboundFrameSchema, wt as RoomLeave, x as CoseHeaderLabel, xn as capabilityTokenSchema, xr as ptyWriteSchema, xt as RoomInvite, y as CoseHeaderAlg, yn as capabilityRequestSchema, yr as ptyResizeSchema, yt as RevocationClaims, z as IceCandidateInit, zn as execListSchema, zr as roomReadSchema, zt as StreamAckFrame } from "../protocol-BgR1e_NI.cjs";
1
+ import { $ as PathTraceOk, $n as manageRequestFrameSchema, $r as thresholdCommitSchema, $t as ThresholdSubject, A as DomainId, An as coseSign1Schema, Ar as roomJoinOkSchema, At as RoomPath, B as IdentityKey, Bn as execSessionInfoSchema, Br as roomRekeySchema, Bt as StreamDataFrame, C as CoseTokenHeaders, Cn as closeFrameSchema, Cr as relayDataFrameSchema, Ct as RoomJoinOk, D as DeviceId, Dn as coseHeaderAlgSchema, Dr as revocationClaimsSchema, Dt as RoomMembersOk, E as DataRequestFrame, En as coreDomainNameSchema, Er as revocationAnnounceFrameSchema, Et as RoomMembers, F as GossipFrame, Fn as deviceIdHexSchema, Fr as roomMembersSchema, Ft as SecureHelloFrame, G as ManageRequestFrame, Gn as handleRecordSchema, Gr as sfuTrackEntrySchema, Gt as ThresholdCommit, H as ManageCommandParams, Hn as frameVariantSchema, Hr as secureDataFrameSchema, Ht as StreamSession, I as HandleClaims, In as deviceIdSchema, Ir as roomNoticeClaimsSchema, It as SessionId, J as NamespacedCapability, Jn as identityKeySchema, Jr as streamDataFrameSchema, Jt as ThresholdKeygenRound1, K as ManageResponseFrame, Kn as handshakeFrameSchema, Kr as sfuTrackMapSchema, Kt as ThresholdCommitment, L as HandleRecord, Ln as dmRoomPathSchema, Lr as roomNoticeSchema, Lt as SfuTrackEntry, M as ExecSessionInfo, Mn as dataEntriesFrameSchema, Mr as roomLeaveSchema, Mt as RoomRekey, N as Frame, Nn as dataHaveFrameSchema, Nr as roomMemberSchema, Nt as RoomSend, O as DeviceIdHex, On as coseHeaderKidSchema, Or as revocationEntrySchema, Ot as RoomNotice, P as FrameVariant, Pn as dataRequestFrameSchema, Pr as roomMembersOkSchema, Pt as SecureDataFrame, Q as PathTrace, Qn as manageOkSchema, Qr as thresholdAbortSchema, Qt as ThresholdSign, R as HandshakeFrame, Rn as domainIdSchema, Rr as roomPathSchema, Rt as SfuTrackMap, S as CoseSign1, Sn as capabilityVerbSchema, Sr as relayConnectFrameSchema, St as RoomJoin, T as DataHaveFrame, Tn as coreCapabilitySchema, Tr as relayOfferFrameSchema, Tt as RoomMember, U as ManageError, Un as gossipFrameSchema, Ur as secureHelloFrameSchema, Ut as SyncPunchFrame, V as ManageCommand, Vn as frameSchema, Vr as roomSendSchema, Vt as StreamEndFrame, W as ManageOk, Wn as handleClaimsSchema, Wr as sessionIdSchema, Wt as ThresholdAbort, X as ObservedAddressFrame, Xn as manageCommandSchema, Xr as streamSessionSchema, Xt as ThresholdShareClaims, Y as NamespacedDomainId, Yn as manageCommandParamsSchema, Yr as streamEndFrameSchema, Yt as ThresholdKeygenRound2, Z as OwnerNamedRoomPath, Zn as manageErrorSchema, Zr as syncPunchFrameSchema, Zt as ThresholdShareEnvelope, _ as CoreCapability, _n as capabilityGrantOkSchema, _r as protocolVersionSchema, _t as RelayOfferFrame, a as BulkOpen, ai as thresholdShareEnvelopeSchema, an as WebrtcAnswer, ar as ownerNamedRoomPathSchema, at as PrivateUseDomainId, b as CoseHeaderKid, bn as capabilityScopeSchema, br as ptySpawnSchema, bt as RevocationEntry, c as CandidatesFrame, ci as tokenClaimsSchema, cn as WireCandidate, cr as peerAdvertSchema, ct as ProcSpawn, d as CapabilityRequest, di as transferIdSchema, dn as bulkDataFrameSchema, dr as pongFrameSchema, dt as PtyResize, ei as thresholdCommitmentSchema, en as TokenClaims, er as manageResponseFrameSchema, et as PeerAdvert, f as CapabilityScope, fi as versionGetSchema, fn as bulkEndFrameSchema, fr as privateUseCapabilitySchema, ft as PtySpawn, g as CoordinatorFrame, gi as wireCandidateSchema, gn as candidatesFrameSchema, gr as procSpawnSchema, gt as RelayInboundFrame, h as CloseFrame, hi as webrtcOfferSchema, hn as candidateKindSchema, hr as procSignalSchema, ht as RelayDataFrame, i as BulkEndFrame, ii as thresholdShareClaimsSchema, in as VersionGet, ir as observedAddressFrameSchema, it as PrivateUseCapability, j as ExecList, jn as coseTokenHeadersSchema, jr as roomJoinSchema, jt as RoomRead, k as DmRoomPath, kn as coseHeaderLabelSchema, kr as roomInviteSchema, kt as RoomNoticeClaims, l as CapabilityGrant, li as topologyGetSchema, ln as bulkAckFrameSchema, lr as peerIdentitySchema, lt as ProtocolVersion, m as CapabilityVerb, mi as webrtcIceCandidateSchema, mn as bulkResumeSchema, mr as procKillSchema, mt as RelayConnectFrame, n as BulkCancel, ni as thresholdKeygenRound1Schema, nn as TopologyPeers, nr as namespacedCapabilitySchema, nt as PingFrame, o as BulkResume, oi as thresholdSignSchema, on as WebrtcIceCandidate, or as pathTraceOkSchema, ot as ProcKill, p as CapabilityToken, pi as webrtcAnswerSchema, pn as bulkOpenSchema, pr as privateUseDomainIdSchema, pt as PtyWrite, q as MessageRef, qn as iceCandidateInitSchema, qr as streamAckFrameSchema, qt as ThresholdKeygenConfirm, r as BulkDataFrame, ri as thresholdKeygenRound2Schema, rn as TransferId, rr as namespacedDomainIdSchema, rt as PongFrame, s as CandidateKind, si as thresholdSubjectSchema, sn as WebrtcOffer, sr as pathTraceSchema, st as ProcSignal, t as BulkAckFrame, ti as thresholdKeygenConfirmSchema, tn as TopologyGet, tr as messageRefSchema, tt as PeerIdentity, u as CapabilityGrantOk, ui as topologyPeersSchema, un as bulkCancelSchema, ur as pingFrameSchema, ut as PtyKill, v as CoreDomainName, vn as capabilityGrantSchema, vr as ptyKillSchema, vt as RevocationAnnounceFrame, w as DataEntriesFrame, wn as coordinatorFrameSchema, wr as relayInboundFrameSchema, wt as RoomLeave, x as CoseHeaderLabel, xn as capabilityTokenSchema, xr as ptyWriteSchema, xt as RoomInvite, y as CoseHeaderAlg, yn as capabilityRequestSchema, yr as ptyResizeSchema, yt as RevocationClaims, z as IceCandidateInit, zn as execListSchema, zr as roomReadSchema, zt as StreamAckFrame } from "../protocol-DzmpxxUr.cjs";
2
2
  export { BulkAckFrame, BulkCancel, BulkDataFrame, BulkEndFrame, BulkOpen, BulkResume, CandidateKind, CandidatesFrame, CapabilityGrant, CapabilityGrantOk, CapabilityRequest, CapabilityScope, CapabilityToken, CapabilityVerb, CloseFrame, CoordinatorFrame, CoreCapability, CoreDomainName, CoseHeaderAlg, CoseHeaderKid, CoseHeaderLabel, CoseSign1, CoseTokenHeaders, DataEntriesFrame, DataHaveFrame, DataRequestFrame, DeviceId, DeviceIdHex, DmRoomPath, DomainId, ExecList, ExecSessionInfo, Frame, FrameVariant, GossipFrame, HandleClaims, HandleRecord, HandshakeFrame, IceCandidateInit, IdentityKey, ManageCommand, ManageCommandParams, ManageError, ManageOk, ManageRequestFrame, ManageResponseFrame, MessageRef, NamespacedCapability, NamespacedDomainId, ObservedAddressFrame, OwnerNamedRoomPath, PathTrace, PathTraceOk, PeerAdvert, PeerIdentity, PingFrame, PongFrame, PrivateUseCapability, PrivateUseDomainId, ProcKill, ProcSignal, ProcSpawn, ProtocolVersion, PtyKill, PtyResize, PtySpawn, PtyWrite, RelayConnectFrame, RelayDataFrame, RelayInboundFrame, RelayOfferFrame, RevocationAnnounceFrame, RevocationClaims, RevocationEntry, RoomInvite, RoomJoin, RoomJoinOk, RoomLeave, RoomMember, RoomMembers, RoomMembersOk, RoomNotice, RoomNoticeClaims, RoomPath, RoomRead, RoomRekey, RoomSend, SecureDataFrame, SecureHelloFrame, SessionId, SfuTrackEntry, SfuTrackMap, StreamAckFrame, StreamDataFrame, StreamEndFrame, StreamSession, SyncPunchFrame, ThresholdAbort, ThresholdCommit, ThresholdCommitment, ThresholdKeygenConfirm, ThresholdKeygenRound1, ThresholdKeygenRound2, ThresholdShareClaims, ThresholdShareEnvelope, ThresholdSign, ThresholdSubject, TokenClaims, TopologyGet, TopologyPeers, TransferId, VersionGet, WebrtcAnswer, WebrtcIceCandidate, WebrtcOffer, WireCandidate, bulkAckFrameSchema, bulkCancelSchema, bulkDataFrameSchema, bulkEndFrameSchema, bulkOpenSchema, bulkResumeSchema, candidateKindSchema, candidatesFrameSchema, capabilityGrantOkSchema, capabilityGrantSchema, capabilityRequestSchema, capabilityScopeSchema, capabilityTokenSchema, capabilityVerbSchema, closeFrameSchema, coordinatorFrameSchema, coreCapabilitySchema, coreDomainNameSchema, coseHeaderAlgSchema, coseHeaderKidSchema, coseHeaderLabelSchema, coseSign1Schema, coseTokenHeadersSchema, dataEntriesFrameSchema, dataHaveFrameSchema, dataRequestFrameSchema, deviceIdHexSchema, deviceIdSchema, dmRoomPathSchema, domainIdSchema, execListSchema, execSessionInfoSchema, frameSchema, frameVariantSchema, gossipFrameSchema, handleClaimsSchema, handleRecordSchema, handshakeFrameSchema, iceCandidateInitSchema, identityKeySchema, manageCommandParamsSchema, manageCommandSchema, manageErrorSchema, manageOkSchema, manageRequestFrameSchema, manageResponseFrameSchema, messageRefSchema, namespacedCapabilitySchema, namespacedDomainIdSchema, observedAddressFrameSchema, ownerNamedRoomPathSchema, pathTraceOkSchema, pathTraceSchema, peerAdvertSchema, peerIdentitySchema, pingFrameSchema, pongFrameSchema, privateUseCapabilitySchema, privateUseDomainIdSchema, procKillSchema, procSignalSchema, procSpawnSchema, protocolVersionSchema, ptyKillSchema, ptyResizeSchema, ptySpawnSchema, ptyWriteSchema, relayConnectFrameSchema, relayDataFrameSchema, relayInboundFrameSchema, relayOfferFrameSchema, revocationAnnounceFrameSchema, revocationClaimsSchema, revocationEntrySchema, roomInviteSchema, roomJoinOkSchema, roomJoinSchema, roomLeaveSchema, roomMemberSchema, roomMembersOkSchema, roomMembersSchema, roomNoticeClaimsSchema, roomNoticeSchema, roomPathSchema, roomReadSchema, roomRekeySchema, roomSendSchema, secureDataFrameSchema, secureHelloFrameSchema, sessionIdSchema, sfuTrackEntrySchema, sfuTrackMapSchema, streamAckFrameSchema, streamDataFrameSchema, streamEndFrameSchema, streamSessionSchema, syncPunchFrameSchema, thresholdAbortSchema, thresholdCommitSchema, thresholdCommitmentSchema, thresholdKeygenConfirmSchema, thresholdKeygenRound1Schema, thresholdKeygenRound2Schema, thresholdShareClaimsSchema, thresholdShareEnvelopeSchema, thresholdSignSchema, thresholdSubjectSchema, tokenClaimsSchema, topologyGetSchema, topologyPeersSchema, transferIdSchema, versionGetSchema, webrtcAnswerSchema, webrtcIceCandidateSchema, webrtcOfferSchema, wireCandidateSchema };
@@ -1,2 +1,2 @@
1
- import { $ as PathTraceOk, $n as manageRequestFrameSchema, $r as thresholdCommitSchema, $t as ThresholdSubject, A as DomainId, An as coseSign1Schema, Ar as roomJoinOkSchema, At as RoomPath, B as IdentityKey, Bn as execSessionInfoSchema, Br as roomRekeySchema, Bt as StreamDataFrame, C as CoseTokenHeaders, Cn as closeFrameSchema, Cr as relayDataFrameSchema, Ct as RoomJoinOk, D as DeviceId, Dn as coseHeaderAlgSchema, Dr as revocationClaimsSchema, Dt as RoomMembersOk, E as DataRequestFrame, En as coreDomainNameSchema, Er as revocationAnnounceFrameSchema, Et as RoomMembers, F as GossipFrame, Fn as deviceIdHexSchema, Fr as roomMembersSchema, Ft as SecureHelloFrame, G as ManageRequestFrame, Gn as handleRecordSchema, Gr as sfuTrackEntrySchema, Gt as ThresholdCommit, H as ManageCommandParams, Hn as frameVariantSchema, Hr as secureDataFrameSchema, Ht as StreamSession, I as HandleClaims, In as deviceIdSchema, Ir as roomNoticeClaimsSchema, It as SessionId, J as NamespacedCapability, Jn as identityKeySchema, Jr as streamDataFrameSchema, Jt as ThresholdKeygenRound1, K as ManageResponseFrame, Kn as handshakeFrameSchema, Kr as sfuTrackMapSchema, Kt as ThresholdCommitment, L as HandleRecord, Ln as dmRoomPathSchema, Lr as roomNoticeSchema, Lt as SfuTrackEntry, M as ExecSessionInfo, Mn as dataEntriesFrameSchema, Mr as roomLeaveSchema, Mt as RoomRekey, N as Frame, Nn as dataHaveFrameSchema, Nr as roomMemberSchema, Nt as RoomSend, O as DeviceIdHex, On as coseHeaderKidSchema, Or as revocationEntrySchema, Ot as RoomNotice, P as FrameVariant, Pn as dataRequestFrameSchema, Pr as roomMembersOkSchema, Pt as SecureDataFrame, Q as PathTrace, Qn as manageOkSchema, Qr as thresholdAbortSchema, Qt as ThresholdSign, R as HandshakeFrame, Rn as domainIdSchema, Rr as roomPathSchema, Rt as SfuTrackMap, S as CoseSign1, Sn as capabilityVerbSchema, Sr as relayConnectFrameSchema, St as RoomJoin, T as DataHaveFrame, Tn as coreCapabilitySchema, Tr as relayOfferFrameSchema, Tt as RoomMember, U as ManageError, Un as gossipFrameSchema, Ur as secureHelloFrameSchema, Ut as SyncPunchFrame, V as ManageCommand, Vn as frameSchema, Vr as roomSendSchema, Vt as StreamEndFrame, W as ManageOk, Wn as handleClaimsSchema, Wr as sessionIdSchema, Wt as ThresholdAbort, X as ObservedAddressFrame, Xn as manageCommandSchema, Xr as streamSessionSchema, Xt as ThresholdShareClaims, Y as NamespacedDomainId, Yn as manageCommandParamsSchema, Yr as streamEndFrameSchema, Yt as ThresholdKeygenRound2, Z as OwnerNamedRoomPath, Zn as manageErrorSchema, Zr as syncPunchFrameSchema, Zt as ThresholdShareEnvelope, _ as CoreCapability, _n as capabilityGrantOkSchema, _r as protocolVersionSchema, _t as RelayOfferFrame, a as BulkOpen, ai as thresholdShareEnvelopeSchema, an as WebrtcAnswer, ar as ownerNamedRoomPathSchema, at as PrivateUseDomainId, b as CoseHeaderKid, bn as capabilityScopeSchema, br as ptySpawnSchema, bt as RevocationEntry, c as CandidatesFrame, ci as tokenClaimsSchema, cn as WireCandidate, cr as peerAdvertSchema, ct as ProcSpawn, d as CapabilityRequest, di as transferIdSchema, dn as bulkDataFrameSchema, dr as pongFrameSchema, dt as PtyResize, ei as thresholdCommitmentSchema, en as TokenClaims, er as manageResponseFrameSchema, et as PeerAdvert, f as CapabilityScope, fi as versionGetSchema, fn as bulkEndFrameSchema, fr as privateUseCapabilitySchema, ft as PtySpawn, g as CoordinatorFrame, gi as wireCandidateSchema, gn as candidatesFrameSchema, gr as procSpawnSchema, gt as RelayInboundFrame, h as CloseFrame, hi as webrtcOfferSchema, hn as candidateKindSchema, hr as procSignalSchema, ht as RelayDataFrame, i as BulkEndFrame, ii as thresholdShareClaimsSchema, in as VersionGet, ir as observedAddressFrameSchema, it as PrivateUseCapability, j as ExecList, jn as coseTokenHeadersSchema, jr as roomJoinSchema, jt as RoomRead, k as DmRoomPath, kn as coseHeaderLabelSchema, kr as roomInviteSchema, kt as RoomNoticeClaims, l as CapabilityGrant, li as topologyGetSchema, ln as bulkAckFrameSchema, lr as peerIdentitySchema, lt as ProtocolVersion, m as CapabilityVerb, mi as webrtcIceCandidateSchema, mn as bulkResumeSchema, mr as procKillSchema, mt as RelayConnectFrame, n as BulkCancel, ni as thresholdKeygenRound1Schema, nn as TopologyPeers, nr as namespacedCapabilitySchema, nt as PingFrame, o as BulkResume, oi as thresholdSignSchema, on as WebrtcIceCandidate, or as pathTraceOkSchema, ot as ProcKill, p as CapabilityToken, pi as webrtcAnswerSchema, pn as bulkOpenSchema, pr as privateUseDomainIdSchema, pt as PtyWrite, q as MessageRef, qn as iceCandidateInitSchema, qr as streamAckFrameSchema, qt as ThresholdKeygenConfirm, r as BulkDataFrame, ri as thresholdKeygenRound2Schema, rn as TransferId, rr as namespacedDomainIdSchema, rt as PongFrame, s as CandidateKind, si as thresholdSubjectSchema, sn as WebrtcOffer, sr as pathTraceSchema, st as ProcSignal, t as BulkAckFrame, ti as thresholdKeygenConfirmSchema, tn as TopologyGet, tr as messageRefSchema, tt as PeerIdentity, u as CapabilityGrantOk, ui as topologyPeersSchema, un as bulkCancelSchema, ur as pingFrameSchema, ut as PtyKill, v as CoreDomainName, vn as capabilityGrantSchema, vr as ptyKillSchema, vt as RevocationAnnounceFrame, w as DataEntriesFrame, wn as coordinatorFrameSchema, wr as relayInboundFrameSchema, wt as RoomLeave, x as CoseHeaderLabel, xn as capabilityTokenSchema, xr as ptyWriteSchema, xt as RoomInvite, y as CoseHeaderAlg, yn as capabilityRequestSchema, yr as ptyResizeSchema, yt as RevocationClaims, z as IceCandidateInit, zn as execListSchema, zr as roomReadSchema, zt as StreamAckFrame } from "../protocol-BgR1e_NI.mjs";
1
+ import { $ as PathTraceOk, $n as manageRequestFrameSchema, $r as thresholdCommitSchema, $t as ThresholdSubject, A as DomainId, An as coseSign1Schema, Ar as roomJoinOkSchema, At as RoomPath, B as IdentityKey, Bn as execSessionInfoSchema, Br as roomRekeySchema, Bt as StreamDataFrame, C as CoseTokenHeaders, Cn as closeFrameSchema, Cr as relayDataFrameSchema, Ct as RoomJoinOk, D as DeviceId, Dn as coseHeaderAlgSchema, Dr as revocationClaimsSchema, Dt as RoomMembersOk, E as DataRequestFrame, En as coreDomainNameSchema, Er as revocationAnnounceFrameSchema, Et as RoomMembers, F as GossipFrame, Fn as deviceIdHexSchema, Fr as roomMembersSchema, Ft as SecureHelloFrame, G as ManageRequestFrame, Gn as handleRecordSchema, Gr as sfuTrackEntrySchema, Gt as ThresholdCommit, H as ManageCommandParams, Hn as frameVariantSchema, Hr as secureDataFrameSchema, Ht as StreamSession, I as HandleClaims, In as deviceIdSchema, Ir as roomNoticeClaimsSchema, It as SessionId, J as NamespacedCapability, Jn as identityKeySchema, Jr as streamDataFrameSchema, Jt as ThresholdKeygenRound1, K as ManageResponseFrame, Kn as handshakeFrameSchema, Kr as sfuTrackMapSchema, Kt as ThresholdCommitment, L as HandleRecord, Ln as dmRoomPathSchema, Lr as roomNoticeSchema, Lt as SfuTrackEntry, M as ExecSessionInfo, Mn as dataEntriesFrameSchema, Mr as roomLeaveSchema, Mt as RoomRekey, N as Frame, Nn as dataHaveFrameSchema, Nr as roomMemberSchema, Nt as RoomSend, O as DeviceIdHex, On as coseHeaderKidSchema, Or as revocationEntrySchema, Ot as RoomNotice, P as FrameVariant, Pn as dataRequestFrameSchema, Pr as roomMembersOkSchema, Pt as SecureDataFrame, Q as PathTrace, Qn as manageOkSchema, Qr as thresholdAbortSchema, Qt as ThresholdSign, R as HandshakeFrame, Rn as domainIdSchema, Rr as roomPathSchema, Rt as SfuTrackMap, S as CoseSign1, Sn as capabilityVerbSchema, Sr as relayConnectFrameSchema, St as RoomJoin, T as DataHaveFrame, Tn as coreCapabilitySchema, Tr as relayOfferFrameSchema, Tt as RoomMember, U as ManageError, Un as gossipFrameSchema, Ur as secureHelloFrameSchema, Ut as SyncPunchFrame, V as ManageCommand, Vn as frameSchema, Vr as roomSendSchema, Vt as StreamEndFrame, W as ManageOk, Wn as handleClaimsSchema, Wr as sessionIdSchema, Wt as ThresholdAbort, X as ObservedAddressFrame, Xn as manageCommandSchema, Xr as streamSessionSchema, Xt as ThresholdShareClaims, Y as NamespacedDomainId, Yn as manageCommandParamsSchema, Yr as streamEndFrameSchema, Yt as ThresholdKeygenRound2, Z as OwnerNamedRoomPath, Zn as manageErrorSchema, Zr as syncPunchFrameSchema, Zt as ThresholdShareEnvelope, _ as CoreCapability, _n as capabilityGrantOkSchema, _r as protocolVersionSchema, _t as RelayOfferFrame, a as BulkOpen, ai as thresholdShareEnvelopeSchema, an as WebrtcAnswer, ar as ownerNamedRoomPathSchema, at as PrivateUseDomainId, b as CoseHeaderKid, bn as capabilityScopeSchema, br as ptySpawnSchema, bt as RevocationEntry, c as CandidatesFrame, ci as tokenClaimsSchema, cn as WireCandidate, cr as peerAdvertSchema, ct as ProcSpawn, d as CapabilityRequest, di as transferIdSchema, dn as bulkDataFrameSchema, dr as pongFrameSchema, dt as PtyResize, ei as thresholdCommitmentSchema, en as TokenClaims, er as manageResponseFrameSchema, et as PeerAdvert, f as CapabilityScope, fi as versionGetSchema, fn as bulkEndFrameSchema, fr as privateUseCapabilitySchema, ft as PtySpawn, g as CoordinatorFrame, gi as wireCandidateSchema, gn as candidatesFrameSchema, gr as procSpawnSchema, gt as RelayInboundFrame, h as CloseFrame, hi as webrtcOfferSchema, hn as candidateKindSchema, hr as procSignalSchema, ht as RelayDataFrame, i as BulkEndFrame, ii as thresholdShareClaimsSchema, in as VersionGet, ir as observedAddressFrameSchema, it as PrivateUseCapability, j as ExecList, jn as coseTokenHeadersSchema, jr as roomJoinSchema, jt as RoomRead, k as DmRoomPath, kn as coseHeaderLabelSchema, kr as roomInviteSchema, kt as RoomNoticeClaims, l as CapabilityGrant, li as topologyGetSchema, ln as bulkAckFrameSchema, lr as peerIdentitySchema, lt as ProtocolVersion, m as CapabilityVerb, mi as webrtcIceCandidateSchema, mn as bulkResumeSchema, mr as procKillSchema, mt as RelayConnectFrame, n as BulkCancel, ni as thresholdKeygenRound1Schema, nn as TopologyPeers, nr as namespacedCapabilitySchema, nt as PingFrame, o as BulkResume, oi as thresholdSignSchema, on as WebrtcIceCandidate, or as pathTraceOkSchema, ot as ProcKill, p as CapabilityToken, pi as webrtcAnswerSchema, pn as bulkOpenSchema, pr as privateUseDomainIdSchema, pt as PtyWrite, q as MessageRef, qn as iceCandidateInitSchema, qr as streamAckFrameSchema, qt as ThresholdKeygenConfirm, r as BulkDataFrame, ri as thresholdKeygenRound2Schema, rn as TransferId, rr as namespacedDomainIdSchema, rt as PongFrame, s as CandidateKind, si as thresholdSubjectSchema, sn as WebrtcOffer, sr as pathTraceSchema, st as ProcSignal, t as BulkAckFrame, ti as thresholdKeygenConfirmSchema, tn as TopologyGet, tr as messageRefSchema, tt as PeerIdentity, u as CapabilityGrantOk, ui as topologyPeersSchema, un as bulkCancelSchema, ur as pingFrameSchema, ut as PtyKill, v as CoreDomainName, vn as capabilityGrantSchema, vr as ptyKillSchema, vt as RevocationAnnounceFrame, w as DataEntriesFrame, wn as coordinatorFrameSchema, wr as relayInboundFrameSchema, wt as RoomLeave, x as CoseHeaderLabel, xn as capabilityTokenSchema, xr as ptyWriteSchema, xt as RoomInvite, y as CoseHeaderAlg, yn as capabilityRequestSchema, yr as ptyResizeSchema, yt as RevocationClaims, z as IceCandidateInit, zn as execListSchema, zr as roomReadSchema, zt as StreamAckFrame } from "../protocol-DzmpxxUr.mjs";
2
2
  export { BulkAckFrame, BulkCancel, BulkDataFrame, BulkEndFrame, BulkOpen, BulkResume, CandidateKind, CandidatesFrame, CapabilityGrant, CapabilityGrantOk, CapabilityRequest, CapabilityScope, CapabilityToken, CapabilityVerb, CloseFrame, CoordinatorFrame, CoreCapability, CoreDomainName, CoseHeaderAlg, CoseHeaderKid, CoseHeaderLabel, CoseSign1, CoseTokenHeaders, DataEntriesFrame, DataHaveFrame, DataRequestFrame, DeviceId, DeviceIdHex, DmRoomPath, DomainId, ExecList, ExecSessionInfo, Frame, FrameVariant, GossipFrame, HandleClaims, HandleRecord, HandshakeFrame, IceCandidateInit, IdentityKey, ManageCommand, ManageCommandParams, ManageError, ManageOk, ManageRequestFrame, ManageResponseFrame, MessageRef, NamespacedCapability, NamespacedDomainId, ObservedAddressFrame, OwnerNamedRoomPath, PathTrace, PathTraceOk, PeerAdvert, PeerIdentity, PingFrame, PongFrame, PrivateUseCapability, PrivateUseDomainId, ProcKill, ProcSignal, ProcSpawn, ProtocolVersion, PtyKill, PtyResize, PtySpawn, PtyWrite, RelayConnectFrame, RelayDataFrame, RelayInboundFrame, RelayOfferFrame, RevocationAnnounceFrame, RevocationClaims, RevocationEntry, RoomInvite, RoomJoin, RoomJoinOk, RoomLeave, RoomMember, RoomMembers, RoomMembersOk, RoomNotice, RoomNoticeClaims, RoomPath, RoomRead, RoomRekey, RoomSend, SecureDataFrame, SecureHelloFrame, SessionId, SfuTrackEntry, SfuTrackMap, StreamAckFrame, StreamDataFrame, StreamEndFrame, StreamSession, SyncPunchFrame, ThresholdAbort, ThresholdCommit, ThresholdCommitment, ThresholdKeygenConfirm, ThresholdKeygenRound1, ThresholdKeygenRound2, ThresholdShareClaims, ThresholdShareEnvelope, ThresholdSign, ThresholdSubject, TokenClaims, TopologyGet, TopologyPeers, TransferId, VersionGet, WebrtcAnswer, WebrtcIceCandidate, WebrtcOffer, WireCandidate, bulkAckFrameSchema, bulkCancelSchema, bulkDataFrameSchema, bulkEndFrameSchema, bulkOpenSchema, bulkResumeSchema, candidateKindSchema, candidatesFrameSchema, capabilityGrantOkSchema, capabilityGrantSchema, capabilityRequestSchema, capabilityScopeSchema, capabilityTokenSchema, capabilityVerbSchema, closeFrameSchema, coordinatorFrameSchema, coreCapabilitySchema, coreDomainNameSchema, coseHeaderAlgSchema, coseHeaderKidSchema, coseHeaderLabelSchema, coseSign1Schema, coseTokenHeadersSchema, dataEntriesFrameSchema, dataHaveFrameSchema, dataRequestFrameSchema, deviceIdHexSchema, deviceIdSchema, dmRoomPathSchema, domainIdSchema, execListSchema, execSessionInfoSchema, frameSchema, frameVariantSchema, gossipFrameSchema, handleClaimsSchema, handleRecordSchema, handshakeFrameSchema, iceCandidateInitSchema, identityKeySchema, manageCommandParamsSchema, manageCommandSchema, manageErrorSchema, manageOkSchema, manageRequestFrameSchema, manageResponseFrameSchema, messageRefSchema, namespacedCapabilitySchema, namespacedDomainIdSchema, observedAddressFrameSchema, ownerNamedRoomPathSchema, pathTraceOkSchema, pathTraceSchema, peerAdvertSchema, peerIdentitySchema, pingFrameSchema, pongFrameSchema, privateUseCapabilitySchema, privateUseDomainIdSchema, procKillSchema, procSignalSchema, procSpawnSchema, protocolVersionSchema, ptyKillSchema, ptyResizeSchema, ptySpawnSchema, ptyWriteSchema, relayConnectFrameSchema, relayDataFrameSchema, relayInboundFrameSchema, relayOfferFrameSchema, revocationAnnounceFrameSchema, revocationClaimsSchema, revocationEntrySchema, roomInviteSchema, roomJoinOkSchema, roomJoinSchema, roomLeaveSchema, roomMemberSchema, roomMembersOkSchema, roomMembersSchema, roomNoticeClaimsSchema, roomNoticeSchema, roomPathSchema, roomReadSchema, roomRekeySchema, roomSendSchema, secureDataFrameSchema, secureHelloFrameSchema, sessionIdSchema, sfuTrackEntrySchema, sfuTrackMapSchema, streamAckFrameSchema, streamDataFrameSchema, streamEndFrameSchema, streamSessionSchema, syncPunchFrameSchema, thresholdAbortSchema, thresholdCommitSchema, thresholdCommitmentSchema, thresholdKeygenConfirmSchema, thresholdKeygenRound1Schema, thresholdKeygenRound2Schema, thresholdShareClaimsSchema, thresholdShareEnvelopeSchema, thresholdSignSchema, thresholdSubjectSchema, tokenClaimsSchema, topologyGetSchema, topologyPeersSchema, transferIdSchema, versionGetSchema, webrtcAnswerSchema, webrtcIceCandidateSchema, webrtcOfferSchema, wireCandidateSchema };
@@ -521,7 +521,8 @@ const relayOfferFrameSchema = z.lazy(() => z.object({
521
521
  }));
522
522
  const relayConnectFrameSchema = z.lazy(() => z.object({
523
523
  "type": z.literal("relay-connect"),
524
- "target-device": z.lazy(() => deviceIdSchema)
524
+ "target-device": z.lazy(() => deviceIdSchema),
525
+ "source-device": z.lazy(() => deviceIdSchema).optional()
525
526
  }));
526
527
  const relayDataFrameSchema = z.lazy(() => z.object({
527
528
  "type": z.literal("relay-data"),
@@ -531,7 +532,8 @@ const relayDataFrameSchema = z.lazy(() => z.object({
531
532
  }));
532
533
  const relayInboundFrameSchema = z.lazy(() => z.object({
533
534
  "type": z.literal("relay-inbound"),
534
- "source-device": z.lazy(() => deviceIdSchema)
535
+ "source-device": z.lazy(() => deviceIdSchema),
536
+ "target-device": z.lazy(() => deviceIdSchema).optional()
535
537
  }));
536
538
  const coordinatorFrameSchema = z.lazy(() => z.object({
537
539
  "type": z.literal("coordinator"),
@@ -1,4 +1,4 @@
1
- import { B as IdentityKey, D as DeviceId } from "./protocol-BgR1e_NI.cjs";
1
+ import { B as IdentityKey, D as DeviceId } from "./protocol-DzmpxxUr.cjs";
2
2
  //#region src/ports/identity.d.ts
3
3
  /**
4
4
  * Wraps the local node's own identity plus the signing/verification primitives capability-token handling needs -- never hardcoded to one crypto library's own API shape (Node's webcrypto, a WASM implementation, a hardware key, etc. can all satisfy this same contract).
@@ -1,4 +1,4 @@
1
- import { B as IdentityKey, D as DeviceId } from "./protocol-BgR1e_NI.mjs";
1
+ import { B as IdentityKey, D as DeviceId } from "./protocol-DzmpxxUr.mjs";
2
2
  //#region src/ports/identity.d.ts
3
3
  /**
4
4
  * Wraps the local node's own identity plus the signing/verification primitives capability-token handling needs -- never hardcoded to one crypto library's own API shape (Node's webcrypto, a WASM implementation, a hardware key, etc. can all satisfy this same contract).
@@ -1,2 +1,2 @@
1
- import { t as IdentityPort } from "../identity-DJbr96J3.cjs";
1
+ import { t as IdentityPort } from "../identity-B6nhlSOT.cjs";
2
2
  export { IdentityPort };
@@ -1,2 +1,2 @@
1
- import { t as IdentityPort } from "../identity-ViYdZrIU.mjs";
1
+ import { t as IdentityPort } from "../identity-EV-HHv_D.mjs";
2
2
  export { IdentityPort };
@@ -1,2 +1,2 @@
1
- import { n as Listener, r as Transport, t as Connection } from "../transport-DP3hdehk.cjs";
1
+ import { n as Listener, r as Transport, t as Connection } from "../transport-gDbSHO-r.cjs";
2
2
  export { Connection, Listener, Transport };
@@ -1,2 +1,2 @@
1
- import { n as Listener, r as Transport, t as Connection } from "../transport-Dv_LTCsF.mjs";
1
+ import { n as Listener, r as Transport, t as Connection } from "../transport-bD3p_TO_.mjs";
2
2
  export { Connection, Listener, Transport };
@@ -323,6 +323,7 @@ declare const frameVariantSchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodLazy<z.Zod
323
323
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
324
324
  type: z.ZodLiteral<"relay-connect">;
325
325
  "target-device": z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>;
326
+ "source-device": z.ZodOptional<z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>>;
326
327
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
327
328
  type: z.ZodLiteral<"relay-data">;
328
329
  payload: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
@@ -331,6 +332,7 @@ declare const frameVariantSchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodLazy<z.Zod
331
332
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
332
333
  type: z.ZodLiteral<"relay-inbound">;
333
334
  "source-device": z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>;
335
+ "target-device": z.ZodOptional<z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>>;
334
336
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
335
337
  type: z.ZodLiteral<"coordinator">;
336
338
  term: z.ZodNumber;
@@ -628,6 +630,7 @@ declare const frameSchema: z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodUnion<readonly [z.
628
630
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
629
631
  type: z.ZodLiteral<"relay-connect">;
630
632
  "target-device": z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>;
633
+ "source-device": z.ZodOptional<z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>>;
631
634
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
632
635
  type: z.ZodLiteral<"relay-data">;
633
636
  payload: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
@@ -636,6 +639,7 @@ declare const frameSchema: z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodUnion<readonly [z.
636
639
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
637
640
  type: z.ZodLiteral<"relay-inbound">;
638
641
  "source-device": z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>;
642
+ "target-device": z.ZodOptional<z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>>;
639
643
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
640
644
  type: z.ZodLiteral<"coordinator">;
641
645
  term: z.ZodNumber;
@@ -1634,6 +1638,7 @@ declare const relayOfferFrameSchema: z.ZodLazy<z.ZodObject<{
1634
1638
  declare const relayConnectFrameSchema: z.ZodLazy<z.ZodObject<{
1635
1639
  type: z.ZodLiteral<"relay-connect">;
1636
1640
  "target-device": z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>;
1641
+ "source-device": z.ZodOptional<z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>>;
1637
1642
  }, z.core.$strip>>;
1638
1643
  declare const relayDataFrameSchema: z.ZodLazy<z.ZodObject<{
1639
1644
  type: z.ZodLiteral<"relay-data">;
@@ -1644,6 +1649,7 @@ declare const relayDataFrameSchema: z.ZodLazy<z.ZodObject<{
1644
1649
  declare const relayInboundFrameSchema: z.ZodLazy<z.ZodObject<{
1645
1650
  type: z.ZodLiteral<"relay-inbound">;
1646
1651
  "source-device": z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>;
1652
+ "target-device": z.ZodOptional<z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>>;
1647
1653
  }, z.core.$strip>>;
1648
1654
  declare const coordinatorFrameSchema: z.ZodLazy<z.ZodObject<{
1649
1655
  type: z.ZodLiteral<"coordinator">;
@@ -323,6 +323,7 @@ declare const frameVariantSchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodLazy<z.Zod
323
323
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
324
324
  type: z.ZodLiteral<"relay-connect">;
325
325
  "target-device": z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>;
326
+ "source-device": z.ZodOptional<z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>>;
326
327
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
327
328
  type: z.ZodLiteral<"relay-data">;
328
329
  payload: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
@@ -331,6 +332,7 @@ declare const frameVariantSchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodLazy<z.Zod
331
332
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
332
333
  type: z.ZodLiteral<"relay-inbound">;
333
334
  "source-device": z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>;
335
+ "target-device": z.ZodOptional<z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>>;
334
336
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
335
337
  type: z.ZodLiteral<"coordinator">;
336
338
  term: z.ZodNumber;
@@ -628,6 +630,7 @@ declare const frameSchema: z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodUnion<readonly [z.
628
630
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
629
631
  type: z.ZodLiteral<"relay-connect">;
630
632
  "target-device": z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>;
633
+ "source-device": z.ZodOptional<z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>>;
631
634
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
632
635
  type: z.ZodLiteral<"relay-data">;
633
636
  payload: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
@@ -636,6 +639,7 @@ declare const frameSchema: z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodUnion<readonly [z.
636
639
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
637
640
  type: z.ZodLiteral<"relay-inbound">;
638
641
  "source-device": z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>;
642
+ "target-device": z.ZodOptional<z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>>;
639
643
  }, z.core.$strip>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
640
644
  type: z.ZodLiteral<"coordinator">;
641
645
  term: z.ZodNumber;
@@ -1634,6 +1638,7 @@ declare const relayOfferFrameSchema: z.ZodLazy<z.ZodObject<{
1634
1638
  declare const relayConnectFrameSchema: z.ZodLazy<z.ZodObject<{
1635
1639
  type: z.ZodLiteral<"relay-connect">;
1636
1640
  "target-device": z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>;
1641
+ "source-device": z.ZodOptional<z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>>;
1637
1642
  }, z.core.$strip>>;
1638
1643
  declare const relayDataFrameSchema: z.ZodLazy<z.ZodObject<{
1639
1644
  type: z.ZodLiteral<"relay-data">;
@@ -1644,6 +1649,7 @@ declare const relayDataFrameSchema: z.ZodLazy<z.ZodObject<{
1644
1649
  declare const relayInboundFrameSchema: z.ZodLazy<z.ZodObject<{
1645
1650
  type: z.ZodLiteral<"relay-inbound">;
1646
1651
  "source-device": z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>;
1652
+ "target-device": z.ZodOptional<z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>>;
1647
1653
  }, z.core.$strip>>;
1648
1654
  declare const coordinatorFrameSchema: z.ZodLazy<z.ZodObject<{
1649
1655
  type: z.ZodLiteral<"coordinator">;
@@ -1,5 +1,5 @@
1
- import { B as IdentityKey, D as DeviceId, en as TokenClaims, p as CapabilityToken } from "./protocol-BgR1e_NI.mjs";
2
- import { d as VerifyCapabilityTokenOptions, u as TokenVerdictReason } from "./tokens-DRkm_QOR.mjs";
1
+ import { B as IdentityKey, D as DeviceId, en as TokenClaims, p as CapabilityToken } from "./protocol-DzmpxxUr.cjs";
2
+ import { TokenVerdictReason, VerifyCapabilityTokenOptions } from "./domain/tokens.cjs";
3
3
  //#region src/domain/room-token-verification.d.ts
4
4
  /** The one capability every core/room verb (room.send/read/leave/members) is gated by, per spec/room.cddl -- room.join/room.invite are deliberately ungated instead and need no token check at all. */
5
5
  declare const ROOM_MEMBER_CAPABILITY = "room:member";
@@ -1,5 +1,5 @@
1
- import { B as IdentityKey, D as DeviceId, en as TokenClaims, p as CapabilityToken } from "./protocol-BgR1e_NI.cjs";
2
- import { d as VerifyCapabilityTokenOptions, u as TokenVerdictReason } from "./tokens-BMWCnQEF.cjs";
1
+ import { B as IdentityKey, D as DeviceId, en as TokenClaims, p as CapabilityToken } from "./protocol-DzmpxxUr.mjs";
2
+ import { TokenVerdictReason, VerifyCapabilityTokenOptions } from "./domain/tokens.mjs";
3
3
  //#region src/domain/room-token-verification.d.ts
4
4
  /** The one capability every core/room verb (room.send/read/leave/members) is gated by, per spec/room.cddl -- room.join/room.invite are deliberately ungated instead and need no token check at all. */
5
5
  declare const ROOM_MEMBER_CAPABILITY = "room:member";
@@ -0,0 +1,72 @@
1
+ import { D as DeviceId, en as TokenClaims } from "./protocol-DzmpxxUr.cjs";
2
+ import { t as Clock } from "./clock-DiSx-WKM.cjs";
3
+ import { z } from "zod";
4
+ import { JsonValue, PredicateNode, Resolution } from "trilean";
5
+ //#region src/domain/token-predicates.d.ts
6
+ /** The wire shape of `token-claims.conditions` once CBOR-decoded: trilean's own PredicateNodeSchema is the single source of truth for what a condition entry may contain, re-validated here rather than trusted from a CDDL-generated shadow schema (see tokens.cddl's own comment on why `conditions` is an opaque bstr, not a native CDDL type) -- a token from an untrusted peer must pass trilean's real schema before any of its conditions are evaluated. Explicitly annotated: trilean's PredicateNodeSchema is a deeply recursive z.lazy() type whose inferred shape is too large for tsdown's declaration-file generator to serialise (TS7056) without this. */
7
+ declare const conditionsListSchema: z.ZodType<PredicateNode[]>;
8
+ /**
9
+ * tokens.cddl's mandated core predicate-op vocabulary (issue #85): the five narrowing checks a verifier previously enforced as five hardcoded `if`s, now expressed as `delegate` systems every conforming verifier registers a handler for. Order matches the historical check order in verifyTokenChain/checkNarrowing, preserved so a caller mapping a failing system to its own reason vocabulary (MintRefusalReason's five distinct values; verifyTokenChain's single collapsed "delegation_exceeds_parent") sees the same check run first that always ran first.
10
+ */
11
+ declare const BEARER_IS = "bearer-is";
12
+ declare const EXPIRES_AT = "expires-at";
13
+ declare const SCOPE_NARROWS = "scope-narrows";
14
+ declare const CAPABILITY_IS = "capability-is";
15
+ declare const DEPTH_REMAINING = "depth-remaining";
16
+ type NarrowingSystem = typeof BEARER_IS | typeof EXPIRES_AT | typeof SCOPE_NARROWS | typeof CAPABILITY_IS | typeof DEPTH_REMAINING;
17
+ /** Everything needed to check candidate against parent, restated from tokens.ts's own NarrowingCandidate/checkNarrowing shape rather than requiring a full TokenClaims for the not-yet-minted child -- the same reasoning mintCapabilityToken's own checkNarrowing already applies (a delegation candidate has no token-id/issuer-key/bearer of its own yet). camelCase field names, matching NarrowingCandidate's own convention, deliberately distinct from TokenClaims' hyphenated wire field names. */
18
+ interface NarrowingCandidate {
19
+ capability: TokenClaims["capability"];
20
+ scope: TokenClaims["scope"];
21
+ expires: number;
22
+ delegationsRemaining?: number;
23
+ }
24
+ /**
25
+ * The local evaluation context every token predicate op reads from -- trilean's own `EvaluationContext` is deliberately typed `unknown` (an opaque, in-process value never serialised as part of the tree), so this is wire-mesh's own concrete shape for it. `childIssuer`/`candidate` describe the not-yet-minted or being-verified child; `parentClaims` is the already-decoded-and-verified parent, present only when narrowing is actually being checked against one. No clock: none of the five structural narrowing checks reason about the current time (unlike a conditions-list entry, which might -- see ConditionsContext).
26
+ */
27
+ interface TokenPredicateContext {
28
+ readonly childIssuer: DeviceId;
29
+ readonly candidate: Readonly<NarrowingCandidate>;
30
+ readonly parentClaims?: Readonly<TokenClaims>;
31
+ }
32
+ /** A `conditions` entry's own generic evaluation context: no parent/candidate distinction, since a domain-specific condition (a message TTL, a future revoke-authorization check) reasons about the presented token's own claims directly, not a not-yet-minted delegation candidate. */
33
+ interface ConditionsContext {
34
+ readonly clock: Clock;
35
+ readonly claims: Readonly<TokenClaims>;
36
+ /** The minted child a grant-capability's conditions are being evaluated against (wire-mesh#323 subject mode): present only inside an authorised-by verification walk or a mint-time authorisation check, never when a token's conditions are evaluated against its own claims. */
37
+ readonly subject?: Readonly<GrantSubject>;
38
+ }
39
+ /** The child half of a subject-mode conditions evaluation: the claims of the token a grant-capability authorises, structurally what NarrowingCandidate already is plus the bearer the mint named. Satisfied by a full TokenClaims, so the verifier passes the child's decoded claims directly. */
40
+ interface GrantSubject {
41
+ capability: TokenClaims["capability"];
42
+ scope: TokenClaims["scope"];
43
+ bearer: DeviceId;
44
+ expires: number;
45
+ delegationsRemaining?: number;
46
+ }
47
+ /** The two subject-mode delegate systems (wire-mesh#323), registered only when a ConditionsContext carries a subject, and indeterminate (fail-closed) whenever one does not. */
48
+ declare const GRANTEE_IS = "grantee-is";
49
+ declare const GRANTED_CAPABILITY_IS = "granted-capability-is";
50
+ type SubjectSystem = typeof GRANTEE_IS | typeof GRANTED_CAPABILITY_IS;
51
+ /** The named no-self-grant bar (wire-mesh#323): one conditions entry an issuer puts on a grant-capability so its bearer may not mint a `capability` token naming itself as bearer. `not(and(...))` under strict Kleene: a child granted to anyone else passes, a child granted to the bearer fails, and any unresolvable leg stays indeterminate and refuses. */
52
+ declare function noSelfGrantBar(capability: TokenClaims["capability"], bearer: DeviceId): PredicateNode;
53
+ /** One delegate system's own handler: given the delegate node's payload and the concrete context it was invoked with, resolves to a boolean-valued Resolution. Handlers never throw for a data-quality problem -- an op that cannot make sense of its own payload/context returns `{found: false}`, which the evaluator turns into a fail-closed `indeterminate`. */
54
+ type TokenDelegateHandler<TContext> = (payload: JsonValue, context: TContext) => Resolution | Promise<Resolution>;
55
+ /**
56
+ * Evaluates the five mandatory narrowing predicates against parentClaims/candidate, in their historical check order, short-circuiting on and returning the first that does not hold. Returns undefined when every check holds. This is the single mechanism both mintCapabilityToken's own pre-mint check and verifyTokenChain's own delegation-chain walk call -- the two can never silently drift into different ideas of what "narrows" means, because there is now exactly one implementation of each check, not two hardcoded copies.
57
+ */
58
+ declare function evaluateNarrowing(parentClaims: Readonly<TokenClaims>, childIssuer: DeviceId, candidate: Readonly<NarrowingCandidate>): Promise<NarrowingSystem | undefined>;
59
+ type ConditionsVerdict = {
60
+ ok: true;
61
+ } | {
62
+ ok: false;
63
+ reason: "not_satisfied";
64
+ };
65
+ /**
66
+ * Evaluates token-claims' own `conditions` field (issue #85): additional, issuer-chosen predicates strictly additive to the five mandatory narrowing checks above, which are computed structurally (from a delegated token's own claims and its parent's) and never read from this field -- the five built-ins are inherently about a parent/child relationship, so they are not meaningfully reusable inside a bare, parent-less conditions evaluation, unlike a genuine domain-specific condition (a message TTL, #84's future revoke-authorization check) which reasons about the presented token's own claims directly. `extraHandlers` is the registration point for those: none exist yet, so a `conditions` entry naming any system with no registered handler resolves `{found: false}` -- indeterminate, fail-closed. Absent `nodes` (an empty array, the caller's own signal for "no conditions field present") is trivially `{ok: true}` -- no extra restrictions, exactly today's behaviour. Every entry MUST evaluate to a definite `true`; the loop short-circuits on the first indeterminate or false result.
67
+ */
68
+ declare function evaluateConditions(nodes: readonly PredicateNode[], claims: Readonly<TokenClaims>, clock: Readonly<Clock>, extraHandlers?: Readonly<Record<string, TokenDelegateHandler<ConditionsContext>>>,
69
+ /** Subject mode (wire-mesh#323): the minted child the carrying grant-capability's conditions bind to. Absent evaluates against the carrying token's own claims, exactly as before; present additionally registers the two subject systems, whose handlers read the subject rather than `claims`. */
70
+ subject?: Readonly<GrantSubject>): Promise<ConditionsVerdict>;
71
+ //#endregion
72
+ export { evaluateConditions as _, DEPTH_REMAINING as a, GRANTEE_IS as c, NarrowingSystem as d, SCOPE_NARROWS as f, conditionsListSchema as g, TokenPredicateContext as h, ConditionsVerdict as i, GrantSubject as l, TokenDelegateHandler as m, CAPABILITY_IS as n, EXPIRES_AT as o, SubjectSystem as p, ConditionsContext as r, GRANTED_CAPABILITY_IS as s, BEARER_IS as t, NarrowingCandidate as u, evaluateNarrowing as v, noSelfGrantBar as y };
@@ -0,0 +1,72 @@
1
+ import { D as DeviceId, en as TokenClaims } from "./protocol-DzmpxxUr.mjs";
2
+ import { t as Clock } from "./clock-DiSx-WKM.mjs";
3
+ import { z } from "zod";
4
+ import { JsonValue, PredicateNode, Resolution } from "trilean";
5
+ //#region src/domain/token-predicates.d.ts
6
+ /** The wire shape of `token-claims.conditions` once CBOR-decoded: trilean's own PredicateNodeSchema is the single source of truth for what a condition entry may contain, re-validated here rather than trusted from a CDDL-generated shadow schema (see tokens.cddl's own comment on why `conditions` is an opaque bstr, not a native CDDL type) -- a token from an untrusted peer must pass trilean's real schema before any of its conditions are evaluated. Explicitly annotated: trilean's PredicateNodeSchema is a deeply recursive z.lazy() type whose inferred shape is too large for tsdown's declaration-file generator to serialise (TS7056) without this. */
7
+ declare const conditionsListSchema: z.ZodType<PredicateNode[]>;
8
+ /**
9
+ * tokens.cddl's mandated core predicate-op vocabulary (issue #85): the five narrowing checks a verifier previously enforced as five hardcoded `if`s, now expressed as `delegate` systems every conforming verifier registers a handler for. Order matches the historical check order in verifyTokenChain/checkNarrowing, preserved so a caller mapping a failing system to its own reason vocabulary (MintRefusalReason's five distinct values; verifyTokenChain's single collapsed "delegation_exceeds_parent") sees the same check run first that always ran first.
10
+ */
11
+ declare const BEARER_IS = "bearer-is";
12
+ declare const EXPIRES_AT = "expires-at";
13
+ declare const SCOPE_NARROWS = "scope-narrows";
14
+ declare const CAPABILITY_IS = "capability-is";
15
+ declare const DEPTH_REMAINING = "depth-remaining";
16
+ type NarrowingSystem = typeof BEARER_IS | typeof EXPIRES_AT | typeof SCOPE_NARROWS | typeof CAPABILITY_IS | typeof DEPTH_REMAINING;
17
+ /** Everything needed to check candidate against parent, restated from tokens.ts's own NarrowingCandidate/checkNarrowing shape rather than requiring a full TokenClaims for the not-yet-minted child -- the same reasoning mintCapabilityToken's own checkNarrowing already applies (a delegation candidate has no token-id/issuer-key/bearer of its own yet). camelCase field names, matching NarrowingCandidate's own convention, deliberately distinct from TokenClaims' hyphenated wire field names. */
18
+ interface NarrowingCandidate {
19
+ capability: TokenClaims["capability"];
20
+ scope: TokenClaims["scope"];
21
+ expires: number;
22
+ delegationsRemaining?: number;
23
+ }
24
+ /**
25
+ * The local evaluation context every token predicate op reads from -- trilean's own `EvaluationContext` is deliberately typed `unknown` (an opaque, in-process value never serialised as part of the tree), so this is wire-mesh's own concrete shape for it. `childIssuer`/`candidate` describe the not-yet-minted or being-verified child; `parentClaims` is the already-decoded-and-verified parent, present only when narrowing is actually being checked against one. No clock: none of the five structural narrowing checks reason about the current time (unlike a conditions-list entry, which might -- see ConditionsContext).
26
+ */
27
+ interface TokenPredicateContext {
28
+ readonly childIssuer: DeviceId;
29
+ readonly candidate: Readonly<NarrowingCandidate>;
30
+ readonly parentClaims?: Readonly<TokenClaims>;
31
+ }
32
+ /** A `conditions` entry's own generic evaluation context: no parent/candidate distinction, since a domain-specific condition (a message TTL, a future revoke-authorization check) reasons about the presented token's own claims directly, not a not-yet-minted delegation candidate. */
33
+ interface ConditionsContext {
34
+ readonly clock: Clock;
35
+ readonly claims: Readonly<TokenClaims>;
36
+ /** The minted child a grant-capability's conditions are being evaluated against (wire-mesh#323 subject mode): present only inside an authorised-by verification walk or a mint-time authorisation check, never when a token's conditions are evaluated against its own claims. */
37
+ readonly subject?: Readonly<GrantSubject>;
38
+ }
39
+ /** The child half of a subject-mode conditions evaluation: the claims of the token a grant-capability authorises, structurally what NarrowingCandidate already is plus the bearer the mint named. Satisfied by a full TokenClaims, so the verifier passes the child's decoded claims directly. */
40
+ interface GrantSubject {
41
+ capability: TokenClaims["capability"];
42
+ scope: TokenClaims["scope"];
43
+ bearer: DeviceId;
44
+ expires: number;
45
+ delegationsRemaining?: number;
46
+ }
47
+ /** The two subject-mode delegate systems (wire-mesh#323), registered only when a ConditionsContext carries a subject, and indeterminate (fail-closed) whenever one does not. */
48
+ declare const GRANTEE_IS = "grantee-is";
49
+ declare const GRANTED_CAPABILITY_IS = "granted-capability-is";
50
+ type SubjectSystem = typeof GRANTEE_IS | typeof GRANTED_CAPABILITY_IS;
51
+ /** The named no-self-grant bar (wire-mesh#323): one conditions entry an issuer puts on a grant-capability so its bearer may not mint a `capability` token naming itself as bearer. `not(and(...))` under strict Kleene: a child granted to anyone else passes, a child granted to the bearer fails, and any unresolvable leg stays indeterminate and refuses. */
52
+ declare function noSelfGrantBar(capability: TokenClaims["capability"], bearer: DeviceId): PredicateNode;
53
+ /** One delegate system's own handler: given the delegate node's payload and the concrete context it was invoked with, resolves to a boolean-valued Resolution. Handlers never throw for a data-quality problem -- an op that cannot make sense of its own payload/context returns `{found: false}`, which the evaluator turns into a fail-closed `indeterminate`. */
54
+ type TokenDelegateHandler<TContext> = (payload: JsonValue, context: TContext) => Resolution | Promise<Resolution>;
55
+ /**
56
+ * Evaluates the five mandatory narrowing predicates against parentClaims/candidate, in their historical check order, short-circuiting on and returning the first that does not hold. Returns undefined when every check holds. This is the single mechanism both mintCapabilityToken's own pre-mint check and verifyTokenChain's own delegation-chain walk call -- the two can never silently drift into different ideas of what "narrows" means, because there is now exactly one implementation of each check, not two hardcoded copies.
57
+ */
58
+ declare function evaluateNarrowing(parentClaims: Readonly<TokenClaims>, childIssuer: DeviceId, candidate: Readonly<NarrowingCandidate>): Promise<NarrowingSystem | undefined>;
59
+ type ConditionsVerdict = {
60
+ ok: true;
61
+ } | {
62
+ ok: false;
63
+ reason: "not_satisfied";
64
+ };
65
+ /**
66
+ * Evaluates token-claims' own `conditions` field (issue #85): additional, issuer-chosen predicates strictly additive to the five mandatory narrowing checks above, which are computed structurally (from a delegated token's own claims and its parent's) and never read from this field -- the five built-ins are inherently about a parent/child relationship, so they are not meaningfully reusable inside a bare, parent-less conditions evaluation, unlike a genuine domain-specific condition (a message TTL, #84's future revoke-authorization check) which reasons about the presented token's own claims directly. `extraHandlers` is the registration point for those: none exist yet, so a `conditions` entry naming any system with no registered handler resolves `{found: false}` -- indeterminate, fail-closed. Absent `nodes` (an empty array, the caller's own signal for "no conditions field present") is trivially `{ok: true}` -- no extra restrictions, exactly today's behaviour. Every entry MUST evaluate to a definite `true`; the loop short-circuits on the first indeterminate or false result.
67
+ */
68
+ declare function evaluateConditions(nodes: readonly PredicateNode[], claims: Readonly<TokenClaims>, clock: Readonly<Clock>, extraHandlers?: Readonly<Record<string, TokenDelegateHandler<ConditionsContext>>>,
69
+ /** Subject mode (wire-mesh#323): the minted child the carrying grant-capability's conditions bind to. Absent evaluates against the carrying token's own claims, exactly as before; present additionally registers the two subject systems, whose handlers read the subject rather than `claims`. */
70
+ subject?: Readonly<GrantSubject>): Promise<ConditionsVerdict>;
71
+ //#endregion
72
+ export { evaluateConditions as _, DEPTH_REMAINING as a, GRANTEE_IS as c, NarrowingSystem as d, SCOPE_NARROWS as f, conditionsListSchema as g, TokenPredicateContext as h, ConditionsVerdict as i, GrantSubject as l, TokenDelegateHandler as m, CAPABILITY_IS as n, EXPIRES_AT as o, SubjectSystem as p, ConditionsContext as r, GRANTED_CAPABILITY_IS as s, BEARER_IS as t, NarrowingCandidate as u, evaluateNarrowing as v, noSelfGrantBar as y };
@@ -1,4 +1,4 @@
1
- import { D as DeviceId, N as Frame } from "./protocol-BgR1e_NI.mjs";
1
+ import { D as DeviceId, N as Frame } from "./protocol-DzmpxxUr.mjs";
2
2
  //#region src/ports/transport.d.ts
3
3
  /**
4
4
  * An async, serialisable-data contract for exchanging frame values over some connection -- deliberately without baking in any specific transport's own primitives (no raw socket types, no WebSocket-specific options), so a TCP adapter, a WebSocket adapter, or an in-memory adapter for tests can all satisfy it.
@@ -1,4 +1,4 @@
1
- import { D as DeviceId, N as Frame } from "./protocol-BgR1e_NI.cjs";
1
+ import { D as DeviceId, N as Frame } from "./protocol-DzmpxxUr.cjs";
2
2
  //#region src/ports/transport.d.ts
3
3
  /**
4
4
  * An async, serialisable-data contract for exchanging frame values over some connection -- deliberately without baking in any specific transport's own primitives (no raw socket types, no WebSocket-specific options), so a TCP adapter, a WebSocket adapter, or an in-memory adapter for tests can all satisfy it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wire-mesh-core",
3
- "version": "3.8.0",
3
+ "version": "3.10.0",
4
4
  "dependencies": {
5
5
  "cbor2": "2.3.0",
6
6
  "cddl.js": "1.0.1",
@@ -194,6 +194,14 @@
194
194
  "import": "./dist/domain/threshold-subject.mjs",
195
195
  "require": "./dist/domain/threshold-subject.cjs"
196
196
  },
197
+ "./domain/token-predicates": {
198
+ "import": "./dist/domain/token-predicates.mjs",
199
+ "require": "./dist/domain/token-predicates.cjs"
200
+ },
201
+ "./domain/token-scope": {
202
+ "import": "./dist/domain/token-scope.mjs",
203
+ "require": "./dist/domain/token-scope.cjs"
204
+ },
197
205
  "./domain/tokens": {
198
206
  "import": "./dist/domain/tokens.mjs",
199
207
  "require": "./dist/domain/tokens.cjs"