openrtc 1.0.1 → 1.0.3
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/README.md +3 -1
- package/dist/{DelegatingRuntimeAdapter-By7pziBs.d.ts → DelegatingRuntimeAdapter-D2_dgabz.d.ts} +20 -2
- package/dist/{IpcRuntimeAdapter-DymXAsNU.d.ts → IpcRuntimeAdapter-B8rkqNrq.d.ts} +2 -2
- package/dist/auth/index.js +1 -1
- package/dist/auth/internal.js +1 -1
- package/dist/chunk-34LATQZZ.js +2 -0
- package/dist/chunk-BGQX25BO.js +1 -0
- package/dist/chunk-C7YN5MSV.js +1 -0
- package/dist/chunk-L6OUJ6YN.js +2 -0
- package/dist/chunk-MESPJTUA.js +1 -0
- package/dist/chunk-NCRP5ODV.js +3 -0
- package/dist/chunk-QT2ASNI3.js +1 -0
- package/dist/{chunk-EGEA3GU2.js → chunk-RRCARL4S.js} +1 -1
- package/dist/{device-status-nkXepu97.d.ts → device-status-CR27Ak7c.d.ts} +53 -7
- package/dist/{framing-BUtu0oZK.d.ts → framing-rPdckqn5.d.ts} +10 -4
- package/dist/index.d.ts +15 -10
- package/dist/index.js +2 -2
- package/dist/openrtc_bg.wasm +0 -0
- package/dist/runtime/WasmRuntimeAdapter.d.ts +2 -2
- package/dist/runtime/WasmRuntimeAdapter.js +1 -1
- package/dist/runtime/device-status.d.ts +2 -2
- package/dist/runtime/index.d.ts +16 -10
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/tauri.d.ts +3 -3
- package/dist/runtime/tauri.js +1 -1
- package/dist/transport/index.d.ts +7 -2
- package/dist/transport/index.js +1 -1
- package/dist/{types-CzIpGV9x.d.ts → types-ByZyADCn.d.ts} +69 -4
- package/package.json +2 -2
- package/dist/chunk-A2ENDDFR.js +0 -2
- package/dist/chunk-BLOEZIFJ.js +0 -1
- package/dist/chunk-KZ3KWQTO.js +0 -1
- package/dist/chunk-MA2JFAV7.js +0 -2
- package/dist/chunk-OCNLQID3.js +0 -1
- package/dist/chunk-VIPNH2BE.js +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b as b$1,e as e$1}from'./chunk-C7YN5MSV.js';var i=b$1,l=new Set(i);function e(n){if(typeof n!="string")return;let r=n.trim().toLowerCase();return l.has(r)?r:void 0}function c(n){let r=e(n);return r?e$1(r).baseProtocol==="iroh":false}function u(n){let r=e(n);if(!r)return false;let t=e$1(r);return t.baseProtocol==="iroh"&&(t.locality==="nearby"||t.locality==="direct-internet")}function p(n){let r=e(n);return r?e$1(r).family==="optional-route":false}function b(n){let r=e(n);return r?e$1(r).baseProtocol==="webrtc":false}function f(n,r,t=false){return n==="relay"||r==="relay"?"webrtc-turn":n==="host"&&r==="host"||t&&n&&r?"webrtc-lan":"webrtc"}function d(n){let r=e(n);return r?e$1(r).independentlyInstantiable:false}export{i as a,e as b,c,u as d,p as e,b as f,f as g,d as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {g,h}from'./chunk-
|
|
1
|
+
import {g,h}from'./chunk-L6OUJ6YN.js';function c(){return g()}var i=class extends h{constructor(r){super({...r,bridge:g(),allowWasmFallback:r.allowWasmFallback??false});}};export{c as a,i as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AuthContext } from './IEngineBridge-C7OT2CRv.js';
|
|
2
|
-
import {
|
|
2
|
+
import { a7 as ConnectionOptions, r as ApplicationPayloadCrypto, w as ApplicationPayloadReadinessOptions, x as ApplicationPayloadRouteOptions, o as ProtocolName, y as ApplicationPayloadSendOptions, a8 as TransportLatencySnapshot, a5 as ChannelDescriptor$1, L as LocalDeviceInfo, X as IncomingStreamChannelMetadata, C as ClientOptions, a as Device, f as SignalingSession, R as RuntimeIdentity, b as DeviceStatusSnapshot, a9 as ManagedDeviceConnectOptions, a2 as PeerState, a4 as PeerHealth, V as JoinRoomOptions, W as RoomMember, a3 as PeerScope, k as BackendConnectionState, z as DevicePresenceStatus, aa as PeerLifecycleStatus, P as PeerSessionSnapshot } from './types-ByZyADCn.js';
|
|
3
3
|
|
|
4
4
|
interface ITransport {
|
|
5
5
|
readonly name: string;
|
|
@@ -24,8 +24,7 @@ declare class Connection {
|
|
|
24
24
|
private static readonly textEncoder;
|
|
25
25
|
private static readonly UPGRADE_RETRY_DELAY_MS;
|
|
26
26
|
private static readonly MAX_UPGRADE_RETRIES;
|
|
27
|
-
private static readonly
|
|
28
|
-
private static readonly UPGRADE_REDRIVE_DELAY_MS;
|
|
27
|
+
private static readonly UPGRADE_REDRIVE_DELAYS_MS;
|
|
29
28
|
private static readonly WEBRTC_DISCONNECTED_GRACE_MS;
|
|
30
29
|
private static readonly MAX_PENDING_MESSAGES;
|
|
31
30
|
private static readonly DEFAULT_APPLICATION_CRYPTO_WAIT_MS;
|
|
@@ -36,9 +35,13 @@ declare class Connection {
|
|
|
36
35
|
*/
|
|
37
36
|
private static readonly WEBRTC_UPGRADE_ATTEMPT_TIMEOUT_MS;
|
|
38
37
|
private static readonly MAX_PENDING_ENCRYPTED_APPLICATION_PAYLOADS;
|
|
38
|
+
private static readonly WEBRTC_APPLICATION_ROUTE_PROOF_TIMEOUT_MS;
|
|
39
|
+
private static readonly WEBRTC_APPLICATION_ROUTE_PROOF_DELAYS_MS;
|
|
40
|
+
private static readonly WEBRTC_APPLICATION_ROUTE_PROOF_MAX_ID_LENGTH;
|
|
39
41
|
private listeners;
|
|
40
42
|
private pendingMessages;
|
|
41
43
|
private pendingEncryptedApplicationPayloads;
|
|
44
|
+
private lastApplicationPayloadTransport;
|
|
42
45
|
private webrtcBinaryHandlers;
|
|
43
46
|
private closeListeners;
|
|
44
47
|
private upgradeStateListeners;
|
|
@@ -65,18 +68,24 @@ declare class Connection {
|
|
|
65
68
|
private negotiationSwitchCount;
|
|
66
69
|
private upgradeAttemptActive;
|
|
67
70
|
private upgradeRetryCount;
|
|
71
|
+
private lastBaseTransportGeneration;
|
|
72
|
+
private lastBaseTransportStableId;
|
|
68
73
|
private upgradeReDriveCount;
|
|
69
74
|
private upgradeReDriveTimer;
|
|
70
75
|
private upgradeRetryTimer;
|
|
71
76
|
private upgradeAttemptTimeoutTimer;
|
|
72
77
|
private lastReportedTransportStatus;
|
|
78
|
+
private pendingTransportStatusReport;
|
|
79
|
+
private transportStatusReportInFlight;
|
|
73
80
|
private applicationRouteMissingNotified;
|
|
74
81
|
private upgradeTerminalFailure;
|
|
75
82
|
private pendingSignals;
|
|
76
83
|
private activeNegotiationId;
|
|
84
|
+
private pendingAvailabilityHint;
|
|
77
85
|
private webrtcHeartbeat;
|
|
78
86
|
private webRtcHeartbeatProbeInFlight;
|
|
79
87
|
private webRtcApplicationRouteProbeInFlight;
|
|
88
|
+
private pendingWebRtcApplicationRouteProof;
|
|
80
89
|
private webRtcHeartbeatConsecutiveProbeFailures;
|
|
81
90
|
private irohHealthListeners;
|
|
82
91
|
private webrtcHealthListeners;
|
|
@@ -119,6 +128,17 @@ declare class Connection {
|
|
|
119
128
|
}): void;
|
|
120
129
|
private static readonly FOREGROUND_PROBE_TIMEOUT_MS;
|
|
121
130
|
handleAppForeground(): void;
|
|
131
|
+
/**
|
|
132
|
+
* Accept authoritative proof that the base control route can send again.
|
|
133
|
+
* Browser `online` fires before Iroh/WebTransport is necessarily routable,
|
|
134
|
+
* so the successful control send is the boundary that may replenish a spent
|
|
135
|
+
* optional-route recovery round. This Connection remains the sole retry owner.
|
|
136
|
+
*/
|
|
137
|
+
handleBaseTransportAvailable(source: string, proof?: {
|
|
138
|
+
transportState?: string | null;
|
|
139
|
+
transportGeneration?: number | null;
|
|
140
|
+
transportStableId?: number | null;
|
|
141
|
+
}): void;
|
|
122
142
|
private beginWebRtcRecovery;
|
|
123
143
|
getUpgradeState(): UpgradeState;
|
|
124
144
|
updateRTCConfig(rtcConfig: ConnectionOptions['rtcConfig']): void;
|
|
@@ -145,8 +165,12 @@ declare class Connection {
|
|
|
145
165
|
candidateTypeSummary: string | null;
|
|
146
166
|
} | null;
|
|
147
167
|
}>;
|
|
168
|
+
private collectTransportDiagnostics;
|
|
169
|
+
private refreshWebRtcCandidatePairObservation;
|
|
148
170
|
private lastWebRtcLocalCandidateType;
|
|
149
171
|
private lastWebRtcRemoteCandidateType;
|
|
172
|
+
private clearWebRtcCandidatePairObservation;
|
|
173
|
+
private webRtcTransportLabel;
|
|
150
174
|
get transportType(): ProtocolName;
|
|
151
175
|
private _peerMoQReady;
|
|
152
176
|
get peerMoQReady(): boolean;
|
|
@@ -170,6 +194,8 @@ declare class Connection {
|
|
|
170
194
|
* Throws when the requested transport is unavailable.
|
|
171
195
|
*/
|
|
172
196
|
sendOnTransport(transport: ProtocolName, message: string | object | ArrayBuffer | Uint8Array): Promise<void>;
|
|
197
|
+
/** Last transport that accepted an application payload from this connection. */
|
|
198
|
+
getLastApplicationPayloadTransport(): ProtocolName | null;
|
|
173
199
|
/**
|
|
174
200
|
* Send plaintext control traffic that is required to bootstrap application
|
|
175
201
|
* key agreement. This is intentionally separate from public app-data sends.
|
|
@@ -195,6 +221,7 @@ declare class Connection {
|
|
|
195
221
|
sendOnWebRTC(data: Uint8Array): Promise<void>;
|
|
196
222
|
private encodePayload;
|
|
197
223
|
private protectApplicationPayload;
|
|
224
|
+
private protectRequiredApplicationPayload;
|
|
198
225
|
private openApplicationPayload;
|
|
199
226
|
private openUntypedApplicationPayload;
|
|
200
227
|
private isPlaintextBootstrapPayload;
|
|
@@ -227,6 +254,12 @@ declare class Connection {
|
|
|
227
254
|
private readLoop;
|
|
228
255
|
injectData(chunk: Uint8Array): void;
|
|
229
256
|
private handleData;
|
|
257
|
+
/**
|
|
258
|
+
* Deliver one independently framed application body to this logical
|
|
259
|
+
* connection. Fresh `system/peer-default` streams use this entrypoint so
|
|
260
|
+
* their bytes never interleave with the bootstrap stream's receive buffer.
|
|
261
|
+
*/
|
|
262
|
+
receiveFrameBody(body: Uint8Array): void;
|
|
230
263
|
private tryHandlePlaintextNativeSignal;
|
|
231
264
|
private static isUntypedDataFrame;
|
|
232
265
|
private processDataPayload;
|
|
@@ -242,7 +275,7 @@ declare class Connection {
|
|
|
242
275
|
addTransceiver(trackOrKind: MediaStreamTrack | string, init?: RTCRtpTransceiverInit): RTCRtpTransceiver | null;
|
|
243
276
|
onTrack(callback: (event: RTCTrackEvent) => void): void;
|
|
244
277
|
private hasRecoverableBasePath;
|
|
245
|
-
private
|
|
278
|
+
private hasBaseApplicationRoute;
|
|
246
279
|
private isWebRtcDataChannelOpen;
|
|
247
280
|
private clearWebRtcDisconnectedGraceTimer;
|
|
248
281
|
private transportStillLikelyAlive;
|
|
@@ -261,6 +294,16 @@ declare class Connection {
|
|
|
261
294
|
private startWebRtcHeartbeat;
|
|
262
295
|
private stopWebRtcHeartbeat;
|
|
263
296
|
private notifyWebRtcApplicationRouteMissing;
|
|
297
|
+
private currentWebRtcNegotiationId;
|
|
298
|
+
private createWebRtcApplicationRouteProofId;
|
|
299
|
+
private isCurrentWebRtcApplicationRouteProof;
|
|
300
|
+
private cancelWebRtcApplicationRouteProofForTransport;
|
|
301
|
+
private cancelWebRtcApplicationRouteProof;
|
|
302
|
+
private completeWebRtcApplicationRouteProofAck;
|
|
303
|
+
private sendWebRtcApplicationRouteProofFrame;
|
|
304
|
+
private tryHandleWebRtcApplicationRouteProofBytes;
|
|
305
|
+
private tryHandleWebRtcApplicationRouteProofPayload;
|
|
306
|
+
private isWebRtcApplicationRouteProofFrame;
|
|
264
307
|
private startWebRtcApplicationRouteProbe;
|
|
265
308
|
private sendIrohHeartbeatPong;
|
|
266
309
|
/** Register a listener for WebRTC heartbeat health changes. */
|
|
@@ -268,6 +311,7 @@ declare class Connection {
|
|
|
268
311
|
/** Register a listener for iroh heartbeat health changes (WASM path). */
|
|
269
312
|
onIrohHeartbeatHealth(cb: (health: ConnectionHealth) => void): void;
|
|
270
313
|
reportTransportStatusIfChanged(): void;
|
|
314
|
+
private drainTransportStatusReports;
|
|
271
315
|
private reportApplicationRouteReady;
|
|
272
316
|
/**
|
|
273
317
|
* Single connection-owned transport snapshot for status reporting,
|
|
@@ -278,6 +322,8 @@ declare class Connection {
|
|
|
278
322
|
activeTransport: ProtocolName;
|
|
279
323
|
parallelTransport: ProtocolName | null;
|
|
280
324
|
};
|
|
325
|
+
/** Passive RTT samples owned by the active transport heartbeats. */
|
|
326
|
+
getTransportLatencySnapshot(): TransportLatencySnapshot;
|
|
281
327
|
private resolveParallelTransport;
|
|
282
328
|
setNativeSignalSender(sender: (envelope: any) => Promise<void>): void;
|
|
283
329
|
/**
|
|
@@ -325,8 +371,8 @@ declare class Connection {
|
|
|
325
371
|
* Connection. Even so, it follows the same lifecycle invariant as every
|
|
326
372
|
* custom transport: do not advertise it as the active application route until
|
|
327
373
|
* the local transport is ready, the peer route is enabled, and the required
|
|
328
|
-
* application crypto is available
|
|
329
|
-
*
|
|
374
|
+
* application crypto is available, and the current relay session has
|
|
375
|
+
* completed a protected probe/ACK exchange with this peer.
|
|
330
376
|
*/
|
|
331
377
|
isMoQApplicationRouteReady(): boolean;
|
|
332
378
|
private isMoQDataRouteReady;
|
|
@@ -427,7 +473,7 @@ interface RuntimeScopedLogicalChannel {
|
|
|
427
473
|
transports: string[];
|
|
428
474
|
hasSendOnWebRTC?: boolean;
|
|
429
475
|
hasWebRTCTransport?: boolean;
|
|
430
|
-
lastSendTransport?:
|
|
476
|
+
lastSendTransport?: ProtocolName | 'stream' | null;
|
|
431
477
|
framing: RuntimeLogicalChannelFraming;
|
|
432
478
|
nativeLabel: boolean;
|
|
433
479
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { A as AuthContext } from './IEngineBridge-C7OT2CRv.js';
|
|
2
|
-
import { G as GrantScope, I as ISignalingBackend, m as ConnectDeviceHooks, n as ConnectDeviceOptions, l as ConnectDeviceResult, M as ManagedConnectionRecord, P as PeerSessionSnapshot, c as ResolvedPeerIdentity, u as AppLimits, i as NativeConnectParams, j as NativeConnectResult, E as ExplicitFileDataSendParams } from './types-
|
|
3
|
-
import { h as RuntimePeerState, s as RuntimeConnectionStateSnapshot, j as RuntimePeerReadinessSnapshot, i as RuntimePeerConnectOptions, C as Connection, n as RuntimeIncomingStream, R as RuntimeClientOptions, H as RuntimeAuthIdentity, f as RuntimeLocalDeviceInfo, g as RuntimeLocalDeviceProfile, c as RuntimeDevice, a as RuntimeManagedSessionOptions, b as RuntimeManagedSession, d as RuntimeDeviceStatusSnapshot, e as RuntimeDeviceConnectOptions, X as RuntimeSession, q as RuntimeJoinRoomOptions, r as RuntimeRoomMember, K as RuntimeConnectionTarget, o as RuntimeScopedChannelOptions, p as RuntimeScopedLogicalChannel, m as RuntimePeerStreamOptions, v as RuntimeRawConnection, l as RuntimeChannelDescriptor, V as RuntimePresenceLoopOptions, k as RuntimePeerHealth, t as RuntimeApplicationPayloadReadinessOptions, u as RuntimeConnectionEvent } from './device-status-
|
|
4
|
-
import { R as RuntimeCapabilities, a as RuntimeCapabilityProfile } from './DelegatingRuntimeAdapter-
|
|
5
|
-
import { P as PlutoIpcBridge, I as IpcRuntimeAdapter } from './IpcRuntimeAdapter-
|
|
2
|
+
import { G as GrantScope, I as ISignalingBackend, m as ConnectDeviceHooks, n as ConnectDeviceOptions, l as ConnectDeviceResult, M as ManagedConnectionRecord, P as PeerSessionSnapshot, c as ResolvedPeerIdentity, u as AppLimits, i as NativeConnectParams, j as NativeConnectResult, E as ExplicitFileDataSendParams } from './types-ByZyADCn.js';
|
|
3
|
+
import { h as RuntimePeerState, s as RuntimeConnectionStateSnapshot, j as RuntimePeerReadinessSnapshot, i as RuntimePeerConnectOptions, C as Connection, n as RuntimeIncomingStream, R as RuntimeClientOptions, H as RuntimeAuthIdentity, f as RuntimeLocalDeviceInfo, g as RuntimeLocalDeviceProfile, c as RuntimeDevice, a as RuntimeManagedSessionOptions, b as RuntimeManagedSession, d as RuntimeDeviceStatusSnapshot, e as RuntimeDeviceConnectOptions, X as RuntimeSession, q as RuntimeJoinRoomOptions, r as RuntimeRoomMember, K as RuntimeConnectionTarget, o as RuntimeScopedChannelOptions, p as RuntimeScopedLogicalChannel, m as RuntimePeerStreamOptions, v as RuntimeRawConnection, l as RuntimeChannelDescriptor, V as RuntimePresenceLoopOptions, k as RuntimePeerHealth, t as RuntimeApplicationPayloadReadinessOptions, u as RuntimeConnectionEvent } from './device-status-CR27Ak7c.js';
|
|
4
|
+
import { R as RuntimeCapabilities, a as RuntimeCapabilityProfile } from './DelegatingRuntimeAdapter-D2_dgabz.js';
|
|
5
|
+
import { P as PlutoIpcBridge, I as IpcRuntimeAdapter } from './IpcRuntimeAdapter-B8rkqNrq.js';
|
|
6
6
|
import { WasmRuntimeAdapter } from './runtime/WasmRuntimeAdapter.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -607,6 +607,12 @@ declare class RuntimeClient {
|
|
|
607
607
|
getApplicationReadyConnections(options?: RuntimeApplicationPayloadReadinessOptions): Connection[];
|
|
608
608
|
onConnection(callback: (connection: Connection) => void): () => void;
|
|
609
609
|
onDisconnection(callback: (connection: Connection) => void): () => void;
|
|
610
|
+
/**
|
|
611
|
+
* Observe protected application payloads after the active transport has
|
|
612
|
+
* normalized them through Connection. Protocol packages use this boundary
|
|
613
|
+
* so Iroh, WebRTC, and MoQ share one intake path.
|
|
614
|
+
*/
|
|
615
|
+
onMessage(callback: (connection: Connection, message: unknown) => void): () => void;
|
|
610
616
|
onConnectionEvent(callback: (event: RuntimeConnectionEvent) => void): () => void;
|
|
611
617
|
forceReconnectSnapshot(): void;
|
|
612
618
|
/** Single-call lifecycle: combines initialize() + start() */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { R as RuntimeClient, a as RuntimePolicySnapshot, P as PeerReconciliationStats, b as PlutoRuntimeAssembly } from './framing-
|
|
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-
|
|
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-
|
|
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, S as SignalingMode,
|
|
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
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-
|
|
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-
|
|
8
|
-
import { P as PlutoIpcBridge } from './IpcRuntimeAdapter-
|
|
9
|
-
import { R as RuntimeCapabilities, a as RuntimeCapabilityProfile } from './DelegatingRuntimeAdapter-
|
|
10
|
-
export { b as RuntimeAdapterKind } from './DelegatingRuntimeAdapter-
|
|
11
|
-
export { TRANSPORT_LABELS, isDirectIrohTransportLabel, isIndependentTransportLabel, isIrohBaseTransportLabel, isOptionalTransportLabel, isWebRtcTransportLabel, normalizeTransportLabel } from './transport/index.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';
|
|
11
|
+
export { ROUTE_DESCRIPTORS, TRANSPORT_LABELS, getRouteDescriptor, isDirectIrohTransportLabel, isIndependentTransportLabel, isIrohBaseTransportLabel, isOptionalTransportLabel, isWebRtcTransportLabel, listRouteDescriptors, normalizeTransportLabel } from './transport/index.js';
|
|
12
12
|
import './runtime/WasmRuntimeAdapter.js';
|
|
13
13
|
|
|
14
14
|
type OpenRTCChannelConnectOptions = Omit<RuntimeScopedChannelOptions, 'scope' | 'deviceId' | 'ticket'> & {
|
|
@@ -44,6 +44,10 @@ interface OpenRTCDeviceNamespace {
|
|
|
44
44
|
watch(callback: (devices: RuntimeDevice[]) => void): () => void;
|
|
45
45
|
watchWithStatus(callback: (devices: RuntimeDeviceStatusSnapshot[]) => void): () => void;
|
|
46
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
|
+
*/
|
|
47
51
|
connectWithRetry(device: string | RuntimeDevice, hooks: ConnectDeviceHooks, options: ConnectDeviceOptions): Promise<ConnectDeviceResult>;
|
|
48
52
|
disconnect(deviceId: string): Promise<void>;
|
|
49
53
|
update(deviceId: string, updates: {
|
|
@@ -268,6 +272,7 @@ declare namespace OpenRTC {
|
|
|
268
272
|
|
|
269
273
|
declare class TransportFactory {
|
|
270
274
|
private static readonly capabilityMap;
|
|
275
|
+
/** @deprecated Only WebRTC implements the legacy ITransport construction API. */
|
|
271
276
|
static createTransport(name: ProtocolName): ITransport;
|
|
272
277
|
static getProtocolCapability(name: ProtocolName): ProtocolCapability;
|
|
273
278
|
static getProtocolCapabilities(): ProtocolCapabilityMap;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {z,A}from'./chunk-
|
|
2
|
-
export{T as OpenRTC,
|
|
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};
|
package/dist/openrtc_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DelegatingRuntimeAdapter, W as WasmBridgeOptions } from '../DelegatingRuntimeAdapter-
|
|
2
|
-
import '../types-
|
|
1
|
+
import { D as DelegatingRuntimeAdapter, W as WasmBridgeOptions } from '../DelegatingRuntimeAdapter-D2_dgabz.js';
|
|
2
|
+
import '../types-ByZyADCn.js';
|
|
3
3
|
import '../IEngineBridge-C7OT2CRv.js';
|
|
4
4
|
|
|
5
5
|
declare class WasmRuntimeAdapter extends DelegatingRuntimeAdapter {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as WasmRuntimeAdapter}from'../chunk-
|
|
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,3 +1,3 @@
|
|
|
1
|
-
export { a2 as RuntimeDeviceActiveOptions, $ as isRuntimeDeviceActive, a0 as isRuntimeDeviceConnectable, a1 as isRuntimeDeviceRoutable } from '../device-status-
|
|
1
|
+
export { a2 as RuntimeDeviceActiveOptions, $ as isRuntimeDeviceActive, a0 as isRuntimeDeviceConnectable, a1 as isRuntimeDeviceRoutable } from '../device-status-CR27Ak7c.js';
|
|
2
2
|
import '../IEngineBridge-C7OT2CRv.js';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-ByZyADCn.js';
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { P as PeerReconciliationStats } from '../framing-
|
|
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-
|
|
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';
|
|
3
3
|
import * as Draft14 from '@moq/net';
|
|
4
|
-
import {
|
|
5
|
-
import { C as Connection, K as RuntimeConnectionTarget, v as RuntimeRawConnection } from '../device-status-
|
|
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-
|
|
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';
|
|
7
7
|
import { FirebaseApp } from 'firebase/app';
|
|
8
|
-
import { R as RuntimeCapabilities } from '../DelegatingRuntimeAdapter-
|
|
9
|
-
export { B as BROWSER_WASM_RUNTIME_CAPABILITIES, N as NATIVE_IPC_RUNTIME_CAPABILITIES,
|
|
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-
|
|
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
11
|
export { WasmRuntimeAdapter } from './WasmRuntimeAdapter.js';
|
|
12
12
|
export { TauriRuntimeAdapter, TauriRuntimeAdapterOptions, createTauriIpcBridge } from './tauri.js';
|
|
13
13
|
import '../IEngineBridge-C7OT2CRv.js';
|
|
@@ -191,6 +191,7 @@ interface MoQSubscriberOptions {
|
|
|
191
191
|
maxBufferedFramesPerGroup?: number;
|
|
192
192
|
maxBufferedBytesPerTrack?: number;
|
|
193
193
|
maxObjectPayloadBytes?: number;
|
|
194
|
+
onSubscriptionTerminated?: (namespace: string, name: string, error: unknown) => void;
|
|
194
195
|
}
|
|
195
196
|
/** Draft-14 subscriber facade; session reconnect remains owned by MoQController. */
|
|
196
197
|
declare class MoQSubscriber {
|
|
@@ -201,6 +202,7 @@ declare class MoQSubscriber {
|
|
|
201
202
|
private readonly maxSubscribeRetries;
|
|
202
203
|
private readonly subscribeRetryDelayMs;
|
|
203
204
|
private readonly maxObjectPayloadBytes;
|
|
205
|
+
private readonly onSubscriptionTerminated?;
|
|
204
206
|
private closed;
|
|
205
207
|
constructor(session: MoQSession, onObject: (trackNamespace: string, trackName: string, object: Uint8Array, metadata: unknown) => void, options?: MoQSubscriberOptions);
|
|
206
208
|
subscribe(namespace: string, name: string): Promise<void>;
|
|
@@ -219,6 +221,9 @@ interface TransportInterface {
|
|
|
219
221
|
close(): void;
|
|
220
222
|
ready: Promise<void>;
|
|
221
223
|
}
|
|
224
|
+
interface MoQSessionOptions {
|
|
225
|
+
onSubscriptionTerminated?: (namespace: string, name: string, error: unknown) => void;
|
|
226
|
+
}
|
|
222
227
|
/**
|
|
223
228
|
* Draft-14 MoQT adapter. The OpenRTC controller owns reconnect and lifecycle;
|
|
224
229
|
* this class owns only one negotiated relay session and its protocol handles.
|
|
@@ -235,7 +240,7 @@ declare class MoQSession {
|
|
|
235
240
|
private closeEmitted;
|
|
236
241
|
private setupResolve;
|
|
237
242
|
private readonly setupPromise;
|
|
238
|
-
constructor(transport: TransportInterface, onObject?: (ns: string, name: string, obj: Uint8Array, meta: unknown) => void, role?: number, relayUrl?: URL);
|
|
243
|
+
constructor(transport: TransportInterface, onObject?: (ns: string, name: string, obj: Uint8Array, meta: unknown) => void, role?: number, relayUrl?: URL, options?: MoQSessionOptions);
|
|
239
244
|
requireConnection(): Draft14.Connection.Established;
|
|
240
245
|
init(): Promise<void>;
|
|
241
246
|
waitForSetup(): Promise<void>;
|
|
@@ -357,6 +362,7 @@ type IncomingStreamListenerEvent = {
|
|
|
357
362
|
type: 'bi' | 'uni';
|
|
358
363
|
stream: any;
|
|
359
364
|
remoteNodeId: string;
|
|
365
|
+
transportStableId?: number;
|
|
360
366
|
traceId?: string;
|
|
361
367
|
protocolHint?: IncomingProtocolHint;
|
|
362
368
|
channel?: IncomingStreamChannelMetadata | null;
|
|
@@ -422,7 +428,6 @@ declare class Client {
|
|
|
422
428
|
onDevicesChange(callback: (devices: Device[]) => void): () => void;
|
|
423
429
|
subscribeSessions(localDeviceId: string, callback: (session: SignalingSession) => void | Promise<void>): Promise<() => void>;
|
|
424
430
|
startScanningLoop(options: ScanningLoopOptions): Promise<ScanningLoopHandle>;
|
|
425
|
-
connectDeviceWithRetry(device: Device, hooks: ConnectDeviceHooks, options: ConnectDeviceOptions): Promise<ConnectDeviceResult>;
|
|
426
431
|
bootstrapRuntime(options: RuntimeBootstrapOptions): Promise<RuntimeBootstrapResult>;
|
|
427
432
|
updateTransportConfig(transports: ClientOptions['transports']): void;
|
|
428
433
|
init(): Promise<void>;
|
|
@@ -432,6 +437,7 @@ declare class Client {
|
|
|
432
437
|
get moq(): MoQBundle | null;
|
|
433
438
|
onMoQReady(cb: () => void): () => void;
|
|
434
439
|
onMoQFailed(cb: () => void): () => void;
|
|
440
|
+
refreshTransportCapabilities(reason?: string): Promise<void>;
|
|
435
441
|
onMoQObject(callback: (ns: string, name: string, obj: Uint8Array, meta: any) => void): () => void;
|
|
436
442
|
subscribeMoQPeer(connection: Connection): void;
|
|
437
443
|
subscribeMoQPeerNode(peerId: string, subscriptionKey?: string): void;
|
package/dist/runtime/index.js
CHANGED
|
@@ -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-
|
|
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';
|
package/dist/runtime/tauri.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { I as IpcRuntimeAdapter, N as NativeIpcBridgeOptions, P as PlutoIpcBridge } from '../IpcRuntimeAdapter-
|
|
2
|
-
import '../types-
|
|
3
|
-
import '../DelegatingRuntimeAdapter-
|
|
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';
|
|
4
4
|
import '../IEngineBridge-C7OT2CRv.js';
|
|
5
5
|
|
|
6
6
|
/**
|
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-RRCARL4S.js';import'../chunk-L6OUJ6YN.js';import'../chunk-MESPJTUA.js';import'../chunk-34LATQZZ.js';import'../chunk-QT2ASNI3.js';import'../chunk-C7YN5MSV.js';
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { o as ProtocolName } from '../types-
|
|
1
|
+
import { K as RouteDescriptor, o as ProtocolName } from '../types-ByZyADCn.js';
|
|
2
|
+
export { O as RouteFamily, Q as RouteImplementationKind } from '../types-ByZyADCn.js';
|
|
3
|
+
|
|
4
|
+
declare const ROUTE_DESCRIPTORS: readonly RouteDescriptor[];
|
|
5
|
+
declare function getRouteDescriptor(id: ProtocolName): RouteDescriptor;
|
|
6
|
+
declare function listRouteDescriptors(): readonly RouteDescriptor[];
|
|
2
7
|
|
|
3
8
|
declare const TRANSPORT_LABELS: readonly ProtocolName[];
|
|
4
9
|
declare function normalizeTransportLabel(value: unknown): ProtocolName | undefined;
|
|
@@ -8,4 +13,4 @@ declare function isOptionalTransportLabel(value: unknown): boolean;
|
|
|
8
13
|
declare function isWebRtcTransportLabel(value: unknown): boolean;
|
|
9
14
|
declare function isIndependentTransportLabel(value: unknown): boolean;
|
|
10
15
|
|
|
11
|
-
export { ProtocolName, TRANSPORT_LABELS, isDirectIrohTransportLabel, isIndependentTransportLabel, isIrohBaseTransportLabel, isOptionalTransportLabel, isWebRtcTransportLabel, normalizeTransportLabel };
|
|
16
|
+
export { ProtocolName, ROUTE_DESCRIPTORS, RouteDescriptor, TRANSPORT_LABELS, getRouteDescriptor, isDirectIrohTransportLabel, isIndependentTransportLabel, isIrohBaseTransportLabel, isOptionalTransportLabel, isWebRtcTransportLabel, listRouteDescriptors, normalizeTransportLabel };
|
package/dist/transport/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as TRANSPORT_LABELS,d as isDirectIrohTransportLabel,
|
|
1
|
+
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';
|
|
@@ -10,6 +10,11 @@ interface AppLimits {
|
|
|
10
10
|
}
|
|
11
11
|
interface PlutoRTCConfiguration extends RTCConfiguration {
|
|
12
12
|
iceServers?: RTCIceServer[];
|
|
13
|
+
/**
|
|
14
|
+
* Populate public STUN defaults when no ICE servers are configured.
|
|
15
|
+
* Set to false with `iceServers: []` for an intentional host-only lane.
|
|
16
|
+
*/
|
|
17
|
+
useDefaultIceServers?: boolean;
|
|
13
18
|
privacyMode?: boolean;
|
|
14
19
|
useTurn?: boolean;
|
|
15
20
|
/** Prefer host/srflx ICE candidates and upgrade aggressively on LAN. */
|
|
@@ -93,20 +98,51 @@ interface ChannelDescriptor {
|
|
|
93
98
|
signalingPolicy?: ChannelSignalingPolicy;
|
|
94
99
|
description?: string;
|
|
95
100
|
}
|
|
96
|
-
type ProtocolName = 'iroh' | 'iroh-quic' | 'iroh-relay' | 'iroh-lan' | 'ble' | 'webrtc' | 'webrtc-lan' | 'moq';
|
|
101
|
+
type ProtocolName = 'iroh' | 'iroh-quic' | 'iroh-relay' | 'iroh-lan' | 'ble' | 'webrtc' | 'webrtc-lan' | 'webrtc-turn' | 'moq';
|
|
97
102
|
type ProtocolMaturity = 'stable' | 'experimental' | 'unsupported';
|
|
98
103
|
type ProtocolBaseName = 'iroh' | 'webrtc' | 'moq';
|
|
99
|
-
type
|
|
104
|
+
type RouteFamily = 'iroh-path' | 'iroh-physical' | 'optional-route';
|
|
105
|
+
type RouteImplementationKind = 'core' | 'host-installed' | 'route-adapter' | 'path-label';
|
|
106
|
+
/**
|
|
107
|
+
* Public compatibility type. `native` and `plugin` are legacy capability
|
|
108
|
+
* labels; generated route descriptors use `RouteImplementationKind`.
|
|
109
|
+
*/
|
|
110
|
+
type ProtocolImplementationKind = RouteImplementationKind | 'native' | 'plugin';
|
|
100
111
|
type ProtocolLocality = 'nearby' | 'direct-internet' | 'relay' | 'mixed';
|
|
112
|
+
interface RouteDescriptor {
|
|
113
|
+
id: ProtocolName;
|
|
114
|
+
baseProtocol: ProtocolBaseName;
|
|
115
|
+
family: RouteFamily;
|
|
116
|
+
implementation: RouteImplementationKind;
|
|
117
|
+
locality: ProtocolLocality;
|
|
118
|
+
maturity: ProtocolMaturity;
|
|
119
|
+
defaultRank: number;
|
|
120
|
+
browser: boolean;
|
|
121
|
+
native: boolean;
|
|
122
|
+
independentlyInstantiable: boolean;
|
|
123
|
+
}
|
|
101
124
|
interface ProtocolCapability {
|
|
125
|
+
/** Canonical descriptor id; additive to the legacy capability shape. */
|
|
126
|
+
id?: ProtocolName;
|
|
127
|
+
/** Compatibility alias for `id`. */
|
|
102
128
|
protocol: ProtocolName;
|
|
103
129
|
baseProtocol: ProtocolBaseName;
|
|
130
|
+
/** Canonical route family; additive to the legacy capability shape. */
|
|
131
|
+
family?: RouteFamily;
|
|
104
132
|
implementation: ProtocolImplementationKind;
|
|
105
133
|
locality: ProtocolLocality;
|
|
106
134
|
maturity: ProtocolMaturity;
|
|
135
|
+
/** Canonical descriptor rank; additive to the legacy capability shape. */
|
|
136
|
+
defaultRank?: number;
|
|
137
|
+
/** Canonical implementation taxonomy; `implementation` retains legacy values. */
|
|
138
|
+
routeImplementation?: RouteImplementationKind;
|
|
139
|
+
/** Compatibility alias for `defaultRank`. */
|
|
107
140
|
preferredRank: number;
|
|
108
141
|
browser: boolean;
|
|
109
142
|
native: boolean;
|
|
143
|
+
/** Canonical descriptor flag; additive to the legacy capability shape. */
|
|
144
|
+
independentlyInstantiable?: boolean;
|
|
145
|
+
configured?: boolean;
|
|
110
146
|
available: boolean;
|
|
111
147
|
reason?: string;
|
|
112
148
|
}
|
|
@@ -503,6 +539,20 @@ interface DeviceStatusSnapshot extends Device {
|
|
|
503
539
|
activeTransport?: ProtocolName;
|
|
504
540
|
parallelTransport?: ProtocolName | null;
|
|
505
541
|
availableTransports?: ProtocolName[];
|
|
542
|
+
/** Latest transport-owned RTT sample for the active route. */
|
|
543
|
+
latencyMs?: number | null;
|
|
544
|
+
/** Passive RTT samples keyed by the exact usable route label. */
|
|
545
|
+
latencyByTransport?: TransportLatencySnapshot;
|
|
546
|
+
}
|
|
547
|
+
interface TransportLatencySnapshot {
|
|
548
|
+
webrtc?: number | null;
|
|
549
|
+
webrtcLan?: number | null;
|
|
550
|
+
webrtcTurn?: number | null;
|
|
551
|
+
iroh?: number | null;
|
|
552
|
+
irohLan?: number | null;
|
|
553
|
+
irohRelay?: number | null;
|
|
554
|
+
ble?: number | null;
|
|
555
|
+
moq?: number | null;
|
|
506
556
|
}
|
|
507
557
|
interface ManagedConnectionRecord {
|
|
508
558
|
connectionId: string;
|
|
@@ -753,10 +803,25 @@ interface TransportContext {
|
|
|
753
803
|
sendMoQ: (data: Uint8Array, options?: {
|
|
754
804
|
alreadyProtected?: boolean;
|
|
755
805
|
}) => Promise<void>;
|
|
806
|
+
/**
|
|
807
|
+
* Send one plaintext typed frame over a fresh runtime-owned Iroh application
|
|
808
|
+
* stream. The runtime applies the negotiated application-crypto stream
|
|
809
|
+
* envelope; callers must not pre-encrypt the frame a second time.
|
|
810
|
+
*/
|
|
811
|
+
sendIrohApplicationFrame?: (frame: Uint8Array) => Promise<void>;
|
|
756
812
|
priorities: ProtocolName[];
|
|
813
|
+
/**
|
|
814
|
+
* Orders already-eligible route candidates through the Rust/WASM policy
|
|
815
|
+
* owner. This is a pure decision call: it must not dial, retry, promote,
|
|
816
|
+
* demote, or mutate connection state.
|
|
817
|
+
*/
|
|
818
|
+
rankRoutes?: (candidates: ProtocolName[]) => ProtocolName[];
|
|
757
819
|
disableIrohFallback: boolean;
|
|
758
820
|
isMoQReady: () => boolean;
|
|
759
821
|
isMoQDataReady?: () => boolean;
|
|
822
|
+
isMoQApplicationRouteProven?: () => boolean;
|
|
823
|
+
requestMoQApplicationRouteProof?: () => void;
|
|
824
|
+
clearMoQApplicationRouteProof?: () => void;
|
|
760
825
|
runtimeFlow?: 'default' | 'ticket-only';
|
|
761
826
|
readerCloseStrategy?: 'cancel' | 'release-lock';
|
|
762
827
|
}
|
|
@@ -843,7 +908,7 @@ interface ConnectionOptions {
|
|
|
843
908
|
transportStableId?: number;
|
|
844
909
|
transportGeneration?: number;
|
|
845
910
|
routeGeneration?: number;
|
|
846
|
-
}) => void
|
|
911
|
+
}) => boolean | void | Promise<boolean | void>;
|
|
847
912
|
/**
|
|
848
913
|
* Fired when a connection-owned application route has proven it can carry
|
|
849
914
|
* app traffic. Consumers should use this as a lifecycle signal for the same
|
|
@@ -869,4 +934,4 @@ interface JoinRequest {
|
|
|
869
934
|
state: 'pending' | 'accepted' | 'rejected';
|
|
870
935
|
}
|
|
871
936
|
|
|
872
|
-
export type {
|
|
937
|
+
export type { RuntimeBootstrapOptions as $, AuthMode as A, BackendPeerBiStream as B, ClientOptions as C, DiscoveryMode as D, ExplicitFileDataSendParams as E, ProtocolBaseName as F, GrantScope as G, ProtocolImplementationKind as H, ISignalingBackend as I, ProtocolLocality as J, RouteDescriptor as K, LocalDeviceInfo as L, ManagedConnectionRecord as M, NativeManagedSessionStartResult as N, RouteFamily as O, PeerSessionSnapshot as P, RouteImplementationKind as Q, RuntimeIdentity as R, SignalingMode as S, SpaceAuthMode as T, SignalingOptions as U, JoinRoomOptions as V, RoomMember as W, IncomingStreamChannelMetadata as X, RoomCreationMode as Y, ScanningLoopOptions as Z, ScanningLoopHandle as _, Device as a, RuntimeBootstrapResult as a0, ManagedApplicationRouteOptions as a1, PeerState as a2, PeerScope as a3, PeerHealth as a4, ChannelDescriptor as a5, JoinRequest as a6, ConnectionOptions as a7, TransportLatencySnapshot as a8, ManagedDeviceConnectOptions as a9, PeerLifecycleStatus as aa, DeviceStatusSnapshot as b, ResolvedPeerIdentity as c, SignalingEnvelope as d, DeviceEvent as e, SignalingSession as f, SessionEvent as g, BackendPeerUniStream as h, NativeConnectParams as i, NativeConnectResult as j, BackendConnectionState as k, ConnectDeviceResult as l, ConnectDeviceHooks as m, ConnectDeviceOptions as n, ProtocolName as o, ProtocolCapability as p, ProtocolCapabilityMap as q, ApplicationPayloadCrypto as r, ApplicationCryptoStreamTools as s, SpaceTokenProvider as t, AppLimits as u, ApplicationCryptoBiStream as v, ApplicationPayloadReadinessOptions as w, ApplicationPayloadRouteOptions as x, ApplicationPayloadSendOptions as y, DevicePresenceStatus as z };
|