diff --git a/backend/license/email/message.py b/backend/license/email/message.py index 18fee2beb6..59746c3deb 100644 --- a/backend/license/email/message.py +++ b/backend/license/email/message.py @@ -34,7 +34,7 @@ # It names the app's labels as they read: Allow, Sources, Jobs, Run, Security questionnaire. _FIRST_JOB_STEP = ( "5. Run your first job. When SurfSense asks to reach its license server, choose Allow, " - "and it downloads the job.\n" + "and it downloads your jobs.\n" " Then upload a questionnaire (.xlsx) and your policies to Sources, click Jobs in the " "left sidebar, and press Run beside Security questionnaire.\n" ) @@ -149,7 +149,8 @@ def _install_steps( ), "trial": ( "Your {days}-day SurfSense Business trial license is attached. It " - "unlocks the job plugins, starting with the security questionnaire.\n\n" + "unlocks the job plugins: the security questionnaire and the contract " + "redline.\n\n" "When it expires, SurfSense keeps working and everything you made stays " "readable; only new job runs stop." ), @@ -168,10 +169,10 @@ def _install_steps( "The attached file replaces the old one: import it in Settings -> " "License on each computer you use SurfSense on, or choose Check for " "renewal on the Jobs screen, which fetches it.\n\n" - "Business unlocks SurfSense's job plugins, starting with the security " - "questionnaire. The scraper plugins your Individual license included " - "have retired; reading web pages, YouTube and web search are now built " - "into SurfSense, free.\n\n" + "Business unlocks SurfSense's job plugins: the security questionnaire " + "and the contract redline. The scraper plugins your Individual license " + "included have retired; reading web pages, YouTube and web search are " + "now built into SurfSense, free.\n\n" "{term}" ), } diff --git a/backend/license/jobs.py b/backend/license/jobs.py index 3c826f7c67..d5c84152a6 100644 --- a/backend/license/jobs.py +++ b/backend/license/jobs.py @@ -12,9 +12,11 @@ from license.models import META_JOBS # Every job is in Business (ADR 0080, open question a); a new one is added here -# and the setup script is run again. +# and the setup script is run again. A license keeps the list it was issued with, +# so a job added once Business is on sale reaches no license sold before it. JOBS: dict[str, str] = { "JOB_QUESTIONNAIRE": "Security questionnaire", + "JOB_CONTRACT_REDLINE": "Contract redline", } diff --git a/backend/license/tests/test_business_purchase.py b/backend/license/tests/test_business_purchase.py index 72a60c77df..8281fb1445 100644 --- a/backend/license/tests/test_business_purchase.py +++ b/backend/license/tests/test_business_purchase.py @@ -10,6 +10,7 @@ from fastapi import FastAPI from license import router as license_router +from license.jobs import jobs_metadata from license.tests.billing_harness import ( BUSINESS_PRICE, PORTAL, @@ -99,7 +100,7 @@ async def test_a_business_checkout_creates_one_license_with_the_people_and_the_j "plan": "business", "email": "partner@acme.example", "firm": "Acme Accounting LLP", - "jobs": "JOB_QUESTIONNAIRE", + "jobs": jobs_metadata(), "stripeSubscriptionId": "sub_firm", "checkoutSessionId": "cs_business", "stripeCustomerId": "cus_firm", diff --git a/backend/license/tests/test_business_trial.py b/backend/license/tests/test_business_trial.py index e03b732ff9..2953cbd7e4 100644 --- a/backend/license/tests/test_business_trial.py +++ b/backend/license/tests/test_business_trial.py @@ -9,6 +9,7 @@ import pytest from license.email import deliver +from license.jobs import jobs_metadata from license.settings import config from license.tests.billing_harness import PORTAL, SentMail from license.tests.test_license_routes import FakeKeygen, keygen_store, mailer, post @@ -66,7 +67,7 @@ async def test_with_the_switch_on_the_trial_is_businesss( assert record["policy"] == "policy-business-trial" # Still a trial to the app and to the cohort report; the jobs say what it unlocks. assert record["attributes"]["metadata"]["plan"] == "trial" - assert record["attributes"]["metadata"]["jobs"] == "JOB_QUESTIONNAIRE" + assert record["attributes"]["metadata"]["jobs"] == jobs_metadata() (mail,) = sent assert mail.subject == "Your SurfSense Business 14-day trial license" assert "security questionnaire" in mail.text_body diff --git a/backend/license/tests/test_convert_individual_licenses.py b/backend/license/tests/test_convert_individual_licenses.py index fdc707921e..57ddbb23b4 100644 --- a/backend/license/tests/test_convert_individual_licenses.py +++ b/backend/license/tests/test_convert_individual_licenses.py @@ -749,7 +749,7 @@ async def test_apply_makes_the_license_business_solo_and_mails_one_notice( "stripeCustomerId": "cus_lic-solo", "trialKey": "solo@example.com", "note": "kept by support", - "jobs": "JOB_QUESTIONNAIRE", + "jobs": jobs.jobs_metadata(), # Found through its checkout, and written, as every Business license carries it. "stripeSubscriptionId": "sub_lic-solo", "convertedFrom": "individual", @@ -1590,7 +1590,7 @@ async def test_a_refund_of_its_first_year_suspends_a_converted_license( assert held(env)["attributes"]["status"] == "SUSPENDED" -async def test_a_converted_license_gets_its_job_and_resends_as_business( +async def test_a_converted_license_gets_every_job_and_resends_as_business( env: Billing, ) -> None: individual_buyer(env) @@ -1599,7 +1599,7 @@ async def test_a_converted_license_gets_its_job_and_resends_as_business( verdict = await license_verdict("KEY-lic-solo") (resent,) = await licenses_for_email("solo@example.com") - assert verdict == LicenseVerdict("VALID", ("JOB_QUESTIONNAIRE",)) + assert verdict == LicenseVerdict("VALID", tuple(jobs.JOBS)) assert BusinessCopy.of(resent) == BusinessCopy(people=1, paid=True) diff --git a/backend/license/tests/test_job_pack_route.py b/backend/license/tests/test_job_pack_route.py index 37a7ae5d67..a0cf7a9151 100644 --- a/backend/license/tests/test_job_pack_route.py +++ b/backend/license/tests/test_job_pack_route.py @@ -17,6 +17,7 @@ from license import token_bucket from license.job_packs import catalog +from license.jobs import jobs_metadata from license.portal import license_portal from license.settings import config from license.tests.github_fake import FakeGitHub @@ -28,6 +29,7 @@ FIRM = "lic-firm" KEY = f"KEY-{FIRM}" DDQ = ("sample-ddq", "workbook-rows/1", "JOB_DDQ") +REDLINE = ("contract-redline", "word-clauses/1", "JOB_CONTRACT_REDLINE") UNAVAILABLE = "Jobs cannot be downloaded right now. Try again later." @@ -91,6 +93,22 @@ async def test_a_business_trial_gets_the_pack( assert reply.status_code == 200 +async def test_a_business_license_gets_the_contract_redline_from_its_own_pack( + pack_portal: PackPortal, trusted_pack_key +) -> None: + """Business sells it beside the questionnaire, and every Business license lists both.""" + licensed(pack_portal, jobs=jobs_metadata()) + write_pack(pack_portal.packs) + write_pack(pack_portal.packs, pack_id="surfsense-contract-redline", jobs=(REDLINE,)) + + reply = await pack_portal.ask( + KEY, "JOB_CONTRACT_REDLINE", runners=("workbook-rows/1", "word-clauses/1") + ) + + assert reply.status_code == 200 + assert reply.headers["x-job-pack-id"] == "surfsense-contract-redline" + + async def test_jobs_written_with_spaces_still_match( pack_portal: PackPortal, trusted_pack_key ) -> None: diff --git a/backend/license/tests/test_message.py b/backend/license/tests/test_message.py index 4bad964e43..a04d7726e8 100644 --- a/backend/license/tests/test_message.py +++ b/backend/license/tests/test_message.py @@ -7,6 +7,7 @@ import pytest from license.email.message import ACTIVATION_GUIDE_URL, build_license_email +from license.jobs import JOBS pytestmark = pytest.mark.unit @@ -199,6 +200,23 @@ def test_the_business_trial_says_what_stops_and_names_no_portal(monkeypatch): assert "https://portal.test/p" not in message.text_body +@pytest.mark.parametrize("kind", ["trial", "conversion"]) +def test_the_business_trial_and_the_conversion_notice_name_every_job(kind): + """Each says what the license unlocks, and its `jobs` lists every job Business sells.""" + term = {"renews_on": date(2027, 10, 26)} if kind == "conversion" else {} + body = build_license_email( + kind, + to="a@b.test", + certificates=("CERT",), + business=business(people=1, **term), + ).text_body + + # The intro, not the first-job step, which names only the questionnaire. + intro = body.split("1. Install SurfSense", 1)[0].lower() + for name in JOBS.values(): + assert name.lower() in intro + + def test_only_a_paid_business_license_resent_names_the_portal(monkeypatch): """Resend takes a trial's copy when the address holds no paid license, and a trial has no subscription to change or cancel.""" @@ -235,7 +253,8 @@ def test_a_business_purchase_trial_or_conversion_ends_with_the_first_job(kind): for words in ( "5. Run your first job.", - "choose Allow", + # Allowing downloads every job the license lists, not only the one run here. + "choose Allow, and it downloads your jobs.", "click Jobs in the left sidebar", "press Run beside Security questionnaire", ): @@ -326,8 +345,8 @@ def test_the_conversion_notice_says_what_changed_and_what_stays(monkeypatch): "The attached file replaces the old one: import it in Settings -> License " "on each computer you use SurfSense on, or choose Check for renewal on the " "Jobs screen, which fetches it.", - "Business unlocks SurfSense's job plugins, starting with the security " - "questionnaire.", + "Business unlocks SurfSense's job plugins: the security questionnaire and " + "the contract redline.", "The scraper plugins your Individual license included have retired; reading " "web pages, YouTube and web search are now built into SurfSense, free.", # Its buyer may never have read that it renews: the notice names the day. diff --git a/backend/license/tests/test_setup_business_policies.py b/backend/license/tests/test_setup_business_policies.py index 83f3346144..a87c64c87e 100644 --- a/backend/license/tests/test_setup_business_policies.py +++ b/backend/license/tests/test_setup_business_policies.py @@ -14,6 +14,7 @@ import pytest from license import keygen +from license.jobs import JOBS from license.scripts.setup_business_policies import SetupError, setup from license.settings import config @@ -150,17 +151,20 @@ def business_policies(account: FakeAccount) -> dict[str, dict]: } -async def test_a_first_run_creates_both_policies_and_the_job_on_each( +async def test_a_first_run_creates_both_policies_and_every_job_on_each( account: FakeAccount, ) -> None: lines = await setup() ours = business_policies(account) assert set(ours) == {"business", "business-trial"} - (job,) = account.entitlements.values() - assert job["attributes"]["code"] == "JOB_QUESTIONNAIRE" + created = { + entitlement["attributes"]["code"]: entitlement["attributes"]["name"] + for entitlement in account.entitlements.values() + } + assert created == JOBS for policy in ours.values(): - assert account.attached[policy["id"]] == {next(iter(account.entitlements))} + assert account.attached[policy["id"]] == set(account.entitlements) assert lines == [ f"KEYGEN_POLICY_BUSINESS={ours['business']['id']}", f"KEYGEN_POLICY_BUSINESS_TRIAL={ours['business-trial']['id']}", @@ -201,17 +205,16 @@ async def test_a_second_run_creates_nothing(account: FakeAccount) -> None: async def test_a_new_job_is_created_and_attached_on_a_rerun( account: FakeAccount, monkeypatch: pytest.MonkeyPatch ) -> None: - from license import jobs - await setup() - monkeypatch.setitem(jobs.JOBS, "JOB_RFP", "RFP responses") + sold = set(JOBS) + monkeypatch.setitem(JOBS, "JOB_RFP", "RFP responses") await setup() codes = {e["attributes"]["code"] for e in account.entitlements.values()} - assert codes == {"JOB_QUESTIONNAIRE", "JOB_RFP"} + assert codes == sold | {"JOB_RFP"} for policy in business_policies(account).values(): - assert len(account.attached[policy["id"]]) == 2 + assert len(account.attached[policy["id"]]) == len(sold) + 1 async def test_the_live_policies_are_only_read(account: FakeAccount) -> None: diff --git a/docs/architecture/license/portal.md b/docs/architecture/license/portal.md index 961142455d..deadb23401 100644 --- a/docs/architecture/license/portal.md +++ b/docs/architecture/license/portal.md @@ -5,7 +5,7 @@ The one [backend](../backend.md) sells, delivers and re-delivers the desktop app **Code:** [`backend/license/`](../../../backend/license/), [`backend/mailer/`](../../../backend/mailer/), [`www/app/(home)/license/`](../../../www/app/\(home\)/license/) **Decisions:** [ADR 0024](../../adr/0024-portal-without-accounts.md), [ADR 0019](../../adr/0019-offline-licenses.md), [ADR 0080](../../adr/0080-surfsense-sells-one-business-license-priced-per-person.md) (one Business license, priced per person), [ADR 0082](../../adr/0082-the-license-server-delivers-job-packs-from-private-releases.md) -What the routes produce is [contract 1](../../contracts/01-license-file.md), which the [desktop app](app.md) consumes, and for job packs [contract 6](../../contracts/06-job-pack-delivery.md), which no app on dev reads yet. +What the routes produce is [contract 1](../../contracts/01-license-file.md), which the [desktop app](app.md) consumes, and for job packs [contract 6](../../contracts/06-job-pack-delivery.md), which the app's job delivery reads ([jobs](../jobs.md#delivery)). ## Routes @@ -46,7 +46,7 @@ The file is never in the response. Delivery to a real inbox is what makes one tr The expiry is `max(now, LICENSE_TRIAL_EXPIRY_FLOOR) + LICENSE_TRIAL_DAYS`, 14 days by default. The floor is for trials issued before the first plugin ships, so the wait does not eat the trial. Unset, the rule is plain "days from now"; an unparseable floor is ignored with a warning. -`LICENSE_TRIAL_BUSINESS`, off by default, switches the route to Business's trial on launch day. The trial is then a `trial` on the `KEYGEN_POLICY_BUSINESS_TRIAL` policy, with `jobs` in its metadata, mailed in the Business copy. Its derived id is `business-trial:` and its `trialKey` check filters on that policy, so a person who took the earlier trial, which unlocked only the scrapers, can still try the job once. The plan stays `trial`, so the app and the [cohort report](#cohort-report) count it as one. With the switch on and the policy unset, the route answers 503 before any Keygen call, since a trial on the old policy would spend the address on a trial without the job. +`LICENSE_TRIAL_BUSINESS`, off by default, switches the route to Business's trial on launch day. The trial is then a `trial` on the `KEYGEN_POLICY_BUSINESS_TRIAL` policy, with `jobs` in its metadata, mailed in the Business copy. Its derived id is `business-trial:` and its `trialKey` check filters on that policy, so a person who took the earlier trial, which unlocked only the scrapers, can still try the jobs once. The plan stays `trial`, so the app and the [cohort report](#cohort-report) count it as one. With the switch on and the policy unset, the route answers 503 before any Keygen call, since a trial on the old policy would spend the address on a trial without the jobs. ### `POST /license/refresh` @@ -76,7 +76,7 @@ Then `204` when `installed_version` is that version or newer, or else `200` with Unlike the refresh, `EXPIRED` gets nothing. A Business license's expiry already falls 30 days after the year paid for, and a trial ends at its expiry, so a lapsed license keeps the pack it has and gets no newer one, though the refresh still serves it its file. `jobs` is read as the app reads it, and Keygen's policy entitlements are not read, so the server never sends a pack the app would keep locked. Coverage is why every job of a paid pack carries an entitlement: the app installs every job of a pack it accepts, so a pack holding a job the license lacks is withheld whole. It has its own code, `pack_not_covered`, since the license does list the job asked for and the app must not say it does not. The runner filter is why an older app is never sent a pack it would refuse: a pack that needs a new runner or a later schema names a runner only the apps that have it list. -The server keeps nothing about a request beyond the rate limits' counts, dropped an hour after the caller's last request, and its access log line; Keygen notes when the license was last validated. The route's own logs carry no key, address or body, and no analytics event is sent for a delivery. No app on dev calls it yet: the app's side is on the `feat/jobs-in-app` branch. +The server keeps nothing about a request beyond the rate limits' counts, dropped an hour after the caller's last request, and its access log line; Keygen notes when the license was last validated. The route's own logs carry no key, address or body, and no analytics event is sent for a delivery. The app asks once for each job its license lists ([jobs](../jobs.md#delivery)). ### Stripe webhook @@ -137,7 +137,7 @@ Every check-out follows an unscoped validation (`fresh_file.py`): `POST /license The [job pack route](#post-licensejob-pack) validates the same way, `validate-key` unscoped as the product token (`job_packs/verdict.py`), but passes `VALID` alone and checks nothing out. A file only restates the expiry the app already shows, so `EXPIRED` may have one; a pack is a newer job to run, which a lapsed license does not get. -Each plan has its own policy, and `jobs.py` lists the job entitlement codes, `JOB_QUESTIONNAIRE` first: the setup script attaches each to both Business policies, where Keygen holds them, and every Business license and trial copies them into `jobs`. `jobs` is the one list both sides read. The app unlocks a job from it offline, and the job pack route reads it from `validate-key`'s answer as the app reads it (`jobs_of()`): split on commas, each code trimmed, empty and repeated codes dropped, and nothing at all from a value that is not a string. The policies' entitlements, which every license on a policy inherits and which can disagree with `jobs`, are never read, so the server never delivers a pack the app would keep locked. +Each plan has its own policy, and `jobs.py` lists the job entitlement codes, `JOB_QUESTIONNAIRE` and then `JOB_CONTRACT_REDLINE`: the setup script attaches each to both Business policies, where Keygen holds them, and every Business license and trial copies them into `jobs`. `jobs` is the one list both sides read. The app unlocks a job from it offline, and the job pack route reads it from `validate-key`'s answer as the app reads it (`jobs_of()`): split on commas, each code trimmed, empty and repeated codes dropped, and nothing at all from a value that is not a string. The policies' entitlements, which every license on a policy inherits and which can disagree with `jobs`, are never read, so the server never delivers a pack the app would keep locked. | Policy | Setting | Made by | |---|---|---| @@ -191,9 +191,9 @@ The caller's address comes from `get_real_client_ip()` (`client_ip.py`), which r `email/message.py` builds the five license messages, `purchase`, `resend`, `trial`, `renewal` and `conversion`, sent from `SMTP_LICENSE_FROM` or else `SMTP_FROM`, with `SMTP_LICENSE_REPLY_TO`. The file travels as `surfsense.lic`, numbered when one resend carries several, typed `application/octet-stream` so no mail client renders it inline and mangles its line endings. The install steps link each platform's installer through the site's download redirect, `https://www.surfsense.com/downloads/?src=email&v=`, with the tag pinned in `release.py`. The `v` keeps a mail already sent naming the build it was sent for, and the redirect counts the downloads mail produces ([updates](../updates.md#download-links)). -A Business license or trial gets its own copy of each, chosen by `BusinessCopy.of()` for a license on the business plan or one that lists `jobs`, and a resend takes it when any of its files is one, a paid license's copy before a trial's. The Individual purchase mail promises that the file works on every machine and that the app sends the license key to the license server only when the user chooses Check for renewal; neither holds for Business, whose jobs the app downloads by itself, whose renewed file it fetches, and which counts people, so the Business copy says neither. It names the firm and how many people the license covers, says it renews every year on the same key until cancelled, and gives `STRIPE_CUSTOMER_PORTAL_URL`, the customer portal's login link, for adding or removing people and cancelling, or says to reply when that is unset; SurfSense still has no accounts. Only mail that carries a paid Business license names the portal: a trial has no subscription to change or cancel, so neither its own mail nor a resend or correction of it does. The Business trial says only new job runs stop when it expires. The renewal mail, sent for every plan, carries the renewed file and asks for it to be imported; the Individual copy of it is the only way that renewal reaches the app. The Business purchase, trial and conversion mails add a fifth step: when the app asks to reach the license server, allow it, so it downloads the job, then upload a questionnaire and policies to Sources and press Run beside Security questionnaire in Jobs. A converted buyer has the app but has never run a job, and their purchase mail said the app reaches the license server only on Check for renewal, so the Allow step is new to them too. Resend and renewal mails, and every Individual mail, keep four steps. +A Business license or trial gets its own copy of each, chosen by `BusinessCopy.of()` for a license on the business plan or one that lists `jobs`, and a resend takes it when any of its files is one, a paid license's copy before a trial's. The Individual purchase mail promises that the file works on every machine and that the app sends the license key to the license server only when the user chooses Check for renewal; neither holds for Business, whose jobs the app downloads by itself, whose renewed file it fetches, and which counts people, so the Business copy says neither. It names the firm and how many people the license covers, says it renews every year on the same key until cancelled, and gives `STRIPE_CUSTOMER_PORTAL_URL`, the customer portal's login link, for adding or removing people and cancelling, or says to reply when that is unset; SurfSense still has no accounts. Only mail that carries a paid Business license names the portal: a trial has no subscription to change or cancel, so neither its own mail nor a resend or correction of it does. The Business trial names the jobs it unlocks, the security questionnaire and the contract redline, and says only new job runs stop when it expires. The renewal mail, sent for every plan, carries the renewed file and asks for it to be imported; the Individual copy of it is the only way that renewal reaches the app. The Business purchase, trial and conversion mails add a fifth step: when the app asks to reach the license server, allow it, so it downloads the license's jobs, then upload a questionnaire and policies to Sources and press Run beside Security questionnaire in Jobs; the step runs the questionnaire alone. A converted buyer has the app but has never run a job, and their purchase mail said the app reaches the license server only on Check for renewal, so the Allow step is new to them too. Resend and renewal mails, and every Individual mail, keep four steps. -The conversion notice, "Your SurfSense license is now Business Solo", is sent once to an Individual license the [conversion script](#converting-individual-licenses) has made Business Solo, and has only the Business copy. It says the license is now Business Solo, the Business license for one person, on the same key; that the attached file replaces the old one, imported in Settings -> License on each computer or fetched by Check for renewal on the Jobs screen; that Business unlocks the job plugins, starting with the security questionnaire; that the scraper plugins the license included have retired, and reading web pages, YouTube and web search are built into SurfSense, free; and that the purchase is a yearly subscription that renews automatically on the day its period ends, named, and every year after, at the price paid, on the same key, until cancelled, followed by the portal or reply line. The day is named because the Individual page has said since 21 Oct 2026 that the purchase is one payment, not a subscription, that charges nothing again, while Stripe holds yearly subscriptions. A license whose subscription is set to cancel or cancelled, or that was paid once, is told instead the day it ends, that it does not renew, and that after it SurfSense keeps working and only new job runs stop. One set to cancel is told it can keep the license by renewing in the portal before its period ends, named, or by replying before that day when the portal is unset, since Stripe's portal lets a customer renew only until the period ends, a month before the license's grace runs out; a cancelled one or one paid once gets no portal or reply line. The notice cannot be built without the day it renews or ends. It names no price, since Stripe's subscription holds it. A later resend of a converted license takes the ordinary Business copy, so it names the portal for adding people or cancelling even when the license does not renew. +The conversion notice, "Your SurfSense license is now Business Solo", is sent once to an Individual license the [conversion script](#converting-individual-licenses) has made Business Solo, and has only the Business copy. It says the license is now Business Solo, the Business license for one person, on the same key; that the attached file replaces the old one, imported in Settings -> License on each computer or fetched by Check for renewal on the Jobs screen; that Business unlocks the job plugins, the security questionnaire and the contract redline; that the scraper plugins the license included have retired, and reading web pages, YouTube and web search are built into SurfSense, free; and that the purchase is a yearly subscription that renews automatically on the day its period ends, named, and every year after, at the price paid, on the same key, until cancelled, followed by the portal or reply line. The day is named because the Individual page has said since 21 Oct 2026 that the purchase is one payment, not a subscription, that charges nothing again, while Stripe holds yearly subscriptions. A license whose subscription is set to cancel or cancelled, or that was paid once, is told instead the day it ends, that it does not renew, and that after it SurfSense keeps working and only new job runs stop. One set to cancel is told it can keep the license by renewing in the portal before its period ends, named, or by replying before that day when the portal is unset, since Stripe's portal lets a customer renew only until the period ends, a month before the license's grace runs out; a cancelled one or one paid once gets no portal or reply line. The notice cannot be built without the day it renews or ends. It names no price, since Stripe's subscription holds it. A later resend of a converted license takes the ordinary Business copy, so it names the portal for adding people or cancelling even when the license does not renew. ## Keygen @@ -252,6 +252,8 @@ Each copy of the backend keeps its own cache and reads the store on its own, so A pack is published from the maintainer's machine, where the signing key is, by `tools/publish_pack.py` in the private pack repository: it checks a sealed, signed pack with the app's checks and the server's, refuses a version that is not higher or a second id for an entitlement, zips it and runs `gh release create`. A published version never changes: a fix is a new, higher version, and every later pack with a job for an entitlement keeps the id of the first. +Each job is a pack of its own: the security questionnaire's id is `surfsense-security-questionnaire` and the contract redline's `surfsense-contract-redline`. Apart, a license that lacks one of the two, or an app without one's runner, still gets the other's updates: coverage withholds a pack holding a job the license does not list, and the runner filter one needing a runner the app does not ship ([the route](#post-licensejob-pack)). An id is bound to its entitlement once published, so the two can never merge. + `python -m license.scripts.list_job_packs`, in the backend's container, reads the configured store, downloads and checks every asset, and prints a line for each job it would serve, ` : () for `, one for each refused asset with its code, and one for each asset it could not download. It exits 1 when no store is set, the store cannot be read or nothing passes, and never prints the token. ### Runbook @@ -263,13 +265,14 @@ A pack is published from the maintainer's machine, where the signing key is, by 5. **Coolify.** On the backend's Coolify application, add `JOB_PACKS_GITHUB_REPO=MODSetter/surfsense-job-packs` and `JOB_PACKS_GITHUB_TOKEN` as a runtime-only secret, leave `JOB_PACKS_DIR`, the cache and the rate limits at their defaults (`REDIS_URL` is optional), and redeploy, not restart. 6. **Check without a key.** `curl -s -X POST https://api.surfsense.com/api/v1/license/job-pack -H 'Content-Type: application/json' -d '{"key":"x","entitlement":"JOB_NOT_SOLD","runners":["workbook-rows/1"]}'` must answer `422` `unknown_job`; a bare `404` means the deploy lacks the route or `KEYGEN_API_TOKEN`. In the backend's Coolify terminal, `python -m license.scripts.list_job_packs` must end with "No job pack passes its checks, so none is served.", not "The job pack store cannot be read", which names what failed. 7. **Keygen.** Before the switch, run the live contract suite against CE once, `KEYGEN_INTEGRATION=1 uv run pytest license/tests/test_keygen_contract.py`, which proves `validate-key` carries a license's `jobs` and, with `KEYGEN_POLICY_BUSINESS` set, that the two policies pass the [conversion](#converting-individual-licenses)'s check and a license on the Individual policy moves to the Business policy with its key, metadata and expiry. -8. **The first pack**, on the maintainer's machine, from `surfsense_local/backend` in a SurfSense checkout at the release that ships the Jobs screen: run `uv sync` in that checkout's `backend/` first, since `publish_pack.py` runs the server's checks with the packages in `backend/.venv`; check the pack's seal and signature, re-sealing and re-signing only if a file changed; run `publish_pack.py` with `--repo MODSetter/surfsense-job-packs --dry-run`, then without `--dry-run`. `list_job_packs` then names the pack, and the route serves it within 10 minutes. -9. **End to end**, with a real Business or Business trial license in the released app: add the license, choose Allow at "Allow downloading your jobs?", and Jobs shows the job ready to Run. To try the route with curl instead, put the body with the key in a file, send it with `--data @body.json`, then delete the file: a key never goes on a command line or in a URL. -10. **At the switch**, on one day and in this order: publish the app release with the Jobs screen, with `release.py`'s pin pointing the mails at it; publish the first pack; flip www's `NEXT_PUBLIC_BUSINESS_LAUNCHED`; then, with `KEYGEN_POLICY_BUSINESS_TRIAL` set and `LICENSE_TRIAL_ENABLED=TRUE`, set `LICENSE_TRIAL_BUSINESS=TRUE` and redeploy. A trial claimed at `/downloads` with your own address must bring "Your SurfSense Business 14-day trial license" with step 5, and adding it must download the job. Never earlier: trial mails would point at a missing screen, and downloads would answer `503`. Last, in the backend's container, run `python -m license.scripts.convert_individual_licenses`, check the licenses it lists, each one's renewal day and its expiry as Business Solo against its subscription in Stripe, the renewal day plus 30 days, and the reasons it skips the rest. A license whose payment was refunded or disputed before this release is skipped as a support case, since the server before it could not trace a subscription's refund and handled no dispute: suspend it by hand. One whose discounted first year renews at a higher price is skipped too, since its notice would promise the price paid. With a restricted `STRIPE_SECRET_KEY`, the key must read what the script reads: Checkout Sessions, Subscriptions with their discounts, Invoices, Invoice Payments and Charges; a read it refuses fails that license and changes nothing. In Stripe's customer portal settings, let customers update the quantity of subscriptions on the Individual price's product, as on Business's: the notice to a license that renews, and every later mail to it, says to add or remove people in the portal. Then run it again with `--apply` ([converting Individual licenses](#converting-individual-licenses)); its notice names the Jobs screen and the web reading built into the release, so it waits for them too. -11. **Replacing the token**, before it expires: make a new one as above, replace the Coolify secret, redeploy, run `list_job_packs`, then delete the old token. A lapsed token logs "GitHub refused JOB_PACKS_GITHUB_TOKEN: it is wrong or has expired" at each read of the store, at most once a minute while requests come, and the packs in memory keep being served until the next restart. -12. **Emergency**, when GitHub or the token is down at a restart: mount Coolify persistent storage at `/srv/remote/job-packs`, copy the published zip into it, set `JOB_PACKS_DIR=/srv/remote/job-packs` and redeploy; unset it once GitHub is back. -13. **Rotating the pack signing key.** Release apps whose `PACK_PUBLIC_KEYS_HEX` holds the new key, and add it to `job_packs/signature.py`; sign packs with both keys, one line each, until the apps that trust only the old key have aged out; then sign with the new key alone and drop the old one from both lists. On a leak, drop the key from the server's list and redeploy at once, which stops delivery of the packs it signed; publish the next version of each, signed with the remaining key alone, since a published version never changes; and ship an app without the leaked key. -14. **A computer that cannot reach the server.** Support sends the published zip for the customer's job by hand, and only to a license that includes the job. +8. **The packs**, on the maintainer's machine, from `surfsense_local/backend` in a SurfSense checkout at the switch release, which ships the Jobs screen and both runners, `workbook-rows/1` and `word-clauses/1`: run `uv sync` in that checkout's `backend/` first, since `publish_pack.py` runs the server's checks with the packages in `backend/.venv`. Two packs go out, each under its own id ([publishing](#publishing)): `surfsense-security-questionnaire` for `JOB_QUESTIONNAIRE` and `surfsense-contract-redline` for `JOB_CONTRACT_REDLINE`. For each, check its seal and signature, re-sealing and re-signing only if a file changed, then run `publish_pack.py` on its folder with `--repo MODSetter/surfsense-job-packs --dry-run`, then without `--dry-run`. `list_job_packs` then prints a line for each, the redline's as `surfsense-contract-redline : contract-redline (word-clauses/1) for JOB_CONTRACT_REDLINE`, and the route serves both within 10 minutes. +9. **The new job in Keygen.** With the switch release's backend deployed, in its container, run the setup script again with the admin token in `KEYGEN_API_TOKEN` for that run only, as for its first run, since a product token cannot create entitlements. Run it with `--dry-run` first, which must list `JOB_CONTRACT_REDLINE` as to be created and attached to both Business policies, then without `--dry-run`, and without `--product-token`, which would make another token. Nothing reads the policies' entitlements, so this keeps Keygen in step with `jobs.py` and gives no license a job: what a license unlocks is its `jobs`. +10. **End to end, both jobs**, with a Business or Business trial license issued once the switch release's backend is deployed, so its `jobs` lists both codes; one issued before lists only the questionnaire, for good. In the released app, add the license and choose Allow at "Allow downloading your jobs?": Jobs shows Security questionnaire and Contract redline, each ready to Run. Run each once, the questionnaire on an Excel workbook (.xlsx) with your policies and the redline on a Word contract (.docx) with a playbook, and each makes a revised copy in Studio. To try the route with curl instead, put the body with the key in a file and send it with `--data @body.json`, once for each code, the redline's with `"runners": ["workbook-rows/1", "word-clauses/1"]`, then delete the file: a key never goes on a command line or in a URL. +11. **At the switch**, on one day and in this order: publish the app release with the Jobs screen and both runners, with `release.py`'s pin pointing the mails at it; redeploy the backend from it, so `jobs.py` lists both jobs, and run the setup script again (step 9); publish both packs; flip www's `NEXT_PUBLIC_BUSINESS_LAUNCHED`; then, with `KEYGEN_POLICY_BUSINESS_TRIAL` set and `LICENSE_TRIAL_ENABLED=TRUE`, set `LICENSE_TRIAL_BUSINESS=TRUE` and redeploy. A trial claimed at `/downloads` with your own address must bring "Your SurfSense Business 14-day trial license", naming both jobs, with step 5, and adding it must download both jobs. Never earlier: trial mails would point at a missing screen, and downloads would answer `503`. Last, in the backend's container, run `python -m license.scripts.convert_individual_licenses`, check the licenses it lists, each one's renewal day and its expiry as Business Solo against its subscription in Stripe, the renewal day plus 30 days, and the reasons it skips the rest. A license whose payment was refunded or disputed before this release is skipped as a support case, since the server before it could not trace a subscription's refund and handled no dispute: suspend it by hand. One whose discounted first year renews at a higher price is skipped too, since its notice would promise the price paid. With a restricted `STRIPE_SECRET_KEY`, the key must read what the script reads: Checkout Sessions, Subscriptions with their discounts, Invoices, Invoice Payments and Charges; a read it refuses fails that license and changes nothing. In Stripe's customer portal settings, let customers update the quantity of subscriptions on the Individual price's product, as on Business's: the notice to a license that renews, and every later mail to it, says to add or remove people in the portal. Then run it again with `--apply` ([converting Individual licenses](#converting-individual-licenses)); its notice names the Jobs screen, both jobs and the web reading built into the release, so it waits for them too. The contract redline ships in this release, so every Business license, Business trial and converted Business Solo license is issued with `jobs.py` already listing it, and no backfill is needed: only a license made before the backend's redeploy, such as a hand test's, lacks it, and keeps that list ([known gaps](#known-gaps)). +12. **Replacing the token**, before it expires: make a new one as above, replace the Coolify secret, redeploy, run `list_job_packs`, then delete the old token. A lapsed token logs "GitHub refused JOB_PACKS_GITHUB_TOKEN: it is wrong or has expired" at each read of the store, at most once a minute while requests come, and the packs in memory keep being served until the next restart. +13. **Emergency**, when GitHub or the token is down at a restart: mount Coolify persistent storage at `/srv/remote/job-packs`, copy each published zip into it, set `JOB_PACKS_DIR=/srv/remote/job-packs` and redeploy; unset it once GitHub is back. +14. **Rotating the pack signing key.** Release apps whose `PACK_PUBLIC_KEYS_HEX` holds the new key, and add it to `job_packs/signature.py`; sign packs with both keys, one line each, until the apps that trust only the old key have aged out; then sign with the new key alone and drop the old one from both lists. On a leak, drop the key from the server's list and redeploy at once, which stops delivery of the packs it signed; publish the next version of each, signed with the remaining key alone, since a published version never changes; and ship an app without the leaked key. +15. **A computer that cannot reach the server.** Support sends, by hand, the published zip of each job the customer's license includes, and of no other. ## Files @@ -346,7 +349,7 @@ python -m license.scripts.setup_business_policies --dry-run python -m license.scripts.setup_business_policies --product-token ``` -It reads the live trial, individual and team policies for their product and signing scheme and writes nothing to them. It finds its own policies by `metadata.surfsensePolicy` among the product's, so a rename does not make a second run create them again; creates whichever of the two is missing, each entitlement in `jobs.py` that is missing, and attaches the missing ones to both. It refuses, before any write, when a live policy setting is unset, the live policies span products, or one of its policies has been made strict. It prints the `KEYGEN_POLICY_BUSINESS` and `KEYGEN_POLICY_BUSINESS_TRIAL` lines, and with `--product-token` a new product token, shown once. A second run without `--product-token` creates nothing; each run with it makes another product token, valid until it is revoked in Keygen. A job added to `jobs.py` is created and attached by the next run. +It reads the live trial, individual and team policies for their product and signing scheme and writes nothing to them. It finds its own policies by `metadata.surfsensePolicy` among the product's, so a rename does not make a second run create them again; creates whichever of the two is missing, each entitlement in `jobs.py` that is missing, and attaches the missing ones to both. It refuses, before any write, when a live policy setting is unset, the live policies span products, or one of its policies has been made strict. It prints the `KEYGEN_POLICY_BUSINESS` and `KEYGEN_POLICY_BUSINESS_TRIAL` lines, and with `--product-token` a new product token, shown once. A second run without `--product-token` creates nothing; each run with it makes another product token, valid until it is revoked in Keygen. A job added to `jobs.py` is created and attached by the next run, as the contract redline is at the switch ([runbook](#runbook), step 9). ## Pages @@ -358,7 +361,7 @@ In `www`, all public routes: - Both forms are one email pill (`www/features/license/license-forms.tsx`), and a successful send links on to `/license/activate`. Confetti (`www/features/celebration/`) loads only when it fires and is skipped under reduced motion. - `/pricing/individual` sits between the pricing card and the Stripe Payment Link (`NEXT_PUBLIC_STRIPE_LICENSE_INDIVIDUAL_URL`): what the licence unlocks, the renewal, what happens after paying, the refund. Its Continue to checkout button appends `client_reference_id=` and captures `checkout_started` by beacon, with `plan: individual`. The channel is the first-touch `?ref` code or `utm_source` the site already records, else the referring site's domain, else `direct` (`www/features/funnel-attribution/`), and never a person or browser id. The Payment Link's after-payment redirect must be `https://www.surfsense.com/license/success?session_id={CHECKOUT_SESSION_ID}`. The page says the confirmation page downloads the file and that nothing charges again, while the live Payment Link sells a yearly subscription; a paid renewal now extends the same license ([subscriptions](#subscriptions)). - `/license/activate` is the activation guide the mail links to. -- Business waits behind `NEXT_PUBLIC_BUSINESS_LAUNCHED` (`www/features/business-launch/`), off until the release that ships the first paid job. Off, every page above reads as it does today and `/pricing/business` is a 404. On, `/pricing` lists Free, Business and Enterprise; `/pricing/business` sits between the Business card and its Payment Link (`NEXT_PUBLIC_STRIPE_LICENSE_BUSINESS_URL`, a yearly recurring price whose after-payment redirect is the same `/license/success` address), states the yearly renewal above its button, and captures `checkout_started` with `plan: business`; `/pricing/individual` redirects to it, permanently; and the trial form, `/license/activate` and `/license/success` describe the 14-day trial of the job and a license that renews, with no line saying it works on every computer. +- Business waits behind `NEXT_PUBLIC_BUSINESS_LAUNCHED` (`www/features/business-launch/`), off until the release that ships the paid jobs. Off, every page above reads as it does today and `/pricing/business` is a 404. On, `/pricing` lists Free, Business and Enterprise; `/pricing/business` sits between the Business card and its Payment Link (`NEXT_PUBLIC_STRIPE_LICENSE_BUSINESS_URL`, a yearly recurring price whose after-payment redirect is the same `/license/success` address), states the yearly renewal above its button, and captures `checkout_started` with `plan: business`; `/pricing/individual` redirects to it, permanently; and the trial form, `/license/activate` and `/license/success` describe the 14-day trial of the jobs and a license that renews, with no line saying it works on every computer. The pages state two dead ends plainly. An enterprise license is one file sent only to the buying address, so a colleague asks the buyer to forward it. A lost or mistyped inbox has no self-serve path, because a form that mailed a license to a newly typed address would be a way to steal one. @@ -422,18 +425,17 @@ No address, domain, licence id or key is printed or sent. A count under 5 prints ## Tests -Under `backend/license/tests/` and `backend/mailer/tests/`, run from `backend/` with `uv run pytest license mailer`. `test_funnel_events.py` covers the channel tag rules and the purchase event: its exact properties, nothing personal in it, and one event when the webhook and the success page both fulfil. `test_issue.py` covers Keygen payload shapes, metadata filter syntax, the CE headers, trial expiry, address folding, the disposable-domain check, plan resolution, derived ids, both duplicate-id answers and a refused suspension of a license not suspended; `test_message.py` and `test_release.py` cover the mail, the Individual purchase mail's promises, which no Business mail makes, the first-job step in the Business purchase, trial and conversion mails alone, the billing portal named only with a paid Business license, the conversion notice's words, with the day it renews and its portal or reply line, the day it ends for a license that does not renew, with how to keep one set to cancel, no notice without either day, no price and no Individual copy, and the mail's pinned redirect links; `test_mail_guard.py` covers the mail check both POST routes run before Keygen; `test_trial_disposable.py` covers the trial's refusal of a disposable address before Keygen; `test_trial_correction_lookup.py` covers the support lookup of a trial by its exact address, the trial kind picking one of an address's two trials, and the script's `--trial-kind` reaching the lookup as that trial's policy, refused beside `--session` or with the policy unset. `backend/mailer/tests/` covers the SMTP error mapping, MIME shape, senders and configuration checks, and its `test_smtp_contract.py` sends through a real SMTP conversation against Mailpit when `SMTP_INTEGRATION=1`. `test_license_routes.py` drives the three routes over HTTP with Keygen faked at its transport, so the code under them runs as written, and the mailer faked at the router: resend's one answer for every outcome, asserted from the mailer side, including a license that is only suspended, and its 503 when mail is off before any lookup; each trial outcome, never with the file in the body, and a tagged address refused once the folded one holds a trial; `license_trial_issued` with only the channel, a bad channel dropped, and no event for a trial not issued; the success page's file and its 404; both rate-limit buckets biting, and a limit of zero turning one off. `test_keygen_contract.py` runs the client against a real Keygen when `KEYGEN_INTEGRATION=1`, proving the metadata keys the app writes are the ones it filters on, that a key with another word answers an empty list, that `validate-key` answers a license's `jobs`, and that a license moves to the Business policy with its key, metadata and expiry. `test_stripe_webhook.py` posts events signed as Stripe signs them: a license purchase creates its license in Keygen, and an event signed with another secret is refused. The Business and subscription tests post signed events too, with Keygen and Stripe both faked at their transports (`tests/billing_harness.py`, `tests/stripe_fake.py`, the real `StripeClient` over a fake HTTP client) and the mail built for real and caught at the mailer. `test_business_purchase.py` covers a Payment Link's Business checkout: one license on the business policy with the people, firm, jobs and subscription, its first period plus 30 days, a validation before the `ttl: null` check-out, the Business mail, and the success page before the webhook. `test_subscription_lifecycle.py` covers a renewal on the same key and its mail, a retried one changing nothing, the first invoice before the checkout, people confirmed at renewal, a suspended license extended but not mailed, an Individual subscription sold before `stripeSubscriptionId` renewing on its own key, a seat change moving only `maxUsers`, a period advanced before payment extending nothing, a paid proration moving only `maxUsers`, a late seat change setting the live subscription's count, and an ended subscription left to lapse. `test_money_returned.py` covers a refunded or disputed year suspending its subscription's license and no other, a proration or partial refund suspending nothing, a one-time payment with no Stripe customer traced, an older Individual subscription traced through its checkout, a trace or a suspension Keygen fails answering 500 and its retry suspending, and money returned again for a suspended license answering 200. `test_refresh_route.py` covers the refresh's file, its validation first, a suspended license refused, a lapsed one served, an unknown key, the key kept out of bucket names, both buckets and Keygen down or answering without a code. `test_business_trial.py` covers the trial switch off and on, an earlier trial not using up the Business one, the switch without its policy, and a resend naming the billing portal only when a paid license is beside the trial. `test_setup_business_policies.py` covers the setup script against a faked Keygen account: both policies non-strict and joined to the live product, a second run creating nothing, a new job attached, the live policies only read, the refusals, and the product token only when asked. `test_convert_individual_licenses.py` drives the conversion script over the same Keygen and Stripe fakes, with the mail caught at the mailer: a dry run that changes nothing, names the Business policy, lists only the license to convert, masked, with the expiry it gets and the day it renews, and skips a suspended, a lapsed, a past-due and an unsold one and a trial on the Individual policy, and never lists a trial or Business license on its own policy; a checkout session or subscription the Stripe account does not hold skipped, a checkout never paid not taken for a payment made once, a buyer refunded in full or in parts or disputed left to support while a partial refund converts, a cancel date past the period, a subscription for two people, and a discounted year with no lasting discount left to support while a forever one converts, one that never expires whose paid time has passed skipped, a license Stripe cannot answer for failing the run, dry or not, while the others convert, one sold since 1 Nov 2026, or on that day, converted only with its flag, and finished without it once a run started it, a banned one and one with no address skipped, and two licenses on one payment left to support, whether they share the session or the subscription, by its id or traced, and whether the other is active or suspended; `--apply` asking first, then making a license Business Solo on the same key, by Keygen's policy change, with its plan, jobs, marks, one person and every other key, `stripeSubscriptionId` written when found through the checkout, each step printed as it is done, and one notice mailed naming the day it renews, with the first-job step; Stripe read again after the question, so a cancellation made meanwhile is what the notice says and a refund made meanwhile leaves the license alone; the license read again after the move, so a move answered with the policy still keeps it whole; its expiry moved to 30 days past the period paid for before the file is checked out, a later one kept, and none replaced; a second run changing and mailing nothing; a buyer whose subscription is set to cancel or cancelled, or who paid once, converted and told the day it ends, the one set to cancel told how to keep it, and one paid once that never expires left to support; a subscription cancelled after its period moved on ending 30 days after it ended; a license left with only its marks, which unlocks no job when Keygen refuses its move, or moved but not mailed, finished by the next run, without cutting a renewal paid in between; a half-converted license whose subscription ended told the day it ends, and one Stripe is still retrying skipped until it settles; a move Keygen refuses reported in its words while the others convert, and an answer Keygen should never give failing only its license; a license suspended after the listing left alone, one mailed since the listing not mailed again, and one Keygen will not validate not mailed; a notice the mailer did not take never recorded as sent; the notice's mark retried whatever fails, then named with the command that writes it, which keeps every key and refuses a license no run converted or one already recorded; a run stopped after the notice went having printed that it did; a converted license renewing as Business, following its subscription's people, suspended by a refund of its first year, and served its job; and each refusal to start, mail off, mail settings that build no mailer, `--yes` without `--apply`, policies Keygen cannot answer for and each Business policy the moves cannot use among them. `test_license_routes.py` also covers a refunded purchase's success page and every check-out following its license's validation. `test_token_bucket.py` checks on a real Redis, CI's or a local `redis-server`, that two copies of the backend draw on one bucket; without one it skips. [`server/tests/`](../../../backend/server/tests/) check that the routes, the job pack route among them, are served only with `KEYGEN_API_TOKEN`, that the served portal drops a caller's rate-limit counts an hour after its last request with no request after it, that a refused portal body is never echoed while one refused elsewhere keeps FastAPI's own answer, that CORS answers the site, and that no `/docs` or `/openapi.json` is published. +Under `backend/license/tests/` and `backend/mailer/tests/`, run from `backend/` with `uv run pytest license mailer`. `test_funnel_events.py` covers the channel tag rules and the purchase event: its exact properties, nothing personal in it, and one event when the webhook and the success page both fulfil. `test_issue.py` covers Keygen payload shapes, metadata filter syntax, the CE headers, trial expiry, address folding, the disposable-domain check, plan resolution, derived ids, both duplicate-id answers and a refused suspension of a license not suspended; `test_message.py` and `test_release.py` cover the mail, the Individual purchase mail's promises, which no Business mail makes, the first-job step in the Business purchase, trial and conversion mails alone, the Business trial and the conversion notice naming every job in `jobs.py`, the billing portal named only with a paid Business license, the conversion notice's words, with the day it renews and its portal or reply line, the day it ends for a license that does not renew, with how to keep one set to cancel, no notice without either day, no price and no Individual copy, and the mail's pinned redirect links; `test_mail_guard.py` covers the mail check both POST routes run before Keygen; `test_trial_disposable.py` covers the trial's refusal of a disposable address before Keygen; `test_trial_correction_lookup.py` covers the support lookup of a trial by its exact address, the trial kind picking one of an address's two trials, and the script's `--trial-kind` reaching the lookup as that trial's policy, refused beside `--session` or with the policy unset. `backend/mailer/tests/` covers the SMTP error mapping, MIME shape, senders and configuration checks, and its `test_smtp_contract.py` sends through a real SMTP conversation against Mailpit when `SMTP_INTEGRATION=1`. `test_license_routes.py` drives the three routes over HTTP with Keygen faked at its transport, so the code under them runs as written, and the mailer faked at the router: resend's one answer for every outcome, asserted from the mailer side, including a license that is only suspended, and its 503 when mail is off before any lookup; each trial outcome, never with the file in the body, and a tagged address refused once the folded one holds a trial; `license_trial_issued` with only the channel, a bad channel dropped, and no event for a trial not issued; the success page's file and its 404; both rate-limit buckets biting, and a limit of zero turning one off. `test_keygen_contract.py` runs the client against a real Keygen when `KEYGEN_INTEGRATION=1`, proving the metadata keys the app writes are the ones it filters on, that a key with another word answers an empty list, that `validate-key` answers a license's `jobs`, and that a license moves to the Business policy with its key, metadata and expiry. `test_stripe_webhook.py` posts events signed as Stripe signs them: a license purchase creates its license in Keygen, and an event signed with another secret is refused. The Business and subscription tests post signed events too, with Keygen and Stripe both faked at their transports (`tests/billing_harness.py`, `tests/stripe_fake.py`, the real `StripeClient` over a fake HTTP client) and the mail built for real and caught at the mailer. `test_business_purchase.py` covers a Payment Link's Business checkout: one license on the business policy with the people, firm, jobs and subscription, its first period plus 30 days, a validation before the `ttl: null` check-out, the Business mail, and the success page before the webhook. `test_subscription_lifecycle.py` covers a renewal on the same key and its mail, a retried one changing nothing, the first invoice before the checkout, people confirmed at renewal, a suspended license extended but not mailed, an Individual subscription sold before `stripeSubscriptionId` renewing on its own key, a seat change moving only `maxUsers`, a period advanced before payment extending nothing, a paid proration moving only `maxUsers`, a late seat change setting the live subscription's count, and an ended subscription left to lapse. `test_money_returned.py` covers a refunded or disputed year suspending its subscription's license and no other, a proration or partial refund suspending nothing, a one-time payment with no Stripe customer traced, an older Individual subscription traced through its checkout, a trace or a suspension Keygen fails answering 500 and its retry suspending, and money returned again for a suspended license answering 200. `test_refresh_route.py` covers the refresh's file, its validation first, a suspended license refused, a lapsed one served, an unknown key, the key kept out of bucket names, both buckets and Keygen down or answering without a code. `test_business_trial.py` covers the trial switch off and on, an earlier trial not using up the Business one, the switch without its policy, and a resend naming the billing portal only when a paid license is beside the trial. `test_setup_business_policies.py` covers the setup script against a faked Keygen account: a first run creating every job in `jobs.py` on both policies, both policies non-strict and joined to the live product, a second run creating nothing, a new job attached, the live policies only read, the refusals, and the product token only when asked. `test_convert_individual_licenses.py` drives the conversion script over the same Keygen and Stripe fakes, with the mail caught at the mailer: a dry run that changes nothing, names the Business policy, lists only the license to convert, masked, with the expiry it gets and the day it renews, and skips a suspended, a lapsed, a past-due and an unsold one and a trial on the Individual policy, and never lists a trial or Business license on its own policy; a checkout session or subscription the Stripe account does not hold skipped, a checkout never paid not taken for a payment made once, a buyer refunded in full or in parts or disputed left to support while a partial refund converts, a cancel date past the period, a subscription for two people, and a discounted year with no lasting discount left to support while a forever one converts, one that never expires whose paid time has passed skipped, a license Stripe cannot answer for failing the run, dry or not, while the others convert, one sold since 1 Nov 2026, or on that day, converted only with its flag, and finished without it once a run started it, a banned one and one with no address skipped, and two licenses on one payment left to support, whether they share the session or the subscription, by its id or traced, and whether the other is active or suspended; `--apply` asking first, then making a license Business Solo on the same key, by Keygen's policy change, with its plan, jobs, marks, one person and every other key, `stripeSubscriptionId` written when found through the checkout, each step printed as it is done, and one notice mailed naming the day it renews, with the first-job step; Stripe read again after the question, so a cancellation made meanwhile is what the notice says and a refund made meanwhile leaves the license alone; the license read again after the move, so a move answered with the policy still keeps it whole; its expiry moved to 30 days past the period paid for before the file is checked out, a later one kept, and none replaced; a second run changing and mailing nothing; a buyer whose subscription is set to cancel or cancelled, or who paid once, converted and told the day it ends, the one set to cancel told how to keep it, and one paid once that never expires left to support; a subscription cancelled after its period moved on ending 30 days after it ended; a license left with only its marks, which unlocks no job when Keygen refuses its move, or moved but not mailed, finished by the next run, without cutting a renewal paid in between; a half-converted license whose subscription ended told the day it ends, and one Stripe is still retrying skipped until it settles; a move Keygen refuses reported in its words while the others convert, and an answer Keygen should never give failing only its license; a license suspended after the listing left alone, one mailed since the listing not mailed again, and one Keygen will not validate not mailed; a notice the mailer did not take never recorded as sent; the notice's mark retried whatever fails, then named with the command that writes it, which keeps every key and refuses a license no run converted or one already recorded; a run stopped after the notice went having printed that it did; a converted license renewing as Business, following its subscription's people, suspended by a refund of its first year, and validated with every job; and each refusal to start, mail off, mail settings that build no mailer, `--yes` without `--apply`, policies Keygen cannot answer for and each Business policy the moves cannot use among them. `test_license_routes.py` also covers a refunded purchase's success page and every check-out following its license's validation. `test_token_bucket.py` checks on a real Redis, CI's or a local `redis-server`, that two copies of the backend draw on one bucket; without one it skips. [`server/tests/`](../../../backend/server/tests/) check that the routes, the job pack route among them, are served only with `KEYGEN_API_TOKEN`, that the served portal drops a caller's rate-limit counts an hour after its last request with no request after it, that a refused portal body is never echoed while one refused elsewhere keeps FastAPI's own answer, that CORS answers the site, and that no `/docs` or `/openapi.json` is published. -The job pack tests build packs signed by a test key (`tests/job_pack_samples.py`), fake GitHub at its transport (`tests/github_fake.py`), and reach the route through the backend's own app over a faked Keygen (`tests/job_pack_portal.py`, behind `conftest.py`'s `pack_portal` fixture), so the 422 handler answers as it does in production. `test_job_pack_verify.py` covers a sealed, signed pack accepted, the signed bytes being the app's, an unknown runner, a second trusted signature, eight trusted lines and a directory entry accepted, the first failing check naming the refusal, and every refusal by its code, Windows names and characters, a lone `.`, a name past 255 bytes in UTF-8, one 5,000 folders deep among them, a Windows short name of another file or folder, a file and a folder of one name in either order, a folder entry among them, a folder spelled two ways, folders counted among the 1,000 members, a folder carrying data, a version part of ten digits or with a digit that is not ASCII, an encrypted member, a corrupt deflate stream, JSON nested too deep and a ninth signature line among them, and that no test key is trusted in production. `test_job_pack_selection.py` covers versions compared as numbers, the entitlement and runner filters, a pack holding a job the license lacks withheld, and when the installed version is current. `test_job_pack_catalog.py` covers one listing per TTL, one download per asset, one read for concurrent requests, paging, the headers, the redirect followed without the token and a plain-http one refused, a next page or an asset outside GitHub's API never asked, the store's client following no redirect on its own, the releases skipped, a tag or a zip name whose version has a digit that is not ASCII among them, a broken or unreadable release never served and never taking the others down, an unexpected error refusing only its release, a check past its deadline refusing only its release, the read's deadline, a download past 50 MB cut off and an asset listed over it never downloaded, the last good packs kept while GitHub fails, the one-minute retry, a cold start while failing, a refused token logged without the token, a deleted release dropped, the folder store and a missing folder, no store, `JOB_PACKS_DIR` winning, a repository without a token configuring nothing, and one catalog per configured store. `test_job_pack_route.py` drives the route over HTTP with Keygen faked: every answer and code in the contract's order, `EXPIRED` refused while the refresh still serves the file, the Business trial served, the license checked before any pack is read, a pack holding a job the license lacks refused as `pack_not_covered`, a malformed body's `422` echoing nothing, the `204` and its headers, a version the app could not send back never served, nor one in digits that are not ASCII, which no header carries, the runner filter and its `409`, each `503`, the key in no bucket name or log, both buckets, and the refresh's buckets apart from the route's. `test_job_pack_contract.py` checks that contract 6's sample passes the checks and is served byte for byte from a folder store. `test_memory_buckets.py` covers a memory bucket forgotten after an idle hour, the cap on their number, and a caller the address bucket refuses spending no key bucket; `test_client_ip.py` covers the address taken from the proxy's header, a forged `CF-Connecting-IP` ignored, another header named, the socket peer without the header and the one warning naming it, and an empty setting taking the socket peer with no warning; `test_jobs.py` covers `jobs` read as the app reads it; and `test_list_job_packs_script.py` covers the script's lines, its exit codes and the token never printed. +The job pack tests build packs signed by a test key (`tests/job_pack_samples.py`), fake GitHub at its transport (`tests/github_fake.py`), and reach the route through the backend's own app over a faked Keygen (`tests/job_pack_portal.py`, behind `conftest.py`'s `pack_portal` fixture), so the 422 handler answers as it does in production. `test_job_pack_verify.py` covers a sealed, signed pack accepted, the signed bytes being the app's, an unknown runner, a second trusted signature, eight trusted lines and a directory entry accepted, the first failing check naming the refusal, and every refusal by its code, Windows names and characters, a lone `.`, a name past 255 bytes in UTF-8, one 5,000 folders deep among them, a Windows short name of another file or folder, a file and a folder of one name in either order, a folder entry among them, a folder spelled two ways, folders counted among the 1,000 members, a folder carrying data, a version part of ten digits or with a digit that is not ASCII, an encrypted member, a corrupt deflate stream, JSON nested too deep and a ninth signature line among them, and that no test key is trusted in production. `test_job_pack_selection.py` covers versions compared as numbers, the entitlement and runner filters, a pack holding a job the license lacks withheld, and when the installed version is current. `test_job_pack_catalog.py` covers one listing per TTL, one download per asset, one read for concurrent requests, paging, the headers, the redirect followed without the token and a plain-http one refused, a next page or an asset outside GitHub's API never asked, the store's client following no redirect on its own, the releases skipped, a tag or a zip name whose version has a digit that is not ASCII among them, a broken or unreadable release never served and never taking the others down, an unexpected error refusing only its release, a check past its deadline refusing only its release, the read's deadline, a download past 50 MB cut off and an asset listed over it never downloaded, the last good packs kept while GitHub fails, the one-minute retry, a cold start while failing, a refused token logged without the token, a deleted release dropped, the folder store and a missing folder, no store, `JOB_PACKS_DIR` winning, a repository without a token configuring nothing, and one catalog per configured store. `test_job_pack_route.py` drives the route over HTTP with Keygen faked: every answer and code in the contract's order, `EXPIRED` refused while the refresh still serves the file, the Business trial served, a Business license served the contract redline from its own pack, the license checked before any pack is read, a pack holding a job the license lacks refused as `pack_not_covered`, a malformed body's `422` echoing nothing, the `204` and its headers, a version the app could not send back never served, nor one in digits that are not ASCII, which no header carries, the runner filter and its `409`, each `503`, the key in no bucket name or log, both buckets, and the refresh's buckets apart from the route's. `test_job_pack_contract.py` checks that contract 6's sample passes the checks and is served byte for byte from a folder store. `test_memory_buckets.py` covers a memory bucket forgotten after an idle hour, the cap on their number, and a caller the address bucket refuses spending no key bucket; `test_client_ip.py` covers the address taken from the proxy's header, a forged `CF-Connecting-IP` ignored, another header named, the socket peer without the header and the one warning naming it, and an empty setting taking the socket peer with no warning; `test_jobs.py` covers `jobs` read as the app reads it; and `test_list_job_packs_script.py` covers the script's lines, its exit codes and the token never printed. ## Known gaps - The cohort report has not run against production Keygen or Stripe. - The Keygen contract test has not yet run against a live Keygen; it skips without `KEYGEN_INTEGRATION=1` and credentials. Its cases for validation, a suspended license's check-out, an expiry moved on the same key, `validate-key` answering a license's `jobs` and a move to the Business policy have not run either, and neither has the setup script or the conversion script against Keygen CE. -- No app on dev calls `POST /license/job-pack` yet. - A dispute won later leaves its license suspended until support reinstates it. - A full refund or a dispute that arrives before its purchase's license exists, as during a fulfilment outage, suspends nothing, since it traces to no license. A later webhook retry, or the success page whenever it is opened, then mints an active license, since fulfilment reads only the session's `payment_status`, which a refund leaves `paid`; support suspends that license by hand. -- A job added to `jobs.py` reaches new licenses and the policies' entitlements, but the `jobs` already written on existing licenses keep the old list, so the job pack route refuses them the new job. +- A job added to `jobs.py` reaches new licenses and the policies' entitlements, but the `jobs` already written on existing licenses keep the old list, so the job pack route refuses them the new job, and no script backfills it. The contract redline is spared: it ships in the Business switch release, before Business goes on sale, its trial opens or any license is converted. - The GitHub store has not read the real releases repository, and no pack is published; its tests fake GitHub at the transport. - A computer that cannot reach the license server gets a pack file only from support, by hand. - `scripts/issue_enterprise_license.py` issues no Business license with `jobs`, so a license it issues gets no pack. diff --git a/www/app/(home)/downloads/page.tsx b/www/app/(home)/downloads/page.tsx index 5dbe2a7bdf..9025187845 100644 --- a/www/app/(home)/downloads/page.tsx +++ b/www/app/(home)/downloads/page.tsx @@ -15,11 +15,11 @@ import { AllReleasesLink, OSDownloadGrid } from "./download-panels"; */ /** - * From Business on, the emailed trial is the paid job's, which most visitors to this page do + * From Business on, the emailed trial is the paid jobs', which most visitors to this page do * not need, so the form says what it sends. Until then it needs no note. */ const TRIAL_NOTE = BUSINESS_LAUNCHED - ? "Your email gets a 14-day trial of the paid security questionnaire job, one per address. The app itself needs no license." + ? "Your email gets a 14-day trial of the paid security questionnaire and contract redline jobs, one per address. The app itself needs no license." : ""; export const metadata: Metadata = { diff --git a/www/app/(home)/free/[model_slug]/page.tsx b/www/app/(home)/free/[model_slug]/page.tsx index 8073c98d7a..f4b6a18e3b 100644 --- a/www/app/(home)/free/[model_slug]/page.tsx +++ b/www/app/(home)/free/[model_slug]/page.tsx @@ -161,9 +161,9 @@ export default async function FreeModelPage({ params }: PageProps) { }, { question: "Is the SurfSense desktop app free?", - // From Business on, the trial is the job's and the scrapers are retired. + // From Business on, the trial is the paid jobs' and the scrapers are retired. answer: BUSINESS_LAUNCHED - ? "Yes. The app and every update are free forever on Windows, macOS and Linux, reading web pages, YouTube and web search included, and a 14-day trial of the paid security questionnaire job comes with it. There is no account to create and no trial clock on the app itself." + ? "Yes. The app and every update are free forever on Windows, macOS and Linux, reading web pages, YouTube and web search included, and a 14-day trial of the paid security questionnaire and contract redline jobs comes with it. There is no account to create and no trial clock on the app itself." : "Yes. The app and every update are free forever on Windows, macOS and Linux, and a 14-day licence for the scraper plugins comes with it. There is no account to create and no trial clock on the app itself.", }, { diff --git a/www/app/(home)/pricing/business-pricing-content.ts b/www/app/(home)/pricing/business-pricing-content.ts index 13ca5bd310..674fe4ede1 100644 --- a/www/app/(home)/pricing/business-pricing-content.ts +++ b/www/app/(home)/pricing/business-pricing-content.ts @@ -43,21 +43,21 @@ export const BUSINESS_PRICING_LEDE: PricingLede = { before: "The app and every update are ", highlight: "free, forever", after: - ", with no account, no trial clock and no usage cap, and reading web pages, YouTube and web search are free too. A Business licence adds the job plugins, priced per person, and a 14-day trial of the job comes with the app.", + ", with no account, no trial clock and no usage cap, and reading web pages, YouTube and web search are free too. A Business licence adds the job plugins, priced per person, and a 14-day trial of them comes with the app.", }; export const BUSINESS_PLANS: Plan[] = [ { name: "Free", price: "$0", - note: "Includes a 14-day trial of the job, no card", + note: "Includes a 14-day trial of the jobs, no card", summary: "The app and every update, forever. No account, no expiry.", features: [ "The full app on Windows, macOS and Linux", "Runs offline; your sources stay on your disk", "Bring your own model keys, or run a local model", "Web pages, YouTube videos and web search as sources", - "A 14-day trial of the security questionnaire job, by email", + "A 14-day trial of the security questionnaire and contract redline jobs, by email", "Open source, so you can build it yourself", ], action: [{ label: "Download", href: DOWNLOADS_URL }], @@ -70,7 +70,7 @@ export const BUSINESS_PLANS: Plan[] = [ summary: "SurfSense's job plugins for your firm, at a founding price per person.", features: [ "Everything in Free", - "The job plugins, starting with the security questionnaire", + "The job plugins: the security questionnaire and the contract redline", `Counted in people, not devices: 5 people are ${priceFor(5)} a year`, "Renews every year on the same licence until you cancel", "Cancel or change the number of people from an emailed link", @@ -106,10 +106,13 @@ const FAQ_IS_IT_FREE: PricingQuestion = { "Yes. The app and all of its updates are free forever, with no account, no trial clock and no usage cap, and reading web pages, YouTube videos and web search come with it. You download it, install it, and use it. A Business licence is needed only to use SurfSense's job plugins for work; everything the app itself does stays free.", }; +/** Each job plugin in a sentence, so `/pricing` and `/pricing/business` describe them alike. */ +export const WHAT_EACH_JOB_DOES = + "The security questionnaire answers a customer's security questionnaire in their own spreadsheet from your firm's policies, gives the source of each answer, and lists what needs a person's review. The contract redline reviews a Word (.docx) contract against your firm's own playbook and returns a revised copy with tracked changes and comments."; + export const FAQ_WHAT_BUSINESS_ADDS: PricingQuestion = { question: "What does a Business licence add?", - answer: - "SurfSense's job plugins, which turn your firm's own files into a finished piece of client work, in the app on your own computer and with the model you choose. The first is the security questionnaire: it answers a customer's security questionnaire in their own spreadsheet from your firm's policies, gives the source of each answer, and lists what needs a person's review. Further jobs join Business as they ship. Business also includes priority support and one feature build request a year. The licence does not lock any of the app's own features, and third-party plugins and MCP servers you add yourself need no licence.", + answer: `SurfSense's job plugins, which turn your firm's own files into a finished piece of client work, in the app on your own computer and with the model you choose. ${WHAT_EACH_JOB_DOES} Further jobs join Business as they ship. Business also includes priority support and one feature build request a year. The licence does not lock any of the app's own features, and third-party plugins and MCP servers you add yourself need no licence.`, }; export const FAQ_WHO_NEEDS_BUSINESS: PricingQuestion = { @@ -126,7 +129,7 @@ const FAQ_BUSINESS_PRICE: PricingQuestion = { export const FAQ_BUSINESS_TRIAL: PricingQuestion = { question: "Is there a free trial?", answer: - "Yes, one. A 14-day trial of the full job comes with the free app and needs only an email address, with no card and no account. You enter your email on the download page, receive a licence file, import it in Settings › License, and the job plugins are unlocked for 14 days. Each email address gets one trial.", + "Yes, one. A 14-day trial of the full security questionnaire and contract redline jobs comes with the free app and needs only an email address, with no card and no account. You enter your email on the download page, receive a licence file, import it in Settings › License, and the job plugins are unlocked for 14 days. Each email address gets one trial.", }; export const FAQ_BUSINESS_RENEWAL: PricingQuestion = { @@ -201,7 +204,7 @@ export const BUSINESS_PRICING_SCHEMA = { price: 0, priceCurrency: "USD", description: - "The full app and every update on Windows, macOS and Linux, forever, with web pages, YouTube and web search as sources and a 14-day trial of the job. No account, runs offline, bring your own model keys.", + "The full app and every update on Windows, macOS and Linux, forever, with web pages, YouTube and web search as sources and a 14-day trial of the security questionnaire and contract redline jobs. No account, runs offline, bring your own model keys.", }, { "@type": "Offer", @@ -209,7 +212,7 @@ export const BUSINESS_PRICING_SCHEMA = { price: FIRST_PERSON_PRICE, priceCurrency: "USD", url: `https://www.surfsense.com${BUSINESS_CHECKOUT_URL}`, - description: `The job plugins, starting with the security questionnaire, for the first person for a year; each further person is ${FURTHER} a year. Renews yearly until cancelled, at a founding price that can change only at renewal, after at least 30 days' notice by email.`, + description: `The security questionnaire and contract redline job plugins for the first person for a year; each further person is ${FURTHER} a year. Renews yearly until cancelled, at a founding price that can change only at renewal, after at least 30 days' notice by email.`, }, ], }; diff --git a/www/app/(home)/pricing/business/business-content.ts b/www/app/(home)/pricing/business/business-content.ts index 0bd9f38508..1d888cc061 100644 --- a/www/app/(home)/pricing/business/business-content.ts +++ b/www/app/(home)/pricing/business/business-content.ts @@ -6,6 +6,7 @@ import { FAQ_CANCEL_OR_CHANGE, FAQ_WHAT_BUSINESS_ADDS, FAQ_WHO_NEEDS_BUSINESS, + WHAT_EACH_JOB_DOES, } from "@/app/(home)/pricing/business-pricing-content"; import type { PricingQuestion } from "@/app/(home)/pricing/pricing-content"; import { EMAIL } from "@/components/site/site-content"; @@ -41,7 +42,7 @@ export type Benefit = { title: string; body: string; icon: Icon }; export const BENEFITS: Benefit[] = [ { title: "The job plugins", - body: "The security questionnaire first: it answers a customer's security questionnaire in their own spreadsheet from your firm's policies, gives the source of each answer, and lists what needs a person's review. Further jobs join Business as they ship.", + body: `${WHAT_EACH_JOB_DOES} Further jobs join Business as they ship.`, icon: ClipboardCheckIcon, }, { diff --git a/www/app/(home)/pricing/business/business-sections.tsx b/www/app/(home)/pricing/business/business-sections.tsx index 11f7eabcd9..95beb0672d 100644 --- a/www/app/(home)/pricing/business/business-sections.tsx +++ b/www/app/(home)/pricing/business/business-sections.tsx @@ -37,9 +37,9 @@ export function BusinessHero() { Business licence

