Skip to main content

Module graph

Module graph 

Source
Expand description

Node-graph policy engine: compiles YAML-declared policies into executable pipelines and validates their structure.

A policy is a directed graph of plugin nodes connected by edges written as from: node_id.port / to: node_id.port (ports: out, success, error, in). Policies referencing supernodes are inlined by expand_policy before compilation. compile_policy produces a CompiledGraph that the data-plane executes per request; validate_policy checks structure first.

Re-exportsยง

pub use engine::compile_policy;
pub use engine::CompiledGraph;
pub use expand::expand_policy;
pub use prepare::prepare_policy;
pub use validation::validate_policy;
pub use validation::validate_supernode;

Modulesยง

engine ๐Ÿ”’
Policy compilation and graph execution.
expand ๐Ÿ”’
Compile-time expansion of supernode instances into flat policies.
prepare ๐Ÿ”’
The pre-compile pipeline shared by the sandbox, the MCP validate_policy tool and config apply: structural validation, config_ref resolution and supernode expansion, in that order.
validation ๐Ÿ”’
Structural validation of policy node graphs, run before compilation (e.g. at config load and on Admin API writes) so malformed policies are rejected with actionable messages instead of failing at request time.