/** * compaction-todo-preserver hook * * Snapshots todos before compaction, restores them if wiped by compaction. * Defense-in-depth against OpenCode's context compaction clearing the todo list. */ import type { PluginContext } from "../plugin/types"; export type TodoSnapshot = { content: string; status: string; priority: string; }; export declare function createCompactionTodoPreserver(client: PluginContext["client"]): { capture: (sessionID: string) => Promise; restore: (sessionID: string) => Promise; clearSession: (sessionID: string) => void; getSnapshot: (sessionID: string) => TodoSnapshot[] | undefined; };