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

Function normalizeTaskExecutionRequest

internal/task/manager.go:2652–2661  ·  view source on GitHub ↗
(req ExecutionRequest)

Source from the content-addressed store, hash-verified

2650}
2651
2652func normalizeTaskExecutionRequest(req ExecutionRequest) (ExecutionRequest, error) {
2653 normalized := req
2654 normalized.IdempotencyKey = strings.TrimSpace(normalized.IdempotencyKey)
2655 normalized.NetworkChannel = strings.TrimSpace(normalized.NetworkChannel)
2656 normalized.Metadata = normalizeRawJSON(normalized.Metadata)
2657 if err := normalized.Validate("task_execution"); err != nil {
2658 return ExecutionRequest{}, err
2659 }
2660 return normalized, nil
2661}
2662
2663func taskExecutionIdempotencyKey(taskID string, action ExecutionAction, requested string) string {
2664 if trimmed := strings.TrimSpace(requested); trimmed != "" {

Callers 1

executeTaskBoundaryMethod · 0.85

Calls 2

normalizeRawJSONFunction · 0.70
ValidateMethod · 0.65

Tested by

no test coverage detected