Skip to content

Commit 3d7712c

Browse files
authored
docs: note that addressable channel events scope by d, not h (#4103)
The channel scoping note in `AGENTS.md` reads as universal: > **Channel scoping**: Channels use `h` tags (NIP-29 group tag), not `e` tags. > Filters and queries must scope to `h` tags when operating within a channel. It holds for events inside a channel, but not for the addressable events that describe one. kind:39000, kind:39001 and kind:39002 carry the channel id in their `d` tag, which is what `get_channels` already reads. Taking the existing wording at face value while working on kind:39002 produces an empty result rather than an error, since those events do carry `h` tags in other flows, so the mistake is quiet and costs a debugging cycle. Came up while working on #4023. Four lines, no behaviour change. Signed-off-by: Szymon Tanski <szymontanski8@gmail.com>
1 parent 909a3b2 commit 3d7712c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ first, then implement handling in the relay.
145145

146146
**Channel scoping**: Channels use `h` tags (NIP-29 group tag), not `e` tags.
147147
Filters and queries must scope to `h` tags when operating within a channel.
148+
This applies to events *inside* a channel. Addressable events that describe a
149+
channel carry its id in their `d` tag instead: kind:39000 (metadata),
150+
kind:39001, kind:39002 (membership). `get_channels` resolves a user's channels
151+
from the `d` tag of their kind:39002 events, not from `h`.
148152

149153
**Agent-facing operations go in `buzz-cli`**: New agent-facing features belong in `buzz-cli` — add a subcommand there first, then wire the REST/WebSocket call in `client.rs`. `buzz-dev-mcp` (shell + file tools for `buzz-agent`) is separate.
150154

0 commit comments

Comments
 (0)