Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store tracks pairwise tool co-occurrence: which tools are used together in task runs. It maintains an in-memory count map with optional persistence to a graph.IStore.
func NewStore ¶
NewStore creates a co-occurrence store. If graphStore is nil, the store operates in ephemeral mode (in-memory only, no persistence).
func (*Store) Load ¶
Load replaces the in-memory co-occurrence map with the state persisted in the graph store. It clears existing counts and maxWeight before hydrating, so any in-memory data that was not successfully persisted will be lost. Callers should treat Load as a "reset to durable state" operation, not an additive merge. Returns nil immediately if the graph store is nil.
Note: Load is not atomic with respect to concurrent Record calls. A Record that runs between the clear and the hydration may insert data that is not in the graph store. In practice this is safe because Load is only called during construction before the store is shared with other goroutines.