Skip to content

Interface: PolicyNode<THandle> ​

Defined in: ast/policy-node.ts:28

Passive AST node representing a capability and sandbox policy (P.policy(id)).

Governs pre-flight and post-flight tool guard evaluation, quantitative turn/cost/duration/tripwire ceilings, and deterministic scope cleanup hooks.

Type Parameters ​

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

Properties ​

PropertyModifierTypeDescriptionDefined in
abortHook?readonlyAbortHookASTNode<THandle, Record<string, unknown>>Optional default abort hook executed when the governed step is aborted or replaced.ast/policy-node.ts:44
clausesreadonlyreadonly PolicyGuardClauseNode[]Ordered list of two-phase guard clauses ('deny-with-error' evaluated before 'raise-interrupt').ast/policy-node.ts:34
idreadonlystringUnique identifier of the policy.ast/policy-node.ts:32
maxCostUsd?readonlynumberOptional maximum cumulative USD cost allowed before tripping onLimitExceeded.ast/policy-node.ts:40
maxDurationSeconds?readonlynumberOptional maximum cumulative wall-clock duration in seconds allowed before tripping onLimitExceeded.ast/policy-node.ts:42
maxTurns?readonlynumberOptional maximum LLM generation turns allowed before tripping onLimitExceeded.ast/policy-node.ts:38
onLimitExceeded?readonlyPolicyLimitExceededConfig<THandle>Optional epistemic flush and abort sequence triggered when any quantitative limit or tripwire trips.ast/policy-node.ts:46
tripwiresreadonlyreadonly FsQuotaTripwireNode[]Domain quota tripwires evaluated post-flight after each allowed tool execution.ast/policy-node.ts:36
typereadonly"harness:policy"Discriminant identifying a policy AST node.ast/policy-node.ts:30

Released under the MIT License.