Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttachmentCleanupService ¶
type AttachmentCleanupService struct {
// contains filtered or unexported fields
}
func NewAttachmentCleanupService ¶
func NewAttachmentCleanupService(store registrystore.MemoryStore, attachStore registryattach.AttachmentStore, interval time.Duration) *AttachmentCleanupService
func (*AttachmentCleanupService) Start ¶
func (s *AttachmentCleanupService) Start(ctx context.Context)
type BackgroundIndexer ¶
type BackgroundIndexer struct {
// contains filtered or unexported fields
}
BackgroundIndexer polls for unindexed entries, generates embeddings, stores them, and triggers knowledge clustering for affected users.
func NewBackgroundIndexer ¶
func NewBackgroundIndexer(store registrystore.MemoryStore, embedder registryembed.Embedder, vector registryvector.VectorStore, batchSize int) *BackgroundIndexer
NewBackgroundIndexer creates a new indexer.
func (*BackgroundIndexer) SetClusterer ¶
func (b *BackgroundIndexer) SetClusterer(c *knowledge.Clusterer)
SetClusterer attaches a knowledge clusterer to the indexer. When set, clustering runs automatically after each indexing batch.
func (*BackgroundIndexer) Start ¶
func (b *BackgroundIndexer) Start(ctx context.Context)
Start begins the background indexing loop. Returns when ctx is cancelled.
type EpisodicIndexRunStats ¶
type EpisodicIndexRunStats struct {
Pending int `json:"pending"`
Processed int `json:"processed"`
SkippedNoEmbedding int `json:"skipped_no_embedding"`
Embedded int `json:"embedded"`
VectorUpserts int `json:"vector_upserts"`
VectorDeletes int `json:"vector_deletes"`
Failures int `json:"failures"`
}
EpisodicIndexRunStats summarizes a single indexer cycle.
type EpisodicIndexer ¶
type EpisodicIndexer struct {
// contains filtered or unexported fields
}
EpisodicIndexer polls for memories with indexed_at IS NULL and:
- Active rows (archived_at IS NULL): generates embeddings and upserts them into the vector store.
- Soft-deleted rows (archived_at IS NOT NULL): removes the corresponding vector entries.
func NewEpisodicIndexer ¶
func NewEpisodicIndexer(store registryepisodic.EpisodicStore, embedder registryembed.Embedder, interval time.Duration, batchSize int) *EpisodicIndexer
NewEpisodicIndexer creates a new EpisodicIndexer. If embedder is nil, indexing is skipped for active rows but archived cleanup still runs.
func (*EpisodicIndexer) Start ¶
func (idx *EpisodicIndexer) Start(ctx context.Context)
Start runs the indexer until ctx is cancelled.
func (*EpisodicIndexer) Trigger ¶
func (idx *EpisodicIndexer) Trigger(ctx context.Context) (EpisodicIndexRunStats, error)
Trigger runs one indexing cycle synchronously.
type EpisodicTTLService ¶
type EpisodicTTLService struct {
// contains filtered or unexported fields
}
EpisodicTTLService runs background passes on a configurable interval:
- Expiry pass — archives memories whose TTL has elapsed (deleted_reason=2).
- Eviction pass A — hard-deletes superseded-update rows (deleted_reason=0) once re-indexed.
- Eviction pass B — tombstones delete/expired rows (deleted_reason IN (1,2)) once re-indexed, clearing encrypted data while keeping the row for event history.
- Tombstone cleanup — hard-deletes tombstones older than tombstoneRetention.
func NewEpisodicTTLService ¶
func NewEpisodicTTLService(store registryepisodic.EpisodicStore, interval time.Duration, evictionBatch int, tombstoneRetention time.Duration) *EpisodicTTLService
NewEpisodicTTLService creates a new EpisodicTTLService.
func (*EpisodicTTLService) Start ¶
func (s *EpisodicTTLService) Start(ctx context.Context)
Start runs the TTL service until ctx is cancelled.
type EvictionService ¶
type EvictionService struct {
// contains filtered or unexported fields
}
EvictionService periodically cleans up archived records past retention.
func NewEvictionService ¶
func NewEvictionService(store registrystore.MemoryStore, eventBus registryeventbus.EventBus, batchSize int, delayMs int) *EvictionService
NewEvictionService creates a new eviction service.
func (*EvictionService) Start ¶
func (e *EvictionService) Start(ctx context.Context)
Start begins the periodic eviction loop. Returns when ctx is cancelled.
type TaskProcessor ¶
type TaskProcessor struct {
// contains filtered or unexported fields
}
TaskProcessor polls for ready tasks and executes them. It processes vector_store_delete tasks by calling the vector store's delete method.
func NewTaskProcessor ¶
func NewTaskProcessor(store registrystore.MemoryStore, vector registryvector.VectorStore) *TaskProcessor
NewTaskProcessor creates a new background task processor.
func (*TaskProcessor) Start ¶
func (p *TaskProcessor) Start(ctx context.Context)
Start begins the periodic task processing loop. Returns when ctx is cancelled.