Repository navigation
1.6.0: the Seal (free, with a witness) and Sieve Pro (open core) - #37
Merged
Merged
Conversation
Sieve Pro is a one-time purchase ($24, sold through Polar) that adds new features on top of Sieve; everything Sieve did before stays free. Like BlockNSFW's Supporter extras, the features are not open source: they live in a private repository checked out at pro-private/ (ignored here), and pro/ holds an empty stand-in for each. Every protection stays in this repository, so a build from it blocks exactly what the store version does. - common/pro.js: the licence check, open source on purpose since it is the one network request Pro makes. It sends the key and the store's organisation id to Polar's public validate endpoint, on entry and about weekly from Settings only. Offline keeps the last answer; only a clear no turns Pro off. The Sieve Pro benefit id is required before anything is sent, because the store is shared with BlockNSFW. - pro/: stand-ins for seal.js, urge.js, streaks.js, settings.js and features.js (which says null). pro/README.md explains. - build-pro.mjs, called by build-chrome.ps1 and build-firefox.ps1: copies pro-private/pro over the stand-ins. A plain build includes Pro when it is checked out; -Zip refuses without it, with uncommitted Pro changes, or while common/pro.js cannot sell yet; -OpenSource leaves it out, and CI now builds that way and asserts the stand-ins shipped. - Hooks that do nothing without Pro: the Guardian gate checks for a running seal first (sealed dialog and emergency key in guardian-prompt.js); the block page hands its category to the urge screen; the popup shows a running seal and tracked streaks; Settings gains a Sieve Pro section (licence box plus the feature groups' markup) that is removed when the build carries no Pro features. - rules/gambling-rules.json now redirects with ?category=gambling, so blocks from the bundled gambling list are counted on the dashboard at last. - PRIVACY.md describes the licence check and declares it; README.md and the 1.6.0 release notes say what Pro is and what stays free. Tests: test/pro-test.mjs (licence, 16) and test/pro-standins-test.mjs (the stand-ins stay empty, pro-private is never tracked, every hook checks Pro is there). Verified in headless Edge from dist/chrome: 38 checks with Pro, and the open-source build with none of it. Firefox lint: 0 errors, 15 warnings (baseline 17) both ways. Not done yet: Sieve Pro's benefit id and checkout link in common/pro.js, and Firefox's data_collection_permissions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Sieve Pro key now takes one of a limited number of places, as BlockNSFW's
Supporter codes do (Polar's activation limit, set to 3 on the benefit).
Ported from BlockNSFW's shared/supporter.js:
- Activate validates the key, then takes a place named for the browser
("Sieve · Edge on Windows"). Every place taken is a 403, and Settings
says so and where to free one. The same key entered again keeps its
place. With no limit set in Polar, a key works anywhere, as before.
- The weekly check asks with this browser's place. A no is asked again
without it, to tell a refund ("revoked") from a place given back on the
purchases page ("removed", re-entering the key takes one back). A limit
set after the key was entered takes a place at the next check.
- "Remove from this browser" calls deactivate first and forgets the key
only once Polar has the place back (404 counts as back). Offline, the key
is kept, so the place is never left taken. Settings links the purchases
page.
Firefox: manifest.firefox.json declares authenticationInfo as optional
data, and Activate asks Firefox's consent straight from the click, before
anything is sent. Without it nothing is sent; consent withdrawn later stops
the weekly check without turning Pro off. Chrome and Edge never ask. Older
Firefox without the consent framework goes on as before.
PRIVACY.md and the 1.6.0 notes now say a plain browser name goes with the
key, when it is sent (entered, removed, weekly), and that Firefox asks.
Tests: test/pro-test.mjs (28). Verified in headless Edge from dist/chrome:
the 38 Pro checks again, plus the licence box with places, a place given
back, every place taken, and Remove offline and online (fetch replaced in
the page, so nothing reached Polar). Firefox lint unchanged: 0 errors, 15
warnings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
common/pro.js now holds both of Monolab's Polar stores side by side, since
the sandbox is a separate copy with its own ids:
- stores.sandbox: organisation 35c82b93-…, the "Sieve Pro" product's
licence-key benefit 128feed7-… ("Sieve Lifetime Code"), and its checkout
link. All read back from the sandbox checkout itself.
- stores.live: Monolab's live organisation, as before; its benefit id and
checkout link are still to come, so store packages keep refusing.
- The price label follows the product: $24.99.
`build-chrome.ps1 -Sandbox` (or build-firefox.ps1), with or without -Zip,
now makes a test build whose own copy of common/pro.js says mode "sandbox";
the source and every other build stay live. build-pro.mjs checks the
sandbox store is complete for such a build, and the live one for a store
package.
Checked against Polar's real sandbox from a -Sandbox build in headless Edge:
the Buy button opens the sandbox checkout at $24.99, and a made-up key goes
to the sandbox validate endpoint with only the key and the organisation,
comes back 404, and Settings says it was not recognised, storing nothing.
The full yes path waits on a real sandbox key. Tests: 829 public, 30 private.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Seal is a protection, so it leaves Sieve Pro: everything that protects stays free and open source, as in BlockNSFW, and Pro is now the urge screen and streaks. common/seal.js and its tests come back to this repository, its settings move from Settings › Sieve Pro to Settings › Lock (after Cool-off), and the popup shows a running seal with or without Pro. The way out early is now held by a witness by default, as for the Pact: - common/totp.js and common/qr.js are ported from BlockNSFW's shared/ (standard TOTP, RFC 6238; its own QR encoder, no CDN), with their tests (the RFC 4226/6238 vectors, Reed-Solomon worked examples, a Seal key read back block by block). - Starting a seal with a witness shows a QR code to scan into their authenticator app, the key to type if they can't, and eight recovery codes, with a "Print for your witness" sheet. The seal starts only once their app shows a code that works, so a bad scan cannot leave a seal with no way out, and that code is spent so it cannot end the seal. The key and codes leave the page as it starts; recovery codes are kept only as hashes. - The Sealed dialog asks for the witness's six digits or a recovery code. Five wrong codes lock entry for 5 minutes, doubling to an hour. Codes are checked one at a time and the button waits, so a burst of guesses cannot slip past the count (found in the browser check; test added). - A printed key stays as the choice for someone with nobody to ask. Seals stored before today read as key seals. Tests: 876 public (seal 23, totp 11, qr 12), 18 private. Headless Edge, open-source build: 20 checks covering pairing, a wrong and a right code, the dialog, the spent code, the lockout, recovery and fresh codes, the printed key, the popup without Pro, and 390px. Pro build: 26 checks. Firefox lint unchanged: 0 errors, 15 warnings. Co-Authored-By: Claude Opus 5.5 <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.
Summary
Sieve 1.6.0: the Seal (free), and Sieve Pro, a one-time purchase ($24.99, sold through Polar) that adds comfort and insight on top. Every protection stays free and open source, as in BlockNSFW.
Free, in Settings › Lock:
common/totp.jsandcommon/qr.jsported from BlockNSFW) and keep 8 recovery codes. The seal starts only once their app shows a code that works, and that code is spent.Pro 1.0:
Open core, like BlockNSFW
The features are not open source. They live in the private repo
codepurse/Sieve-pro, checked out atpro-private/(gitignored), andpro/here holds an empty stand-in for each. Every protection stays in this repository, so a build from it blocks exactly what the store version does.build-pro.mjs(called by both build scripts) copies the real files over the stand-ins.pro-private/is there.-Ziprefuses without it, with uncommitted Pro changes, or whilecommon/pro.jscannot sell yet.-OpenSourceleaves Pro out. CI now builds that way and asserts the stand-ins shipped.common/pro.jsis the licence check, open source on purpose since it is the one network request.supporter.js.authenticationInfoas optional data and asks only when someone presses Activate.rules/gambling-rules.jsonnow sends?category=gambling, so blocks from the bundled list are finally counted on the dashboard.Before release (not needed to merge)
Until these are set, the Pro section stays hidden and store packages refuse to build:
common/pro.js(stores.live). The sandbox ones are in, and a-Sandboxbuild talks to Polar's sandbox. In Polar, set the licence-key benefit's activation limit to 3 and let customers deactivate.Testing
npm test(876):test/seal-test.mjs(23): witness pairing, the spent code, recovery codes, lockout, a burst of guesses, printed key.test/totp-test.mjsandtest/qr-test.mjs: the RFC vectors and QR read-back.test/pro-test.mjs: licence, places, refunds against places given back, Firefox consent.test/pro-standins-test.mjs: the stand-ins stay empty,pro-private/is never tracked, the Seal loads fromcommon/.npm run test:pro(18, private repo).dist/chrome:Stacked on #36 (Google Search cleanup); merge that first, and this PR retargets to
main.