openclaw/docs/gateway
Gio Della-Libera 9a5f2f61e7
Doctor: add health-check contract and --lint validation (#80055)
* feat(doctor): add --lint mode + structured HealthFinding shape

Adds the core machinery for `openclaw doctor --lint` per the
doctor-lint-and-oc-rules upstream proposal. PR-1 of the proposal:
no new top-level verb, no public plugin SDK; everything internal.

Files:
- src/flows/checks.ts ? HealthFinding / HealthCheck / HealthCheckContext
   types. Findings carry severity per-finding; checks return
   readonly HealthFinding[]. Mode tag (doctor/lint/fix) lets a check
   distinguish the calling posture.
- src/flows/health-check-registry.ts ? module-level registry with
   duplicate-id rejection + test reset helper.
- src/flows/doctor-lint-flow.ts ? runner over registered checks.
   Catches throws into synthetic error findings (anchored at check id;
   message scrubbed of control chars, capped at 256 bytes). Sorts
   findings by severity desc, check id, path. Exports
   exitCodeFromFindings (1 if any warning/error, 0 otherwise).
- src/flows/doctor-core-checks.ts ? 4 modern HealthChecks rewriting
   logic from existing legacy run*Health functions:
     core/doctor/gateway-config            (warning)
     core/doctor/command-owner             (info)
     core/doctor/workspace-status          (info)
     core/doctor/final-config-validation   (error)
   Each was audited safe per the proposal's adapter constraints
   (no writes, no repair calls, no prompts, no probes incl. local-bind).
   Legacy run*Health contributions in doctor-health-contributions.ts
   are unchanged ? doctor mode (no --lint) still runs the existing 35.
- src/commands/doctor-lint.ts ? CLI dispatch for --lint. Reads config
   snapshot, builds HealthCheckContext (mode: "lint"), runs the registry,
   filters by --severity-min, emits human or JSON output, returns exit
   code from unfiltered set so --severity-min hides info findings
   without changing CI signal.
- src/cli/program/register.maintenance.ts ? adds --lint, --json,
   --severity-min, --skip, --only flags to existing doctor command.
   --lint branches to runDoctorLintCli; without --lint, doctor runs
   unchanged.

LoC: 382 src across 6 files. Tests + doc + oc-path-side rule packs
follow as separate commits on this branch.

* fix: avoid string spread in doctor errors

* chore: refresh plugin SDK API baseline

* docs: clarify doctor lint usage

* feat(doctor): prepare repairs for dry-run reporting
2026-05-17 12:29:57 -07:00
..
security feat: add native mac dashboard window 2026-05-16 23:49:18 +01:00
authentication.md Fix gateway auth logout aborting active runs (#82346) 2026-05-15 18:36:49 -05:00
background-process.md feat(process): show input-wait hints in log and poll 2026-05-10 04:13:07 -04:00
bonjour.md fix(gateway): honor minimal discovery mode for wide-area DNS-SD [AI] (#80903) 2026-05-12 16:03:50 +05:30
bridge-protocol.md refactor: move canvas to plugin surfaces 2026-05-07 09:07:18 +01:00
cli-backends.md Remove codex-cli backend and migrate to Codex runtime 2026-05-14 10:07:18 +01:00
config-agents.md fix: update PI runtime packages 2026-05-17 06:12:09 +01:00
config-channels.md fix: improve progress draft truncation 2026-05-17 08:13:39 +01:00
config-tools.md fix: update PI runtime packages 2026-05-17 06:12:09 +01:00
configuration-examples.md refactor: move inbound event classification into core 2026-05-17 00:10:29 +01:00
configuration-reference.md feat: add native mac dashboard window 2026-05-16 23:49:18 +01:00
configuration.md refactor: move inbound event classification into core 2026-05-17 00:10:29 +01:00
diagnostics.md fix(gateway): capture opt-in memory pressure snapshots (#82674) 2026-05-16 21:52:09 +01:00
discovery.md docs: typography hygiene + 2 in-body H1 removals across 5 pages 2026-05-05 21:01:44 -07:00
doctor.md Doctor: add health-check contract and --lint validation (#80055) 2026-05-17 12:29:57 -07:00
gateway-lock.md Revert "refactor: move runtime state to SQLite" 2026-05-13 13:33:38 +01:00
health.md fix(gateway): capture opt-in memory pressure snapshots (#82674) 2026-05-16 21:52:09 +01:00
heartbeat.md fix(heartbeat): multi-agent cadence — parallel broadcast, per-agent busy check, prompt assembly, connect-timeout, doctor warning (#80470) 2026-05-12 14:36:25 -07:00
index.md fix(webchat): show manual compaction progress 2026-05-16 13:58:44 +01:00
local-model-services.md docs: add ds4 provider guide 2026-05-13 14:45:34 +01:00
local-models.md fix: clarify provider timeout ceiling 2026-05-16 01:08:07 +01:00
logging.md Revert "refactor: move runtime state to SQLite" 2026-05-13 13:33:38 +01:00
multiple-gateways.md docs: full-page sentence-case sweep across 5 worst-offender pages 2026-04-26 23:58:35 -07:00
network-model.md docs: consolidate moved docs pages 2026-05-05 17:38:21 +01:00
openai-http-api.md fix(gateway): allow trusted-proxy local-direct password fallback (#82953) 2026-05-17 01:35:59 -05:00
openresponses-http-api.md fix(gateway): allow trusted-proxy local-direct password fallback (#82953) 2026-05-17 01:35:59 -05:00
openshell.md build: externalize slack openshell vertex plugins 2026-05-14 07:46:58 +01:00
opentelemetry.md fix: shorten stalled Codex recovery window 2026-05-15 10:19:37 +01:00
operator-scopes.md fix(cli): retry admin device approval after ownership denial 2026-05-04 00:41:55 +01:00
pairing.md fix(gateway): allow trusted-proxy local-direct password fallback (#82953) 2026-05-17 01:35:59 -05:00
prometheus.md fix(diagnostics): export Talk metrics after SDK refactor 2026-05-06 02:01:52 -07:00
protocol.md fix(gateway): restore v4 message action protocol 2026-05-17 06:35:39 +01:00
remote-gateway-readme.md docs: sentence-case sweep across 4 more pages 2026-04-27 00:01:52 -07:00
remote.md feat: add native mac dashboard window 2026-05-16 23:49:18 +01:00
sandbox-vs-tool-policy-vs-elevated.md Clarify exec filesystem policy drift (#79153) 2026-05-07 20:05:19 -05:00
sandboxing.md fix(sandbox): honor explicit docker env (#82763) 2026-05-16 17:36:05 -05:00
secrets-plan-contract.md Revert "refactor: move runtime state to SQLite" 2026-05-13 13:33:38 +01:00
secrets.md fix(secrets): treat env refs as audit-safe auth values 2026-05-17 00:05:10 +01:00
tailscale.md fix(gateway): preserve external Tailscale Funnel routes in serve mode 2026-05-08 09:28:51 -04:00
tools-invoke-http-api.md fix(gateway): allow trusted-proxy local-direct password fallback (#82953) 2026-05-17 01:35:59 -05:00
troubleshooting.md fix: improve gateway protocol mismatch diagnostics (#82908) 2026-05-17 06:33:34 +01:00
trusted-proxy-auth.md fix(gateway): allow trusted-proxy local-direct password fallback (#82953) 2026-05-17 01:35:59 -05:00