Configuration
Console Config Storage (downcity.db)
Console-global config is now unified in ~/.downcity/downcity.db with encrypted sensitive fields
Console Config Storage (downcity.db)
From current versions, Console no longer uses:
~/.downcity/downcity.json~/.downcity/.env
Console-global config is unified in:
~/.downcity/downcity.db
What is stored
downcity.db contains these major groups:
- Model pool (providers/models)
- Console-global env (
global_env) - Agent-private env (
agent_env) - Bot account vault (
channel_accounts) - Chat user authorization (
chat_auth_roles,chat_auth_role_permissions,chat_auth_channel_defaults,chat_auth_user_roles)
Sensitive fields (such as API keys) are stored encrypted.
Boundary with Agent project config
These files remain agent-project-level config (unchanged):
<agent>/downcity.json<agent>/.env
So the split is:
- Console:
~/.downcity/downcity.db - Agent: project-local
downcity.json/.env
Environment Variable Scope (Important)
Current versions use explicit layers:
- Console-global shared env:
global_env - Agent-private env in DB:
agent_env - Agent-local env overlay:
<agent>/.env(user-managed) - Chat channel credentials:
channel_accounts(bound bydowncity.jsonchannelAccountId) - Chat user authorization:
chat_auth_*structured tables (city-global)
Key behavior:
- Agent env map is
agent_env + <agent>/.env(.envwins). .envremains agent-local and does not mutate globalprocess.env.downcity.jsonstores channel binding (channelAccountId) instead of plaintext secrets.- Bot credentials are resolved from
channel_accounts. - Chat user permissions are resolved from
chat_auth_*tables, not from an agent project. - Plugin parameters are read from project
downcity.json, while plugin enable/disable belongs to Console global state.
Common operations
Initialize Console (writes into downcity.db):
city initRead/update project plugin parameters:
city config get plugins.asr
city config set plugins.asr.modelId '\"SenseVoiceSmall\"'Toggle city-level plugin lifecycle:
city asr on
city asr offManage model pool:
city model list
city model createRelated docs
Process files
These process-state files stay in filesystem (not config):
~/.downcity/main/city.pid~/.downcity/main/city.log~/.downcity/main/console.pid~/.downcity/main/console.log~/.downcity/main/console.json~/.downcity/main/agents.json