openrtc 2.0.0-rc.0 → 2.0.0-rc.2

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.
@@ -1,6 +1,6 @@
1
1
  import { H as GrantScope, q as ISignalingBackend, Y as ConnectDeviceHooks, Z as ConnectDeviceOptions, _ as ConnectDeviceResult, u as ManagedConnectionRecord, m as PeerSessionSnapshot, v as ResolvedPeerIdentity, $ as AppLimits, N as NativeConnectParams, z as NativeConnectResult, E as ExplicitFileDataSendParams } from './types-BVJr065k.js';
2
2
  import { A as AuthContext } from './IEngineBridge-BbsT8hof.js';
3
- import { a as RuntimePeerState, b as RuntimeConnectionStateSnapshot, c as RuntimePeerReadinessSnapshot, d as RuntimePeerConnectOptions, C as Connection, e as RuntimeIncomingStream, R 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-BUXwspL0.js';
3
+ import { b as RuntimePeerState, c as RuntimeConnectionStateSnapshot, d as RuntimePeerReadinessSnapshot, e as RuntimePeerConnectOptions, C as Connection, f as RuntimeIncomingStream, a as RuntimeClientOptions, g as RuntimeAuthIdentity, h as RuntimeLocalDeviceInfo, i as RuntimeLocalDeviceProfile, j as RuntimeDevice, k as RuntimeManagedSessionOptions, l as RuntimeManagedSession, m as RuntimeDeviceStatusSnapshot, n as RuntimeDeviceConnectOptions, o as RuntimeSession, p as RuntimeJoinRoomOptions, q as RuntimeRoomMember, r as RuntimeConnectionTarget, s as RuntimeScopedChannelOptions, t as RuntimeScopedLogicalChannel, u as RuntimePeerStreamOptions, v as RuntimeRawConnection, R as RuntimeChannelDescriptor, w as RuntimePresenceLoopOptions, x as RuntimePeerHealth, y as RuntimeApplicationPayloadReadinessOptions, z as RuntimeConnectionEvent } from './types-DkgaCyqS.js';
4
4
  import { R as RuntimeCapabilities, a as RuntimeCapabilityProfile } from './capabilities-YSskrE8H.js';
5
5
 
6
6
  /**
@@ -857,7 +857,7 @@ interface OpenRTCAdvancedNamespace {
857
857
  *
858
858
  * This is the unified type returned by OpenRTC() and OpenRTC.native().
859
859
  */
860
- interface OpenRTCClient$1 extends RuntimeClient {
860
+ interface OpenRTCClient extends RuntimeClient {
861
861
  readonly devices: OpenRTCDeviceNamespace;
862
862
  readonly peers: OpenRTCPeerNamespace;
863
863
  readonly channels: OpenRTCChannelNamespace;
@@ -942,195 +942,4 @@ interface OpenRTCClient$1 extends RuntimeClient {
942
942
  readonly _assembly: PlutoRuntimeAssembly;
943
943
  }
944
944
 
945
- interface OpenRTCAuthProvider {
946
- /** Registered provider ID from the developer app capability manifest. */
947
- readonly providerId?: string;
948
- getAssertion(input: {
949
- audience: 'https://api.openrtc.app/v2/assertions/exchange';
950
- forceRefresh: boolean;
951
- }): Promise<string | null>;
952
- /**
953
- * Optional identity-epoch observer. Notify only when the signed-in
954
- * principal/session changes (login, logout, account switch, or explicit
955
- * revocation). Do not notify for ordinary OAuth/Firebase access-token
956
- * refreshes: OpenRTC refreshes its own avenue grant in place.
957
- */
958
- subscribe?(listener: () => void): () => void;
959
- }
960
- interface OpenRTCAttestationProvider {
961
- readonly kind: 'firebase-app-check' | 'apple-app-attest' | 'play-integrity' | `custom:${string}`;
962
- /**
963
- * Describes what the provider actually signs. Reusable app-integrity
964
- * tokens (for example Firebase App Check) do not become request-bound just
965
- * because OpenRTC supplies an enrollment challenge. The server derives and
966
- * enforces the authoritative binding from the registered provider kind;
967
- * this field keeps host integrations and diagnostics honest.
968
- */
969
- readonly evidenceBinding: 'app-session' | 'request-challenge';
970
- getEvidence(input: {
971
- challenge: string;
972
- apiKey: string;
973
- }): Promise<{
974
- token: string;
975
- }>;
976
- }
977
- /**
978
- * Optional consumer-owned bot challenge. Core OpenRTC does not render a UI or
979
- * load a CAPTCHA dependency; the host supplies a fresh token only when its
980
- * developer manifest requires anonymous capability verification.
981
- */
982
- interface OpenRTCBotVerificationProvider {
983
- getToken(input: {
984
- action: 'openrtc_capability';
985
- apiKey: string;
986
- }): Promise<string>;
987
- }
988
- interface OpenRTCUsageUpdate {
989
- sessionCreditsUsd: number;
990
- operation: string;
991
- estimated: boolean;
992
- }
993
- interface OpenRTCUsageWarning extends OpenRTCUsageUpdate {
994
- thresholdCreditsUsd: number;
995
- kind: 'warning' | 'session-limit';
996
- }
997
- interface OpenRTCTransportPreferences {
998
- iroh?: boolean;
999
- webrtc?: boolean;
1000
- relay?: boolean;
1001
- moq?: boolean;
1002
- ble?: boolean;
1003
- /**
1004
- * Advanced privacy mode. `relay-only` suppresses direct Iroh addresses,
1005
- * local discovery, and host/srflx WebRTC candidates. It also requires the
1006
- * developer manifest's relay opt-in.
1007
- */
1008
- privacy?: 'direct' | 'relay-only';
1009
- /**
1010
- * Advanced native integration for hosts whose Rust process owns the
1011
- * application protocol registry (for example, a Tauri file-transfer host).
1012
- * Normal SDK consumers should leave this disabled.
1013
- */
1014
- nativeHostProtocols?: boolean;
1015
- priority?: readonly ('iroh' | 'webrtc' | 'moq' | 'ble')[];
1016
- }
1017
- interface OpenRTCOptions {
1018
- apiKey: string;
1019
- auth?: OpenRTCAuthProvider;
1020
- trust?: {
1021
- attestation?: OpenRTCAttestationProvider;
1022
- botVerification?: OpenRTCBotVerificationProvider;
1023
- };
1024
- usage?: {
1025
- warnAtSessionCreditsUsd?: number;
1026
- maxSessionCreditsUsd?: number;
1027
- onUsage?: (event: OpenRTCUsageUpdate) => void;
1028
- onWarning?: (warning: OpenRTCUsageWarning) => void;
1029
- };
1030
- transports?: OpenRTCTransportPreferences;
1031
- }
1032
- type OpenRTCAccessMode = 'capability' | 'authenticated';
1033
- type OpenRTCLatestStateMode = 'reliable' | 'latest-state';
1034
- interface OpenRTCCapabilityHandle {
1035
- readonly kind: 'devices' | 'space' | 'room' | 'ticket';
1036
- readonly id: string;
1037
- readonly peers: OpenRTCPeerNamespace;
1038
- readonly channels: OpenRTCChannelNamespace;
1039
- readonly diagnostics: OpenRTCDiagnosticsNamespace;
1040
- readonly closed: boolean;
1041
- close(): Promise<void>;
1042
- }
1043
- interface OpenRTCDevicesHandle extends OpenRTCCapabilityHandle {
1044
- readonly kind: 'devices';
1045
- localId(): ReturnType<OpenRTCDeviceNamespace['localId']>;
1046
- localInfo(): ReturnType<OpenRTCDeviceNamespace['localInfo']>;
1047
- list(): ReturnType<OpenRTCDeviceNamespace['list']>;
1048
- listWithStatus(): ReturnType<OpenRTCDeviceNamespace['listWithStatus']>;
1049
- watch: OpenRTCDeviceNamespace['watch'];
1050
- connect: OpenRTCDeviceNamespace['connect'];
1051
- disconnect: OpenRTCDeviceNamespace['disconnect'];
1052
- }
1053
- interface OpenRTCSpaceHandle extends OpenRTCCapabilityHandle {
1054
- readonly kind: 'space';
1055
- readonly delivery: OpenRTCLatestStateMode;
1056
- leave(): Promise<void>;
1057
- }
1058
- interface OpenRTCRoomHandle extends OpenRTCCapabilityHandle {
1059
- readonly kind: 'room';
1060
- readonly membership: 'ephemeral' | 'durable';
1061
- leave(): Promise<void>;
1062
- }
1063
- interface OpenRTCTicketHandle extends OpenRTCCapabilityHandle {
1064
- readonly kind: 'ticket';
1065
- readonly token: string;
1066
- }
1067
- interface OpenRTCDevicesStartOptions {
1068
- auth?: OpenRTCAuthProvider;
1069
- autoConnect?: 'none' | 'online';
1070
- /** Optional local profile; it does not alter the durable device identity. */
1071
- profile?: {
1072
- name?: string;
1073
- /**
1074
- * Optional application-owned public presence metadata. It is bounded
1075
- * to 4 KiB and folded into the initial connection/presence operation.
1076
- */
1077
- metadata?: string;
1078
- };
1079
- maxPeers?: number;
1080
- /** Requires the app manifest's advanced-fanout opt-in. */
1081
- advancedFanout?: boolean;
1082
- }
1083
- interface OpenRTCSpaceJoinOptions {
1084
- access?: 'capability';
1085
- identity?: 'ephemeral';
1086
- payload?: OpenRTCLatestStateMode;
1087
- maxPeers?: number;
1088
- /** Requires the app manifest's advanced-fanout opt-in. */
1089
- advancedFanout?: boolean;
1090
- }
1091
- interface OpenRTCRoomJoinOptions {
1092
- access?: OpenRTCAccessMode;
1093
- membership?: 'ephemeral' | 'durable';
1094
- auth?: OpenRTCAuthProvider;
1095
- maxPeers?: number;
1096
- /** Requires the app manifest's advanced-fanout opt-in. */
1097
- advancedFanout?: boolean;
1098
- }
1099
- interface OpenRTCTicketIssueOptions {
1100
- maxPeers?: number;
1101
- /** Requires the app manifest's advanced-fanout opt-in. */
1102
- advancedFanout?: boolean;
1103
- }
1104
- interface OpenRTCChannelCatalog {
1105
- register(descriptor: RuntimeChannelDescriptor): () => void;
1106
- list(): readonly RuntimeChannelDescriptor[];
1107
- }
1108
- interface OpenRTCUsageNamespace {
1109
- estimate(input: {
1110
- operation: string;
1111
- units?: number;
1112
- }): {
1113
- creditsUsd: number;
1114
- estimated: true;
1115
- };
1116
- readonly sessionCreditsUsd: number;
1117
- }
1118
- interface OpenRTCClient {
1119
- readonly devices: {
1120
- start(options?: OpenRTCDevicesStartOptions): Promise<OpenRTCDevicesHandle>;
1121
- };
1122
- readonly spaces: {
1123
- join(id: string, options?: OpenRTCSpaceJoinOptions): Promise<OpenRTCSpaceHandle>;
1124
- };
1125
- readonly rooms: {
1126
- join(id: string, options?: OpenRTCRoomJoinOptions): Promise<OpenRTCRoomHandle>;
1127
- };
1128
- readonly tickets: {
1129
- issue(id: string, options?: OpenRTCTicketIssueOptions): Promise<OpenRTCTicketHandle>;
1130
- };
1131
- readonly channels: OpenRTCChannelCatalog;
1132
- readonly usage: OpenRTCUsageNamespace;
1133
- close(): Promise<void>;
1134
- }
1135
-
1136
- export { DriveGrantActorHandle as A, type DriveGrantActorHandleOptions as B, DriveGrantActorRegistry as C, DriveGrantActorError as D, type DriveGrantActorState as E, type DriveGrantClose as F, type DriveGrantDial as G, type DriveGrantConnectionKey as H, type DriveGrantLogicalChannelHandle as I, type DriveGrantPreferredTransport as J, getRuntimePolicy as K, driveGrantConnectionKey as L, driveGrantConnectionKeyToString as M, type OpenRTCOptions as O, type PlutoRuntimeAssembly as P, type RuntimeFactoryOptions as R, 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 OpenRTCDevicesHandle as h, type OpenRTCDevicesStartOptions as i, type OpenRTCLatestStateMode as j, type OpenRTCRoomHandle as k, type OpenRTCRoomJoinOptions as l, type OpenRTCSpaceHandle as m, type OpenRTCSpaceJoinOptions as n, type OpenRTCTicketHandle as o, type OpenRTCTicketIssueOptions as p, type OpenRTCTransportPreferences as q, type OpenRTCUsageNamespace as r, type OpenRTCUsageUpdate as s, type OpenRTCUsageWarning as t, type OpenRTCClient$1 as u, type PeerReconciliationStats as v, OPENRTC_RUNTIME_POLICY as w, RuntimeClient as x, type RuntimePolicySnapshot as y, type DriveGrantActorErrorKind as z };
945
+ export { DriveGrantActorError as D, type OpenRTCPeerNamespace as O, type PlutoRuntimeAssembly as P, type RuntimeFactoryOptions as R, type OpenRTCChannelNamespace as a, type OpenRTCDiagnosticsNamespace as b, type OpenRTCDeviceNamespace as c, type OpenRTCClient as d, type PeerReconciliationStats as e, OPENRTC_RUNTIME_POLICY as f, RuntimeClient as g, type RuntimePolicySnapshot as h, type DriveGrantActorErrorKind as i, DriveGrantActorHandle as j, type DriveGrantActorHandleOptions as k, DriveGrantActorRegistry as l, type DriveGrantActorState as m, type DriveGrantClose as n, type DriveGrantDial as o, type DriveGrantConnectionKey as p, type DriveGrantLogicalChannelHandle as q, type DriveGrantPreferredTransport as r, getRuntimePolicy as s, driveGrantConnectionKey as t, driveGrantConnectionKeyToString as u };