wire-mesh-core 1.14.0 → 1.16.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.
- package/dist/adapters/frame-codec.d.cts +1 -1
- package/dist/adapters/frame-codec.d.mts +1 -1
- package/dist/adapters/node-identity.d.cts +2 -2
- package/dist/adapters/node-identity.d.mts +2 -2
- package/dist/adapters/tcp-transport.d.cts +1 -1
- package/dist/adapters/tcp-transport.d.mts +1 -1
- package/dist/adapters/tls-transport.d.cts +1 -1
- package/dist/adapters/tls-transport.d.mts +1 -1
- package/dist/domain/capability-grant.cjs +90 -0
- package/dist/domain/capability-grant.d.cts +44 -0
- package/dist/domain/capability-grant.d.mts +44 -0
- package/dist/domain/capability-grant.mjs +87 -0
- package/dist/domain/capability-request.cjs +118 -0
- package/dist/domain/capability-request.d.cts +56 -0
- package/dist/domain/capability-request.d.mts +56 -0
- package/dist/domain/capability-request.mjs +115 -0
- package/dist/domain/device-id.d.cts +1 -1
- package/dist/domain/device-id.d.mts +1 -1
- package/dist/domain/handshake.d.cts +1 -1
- package/dist/domain/handshake.d.mts +1 -1
- package/dist/domain/mesh-session.d.cts +3 -3
- package/dist/domain/mesh-session.d.mts +3 -3
- package/dist/domain/relay-hub.d.cts +1 -1
- package/dist/domain/relay-hub.d.mts +1 -1
- package/dist/domain/revocation-view.cjs +1 -1
- package/dist/domain/revocation-view.d.cts +1 -1
- package/dist/domain/revocation-view.d.mts +1 -1
- package/dist/domain/revocation-view.mjs +1 -1
- package/dist/domain/room-token-verification.cjs +1 -1
- package/dist/domain/room-token-verification.d.cts +1 -1
- package/dist/domain/room-token-verification.d.mts +1 -1
- package/dist/domain/room-token-verification.mjs +1 -1
- package/dist/domain/tokens.cjs +2 -1
- package/dist/domain/tokens.d.cts +6 -2
- package/dist/domain/tokens.d.mts +6 -2
- package/dist/domain/tokens.mjs +2 -2
- package/dist/generated/protocol.cjs +6 -0
- package/dist/generated/protocol.d.cts +2 -2
- package/dist/generated/protocol.d.mts +2 -2
- package/dist/generated/protocol.mjs +6 -1
- package/dist/{identity-D8iJZRZZ.d.mts → identity-B1hBV3YA.d.mts} +1 -1
- package/dist/{identity-DkEe1465.d.cts → identity-BldV8xFj.d.cts} +1 -1
- package/dist/ports/identity.d.cts +1 -1
- package/dist/ports/identity.d.mts +1 -1
- package/dist/ports/transport.d.cts +2 -29
- package/dist/ports/transport.d.mts +2 -29
- package/dist/{protocol-MnxTzpRP.d.cts → protocol-Dhswk7YD.d.cts} +39 -1
- package/dist/{protocol-MnxTzpRP.d.mts → protocol-Dhswk7YD.d.mts} +39 -1
- package/dist/transport-BNNdUBq-.d.mts +30 -0
- package/dist/transport-hEUxrdhT.d.cts +30 -0
- package/package.json +9 -1
|
@@ -75,6 +75,12 @@ declare const manageCommandParamsSchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodUni
|
|
|
75
75
|
verb: z.ZodLiteral<"capability.request">;
|
|
76
76
|
capability: z.ZodString;
|
|
77
77
|
"valid-until": z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
79
|
+
verb: z.ZodLiteral<"capability.grant">;
|
|
80
|
+
"granted-token": z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
81
|
+
"1": z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
"4": z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
83
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>], null>>>>>;
|
|
78
84
|
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
79
85
|
verb: z.ZodLiteral<"room.send">;
|
|
80
86
|
"message-id": z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
@@ -263,6 +269,12 @@ declare const frameVariantSchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodLazy<z.Zod
|
|
|
263
269
|
verb: z.ZodLiteral<"capability.request">;
|
|
264
270
|
capability: z.ZodString;
|
|
265
271
|
"valid-until": z.ZodOptional<z.ZodNumber>;
|
|
272
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
273
|
+
verb: z.ZodLiteral<"capability.grant">;
|
|
274
|
+
"granted-token": z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
275
|
+
"1": z.ZodOptional<z.ZodNumber>;
|
|
276
|
+
"4": z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
277
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>], null>>>>>;
|
|
266
278
|
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
267
279
|
verb: z.ZodLiteral<"room.send">;
|
|
268
280
|
"message-id": z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
@@ -457,6 +469,12 @@ declare const frameSchema: z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodUnion<readonly [z.
|
|
|
457
469
|
verb: z.ZodLiteral<"capability.request">;
|
|
458
470
|
capability: z.ZodString;
|
|
459
471
|
"valid-until": z.ZodOptional<z.ZodNumber>;
|
|
472
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
473
|
+
verb: z.ZodLiteral<"capability.grant">;
|
|
474
|
+
"granted-token": z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
475
|
+
"1": z.ZodOptional<z.ZodNumber>;
|
|
476
|
+
"4": z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
477
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>], null>>>>>;
|
|
460
478
|
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
461
479
|
verb: z.ZodLiteral<"room.send">;
|
|
462
480
|
"message-id": z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
@@ -622,6 +640,12 @@ declare const manageCommandSchema: z.ZodLazy<z.ZodObject<{
|
|
|
622
640
|
verb: z.ZodLiteral<"capability.request">;
|
|
623
641
|
capability: z.ZodString;
|
|
624
642
|
"valid-until": z.ZodOptional<z.ZodNumber>;
|
|
643
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
644
|
+
verb: z.ZodLiteral<"capability.grant">;
|
|
645
|
+
"granted-token": z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
646
|
+
"1": z.ZodOptional<z.ZodNumber>;
|
|
647
|
+
"4": z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
648
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>], null>>>>>;
|
|
625
649
|
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
626
650
|
verb: z.ZodLiteral<"room.send">;
|
|
627
651
|
"message-id": z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
@@ -712,6 +736,12 @@ declare const manageRequestFrameSchema: z.ZodLazy<z.ZodObject<{
|
|
|
712
736
|
verb: z.ZodLiteral<"capability.request">;
|
|
713
737
|
capability: z.ZodString;
|
|
714
738
|
"valid-until": z.ZodOptional<z.ZodNumber>;
|
|
739
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
740
|
+
verb: z.ZodLiteral<"capability.grant">;
|
|
741
|
+
"granted-token": z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
742
|
+
"1": z.ZodOptional<z.ZodNumber>;
|
|
743
|
+
"4": z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
744
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>], null>>>>>;
|
|
715
745
|
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
716
746
|
verb: z.ZodLiteral<"room.send">;
|
|
717
747
|
"message-id": z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
@@ -798,6 +828,13 @@ declare const capabilityGrantOkSchema: z.ZodLazy<z.ZodObject<{
|
|
|
798
828
|
"4": z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
799
829
|
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>], null>>>>>;
|
|
800
830
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
831
|
+
declare const capabilityGrantSchema: z.ZodLazy<z.ZodObject<{
|
|
832
|
+
verb: z.ZodLiteral<"capability.grant">;
|
|
833
|
+
"granted-token": z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
834
|
+
"1": z.ZodOptional<z.ZodNumber>;
|
|
835
|
+
"4": z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
836
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>], null>>>>>;
|
|
837
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
801
838
|
declare const revocationClaimsSchema: z.ZodLazy<z.ZodObject<{
|
|
802
839
|
"token-id": z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
803
840
|
issuer: z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>;
|
|
@@ -1091,6 +1128,7 @@ type ManageError = z.infer<typeof manageErrorSchema>;
|
|
|
1091
1128
|
type ManageResponseFrame = z.infer<typeof manageResponseFrameSchema>;
|
|
1092
1129
|
type CapabilityRequest = z.infer<typeof capabilityRequestSchema>;
|
|
1093
1130
|
type CapabilityGrantOk = z.infer<typeof capabilityGrantOkSchema>;
|
|
1131
|
+
type CapabilityGrant = z.infer<typeof capabilityGrantSchema>;
|
|
1094
1132
|
type RevocationClaims = z.infer<typeof revocationClaimsSchema>;
|
|
1095
1133
|
type RevocationEntry = z.infer<typeof revocationEntrySchema>;
|
|
1096
1134
|
type RevocationAnnounceFrame = z.infer<typeof revocationAnnounceFrameSchema>;
|
|
@@ -1145,4 +1183,4 @@ type WebrtcAnswer = z.infer<typeof webrtcAnswerSchema>;
|
|
|
1145
1183
|
type WebrtcIceCandidate = z.infer<typeof webrtcIceCandidateSchema>;
|
|
1146
1184
|
type IceCandidateInit = z.infer<typeof iceCandidateInitSchema>;
|
|
1147
1185
|
//#endregion
|
|
1148
|
-
export {
|
|
1186
|
+
export { ProcSpawn as $, roomNoticeSchema as $n, dataRequestFrameSchema as $t, HandleClaims as A, procKillSchema as An, WebrtcAnswer as At, ManageResponseFrame as B, relayInboundFrameSchema as Bn, capabilityTokenSchema as Bt, DmRoomPath as C, observedAddressFrameSchema as Cn, RoomSend as Ct, Frame as D, pingFrameSchema as Dn, StreamSession as Dt, ExecSessionInfo as E, peerIdentitySchema as En, StreamEndFrame as Et, ManageCommand as F, ptyResizeSchema as Fn, candidatesFrameSchema as Ft, OwnerNamedRoomPath as G, roomInviteSchema as Gn, coreDomainNameSchema as Gt, NamespacedCapability as H, revocationAnnounceFrameSchema as Hn, closeFrameSchema as Ht, ManageCommandParams as I, ptySpawnSchema as In, capabilityGrantOkSchema as It, PingFrame as J, roomLeaveSchema as Jn, coseHeaderLabelSchema as Jt, PeerAdvert as K, roomJoinOkSchema as Kn, coseHeaderAlgSchema as Kt, ManageError as L, ptyWriteSchema as Ln, capabilityGrantSchema as Lt, HandshakeFrame as M, procSpawnSchema as Mn, WebrtcOffer as Mt, IceCandidateInit as N, protocolVersionSchema as Nn, WireCandidate as Nt, FrameVariant as O, privateUseCapabilitySchema as On, SyncPunchFrame as Ot, IdentityKey as P, ptyKillSchema as Pn, candidateKindSchema as Pt, ProcSignal as Q, roomNoticeClaimsSchema as Qn, dataHaveFrameSchema as Qt, ManageOk as R, relayConnectFrameSchema as Rn, capabilityRequestSchema as Rt, DeviceIdHex as S, namespacedDomainIdSchema as Sn, RoomRead as St, ExecList as T, peerAdvertSchema as Tn, StreamDataFrame as Tt, NamespacedDomainId as U, revocationClaimsSchema as Un, coordinatorFrameSchema as Ut, MessageRef as V, relayOfferFrameSchema as Vn, capabilityVerbSchema as Vt, ObservedAddressFrame as W, revocationEntrySchema as Wn, coreCapabilitySchema as Wt, PrivateUseDomainId as X, roomMembersOkSchema as Xn, coseTokenHeadersSchema as Xt, PrivateUseCapability as Y, roomMemberSchema as Yn, coseSign1Schema as Yt, ProcKill as Z, roomMembersSchema as Zn, dataEntriesFrameSchema as Zt, CoseTokenHeaders as _, manageOkSchema as _n, RoomMembers as _t, CapabilityRequest as a, execSessionInfoSchema as an, streamEndFrameSchema as ar, RelayConnectFrame as at, DataRequestFrame as b, messageRefSchema as bn, RoomNoticeClaims as bt, CapabilityVerb as c, gossipFrameSchema as cn, tokenClaimsSchema as cr, RelayOfferFrame as ct, CoreCapability as d, handshakeFrameSchema as dn, webrtcOfferSchema as dr, RevocationEntry as dt, deviceIdHexSchema as en, roomPathSchema as er, ProtocolVersion as et, CoreDomainName as f, iceCandidateInitSchema as fn, wireCandidateSchema as fr, RoomInvite as ft, CoseSign1 as g, manageErrorSchema as gn, RoomMember as gt, CoseHeaderLabel as h, manageCommandSchema as hn, RoomLeave as ht, CapabilityGrantOk as i, execListSchema as in, streamDataFrameSchema as ir, PtyWrite as it, HandleRecord as j, procSignalSchema as jn, WebrtcIceCandidate as jt, GossipFrame as k, privateUseDomainIdSchema as kn, TokenClaims as kt, CloseFrame as l, handleClaimsSchema as ln, webrtcAnswerSchema as lr, RevocationAnnounceFrame as lt, CoseHeaderKid as m, manageCommandParamsSchema as mn, RoomJoinOk as mt, CandidatesFrame as n, dmRoomPathSchema as nn, roomSendSchema as nr, PtyResize as nt, CapabilityScope as o, frameSchema as on, streamSessionSchema as or, RelayDataFrame as ot, CoseHeaderAlg as p, identityKeySchema as pn, RoomJoin as pt, PeerIdentity as q, roomJoinSchema as qn, coseHeaderKidSchema as qt, CapabilityGrant as r, domainIdSchema as rn, streamAckFrameSchema as rr, PtySpawn as rt, CapabilityToken as s, frameVariantSchema as sn, syncPunchFrameSchema as sr, RelayInboundFrame as st, CandidateKind as t, deviceIdSchema as tn, roomReadSchema as tr, PtyKill as tt, CoordinatorFrame as u, handleRecordSchema as un, webrtcIceCandidateSchema as ur, RevocationClaims as ut, DataEntriesFrame as v, manageRequestFrameSchema as vn, RoomMembersOk as vt, DomainId as w, ownerNamedRoomPathSchema as wn, StreamAckFrame as wt, DeviceId as x, namespacedCapabilitySchema as xn, RoomPath as xt, DataHaveFrame as y, manageResponseFrameSchema as yn, RoomNotice as yt, ManageRequestFrame as z, relayDataFrameSchema as zn, capabilityScopeSchema as zt };
|
|
@@ -75,6 +75,12 @@ declare const manageCommandParamsSchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodUni
|
|
|
75
75
|
verb: z.ZodLiteral<"capability.request">;
|
|
76
76
|
capability: z.ZodString;
|
|
77
77
|
"valid-until": z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
79
|
+
verb: z.ZodLiteral<"capability.grant">;
|
|
80
|
+
"granted-token": z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
81
|
+
"1": z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
"4": z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
83
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>], null>>>>>;
|
|
78
84
|
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
79
85
|
verb: z.ZodLiteral<"room.send">;
|
|
80
86
|
"message-id": z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
@@ -263,6 +269,12 @@ declare const frameVariantSchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodLazy<z.Zod
|
|
|
263
269
|
verb: z.ZodLiteral<"capability.request">;
|
|
264
270
|
capability: z.ZodString;
|
|
265
271
|
"valid-until": z.ZodOptional<z.ZodNumber>;
|
|
272
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
273
|
+
verb: z.ZodLiteral<"capability.grant">;
|
|
274
|
+
"granted-token": z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
275
|
+
"1": z.ZodOptional<z.ZodNumber>;
|
|
276
|
+
"4": z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
277
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>], null>>>>>;
|
|
266
278
|
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
267
279
|
verb: z.ZodLiteral<"room.send">;
|
|
268
280
|
"message-id": z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
@@ -457,6 +469,12 @@ declare const frameSchema: z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodUnion<readonly [z.
|
|
|
457
469
|
verb: z.ZodLiteral<"capability.request">;
|
|
458
470
|
capability: z.ZodString;
|
|
459
471
|
"valid-until": z.ZodOptional<z.ZodNumber>;
|
|
472
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
473
|
+
verb: z.ZodLiteral<"capability.grant">;
|
|
474
|
+
"granted-token": z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
475
|
+
"1": z.ZodOptional<z.ZodNumber>;
|
|
476
|
+
"4": z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
477
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>], null>>>>>;
|
|
460
478
|
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
461
479
|
verb: z.ZodLiteral<"room.send">;
|
|
462
480
|
"message-id": z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
@@ -622,6 +640,12 @@ declare const manageCommandSchema: z.ZodLazy<z.ZodObject<{
|
|
|
622
640
|
verb: z.ZodLiteral<"capability.request">;
|
|
623
641
|
capability: z.ZodString;
|
|
624
642
|
"valid-until": z.ZodOptional<z.ZodNumber>;
|
|
643
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
644
|
+
verb: z.ZodLiteral<"capability.grant">;
|
|
645
|
+
"granted-token": z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
646
|
+
"1": z.ZodOptional<z.ZodNumber>;
|
|
647
|
+
"4": z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
648
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>], null>>>>>;
|
|
625
649
|
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
626
650
|
verb: z.ZodLiteral<"room.send">;
|
|
627
651
|
"message-id": z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
@@ -712,6 +736,12 @@ declare const manageRequestFrameSchema: z.ZodLazy<z.ZodObject<{
|
|
|
712
736
|
verb: z.ZodLiteral<"capability.request">;
|
|
713
737
|
capability: z.ZodString;
|
|
714
738
|
"valid-until": z.ZodOptional<z.ZodNumber>;
|
|
739
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
740
|
+
verb: z.ZodLiteral<"capability.grant">;
|
|
741
|
+
"granted-token": z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
742
|
+
"1": z.ZodOptional<z.ZodNumber>;
|
|
743
|
+
"4": z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
744
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>], null>>>>>;
|
|
715
745
|
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
716
746
|
verb: z.ZodLiteral<"room.send">;
|
|
717
747
|
"message-id": z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
@@ -798,6 +828,13 @@ declare const capabilityGrantOkSchema: z.ZodLazy<z.ZodObject<{
|
|
|
798
828
|
"4": z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
799
829
|
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>], null>>>>>;
|
|
800
830
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
831
|
+
declare const capabilityGrantSchema: z.ZodLazy<z.ZodObject<{
|
|
832
|
+
verb: z.ZodLiteral<"capability.grant">;
|
|
833
|
+
"granted-token": z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodLazy<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodLazy<z.ZodLazy<z.ZodObject<{
|
|
834
|
+
"1": z.ZodOptional<z.ZodNumber>;
|
|
835
|
+
"4": z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
836
|
+
}, z.core.$catchall<z.ZodUnknown>>>>, z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>], null>>>>>;
|
|
837
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
801
838
|
declare const revocationClaimsSchema: z.ZodLazy<z.ZodObject<{
|
|
802
839
|
"token-id": z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
803
840
|
issuer: z.ZodLazy<z.ZodLazy<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>>;
|
|
@@ -1091,6 +1128,7 @@ type ManageError = z.infer<typeof manageErrorSchema>;
|
|
|
1091
1128
|
type ManageResponseFrame = z.infer<typeof manageResponseFrameSchema>;
|
|
1092
1129
|
type CapabilityRequest = z.infer<typeof capabilityRequestSchema>;
|
|
1093
1130
|
type CapabilityGrantOk = z.infer<typeof capabilityGrantOkSchema>;
|
|
1131
|
+
type CapabilityGrant = z.infer<typeof capabilityGrantSchema>;
|
|
1094
1132
|
type RevocationClaims = z.infer<typeof revocationClaimsSchema>;
|
|
1095
1133
|
type RevocationEntry = z.infer<typeof revocationEntrySchema>;
|
|
1096
1134
|
type RevocationAnnounceFrame = z.infer<typeof revocationAnnounceFrameSchema>;
|
|
@@ -1145,4 +1183,4 @@ type WebrtcAnswer = z.infer<typeof webrtcAnswerSchema>;
|
|
|
1145
1183
|
type WebrtcIceCandidate = z.infer<typeof webrtcIceCandidateSchema>;
|
|
1146
1184
|
type IceCandidateInit = z.infer<typeof iceCandidateInitSchema>;
|
|
1147
1185
|
//#endregion
|
|
1148
|
-
export {
|
|
1186
|
+
export { ProcSpawn as $, roomNoticeSchema as $n, dataRequestFrameSchema as $t, HandleClaims as A, procKillSchema as An, WebrtcAnswer as At, ManageResponseFrame as B, relayInboundFrameSchema as Bn, capabilityTokenSchema as Bt, DmRoomPath as C, observedAddressFrameSchema as Cn, RoomSend as Ct, Frame as D, pingFrameSchema as Dn, StreamSession as Dt, ExecSessionInfo as E, peerIdentitySchema as En, StreamEndFrame as Et, ManageCommand as F, ptyResizeSchema as Fn, candidatesFrameSchema as Ft, OwnerNamedRoomPath as G, roomInviteSchema as Gn, coreDomainNameSchema as Gt, NamespacedCapability as H, revocationAnnounceFrameSchema as Hn, closeFrameSchema as Ht, ManageCommandParams as I, ptySpawnSchema as In, capabilityGrantOkSchema as It, PingFrame as J, roomLeaveSchema as Jn, coseHeaderLabelSchema as Jt, PeerAdvert as K, roomJoinOkSchema as Kn, coseHeaderAlgSchema as Kt, ManageError as L, ptyWriteSchema as Ln, capabilityGrantSchema as Lt, HandshakeFrame as M, procSpawnSchema as Mn, WebrtcOffer as Mt, IceCandidateInit as N, protocolVersionSchema as Nn, WireCandidate as Nt, FrameVariant as O, privateUseCapabilitySchema as On, SyncPunchFrame as Ot, IdentityKey as P, ptyKillSchema as Pn, candidateKindSchema as Pt, ProcSignal as Q, roomNoticeClaimsSchema as Qn, dataHaveFrameSchema as Qt, ManageOk as R, relayConnectFrameSchema as Rn, capabilityRequestSchema as Rt, DeviceIdHex as S, namespacedDomainIdSchema as Sn, RoomRead as St, ExecList as T, peerAdvertSchema as Tn, StreamDataFrame as Tt, NamespacedDomainId as U, revocationClaimsSchema as Un, coordinatorFrameSchema as Ut, MessageRef as V, relayOfferFrameSchema as Vn, capabilityVerbSchema as Vt, ObservedAddressFrame as W, revocationEntrySchema as Wn, coreCapabilitySchema as Wt, PrivateUseDomainId as X, roomMembersOkSchema as Xn, coseTokenHeadersSchema as Xt, PrivateUseCapability as Y, roomMemberSchema as Yn, coseSign1Schema as Yt, ProcKill as Z, roomMembersSchema as Zn, dataEntriesFrameSchema as Zt, CoseTokenHeaders as _, manageOkSchema as _n, RoomMembers as _t, CapabilityRequest as a, execSessionInfoSchema as an, streamEndFrameSchema as ar, RelayConnectFrame as at, DataRequestFrame as b, messageRefSchema as bn, RoomNoticeClaims as bt, CapabilityVerb as c, gossipFrameSchema as cn, tokenClaimsSchema as cr, RelayOfferFrame as ct, CoreCapability as d, handshakeFrameSchema as dn, webrtcOfferSchema as dr, RevocationEntry as dt, deviceIdHexSchema as en, roomPathSchema as er, ProtocolVersion as et, CoreDomainName as f, iceCandidateInitSchema as fn, wireCandidateSchema as fr, RoomInvite as ft, CoseSign1 as g, manageErrorSchema as gn, RoomMember as gt, CoseHeaderLabel as h, manageCommandSchema as hn, RoomLeave as ht, CapabilityGrantOk as i, execListSchema as in, streamDataFrameSchema as ir, PtyWrite as it, HandleRecord as j, procSignalSchema as jn, WebrtcIceCandidate as jt, GossipFrame as k, privateUseDomainIdSchema as kn, TokenClaims as kt, CloseFrame as l, handleClaimsSchema as ln, webrtcAnswerSchema as lr, RevocationAnnounceFrame as lt, CoseHeaderKid as m, manageCommandParamsSchema as mn, RoomJoinOk as mt, CandidatesFrame as n, dmRoomPathSchema as nn, roomSendSchema as nr, PtyResize as nt, CapabilityScope as o, frameSchema as on, streamSessionSchema as or, RelayDataFrame as ot, CoseHeaderAlg as p, identityKeySchema as pn, RoomJoin as pt, PeerIdentity as q, roomJoinSchema as qn, coseHeaderKidSchema as qt, CapabilityGrant as r, domainIdSchema as rn, streamAckFrameSchema as rr, PtySpawn as rt, CapabilityToken as s, frameVariantSchema as sn, syncPunchFrameSchema as sr, RelayInboundFrame as st, CandidateKind as t, deviceIdSchema as tn, roomReadSchema as tr, PtyKill as tt, CoordinatorFrame as u, handleRecordSchema as un, webrtcIceCandidateSchema as ur, RevocationClaims as ut, DataEntriesFrame as v, manageRequestFrameSchema as vn, RoomMembersOk as vt, DomainId as w, ownerNamedRoomPathSchema as wn, StreamAckFrame as wt, DeviceId as x, namespacedCapabilitySchema as xn, RoomPath as xt, DataHaveFrame as y, manageResponseFrameSchema as yn, RoomNotice as yt, ManageRequestFrame as z, relayDataFrameSchema as zn, capabilityScopeSchema as zt };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { D as Frame, x as DeviceId } from "./protocol-Dhswk7YD.mjs";
|
|
2
|
+
//#region src/ports/transport.d.ts
|
|
3
|
+
/**
|
|
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.
|
|
5
|
+
*/
|
|
6
|
+
interface Connection {
|
|
7
|
+
send: (frame: Frame) => Promise<void>;
|
|
8
|
+
/** Frames received on this connection, in arrival order, until the connection closes. */
|
|
9
|
+
receive: () => AsyncIterable<Frame>;
|
|
10
|
+
close: () => Promise<void>;
|
|
11
|
+
/** The peer's device-id, cryptographically authenticated by the adapter itself (never a value read off the wire) -- absent when the adapter has nothing to authenticate against (createTcpTransport) or the peer presented no credential to check (an accepting createTlsTransport connection whose peer sent no certificate). A caller that later receives an application-level claim of who the peer is (e.g. an `introduce`-style message) MUST treat a mismatch against this field as a spoofing attempt and refuse the claim, exactly the same "reject and destroy" obligation self-certifying claims elsewhere in this spec already carry. */
|
|
12
|
+
readonly peerDeviceId?: DeviceId;
|
|
13
|
+
/** Lets the event loop exit while this connection is still open and functioning -- a caller that wants I/O to keep working without keeping the process alive (matching Node's own `net.Socket.unref()`) calls this once. Adapters with no underlying handle to unref (an in-memory test double, a browser WebSocket) simply omit it. */
|
|
14
|
+
unref?: () => void;
|
|
15
|
+
}
|
|
16
|
+
interface Listener {
|
|
17
|
+
/** Stops listening and closes the listener. */
|
|
18
|
+
close: () => Promise<void>;
|
|
19
|
+
/** The address actually bound, as "host:port". A caller may pass port 0 to take an OS-assigned port and needs it handed back to connect to (or advertise) -- tests rely on this to avoid fixed-port collisions. */
|
|
20
|
+
address: string;
|
|
21
|
+
/** Lets the event loop exit while this listener is still bound and accepting connections. See Connection.unref for the same rationale; adapters with nothing to unref omit it. */
|
|
22
|
+
unref?: () => void;
|
|
23
|
+
}
|
|
24
|
+
interface Transport {
|
|
25
|
+
connect: (address: string) => Promise<Connection>;
|
|
26
|
+
/** Starts listening; each accepted connection is handed to onConnection. Resolves once bound, with the address actually listening on. */
|
|
27
|
+
listen: (address: string, onConnection: (connection: Readonly<Connection>) => void) => Promise<Listener>;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { Listener as n, Transport as r, Connection as t };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { D as Frame, x as DeviceId } from "./protocol-Dhswk7YD.cjs";
|
|
2
|
+
//#region src/ports/transport.d.ts
|
|
3
|
+
/**
|
|
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.
|
|
5
|
+
*/
|
|
6
|
+
interface Connection {
|
|
7
|
+
send: (frame: Frame) => Promise<void>;
|
|
8
|
+
/** Frames received on this connection, in arrival order, until the connection closes. */
|
|
9
|
+
receive: () => AsyncIterable<Frame>;
|
|
10
|
+
close: () => Promise<void>;
|
|
11
|
+
/** The peer's device-id, cryptographically authenticated by the adapter itself (never a value read off the wire) -- absent when the adapter has nothing to authenticate against (createTcpTransport) or the peer presented no credential to check (an accepting createTlsTransport connection whose peer sent no certificate). A caller that later receives an application-level claim of who the peer is (e.g. an `introduce`-style message) MUST treat a mismatch against this field as a spoofing attempt and refuse the claim, exactly the same "reject and destroy" obligation self-certifying claims elsewhere in this spec already carry. */
|
|
12
|
+
readonly peerDeviceId?: DeviceId;
|
|
13
|
+
/** Lets the event loop exit while this connection is still open and functioning -- a caller that wants I/O to keep working without keeping the process alive (matching Node's own `net.Socket.unref()`) calls this once. Adapters with no underlying handle to unref (an in-memory test double, a browser WebSocket) simply omit it. */
|
|
14
|
+
unref?: () => void;
|
|
15
|
+
}
|
|
16
|
+
interface Listener {
|
|
17
|
+
/** Stops listening and closes the listener. */
|
|
18
|
+
close: () => Promise<void>;
|
|
19
|
+
/** The address actually bound, as "host:port". A caller may pass port 0 to take an OS-assigned port and needs it handed back to connect to (or advertise) -- tests rely on this to avoid fixed-port collisions. */
|
|
20
|
+
address: string;
|
|
21
|
+
/** Lets the event loop exit while this listener is still bound and accepting connections. See Connection.unref for the same rationale; adapters with nothing to unref omit it. */
|
|
22
|
+
unref?: () => void;
|
|
23
|
+
}
|
|
24
|
+
interface Transport {
|
|
25
|
+
connect: (address: string) => Promise<Connection>;
|
|
26
|
+
/** Starts listening; each accepted connection is handed to onConnection. Resolves once bound, with the address actually listening on. */
|
|
27
|
+
listen: (address: string, onConnection: (connection: Readonly<Connection>) => void) => Promise<Listener>;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { Listener as n, Transport as r, Connection as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wire-mesh-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"packageManager": "pnpm@12.4.1+sha512.2e81e399d73fe8390dab25e06aa788ab7a5908248d2f5a370f82b481147a6a7a367bf8048f9a6fdb6460f21a66f0542dedb8b94ca2c8723596741920b1656d4c",
|
|
6
6
|
"repository": {
|
|
@@ -85,6 +85,14 @@
|
|
|
85
85
|
"import": "./dist/adapters/tls-transport.mjs",
|
|
86
86
|
"require": "./dist/adapters/tls-transport.cjs"
|
|
87
87
|
},
|
|
88
|
+
"./domain/capability-grant": {
|
|
89
|
+
"import": "./dist/domain/capability-grant.mjs",
|
|
90
|
+
"require": "./dist/domain/capability-grant.cjs"
|
|
91
|
+
},
|
|
92
|
+
"./domain/capability-request": {
|
|
93
|
+
"import": "./dist/domain/capability-request.mjs",
|
|
94
|
+
"require": "./dist/domain/capability-request.cjs"
|
|
95
|
+
},
|
|
88
96
|
"./domain/device-id": {
|
|
89
97
|
"import": "./dist/domain/device-id.mjs",
|
|
90
98
|
"require": "./dist/domain/device-id.cjs"
|