Expand description
The web module: the surfaces this repository exposes over HTTP, answered from the
resolution the process is already serving from.
This is the machine-readable half of the home page, and deliberately not a second
answer: both read ctx.web, which is resolved once per process, and the HTTP router
hands its capability calls a context narrowed to exactly what it serves. Asking this
capability over a served socket therefore describes that server; asking it on the
command line or over a standalone MCP session describes the repository, whose surfaces
carry the availability and the feature that say which process would serve them.
Nothing here knows the name of a surface. A report that a producer generates tomorrow is in this answer the moment it declares itself, and a route that is removed leaves it.
use majordomus_cli::capability::builtin::web::module;
// the module declares its capability once; every projection of it is derived
let m = module();
let c = m.capabilities.iter().find(|c| c.capability.id.as_str() == "web.surfaces").unwrap();
assert_eq!(c.capability.exposure.http.as_ref().unwrap().path, "/api/v1/web/surfaces");
assert_eq!(c.capability.exposure.mcp.as_ref().unwrap().tool.as_deref(), Some("majordomus_web_surfaces"));Structs§
- Surface
Report - The web surfaces of this repository, as the process that answers resolved them.
Constants§
- SURFACES_
URI - The URI under which the topology is read as an MCP resource.
Functions§
- module
- The module.