import type { ImageConfig, ImageEditRequest, ImageGenerateRequest, ImageOperationSubmission, ImageProvider, ImageResult, OperationHandle } from '../types/images.js'; import { type FamilyRuntime } from '../ops/family-telemetry.js'; /** * Routes image generation and edits to registered providers, as operations with status, * cancellation, and events. */ export declare class ImageManager { private readonly config; private readonly providers; private operationCounter; private readonly telemetry; constructor(config?: ImageConfig, runtime?: FamilyRuntime); /** * Registers a provider under a name. Throws for a provider without declared capabilities. Returns * the manager, for chaining. */ registerImageProvider(name: string, provider: ImageProvider): this; /** Whether a provider is registered. */ hasImageProvider(name: string): boolean; /** Every registered provider's name. */ listImageProviders(): string[]; /** Generates images and waits for the result. */ generate(request: ImageGenerateRequest): Promise; /** Edits an image and waits for the result. */ edit(request: ImageEditRequest): Promise; /** Starts an image operation and returns its handle without waiting. */ submit(submission: ImageOperationSubmission): OperationHandle; submit(request: ImageGenerateRequest): OperationHandle; submit(request: ImageEditRequest): OperationHandle; submit(operation: 'generate', request: ImageGenerateRequest): OperationHandle; submit(operation: 'edit', request: ImageEditRequest): OperationHandle; private readonly now; private createOperationId; private execute; private runOperation; /** * Resolves remote and stored inputs to validated bytes, when a resolver is configured. * * Runs before capability checks, so a provider that reads only bytes can still accept a URL input * — and every input, whatever its location, passes the same MIME, byte, and pixel checks. */ private resolveInputs; private resolveProvider; private inspectInputSafety; private inspectOutputSafety; }