import type { IncomingMessage, PlatformRunProgressRef } from "./types.js"; export type A2AContinuationStatus = "pending" | "processing" | "delivering" | "completed" | "failed"; export interface A2AContinuation { id: string; integrationTaskId: string; platform: string; externalThreadId: string; incoming: IncomingMessage; placeholderRef: string | null; progressRef: PlatformRunProgressRef | null; progressRefClaimed: boolean; ownerEmail: string; orgId: string | null; agentName: string; agentUrl: string; dedupeKey: string | null; a2aTaskId: string; a2aAuthToken: string | null; status: A2AContinuationStatus; attempts: number; nextCheckAt: number; errorMessage: string | null; createdAt: number; updatedAt: number; completedAt: number | null; } export declare function insertA2AContinuation(input: { integrationTaskId: string; platform: string; externalThreadId: string; incoming: IncomingMessage; placeholderRef?: string | null; progressRef?: PlatformRunProgressRef | null; ownerEmail: string; orgId?: string | null; agentName: string; agentUrl: string; dedupeKey?: string | null; a2aTaskId: string; a2aAuthToken?: string | null; }): Promise; export declare function getA2AContinuationForIntegrationTask(integrationTaskId: string): Promise; export declare function hasActiveA2AContinuationsForIntegrationTask(integrationTaskId: string): Promise; export declare function failA2AContinuationsForIntegrationTask(integrationTaskId: string, errorMessage: string): Promise; export declare function getA2AContinuationsForIntegrationTaskAgent(integrationTaskId: string, agentUrl: string, dedupeKey?: string | null): Promise; export declare function getA2AContinuation(id: string): Promise; export declare function claimA2AContinuation(id: string): Promise; export declare function claimDueA2AContinuations(limit?: number): Promise; /** * Makes stale leases eligible again and returns a bounded set of due ids. * * This intentionally does not claim anything. Durable schedulers use it only * to wake the normal processor, whose atomic claim remains the sole progress * and delivery owner under overlapping scheduler/self-dispatch executions. */ export declare function recoverDueA2AContinuationIds(limit?: number, integrationTaskIds?: string[]): Promise; export declare function listRecoverableA2AIntegrationTaskIds(limit?: number): Promise; export interface RecoverableA2AIntegrationTask { id: string; platform: string; externalThreadId: string; dispatchScope: string | null; status: string; } /** * Read due continuation owners and their rollout scope in one query. Recovery * can filter the canary in memory without an N+1 pending-task lookup loop. */ export declare function listRecoverableA2AIntegrationTasks(limit?: number): Promise; export declare function claimA2AContinuationDelivery(id: string): Promise; export declare function rescheduleA2AContinuation(id: string, delayMs: number): Promise; export declare function completeA2AContinuation(id: string): Promise; export declare function failA2AContinuation(id: string, errorMessage: string): Promise; //# sourceMappingURL=a2a-continuations-store.d.ts.map