@tangle-network/sandbox 0.15.3-develop.20260730072338.a009cdc → 0.15.3-develop.20260731071553.b437581

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.
@@ -60,6 +60,12 @@ interface ServerMessageBase {
60
60
  /** Monotonic per-session sequence number for consumers to detect gaps. */
61
61
  seq?: number;
62
62
  }
63
+ type RuntimeUnavailableReason = "container_mismatch" | "incarnation_transitioning" | "project_provisioning" | "project_degraded" | "project_suspended" | "project_failed" | "project_deprovisioning" | "project_restarting" | "sidecar_starting" | "sidecar_stopped" | "sidecar_suspended";
64
+ interface RuntimeUnavailableData {
65
+ sandboxId: string;
66
+ sessionId: string;
67
+ reason: RuntimeUnavailableReason;
68
+ }
63
69
  /**
64
70
  * Message types sent by the server.
65
71
  */
@@ -93,6 +99,9 @@ type ServerMessage = (ServerMessageBase & {
93
99
  error?: string;
94
100
  reason?: string;
95
101
  };
102
+ }) | (ServerMessageBase & {
103
+ type: "runtime.unavailable";
104
+ data: RuntimeUnavailableData;
96
105
  }) | (ServerMessageBase & {
97
106
  type: "runtime.reconnecting";
98
107
  data: {
@@ -269,6 +278,7 @@ interface SessionGatewayEventHandlers {
269
278
  onReconnect?: () => void;
270
279
  onRuntimeConnected?: (sandboxId: string, baseUrl: string) => void;
271
280
  onRuntimeDisconnected?: (sandboxId: string, error?: string) => void;
281
+ onRuntimeUnavailable?: (data: RuntimeUnavailableData) => void;
272
282
  onRuntimeNotFound?: (sessionId: string, containerId: string | undefined, reason: string) => void;
273
283
  onRuntimeReady?: (data: {
274
284
  sandboxId: string;
@@ -502,4 +512,4 @@ declare class SessionGatewayClient {
502
512
  private saveReplayState;
503
513
  }
504
514
  //#endregion
505
- export { type ClientMessage, type ConnectionMetrics, type ConnectionQuality, type ConnectionState, INITIAL_METRICS, type NormalizedServerMessage, type PortEventData, type ReplayOptions, type ReplayState, type ReplayStateStorage, type ServerMessage, SessionGatewayClient, type SessionGatewayClientConfig, type SessionGatewayEventHandlers, type SessionGatewayStats, type SubscriptionAcknowledgement, type SubscriptionDenial, type TokenRefreshResult, type TransportMode, calculateConnectionQuality };
515
+ export { type ClientMessage, type ConnectionMetrics, type ConnectionQuality, type ConnectionState, INITIAL_METRICS, type NormalizedServerMessage, type PortEventData, type ReplayOptions, type ReplayState, type ReplayStateStorage, type RuntimeUnavailableData, type RuntimeUnavailableReason, type ServerMessage, SessionGatewayClient, type SessionGatewayClientConfig, type SessionGatewayEventHandlers, type SessionGatewayStats, type SubscriptionAcknowledgement, type SubscriptionDenial, type TokenRefreshResult, type TransportMode, calculateConnectionQuality };
@@ -614,6 +614,9 @@ var SessionGatewayClient = class {
614
614
  case "runtime.disconnected":
615
615
  this.handlers.onRuntimeDisconnected?.(message.data.sandboxId, message.data.error);
616
616
  break;
617
+ case "runtime.unavailable":
618
+ this.handlers.onRuntimeUnavailable?.(message.data);
619
+ break;
617
620
  case "runtime.not_found":
618
621
  this.handlers.onRuntimeNotFound?.(message.data.sessionId, message.data.containerId, message.data.reason);
619
622
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox",
3
- "version": "0.15.3-develop.20260730072338.a009cdc",
3
+ "version": "0.15.3-develop.20260731071553.b437581",
4
4
  "description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",