Versions in this module Expand all Collapse all v1 v1.4.0 Oct 20, 2026 Changes in this version + var ErrOutputContract = errors.New("workflow output contract violation") + func DecodeSpec(raw []byte) ([]kernelstore.CreateWorkflowStepInput, error) + type ApprovalController struct + func NewApprovalController(workflows stepTransitioner, owner string) *ApprovalController + func (a *ApprovalController) Park(ctx context.Context, workflow kernelstore.Workflow, ...) (bool, error) + func (a *ApprovalController) Reject(ctx context.Context, workflow kernelstore.Workflow, ...) (bool, error) + type ClaimManager struct + func NewClaimManager(workflows workflowClaimer, owner string, batch int, lease time.Duration, ...) *ClaimManager + func (m *ClaimManager) Claim(ctx context.Context) ([]kernelstore.Workflow, error) + type Controller struct + func NewController(workflows kernelstore.WorkflowStore, tasks TaskPipeline, ...) *Controller + func (c *Controller) Reconcile(ctx context.Context) (int, error) + func (c *Controller) WithClaiming(lease time.Duration, tokenBudget int64) *Controller + func (c *Controller) WithMaxInFlightSteps(limit int) *Controller + func (c *Controller) WithParallelism(workers int) *Controller + type DependencyResolver struct + func NewDependencyResolver(workflows stepTransitioner, owner string) *DependencyResolver + func (r *DependencyResolver) Resolve(ctx context.Context, workflow kernelstore.Workflow, ...) (map[string]string, bool, error) + type FailureDrainer struct + func NewFailureDrainer(workflows drainStore, tasks TaskPipeline, owner string) *FailureDrainer + func (d *FailureDrainer) Cancel(ctx context.Context, workflow kernelstore.Workflow, ...) (bool, error) + func (d *FailureDrainer) Drain(ctx context.Context, workflow kernelstore.Workflow, ...) (bool, error) + func (d *FailureDrainer) DrainBudgetExhausted(ctx context.Context, workflow kernelstore.Workflow, ...) (bool, error) + type LeaseManager struct + func NewLeaseManager(renewer workflowClaimRenewer, owner string, lease time.Duration) *LeaseManager + func (m *LeaseManager) Guard(ctx context.Context, workflow kernelstore.Workflow) (workCtx context.Context, release func() error) + func (m *LeaseManager) GuardedProcess(ctx context.Context, workflow kernelstore.Workflow, ...) (bool, error) + type ResultReader interface + Open func(context.Context, string, kernelstore.ArtifactReference) (io.ReadCloser, error) + type RetryController struct + func NewRetryController(workflows stepTransitioner, owner string) *RetryController + func (r *RetryController) HandleFailed(ctx context.Context, workflow kernelstore.Workflow, ...) (bool, error) + type StepCondition struct + EqualsJSON json.RawMessage + JSONPointer string + OutputContains string + OutputEquals string + Step string + type StepDispatcher struct + func NewStepDispatcher(tasks TaskPipeline, workflows stepTransitioner, newID func() uuid.UUID, ...) *StepDispatcher + func (d *StepDispatcher) Dispatch(ctx context.Context, workflow kernelstore.Workflow, ...) (bool, error) + type StepOutputContract struct + ContentType string + Schema json.RawMessage + SchemaVersion string + type StepRetry struct + MaxAttempts int + type StepSpec struct + AgentVersionRef string + Condition *StepCondition + DependsOn []string + Goal string + Name string + Output *StepOutputContract + RequiresApproval bool + Retry *StepRetry + Spec json.RawMessage + type TaskPipeline interface + CreateTask func(context.Context, kernelstore.CreateTaskInput) (kernelstore.CreateTaskResult, error) + GetTask func(context.Context, string, uuid.UUID) (kernelstore.Task, error) + RequestTaskCancellation func(context.Context, string, uuid.UUID, int64) (kernelstore.Task, error) + type WorkflowBudget struct + MaxCostMicroUSD money.MicroUSD + MaxTasks int64 + MaxTokens int64 + type WorkflowDynamicPolicy struct + Enabled bool + MaxChildrenPerStep int64 + MaxDynamicSteps int64 + MaxSpawnCostMicroUSD money.MicroUSD + MaxSpawnDepth int + MaxSpawnTasks int64 + MaxSpawnTokens int64 + MaxWorkflowSteps int64 + type WorkflowRuntimePolicy struct + Dynamic WorkflowDynamicPolicy + type WorkflowSpec struct + Budget *WorkflowBudget + Deadline *time.Time + DefaultTaskSpec json.RawMessage + Runtime *WorkflowRuntimePolicy + Steps []StepSpec + func DecodeWorkflowSpec(raw []byte) (WorkflowSpec, error) + func (s WorkflowSpec) Budgets() (tasks, tokens int64, costMicroUSD money.MicroUSD) + func (s WorkflowSpec) MergeTaskSpec(overlay json.RawMessage) (json.RawMessage, error) + func (s WorkflowSpec) StepInputs() []kernelstore.CreateWorkflowStepInput