From d6b208342edf97bafa5b1dcc986b782f9879d141 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Thu, 21 May 2026 17:30:08 +0900 Subject: feat: SQLite database for all credentials, keys, wake schedule, and usage cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- bin/up-backend | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bin/up-backend') diff --git a/bin/up-backend b/bin/up-backend index 722e5eb..894fc01 100755 --- a/bin/up-backend +++ b/bin/up-backend @@ -10,6 +10,12 @@ PROJECT_DIR="$(dirname "$SCRIPT_DIR")" # Load secrets from gopass OPENCODE_API_KEY="$(gopass show -o projects/ai-api/opencode_go_key)" +# Pass host user identity so the container runs as the same UID/GID +export HOST_UID="$(id -u)" +export HOST_GID="$(id -g)" +export HOST_USER="$(whoami)" + # Start API service only -sudo OPENCODE_API_KEY="$OPENCODE_API_KEY" \ +sudo -E OPENCODE_API_KEY="$OPENCODE_API_KEY" \ + HOST_UID="$HOST_UID" HOST_GID="$HOST_GID" HOST_USER="$HOST_USER" \ docker compose -f "$PROJECT_DIR/docker-compose.yml" up api "$@" -- cgit v1.2.3