59 Commits
Author SHA1 Message Date
joshuaandClaude Opus 5.5 20ea32d533 Hub 2.26.1: devotionals two years ahead; Apps fetch 2 weeks
Devotionals can be written, edited and imported up to two years ahead
(was 3 months), and a CSV holds two years in one file (800 rows, 8 MB).
GET /api/v2/devotionals answers 2 weeks (from and the 13 days after it)
instead of 3 months. Contracts 1.24.0 vendored. No migration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 23:23:37 +02:00
joshuaandClaude Opus 5.5 16f69afa6f Hub 2.26.0: the Church App, demo scenarios and devotionals
The App installs from New install on app.<address>, with Accounts 1.9.0
first, and is in every product list and filter (installs, Updates).
Every product has demo data; a demo client loads a whole demo scenario
in one seed-scenario job (agent 1.7.0), and installs show whether they
are out of step with it. The Website's and App's .env from the Hub.

Devotionals: written or imported from CSV up to 3 months ahead in the
free translations (KJV, BSB), and GET /api/v2/devotionals for App
licences. An alert when an App's active-member band is above its tier.

Contracts 1.23.0 vendored. Migration 20261130120000_app_scenarios_devotionals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 22:24:28 +02:00
joshuaandClaude Opus 5.5 aeccb96c77 Hub 2.25.1: jobs product filter lists every product
The Product filter on Jobs offered only Cross Events and Accounts, so
the Church Website's jobs couldn't be picked out. It now comes from
lib/products. The API already accepted every product.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 23:44:39 +02:00
joshuaandClaude Opus 5.5 8448babb08 Hub 2.25.0: demo clients, and demo data for the Church Website
- A customer can be a demo client: every install a demo site (Accounts
  included, and any later install), never billed (billing off, no invoice
  drafted, sent or made by hand). Migration: Customer.isDemo, demoSince.
- Any install can be marked as a demo site; Events and the Website have
  demo data. The Website's eight demo churches need agent 1.6.0.
- Contracts 1.19.0 vendored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 09:20:10 +02:00
joshuaandClaude Opus 5.5 d2fd58642f Hub 2.24.1: Servers -> Updates offers every product
The product tabs were a fixed Events/Accounts list from before the Church
Website, so Website installs couldn't be batch-updated there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 08:34:52 +02:00
joshuaandClaude Opus 5.5 2f2e7138ba Hub 2.24.0: update everything at a church to latest
A customer's Sites card has "Update everything to latest": every product
that's behind, in one batch (Accounts first, one at a time, stopping at the
first failure), scheduled or as an emergency, planned whole or not at all.
Later products keep Accounts at the version the batch updates it to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 08:20:21 +02:00
joshuaandClaude Opus 5.5 4e362cbc03 Hub 2.23.1: a church's Accounts version comes from its heartbeat
New install checked the install record's version, which only changed
with the Hub's own jobs for that product. Accounts updated alongside
Events 3.7.0 still showed 1.6.0 there, so New install -> Website refused
cross-demo2 while the installs list showed 1.7.0. It now uses the
heartbeat's version, and each heartbeat updates the record's version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 15:23:19 +02:00
joshuaandClaude Opus 5.5 d5fa11f50f Hub 2.23.0: release requirements carry forward
A release needs what every earlier release of its product needed (the
highest version per product), so "requires accounts 1.7.0" is written
once in WHATS-NEW.md. Fixes New install -> Website 1.0.1 sending a
Website-only install job: its heading didn't repeat 1.0.0's requirement,
so Accounts wasn't installed first and the agent refused the job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 15:08:48 +02:00
joshuaandClaude Opus 5.5 43eb634199 Hub 2.22.0: Get more storage for the Church Website
POST /api/installs/storage-request (contracts 1.18.0): recorded on the
install, Joshua emailed once, closed when the licence gets more extra
storage steps. The church is emailed once when its website's storage
passes 80% and once when it's full (from the heartbeat). Vendors
contracts 1.18.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 15:41:31 +02:00
joshuaandClaude Opus 5.5 c6f734ab20 Hub 2.21.0: install the Church Website; Website storage bought in steps
- New install offers the Church Website: Accounts first when the church has
  none, at accounts.<its address> (www. dropped); the FastPanel email sends a
  www. site's bare domain to www. with a 301.
