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.
Types ¶
type AgentRequest ¶
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.
Click to show internal directories.
Click to hide internal directories.