Versions in this module Expand all Collapse all v0 v0.2.2 Feb 27, 2026 Changes in this version + const DefaultRerankModel + var ErrAlreadyPinned = errors.New("file is already in system/") + var ErrFileNotFound = errors.New("memory file not found") + var ErrNoChanges = errors.New("no changes to commit") + var ErrNotPinned = errors.New("file is not in system/") + var ErrPathEscape = errors.New("path escapes memory directory") + var ErrReadOnly = errors.New("file is marked read-only") + var ErrRepoBusy = errors.New("memory repo busy") + func FormatFrontmatter(fm Frontmatter, body string) string + func FormatTree(entries []TreeEntry) string + func GitEnabledFromConfig(cfg *config.Config) bool + type Chunk struct + EndLine int + Hash string + StartLine int + Text string + type ClaudeReranker struct + func NewClaudeReranker(model string) (*ClaudeReranker, error) + func (r *ClaudeReranker) Name() string + func (r *ClaudeReranker) Rerank(query string, results []SearchResult) ([]SearchResult, error) + type EmbeddingProvider interface + Dims func() int + Embed func(texts []string) ([][]float32, error) + Name func() string + type FileInfo struct + ChunkCount int + Path string + SizeBytes int64 + UpdatedAt int64 + type Frontmatter struct + Description string + Extra map[string]interface{} + Limit int + Metadata map[string]interface{} + ReadOnly bool + Source string + Tags []string + func ParseFrontmatter(content string) (Frontmatter, string) + type GitBranchInfo struct + All []string + Current string + Default string + type GitLogEntry struct + Additions int + AuthorEmail string + AuthorName string + Branch string + Date string + Deletions int + Files []string + Message string + ParentSHA string + SHA string + type GitRepo struct + func InitGitRepo(dir string) (*GitRepo, error) + func (g *GitRepo) AutoCommit(message string) error + func (g *GitRepo) BranchInfo() (GitBranchInfo, error) + func (g *GitRepo) Branches() ([]string, error) + func (g *GitRepo) CreateBranch(name, fromRef string) error + func (g *GitRepo) CurrentBranch() (string, error) + func (g *GitRepo) DefaultBranch() (string, error) + func (g *GitRepo) DeleteBranch(name string, force bool) error + func (g *GitRepo) DiffRefs(baseRef, headRef, path string) (string, error) + func (g *GitRepo) IsInitialized() bool + func (g *GitRepo) ListMarkdownFilesAtRef(ref string) (map[string]string, error) + func (g *GitRepo) Log(path string, count int) ([]GitLogEntry, error) + func (g *GitRepo) LogWithBranch(path string, count int, branch string) ([]GitLogEntry, error) + func (g *GitRepo) MergeBranch(source, target, strategy string) ([]string, error) + func (g *GitRepo) ReadFileAtRef(ref, relPath string) (string, error) + type Manager struct + func NewManager(dir string, provider EmbeddingProvider) (*Manager, error) + func NewManagerFromConfig(cfg *config.Config) (*Manager, error) + func NewManagerWithOptions(dir string, provider EmbeddingProvider, opts ManagerOptions) (*Manager, error) + func (m *Manager) Append(relPath, content string) error + func (m *Manager) AppendOnBranch(relPath, content, branch string) error + func (m *Manager) Close() + func (m *Manager) CreateBranch(name, fromRef string) error + func (m *Manager) Delete(relPath string) error + func (m *Manager) DeleteBranch(name string, force bool) error + func (m *Manager) DeleteOnBranch(relPath, branch string) error + func (m *Manager) DiffRefs(baseRef, headRef, relPath string) (string, error) + func (m *Manager) Dir() string + func (m *Manager) Get(relPath string, from, lines int) (string, error) + func (m *Manager) GetAtRef(relPath string, from, lines int, ref string) (string, error) + func (m *Manager) GitBranchInfo() (GitBranchInfo, error) + func (m *Manager) GitBranches() (current string, branches []string, err error) + func (m *Manager) GitEnabled() bool + func (m *Manager) History(relPath string, count int) ([]GitLogEntry, error) + func (m *Manager) HistoryWithBranch(relPath string, count int, branch string) ([]GitLogEntry, error) + func (m *Manager) List() ([]FileInfo, error) + func (m *Manager) ListAtRef(ref string) ([]FileInfo, error) + func (m *Manager) MergeBranch(source, target, strategy string) error + func (m *Manager) Move(from, to string) error + func (m *Manager) MoveOnBranch(from, to, branch string) error + func (m *Manager) Pin(relPath string) error + func (m *Manager) PinOnBranch(relPath, branch string) error + func (m *Manager) Read(relPath string) (string, error) + func (m *Manager) ReadAtRef(relPath string, ref string) (string, error) + func (m *Manager) ReadFileFrontmatter(relPath string) (Frontmatter, error) + func (m *Manager) Search(query string, opts SearchOpts) ([]SearchResult, error) + func (m *Manager) SetReranker(r Reranker) + func (m *Manager) StartWatcher() (stop func(), err error) + func (m *Manager) Sync(relPath string) error + func (m *Manager) SystemFiles(maxChars int) (map[string]string, error) + func (m *Manager) Tree() ([]TreeEntry, error) + func (m *Manager) TreeAtRef(ref string) ([]TreeEntry, error) + func (m *Manager) Unpin(relPath string) error + func (m *Manager) UnpinOnBranch(relPath, branch string) error + func (m *Manager) Write(content, file string) error + func (m *Manager) WriteFile(relPath, content, commitMsg string) error + func (m *Manager) WriteFileOnBranch(relPath, content, commitMsg, branch string) error + func (m *Manager) WriteWithCommitMessage(content, file, commitMsg string) error + func (m *Manager) WriteWithCommitMessageOnBranch(content, file, commitMsg, branch string) error + type ManagerOptions struct + GitEnabled bool + type MemoryStore interface + Append func(relPath, content string) error + AppendOnBranch func(relPath, content, branch string) error + CreateBranch func(name, fromRef string) error + Delete func(relPath string) error + DeleteBranch func(name string, force bool) error + DeleteOnBranch func(relPath, branch string) error + DiffRefs func(baseRef, headRef, relPath string) (string, error) + Dir func() string + Get func(relPath string, from, lines int) (string, error) + GetAtRef func(relPath string, from, lines int, ref string) (string, error) + GitBranchInfo func() (GitBranchInfo, error) + GitBranches func() (current string, branches []string, err error) + GitEnabled func() bool + History func(relPath string, count int) ([]GitLogEntry, error) + HistoryWithBranch func(relPath string, count int, branch string) ([]GitLogEntry, error) + List func() ([]FileInfo, error) + ListAtRef func(ref string) ([]FileInfo, error) + MergeBranch func(source, target, strategy string) error + Move func(from, to string) error + MoveOnBranch func(from, to, branch string) error + Pin func(relPath string) error + PinOnBranch func(relPath, branch string) error + Read func(relPath string) (string, error) + ReadAtRef func(relPath, ref string) (string, error) + Search func(query string, opts SearchOpts) ([]SearchResult, error) + Tree func() ([]TreeEntry, error) + TreeAtRef func(ref string) ([]TreeEntry, error) + Unpin func(relPath string) error + UnpinOnBranch func(relPath, branch string) error + WriteFile func(relPath, content, commitMsg string) error + WriteFileOnBranch func(relPath, content, commitMsg, branch string) error + WriteWithCommitMessage func(content, file, commitMsg string) error + WriteWithCommitMessageOnBranch func(content, file, commitMsg, branch string) error + type OllamaProvider struct + Model string + URL string + func NewOllamaProvider(url, model string) *OllamaProvider + func (p *OllamaProvider) Dims() int + func (p *OllamaProvider) Embed(texts []string) ([][]float32, error) + func (p *OllamaProvider) Name() string + type OpenAIProvider struct + APIKey string + Model string + func NewOpenAIProvider(apiKey, model string) *OpenAIProvider + func (p *OpenAIProvider) Dims() int + func (p *OpenAIProvider) Embed(texts []string) ([][]float32, error) + func (p *OpenAIProvider) Name() string + type RepoStoreResolution struct + CanonicalPath string + CanonicalSlug string + LegacyPath string + LegacySlug string + func ResolveRepoStorePaths(baseDir, repoPath, worktreePath string) (RepoStoreResolution, error) + type Reranker interface + Name func() string + Rerank func(query string, results []SearchResult) ([]SearchResult, error) + type SearchOpts struct + MaxResults int + MinScore float32 + type SearchResult struct + EndLine int + Path string + Score float32 + Snippet string + StartLine int + type TreeEntry struct + Description string + IsSystem bool + Path string + SizeBytes int64