Documentation
¶
Overview ¶
Package api implements the wire-compatible control-plane REST surface: Anthropic Managed Agents resource CRUD (agents / environments / sessions) with the reference paths, JSON shapes, ID prefixes, pagination envelope, error envelope, and x-api-key management auth. The `?beta=true` query and anthropic-version / anthropic-beta headers are accepted and ignored.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureAPIKey ¶
EnsureAPIKey makes key the one live credential for the named logical key: it inserts (or un-revokes) the hash and revokes every other unrevoked key under the same name. That gives rotation-by-restart semantics — changing CONTROLPLANE_API_KEY and restarting cmd/controlplane revokes the previous key instead of leaving it valid forever. All replicas must therefore share one key value per name.
func EnsureEnvironmentKey ¶
EnsureEnvironmentKey makes key the one live worker credential for an environment: it inserts (or un-revokes) the hash and revokes every other unrevoked key for the same environment_id. That gives one live Authorization: Bearer credential per environment's work queue, with rotation-by-re-mint semantics (registering a fresh value revokes the prior one). Only the hash is stored.
Issuance is a deliberate divergence: the reference mints environment keys in its console with no public wire endpoint, so a self-hostable platform owns this provisioning primitive. The consuming side — resolving a Bearer token to its environment — stays wire-locked by the real `ant beta:worker` client.
Types ¶
This section is empty.