Documentation
¶
Overview ¶
Package autopilot runs queued work items to completion with as little supervision as the task allows: each card is taken into its own isolated workspace, worked by the agent, verified, and recorded — so a backlog can be ground through unattended and every outcome is auditable afterwards.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Card ¶
type Card struct {
ID string `json:"id"`
Title string `json:"title"`
Prompt string `json:"prompt"`
Status Status `json:"status"`
Result string `json:"result,omitempty"` // the agent's final reply
VerifyOutput string `json:"verify_output,omitempty"` // the verification command's output
Branch string `json:"branch,omitempty"` // the worktree branch, if kept
PR string `json:"pr,omitempty"` // the PR url, if opened
Error string `json:"error,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Card is one unit of work.
type Isolation ¶
type Isolation func(ctx context.Context, label string) (path string, keep func(dirty bool), cleanup func(), err error)
Isolation makes an isolated workspace for a card and returns the path plus a cleanup. When it returns "", the shared workspace is used.
type Runner ¶
type Runner struct {
// Work runs the agent on a prompt in a workspace and returns its reply.
Work func(ctx context.Context, prompt, workspace string) (string, error)
// Verify runs the verification (build/test/lint) in a workspace, returning
// its output and whether it passed. Nil means "always verified".
Verify func(ctx context.Context, workspace string) (output string, ok bool)
// Isolate provides a per-card workspace. Nil runs in Workspace directly.
Isolate Isolation
// Workspace is the fallback when Isolate is nil.
Workspace string
// Publish opens a PR for a verified, dirty worktree. Nil skips publishing.
Publish func(ctx context.Context, c Card, workspace string) (prURL string, err error)
}
Runner drives one card through the pipeline. Its collaborators are injected so the orchestration is testable without a real agent, git, or CI.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store persists cards as one JSON file each.