export type FilesystemCapability = "none" | "readonly" | "persistent" | "ephemeral"; export interface AdapterCapabilities { /** Whether the host supports streaming responses (ReadableStream bodies). */ streaming: boolean; /** Filesystem access model of the host. */ filesystem: FilesystemCapability; /** Whether the host can run image transforms at request time. */ imageRuntime: boolean; /** Whether the host allows background work after the response completes. */ backgroundWork: boolean; /** Maximum request body size in bytes accepted by the host (if any). */ maxBodySize?: number; } export interface CapabilityOptions { streaming?: boolean; filesystem?: FilesystemCapability; imageRuntime?: boolean; backgroundWork?: boolean; maxBodySize?: number; } /** Default capabilities for a full-featured long-lived Node/Bun process. */ export declare const DEFAULT_CAPABILITIES: AdapterCapabilities; /** Default capabilities for a stateless serverless function (Vercel/Netlify). */ export declare const SERVERLESS_CAPABILITIES: AdapterCapabilities; /** Default capabilities for an edge runtime (read-only filesystem). */ export declare const EDGE_CAPABILITIES: AdapterCapabilities; export declare function createCapabilities(options?: CapabilityOptions): AdapterCapabilities; /** True when the host supports streaming responses (streaming !== false). */ export declare function supportsStreaming(capabilities?: Pick): boolean; /** True when the host can write to persistent storage (for ISR/cache/image writes). */ export declare function supportsPersistentStorage(capabilities: Pick): boolean; /** True when the host exposes a writable filesystem at build/runtime. */ export declare function supportsWritableFilesystem(capabilities: Pick): boolean; export interface CapabilityDiagnostics { ok: boolean; problems: string[]; } /** * Validates a capability declaration and reports incompatible combinations. * Used by the build pipeline so invalid hosts fail at build time instead of * producing a broken runtime. */ export declare function validateCapabilities(capabilities: AdapterCapabilities, features?: { isr?: boolean; images?: boolean; streaming?: boolean; }): CapabilityDiagnostics;