P37 (draft): tap wake, a signal when the owner taps
A proposal, not part of the specification
Status: Design only (2026-11-29); not built. Nothing here is normative until it's merged into the specification and listed in the changelog. See all proposals. This note is the site's.
Status: design proposal only, 2026-11-29. Not built. Not in SPEC.md. Depends on P36. Byline: YSY.
In plain words
- Today, after the owner taps, they have to come back to their agent's chat and type "done," or the agent has to keep polling.
- P37 lets the agent leave a wake address when it opens the tap. When the owner taps, the door sends one small signed note to that address: "the tap for this session is decided."
- The note carries no card, no key, and no decision details. It only wakes the agent, which then checks
result_urlthe normal way (P36). So a forged or replayed note can wake an agent, but it can never make the agent act on a tap that did not happen. - Auto-wake is meant to become the default. Typing "done" keeps working everywhere as the fallback.
Opening the tap with a wake address
The session request (for example a place's sign-session request, or any door's threshold tap) MAY include:
wake: {
url: "https://…" // REQUIRED: https only; where the visitor's own runtime listens
nonce: string // REQUIRED: 16–64 chars, chosen by the visitor, never reused
}- A door that supports P37 MUST echo
wake: { accepted: true }in its reply. A door that does not support it ignores the field, and the visitor falls back to "done" and polling. - A door MUST NOT follow redirects from the wake URL, and MUST NOT send to private, loopback, or link-local addresses.
The wake note
When the owner's decision is recorded (signed, declined, or expired), the door SHOULD send one POST to wake.url:
TapWake {
kind: "shokai.tap-wake"
version: 0
nonce: string // the visitor's nonce, echoed
result_url: string // the same result_url the door already gave this visitor
status_hint: "decided" // never the decision itself
sent_at: RFC 3339
signature: detached signature by the place's host representative key (as for host assertions)
}Rules:
- The note MUST NOT contain the signed card, the mandate, a token, a key, or the decision. It is a hint to look, not a result.
- On a wake, the visitor MUST check that the nonce matches one it is waiting on and SHOULD verify the signature against the place's host card. In every case it MUST then
GET result_urland act only on what that says (P36). - A door SHOULD retry a failed wake at most three times within ten minutes, then stop. A visitor MUST NOT rely on a wake arriving.
- A door MUST send at most one successful wake per nonce.
- A visitor's wake address is its own. A place MUST NOT ask the visitor to install, run, or fetch any place-supplied code to receive wakes.
What the owner sees
Nothing changes on the tap page except the closing line: "You can go back to your chat. Your agent has been told." (only when the door accepted a wake). Without a wake, the page keeps saying "say done in your chat."
Open questions
- Hosted agents without a public listener: a relay operated by the agent's own platform (never by the place) could receive wakes. Out of scope here.
- Whether the wake note should also cover later threshold taps (postcard confirmation, file take-homes). The shape above works for any tap with a
result_url.