/**
 * PreferenceStore — sqlite-backed cache for Phase 5b's framework+model picks.
 *
 * Per `specs/provider-portability/10-suggest-and-confirm-ux.md`: when a
 * user confirms a framework+model pairing for a task pattern, the pick
 * sticks across future tasks of the same pattern. This is the storage.
 *
 * Cache key: (userId, taskPattern). One row per pair.
 * Value: framework + model + snapshot of state-at-cache-time that the
 * TriggerGate consults to decide whether the cached pick is still valid.
 *
 * Storage location: caller-supplied path. For application use, that's
 * `<stateDir>/framework-model-preferences.db`. For tests, ':memory:'.
 *
 * Threat model: drift-correction, not security boundary. A malicious
 * write to the cache would only result in the agent picking a different
 * framework+model — re-confirmed at first cost-shift / catalog-update
 * trigger anyway.
 */
import type { CostStateSnapshot } from '../costAwareRouting.js';
export type ConfidenceLevel = 'HIGH' | 'MEDIUM' | 'LOW' | 'PROVISIONAL';
export interface FrameworkModelPreference {
    /** The framework slug (e.g. "claude-code", "codex-cli", "aider"). */
    framework: string;
    /** The model id (e.g. "opus-4.7", "gpt-5.3-codex", "deepseek-v4"). */
    model: string;
    /** ISO timestamp when the user confirmed this pick. */
    confirmedAt: string;
    /** Snapshot of cost state at confirm time. Consulted by TriggerGate. */
    costStateSnapshot: CostStateSnapshot;
    /** Catalog version at confirm time. Compared with current to detect bumps. */
    catalogVersionAtCache: string;
    /** Confidence the catalog reported for this pick at confirm time. */
    confidenceAtCache: ConfidenceLevel;
}
export interface PreferenceStoreOptions {
    /** Filesystem path for the sqlite db, or ':memory:' for tests. */
    dbPath: string;
}
export declare class PreferenceStore {
    private readonly db;
    private _unregisterSqlite?;
    constructor(options: PreferenceStoreOptions);
    private initSchema;
    /** Read a cached preference. Returns null when none exists. */
    get(userId: string, taskPattern: string): FrameworkModelPreference | null;
    /** Insert or replace a preference. */
    set(userId: string, taskPattern: string, preference: FrameworkModelPreference): void;
    /** Remove the cached preference for one (user, pattern) pair. No-op if absent. */
    clear(userId: string, taskPattern: string): void;
    /** Remove every cached preference for a user. */
    clearAll(userId: string): void;
    /** List all patterns this user has confirmed preferences for. */
    listPatterns(userId: string): ReadonlyArray<string>;
    /** Close the underlying database connection. */
    close(): void;
}
//# sourceMappingURL=PreferenceStore.d.ts.map