Skip to content

Function: evaluateQuotaTripwires() ​

ts
function evaluateQuotaTripwires<THandle>(
   policy, 
   input, 
   ctx
): Promise<QuotaTripwireEvaluationResult>;

Defined in: runtime/policy/evaluate-policy-guards.ts:134

Evaluates all QuotaTripwireASTNode instances on policy after a tool execution (SPEC.md §3.5).

Returns the first tripped quota tripwire result, or { tripped: false } when all tripwires pass.

Type Parameters ​

Type ParameterDefault typeDescription
THandleunknownRuntime handle type of the active isolation scope.

Parameters ​

ParameterTypeDescription
policyPolicyNode<THandle> | undefinedActive policy AST node.
inputQuotaTripwireEvaluationInputAccumulated and newly observed tool effects.
ctxStepExecutionContext<THandle>Step execution context.

Returns ​

Promise<QuotaTripwireEvaluationResult>

Tripwire evaluation result.

Released under the MIT License.