openrtc 1.0.2 → 1.0.3
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 +3 -1
- package/dist/{DelegatingRuntimeAdapter-CjjDPy9r.d.ts → DelegatingRuntimeAdapter-D2_dgabz.d.ts} +1 -0
- package/dist/{IpcRuntimeAdapter-DxY3xSuZ.d.ts → IpcRuntimeAdapter-B8rkqNrq.d.ts} +1 -1
- package/dist/chunk-BGQX25BO.js +1 -0
- package/dist/chunk-L6OUJ6YN.js +2 -0
- package/dist/{chunk-ALAQEBXJ.js → chunk-MESPJTUA.js} +1 -1
- package/dist/chunk-NCRP5ODV.js +3 -0
- package/dist/{chunk-EPLB7YIT.js → chunk-RRCARL4S.js} +1 -1
- package/dist/{device-status-CvgzstCB.d.ts → device-status-CR27Ak7c.d.ts} +4 -1
- package/dist/{framing-CyPwlaXh.d.ts → framing-rPdckqn5.d.ts} +9 -3
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/openrtc_bg.wasm +0 -0
- package/dist/runtime/WasmRuntimeAdapter.d.ts +1 -1
- package/dist/runtime/WasmRuntimeAdapter.js +1 -1
- package/dist/runtime/device-status.d.ts +1 -1
- package/dist/runtime/index.d.ts +7 -7
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/tauri.d.ts +2 -2
- package/dist/runtime/tauri.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-5EG2FIIE.js +0 -3
- package/dist/chunk-LIWR2BDB.js +0 -2
- package/dist/chunk-R3SDPFXM.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {g,h}from'./chunk-
|
|
1
|
+
import {g,h}from'./chunk-L6OUJ6YN.js';function c(){return g()}var i=class extends h{constructor(r){super({...r,bridge:g(),allowWasmFallback:r.allowWasmFallback??false});}};export{c as a,i as b};
|
|
@@ -41,6 +41,7 @@ declare class Connection {
|
|
|
41
41
|
private listeners;
|
|
42
42
|
private pendingMessages;
|
|
43
43
|
private pendingEncryptedApplicationPayloads;
|
|
44
|
+
private lastApplicationPayloadTransport;
|
|
44
45
|
private webrtcBinaryHandlers;
|
|
45
46
|
private closeListeners;
|
|
46
47
|
private upgradeStateListeners;
|
|
@@ -193,6 +194,8 @@ declare class Connection {
|
|
|
193
194
|
* Throws when the requested transport is unavailable.
|
|
194
195
|
*/
|
|
195
196
|
sendOnTransport(transport: ProtocolName, message: string | object | ArrayBuffer | Uint8Array): Promise<void>;
|
|
197
|
+
/** Last transport that accepted an application payload from this connection. */
|
|
198
|
+
getLastApplicationPayloadTransport(): ProtocolName | null;
|
|
196
199
|
/**
|
|
197
200
|
* Send plaintext control traffic that is required to bootstrap application
|
|
198
201
|
* key agreement. This is intentionally separate from public app-data sends.
|
|
@@ -470,7 +473,7 @@ interface RuntimeScopedLogicalChannel {
|
|
|
470
473
|
transports: string[];
|
|
471
474
|
hasSendOnWebRTC?: boolean;
|
|
472
475
|
hasWebRTCTransport?: boolean;
|
|
473
|
-
lastSendTransport?:
|
|
476
|
+
lastSendTransport?: ProtocolName | 'stream' | null;
|
|
474
477
|
framing: RuntimeLogicalChannelFraming;
|
|
475
478
|
nativeLabel: boolean;
|
|
476
479
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { A as AuthContext } from './IEngineBridge-C7OT2CRv.js';
|
|
2
2
|
import { G as GrantScope, I as ISignalingBackend, m as ConnectDeviceHooks, n as ConnectDeviceOptions, l as ConnectDeviceResult, M as ManagedConnectionRecord, P as PeerSessionSnapshot, c as ResolvedPeerIdentity, u as AppLimits, i as NativeConnectParams, j as NativeConnectResult, E as ExplicitFileDataSendParams } from './types-ByZyADCn.js';
|
|
3
|
-
import { h as RuntimePeerState, s as RuntimeConnectionStateSnapshot, j as RuntimePeerReadinessSnapshot, i as RuntimePeerConnectOptions, C as Connection, n as RuntimeIncomingStream, R as RuntimeClientOptions, H as RuntimeAuthIdentity, f as RuntimeLocalDeviceInfo, g as RuntimeLocalDeviceProfile, c as RuntimeDevice, a as RuntimeManagedSessionOptions, b as RuntimeManagedSession, d as RuntimeDeviceStatusSnapshot, e as RuntimeDeviceConnectOptions, X as RuntimeSession, q as RuntimeJoinRoomOptions, r as RuntimeRoomMember, K as RuntimeConnectionTarget, o as RuntimeScopedChannelOptions, p as RuntimeScopedLogicalChannel, m as RuntimePeerStreamOptions, v as RuntimeRawConnection, l as RuntimeChannelDescriptor, V as RuntimePresenceLoopOptions, k as RuntimePeerHealth, t as RuntimeApplicationPayloadReadinessOptions, u as RuntimeConnectionEvent } from './device-status-
|
|
4
|
-
import { R as RuntimeCapabilities, a as RuntimeCapabilityProfile } from './DelegatingRuntimeAdapter-
|
|
5
|
-
import { P as PlutoIpcBridge, I as IpcRuntimeAdapter } from './IpcRuntimeAdapter-
|
|
3
|
+
import { h as RuntimePeerState, s as RuntimeConnectionStateSnapshot, j as RuntimePeerReadinessSnapshot, i as RuntimePeerConnectOptions, C as Connection, n as RuntimeIncomingStream, R as RuntimeClientOptions, H as RuntimeAuthIdentity, f as RuntimeLocalDeviceInfo, g as RuntimeLocalDeviceProfile, c as RuntimeDevice, a as RuntimeManagedSessionOptions, b as RuntimeManagedSession, d as RuntimeDeviceStatusSnapshot, e as RuntimeDeviceConnectOptions, X as RuntimeSession, q as RuntimeJoinRoomOptions, r as RuntimeRoomMember, K as RuntimeConnectionTarget, o as RuntimeScopedChannelOptions, p as RuntimeScopedLogicalChannel, m as RuntimePeerStreamOptions, v as RuntimeRawConnection, l as RuntimeChannelDescriptor, V as RuntimePresenceLoopOptions, k as RuntimePeerHealth, t as RuntimeApplicationPayloadReadinessOptions, u as RuntimeConnectionEvent } from './device-status-CR27Ak7c.js';
|
|
4
|
+
import { R as RuntimeCapabilities, a as RuntimeCapabilityProfile } from './DelegatingRuntimeAdapter-D2_dgabz.js';
|
|
5
|
+
import { P as PlutoIpcBridge, I as IpcRuntimeAdapter } from './IpcRuntimeAdapter-B8rkqNrq.js';
|
|
6
6
|
import { WasmRuntimeAdapter } from './runtime/WasmRuntimeAdapter.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -607,6 +607,12 @@ declare class RuntimeClient {
|
|
|
607
607
|
getApplicationReadyConnections(options?: RuntimeApplicationPayloadReadinessOptions): Connection[];
|
|
608
608
|
onConnection(callback: (connection: Connection) => void): () => void;
|
|
609
609
|
onDisconnection(callback: (connection: Connection) => void): () => void;
|
|
610
|
+
/**
|
|
611
|
+
* Observe protected application payloads after the active transport has
|
|
612
|
+
* normalized them through Connection. Protocol packages use this boundary
|
|
613
|
+
* so Iroh, WebRTC, and MoQ share one intake path.
|
|
614
|
+
*/
|
|
615
|
+
onMessage(callback: (connection: Connection, message: unknown) => void): () => void;
|
|
610
616
|
onConnectionEvent(callback: (event: RuntimeConnectionEvent) => void): () => void;
|
|
611
617
|
forceReconnectSnapshot(): void;
|
|
612
618
|
/** Single-call lifecycle: combines initialize() + start() */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { R as RuntimeClient, a as RuntimePolicySnapshot, P as PeerReconciliationStats, b as PlutoRuntimeAssembly } from './framing-
|
|
2
|
-
export { O as OPENRTC_RUNTIME_POLICY, c as RuntimeJsonFrameHandler, d as RuntimeU32BEFrameHandler, S as ScopedSession, e as Session, f as SessionOptions, g as createRuntimeJsonFrameDecoder, h as createRuntimeU32BEFrameDecoder, i as decodeRuntimeJsonPayload, j as encodeRuntimeJsonFrame, k as encodeRuntimeJsonPayload, l as encodeRuntimeU32BEFrame, m as getRuntimePolicy } from './framing-
|
|
1
|
+
import { R as RuntimeClient, a as RuntimePolicySnapshot, P as PeerReconciliationStats, b as PlutoRuntimeAssembly } from './framing-rPdckqn5.js';
|
|
2
|
+
export { O as OPENRTC_RUNTIME_POLICY, c as RuntimeJsonFrameHandler, d as RuntimeU32BEFrameHandler, S as ScopedSession, e as Session, f as SessionOptions, g as createRuntimeJsonFrameDecoder, h as createRuntimeU32BEFrameDecoder, i as decodeRuntimeJsonPayload, j as encodeRuntimeJsonFrame, k as encodeRuntimeJsonPayload, l as encodeRuntimeU32BEFrame, m as getRuntimePolicy } from './framing-rPdckqn5.js';
|
|
3
3
|
import { l as ConnectDeviceResult, m as ConnectDeviceHooks, n as ConnectDeviceOptions, P as PeerSessionSnapshot, c as ResolvedPeerIdentity, G as GrantScope, o as ProtocolName, p as ProtocolCapability, q as ProtocolCapabilityMap, r as ApplicationPayloadCrypto, s as ApplicationCryptoStreamTools, t as SpaceTokenProvider } from './types-ByZyADCn.js';
|
|
4
4
|
export { u as AppLimits, v as ApplicationCryptoBiStream, w as ApplicationPayloadReadinessOptions, x as ApplicationPayloadRouteOptions, y as ApplicationPayloadSendOptions, A as AuthMode, z as DevicePresenceStatus, D as DiscoveryMode, F as ProtocolBaseName, H as ProtocolImplementationKind, J as ProtocolLocality, K as RouteDescriptor, O as RouteFamily, Q as RouteImplementationKind, S as SignalingMode, T as SpaceAuthMode } from './types-ByZyADCn.js';
|
|
5
5
|
import { A as AuthContext } from './IEngineBridge-C7OT2CRv.js';
|
|
6
|
-
import { R as RuntimeClientOptions, 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, I as ITransport } from './device-status-
|
|
7
|
-
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, G as RuntimeAuthContext, H as RuntimeAuthIdentity, J as RuntimeAutoConnectPolicy, K as RuntimeConnectionTarget, L as RuntimeDevicePresenceStatus, M as RuntimeDeviceStatus, N as RuntimeLogicalChannelFraming, O as RuntimeManagedSessionKind, Q as RuntimeManagedSessionPlatform, S as RuntimePeerLifecycleStatus, T as RuntimePeerScope, U as RuntimePeerSessionSnapshot, V as RuntimePresenceLoopOptions, W as RuntimePresencePolicy, X as RuntimeSession, Y as RuntimeUiConnectionStatus, Z as ScopedChannelOptions, _ as ScopedLogicalChannel, $ as isRuntimeDeviceActive, a0 as isRuntimeDeviceConnectable, a1 as isRuntimeDeviceRoutable } from './device-status-
|
|
8
|
-
import { P as PlutoIpcBridge } from './IpcRuntimeAdapter-
|
|
9
|
-
import { R as RuntimeCapabilities, a as RuntimeCapabilityProfile } from './DelegatingRuntimeAdapter-
|
|
10
|
-
export { b as RuntimeAdapterKind } from './DelegatingRuntimeAdapter-
|
|
6
|
+
import { R as RuntimeClientOptions, 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, I as ITransport } from './device-status-CR27Ak7c.js';
|
|
7
|
+
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, G as RuntimeAuthContext, H as RuntimeAuthIdentity, J as RuntimeAutoConnectPolicy, K as RuntimeConnectionTarget, L as RuntimeDevicePresenceStatus, M as RuntimeDeviceStatus, N as RuntimeLogicalChannelFraming, O as RuntimeManagedSessionKind, Q as RuntimeManagedSessionPlatform, S as RuntimePeerLifecycleStatus, T as RuntimePeerScope, U as RuntimePeerSessionSnapshot, V as RuntimePresenceLoopOptions, W as RuntimePresencePolicy, X as RuntimeSession, Y as RuntimeUiConnectionStatus, Z as ScopedChannelOptions, _ as ScopedLogicalChannel, $ as isRuntimeDeviceActive, a0 as isRuntimeDeviceConnectable, a1 as isRuntimeDeviceRoutable } from './device-status-CR27Ak7c.js';
|
|
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';
|
|
11
11
|
export { ROUTE_DESCRIPTORS, TRANSPORT_LABELS, getRouteDescriptor, isDirectIrohTransportLabel, isIndependentTransportLabel, isIrohBaseTransportLabel, isOptionalTransportLabel, isWebRtcTransportLabel, listRouteDescriptors, normalizeTransportLabel } from './transport/index.js';
|
|
12
12
|
import './runtime/WasmRuntimeAdapter.js';
|
|
13
13
|
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {z,A}from'./chunk-
|
|
1
|
+
import {z,A}from'./chunk-NCRP5ODV.js';export{c as KEY_AGREEMENT_ALGORITHM,b as KEY_AGREEMENT_PUBLIC_KEY_BYTES,g as ScopedSession,v as createRuntimeJsonFrameDecoder,r as createRuntimeU32BEFrameDecoder,t as decodeRuntimeJsonPayload,e as deriveApplicationCryptoKey,f as encodeApplicationKeyAgreementPayload,u as encodeRuntimeJsonFrame,s as encodeRuntimeJsonPayload,q as encodeRuntimeU32BEFrame,d as generateEphemeralKeyAgreement,a as getPreferredProtocolOrder}from'./chunk-NCRP5ODV.js';export{a as isRuntimeDeviceActive,c as isRuntimeDeviceConnectable,b as isRuntimeDeviceRoutable}from'./chunk-CK6WQV7J.js';import'./chunk-BGQX25BO.js';import {g}from'./chunk-L6OUJ6YN.js';export{w as OPENRTC_RUNTIME_POLICY,n as createApplicationCryptoStreamTools,m as createSharedSecretApplicationCrypto,x as getRuntimePolicy,l as isApplicationEncryptedPayload}from'./chunk-MESPJTUA.js';import {p}from'./chunk-34LATQZZ.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';export{a as ROUTE_DESCRIPTORS,e as getRouteDescriptor,f as listRouteDescriptors}from'./chunk-C7YN5MSV.js';function O(t){let i=p({...t});if("auth"in t&&!t.authMode){let n=t.auth;i.authMode=n==="none"?"anonymous":n;}if("identity"in t){let n=t.identity,r=n==="temporary"?"ephemeral":n;!t.deviceIdPersistence&&!t.nodeIdPersistence&&(i.deviceIdPersistence=r),!t.endpointIdPersistence&&!t.nodeIdPersistence&&(i.endpointIdPersistence=r);}return "namespace"in t&&!t.storagePrefix&&(i.storagePrefix=t.namespace),"privacy"in t&&t.strictMode===void 0&&(i.strictMode=!!t.privacy),i}function I(t,i){let n=t.runtime,r=Object.create(n),s=async e=>{if(typeof e!="string")return e;let a=(await n.listDevices()).find(d=>d.deviceId===e);if(!a)throw new Error(`OpenRTC device '${e}' is not currently discoverable.`);return a},c=async e=>({...e,localDeviceId:e?.localDeviceId??await n.getLocalDeviceId()??""}),p=async e=>{let{device:o,scope:a,...d}=e,g=d.deviceId??(typeof o=="string"?o:o?.deviceId)??null,P=d.ticket??(typeof o=="string"?void 0:o?.ticket);g&&!P&&(P=(await s(g).catch(()=>null))?.ticket);let C={...d,scope:a??"session"};return g&&(C.deviceId=g),P&&(C.ticket=P),C},l={list:()=>n.listDevices(),startSession:(e={})=>n.startManagedSession({...e,platform:e.platform??i}),stopSession:e=>n.stopManagedSession(e),listWithStatus:()=>n.listDevicesWithStatus(),watch:e=>n.watchDevices(e),watchWithStatus:e=>n.watchDevicesWithStatus(e),connect:async(e,o)=>n.connectDevice(await s(e),await c(o)),connectWithRetry:async(e,o,a)=>n.connectDeviceWithRetry(await s(e),o,a),disconnect:e=>n.disconnectDevice(e),update:(e,o)=>n.updateDevice(e,o),delete:e=>n.deleteDevice(e),localId:()=>n.getLocalDeviceId(),localInfo:()=>n.getLocalDeviceInfo(),localProfile:e=>n.getLocalDeviceProfile(e),updateLocalName:e=>n.updateLocalDeviceName(e)},u={watch:e=>n.watchPeerStates(e),watchLifecycle:e=>n.watchPeerLifecycle(e),get:e=>n.getPeerState(e),listConnected:()=>n.listConnectedPeers(),connect:e=>n.connectPeer(e),disconnect:(e,o)=>n.disconnectPeer(e,o),forceDisconnect:e=>n.forceDisconnectPeer(e),session:e=>n.getPeerSession(e),sessions:()=>n.listPeerSessions(),waitConnected:(e,o)=>n.waitForConnectedPeer(e,o),readiness:(e,o)=>n.getPeerReadiness(e,o),health:e=>n.getPeerHealth(e),identity:e=>n.resolvePeerIdentity(e),addScope:(e,o)=>n.addPeerScope(e,o),releaseScope:(e,o)=>n.releasePeerScope(e,o),scopes:e=>n.getPeerScopes(e),refresh:()=>n.refreshPeerSnapshot()},m={register:e=>n.registerChannel(e),unregister:e=>n.unregisterChannel(e),list:()=>n.listChannels(),openBi:(e,o,a)=>n.openPeerBi(e,{...a,channelId:o}),openUni:(e,o,a)=>n.openPeerUni(e,{...a,channelId:o}),onIncoming:e=>n.onIncomingStream(e),onIncomingChannel:(e,o)=>n.onIncomingChannelStream(e,a=>{if(a.channel)return o(a)}),connect:async e=>n.connectScopedChannel(await p(e)),connectScoped:e=>n.connectScopedChannel(e)},R={create:e=>n.createRoom(e),join:(e,o)=>n.joinRoom(e,o),leave:e=>n.leaveRoom(e),watch:(e,o)=>n.watchRoom(e,o),members:e=>n.getRoomMembers(e)},y={raw:()=>n.getInvite(),share:e=>n.getTicketWithToken("share",e?.maxConnections??1),grant:(e,o)=>n.getTicketWithToken(e,o?.maxConnections??0),revoke:e=>n.revokeTokensByScope(e)},A={status:()=>n.getRuntimeStatus(),policy:()=>n.getRuntimePolicy(),capabilities:()=>n.getRuntimeCapabilities(),capabilityProfile:()=>n.getCapabilityProfile(),connectionStates:()=>n.getConnectionStates(),onConnectionStateChange:e=>n.onConnectionStateChange(e),connections:()=>n.getConnections(),applicationReadyConnections:e=>n.getApplicationReadyConnections(e),onConnection:e=>n.onConnection(e),onDisconnection:e=>n.onDisconnection(e),onConnectionEvent:e=>n.onConnectionEvent(e),forceReconnectSnapshot:()=>n.forceReconnectSnapshot(),peerReconciliation:()=>n.getPeerReconciliationStats()},w={runtime:n,assembly:t,nodeId:()=>n.getNodeId(),nodeIdFromTicket:e=>n.getNodeIdFromTicket(e),endpointTicket:()=>n.getEndpointTicket(),connectRaw:e=>n.connectRaw(e),openBi:e=>n.openBi(e),openUni:e=>n.openUni(e),isConnected:e=>n.isConnected(e),disconnectNode:e=>n.disconnectNode(e),setAutoConnectExcluded:(e,o)=>n.setAutoConnectExcluded(e,o),notifyNetworkChange:e=>n.notifyNetworkChange(e)};return Object.defineProperties(r,{devices:{get:()=>l,enumerable:true},peers:{get:()=>u,enumerable:true},channels:{get:()=>m,enumerable:true},rooms:{get:()=>R,enumerable:true},tickets:{get:()=>y,enumerable:true},diagnostics:{get:()=>A,enumerable:true},advanced:{get:()=>w,enumerable:true},setAuth:{value:e=>t.setAuthContext(e),enumerable:true,writable:true,configurable:true},setAuthContext:{value:e=>t.setAuthContext(e),enumerable:true,writable:true,configurable:true},syncPlutoAuth:{value:e=>t.syncPlutoAuth(e),enumerable:true,writable:true,configurable:true},bindPlutoAuthHost:{value:()=>t.bindPlutoAuthHost(),enumerable:true,writable:true,configurable:true},signIn:{value:()=>t.signInWithPluto(),enumerable:true,writable:true,configurable:true},signOut:{value:()=>t.signOut(),enumerable:true,writable:true,configurable:true},runtime:{get:()=>n,enumerable:false},_assembly:{get:()=>t,enumerable:false}}),r}function T(t){let i=O(t),n=z(i);return I(n,"web")}T.native=function(t,i){let n=O(t),r=i??g(),s=A(n,r);return I(s,"native")};var ae="https://api.openrtc.app";async function ce(t,i,n){let r=t.replace(/\/$/,""),s=await fetch(`${r}/v1/spaces/${encodeURIComponent(n)}/scoped-auth`,{method:"POST",headers:{Authorization:`Bearer ${i}`,"Content-Type":"application/json"},body:"{}"}),c=await s.json().catch(()=>({}));if(!s.ok){let p=typeof c?.error=="string"?c.error:`enableSpaceAuth failed (${s.status})`;throw new Error(p)}return c}async function pe(t,i,n){let r=await fetch(t,{method:"POST",headers:{Authorization:`Bearer ${i}`,"Content-Type":"application/json"},body:JSON.stringify(n)}),s=await r.json().catch(()=>({}));if(!r.ok){let c=typeof s?.error=="string"?s.error:`mintSpaceToken failed (${r.status})`;throw new Error(c)}if(typeof s?.token!="string"||!s.token.trim())throw new Error("mintSpaceToken response missing token");return s}function S(t){let i=t.apiKey.trim(),n=(t.spaceKey??t.space??"").trim(),r=k(t.sandboxAppId),s=(t.endpointUrl??ae).replace(/\/$/,""),c=t.memberIdStorageKey??`openrtc:space-member:${n}${r?`:sandbox:${r}`:""}`;return async()=>{if(!i||!n)throw new Error("spaceToken requires apiKey and space");let p=null;typeof sessionStorage<"u"?(p=sessionStorage.getItem(c),p||(p=globalThis.crypto?.randomUUID?.()??`member-${Date.now()}`,sessionStorage.setItem(c,p))):p=`member-${Date.now()}`;let l=await fetch(`${s}/v1SpacePublicTokens`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:i,spaceKey:n,memberId:p,...r?{sandboxAppId:r}:{}})}),{text:u,payload:m}=await le(l);if(!l.ok){let y=typeof m?.error=="string"?m.error:u.trim()?u.trim().slice(0,240):`public space token mint failed (${l.status})`;throw new Error(y)}let R=typeof m?.token=="string"?m.token.trim():"";if(!R)throw new Error("public space token response missing token");return {customToken:R}}}function me(t){if(!t.trim())return {};try{let i=JSON.parse(t);return i&&typeof i=="object"?i:{}}catch{return {}}}async function le(t){let i=t.text;if(typeof i=="function"){let r=await i.call(t).catch(()=>"");return {text:r,payload:me(r)}}let n=await t.json().catch(()=>({}));return {text:JSON.stringify(n),payload:n&&typeof n=="object"?n:{}}}function k(t){let i=t?.trim().toLowerCase()??"";if(!i)return "";if(!/^[a-z0-9][a-z0-9-]{0,47}$/.test(i))throw new Error("sandboxAppId must be 1-48 lowercase letters, numbers, or dashes.");return i}function de(t,i){let n=t.trim(),r=k(i);return r?`${n}::sandbox::${r}`:n}var ue=S,Re=S;
|
|
2
2
|
export{T as OpenRTC,S as createPublicSpaceTokenProvider,Re as createSpaceTokenProvider,ce as enableSpaceAuth,pe as mintSpaceToken,de as sandboxSpaceKey,ue as spaceToken};
|
package/dist/openrtc_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DelegatingRuntimeAdapter, W as WasmBridgeOptions } from '../DelegatingRuntimeAdapter-
|
|
1
|
+
import { D as DelegatingRuntimeAdapter, W as WasmBridgeOptions } from '../DelegatingRuntimeAdapter-D2_dgabz.js';
|
|
2
2
|
import '../types-ByZyADCn.js';
|
|
3
3
|
import '../IEngineBridge-C7OT2CRv.js';
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as WasmRuntimeAdapter}from'../chunk-
|
|
1
|
+
export{a as WasmRuntimeAdapter}from'../chunk-BGQX25BO.js';import'../chunk-MESPJTUA.js';import'../chunk-34LATQZZ.js';import'../chunk-QT2ASNI3.js';import'../chunk-C7YN5MSV.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { a2 as RuntimeDeviceActiveOptions, $ as isRuntimeDeviceActive, a0 as isRuntimeDeviceConnectable, a1 as isRuntimeDeviceRoutable } from '../device-status-
|
|
1
|
+
export { a2 as RuntimeDeviceActiveOptions, $ as isRuntimeDeviceActive, a0 as isRuntimeDeviceConnectable, a1 as isRuntimeDeviceRoutable } from '../device-status-CR27Ak7c.js';
|
|
2
2
|
import '../IEngineBridge-C7OT2CRv.js';
|
|
3
3
|
import '../types-ByZyADCn.js';
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { P as PeerReconciliationStats } from '../framing-
|
|
2
|
-
export { O as OPENRTC_RUNTIME_POLICY, b as PlutoRuntimeAssembly, R as RuntimeClient, n as RuntimeFactoryOptions, o as RuntimeJsonFrameDecoderOptions, c as RuntimeJsonFrameHandler, a as RuntimePolicySnapshot, d as RuntimeU32BEFrameHandler, D as ScopedConnectionActorError, p as ScopedConnectionActorErrorKind, q as ScopedConnectionActorHandle, r as ScopedConnectionActorHandleOptions, s as ScopedConnectionActorRegistry, t as ScopedConnectionActorState, u as ScopedConnectionClose, v as ScopedConnectionDial, w as ScopedConnectionKey, x as ScopedLogicalChannelHandle, y as ScopedPreferredTransport, z as concatRuntimeBytes, A as createIpcClient, g as createRuntimeJsonFrameDecoder, h as createRuntimeU32BEFrameDecoder, B as createWasmClient, i as decodeRuntimeJsonPayload, j as encodeRuntimeJsonFrame, k as encodeRuntimeJsonPayload, l as encodeRuntimeU32BEFrame, m as getRuntimePolicy, C as readRuntimeU32BE, E as scopedConnectionKey, F as scopedConnectionKeyToString } from '../framing-
|
|
1
|
+
import { P as PeerReconciliationStats } from '../framing-rPdckqn5.js';
|
|
2
|
+
export { O as OPENRTC_RUNTIME_POLICY, b as PlutoRuntimeAssembly, R as RuntimeClient, n as RuntimeFactoryOptions, o as RuntimeJsonFrameDecoderOptions, c as RuntimeJsonFrameHandler, a as RuntimePolicySnapshot, d as RuntimeU32BEFrameHandler, D as ScopedConnectionActorError, p as ScopedConnectionActorErrorKind, q as ScopedConnectionActorHandle, r as ScopedConnectionActorHandleOptions, s as ScopedConnectionActorRegistry, t as ScopedConnectionActorState, u as ScopedConnectionClose, v as ScopedConnectionDial, w as ScopedConnectionKey, x as ScopedLogicalChannelHandle, y as ScopedPreferredTransport, z as concatRuntimeBytes, A as createIpcClient, g as createRuntimeJsonFrameDecoder, h as createRuntimeU32BEFrameDecoder, B as createWasmClient, i as decodeRuntimeJsonPayload, j as encodeRuntimeJsonFrame, k as encodeRuntimeJsonPayload, l as encodeRuntimeU32BEFrame, m as getRuntimePolicy, C as readRuntimeU32BE, E as scopedConnectionKey, F as scopedConnectionKeyToString } from '../framing-rPdckqn5.js';
|
|
3
3
|
import * as Draft14 from '@moq/net';
|
|
4
4
|
import { U as SignalingOptions, I as ISignalingBackend, R as RuntimeIdentity, d as SignalingEnvelope, f as SignalingSession, a as Device, k as BackendConnectionState, u as AppLimits, G as GrantScope, V as JoinRoomOptions, W as RoomMember, X as IncomingStreamChannelMetadata, s as ApplicationCryptoStreamTools, Y as RoomCreationMode, C as ClientOptions, r as ApplicationPayloadCrypto, D as DiscoveryMode, q as ProtocolCapabilityMap, Z as ScanningLoopOptions, _ as ScanningLoopHandle, $ as RuntimeBootstrapOptions, a0 as RuntimeBootstrapResult, w as ApplicationPayloadReadinessOptions, a1 as ManagedApplicationRouteOptions, a2 as PeerState, a3 as PeerScope, a4 as PeerHealth, a5 as ChannelDescriptor, a6 as JoinRequest, i as NativeConnectParams, j as NativeConnectResult } from '../types-ByZyADCn.js';
|
|
5
|
-
import { C as Connection, K as RuntimeConnectionTarget, v as RuntimeRawConnection } from '../device-status-
|
|
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, a2 as RuntimeDeviceActiveOptions, 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, a3 as Session, a4 as SessionOptions, $ as isRuntimeDeviceActive, a0 as isRuntimeDeviceConnectable, a1 as isRuntimeDeviceRoutable } from '../device-status-
|
|
5
|
+
import { C as Connection, K as RuntimeConnectionTarget, v as RuntimeRawConnection } from '../device-status-CR27Ak7c.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, a2 as RuntimeDeviceActiveOptions, 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, a3 as Session, a4 as SessionOptions, $ as isRuntimeDeviceActive, a0 as isRuntimeDeviceConnectable, a1 as isRuntimeDeviceRoutable } from '../device-status-CR27Ak7c.js';
|
|
7
7
|
import { FirebaseApp } from 'firebase/app';
|
|
8
|
-
import { R as RuntimeCapabilities } from '../DelegatingRuntimeAdapter-
|
|
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 '../DelegatingRuntimeAdapter-
|
|
10
|
-
export { I as IpcRuntimeAdapter, a as IpcRuntimeAdapterOptions, P as NativeBridge, b as NativeIpcFailureKind, P as PlutoIpcBridge, c as PlutoIpcUnlisten, d as classifyNativeIpcFailure, i as isNativeIpcCommandUnavailable } from '../IpcRuntimeAdapter-
|
|
8
|
+
import { R as RuntimeCapabilities } from '../DelegatingRuntimeAdapter-D2_dgabz.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 '../DelegatingRuntimeAdapter-D2_dgabz.js';
|
|
10
|
+
export { I as IpcRuntimeAdapter, a as IpcRuntimeAdapterOptions, P as NativeBridge, b as NativeIpcFailureKind, P as PlutoIpcBridge, c as PlutoIpcUnlisten, d as classifyNativeIpcFailure, i as isNativeIpcCommandUnavailable } from '../IpcRuntimeAdapter-B8rkqNrq.js';
|
|
11
11
|
export { WasmRuntimeAdapter } from './WasmRuntimeAdapter.js';
|
|
12
12
|
export { TauriRuntimeAdapter, TauriRuntimeAdapterOptions, createTauriIpcBridge } from './tauri.js';
|
|
13
13
|
import '../IEngineBridge-C7OT2CRv.js';
|
package/dist/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{y as RuntimeClient,h as RuntimeConnectionController,l as ScopedConnectionActorError,o as ScopedConnectionActorHandle,p as ScopedConnectionActorRegistry,k as clog,w as concatRuntimeBytes,j as correlationForDriveGrantScope,A as createIpcClient,v as createRuntimeJsonFrameDecoder,r as createRuntimeU32BEFrameDecoder,z as createWasmClient,t as decodeRuntimeJsonPayload,u as encodeRuntimeJsonFrame,s as encodeRuntimeJsonPayload,q as encodeRuntimeU32BEFrame,x as readRuntimeU32BE,i as renderCorrelationFields,m as scopedConnectionKey,n as scopedConnectionKeyToString}from'../chunk-
|
|
1
|
+
export{y as RuntimeClient,h as RuntimeConnectionController,l as ScopedConnectionActorError,o as ScopedConnectionActorHandle,p as ScopedConnectionActorRegistry,k as clog,w as concatRuntimeBytes,j as correlationForDriveGrantScope,A as createIpcClient,v as createRuntimeJsonFrameDecoder,r as createRuntimeU32BEFrameDecoder,z as createWasmClient,t as decodeRuntimeJsonPayload,u as encodeRuntimeJsonFrame,s as encodeRuntimeJsonPayload,q as encodeRuntimeU32BEFrame,x as readRuntimeU32BE,i as renderCorrelationFields,m as scopedConnectionKey,n as scopedConnectionKeyToString}from'../chunk-NCRP5ODV.js';export{a as isRuntimeDeviceActive,c as isRuntimeDeviceConnectable,b as isRuntimeDeviceRoutable}from'../chunk-CK6WQV7J.js';export{a as WasmRuntimeAdapter}from'../chunk-BGQX25BO.js';export{b as TauriRuntimeAdapter,a as createTauriIpcBridge}from'../chunk-RRCARL4S.js';export{h as IpcRuntimeAdapter,e as classifyNativeIpcFailure,f as isNativeIpcCommandUnavailable}from'../chunk-L6OUJ6YN.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-MESPJTUA.js';import'../chunk-34LATQZZ.js';import'../chunk-QT2ASNI3.js';import'../chunk-C7YN5MSV.js';
|
package/dist/runtime/tauri.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { I as IpcRuntimeAdapter, N as NativeIpcBridgeOptions, P as PlutoIpcBridge } from '../IpcRuntimeAdapter-
|
|
1
|
+
import { I as IpcRuntimeAdapter, N as NativeIpcBridgeOptions, P as PlutoIpcBridge } from '../IpcRuntimeAdapter-B8rkqNrq.js';
|
|
2
2
|
import '../types-ByZyADCn.js';
|
|
3
|
-
import '../DelegatingRuntimeAdapter-
|
|
3
|
+
import '../DelegatingRuntimeAdapter-D2_dgabz.js';
|
|
4
4
|
import '../IEngineBridge-C7OT2CRv.js';
|
|
5
5
|
|
|
6
6
|
/**
|
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-RRCARL4S.js';import'../chunk-L6OUJ6YN.js';import'../chunk-MESPJTUA.js';import'../chunk-34LATQZZ.js';import'../chunk-QT2ASNI3.js';import'../chunk-C7YN5MSV.js';
|