import type { KeychainBackend } from './index.js'; export declare function fileDir(): string; export declare function machinePassphraseExists(): boolean; export declare function getPassphrase(): string; export interface EncFile { salt: string; iv: string; authTag: string; ciphertext: string; } export declare function encryptForFallback(plaintext: string, passphrase: string): EncFile; export declare function decryptForFallback(enc: EncFile, passphrase: string): string; export declare function fileStoreItemPath(item: string): string; declare function fileHas(item: string): boolean; declare function fileGet(item: string): string; declare function fileGetBatch(items: string[]): Map; declare function fileSet(item: string, value: string): void; declare function fileDelete(item: string): boolean; declare function fileList(prefix: string): string[]; export declare function fileStoreHasItems(): boolean; export declare const fileStore: { has: typeof fileHas; get: typeof fileGet; getBatch: typeof fileGetBatch; set: typeof fileSet; delete: typeof fileDelete; list: typeof fileList; }; export declare const fileBackend: KeychainBackend; export declare function resolvePassphraseDir(): string; export declare function machinePassphraseSourcePath(): string | null; export interface RotatePassphraseReport { dryRun: boolean; committed: boolean; bundleCount: number; skipped: string[]; roundTripOk: boolean; keyFilePath: string; recoveredInterruptedRotation: boolean; } export declare function hasInterruptedRotationArtifacts(keyPath: string): boolean; export interface RotatePassphraseOpts { dryRun?: boolean; newPassphrase?: string; onStagedBeforeCommit?: () => void; onStoreMovedAsideBeforeSwap?: () => void; onStoreSwappedBeforeKeySwap?: (heartbeat: () => void) => void; onKeyBackedUpBeforeNewKey?: () => void; tamperStaged?: boolean; } export declare function rotatePassphrase(opts?: RotatePassphraseOpts): RotatePassphraseReport; export type AdoptionKind = 'bundle' | 'item' | 'file'; export interface AdoptionUnit { kind: AdoptionKind; name: string; } export interface LegacyAdoptionReport { root: string; dryRun: boolean; sources: Array<{ root: string; items: number; unreadable: string[]; }>; adopted: Array; present: AdoptionUnit[]; conflicts: Array; kept: Array; knownHostsAdded: number; } export declare class LegacyRootConflictError extends Error { readonly report: LegacyAdoptionReport; constructor(report: LegacyAdoptionReport); } export declare function legacyAdoptionPending(): boolean; export declare function adoptLegacyRoots(opts?: { dryRun?: boolean; prefer?: string; }): LegacyAdoptionReport; export declare function _resetFileStoreForTest(opts?: { fileDir?: string | null; passphraseDir?: string | null; passphrase?: string | null; }): void; export declare function _flushMetaCacheForTest(): void; export declare function _setFileStoreLockTimeoutForTest(ms: number | null): void; export declare function _setFileStoreLockStaleMsForTest(ms: number | null): void; export declare function _fileStoreLockPathForTest(): string; export {};