@urun-sh/core 0.3.5 → 0.3.7

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/internal.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __urunCreateRequire } from 'node:module'; const require = globalThis.require ?? __urunCreateRequire(import.meta.url);
2
- import{$ as f,G as r,J as t,K as n,L as a,M as s,R as p,S as c,T as l,Y as m,Z as i,_ as S,a as e,aa as x,b as o,ba as C,ca as D}from"./chunk-NLL342VG.mjs";export{e as ChannelMultiplexer,i as DOC_SYNC_WIRE_CONTRACT_VERSION,o as DeferredChannelMultiplexer,x as DeferredDocConnector,p as LoopbackStreamData,C as SessionDocumentImpl,m as TransportSession,r as allocateSession,D as createPresence,f as createWebsocketDocConnector,S as deriveYjsServerUrl,s as ensureNodeWebRTC,t as isNodeRuntime,n as nodeMediasoupHandlerName,a as nodeWebRTCUnavailableReason,l as streamDataLabel,c as transportStreamData};
2
+ import{$ as f,G as r,J as t,K as n,L as a,M as s,R as p,S as c,T as l,Y as m,Z as i,_ as S,a as e,aa as x,b as o,ba as C,ca as D}from"./chunk-FSUNC7FS.mjs";export{e as ChannelMultiplexer,i as DOC_SYNC_WIRE_CONTRACT_VERSION,o as DeferredChannelMultiplexer,x as DeferredDocConnector,p as LoopbackStreamData,C as SessionDocumentImpl,m as TransportSession,r as allocateSession,D as createPresence,f as createWebsocketDocConnector,S as deriveYjsServerUrl,s as ensureNodeWebRTC,t as isNodeRuntime,n as nodeMediasoupHandlerName,a as nodeWebRTCUnavailableReason,l as streamDataLabel,c as transportStreamData};
@@ -823,6 +823,8 @@ type WtMicSource = MediaStreamTrack | AudioNode;
823
823
 
824
824
  interface WtMicUplinkHandle {
825
825
  setSource(source: WtMicSource | null): void;
826
+
827
+ deliveredDatagrams(): number;
826
828
  }
827
829
 
