openrtc 2.3.0 → 2.4.0

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 (68) hide show
  1. package/dist/{ITransport-CjxCQ6q7.d.ts → Connection-DZ5eP5hL.d.ts} +445 -94
  2. package/dist/DelegatingRuntimeAdapter-4cgiIWMN.d.ts +150 -0
  3. package/dist/IpcRuntimeAdapter-Dduaxscj.d.ts +80 -0
  4. package/dist/WasmBridge-3W2HHADU.js +1 -0
  5. package/dist/{assembly-Bmi65-tK.d.ts → assembly-By3UBQsE.d.ts} +36 -19
  6. package/dist/{capabilities-BPuynml5.d.ts → capabilities-B2mHv_H7.d.ts} +2 -6
  7. package/dist/chunk-2GX6GB6L.js +1 -0
  8. package/dist/chunk-2LATKLCC.js +118 -0
  9. package/dist/{chunk-KRJECX7X.js → chunk-5XOLKH66.js} +1 -1
  10. package/dist/chunk-6OFAKLDB.js +2 -0
  11. package/dist/chunk-72NEEJQG.js +1 -0
  12. package/dist/chunk-BCGCJGIV.js +2 -0
  13. package/dist/chunk-GNW63SM6.js +2 -0
  14. package/dist/chunk-JPBW67B3.js +1 -0
  15. package/dist/chunk-MI3ZMVPK.js +2 -0
  16. package/dist/chunk-OT7IPLZE.js +1 -0
  17. package/dist/chunk-OWKAJPOI.js +1 -0
  18. package/dist/chunk-P2SHJMS3.js +1 -0
  19. package/dist/chunk-TYZS5LXQ.js +2 -0
  20. package/dist/chunk-WB66633N.js +1 -0
  21. package/dist/chunk-XEHBTMJQ.js +1 -0
  22. package/dist/chunk-YYI6AY6W.js +2 -0
  23. package/dist/{controlPlane-KVFZ7BR5.js → controlPlane-7E6KGQPP.js} +1 -1
  24. package/dist/coreClient.d.ts +3 -4
  25. package/dist/coreClient.js +1 -1
  26. package/dist/{deviceEnrollment-VACC64CQ.js → deviceEnrollment-CBJYXZ43.js} +2 -2
  27. package/dist/index.d.ts +6 -7
  28. package/dist/index.js +1 -1
  29. package/dist/{ipc-CPnNwv6f.d.ts → ipc-DgzKqHH3.d.ts} +3 -0
  30. package/dist/ipcFactory-4PCGKZIN.js +1 -0
  31. package/dist/native.d.ts +21 -0
  32. package/dist/native.js +1 -0
  33. package/dist/openrtc-5HAYVDHT.js +2 -0
  34. package/dist/openrtc_bg.wasm +0 -0
  35. package/dist/protocol-BSBjMb7p.d.ts +6 -0
  36. package/dist/runtime/WasmRuntimeAdapter.d.ts +4 -5
  37. package/dist/runtime/WasmRuntimeAdapter.js +1 -1
  38. package/dist/runtime/device-status.d.ts +1 -2
  39. package/dist/runtime/factories.d.ts +283 -8
  40. package/dist/runtime/factories.js +1 -1
  41. package/dist/runtime/index.d.ts +13 -160
  42. package/dist/runtime/index.js +1 -1
  43. package/dist/testing/native.d.ts +11 -0
  44. package/dist/testing/native.js +1 -0
  45. package/dist/testing.d.ts +13 -19
  46. package/dist/testing.js +1 -1
  47. package/dist/transport/index.d.ts +7 -18
  48. package/dist/transport/index.js +1 -1
  49. package/dist/{types--jQzenZR.d.ts → types-BArEthJr.d.ts} +178 -10
  50. package/package.json +11 -2
  51. package/dist/DelegatingRuntimeAdapter-DE4LTGAJ.d.ts +0 -399
  52. package/dist/IpcRuntimeAdapter-CE0va9Tr.d.ts +0 -19
  53. package/dist/WasmBridge-75F6GKHG.js +0 -1
  54. package/dist/chunk-2L6ULC32.js +0 -1
  55. package/dist/chunk-2SUSPEC4.js +0 -1
  56. package/dist/chunk-7BJKDBLP.js +0 -2
  57. package/dist/chunk-DUY34MGT.js +0 -1
  58. package/dist/chunk-HEAJ7ZUR.js +0 -1
  59. package/dist/chunk-HUG5AX7R.js +0 -1
  60. package/dist/chunk-Q6KXVTSH.js +0 -2
  61. package/dist/chunk-R35AWMNY.js +0 -1
  62. package/dist/chunk-UILOGUOU.js +0 -1
  63. package/dist/chunk-WA434EWD.js +0 -2
  64. package/dist/chunk-XAL4T6TB.js +0 -3
  65. package/dist/chunk-Z2IS6NH2.js +0 -2
  66. package/dist/ipcFactory-32R47AVK.js +0 -1
  67. package/dist/openrtc-4EZPCHWM.js +0 -2
  68. package/dist/types-DDhMQkK8.d.ts +0 -621
