import type { ToolPluginCore, ToolResult } from "gui-chat-protocol"; import type { MulmoScriptData, MulmoScriptExecuteContext, SaveMulmoScriptArgs } from "./types"; /** Failure half of every outcome below. `code` preserves the hosts' * HTTP contract (bad_request → 400, not_found → 404) without the package * knowing anything about HTTP. */ export interface MulmoScriptFailure { ok: false; code: "bad_request" | "not_found"; error: string; } export type SaveMulmoScriptOutcome = ({ ok: true; message: string; } & MulmoScriptData) | MulmoScriptFailure; export type UpdateMulmoScriptOutcome = { ok: true; } | MulmoScriptFailure; /** * Unified save-or-reopen for the presentMulmoScript tool call. `script` * (create new) and `filePath` (existing) are mutually exclusive. Never * throws on bad input — validation failures come back as discriminated * failures so host routes stay thin adapters. `autoGenerateMovie` is NOT * handled here: movie generation needs host backends (mulmocast/ffmpeg), * so hosts that support it trigger it from the returned `filePath`. */ export declare function executeMulmoScriptSave(context: MulmoScriptExecuteContext, args: SaveMulmoScriptArgs, now?: Date): Promise; /** Overwrite one beat of an existing script (the View's per-beat source * editor). Validates the body shape + beat schema, bounds-checks the index * against the script on disk, and writes the whole file back. */ export declare function executeUpdateBeat(context: MulmoScriptExecuteContext, body: unknown): Promise; /** Overwrite the whole script (the View's full-source editor / deck-editor * auto-save). The body's `script` is schema-validated by * `validateUpdateScriptBody` before the write. */ export declare function executeUpdateScript(context: MulmoScriptExecuteContext, body: unknown): Promise; /** ToolResult-shaped wrapper over `executeMulmoScriptSave` for runtime hosts * (e.g. MulmoTerminal's package loader), where the tool call resolves to a * ToolResult rather than an HTTP response. Failures are narrate-only * (message, no data) so the agent can self-correct. */ export declare function executeMulmoScript(context: MulmoScriptExecuteContext, args: SaveMulmoScriptArgs): Promise>; /** Non-Vue plugin core for runtime hosts that register the package directly. * MulmoClaude consumes only TOOL_DEFINITION + the execute functions in its * own routes, so it doesn't use this. */ export declare const pluginCore: ToolPluginCore; //# sourceMappingURL=plugin.d.ts.map