Skip to content

Interface: ChildInterruptHandlerBuilder<TPayload> ​

Defined in: builders/child-interrupt-handler-builder.ts:12

Fluent builder for upward child-interrupt handlers declared on a parent agent (.onChildInterrupt(interrupt, $intr => ...)).

Configures optional partition-scoped sibling fork pausing and suspends the raising child fork's continuation stack to return a SUSPENDED_ON_INTERRUPT result to the parent agent.

Extends ​

Type Parameters ​

Type ParameterDefault typeDescription
TPayloadunknownInterrupt payload type validated by interrupt.schema.

Methods ​

pauseSiblingForksInPartitions() ​

ts
pauseSiblingForksInPartitions(mapper): ChildInterruptHandlerBuilder<TPayload>;

Defined in: builders/child-interrupt-handler-builder.ts:23

Specifies a synchronous mapper returning partition IDs whose concurrent sibling forks must pause at the turn-batch barrier.

Prevents sibling forks in affected partitions from continuing over stale assumptions while the parent resolves the interrupt.

Parameters ​

ParameterTypeDescription
mapper(payload) => readonly string[]Partition ID extractor from the interrupt payload.

Returns ​

ChildInterruptHandlerBuilder<TPayload>

New immutable child interrupt builder.


suspendAndReturnToParent() ​

ts
suspendAndReturnToParent(): ChildInterruptHandlerBuilder<TPayload>;

Defined in: builders/child-interrupt-handler-builder.ts:34

Suspends the raising child fork's continuation stack and returns a SUSPENDED_ON_INTERRUPT tool_result to the parent timeline.

Allows the parent agent to inspect the interrupt payload and resume the suspended fork via resumeFork.

Returns ​

ChildInterruptHandlerBuilder<TPayload>

New immutable child interrupt builder.


toAST() ​

ts
toAST(): ChildInterruptHandlerNode;

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 ​

ChildInterruptHandlerNode

Deeply frozen passive AST node.

Inherited from ​

AstBuilder.toAST

Released under the MIT License.