{"modulePath":"github.com/daemon365/supercode","version":"v0.0.0-20260802105639-f56615fdcfd1","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package memory\n\nPackage memory manages file-backed, cross-session long-term memory.\n\n## Constants\n\n```go\nconst (\n\tToolSearch = \"memories_search\"\n\tToolRead   = \"memories_read\"\n\tToolList   = \"memories_list\"\n\tToolAdd    = \"memories_add_ad_hoc_note\"\n)\n```\n\n## Functions\n\n```go\nfunc StripCitations(value string) (string, []string)\n```\n\n## Types\n\n```go\ntype CitationParser struct {\n\t// contains filtered or unexported fields\n}\n```\nCitationParser removes hidden memory citations across arbitrary stream chunk boundaries while retaining their rollout IDs for usage feedback.\n\n```go\nfunc (p *CitationParser) Finish() (string, []string)\n```\n\n```go\nfunc (p *CitationParser) Push(value string) string\n```\n\n```go\ntype Config struct {\n\tGenerate                       bool\n\tUse                            bool\n\tDedicatedTools                 bool\n\tAutoCapture                    bool\n\tSummaryTokens                  int\n\tMaxRolloutsPerStartup          int\n\tMaxRolloutAgeDays              int\n\tMinRolloutIdleHours            int\n\tMaxRawMemoriesForConsolidation int\n\tMaxUnusedDays                  int\n\tExtractModel                   string\n\tConsolidationModel             string\n}\n```\nConfig controls generation and retrieval without coupling memory to one model provider. Empty model names use the active SuperCode model.\n\n```go\nfunc DefaultConfig() Config\n```\n\n```go\ntype PipelineReport struct {\n\tEligible             int\n\tExtracted            int\n\tNoOutput             int\n\tFailed               int\n\tConsolidated         bool\n\tConsolidationSkipped bool\n}\n```\n\n```go\ntype Store struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewStore(path string, legacyPaths ...string) (*Store, error)\n```\nNewStore creates a directory-backed memory store. A historical memory.md path may be supplied for one-time migration into an ad-hoc note.\n\n```go\nfunc (s *Store) AddAdHocNamed(filename, note string) (string, error)\n```\n\n```go\nfunc (s *Store) AddAdHocNote(slug, note string) (string, error)\n```\n\n```go\nfunc (s *Store) AutoCapture(prompt string) (bool, error)\n```\n\n```go\nfunc (s *Store) Clear() error\n```\nClear is an explicit hard reset retained for programmatic compatibility. It removes generated artifacts, source extracts, notes, generated Skills, metadata, and the private Git baseline. The TUI's /forget command uses Forget and therefore flows through Phase 2 instead.\n\n```go\nfunc (s *Store) Configuration() Config\n```\n\n```go\nfunc (s *Store) Configure(maxTokens int, autoCapture bool)\n```\nConfigure retains the original API while mapping it onto summary injection and optional deterministic capture of explicit preference statements.\n\n```go\nfunc (s *Store) ConfigureAdvanced(configuration Config)\n```\n\n```go\nfunc (s *Store) Forget(value string) error\n```\nForget queues a user-authorized deletion or update request for the next global consolidation pass instead of editing generated MEMORY.md directly.\n\n```go\nfunc (s *Store) Instructions() string\n```\n\n```go\nfunc (s *Store) Read() (string, error)\n```\n\n```go\nfunc (s *Store) RecordUsage(rolloutIDs []string)\n```\n\n```go\nfunc (s *Store) Remember(value string) error\n```\n\n```go\nfunc (s *Store) RememberWithSource(value, source string) error\n```\n\n```go\nfunc (s *Store) Root() string\n```\n\n```go\nfunc (s *Store) RunShutdown(ctx context.Context, modelProvider provider.Provider, sessions *session.Store, currentSessionID, activeModel string) (PipelineReport, error)\n```\nRunShutdown cancels and joins the background startup pass, then extracts the just-committed current root session without applying the startup idle cutoff. A redacted serialized-content hash provides the same idempotency guard used by startup passes, without treating a metadata-only session commit as new.\n\n```go\nfunc (s *Store) RunStartup(ctx context.Context, modelProvider provider.Provider, sessions *session.Store, currentSessionID, activeModel string) (PipelineReport, error)\n```\n\n```go\nfunc (s *Store) StartStartup(ctx context.Context, modelProvider provider.Provider, sessions *session.Store, currentSessionID, activeModel string)\n```\nStartStartup launches the bounded pipeline for idle sessions. It intentionally does not block normal chat startup.\n\n```go\nfunc (s *Store) Status() string\n```\n\n```go\nfunc (s *Store) StopStartup(ctx context.Context) error\n```\nStopStartup cancels and joins the optional background startup pipeline without starting extraction for a current session.\n\n```go\nfunc (s *Store) Summary() (string, error)\n```\n\n```go\nfunc (s *Store) Tools() []tool.Tool\n```\n\n","path":"github.com/daemon365/supercode/internal/memory","name":"memory","synopsis":"Package memory manages file-backed, cross-session long-term memory.","isRedistributable":true}
