openrtc 1.0.4 → 1.0.6
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 +12 -4
- package/dist/{DelegatingRuntimeAdapter-D2_dgabz.d.ts → DelegatingRuntimeAdapter-DlC0TZB0.d.ts} +3 -102
- package/dist/DelegatingRuntimeAdapter-lFDUNBy9.d.ts +120 -0
- package/dist/OpenRTCShared-BvTf2gFH.d.ts +249 -0
- package/dist/{framing-rPdckqn5.d.ts → assembly-BH-ZekkH.d.ts} +4 -46
- package/dist/assembly-C2G0P2L5.d.ts +718 -0
- package/dist/auth/index.js +1 -1
- package/dist/auth/internal.js +1 -1
- package/dist/capabilities-C4Dqs_pB.d.ts +101 -0
- package/dist/chunk-4AXAWVC6.js +2 -0
- package/dist/chunk-7352ZIXN.js +3 -0
- package/dist/chunk-DI5IPRPM.js +2 -0
- package/dist/{chunk-34LATQZZ.js → chunk-HVTYSEU7.js} +1 -1
- package/dist/chunk-MNI6JGR2.js +1 -0
- package/dist/{chunk-RRCARL4S.js → chunk-N6UBUNGC.js} +1 -1
- package/dist/chunk-SJ5BFL6W.js +2 -0
- package/dist/chunk-WUREK3SW.js +1 -0
- package/dist/chunk-YTUWXCRO.js +1 -0
- package/dist/framing-zRvEKOld.d.ts +29 -0
- package/dist/index.d.ts +18 -308
- package/dist/index.js +1 -2
- package/dist/ipc-CflAVodw.d.ts +11 -0
- package/dist/native.d.ts +20 -0
- package/dist/native.js +1 -0
- package/dist/runtime/WasmRuntimeAdapter.d.ts +3 -2
- package/dist/runtime/WasmRuntimeAdapter.js +1 -1
- package/dist/runtime/device-status.d.ts +37 -2
- package/dist/runtime/index.d.ts +28 -11
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/tauri.d.ts +5 -19
- package/dist/runtime/tauri.js +1 -1
- package/dist/spaceTokens-3sbs1mUF.d.ts +297 -0
- package/dist/tauri-BVSxK0jq.d.ts +33 -0
- package/dist/tauri-WEvOC_Z6.d.ts +33 -0
- package/dist/transport/index.d.ts +2 -2
- package/dist/{types-ByZyADCn.d.ts → types-BCkKK8dy.d.ts} +1 -1
- package/dist/{device-status-CR27Ak7c.d.ts → types-N9s66nF8.d.ts} +3 -36
- package/dist/types-QMj23Nvm.d.ts +573 -0
- package/dist/types-ZDsZknDI.d.ts +937 -0
- package/package.json +7 -2
- package/dist/IpcRuntimeAdapter-B8rkqNrq.d.ts +0 -28
- package/dist/chunk-BGQX25BO.js +0 -1
- package/dist/chunk-L6OUJ6YN.js +0 -2
- package/dist/chunk-MESPJTUA.js +0 -1
- package/dist/chunk-NCRP5ODV.js +0 -3
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure byte / stream / timing helpers.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from the `Client` god object (see
|
|
5
|
+
* `docs/plans/client-ts-decomposition.md` Phase 1). These functions are
|
|
6
|
+
* deliberately pure — no `Client` state, no `this`, no logging side effects — so
|
|
7
|
+
* the same helper is reused everywhere instead of being re-implemented inline
|
|
8
|
+
* (e.g. `concatBytes` previously existed both here and in `applicationCrypto.ts`,
|
|
9
|
+
* and three near-identical exponential-backoff helpers existed across the class).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
type ByteArray = Uint8Array<ArrayBuffer>;
|
|
13
|
+
type ByteArrayLike = Uint8Array<ArrayBufferLike>;
|
|
14
|
+
|
|
15
|
+
type RuntimeU32BEFrameHandler = (payload: ByteArray) => void;
|
|
16
|
+
type RuntimeJsonFrameHandler<T = unknown> = (value: T, payload: ByteArray) => void;
|
|
17
|
+
interface RuntimeJsonFrameDecoderOptions {
|
|
18
|
+
onInvalidJson?: (error: unknown, payload: ByteArray) => void;
|
|
19
|
+
}
|
|
20
|
+
declare function encodeRuntimeU32BEFrame(payload: ByteArrayLike): ByteArray;
|
|
21
|
+
declare function createRuntimeU32BEFrameDecoder(onFrame: RuntimeU32BEFrameHandler): (chunk: ByteArrayLike) => void;
|
|
22
|
+
declare function encodeRuntimeJsonPayload(value: unknown): ByteArray;
|
|
23
|
+
declare function decodeRuntimeJsonPayload<T = unknown>(payload: ByteArrayLike): T;
|
|
24
|
+
declare function encodeRuntimeJsonFrame(value: unknown): ByteArray;
|
|
25
|
+
declare function createRuntimeJsonFrameDecoder<T = unknown>(onValue: RuntimeJsonFrameHandler<T>, options?: RuntimeJsonFrameDecoderOptions): (chunk: ByteArrayLike) => void;
|
|
26
|
+
declare function concatRuntimeBytes(a: ByteArrayLike, b: ByteArrayLike): ByteArray;
|
|
27
|
+
declare function readRuntimeU32BE(bytes: ByteArrayLike, offset: number): number;
|
|
28
|
+
|
|
29
|
+
export { type RuntimeJsonFrameHandler as R, type RuntimeU32BEFrameHandler as a, createRuntimeU32BEFrameDecoder as b, createRuntimeJsonFrameDecoder as c, decodeRuntimeJsonPayload as d, encodeRuntimeJsonFrame as e, encodeRuntimeJsonPayload as f, encodeRuntimeU32BEFrame as g, type RuntimeJsonFrameDecoderOptions as h, concatRuntimeBytes as i, readRuntimeU32BE as r };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,269 +1,27 @@
|
|
|
1
|
-
import { R as
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
export {
|
|
8
|
-
import { P as PlutoIpcBridge } from './IpcRuntimeAdapter-B8rkqNrq.js';
|
|
9
|
-
import { R as RuntimeCapabilities, a as RuntimeCapabilityProfile } from './DelegatingRuntimeAdapter-D2_dgabz.js';
|
|
10
|
-
export { b as RuntimeAdapterKind } from './DelegatingRuntimeAdapter-D2_dgabz.js';
|
|
1
|
+
import { R as RuntimeClientOptions, I as ITransport } from './types-N9s66nF8.js';
|
|
2
|
+
export { w as ChannelDescriptor, x as ConnectionEvent, y as ConnectionTarget, D as DeviceProfile, z as IncomingStream, P as PeerConnectOptions, A as PeerReadiness, B as PeerStreamOptions, E as PresenceLoopOptions, F as RawConnection, t as RuntimeApplicationPayloadReadinessOptions, G as RuntimeAuthContext, H as RuntimeAuthIdentity, J as RuntimeAutoConnectPolicy, l as RuntimeChannelDescriptor, u as RuntimeConnectionEvent, s as RuntimeConnectionStateSnapshot, K as RuntimeConnectionTarget, c as RuntimeDevice, e as RuntimeDeviceConnectOptions, L as RuntimeDevicePresenceStatus, M as RuntimeDeviceStatus, d as RuntimeDeviceStatusSnapshot, n as RuntimeIncomingStream, q as RuntimeJoinRoomOptions, f as RuntimeLocalDeviceInfo, g as RuntimeLocalDeviceProfile, N as RuntimeLogicalChannelFraming, b as RuntimeManagedSession, O as RuntimeManagedSessionKind, a as RuntimeManagedSessionOptions, Q as RuntimeManagedSessionPlatform, i as RuntimePeerConnectOptions, k as RuntimePeerHealth, S as RuntimePeerLifecycleStatus, j as RuntimePeerReadinessSnapshot, T as RuntimePeerScope, U as RuntimePeerSessionSnapshot, h as RuntimePeerState, m as RuntimePeerStreamOptions, V as RuntimePresenceLoopOptions, W as RuntimePresencePolicy, v as RuntimeRawConnection, r as RuntimeRoomMember, o as RuntimeScopedChannelOptions, p as RuntimeScopedLogicalChannel, X as RuntimeSession, Y as RuntimeUiConnectionStatus, Z as ScopedChannelOptions, _ as ScopedLogicalChannel } from './types-N9s66nF8.js';
|
|
3
|
+
import { P as PlutoIpcBridge } from './ipc-CflAVodw.js';
|
|
4
|
+
import { O as OpenRTCClient } from './spaceTokens-3sbs1mUF.js';
|
|
5
|
+
export { E as EnableSpaceAuthResponse, M as MintSpaceTokenRequest, a as MintSpaceTokenResponse, b as OpenRTCChannelConnectOptions, c as OpenRTCDeviceNamespace, d as OpenRTCDeviceSessionOptions, e as OpenRTCRoomNamespace, f as OpenRTCTicketNamespace, g as createPublicSpaceTokenProvider, h as createSpaceTokenProvider, i as enableSpaceAuth, m as mintSpaceToken, s as sandboxSpaceKey, j as spaceToken } from './spaceTokens-3sbs1mUF.js';
|
|
6
|
+
import { u as ProtocolName, U as ProtocolCapability, V as ProtocolCapabilityMap, r as ApplicationPayloadCrypto, W as ApplicationCryptoStreamTools } from './types-ZDsZknDI.js';
|
|
7
|
+
export { X as AppLimits, Y as ApplicationCryptoBiStream, s as ApplicationPayloadReadinessOptions, t as ApplicationPayloadRouteOptions, v as ApplicationPayloadSendOptions, A as AuthMode, O as DevicePresenceStatus, D as DiscoveryMode, G as GrantScope, Z as ProtocolBaseName, _ as ProtocolImplementationKind, $ as ProtocolLocality, a0 as RouteDescriptor, a1 as RouteFamily, a2 as RouteImplementationKind, d as SignalingMode, S as SpaceAuthMode, a as SpaceTokenProvider } from './types-ZDsZknDI.js';
|
|
11
8
|
export { ROUTE_DESCRIPTORS, TRANSPORT_LABELS, getRouteDescriptor, isDirectIrohTransportLabel, isIndependentTransportLabel, isIrohBaseTransportLabel, isOptionalTransportLabel, isWebRtcTransportLabel, listRouteDescriptors, normalizeTransportLabel } from './transport/index.js';
|
|
12
|
-
|
|
9
|
+
export { isRuntimeDeviceActive, isRuntimeDeviceConnectable, isRuntimeDeviceRoutable } from './runtime/device-status.js';
|
|
10
|
+
export { R as RuntimeJsonFrameHandler, a as RuntimeU32BEFrameHandler, c as createRuntimeJsonFrameDecoder, b as createRuntimeU32BEFrameDecoder, d as decodeRuntimeJsonPayload, e as encodeRuntimeJsonFrame, f as encodeRuntimeJsonPayload, g as encodeRuntimeU32BEFrame } from './framing-zRvEKOld.js';
|
|
11
|
+
export { O as OPENRTC_RUNTIME_POLICY, a as RuntimePolicySnapshot, S as ScopedSession, c as Session, d as SessionOptions, g as getRuntimePolicy } from './assembly-C2G0P2L5.js';
|
|
12
|
+
export { b as RuntimeAdapterKind, R as RuntimeCapabilities } from './capabilities-C4Dqs_pB.js';
|
|
13
|
+
import './IEngineBridge-C7OT2CRv.js';
|
|
13
14
|
|
|
14
|
-
type OpenRTCChannelConnectOptions = Omit<RuntimeScopedChannelOptions, 'scope' | 'deviceId' | 'ticket'> & {
|
|
15
|
-
/**
|
|
16
|
-
* Device selected from `client.devices.*`. Passing the device object lets
|
|
17
|
-
* OpenRTC reuse its current ticket for native and ticket-gated routes.
|
|
18
|
-
*/
|
|
19
|
-
device?: string | RuntimeDevice;
|
|
20
|
-
deviceId?: string | null;
|
|
21
|
-
ticket?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Logical channel lifecycle scope. Most app channels should use the default
|
|
24
|
-
* `session`; pass a custom scope only when you intentionally manage peer
|
|
25
|
-
* lifecycle separately from the channel.
|
|
26
|
-
*/
|
|
27
|
-
scope?: RuntimeScopedChannelOptions['scope'];
|
|
28
|
-
};
|
|
29
|
-
type OpenRTCDeviceSessionOptions = Omit<RuntimeManagedSessionOptions, 'platform'> & {
|
|
30
|
-
/**
|
|
31
|
-
* Runtime host for the managed user-device session. Normal apps can omit
|
|
32
|
-
* this: `OpenRTC(...)` defaults to `web`, and `OpenRTC.native(...)` defaults
|
|
33
|
-
* to `native`.
|
|
34
|
-
*/
|
|
35
|
-
platform?: RuntimeManagedSessionOptions['platform'];
|
|
36
|
-
};
|
|
37
|
-
interface OpenRTCDeviceNamespace {
|
|
38
|
-
startSession(options?: OpenRTCDeviceSessionOptions): Promise<RuntimeManagedSession>;
|
|
39
|
-
stopSession(options?: {
|
|
40
|
-
preserveBackendSession?: boolean;
|
|
41
|
-
}): Promise<void>;
|
|
42
|
-
list(): Promise<RuntimeDevice[]>;
|
|
43
|
-
listWithStatus(): Promise<RuntimeDeviceStatusSnapshot[]>;
|
|
44
|
-
watch(callback: (devices: RuntimeDevice[]) => void): () => void;
|
|
45
|
-
watchWithStatus(callback: (devices: RuntimeDeviceStatusSnapshot[]) => void): () => void;
|
|
46
|
-
connect(device: string | RuntimeDevice, options?: RuntimeDeviceConnectOptions): Promise<ConnectDeviceResult>;
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated Use `devices.connect()`. Retry and route recovery are owned by
|
|
49
|
-
* OpenRTC; legacy consumer-provided connection hooks are ignored.
|
|
50
|
-
*/
|
|
51
|
-
connectWithRetry(device: string | RuntimeDevice, hooks: ConnectDeviceHooks, options: ConnectDeviceOptions): Promise<ConnectDeviceResult>;
|
|
52
|
-
disconnect(deviceId: string): Promise<void>;
|
|
53
|
-
update(deviceId: string, updates: {
|
|
54
|
-
deviceName?: string;
|
|
55
|
-
capabilities?: RuntimeDevice['capabilities'];
|
|
56
|
-
metadata?: string;
|
|
57
|
-
}): Promise<void>;
|
|
58
|
-
delete(deviceId: string): Promise<void>;
|
|
59
|
-
localId(): Promise<string | null>;
|
|
60
|
-
localInfo(): Promise<RuntimeLocalDeviceInfo | null>;
|
|
61
|
-
localProfile(options?: {
|
|
62
|
-
deviceName?: string;
|
|
63
|
-
localDeviceId?: string | null;
|
|
64
|
-
platform?: 'native' | 'web';
|
|
65
|
-
userId?: string | null;
|
|
66
|
-
}): Promise<RuntimeLocalDeviceProfile>;
|
|
67
|
-
updateLocalName(deviceName: string): Promise<RuntimeLocalDeviceInfo | null>;
|
|
68
|
-
}
|
|
69
|
-
interface OpenRTCPeerNamespace {
|
|
70
|
-
watch(callback: (peers: RuntimePeerState[]) => void): () => void;
|
|
71
|
-
watchLifecycle(callback: (peers: RuntimePeerState[]) => void): () => void;
|
|
72
|
-
get(id: string): RuntimePeerState | undefined;
|
|
73
|
-
listConnected(): RuntimePeerState[];
|
|
74
|
-
connect(options: RuntimePeerConnectOptions): Promise<Connection>;
|
|
75
|
-
disconnect(id: string, scope?: string): Promise<void>;
|
|
76
|
-
forceDisconnect(id: string): Promise<void>;
|
|
77
|
-
session(id: string): Promise<PeerSessionSnapshot | null>;
|
|
78
|
-
sessions(): Promise<PeerSessionSnapshot[]>;
|
|
79
|
-
waitConnected(id: string, timeoutMs?: number): Promise<PeerSessionSnapshot | null>;
|
|
80
|
-
readiness(id: string, timeoutMs?: number): Promise<RuntimePeerReadinessSnapshot>;
|
|
81
|
-
health(id: string): Promise<RuntimePeerHealth>;
|
|
82
|
-
identity(id: string): Promise<ResolvedPeerIdentity>;
|
|
83
|
-
addScope(id: string, scope?: string): RuntimePeerState | undefined;
|
|
84
|
-
releaseScope(id: string, scope?: string): RuntimePeerState | undefined;
|
|
85
|
-
scopes(id: string): string[];
|
|
86
|
-
refresh(): Promise<RuntimePeerState[]>;
|
|
87
|
-
}
|
|
88
|
-
interface OpenRTCChannelNamespace {
|
|
89
|
-
register(descriptor: RuntimeChannelDescriptor): void;
|
|
90
|
-
unregister(channelId: string): void;
|
|
91
|
-
list(): RuntimeChannelDescriptor[];
|
|
92
|
-
openBi(id: string, channelId: string, options?: Omit<RuntimePeerStreamOptions, 'channelId'>): Promise<{
|
|
93
|
-
connection: Connection;
|
|
94
|
-
readable: ReadableStream<Uint8Array>;
|
|
95
|
-
writable: WritableStream<Uint8Array>;
|
|
96
|
-
}>;
|
|
97
|
-
openUni(id: string, channelId: string, options?: Omit<RuntimePeerStreamOptions, 'channelId'>): Promise<{
|
|
98
|
-
connection: Connection;
|
|
99
|
-
writable: WritableStream<Uint8Array>;
|
|
100
|
-
}>;
|
|
101
|
-
onIncoming(callback: (stream: RuntimeIncomingStream) => boolean | void): () => void;
|
|
102
|
-
onIncomingChannel(channelId: string, callback: (stream: RuntimeIncomingStream & {
|
|
103
|
-
channel: NonNullable<RuntimeIncomingStream['channel']>;
|
|
104
|
-
}) => boolean | void): () => void;
|
|
105
|
-
connect(options: OpenRTCChannelConnectOptions): Promise<RuntimeScopedLogicalChannel>;
|
|
106
|
-
connectScoped(options: RuntimeScopedChannelOptions): Promise<RuntimeScopedLogicalChannel>;
|
|
107
|
-
}
|
|
108
|
-
interface OpenRTCRoomNamespace {
|
|
109
|
-
create(roomId?: string): Promise<string>;
|
|
110
|
-
join(roomId: string, options?: RuntimeJoinRoomOptions): Promise<Connection[]>;
|
|
111
|
-
leave(roomId: string): Promise<void>;
|
|
112
|
-
watch(roomId: string, callback: (members: RuntimeRoomMember[]) => void): () => void;
|
|
113
|
-
members(roomId: string): Promise<RuntimeRoomMember[]>;
|
|
114
|
-
}
|
|
115
|
-
interface OpenRTCTicketNamespace {
|
|
116
|
-
raw(): Promise<string>;
|
|
117
|
-
share(options?: {
|
|
118
|
-
maxConnections?: number;
|
|
119
|
-
}): Promise<string>;
|
|
120
|
-
grant(scope: GrantScope, options?: {
|
|
121
|
-
maxConnections?: number;
|
|
122
|
-
}): Promise<string>;
|
|
123
|
-
revoke(scope: GrantScope): Promise<string[]>;
|
|
124
|
-
}
|
|
125
|
-
interface OpenRTCDiagnosticsNamespace {
|
|
126
|
-
status(): Promise<{
|
|
127
|
-
runtime: 'tauri' | 'browser' | 'unknown';
|
|
128
|
-
wasmLoaded: boolean;
|
|
129
|
-
localNodeId?: string;
|
|
130
|
-
userId?: string;
|
|
131
|
-
}>;
|
|
132
|
-
policy(): RuntimePolicySnapshot;
|
|
133
|
-
capabilities(): RuntimeCapabilities;
|
|
134
|
-
capabilityProfile(): RuntimeCapabilityProfile;
|
|
135
|
-
connectionStates(): Promise<RuntimeConnectionStateSnapshot[]>;
|
|
136
|
-
onConnectionStateChange(callback: (state: RuntimeConnectionStateSnapshot) => void): Promise<() => void> | (() => void);
|
|
137
|
-
connections(): Connection[];
|
|
138
|
-
applicationReadyConnections(options?: RuntimeApplicationPayloadReadinessOptions): Connection[];
|
|
139
|
-
onConnection(callback: (connection: Connection) => void): () => void;
|
|
140
|
-
onDisconnection(callback: (connection: Connection) => void): () => void;
|
|
141
|
-
onConnectionEvent(callback: (event: RuntimeConnectionEvent) => void): () => void;
|
|
142
|
-
forceReconnectSnapshot(): void;
|
|
143
|
-
peerReconciliation(): Readonly<PeerReconciliationStats>;
|
|
144
|
-
}
|
|
145
|
-
interface OpenRTCAdvancedNamespace {
|
|
146
|
-
readonly runtime: RuntimeClient;
|
|
147
|
-
readonly assembly: PlutoRuntimeAssembly;
|
|
148
|
-
nodeId(): Promise<string>;
|
|
149
|
-
nodeIdFromTicket(ticket: string): Promise<string | null>;
|
|
150
|
-
endpointTicket(): Promise<string>;
|
|
151
|
-
connectRaw(target: {
|
|
152
|
-
ticket: string;
|
|
153
|
-
timeoutMs?: number;
|
|
154
|
-
}): Promise<RuntimeRawConnection>;
|
|
155
|
-
openBi(nodeId: string): Promise<{
|
|
156
|
-
readable: ReadableStream<Uint8Array>;
|
|
157
|
-
writable: WritableStream<Uint8Array>;
|
|
158
|
-
}>;
|
|
159
|
-
openUni(nodeId: string): Promise<WritableStream<Uint8Array>>;
|
|
160
|
-
isConnected(nodeId: string): Promise<boolean>;
|
|
161
|
-
disconnectNode(nodeId: string): Promise<void>;
|
|
162
|
-
setAutoConnectExcluded(deviceId: string, excluded: boolean): Promise<void>;
|
|
163
|
-
notifyNetworkChange(reason?: string): Promise<void>;
|
|
164
|
-
}
|
|
165
15
|
/**
|
|
166
|
-
*
|
|
167
|
-
* previously only available on PlutoRuntimeAssembly.
|
|
16
|
+
* OpenRTC developer-facing browser entrypoint and compatibility native factory.
|
|
168
17
|
*
|
|
169
|
-
*
|
|
18
|
+
* Native-only applications should import `createNativeOpenRTC` from
|
|
19
|
+
* `openrtc/native` so their webview bundle does not carry the browser WASM
|
|
20
|
+
* runtime.
|
|
170
21
|
*/
|
|
171
|
-
|
|
172
|
-
readonly devices: OpenRTCDeviceNamespace;
|
|
173
|
-
readonly peers: OpenRTCPeerNamespace;
|
|
174
|
-
readonly channels: OpenRTCChannelNamespace;
|
|
175
|
-
readonly rooms: OpenRTCRoomNamespace;
|
|
176
|
-
readonly tickets: OpenRTCTicketNamespace;
|
|
177
|
-
readonly diagnostics: OpenRTCDiagnosticsNamespace;
|
|
178
|
-
readonly advanced: OpenRTCAdvancedNamespace;
|
|
179
|
-
/** @deprecated Use setAuth() instead */
|
|
180
|
-
setAuthContext(context: AuthContext | null): Promise<void>;
|
|
181
|
-
/** Set auth context for the runtime */
|
|
182
|
-
setAuth(context: AuthContext | null): Promise<void>;
|
|
183
|
-
/** Sync Pluto-hosted auth to the runtime */
|
|
184
|
-
syncPlutoAuth(options?: {
|
|
185
|
-
userId?: string | null;
|
|
186
|
-
forceRefresh?: boolean;
|
|
187
|
-
}): Promise<void>;
|
|
188
|
-
/** Bind Pluto auth host to auto-sync on token changes */
|
|
189
|
-
bindPlutoAuthHost(): () => void;
|
|
190
|
-
/** Sign in via Pluto SSO */
|
|
191
|
-
signIn(): Promise<void>;
|
|
192
|
-
/** Sign out and clear auth context */
|
|
193
|
-
signOut(): Promise<void>;
|
|
194
|
-
/**
|
|
195
|
-
* @deprecated Use `client.devices.startSession(...)` for the public
|
|
196
|
-
* user-device avenue lifecycle. This top-level method remains for
|
|
197
|
-
* RuntimeClient compatibility and advanced integrations.
|
|
198
|
-
*/
|
|
199
|
-
startManagedSession(options: RuntimeManagedSessionOptions): Promise<RuntimeManagedSession>;
|
|
200
|
-
/**
|
|
201
|
-
* @deprecated Use `client.devices.stopSession(...)` for the public
|
|
202
|
-
* user-device avenue lifecycle.
|
|
203
|
-
*/
|
|
204
|
-
stopManagedSession(options?: {
|
|
205
|
-
preserveBackendSession?: boolean;
|
|
206
|
-
}): Promise<void>;
|
|
207
|
-
/** @deprecated Use `client.rooms.create(...)`. */
|
|
208
|
-
createRoom(roomId?: string): Promise<string>;
|
|
209
|
-
/** @deprecated Use `client.rooms.join(...)`. */
|
|
210
|
-
joinRoom(roomId: string, options?: RuntimeJoinRoomOptions): Promise<Connection[]>;
|
|
211
|
-
/** @deprecated Use `client.rooms.leave(...)`. */
|
|
212
|
-
leaveRoom(roomId: string): Promise<void>;
|
|
213
|
-
/** @deprecated Use `client.rooms.watch(...)`. */
|
|
214
|
-
watchRoom(roomId: string, callback: (members: RuntimeRoomMember[]) => void): () => void;
|
|
215
|
-
/** @deprecated Use `client.rooms.members(...)`. */
|
|
216
|
-
getRoomMembers(roomId: string): Promise<RuntimeRoomMember[]>;
|
|
217
|
-
/** @deprecated Use `client.tickets.raw(...)`. */
|
|
218
|
-
getInvite(): Promise<string>;
|
|
219
|
-
/** @deprecated Use `client.tickets.raw(...)`. */
|
|
220
|
-
getTicket(): Promise<string>;
|
|
221
|
-
/** @deprecated Use `client.tickets.share(...)` or `client.tickets.grant(...)`. */
|
|
222
|
-
getTicketWithToken(scope: GrantScope, maxConnections?: number): Promise<string>;
|
|
223
|
-
/** @deprecated Use `client.tickets.revoke(...)`. */
|
|
224
|
-
revokeTokensByScope(scope: GrantScope): Promise<string[]>;
|
|
225
|
-
/** @deprecated Use `client.peers.connect(...)`. */
|
|
226
|
-
connectPeer(options: RuntimePeerConnectOptions): Promise<Connection>;
|
|
227
|
-
/** @deprecated Use `client.peers.connect(...)`. */
|
|
228
|
-
connectTo(options: RuntimePeerConnectOptions): Promise<Connection>;
|
|
229
|
-
/** @deprecated Use `client.peers.waitConnected(...)`. */
|
|
230
|
-
waitForConnectedPeer(id: string, timeoutMs?: number): Promise<PeerSessionSnapshot | null>;
|
|
231
|
-
/** @deprecated Use `client.channels.connect(...)`; use `client.channels.connectScoped(...)` only for custom lifecycle scopes. */
|
|
232
|
-
connectScopedChannel(options: RuntimeScopedChannelOptions): Promise<RuntimeScopedLogicalChannel>;
|
|
233
|
-
/** @deprecated Use `client.channels.openBi(...)`. */
|
|
234
|
-
openPeerBi(id: string, options?: RuntimePeerStreamOptions): Promise<{
|
|
235
|
-
connection: Connection;
|
|
236
|
-
readable: ReadableStream<Uint8Array>;
|
|
237
|
-
writable: WritableStream<Uint8Array>;
|
|
238
|
-
}>;
|
|
239
|
-
/** @deprecated Use `client.channels.openUni(...)`. */
|
|
240
|
-
openPeerUni(id: string, options?: RuntimePeerStreamOptions): Promise<{
|
|
241
|
-
connection: Connection;
|
|
242
|
-
writable: WritableStream<Uint8Array>;
|
|
243
|
-
}>;
|
|
244
|
-
/**
|
|
245
|
-
* Access to the underlying PlutoRuntimeAssembly for backward compatibility.
|
|
246
|
-
* @deprecated Access methods directly on the client instead.
|
|
247
|
-
*/
|
|
248
|
-
readonly runtime: RuntimeClient;
|
|
249
|
-
/**
|
|
250
|
-
* Access to the underlying PlutoRuntimeAssembly for backward compatibility.
|
|
251
|
-
* @internal
|
|
252
|
-
*/
|
|
253
|
-
readonly _assembly: PlutoRuntimeAssembly;
|
|
254
|
-
}
|
|
22
|
+
|
|
255
23
|
/**
|
|
256
24
|
* Create an OpenRTC client for browser/WASM environments.
|
|
257
|
-
*
|
|
258
|
-
* @example
|
|
259
|
-
* ```typescript
|
|
260
|
-
* import { OpenRTC } from 'openrtc';
|
|
261
|
-
* const client = OpenRTC({
|
|
262
|
-
* apiKey: 'pk_live_...',
|
|
263
|
-
* authMode: 'anonymous',
|
|
264
|
-
* });
|
|
265
|
-
* await client.connect();
|
|
266
|
-
* ```
|
|
267
25
|
*/
|
|
268
26
|
declare function OpenRTC(options: RuntimeClientOptions): OpenRTCClient;
|
|
269
27
|
declare namespace OpenRTC {
|
|
@@ -309,55 +67,7 @@ declare function generateEphemeralKeyAgreement(randomBytes?: (byteLength: number
|
|
|
309
67
|
declare function deriveApplicationCryptoKey(localSecretKey: Uint8Array, remotePublicKey: Uint8Array, localNodeId: string, remoteNodeId: string): Uint8Array;
|
|
310
68
|
declare function encodeApplicationKeyAgreementPayload(publicKey: Uint8Array): ApplicationKeyAgreementPayload;
|
|
311
69
|
|
|
312
|
-
type MintSpaceTokenRequest = {
|
|
313
|
-
spaceKey: string;
|
|
314
|
-
memberId?: string;
|
|
315
|
-
ttl?: number;
|
|
316
|
-
sandboxAppId?: string;
|
|
317
|
-
};
|
|
318
|
-
type MintSpaceTokenResponse = {
|
|
319
|
-
token: string;
|
|
320
|
-
expiresAt: number;
|
|
321
|
-
tokenLifetimeSeconds: number;
|
|
322
|
-
namespaceId: string;
|
|
323
|
-
spaceAppTag: string;
|
|
324
|
-
};
|
|
325
|
-
/**
|
|
326
|
-
* Mint a namespace-scoped Firebase custom token from your backend using the
|
|
327
|
-
* OpenRTC `POST /v1/spaces/tokens` endpoint. Never call this from browser code
|
|
328
|
-
* with a secret key — proxy through your server.
|
|
329
|
-
*/
|
|
330
|
-
type EnableSpaceAuthResponse = {
|
|
331
|
-
success: true;
|
|
332
|
-
space: {
|
|
333
|
-
namespaceId: string;
|
|
334
|
-
requireScopedAuth: boolean;
|
|
335
|
-
status: 'active' | 'revoked';
|
|
336
|
-
};
|
|
337
|
-
};
|
|
338
|
-
/**
|
|
339
|
-
* Opt a provisioned space into scoped-auth mode (required for all spaces).
|
|
340
|
-
* Call from your backend with sk_live_... only.
|
|
341
|
-
*/
|
|
342
|
-
declare function enableSpaceAuth(endpointUrl: string, secretKey: string, namespaceId: string): Promise<EnableSpaceAuthResponse>;
|
|
343
|
-
declare function mintSpaceToken(endpointUrl: string, secretKey: string, request: MintSpaceTokenRequest): Promise<MintSpaceTokenResponse>;
|
|
344
|
-
/**
|
|
345
|
-
* Browser-safe space auth for static sites. Calls the rate-limited
|
|
346
|
-
* `v1SpacePublicTokens` endpoint (pk_live_ + spaceKey only).
|
|
347
|
-
*/
|
|
348
|
-
declare function createPublicSpaceTokenProvider(options: {
|
|
349
|
-
apiKey: string;
|
|
350
|
-
space?: string;
|
|
351
|
-
spaceKey?: string;
|
|
352
|
-
endpointUrl?: string;
|
|
353
|
-
memberIdStorageKey?: string;
|
|
354
|
-
sandboxAppId?: string;
|
|
355
|
-
}): SpaceTokenProvider;
|
|
356
|
-
declare function sandboxSpaceKey(spaceKey: string, sandboxAppId?: string): string;
|
|
357
|
-
declare const spaceToken: typeof createPublicSpaceTokenProvider;
|
|
358
|
-
declare const createSpaceTokenProvider: typeof createPublicSpaceTokenProvider;
|
|
359
|
-
|
|
360
70
|
type UpgradeState = 'none' | 'upgrading' | 'upgraded' | 'failed';
|
|
361
71
|
type OutboundMessage = string | object | ArrayBuffer | Uint8Array;
|
|
362
72
|
|
|
363
|
-
export { ApplicationCryptoStreamTools, type ApplicationKeyAgreementPayload, ApplicationPayloadCrypto,
|
|
73
|
+
export { ApplicationCryptoStreamTools, type ApplicationKeyAgreementPayload, ApplicationPayloadCrypto, KEY_AGREEMENT_ALGORITHM, KEY_AGREEMENT_PUBLIC_KEY_BYTES, OpenRTC, OpenRTCClient, RuntimeClientOptions as OpenRTCOptions, type OutboundMessage, ProtocolCapability, ProtocolCapabilityMap, ProtocolName, RuntimeClientOptions, type UpgradeState, createApplicationCryptoStreamTools, createSharedSecretApplicationCrypto, deriveApplicationCryptoKey, encodeApplicationKeyAgreementPayload, generateEphemeralKeyAgreement, getPreferredProtocolOrder, isApplicationEncryptedPayload };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export{T as OpenRTC,S as createPublicSpaceTokenProvider,Re as createSpaceTokenProvider,ce as enableSpaceAuth,pe as mintSpaceToken,de as sandboxSpaceKey,ue as spaceToken};
|
|
1
|
+
import {a,b}from'./chunk-SJ5BFL6W.js';export{e as createPublicSpaceTokenProvider,h as createSpaceTokenProvider,c as enableSpaceAuth,d as mintSpaceToken,f as sandboxSpaceKey,g as spaceToken}from'./chunk-SJ5BFL6W.js';import {a as a$1,b as b$1}from'./chunk-4AXAWVC6.js';export{d as KEY_AGREEMENT_ALGORITHM,c as KEY_AGREEMENT_PUBLIC_KEY_BYTES,h as ScopedSession,w as createRuntimeJsonFrameDecoder,s as createRuntimeU32BEFrameDecoder,u as decodeRuntimeJsonPayload,f as deriveApplicationCryptoKey,g as encodeApplicationKeyAgreementPayload,v as encodeRuntimeJsonFrame,t as encodeRuntimeJsonPayload,r as encodeRuntimeU32BEFrame,e as generateEphemeralKeyAgreement,b as getPreferredProtocolOrder}from'./chunk-7352ZIXN.js';export{a as isRuntimeDeviceActive,c as isRuntimeDeviceConnectable,b as isRuntimeDeviceRoutable}from'./chunk-CK6WQV7J.js';import'./chunk-MNI6JGR2.js';import {g}from'./chunk-DI5IPRPM.js';export{w as OPENRTC_RUNTIME_POLICY,n as createApplicationCryptoStreamTools,m as createSharedSecretApplicationCrypto,x as getRuntimePolicy,l as isApplicationEncryptedPayload}from'./chunk-YTUWXCRO.js';export{a as TRANSPORT_LABELS,d as isDirectIrohTransportLabel,h as isIndependentTransportLabel,c as isIrohBaseTransportLabel,e as isOptionalTransportLabel,f as isWebRtcTransportLabel,b as normalizeTransportLabel}from'./chunk-QT2ASNI3.js';import'./chunk-HVTYSEU7.js';export{a as ROUTE_DESCRIPTORS,e as getRouteDescriptor,f as listRouteDescriptors}from'./chunk-C7YN5MSV.js';function s(e){let t=a(e),o=a$1(t);return b(o,"web")}s.native=function(e,t){let o=a(e),c=t??g(),m=b$1(o,c);return b(m,"native")};export{s as OpenRTC};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type PlutoIpcUnlisten = () => void | Promise<void>;
|
|
2
|
+
interface PlutoIpcBridge {
|
|
3
|
+
invoke<T = unknown>(command: string, args?: Record<string, unknown>): Promise<T>;
|
|
4
|
+
listen<T = unknown>(event: string, handler: (payload: T) => void): Promise<PlutoIpcUnlisten>;
|
|
5
|
+
isAvailable?(): boolean | Promise<boolean>;
|
|
6
|
+
}
|
|
7
|
+
type NativeIpcFailureKind = 'command-unavailable' | 'runtime-unavailable' | 'timeout' | 'unknown';
|
|
8
|
+
declare function classifyNativeIpcFailure(error: unknown): NativeIpcFailureKind;
|
|
9
|
+
declare function isNativeIpcCommandUnavailable(error: unknown): boolean;
|
|
10
|
+
|
|
11
|
+
export { type NativeIpcFailureKind as N, type PlutoIpcBridge as P, type PlutoIpcUnlisten as a, classifyNativeIpcFailure as c, isNativeIpcCommandUnavailable as i };
|
package/dist/native.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { R as RuntimeClientOptions } from './types-N9s66nF8.js';
|
|
2
|
+
import { P as PlutoIpcBridge } from './ipc-CflAVodw.js';
|
|
3
|
+
import { O as OpenRTCClient } from './spaceTokens-3sbs1mUF.js';
|
|
4
|
+
export { E as EnableSpaceAuthResponse, M as MintSpaceTokenRequest, a as MintSpaceTokenResponse, b as OpenRTCChannelConnectOptions, c as OpenRTCDeviceNamespace, d as OpenRTCDeviceSessionOptions, e as OpenRTCRoomNamespace, f as OpenRTCTicketNamespace, g as createPublicSpaceTokenProvider, h as createSpaceTokenProvider, i as enableSpaceAuth, m as mintSpaceToken, s as sandboxSpaceKey, j as spaceToken } from './spaceTokens-3sbs1mUF.js';
|
|
5
|
+
export { S as SpaceAuthMode, a as SpaceTokenProvider } from './types-ZDsZknDI.js';
|
|
6
|
+
import './IEngineBridge-C7OT2CRv.js';
|
|
7
|
+
import './assembly-C2G0P2L5.js';
|
|
8
|
+
import './capabilities-C4Dqs_pB.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Native-only OpenRTC entrypoint.
|
|
12
|
+
*
|
|
13
|
+
* This entry deliberately imports only the IPC runtime. It is the preferred
|
|
14
|
+
* entry for Tauri webviews because it excludes the browser WASM adapter and
|
|
15
|
+
* binary from the application bundle.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
declare function createNativeOpenRTC(options: RuntimeClientOptions, bridge: PlutoIpcBridge): OpenRTCClient;
|
|
19
|
+
|
|
20
|
+
export { OpenRTCClient, createNativeOpenRTC };
|
package/dist/native.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1,b}from'./chunk-SJ5BFL6W.js';export{e as createPublicSpaceTokenProvider,h as createSpaceTokenProvider,c as enableSpaceAuth,d as mintSpaceToken,f as sandboxSpaceKey,g as spaceToken}from'./chunk-SJ5BFL6W.js';import {A as A$1}from'./chunk-7352ZIXN.js';import {h}from'./chunk-DI5IPRPM.js';import'./chunk-YTUWXCRO.js';import'./chunk-QT2ASNI3.js';import {s}from'./chunk-HVTYSEU7.js';import'./chunk-C7YN5MSV.js';function a(t,p){let e=s(t);return A$1(e,new h({...e,bridge:p}))}function A(t,p){let e=a(a$1(t),p);return b(e,"native")}export{A as createNativeOpenRTC};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { D as DelegatingRuntimeAdapter, W as WasmBridgeOptions } from '../DelegatingRuntimeAdapter-
|
|
2
|
-
import '../types-
|
|
1
|
+
import { D as DelegatingRuntimeAdapter, W as WasmBridgeOptions } from '../DelegatingRuntimeAdapter-lFDUNBy9.js';
|
|
2
|
+
import '../types-ZDsZknDI.js';
|
|
3
3
|
import '../IEngineBridge-C7OT2CRv.js';
|
|
4
|
+
import '../capabilities-C4Dqs_pB.js';
|
|
4
5
|
|
|
5
6
|
declare class WasmRuntimeAdapter extends DelegatingRuntimeAdapter {
|
|
6
7
|
constructor(options: WasmBridgeOptions);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as WasmRuntimeAdapter}from'../chunk-
|
|
1
|
+
export{a as WasmRuntimeAdapter}from'../chunk-MNI6JGR2.js';import'../chunk-YTUWXCRO.js';import'../chunk-QT2ASNI3.js';import'../chunk-HVTYSEU7.js';import'../chunk-C7YN5MSV.js';
|
|
@@ -1,3 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
import { c as RuntimeDevice, d as RuntimeDeviceStatusSnapshot } from '../types-N9s66nF8.js';
|
|
2
2
|
import '../IEngineBridge-C7OT2CRv.js';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-ZDsZknDI.js';
|
|
4
|
+
|
|
5
|
+
interface RuntimeDeviceActiveOptions {
|
|
6
|
+
now?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Optional local freshness window for durable roster rows. Leave undefined
|
|
9
|
+
* when the caller only wants to honor explicit online/expiresAt state.
|
|
10
|
+
*/
|
|
11
|
+
staleAfterMs?: number;
|
|
12
|
+
}
|
|
13
|
+
type RuntimeDeviceActivityStatus = Pick<Partial<RuntimeDevice>, 'online' | 'lastSeenAt' | 'updatedAt' | 'createdAt' | 'expiresAt'>;
|
|
14
|
+
type RuntimeDeviceRouteStatus = Pick<Partial<RuntimeDeviceStatusSnapshot>, 'settledReady' | 'readinessState' | 'connectionStatus'>;
|
|
15
|
+
type RuntimeDevicePresenceStatus = Pick<RuntimeDevice, 'online' | 'ticket'> & Pick<Partial<RuntimeDeviceStatusSnapshot>, 'connectable' | 'presenceStatus' | 'online' | 'ticket'>;
|
|
16
|
+
/**
|
|
17
|
+
* True when a runtime device row is currently live enough to display or
|
|
18
|
+
* consider for app-level routing. This is deliberately separate from
|
|
19
|
+
* `isRuntimeDeviceConnectable`: a peer can be active/present before it has a
|
|
20
|
+
* usable ticket, and a stale durable row should not keep app UIs alive.
|
|
21
|
+
*/
|
|
22
|
+
declare function isRuntimeDeviceActive(device: RuntimeDeviceActivityStatus, options?: RuntimeDeviceActiveOptions): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* True once OpenRTC has a routable peer projection for normal app payloads.
|
|
25
|
+
*
|
|
26
|
+
* This intentionally does not inspect discovery metadata or device
|
|
27
|
+
* capabilities. Those fields describe the remote endpoint roster entry; they
|
|
28
|
+
* are not proof that an application-level protocol has exchanged its own
|
|
29
|
+
* ready/capability message over the mesh.
|
|
30
|
+
*/
|
|
31
|
+
declare function isRuntimeDeviceRoutable(device: RuntimeDeviceRouteStatus): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* True when the discovery row currently has enough fresh presence to attempt
|
|
34
|
+
* a dial. This is a discovery gate, not a connected/readiness gate.
|
|
35
|
+
*/
|
|
36
|
+
declare function isRuntimeDeviceConnectable(device: RuntimeDevicePresenceStatus): boolean;
|
|
37
|
+
|
|
38
|
+
export { type RuntimeDeviceActiveOptions, isRuntimeDeviceActive, isRuntimeDeviceConnectable, isRuntimeDeviceRoutable };
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import { P as PeerReconciliationStats } from '../
|
|
2
|
-
export { O as OPENRTC_RUNTIME_POLICY,
|
|
1
|
+
import { e as RuntimeFactoryOptions, b as PlutoRuntimeAssembly, P as PeerReconciliationStats } from '../assembly-C2G0P2L5.js';
|
|
2
|
+
export { O as OPENRTC_RUNTIME_POLICY, R as RuntimeClient, a as RuntimePolicySnapshot, D as ScopedConnectionActorError, f as ScopedConnectionActorErrorKind, h as ScopedConnectionActorHandle, i as ScopedConnectionActorHandleOptions, j as ScopedConnectionActorRegistry, k as ScopedConnectionActorState, l as ScopedConnectionClose, m as ScopedConnectionDial, n as ScopedConnectionKey, o as ScopedLogicalChannelHandle, p as ScopedPreferredTransport, g as getRuntimePolicy, q as scopedConnectionKey, r as scopedConnectionKeyToString } from '../assembly-C2G0P2L5.js';
|
|
3
3
|
import * as Draft14 from '@moq/net';
|
|
4
|
-
import {
|
|
5
|
-
import { C as Connection, K as RuntimeConnectionTarget, v as RuntimeRawConnection } from '../
|
|
6
|
-
export { w as ChannelDescriptor, x as ConnectionEvent, y as ConnectionTarget, D as DeviceProfile, z as IncomingStream, P as PeerConnectOptions, A as PeerReadiness, B as PeerStreamOptions, E as PresenceLoopOptions, F as RawConnection, t as RuntimeApplicationPayloadReadinessOptions, G as RuntimeAuthContext, H as RuntimeAuthIdentity, J as RuntimeAutoConnectPolicy, l as RuntimeChannelDescriptor, R as RuntimeClientOptions, u as RuntimeConnectionEvent, s as RuntimeConnectionStateSnapshot, c as RuntimeDevice,
|
|
4
|
+
import { a3 as SignalingOptions, I as ISignalingBackend, e as RuntimeIdentity, h as SignalingEnvelope, j as SignalingSession, f as Device, o as BackendConnectionState, X as AppLimits, G as GrantScope, J as JoinRoomOptions, H as RoomMember, x as IncomingStreamChannelMetadata, W as ApplicationCryptoStreamTools, a4 as RoomCreationMode, p as ClientOptions, r as ApplicationPayloadCrypto, D as DiscoveryMode, V as ProtocolCapabilityMap, a5 as ScanningLoopOptions, a6 as ScanningLoopHandle, a7 as RuntimeBootstrapOptions, a8 as RuntimeBootstrapResult, s as ApplicationPayloadReadinessOptions, a9 as ManagedApplicationRouteOptions, z as PeerState, K as PeerScope, F as PeerHealth, w as ChannelDescriptor, aa as JoinRequest, m as NativeConnectParams, n as NativeConnectResult } from '../types-ZDsZknDI.js';
|
|
5
|
+
import { C as Connection, K as RuntimeConnectionTarget, v as RuntimeRawConnection } from '../types-N9s66nF8.js';
|
|
6
|
+
export { w as ChannelDescriptor, x as ConnectionEvent, y as ConnectionTarget, D as DeviceProfile, z as IncomingStream, P as PeerConnectOptions, A as PeerReadiness, B as PeerStreamOptions, E as PresenceLoopOptions, F as RawConnection, t as RuntimeApplicationPayloadReadinessOptions, G as RuntimeAuthContext, H as RuntimeAuthIdentity, J as RuntimeAutoConnectPolicy, l as RuntimeChannelDescriptor, R as RuntimeClientOptions, u as RuntimeConnectionEvent, s as RuntimeConnectionStateSnapshot, c as RuntimeDevice, e as RuntimeDeviceConnectOptions, L as RuntimeDevicePresenceStatus, M as RuntimeDeviceStatus, d as RuntimeDeviceStatusSnapshot, n as RuntimeIncomingStream, q as RuntimeJoinRoomOptions, f as RuntimeLocalDeviceInfo, g as RuntimeLocalDeviceProfile, N as RuntimeLogicalChannelFraming, b as RuntimeManagedSession, O as RuntimeManagedSessionKind, a as RuntimeManagedSessionOptions, Q as RuntimeManagedSessionPlatform, i as RuntimePeerConnectOptions, k as RuntimePeerHealth, S as RuntimePeerLifecycleStatus, j as RuntimePeerReadinessSnapshot, T as RuntimePeerScope, U as RuntimePeerSessionSnapshot, h as RuntimePeerState, m as RuntimePeerStreamOptions, V as RuntimePresenceLoopOptions, W as RuntimePresencePolicy, r as RuntimeRoomMember, o as RuntimeScopedChannelOptions, p as RuntimeScopedLogicalChannel, X as RuntimeSession, Y as RuntimeUiConnectionStatus, Z as ScopedChannelOptions, _ as ScopedLogicalChannel, $ as Session, a0 as SessionOptions } from '../types-N9s66nF8.js';
|
|
7
7
|
import { FirebaseApp } from 'firebase/app';
|
|
8
|
-
import { R as RuntimeCapabilities } from '../
|
|
9
|
-
export { B as BROWSER_WASM_RUNTIME_CAPABILITIES, c as BrowserRuntimeCapabilityHost, N as NATIVE_IPC_RUNTIME_CAPABILITIES, d as NativeRuntimeStatusSnapshot, e as NativeRuntimeTransportFeatureStatus, b as RuntimeAdapterKind, a as RuntimeCapabilityProfile, f as cloneRuntimeCapabilities, r as runtimeCapabilitiesForBrowserHost, g as runtimeCapabilitiesFromNativeStatus, h as runtimeCapabilityProfile } from '../
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
|
|
8
|
+
import { R as RuntimeCapabilities } from '../capabilities-C4Dqs_pB.js';
|
|
9
|
+
export { B as BROWSER_WASM_RUNTIME_CAPABILITIES, c as BrowserRuntimeCapabilityHost, N as NATIVE_IPC_RUNTIME_CAPABILITIES, d as NativeRuntimeStatusSnapshot, e as NativeRuntimeTransportFeatureStatus, b as RuntimeAdapterKind, a as RuntimeCapabilityProfile, f as cloneRuntimeCapabilities, r as runtimeCapabilitiesForBrowserHost, g as runtimeCapabilitiesFromNativeStatus, h as runtimeCapabilityProfile } from '../capabilities-C4Dqs_pB.js';
|
|
10
|
+
export { RuntimeDeviceActiveOptions, isRuntimeDeviceActive, isRuntimeDeviceConnectable, isRuntimeDeviceRoutable } from './device-status.js';
|
|
11
|
+
export { h as RuntimeJsonFrameDecoderOptions, R as RuntimeJsonFrameHandler, a as RuntimeU32BEFrameHandler, i as concatRuntimeBytes, c as createRuntimeJsonFrameDecoder, b as createRuntimeU32BEFrameDecoder, d as decodeRuntimeJsonPayload, e as encodeRuntimeJsonFrame, f as encodeRuntimeJsonPayload, g as encodeRuntimeU32BEFrame, r as readRuntimeU32BE } from '../framing-zRvEKOld.js';
|
|
12
|
+
import { I as IpcRuntimeAdapter } from '../tauri-WEvOC_Z6.js';
|
|
13
|
+
export { a as IpcRuntimeAdapterOptions, T as TauriRuntimeAdapter, b as TauriRuntimeAdapterOptions, c as createTauriIpcBridge } from '../tauri-WEvOC_Z6.js';
|
|
14
|
+
import { WasmRuntimeAdapter } from './WasmRuntimeAdapter.js';
|
|
15
|
+
import { P as PlutoIpcBridge } from '../ipc-CflAVodw.js';
|
|
16
|
+
export { N as NativeIpcFailureKind, a as PlutoIpcUnlisten, c as classifyNativeIpcFailure, i as isNativeIpcCommandUnavailable } from '../ipc-CflAVodw.js';
|
|
13
17
|
import '../IEngineBridge-C7OT2CRv.js';
|
|
18
|
+
import '../DelegatingRuntimeAdapter-lFDUNBy9.js';
|
|
14
19
|
|
|
15
20
|
/**
|
|
16
21
|
* RtdbPresence — Phase 1 RTDB-backed device presence.
|
|
@@ -183,6 +188,18 @@ declare class Signaling {
|
|
|
183
188
|
setWasmClient(client: any): void;
|
|
184
189
|
}
|
|
185
190
|
|
|
191
|
+
/**
|
|
192
|
+
* @deprecated Legacy assembly helper. Use `OpenRTC()` for app code.
|
|
193
|
+
* Removal target: OpenRTC 0.2.0.
|
|
194
|
+
*/
|
|
195
|
+
declare function createWasmClient(options: RuntimeFactoryOptions): PlutoRuntimeAssembly<WasmRuntimeAdapter>;
|
|
196
|
+
/**
|
|
197
|
+
* @deprecated Legacy assembly helper. Native applications should use
|
|
198
|
+
* `createNativeOpenRTC` from `openrtc/native`.
|
|
199
|
+
* Removal target: OpenRTC 0.2.0.
|
|
200
|
+
*/
|
|
201
|
+
declare function createIpcClient(options: RuntimeFactoryOptions, bridge: PlutoIpcBridge): PlutoRuntimeAssembly<IpcRuntimeAdapter>;
|
|
202
|
+
|
|
186
203
|
interface MoQSubscriberOptions {
|
|
187
204
|
maxPendingSubscriptions?: number;
|
|
188
205
|
maxSubscribeRetries?: number;
|
|
@@ -623,4 +640,4 @@ declare function openRtcDebug(message: string, data?: unknown): void;
|
|
|
623
640
|
declare function openRtcDebugInfo(message: string, data?: unknown): void;
|
|
624
641
|
declare function openRtcDebugLog(message: string, data?: unknown): void;
|
|
625
642
|
|
|
626
|
-
export { type CorrelationFields, RuntimeCapabilities, RuntimeConnectionController, RuntimeConnectionTarget, RuntimeRawConnection, clog, correlationForDriveGrantScope, logOpenRtcTeardownTrace, openRtcDebug, openRtcDebugEnabled, openRtcDebugInfo, openRtcDebugLog, renderCorrelationFields };
|
|
643
|
+
export { type CorrelationFields, IpcRuntimeAdapter, PlutoIpcBridge as NativeBridge, PlutoIpcBridge, PlutoRuntimeAssembly, RuntimeCapabilities, RuntimeConnectionController, RuntimeConnectionTarget, RuntimeFactoryOptions, RuntimeRawConnection, WasmRuntimeAdapter, clog, correlationForDriveGrantScope, createIpcClient, createWasmClient, logOpenRtcTeardownTrace, openRtcDebug, openRtcDebugEnabled, openRtcDebugInfo, openRtcDebugLog, renderCorrelationFields };
|
package/dist/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{b as createIpcClient,a as createWasmClient}from'../chunk-4AXAWVC6.js';export{z as RuntimeClient,i as RuntimeConnectionController,m as ScopedConnectionActorError,p as ScopedConnectionActorHandle,q as ScopedConnectionActorRegistry,l as clog,x as concatRuntimeBytes,k as correlationForDriveGrantScope,w as createRuntimeJsonFrameDecoder,s as createRuntimeU32BEFrameDecoder,u as decodeRuntimeJsonPayload,v as encodeRuntimeJsonFrame,t as encodeRuntimeJsonPayload,r as encodeRuntimeU32BEFrame,y as readRuntimeU32BE,j as renderCorrelationFields,n as scopedConnectionKey,o as scopedConnectionKeyToString}from'../chunk-7352ZIXN.js';export{a as isRuntimeDeviceActive,c as isRuntimeDeviceConnectable,b as isRuntimeDeviceRoutable}from'../chunk-CK6WQV7J.js';export{a as WasmRuntimeAdapter}from'../chunk-MNI6JGR2.js';export{b as TauriRuntimeAdapter,a as createTauriIpcBridge}from'../chunk-N6UBUNGC.js';export{h as IpcRuntimeAdapter,e as classifyNativeIpcFailure,f as isNativeIpcCommandUnavailable}from'../chunk-DI5IPRPM.js';export{y as BROWSER_WASM_RUNTIME_CAPABILITIES,z as NATIVE_IPC_RUNTIME_CAPABILITIES,w as OPENRTC_RUNTIME_POLICY,A as cloneRuntimeCapabilities,x as getRuntimePolicy,o as logOpenRtcTeardownTrace,b as openRtcDebug,a as openRtcDebugEnabled,c as openRtcDebugInfo,d as openRtcDebugLog,B as runtimeCapabilitiesForBrowserHost,C as runtimeCapabilitiesFromNativeStatus,D as runtimeCapabilityProfile}from'../chunk-YTUWXCRO.js';import'../chunk-QT2ASNI3.js';import'../chunk-HVTYSEU7.js';import'../chunk-C7YN5MSV.js';
|
package/dist/runtime/tauri.d.ts
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import '../
|
|
3
|
-
import '../
|
|
1
|
+
export { T as TauriRuntimeAdapter, b as TauriRuntimeAdapterOptions, c as createTauriIpcBridge } from '../tauri-WEvOC_Z6.js';
|
|
2
|
+
import '../ipc-CflAVodw.js';
|
|
3
|
+
import '../types-ZDsZknDI.js';
|
|
4
|
+
import '../DelegatingRuntimeAdapter-lFDUNBy9.js';
|
|
4
5
|
import '../IEngineBridge-C7OT2CRv.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Native Tauri support now lives in the first-party `openrtc-tauri` package.
|
|
8
|
-
* Removal target: OpenRTC 0.2.0. This shim remains for one compatibility cycle.
|
|
9
|
-
*/
|
|
10
|
-
declare function createTauriIpcBridge(): PlutoIpcBridge;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Native Tauri support now lives in the first-party `openrtc-tauri` package.
|
|
13
|
-
* Removal target: OpenRTC 0.2.0. This shim remains for one compatibility cycle.
|
|
14
|
-
*/
|
|
15
|
-
declare class TauriRuntimeAdapter extends IpcRuntimeAdapter {
|
|
16
|
-
constructor(options: NativeIpcBridgeOptions);
|
|
17
|
-
}
|
|
18
|
-
type TauriRuntimeAdapterOptions = NativeIpcBridgeOptions;
|
|
19
|
-
|
|
20
|
-
export { TauriRuntimeAdapter, type TauriRuntimeAdapterOptions, createTauriIpcBridge };
|
|
6
|
+
import '../capabilities-C4Dqs_pB.js';
|