From 2f6a81acbff61b7c3024b954ba8870544b31a55d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Smoli=C5=84ski?= Date: Thu, 26 Nov 2026 11:09:53 +0100 Subject: [PATCH] 1.17.0 upgrade notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changelog: one 1.17.0 entry, the security follow-ups prepared as 1.16.8 first, then e-mail, the name, Postgres; the mail service is live with enrolment "pending". PROGRAMISTA §6 rows 71 (renamed), 74 and 75; iapl-upgrade "→ 1.17.0, security"; iapl-setup, iapl-debug, email.md, deployment.md: a new site waits for approval while the service runs with "pending". Reference skills, AGENTS.md and the reference index on 1.17.0. Co-Authored-By: Claude Opus 5.5 --- docs/agent/reference-site/INDEX.md | 2 +- docs/agent/skills/iapl-debug/SKILL.md | 2 +- docs/agent/skills/iapl-setup/SKILL.md | 2 +- docs/agent/skills/iapl-upgrade/SKILL.md | 17 ++++++++--------- docs/deployment.md | 6 +++--- docs/dev/PROGRAMISTA.md | 4 +++- docs/dev/rename-iapl-plan.md | 2 +- docs/email.md | 5 ++--- reference/.agents/skills/iapl-debug/SKILL.md | 2 +- reference/.agents/skills/iapl-setup/SKILL.md | 2 +- reference/.agents/skills/iapl-upgrade/SKILL.md | 17 ++++++++--------- reference/AGENTS.md | 2 +- 12 files changed, 31 insertions(+), 32 deletions(-) diff --git a/docs/agent/reference-site/INDEX.md b/docs/agent/reference-site/INDEX.md index 24669aa..b2e4881 100644 --- a/docs/agent/reference-site/INDEX.md +++ b/docs/agent/reference-site/INDEX.md @@ -2,7 +2,7 @@ -The reference site is one complete client site on IAPL 1.16.8 ("Example Studio", made up) that uses +The reference site is one complete client site on IAPL 1.17.0 ("Example Studio", made up) that uses every convention in AGENT.md. It lives in the plugin repo (`reference/`, not in the npm package). Copy the PATTERN of the file you need; change only the project's content. Files up to 40 lines are below in full; open the rest in the repo at the tag of your plugin version: diff --git a/docs/agent/skills/iapl-debug/SKILL.md b/docs/agent/skills/iapl-debug/SKILL.md index 08163ff..a068095 100644 --- a/docs/agent/skills/iapl-debug/SKILL.md +++ b/docs/agent/skills/iapl-debug/SKILL.md @@ -105,7 +105,7 @@ through this procedure. Ask only when you are missing something you cannot get y | a site sends nothing: "The data comes from another site (…), so this copy does not send e-mails by itself" / `relay-refused`, cause `client-other-host` | the site is non-public — its host matches `developmentHosts` (built in: `*.dev.netscale.pl`) or `IAPL_NOINDEX=1` is set; `iapl-doctor --deep` says which (`mail-non-public`) — and its database holds another host's connection: a staging copy of production, or production's data copied back onto the development address. Expected — a copy with production's data must not mail real people by itself | should it send: "Connect again" in the state block, once (until the data is replaced). A copy that must never send: `mail: { relay: false }` or SMTP to a catcher. **The production site itself says this:** `IAPL_NOINDEX` was left set after launch — remove it; or its host matches a development pattern — take it out of `iapl({ developmentHosts })` | | the site does not start: "[iapl] … developmentHosts must be an array of host patterns …" | the list is not an array of non-empty host patterns (a single string, `null`, `['']`), or holds a lone `*` | write it as `['*.dev.netscale.pl', 'staging.client.pl']`; `[]` = none; to change who waits use `mail.relay.otherHosts` | | a staging or test copy **does** send, to real addresses | its host matches no development pattern and it has no `IAPL_NOINDEX=1`, so it looks like a launch (a public site enrols by itself); the doctor's deep run notes "the database also holds the mail-service connection of another host" | name its host in `iapl({ developmentHosts: ['*.dev.netscale.pl', ''] })`, or `IAPL_NOINDEX=1` on the copy; to be sure: `mail: { relay: false }` or SMTP to a catcher | -| `relay-pending` / "waiting for approval" | the exception: the service holds new sites for approval when many appear at once, or Intecion approves by hand (a site is normally active as soon as it enrols) | Intecion approves it on the service; nothing to change on the site; the same token then works | +| `relay-pending` / "waiting for approval" | while the service runs with enrolment "pending" (from its launch until Intecion switches to open enrolment), every new site waits for approval; after that, the exception (many new sites at once, or approval by hand) | Intecion approves it on the service; nothing to change on the site; the same token then works | | `relay-suspended` | Intecion stopped the site (abuse, a flood from a form) | contact Intecion; fill in SMTP meanwhile | | `relay-disconnected` | an admin pressed "Disconnect" | "Connect again", or SMTP | | `relay-quota` | the site's hour or day is used up (30 / 200 by default), more than 10 recipients, more than 10 confirmations to one address a day, too many new addresses, or the site's own limit on account mail (`mail.relay.accountMail`) | the server log names the limit; look for a form being abused (Turnstile on? rate limit?); a site that really sends more: Intecion raises the limits, or SMTP | diff --git a/docs/agent/skills/iapl-setup/SKILL.md b/docs/agent/skills/iapl-setup/SKILL.md index ba795c4..219184d 100644 --- a/docs/agent/skills/iapl-setup/SKILL.md +++ b/docs/agent/skills/iapl-setup/SKILL.md @@ -646,7 +646,7 @@ scaling (5). `●` routes for pages need the database at build time (PROGRAMISTA 6. **Notifications**: form messages in every language. 7. **Site integrations → E-mail sending**: "Sender name" (the client's name; empty = the site name) and **"Sender address"** (the client's address: with the mail service replies go there). SMTP fields **only** when the client asked - for its own server. On the production domain: the block "How e-mails are sent" must say "Connected to IWSN" (a site is active as soon as it enrols; "waiting for approval" is the exception — ask Intecion; the real domain enrols by itself at launch although the site was connected on its development address — nothing to press; "The data comes from another site" = the site is non-public (its host matches `developmentHosts`, built in `*.dev.netscale.pl`, or `IAPL_NOINDEX=1`) and holds a copy of another site's data: press "Connect again" only if the copy should send — on the production domain it means `IAPL_NOINDEX` was left set. A development address under `*.dev.netscale.pl` needs nothing; a staging or test copy on any other host must have its host in `iapl({ developmentHosts: […] })` (an array of host patterns: a single string, an empty entry or a lone `*` stops the start) or `IAPL_NOINDEX=1`, or it mails the real addresses in its data), then **Send test e-mail** → "through IWSN". Turnstile (for testing site + for its own server. On the production domain: the block "How e-mails are sent" must say "Connected to IWSN" ("waiting for approval": while the service runs with enrolment "pending" (from its launch until Intecion switches to open enrolment), every new site waits for approval — ask Intecion to approve the host; under open enrolment it is the exception; the real domain enrols by itself at launch although the site was connected on its development address — nothing to press; "The data comes from another site" = the site is non-public (its host matches `developmentHosts`, built in `*.dev.netscale.pl`, or `IAPL_NOINDEX=1`) and holds a copy of another site's data: press "Connect again" only if the copy should send — on the production domain it means `IAPL_NOINDEX` was left set. A development address under `*.dev.netscale.pl` needs nothing; a staging or test copy on any other host must have its host in `iapl({ developmentHosts: […] })` (an array of host patterns: a single string, an empty entry or a lone `*` stops the start) or `IAPL_NOINDEX=1`, or it mails the real addresses in its data), then **Send test e-mail** → "through IWSN". Turnstile (for testing site `1x00000000000000000000AA`, secret `1x0000000000000000000000000000000AA`; production keys from the client), analytics/pixel IDs, IndexNow → generate key. Mail/Turnstile errors show up as a dashboard alert. 8. **Forms**: check the addresses in the Emails tab of the seeded forms. diff --git a/docs/agent/skills/iapl-upgrade/SKILL.md b/docs/agent/skills/iapl-upgrade/SKILL.md index eee6aef..1404d0e 100644 --- a/docs/agent/skills/iapl-upgrade/SKILL.md +++ b/docs/agent/skills/iapl-upgrade/SKILL.md @@ -462,7 +462,7 @@ account → "Two-step verification: Set up." and the reset button; delete the ac - 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.16.8 (the value on the account makes a plugin admin or editor). **Check:** do + 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; @@ -477,7 +477,7 @@ account → "Two-step verification: Set up." and the reset button; delete the ac 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.16.8: a **copy** of a staff collection made by such a plugin (`{ ...staff, slug: 'copy' }`) + 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 @@ -509,7 +509,7 @@ account → "Two-step verification: Set up." and the reset button; delete the ac `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.16.8 (security follow-ups; CHANGELOG 1.16.8; PROGRAMISTA §6, item 71) — most sites: update, rebuild, read the start log:** +**→ 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). @@ -525,7 +525,7 @@ account → "Two-step verification: Set up." and the reset button; delete the ac 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.16.8 "Requires project + (`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/`; an admin still manages accounts; `pnpm exec iapl-doctor --url ` (`staff-own-roles`). @@ -553,7 +553,7 @@ ipal-kit"). **Do not rename anything in the project unless the owner asks.** builds; the panel opens; the old commands (`pnpm exec ipal-doctor`) still run. **→ 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, item 73; email.md; AGENT.md §7.2) — nothing to run; read which case the site is:** +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"). @@ -572,7 +572,7 @@ PROGRAMISTA §6, item 73; email.md; AGENT.md §7.2) — nothing to run; read whi 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. Nothing to arrange with Intecion: the site is active as soon as it enrols. + processing agreement names the service. Tell Intecion the host: while the service runs with enrolment "pending" (from its launch until Intecion switches to open enrolment), every new site waits for approval (the panel says "waiting for approval"); under open enrolment a site is active as soon as it enrols. **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 @@ -593,9 +593,8 @@ PROGRAMISTA §6, item 73; email.md; AGENT.md §7.2) — nothing to run; read whi 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 ` → 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 has to be live for a site -without SMTP: until Intecion says so, such a site reports `relay-unreachable` and sends nothing — keep SMTP, or -`relay: false`.** +**Send test e-mail** names the transport you expect; a form submission arrives. **The service is live at +`https://webservices.intecion.net/mail`; while the service runs with enrolment "pending" (from its launch until Intecion switches to open enrolment), every new site waits for approval — keep SMTP until it is approved, or `relay: false`.** ## 2. Inventory (no code changes) **What changed for projects** between your old and new plugin version is exactly the reference site's diff — diff --git a/docs/deployment.md b/docs/deployment.md index 9c7677c..88e096c 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -58,7 +58,7 @@ Mail needs **no variable**. A site with no SMTP server in the panel sends throug domain (or moved to another one) enrols by itself on its first e-mail; the old address's connection in the database is its own past. Remove `IAPL_NOINDEX` at launch as always — a site that still has it counts as a non-public copy and sends nothing. -- **Staging and copies.** A site is active as soon as it enrols, so a staging site sends real mail. A **copy of +- **Staging and copies.** Under open enrolment a site is active as soon as it enrols, so a staging site sends real mail (while the service runs with enrolment "pending" (from its launch until Intecion switches to open enrolment), every new site waits for approval). A **copy of production's database** on a non-public site — a host that matches `iapl({ developmentHosts })` (built in: `*.dev.netscale.pl`, Intecion's development domain; **no env needed**) or one with `IAPL_NOINDEX=1` — neither enrols nor sends by itself (its data is production's) until an admin presses "Connect again", and never uses or touches @@ -363,7 +363,7 @@ the panel). Code inside it that runs **without** the transaction's `req` needs a "forgot password" (it reserves the request interval outside the transaction), an e-mail adapter reading its settings, `payload.kv`, a project hook that calls the Local API without `req`. With the default pool of 10, **ten such requests at the same moment held all ten connections and each waited for an eleventh — the whole site stopped, for good** -(measured on 1.16.8 and the 1.17.0 branch: 12 form submissions or 12 "forgot password" requests at once, an ordinary +(measured on 1.16.7 and the 1.17.0 branch: 12 form submissions or 12 "forgot password" requests at once, an ordinary page got no answer). Since 1.17.0 the plugin keeps a few connections free of transactions (`connectionReserve`): @@ -384,7 +384,7 @@ Since 1.17.0 the plugin keeps a few connections free of transactions (`connectio Measured on Postgres 17, default pool of 10 (`test/transactionPool*.test.ts`): -| At the same moment | 1.16.8 / `connectionReserve: false` | 1.17.0 | +| At the same moment | 1.16.7 / `connectionReserve: false` | 1.17.0 | |---|---|---| | 12 or 30 form submissions, or 12 or 30 "forgot password" | site stops for good, pages too | all finish, a page answers in milliseconds | | 9 / 12 / 30 submissions whose hook writes without `req` | 9 finish (363 ms); 12 and 30 stop the site | all finish (under 2 s) | diff --git a/docs/dev/PROGRAMISTA.md b/docs/dev/PROGRAMISTA.md index 02b238b..774d07a 100644 --- a/docs/dev/PROGRAMISTA.md +++ b/docs/dev/PROGRAMISTA.md @@ -678,9 +678,11 @@ Do one item at a time, build, check. Order by importance: | 68 | **1.16.6 — 2FA setup required** (not a routine patch: a new default that can lock accounts out) — an account that has not set 2FA up still reads data over the API with its password; or after the upgrade an account "can do nothing" / is blocked | Before upgrading: `iapl-doctor --url` → accounts without 2FA set it up or are removed; one admin (better two) must have 2FA; deploy day agreed with the owner. Then, in ONE deploy: update, `generate:types`, `generate:importmap` (`TwoFactorStatusField`, `TwoFactorAlert`), **Postgres/SQLite: `migrate:create` and the migration applied in the same deploy when the new container starts — `prodMigrations` or `pnpm payload migrate && pnpm start`, never a pre-deployment command (deployment.md §4.3) — (column `totp_setup_from`); without it every login answers 500**, build, redeploy. Existing accounts get 72 h from the first start; blocked later → admin: account page → "Reopen setup". Password-login integrations: API key or `requireSetup.exempt`. `pnpm exec iapl-skills` | CHANGELOG 1.16.6, security.md "Setup required" | | 69 | **1.16.7 — hardening** (not a routine patch: stricter defaults) — an account with only the role `user` sees "Unauthorized" in the panel; or the API returns `"smtpPassword":"********"`; or a form with a File field is refused while Turnstile is misconfigured; or "The password must have at least 12 characters."; or "Enter the password again…" on the SMTP password; or `403` "Not allowed from this origin." on the 2FA code | Update, `generate:types`, redeploy; no import map, schema or migration. Every slug in `access.staffCollections` must be an auth collection (otherwise Payload does not start: `/api/health` 503, the old container keeps serving). Set `serverURL` (a proxy that rewrites `Host` otherwise blocks the 2FA code; the log names the origin). Read the start log (`N account(s) … cannot open the admin panel`) and give panel users `editor`. Own code that read the two secrets over the API → Local API on the server. `TURNSTILE_SECRET_KEY` is deprecated: with the owner move the key into the panel. Own staff collection without rules: an admin (update: or the account itself; roles only by an admin; read by staff only) where the roles are the plugin's, accounts of that collection where they are the project's own — write that collection's own rules. Existing short passwords keep working. Switches: `accounts`, `secrets`, `forms.turnstileOnConfigError`, `twoFactor.sameOrigin`, `dashboardAlerts`. `pnpm exec iapl-skills` | CHANGELOG 1.16.7, access.md "Account rules", security.md "Stored secrets", turnstile.md | | 70 | **1.16.7** — `next build --webpack`: `'server-only' cannot be imported from a Client Component module`, from a `'use client'` file that imports `isAdmin`, `isEditor` or `hasMinimumRole` | Import them from `@intecion/ipal-kit/client` in client components, keep the second argument (`isAdmin(user, config)`); `import type` may stay on the main entry | CHANGELOG 1.16.7, access.md | -| 71 | **1.16.8 — security** — a site built with Turbopack (`next build` without `--webpack`) serves `/_next/static/media/package..json`; or the project has a staff collection of its own without access rules; or a plugin listed after iapl copies a staff collection or sets `admin.user`; or the start log says `No staff account holds the role "admin", so NOBODY can …` | Update, `pnpm exec iapl-skills`, `rm -rf .next`, rebuild; no option, schema, migration or import map. Turbopack: `find .next/static -name 'package*.json'` empty, purge a CDN. Own staff collection: a `roles` list that can hold `editor` / `admin` → only an admin manages its accounts (write own rules otherwise; one account must hold `admin`); a single select with only `user` / `editor` / `admin` → its accounts manage each other again (own rules if your code goes by the value). A copy: `access.update: adminOrSelfIn('copy')`, or `custom.ipal.accountRules: false` | CHANGELOG 1.16.8, access.md "Account rules" | +| 71 | **1.17.0 — security** (prepared as 1.16.8, released in 1.17.0) — a site built with Turbopack (`next build` without `--webpack`) serves `/_next/static/media/package..json`; or the project has a staff collection of its own without access rules; or a plugin listed after iapl copies a staff collection or sets `admin.user`; or the start log says `No staff account holds the role "admin", so NOBODY can …` | Update, `pnpm exec iapl-skills`, `rm -rf .next`, rebuild; no option, schema, migration or import map. Turbopack: `find .next/static -name 'package*.json'` empty, purge a CDN. Own staff collection: a `roles` list that can hold `editor` / `admin` → only an admin manages its accounts (write own rules otherwise; one account must hold `admin`); a single select with only `user` / `editor` / `admin` → its accounts manage each other again (own rules if your code goes by the value). A copy: `access.update: adminOrSelfIn('copy')`, or `custom.ipal.accountRules: false` | CHANGELOG 1.17.0 "Security", access.md "Account rules" | | 72 | **1.17.0 — the plugin is called IAPL** — you see `iapl()`, `iapl-doctor`, `IAPL_IP_HEADER`, `iapl-doctor.json`, `[iapl]` in docs and logs and wonder whether the project must change | No. Every old name works through 1.x (`ipalKit`, `ipal-*` commands, `IPAL_*` env, `ipal-doctor.json`, `ipal-audit-skip`, the old pointer block); the package is still `@intecion/ipal-kit`. Run `pnpm exec iapl-skills` (or the project's `ipal:skills` script) and commit; change a log filter on `[ipal]` to `[iapl]`. Rename the rest only when the owner asks (`iapl-upgrade` "→ 1.17.0", AGENT.md "Names: IAPL and ipal-kit"). Never set `storageNames: 'iapl'` on an existing site | | 73 | **1.17.0 — e-mail: the Intecion mail service is the default transport** — a site with no SMTP server in the panel and no `GRAPH_*` starts sending through the service after the upgrade (an outbound call with its host; a new public route `POST /api/iapl/mail-relay/confirm`; mail from `notification@webservices.intecion.net`); a Graph site warns at start | Nothing to run (no schema, migration or import-map change). SMTP site: nothing. Graph site: nothing now — deprecated, move when the owner says. Site with neither: agree it with the owner; `serverURL` = the public address, "Sender address" filled in, the host listed by Intecion; or `iapl({ mail: { relay: false } })` to keep the old behaviour | `iapl-upgrade` "→ 1.17.0, e-mail", AGENT.md §7.2, email.md | +| 74 | **1.17.0 — Postgres** — a Postgres site with many form submissions or "forgot password" requests at the same moment stopped answering (every page waited); after the update `transactionWatchState` shows a reserve, form and account mail arrive a moment after the save | Nothing to run. Default: a fifth of the pool (at least 2) kept free of transactions; form, "forgot password" and "verify" mail sent right after the commit; shorter SMTP time-outs. The old way: `connectionReserve: false`, `forms: { emailsInTransaction: true }`, `mail: { accountMailAfterCommit: false }`. An own e-mail adapter calls `sendAccountMailAfterCommit` first. MongoDB / SQLite: no change | CHANGELOG 1.17.0 "Fixed — Postgres", deployment.md §4.3a, forms.md "When e-mails go out" | +| 75 | **1.17.0 — e-mail: launch day and copies** — a site moves from `.dev.netscale.pl` to its real domain (the real domain must send with no click); or production's database is copied to a development or staging address (it must not mail real people); or the start stops with "`developmentHosts` must be an array of host patterns" | Nothing to run on launch day. A development address matching `iapl({ developmentHosts })` (built in `*.dev.netscale.pl`) or a site with `IAPL_NOINDEX=1` that holds another host's connection sends nothing until an admin presses "Connect again". Other staging hosts: add their pattern to `developmentHosts` (an array of non-empty patterns; `[]` = none). Production never keeps `IAPL_NOINDEX` | `iapl-upgrade` "→ 1.17.0, e-mail", email.md "Staging, copies and several hosts" | After updating the package: `pnpm exec iapl-skills` (new skill versions), `pnpm payload generate:importmap`, `rm -rf .next`, restart dev, grep for the new symbol in `node_modules/@intecion/ipal-kit/dist`. diff --git a/docs/dev/rename-iapl-plan.md b/docs/dev/rename-iapl-plan.md index 25f9704..9d5ad2f 100644 --- a/docs/dev/rename-iapl-plan.md +++ b/docs/dev/rename-iapl-plan.md @@ -510,5 +510,5 @@ Left open: - `CLAUDE.md` still says ipal-kit, `ipal-*` skills and `ipal-skills`. - Past rows of `PROGRAMISTA.md` §6 and past sections of `iapl-upgrade` were renamed with the rest (they name commands a reader runs today); `CHANGELOG.md` was not. -- The version is still 1.16.8 in `package.json`; the changelog entry is headed "1.17.0 (draft)". +- Released as 1.17.0 (2026-11): the 1.16.8 follow-ups and this rename in one changelog entry. - The relay route and its names are the adapter session's (§7). diff --git a/docs/email.md b/docs/email.md index 45c684d..ec8aa55 100644 --- a/docs/email.md +++ b/docs/email.md @@ -359,7 +359,7 @@ the service), each with a text in the editor's language: | Code | Meaning | What to do | |---|---|---| -| `relay-pending` | enrolled, but held for approval by Intecion — the exception (many new sites at once, or approval by hand); a site is normally active as soon as it enrols | Intecion approves the host; nothing to do on the site | +| `relay-pending` | enrolled, but held for approval by Intecion — the rule while the service runs with enrolment "pending" (from its launch until Intecion switches to open enrolment), every new site waits for approval; after that the exception (many new sites at once, or approval by hand) | Intecion approves the host; nothing to do on the site | | `relay-suspended` | stopped by Intecion | contact Intecion; SMTP in the panel sends meanwhile | | `relay-refused` | the site could not enrol; or a token issued by hand stopped working (new server address, token no longer valid) | "When the site cannot be confirmed" below; hand-issued: ask Intecion for the address to be added or for a new token | | `relay-disconnected` | an admin pressed "Disconnect" | "Connect again", or fill in SMTP | @@ -586,8 +586,7 @@ Works on any `text` field. After wiring it in a project you may need To the mail service (when the owner says so): 1. Upgrade; check that `serverURL` is the site's public address. -2. Nothing to arrange with Intecion beforehand: the site is active as soon as it enrols (in the rare case that it - is held for approval, the panel says so). +2. Tell Intecion the host: while the service runs with enrolment "pending" (from its launch until Intecion switches to open enrolment), every new site waits for approval; the panel says so. Under open enrolment the site is active as soon as it enrols. 3. Remove the four `GRAPH_*` variables in Coolify and redeploy. If "Sending method" says Microsoft Graph, set it to "Automatic". 4. Site integrations → E-mail sending → send a test e-mail: the answer says "through IWSN". diff --git a/reference/.agents/skills/iapl-debug/SKILL.md b/reference/.agents/skills/iapl-debug/SKILL.md index 08163ff..a068095 100644 --- a/reference/.agents/skills/iapl-debug/SKILL.md +++ b/reference/.agents/skills/iapl-debug/SKILL.md @@ -105,7 +105,7 @@ through this procedure. Ask only when you are missing something you cannot get y | a site sends nothing: "The data comes from another site (…), so this copy does not send e-mails by itself" / `relay-refused`, cause `client-other-host` | the site is non-public — its host matches `developmentHosts` (built in: `*.dev.netscale.pl`) or `IAPL_NOINDEX=1` is set; `iapl-doctor --deep` says which (`mail-non-public`) — and its database holds another host's connection: a staging copy of production, or production's data copied back onto the development address. Expected — a copy with production's data must not mail real people by itself | should it send: "Connect again" in the state block, once (until the data is replaced). A copy that must never send: `mail: { relay: false }` or SMTP to a catcher. **The production site itself says this:** `IAPL_NOINDEX` was left set after launch — remove it; or its host matches a development pattern — take it out of `iapl({ developmentHosts })` | | the site does not start: "[iapl] … developmentHosts must be an array of host patterns …" | the list is not an array of non-empty host patterns (a single string, `null`, `['']`), or holds a lone `*` | write it as `['*.dev.netscale.pl', 'staging.client.pl']`; `[]` = none; to change who waits use `mail.relay.otherHosts` | | a staging or test copy **does** send, to real addresses | its host matches no development pattern and it has no `IAPL_NOINDEX=1`, so it looks like a launch (a public site enrols by itself); the doctor's deep run notes "the database also holds the mail-service connection of another host" | name its host in `iapl({ developmentHosts: ['*.dev.netscale.pl', ''] })`, or `IAPL_NOINDEX=1` on the copy; to be sure: `mail: { relay: false }` or SMTP to a catcher | -| `relay-pending` / "waiting for approval" | the exception: the service holds new sites for approval when many appear at once, or Intecion approves by hand (a site is normally active as soon as it enrols) | Intecion approves it on the service; nothing to change on the site; the same token then works | +| `relay-pending` / "waiting for approval" | while the service runs with enrolment "pending" (from its launch until Intecion switches to open enrolment), every new site waits for approval; after that, the exception (many new sites at once, or approval by hand) | Intecion approves it on the service; nothing to change on the site; the same token then works | | `relay-suspended` | Intecion stopped the site (abuse, a flood from a form) | contact Intecion; fill in SMTP meanwhile | | `relay-disconnected` | an admin pressed "Disconnect" | "Connect again", or SMTP | | `relay-quota` | the site's hour or day is used up (30 / 200 by default), more than 10 recipients, more than 10 confirmations to one address a day, too many new addresses, or the site's own limit on account mail (`mail.relay.accountMail`) | the server log names the limit; look for a form being abused (Turnstile on? rate limit?); a site that really sends more: Intecion raises the limits, or SMTP | diff --git a/reference/.agents/skills/iapl-setup/SKILL.md b/reference/.agents/skills/iapl-setup/SKILL.md index ba795c4..219184d 100644 --- a/reference/.agents/skills/iapl-setup/SKILL.md +++ b/reference/.agents/skills/iapl-setup/SKILL.md @@ -646,7 +646,7 @@ scaling (5). `●` routes for pages need the database at build time (PROGRAMISTA 6. **Notifications**: form messages in every language. 7. **Site integrations → E-mail sending**: "Sender name" (the client's name; empty = the site name) and **"Sender address"** (the client's address: with the mail service replies go there). SMTP fields **only** when the client asked - for its own server. On the production domain: the block "How e-mails are sent" must say "Connected to IWSN" (a site is active as soon as it enrols; "waiting for approval" is the exception — ask Intecion; the real domain enrols by itself at launch although the site was connected on its development address — nothing to press; "The data comes from another site" = the site is non-public (its host matches `developmentHosts`, built in `*.dev.netscale.pl`, or `IAPL_NOINDEX=1`) and holds a copy of another site's data: press "Connect again" only if the copy should send — on the production domain it means `IAPL_NOINDEX` was left set. A development address under `*.dev.netscale.pl` needs nothing; a staging or test copy on any other host must have its host in `iapl({ developmentHosts: […] })` (an array of host patterns: a single string, an empty entry or a lone `*` stops the start) or `IAPL_NOINDEX=1`, or it mails the real addresses in its data), then **Send test e-mail** → "through IWSN". Turnstile (for testing site + for its own server. On the production domain: the block "How e-mails are sent" must say "Connected to IWSN" ("waiting for approval": while the service runs with enrolment "pending" (from its launch until Intecion switches to open enrolment), every new site waits for approval — ask Intecion to approve the host; under open enrolment it is the exception; the real domain enrols by itself at launch although the site was connected on its development address — nothing to press; "The data comes from another site" = the site is non-public (its host matches `developmentHosts`, built in `*.dev.netscale.pl`, or `IAPL_NOINDEX=1`) and holds a copy of another site's data: press "Connect again" only if the copy should send — on the production domain it means `IAPL_NOINDEX` was left set. A development address under `*.dev.netscale.pl` needs nothing; a staging or test copy on any other host must have its host in `iapl({ developmentHosts: […] })` (an array of host patterns: a single string, an empty entry or a lone `*` stops the start) or `IAPL_NOINDEX=1`, or it mails the real addresses in its data), then **Send test e-mail** → "through IWSN". Turnstile (for testing site `1x00000000000000000000AA`, secret `1x0000000000000000000000000000000AA`; production keys from the client), analytics/pixel IDs, IndexNow → generate key. Mail/Turnstile errors show up as a dashboard alert. 8. **Forms**: check the addresses in the Emails tab of the seeded forms. diff --git a/reference/.agents/skills/iapl-upgrade/SKILL.md b/reference/.agents/skills/iapl-upgrade/SKILL.md index eee6aef..1404d0e 100644 --- a/reference/.agents/skills/iapl-upgrade/SKILL.md +++ b/reference/.agents/skills/iapl-upgrade/SKILL.md @@ -462,7 +462,7 @@ account → "Two-step verification: Set up." and the reset button; delete the ac - 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.16.8 (the value on the account makes a plugin admin or editor). **Check:** do + 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; @@ -477,7 +477,7 @@ account → "Two-step verification: Set up." and the reset button; delete the ac 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.16.8: a **copy** of a staff collection made by such a plugin (`{ ...staff, slug: 'copy' }`) + 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 @@ -509,7 +509,7 @@ account → "Two-step verification: Set up." and the reset button; delete the ac `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.16.8 (security follow-ups; CHANGELOG 1.16.8; PROGRAMISTA §6, item 71) — most sites: update, rebuild, read the start log:** +**→ 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). @@ -525,7 +525,7 @@ account → "Two-step verification: Set up." and the reset button; delete the ac 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.16.8 "Requires project + (`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/`; an admin still manages accounts; `pnpm exec iapl-doctor --url ` (`staff-own-roles`). @@ -553,7 +553,7 @@ ipal-kit"). **Do not rename anything in the project unless the owner asks.** builds; the panel opens; the old commands (`pnpm exec ipal-doctor`) still run. **→ 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, item 73; email.md; AGENT.md §7.2) — nothing to run; read which case the site is:** +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"). @@ -572,7 +572,7 @@ PROGRAMISTA §6, item 73; email.md; AGENT.md §7.2) — nothing to run; read whi 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. Nothing to arrange with Intecion: the site is active as soon as it enrols. + processing agreement names the service. Tell Intecion the host: while the service runs with enrolment "pending" (from its launch until Intecion switches to open enrolment), every new site waits for approval (the panel says "waiting for approval"); under open enrolment a site is active as soon as it enrols. **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 @@ -593,9 +593,8 @@ PROGRAMISTA §6, item 73; email.md; AGENT.md §7.2) — nothing to run; read whi 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 ` → 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 has to be live for a site -without SMTP: until Intecion says so, such a site reports `relay-unreachable` and sends nothing — keep SMTP, or -`relay: false`.** +**Send test e-mail** names the transport you expect; a form submission arrives. **The service is live at +`https://webservices.intecion.net/mail`; while the service runs with enrolment "pending" (from its launch until Intecion switches to open enrolment), every new site waits for approval — keep SMTP until it is approved, or `relay: false`.** ## 2. Inventory (no code changes) **What changed for projects** between your old and new plugin version is exactly the reference site's diff — diff --git a/reference/AGENTS.md b/reference/AGENTS.md index 53ebc54..f6595ab 100644 --- a/reference/AGENTS.md +++ b/reference/AGENTS.md @@ -47,7 +47,7 @@ Write everything in this file in English. -## IAPL 1.16.8 — agent guide +## IAPL 1.17.0 — agent guide This project is built on `@intecion/ipal-kit` (a Payload CMS 3 plugin). Before you write code: