@urun-sh/core 0.2.2 → 0.2.4

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 +1 @@
1
- import{a as e,b as r,c as o,d as t,e as a,g as n,h as p,i as s,j as m,l as c,m as i,n as f,o as x}from"./chunk-2TYDFOWI.mjs";export{e as ChannelMultiplexer,r as DeferredChannelMultiplexer,f as DeferredDocConnector,n as LoopbackStreamData,m as TransportSession,x as createPresence,i as createWebsocketDocConnector,c as deriveYjsServerUrl,a as ensureNodeWebRTC,o as isNodeRuntime,t as nodeMediasoupHandlerName,s as streamDataLabel,p as transportStreamData};
1
+ import{a as e,b as r,c as o,d as t,e as a,g as n,h as p,i as s,j as m,l as c,m as i,n as f,o as x}from"./chunk-QU4I4XC5.mjs";export{e as ChannelMultiplexer,r as DeferredChannelMultiplexer,f as DeferredDocConnector,n as LoopbackStreamData,m as TransportSession,x as createPresence,i as createWebsocketDocConnector,c as deriveYjsServerUrl,a as ensureNodeWebRTC,o as isNodeRuntime,t as nodeMediasoupHandlerName,s as streamDataLabel,p as transportStreamData};
@@ -328,8 +328,15 @@ interface Session {
328
328
 
329
329
  onPhase(handler: (phase: SessionPhase) => void): () => void;
330
330
 
331
+ whenLive(options?: {
332
+ timeout?: number;
333
+ signal?: AbortSignal;
334
+ }): Promise<void>;
335
+
331
336
  readonly recordings: RecordingsAccessor;
332
337
 
338
+ readonly artifacts: RuntimeArtifactsAccessor;
339
+
333
340
  disconnect(): void;
334
341
  }
335
342
 
@@ -392,6 +399,27 @@ interface RecordingsAccessor {
392
399
 
393
400
  delete(id: string): Promise<Recording>;
394
401
  }
402
+ interface RuntimeArtifact {
403
+ artifactId: string;
404
+ kind: string;
405
+ filename: string;
406
+ contentType: string;
407
+ sizeBytes: number;
408
+ sha256: string;
409
+ status: string;
410
+ createdAt?: string;
411
+ expiresAt?: string;
412
+ }
413
+ interface RuntimeArtifactDownload {
414
+ artifact: RuntimeArtifact;
415
+ downloadUrl: string;
416
+ }
417
+ interface RuntimeArtifactsAccessor {
418
+
419
+ list(sessionId?: string): Promise<RuntimeArtifact[]>;
420
+
421
+ getDownloadUrl(artifactId: string, sessionId?: string): Promise<RuntimeArtifactDownload>;
422
+ }
395
423
 
