Skip to content

LumiBase v2.1.0

Choose a tag to compare

@github-actions github-actions released this 15 Nov 19:16
· 498 commits to main since this release

Version

  • v2.1.0

Date

  • 2026-11-16

Highlights

  • Three epics complete. Security hardening parity (#674): active session and device management, passkeys (WebAuthn) for staff, social login (Google, Apple, GitHub) for members, a configurable password policy with an optional breach check, a self-service security history, filter and upload sanitisation, secure-by-default create-lumibase templates and lumibase doctor --security, a coordinated disclosure programme, and a hardened distroless image.
  • Deployment & hosting convenience (#675): one-click Render deploy, an official Helm chart, role-based deploy permissions with environment promotion, Astro and SvelteKit starters, and a live per-site OpenAPI 3.1 document.
  • Content modeling parity (#676): geopoint fields with a map input and map layout, timezone-aware datetimes, dynamic zones (blocks), hierarchical collections with folder-mode permissions, tabs/groups form layout with conditional visibility, and field option parity.
  • Ops diagnostics plane: a read-only /api/v1/ops/* surface and MCP tools, gated by LUMIBASE_OPS_TOKEN, that report pending migrations, schema drift, RLS coherence and captured 5xx errors.
  • Background jobs reach parity on Cloudflare Workers (B131): search indexing, revalidation, scheduled publish, veto commits, reconciler goals, deployment polling, Change Feed webhooks and envelope migration.
  • Agents and MCP: OAuth 2.1 for hosted MCP connectors, Site Skills, the askUser clarification tool and governed external-action tools; background CSV/JSON import, collection export and typed JSON filters.

Security

  • Filter sanitisation (#738, epic #674): a filter, sort or search filter/sort that names a field the caller cannot read is refused with 403 FIELD_FORBIDDEN before any query runs, so hidden fields can no longer be probed through _eq/_starts_with/_null, _or nesting, JSON paths, sort order or counts (REST, GraphQL, export, MCP). %, _ and \ in _contains/_starts_with/_ends_with values are matched literally (item filters, permission rules, SCIM). o2m expansion no longer groups by a hidden foreign key and m2m expansion requires read on the junction. Search drops hits whose _title comes from a hidden field and reports only visible totalHits to restricted callers. Filters nest at most 16 levels. Audit: Filter sanitisation audit.

  • Bootstrap and single-use token race audit (#732, epic #674): parallel POST /api/v1/setup/complete requests yield exactly one admin, and requests that were in flight when another setup committed now get 409 SETUP_ALREADY_COMPLETED instead of 404 (later requests still get 404). POST /api/v1/auth/verify-email and POST /api/v1/auth/reset-password are single-winner under concurrency (conditional UPDATE / compare-and-swap on token_version) and get a per-IP brake (20 per 15 minutes). The public auth brakes now count with the runtime's atomic rate limiter, so a parallel burst can no longer slip past them. See Bootstrap & single-use token audit.

  • Upload hardening (#740, epic #674): raw-byte uploads are classified by magic bytes and must match the declared type (HTML/JS/SVG/PHP or executables disguised as images, PDFs or text are refused). A polyglot scan rejects ZIP/JAR archives appended to images or PDFs (GIFAR), markup or PHP inside images and video, PDF headers hidden in images, data after PNG IEND (UPLOAD_EMBEDDED_PAYLOAD), and PDFs with JavaScript, launch or rich-media actions, including inside compressed object streams (UPLOAD_ACTIVE_PDF). A Workers-safe SVG sanitiser backs the existing UPLOAD_UNSAFE_SVG check and strips external references when SVGs are served; clean SVGs are served byte-identical. Filenames with control characters, NUL, bidi overrides, traversal or a dangerous extension in any position (shell.php.png) get 400 UPLOAD_UNSAFE_FILENAME, including at POST /files/presigned-url. GET /media/:key serves only PNG/JPEG/GIF/WebP/AVIF/MP4/WebM inline and everything else as an attachment, always with nosniff and a sandbox CSP. MP4 and WebM join the upload catalogue, off by default. See Upload security.

  • External-issuer JWTs can no longer set LumiBase's own principal markers. withAuth previously copied the verified payload onto auth.raw as-is, so a trusted issuer's dev, isBootstrap or tfaVerified claim reached the dev-admin bypass, bootstrap provenance and Studio 2FA guards. Those markers (and anonymous, apiKey, mcpOAuth) are now dropped; issuer claims such as amr/acr are kept.

  • Hardened production image: both base images are pinned by digest (node:22-slim@sha256:…, gcr.io/distroless/nodejs22-debian13:nonroot@sha256:…; Dependabot bumps tag and digest); the runtime stage is distroless (no shell, no package manager), runs as UID/GID 65532, keeps application files root-owned, and starts with a read-only root filesystem. The shell entrypoint is replaced by docker/scripts/entrypoint.mjs and the HEALTHCHECK by docker/scripts/healthcheck.mjs, which now probes the worker health port for LUMIBASE_PROCESS_ROLE=worker instead of always 1989. docker/docker-compose.prod.yml and docker/docker-compose.gcp.yml set read_only: true, a /tmp tmpfs, cap_drop: [ALL], no-new-privileges and init: true (#734).

  • Release supply chain: release.yml builds the image and fails on any CRITICAL Trivy finding in the image or in pnpm-lock.yaml in a job that the GitHub Release — and through it every publish job (Docker image, Worker, Pages, npm) — depends on, so a failed gate stops the release as a whole rather than leaving one without its image; it then signs the pushed digest with keyless cosign (GitHub OIDC, no stored key), attests an SPDX SBOM, verifies both in the smoke job, and attaches image and dependency SBOMs to the GitHub Release. docker.yml builds once, locally, runs the same Trivy gate and a read-only, capability-free container health check on every PR and on main, and pushes that same image from main only after both pass. Trivy, Syft and cosign are installed by scripts/install-image-tools.sh, pinned by version and SHA-256 (#734).

Added

  • Field value options (#751): allowClear: false on select-radio / select-dropdown fields stops a set value from being cleared (Studio hides the clear control, the API rejects null/""); minLength / maxLength on string / text fields are enforced by the API, counted in Unicode code points; options.slug sets a slug charset policy (ascii with Vietnamese transliteration, unicode, or custom with a ReDoS-safe, linear-time pattern). Options are validated on schema write (422 INVALID_FIELD_OPTIONS) and enforced on every item write. Fields without these keys behave as before. See Field value options.
  • Timezone-aware datetime fields (#747): options.timezone: true on a datetime/timestamp field stores { instant, tz, offset } (IANA zone, validated with Intl). Writes accept { instant, tz }, { local, tz } or an ISO string; DST gaps and overlaps follow Temporal's disambiguation (compatible by default, reject available). Filters and sort compare the instant; GraphQL exposes ZonedDateTime, typegen and the SDK type the object. Fields without the option are unchanged. See Timezone-aware datetime fields.
  • Studio: Settings → Date & time sets a per-user display time zone (users.preferences.timezone, default: browser). Timezone-aware values are edited with a zone picker and listed in the user's zone with the original zone as a hint.
  • Form layout for collections (#750): arrange the item form into tabs, groups (optionally collapsible) and dividers, and show any node only when sibling field values match a declarative condition (eq, neq, in, nin, empty, nempty, gt, lt, gte, lte, contains with and/or/not; no eval). Stored at collection.meta.formLayout (no migration), edited in Data model → Form layout or via GET/PUT /api/v1/collections/:name/form-layout. The Studio and the CMS share one condition engine: a field hidden by its condition skips required validation only when skipRequiredWhenHidden: true, and hiddenValue: keep|clear (default keep) decides what saving does to its stale value. Collections without a layout render as before. See Form layout.
  • Dynamic zones: a blocks field type holding an ordered list of { id, type, data } blocks, where each type is a block template (a collection of the same site) listed in options.allowedBlocks (min/max optional). Every block is validated against its template with the collection field validator, recursively for nested zones (max depth 5), with path-precise errors; null is stored as []. GraphQL exposes each zone as a list of a union of <Template>Block types, typegen emits a discriminated union on type, the SDK exports LumibaseBlock, and Studio gets a block editor (add, remove, drag/keyboard reorder, collapse). See Dynamic zones (#748).
  • geopoint field type (#746, epic #676): { lat, lng } validated on write, with _near ({ lat, lng, radius } in metres) and _within_bbox ([minLng, minLat, maxLng, maxLat]) filters on REST and GraphQL. Plain Postgres computes them with a range prefilter plus haversine; with PostGIS installed (detected at runtime) the exact test is ST_DWithin on the same sphere, so both return the same rows. Antimeridian and poles are handled; no migration. Typed as { lat: number; lng: number } by SDK typegen and as GeoPoint in GraphQL. See Geopoint fields.
  • Studio: geopoint input with a lazy-loaded MapLibre map (click or drag), typed coordinates and Use my location, plus a Map layout for collections with a geopoint field (markers open the item; Only this area filters by the visible bounds). Default tiles are OpenFreeMap (no API key); override with VITE_MAP_STYLE_URL or a field's mapStyleUrl option. The CMS Permissions-Policy now allows geolocation=(self).
  • Hierarchical collections (#749): a collection with meta.tree = { enabled, maxDepth?, onDelete? } stores items as a tree (parentId + materialised path, maintained server-side). Create under a parent with parentId, read with ?tree=children|subtree|ancestors, and move a subtree with POST /api/v1/items/:collection/:id/move (cycles and depth overflow are 409; concurrent moves are serialised per collection). Deleting a parent follows onDelete: restrict (default), cascade or reparent. Row rules apply to every tree query. Studio shows such collections as a tree with reorder / indent / outdent / add-child. Migration 0034_item_tree adds two nullable columns and two indexes to lumibase_items; no backfill, existing items read as roots. parent_id has no foreign key: every tree lookup is by site_id + collection + id, so the tree is correct whether item ids are unique per instance or per site. See Hierarchical collections.
  • Folder-mode permissions (#749): a policy with read + update but no create/delete on a collection now hides New item, Add child and Delete in Studio while browsing and editing keep working (the API already refused those actions). The item editor's Delete button is hidden instead of shown disabled when delete is not granted.
  • Coordinated vulnerability disclosure programme (#737, epic #674): SECURITY.md now lists the real supported lines (2.0.x; 1.0.x security fixes until 2027-05-10), response targets by CVSS severity (acknowledge 3 business days, triage 7, fix 14/30/60/90 days for Critical/High/Medium/Low), GHSA + CVE flow, embargo, credit and safe harbour, and a triage policy for AI-generated and scanner reports (working PoC against a supported version required; how such reports are closed). New bilingual pages: vulnerability disclosure policy, security advisories (where advisories are published and the GitHub API / OSV feed), advisory template and advisory runbook with a dry run of the first advisory. The issue chooser links to private vulnerability reporting; release notes get a Security section and label category.
  • Secure-by-default create-lumibase templates and lumibase doctor --security (#731, epic #674). No template ships a secret or a default admin any more: the committed .env.example / .dev.vars.example leaves secrets empty and the scaffolder writes a gitignored 0600 .env / .dev.vars with fresh JWT_SECRET, ENCRYPTION_KEY and (Next.js) first-admin password. The Next.js compose file reads its secrets as ${VAR:?…} instead of dev_secret_key; the Docker and Cloudflare starters add CSP headers, an exact-origin CORS allowlist and a fail-closed JWT_SECRET check, and wrangler.toml no longer carries secrets in [vars]. lumibase doctor --security [--production] [--json] [--env-file] audits .env, wrangler.toml and compose files against the production checklist (secrets, CORS, refresh-cookie flags, setup-token gate, RLS, rate limits, Redis, database TLS, browser-exposed credentials) with a severity, rule and fix per finding, and exits 1 on any critical. A fresh scaffold of every template passes with zero criticals. See docs/en/security/secure-defaults.md.
  • Password policy (#733, epic #674): one configurable policy — length, character classes, a zxcvbn-style strength score (in-house estimator shared by the CMS and Studio) and an optional Have I Been Pwned k-anonymity check, off by default — is enforced on registration, change password, reset password (incl. invite first password), the setup wizard and backup-code recovery. A rejected password returns 400 { errors: [{ code: 'PASSWORD_POLICY', message, rules: [{ rule, ok, … }] }] } naming each failed rule. The default keeps the previous rules (12+ characters, four character classes) and adds a "fair" strength floor (minStrength: 2), so Password1234! is now refused; existing passwords keep working. GET /api/v1/auth/password-policy serves the public rule set; GET/PUT /api/v1/admin/password-policy reads and changes it (PUT: bootstrap admin, audited). Studio: strength meter + live checklist on Settings → Security → Change password (new) and the recovery reset. See Password policy.
  • Security history (#739, epic #674): GET /api/v1/me/security-history returns the caller's own sign-ins, failed attempts, new devices, password and two-factor changes and session sign-outs from the audit log, newest first with a cursor, for staff and members alike. Only an allow-list of events is shown, IPs are shortened (203.0.113.x), and an administrator's IP or browser is never shown. ?scope=account adds the other sites the user belongs to. GET /api/v1/me/security-history/export?format=csv|json downloads up to 5,000 events (formula-safe CSV, 10 exports per 15 minutes). A sign-in (password or TOTP) from a device the account has not used before emails the owner after the response is sent: time, device, approximate IP and where to sign the session out (LUMIBASE_SECURITY_SETTINGS_URL, optional). At most 3 emails per user per hour; every new device is recorded as new_device_login. Devices are the anomaly detector's fingerprints in login_baselines, now learned even when the device check is off. TOTP sign-ins are now audited as login_success, and refresh_token_reuse_detected records the token owner. Studio: Settings → Security → Security history with CSV/JSON export. See Security history.
  • Passkeys (WebAuthn) for staff (#735, epic #674): register under Settings → Security → Passkeys (password step-up), then sign in without a password ("Sign in with a passkey") or use the passkey as the second factor after the password. Both sessions are TFA-verified (amr webauthn, tfaVerified), so enforceTfa policies are satisfied, and both carry sid like any other login. /auth/login now lists the accepted second factors in methods on mfa_required. Challenges are single-use with a 5-minute TTL; a signature-counter regression is rejected and audited as passkey_counter_regression. Recovery codes are shared with TOTP, and a passkey-only user gets them with the first passkey. RP ID / origins come from WEBAUTHN_ORIGINS / WEBAUTHN_RP_ID or, unset, from an already-trusted Studio origin. A Studio user under enforceTfa with no second factor can now reach the TOTP and passkey enrollment endpoints (and only those) instead of being locked out. Passkey controls are hidden in the desktop app. New table lumibase_user_passkeys (migration 0032). See Passkeys.
  • Social login for members (#736, epic #674): sign in with Google, Apple or GitHub on the subscriber (frontend) realm. Per-site provider settings in Studio (Settings → Social login, /api/v1/admin/social-providers) with the client secret / Apple .p8 key encrypted under ENCRYPTION_KEY, an exact-match redirect allow-list, and authorization code + PKCE + state + nonce (Google/Apple ID tokens verified against the provider JWKS; GitHub via its API, primary verified email only; Apple form_post with a per-exchange ES256 client secret). The frontend redeems a one-time code with its own PKCE verifier at POST /api/v1/auth/social/exchange and gets the same session as password login (aud: frontend, sid). A new identity auto-links to an existing account only when the provider verified the email and the account verified its own, and never onto a Studio account; members list, link (/me/identities) and unlink identities but cannot remove their last login method. Apple's first-authorization name is stored and kept on later sign-ins. Migration 0033 adds lumibase_user_identities (the #794 link table, backfilled from users.external_id) and lumibase_social_auth_providers. Audited as social_login, social_account_created, social_identity_linked, social_identity_unlinked, social_login_failed, social_provider_configured. See Social login.
  • Active session & device management (#730, epic #674): every login and refresh signs the session id (refresh-token family) into the access JWT as sid. GET /api/v1/me/sessions rows now carry a stable sessionId, startedAt, lastSeenAt and current; DELETE /api/v1/me/sessions/:id accepts the sessionId; DELETE /api/v1/me/sessions?scope=others signs out every other device. A revoked session's access token is rejected on the next request on both runtimes instead of living until it expires. Confirming TOTP enrolment signs out every other session. Revocations are audited as session_revoked / sessions_revoked. Studio: Settings → Security → Active sessions lists devices with per-device sign-out and "Sign out other sessions".
  • Deployment environments, role-based deploy permissions and promotion (#743). A site maps deployment targets to environments (preview, staging, production by default, settings key deployment.environments) and grants deploy:trigger:<env|target|*> / deploy:approve:<env|*> through permission rows on lumibase_deploy:<scope>. Triggering or promoting into an environment with requiresApproval (production by default) parks a pending approval in lumibase_ai_approvals that another signed-in person holding deploy:approve:<env> must accept; the requester cannot approve their own request. POST /environments/staging/promote ships the same build (Vercel promote / Netlify restore) or re-triggers the same commit. New endpoints under /api/v1/deployments: access, environments, environments/:key/deploy|promote, approvals, approvals/:id/decide; the deployments page gains environments, promote and pending-approval panels. Non-admins with a deploy grant can now use the deployments API; target CRUD, the environment map and build logs stay admin-only. No migration. See Deployment environments.
  • create-lumibase --template astro: an Astro 7 static site that reads content through the lumibase client at build time and deploys dist/ to Cloudflare Pages with npm run deploy. It accepts only a publishable key for normal builds; an opt-in draft preview build needs a separate secret token and fails closed without it. See Astro starter and Static export to Cloudflare Pages (#744).
  • create-lumibase --template sveltekit: a SvelteKit 3 site on @sveltejs/adapter-cloudflare with server-side loads and draft preview behind an HMAC-signed, HttpOnly cookie (off unless LUMIBASE_PREVIEW_SECRET and LUMIBASE_PREVIEW_TOKEN are set). Both starters ship typed content, an .env.example with every secret empty, and a marked hook point for visual editing, which is not released yet. create-lumibase --help lists the templates. The CI scaffold smoke now also builds both starters and, on main with Cloudflare secrets configured, deploys the Astro build to Pages (#744).
  • Live OpenAPI 3.1 document per site: GET /api/v1/openapi.json is generated from the site schema and filtered by the caller's permissions. It lists only readable collections, fields allowed by the field mask, and operations the caller holds; the public realm gets reads only. Off by default, and while off it answers with the unknown-route 404. A site admin enables it and picks realms (studio, frontend, api_key, public) with PUT /api/v1/openapi/config or in Studio → Settings → Developer → Types (setting key openapi, no migration). Documents are cached per schema version and permission fingerprint, and a schema change invalidates them. Field types map the same way lumibase typegen maps them. The docs site has an API explorer page (bundled Swagger UI) that loads a URL you enter. See Live OpenAPI document.
  • Official Helm chart for Kubernetes (deploy/helm/lumibase, #742): the CMS API and Studio from the published image, migrations in init containers, a release Job or the image entrypoint, serialised by a PostgreSQL advisory lock in migrate.cjs apply so concurrent web pods apply once, with the worker held by a read-only migrate.cjs wait gate until the schema is current, probes on /health and /health/ready, non-root with a read-only root filesystem, bundled or external PostgreSQL and Redis, optional Meilisearch, ingress with optional TLS, HPA, PDB, NetworkPolicy and helm test. JWT_SECRET and ENCRYPTION_KEY are generated once and kept across upgrades, or read from secrets.existingSecret. CI lints and render-tests the chart and installs it on kind, including an N-1 to N schema upgrade with a worker and two web replicas; each release pushes it to oci://ghcr.io/khuepm/charts/lumibase. See Kubernetes (Helm chart).
  • Usage emitter seam (@lumibase/contracts/platform, registerPlatformSeams({ usage })): the CMS reports API and delivery requests, storage writes, organization membership changes, agent runs, model tokens and outbound email as tenant-attributed UsageEvents with a uuidv7 idempotency key. The built-in default is a no-op that builds no event and performs no I/O; with an emitter registered, attribution, emit and flush run after the response (waitUntil on Workers). pnpm -F @lumibase/cms bench:usage-seam measures the request-path cost. See docs/en/architecture/platform-extension-points.md.
  • Ops diagnostics plane: a read-only operator surface under /api/v1/ops/*, gated by a new static secret LUMIBASE_OPS_TOKEN (at least 32 characters; unset → 404 everywhere). diagnostics reports the release, pending migrations against the deployed code, schema drift (tables and columns the code selects that the database lacks), RLS flag/role/policy coherence (the Docker startup checks, now also on Workers) and service health as typed findings with fixes. sites/:siteId/probe runs GET /api/v1/site's statement on the request connection and says whether the row is missing, hidden by RLS or failing (with SQLSTATE). Responses carry no row data. See Ops diagnostics.
  • Every 5xx response is captured to lumibase_ops_errors by requestId, with the sanitized error chain including the Postgres SQLSTATE that Drizzle wraps (query params, Postgres detail and tokens are dropped). It is readable at GET /api/v1/ops/errors[/:requestId], kept for 14 days, and written best-effort on the system connection. Migration 0031_ops_errors; re-apply rls-policies.sql, which forces RLS on the table with no policy.
  • MCP: ops_diagnostics, ops_list_errors, ops_get_error and ops_probe_site when the server's environment has LUMIBASE_OPS_TOKEN; with no LUMIBASE_TOKEN the server runs ops-only.
  • External-action tools: a registry for agent tools whose effect lands outside the CMS. A tool declares risk, reversibility, blastRadius, the capability it needs and the names of its secrets, and the harness decides on that declaration. A high-risk or irreversible tool waits for an approval at every autonomy level; with no autonomy grant the level is L1. The same decision is returned through MCP tools/call and the Agent API. Each proposal, approval, rejection, refusal and execution writes an agent.external_action.* activity row. LumiBase registers no such tool itself; createHttpEchoTool is a reference for tests. See External-action tools.
  • Approvals for external-action tools are stored with approvalPolicy: human_required and are released only by a signed-in user. An API key, an OAuth connector token and the agent reviewer are refused with HUMAN_APPROVAL_REQUIRED.
  • GET/PUT/DELETE /api/v1/agent/tool-secrets[/:name]: per-site secrets for external-action tools, encrypted with the runtime KeyProvider and never returned. Managed by a signed-in site administrator; API keys are refused. A tool reads a secret by the name it declared, only while its handler runs, and the resolved values are removed from whatever the handler returns or throws (migration 0030, no backfill).
  • Platform extension points for operators: a deployment entry can supply its own policy implementations with registerPlatformSeams() (@lumibase/cms/platform), with the contracts in @lumibase/contracts/platform. The first seam is an entitlement resolver (resolve / authorize); its built-in default is unlimited and performs no I/O, a resolver that throws is logged and the request proceeds, and a refusal is answered 429 LIMIT_EXCEEDED on REST, GraphQL and MCP alike. The stock entry points register nothing, so existing behaviour is unchanged. See docs/en/architecture/platform-extension-points.md.
  • @lumibase/cms now exports its entry points (/app, /cloudflare, /node, /platform) so a deployment can wrap them. @lumibase/cms/node provides startNodeServer(), which starts nothing on import; running serve.ts directly is unchanged.
  • Cached site → organization lookup (siteOrganizationId) through the runtime cache, invalidated when a site is created, transferred or deleted.
  • pnpm imports:check (part of pnpm check:all): every @lumibase/* import and dependency under apps/ and packages/ must resolve to a package in this workspace.
  • Activation milestones: each site records the first time it reaches site_created, item_published, delivery_request and agent_run. GET /api/v1/activation (site admins) returns the funnel with timestamps. Milestones are write-once, site-scoped and stay in the install's own database (migration 0029).
  • Opt-in anonymous usage telemetry for self-hosted installs. Off by default, no built-in endpoint: it sends only when LUMIBASE_TELEMETRY_ENABLED=true and LUMIBASE_TELEMETRY_ENDPOINT are both set, and LUMIBASE_TELEMETRY_DISABLED=true or DO_NOT_TRACK=1 turns it off. At most four events per install, each matching the published schema (docs/schemas/telemetry-event.v1.schema.json): a random install id, the event name, a UTC day, the version and the runtime. See Activation milestones and usage telemetry.
  • Site Skills (#712): playbooks a site writes for its agents — house style, translation rules, page structure — as Markdown with front matter. Active skills are added to the instructions of matching runs in the Copilot chat, the generation tools (aiContentAssist, aiSuggestField, repairTranslation, generateAppSpec, generateSeedData) and over MCP as prompts/list / prompts/get. Every content change is an immutable version with author, source and sha256 hash, and each run records the slug@version it used. A skill is instruction text only: it grants no tool or capability and does not bypass approvals, autonomy levels, the kill switch or the constitution.
  • /api/v1/agent/skills API: CRUD, activate/archive, version trail and restore, Markdown import/export, and /match to preview what a run would receive. Reading and writing skills both need a control-plane admin — over MCP too, where prompts/* are empty for any other caller; non-admin skill authors are not supported yet, and riskClass is a review label, not a permission tier. Each write (skill, version, audit entry) is one transaction. PATCH takes expectedVersion and status actions take version (409 VERSION_MISMATCH); a skill that was ever active cannot be deleted, only archived (409 SKILL_HAS_BEEN_ACTIVE); an import that would change an active skill is refused per document unless it sets updateActive. A body is at most 12,000 characters — the per-run injection budget, so any active skill can be injected. Copilot triggers match the latest user turns of the conversation, not only the current message.
  • lumibase skills list | pull | push | install in the CLI, for keeping skills in git and deploying them from CI (push --check fails when the site differs from the directory). push is the deploy path and updates active skills; install never changes a skill that is already active.
  • Studio: Mission Control → Skills, with an editor, lifecycle actions, version history and a match preview. Saving and activating are guarded by the version on screen, and skills that were ever active offer Archive instead of Delete.
  • MCP tool-schema fidelity suite. CI validates every stdio and HTTP tool inputSchema as JSON Schema (meta-schema and strict compilation in draft-07 and 2020-12) and fails when the tools/list output of either transport differs from its committed golden. What it proves about agreement with the server depends on the tool. HTTP tools and governed stdio tools are probed value by value against the canonical contract (validateAgentToolInput). The probes include every enum member and invalid array elements. The 33 ungoverned stdio mutations that send a JSON body, plus diff_schema, are compared with the Zod object their REST route parses with. The comparison covers key set at every depth, types, enums and required keys. It also checks that the handler forwards every advertised key to the bound route and that the route body schema accepts every probed value. That route body golden is generated in apps/cms and pinned against the live route schemas. A field-type × nullable × localized × repeatable matrix, including relations and files, checks that values pass through both transports unchanged. Not covered: rules that JSON Schema cannot state, such as cross-field refinements (webhook_id when kind is "webhook"), cursor decoding and transforms. Also not covered: query parameters of read tools, documents forwarded verbatim (apply_access_import, restore_backup), HTTP read skills without a canonical schema (B204), per-site schema overrides (B205) and the field type vocabulary (B206). Each accepted gap is listed in the suite and fails once it is stale (#716).
  • One-click deploys of the CMS with its Studio (#741): a Render Blueprint (render.yaml, with a Deploy to Render button in the README) that provisions the published image, Render Postgres and a noeviction Key Value instance and generates JWT_SECRET/ENCRYPTION_KEY; a Fly.io fly.toml (one machine always on, SIGTERM shutdown, secrets set with one fly secrets set); and a Railway railway.json plus docker/railway-template-variables.json, the variable set for the Railway template. Every template gates setup with LUMIBASE_REQUIRE_SETUP_TOKEN. Cloudflare has no deploy button yet; One-click deploys explains what is and is not one-click on each platform.
  • The image entrypoint defaults CORS_ALLOWED_ORIGINS to the deployment's own origin when it is unset — from the new LUMIBASE_PUBLIC_URL, or the platform's RENDER_EXTERNAL_URL, RAILWAY_PUBLIC_DOMAIN or FLY_APP_NAME — and treats a value with no host (such as https:// from an empty platform domain) as unset; prints the setup wizard URL while setup is pending; and in production, when the server is going to start, exits before touching the database when a required variable is missing or ENCRYPTION_KEY is one the server would reject, naming it. ENCRYPTION_KEY is passed to the server exactly as supplied — the CDC registry derives its key from the string, so re-encoding it would change the key. MIGRATION_MODE=preflight|dry-run still needs only DATABASE_URL (#741).
  • Typed JSON filters (Cast_Rule): _eq/_neq/_in/_nin/_gt/_gte/_lt/_lte compare numeric, boolean and date fields by type instead of as text, so filter={"price":{"_gt":9}} matches 10. Nested JSON paths infer the cast from a number/boolean value. A stored value of the wrong type drops out of the result instead of failing the query; a filter value that cannot be cast returns 400 INVALID_FILTER. Sorting on numeric/boolean/date fields is typed too (#729, epic #673).
  • GET /api/v1/collections/:name/index-advice?path=&cast= (read-only, schema:read) returns CREATE INDEX CONCURRENTLY DDL whose expression matches the typed filter, partial on the collection (#729).
  • Collection export: GET /api/v1/items/:collection/export streams CSV or JSON with field selection, locale columns for translatable fields (title.vi), relation modes (id, slug, embed), the list filter/sort syntax and the caller's read permission. CSV neutralises spreadsheet formulas reversibly. Each export is audited as items_exported. Export → import → export round-trips losslessly, translations included (#727, epic #673).
  • Studio: an Export button and dialog on the collection list (format, fields, locales, relations, current filters).
  • SDK: client.items(name).export(params) returns the streaming Response; client.rawFetch(path, init) is the streaming counterpart of rawRequest.
  • Extensions: items.export.before hook to transform or drop fields from each exported row.
  • Background imports: POST /api/v1/imports takes a CSV or JSON export file, answers 202 and writes the rows in chunks under the uploader's permissions, re-checked every chunk. Progress at GET /api/v1/imports/:id, cancel at POST …/cancel, row-level error report at GET …/errors (?format=csv). create or upsert (by id). Jobs survive restarts: a one-minute tick resumes any job whose lease expired. Limits: IMPORT_TIMEOUT, IMPORT_MAX_CONCURRENCY (per site), IMPORT_MAX_BYTES, IMPORT_CHUNK_SIZE (#726, epic #673).
  • Studio: Import button and dialog on the collection list with live progress, cancel and the error report download.
  • SDK: client.imports.create / list / get / errors / errorsCsv / cancel.
  • Database: migration 0028_import_jobs adds lumibase_import_jobs (site-isolated under RLS).

Changed

  • A string filter value on a numeric/boolean/date field that is not a valid number/boolean/date now returns 400 INVALID_FILTER; previously it was compared as text and silently matched nothing or the wrong rows.

  • GET /api/v1/agent/approvals no longer lists askUser questions, and
    POST /api/v1/agent/approvals/:id/decide / /reopen refuse a question id with
    409 NOT_AN_APPROVAL.

  • The agent-runs queue worker now passes a Web Push notifier to the harness, so
    approvals and questions parked by a queued run notify subscribed operators (realtime
    in-app delivery still needs a request context). It forwards only approval and
    question: queued runs still send no run succeeded/failed pushes. On Workers the send
    is kept alive with the queue consumer's waitUntil (the queue() dispatcher now
    forwards its ExecutionContext); on Docker the worker awaits it; a failed send never
    fails the run.

  • Security: external-issuer JWTs on the MCP endpoint must carry the MCP resource URI in aud (token pass-through from other audiences is refused), and a token whose only audience is an MCP resource is refused on every other path. API keys and LumiBase session JWTs are unaffected. Set LUMIBASE_PUBLIC_URL behind a TLS-terminating proxy so the resource URI matches.

Fixed

  • SDK: rawRequest no longer forces content-type: application/json on a FormData body, which broke multipart uploads.

  • Typed JSON timestamp filters (#729) accept the end-of-day time 24:00 (also 24:00:00, 24:00:00.000), which PostgreSQL casts to midnight of the next day. The guard rejected it while the cast accepts it; 24:01, 24:00:01 and 24:00:00.5 stay rejected, as they are in PostgreSQL.

  • Agent harness: askUser clarification tool (#710). An agent that cannot continue
    without a decision it may not make asks a human instead of guessing. The run parks in
    the new waiting_user status (no queue worker, no lock held), the question reaches the
    Mission Control inbox and a question notification, and an answer resumes the run: the
    askUser tool call completes with the answer (wrapped as untrusted data for the model)
    and the run settles succeeded. Stored as agent_approvals rows with
    kind = 'question' — no migration. New endpoints GET /api/v1/agent/questions,
    GET /api/v1/agent/questions/:id and POST /api/v1/agent/questions/:id/answer
    (signed-in users only — any API key, site- or organization-scoped, gets 403; a holder
    of approvals:decide, or the requesting user once backlog B207 opens the route beyond
    site administrators; tenant-scoped,
    audited as agent_question.*, a second answer is 409; the requester's rights are
    re-resolved before resuming). New read skill getUserAnswer returns the outcome to the
    requester only. Both skills are offered to governed agents (agent runs, the queue
    worker, MCP), not to the Copilot chat, which has no run to pause. Questions time out (default one day, max seven) through the 5-minute
    agent-question-sweep on both runtimes, failing the run with
    stopReason: question_timeout; freezing a role or the site, pausing an intent or
    cancelling the run ends waiting runs. MCP tools/call returns
    status: "waiting_user" with questionId. Metrics
    lumibase_agent_questions_total{status} and lumibase_agent_question_wait_seconds; the
    trust ledger shows question counts in promotion evidence.

  • POST /api/v1/deployments/webhook/:provider/:siteId carries the tenant in the URL path so Vercel and Netlify outgoing deployment webhooks (which cannot send custom X-Lumi-Site headers) work on the shared API host (api.lumibase.dev) without a per-site host mapping. POST /api/v1/deployments/webhook/:provider remains supported via withTenant (#569, B163).

  • MCP: OAuth 2.1 protected-resource support for hosted connectors (Claude, ChatGPT, IDE remote MCP) — #346. RFC 9728 metadata at /.well-known/oauth-protected-resource[/api/v1/mcp[/sites/<siteId>]] advertising the site's trusted external issuers as authorization servers; WWW-Authenticate: Bearer resource_metadata=… on MCP 401s; site-addressed endpoint POST /api/v1/mcp/sites/<siteId>; scopes mcp:read/mcp:write/mcp:delete/mcp:admin that only narrow the RBAC capability set, with 403 INSUFFICIENT_SCOPE step-up challenges. No Dynamic Client Registration in LumiBase (use the IdP's, or register the client manually). Guide: docs/en/agent-setup/oauth-connector.md.

  • MCP tools/list: each tool now carries title and annotations (readOnlyHint, destructiveHint) derived from the registry — client hints only (#346, consolidated from #805).

  • @lumibase/mcp-server tools no longer drop or misdescribe keys that the server accepts. Collection and field tools accept null where REST clears a column, such as note, sortField or length. upsert_field no longer sends Zod defaults with every update; those defaults reset required, hidden, encrypted, width and other columns. New stdio fields therefore use database defaults, as REST does, so searchable defaults to true. upsert_field also forwards classification, validation, rawEnabled and migrationPlan instead of dropping them. As on REST, any migrationPlan object, even {}, now passes the risky-change guard like confirmRiskyChange: true, and the plan itself is not executed (B213). Translation keys, CDC targets and intent rules and schedule advertise the constraints that the governed contract enforces (#716).

  • apply_schema and diff_schema take their fields[] entries from the upsert_field schema. They previously stripped 12 keys that REST accepts, so encrypted: true, classification: "pii" created a plaintext, unclassified field. Both tools now also advertise the collection metadata and the relations[] list that the schema endpoint applies. fields and relations, when given, are complete lists, and entries missing from them are deleted. create_collection and update_collection add system, itemDuplicationFields, translations and meta. primaryKeyField carries the REST name pattern (#716).

  • POST /collections/diff (and so diff_schema) reports a field classification change, rated medium like encrypted. A preview that downgraded pii to none previously listed the field as unchanged. The requests the stdio apply_schema, diff_schema, create_cdc_subscription and update_cdc_subscription tools send are now pinned in a golden and replayed against the real routes over PostgreSQL (#716).

  • update_cdc_subscription advertises exactly what PATCH /cdc/subscriptions/:id accepts. status (active or paused) is new, which is the only way to pause or resume a subscription. kind, webhook_id and extension_name are removed, because the PATCH ignored them. CDC collections entries must be non-empty, and cdc_subscription_replay requires an ISO occurred_after and a non-empty cursor (#716).

  • publish_extension matches the route: publisher is a string, and signature, publisherKeyId and a hex bundleSha256 are required. Every call that the previous shape described was refused. create_release and update_release forward maintenanceWindow. Flow nodes accept branches on create_flow and update_flow. The canonical createFlow contract, used by HTTP MCP and governed stdio, previously stripped branches from a branching node (#716).

  • The upsert_field description lists the canonical FieldType spellings (datetime, not dateTime; no float) (#716).

  • Organization MCP tools/list omits the $schema 2020-12 dialect URI, as site tools do. Draft-07 validators, including Ajv's default class, can now compile those schemas (#716).

  • Search indexing and ISR revalidation now run on Cloudflare Workers (B131,
    part 1).
    The Worker had no content-indexing or revalidation-dispatch
    queue, so every item write logged Queue binding not found and on Workers the
    search index and the revalidation targets never saw a content change. Each
    queue now has a producer, consumer and dead-letter queue in every
    wrangler.toml profile, and the Worker's queue() runs the same handlers as
    Docker. Deploy and release workflows create the missing queues; manual
    deployments create them as in DEPLOYMENT-CHECKLIST.md. Until a queue is
    bound, ItemService indexes inline and revalidation is dispatched inline
    instead of being dropped. Existing Workers search indexes are not rebuilt
    automatically: run the reindex CLI.

  • Scheduled publish, veto-window commits, reconciler goals, deployment status,
    Change Feed webhooks and envelope migration now run on Cloudflare Workers
    (B131, parts 2-5).
    Docker ran these on node-cron with a leader lock; the
    Worker had no counterpart, so on Workers scheduled items were never published
    or unpublished, veto-window stagings were never committed, reconciler goals
    never dispatched, deployments stayed building and webhook subscriptions
    received nothing. The Worker's Cron Trigger now runs the same sweeps
    (cloudflare-cron-parity.ts): every minute on local/production, every five
    minutes on staging, not at all on dev/demo (no crons there). Workers delivers
    Change Feed events to webhook subscriptions only (extension subscribers stay
    Docker/Node, B215), within about a minute. Envelope migrations continue on a
    new encryption-envelope-migration queue, created by the deploy workflows.
    Veto commits now claim the approval (pending → deciding) before applying
    the patch: with no leader lock, two overlapping sweeps applied it twice. A
    human veto that arrives while a commit holds the claim now returns 409 ALREADY_DECIDED instead of overwriting it.

  • Reopening a veto whose patch is already live is refused. A veto commit
    that dies after applying its patch is quarantined failed by the claim sweep;
    POST /agent/approvals/:id/reopen used to put it back to pending, and the
    next sweep applied the same staging again. It now answers 409 VETO_ALREADY_APPLIED when a live revision carries this staging's commit
    marker ({ kind: 'veto_staging', revisionId } in its provenance sources,
    written in the same transaction as the item update). Commits made before the
    marker existed read as not applied.

Migrations

  • 0026_site_skills: two new tables for Site Skills and their version trail; no backfill.
  • 0027_email_identity_policy: email identity mode (instance) and per-site strict mode; existing instances are backfilled to exact (no behaviour change).
  • 0028_import_jobs: lumibase_import_jobs; no backfill.
  • 0029_activation_milestones: activation milestones and the telemetry state singleton; no backfill.
  • 0030_agent_tool_secrets: per-site secrets for external-action tools; no backfill.
  • 0031_ops_errors: lumibase_ops_errors for captured 5xx errors; no backfill.
  • 0032_user_passkeys: WebAuthn passkeys; no backfill.
  • 0033_social_login_identities: social login providers and the user_identities link table, with a one-time backfill of existing users.external_id.
  • 0034_item_tree: optional parent_id and materialised path on items for hierarchical collections; existing rows stay roots.
  • All are additive and re-runnable. packages/database/migrations/rls-policies.sql changed in this release: re-apply it after migrating.

Upgrade notes

  • Back up PostgreSQL, then apply migrations 0026–0034 before starting the new CMS, and re-apply packages/database/migrations/rls-policies.sql (pnpm db:migrate does not apply it). Neither the release nor the deploy workflows run migrations.
  • Optional: set LUMIBASE_OPS_TOKEN (at least 32 characters) to enable the ops diagnostics plane; unset, its routes answer 404.
  • MCP OAuth (#346): an external-issuer token sent to /api/v1/mcp must now carry the MCP resource URI in aud. A token minted for another API is refused (401), even from a trusted issuer. To keep using an issuer on MCP, add the resource URI (https://<host>/api/v1/mcp or …/api/v1/mcp/sites/<siteId>) to its audience and have the IdP issue tokens for it. Behind a TLS-terminating proxy, set LUMIBASE_PUBLIC_URL so the URI LumiBase computes matches the token's aud. API keys and LumiBase session tokens on MCP are unaffected.
  • External issuers (#809): a tfaVerified claim from an IdP no longer satisfies the Studio 2FA gate (nor do dev / isBootstrap claims have any effect). Assert MFA with the OIDC amr (mfa, otp, totp, webauthn) or acr claims, or with mfa.
  • One-click templates (#741): an explicitly set CORS_ALLOWED_ORIGINS that names a host is never changed; one with no host at all (https://) is ignored with a log line. A Docker deployment that sets none and runs where RENDER_EXTERNAL_URL, RAILWAY_PUBLIC_DOMAIN or FLY_APP_NAME is present now starts with that origin instead of failing production validation.
  • Docker image (#734): the container runs as the fixed UID/GID 65532 instead of the lumibase system user (whose UID adduser --system assigned at build time; it was already non-root), and its filesystem is read-only under the production compose files. Make *_FILE secret files readable by UID 65532 — Compose file: secrets keep the host file's owner and mode, so a 0600 file must be re-moded or re-owned on the host; remove scratch bind mounts or volumes under /app (nothing in LumiBase writes there — use a tmpfs if your own tooling needs one); replace custom entrypoints or commands that call /entrypoint.sh, bash or sh (there is no shell — use --entrypoint /nodejs/bin/node with dist/migrate.cjs preflight|apply for one-off migration commands); replace in-container curl health probes with an HTTP probe on /health or /nodejs/bin/node /app/bin/healthcheck.mjs. docker exec … sh no longer works; use docker debug or an ephemeral debug container. Environment variables, migrations and ports are unchanged. See Docker deployment → Hardened image.
  • Migration 0026_site_skills adds two tables and changes nothing existing; no backfill. Re-apply packages/database/migrations/rls-policies.sql after migrating, as after every upgrade. Sites start with no skills, so agent behaviour is unchanged until an admin activates one.