/** * Abort-aware promise waiting shared by tool execute paths. * Cancelling the wait must not permanently consume a future agent result; * callers own that policy around this helper. */ export declare function createAbortError(signal: AbortSignal, fallbackMessage?: string): Error; /** * Recognize AbortError-shaped values, including DOMException from createAbortError(). * Do not require `instanceof Error` — some hosts expose AbortError DOMExceptions * that fail that check, which would make Esc-cancel look like a settled result. */ export declare function isAbortError(error: unknown): error is { name: "AbortError"; }; /** * Await `promise`, or reject with AbortError when `signal` aborts first. * Already-aborted signals reject immediately without racing the promise. * Preserves the resolved value of `promise`. */ export declare function waitForPromiseOrAbort(promise: Promise, signal?: AbortSignal, fallbackMessage?: string): Promise;