135 Commits
Author SHA1 Message Date
Radosław SmolińskiandClaude Fable 5.2 3eee841dd0 ipal-doctor: the raw 2FA view warning only for a view component
R3-1: the warning fired on any mention of the 2FA package's setup / verify view
in the config, so it stayed after the fix its own text suggests (SafeTotpView
with the path as ipalTotpView, plus the path in admin.dependencies). It now
warns only when the path is a view's Component.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 17:49:06 +01:00
Radosław SmolińskiandClaude Fable 5.2 b2c1dca5da 2FA back link: the stale import-map notice never replaces the screen
R2-1: the notice was rendered instead of the 2FA screen, and its flag is a text
search of the importMap.js on disk — not the map in the build. A false alarm
(map generated in the build with the repository's file in the running image, a
re-exporting map) hid a working code form and locked everyone out. The notice
is now rendered above the screen, the log line says "may be", and the flag goes
to ipal-kit's own provider only.

R2-2: views are compared against copies, so a factory that reuses its view
objects is guarded too; copyViews, changedViewKeys, SAFE_TOTP_VIEW,
totpViewImportKey, findImportMapFile and missingImportMapEntries are exported;
ipal-doctor warns when the config registers the 2FA package's own view; docs
wording and a misplaced comment fixed.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 16:35:16 +01:00
Radosław SmolińskiandClaude Fable 5.2 ad51456eaa 2FA back link: review fixes — views guarded by object, client views, a loud stale import map
SB-1: the 2FA package replaces a view that already stands under its keys, so a
key that existed before the factory ran was wrongly treated as the project's own
and left unguarded (also with a double registration, or ipalKit over its own
output). Views are now compared by object, right after the factory.

SB-2: SafeTotpView renders through Payload's RenderServerComponent: a client
component set as a 2FA view gets only client props plus the checked back.

SB-3: a production build with the previous import map shows an empty 2FA screen.
twoFactor.importMapCheck (on, production only) reads the committed map at start:
an error in the log and a message on the 2FA screens. Docs name the real symptom.

SB-4: enabled: false restores admin.dependencies; wrapTotpViews keeps exportName.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 16:16:39 +01:00
Radosław SmolińskiandClaude Fable 5.2 93e75426ab 2FA screens: the back link is checked on the server (twoFactor.safeBack)
@clocklimited/payload-2fa sends the browser to the `back` query value after a
valid code without checking it (GHSA-rffw-fq79-g3ch upstream, not fixed in the
fork): a prepared link ran script in the panel or left the site.

SafeTotpView now stands in front of the package's setup and verify views and
passes on a checked value: a path on the site's origin inside the admin route,
else the admin root. The package's views stay in the import map through
admin.dependencies, so ipal-kit still never imports the package.

twoFactor.safeBack: false turns it off, a function replaces the rule;
safeAdminBack, wrapTotpViews and SafeTotpView are exported. Projects with 2FA
must regenerate the admin import map.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 15:29:06 +01:00
Radosław SmolińskiandClaude Fable 5.2 dc5326ea1c Review round 3: job-queue rules keep Payload's own defaults; a failed 2FA lookup fails closed
Job queue (R3-1): only a rule that exists is wrapped. At config time that
is what the project wrote; Payload fills in the rest when it builds the
config (3.94.1: run, queue and cancel are all defaultAccess, a logged-in
user) and the sweep of the running config wraps those. No default is
invented, so a request without a user gets what Payload itself answers.

hasTotp false while the account's record carries a TOTP secret (the 2FA
package's own lookup failed, R3-4): the account owes its code, not
'not set up yet'.

Docs: the two-configs-in-one-process case for calls without a source, and
that a half-logged-in editor's browser is refused media files.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 02:22:04 +01:00
Radosław SmolińskiandClaude Fable 5.2 c56f0d41b8 Security review round 2: no exception by name, staff list fails closed, verify limit
R2-1: the sweep skipped every collection whose slug starts with payload-,
so a plugin's payload-... collection added after ipalKit was never guarded.
There is no exception by name or prefix now: every collection and global
is guarded, Payload's own included, and the job queue's run / queue /
cancel rules too.

R2-2: role predicates called without a source fail closed where the staff
collections are not known (browser bundle, middleware, edge): nobody is
staff. They accept req.payload, a config (also the client config) or
{ staffCollections } as the source.

R2-3: the staff list is filed per config / Payload instance; a call without
a source gets only what every config in the process calls staff.

R2-4: payload.config is watched on the instance, so a config swapped in by
a dev reload is guarded before any request or Local API call.

R2-5: verify attempts are limited per account (default 5 in 10 minutes,
twoFactor.verifyLimit), counted in memory, never skipped.

R2-6: a user object without collection owes the second factor; endpoints
the 2FA package may add on collections or globals are guarded too; a
warning names staff collections that 2FA does not cover; docs state what
is not covered, fix the one-argument examples and the doctor example.

HTTP tests for each on payload-2fa beta.7, run on SQLite, Postgres and
MongoDB (test adapter added).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 01:46:25 +01:00
Radosław SmolińskiandClaude Fable 5.2 32faaa5e30 Security review fixes: staff collection first everywhere, 2FA package endpoints guarded, per-entity opt-out, hot reload
F1: roles count only for accounts of a staff collection, in every exported
predicate and access builder (isAdmin, isEditor, hasMinimumRole, adminOnly,
adminOrEditor, requireRole, adminOrSelf, adminOrSelfIn, the Field variants,
the roles field) and first in userMeetsRole. An account of another auth
collection with its own roles: ['admin'] gets nothing. Staff collections:
admin.user, access.authCollection, access.staffCollections. Predicates take
req.payload as an optional last argument and otherwise use the staff
collections of the config ipalKit built in this process.

