@urun-sh/core 0.2.29 → 0.2.31

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.
@@ -1,5 +1,5 @@
1
- import { d as AppOptions, c as App$1, J as SessionPhase, Q as SessionStatus, N as SessionPhaseName, A as AccessTokenOptions$1, x as RuntimeArtifact, y as RuntimeArtifactDownload, R as Recording, S as Session$1, C as ChannelEndpoint, Z as TransportSession, e as AttachOptions, E as SessionDiagnostic, a as ActivationEvent, u as RecordingsAccessor, z as RuntimeArtifactsAccessor, H as SessionEndResult, T as SessionStream$1, Y as StreamDataTransport, G as SessionDocumentImpl, X as StreamChunkOptions, i as ChunkReadable, P as Presence, m as DocConnector, v as RequestOptions, w as RequestStreamOptions, W as StoreOptions, V as Store, g as ChannelMultiplexer, I as SessionFailureKind, $ as TransportState } from './stream-data-DgTNv1tF.mjs';
2
- export { b as ActivationState, M as MediaChunkBinding, n as MediaChunkSource, o as MediaChunkSourceFactory, p as MediaRecorderChunkSourceOptions, q as PresenceState, r as RecordingBucket, s as RecordingLifecycle, t as RecordingStatus, B as RuntimeAvailability, F as SessionDocument, K as SessionPhaseError, U as SessionText, a3 as isPendingRecording, a4 as mediaRecorderChunkSource } from './stream-data-DgTNv1tF.mjs';
1
+ import { d as AppOptions, c as App$1, J as SessionPhase, Q as SessionStatus, N as SessionPhaseName, A as AccessTokenOptions$1, x as RuntimeArtifact, y as RuntimeArtifactDownload, R as Recording, S as Session$1, C as ChannelEndpoint, Z as TransportSession, e as AttachOptions, E as SessionDiagnostic, a as ActivationEvent, u as RecordingsAccessor, z as RuntimeArtifactsAccessor, H as SessionEndResult, T as SessionStream$1, Y as StreamDataTransport, G as SessionDocumentImpl, X as StreamChunkOptions, i as ChunkReadable, P as Presence, m as DocConnector, v as RequestOptions, w as RequestStreamOptions, W as StoreOptions, V as Store, g as ChannelMultiplexer, I as SessionFailureKind, $ as TransportState } from './stream-data-Bph8tc9M.mjs';
2
+ export { b as ActivationState, M as MediaChunkBinding, n as MediaChunkSource, o as MediaChunkSourceFactory, p as MediaRecorderChunkSourceOptions, q as PresenceState, r as RecordingBucket, s as RecordingLifecycle, t as RecordingStatus, B as RuntimeAvailability, F as SessionDocument, K as SessionPhaseError, U as SessionText, a3 as isPendingRecording, a4 as mediaRecorderChunkSource } from './stream-data-Bph8tc9M.mjs';
3
3
  import 'yjs';
4
4
  import 'y-protocols/awareness';
5
5
 
@@ -45,6 +45,16 @@ interface AccessTokenOptions {
45
45
  forceRefresh?: boolean;
46
46
  reason?: 'initial' | 'unauthorized' | 'background';
47
47
  }
