app

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddRequest

type AddRequest struct {
	Content    string
	ForLabel   string
	RemindExpr string // natural language, e.g. "in 30 minutes"
}

AddRequest carries all parameters for MemoryService.Add.

type MemoryService

type MemoryService struct {
	// contains filtered or unexported fields
}

MemoryService orchestrates memory creation and retrieval.

func NewMemoryService

func NewMemoryService(store ports.StoragePort, ai ports.AIPort, timer ports.TimeParserPort) *MemoryService

func (*MemoryService) Add

func (s *MemoryService) Add(ctx context.Context, req AddRequest) (*domain.Memory, error)

Add creates and persists a new memory. Embedding runs concurrently and is non-fatal — the memory saves even if Ollama is unavailable.

func (*MemoryService) Ask

func (s *MemoryService) Ask(ctx context.Context, question string) (string, error)

Ask answers a natural language question using semantic search + LLM.

func (*MemoryService) Clean

func (s *MemoryService) Clean(ctx context.Context) (int64, error)

func (*MemoryService) Delete

func (s *MemoryService) Delete(ctx context.Context, id string) error

func (*MemoryService) GetByID

func (s *MemoryService) GetByID(ctx context.Context, id string) (*domain.Memory, error)

func (*MemoryService) List

func (s *MemoryService) List(ctx context.Context, filter domain.ListFilter) ([]*domain.Memory, error)

type ReminderService

type ReminderService struct {
	// contains filtered or unexported fields
}

ReminderService checks for due reminders and fires notifications.

func NewReminderService

func NewReminderService(store ports.StoragePort, notifier ports.NotifierPort) *ReminderService

func (*ReminderService) CheckAndFire

func (s *ReminderService) CheckAndFire(ctx context.Context) error

CheckAndFire fires all reminders due before now and marks them as reminded.

func (*ReminderService) RunDaemon

func (s *ReminderService) RunDaemon(ctx context.Context, interval time.Duration) error

RunDaemon runs CheckAndFire on the given interval until ctx is cancelled. Designed to be managed by systemd --user as a persistent background service.

Jump to

Keyboard shortcuts

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