export declare class CloudHttpError extends Error { readonly status: number; readonly code: string; readonly retryAfterMs?: number | undefined; readonly minProtocolVersion?: number | undefined; /** The cloud's id for the request (`request_id` of a problem answer, or `x-request-id`), for support. */ readonly requestId?: string | undefined; constructor(status: number, code: string, message: string, retryAfterMs?: number | undefined, minProtocolVersion?: number | undefined, /** The cloud's id for the request (`request_id` of a problem answer, or `x-request-id`), for support. */ requestId?: string | undefined); } export interface CloudRequestOptions { method?: "GET" | "POST" | "PUT"; token?: string; body?: unknown; /** Raw bytes instead of JSON (artifact chunks). */ raw?: { body: Uint8Array; contentType: string; headers?: Record; }; timeoutMs?: number; /** Decoded response bytes; sync supplies its smaller protocol limit. */ maxResponseBytes?: number; fetchImpl?: typeof fetch; /** More request headers (the public API's `x-skillhook-client`). */ headers?: Record; } export interface CloudResponse { status: number; body: T; headers: Headers; } /** * Sends one request; non-2xx answers become `CloudHttpError` with what the body says when it is JSON: `error` / `message` * from the agent API, `code` / `detail` / `request_id` from the public API's RFC 9457 problems, `error` / * `error_description` from the OAuth-style answers of a browser sign-in (`cloud login`). */ export declare function cloudRequest(baseUrl: string, path: string, options?: CloudRequestOptions): Promise>;