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.
Routing for one normalized git-forge event type, keyed in
[channels.git.<alias>.events] by the event type string
("pull_request.opened" = { sop = "pr-triage" }).
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.
[sop.approval] - approval broker policy config. A permanent identity source
for channel-provided approvers (not a stopgap): the approval broker consumes it
for group-membership and quorum checks. Empty = no broker policy applies.
WHO may clear a SOP approval gate. Layered with execution_mode / priority /
requires_confirmation (all of which still apply). Closed set => serde enum.
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.
LLM request payload capture policy. Mirrors LogToolIo but gates the
prompt/messages sent on each llm_request. Defaults to Off because the
full payload is the entire system prompt plus conversation every turn.
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.
Where a channel registers its skill slash commands. global (default)
registers application-wide - the commands work everywhere the bot is, but
Discord takes up to ~1h to propagate changes. guild registers to each
guild in guild_ids, which propagates instantly (the right choice for fast
iteration and single-server bots). When guild is set with an empty
guild_ids, the channel logs a warning and falls back to global.
Durable SOP run-state backend selector. A closed, compile-time-known set, so it
is a serde enum rather than free text (mirrors SandboxBackend /
ObservabilityBackend in this file); unknown values are rejected at parse time.
Wire protocol flavor for the model_provider client. responses routes
through OpenAI’s Responses API (POST /v1/responses);
chat_completions routes through the legacy /v1/chat/completions (or
the family’s chat-completions-compatible endpoint). New OpenAI provider
slots default to responses; other families default to chat-completions
(or ignore the field) 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.
The provider families that carry [cost.rates.providers.*] rate sheets, as
the trailing segment shared by their [providers.<category>] section. One
entry per #[nested] field on ProviderCostRates; this list is the registry
the TUI and web surfaces resolve cost tabs from, never a per-surface literal.
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.
Cost-rate category for a providers.<category> section key, or None for
sections that carry no rate sheets. Resolves against
PROVIDER_COST_CATEGORIES so a new rate-bearing family is added in one
place.
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).
Returns the legacy plugin directories that still hold installed plugins not
visible to the runtime, which now scans PluginsConfig::resolved_plugins_dir.
Surface [memory] knobs that the schema accepts but that have no runtime
consumer yet, so an operator who sets them learns they currently have no
effect instead of debugging missing behavior (same class of check as the
wire_api_not_supported_for_family warning).