- Licence.extraStorageSteps (migration): the token sends a Website its limit
  (5 GB + steps, limits.storageBytes, contracts 1.17.0); invoices bill the
  steps bought instead of the storage reported. Edit popup field 0-99.
- A Website/App licence starts on its plan however it's made (New install too).
- Vendored @crosscode/contracts 1.17.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 00:03:21 +02:00
joshuaandClaude Opus 5.5 308d4e42ba Hub 2.20.0: port list labels; frps allow_ports checked against it
- GET /api/admin/ports names each port's install (church, product, web/API, domain); the port
  list shows it, linked to the install, and says which ports are held for a port check.
- A church server's hand-written frpc tunnels are listed as taken (note: frpc tunnel "<name>" on
  <server>) on each frp-read/frp-write, and taken off when they leave the file.
- Central servers: allow_ports must cover the port range and every listed port outside it. An
  allow_ports alert names what's missing and the value to set; the frp card warns, and Edit has
  "Use the Hub's allow_ports" (INI or TOML).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 13:45:30 +02:00
joshuaandClaude Opus 5.5 65637711c6 Hub 2.19.0: the server agent's releases; Update agent picks one
- AgentRelease (migration 20261123150000_agent_release): the agent's releases, apart from the
  products' so licences and billing are untouched.
- Release sources can be for the Server agent; the defaults include it (monorepo agent@ tags,
  apps/agent/WHATS-NEW.md). Same sync rules as products. A saved list without it gets an
  "Add the agent's source" button on the Releases page.
- GET /api/admin/agent-releases; server summaries carry agentLatest; update-agent jobs go to a
  known agent release, the latest when none is asked for (agentTag).
- Update agent is a ReleaseSelect with the chosen version's notes; the Servers list and a server's
  page say when a newer agent is out; the Releases page shows agent releases (Server agent filter,
  Everything newest first by date).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 13:18:56 +02:00
joshuaandClaude Opus 5.5 65cc06183b Hub 2.18.0: releases picked from a list on New install and Move onto the monorepo
- components/ReleaseSelect.tsx: Latest (with its version) first, then the newest 10 releases,
  Show older versions for the rest; marked latest, running now and what each needs.
- New install and Move onto the monorepo use it (they were free text); the install's Update popup
  and the Updates page use it too. Move onto the monorepo lists Events from 2.2.0 (the first
  monorepo tag).
- docs/VERSION-PICKERS-PLAN.md: this and 2.19.0 (agent releases). Frontend only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 13:11:21 +02:00
joshuaandClaude Opus 5.5 691f46844d Hub 2.17.0: popups on the server, settings, install and invoice pages
- Server page: Configuration is a read view with an Edit popup; Update agent is a popup.
- frp config: the file shows read-only; Edit opens it in a popup with Restart, the two-factor
  code and Save on the server (its confirmation unchanged).
- Ports & defaults: install defaults, port range and central IP as a read view with an Edit popup;
  Mark as taken is a popup from the port list.
- Install page (/installs/[id]): Clear public key is a popup with the two-factor code; the notes
  are a read view with an Edit popup; the page message is under the header.
- Invoice: always the read view; Edit (draft, approved) opens a popup, so Approve no longer needs
  a save first. Void and Refund are popups instead of prompt().
- docs/POPUPS-PLAN.md done. Frontend only: no migration, no API changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 12:42:52 +02:00
joshuaandClaude Opus 5.5 97ae79f4c2 Hub 2.16.0: popups for every add and edit on the list pages
- Add server, Add customer, New install and Link existing open in popups (Modal from 2.14.0):
  ask before discarding, error by the button; saving still opens the new page.
- Add server: the join command in the same popup; closing before Copy asks first (Modal's
  `dirty` can now be the question to ask).
- Notices and Releases: one popup for new and edit (NoticeModal, ReleaseModal); the cards are read
  views. Release sources: a table with Sync now and Use the defaults; Edit opens the rows and the
  access token in a popup and saving syncs.
- One-off invoice on Billing is the OneOffInvoice popup with a church picker; NewInvoice goes and
  /billing/invoices/new opens the popup (/billing?oneoff=1).
- These pages use PageMessage. Frontend only: no migration, no API changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 12:34:22 +02:00
joshuaandClaude Opus 5.5 bce6a7c019 Hub 2.15.0: install page as a header and tabs, popups for every action
- Install page (/servers/installs/[id]): header with status, Schedule update and a ⋯ menu
  (move onto the monorepo, demo site, uninstall, remove from the Hub, remove the record);
  tiles for site/registration, version, server, ports and last heartbeat.
- Tabs: Jobs, Settings (.env), Exports; the tab in the URL (?tab=settings).
- Every action is a popup (Update, Adopt, Demo, Uninstall, Remove) using the 2.14.0 Modal:
  asks before discarding, error by its button. Confirmations unchanged.
- EnvPanel: read view in the tab, each file edited in a popup.
- Banners for not registered, stale (no heartbeat for a day) and a planned uninstall.
- Shared PageMessage (also on the customer page); ModalButtons gets danger/disabled.
- Logic split into components/install/ (useSubmit, post with LIVE_EVENT re-confirm,
  uninstallPlan). Frontend only: no migration, no API changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 11:46:46 +02:00
joshuaandClaude Opus 5.5 590757e040 Hub 2.14.0: customer page as a summary and tabs, popups for every edit
- Customer page: header tiles (products, owing, next invoice, address, AI) and three
  tabs (Overview, Products, Invoices and payments), the tab in the URL; #billing links
  open Invoices and payments and Billing's links use ?tab=invoices.
- Every add or edit is a popup (new Modal in components/ui.tsx: Esc / click outside,
  asks before discarding changes, focus kept inside, full screen on a phone). The page
  shows only read views. Record payment is a popup on Billing and the invoice page too.
- One card per product: licence and billing fields in one Edit with one Save (each
  endpoint called only if its fields changed); suspend/revoke/reactivate/release in a
  ⋯ menu. Contact and billing details edited together. One page-level message.
- History as one timeline with a filter; each kind on its own keeps its sortable table.
- CustomerBilling.tsx split into components/customer/; plan in docs/CUSTOMER-PAGE-PLAN.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 11:14:05 +02:00
joshuaandClaude Opus 5.5 be27b4f5f0 Hub 2.13.0: clear alerts by hand, sortable billing tables, no stray tab scrollbars
- Alerts: Clear one or Clear all. A cleared alert leaves the open list and dashboard count
  but stays open to the checks, so it isn't re-raised or re-emailed until the problem goes
  away and comes back. Audited. Migration 20261123120000_alert_cleared.
- Billing invoices, payments, churches and a customer's invoices/payments can be sorted by
  column (remembered per browser). Invoices show the due date in its own column.
- Tabs: the grey rule is an inset shadow, so the active underline no longer overflows the
  row by a pixel and makes it scroll.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 10:20:23 +02:00
joshuaandClaude Opus 5.5 3a00271a02 Hub 2.12.0: one product uninstalled at a time, stale installs removed, customers archived
- Uninstalls name the product (agent 1.5.0); a whole-church uninstall marks every product
  of the church on that server removed. Older agents are refused while the church has others.
- A second product's uninstall joins one already planned (one export and one uninstall) or
  gets its own time; the last product removes the whole church. Accounts goes last.
- Remove an install from the Hub after 24 hours without a heartbeat (POST .../forget).
- Archive and restore customers (migration 20261123090000_customer_archive).
- Several addresses for a customer's email and billing email, with a + button.
- Statements show R0 invoices' amounts. Vendors contracts 1.16.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 09:17:35 +02:00
joshuaandClaude Opus 5.5 0acc61d4d8 Hub 2.11.0: ports checked on both servers before an install; frp config on each server's page
- A new install reserves candidate ports, asks the central and church servers which are free
  (probe-ports), and runs on the first pair free on both (3 rounds, then called off).
- Each server's page reads and changes frps's / frpc's config (agent 1.4.0): secrets stay on the
  server, two-factor, verify, backup, restart, put back if frp doesn't start.
- Alerts name the config file the agent uses; a missing config gets its own alert.
- Vendors contracts 1.15.0. Migration 20261121110000_server_frp_config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 11:08:29 +02:00
joshuaandClaude Opus 5.5 14dd608e37 Hub 2.10.0: emails laid out as Events' and Accounts'; FastPanel ^~ /api/
- src/utils/emailLayout.js: one layout for every Hub email (Cross Code
  header with the logo, heading, button with the link under it, notes,
  tables, job steps, code blocks, footer), HTML and plain text from the
  same blocks, everything escaped. mail.sendMail attaches the logo.
- Every email moved onto it: job reports, alerts, update requests, the
  SMTP test, notices, and all emails to site admins. Billing keeps its own.
