Commit Graph
22 Commits
Author SHA1 Message Date
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 0e19005337 Popup kit in components/ui.tsx; plan for popups everywhere
- ReadCard, Field, Fields and ModalButtons move from components/customer/ReadCard.tsx into
  components/ui.tsx, next to Modal, FormError and PageMessage.
- useSubmit moves from components/install/shared.ts into components/ui.tsx.
- The customer and install components import them from @/components/ui. No visible change.
- docs/POPUPS-PLAN.md: every inline add or edit left in the Hub, and the plan for 2.16.0 and 2.17.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 12:17:34 +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 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 9aa06ae894 Docs: token AI status is shown from Cross Events 2.2.0 (was planned for 2.3.0)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 11:38:33 +02:00
joshuaandClaude Opus 5.5 7cd59ed651 AI status: tokens used and an estimated allowance in tokens, for churches (2.0.1)
Churches see their AI use as input/output tokens; rand stays on the Hub.
The status also carries usedInputTokens/usedOutputTokens and
capInputTokens/capOutputTokens (half the cap priced as input, half as
output). Cents unchanged for older installs. Protocol §3b updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:58:49 +02:00
joshuaandClaude Opus 5.5 5f416c828b Docs: point to the roadmap and protocol in crosscode-platform
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 09:48:37 +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 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 788ab39dd1 Docs: Hub 2.0.0 plan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 15:18:17 +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 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 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
joshuaandClaude Opus 5.5 1449e5046e Releases with what's new, notices to churches, withdrawn update requests
- Releases page: each Cross Events version with notes and an urgent flag; the
  newest is the latest version (moved off Settings; the old setting becomes the
  first release). Installs get the notes for every newer version.
- Notices page: a banner for site admins and supervisors (with a time window),
  an email to the customer and admin contact, or both; for every install or
  chosen ones.
- POST /api/installs/update-request/cancel resolves the request and emails Joshua.
- Protocol doc: releases and notices in the heartbeat/register replies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 08:54:35 +02:00
joshuaandClaude Opus 5.5 ed42b963fc Protocol doc: campusCount in the heartbeat (Cross Events 1.43.0)
Optional field, so no protocol version change; the Hub stores stats as-is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 16:55:54 +02:00
joshuaandClaude Opus 5.5 603b2046d4 Update requests from installs (1.1.0)
POST /api/installs/update-request, signed like the heartbeat: opens an
update_requested alert and emails the alert address once; the next heartbeat
on a newer version resolves it. Shares the signature check with the heartbeat
and syncs docs/hub-protocol.md with the install's copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 13:55:03 +02:00
joshuaandClaude Opus 5.5 a1e3f9214b Rename to Cross Events Hub; add logo and favicon
Hope Events is now Cross Events. Protocol identifiers (hel1. tokens, CEH- keys)
are unchanged so existing installs keep working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 13:38:52 +02:00
joshuaandClaude Opus 5.5 e72330893a Hub v1: install API, licences, health dashboard, alerts
- Protocol 1 (docs/hub-protocol.md): public key, register, signed heartbeats
- Ed25519 licence tokens (30-day validity, status, expiry, grace, limits)
- Dashboard: installs, install detail, customers and licences, alerts,
  settings and audit log; two-factor login required
- Alert checks every 5 minutes, emailed once; heartbeat roll-up after 30 days
- Unit tests for encryption, tokens, signatures, TOTP and alert rules

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012mt6TCv85T9VKRq3cV7rXq
2026-10-26 12:12:51 +02:00