ArchAstro. V1. AgentHealthActions
(archastro v0.2.0)
Copy Markdown
AgentHealthAction API resource.
Summary
Functions
@spec get(ArchAstro.Client.t(), String.t()) :: {:ok, ArchAstro.Types.AgentHealthAction.t()} | {:error, ArchAstro.Error.reason()}
Retrieve a health action
Returns a single agent health action by its ID. Use this endpoint to fetch the current state of a specific health action — for example, to refresh a checklist item after the user completes a setup step or after polling for status changes.
The caller must be authenticated and scoped to the app that owns the health action. Returns 404 if the health action does not exist or is not accessible within the current app scope.
The requested health action object.
@spec verify(ArchAstro.Client.t(), String.t()) :: {:ok, ArchAstro.Types.AgentHealthAction.t()} | {:error, ArchAstro.Error.reason()}
Verify a health action
Synchronously re-runs the verifier for the specified health action and returns the updated health action object. Use this endpoint to power operator-facing "Verify" buttons that let users confirm a setup step is complete (for example, after setting an environment variable or completing an OAuth install).
The verifier transitions the action's status field according to the
following rules: a pending action that passes becomes completed; one
that fails stays pending. A completed action that passes stays
completed; one that fails becomes degraded. A degraded action that
passes returns to completed; one that fails stays degraded. Actions
in skipped status are never transitioned — the call returns the
unchanged record.
This endpoint runs the verifier synchronously and blocks until the check finishes. For background or probe-driven verification sweeps, use the platform's internal debounced trigger instead of calling this endpoint in a tight loop. Returns 422 if the verifier itself encounters an unrecoverable error.
The health action object with its status and last_verified_at updated to reflect the result of the verification run.