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 Parameter | Default type | Description |
|---|---|---|
THandle | unknown | Runtime handle type of the active isolation scope. |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
abortHook? | readonly | AbortHookASTNode<THandle, Record<string, unknown>> | Optional default abort hook executed when the governed step is aborted or replaced. | ast/policy-node.ts:44 |
clauses | readonly | readonly PolicyGuardClauseNode[] | Ordered list of two-phase guard clauses ('deny-with-error' evaluated before 'raise-interrupt'). | ast/policy-node.ts:34 |
id | readonly | string | Unique identifier of the policy. | ast/policy-node.ts:32 |
maxCostUsd? | readonly | number | Optional maximum cumulative USD cost allowed before tripping onLimitExceeded. | ast/policy-node.ts:40 |
maxDurationSeconds? | readonly | number | Optional maximum cumulative wall-clock duration in seconds allowed before tripping onLimitExceeded. | ast/policy-node.ts:42 |
maxTurns? | readonly | number | Optional maximum LLM generation turns allowed before tripping onLimitExceeded. | ast/policy-node.ts:38 |
onLimitExceeded? | readonly | PolicyLimitExceededConfig<THandle> | Optional epistemic flush and abort sequence triggered when any quantitative limit or tripwire trips. | ast/policy-node.ts:46 |
tripwires | readonly | readonly FsQuotaTripwireNode[] | Domain quota tripwires evaluated post-flight after each allowed tool execution. | ast/policy-node.ts:36 |
type | readonly | "harness:policy" | Discriminant identifying a policy AST node. | ast/policy-node.ts:30 |