Versions in this module Expand all Collapse all v0 v0.1.2 Mar 3, 2026 Changes in this version + func NewTestDB(t *testing.T) *sql.DB + type TaskRepoOption func(*tx.SQLiteRepositoryTxerConfig[task.Repository]) + func WithNoPragma() TaskRepoOption v0.1.1 Mar 2, 2026 Changes in this version + type DB interface + type EpicRepository struct + func NewEpicRepository(db DB) *EpicRepository + func (r *EpicRepository) AppendSessionLog(ctx context.Context, id epic.EpicID, lines []string) error + func (r *EpicRepository) ClaimEpic(ctx context.Context, id epic.EpicID) (bool, error) + func (r *EpicRepository) ClearEpicFeedback(ctx context.Context, id epic.EpicID) error + func (r *EpicRepository) CreateEpic(ctx context.Context, e *epic.Epic) error + func (r *EpicRepository) DeleteEpic(ctx context.Context, id epic.EpicID) error + func (r *EpicRepository) EpicHeartbeat(ctx context.Context, id epic.EpicID) error + func (r *EpicRepository) ListActiveEpics(ctx context.Context) ([]*epic.Epic, error) + func (r *EpicRepository) ListEpics(ctx context.Context) ([]*epic.Epic, error) + func (r *EpicRepository) ListEpicsByRepo(ctx context.Context, repoID string) ([]*epic.Epic, error) + func (r *EpicRepository) ListPlanningEpics(ctx context.Context) ([]*epic.Epic, error) + func (r *EpicRepository) ListStaleEpics(ctx context.Context, threshold time.Time) ([]*epic.Epic, error) + func (r *EpicRepository) ReadEpic(ctx context.Context, id epic.EpicID) (*epic.Epic, error) + func (r *EpicRepository) ReleaseEpicClaim(ctx context.Context, id epic.EpicID) error + func (r *EpicRepository) RemoveTaskID(ctx context.Context, id epic.EpicID, taskID string) error + func (r *EpicRepository) SetEpicFeedback(ctx context.Context, id epic.EpicID, feedback, feedbackType string) error + func (r *EpicRepository) SetTaskIDs(ctx context.Context, id epic.EpicID, taskIDs []string) error + func (r *EpicRepository) UpdateEpic(ctx context.Context, e *epic.Epic) error + func (r *EpicRepository) UpdateEpicStatus(ctx context.Context, id epic.EpicID, status epic.Status) error + func (r *EpicRepository) UpdateProposedTasks(ctx context.Context, id epic.EpicID, tasks []epic.ProposedTask) error + type GitHubTokenRepository struct + func NewGitHubTokenRepository(dbtx DB) *GitHubTokenRepository + func (r *GitHubTokenRepository) DeleteGitHubToken(ctx context.Context) error + func (r *GitHubTokenRepository) ReadGitHubToken(ctx context.Context) (string, error) + func (r *GitHubTokenRepository) UpsertGitHubToken(ctx context.Context, encryptedToken string, now time.Time) error + type RepoRepository struct + func NewRepoRepository(db DB) *RepoRepository + func (r *RepoRepository) CreateRepo(ctx context.Context, rp *repo.Repo) error + func (r *RepoRepository) DeleteRepo(ctx context.Context, id repo.RepoID) error + func (r *RepoRepository) ListRepos(ctx context.Context) ([]*repo.Repo, error) + func (r *RepoRepository) ReadRepo(ctx context.Context, id repo.RepoID) (*repo.Repo, error) + func (r *RepoRepository) ReadRepoByFullName(ctx context.Context, fullName string) (*repo.Repo, error) + type SettingRepository struct + func NewSettingRepository(db DB) *SettingRepository + func (r *SettingRepository) DeleteSetting(ctx context.Context, key string) error + func (r *SettingRepository) ListSettings(ctx context.Context) (map[string]string, error) + func (r *SettingRepository) ReadSetting(ctx context.Context, key string) (string, error) + func (r *SettingRepository) UpsertSetting(ctx context.Context, key, value string) error + type TaskRepository struct + func NewTaskRepository(db DB) *TaskRepository + func (r *TaskRepository) AddCost(ctx context.Context, id task.TaskID, costUSD float64) error + func (r *TaskRepository) AppendTaskLogs(ctx context.Context, id task.TaskID, attempt int, logs []string) error + func (r *TaskRepository) BeginTxFunc(ctx context.Context, ...) error + func (r *TaskRepository) BulkCloseTasksByEpic(ctx context.Context, epicID, reason string) error + func (r *TaskRepository) BulkDeleteTasksByEpic(ctx context.Context, epicID string) error + func (r *TaskRepository) BulkDeleteTasksByIDs(ctx context.Context, ids []string) error + func (r *TaskRepository) ClaimTask(ctx context.Context, id task.TaskID) (bool, error) + func (r *TaskRepository) ClearEpicIDForTasks(ctx context.Context, epicID string) error + func (r *TaskRepository) CloseTask(ctx context.Context, id task.TaskID, reason string) error + func (r *TaskRepository) CreateTask(ctx context.Context, t *task.Task) error + func (r *TaskRepository) DeleteExpiredLogs(ctx context.Context, before time.Time) (int64, error) + func (r *TaskRepository) DeleteTask(ctx context.Context, id task.TaskID) error + func (r *TaskRepository) DeleteTaskLogs(ctx context.Context, id task.TaskID) error + func (r *TaskRepository) FeedbackRetryTask(ctx context.Context, id task.TaskID, feedback string) (bool, error) + func (r *TaskRepository) HasTasksForRepo(ctx context.Context, repoID string) (bool, error) + func (r *TaskRepository) Heartbeat(ctx context.Context, id task.TaskID) (bool, error) + func (r *TaskRepository) ListPendingTasks(ctx context.Context) ([]*task.Task, error) + func (r *TaskRepository) ListPendingTasksByRepos(ctx context.Context, repoIDs []string) ([]*task.Task, error) + func (r *TaskRepository) ListStaleTasks(ctx context.Context, before time.Time) ([]*task.Task, error) + func (r *TaskRepository) ListTasks(ctx context.Context) ([]*task.Task, error) + func (r *TaskRepository) ListTasksByEpic(ctx context.Context, epicID string) ([]*task.Task, error) + func (r *TaskRepository) ListTasksByRepo(ctx context.Context, repoID string) ([]*task.Task, error) + func (r *TaskRepository) ListTasksInReview(ctx context.Context) ([]*task.Task, error) + func (r *TaskRepository) ListTasksInReviewByRepo(ctx context.Context, repoID string) ([]*task.Task, error) + func (r *TaskRepository) ListTasksInReviewNoPR(ctx context.Context) ([]*task.Task, error) + func (r *TaskRepository) ManualRetryTask(ctx context.Context, id task.TaskID, instructions string) (bool, error) + func (r *TaskRepository) ReadTask(ctx context.Context, id task.TaskID) (*task.Task, error) + func (r *TaskRepository) ReadTaskLogs(ctx context.Context, id task.TaskID) ([]string, error) + func (r *TaskRepository) ReadTaskStatus(ctx context.Context, id task.TaskID) (task.Status, error) + func (r *TaskRepository) RemoveDependency(ctx context.Context, id task.TaskID, depID string) error + func (r *TaskRepository) RetryTask(ctx context.Context, id task.TaskID, reason string) (bool, error) + func (r *TaskRepository) ScheduleRetryFromRunning(ctx context.Context, id task.TaskID, reason string) (bool, error) + func (r *TaskRepository) SetAgentStatus(ctx context.Context, id task.TaskID, status string) error + func (r *TaskRepository) SetBranchName(ctx context.Context, id task.TaskID, branchName string) error + func (r *TaskRepository) SetCloseReason(ctx context.Context, id task.TaskID, reason string) error + func (r *TaskRepository) SetConsecutiveFailures(ctx context.Context, id task.TaskID, count int) error + func (r *TaskRepository) SetReady(ctx context.Context, id task.TaskID, ready bool) error + func (r *TaskRepository) SetRetryContext(ctx context.Context, id task.TaskID, retryCtx string) error + func (r *TaskRepository) SetTaskPullRequest(ctx context.Context, id task.TaskID, prURL string, prNumber int) error + func (r *TaskRepository) StartOverTask(ctx context.Context, id task.TaskID, params task.StartOverTaskParams) (bool, error) + func (r *TaskRepository) StopTask(ctx context.Context, id task.TaskID, reason string) (bool, error) + func (r *TaskRepository) StreamTaskLogs(ctx context.Context, id task.TaskID, ...) error + func (r *TaskRepository) TaskExists(ctx context.Context, id task.TaskID) (bool, error) + func (r *TaskRepository) UpdatePendingTask(ctx context.Context, id task.TaskID, params task.UpdatePendingTaskParams) (bool, error) + func (r *TaskRepository) UpdateTaskStatus(ctx context.Context, id task.TaskID, status task.Status) error + func (r *TaskRepository) WithTx(txn tx.Tx) task.Repository