openrtc 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DelegatingRuntimeAdapter-K-B_ElEc.d.ts → DelegatingRuntimeAdapter-ew5WdyxA.d.ts} +5 -2
- package/dist/{assembly-DiR_2Qp7.d.ts → assembly-CXj9yrhu.d.ts} +8 -8
- package/dist/auth/index.d.ts +2 -1
- package/dist/auth/index.js +1 -1
- package/dist/auth/internal.d.ts +1 -0
- package/dist/auth/internal.js +1 -1
- package/dist/{capabilities-C4Dqs_pB.d.ts → capabilities-CaqXOIUU.d.ts} +2 -2
- package/dist/{chunk-JJWS2LYK.js → chunk-2QFNPBOZ.js} +2 -2
- package/dist/chunk-5CJVJDPY.js +2 -0
- package/dist/chunk-EQ5BQO3B.js +3 -0
- package/dist/chunk-KLDDCOZ7.js +2 -0
- package/dist/chunk-KPPJMTHP.js +2 -0
- package/dist/chunk-RZPWE4WH.js +1 -0
- package/dist/chunk-SY6YGCXA.js +2 -0
- package/dist/{chunk-IU57RAB3.js → chunk-YR2WJPGT.js} +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +1 -1
- package/dist/native.d.ts +6 -6
- package/dist/native.js +1 -1
- package/dist/openrtc_bg.wasm +0 -0
- package/dist/runtime/WasmRuntimeAdapter.d.ts +3 -3
- package/dist/runtime/WasmRuntimeAdapter.js +1 -1
- package/dist/runtime/device-status.d.ts +2 -2
- package/dist/runtime/index.d.ts +21 -170
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/tauri.d.ts +4 -4
- package/dist/runtime/tauri.js +1 -1
- package/dist/{spaceTokens-BjtMfh14.d.ts → spaceTokens-D2zInUAM.d.ts} +4 -4
- package/dist/{tauri-VwfPg-zt.d.ts → tauri-Briw2Hf9.d.ts} +2 -2
- package/dist/transport/index.d.ts +2 -2
- package/dist/{types-CC6PiV2m.d.ts → types-BDtleofB.d.ts} +39 -2
- package/dist/{types-vbfYvAZu.d.ts → types-BfEvaxS7.d.ts} +31 -6
- package/package.json +3 -3
- package/dist/chunk-B6ZCYM46.js +0 -2
- package/dist/chunk-F3P2RCH5.js +0 -2
- package/dist/chunk-HBMXO563.js +0 -2
- package/dist/chunk-POUO36QG.js +0 -2
- package/dist/chunk-V64AKZHT.js +0 -1
- package/dist/chunk-VOLTY4MH.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as WasmRuntimeAdapter}from'../chunk-
|
|
1
|
+
export{a as WasmRuntimeAdapter}from'../chunk-RZPWE4WH.js';import'../chunk-KLDDCOZ7.js';import'../chunk-QT2ASNI3.js';import'../chunk-SY6YGCXA.js';import'../chunk-C7YN5MSV.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as RuntimeDevice, d as RuntimeDeviceStatusSnapshot } from '../types-
|
|
1
|
+
import { c as RuntimeDevice, d as RuntimeDeviceStatusSnapshot } from '../types-BfEvaxS7.js';
|
|
2
2
|
import '../IEngineBridge-C7OT2CRv.js';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-BDtleofB.js';
|
|
4
4
|
|
|
5
5
|
interface RuntimeDeviceActiveOptions {
|
|
6
6
|
now?: number;
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,155 +1,20 @@
|
|
|
1
|
-
import { e as RuntimeFactoryOptions, b as PlutoRuntimeAssembly, P as PeerReconciliationStats } from '../assembly-
|
|
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-
|
|
1
|
+
import { e as RuntimeFactoryOptions, b as PlutoRuntimeAssembly, P as PeerReconciliationStats } from '../assembly-CXj9yrhu.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-CXj9yrhu.js';
|
|
3
3
|
import * as Draft14 from '@moq/net';
|
|
4
|
-
import {
|
|
5
|
-
import { C as Connection, K as RuntimeConnectionTarget, v as RuntimeRawConnection } from '../types-
|
|
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-
|
|
7
|
-
import {
|
|
8
|
-
|
|
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';
|
|
4
|
+
import { a4 as SignalingOptions, I as ISignalingBackend, f as RuntimeIdentity, g as RoomMember, j as SignalingEnvelope, m as SignalingSession, h as Device, l as DesiredPeerProjection, r as BackendConnectionState, Y as AppLimits, G as GrantScope, K as JoinRoomOptions, z as IncomingStreamChannelMetadata, X as ApplicationCryptoStreamTools, a5 as RoomCreationMode, e as ClientOptions, t as ApplicationPayloadCrypto, D as DiscoveryMode, W as ProtocolCapabilityMap, a6 as ScanningLoopOptions, a7 as ScanningLoopHandle, a8 as RuntimeBootstrapOptions, a9 as RuntimeBootstrapResult, u as ApplicationPayloadReadinessOptions, aa as ManagedApplicationRouteOptions, H as PeerState, O as PeerScope, J as PeerHealth, y as ChannelDescriptor, ab as JoinRequest, p as NativeConnectParams, q as NativeConnectResult } from '../types-BDtleofB.js';
|
|
5
|
+
import { C as Connection, K as RuntimeConnectionTarget, v as RuntimeRawConnection } from '../types-BfEvaxS7.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-BfEvaxS7.js';
|
|
7
|
+
import { R as RuntimeCapabilities } from '../capabilities-CaqXOIUU.js';
|
|
8
|
+
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-CaqXOIUU.js';
|
|
10
9
|
export { RuntimeDeviceActiveOptions, isRuntimeDeviceActive, isRuntimeDeviceConnectable, isRuntimeDeviceRoutable } from './device-status.js';
|
|
11
10
|
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-
|
|
13
|
-
export { a as IpcRuntimeAdapterOptions, T as TauriRuntimeAdapter, b as TauriRuntimeAdapterOptions, c as createTauriIpcBridge } from '../tauri-
|
|
11
|
+
import { I as IpcRuntimeAdapter } from '../tauri-Briw2Hf9.js';
|
|
12
|
+
export { a as IpcRuntimeAdapterOptions, T as TauriRuntimeAdapter, b as TauriRuntimeAdapterOptions, c as createTauriIpcBridge } from '../tauri-Briw2Hf9.js';
|
|
14
13
|
import { WasmRuntimeAdapter } from './WasmRuntimeAdapter.js';
|
|
15
14
|
import { P as PlutoIpcBridge } from '../ipc-CflAVodw.js';
|
|
16
15
|
export { N as NativeIpcFailureKind, a as PlutoIpcUnlisten, c as classifyNativeIpcFailure, i as isNativeIpcCommandUnavailable } from '../ipc-CflAVodw.js';
|
|
17
16
|
import '../IEngineBridge-C7OT2CRv.js';
|
|
18
|
-
import '../DelegatingRuntimeAdapter-
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* RtdbPresence — Phase 1 RTDB-backed device presence.
|
|
22
|
-
*
|
|
23
|
-
* Replaces the 60-second Firestore heartbeat loop with Firebase Realtime
|
|
24
|
-
* Database `onDisconnect` hooks. When a client disconnects (tab close,
|
|
25
|
-
* crash, network loss), the RTDB server automatically writes the offline
|
|
26
|
-
* state. A shared `.info/connected` listener republishes desired online state
|
|
27
|
-
* after WebSocket reconnects, and server cleanup compacts old offline nodes.
|
|
28
|
-
*
|
|
29
|
-
* RTDB paths mirror the Firestore device collection paths:
|
|
30
|
-
*
|
|
31
|
-
* space/spaceKey → presence/spaces/{namespaceId}/devices/{deviceId}/instances/{runtimeInstanceId}
|
|
32
|
-
* user-scoped → presence/{appTag}/users/{userId}/devices/{deviceId}/instances/{runtimeInstanceId}
|
|
33
|
-
*
|
|
34
|
-
* Space RTDB paths require scoped Firebase auth
|
|
35
|
-
* (`namespaceId` or `space::{namespaceId}` appTag claim). If that scope is not
|
|
36
|
-
* available, Firestore may still hold the durable ticket record, but it must
|
|
37
|
-
* not become a recurring liveness heartbeat.
|
|
38
|
-
*
|
|
39
|
-
* Ticket version invalidation:
|
|
40
|
-
* Each presence node stores a `ticketVersion` integer. WasmBridge bumps it
|
|
41
|
-
* whenever it publishes a new endpoint ticket. Subscribers compare the
|
|
42
|
-
* received ticketVersion against their cached value; if it differs they
|
|
43
|
-
* re-fetch the full device doc from Firestore when needed. Presence nodes may
|
|
44
|
-
* also carry the current ticket directly so native clients can refresh
|
|
45
|
-
* connection data without using Firestore as a heartbeat bus.
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
interface RtdbDevicePresence {
|
|
49
|
-
online: boolean;
|
|
50
|
-
ticketVersion: number;
|
|
51
|
-
leaseExpiresAt?: number;
|
|
52
|
-
ticket?: string;
|
|
53
|
-
nodeId?: string;
|
|
54
|
-
deviceName?: string;
|
|
55
|
-
platformType?: string;
|
|
56
|
-
metadata?: string;
|
|
57
|
-
excludedPeers?: string[];
|
|
58
|
-
}
|
|
59
|
-
type RtdbPresenceMap = Record<string, RtdbDevicePresence>;
|
|
60
|
-
type DiscoveryPresenceScope = {
|
|
61
|
-
kind: 'user-scoped';
|
|
62
|
-
appTag: string;
|
|
63
|
-
userId: string;
|
|
64
|
-
} | {
|
|
65
|
-
kind: 'space';
|
|
66
|
-
namespaceId: string;
|
|
67
|
-
};
|
|
68
|
-
interface RtdbPresenceRosterFields {
|
|
69
|
-
ticket?: string;
|
|
70
|
-
nodeId?: string;
|
|
71
|
-
deviceName?: string;
|
|
72
|
-
platformType?: string;
|
|
73
|
-
metadata?: string;
|
|
74
|
-
excludedPeers?: string[];
|
|
75
|
-
}
|
|
76
|
-
interface RtdbMemberPresence {
|
|
77
|
-
online: boolean;
|
|
78
|
-
leaseExpiresAt?: number;
|
|
79
|
-
}
|
|
80
|
-
type RtdbRoomPresenceMap = Record<string, RtdbMemberPresence>;
|
|
81
|
-
declare class RtdbPresence {
|
|
82
|
-
private readonly app;
|
|
83
|
-
private readonly auth;
|
|
84
|
-
private readonly db;
|
|
85
|
-
private readonly runtimeInstanceId;
|
|
86
|
-
private readonly desiredOnlineNodes;
|
|
87
|
-
private connected;
|
|
88
|
-
private connectedUnsubscribe;
|
|
89
|
-
private leaseRefreshTimer;
|
|
90
|
-
private readonly activeSubscriptions;
|
|
91
|
-
private readonly economicPresenceLease;
|
|
92
|
-
constructor(app: FirebaseApp, runtimeInstanceId?: string);
|
|
93
|
-
private ensureReconnectWatch;
|
|
94
|
-
private publishDesiredOnline;
|
|
95
|
-
private ensureLeaseRefresh;
|
|
96
|
-
private stopLeaseRefreshIfIdle;
|
|
97
|
-
private registerOnlineNode;
|
|
98
|
-
private markNodeOffline;
|
|
99
|
-
private subscribeIncremental;
|
|
100
|
-
/**
|
|
101
|
-
* Register this device as online in RTDB and set an onDisconnect handler
|
|
102
|
-
* so the server marks it offline automatically on connection loss.
|
|
103
|
-
*
|
|
104
|
-
* Should be called once per session, after the durable Firestore device
|
|
105
|
-
* record exists. Does not replace the Firestore device doc — that remains
|
|
106
|
-
* the durable registry while RTDB owns hot liveness.
|
|
107
|
-
*/
|
|
108
|
-
registerDevice(scope: DiscoveryPresenceScope, deviceId: string, ticketVersion?: number, fields?: RtdbPresenceRosterFields): Promise<void>;
|
|
109
|
-
/**
|
|
110
|
-
* Bump the ticketVersion for a device. Call this whenever a new endpoint
|
|
111
|
-
* ticket is published (e.g. on network change / node restart). Subscribers
|
|
112
|
-
* will see the version change and re-fetch or use the RTDB-carried ticket.
|
|
113
|
-
*/
|
|
114
|
-
bumpTicketVersion(scope: DiscoveryPresenceScope, deviceId: string, newVersion: number, fields?: RtdbPresenceRosterFields): Promise<void>;
|
|
115
|
-
/**
|
|
116
|
-
* Explicitly mark a device offline (graceful disconnect / sign-out).
|
|
117
|
-
* The onDisconnect handler would eventually fire anyway, but calling this
|
|
118
|
-
* immediately on graceful shutdown gives instant feedback to other clients.
|
|
119
|
-
*/
|
|
120
|
-
markOffline(scope: DiscoveryPresenceScope, deviceId: string, ticketVersion?: number): Promise<void>;
|
|
121
|
-
/**
|
|
122
|
-
* Register a room member as online and set an onDisconnect handler.
|
|
123
|
-
* Managed/user-scoped room writes require roomPresenceAcl writer grants.
|
|
124
|
-
*/
|
|
125
|
-
registerRoomMember(appTag: string, roomId: string, memberId: string): Promise<void>;
|
|
126
|
-
/**
|
|
127
|
-
* Explicitly mark a room member offline (graceful leave).
|
|
128
|
-
* The onDisconnect would fire eventually, but calling this immediately
|
|
129
|
-
* gives instant feedback to other members in the room.
|
|
130
|
-
*/
|
|
131
|
-
markRoomMemberOffline(appTag: string, roomId: string, memberId: string): Promise<void>;
|
|
132
|
-
/**
|
|
133
|
-
* Subscribe to all member presence states in a room.
|
|
134
|
-
* Returns an unsubscribe function. The callback receives a map of
|
|
135
|
-
* memberId → { online } whenever any member's liveness changes.
|
|
136
|
-
*
|
|
137
|
-
* Consumers (BrowserFirestoreRooms) overlay this onto the Firestore
|
|
138
|
-
* member roster to show which members are currently alive vs. ghost entries.
|
|
139
|
-
*/
|
|
140
|
-
onRoomPresenceChange(appTag: string, roomId: string, callback: (presenceMap: RtdbRoomPresenceMap) => void): () => void;
|
|
141
|
-
/**
|
|
142
|
-
* Subscribe to all device presence states in a discovery scope.
|
|
143
|
-
*
|
|
144
|
-
* Returns an unsubscribe function. The callback receives the full map of
|
|
145
|
-
* deviceId -> { online, ticketVersion, ...roster fields } whenever any
|
|
146
|
-
* device's presence changes. Firestore remains the durable roster; RTDB
|
|
147
|
-
* carries enough fields to keep discovery usable during short Firestore
|
|
148
|
-
* offline windows.
|
|
149
|
-
*/
|
|
150
|
-
onPresenceChange(scope: DiscoveryPresenceScope, callback: (presenceMap: RtdbPresenceMap) => void): () => void;
|
|
151
|
-
readPresenceMap(scope: DiscoveryPresenceScope): Promise<RtdbPresenceMap>;
|
|
152
|
-
}
|
|
17
|
+
import '../DelegatingRuntimeAdapter-ew5WdyxA.js';
|
|
153
18
|
|
|
154
19
|
declare class Signaling {
|
|
155
20
|
private readonly appTag;
|
|
@@ -158,7 +23,6 @@ declare class Signaling {
|
|
|
158
23
|
get tag(): string;
|
|
159
24
|
waitForAuth(): Promise<void>;
|
|
160
25
|
get currentUser(): RuntimeIdentity | null;
|
|
161
|
-
getRtdbPresence(): RtdbPresence | null;
|
|
162
26
|
usesCoordinationGateway(): boolean;
|
|
163
27
|
joinCoordinationRoom(roomId: string, nodeId: string, ticket: string): Promise<void>;
|
|
164
28
|
leaveCoordinationRoom(roomId: string): Promise<void>;
|
|
@@ -187,6 +51,7 @@ declare class Signaling {
|
|
|
187
51
|
deleteDevice(deviceId: string): Promise<void>;
|
|
188
52
|
onDevicesChange(callback: (devices: Device[]) => void, excludeNodeId?: string): () => void;
|
|
189
53
|
startAutoConnect(userId: string, localDeviceId: string): void;
|
|
54
|
+
submitDesiredPeerProjection(revision: number, peers: DesiredPeerProjection[]): Promise<void>;
|
|
190
55
|
notifyDisconnectRequested(remoteNodeId: string): void;
|
|
191
56
|
startPresenceLoop(userId: string, localNodeId: string, deviceName: string, ticket: string, metadata?: string): void;
|
|
192
57
|
forceReconnectSnapshot(): void;
|
|
@@ -281,6 +146,12 @@ interface MoQPublisherOptions {
|
|
|
281
146
|
maxSubscribedTracks?: number;
|
|
282
147
|
maxActivePublishers?: number;
|
|
283
148
|
maxTrackIdChars?: number;
|
|
149
|
+
/**
|
|
150
|
+
* Reject an application object before it reaches a relay track. This must
|
|
151
|
+
* match the receiver-side default so browser and native clients apply the
|
|
152
|
+
* same hard egress boundary.
|
|
153
|
+
*/
|
|
154
|
+
maxObjectPayloadBytes?: number;
|
|
284
155
|
}
|
|
285
156
|
interface TrackPublisher {
|
|
286
157
|
close(): void;
|
|
@@ -299,6 +170,7 @@ declare class MoQPublisher {
|
|
|
299
170
|
private readonly maxSubscribedTracks;
|
|
300
171
|
private readonly maxActivePublishers;
|
|
301
172
|
private readonly maxTrackIdChars;
|
|
173
|
+
private readonly maxObjectPayloadBytes;
|
|
302
174
|
private closed;
|
|
303
175
|
constructor(session: MoQSession, options?: MoQPublisherOptions);
|
|
304
176
|
announce(namespace: string): Promise<void>;
|
|
@@ -335,26 +207,14 @@ interface RoomClientHost {
|
|
|
335
207
|
getNodeId(): Promise<string>;
|
|
336
208
|
connect(ticket: string, timeoutMs?: number): Promise<Connection>;
|
|
337
209
|
refreshHostedAppSettings(force?: boolean): Promise<void>;
|
|
338
|
-
usesDirectRoomBackend(): boolean;
|
|
339
210
|
getRoomBackendTag(): string;
|
|
340
211
|
}
|
|
341
212
|
declare class RoomManager {
|
|
342
213
|
private signaling;
|
|
343
214
|
private client;
|
|
344
|
-
private readonly heartbeatStops;
|
|
345
|
-
private browserRooms;
|
|
346
|
-
private rtdbPresence;
|
|
347
215
|
constructor(client: RoomClientHost, signaling: Signaling);
|
|
348
|
-
private getBrowserRooms;
|
|
349
|
-
/**
|
|
350
|
-
* Phase 2: called by the runtime after RTDB presence is initialised
|
|
351
|
-
* (same RtdbPresence instance used for device presence in Phase 1).
|
|
352
|
-
*/
|
|
353
|
-
setRtdbPresence(rtdbPresence: RtdbPresence): void;
|
|
354
|
-
private syncRtdbPresenceFromSignaling;
|
|
355
|
-
private usesDirectRoomBackend;
|
|
356
216
|
private usesCoordinationGateway;
|
|
357
|
-
private
|
|
217
|
+
private requireCoordinationGateway;
|
|
358
218
|
private get roomBackendTag();
|
|
359
219
|
private resolveRoomUserId;
|
|
360
220
|
private get appTag();
|
|
@@ -362,8 +222,6 @@ declare class RoomManager {
|
|
|
362
222
|
private isAlreadyExistsError;
|
|
363
223
|
private normalizeRoomId;
|
|
364
224
|
private getMembersInternal;
|
|
365
|
-
private parseMemberDocuments;
|
|
366
|
-
private parseRoomMemberDocument;
|
|
367
225
|
/**
|
|
368
226
|
* Creates a new room. When `requestedRoomId` is provided, the backend will
|
|
369
227
|
* try to create that exact room ID instead of generating a random one.
|
|
@@ -376,14 +234,8 @@ declare class RoomManager {
|
|
|
376
234
|
leaveRoom(roomId: string): Promise<void>;
|
|
377
235
|
getRoomMembers(roomId: string): Promise<RoomMember[]>;
|
|
378
236
|
watchRoom(roomId: string, callback: (members: RoomMember[]) => void): () => void;
|
|
379
|
-
/**
|
|
380
|
-
|
|
381
|
-
* cleanup callback in heartbeatStops (keyed by roomId) so that
|
|
382
|
-
* stopHeartbeat() / leaveRoom() can trigger graceful offline marking.
|
|
383
|
-
*/
|
|
384
|
-
private registerRtdbRoomMember;
|
|
385
|
-
private markRtdbRoomMemberOffline;
|
|
386
|
-
stopHeartbeat(roomId?: string): void;
|
|
237
|
+
/** Gateway room leases and socket cleanup are owned by the coordination provider. */
|
|
238
|
+
stopHeartbeat(_roomId?: string): void;
|
|
387
239
|
}
|
|
388
240
|
|
|
389
241
|
type IncomingProtocolHint = 'control' | 'explicit' | 'native-main' | 'unknown';
|
|
@@ -424,7 +276,6 @@ declare class Client {
|
|
|
424
276
|
dispose(): void;
|
|
425
277
|
get apiKey(): string | undefined;
|
|
426
278
|
get discoveryMode(): DiscoveryMode;
|
|
427
|
-
usesDirectRoomBackend(): boolean;
|
|
428
279
|
getRoomBackendTag(): string;
|
|
429
280
|
refreshHostedAppSettings(force?: boolean): Promise<void>;
|
|
430
281
|
setSignalingBackend(backend: ISignalingBackend): void;
|
package/dist/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as createIpcClient,a as createWasmClient}from'../chunk-
|
|
1
|
+
export{b as createIpcClient,a as createWasmClient}from'../chunk-5CJVJDPY.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-EQ5BQO3B.js';export{a as isRuntimeDeviceActive,c as isRuntimeDeviceConnectable,b as isRuntimeDeviceRoutable}from'../chunk-CK6WQV7J.js';export{a as WasmRuntimeAdapter}from'../chunk-RZPWE4WH.js';export{b as TauriRuntimeAdapter,a as createTauriIpcBridge}from'../chunk-YR2WJPGT.js';export{h as IpcRuntimeAdapter,e as classifyNativeIpcFailure,f as isNativeIpcCommandUnavailable}from'../chunk-KPPJMTHP.js';export{x as BROWSER_WASM_RUNTIME_CAPABILITIES,y as NATIVE_IPC_RUNTIME_CAPABILITIES,v as OPENRTC_RUNTIME_POLICY,z as cloneRuntimeCapabilities,w as getRuntimePolicy,n as logOpenRtcTeardownTrace,b as openRtcDebug,a as openRtcDebugEnabled,c as openRtcDebugInfo,d as openRtcDebugLog,A as runtimeCapabilitiesForBrowserHost,B as runtimeCapabilitiesFromNativeStatus,C as runtimeCapabilityProfile}from'../chunk-KLDDCOZ7.js';import'../chunk-QT2ASNI3.js';import'../chunk-SY6YGCXA.js';import'../chunk-C7YN5MSV.js';
|
package/dist/runtime/tauri.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { T as TauriRuntimeAdapter, b as TauriRuntimeAdapterOptions, c as createTauriIpcBridge } from '../tauri-
|
|
1
|
+
export { T as TauriRuntimeAdapter, b as TauriRuntimeAdapterOptions, c as createTauriIpcBridge } from '../tauri-Briw2Hf9.js';
|
|
2
2
|
import '../ipc-CflAVodw.js';
|
|
3
|
-
import '../types-
|
|
4
|
-
import '../DelegatingRuntimeAdapter-
|
|
3
|
+
import '../types-BDtleofB.js';
|
|
4
|
+
import '../DelegatingRuntimeAdapter-ew5WdyxA.js';
|
|
5
5
|
import '../IEngineBridge-C7OT2CRv.js';
|
|
6
|
-
import '../capabilities-
|
|
6
|
+
import '../capabilities-CaqXOIUU.js';
|
package/dist/runtime/tauri.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as TauriRuntimeAdapter,a as createTauriIpcBridge}from'../chunk-
|
|
1
|
+
export{b as TauriRuntimeAdapter,a as createTauriIpcBridge}from'../chunk-YR2WJPGT.js';import'../chunk-KPPJMTHP.js';import'../chunk-KLDDCOZ7.js';import'../chunk-QT2ASNI3.js';import'../chunk-SY6YGCXA.js';import'../chunk-C7YN5MSV.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { R as RuntimeClient, a as RuntimePolicySnapshot, P as PeerReconciliationStats, b as PlutoRuntimeAssembly } from './assembly-
|
|
2
|
-
import { C as ConnectDeviceResult, b as ConnectDeviceHooks, c as ConnectDeviceOptions, P as PeerSessionSnapshot, R as ResolvedPeerIdentity, G as GrantScope, a as SpaceTokenProvider } from './types-
|
|
1
|
+
import { R as RuntimeClient, a as RuntimePolicySnapshot, P as PeerReconciliationStats, b as PlutoRuntimeAssembly } from './assembly-CXj9yrhu.js';
|
|
2
|
+
import { C as ConnectDeviceResult, b as ConnectDeviceHooks, c as ConnectDeviceOptions, P as PeerSessionSnapshot, R as ResolvedPeerIdentity, G as GrantScope, a as SpaceTokenProvider } from './types-BDtleofB.js';
|
|
3
3
|
import { A as AuthContext } from './IEngineBridge-C7OT2CRv.js';
|
|
4
|
-
import { 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 } from './types-
|
|
5
|
-
import { R as RuntimeCapabilities, a as RuntimeCapabilityProfile } from './capabilities-
|
|
4
|
+
import { 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 } from './types-BfEvaxS7.js';
|
|
5
|
+
import { R as RuntimeCapabilities, a as RuntimeCapabilityProfile } from './capabilities-CaqXOIUU.js';
|
|
6
6
|
|
|
7
7
|
type OpenRTCChannelConnectOptions = Omit<RuntimeScopedChannelOptions, 'scope' | 'deviceId' | 'ticket'> & {
|
|
8
8
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as ClientOptions } from './types-
|
|
2
|
-
import { W as WasmBridgeOptions, D as DelegatingRuntimeAdapter } from './DelegatingRuntimeAdapter-
|
|
1
|
+
import { e as ClientOptions } from './types-BDtleofB.js';
|
|
2
|
+
import { W as WasmBridgeOptions, D as DelegatingRuntimeAdapter } from './DelegatingRuntimeAdapter-ew5WdyxA.js';
|
|
3
3
|
import { P as PlutoIpcBridge } from './ipc-CflAVodw.js';
|
|
4
4
|
|
|
5
5
|
interface NativeIpcBridgeOptions extends WasmBridgeOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a1 as RouteDescriptor, w as ProtocolName } from '../types-BDtleofB.js';
|
|
2
|
+
export { a2 as RouteFamily, a3 as RouteImplementationKind } from '../types-BDtleofB.js';
|
|
3
3
|
|
|
4
4
|
declare const ROUTE_DESCRIPTORS: readonly RouteDescriptor[];
|
|
5
5
|
declare function getRouteDescriptor(id: ProtocolName): RouteDescriptor;
|
|
@@ -4,9 +4,17 @@ interface CoordinationGatewayOptions {
|
|
|
4
4
|
* Credentials are delivered in the first WebSocket frame, never this URL.
|
|
5
5
|
*/
|
|
6
6
|
endpoint: string;
|
|
7
|
+
/**
|
|
8
|
+
* Provider-neutral HTTPS callable origin for credential admission.
|
|
9
|
+
*
|
|
10
|
+
* Managed production uses https://api.openrtc.app. Internal staging and
|
|
11
|
+
* local lanes must provide their owned API/emulator origin explicitly so
|
|
12
|
+
* the SDK never falls back to a public cloudfunctions.net hostname.
|
|
13
|
+
*/
|
|
14
|
+
controlPlaneEndpoint?: string;
|
|
7
15
|
/**
|
|
8
16
|
* Fail-closed lane marker. The credential issuer and Worker independently
|
|
9
|
-
* verify the matching
|
|
17
|
+
* verify the matching identity tenant and token audience.
|
|
10
18
|
*/
|
|
11
19
|
environment: 'staging' | 'production';
|
|
12
20
|
/**
|
|
@@ -64,6 +72,8 @@ interface PlutoMoQConfiguration {
|
|
|
64
72
|
interface PlutoIrohConfiguration {
|
|
65
73
|
relayOnly?: boolean;
|
|
66
74
|
relayTransportPolicy?: 'auto' | 'quicRequired' | 'websocketRequired';
|
|
75
|
+
/** Local test harness only. Must be an HTTPS loopback Iroh relay. */
|
|
76
|
+
testRelayUrl?: string;
|
|
67
77
|
persistenceMode?: 'persistent' | 'ephemeral';
|
|
68
78
|
/** Enable native iroh mDNS LAN discovery (native runtimes only). */
|
|
69
79
|
localDiscovery?: boolean;
|
|
@@ -253,6 +263,15 @@ interface ClientOptions {
|
|
|
253
263
|
nodeIdPersistence?: 'persistent' | 'ephemeral';
|
|
254
264
|
secretKey?: string;
|
|
255
265
|
strictMode?: boolean;
|
|
266
|
+
/**
|
|
267
|
+
* Selects the sole consumer of admitted native application streams.
|
|
268
|
+
*
|
|
269
|
+
* `runtime` (default) routes named OpenRTC channels through the TypeScript
|
|
270
|
+
* runtime. `host` is for native products that install one process-level
|
|
271
|
+
* Rust protocol dispatcher. A native host must never enable both consumers:
|
|
272
|
+
* the underlying stream queue is ordered and each raw stream has one owner.
|
|
273
|
+
*/
|
|
274
|
+
nativeApplicationStreamConsumer?: 'runtime' | 'host';
|
|
256
275
|
/**
|
|
257
276
|
* Optional application-provided TURN credential loader.
|
|
258
277
|
*
|
|
@@ -713,6 +732,21 @@ interface ExplicitFileDataSendParams {
|
|
|
713
732
|
applicationCrypto?: ApplicationPayloadCrypto;
|
|
714
733
|
requireApplicationCrypto?: boolean;
|
|
715
734
|
}
|
|
735
|
+
/**
|
|
736
|
+
* A coordination-provider projection of the peers the runtime should reconcile.
|
|
737
|
+
*
|
|
738
|
+
* The bridge owns admission-token retention and runtime forwarding; the
|
|
739
|
+
* coordination provider owns how a roster becomes this projection. Product code
|
|
740
|
+
* should use managed auto-connect rather than synthesize projections.
|
|
741
|
+
*/
|
|
742
|
+
interface DesiredPeerProjection {
|
|
743
|
+
deviceId: string;
|
|
744
|
+
nodeId?: string | null;
|
|
745
|
+
ticket?: string | null;
|
|
746
|
+
online?: boolean;
|
|
747
|
+
sessionId?: string | null;
|
|
748
|
+
excludedPeers?: string[];
|
|
749
|
+
}
|
|
716
750
|
interface ISignalingBackend {
|
|
717
751
|
currentUser: RuntimeIdentity | null;
|
|
718
752
|
signInAnonymously(): Promise<void>;
|
|
@@ -751,6 +785,7 @@ interface ISignalingBackend {
|
|
|
751
785
|
subscribeDevices(userId: string): Promise<ReadableStream<DeviceEvent[]>>;
|
|
752
786
|
startAutoConnectOnce?(userId: string, localDeviceId: string): Promise<void>;
|
|
753
787
|
startAutoConnect(userId: string, localDeviceId: string): void;
|
|
788
|
+
submitDesiredPeerProjection?(revision: number, peers: DesiredPeerProjection[]): Promise<void>;
|
|
754
789
|
notifyDisconnectRequested?(remoteNodeId: string): void;
|
|
755
790
|
startPresenceLoopOnce?(userId: string, localNodeId: string, deviceName: string, ticket: string, metadata?: string): Promise<void>;
|
|
756
791
|
startPresenceLoop(userId: string, localNodeId: string, deviceName: string, ticket: string, metadata?: string): void;
|
|
@@ -829,6 +864,8 @@ interface ManagedApplicationRouteOptions {
|
|
|
829
864
|
connectionId?: string | null;
|
|
830
865
|
remoteNodeId?: string | null;
|
|
831
866
|
expectedDeviceId?: string | null;
|
|
867
|
+
/** Host-authoritative scope returned by the completed managed admission. */
|
|
868
|
+
approvedScope?: string | null;
|
|
832
869
|
timeoutMs?: number;
|
|
833
870
|
}
|
|
834
871
|
interface SignalingOptions {
|
|
@@ -973,4 +1010,4 @@ interface JoinRequest {
|
|
|
973
1010
|
state: 'pending' | 'accepted' | 'rejected';
|
|
974
1011
|
}
|
|
975
1012
|
|
|
976
|
-
export type {
|
|
1013
|
+
export type { ProtocolImplementationKind as $, AuthMode as A, BackendPeerBiStream as B, ConnectDeviceResult as C, DiscoveryMode as D, ExplicitFileDataSendParams as E, ManagedDeviceConnectOptions as F, GrantScope as G, PeerState as H, ISignalingBackend as I, PeerHealth as J, JoinRoomOptions as K, LocalDeviceInfo as L, ManagedConnectionRecord as M, NativeManagedSessionStartResult as N, PeerScope as O, PeerSessionSnapshot as P, DevicePresenceStatus as Q, ResolvedPeerIdentity as R, SpaceAuthMode as S, TransportLatencySnapshot as T, PeerLifecycleStatus as U, ProtocolCapability as V, ProtocolCapabilityMap as W, ApplicationCryptoStreamTools as X, AppLimits as Y, ApplicationCryptoBiStream as Z, ProtocolBaseName as _, SpaceTokenProvider as a, ProtocolLocality as a0, RouteDescriptor as a1, RouteFamily as a2, RouteImplementationKind as a3, SignalingOptions as a4, RoomCreationMode as a5, ScanningLoopOptions as a6, ScanningLoopHandle as a7, RuntimeBootstrapOptions as a8, RuntimeBootstrapResult as a9, ManagedApplicationRouteOptions as aa, JoinRequest as ab, ConnectDeviceHooks as b, ConnectDeviceOptions as c, SignalingMode as d, ClientOptions as e, RuntimeIdentity as f, RoomMember as g, Device as h, DeviceStatusSnapshot as i, SignalingEnvelope as j, DeviceEvent as k, DesiredPeerProjection as l, SignalingSession as m, SessionEvent as n, BackendPeerUniStream as o, NativeConnectParams as p, NativeConnectResult as q, BackendConnectionState as r, ConnectionOptions as s, ApplicationPayloadCrypto as t, ApplicationPayloadReadinessOptions as u, ApplicationPayloadRouteOptions as v, ProtocolName as w, ApplicationPayloadSendOptions as x, ChannelDescriptor as y, IncomingStreamChannelMetadata as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AuthContext } from './IEngineBridge-C7OT2CRv.js';
|
|
2
|
-
import {
|
|
2
|
+
import { s as ConnectionOptions, t as ApplicationPayloadCrypto, u as ApplicationPayloadReadinessOptions, v as ApplicationPayloadRouteOptions, w as ProtocolName, x as ApplicationPayloadSendOptions, T as TransportLatencySnapshot, y as ChannelDescriptor$1, L as LocalDeviceInfo, z as IncomingStreamChannelMetadata, e as ClientOptions, h as Device, m as SignalingSession, f as RuntimeIdentity, i as DeviceStatusSnapshot, F as ManagedDeviceConnectOptions, H as PeerState, J as PeerHealth, K as JoinRoomOptions, g as RoomMember, O as PeerScope, r as BackendConnectionState, Q as DevicePresenceStatus, U as PeerLifecycleStatus, P as PeerSessionSnapshot } from './types-BDtleofB.js';
|
|
3
3
|
|
|
4
4
|
interface ITransport {
|
|
5
5
|
readonly name: string;
|
|
@@ -66,13 +66,16 @@ declare class Connection {
|
|
|
66
66
|
private upgradeState;
|
|
67
67
|
private upgradeRequested;
|
|
68
68
|
private negotiationSwitchCount;
|
|
69
|
+
private nativeNegotiationSwitchCount;
|
|
69
70
|
private upgradeAttemptActive;
|
|
70
71
|
private upgradeRetryCount;
|
|
71
72
|
private lastBaseTransportGeneration;
|
|
72
73
|
private lastBaseTransportStableId;
|
|
74
|
+
private lastNativeSessionAdmissionRecoveryGeneration;
|
|
73
75
|
private upgradeReDriveCount;
|
|
74
76
|
private upgradeReDriveTimer;
|
|
75
77
|
private upgradeRetryTimer;
|
|
78
|
+
private inboundSignalRetryBypassUsed;
|
|
76
79
|
private upgradeAttemptTimeoutTimer;
|
|
77
80
|
private lastReportedTransportStatus;
|
|
78
81
|
private pendingTransportStatusReport;
|
|
@@ -94,6 +97,7 @@ declare class Connection {
|
|
|
94
97
|
private lastApplicationRouteReadyReportAt;
|
|
95
98
|
private static readonly WEBRTC_RENEGOTIATE_LIVENESS_WINDOW_MS;
|
|
96
99
|
private static readonly MAX_NEGOTIATION_SWITCHES;
|
|
100
|
+
private static readonly MAX_NATIVE_NEGOTIATION_SWITCHES;
|
|
97
101
|
private lastForegroundAt;
|
|
98
102
|
private webRtcDisconnectedGraceTimer;
|
|
99
103
|
private preferredWebRtcRole;
|
|
@@ -114,6 +118,17 @@ declare class Connection {
|
|
|
114
118
|
* No-op when WebRTC is not configured or an upgrade already started.
|
|
115
119
|
*/
|
|
116
120
|
requestWebRTCUpgrade(reason?: string): void;
|
|
121
|
+
/**
|
|
122
|
+
* Records that the current native base transport has completed session
|
|
123
|
+
* admission and can now accept optional-route signaling.
|
|
124
|
+
*
|
|
125
|
+
* A replacement Iroh transport is projected before its token exchange has
|
|
126
|
+
* necessarily completed. If a WebRTC attempt starts during that interval,
|
|
127
|
+
* its renegotiate/SDP frames are intentionally rejected. Admission is the
|
|
128
|
+
* authoritative event that makes one fresh attempt safe. The generation
|
|
129
|
+
* fence prevents duplicate token approvals from creating a retry storm.
|
|
130
|
+
*/
|
|
131
|
+
handleNativeSessionAdmissionAvailable(reason?: string): void;
|
|
117
132
|
/**
|
|
118
133
|
* Whether the current WebRTC route is provably alive: an open data channel
|
|
119
134
|
* plus either a recent heartbeat round trip or a freshly opened channel. An
|
|
@@ -129,18 +144,28 @@ declare class Connection {
|
|
|
129
144
|
private static readonly FOREGROUND_PROBE_TIMEOUT_MS;
|
|
130
145
|
handleAppForeground(): void;
|
|
131
146
|
/**
|
|
132
|
-
* Accept authoritative proof that
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
147
|
+
* Accept authoritative Rust proof that a specific physical base generation
|
|
148
|
+
* is connected. Generic outbound control writes are deliberately insufficient:
|
|
149
|
+
* WebRTC recovery itself emits control frames, so treating their completion as
|
|
150
|
+
* fresh availability recursively resets the retry budget during an outage.
|
|
151
|
+
* This Connection remains the sole optional-route retry owner.
|
|
136
152
|
*/
|
|
137
|
-
handleBaseTransportAvailable(source: string, proof
|
|
153
|
+
handleBaseTransportAvailable(source: string, proof: {
|
|
138
154
|
transportState?: string | null;
|
|
139
155
|
transportGeneration?: number | null;
|
|
140
156
|
transportStableId?: number | null;
|
|
141
157
|
}): void;
|
|
142
158
|
private beginWebRtcRecovery;
|
|
143
159
|
getUpgradeState(): UpgradeState;
|
|
160
|
+
/**
|
|
161
|
+
* Generation fence for asynchronous native-main signaling.
|
|
162
|
+
*
|
|
163
|
+
* WebRTC callbacks and control-stream opens can complete after their
|
|
164
|
+
* transport has been replaced. A late SDP/candidate/renegotiate frame from
|
|
165
|
+
* that retired generation must not be allowed to replace the current
|
|
166
|
+
* negotiation on the peer.
|
|
167
|
+
*/
|
|
168
|
+
isCurrentWebRtcNegotiationSignal(envelope: any): boolean;
|
|
144
169
|
updateRTCConfig(rtcConfig: ConnectionOptions['rtcConfig']): void;
|
|
145
170
|
onUpgradeStateChange(callback: (state: UpgradeState) => void): void;
|
|
146
171
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openrtc",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"test:avenues:openrtc": "OPENRTC_EMULATOR_TEST_FILTER='tests/emulator/AvenueRetention.emulator.test.ts tests/emulator/MagicLink.ephemeral-session.wasm-wasm.emulator.test.ts tests/emulator/MultiDeviceStress.transport-matrix.emulator.test.ts tests/emulator/NativeStandaloneAuth.parity.emulator.test.ts tests/emulator/RealOpenRtcAcceptance.native-wasm.emulator.test.ts tests/emulator/UserDevice.persistent-autoconnect.wasm-wasm.emulator.test.ts tests/emulator/WebRtcUpgrade.offer-answer.native-wasm.emulator.test.ts tests/emulator/WebRtcUpgrade.reliability.native-wasm.emulator.test.ts' pnpm run test:emulator",
|
|
83
83
|
"test:avenues:tauri": "OPENRTC_EMULATOR_TEST_FILTER='tests/emulator/DriveGrant.revoke-enforcement.desktop-wasm.emulator.test.ts tests/emulator/DriveGrant.zombie-replacement.native-wasm.emulator.test.ts tests/emulator/MagicLink.ephemeral-session.desktop-wasm.emulator.test.ts tests/emulator/ThreeStoreReconciliation.disconnect.desktop-wasm.emulator.test.ts tests/emulator/UserDevice.persistent-autoconnect.desktop-desktop.emulator.test.ts tests/emulator/UserDevice.persistent-autoconnect.desktop-wasm.emulator.test.ts tests/emulator/WebRtcUpgrade.preexisting-acl-share.desktop-desktop.emulator.test.ts tests/emulator/WebRtcUpgrade.preexisting-acl-share.desktop-wasm.emulator.test.ts' pnpm run test:emulator",
|
|
84
84
|
"test:avenues:full": "OPENRTC_EMULATOR_TRANSPORT_MATRIX_FULL=1 OPENRTC_EMULATOR_TRANSPORT_MATRIX_FIVE=1 OPENRTC_EMULATOR_TRANSPORT_MATRIX_REFRESH_FOCUS=1 OPENRTC_EMULATOR_TRANSPORT_MATRIX_FLICKER=1 OPENRTC_EMULATOR_TRANSPORT_MATRIX_RELAY_ONLY=1 OPENRTC_EMULATOR_TEST_FILTER='tests/emulator/AvenueRetention.emulator.test.ts tests/emulator/DriveGrant.revoke-enforcement.desktop-wasm.emulator.test.ts tests/emulator/DriveGrant.zombie-replacement.native-wasm.emulator.test.ts tests/emulator/MagicLink.ephemeral-session.desktop-wasm.emulator.test.ts tests/emulator/MagicLink.ephemeral-session.wasm-wasm.emulator.test.ts tests/emulator/MultiDeviceStress.transport-matrix.emulator.test.ts tests/emulator/NativeStandaloneAuth.parity.emulator.test.ts tests/emulator/RealOpenRtcAcceptance.native-wasm.emulator.test.ts tests/emulator/ThreeStoreReconciliation.disconnect.desktop-wasm.emulator.test.ts tests/emulator/UserDevice.persistent-autoconnect.desktop-desktop.emulator.test.ts tests/emulator/UserDevice.persistent-autoconnect.desktop-wasm.emulator.test.ts tests/emulator/UserDevice.persistent-autoconnect.wasm-wasm.emulator.test.ts tests/emulator/WebRtcUpgrade.offer-answer.native-wasm.emulator.test.ts tests/emulator/WebRtcUpgrade.preexisting-acl-share.desktop-desktop.emulator.test.ts tests/emulator/WebRtcUpgrade.preexisting-acl-share.desktop-wasm.emulator.test.ts tests/emulator/WebRtcUpgrade.reliability.native-wasm.emulator.test.ts' pnpm run test:emulator",
|
|
85
|
-
"test:emulator:running": "FIREBASE_AUTH_EMULATOR_HOST=127.0.0.1:9100 FIRESTORE_EMULATOR_HOST=127.0.0.1:8082 OPENRTC_FIRESTORE_HOST=127.0.0.1:8082 VITE_USE_EMULATORS=true VITE_OPENRTC_FIRESTORE_EMULATOR_HOST=127.0.0.1:8082
|
|
86
|
-
"test:acceptance:native:running": "FIREBASE_AUTH_EMULATOR_HOST=127.0.0.1:9100 FIRESTORE_EMULATOR_HOST=127.0.0.1:8082 OPENRTC_FIRESTORE_HOST=127.0.0.1:8082 VITE_USE_EMULATORS=true VITE_OPENRTC_FIRESTORE_EMULATOR_HOST=127.0.0.1:8082
|
|
85
|
+
"test:emulator:running": "FIREBASE_AUTH_EMULATOR_HOST=127.0.0.1:9100 FIRESTORE_EMULATOR_HOST=127.0.0.1:8082 OPENRTC_FIRESTORE_HOST=127.0.0.1:8082 VITE_USE_EMULATORS=true VITE_OPENRTC_FIRESTORE_EMULATOR_HOST=127.0.0.1:8082 vitest run tests/emulator --no-file-parallelism --maxWorkers=1 --maxConcurrency=1",
|
|
86
|
+
"test:acceptance:native:running": "FIREBASE_AUTH_EMULATOR_HOST=127.0.0.1:9100 FIRESTORE_EMULATOR_HOST=127.0.0.1:8082 OPENRTC_FIRESTORE_HOST=127.0.0.1:8082 VITE_USE_EMULATORS=true VITE_OPENRTC_FIRESTORE_EMULATOR_HOST=127.0.0.1:8082 vitest run tests/emulator/RealOpenRtcAcceptance.native-wasm.emulator.test.ts --no-file-parallelism --maxWorkers=1 --maxConcurrency=1",
|
|
87
87
|
"test:live": "pnpm run build:wasm && pnpm run build && vitest run tests/live",
|
|
88
88
|
"test:live:emulator": "FIREBASE_AUTH_EMULATOR_HOST=127.0.0.1:9099 vitest run tests/live",
|
|
89
89
|
"test:watch": "vitest",
|