import { type LessonFrontmatter, type LessonStatus } from './gate.js';
/** Thrown by `promoteLesson` when the gate blocks. `reasons` are the kebab-prefix block strings. */
export declare class PromotionBlockedError extends Error {
    readonly id: string;
    readonly reasons: string[];
    constructor(id: string, reasons: string[]);
}
/** A wedge lesson row. WIDENS the gate's `LessonFrontmatter` (which lacks `thumbsUpCount`). */
export interface WedgeLesson extends LessonFrontmatter {
    id: string;
    description: string;
    body: string;
    authoredBy: 'user' | 'agent' | 'pack';
    packId?: string;
    externalId?: string;
    thumbsUpCount: number;
    updatedAt: string;
    promotedAt?: string;
    lastAppliedAt?: string;
}
export interface CreateLessonInput {
    description: string;
    body: string;
    evidenceRefs?: string[];
    authoredBy?: 'user' | 'agent' | 'pack';
}
export interface WedgeRecallHit {
    kind: 'lesson';
    id: string;
    description: string;
    status: LessonStatus;
    body_preview: string;
    similarity: number;
    applied_count: number;
}
export interface WedgeLessonStore {
    init(): Promise<void>;
    createLesson(input: CreateLessonInput): Promise<{
        id: string;
        status: 'pending';
        createdAt: string;
    }>;
    promoteLesson(id: string): Promise<{
        id: string;
        status: 'promoted';
    }>;
    recallLesson(query: string, limit?: number): Promise<{
        query: string;
        returned: number;
        results: WedgeRecallHit[];
    }>;
    captureFeedback(id: string, polarity: 'up' | 'down', signalId: string): Promise<void>;
    recordApplied(id: string, sessionId?: string): Promise<void>;
    /** Clean DB-index rebuild from already-on-disk records (migration; no file rewrite). */
    rebuild(records: WedgeLesson[]): Promise<{
        indexed: number;
    }>;
}
export declare function wedgeLessonStore(opts: {
    dbUrl: string;
    sourceDir: string;
    nowIso?: () => string;
}): WedgeLessonStore;
//# sourceMappingURL=store.d.ts.map