Nous.Plugins.DecisionGuard.Pack for the tool-call surface
(:pre_tool_use): is this call something the user's task did not ask for,
and could it do damage?
Modelled on LlamaFirewall's AlignmentCheck: only calls that have a real effect and are unrelated to the task count as misaligned ("when in doubt, not misaligned"). The model sees the task and the call, never the agent's reasoning.
Provisional bands
These bands come from an 8-item probe per surface on Clef-Flash (4 benign, 4 malicious), not a benchmark. Re-tune them on your own traffic before relying on them.
Questions (all :noul, true = risky)
| id | band (allow below / deny at) |
|---|---|
off_task | 0.50 / 0.90 |
exfiltration | 0.30 / 0.80 |
destructive | 0.30 / 0.98 |
credential_access | 0.30 / 0.85 |
security_weakening | 0.25 / 0.85 |
destructive alone only escalates (it cannot tell a requested deletion
from an injected one; 0.98 is a catastrophe stop). combine/2 denies when
destructive >= 0.30 and off_task >= 0.50: an off-task destructive
call. An on-task destructive call stays an escalation, which on
:pre_tool_use reaches the run's approval handler.
State
%{"surface" => "tool_call", "task" => "...",
"tool" => %{"category" => ..., "description" => ..., "name" => ...},
"untrusted_content" => "<the call's arguments as JSON>"}The arguments are model-generated (possibly injection-steered), so they are the untrusted field and the one that is chunked.