mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-11-18 07:58:27 +00:00
* feat(server): headless mode gate for dashboard routes and optional boot subsystems
OMNIROUTE_HEADLESS=1 boots only the proxy engine. A single helper
(src/lib/system/headless.ts) drives two gates:
- route gate in src/proxy.ts: /dashboard, /dashboard/*, /home, /home/*
answer 404 {"error":"dashboard disabled (headless)"} before the authz
pipeline; /v1/*, /api/monitoring/health and /api/auth/* are untouched.
- boot gate in src/instrumentation-node.ts: the optional subsystems of the
background block move into OPTIONAL_BOOT_SUBSYSTEMS, started through
startOptionalBootSubsystems() (skipped as a whole when headless); the
free-proxy sync and cloud sync serial steps use skipInHeadless(). No init
code is removed; proxy-core work (token auto-refresh, cooldown recovery,
context-window reconcile, backup schedule) stays inline in both modes.
* feat(cli): omniroute serve --headless sets OMNIROUTE_HEADLESS=1 on the server
The flag reaches the server process through the same child env that
carries --port (applyHeadlessServeEnv). Headless runs skip the automatic
browser open, print 'Dashboard: disabled (headless)' in the banners, and
reject --tray (the tray exists to open the dashboard). New CLI string
serve.headless added to all 67 CLI locales.
* docs(server): headless mode guide and OMNIROUTE_HEADLESS env reference
docs/guides/HEADLESS.md covers what stays on, what is switched off, curl
checks and limits; linked from docs/README.md and the guides nav. The
variable is documented in .env.example and docs/reference/ENVIRONMENT.md.
* fix(headless): keep the memory subsystems running in headless mode
Memory is cross-cutting to the request pipeline (/v1 injects and queries
memory), so memory-backends and memory-decay-sweep leave the
OPTIONAL_BOOT_SUBSYSTEMS table and return to the inline core boot path in
registerNodejs() (same position as on the base branch), running in both
modes. The test now asserts both stay out of the headless-skipped table and
start inline; HEADLESS.md lists memory as staying on.