Documentation
¶
Overview ¶
Package workflow loads and validates saved RocketClaw workflows.
Index ¶
- func Load(root *os.Root, runtimeDir string) (definitions map[string]*Definition, err error)
- type AgentProgressFunc
- type AgentRequest
- type AgentRunFunc
- type AgentThinkingFunc
- type AgentUpdate
- type Definition
- type Description
- type PhaseStatus
- type PhaseUpdate
- type ProgressFunc
- type Result
- type RunRequest
- type Terminal
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentProgressFunc ¶
type AgentProgressFunc func(context.Context, AgentUpdate) error
AgentProgressFunc receives serialized workflow agent activity updates and is never invoked concurrently.
type AgentRequest ¶
AgentRequest describes one isolated agent call.
type AgentRunFunc ¶
type AgentRunFunc func(context.Context, AgentRequest, AgentThinkingFunc) (json.RawMessage, error)
AgentRunFunc runs one isolated agent call.
type AgentThinkingFunc ¶
AgentThinkingFunc receives serialized observable activity from one isolated agent call. Implementations must not invoke it concurrently or after the agent run returns.
type AgentUpdate ¶
type AgentUpdate struct {
CallID, PhaseID, Label, Activity string
}
AgentUpdate reports one workflow agent call's latest observable activity.
type Definition ¶
type Definition struct {
Name string
Description string
Phases []string
WorkerModels []string
// contains filtered or unexported fields
}
Definition is a compiled workflow definition.
type Description ¶
type Description struct{ Name, Description string }
Description identifies one available workflow.
type PhaseStatus ¶
type PhaseStatus string
PhaseStatus identifies one workflow phase state.
const ( // PhasePending has not started. PhasePending PhaseStatus = "pending" // PhaseInProgress is executing. PhaseInProgress PhaseStatus = "in-progress" // PhaseComplete finished successfully. PhaseComplete PhaseStatus = "complete" // PhaseError failed. PhaseError PhaseStatus = "error" // PhaseSkipped was not entered before the workflow terminated. PhaseSkipped PhaseStatus = "skipped" )
type PhaseUpdate ¶
type PhaseUpdate struct {
PhaseID, Name string
Status PhaseStatus
Scheduled, Running, Complete int
Details string
}
PhaseUpdate reports connector-neutral workflow progress.
type ProgressFunc ¶
type ProgressFunc func(context.Context, PhaseUpdate) error
ProgressFunc receives serialized workflow progress updates and is never invoked concurrently.
type Result ¶
type Result struct {
Text string
Silent bool
Phases []PhaseUpdate
}
Result is the rendered workflow result.
func Run ¶
func Run(ctx context.Context, definition *Definition, request RunRequest, agent AgentRunFunc, progress ProgressFunc, agentProgress AgentProgressFunc) (result Result, err error)
Run executes a compiled workflow in the foreground.
type RunRequest ¶
type RunRequest struct {
RunID, Args string
Definition *Definition
}
RunRequest identifies one foreground workflow invocation.