Skip to main content

Module economics

Module economics 

Source
Expand description

The economics module: token economics, measured, projected. Every capability here is a read of crate::economics — the one calculator — so the command line, HTTP, the OpenAPI document, MCP and the Cockpit show the same metric, value, class and sample count, because none of them computes one.

A repository that declares no benchmark methodology is answered with present: false and the statement that no claim is available, never with an error and never with a number.

use majordomus_cli::capability::builtin::economics::module;
let m = module();
let c = m.capabilities.iter().find(|c| c.capability.id.as_str() == "economics.summary").unwrap();
assert_eq!(c.capability.exposure.http.as_ref().unwrap().path, "/api/v1/economics");
assert_eq!(
    c.capability.exposure.cli.as_ref().unwrap().path,
    vec!["economics".to_string(), "summary".to_string()]
);

Constants§

ECONOMICS_URI
The URI under which the summary is read as an MCP resource.

Functions§

module
The economics module: four read-only capabilities, each a thin call into crate::economics, so no surface computes a metric of its own. The summary, the explanation and the run list are cached per process for five seconds; the claim check is never cached, because a gate that answered from memory could pass prose edited a moment ago.