import type { Database } from "./database.js"; import { type MemoryOperationPlanInput, type MemoryRevertPlanInput } from "./memory-domain.js"; export declare class MemoryGovernanceAuthorityError extends Error { readonly name = "MemoryGovernanceAuthorityError"; } export type MemoryGovernanceDirectSubjectAuthority = { kind: "subject"; accountId: string; workspaceId: string; subjectId: string; }; export type MemoryGovernanceDirectServiceAuthority = { kind: "service"; accountId: string; workspaceId: string; serviceId: string; }; export type MemoryGovernanceAttemptAuthority = { kind: "attempt"; accountId: string; workspaceId: string; sessionId: string; turnId: string; attemptId: string; executionGeneration: number; }; export type MemoryGovernanceAuthority = MemoryGovernanceDirectSubjectAuthority | MemoryGovernanceDirectServiceAuthority | MemoryGovernanceAttemptAuthority; export declare function applyKnowledgeMemoryOperation(db: Database, input: { authority: MemoryGovernanceAuthority; plan: MemoryOperationPlanInput; }): Promise<{ eventId: string; planHash: string; }>; export declare function revertKnowledgeMemoryOperation(db: Database, input: { authority: MemoryGovernanceAuthority; plan: MemoryRevertPlanInput; }): Promise<{ eventId: string; planHash: string; }>;