/** * Undo journal for `zeroshot setup apply` / `zeroshot setup undo`. * * One journal entry per setting this setup owns: { scope, path, repoRoot, * priorValue, appliedValue, appliedAt }. `priorValue: null` means the key * did not exist before apply, so undo deletes it rather than restoring it. * Shared by lib/setup-apply.js (writer) and lib/setup-undo.js (reader) so the * nested-path mutation and equality semantics can't drift between the two. */ interface JournalEntry { readonly appliedAt: string; readonly appliedValue: unknown; readonly path: string; readonly priorValue: unknown; readonly repoRoot: string | null; readonly scope: string; readonly [key: string]: unknown; } interface SetupJournal { entries: JournalEntry[]; version: number; [key: string]: unknown; } declare function getJournalPath(): string; declare function loadJournal(): SetupJournal; declare function saveJournal(journal: SetupJournal): void; declare function upsertJournalEntry(journal: SetupJournal, entry: JournalEntry): void; declare function setNestedValue(target: Record, pathStr: string, value: unknown): void; declare function deleteNestedKey(target: Record, pathStr: string): void; declare function deepEqual(left: unknown, right: unknown): boolean; declare const _default: { getJournalPath: typeof getJournalPath; loadJournal: typeof loadJournal; saveJournal: typeof saveJournal; upsertJournalEntry: typeof upsertJournalEntry; getNestedValue: (source: Record, pathStr: string) => unknown; setNestedValue: typeof setNestedValue; deleteNestedKey: typeof deleteNestedKey; deepEqual: typeof deepEqual; }; export = _default;