Expand description
The startup environment report: machine facts for the system prompt,
probed once before the first model call so no turn is spent
rediscovering them. The claw’s daemon writes the same report at boot
(ENVIRONMENT.md); here the report renders straight into the
prompt’s environment section.
Every text the report carries is data: environment.yaml at the
crate root — beside SYSTEM.md — holds the OS name mapping, the probe
inventory, and the report, notice, and unavailable texts as Jinja
templates over the facts this module gathers. The Rust here is
mechanics alone: run the probe, shape the facts, render the
template. The file is baked in (include_str!), not read at
runtime: the report must not turn machine-dependent, and the cloud
frontends have no filesystem to read it from anyway.
The probe is synchronous on purpose — agent construction is sync —
and best-effort: one bash -c under a short budget on a fixed
script, a failure degrading to the unavailable text, never a
failed startup. It describes the host, which is where commands run
unless a sandbox re-points them; a sandboxed session takes
remote_notice instead, because host facts would be lies about a
container. The report’s date is stamped once at construction: it
rides the system prompt, which stays byte-stable for a session’s
life.
Structs§
- Manifest
- The report’s data: the inventory, the OS name mapping, and the texts (Jinja templates) the report renders.
- Probe
- One inventoried tool.
Functions§
- host_
report - The host report: what
bashon this machine, rooted atworkspace, would answer at startup — carryingmodel, the model the session runs, andharness, the frontend assembling it. Never fails: a probe that cannot run renders the unavailable text. - manifest
- The baked-in manifest (
environment.yamlat the crate root), parsed once. A manifest that does not parse falls to [fallback_report]: the drift test is where that break belongs, never a startup. - remote_
notice - The section a sandboxed session renders instead of host facts: the
report’s honesty rule — commands run somewhere a host probe cannot
see, so it claims none and names the kind. The sandbox-side
workspaceis carried — where the model’s commands run is not a host fact.