Expand description
The plugin↔orchestrator metric contract: the raw tier-1 counts a language
plugin measures for one unit (MetricInputs) and a sub-file unit carrying
them (FunctionUnit).
These are pure data. A plugin’s metric engine produces them; the
orchestrator (code-ranker-graph) consumes them — running the tier-2 CEL
registry from metrics/builtin.toml and writing every metric onto the node.
They live here in the foundation crate so a plugin depends only on this API,
never on the heavier graph/enrichment crate, to hand back its measurements.
Structs§
- Function
Unit - One sub-file unit (a function / method / closure) with its tier-1 counts.
Produced by a language engine’s
compute_functionsfor the optionalfunctionslevel.kindis a free-form, per-language string (fn/method/closure/lambda/ …). - Metric
Inputs - Raw tier-1 counts a per-language engine measures for one unit (a file or, for
the
functionslevel, a function). Every tier-2 metric is a pure function of these, evaluated by the orchestrator’s built-in registry — seecode-ranker-graph’smetrics/builtin.toml.