Documentation
¶
Overview ¶
Package workflow loads and validates saved RocketClaw workflows.
Index ¶
- func Descriptions(definitions map[string]*Definition) []protocol.WorkflowDescription
- func Load(root *os.Root, runtimeDir string) (definitions map[string]*Definition, err error)
- type AgentProgressFunc
- type AgentRequest
- type AgentRunFunc
- type AgentThinkingFunc
- type Definition
- type ProgressFunc
- type Result
- type RunRequest
- type Worker
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 AgentProgressFunc ¶
type AgentProgressFunc func(context.Context, protocol.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 Definition ¶
type Definition struct {
Name string
Description string
Phases []string
WorkerModels []string
// contains filtered or unexported fields
}
Definition is a compiled workflow definition.
type ProgressFunc ¶
type ProgressFunc func(context.Context, protocol.PhaseUpdate) error
ProgressFunc receives serialized workflow progress updates and is never invoked concurrently.
type Result ¶
type Result struct {
Text string
Silent bool
Phases []protocol.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.