import type { BackupRetentionPolicy } from '../../domain/value-objects/BackupRetentionPolicy.js'; import type { IContainerRuntimePort } from '../../application/ports/outbound/IContainerRuntimePort.js'; import type { IRuntimeEnvironmentPort } from '../../application/ports/outbound/IRuntimeEnvironmentPort.js'; import type { IServerConsolePort } from '../../application/ports/outbound/IServerConsolePort.js'; import type { IWorldBackupPort, LockOptions, WorldBackupCommit, WorldBackupPruneOutcome, WorldBackupPushOptions, WorldBackupPushOutcome, WorldBackupRestoreOutcome, WorldBackupResult, WorldBackupStatus } from '../../application/ports/outbound/IWorldBackupPort.js'; export interface GitWorldBackupAdapterOptions { root: string; runtime: IContainerRuntimePort; environment: IRuntimeEnvironmentPort; console: IServerConsolePort; /** Remote prefix; `/.git`. Tests pass a file:// directory. */ remoteBase?: string; /** Per RCON command (save-off, save-all flush). Default 60 s. */ flushTimeoutMs?: number; /** After push's signal aborts, save-on waits at most this long per server. Default 20 s (#734 review). */ abortedSaveOnTimeoutMs?: number; } export declare class GitWorldBackupAdapter implements IWorldBackupPort { private readonly options; private readonly git; private readonly remoteBase; private readonly root; private readonly cache; constructor(options: GitWorldBackupAdapterOptions); status(): Promise>; history(limit?: number): Promise>; testConnection(credentials: { token: string; repository: string; }): Promise>; push(options?: WorldBackupPushOptions): Promise>; restore(commit: string, options?: LockOptions): Promise>; prune(policy: BackupRetentionPolicy, options?: LockOptions): Promise>; private guard; /** Config check, lock, recovery check and git version for a writing operation. */ private locked; private ensureGit; private readConfig; private url; private refspec; private mustGit; private hasCache; /** B4 step 2: clone or init the cache, normalize origin, align the local branch. */ private prepareCache; /** One clean origin URL and no pushurl (scrubs token URLs left by backup.sh). */ private normalizeRemote; /** World dirs tracked by HEAD: worlds/ and servers//. */ private trackedWorlds; private resolveCommit; private scanInternalWorlds; /** The server's internal world, null when it has none, or the reason it is skipped. */ private internalWorld; /** LEVEL from servers//config.env; null when the server has no config.env. */ private currentLevel; private copy; private runningServers; private assertNothingRunning; /** save-off → save-all flush → copy → save-on (always). Returns flushed server names. */ private withFlush; private planRestore; /** The managed roots must be real directories (or absent), never links. */ private assertNotLinked; /** * Before the first rename (P1): no live target or managed parent may be a link, and * every one must be on the filesystem of backups/, because the swap only renames (S2). */ private assertMovable; private stamp; private defaultMessage; } //# sourceMappingURL=GitWorldBackupAdapter.d.ts.map