Documentation
¶
Index ¶
- Constants
- Variables
- type Condition
- type Event
- type FinalReview
- type FinalReviewInput
- type MatchRule
- type Phase
- type Status
- type Store
- func (s *Store) BatchCheckpoint(id string, completedStepIDs []string, currentStepID, summary string) (Task, error)
- func (s *Store) Block(id, summary string) (Task, error)
- func (s *Store) Checkpoint(id, stepID, status, summary string) (Task, error)
- func (s *Store) Complete(id string) (Task, error)
- func (s *Store) Create(title, goal string, conditionTexts []string, steps []TaskStepInput, ...) (Task, error)
- func (s *Store) Delete(id string) (Task, error)
- func (s *Store) FinalReview(id string, input FinalReviewInput) (Task, error)
- func (s *Store) Get(id string) (Task, error)
- func (s *Store) List(status Status, limit int) ([]Task, error)
- func (s *Store) Resume(id, summary string) (Task, error)
- func (s *Store) Root() string
- type Task
- type TaskStep
- type TaskStepInput
- type Template
- type TemplateCandidate
- type TemplateReference
- type TemplateSelection
- type TemplateStatus
- type TemplateStep
Constants ¶
View Source
const ( SchemaVersion = 1 FinalReviewPass = "pass" FinalReviewFailed = "failed" )
View Source
const ( StepPending = "pending" StepInProgress = "in_progress" StepCompleted = "completed" )
Variables ¶
View Source
var ErrTaskNotFound = errors.New("task not found")
Functions ¶
This section is empty.
Types ¶
type FinalReview ¶
type FinalReviewInput ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) BatchCheckpoint ¶
func (*Store) Checkpoint ¶
func (*Store) Create ¶
func (s *Store) Create(title, goal string, conditionTexts []string, steps []TaskStepInput, sourceTemplates []TemplateReference) (Task, error)
func (*Store) FinalReview ¶
func (s *Store) FinalReview(id string, input FinalReviewInput) (Task, error)
type Task ¶
type Task struct {
SchemaVersion int `json:"schema_version"`
ID string `json:"id"`
Title string `json:"title"`
Goal string `json:"goal"`
Status Status `json:"status"`
Phase Phase `json:"phase"`
Conditions []Condition `json:"conditions"`
Template *TemplateSelection `json:"template,omitempty"` // 仅用于读取旧任务状态。
SourceTemplates []TemplateReference `json:"source_templates,omitempty"`
Steps []TaskStep `json:"steps,omitempty"`
Events []Event `json:"events"`
Blocker string `json:"blocker,omitempty"`
Summary string `json:"summary,omitempty"`
FinalReview *FinalReview `json:"final_review,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
}
type TaskStepInput ¶
type Template ¶
type Template struct {
ID string `json:"id"`
Version string `json:"version"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
Status TemplateStatus `json:"status"`
Match MatchRule `json:"match,omitempty"`
CompletionConditions []string `json:"completion_conditions"`
Steps []TemplateStep `json:"steps"`
AllowLongTemplate bool `json:"allow_long_template,omitempty"`
LongTemplateReason string `json:"long_template_reason,omitempty"`
Hash string `json:"hash,omitempty"`
PublishedAt *time.Time `json:"published_at,omitempty"`
RetiredAt *time.Time `json:"retired_at,omitempty"`
}
type TemplateCandidate ¶
type TemplateReference ¶
type TemplateSelection ¶
type TemplateSelection struct {
ID string `json:"id"`
Version string `json:"version"`
Hash string `json:"hash"`
SelectedReason string `json:"selected_reason"`
Candidates []TemplateCandidate `json:"candidates,omitempty"`
}
type TemplateStatus ¶
type TemplateStatus string
const ( TemplateDraft TemplateStatus = "draft" TemplateActive TemplateStatus = "active" TemplateRetired TemplateStatus = "retired" )
type TemplateStep ¶
Click to show internal directories.
Click to hide internal directories.