import { P as PlutoIpcBridge } from './ipc-CPnNwv6f.js'; import { O as Options, C as Client } from './types-C4TIUgOJ.js'; export { A as AttestationProvider, a as AuthProvider, b as Avenue, c as Channel, d as Connection, D as DeviceOptions, e as DeviceProfile, f as Devices, E as EnrolledDevice, R as Room, g as RoomOptions, S as Space, h as SpaceOptions, i as State, T as Ticket, j as TicketOptions, k as Transports, U as UsageUpdate, l as UsageWarning } from './types-C4TIUgOJ.js'; import './coreClient.js'; import './assembly-BTzwQuwI.js'; import './types-D67HlF0p.js'; import './ITransport-yaruAmx3.js'; import './capabilities-BwzPe51I.js'; /** * Create a lazy OpenRTC 2.0 browser client. Construction validates only local * input and performs no network, storage, auth, timer, WASM, or transport work. */ declare function OpenRTC(options: Options): Client; declare namespace OpenRTC { var native: (options: Options, bridge?: PlutoIpcBridge) => Client; } /** * Public developer-facing error taxonomy for OpenRTC. * * Keep this surface small: apps switch on `code` / `plane` / `retryable` and * must not invent peer dial/retry owners from free-form status strings. * * Retry contract: * - Retry only when `retryable === true` and `plane` is `coordination`, * `transport`, or transient `auth`. * - Dead-letter `admission`, `budget`, security/ACL, and non-retryable auth. * - Error codes annotate projection; they never own dial, presence, or settlement. */ type ErrorPlane = 'coordination' | 'admission' | 'transport' | 'auth' | 'budget' | 'delivery' | 'internal'; declare const ERROR_CODES: { readonly AUTH_NOT_READY: "auth/not-ready"; readonly AUTH_DENIED: "auth/denied"; readonly AUTH_EXPIRED: "auth/expired"; /** A removed installation must complete fresh consumer authentication before re-enrollment. */ readonly AUTH_DEVICE_REENROLLMENT_REQUIRED: "auth/device-reenrollment-required"; readonly ADMISSION_DENIED: "admission/denied"; readonly ADMISSION_SCOPE_MISMATCH: "admission/scope-mismatch"; readonly BUDGET_EXCEEDED: "budget/exceeded"; readonly BUDGET_STALE: "budget/stale"; /** Gateway avenue escrow exhausted; re-auth renews budget and may replay once. */ readonly BUDGET_RENEWAL_REQUIRED: "budget/renewal-required"; readonly COORDINATION_DISCONNECTED: "coordination/disconnected"; readonly COORDINATION_PROTOCOL: "coordination/protocol"; readonly COORDINATION_RATE_LIMITED: "coordination/rate-limited"; readonly COORDINATION_SERVICE_UNAVAILABLE: "coordination/service-unavailable"; readonly TRANSPORT_DIAL_EXHAUSTED: "transport/dial-exhausted"; readonly TRANSPORT_UNAVAILABLE: "transport/unavailable"; readonly TRANSPORT_TICKET_MISSING: "transport/ticket-missing"; readonly DELIVERY_NOT_READY: "delivery/not-ready"; readonly INTERNAL: "internal/error"; }; type ErrorCode = (typeof ERROR_CODES)[keyof typeof ERROR_CODES] | (string & {}); interface ErrorOptions { code: ErrorCode; message: string; retryable: boolean; plane: ErrorPlane; cause?: unknown; generation?: number; transportGeneration?: number; routeGeneration?: number; revision?: number; } declare class RTCError extends Error { readonly name: string; readonly code: ErrorCode; readonly retryable: boolean; readonly plane: ErrorPlane; readonly generation?: number; readonly transportGeneration?: number; readonly routeGeneration?: number; readonly revision?: number; constructor(options: ErrorOptions); static is(value: unknown): value is RTCError; /** True when an app may retry the *same logical operation* without inventing a peer dial owner. */ static shouldAppRetry(error: unknown): boolean; toJSON(): Record; } interface ErrorProjection { errorCode?: ErrorCode; retryable?: boolean; errorPlane?: ErrorPlane; } /** Build projection annotations without owning lifecycle. */ declare function projectError(error: unknown): ErrorProjection; declare function createError(code: ErrorCode, message: string, options: Omit & { retryable?: boolean; plane?: ErrorPlane; }): RTCError; /** * Map gateway protocol / connect failures and common message shapes into the * public taxonomy. Prefer structured `code`/`retryable` when present. */ declare function classifyError(error: unknown): RTCError; export { Client, ERROR_CODES, type ErrorCode, type ErrorOptions, type ErrorPlane, type ErrorProjection, OpenRTC, Options, RTCError, classifyError, createError, projectError };