Documentation
¶
Index ¶
- Constants
- Variables
- type Condition
- type Event
- type EvolutionBinding
- type EvolutionContextItem
- 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) BindEvolution(id string, binding EvolutionBinding) (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) CreateWithContext(title, goal, project, device string, conditionTexts []string, ...) (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
- func (s *Store) SetEvolutionCandidates(id, reviewRevision string, items []EvolutionContextItem) (Task, error)
- func (s *Store) SetGuidanceContext(id string, items []EvolutionContextItem) (Task, error)
- 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 EvolutionBinding ¶ added in v0.7.6
type EvolutionContextItem ¶ added in v0.7.6
type EvolutionContextItem struct {
EvolutionID string `json:"evolution_id"`
Type string `json:"type"`
Statement string `json:"statement"`
Scope string `json:"scope,omitempty"`
Project string `json:"project,omitempty"`
Device string `json:"device,omitempty"`
Status string `json:"status"`
Guided bool `json:"guided,omitempty"`
ReviewRevision string `json:"review_revision,omitempty"`
EvidenceRefs []string `json:"evidence_refs,omitempty"`
}
type FinalReview ¶
type FinalReview struct {
Status string `json:"status"`
Summary string `json:"summary"`
VerifiedFacts []string `json:"verified_facts,omitempty"`
OpenRisks []string `json:"open_risks,omitempty"`
MissingChecks []string `json:"missing_checks,omitempty"`
ReviewRevision string `json:"review_revision"`
ReviewedAt time.Time `json:"reviewed_at"`
}
type FinalReviewInput ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) BatchCheckpoint ¶
func (*Store) BindEvolution ¶ added in v0.7.6
func (s *Store) BindEvolution(id string, binding EvolutionBinding) (Task, error)
func (*Store) Checkpoint ¶
func (*Store) Create ¶
func (s *Store) Create(title, goal string, conditionTexts []string, steps []TaskStepInput, sourceTemplates []TemplateReference) (Task, error)
func (*Store) CreateWithContext ¶ added in v0.7.6
func (s *Store) CreateWithContext(title, goal, project, device string, conditionTexts []string, steps []TaskStepInput, sourceTemplates []TemplateReference, initialBindings ...EvolutionBinding) (Task, error)
func (*Store) FinalReview ¶
func (s *Store) FinalReview(id string, input FinalReviewInput) (Task, error)
func (*Store) SetEvolutionCandidates ¶ added in v0.7.6
func (s *Store) SetEvolutionCandidates(id, reviewRevision string, items []EvolutionContextItem) (Task, error)
func (*Store) SetGuidanceContext ¶ added in v0.7.6
func (s *Store) SetGuidanceContext(id string, items []EvolutionContextItem) (Task, error)
type Task ¶
type Task struct {
SchemaVersion int `json:"schema_version"`
ID string `json:"id"`
Title string `json:"title"`
Goal string `json:"goal"`
Project string `json:"project,omitempty"`
Device string `json:"device,omitempty"`
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"`
GuidanceContext []EvolutionContextItem `json:"guidance_context,omitempty"`
EvolutionGuidanceSeen []string `json:"evolution_guidance_seen,omitempty"`
EvolutionCandidates []EvolutionContextItem `json:"evolution_candidates,omitempty"`
EvolutionBindings []EvolutionBinding `json:"evolution_bindings,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"`
SourceEvolutionID string `json:"source_evolution_id,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.