/** * GIT-91: copy a project-scoped .gitmem store into the developer-scoped root. * * Before v1.0.10 gitmem stored data in /.gitmem. That release moved the * default to ~/.gitmem and kept a cwd walk-up so existing stores were still * found. GIT-91 removed the walk-up: deriving the root from process.cwd() meant * the MCP server and the SessionStart hook — which do not share a cwd — resolved * different stores for one session. * * The consequence for anyone still on a pre-1.0.10 layout is that their store is * no longer read. On the free tier that store IS the memory (learnings.json, * threads.json), so "my scars vanished after an upgrade" is the experience this * command exists to prevent. * * Design constraints, in order of importance: * * COPY, NEVER MOVE. The source is left byte-for-byte intact. If this command * is wrong about anything, the user still has their data where it was. Moving * would make a bad merge unrecoverable. * * NEVER OVERWRITE. A file that already exists at the destination wins. The * destination is the live store; the source is, by definition, the one that * has not been read recently. Clobbering current memory with stale memory is * worse than skipping. * * REPORT EVERY SKIP. A silent partial migration would leave the user believing * they had merged when they had not — the failure class GIT-93 was about. */ interface MigrationPlan { source: string; destination: string; copied: string[]; skipped: Array<{ file: string; reason: string; }>; } /** * Project-scoped roots holding live state. Delegates to the shared detector so * this command and the session_start notice can never disagree about what * counts as a store worth migrating. */ export declare function findProjectRoots(): string[]; export declare function migrateRoot(source: string, destination: string, dryRun: boolean): MigrationPlan; export declare function main(args: string[]): void; export {}; //# sourceMappingURL=migrate-root.d.ts.map