Expand description
GET /v1/capabilities — runtime discovery of what this lean-ctx instance
supports, so any client (any language) can branch on real features instead
of trial calls. The HTTP route lives in http_server; the payload builder
lives here so it stays compiled (and drift-tested) without the
http-server feature.
Contract: docs/contracts/capabilities-contract-v1.md. The set of
TOP_LEVEL_KEYS is the stable contract surface and is bound to that doc
by tests/capabilities_contract_up_to_date.rs.
Not to be confused with crate::core::capabilities, which models RBAC
permissions (fs:read, …). This module describes server capabilities.
Constants§
- LOCAL_
ALWAYS_ ON_ FEATURES - Always-on local capabilities — free, ungated, unconditionally available in every build. The heart of the Local-Free Invariant (RFC §6): these must never depend on an account, license, or plan.
- LOCAL_
OPTIONAL_ FEATURES - Local capabilities that are free but gated by compilation only (Cargo features) — never by account/license/plan.
- TOP_
LEVEL_ KEYS - Stable, documented top-level keys of the capabilities document.
Functions§
- capabilities_
value - Build the capabilities document for this running instance.