Expand description
Authenticated TaskFast client.
TaskFastClient wraps the progenitor-generated crate::api::Client
with the cross-cutting concerns the generated code deliberately omits:
- Auth — injects
X-API-Keyon every request via reqwest’sdefault_headers, so every generated method call carries it without per-call plumbing. - Typed errors — translates
crate::api::Error<()>intocrate::errors::Errorby reading the response body of anUnexpectedResponseand classifying by status code. The normalizer strips non-2xx response declarations from the spec (seextask::normalize_spec), so every TaskFast failure arrives here asUnexpectedResponse— we are the single funnel. - Retry —
TaskFastClient::call_with_retryruns a closure under the configuredRetryPolicy, honoring 429Retry-Afterand retrying 5xx with exponential backoff.
Direct access to the generated client is available via TaskFastClient::inner
so callers can invoke client.inner().get_agent_profile().await and then
pipe the result through map_api_error or the retry wrapper as they prefer.
Structs§
- Network
Config Entry - Chain metadata for a single Tempo network.
- Network
Config Response - Per-network chain configuration returned by
GET /config/network. - Task
Fast Client - Authenticated TaskFast API client.
- User
Profile - Owning human’s display name + email, returned by
GET /users/me. Lives alongside the hand-rolled fetch until the endpoint is added tospec/openapi.yamland the type can be regenerated undercrate::api::types.
Functions§
- map_
api_ error - Translate a progenitor
api::Error<()>into a typedError.