Everything the Carbon does in response to a Silicon (an answer, a dismissal, a message), and what becomes of the Silicon's sends when it cannot watch (one expired, a scheduled one came due, one appeared), comes back to that Silicon as a Ting event. This page lists the nine event types, their exact payloads, how delivery behaves, how to route them in a Stemcell flow, and how to receive them without Stemcell.
peek never talks to your Silicon directly. peekd records the event on the Mac, the peek backend sends it using your separately approved Ting permission, and Ting delivers it to your Silicon's webhook. Under Stemcell that is http://<handle>.<org>.localhost/events, where Stemcell runs your flow. Without Stemcell, you point Ting at a webhook of your own (Receive answers without Stemcell).
The nine types#
| Type | Sent when | Default |
|---|---|---|
peek.ask.answered | the Carbon answered an --ask (voice, keyboard or click) | always |
peek.ask.dismissed | the Carbon closed an ask without answering (Esc, down-arrow) | always |
peek.ask.expired | an ask with --expires-in or --expires-at ran out unanswered, on screen or while it waited | always (only asks with a deadline) |
peek.message.received | the Carbon spoke or typed to the Silicon with no pending ask (ctrl+cmd+N, then \ or typing) | always |
peek.speech.finished | a --speak finished or was stopped | only with --notify speech_finished or config notify |
peek.show.dismissed | the Carbon closed a --show before it retracted on its own | only with --notify show_dismissed or config notify |
peek.send.expired | a --speak or --show send with --expires-in or --expires-at ran out before it finished, on screen or before it was ever shown | always (only sends with a deadline) |
peek.schedule.due | a scheduled send (--in, --at) came due; says whether it was shown, queued, expired or replaced your active bubble | always (only scheduled sends) |
peek.send.shown | a send appeared on the Carbon's screen | always for scheduled sends; otherwise only with --notify shown or config notify |
Nothing is sent for your own actions: peek cancel, peek ask cancel, peek queue clear, peek schedule cancel and clear, peek unregister, peek logout, and a send you took over with --replace. peek.speech.finished, peek.show.dismissed and peek.send.shown are opt-in because a catch-all flow branch (like Flow A) forwards every one of them as a message, and each event requires a Ting request and authorization check.
An expiry is always reported with exactly one type: peek.ask.expired for an ask, peek.send.expired for anything else. A scheduled send whose deadline passed before it came due gets both peek.schedule.due (outcome expired) and that expiry event.
The type names are final: Ting types cannot be deleted, so these nine will not be renamed.
Payloads#
Every data object carries "schema":1, "slot" (1–8) and "context" ("production"). Timestamps are RFC 3339 UTC with Z. Images are referenced by option id and label, never as bytes. Fields are only ever added within schema 1, so ignore fields you do not know.
Notes on the three types added in 0.1.2:
kindisspeak,show,ask,speak+showorspeak+ask.peek.send.expirednever describes an ask, so itskindisspeak,showorspeak+show.peek.schedule.dueoutcome:shown: it became your active bubble and went to the screen at once (peek.send.shownconfirms when it actually appeared);queued: it waits;waiting_reasonsays why:behind_others(your earlier sends,queue_position1–5),queue_full(five were already waiting, so it takes the next free spot,queue_position6 or more), or it is your active bubble but held (queue_position0) bycarbon_away,pausedorapp_not_running;expired: its--expires-athad passed before it could fire; the expiry event (peek.ask.expiredorpeek.send.expired,"shown":false) follows;replaced: it was a--replacesend and took over the send inreplaced_send_id;waiting_reasonis set too when the new bubble is held.
peek.send.shownis sent when Peek.app starts presenting the bubble, at most once per send. A scheduled send always sends it; a regular send only with--notify shown.- Esc gestures. A show closed with one Esc reports
esc; two Escs within 0.4 s (which also stop the speech) reportesc_double. An ask dismissed by Esc always reportsesc.
metadata is {"isi":"<ISI>","peek_version":"0.1.2"}. isi is the $ISI of the process that ran peek send, and is omitted when it was unknown or invalid (an invalid ISI is dropped with an isi_ignored warning; the send still goes out). For peek.message.received it is the ISI of your most recent send in that position. For a scheduled send it is the ISI that ran peek send --in or --at. Route on it (see below); never treat it as authority.
Ids: ask_, snd_, sch_ (a scheduled send), cmsg_ and evt_, each followed by 32 hex characters (a UUIDv7, so they sort by time).
What your webhook receives#
The key is "<your actor id>/<subject>/<event>". It is unique per semantic event, so Ting drops duplicates of the same event:
| Type | Subject | Event |
|---|---|---|
peek.ask.answered, peek.ask.dismissed, peek.ask.expired | ask_id | answered, dismissed, expired |
peek.message.received | message_id | message |
peek.speech.finished, peek.show.dismissed | send_id | speech_finished, show_dismissed |
peek.send.expired | send_id | send_expired |
peek.schedule.due | schedule_id | due |
peek.send.shown | send_id | shown |
Delivery guarantees#
- At least once. Ting and Stemcell may deliver or replay a batch more than once. Dedupe by the ting
id; the data also carriesask_idormessage_id. - Durable on the Mac. peekd writes each event to an outbox before trying to deliver it. If the Mac is offline, or the backend or Ting is down, it retries with backoff (1 s, 2 s, 5 s, 15 s, 30 s, 1 min, 2 min, 5 min, 10 min, then every 15 min) until
delivery_max_age_hours(default 168, at most one week) has passed. Then the event is marked expired. - Sent with your own session. Only the answering Silicon's own peek session can deliver its events, and events of one Silicon are never sent with another's. If your session is rejected, events wait in
authority_requireduntil you log in again. - Exactly one channel with
--wait. When a livepeek send --waitprints the outcome of its ask (answered,dismissed,expiredorcancelled), that outcome is not also sent through Ting, andpeek ask getshowsdelivery.status:"wait". If the wait timed out or the process died first, the event goes through Ting as usual. - Nothing is sent to nobody. While the Carbon's screen is locked or the display is asleep, Peek.app shows nothing: new sends stay queued (
status:"queued"with acarbon_awaywarning), deadlines keep running, and speech starts only when the bubble is actually shown.peek.speech.finished,peek.show.dismissedandpeek.send.showntherefore always describe something the Carbon could see or hear, and the expiry events say withshownwhether the Carbon ever saw the send.
Check delivery at any time:
| Delivery status | Meaning | What to do |
|---|---|---|
pending | queued or retrying | nothing; see last_error in peek status |
accepted | Ting accepted it | – |
accepted with silent:true | you muted peek in Ting, so it was stored but never delivered | unmute peek in Ting |
authority_required | your session was rejected, consent is missing, or you are not enrolled | peek login status --json shows which; see below |
expired | not delivered within delivery_max_age_hours | check why deliveries fail (peek doctor) |
cancelled | you logged out before it was delivered | – |
failed | Ting refused it permanently (a bug) | peek report with the ask get output |
delivery:"required" (Ting's "never silent" mode) is not used, because it needs an opt-in from you that Stemcell never performs.
Account identity and delivery#
Peek authenticates with Silicon Accounts and uses App verification and User verification for Ting requests. A reply belongs to the Carbon or Silicon account that originated it, identified by immutable UUID. Switching the active profile never changes a queued reply's destination.
Use peek ting --help for enrollment and delivery commands. Temporary delivery failures stay queued for retry. The backend keeps receipts and payload hashes rather than voice recordings or message content.