import type { GodotRunner } from './godot-runner.js'; import type { HandlerResult, OperationParams } from '../mcp.types.js'; /** * Stderr marker godot_operations.gd prints when a scene-load probe finds a * dependency that exists on disk but was never imported. `executeSceneOp` * reacts by running the import step and retrying the operation once, capped * structurally at one retry (see `executeSceneOp`). */ export declare const IMPORT_NEEDED_MARKER = "[IMPORT_NEEDED]"; /** * Wraps the execute + empty-stdout-check + try/catch around a headless GDScript * operation. Used by the 15 scene/node mutation handlers in tools/scene-tools.ts * and tools/node-tools.ts to eliminate identical error-handling duplication. * * Handlers retain control of: parameter normalization, project/scene validation, * field validation, and constructing the `params` object — those run before the * call. Returns the canonical `Result` shape; * the dispatch edge maps it back to the MCP wire envelope. * * Reacts to the `[IMPORT_NEEDED]` stderr marker (see `IMPORT_NEEDED_MARKER`) * by running `runner.importAssets` and retrying the operation exactly once, * capped structurally rather than by a loop — a marker on the retried run * falls through to normal error handling instead of importing again. A run * that already reported applied work is never retried at all (see * `reportsAppliedWork`): the replay would redo what it already saved. */ export declare function executeSceneOp(runner: GodotRunner, operation: string, params: OperationParams, projectPath: string, failurePrefix: string, emptyStdoutSolutions: string[], exceptionSolutions?: string[], options?: { parseStdoutAsJson?: boolean; mutatesSceneFile?: boolean; }): Promise; //# sourceMappingURL=headless-op.d.ts.map