import { type EditFileInput, type ReadFileRequest, type StructuredCommandInput } from "./schemas"; /** * Format an error into a string message */ export declare function formatError(error: unknown): string; export declare function getEditorSizeError(input: EditFileInput): string | null; /** * Create a timeout-wrapped promise */ export declare class TimeoutError extends Error { readonly timeoutMs: number; constructor(message: string, timeoutMs: number); } export declare function withTimeout(promise: Promise, ms: number, message: string): Promise; export declare function formatReadFileQuery(request: ReadFileRequest): string; export declare function getReadFileRangeError(request: ReadFileRequest): string | null; /** * Some models emit a file's line range as a separate array element instead of * placing start_line/end_line on the same object as its path. Fold such * orphan range entries into the preceding file entry before validation. */ export declare function coalesceOrphanReadRanges(input: unknown): unknown; export declare function normalizeRunCommandsInput(input: unknown): Array; export declare function formatRunCommandQuery(command: string | StructuredCommandInput): string; /** * Max characters of the executed command echoed back in the tool result's * `query` field. The full command already exists in the assistant tool-call * input, so repeating it in the result only duplicates tokens in the * provider request (expensive for large heredoc/file-generation commands). */ export declare const RUN_COMMAND_QUERY_PREVIEW_LIMIT = 200; /** * Bound the command echo placed in a provider-facing tool result. * Short commands pass through unchanged; long commands keep a short * prefix plus a truncation note so the result is still identifiable. */ export declare function formatRunCommandQueryPreview(command: string | StructuredCommandInput): string;