heartbeat

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsolidationResult

type ConsolidationResult struct {
	Insights       []Insight     `json:"insights"`
	MergedCount    int           `json:"merged_count"`
	ProcessedCount int           `json:"processed_count"`
	Duration       time.Duration `json:"duration"`
}

ConsolidationResult holds the output of a heartbeat cycle.

type Consolidator

type Consolidator struct {
	// contains filtered or unexported fields
}

Consolidator analyzes stored memories and produces insights.

func NewConsolidator

func NewConsolidator(mgr *memory.Manager) *Consolidator

func (*Consolidator) Run

Run executes a heartbeat consolidation cycle for the given scope. It finds clusters of similar memories and generates insights.

func (*Consolidator) SetSimilarityThreshold

func (c *Consolidator) SetSimilarityThreshold(t float64)

SetSimilarityThreshold adjusts how aggressively memories are grouped. Higher values (closer to 1.0) mean only very similar memories are grouped.

type Insight

type Insight struct {
	Content     string    `json:"content"`
	SourceIDs   []string  `json:"source_ids"`
	InsightType string    `json:"insight_type"` // summary | contradiction | pattern
	Confidence  float64   `json:"confidence"`
	CreatedAt   time.Time `json:"created_at"`
}

Insight represents a derived insight from memory consolidation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL