import type { BigIntStats } from 'fs'; import { WORKFLOW_PROJECT_CONFIG_PATH } from '../workflow-contract/project-config-reader.js'; declare const journalClaimBrand: unique symbol; export interface ClassicRootMoveFileSummary { path: string; size: number; hash: string; } interface ClassicRootMoveManifest { directories: string[]; files: ClassicRootMoveFileSummary[]; totalBytes: number; hash: string; } interface ClassicRootMoveJournalBase { id: string; source: string; target: string; staging: string; configPath: typeof WORKFLOW_PROJECT_CONFIG_PATH; originalConfigHash: string; expectedConfigHash: string; planId: string; manifest: ClassicRootMoveManifest; readonly [journalClaimBrand]?: ClassicRootMoveJournalClaim; } interface ClassicRootMoveJournalV1 extends ClassicRootMoveJournalBase { schema: 'comet.classic-root-move.v1'; stage: 'copying' | 'ready' | 'switched' | 'configured'; targetInitialState: 'missing' | 'empty'; } interface ClassicRootMoveJournalV2 extends ClassicRootMoveJournalBase { schema: 'comet.classic-root-move.v2'; stage: 'locked' | 'copying' | 'ready' | 'switched' | 'configured'; artifactLayout: 'legacy'; sourceIdentity: ClassicRootMovePathIdentity[]; targetInitialIdentity: ClassicRootMoveObjectIdentity | null; approvedPlanId: string; targetInitialState: 'missing' | 'empty' | 'non-empty'; } type ClassicRootMoveJournal = ClassicRootMoveJournalV1 | ClassicRootMoveJournalV2; interface ClassicRootMoveJournalClaim { fileIdentity: BigIntStats; contentHash: string; } interface ClassicRootMoveTestHooks { afterSourceFileInspect?: (relativePath: string) => void | Promise; beforeSourceFileCopy?: (relativePath: string) => void | Promise; afterJournalInspect?: () => void | Promise; afterJournalQuarantine?: (operation: string) => void | Promise; afterConfigSnapshot?: () => void | Promise; afterDirectoryInspect?: (label: string) => void | Promise; beforeMutation?: (operation: string) => void | Promise; } export interface ClassicRootMoveOptions { planId?: string; testHooks?: ClassicRootMoveTestHooks; } export type ClassicRootMoveRecoveryStrategy = 'continue' | 'rollback'; export interface ClassicRootMoveFileObjectIdentity { dev: string; ino: string; birthtime: string; } export interface ClassicRootMoveObjectIdentity extends ClassicRootMoveFileObjectIdentity { ctime: string; mtime: string; } export interface ClassicRootMovePathIdentity extends ClassicRootMoveFileObjectIdentity { path: string; } export interface ClassicRootMovePlan { projectRoot: string; source: string; target: string; staging: string; artifactLayout: 'legacy'; sourceIdentity: ClassicRootMovePathIdentity[]; targetInitialIdentity: ClassicRootMoveObjectIdentity | null; fileCount: number; directoryCount: number; totalBytes: number; manifestHash: string; configPath: typeof WORKFLOW_PROJECT_CONFIG_PATH; configHash: string; originalConfigHash: string; expectedConfigHash: string; planId: string; fileSummary: ClassicRootMoveFileSummary[]; configChange: { from: 'legacy'; to: 'docs'; }; conflicts: string[]; blockers: string[]; pendingRecovery: ClassicRootMoveInspection | null; historicalPointersPreserved: string[]; applyPreconditions: string[]; allowedRecoveryStrategies: ClassicRootMoveRecoveryStrategy[]; targetInitialState: 'missing' | 'empty' | 'non-empty'; readyToApply: boolean; } export interface ClassicRootMoveInspection { id: string; stage: ClassicRootMoveJournal['stage']; source: string; target: string; staging: string; planId: string; allowedStrategies: ClassicRootMoveRecoveryStrategy[]; reason?: string; } export declare function planClassicRootMove(startPath: string, options?: ClassicRootMoveOptions): Promise; export declare function applyClassicRootMove(startPath: string, options?: ClassicRootMoveOptions): Promise; export declare function repairClassicRootMove(projectRoot: string, strategy?: ClassicRootMoveRecoveryStrategy, options?: ClassicRootMoveOptions): Promise; export declare function inspectClassicRootMove(projectRoot: string, options?: ClassicRootMoveOptions): Promise; export {}; //# sourceMappingURL=classic-root-move.d.ts.map