@urun-sh/core 0.5.1 → 0.5.2

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{H as r,N as t,O as n,P as a,Q as s,V as p,W as c,X as l,a as e,aa as m,b as o,ba as i,ca as S,da as f,ea as x,fa as C,ga as D}from"./chunk-NTMFUGAJ.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{H as r,N as t,O as n,P as a,Q as s,V as p,W as c,X as l,a as e,aa as m,b as o,ba as i,ca as S,da as f,ea as x,fa as C,ga as D}from"./chunk-R33J74SA.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};
@@ -79,6 +79,8 @@ interface DocConnection {
79
79
 
80
80
  onConnectionState?(handler: (state: DocConnectionState) => void): () => void;
81
81
 
82
+ disconnect?(): void;
83
+
82
84
  destroy(): void;
83
85
  }
84
86
 
@@ -419,6 +421,10 @@ interface SessionDocument {
419
421
  onSynced(handler: () => void): () => void;
420
422
 
421
423
  onConnectionState?(handler: (state: DocConnectionState) => void): () => void;
424
+
425
+ disconnect?(): void;
426
+
427
+ reconnect?(): void;
422
428
  }
423
429
 
424
430
  interface SessionStream {
@@ -494,6 +500,8 @@ interface Session {
494
500
 
495
501
  touch(): void;
496
502
 
503
+ activity?(): void;
504
+
497
505
  request(payload: unknown, options?: RequestOptions): Promise<unknown>;
498
506
 
499
507
  requestStream(payload: unknown, options?: RequestStreamOptions): AsyncIterable<string>;
@@ -667,13 +675,19 @@ interface AttachOptions {
667
675
  authProvider?: string;
668
676
 
669
677
  functionsUrl?: string;
678
+
679
+ activity?: ActivitySignalMode;
670
680
  }
671
681
 
682
+ type ActivitySignalMode = 'auto' | 'explicit';
683
+
672
684
  interface StartSessionOptions {
673
685
 
674
686
  sessionId?: string;
675
687
 
676
688
  label?: string;
689
+
690
+ activity?: ActivitySignalMode;
677
691
  }
678
692
 
679
693
  interface App {
@@ -1609,6 +1623,10 @@ declare class SessionDocumentImpl implements SessionDocument {
1609
1623
 
1610
1624
  ensureConnected(): void;
1611
1625
 
1626
+ reconnect(): void;
1627
+
1628
+ disconnect(): void;
1629
+
1612
1630
  onConnectionState(handler: (state: DocConnectionState) => void): () => void;
1613
1631
 
1614
1632
  onSynced(handler: () => void): () => void;
@@ -1675,4 +1693,4 @@ interface DataChannelTransport {
1675
1693
 
1676
1694
  declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
1677
1695
 
1678
- 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, encodeWtControlFrame 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 TransportOfferResponse as aA, TransportSession as aB, type TransportSessionOptions as aC, TransportSessionSignaling as aD, type TransportState as aE, type VideoPlayoutOptions as aF, WT_CONTROL_FRAME_MAX as aG, WT_DATA_STREAM_VERSION as aH, type WatchGenerationTickOptions as aI, type WtAudioLaneSeam as aJ, type WtAudioUplinkSeam as aK, WtControlDecoder as aL, type WtControlMessage as aM, type WtDataEnvelope as aN, type WtDataLaneSink as aO, WtDataStreamParser as aP, WtDataUplinkSender as aQ, type WtVideoUplinkSeam as aR, allocateSession as aS, consumeWtDataStreams as aT, createPresence as aU, createWebsocketDocConnector as aV, decodeStreamEnvelope as aW, deriveYjsServerUrl as aX, derivedLegName as aY, derivedLegRole as aZ, encodeStreamEnvelope as a_, type Session as aa, type SessionDiagnostic as ab, type SessionDirectoryRequestOptions as ac, type SessionDocument as ad, SessionDocumentImpl as ae, type SessionEndResult as af, type SessionFailureKind as ag, type SessionPhase as ah, type SessionPhaseError as ai, type SessionPhaseName as aj, type SessionStartOptions as ak, type SessionStatsOptions as al, type SessionStatsSample as am, type SessionStatus as an, type SessionStream as ao, type SessionText as ap, type SignalCarrier as aq, type Signaling as ar, type StartSessionOptions as as, type Store as at, type StoreOptions as au, type StreamChunkOptions as av, type StreamDataTransport as aw, type TransportEstablishedNotify as ax, TransportNegotiator as ay, type TransportOfferRequest as az, type ActivationEvent as b, isPendingRecording as b0, mediaRecorderChunkSource as b1, parseDgramHeader as b2, prewake as b3, releaseSessionBeacon as b4, streamDataLabel as b5, transportStreamData as b6, watchGenerationTick as b7, writeDgramHeader as b8, 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 };
1696
+ export { type ReleaseSessionBeaconOptions as $, type AccessTokenOptions$1 as A, type GenerationTick as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSource as E, type MediaChunkSourceFactory as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaRecorderChunkSourceOptions as H, type InboundStatsSample as I, type MediaSession as J, type NegotiatorOptions as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type PathLiveness as O, type PathHealthReporting as P, type Presence as Q, type PresenceState as R, type PrewakeOptions as S, type PrewakeResult as T, type PrewakeStatus as U, type QuicStreamDataTransport as V, type Recording as W, type RecordingBucket as X, type RecordingLifecycle as Y, type RecordingStatus as Z, type RecordingsAccessor as _, type AccessTokenOptions as a, encodeStreamEnvelope as a$, type RequestOptions as a0, type RequestStreamOptions as a1, type RuntimeArtifact as a2, type RuntimeArtifactDownload as a3, type RuntimeArtifactsAccessor as a4, type RuntimeAvailability as a5, type RuntimeWakeDetail as a6, type RuntimeWakeGolden as a7, type RuntimeWakeReasonCode as a8, SIGNALING_PROTOCOL_VERSION as a9, type TransportOfferRequest as aA, type TransportOfferResponse as aB, TransportSession as aC, type TransportSessionOptions as aD, TransportSessionSignaling as aE, type TransportState as aF, type VideoPlayoutOptions as aG, WT_CONTROL_FRAME_MAX as aH, WT_DATA_STREAM_VERSION as aI, type WatchGenerationTickOptions as aJ, type WtAudioLaneSeam as aK, type WtAudioUplinkSeam as aL, WtControlDecoder as aM, type WtControlMessage as aN, type WtDataEnvelope as aO, type WtDataLaneSink as aP, WtDataStreamParser as aQ, WtDataUplinkSender as aR, type WtVideoUplinkSeam as aS, allocateSession as aT, consumeWtDataStreams as aU, createPresence as aV, createWebsocketDocConnector as aW, decodeStreamEnvelope as aX, deriveYjsServerUrl as aY, derivedLegName as aZ, derivedLegRole as a_, STREAM_END as aa, type Session as ab, type SessionDiagnostic as ac, type SessionDirectoryRequestOptions as ad, type SessionDocument as ae, SessionDocumentImpl as af, type SessionEndResult as ag, type SessionFailureKind as ah, type SessionPhase as ai, type SessionPhaseError as aj, type SessionPhaseName as ak, type SessionStartOptions as al, type SessionStatsOptions as am, type SessionStatsSample as an, type SessionStatus as ao, type SessionStream as ap, type SessionText as aq, type SignalCarrier as ar, type Signaling as as, type StartSessionOptions as at, type Store as au, type StoreOptions as av, type StreamChunkOptions as aw, type StreamDataTransport as ax, type TransportEstablishedNotify as ay, TransportNegotiator as az, type ActivationEvent as b, encodeWtControlFrame as b0, isPendingRecording as b1, mediaRecorderChunkSource as b2, parseDgramHeader as b3, prewake as b4, releaseSessionBeacon as b5, streamDataLabel as b6, transportStreamData as b7, watchGenerationTick as b8, writeDgramHeader as b9, type ActivationState as c, type ActivitySignalMode as d, type AllocateSessionOptions as e, type AllocatedSession as f, type App as g, type AppOptions as h, type AttachOptions as i, type AudioPlayoutOptions as j, type ChannelMessage as k, ChannelMultiplexer as l, type ChannelName as m, type ChunkReadable as n, DGRAM_HEADER_BYTES as o, DOC_SYNC_WIRE_CONTRACT_VERSION as p, DeferredChannelMultiplexer as q, DeferredDocConnector as r, type DerivedLegRole as s, type DgramHeader as t, type DocConnection as u, type DocConnectionState as v, type DocConnector as w, type DocServerUrlResolver as x, type DocTokenSupplier as y, GENERATION_TICK_MAX_EXTRAPOLATION_MS as z };
@@ -79,6 +79,8 @@ interface DocConnection {
79
79
 
80
80
  onConnectionState?(handler: (state: DocConnectionState) => void): () => void;
81
81
 
82
+ disconnect?(): void;
83
+
82
84
  destroy(): void;
83
85
  }
84
86
 
@@ -419,6 +421,10 @@ interface SessionDocument {
419
421
  onSynced(handler: () => void): () => void;
420
422
 
421
423
  onConnectionState?(handler: (state: DocConnectionState) => void): () => void;
424
+
425
+ disconnect?(): void;
426
+
427
+ reconnect?(): void;
422
428
  }
423
429
 
424
430
  interface SessionStream {
@@ -494,6 +500,8 @@ interface Session {
494
500
 
495
501
  touch(): void;
496
502
 
503
+ activity?(): void;
504
+
497
505
  request(payload: unknown, options?: RequestOptions): Promise<unknown>;
498
506
 
499
507
  requestStream(payload: unknown, options?: RequestStreamOptions): AsyncIterable<string>;
@@ -667,13 +675,19 @@ interface AttachOptions {
667
675
  authProvider?: string;
668
676
 
669
677
  functionsUrl?: string;
678
+
679
+ activity?: ActivitySignalMode;
670
680
  }
671
681
 
682
+ type ActivitySignalMode = 'auto' | 'explicit';
683
+
672
684
  interface StartSessionOptions {
673
685
 
674
686
  sessionId?: string;
675
687
 
676
688
  label?: string;
689
+
690
+ activity?: ActivitySignalMode;
677
691
  }
678
692
 
679
693
  interface App {
@@ -1609,6 +1623,10 @@ declare class SessionDocumentImpl implements SessionDocument {
1609
1623
 
1610
1624
  ensureConnected(): void;
1611
1625
 
1626
+ reconnect(): void;
1627
+
1628
+ disconnect(): void;
1629
+
1612
1630
  onConnectionState(handler: (state: DocConnectionState) => void): () => void;
1613
1631
 
1614
1632
  onSynced(handler: () => void): () => void;
@@ -1675,4 +1693,4 @@ interface DataChannelTransport {
1675
1693
 
1676
1694
  declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
1677
1695
 
1678
- 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, encodeWtControlFrame 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 TransportOfferResponse as aA, TransportSession as aB, type TransportSessionOptions as aC, TransportSessionSignaling as aD, type TransportState as aE, type VideoPlayoutOptions as aF, WT_CONTROL_FRAME_MAX as aG, WT_DATA_STREAM_VERSION as aH, type WatchGenerationTickOptions as aI, type WtAudioLaneSeam as aJ, type WtAudioUplinkSeam as aK, WtControlDecoder as aL, type WtControlMessage as aM, type WtDataEnvelope as aN, type WtDataLaneSink as aO, WtDataStreamParser as aP, WtDataUplinkSender as aQ, type WtVideoUplinkSeam as aR, allocateSession as aS, consumeWtDataStreams as aT, createPresence as aU, createWebsocketDocConnector as aV, decodeStreamEnvelope as aW, deriveYjsServerUrl as aX, derivedLegName as aY, derivedLegRole as aZ, encodeStreamEnvelope as a_, type Session as aa, type SessionDiagnostic as ab, type SessionDirectoryRequestOptions as ac, type SessionDocument as ad, SessionDocumentImpl as ae, type SessionEndResult as af, type SessionFailureKind as ag, type SessionPhase as ah, type SessionPhaseError as ai, type SessionPhaseName as aj, type SessionStartOptions as ak, type SessionStatsOptions as al, type SessionStatsSample as am, type SessionStatus as an, type SessionStream as ao, type SessionText as ap, type SignalCarrier as aq, type Signaling as ar, type StartSessionOptions as as, type Store as at, type StoreOptions as au, type StreamChunkOptions as av, type StreamDataTransport as aw, type TransportEstablishedNotify as ax, TransportNegotiator as ay, type TransportOfferRequest as az, type ActivationEvent as b, isPendingRecording as b0, mediaRecorderChunkSource as b1, parseDgramHeader as b2, prewake as b3, releaseSessionBeacon as b4, streamDataLabel as b5, transportStreamData as b6, watchGenerationTick as b7, writeDgramHeader as b8, 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 };
1696
+ export { type ReleaseSessionBeaconOptions as $, type AccessTokenOptions$1 as A, type GenerationTick as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSource as E, type MediaChunkSourceFactory as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaRecorderChunkSourceOptions as H, type InboundStatsSample as I, type MediaSession as J, type NegotiatorOptions as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type PathLiveness as O, type PathHealthReporting as P, type Presence as Q, type PresenceState as R, type PrewakeOptions as S, type PrewakeResult as T, type PrewakeStatus as U, type QuicStreamDataTransport as V, type Recording as W, type RecordingBucket as X, type RecordingLifecycle as Y, type RecordingStatus as Z, type RecordingsAccessor as _, type AccessTokenOptions as a, encodeStreamEnvelope as a$, type RequestOptions as a0, type RequestStreamOptions as a1, type RuntimeArtifact as a2, type RuntimeArtifactDownload as a3, type RuntimeArtifactsAccessor as a4, type RuntimeAvailability as a5, type RuntimeWakeDetail as a6, type RuntimeWakeGolden as a7, type RuntimeWakeReasonCode as a8, SIGNALING_PROTOCOL_VERSION as a9, type TransportOfferRequest as aA, type TransportOfferResponse as aB, TransportSession as aC, type TransportSessionOptions as aD, TransportSessionSignaling as aE, type TransportState as aF, type VideoPlayoutOptions as aG, WT_CONTROL_FRAME_MAX as aH, WT_DATA_STREAM_VERSION as aI, type WatchGenerationTickOptions as aJ, type WtAudioLaneSeam as aK, type WtAudioUplinkSeam as aL, WtControlDecoder as aM, type WtControlMessage as aN, type WtDataEnvelope as aO, type WtDataLaneSink as aP, WtDataStreamParser as aQ, WtDataUplinkSender as aR, type WtVideoUplinkSeam as aS, allocateSession as aT, consumeWtDataStreams as aU, createPresence as aV, createWebsocketDocConnector as aW, decodeStreamEnvelope as aX, deriveYjsServerUrl as aY, derivedLegName as aZ, derivedLegRole as a_, STREAM_END as aa, type Session as ab, type SessionDiagnostic as ac, type SessionDirectoryRequestOptions as ad, type SessionDocument as ae, SessionDocumentImpl as af, type SessionEndResult as ag, type SessionFailureKind as ah, type SessionPhase as ai, type SessionPhaseError as aj, type SessionPhaseName as ak, type SessionStartOptions as al, type SessionStatsOptions as am, type SessionStatsSample as an, type SessionStatus as ao, type SessionStream as ap, type SessionText as aq, type SignalCarrier as ar, type Signaling as as, type StartSessionOptions as at, type Store as au, type StoreOptions as av, type StreamChunkOptions as aw, type StreamDataTransport as ax, type TransportEstablishedNotify as ay, TransportNegotiator as az, type ActivationEvent as b, encodeWtControlFrame as b0, isPendingRecording as b1, mediaRecorderChunkSource as b2, parseDgramHeader as b3, prewake as b4, releaseSessionBeacon as b5, streamDataLabel as b6, transportStreamData as b7, watchGenerationTick as b8, writeDgramHeader as b9, type ActivationState as c, type ActivitySignalMode as d, type AllocateSessionOptions as e, type AllocatedSession as f, type App as g, type AppOptions as h, type AttachOptions as i, type AudioPlayoutOptions as j, type ChannelMessage as k, ChannelMultiplexer as l, type ChannelName as m, type ChunkReadable as n, DGRAM_HEADER_BYTES as o, DOC_SYNC_WIRE_CONTRACT_VERSION as p, DeferredChannelMultiplexer as q, DeferredDocConnector as r, type DerivedLegRole as s, type DgramHeader as t, type DocConnection as u, type DocConnectionState as v, type DocConnector as w, type DocServerUrlResolver as x, type DocTokenSupplier as y, GENERATION_TICK_MAX_EXTRAPOLATION_MS as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urun-sh/core",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Core transport and channel primitives for the urun TypeScript SDK",
5
5
  "repository": {
6
6
  "type": "git",