import type { CloseSessionResult } from './worker-pool.js'; export type BackgroundClose = (sessionId: string, context: string) => Promise; export interface BackgroundCloseLogger { info(message: string): unknown; error(message: string): unknown; } /** * Consume the close result for the idempotency convergence double-failure path. * The injected background close reports refusal/residual; this layer owns the * caller-specific promise that "fail-closed" is logged only after local close. */ export declare function runIdempotencyFailClose(sessionId: string, close: BackgroundClose, logger: Pick): Promise; /** * Consume a withdraw-driven background close. A refusal is a normal resolved * result, not an exception; return false so worker-pool never publishes success. * A residual is still a successful LOCAL close and is logged by the wrapper. */ export declare function runWithdrawAutoClose(sessionId: string, close: BackgroundClose, logger: Pick): Promise; //# sourceMappingURL=daemon-background-close.d.ts.map