import type { ToolDefinition } from "../../tools/ToolTypes.js"; /** * Image generation, as an ordinary tool. * * The original design gave media its own orchestration route, which forced * every request to be classified as "media or not" up front and duplicated the * planning path. It is simpler and more accurate to treat generation as a tool * the orchestrator may call: "generate an image of a puppy" becomes a plan with * one task, exactly like any other single-source question, and a request that * needs both research *and* an image needs no special case at all. * * The tool returns an `ArtifactRef`. Image bytes are written to disk and * referenced — never inlined into evidence or an answer, which would blow the * context budget and put base64 in the trace. */ export interface ImageGenerationConfig { /** OpenAI-compatible `/v1/images/generations` endpoint. */ baseUrl: string; model: string; apiKey?: string; /** Where artifacts are written. Defaults to `/.codali/artifacts`. */ artifactDir?: string; timeoutMs?: number; size?: string; } export interface ImageToolOptions { config: ImageGenerationConfig; workspaceRoot: string; runId?: string; fetchImpl?: typeof fetch; /** Called for each artifact so the gateway can surface it in the result. */ onArtifact?: (artifact: { id: string; type: string; path: string; mimeType: string; model: string; prompt: string; }) => void; } export declare const IMAGE_TOOL_NAME = "media_generate_image"; export declare const createImageGenerationTool: (options: ImageToolOptions) => ToolDefinition; //# sourceMappingURL=ImageGenerationTool.d.ts.map