Function: signal()
signal<
S>(name,schema):SignalDef<output<S>>
Defined in: sdk/ts/sdk/src/core/activity.ts:210
Defines a signal: a named, typed message a run can park on with cmd.awaitSignal, cmd.awaitHuman or waitFor, delivered from outside through the host's API.
The content hash covers name and the schema as JSON Schema, projected the same way as an activity's. A host that has the definition registered rejects an inbound payload the schema does not accept.
Type Parameters
S
S extends ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>
Parameters
name
string
schema
S
Returns
SignalDef<output<S>>
Example
ts
import { z } from "zod";
import { signal } from "@oona/vlo";
export const approve = signal("example.approve", z.object({ by: z.string() }));