NAP-5: explicit feed origin (relay vs outbox) - #44
Merged
Conversation
dskvr
force-pushed
the
nap-5-feed-source
branch
3 times, most recently
from
June 16, 2026 12:31
55d20a9 to
42118cf
Compare
… policy Add an `origin` field to feed:open — a discriminated union whose `type` selects the routing *method*: `relay` (query these relays) or `outbox` (resolve each author's relays from their published relay list). A relay feed and an outbox feed become one request differing only by `origin.type`; new methods never fork the contract. Origin names a method, not an interface — the spec no longer requires or names NAP-RELAY/NAP-OUTBOX, since named NAPs are voluntary per runtime. The legacy `relays` field is removed; sourcing is expressed solely through `origin`. Clarify that `limit` is advisory: the runtime owns fetch policy (page size, pagination, cost bounds) and MAY ignore a producer-supplied `limit`. Producer/ consumer requirements, examples, and security considerations updated to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Stacked on #36 (
nap-5-feed-topics); base isnap-5-feed-topicsso the diff is just these changes.1. Explicit feed origin
feed:opencould express a relay set (relays?) but not an author-routed (outbox) feed. Adds anorigindiscriminated union:Origin names a routing method, not an interface.
relay= query these relays;outbox= resolve each author's relays from their published relay list. The spec does not require or name a fetch interface (noNAP-RELAY/NAP-OUTBOXimposed) — named NAPs are voluntary per runtime. A consumer fulfills the method through whatever relay access it has, and MAY fall back or ignore when it can't. Origin is a field, not a topic — new methods (search,dvm) extend the union without forking.Requiresreduced toNAP-INC.2. Origin-only sourcing
The legacy
relaysfield is removed — sourcing is expressed solely throughorigin(a relay-pinned feed isorigin: { type: "relay", relays }). One field, no precedence rules.3. Runtime owns fetch policy
limitis clarified as advisory: the runtime owns fetch policy (page size, pagination, cost bounds) and MAY ignore a producer-suppliedlimit. This matches the spec's existing non-goal of not defining how a feed fetches/paginates.Terminology (
producer/consumer) is unchanged — consistent with NAP-1–4; a glossary entry defining the pair is added toREADME.mdseparately. Registry row unchanged. Statusdraft.