import { type BaselineIdentityMetadata, type Signal } from '@opensip-cli/core'; import { type DataStore } from './data-store.js'; /** One baseline entry to persist: its opaque fingerprint + the full Signal payload. */ export interface BaselineEntry { readonly fingerprint: string; readonly payload: Signal; } /** One loaded baseline row: the fingerprint + its stored payload (null if absent). */ export interface BaselineRow { readonly fingerprint: string; readonly payload: Signal | null; } /** * The generic host-owned baseline repository (ADR-0036). One repo over the * shared `tool_baseline_entries` / `tool_baseline_meta` tables, scoped by the * `tool` column so every tool shares the table but never sees another tool's * rows. Replaces the per-tool `GraphBaselineRepo` / `FitBaselineRepo`. * * `save` is an atomic per-tool replace (delete-all + bulk insert + meta upsert in * one transaction), mirroring graph's atomic-rename-of-tmp-file semantic. The * `payload` column carries the full Signal so the diff can surface full-object * `resolved` findings and re-render SARIF. */ export declare class BaselineRepo { private readonly datastore; constructor(datastore: DataStore); /** * Replace this tool's entire baseline in one transaction. Entries are deduped * by fingerprint (last wins) and sorted by fingerprint for deterministic * ordering. The meta row is upserted as the existence marker — an empty * baseline is a valid saved state ("saved, no findings" ≠ "never saved"). */ save(tool: string, entries: readonly BaselineEntry[], identity: BaselineIdentityMetadata): void; /** Load this tool's baseline rows (fingerprint + payload). Empty when none saved. */ load(tool: string): readonly BaselineRow[]; /** True iff this tool has saved a baseline (independent of whether it was empty). */ exists(tool: string): boolean; /** When this tool's baseline was captured (ms epoch), or undefined when none exists. */ capturedAt(tool: string): number | undefined; /** * Load persisted baseline identity metadata for compare/export (ADR-0075). * Returns `undefined` when no meta row exists; partial/null columns mean legacy. */ loadMeta(tool: string): BaselineIdentityMetadata | undefined; /** * Delete this tool's baseline — entries + the meta existence marker, one * transaction (`tools data purge`, ADR-0042). After a clear, `exists()` is * false (vs. `save(tool, [])`, which leaves an EMPTY-but-saved baseline). */ clear(tool: string): { readonly entries: number; readonly meta: boolean; }; } export type { BaselineIdentityMetadata } from '@opensip-cli/core'; //# sourceMappingURL=baseline-repo.d.ts.map