import * as plugins from '../dist_ts/plugins.js'; import type { IControllerDatabaseConfig } from '../dist_ts/interfaces.config.js'; import { type IControllerProcessIdentity } from '../dist_ts/classes.processinspection.js'; declare const migrationVersion: 2; export type TControllerDataRootMigrationPhase = 'legacy-authoritative' | 'target-staged' | 'target-committed'; export type TControllerDataWriterKind = 'controller' | 'temp-password' | 'flex-child'; export interface IControllerDataWriterProcessRecord { kind: TControllerDataWriterKind; identity: Pick; } export interface IControllerCredentialRelocationIntent { controllerHash: string; service: string; storeId: string; sourceDirectory: string; destinationDirectory: string; } export interface IControllerCredentialMigrationTuple extends IControllerCredentialRelocationIntent { complete: boolean; } export type TControllerDatabaseMigrationMode = 'external' | 'override' | 'default'; export type TControllerDatabaseMigrationStrategy = 'unchanged' | 'fresh' | 'historical-direct' | 'old-relocation'; export type TControllerDatabaseMigrationPhase = 'pending' | 'prepared' | 'moved' | 'verified'; export interface IControllerDatabaseRootMigrationJournal { mode: TControllerDatabaseMigrationMode; strategy: TControllerDatabaseMigrationStrategy; phase: TControllerDatabaseMigrationPhase; configurationDigestSha256: string; oldDirectory: string | null; targetDirectory: string | null; historicalDirectory: string | null; sourcePath: string | null; sourceDevice: string | null; sourceInode: string | null; destinationDevice: string | null; destinationInode: string | null; contentDigestSha256: string | null; v1JournalLocation: 'none' | 'legacy' | 'target'; } export interface IControllerDataRootMigrationJournal { version: typeof migrationVersion; phase: TControllerDataRootMigrationPhase; sourcePath: string; sourceDevice: string | null; sourceInode: string | null; destinationPath: string; destinationDevice: string | null; destinationInode: string | null; targetCreationNonce: string; database: IControllerDatabaseRootMigrationJournal; credentials: IControllerCredentialMigrationTuple[]; } export interface IControllerDataRootMigrationOptions { oldRoot: string; newRoot: string; databaseConfig: IControllerDatabaseConfig; oldEmbeddedSocketPath: string; newEmbeddedSocketPath: string; invokerPid: number; listDataWriterProcesses: () => Promise; preserveEmbeddedDataDirectory?: boolean; isSocketListening?: (socketPathArg: string) => Promise; relocateCredentialStore?: (intentArg: Readonly, signalArg?: AbortSignal) => Promise; relocateStoppedDatabaseRoot?: (inputArg: Readonly, signalArg?: AbortSignal) => Promise; signal?: AbortSignal; } export interface IControllerDataRootStartupPreparation { directoryPath: string; createDirectory: boolean; } export interface IControllerDataRootMigrationResult { directoryPath: string; databaseConfig: IControllerDatabaseConfig; } export declare class ControllerDataRootMigrationRunner { private readonly options; private readonly oldRoot; private readonly newRoot; private readonly commonParent; private readonly journalPath; private readonly lockPath; private readonly markerPath; private readonly databaseConfiguration; private readonly isSocketListening; private readonly relocateCredentialStore; private readonly relocateStoppedDatabaseRoot; constructor(options: IControllerDataRootMigrationOptions); prepareStartup(): Promise; /** Validates all authoritative v2 state without creating roots, locks, or journals. */ preflight(): Promise; run(): Promise; private normalizeDatabaseConfiguration; private validateCommonParent; private ensureCommonParent; private readJournal; private writeJournal; private cleanupJournalTemporaryFiles; private assertJournalMatches; private assertJournalRootBinding; private assertSourceIdentity; private assertTargetIdentity; private assertTargetMarker; private runLocked; private result; private preservedTargetDatabasePath; private targetContainsOnlyPreservedDatabase; private assertNoConflictingWriters; private createInitialJournal; private readBoundedDirectory; private inspectLegacyRootInventory; private requirePrivateNode; private initialCredentialTuples; private readCredentialHashes; private initialDatabaseJournal; private assertDefaultDatabaseSocketsIdle; private prepareOldDatabaseRelocation; private ensureTargetStaged; private ensureTargetMarker; private inspectTargetStagingInventory; private performDatabaseMigration; private moveOldDatabase; private confirmOldDatabaseRelocation; private assertRelocatedDatabaseDigest; private performDirectHistoricalDatabaseMigration; private performCredentialMigrations; private validateCredentialLocations; private acquireLock; private readLockSnapshot; private lockOwnerIsLive; private reclaimStaleLock; private releaseLock; private listLockArtifacts; private cleanupStaleLockTemporaries; } export {};