Help us shape the future of Go! Take the 2026 Go Developer Survey

workflow

package
v0.2.24 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package workflow loads and validates saved RocketClaw workflows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Descriptions added in v0.0.42

func Descriptions(definitions map[string]*Definition) []protocol.WorkflowDescription

Descriptions returns sorted name/description pairs for loaded definitions.

func Load

func Load(root *os.Root, runtimeDir string) (definitions map[string]*Definition, err error)

Load loads top-level workflow definitions from runtimeDir.

Types

type AgentRequest

type AgentRequest struct {
	Worker      Worker
	Prompt, Key string
	Schema      map[string]any
}

AgentRequest describes one isolated agent call. Key is the call's replay-stable journal key under the run ID.

type AgentRunner added in v0.1.12

type AgentRunner interface {
	Run(context.Context, *AgentRequest) (json.RawMessage, error)
}

AgentRunner runs one isolated agent call.

type Definition

type Definition struct {
	Name        string
	Description string
	Phases      []string
	// contains filtered or unexported fields
}

Definition is a compiled workflow definition.

func Compile added in v0.1.33

func Compile(filename, name, source string) (*Definition, error)

Compile validates a workflow's source.

type Result

type Result struct {
	Text   string
	Phases []protocol.PhaseUpdate
}

Result is the rendered workflow result.

func Run

func Run(ctx context.Context, definition *Definition, request RunRequest, agent AgentRunner) (result Result, err error)

Run executes a compiled workflow in the foreground.

type RunRequest

type RunRequest struct {
	RunID, Args string
}

RunRequest identifies one foreground workflow invocation.

type Worker

type Worker struct {
	Name, Instructions, Model string
	Tools                     []string
}

Worker describes an isolated workflow agent.

Jump to

Keyboard shortcuts

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