openrtc 2.0.1 → 2.2.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.
Files changed (73) hide show
  1. package/README.md +11 -8
  2. package/dist/{DelegatingRuntimeAdapter-fgz5OPQx.d.ts → DelegatingRuntimeAdapter-BkLR3TNN.d.ts} +33 -31
  3. package/dist/{ITransport-UNOXiRJD.d.ts → ITransport-yaruAmx3.d.ts} +48 -84
  4. package/dist/{IpcRuntimeAdapter-CI3vCzk0.d.ts → IpcRuntimeAdapter-DDKeQ6UC.d.ts} +6 -6
  5. package/dist/WasmBridge-DVQ2YPRB.js +1 -0
  6. package/dist/{assembly-CLdwe5T-.d.ts → assembly-BTzwQuwI.d.ts} +67 -74
  7. package/dist/{capabilities-BUe5YldR.d.ts → capabilities-BwzPe51I.d.ts} +19 -19
  8. package/dist/chunk-2IRNZN3N.js +1 -0
  9. package/dist/chunk-4MLJXEVV.js +2 -0
  10. package/dist/chunk-AJQVMVYW.js +1 -0
  11. package/dist/chunk-BOS554IK.js +2 -0
  12. package/dist/chunk-DI5VSZ2T.js +2 -0
  13. package/dist/chunk-F4BJ72HN.js +1 -0
  14. package/dist/{chunk-LRT5GEGH.js → chunk-FKEKINIM.js} +2 -2
  15. package/dist/chunk-GND6UW37.js +1 -0
  16. package/dist/{chunk-Z2WVSXPW.js → chunk-HUG5AX7R.js} +1 -1
  17. package/dist/chunk-LN4ALFT6.js +1 -0
  18. package/dist/chunk-NXM5ZGHD.js +2 -0
  19. package/dist/chunk-OUFHVLDQ.js +2 -0
  20. package/dist/chunk-SUWCBTBQ.js +1 -0
  21. package/dist/chunk-UGZJJQPM.js +3 -0
  22. package/dist/chunk-ZA44REGI.js +2 -0
  23. package/dist/controlPlane-JJFURVOX.js +1 -0
  24. package/dist/{OpenRTCShared.d.ts → coreClient.d.ts} +61 -66
  25. package/dist/coreClient.js +1 -0
  26. package/dist/{deviceEnrollment-33NZEARB.js → deviceEnrollment-Z2EHP2EX.js} +1 -1
  27. package/dist/deviceKey-Y35WSEQQ.js +1 -0
  28. package/dist/deviceProfile-CR2C7OYR.js +2 -0
  29. package/dist/index.d.ts +30 -30
  30. package/dist/index.js +1 -1
  31. package/dist/{ipc-CflAVodw.d.ts → ipc-CPnNwv6f.d.ts} +3 -3
  32. package/dist/ipcFactory-DQFK65VE.js +1 -0
  33. package/dist/openrtc-INQDCF23.js +2 -0
  34. package/dist/openrtc_bg.wasm +0 -0
  35. package/dist/runtime/WasmRuntimeAdapter.d.ts +4 -4
  36. package/dist/runtime/WasmRuntimeAdapter.js +1 -1
  37. package/dist/runtime/device-status.d.ts +10 -10
  38. package/dist/runtime/device-status.js +1 -1
  39. package/dist/runtime/factories.d.ts +8 -8
  40. package/dist/runtime/factories.js +1 -1
  41. package/dist/runtime/index.d.ts +50 -50
  42. package/dist/runtime/index.js +1 -1
  43. package/dist/testing.d.ts +29 -28
  44. package/dist/testing.js +1 -1
  45. package/dist/transport/index.d.ts +24 -24
  46. package/dist/transport/index.js +1 -1
  47. package/dist/{types-DhmY9hBy.d.ts → types-C4TIUgOJ.d.ts} +74 -70
  48. package/dist/{types-l3m3GrOe.d.ts → types-D67HlF0p.d.ts} +58 -102
  49. package/package.json +2 -6
  50. package/dist/OpenRTCShared.js +0 -1
  51. package/dist/WasmBridge-P5646IVR.js +0 -1
  52. package/dist/chunk-45WBH7E3.js +0 -1
  53. package/dist/chunk-5OTF7W2N.js +0 -3
  54. package/dist/chunk-7FPG3MFF.js +0 -2
  55. package/dist/chunk-AG2F6MOB.js +0 -1
  56. package/dist/chunk-CWGKLGJZ.js +0 -1
  57. package/dist/chunk-HIXXBEWX.js +0 -1
  58. package/dist/chunk-IKZ33R7R.js +0 -2
  59. package/dist/chunk-KJTJLLJE.js +0 -2
  60. package/dist/chunk-QCPSLUKO.js +0 -1
  61. package/dist/chunk-VBUDERMM.js +0 -2
  62. package/dist/chunk-XPL7PUBW.js +0 -2
  63. package/dist/chunk-Y35AKFCM.js +0 -1
  64. package/dist/chunk-ZQF5KSOK.js +0 -2
  65. package/dist/controlPlane-YAMXWHAF.js +0 -1
  66. package/dist/deviceKey-SBNKLVYF.js +0 -1
  67. package/dist/deviceProfile-3BEQZLJF.js +0 -2
  68. package/dist/ipcFactory-JTMNUTZI.js +0 -1
  69. package/dist/native.d.ts +0 -15
  70. package/dist/native.js +0 -1
  71. package/dist/openrtc-JUV7TOTL.js +0 -2
  72. /package/dist/{deviceManagement-PHY5TIOS.js → deviceManagement-SUMBRXXC.js} +0 -0
  73. /package/dist/{deviceRoster-VZA3TQOR.js → deviceRoster-EUF6BBF5.js} +0 -0
@@ -1,7 +1,7 @@
1
- import { h as RuntimeDevice, o as RuntimeDeviceStatusSnapshot } from '../types-l3m3GrOe.js';
2
- import '../ITransport-UNOXiRJD.js';
1
+ import { e as RuntimeDevice, D as DeviceStatus } from '../types-D67HlF0p.js';
2
+ import '../ITransport-yaruAmx3.js';
3
3
 
