/** * Baseline save/load functionality. */ import type { InterviewResult } from '../interview/types.js'; import type { BehavioralBaseline, BehavioralDiff } from './types.js'; /** * Options for loading a baseline. */ export interface LoadBaselineOptions { /** * Skip integrity hash verification. * Use with caution - only for debugging or when you know the file was modified intentionally. * @default false */ skipIntegrityCheck?: boolean; } /** * Create a behavioral baseline from interview results. * * Baselines can only be created from check mode results. * Explore mode results are for documentation only. */ export declare function createBaseline(result: InterviewResult, serverCommand: string): BehavioralBaseline; /** * Save baseline to a file. */ export declare function saveBaseline(baseline: BehavioralBaseline, path: string): void; /** * Load baseline from a file. * Validates against Zod schema to prevent malicious JSON injection. * * @param path - Path to the baseline file * @param options - Load options * @returns Loaded baseline */ export declare function loadBaseline(path: string, options?: LoadBaselineOptions): BehavioralBaseline; /** * Verify baseline hash. */ export declare function verifyBaselineHash(baseline: BehavioralBaseline): boolean; /** * Recalculate and update the hash for a baseline. * Useful after manual modifications (e.g. acceptance metadata). */ export declare function recalculateBaselineHash(baseline: Omit): BehavioralBaseline; /** * Check if a baseline file exists. * Returns false for directories - baselines must be files. */ export declare function baselineExists(path: string): boolean; /** * Options for accepting drift. */ export interface AcceptDriftOptions { /** Who is accepting the drift (for audit trail) */ acceptedBy?: string; /** Reason for accepting the drift */ reason?: string; } /** * Accept drift by updating a baseline with drift acceptance metadata. * * This marks the current state of the server as the new expected baseline, * acknowledging that the detected changes were intentional. * * @param currentBaseline - The new baseline from the current server state * @param diff - The diff that is being accepted * @param options - Acceptance options (reason, acceptedBy) * @returns The baseline with acceptance metadata attached */ export declare function acceptDrift(currentBaseline: BehavioralBaseline, diff: BehavioralDiff, options?: AcceptDriftOptions): BehavioralBaseline; /** * Check if a baseline has acceptance metadata. */ export declare function hasAcceptance(baseline: BehavioralBaseline): boolean; /** * Clear acceptance metadata from a baseline. * Useful when re-running checks after the accepted changes are no longer relevant. * Returns a new baseline without acceptance, with recalculated integrity hash. */ export declare function clearAcceptance(baseline: BehavioralBaseline): BehavioralBaseline; //# sourceMappingURL=saver.d.ts.map