memory

package
v0.34.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 3 Imported by: 0

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

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

View Source
var ErrSemanticUnavailable = internal.ErrSemanticUnavailable

Functions

func AppendDailyLog

func AppendDailyLog(root string, now time.Time, entry string) error

func AppendExperience

func AppendExperience(root string, exp Experience) error

func AppendMemoryNote

func AppendMemoryNote(root string, now time.Time, entry string) error

func EnsureWorkspace

func EnsureWorkspace(root string) error

func IsSupportedEmbedProvider

func IsSupportedEmbedProvider(raw string) bool

func NormalizeEmbedProvider

func NormalizeEmbedProvider(raw string) string

func SupportedEmbedProviders

func SupportedEmbedProviders() []string

func ValidateSemanticConfig

func ValidateSemanticConfig(cfg SemanticConfig) error

Types

type Backend

type Backend = internal.Backend

type CompactionMemory

type CompactionMemory = internal.CompactionMemory

type DurableKind

type DurableKind = internal.DurableKind

type EmbedRequest

type EmbedRequest = internal.EmbedRequest

type Embedder

type Embedder = internal.Embedder

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 SearchHit

type SearchHit = internal.SearchHit

type SearchOptions

type SearchOptions = internal.SearchOptions

type SearchRequest

type SearchRequest = internal.SearchRequest

type Searcher

type Searcher = internal.Searcher

type SemanticConfig

type SemanticConfig = internal.SemanticConfig

type Service

type Service = internal.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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL