openrtc 1.0.4 → 1.0.6

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 (45) hide show
  1. package/README.md +12 -4
  2. package/dist/{DelegatingRuntimeAdapter-D2_dgabz.d.ts → DelegatingRuntimeAdapter-DlC0TZB0.d.ts} +3 -102
  3. package/dist/DelegatingRuntimeAdapter-lFDUNBy9.d.ts +120 -0
  4. package/dist/OpenRTCShared-BvTf2gFH.d.ts +249 -0
  5. package/dist/{framing-rPdckqn5.d.ts → assembly-BH-ZekkH.d.ts} +4 -46
  6. package/dist/assembly-C2G0P2L5.d.ts +718 -0
  7. package/dist/auth/index.js +1 -1
  8. package/dist/auth/internal.js +1 -1
  9. package/dist/capabilities-C4Dqs_pB.d.ts +101 -0
  10. package/dist/chunk-4AXAWVC6.js +2 -0
  11. package/dist/chunk-7352ZIXN.js +3 -0
  12. package/dist/chunk-DI5IPRPM.js +2 -0
  13. package/dist/{chunk-34LATQZZ.js → chunk-HVTYSEU7.js} +1 -1
  14. package/dist/chunk-MNI6JGR2.js +1 -0
  15. package/dist/{chunk-RRCARL4S.js → chunk-N6UBUNGC.js} +1 -1
  16. package/dist/chunk-SJ5BFL6W.js +2 -0
  17. package/dist/chunk-WUREK3SW.js +1 -0
  18. package/dist/chunk-YTUWXCRO.js +1 -0
  19. package/dist/framing-zRvEKOld.d.ts +29 -0
  20. package/dist/index.d.ts +18 -308
  21. package/dist/index.js +1 -2
  22. package/dist/ipc-CflAVodw.d.ts +11 -0
  23. package/dist/native.d.ts +20 -0
  24. package/dist/native.js +1 -0
  25. package/dist/runtime/WasmRuntimeAdapter.d.ts +3 -2
  26. package/dist/runtime/WasmRuntimeAdapter.js +1 -1
  27. package/dist/runtime/device-status.d.ts +37 -2
  28. package/dist/runtime/index.d.ts +28 -11
  29. package/dist/runtime/index.js +1 -1
  30. package/dist/runtime/tauri.d.ts +5 -19
  31. package/dist/runtime/tauri.js +1 -1
  32. package/dist/spaceTokens-3sbs1mUF.d.ts +297 -0
  33. package/dist/tauri-BVSxK0jq.d.ts +33 -0
  34. package/dist/tauri-WEvOC_Z6.d.ts +33 -0
  35. package/dist/transport/index.d.ts +2 -2
  36. package/dist/{types-ByZyADCn.d.ts → types-BCkKK8dy.d.ts} +1 -1
  37. package/dist/{device-status-CR27Ak7c.d.ts → types-N9s66nF8.d.ts} +3 -36
  38. package/dist/types-QMj23Nvm.d.ts +573 -0
  39. package/dist/types-ZDsZknDI.d.ts +937 -0
  40. package/package.json +7 -2
  41. package/dist/IpcRuntimeAdapter-B8rkqNrq.d.ts +0 -28
  42. package/dist/chunk-BGQX25BO.js +0 -1
  43. package/dist/chunk-L6OUJ6YN.js +0 -2
  44. package/dist/chunk-MESPJTUA.js +0 -1
  45. package/dist/chunk-NCRP5ODV.js +0 -3
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Pure byte / stream / timing helpers.
3
+ *
4
+ * Extracted from the `Client` god object (see
5
+ * `docs/plans/client-ts-decomposition.md` Phase 1). These functions are
6
+ * deliberately pure — no `Client` state, no `this`, no logging side effects — so
7
+ * the same helper is reused everywhere instead of being re-implemented inline
8
+ * (e.g. `concatBytes` previously existed both here and in `applicationCrypto.ts`,
9
+ * and three near-identical exponential-backoff helpers existed across the class).
10
+ */
11
+
12
+ type ByteArray = Uint8Array<ArrayBuffer>;
13
+ type ByteArrayLike = Uint8Array<ArrayBufferLike>;
14
+
15
+ type RuntimeU32BEFrameHandler = (payload: ByteArray) => void;
16
+ type RuntimeJsonFrameHandler<T = unknown> = (value: T, payload: ByteArray) => void;
17
+ interface RuntimeJsonFrameDecoderOptions {
18
+ onInvalidJson?: (error: unknown, payload: ByteArray) => void;
19
+ }
20
+ declare function encodeRuntimeU32BEFrame(payload: ByteArrayLike): ByteArray;
21
+ declare function createRuntimeU32BEFrameDecoder(onFrame: RuntimeU32BEFrameHandler): (chunk: ByteArrayLike) => void;
22
+ declare function encodeRuntimeJsonPayload(value: unknown): ByteArray;
23
+ declare function decodeRuntimeJsonPayload<T = unknown>(payload: ByteArrayLike): T;
24
+ declare function encodeRuntimeJsonFrame(value: unknown): ByteArray;
25
+ declare function createRuntimeJsonFrameDecoder<T = unknown>(onValue: RuntimeJsonFrameHandler<T>, options?: RuntimeJsonFrameDecoderOptions): (chunk: ByteArrayLike) => void;
26
+ declare function concatRuntimeBytes(a: ByteArrayLike, b: ByteArrayLike): ByteArray;
27
+ declare function readRuntimeU32BE(bytes: ByteArrayLike, offset: number): number;
28
+
29
+ export { type RuntimeJsonFrameHandler as R, type RuntimeU32BEFrameHandler as a, createRuntimeU32BEFrameDecoder as b, createRuntimeJsonFrameDecoder as c, decodeRuntimeJsonPayload as d, encodeRuntimeJsonFrame as e, encodeRuntimeJsonPayload as f, encodeRuntimeU32BEFrame as g, type RuntimeJsonFrameDecoderOptions as h, concatRuntimeBytes as i, readRuntimeU32BE as r };
package/dist/index.d.ts CHANGED
@@ -1,269 +1,27 @@
1
- import { R as RuntimeClient, a as RuntimePolicySnapshot, P as PeerReconciliationStats, b as PlutoRuntimeAssembly } from './framing-rPdckqn5.js';
2
- export { O as OPENRTC_RUNTIME_POLICY, c as RuntimeJsonFrameHandler, d as RuntimeU32BEFrameHandler, S as ScopedSession, e as Session, f as SessionOptions, g as createRuntimeJsonFrameDecoder, h as createRuntimeU32BEFrameDecoder, i as decodeRuntimeJsonPayload, j as encodeRuntimeJsonFrame, k as encodeRuntimeJsonPayload, l as encodeRuntimeU32BEFrame, m as getRuntimePolicy } from './framing-rPdckqn5.js';
3
- import { l as ConnectDeviceResult, m as ConnectDeviceHooks, n as ConnectDeviceOptions, P as PeerSessionSnapshot, c as ResolvedPeerIdentity, G as GrantScope, o as ProtocolName, p as ProtocolCapability, q as ProtocolCapabilityMap, r as ApplicationPayloadCrypto, s as ApplicationCryptoStreamTools, t as SpaceTokenProvider } from './types-ByZyADCn.js';
4
- export { u as AppLimits, v as ApplicationCryptoBiStream, w as ApplicationPayloadReadinessOptions, x as ApplicationPayloadRouteOptions, y as ApplicationPayloadSendOptions, A as AuthMode, z as DevicePresenceStatus, D as DiscoveryMode, F as ProtocolBaseName, H as ProtocolImplementationKind, J as ProtocolLocality, K as RouteDescriptor, O as RouteFamily, Q as RouteImplementationKind, S as SignalingMode, T as SpaceAuthMode } from './types-ByZyADCn.js';
5
- import { A as AuthContext } from './IEngineBridge-C7OT2CRv.js';
6
- import { R as RuntimeClientOptions, a as RuntimeManagedSessionOptions, b as RuntimeManagedSession, c as RuntimeDevice, d as RuntimeDeviceStatusSnapshot, e as RuntimeDeviceConnectOptions, f as RuntimeLocalDeviceInfo, g as RuntimeLocalDeviceProfile, h as RuntimePeerState, i as RuntimePeerConnectOptions, C as Connection, j as RuntimePeerReadinessSnapshot, k as RuntimePeerHealth, l as RuntimeChannelDescriptor, m as RuntimePeerStreamOptions, n as RuntimeIncomingStream, o as RuntimeScopedChannelOptions, p as RuntimeScopedLogicalChannel, q as RuntimeJoinRoomOptions, r as RuntimeRoomMember, s as RuntimeConnectionStateSnapshot, t as RuntimeApplicationPayloadReadinessOptions, u as RuntimeConnectionEvent, v as RuntimeRawConnection, I as ITransport } from './device-status-CR27Ak7c.js';
7
- export { w as ChannelDescriptor, x as ConnectionEvent, y as ConnectionTarget, D as DeviceProfile, z as IncomingStream, P as PeerConnectOptions, A as PeerReadiness, B as PeerStreamOptions, E as PresenceLoopOptions, F as RawConnection, G as RuntimeAuthContext, H as RuntimeAuthIdentity, J as RuntimeAutoConnectPolicy, K as RuntimeConnectionTarget, L as RuntimeDevicePresenceStatus, M as RuntimeDeviceStatus, N as RuntimeLogicalChannelFraming, O as RuntimeManagedSessionKind, Q as RuntimeManagedSessionPlatform, S as RuntimePeerLifecycleStatus, T as RuntimePeerScope, U as RuntimePeerSessionSnapshot, V as RuntimePresenceLoopOptions, W as RuntimePresencePolicy, X as RuntimeSession, Y as RuntimeUiConnectionStatus, Z as ScopedChannelOptions, _ as ScopedLogicalChannel, $ as isRuntimeDeviceActive, a0 as isRuntimeDeviceConnectable, a1 as isRuntimeDeviceRoutable } from './device-status-CR27Ak7c.js';
8
- import { P as PlutoIpcBridge } from './IpcRuntimeAdapter-B8rkqNrq.js';
9
- import { R as RuntimeCapabilities, a as RuntimeCapabilityProfile } from './DelegatingRuntimeAdapter-D2_dgabz.js';
10
- export { b as RuntimeAdapterKind } from './DelegatingRuntimeAdapter-D2_dgabz.js';
1
+ import { R as RuntimeClientOptions, I as ITransport } from './types-N9s66nF8.js';
2
+ export { w as ChannelDescriptor, x as ConnectionEvent, y as ConnectionTarget, D as DeviceProfile, z as IncomingStream, P as PeerConnectOptions, A as PeerReadiness, B as PeerStreamOptions, E as PresenceLoopOptions, F as RawConnection, t as RuntimeApplicationPayloadReadinessOptions, G as RuntimeAuthContext, H as RuntimeAuthIdentity, J as RuntimeAutoConnectPolicy, l as RuntimeChannelDescriptor, u as RuntimeConnectionEvent, s as RuntimeConnectionStateSnapshot, K as RuntimeConnectionTarget, c as RuntimeDevice, e as RuntimeDeviceConnectOptions, L as RuntimeDevicePresenceStatus, M as RuntimeDeviceStatus, d as RuntimeDeviceStatusSnapshot, n as RuntimeIncomingStream, q as RuntimeJoinRoomOptions, f as RuntimeLocalDeviceInfo, g as RuntimeLocalDeviceProfile, N as RuntimeLogicalChannelFraming, b as RuntimeManagedSession, O as RuntimeManagedSessionKind, a as RuntimeManagedSessionOptions, Q as RuntimeManagedSessionPlatform, i as RuntimePeerConnectOptions, k as RuntimePeerHealth, S as RuntimePeerLifecycleStatus, j as RuntimePeerReadinessSnapshot, T as RuntimePeerScope, U as RuntimePeerSessionSnapshot, h as RuntimePeerState, m as RuntimePeerStreamOptions, V as RuntimePresenceLoopOptions, W as RuntimePresencePolicy, v as RuntimeRawConnection, r as RuntimeRoomMember, o as RuntimeScopedChannelOptions, p as RuntimeScopedLogicalChannel, X as RuntimeSession, Y as RuntimeUiConnectionStatus, Z as ScopedChannelOptions, _ as ScopedLogicalChannel } from './types-N9s66nF8.js';
3
+ import { P as PlutoIpcBridge } from './ipc-CflAVodw.js';
4
+ import { O as OpenRTCClient } from './spaceTokens-3sbs1mUF.js';
5
+ export { E as EnableSpaceAuthResponse, M as MintSpaceTokenRequest, a as MintSpaceTokenResponse, b as OpenRTCChannelConnectOptions, c as OpenRTCDeviceNamespace, d as OpenRTCDeviceSessionOptions, e as OpenRTCRoomNamespace, f as OpenRTCTicketNamespace, g as createPublicSpaceTokenProvider, h as createSpaceTokenProvider, i as enableSpaceAuth, m as mintSpaceToken, s as sandboxSpaceKey, j as spaceToken } from './spaceTokens-3sbs1mUF.js';
6
+ import { u as ProtocolName, U as ProtocolCapability, V as ProtocolCapabilityMap, r as ApplicationPayloadCrypto, W as ApplicationCryptoStreamTools } from './types-ZDsZknDI.js';
7
+ export { X as AppLimits, Y as ApplicationCryptoBiStream, s as ApplicationPayloadReadinessOptions, t as ApplicationPayloadRouteOptions, v as ApplicationPayloadSendOptions, A as AuthMode, O as DevicePresenceStatus, D as DiscoveryMode, G as GrantScope, Z as ProtocolBaseName, _ as ProtocolImplementationKind, $ as ProtocolLocality, a0 as RouteDescriptor, a1 as RouteFamily, a2 as RouteImplementationKind, d as SignalingMode, S as SpaceAuthMode, a as SpaceTokenProvider } from './types-ZDsZknDI.js';
11
8
  export { ROUTE_DESCRIPTORS, TRANSPORT_LABELS, getRouteDescriptor, isDirectIrohTransportLabel, isIndependentTransportLabel, isIrohBaseTransportLabel, isOptionalTransportLabel, isWebRtcTransportLabel, listRouteDescriptors, normalizeTransportLabel } from './transport/index.js';
12
- import './runtime/WasmRuntimeAdapter.js';
9
+ export { isRuntimeDeviceActive, isRuntimeDeviceConnectable, isRuntimeDeviceRoutable } from './runtime/device-status.js';
10
+ export { R as RuntimeJsonFrameHandler, a as RuntimeU32BEFrameHandler, c as createRuntimeJsonFrameDecoder, b as createRuntimeU32BEFrameDecoder, d as decodeRuntimeJsonPayload, e as encodeRuntimeJsonFrame, f as encodeRuntimeJsonPayload, g as encodeRuntimeU32BEFrame } from './framing-zRvEKOld.js';
11
+ export { O as OPENRTC_RUNTIME_POLICY, a as RuntimePolicySnapshot, S as ScopedSession, c as Session, d as SessionOptions, g as getRuntimePolicy } from './assembly-C2G0P2L5.js';
12
+ export { b as RuntimeAdapterKind, R as RuntimeCapabilities } from './capabilities-C4Dqs_pB.js';
13
+ import './IEngineBridge-C7OT2CRv.js';
13
14
 
14
- type OpenRTCChannelConnectOptions = Omit<RuntimeScopedChannelOptions, 'scope' | 'deviceId' | 'ticket'> & {
15
- /**
16
- * Device selected from `client.devices.*`. Passing the device object lets
17
- * OpenRTC reuse its current ticket for native and ticket-gated routes.
18
- */
19
- device?: string | RuntimeDevice;
20
- deviceId?: string | null;
21
- ticket?: string;
22
- /**
23
- * Logical channel lifecycle scope. Most app channels should use the default
24
- * `session`; pass a custom scope only when you intentionally manage peer
25
- * lifecycle separately from the channel.
26
- */
27
- scope?: RuntimeScopedChannelOptions['scope'];
28
- };
29
- type OpenRTCDeviceSessionOptions = Omit<RuntimeManagedSessionOptions, 'platform'> & {
30
- /**
31
- * Runtime host for the managed user-device session. Normal apps can omit
32
- * this: `OpenRTC(...)` defaults to `web`, and `OpenRTC.native(...)` defaults
33
- * to `native`.
34
- */
35
- platform?: RuntimeManagedSessionOptions['platform'];
36
- };
37
- interface OpenRTCDeviceNamespace {
38
- startSession(options?: OpenRTCDeviceSessionOptions): Promise<RuntimeManagedSession>;
39
- stopSession(options?: {
40
- preserveBackendSession?: boolean;
41
- }): Promise<void>;
42
- list(): Promise<RuntimeDevice[]>;
43
- listWithStatus(): Promise<RuntimeDeviceStatusSnapshot[]>;
44
- watch(callback: (devices: RuntimeDevice[]) => void): () => void;
45
- watchWithStatus(callback: (devices: RuntimeDeviceStatusSnapshot[]) => void): () => void;
46
- connect(device: string | RuntimeDevice, options?: RuntimeDeviceConnectOptions): Promise<ConnectDeviceResult>;
47
- /**
48
- * @deprecated Use `devices.connect()`. Retry and route recovery are owned by
49
- * OpenRTC; legacy consumer-provided connection hooks are ignored.
50
- */
51
- connectWithRetry(device: string | RuntimeDevice, hooks: ConnectDeviceHooks, options: ConnectDeviceOptions): Promise<ConnectDeviceResult>;
52
- disconnect(deviceId: string): Promise<void>;
53
- update(deviceId: string, updates: {
54
- deviceName?: string;
55
- capabilities?: RuntimeDevice['capabilities'];
56
- metadata?: string;
57
- }): Promise<void>;
58
- delete(deviceId: string): Promise<void>;
59
- localId(): Promise<string | null>;
60
- localInfo(): Promise<RuntimeLocalDeviceInfo | null>;
61
- localProfile(options?: {
62
- deviceName?: string;
63
- localDeviceId?: string | null;
64
- platform?: 'native' | 'web';
65
- userId?: string | null;
66
- }): Promise<RuntimeLocalDeviceProfile>;
67
- updateLocalName(deviceName: string): Promise<RuntimeLocalDeviceInfo | null>;
68
- }
69
- interface OpenRTCPeerNamespace {
70
- watch(callback: (peers: RuntimePeerState[]) => void): () => void;
71
- watchLifecycle(callback: (peers: RuntimePeerState[]) => void): () => void;
72
- get(id: string): RuntimePeerState | undefined;
73
- listConnected(): RuntimePeerState[];
74
- connect(options: RuntimePeerConnectOptions): Promise<Connection>;
75
- disconnect(id: string, scope?: string): Promise<void>;
76
- forceDisconnect(id: string): Promise<void>;
77
- session(id: string): Promise<PeerSessionSnapshot | null>;
78
- sessions(): Promise<PeerSessionSnapshot[]>;
79
- waitConnected(id: string, timeoutMs?: number): Promise<PeerSessionSnapshot | null>;
80
- readiness(id: string, timeoutMs?: number): Promise<RuntimePeerReadinessSnapshot>;
81
- health(id: string): Promise<RuntimePeerHealth>;
82
- identity(id: string): Promise<ResolvedPeerIdentity>;
83
- addScope(id: string, scope?: string): RuntimePeerState | undefined;
84
- releaseScope(id: string, scope?: string): RuntimePeerState | undefined;
85
- scopes(id: string): string[];
86
- refresh(): Promise<RuntimePeerState[]>;
87
- }
88
- interface OpenRTCChannelNamespace {
89
- register(descriptor: RuntimeChannelDescriptor): void;
90
- unregister(channelId: string): void;
91
- list(): RuntimeChannelDescriptor[];
92
- openBi(id: string, channelId: string, options?: Omit<RuntimePeerStreamOptions, 'channelId'>): Promise<{
93
- connection: Connection;
94
- readable: ReadableStream<Uint8Array>;
95
- writable: WritableStream<Uint8Array>;
96
- }>;
97
- openUni(id: string, channelId: string, options?: Omit<RuntimePeerStreamOptions, 'channelId'>): Promise<{
98
- connection: Connection;
99
- writable: WritableStream<Uint8Array>;
100
- }>;
101
- onIncoming(callback: (stream: RuntimeIncomingStream) => boolean | void): () => void;
102
- onIncomingChannel(channelId: string, callback: (stream: RuntimeIncomingStream & {
103
- channel: NonNullable<RuntimeIncomingStream['channel']>;
104
- }) => boolean | void): () => void;
105
- connect(options: OpenRTCChannelConnectOptions): Promise<RuntimeScopedLogicalChannel>;
106
- connectScoped(options: RuntimeScopedChannelOptions): Promise<RuntimeScopedLogicalChannel>;
107
- }
108
- interface OpenRTCRoomNamespace {
109
- create(roomId?: string): Promise<string>;
110
- join(roomId: string, options?: RuntimeJoinRoomOptions): Promise<Connection[]>;
111
- leave(roomId: string): Promise<void>;
112
- watch(roomId: string, callback: (members: RuntimeRoomMember[]) => void): () => void;
113
- members(roomId: string): Promise<RuntimeRoomMember[]>;
114
- }
115
- interface OpenRTCTicketNamespace {
116
- raw(): Promise<string>;
117
- share(options?: {
118
- maxConnections?: number;
119
- }): Promise<string>;
120
- grant(scope: GrantScope, options?: {
121
- maxConnections?: number;
122
- }): Promise<string>;
123
- revoke(scope: GrantScope): Promise<string[]>;
124
- }
125
- interface OpenRTCDiagnosticsNamespace {
126
- status(): Promise<{
127
- runtime: 'tauri' | 'browser' | 'unknown';
128
- wasmLoaded: boolean;
129
- localNodeId?: string;
130
- userId?: string;
131
- }>;
132
- policy(): RuntimePolicySnapshot;
133
- capabilities(): RuntimeCapabilities;
134
- capabilityProfile(): RuntimeCapabilityProfile;
135
- connectionStates(): Promise<RuntimeConnectionStateSnapshot[]>;
136
- onConnectionStateChange(callback: (state: RuntimeConnectionStateSnapshot) => void): Promise<() => void> | (() => void);
137
- connections(): Connection[];
138
- applicationReadyConnections(options?: RuntimeApplicationPayloadReadinessOptions): Connection[];
139
- onConnection(callback: (connection: Connection) => void): () => void;
140
- onDisconnection(callback: (connection: Connection) => void): () => void;
141
- onConnectionEvent(callback: (event: RuntimeConnectionEvent) => void): () => void;
142
- forceReconnectSnapshot(): void;
143
- peerReconciliation(): Readonly<PeerReconciliationStats>;
144
- }
145
- interface OpenRTCAdvancedNamespace {
146
- readonly runtime: RuntimeClient;
147
- readonly assembly: PlutoRuntimeAssembly;
148
- nodeId(): Promise<string>;
149
- nodeIdFromTicket(ticket: string): Promise<string | null>;
150
- endpointTicket(): Promise<string>;
151
- connectRaw(target: {
152
- ticket: string;
153
- timeoutMs?: number;
154
- }): Promise<RuntimeRawConnection>;
155
- openBi(nodeId: string): Promise<{
156
- readable: ReadableStream<Uint8Array>;
157
- writable: WritableStream<Uint8Array>;
158
- }>;
159
- openUni(nodeId: string): Promise<WritableStream<Uint8Array>>;
160
- isConnected(nodeId: string): Promise<boolean>;
161
- disconnectNode(nodeId: string): Promise<void>;
162
- setAutoConnectExcluded(deviceId: string, excluded: boolean): Promise<void>;
163
- notifyNetworkChange(reason?: string): Promise<void>;
164
- }
165
15
  /**
166
- * OpenRTCClient extends RuntimeClient with auth helpers that were
167
- * previously only available on PlutoRuntimeAssembly.
16
+ * OpenRTC developer-facing browser entrypoint and compatibility native factory.
168
17
  *
169
- * This is the unified type returned by OpenRTC() and OpenRTC.native().
18
+ * Native-only applications should import `createNativeOpenRTC` from
19
+ * `openrtc/native` so their webview bundle does not carry the browser WASM
20
+ * runtime.
170
21
  */
