memory

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiaryEntry

type DiaryEntry struct {
	Date    string
	Path    string
	Content string
}

type Manager

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

func NewManager

func NewManager(workspacePath string) *Manager

func (*Manager) AppendDiary

func (m *Manager) AppendDiary(entry string) (string, error)

func (*Manager) AppendDiaryAt

func (m *Manager) AppendDiaryAt(ts time.Time, entry string) (string, error)

func (*Manager) Ensure

func (m *Manager) Ensure() error

func (*Manager) ReadDiary

func (m *Manager) ReadDiary(date string) (string, error)

func (*Manager) ReadLongTerm

func (m *Manager) ReadLongTerm() (string, error)

func (*Manager) ReadRecentDiaries

func (m *Manager) ReadRecentDiaries(limit int) ([]DiaryEntry, error)

func (*Manager) RecallContext added in v0.5.0

func (m *Manager) RecallContext(query string, recentLimit, keywordLimit int) (RecallResult, error)

RecallContext selects context fragments using recent-first + keyword-hit strategy.

func (*Manager) WriteLongTerm

func (m *Manager) WriteLongTerm(content string) error

type RecallItem added in v0.5.0

type RecallItem struct {
	Source  string
	Date    string
	Path    string
	Excerpt string
}

RecallItem is one recalled memory fragment with source attribution.

type RecallResult added in v0.5.0

type RecallResult struct {
	Query       string
	RecallCount int
	SourceHits  map[string]int
	Items       []RecallItem
}

RecallResult summarizes context recall quality and provenance.

Jump to

Keyboard shortcuts

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