F2: every endpoint @clocklimited/payload-2fa registers answers accounts of
the 2FA collection only (setup-totp wrote the secret into the 2FA collection
under the caller's id, whatever collection the caller came from); remove and
the admin reset/remove endpoints also need the second factor.

F3: per-entity opt-out honoured, operation by operation: the package's
custom.totp.disableAccessWrapper and ipal-kit's custom.ipal.secondFactor
(passed on to the package); the package's global disableAccessWrapper too.

F4: a no-user auth strategy on the 2FA collection guards the live config at
the start of each request, so entities from plugins listed after ipalKit
stay guarded after a dev hot reload and with disableOnInit.

Tests through HTTP for all four; the 2FA tests now run on payload-2fa
3.0.0-beta.7 (what client sites use), a second file on beta.1 (alias), and
the HTTP files can run against Postgres (IPAL_TEST_POSTGRES_URI). Docs,
agent guide, skills and changelog updated; the not-yet-enrolled limitation
is stated plainly.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 01:02:34 +01:00
Radosław SmolińskiandClaude Fable 5.2 0c61ac231b Security: staff checks only for staff collections; 2FA covers what the plugin adds
Staff check (userMeetsRole): the 'no roles field = every account passes'
rule applied to the account's own collection, so an account of a second
auth collection (customers) passed every staff check. It now applies only
to staff collections: the panel's login collection plus the new
access.staffCollections. The injected auth collection uses the new
adminOrSelfIn(slug), so an account of another collection with the same
numeric id is not 'self'.

2FA: @clocklimited/payload-2fa wraps the collections and globals present
when it runs; ipalKit's own globals and collections were added later and
stayed unwrapped, so a password without the TOTP code opened them over
REST and GraphQL. ipal-kit now has its own second-factor check
(secondFactorPassed / requireSecondFactor): applied to every collection
and global at the end of ipalKit, again in onInit for entities added by
plugins listed after it, and inside userMeetsRole and the endpoints that
take a project access function. It fails closed: an unrecognised user
shape is refused, and startup stops when the injected 2FA plugin lacks
the parts the check reads (twoFactor.guard: false opts out).

Tests through real HTTP requests (REST and GraphQL) against Payload's
route handlers, plus the reference smoke test. Docs, agent guide, skills
and the reference skills copy updated; changelog entry without a version.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 00:31:55 +01:00
Radosław SmolińskiandClaude Opus 5.5 b5df59691c ipal-kit create: a bare --external installs every external skill
Matches the help text and docs/project-starter.md; a list stays as given,
no flag leaves it to the answers. resolveExternal() + test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 00:01:19 +01:00
Radosław SmolińskiandClaude Opus 5.5 5cd0224ebd ipal-doctor: never write first-seen dates when CI is set
The CLI ignored CI (writeSeen was only !sites && !json); docs and comments
already said "not in CI". shouldWriteSeen() + test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 00:01:18 +01:00
Radosław SmolińskiandClaude Opus 5.5 36f8f69f82 ipalEnvRules: PAYLOAD_SECRET at least 32 characters in production
New option secretMinLength (default 32, 0 turns it off); checked only with
NODE_ENV=production. Docs: env table, deployment (what changing the secret
does, checked in Payload 3.94.1 and payload-2fa), AGENT.md, ipal-reference,
ipal-setup. Tests: short secret fails in production, passes in dev, 0 and a
custom minimum.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 00:01:18 +01:00
Radosław SmolińskiandClaude Opus 5.5 ab51027617 Payload 3.94.1, dependency updates, overrides re-checked
- payload and every @payloadcms/* 3.94.1 in the plugin's dev dependencies, the
  reference site and the starter (peer range unchanged: ^3.90.2); react/react-dom
  19.3.1; reference engines node >=22.23.5 <23 (Payload 3.94's minimum).
- Overrides re-checked: dompurify and happy-dom still needed; mongoose (3.90–3.93)
  and undici (3.90–3.91) only on an older Payload; graphql-scalars no longer needed
  (GHSA-x8rm-f576-gq67 covers 1.24.1–2.0.0; Payload pins 1.22.2). Reference keeps
  dompurify + happy-dom; plugin root drops graphql-scalars.
- ipal-doctor transitive-min: the mongoose fix names the Payload upgrade first.
- nodemailer 10.6.1; dev: playwright 1.65.1, vitest 5.1.1, prettier 3.10.1,
  @swc/cli 0.8, rimraf 6 (clean uses --glob), cross-env 10, open 11,
  sort-package-json 4, @swc-node/register 1.12.1, vite-tsconfig-paths 6.1.1;
  reference tailwind 4.3.5, postcss 8.5.33.
- Kept back: typescript 7, eslint 10, graphql 17, @types/node 26, lucide-react 1.x.
- AGENT.md §4 item 12, ipal-setup, ipal-upgrade, README, PROGRAMISTA §1, forms.md,
  doctor.md; reference skills copy; CHANGELOG Unreleased.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-23 15:18:58 +01:00
Radosław SmolińskiandClaude Fable 5.2 de8362820f Overrides for Payload's mongoose and happy-dom advisories; doctor rule transitive-min
@payloadcms/db-mongodb pins mongoose 8.24.1 (one critical, two high, two moderate
advisories, fixed by 8.24.7) and @lexical/headless 0.50 brings happy-dom 20.x (two
high, fixed by 21.0.4). Payload 3.93.0 fixes neither.

- reference/package.json (and so the starter): pnpm.overrides for mongoose
  (~8.24.10) and happy-dom (^21.0.4); pnpm audit --prod on the reference is clean
- root package.json: the happy-dom override for the plugin's own dev tree
- ipal-doctor: transitive-min reports mongoose 8.x < 8.24.7 (error) and
  happy-dom < 21.0.4 (warning) from the lockfile and prints the override line;
  DoctorContext.installedAll(name)
- AGENT.md §4 item 12, ipal-setup, ipal-upgrade, doctor.md, README, CHANGELOG

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-17 00:01:58 +01:00
Radosław SmolińskiandClaude Opus 5.5 9b03c94979 Next.js 16.4.6; minimum safe version 16.4.5 (GHSA-mfr8-8qww-v76h)
Next.js 16.3.0–16.4.4 is affected by GHSA-mfr8-8qww-v76h (CVE-2026-119790, moderate:
information disclosure across root params when a 'use cache' function is called
through unstable_cache()), first patched in 16.4.5.

- next and eslint-config-next 16.4.6 in the plugin's dev dependencies and the
  reference site (the starter is generated from it); lockfiles refreshed.
- ipal-doctor next-min: error below 16.4.5, naming the advisory; fix
  `pnpm add [email protected] [email protected]`; still silenceable. Tests.
- AGENT.md §4 item 11, ipal-setup, ipal-upgrade, doctor.md: minimum 16.4.5;
  reference skills copy refreshed. CHANGELOG Unreleased.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-16 23:45:17 +01:00
Radosław SmolińskiandClaude Fable 5.2 6f006825a4 Form files: an upload aborted while the gates are pending no longer leaves its attempt key registered
Re-review of 1.16.0: beforeFiles could resume after the request was answered and
register the attempt key with nobody left to release it. It now stops after every
await once the request is over; the registration has no await before it.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-13 17:09:14 +01:00
Radosław SmolińskiandClaude Fable 5.2 e24c918d4b Form files: a dropped, stalled or endless upload is aborted and frees its slot, attempt key and buffers
Security review of 1.16.0 (blocking): a request body that errored mid-file never
resolved, leaking the concurrency slot and the attempt key. Also: idle and request
timeouts (submit.idleTimeoutMs / timeoutMs), ImmutableId preference on every Graph
draft call, the remaining total in the too-large message, files sent to a form
without a File field are refused and logged.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-13 17:02:10 +01:00
Radosław SmolińskiandClaude Fable 5.2 97202ee03e Form files: the visitor is told when the problem is the file — why and what to do; UTF-8 file names
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-13 16:51:05 +01:00
Radosław SmolińskiandClaude Fable 5.2 b6f9f34705 Form attachments: tests for project options and the concurrency guard
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-13 16:44:41 +01:00
Radosław SmolińskiandClaude Fable 5.2 701bb420c1 WIP: form attachments — unit tests, test e-mail with attachment, lint
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-13 16:28:22 +01:00
Radosław SmolińskiandClaude Fable 5.2 02b1e96d3d WIP: form attachments tests
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-13 16:24:27 +01:00
Radosław SmolińskiandClaude Opus 5.5 748ef9286f Seeder: required fields with references are created complete (1.15.5)
A page whose required layout holds a { $page } / { $form } reference could not be
created: pass 1 left the whole field out, validation rejected the record, and the
dry run reported a create (vanstevpl-web, 1.15.4).

- pass 1 resolves references to records that exist (or were created earlier in
  the run), so the field is written complete
- a { $page } to a page later in the same call is null in pass 1 and filled in
  pass 2; a record whose required field needs it is retried once that page exists
- required links in a cycle and references to pages or forms that never appear
  are an error with nothing written; unknown page targets are found while
  planning, so the dry run reports them too
- dry run: a missing form is an error (was a placeholder); a form planned earlier
  in the same dry run counts as existing
- real-Payload tests (pl, en, de): the report's careers page, an existing form
  target, optional and required forward links, a cycle, missing page and form,
  create-only second runs, dry-run parity
- CHANGELOG Unreleased, seeding.md, api.md; reference skills refreshed

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-13 14:29:41 +01:00
Radosław SmolińskiandClaude Opus 5.5 00e814e3ca Seeder: whole localized arrays keep every language (1.15.4)
createSeeder / writeLocales: a value written per locale as a whole —
fields: { pl: [...], en: [...], de: [...] }, a page layout, a global array —
returned the picked locale without walking into it, so each locale write made new
shared rows and only the last language survived (vanstevpl-web, 1.15.3).

- localize() localizes the picked value again with the stored rows, so row ids
  are shared across locales (arrays, blocks, nested arrays in blocks, groups)
- writeLocales passes the target's fields: a field that is itself localized
  (localized: true layout) never reuses another locale's row ids
- real-Payload regression test (pl, en, de): form with blocks and nested select
  options, shared and localized page layouts, global array via fillGlobal; a later
  PL save validates
- CHANGELOG Unreleased, seeding.md, api.md; reference skills refreshed

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-12 15:33:35 +01:00
Radosław SmolińskiandClaude Opus 5.5 f73465c3bb ipal-audit, ipal-doctor: the panel's bilingual labels are not hardcoded text
"Hardcoded Polish text in code" (i18n-literals) grepped every string, so adminText() and { en, pl }
labels in schema files were reported, though AGENT.md 6.5a asks for them. polish-literals.mjs reads
the syntax tree with the project's TypeScript (a plain grep without it) and spares those forms in
schema files only; every .tsx file, Polish-only labels, other keys and defaultValue still fail.
Reported by Niezly Dandys (1.15.2).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 12:55:44 +01:00
Radosław SmolińskiandClaude Opus 5.5 b80770bc2e ipal-doctor: find the frontend route group by structure, accept notFoundView.tsx
layout-required no longer assumes src/app/(frontend): any app/(<group>) (or app itself) holding the
catch-all page is the frontend, a localized one first; two candidates give a warning naming both.
notFoundView.ts or .tsx, and the usual extensions for the other required files. New
ipal-doctor.json layout.frontend override and export findFrontend. Reported by Say Diamonds
(1.15.1, route group (site)).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 15:00:05 +01:00
Radosław SmolińskiandClaude Opus 5.5 f789e36636 Seeds: guardSeedExit() — a run that ends early exits 1 with the reason, never a silent 0
payload run starts the CLI with `void start()` and imports the script; when the script's top-level await
is left without live handles, Node exits with code 0 and no output — a success in Coolify's Terminal.
guardSeedExit() (@intecion/ipal-kit/seed, dependency-free) listens for beforeExit: until summary() runs it
prints "[seed] ended before Payload initialized" / "… before the seed finished" and exits 1. createSeeder
marks the run initialized, summary() finished; process.exit paths (normal, errors, the production
refusals) are untouched. Wired into the ipal-site and ipal-form seed templates and the reference seed, so
ipal-kit create sites get it. Tests include a real child process started like payload run.
Docs: seeding.md, deployment.md §4.7, AGENT.md, ipal-reference (+ api.md), CHANGELOG Unreleased.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 19:19:14 +01:00
Radosław Smoliński 6ffcfaf461 Merge claude/starter-gate-fresh: starter:gate packs a fresh tarball every run
starter:gate gives every run a fresh tarball (no stale pnpm dlx cache) and proves
which plugin code generated the site (bundle/cli stamp). No conflicts; the
until-silence filter in generate.ts (aa88e4e) is kept.
2026-10-29 16:47:00 +01:00
Radosław Smoliński ba73e82e6f Merge claude/reference-seo-content: own meta descriptions, fuller demo content
Reference site: every page has its own meta description, demo archive and service
pages have real-length content; blocksToMarkdown reads section headers.

Conflicts resolved: reference/ipal-doctor.json — both branches removed their own
two live-seo silences, so the merged file keeps only the two permanent rules
(audit:collections-present, i18n-literals); docs/agent/reference-site/INDEX.md
regenerated with pnpm reference:index.
2026-10-29 16:46:53 +01:00
Radosław SmolińskiandClaude Opus 5.5 37131e9930 fillGlobal: a field already holding the seeded value is skipped, not rewritten
Seeding exactly the default (allowThemeToggle: true) used to count as unset,
rewrite it and report create on every run. Now: skip (exists), no write. A choice
at its default is still replaced by a different seeded value; editor changes stay.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 16:39:55 +01:00
Radosław SmolińskiandClaude Opus 5.5 64ee581098 Reference site SEO: own meta descriptions, fuller demo content; blocksToMarkdown reads section headers
- blocksToMarkdown: the library's section header (heading → ##, then intro; eyebrow
  skipped), intro, quote and bio are content. Pages whose text sat only in a hero
  (archive pages, quote, 404) auto-filled no meta description and fell back to the
  site description; /md and llms-full.txt also missed every section heading.
- legal() template: the placeholder names its page, so unfilled privacy/terms pages
  don't share a description.
- reference: every demo page has its own meta description (pl/en), posts and case
  studies use their excerpt; fuller made-up text on services, contact, quote and
  the archives (all pages >= 150 words); no seeding of allowThemeToggle (its default,
  fillGlobal rewrote it on every run). The two content silences are gone.

ipal-doctor --strict --offline --deep --url: 0/0/0 (4 silenced: 2 permanent,
2 entryList follow-ups of the block-library track). Smoke tests 15/15.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 16:38:09 +01:00
Radosław SmolińskiandClaude Opus 5.5 6f56ef4205 Block library: item headings follow the section; the leading block's first image is the LCP image
Found by ipal-doctor live-seo on the reference archive pages (entry list under a
page header without a picture): cards jumped h1 → h3, and the first card image
was lazy.

- itemHeadingLevel: items one below the section heading (h3 under h2, h2 under the
  page h1, h2 when the block shows no heading); createBlockRegistry({ itemHeadings })
  fixes a level per block. featureGrid, entryList, pricing, steps, team.
- blockPosition / blockHasImage (root): createPageRoute and the 404 view pass
  firstImage next to isFirst; leadsWithImage marks the first image of the leading
  block eager + fetchPriority high (hero, textMedia, featureGrid, gallery, team,
  entryList); priorityImage: false turns it off.
- reference/ipal-doctor.json: the two live-seo silences removed; reference skills
  and docs/agent/reference-site/INDEX.md refreshed.
- bin/ipal-blocks.mjs executable like the other bins.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 16:38:04 +01:00
Radosław SmolińskiandClaude Opus 5.5 e7e756a0d7 starter:gate: a fresh tarball every run and proof of which code made the site
pnpm's dlx cache is keyed by the spec, so the gate reused the previous run's plugin when the
tarball path stayed the same. Each run now packs to a new file name and calls dlx with
--config.dlx-cache-max-age=0. build:starter records the plugin commit in the bundle; ipal-kit
create records the bundle's sha256 and that commit in .ipal/starter.json; the gate checks both,
and the installed plugin, against the packed tarball.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 16:30:24 +01:00
Radosław SmolińskiandClaude Opus 5.5 dd11bc8146 ipal-audit: skip the starter's //: alternative lines; reference skills refreshed
CI / check (push) Canceled after 0s
CI / reference (push) Canceled after 0s
CI / reference-full (push) Canceled after 0s
- audit.sh g(): matches on a starter alternative line (`//: …` after file:line:,
  the commented-out variants inside @starter:if markers) are dropped. The reference
  site's `//: robots: { aiBots: 'block-training' }` / 'disallow' alternatives made
  `audit:robots-blocks-ai-bots` fire although the site blocks no AI bots. The doctor
  runs audit.sh, so it follows. Tests: a //: line is not a finding, a real
  robots: { aiBots: 'block-training' } line still is.
- reference/.agents/skills refreshed with ipal-skills (ipal-reference, ipal-setup,
  ipal-site and ipal-audit were behind the plugin's after the doctor/starter merges).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 16:27:49 +01:00
Radosław Smoliński 6d7d39bc95 Merge claude/project-starter-build: ipal-kit create (project starter)
ipal-kit create <domain> generates a new site from the reference site (bin
ipal-kit, /starter entry, gzipped template bundle built at prepublishOnly,
starter:gate); exact pins of the plugin's own four dependencies (D15, nodemailer
10.3.1); the single-language / non-pl-default refusal; reference/ @starter:if
markers, packageManager, cookieCrawl.

Conflicts resolved:
- reference/src/instrumentation.ts: the starter's multi-line ipalEnvRules with
  the @starter:if markers (the doctor's cookieCrawl comment line merged above
  assertEnv already).
- reference/ipal-doctor.json: the doctor's version, keeping the four live-seo
  silences (until 2026-11-30) — the starter's side was the pre-silence copy.
- docs/agent/skills/ipal-reference/resources/api.md: both /starter and /doctor.
- docs/CHANGELOG.md: both sides in both hunks; one Unreleased section.
- docs/agent/reference-site/INDEX.md: regenerated with pnpm reference:index.
2026-10-29 16:16:49 +01:00
Radosław SmolińskiandClaude Opus 5.5 01afa6fab8 Starter: inherit the reference doctor silences and packageManager; cookieCrawl active in the reference
Same reference/package.json, reference/ipal-doctor.json and ci.yml env lines as claude/ipal-doctor-build,
so the two branches merge cleanly there. ipal-doctor.json of a new site keeps i18n-literals (the /design
styleguide) and audit:collections-present only while posts/caseStudies are in.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 16:11:33 +01:00
Radosław Smoliński 04ae19e489 Merge commit '977872b' into claude/ipal-doctor-build
# Conflicts:
#	src/modules/seo/buildSitemapEntries.ts
2026-10-29 16:08:40 +01:00
Radosław SmolińskiandClaude Opus 5.5 e97cf6d7d9 ipal-doctor: old-style block maps, 2FA behind a switch, folder name as database base; first sweep table
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 16:06:46 +01:00
Radosław SmolińskiandClaude Opus 5.5 a4e8cfeae8 ipal-doctor: one command that checks a site against the team rules
bin ipal-doctor + @intecion/ipal-kit/doctor: static rules (versions, Node 22, AGENT.md §3
layout and naming, database names, env rules, headers, X-Powered-By, CSP, 2FA, cookie
scanner, adminMeta, AGENTS.md, skills, seeds, block library via blockLibraryManifest,
ipal-audit --quick), registry rules (latest plugin, pnpm audit --prod), live rules (--url,
ipal-seo-check), deep rules (--deep via payload run; GET /api/ipal/doctor, off until
IPAL_DOCTOR_TOKEN). Human / JSON output, --strict, exit codes 0/1/2/3, --sites drift table,
ipal-doctor.json with reasons, until, files, seen.

Fixes found on the way: sitemap leaves out the System pages 404 page; ipal-audit finds
array labels after fields, any form seed, runs grep in UTF-8; ipal-seo-check counts
duplicate titles per language. Reference site at zero findings (static), CI steps on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 16:03:00 +01:00
Radosław SmolińskiandClaude Opus 5.5 0dffb85ec1 Starter: refuse single-language and non-pl-default sites explicitly (later); docs and tests
ipal-kit create stops before writing anything and points to the manual ipal-setup path;
project-starter.md, AGENT.md, ipal-setup, ipal-site and the CHANGELOG say the same.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:56:19 +01:00
Radosław Smoliński 0170419473 Merge commit '977872b' into claude/project-starter-build 2026-10-29 15:51:32 +01:00
Radosław SmolińskiandClaude Opus 5.5 804a09efed Project starter: ipal-kit create <domain> generates a new site from the reference site
- bin `ipal-kit` (subcommand `create`): the architecture questions (or --answers JSON),
  rendering from reference/ through starter.manifest.json (placeholders, @starter:if variants,
  //: alternatives, demo dropped), answers into AGENTS.md "Project decisions" and ipal-doctor.json,
  local .env with a fresh PAYLOAD_SECRET, install from the shipped lockfile, ipal-skills,
  ipal-tokens, generate:types/importmap, typecheck, ipal-doctor when shipped, secret check,
  first commit
- @intecion/ipal-kit/starter: the building blocks (renderSite, validateAnswers, applyVariants,
  collectBundle, lockfileWithoutPlugin, secretFindings …)
- build:starter packs reference/ into dist/starter/template.json.gz (90 KB);
  starter:gate in prepublishOnly: site from the packed tarball, frozen install, seed, build,
  targeted SEED_ONLY seed in production mode, full seed refused, pnpm start checks
- D15: plugin dependencies pinned exactly (nodemailer 10.3.1)
- reference/: @starter:if markers (runs as before), manifest generate/variants/rewrite
- docs: project-starter.md, AGENT.md, ipal-setup, ipal-site, ipal-reference (+ api.md),
  README, PROGRAMISTA §2, CHANGELOG, docs/README, reference index

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:50:44 +01:00
Radosław Smoliński fd6eb293cb Merge claude/totp-pl-cookie-button: plain en/pl 2FA texts, CookieButton above the footer
TOTP_TEXTS (en, pl) merged over payload-2fa's, project translations still win,
twoFactor.texts: false keeps the package's; tab titles on the 2FA views
(TOTP_VIEW_TITLE). CookieButton lifts above the footer (avoid, default
COOKIE_BUTTON_AVOID; side; bottomOverlap; --ipal-cookie-button-inset). Admin
language keeps following the browser (no fallbackLanguage change).

Merge addition: the branch had no CHANGELOG entry — both items added under New
in the one Unreleased section, plus Requires project changes item 6 (CookieButton).
2026-10-29 15:46:09 +01:00
Radosław Smoliński 30c1015daa Merge claude/reference-site-plugin-fixes: 404 page unlisted, own-origin media, fillGlobal defaults
The page assigned as the 404 page is left out of the sitemap, llms.txt, the site
index, search, the search route and MCP search_content (unlistedPageIds;
createSearchRoute settingsSlug). buildImagesConfig allows the site's own
/api/media/file/** when R2_PUBLIC_URL is empty. fillGlobal treats a choice field
still at its default as empty. i18n.md: renderLabel client wrapper. No conflicts;
one Unreleased CHANGELOG section.
2026-10-29 15:45:49 +01:00
Radosław SmolińskiandClaude Opus 5.5 2886c89d8a 2FA screens: plain en/pl texts and tab title; CookieButton moves up above the footer
- TOTP_TEXTS (admin-ux.md wording) merged over @clocklimited/payload-2fa's
  long, informal texts; the project's i18n.translations still win;
  twoFactor.texts: false keeps the package's. Setup/verify screens titled
  "Two-step verification" / "Weryfikacja dwuetapowa" instead of "Payload".
- CookieButton: position via --ipal-cookie-button-offset / -inset and
  --ipal-z-header; lifts above the footer (avoid, default COOKIE_BUTTON_AVOID)
  while it is on screen; side prop; className still replaces the look.
- dev: a footer in the frontend layout to check the button against.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:34:01 +01:00
Radosław SmolińskiandClaude Opus 5.5 6b2c9b3cc6 Search leaves out the 404 page: searchContent, the search route, MCP search_content
searchContent / listContent read Site settings once (depth 0, homepage + notFound)
and skip unlistedPageIds; createSearchRoute and the MCP route pass settingsSlug.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:31:43 +01:00
Radosław SmolińskiandClaude Opus 5.5 3645e61f7d Fixes from the reference site: 404 page unlisted, own-origin media, fillGlobal defaults, switcher docs
- sitemap, llms.txt and the site index leave out the page assigned as the 404
  page (unlistedPageIds, exported); it stays when it is also the homepage
- buildImagesConfig: in production with R2_PUBLIC_URL empty, allow the site's
  own /api/media/file/** so next/image no longer answers 400
- fillGlobal: a choice field (select, radio, checkbox, number, date) still at its
  defaultValue counts as empty; text is never overwritten
- docs: LanguageSwitcher renderLabel needs a 'use client' wrapper (i18n.md,
  ipal-site, ipal-setup, api.md)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:29:07 +01:00
Radosław Smoliński 353e65e7bd Merge branch 'main' into claude/reference-site-build 2026-10-29 15:17:24 +01:00
Radosław SmolińskiandClaude Opus 5.5 8adac41f92 Reference site: Example Studio on ipal-kit (reference/), index for agents, CI job
reference/ is one complete client site on the plugin (made-up company, pl/en,
MongoDB, every library block and template, token standard light/dark, forms,
consent, SEO/GEO, enforced CSP, 2FA, base + demo seeds, Coolify runbook,
smoke tests). It uses the plugin as file:.. (injected) and is not shipped.

- docs/agent/reference-site/INDEX.md (generated by scripts/reference-index.mjs,
  kept current by test/referenceIndex.test.ts)
- AGENT.md section and pointers in ipal-site, ipal-setup, ipal-reference,
  ipal-upgrade, ipal-block; release steps in PROGRAMISTA §8.1b
- CI: reference (fast) on every push, reference-full on main; doctor steps
  wired, commented until ipal-doctor ships

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:17:11 +01:00
Radosław SmolińskiandClaude Opus 5.5 570a90761b Merge claude/design-tokens-build (d6675d2): theme on any element, primary-inverse roles
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:05:14 +01:00
Radosław SmolińskiandClaude Opus 5.5 d6675d2979 Design tokens: themes on any element, primary-inverse, form template
Follow-ups from the reference site's first visual test:
- data-theme="dark"/"light" switches the tokens on any element (LIGHT_SELECTOR,
  DARK_SELECTOR as selector lists); the base layer colours a themed panel's text
- inverted sections re-map primary / primary-hover / primary-text to the new
  primary-inverse / primary-inverse-text roles; the contrast report checks them
  (inherited roles resolved on the ancestor, as the cascade does)
- ipal-form formClasses.ts on token utilities + buttonClass(); theme.md: one-icon
  ThemeSwitcher pattern (the default two-option toggle stays)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:04:54 +01:00
Radosław SmolińskiandClaude Opus 5.5 29ede3ad4b Block library: fixes from the first visual test on the reference site
- CMSLink: a link that wraps content (a logo, a card) and leads nowhere keeps the
  content — an empty link group ({ type: 'internal' }) no longer hides logos
- entryList: field `collection` → `entryCollection` (Mongoose reserves
  `collection`; unreleased, snapshot updated) + a test against reserved names
- post template starts with a page hero holding the title (the page's h1)
- legal and cookie policy templates set noindex: true (AGENT.md §0c)
- hero background: a full bg-overlay scrim under the text
- MediaValue accepts any object (generated Media types fit without a cast)
- contact: Turnstile renders dark in an inverted section

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:03:39 +01:00