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

Function claimTaskRunFromRequest

internal/api/core/tasks.go:2382–2388  ·  view source on GitHub ↗
(req contract.ClaimTaskRunRequest)

Source from the content-addressed store, hash-verified

2380}
2381
2382func claimTaskRunFromRequest(req contract.ClaimTaskRunRequest) (taskpkg.ClaimRun, error) {
2383 claim := taskpkg.ClaimRun{IdempotencyKey: strings.TrimSpace(req.IdempotencyKey)}
2384 if err := claim.Validate("claim_run"); err != nil {
2385 return taskpkg.ClaimRun{}, err
2386 }
2387 return claim, nil
2388}
2389
2390func startTaskRunFromRequest(req contract.StartTaskRunRequest) (taskpkg.StartRun, error) {
2391 startReq := taskpkg.StartRun{IdempotencyKey: strings.TrimSpace(req.IdempotencyKey)}

Callers 2

ClaimTaskRunMethod · 0.70

Calls 1

ValidateMethod · 0.95

Tested by 1