/** * Media generation (2026-10): bridge-side provider adapters. * * A workflow `media` node names a provider + model (+ optional baseUrl) and * the bridge calls the provider with the AGENT'S OWN key (no server key, * consistent with the browser auto-answer direct-call loop). The returned * bytes are handed back to the hub as a base64 artifact, where they are stored * as a real Document (image / video / audio previewable in the run canvas). * * Adding a provider is a matter of one adapter here plus (optionally) a * catalog entry in the backend (`media-generation.catalog.ts`). Any * OpenAI-compatible image/audio endpoint also works with NO code by using * provider `openai-compatible` + a custom `baseUrl`. */ export interface MediaRequest { mediaKind: 'image' | 'video' | 'audio'; provider: string; model: string; prompt: string; image?: string; voice?: string; baseUrl?: string; apiKey: string | null; } export interface MediaResult { buffer: Buffer; mime: string; ext: string; log?: string[]; } export declare function generateMedia(req: MediaRequest): Promise;