828
830
  interface WtAudioUplinkSeam {
@@ -834,6 +836,8 @@ interface WtCamUplinkHandle {
834
836
  setSource(track: MediaStreamTrack | null): void;
835
837
 
836
838
  requestKeyframe(): void;
839
+
840
+ deliveredDatagrams(): number;
837
841
  }
838
842
 
839
843
  interface WtVideoUplinkSeam {
@@ -896,6 +900,19 @@ interface WtIncomingUniStreams {
896
900
 
897
901
  declare function consumeWtDataStreams(incoming: WtIncomingUniStreams, sink: WtDataLaneSink): Promise<void>;
898
902
 
903
+ interface PathLiveness {
904
+
905
+ alive: boolean;
906
+
907
+ evidence: string;
908
+ }
909
+
910
+ interface PathHealthReporting {
911
+
912
+ pathLiveness(): PathLiveness;
913
+
914
+ fail(reason: string): void;
915
+ }
899
916
  interface MediaSession {
900
917
  readonly kind: 'webtransport' | 'webrtc';
901
918
  start(): Promise<void>;
@@ -1133,8 +1150,12 @@ declare class TransportNegotiator {
1133
1150
  private quicDataLane;
1134
1151
 
1135
1152
  private wtOnlyLeg;
1153
+
1154
+ private webRtcDialProceeded;
1136
1155
  constructor(signaling: Signaling, sessionId: string, opts: NegotiatorOptions);
1137
1156
  get activeTransport(): MediaSession['kind'] | null;
1157
+
1158
+ get isWtOnlyLeg(): boolean;
1138
1159
  connect(): Promise<MediaSession>;
1139
1160
  disconnect(): Promise<void>;
1140
1161
 
@@ -1148,6 +1169,10 @@ declare class TransportNegotiator {
1148
1169
  private startWebRtcOn;
1149
1170
  private startWebRtc;
1150
1171
 
1172
+ private skipWebRtcDial;
1173
+
1174
+ private proceedWebRtcDial;
1175
+
1151
1176
  private armFailover;
1152
1177
  private notifyEstablished;
1153
1178
  }
@@ -1281,6 +1306,8 @@ declare class TransportSession {
1281
1306
 
1282
1307
  private _currentEpoch;
1283
1308
 
1309
+ private _selfEpochAdoptUntil;
1310
+
1284
1311
  private _consumerId;
1285
1312
 
1286
1313
  private _streamDataHandlers;
@@ -1597,4 +1624,4 @@ interface DataChannelTransport {
1597
1624
 
1598
1625
  declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
1599
1626
 
1600
- export { type RuntimeArtifact as $, type AccessTokenOptions$1 as A, type MediaChunkSource as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSourceFactory as E, type MediaRecorderChunkSourceOptions as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaSession as H, type InboundStatsSample as I, type NegotiatorOptions as J, type PresenceState as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type PrewakeOptions as O, type Presence as P, type PrewakeResult as Q, type PrewakeStatus as R, type QuicStreamDataTransport as S, type Recording as T, type RecordingBucket as U, type RecordingLifecycle as V, type RecordingStatus as W, type RecordingsAccessor as X, type ReleaseSessionBeaconOptions as Y, type RequestOptions as Z, type RequestStreamOptions as _, type AccessTokenOptions as a, prewake as a$, type RuntimeArtifactDownload as a0, type RuntimeArtifactsAccessor as a1, type RuntimeAvailability as a2, type RuntimeWakeDetail as a3, type RuntimeWakeGolden as a4, type RuntimeWakeReasonCode as a5, SIGNALING_PROTOCOL_VERSION as a6, STREAM_END as a7, type Session as a8, type SessionDiagnostic as a9, type TransportState as aA, type VideoPlayoutOptions as aB, WT_CONTROL_FRAME_MAX as aC, WT_DATA_STREAM_VERSION as aD, type WatchGenerationTickOptions as aE, type WtAudioLaneSeam as aF, type WtAudioUplinkSeam as aG, WtControlDecoder as aH, type WtControlMessage as aI, type WtDataEnvelope as aJ, type WtDataLaneSink as aK, WtDataStreamParser as aL, WtDataUplinkSender as aM, type WtVideoUplinkSeam as aN, allocateSession as aO, consumeWtDataStreams as aP, createPresence as aQ, createWebsocketDocConnector as aR, decodeStreamEnvelope as aS, deriveYjsServerUrl as aT, derivedLegName as aU, derivedLegRole as aV, encodeStreamEnvelope as aW, encodeWtControlFrame as aX, isPendingRecording as aY, mediaRecorderChunkSource as aZ, parseDgramHeader as a_, type SessionDocument as aa, SessionDocumentImpl as ab, type SessionEndResult as ac, type SessionFailureKind as ad, type SessionPhase as ae, type SessionPhaseError as af, type SessionPhaseName as ag, type SessionStartOptions as ah, type SessionStatsOptions as ai, type SessionStatsSample as aj, type SessionStatus as ak, type SessionStream as al, type SessionText as am, type SignalCarrier as an, type Signaling as ao, type Store as ap, type StoreOptions as aq, type StreamChunkOptions as ar, type StreamDataTransport as as, type TransportEstablishedNotify as at, TransportNegotiator as au, type TransportOfferRequest as av, type TransportOfferResponse as aw, TransportSession as ax, type TransportSessionOptions as ay, TransportSessionSignaling as az, type ActivationEvent as b, releaseSessionBeacon as b0, streamDataLabel as b1, transportStreamData as b2, watchGenerationTick as b3, writeDgramHeader as b4, type ActivationState as c, type AllocateSessionOptions as d, type AllocatedSession as e, type App as f, type AppOptions as g, type AttachOptions as h, type AudioPlayoutOptions as i, type ChannelMessage as j, ChannelMultiplexer as k, type ChannelName as l, type ChunkReadable as m, DGRAM_HEADER_BYTES as n, DOC_SYNC_WIRE_CONTRACT_VERSION as o, DeferredChannelMultiplexer as p, DeferredDocConnector as q, type DerivedLegRole as r, type DgramHeader as s, type DocConnection as t, type DocConnectionState as u, type DocConnector as v, type DocServerUrlResolver as w, type DocTokenSupplier as x, GENERATION_TICK_MAX_EXTRAPOLATION_MS as y, type GenerationTick as z };
1627
+ export { type RequestOptions as $, type AccessTokenOptions$1 as A, type MediaChunkSource as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSourceFactory as E, type MediaRecorderChunkSourceOptions as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaSession as H, type InboundStatsSample as I, type NegotiatorOptions as J, type PathLiveness as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type Presence as O, type PathHealthReporting as P, type PresenceState as Q, type PrewakeOptions as R, type PrewakeResult as S, type PrewakeStatus as T, type QuicStreamDataTransport as U, type Recording as V, type RecordingBucket as W, type RecordingLifecycle as X, type RecordingStatus as Y, type RecordingsAccessor as Z, type ReleaseSessionBeaconOptions as _, type AccessTokenOptions as a, mediaRecorderChunkSource as a$, type RequestStreamOptions as a0, type RuntimeArtifact as a1, type RuntimeArtifactDownload as a2, type RuntimeArtifactsAccessor as a3, type RuntimeAvailability as a4, type RuntimeWakeDetail as a5, type RuntimeWakeGolden as a6, type RuntimeWakeReasonCode as a7, SIGNALING_PROTOCOL_VERSION as a8, STREAM_END as a9, type TransportSessionOptions as aA, TransportSessionSignaling as aB, type TransportState as aC, type VideoPlayoutOptions as aD, WT_CONTROL_FRAME_MAX as aE, WT_DATA_STREAM_VERSION as aF, type WatchGenerationTickOptions as aG, type WtAudioLaneSeam as aH, type WtAudioUplinkSeam as aI, WtControlDecoder as aJ, type WtControlMessage as aK, type WtDataEnvelope as aL, type WtDataLaneSink as aM, WtDataStreamParser as aN, WtDataUplinkSender as aO, type WtVideoUplinkSeam as aP, allocateSession as aQ, consumeWtDataStreams as aR, createPresence as aS, createWebsocketDocConnector as aT, decodeStreamEnvelope as aU, deriveYjsServerUrl as aV, derivedLegName as aW, derivedLegRole as aX, encodeStreamEnvelope as aY, encodeWtControlFrame as aZ, isPendingRecording as a_, type Session as aa, type SessionDiagnostic as ab, type SessionDocument as ac, SessionDocumentImpl as ad, type SessionEndResult as ae, type SessionFailureKind as af, type SessionPhase as ag, type SessionPhaseError as ah, type SessionPhaseName as ai, type SessionStartOptions as aj, type SessionStatsOptions as ak, type SessionStatsSample as al, type SessionStatus as am, type SessionStream as an, type SessionText as ao, type SignalCarrier as ap, type Signaling as aq, type Store as ar, type StoreOptions as as, type StreamChunkOptions as at, type StreamDataTransport as au, type TransportEstablishedNotify as av, TransportNegotiator as aw, type TransportOfferRequest as ax, type TransportOfferResponse as ay, TransportSession as az, type ActivationEvent as b, parseDgramHeader as b0, prewake as b1, releaseSessionBeacon as b2, streamDataLabel as b3, transportStreamData as b4, watchGenerationTick as b5, writeDgramHeader as b6, type ActivationState as c, type AllocateSessionOptions as d, type AllocatedSession as e, type App as f, type AppOptions as g, type AttachOptions as h, type AudioPlayoutOptions as i, type ChannelMessage as j, ChannelMultiplexer as k, type ChannelName as l, type ChunkReadable as m, DGRAM_HEADER_BYTES as n, DOC_SYNC_WIRE_CONTRACT_VERSION as o, DeferredChannelMultiplexer as p, DeferredDocConnector as q, type DerivedLegRole as r, type DgramHeader as s, type DocConnection as t, type DocConnectionState as u, type DocConnector as v, type DocServerUrlResolver as w, type DocTokenSupplier as x, GENERATION_TICK_MAX_EXTRAPOLATION_MS as y, type GenerationTick as z };
@@ -823,6 +823,8 @@ type WtMicSource = MediaStreamTrack | AudioNode;
823
823
 
824
824
  interface WtMicUplinkHandle {
825
825
  setSource(source: WtMicSource | null): void;
826
+
827
+ deliveredDatagrams(): number;
826
828
  }
827
829
 
828
830
  interface WtAudioUplinkSeam {
@@ -834,6 +836,8 @@ interface WtCamUplinkHandle {
834
836
  setSource(track: MediaStreamTrack | null): void;
835
837
 
836
838
  requestKeyframe(): void;
839
+
840
+ deliveredDatagrams(): number;
837
841
  }
838
842
 
839
843
  interface WtVideoUplinkSeam {
@@ -896,6 +900,19 @@ interface WtIncomingUniStreams {
896
900
 
897
901
  declare function consumeWtDataStreams(incoming: WtIncomingUniStreams, sink: WtDataLaneSink): Promise<void>;
898
902
 
903
+ interface PathLiveness {
904
+
905
+ alive: boolean;
906
+
907
+ evidence: string;
908
+ }
909
+
910
+ interface PathHealthReporting {
911
+
912
+ pathLiveness(): PathLiveness;
913
+
914
+ fail(reason: string): void;
915
+ }
899
916
  interface MediaSession {
900
917
  readonly kind: 'webtransport' | 'webrtc';
901
918
  start(): Promise<void>;
@@ -1133,8 +1150,12 @@ declare class TransportNegotiator {
1133
1150
  private quicDataLane;
1134
1151
 
1135
1152
  private wtOnlyLeg;
1153
+
1154
+ private webRtcDialProceeded;
1136
1155
  constructor(signaling: Signaling, sessionId: string, opts: NegotiatorOptions);
1137
1156
  get activeTransport(): MediaSession['kind'] | null;
1157
+
1158
+ get isWtOnlyLeg(): boolean;
1138
1159
  connect(): Promise<MediaSession>;
1139
1160
  disconnect(): Promise<void>;
1140
1161
 
@@ -1148,6 +1169,10 @@ declare class TransportNegotiator {
1148
1169
  private startWebRtcOn;
1149
1170
  private startWebRtc;
1150
1171
 
1172
+ private skipWebRtcDial;
1173
+
1174
+ private proceedWebRtcDial;
1175
+
1151
1176
  private armFailover;
1152
1177
  private notifyEstablished;
1153
1178
  }
@@ -1281,6 +1306,8 @@ declare class TransportSession {
1281
1306
 
1282
1307
  private _currentEpoch;
1283
1308
 
1309
+ private _selfEpochAdoptUntil;
1310
+
1284
1311
  private _consumerId;
1285
1312
 
1286
1313
  private _streamDataHandlers;
@@ -1597,4 +1624,4 @@ interface DataChannelTransport {
1597
1624
 
1598
1625
  declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
1599
1626
 
1600
- export { type RuntimeArtifact as $, type AccessTokenOptions$1 as A, type MediaChunkSource as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSourceFactory as E, type MediaRecorderChunkSourceOptions as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaSession as H, type InboundStatsSample as I, type NegotiatorOptions as J, type PresenceState as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type PrewakeOptions as O, type Presence as P, type PrewakeResult as Q, type PrewakeStatus as R, type QuicStreamDataTransport as S, type Recording as T, type RecordingBucket as U, type RecordingLifecycle as V, type RecordingStatus as W, type RecordingsAccessor as X, type ReleaseSessionBeaconOptions as Y, type RequestOptions as Z, type RequestStreamOptions as _, type AccessTokenOptions as a, prewake as a$, type RuntimeArtifactDownload as a0, type RuntimeArtifactsAccessor as a1, type RuntimeAvailability as a2, type RuntimeWakeDetail as a3, type RuntimeWakeGolden as a4, type RuntimeWakeReasonCode as a5, SIGNALING_PROTOCOL_VERSION as a6, STREAM_END as a7, type Session as a8, type SessionDiagnostic as a9, type TransportState as aA, type VideoPlayoutOptions as aB, WT_CONTROL_FRAME_MAX as aC, WT_DATA_STREAM_VERSION as aD, type WatchGenerationTickOptions as aE, type WtAudioLaneSeam as aF, type WtAudioUplinkSeam as aG, WtControlDecoder as aH, type WtControlMessage as aI, type WtDataEnvelope as aJ, type WtDataLaneSink as aK, WtDataStreamParser as aL, WtDataUplinkSender as aM, type WtVideoUplinkSeam as aN, allocateSession as aO, consumeWtDataStreams as aP, createPresence as aQ, createWebsocketDocConnector as aR, decodeStreamEnvelope as aS, deriveYjsServerUrl as aT, derivedLegName as aU, derivedLegRole as aV, encodeStreamEnvelope as aW, encodeWtControlFrame as aX, isPendingRecording as aY, mediaRecorderChunkSource as aZ, parseDgramHeader as a_, type SessionDocument as aa, SessionDocumentImpl as ab, type SessionEndResult as ac, type SessionFailureKind as ad, type SessionPhase as ae, type SessionPhaseError as af, type SessionPhaseName as ag, type SessionStartOptions as ah, type SessionStatsOptions as ai, type SessionStatsSample as aj, type SessionStatus as ak, type SessionStream as al, type SessionText as am, type SignalCarrier as an, type Signaling as ao, type Store as ap, type StoreOptions as aq, type StreamChunkOptions as ar, type StreamDataTransport as as, type TransportEstablishedNotify as at, TransportNegotiator as au, type TransportOfferRequest as av, type TransportOfferResponse as aw, TransportSession as ax, type TransportSessionOptions as ay, TransportSessionSignaling as az, type ActivationEvent as b, releaseSessionBeacon as b0, streamDataLabel as b1, transportStreamData as b2, watchGenerationTick as b3, writeDgramHeader as b4, type ActivationState as c, type AllocateSessionOptions as d, type AllocatedSession as e, type App as f, type AppOptions as g, type AttachOptions as h, type AudioPlayoutOptions as i, type ChannelMessage as j, ChannelMultiplexer as k, type ChannelName as l, type ChunkReadable as m, DGRAM_HEADER_BYTES as n, DOC_SYNC_WIRE_CONTRACT_VERSION as o, DeferredChannelMultiplexer as p, DeferredDocConnector as q, type DerivedLegRole as r, type DgramHeader as s, type DocConnection as t, type DocConnectionState as u, type DocConnector as v, type DocServerUrlResolver as w, type DocTokenSupplier as x, GENERATION_TICK_MAX_EXTRAPOLATION_MS as y, type GenerationTick as z };
1627
+ export { type RequestOptions as $, type AccessTokenOptions$1 as A, type MediaChunkSource as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSourceFactory as E, type MediaRecorderChunkSourceOptions as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaSession as H, type InboundStatsSample as I, type NegotiatorOptions as J, type PathLiveness as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type Presence as O, type PathHealthReporting as P, type PresenceState as Q, type PrewakeOptions as R, type PrewakeResult as S, type PrewakeStatus as T, type QuicStreamDataTransport as U, type Recording as V, type RecordingBucket as W, type RecordingLifecycle as X, type RecordingStatus as Y, type RecordingsAccessor as Z, type ReleaseSessionBeaconOptions as _, type AccessTokenOptions as a, mediaRecorderChunkSource as a$, type RequestStreamOptions as a0, type RuntimeArtifact as a1, type RuntimeArtifactDownload as a2, type RuntimeArtifactsAccessor as a3, type RuntimeAvailability as a4, type RuntimeWakeDetail as a5, type RuntimeWakeGolden as a6, type RuntimeWakeReasonCode as a7, SIGNALING_PROTOCOL_VERSION as a8, STREAM_END as a9, type TransportSessionOptions as aA, TransportSessionSignaling as aB, type TransportState as aC, type VideoPlayoutOptions as aD, WT_CONTROL_FRAME_MAX as aE, WT_DATA_STREAM_VERSION as aF, type WatchGenerationTickOptions as aG, type WtAudioLaneSeam as aH, type WtAudioUplinkSeam as aI, WtControlDecoder as aJ, type WtControlMessage as aK, type WtDataEnvelope as aL, type WtDataLaneSink as aM, WtDataStreamParser as aN, WtDataUplinkSender as aO, type WtVideoUplinkSeam as aP, allocateSession as aQ, consumeWtDataStreams as aR, createPresence as aS, createWebsocketDocConnector as aT, decodeStreamEnvelope as aU, deriveYjsServerUrl as aV, derivedLegName as aW, derivedLegRole as aX, encodeStreamEnvelope as aY, encodeWtControlFrame as aZ, isPendingRecording as a_, type Session as aa, type SessionDiagnostic as ab, type SessionDocument as ac, SessionDocumentImpl as ad, type SessionEndResult as ae, type SessionFailureKind as af, type SessionPhase as ag, type SessionPhaseError as ah, type SessionPhaseName as ai, type SessionStartOptions as aj, type SessionStatsOptions as ak, type SessionStatsSample as al, type SessionStatus as am, type SessionStream as an, type SessionText as ao, type SignalCarrier as ap, type Signaling as aq, type Store as ar, type StoreOptions as as, type StreamChunkOptions as at, type StreamDataTransport as au, type TransportEstablishedNotify as av, TransportNegotiator as aw, type TransportOfferRequest as ax, type TransportOfferResponse as ay, TransportSession as az, type ActivationEvent as b, parseDgramHeader as b0, prewake as b1, releaseSessionBeacon as b2, streamDataLabel as b3, transportStreamData as b4, watchGenerationTick as b5, writeDgramHeader as b6, type ActivationState as c, type AllocateSessionOptions as d, type AllocatedSession as e, type App as f, type AppOptions as g, type AttachOptions as h, type AudioPlayoutOptions as i, type ChannelMessage as j, ChannelMultiplexer as k, type ChannelName as l, type ChunkReadable as m, DGRAM_HEADER_BYTES as n, DOC_SYNC_WIRE_CONTRACT_VERSION as o, DeferredChannelMultiplexer as p, DeferredDocConnector as q, type DerivedLegRole as r, type DgramHeader as s, type DocConnection as t, type DocConnectionState as u, type DocConnector as v, type DocServerUrlResolver as w, type DocTokenSupplier as x, GENERATION_TICK_MAX_EXTRAPOLATION_MS as y, type GenerationTick as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urun-sh/core",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "Core transport and channel primitives for the urun TypeScript SDK",
5
5
  "repository": {
6
6
  "type": "git",