import { type TurnOutcome } from '@xopcai/gateway-contract'; export declare function onTaskResultQueued(listener: () => void): () => void; export interface TaskResultDeliveryRow { delivery_id: string; payload_json: string; status: 'pending' | 'delivered' | 'stale' | 'failed'; attempts: number; message_entry_id: string | null; } export declare class TaskResultDeliveryRepository { capture(runId: string, value: TurnOutcome): void; /** Called inside the run completion transaction, after stale receipts are rejected. */ enqueue(runId: string, summary: string, status: 'succeeded' | 'failed', resultText?: string): boolean; hasForRun(runId: string): boolean; hasCapturedOutcome(runId: string): boolean; pending(limit?: number): TaskResultDeliveryRow[]; retry(id: string, error: string): void; }