Skip to content

NIP-XX: Gopherkind documents (kind 31436) - #2429

Open
TheCryptoDonkey wants to merge 3 commits into
nostr-protocol:masterfrom
forgesworn:codex/gopherkind-nip
Open

NIP-XX: Gopherkind documents (kind 31436)#2429
TheCryptoDonkey wants to merge 3 commits into
nostr-protocol:masterfrom
forgesworn:codex/gopherkind-nip

Conversation

@TheCryptoDonkey

Copy link
Copy Markdown

Summary

Adds an addressable kind for one text or menu node of a gopherhole, so a hole is a set of signed events under a pubkey rather than a directory tied to one hostname. Any bridge that can retrieve a relay copy can serve the hole to an RFC 1436 client.

The kind carries UTF-8 text inline rather than referencing blobs, and gives menus a small host-independent grammar. The rationale for not reusing nsite manifests or kind 30023 is in the draft. No relay changes are required beyond ordinary addressable-event handling.

Implementations and vectors

The Python implementation vendors that fixture unchanged (SHA-256 0f44989ec9d3ed4979d53ccc45dedfad75fe84adb8b3d710f172fa1f5a7bb421) and passes all five sections on Python 3.11 and 3.14. It was written against the draft and fixture without importing or copying the TypeScript parser.

The NIP number is left as XX, and the descriptive filename avoids colliding with other draft PRs.

Three gaps from the first draft.

The reasoning for the kind sat in the rationale at the far end, so the case for
it arrived after every rule it justifies. It now opens the document.

Nothing showed how to subscribe. A whole hole is one filter and a document is
that filter narrowed by `#d`, which a client implementer should not have to
infer.

The prior-art paragraph named "the nsite event family" vaguely. NIP-5A is
merged and is the closest existing work, so it is named, along with the three
differences that matter: text inline rather than Blossom blob hashes, one event
per document rather than a path manifest, and gopher item types for a client
with no HTML parser.

No normative rule changes.
The previous text forbade every control character in a display. That reads well
and forbids what gopherspace actually does: gopher://baud.baby/1/ builds its
root menu out of truecolour SGR info lines, and a consumer following the strict
rule renders them as literal escape text.

A display MAY now carry SGR, that is ESC [ params m, and nothing else. A link
still carries no control character of any kind. The distinction is that a link
is parsed and acted upon while a display is only shown, so an inert styling
sequence in a label costs nothing while anything in a target could be made to
matter.

A consumer that cannot render SGR strips the sequences rather than rejecting
the record, so a plain-text frontend stays conforming without special cases.

The reference implementation and an independent Python implementation both
follow this, checked against a shared fixture that pins what survives and what
is replaced by a space.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant