/**
 * Image Generation capability — generate images via BlockRun API.
 * Uses x402 payment on Solana or Base.
 */
import type { CapabilityHandler } from '../agent/types.js';
import type { ContentLibrary } from '../content/library.js';
/**
 * Models that accept a reference image via /v1/images/image2image. Currently
 * limited to OpenAI's edit endpoint — Gemini Nano Banana Pro and Grok Imagine
 * Image Pro need gateway-side support before they can be wired in here.
 */
export declare const EDIT_SUPPORTED_MODELS: Set<string>;
export declare const REFERENCE_IMAGE_MAX_BYTES = 4000000;
/**
 * Normalize a reference image into a base64 data URI for the gateway. The
 * /v1/images/image2image endpoint validates `image` against /^data:image\//,
 * so http(s) URLs and local paths both have to be inlined client-side before
 * posting. Already-formed data URIs pass through.
 */
export declare function resolveReferenceImage(input: string, workingDir: string): Promise<string>;
export interface ImageGenDeps {
    /** Optional Content library for auto-recording generations into a piece. */
    library?: ContentLibrary;
    /** Invoked after successful content-linked generation; lets callers persist. */
    onContentChange?: () => void | Promise<void>;
}
/**
 * Build the ImageGen capability. Passing `deps.library` enables the
 * contentId flow: pre-flight budget check + post-generation asset
 * recording. With no deps, behavior matches the pre-factory version.
 */
export declare function createImageGenCapability(deps?: ImageGenDeps): CapabilityHandler;
/** Back-compat static capability for callers that don't want the Content bridge. */
export declare const imageGenCapability: CapabilityHandler;
export interface ImagePollBody {
    data?: {
        b64_json?: string;
        url?: string;
        revised_prompt?: string;
    }[];
    error?: unknown;
    status?: string;
}
export type ImagePollOutcome = {
    kind: 'completed';
    body: ImagePollBody;
} | {
    kind: 'failed';
    error?: unknown;
} | {
    kind: 'timed_out';
} | {
    kind: 'poll_http_error';
    status: number;
    bodyPreview: string;
};
export interface PollImageJobOptions {
    /** Total wall-clock ceiling. Defaults to 5 min (matches videogen scale). */
    maxWaitMs?: number;
    /** Sleep between polls. Defaults to 3 s. */
    intervalMs?: number;
}
export declare function pollImageJob(pollEndpoint: string, headers: Record<string, string>, signal: AbortSignal, options?: PollImageJobOptions): Promise<ImagePollOutcome>;
