import type { MemoryEntry } from './memory.js';
import type { DatabaseSyncLike } from './db.js';
export type AuditSeverity = 'warning' | 'error';
export interface AuditIssue {
    memoryId: string;
    content: string;
    severity: AuditSeverity;
    reason: string;
}
export interface AuditResult {
    total: number;
    issues: AuditIssue[];
    clean: number;
}
export declare function auditMemory(entry: MemoryEntry): AuditIssue | null;
export declare function auditMemories(entries: MemoryEntry[]): AuditResult;
export declare function isContentWorthStoring(content: string): boolean;
export type AuditOp = 'remember' | 'recall' | 'promote' | 'supersede' | 'forget' | 'archive_raw' | 'auth_revoke' | 'auth_create' | 'outcome' | 'consolidate' | 'audit_prune' | 'summary_marked_dirty' | 'summary_marked_clean' | 'summary_rebuilt' | 'predict_create' | 'predict_close' | 'predict_baserate' | 'recall_autodebias_hint' | 'recall_autodebias_hint_no_class_match' | 'recall_autodebias_hint_tiebreak' | 'recall_anchor_detected_query_repeat' | 'recall_anchor_detected_memory_dominance' | 'recall_anchor_skipped_no_session' | 'recall_availability_detected' | 'decision_create' | 'decision_supersede' | 'decision_close';
export interface AppendAuditOpts {
    tenantId: string;
    actor: string;
    op: AuditOp;
    targetId?: string;
    metadata?: Record<string, unknown>;
}
export declare function appendAuditEvent(db: DatabaseSyncLike, opts: AppendAuditOpts): void;
export interface QueryAuditOpts {
    tenantId: string;
    op?: AuditOp;
    since?: string;
    limit?: number;
}
export interface AuditEvent {
    id: number;
    ts: string;
    tenantId: string;
    actor: string;
    op: AuditOp;
    targetId: string | null;
    metadata: Record<string, unknown>;
}
export declare function queryAuditEvents(db: DatabaseSyncLike, opts: QueryAuditOpts): AuditEvent[];
//# sourceMappingURL=audit.d.ts.map