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
AstBuilder<ChildInterruptHandlerNode<TPayload>>
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TPayload | unknown | Interrupt payload type validated by interrupt.schema. |
Methods
pauseSiblingForksInPartitions()
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
| Parameter | Type | Description |
|---|---|---|
mapper | (payload) => readonly string[] | Partition ID extractor from the interrupt payload. |
Returns
ChildInterruptHandlerBuilder<TPayload>
New immutable child interrupt builder.
suspendAndReturnToParent()
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()
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
Deeply frozen passive AST node.