import type { MonoAgentAppConfigInput } from "./app-config.js"; /** Every filesystem root removed by `restart --clear-sessions`. */ export interface ConversationStatePurgeRoots { readonly sessions?: string; readonly history: string; readonly acpSessions: string; } export type ConversationStatePurgeRootKind = "Pi provider sessions" | "durable session/tool history" | "ACP sessions"; export interface FileSystemIdentity { readonly dev: bigint; readonly ino: bigint; } export interface AttestedConversationStatePurgeTarget { readonly identity: FileSystemIdentity; readonly parent: AttestedConversationStatePurgeParent; } export interface AttestedConversationStatePurgeParent { readonly path: string; readonly canonicalPath: string; readonly identity: FileSystemIdentity; } export interface ResolvedConversationStatePurgeRoot { readonly kind: ConversationStatePurgeRootKind; readonly path: string; readonly canonicalPath: string; /** Present whenever the immediate parent exists, including after a crashed rename. */ readonly parent?: AttestedConversationStatePurgeParent; /** Undefined when the configured root does not exist yet. */ readonly target?: AttestedConversationStatePurgeTarget; } export interface ConversationStatePurgePlan { readonly roots: ConversationStatePurgeRoots; readonly sessions?: ResolvedConversationStatePurgeRoot; readonly history: ResolvedConversationStatePurgeRoot; readonly acpSessions: ResolvedConversationStatePurgeRoot; } export interface ConversationStateConfigSnapshot { readonly json: Readonly>; } export declare const CLEAR_SESSIONS_REGISTRY_DIRECTORY = "clear-sessions-v1"; export declare const CLEAR_SESSIONS_CONTROL_DIRECTORY = ".mono-agent-clear-sessions-v1"; export declare function clearSessionsRegistryRoot(cwd: string): string; /** * Resolve reset roots once so startup validation and the destructive purge path * remain bound to the same config/env precedence and derived directories. */ export declare function resolveConversationStatePurgeRoots(input: MonoAgentAppConfigInput, snapshot?: ConversationStateConfigSnapshot): Promise; /** Resolve and identity-pin every destructive reset root before any traversal or removal. */ export declare function resolveConversationStatePurgePlan(input: MonoAgentAppConfigInput, snapshot?: ConversationStateConfigSnapshot): Promise; /** Fail closed if any resolved reset target or its exact parent changed after preflight. */ export declare function assertConversationStatePurgePlanUnchanged(plan: ConversationStatePurgePlan): Promise; export declare function assertConversationStatePurgeRootUnchanged(expected: ResolvedConversationStatePurgeRoot): Promise; export declare function conversationStatePurgePlanEntries(plan: ConversationStatePurgePlan): readonly ResolvedConversationStatePurgeRoot[]; export declare function resolveAndAttestConversationStatePurgeRoot(kind: ConversationStatePurgeRootKind, path: string): Promise; export declare function sameFileSystemIdentity(value: { readonly dev: bigint; readonly ino: bigint; }, expected: FileSystemIdentity): boolean; //# sourceMappingURL=conversation-state-roots.d.ts.map