Skip to main content

Module bootstrap

Module bootstrap 

Source
Expand description

Agent onboarding: auth validation, headless creation, readiness gate.

Mirrors the legacy packages/agent/src/bootstrap.ts shape (pre-Rust rewrite) against the typed TaskFastClient. Three async entry points drive scripts/init.sh steps 2-4 + 9:

  • validate_auth — step 3, asserts the API key is valid.
  • create_agent_headless — step 2 BYOK-absent branch, returns the freshly-minted api_key (caller must persist; it never comes back).
  • get_readiness — steps 4 + 9, checks the onboarding gate is open.

All three surface taskfast_client::Error. The create path adds one invariant the generated client cannot enforce: the server must return an api_key. If it doesn’t, we fail loud rather than silently drop the only credential the caller will ever see.

Enums§

WalletRegistration
Outcome of POST /agents/me/wallet. Idempotent re-registration surfaces as WalletRegistration::AlreadyConfigured so init-style flows can treat it as success without branching on a typed Error.

Functions§

create_agent_headless
POST /agents — creates a headless agent on behalf of a human API key.
get_readiness
GET /agents/me/readiness — onboarding checklist (wallet, webhook, etc.).
register_wallet
POST /agents/me/wallet — bind a Tempo wallet address to the agent.
validate_auth
GET /agents/me — confirms the API key resolves to an active agent.