@urun-sh/core 0.4.2 → 0.4.3

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 m,G as r,M as t,N as n,O as a,P as s,U as p,V as c,W as l,a as e,aa as i,b as o,ba as S,ca as f,da as x,ea as C,fa as D}from"./chunk-HOQ5WCT6.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 m,G as r,M as t,N as n,O as a,P as s,U as p,V as c,W as l,a as e,aa as i,b as o,ba as S,ca as f,da as x,ea as C,fa as D}from"./chunk-SBNQYRRW.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};
@@ -188,6 +188,8 @@ interface SessionPhaseError {
188
188
  kind?: SessionFailureKind;
189
189
 
190
190
  httpStatus?: number;
191
+
192
+ retryAfterSeconds?: number;
191
193
  }
192
194
 
193
195
  interface SessionDiagnostic {
@@ -676,7 +678,11 @@ interface App {
676
678
 
677
679
  type SessionGatewayStatus = 'allocated' | 'pending' | 'queued' | 'rejected' | 'failed' | 'canceled'
678
680
 
679
- | 'redirect';
681
+ | 'redirect'
682
+
683
+ | 'waiting_for_capacity'
684
+
685
+ | (string & {});
680
686
  interface SessionGatewayResponse {
681
687
  status?: SessionGatewayStatus;
682
688
 
@@ -697,6 +703,14 @@ interface SessionGatewayResponse {
697
703
 
698
704
  runtime_reason?: string;
699
705
 
706
+ reason?: string;
707
+
708
+ decision_reason?: string;
709
+
710
+ provisioning_refusal_source?: string;
711
+
712
+ provisioning_refusal_message?: string;
713
+
700
714
  runtime_wake?: unknown;
701
715
 
702
716
  ends_at?: string;
@@ -711,7 +725,7 @@ interface SessionGatewayResponse {
711
725
 
712
726
  interface AdmissionUpdate {
713
727
 
714
- status: 'queued' | 'pending';
728
+ status: string;
715
729
 
716
730
  requestId?: string;
717
731
 
@@ -721,6 +735,14 @@ interface AdmissionUpdate {
721
735
  };
722
736
 
723
737
  runtime?: RuntimeAvailability;
738
+
739
+ reason?: string;
740
+
741
+ decisionReason?: string;
742
+
743
+ refusalSource?: string;
744
+
745
+ refusalMessage?: string;
724
746
  }
725
747
  interface AllocateSessionOptions {
726
748
  baseUrl: string;
@@ -1452,6 +1474,8 @@ declare class TransportSession {
1452
1474
 
1453
1475
  private _onStreamSeeked;
1454
1476
 
1477
+ private _reportUnknownServerStatus;
1478
+
1455
1479
  private _onStatus;
1456
1480
 
1457
1481
  private _webRtcDialHeld;
@@ -1541,19 +1565,11 @@ declare class TransportSession {
1541
1565
  private _isParkedPhase;
1542
1566
  private _setPhase;
1543
1567
 
1544
- reportAdmission(update: {
1545
- status: 'queued' | 'pending';
1546
- requestId?: string;
1547
- queue?: {
1548
- position: number;
1549
- depth: number;
1550
- };
1551
- runtime?: RuntimeAvailability;
1552
- }): void;
1568
+ reportAdmission(update: AdmissionUpdate): void;
1553
1569
 
1554
1570
  private _emitError;
1555
1571
 
1556
- reportAllocationFailure(error: Error, httpStatus?: number, code?: string): void;
1572
+ reportAllocationFailure(error: Error, httpStatus?: number, code?: string, retryAfterSeconds?: number): void;
1557
1573
  }
1558
1574
 
1559
1575
  declare class SessionDocumentImpl implements SessionDocument {
@@ -188,6 +188,8 @@ interface SessionPhaseError {
188
188
  kind?: SessionFailureKind;
189
189
 
190
190
  httpStatus?: number;
191
+
192
+ retryAfterSeconds?: number;
191
193
  }
192
194
 
193
195
  interface SessionDiagnostic {
@@ -676,7 +678,11 @@ interface App {
676
678
 
677
679
  type SessionGatewayStatus = 'allocated' | 'pending' | 'queued' | 'rejected' | 'failed' | 'canceled'
678
680
 
679
- | 'redirect';
681
+ | 'redirect'
682
+
683
+ | 'waiting_for_capacity'
684
+
685
+ | (string & {});
680
686
  interface SessionGatewayResponse {
681
687
  status?: SessionGatewayStatus;
682
688
 
@@ -697,6 +703,14 @@ interface SessionGatewayResponse {
697
703
 
698
704
  runtime_reason?: string;
699
705
 
706
+ reason?: string;
707
+
708
+ decision_reason?: string;
709
+
710
+ provisioning_refusal_source?: string;
711
+
712
+ provisioning_refusal_message?: string;
713
+
700
714
  runtime_wake?: unknown;
701
715
 
702
716
  ends_at?: string;
@@ -711,7 +725,7 @@ interface SessionGatewayResponse {
711
725
 
712
726
  interface AdmissionUpdate {
713
727
 
714
- status: 'queued' | 'pending';
728
+ status: string;
715
729
 
716
730
  requestId?: string;
717
731
 
@@ -721,6 +735,14 @@ interface AdmissionUpdate {
721
735
  };
722
736
 
723
737
  runtime?: RuntimeAvailability;
738
+
739
+ reason?: string;
740
+
741
+ decisionReason?: string;
742
+
743
+ refusalSource?: string;
744
+
745
+ refusalMessage?: string;
724
746
  }
725
747
  interface AllocateSessionOptions {
726
748
  baseUrl: string;
@@ -1452,6 +1474,8 @@ declare class TransportSession {
1452
1474
 
1453
1475
  private _onStreamSeeked;
1454
1476
 
1477
+ private _reportUnknownServerStatus;
1478
+
1455
1479
  private _onStatus;
1456
1480
 
1457
1481
  private _webRtcDialHeld;
@@ -1541,19 +1565,11 @@ declare class TransportSession {
1541
1565
  private _isParkedPhase;
1542
1566
  private _setPhase;
1543
1567
 
1544
- reportAdmission(update: {
1545
- status: 'queued' | 'pending';
1546
- requestId?: string;
1547
- queue?: {
1548
- position: number;
1549
- depth: number;
1550
- };
1551
- runtime?: RuntimeAvailability;
1552
- }): void;
1568
+ reportAdmission(update: AdmissionUpdate): void;
1553
1569
 
1554
1570
  private _emitError;
1555
1571
 
1556
- reportAllocationFailure(error: Error, httpStatus?: number, code?: string): void;
1572
+ reportAllocationFailure(error: Error, httpStatus?: number, code?: string, retryAfterSeconds?: number): void;
1557
1573
  }
1558
1574
 
1559
1575
  declare class SessionDocumentImpl implements SessionDocument {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urun-sh/core",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Core transport and channel primitives for the urun TypeScript SDK",
5
5
  "repository": {
6
6
  "type": "git",