/** Console-client plumbing shared by the Cloud adapters (cloudSandbox, * hostedStore, cloudConnections, cloudApps): the wire-legal error table, the * enveloped-error raise, and the key-authed sender. Behavior still comes * ONLY from each adapter's constructor arguments (adapter rule — see * selectSandbox/selectStore in compose-store.ts); nothing here reads the * environment. */ /** Console error codes forwarded as-is when they are wire-legal VendoError * codes (same posture as the cloudApps share/publish client). The console's * "unauthorized"/"quota-exhausted" have no VendoError twin; unknown codes fall * to each adapter's own tail, and the 402/401 → cloud-required mapping handles * the meter/key cases. */ export declare const CLOUD_ERROR_CODES: ReadonlySet; export declare const toArrayBuffer: (value: Uint8Array) => ArrayBuffer; /** Parse the console's error envelope and throw. The console's meter gate * (quota-exhausted) rides HTTP 402 — the one "pay/upgrade to proceed" signal, * same mapping as cloudConnections. 401 (bad/revoked key) is the same "fix * your Cloud standing" story for the host operator, so it keeps the ENG-295 * client's cloud-required mapping — with the server's own message preserved. * Wire-legal codes forward as VendoErrors, and a rate limit or an upstream * failure reads as one from the bare status when the envelope has no code we * know — a plain Error there fails every `instanceof VendoError` downstream * (the wire's status mapping, the harness's overlay, the store's retry), so a * 429 arrived as "unhandled wire error". Anything else (unknown codes on other * statuses) goes to the adapter's own `onUnknownCode` tail. */ export declare function raiseCloudError(response: Response, service: string, onUnknownCode: (code: string | undefined, message: string) => never): Promise; /** The key-authed console sender: Bearer auth + deployment identity (the * console meters usage from real traffic) + per-request abort timeout, raising * through the adapter's own error mapping on any non-2xx. */ export declare function consoleSender(options: { base: string; mountPath: string; apiKey: string; timeoutMs: number; fetchImpl: typeof fetch; raise: (response: Response) => Promise; /** Headers this ONE wire adds to every request — the store wire's capability * list, and nothing at all on the wires that declare none. Scoped here rather * than folded into the identity headers because those ride every Cloud door * alike, and a capability is a statement about one protocol. */ headers?: Record; }): (path: string, init?: RequestInit) => Promise;