Versions in this module Expand all Collapse all v0 v0.181.0 Aug 25, 2026 v0.180.1 Aug 24, 2026 v0.180.0 Aug 24, 2026 v0.179.1 Aug 23, 2026 v0.179.0 Aug 22, 2026 v0.178.3 Aug 22, 2026 v0.178.2 Aug 21, 2026 v0.178.1 Aug 21, 2026 v0.178.0 Aug 21, 2026 Changes in this version + var ErrJobNotFound = errors.New("scheduled job not found") + type ConversationStorage interface + Close func() error + DeleteConversation func(ctx context.Context, conversationID string) error + Health func(ctx context.Context) error + ListConversations func(ctx context.Context, limit, offset int) ([]convdomain.ConversationSummary, error) + ListConversationsNeedingTitles func(ctx context.Context, limit int) ([]convdomain.ConversationSummary, error) + LoadConversation func(ctx context.Context, conversationID string) ([]convdomain.ConversationEntry, convdomain.ConversationMetadata, error) + SaveConversation func(ctx context.Context, conversationID string, ...) error + UpdateConversationMetadata func(ctx context.Context, conversationID string, ...) error + type D1Config struct + APIToken string + AccountID string + BaseURL string + DatabaseID string + type D1Storage struct + func NewD1Storage(config D1Config) (*D1Storage, error) + func (s *D1Storage) AppendHistory(ctx context.Context, command string) error + func (s *D1Storage) Close() error + func (s *D1Storage) DeleteConversation(ctx context.Context, conversationID string) error + func (s *D1Storage) DeleteJob(ctx context.Context, id string) error + func (s *D1Storage) DeletePlan(ctx context.Context, id string) error + func (s *D1Storage) GetSessionGroup(ctx context.Context, groupKey string) (SessionGroupEntry, bool, error) + func (s *D1Storage) Health(ctx context.Context) error + func (s *D1Storage) ListConversations(ctx context.Context, limit, offset int) ([]convdomain.ConversationSummary, error) + func (s *D1Storage) ListConversationsNeedingTitles(ctx context.Context, limit int) ([]convdomain.ConversationSummary, error) + func (s *D1Storage) ListJobs(ctx context.Context) ([]*scheddomain.ScheduledJob, error) + func (s *D1Storage) ListPlans(ctx context.Context) ([]*PlanRecord, error) + func (s *D1Storage) ListRuns(ctx context.Context, jobID string) ([]*scheddomain.RunRecord, error) + func (s *D1Storage) ListSessionGroups(ctx context.Context) (map[string]SessionGroupEntry, error) + func (s *D1Storage) LoadConversation(ctx context.Context, conversationID string) ([]convdomain.ConversationEntry, convdomain.ConversationMetadata, error) + func (s *D1Storage) LoadHistory(ctx context.Context, limit int) ([]string, error) + func (s *D1Storage) LoadJob(ctx context.Context, id string) (*scheddomain.ScheduledJob, error) + func (s *D1Storage) LoadPlan(ctx context.Context, id string) (*PlanRecord, error) + func (s *D1Storage) PruneRuns(ctx context.Context, keep int) error + func (s *D1Storage) PutSessionGroup(ctx context.Context, groupKey string, entry SessionGroupEntry) error + func (s *D1Storage) SaveConversation(ctx context.Context, conversationID string, ...) error + func (s *D1Storage) SaveJob(ctx context.Context, job *scheddomain.ScheduledJob) error + func (s *D1Storage) SavePlan(ctx context.Context, plan *PlanRecord) error + func (s *D1Storage) SaveRun(ctx context.Context, run *scheddomain.RunRecord) error + func (s *D1Storage) UpdateConversationMetadata(ctx context.Context, conversationID string, ...) error + type EntryLine struct + Entry convdomain.ConversationEntry + Index int + Type string + type JsonlStorage struct + func NewJsonlStorage(config JsonlStorageConfig) (*JsonlStorage, error) + func (s *JsonlStorage) AppendHistory(_ context.Context, command string) error + func (s *JsonlStorage) Close() error + func (s *JsonlStorage) DeleteConversation(ctx context.Context, conversationID string) error + func (s *JsonlStorage) DeleteJob(_ context.Context, id string) error + func (s *JsonlStorage) DeletePlan(_ context.Context, id string) error + func (s *JsonlStorage) GetSessionGroup(_ context.Context, groupKey string) (SessionGroupEntry, bool, error) + func (s *JsonlStorage) Health(ctx context.Context) error + func (s *JsonlStorage) ListConversations(ctx context.Context, limit, offset int) ([]convdomain.ConversationSummary, error) + func (s *JsonlStorage) ListConversationsNeedingTitles(ctx context.Context, limit int) ([]convdomain.ConversationSummary, error) + func (s *JsonlStorage) ListJobs(_ context.Context) ([]*scheddomain.ScheduledJob, error) + func (s *JsonlStorage) ListPlans(_ context.Context) ([]*PlanRecord, error) + func (s *JsonlStorage) ListRuns(_ context.Context, jobID string) ([]*scheddomain.RunRecord, error) + func (s *JsonlStorage) ListSessionGroups(_ context.Context) (map[string]SessionGroupEntry, error) + func (s *JsonlStorage) LoadConversation(ctx context.Context, conversationID string) ([]convdomain.ConversationEntry, convdomain.ConversationMetadata, error) + func (s *JsonlStorage) LoadHistory(_ context.Context, limit int) ([]string, error) + func (s *JsonlStorage) LoadJob(_ context.Context, id string) (*scheddomain.ScheduledJob, error) + func (s *JsonlStorage) LoadPlan(_ context.Context, id string) (*PlanRecord, error) + func (s *JsonlStorage) PruneRuns(ctx context.Context, keep int) error + func (s *JsonlStorage) PutSessionGroup(_ context.Context, groupKey string, entry SessionGroupEntry) error + func (s *JsonlStorage) SaveConversation(ctx context.Context, conversationID string, ...) error + func (s *JsonlStorage) SaveJob(_ context.Context, job *scheddomain.ScheduledJob) error + func (s *JsonlStorage) SavePlan(_ context.Context, plan *PlanRecord) error + func (s *JsonlStorage) SaveRun(_ context.Context, run *scheddomain.RunRecord) error + func (s *JsonlStorage) UpdateConversationMetadata(ctx context.Context, conversationID string, ...) error + type JsonlStorageConfig struct + Path string + PlansPath string + type MemoryStorage struct + func NewMemoryStorage() *MemoryStorage + func (m *MemoryStorage) AppendHistory(ctx context.Context, command string) error + func (m *MemoryStorage) Close() error + func (m *MemoryStorage) DeleteConversation(ctx context.Context, conversationID string) error + func (m *MemoryStorage) DeleteJob(ctx context.Context, id string) error + func (m *MemoryStorage) DeletePlan(ctx context.Context, id string) error + func (m *MemoryStorage) GetSessionGroup(_ context.Context, groupKey string) (SessionGroupEntry, bool, error) + func (m *MemoryStorage) Health(ctx context.Context) error + func (m *MemoryStorage) ListConversations(ctx context.Context, limit, offset int) ([]convdomain.ConversationSummary, error) + func (m *MemoryStorage) ListConversationsNeedingTitles(ctx context.Context, limit int) ([]convdomain.ConversationSummary, error) + func (m *MemoryStorage) ListJobs(ctx context.Context) ([]*scheddomain.ScheduledJob, error) + func (m *MemoryStorage) ListPlans(ctx context.Context) ([]*PlanRecord, error) + func (m *MemoryStorage) ListRuns(ctx context.Context, jobID string) ([]*scheddomain.RunRecord, error) + func (m *MemoryStorage) ListSessionGroups(_ context.Context) (map[string]SessionGroupEntry, error) + func (m *MemoryStorage) LoadConversation(ctx context.Context, conversationID string) ([]convdomain.ConversationEntry, convdomain.ConversationMetadata, error) + func (m *MemoryStorage) LoadHistory(ctx context.Context, limit int) ([]string, error) + func (m *MemoryStorage) LoadJob(ctx context.Context, id string) (*scheddomain.ScheduledJob, error) + func (m *MemoryStorage) LoadPlan(ctx context.Context, id string) (*PlanRecord, error) + func (m *MemoryStorage) PruneRuns(ctx context.Context, keep int) error + func (m *MemoryStorage) PutSessionGroup(_ context.Context, groupKey string, entry SessionGroupEntry) error + func (m *MemoryStorage) SaveConversation(ctx context.Context, conversationID string, ...) error + func (m *MemoryStorage) SaveJob(ctx context.Context, job *scheddomain.ScheduledJob) error + func (m *MemoryStorage) SavePlan(ctx context.Context, plan *PlanRecord) error + func (m *MemoryStorage) SaveRun(ctx context.Context, run *scheddomain.RunRecord) error + func (m *MemoryStorage) UpdateConversationMetadata(ctx context.Context, conversationID string, ...) error + type MetadataLine struct + Metadata convdomain.ConversationMetadata + Type string + Version int + type PlanRecord struct + Body string + CreatedAt time.Time + ID string + Title string + type PlanStorage interface + DeletePlan func(ctx context.Context, id string) error + ListPlans func(ctx context.Context) ([]*PlanRecord, error) + LoadPlan func(ctx context.Context, id string) (*PlanRecord, error) + SavePlan func(ctx context.Context, plan *PlanRecord) error + type PostgresConfig struct + Database string + Host string + Password string + Port int + SSLMode string + Username string + type PostgresStorage struct + func NewPostgresStorage(config PostgresConfig) (*PostgresStorage, error) + func (s PostgresStorage) AppendHistory(ctx context.Context, command string) error + func (s PostgresStorage) Close() error + func (s PostgresStorage) DB() *sql.DB + func (s PostgresStorage) DeleteConversation(ctx context.Context, conversationID string) error + func (s PostgresStorage) DeleteJob(ctx context.Context, id string) error + func (s PostgresStorage) DeletePlan(ctx context.Context, id string) error + func (s PostgresStorage) GetSessionGroup(ctx context.Context, groupKey string) (SessionGroupEntry, bool, error) + func (s PostgresStorage) Health(ctx context.Context) error + func (s PostgresStorage) ListConversations(ctx context.Context, limit, offset int) ([]convdomain.ConversationSummary, error) + func (s PostgresStorage) ListConversationsNeedingTitles(ctx context.Context, limit int) ([]convdomain.ConversationSummary, error) + func (s PostgresStorage) ListJobs(ctx context.Context) ([]*scheddomain.ScheduledJob, error) + func (s PostgresStorage) ListPlans(ctx context.Context) ([]*PlanRecord, error) + func (s PostgresStorage) ListRuns(ctx context.Context, jobID string) ([]*scheddomain.RunRecord, error) + func (s PostgresStorage) ListSessionGroups(ctx context.Context) (map[string]SessionGroupEntry, error) + func (s PostgresStorage) LoadConversation(ctx context.Context, conversationID string) ([]convdomain.ConversationEntry, convdomain.ConversationMetadata, error) + func (s PostgresStorage) LoadHistory(ctx context.Context, limit int) ([]string, error) + func (s PostgresStorage) LoadJob(ctx context.Context, id string) (*scheddomain.ScheduledJob, error) + func (s PostgresStorage) LoadPlan(ctx context.Context, id string) (*PlanRecord, error) + func (s PostgresStorage) PruneRuns(ctx context.Context, keep int) error + func (s PostgresStorage) PutSessionGroup(ctx context.Context, groupKey string, entry SessionGroupEntry) error + func (s PostgresStorage) SaveConversation(ctx context.Context, conversationID string, ...) error + func (s PostgresStorage) SaveJob(ctx context.Context, job *scheddomain.ScheduledJob) error + func (s PostgresStorage) SavePlan(ctx context.Context, plan *PlanRecord) error + func (s PostgresStorage) SaveRun(ctx context.Context, run *scheddomain.RunRecord) error + func (s PostgresStorage) UpdateConversationMetadata(ctx context.Context, conversationID string, ...) error + type RedisConfig struct + Database int + Host string + Password string + Port int + TTL int + Username string + type RedisStorage struct + func NewRedisStorage(config RedisConfig) (*RedisStorage, error) + func (s *RedisStorage) AppendHistory(ctx context.Context, command string) error + func (s *RedisStorage) Close() error + func (s *RedisStorage) DeleteConversation(ctx context.Context, conversationID string) error + func (s *RedisStorage) DeleteJob(ctx context.Context, id string) error + func (s *RedisStorage) DeletePlan(ctx context.Context, id string) error + func (s *RedisStorage) GetSessionGroup(ctx context.Context, groupKey string) (SessionGroupEntry, bool, error) + func (s *RedisStorage) Health(ctx context.Context) error + func (s *RedisStorage) ListConversations(ctx context.Context, limit, offset int) ([]convdomain.ConversationSummary, error) + func (s *RedisStorage) ListConversationsNeedingTitles(ctx context.Context, limit int) ([]convdomain.ConversationSummary, error) + func (s *RedisStorage) ListJobs(ctx context.Context) ([]*scheddomain.ScheduledJob, error) + func (s *RedisStorage) ListPlans(ctx context.Context) ([]*PlanRecord, error) + func (s *RedisStorage) ListRuns(ctx context.Context, jobID string) ([]*scheddomain.RunRecord, error) + func (s *RedisStorage) ListSessionGroups(ctx context.Context) (map[string]SessionGroupEntry, error) + func (s *RedisStorage) LoadConversation(ctx context.Context, conversationID string) ([]convdomain.ConversationEntry, convdomain.ConversationMetadata, error) + func (s *RedisStorage) LoadHistory(ctx context.Context, limit int) ([]string, error) + func (s *RedisStorage) LoadJob(ctx context.Context, id string) (*scheddomain.ScheduledJob, error) + func (s *RedisStorage) LoadPlan(ctx context.Context, id string) (*PlanRecord, error) + func (s *RedisStorage) PruneRuns(ctx context.Context, keep int) error + func (s *RedisStorage) PutSessionGroup(ctx context.Context, groupKey string, entry SessionGroupEntry) error + func (s *RedisStorage) SaveConversation(ctx context.Context, conversationID string, ...) error + func (s *RedisStorage) SaveJob(ctx context.Context, job *scheddomain.ScheduledJob) error + func (s *RedisStorage) SavePlan(ctx context.Context, plan *PlanRecord) error + func (s *RedisStorage) SaveRun(ctx context.Context, run *scheddomain.RunRecord) error + func (s *RedisStorage) UpdateConversationMetadata(ctx context.Context, conversationID string, ...) error + type SQLiteConfig struct + Path string + type SQLiteStorage struct + func NewSQLiteStorage(config SQLiteConfig) (*SQLiteStorage, error) + func (s SQLiteStorage) AppendHistory(ctx context.Context, command string) error + func (s SQLiteStorage) Close() error + func (s SQLiteStorage) DB() *sql.DB + func (s SQLiteStorage) DeleteConversation(ctx context.Context, conversationID string) error + func (s SQLiteStorage) DeleteJob(ctx context.Context, id string) error + func (s SQLiteStorage) DeletePlan(ctx context.Context, id string) error + func (s SQLiteStorage) GetSessionGroup(ctx context.Context, groupKey string) (SessionGroupEntry, bool, error) + func (s SQLiteStorage) Health(ctx context.Context) error + func (s SQLiteStorage) ListConversations(ctx context.Context, limit, offset int) ([]convdomain.ConversationSummary, error) + func (s SQLiteStorage) ListConversationsNeedingTitles(ctx context.Context, limit int) ([]convdomain.ConversationSummary, error) + func (s SQLiteStorage) ListJobs(ctx context.Context) ([]*scheddomain.ScheduledJob, error) + func (s SQLiteStorage) ListPlans(ctx context.Context) ([]*PlanRecord, error) + func (s SQLiteStorage) ListRuns(ctx context.Context, jobID string) ([]*scheddomain.RunRecord, error) + func (s SQLiteStorage) ListSessionGroups(ctx context.Context) (map[string]SessionGroupEntry, error) + func (s SQLiteStorage) LoadConversation(ctx context.Context, conversationID string) ([]convdomain.ConversationEntry, convdomain.ConversationMetadata, error) + func (s SQLiteStorage) LoadHistory(ctx context.Context, limit int) ([]string, error) + func (s SQLiteStorage) LoadJob(ctx context.Context, id string) (*scheddomain.ScheduledJob, error) + func (s SQLiteStorage) LoadPlan(ctx context.Context, id string) (*PlanRecord, error) + func (s SQLiteStorage) PruneRuns(ctx context.Context, keep int) error + func (s SQLiteStorage) PutSessionGroup(ctx context.Context, groupKey string, entry SessionGroupEntry) error + func (s SQLiteStorage) SaveConversation(ctx context.Context, conversationID string, ...) error + func (s SQLiteStorage) SaveJob(ctx context.Context, job *scheddomain.ScheduledJob) error + func (s SQLiteStorage) SavePlan(ctx context.Context, plan *PlanRecord) error + func (s SQLiteStorage) SaveRun(ctx context.Context, run *scheddomain.RunRecord) error + func (s SQLiteStorage) UpdateConversationMetadata(ctx context.Context, conversationID string, ...) error + type ScheduledJobStorage interface + DeleteJob func(ctx context.Context, id string) error + ListJobs func(ctx context.Context) ([]*scheddomain.ScheduledJob, error) + LoadJob func(ctx context.Context, id string) (*scheddomain.ScheduledJob, error) + SaveJob func(ctx context.Context, job *scheddomain.ScheduledJob) error + type ScheduledRunStorage interface + ListRuns func(ctx context.Context, jobID string) ([]*scheddomain.RunRecord, error) + PruneRuns func(ctx context.Context, keep int) error + SaveRun func(ctx context.Context, run *scheddomain.RunRecord) error + type SessionGroupEntry struct + CurrentSessionID string + History []string + LastRollover time.Time + UpdatedAt time.Time + type SessionGroupStorage interface + GetSessionGroup func(ctx context.Context, groupKey string) (SessionGroupEntry, bool, error) + ListSessionGroups func(ctx context.Context) (map[string]SessionGroupEntry, error) + PutSessionGroup func(ctx context.Context, groupKey string, entry SessionGroupEntry) error + func NewMemorySessionGroupStorage() SessionGroupStorage + type ShellHistoryStorage interface + AppendHistory func(ctx context.Context, command string) error + LoadHistory func(ctx context.Context, limit int) ([]string, error) + type StorageConfig struct + D1 D1Config + Jsonl JsonlStorageConfig + Postgres PostgresConfig + Redis RedisConfig + SQLite SQLiteConfig + Type config.StorageType + func NewStorageFromConfig(cfg *config.Config) StorageConfig + type Stores struct + Conversations ConversationStorage + Plans PlanStorage + ScheduledJobs ScheduledJobStorage + ScheduledRuns ScheduledRunStorage + SessionGroups SessionGroupStorage + ShellHistory ShellHistoryStorage + func NewStorage(config StorageConfig) (*Stores, error) + type TrailingMetaLine struct + Metadata convdomain.ConversationMetadata + Type string + type V2EntryLine struct + Entry convdomain.ConversationEntry + Index int + Type string + Version int