Versions in this module Expand all Collapse all v0 v0.0.7 Jun 4, 2026 v0.0.6 Jun 3, 2026 v0.0.5 May 29, 2026 v0.0.4 May 27, 2026 v0.0.3 May 27, 2026 v0.0.2 May 27, 2026 v0.0.1 May 26, 2026retracted Changes in this version + var ErrNotImplemented = errors.New("memory provider: not implemented") + type AgentTier string + const AgentTierGlobal + const AgentTierWorkspace + func (t AgentTier) Normalize() AgentTier + func (t AgentTier) Validate() error + type Backend interface + Delete func(scope Scope, filename string) error + History func(ctx context.Context, query OperationHistoryQuery) ([]OperationRecord, error) + List func(scope Scope) ([]Header, error) + LoadPromptIndex func(scope Scope) (content string, truncated bool, err error) + Read func(scope Scope, filename string) ([]byte, error) + Reindex func(ctx context.Context, opts ReindexOptions) (ReindexResult, error) + Search func(ctx context.Context, query string, opts SearchOptions) ([]SearchResult, error) + Write func(scope Scope, filename string, content []byte) error + type Block struct + AgentTier AgentTier + Entries []PackagedEntry + Scope Scope + type CacheStableHeader struct + ContentHash string + Text string + type Candidate struct + AgentName string + AgentTier AgentTier + Attribute string + Content string + Entity string + Frontmatter Header + Metadata map[string]string + Origin Origin + Scope Scope + SubmittedAt time.Time + TrustedRawContent string + WorkspaceID string + type Controller interface + Decide func(ctx context.Context, candidate Candidate) (Decision, error) + type Decision struct + CandidateHash string + Confidence float32 + DecidedAt time.Time + Frontmatter Header + ID string + IdempotencyKey string + LLMTrace *LLMCall + Op Op + PostContent string + PostContentHash string + PriorContent string + PromptVersion string + Reason string + RuleTrace []RuleHit + Source DecisionSource + TargetFilename string + Targets []string + type DecisionSource string + const SourceLLM + const SourceRule + func (s DecisionSource) Normalize() DecisionSource + func (s DecisionSource) Validate() error + type Extractor interface + Drain func(ctx context.Context) error + Extract func(ctx context.Context, turn TurnRecord) ([]Candidate, error) + type Header struct + AgentName string + AgentTier AgentTier + Description string + FilePath string + Filename string + ModTime time.Time + Name string + Provenance *Provenance + Scope Scope + Type Type + func (h *Header) Normalize() + func (h *Header) Validate() error + type HealthStats struct + IndexedFiles int + LastOperationAt *time.Time + LastReindex *time.Time + OperationCount int + OrphanedFiles int + type LLMCall struct + Error string + Latency time.Duration + Model string + PromptVersion string + RawResponse string + type MemoryProvider interface + Initialize func(ctx context.Context, init ProviderInit) error + OnMemoryWrite func(ctx context.Context, rec WriteRecord) error + OnPreCompress func(ctx context.Context, req PreCompressRequest) (PreCompressHint, error) + OnSessionEnd func(ctx context.Context, rec SessionEndRecord) error + OnSessionSwitch func(ctx context.Context, rec SessionSwitchRecord) error + Prefetch func(ctx context.Context, req PrefetchRequest) error + Recall func(ctx context.Context, req RecallRequest) (RecallResult, error) + Shutdown func(ctx context.Context) error + SyncTurn func(ctx context.Context, rec TurnRecord) error + SystemPromptBlock func(ctx context.Context, req SnapshotRequest) (SnapshotResult, error) + type Op uint8 + const OpAdd + const OpDelete + const OpNoop + const OpReject + const OpUpdate + func (o *Op) UnmarshalJSON(data []byte) error + func (o Op) MarshalJSON() ([]byte, error) + func (o Op) Normalize() Op + func (o Op) String() string + func (o Op) Validate() error + type Operation string + const OperationDelete + const OperationReindex + const OperationSearch + const OperationWrite + func (o Operation) Normalize() Operation + type OperationHistoryQuery struct + Limit int + Operation Operation + Scope Scope + Since time.Time + Workspace string + type OperationRecord struct + AgentName string + Filename string + ID string + Operation Operation + Scope Scope + Summary string + Timestamp time.Time + Workspace string + type Origin string + const OriginCLI + const OriginDreaming + const OriginExtractor + const OriginFile + const OriginHTTP + const OriginProvider + const OriginTool + const OriginUDS + func (o Origin) Normalize() Origin + func (o Origin) Validate() error + type Packaged struct + Blocks []Block + Header CacheStableHeader + type PackagedEntry struct + AgeDays int + Body string + Filename string + ID string + ModTime time.Time + StalenessBanner string + Title string + Type Type + WhyRecalled []string + WorkspaceID string + type PreCompressHint struct + Markdown string + Notes []string + type PreCompressRequest struct + SessionID string + Snapshot TranscriptSnapshot + WorkspaceID string + type PrefetchRequest struct + AgentName string + QueryText string + SessionID string + WorkspaceID string + type Provenance struct + Confidence string + CreatedAt time.Time + SourceActor Origin + SourceSessionIDs []string + SupersededBy string + UpdatedAt time.Time + func (p *Provenance) Normalize() + func (p *Provenance) Validate() error + type ProviderInit struct + Config map[string]any + Logger *slog.Logger + WorkspaceID string + WorkspaceRoot string + type Query struct + AgentName string + ContextHint string + QueryText string + WorkspaceID string + type RecallOptions struct + AllowTrivialQuery bool + AlreadySurfaced []string + IncludeAlreadySurfaced bool + IncludeSystem bool + RawCandidates int + TopK int + type RecallRequest struct + Options RecallOptions + type RecallResult struct + type Recaller interface + Recall func(ctx context.Context, query Query, opts RecallOptions) (Packaged, error) + type ReindexOptions struct + Scope Scope + Workspace string + type ReindexResult struct + CompletedAt time.Time + IndexedFiles int + Scope Scope + Workspace string + type RuleHit struct + Details string + Name string + Passed bool + Reason string + Target string + type Scope string + const ScopeAgent + const ScopeGlobal + const ScopeWorkspace + func DefaultScopeForType(t Type) (Scope, error) + func (s Scope) Normalize() Scope + func (s Scope) Validate() error + type SearchOptions struct + Limit int + Scope Scope + Workspace string + type SearchResult struct + Description string + Filename string + ModTime time.Time + Name string + Scope Scope + Score float64 + Snippet string + Type Type + Workspace string + type SessionEndRecord struct + AgentName string + EndedAt time.Time + SessionID string + Snapshot TranscriptSnapshot + WorkspaceID string + type SessionSwitchRecord struct + FromSession string + SwitchedAt time.Time + ToSession string + WorkspaceID string + type SnapshotRequest struct + AgentName string + AgentTier AgentTier + Scope Scope + WorkspaceID string + WorkspaceRoot string + type SnapshotResult struct + AgeMs int64 + Markdown string + type TranscriptMessage struct + At time.Time + Content string + Role string + Sequence int64 + type TranscriptSnapshot struct + Messages []TranscriptMessage + type Trigger string + const TriggerCompactionFlush + const TriggerPostMessage + func (t Trigger) Normalize() Trigger + func (t Trigger) Validate() error + type TurnRecord struct + ActorKind string + AgentID string + ParentSessionID string + RootSessionID string + SessionID string + SinceMessageSeq int64 + Snapshot TranscriptSnapshot + Trigger Trigger + UntilMessageSeq int64 + WorkspaceID string + type Type string + const TypeFeedback + const TypeProject + const TypeReference + const TypeUser + func (t Type) Normalize() Type + func (t Type) Validate() error + type WriteRecord struct + Candidate Candidate + Decision Decision