import type { GodotRunner, OperationParams, ToolResponse } from './godot-runner.js'; export declare const MAX_RUNTIME_ERROR_CONTEXT_LINES = 30; /** * 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. Success-shape construction (the JSON wrapping the GDScript stdout) is * also unchanged: this helper just returns `{ content: [{ type: 'text', text: stdout }] }`, * which is the exact shape every handler produced previously. */ export declare function executeSceneOp(runner: GodotRunner, operation: string, params: OperationParams, projectPath: string, failurePrefix: string, emptyStdoutSolutions: string[], exceptionSolutions?: string[], options?: { parseStdoutAsJson?: boolean; }): Promise; export type ParseResult = { ok: true; data: T; } | { ok: false; response: ToolResponse; }; /** * Parse a JSON frame returned by the McpBridge. On failure, returns a * structured error response so handlers can short-circuit with one branch. * `context` should describe which bridge command produced the frame. */ export declare function parseBridgeJson(responseStr: string, context: string): ParseResult; /** * Attach captured runtime errors as a `warnings` array on a tool response * payload. No-op when there are no runtime errors. Truncates to * `MAX_RUNTIME_ERROR_CONTEXT_LINES` to keep payloads bounded. */ export declare function attachRuntimeWarnings(target: Record, runtimeErrors: string[]): void; //# sourceMappingURL=handler-helpers.d.ts.map