4
- interface RuntimeDeviceActiveOptions {
4
+ interface DeviceActiveOptions {
5
5
  now?: number;
6
6
  /**
7
7
  * Optional local freshness window for durable roster rows. Leave undefined
@@ -10,15 +10,15 @@ interface RuntimeDeviceActiveOptions {
10
10
  staleAfterMs?: number;
11
11
  }
12
12
  type RuntimeDeviceActivityStatus = Pick<Partial<RuntimeDevice>, 'online' | 'lastSeenAt' | 'updatedAt' | 'createdAt' | 'expiresAt'>;
13
- type RuntimeDeviceRouteStatus = Pick<Partial<RuntimeDeviceStatusSnapshot>, 'settledReady' | 'readinessState' | 'connectionStatus'>;
14
- type RuntimeDevicePresenceStatus = Pick<RuntimeDevice, 'online' | 'ticket'> & Pick<Partial<RuntimeDeviceStatusSnapshot>, 'connectable' | 'presenceStatus' | 'online' | 'ticket'>;
13
+ type RuntimeDeviceRouteStatus = Pick<Partial<DeviceStatus>, 'settledReady' | 'readinessState' | 'connectionStatus'>;
14
+ type DevicePresence = Pick<RuntimeDevice, 'online' | 'ticket'> & Pick<Partial<DeviceStatus>, 'connectable' | 'presenceStatus' | 'online' | 'ticket'>;
15
15
  /**
16
16
  * True when a runtime device row is currently live enough to display or
17
17
  * consider for app-level routing. This is deliberately separate from
18
- * `isRuntimeDeviceConnectable`: a peer can be active/present before it has a
18
+ * `isDeviceConnectable`: a peer can be active/present before it has a
19
19
  * usable ticket, and a stale durable row should not keep app UIs alive.
20
20
  */
21
- declare function isRuntimeDeviceActive(device: RuntimeDeviceActivityStatus, options?: RuntimeDeviceActiveOptions): boolean;
21
+ declare function isDeviceActive(device: RuntimeDeviceActivityStatus, options?: DeviceActiveOptions): boolean;
22
22
  /**
23
23
  * True once OpenRTC has a routable peer projection for normal app payloads.
24
24
  *
@@ -27,11 +27,11 @@ declare function isRuntimeDeviceActive(device: RuntimeDeviceActivityStatus, opti
27
27
  * are not proof that an application-level protocol has exchanged its own
28
28
  * ready/capability message over the mesh.
29
29
  */
30
- declare function isRuntimeDeviceRoutable(device: RuntimeDeviceRouteStatus): boolean;
30
+ declare function isDeviceRoutable(device: RuntimeDeviceRouteStatus): boolean;
31
31
  /**
32
32
  * True when the discovery row currently has enough fresh presence to attempt
33
33
  * a dial. This is a discovery gate, not a connected/readiness gate.
34
34
  */
35
- declare function isRuntimeDeviceConnectable(device: RuntimeDevicePresenceStatus): boolean;
35
+ declare function isDeviceConnectable(device: DevicePresence): boolean;
36
36
 
37
- export { type RuntimeDeviceActiveOptions, isRuntimeDeviceActive, isRuntimeDeviceConnectable, isRuntimeDeviceRoutable };
37
+ export { type DeviceActiveOptions, isDeviceActive, isDeviceConnectable, isDeviceRoutable };
@@ -1 +1 @@
1
- export{a as isRuntimeDeviceActive,c as isRuntimeDeviceConnectable,b as isRuntimeDeviceRoutable}from'../chunk-CK6WQV7J.js';
1
+ export{a as isDeviceActive,c as isDeviceConnectable,b as isDeviceRoutable}from'../chunk-CK6WQV7J.js';
@@ -1,10 +1,10 @@
1
- import { c as RuntimeFactoryOptions, b as PlutoRuntimeAssembly } from '../assembly-CLdwe5T-.js';
2
- import { I as IpcRuntimeAdapter } from '../IpcRuntimeAdapter-CI3vCzk0.js';
3
- import { W as WasmBridge } from '../DelegatingRuntimeAdapter-fgz5OPQx.js';
4
- import { P as PlutoIpcBridge } from '../ipc-CflAVodw.js';
5
- import '../types-l3m3GrOe.js';
6
- import '../ITransport-UNOXiRJD.js';
7
- import '../capabilities-BUe5YldR.js';
1
+ import { c as RuntimeFactoryOptions, b as PlutoRuntimeAssembly } from '../assembly-BTzwQuwI.js';
2
+ import { I as IpcRuntimeAdapter } from '../IpcRuntimeAdapter-DDKeQ6UC.js';
3
+ import { W as WasmBridge } from '../DelegatingRuntimeAdapter-BkLR3TNN.js';
4
+ import { P as PlutoIpcBridge } from '../ipc-CPnNwv6f.js';
5
+ import '../types-D67HlF0p.js';
6
+ import '../ITransport-yaruAmx3.js';
7
+ import '../capabilities-BwzPe51I.js';
8
8
 
9
9
  /**
10
10
  * @deprecated Legacy assembly helper. Use `OpenRTC()` for app code.
@@ -13,7 +13,7 @@ import '../capabilities-BUe5YldR.js';
13
13
  declare function createWasmClient(options: RuntimeFactoryOptions): Promise<PlutoRuntimeAssembly<WasmBridge>>;
14
14
  /**
15
15
  * @deprecated Legacy assembly helper. Native applications should use
16
- * `createNativeOpenRTC` from `openrtc/native`.
16
+ * `OpenRTC.native` from `openrtc`.
17
17
  * Removal target: OpenRTC 0.2.0.
18
18
  */
19
19
  declare function createIpcClient(options: RuntimeFactoryOptions, bridge: PlutoIpcBridge): PlutoRuntimeAssembly<IpcRuntimeAdapter>;
@@ -1 +1 @@
1
- import {a as a$2}from'../chunk-HIXXBEWX.js';import {u,a as a$3}from'../chunk-5OTF7W2N.js';import'../chunk-LRT5GEGH.js';import'../chunk-Z2WVSXPW.js';import'../chunk-DUY34MGT.js';import'../chunk-Y35AKFCM.js';import'../chunk-ZQF5KSOK.js';import'../chunk-AG2F6MOB.js';import'../chunk-CWGKLGJZ.js';import {a as a$1}from'../chunk-KJTJLLJE.js';import'../chunk-45WBH7E3.js';import'../chunk-NRXEG5GQ.js';var s=false;function a(){s||(s=true,a$3(async()=>{let t=await import('../openrtc-JUV7TOTL.js');return {initWasm:t.default,WasmClient:t.WasmClient,start:t.start}}));}async function d(t){a();let e=a$1(t),{WasmBridge:i}=await import('../WasmBridge-P5646IVR.js');return a$2(e,new i(e))}function y(t,e){let i=a$1(t);return a$2(i,new u({...i,bridge:e}))}export{y as createIpcClient,d as createWasmClient};
1
+ import {a as a$2}from'../chunk-GND6UW37.js';import {t,a as a$3}from'../chunk-UGZJJQPM.js';import'../chunk-HUG5AX7R.js';import'../chunk-DUY34MGT.js';import'../chunk-F4BJ72HN.js';import'../chunk-OUFHVLDQ.js';import'../chunk-AJQVMVYW.js';import {a as a$1}from'../chunk-NXM5ZGHD.js';import'../chunk-NRXEG5GQ.js';import'../chunk-FKEKINIM.js';import'../chunk-SUWCBTBQ.js';import'../chunk-LN4ALFT6.js';var n=false;function a(){n||(n=true,a$3(async()=>{let t=await import('../openrtc-INQDCF23.js');return {initWasm:t.default,WasmClient:t.WasmClient,start:t.start}}));}async function d(t){a();let e=a$1(t),{WasmBridge:i}=await import('../WasmBridge-DVQ2YPRB.js');return a$2(e,new i(e))}function y(t$1,e){let i=a$1(t$1);return a$2(i,new t({...i,bridge:e}))}export{y as createIpcClient,d as createWasmClient};
@@ -1,17 +1,17 @@
1
- import { P as PeerReconciliationStats } from '../assembly-CLdwe5T-.js';
2
- export { O as OPENRTC_RUNTIME_POLICY, a as RuntimeClient, R as RuntimePolicySnapshot, D as ScopedConnectionActorError, d as ScopedConnectionActorErrorKind, e as ScopedConnectionActorHandle, f as ScopedConnectionActorHandleOptions, g as ScopedConnectionActorRegistry, h as ScopedConnectionActorState, i as ScopedConnectionClose, j as ScopedConnectionDial, k as ScopedConnectionKey, l as ScopedLogicalChannelHandle, m as ScopedPreferredTransport, n as getRuntimePolicy, o as scopedConnectionKey, p as scopedConnectionKeyToString } from '../assembly-CLdwe5T-.js';
3
- import { OpenRTCClient } from '../OpenRTCShared.js';
4
- import { f as OpenRTCCapabilityHandle } from '../types-DhmY9hBy.js';
5
- import { C as Connection, D as RuntimeConnectionTarget, s as RuntimeRawConnection } from '../types-l3m3GrOe.js';
6
- export { F as ChannelDescriptor, G as ConnectionEvent, H as ConnectionTarget, J as DeviceProfile, K as IncomingStream, I as IrohBrowserProtocolStore, y as IrohDocEntry, x as IrohMutationReceipt, w as IrohNamespaceDescriptor, P as PeerConnectOptions, L as PeerReadiness, M as PeerStreamOptions, N as PresenceLoopOptions, O as RawConnection, k as RuntimeApplicationPayloadReadinessOptions, Q as RuntimeApplicationPayloadRouteOptions, S as RuntimeAuthContext, z as RuntimeAuthIdentity, T as RuntimeAutoConnectPolicy, R as RuntimeChannelDescriptor, v as RuntimeClientOptions, l as RuntimeConnectionEvent, j as RuntimeConnectionStateSnapshot, h as RuntimeDevice, p as RuntimeDeviceConnectOptions, U as RuntimeDevicePresenceStatus, V as RuntimeDeviceStatus, o as RuntimeDeviceStatusSnapshot, f as RuntimeIncomingStream, t as RuntimeJoinRoomOptions, q as RuntimeLocalDeviceInfo, r as RuntimeLocalDeviceProfile, W as RuntimeLogicalChannelFraming, n as RuntimeManagedSession, X as RuntimeManagedSessionKind, m as RuntimeManagedSessionOptions, Y as RuntimeManagedSessionPlatform, b as RuntimePeerConnectOptions, d as RuntimePeerHealth, Z as RuntimePeerLifecycleStatus, c as RuntimePeerReadinessSnapshot, _ as RuntimePeerScope, $ as RuntimePeerSessionSnapshot, a as RuntimePeerState, e as RuntimePeerStreamOptions, E as RuntimePresenceLoopOptions, a0 as RuntimePresencePolicy, u as RuntimeRoomMember, g as RuntimeScopedChannelOptions, i as RuntimeScopedLogicalChannel, B as RuntimeSession, a1 as RuntimeUiConnectionStatus, a2 as ScopedChannelOptions, a3 as ScopedLogicalChannel, a4 as Session, a5 as SessionOptions } from '../types-l3m3GrOe.js';
1
+ import { a as PeerReconciliationStats } from '../assembly-BTzwQuwI.js';
2
+ export { D as ConnectionActor, d as ConnectionActorError, e as ConnectionActorErrorKind, f as ConnectionActorKey, g as ConnectionActorOptions, h as ConnectionActorState, i as ConnectionActors, j as ConnectionClose, k as ConnectionDial, l as LogicalChannel, P as PolicySnapshot, m as PreferredTransport, n as RUNTIME_POLICY, R as RuntimeClient, o as connectionActorKey, p as connectionActorKeyString, q as getRuntimePolicy } from '../assembly-BTzwQuwI.js';
3
+ import { Client as Client$1 } from '../coreClient.js';
4
+ import { b as Avenue } from '../types-C4TIUgOJ.js';
7
5
  import * as Draft14 from '@moq/net';
8
- import { a7 as SignalingOptions, I as ISignalingBackend, l as RuntimeIdentity, k as RoomMember, m as SignalingEnvelope, t as SignalingSession, D as Device, q as DesiredPeerProjection, v as BackendConnectionState, a6 as AppLimits, G as GrantScope, Y as JoinRoomOptions, W as IncomingStreamChannelMetadata, a2 as ApplicationCryptoStreamTools, a8 as RoomCreationMode, g as ClientOptions, y as ApplicationPayloadCrypto, j as DiscoveryMode, a1 as ProtocolCapabilityMap, a9 as ScanningLoopOptions, aa as ScanningLoopHandle, ab as RuntimeBootstrapOptions, ac as RuntimeBootstrapResult, z as ApplicationPayloadReadinessOptions, ad as ManagedApplicationRouteOptions, O as PeerState, Q as PeerScope, U as PeerHealth, V as ChannelDescriptor, ae as JoinRequest, N as NativeConnectParams, s as NativeConnectResult } from '../ITransport-UNOXiRJD.js';
9
- import { R as RuntimeCapabilities } from '../capabilities-BUe5YldR.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-BUe5YldR.js';
11
- export { RuntimeDeviceActiveOptions, isRuntimeDeviceActive, isRuntimeDeviceConnectable, isRuntimeDeviceRoutable } from './device-status.js';
12
- export { I as IpcRuntimeAdapter, a as IpcRuntimeAdapterOptions } from '../IpcRuntimeAdapter-CI3vCzk0.js';
13
- export { P as NativeBridge, N as NativeIpcFailureKind, P as PlutoIpcBridge, a as PlutoIpcUnlisten, c as classifyNativeIpcFailure, i as isNativeIpcCommandUnavailable } from '../ipc-CflAVodw.js';
14
- import '../DelegatingRuntimeAdapter-fgz5OPQx.js';
6
+ import { a7 as SignalingOptions, I as ISignalingBackend, m as RuntimeIdentity, l as RoomMember, n as SignalingEnvelope, u as SignalingSession, D as Device, r as DesiredPeerProjection, w as BackendConnectionState, a6 as AppLimits, G as GrantScope, Y as JoinRoomOptions, W as ChannelMetadata, a2 as CryptoStreams, a8 as RoomCreationMode, h as ClientOptions, z as PayloadCrypto, k as DiscoveryMode, a1 as ProtocolCapabilityMap, a9 as ScanningLoopOptions, aa as ScanningLoopHandle, ab as RuntimeBootstrapOptions, ac as RuntimeBootstrapResult, F as ApplicationPayloadReadinessOptions, ad as ManagedApplicationRouteOptions, Q as PeerState, T as PeerScope, U as PeerHealth, V as ChannelDescriptor, ae as JoinRequest, N as NativeConnectParams, t as NativeConnectResult } from '../ITransport-yaruAmx3.js';
7
+ import { a as Connection, t as ConnectionTarget, m as RawConnection } from '../types-D67HlF0p.js';
8
+ export { v as AutoConnectPolicy, B as BrowserProtocolStore, C as ChannelDescriptor, w as ChannelFraming, i as ConnectionEvent, g as ConnectionState, x as ConnectionStatus, k as DeviceConnectOptions, y as DevicePresence, l as DeviceProfile, D as DeviceStatus, I as IncomingStream, q as IrohDocEntry, p as IrohMutationReceipt, J as JoinRoomOptions, L as LocalDeviceInfo, M as ManagedOptions, j as ManagedSession, N as NamespaceDescriptor, z as PayloadRouteOptions, P as PeerConnectOptions, E as PeerLifecycleStatus, b as PeerReadiness, F as PeerSessionSnapshot, d as PeerStreamOptions, u as PresenceLoopOptions, G as PresencePolicy, h as ReadinessOptions, H as RuntimeAuthContext, r as RuntimeAuthIdentity, o as RuntimeClientOptions, e as RuntimeDevice, c as RuntimePeerHealth, K as RuntimePeerScope, R as RuntimePeerState, n as RuntimeRoomMember, s as RuntimeSession, S as ScopedChannelOptions, f as ScopedLogicalChannel, O as SessionKind, Q as SessionPlatform } from '../types-D67HlF0p.js';
9
+ import { R as RuntimeCapabilities } from '../capabilities-BwzPe51I.js';
10
+ export { B as BROWSER_CAPABILITIES, a as CapabilityHost, C as CapabilityProfile, N as NATIVE_CAPABILITIES, b as NativeRuntimeStatus, c as RuntimeAdapterKind, T as TransportStatus, d as browserCapabilities, e as capabilityProfile, f as cloneCapabilities, s as statusCapabilities } from '../capabilities-BwzPe51I.js';
11
+ export { DeviceActiveOptions, isDeviceActive, isDeviceConnectable, isDeviceRoutable } from './device-status.js';
12
+ export { a as IpcAdapterOptions, I as IpcRuntimeAdapter } from '../IpcRuntimeAdapter-DDKeQ6UC.js';
13
+ export { P as NativeBridge, N as NativeIpcFailureKind, P as PlutoIpcBridge, a as PlutoIpcUnlisten, c as classifyIpcFailure, i as isIpcUnavailable } from '../ipc-CPnNwv6f.js';
14
+ import '../DelegatingRuntimeAdapter-BkLR3TNN.js';
15
15
 
16
16
  declare class Signaling {
17
17
  private readonly appTag;
@@ -29,12 +29,12 @@ declare class Signaling {
29
29
  signInAnonymously(): Promise<void>;
30
30
  signInWithPluto(): Promise<void>;
31
31
  signOut(): Promise<void>;
32
- stopAuthScopedActivity(): Promise<void>;
32
+ stopAuthActivity(): Promise<void>;
33
33
  setCoordinationHostAvailability(input: {
34
34
  available: boolean;
35
35
  reason: string;
36
36
  }): void;
37
- getRuntimeCapabilities(): RuntimeCapabilities | undefined;
37
+ capabilities(): RuntimeCapabilities | undefined;
38
38
  getTurnCredentials(): Promise<any>;
39
39
  updatePresence(localNodeId: string, ticketStr: string, isOnline?: boolean, ttlMs?: number, metadata?: string): Promise<void>;
40
40
  setOffline(localNodeId: string): Promise<void>;
@@ -55,21 +55,21 @@ declare class Signaling {
55
55
  submitDesiredPeerProjection(revision: number, peers: DesiredPeerProjection[]): Promise<void>;
56
56
  notifyDisconnectRequested(remoteNodeId: string): void;
57
57
  startPresenceLoop(userId: string, localNodeId: string, deviceName: string, ticket: string, metadata?: string): void;
58
- forceReconnectSnapshot(): void;
58
+ forceReconnect(): void;
59
59
  isConnected(nodeId: string): Promise<boolean>;
60
60
  getConnectionStates(): Promise<BackendConnectionState[]>;
61
- onConnectionStateChange(callback: (state: BackendConnectionState) => void): (() => void) | Promise<() => void>;
61
+ onStateChange(callback: (state: BackendConnectionState) => void): (() => void) | Promise<() => void>;
62
62
  supportsRustPeerLifecycleProjection(): boolean;
63
63
  setWasmClient(client: any): void;
64
64
  }
65
65
 
66
- type OpenRTCCapabilityRuntime = OpenRTCClient;
66
+ type CapabilityRuntime = Client$1;
67
67
  /**
68
68
  * Low-level escape hatch used only by `openrtc/runtime`. Product code should
69
69
  * prefer the capability namespaces. Keeping this registry here prevents a
70
70
  * runtime pointer from leaking onto the provider-neutral root surface.
71
71
  */
72
- declare function runtimeForCapability(handle: OpenRTCCapabilityHandle): OpenRTCCapabilityRuntime;
72
+ declare function runtimeForCapability(handle: Avenue): CapabilityRuntime;
73
73
 
74
74
  interface MoQSubscriberOptions {
75
75
  maxPendingSubscriptions?: number;
@@ -247,16 +247,16 @@ declare class RoomManager {
247
247
  stopHeartbeat(_roomId?: string): void;
248
248
  }
249
249
 
250
- type IncomingProtocolHint = 'control' | 'explicit' | 'native-main' | 'unknown';
251
- type IncomingStreamListenerEvent = {
250
+ type ProtocolHint = 'control' | 'explicit' | 'native-main' | 'unknown';
251
+ type IncomingStreamEvent = {
252
252
  type: 'bi' | 'uni';
253
253
  stream: any;
254
254
  remoteNodeId: string;
255
255
  transportStableId?: number;
256
256
  traceId?: string;
257
- protocolHint?: IncomingProtocolHint;
258
- channel?: IncomingStreamChannelMetadata | null;
259
- applicationCrypto?: ApplicationCryptoStreamTools;
257
+ protocolHint?: ProtocolHint;
258
+ channel?: ChannelMetadata | null;
259
+ applicationCrypto?: CryptoStreams;
260
260
  invalid?: boolean;
261
261
  };
262
262
 
@@ -277,10 +277,10 @@ declare class Client {
277
277
  get node(): any;
278
278
  set node(node: any);
279
279
  attachIncomingStreamSource(source: unknown, localNodeId: string): void;
280
- getApplicationCrypto(connection?: Connection): ApplicationPayloadCrypto | undefined;
281
- resolveApplicationCryptoForPeer(peerId?: string, connection?: Connection): ApplicationPayloadCrypto | undefined;
280
+ getApplicationCrypto(connection?: Connection): PayloadCrypto | undefined;
281
+ resolveApplicationCryptoForPeer(peerId?: string, connection?: Connection): PayloadCrypto | undefined;
282
282
  releaseApplicationKeyAgreementReply(connectionId: string, action: 'response' | 'ack', claimId: string): void;
283
- waitForApplicationCryptoForPeer(peerId?: string, timeoutMs?: number): Promise<ApplicationPayloadCrypto | undefined>;
283
+ waitForApplicationCryptoForPeer(peerId?: string, timeoutMs?: number): Promise<PayloadCrypto | undefined>;
284
284
  destroy(): void;
285
285
  dispose(): void;
286
286
  get apiKey(): string | undefined;
@@ -298,7 +298,7 @@ declare class Client {
298
298
  wasmLoaded: boolean;
299
299
  peerReconciliation: Readonly<PeerReconciliationStats>;
300
300
  };
301
- getPeerReconciliationStats(): Readonly<PeerReconciliationStats>;
301
+ reconciliationStats(): Readonly<PeerReconciliationStats>;
302
302
  getProtocolCapabilities(): ProtocolCapabilityMap;
303
303
  getRuntimeStatus(): Promise<{
304
304
  runtime: 'tauri' | 'browser' | 'unknown';
@@ -346,7 +346,7 @@ declare class Client {
346
346
  }>;
347
347
  openUni(peerId: string): Promise<WritableStream<Uint8Array>>;
348
348
  getConnections(): Connection[];
349
- getApplicationReadyConnections(options?: ApplicationPayloadReadinessOptions): Connection[];
349
+ readyConnections(options?: ApplicationPayloadReadinessOptions): Connection[];
350
350
  getConnectionForPeer(connectionId?: string, remoteNodeId?: string): Connection | null;
351
351
  hasApplicationRouteForPeer(connectionId?: string, remoteNodeId?: string): boolean;
352
352
  ensureManagedApplicationRoute(options: ManagedApplicationRouteOptions): Promise<Connection>;
@@ -370,7 +370,7 @@ declare class Client {
370
370
  scope?: PeerScope;
371
371
  channelId?: string;
372
372
  timeoutMs?: number;
373
- respectManualDisconnect?: boolean;
373
+ keepManualDisconnect?: boolean;
374
374
  }): Promise<Connection>;
375
375
  clearManualDisconnectProjection(id: string): void;
376
376
  disconnectPeer(id: string, scope?: PeerScope): Promise<void>;
@@ -379,7 +379,7 @@ declare class Client {
379
379
  getTicket(): Promise<string>;
380
380
  getNodeId(): Promise<string>;
381
381
  getNodeIdFromTicket(ticket: string): Promise<string | null>;
382
- getEndpointTicketWithToken(grantScope: GrantScope, maxConnections?: number): Promise<string>;
382
+ getTicketWithToken(grantScope: GrantScope, maxConnections?: number): Promise<string>;
383
383
  buildCompoundTicketWithToken(irohTicket: string, grantScope: GrantScope, maxConnections?: number): string;
384
384
  setManagedPresenceTicket(ticket: string | null): void;
385
385
  clearManagedPresenceTicket(): void;
@@ -401,17 +401,17 @@ declare class Client {
401
401
  startPresence?: boolean;
402
402
  }): Promise<void>;
403
403
  stopListening(): void;
404
- forceReconnectSnapshot(): void;
404
+ forceReconnect(): void;
405
405
  wrapChannelWritable(writable: WritableStream<Uint8Array>, channelId: string, metadata?: Record<string, unknown> | null): WritableStream<Uint8Array>;
406
406
  updatePresence(isOnline?: boolean, ttlMs?: number, metadata?: string, ticketOverride?: string): Promise<void>;
407
407
  onConnection(callback: (conn: Connection) => void): () => void;
408
408
  onDisconnection(callback: (conn: Connection) => void): () => void;
409
409
  onMessage(callback: (conn: Connection, msg: any) => void): () => void;
410
- onIncomingStream(callback: (stream: IncomingStreamListenerEvent) => boolean | void): () => void;
410
+ onIncomingStream(callback: (stream: IncomingStreamEvent) => boolean | void): () => void;
411
411
  registerChannel(descriptor: ChannelDescriptor): void;
412
412
  unregisterChannel(channelId: string): void;
413
413
  listChannels(): ChannelDescriptor[];
414
- onIncomingChannelStream(channelId: string, callback: (stream: IncomingStreamListenerEvent) => boolean | void): () => void;
414
+ onChannelStream(channelId: string, callback: (stream: IncomingStreamEvent) => boolean | void): () => void;
415
415
  onRoomJoinRequest(callback: (request: JoinRequest) => void): () => void;
416
416
  isMoQDataReady(peerId: string | null): boolean;
417
417
  sendMoQData(peerId: string | null, data: Uint8Array, options?: {
@@ -426,13 +426,13 @@ declare class Client {
426
426
  * readiness, and channel orchestration remain in their existing managers until
427
427
  * those boundaries can be tightened independently.
428
428
  */
429
- declare class RuntimeConnectionController {
429
+ declare class ConnectionController {
430
430
  private readonly client;
431
431
  private readonly backend;
432
432
  private readonly onLifecycleMutation;
433
433
  constructor(client: Client, backend: ISignalingBackend | null, onLifecycleMutation?: () => void);
434
434
  connectToDevice(params: NativeConnectParams): Promise<NativeConnectResult>;
435
- connectRaw(target: RuntimeConnectionTarget): Promise<RuntimeRawConnection>;
435
+ connectRaw(target: ConnectionTarget): Promise<RawConnection>;
436
436
  openBi(nodeId: string): Promise<{
437
437
  readable: ReadableStream<Uint8Array>;
438
438
  writable: WritableStream<Uint8Array>;
@@ -441,7 +441,7 @@ declare class RuntimeConnectionController {
441
441
  isConnected(nodeId: string): Promise<boolean>;
442
442
  disconnectNode(nodeId: string): Promise<void>;
443
443
  disconnectDevice(deviceId: string): Promise<void>;
444
- setAutoConnectExcluded(deviceId: string, excluded: boolean): Promise<void>;
444
+ excludeAutoConnect(deviceId: string, excluded: boolean): Promise<void>;
445
445
  disconnectPeer(id: string, scope?: string): Promise<void>;
446
446
  forceDisconnectPeer(id: string): Promise<void>;
447
447
  private clearManualDisconnectProjection;
@@ -484,9 +484,9 @@ interface CorrelationFields {
484
484
  * the Phase 0 parser's primary regex set). Empty fields are dropped.
485
485
  * Exposed for tests.
486
486
  */
487
- declare function renderCorrelationFields(fields: CorrelationFields): string;
487
+ declare function renderCorrelation(fields: CorrelationFields): string;
488
488
  /** @deprecated Use correlationForScope() */
489
- declare function correlationForDriveGrantScope(scope: string, extra?: CorrelationFields): CorrelationFields;
489
+ declare function grantCorrelation(scope: string, extra?: CorrelationFields): CorrelationFields;
490
490
  /**
491
491
  * Phase 7 structured-log call. Emits a single `console.log` line of the
492
492
  * form `<tag> <fields> <message>` — the exact shape the Phase 0
@@ -505,7 +505,7 @@ declare function clog(tag: string, fields: CorrelationFields, message?: string,
505
505
  * Stack lines are tagged `[OpenRTC][teardown-trace:stack]`.
506
506
  * Native / Tauri: run with `PLUTO_RTC_TEARDOWN_TRACE=1` to log matching Rust iroh disconnect lines to stderr.
507
507
  */
508
- declare function logOpenRtcTeardownTrace(kind: string, details?: Record<string, unknown>): void;
508
+ declare function logTeardownTrace(kind: string, details?: Record<string, unknown>): void;
509
509
 
510
510
  declare function openRtcDebugEnabled(): boolean;
511
511
  declare function openRtcDebug(message: string, data?: unknown): void;
@@ -526,18 +526,18 @@ declare function openRtcDebugLog(message: string, data?: unknown): void;
526
526
  type ByteArray = Uint8Array<ArrayBuffer>;
527
527
  type ByteArrayLike = Uint8Array<ArrayBufferLike>;
528
528
 
529
- type RuntimeU32BEFrameHandler = (payload: ByteArray) => void;
530
- type RuntimeJsonFrameHandler<T = unknown> = (value: T, payload: ByteArray) => void;
531
- interface RuntimeJsonFrameDecoderOptions {
529
+ type U32FrameHandler = (payload: ByteArray) => void;
530
+ type JsonFrameHandler<T = unknown> = (value: T, payload: ByteArray) => void;
531
+ interface JsonDecoderOptions {
532
532
  onInvalidJson?: (error: unknown, payload: ByteArray) => void;
533
533
  }
534
- declare function encodeRuntimeU32BEFrame(payload: ByteArrayLike): ByteArray;
535
- declare function createRuntimeU32BEFrameDecoder(onFrame: RuntimeU32BEFrameHandler): (chunk: ByteArrayLike) => void;
536
- declare function encodeRuntimeJsonPayload(value: unknown): ByteArray;
537
- declare function decodeRuntimeJsonPayload<T = unknown>(payload: ByteArrayLike): T;
538
- declare function encodeRuntimeJsonFrame(value: unknown): ByteArray;
539
- declare function createRuntimeJsonFrameDecoder<T = unknown>(onValue: RuntimeJsonFrameHandler<T>, options?: RuntimeJsonFrameDecoderOptions): (chunk: ByteArrayLike) => void;
534
+ declare function encodeU32Frame(payload: ByteArrayLike): ByteArray;
535
+ declare function createU32Decoder(onFrame: U32FrameHandler): (chunk: ByteArrayLike) => void;
536
+ declare function encodeJsonPayload(value: unknown): ByteArray;
537
+ declare function decodeJsonPayload<T = unknown>(payload: ByteArrayLike): T;
538
+ declare function encodeJsonFrame(value: unknown): ByteArray;
539
+ declare function createJsonDecoder<T = unknown>(onValue: JsonFrameHandler<T>, options?: JsonDecoderOptions): (chunk: ByteArrayLike) => void;
540
540
  declare function concatRuntimeBytes(a: ByteArrayLike, b: ByteArrayLike): ByteArray;
541
541
  declare function readRuntimeU32BE(bytes: ByteArrayLike, offset: number): number;
542
542
 
543
- export { Connection, type CorrelationFields, type OpenRTCCapabilityRuntime, RuntimeCapabilities, RuntimeConnectionController, RuntimeConnectionTarget, type RuntimeJsonFrameDecoderOptions, type RuntimeJsonFrameHandler, RuntimeRawConnection, type RuntimeU32BEFrameHandler, clog, concatRuntimeBytes, correlationForDriveGrantScope, createRuntimeJsonFrameDecoder, createRuntimeU32BEFrameDecoder, decodeRuntimeJsonPayload, encodeRuntimeJsonFrame, encodeRuntimeJsonPayload, encodeRuntimeU32BEFrame, logOpenRtcTeardownTrace, openRtcDebug, openRtcDebugEnabled, openRtcDebugInfo, openRtcDebugLog, readRuntimeU32BE, renderCorrelationFields, runtimeForCapability as runtimeFromCapability };
543
+ export { type CapabilityRuntime, ConnectionController, ConnectionTarget, type CorrelationFields, type JsonDecoderOptions, type JsonFrameHandler, RawConnection, RuntimeCapabilities, type U32FrameHandler, clog, concatRuntimeBytes, createJsonDecoder, createU32Decoder, decodeJsonPayload, encodeJsonFrame, encodeJsonPayload, encodeU32Frame, grantCorrelation, logTeardownTrace, openRtcDebug, openRtcDebugEnabled, openRtcDebugInfo, openRtcDebugLog, readRuntimeU32BE, renderCorrelation, runtimeForCapability as runtimeFromCapability };
@@ -1 +1 @@
1
- export{a as runtimeFromCapability}from'../chunk-QCPSLUKO.js';import'../chunk-XPL7PUBW.js';export{a as isRuntimeDeviceActive,c as isRuntimeDeviceConnectable,b as isRuntimeDeviceRoutable}from'../chunk-CK6WQV7J.js';export{b as Connection,u as IpcRuntimeAdapter,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-5OTF7W2N.js';import'../chunk-LRT5GEGH.js';export{a as classifyNativeIpcFailure,b as isNativeIpcCommandUnavailable}from'../chunk-Z2WVSXPW.js';import'../chunk-DUY34MGT.js';import'../chunk-Y35AKFCM.js';export{s as BROWSER_WASM_RUNTIME_CAPABILITIES,t as NATIVE_IPC_RUNTIME_CAPABILITIES,q as OPENRTC_RUNTIME_POLICY,u as cloneRuntimeCapabilities,r as getRuntimePolicy,i as logOpenRtcTeardownTrace,v as runtimeCapabilitiesForBrowserHost,w as runtimeCapabilitiesFromNativeStatus,x as runtimeCapabilityProfile}from'../chunk-ZQF5KSOK.js';export{b as openRtcDebug,a as openRtcDebugEnabled,c as openRtcDebugInfo,d as openRtcDebugLog}from'../chunk-AG2F6MOB.js';import'../chunk-CWGKLGJZ.js';import'../chunk-KJTJLLJE.js';import'../chunk-45WBH7E3.js';import'../chunk-NRXEG5GQ.js';
1
+ export{a as runtimeFromCapability}from'../chunk-2IRNZN3N.js';import'../chunk-ZA44REGI.js';export{a as isDeviceActive,c as isDeviceConnectable,b as isDeviceRoutable}from'../chunk-CK6WQV7J.js';export{i as ConnectionActor,f as ConnectionActorError,j as ConnectionActors,b as ConnectionController,t as IpcRuntimeAdapter,s as RuntimeClient,e as clog,q as concatRuntimeBytes,g as connectionActorKey,h as connectionActorKeyString,p as createJsonDecoder,l as createU32Decoder,n as decodeJsonPayload,o as encodeJsonFrame,m as encodeJsonPayload,k as encodeU32Frame,d as grantCorrelation,r as readRuntimeU32BE,c as renderCorrelation}from'../chunk-UGZJJQPM.js';export{a as classifyIpcFailure,b as isIpcUnavailable}from'../chunk-HUG5AX7R.js';import'../chunk-DUY34MGT.js';import'../chunk-F4BJ72HN.js';export{s as BROWSER_CAPABILITIES,t as NATIVE_CAPABILITIES,q as RUNTIME_POLICY,v as browserCapabilities,x as capabilityProfile,u as cloneCapabilities,r as getRuntimePolicy,i as logTeardownTrace,w as statusCapabilities}from'../chunk-OUFHVLDQ.js';import'../chunk-AJQVMVYW.js';import'../chunk-NXM5ZGHD.js';import'../chunk-NRXEG5GQ.js';import'../chunk-FKEKINIM.js';export{b as openRtcDebug,a as openRtcDebugEnabled,c as openRtcDebugInfo,d as openRtcDebugLog}from'../chunk-SUWCBTBQ.js';import'../chunk-LN4ALFT6.js';
package/dist/testing.d.ts CHANGED
@@ -1,24 +1,24 @@
1
- import { h as CoordinationGatewayGrantRequest, i as CoordinationGatewayGrant } from './ITransport-UNOXiRJD.js';
2
- import { c as OpenRTCAttestationProvider, d as OpenRTCAuthProvider, e as OpenRTCBotVerificationProvider, j as OpenRTCDeviceProfile, O as OpenRTCOptions, a as OpenRTCClient } from './types-DhmY9hBy.js';
3
- import { P as PlutoIpcBridge } from './ipc-CflAVodw.js';
4
- import './OpenRTCShared.js';
5
- import './assembly-CLdwe5T-.js';
6
- import './types-l3m3GrOe.js';
7
- import './capabilities-BUe5YldR.js';
1
+ import { i as CoordinationGatewayGrantRequest, j as CoordinationGatewayGrant } from './ITransport-yaruAmx3.js';
2
+ import { A as AttestationProvider, a as AuthProvider, B as BotVerificationProvider, e as DeviceProfile, O as Options, C as Client } from './types-C4TIUgOJ.js';
3
+ import { P as PlutoIpcBridge } from './ipc-CPnNwv6f.js';
4
+ import './coreClient.js';
5
+ import './assembly-BTzwQuwI.js';
6
+ import './types-D67HlF0p.js';
7
+ import './capabilities-BwzPe51I.js';
8
8
 
9
- interface OpenRTCDeviceProof {
9
+ interface DeviceProof {
10
10
  publicKeyJwk: JsonWebKey;
11
11
  signature: string;
12
12
  nonce: string;
13
13
  issuedAt: number;
14
14
  }
15
- interface OpenRTCDeviceKey {
15
+ interface DeviceKey {
16
16
  readonly publicKeyJwk: JsonWebKey;
17
17
  readonly thumbprint: string;
18
- proof(challenge: (nonce: string, issuedAt: number) => string): Promise<OpenRTCDeviceProof>;
18
+ proof(challenge: (nonce: string, issuedAt: number) => string): Promise<DeviceProof>;
19
19
  }
20
- interface OpenRTCDeviceKeyProvider {
21
- getOrCreate(appTag: string): Promise<OpenRTCDeviceKey>;
20
+ interface DeviceKeyProvider {
21
+ getOrCreate(appTag: string): Promise<DeviceKey>;
22
22
  delete?(appTag: string): Promise<void>;
23
23
  /**
24
24
  * Optional platform-secure record storage. Native hosts use this for the
@@ -30,7 +30,7 @@ interface OpenRTCDeviceKeyProvider {
30
30
  deleteSecureRecord?(appTag: string, key: string): Promise<void>;
31
31
  }
32
32
 
33
- interface OpenRTCV2Endpoints {
33
+ interface Endpoints {
34
34
  controlPlane: string;
35
35
  gateway: string;
36
36
  }
@@ -60,12 +60,12 @@ interface AuthenticatedDeviceCertificate extends CachedDeviceCertificate {
60
60
  principalId: string;
61
61
  enrolled: boolean;
62
62
  }
63
- interface OpenRTCV2ControlPlaneEvents {
63
+ interface ControlPlaneEvents {
64
64
  beforeLogicalOperation?: (operation: string) => void;
65
65
  onLogicalOperation?: (operation: string) => void;
66
- onAuthEpochChanged?: (auth: OpenRTCAuthProvider) => void;
66
+ onAuthEpochChanged?: (auth: AuthProvider) => void;
67
67
  }
68
- declare class OpenRTCV2ControlPlane {
68
+ declare class ControlPlane {
69
69
  readonly apiKey: string;
70
70
  private readonly endpoints;
71
71
  private readonly keyProvider;
@@ -75,7 +75,7 @@ declare class OpenRTCV2ControlPlane {
75
75
  readonly appTag: string;
76
76
  private keyPromise;
77
77
  private readonly authEpochs;
78
- constructor(apiKey: string, endpoints: OpenRTCV2Endpoints, keyProvider: OpenRTCDeviceKeyProvider, attestation?: OpenRTCAttestationProvider | undefined, events?: OpenRTCV2ControlPlaneEvents, botVerification?: OpenRTCBotVerificationProvider | undefined);
78
+ constructor(apiKey: string, endpoints: Endpoints, keyProvider: DeviceKeyProvider, attestation?: AttestationProvider | undefined, events?: ControlPlaneEvents, botVerification?: BotVerificationProvider | undefined);
79
79
  private record;
80
80
  private before;
81
81
  private authEpoch;
@@ -83,7 +83,7 @@ declare class OpenRTCV2ControlPlane {
83
83
  private key;
84
84
  private post;
85
85
  capability(kind: 'space' | 'room' | 'ticket', id: string, maxPeers?: number, advancedFanout?: boolean): Promise<CredentialSource>;
86
- deviceCertificate(auth: OpenRTCAuthProvider, deviceId: string, avenue?: CoordinationGatewayGrantRequest['avenue'], profile?: OpenRTCDeviceProfile, rejected?: AuthenticatedDeviceCertificate): Promise<{
86
+ deviceCertificate(auth: AuthProvider, deviceId: string, avenue?: CoordinationGatewayGrantRequest['avenue'], profile?: DeviceProfile, rejected?: AuthenticatedDeviceCertificate): Promise<{
87
87
  source: CredentialSource;
88
88
  principalId: string;
89
89
  enrolled: boolean;
@@ -91,7 +91,7 @@ declare class OpenRTCV2ControlPlane {
91
91
  private resolveAuthenticatedDevice;
92
92
  private deviceCertificateResult;
93
93
  private enrollAuthenticatedDevice;
94
- listEnrolledDevices(auth: OpenRTCAuthProvider, deviceId: string): Promise<Array<{
94
+ listEnrolledDevices(auth: AuthProvider, deviceId: string): Promise<Array<{
95
95
  deviceId: string;
96
96
  name?: string;
97
97
  platform?: string;
@@ -99,15 +99,15 @@ declare class OpenRTCV2ControlPlane {
99
99
  lastGrantAtMs: number | null;
100
100
  current: boolean;
101
101
  }>>;
102
- revokeDevice(auth: OpenRTCAuthProvider, currentDeviceId: string, targetDeviceId: string): Promise<void>;
103
- revokeAllDevices(auth: OpenRTCAuthProvider, currentDeviceId: string, exceptCurrent: boolean): Promise<void>;
102
+ revokeDevice(auth: AuthProvider, currentDeviceId: string, targetDeviceId: string): Promise<void>;
103
+ revokeAllDevices(auth: AuthProvider, currentDeviceId: string, exceptCurrent: boolean): Promise<void>;
104
104
  private deleteDeviceKey;
105
105
  private deviceManagement;
106
106
  durableRoomMembership(source: CredentialSource, roomId: string, action: 'join' | 'leave'): Promise<void>;
107
107
  grantProvider(source: CredentialSource, input?: {
108
108
  maxPeers?: number;
109
109
  features?: Record<string, boolean>;
110
- deviceProfile?: Pick<OpenRTCDeviceProfile, 'name' | 'platform'>;
110
+ deviceProfile?: Pick<DeviceProfile, 'name' | 'platform'>;
111
111
  /**
112
112
  * Keeps the transport/admission credential relay synchronized
113
113
  * when a capability or device certificate is renewed in place.
@@ -122,12 +122,13 @@ declare class OpenRTCV2ControlPlane {
122
122
  }
123
123
 
124
124
  /** Focused control-plane factory for live harnesses that do not need a transport runtime. */
125
- declare function createTestingOpenRTCControlPlane(apiKey: string, endpoints: OpenRTCV2Endpoints, keyNamespace: string): OpenRTCV2ControlPlane;
126
- declare function createTestingOpenRTC(options: OpenRTCOptions, endpoints: OpenRTCV2Endpoints, testing?: {
125
+ declare function controlPlane(apiKey: string, endpoints: Endpoints, keyNamespace: string): ControlPlane;
126
+ declare function OpenRTC(options: Options, endpoints: Endpoints, testing?: {
127
127
  deviceId?: string;
128
128
  irohTestRelayUrl?: string;
129
- }): OpenRTCClient;
130
- /** Native equivalent for emulator and harness lanes; never import in product code. */
131
- declare function createTestingNativeOpenRTC(options: OpenRTCOptions, endpoints: OpenRTCV2Endpoints, bridge: PlutoIpcBridge): OpenRTCClient;
129
+ }): Client;
130
+ declare namespace OpenRTC {
131
+ var native: (options: Options, endpoints: Endpoints, bridge: PlutoIpcBridge) => Client;
132
+ }
132
133
 
133
- export { createTestingNativeOpenRTC, createTestingOpenRTC, createTestingOpenRTCControlPlane };
134
+ export { OpenRTC, controlPlane };
package/dist/testing.js CHANGED
@@ -1 +1 @@
1
- import {a}from'./chunk-IKZ33R7R.js';import {a as a$1}from'./chunk-7FPG3MFF.js';import {b as b$1}from'./chunk-VBUDERMM.js';import {b}from'./chunk-QCPSLUKO.js';import'./chunk-XPL7PUBW.js';import'./chunk-DUY34MGT.js';import'./chunk-NRXEG5GQ.js';function l(n){let r=e=>`${e}:${n}`;return {getOrCreate:e=>b$1.getOrCreate(r(e)),delete:async e=>{await b$1.delete?.(r(e));},readSecureRecord:(e,t)=>b$1.readSecureRecord?.(r(e),t)??Promise.resolve(null),writeSecureRecord:(e,t,i)=>b$1.writeSecureRecord?.(r(e),t,i)??Promise.resolve(),deleteSecureRecord:(e,t)=>b$1.deleteSecureRecord?.(r(e),t)??Promise.resolve()}}function C(n,r,e){return new a(n,r,l(e))}function R(n,r,e={}){return b(n,{endpoints:r,testingAllowInsecureLoopback:true,platform:"web",...e.deviceId?{deviceIdProvider:async()=>e.deviceId}:{},...e.irohTestRelayUrl?{irohTestRelayUrl:e.irohTestRelayUrl}:{},runtimeFactory:async t=>{let{createWasmClient:i}=await import('./runtime/factories.js');return i(t)}})}function m(n,r,e){return b(n,{endpoints:r,testingAllowInsecureLoopback:true,platform:"native",deviceKeyProvider:a$1(e),deviceIdProvider:async()=>{let t=await e.invoke("get_rtc_local_device_info");return String(t?.deviceId??"")},runtimeFactory:async t=>{let{createIpcClient:i}=await import('./ipcFactory-JTMNUTZI.js');return i(t,e)}})}export{m as createTestingNativeOpenRTC,R as createTestingOpenRTC,C as createTestingOpenRTCControlPlane};
1
+ import {a}from'./chunk-DI5VSZ2T.js';import {a as a$1}from'./chunk-BOS554IK.js';import {c}from'./chunk-4MLJXEVV.js';import {b}from'./chunk-2IRNZN3N.js';import'./chunk-ZA44REGI.js';import'./chunk-DUY34MGT.js';import'./chunk-NRXEG5GQ.js';function d(o){let r=e=>`${e}:${o}`;return {getOrCreate:e=>c.getOrCreate(r(e)),delete:async e=>{await c.delete?.(r(e));},readSecureRecord:(e,t)=>c.readSecureRecord?.(r(e),t)??Promise.resolve(null),writeSecureRecord:(e,t,n)=>c.writeSecureRecord?.(r(e),t,n)??Promise.resolve(),deleteSecureRecord:(e,t)=>c.deleteSecureRecord?.(r(e),t)??Promise.resolve()}}function y(o,r,e){return new a(o,r,d(e))}function s(o,r,e={}){return b(o,{endpoints:r,testingAllowInsecureLoopback:true,platform:"web",...e.deviceId?{deviceIdProvider:async()=>e.deviceId}:{},...e.irohTestRelayUrl?{irohTestRelayUrl:e.irohTestRelayUrl}:{},runtimeFactory:async t=>{let{createWasmClient:n}=await import('./runtime/factories.js');return n(t)}})}s.native=function(o,r,e){return b(o,{endpoints:r,testingAllowInsecureLoopback:true,platform:"native",deviceKeyProvider:a$1(e),deviceIdProvider:async()=>{let t=await e.invoke("get_rtc_local_device_info");return String(t?.deviceId??"")},runtimeFactory:async t=>{let{createIpcClient:n}=await import('./ipcFactory-DQFK65VE.js');return n(t,e)}})};export{s as OpenRTC,y as controlPlane};
@@ -1,13 +1,13 @@
1
- import { c as ProtocolName, $ as RouteDescriptor, J as ITransport, a0 as ProtocolCapability, a1 as ProtocolCapabilityMap, y as ApplicationPayloadCrypto, a2 as ApplicationCryptoStreamTools } from '../ITransport-UNOXiRJD.js';
2
- export { a3 as ApplicationCryptoBiStream, a4 as RouteFamily, a5 as RouteImplementationKind } from '../ITransport-UNOXiRJD.js';
1
+ import { c as ProtocolName, $ as RouteDescriptor, K as ITransport, a0 as ProtocolCapability, a1 as ProtocolCapabilityMap, z as PayloadCrypto, a2 as CryptoStreams } from '../ITransport-yaruAmx3.js';
2
+ export { a3 as CryptoBiStream, a4 as RouteFamily, a5 as RouteKind } from '../ITransport-yaruAmx3.js';
3
3
 
4
4
  declare const TRANSPORT_LABELS: readonly ProtocolName[];
5
- declare function normalizeTransportLabel(value: unknown): ProtocolName | undefined;
6
- declare function isIrohBaseTransportLabel(value: unknown): boolean;
7
- declare function isDirectIrohTransportLabel(value: unknown): boolean;
8
- declare function isOptionalTransportLabel(value: unknown): boolean;
9
- declare function isWebRtcTransportLabel(value: unknown): boolean;
10
- declare function isIndependentTransportLabel(value: unknown): boolean;
5
+ declare function normalizeTransport(value: unknown): ProtocolName | undefined;
6
+ declare function isBaseIroh(value: unknown): boolean;
7
+ declare function isDirectIroh(value: unknown): boolean;
8
+ declare function isOptionalTransport(value: unknown): boolean;
9
+ declare function isWebRtc(value: unknown): boolean;
10
+ declare function isIndependent(value: unknown): boolean;
11
11
 
12
12
  declare const ROUTE_DESCRIPTORS: readonly RouteDescriptor[];
13
13
  declare function getRouteDescriptor(id: ProtocolName): RouteDescriptor;
@@ -19,37 +19,37 @@ declare class TransportFactory {
19
19
  static createTransport(name: ProtocolName): ITransport;
20
20
  static getProtocolCapability(name: ProtocolName): ProtocolCapability;
21
21
  static getProtocolCapabilities(): ProtocolCapabilityMap;
22
- static getPreferredProtocolOrder(options?: {
22
+ static preferredProtocols(options?: {
23
23
  runtime?: 'browser' | 'native' | 'any';
24
24
  includePathLabels?: boolean;
25
25
  }): ProtocolName[];
26
26
  static assertProtocolAvailable(name: ProtocolName): void;
27
27
  }
28
- declare function getPreferredProtocolOrder(options?: Parameters<typeof TransportFactory.getPreferredProtocolOrder>[0]): ProtocolName[];
28
+ declare function preferredProtocols(options?: Parameters<typeof TransportFactory.preferredProtocols>[0]): ProtocolName[];
29
29
 
30
- declare function isApplicationEncryptedPayload(payload: Uint8Array): boolean;
31
- declare function createSharedSecretApplicationCrypto(key: Uint8Array, options?: {
30
+ declare function isEncryptedPayload(payload: Uint8Array): boolean;
31
+ declare function createSharedCrypto(key: Uint8Array, options?: {
32
32
  requireEncrypted?: boolean;
33
33
  randomBytes?: (byteLength: number) => Uint8Array;
34
34
  replayProtection?: boolean;
35
- }): ApplicationPayloadCrypto;
36
- declare function createApplicationCryptoStreamTools(crypto: ApplicationPayloadCrypto, options?: {
35
+ }): PayloadCrypto;
36
+ declare function createCryptoStreams(crypto: PayloadCrypto, options?: {
37
37
  typeId?: number;
38
38
  maxFrameBytes?: number;
39
- }): ApplicationCryptoStreamTools;
39
+ }): CryptoStreams;
40
40
 
41
- declare const KEY_AGREEMENT_PUBLIC_KEY_BYTES = 32;
42
- declare const KEY_AGREEMENT_ALGORITHM = "openrtc:x25519-hkdf:v1";
43
- interface ApplicationKeyAgreementPayload {
44
- algorithm: typeof KEY_AGREEMENT_ALGORITHM;
41
+ declare const PUBLIC_KEY_BYTES = 32;
42
+ declare const KEY_ALGORITHM = "openrtc:x25519-hkdf:v1";
43
+ interface KeyAgreementPayload {
44
+ algorithm: typeof KEY_ALGORITHM;
45
45
  publicKey: string;
46
46
  }
47
- interface EphemeralKeyAgreement {
47
+ interface KeyAgreement {
48
48
  publicKey: Uint8Array;
49
49
  secretKey: Uint8Array;
50
50
  }
51
- declare function generateEphemeralKeyAgreement(randomBytes?: (byteLength: number) => Uint8Array): EphemeralKeyAgreement;
52
- declare function deriveApplicationCryptoKey(localSecretKey: Uint8Array, remotePublicKey: Uint8Array, localNodeId: string, remoteNodeId: string): Uint8Array;
53
- declare function encodeApplicationKeyAgreementPayload(publicKey: Uint8Array): ApplicationKeyAgreementPayload;
51
+ declare function createKeyAgreement(randomBytes?: (byteLength: number) => Uint8Array): KeyAgreement;
52
+ declare function deriveCryptoKey(localSecretKey: Uint8Array, remotePublicKey: Uint8Array, localNodeId: string, remoteNodeId: string): Uint8Array;
53
+ declare function encodeKeyAgreement(publicKey: Uint8Array): KeyAgreementPayload;
54
54
 
55
- 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 };
55
+ export { CryptoStreams, KEY_ALGORITHM, type KeyAgreementPayload, PUBLIC_KEY_BYTES, PayloadCrypto, ProtocolName, ROUTE_DESCRIPTORS, RouteDescriptor, TRANSPORT_LABELS, createCryptoStreams, createKeyAgreement, createSharedCrypto, deriveCryptoKey, encodeKeyAgreement, getRouteDescriptor, isBaseIroh, isDirectIroh, isEncryptedPayload, isIndependent, isOptionalTransport, isWebRtc, listRouteDescriptors, normalizeTransport, preferredProtocols };
@@ -1 +1 @@
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-LRT5GEGH.js';export{o as TRANSPORT_LABELS,z as createApplicationCryptoStreamTools,y as createSharedSecretApplicationCrypto,x as isApplicationEncryptedPayload,r as isDirectIrohTransportLabel,w as isIndependentTransportLabel,q as isIrohBaseTransportLabel,s as isOptionalTransportLabel,t as isWebRtcTransportLabel,p as normalizeTransportLabel}from'../chunk-AG2F6MOB.js';export{a as ROUTE_DESCRIPTORS,e as getRouteDescriptor,f as listRouteDescriptors}from'../chunk-45WBH7E3.js';
1
+ export{e as KEY_ALGORITHM,d as PUBLIC_KEY_BYTES,f as createKeyAgreement,g as deriveCryptoKey,i as encodeKeyAgreement,c as preferredProtocols}from'../chunk-FKEKINIM.js';export{o as TRANSPORT_LABELS,z as createCryptoStreams,y as createSharedCrypto,q as isBaseIroh,r as isDirectIroh,x as isEncryptedPayload,w as isIndependent,s as isOptionalTransport,t as isWebRtc,p as normalizeTransport}from'../chunk-SUWCBTBQ.js';export{a as ROUTE_DESCRIPTORS,e as getRouteDescriptor,f as listRouteDescriptors}from'../chunk-LN4ALFT6.js';