Skip to content

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 ​

Type Parameters ​

Type ParameterDefault typeDescription
TInunknownEnclosing step or actor input payload type.
TPayloadunknownValidated interrupt payload type.
THandleunknownRuntime handle type of the active isolation scope.
TVerdictunknownValidated adjudicator output verdict type.
TAdjInunknownAdjudicator input payload type preserved for nested .onInterrupt(...) handlers.

Methods ​

elevateLeaseWhen() ​

ts
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 ​

ParameterTypeDescription
predicate(input, payload, verdict) => booleanLease elevation condition.
leaseMapper(input, payload, verdict) => LeaseDeltaLease delta factory.

Returns ​

AdjudicateInterruptBuilder<TIn, TPayload, THandle, TVerdict, TAdjIn>

New immutable adjudicate builder.


onInterrupt() ​

ts
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 ParameterDescription
TSubPayloadNested interrupt payload type.

Parameters ​

ParameterTypeDescription
subInterruptMaybeBuilder<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() ​

ts
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 ​

ParameterTypeDescription
formatter(input, payload, verdict) => stringResume note formatter callback.

Returns ​

AdjudicateInterruptBuilder<TIn, TPayload, THandle, TVerdict, TAdjIn>

New immutable adjudicate builder.


toAST() ​

ts
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.

Inherited from ​

AstBuilder.toAST

Released under the MIT License.