stageflow

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const CurrentStageFormatVersion = 1

CurrentStageFormatVersion is the authored stage-workflow version on disk and in saved run snapshots. Older version-1 workflows remain readable: routes such as `changed: assess` still mean the implement stage advances only after supervisor fan-out join and verification finish.

Variables

This section is empty.

Functions

func MigrateSaved

func MigrateSaved(s *State) error

MigrateSaved upgrades a persisted stageflow snapshot when needed. Version 1 workflows need no rewrite; unsupported versions fail closed with a migration hint so operators can re-author rather than silently reinterpret routes.

Types

type State

type State struct {
	PendingAnswer string        `json:"pendingAnswer,omitempty"`
	Workflow      spec.Workflow `json:"workflow"`
	Current       string        `json:"current"`
	Steps         int           `json:"steps"`
	ChildRunID    string        `json:"childRunId,omitempty"`
	Transitions   []Transition  `json:"transitions,omitempty"`
}

func New

func New(w spec.Workflow, worker *adaptive.State) (State, error)

func (*State) Advance

func (s *State) Advance(answer string, worker *adaptive.State) error

func (State) Stage

func (s State) Stage() (spec.Stage, bool)

type Transition

type Transition struct {
	Stage      string `json:"stage"`
	Answer     string `json:"answer"`
	Next       string `json:"next"`
	ChildRunID string `json:"childRunId,omitempty"`
}

Jump to

Keyboard shortcuts

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