NAP-4: Note viewer open protocol - #28
Closed
dskvr wants to merge 4 commits into
Closed
Conversation
dskvr
marked this pull request as draft
June 16, 2026 01:45
Contributor
Author
|
needs support for NIP-19 encoded entities in addition to (or instead of) objects. |
Rebased onto current master; spec only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
force-pushed
the
note-viewer-open-nub
branch
from
June 17, 2026 19:14
a571966 to
bb06a8e
Compare
The note open payload and target union now use CDDL-style schema notation, and the INC transport example no longer carries TypeScript highlighting. Constraint: Keep this branch scoped to NAP-4. Confidence: high Scope-risk: narrow Tested: git diff --check Tested: rg found no TypeScript code fences or declarations in naps/NAP-4.md
The note-open payload, source, behavior, and target shapes now use Markdown field tables instead of a CDDL-style block. The structured target requirements remain unchanged. Constraint: PR #28 owns NAP-4; keep this change scoped to that spec file. Confidence: high Scope-risk: narrow Tested: rg for cddl/typescript schema fences and type assignment patterns in NAP-4 Tested: git diff --check -- naps/NAP-4.md
Open NAP proposal branches need reader-visible changelogs that track semantic spec changes without recording formatting-only migrations. Constraint: Changelog entries are one bullet per semantic commit-change. Rejected: Include schema-table or formatting-only commits | they do not change the spec contract or boundary. Confidence: high Scope-risk: narrow Directive: Keep future changelog entries semantic; omit changelog-only and formatting-only commits. Tested: git diff --check Not-tested: Rendered Markdown
Contributor
Author
|
Closing this because numbered NAPs are being removed from the registry. Cross-napplet payload shapes should converge as unnumbered conventions, without sequence assignment or Suggested alternative: |
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
Adds NAP-4, a small NAP-INC message protocol for opening a specific Nostr event or addressable event in a note viewer.
Why
Feed, profile, search, notification, and thread napplets all need to hand off "inspect this note/event" intent. Without a shared wire shape, each client invents a topic and payload, which makes note viewers hard to reuse across shells and napplets.
Spec / API Surface
note:open.relayfor consumers that fetch the referenced note.shell.supports("inc", "NAP-4").Compatibility
Consumers that do not support NAP-4 ignore the message. Producers should check
shell.supports("inc", "NAP-4")before relying on it. Structured target fields are canonical; NIP-19 strings are compatibility metadata.Validation
Hyprgate v2.8 has draft helper types and parsing around the note-viewer protocol. Runtime support should only be advertised after the shell route is verified.
Non-goals
Follow-ups
note:openrouting and advertiseinc:NAP-4only after runtime verification.Changelog
bb06a8e- Introduced NAP-4 as the note-viewer open protocol.