171
- interface OpenRTCClient extends RuntimeClient {
172
- readonly devices: OpenRTCDeviceNamespace;
173
- readonly peers: OpenRTCPeerNamespace;
174
- readonly channels: OpenRTCChannelNamespace;
175
- readonly rooms: OpenRTCRoomNamespace;
176
- readonly tickets: OpenRTCTicketNamespace;
177
- readonly diagnostics: OpenRTCDiagnosticsNamespace;
178
- readonly advanced: OpenRTCAdvancedNamespace;
179
- /** @deprecated Use setAuth() instead */
180
- setAuthContext(context: AuthContext | null): Promise<void>;
181
- /** Set auth context for the runtime */
182
- setAuth(context: AuthContext | null): Promise<void>;
183
- /** Sync Pluto-hosted auth to the runtime */
184
- syncPlutoAuth(options?: {
185
- userId?: string | null;
186
- forceRefresh?: boolean;
187
- }): Promise<void>;
188
- /** Bind Pluto auth host to auto-sync on token changes */
189
- bindPlutoAuthHost(): () => void;
190
- /** Sign in via Pluto SSO */
191
- signIn(): Promise<void>;
192
- /** Sign out and clear auth context */
193
- signOut(): Promise<void>;
194
- /**
195
- * @deprecated Use `client.devices.startSession(...)` for the public
196
- * user-device avenue lifecycle. This top-level method remains for
197
- * RuntimeClient compatibility and advanced integrations.
198
- */
199
- startManagedSession(options: RuntimeManagedSessionOptions): Promise<RuntimeManagedSession>;
200
- /**
201
- * @deprecated Use `client.devices.stopSession(...)` for the public
202
- * user-device avenue lifecycle.
203
- */
204
- stopManagedSession(options?: {
205
- preserveBackendSession?: boolean;
206
- }): Promise<void>;
207
- /** @deprecated Use `client.rooms.create(...)`. */
208
- createRoom(roomId?: string): Promise<string>;
209
- /** @deprecated Use `client.rooms.join(...)`. */
210
- joinRoom(roomId: string, options?: RuntimeJoinRoomOptions): Promise<Connection[]>;
211
- /** @deprecated Use `client.rooms.leave(...)`. */
212
- leaveRoom(roomId: string): Promise<void>;
213
- /** @deprecated Use `client.rooms.watch(...)`. */
214
- watchRoom(roomId: string, callback: (members: RuntimeRoomMember[]) => void): () => void;
215
- /** @deprecated Use `client.rooms.members(...)`. */
216
- getRoomMembers(roomId: string): Promise<RuntimeRoomMember[]>;
217
- /** @deprecated Use `client.tickets.raw(...)`. */
218
- getInvite(): Promise<string>;
219
- /** @deprecated Use `client.tickets.raw(...)`. */
220
- getTicket(): Promise<string>;
221
- /** @deprecated Use `client.tickets.share(...)` or `client.tickets.grant(...)`. */
222
- getTicketWithToken(scope: GrantScope, maxConnections?: number): Promise<string>;
223
- /** @deprecated Use `client.tickets.revoke(...)`. */
224
- revokeTokensByScope(scope: GrantScope): Promise<string[]>;
225
- /** @deprecated Use `client.peers.connect(...)`. */
226
- connectPeer(options: RuntimePeerConnectOptions): Promise<Connection>;
227
- /** @deprecated Use `client.peers.connect(...)`. */
228
- connectTo(options: RuntimePeerConnectOptions): Promise<Connection>;
229
- /** @deprecated Use `client.peers.waitConnected(...)`. */
230
- waitForConnectedPeer(id: string, timeoutMs?: number): Promise<PeerSessionSnapshot | null>;
231
- /** @deprecated Use `client.channels.connect(...)`; use `client.channels.connectScoped(...)` only for custom lifecycle scopes. */
232
- connectScopedChannel(options: RuntimeScopedChannelOptions): Promise<RuntimeScopedLogicalChannel>;
233
- /** @deprecated Use `client.channels.openBi(...)`. */
234
- openPeerBi(id: string, options?: RuntimePeerStreamOptions): Promise<{
235
- connection: Connection;
236
- readable: ReadableStream<Uint8Array>;
237
- writable: WritableStream<Uint8Array>;
238
- }>;
239
- /** @deprecated Use `client.channels.openUni(...)`. */
240
- openPeerUni(id: string, options?: RuntimePeerStreamOptions): Promise<{
241
- connection: Connection;
242
- writable: WritableStream<Uint8Array>;
243
- }>;
244
- /**
245
- * Access to the underlying PlutoRuntimeAssembly for backward compatibility.
246
- * @deprecated Access methods directly on the client instead.
247
- */
248
- readonly runtime: RuntimeClient;
249
- /**
250
- * Access to the underlying PlutoRuntimeAssembly for backward compatibility.
251
- * @internal
252
- */
253
- readonly _assembly: PlutoRuntimeAssembly;
254
- }
22
+
255
23
  /**
256
24
  * Create an OpenRTC client for browser/WASM environments.
257
- *
258
- * @example
259
- * ```typescript
260
- * import { OpenRTC } from 'openrtc';
261
- * const client = OpenRTC({
262
- * apiKey: 'pk_live_...',
263
- * authMode: 'anonymous',
264
- * });
265
- * await client.connect();
266
- * ```
267
25
  */
268
26
  declare function OpenRTC(options: RuntimeClientOptions): OpenRTCClient;
269
27
  declare namespace OpenRTC {
@@ -309,55 +67,7 @@ declare function generateEphemeralKeyAgreement(randomBytes?: (byteLength: number
309
67
  declare function deriveApplicationCryptoKey(localSecretKey: Uint8Array, remotePublicKey: Uint8Array, localNodeId: string, remoteNodeId: string): Uint8Array;
310
68
  declare function encodeApplicationKeyAgreementPayload(publicKey: Uint8Array): ApplicationKeyAgreementPayload;
311
69
 
312
- type MintSpaceTokenRequest = {
313
- spaceKey: string;
314
- memberId?: string;
315
- ttl?: number;
316
- sandboxAppId?: string;
317
- };
318
- type MintSpaceTokenResponse = {
319
- token: string;
320
- expiresAt: number;
321
- tokenLifetimeSeconds: number;
322
- namespaceId: string;
323
- spaceAppTag: string;
324
- };
325
- /**
326
- * Mint a namespace-scoped Firebase custom token from your backend using the
327
- * OpenRTC `POST /v1/spaces/tokens` endpoint. Never call this from browser code
328
- * with a secret key — proxy through your server.
329
- */
330
- type EnableSpaceAuthResponse = {
331
- success: true;
332
- space: {
333
- namespaceId: string;
334
- requireScopedAuth: boolean;
335
- status: 'active' | 'revoked';
336
- };
337
- };
338
- /**
339
- * Opt a provisioned space into scoped-auth mode (required for all spaces).
340
- * Call from your backend with sk_live_... only.
341
- */
342
- declare function enableSpaceAuth(endpointUrl: string, secretKey: string, namespaceId: string): Promise<EnableSpaceAuthResponse>;
343
- declare function mintSpaceToken(endpointUrl: string, secretKey: string, request: MintSpaceTokenRequest): Promise<MintSpaceTokenResponse>;
344
- /**
345
- * Browser-safe space auth for static sites. Calls the rate-limited
346
- * `v1SpacePublicTokens` endpoint (pk_live_ + spaceKey only).
347
- */
348
- declare function createPublicSpaceTokenProvider(options: {
349
- apiKey: string;
350
- space?: string;
351
- spaceKey?: string;
352
- endpointUrl?: string;
353
- memberIdStorageKey?: string;
354
- sandboxAppId?: string;
355
- }): SpaceTokenProvider;
356
- declare function sandboxSpaceKey(spaceKey: string, sandboxAppId?: string): string;
357
- declare const spaceToken: typeof createPublicSpaceTokenProvider;
358
- declare const createSpaceTokenProvider: typeof createPublicSpaceTokenProvider;
359
-
360
70
  type UpgradeState = 'none' | 'upgrading' | 'upgraded' | 'failed';
361
71
  type OutboundMessage = string | object | ArrayBuffer | Uint8Array;
362
72
 
363
- export { ApplicationCryptoStreamTools, type ApplicationKeyAgreementPayload, ApplicationPayloadCrypto, type EnableSpaceAuthResponse, GrantScope, KEY_AGREEMENT_ALGORITHM, KEY_AGREEMENT_PUBLIC_KEY_BYTES, type MintSpaceTokenRequest, type MintSpaceTokenResponse, OpenRTC, type OpenRTCChannelConnectOptions, type OpenRTCClient, type OpenRTCDeviceNamespace, type OpenRTCDeviceSessionOptions, RuntimeClientOptions as OpenRTCOptions, type OpenRTCRoomNamespace, type OpenRTCTicketNamespace, type OutboundMessage, ProtocolCapability, ProtocolCapabilityMap, ProtocolName, RuntimeApplicationPayloadReadinessOptions, RuntimeCapabilities, RuntimeChannelDescriptor, RuntimeClientOptions, RuntimeConnectionEvent, RuntimeConnectionStateSnapshot, RuntimeDevice, RuntimeDeviceConnectOptions, RuntimeDeviceStatusSnapshot, RuntimeIncomingStream, RuntimeJoinRoomOptions, RuntimeLocalDeviceInfo, RuntimeLocalDeviceProfile, RuntimeManagedSession, RuntimeManagedSessionOptions, RuntimePeerConnectOptions, RuntimePeerHealth, RuntimePeerReadinessSnapshot, RuntimePeerState, RuntimePeerStreamOptions, RuntimePolicySnapshot, RuntimeRawConnection, RuntimeRoomMember, RuntimeScopedChannelOptions, RuntimeScopedLogicalChannel, SpaceTokenProvider, type UpgradeState, createApplicationCryptoStreamTools, createPublicSpaceTokenProvider, createSharedSecretApplicationCrypto, createSpaceTokenProvider, deriveApplicationCryptoKey, enableSpaceAuth, encodeApplicationKeyAgreementPayload, generateEphemeralKeyAgreement, getPreferredProtocolOrder, isApplicationEncryptedPayload, mintSpaceToken, sandboxSpaceKey, spaceToken };
73
+ export { ApplicationCryptoStreamTools, type ApplicationKeyAgreementPayload, ApplicationPayloadCrypto, KEY_AGREEMENT_ALGORITHM, KEY_AGREEMENT_PUBLIC_KEY_BYTES, OpenRTC, OpenRTCClient, RuntimeClientOptions as OpenRTCOptions, type OutboundMessage, ProtocolCapability, ProtocolCapabilityMap, ProtocolName, RuntimeClientOptions, type UpgradeState, createApplicationCryptoStreamTools, createSharedSecretApplicationCrypto, deriveApplicationCryptoKey, encodeApplicationKeyAgreementPayload, generateEphemeralKeyAgreement, getPreferredProtocolOrder, isApplicationEncryptedPayload };
package/dist/index.js CHANGED
@@ -1,2 +1 @@
1
- import {z,A}from'./chunk-NCRP5ODV.js';export{c as KEY_AGREEMENT_ALGORITHM,b as KEY_AGREEMENT_PUBLIC_KEY_BYTES,g as ScopedSession,v as createRuntimeJsonFrameDecoder,r as createRuntimeU32BEFrameDecoder,t as decodeRuntimeJsonPayload,e as deriveApplicationCryptoKey,f as encodeApplicationKeyAgreementPayload,u as encodeRuntimeJsonFrame,s as encodeRuntimeJsonPayload,q as encodeRuntimeU32BEFrame,d as generateEphemeralKeyAgreement,a as getPreferredProtocolOrder}from'./chunk-NCRP5ODV.js';export{a as isRuntimeDeviceActive,c as isRuntimeDeviceConnectable,b as isRuntimeDeviceRoutable}from'./chunk-CK6WQV7J.js';import'./chunk-BGQX25BO.js';import {g}from'./chunk-L6OUJ6YN.js';export{w as OPENRTC_RUNTIME_POLICY,n as createApplicationCryptoStreamTools,m as createSharedSecretApplicationCrypto,x as getRuntimePolicy,l as isApplicationEncryptedPayload}from'./chunk-MESPJTUA.js';import {p}from'./chunk-34LATQZZ.js';export{a as TRANSPORT_LABELS,d as isDirectIrohTransportLabel,h as isIndependentTransportLabel,c as isIrohBaseTransportLabel,e as isOptionalTransportLabel,f as isWebRtcTransportLabel,b as normalizeTransportLabel}from'./chunk-QT2ASNI3.js';export{a as ROUTE_DESCRIPTORS,e as getRouteDescriptor,f as listRouteDescriptors}from'./chunk-C7YN5MSV.js';function O(t){let i=p({...t});if("auth"in t&&!t.authMode){let n=t.auth;i.authMode=n==="none"?"anonymous":n;}if("identity"in t){let n=t.identity,r=n==="temporary"?"ephemeral":n;!t.deviceIdPersistence&&!t.nodeIdPersistence&&(i.deviceIdPersistence=r),!t.endpointIdPersistence&&!t.nodeIdPersistence&&(i.endpointIdPersistence=r);}return "namespace"in t&&!t.storagePrefix&&(i.storagePrefix=t.namespace),"privacy"in t&&t.strictMode===void 0&&(i.strictMode=!!t.privacy),i}function I(t,i){let n=t.runtime,r=Object.create(n),s=async e=>{if(typeof e!="string")return e;let a=(await n.listDevices()).find(d=>d.deviceId===e);if(!a)throw new Error(`OpenRTC device '${e}' is not currently discoverable.`);return a},c=async e=>({...e,localDeviceId:e?.localDeviceId??await n.getLocalDeviceId()??""}),p=async e=>{let{device:o,scope:a,...d}=e,g=d.deviceId??(typeof o=="string"?o:o?.deviceId)??null,P=d.ticket??(typeof o=="string"?void 0:o?.ticket);g&&!P&&(P=(await s(g).catch(()=>null))?.ticket);let C={...d,scope:a??"session"};return g&&(C.deviceId=g),P&&(C.ticket=P),C},l={list:()=>n.listDevices(),startSession:(e={})=>n.startManagedSession({...e,platform:e.platform??i}),stopSession:e=>n.stopManagedSession(e),listWithStatus:()=>n.listDevicesWithStatus(),watch:e=>n.watchDevices(e),watchWithStatus:e=>n.watchDevicesWithStatus(e),connect:async(e,o)=>n.connectDevice(await s(e),await c(o)),connectWithRetry:async(e,o,a)=>n.connectDeviceWithRetry(await s(e),o,a),disconnect:e=>n.disconnectDevice(e),update:(e,o)=>n.updateDevice(e,o),delete:e=>n.deleteDevice(e),localId:()=>n.getLocalDeviceId(),localInfo:()=>n.getLocalDeviceInfo(),localProfile:e=>n.getLocalDeviceProfile(e),updateLocalName:e=>n.updateLocalDeviceName(e)},u={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,o)=>n.disconnectPeer(e,o),forceDisconnect:e=>n.forceDisconnectPeer(e),session:e=>n.getPeerSession(e),sessions:()=>n.listPeerSessions(),waitConnected:(e,o)=>n.waitForConnectedPeer(e,o),readiness:(e,o)=>n.getPeerReadiness(e,o),health:e=>n.getPeerHealth(e),identity:e=>n.resolvePeerIdentity(e),addScope:(e,o)=>n.addPeerScope(e,o),releaseScope:(e,o)=>n.releasePeerScope(e,o),scopes:e=>n.getPeerScopes(e),refresh:()=>n.refreshPeerSnapshot()},m={register:e=>n.registerChannel(e),unregister:e=>n.unregisterChannel(e),list:()=>n.listChannels(),openBi:(e,o,a)=>n.openPeerBi(e,{...a,channelId:o}),openUni:(e,o,a)=>n.openPeerUni(e,{...a,channelId:o}),onIncoming:e=>n.onIncomingStream(e),onIncomingChannel:(e,o)=>n.onIncomingChannelStream(e,a=>{if(a.channel)return o(a)}),connect:async e=>n.connectScopedChannel(await p(e)),connectScoped:e=>n.connectScopedChannel(e)},R={create:e=>n.createRoom(e),join:(e,o)=>n.joinRoom(e,o),leave:e=>n.leaveRoom(e),watch:(e,o)=>n.watchRoom(e,o),members:e=>n.getRoomMembers(e)},y={raw:()=>n.getInvite(),share:e=>n.getTicketWithToken("share",e?.maxConnections??1),grant:(e,o)=>n.getTicketWithToken(e,o?.maxConnections??0),revoke:e=>n.revokeTokensByScope(e)},A={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()},w={runtime:n,assembly:t,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,o)=>n.setAutoConnectExcluded(e,o),notifyNetworkChange:e=>n.notifyNetworkChange(e)};return Object.defineProperties(r,{devices:{get:()=>l,enumerable:true},peers:{get:()=>u,enumerable:true},channels:{get:()=>m,enumerable:true},rooms:{get:()=>R,enumerable:true},tickets:{get:()=>y,enumerable:true},diagnostics:{get:()=>A,enumerable:true},advanced:{get:()=>w,enumerable:true},setAuth:{value:e=>t.setAuthContext(e),enumerable:true,writable:true,configurable:true},setAuthContext:{value:e=>t.setAuthContext(e),enumerable:true,writable:true,configurable:true},syncPlutoAuth:{value:e=>t.syncPlutoAuth(e),enumerable:true,writable:true,configurable:true},bindPlutoAuthHost:{value:()=>t.bindPlutoAuthHost(),enumerable:true,writable:true,configurable:true},signIn:{value:()=>t.signInWithPluto(),enumerable:true,writable:true,configurable:true},signOut:{value:()=>t.signOut(),enumerable:true,writable:true,configurable:true},runtime:{get:()=>n,enumerable:false},_assembly:{get:()=>t,enumerable:false}}),r}function T(t){let i=O(t),n=z(i);return I(n,"web")}T.native=function(t,i){let n=O(t),r=i??g(),s=A(n,r);return I(s,"native")};var ae="https://api.openrtc.app";async function ce(t,i,n){let r=t.replace(/\/$/,""),s=await fetch(`${r}/v1/spaces/${encodeURIComponent(n)}/scoped-auth`,{method:"POST",headers:{Authorization:`Bearer ${i}`,"Content-Type":"application/json"},body:"{}"}),c=await s.json().catch(()=>({}));if(!s.ok){let p=typeof c?.error=="string"?c.error:`enableSpaceAuth failed (${s.status})`;throw new Error(p)}return c}async function pe(t,i,n){let r=await fetch(t,{method:"POST",headers:{Authorization:`Bearer ${i}`,"Content-Type":"application/json"},body:JSON.stringify(n)}),s=await r.json().catch(()=>({}));if(!r.ok){let c=typeof s?.error=="string"?s.error:`mintSpaceToken failed (${r.status})`;throw new Error(c)}if(typeof s?.token!="string"||!s.token.trim())throw new Error("mintSpaceToken response missing token");return s}function S(t){let i=t.apiKey.trim(),n=(t.spaceKey??t.space??"").trim(),r=k(t.sandboxAppId),s=(t.endpointUrl??ae).replace(/\/$/,""),c=t.memberIdStorageKey??`openrtc:space-member:${n}${r?`:sandbox:${r}`:""}`;return async()=>{if(!i||!n)throw new Error("spaceToken requires apiKey and space");let p=null;typeof sessionStorage<"u"?(p=sessionStorage.getItem(c),p||(p=globalThis.crypto?.randomUUID?.()??`member-${Date.now()}`,sessionStorage.setItem(c,p))):p=`member-${Date.now()}`;let l=await fetch(`${s}/v1SpacePublicTokens`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:i,spaceKey:n,memberId:p,...r?{sandboxAppId:r}:{}})}),{text:u,payload:m}=await le(l);if(!l.ok){let y=typeof m?.error=="string"?m.error:u.trim()?u.trim().slice(0,240):`public space token mint failed (${l.status})`;throw new Error(y)}let R=typeof m?.token=="string"?m.token.trim():"";if(!R)throw new Error("public space token response missing token");return {customToken:R}}}function me(t){if(!t.trim())return {};try{let i=JSON.parse(t);return i&&typeof i=="object"?i:{}}catch{return {}}}async function le(t){let i=t.text;if(typeof i=="function"){let r=await i.call(t).catch(()=>"");return {text:r,payload:me(r)}}let n=await t.json().catch(()=>({}));return {text:JSON.stringify(n),payload:n&&typeof n=="object"?n:{}}}function k(t){let i=t?.trim().toLowerCase()??"";if(!i)return "";if(!/^[a-z0-9][a-z0-9-]{0,47}$/.test(i))throw new Error("sandboxAppId must be 1-48 lowercase letters, numbers, or dashes.");return i}function de(t,i){let n=t.trim(),r=k(i);return r?`${n}::sandbox::${r}`:n}var ue=S,Re=S;
2
- export{T as OpenRTC,S as createPublicSpaceTokenProvider,Re as createSpaceTokenProvider,ce as enableSpaceAuth,pe as mintSpaceToken,de as sandboxSpaceKey,ue as spaceToken};
1
+ import {a,b}from'./chunk-SJ5BFL6W.js';export{e as createPublicSpaceTokenProvider,h as createSpaceTokenProvider,c as enableSpaceAuth,d as mintSpaceToken,f as sandboxSpaceKey,g as spaceToken}from'./chunk-SJ5BFL6W.js';import {a as a$1,b as b$1}from'./chunk-4AXAWVC6.js';export{d as KEY_AGREEMENT_ALGORITHM,c as KEY_AGREEMENT_PUBLIC_KEY_BYTES,h as ScopedSession,w as createRuntimeJsonFrameDecoder,s as createRuntimeU32BEFrameDecoder,u as decodeRuntimeJsonPayload,f as deriveApplicationCryptoKey,g as encodeApplicationKeyAgreementPayload,v as encodeRuntimeJsonFrame,t as encodeRuntimeJsonPayload,r as encodeRuntimeU32BEFrame,e as generateEphemeralKeyAgreement,b as getPreferredProtocolOrder}from'./chunk-7352ZIXN.js';export{a as isRuntimeDeviceActive,c as isRuntimeDeviceConnectable,b as isRuntimeDeviceRoutable}from'./chunk-CK6WQV7J.js';import'./chunk-MNI6JGR2.js';import {g}from'./chunk-DI5IPRPM.js';export{w as OPENRTC_RUNTIME_POLICY,n as createApplicationCryptoStreamTools,m as createSharedSecretApplicationCrypto,x as getRuntimePolicy,l as isApplicationEncryptedPayload}from'./chunk-YTUWXCRO.js';export{a as TRANSPORT_LABELS,d as isDirectIrohTransportLabel,h as isIndependentTransportLabel,c as isIrohBaseTransportLabel,e as isOptionalTransportLabel,f as isWebRtcTransportLabel,b as normalizeTransportLabel}from'./chunk-QT2ASNI3.js';import'./chunk-HVTYSEU7.js';export{a as ROUTE_DESCRIPTORS,e as getRouteDescriptor,f as listRouteDescriptors}from'./chunk-C7YN5MSV.js';function s(e){let t=a(e),o=a$1(t);return b(o,"web")}s.native=function(e,t){let o=a(e),c=t??g(),m=b$1(o,c);return b(m,"native")};export{s as OpenRTC};
@@ -0,0 +1,11 @@
1
+ type PlutoIpcUnlisten = () => void | Promise<void>;
2
+ interface PlutoIpcBridge {
3
+ invoke<T = unknown>(command: string, args?: Record<string, unknown>): Promise<T>;
4
+ listen<T = unknown>(event: string, handler: (payload: T) => void): Promise<PlutoIpcUnlisten>;
5
+ isAvailable?(): boolean | Promise<boolean>;
6
+ }
7
+ type NativeIpcFailureKind = 'command-unavailable' | 'runtime-unavailable' | 'timeout' | 'unknown';
8
+ declare function classifyNativeIpcFailure(error: unknown): NativeIpcFailureKind;
9
+ declare function isNativeIpcCommandUnavailable(error: unknown): boolean;
10
+
11
+ export { type NativeIpcFailureKind as N, type PlutoIpcBridge as P, type PlutoIpcUnlisten as a, classifyNativeIpcFailure as c, isNativeIpcCommandUnavailable as i };
@@ -0,0 +1,20 @@
1
+ import { R as RuntimeClientOptions } from './types-N9s66nF8.js';
2
+ import { P as PlutoIpcBridge } from './ipc-CflAVodw.js';
3
+ import { O as OpenRTCClient } from './spaceTokens-3sbs1mUF.js';
4
+ export { E as EnableSpaceAuthResponse, M as MintSpaceTokenRequest, a as MintSpaceTokenResponse, b as OpenRTCChannelConnectOptions, c as OpenRTCDeviceNamespace, d as OpenRTCDeviceSessionOptions, e as OpenRTCRoomNamespace, f as OpenRTCTicketNamespace, g as createPublicSpaceTokenProvider, h as createSpaceTokenProvider, i as enableSpaceAuth, m as mintSpaceToken, s as sandboxSpaceKey, j as spaceToken } from './spaceTokens-3sbs1mUF.js';
5
+ export { S as SpaceAuthMode, a as SpaceTokenProvider } from './types-ZDsZknDI.js';
6
+ import './IEngineBridge-C7OT2CRv.js';
7
+ import './assembly-C2G0P2L5.js';
8
+ import './capabilities-C4Dqs_pB.js';
9
+
10
+ /**
11
+ * Native-only OpenRTC entrypoint.
12
+ *
13
+ * This entry deliberately imports only the IPC runtime. It is the preferred
14
+ * entry for Tauri webviews because it excludes the browser WASM adapter and
15
+ * binary from the application bundle.
16
+ */
17
+
18
+ declare function createNativeOpenRTC(options: RuntimeClientOptions, bridge: PlutoIpcBridge): OpenRTCClient;
19
+
20
+ export { OpenRTCClient, createNativeOpenRTC };
package/dist/native.js ADDED
@@ -0,0 +1 @@
1
+ import {a as a$1,b}from'./chunk-SJ5BFL6W.js';export{e as createPublicSpaceTokenProvider,h as createSpaceTokenProvider,c as enableSpaceAuth,d as mintSpaceToken,f as sandboxSpaceKey,g as spaceToken}from'./chunk-SJ5BFL6W.js';import {A as A$1}from'./chunk-7352ZIXN.js';import {h}from'./chunk-DI5IPRPM.js';import'./chunk-YTUWXCRO.js';import'./chunk-QT2ASNI3.js';import {s}from'./chunk-HVTYSEU7.js';import'./chunk-C7YN5MSV.js';function a(t,p){let e=s(t);return A$1(e,new h({...e,bridge:p}))}function A(t,p){let e=a(a$1(t),p);return b(e,"native")}export{A as createNativeOpenRTC};
@@ -1,6 +1,7 @@
1
- import { D as DelegatingRuntimeAdapter, W as WasmBridgeOptions } from '../DelegatingRuntimeAdapter-D2_dgabz.js';
2
- import '../types-ByZyADCn.js';
1
+ import { D as DelegatingRuntimeAdapter, W as WasmBridgeOptions } from '../DelegatingRuntimeAdapter-lFDUNBy9.js';
2
+ import '../types-ZDsZknDI.js';
3
3
  import '../IEngineBridge-C7OT2CRv.js';
