openrtc 2.0.0-rc.3 → 2.0.0-rc.30

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.
Files changed (89) hide show
  1. package/README.md +12 -8
  2. package/dist/{DelegatingRuntimeAdapter-DqfHkjLy.d.ts → DelegatingRuntimeAdapter-BFZDC604.d.ts} +32 -8
  3. package/dist/{types-BVJr065k.d.ts → ITransport-WV6gGMnX.d.ts} +42 -3
  4. package/dist/IpcRuntimeAdapter-CJq3dRBF.d.ts +19 -0
  5. package/dist/OpenRTCShared.d.ts +250 -0
  6. package/dist/OpenRTCShared.js +1 -0
  7. package/dist/WasmBridge-5GYKXPXK.js +1 -0
  8. package/dist/{OpenRTCShared-ZQPu5LqL.d.ts → assembly-q0jRRpsc.d.ts} +50 -250
  9. package/dist/{capabilities-YSskrE8H.d.ts → capabilities-BfZi4Cd7.d.ts} +4 -0
  10. package/dist/chunk-45WBH7E3.js +1 -0
  11. package/dist/chunk-7FPG3MFF.js +2 -0
  12. package/dist/chunk-AG2F6MOB.js +1 -0
  13. package/dist/chunk-CWGKLGJZ.js +1 -0
  14. package/dist/{chunk-A3IAG6EL.js → chunk-D2OJN5S5.js} +1 -1
  15. package/dist/chunk-DUY34MGT.js +1 -0
  16. package/dist/chunk-H5R5ZXXN.js +3 -0
  17. package/dist/chunk-KJTJLLJE.js +2 -0
  18. package/dist/{chunk-7Z6N46RB.js → chunk-LRT5GEGH.js} +2 -2
  19. package/dist/chunk-NRXEG5GQ.js +1 -0
  20. package/dist/chunk-OEVPKC3W.js +1 -0
  21. package/dist/chunk-VBUDERMM.js +2 -0
  22. package/dist/chunk-VOCOZ57Q.js +2 -0
  23. package/dist/chunk-XPL7PUBW.js +2 -0
  24. package/dist/chunk-Z2WVSXPW.js +1 -0
  25. package/dist/chunk-Z6TZLF4B.js +1 -0
  26. package/dist/controlPlane-P66ZTVNW.js +2 -0
  27. package/dist/deviceEnrollment-GL4JPVGG.js +2 -0
  28. package/dist/deviceKey-SBNKLVYF.js +1 -0
  29. package/dist/deviceManagement-PHY5TIOS.js +1 -0
  30. package/dist/deviceProfile-3BEQZLJF.js +2 -0
  31. package/dist/deviceRoster-VZA3TQOR.js +1 -0
  32. package/dist/dist-FIVA6EPA.js +277 -0
  33. package/dist/index.d.ts +10 -8
  34. package/dist/index.js +1 -1
  35. package/dist/ipcFactory-B6HBECSU.js +1 -0
  36. package/dist/native.d.ts +7 -8
  37. package/dist/native.js +1 -1
  38. package/dist/openrtc-WUVUMBQY.js +2 -0
  39. package/dist/openrtc_bg.wasm +0 -0
  40. package/dist/runtime/WasmRuntimeAdapter.d.ts +4 -4
  41. package/dist/runtime/WasmRuntimeAdapter.js +1 -1
  42. package/dist/runtime/device-status.d.ts +2 -4
  43. package/dist/runtime/factories.d.ts +21 -0
  44. package/dist/runtime/factories.js +1 -0
  45. package/dist/runtime/index.d.ts +30 -78
  46. package/dist/runtime/index.js +1 -2
  47. package/dist/testing.d.ts +9 -18
  48. package/dist/testing.js +1 -1
  49. package/dist/transport/index.d.ts +2 -3
  50. package/dist/transport/index.js +1 -1
  51. package/dist/{types-DkgaCyqS.d.ts → types-DVNSd5B9.d.ts} +71 -4
  52. package/dist/{types-DNl4KHHY.d.ts → types-Di034GVQ.d.ts} +112 -16
  53. package/package.json +3 -27
  54. package/dist/IEngineBridge-BbsT8hof.d.ts +0 -17
  55. package/dist/ITransport-BsPcaov7.d.ts +0 -16
  56. package/dist/OpenRTCShared-TKAQLONA.js +0 -1
  57. package/dist/WasmBridge-2A22U7RU.js +0 -1
  58. package/dist/auth/index.d.ts +0 -78
  59. package/dist/auth/index.js +0 -1
  60. package/dist/auth/internal.d.ts +0 -4
  61. package/dist/auth/internal.js +0 -1
  62. package/dist/chunk-2QHDEGVX.js +0 -1
  63. package/dist/chunk-3USHQ7QW.js +0 -3
  64. package/dist/chunk-5LRLWIT5.js +0 -1
  65. package/dist/chunk-6TAVJ46R.js +0 -1
  66. package/dist/chunk-7H2JPCBN.js +0 -1
  67. package/dist/chunk-BXFXPIXO.js +0 -1
  68. package/dist/chunk-C7YN5MSV.js +0 -1
  69. package/dist/chunk-F2XGNLXL.js +0 -2
  70. package/dist/chunk-GW7P3D54.js +0 -1
  71. package/dist/chunk-K37WVIZL.js +0 -1
  72. package/dist/chunk-N26S7V4N.js +0 -1
  73. package/dist/chunk-N4SX7C3W.js +0 -2
  74. package/dist/chunk-NB4H5TP3.js +0 -1
  75. package/dist/chunk-NT5YHZQH.js +0 -1
  76. package/dist/chunk-PODAMIL6.js +0 -2
  77. package/dist/chunk-PRVFZI2T.js +0 -1
  78. package/dist/chunk-RD3JEGGF.js +0 -2
  79. package/dist/chunk-UEYM6WTT.js +0 -2
  80. package/dist/chunk-VK6KX433.js +0 -1
  81. package/dist/chunk-YBXGNKM7.js +0 -2
  82. package/dist/factories-LI53SFLH.js +0 -1
  83. package/dist/ipcFactory-QY44OIKA.js +0 -1
  84. package/dist/openrtc-UU4BBJLG.js +0 -2
  85. package/dist/runtime/legacy.d.ts +0 -18
  86. package/dist/runtime/legacy.js +0 -1
  87. package/dist/runtime/tauri.d.ts +0 -6
  88. package/dist/runtime/tauri.js +0 -1
  89. package/dist/tauri-Cz9n17g8.d.ts +0 -33
package/README.md CHANGED
@@ -24,8 +24,6 @@ import { OpenRTC } from 'openrtc';
24
24
 
25
25
  const rtc = OpenRTC({ apiKey: import.meta.env.VITE_OPENRTC_API_KEY });
