import { type Kysely } from 'kysely';
import type { Database } from '../db/types.js';
import type { ExecutionTracker } from '../reporting/execution-tracker.js';
import { JobQueue } from './job-queue.js';
/**
 * Run a single cleanup pass: remove expired dedup_cache entries and
 * mark expired dispatch_queue entries.
 *
 * When `extras` is provided, expired jobs are also forwarded to Platform
 * as terminal status updates so the Platform execution_jobs projection
 * stays in sync.
 *
 * Event-log row + payload retention used to live here too, but Phase E
 * replaced the 30-day hard-delete with cold-store archive-then-delete
 * (see `packages/orchestrator/src/cold-store/tables/event-log.ts`).
 *
 * @returns Counts of cleaned entries.
 */
export declare function runCleanup(dedup: {
    cleanup(): Promise<number>;
}, queue: JobQueue, extras?: {
    db: Kysely<Database>;
    executionTracker: ExecutionTracker;
}): Promise<{
    dedupDeleted: number;
    queueExpired: number;
}>;
/**
 * Build a per-tick handler for the queue-cleanup scheduled job.
 *
 * The cadence (`intervalMs`) and the periodic wrapper itself live in
 * `packages/orchestrator/src/queue/scheduled-job.ts` — this factory
 * just produces the tick function. `runCleanup` is unchanged.
 */
export declare function createCleanupHandler(dedup: {
    cleanup(): Promise<number>;
}, queue: JobQueue, extras?: {
    db: Kysely<Database>;
    executionTracker: ExecutionTracker;
}): () => Promise<void>;
//# sourceMappingURL=cleanup.d.ts.map