import type { ApprovedMissionModelSnapshot, PlanningSession, SnapshotLineage, StoredSnapshot } from "./types.js"; import type { SnapshotStore } from "./snapshot-store.js"; /** * Attach lineage metadata to a snapshot. * * If a parent snapshot is provided, the child inherits the lineage id and * increments the version. Otherwise a new lineage is started at version 1. */ export declare function buildSnapshotLineage(snapshot: ApprovedMissionModelSnapshot, parent?: ApprovedMissionModelSnapshot, actor?: string): SnapshotLineage; export type NodeChange = { kind: "added" | "removed" | "changed"; nodeId: string; nodeKind: string; name?: string; fields?: Record; }; export type EdgeChange = { kind: "added" | "removed"; edgeId: string; source: string; target: string; relation: string; }; export type DecisionChange = { kind: "added"; decisionId: string; type: string; }; export type SnapshotDiff = { fromId: string; toId: string; nodes: NodeChange[]; edges: EdgeChange[]; decisions: DecisionChange[]; confidence?: { before: number; after: number; }; }; /** * Compute a canonical diff between two snapshots. */ export declare function diffSnapshots(from: ApprovedMissionModelSnapshot, to: ApprovedMissionModelSnapshot): SnapshotDiff; /** * Reconstruct a PlanningSession from a stored snapshot. * * The session that produced the snapshot is stored alongside it, so * reconstruction is faithful. Walking lineage ensures the snapshot exists * in the store. */ export declare function reconstructSessionFromSnapshot(store: SnapshotStore, snapshotId: string): Promise; /** * Walk the lineage from a snapshot back to its root. */ export declare function getSnapshotLineage(store: SnapshotStore, snapshotId: string): Promise;