/** * The words a caller attached to a stop, or nothing when there were none. * * A cancellation and a deadline arrive by the same mechanism and mean opposite * things to whoever reads the result. "Was cancelled" tells a model that * something outside it decided, and nothing about what — so a tool result * could not distinguish an operator pressing stop from a budget running out * from a parent abandoning a child, and every one of those wants a different * next move. * * Two kinds of reason are deliberately reported as no reason: * * - `AbortError` and `TimeoutError`. `abort()` with no argument fills `reason` * with a DOMException named `AbortError`, so it is not a message anybody * wrote; it is the platform's word for "someone stopped and said nothing". * Rendering it would turn today's honest silence into a fake explanation. * - Anything that is not an `Error`. The agent manager aborts a child with the * bare string `'canceled'`, which would otherwise render as "was cancelled: * canceled" — noise wearing the shape of information. * * Name-checked rather than checked by class, because a reason can cross a * package boundary where `instanceof` stops holding across duplicate copies. * That is the same answer this codebase already settled on for provider * errors. */ export declare function abortReasonText(reason: unknown): string | undefined; /** * Subscribe to caller cancellation without raising the Node 20.0 runtime floor. * * `addAbortListener` cannot be hidden by another listener calling * `stopImmediatePropagation`. Both branches return an explicit disposer so a * completed operation does not remain attached to a long-lived caller signal. */ export declare function subscribeToAbort(signal: AbortSignal, listener: () => void): () => void; export declare function createChildAbortController(parent: AbortController): AbortController; //# sourceMappingURL=abort.d.ts.map