SurfSense Business

- SurfSense's job plugins for your firm, starting with the security questionnaire, priced per - person. The app itself is free either way, and stays - free. + SurfSense's job plugins for your firm, the security questionnaire and the contract redline, + priced per person. The app itself is free either way, + and stays free.

); @@ -275,8 +275,8 @@ export function ClosingCheckout() {

- Want to try the job first? The free app comes with a 14-day trial of the job and needs no - card.{" "} + Want to try the security questionnaire and the contract redline first? The free app comes + with a 14-day trial of both and needs no card.{" "} Get it on the download page diff --git a/www/app/(home)/pricing/business/page.tsx b/www/app/(home)/pricing/business/page.tsx index b18ec3ff5d..b7d4755def 100644 --- a/www/app/(home)/pricing/business/page.tsx +++ b/www/app/(home)/pricing/business/page.tsx @@ -29,7 +29,7 @@ const FIRST = yearlyPriceLabel(FIRST_PERSON_PRICE); const FURTHER = yearlyPriceLabel(FURTHER_PERSON_PRICE); const metaTitle = `SurfSense Business Licence: Job Plugins From ${FIRST} a Year`; -const metaDescription = `SurfSense's job plugins for firms, the security questionnaire first. ${FIRST} a year for the first person, ${FURTHER} for each further one. No account, 30-day refund.`; +const metaDescription = `SurfSense's job plugins for firms: the security questionnaire and the contract redline. ${FIRST} a year for the first person, ${FURTHER} for each further one. No account, 30-day refund.`; export const metadata: Metadata = BUSINESS_LAUNCHED ? { @@ -39,6 +39,7 @@ export const metadata: Metadata = BUSINESS_LAUNCHED "surfsense business", "surfsense licence", "security questionnaire software", + "contract redline software", "buy surfsense", "private ai for firms", ], @@ -68,7 +69,7 @@ const BUSINESS_SCHEMA = { "@type": "Product", name: "SurfSense Business licence", description: - "SurfSense's job plugins, starting with the security questionnaire, priced per person, with priority support and one feature build request a year.", + "SurfSense's security questionnaire and contract redline job plugins, priced per person, with priority support and one feature build request a year.", url: canonicalUrl, brand: { "@type": "Brand", name: "SurfSense" }, offers: { diff --git a/www/content/docs/v2/license.mdx b/www/content/docs/v2/license.mdx index 3c9e54d2d7..a158e7627b 100644 --- a/www/content/docs/v2/license.mdx +++ b/www/content/docs/v2/license.mdx @@ -10,7 +10,7 @@ SurfSense is free and open source under the Apache License 2.0. The whole app, a A SurfSense license adds: - **SurfSense's paid plugins.** The [plugins page](/plugins) lists them. -- **Jobs**, with a Business license or its trial. A job fills in paperwork from your firm's own documents, such as a security questionnaire from your policies. See [Jobs](/docs/v2/jobs). +- **Jobs**, with a Business license or its trial. A job does a piece of paperwork from your firm's own documents, such as filling in a security questionnaire from your policies or redlining a Word contract against your playbook. See [Jobs](/docs/v2/jobs). - **Priority support.** Nothing else needs a license. Chat, the agent and its [web search and reading](/docs/v2/agent#search-and-read-the-web), Studio, voice, local and remote models, [adding sources from the web](/docs/v2/sources#add-from-the-web), third-party plugins and updates all work without one. See [pricing](/pricing) for plans. diff --git a/www/features/business-launch/business-launched.mts b/www/features/business-launch/business-launched.mts index 5053cbfb34..d9016cfebb 100644 --- a/www/features/business-launch/business-launched.mts +++ b/www/features/business-launch/business-launched.mts @@ -1,7 +1,7 @@ /** * The Business launch switch, `NEXT_PUBLIC_BUSINESS_LAUNCHED`. Off, the site is the one from * before Business went on sale; on, it sells Business and lists the scrapers as retired. - * Flip it on the day the release that ships the first paid job goes out. NEXT_PUBLIC_* is + * Flip it on the day the release that ships the paid jobs goes out. NEXT_PUBLIC_* is * baked in at `next build`, so a change needs a redeploy. * * A `.mts`, like `docs-redirects.mts`, so `next.config.mts` can read it too. diff --git a/www/features/license/license-forms.tsx b/www/features/license/license-forms.tsx index d8e7359edd..2ab5def103 100644 --- a/www/features/license/license-forms.tsx +++ b/www/features/license/license-forms.tsx @@ -36,9 +36,9 @@ const RESEND_SENT = "If a license is registered to that address, it is on its way. " + "Check your spam folder, and make sure you used the exact address you paid with."; -// From Business on, the trial is 14 days of the paid job; until then it unlocks the plugins. +// From Business on, the trial is 14 days of the paid jobs; until then it unlocks the plugins. const TRIAL_SENT = BUSINESS_LAUNCHED - ? "Your 14-day trial of the job is on its way. Check your spam folder too." + ? "Your 14-day trial of the security questionnaire and contract redline jobs is on its way. Check your spam folder too." : "Your trial license is on its way. Check your spam folder too."; // 503 covers either half being down -- the license service or the mail @@ -206,7 +206,7 @@ export function ResendForm() { } const TRIAL_NOTE = BUSINESS_LAUNCHED - ? "One 14-day trial of the job per email address. We will send the license file to your inbox." + ? "One 14-day trial of the security questionnaire and contract redline jobs per email address. We will send the license file to your inbox." : "One trial per email address. We will send the license file to your inbox."; export function TrialForm({