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

Method handleAutomationJobsTrigger

internal/extension/host_api.go:1543–1558  ·  view source on GitHub ↗
(ctx context.Context, raw json.RawMessage)

Source from the content-addressed store, hash-verified

1541}
1542
1543func (h *HostAPIHandler) handleAutomationJobsTrigger(ctx context.Context, raw json.RawMessage) (any, error) {
1544 automation, err := h.automationManager()
1545 if err != nil {
1546 return nil, err
1547 }
1548
1549 var params hostAPIAutomationJobTriggerParams
1550 if err := decodeHostAPIParams(raw, &params); err != nil {
1551 return nil, err
1552 }
1553 if strings.TrimSpace(params.ID) == "" {
1554 return nil, invalidParamsRPCError(errors.New("id is required"))
1555 }
1556
1557 return automation.TriggerJobWithPayload(ctx, params.ID, params.Payload)
1558}
1559
1560func (h *HostAPIHandler) handleAutomationJobsRuns(ctx context.Context, raw json.RawMessage) (any, error) {
1561 automation, err := h.automationManager()

Callers

nothing calls this directly

Calls 4

automationManagerMethod · 0.95
decodeHostAPIParamsFunction · 0.85
invalidParamsRPCErrorFunction · 0.85
TriggerJobWithPayloadMethod · 0.65

Tested by

no test coverage detected