diff --git a/NOSTR.md b/NOSTR.md index f869035a1b..28a154e1db 100644 --- a/NOSTR.md +++ b/NOSTR.md @@ -134,6 +134,24 @@ label set with more than 8 labels, a label that is not 1-64 characters from `a-z`, `0-9`, `.`, `:` and `-`, or a label equal to a channel type name (`stream`, `forum`, `dm`, `workflow`, `system`). +**System channels.** A channel with `channel_type` `system` exists only for +access control, for example to hold config that only an agent and its owner +can read. It is an ordinary channel in every other way, but queries leave it +out unless they ask for it: + +- A filter that does not name it, for example a REQ with no `#h`, a COUNT, + a NIP-50 search, or kind:39002 `#p:[me]`, does not return it. +- A filter that names it with `#h`, or with `#d` on kinds 39000–39003, reads + it under the ordinary rules: the reader is a member, or it is open. +- A filter on kinds 39000–39003 with `#t:["system"]` or any `#P` also + returns the system channels the reader can read, then matches as usual. + For example, `{kinds:[39000], #P:[], #t:[