import type { DatabaseSync } from 'node:sqlite'; import type { TeamCodexTask, TeamCodexQueueSnapshot } from './team-codex-contract.js'; import { type TeamCodexCloudJournal, type CloudTask } from './team-codex-cloud-journal.js'; import { type CodexCloudQueueSnapshot } from './team-codex-queue-wire.js'; type QueueTask = CloudTask & { queue_snapshot?: CodexCloudQueueSnapshot; queue_heartbeat?: { version: number; observed_at: number; }; }; export interface CodexQueueBatch extends Record { expected_owner_ref: string; team_ref: string; source_id: string; source_name: string; tasks: QueueTask[]; } /** Queue ACKs are independent of event ACKs. No queue bytes enter the legacy upload path. */ export declare class TeamCodexQueueCloud { private readonly db; private readonly journal; constructor(db: DatabaseSync, journal: TeamCodexCloudJournal); reconcile(owner: number, team: string, tasks: readonly TeamCodexTask[]): void; batch(owner: number, team: string, eligible: ReadonlySet): CodexQueueBatch | undefined; acknowledge(batch: CodexQueueBatch, value: unknown): boolean; /** Only call after an authenticated, owner-matching task row was returned. */ read(owner: number, team: string, source: string, task: string, value: unknown, now?: number): TeamCodexQueueSnapshot | undefined; } export {}; //# sourceMappingURL=team-codex-queue-cloud.d.ts.map