26
26
  const cursors = await rtc.spaces.join('portfolio-cursors', {
27
- access: 'capability',
28
- identity: 'ephemeral',
29
27
  payload: 'latest-state',
30
28
  });
31
29
 
@@ -63,9 +61,19 @@ const rtc = OpenRTC({
63
61
  const devices = await rtc.devices.start({
64
62
  auth,
65
63
  autoConnect: 'online',
64
+ // Optional. Browser clients infer labels such as "Chrome on Android";
65
+ // native clients should pass the host-reported OS and user-visible name.
66
+ profile: { name: "Bryant's iPhone", platform: 'ios' },
66
67
  });
67
68
  ```
68
69
 
70
+ `profile` is presentation metadata, not device identity. OpenRTC continues to
71
+ bind enrollment and limits to its stable installation ID and device key. A
72
+ changed profile updates the existing enrollment once; it does not enroll or
73
+ bill a second device. User-assigned hardware names are not exposed by every
74
+ browser or mobile OS, so privacy-safe defaults identify the available
75
+ environment (for example `iPhone`, `Chrome on iPhone`, or `Chrome on Android`).
76
+
69
77
  Consumer apps own login UX, product authorization, IdP registration, and
70
78
  platform-attestation setup. OpenRTC owns assertion validation, device binding,
71
79
  grant issuance and refresh, revocation, budgets, metering, and abuse controls.
@@ -75,11 +83,7 @@ grant issuance and refresh, revocation, budgets, metering, and abuse controls.
75
83
  Rooms default to ephemeral membership:
76
84
 
77
85
  ```ts
78
- const room = await rtc.rooms.join('match-123', {
79
- access: 'capability',
80
- membership: 'ephemeral',
81
- maxPeers: 8,
82
- });
86
+ const room = await rtc.rooms.join('match-123');
83
87
  ```
84
88
 
85
89
  Durable membership is an advanced capability and must be enabled in the
@@ -102,7 +106,7 @@ Attestation is evaluated at device enrollment, key rotation, recovery, or risk
102
106
  escalation—not as a connection heartbeat.
103
107
 
104
108
  ```ts
105
- import { FirebaseAppCheckAttestationProvider } from '@openrtc/trust-firebase-app-check';
109
+ import { FirebaseAppCheckAttestationProvider } from 'openrtc-trust-firebase-app-check';
106
110
 
107
111
  const rtc = OpenRTC({
108
112
  apiKey,
@@ -1,6 +1,6 @@
1
- import { D as Device, n as DiscoveryMode, o as AuthMode, p as SignalingMode, i as ClientOptions, E as ExplicitFileDataSendParams, q as ISignalingBackend, j as RoomMember, R as RuntimeIdentity, r as SignalingEnvelope, h as DeviceStatusSnapshot, m as PeerSessionSnapshot, s as BackendPeerBiStream, t as BackendPeerUniStream, u as ManagedConnectionRecord, v as ResolvedPeerIdentity, w as DeviceEvent, x as DesiredPeerProjection, y as CoreClientBridgeHost, N as NativeConnectParams, z as NativeConnectResult, S as SignalingSession, F as SessionEvent, B as BackendConnectionState, L as LocalDeviceInfo, G as NativeManagedSessionStartResult, H as GrantScope } from './types-BVJr065k.js';
2
- import { R as RuntimeCapabilities } from './capabilities-YSskrE8H.js';
3
- import { A as AuthContext } from './IEngineBridge-BbsT8hof.js';
1
+ import { D as Device, h as DiscoveryMode, A as AuthMode, S as SignalingMode, g as ClientOptions, E as ExplicitFileDataSendParams, I as ISignalingBackend, L as LocalDeviceInfo, i as RoomMember, j as RuntimeIdentity, k as SignalingEnvelope, l as DeviceStatusSnapshot, d as PeerSessionSnapshot, B as BackendPeerBiStream, m as BackendPeerUniStream, M as ManagedConnectionRecord, R as ResolvedPeerIdentity, n as DeviceEvent, o as DesiredPeerProjection, p as CoreClientBridgeHost, N as NativeConnectParams, q as NativeConnectResult, r as SignalingSession, s as SessionEvent, t as BackendConnectionState, u as NativeManagedSessionStartResult, G as GrantScope } from './ITransport-WV6gGMnX.js';
2
+ import { I as IrohBrowserProtocolStore, w as IrohNamespaceDescriptor, x as IrohMutationReceipt, y as IrohDocEntry, A as AuthContext } from './types-DVNSd5B9.js';
3
+ import { R as RuntimeCapabilities } from './capabilities-BfZi4Cd7.js';
4
4
 
5
5
  interface NativeTrustToken {
6
6
  token: string;
@@ -25,7 +25,7 @@ interface WasmBridgeOptions {
25
25
  coordinationAvenueOverride?: ClientOptions['coordinationAvenueOverride'];
26
26
  platformAttestationTokenProvider?: ClientOptions['platformAttestationTokenProvider'];
27
27
  /** Internal host hint used by the provider-neutral gateway projection. */
28
- coordinationPlatformType?: 'web' | 'desktop' | 'mobile';
28
+ coordinationPlatformType?: string;
29
29
  storagePrefix?: string;
30
30
  deviceIdPersistence?: 'persistent' | 'ephemeral';
31
31
  endpointIdPersistence?: 'persistent' | 'ephemeral';
@@ -79,7 +79,7 @@ declare class WasmBridge implements ISignalingBackend {
79
79
  coordinationGateway?: ClientOptions['coordinationGateway'];
80
80
  coordinationAvenueOverride?: ClientOptions['coordinationAvenueOverride'];
81
81
  platformAttestationTokenProvider?: ClientOptions['platformAttestationTokenProvider'];
82
- coordinationPlatformType?: 'web' | 'desktop' | 'mobile';
82
+ coordinationPlatformType?: string;
83
83
  storagePrefix?: string;
84
84
  deviceIdPersistence?: 'persistent' | 'ephemeral';
85
85
  endpointIdPersistence?: 'persistent' | 'ephemeral';
@@ -96,6 +96,7 @@ declare class WasmBridge implements ISignalingBackend {
96
96
  };
97
97
  private spaceNamespaceIdPromise;
98
98
  private cachedSpaceNamespaceId;
99
+ private coordinationHostAvailability;
99
100
  private authListeners;
100
101
  private persistenceReady;
101
102
  wasmClient: any;
@@ -124,6 +125,7 @@ declare class WasmBridge implements ISignalingBackend {
124
125
  private authScopedRuntimeGeneration;
125
126
  private coreClient;
126
127
  private readonly applicationRouteEscalations;
128
+ private applicationRouteEscalationAttemptKeys;
127
129
  private applicationRouteEscalationUnsubscribe;
128
130
  private applicationRouteEscalationSubscriptionGeneration;
129
131
  private applicationRouteEscalationSubscriptionEpoch;
@@ -139,8 +141,13 @@ declare class WasmBridge implements ISignalingBackend {
139
141
  private createRandomDeviceId;
140
142
  protected resolveWebLogicalDeviceId(): string;
141
143
  private getDefaultBrowserDeviceName;
144
+ getLocalDeviceInfo(): Promise<LocalDeviceInfo>;
142
145
  private getCoordinationSignaling;
143
146
  usesCoordinationGateway(): boolean;
147
+ setCoordinationHostAvailability(input: {
148
+ available: boolean;
149
+ reason: string;
150
+ }): void;
144
151
  /** Restore the existing gateway delivery subscription after a native host resumes. */
145
152
  reconnectCoordinationAfterHostResume(): Promise<void>;
146
153
  getCoordinationNativeTrustToken(forceRefresh?: boolean): Promise<NativeTrustToken>;
@@ -150,7 +157,7 @@ declare class WasmBridge implements ISignalingBackend {
150
157
  }): () => void;
151
158
  setCoordinationLocalDeviceId(deviceId: string): void;
152
159
  /** Internal native-host hint for provider-neutral roster presentation. */
153
- setCoordinationPlatformType(platformType: 'desktop' | 'mobile'): void;
160
+ setCoordinationPlatformType(platformType: string): void;
154
161
  setCoordinationExcludedPeers(excludedPeers: string[]): Promise<void>;
155
162
  joinCoordinationRoom(roomId: string, nodeId: string, ticket: string): Promise<void>;
156
163
  leaveCoordinationRoom(roomId: string): Promise<void>;
@@ -183,6 +190,23 @@ declare class WasmBridge implements ISignalingBackend {
183
190
  userId?: string | null;
184
191
  }): Promise<void>;
185
192
  setWasmClient(client: any): void;
193
+ initializePersistentIrohProtocols(store: IrohBrowserProtocolStore): Promise<void>;
194
+ createPersistentIrohNamespace(generation: number, shareRevision: number): Promise<IrohNamespaceDescriptor>;
195
+ importPersistentIrohTicket(ticket: string, generation: number, shareRevision: number): Promise<string>;
196
+ sharePersistentIrohNamespace(namespaceId: string, writable: boolean): Promise<string>;
197
+ removePersistentIrohNamespace(namespaceId: string, generation: number, shareRevision: number): Promise<void>;
198
+ putPersistentIrohBytes(namespaceId: string, key: Uint8Array, value: Uint8Array): Promise<IrohMutationReceipt>;
199
+ setPersistentIrohHash(namespaceId: string, key: Uint8Array, contentHash: string, contentLength: number): Promise<string>;
200
+ deletePersistentIrohPrefix(namespaceId: string, prefix: Uint8Array): Promise<{
201
+ removed: number;
202
+ operationId: string;
203
+ }>;
204
+ queryPersistentIrohNamespace(namespaceId: string, keyPrefix: Uint8Array): Promise<IrohDocEntry[]>;
205
+ hydratePersistentIrohBlob(contentHash: string): Promise<void>;
206
+ acknowledgePersistentIrohOutbox(operationId: string): Promise<void>;
207
+ flushPersistentIrohProtocols(): Promise<void>;
208
+ shutdownPersistentIrohProtocols(): Promise<void>;
209
+ private requirePersistentProtocolHost;
186
210
  private warnMissingWasmOnce;
187
211
  private waitForWasmClient;
188
212
  protected normalizeDevice(raw: Record<string, any>, fallbackId?: string): Device;
@@ -336,7 +360,7 @@ declare abstract class DelegatingRuntimeAdapter implements ISignalingBackend {
336
360
  startAutoConnectOnce(userId: string, localDeviceId: string): Promise<void>;
337
361
  getEndpointTicket(): Promise<string>;
338
362
  getEndpointTicketWithToken(scope: GrantScope, maxConnections: number): Promise<string | null>;
339
- registerSessionToken(token: string, scope: GrantScope, maxConnections: number): Promise<void>;
363
+ registerSessionToken(token: string, scope: GrantScope, maxConnections: number, expiresAtMs?: number): Promise<void>;
340
364
  revokeSessionTokensByScope(scope: GrantScope): Promise<string[]>;
341
365
  openPeerBi(id: string, timeoutMs?: number): Promise<BackendPeerBiStream>;
342
366
  incoming_streams(): Promise<ReadableStream<unknown>>;
@@ -370,4 +394,4 @@ declare abstract class DelegatingRuntimeAdapter implements ISignalingBackend {
370
394
  setCoreClient(client: unknown): void;
371
395
  }
372
396
 
373
- export { DelegatingRuntimeAdapter as D, type WasmBridgeOptions as W, WasmBridge as a };
397
+ export { DelegatingRuntimeAdapter as D, WasmBridge as W, type WasmBridgeOptions as a };
@@ -77,6 +77,8 @@ interface AppLimits {
77
77
  maxPersonalDevices: number;
78
78
  }
79
79
  interface PlutoRTCConfiguration extends RTCConfiguration {
80
+ /** Keep the legacy route, carry Iroh packets, or try the carrier before fallback. */
81
+ implementation?: TransportImplementation;
80
82
  iceServers?: RTCIceServer[];
81
83
  /**
82
84
  * Populate public STUN defaults when no ICE servers are configured.
@@ -98,6 +100,7 @@ interface PlutoMoQServerCertificateHash {
98
100
  value: ArrayBuffer;
99
101
  }
100
102
  interface PlutoMoQConfiguration {
103
+ implementation?: TransportImplementation;
101
104
  relayUrl?: string;
102
105
  /** Relay JWT appended only at WebTransport connection time. Never include it in relayUrl. */
103
106
  accessToken?: string;
@@ -170,11 +173,14 @@ interface ChannelDescriptor {
170
173
  delivery?: 'reliable' | 'latest-state';
171
174
  description?: string;
172
175
  }
173
- type ProtocolName = 'iroh' | 'iroh-quic' | 'iroh-relay' | 'iroh-lan' | 'ble' | 'webrtc' | 'webrtc-lan' | 'webrtc-turn' | 'moq';
176
+ type ProtocolName = 'iroh' | 'iroh-quic' | 'iroh-relay' | 'iroh-lan' | 'iroh-webrtc' | 'iroh-moq' | 'ble' | 'webrtc' | 'webrtc-lan' | 'webrtc-turn' | 'moq';
174
177
  type ProtocolMaturity = 'stable' | 'experimental' | 'unsupported';
178
+ type TransportImplementation = 'external' | 'iroh-carrier' | 'auto';
179
+ type TransportPrivacy = 'direct' | 'relay-only';
180
+ type TransportOptimization = 'balanced' | 'lowest-latency';
175
181
  type ProtocolBaseName = 'iroh' | 'webrtc' | 'moq';
176
182
  type RouteFamily = 'iroh-path' | 'iroh-physical' | 'optional-route';
177
- type RouteImplementationKind = 'core' | 'host-installed' | 'route-adapter' | 'path-label';
183
+ type RouteImplementationKind = 'core' | 'host-installed' | 'carrier-adapter' | 'route-adapter' | 'path-label';
178
184
  /**
179
185
  * Public compatibility type. `native` and `plugin` are legacy capability
180
186
  * labels; generated route descriptors use `RouteImplementationKind`.
@@ -282,6 +288,8 @@ interface ClientOptions {
282
288
  kind: 'user' | 'space' | 'room' | 'session';
283
289
  id: string;
284
290
  };
291
+ /** @internal Raw host platform metadata used only for roster presentation. */
292
+ coordinationPlatformType?: string;
285
293
  /**
286
294
  * Supplies the provider-neutral platform-attestation token used by the
287
295
  * configured coordination control plane.
@@ -339,6 +347,12 @@ interface ClientOptions {
339
347
  webrtc?: boolean | PlutoRTCConfiguration;
340
348
  ble?: boolean | PlutoBleConfiguration;
341
349
  moq?: boolean | PlutoMoQConfiguration;
350
+ /** Hard route-eligibility policy. Relay-only fails closed. */
351
+ privacy?: TransportPrivacy;
352
+ /** Route objective applied after privacy and capability filtering. */
353
+ optimizeFor?: TransportOptimization;
354
+ /** Exact-route fallback and tie-break order. Unsupported routes are skipped. */
355
+ priority?: ProtocolName[];
342
356
  };
343
357
  transportPriority?: ProtocolName[];
344
358
  /** Subscribe to native LAN peer discovery events. */
@@ -421,6 +435,10 @@ interface PeerState {
421
435
  admissionState?: PeerAdmissionState;
422
436
  transportState?: string;
423
437
  protocolState?: string;
438
+ /** Compatibility projection of the canonical `routable` readiness facet. */
439
+ settledReady?: boolean;
440
+ readinessState?: string;
441
+ readinessReason?: string;
424
442
  webrtcState?: PeerWebRtcState;
425
443
  routable?: boolean;
426
444
  activeTransportStableId?: number | null;
@@ -671,6 +689,8 @@ interface TransportLatencySnapshot {
671
689
  iroh?: number | null;
672
690
  irohLan?: number | null;
673
691
  irohRelay?: number | null;
692
+ irohWebrtc?: number | null;
693
+ irohMoq?: number | null;
674
694
  ble?: number | null;
675
695
  moq?: number | null;
676
696
  }
@@ -823,6 +843,10 @@ interface ISignalingBackend {
823
843
  signInWithPluto?(): Promise<void>;
824
844
  signOut(): Promise<void>;
825
845
  stopAuthScopedActivity?(): Promise<void>;
846
+ setCoordinationHostAvailability?(input: {
847
+ available: boolean;
848
+ reason: string;
849
+ }): void;
826
850
  usesCoordinationGateway?(): boolean;
827
851
  joinCoordinationRoom?(roomId: string, nodeId: string, ticket: string): Promise<void>;
828
852
  leaveCoordinationRoom?(roomId: string): Promise<void>;
@@ -1080,4 +1104,19 @@ interface JoinRequest {
1080
1104
  state: 'pending' | 'accepted' | 'rejected';
1081
1105
  }
1082
1106
 
1083
- export type { AppLimits as $, ApplicationPayloadCrypto as A, BackendConnectionState as B, ConnectionOptions as C, Device as D, ExplicitFileDataSendParams as E, SessionEvent as F, NativeManagedSessionStartResult as G, GrantScope as H, IncomingStreamChannelMetadata as I, JoinRoomOptions as J, RouteDescriptor as K, LocalDeviceInfo as L, ManagedDeviceConnectOptions as M, NativeConnectParams as N, ProtocolCapability as O, ProtocolName as P, ProtocolCapabilityMap as Q, RuntimeIdentity as R, SignalingSession as S, TransportLatencySnapshot as T, ApplicationCryptoStreamTools as U, ApplicationCryptoBiStream as V, RouteFamily as W, RouteImplementationKind as X, ConnectDeviceHooks as Y, ConnectDeviceOptions as Z, ConnectDeviceResult as _, ApplicationPayloadReadinessOptions as a, SignalingOptions as a0, RoomCreationMode as a1, ScanningLoopOptions as a2, ScanningLoopHandle as a3, RuntimeBootstrapOptions as a4, RuntimeBootstrapResult as a5, ManagedApplicationRouteOptions as a6, JoinRequest as a7, SpaceTokenProvider as a8, ApplicationPayloadRouteOptions as b, ApplicationPayloadSendOptions as c, PeerState as d, PeerScope as e, PeerHealth as f, ChannelDescriptor as g, DeviceStatusSnapshot as h, ClientOptions as i, RoomMember as j, DevicePresenceStatus as k, PeerLifecycleStatus as l, PeerSessionSnapshot as m, DiscoveryMode as n, AuthMode as o, SignalingMode as p, ISignalingBackend as q, SignalingEnvelope as r, BackendPeerBiStream as s, BackendPeerUniStream as t, ManagedConnectionRecord as u, ResolvedPeerIdentity as v, DeviceEvent as w, DesiredPeerProjection as x, CoreClientBridgeHost as y, NativeConnectResult as z };
1107
+ interface ITransport {
1108
+ readonly name: string;
1109
+ readonly isReady: boolean;
1110
+ init(localNodeId: string, remoteNodeId: string, options: any): Promise<void>;
1111
+ send(data: Uint8Array): Promise<void>;
1112
+ close(): void;
1113
+ onMessage(callback: (data: Uint8Array) => void): void;
1114
+ onStateChange(callback: (state: 'connecting' | 'connected' | 'failed' | 'disconnected') => void): void;
1115
+ handleSignalingMessage?(msg: any): void;
1116
+ getSignalingHandler?(): (msg: any) => Promise<void>;
1117
+ getNativeTransport?(): any;
1118
+ getNegotiationId?(): string | null;
1119
+ getDataChannelReadyState?(): string | null;
1120
+ }
1121
+
1122
+ export type { ProtocolCapabilityMap as $, AuthMode as A, BackendPeerBiStream as B, ConnectDeviceResult as C, Device as D, ExplicitFileDataSendParams as E, ITransport as F, GrantScope as G, TransportLatencySnapshot as H, ISignalingBackend as I, PeerState as J, PeerScope as K, LocalDeviceInfo as L, ManagedConnectionRecord as M, NativeConnectParams as N, PeerHealth as O, PlutoIrohConfiguration as P, ChannelDescriptor as Q, ResolvedPeerIdentity as R, SignalingMode as S, TransportOptimization as T, IncomingStreamChannelMetadata as U, ManagedDeviceConnectOptions as V, JoinRoomOptions as W, DevicePresenceStatus as X, PeerLifecycleStatus as Y, RouteDescriptor as Z, ProtocolCapability as _, PlutoRTCConfiguration as a, ApplicationCryptoStreamTools as a0, ApplicationCryptoBiStream as a1, RouteFamily as a2, RouteImplementationKind as a3, AppLimits as a4, SignalingOptions as a5, RoomCreationMode as a6, ScanningLoopOptions as a7, ScanningLoopHandle as a8, RuntimeBootstrapOptions as a9, RuntimeBootstrapResult as aa, ManagedApplicationRouteOptions as ab, JoinRequest as ac, PlutoMoQConfiguration as b, ProtocolName as c, PeerSessionSnapshot as d, ConnectDeviceHooks as e, ConnectDeviceOptions as f, ClientOptions as g, DiscoveryMode as h, RoomMember as i, RuntimeIdentity as j, SignalingEnvelope as k, DeviceStatusSnapshot as l, BackendPeerUniStream as m, DeviceEvent as n, DesiredPeerProjection as o, CoreClientBridgeHost as p, NativeConnectResult as q, SignalingSession as r, SessionEvent as s, BackendConnectionState as t, NativeManagedSessionStartResult as u, ConnectionOptions as v, ApplicationPayloadCrypto as w, ApplicationPayloadReadinessOptions as x, ApplicationPayloadRouteOptions as y, ApplicationPayloadSendOptions as z };
@@ -0,0 +1,19 @@
1
+ import { g as ClientOptions } from './ITransport-WV6gGMnX.js';
2
+ import { a as WasmBridgeOptions, D as DelegatingRuntimeAdapter } from './DelegatingRuntimeAdapter-BFZDC604.js';
3
+ import { P as PlutoIpcBridge } from './ipc-CflAVodw.js';
4
+
5
+ interface NativeIpcBridgeOptions extends WasmBridgeOptions {
6
+ allowWasmFallback?: boolean;
7
+ ipcBridge?: PlutoIpcBridge;
8
+ transports?: ClientOptions['transports'];
9
+ strictMode?: boolean;
10
+ }
11
+
12
+ interface IpcRuntimeAdapterOptions extends NativeIpcBridgeOptions {
13
+ bridge: PlutoIpcBridge;
14
+ }
15
+ declare class IpcRuntimeAdapter extends DelegatingRuntimeAdapter {
16
+ constructor(options: IpcRuntimeAdapterOptions);
17
+ }
18
+
19
+ export { IpcRuntimeAdapter as I, type IpcRuntimeAdapterOptions as a };
@@ -0,0 +1,250 @@
1
+ import { R as RuntimePolicySnapshot, P as PeerReconciliationStats, a as RuntimeClient, b as PlutoRuntimeAssembly } from './assembly-q0jRRpsc.js';
2
+ import { d as PeerSessionSnapshot, R as ResolvedPeerIdentity, C as ConnectDeviceResult, e as ConnectDeviceHooks, f as ConnectDeviceOptions, G as GrantScope } from './ITransport-WV6gGMnX.js';
3
+ import { a as RuntimePeerState, b as RuntimePeerConnectOptions, C as Connection, c as RuntimePeerReadinessSnapshot, d as RuntimePeerHealth, R as RuntimeChannelDescriptor, e as RuntimePeerStreamOptions, f as RuntimeIncomingStream, g as RuntimeScopedChannelOptions, h as RuntimeDevice, i as RuntimeScopedLogicalChannel, j as RuntimeConnectionStateSnapshot, k as RuntimeApplicationPayloadReadinessOptions, l as RuntimeConnectionEvent, m as RuntimeManagedSessionOptions, n as RuntimeManagedSession, o as RuntimeDeviceStatusSnapshot, p as RuntimeDeviceConnectOptions, q as RuntimeLocalDeviceInfo, r as RuntimeLocalDeviceProfile, s as RuntimeRawConnection, t as RuntimeJoinRoomOptions, u as RuntimeRoomMember, A as AuthContext, v as RuntimeClientOptions } from './types-DVNSd5B9.js';
4
+ import { R as RuntimeCapabilities, a as RuntimeCapabilityProfile } from './capabilities-BfZi4Cd7.js';
5
+
6
+ type OpenRTCChannelConnectOptions = Omit<RuntimeScopedChannelOptions, 'scope' | 'deviceId' | 'ticket'> & {
7
+ /**
8
+ * Device selected from `client.devices.*`. Passing the device object lets
9
+ * OpenRTC reuse its current ticket for native and ticket-gated routes.
10
+ */
11
+ device?: string | RuntimeDevice;
12
+ deviceId?: string | null;
13
+ ticket?: string;
14
+ /**
15
+ * Logical channel lifecycle scope. Most app channels should use the default
16
+ * `session`; pass a custom scope only when you intentionally manage peer
17
+ * lifecycle separately from the channel.
18
+ */
19
+ scope?: RuntimeScopedChannelOptions['scope'];
20
+ };
21
+ type OpenRTCDeviceSessionOptions = Omit<RuntimeManagedSessionOptions, 'platform'> & {
22
+ /**
23
+ * Runtime host for the managed user-device session. Normal apps can omit
24
+ * this: `OpenRTC(...)` defaults to `web`, and `OpenRTC.native(...)` defaults
25
+ * to `native`.
26
+ */
27
+ platform?: RuntimeManagedSessionOptions['platform'];
28
+ };
29
+ interface OpenRTCDeviceNamespace {
30
+ startSession(options?: OpenRTCDeviceSessionOptions): Promise<RuntimeManagedSession>;
31
+ stopSession(options?: {
32
+ preserveBackendSession?: boolean;
33
+ }): Promise<void>;
34
+ list(): Promise<RuntimeDevice[]>;
35
+ listWithStatus(): Promise<RuntimeDeviceStatusSnapshot[]>;
36
+ watch(callback: (devices: RuntimeDevice[]) => void): () => void;
37
+ watchWithStatus(callback: (devices: RuntimeDeviceStatusSnapshot[]) => void): () => void;
38
+ connect(device: string | RuntimeDevice, options?: RuntimeDeviceConnectOptions): Promise<ConnectDeviceResult>;
39
+ /**
40
+ * @deprecated Use `devices.connect()`. Retry and route recovery are owned by
41
+ * OpenRTC; legacy consumer-provided connection hooks are ignored.
42
+ */
43
+ connectWithRetry(device: string | RuntimeDevice, hooks: ConnectDeviceHooks, options: ConnectDeviceOptions): Promise<ConnectDeviceResult>;
44
+ disconnect(deviceId: string): Promise<void>;
45
+ update(deviceId: string, updates: {
46
+ deviceName?: string;
47
+ capabilities?: RuntimeDevice['capabilities'];
48
+ metadata?: string;
49
+ }): Promise<void>;
50
+ delete(deviceId: string): Promise<void>;
51
+ localId(): Promise<string | null>;
52
+ localInfo(): Promise<RuntimeLocalDeviceInfo | null>;
53
+ localProfile(options?: {
54
+ deviceName?: string;
55
+ localDeviceId?: string | null;
56
+ platform?: 'native' | 'web';
57
+ userId?: string | null;
58
+ }): Promise<RuntimeLocalDeviceProfile>;
59
+ updateLocalName(deviceName: string): Promise<RuntimeLocalDeviceInfo | null>;
60
+ }
61
+ interface OpenRTCPeerNamespace {
62
+ watch(callback: (peers: RuntimePeerState[]) => void): () => void;
63
+ watchLifecycle(callback: (peers: RuntimePeerState[]) => void): () => void;
64
+ get(id: string): RuntimePeerState | undefined;
65
+ listConnected(): RuntimePeerState[];
66
+ connect(options: RuntimePeerConnectOptions): Promise<Connection>;
67
+ disconnect(id: string, scope?: string): Promise<void>;
68
+ forceDisconnect(id: string): Promise<void>;
69
+ session(id: string): Promise<PeerSessionSnapshot | null>;
70
+ sessions(): Promise<PeerSessionSnapshot[]>;
71
+ waitConnected(id: string, timeoutMs?: number): Promise<PeerSessionSnapshot | null>;
72
+ readiness(id: string, timeoutMs?: number): Promise<RuntimePeerReadinessSnapshot>;
73
+ health(id: string): Promise<RuntimePeerHealth>;
74
+ identity(id: string): Promise<ResolvedPeerIdentity>;
75
+ addScope(id: string, scope?: string): RuntimePeerState | undefined;
76
+ releaseScope(id: string, scope?: string): RuntimePeerState | undefined;
77
+ scopes(id: string): string[];
78
+ refresh(): Promise<RuntimePeerState[]>;
79
+ }
80
+ interface OpenRTCChannelNamespace {
81
+ register(descriptor: RuntimeChannelDescriptor): void;
82
+ unregister(channelId: string): void;
83
+ list(): RuntimeChannelDescriptor[];
84
+ openBi(id: string, channelId: string, options?: Omit<RuntimePeerStreamOptions, 'channelId'>): Promise<{
85
+ connection: Connection;
86
+ readable: ReadableStream<Uint8Array>;
87
+ writable: WritableStream<Uint8Array>;
88
+ }>;
89
+ openUni(id: string, channelId: string, options?: Omit<RuntimePeerStreamOptions, 'channelId'>): Promise<{
90
+ connection: Connection;
91
+ writable: WritableStream<Uint8Array>;
92
+ }>;
93
+ onIncoming(callback: (stream: RuntimeIncomingStream) => boolean | void): () => void;
94
+ onIncomingChannel(channelId: string, callback: (stream: RuntimeIncomingStream & {
95
+ channel: NonNullable<RuntimeIncomingStream['channel']>;
96
+ }) => boolean | void): () => void;
97
+ connect(options: OpenRTCChannelConnectOptions): Promise<RuntimeScopedLogicalChannel>;
98
+ connectScoped(options: RuntimeScopedChannelOptions): Promise<RuntimeScopedLogicalChannel>;
99
+ }
100
+ interface OpenRTCRoomNamespace {
101
+ create(roomId?: string): Promise<string>;
102
+ join(roomId: string, options?: RuntimeJoinRoomOptions): Promise<Connection[]>;
103
+ leave(roomId: string): Promise<void>;
104
+ watch(roomId: string, callback: (members: RuntimeRoomMember[]) => void): () => void;
105
+ members(roomId: string): Promise<RuntimeRoomMember[]>;
106
+ }
107
+ interface OpenRTCTicketNamespace {
108
+ raw(): Promise<string>;
109
+ share(options?: {
110
+ maxConnections?: number;
111
+ }): Promise<string>;
112
+ grant(scope: GrantScope, options?: {
113
+ maxConnections?: number;
114
+ }): Promise<string>;
115
+ revoke(scope: GrantScope): Promise<string[]>;
116
+ }
117
+ interface OpenRTCDiagnosticsNamespace {
118
+ status(): Promise<{
119
+ runtime: 'tauri' | 'browser' | 'unknown';
120
+ wasmLoaded: boolean;
121
+ localNodeId?: string;
122
+ userId?: string;
123
+ }>;
124
+ policy(): RuntimePolicySnapshot;
125
+ capabilities(): RuntimeCapabilities;
126
+ capabilityProfile(): RuntimeCapabilityProfile;
127
+ connectionStates(): Promise<RuntimeConnectionStateSnapshot[]>;
128
+ onConnectionStateChange(callback: (state: RuntimeConnectionStateSnapshot) => void): Promise<() => void> | (() => void);
129
+ connections(): Connection[];
130
+ applicationReadyConnections(options?: RuntimeApplicationPayloadReadinessOptions): Connection[];
131
+ onConnection(callback: (connection: Connection) => void): () => void;
132
+ onDisconnection(callback: (connection: Connection) => void): () => void;
133
+ onConnectionEvent(callback: (event: RuntimeConnectionEvent) => void): () => void;
134
+ forceReconnectSnapshot(): void;
135
+ peerReconciliation(): Readonly<PeerReconciliationStats>;
136
+ }
137
+ interface OpenRTCAdvancedNamespace {
138
+ readonly runtime: RuntimeClient;
139
+ readonly assembly: PlutoRuntimeAssembly;
140
+ nodeId(): Promise<string>;
141
+ nodeIdFromTicket(ticket: string): Promise<string | null>;
142
+ endpointTicket(): Promise<string>;
143
+ connectRaw(target: {
144
+ ticket: string;
145
+ timeoutMs?: number;
146
+ }): Promise<RuntimeRawConnection>;
147
+ openBi(nodeId: string): Promise<{
148
+ readable: ReadableStream<Uint8Array>;
149
+ writable: WritableStream<Uint8Array>;
150
+ }>;
151
+ openUni(nodeId: string): Promise<WritableStream<Uint8Array>>;
152
+ isConnected(nodeId: string): Promise<boolean>;
153
+ disconnectNode(nodeId: string): Promise<void>;
154
+ setAutoConnectExcluded(deviceId: string, excluded: boolean): Promise<void>;
155
+ notifyNetworkChange(reason?: string): Promise<void>;
156
+ }
157
+ /**
158
+ * OpenRTCClient extends RuntimeClient with auth helpers that were
159
+ * previously only available on PlutoRuntimeAssembly.
160
+ *
161
+ * This is the unified type returned by OpenRTC() and OpenRTC.native().
162
+ */
163
+ interface OpenRTCClient extends RuntimeClient {
164
+ readonly devices: OpenRTCDeviceNamespace;
165
+ readonly peers: OpenRTCPeerNamespace;
166
+ readonly channels: OpenRTCChannelNamespace;
167
+ readonly rooms: OpenRTCRoomNamespace;
168
+ readonly tickets: OpenRTCTicketNamespace;
169
+ readonly diagnostics: OpenRTCDiagnosticsNamespace;
170
+ readonly advanced: OpenRTCAdvancedNamespace;
171
+ /** @deprecated Use setAuth() instead */
172
+ setAuthContext(context: AuthContext | null): Promise<void>;
173
+ /** Set auth context for the runtime */
174
+ setAuth(context: AuthContext | null): Promise<void>;
175
+ /** Sync Pluto-hosted auth to the runtime */
176
+ syncPlutoAuth(options?: {
177
+ userId?: string | null;
178
+ forceRefresh?: boolean;
179
+ }): Promise<void>;
180
+ /** Bind Pluto auth host to auto-sync on token changes */
181
+ bindPlutoAuthHost(): () => void;
182
+ /** Sign in via Pluto SSO */
183
+ signIn(): Promise<void>;
184
+ /** Sign out and clear auth context */
185
+ signOut(): Promise<void>;
186
+ /**
187
+ * @deprecated Use `client.devices.startSession(...)` for the public
188
+ * user-device avenue lifecycle. This top-level method remains for
189
+ * RuntimeClient compatibility and advanced integrations.
190
+ */
191
+ startManagedSession(options: RuntimeManagedSessionOptions): Promise<RuntimeManagedSession>;
192
+ /**
193
+ * @deprecated Use `client.devices.stopSession(...)` for the public
194
+ * user-device avenue lifecycle.
195
+ */
196
+ stopManagedSession(options?: {
197
+ preserveBackendSession?: boolean;
198
+ }): Promise<void>;
199
+ /** @deprecated Use `client.rooms.create(...)`. */
200
+ createRoom(roomId?: string): Promise<string>;
201
+ /** @deprecated Use `client.rooms.join(...)`. */
202
+ joinRoom(roomId: string, options?: RuntimeJoinRoomOptions): Promise<Connection[]>;
203
+ /** @deprecated Use `client.rooms.leave(...)`. */
204
+ leaveRoom(roomId: string): Promise<void>;
205
+ /** @deprecated Use `client.rooms.watch(...)`. */
206
+ watchRoom(roomId: string, callback: (members: RuntimeRoomMember[]) => void): () => void;
207
+ /** @deprecated Use `client.rooms.members(...)`. */
208
+ getRoomMembers(roomId: string): Promise<RuntimeRoomMember[]>;
209
+ /** @deprecated Use `client.tickets.raw(...)`. */
210
+ getInvite(): Promise<string>;
211
+ /** @deprecated Use `client.tickets.raw(...)`. */
212
+ getTicket(): Promise<string>;
213
+ /** @deprecated Use `client.tickets.share(...)` or `client.tickets.grant(...)`. */
214
+ getTicketWithToken(scope: GrantScope, maxConnections?: number): Promise<string>;
215
+ /** @deprecated Use `client.tickets.revoke(...)`. */
216
+ revokeTokensByScope(scope: GrantScope): Promise<string[]>;
217
+ /** @deprecated Use `client.peers.connect(...)`. */
218
+ connectPeer(options: RuntimePeerConnectOptions): Promise<Connection>;
219
+ /** @deprecated Use `client.peers.connect(...)`. */
220
+ connectTo(options: RuntimePeerConnectOptions): Promise<Connection>;
221
+ /** @deprecated Use `client.peers.waitConnected(...)`. */
222
+ waitForConnectedPeer(id: string, timeoutMs?: number): Promise<PeerSessionSnapshot | null>;
223
+ /** @deprecated Use `client.channels.connect(...)`; use `client.channels.connectScoped(...)` only for custom lifecycle scopes. */
224
+ connectScopedChannel(options: RuntimeScopedChannelOptions): Promise<RuntimeScopedLogicalChannel>;
225
+ /** @deprecated Use `client.channels.openBi(...)`. */
226
+ openPeerBi(id: string, options?: RuntimePeerStreamOptions): Promise<{
227
+ connection: Connection;
228
+ readable: ReadableStream<Uint8Array>;
229
+ writable: WritableStream<Uint8Array>;
230
+ }>;
231
+ /** @deprecated Use `client.channels.openUni(...)`. */
232
+ openPeerUni(id: string, options?: RuntimePeerStreamOptions): Promise<{
233
+ connection: Connection;
234
+ writable: WritableStream<Uint8Array>;
235
+ }>;
236
+ /**
237
+ * Access to the underlying PlutoRuntimeAssembly for backward compatibility.
238
+ * @deprecated Access methods directly on the client instead.
239
+ */
240
+ readonly runtime: RuntimeClient;
241
+ /**
242
+ * Access to the underlying PlutoRuntimeAssembly for backward compatibility.
243
+ * @internal
244
+ */
245
+ readonly _assembly: PlutoRuntimeAssembly;
246
+ }
247
+ declare function resolveOptions(options: RuntimeClientOptions): RuntimeClientOptions;
248
+ declare function wrapAssembly(assembly: PlutoRuntimeAssembly, defaultManagedSessionPlatform: RuntimeManagedSessionOptions['platform']): OpenRTCClient;
249
+
250
+ export { type OpenRTCAdvancedNamespace, type OpenRTCChannelConnectOptions, type OpenRTCChannelNamespace, type OpenRTCClient, type OpenRTCDeviceNamespace, type OpenRTCDeviceSessionOptions, type OpenRTCDiagnosticsNamespace, type OpenRTCPeerNamespace, type OpenRTCRoomNamespace, type OpenRTCTicketNamespace, resolveOptions, wrapAssembly };
@@ -0,0 +1 @@
1
+ import {n}from'./chunk-KJTJLLJE.js';import'./chunk-45WBH7E3.js';import'./chunk-NRXEG5GQ.js';function O(i){let s=n({...i});if("auth"in i&&!i.authMode){let n=i.auth;s.authMode=n==="none"?"anonymous":n;}if("identity"in i){let n=i.identity,r=n==="temporary"?"ephemeral":n;!i.deviceIdPersistence&&!i.nodeIdPersistence&&(s.deviceIdPersistence=r),!i.endpointIdPersistence&&!i.nodeIdPersistence&&(s.endpointIdPersistence=r);}return "namespace"in i&&!i.storagePrefix&&(s.storagePrefix=i.namespace),"privacy"in i&&i.strictMode===void 0&&(s.strictMode=!!i.privacy),s}function I(i,s){let n=i.runtime,r=Object.create(n),l=async e=>{if(typeof e!="string")return e;let o=(await n.listDevices()).find(c=>c.deviceId===e);if(!o)throw new Error(`OpenRTC device '${e}' is not currently discoverable.`);return o},u=async e=>({...e,localDeviceId:e?.localDeviceId??await n.getLocalDeviceId()??""}),R=async e=>{let{device:t,scope:o,...c}=e,a=c.deviceId??(typeof t=="string"?t:t?.deviceId)??null,m=c.ticket??(typeof t=="string"?void 0:t?.ticket);a&&!m&&(m=(await l(a).catch(()=>null))?.ticket);let d={...c,scope:o??"session"};return a&&(d.deviceId=a),m&&(d.ticket=m),d},g={list:()=>n.listDevices(),startSession:(e={})=>n.startManagedSession({...e,platform:e.platform??s}),stopSession:e=>n.stopManagedSession(e),listWithStatus:()=>n.listDevicesWithStatus(),watch:e=>n.watchDevices(e),watchWithStatus:e=>n.watchDevicesWithStatus(e),connect:async(e,t)=>n.connectDevice(await l(e),await u(t)),connectWithRetry:async(e,t,o)=>n.connectDeviceWithRetry(await l(e),t,o),disconnect:e=>n.disconnectDevice(e),update:(e,t)=>n.updateDevice(e,t),delete:e=>n.deleteDevice(e),localId:()=>n.getLocalDeviceId(),localInfo:()=>n.getLocalDeviceInfo(),localProfile:e=>n.getLocalDeviceProfile(e),updateLocalName:e=>n.updateLocalDeviceName(e)},v={watch:e=>n.watchPeerStates(e),watchLifecycle:e=>n.watchPeerLifecycle(e),get:e=>n.getPeerState(e),listConnected:()=>n.listConnectedPeers(),connect:e=>n.connectPeer(e),disconnect:(e,t)=>n.disconnectPeer(e,t),forceDisconnect:e=>n.forceDisconnectPeer(e),session:e=>n.getPeerSession(e),sessions:()=>n.listPeerSessions(),waitConnected:(e,t)=>n.waitForConnectedPeer(e,t),readiness:(e,t)=>n.getPeerReadiness(e,t),health:e=>n.getPeerHealth(e),identity:e=>n.resolvePeerIdentity(e),addScope:(e,t)=>n.addPeerScope(e,t),releaseScope:(e,t)=>n.releasePeerScope(e,t),scopes:e=>n.getPeerScopes(e),refresh:()=>n.refreshPeerSnapshot()},C={register:e=>n.registerChannel(e),unregister:e=>n.unregisterChannel(e),list:()=>n.listChannels(),openBi:(e,t,o)=>n.openPeerBi(e,{...o,channelId:t}),openUni:(e,t,o)=>n.openPeerUni(e,{...o,channelId:t}),onIncoming:e=>n.onIncomingStream(e),onIncomingChannel:(e,t)=>n.onIncomingChannelStream(e,o=>{if(o.channel)return t(o)}),connect:async e=>n.connectScopedChannel(await R(e)),connectScoped:e=>n.connectScopedChannel(e)},P={create:e=>n.createRoom(e),join:(e,t)=>n.joinRoom(e,t),leave:e=>n.leaveRoom(e),watch:(e,t)=>n.watchRoom(e,t),members:e=>n.getRoomMembers(e)},h={raw:()=>n.getInvite(),share:e=>n.getTicketWithToken("share",e?.maxConnections??1),grant:(e,t)=>n.getTicketWithToken(e,t?.maxConnections??0),revoke:e=>n.revokeTokensByScope(e)},S={status:()=>n.getRuntimeStatus(),policy:()=>n.getRuntimePolicy(),capabilities:()=>n.getRuntimeCapabilities(),capabilityProfile:()=>n.getCapabilityProfile(),connectionStates:()=>n.getConnectionStates(),onConnectionStateChange:e=>n.onConnectionStateChange(e),connections:()=>n.getConnections(),applicationReadyConnections:e=>n.getApplicationReadyConnections(e),onConnection:e=>n.onConnection(e),onDisconnection:e=>n.onDisconnection(e),onConnectionEvent:e=>n.onConnectionEvent(e),forceReconnectSnapshot:()=>n.forceReconnectSnapshot(),peerReconciliation:()=>n.getPeerReconciliationStats()},b={runtime:n,assembly:i,nodeId:()=>n.getNodeId(),nodeIdFromTicket:e=>n.getNodeIdFromTicket(e),endpointTicket:()=>n.getEndpointTicket(),connectRaw:e=>n.connectRaw(e),openBi:e=>n.openBi(e),openUni:e=>n.openUni(e),isConnected:e=>n.isConnected(e),disconnectNode:e=>n.disconnectNode(e),setAutoConnectExcluded:(e,t)=>n.setAutoConnectExcluded(e,t),notifyNetworkChange:e=>n.notifyNetworkChange(e)};return Object.defineProperties(r,{devices:{get:()=>g,enumerable:true},peers:{get:()=>v,enumerable:true},channels:{get:()=>C,enumerable:true},rooms:{get:()=>P,enumerable:true},tickets:{get:()=>h,enumerable:true},diagnostics:{get:()=>S,enumerable:true},advanced:{get:()=>b,enumerable:true},setAuth:{value:e=>i.setAuthContext(e),enumerable:true,writable:true,configurable:true},setAuthContext:{value:e=>i.setAuthContext(e),enumerable:true,writable:true,configurable:true},syncPlutoAuth:{value:e=>i.syncPlutoAuth(e),enumerable:true,writable:true,configurable:true},bindPlutoAuthHost:{value:()=>i.bindPlutoAuthHost(),enumerable:true,writable:true,configurable:true},signIn:{value:()=>i.signInWithPluto(),enumerable:true,writable:true,configurable:true},signOut:{value:()=>i.signOut(),enumerable:true,writable:true,configurable:true},runtime:{get:()=>n,enumerable:false},_assembly:{get:()=>i,enumerable:false}}),r}export{O as resolveOptions,I as wrapAssembly};
@@ -0,0 +1 @@
1
+ export{y as WasmBridge}from'./chunk-VOCOZ57Q.js';import'./chunk-AG2F6MOB.js';import'./chunk-CWGKLGJZ.js';import'./chunk-KJTJLLJE.js';import'./chunk-45WBH7E3.js';import'./chunk-NRXEG5GQ.js';