taskrun

package
v0.197.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package taskrun composes isolated task creation and pickup using existing worktree, task-store and receipt-gated session-move authorities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	Create         func(context.Context, []string, worktrees.CreateOptions) ([]worktrees.CreateResult, error)
	OriginSlug     func(context.Context, string) (string, error)
	PrepareWorkLog func(string, string, worktrees.WorkLogOptions) (worktrees.WorkLogOptions, error)
	Store          func(string) (taskoffload.Store, error)
	NewID          func() (string, error)
	Now            func() time.Time
	Move           MoveOperation
}

func DefaultDependencies

func DefaultDependencies(move MoveOperation) Dependencies

type PickupRequest

type PickupRequest struct{ ProjectsRoot, TaskID, Harness, Model, Target string }

type Request

type Request struct {
	ProjectsRoot, Task                                  string
	Repositories                                        []string
	Continuation                                        []byte
	ContextFile, OriginalPrompt, Harness, Model, Target string
	ParkOnly                                            bool
}

type Result

type Result struct {
	TaskID      string `json:"task_id"`
	Task        string `json:"task"`
	WorktreeDir string `json:"worktree_dir"`
	Status      string `json:"status"`
	Harness     string `json:"harness,omitempty"`
	Model       string `json:"model,omitempty"`
	Target      string `json:"target,omitempty"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(deps Dependencies) *Service

func (*Service) Offload

func (service *Service) Offload(ctx context.Context, request Request, warnings func([]secretscan.Finding), render func(sessionrun.MoveResult) error) (Result, error)

func (*Service) Pickup

func (service *Service) Pickup(_ context.Context, request PickupRequest, warnings func([]secretscan.Finding), render func(sessionrun.MoveResult) error) (Result, error)

Jump to

Keyboard shortcuts

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