- The FastPanel email and the install page give the backend as nginx config
  with location ^~ /api/ (FastPanel's static-file rule took /api/...png).
- Proxy done checks /api/proxy-check.png doesn't reach the frontend.
- deployment.md: ^~ for the Hub's own /api/ too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 14:40:55 +02:00
joshuaandClaude Opus 5.5 894f2b2771 Hub 2.9.0: whether people can sign in
- An Events install's page shows its sign-in mode, whether it's linked to the church's Accounts,
  and the last sign-in failure (Events 3.5.0 heartbeat, contracts 1.13.0 vendored).
- Alerts: signs in through Accounts but isn't linked (critical), linked to the wrong Accounts, a
  sign-in failed in the last 24 hours, an Accounts nothing is linked to while the church has Events.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 12:56:41 +02:00
joshuaandClaude Opus 5.5 98db54aad2 Hub 2.8.0: an install's .env on its page, changed with a restart
- Settings (.env) panel on an Events or Accounts install: reads the .env through an env-read job
  (addresses first; secrets only as set or not), and changes plain values with an env-set job
  (restart, or rebuild for the frontend's file; the server puts the file back if the site doesn't
  start). After a change the file is read again. One change per install at a time.
- Contracts 1.12.0 vendored (env jobs need agent 1.3.0).
- env-read / env-set in the Jobs type filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 12:14:13 +02:00
joshuaandClaude Opus 5.5 dab6fbcff6 Hub 2.7.1: one click is one update
Buttons are off from the click until the Hub answers (the Updates page and
every action on an install's page); the server refuses a second update for
an install with one planned or running (ALREADY_PLANNED). Test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:15:58 +02:00
joshuaandClaude Opus 5.5 dd5612fb2a Hub 2.7.0: emergency updates as soon as possible; events on now need a second yes
asap (emergency only, reason + 2FA) queues the update now; the church is
told it's happening now. A church whose Events heartbeat reports an event
on now (stats.live, Events 3.2.0) refuses an emergency update with
LIVE_EVENT until confirmLive. Both update forms offer "As soon as possible"
and ask again for a live event. Contracts 1.10.0 vendored. 4 new tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:01:28 +02:00
joshuaandClaude Opus 5.5 3893fb91e0 Hub 2.6.1: the Failed jobs filter and alert search no longer answer 500
The status list had timed_out, which isn't a JobStatus (the enum has
expired), and alert search used contains on the EventLevel enum: Postgres
refused both queries. JOB_STATUSES now matches the enum (tested against
schema.prisma); Failed = failed,expired; unknown products refused; level
matched by name. All list queries checked on Postgres.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:58:28 +02:00
joshuaandClaude Opus 5.5 de6a14c229 Hub 2.6.0: paged lists, job status filters, one-product updates, installs found on servers
- Jobs: Succeeded/Cancelled filters, product, type and church search, paged
  on the server; audit log and alerts paged on the server with search;
  every other list paged.
- Updates: one product at a time with its own releases; an Events update
  pins the church's Accounts (or updates it when the release needs it, or
  installs it first); fixes the requirement check comparing an object.
- A status job adds installs found on a server and ties them to their
  registration; unlinked registered sites trigger one (daily); heartbeats
  tie install records too; the install page shows its registration.
