This repository was archived by the owner on Oct 13, 2026. It is now read-only.
Repository navigation
feat: nook_data.py and nook-data.js, and the skill section for a nook with a server - #9
Merged
Merged
Conversation
… with a server The two clients a nook's own code uses, which are to server code what nook.js is to a page: the same calls and the same rules, so a me/ collection means the same thing on both sides. viewer(headers) is the whole of the design. It takes the act-as token out of the request rather than an email address, so a nook acts for someone who is using it and can never act for someone it merely names. Passing headers straight through is also the easier thing to write, which is the point. Neither needs configuring: nookd puts NOOK_DATA_URL and NOOK_TOKEN in the environment and nook-init writes both files beside the nook's own, so they match the server they talk to and nobody carries a stale copy around. The skill file gains a section on when a nook needs a server at all, the four manifest fields, secrets, what the code is given and what it is not, and what the machine can reach.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The two clients a nook's own code uses. They are to server code what
nook.jsis to a page: the same calls, the same rules, so ame/collection means the same thing on both sides.viewer(headers)is the whole of the designIt takes the act-as token out of the request rather than an email address, so a nook acts for someone who is using it and can never act for someone it merely names. Passing headers straight through is also the easier thing to write than looking up an address, which is the point — the safe path should be the obvious one.
The skill file says this in as many words, because an agent that reaches for an email address is the failure mode.
Details worth a look
urlliband Node 22's built-infetch. A nook has no build step, so a helper that needed installing would not be a helper.nook-data.jsis CommonJS, which is what Node uses for a.jsfile in a folder with nopackage.json— the normal case for a nook. The file says in one line what to do if the author sets"type": "module".node:http, aHeaders, a dict, or a WSGI environ. Tested for the case-insensitive path.helpers/embed.goexposes them for nook-init to write beside the nook's files, so they always match the server they talk to. Both names are reserved.Skill file
A new section on when a nook needs a server at all — an API key that must not reach a browser, a service that will not allow one, or work on a schedule — then the four manifest fields,
nook secret set, and what the code is given and is not: identity, never a credential. It also states the fence and that nothing survives a restart, since that is the thing an author will otherwise assume wrongly.nook logsandnook secretjoin the command list.Ready to tag as v0.6.0. nookd then writes these at boot in the fly PR.
Part of ENG-24