workflow

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const StateFile = ".brr-workflow-state.json"

Variables

This section is empty.

Functions

func Resolve

func Resolve(name string) ([]byte, error)

func Run

func Run(opts Options) (*engine.Result, error)

Run executes the workflow. The caller must hold the exclusive lock.

Types

type Options

type Options struct {
	Name          string                       // workflow name (for display)
	Workflow      Workflow                     // parsed workflow definition
	Config        config.Config                // brr config (for profile resolution)
	ProfileFlag   string                       // --profile flag override (empty = use stage/config default)
	ResolvePrompt func(string) (string, error) // prompt resolution function
	Notify        func()                       // called on workflow completion (nil = no notification)
	Reset         bool                         // discard saved state and start fresh
}

type Stage

type Stage struct {
	Prompt  string `yaml:"prompt"`
	Max     int    `yaml:"max"`
	Profile string `yaml:"profile,omitempty"`
	Cycle   bool   `yaml:"cycle,omitempty"`
}

type State

type State struct {
	Workflow string `json:"workflow"`
	Stage    int    `json:"stage"`
	Cycle    int    `json:"cycle"`
	StartSHA string `json:"start_sha"`
}

type Workflow

type Workflow struct {
	Stages    []Stage `yaml:"stages"`
	MaxCycles int     `yaml:"max_cycles"`
}

func Load

func Load(data []byte) (Workflow, error)

Jump to

Keyboard shortcuts

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