# `ASM.Execution.PolicyPlug`
[🔗](https://github.com/nshkrdotcom/agent_session_manager/blob/v0.15.0/lib/asm/execution/policy_plug.ex#L1)

Enforces an `allowed_tools` allowlist against `:tool_use` events.

Enforcement depends on the lane, because a `:tool_use` event does not mean
the same thing on every one of them.

A lane that declares `:host_tools` delegates tool execution to the host. Its
`:tool_use` event is therefore a decision point before execution, and blocking
there prevents the action.

A lane without it owns tool execution inside its provider process. Even when
it advertises approvals, this pipeline has no host callback that can deny the
call; raising on the observed event cannot provide the promised enforcement
and can only kill a run. On those lanes a non-matching tool is recorded on the
event and in telemetry, and the run continues.

With no `:lane_capabilities` option this records rather than manufacturing an
enforcement guarantee. Blocking requires positive `:host_tools` evidence.

# `enforcement_for`

```elixir
@spec enforcement_for([atom()]) :: :block | :record
```

Whether a lane with these capabilities can prevent a tool call or only
observe it.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
