export declare const USER_ARCHIVE_POINTER = "# User profile\n\nArchived preferences: [User preference archive](okf-memory/user-preferences/index.okf.md).\n"; export type UserMemoryAction = { action: "add"; content: string; } | { action: "replace"; oldContent: string; content: string; } | { action: "remove"; oldContent: string; }; export interface UserMemoryMutationResult { userContent: string; archiveChanged: boolean; } /** * Owns USER.md overflow migration and archived preference mutation. USER.md stays the bounded hot * index; canonical overflow content lives in valid OKF documents discovered by the existing memory * provider. The caller owns the USER.md lock, so every multi-file operation is serialized through * the same mandatory write path. */ export declare class UserMemoryArchive { private readonly archiveDir; private readonly indexPath; constructor(agentDir: string); apply(currentUser: string, action: UserMemoryAction, budget: number, supersedeNearDuplicate: (existing: string, content: string) => string | null): Promise; private validateArchiveContent; private ensureArchiveDir; private shardFiles; private hasArchivedShards; private archiveBody; private writeNewShard; private writeShard; private supersedeArchivedFact; private replaceArchivedFact; private rebuildIndex; } //# sourceMappingURL=user-memory-archive.d.ts.map