import { type CaseRef, type FeedbackPipelineEntry } from '../../types/sparkContracts';
export interface CreateOptions {
    entryId: string;
    feedbackId: string;
}
export interface AdvanceOptions {
    /** Target stage. Must be in `ALLOWED_TRANSITIONS[currentStage]`. */
    stage: FeedbackPipelineEntry['stage'];
    /** Reviewer name. Required when advancing to reviewed / merged / rejected. */
    reviewer?: string;
    /** Case reference (CaseRef from shared base types). Optional — set
     * when advancing into `case_draft` so the entry carries the
     * generated case id forward. */
    case?: CaseRef;
    /** Generated skill draft id. Optional — set when advancing into
     * `skill_draft`. */
    skillDraftId?: string;
}
export declare class FeedbackPipeline {
    private readonly storagePath;
    private readonly entries;
    private loaded;
    /** High-water mark of stamped `updatedAt` values. Subsequent stamps
     * are guaranteed strictly greater so sorting by `updatedAt` desc
     * stays deterministic even when many ops land in the same ms — a
     * real concern for rapid-fire pipelines. The mark is reseeded from
     * the loaded entries so persisted ordering survives across
     * instances. */
    private updatedAtFloor;
    constructor(storagePath: string);
    load(): void;
    /** Monotonic stamp — strictly greater than every previously
     * returned value, even when wall clock has not advanced. */
    private nextUpdatedAt;
    /** Create a new entry at the `feedback` stage. Throws when an entry
     * with the same id already exists — the operator should resolve the
     * existing one (advance or reject) before creating a new one. */
    createEntry(opts: CreateOptions): FeedbackPipelineEntry;
    /**
     * Advance an existing entry to the next stage. Throws on:
     * - Entry not found
     * - Target stage not in `ALLOWED_TRANSITIONS[currentStage]`
     * - Target stage requires a reviewer and `opts.reviewer` is missing
     *   or whitespace
     */
    advance(entryId: string, opts: AdvanceOptions): FeedbackPipelineEntry;
    /** Read an entry by id. */
    getEntry(entryId: string): FeedbackPipelineEntry | undefined;
    /**
     * List entries optionally filtered by stage. Default sort is by
     * `updatedAt` descending so the most-recently-touched entries
     * surface first in operator UIs.
     */
    listEntries(opts?: {
        stage?: FeedbackPipelineEntry['stage'];
    }): FeedbackPipelineEntry[];
    /** Remove an entry. Returns whether anything was removed. */
    removeEntry(entryId: string): boolean;
    /** Per-stage counts for dashboards. */
    getStats(): Record<FeedbackPipelineEntry['stage'], number>;
    private persist;
}
//# sourceMappingURL=feedbackPipeline.d.ts.map