Documentation
¶
Index ¶
- type AgentRegistry
- type ConversationMemoryRewinder
- type RunnerOption
- func WithAgentRegistry(agents AgentRegistry) RunnerOption
- func WithAuditSink(sink audit.Sink) RunnerOption
- func WithBlobStore(blobs runstate.BlobStore) RunnerOption
- func WithHumanGate(gate core.HumanGate) RunnerOption
- func WithMemoryRewinder(memory ConversationMemoryRewinder) RunnerOption
- func WithOutputRedactor(redactor governance.OutputRedactor) RunnerOption
- func WithSecurityPolicy(policy security.Policy) RunnerOption
- func WithToolApprovalEvaluator(evaluator core.ToolApprovalEvaluator) RunnerOption
- func WithWorkflowToolPolicy(policy governance.ToolPolicy) RunnerOption
- type ToolRegistry
- type WorkflowPausedError
- type WorkflowRunner
- func (r *WorkflowRunner) RestoreSnapshotAndRun(ctx context.Context, scenario core.Scenario, runID string, ...) error
- func (r *WorkflowRunner) Resume(ctx context.Context, scenario core.Scenario, runID string) error
- func (r *WorkflowRunner) ResumeFromStep(ctx context.Context, scenario core.Scenario, runID, nodeID string) error
- func (r *WorkflowRunner) Run(ctx context.Context, scenario core.Scenario, runID string) error
- func (r *WorkflowRunner) SaveStepOutput(ctx context.Context, scenario core.Scenario, runID, nodeID string, value any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentRegistry ¶
type AgentRegistry interface {
Agent(name string) (core.AgentRunner, bool)
}
type ConversationMemoryRewinder ¶ added in v0.3.0
type ConversationMemoryRewinder interface {
RewindConversationMemory(ctx context.Context, runID, agentName string, keep int) error
}
ConversationMemoryRewinder truncates a run-scoped conversation memory to the first keep messages. Workflow time-travel uses it to rewind agent memory in step with rewound step outputs.
type RunnerOption ¶
type RunnerOption func(*WorkflowRunner)
func WithAgentRegistry ¶
func WithAgentRegistry(agents AgentRegistry) RunnerOption
func WithAuditSink ¶ added in v0.3.0
func WithAuditSink(sink audit.Sink) RunnerOption
WithAuditSink wires the audit sink used when a security policy denies a workflow tool invocation.
func WithBlobStore ¶
func WithBlobStore(blobs runstate.BlobStore) RunnerOption
func WithHumanGate ¶
func WithHumanGate(gate core.HumanGate) RunnerOption
func WithMemoryRewinder ¶ added in v0.3.0
func WithMemoryRewinder(memory ConversationMemoryRewinder) RunnerOption
WithMemoryRewinder wires the capability used to rewind run-scoped conversation memory when a workflow is rewound via time-travel.
func WithOutputRedactor ¶ added in v0.1.3
func WithOutputRedactor(redactor governance.OutputRedactor) RunnerOption
WithOutputRedactor wires an output redactor for persisted workflow step outputs.
func WithSecurityPolicy ¶ added in v0.3.0
func WithSecurityPolicy(policy security.Policy) RunnerOption
WithSecurityPolicy wires the same authorization policy used by the autonomous tool loop, so NodeTool executions cannot bypass RBAC.
func WithToolApprovalEvaluator ¶ added in v0.3.0
func WithToolApprovalEvaluator(evaluator core.ToolApprovalEvaluator) RunnerOption
func WithWorkflowToolPolicy ¶ added in v0.1.1
func WithWorkflowToolPolicy(policy governance.ToolPolicy) RunnerOption
WithWorkflowToolPolicy wires a per-invocation governance policy applied to NodeTool executions inside a workflow. The policy is evaluated before each tool call and can deny the invocation.
type ToolRegistry ¶
type WorkflowPausedError ¶
func (WorkflowPausedError) Error ¶
func (e WorkflowPausedError) Error() string
type WorkflowRunner ¶
type WorkflowRunner struct {
// contains filtered or unexported fields
}
func NewWorkflowRunner ¶
func NewWorkflowRunner(tools ToolRegistry, runs runstate.Repository, events core.EventSink, opts ...RunnerOption) *WorkflowRunner
func (*WorkflowRunner) RestoreSnapshotAndRun ¶ added in v0.2.0
func (r *WorkflowRunner) RestoreSnapshotAndRun(ctx context.Context, scenario core.Scenario, runID string, restored runstate.RunSnapshot) error
RestoreSnapshotAndRun replaces the current run snapshot with a historical revision and reruns the workflow from that restored state forward.
func (*WorkflowRunner) ResumeFromStep ¶ added in v0.2.0
func (r *WorkflowRunner) ResumeFromStep(ctx context.Context, scenario core.Scenario, runID, nodeID string) error
ResumeFromStep truncates outputs for the node and its downstream steps, then reruns the workflow from that node forward.
func (*WorkflowRunner) SaveStepOutput ¶ added in v0.3.0
func (r *WorkflowRunner) SaveStepOutput(ctx context.Context, scenario core.Scenario, runID, nodeID string, value any) error
SaveStepOutput persists a workflow node output and advances CurrentNodeID.