Repository navigation
LumiBase v2.1.0
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-lumibasetemplates andlumibase 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):
geopointfields 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 byLUMIBASE_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
askUserclarification 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/sortthat names a field the caller cannot read is refused with403 FIELD_FORBIDDENbefore any query runs, so hidden fields can no longer be probed through_eq/_starts_with/_null,_ornesting, JSON paths, sort order or counts (REST, GraphQL, export, MCP).%,_and\in_contains/_starts_with/_ends_withvalues are matched literally (item filters, permission rules, SCIM). o2m expansion no longer groups by a hidden foreign key and m2m expansion requiresreadon the junction. Search drops hits whose_titlecomes from a hidden field and reports only visibletotalHitsto 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/completerequests yield exactly one admin, and requests that were in flight when another setup committed now get409 SETUP_ALREADY_COMPLETEDinstead of404(later requests still get404).POST /api/v1/auth/verify-emailandPOST /api/v1/auth/reset-passwordare single-winner under concurrency (conditionalUPDATE/ compare-and-swap ontoken_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 existingUPLOAD_UNSAFE_SVGcheck 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) get400 UPLOAD_UNSAFE_FILENAME, including atPOST /files/presigned-url.GET /media/:keyserves only PNG/JPEG/GIF/WebP/AVIF/MP4/WebMinlineand everything else as an attachment, always withnosniffand asandboxCSP. 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.
withAuthpreviously copied the verified payload ontoauth.rawas-is, so a trusted issuer'sdev,isBootstraportfaVerifiedclaim reached the dev-admin bypass, bootstrap provenance and Studio 2FA guards. Those markers (andanonymous,apiKey,mcpOAuth) are now dropped; issuer claims such asamr/acrare 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/GID65532, keeps application files root-owned, and starts with a read-only root filesystem. The shell entrypoint is replaced bydocker/scripts/entrypoint.mjsand theHEALTHCHECKbydocker/scripts/healthcheck.mjs, which now probes the worker health port forLUMIBASE_PROCESS_ROLE=workerinstead of always1989.docker/docker-compose.prod.ymlanddocker/docker-compose.gcp.ymlsetread_only: true, a/tmptmpfs,cap_drop: [ALL],no-new-privilegesandinit: true(#734). -
Release supply chain:
release.ymlbuilds the image and fails on any CRITICAL Trivy finding in the image or inpnpm-lock.yamlin 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.ymlbuilds once, locally, runs the same Trivy gate and a read-only, capability-free container health check on every PR and onmain, and pushes that same image frommainonly after both pass. Trivy, Syft and cosign are installed byscripts/install-image-tools.sh, pinned by version and SHA-256 (#734).
Added
- Field value options (#751):
allowClear: falseonselect-radio/select-dropdownfields stops a set value from being cleared (Studio hides the clear control, the API rejectsnull/"");minLength/maxLengthonstring/textfields are enforced by the API, counted in Unicode code points;options.slugsets a slug charset policy (asciiwith Vietnamese transliteration,unicode, orcustomwith 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: trueon adatetime/timestampfield stores{ instant, tz, offset }(IANA zone, validated withIntl). Writes accept{ instant, tz },{ local, tz }or an ISO string; DST gaps and overlaps follow Temporal'sdisambiguation(compatibleby default,rejectavailable). Filters and sort compare the instant; GraphQL exposesZonedDateTime, 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,containswithand/or/not; noeval). Stored atcollection.meta.formLayout(no migration), edited in Data model → Form layout or viaGET/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 whenskipRequiredWhenHidden: true, andhiddenValue: keep|clear(defaultkeep) decides what saving does to its stale value. Collections without a layout render as before. See Form layout. - Dynamic zones: a
blocksfield type holding an ordered list of{ id, type, data }blocks, where eachtypeis a block template (a collection of the same site) listed inoptions.allowedBlocks(min/maxoptional). Every block is validated against its template with the collection field validator, recursively for nested zones (max depth 5), with path-precise errors;nullis stored as[]. GraphQL exposes each zone as a list of a union of<Template>Blocktypes, typegen emits a discriminated union ontype, the SDK exportsLumibaseBlock, and Studio gets a block editor (add, remove, drag/keyboard reorder, collapse). See Dynamic zones (#748). geopointfield 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 isST_DWithinon 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 asGeoPointin 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_URLor a field'smapStyleUrloption. The CMSPermissions-Policynow allowsgeolocation=(self). - Hierarchical collections (#749): a collection with
meta.tree = { enabled, maxDepth?, onDelete? }stores items as a tree (parentId+ materialisedpath, maintained server-side). Create under a parent withparentId, read with?tree=children|subtree|ancestors, and move a subtree withPOST /api/v1/items/:collection/:id/move(cycles and depth overflow are409; concurrent moves are serialised per collection). Deleting a parent followsonDelete:restrict(default),cascadeorreparent. Row rules apply to every tree query. Studio shows such collections as a tree with reorder / indent / outdent / add-child. Migration0034_item_treeadds two nullable columns and two indexes tolumibase_items; no backfill, existing items read as roots.parent_idhas no foreign key: every tree lookup is bysite_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+updatebut nocreate/deleteon 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 whendeleteis not granted. - Coordinated vulnerability disclosure programme (#737, epic #674):
SECURITY.mdnow lists the real supported lines (2.0.x;1.0.xsecurity 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 aSecuritysection and label category. - Secure-by-default
create-lumibasetemplates andlumibase doctor --security(#731, epic #674). No template ships a secret or a default admin any more: the committed.env.example/.dev.vars.exampleleaves secrets empty and the scaffolder writes a gitignored0600.env/.dev.varswith freshJWT_SECRET,ENCRYPTION_KEYand (Next.js) first-admin password. The Next.js compose file reads its secrets as${VAR:?…}instead ofdev_secret_key; the Docker and Cloudflare starters add CSP headers, an exact-origin CORS allowlist and a fail-closedJWT_SECRETcheck, andwrangler.tomlno longer carries secrets in[vars].lumibase doctor --security [--production] [--json] [--env-file]audits.env,wrangler.tomland 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. Seedocs/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), soPassword1234!is now refused; existing passwords keep working.GET /api/v1/auth/password-policyserves the public rule set;GET/PUT /api/v1/admin/password-policyreads 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-historyreturns 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=accountadds the other sites the user belongs to.GET /api/v1/me/security-history/export?format=csv|jsondownloads 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 asnew_device_login. Devices are the anomaly detector's fingerprints inlogin_baselines, now learned even when the device check is off. TOTP sign-ins are now audited aslogin_success, andrefresh_token_reuse_detectedrecords 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 (
amrwebauthn,tfaVerified), soenforceTfapolicies are satisfied, and both carrysidlike any other login./auth/loginnow lists the accepted second factors inmethodsonmfa_required. Challenges are single-use with a 5-minute TTL; a signature-counter regression is rejected and audited aspasskey_counter_regression. Recovery codes are shared with TOTP, and a passkey-only user gets them with the first passkey. RP ID / origins come fromWEBAUTHN_ORIGINS/WEBAUTHN_RP_IDor, unset, from an already-trusted Studio origin. A Studio user underenforceTfawith 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 tablelumibase_user_passkeys(migration0032). 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.p8key encrypted underENCRYPTION_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; Appleform_postwith a per-exchange ES256 client secret). The frontend redeems a one-time code with its own PKCE verifier atPOST /api/v1/auth/social/exchangeand 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. Migration0033addslumibase_user_identities(the #794 link table, backfilled fromusers.external_id) andlumibase_social_auth_providers. Audited associal_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/sessionsrows now carry a stablesessionId,startedAt,lastSeenAtandcurrent;DELETE /api/v1/me/sessions/:idaccepts thesessionId;DELETE /api/v1/me/sessions?scope=otherssigns 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 assession_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,productionby default, settings keydeployment.environments) and grantsdeploy:trigger:<env|target|*>/deploy:approve:<env|*>through permission rows onlumibase_deploy:<scope>. Triggering or promoting into an environment withrequiresApproval(production by default) parks a pending approval inlumibase_ai_approvalsthat another signed-in person holdingdeploy:approve:<env>must accept; the requester cannot approve their own request.POST /environments/staging/promoteships 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 thelumibaseclient at build time and deploysdist/to Cloudflare Pages withnpm 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-cloudflarewith server-side loads and draft preview behind an HMAC-signed, HttpOnly cookie (off unlessLUMIBASE_PREVIEW_SECRETandLUMIBASE_PREVIEW_TOKENare set). Both starters ship typed content, an.env.examplewith every secret empty, and a marked hook point for visual editing, which is not released yet.create-lumibase --helplists the templates. The CI scaffold smoke now also builds both starters and, onmainwith Cloudflare secrets configured, deploys the Astro build to Pages (#744).- Live OpenAPI 3.1 document per site:
GET /api/v1/openapi.jsonis 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; thepublicrealm 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) withPUT /api/v1/openapi/configor in Studio → Settings → Developer → Types (setting keyopenapi, no migration). Documents are cached per schema version and permission fingerprint, and a schema change invalidates them. Field types map the same waylumibase typegenmaps 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 inmigrate.cjs applyso concurrent web pods apply once, with the worker held by a read-onlymigrate.cjs waitgate until the schema is current, probes on/healthand/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 andhelm test.JWT_SECRETandENCRYPTION_KEYare generated once and kept across upgrades, or read fromsecrets.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 tooci://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-attributedUsageEvents 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,emitandflushrun after the response (waitUntilon Workers).pnpm -F @lumibase/cms bench:usage-seammeasures the request-path cost. Seedocs/en/architecture/platform-extension-points.md. - Ops diagnostics plane: a read-only operator surface under
/api/v1/ops/*, gated by a new static secretLUMIBASE_OPS_TOKEN(at least 32 characters; unset → 404 everywhere).diagnosticsreports 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/proberunsGET /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_errorsbyrequestId, with the sanitized error chain including the Postgres SQLSTATE that Drizzle wraps (query params, Postgresdetailand tokens are dropped). It is readable atGET /api/v1/ops/errors[/:requestId], kept for 14 days, and written best-effort on the system connection. Migration0031_ops_errors; re-applyrls-policies.sql, which forces RLS on the table with no policy. - MCP:
ops_diagnostics,ops_list_errors,ops_get_errorandops_probe_sitewhen the server's environment hasLUMIBASE_OPS_TOKEN; with noLUMIBASE_TOKENthe 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 MCPtools/calland the Agent API. Each proposal, approval, rejection, refusal and execution writes anagent.external_action.*activity row. LumiBase registers no such tool itself;createHttpEchoToolis a reference for tests. See External-action tools. - Approvals for external-action tools are stored with
approvalPolicy: human_requiredand are released only by a signed-in user. An API key, an OAuth connector token and the agent reviewer are refused withHUMAN_APPROVAL_REQUIRED. GET/PUT/DELETE /api/v1/agent/tool-secrets[/:name]: per-site secrets for external-action tools, encrypted with the runtimeKeyProviderand 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 (migration0030, 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 answered429 LIMIT_EXCEEDEDon REST, GraphQL and MCP alike. The stock entry points register nothing, so existing behaviour is unchanged. Seedocs/en/architecture/platform-extension-points.md. @lumibase/cmsnow exports its entry points (/app,/cloudflare,/node,/platform) so a deployment can wrap them.@lumibase/cms/nodeprovidesstartNodeServer(), which starts nothing on import; runningserve.tsdirectly is unchanged.- Cached site → organization lookup (
siteOrganizationId) through the runtime cache, invalidated when a site is created, transferred or deleted. pnpm imports:check(part ofpnpm check:all): every@lumibase/*import and dependency underapps/andpackages/must resolve to a package in this workspace.- Activation milestones: each site records the first time it reaches
site_created,item_published,delivery_requestandagent_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 (migration0029). - Opt-in anonymous usage telemetry for self-hosted installs. Off by default, no built-in endpoint: it sends only when
LUMIBASE_TELEMETRY_ENABLED=trueandLUMIBASE_TELEMETRY_ENDPOINTare both set, andLUMIBASE_TELEMETRY_DISABLED=trueorDO_NOT_TRACK=1turns 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 asprompts/list/prompts/get. Every content change is an immutable version with author, source and sha256 hash, and each run records theslug@versionit 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/skillsAPI: CRUD, activate/archive, version trail and restore, Markdown import/export, and/matchto preview what a run would receive. Reading and writing skills both need a control-plane admin — over MCP too, whereprompts/*are empty for any other caller; non-admin skill authors are not supported yet, andriskClassis a review label, not a permission tier. Each write (skill, version, audit entry) is one transaction.PATCHtakesexpectedVersionand status actions takeversion(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 setsupdateActive. 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 | installin the CLI, for keeping skills in git and deploying them from CI (push --checkfails when the site differs from the directory).pushis the deploy path and updates active skills;installnever 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
inputSchemaas JSON Schema (meta-schema and strict compilation in draft-07 and 2020-12) and fails when thetools/listoutput 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, plusdiff_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 inapps/cmsand 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_idwhenkindis"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 fieldtypevocabulary (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 anoevictionKey Value instance and generatesJWT_SECRET/ENCRYPTION_KEY; a Fly.iofly.toml(one machine always on,SIGTERMshutdown, secrets set with onefly secrets set); and a Railwayrailway.jsonplusdocker/railway-template-variables.json, the variable set for the Railway template. Every template gates setup withLUMIBASE_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_ORIGINSto the deployment's own origin when it is unset — from the newLUMIBASE_PUBLIC_URL, or the platform'sRENDER_EXTERNAL_URL,RAILWAY_PUBLIC_DOMAINorFLY_APP_NAME— and treats a value with no host (such ashttps://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 orENCRYPTION_KEYis one the server would reject, naming it.ENCRYPTION_KEYis 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-runstill needs onlyDATABASE_URL(#741). - Typed JSON filters (Cast_Rule):
_eq/_neq/_in/_nin/_gt/_gte/_lt/_ltecompare numeric, boolean and date fields by type instead of as text, sofilter={"price":{"_gt":9}}matches10. 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 returns400 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) returnsCREATE INDEX CONCURRENTLYDDL whose expression matches the typed filter, partial on the collection (#729).- Collection export:
GET /api/v1/items/:collection/exportstreams 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 asitems_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 streamingResponse;client.rawFetch(path, init)is the streaming counterpart ofrawRequest. - Extensions:
items.export.beforehook to transform or drop fields from each exported row. - Background imports:
POST /api/v1/importstakes a CSV or JSON export file, answers202and writes the rows in chunks under the uploader's permissions, re-checked every chunk. Progress atGET /api/v1/imports/:id, cancel atPOST …/cancel, row-level error report atGET …/errors(?format=csv).createorupsert(byid). 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_jobsaddslumibase_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/approvalsno longer listsaskUserquestions, and
POST /api/v1/agent/approvals/:id/decide//reopenrefuse a question id with
409 NOT_AN_APPROVAL. -
The
agent-runsqueue 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 onlyapprovaland
question: queued runs still send no run succeeded/failed pushes. On Workers the send
is kept alive with the queue consumer'swaitUntil(thequeue()dispatcher now
forwards itsExecutionContext); 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. SetLUMIBASE_PUBLIC_URLbehind a TLS-terminating proxy so the resource URI matches.
Fixed
-
SDK:
rawRequestno longer forcescontent-type: application/jsonon aFormDatabody, which broke multipart uploads. -
Typed JSON timestamp filters (#729) accept the end-of-day time
24:00(also24: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:01and24:00:00.5stay rejected, as they are in PostgreSQL. -
Agent harness:
askUserclarification 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 newwaiting_userstatus (no queue worker, no lock held), the question reaches the
Mission Control inbox and aquestionnotification, and an answer resumes the run: the
askUsertool call completes with the answer (wrapped as untrusted data for the model)
and the run settlessucceeded. Stored asagent_approvalsrows with
kind = 'question'— no migration. New endpointsGET /api/v1/agent/questions,
GET /api/v1/agent/questions/:idandPOST /api/v1/agent/questions/:id/answer
(signed-in users only — any API key, site- or organization-scoped, gets403; a holder
ofapprovals:decide, or the requesting user once backlog B207 opens the route beyond
site administrators; tenant-scoped,
audited asagent_question.*, a second answer is409; the requester's rights are
re-resolved before resuming). New read skillgetUserAnswerreturns 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-sweepon 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. MCPtools/callreturns
status: "waiting_user"withquestionId. Metrics
lumibase_agent_questions_total{status}andlumibase_agent_question_wait_seconds; the
trust ledger shows question counts in promotion evidence. -
POST /api/v1/deployments/webhook/:provider/:siteIdcarries the tenant in the URL path so Vercel and Netlify outgoing deployment webhooks (which cannot send customX-Lumi-Siteheaders) work on the shared API host (api.lumibase.dev) without a per-site host mapping.POST /api/v1/deployments/webhook/:providerremains supported viawithTenant(#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 endpointPOST /api/v1/mcp/sites/<siteId>; scopesmcp:read/mcp:write/mcp:delete/mcp:adminthat only narrow the RBAC capability set, with403 INSUFFICIENT_SCOPEstep-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 carriestitleandannotations(readOnlyHint,destructiveHint) derived from the registry — client hints only (#346, consolidated from #805). -
@lumibase/mcp-servertools no longer drop or misdescribe keys that the server accepts. Collection and field tools acceptnullwhere REST clears a column, such asnote,sortFieldorlength.upsert_fieldno longer sends Zod defaults with every update; those defaults resetrequired,hidden,encrypted,widthand other columns. New stdio fields therefore use database defaults, as REST does, sosearchabledefaults totrue.upsert_fieldalso forwardsclassification,validation,rawEnabledandmigrationPlaninstead of dropping them. As on REST, anymigrationPlanobject, even{}, now passes the risky-change guard likeconfirmRiskyChange: true, and the plan itself is not executed (B213). Translation keys, CDC targets and intentrulesandscheduleadvertise the constraints that the governed contract enforces (#716). -
apply_schemaanddiff_schematake theirfields[]entries from theupsert_fieldschema. They previously stripped 12 keys that REST accepts, soencrypted: true, classification: "pii"created a plaintext, unclassified field. Both tools now also advertise the collection metadata and therelations[]list that the schema endpoint applies.fieldsandrelations, when given, are complete lists, and entries missing from them are deleted.create_collectionandupdate_collectionaddsystem,itemDuplicationFields,translationsandmeta.primaryKeyFieldcarries the REST name pattern (#716). -
POST /collections/diff(and sodiff_schema) reports a fieldclassificationchange, ratedmediumlikeencrypted. A preview that downgradedpiitononepreviously listed the field as unchanged. The requests the stdioapply_schema,diff_schema,create_cdc_subscriptionandupdate_cdc_subscriptiontools send are now pinned in a golden and replayed against the real routes over PostgreSQL (#716). -
update_cdc_subscriptionadvertises exactly whatPATCH /cdc/subscriptions/:idaccepts.status(activeorpaused) is new, which is the only way to pause or resume a subscription.kind,webhook_idandextension_nameare removed, because the PATCH ignored them. CDCcollectionsentries must be non-empty, andcdc_subscription_replayrequires an ISOoccurred_afterand a non-emptycursor(#716). -
publish_extensionmatches the route:publisheris a string, andsignature,publisherKeyIdand a hexbundleSha256are required. Every call that the previous shape described was refused.create_releaseandupdate_releaseforwardmaintenanceWindow. Flow nodes acceptbranchesoncreate_flowandupdate_flow. The canonicalcreateFlowcontract, used by HTTP MCP and governed stdio, previously strippedbranchesfrom a branching node (#716). -
The
upsert_fielddescription lists the canonicalFieldTypespellings (datetime, notdateTime; nofloat) (#716). -
Organization MCP
tools/listomits the$schema2020-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 nocontent-indexingorrevalidation-dispatch
queue, so every item write loggedQueue binding not foundand 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.tomlprofile, and the Worker'squeue()runs the same handlers as
Docker. Deploy and release workflows create the missing queues; manual
deployments create them as inDEPLOYMENT-CHECKLIST.md. Until a queue is
bound,ItemServiceindexes 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 onnode-cronwith 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 stayedbuildingand 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
newencryption-envelope-migrationqueue, 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 returns409 ALREADY_DECIDEDinstead of overwriting it. -
Reopening a veto whose patch is already live is refused. A veto commit
that dies after applying its patch is quarantinedfailedby the claim sweep;
POST /agent/approvals/:id/reopenused to put it back topending, and the
next sweep applied the same staging again. It now answers409 VETO_ALREADY_APPLIEDwhen a live revision carries this staging's commit
marker ({ kind: 'veto_staging', revisionId }in its provenancesources,
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 toexact(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_errorsfor captured 5xx errors; no backfill.0032_user_passkeys: WebAuthn passkeys; no backfill.0033_social_login_identities: social login providers and theuser_identitieslink table, with a one-time backfill of existingusers.external_id.0034_item_tree: optionalparent_idand materialisedpathon items for hierarchical collections; existing rows stay roots.- All are additive and re-runnable.
packages/database/migrations/rls-policies.sqlchanged in this release: re-apply it after migrating.
Upgrade notes
- Back up PostgreSQL, then apply migrations
0026–0034before starting the new CMS, and re-applypackages/database/migrations/rls-policies.sql(pnpm db:migratedoes 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/mcpmust now carry the MCP resource URI inaud. 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/mcpor…/api/v1/mcp/sites/<siteId>) to itsaudienceand have the IdP issue tokens for it. Behind a TLS-terminating proxy, setLUMIBASE_PUBLIC_URLso the URI LumiBase computes matches the token'saud. API keys and LumiBase session tokens on MCP are unaffected. - External issuers (#809): a
tfaVerifiedclaim from an IdP no longer satisfies the Studio 2FA gate (nor dodev/isBootstrapclaims have any effect). Assert MFA with the OIDCamr(mfa,otp,totp,webauthn) oracrclaims, or withmfa. - One-click templates (#741): an explicitly set
CORS_ALLOWED_ORIGINSthat 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 whereRENDER_EXTERNAL_URL,RAILWAY_PUBLIC_DOMAINorFLY_APP_NAMEis present now starts with that origin instead of failing production validation. - Docker image (#734): the container runs as the fixed UID/GID
65532instead of thelumibasesystem user (whose UIDadduser --systemassigned at build time; it was already non-root), and its filesystem is read-only under the production compose files. Make*_FILEsecret files readable by UID65532— Composefile:secrets keep the host file's owner and mode, so a0600file must be re-moded or re-owned on the host; remove scratch bind mounts or volumes under/app(nothing in LumiBase writes there — use atmpfsif your own tooling needs one); replace custom entrypoints or commands that call/entrypoint.sh,bashorsh(there is no shell — use--entrypoint /nodejs/bin/nodewithdist/migrate.cjs preflight|applyfor one-off migration commands); replace in-containercurlhealth probes with an HTTP probe on/healthor/nodejs/bin/node /app/bin/healthcheck.mjs.docker exec … shno longer works; usedocker debugor an ephemeral debug container. Environment variables, migrations and ports are unchanged. See Docker deployment → Hardened image. - Migration
0026_site_skillsadds two tables and changes nothing existing; no backfill. Re-applypackages/database/migrations/rls-policies.sqlafter migrating, as after every upgrade. Sites start with no skills, so agent behaviour is unchanged until an admin activates one.