Expand description
Garbage collection for the knowledge graph.
Sweep order: stale relationships → dead relationships → orphaned entities → spent episodes → delete. Dry-run by default. Pipeline-linked entities are protected, and so is anything a surviving record cites as its source.
Structs§
- GcAction
- A single GC action with reason.
- GcConfig
- Configuration for garbage collection thresholds.
- GcReport
- Report from a GC run.
- GcStats
Report - Health stats without running GC.
Enums§
- GcAction
Kind - What kind of thing is being collected.
Constants§
- DEFAULT_
EPISODE_ MAX_ AGE_ DAYS - Default age, in days, before a never-retrieved episode may be collected.
Functions§
- run_gc
- Run garbage collection on the graph.
- stats_
only - Get stats-only report without computing deletion candidates. Uses effective confidence (with temporal decay) for threshold counts.