Interface: InterruptBuilder<TPayload>
Defined in: ast/interrupt-builder.ts:13
Immutable fluent builder and property projection for InterruptNode.
Exposes id, type, and schema directly on the builder instance so adjudicator input schemas and union schemas can reference interrupt.schema directly.
Extends
AstBuilder<InterruptNode<TPayload>>
Extended by
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TPayload | unknown | Validated output type of the interrupt payload schema. |
Methods
payload()
payload<TNext>(schema): InterruptBuilder<TNext>;Defined in: ast/interrupt-builder.ts:33
Binds a new Zod payload schema to the interrupt definition, returning a strongly typed builder clone.
Preserves the interrupt id while replacing schema on a newly frozen copy-on-write InterruptBuilder<TNext> instance.
Type Parameters
| Type Parameter | Description |
|---|---|
TNext | Validated output type of schema. |
Parameters
| Parameter | Type | Description |
|---|---|---|
schema | ZodType<TNext> | Zod schema governing raised interrupt payloads. |
Returns
InterruptBuilder<TNext>
New immutable InterruptBuilder typed to TNext.
toAST()
toAST(): InterruptNode;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.
Inherited from
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
id | readonly | string | Unique logical identifier of the interrupt. | ast/interrupt-builder.ts:17 |
schema | readonly | ZodType<TPayload> | Zod schema used to validate payloads raised with this interrupt. | ast/interrupt-builder.ts:19 |
type | readonly | "harness:interrupt" | Discriminant identifying a core interrupt definition node. | ast/interrupt-builder.ts:15 |