Files
ipal-kit/docs/agent/skills/iapl-upgrade/SKILL.md
T
Radosław SmolińskiandClaude Opus 5.5 2c0262367d IWSN: "Połącz z IWSN" — a person of Intecion connects the site (contract 1.8.0)
- the state block on the e-mail tab (method IWSN): the button while the service offers the confirmation page
  (connectAvailable) or before the site has enrolled; a click asks the site's server for the link
  (POST /api/iapl/mail-relay/connect-link, admin only), which asks the service (POST /v1/connect, enrolling first),
  checks that it begins with the service's own {base}/connect?, and hands it over without storing or logging it;
  the browser opens it in a new tab with noopener noreferrer; the block asks /v1/status every 5 s for 10 min
- states: waiting for confirmation (button), waiting for approval (no page), connected, stopped; 503
  connect-unavailable and 429 said in the admin's language; a load of the panel asks the service while the site waits
- dashboard alert for a waiting site (live); doctor mail-relay-connect (error) — replaces the pending warning and the
  "not enrolled yet" note of mail-relay-state
- opt-out mail.relay.connectButton: false (no button, no route); building blocks requestRelayConnectLink,
  isRelayConnectUrl, RELAY_CONNECT_LINK_PATH; the fake service implements /v1/connect, connectAvailable and
  confirmConnect
- contract copy 1.8.0 (IWDL working tree, checksums match); docs, AGENT.md, setup / upgrade / debug skills, changelog

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 21:42:23 +01:00

76 KiB
Raw Blame History

name, description
name description
iapl-upgrade Upgrades an existing project to the latest @intecion/ipal-kit and replaces hand-written code that the plugin now provides — proxy, route handlers, consent wrapper, language switcher, rich text parser, form logic, noindex, redirects, env validation, privacy link label, 404 page, CTA field zoo. Use when the user asks to update IAPL, migrate an older project, or clean up duplicated logic in a project.

iapl-upgrade

What changed in the version: node_modules/@intecion/ipal-kit/docs/CHANGELOG.md (the "Requires project changes" sections — do all of them). List of changes: …/docs/dev/PROGRAMISTA.md §6. Rule: when the plugin provides something the project has written by hand — remove the local version.

1. Update the package

pnpm add @intecion/ipal-kit@latest
pnpm payload generate:importmap   # new admin panel components from the plugin (e.g. RowLabel)
rm -rf .next

Copy the skills again (AGENT.md §14) — they may have changed. Postgres with migrations: new plugin fields (e.g. privacyLinkLabel) → pnpm payload migrate:create.

1a. AGENT.md §0b set

After the update, a full iapl-audit shows a "missing: …" section — the missing items of the MANDATORY SET (GEO: llms-full, Markdown, MCP; R2; Turnstile through getTurnstileConfig…). Wire each one according to PROGRAMISTA §2 — it is part of the update, not an extra. Skip one only with a client decision in AGENTS.md (iapl-audit-skip:).

→ 1.18.0, sign-in (CHANGELOG 1.18.0; access.md "A stranger cannot lock a staff account out", "Staff sign-in only from the site's own origin", "Changing one's own e-mail or password asks for the current password") — no schema change, no migration, no import-map change; read before deploying:

  1. IAPL_IP_HEADER must be pinned in production (x-forwarded-for behind Coolify/Traefik): failed staff sign-ins are counted per client IP and address. Without it every visitor shares one bucket (20× the limit).
  2. A staff collection with its own auth.maxLoginAttempts / lockTime keeps them; otherwise Payload's lock is now 50 failures for an hour (beside 5 per IP and address in 15 minutes). Payload's behaviour back: accounts: { signInLimit: false }.
  3. A panel or front end that signs staff in from another domain: accounts: { signInSameOrigin: { origins: ['https://…'] } } (or false). A proxy that rewrites Host: set serverURL. Customer / visitor logins are not affected.
  4. Scripts or integrations that change their OWN e-mail or password over the API send currentPassword; editors see "Current password" on their account page. Off: accounts: { confirmOwnChanges: false }. Check: five wrong passwords for an editor from one address → 429 there, 200 from another; the account page shows "Current password"; curl -X POST <site>/api/users/login -H 'Origin: https://other.example' … → 403.

→ 1.18.0, two-step verification confirmed by e-mail (CHANGELOG 1.18.0; security.md "Set-up confirmed by e-mail") — check before deploying: (1) e-mail works on the site (Site integrations → E-mail sending → "Send a test e-mail"); (2) serverURL is set (NEXT_PUBLIC_SERVER_URL); (3) tell the staff: whoever sets two-step verification up for the first time gets a link by e-mail and opens it in the same browser, then signs in again. Accounts that already have it are not affected. Nothing to wire, no migration, no import-map change. Off: twoFactor: { confirmByEmail: false }. Check: pnpm exec iapl-doctor --deep shows no 2fa-enrolment-mail error; a test editor scans the code → the screen says "we sent a link to …", the link opened in the same browser → "Two-step verification is on".

