feat(work): add deterministic dry-run dispatch

This commit is contained in:
m
2026-08-22 12:11:29 +03:00
parent 8081b4de34
commit fa62322ed2
5 changed files with 108 additions and 2 deletions
+18
View File
@@ -0,0 +1,18 @@
package work
import "time"
type DryRunDispatch struct {
Intent AgentDispatchIntent
Lease AgentLease
Callbacks []AgentCallback
}
func (value DryRunDispatch) CallbackCount() int { return len(value.Callbacks) }
func (value DryRunDispatch) LastObservedAt() time.Time {
if len(value.Callbacks) == 0 {
return time.Time{}
}
return value.Callbacks[len(value.Callbacks)-1].ObservedAt
}