Skip to content

feat(site): answer and count Firenook's release check at /api/version - #5

Merged
sanjevirau merged 2 commits into
mainfrom
feat/usage-count
Nov 14, 2026
Merged

sanjevirau merged 2 commits into
mainfrom
feat/usage-count

Conversation

@sanjevirau

@sanjevirau sanjevirau commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

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/usage answers the last 90 days (each day's checks, by version and by platform) only to a request carrying the Worker's USAGE_TOKEN secret, and 404 to any other, and to every request while the secret is not set. The totals are private.
  • The privacy page, the FAQ and the docs that describe the check say what is counted and how to turn it off (DO_NOT_TRACK=1 too, from 0.2.5). AGENTS.md names the Worker's new addresses.
  • The link check accepts the Worker's two addresses.

Checked: npm run check, the build, npm run check:site and the deploy dry run (it lists the USAGE Durable Object binding). The packaged Worker run locally under wrangler dev: five checks answered with npm's tags, three counted (two valid versions and platforms), the made-up version and platform not counted, /api/usage gave 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

sanjevirau and others added 2 commits November 14, 2026 16:01
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
@sanjevirau
sanjevirau merged commit a4d3842 into main Nov 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant