Versions in this module Expand all Collapse all v1 v1.9.4 Mar 10, 2026 v1.9.3 Mar 10, 2026 Changes in this version type Config + func FallbackConfig(dataDir string) Config v1.9.2 Mar 10, 2026 v1.9.1 Mar 9, 2026 v1.9.0 Mar 8, 2026 v1.8.1 Mar 8, 2026 Changes in this version type Store + func (s *Store) MaxObservationLength() int v1.8.0 Mar 7, 2026 Changes in this version + const DefaultSyncTargetKey + const SyncEntityObservation + const SyncEntityPrompt + const SyncEntitySession + const SyncLifecycleDegraded + const SyncLifecycleHealthy + const SyncLifecycleIdle + const SyncLifecyclePending + const SyncLifecycleRunning + const SyncOpDelete + const SyncOpUpsert + const SyncSourceLocal + const SyncSourceRemote + type EnrolledProject struct + EnrolledAt string + Project string type Observation + SyncID string type Prompt + SyncID string type Store + func (s *Store) AckSyncMutationSeqs(targetKey string, seqs []int64) error + func (s *Store) AckSyncMutations(targetKey string, lastAckedSeq int64) error + func (s *Store) AcquireSyncLease(targetKey, owner string, ttl time.Duration, now time.Time) (bool, error) + func (s *Store) ApplyPulledMutation(targetKey string, mutation SyncMutation) error + func (s *Store) EnrollProject(project string) error + func (s *Store) GetObservationBySyncID(syncID string) (*Observation, error) + func (s *Store) GetSyncState(targetKey string) (*SyncState, error) + func (s *Store) IsProjectEnrolled(project string) (bool, error) + func (s *Store) ListEnrolledProjects() ([]EnrolledProject, error) + func (s *Store) ListPendingSyncMutations(targetKey string, limit int) ([]SyncMutation, error) + func (s *Store) MarkSyncFailure(targetKey, message string, backoffUntil time.Time) error + func (s *Store) MarkSyncHealthy(targetKey string) error + func (s *Store) ReleaseSyncLease(targetKey, owner string) error + func (s *Store) SkipAckNonEnrolledMutations(targetKey string) (int64, error) + func (s *Store) UnenrollProject(project string) error + type SyncMutation struct + AckedAt *string + Entity string + EntityKey string + OccurredAt string + Op string + Payload string + Project string + Seq int64 + Source string + TargetKey string + type SyncState struct + BackoffUntil *string + ConsecutiveFailures int + LastAckedSeq int64 + LastEnqueuedSeq int64 + LastError *string + LastPulledSeq int64 + LeaseOwner *string + LeaseUntil *string + Lifecycle string + TargetKey string + UpdatedAt string v1.7.1 Mar 2, 2026 v1.7.0 Feb 28, 2026 Changes in this version + func ClassifyTool(toolName string) string + func ExtractLearnings(text string) []string + func Now() string + func SuggestTopicKey(typ, title, content string) string + type AddObservationParams struct + Content string + Project string + Scope string + SessionID string + Title string + ToolName string + TopicKey string + Type string + type AddPromptParams struct + Content string + Project string + SessionID string + type Config struct + DataDir string + DedupeWindow time.Duration + MaxContextResults int + MaxObservationLength int + MaxSearchResults int + func DefaultConfig() Config + type ExportData struct + ExportedAt string + Observations []Observation + Prompts []Prompt + Sessions []Session + Version string + type ImportResult struct + ObservationsImported int + PromptsImported int + SessionsImported int + type Observation struct + Content string + CreatedAt string + DeletedAt *string + DuplicateCount int + ID int64 + LastSeenAt *string + Project *string + RevisionCount int + Scope string + SessionID string + Title string + ToolName *string + TopicKey *string + Type string + UpdatedAt string + type PassiveCaptureParams struct + Content string + Project string + SessionID string + Source string + type PassiveCaptureResult struct + Duplicates int + Extracted int + Saved int + type Prompt struct + Content string + CreatedAt string + ID int64 + Project string + SessionID string + type SearchOptions struct + Limit int + Project string + Scope string + Type string + type SearchResult struct + Rank float64 + type Session struct + Directory string + EndedAt *string + ID string + Project string + StartedAt string + Summary *string + type SessionSummary struct + EndedAt *string + ID string + ObservationCount int + Project string + StartedAt string + Summary *string + type Stats struct + Projects []string + TotalObservations int + TotalPrompts int + TotalSessions int + type Store struct + func New(cfg Config) (*Store, error) + func (s *Store) AddObservation(p AddObservationParams) (int64, error) + func (s *Store) AddPrompt(p AddPromptParams) (int64, error) + func (s *Store) AllObservations(project, scope string, limit int) ([]Observation, error) + func (s *Store) AllSessions(project string, limit int) ([]SessionSummary, error) + func (s *Store) Close() error + func (s *Store) CreateSession(id, project, directory string) error + func (s *Store) DeleteObservation(id int64, hardDelete bool) error + func (s *Store) EndSession(id string, summary string) error + func (s *Store) Export() (*ExportData, error) + func (s *Store) FormatContext(project, scope string) (string, error) + func (s *Store) GetObservation(id int64) (*Observation, error) + func (s *Store) GetSession(id string) (*Session, error) + func (s *Store) GetSyncedChunks() (map[string]bool, error) + func (s *Store) Import(data *ExportData) (*ImportResult, error) + func (s *Store) PassiveCapture(p PassiveCaptureParams) (*PassiveCaptureResult, error) + func (s *Store) RecentObservations(project, scope string, limit int) ([]Observation, error) + func (s *Store) RecentPrompts(project string, limit int) ([]Prompt, error) + func (s *Store) RecentSessions(project string, limit int) ([]SessionSummary, error) + func (s *Store) RecordSyncedChunk(chunkID string) error + func (s *Store) Search(query string, opts SearchOptions) ([]SearchResult, error) + func (s *Store) SearchPrompts(query string, project string, limit int) ([]Prompt, error) + func (s *Store) SessionObservations(sessionID string, limit int) ([]Observation, error) + func (s *Store) Stats() (*Stats, error) + func (s *Store) Timeline(observationID int64, before, after int) (*TimelineResult, error) + func (s *Store) UpdateObservation(id int64, p UpdateObservationParams) (*Observation, error) + type TimelineEntry struct + Content string + CreatedAt string + DeletedAt *string + DuplicateCount int + ID int64 + IsFocus bool + LastSeenAt *string + Project *string + RevisionCount int + Scope string + SessionID string + Title string + ToolName *string + TopicKey *string + Type string + UpdatedAt string + type TimelineResult struct + After []TimelineEntry + Before []TimelineEntry + Focus Observation + SessionInfo *Session + TotalInRange int + type UpdateObservationParams struct + Content *string + Project *string + Scope *string + Title *string + TopicKey *string + Type *string