import type { Config } from '../config/schema.js'; export interface LearningJob { job_id: string; conversation_id: string; transcript_id: string; through_seq: number; policy_hash: string; workspace_id: string; lease_token: string; attempts: number; start_seq?: number | null; extractor_version?: string; } export declare const PERSONAL_UNDERSTANDING_VERSION = "understanding-v3"; /** Invalidate learning only for changes affecting evidence, permissions, scope or model routing. */ export declare function learningPolicyHash(config: Config): string; export declare function isTrivialMemoryTurnText(rawPayloadJson: string): boolean; /** Recover learning intent from authoritative rows, including notifications lost in a crash. */ export declare function enqueueConversationLearning(config: Config, conversationId: string, workspaceId: string, force?: boolean, now?: number, rebuild?: { version: string; transcriptId?: string; }): string | undefined; export declare function claimLearningJob(now?: number): LearningJob | undefined; export declare function renewLearningLease(job: LearningJob): boolean; /** Apply model results and advance progress atomically under the current lease. */ export declare function finishLearningJob(job: LearningJob, apply: () => void, processedThrough?: number): boolean; export declare function failLearningJob(job: LearningJob, errorCode: string, canceled?: boolean): void; export declare function learningStatus(config?: Config): { jobs: unknown[]; coverage: unknown[]; };