/**
 * File-backed feedback store used by the local transport and by
 * `neotoma triage` when run against local storage.
 *
 * Rationale: the plan calls for `submit_feedback` in local mode to write a
 * `product_feedback` entity through `store_structured`. For MVP we write to
 * a simple JSON file under the Neotoma data dir, which is always-accessible
 * to `neotoma triage` running on the same machine without forcing the whole
 * entity-store pipeline (schemas, observations, snapshotting) through the
 * feedback path. Upgrade path: swap this for `storeStructuredForApi` once
 * the `product_feedback` schema is seeded.
 */
import type { FeedbackStatus, ResolutionConfidence, ResolutionLinks, SubmitFeedbackArgs, UpgradeGuidance, VerificationCountsByOutcome } from "./types.js";
export interface LocalFeedbackRecord {
    id: string;
    submitter_id: string;
    kind: SubmitFeedbackArgs["kind"];
    title: string;
    body: string;
    metadata: Record<string, unknown>;
    submitted_at: string;
    status: FeedbackStatus;
    status_updated_at: string;
    classification: string | null;
    resolution_links: ResolutionLinks;
    upgrade_guidance: UpgradeGuidance | null;
    triage_notes: string | null;
    last_activity_at: string | null;
    next_check_suggested_at: string | null;
    access_token_hash: string;
    /**
     * Auto-classification produced by the ingest cron (before operator review).
     * Used by `neotoma triage --health` to compute classifier/operator agreement
     * for the accuracy-floor monitor. `classification` above holds the final
     * (operator-confirmed) value.
     */
    classifier_classification?: string;
    prefer_human_draft?: boolean;
    redaction_applied: boolean;
    redaction_backstop_hits: string[];
    consecutive_same_status_polls: number;
    status_push?: {
        webhook_url: string;
        webhook_secret?: string;
    };
    parent_feedback_id?: string;
    verification_outcome?: SubmitFeedbackArgs["verification_outcome"];
    verified_at_version?: string;
    verification_count_by_outcome?: VerificationCountsByOutcome;
    resolution_confidence?: ResolutionConfidence;
    first_verification_at?: string | null;
    last_verification_at?: string | null;
    regression_candidate?: boolean;
    regression_detected_at?: string | null;
    regression_detected_by_feedback_id?: string | null;
    regression_count?: number;
    superseded_by_version?: string | null;
}
export declare function resolveFeedbackStorePath(dataDir?: string): string;
export declare function generateFeedbackId(): string;
export declare function hashToken(token: string): string;
export declare class LocalFeedbackStore {
    private readonly storePath;
    constructor(storePath?: string);
    getById(id: string): Promise<LocalFeedbackRecord | null>;
    getByTokenHash(tokenHash: string): Promise<LocalFeedbackRecord | null>;
    upsert(record: LocalFeedbackRecord, tokenHashForIndex?: string): Promise<void>;
    listPending(limit?: number): Promise<LocalFeedbackRecord[]>;
    listAll(): Promise<LocalFeedbackRecord[]>;
    findByCommitSha(sha: string): Promise<string[]>;
}
//# sourceMappingURL=local_store.d.ts.map