openrtc 1.0.26 → 2.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +143 -205
- package/dist/DelegatingRuntimeAdapter-DqfHkjLy.d.ts +373 -0
- package/dist/ITransport-BsPcaov7.d.ts +16 -0
- package/dist/OpenRTCShared-TKAQLONA.js +1 -0
- package/dist/WasmBridge-2A22U7RU.js +1 -0
- package/dist/auth/index.js +1 -1
- package/dist/auth/internal.js +1 -1
- package/dist/{capabilities-CaqXOIUU.d.ts → capabilities-YSskrE8H.d.ts} +1 -1
- package/dist/chunk-2QHDEGVX.js +1 -0
- package/dist/chunk-4K2QPYGT.js +2 -0
- package/dist/chunk-7Z6N46RB.js +2 -0
- package/dist/chunk-A3IAG6EL.js +1 -0
- package/dist/chunk-BXFXPIXO.js +1 -0
- package/dist/chunk-CEMN2JKR.js +3 -0
- package/dist/chunk-DTWEQS3J.js +1 -0
- package/dist/chunk-GW7P3D54.js +1 -0
- package/dist/chunk-K37WVIZL.js +1 -0
- package/dist/chunk-N26S7V4N.js +1 -0
- package/dist/chunk-N4SX7C3W.js +2 -0
- package/dist/chunk-NB4H5TP3.js +1 -0
- package/dist/chunk-NT5YHZQH.js +1 -0
- package/dist/chunk-PODAMIL6.js +2 -0
- package/dist/chunk-RD3JEGGF.js +2 -0
- package/dist/chunk-UEYM6WTT.js +2 -0
- package/dist/chunk-VK6KX433.js +1 -0
- package/dist/chunk-WMRCP3YX.js +1 -0
- package/dist/chunk-XE43HAXV.js +2 -0
- package/dist/chunk-YBXGNKM7.js +2 -0
- package/dist/chunk-YGJ6OAPR.js +1 -0
- package/dist/factories-O5575ECL.js +1 -0
- package/dist/index.d.ts +11 -65
- package/dist/index.js +1 -1
- package/dist/ipcFactory-FBNUVH7V.js +1 -0
- package/dist/native.d.ts +9 -15
- 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 +3 -2
- package/dist/runtime/index.d.ts +110 -17
- package/dist/runtime/index.js +2 -1
- package/dist/runtime/tauri.d.ts +4 -4
- package/dist/runtime/tauri.js +1 -1
- package/dist/{tauri-BpsecNrp.d.ts → tauri-Cz9n17g8.d.ts} +2 -2
- package/dist/testing.d.ts +29 -0
- package/dist/testing.js +1 -0
- package/dist/transport/index.d.ts +47 -7
- package/dist/transport/index.js +1 -1
- package/dist/{assembly-CscFVHYK.d.ts → types-BDc7AZYI.d.ts} +446 -28
- package/dist/{types-BJU2GoVb.d.ts → types-BUXwspL0.d.ts} +11 -17
- package/dist/{types-zT2QwuCv.d.ts → types-BVJr065k.d.ts} +43 -3
- package/package.json +15 -4
- package/dist/DelegatingRuntimeAdapter-Cg3jFk1b.d.ts +0 -133
- package/dist/chunk-2W2YWRIZ.js +0 -1
- package/dist/chunk-BW6OKBHV.js +0 -2
- package/dist/chunk-D4JYPV6F.js +0 -2
- package/dist/chunk-DIBUXEEO.js +0 -1
- package/dist/chunk-DXJZDB7Q.js +0 -3
- package/dist/chunk-OCSZA6PK.js +0 -2
- package/dist/chunk-PPGIC6DR.js +0 -2
- package/dist/chunk-QBAVJDN2.js +0 -2
- package/dist/chunk-QT2ASNI3.js +0 -1
- package/dist/framing-zRvEKOld.d.ts +0 -29
- package/dist/spaceTokens-CiwcKKr2.d.ts +0 -297
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as createIpcClient,a as createWasmClient}from'./chunk-XE43HAXV.js';import'./chunk-CEMN2JKR.js';import'./chunk-4K2QPYGT.js';import'./chunk-7Z6N46RB.js';import'./chunk-K37WVIZL.js';import'./chunk-BXFXPIXO.js';import'./chunk-A3IAG6EL.js';import'./chunk-YBXGNKM7.js';import'./chunk-VK6KX433.js';import'./chunk-NT5YHZQH.js';import'./chunk-N26S7V4N.js';import'./chunk-NB4H5TP3.js';import'./chunk-RD3JEGGF.js';import'./chunk-C7YN5MSV.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,31 +1,19 @@
|
|
|
1
|
-
import { R as RuntimeClientOptions, I as ITransport } from './types-BJU2GoVb.js';
|
|
2
|
-
export { w as ChannelDescriptor, x as ConnectionEvent, y as ConnectionTarget, D as DeviceProfile, z as IncomingStream, P as PeerConnectOptions, A as PeerReadiness, B as PeerStreamOptions, E as PresenceLoopOptions, F as RawConnection, t as RuntimeApplicationPayloadReadinessOptions, G as RuntimeAuthContext, H as RuntimeAuthIdentity, J as RuntimeAutoConnectPolicy, l as RuntimeChannelDescriptor, u as RuntimeConnectionEvent, s as RuntimeConnectionStateSnapshot, K as RuntimeConnectionTarget, c as RuntimeDevice, e as RuntimeDeviceConnectOptions, L as RuntimeDevicePresenceStatus, M as RuntimeDeviceStatus, d as RuntimeDeviceStatusSnapshot, n as RuntimeIncomingStream, q as RuntimeJoinRoomOptions, f as RuntimeLocalDeviceInfo, g as RuntimeLocalDeviceProfile, N as RuntimeLogicalChannelFraming, b as RuntimeManagedSession, O as RuntimeManagedSessionKind, a as RuntimeManagedSessionOptions, Q as RuntimeManagedSessionPlatform, i as RuntimePeerConnectOptions, k as RuntimePeerHealth, S as RuntimePeerLifecycleStatus, j as RuntimePeerReadinessSnapshot, T as RuntimePeerScope, U as RuntimePeerSessionSnapshot, h as RuntimePeerState, m as RuntimePeerStreamOptions, V as RuntimePresenceLoopOptions, W as RuntimePresencePolicy, v as RuntimeRawConnection, r as RuntimeRoomMember, o as RuntimeScopedChannelOptions, p as RuntimeScopedLogicalChannel, X as RuntimeSession, Y as RuntimeUiConnectionStatus, Z as ScopedChannelOptions, _ as ScopedLogicalChannel } from './types-BJU2GoVb.js';
|
|
3
1
|
import { P as PlutoIpcBridge } from './ipc-CflAVodw.js';
|
|
4
|
-
import { O as OpenRTCClient } from './
|
|
5
|
-
export {
|
|
6
|
-
import
|
|
7
|
-
export { Y as AppLimits, Z as ApplicationCryptoBiStream, u as ApplicationPayloadReadinessOptions, v as ApplicationPayloadRouteOptions, x as ApplicationPayloadSendOptions, A as AuthMode, Q as DevicePresenceStatus, D as DiscoveryMode, G as GrantScope, _ as ProtocolBaseName, $ as ProtocolImplementationKind, a0 as ProtocolLocality, a1 as RouteDescriptor, a2 as RouteFamily, a3 as RouteImplementationKind, d as SignalingMode, S as SpaceAuthMode, a as SpaceTokenProvider } from './types-zT2QwuCv.js';
|
|
8
|
-
export { ROUTE_DESCRIPTORS, TRANSPORT_LABELS, getRouteDescriptor, isDirectIrohTransportLabel, isIndependentTransportLabel, isIrohBaseTransportLabel, isOptionalTransportLabel, isWebRtcTransportLabel, listRouteDescriptors, normalizeTransportLabel } from './transport/index.js';
|
|
9
|
-
export { isRuntimeDeviceActive, isRuntimeDeviceConnectable, isRuntimeDeviceRoutable } from './runtime/device-status.js';
|
|
10
|
-
export { R as RuntimeJsonFrameHandler, a as RuntimeU32BEFrameHandler, c as createRuntimeJsonFrameDecoder, b as createRuntimeU32BEFrameDecoder, d as decodeRuntimeJsonPayload, e as encodeRuntimeJsonFrame, f as encodeRuntimeJsonPayload, g as encodeRuntimeU32BEFrame } from './framing-zRvEKOld.js';
|
|
11
|
-
export { O as OPENRTC_RUNTIME_POLICY, a as RuntimePolicySnapshot, S as ScopedSession, c as Session, d as SessionOptions, g as getRuntimePolicy } from './assembly-CscFVHYK.js';
|
|
12
|
-
export { b as RuntimeAdapterKind, R as RuntimeCapabilities } from './capabilities-CaqXOIUU.js';
|
|
2
|
+
import { O as OpenRTCOptions, a as OpenRTCClient } from './types-BDc7AZYI.js';
|
|
3
|
+
export { c as OpenRTCAttestationProvider, d as OpenRTCAuthProvider, f as OpenRTCCapabilityHandle, h as OpenRTCDevicesHandle, i as OpenRTCDevicesStartOptions, k as OpenRTCRoomHandle, l as OpenRTCRoomJoinOptions, m as OpenRTCSpaceHandle, n as OpenRTCSpaceJoinOptions, o as OpenRTCTicketHandle, p as OpenRTCTicketIssueOptions, q as OpenRTCTransportPreferences, s as OpenRTCUsageUpdate, t as OpenRTCUsageWarning } from './types-BDc7AZYI.js';
|
|
4
|
+
import './types-BVJr065k.js';
|
|
13
5
|
import './IEngineBridge-BbsT8hof.js';
|
|
6
|
+
import './types-BUXwspL0.js';
|
|
7
|
+
import './ITransport-BsPcaov7.js';
|
|
8
|
+
import './capabilities-YSskrE8H.js';
|
|
14
9
|
|
|
15
10
|
/**
|
|
16
|
-
* OpenRTC
|
|
17
|
-
*
|
|
18
|
-
* Native-only applications should import `createNativeOpenRTC` from
|
|
19
|
-
* `openrtc/native` so their webview bundle does not carry the browser WASM
|
|
20
|
-
* runtime.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Create an OpenRTC client for browser/WASM environments.
|
|
11
|
+
* Create a lazy OpenRTC 2.0 browser client. Construction validates only local
|
|
12
|
+
* input and performs no network, storage, auth, timer, WASM, or transport work.
|
|
25
13
|
*/
|
|
26
|
-
declare function OpenRTC(options:
|
|
14
|
+
declare function OpenRTC(options: OpenRTCOptions): OpenRTCClient;
|
|
27
15
|
declare namespace OpenRTC {
|
|
28
|
-
var native: (options:
|
|
16
|
+
var native: (options: OpenRTCOptions, bridge?: PlutoIpcBridge) => OpenRTCClient;
|
|
29
17
|
}
|
|
30
18
|
|
|
31
19
|
/**
|
|
@@ -104,46 +92,4 @@ declare function openRtcError(code: OpenRtcErrorCode, message: string, options:
|
|
|
104
92
|
*/
|
|
105
93
|
declare function classifyOpenRtcFailure(error: unknown): OpenRtcError;
|
|
106
94
|
|
|
107
|
-
|
|
108
|
-
private static readonly capabilityMap;
|
|
109
|
-
/** @deprecated Only WebRTC implements the legacy ITransport construction API. */
|
|
110
|
-
static createTransport(name: ProtocolName): ITransport;
|
|
111
|
-
static getProtocolCapability(name: ProtocolName): ProtocolCapability;
|
|
112
|
-
static getProtocolCapabilities(): ProtocolCapabilityMap;
|
|
113
|
-
static getPreferredProtocolOrder(options?: {
|
|
114
|
-
runtime?: 'browser' | 'native' | 'any';
|
|
115
|
-
includePathLabels?: boolean;
|
|
116
|
-
}): ProtocolName[];
|
|
117
|
-
static assertProtocolAvailable(name: ProtocolName): void;
|
|
118
|
-
}
|
|
119
|
-
declare function getPreferredProtocolOrder(options?: Parameters<typeof TransportFactory.getPreferredProtocolOrder>[0]): ProtocolName[];
|
|
120
|
-
|
|
121
|
-
declare function isApplicationEncryptedPayload(payload: Uint8Array): boolean;
|
|
122
|
-
declare function createSharedSecretApplicationCrypto(key: Uint8Array, options?: {
|
|
123
|
-
requireEncrypted?: boolean;
|
|
124
|
-
randomBytes?: (byteLength: number) => Uint8Array;
|
|
125
|
-
replayProtection?: boolean;
|
|
126
|
-
}): ApplicationPayloadCrypto;
|
|
127
|
-
declare function createApplicationCryptoStreamTools(crypto: ApplicationPayloadCrypto, options?: {
|
|
128
|
-
typeId?: number;
|
|
129
|
-
maxFrameBytes?: number;
|
|
130
|
-
}): ApplicationCryptoStreamTools;
|
|
131
|
-
|
|
132
|
-
declare const KEY_AGREEMENT_PUBLIC_KEY_BYTES = 32;
|
|
133
|
-
declare const KEY_AGREEMENT_ALGORITHM = "openrtc:x25519-hkdf:v1";
|
|
134
|
-
interface ApplicationKeyAgreementPayload {
|
|
135
|
-
algorithm: typeof KEY_AGREEMENT_ALGORITHM;
|
|
136
|
-
publicKey: string;
|
|
137
|
-
}
|
|
138
|
-
interface EphemeralKeyAgreement {
|
|
139
|
-
publicKey: Uint8Array;
|
|
140
|
-
secretKey: Uint8Array;
|
|
141
|
-
}
|
|
142
|
-
declare function generateEphemeralKeyAgreement(randomBytes?: (byteLength: number) => Uint8Array): EphemeralKeyAgreement;
|
|
143
|
-
declare function deriveApplicationCryptoKey(localSecretKey: Uint8Array, remotePublicKey: Uint8Array, localNodeId: string, remoteNodeId: string): Uint8Array;
|
|
144
|
-
declare function encodeApplicationKeyAgreementPayload(publicKey: Uint8Array): ApplicationKeyAgreementPayload;
|
|
145
|
-
|
|
146
|
-
type UpgradeState = 'none' | 'upgrading' | 'upgraded' | 'failed';
|
|
147
|
-
type OutboundMessage = string | object | ArrayBuffer | Uint8Array;
|
|
148
|
-
|
|
149
|
-
export { ApplicationCryptoStreamTools, type ApplicationKeyAgreementPayload, ApplicationPayloadCrypto, KEY_AGREEMENT_ALGORITHM, KEY_AGREEMENT_PUBLIC_KEY_BYTES, OPENRTC_ERROR_CODES, OpenRTC, OpenRTCClient, RuntimeClientOptions as OpenRTCOptions, OpenRtcError, type OpenRtcErrorCode, type OpenRtcErrorOptions, type OpenRtcErrorPlane, type OpenRtcErrorProjection, type OutboundMessage, ProtocolCapability, ProtocolCapabilityMap, ProtocolName, RuntimeClientOptions, type UpgradeState, classifyOpenRtcFailure, createApplicationCryptoStreamTools, createSharedSecretApplicationCrypto, deriveApplicationCryptoKey, encodeApplicationKeyAgreementPayload, generateEphemeralKeyAgreement, getPreferredProtocolOrder, isApplicationEncryptedPayload, openRtcError, projectOpenRtcErrorFields };
|
|
95
|
+
export { OPENRTC_ERROR_CODES, OpenRTC, OpenRTCClient, OpenRTCOptions, OpenRtcError, type OpenRtcErrorCode, type OpenRtcErrorOptions, type OpenRtcErrorPlane, type OpenRtcErrorProjection, classifyOpenRtcFailure, openRtcError, projectOpenRtcErrorFields };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a
|
|
1
|
+
import {a}from'./chunk-UEYM6WTT.js';import {c}from'./chunk-PODAMIL6.js';import {d}from'./chunk-K37WVIZL.js';export{a as OPENRTC_ERROR_CODES,b as OpenRtcError,e as classifyOpenRtcFailure,d as openRtcError,c as projectOpenRtcErrorFields}from'./chunk-NT5YHZQH.js';function i(p){return c(p,{platform:"web",runtimeFactory:async e=>{let{createWasmClient:t}=await import('./factories-O5575ECL.js');return t(e)}})}i.native=function(p,e=d()){return c(p,{platform:"native",deviceKeyProvider:a(e),deviceIdProvider:async()=>{let t=await e.invoke("get_rtc_local_device_info");return String(t?.deviceId??"")},runtimeFactory:async t=>{let{createIpcClient:a}=await import('./ipcFactory-FBNUVH7V.js');return a(t,e)}})};export{i as OpenRTC};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as createIpcClient}from'./chunk-YGJ6OAPR.js';import'./chunk-CEMN2JKR.js';import'./chunk-4K2QPYGT.js';import'./chunk-7Z6N46RB.js';import'./chunk-K37WVIZL.js';import'./chunk-BXFXPIXO.js';import'./chunk-A3IAG6EL.js';import'./chunk-YBXGNKM7.js';import'./chunk-VK6KX433.js';import'./chunk-NT5YHZQH.js';import'./chunk-N26S7V4N.js';import'./chunk-NB4H5TP3.js';import'./chunk-RD3JEGGF.js';import'./chunk-C7YN5MSV.js';
|
package/dist/native.d.ts
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import { R as RuntimeClientOptions } from './types-BJU2GoVb.js';
|
|
2
1
|
import { P as PlutoIpcBridge } from './ipc-CflAVodw.js';
|
|
3
2
|
export { c as classifyNativeIpcFailure, i as isNativeIpcCommandUnavailable } from './ipc-CflAVodw.js';
|
|
4
|
-
import { O as OpenRTCClient } from './
|
|
5
|
-
export {
|
|
6
|
-
|
|
3
|
+
import { O as OpenRTCOptions, a as OpenRTCClient } from './types-BDc7AZYI.js';
|
|
4
|
+
export { b as OpenRTCAccessMode, c as OpenRTCAttestationProvider, d as OpenRTCAuthProvider, e as OpenRTCBotVerificationProvider, f as OpenRTCCapabilityHandle, g as OpenRTCChannelCatalog, h as OpenRTCDevicesHandle, i as OpenRTCDevicesStartOptions, j as OpenRTCLatestStateMode, k as OpenRTCRoomHandle, l as OpenRTCRoomJoinOptions, m as OpenRTCSpaceHandle, n as OpenRTCSpaceJoinOptions, o as OpenRTCTicketHandle, p as OpenRTCTicketIssueOptions, q as OpenRTCTransportPreferences, r as OpenRTCUsageNamespace, s as OpenRTCUsageUpdate, t as OpenRTCUsageWarning } from './types-BDc7AZYI.js';
|
|
5
|
+
import './types-BVJr065k.js';
|
|
7
6
|
import './IEngineBridge-BbsT8hof.js';
|
|
8
|
-
import './
|
|
9
|
-
import './
|
|
7
|
+
import './types-BUXwspL0.js';
|
|
8
|
+
import './ITransport-BsPcaov7.js';
|
|
9
|
+
import './capabilities-YSskrE8H.js';
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* Native-only OpenRTC entrypoint.
|
|
13
|
-
*
|
|
14
|
-
* This entry deliberately imports only the IPC runtime. It is the preferred
|
|
15
|
-
* entry for Tauri webviews because it excludes the browser WASM adapter and
|
|
16
|
-
* binary from the application bundle.
|
|
17
|
-
*/
|
|
11
|
+
/** Native-only OpenRTC 2.0 entrypoint. */
|
|
18
12
|
|
|
19
|
-
declare function createNativeOpenRTC(options:
|
|
13
|
+
declare function createNativeOpenRTC(options: OpenRTCOptions, bridge: PlutoIpcBridge): OpenRTCClient;
|
|
20
14
|
|
|
21
|
-
export { OpenRTCClient, createNativeOpenRTC };
|
|
15
|
+
export { OpenRTCClient, OpenRTCOptions, createNativeOpenRTC };
|
package/dist/native.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a
|
|
1
|
+
import {a}from'./chunk-UEYM6WTT.js';import {c}from'./chunk-PODAMIL6.js';export{a as classifyNativeIpcFailure,b as isNativeIpcCommandUnavailable}from'./chunk-K37WVIZL.js';function m(n,e){return c(n,{platform:"native",deviceKeyProvider:a(e),deviceIdProvider:async()=>{let t=await e.invoke("get_rtc_local_device_info");return String(t?.deviceId??"")},runtimeFactory:async t=>{let{createIpcClient:o}=await import('./ipcFactory-FBNUVH7V.js');return o(t,e)}})}export{m as createNativeOpenRTC};
|
package/dist/openrtc_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { D as DelegatingRuntimeAdapter, W as WasmBridgeOptions } from '../DelegatingRuntimeAdapter-
|
|
2
|
-
import '../types-
|
|
1
|
+
import { D as DelegatingRuntimeAdapter, W as WasmBridgeOptions } from '../DelegatingRuntimeAdapter-DqfHkjLy.js';
|
|
2
|
+
import '../types-BVJr065k.js';
|
|
3
|
+
import '../capabilities-YSskrE8H.js';
|
|
3
4
|
import '../IEngineBridge-BbsT8hof.js';
|
|
4
|
-
import '../capabilities-CaqXOIUU.js';
|
|
5
5
|
|
|
6
6
|
declare class WasmRuntimeAdapter extends DelegatingRuntimeAdapter {
|
|
7
7
|
constructor(options: WasmBridgeOptions);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as WasmRuntimeAdapter}from'../chunk-
|
|
1
|
+
export{a as WasmRuntimeAdapter}from'../chunk-GW7P3D54.js';import'../chunk-A3IAG6EL.js';import'../chunk-YBXGNKM7.js';import'../chunk-VK6KX433.js';import'../chunk-NT5YHZQH.js';import'../chunk-N26S7V4N.js';import'../chunk-NB4H5TP3.js';import'../chunk-RD3JEGGF.js';import'../chunk-C7YN5MSV.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as RuntimeDevice, l as RuntimeDeviceStatusSnapshot } from '../types-BUXwspL0.js';
|
|
2
2
|
import '../IEngineBridge-BbsT8hof.js';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-BVJr065k.js';
|
|
4
|
+
import '../ITransport-BsPcaov7.js';
|
|
4
5
|
|
|
5
6
|
interface RuntimeDeviceActiveOptions {
|
|
6
7
|
now?: number;
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { C as Connection, K as RuntimeConnectionTarget, v as RuntimeRawConnection } from '../types-BJU2GoVb.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-BJU2GoVb.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';
|
|
9
|
-
export { RuntimeDeviceActiveOptions, isRuntimeDeviceActive, isRuntimeDeviceConnectable, isRuntimeDeviceRoutable } from './device-status.js';
|
|
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';
|
|
11
|
-
import { I as IpcRuntimeAdapter } from '../tauri-BpsecNrp.js';
|
|
12
|
-
export { a as IpcRuntimeAdapterOptions, T as TauriRuntimeAdapter, b as TauriRuntimeAdapterOptions, c as createTauriIpcBridge } from '../tauri-BpsecNrp.js';
|
|
13
|
-
import { WasmRuntimeAdapter } from './WasmRuntimeAdapter.js';
|
|
1
|
+
import { R as RuntimeFactoryOptions, P as PlutoRuntimeAssembly, u as OpenRTCClient, f as OpenRTCCapabilityHandle, v as PeerReconciliationStats } from '../types-BDc7AZYI.js';
|
|
2
|
+
export { w as OPENRTC_RUNTIME_POLICY, x as RuntimeClient, y as RuntimePolicySnapshot, D as ScopedConnectionActorError, z as ScopedConnectionActorErrorKind, A as ScopedConnectionActorHandle, B as ScopedConnectionActorHandleOptions, C as ScopedConnectionActorRegistry, E as ScopedConnectionActorState, F as ScopedConnectionClose, G as ScopedConnectionDial, H as ScopedConnectionKey, I as ScopedLogicalChannelHandle, J as ScopedPreferredTransport, K as getRuntimePolicy, L as scopedConnectionKey, M as scopedConnectionKeyToString } from '../types-BDc7AZYI.js';
|
|
3
|
+
import { R as RuntimeClientOptions, C as Connection, q as RuntimeConnectionTarget, u as RuntimeRawConnection } from '../types-BUXwspL0.js';
|
|
4
|
+
export { A as ChannelDescriptor, B as ConnectionEvent, D as ConnectionTarget, E as DeviceProfile, I as IncomingStream, P as PeerConnectOptions, F as PeerReadiness, G as PeerStreamOptions, H as PresenceLoopOptions, J as RawConnection, y as RuntimeApplicationPayloadReadinessOptions, K as RuntimeApplicationPayloadRouteOptions, L as RuntimeAuthContext, f as RuntimeAuthIdentity, M as RuntimeAutoConnectPolicy, v as RuntimeChannelDescriptor, z as RuntimeConnectionEvent, b as RuntimeConnectionStateSnapshot, i as RuntimeDevice, m as RuntimeDeviceConnectOptions, N as RuntimeDevicePresenceStatus, O as RuntimeDeviceStatus, l as RuntimeDeviceStatusSnapshot, e as RuntimeIncomingStream, o as RuntimeJoinRoomOptions, g as RuntimeLocalDeviceInfo, h as RuntimeLocalDeviceProfile, Q as RuntimeLogicalChannelFraming, k as RuntimeManagedSession, S as RuntimeManagedSessionKind, j as RuntimeManagedSessionOptions, T as RuntimeManagedSessionPlatform, d as RuntimePeerConnectOptions, x as RuntimePeerHealth, U as RuntimePeerLifecycleStatus, c as RuntimePeerReadinessSnapshot, V as RuntimePeerScope, W as RuntimePeerSessionSnapshot, a as RuntimePeerState, t as RuntimePeerStreamOptions, w as RuntimePresenceLoopOptions, X as RuntimePresencePolicy, p as RuntimeRoomMember, r as RuntimeScopedChannelOptions, s as RuntimeScopedLogicalChannel, n as RuntimeSession, Y as RuntimeUiConnectionStatus, Z as ScopedChannelOptions, _ as ScopedLogicalChannel, $ as Session, a0 as SessionOptions } from '../types-BUXwspL0.js';
|
|
14
5
|
import { P as PlutoIpcBridge } from '../ipc-CflAVodw.js';
|
|
15
6
|
export { N as NativeIpcFailureKind, a as PlutoIpcUnlisten, c as classifyNativeIpcFailure, i as isNativeIpcCommandUnavailable } from '../ipc-CflAVodw.js';
|
|
7
|
+
import * as Draft14 from '@moq/net';
|
|
8
|
+
import { a0 as SignalingOptions, q as ISignalingBackend, R as RuntimeIdentity, j as RoomMember, r as SignalingEnvelope, S as SignalingSession, D as Device, x as DesiredPeerProjection, B as BackendConnectionState, $ as AppLimits, H as GrantScope, J as JoinRoomOptions, I as IncomingStreamChannelMetadata, U as ApplicationCryptoStreamTools, a1 as RoomCreationMode, i as ClientOptions, A as ApplicationPayloadCrypto, n as DiscoveryMode, Q as ProtocolCapabilityMap, a2 as ScanningLoopOptions, a3 as ScanningLoopHandle, a4 as RuntimeBootstrapOptions, a5 as RuntimeBootstrapResult, a as ApplicationPayloadReadinessOptions, a6 as ManagedApplicationRouteOptions, d as PeerState, e as PeerScope, f as PeerHealth, g as ChannelDescriptor, a7 as JoinRequest, N as NativeConnectParams, z as NativeConnectResult, a8 as SpaceTokenProvider } from '../types-BVJr065k.js';
|
|
9
|
+
import { R as RuntimeCapabilities } from '../capabilities-YSskrE8H.js';
|
|
10
|
+
export { B as BROWSER_WASM_RUNTIME_CAPABILITIES, b as BrowserRuntimeCapabilityHost, N as NATIVE_IPC_RUNTIME_CAPABILITIES, c as NativeRuntimeStatusSnapshot, d as NativeRuntimeTransportFeatureStatus, e as RuntimeAdapterKind, a as RuntimeCapabilityProfile, f as cloneRuntimeCapabilities, r as runtimeCapabilitiesForBrowserHost, g as runtimeCapabilitiesFromNativeStatus, h as runtimeCapabilityProfile } from '../capabilities-YSskrE8H.js';
|
|
11
|
+
export { RuntimeDeviceActiveOptions, isRuntimeDeviceActive, isRuntimeDeviceConnectable, isRuntimeDeviceRoutable } from './device-status.js';
|
|
12
|
+
import { I as IpcRuntimeAdapter } from '../tauri-Cz9n17g8.js';
|
|
13
|
+
export { a as IpcRuntimeAdapterOptions, T as TauriRuntimeAdapter, b as TauriRuntimeAdapterOptions, c as createTauriIpcBridge } from '../tauri-Cz9n17g8.js';
|
|
14
|
+
import { a as WasmBridge } from '../DelegatingRuntimeAdapter-DqfHkjLy.js';
|
|
15
|
+
export { WasmRuntimeAdapter } from './WasmRuntimeAdapter.js';
|
|
16
16
|
import '../IEngineBridge-BbsT8hof.js';
|
|
17
|
-
import '../
|
|
17
|
+
import '../ITransport-BsPcaov7.js';
|
|
18
18
|
|
|
19
19
|
declare class Signaling {
|
|
20
20
|
private readonly appTag;
|
|
@@ -66,7 +66,7 @@ declare class Signaling {
|
|
|
66
66
|
* @deprecated Legacy assembly helper. Use `OpenRTC()` for app code.
|
|
67
67
|
* Removal target: OpenRTC 0.2.0.
|
|
68
68
|
*/
|
|
69
|
-
declare function createWasmClient(options: RuntimeFactoryOptions): PlutoRuntimeAssembly<
|
|
69
|
+
declare function createWasmClient(options: RuntimeFactoryOptions): Promise<PlutoRuntimeAssembly<WasmBridge>>;
|
|
70
70
|
/**
|
|
71
71
|
* @deprecated Legacy assembly helper. Native applications should use
|
|
72
72
|
* `createNativeOpenRTC` from `openrtc/native`.
|
|
@@ -74,6 +74,23 @@ declare function createWasmClient(options: RuntimeFactoryOptions): PlutoRuntimeA
|
|
|
74
74
|
*/
|
|
75
75
|
declare function createIpcClient(options: RuntimeFactoryOptions, bridge: PlutoIpcBridge): PlutoRuntimeAssembly<IpcRuntimeAdapter>;
|
|
76
76
|
|
|
77
|
+
type OpenRTCCapabilityRuntime = OpenRTCClient;
|
|
78
|
+
/**
|
|
79
|
+
* Low-level escape hatch used only by `openrtc/runtime`. Product code should
|
|
80
|
+
* prefer the capability namespaces. Keeping this registry here prevents a
|
|
81
|
+
* runtime pointer from leaking onto the provider-neutral root surface.
|
|
82
|
+
*/
|
|
83
|
+
declare function runtimeForCapability(handle: OpenRTCCapabilityHandle): OpenRTCCapabilityRuntime;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Rollback-only constructor for the internal diagnostic sandbox. Shipping 2.0
|
|
87
|
+
* applications must use the root capability API.
|
|
88
|
+
*/
|
|
89
|
+
declare function createLegacyOpenRTC(options: RuntimeClientOptions): Promise<OpenRTCClient>;
|
|
90
|
+
declare namespace createLegacyOpenRTC {
|
|
91
|
+
var native: (options: RuntimeClientOptions, bridge?: PlutoIpcBridge) => OpenRTCClient;
|
|
92
|
+
}
|
|
93
|
+
|
|
77
94
|
interface MoQSubscriberOptions {
|
|
78
95
|
maxPendingSubscriptions?: number;
|
|
79
96
|
maxSubscribeRetries?: number;
|
|
@@ -217,7 +234,7 @@ declare class RoomManager {
|
|
|
217
234
|
private requireCoordinationGateway;
|
|
218
235
|
private get roomBackendTag();
|
|
219
236
|
private resolveRoomUserId;
|
|
220
|
-
private
|
|
237
|
+
private resolveControlPlaneAppTag;
|
|
221
238
|
private invokeRoomCallable;
|
|
222
239
|
private isAlreadyExistsError;
|
|
223
240
|
private normalizeRoomId;
|
|
@@ -503,4 +520,80 @@ declare function openRtcDebug(message: string, data?: unknown): void;
|
|
|
503
520
|
declare function openRtcDebugInfo(message: string, data?: unknown): void;
|
|
504
521
|
declare function openRtcDebugLog(message: string, data?: unknown): void;
|
|
505
522
|
|
|
506
|
-
|
|
523
|
+
/**
|
|
524
|
+
* Pure byte / stream / timing helpers.
|
|
525
|
+
*
|
|
526
|
+
* Extracted from the `Client` god object (see
|
|
527
|
+
* `docs/plans/client-ts-decomposition.md` Phase 1). These functions are
|
|
528
|
+
* deliberately pure — no `Client` state, no `this`, no logging side effects — so
|
|
529
|
+
* the same helper is reused everywhere instead of being re-implemented inline
|
|
530
|
+
* (e.g. `concatBytes` previously existed both here and in `applicationCrypto.ts`,
|
|
531
|
+
* and three near-identical exponential-backoff helpers existed across the class).
|
|
532
|
+
*/
|
|
533
|
+
|
|
534
|
+
type ByteArray = Uint8Array<ArrayBuffer>;
|
|
535
|
+
type ByteArrayLike = Uint8Array<ArrayBufferLike>;
|
|
536
|
+
|
|
537
|
+
type RuntimeU32BEFrameHandler = (payload: ByteArray) => void;
|
|
538
|
+
type RuntimeJsonFrameHandler<T = unknown> = (value: T, payload: ByteArray) => void;
|
|
539
|
+
interface RuntimeJsonFrameDecoderOptions {
|
|
540
|
+
onInvalidJson?: (error: unknown, payload: ByteArray) => void;
|
|
541
|
+
}
|
|
542
|
+
declare function encodeRuntimeU32BEFrame(payload: ByteArrayLike): ByteArray;
|
|
543
|
+
declare function createRuntimeU32BEFrameDecoder(onFrame: RuntimeU32BEFrameHandler): (chunk: ByteArrayLike) => void;
|
|
544
|
+
declare function encodeRuntimeJsonPayload(value: unknown): ByteArray;
|
|
545
|
+
declare function decodeRuntimeJsonPayload<T = unknown>(payload: ByteArrayLike): T;
|
|
546
|
+
declare function encodeRuntimeJsonFrame(value: unknown): ByteArray;
|
|
547
|
+
declare function createRuntimeJsonFrameDecoder<T = unknown>(onValue: RuntimeJsonFrameHandler<T>, options?: RuntimeJsonFrameDecoderOptions): (chunk: ByteArrayLike) => void;
|
|
548
|
+
declare function concatRuntimeBytes(a: ByteArrayLike, b: ByteArrayLike): ByteArray;
|
|
549
|
+
declare function readRuntimeU32BE(bytes: ByteArrayLike, offset: number): number;
|
|
550
|
+
|
|
551
|
+
type MintSpaceTokenRequest = {
|
|
552
|
+
spaceKey: string;
|
|
553
|
+
memberId?: string;
|
|
554
|
+
ttl?: number;
|
|
555
|
+
sandboxAppId?: string;
|
|
556
|
+
};
|
|
557
|
+
type MintSpaceTokenResponse = {
|
|
558
|
+
token: string;
|
|
559
|
+
expiresAt: number;
|
|
560
|
+
tokenLifetimeSeconds: number;
|
|
561
|
+
namespaceId: string;
|
|
562
|
+
spaceAppTag: string;
|
|
563
|
+
};
|
|
564
|
+
/**
|
|
565
|
+
* Mint a namespace-scoped Firebase custom token from your backend using the
|
|
566
|
+
* OpenRTC `POST /v1/spaces/tokens` endpoint. Never call this from browser code
|
|
567
|
+
* with a secret key — proxy through your server.
|
|
568
|
+
*/
|
|
569
|
+
type EnableSpaceAuthResponse = {
|
|
570
|
+
success: true;
|
|
571
|
+
space: {
|
|
572
|
+
namespaceId: string;
|
|
573
|
+
requireScopedAuth: boolean;
|
|
574
|
+
status: 'active' | 'revoked';
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
/**
|
|
578
|
+
* Opt a provisioned space into scoped-auth mode (required for all spaces).
|
|
579
|
+
* Call from your backend with sk_live_... only.
|
|
580
|
+
*/
|
|
581
|
+
declare function enableSpaceAuth(endpointUrl: string, secretKey: string, namespaceId: string): Promise<EnableSpaceAuthResponse>;
|
|
582
|
+
declare function mintSpaceToken(endpointUrl: string, secretKey: string, request: MintSpaceTokenRequest): Promise<MintSpaceTokenResponse>;
|
|
583
|
+
/**
|
|
584
|
+
* Browser-safe space auth for static sites. Calls the rate-limited
|
|
585
|
+
* `v1SpacePublicTokens` endpoint (pk_live_ + spaceKey only).
|
|
586
|
+
*/
|
|
587
|
+
declare function createPublicSpaceTokenProvider(options: {
|
|
588
|
+
apiKey: string;
|
|
589
|
+
space?: string;
|
|
590
|
+
spaceKey?: string;
|
|
591
|
+
endpointUrl?: string;
|
|
592
|
+
memberIdStorageKey?: string;
|
|
593
|
+
sandboxAppId?: string;
|
|
594
|
+
}): SpaceTokenProvider;
|
|
595
|
+
declare function sandboxSpaceKey(spaceKey: string, sandboxAppId?: string): string;
|
|
596
|
+
declare const spaceToken: typeof createPublicSpaceTokenProvider;
|
|
597
|
+
declare const createSpaceTokenProvider: typeof createPublicSpaceTokenProvider;
|
|
598
|
+
|
|
599
|
+
export { Connection, type CorrelationFields, type EnableSpaceAuthResponse, IpcRuntimeAdapter, type MintSpaceTokenRequest, type MintSpaceTokenResponse, PlutoIpcBridge as NativeBridge, type OpenRTCCapabilityRuntime, PlutoIpcBridge, PlutoRuntimeAssembly, RuntimeCapabilities, RuntimeClientOptions, RuntimeConnectionController, RuntimeConnectionTarget, RuntimeFactoryOptions, type RuntimeJsonFrameDecoderOptions, type RuntimeJsonFrameHandler, RuntimeRawConnection, type RuntimeU32BEFrameHandler, clog, concatRuntimeBytes, correlationForDriveGrantScope, createIpcClient, createLegacyOpenRTC, createPublicSpaceTokenProvider, createRuntimeJsonFrameDecoder, createRuntimeU32BEFrameDecoder, createSpaceTokenProvider, createWasmClient, decodeRuntimeJsonPayload, enableSpaceAuth, encodeRuntimeJsonFrame, encodeRuntimeJsonPayload, encodeRuntimeU32BEFrame, logOpenRtcTeardownTrace, mintSpaceToken, openRtcDebug, openRtcDebugEnabled, openRtcDebugInfo, openRtcDebugLog, readRuntimeU32BE, renderCorrelationFields, runtimeForCapability as runtimeFromCapability, sandboxSpaceKey, spaceToken };
|
package/dist/runtime/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export{b as createIpcClient,a as createWasmClient}from'../chunk-
|
|
1
|
+
export{b as TauriRuntimeAdapter,a as createTauriIpcBridge}from'../chunk-DTWEQS3J.js';export{a as createLegacyOpenRTC}from'../chunk-WMRCP3YX.js';import'../chunk-2QHDEGVX.js';export{b as createIpcClient,a as createWasmClient}from'../chunk-XE43HAXV.js';import'../chunk-YGJ6OAPR.js';export{b as Connection,t as RuntimeClient,c as RuntimeConnectionController,g as ScopedConnectionActorError,j as ScopedConnectionActorHandle,k as ScopedConnectionActorRegistry,f as clog,r as concatRuntimeBytes,e as correlationForDriveGrantScope,q as createRuntimeJsonFrameDecoder,m as createRuntimeU32BEFrameDecoder,o as decodeRuntimeJsonPayload,p as encodeRuntimeJsonFrame,n as encodeRuntimeJsonPayload,l as encodeRuntimeU32BEFrame,s as readRuntimeU32BE,d as renderCorrelationFields,h as scopedConnectionKey,i as scopedConnectionKeyToString}from'../chunk-CEMN2JKR.js';export{f as IpcRuntimeAdapter}from'../chunk-4K2QPYGT.js';import'../chunk-7Z6N46RB.js';export{b as runtimeFromCapability}from'../chunk-PODAMIL6.js';export{a as classifyNativeIpcFailure,b as isNativeIpcCommandUnavailable}from'../chunk-K37WVIZL.js';import'../chunk-N4SX7C3W.js';import'../chunk-BXFXPIXO.js';export{a as isRuntimeDeviceActive,c as isRuntimeDeviceConnectable,b as isRuntimeDeviceRoutable}from'../chunk-CK6WQV7J.js';export{a as WasmRuntimeAdapter}from'../chunk-GW7P3D54.js';import'../chunk-A3IAG6EL.js';export{q as BROWSER_WASM_RUNTIME_CAPABILITIES,r as NATIVE_IPC_RUNTIME_CAPABILITIES,o as OPENRTC_RUNTIME_POLICY,s as cloneRuntimeCapabilities,p as getRuntimePolicy,g as logOpenRtcTeardownTrace,t as runtimeCapabilitiesForBrowserHost,u as runtimeCapabilitiesFromNativeStatus,v as runtimeCapabilityProfile}from'../chunk-YBXGNKM7.js';export{b as openRtcDebug,a as openRtcDebugEnabled,c as openRtcDebugInfo,d as openRtcDebugLog}from'../chunk-VK6KX433.js';import'../chunk-NT5YHZQH.js';import {b}from'../chunk-N26S7V4N.js';import'../chunk-NB4H5TP3.js';import'../chunk-RD3JEGGF.js';import'../chunk-C7YN5MSV.js';var z="https://api.openrtc.app";function c(e){if(typeof globalThis.crypto?.randomUUID!="function")throw new Error(`Secure request identity is unavailable for ${e}.`);return `${e}:${globalThis.crypto.randomUUID()}`}async function q(e,t,n){let o=e.replace(/\/$/,""),r=await fetch(`${o}/v1/spaces/${encodeURIComponent(n)}/scoped-auth`,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json","X-OpenRTC-Idempotency-Key":c("enable-space-auth")},body:"{}"}),a=await r.json().catch(()=>({}));if(!r.ok){let p=typeof a?.error=="string"?a.error:`enableSpaceAuth failed (${r.status})`;throw new Error(p)}return a}async function M(e,t,n){let o=await fetch(e,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json","X-OpenRTC-Idempotency-Key":c("mint-space-token")},body:JSON.stringify(n)}),r=await o.json().catch(()=>({}));if(!o.ok){let a=typeof r?.error=="string"?r.error:`mintSpaceToken failed (${o.status})`;throw new Error(a)}if(typeof r?.token!="string"||!r.token.trim())throw new Error("mintSpaceToken response missing token");return r}function d(e){let t=e.apiKey.trim(),n=(e.spaceKey??e.space??"").trim(),o=g(e.sandboxAppId),r=(e.endpointUrl??z).replace(/\/$/,""),a=e.memberIdStorageKey??`openrtc:space-member:${n}${o?`:sandbox:${o}`:""}`;return async()=>{if(!t||!n)throw new Error("spaceToken requires apiKey and space");let p=null;typeof sessionStorage<"u"?(p=sessionStorage.getItem(a),p||(p=globalThis.crypto?.randomUUID?.()??`member-${Date.now()}`,sessionStorage.setItem(a,p))):p=`member-${Date.now()}`;let m=await b().getAppCheckToken(),i=await fetch(`${r}/v1SpacePublicTokens`,{method:"POST",headers:{"Content-Type":"application/json","X-OpenRTC-Idempotency-Key":c("mint-public-space-token"),...m?{"X-Firebase-AppCheck":m}:{}},body:JSON.stringify({apiKey:t,spaceKey:n,memberId:p,...o?{sandboxAppId:o}:{}})}),{text:u,payload:s}=await L(i);if(!i.ok){let f=typeof s?.error=="string"?s.error:u.trim()?u.trim().slice(0,240):`public space token mint failed (${i.status})`;throw new Error(f)}let l=typeof s?.token=="string"?s.token.trim():"";if(!l)throw new Error("public space token response missing token");return {customToken:l}}}function B(e){if(!e.trim())return {};try{let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}async function L(e){let t=e.text;if(typeof t=="function"){let o=await t.call(e).catch(()=>"");return {text:o,payload:B(o)}}let n=await e.json().catch(()=>({}));return {text:JSON.stringify(n),payload:n&&typeof n=="object"?n:{}}}function g(e){let t=e?.trim().toLowerCase()??"";if(!t)return "";if(!/^[a-z0-9][a-z0-9-]{0,47}$/.test(t))throw new Error("sandboxAppId must be 1-48 lowercase letters, numbers, or dashes.");return t}function J(e,t){let n=e.trim(),o=g(t);return o?`${n}::sandbox::${o}`:n}var H=d,X=d;
|
|
2
|
+
export{d as createPublicSpaceTokenProvider,X as createSpaceTokenProvider,q as enableSpaceAuth,M as mintSpaceToken,J as sandboxSpaceKey,H as spaceToken};
|
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-Cz9n17g8.js';
|
|
2
2
|
import '../ipc-CflAVodw.js';
|
|
3
|
-
import '../types-
|
|
4
|
-
import '../DelegatingRuntimeAdapter-
|
|
3
|
+
import '../types-BVJr065k.js';
|
|
4
|
+
import '../DelegatingRuntimeAdapter-DqfHkjLy.js';
|
|
5
|
+
import '../capabilities-YSskrE8H.js';
|
|
5
6
|
import '../IEngineBridge-BbsT8hof.js';
|
|
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-DTWEQS3J.js';import'../chunk-4K2QPYGT.js';import'../chunk-K37WVIZL.js';import'../chunk-BXFXPIXO.js';import'../chunk-A3IAG6EL.js';import'../chunk-YBXGNKM7.js';import'../chunk-VK6KX433.js';import'../chunk-NT5YHZQH.js';import'../chunk-N26S7V4N.js';import'../chunk-NB4H5TP3.js';import'../chunk-RD3JEGGF.js';import'../chunk-C7YN5MSV.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { W as WasmBridgeOptions, D as DelegatingRuntimeAdapter } from './DelegatingRuntimeAdapter-
|
|
1
|
+
import { i as ClientOptions } from './types-BVJr065k.js';
|
|
2
|
+
import { W as WasmBridgeOptions, D as DelegatingRuntimeAdapter } from './DelegatingRuntimeAdapter-DqfHkjLy.js';
|
|
3
3
|
import { P as PlutoIpcBridge } from './ipc-CflAVodw.js';
|
|
4
4
|
|
|
5
5
|
interface NativeIpcBridgeOptions extends WasmBridgeOptions {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { u as OpenRTCClient, O as OpenRTCOptions, a as OpenRTCClient$1 } from './types-BDc7AZYI.js';
|
|
2
|
+
import { P as PlutoIpcBridge } from './ipc-CflAVodw.js';
|
|
3
|
+
import { R as RuntimeClientOptions } from './types-BUXwspL0.js';
|
|
4
|
+
import './types-BVJr065k.js';
|
|
5
|
+
import './IEngineBridge-BbsT8hof.js';
|
|
6
|
+
import './capabilities-YSskrE8H.js';
|
|
7
|
+
import './ITransport-BsPcaov7.js';
|
|
8
|
+
|
|
9
|
+
interface OpenRTCV2Endpoints {
|
|
10
|
+
controlPlane: string;
|
|
11
|
+
gateway: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare function createTestingOpenRTC(options: OpenRTCOptions, endpoints: OpenRTCV2Endpoints, testing?: {
|
|
15
|
+
deviceId?: string;
|
|
16
|
+
irohTestRelayUrl?: string;
|
|
17
|
+
}): OpenRTCClient$1;
|
|
18
|
+
/** Native equivalent for emulator and harness lanes; never import in product code. */
|
|
19
|
+
declare function createTestingNativeOpenRTC(options: OpenRTCOptions, endpoints: OpenRTCV2Endpoints, bridge: PlutoIpcBridge): OpenRTCClient$1;
|
|
20
|
+
/**
|
|
21
|
+
* Rollback-harness constructor. This is intentionally confined to the
|
|
22
|
+
* `openrtc/testing` export because it enables plaintext loopback coordination
|
|
23
|
+
* for local emulators and also carries the time-bounded v1 runtime.
|
|
24
|
+
*/
|
|
25
|
+
declare const createTestingLegacyOpenRTC: ((options: RuntimeClientOptions) => Promise<OpenRTCClient>) & {
|
|
26
|
+
native: (options: RuntimeClientOptions, bridge?: PlutoIpcBridge) => OpenRTCClient;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { createTestingLegacyOpenRTC, createTestingNativeOpenRTC, createTestingOpenRTC };
|
package/dist/testing.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-UEYM6WTT.js';import {a}from'./chunk-WMRCP3YX.js';import'./chunk-2QHDEGVX.js';import'./chunk-XE43HAXV.js';import'./chunk-YGJ6OAPR.js';import'./chunk-CEMN2JKR.js';import'./chunk-4K2QPYGT.js';import'./chunk-7Z6N46RB.js';import {c}from'./chunk-PODAMIL6.js';import'./chunk-K37WVIZL.js';import'./chunk-N4SX7C3W.js';import'./chunk-BXFXPIXO.js';import'./chunk-A3IAG6EL.js';import'./chunk-YBXGNKM7.js';import'./chunk-VK6KX433.js';import'./chunk-NT5YHZQH.js';import'./chunk-N26S7V4N.js';import'./chunk-NB4H5TP3.js';import'./chunk-RD3JEGGF.js';import'./chunk-C7YN5MSV.js';function m(e,t,n={}){return c(e,{endpoints:t,testingAllowInsecureLoopback:true,platform:"web",...n.deviceId?{deviceIdProvider:async()=>n.deviceId}:{},...n.irohTestRelayUrl?{irohTestRelayUrl:n.irohTestRelayUrl}:{},runtimeFactory:async i=>{let{createWasmClient:o}=await import('./factories-O5575ECL.js');return o(i)}})}function d(e,t,n){return c(e,{endpoints:t,testingAllowInsecureLoopback:true,platform:"native",deviceKeyProvider:a$1(n),deviceIdProvider:async()=>{let i=await n.invoke("get_rtc_local_device_info");return String(i?.deviceId??"")},runtimeFactory:async i=>{let{createIpcClient:o}=await import('./ipcFactory-FBNUVH7V.js');return o(i,n)}})}function p(e){let t=e.coordinationGateway;return {...e,...t?{coordinationGateway:{...t,testingAllowInsecureLoopback:true}}:{}}}var C=Object.assign(e=>a(p(e)),{native:(e,t)=>a.native(p(e),t)});export{C as createTestingLegacyOpenRTC,d as createTestingNativeOpenRTC,m as createTestingOpenRTC};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
declare const ROUTE_DESCRIPTORS: readonly RouteDescriptor[];
|
|
5
|
-
declare function getRouteDescriptor(id: ProtocolName): RouteDescriptor;
|
|
6
|
-
declare function listRouteDescriptors(): readonly RouteDescriptor[];
|
|
1
|
+
import { P as ProtocolName, K as RouteDescriptor, O as ProtocolCapability, Q as ProtocolCapabilityMap, A as ApplicationPayloadCrypto, U as ApplicationCryptoStreamTools } from '../types-BVJr065k.js';
|
|
2
|
+
export { V as ApplicationCryptoBiStream, W as RouteFamily, X as RouteImplementationKind } from '../types-BVJr065k.js';
|
|
3
|
+
import { I as ITransport } from '../ITransport-BsPcaov7.js';
|
|
7
4
|
|
|
8
5
|
declare const TRANSPORT_LABELS: readonly ProtocolName[];
|
|
9
6
|
declare function normalizeTransportLabel(value: unknown): ProtocolName | undefined;
|
|
@@ -13,4 +10,47 @@ declare function isOptionalTransportLabel(value: unknown): boolean;
|
|
|
13
10
|
declare function isWebRtcTransportLabel(value: unknown): boolean;
|
|
14
11
|
declare function isIndependentTransportLabel(value: unknown): boolean;
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
declare const ROUTE_DESCRIPTORS: readonly RouteDescriptor[];
|
|
14
|
+
declare function getRouteDescriptor(id: ProtocolName): RouteDescriptor;
|
|
15
|
+
declare function listRouteDescriptors(): readonly RouteDescriptor[];
|
|
16
|
+
|
|
17
|
+
declare class TransportFactory {
|
|
18
|
+
private static readonly capabilityMap;
|
|
19
|
+
/** @deprecated Only WebRTC implements the legacy ITransport construction API. */
|
|
20
|
+
static createTransport(name: ProtocolName): ITransport;
|
|
21
|
+
static getProtocolCapability(name: ProtocolName): ProtocolCapability;
|
|
22
|
+
static getProtocolCapabilities(): ProtocolCapabilityMap;
|
|
23
|
+
static getPreferredProtocolOrder(options?: {
|
|
24
|
+
runtime?: 'browser' | 'native' | 'any';
|
|
25
|
+
includePathLabels?: boolean;
|
|
26
|
+
}): ProtocolName[];
|
|
27
|
+
static assertProtocolAvailable(name: ProtocolName): void;
|
|
28
|
+
}
|
|
29
|
+
declare function getPreferredProtocolOrder(options?: Parameters<typeof TransportFactory.getPreferredProtocolOrder>[0]): ProtocolName[];
|
|
30
|
+
|
|
31
|
+
declare function isApplicationEncryptedPayload(payload: Uint8Array): boolean;
|
|
32
|
+
declare function createSharedSecretApplicationCrypto(key: Uint8Array, options?: {
|
|
33
|
+
requireEncrypted?: boolean;
|
|
34
|
+
randomBytes?: (byteLength: number) => Uint8Array;
|
|
35
|
+
replayProtection?: boolean;
|
|
36
|
+
}): ApplicationPayloadCrypto;
|
|
37
|
+
declare function createApplicationCryptoStreamTools(crypto: ApplicationPayloadCrypto, options?: {
|
|
38
|
+
typeId?: number;
|
|
39
|
+
maxFrameBytes?: number;
|
|
40
|
+
}): ApplicationCryptoStreamTools;
|
|
41
|
+
|
|
42
|
+
declare const KEY_AGREEMENT_PUBLIC_KEY_BYTES = 32;
|
|
43
|
+
declare const KEY_AGREEMENT_ALGORITHM = "openrtc:x25519-hkdf:v1";
|
|
44
|
+
interface ApplicationKeyAgreementPayload {
|
|
45
|
+
algorithm: typeof KEY_AGREEMENT_ALGORITHM;
|
|
46
|
+
publicKey: string;
|
|
47
|
+
}
|
|
48
|
+
interface EphemeralKeyAgreement {
|
|
49
|
+
publicKey: Uint8Array;
|
|
50
|
+
secretKey: Uint8Array;
|
|
51
|
+
}
|
|
52
|
+
declare function generateEphemeralKeyAgreement(randomBytes?: (byteLength: number) => Uint8Array): EphemeralKeyAgreement;
|
|
53
|
+
declare function deriveApplicationCryptoKey(localSecretKey: Uint8Array, remotePublicKey: Uint8Array, localNodeId: string, remoteNodeId: string): Uint8Array;
|
|
54
|
+
declare function encodeApplicationKeyAgreementPayload(publicKey: Uint8Array): ApplicationKeyAgreementPayload;
|
|
55
|
+
|
|
56
|
+
export { ApplicationCryptoStreamTools, type ApplicationKeyAgreementPayload, ApplicationPayloadCrypto, KEY_AGREEMENT_ALGORITHM, KEY_AGREEMENT_PUBLIC_KEY_BYTES, ProtocolName, ROUTE_DESCRIPTORS, RouteDescriptor, TRANSPORT_LABELS, createApplicationCryptoStreamTools, createSharedSecretApplicationCrypto, deriveApplicationCryptoKey, encodeApplicationKeyAgreementPayload, generateEphemeralKeyAgreement, getPreferredProtocolOrder, getRouteDescriptor, isApplicationEncryptedPayload, isDirectIrohTransportLabel, isIndependentTransportLabel, isIrohBaseTransportLabel, isOptionalTransportLabel, isWebRtcTransportLabel, listRouteDescriptors, normalizeTransportLabel };
|
package/dist/transport/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{e as KEY_AGREEMENT_ALGORITHM,d as KEY_AGREEMENT_PUBLIC_KEY_BYTES,g as deriveApplicationCryptoKey,i as encodeApplicationKeyAgreementPayload,f as generateEphemeralKeyAgreement,c as getPreferredProtocolOrder}from'../chunk-7Z6N46RB.js';export{e as TRANSPORT_LABELS,o as createApplicationCryptoStreamTools,n as createSharedSecretApplicationCrypto,m as isApplicationEncryptedPayload,h as isDirectIrohTransportLabel,l as isIndependentTransportLabel,g as isIrohBaseTransportLabel,i as isOptionalTransportLabel,j as isWebRtcTransportLabel,f as normalizeTransportLabel}from'../chunk-VK6KX433.js';import'../chunk-NB4H5TP3.js';export{a as ROUTE_DESCRIPTORS,e as getRouteDescriptor,f as listRouteDescriptors}from'../chunk-C7YN5MSV.js';
|