crew

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package crew decomposes a task description into parallel subtasks, creates one worktree per subtask, launches an agent in each via the session backend, and monitors them to completion.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentOutcome

type AgentOutcome struct {
	Index    int    `json:"index"`
	Task     Task   `json:"task"`
	Name     string `json:"name"`
	Branch   string `json:"branch"`
	Path     string `json:"path"`
	State    string `json:"state"`
	ExitCode *int   `json:"exit_code,omitempty"`
	Summary  string `json:"summary,omitempty"`
	DiffStat string `json:"diffstat,omitempty"`
}

AgentOutcome is the result for one crew agent.

type Deps

type Deps struct {
	Worktrees worktree.Manager
	Sessions  session.SessionBackend
	Agent     agent.Launcher
	RepoRoot  string
	Log       *zerolog.Logger
}

Deps are crew's collaborators.

type Options

type Options struct {
	Description string
	Agents      int
	TasksFile   string
	Base        string
	Model       string
	Detach      bool
	Keep        bool
}

Options configure a crew run.

type Result

type Result struct {
	CrewID   string         `json:"crew_id"`
	Tasks    []Task         `json:"tasks"`
	Agents   []AgentOutcome `json:"agents"`
	Detached bool           `json:"detached"`
}

Result is the crew run outcome.

func Run

func Run(ctx context.Context, d Deps, o Options) (Result, error)

Run plans, launches, and (unless detached) monitors a crew.

type Task

type Task struct {
	Title       string `json:"title"`
	Description string `json:"description"`
}

Task is one planned subtask.

Jump to

Keyboard shortcuts

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