/** * Descriptor-safe Sharp runtime capture and bounded image optimization. * * This module is intentionally not a package entry point. The public extension * binds it to the exact Sharp dependency declared by the extension manifest. */ import type { ImageOptimizationEngine, ImageOptimizationRequest, ImageOptimizationResult } from "veryfront/extensions/image"; /** Provider-level resource limits, independent of core's stricter boundary. */ export declare const SHARP_IMAGE_LIMITS: Readonly<{ maxInputBytes: number; maxDecodedPixels: 100000000; maxDimension: 32768; maxTargetWidths: 64; maxFormats: 4; maxVariants: 260; maxOutputBytesPerVariant: number; maxTotalOutputBytes: number; }>; export interface SharpImageLimits { readonly maxInputBytes: number; readonly maxDecodedPixels: number; readonly maxDimension: number; readonly maxTargetWidths: number; readonly maxFormats: number; readonly maxVariants: number; readonly maxOutputBytesPerVariant: number; readonly maxTotalOutputBytes: number; } /** Captured calls into one exact Sharp module implementation. */ export interface CapturedSharpRuntime { readonly versions: Readonly>; create(input: Uint8Array, options: Readonly>): object; autoOrient(pipeline: object): object; metadata(pipeline: object): unknown; clone(pipeline: object): object; resize(pipeline: object, options: Readonly>): object; webp(pipeline: object, options: Readonly>): object; avif(pipeline: object, options: Readonly>): object; jpeg(pipeline: object, options: Readonly>): object; png(pipeline: object, options: Readonly>): object; toBuffer(pipeline: object, options: Readonly>): unknown; } /** Capture Sharp's callable, versions, and prototype methods exactly once. */ export declare function captureSharpRuntime(value: unknown): CapturedSharpRuntime; /** * Internal engine used by the public extension and focused fake-runtime tests. * Every call snapshots one request and creates an independent Sharp pipeline. */ export declare class BoundSharpImageOptimizationEngine implements ImageOptimizationEngine { #private; readonly cacheIdentity: string; constructor(runtime: CapturedSharpRuntime, cacheIdentity: string, limits?: SharpImageLimits); optimize(request: ImageOptimizationRequest): Promise; } //# sourceMappingURL=sharp-runtime.d.ts.map