Skip to main content

Module gc

Module gc 

Source
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.
GcStatsReport
Health stats without running GC.

Enums§

GcActionKind
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.