Interface: HarnessSignalNotificationBuilder<TPayload>
Defined in: builders/harness-signal-notification-builder.ts:13
Fluent sub-builder for a root-level signal notification rule (harness.onSignal(sig, $sig => $sig.notify(human, mapper))).
Routes an emitted SignalNode<TPayload> to a HumanNode channel using a synchronous message formatter.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TPayload | unknown | Signal payload type. |
Methods
notify()
notify(human, messageMapper): HarnessSignalNotificationBuilder<TPayload>;Defined in: builders/harness-signal-notification-builder.ts:24
Routes the emitted signal to a HumanNode channel using messageMapper.
Accepts both 'bidirectional' and 'notify-only' human channels for outbound notifications.
Parameters
| Parameter | Type | Description |
|---|---|---|
human | | MaybeBuilder<HumanNode<"bidirectional">> | MaybeBuilder<HumanNode<"notify-only">> | MaybeBuilder<HumanNode<"bidirectional" | "notify-only">> | Target human authority or notification channel. |
messageMapper | (payload) => string | Synchronous notification message formatter. |
Returns
HarnessSignalNotificationBuilder<TPayload>
New immutable signal notification builder.
toAST()
toAST(): HarnessSignalNotification<TPayload>;Defined in: builders/harness-signal-notification-builder.ts:39
Compiles this notification builder into an immutable HarnessSignalNotification.
Throws at builder compilation time if .notify(human, mapper) has not been called.
Returns
HarnessSignalNotification<TPayload>
Deeply frozen signal notification record.