Skip to content

Interface: DenyWithErrorPolicyGuardClauseNode ​

Defined in: ast/deny-with-error-policy-guard-clause-node.ts:10

Guard clause node that blocks unauthorized tool calls in-band with an isError: true tool result.

Formats the blocked PolicyViolation via messageMapper (or a default diagnostic message) without halting the turn loop.

Extends ​

Properties ​

PropertyModifierTypeDescriptionOverridesDefined in
guardsreadonlyreadonly PolicyGuardASTNode[]Guard AST nodes evaluated by this clause.-ast/deny-with-error-policy-guard-clause-node.ts:16
idreadonlystringDeterministic clause identifier ("${policyId}:clause:${index}").-ast/deny-with-error-policy-guard-clause-node.ts:14
messageMapper?readonly(violation) => stringOptional custom formatter producing the in-band error message returned to the model.-ast/deny-with-error-policy-guard-clause-node.ts:20
modereadonly"deny-with-error"In-band error denial mode.-ast/deny-with-error-policy-guard-clause-node.ts:18
typereadonly"harness:policy-guard-clause"Discriminant identifying a policy guard clause AST node.ASTNode.typeast/deny-with-error-policy-guard-clause-node.ts:12

Released under the MIT License.