export declare class ToolInputError extends Error { constructor(message: string); } /** * All generated deliverables land under a single root so the archive tool, * cleanup jobs, and any "list my outputs" tool can find them consistently. * Override with OUTPUT_ROOT env var if you already have a convention. */ export declare const OUTPUT_ROOT: string; /** * Resolves a safe absolute path under OUTPUT_ROOT for a given logical * filename, creating the directory if needed. If `unique` is true (default), * appends a timestamp to avoid clobbering prior runs. */ export declare function resolveOutputPath(filename: string, opts?: { subdir?: string; unique?: boolean; }): Promise<{ absPath: string; relPath: string; }>; /** * Writes to a temp file in the same directory then renames into place, so a * crash or concurrent read never observes a half-written deliverable. */ export declare function atomicWriteFile(absPath: string, data: Buffer | string): Promise; /** * Validates an input file exists, is a regular file, and isn't absurdly * large, before any tool tries to parse/embed it. Throws ToolInputError with * a message safe to surface back to the model/user. */ export declare function assertReadableFile(filePath: string, opts?: { maxBytes?: number; label?: string; }): Promise; /** Wraps a tool's execute body so failures return a structured, model-readable result instead of an opaque throw/crash. */ export declare function safeExecute(fn: () => Promise): Promise<{ success: true; } & T | { success: false; error: string; }>; //# sourceMappingURL=outputPaths.d.ts.map