Expand description
Runtime configuration, read from environment variables.
Every variable can alternatively be provided as a file by appending
_FILE to its name (e.g. TEAMCRAFT_DB_PASSWORD_FILE=/run/secrets/db_password),
which is how container secrets are consumed. Reference:
docs/src/admin/configuration.md.
Files that are read on start (variables already set take precedence):
TEAMCRAFT_ENV_FILE if set, the local development file LOCAL_ENV_FILE
(secrets/.env, git-ignored) and – only in package builds – the system
file SYSTEM_ENV_FILE.
Structs§
- Assistant
Config - Bootstrap
Admin - Config
- Mattermost
Bot - Mattermost
Config - Oidc
Config - Smtp
Config - Webhook
Config - Target rules of outgoing event webhooks (the SSRF guard in
crate::webhooks).
Enums§
- Assistant
Provider - Which wire format the assistant speaks.
- Local
Agents TEAMCRAFT_LOCAL_AGENTS: may users connect their own local AI agents (the desktop app’s Agent view, an ACP client for Claude Code, Gemini CLI …) to TeamCraft’s tools?- LogFormat
Constants§
- DEFAULT_
ASSISTANT_ MAX_ CONCURRENT - Default number of runs at the same time.
- DEFAULT_
ASSISTANT_ MAX_ STEPS - Default for the most model calls of one assistant run.
- DEFAULT_
ASSISTANT_ MAX_ TOKENS - Default output tokens per model call.
- DEFAULT_
ASSISTANT_ MODEL - Default model of the
anthropicprovider. - DEFAULT_
ASSISTANT_ REQUEST_ TIMEOUT - Default time limit of one HTTP call to the AI service, in seconds.
- DEFAULT_
ASSISTANT_ RETENTION_ DAYS - Default for how long an idle assistant conversation is kept (days).
- DEFAULT_
ASSISTANT_ RUN_ TIMEOUT - Default time limit of a whole run, in seconds.
- DEFAULT_
WEBHOOK_ RETENTION_ DAYS - Default for how long finished webhook deliveries are kept.
- KNOWN_
VARIABLES - Every variable the configuration (and the command line) reads, also as
<NAME>_FILE. Sorted; guarded by tests against the string literals of this file and againstdocs/src/admin/configuration.md. - LOCAL_
AGENT_ HEADER - Header the desktop app adds to the MCP connection it hands to a local
agent (value
LOCAL_AGENT_HEADER_VALUE). - LOCAL_
AGENT_ HEADER_ VALUE - Value of
LOCAL_AGENT_HEADERon a local agent’s MCP calls. - LOCAL_
ENV_ FILE - Local configuration file, relative to the working directory (the repository root).
- MIN_
AUDIT_ RETENTION_ DAYS - Shortest audit log retention (
TEAMCRAFT_AUDIT_RETENTION_DAYS): a typo must not empty the audit trail. - SYSTEM_
ENV_ FILE - Configuration file of a system installation. Set at build time by the
distribution packages (
TEAMCRAFT_SYSTEM_CONFIG=/etc/teamcraft/teamcraft.env), so development builds never read a system file. - TOOLING_
VARIABLES - Variables of the build and the test tooling: documented and never warned about, but not part of the server configuration.
Functions§
- load_
env_ files - Loads every configuration file (see the module documentation). Errors are returned with the path; the remaining files are still loaded.
- load_
local_ env_ file - Loads
LOCAL_ENV_FILEinto the process environment if it exists. Variables that are already set take precedence. Returns whether a file was loaded. - unknown_
variables TEAMCRAFT_*(andMATTERMOST_*) names that TeamCraft does not know, each with the nearest known name.<NAME>_FILEis checked asNAME.- url_
is_ under - Whether
base_urlislistedor below it: same scheme, host and port, and the path oflistedis a prefix at a segment boundary. - warn_
unknown_ variables - Logs a warning for every unknown
TEAMCRAFT_*variable of the process environment (a typo would otherwise silently leave the default in place). Call after the tracing subscriber is installed.