Add files via upload

This commit is contained in:
公明
2026-07-03 19:36:40 +08:00
committed by GitHub
parent c86825d365
commit 93a600d60e
16 changed files with 2025 additions and 821 deletions
+24
View File
@@ -0,0 +1,24 @@
package workflow
import "errors"
// AwaitingHITLError indicates the workflow paused before a HITL node for human approval.
type AwaitingHITLError struct {
RunID string
NodeID string
NodeLabel string
Prompt string
Reviewer string
}
func (e *AwaitingHITLError) Error() string {
if e == nil {
return "workflow awaiting human approval"
}
return "workflow awaiting human approval at node " + e.NodeID
}
func IsAwaitingHITL(err error) bool {
var target *AwaitingHITLError
return errors.As(err, &target)
}