diff options
| author | Adam Malczewski <[email protected]> | 2026-05-21 17:30:08 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-05-21 17:30:08 +0900 |
| commit | d6b208342edf97bafa5b1dcc986b782f9879d141 (patch) | |
| tree | c6d8f9bffa86f78e3b1369b811bef9642df788d0 /dispatch.toml | |
| parent | 1f309ccca20aabbd0ee3fb8fbb3c8192124edd95 (diff) | |
| download | dispatch-d6b208342edf97bafa5b1dcc986b782f9879d141.tar.gz dispatch-d6b208342edf97bafa5b1dcc986b782f9879d141.zip | |
feat: SQLite database for all credentials, keys, wake schedule, and usage cache
- Add SQLite database at ~/.local/share/dispatch/dispatch.db with tables: credentials, api_keys, wake_schedule, usage_cache
- Store Claude OAuth credentials in DB with import button in Model Status UI
- Store OpenCode/Copilot API keys in DB with paste-to-import modal
- Store OpenCode cookie and workspace IDs in DB
- Migrate wake schedule from .wake-schedule.json to DB
- Migrate usage cache from in-memory Map + localStorage to DB
- Remove all env var and file fallbacks — DB is the single source of truth
- Add seed scripts: bin/import-credentials.ts, bin/seed-opencode-keys.ts
- Docker: container runs as host UID/GID with matching home directory
- Clean up dispatch.toml: remove env fields, update comments
- Progress bar time markers for usage cycle tracking
Diffstat (limited to 'dispatch.toml')
| -rw-r--r-- | dispatch.toml | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/dispatch.toml b/dispatch.toml index 7e6fa5a..6789e95 100644 --- a/dispatch.toml +++ b/dispatch.toml @@ -1,11 +1,8 @@ # Dispatch — Model & Key Configuration -# Keys reference env var names in .env.dispatch +# Credentials and API keys are stored in the SQLite database. +# Use the Model Status panel to import credentials, or run bin/import-credentials.ts. # ─── Fallback Order (highest priority first) ──────────────────── -# Exhaust claude-max first, then opencode-1, then opencode-2, then copilot. -# When all keys are exhausted the agent enters wait-for-refresh. -# Must be declared BEFORE any [[keys]] / [[models]] blocks. - fallback = ["claude-pro", "claude-max", "opencode-1", "opencode-2", "copilot"] # ─── API Keys ─────────────────────────────────────────────────── @@ -14,30 +11,27 @@ fallback = ["claude-pro", "claude-max", "opencode-1", "opencode-2", "copilot"] id = "claude-pro" provider = "anthropic" base_url = "https://api.anthropic.com/v1" -credentials_file = "/root/.claude/.credentials-1.json" +credentials_file = "/home/tradam/.claude/.credentials-1.json" [[keys]] id = "claude-max" provider = "anthropic" base_url = "https://api.anthropic.com/v1" -credentials_file = "/root/.claude/.credentials-2.json" +credentials_file = "/home/tradam/.claude/.credentials-2.json" [[keys]] id = "opencode-1" provider = "opencode-go" -env = "OPENCODE_KEY_1" base_url = "https://opencode.ai/zen/go/v1" [[keys]] id = "opencode-2" provider = "opencode-go" -env = "OPENCODE_KEY_2" base_url = "https://opencode.ai/zen/go/v1" [[keys]] id = "copilot" provider = "github-copilot" -env = "COPILOT_TOKEN" base_url = "https://api.githubcopilot.com" # ─── Models ───────────────────────────────────────────────────── |
