64 lines
1.8 KiB
Go
64 lines
1.8 KiB
Go
package work
|
|
|
|
import "time"
|
|
|
|
type AgentLeaseID string
|
|
type AgentFencingToken uint64
|
|
type AgentLeaseState string
|
|
|
|
const (
|
|
AgentLeaseActive AgentLeaseState = "ACTIVE"
|
|
AgentLeaseExpired AgentLeaseState = "EXPIRED"
|
|
)
|
|
|
|
type AgentLease struct {
|
|
ID AgentLeaseID
|
|
RunID AgentRunID
|
|
WorkerID string
|
|
FencingToken AgentFencingToken
|
|
State AgentLeaseState
|
|
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
|
|
}
|
|
|
|
type IndependentVerification struct {
|
|
ProducerRunID AgentRunID
|
|
VerifierRunID AgentRunID
|
|
VerifierIdentity string
|
|
ArtifactID string
|
|
TestEvidenceRef string
|
|
Verified bool
|
|
Summary string
|
|
}
|
|
|
|
type AgentDispatchIntent struct {
|
|
DispatchID string `json:"dispatch_id"`
|
|
IdempotencyKey string `json:"idempotency_key"`
|
|
DelegationID DelegationID `json:"delegation_id"`
|
|
RunID AgentRunID `json:"run_id"`
|
|
ImplementationID string `json:"implementation_id"`
|
|
ImplementationRevision int64 `json:"implementation_revision"`
|
|
SourceRevision string `json:"source_revision"`
|
|
WorktreeID string `json:"worktree_id"`
|
|
VerificationPlanRef string `json:"verification_plan_ref"`
|
|
CreatedAtUnixMillis int64 `json:"created_at_unix_millis"`
|
|
}
|