workflow

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package workflow is the Stage-1 namespace for workflow + workspace + trajectory types in package engine. See ../REFACTOR_PLAN.md.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuiltinWorkflows

func BuiltinWorkflows() map[string]*Workflow

BuiltinWorkflows is the set of workflows shipped with hawk.

func CompareReports

func CompareReports(before, after *DiffReport) string

CompareReports diffs two DiffReports.

func EvalCondition

func EvalCondition(condition string, vars map[string]string) bool

EvalCondition evaluates a workflow guard expression.

func FormatAsMarkdown

func FormatAsMarkdown(report *DiffReport) string

FormatAsMarkdown renders a DiffReport as Markdown.

func FormatAsTerminal

func FormatAsTerminal(report *DiffReport) string

FormatAsTerminal renders a DiffReport for the terminal.

func FormatForCommit

func FormatForCommit(report *DiffReport) string

FormatForCommit renders a DiffReport as a commit-message body.

func SubstituteVars

func SubstituteVars(template string, vars map[string]string) string

SubstituteVars expands template placeholders against vars.

func SummarizeTrajectory

func SummarizeTrajectory(messages []client.EyrieMessage) string

SummarizeTrajectory produces a one-line summary of a message run.

func ValidateWorkflow

func ValidateWorkflow(wf *Workflow) []string

ValidateWorkflow returns a slice of human-readable validation errors.

Types

type DiffReport

type DiffReport = engine.WorkspaceDiffReport

DiffReport is a structured workspace diff.

type DiffReporter

type DiffReporter = engine.DiffReporter

DiffReporter computes DiffReports between WorkspaceStates.

func NewDiffReporter

func NewDiffReporter(projectDir string) *DiffReporter

NewDiffReporter returns a reporter rooted at projectDir.

type Engine

type Engine = engine.WorkflowEngine

Engine executes Workflows against a model-call function.

func NewEngine

func NewEngine(executeFn func(ctx context.Context, agent, prompt string) (string, error)) *Engine

NewEngine returns a workflow engine that delegates step execution to the provided function (which typically wraps an LLM call).

type FileDiffReport

type FileDiffReport = engine.FileDiffReport

FileDiffReport is the per-file slice of DiffReport.

type FileState

type FileState = engine.FileState

FileState is the per-file slice of WorkspaceState.

type Result

type Result = engine.WorkflowResult

Result is the outcome of running a Workflow.

type Step

type Step = engine.WorkflowStep

Step is one node in a Workflow.

type StepResult

type StepResult = engine.StepResult

StepResult is the outcome of a single step.

type TrajectoryDistiller

type TrajectoryDistiller = engine.TrajectoryDistiller

TrajectoryDistiller summarises a slice of runs into a learnt strategy.

type TrajectoryEvent

type TrajectoryEvent = engine.TrajectoryEvent

TrajectoryEvent is one entry in a TrajectoryInspector.

type TrajectoryInspector

type TrajectoryInspector = engine.TrajectoryInspector

TrajectoryInspector records events during an agent loop for offline review.

func NewTrajectoryInspector

func NewTrajectoryInspector(sessionID string) *TrajectoryInspector

NewTrajectoryInspector returns an inspector scoped to sessionID.

type TrajectoryRun

type TrajectoryRun = engine.TrajectoryRun

TrajectoryRun is one execution of an agent loop.

type Workflow

type Workflow = engine.Workflow

Workflow is a declarative multi-step task definition.

type WorkspaceState

type WorkspaceState = engine.WorkspaceState

WorkspaceState captures the on-disk state of files at a point in time.

func NewWorkspaceState

func NewWorkspaceState(projectDir string) *WorkspaceState

NewWorkspaceState returns a fresh state snapshot rooted at projectDir.

Jump to

Keyboard shortcuts

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