/** * Durable state for provider corpus jobs. * * Jobs are scoped by (app_id, owner_email), matching staged datasets. The * runner stores only request configuration, checkpoints, and compact search * hits so large provider corpora never enter chat context or filesystem * scratch files. */ export type ProviderCorpusJobStatus = "running" | "paused" | "quota_wait" | "completed" | "failed"; export interface ProviderCorpusJobRecord { id: string; appId: string; ownerEmail: string; name: string; mode: string; status: ProviderCorpusJobStatus; provider: string; request: Record; pagination: Record | null; batch: Record | null; search: Record; limits: Record; checkpoint: Record; pagesProcessed: number; batchesProcessed: number; itemsProcessed: number; matchedItems: number; totalHits: number; storedHits: number; error: string | null; nextResumeAt: number | null; createdAt: number; updatedAt: number; } export interface CreateProviderCorpusJobOptions { id: string; appId: string; ownerEmail: string; name: string; mode: string; status: ProviderCorpusJobStatus; provider: string; request: Record; pagination?: Record | null; batch?: Record | null; search: Record; limits: Record; checkpoint: Record; } export interface UpdateProviderCorpusJobOptions { id: string; appId: string; ownerEmail: string; status?: ProviderCorpusJobStatus; checkpoint?: Record; pagesProcessed?: number; batchesProcessed?: number; itemsProcessed?: number; matchedItems?: number; totalHits?: number; storedHits?: number; error?: string | null; nextResumeAt?: number | null; } export declare function createProviderCorpusJob(options: CreateProviderCorpusJobOptions): Promise; export declare function getProviderCorpusJob(options: { id: string; appId: string; ownerEmail: string; }): Promise; export declare function listProviderCorpusJobs(options: { appId: string; ownerEmail: string; limit?: number; }): Promise; export declare function updateProviderCorpusJob(options: UpdateProviderCorpusJobOptions): Promise; export declare function appendProviderCorpusJobHits(options: { jobId: string; startIndex: number; hits: Record[]; }): Promise; export declare function getProviderCorpusJobHits(options: { jobId: string; appId: string; ownerEmail: string; offset?: number; limit?: number; }): Promise[]>; export declare function deleteProviderCorpusJob(options: { id: string; appId: string; ownerEmail: string; }): Promise; export declare function _resetProviderCorpusJobsStoreForTests(): void; //# sourceMappingURL=corpus-jobs-store.d.ts.map