13 new tests (209).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:09:31 +02:00
joshuaandClaude Opus 5.5 05d043e0a3 Hub 2.5.0: a New install of Events 3.x installs the church's Accounts first
A release's "requires accounts" is met at install: Accounts then the
product in one batch (the product runs only after Accounts succeeded; a
failed Accounts fails the product's record and frees its ports). Accounts
domain from the form, or accounts.<rest of the domain>. An Accounts older
than required is refused. Contracts 1.8.0 vendored. 4 new tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 14:17:58 +02:00
joshuaandClaude Opus 5.5 dbfa4116c4 Hub 2.4.0: demo sites, and demo data loaded from the Hub
Mark a Cross Events install as a demo site, then load a demo set (small,
events, ministry, multicampus) with a seed-demo job (agent 1.2.0+,
crosscode demo: backup, demo data, restart). Typing the short name for both.
Deployment.isDemo (migration), contracts 1.7.0 vendored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 10:41:03 +02:00
joshuaandClaude Opus 5.5 94230d0ba9 Hub 2.3.3: refuse server settings the apps can't start with
TRUST_PROXY=TRUE made an Events install build for minutes, then crash at
startup. Saving a server's configuration now refuses it, and installs and
updates are refused (CONFIG_INVALID) while an older saved configuration has
one. Contracts 1.6.0 vendored (agent.checkEnvValue / invalidValues).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 10:25:57 +02:00
joshuaandClaude Opus 5.5 97e493ef61 Hub 2.3.2: no more installs stuck uninstalling; remove a failed install's record
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 08:50:40 +02:00
joshuaandClaude Opus 5.5 5a2aec7a67 Hub 2.3.1: a server running a job is busy, not down
An agent before 1.1.1 neither polls nor sends stats while it runs a job,
so after 5 minutes the Hub alerted (and emailed) that it was down. While
a job it handed out is within its time limit, the server counts as busy:
no agent_silent alert, online for New install, "Running a job" in the UI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 19:02:49 +02:00
joshuaandClaude Opus 5.5 78857bc0e4 Hub 2.3.0: install Accounts (first product, or added next to a church's others)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 14:34:18 +02:00
joshuaandClaude Opus 5.5 106d71e566 Hub 2.2.0: a public key on the v2 heartbeat, Clear public key
Installs that registered with protocol v1 move to v2 by sending their
public key on a signed v2 heartbeat: saved / matches / mismatch, never a
failed heartbeat. Clear public key (2FA again) for a rebuilt server.
Contracts 1.4.0 vendored; hub-protocol.md §6 updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 12:05:59 +02:00
joshuaandClaude Opus 5.5 7428337aa5 Release 2.1.1
Adopt passes the church's address (needed for domains that don't start with events.), and
Link existing says the short name is a name, not a folder. The changelog entry for the fix,
missing from its commit, is added here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:02:39 +02:00
joshuaandClaude Opus 5.5 a6e9f6bc97 Release 2.1.0
Servers and the agent: New install, scheduled and emergency updates,
batches, adopt, uninstall with an encrypted export, server stats and
alerts. Also dates 2.0.2 correctly (2026-11-17).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls1vMdni7EfytGYqQTprME
2026-11-17 22:25:50 +02:00
joshua 22fdd3a388 Merge branch 'feat/servers-agent' 2026-11-17 22:23:43 +02:00
joshuaandClaude Opus 5.5 74c56b67e9 Release 2.0.2: refund a payment; void invoices that aren't paid
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 13:36:09 +02:00
joshuaandClaude Opus 5.5 041461f2b5 Servers and the agent, backend (2.1.0): join, jobs, schedules, port list, stats, alerts
- Agent API /api/agent/v1: join with a one-time token, then poll, stats,
  report and export upload, all signed with the server's Ed25519 key.
- Jobs signed with a separate job key (HUB_JOB_SIGNING_KEY_FILE) when
  delivered, config sealed to the server; one at a time per server;
  missed when not picked up in their window.
- New install (licence, ports, preflight against the release's env
  template), Proxy done with public URL checks, scheduled / emergency
  (2FA, reason) / batch updates with email and banner, uninstall with
  an encrypted export first (the key is never stored), adopt and
  linking existing installs, purge after 30 days.
- Port list, install defaults, server configuration (encrypted), stats
  per minute / hour with roll-up, server alerts. contracts 1.3.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 13:12:28 +02:00
joshuaandClaude Opus 5.5 44e65bb563 Release 2.0.1: AI use in tokens for churches, default markup 15%
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 11:27:45 +02:00
joshuaandClaude Opus 5.5 3579d7abe6 Release 2.0.0: Cross Code Hub
Docs: protocol v2 (hub-protocol.md §6), README, deployment.md
(Upgrading to 2.0), plan marked done, CHANGELOG 2.0.0; versions 2.0.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 09:07:16 +02:00
joshuaandClaude Opus 5.5 816452e1c2 Hub 2.0 step 3: releases per product, with requirements
- Release.product and requires; unique (product, version); latest version
  per product (latest_version stays Cross Events' latest)
- Release sources per product (Releases page): repository, tag prefix,
  notes file. Defaults: every product from crosscode-platform plus Cross
  Events' v1.2.3 tags from hope-events. A product's releases are only
  removed when all its sources were read and found tags
- "— requires accounts 1.2.0" in a notes heading: Request update answers
  409 REQUIREMENT_NOT_MET until the church's install of that product is new
  enough; install page and Releases page show it; v2 replies carry requires
- @crosscode/contracts 1.1.0 vendored (optional requires on releases)
- Alerts, dashboard and install lists compare against each product's latest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 15:57:46 +02:00
joshuaandClaude Opus 5.5 ad602b2846 Hub 2.0 step 1: products foundation
- Product enum (events, accounts, website, app) on Licence and Install,
  Install.publicKey; existing rows are events
- One open licence per product per customer: partial unique index, with a
  migration guard that names customers with duplicates (npm run check:hub2
  lists them beforehand)
- Licence keys per product (CEH-, CCA-, CCW-, CCP-); free Accounts licence
  created with the first other product licence
- Protocol v1 registers Events licences only (409 WRONG_PRODUCT); only Events
  licences can be invoiced until billing per customer
- Cross Code Hub in the UI, emails and PDFs
- @crosscode/contracts 1.0.0 vendored (backend/vendor)
- Steps merge into release/2.0, not main (plan updated)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 15:28:06 +02:00
joshuaandClaude Opus 5.5 6fce0fe90e Billing: invoices, approval, receipts, statements, licence changes (1.7.0)
- Invoices drafted 14 days before each licence's invoice date and emailed
  to the alert email for approval; approved ones go out on their date from
  08:00 SA time. Drafts can be edited, recalculated, sent early, put back
  to draft or voided; one-off invoices too.
- Annual tier review from the 12-month event-income band; approving a tier
  change emails a notice of licence change, applied when the invoice goes out.
  Notices can also be sent by hand.
- Founding churches (35% off as its own line), payments with receipts,
  statements for any dates.
- Every billing email is styled HTML with a PDF (invoice / tax invoice,
  receipt, statement, licence change) and logged per customer.
- Settings -> Billing: business and bank details, VAT (off: plain invoices;
  on: VAT-inclusive tax invoices), timing and numbering.
- Migration 20261103111645_invoicing; pdfkit 0.17.2; tests/billing.test.js;
  scripts/sample-billing-pdfs.js.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 13:42:45 +02:00
joshuaandClaude Opus 5.5 219b08538f Billing tiers on the install page, plan picker on licences (1.6.2)
- Install page shows the 12-month event-income band (Cross Events 2.0.2+),
  the tier it falls in with its price and founding price, and flags a
  licence whose plan is a different tier.
- Licence card: Plan picker (Trial or Seed to Network).
- Protocol doc: 14 income bands and eventIncome12m.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 12:18:02 +02:00
joshuaandClaude Opus 5.5 ae7e10844d Sonnet 5.5 as the default AI model, and a model list with prices (1.6.1)
Settings -> AI picks the model from a list (utils/aiModels.js: Sonnet,
Haiku, Opus 5.5 with list prices) or takes another model ID; choosing
one fills in its prices. Blank prices use the built-in ones, and cache
reads are metered at each model's own price.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:21:30 +02:00
joshuaandClaude Opus 5.5 49f62aeb75 WIP Hub 1.6.0: AI proxy for Cross Events 2.0
Signed /installs/ai/status and /installs/ai/complete (protocol 3b):
the Hub holds the Claude key, holds each call's worst case against the
licence's monthly cap in a locked transaction, calls Claude Haiku 5.5
and meters real cost and charged amount (markup) in rand. Settings ->
AI, licence markup override, AI use on the install page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 09:16:04 +02:00
joshuaandClaude Opus 5.5 a3e9c5b4f6 Change an open update request to a newer version (1.5.0)
When a site asks again after a newer version came out, the open
update_requested alert moves on to the latest version ("changed from
...") and the alert address is emailed once; the response says
changed: true with previousVersion (protocol §3a). Needs Cross Events
1.47.4 for the button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 12:16:59 +02:00
joshuaandClaude Opus 5.5 633813c50d Read release notes from the default branch; changelog (1.4.1)
Notes still only attach to tagged versions, so they can be written ahead of a
release or corrected afterwards without tagging a new version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 09:25:10 +02:00
joshuaandClaude Opus 5.5 0adb304024 Releases from git tags and WHATS-NEW.md; docs, changelog (1.4.0)
The Hub reads the Cross Events repo's v* tags (each a release, the newest the
latest version) and the client notes from WHATS-NEW.md as of the newest tag,
every 15 minutes and on Sync now. Urgent/security in a version heading marks it
urgent. Repo address, notes path and an optional encrypted token on the
Releases page; manual releases only when no repo is set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 09:13:30 +02:00