/** * Persistence for entity-name-quality guard-drop counters (issue #207, * migration 033). Mirrors src/storage/relation-guard-log.ts field-for-field * (a separate table, not a shared one -- see migrations/033-entity-name- * drops.sql for why) -- counts + a reason label only, never the raw dropped * name. */ import type { DB } from './db.js'; export interface EntityGuardDropRow { reason: string; count: number; } /** * Write one `entity_name_drops` row per entry with `count > 0`. No-op when * `drops` is empty or every entry is zero -- nothing to record, no wasted * write (same guard `recordRelationGuardDrops` uses). */ export declare function recordEntityGuardDrops(db: DB, drops: EntityGuardDropRow[], sessionId: string | null): void; /** Sum of all guard-drop counts recorded since `sinceMs` (all-time when omitted). */ export declare function totalEntityGuardDrops(db: DB, sinceMs?: number): number;