Files
OmniRoute/bin
Diego Rodrigues de Sa e Souza 569df90fc6 feat(server): headless mode — OMNIROUTE_HEADLESS=1 / serve --headless (rail 3.8.53) (#16079)
* 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.
2026-10-10 09:55:20 -03:00
..
2026-06-29 08:40:06 -03:00
2026-06-29 08:40:06 -03:00
2026-06-29 08:40:06 -03:00
2026-06-29 08:40:06 -03:00
2026-06-29 08:40:06 -03:00