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
package/dist/runtime/tauri.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as TauriRuntimeAdapter,a as createTauriIpcBridge}from'../chunk-
|
|
1
|
+
export{b as TauriRuntimeAdapter,a as createTauriIpcBridge}from'../chunk-N6UBUNGC.js';import'../chunk-DI5IPRPM.js';import'../chunk-YTUWXCRO.js';import'../chunk-QT2ASNI3.js';import'../chunk-HVTYSEU7.js';import'../chunk-C7YN5MSV.js';
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { R as RuntimeClient, a as RuntimePolicySnapshot, P as PeerReconciliationStats, b as PlutoRuntimeAssembly } from './assembly-C2G0P2L5.js';
|
|
2
|
+
import { C as ConnectDeviceResult, b as ConnectDeviceHooks, c as ConnectDeviceOptions, P as PeerSessionSnapshot, R as ResolvedPeerIdentity, G as GrantScope, a as SpaceTokenProvider } from './types-ZDsZknDI.js';
|
|
3
|
+
import { A as AuthContext } from './IEngineBridge-C7OT2CRv.js';
|
|
4
|
+
import { a as RuntimeManagedSessionOptions, b as RuntimeManagedSession, c as RuntimeDevice, d as RuntimeDeviceStatusSnapshot, e as RuntimeDeviceConnectOptions, f as RuntimeLocalDeviceInfo, g as RuntimeLocalDeviceProfile, h as RuntimePeerState, i as RuntimePeerConnectOptions, C as Connection, j as RuntimePeerReadinessSnapshot, k as RuntimePeerHealth, l as RuntimeChannelDescriptor, m as RuntimePeerStreamOptions, n as RuntimeIncomingStream, o as RuntimeScopedChannelOptions, p as RuntimeScopedLogicalChannel, q as RuntimeJoinRoomOptions, r as RuntimeRoomMember, s as RuntimeConnectionStateSnapshot, t as RuntimeApplicationPayloadReadinessOptions, u as RuntimeConnectionEvent, v as RuntimeRawConnection } from './types-N9s66nF8.js';
|
|
5
|
+
import { R as RuntimeCapabilities, a as RuntimeCapabilityProfile } from './capabilities-C4Dqs_pB.js';
|
|
6
|
+
|
|
7
|
+
type OpenRTCChannelConnectOptions = Omit<RuntimeScopedChannelOptions, 'scope' | 'deviceId' | 'ticket'> & {
|
|
8
|
+
/**
|
|
9
|
+
* Device selected from `client.devices.*`. Passing the device object lets
|
|
10
|
+
* OpenRTC reuse its current ticket for native and ticket-gated routes.
|
|
11
|
+
*/
|
|
12
|
+
device?: string | RuntimeDevice;
|
|
13
|
+
deviceId?: string | null;
|
|
14
|
+
ticket?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Logical channel lifecycle scope. Most app channels should use the default
|
|
17
|
+
* `session`; pass a custom scope only when you intentionally manage peer
|
|
18
|
+
* lifecycle separately from the channel.
|
|
19
|
+
*/
|
|
20
|
+
scope?: RuntimeScopedChannelOptions['scope'];
|
|
21
|
+
};
|
|
22
|
+
type OpenRTCDeviceSessionOptions = Omit<RuntimeManagedSessionOptions, 'platform'> & {
|
|
23
|
+
/**
|
|
24
|
+
* Runtime host for the managed user-device session. Normal apps can omit
|
|
25
|
+
* this: `OpenRTC(...)` defaults to `web`, and `OpenRTC.native(...)` defaults
|
|
26
|
+
* to `native`.
|
|
27
|
+
*/
|
|
28
|
+
platform?: RuntimeManagedSessionOptions['platform'];
|
|
29
|
+
};
|
|
30
|
+
interface OpenRTCDeviceNamespace {
|
|
31
|
+
startSession(options?: OpenRTCDeviceSessionOptions): Promise<RuntimeManagedSession>;
|
|
32
|
+
stopSession(options?: {
|
|
33
|
+
preserveBackendSession?: boolean;
|
|
34
|
+
}): Promise<void>;
|
|
35
|
+
list(): Promise<RuntimeDevice[]>;
|
|
36
|
+
listWithStatus(): Promise<RuntimeDeviceStatusSnapshot[]>;
|
|
37
|
+
watch(callback: (devices: RuntimeDevice[]) => void): () => void;
|
|
38
|
+
watchWithStatus(callback: (devices: RuntimeDeviceStatusSnapshot[]) => void): () => void;
|
|
39
|
+
connect(device: string | RuntimeDevice, options?: RuntimeDeviceConnectOptions): Promise<ConnectDeviceResult>;
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Use `devices.connect()`. Retry and route recovery are owned by
|
|
42
|
+
* OpenRTC; legacy consumer-provided connection hooks are ignored.
|
|
43
|
+
*/
|
|
44
|
+
connectWithRetry(device: string | RuntimeDevice, hooks: ConnectDeviceHooks, options: ConnectDeviceOptions): Promise<ConnectDeviceResult>;
|
|
45
|
+
disconnect(deviceId: string): Promise<void>;
|
|
46
|
+
update(deviceId: string, updates: {
|
|
47
|
+
deviceName?: string;
|
|
48
|
+
capabilities?: RuntimeDevice['capabilities'];
|
|
49
|
+
metadata?: string;
|
|
50
|
+
}): Promise<void>;
|
|
51
|
+
delete(deviceId: string): Promise<void>;
|
|
52
|
+
localId(): Promise<string | null>;
|
|
53
|
+
localInfo(): Promise<RuntimeLocalDeviceInfo | null>;
|
|
54
|
+
localProfile(options?: {
|
|
55
|
+
deviceName?: string;
|
|
56
|
+
localDeviceId?: string | null;
|
|
57
|
+
platform?: 'native' | 'web';
|
|
58
|
+
userId?: string | null;
|
|
59
|
+
}): Promise<RuntimeLocalDeviceProfile>;
|
|
60
|
+
updateLocalName(deviceName: string): Promise<RuntimeLocalDeviceInfo | null>;
|
|
61
|
+
}
|
|
62
|
+
interface OpenRTCPeerNamespace {
|
|
63
|
+
watch(callback: (peers: RuntimePeerState[]) => void): () => void;
|
|
64
|
+
watchLifecycle(callback: (peers: RuntimePeerState[]) => void): () => void;
|
|
65
|
+
get(id: string): RuntimePeerState | undefined;
|
|
66
|
+
listConnected(): RuntimePeerState[];
|
|
67
|
+
connect(options: RuntimePeerConnectOptions): Promise<Connection>;
|
|
68
|
+
disconnect(id: string, scope?: string): Promise<void>;
|
|
69
|
+
forceDisconnect(id: string): Promise<void>;
|
|
70
|
+
session(id: string): Promise<PeerSessionSnapshot | null>;
|
|
71
|
+
sessions(): Promise<PeerSessionSnapshot[]>;
|
|
72
|
+
waitConnected(id: string, timeoutMs?: number): Promise<PeerSessionSnapshot | null>;
|
|
73
|
+
readiness(id: string, timeoutMs?: number): Promise<RuntimePeerReadinessSnapshot>;
|
|
74
|
+
health(id: string): Promise<RuntimePeerHealth>;
|
|
75
|
+
identity(id: string): Promise<ResolvedPeerIdentity>;
|
|
76
|
+
addScope(id: string, scope?: string): RuntimePeerState | undefined;
|
|
77
|
+
releaseScope(id: string, scope?: string): RuntimePeerState | undefined;
|
|
78
|
+
scopes(id: string): string[];
|
|
79
|
+
refresh(): Promise<RuntimePeerState[]>;
|
|
80
|
+
}
|
|
81
|
+
interface OpenRTCChannelNamespace {
|
|
82
|
+
register(descriptor: RuntimeChannelDescriptor): void;
|
|
83
|
+
unregister(channelId: string): void;
|
|
84
|
+
list(): RuntimeChannelDescriptor[];
|
|
85
|
+
openBi(id: string, channelId: string, options?: Omit<RuntimePeerStreamOptions, 'channelId'>): Promise<{
|
|
86
|
+
connection: Connection;
|
|
87
|
+
readable: ReadableStream<Uint8Array>;
|
|
88
|
+
writable: WritableStream<Uint8Array>;
|
|
89
|
+
}>;
|
|
90
|
+
openUni(id: string, channelId: string, options?: Omit<RuntimePeerStreamOptions, 'channelId'>): Promise<{
|
|
91
|
+
connection: Connection;
|
|
92
|
+
writable: WritableStream<Uint8Array>;
|
|
93
|
+
}>;
|
|
94
|
+
onIncoming(callback: (stream: RuntimeIncomingStream) => boolean | void): () => void;
|
|
95
|
+
onIncomingChannel(channelId: string, callback: (stream: RuntimeIncomingStream & {
|
|
96
|
+
channel: NonNullable<RuntimeIncomingStream['channel']>;
|
|
97
|
+
}) => boolean | void): () => void;
|
|
98
|
+
connect(options: OpenRTCChannelConnectOptions): Promise<RuntimeScopedLogicalChannel>;
|
|
99
|
+
connectScoped(options: RuntimeScopedChannelOptions): Promise<RuntimeScopedLogicalChannel>;
|
|
100
|
+
}
|
|
101
|
+
interface OpenRTCRoomNamespace {
|
|
102
|
+
create(roomId?: string): Promise<string>;
|
|
103
|
+
join(roomId: string, options?: RuntimeJoinRoomOptions): Promise<Connection[]>;
|
|
104
|
+
leave(roomId: string): Promise<void>;
|
|
105
|
+
watch(roomId: string, callback: (members: RuntimeRoomMember[]) => void): () => void;
|
|
106
|
+
members(roomId: string): Promise<RuntimeRoomMember[]>;
|
|
107
|
+
}
|
|
108
|
+
interface OpenRTCTicketNamespace {
|
|
109
|
+
raw(): Promise<string>;
|
|
110
|
+
share(options?: {
|
|
111
|
+
maxConnections?: number;
|
|
112
|
+
}): Promise<string>;
|
|
113
|
+
grant(scope: GrantScope, options?: {
|
|
114
|
+
maxConnections?: number;
|
|
115
|
+
}): Promise<string>;
|
|
116
|
+
revoke(scope: GrantScope): Promise<string[]>;
|
|
117
|
+
}
|
|
118
|
+
interface OpenRTCDiagnosticsNamespace {
|
|
119
|
+
status(): Promise<{
|
|
120
|
+
runtime: 'tauri' | 'browser' | 'unknown';
|
|
121
|
+
wasmLoaded: boolean;
|
|
122
|
+
localNodeId?: string;
|
|
123
|
+
userId?: string;
|
|
124
|
+
}>;
|
|
125
|
+
policy(): RuntimePolicySnapshot;
|
|
126
|
+
capabilities(): RuntimeCapabilities;
|
|
127
|
+
capabilityProfile(): RuntimeCapabilityProfile;
|
|
128
|
+
connectionStates(): Promise<RuntimeConnectionStateSnapshot[]>;
|
|
129
|
+
onConnectionStateChange(callback: (state: RuntimeConnectionStateSnapshot) => void): Promise<() => void> | (() => void);
|
|
130
|
+
connections(): Connection[];
|
|
131
|
+
applicationReadyConnections(options?: RuntimeApplicationPayloadReadinessOptions): Connection[];
|
|
132
|
+
onConnection(callback: (connection: Connection) => void): () => void;
|
|
133
|
+
onDisconnection(callback: (connection: Connection) => void): () => void;
|
|
134
|
+
onConnectionEvent(callback: (event: RuntimeConnectionEvent) => void): () => void;
|
|
135
|
+
forceReconnectSnapshot(): void;
|
|
136
|
+
peerReconciliation(): Readonly<PeerReconciliationStats>;
|
|
137
|
+
}
|
|
138
|
+
interface OpenRTCAdvancedNamespace {
|
|
139
|
+
readonly runtime: RuntimeClient;
|
|
140
|
+
readonly assembly: PlutoRuntimeAssembly;
|
|
141
|
+
nodeId(): Promise<string>;
|
|
142
|
+
nodeIdFromTicket(ticket: string): Promise<string | null>;
|
|
143
|
+
endpointTicket(): Promise<string>;
|
|
144
|
+
connectRaw(target: {
|
|
145
|
+
ticket: string;
|
|
146
|
+
timeoutMs?: number;
|
|
147
|
+
}): Promise<RuntimeRawConnection>;
|
|
148
|
+
openBi(nodeId: string): Promise<{
|
|
149
|
+
readable: ReadableStream<Uint8Array>;
|
|
150
|
+
writable: WritableStream<Uint8Array>;
|
|
151
|
+
}>;
|
|
152
|
+
openUni(nodeId: string): Promise<WritableStream<Uint8Array>>;
|
|
153
|
+
isConnected(nodeId: string): Promise<boolean>;
|
|
154
|
+
disconnectNode(nodeId: string): Promise<void>;
|
|
155
|
+
setAutoConnectExcluded(deviceId: string, excluded: boolean): Promise<void>;
|
|
156
|
+
notifyNetworkChange(reason?: string): Promise<void>;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* OpenRTCClient extends RuntimeClient with auth helpers that were
|
|
160
|
+
* previously only available on PlutoRuntimeAssembly.
|
|
161
|
+
*
|
|
162
|
+
* This is the unified type returned by OpenRTC() and OpenRTC.native().
|
|
163
|
+
*/
|
|
164
|
+
interface OpenRTCClient extends RuntimeClient {
|
|
165
|
+
readonly devices: OpenRTCDeviceNamespace;
|
|
166
|
+
readonly peers: OpenRTCPeerNamespace;
|
|
167
|
+
readonly channels: OpenRTCChannelNamespace;
|
|
168
|
+
readonly rooms: OpenRTCRoomNamespace;
|
|
169
|
+
readonly tickets: OpenRTCTicketNamespace;
|
|
170
|
+
readonly diagnostics: OpenRTCDiagnosticsNamespace;
|
|
171
|
+
readonly advanced: OpenRTCAdvancedNamespace;
|
|
172
|
+
/** @deprecated Use setAuth() instead */
|
|
173
|
+
setAuthContext(context: AuthContext | null): Promise<void>;
|
|
174
|
+
/** Set auth context for the runtime */
|
|
175
|
+
setAuth(context: AuthContext | null): Promise<void>;
|
|
176
|
+
/** Sync Pluto-hosted auth to the runtime */
|
|
177
|
+
syncPlutoAuth(options?: {
|
|
178
|
+
userId?: string | null;
|
|
179
|
+
forceRefresh?: boolean;
|
|
180
|
+
}): Promise<void>;
|
|
181
|
+
/** Bind Pluto auth host to auto-sync on token changes */
|
|
182
|
+
bindPlutoAuthHost(): () => void;
|
|
183
|
+
/** Sign in via Pluto SSO */
|
|
184
|
+
signIn(): Promise<void>;
|
|
185
|
+
/** Sign out and clear auth context */
|
|
186
|
+
signOut(): Promise<void>;
|
|
187
|
+
/**
|
|
188
|
+
* @deprecated Use `client.devices.startSession(...)` for the public
|
|
189
|
+
* user-device avenue lifecycle. This top-level method remains for
|
|
190
|
+
* RuntimeClient compatibility and advanced integrations.
|
|
191
|
+
*/
|
|
192
|
+
startManagedSession(options: RuntimeManagedSessionOptions): Promise<RuntimeManagedSession>;
|
|
193
|
+
/**
|
|
194
|
+
* @deprecated Use `client.devices.stopSession(...)` for the public
|
|
195
|
+
* user-device avenue lifecycle.
|
|
196
|
+
*/
|
|
197
|
+
stopManagedSession(options?: {
|
|
198
|
+
preserveBackendSession?: boolean;
|
|
199
|
+
}): Promise<void>;
|
|
200
|
+
/** @deprecated Use `client.rooms.create(...)`. */
|
|
201
|
+
createRoom(roomId?: string): Promise<string>;
|
|
202
|
+
/** @deprecated Use `client.rooms.join(...)`. */
|
|
203
|
+
joinRoom(roomId: string, options?: RuntimeJoinRoomOptions): Promise<Connection[]>;
|
|
204
|
+
/** @deprecated Use `client.rooms.leave(...)`. */
|
|
205
|
+
leaveRoom(roomId: string): Promise<void>;
|
|
206
|
+
/** @deprecated Use `client.rooms.watch(...)`. */
|
|
207
|
+
watchRoom(roomId: string, callback: (members: RuntimeRoomMember[]) => void): () => void;
|
|
208
|
+
/** @deprecated Use `client.rooms.members(...)`. */
|
|
209
|
+
getRoomMembers(roomId: string): Promise<RuntimeRoomMember[]>;
|
|
210
|
+
/** @deprecated Use `client.tickets.raw(...)`. */
|
|
211
|
+
getInvite(): Promise<string>;
|
|
212
|
+
/** @deprecated Use `client.tickets.raw(...)`. */
|
|
213
|
+
getTicket(): Promise<string>;
|
|
214
|
+
/** @deprecated Use `client.tickets.share(...)` or `client.tickets.grant(...)`. */
|
|
215
|
+
getTicketWithToken(scope: GrantScope, maxConnections?: number): Promise<string>;
|
|
216
|
+
/** @deprecated Use `client.tickets.revoke(...)`. */
|
|
217
|
+
revokeTokensByScope(scope: GrantScope): Promise<string[]>;
|
|
218
|
+
/** @deprecated Use `client.peers.connect(...)`. */
|
|
219
|
+
connectPeer(options: RuntimePeerConnectOptions): Promise<Connection>;
|
|
220
|
+
/** @deprecated Use `client.peers.connect(...)`. */
|
|
221
|
+
connectTo(options: RuntimePeerConnectOptions): Promise<Connection>;
|
|
222
|
+
/** @deprecated Use `client.peers.waitConnected(...)`. */
|
|
223
|
+
waitForConnectedPeer(id: string, timeoutMs?: number): Promise<PeerSessionSnapshot | null>;
|
|
224
|
+
/** @deprecated Use `client.channels.connect(...)`; use `client.channels.connectScoped(...)` only for custom lifecycle scopes. */
|
|
225
|
+
connectScopedChannel(options: RuntimeScopedChannelOptions): Promise<RuntimeScopedLogicalChannel>;
|
|
226
|
+
/** @deprecated Use `client.channels.openBi(...)`. */
|
|
227
|
+
openPeerBi(id: string, options?: RuntimePeerStreamOptions): Promise<{
|
|
228
|
+
connection: Connection;
|
|
229
|
+
readable: ReadableStream<Uint8Array>;
|
|
230
|
+
writable: WritableStream<Uint8Array>;
|
|
231
|
+
}>;
|
|
232
|
+
/** @deprecated Use `client.channels.openUni(...)`. */
|
|
233
|
+
openPeerUni(id: string, options?: RuntimePeerStreamOptions): Promise<{
|
|
234
|
+
connection: Connection;
|
|
235
|
+
writable: WritableStream<Uint8Array>;
|
|
236
|
+
}>;
|
|
237
|
+
/**
|
|
238
|
+
* Access to the underlying PlutoRuntimeAssembly for backward compatibility.
|
|
239
|
+
* @deprecated Access methods directly on the client instead.
|
|
240
|
+
*/
|
|
241
|
+
readonly runtime: RuntimeClient;
|
|
242
|
+
/**
|
|
243
|
+
* Access to the underlying PlutoRuntimeAssembly for backward compatibility.
|
|
244
|
+
* @internal
|
|
245
|
+
*/
|
|
246
|
+
readonly _assembly: PlutoRuntimeAssembly;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
type MintSpaceTokenRequest = {
|
|
250
|
+
spaceKey: string;
|
|
251
|
+
memberId?: string;
|
|
252
|
+
ttl?: number;
|
|
253
|
+
sandboxAppId?: string;
|
|
254
|
+
};
|
|
255
|
+
type MintSpaceTokenResponse = {
|
|
256
|
+
token: string;
|
|
257
|
+
expiresAt: number;
|
|
258
|
+
tokenLifetimeSeconds: number;
|
|
259
|
+
namespaceId: string;
|
|
260
|
+
spaceAppTag: string;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* Mint a namespace-scoped Firebase custom token from your backend using the
|
|
264
|
+
* OpenRTC `POST /v1/spaces/tokens` endpoint. Never call this from browser code
|
|
265
|
+
* with a secret key — proxy through your server.
|
|
266
|
+
*/
|
|
267
|
+
type EnableSpaceAuthResponse = {
|
|
268
|
+
success: true;
|
|
269
|
+
space: {
|
|
270
|
+
namespaceId: string;
|
|
271
|
+
requireScopedAuth: boolean;
|
|
272
|
+
status: 'active' | 'revoked';
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
/**
|
|
276
|
+
* Opt a provisioned space into scoped-auth mode (required for all spaces).
|
|
277
|
+
* Call from your backend with sk_live_... only.
|
|
278
|
+
*/
|
|
279
|
+
declare function enableSpaceAuth(endpointUrl: string, secretKey: string, namespaceId: string): Promise<EnableSpaceAuthResponse>;
|
|
280
|
+
declare function mintSpaceToken(endpointUrl: string, secretKey: string, request: MintSpaceTokenRequest): Promise<MintSpaceTokenResponse>;
|
|
281
|
+
/**
|
|
282
|
+
* Browser-safe space auth for static sites. Calls the rate-limited
|
|
283
|
+
* `v1SpacePublicTokens` endpoint (pk_live_ + spaceKey only).
|
|
284
|
+
*/
|
|
285
|
+
declare function createPublicSpaceTokenProvider(options: {
|
|
286
|
+
apiKey: string;
|
|
287
|
+
space?: string;
|
|
288
|
+
spaceKey?: string;
|
|
289
|
+
endpointUrl?: string;
|
|
290
|
+
memberIdStorageKey?: string;
|
|
291
|
+
sandboxAppId?: string;
|
|
292
|
+
}): SpaceTokenProvider;
|
|
293
|
+
declare function sandboxSpaceKey(spaceKey: string, sandboxAppId?: string): string;
|
|
294
|
+
declare const spaceToken: typeof createPublicSpaceTokenProvider;
|
|
295
|
+
declare const createSpaceTokenProvider: typeof createPublicSpaceTokenProvider;
|
|
296
|
+
|
|
297
|
+
export { type EnableSpaceAuthResponse as E, type MintSpaceTokenRequest as M, type OpenRTCClient as O, type MintSpaceTokenResponse as a, type OpenRTCChannelConnectOptions as b, type OpenRTCDeviceNamespace as c, type OpenRTCDeviceSessionOptions as d, type OpenRTCRoomNamespace as e, type OpenRTCTicketNamespace as f, createPublicSpaceTokenProvider as g, createSpaceTokenProvider as h, enableSpaceAuth as i, spaceToken as j, mintSpaceToken as m, sandboxSpaceKey as s };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { n as ClientOptions } from './types-BCkKK8dy.js';
|
|
2
|
+
import { W as WasmBridgeOptions, D as DelegatingRuntimeAdapter } from './DelegatingRuntimeAdapter-DlC0TZB0.js';
|
|
3
|
+
import { P as PlutoIpcBridge } from './ipc-CflAVodw.js';
|
|
4
|
+
|
|
5
|
+
interface NativeIpcBridgeOptions extends WasmBridgeOptions {
|
|
6
|
+
allowWasmFallback?: boolean;
|
|
7
|
+
ipcBridge?: PlutoIpcBridge;
|
|
8
|
+
transports?: ClientOptions['transports'];
|
|
9
|
+
strictMode?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface IpcRuntimeAdapterOptions extends NativeIpcBridgeOptions {
|
|
13
|
+
bridge: PlutoIpcBridge;
|
|
14
|
+
}
|
|
15
|
+
declare class IpcRuntimeAdapter extends DelegatingRuntimeAdapter {
|
|
16
|
+
constructor(options: IpcRuntimeAdapterOptions);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Native Tauri support now lives in the first-party `openrtc-tauri` package.
|
|
21
|
+
* Removal target: OpenRTC 0.2.0. This shim remains for one compatibility cycle.
|
|
22
|
+
*/
|
|
23
|
+
declare function createTauriIpcBridge(): PlutoIpcBridge;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Native Tauri support now lives in the first-party `openrtc-tauri` package.
|
|
26
|
+
* Removal target: OpenRTC 0.2.0. This shim remains for one compatibility cycle.
|
|
27
|
+
*/
|
|
28
|
+
declare class TauriRuntimeAdapter extends IpcRuntimeAdapter {
|
|
29
|
+
constructor(options: NativeIpcBridgeOptions);
|
|
30
|
+
}
|
|
31
|
+
type TauriRuntimeAdapterOptions = NativeIpcBridgeOptions;
|
|
32
|
+
|
|
33
|
+
export { IpcRuntimeAdapter as I, TauriRuntimeAdapter as T, type IpcRuntimeAdapterOptions as a, type TauriRuntimeAdapterOptions as b, createTauriIpcBridge as c };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { p as ClientOptions } from './types-ZDsZknDI.js';
|
|
2
|
+
import { W as WasmBridgeOptions, D as DelegatingRuntimeAdapter } from './DelegatingRuntimeAdapter-lFDUNBy9.js';
|
|
3
|
+
import { P as PlutoIpcBridge } from './ipc-CflAVodw.js';
|
|
4
|
+
|
|
5
|
+
interface NativeIpcBridgeOptions extends WasmBridgeOptions {
|
|
6
|
+
allowWasmFallback?: boolean;
|
|
7
|
+
ipcBridge?: PlutoIpcBridge;
|
|
8
|
+
transports?: ClientOptions['transports'];
|
|
9
|
+
strictMode?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface IpcRuntimeAdapterOptions extends NativeIpcBridgeOptions {
|
|
13
|
+
bridge: PlutoIpcBridge;
|
|
14
|
+
}
|
|
15
|
+
declare class IpcRuntimeAdapter extends DelegatingRuntimeAdapter {
|
|
16
|
+
constructor(options: IpcRuntimeAdapterOptions);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Native Tauri support now lives in the first-party `openrtc-tauri` package.
|
|
21
|
+
* Removal target: OpenRTC 0.2.0. This shim remains for one compatibility cycle.
|
|
22
|
+
*/
|
|
23
|
+
declare function createTauriIpcBridge(): PlutoIpcBridge;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Native Tauri support now lives in the first-party `openrtc-tauri` package.
|
|
26
|
+
* Removal target: OpenRTC 0.2.0. This shim remains for one compatibility cycle.
|
|
27
|
+
*/
|
|
28
|
+
declare class TauriRuntimeAdapter extends IpcRuntimeAdapter {
|
|
29
|
+
constructor(options: NativeIpcBridgeOptions);
|
|
30
|
+
}
|
|
31
|
+
type TauriRuntimeAdapterOptions = NativeIpcBridgeOptions;
|
|
32
|
+
|
|
33
|
+
export { IpcRuntimeAdapter as I, TauriRuntimeAdapter as T, type IpcRuntimeAdapterOptions as a, type TauriRuntimeAdapterOptions as b, createTauriIpcBridge as c };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a0 as RouteDescriptor, u as ProtocolName } from '../types-ZDsZknDI.js';
|
|
2
|
+
export { a1 as RouteFamily, a2 as RouteImplementationKind } from '../types-ZDsZknDI.js';
|
|
3
3
|
|
|
4
4
|
declare const ROUTE_DESCRIPTORS: readonly RouteDescriptor[];
|
|
5
5
|
declare function getRouteDescriptor(id: ProtocolName): RouteDescriptor;
|
|
@@ -934,4 +934,4 @@ interface JoinRequest {
|
|
|
934
934
|
state: 'pending' | 'accepted' | 'rejected';
|
|
935
935
|
}
|
|
936
936
|
|
|
937
|
-
export type {
|
|
937
|
+
export type { RouteDescriptor as $, AuthMode as A, BackendPeerBiStream as B, ConnectDeviceResult as C, DiscoveryMode as D, ExplicitFileDataSendParams as E, PeerScope as F, GrantScope as G, DevicePresenceStatus as H, ISignalingBackend as I, JoinRoomOptions as J, PeerLifecycleStatus as K, LocalDeviceInfo as L, ManagedConnectionRecord as M, NativeManagedSessionStartResult as N, ProtocolCapability as O, PeerSessionSnapshot as P, ProtocolCapabilityMap as Q, ResolvedPeerIdentity as R, SignalingMode as S, TransportLatencySnapshot as T, ApplicationCryptoStreamTools as U, SpaceTokenProvider as V, AppLimits as W, ApplicationCryptoBiStream as X, ProtocolBaseName as Y, ProtocolImplementationKind as Z, ProtocolLocality as _, ConnectDeviceHooks as a, RouteFamily as a0, RouteImplementationKind as a1, SpaceAuthMode as a2, SignalingOptions as a3, RoomCreationMode as a4, ScanningLoopOptions as a5, ScanningLoopHandle as a6, RuntimeBootstrapOptions as a7, RuntimeBootstrapResult as a8, ManagedApplicationRouteOptions as a9, JoinRequest as aa, ConnectDeviceOptions as b, RuntimeIdentity as c, Device as d, DeviceStatusSnapshot as e, SignalingEnvelope as f, DeviceEvent as g, SignalingSession as h, SessionEvent as i, BackendPeerUniStream as j, NativeConnectParams as k, NativeConnectResult as l, BackendConnectionState as m, ClientOptions as n, ConnectionOptions as o, ApplicationPayloadCrypto as p, ApplicationPayloadReadinessOptions as q, ApplicationPayloadRouteOptions as r, ProtocolName as s, ApplicationPayloadSendOptions as t, ChannelDescriptor as u, IncomingStreamChannelMetadata as v, ManagedDeviceConnectOptions as w, PeerState as x, PeerHealth as y, RoomMember as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AuthContext } from './IEngineBridge-C7OT2CRv.js';
|
|
2
|
-
import {
|
|
2
|
+
import { q as ConnectionOptions, r as ApplicationPayloadCrypto, s as ApplicationPayloadReadinessOptions, t as ApplicationPayloadRouteOptions, u as ProtocolName, v as ApplicationPayloadSendOptions, T as TransportLatencySnapshot, w as ChannelDescriptor$1, L as LocalDeviceInfo, x as IncomingStreamChannelMetadata, p as ClientOptions, f as Device, j as SignalingSession, e as RuntimeIdentity, g as DeviceStatusSnapshot, y as ManagedDeviceConnectOptions, z as PeerState, F as PeerHealth, J as JoinRoomOptions, H as RoomMember, K as PeerScope, o as BackendConnectionState, O as DevicePresenceStatus, Q as PeerLifecycleStatus, P as PeerSessionSnapshot } from './types-ZDsZknDI.js';
|
|
3
3
|
|
|
4
4
|
interface ITransport {
|
|
5
5
|
readonly name: string;
|
|
@@ -483,7 +483,7 @@ interface RuntimeScopedLogicalChannel {
|
|
|
483
483
|
*/
|
|
484
484
|
type RuntimeDeviceStatusSnapshot = Omit<DeviceStatusSnapshot, 'nodeId'>;
|
|
485
485
|
type RuntimeDeviceStatus = RuntimeDeviceStatusSnapshot;
|
|
486
|
-
type RuntimeDevicePresenceStatus
|
|
486
|
+
type RuntimeDevicePresenceStatus = DevicePresenceStatus;
|
|
487
487
|
type RuntimeIncomingStream = {
|
|
488
488
|
type: 'bi' | 'uni';
|
|
489
489
|
stream: any;
|
|
@@ -570,37 +570,4 @@ type SessionOptions = RuntimeManagedSessionOptions;
|
|
|
570
570
|
type Session = RuntimeManagedSession;
|
|
571
571
|
type ChannelDescriptor = RuntimeChannelDescriptor;
|
|
572
572
|
|
|
573
|
-
|
|
574
|
-
now?: number;
|
|
575
|
-
/**
|
|
576
|
-
* Optional local freshness window for durable roster rows. Leave undefined
|
|
577
|
-
* when the caller only wants to honor explicit online/expiresAt state.
|
|
578
|
-
*/
|
|
579
|
-
staleAfterMs?: number;
|
|
580
|
-
}
|
|
581
|
-
type RuntimeDeviceActivityStatus = Pick<Partial<RuntimeDevice>, 'online' | 'lastSeenAt' | 'updatedAt' | 'createdAt' | 'expiresAt'>;
|
|
582
|
-
type RuntimeDeviceRouteStatus = Pick<Partial<RuntimeDeviceStatusSnapshot>, 'settledReady' | 'readinessState' | 'connectionStatus'>;
|
|
583
|
-
type RuntimeDevicePresenceStatus = Pick<RuntimeDevice, 'online' | 'ticket'> & Pick<Partial<RuntimeDeviceStatusSnapshot>, 'connectable' | 'presenceStatus' | 'online' | 'ticket'>;
|
|
584
|
-
/**
|
|
585
|
-
* True when a runtime device row is currently live enough to display or
|
|
586
|
-
* consider for app-level routing. This is deliberately separate from
|
|
587
|
-
* `isRuntimeDeviceConnectable`: a peer can be active/present before it has a
|
|
588
|
-
* usable ticket, and a stale durable row should not keep app UIs alive.
|
|
589
|
-
*/
|
|
590
|
-
declare function isRuntimeDeviceActive(device: RuntimeDeviceActivityStatus, options?: RuntimeDeviceActiveOptions): boolean;
|
|
591
|
-
/**
|
|
592
|
-
* True once OpenRTC has a routable peer projection for normal app payloads.
|
|
593
|
-
*
|
|
594
|
-
* This intentionally does not inspect discovery metadata or device
|
|
595
|
-
* capabilities. Those fields describe the remote endpoint roster entry; they
|
|
596
|
-
* are not proof that an application-level protocol has exchanged its own
|
|
597
|
-
* ready/capability message over the mesh.
|
|
598
|
-
*/
|
|
599
|
-
declare function isRuntimeDeviceRoutable(device: RuntimeDeviceRouteStatus): boolean;
|
|
600
|
-
/**
|
|
601
|
-
* True when the discovery row currently has enough fresh presence to attempt
|
|
602
|
-
* a dial. This is a discovery gate, not a connected/readiness gate.
|
|
603
|
-
*/
|
|
604
|
-
declare function isRuntimeDeviceConnectable(device: RuntimeDevicePresenceStatus): boolean;
|
|
605
|
-
|
|
606
|
-
export { isRuntimeDeviceActive as $, type PeerReadiness as A, type PeerStreamOptions as B, Connection as C, type DeviceProfile as D, type PresenceLoopOptions as E, type RawConnection as F, type RuntimeAuthContext as G, type RuntimeAuthIdentity as H, type ITransport as I, type RuntimeAutoConnectPolicy as J, type RuntimeConnectionTarget as K, type RuntimeDevicePresenceStatus$1 as L, type RuntimeDeviceStatus as M, type RuntimeLogicalChannelFraming as N, type RuntimeManagedSessionKind as O, type PeerConnectOptions as P, type RuntimeManagedSessionPlatform as Q, type RuntimeClientOptions as R, type RuntimePeerLifecycleStatus as S, type RuntimePeerScope as T, type RuntimePeerSessionSnapshot as U, type RuntimePresenceLoopOptions as V, type RuntimePresencePolicy as W, type RuntimeSession as X, type RuntimeUiConnectionStatus as Y, type ScopedChannelOptions as Z, type ScopedLogicalChannel as _, type RuntimeManagedSessionOptions as a, isRuntimeDeviceConnectable as a0, isRuntimeDeviceRoutable as a1, type RuntimeDeviceActiveOptions as a2, type Session as a3, type SessionOptions as a4, type RuntimeManagedSession as b, type RuntimeDevice as c, type RuntimeDeviceStatusSnapshot as d, type RuntimeDeviceConnectOptions as e, type RuntimeLocalDeviceInfo as f, type RuntimeLocalDeviceProfile as g, type RuntimePeerState as h, type RuntimePeerConnectOptions as i, type RuntimePeerReadinessSnapshot as j, type RuntimePeerHealth as k, type RuntimeChannelDescriptor as l, type RuntimePeerStreamOptions as m, type RuntimeIncomingStream as n, type RuntimeScopedChannelOptions as o, type RuntimeScopedLogicalChannel as p, type RuntimeJoinRoomOptions as q, type RuntimeRoomMember as r, type RuntimeConnectionStateSnapshot as s, type RuntimeApplicationPayloadReadinessOptions as t, type RuntimeConnectionEvent as u, type RuntimeRawConnection as v, type ChannelDescriptor as w, type ConnectionEvent as x, type ConnectionTarget as y, type IncomingStream as z };
|
|
573
|
+
export { type Session as $, type PeerReadiness as A, type PeerStreamOptions as B, Connection as C, type DeviceProfile as D, type PresenceLoopOptions as E, type RawConnection as F, type RuntimeAuthContext as G, type RuntimeAuthIdentity as H, type ITransport as I, type RuntimeAutoConnectPolicy as J, type RuntimeConnectionTarget as K, type RuntimeDevicePresenceStatus as L, type RuntimeDeviceStatus as M, type RuntimeLogicalChannelFraming as N, type RuntimeManagedSessionKind as O, type PeerConnectOptions as P, type RuntimeManagedSessionPlatform as Q, type RuntimeClientOptions as R, type RuntimePeerLifecycleStatus as S, type RuntimePeerScope as T, type RuntimePeerSessionSnapshot as U, type RuntimePresenceLoopOptions as V, type RuntimePresencePolicy as W, type RuntimeSession as X, type RuntimeUiConnectionStatus as Y, type ScopedChannelOptions as Z, type ScopedLogicalChannel as _, type RuntimeManagedSessionOptions as a, type SessionOptions as a0, type RuntimeManagedSession as b, type RuntimeDevice as c, type RuntimeDeviceStatusSnapshot as d, type RuntimeDeviceConnectOptions as e, type RuntimeLocalDeviceInfo as f, type RuntimeLocalDeviceProfile as g, type RuntimePeerState as h, type RuntimePeerConnectOptions as i, type RuntimePeerReadinessSnapshot as j, type RuntimePeerHealth as k, type RuntimeChannelDescriptor as l, type RuntimePeerStreamOptions as m, type RuntimeIncomingStream as n, type RuntimeScopedChannelOptions as o, type RuntimeScopedLogicalChannel as p, type RuntimeJoinRoomOptions as q, type RuntimeRoomMember as r, type RuntimeConnectionStateSnapshot as s, type RuntimeApplicationPayloadReadinessOptions as t, type RuntimeConnectionEvent as u, type RuntimeRawConnection as v, type ChannelDescriptor as w, type ConnectionEvent as x, type ConnectionTarget as y, type IncomingStream as z };
|