openrtc 2.0.0-rc.2 → 2.0.0-rc.21
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 +11 -1
- package/dist/DelegatingRuntimeAdapter-7Y3gss5D.d.ts +134 -0
- package/dist/OpenRTCShared-LDKG5RPN.js +1 -0
- package/dist/WasmBridge-T5XMT6FH.js +1 -0
- package/dist/chunk-5OHYIHPT.js +1 -0
- package/dist/chunk-DA3HSI3K.js +2 -0
- package/dist/chunk-FAPRYEWI.js +2 -0
- package/dist/chunk-HTAWPIP2.js +2 -0
- package/dist/chunk-PPZRTJHE.js +3 -0
- package/dist/chunk-PQK5SJ47.js +1 -0
- package/dist/{chunk-RD3JEGGF.js → chunk-QHSM5NFZ.js} +2 -2
- package/dist/{chunk-7Z6N46RB.js → chunk-RRMBD5OL.js} +1 -1
- package/dist/{chunk-A3IAG6EL.js → chunk-WWC767HK.js} +1 -1
- package/dist/chunk-Z2WVSXPW.js +1 -0
- package/dist/deviceManagement-PHY5TIOS.js +1 -0
- package/dist/deviceProfile-3BEQZLJF.js +2 -0
- package/dist/deviceRoster-GHF6MWXF.js +1 -0
- package/dist/dist-FIVA6EPA.js +277 -0
- package/dist/factories-SMMQHXUH.js +1 -0
- package/dist/index.d.ts +4 -6
- package/dist/index.js +1 -1
- package/dist/ipcFactory-AR3VIBM4.js +1 -0
- package/dist/native.d.ts +4 -7
- package/dist/native.js +1 -1
- package/dist/openrtc-3YHRRPAG.js +2 -0
- package/dist/openrtc_bg.wasm +0 -0
- package/dist/runtime/WasmRuntimeAdapter.d.ts +3 -3
- package/dist/runtime/WasmRuntimeAdapter.js +1 -1
- package/dist/runtime/device-status.d.ts +2 -2
- package/dist/runtime/index.d.ts +21 -73
- package/dist/runtime/index.js +1 -2
- package/dist/testing.d.ts +7 -17
- package/dist/testing.js +1 -1
- package/dist/transport/index.d.ts +2 -2
- package/dist/transport/index.js +1 -1
- package/dist/{types-BVJr065k.d.ts → types-BwmoJU2O.d.ts} +3 -1
- package/dist/{OpenRTCShared-ZQPu5LqL.d.ts → types-DE4iPkMB.d.ts} +268 -8
- package/dist/{types-DkgaCyqS.d.ts → types-oGGnaSW2.d.ts} +2 -2
- package/package.json +1 -25
- package/dist/DelegatingRuntimeAdapter-DqfHkjLy.d.ts +0 -373
- package/dist/OpenRTCShared-TKAQLONA.js +0 -1
- package/dist/WasmBridge-2A22U7RU.js +0 -1
- package/dist/auth/index.d.ts +0 -78
- package/dist/auth/index.js +0 -1
- package/dist/auth/internal.d.ts +0 -4
- package/dist/auth/internal.js +0 -1
- package/dist/chunk-2QHDEGVX.js +0 -1
- package/dist/chunk-3USHQ7QW.js +0 -3
- package/dist/chunk-5LRLWIT5.js +0 -1
- package/dist/chunk-6TAVJ46R.js +0 -1
- package/dist/chunk-BXFXPIXO.js +0 -1
- package/dist/chunk-F2XGNLXL.js +0 -2
- package/dist/chunk-GW7P3D54.js +0 -1
- package/dist/chunk-IEQTFQ3Q.js +0 -1
- package/dist/chunk-K37WVIZL.js +0 -1
- package/dist/chunk-N26S7V4N.js +0 -1
- package/dist/chunk-N4SX7C3W.js +0 -2
- package/dist/chunk-NB4H5TP3.js +0 -1
- package/dist/chunk-PODAMIL6.js +0 -2
- package/dist/chunk-UEYM6WTT.js +0 -2
- package/dist/chunk-VK6KX433.js +0 -1
- package/dist/chunk-YBXGNKM7.js +0 -2
- package/dist/chunk-YQWQDTQ3.js +0 -2
- package/dist/factories-SIVMTIHJ.js +0 -1
- package/dist/ipc-CflAVodw.d.ts +0 -11
- package/dist/ipcFactory-QY44OIKA.js +0 -1
- package/dist/runtime/legacy.d.ts +0 -18
- package/dist/runtime/legacy.js +0 -1
- package/dist/runtime/tauri.d.ts +0 -6
- package/dist/runtime/tauri.js +0 -1
- package/dist/tauri-Cz9n17g8.d.ts +0 -33
- package/dist/types-DNl4KHHY.d.ts +0 -195
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as GrantScope, I as ISignalingBackend, X as ConnectDeviceHooks, Y as ConnectDeviceOptions, Z as ConnectDeviceResult, M as ManagedConnectionRecord, P as PeerSessionSnapshot, d as ResolvedPeerIdentity, _ as AppLimits, k as NativeConnectParams, l as NativeConnectResult, E as ExplicitFileDataSendParams } from './types-BwmoJU2O.js';
|
|
2
2
|
import { A as AuthContext } from './IEngineBridge-BbsT8hof.js';
|
|
3
|
-
import {
|
|
3
|
+
import { R as RuntimePeerState, a as RuntimeConnectionStateSnapshot, b as RuntimePeerReadinessSnapshot, c as RuntimePeerConnectOptions, C as Connection, d as RuntimeIncomingStream, e as RuntimeClientOptions, f as RuntimeAuthIdentity, g as RuntimeLocalDeviceInfo, h as RuntimeLocalDeviceProfile, i as RuntimeDevice, j as RuntimeManagedSessionOptions, k as RuntimeManagedSession, l as RuntimeDeviceStatusSnapshot, m as RuntimeDeviceConnectOptions, n as RuntimeSession, o as RuntimeJoinRoomOptions, p as RuntimeRoomMember, q as RuntimeConnectionTarget, r as RuntimeScopedChannelOptions, s as RuntimeScopedLogicalChannel, t as RuntimePeerStreamOptions, u as RuntimeRawConnection, v as RuntimeChannelDescriptor, w as RuntimePresenceLoopOptions, x as RuntimePeerHealth, y as RuntimeApplicationPayloadReadinessOptions, z as RuntimeConnectionEvent } from './types-oGGnaSW2.js';
|
|
4
4
|
import { R as RuntimeCapabilities, a as RuntimeCapabilityProfile } from './capabilities-YSskrE8H.js';
|
|
5
5
|
|
|
6
|
+
type PlutoIpcUnlisten = () => void | Promise<void>;
|
|
7
|
+
interface PlutoIpcBridge {
|
|
8
|
+
invoke<T = unknown>(command: string, args?: Record<string, unknown>): Promise<T>;
|
|
9
|
+
listen<T = unknown>(event: string, handler: (payload: T) => void): Promise<PlutoIpcUnlisten>;
|
|
10
|
+
isAvailable?(): boolean | Promise<boolean>;
|
|
11
|
+
}
|
|
12
|
+
type NativeIpcFailureKind = 'command-unavailable' | 'runtime-unavailable' | 'timeout' | 'unknown';
|
|
13
|
+
declare function classifyNativeIpcFailure(error: unknown): NativeIpcFailureKind;
|
|
14
|
+
declare function isNativeIpcCommandUnavailable(error: unknown): boolean;
|
|
15
|
+
|
|
6
16
|
/**
|
|
7
17
|
* Coalesced peer reconciliation scheduler and full reconcile orchestration.
|
|
8
18
|
*
|
|
@@ -230,7 +240,6 @@ interface RuntimePolicySnapshot {
|
|
|
230
240
|
nativeStartRetryWindowMs: number;
|
|
231
241
|
nativeStartRetryMinDelayMs: number;
|
|
232
242
|
nativeStartRetryMaxDelayMs: number;
|
|
233
|
-
reconciliationIntervalMs: number;
|
|
234
243
|
deviceStatusRefreshDebounceMs: number;
|
|
235
244
|
};
|
|
236
245
|
browserAutoConnect: {
|
|
@@ -281,7 +290,6 @@ declare class RuntimeClient {
|
|
|
281
290
|
private static readonly NATIVE_START_RETRY_WINDOW_MS;
|
|
282
291
|
private static readonly NATIVE_START_RETRY_MIN_DELAY_MS;
|
|
283
292
|
private static readonly NATIVE_START_RETRY_MAX_DELAY_MS;
|
|
284
|
-
private static readonly MANAGED_RECONCILIATION_INTERVAL_MS;
|
|
285
293
|
private static readonly DEVICE_STATUS_REFRESH_DEBOUNCE_MS;
|
|
286
294
|
private static readonly MANAGED_USER_DEVICE_SCOPE;
|
|
287
295
|
static readonly MANAGED_FRIEND_SCOPE: GrantScope;
|
|
@@ -298,7 +306,6 @@ declare class RuntimeClient {
|
|
|
298
306
|
private managedSessionStartInFlight;
|
|
299
307
|
private terminalShutdown;
|
|
300
308
|
private readonly managedReconciliationTasks;
|
|
301
|
-
private managedReconciliationTimer;
|
|
302
309
|
private readonly managedReconciliationFollowupTimers;
|
|
303
310
|
/**
|
|
304
311
|
* The one per-`{scope, peerNodeId}` observer-side dial coalescer. It is
|
|
@@ -378,6 +385,19 @@ declare class RuntimeClient {
|
|
|
378
385
|
* @param maxConnections 0 = unlimited.
|
|
379
386
|
*/
|
|
380
387
|
getTicketWithToken(grantScope: GrantScope, maxConnections?: number): Promise<string>;
|
|
388
|
+
/**
|
|
389
|
+
* Register a product-issued admission token with the active runtime.
|
|
390
|
+
*
|
|
391
|
+
* Product code supplies the durable authorization decision, while OpenRTC
|
|
392
|
+
* remains the sole owner of the native/WASM admission registry. Restricted
|
|
393
|
+
* grants should always include their server-issued expiry.
|
|
394
|
+
*/
|
|
395
|
+
registerAdmissionToken(input: {
|
|
396
|
+
token: string;
|
|
397
|
+
scope: GrantScope;
|
|
398
|
+
maxConnections?: number;
|
|
399
|
+
expiresAtMs?: number;
|
|
400
|
+
}): Promise<void>;
|
|
381
401
|
/** Revoke all session tokens that match the given scope. */
|
|
382
402
|
revokeTokensByScope(grantScope: GrantScope): Promise<string[]>;
|
|
383
403
|
private revokeTokensByScopeInternal;
|
|
@@ -675,7 +695,6 @@ declare class RuntimeClient {
|
|
|
675
695
|
type RuntimeAdapterWithAuth = ISignalingBackend & {
|
|
676
696
|
setAuthContext?: (context: AuthContext | null) => Promise<void> | void;
|
|
677
697
|
};
|
|
678
|
-
type RuntimeFactoryOptions = RuntimeClientOptions;
|
|
679
698
|
interface PlutoRuntimeAssembly<TBackend extends RuntimeAdapterWithAuth = RuntimeAdapterWithAuth> {
|
|
680
699
|
runtime: RuntimeClient;
|
|
681
700
|
identity: any;
|
|
@@ -857,7 +876,7 @@ interface OpenRTCAdvancedNamespace {
|
|
|
857
876
|
*
|
|
858
877
|
* This is the unified type returned by OpenRTC() and OpenRTC.native().
|
|
859
878
|
*/
|
|
860
|
-
interface OpenRTCClient extends RuntimeClient {
|
|
879
|
+
interface OpenRTCClient$1 extends RuntimeClient {
|
|
861
880
|
readonly devices: OpenRTCDeviceNamespace;
|
|
862
881
|
readonly peers: OpenRTCPeerNamespace;
|
|
863
882
|
readonly channels: OpenRTCChannelNamespace;
|
|
@@ -942,4 +961,245 @@ interface OpenRTCClient extends RuntimeClient {
|
|
|
942
961
|
readonly _assembly: PlutoRuntimeAssembly;
|
|
943
962
|
}
|
|
944
963
|
|
|
945
|
-
|
|
964
|
+
interface OpenRTCAuthProvider {
|
|
965
|
+
/** Registered provider ID from the developer app capability manifest. */
|
|
966
|
+
readonly providerId?: string;
|
|
967
|
+
/**
|
|
968
|
+
* Stable, non-secret, local-only identifier for the currently signed-in
|
|
969
|
+
* principal. It changes on login, logout, or account switch, but never for
|
|
970
|
+
* an ordinary access-token refresh. OpenRTC hashes this value together
|
|
971
|
+
* with the app and installation-key thumbprint before persisting a lookup.
|
|
972
|
+
*
|
|
973
|
+
* Optional during the 2.0 RC compatibility window. Providers that omit it
|
|
974
|
+
* use the assertion-first flow and remain correct, but cannot skip the
|
|
975
|
+
* assertion exchange on a cold process start.
|
|
976
|
+
*/
|
|
977
|
+
getSessionKey?(): Promise<string | null>;
|
|
978
|
+
getAssertion(input: {
|
|
979
|
+
audience: 'https://api.openrtc.app/v2/assertions/exchange';
|
|
980
|
+
forceRefresh: boolean;
|
|
981
|
+
/**
|
|
982
|
+
* Stable OpenRTC installation ID being enrolled. Consumer backends
|
|
983
|
+
* may bind product admission (for example a paid device allowance) to
|
|
984
|
+
* this value in the signed assertion. It is supplied only for an
|
|
985
|
+
* enrollment/renewal assertion, never for hourly gateway refreshes.
|
|
986
|
+
*/
|
|
987
|
+
deviceId: string;
|
|
988
|
+
}): Promise<string | null>;
|
|
989
|
+
/**
|
|
990
|
+
* Optional identity-epoch observer. Notify only when the signed-in
|
|
991
|
+
* principal/session changes (login, logout, account switch, or explicit
|
|
992
|
+
* revocation). Do not notify for ordinary OAuth/Firebase access-token
|
|
993
|
+
* refreshes: OpenRTC refreshes its own avenue grant in place.
|
|
994
|
+
*/
|
|
995
|
+
subscribe?(listener: (event: {
|
|
996
|
+
type: 'principal-changed';
|
|
997
|
+
sessionKey: string | null;
|
|
998
|
+
}) => void): () => void;
|
|
999
|
+
}
|
|
1000
|
+
interface OpenRTCEnrolledDevice {
|
|
1001
|
+
deviceId: string;
|
|
1002
|
+
name?: string;
|
|
1003
|
+
platform?: string;
|
|
1004
|
+
enrolledAtMs: number | null;
|
|
1005
|
+
lastGrantAtMs: number | null;
|
|
1006
|
+
current: boolean;
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* Public, non-secret presentation metadata for one enrolled installation.
|
|
1010
|
+
* OpenRTC derives a useful browser default when these fields are omitted;
|
|
1011
|
+
* native hosts should pass the OS/device information reported by their host.
|
|
1012
|
+
*/
|
|
1013
|
+
interface OpenRTCDeviceProfile {
|
|
1014
|
+
/** Human-readable label such as `Bryant's iPhone` or `Chrome on Android`. */
|
|
1015
|
+
name?: string;
|
|
1016
|
+
/** Raw OS/runtime label such as `ios`, `android`, `macos`, or `web`. */
|
|
1017
|
+
platform?: string;
|
|
1018
|
+
/** Optional application-owned public presence metadata, bounded to 4 KiB. */
|
|
1019
|
+
metadata?: string;
|
|
1020
|
+
}
|
|
1021
|
+
interface OpenRTCAttestationProvider {
|
|
1022
|
+
readonly kind: 'firebase-app-check' | 'apple-app-attest' | 'play-integrity' | `custom:${string}`;
|
|
1023
|
+
/**
|
|
1024
|
+
* Describes what the provider actually signs. Reusable app-integrity
|
|
1025
|
+
* tokens (for example Firebase App Check) do not become request-bound just
|
|
1026
|
+
* because OpenRTC supplies an enrollment challenge. The server derives and
|
|
1027
|
+
* enforces the authoritative binding from the registered provider kind;
|
|
1028
|
+
* this field keeps host integrations and diagnostics honest.
|
|
1029
|
+
*/
|
|
1030
|
+
readonly evidenceBinding: 'app-session' | 'request-challenge';
|
|
1031
|
+
getEvidence(input: {
|
|
1032
|
+
challenge: string;
|
|
1033
|
+
apiKey: string;
|
|
1034
|
+
}): Promise<{
|
|
1035
|
+
token: string;
|
|
1036
|
+
}>;
|
|
1037
|
+
}
|
|
1038
|
+
/**
|
|
1039
|
+
* Optional consumer-owned bot challenge. Core OpenRTC does not render a UI or
|
|
1040
|
+
* load a CAPTCHA dependency; the host supplies a fresh token only when its
|
|
1041
|
+
* developer manifest requires anonymous capability verification.
|
|
1042
|
+
*/
|
|
1043
|
+
interface OpenRTCBotVerificationProvider {
|
|
1044
|
+
getToken(input: {
|
|
1045
|
+
action: 'openrtc_capability';
|
|
1046
|
+
apiKey: string;
|
|
1047
|
+
}): Promise<string>;
|
|
1048
|
+
}
|
|
1049
|
+
interface OpenRTCUsageUpdate {
|
|
1050
|
+
sessionCreditsUsd: number;
|
|
1051
|
+
operation: string;
|
|
1052
|
+
estimated: boolean;
|
|
1053
|
+
}
|
|
1054
|
+
interface OpenRTCUsageWarning extends OpenRTCUsageUpdate {
|
|
1055
|
+
thresholdCreditsUsd: number;
|
|
1056
|
+
kind: 'warning' | 'session-limit';
|
|
1057
|
+
}
|
|
1058
|
+
interface OpenRTCTransportPreferences {
|
|
1059
|
+
iroh?: boolean;
|
|
1060
|
+
webrtc?: boolean;
|
|
1061
|
+
relay?: boolean;
|
|
1062
|
+
moq?: boolean;
|
|
1063
|
+
ble?: boolean;
|
|
1064
|
+
/**
|
|
1065
|
+
* Advanced privacy mode. `relay-only` suppresses direct Iroh addresses,
|
|
1066
|
+
* local discovery, and host/srflx WebRTC candidates. It also requires the
|
|
1067
|
+
* developer manifest's relay opt-in.
|
|
1068
|
+
*/
|
|
1069
|
+
privacy?: 'direct' | 'relay-only';
|
|
1070
|
+
/**
|
|
1071
|
+
* Advanced native integration for hosts whose Rust process owns the
|
|
1072
|
+
* application protocol registry (for example, a Tauri file-transfer host).
|
|
1073
|
+
* Normal SDK consumers should leave this disabled.
|
|
1074
|
+
*/
|
|
1075
|
+
nativeHostProtocols?: boolean;
|
|
1076
|
+
priority?: readonly ('iroh' | 'webrtc' | 'moq' | 'ble')[];
|
|
1077
|
+
}
|
|
1078
|
+
interface OpenRTCOptions {
|
|
1079
|
+
apiKey: string;
|
|
1080
|
+
auth?: OpenRTCAuthProvider;
|
|
1081
|
+
trust?: {
|
|
1082
|
+
attestation?: OpenRTCAttestationProvider;
|
|
1083
|
+
botVerification?: OpenRTCBotVerificationProvider;
|
|
1084
|
+
};
|
|
1085
|
+
usage?: {
|
|
1086
|
+
warnAtSessionCreditsUsd?: number;
|
|
1087
|
+
maxSessionCreditsUsd?: number;
|
|
1088
|
+
onUsage?: (event: OpenRTCUsageUpdate) => void;
|
|
1089
|
+
onWarning?: (warning: OpenRTCUsageWarning) => void;
|
|
1090
|
+
};
|
|
1091
|
+
transports?: OpenRTCTransportPreferences;
|
|
1092
|
+
}
|
|
1093
|
+
type OpenRTCAccessMode = 'capability' | 'authenticated';
|
|
1094
|
+
type OpenRTCLatestStateMode = 'reliable' | 'latest-state';
|
|
1095
|
+
interface OpenRTCCapabilityHandle {
|
|
1096
|
+
readonly kind: 'devices' | 'space' | 'room' | 'ticket';
|
|
1097
|
+
readonly id: string;
|
|
1098
|
+
readonly peers: OpenRTCPeerNamespace;
|
|
1099
|
+
readonly channels: OpenRTCChannelNamespace;
|
|
1100
|
+
readonly diagnostics: OpenRTCDiagnosticsNamespace;
|
|
1101
|
+
readonly closed: boolean;
|
|
1102
|
+
close(): Promise<void>;
|
|
1103
|
+
}
|
|
1104
|
+
interface OpenRTCDevicesHandle extends OpenRTCCapabilityHandle {
|
|
1105
|
+
readonly kind: 'devices';
|
|
1106
|
+
localId(): ReturnType<OpenRTCDeviceNamespace['localId']>;
|
|
1107
|
+
localInfo(): ReturnType<OpenRTCDeviceNamespace['localInfo']>;
|
|
1108
|
+
list(): ReturnType<OpenRTCDeviceNamespace['list']>;
|
|
1109
|
+
listWithStatus(): ReturnType<OpenRTCDeviceNamespace['listWithStatus']>;
|
|
1110
|
+
watch: OpenRTCDeviceNamespace['watch'];
|
|
1111
|
+
connect: OpenRTCDeviceNamespace['connect'];
|
|
1112
|
+
disconnect: OpenRTCDeviceNamespace['disconnect'];
|
|
1113
|
+
}
|
|
1114
|
+
interface OpenRTCSpaceHandle extends OpenRTCCapabilityHandle {
|
|
1115
|
+
readonly kind: 'space';
|
|
1116
|
+
readonly delivery: OpenRTCLatestStateMode;
|
|
1117
|
+
leave(): Promise<void>;
|
|
1118
|
+
}
|
|
1119
|
+
interface OpenRTCRoomHandle extends OpenRTCCapabilityHandle {
|
|
1120
|
+
readonly kind: 'room';
|
|
1121
|
+
readonly membership: 'ephemeral' | 'durable';
|
|
1122
|
+
leave(): Promise<void>;
|
|
1123
|
+
}
|
|
1124
|
+
interface OpenRTCTicketHandle extends OpenRTCCapabilityHandle {
|
|
1125
|
+
readonly kind: 'ticket';
|
|
1126
|
+
readonly token: string;
|
|
1127
|
+
}
|
|
1128
|
+
interface OpenRTCDevicesStartOptions {
|
|
1129
|
+
auth?: OpenRTCAuthProvider;
|
|
1130
|
+
autoConnect?: 'none' | 'online';
|
|
1131
|
+
/** Optional local profile; it does not alter the durable device identity. */
|
|
1132
|
+
profile?: OpenRTCDeviceProfile;
|
|
1133
|
+
maxPeers?: number;
|
|
1134
|
+
/** Requires the app manifest's advanced-fanout opt-in. */
|
|
1135
|
+
advancedFanout?: boolean;
|
|
1136
|
+
}
|
|
1137
|
+
interface OpenRTCSpaceJoinOptions {
|
|
1138
|
+
access?: 'capability';
|
|
1139
|
+
identity?: 'ephemeral';
|
|
1140
|
+
payload?: OpenRTCLatestStateMode;
|
|
1141
|
+
maxPeers?: number;
|
|
1142
|
+
/** Requires the app manifest's advanced-fanout opt-in. */
|
|
1143
|
+
advancedFanout?: boolean;
|
|
1144
|
+
}
|
|
1145
|
+
interface OpenRTCRoomJoinOptions {
|
|
1146
|
+
access?: OpenRTCAccessMode;
|
|
1147
|
+
membership?: 'ephemeral' | 'durable';
|
|
1148
|
+
auth?: OpenRTCAuthProvider;
|
|
1149
|
+
maxPeers?: number;
|
|
1150
|
+
/** Requires the app manifest's advanced-fanout opt-in. */
|
|
1151
|
+
advancedFanout?: boolean;
|
|
1152
|
+
}
|
|
1153
|
+
interface OpenRTCTicketIssueOptions {
|
|
1154
|
+
maxPeers?: number;
|
|
1155
|
+
/** Requires the app manifest's advanced-fanout opt-in. */
|
|
1156
|
+
advancedFanout?: boolean;
|
|
1157
|
+
}
|
|
1158
|
+
interface OpenRTCChannelCatalog {
|
|
1159
|
+
register(descriptor: RuntimeChannelDescriptor): () => void;
|
|
1160
|
+
list(): readonly RuntimeChannelDescriptor[];
|
|
1161
|
+
}
|
|
1162
|
+
interface OpenRTCUsageNamespace {
|
|
1163
|
+
estimate(input: {
|
|
1164
|
+
operation: string;
|
|
1165
|
+
units?: number;
|
|
1166
|
+
}): {
|
|
1167
|
+
creditsUsd: number;
|
|
1168
|
+
estimated: true;
|
|
1169
|
+
};
|
|
1170
|
+
readonly sessionCreditsUsd: number;
|
|
1171
|
+
}
|
|
1172
|
+
interface OpenRTCClient {
|
|
1173
|
+
readonly devices: {
|
|
1174
|
+
/**
|
|
1175
|
+
* Returns this installation's durable, app-scoped device ID without
|
|
1176
|
+
* starting a capability or performing network work.
|
|
1177
|
+
*/
|
|
1178
|
+
localId(): Promise<string>;
|
|
1179
|
+
start(options?: OpenRTCDevicesStartOptions): Promise<OpenRTCDevicesHandle>;
|
|
1180
|
+
listEnrolled(options?: {
|
|
1181
|
+
auth?: OpenRTCAuthProvider;
|
|
1182
|
+
}): Promise<OpenRTCEnrolledDevice[]>;
|
|
1183
|
+
revoke(deviceId: string, options?: {
|
|
1184
|
+
auth?: OpenRTCAuthProvider;
|
|
1185
|
+
}): Promise<void>;
|
|
1186
|
+
revokeAll(options?: {
|
|
1187
|
+
auth?: OpenRTCAuthProvider;
|
|
1188
|
+
exceptCurrent?: boolean;
|
|
1189
|
+
}): Promise<void>;
|
|
1190
|
+
};
|
|
1191
|
+
readonly spaces: {
|
|
1192
|
+
join(id: string, options?: OpenRTCSpaceJoinOptions): Promise<OpenRTCSpaceHandle>;
|
|
1193
|
+
};
|
|
1194
|
+
readonly rooms: {
|
|
1195
|
+
join(id: string, options?: OpenRTCRoomJoinOptions): Promise<OpenRTCRoomHandle>;
|
|
1196
|
+
};
|
|
1197
|
+
readonly tickets: {
|
|
1198
|
+
issue(id: string, options?: OpenRTCTicketIssueOptions): Promise<OpenRTCTicketHandle>;
|
|
1199
|
+
};
|
|
1200
|
+
readonly channels: OpenRTCChannelCatalog;
|
|
1201
|
+
readonly usage: OpenRTCUsageNamespace;
|
|
1202
|
+
close(): Promise<void>;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
export { OPENRTC_RUNTIME_POLICY as A, type PlutoIpcUnlisten as B, type RuntimePolicySnapshot as C, DriveGrantActorError as D, type DriveGrantActorErrorKind as E, DriveGrantActorHandle as F, type DriveGrantActorHandleOptions as G, DriveGrantActorRegistry as H, type DriveGrantActorState as I, type DriveGrantClose as J, type DriveGrantDial as K, type DriveGrantConnectionKey as L, type DriveGrantLogicalChannelHandle as M, type NativeIpcFailureKind as N, type OpenRTCOptions as O, type PlutoIpcBridge as P, type DriveGrantPreferredTransport as Q, RuntimeClient as R, getRuntimePolicy as S, driveGrantConnectionKey as T, driveGrantConnectionKeyToString as U, type OpenRTCClient as a, type OpenRTCAccessMode as b, type OpenRTCAttestationProvider as c, type OpenRTCAuthProvider as d, type OpenRTCBotVerificationProvider as e, type OpenRTCCapabilityHandle as f, type OpenRTCChannelCatalog as g, type OpenRTCDeviceProfile as h, type OpenRTCDevicesHandle as i, type OpenRTCDevicesStartOptions as j, type OpenRTCEnrolledDevice as k, type OpenRTCLatestStateMode as l, type OpenRTCRoomHandle as m, type OpenRTCRoomJoinOptions as n, type OpenRTCSpaceHandle as o, type OpenRTCSpaceJoinOptions as p, type OpenRTCTicketHandle as q, type OpenRTCTicketIssueOptions as r, type OpenRTCTransportPreferences as s, type OpenRTCUsageNamespace as t, type OpenRTCUsageUpdate as u, type OpenRTCUsageWarning as v, classifyNativeIpcFailure as w, isNativeIpcCommandUnavailable as x, type OpenRTCClient$1 as y, type PeerReconciliationStats as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AuthContext } from './IEngineBridge-BbsT8hof.js';
|
|
2
|
-
import {
|
|
2
|
+
import { n as ConnectionOptions, o as ApplicationPayloadCrypto, p as ApplicationPayloadReadinessOptions, q as ApplicationPayloadRouteOptions, r as ProtocolName, s as ApplicationPayloadSendOptions, T as TransportLatencySnapshot, t as PeerState, u as PeerScope, v as PeerHealth, w as ChannelDescriptor$1, x as IncomingStreamChannelMetadata, b as Device, m as BackendConnectionState, L as LocalDeviceInfo, c as DeviceStatusSnapshot, y as ManagedDeviceConnectOptions, C as ClientOptions, h as SignalingSession, R as RuntimeIdentity, J as JoinRoomOptions, a as RoomMember, z as DevicePresenceStatus, F as PeerLifecycleStatus, P as PeerSessionSnapshot } from './types-BwmoJU2O.js';
|
|
3
3
|
import { I as ITransport } from './ITransport-BsPcaov7.js';
|
|
4
4
|
|
|
5
5
|
type ConnectionHealth = 'unknown' | 'healthy' | 'suspect' | 'stale';
|
|
@@ -595,4 +595,4 @@ type SessionOptions = RuntimeManagedSessionOptions;
|
|
|
595
595
|
type Session = RuntimeManagedSession;
|
|
596
596
|
type ChannelDescriptor = RuntimeChannelDescriptor;
|
|
597
597
|
|
|
598
|
-
export { type Session as $, type ChannelDescriptor as A, type ConnectionEvent as B, Connection as C, type ConnectionTarget as D, type DeviceProfile as E, type PeerReadiness as F, type PeerStreamOptions as G, type PresenceLoopOptions as H, type IncomingStream as I, type RawConnection as J, type RuntimeApplicationPayloadRouteOptions as K, type RuntimeAuthContext as L, type RuntimeAutoConnectPolicy as M, type RuntimeDevicePresenceStatus as N, type RuntimeDeviceStatus as O, type PeerConnectOptions as P, type RuntimeLogicalChannelFraming as Q, type
|
|
598
|
+
export { type Session as $, type ChannelDescriptor as A, type ConnectionEvent as B, Connection as C, type ConnectionTarget as D, type DeviceProfile as E, type PeerReadiness as F, type PeerStreamOptions as G, type PresenceLoopOptions as H, type IncomingStream as I, type RawConnection as J, type RuntimeApplicationPayloadRouteOptions as K, type RuntimeAuthContext as L, type RuntimeAutoConnectPolicy as M, type RuntimeDevicePresenceStatus as N, type RuntimeDeviceStatus as O, type PeerConnectOptions as P, type RuntimeLogicalChannelFraming as Q, type RuntimePeerState as R, type RuntimeManagedSessionKind as S, type RuntimeManagedSessionPlatform as T, type RuntimePeerLifecycleStatus as U, type RuntimePeerScope as V, type RuntimePeerSessionSnapshot as W, type RuntimePresencePolicy as X, type RuntimeUiConnectionStatus as Y, type ScopedChannelOptions as Z, type ScopedLogicalChannel as _, type RuntimeConnectionStateSnapshot as a, type SessionOptions as a0, type RuntimePeerReadinessSnapshot as b, type RuntimePeerConnectOptions as c, type RuntimeIncomingStream as d, type RuntimeClientOptions as e, type RuntimeAuthIdentity as f, type RuntimeLocalDeviceInfo as g, type RuntimeLocalDeviceProfile as h, type RuntimeDevice as i, type RuntimeManagedSessionOptions as j, type RuntimeManagedSession as k, type RuntimeDeviceStatusSnapshot as l, type RuntimeDeviceConnectOptions as m, type RuntimeSession as n, type RuntimeJoinRoomOptions as o, type RuntimeRoomMember as p, type RuntimeConnectionTarget as q, type RuntimeScopedChannelOptions as r, type RuntimeScopedLogicalChannel as s, type RuntimePeerStreamOptions as t, type RuntimeRawConnection as u, type RuntimeChannelDescriptor as v, type RuntimePresenceLoopOptions as w, type RuntimePeerHealth as x, type RuntimeApplicationPayloadReadinessOptions as y, type RuntimeConnectionEvent as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openrtc",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.21",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -43,18 +43,10 @@
|
|
|
43
43
|
"types": "./dist/testing.d.ts",
|
|
44
44
|
"import": "./dist/testing.js"
|
|
45
45
|
},
|
|
46
|
-
"./auth": {
|
|
47
|
-
"types": "./dist/auth/index.d.ts",
|
|
48
|
-
"import": "./dist/auth/index.js"
|
|
49
|
-
},
|
|
50
46
|
"./runtime": {
|
|
51
47
|
"types": "./dist/runtime/index.d.ts",
|
|
52
48
|
"import": "./dist/runtime/index.js"
|
|
53
49
|
},
|
|
54
|
-
"./runtime/legacy": {
|
|
55
|
-
"types": "./dist/runtime/legacy.d.ts",
|
|
56
|
-
"import": "./dist/runtime/legacy.js"
|
|
57
|
-
},
|
|
58
50
|
"./runtime/device-status": {
|
|
59
51
|
"types": "./dist/runtime/device-status.d.ts",
|
|
60
52
|
"import": "./dist/runtime/device-status.js"
|
|
@@ -63,18 +55,10 @@
|
|
|
63
55
|
"types": "./dist/runtime/WasmRuntimeAdapter.d.ts",
|
|
64
56
|
"import": "./dist/runtime/WasmRuntimeAdapter.js"
|
|
65
57
|
},
|
|
66
|
-
"./runtime/tauri": {
|
|
67
|
-
"types": "./dist/runtime/tauri.d.ts",
|
|
68
|
-
"import": "./dist/runtime/tauri.js"
|
|
69
|
-
},
|
|
70
58
|
"./transport": {
|
|
71
59
|
"types": "./dist/transport/index.d.ts",
|
|
72
60
|
"import": "./dist/transport/index.js"
|
|
73
61
|
},
|
|
74
|
-
"./auth/internal": {
|
|
75
|
-
"types": "./dist/auth/internal.d.ts",
|
|
76
|
-
"import": "./dist/auth/internal.js"
|
|
77
|
-
},
|
|
78
62
|
"./package.json": "./package.json"
|
|
79
63
|
},
|
|
80
64
|
"scripts": {
|
|
@@ -107,14 +91,6 @@
|
|
|
107
91
|
"@noble/hashes": "^1.8.0",
|
|
108
92
|
"tweetnacl": "^1.0.3"
|
|
109
93
|
},
|
|
110
|
-
"peerDependencies": {
|
|
111
|
-
"firebase": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0"
|
|
112
|
-
},
|
|
113
|
-
"peerDependenciesMeta": {
|
|
114
|
-
"firebase": {
|
|
115
|
-
"optional": true
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
94
|
"devDependencies": {
|
|
119
95
|
"@types/node": "^20.0.0",
|
|
120
96
|
"@vitest/coverage-v8": "^4.0.18",
|