workflow

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package workflow compiles declarative workflow files into rules. There is no workflow entity in the core (spec §7.3): a workflow is syntax sugar that emits oneShot rules, chained through continuation.completed events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Selector

type Selector struct {
	Type   string `yaml:"type"`
	Source string `yaml:"source"`
}

type Step

type Step struct {
	Label  string   `yaml:"label"`
	On     Selector `yaml:"on"`
	Prompt string   `yaml:"prompt"`
}

type Workflow

type Workflow struct {
	Session string `yaml:"session"`
	Agent   string `yaml:"agent"`
	// Repo is the session's repoPath; empty means "the directory apply
	// runs in" (resolved by the CLI, not here — this package is pure).
	Repo  string `yaml:"repo"`
	Steps []Step `yaml:"steps"`
}

func Parse

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

Parse decodes and validates a workflow document. Unknown YAML fields are errors (typo protection); missing labels default to step-N; prompt templates are syntax-checked (execution errors surface later as failed continuations, same contract as rule.add).

func (Workflow) Rules

func (w Workflow) Rules() []core.Rule

Rules compiles the workflow into oneShot rules.

Jump to

Keyboard shortcuts

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