@@ -0,0 +1,150 @@
1
+ import { z as DiscoveryMode, B as AuthMode, E as SignalingMode, F as ClientOptions, H as ExplicitFileDataSendParams, K as ISignalingBackend, N as RuntimeIdentity, A as AuthContext, O as RoomMember, Q as Device, T as DeviceStatusSnapshot, g as PeerSessionSnapshot, j as ResolvedPeerIdentity, U as ManagedConnectionRecord, V as SignalingEnvelope, W as DeviceEvent, X as DesiredPeerProjection, Y as SignalingSession, Z as SessionEvent, _ as LocalDeviceInfo, $ as NativeManagedSessionStartResult, c as ProtocolName, G as GrantScope, a0 as BackendPeerBiStream, a1 as BackendPeerUniStream, a2 as PortableMediaPublish, a3 as PortableMediaPublicationStart, a4 as PortableMediaSample, a5 as PortableMediaChunk, a6 as PortableMediaControl, a7 as NativeConnectParams, a8 as NativeConnectResult, a9 as BackendConnectionState, aa as NativePeerDataEvent } from './Connection-DZ5eP5hL.js';
2
+ import { R as RuntimeCapabilities } from './capabilities-B2mHv_H7.js';
3
+
4
+ /** Host-neutral configuration shared by browser/WASM and native/IPC adapters. */
5
+ interface RuntimeBridgeOptions {
6
+ apiKey?: string;
7
+ discoveryMode?: DiscoveryMode;
8
+ space?: string;
9
+ spaceKey?: string;
10
+ authMode?: AuthMode;
11
+ signalingMode?: SignalingMode;
12
+ projectId?: string;
13
+ coordinationGateway?: ClientOptions['coordinationGateway'];
14
+ coordinationAvenueOverride?: ClientOptions['coordinationAvenueOverride'];
15
+ coordinationRoomGossipFanout?: ClientOptions['coordinationRoomGossipFanout'];
16
+ attestationTokenProvider?: ClientOptions['attestationTokenProvider'];
17
+ /** Internal host hint used by the provider-neutral gateway projection. */
18
+ coordinationPlatformType?: string;
19
+ storagePrefix?: string;
20
+ deviceIdPersistence?: 'persistent' | 'ephemeral';
21
+ endpointIdPersistence?: 'persistent' | 'ephemeral';
22
+ nodeIdPersistence?: 'persistent' | 'ephemeral';
23
+ localDeviceId?: string;
24
+ deviceName?: string;
25
+ turnCredentialsProvider?: () => Promise<{
26
+ iceServers?: RTCIceServer[];
27
+ } | null | undefined>;
28
+ applicationCrypto?: ExplicitFileDataSendParams['applicationCrypto'];
29
+ spaceTokenProvider?: ClientOptions['spaceTokenProvider'];
30
+ spaceAuth?: 'scoped-token';
31
+ }
32
+
33
+ declare abstract class DelegatingRuntimeAdapter implements ISignalingBackend {
34
+ protected readonly backend: ISignalingBackend;
35
+ protected constructor(backend: ISignalingBackend);
36
+ get currentUser(): RuntimeIdentity | null;
37
+ setAuthContext(context: AuthContext | null): Promise<void> | void;
38
+ signInAnonymously(): Promise<void>;
39
+ signInWithPluto(): Promise<void>;
40
+ signOut(): Promise<void>;
41
+ stopAuthActivity(): Promise<void>;
42
+ usesCoordinationGateway(): boolean;
43
+ joinCoordinationRoom(roomId: string, nodeId: string, ticket: string): Promise<void>;
44
+ leaveCoordinationRoom(roomId: string): Promise<void>;
45
+ getCoordinationRoomMembers(roomId: string): Promise<RoomMember[]>;
46
+ watchCoordinationRoomMembers(roomId: string, callback: (members: RoomMember[]) => void): () => void;
47
+ getTurnCredentials(): Promise<any>;
48
+ updatePresence(localNodeId: string, ticketStr: string, isOnline: boolean, ttlMs: number, metadata?: string): Promise<void>;
49
+ refreshLivePresence(localNodeId: string, ticketStr: string, metadata?: string): Promise<void>;
50
+ setOffline(localNodeId: string): Promise<void>;
51
+ cleanupStaleDevices(): Promise<void>;
52
+ searchDevices(excludeNodeId?: string): Promise<Device[]>;
53
+ listDeviceStatus(): Promise<DeviceStatusSnapshot[]>;
54
+ getPeerSession(id: string): Promise<PeerSessionSnapshot | null>;
55
+ listPeerSessions(): Promise<PeerSessionSnapshot[]>;
56
+ waitForSettledPeer(id: string, timeoutMs?: number): Promise<PeerSessionSnapshot | null>;
57
+ resolvePeerIdentity(id: string): Promise<ResolvedPeerIdentity>;
58
+ resolvePeerRecords(id: string): Promise<ManagedConnectionRecord[]>;
59
+ updateDevice(deviceId: string, updates: {
60
+ deviceName?: string;
61
+ capabilities?: Device['capabilities'];
62
+ metadata?: string;
63
+ }): Promise<void>;
64
+ deleteDevice(deviceId: string): Promise<void>;
65
+ onDevicesChange(callback: (devices: Device[]) => void, excludeNodeId?: string): () => void;
66
+ onAuthChange(callback: (user: RuntimeIdentity | null) => void): () => void;
67
+ checkForSSOToken(): Promise<void>;
68
+ waitForAuth(): Promise<void>;
69
+ sendMessage(targetId: string, payload: string, state?: string, replyPayload?: string): Promise<string>;
70
+ pollMessages(targetId: string): Promise<SignalingEnvelope[]>;
71
+ watchFriendDevices(friendUserIds: string[], callback: (friendDevices: Map<string, Device[]>) => void): () => void;
72
+ updateFriendTicket(friendTicket: string | null): Promise<void>;
73
+ subscribeDevices(userId: string): Promise<ReadableStream<DeviceEvent[]>>;
74
+ startAutoConnect(userId: string, localDeviceId: string): void;
75
+ submitDesiredPeerProjection(revision: number, peers: DesiredPeerProjection[]): Promise<void>;
76
+ startPresenceLoop(userId: string, localNodeId: string, deviceName: string, ticket: string, metadata?: string): void;
77
+ createSession(session: SignalingSession): Promise<void>;
78
+ updateSession(sessionId: string, updateData: any): Promise<void>;
79
+ subscribeSessions(localDeviceId: string): Promise<ReadableStream<SessionEvent[]>>;
80
+ forceReconnect(): void;
81
+ getLocalDeviceId(): Promise<string | null>;
82
+ getLocalDeviceInfo(): Promise<LocalDeviceInfo | null>;
83
+ updateDeviceName(deviceName: string): Promise<LocalDeviceInfo | null>;
84
+ startNativeSession(options: {
85
+ userId: string;
86
+ deviceName?: string;
87
+ localDeviceId?: string | null;
88
+ metadata?: string;
89
+ autoConnect?: boolean;
90
+ presence?: boolean;
91
+ }): Promise<NativeManagedSessionStartResult>;
92
+ notifyNetworkChange(options?: {
93
+ reason?: string;
94
+ }): Promise<unknown>;
95
+ setTransportPriority(priority: ProtocolName[]): Promise<void>;
96
+ getManagedNodeId(options?: {
97
+ initializeIfMissing?: boolean;
98
+ }): Promise<string | null>;
99
+ startPresence(userId: string, localNodeId: string, deviceName: string, ticket: string, metadata?: string): Promise<void>;
100
+ startAutoConnectOnce(userId: string, localDeviceId: string): Promise<void>;
101
+ getEndpointTicket(): Promise<string>;
102
+ getTicketWithToken(scope: GrantScope, maxConnections: number): Promise<string | null>;
103
+ registerSessionToken(token: string, scope: GrantScope, maxConnections: number, expiresAtMs?: number): Promise<void>;
104
+ revokeTokens(scope: GrantScope): Promise<string[]>;
105
+ openPeerBi(id: string, timeoutMs?: number): Promise<BackendPeerBiStream>;
106
+ incoming_streams(): Promise<ReadableStream<unknown>>;
107
+ incoming_projected_streams(): Promise<ReadableStream<unknown>>;
108
+ projectedIncomingStreamSource(): {
109
+ incoming_streams: () => Promise<ReadableStream<unknown>>;
110
+ isCurrentTransport?: (endpointId: string, transportStableId: bigint) => Promise<boolean>;
111
+ };
112
+ isCurrentTransport(endpointId: string, transportStableId: bigint): Promise<boolean>;
113
+ openPeerBiRaw(id: string, timeoutMs?: number): Promise<BackendPeerBiStream>;
114
+ openPeerUni(id: string, timeoutMs?: number): Promise<BackendPeerUniStream>;
115
+ beginOpenRtcMediaPublication(input: Omit<PortableMediaPublish, 'mediaGeneration'>): Promise<PortableMediaPublicationStart>;
116
+ encodeOpenRtcMediaSample(input: PortableMediaSample): Promise<Uint8Array>;
117
+ pauseOpenRtcMediaPublication(publicationId: string): Promise<void>;
118
+ retireOpenRtcMediaPublication(publicationId: string): Promise<void>;
119
+ retireOpenRtcMediaReceiver(publicationId: string, mediaGeneration: number): Promise<void>;
120
+ decodeOpenRtcMediaChunk(encoded: Uint8Array): Promise<PortableMediaChunk>;
121
+ decodeOpenRtcMediaControl(encoded: Uint8Array): Promise<PortableMediaControl>;
122
+ connectToDevice(params: NativeConnectParams): Promise<NativeConnectResult>;
123
+ disconnectDevice(deviceId: string): Promise<void>;
124
+ excludeAutoConnect(deviceId: string, excluded: boolean): Promise<void>;
125
+ isConnected(nodeId: string): Promise<boolean>;
126
+ getConnectionStates(): Promise<BackendConnectionState[]>;
127
+ onStateChange(callback: (state: BackendConnectionState) => void): Promise<() => void> | (() => void);
128
+ /** @deprecated Use named channels or `openrtc-file-transfer`. */
129
+ sendExplicitFilePath(connectionId: string, filePath: string, transferId?: string): Promise<string>;
130
+ /** @deprecated Use named channels or `openrtc-file-transfer`. */
131
+ sendExplicitFileData(params: ExplicitFileDataSendParams): Promise<void>;
132
+ /** @deprecated Transfer history belongs to the consumer application. */
133
+ getTransferHistory(limit?: number): Promise<Array<[string, unknown]>>;
134
+ /** @deprecated Transfer history belongs to the consumer application. */
135
+ deleteTransferJob(jobId: string): Promise<void>;
136
+ sendPeerMessage(id: string, payload: Uint8Array): Promise<void>;
137
+ onPeerMessage(callback: (event: NativePeerDataEvent) => void): Promise<() => void> | (() => void);
138
+ capabilities(): RuntimeCapabilities;
139
+ onIncomingNativeMessage(callback: (connectionId: string, remoteNodeId: string | null, message: any) => void): Promise<() => void>;
140
+ unwrap(): ISignalingBackend;
141
+ /**
142
+ * Forward setCoreClient() to the inner backend if it implements it. This
143
+ * lets the core Client inject a reference into backends (e.g. WasmBridge)
144
+ * that need to escalate transport-level dials into full Client.connect()
145
+ * handshakes.
146
+ */
147
+ setCoreClient(client: unknown): void;
148
+ }
149
+
150
+ export { DelegatingRuntimeAdapter as D, type RuntimeBridgeOptions as R };
@@ -0,0 +1,80 @@
1
+ import { R as RuntimeBridgeOptions, D as DelegatingRuntimeAdapter } from './DelegatingRuntimeAdapter-4cgiIWMN.js';
2
+ import { P as PlutoIpcBridge } from './ipc-DgzKqHH3.js';
3
+ import { a9 as BackendConnectionState, aa as NativePeerDataEvent } from './Connection-DZ5eP5hL.js';
4
+
5
+ interface NativeIpcBridgeOptions extends RuntimeBridgeOptions {
6
+ ipcBridge?: PlutoIpcBridge;
7
+ }
8
+
9
+ /**
10
+ * Root-client owner for the one native WebView projection.
11
+ *
12
+ * Owner: one `OpenRTC.native(...)` root client.
13
+ * Consumers: capability runtimes registered by that root.
14
+ * Introduced: 2026-08-26; capability-scoped fan-out: 2026-08-27.
15
+ *
16
+ * Rust authenticates, classifies, generation-fences, and tags every projected
17
+ * descriptor with its authoritative capability key. This broker owns only the
18
+ * one physical Tauri Channel and bounded fan-out to the matching capability.
19
+ * It never dials, retries, admits, selects carriers, or invents a scope.
20
+ */
21
+ interface NativeProjectionHost {
22
+ incoming_projected_streams(): Promise<ReadableStream<NativeRootProjectionEvent>>;
23
+ isCurrentTransport(endpointId: string, transportStableId: bigint): Promise<boolean>;
24
+ }
25
+ interface NativeProjectedStreamSource {
26
+ readonly __openrtcNativeCapabilityProjection: true;
27
+ readonly capabilityKey: string;
28
+ incoming_streams(): Promise<ReadableStream<unknown>>;
29
+ onStateChange(callback: (state: BackendConnectionState) => void): () => void;
30
+ onPeerMessage(callback: (event: NativePeerDataEvent) => void): () => void;
31
+ isCurrentTransport(endpointId: string, transportStableId: bigint): Promise<boolean>;
32
+ }
33
+ type NativeRootProjectionEvent = {
34
+ kind: 'connection-state';
35
+ capabilityKeys: readonly string[];
36
+ payload: BackendConnectionState;
37
+ } | {
38
+ kind: 'peer-data';
39
+ capabilityKeys: readonly string[];
40
+ payload: NativePeerDataEvent;
41
+ } | {
42
+ kind: 'stream';
43
+ capabilityKeys: readonly string[];
44
+ payload: unknown;
45
+ };
46
+ declare class NativeProjectionBroker {
47
+ private host;
48
+ private readonly consumers;
49
+ private hostReader;
50
+ private hostPump;
51
+ private closed;
52
+ register(capabilityKey: string, host: NativeProjectionHost): NativeProjectedStreamSource;
53
+ unregister(capabilityKey: string): void;
54
+ private subscribeState;
55
+ private subscribePeerData;
56
+ private requireConsumer;
57
+ private currentHost;
58
+ private incomingStreams;
59
+ private ensureHostPump;
60
+ private pumpHost;
61
+ private hasActiveConsumers;
62
+ private cancelHostReaderIfIdle;
63
+ private cancelHostReader;
64
+ close(): Promise<void>;
65
+ }
66
+
67
+ interface IpcAdapterOptions extends NativeIpcBridgeOptions {
68
+ bridge: PlutoIpcBridge;
69
+ projectionBroker: NativeProjectionBroker;
70
+ }
71
+ declare class IpcRuntimeAdapter extends DelegatingRuntimeAdapter {
72
+ private readonly projectionBroker;
73
+ private readonly capabilityKey;
74
+ private readonly projectedSource;
75
+ constructor(options: IpcAdapterOptions);
76
+ projectedIncomingStreamSource(): NativeProjectedStreamSource;
77
+ releaseNativeCapability(): Promise<void>;
78
+ }
79
+
80
+ export { IpcRuntimeAdapter as I, NativeProjectionBroker as N, type IpcAdapterOptions as a };
@@ -0,0 +1 @@
1
+ export{a as WasmBridge}from'./chunk-YYI6AY6W.js';import'./chunk-GNW63SM6.js';import'./chunk-OT7IPLZE.js';import'./chunk-AJQVMVYW.js';import'./chunk-JPBW67B3.js';import'./chunk-MI3ZMVPK.js';import'./chunk-OWKAJPOI.js';import'./chunk-2GX6GB6L.js';
@@ -1,6 +1,5 @@
1
- import { R as RuntimePeerState, g as ConnectionState, b as PeerReadiness, P as PeerConnectOptions, a as Connection, I as IncomingStream, o as RuntimeClientOptions, r as RuntimeAuthIdentity, A as AuthContext, L as LocalDeviceInfo, l as DeviceProfile, B as BrowserProtocolStore, N as NamespaceDescriptor, p as IrohMutationReceipt, q as IrohDocEntry, e as RuntimeDevice, M as ManagedOptions, j as ManagedSession, D as DeviceStatus, k as DeviceConnectOptions, s as RuntimeSession, J as JoinRoomOptions, n as RuntimeRoomMember, t as ConnectionTarget, S as ScopedChannelOptions, f as ScopedLogicalChannel, d as PeerStreamOptions, m as RawConnection, C as ChannelDescriptor, u as PresenceLoopOptions, c as RuntimePeerHealth, h as ReadinessOptions, i as ConnectionEvent } from './types-DDhMQkK8.js';
2
- import { G as GrantScope, I as ISignalingBackend, f as ConnectDeviceHooks, g as ConnectDeviceOptions, C as ConnectDeviceResult, M as ManagedConnectionRecord, d as PeerSessionSnapshot, e as ResolvedPeerIdentity, a6 as AppLimits, N as NativeConnectParams, t as NativeConnectResult, E as ExplicitFileDataSendParams } from './ITransport-CjxCQ6q7.js';
3
- import { R as RuntimeCapabilities, C as CapabilityProfile } from './capabilities-BPuynml5.js';
1
+ import { d as RuntimePeerState, n as ConnectionState, h as PeerReadiness, e as PeerConnectOptions, f as Connection, I as IncomingStream, G as GrantScope, y as RuntimeClientOptions, K as ISignalingBackend, ap as RuntimeAuthIdentity, A as AuthContext, c as ProtocolName, L as LocalDeviceInfo, v as DeviceProfile, ae as BrowserProtocolStore, af as NamespaceDescriptor, ag as IrohMutationReceipt, ah as IrohDocEntry, l as RuntimeDevice, M as ManagedOptions, q as ManagedSession, D as DeviceStatus, t as ConnectDeviceHooks, u as ConnectDeviceOptions, s as ConnectDeviceResult, r as DeviceConnectOptions, U as ManagedConnectionRecord, g as PeerSessionSnapshot, j as ResolvedPeerIdentity, aq as RuntimeSession, ar as AppLimits, J as JoinRoomOptions, x as RuntimeRoomMember, as as ConnectionTarget, S as ScopedChannelOptions, m as ScopedLogicalChannel, k as PeerStreamOptions, a7 as NativeConnectParams, a8 as NativeConnectResult, w as RawConnection, C as ChannelDescriptor, H as ExplicitFileDataSendParams, at as PresenceLoopOptions, i as RuntimePeerHealth, o as ReadinessOptions, p as ConnectionEvent } from './Connection-DZ5eP5hL.js';
2
+ import { R as RuntimeCapabilities, C as CapabilityProfile } from './capabilities-B2mHv_H7.js';
4
3
 
