How should config changes work?

Currently providers, combos, token savers, and settings live in ~/.janus/config.yaml (static YAML). The dashboard needs to modify these. This is the most important architectural decision for this phase.

A

Store config in SQLite (Recommended)

Providers, combos, token savers, and settings move to SQLite tables. The config.yaml becomes a seed file loaded on first startup, then the DB is the source of truth. Dashboard writes go directly to DB.

Pros: Instant writes, atomic, no file parsing, survives restarts naturally
Cons: Need migration (YAML → DB), can't hand-edit YAML anymore (but can export)
B

Write back to config.yaml

Dashboard reads/writes the YAML file directly. PyYAML serializes changes back to disk on every edit.

Pros: Simple, no migration, stays human-editable
Cons: Race conditions (concurrent edits), ${ENV_VAR} resolution is lost on write-back, no schema enforcement, comments are destroyed
C

Hybrid: DB overrides YAML

Config.yaml stays as-is. Dashboard writes go to SQLite "overrides" tables. At runtime, DB providers/combos are merged with YAML ones (DB takes priority).

Pros: Backward compatible, YAML still works, no migration needed
Cons: Two sources of truth (confusing), merge logic is complex, can't edit YAML-managed items from UI