memory

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveSessionAll

func ArchiveSessionAll(workspace string, sess *session.Session) (bool, error)

ArchiveSessionAll consolidates all not-yet-consolidated messages.

func ConsolidateSession

func ConsolidateSession(workspace string, sess *session.Session, keepRecent int) (bool, error)

ConsolidateSession appends a compact session summary to HISTORY.md and updates LastConsolidated. keepRecent controls how many most-recent messages stay unconsolidated.

func SummarizeDay

func SummarizeDay(workspace string, day time.Time) (bool, error)

SummarizeDay appends one day's summary to memory/MEMORY.md (idempotent by date heading).

func SummarizePreviousDay

func SummarizePreviousDay(workspace string, now time.Time) (bool, error)

SummarizePreviousDay appends yesterday's summary to memory/MEMORY.md if not summarized yet.

Types

type DailySummaryService

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

func NewDailySummaryService

func NewDailySummaryService(workspace string, interval time.Duration) *DailySummaryService

func (*DailySummaryService) RunOnce

func (s *DailySummaryService) RunOnce(now time.Time) (bool, error)

func (*DailySummaryService) Start

func (s *DailySummaryService) Start(ctx context.Context)

type Store

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

func NewStore

func NewStore(workspace string) *Store

func (*Store) AppendHistory

func (s *Store) AppendHistory(entry string) error

func (*Store) EnsureFiles

func (s *Store) EnsureFiles() error

func (*Store) HistoryPath

func (s *Store) HistoryPath() string

func (*Store) ReadLongTerm

func (s *Store) ReadLongTerm() (string, error)

func (*Store) WriteLongTerm

func (s *Store) WriteLongTerm(content string) error

Jump to

Keyboard shortcuts

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