4
+ import '../capabilities-C4Dqs_pB.js';
4
5
 
5
6
  declare class WasmRuntimeAdapter extends DelegatingRuntimeAdapter {
6
7
  constructor(options: WasmBridgeOptions);
@@ -1 +1 @@
1
- export{a as WasmRuntimeAdapter}from'../chunk-BGQX25BO.js';import'../chunk-MESPJTUA.js';import'../chunk-34LATQZZ.js';import'../chunk-QT2ASNI3.js';import'../chunk-C7YN5MSV.js';
1
+ export{a as WasmRuntimeAdapter}from'../chunk-MNI6JGR2.js';import'../chunk-YTUWXCRO.js';import'../chunk-QT2ASNI3.js';import'../chunk-HVTYSEU7.js';import'../chunk-C7YN5MSV.js';
@@ -1,3 +1,38 @@
1
- export { a2 as RuntimeDeviceActiveOptions, $ as isRuntimeDeviceActive, a0 as isRuntimeDeviceConnectable, a1 as isRuntimeDeviceRoutable } from '../device-status-CR27Ak7c.js';
1
+ import { c as RuntimeDevice, d as RuntimeDeviceStatusSnapshot } from '../types-N9s66nF8.js';
2
2
  import '../IEngineBridge-C7OT2CRv.js';
3
- import '../types-ByZyADCn.js';
3
+ import '../types-ZDsZknDI.js';
4
+
5
+ interface RuntimeDeviceActiveOptions {
6
+ now?: number;
7
+ /**
8
+ * Optional local freshness window for durable roster rows. Leave undefined
9
+ * when the caller only wants to honor explicit online/expiresAt state.
10
+ */
11
+ staleAfterMs?: number;
12
+ }
13
+ type RuntimeDeviceActivityStatus = Pick<Partial<RuntimeDevice>, 'online' | 'lastSeenAt' | 'updatedAt' | 'createdAt' | 'expiresAt'>;
14
+ type RuntimeDeviceRouteStatus = Pick<Partial<RuntimeDeviceStatusSnapshot>, 'settledReady' | 'readinessState' | 'connectionStatus'>;
15
+ type RuntimeDevicePresenceStatus = Pick<RuntimeDevice, 'online' | 'ticket'> & Pick<Partial<RuntimeDeviceStatusSnapshot>, 'connectable' | 'presenceStatus' | 'online' | 'ticket'>;
16
+ /**
17
+ * True when a runtime device row is currently live enough to display or
18
+ * consider for app-level routing. This is deliberately separate from
19
+ * `isRuntimeDeviceConnectable`: a peer can be active/present before it has a
20
+ * usable ticket, and a stale durable row should not keep app UIs alive.
21
+ */
22
+ declare function isRuntimeDeviceActive(device: RuntimeDeviceActivityStatus, options?: RuntimeDeviceActiveOptions): boolean;
23
+ /**
24
+ * True once OpenRTC has a routable peer projection for normal app payloads.
25
+ *
26
+ * This intentionally does not inspect discovery metadata or device
27
+ * capabilities. Those fields describe the remote endpoint roster entry; they
28
+ * are not proof that an application-level protocol has exchanged its own
29
+ * ready/capability message over the mesh.
30
+ */
31
+ declare function isRuntimeDeviceRoutable(device: RuntimeDeviceRouteStatus): boolean;
32
+ /**
33
+ * True when the discovery row currently has enough fresh presence to attempt
34
+ * a dial. This is a discovery gate, not a connected/readiness gate.
35
+ */
36
+ declare function isRuntimeDeviceConnectable(device: RuntimeDevicePresenceStatus): boolean;
37
+
38
+ export { type RuntimeDeviceActiveOptions, isRuntimeDeviceActive, isRuntimeDeviceConnectable, isRuntimeDeviceRoutable };
@@ -1,16 +1,21 @@
1
- import { P as PeerReconciliationStats } from '../framing-rPdckqn5.js';
2
- export { O as OPENRTC_RUNTIME_POLICY, b as PlutoRuntimeAssembly, R as RuntimeClient, n as RuntimeFactoryOptions, o as RuntimeJsonFrameDecoderOptions, c as RuntimeJsonFrameHandler, a as RuntimePolicySnapshot, d as RuntimeU32BEFrameHandler, D as ScopedConnectionActorError, p as ScopedConnectionActorErrorKind, q as ScopedConnectionActorHandle, r as ScopedConnectionActorHandleOptions, s as ScopedConnectionActorRegistry, t as ScopedConnectionActorState, u as ScopedConnectionClose, v as ScopedConnectionDial, w as ScopedConnectionKey, x as ScopedLogicalChannelHandle, y as ScopedPreferredTransport, z as concatRuntimeBytes, A as createIpcClient, g as createRuntimeJsonFrameDecoder, h as createRuntimeU32BEFrameDecoder, B as createWasmClient, i as decodeRuntimeJsonPayload, j as encodeRuntimeJsonFrame, k as encodeRuntimeJsonPayload, l as encodeRuntimeU32BEFrame, m as getRuntimePolicy, C as readRuntimeU32BE, E as scopedConnectionKey, F as scopedConnectionKeyToString } from '../framing-rPdckqn5.js';
1
+ import { e as RuntimeFactoryOptions, b as PlutoRuntimeAssembly, P as PeerReconciliationStats } from '../assembly-C2G0P2L5.js';
2
+ export { O as OPENRTC_RUNTIME_POLICY, R as RuntimeClient, a as RuntimePolicySnapshot, D as ScopedConnectionActorError, f as ScopedConnectionActorErrorKind, h as ScopedConnectionActorHandle, i as ScopedConnectionActorHandleOptions, j as ScopedConnectionActorRegistry, k as ScopedConnectionActorState, l as ScopedConnectionClose, m as ScopedConnectionDial, n as ScopedConnectionKey, o as ScopedLogicalChannelHandle, p as ScopedPreferredTransport, g as getRuntimePolicy, q as scopedConnectionKey, r as scopedConnectionKeyToString } from '../assembly-C2G0P2L5.js';
3
3
  import * as Draft14 from '@moq/net';
4
- import { U as SignalingOptions, I as ISignalingBackend, R as RuntimeIdentity, d as SignalingEnvelope, f as SignalingSession, a as Device, k as BackendConnectionState, u as AppLimits, G as GrantScope, V as JoinRoomOptions, W as RoomMember, X as IncomingStreamChannelMetadata, s as ApplicationCryptoStreamTools, Y as RoomCreationMode, C as ClientOptions, r as ApplicationPayloadCrypto, D as DiscoveryMode, q as ProtocolCapabilityMap, Z as ScanningLoopOptions, _ as ScanningLoopHandle, $ as RuntimeBootstrapOptions, a0 as RuntimeBootstrapResult, w as ApplicationPayloadReadinessOptions, a1 as ManagedApplicationRouteOptions, a2 as PeerState, a3 as PeerScope, a4 as PeerHealth, a5 as ChannelDescriptor, a6 as JoinRequest, i as NativeConnectParams, j as NativeConnectResult } from '../types-ByZyADCn.js';
5
- import { C as Connection, K as RuntimeConnectionTarget, v as RuntimeRawConnection } from '../device-status-CR27Ak7c.js';
6
- export { w as ChannelDescriptor, x as ConnectionEvent, y as ConnectionTarget, D as DeviceProfile, z as IncomingStream, P as PeerConnectOptions, A as PeerReadiness, B as PeerStreamOptions, E as PresenceLoopOptions, F as RawConnection, t as RuntimeApplicationPayloadReadinessOptions, G as RuntimeAuthContext, H as RuntimeAuthIdentity, J as RuntimeAutoConnectPolicy, l as RuntimeChannelDescriptor, R as RuntimeClientOptions, u as RuntimeConnectionEvent, s as RuntimeConnectionStateSnapshot, c as RuntimeDevice, a2 as RuntimeDeviceActiveOptions, e as RuntimeDeviceConnectOptions, L as RuntimeDevicePresenceStatus, M as RuntimeDeviceStatus, d as RuntimeDeviceStatusSnapshot, n as RuntimeIncomingStream, q as RuntimeJoinRoomOptions, f as RuntimeLocalDeviceInfo, g as RuntimeLocalDeviceProfile, N as RuntimeLogicalChannelFraming, b as RuntimeManagedSession, O as RuntimeManagedSessionKind, a as RuntimeManagedSessionOptions, Q as RuntimeManagedSessionPlatform, i as RuntimePeerConnectOptions, k as RuntimePeerHealth, S as RuntimePeerLifecycleStatus, j as RuntimePeerReadinessSnapshot, T as RuntimePeerScope, U as RuntimePeerSessionSnapshot, h as RuntimePeerState, m as RuntimePeerStreamOptions, V as RuntimePresenceLoopOptions, W as RuntimePresencePolicy, r as RuntimeRoomMember, o as RuntimeScopedChannelOptions, p as RuntimeScopedLogicalChannel, X as RuntimeSession, Y as RuntimeUiConnectionStatus, Z as ScopedChannelOptions, _ as ScopedLogicalChannel, a3 as Session, a4 as SessionOptions, $ as isRuntimeDeviceActive, a0 as isRuntimeDeviceConnectable, a1 as isRuntimeDeviceRoutable } from '../device-status-CR27Ak7c.js';
4
+ import { a3 as SignalingOptions, I as ISignalingBackend, e as RuntimeIdentity, h as SignalingEnvelope, j as SignalingSession, f as Device, o as BackendConnectionState, X as AppLimits, G as GrantScope, J as JoinRoomOptions, H as RoomMember, x as IncomingStreamChannelMetadata, W as ApplicationCryptoStreamTools, a4 as RoomCreationMode, p as ClientOptions, r as ApplicationPayloadCrypto, D as DiscoveryMode, V as ProtocolCapabilityMap, a5 as ScanningLoopOptions, a6 as ScanningLoopHandle, a7 as RuntimeBootstrapOptions, a8 as RuntimeBootstrapResult, s as ApplicationPayloadReadinessOptions, a9 as ManagedApplicationRouteOptions, z as PeerState, K as PeerScope, F as PeerHealth, w as ChannelDescriptor, aa as JoinRequest, m as NativeConnectParams, n as NativeConnectResult } from '../types-ZDsZknDI.js';
5
+ import { C as Connection, K as RuntimeConnectionTarget, v as RuntimeRawConnection } from '../types-N9s66nF8.js';
6
+ export { w as ChannelDescriptor, x as ConnectionEvent, y as ConnectionTarget, D as DeviceProfile, z as IncomingStream, P as PeerConnectOptions, A as PeerReadiness, B as PeerStreamOptions, E as PresenceLoopOptions, F as RawConnection, t as RuntimeApplicationPayloadReadinessOptions, G as RuntimeAuthContext, H as RuntimeAuthIdentity, J as RuntimeAutoConnectPolicy, l as RuntimeChannelDescriptor, R as RuntimeClientOptions, u as RuntimeConnectionEvent, s as RuntimeConnectionStateSnapshot, c as RuntimeDevice, e as RuntimeDeviceConnectOptions, L as RuntimeDevicePresenceStatus, M as RuntimeDeviceStatus, d as RuntimeDeviceStatusSnapshot, n as RuntimeIncomingStream, q as RuntimeJoinRoomOptions, f as RuntimeLocalDeviceInfo, g as RuntimeLocalDeviceProfile, N as RuntimeLogicalChannelFraming, b as RuntimeManagedSession, O as RuntimeManagedSessionKind, a as RuntimeManagedSessionOptions, Q as RuntimeManagedSessionPlatform, i as RuntimePeerConnectOptions, k as RuntimePeerHealth, S as RuntimePeerLifecycleStatus, j as RuntimePeerReadinessSnapshot, T as RuntimePeerScope, U as RuntimePeerSessionSnapshot, h as RuntimePeerState, m as RuntimePeerStreamOptions, V as RuntimePresenceLoopOptions, W as RuntimePresencePolicy, r as RuntimeRoomMember, o as RuntimeScopedChannelOptions, p as RuntimeScopedLogicalChannel, X as RuntimeSession, Y as RuntimeUiConnectionStatus, Z as ScopedChannelOptions, _ as ScopedLogicalChannel, $ as Session, a0 as SessionOptions } from '../types-N9s66nF8.js';
7
7
  import { FirebaseApp } from 'firebase/app';
8
- import { R as RuntimeCapabilities } from '../DelegatingRuntimeAdapter-D2_dgabz.js';
9
- export { B as BROWSER_WASM_RUNTIME_CAPABILITIES, c as BrowserRuntimeCapabilityHost, N as NATIVE_IPC_RUNTIME_CAPABILITIES, d as NativeRuntimeStatusSnapshot, e as NativeRuntimeTransportFeatureStatus, b as RuntimeAdapterKind, a as RuntimeCapabilityProfile, f as cloneRuntimeCapabilities, r as runtimeCapabilitiesForBrowserHost, g as runtimeCapabilitiesFromNativeStatus, h as runtimeCapabilityProfile } from '../DelegatingRuntimeAdapter-D2_dgabz.js';
10
- export { I as IpcRuntimeAdapter, a as IpcRuntimeAdapterOptions, P as NativeBridge, b as NativeIpcFailureKind, P as PlutoIpcBridge, c as PlutoIpcUnlisten, d as classifyNativeIpcFailure, i as isNativeIpcCommandUnavailable } from '../IpcRuntimeAdapter-B8rkqNrq.js';
11
- export { WasmRuntimeAdapter } from './WasmRuntimeAdapter.js';
12
- export { TauriRuntimeAdapter, TauriRuntimeAdapterOptions, createTauriIpcBridge } from './tauri.js';
8
+ import { R as RuntimeCapabilities } from '../capabilities-C4Dqs_pB.js';
9
+ export { B as BROWSER_WASM_RUNTIME_CAPABILITIES, c as BrowserRuntimeCapabilityHost, N as NATIVE_IPC_RUNTIME_CAPABILITIES, d as NativeRuntimeStatusSnapshot, e as NativeRuntimeTransportFeatureStatus, b as RuntimeAdapterKind, a as RuntimeCapabilityProfile, f as cloneRuntimeCapabilities, r as runtimeCapabilitiesForBrowserHost, g as runtimeCapabilitiesFromNativeStatus, h as runtimeCapabilityProfile } from '../capabilities-C4Dqs_pB.js';
10
+ export { RuntimeDeviceActiveOptions, isRuntimeDeviceActive, isRuntimeDeviceConnectable, isRuntimeDeviceRoutable } from './device-status.js';
11
+ export { h as RuntimeJsonFrameDecoderOptions, R as RuntimeJsonFrameHandler, a as RuntimeU32BEFrameHandler, i as concatRuntimeBytes, c as createRuntimeJsonFrameDecoder, b as createRuntimeU32BEFrameDecoder, d as decodeRuntimeJsonPayload, e as encodeRuntimeJsonFrame, f as encodeRuntimeJsonPayload, g as encodeRuntimeU32BEFrame, r as readRuntimeU32BE } from '../framing-zRvEKOld.js';
12
+ import { I as IpcRuntimeAdapter } from '../tauri-WEvOC_Z6.js';
13
+ export { a as IpcRuntimeAdapterOptions, T as TauriRuntimeAdapter, b as TauriRuntimeAdapterOptions, c as createTauriIpcBridge } from '../tauri-WEvOC_Z6.js';
14
+ import { WasmRuntimeAdapter } from './WasmRuntimeAdapter.js';
15
+ import { P as PlutoIpcBridge } from '../ipc-CflAVodw.js';
16
+ export { N as NativeIpcFailureKind, a as PlutoIpcUnlisten, c as classifyNativeIpcFailure, i as isNativeIpcCommandUnavailable } from '../ipc-CflAVodw.js';
13
17
  import '../IEngineBridge-C7OT2CRv.js';
18
+ import '../DelegatingRuntimeAdapter-lFDUNBy9.js';
14
19
 
15
20
  /**
16
21
  * RtdbPresence — Phase 1 RTDB-backed device presence.
@@ -183,6 +188,18 @@ declare class Signaling {
183
188
  setWasmClient(client: any): void;
184
189
  }
185
190
 
191
+ /**
192
+ * @deprecated Legacy assembly helper. Use `OpenRTC()` for app code.
193
+ * Removal target: OpenRTC 0.2.0.
194
+ */
195
+ declare function createWasmClient(options: RuntimeFactoryOptions): PlutoRuntimeAssembly<WasmRuntimeAdapter>;
196
+ /**
197
+ * @deprecated Legacy assembly helper. Native applications should use
198
+ * `createNativeOpenRTC` from `openrtc/native`.
199
+ * Removal target: OpenRTC 0.2.0.
200
+ */
201
+ declare function createIpcClient(options: RuntimeFactoryOptions, bridge: PlutoIpcBridge): PlutoRuntimeAssembly<IpcRuntimeAdapter>;
202
+
186
203
  interface MoQSubscriberOptions {
187
204
  maxPendingSubscriptions?: number;
188
205
  maxSubscribeRetries?: number;
@@ -623,4 +640,4 @@ declare function openRtcDebug(message: string, data?: unknown): void;
623
640
  declare function openRtcDebugInfo(message: string, data?: unknown): void;
624
641
  declare function openRtcDebugLog(message: string, data?: unknown): void;
625
642
 
626
- export { type CorrelationFields, RuntimeCapabilities, RuntimeConnectionController, RuntimeConnectionTarget, RuntimeRawConnection, clog, correlationForDriveGrantScope, logOpenRtcTeardownTrace, openRtcDebug, openRtcDebugEnabled, openRtcDebugInfo, openRtcDebugLog, renderCorrelationFields };
643
+ export { type CorrelationFields, IpcRuntimeAdapter, PlutoIpcBridge as NativeBridge, PlutoIpcBridge, PlutoRuntimeAssembly, RuntimeCapabilities, RuntimeConnectionController, RuntimeConnectionTarget, RuntimeFactoryOptions, RuntimeRawConnection, WasmRuntimeAdapter, clog, correlationForDriveGrantScope, createIpcClient, createWasmClient, logOpenRtcTeardownTrace, openRtcDebug, openRtcDebugEnabled, openRtcDebugInfo, openRtcDebugLog, renderCorrelationFields };
@@ -1 +1 @@
1
- export{y as RuntimeClient,h as RuntimeConnectionController,l as ScopedConnectionActorError,o as ScopedConnectionActorHandle,p as ScopedConnectionActorRegistry,k as clog,w as concatRuntimeBytes,j as correlationForDriveGrantScope,A as createIpcClient,v as createRuntimeJsonFrameDecoder,r as createRuntimeU32BEFrameDecoder,z as createWasmClient,t as decodeRuntimeJsonPayload,u as encodeRuntimeJsonFrame,s as encodeRuntimeJsonPayload,q as encodeRuntimeU32BEFrame,x as readRuntimeU32BE,i as renderCorrelationFields,m as scopedConnectionKey,n as scopedConnectionKeyToString}from'../chunk-NCRP5ODV.js';export{a as isRuntimeDeviceActive,c as isRuntimeDeviceConnectable,b as isRuntimeDeviceRoutable}from'../chunk-CK6WQV7J.js';export{a as WasmRuntimeAdapter}from'../chunk-BGQX25BO.js';export{b as TauriRuntimeAdapter,a as createTauriIpcBridge}from'../chunk-RRCARL4S.js';export{h as IpcRuntimeAdapter,e as classifyNativeIpcFailure,f as isNativeIpcCommandUnavailable}from'../chunk-L6OUJ6YN.js';export{y as BROWSER_WASM_RUNTIME_CAPABILITIES,z as NATIVE_IPC_RUNTIME_CAPABILITIES,w as OPENRTC_RUNTIME_POLICY,A as cloneRuntimeCapabilities,x as getRuntimePolicy,o as logOpenRtcTeardownTrace,b as openRtcDebug,a as openRtcDebugEnabled,c as openRtcDebugInfo,d as openRtcDebugLog,B as runtimeCapabilitiesForBrowserHost,C as runtimeCapabilitiesFromNativeStatus,D as runtimeCapabilityProfile}from'../chunk-MESPJTUA.js';import'../chunk-34LATQZZ.js';import'../chunk-QT2ASNI3.js';import'../chunk-C7YN5MSV.js';
1
+ export{b as createIpcClient,a as createWasmClient}from'../chunk-4AXAWVC6.js';export{z as RuntimeClient,i as RuntimeConnectionController,m as ScopedConnectionActorError,p as ScopedConnectionActorHandle,q as ScopedConnectionActorRegistry,l as clog,x as concatRuntimeBytes,k as correlationForDriveGrantScope,w as createRuntimeJsonFrameDecoder,s as createRuntimeU32BEFrameDecoder,u as decodeRuntimeJsonPayload,v as encodeRuntimeJsonFrame,t as encodeRuntimeJsonPayload,r as encodeRuntimeU32BEFrame,y as readRuntimeU32BE,j as renderCorrelationFields,n as scopedConnectionKey,o as scopedConnectionKeyToString}from'../chunk-7352ZIXN.js';export{a as isRuntimeDeviceActive,c as isRuntimeDeviceConnectable,b as isRuntimeDeviceRoutable}from'../chunk-CK6WQV7J.js';export{a as WasmRuntimeAdapter}from'../chunk-MNI6JGR2.js';export{b as TauriRuntimeAdapter,a as createTauriIpcBridge}from'../chunk-N6UBUNGC.js';export{h as IpcRuntimeAdapter,e as classifyNativeIpcFailure,f as isNativeIpcCommandUnavailable}from'../chunk-DI5IPRPM.js';export{y as BROWSER_WASM_RUNTIME_CAPABILITIES,z as NATIVE_IPC_RUNTIME_CAPABILITIES,w as OPENRTC_RUNTIME_POLICY,A as cloneRuntimeCapabilities,x as getRuntimePolicy,o as logOpenRtcTeardownTrace,b as openRtcDebug,a as openRtcDebugEnabled,c as openRtcDebugInfo,d as openRtcDebugLog,B as runtimeCapabilitiesForBrowserHost,C as runtimeCapabilitiesFromNativeStatus,D as runtimeCapabilityProfile}from'../chunk-YTUWXCRO.js';import'../chunk-QT2ASNI3.js';import'../chunk-HVTYSEU7.js';import'../chunk-C7YN5MSV.js';
@@ -1,20 +1,6 @@
1
- import { I as IpcRuntimeAdapter, N as NativeIpcBridgeOptions, P as PlutoIpcBridge } from '../IpcRuntimeAdapter-B8rkqNrq.js';
2
- import '../types-ByZyADCn.js';
3
- import '../DelegatingRuntimeAdapter-D2_dgabz.js';
1
+ export { T as TauriRuntimeAdapter, b as TauriRuntimeAdapterOptions, c as createTauriIpcBridge } from '../tauri-WEvOC_Z6.js';
2
+ import '../ipc-CflAVodw.js';
3
+ import '../types-ZDsZknDI.js';
4
+ import '../DelegatingRuntimeAdapter-lFDUNBy9.js';
4
5
  import '../IEngineBridge-C7OT2CRv.js';
5
-
6
- /**
7
- * @deprecated Native Tauri support now lives in the first-party `openrtc-tauri` package.
8
- * Removal target: OpenRTC 0.2.0. This shim remains for one compatibility cycle.
9
- */
10
- declare function createTauriIpcBridge(): PlutoIpcBridge;
11
- /**
12
- * @deprecated Native Tauri support now lives in the first-party `openrtc-tauri` package.
13
- * Removal target: OpenRTC 0.2.0. This shim remains for one compatibility cycle.
14
- */
15
- declare class TauriRuntimeAdapter extends IpcRuntimeAdapter {
16
- constructor(options: NativeIpcBridgeOptions);
17
- }
18
- type TauriRuntimeAdapterOptions = NativeIpcBridgeOptions;
19
-
20
- export { TauriRuntimeAdapter, type TauriRuntimeAdapterOptions, createTauriIpcBridge };
6
+ import '../capabilities-C4Dqs_pB.js';