Skip to main content

Module layout

Module layout 

Source
Expand description

The layout module: the boundary between the layer’s two halves, checked against the layouts their contracts declare (I2871, I1102).

One capability, layout.check, and it is a gate: a path a contract excludes is a finding that names the path and the contract. The judgement lives in crate::layout; this module declares it once and every projection — the command line, MCP, HTTP, the benchmark — is derived from the declaration. directories answers what a contract says; this answers whether the tree keeps it.

use majordomus_cli::capability::builtin::modules;
let m = modules().into_iter().find(|m| m.id.as_str() == "layout").unwrap();
let c = &m.capabilities[0].capability;
assert_eq!(c.id.as_str(), "layout.check");
assert_eq!(c.exposure.cli.as_ref().unwrap().path, ["layout", "check"]);

Functions§

module
The layout module: the one capability that judges where an artifact lives against the layout each contract declares, composed into the registry by builtin::modules.