import type { Decision, DecisionAmendment, DecisionIndexEntry, DecisionStatus } from "../utils/types.js"; import type { IDecisionStore } from "./interfaces.js"; export declare class DecisionStore implements IDecisionStore { private readonly decisionsDir; private readonly indexPath; private cachedIndex; private cachedIndexMtime; constructor(twiningDir: string); /** Create a new decision. Writes individual file and updates index atomically. */ create(input: Omit & { status?: "active" | "provisional"; }): Promise; /** Get a single decision by ID. Returns null if not found. */ get(id: string): Promise; /** Get all decisions matching a scope (prefix match or affected files/symbols match). */ getByScope(scope: string): Promise; /** Update a decision's status (and optionally other fields). */ updateStatus(id: string, status: DecisionStatus, extra?: Partial): Promise<{ persisted: boolean; }>; /** * Persist an append-only metadata amendment (field D11). Unlike * updateStatus, this rewrites the index entry's affected_files/ * affected_symbols too — getByScope reads them from the index, so a * record-only write would leave the repair invisible to retrieval. * Deltas merge against the in-lock read: concurrent amends both survive. */ amendMetadata(id: string, delta: { add_affected_files: string[]; add_affected_symbols: string[]; amendment: DecisionAmendment; }): Promise; /** * Index-desync detection + repair (S0-index-desync, 2026-08-15 field * audit): every read path is index-driven, so a decision file missing * from index.json is silently invisible — the runtime twin of the * migrate CLI's orphan salvage. Preview reports orphan ids; execute * appends salvaged entries under the index lock. Unparseable files are * counted as orphans but never repaired, modified, or deleted — legacy * files are their own backup. */ repairIndexDesync(execute: boolean): Promise<{ orphan_ids: string[]; repaired: number; skipped_invalid: number; }>; /** Get the full decision index, with mtime-based caching. */ getIndex(): Promise; /** Link a commit hash to an existing decision. Updates both file and index. */ linkCommit(id: string, commitHash: string): Promise; /** Get decisions linked to a specific commit hash. */ getByCommitHash(commitHash: string): Promise; /** Extract index entry from a full decision. */ private toIndexEntry; } //# sourceMappingURL=decision-store.d.ts.map