Interface: HumanAdapter
Defined in: ports/human-adapter.ts:9
Runtime port for outbound human notifications and bidirectional human-in-the-loop adjudications.
Dispatched via RuntimeExecutorRegistry.humanChannels[node.type] to page human operators, await schema-validated decisions, and cancel superseded decision requests.
Methods
cancelDecision()?
cancelDecision?(runId, requestId): Promise<void>;Defined in: ports/human-adapter.ts:47
Cancels an in-flight human decision request when a sibling branch or interrupt supersedes it.
Dismisses or updates the pending prompt in the external channel for (runId, requestId).
Parameters
| Parameter | Type | Description |
|---|---|---|
runId | string | Identifier of the harness run owning the request. |
requestId | string | Identifier of the decision request to cancel. |
Returns
Promise<void>
Resolves once the cancellation has been processed.
notify()
notify(message): Promise<void>;Defined in: ports/human-adapter.ts:19
Sends a one-way notification message to the configured human channel.
Delivers formatted alert or status text without blocking on a human response.
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | Formatted notification text to deliver. |
Returns
Promise<void>
Resolves once the notification has been dispatched.
requestDecision()
requestDecision<TRequest, TResponse>(req): Promise<TResponse>;Defined in: ports/human-adapter.ts:33
Requests a structured decision from a human operator and awaits a validated response.
Validates the human's reply against req.responseSchema before resolving.
Type Parameters
| Type Parameter | Description |
|---|---|
TRequest | Request brief payload type. |
TResponse | Validated response payload type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
req | HumanDecisionRequest<TRequest, TResponse> | Decision request descriptor and response schema. |
Returns
Promise<TResponse>
Schema-validated human decision response.