Repository navigation
feat(site): answer and count Firenook's release check at /api/version - #5
Merged
Merged
Conversation
From 0.2.5 the npm package asks firenook.dev for firenook's version tags instead of the npm registry. /api/version answers npm's tags, cached, and adds one to the day's count for the version and platform the request names, in one SQLite Durable Object; a request naming anything else is answered and not counted. Nothing else is kept: no address, id or project. /api/usage answers the last 90 days' totals by version and platform. The privacy page, the FAQ and the docs that describe the check say what is counted and how to turn it off (now DO_NOT_TRACK too), and the link check accepts the Worker's two addresses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01APfZAFCQzCmvhJqWKMT47g
/api/usage answers the daily totals only to a request carrying the Worker's USAGE_TOKEN secret, compared in constant time, and 404 to any other, and to every request while the secret is not set. The privacy page and the FAQ no longer point at public totals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01APfZAFCQzCmvhJqWKMT47g
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.
Answers and counts Firenook's release check, which 0.2.5 sends to firenook.dev instead of the npm registry (firenook-dev/firenook#240).
/api/version?v=<version>&p=<platform>answers npm's version tags for firenook, cached for five minutes, and adds one to that day's count for the version and platform, in one SQLite Durable Object. A request naming anything other than a release version and one of the five platforms is answered and not counted, so the table holds no free text. Nothing else is kept: no address, id or project./api/usageanswers the last 90 days (each day's checks, by version and by platform) only to a request carrying the Worker'sUSAGE_TOKENsecret, and 404 to any other, and to every request while the secret is not set. The totals are private.DO_NOT_TRACK=1too, from 0.2.5).AGENTS.mdnames the Worker's new addresses.Checked:
npm run check, the build,npm run check:siteand the deploy dry run (it lists theUSAGEDurable Object binding). The packaged Worker run locally underwrangler dev: five checks answered with npm's tags, three counted (two valid versions and platforms), the made-up version and platform not counted,/api/usagegave the day's totals to the right token and 404 without one, with a wrong one, and with no secret set, and pages were served as before.🤖 Generated with Claude Code
https://claude.ai/code/session_01APfZAFCQzCmvhJqWKMT47g