48
+ interface ReleaseSessionBeaconOptions {
49
+ baseUrl: string;
50
+ requestId: string;
51
+ orgId: string;
52
+
53
+ jwt?: string;
54
+ authProvider?: string;
55
+ }
56
+
57
+ declare function releaseSessionBeacon(options: ReleaseSessionBeaconOptions): void;
48
58
  interface PrewakeOptions {
49
59
  baseUrl: string;
50
60
 
@@ -311,6 +321,8 @@ declare class Session implements Session$1 {
311
321
 
312
322
  private _recoveryHooks;
313
323
 
324
+ private _disconnectHooks;
325
+
314
326
  private _lifecycleUnsub;
315
327
 
316
328
  private _dialNegotiation;
@@ -377,6 +389,8 @@ declare class Session implements Session$1 {
377
389
 
378
390
  onRecovery(hook: () => void): () => void;
379
391
 
392
+ onDisconnect(hook: () => void): () => void;
393
+
380
394
  negotiateMediaTransport(opts?: {
381
395
  allowWebTransport?: boolean;
382
396
  }): void;
@@ -390,6 +404,8 @@ declare const FOREGROUND_COALESCE_MS = 250;
390
404
 
391
405
  declare function observePageLifecycle(onForeground: () => void): () => void;
392
406
 
407
+ declare function observePageTeardown(onTeardown: () => void): () => void;
408
+
393
409
  declare const ACTIVATION_STILL_AFTER_MS = 15000;
394
410
 
395
411
  declare const ACTIVATION_COLD_BOOT_AFTER_MS = 45000;
@@ -969,4 +985,4 @@ declare class FrameReassembler {
969
985
  private requestKeyframe;
970
986
  }
971
987
 
972
- export { ACTIVATION_COLD_BOOT_AFTER_MS, ACTIVATION_DEGRADED_AFTER_MS, ACTIVATION_HINT_PATH, ACTIVATION_STILL_AFTER_MS, ACTIVITY_DOM_EVENTS, ACTIVITY_FIELD, ACTIVITY_STAMP_MIN_INTERVAL_MS, ActivationEvent, ActivationMonitor, type ActivationMonitorOptions, type ActivationStreamLike, type ActivityAwareness, type ActivityTracker, type ActivityTrackerOptions, App, App$1 as AppInterface, AppOptions, AttachOptions, BACKOFF_BASE_MS, BACKOFF_MAX_ATTEMPTS, BACKOFF_MAX_MS, type CaptureClaim, CaptureController, type CaptureControllerOptions, type CaptureKind, CaptureUnavailableError, ChunkReadable, type ClientToken, ClientTokenError, type ConsumingTransport, type CreateClientTokenOptions, DEFAULT_DOC_SYNC_TIMEOUT_MS, DEFAULT_GATEWAY_URL, DEFAULT_PRODUCE_ACK_TIMEOUT_MS, DEFAULT_WHEN_LIVE_TIMEOUT_MS, DGRAM_HEADER_BYTES, type DgramHeader, FOREGROUND_COALESCE_MS, FrameReassembler, INPUT_PRESENCE_DEFAULT_HZ, INPUT_PRESENCE_FIELD, type InputPresenceAwareness, type InputPresencePublisher, type InputPresencePublisherOptions, type InputPresenceState, InvalidDurationError, LEGACY_ACTIVATION_HINT_PATH, type MediaSession, type NegotiatorOptions, PLATFORM_DOC_NAME, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, type PrewakeOptions, type PrewakeResult, type PrewakeStatus, ProduceAckTimeoutError, type ReassembledFrame, type ReassemblerCallbacks, type ReassemblerOptions, Recording, RecordingNotFoundError, RecordingsAccessor, RecordingsClient, type RecordingsClientOptions, RecordingsError, RecordingsUnauthorizedError, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, RetainNotTempError, type RetentionIntent, RuntimeArtifact, RuntimeArtifactDownload, RuntimeArtifactNotFoundError, RuntimeArtifactsAccessor, RuntimeArtifactsClient, type RuntimeArtifactsClientOptions, RuntimeArtifactsError, RuntimeArtifactsUnauthorizedError, Session, SessionAllocationError, SessionDiagnostic, SessionEndError, SessionEndResult, SessionEndUnavailableError, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionPhaseName, SessionStatus, SessionStream$1 as SessionStream, type SignalCarrier, type Signaling, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type TransportEstablishedNotify, TransportNegotiator, type TransportOfferRequest, type TransportOfferResponse, TransportSessionSignaling, TransportState, type VideoStreamOptions, WT_CONTROL_FRAME_MAX, WebRtcSession, WebTransportSession, type WhenLiveOptions, WtControlDecoder, type WtControlMessage, activationHintFrom, computeBackoffDelay, createActivityTracker, createClientToken, createInputPresencePublisher, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, encodeWtControlFrame, isDurationString, isRetryableSessionError, isWakingPhase, normalizeRetention, observePageLifecycle, parseDgramHeader, prewake, sessionFailureFromMediaError, sharedCaptureController, videoStream, whenLive, writeDgramHeader };
988
+ export { ACTIVATION_COLD_BOOT_AFTER_MS, ACTIVATION_DEGRADED_AFTER_MS, ACTIVATION_HINT_PATH, ACTIVATION_STILL_AFTER_MS, ACTIVITY_DOM_EVENTS, ACTIVITY_FIELD, ACTIVITY_STAMP_MIN_INTERVAL_MS, ActivationEvent, ActivationMonitor, type ActivationMonitorOptions, type ActivationStreamLike, type ActivityAwareness, type ActivityTracker, type ActivityTrackerOptions, App, App$1 as AppInterface, AppOptions, AttachOptions, BACKOFF_BASE_MS, BACKOFF_MAX_ATTEMPTS, BACKOFF_MAX_MS, type CaptureClaim, CaptureController, type CaptureControllerOptions, type CaptureKind, CaptureUnavailableError, ChunkReadable, type ClientToken, ClientTokenError, type ConsumingTransport, type CreateClientTokenOptions, DEFAULT_DOC_SYNC_TIMEOUT_MS, DEFAULT_GATEWAY_URL, DEFAULT_PRODUCE_ACK_TIMEOUT_MS, DEFAULT_WHEN_LIVE_TIMEOUT_MS, DGRAM_HEADER_BYTES, type DgramHeader, FOREGROUND_COALESCE_MS, FrameReassembler, INPUT_PRESENCE_DEFAULT_HZ, INPUT_PRESENCE_FIELD, type InputPresenceAwareness, type InputPresencePublisher, type InputPresencePublisherOptions, type InputPresenceState, InvalidDurationError, LEGACY_ACTIVATION_HINT_PATH, type MediaSession, type NegotiatorOptions, PLATFORM_DOC_NAME, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, type PrewakeOptions, type PrewakeResult, type PrewakeStatus, ProduceAckTimeoutError, type ReassembledFrame, type ReassemblerCallbacks, type ReassemblerOptions, Recording, RecordingNotFoundError, RecordingsAccessor, RecordingsClient, type RecordingsClientOptions, RecordingsError, RecordingsUnauthorizedError, type ReleaseSessionBeaconOptions, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, RetainNotTempError, type RetentionIntent, RuntimeArtifact, RuntimeArtifactDownload, RuntimeArtifactNotFoundError, RuntimeArtifactsAccessor, RuntimeArtifactsClient, type RuntimeArtifactsClientOptions, RuntimeArtifactsError, RuntimeArtifactsUnauthorizedError, Session, SessionAllocationError, SessionDiagnostic, SessionEndError, SessionEndResult, SessionEndUnavailableError, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionPhaseName, SessionStatus, SessionStream$1 as SessionStream, type SignalCarrier, type Signaling, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type TransportEstablishedNotify, TransportNegotiator, type TransportOfferRequest, type TransportOfferResponse, TransportSessionSignaling, TransportState, type VideoStreamOptions, WT_CONTROL_FRAME_MAX, WebRtcSession, WebTransportSession, type WhenLiveOptions, WtControlDecoder, type WtControlMessage, activationHintFrom, computeBackoffDelay, createActivityTracker, createClientToken, createInputPresencePublisher, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, encodeWtControlFrame, isDurationString, isRetryableSessionError, isWakingPhase, normalizeRetention, observePageLifecycle, observePageTeardown, parseDgramHeader, prewake, releaseSessionBeacon, sessionFailureFromMediaError, sharedCaptureController, videoStream, whenLive, writeDgramHeader };
@@ -1,5 +1,5 @@
1
- import { d as AppOptions, c as App$1, J as SessionPhase, Q as SessionStatus, N as SessionPhaseName, A as AccessTokenOptions$1, x as RuntimeArtifact, y as RuntimeArtifactDownload, R as Recording, S as Session$1, C as ChannelEndpoint, Z as TransportSession, e as AttachOptions, E as SessionDiagnostic, a as ActivationEvent, u as RecordingsAccessor, z as RuntimeArtifactsAccessor, H as SessionEndResult, T as SessionStream$1, Y as StreamDataTransport, G as SessionDocumentImpl, X as StreamChunkOptions, i as ChunkReadable, P as Presence, m as DocConnector, v as RequestOptions, w as RequestStreamOptions, W as StoreOptions, V as Store, g as ChannelMultiplexer, I as SessionFailureKind, $ as TransportState } from './stream-data-DgTNv1tF.js';
2
- export { b as ActivationState, M as MediaChunkBinding, n as MediaChunkSource, o as MediaChunkSourceFactory, p as MediaRecorderChunkSourceOptions, q as PresenceState, r as RecordingBucket, s as RecordingLifecycle, t as RecordingStatus, B as RuntimeAvailability, F as SessionDocument, K as SessionPhaseError, U as SessionText, a3 as isPendingRecording, a4 as mediaRecorderChunkSource } from './stream-data-DgTNv1tF.js';
1
+ import { d as AppOptions, c as App$1, J as SessionPhase, Q as SessionStatus, N as SessionPhaseName, A as AccessTokenOptions$1, x as RuntimeArtifact, y as RuntimeArtifactDownload, R as Recording, S as Session$1, C as ChannelEndpoint, Z as TransportSession, e as AttachOptions, E as SessionDiagnostic, a as ActivationEvent, u as RecordingsAccessor, z as RuntimeArtifactsAccessor, H as SessionEndResult, T as SessionStream$1, Y as StreamDataTransport, G as SessionDocumentImpl, X as StreamChunkOptions, i as ChunkReadable, P as Presence, m as DocConnector, v as RequestOptions, w as RequestStreamOptions, W as StoreOptions, V as Store, g as ChannelMultiplexer, I as SessionFailureKind, $ as TransportState } from './stream-data-Bph8tc9M.js';
2
+ export { b as ActivationState, M as MediaChunkBinding, n as MediaChunkSource, o as MediaChunkSourceFactory, p as MediaRecorderChunkSourceOptions, q as PresenceState, r as RecordingBucket, s as RecordingLifecycle, t as RecordingStatus, B as RuntimeAvailability, F as SessionDocument, K as SessionPhaseError, U as SessionText, a3 as isPendingRecording, a4 as mediaRecorderChunkSource } from './stream-data-Bph8tc9M.js';
3
3
  import 'yjs';
4
4
  import 'y-protocols/awareness';
5
5
 
@@ -45,6 +45,16 @@ interface AccessTokenOptions {
45
45
  forceRefresh?: boolean;
46
46
  reason?: 'initial' | 'unauthorized' | 'background';
47
47
  }
48
+ interface ReleaseSessionBeaconOptions {
49
+ baseUrl: string;
50
+ requestId: string;
51
+ orgId: string;
52
+
53
+ jwt?: string;
54
+ authProvider?: string;
55
+ }
56
+
57
+ declare function releaseSessionBeacon(options: ReleaseSessionBeaconOptions): void;
48
58
  interface PrewakeOptions {
49
59
  baseUrl: string;
50
60
 
@@ -311,6 +321,8 @@ declare class Session implements Session$1 {
311
321
 
312
322
  private _recoveryHooks;
313
323
 
324
+ private _disconnectHooks;
325
+
314
326
  private _lifecycleUnsub;
315
327
 
316
328
  private _dialNegotiation;
@@ -377,6 +389,8 @@ declare class Session implements Session$1 {
377
389
 
378
390
  onRecovery(hook: () => void): () => void;
379
391
 
392
+ onDisconnect(hook: () => void): () => void;
393
+
380
394
  negotiateMediaTransport(opts?: {
381
395
  allowWebTransport?: boolean;
382
396
  }): void;
@@ -390,6 +404,8 @@ declare const FOREGROUND_COALESCE_MS = 250;
390
404
 
391
405
  declare function observePageLifecycle(onForeground: () => void): () => void;
392
406
 
407
+ declare function observePageTeardown(onTeardown: () => void): () => void;
408
+
393
409
  declare const ACTIVATION_STILL_AFTER_MS = 15000;
394
410
 
395
411
  declare const ACTIVATION_COLD_BOOT_AFTER_MS = 45000;
@@ -969,4 +985,4 @@ declare class FrameReassembler {
969
985
  private requestKeyframe;
970
986
  }
971
987
 
972
- export { ACTIVATION_COLD_BOOT_AFTER_MS, ACTIVATION_DEGRADED_AFTER_MS, ACTIVATION_HINT_PATH, ACTIVATION_STILL_AFTER_MS, ACTIVITY_DOM_EVENTS, ACTIVITY_FIELD, ACTIVITY_STAMP_MIN_INTERVAL_MS, ActivationEvent, ActivationMonitor, type ActivationMonitorOptions, type ActivationStreamLike, type ActivityAwareness, type ActivityTracker, type ActivityTrackerOptions, App, App$1 as AppInterface, AppOptions, AttachOptions, BACKOFF_BASE_MS, BACKOFF_MAX_ATTEMPTS, BACKOFF_MAX_MS, type CaptureClaim, CaptureController, type CaptureControllerOptions, type CaptureKind, CaptureUnavailableError, ChunkReadable, type ClientToken, ClientTokenError, type ConsumingTransport, type CreateClientTokenOptions, DEFAULT_DOC_SYNC_TIMEOUT_MS, DEFAULT_GATEWAY_URL, DEFAULT_PRODUCE_ACK_TIMEOUT_MS, DEFAULT_WHEN_LIVE_TIMEOUT_MS, DGRAM_HEADER_BYTES, type DgramHeader, FOREGROUND_COALESCE_MS, FrameReassembler, INPUT_PRESENCE_DEFAULT_HZ, INPUT_PRESENCE_FIELD, type InputPresenceAwareness, type InputPresencePublisher, type InputPresencePublisherOptions, type InputPresenceState, InvalidDurationError, LEGACY_ACTIVATION_HINT_PATH, type MediaSession, type NegotiatorOptions, PLATFORM_DOC_NAME, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, type PrewakeOptions, type PrewakeResult, type PrewakeStatus, ProduceAckTimeoutError, type ReassembledFrame, type ReassemblerCallbacks, type ReassemblerOptions, Recording, RecordingNotFoundError, RecordingsAccessor, RecordingsClient, type RecordingsClientOptions, RecordingsError, RecordingsUnauthorizedError, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, RetainNotTempError, type RetentionIntent, RuntimeArtifact, RuntimeArtifactDownload, RuntimeArtifactNotFoundError, RuntimeArtifactsAccessor, RuntimeArtifactsClient, type RuntimeArtifactsClientOptions, RuntimeArtifactsError, RuntimeArtifactsUnauthorizedError, Session, SessionAllocationError, SessionDiagnostic, SessionEndError, SessionEndResult, SessionEndUnavailableError, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionPhaseName, SessionStatus, SessionStream$1 as SessionStream, type SignalCarrier, type Signaling, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type TransportEstablishedNotify, TransportNegotiator, type TransportOfferRequest, type TransportOfferResponse, TransportSessionSignaling, TransportState, type VideoStreamOptions, WT_CONTROL_FRAME_MAX, WebRtcSession, WebTransportSession, type WhenLiveOptions, WtControlDecoder, type WtControlMessage, activationHintFrom, computeBackoffDelay, createActivityTracker, createClientToken, createInputPresencePublisher, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, encodeWtControlFrame, isDurationString, isRetryableSessionError, isWakingPhase, normalizeRetention, observePageLifecycle, parseDgramHeader, prewake, sessionFailureFromMediaError, sharedCaptureController, videoStream, whenLive, writeDgramHeader };
988
+ export { ACTIVATION_COLD_BOOT_AFTER_MS, ACTIVATION_DEGRADED_AFTER_MS, ACTIVATION_HINT_PATH, ACTIVATION_STILL_AFTER_MS, ACTIVITY_DOM_EVENTS, ACTIVITY_FIELD, ACTIVITY_STAMP_MIN_INTERVAL_MS, ActivationEvent, ActivationMonitor, type ActivationMonitorOptions, type ActivationStreamLike, type ActivityAwareness, type ActivityTracker, type ActivityTrackerOptions, App, App$1 as AppInterface, AppOptions, AttachOptions, BACKOFF_BASE_MS, BACKOFF_MAX_ATTEMPTS, BACKOFF_MAX_MS, type CaptureClaim, CaptureController, type CaptureControllerOptions, type CaptureKind, CaptureUnavailableError, ChunkReadable, type ClientToken, ClientTokenError, type ConsumingTransport, type CreateClientTokenOptions, DEFAULT_DOC_SYNC_TIMEOUT_MS, DEFAULT_GATEWAY_URL, DEFAULT_PRODUCE_ACK_TIMEOUT_MS, DEFAULT_WHEN_LIVE_TIMEOUT_MS, DGRAM_HEADER_BYTES, type DgramHeader, FOREGROUND_COALESCE_MS, FrameReassembler, INPUT_PRESENCE_DEFAULT_HZ, INPUT_PRESENCE_FIELD, type InputPresenceAwareness, type InputPresencePublisher, type InputPresencePublisherOptions, type InputPresenceState, InvalidDurationError, LEGACY_ACTIVATION_HINT_PATH, type MediaSession, type NegotiatorOptions, PLATFORM_DOC_NAME, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, type PrewakeOptions, type PrewakeResult, type PrewakeStatus, ProduceAckTimeoutError, type ReassembledFrame, type ReassemblerCallbacks, type ReassemblerOptions, Recording, RecordingNotFoundError, RecordingsAccessor, RecordingsClient, type RecordingsClientOptions, RecordingsError, RecordingsUnauthorizedError, type ReleaseSessionBeaconOptions, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, RetainNotTempError, type RetentionIntent, RuntimeArtifact, RuntimeArtifactDownload, RuntimeArtifactNotFoundError, RuntimeArtifactsAccessor, RuntimeArtifactsClient, type RuntimeArtifactsClientOptions, RuntimeArtifactsError, RuntimeArtifactsUnauthorizedError, Session, SessionAllocationError, SessionDiagnostic, SessionEndError, SessionEndResult, SessionEndUnavailableError, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionPhaseName, SessionStatus, SessionStream$1 as SessionStream, type SignalCarrier, type Signaling, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type TransportEstablishedNotify, TransportNegotiator, type TransportOfferRequest, type TransportOfferResponse, TransportSessionSignaling, TransportState, type VideoStreamOptions, WT_CONTROL_FRAME_MAX, WebRtcSession, WebTransportSession, type WhenLiveOptions, WtControlDecoder, type WtControlMessage, activationHintFrom, computeBackoffDelay, createActivityTracker, createClientToken, createInputPresencePublisher, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, encodeWtControlFrame, isDurationString, isRetryableSessionError, isWakingPhase, normalizeRetention, observePageLifecycle, observePageTeardown, parseDgramHeader, prewake, releaseSessionBeacon, sessionFailureFromMediaError, sharedCaptureController, videoStream, whenLive, writeDgramHeader };