pub fn create_plugin(
node_type: &str,
config: &HashMap<String, Value>,
resources: &Arc<PluginResources>,
) -> Result<Box<dyn Plugin>, String>Expand description
Creates a plugin instance from a node type string and its YAML-derived config.
This is the single factory for all node types: the graph compiler calls it
for every node in a policy, so adding a new node type means adding exactly
one match arm here. resources hands plugins process-wide services
(PluginResources); constructors that need them take the handle in
from_config. Returns an error string for unknown node types or when
a plugin’s from_config rejects its configuration (surfaced at config load,
not at request time).