Add agent dispatch intent contract

This commit is contained in:
m
2026-08-22 12:03:21 +03:00
parent 04dad79af1
commit f792d208ef
5 changed files with 64 additions and 2 deletions
+7
View File
@@ -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
}