pub trait ActionPlugin: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn execute(
&self,
action: &Action,
ctx: &ExecCtx<'_>,
) -> Result<ExecStep, ExecError>;
}Expand description
Uniform registration surface for every Tier-1 action.
Implementations MUST be Send + Sync so the registry can be threaded
across executor threads without interior locking. execute takes the
parsed Action (not a serde_json::Value): the parse step in
grex-core::pack has already validated shape + invariants, and the
executors that will consume this trait in M4-B already own a typed
&Action. Taking the typed form keeps the trait zero-cost at the
boundary and defers the “raw Value for external plugins” form to the
dylib / WASM work in M5+.
Required Methods§
Sourcefn name(&self) -> &str
fn name(&self) -> &str
Short kebab-case name matching the YAML key and Action::name.
Used as the key inside Registry.