phaseconfig

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackoffDuration

func BackoffDuration(retry int) time.Duration

func CaptureGitDelta

func CaptureGitDelta(workDir, prevCommit string) (diffStat, changedFiles string, err error)

func CaptureHeadCommit

func CaptureHeadCommit(workDir string) string

func EmitPhaseEnd

func EmitPhaseEnd(w EventWriter, runID, phase string, iteration int, stopReason string, marker *LoopMarker) error

func EmitPhaseStart

func EmitPhaseStart(w EventWriter, runID, phase string, iteration int, kind string) error

func EmitRetry

func EmitRetry(w EventWriter, runID string, attempt, maxRetries int)

func InsertInitialPrompt

func InsertInitialPrompt(pre *[]Phase, prompt string)

func LoopDirectiveSeverity

func LoopDirectiveSeverity(d string) int

func RenderPrompt

func RenderPrompt(tmpl string, ctx TemplateContext) (string, error)

func ResolvePhaseFiles

func ResolvePhaseFiles(phases []Phase, configDir string) error

func ValidatePhaseHasPrompt

func ValidatePhaseHasPrompt(p Phase) error

func ValidatePhaseMutualExclusions

func ValidatePhaseMutualExclusions(p Phase) error

func ValidatePhaseNames

func ValidatePhaseNames(phases ...[]Phase) error

func ValidatePhaseRoster added in v0.25.0

func ValidatePhaseRoster(p Phase) error

ValidatePhaseRoster checks the phase-local roster selector against fields that describe a different identity or dispatch a nested workflow.

Types

type EventWriter

type EventWriter interface {
	Write(event events.Event) error
}

type LoopMarker

type LoopMarker struct {
	Directive string
	Label     string
}

type Phase

type Phase struct {
	Name               string            `json:"name"`
	Prompt             string            `json:"prompt"`
	PromptFile         string            `json:"prompt_file,omitempty"`
	LoopFile           string            `json:"loop_file,omitempty"`
	TeamFile           string            `json:"team_file,omitempty"`
	ResumeFromPrevious bool              `json:"resume_from_previous,omitempty"`
	Conditional        bool              `json:"conditional,omitempty"`
	Agent              string            `json:"agent,omitempty"`
	Model              string            `json:"model,omitempty"`
	RosterEntry        string            `json:"roster_entry,omitempty"`
	Requires           PhaseRequirements `json:"requires,omitempty"`
	OnIncomplete       PhaseOnIncomplete `json:"on_incomplete,omitempty"`
}

type PhaseOnIncomplete added in v0.15.0

type PhaseOnIncomplete struct {
	Nudge     string `json:"nudge,omitempty"`
	MaxNudges int    `json:"max_nudges,omitempty"`
}

type PhaseRequirements added in v0.15.0

type PhaseRequirements struct {
	Files         []string `json:"files,omitempty"`
	NonEmptyFiles []string `json:"non_empty_files,omitempty"`
}

type TemplateContext

type TemplateContext struct {
	RunID           string
	Phase           string
	Iteration       int
	MaxIterations   int
	WorkDir         string
	PrevPhaseCommit string
	DiffStat        string
	ChangedFiles    string
	TeamOutput      string
	TeamFinalOutput string
}

Jump to

Keyboard shortcuts

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