Configuration for an aliased agent. Each [agents.<alias>] TOML
block deserializes into one of these. The DelegateTool looks up
entries here to dispatch a subtask to a named sibling agent.
Anthropic model model_provider config. No family-specific extras yet — typed
slot reserved for future Anthropic-only knobs (cache_control, beta
headers) so they land cleanly without another schema rework.
Azure OpenAI model model_provider config. Carries the Azure-specific connection
fields (resource, deployment, api_version) — the URI template
substitutes {resource} and {deployment} at runtime. Operators can
still override the entire endpoint via base.uri.
AWS Bedrock model model_provider config. Carries the AWS region (the URI
template substitutes {region} from this field). Bedrock auth is
SigV4 — credentials come from the standard AWS credential chain
(env vars, instance metadata, profile), not from api_key.
A boxed async IO stream used when a WebSocket connection is tunnelled
through a proxy. The concrete type varies depending on the proxy
kind (HTTP CONNECT vs SOCKS5) and the target scheme (ws vs wss).
[cost.rates] — top-level rate-sheet namespace. Mirrors the
[providers.*] shape so each subsection here points at the same
kind of resource its [providers.*] counterpart configures.
Local / self-hosted Whisper-compatible transcription endpoint. Skips the
shared TranscriptionProviderConfig base because it uses a bearer-token
scheme and a per-instance URL rather than a vendor API key.
Token-cost rates for a single chat / completion model, in USD per
1M tokens. Every field optional so partial sheets work without
ceremony (an operator who only knows the input rate can record it).
Moonshot model model_provider config. The endpoint field is required (no
implicit default) — operators must pick a region explicitly. Migration
fills it in from collapsed moonshot-cn / moonshot-intl outer keys.
OpenAI model model_provider config. The OpenAI-family extras (wire_api,
requires_openai_auth) live on the shared ModelProviderConfig base
because they’re consumed by validation and runtime helpers that operate
on the base struct without family awareness; this wrapper is a thin
typed slot, no extra fields.
[cost.rates.providers.*] — provider-shaped rate sheets. Each field
here mirrors a corresponding field on [providers.*] with the
trailing alias segment replaced by the resource the rate prices.
The inner typed wrappers carry the per-provider-type slot layout
and own dispatch (their slot list is the single source of truth,
shared with their providers counterpart via the for_each_*_provider_slot!
macros in crate::providers).
Runtime tunables resolved from the agent’s runtime profile. Populated
by Config::resolved_agent_config; never deserialized from the agent
table. The runtime profile is the sole config surface for these.
Authentication mode for model model_provider families that support more than one
(e.g. Qwen, Minimax can use API key OR OAuth). Families that only support a
single auth flow simply omit this field from their config struct.
Azure OpenAI endpoint template. Single variant; the URL is computed at
runtime by substituting {resource} and {deployment} from the typed
config fields.
Custom catch-all for operator-defined endpoints. The endpoint variant has
no canonical URL — operators must always set base.uri. The trait return
is a sentinel string; the runtime constructor must verify base.uri is
set for custom entries and fail with a clear error if not.
Moonshot endpoint variants. Operators pick the region that matches their
account; the runtime resolves the URI from the chosen variant unless
overridden by base.uri. Code variant is intl-only.
Wire protocol flavor for the model_provider client. responses routes
through OpenAI’s Codex/Responses API (POST /v1/responses);
chat_completions routes through the legacy /v1/chat/completions (or
the family’s chat-completions-compatible endpoint). Auto-selected per
family when unset.
Fallback queue depth applied at the pacing-wrapper construction site
when a channel’s reply_queue_depth_max is left at 0. Sized for the
AI-pacing use case: a paced channel buffering more than this is a sign
the agent is producing replies faster than the floor will ever drain
them and the overflow log is the right signal.
The FTL catalogues that zeroclaw locales fetch / the daemon’s
locales/fetch RPC can download, as (name, upstream-path-template, output-filename). {locale} is substituted per request. This is the single
source of truth — a caller supplies only a catalog name matched against
this table, never a path.
Idle-state LRU cap on the pacing wrapper’s per-recipient rows.
Bounds growth when a bot legitimately serves many thousands of distinct
peers. Eviction only reclaims idle rows (no queued sends, no running
worker, no in-flight dispatch), so under a pathological all-active burst
the row count can temporarily exceed this target until rows become idle —
it is not an unconditional hard bound. Each recipient’s queue depth stays
bounded regardless. Not exposed in config — promote to a schema field if
an operator reports hitting it.
Inclusive upper bound for per-channel reply_queue_depth_max. The lower
bound is 0, where 0 means “use DEFAULT_REPLY_QUEUE_DEPTH at the
pacing-wrapper construction site.” A non-zero value pins the bound
explicitly. Validator rejects values above this ceiling.
Implemented by every *ModelProviderConfig. Multi-region families
override to return Some(self.endpoint.uri()); single-endpoint families
inherit the None default. Drives ModelProviders::resolved_endpoint_uri,
which is itself driven by the for_each_model_provider_slot! macro — so
adding a new family without an impl is a compile error.
Per-channel reply-pacing accessor. Implemented by every *Config
struct that participates in outbound pacing so validation and
wrapper construction can walk all of them through a single
abstraction rather than nine duplicated method calls.
One trait per family-endpoint enum. Returns the URI template for the chosen
variant — a literal URL for fixed endpoints (https://api.openai.com/v1),
or a substitution template for computed endpoints (Azure’s
https://{resource}.openai.azure.com/...). Substitution happens family-side
in the runtime constructor; for non-templated families the return value is
the final URL.
Build an HTTP client for a channel, using an explicit per-channel proxy URL
when configured. Falls back to the global runtime proxy when proxy_url is
None or empty.
Build an HTTP client for a channel with custom timeouts, using an explicit
per-channel proxy URL when configured. Falls back to the global runtime
proxy when proxy_url is None or empty.
Canonical on-disk directory for a locale’s runtime/zerocode FTL catalogues:
<config_dir>/data/ftl/<locale>/. This is where zeroclaw locales fetch
writes downloaded translations and where the runtime i18n loader reads them.
<config_dir> honors ZEROCLAW_CONFIG_DIR and otherwise defaults to
~/.zeroclaw. The zerocode binary mirrors this path inline (it carries no
zeroclaw-* dependency).