/** * Entity Hygiene Step — ported from KB sleep/steps/entity-hygiene.ts. * * Cleans the entity graph by: * 1. Removing transcription artifacts (Speaker 0, Speaker 1, Unknown, etc.) * 2. Pruning low-value noise (entities with 1 mention and a name matching a * stop-word list) — mirrors KB's pruneMinAgeDays logic adapted for Arcana * which lacks entity createdAt (KB uses the graph DB timestamp). * * Full AI-powered merge detection (KB's step 2/3) is deferred to v2 sleep — * it requires a more complex LLM loop that KB drives via mergeEntities() + * entity-graph.ts. For v1, automatic artifact removal + mention-based pruning * achieves the primary noise-reduction goal. * * Adapter note: KB uses getEntityGraphDb + mergeEntities + deleteEntity from * entity-graph.ts. Arcana uses deps.structured.listEntities + deleteEntity. */ import type { MaintainDeps } from '../index.js'; import type { SleepConfig } from '../config.js'; export interface EntityHygieneResult { count: number; artifactsCleaned: number; pruned: number; processed: number; errors?: string[]; } export declare function runCleanEntityGraph(deps: MaintainDeps, config: SleepConfig): Promise; //# sourceMappingURL=clean-entity-graph.d.ts.map