For builders implementing Shōkai. A visiting agent doesn't need this; follow the place's guide and the door's replies.
Shōkai extension: Visit receipts
Status: stable (in the reference with its own tests; within 0.5, it changes only for fixes). Extension visit-receipts, version 0.5.0, tied to the core SPEC.md v0.5.0 (wire shokai/0.5, with shokai/0.3 still accepted during the transition window, SPEC §11.1). Applies to v0.5.0 (unchanged since v0.4.0). Normative for implementations that claim this extension. Section references without a document name are to the core.
© 2026 Yu Sung Yeh. Licensed under the Apache License 2.0. Patent commitment (draft): PATENTS.md. Names and logo: TRADEMARKS.md.
Conformance level: Visit receipts. An implementation conforms to this extension when it conforms to the core and meets every requirement below for the roles it plays (host representative, returning visiting representative). An implementation that doesn't support it never uses the messages, members or actions below, and the core is complete without it. Every LobbyBriefing carries a visit_receipt (core §3.3); a host representative that implements this extension links a proven return to it.
Requires: the core. Tests: see conformance/homes.json (home visit-receipts).
Linking an anonymous visit
- A returning visiting representative proves continuity by echoing the lobby's
{receipt_id, nonce}inside a request signed with its new key. [SC-L0, L0b, C42, D6] - The host representative MUST link the earlier unbound record only when the receipt is known, unused and unexpired, and the nonce matches. It MUST then mark the receipt used. A guessed, unproven or reused receipt MUST link nothing. [SC-L0, L0b, C29, C42, C56, D6]
- A receipt is a bearer secret (
handling: "bearer_secret"): whoever echoes it first continues the visit. Itsexpires_atMUST be at most 7 days afterissued_at. [SC-L0, C60, D6] - A host representative MUST rate-limit invalid receipt echoes per sender (default: 3 per hour). Past the limit, even a valid echo MUST NOT link. [SC-L0, L0b, C60]
- A lobby visiting representative MAY send an ephemeral
continuity_key(adid:key) in its greeting. The receipt then carriesbound_key, and linking MUST also requirevisit_receipt.continuity_proof: a signature by that key over digest(JCS({encounter_id, receipt_id, representative_id})). [SC-L0, L0b, C56, C60] - A bare
relationship_reforprior_response_refto an unbound record MUST NOT link history. [SC-L0, C42, D6] - Receipt nonces MUST NOT appear in reports, transcripts or logs shown to anyone else. [SC-L0, C42, D6]
- Each
LobbyBriefingmints a new receipt; any unexpired, unused receipt links its own lobby visit (informative). - Linking is visible . A response to a request that echoed a visit receipt MUST carry
continuity: {receipt_id, linked}, saying whether the earlier visit was linked; the visiting representative'sVisitReportMUST carry the same, so the owner knows. [SC-L0, L0b, C105, D6] - A report (core §8.2) on a visit that echoed a receipt MUST say whether it was linked (
continuity). [SC-L0, L0b, C105] - Informative. A host representative remembers signed greeting nonces for at least the lifetime of the receipts it issues (core §2.4).