5
4
  /**
6
5
  * Coalesced peer reconciliation scheduler and full reconcile orchestration.
@@ -121,10 +120,10 @@ interface Session {
121
120
  * | --(failure)--> `idle`
122
121
  * `<any>` --(shutdown)--> `closed`
123
122
  *
124
- * WebRTC upgrade/readiness is intentionally absent from this actor. The
125
- * runtime `Connection`/peer lifecycle owns transport promotion. Actor callers
126
- * may observe that lifecycle separately, but this handle must not become a
127
- * second WebRTC-ready emitter.
123
+ * Physical-carrier readiness is intentionally absent from this actor. The
124
+ * Rust runtime peer lifecycle owns carrier promotion. Actor callers may
125
+ * observe that lifecycle separately, but this handle must not become a second
126
+ * carrier-ready emitter.
128
127
  *
129
128
  * The Rust actor has a similar shape but is inactive scaffolding in the current
130
129
  * workspace. Treat the two implementations as migration debt, not redundant
@@ -213,6 +212,12 @@ declare class DriveGrantActorRegistry {
213
212
  constructor(factory: (key: DriveGrantConnectionKey) => DriveGrantActorHandle);
214
213
  getOrSpawn(key: DriveGrantConnectionKey, factoryOverride?: (key: DriveGrantConnectionKey) => DriveGrantActorHandle): DriveGrantActorHandle;
215
214
  get(key: DriveGrantConnectionKey): DriveGrantActorHandle | null;
215
+ /**
216
+ * Remove and close `handle` only while it is still the registered actor for
217
+ * `key`. The identity fence prevents a late failed dial from retiring a
218
+ * newer observer handle that has already replaced it.
219
+ */
220
+ retireIfCurrent(key: DriveGrantConnectionKey, handle: DriveGrantActorHandle): Promise<boolean>;
216
221
  /** Tear down every actor; clears the registry. */
