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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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