Changeset 0.32.0 (#206)

This commit is contained in:
2026-03-19 18:50:27 +00:00
parent 6668e546fe
commit b1266b0d7c
283 changed files with 2187 additions and 1055 deletions

View File

@@ -3,7 +3,7 @@ package store
import (
"context"
"git.gobha.me/xcaliber/chat-switchboard/models"
"chat-switchboard/models"
)
// TaskStore manages task definitions and run history.
@@ -21,13 +21,14 @@ type TaskStore interface {
GetByTriggerToken(ctx context.Context, token string) (*models.Task, error)
// Scheduler queries
ListDue(ctx context.Context, limit int) ([]models.Task, error)
ClaimDueTask(ctx context.Context) (*models.Task, error)
SetNextRun(ctx context.Context, id string, nextRun interface{}) error
SetLastRun(ctx context.Context, id string) error
IncrementRunCount(ctx context.Context, id string) error
// Run history
CreateRun(ctx context.Context, r *models.TaskRun) error
CreateRunExclusive(ctx context.Context, taskID string) (*models.TaskRun, error)
UpdateRun(ctx context.Context, id string, status string, tokensUsed, toolCalls, wallClock int, errMsg string) error
TransitionRunStatus(ctx context.Context, id string, status string) error
GetActiveRun(ctx context.Context, taskID string) (*models.TaskRun, error)