396
424
  interface AppOptions {
397
425
 
@@ -528,14 +556,16 @@ declare class TransportSession {
528
556
  private _intentionalDisconnect;
529
557
  private _reconnectTimer;
530
558
 
559
+ private _cancelPendingDial;
560
+
531
561
  private _stableResetTimer;
532
562
  private _generation;
533
563
  private _lastStartOptions;
534
564
  private _resolveConnection;
535
- private _recvTransportMsg;
536
- private _lastConsumeMsg;
537
- private _recvConnectWatchdog;
538
- private _recvTcpFailoverDone;
565
+ private _recvIceRestartAttempts;
566
+ private _recvIceRestartTimer;
567
+ private _sendIceRestartAttempts;
568
+ private _sendIceRestartTimer;
539
569
  private _phase;
540
570
  private _requestId;
541
571
  private _liveReached;
@@ -550,6 +580,14 @@ declare class TransportSession {
550
580
 
551
581
  private _mediaDeathHandled;
552
582
 
583
+ private _decodeSignalSeen;
584
+
585
+ private _lastFramesDecoded;
586
+
587
+ private _lastDecodeAdvanceAt;
588
+
589
+ private _decodeDeathHandled;
590
+
553
591
  private _currentEpoch;
554
592
 
555
593
  private _consumerId;
@@ -629,13 +667,25 @@ declare class TransportSession {
629
667
  private _onCreateRecvTransport;
630
668
 
631
669
  private _buildRecvTransport;
632
- private _clearRecvWatchdog;
633
670
 
634
- private _failoverRecvToTcp;
671
+ private _tryRestartRecvIce;
672
+ private _trySendIceRestart;
673
+
674
+ private _requestIceRestart;
675
+
676
+ private _onIceRestarted;
677
+ private _armRecvIceRestartWatchdog;
678
+ private _armSendIceRestartWatchdog;
679
+ private _clearRecvIceRestart;
680
+ private _clearSendIceRestart;
635
681
  private _onCreateSendTransport;
636
682
 
637
683
  private _onConsumeData;
638
684
  private _onConsume;
685
+
686
+ private _closeConsumer;
687
+
688
+ private _closeConsumersByProducer;
639
689
  private _mediaPollMs;
640
690
  private _mediaStallTimeoutMs;
641
691
 
@@ -643,6 +693,8 @@ declare class TransportSession {
643
693
  private _stopMediaMonitor;
644
694
  private _sampleMediaLiveness;
645
695
 
696
+ private _checkDecodeLiveness;
697
+
646
698
  private _renegotiate;
647
699
  private _attemptReconnect;
648
700
  private _connectUrls;
@@ -694,4 +746,4 @@ interface DataChannelTransport {
694
746
 
695
747
  declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
696
748
 
697
- export { type AccessTokenOptions as A, type SessionPhase as B, type ChannelEndpoint as C, DeferredChannelMultiplexer as D, type SessionPhaseName as E, type SessionStartOptions as F, type SessionStream as G, type SessionText as H, type Store as I, type StoreOptions as J, type StreamChunkOptions as K, type Layer as L, type MediaChunkBinding as M, type StreamDataTransport as N, type TransportSessionOptions as O, type Presence as P, type TransportState as Q, type Recording as R, type SceneContext as S, TransportSession as T, createPresence as U, createWebsocketDocConnector as V, deriveYjsServerUrl as W, isPendingRecording as X, mediaRecorderChunkSource as Y, streamDataLabel as Z, transportStreamData as _, type App as a, type AppOptions as b, type AttachOptions as c, type ChannelMessage as d, ChannelMultiplexer as e, type ChannelName as f, type ChunkReadable as g, DeferredDocConnector as h, type DocConnection as i, type DocConnector as j, type LayoutConfig as k, type LayoutContext as l, LoopbackStreamData as m, type MediaChunkSource as n, type MediaChunkSourceFactory as o, type MediaRecorderChunkSourceOptions as p, type PresenceState as q, type RecordingBucket as r, type RecordingLifecycle as s, type RecordingStatus as t, type RecordingsAccessor as u, type RequestOptions as v, type RequestStreamOptions as w, type SceneGraph as x, type Session as y, type SessionDocument as z };
749
+ export { mediaRecorderChunkSource as $, type AccessTokenOptions as A, type SceneGraph as B, type ChannelEndpoint as C, DeferredChannelMultiplexer as D, type Session as E, type SessionDocument as F, type SessionPhase as G, type SessionPhaseName as H, type SessionStartOptions as I, type SessionStream as J, type SessionText as K, type Layer as L, type MediaChunkBinding as M, type Store as N, type StoreOptions as O, type Presence as P, type StreamChunkOptions as Q, type Recording as R, type SceneContext as S, type StreamDataTransport as T, TransportSession as U, type TransportSessionOptions as V, type TransportState as W, createPresence as X, createWebsocketDocConnector as Y, deriveYjsServerUrl as Z, isPendingRecording as _, type App as a, streamDataLabel as a0, transportStreamData as a1, type AppOptions as b, type AttachOptions as c, type ChannelMessage as d, ChannelMultiplexer as e, type ChannelName as f, type ChunkReadable as g, DeferredDocConnector as h, type DocConnection as i, type DocConnector as j, type LayoutConfig as k, type LayoutContext as l, LoopbackStreamData as m, type MediaChunkSource as n, type MediaChunkSourceFactory as o, type MediaRecorderChunkSourceOptions as p, type PresenceState as q, type RecordingBucket as r, type RecordingLifecycle as s, type RecordingStatus as t, type RecordingsAccessor as u, type RequestOptions as v, type RequestStreamOptions as w, type RuntimeArtifact as x, type RuntimeArtifactDownload as y, type RuntimeArtifactsAccessor as z };
@@ -328,8 +328,15 @@ interface Session {
328
328
 
329
329
  onPhase(handler: (phase: SessionPhase) => void): () => void;
330
330
 
331
+ whenLive(options?: {
332
+ timeout?: number;
333
+ signal?: AbortSignal;
334
+ }): Promise<void>;
335
+
331
336
  readonly recordings: RecordingsAccessor;
332
337
 
338
+ readonly artifacts: RuntimeArtifactsAccessor;
339
+
333
340
  disconnect(): void;
334
341
  }
335
342
 
@@ -392,6 +399,27 @@ interface RecordingsAccessor {
392
399
 
393
400
  delete(id: string): Promise<Recording>;
394
401
  }
402
+ interface RuntimeArtifact {
403
+ artifactId: string;
404
+ kind: string;
405
+ filename: string;
406
+ contentType: string;
407
+ sizeBytes: number;
408
+ sha256: string;
409
+ status: string;
410
+ createdAt?: string;
411
+ expiresAt?: string;
412
+ }
413
+ interface RuntimeArtifactDownload {
414
+ artifact: RuntimeArtifact;
415
+ downloadUrl: string;
416
+ }
417
+ interface RuntimeArtifactsAccessor {
418
+
419
+ list(sessionId?: string): Promise<RuntimeArtifact[]>;
420
+
421
+ getDownloadUrl(artifactId: string, sessionId?: string): Promise<RuntimeArtifactDownload>;
422
+ }
395
423
 
396
424
  interface AppOptions {
397
425
 
@@ -528,14 +556,16 @@ declare class TransportSession {
528
556
  private _intentionalDisconnect;
529
557
  private _reconnectTimer;
530
558
 
559
+ private _cancelPendingDial;
560
+
531
561
  private _stableResetTimer;
532
562
  private _generation;
533
563
  private _lastStartOptions;
534
564
  private _resolveConnection;
535
- private _recvTransportMsg;
536
- private _lastConsumeMsg;
537
- private _recvConnectWatchdog;
538
- private _recvTcpFailoverDone;
565
+ private _recvIceRestartAttempts;
566
+ private _recvIceRestartTimer;
567
+ private _sendIceRestartAttempts;
568
+ private _sendIceRestartTimer;
539
569
  private _phase;
540
570
  private _requestId;
541
571
  private _liveReached;
@@ -550,6 +580,14 @@ declare class TransportSession {
550
580
 
551
581
  private _mediaDeathHandled;
552
582
 
583
+ private _decodeSignalSeen;
584
+
585
+ private _lastFramesDecoded;
586
+
587
+ private _lastDecodeAdvanceAt;
588
+
589
+ private _decodeDeathHandled;
590
+
553
591
  private _currentEpoch;
554
592
 
555
593
  private _consumerId;
@@ -629,13 +667,25 @@ declare class TransportSession {
629
667
  private _onCreateRecvTransport;
630
668
 
631
669
  private _buildRecvTransport;
632
- private _clearRecvWatchdog;
633
670
 
634
- private _failoverRecvToTcp;
671
+ private _tryRestartRecvIce;
672
+ private _trySendIceRestart;
673
+
674
+ private _requestIceRestart;
675
+
676
+ private _onIceRestarted;
677
+ private _armRecvIceRestartWatchdog;
678
+ private _armSendIceRestartWatchdog;
679
+ private _clearRecvIceRestart;
680
+ private _clearSendIceRestart;
635
681
  private _onCreateSendTransport;
636
682
 
637
683
  private _onConsumeData;
638
684
  private _onConsume;
685
+
686
+ private _closeConsumer;
687
+
688
+ private _closeConsumersByProducer;
639
689
  private _mediaPollMs;
640
690
  private _mediaStallTimeoutMs;
641
691
 
@@ -643,6 +693,8 @@ declare class TransportSession {
643
693
  private _stopMediaMonitor;
644
694
  private _sampleMediaLiveness;
645
695
 
696
+ private _checkDecodeLiveness;
697
+
646
698
  private _renegotiate;
647
699
  private _attemptReconnect;
648
700
  private _connectUrls;
@@ -694,4 +746,4 @@ interface DataChannelTransport {
694
746
 
695
747
  declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
696
748
 
697
- export { type AccessTokenOptions as A, type SessionPhase as B, type ChannelEndpoint as C, DeferredChannelMultiplexer as D, type SessionPhaseName as E, type SessionStartOptions as F, type SessionStream as G, type SessionText as H, type Store as I, type StoreOptions as J, type StreamChunkOptions as K, type Layer as L, type MediaChunkBinding as M, type StreamDataTransport as N, type TransportSessionOptions as O, type Presence as P, type TransportState as Q, type Recording as R, type SceneContext as S, TransportSession as T, createPresence as U, createWebsocketDocConnector as V, deriveYjsServerUrl as W, isPendingRecording as X, mediaRecorderChunkSource as Y, streamDataLabel as Z, transportStreamData as _, type App as a, type AppOptions as b, type AttachOptions as c, type ChannelMessage as d, ChannelMultiplexer as e, type ChannelName as f, type ChunkReadable as g, DeferredDocConnector as h, type DocConnection as i, type DocConnector as j, type LayoutConfig as k, type LayoutContext as l, LoopbackStreamData as m, type MediaChunkSource as n, type MediaChunkSourceFactory as o, type MediaRecorderChunkSourceOptions as p, type PresenceState as q, type RecordingBucket as r, type RecordingLifecycle as s, type RecordingStatus as t, type RecordingsAccessor as u, type RequestOptions as v, type RequestStreamOptions as w, type SceneGraph as x, type Session as y, type SessionDocument as z };
749
+ export { mediaRecorderChunkSource as $, type AccessTokenOptions as A, type SceneGraph as B, type ChannelEndpoint as C, DeferredChannelMultiplexer as D, type Session as E, type SessionDocument as F, type SessionPhase as G, type SessionPhaseName as H, type SessionStartOptions as I, type SessionStream as J, type SessionText as K, type Layer as L, type MediaChunkBinding as M, type Store as N, type StoreOptions as O, type Presence as P, type StreamChunkOptions as Q, type Recording as R, type SceneContext as S, type StreamDataTransport as T, TransportSession as U, type TransportSessionOptions as V, type TransportState as W, createPresence as X, createWebsocketDocConnector as Y, deriveYjsServerUrl as Z, isPendingRecording as _, type App as a, streamDataLabel as a0, transportStreamData as a1, type AppOptions as b, type AttachOptions as c, type ChannelMessage as d, ChannelMultiplexer as e, type ChannelName as f, type ChunkReadable as g, DeferredDocConnector as h, type DocConnection as i, type DocConnector as j, type LayoutConfig as k, type LayoutContext as l, LoopbackStreamData as m, type MediaChunkSource as n, type MediaChunkSourceFactory as o, type MediaRecorderChunkSourceOptions as p, type PresenceState as q, type RecordingBucket as r, type RecordingLifecycle as s, type RecordingStatus as t, type RecordingsAccessor as u, type RequestOptions as v, type RequestStreamOptions as w, type RuntimeArtifact as x, type RuntimeArtifactDownload as y, type RuntimeArtifactsAccessor as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urun-sh/core",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Core transport and channel primitives for the urun TypeScript SDK",
5
5
  "repository": {
6
6
  "type": "git",