Documentation
¶
Index ¶
- Constants
- Variables
- type AttachInput
- type Attachment
- type CreateWorkPlanInput
- type CreateWorkTaskInput
- type DependencySummary
- type GetNextWorkTaskInput
- type GetNextWorkTaskResult
- type ResumeWorkPlanInput
- type Service
- func (svc *Service) AttachClaim(ctx context.Context, input AttachInput) (Attachment, error)
- func (svc *Service) AttachContextPack(ctx context.Context, input AttachInput) (Attachment, error)
- func (svc *Service) AttachEvidence(ctx context.Context, input AttachInput) (Attachment, error)
- func (svc *Service) AttachKnowledgeCandidate(ctx context.Context, input AttachInput) (Attachment, error)
- func (svc *Service) AttachReviewResult(ctx context.Context, input AttachInput) (Attachment, error)
- func (svc *Service) AttachVerifierResult(ctx context.Context, input AttachInput) (Attachment, error)
- func (svc *Service) BlockWorkTask(ctx context.Context, input WorkTaskActionInput) (WorkTask, error)
- func (svc *Service) CallWorkPlanTool(ctx context.Context, name string, arguments json.RawMessage) (any, error)
- func (svc *Service) ClaimWorkTask(ctx context.Context, input WorkTaskActionInput) (WorkTask, error)
- func (svc *Service) CompleteWorkTask(ctx context.Context, input WorkTaskActionInput) (WorkTask, error)
- func (svc *Service) CreateWorkPlan(ctx context.Context, input CreateWorkPlanInput) (WorkPlan, error)
- func (svc *Service) CreateWorkTask(ctx context.Context, input CreateWorkTaskInput) (WorkTask, error)
- func (svc *Service) FailWorkTask(ctx context.Context, input WorkTaskActionInput) (WorkTask, error)
- func (svc *Service) GetNextWorkTask(ctx context.Context, input GetNextWorkTaskInput) (GetNextWorkTaskResult, error)
- func (svc *Service) GetWorkPlan(ctx context.Context, projectID, planID string) (WorkPlan, error)
- func (svc *Service) GetWorkTask(ctx context.Context, projectID, taskID string) (WorkTask, error)
- func (svc *Service) ListBlockedWorkTasks(ctx context.Context, filter WorkTaskFilter) ([]WorkTask, error)
- func (svc *Service) ListMineWorkTasks(ctx context.Context, filter WorkTaskFilter) ([]WorkTask, error)
- func (svc *Service) ListOpenWorkTasks(ctx context.Context, filter WorkTaskFilter) ([]WorkTask, error)
- func (svc *Service) ListWorkPlans(ctx context.Context, filter WorkPlanFilter) ([]WorkPlan, error)
- func (svc *Service) ReleaseWorkTask(ctx context.Context, input WorkTaskActionInput) (WorkTask, error)
- func (svc *Service) ResumeWorkPlan(ctx context.Context, input ResumeWorkPlanInput) (WorkPlan, error)
- func (svc *Service) StartWorkTask(ctx context.Context, input WorkTaskActionInput) (WorkTask, error)
- func (svc *Service) UpdateWorkPlanStatus(ctx context.Context, input UpdateWorkPlanStatusInput) (WorkPlan, error)
- func (svc *Service) UpdateWorkTaskStatus(ctx context.Context, input UpdateWorkTaskStatusInput) (WorkTask, error)
- type Store
- type UpdateWorkPlanStatusInput
- type UpdateWorkTaskStatusInput
- type WorkPlan
- type WorkPlanFilter
- type WorkTask
- type WorkTaskActionInput
- type WorkTaskFilter
Constants ¶
View Source
const ( WorkPlanStatusPlanned = "planned" WorkPlanStatusActive = "active" WorkPlanStatusBlocked = "blocked" WorkPlanStatusNeedsReview = "needs_review" WorkPlanStatusDone = "done" WorkPlanStatusFailed = "failed" WorkPlanStatusCancelled = "cancelled" WorkPlanStatusSuperseded = "superseded" )
View Source
const ( WorkPlanIsolationDedicatedWorktree = "dedicated_worktree" )
View Source
const ( WorkTaskStatusPlanned = "planned" WorkTaskStatusReady = "ready" WorkTaskStatusClaimed = "claimed" WorkTaskStatusInProgress = "in_progress" WorkTaskStatusBlocked = "blocked" WorkTaskStatusNeedsReview = "needs_review" WorkTaskStatusVerifying = "verifying" WorkTaskStatusDone = "done" WorkTaskStatusFailed = "failed" WorkTaskStatusCancelled = "cancelled" WorkTaskStatusSuperseded = "superseded" )
View Source
const ( DecompositionDraft = "draft" DecompositionReady = "ready" DecompositionTooBroad = "too_broad" DecompositionMissingEvidence = "missing_evidence" DecompositionMissingContext = "missing_context" DecompositionMissingVerification = "missing_verification" DecompositionMissingResume = "missing_resume" )
Variables ¶
View Source
var ErrInvalidInput = errors.New("invalid input")
Functions ¶
This section is empty.
Types ¶
type AttachInput ¶
type Attachment ¶
type Attachment struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
PlanID string `json:"plan_id"`
TaskID string `json:"task_id"`
Kind string `json:"kind"`
Ref string `json:"ref"`
AttachedByRunID string `json:"attached_by_run_id,omitempty"`
TraceID string `json:"trace_id,omitempty"`
Note string `json:"note,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
type CreateWorkPlanInput ¶
type CreateWorkPlanInput struct {
ProjectID string `json:"project_id,omitempty"`
PlanRef string `json:"plan_ref"`
UserRequestRef string `json:"user_request_ref,omitempty"`
Title string `json:"title"`
GoalSummary string `json:"goal_summary"`
OwnerAgent string `json:"owner_agent,omitempty"`
CreatedByRunID string `json:"created_by_run_id,omitempty"`
TraceID string `json:"trace_id,omitempty"`
ResumeSummary string `json:"resume_summary,omitempty"`
IsolationMode string `json:"isolation_mode,omitempty"`
ParallelGroupRef string `json:"parallel_group_ref,omitempty"`
WorkspaceRef string `json:"workspace_ref,omitempty"`
GitBaseRef string `json:"git_base_ref,omitempty"`
GitBranchRef string `json:"git_branch_ref,omitempty"`
GitWorktreeRef string `json:"git_worktree_ref,omitempty"`
}
type CreateWorkTaskInput ¶
type CreateWorkTaskInput struct {
ProjectID string `json:"project_id,omitempty"`
PlanID string `json:"plan_id"`
TaskRef string `json:"task_ref"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
OwnerAgent string `json:"owner_agent,omitempty"`
RunID string `json:"run_id,omitempty"`
TraceID string `json:"trace_id,omitempty"`
EvidenceNeeded []string `json:"evidence_needed,omitempty"`
ContextPackRefs []string `json:"context_pack_refs,omitempty"`
LikelyFilesAffected []string `json:"likely_files_affected,omitempty"`
DependencyTaskIDs []string `json:"dependency_task_ids,omitempty"`
VerificationRequirement string `json:"verification_requirement"`
ExpectedOutput string `json:"expected_output,omitempty"`
FailureCriteria string `json:"failure_criteria,omitempty"`
ResumeInstructions string `json:"resume_instructions,omitempty"`
KnowledgeCandidateRefs []string `json:"knowledge_candidate_refs,omitempty"`
DecompositionQuality string `json:"decomposition_quality,omitempty"`
}
type DependencySummary ¶
type GetNextWorkTaskInput ¶
type GetNextWorkTaskInput struct {
ProjectID string `json:"project_id,omitempty"`
PlanID string `json:"plan_id,omitempty"`
OwnerAgent string `json:"owner_agent,omitempty"`
RunID string `json:"run_id,omitempty"`
TraceID string `json:"trace_id,omitempty"`
IncludeClaimedByMe bool `json:"include_claimed_by_me,omitempty"`
}
type GetNextWorkTaskResult ¶
type GetNextWorkTaskResult struct {
Found bool `json:"found"`
Task WorkTask `json:"task,omitempty"`
Plan WorkPlan `json:"plan,omitempty"`
DependencySummary []DependencySummary `json:"dependency_summary,omitempty"`
EvidenceRefs []string `json:"evidence_refs,omitempty"`
ContextPackRefs []string `json:"context_pack_refs,omitempty"`
ResumeInstructions string `json:"resume_instructions,omitempty"`
RequiredVerification string `json:"required_verification,omitempty"`
SafeReason string `json:"safe_reason,omitempty"`
OpenCount int `json:"open_count"`
BlockedCount int `json:"blocked_count"`
ClaimedCount int `json:"claimed_count"`
Reason string `json:"reason,omitempty"`
}
type ResumeWorkPlanInput ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) AttachClaim ¶
func (svc *Service) AttachClaim(ctx context.Context, input AttachInput) (Attachment, error)
func (*Service) AttachContextPack ¶
func (svc *Service) AttachContextPack(ctx context.Context, input AttachInput) (Attachment, error)
func (*Service) AttachEvidence ¶
func (svc *Service) AttachEvidence(ctx context.Context, input AttachInput) (Attachment, error)
func (*Service) AttachKnowledgeCandidate ¶
func (svc *Service) AttachKnowledgeCandidate(ctx context.Context, input AttachInput) (Attachment, error)
func (*Service) AttachReviewResult ¶
func (svc *Service) AttachReviewResult(ctx context.Context, input AttachInput) (Attachment, error)
func (*Service) AttachVerifierResult ¶
func (svc *Service) AttachVerifierResult(ctx context.Context, input AttachInput) (Attachment, error)
func (*Service) BlockWorkTask ¶
func (*Service) CallWorkPlanTool ¶
func (svc *Service) CallWorkPlanTool(ctx context.Context, name string, arguments json.RawMessage) (any, error)
CallWorkPlanTool adapts MCP tool calls onto the service-owned validation and state machine.
func (*Service) ClaimWorkTask ¶
func (*Service) CompleteWorkTask ¶
func (*Service) CreateWorkPlan ¶
func (*Service) CreateWorkTask ¶
func (*Service) FailWorkTask ¶
func (*Service) GetNextWorkTask ¶
func (svc *Service) GetNextWorkTask(ctx context.Context, input GetNextWorkTaskInput) (GetNextWorkTaskResult, error)
func (*Service) GetWorkPlan ¶
func (*Service) GetWorkTask ¶
func (*Service) ListBlockedWorkTasks ¶
func (*Service) ListMineWorkTasks ¶
func (*Service) ListOpenWorkTasks ¶
func (*Service) ListWorkPlans ¶
func (*Service) ReleaseWorkTask ¶
func (*Service) ResumeWorkPlan ¶
func (*Service) StartWorkTask ¶
func (*Service) UpdateWorkPlanStatus ¶
func (*Service) UpdateWorkTaskStatus ¶
type Store ¶
type Store interface {
CreateWorkPlan(context.Context, WorkPlan) (WorkPlan, error)
GetWorkPlan(context.Context, string, string) (WorkPlan, error)
ListWorkPlans(context.Context, WorkPlanFilter) ([]WorkPlan, error)
UpdateWorkPlan(context.Context, WorkPlan) (WorkPlan, error)
CreateWorkTask(context.Context, WorkTask) (WorkTask, error)
GetWorkTask(context.Context, string, string) (WorkTask, error)
ListWorkTasks(context.Context, WorkTaskFilter) ([]WorkTask, error)
UpdateWorkTask(context.Context, WorkTask) (WorkTask, error)
CreateAttachment(context.Context, Attachment) (Attachment, error)
ListAttachments(context.Context, string, string) ([]Attachment, error)
}
type UpdateWorkTaskStatusInput ¶
type UpdateWorkTaskStatusInput struct {
WorkTaskActionInput
Status string `json:"status"`
}
type WorkPlan ¶
type WorkPlan struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
PlanRef string `json:"plan_ref"`
UserRequestRef string `json:"user_request_ref,omitempty"`
Title string `json:"title"`
GoalSummary string `json:"goal_summary"`
Status string `json:"status"`
OwnerAgent string `json:"owner_agent,omitempty"`
CreatedByRunID string `json:"created_by_run_id,omitempty"`
TraceID string `json:"trace_id,omitempty"`
CurrentTaskID string `json:"current_task_id,omitempty"`
ResumeSummary string `json:"resume_summary,omitempty"`
IsolationMode string `json:"isolation_mode,omitempty"`
ParallelGroupRef string `json:"parallel_group_ref,omitempty"`
WorkspaceRef string `json:"workspace_ref,omitempty"`
GitBaseRef string `json:"git_base_ref,omitempty"`
GitBranchRef string `json:"git_branch_ref,omitempty"`
GitWorktreeRef string `json:"git_worktree_ref,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type WorkPlanFilter ¶
type WorkTask ¶
type WorkTask struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
PlanID string `json:"plan_id"`
TaskRef string `json:"task_ref"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
Status string `json:"status"`
OwnerAgent string `json:"owner_agent,omitempty"`
ClaimedByRunID string `json:"claimed_by_run_id,omitempty"`
TraceID string `json:"trace_id,omitempty"`
EvidenceNeeded []string `json:"evidence_needed,omitempty"`
ContextPackRefs []string `json:"context_pack_refs,omitempty"`
LikelyFilesAffected []string `json:"likely_files_affected,omitempty"`
DependencyTaskIDs []string `json:"dependency_task_ids,omitempty"`
VerificationRequirement string `json:"verification_requirement"`
ExpectedOutput string `json:"expected_output,omitempty"`
FailureCriteria string `json:"failure_criteria,omitempty"`
Outcome string `json:"outcome,omitempty"`
ResumeInstructions string `json:"resume_instructions,omitempty"`
BlockedReason string `json:"blocked_reason,omitempty"`
BlockedByTaskIDs []string `json:"blocked_by_task_ids,omitempty"`
KnowledgeCandidateRefs []string `json:"knowledge_candidate_refs,omitempty"`
EvidenceRefs []string `json:"evidence_refs,omitempty"`
ClaimRefs []string `json:"claim_refs,omitempty"`
VerifierResultRefs []string `json:"verifier_result_refs,omitempty"`
ReviewResultRefs []string `json:"review_result_refs,omitempty"`
ReviewExemptReason string `json:"review_exempt_reason,omitempty"`
ArtifactRefs []string `json:"artifact_refs,omitempty"`
AgentRunIDs []string `json:"agent_run_ids,omitempty"`
DecompositionQuality string `json:"decomposition_quality"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ClaimedAt time.Time `json:"claimed_at,omitempty"`
StartedAt time.Time `json:"started_at,omitempty"`
CompletedAt time.Time `json:"completed_at,omitempty"`
}
type WorkTaskActionInput ¶
type WorkTaskActionInput struct {
ProjectID string `json:"project_id,omitempty"`
TaskID string `json:"task_id"`
OwnerAgent string `json:"owner_agent,omitempty"`
RunID string `json:"run_id,omitempty"`
TraceID string `json:"trace_id,omitempty"`
Outcome string `json:"outcome,omitempty"`
SafeNextAction string `json:"safe_next_action,omitempty"`
BlockedReason string `json:"blocked_reason,omitempty"`
BlockedByTaskIDs []string `json:"blocked_by_task_ids,omitempty"`
ContextPackRefs []string `json:"context_pack_refs,omitempty"`
EvidenceRefs []string `json:"evidence_refs,omitempty"`
ClaimRefs []string `json:"claim_refs,omitempty"`
KnowledgeRefs []string `json:"knowledge_candidate_refs,omitempty"`
ResumeInstructions string `json:"resume_instructions,omitempty"`
VerifierResultRefs []string `json:"verifier_result_refs,omitempty"`
ReviewResultRefs []string `json:"review_result_refs,omitempty"`
ReviewExemptReason string `json:"review_exempt_reason,omitempty"`
}
type WorkTaskFilter ¶
type WorkTaskFilter struct {
ProjectID string `json:"project_id,omitempty"`
PlanID string `json:"plan_id,omitempty"`
Status string `json:"status,omitempty"`
OwnerAgent string `json:"owner_agent,omitempty"`
ClaimedByRunID string `json:"claimed_by_run_id,omitempty"`
PageSize int `json:"page_size,omitempty"`
PageToken string `json:"page_token,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.