Metadata tracked per node for value function scoring.
Captures access patterns, temporal information, and accumulated rewards to enable recency, frequency, and reward-based scoring. The immutable audience is inherited from the ingested trajectory; nil marks legacy, unclassified nodes, which are hidden in access-controlled repos.
Summary
Functions
Returns the average reward, or 0.0 if no rewards recorded.
Creates a new metadata struct with the given options.
Increments access count and updates last accessed timestamp.
Adds a reward observation to the metadata.
Types
@type t() :: %Mnemosyne.NodeMetadata{ access_count: non_neg_integer(), audience: :repo | [{String.t(), String.t()}] | nil, created_at: DateTime.t(), cumulative_reward: float(), last_accessed_at: DateTime.t() | nil, reward_count: non_neg_integer() }
Functions
Returns the average reward, or 0.0 if no rewards recorded.
Creates a new metadata struct with the given options.
Increments access count and updates last accessed timestamp.
Adds a reward observation to the metadata.