export type ContextExtractionStatus = 'running' | 'completed' | 'skipped' | 'failed'; export type ContextObjectType = 'profile' | 'rule' | 'focus' | 'understanding'; export type ContextExtractionRun = { id: string; principalId: string; sourceRef: string; extractorId: string; extractorVersion: string; processingPolicy: 'local_only' | 'remote_allowed'; destination: 'deterministic' | 'local_model' | 'remote_model'; inputHash: string; status: ContextExtractionStatus; errorCode?: string; startedAt: number; completedAt?: number; }; export type ContextExtractionOutput = { id: string; runId: string; ordinal: number; candidateKey: string; objectType?: ContextObjectType; objectId?: string; versionId?: string; outcome: 'created' | 'deduplicated' | 'rejected'; createdAt: number; }; export declare function claimContextExtractionRun(input: { sourceRef: string; extractorId: string; extractorVersion: string; processingPolicy: ContextExtractionRun['processingPolicy']; destination: ContextExtractionRun['destination']; inputHash: string; principalId?: string; nowMs?: number; }): { run: ContextExtractionRun; shouldExecute: boolean; }; export declare function finishContextExtractionRun(input: { runId: string; status: Exclude; errorCode?: string; outputs?: Array>; nowMs?: number; }): ContextExtractionRun | null; export declare function listContextExtractionRuns(filter?: { sourceRef?: string; extractorId?: string; extractorVersion?: string; status?: ContextExtractionStatus; limit?: number; }): ContextExtractionRun[]; export declare function getContextExtractionRun(id: string): ContextExtractionRun | null; export declare function listContextExtractionOutputs(runId: string): ContextExtractionOutput[]; export declare function hasIndependentExtractionOutput(runIds: string[], objectType: ContextObjectType, objectId: string): boolean;