import type { AssetType } from "./types.js"; export declare const MODES: readonly ["inline_svg", "external_prompt_only", "api"]; export type Mode = (typeof MODES)[number]; /** * Which modes are valid for which asset type. Derived from research + the * routing table. Keep in lockstep with docs/RESEARCH_MAP.md. */ export declare const MODES_BY_ASSET_TYPE: Record; /** * Provider API-key availability, detected from process.env. * One flag per provider family; asset generators pick the one(s) they need. */ export interface ApiAvailability { openai: boolean; google: boolean; ideogram: boolean; recraft: boolean; flux: boolean; stability: boolean; leonardo: boolean; fal: boolean; /** Freepik — Mystic, Flux 2 Pro, AI Icon (SVG), editing surface. 5 EUR free trial. */ freepik: boolean; /** Pixazo — Azure APIM gateway. Free tier is real but transfers IP ownership to Appy Pie LLP. */ pixazo: boolean; /** NVIDIA NIM — 1,000 requests/month free, no card. Hosts Flux.1-dev, Flux.2-klein, SANA, SDXL. */ nvidia: boolean; huggingface: boolean; /** Pollinations is zero-key; true unless explicitly disabled. */ pollinations: boolean; /** Stable Horde is anonymous-queue; true unless explicitly disabled. */ horde: boolean; /** Cloudflare Workers AI — free 10k neurons/day; needs token + account id. */ cloudflare: boolean; /** Replicate — universal catalog; signup credit then paid. */ replicate: boolean; /** User-owned ComfyUI endpoint (Modal / self-host) for Phase-4 brand LoRA. */ comfyui: boolean; } export declare function detectApiAvailability(): ApiAvailability; /** * Map a model id (from data/model-registry.json) to the provider-key flag * that enables it. Used to pre-flight api-mode calls and to decide whether * "api" should appear in modes_available for a given routing decision. * * Returns null for paste-only providers (midjourney / adobe / krea) and any * strategy id — those families never report api-mode availability. */ export declare function providerKeyForModel(modelId: string): keyof ApiAvailability | null; export declare function isApiAvailableFor(modelId: string, avail: ApiAvailability): boolean; /** * True if AT LEAST ONE model in the chain (primary + fallback) has an * available provider key. This is the condition for "api" to appear in * modes_available; if false, api is reported as unavailable and the user * gets a hint about which env var to set. */ export declare function anyApiAvailable(primary: string, fallback: string[], avail: ApiAvailability): boolean; /** * Given the asset type, the routing decision, and the current env, return * the concrete set of modes the caller can actually use RIGHT NOW. Used * by asset_enhance_prompt and asset_capabilities so Claude knows what to * offer the user. */ export declare function availableModes(assetType: AssetType, primary: string, fallback: string[], avail: ApiAvailability): Mode[]; export interface SelectContext { asset_type: AssetType; primary_model: string; fallback_models: string[]; availability: ApiAvailability; } /** * Auto-selector. When the caller does not specify a mode, pick one. * Preference order encodes the "zero friction wins" principle: * 1. inline_svg (zero network, zero key) * 2. api (server-driven pipeline with validation) * 3. external_prompt_only (manual paste) * If the caller specifies a mode, it is validated and returned. * Throws if the request is incompatible with the asset type or env. */ export declare function selectMode(requested: Mode | "auto" | undefined, ctx: SelectContext): { mode: Mode; reason: string; }; //# sourceMappingURL=modes.d.ts.map