import type { DB } from '../db/namespace.js'; import type { Queue } from '../../async/jobs/queue.js'; import type { CrossingResult } from './types.js'; /** Job type for a durable valve crossing. */ export declare const VALVE_CROSSING_JOB_TYPE = "pipework:valve-crossing"; /** The payload of a durable-crossing job. */ export interface CrossingJobPayload { readonly valve: string; readonly source: unknown; } /** * Enqueue a handoff crossing to run durably. The job queue retries it with * backoff and dead-letters it on retry exhaustion — failure-to-cross becomes a * terminal job outcome, not an exception that vanishes. */ export declare function enqueueCrossing(queue: Queue, db: DB, valve: string, source: unknown): Promise; /** * The job-handler body for a durable crossing. Wire it into a worker — e.g. * `fitting().job(VALVE_CROSSING_JOB_TYPE).fit(({ input, db }) => runCrossingJob(input, db))`. * The valve must be registered in the worker process; the crossing runs * recorded and idempotent on the job's transaction. A throw fails the job, * which the queue retries and finally dead-letters. */ export declare function runCrossingJob(payload: CrossingJobPayload, tx: DB): Promise; //# sourceMappingURL=durable-crossing.d.ts.map