Skip to main content

Module environment

Module environment 

Source
Expand description

The environment module: what this checkout is, as a capability.

One capability, one handler, and every surface a projection of it — the MCP tool and resource, the HTTP route, the OpenAPI operation, the Cockpit page and the command line all answer with the value crate::environment::resolve() built. The direnv banner is the same value rendered for a terminal.

The handler runs inside a process that already holds the index, so it resolves in full: nothing here pays the index build, because whoever called it had already paid it. The fast, cached resolution belongs to the command line, which may be starting cold on a shell prompt.

Structs§

EnvironmentInput
What to include in the snapshot.
EnvironmentProvenance
Where the values of one snapshot came from.
ExplainInput
Which field’s provenance to explain.
PreflightInput
What a served preflight may cost.

Constants§

ENVIRONMENT_URI
The URI under which the environment is read as an MCP resource.
PREFLIGHT_URI
The URI under which the preflight is read as an MCP resource.

Functions§

module
The module.