Verdict
agent_gate.verdict
¶
Verdicts and how they combine.
A verdict is pass (say nothing, leave the call to Claude Code's normal
permission flow), ask (a person must confirm) or deny. There is no
allow: the gate can only make the flow stricter.
Verdict(decision, law=None, reason='', layer='rules')
dataclass
¶
The gate's answer for one action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
decision
|
Decision
|
|
required |
law
|
int | None
|
the law that decided it, 1-5, or |
None
|
reason
|
str
|
one sentence; shown to the agent on deny, to the person on ask. |
''
|
layer
|
str
|
which layer decided: |
'rules'
|
strictest(*verdicts)
¶
Return the strictest verdict; the first wins a tie.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
verdicts
|
Verdict
|
one or more verdicts. |
()
|
Source code in src/agent_gate/verdict.py
37 38 39 40 41 42 43 44 45 46 | |