Documentation
¶
Overview ¶
Package memory exposes TARS' file-backed memory primitives for lightweight agent applications. It covers durable Markdown notes, daily logs, reviewed experiences, optional semantic search, and the narrow Backend interface used by memory-aware tools.
Index ¶
- Constants
- Variables
- func AppendDailyLog(root string, now time.Time, entry string) error
- func AppendExperience(root string, exp Experience) error
- func AppendMemoryNote(root string, now time.Time, entry string) error
- func EnsureWorkspace(root string) error
- func IsSupportedEmbedProvider(raw string) bool
- func NormalizeEmbedProvider(raw string) string
- func SupportedEmbedProviders() []string
- func ValidateSemanticConfig(cfg SemanticConfig) error
- type Backend
- type CompactionMemory
- type DurableKind
- type EmbedRequest
- type Embedder
- type Experience
- type FileBackend
- type MemoryCandidate
- func AppendInboxCandidateIfNew(ctx context.Context, root string, backend Backend, candidate MemoryCandidate) (MemoryCandidate, bool, error)
- func ListMemoryCandidates(root string, opts MemoryCandidateListOptions) ([]MemoryCandidate, error)
- func ReviewMemoryCandidate(ctx context.Context, root string, backend Backend, id string, ...) (MemoryCandidate, error)
- type MemoryCandidateAction
- type MemoryCandidateHint
- type MemoryCandidateListOptions
- type MemoryCandidateProvenance
- type MemoryCandidateReview
- type MemoryCandidateStatus
- type MemoryEntry
- type MemoryNote
- type SearchHit
- type SearchOptions
- type SearchRequest
- type Searcher
- type SemanticConfig
- type Service
- type ServiceOptions
- type WorkspaceBootstrapFileSpec
Constants ¶
View Source
const ( DurableKindMemory = internal.DurableKindMemory DurableKindDaily = internal.DurableKindDaily )
View Source
const ( MemoryCandidateStatusPending = internal.MemoryCandidateStatusPending MemoryCandidateStatusApproved = internal.MemoryCandidateStatusApproved MemoryCandidateStatusRejected = internal.MemoryCandidateStatusRejected MemoryCandidateStatusMerged = internal.MemoryCandidateStatusMerged MemoryCandidateActionApprove = internal.MemoryCandidateActionApprove MemoryCandidateActionReject = internal.MemoryCandidateActionReject MemoryCandidateActionMerge = internal.MemoryCandidateActionMerge )
Variables ¶
Functions ¶
func AppendExperience ¶
func AppendExperience(root string, exp Experience) error
func EnsureWorkspace ¶
func NormalizeEmbedProvider ¶
func SupportedEmbedProviders ¶
func SupportedEmbedProviders() []string
func ValidateSemanticConfig ¶
func ValidateSemanticConfig(cfg SemanticConfig) error
Types ¶
type CompactionMemory ¶
type CompactionMemory = internal.CompactionMemory
type DurableKind ¶
type DurableKind = internal.DurableKind
type EmbedRequest ¶
type EmbedRequest = internal.EmbedRequest
type Experience ¶
type Experience = internal.Experience
func SearchExperiences ¶
func SearchExperiences(root string, opts SearchOptions) ([]Experience, error)
type FileBackend ¶
type FileBackend = internal.FileBackend
func NewFileBackend ¶
func NewFileBackend(root string, semantic *Service) *FileBackend
type MemoryCandidate ¶
type MemoryCandidate = internal.MemoryCandidate
func AppendInboxCandidateIfNew ¶
func AppendInboxCandidateIfNew(ctx context.Context, root string, backend Backend, candidate MemoryCandidate) (MemoryCandidate, bool, error)
func ListMemoryCandidates ¶
func ListMemoryCandidates(root string, opts MemoryCandidateListOptions) ([]MemoryCandidate, error)
func ReviewMemoryCandidate ¶
func ReviewMemoryCandidate(ctx context.Context, root string, backend Backend, id string, review MemoryCandidateReview) (MemoryCandidate, error)
type MemoryCandidateAction ¶
type MemoryCandidateAction = internal.MemoryCandidateAction
type MemoryCandidateHint ¶
type MemoryCandidateHint = internal.MemoryCandidateHint
type MemoryCandidateListOptions ¶
type MemoryCandidateListOptions = internal.MemoryCandidateListOptions
type MemoryCandidateProvenance ¶
type MemoryCandidateProvenance = internal.MemoryCandidateProvenance
type MemoryCandidateReview ¶
type MemoryCandidateReview = internal.MemoryCandidateReview
type MemoryCandidateStatus ¶
type MemoryCandidateStatus = internal.MemoryCandidateStatus
type MemoryEntry ¶
type MemoryEntry = internal.MemoryEntry
type MemoryNote ¶
type MemoryNote = internal.MemoryNote
func ListMemoryNotesByPrefix ¶
func ListMemoryNotesByPrefix(root string, prefix string, limit int) ([]MemoryNote, error)
type SearchOptions ¶
type SearchOptions = internal.SearchOptions
type SearchRequest ¶
type SearchRequest = internal.SearchRequest
type SemanticConfig ¶
type SemanticConfig = internal.SemanticConfig
type Service ¶
func NewService ¶
func NewService(root string, opts ServiceOptions) *Service
type ServiceOptions ¶
type ServiceOptions = internal.ServiceOptions
type WorkspaceBootstrapFileSpec ¶
type WorkspaceBootstrapFileSpec = internal.WorkspaceBootstrapFileSpec
func WorkspaceBootstrapFileSpecFor ¶
func WorkspaceBootstrapFileSpecFor(path string) (WorkspaceBootstrapFileSpec, bool)
func WorkspaceBootstrapFileSpecs ¶
func WorkspaceBootstrapFileSpecs() []WorkspaceBootstrapFileSpec
Click to show internal directories.
Click to hide internal directories.