Documentation
¶
Overview ¶
Package workflow is the Stage-1 namespace for workflow + workspace + trajectory types in package engine. See ../REFACTOR_PLAN.md.
Index ¶
- func BuiltinWorkflows() map[string]*Workflow
- func CompareReports(before, after *DiffReport) string
- func EvalCondition(condition string, vars map[string]string) bool
- func FormatAsMarkdown(report *DiffReport) string
- func FormatAsTerminal(report *DiffReport) string
- func FormatForCommit(report *DiffReport) string
- func SubstituteVars(template string, vars map[string]string) string
- func SummarizeTrajectory(messages []client.EyrieMessage) string
- func ValidateWorkflow(wf *Workflow) []string
- type DiffReport
- type DiffReporter
- type Engine
- type FileDiffReport
- type FileState
- type Result
- type Step
- type StepResult
- type TrajectoryDistiller
- type TrajectoryEvent
- type TrajectoryInspector
- type TrajectoryRun
- type Workflow
- type WorkspaceState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuiltinWorkflows ¶
BuiltinWorkflows is the set of workflows shipped with hawk.
func CompareReports ¶
func CompareReports(before, after *DiffReport) string
CompareReports diffs two DiffReports.
func EvalCondition ¶
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 ¶
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 ¶
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.
type FileDiffReport ¶
type FileDiffReport = engine.FileDiffReport
FileDiffReport is the per-file slice of DiffReport.
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 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.