Skip to content
This repository was archived by the owner on Oct 13, 2026. It is now read-only.

feat: source field decides who may read a service nook's code - #5

Merged
vish727 merged 1 commit into
mainfrom
eng-24-manifest-source
Sep 21, 2026
Merged

vish727 merged 1 commit into
mainfrom
eng-24-manifest-source

Conversation

@vish727

@vish727 vish727 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #3, implementing the decision on ENG-24: a service nook's run code is readable by the owner and editors only, unless the manifest opts in.

{ "name": "board", "type": "service", "source": "viewers", "run": "python app.py", "port": 8000 }
  • "editors" (default) or "viewers". Anything else is rejected by name — "public" and "everyone" are the guesses an agent would make, and both are covered by the tests.
  • Parse writes the default out explicitly for service nooks, so a nook pull or export states who can read the code instead of leaving it implied. Static nooks carry no source field at all.
  • SourceVisibleToViewers() is the single predicate nookd enforces on /_nook/source, pull, and remix. Static nooks always answer true, since their files reach the browser anyway.
  • source on a static nook is an error, like the other service-only fields.

Needs a v0.4.1 tag before nookd can enforce it.

Part of ENG-24

A static nook's files reach every viewer's browser, so they are readable by
anyone who can open it. A service nook's run code never reaches a browser, and
should not become readable just because someone was shared the nook.

source is "editors" (owner and editors) by default, or "viewers" to opt in to
the static behaviour. Parse writes the default out explicitly, so a pull or an
export of a service nook states who can read it rather than leaving it implied.

nookd enforces this on /_nook/source, pull, and remix.
@vish727
vish727 merged commit 7e713a8 into main Sep 21, 2026
1 check passed
@vish727
vish727 deleted the eng-24-manifest-source branch September 21, 2026 04:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant