task

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignmentStatus

type AssignmentStatus string
const (
	AssignmentStatusUnassigned AssignmentStatus = "unassigned"
	AssignmentStatusPending    AssignmentStatus = "pending"
	AssignmentStatusAssigned   AssignmentStatus = "assigned"
)

type Repository

type Repository interface {
	Create(ctx context.Context, t *Task) error
	Get(ctx context.Context, id string) (*Task, error)
	List(ctx context.Context, projectID, workflowID, statusID string, limit, offset int) ([]*Task, int, error)
	Update(ctx context.Context, t *Task) error
	Delete(ctx context.Context, id string) error
	Claim(ctx context.Context, taskID string, agentID string) (*Task, error)
	// ReleaseByAgent unassigns all tasks currently assigned to the given agent,
	// resetting them to Pending so other agents can claim them.
	ReleaseByAgent(ctx context.Context, agentID string) ([]*Task, error)
}

type Task

type Task struct {
	ID               string            `yaml:"id"`
	ProjectID        string            `yaml:"project_id"`
	WorkflowID       string            `yaml:"workflow_id"`
	Title            string            `yaml:"title"`
	Description      string            `yaml:"description"`
	StatusID         string            `yaml:"status_id"`
	AssignedAgentID  string            `yaml:"assigned_agent_id"`
	AssignmentStatus AssignmentStatus  `yaml:"assignment_status"`
	Metadata         map[string]string `yaml:"metadata"`
	UseWorktree      bool              `yaml:"use_worktree"`
	PermissionMode   string            `yaml:"permission_mode"`
	CreatedAt        time.Time         `yaml:"created_at"`
	UpdatedAt        time.Time         `yaml:"updated_at"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL