Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

Node lifecycle: access tracking, importance decay, stale tagging, and stats.

Functions§

compute_stats
Compute aggregate statistics about the knowledge graph.
count_expired_nodes
Count nodes whose valid_until is set and earlier than now (ISO 8601).
decay_importance
Gradually decay importance for nodes not accessed in days.
mark_verified
Record that a node’s content was verified as of now (ISO 8601).
tag_stale_nodes
Tag nodes not updated within days as stale by appending “stale” to tags.
touch_node
Record an access event: increment access_count and update accessed_at.
touch_nodes
Batch-touch multiple nodes.