MCPcopy Create free account
hub / github.com/compozy/agh / agentTaskClaimRecord

Function agentTaskClaimRecord

internal/cli/task_test.go:2992–3016  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2990}
2991
2992func agentTaskClaimRecord() AgentTaskClaimRecord {
2993 lease := agentTaskLeaseRecord(taskpkg.TaskRunStatusClaimed)
2994 return AgentTaskClaimRecord{
2995 Task: contract.TaskReferencePayload{
2996 ID: "task-1",
2997 Identifier: "AUTO-1",
2998 Title: "Run autonomous task",
2999 Status: taskpkg.TaskStatusInProgress,
3000 Priority: taskpkg.PriorityHigh,
3001 Scope: taskpkg.ScopeWorkspace,
3002 WorkspaceID: "ws-1",
3003 },
3004 Run: sampleTaskRunRecord(taskpkg.TaskRunStatusClaimed),
3005 Lease: lease,
3006 CoordinationChannel: &contract.CoordinationChannelPayload{
3007 ID: "builders",
3008 Channel: "builders",
3009 DisplayName: "Builders",
3010 WorkspaceID: "ws-1",
3011 TaskID: "task-1",
3012 RunID: "run-1",
3013 AllowedMessageKinds: contract.CoordinationMessageKinds(),
3014 },
3015 }
3016}
3017
3018func agentTaskLeaseRecord(status taskpkg.RunStatus) AgentTaskLeaseRecord {
3019 leaseUntil := fixedTestNow.Add(5 * time.Minute)

Callers

nothing calls this directly

Calls 3

CoordinationMessageKindsFunction · 0.92
agentTaskLeaseRecordFunction · 0.85
sampleTaskRunRecordFunction · 0.85

Tested by

no test coverage detected