G: G4 Drift guard and docs commit the spec and fail tests on drift

This commit is contained in:
ari committed 2026-10-20 15:54:13 -04:00
1 parent 869b6818e9
commit 34a1e1644c
5 files changed
+1986

No files matched your search

+2
View File
@@ -89,6 +89,8 @@ curl -N -H "Authorization: Bearer $TOKEN" 'http://127.0.0.1:1984/api/v1/journal/
Full route table with parameters: [docs/api.md](docs/api.md).
The whole surface is also a generated OpenAPI 3.1 document, [`docs/openapi.json`](docs/openapi.json): `GET /api/v1/openapi.json` serves it (same bearer token), `slinuxm openapi [--peers]` prints it offline without reading any config or token, and `x-mcp-tools` in it lists every MCP tool with its JSON Schema. Regenerate with `cargo run -- openapi --peers > docs/openapi.json`; a test fails if the file is stale.
## MCP
Endpoint: `http://127.0.0.1:1984/mcp` (Streamable HTTP, same bearer token). Eight tools (`list_systemd_units`, `get_systemd_unit`, `list_systemd_timers`, `get_journal_logs`, `tail_journal`, `list_containers`, `get_container`, `get_container_logs`), two prompts, two resources and two resource templates. A [consolidator](#peers-consolidator) adds `list_peers` and `get_peer` and a `peer` argument on every tool, for ten tools. Log content is untrusted data and is labelled as such.