<Signal> is the ergonomic form of <WaitForEvent> when the signal name should match the node id and the payload should be typed by a Zod schema.
Import
Props
| Prop | Type | Default | Description |
|---|---|---|---|
id | string | (required) | Signal name and node id. |
schema | z.ZodObject | (required) | Typed payload schema and output target. |
correlationId | string | undefined | Correlation key for matching a specific signal instance. |
timeoutMs | number | undefined | Max wait time in ms. |
onTimeout | "fail" | "skip" | "continue" | "fail" | Timeout behavior. |
async | boolean | false | When true, unrelated downstream flow can continue while the signal is still pending. Explicit dependencies still wait for the payload. |
skipIf | boolean | false | Skip this node entirely. |
dependsOn | string[] | undefined | Task IDs that must complete first. |
needs | Record<string, string> | undefined | Named deps. Keys become context keys, values are task IDs. |
label | string | signal:<id> | Display label override. |
meta | Record<string, unknown> | undefined | Extra metadata. |
children | (data) => ReactNode | undefined | Optional typed render callback that mounts only after the signal payload exists. |
Example
Behavior
<Signal>renders a<WaitForEvent>internally withevent={id}andoutput={schema}.- Without
children, it behaves like a plain typed wait. - With
children, the callback runs only after the payload has been received and validated. - Async signal waits contribute to
smithers_external_wait_async_pending{kind="event"}while unresolved.