import { type Database } from "../data/database.js"; import { type MemberGlobalConfig } from "./identity.js"; export { checkedAssetPath } from "../files/deletion.js"; export interface ArchiveLifecycleHooks { /** Must stop live room/DM executions, builders, shells and private tasks, and await release of assets. */ quiesce(memberId: string): Promise; /** Synchronous membership changes share the identity completion transaction. */ detachFromConversations(memberId: string, db: Database): void; } export declare class MemberArchiveService { private readonly db; private readonly root; private readonly hooks; constructor(db: Database, root: string, hooks: ArchiveLifecycleHooks); archive(memberId: string, opts: { confirm?: boolean; }): Promise<{ archived: string; }>; /** Call before consumers/admission start. Does not guess identity, cancel tasks itself or replay execution. */ recoverPending(): Promise; private perform; private checkLocation; } export interface ArchiveCatalogSource { archivePath: string; name: string; /** Only explicit, verified retained SQL identity. Name-only sources must omit this. */ memberId?: string; kind: "legacy" | "fired"; template: string; title?: string; global: MemberGlobalConfig; /** Relative to data root, inside archivePath; no filename search at runtime. */ personaPath?: string; personaFormat: "plain" | "frontmatter"; hasPersona: boolean; roomScopes: Array<{ room: string; hasPrinciples: boolean; hasMainline: boolean; }>; conflicts?: string[]; } export interface MemberArchiveIntent { memberId: string; sourcePath: string; archivePath: string; sourceDevice: string; sourceInode: string; state: "pending" | "completed"; createdAt: number; completedAt: number | null; } export declare function readMemberArchiveIntent(memberId: string, db?: Database): MemberArchiveIntent | null; export declare function pendingMemberArchives(db?: Database): MemberArchiveIntent[]; export declare function beginMemberArchive(intent: Omit, db?: Database): void; export declare function completeMemberArchive(memberId: string, timestamp: number, db?: Database): void; export declare function importMemberArchiveCatalog(source: ArchiveCatalogSource, db?: Database): void; //# sourceMappingURL=archive.d.ts.map