Action Gating¶
action_gating — mvp.action_gating
Cluster: Uncategorised | Type: component | MCP Tools: None
Overview¶
Action gating block that normalizes proposed actions into an ActionCapsule, classifies reversibility and impact, models material scenarios, builds mitigation and uncertainty records, surfaces degraded assurance, and returns an auditable GateDecision before high-risk execution. It preserves the legacy motor_control input/output contract while adding structured gate data to metadata and explicit MCP helper tools.
When to use:
- Gating software actions that have irreversible, external, real-world, or unknown-risk side effects
- Inspecting likely consequences, unresolved uncertainty, and mitigation requirements before action
- Running
safety_checkagainst registered primitive risk thresholds while receiving structured gate metadata - Discovering whether scenario modelling, audit logging, native ops, and safety guards are degraded
Example:
from mvp.action_gating import ActionGatingBlock, ActionGatingInput
block = ActionGatingBlock()
result = block.infer(ActionGatingInput(op="safety_check", action_type="send_email"))
# Legacy verdict remains available:
# result.value.safety_approved: bool; result.value.safety_reason: str
# Structured gate data is additive:
# result.value.metadata["action_capsule"]; result.value.metadata["gate_decision"]
Legacy op set (17): execute_action, plan_action, set_impedance, get_impedance, adjust_impedance, add_primitive, list_primitives, get_motor_memory, record_action, safety_check, batch_approve, get_safe_state, enter_safe_state, get_info, reset, ops, help.
MCP helper tools include capability discovery, evaluation, risk explanation, Rumsfeld matrix generation, mitigation planning, confirmation, gate-token issuance, audit, and constrained native op discovery/dry-run/evaluate/execute.
Works well with: align_csf, motor_control, emergency (kill switch)
Public API¶
ActionGatingBlock(MotorControlBlock)¶
Preferred entry point for motor control safety gating.
Methods:
infer(data: MotorControlInput) -> Result[MotorControlOutput]¶
Dependencies¶
mvp.motor_control