import { type DebugProxySettings } from "./env.js"; import { closeDebugProxyCaptureStore, getDebugProxyCaptureStore, persistEventPayload, safeJsonString } from "./store.sqlite.js"; type DebugProxyCaptureStoreLike = Pick, "upsertSession" | "endSession" | "recordEvent">; export type DebugProxyCaptureRuntimeDeps = { getStore?: (dbPath: string, blobDir: string) => DebugProxyCaptureStoreLike; closeStore?: typeof closeDebugProxyCaptureStore; persistEventPayload?: (store: DebugProxyCaptureStoreLike, payload: Parameters[1]) => ReturnType; safeJsonString?: typeof safeJsonString; fetchTarget?: typeof globalThis; }; export declare function isDebugProxyGlobalFetchPatchInstalled(): boolean; export declare function initializeDebugProxyCapture(mode: string, resolved?: DebugProxySettings, deps?: DebugProxyCaptureRuntimeDeps): void; export declare function finalizeDebugProxyCapture(resolved?: DebugProxySettings, deps?: DebugProxyCaptureRuntimeDeps): void; export declare function captureHttpExchange(params: { url: string; method: string; requestHeaders?: Headers | Record | undefined; requestBody?: BodyInit | Buffer | string | null; response: Response; transport?: "http" | "sse"; flowId?: string; meta?: Record; }, resolved?: DebugProxySettings, deps?: DebugProxyCaptureRuntimeDeps): void; export declare function captureWsEvent(params: { url: string; direction: "outbound" | "inbound" | "local"; kind: "ws-open" | "ws-frame" | "ws-close" | "error"; flowId: string; payload?: string | Buffer; closeCode?: number; errorText?: string; meta?: Record; }): void; export {};