import { RecoverableToolError, ToolApprovalDeniedError } from '../tools/effect/errors.js'; /** * The run is not finished: stop the turn, keep the journal, resume when a signal arrives. * It unwinds the stack like an error but is not a failure, so it must never be reported to * the model as a tool error, shown to the user as an error, or journaled as one. * * Only `SuspendError` qualifies. An approval *denial* is deliberately not a signal — see * `isApprovalDenial`. */ export declare function isControlFlowSignal(error: unknown): boolean; /** * A human answered "no". Neither a failure nor a suspend — the opposite of a suspend, in * fact: a suspend defers the decision, a denial resolves it. * * Two rules follow, and they differ by who is driving the call: * * - It must never be degraded into "something went wrong on my side". Nothing went wrong; * saying so would be a lie to the user. * - On the **model** path it becomes a tool result, because there is no author code to * catch it and the agent needs to be able to tell the user the request was declined. * On the **flow** path it keeps propagating, because an `action` node's author chose to * call the tool and can catch it or branch on `ctx.approve()` instead. */ export declare function isApprovalDenial(error: unknown): error is ToolApprovalDeniedError; /** * A tool failed in a way the model can correct (bad referent, missing precondition). Not a * control-flow signal and not a fatal fault: on the flow path it routes back to re-collecting * the offending input rather than degrading the turn. */ export declare function isRecoverableToolError(error: unknown): error is RecoverableToolError;