217
222
  shutdownAll(): Promise<void>;
218
223
  size(): number;
@@ -281,12 +286,14 @@ declare class RuntimeClient {
281
286
  private readonly deviceManager;
282
287
  private readonly peerManager;
283
288
  private readonly connectionController;
284
- private readonly nativeStreamConsumer;
289
+ private readonly nativeConnectionProjection;
290
+ private nativeProjectionLocalNodeId;
285
291
  private managedSessionKey;
286
292
  private managedSessionUserId;
287
293
  private managedSessionOptions;
288
294
  private managedSessionTransition;
289
295
  private managedSessionStartInFlight;
296
+ private browserInitialization;
290
297
  private terminalShutdown;
291
298
  private readonly managedReconciliationTasks;
292
299
  private readonly managedReconciliationFollowupTimers;
@@ -335,10 +342,16 @@ declare class RuntimeClient {
335
342
  localNodeId?: string;
336
343
  userId?: string;
337
344
  }>;
345
+ /**
346
+ * Updates application route preference while leaving carrier eligibility,
347
+ * connection replacement, and settlement with the Rust/WASM peer owner.
348
+ */
349
+ setTransportPriority(priority: ProtocolName[]): Promise<void>;
338
350
  reconciliationStats(): Readonly<PeerReconciliationStats>;
339
351
  getRuntimePolicy(): PolicySnapshot;
340
352
  capabilities(): RuntimeCapabilities;
341
353
  getCapabilityProfile(): CapabilityProfile;
354
+ private attachNativeIncomingProjection;
342
355
  start(options?: {
343
356
  clearSessionTokens?: boolean;
344
357
  }): Promise<void>;
@@ -549,21 +562,25 @@ declare class RuntimeClient {
549
562
  readable: ReadableStream<Uint8Array>;
550
563
  writable: WritableStream<Uint8Array>;
551
564
  }>;
552
- openPeerNativeBi(id: string, label: string, options?: PeerStreamOptions): Promise<{
553
- connection: Connection;
554
- readable: ReadableStream<Uint8Array>;
555
- writable: WritableStream<Uint8Array>;
556
- }>;
557
- /** Like openPeerBi but skips the settled_ready requirement — usable for latency probes. */
558
- openPeerBiRaw(id: string, options?: PeerStreamOptions): Promise<{
559
- connection: Connection;
560
- readable: ReadableStream<Uint8Array>;
561
- writable: WritableStream<Uint8Array>;
562
- }>;
565
+ /**
566
+ * Restricted registered-diagnostic path. This is deliberately not part of
567
+ * the public RuntimeClient surface; openStream reaches it only for a
568
+ * registry-owned channel whose readiness is explicitly transport-only.
569
+ */
570
+ private openPeerBiRaw;
563
571
  openPeerUni(id: string, options?: PeerStreamOptions): Promise<{
564
572
  connection: Connection;
565
573
  writable: WritableStream<Uint8Array>;
566
574
  }>;
575
+ pauseOpenRtcMediaPublication(publicationId: string): Promise<void>;
576
+ retireOpenRtcMediaPublication(publicationId: string): Promise<void>;
577
+ retireOpenRtcMediaReceiver(publicationId: string, mediaGeneration: number): Promise<void>;
578
+ /** Send one protected unreliable datagram; there is no reliable fallback. */
579
+ sendPeerDatagram(id: string, payload: Uint8Array, maxAgeMs?: number): Promise<boolean>;
580
+ /** Read one protected unreliable datagram from the current peer generation. */
581
+ receivePeerDatagram(id: string): Promise<Uint8Array>;
582
+ peerDatagramMaxSize(): number;
583
+ createPeerDatagramPolicy(): unknown;
567
584
  private waitForBrowserApplicationCrypto;
568
585
  connectToDevice(params: NativeConnectParams): Promise<NativeConnectResult>;
569
586
  connectRaw(target: ConnectionTarget): Promise<RawConnection>;
@@ -1,4 +1,4 @@
1
- import { c as ProtocolName, R as RouteOptimization } from './ITransport-CjxCQ6q7.js';
1
+ import { c as ProtocolName, R as RouteOptimization } from './Connection-DZ5eP5hL.js';
2
2
 
3
3
  type RuntimeAdapterKind = 'browser-wasm' | 'native-ipc' | 'tauri-ipc' | 'unknown';
4
4
  interface RuntimeCapabilities {
@@ -11,9 +11,7 @@ interface RuntimeCapabilities {
11
11
  transport: {
12
12
  irohQuic: boolean;
13
13
  irohLan: boolean;
14
- webRtcUpgrade: boolean;
15
- webRtcLan: boolean;
16
- nativeWebRtc: boolean;
14
+ webRtc: boolean;
17
15
  moq: boolean;
18
16
  ble: boolean;
19
17
  wasm: boolean;
@@ -47,7 +45,6 @@ interface CapabilityProfile {
47
45
  irohRelay: boolean;
48
46
  irohLan: boolean;
49
47
  webRtc: boolean;
50
- webRtcLan: boolean;
51
48
  moq: boolean;
52
49
  ble: boolean;
53
50
  };
@@ -70,7 +67,6 @@ interface NativeRuntimeStatus {
70
67
  irohQuic?: TransportStatus;
71
68
  irohLan?: TransportStatus;
72
69
  webRtc?: TransportStatus;
73
- webRtcLan?: TransportStatus;
74
70
  moq?: TransportStatus;
75
71
  ble?: TransportStatus;
76
72
  irohRelayOnly?: boolean;
@@ -0,0 +1 @@
1
+ var o=["iroh-relay","moq","iroh"],s=new Set(["iroh","iroh-quic","iroh-relay","iroh-lan","webrtc","moq","ble"]);function y(r){return r?.filter(t=>s.has(t))}function l(r){return (Array.isArray(r.urls)?r.urls:[r.urls]).some(e=>typeof e=="string"&&(e.startsWith("turn:")||e.startsWith("turns:")))}function u(r){let e=(Array.isArray(r.urls)?r.urls:[r.urls]).filter(n=>typeof n=="string"&&!n.startsWith("stun:"));return e.length===0?null:{...r,urls:Array.isArray(r.urls)?e:e[0]}}function a(r){let e=(Array.isArray(r.urls)?r.urls:[r.urls]).filter(n=>{let i=typeof n=="string"?n.trim().toLowerCase():"";return !i.startsWith("turn:")&&!i.startsWith("turns:")});return e.length===0?null:{...r,urls:Array.isArray(r.urls)?e:e[0]}}function c(r){return r?.map(t=>a(t)).filter(t=>t!==null)}function f(r){if(r)return r.map(t=>u(t)).filter(t=>t!==null)}function T(r,t){let e=new Set(["iroh-relay","moq","iroh"]);t&&e.add("webrtc");let n=(r??o).filter(i=>e.has(i));return n.length>0?n:[...o]}function C(r,t){let e=r?.transports?.webrtc;if(e)return e===true?{}:d(r,t)}function d(r,t){let e=r?.transports?.webrtc||void 0;if(e)return r?.transports?.relay===false?{...e,useTurn:false,privacyMode:false,iceTransportPolicy:"all",iceServers:c(e.iceServers)}:r?.strictMode||r?.transports?.privacy==="relay-only"||e.privacyMode?{...e,iceServers:f(e.iceServers),iceTransportPolicy:"relay"}:e.iceTransportPolicy==="relay"&&!(Array.isArray(e.iceServers)&&e.iceServers.some(i=>l(i)))?(t?.("[Client] Overriding relay-only ICE policy to all because no TURN servers are configured"),{...e,iceTransportPolicy:"all"}):e}export{y as a,l as b,f as c,T as d,C as e};