feat(relay): add kind:40009 interactive-card response events - #4924
Closed
mcdickenson wants to merge 1 commit into
Closed
feat(relay): add kind:40009 interactive-card response events#4924mcdickenson wants to merge 1 commit into
mcdickenson wants to merge 1 commit into
Conversation
Registers KIND_CARD_RESPONSE (40009) so clients can publish signed check-off responses to interactive card messages (e tag → card event, item tag → item id). Channel-scoped like other stream-message kinds: requires an h tag, MessagesWrite scope, and channel membership via the generic ingest pipeline. Card state stays a client-side fold — the relay stores raw events only, and feed/unread queries are unaffected because they use explicit kind inclusion lists. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Matt Dickenson <mdickenson@squareup.com>
This was referenced Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Registers a new channel-scoped event kind,
KIND_CARD_RESPONSE = 40009, for interactive to-do card check-offs. A response references the card message via anetag and the item via anitemtag; content is{"done":true|false}. Card state is a pure client-side fold over these signed events (huddle-card pattern) — the relay stores raw events only.This is the relay half of the inline interactive to-do cards MVP; the card itself is a
buzz:todo-cardfenced sentinel inside a normal message (config-nudge pattern) and needs no relay changes. Desktop renderer + SDK builder land in follow-up PRs.crates/buzz-core/src/kind.rs:KIND_CARD_RESPONSE+ALL_KINDSentrycrates/buzz-relay/src/handlers/ingest.rs:required_scope_for_kind→MessagesWrite(stream-message arm),requires_h_channel_scope→ true, so the generic pipeline enforces thehtag, NIP-42 session scope, and channel membershipbuzz-db/src/feed.rs), so 40009 never creates unreadsTesting
cargo test -p buzz-core -p buzz-relay: allowlist-coverage (per_kind_scope_allowlist_covers_all_migrated_kinds), duplicate-kind detection, and new testscard_response_requires_messages_write_scope/card_response_is_channel_scoped_not_globalall passapi::media/api::admin/api::mesh_demoreproduce on clean main (local-infra dependent) — unrelatedjust fmt-check+just clippyclean🤖 Generated with Claude Code