Interface: AdjudicateInterruptBuilder<TIn, TPayload, THandle, TVerdict, TAdjIn>
Defined in: builders/interrupt-edge-builder.ts:27
Fluent builder for an automated adjudicator interrupt edge (.adjudicateWith(adjudicator, mapInput)).
Configures nested .onInterrupt(...) escalation handlers on the adjudicator, conditional .elevateLeaseWhen(...) sandbox lease grants, and the .resumeWith(...) formatter.
Extends
AstBuilder<AdjudicateInterruptHandlerNode<TIn,TPayload,THandle,TVerdict>>
Type Parameters
Methods
elevateLeaseWhen()
elevateLeaseWhen(predicate, leaseMapper): AdjudicateInterruptBuilder<TIn, TPayload, THandle, TVerdict, TAdjIn>;Defined in: builders/interrupt-edge-builder.ts:63
Conditionally elevates the paused actor's write lease when predicate(input, payload, verdict) returns true.
Applies the LeaseDelta returned by leaseMapper before re-evaluating the parked tool call.
Parameters
| Parameter | Type | Description |
|---|---|---|
predicate | (input, payload, verdict) => boolean | Lease elevation condition. |
leaseMapper | (input, payload, verdict) => LeaseDelta | Lease delta factory. |
Returns
AdjudicateInterruptBuilder<TIn, TPayload, THandle, TVerdict, TAdjIn>
New immutable adjudicate builder.
onInterrupt()
onInterrupt<TSubPayload>(subInterrupt, configure): AdjudicateInterruptBuilder<TIn, TPayload, THandle, TVerdict, TAdjIn>;Defined in: builders/interrupt-edge-builder.ts:46
Registers a nested interrupt handler for interrupts raised while the adjudicator step is executing.
Enables multi-tier escalation (e.g. adjudicator raises normativeEscalation to ask a human).
Type Parameters
| Type Parameter | Description |
|---|---|
TSubPayload | Nested interrupt payload type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
subInterrupt | MaybeBuilder<InterruptNode<TSubPayload>> | Nested interrupt AST node or builder. |
configure | ($sub) => AstBuilder<InterruptHandlerNode<TAdjIn, TSubPayload, THandle>> | Nested interrupt edge configurator. |
Returns
AdjudicateInterruptBuilder<TIn, TPayload, THandle, TVerdict, TAdjIn>
New immutable adjudicate builder.
resumeWith()
resumeWith(formatter): AdjudicateInterruptBuilder<TIn, TPayload, THandle, TVerdict, TAdjIn>;Defined in: builders/interrupt-edge-builder.ts:77
Binds the synchronous formatter producing the resume note injected into the paused actor's tool result.
Required to complete an AdjudicateInterruptHandlerNode.
Parameters
| Parameter | Type | Description |
|---|---|---|
formatter | (input, payload, verdict) => string | Resume note formatter callback. |
Returns
AdjudicateInterruptBuilder<TIn, TPayload, THandle, TVerdict, TAdjIn>
New immutable adjudicate builder.
toAST()
toAST(): AdjudicateInterruptHandlerNode;Defined in: ast/ast-builder.ts:20
Compiles the current builder configuration into a deeply frozen passive AST node.
Validates required builder invariants at compilation time and returns an immutable plain-object AST representation containing zero execution methods.
Returns
AdjudicateInterruptHandlerNode
Deeply frozen passive AST node.