Versions in this module Expand all Collapse all v0 v0.2.0 Jul 14, 2026 Changes in this version + func EnsureDirectory() error + type Catalog struct + func NewCatalog() *Catalog + func NewCatalogWithConfig(config *MemoryConfig) *Catalog + func (ms *Catalog) CleanupExpired() int + func (ms *Catalog) DeleteEntry(id string) error + func (ms *Catalog) Entries() []Entry + func (ms *Catalog) Export() ([]byte, error) + func (ms *Catalog) GetEntry(id string) (*Entry, error) + func (ms *Catalog) GetToolUsagePatterns(toolName string) (*ToolUsageMemory, error) + func (ms *Catalog) Import(data []byte) error + func (ms *Catalog) LearnToolUsage(toolName string, parameters map[string]any, success bool, err error) error + func (ms *Catalog) ResetEntries(entries []Entry) + func (ms *Catalog) ResetToolUsage(toolUsage map[string]*ToolUsageMemory) + func (ms *Catalog) Search(query MemoryQuery) (*MemorySearchResult, error) + func (ms *Catalog) Start() + func (ms *Catalog) Stats() MemoryStats + func (ms *Catalog) Stop() + func (ms *Catalog) StoreEntry(entry Entry) error + func (ms *Catalog) ToolUsageSnapshot() map[string]*ToolUsageMemory + type ContextBuilder struct + func NewContextBuilder(projectPath string) (*ContextBuilder, error) + func (b *ContextBuilder) Build() string + type CrossSession struct + GlobalPatterns map[string]*PatternEntry + LoadedAt time.Time + SessionSummaries map[string]*SessionSummary + func NewCrossSession() *CrossSession + type Duration struct + MS int64 + type Entry struct + AccessCount int + Confidence float64 + Content string + CreatedAt time.Time + ExpiresAt *time.Time + ID string + Importance float64 + Key string + LastAccessed time.Time + Metadata *EntryMetadata + Scope MemoryScope + SessionID string + Source string + Tags []string + Type MemoryType + UpdatedAt time.Time + Value string + func NewEntry(scope MemoryScope, memType MemoryType, key, value, source string) *Entry + type EntryMetadata struct + FilePath string + Frequency int + LastUsedAt *time.Time + LineNumber int + SuccessRate float64 + Tags []string + ToolUsed string + type ErrorLearner struct + func NewErrorLearner(projectPath string) (*ErrorLearner, error) + func (e *ErrorLearner) OnError(err error) error + type ErrorPattern struct + ErrorType string + FirstSeen time.Time + Frequency int + LastSeen time.Time + Message string + Suggestion string + type FileStore struct + func NewFileStore(basePath string) (*FileStore, error) + func (s *FileStore) LoadCrossSession() (*CrossSession, error) + func (s *FileStore) LoadProjectMemory(projectPath string) (*ProjectMemory, error) + func (s *FileStore) LoadUserMemory() (*UserMemory, error) + func (s *FileStore) SaveCrossSession(m *CrossSession) error + func (s *FileStore) SaveProjectMemory(m *ProjectMemory) error + func (s *FileStore) SaveUserMemory(m *UserMemory) error + type IntegrationManager struct + func NewIntegrationManager(enableCatalog bool) (*IntegrationManager, error) + func (im *IntegrationManager) Context() string + func (im *IntegrationManager) DisableCatalog() + func (im *IntegrationManager) EnableCatalog() + func (im *IntegrationManager) ExportAll() (map[string][]byte, error) + func (im *IntegrationManager) GetPreferences(scope MemoryScope) []*Entry + func (im *IntegrationManager) GetToolUsagePatterns(toolName string) (*ToolUsageMemory, error) + func (im *IntegrationManager) IsCatalogMode() bool + func (im *IntegrationManager) LearnToolUsage(toolName string, parameters map[string]any, success bool, err error) error + func (im *IntegrationManager) Search(query MemoryQuery) (*MemorySearchResult, error) + func (im *IntegrationManager) Start() error + func (im *IntegrationManager) Stats() map[string]interface{} + func (im *IntegrationManager) Stop() + func (im *IntegrationManager) StorePreference(scope MemoryScope, key, value, source string) error + type Learner struct + func NewLearner(projectPath, sessionID string) (*Learner, error) + func (l *Learner) AddInstruction(key, instruction, source string) error + func (l *Learner) AddUserPreference(key, value, source string) error + func (l *Learner) Flush() error + func (l *Learner) OnToolUse(toolName string, success bool, durationMs int, errMsg string) + type Manager struct + func NewManager() (*Manager, error) + func NewManagerWithPath(basePath string) (*Manager, error) + func NewService() (*Manager, error) + func NewServiceWithPath(basePath string) (*Manager, error) + func (m *Manager) AddSessionSummary(sessionID, projectPath, summary string, toolsUsed []string) error + func (m *Manager) Catalog() *Catalog + func (m *Manager) Context() string + func (m *Manager) DeleteEntry(id string) error + func (m *Manager) GetCrossSession() *CrossSession + func (m *Manager) GetEntry(id string) (*Entry, error) + func (m *Manager) GetPreferences(scope MemoryScope) []*Entry + func (m *Manager) GetProject() *ProjectMemory + func (m *Manager) GetProjectHistory(projectPath string) []*SessionSummary + func (m *Manager) GetToolUsagePatterns(toolName string) (*ToolUsageMemory, error) + func (m *Manager) GetUser() *UserMemory + func (m *Manager) LearnInstruction(scope MemoryScope, key, value, source string) error + func (m *Manager) LearnPreference(scope MemoryScope, key, value, source string) error + func (m *Manager) LearnToolUsage(toolName string, parameters map[string]any, success bool, err error) error + func (m *Manager) LoadAll(projectPath string) error + func (m *Manager) LoadCrossSession() error + func (m *Manager) LoadProject(projectPath string) error + func (m *Manager) LoadUser() error + func (m *Manager) SaveAll() error + func (m *Manager) SaveCrossSession() error + func (m *Manager) SaveProject() error + func (m *Manager) SaveUser() error + func (m *Manager) Search(query MemoryQuery) (*MemorySearchResult, error) + func (m *Manager) Stats() MemoryStats + func (m *Manager) StoreEntry(entry Entry) error + type MemoryConfig struct + DefaultTTL time.Duration + EnableSemanticSearch bool + ImportanceDecay float64 + IndexingEnabled bool + LearningEnabled bool + MaxEntries int + MaxImportance float64 + MinImportance float64 + RetentionPolicy MemoryRetentionPolicy + func DefaultMemoryConfig() *MemoryConfig + type MemoryIndex struct + type MemoryQuery struct + Content string + ExactMatch bool + Keywords []string + Limit int + MinConfidence float64 + MinImportance float64 + SessionID string + Tags []string + TimeRange *TimeRange + Tool string + Types []MemoryType + type MemoryRetentionPolicy struct + ContextRetention time.Duration + ConversationRetention time.Duration + ErrorRetention time.Duration + SuccessRetention time.Duration + ToolUsageRetention time.Duration + type MemoryScope string + const MemoryScopeProject + const MemoryScopeSession + const MemoryScopeUser + type MemorySearchResult struct + Entries []Entry + ExecutionTime time.Duration + Query MemoryQuery + Total int + type MemoryStats struct + AverageConfidence float64 + AverageImportance float64 + EntriesByType map[MemoryType]int + MissedRetrievals int64 + MostAccessed []string + NewestEntry *time.Time + OldestEntry *time.Time + QueryLatency time.Duration + StorageSize int64 + SuccessfulRetrievals int64 + TotalAccessCount int64 + TotalEntries int + TotalQueries int64 + type MemoryType string + const MemoryTypeContext + const MemoryTypeConversation + const MemoryTypeError + const MemoryTypeInstruction + const MemoryTypeKnowledge + const MemoryTypePattern + const MemoryTypePreference + const MemoryTypeSuccess + const MemoryTypeSummary + const MemoryTypeToolUsage + type ParameterPattern struct + Frequency int + LastUsed *time.Time + Parameters map[string]any + Success bool + type PatternEntry struct + Description string + Examples []string + Frequency int + Key string + LastSeenAt time.Time + Pattern string + SuccessRate float64 + type ProjectConfig struct + AutoLearnPatterns bool + Enabled bool + ExcludePatterns []string + IncludePatterns []string + MaxEntries int + RetentionDays int + func DefaultProjectConfig() *ProjectConfig + type ProjectMemory struct + Config *ProjectConfig + Entries map[string]*Entry + LoadedAt time.Time + ProjectPath string + RootID string + ToolUsage map[string]*ToolUsageMemory + func NewProjectMemory(projectPath string) *ProjectMemory + type Service = Manager + type SessionSummary struct + CompletedAt time.Time + ErrorsEncountered []string + KeyLearned []string + ProjectPath string + SessionID string + Summary string + ToolsUsed []string + type Store interface + LoadCrossSession func() (*CrossSession, error) + LoadProjectMemory func(projectPath string) (*ProjectMemory, error) + LoadUserMemory func() (*UserMemory, error) + SaveCrossSession func(m *CrossSession) error + SaveProjectMemory func(m *ProjectMemory) error + SaveUserMemory func(m *UserMemory) error + type TimeRange struct + End time.Time + Start time.Time + type ToolStats struct + Attempts int + AvgDuration Duration + Failures int + LastUsedAt time.Time + Successes int + ToolName string + type ToolUsageMemory struct + FailedParameters []ParameterPattern + LastUsed time.Time + SuccessRate float64 + SuccessfulParameters []ParameterPattern + ToolName string + TypicalUsage string + UsageCount int + type UserConfig struct + AutoLearnPatterns bool + Enabled bool + MaxEntries int + ShareWithProjects bool + func DefaultUserConfig() *UserConfig + type UserMemory struct + Config *UserConfig + Entries map[string]*Entry + LoadedAt time.Time + UserID string + func NewUserMemory(userID string) *UserMemory