Add agent dispatch intent contract
This commit is contained in:
@@ -39,3 +39,10 @@ func ValidateIndependentVerification(value work.IndependentVerification) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func ValidateDispatchIntent(value work.AgentDispatchIntent) error {
|
||||
if value.DispatchID == "" || value.IdempotencyKey == "" || value.DelegationID == "" || value.RunID == "" || value.ImplementationID == "" || value.ImplementationRevision < 1 || value.SourceRevision == "" || value.WorktreeID == "" || value.VerificationPlanRef == "" || value.CreatedAtUnixMillis < 1 {
|
||||
return ErrCallbackRejected
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user