Documentation
¶
Index ¶
- Constants
- func ResolveScopedResourceRoot(baseResourceDir, memoryScopeKey string) string
- type Manager
- func (m *Manager) AppendDailySummary(memoryScopeKey, sessionKey, summary string, at time.Time) error
- func (m *Manager) BuildPrompt(memoryScopeKey, userText string) (string, error)
- func (m *Manager) Init() error
- func (m *Manager) SaveInteraction(memoryScopeKey, userText, assistantText string, failed bool) (bool, error)
- func (m *Manager) Snapshot(memoryScopeKey string, at time.Time) (ScopeSnapshot, error)
- func (m *Manager) WriteLongTerm(memoryScopeKey, scopeType, content string) (string, error)
- type ScopeSnapshot
Constants ¶
View Source
const ( GlobalDirName = "global" ResourceDirName = "resources" ScopeRootDirName = "scopes" )
View Source
const ( LongTermFileName = "MEMORY.md" ShortTermDirName = "daily" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
Dir string
MaxLongTermRunes int
MaxShortTermRunes int
MaxEntryRunes int
// contains filtered or unexported fields
}
func (*Manager) AppendDailySummary ¶
func (*Manager) BuildPrompt ¶
func (*Manager) SaveInteraction ¶
type ScopeSnapshot ¶
type ScopeSnapshot struct {
ScopeKey string `json:"scope_key"`
GlobalLongPath string `json:"global_long_path"`
GlobalLongText string `json:"global_long_text"`
ScopeLongPath string `json:"scope_long_path"`
ScopeLongText string `json:"scope_long_text"`
ScopeShortTermDir string `json:"scope_short_term_dir"`
ShortTermName string `json:"short_term_name"`
GeneratedAt time.Time `json:"generated_at"`
}
Click to show internal directories.
Click to hide internal directories.