/** * Storage operations for frame consolidation * * Handles database operations for marking frames as superseded * and updating frames with consolidation metadata. * * Uses FrameStore.updateFrame() for targeted field updates instead of * re-saving entire frames via saveFrame(), which avoids the risk of * clobbering unrelated fields during INSERT OR REPLACE. */ import type { Frame } from "../frames/types.js"; import type { FrameStore } from "./frame-store.js"; /** * Mark a frame as superseded by another frame * @param store - Frame store * @param frameId - ID of frame being superseded * @param supersededById - ID of frame that supersedes this one */ export declare function markFrameAsSuperseded(store: FrameStore, frameId: string, supersededById: string): Promise; /** * Update a frame with merged_from metadata * @param store - Frame store * @param frame - Frame to update * @param mergedFromIds - IDs of frames that were merged into this one */ export declare function updateFrameWithMergedFrom(store: FrameStore, frame: Frame, mergedFromIds: string[]): Promise; /** * Result of a consolidation operation */ export interface ConsolidationResult { /** Number of frames consolidated */ framesConsolidated: number; /** IDs of frames that were superseded */ supersededFrameIds: string[]; /** IDs of frames that were updated with merged data */ updatedFrameIds: string[]; } /** * Consolidate two frames using supersede strategy * Marks the older frame as superseded by the newer one */ export declare function consolidateViaSupersede(store: FrameStore, supersedingFrame: Frame, supersededFrame: Frame): Promise; /** * Consolidate two frames using merge strategy * Creates/updates merged frame and marks both originals as superseded */ export declare function consolidateViaMerge(store: FrameStore, mergedFrame: Frame, sourceFrameA: Frame, sourceFrameB: Frame): Promise;