Configuration
Env and downcity.db Design
Explain how env, channel accounts, model pool, and project plugin config are separated
Env and downcity.db Design
Use one rule:
- shared secrets and shared infrastructure live in
~/.downcity/downcity.db - project behavior lives in
downcity.json
downcity.db owns
env_entrieschannel_accountschat_auth_roleschat_auth_role_permissionschat_auth_channel_defaultschat_auth_user_rolesmodel_providersmodels- other console-owned encrypted settings
Project downcity.json owns
model.primaryservices.*plugins.*
Why
- secrets should not be duplicated into project config
- plugin enablement and plugin-owned dependency config are project behavior
- console storage should not hide project-specific plugin state
Runtime load order
- read global env from
downcity.db - read agent-private env from
downcity.db - read project
.env - read project
downcity.json - resolve
plugins.* - resolve channel credentials, chat authorization rules, and model pool from
downcity.db