interface MemoryLlmClient {
    model: string;
    apiKey: string;
    transport: {
        stream(request: Record<string, unknown>, apiKey: string): AsyncIterable<{
            type: string;
            text?: string;
        }>;
    };
}
/** Model purposes the memory pipeline can resolve (text + multimodal). */
export type MemoryModelPurpose = "smallModel" | "textGeneration" | "imageUnderstanding" | "stt" | "videoUnderstanding";
export interface MemoryCandidateHost {
    memoryProvider?: {
        search?(query: string, userId: string, options?: {
            limit?: number;
            minScore?: number;
        }): Promise<Array<{
            blockId: string;
            text: string;
            score?: number;
            metadata?: Record<string, unknown>;
        }>>;
        /** Read an uploaded attachment's bytes (for multimodal understanding). */
        readAttachmentBytes?(id: string): Promise<{
            bytes: Buffer;
            mimeType: string;
        } | null>;
        /** Persist the understood/extracted text back on the attachment row. */
        setAttachmentText?(id: string, text: string): void;
    } | null;
    resolveClientForPurpose?(purpose: MemoryModelPurpose): MemoryLlmClient | null;
}
export interface MemoryAttachment {
    type: string;
    filename: string;
    mimeType: string;
    text: string;
    url: string;
    path: string;
    size?: number;
}
export interface RelatedMemoryHit {
    id: string;
    text: string;
    score: number;
    category?: string;
}
export interface MemoryCandidate {
    id: string;
    text: string;
    category: string;
    importance: number;
    confidence: number;
    source: string;
    eventDate: string;
    tags: string[];
    relatedMemoryIds: string[];
    evidence: Array<Record<string, unknown>>;
    requiresConfirmation: boolean;
    reason: string;
}
export interface MemoryCandidateParams {
    text?: string;
    attachments?: unknown[];
    tags?: unknown;
    category?: unknown;
    importance?: unknown;
    source?: unknown;
    autoExtract?: boolean;
}
export declare function normalizeInputCandidate(input: unknown): MemoryCandidate | null;
export declare function buildMemoryCandidates(ctx: MemoryCandidateHost, params: MemoryCandidateParams, userId: string): Promise<{
    candidates: MemoryCandidate[];
    related: RelatedMemoryHit[];
    source: "llm" | "deterministic";
}>;
export declare function buildMemoryCandidateProposal(ctx: MemoryCandidateHost, params: MemoryCandidateParams, userId: string): Promise<{
    candidates: MemoryCandidate[];
    relatedMemories: RelatedMemoryHit[];
    extractor: "llm" | "deterministic";
}>;
export {};