→ 1.18.0, security audit fixes (CHANGELOG 1.18.0 "Security audit 2026-12"; security.md "Lists and sorting") — no migration, no import-map change; check before deploying: (1) public lists are capped at 100 for callers that are not staff (REST / GraphQL; the Local API and the panel are not touched): a client-side script that reads more than 100 documents anonymously gets hasNextPage: true — page through, or listLimit: { max } / { exclude: ['slug'] } / false; (2) a ?sort=$… answers 400 (refuseOperatorSort: false = Payload's way); (3) Payload's document locks are staff only (lockedDocuments: false = Payload's default); (4) the negotiated Markdown at a page URL is private, no-store + Vary: Accept, while HTML pages keep their caching (ISR unchanged) — a proxy of your own that rewrites to /md/… copies the headers (content.md); markdown: { negotiate: false } turns negotiation off; (5) CSP report log lines show origins and paths, at most 10 per request and 60 requests per client a minute (a log parser that read full URLs adapts; createCspReportRoute({ maxReports, rateLimit })); (6) a text field of your own whose value goes into href (social profiles, a website): buildUrlField() and safeHref() at render (no schema change); (7) access callbacks are strict: cookieScanner.access and the doctor's access allow only on a literal true — a callback that returns req.user now refuses (403): return Boolean(req.user) or a role check; the old reading back: iapl({ strictAccessAnswers: false }); (8) the first iapl-doctor --only security run shows the new code-* / config-dangerous rules — judge each, mark a correct place // iapl-security-ok: <why>. Check: curl -s '<site>/api/pages?limit=100000' | jq .limit → 100; curl -s -o /dev/null -w '%{http_code}' '<site>/api/pages?sort=%24where' → 400; pnpm exec iapl-doctor --url <site> --only live-probes → no finding.

→ 1.17.2, security (CHANGELOG 1.17.2; PROGRAMISTA §6, items 84–87) — nothing required, check: readVersions: readPublished() now works (a wrapper of your own around it: use readPublishedVersions() inside); behind a proxy that rewrites Host without X-Forwarded-Host, set serverURL or the panel's mail / cookie buttons answer 403 (iapl-doctor warns); a locked editor sees "incorrect" until the lock ends (accounts.lockedAnswer: 'payload' for Payload's text); saving Cookies with a lower consent version is refused (cookieSettings.allowLowerPolicyVersion). Check: curl -s <site>/api/pages/versions as a visitor → 200 (published only), not 500.

→ 1.17.2: (1) Payload jobs: if the project has tasks or workflows and a cron calls /api/payload-jobs/run (or /handle-schedules) without its own jobs.access.run, set CRON_SECRET (16+ characters) in the app's environment and send Authorization: Bearer <CRON_SECRET> from the cron; in-process runs (jobs.autoRun, payload jobs:run) and an admin's API key need nothing (security.md "Payload's job queue"). Verify: the run route answers 401 without the header, 200 with it. (2) A front end that posted to /api/form-submissions as a customer account (not through submitForm): move it to submitForm / createSubmitAction, or set forms.formSubmissionOverrides.access.create. (3) A site with a visitor login collection: iapl-doctor --url … lists visitor-writes; give each listed collection and global its own write rule (adminOrEditor). (4) If the project has tests/routes.ts: update, judge, commit.

→ 1.17.2, cookie button (CHANGELOG 1.17.2; PROGRAMISTA §6, item 83; consent.md "Where the cookie button sits") — nothing is required: visitors now see the "cookie settings" button in the bottom corner of the window on every page; it never moves and no longer rides up above the footer. While it is shown the footer is a little taller (about 40 px on the reference site), so its last row ends above the button. Check the end of a page on a phone and on desktop: nothing under the button, the last footer link can be tapped. Bottom padding a project added by hand for the button: remove it (the plugin counts existing padding, so it is not doubled, but it is no longer needed). Amount by hand: --ipal-cookie-button-space on the footer (0 = none); no room: reserve={false}. The placement before: cookieButton={<CookieButton avoid={COOKIE_BUTTON_AVOID} />} on SiteProviders. A project e2e that expects the button above the footer, or an exact footer height after a decision: update it.

→ 1.17.1: (1) src/proxy.ts: replace the matcher literal with ['/((?!(?:api|admin|_next)(?:/|$)|.*\\..*).*)'] (i18n.md "Next matcher"; iapl-doctor rule proxy-matcher). The old one skipped every page whose first segment only starts with api, admin or _next (/administracja): no locale redirect, no proxy CSP there. Verify on a build: curl -sI localhost:3000/administracja → 307 to /pl/administracja; /admin and /api/health unchanged. (2) If the project has tests/routes.ts: run pnpm payload run tests/routes.ts update, judge the new entries, commit (after EVERY Payload / IAPL upgrade). New projects: add the closed-doors spec and the route check (iapl-audit "What the script does not check").

→ 1.17.1, security (CHANGELOG 1.17.1; PROGRAMISTA §6, items 79–81; security.md) — check before deploying:

  1. pnpm build: a config value the plugin does not understand now stops the start with the option's name (accounts: 0, stats: 'false', retentionDays: null, an unknown role name in requireRole, …). Fix the value; real values start as before (security.md → "Switches are read strictly").
  2. Nothing to do for the write-only secrets: no query can name them any more. A site that had versions on for Site integrations, with an admin account that may have been misused: change the SMTP password and the Turnstile key.
  3. twoFactor.requireSetup.exempt decided from the e-mail: move to an admin-only checkbox (security.md); every account may change its own e-mail.
  4. A collection of the project with drafts and read: () => true: use readPublished() so ?draft=true answers visitors nothing unpublished.
  5. Your own endpoint with buildVerifyLimit: call limit.settle(req, correct) after the check. Check: pnpm exec iapl-doctor has no proxy-matcher; curl -s "<site>/md/xx" → 404; the panel's 2FA works.

1.8.x → 1.9.0 (PROGRAMISTA §6, items 17–21): twoFactor.plugin required; getTurnstileConfig instead of turnstileSiteKey (with both keys set the token is required — check that every form has the widget); clientIp(await headers()) in the form action + IAPL_IP_HEADER in the production env; buildR2Storage wired.

→ 1.9.2 (PROGRAMISTA §6, items 28–33) — import instead of code, start with item 28 (security): a custom FormRenderer passed the Emails tab (company addresses) to the HTML → a block with <RenderForm> + formClasses.ts, remove the renderer. Then: layout → SiteProviders, page and 404 → createPageRoute / createNotFoundPage, GEO routes → re-exports from lib/content, src/fields/section*.ts and lib/navigation.ts → buildSection*Field, resolveNav, resolveLink. Check every item in the browser (form: submission + email; page: 200, 404, metadata). Postgres: migrate:create (new form field types and texts in Notifications).

→ 1.11.0 (PROGRAMISTA §6, items 34–37): remove the workarounds — a copy of publicForm (→ RenderForm values / prepareBuilderForm), manual remotePatterns/dangerouslyAllowLocalIP (→ buildImagesConfig()), conditional storage in iaplEnvRules, a custom product JSON-LD graph (→ pageJsonLd.entries + buildProductJsonLd), a custom RenderBlocks for h1 (→ isFirst). Links to posts: buildLinkField({ relationTo: [...] }) with a data migration.

→ 1.11.1 (PROGRAMISTA §6, items 38–45): remove the workarounds (WORKAROUND IAPL comments) — the NEXT_RUNTIME condition around the revalidatePath injected into buildRevalidateHook (a global's own afterChange hook keeps it — iapl-nav), the form focus guard, a custom theme (→ ThemeScript/ThemeSwitcher), a custom table of contents (→ extractHeadings + TableOfContents + headingIds), catching notFound for a redirect (→ onMissing: 'redirectHome'), background colour only for JPEG in <Media>, a custom type instead of CmsLink['appearance'] (→ per-shape types from generate:types: CmsLink, CmsLinkPlain, CmsLinkNoLabel, CmsLinkPlainNoLabel; style: LinkAppearance). Cookie banner: buttons.save → buttons.savePreferences — in migrate:create choose rename for the column to keep the texts.

→ 1.12.3 (PROGRAMISTA §6, item 46): Postgres/SQLite: migrate:create (new Cookie banner group → detailLabels, only new columns — no rename). A custom cookie settings window or a cookie list added to the banner → <CookieBanner settings="detailed"> and remove the copy. With detailed: Cookies → Cookie list filled in (scan, iapl-consent-check) and Detail labels in every language.

→ 1.13.0 (PROGRAMISTA §6, item 47; CHANGELOG "What projects must update" — do all 7, in order):

  1. Project without access (no roles field): every logged-in account can now use the plugin's admin and editor features (Site integrations, settings globals, test e-mail, stats, consent records, forms, form submissions); before, nobody could through the API. Check who can log in (grep -rn "auth:" src/collections, open sign-up, customer accounts). Untrusted accounts → add access (roles), or narrow with globalOverrides, forms.formOverrides / forms.formSubmissionOverrides, consentLog.collectionOverrides, stats.collectionOverrides. Verify: log in as a non-staff account → GET /api/globals/site-integrations is 403.
  2. Project with access: plain user accounts can no longer edit Site settings, Cookie banner, Notifications or forms, or create/delete users. List staff accounts in the panel (Users → Roles) and give them editor / admin, or loosen with globalOverrides, forms.formOverrides.access, access.authAccess. Verify: an editor saves Site settings.
  3. Postgres/SQLite: pnpm payload migrate:create → migrate (Site settings → Search engines: search_verification_*, ai_crawlers_policy, the ai_crawlers_rules table, localized llms_intro). With enabled: false the migration now keeps (or restores) the plugin's tables — check it has no DROP TABLE. MongoDB: nothing.
  4. pnpm payload generate:importmap, pnpm exec iapl-skills, rm -rf .next.
  5. Behaviour to check (grep the project, fix what applies): getSettings / getSiteShell read at depth: 1 (code that reads a relation of a relation → createContentHelpers({ settingsDepth: 2 })); sitemap() throws at runtime instead of returning [] (sitemapRoute answers 503); a twoFactor.collectionSlug other than admin.user stops startup (allowCollectionMismatch: true); requests without a client IP share one limited bucket (proxy hides the IP → IAPL_IP_HEADER, or setUnknownIpFactor); RenderRichText turns unsafe link URLs into # (safeLinks).
  6. Review the new options with the user (AGENT.md §7.1): consentMode: 'basic', revalidatePath, turnstileHostnames, Site settings → Search engines (verification codes, or keep DNS verification), app/robots.ts → export { getRobots as default } + force-dynamic, createSearchRoute({ …, isPathVisible }), access.firstUserAdmin.
  7. Remove the workarounds: a plugin after iapl that adds afterChange or access to the plugin globals → iapl({ revalidatePath }) / globalOverrides; a hand-written global revalidation hook → buildGlobalRevalidateHook({ revalidatePath }); consentFieldName passed only because the option was ignored → forms.consentFieldName works now; your own seed guard / upsert code → @intecion/ipal-kit/seed (createSeeder).

Every upgrade — Next.js 16.4.6 or later (AGENT.md §4 item 11): pnpm ls next sharp; below 16.4.6 → pnpm add [email protected] [email protected] sharp@^0.35.5, rm -rf .next, build, redeploy on Coolify (a new image ships the fixed next and sharp). Check: pnpm exec iapl-doctor → no next-min finding; pnpm dev prints no security-upgrade warning.

Every upgrade — Payload (AGENT.md §4 items 11–12): the reference site and the starter run Payload 3.94.1; the plugin still accepts ^3.90.2, so moving is recommended, not forced. To move: every payload / @payloadcms/* (in dependencies and in pnpm.overrides) to the same exact version, react and react-dom to 19.3.1 (Payload 3.94 requires ^19.3.1), Node.js 22.23.5 or later ("engines": { "node": ">=22.23.5 <23" }, .nvmrc 22) on every machine and in Coolify — Payload 3.94 refuses older Node. Nixpacks takes only the major from engines / .nvmrc; the patch comes from the Nixpacks release on the Coolify server, so check node -v in the app's Terminal (or the build log) and update Coolify first if it is below 22.23.5 (until then, stay on 3.90.x). Then pnpm install, pnpm payload generate:types, pnpm payload generate:importmap, rm -rf .next, build, redeploy. Payload 3.91–3.94 change no schema the plugin defines: no migration from the plugin; on Postgres/SQLite run pnpm payload migrate:create anyway and commit it if it is not empty. Check: pnpm ls payload @payloadcms/ui @payloadcms/db-mongodb → one version, 3.94.1; the panel opens and a document saves; pnpm exec iapl-doctor → no versions finding; Coolify app → Terminal → node -v → 22.23.5 or later.

Every upgrade — dependency advisories (AGENT.md §4 item 12): pnpm audit --prod; on Payload 3.94.x add the dompurify and happy-dom overrides to pnpm.overrides; on an older Payload also mongoose (MongoDB sites; 3.90–3.93 pin 8.24.1, which has a critical advisory, GHSA-pcrw-h46h-c93h, and four more) and undici (3.90–3.91):

"dompurify@<3.4.17": "^3.4.17",
"happy-dom@<21.0.4": "^21.0.4",
"mongoose@>=8 <8.24.7": "~8.24.10",
"undici@>=7 <7.30.1": "^7.30.1"

The selectors match only vulnerable versions, so on 3.94.x the last two do nothing — remove them. A "graphql-scalars@<2.0.1": "^2.0.1" line is no longer needed (the advisory no longer covers Payload's 1.22.2); remove it or keep it. Then pnpm install, pnpm build, commit package.json and the lockfile, redeploy on Coolify (no data or schema change, no migration). Check: pnpm audit --prod → no high or critical; pnpm why dompurify happy-dom mongoose undici → 3.4.17, 21.0.4, 8.24.7, 7.30.1 or later; pnpm exec iapl-doctor → no transitive-min finding; the panel opens and a document saves.

→ 1.14.0 (PROGRAMISTA §6, items 48–49; CHANGELOG "What projects must update" — do all 8, in order):

  1. pnpm payload generate:importmap — @intecion/ipal-kit/admin#FaviconCheck (hint under Site settings → Site icon) and the RowLabel entries are injected into every project; then pnpm exec iapl-skills, rm -rf .next. Check: pick a 32×32 PNG as the site icon → a warning appears under the field; saving still works.
  2. Node.js 20.9 or later (the plugin's nodemailer 10 needs it) — check the Coolify build image and .nvmrc / engines. Remove nodemailer and @types/nodemailer from the project's own package.json if someone added them (the plugin's copy is the one mailAdapter uses). Check: Site integrations → E-mail sending → send a test e-mail over SMTP (and over Microsoft Graph when the project uses it).
  3. Next.js — the "Every upgrade — Next.js" step above (today 16.4.6 or later, sharp@^0.35.5).
  4. Dependency advisories — the "Every upgrade — dependency advisories" step above (dompurify / graphql-scalars / undici overrides on payload 3.90.x). Check: pnpm audit --prod → no high or critical.
  5. Cookie list kept by hand → offer cookieScanner: true (+ crawl: true with IAPL_COOKIE_SCAN_URL, IAPL_COOKIE_SCAN_TOKEN and the site in the service's IAPL_CRAWLER_SITES, cookie-scanner.md); an own image modal → lightbox: true + <SiteProviders lightbox> (PROGRAMISTA item 48). Turning either on → Postgres/SQLite migrate:create → migrate. Without them: no schema change.
  6. Admin languages: English and Polish by default when the project sets no i18n.supportedLanguages. Ask the client; English only → i18n: { supportedLanguages: { en } }. Own admin texts → i18n.translations.<lang>.ipal.
  7. Frontend texts: validator messages are full sentences and pl locales get Polish fallbacks — grep the project's tests and code for the old strings ('required', 'invalid email') and update them.
  8. Sidebar: roles (users) and Cookies → Consent version moved to the sidebar — update editor instructions. Nothing else to change: the statistics tab title, the cookie scanner's integration names and the maintenance notice's close button follow the language by themselves.

→ 1.14.2 (PROGRAMISTA §6, item 51; 2FA setup loop; security.md) — required with 2FA on:

  1. pnpm payload generate:importmap — the plugin swaps @clocklimited/payload-2fa/rsc#TOTPProvider for @intecion/ipal-kit/admin#TotpRedirectProvider; commit importMap.js, rm -rf .next, redeploy on Coolify. Check: log in as a new admin (or a throwaway one) → /admin/setup-totp?back=%2Fadmin with the QR code, no reloading; after the code → back on /admin. A project that wrote its own x-pathname proxy rule for /admin as a workaround can drop it.

→ 1.14.1 (PROGRAMISTA §6, item 50; X-Powered-By, CSP; security.md) — nothing required, recommended in this order:

  1. Hide X-Powered-By — next.config.ts: export default withSecurityConfig(withPayload(nextConfig)) (import withSecurityConfig from @intecion/ipal-kit; from 1.17.0 the wrapper goes OUTSIDE — "→ 1.17.0, the public pages' first request"); remove a hand-written poweredByHeader: false or a header override if the project had one. Check: curl -sI localhost:3000/pl | grep -i x-powered-by → nothing (also on /admin and /api/health).
  2. CSP, report-only first — no CSP yet, or a hand-written one → buildSecurityHeaders({ csp: { mode: 'report-only', reportUri: '/api/csp-report', r2Url: process.env.R2_PUBLIC_URL, <flags for what the site loads> } }), the admin rule { source: '/admin/:path*', headers: buildAdminCspHeaders({ mode: 'report-only', reportUri: '/api/csp-report' }) } after the site-wide one, and src/app/api/csp-report/route.ts = export const POST = createCspReportRoute(). Flags: what the panel's Site integrations and the code load (analytics, metaPixel, linkedIn, tiktok, clarity, turnstile, youtube, googleMaps); anything else → extra. Check: curl -sI localhost:3000/pl | grep -iE 'content-security-policy-report-only|reporting-endpoints'; the main pages and /admin in a browser, accept the cookie banner → no [Report Only] lines in the console. Deploy.
  3. Enforce later — after a few days of clean [csp] lines in the Coolify logs: mode: 'enforce' in both places, redeploy, check the pages again. Record the date in AGENTS.md → "Project decisions".

→ 1.14.3 (PROGRAMISTA §6, item 52; cookie approval; cookie-scanner.md) — only with cookieScanner:

  1. pnpm payload generate:importmap — @intecion/ipal-kit/admin#CookieApprovalView and @intecion/ipal-kit/admin#CookieCrawlAlert (the dashboard reminder, also without crawl); commit importMap.js.
  2. Postgres/SQLite: pnpm payload migrate:create → migrate (cookie_review.change enum + index, cookie_review.needs_description); check the migration only adds columns. MongoDB: nothing.
  3. Tell the editors about Approve cookies (/admin/cookie-approval, linked from the scan box on Privacy → Cookie review and from the dashboard): tick, Approve and add, then describe the ones marked Needs description. The client wants the old entry-by-entry review → cookieScanner: { approval: false }; unknown cookies in another category → approval: { unknownCategory }.
  4. Behaviour: hand-typed Cookie list rows are looked up only while they have no review entry. Check: run a scan → the cookies appear on /admin/cookie-approval; approve one → it is in Cookies → Cookies in every language; the dashboard shows the reminder while cookies wait. Without cookieScanner: nothing.

→ 1.14.4 (PROGRAMISTA §6, item 53; cookie languages and one Cookies entry; consent.md, cookie-scanner.md):

  1. pnpm payload generate:importmap — with cookieScanner: @intecion/ipal-kit/admin#CookieReviewTab and (with crawl) @intecion/ipal-kit/admin#CookieSiteCheckTab; commit importMap.js. No migration.
  2. Ask the client about the two new defaults (both overridable): empty languages of the cookie texts fill themselves from the language an editor writes in (iapl({ fillEmptyLocales: false }) to turn it off); with cookieScanner the cookie screens become one Cookies entry with Review and approve and Site check tabs (cookieScanner: { adminLayout: 'separate' } for the old entries).
  3. Editor instructions and screenshots: Cookie banner is now Cookies. Check: one Cookies entry in the admin navigation; its tabs list the review entries and the site check; type a cookie purpose in one language and save → the other languages show it, and a language with its own text keeps it.

→ 1.14.6 (1.14.5 was never published; PROGRAMISTA §6, item 54; CHANGELOG 1.14.5 "What projects must update" — do all 7, in order):

  1. Cookie storage type (Postgres/SQLite): pnpm payload migrate:create cookie-storage-type → migrate (only adds cookie_settings_cookies.storage, default cookie, and cookie_settings_locales.detail_labels_storage). Existing rows become Cookie: set the type of local/session-storage rows by hand. MongoDB: nothing.
  2. Theme key: code that reads localStorage.getItem('ipal-theme') → THEME_STORAGE_KEY / documentThemeStorageKey(); a project that also runs next-themes and wants separate keys → iapl({ theme: { storageKey } }). Visitors keep their choice (moved before first paint).
  3. Cookie list: after the next Scan cookies, approve the new theme entry; remove an old ipal-theme row.
  4. Panel link preview (adminMeta, agency): nothing required. Remove a hand-written admin.meta that only set the panel title, description, openGraph or robots: noindex (your admin.meta keys still win). The credit reads "Technology support: Intecion.com" — agency: false or whiteLabel: { credit: false } to remove it. Check: curl -s $URL/admin/login | grep -E 'og:|robots', open $URL/api/ipal/admin-og, paste an /admin link in Slack.
  5. Dependency advisories: the "Every upgrade — dependency advisories" step above, now with the graphql-scalars override; Node.js 22 recommended with it.
  6. Title separator / GraphQL fix: Site settings → Title separator now stores names (pipe, endash, hyphen, middot, slash) instead of |, –… (which broke /api/graphql with 500). Postgres: pnpm payload migrate:create title-separator, then in the generated file add ${sql.raw(titleSeparatorSql())} right after the first ALTER TABLE "site_settings" ALTER COLUMN "title_separator" SET DATA TYPE text; in up and ${sql.raw(titleSeparatorSql({ direction: 'down' }))} at the same place in down (import { titleSeparatorSql } from '@intecion/ipal-kit'). Without it the migration fails with invalid input value for enum and rolls back. SQLite / MongoDB: nothing required. Old values keep working, and MongoDB is rewritten at start. A project with its own separator options (globalOverrides): use values matching /^[_A-Za-z][_A-Za-z0-9]*$/. Check: curl -s -X POST $URL/api/graphql -H 'content-type: application/json' -d '{"query":"{ SiteSetting { titleSeparator } }"}' → 200, and the browser tab shows the same separator. Project code that reads settings.titleSeparator itself now gets a name: use titleSeparatorChar(). → 1.15.0 design tokens (opt-in, design-tokens.md → "Migrating an existing site"): nothing breaks without it. To adopt: add the four @imports (§6.11) and src/design/tokens.ts (template .agents/skills/iapl-setup/resources/tokens.ts), map the current @theme colours/fonts/radius onto the roles, keep the old names as aliases in a marked legacy block, delete the --ipal-*-dark block kept only for the cookie banner, pnpm exec iapl-tokens, then replace old utilities and dark: colour classes file by file (iapl-audit lists them) and remove the legacy block. next/font variables become --font-family-body / --font-family-heading. Check: iapl-tokens --check, the site in both themes. Only with the owner's decision ("Project decisions": which sites migrate when).
  7. pnpm exec iapl-skills (new agent rules: architecture questions first, IAPL first). Optional with the owner's consent: pnpm exec iapl-skills --external.

→ 1.15.0 (PROGRAMISTA §6, item 55; CHANGELOG 1.15.0 "What projects must update" — do all 10, in order):

  1. Seeding after launch: production seed scripts and Coolify jobs need SEED_ONLY="pages:kontakt,…" (dry run first, back up); a run without it on production now stops. A full re-seed only with the owner's OK: IAPL_SEED_ALLOW_FULL=1. Update seed scripts copied from older templates (iapl-site, iapl-form).
  2. Optional: database names <domain without dots>_prod / _dev + iaplEnvRules({ databaseName: true }) (warns only).
  3. Optional: the design-token standard (design-tokens.md → "Migrating an existing site"). A site that styles the cookie banner only through --ipal-*-dark: check the banner in the dark theme.
  4. Optional: the block library, block by block (block-library.md); after turning blocks on: pnpm generate:types, pnpm payload generate:importmap, Postgres/SQLite migrate:create.
  5. CookieButton lifts above the footer — check a site with its own fixed footer bar; avoid={false} keeps it fixed. (Since 1.17.2 it stays in the bottom corner by default; the lift is avoid={COOKIE_BUTTON_AVOID}.)
  6. pnpm exec iapl-skills (new iapl-doctor; updated iapl-reference, iapl-setup, iapl-site, iapl-audit).
  7. Run pnpm exec iapl-doctor (and --url https://<site>), fix or silence each finding with a reason in iapl-doctor.json. IAPL_DOCTOR_TOKEN (≥ 32 characters) only if the deep check runs against production.
  8. Nothing for the exact dependency pins (nodemailer 10.3.1 and three more) beyond pnpm install.
  9. Pages saved before 1.15.0 keep their stored meta description: re-save a page whose description was empty (the section header now fills it).
  10. New sites: iapl create (project-starter.md); single-language / non-pl default sites still go through iapl-setup. Check: pnpm exec iapl-doctor --strict → 0 errors, 0 warnings; pnpm build; a production seed without SEED_ONLY stops with "full seed refused".

→ 1.15.1 (PROGRAMISTA §6, item 56; seed exit guard; seeding.md) — nothing required, recommended:

  1. Every seed script: import { createSeeder, guardSeedExit } from '@intecion/ipal-kit/seed' and guardSeedExit() as the first statement, before getPayload(); the script ends with seed.summary() (the iapl-site / iapl-form templates show it). pnpm exec iapl-skills for the updated templates.
  2. Check: run the seed with SEED_DRY_RUN=1 locally → exit 0; in Coolify's Terminal after a seed, echo $? → 0 (a 1 with [seed] ended … means the run stopped early — run it again).

→ 1.15.2 (PROGRAMISTA §6, item 57; iapl-doctor route groups; doctor.md) — nothing required:

  1. pnpm exec iapl-skills; remove a temporary layout-required silence in iapl-doctor.json added for a route group with another name or a notFoundView.tsx.
  2. Two frontend candidates reported → "layout": { "frontend": "src/app/(<group>)" } in iapl-doctor.json. Check: pnpm exec iapl-doctor --strict → no layout-required finding for the site's own route group.

→ 1.15.3 (PROGRAMISTA §6, item 58; iapl-audit, bilingual panel labels; iapl-audit skill) — nothing required:

  1. pnpm exec iapl-skills, so the updated audit.sh and polish-literals.mjs reach the project.
  2. Remove a temporary i18n-literals silence or iapl-audit-skip added because of adminText() / { en, pl } labels. Check: pnpm exec iapl-doctor --strict → no i18n-literals finding for a schema file's bilingual labels; Polish text in a .tsx component is still reported.

→ 1.15.4 (PROGRAMISTA §6, item 59; seeding whole localized arrays; seeding.md) — nothing required:

  1. Did a seed write a whole localized array ({ pl: [...], en: [...] } for form fields, a page layout, a global array) and the panel shows only the last language? A plain re-run skips existing records (create-only): rewrite them locally with SEED_UPDATE=1 pnpm seed and check every language in the panel.
  2. Live site, only the affected records: SEED_ONLY="forms:<title>,pages:<slug>" SEED_UPDATE=1 IAPL_SEED_ALLOW_PROD_UPDATE=1 SEED_DRY_RUN=1 pnpm seed, back up the database (Coolify), then the same without SEED_DRY_RUN. Records an editor changed since seeding are skipped (skip (edited)) — fix them in the panel.
  3. A global array: fillGlobal fills empty fields only — clear the field in the panel before the run, or fix it by hand. Check: the panel shows the seeded rows in every language; a second run reports skip, not new rows.

→ 1.15.5 (PROGRAMISTA §6, item 60; required fields with references in seeds; seeding.md) — nothing required:

  1. A seed that failed with "The following field is invalid: … > Layout" for a page whose required layout links to another page or a form: run it again — the record is now created complete (SEED_DRY_RUN=1 first).
  2. The dry run is stricter: a { $form } / { $page } to a record that neither exists nor is seeded earlier in the run is an error. Seed that record first or create it in the panel.
  3. A "cycle of required links" error: make one of the two links optional, or seed one of the pages first. Check: SEED_DRY_RUN=1 pnpm seed reports 0 errors; the real run creates the same records.

→ 1.16.0 (PROGRAMISTA §6, item 61; files on forms, e-mailed and never stored; forms.md "Files") — nothing required:

  1. pnpm exec iapl-skills. Existing forms need nothing; without forms.attachments nothing changes. No import map change.
  2. Only if the site wants files on a form (ask the owner): iapl({ forms: { attachments: true } }), a File field on the form (panel or seed — iapl-form skill), one e-mail of that form with a fixed recipient (no {{field}}), pnpm generate:types; Postgres/SQLite: pnpm payload migrate:create (additive). Add the formClasses keys file, help, fileList, fileItem, fileRemove; fill Form messages → Files for languages other than en/pl.
  3. A hand-built upload path for a form (own collection, bucket, route): replace it with the File field and remove it (after the owner confirms nothing else uses the stored files).
  4. Deploy: a proxy body limit of at least 12 MB on /api/ipal/forms/submit (Coolify's Traefik: none by default; nginx: client_max_body_size 12m;). Mail: Graph needs Mail.ReadWrite limited to the forms mailbox for files of 3 MB and more, or SMTP settings in Site integrations; otherwise the limit is about 2.8 MB. Check: Site integrations → "Send test e-mail" with the 10 MB file arrives; a form submission with a file arrives with the attachment, and the submission shows File delivery: Sent; with Graph, no draft or Sent Items copy is left in the sender mailbox a minute later.

→ 1.16.1 (PROGRAMISTA §6, item 62; Next.js minimum 16.4.5, GHSA-mfr8-8qww-v76h; AGENT.md §4 item 11) — required for every site below Next.js 16.4.5:

  1. pnpm add [email protected] [email protected], rm -rf .next, pnpm build; commit package.json and the lockfile, redeploy on Coolify (the new image ships the fixed Next.js).
  2. pnpm exec iapl-skills (updated iapl-setup / iapl-upgrade). Check: pnpm ls next → 16.4.6; pnpm exec iapl-doctor → no next-min finding; pnpm dev prints no security warning.

→ 1.16.2 (PROGRAMISTA §6, item 63; Payload's mongoose and happy-dom advisories; AGENT.md §4 item 12) — required for every site:

  1. Add to pnpm.overrides in package.json: "mongoose@>=8 <8.24.7": "~8.24.10" (MongoDB sites only) and "happy-dom@<21.0.4": "^21.0.4" (every site). Then pnpm install, pnpm build; commit package.json and the lockfile, redeploy on Coolify. No data change, no migration.
  2. pnpm exec iapl-skills (updated iapl-setup / iapl-upgrade). Check: pnpm why mongoose happy-dom → mongoose 8.24.10, happy-dom 21.0.4; pnpm audit --prod → no high or critical; pnpm exec iapl-doctor → no transitive-min finding; open the panel and save a document.

→ 1.16.3 (PROGRAMISTA §6, item 64; Payload 3.94.1 in the reference site and the starter; AGENT.md §4 items 11–12) — recommended, not required (the plugin's peer range stays ^3.90.2):

  1. Node.js 22.23.5 or later first — everywhere the site runs. Payload 3.94 refuses older Node. Locally: node -v. Coolify: Nixpacks takes only the major from engines / .nvmrc; the patch comes from the Nixpacks release on the server, so open the app → Terminal → node -v (or read the build log). Below 22.23.5: update Coolify first, and stay on Payload 3.90.x until then. CI images must resolve to 22.23.5 or later as well.
  2. Every payload / @payloadcms/* to 3.94.1 (in dependencies and pnpm.overrides), react and react-dom 19.3.1, "engines": { "node": ">=22.23.5 <23" } (.nvmrc stays 22). Overrides: keep "dompurify@<3.4.17": "^3.4.17" and "happy-dom@<21.0.4": "^21.0.4"; remove the mongoose, undici and graphql-scalars lines (they do nothing on 3.94.x). Then pnpm install, pnpm payload generate:types, pnpm payload generate:importmap, rm -rf .next, pnpm build; commit package.json and the lockfile, redeploy on Coolify.
  3. Postgres/SQLite: pnpm payload migrate:create, commit it if it is not empty (3.94.1 changes long index and foreign key names). MongoDB: no migration.
  4. pnpm exec iapl-skills (updated iapl-setup / iapl-upgrade). Check: pnpm ls payload @payloadcms/ui @payloadcms/db-mongodb → 3.94.1; pnpm why dompurify happy-dom → 3.4.17, 21.0.4; pnpm audit --prod → no high or critical; pnpm exec iapl-doctor → no versions finding; Coolify Terminal node -v → 22.23.5 or later; the panel opens, a document saves, a form submission arrives.

→ 1.16.4 (PROGRAMISTA §6, items 65–66; security fixes: 2FA coverage and staff checks) — required for every site: 0. Before deploying: check the production PAYLOAD_SECRET length (Coolify app → Terminal → node -e 'console.log(process.env.PAYLOAD_SECRET.length)'). Shorter than 32: set a new random secret (with the owner's OK: logs everyone out, 2FA code again, API keys regenerate; deployment.md "PAYLOAD_SECRET — length and changing it"), or add secretMinLength: 0 to iaplEnvRules({ … }) for now and note it under "Project decisions" in AGENTS.md.

  1. Update the package, pnpm install, pnpm exec iapl-skills, build, redeploy on Coolify. No migration, no config change for a site with one auth collection. pnpm ls @clocklimited/payload-2fa should show 3.0.0-beta.7 (tested: beta.1 and beta.7); another version may stop startup with [iapl] twoFactor: the injected 2FA plugin did not add ….
  2. grep -rn "auth:" src/collections — more than one auth collection? Then: admin: { user: '<staff slug>' } in buildConfig; adminOrSelfIn('<slug>') instead of adminOrSelf in each; access.staffCollections only when the second collection is staff (access.md "Who is staff"). Never list a visitor collection there. Roles now count only for accounts of a staff collection: code that relied on isAdmin / adminOnly for accounts of another collection needs its own rule (req.user.collection === '…').
  3. grep -rn "overrideAccess: false" src — a call on a plugin collection or global (form-submissions, forms, consent-records, stats-visits, cookie-review, the settings globals) must pass the user from payload.auth({ headers }); a user object built by hand needs collection: '<staff slug>' for its role to count. Own endpoints that check req.user: add secondFactorPassed(req) or use userMeetsRole(req, role). isAdmin(req.user) keeps working on the server; prefer isAdmin(req.user, req.payload). grep -rnE "isAdmin\(|isEditor\(|hasMinimumRole\(" src — a call in a client component or in proxy.ts / middleware now returns false without a source: isAdmin(user, config) (useConfig()), or isAdmin(user, { staffCollections: ['users'] }). A client component imports them from @intecion/ipal-kit/client (not in 1.16.4–1.16.6: go to 1.16.7); the main entry there fails with next build --webpack ('server-only' cannot be imported from a Client Component module).
  4. pnpm exec iapl-doctor --url <site> (with the doctor token) → accounts without 2FA must be 0. An account that has not set TOTP up opens everything with its password alone: have its owner set it up now, or remove it.
  5. Tell the owner what the CHANGELOG entry says under "Requires project changes" and agree on it: new SMTP password and Turnstile secret, a look through Site settings, Site integrations and each form's Emails tab. Do not change those values yourself without that decision. Check: with 2FA on, log in over the API with the password only (security.md → "What the second factor covers" → Check) → 403 from /api/globals/site-integrations, /api/form-submissions, /api/users; log in fully in the panel → Site integrations and a form submission open, a setting saves. With a second auth collection: its token gets 403 from the same addresses and from POST /api/setup-totp. The Coolify log has no PAYLOAD_SECRET must be at least; pnpm exec iapl-doctor has no env finding.

→ 1.16.5 (PROGRAMISTA §6, item 67; CHANGELOG 1.16.5; security.md "The back link of the 2FA screens") — required with 2FA on:

  1. Do this in ONE deploy with the upgrade, or the panel is locked for everyone. Run pnpm exec iapl-doctor before deploying. pnpm payload generate:importmap — the plugin puts @intecion/ipal-kit/admin#SafeTotpView in front of the 2FA package's setup and verify views; commit importMap.js, rm -rf .next, redeploy on Coolify. With the old import map the build passes and the site starts, but the 2FA screens have no code form (HTTP 200) — nobody can sign in. Signs: pnpm exec iapl-doctor → import map lacks …SafeTotpView (run it before deploying); the log line [iapl] The admin import map may be out of date at start; the notice "Two-step verification may not be available" where the form should be. Fix: the same command, commit, redeploy. The log line and the notice with a working code form mean a false alarm (the importMap.js on disk is not the one the build used — a Dockerfile runner stage, a re-exporting map): sign-in works; set twoFactor.importMapCheck: false. Check: log in with the password only → open /admin/verify-totp?back=https%3A%2F%2Fexample.com%2F → enter the code → you land on /admin (not on example.com); a normal login still returns to the page you came from. No option, env, schema or migration. A project that registered its own 2FA views, or wrote a proxy rule that strips back, can keep them (twoFactor.safeBack: false turns the plugin's check off).
  2. pnpm exec iapl-skills.

→ 1.16.6 — 2FA setup required (CHANGELOG 1.16.6; PROGRAMISTA §6, item 68; security.md "Setup required") — required with 2FA on: Not a routine patch, although the number is one. From this version an account without 2FA can only set it up and is blocked after 72 hours; on Postgres / SQLite a missing migration locks everyone out of the panel. Do not upgrade a live site without steps 1–3 and a deploy day agreed with the owner. Steps 2, 3 and 5 go in ONE deploy.

  1. Before upgrading a live site: pnpm exec iapl-doctor --url <site> (doctor token) → accounts without 2FA. Tell the owner: from the upgrade on, such an account can only set 2FA up, and has 72 hours for it; after that an administrator must reopen setup on the account's page. Have them set it up now, or remove unused accounts. Make sure at least one administrator (better two) has 2FA set up — otherwise nobody can reopen setup from the panel. The 72 hours of existing accounts start at the first start after the deploy and are counted once (restarts and redeploys do not extend them): agree the deploy day with the owner.
  2. Update the package, pnpm install, pnpm exec iapl-skills, pnpm payload generate:types, pnpm payload generate:importmap (new: TwoFactorStatusField, TwoFactorAlert; commit importMap.js), then pnpm exec iapl-doctor before deploying.
  3. Postgres/SQLite — required, same deploy, or nobody can log in: pnpm payload migrate:create (adds the column totp_setup_from to the 2FA collection; needed whenever 2FA is on, also with requireSetup: false), commit, and have it applied when the new container starts: prodMigrations in the database adapter, or the start command pnpm payload migrate && pnpm start (deployment.md §4.3). Never Coolify's Pre-deployment command — it runs in the old container, without the new migration, and the new version then starts without the column. Without the column every login answers 500, administrators included; the log says [iapl] 2FA: the column for "totpSetupFrom" is missing … NOBODY CAN LOG IN. pnpm exec iapl-doctor reports it before the deploy. MongoDB: nothing.
  4. An integration that logs in with a password and has no TOTP: give it an API key, or twoFactor.requireSetup: { exempt: ({ user }) => user.serviceAccount === true } with a checkbox only admins can write (access: { create: adminOnlyField, update: adminOnlyField }) — not by e-mail: every account may change its own e-mail (security.md "Decide exempt from a field only an administrator can write"). A project already on an e-mail list (1.17.1): move to the field, or make email admin-only. grep -rn "overrideAccess: false" src: a user fetched by id is refused for every account now — take it from payload.auth({ headers }).
  5. rm -rf .next, build, redeploy on Coolify. Read the first lines of the log: [iapl] 2FA: N existing account(s) without two-step verification… — pass that number to the owner. The line appears on that first start only. Postgres/SQLite: if logins answer 500 after the deploy, the migration from step 3 did not run — check that it is committed and that the container runs migrations at start (deployment.md §4.3), then redeploy.
  6. requireSetup.exempt must be a plain function returning true / false (an async one stops the start). A script on an API key is refused by POST /api/ipal/two-factor/reset by default — pass twoFactor.resetAccess if that is wanted. A reset ends the account's sessions (it logs in again); after a suspected compromise change the password too. An SVG favicon has no tab icon on the 2FA screens.
  7. Tell the owner what to tell the staff: a new account has 72 hours to set 2FA up, then an administrator must choose "Reopen setup". Not wanted: twoFactor.requireSetup: false, or { windowHours: false }. Every administrator is blocked (all missed the 72 h): security.md "Every administrator is blocked" — a pnpm payload run script that sets totpSetupFrom to now for one administrator, or requireSetup: { windowHours: false } + redeploy, set 2FA up, put it back. Check: create a throwaway account → its token gets 403 from /api/users/me; in the panel it lands on the setup screen with "Set up two-step verification by …"; after the code it is in. As an administrator open that account → "Two-step verification: Set up." and the reset button; delete the account.

→ 1.16.7 (hardening; CHANGELOG 1.16.7; PROGRAMISTA §6, item 69) — not a routine patch: agree the deploy with the owner, read every point, most sites change nothing:

  1. Update the package, pnpm install, pnpm exec iapl-skills, pnpm payload generate:types. No import-map change, no schema change and no migration on any database (the verify count uses Payload's own payload-kv collection). grep -n "staffCollections\|authCollection" src/payload.config.ts: every slug there must be an auth collection of the config — with a wrong one Payload does not start (the slug is in the log; /api/health answers 503, so with a health check Coolify keeps the old container).
  2. Panel access by role. After the first start read the log: [iapl] N account(s) of "users" are below the role "editor" and cannot open the admin panel. Those accounts (role user, or no role) now see "Unauthorized" in the panel. Give the people who work in the panel editor, or set accounts: { panelRole: 'user' }. The line NOBODY can open the admin panel (an error) means no account has the role: fix with a script (payload.update({ collection: 'users', id, data: { roles: ['admin'] } }), pnpm payload run) or accounts: { panelRole: false } + redeploy.
  3. Secrets are write-only. Nothing to do for a normal site: the SMTP password and Turnstile secret stay stored; the panel shows "a value is set". grep -rn "smtpPassword\|turnstileSecretKey" src — code that read them over REST / GraphQL as an admin, or with overrideAccess: false, now gets '********': read them on the server with payload.findGlobal({ slug: 'site-integrations' }). A script that saves the whole global back keeps the secrets (the mask means "keep"). New: a save in the panel or over the API that changes the SMTP server, port or user name must send the password again ("Enter the password again…"), also when the transport is set to Microsoft Graph; a script that does that over REST / GraphQL sends the password with it, a seed with the Local API is not asked. secrets: { reenterOnChange: false } turns it off. During a rolling update a page opened under the new version and saved against the OLD one stores ******** as the password: after the deploy, check that a test e-mail goes out.
  4. TURNSTILE_SECRET_KEY is deprecated (it still works). If the log says [iapl] Deprecated: the Turnstile secret key comes from the TURNSTILE_SECRET_KEY environment variable or iapl-doctor --url reports turnstile-env-key: with the owner, copy the key into Site integrations → Spam protection → Secret key, send a test form, then remove the variable in Coolify. Do not do it on a client site without the owner. Nothing breaks if you wait; the removal will be announced in the changelog.
  5. Forms with files and Turnstile. While Turnstile cannot check (wrong keys, Cloudflare down), a form with a File field is now refused (text forms are accepted as before). Check iapl-doctor --url → no turnstile-degraded; to keep the old behaviour: forms: { turnstileOnConfigError: { files: 'allow' } }.
  6. Account creation and changes. A project whose own staff collection has no create / update / delete / unlock / read rule gets one (before: any signed-in account of any auth collection — a customer could change a staff password, list the staff accounts, lift a login lock):
    • the collection carries the plugin's roles (access.authCollection, or a roles select with only user / editor / admin): create, delete, unlock — an admin; update — an admin or the account itself; its roles field — only an admin (when the field has no access.update of its own). Check: does a non-admin create or edit other accounts, or change roles, there today? Then write the rule you want;
    • an account of the collection can hold editor or admin although its roles are not just the plugin's (user, editor, admin, boss; viewer, editor; a roles field that is text, json or a relationship) — the field must hold a LIST (hasMany; a single-valued roles is not affected, its value never counts): the admin rules too, since 1.17.0 (the value on the account makes a plugin admin or editor). Check: do accounts with one of your own roles (boss, viewer) manage accounts there? Then write that as the collection's own rules. Read the start log: No staff account holds the role "admin", so NOBODY can create, delete or unlock accounts in "…" — give one account admin with a script, or write the rules;
    • the collection has role values of its own that hold neither (superadmin, …) or no roles: accounts of that collection keep working as before, except that an account no longer changes its own roles; accounts of other collections are refused. Write your own rules — the plugin does not know your roles, and inside the collection every account can still create an account with any role (iapl-doctor --url → staff-own-roles);
    • read: only staff accounts read a staff collection. Check: does the front end show staff accounts (an author box) to logged-in visitors with the visitor's session? Then write that collection's read rule, or accounts: { staffOnlyRead: false }. Anonymous visitors never could. A staff collection added by a plugin listed after iapl gets the same rules at start, put in FRONT of the rules it has (both must allow). If that plugin's collection needs a rule wider than the plugin's default, set custom: { ipal: { accountRules: false } } on it. From 1.17.0: a copy of a staff collection made by such a plugin ({ ...staff, slug: 'copy' }) gets the plugin's rule for its own slug in front of the copied rules — the copy's accounts edit themselves only after access: { ...staff.access, update: adminOrSelfIn('copy') }, and the original's accounts no longer manage the copy's. A collection of your config that such a plugin makes the panel's (admin.user) keeps the rules you wrote and gets the plugin's for the operations without one — name it in access.staffCollections instead (docs/access.md "Account rules"; the start log says what was put and what was kept). first-register on any auth collection other than the panel's login collection answers 403 unless that collection allows sign-up. access.firstUserAdmin: false with a default role below editor: the panel role is not applied (a warning at start), or — with accounts.panelRole set — the start fails with the fix in the message. Wanted otherwise: accounts: { adminOnlyCreate: false, adminOnlyWrite: false, staffOnlyRead: false, firstUserRoute: 'all' }.
  7. Passwords. New passwords of staff accounts need 12 characters; existing shorter passwords keep working — nobody is logged out or asked to change. A script that creates staff accounts with a short password fails with a validation error: lengthen it, or accounts: { password: { minLength: 8 } }.
  8. 2FA attempts from another origin get 403. A panel or front end on another domain than the API that posts to /api/verify-totp: add it — twoFactor: { …, sameOrigin: { origins: ['https://panel.example.com'] } } (or set Payload's csrf / cors). A same-domain site changes nothing when the server knows its own address: serverURL is set, or the proxy passes Host (Coolify / Traefik do) or X-Forwarded-Host. Check before the deploy: is serverURL set? If not and the proxy rewrites Host (nginx's plain proxy_pass), nobody can enter a 2FA code after the upgrade — set serverURL. After the deploy log in with a code; if it answers "Not allowed from this origin.", the log has [iapl] 2FA: a code from origin "…" was refused with the fix.
  9. Dashboard alerts. Editors now see "An integration needs attention. Ask an administrator." instead of the error text; accounts with only user see no alerts. dashboardAlerts: { integrations: 'all' } restores it ('all' checks no role and no second factor).
  10. Role checks in client components. grep -rlE "^['\"]use client" src | xargs grep -nE "from '@intecion/ipal-kit'" — a file that imports isAdmin, isEditor or hasMinimumRole there: change the import to @intecion/ipal-kit/client and keep the second argument (isAdmin(user, config)). import type may stay. Check: pnpm exec iapl-doctor --url <site> (new rules: access-missing, csrf-empty, open-signup, staff-accounts-open, staff-own-roles, turnstile-degraded, turnstile-env-key); as an admin GET /api/globals/site-integrations shows "smtpPassword":"********"; a test e-mail and a test form still work; an editor and an admin still log in.

→ 1.17.0, security (prepared as 1.16.8, released in 1.17.0; CHANGELOG 1.17.0 "Security"; PROGRAMISTA §6, item 71) — most sites: update, rebuild, read the start log:

  1. Update the package, pnpm install, pnpm exec iapl-skills. No option, schema, migration or import-map change.
  2. Built with Turbopack? grep -n '"build"' package.json — next build without --webpack: the old build serves the plugin's package.json under /_next/static/media/ (registry and repository addresses, no secret). rm -rf .next, build, find .next/static -name 'package*.json' prints nothing; redeploy; purge a CDN or cache.
  3. A staff collection of the project's own (grep -n "staffCollections\|admin.*user" src/payload.config.ts) without access rules: look at its roles field.
    • it holds a list that can contain editor or admin (select with hasMany and one of them next to values of its own; text or relationship with hasMany; json): only an admin manages its accounts now. Do accounts with another role manage them today? Write the collection's own access.create / update / delete;
    • a single select (no hasMany) with only user / editor / admin: its accounts manage each other again. Does the project's code give rights by that value? Write the collection's own rules;
    • anything else: nothing.
  4. Start log: No staff account holds the role "admin", so NOBODY can … → give one account admin with a script (pnpm payload run, Local API) or write the rules. Could not check … → make sure one account holds admin.
  5. A plugin listed after iapl that copies a staff collection or sets admin.user (grep -rn "\.\.\.staff\|collections: \[\.\.\." src in the project's own plugins): CHANGELOG 1.17.0 "Security" → "Requires project changes" — the copy's access.update, accountRules: false, or naming the collection in access.staffCollections. Check: a customer and the lowest staff account get 403 on POST /api/<staff collection>; an admin still manages accounts; pnpm exec iapl-doctor --url <site> (staff-own-roles).

→ 1.17.0 (the plugin is called IAPL; CHANGELOG 1.17.0; PROGRAMISTA §6, item 72) — nothing is required: Every name from before keeps working: ipalKit() and the other old exports, the ipal-* commands, IPAL_* env, ipal-doctor.json, ipal-audit-skip, the old pointer block. The package is still @intecion/ipal-kit; routes /api/ipal/*, --ipal-* tokens, data-ipal hooks and the cookie ipal_vid are unchanged (AGENT.md "Names: IAPL and ipal-kit"). Do not rename anything in the project unless the owner asks.

  1. Update the package, pnpm install. No option, schema, migration or import-map change (pnpm payload generate:importmap gives no diff).
  2. Refresh the skills: pnpm exec iapl-skills (the project's ipal:skills script, where it has one, runs the same program). It installs iapl-*, removes the 16 old ipal-* folders by name (a skill of the project's own named ipal-… stays), and rewrites the pointer block in AGENTS.md in place. Commit the result. Old skill names written by hand in AGENTS.md ("Project decisions") are not touched: update them when you edit that file anyway.
  3. Log filters or alerts on the text [ipal]: the prefix is [iapl] now.
  4. Only when the owner asks to move to the new names (each step is optional and independent): ipalKit → iapl and the other exports in payload.config.ts / instrumentation.ts; scripts in package.json (ipal-tokens → iapl-tokens, …); git mv ipal-doctor.json iapl-doctor.json; ipal-audit-skip: → iapl-audit-skip:; in Coolify IPAL_<NAME> → IAPL_<NAME> (add the new one, redeploy, then remove the old one — never both with different values). pnpm exec iapl-doctor rule legacy-names (info) lists what is left.
  5. Never on an existing site: storageNames: 'iapl' or visitorCookie. They are for sites made with 1.17.0 or later; on a live site they reset visitors' statistics history and the 2FA attempt counts, and change the cookie list. Check: pnpm exec iapl-doctor shows no new error or warning (new rules: legacy-names, storage-names, client-hints — the last one is the next block); the site builds; the panel opens; the old commands (pnpm exec ipal-doctor) still run.

→ 1.17.0, the public pages' first request (Payload's colour-scheme client hints for the admin only; CHANGELOG 1.17.0; PROGRAMISTA §6, item 76; security.md "Client hints") — one line, recommended on every site:

  1. next.config.ts: swap the two wrappers — export default withPayload(withSecurityConfig(nextConfig)) becomes export default withSecurityConfig(withPayload(nextConfig)). Nothing else changes; X-Powered-By stays hidden. Without the swap the site works exactly as before (Payload sends Accept-CH / Critical-CH / Vary: Sec-CH-Prefers-Color-Scheme for every path, and Chrome repeats the first request of every visit).
  2. The panel is not at /admin (routes.admin): withSecurityConfig(withPayload(nextConfig), { adminClientHints: { route: '/its' } }).
  3. A page of the project's own that reads Sec-CH-Prefers-Color-Scheme on the server (rare: grep -rn "Sec-CH-Prefers-Color-Scheme" src): add its path — { adminClientHints: { sources: ['/that/:path*'] } }, or keep the old behaviour with { adminClientHints: false }. Check (a production build, pnpm build && pnpm start): curl -sI localhost:3000/pl | grep -iE 'accept-ch|critical-ch' → nothing; curl -sI localhost:3000/admin/login | grep -iE 'accept-ch|critical-ch' → both; the panel opens in the browser's light / dark scheme with no flash; pnpm exec iapl-doctor has no client-hints finding. → 1.17.0, cookie banner at first paint (CHANGELOG 1.17.0 "Changed"; PROGRAMISTA §6, item 77; consent.md → "First paint") — nothing is required: The banner is now in the server HTML and painted with the page (it appeared after hydration and could be the LCP element). Pages stay static; consent, tags, the cookie and the consent log are unchanged.
  4. Remove a project wrapper that delays the banner (ConsentWrapper, a "mounted" guard, dynamic(…, { ssr: false })) — it undoes the improvement.
  5. Nonce CSP (createProxy({ csp })): <SiteProviders nonce={nonce}> must be set (it already is where the theme script works); by hand: <ConsentProvider nonce>. Without it the banner appears after hydration, as before.
  6. Tailwind 3, or CSS of your own, with classNames.root that sets display: add [data-ipal="banner"][hidden] { display: none !important }.
  7. E2E tests of the project that expect no [data-ipal="banner"] element before a decision is read (e.g. toHaveCount(0) right after goto for a returning visitor) must wait for hydration or assert toBeHidden().
  8. Keep the old behaviour: <CookieBanner firstPaint={false} />. Check: curl -s <page> | grep -c 'data-ipal="banner-script"' → 1; the response still carries s-maxage; first visit: the banner is there before the page's scripts have loaded; after a decision and a reload: never shown.

→ 1.17.0, consent compliance (CHANGELOG 1.17.0 "Consent"; PROGRAMISTA §6, item 78; consent.md → "Compliance defaults") — Postgres / SQLite: a migration; MongoDB: nothing required: What a visitor of an existing site sees change: "Reject" looks like "Accept all"; one more sentence in the default banner text (only where the panel's message is empty); a browser with Global Privacy Control gets no banner and no tracker request. Every decision is now recorded in Privacy → Consent records.

  1. Postgres / SQLite and the project never had consentLog on: the consent log is now on by default and is a new table. In the same deploy: pnpm payload migrate:create consent-log, commit it, apply it at container start (prodMigrations or pnpm payload migrate && pnpm start). Or iapl({ consentLog: false }). Without either the site works, but every choice answers 503 and is not recorded (one log line; iapl-doctor warning consent-log-migration). MongoDB: the collection appears by itself.
  2. Every site: pnpm payload generate:types adds the consent-records collection's types (where it was off) — run it and commit. No import-map change.
  3. Layout: remove logEndpoint="/api/ipal/consent" from <SiteProviders> (it is the default now; keeping it is harmless) and equalChoice (the default). A hand-wired <ConsentProvider> keeps logEndpoint.
  4. The project's decisions, only where the owner wants the old behaviour — record each in AGENTS.md → "Project decisions": <CookieBanner equalChoice={false} />, <SiteProviders gpc="ask" | gpc={false}>, iapl({ consentLog: false }). Consent Mode stays advanced unless the project chose basic.
  5. Project e2e that clicks "Reject" by its old secondary look, or expects the old banner text, update it.
  6. A <YouTubeEmbed> without poster: add an uploaded poster (the thumbnail otherwise comes from Google before any choice; the consent check warns). Check: pnpm exec iapl-doctor (no consent-log-migration, no consent-banner warning you did not decide); iapl-consent-check on the built site — 0 violations, run 4 (Global Privacy Control) shows no banner; after a click on the banner a document in Privacy → Consent records.

→ 1.17.0, e-mail (the Intecion mail service (IWSN in the panel) is the default transport; Microsoft Graph deprecated; CHANGELOG 1.17.0; PROGRAMISTA §6, items 73–75; email.md; AGENT.md §7.2) — nothing to run; read which case the site is:

  1. Every site: no schema change, no migration, no import-map change. pnpm payload generate:types gives a small diff (four field descriptions of Site integrations): run it and commit, or a CI that compares types fails. The e-mail tab gains the block "How e-mails are sent" and new wording ("Automatic", "Own SMTP server").
  2. Which case — Site integrations → E-mail sending, and the Coolify env:
    • SMTP filled in (server, user name, password): nothing changes, the site contacts nobody. Done.
    • GRAPH_* set: mail as before; one deprecation warning per start, doctor warning mail-graph-deprecated. Do not remove the variables in passing — moving the site is the owner's decision (email.md "Moving off Microsoft Graph"). Note: with GRAPH_* set and SMTP filled in, the panel's choice decides as before.
    • SMTP half filled in (a server or user name without the rest; refused until now): mail now goes through the mail service, with one log line and a hint in the panel — complete or empty the fields.
    • Neither (mail failed with "not configured" until now): on its next e-mail the site contacts webservices.intecion.net with its host and the plugin version, receives its own token through the new public route POST /api/iapl/mail-relay/confirm, and from then on sends from [email protected] under the panel's "Sender name". Agree it with the owner before the deploy; to keep the old behaviour: iapl({ mail: { relay: false } }).
  3. For a site that will use the mail service: serverURL is the public address the site answers on without a redirect; no proxy or WAF rule blocks /api/iapl/mail-relay/confirm; trailingSlash: true or another routes.api → Intecion sets the site's confirm address first; "Sender address" is filled in (replies go there); the client's processing agreement names the service. A new site waits until a person of Intecion confirms it: "Połącz z IWSN" in the panel (contract 1.8.0). Launch and a domain move need nothing: the real domain enrols by itself although the database holds the development address's connection. A staging or test copy of the database neither enrols nor sends by itself when it is non-public: its host matches iapl({ developmentHosts }) — built in *.dev.netscale.pl, so the team's development addresses need no env and no edit; add the project's other copy hosts to the list (an array of host patterns; a string, an empty entry or a lone * stops the start) — or it has IAPL_NOINDEX=1. The panel says so until an admin presses "Connect again"; iapl-doctor --deep names the signal (mail-non-public). A copy on another host without the variable sends to the real addresses in its data; keep a copy silent for good with mail: { relay: false } or SMTP to a catcher. Production must not have IAPL_NOINDEX set (it would send nothing).
  4. Code that compared the result of payload.sendEmail needs no change for SMTP and Graph. A send through the mail service returns { sent, transport: 'relay', … }; sent: false with confirmed: false means "may have been sent".
  5. Your own account mail (invitations): mark it — withMailKind(message, 'account'). Form mail and Payload's "forgot password" are marked by the plugin.
  6. Postgres sites (nothing to run): at most pool size − reserve transactions are open at once (default reserve 2 of 10; connectionReserve; a transaction begun inside another one takes no place), form e-mails and Payload's "forgot password" / "verify your e-mail" go out right after their transaction commits (forms.emailsInTransaction, mail.accountMailAfterCommit), SMTP gives up sooner (10 s to connect, 60 s of silence; smtp.timeouts). A site that set its own pool.max: the reserve follows it. MongoDB and SQLite sites: no change. deployment.md §4.3a, forms.md "When e-mails go out". Check: pnpm exec iapl-doctor --deep --url <site> → no mail-transport / mail-relay-state / mail-reply-address / mail-relay-route finding (or only mail-graph-deprecated on a Graph site); Site integrations → E-mail sending → Send test e-mail names the transport you expect; a form submission arrives. The service is live at https://webservices.intecion.net/mail; a new site waits until a person of Intecion confirms it ("Połącz z IWSN") — keep SMTP until then, or relay: false.

→ 1.18.0, IWSN is connected by a person of Intecion (CHANGELOG "Unreleased (for 1.18.0)" → "IWSN: Połącz z IWSN"; email.md "The mail service"; AGENT.md §7.2 point 5) — nothing to run:

  1. No schema change, no migration, no import-map change. Sites whose "Sending method" is SMTP or Microsoft Graph see no change at all.
  2. A site on IWSN that is already active stays active. A site that waits (relay-pending, or doctor mail-relay-connect error after the upgrade): Site integrations → E-mail sending → "Połącz z IWSN" → a person of Intecion confirms it on the page that opens (an @intecion.com sign-in — the owner's step, tell them) → the block says "Connected to IWSN" by itself. Then send a test e-mail.
  3. A project that does not want the button: mail: { relay: { connectButton: false } } (no button, no route).

→ 1.17.1, e-mail (CHANGELOG 1.17.1 point 5; PROGRAMISTA §6, item 82; email.md "Which transport a send takes"; AGENT.md §7.2) — nothing to run, one check:

  1. MongoDB: no migration. Postgres / SQLite: pnpm payload migrate:create (the new field emailMethod is a column), commit it, apply it when the new container starts — in the same deploy. Without it mail still leaves the old way, but the Site integrations page does not open and the log and iapl-doctor --deep (mail-method, error) say so. No import-map change; pnpm payload generate:types gives a diff (the field emailMethod): run it and commit.
  2. After the deploy open Site integrations → E-mail sending. "Sending method" shows the method the site sends through today as selected: IWSN (built-in) (no SMTP server), Own SMTP server, or Microsoft Graph (deprecated) (GRAPH_* on the server). Nothing to save: the site keeps sending exactly as before until somebody picks another option (saving with the shown method stores nothing); iapl-doctor --deep notes it (mail-method, info). Send a test e-mail: the answer names the method.
  3. From the save on what is chosen is what is used: "Own SMTP server" with an incomplete server, or "Microsoft Graph" without GRAPH_*, sends nothing and says so (state block, mail-method error) — no fallback to another method. Tell the owner before changing the method on a live site.
  4. Seeds and scripts that set up mail: write emailMethod: 'relay' | 'smtp' | 'graph' (or setMailMethod(payload, …)). emailTransport written alone still works and means the old order.

→ 1.17.1, the sign-in look (CHANGELOG 1.17.1; PROGRAMISTA §6, item 80; white-label.md → "The sign-in screens") — nothing is required:

  1. Sites with whiteLabel: after the update the login screen and the 2FA screens (code, setup) have the new look — a dark panel with the client's logo or the site's name beside the form. No edit, no generate:importmap, no migration: the look comes through AdminLogo and SafeTotpView, which the site's import map already has. Check: open /admin/login on a desktop and at a phone width, in both themes; sign in through 2FA. Look at the logo: it stands straight on a dark panel. A logo with dark letters: signIn: { logoPlate: true } (a white plate) or ask the client for a logo for dark grounds. Every logo that showed on the login screen before shows now (an SVG too); only a logo whose file is gone shows the site's name instead of a broken picture. Editors lose three fields: the name, logo and icon of Site settings are admin-only now (they are what the public sign-in page shows). A site whose editors must change them: whiteLabel: { brandAccess: 'editor' }.
  2. Tell the owner the sign-in page looks different and ask whether to keep it. No: whiteLabel: { signIn: false } — Payload's screens with the plain logo, as before (record it in AGENTS.md → Project decisions).
  3. Recommended, one edit: whiteLabel: { signIn: { allScreens: true } }, pnpm payload generate:importmap, commit importMap.js — forgot / reset password, create first user and logout get the same look. Forgetting the import map does not break the panel: at a production start the provider is left out and the log says so.
  4. Project CSS for the login screen (custom.scss rules on .login, .template-minimal, a hand-made graphics.Logo): look at the screens after the update; the look's own rules win over Payload's layer but not over the project's later ones. Restyle with the --iapl-signin-* variables instead.
  5. Sites without whiteLabel: nothing changes.

2. Inventory (no code changes)

What changed for projects between your old and new plugin version is exactly the reference site's diff — git diff v<old> v<new> -- reference/ in the IAPL repo (or the two docs/agent/reference-site/INDEX.md files): every file a project must touch, already done once and tested in the plugin's CI. For every item in the PROGRAMISTA §6 table show evidence (grep / file) of whether it applies to the project. Run the iapl-audit skill (--quick) and attach the result. Result: a prioritised to-do list — carry it out right away. Stop only before an irreversible change (data migration with content → iapl-migrate-fields, changing published slugs).

3. Item by item

One item = one change = one commit:

  1. read the docs file it points to,
  2. replace the local code with the plugin function, remove the old code (do not keep both),
  3. pnpm build — it passes before you take the next item.

Items that rename fields in the database (e.g. the ctaLabel → links refactor) need a data migration before the old fields are removed — ask the user whether the project already has content.

4. Finish

A full iapl-audit with no errors, then pnpm exec iapl-doctor (after pnpm exec iapl-skills and pnpm payload generate:importmap): no new errors against the report before the upgrade (skill iapl-doctor; new rules come with new versions — read each finding, fix or record the owner's decision in iapl-doctor.json with a reason). Before the upgrade, pnpm dlx --package=@intecion/ipal-kit@latest iapl-doctor --offline shows what the newest rules will report. Then the list of things to check in the admin panel.