PermissionDecision
Interface: PermissionDecision
Defined in: src/adapters/types.ts:371
Properties
gateId?
readonlyoptionalgateId?:string
Defined in: src/adapters/types.ts:386
policyRuleId?
readonlyoptionalpolicyRuleId?:string
Defined in: src/adapters/types.ts:384
rationale?
readonlyoptionalrationale?:string
Defined in: src/adapters/types.ts:385
reason?
readonlyoptionalreason?:string
Defined in: src/adapters/types.ts:393
v2.12 — telemetry tag (machine-readable, stable across versions).
Surfaces on agentfootprint.permission.halt.reason for routing
alerts (e.g. 'security:exfiltration' → PagerDuty,
'cost:context-bloat' → Slack channel).
result
readonlyresult:"allow"|"deny"|"halt"|"gate_open"
Defined in: src/adapters/types.ts:383
v2.12 — 'halt' is NEW. Terminates the run cleanly with a typed
PolicyHaltError. The framework writes a synthetic tool_result
(using tellLLM) to scope.history BEFORE throwing, so:
• Anthropic / OpenAI tool_use ↔ tool_result pairing is satisfied
• The conversation history is consistent for resumeOnError
• Lens / getNarrative() shows what the LLM was told
'deny' keeps existing semantics: synthetic tool_result + LLM
continues and can pick differently.
tellLLM?
readonlyoptionaltellLLM?:string
Defined in: src/adapters/types.ts:400
v2.12 — content delivered to the LLM as the synthetic tool_result
on 'deny' and 'halt'. When omitted, defaults to a deliberately
generic "Tool '${name}' is not available in this context." —
NEVER falls back to reason (which is telemetry, not user-facing).
