Validate agent callback envelopes

This commit is contained in:
m
2026-08-22 12:00:10 +03:00
parent 9766e5396e
commit a6eb4abc91
5 changed files with 68 additions and 2 deletions
+18
View File
@@ -20,3 +20,21 @@ type AgentLease struct {
AcquiredAt time.Time
ExpiresAt time.Time
}
type AgentCallbackKind string
const (
AgentCallbackHeartbeat AgentCallbackKind = "HEARTBEAT"
AgentCallbackCheckpoint AgentCallbackKind = "CHECKPOINT"
AgentCallbackResult AgentCallbackKind = "RESULT"
AgentCallbackCancelAcknowledged AgentCallbackKind = "CANCEL_ACKNOWLEDGED"
)
type AgentCallback struct {
RunID AgentRunID
WorkerID string
FencingToken AgentFencingToken
Sequence uint64
Kind AgentCallbackKind
ObservedAt time.Time
}