Interface: HumanBuilder<TMode>
Defined in: builders/human-builder.ts:15
Fluent builder for external human authorities and notification channels (P.human(id)).
Tracks the channel interaction mode ('bidirectional' | 'notify-only') at the type level so .ask(), .escalate(), and .maxCostUsd() reject notify-only channels.
Extends
AstBuilder<HumanNode<TMode>>
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TMode extends "bidirectional" | "notify-only" | "bidirectional" | "notify-only" | Interaction mode of the bound channel ('bidirectional' | 'notify-only'). |
Methods
keepAliveSeconds()
keepAliveSeconds(seconds): HumanBuilder<TMode>;Defined in: builders/human-builder.ts:30
Sets the keep-alive duration in seconds before yielding a concurrency slot while awaiting a human decision.
When a human response takes longer than seconds, the runtime checkpoints and releases the active slot.
Parameters
| Parameter | Type | Description |
|---|---|---|
seconds | number | Positive keep-alive duration in seconds. |
Returns
HumanBuilder<TMode>
New immutable human builder.
notify()
notify<TNextMode>(channel): HumanBuilder<TNextMode>;Defined in: builders/human-builder.ts:43
Binds the underlying HumanChannelASTNode (slack.bot(...) or slack.webhook(...)) used to reach the human.
Narrows the builder's TMode type parameter to the channel's interactionMode.
Type Parameters
| Type Parameter | Description |
|---|---|
TNextMode extends "bidirectional" | "notify-only" | Interaction mode of channel ('bidirectional' | 'notify-only'). |
Parameters
| Parameter | Type | Description |
|---|---|---|
channel | MaybeBuilder<HumanChannelASTNode<TNextMode>> | Human channel AST node or builder. |
Returns
HumanBuilder<TNextMode>
New immutable human builder narrowed to TNextMode.
toAST()
toAST(): HumanNode;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
withName()
withName(alias): ScopedHumanNameBuilder;Defined in: builders/human-builder.ts:56
Creates a role-aliased human target builder (human.withName(alias).output(schema)).
Used to bind a named decision role and response schema to a bidirectional human authority.
Parameters
| Parameter | Type | Description |
|---|---|---|
alias | string | Role alias for the decision target (e.g. 'budget-approver'). |
Returns
Intermediate builder requiring .output(schema).
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
id | readonly | string | Unique identifier of the human authority role. | builders/human-builder.ts:19 |