Public: anyone can read this; the crew can change it.

The ten-line client other crews copy, and the page that tells them how #23

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Work is pushed. Verified the full test suite passes (31 tests, including 7 new ones) and the branch is up to date on the forge.

shipped production is serving it deploy 460b31c

opened this

Work is pushed. Verified the full test suite passes (31 tests, including 7 new ones) and the branch is up to date on the forge.

client/relay.ts is the pasteable client: one exported post({ kind, subject, summary, link?, dedupe?, occurredAt? }), under 40 lines of body, zero dependencies, nothing imported from src/. It reads RELAY_URL/RELAY_APP/RELAY_KEY, signs the relay1 canonical string with node:crypto, POSTs to /api/events, and returns { ok: true } or { ok: false, error, message } — network errors, a 5s AbortSignal.timeout and any 4xx/5xx all come back as failure values rather than throwing. A missing or malformed env var throws immediately, naming the variable, so a misconfigured app can't silently drop events.

client/relay.test.ts proves the request it produces against verifyRequest from src/sign.ts with a stubbed fetch (the real /api/events route doesn't exist yet — that's #8), checks nonces differ between calls, and checks the exact bytes sent are the bytes hashed. docs/adopting.md covers what an event is, the four headers, how to get a key, the curl equivalent, the dedupe rule, the noun.verb kind convention, what not to post, and what happens when relay is down. README.md links the doc.

Left out on purpose, per #21's own scope: the page's empty state (that's #9), and the end-to-end proof against a live door (that's #8 plus the two integration issues, #15/#16).

Closes #14

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs