Skip to content

1.6.0: the Seal (free, with a witness) and Sieve Pro (open core) - #37

Merged
codepurse merged 4 commits into
feature/google-search-cleanupfrom
feature/pro-1.0
Oct 30, 2026
Merged

codepurse merged 4 commits into
feature/google-search-cleanupfrom
feature/pro-1.0

Conversation

@codepurse

@codepurse codepurse commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

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:

  • The Seal locks protection until a date (a week, 30/90 days, a year). While it runs, every change the Guardian gate covers is refused, PIN and cool-off included.
    • The way out early is held by a witness, like BlockNSFW's Pact. They scan a QR code into their authenticator app (standard TOTP, common/totp.js and common/qr.js ported from BlockNSFW) and keep 8 recovery codes. The seal starts only once their app shows a code that works, and that code is spent.
    • Five wrong codes lock entry for 5 minutes, doubling to an hour, and codes are checked one at a time.
    • Or, with nobody to ask, a printed key shown once.

Pro 1.0:

  • The urge screen turns the block page into ninety seconds of breathing, the reader's own reason, a photo, and one tap to text, call or email someone they trust. Go back and Allow stay underneath.
  • Streaks: days since the last blocked attempt per habit, with "money kept" and the best run, in the popup and Settings.

Open core, like BlockNSFW

The features are not open source. They live in the private repo codepurse/Sieve-pro, checked out at pro-private/ (gitignored), and pro/ 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.
    • A plain build includes Pro when pro-private/ is there.
    • -Zip refuses without it, with uncommitted Pro changes, or while common/pro.js cannot sell yet.
    • -OpenSource leaves Pro out. CI now builds that way and asserts the stand-ins shipped.
  • common/pro.js is the licence check, open source on purpose since it is the one network request.
    • It uses Polar's public endpoints with the Monolab store BlockNSFW uses, and requires Sieve Pro's own benefit id, because the store is shared.
    • A key works in up to 3 browsers (activate, deactivate, "Remove from this browser"), ported from BlockNSFW's supporter.js.
    • Offline keeps the last answer; only a clear no turns Pro off.
    • Firefox declares authenticationInfo as optional data and asks only when someone presses Activate.
  • Hooks that do nothing without Pro: the block page hands its category to the urge screen, the popup shows streaks, and Settings gains a Sieve Pro section that is removed when the build carries no Pro. (The Guardian gate's seal check and the popup's seal line are part of the free Seal.)
  • Also: rules/gambling-rules.json now sends ?category=gambling, so blocks from the bundled list are finally counted on the dashboard.
  • PRIVACY.md describes exactly what is sent (key, shop id, a plain browser name), when, and that Firefox asks. README and the 1.6.0 notes explain what Pro is.

Before release (not needed to merge)

Until these are set, the Pro section stays hidden and store packages refuse to build:

  • Sieve Pro's live benefit id and checkout link in common/pro.js (stores.live). The sandbox ones are in, and a -Sandbox build talks to Polar's sandbox. In Polar, set the licence-key benefit's activation limit to 3 and let customers deactivate.
  • Chrome Web Store privacy form: declare "Authentication information".
  • One real yes from a Polar sandbox key (a made-up key already round-trips: 404, refused, nothing stored).

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.mjs and test/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 from common/.
  • npm run test:pro (18, private repo).
  • Headless Edge from dist/chrome:
    • Open-source build, 20 checks: the Seal in Lock with a witness (pairing, wrong and right codes, the dialog, the spent code, the lockout, recovery and fresh codes), the printed key, the popup without Pro, 390px.
    • Pro build, 26 checks: urge screen on bet365 in light, dark and 390px, streaks, popup lines, refunded licence.
    • 7 licence-box checks with fetch faked in the page.
    • A real round trip to Polar's sandbox.
  • Firefox lint: 0 errors, 15 warnings (baseline 17), with and without Pro.

Stacked on #36 (Google Search cleanup); merge that first, and this PR retargets to main.

codepurse and others added 2 commits October 29, 2026 11:29
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>
codepurse and others added 2 commits October 29, 2026 12:43
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>
@codepurse codepurse changed the title 1.6.0: Sieve Pro (open core) 1.6.0: the Seal (free, with a witness) and Sieve Pro (open core) Oct 29, 2026
@codepurse
codepurse merged commit 889c5e9 into feature/google-search-cleanup Oct 30, 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