/** * Queue job store for worker queues (MongoDB or Upstash Redis). * * Mirrors the worker_jobs pattern but optimized for queues: * - MongoDB: collection `queue_jobs` (configurable via MONGODB_QUEUE_JOBS_COLLECTION) * - Upstash Redis: JSON blob per queue job with compact step entries * * This module is runtime-only (used by Lambda workers). Next.js APIs can read * the same collections/keys to show queue progress. */ declare function upsertInitialQueueJob(options: { queueJobId: string; queueId: string; firstWorkerId: string; firstWorkerJobId: string; metadata?: Record; userId?: string; }): Promise; declare function updateQueueJobStepInStore(options: { queueJobId: string; queueId?: string; stepIndex: number; workerId: string; workerJobId: string; status: 'running' | 'awaiting_approval' | 'completed' | 'failed'; input?: unknown; output?: unknown; error?: { message: string; }; }): Promise; declare function appendQueueJobStepInStore(options: { queueJobId: string; queueId?: string; workerId: string; workerJobId: string; }): Promise; /** * Load a queue job by ID (for mapping context: previous step outputs). * Used by wrapHandlerForQueue for chain mapping and HITL resume (`previousOutputs`). */ declare function getQueueJob(queueJobId: string): Promise<{ id: string; queueId: string; status: string; steps: Array<{ workerId: string; workerJobId: string; status: string; output?: unknown; }>; } | null>; export { appendQueueJobStepInStore, getQueueJob, updateQueueJobStepInStore, upsertInitialQueueJob };