SignalRunThe action that answers a parked run by hand — exactly once, or not at all.

SignalRun delivers an event to a parked run by hand:

type SignalRun = {_: 'SignalRun'; runId: string; signal: string; payload?: unknown} → {runId: string; delivered: boolean}

When a script parks on ctx.waitForEvent — waiting for an approval, a data point, a go-ahead — the wait is a durable row, and this is how a human (or a trigger) ends it deliberately rather than waiting for the world to produce a matching event.

The affordances

The desktop turns it into three actions on a parked run's card, and on a parked delegate child's row:

    Answer — sends the signal the park advertises (answerWith). One click: "yes, proceed."

    Answer with data — the same, carrying a JSON payload the waiting script receives as the event's value. The approval and the numbers it was waiting for.

    Resume — for a budget-pause park: the decision to keep spending, which is a different question from answering one.

The park advertises the signal that would actually answer it, so the card is never a guessing game — and a test asserts the advertised name is one the wait genuinely accepts, so the button cannot send something the wait would reject.

For a budget pause, any signal name counts as permission; resuming drops the wall-clock budget rather than extending it, so the run does not immediately re-pause (Time and Parking).

Exactly once, or nothing at all

Delivery is one SQLite transaction that does three things together: append a kind: 'event' entry to the run's journal, flip the run from waiting back to queued, and delete the wait row. The transaction only commits if the run is still parked on an event and its journal still holds the matching wait entry.

The consequence is the design's whole point, stated in the source: a signal that loses the race — to a timeout wake, a cancellation, or another signal — leaves nothing behind at all. There is no half-delivery to reconcile and no double-wake to guard against downstream.

If no open wait matches, the response is simply delivered: false. "Not delivered" is a normal, visible outcome rather than an error swallowed — and when the sender is a trigger, that outcome is recorded as a no-listener firing so the history shows the trigger fired and found no one.

Payloads are sanitized to JSON-safe values before they reach the script.

One delivery path, whoever sends

A trigger's wake continuation rides this exact machinery — mechanically, a trigger that wakes a parked run is a signal with a different sender. It can name a specific run, or name only a signal and mean "unblock whoever on this account is parked on this."

Related

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime