refactor: introduce OpenCodeSupervisor for server lifecycle management (#200)

Replace direct opencodeServerManager calls with a supervisor that
provides health polling, operation locking, and a 4-step recovery
pipeline (restart, debug capture, rollback, seed default config).

Add archiveBrokenConfig to SettingsService for backup before rollback.
Wire supervisor into all route factories with graceful fallback to
direct manager calls. Add health watch configuration defaults and
env vars.
This commit is contained in:
Chris Scott authored and GitHub committed 2026-04-25 19:02:47 -04:00
1 parent 1212e6c6fb
commit 3dd8e34f98
13 files changed
+915 -111

No files matched your search

+3
View File
@@ -14,6 +14,9 @@ export const DEFAULTS = {
PORT: 5551,
HOST: '127.0.0.1',
PUBLIC_URL: '', // Optional: public URL for OAuth callbacks (e.g., https://mydomain.com)
HEALTH_WATCH_ENABLED: true,
HEALTH_POLL_MS: 30000,
HEALTH_FAILURE_THRESHOLD: 2,
},
DATABASE: {