IAPL rename: docs, agent guide, skills, reference site and starter on the new names; changelog draft

- docs, AGENT.md, the 16 skills, PROGRAMISTA and README use the preferred names (scripted, same list of forms);
  past CHANGELOG entries and the proposals in docs/dev are not rewritten
- AGENT.md: 'Names: IAPL and ipal-kit' — old name, new name, state in 1.x; what is not renamed; storageNames
- iapl-upgrade '→ 1.17.0', PROGRAMISTA §6 item 72, CHANGELOG 1.17.0 (draft): nothing required
- env.md, doctor.md (legacy-names, storage-names), stats.md, security.md, project-starter.md, iapl-reference, iapl-setup
- skill scripts read ipal-audit-skip and IPAL_IP_HEADER too; audit rule ids stay what they were
- reference site: iapl(), iapl-doctor.json, iapl-* skills, storageNames: 'iapl'; INDEX.md regenerated

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-25 17:36:09 +01:00
co-authored by Claude Fable 5.2
parent 425fac14fb
commit b91984fbcd
149 changed files with 1930 additions and 1747 deletions
+21 -21
View File
@@ -22,7 +22,7 @@ what it finds to the same review list. The browser runs in the service, never in
```ts
// payload.config.ts
ipalKit({
iapl({
// …
cookieScanner: true,
})
@@ -155,7 +155,7 @@ Category mapping (`DEFAULT_DATABASE_CATEGORIES`):
category when a cookie really is necessary, or the project changes the map:
`cookieScanner: { databaseCategories: { Functional: 'necessary' } }`.
Refresh the copy (maintainers of ipal-kit, not projects):
Refresh the copy (maintainers of IAPL, not projects):
```bash
pnpm cookie-db:refresh
@@ -201,7 +201,7 @@ const youtube: CookieDeclaration = {
setBeforeConsent: false,
}
ipalKit({ cookieScanner: { declarations: [youtube] } })
iapl({ cookieScanner: { declarations: [youtube] } })
```
A project integration that is on only when a field is filled:
@@ -216,7 +216,7 @@ const chat: CookieIntegration = {
declarations: [/* CookieDeclaration … */],
}
ipalKit({ cookieScanner: { integrations: (defaults) => [...defaults, chat] } })
iapl({ cookieScanner: { integrations: (defaults) => [...defaults, chat] } })
```
`ctx` (`CookieScanContext`) has `payload`, `integrations` (the Site integrations global, depth 0) and
@@ -297,12 +297,12 @@ Types: `CookieDeclaration`, `CookieIntegration`, `CookieScanContext`, `CookieFin
What a page really sets — a GTM tag, an iframe, a script pasted into a block — shows only in a
browser. `cookieScanner.crawl` adds **Check site** to the *Cookie review* box. One shared **scanner
service** (`services/cookie-crawler` in the ipal-kit repository, run by the team on Coolify) does the
service** (`services/cookie-crawler` in the IAPL repository, run by the team on Coolify) does the
browsing for every site:
```
editor ── Check site ──▶ site POST /api/ipal/cookie-crawl
site ── POST {IPAL_COOKIE_SCAN_URL}/crawl (Bearer token) ──▶ scanner service
site ── POST {IAPL_COOKIE_SCAN_URL}/crawl (Bearer token) ──▶ scanner service
crawls the sitemap pages twice:
1. fresh profile, no decision
2. fresh profile, clicks "Accept all"
@@ -313,7 +313,7 @@ site POST /api/ipal/cookie-crawl/results (Bearer token) ◀── cookies, stor
### Turn it on in a site
```ts
ipalKit({
iapl({
cookieScanner: { crawl: true },
})
```
@@ -322,16 +322,16 @@ ipalKit({
| Variable | Value |
|---|---|
| `IPAL_COOKIE_SCAN_URL` | the service's URL, e.g. `https://cookie-crawler.intecion.net` |
| `IPAL_COOKIE_SCAN_TOKEN` | a random token of at least 16 characters (`openssl rand -hex 32`), the same one as in the service's `IPAL_CRAWLER_SITES` entry for this site |
| `IAPL_COOKIE_SCAN_URL` | the service's URL, e.g. `https://cookie-crawler.intecion.net` |
| `IAPL_COOKIE_SCAN_TOKEN` | a random token of at least 16 characters (`openssl rand -hex 32`), the same one as in the service's `IAPL_CRAWLER_SITES` entry for this site |
| `NEXT_PUBLIC_SERVER_URL` | already set — the public origin the service crawls and calls back (or Payload `serverURL`, or `crawl.siteUrl`) |
Validate them at startup: `assertEnv(ipalEnvRules({ cookieCrawl: true }))` (required in production).
Validate them at startup: `assertEnv(iaplEnvRules({ cookieCrawl: true }))` (required in production).
2. **Import map:** `pnpm generate:importmap` (the dashboard warning `CookieCrawlAlert`).
3. **Migration (Postgres / SQLite):** `crawl` adds the `cookie-crawl` global and three fields to
`cookie-review` (`violation`, `violationDetail`, `seenBeforeConsent`):
`pnpm payload migrate:create cookie-crawl`, commit; Coolify runs `payload migrate` on deploy.
4. **Service:** add the site to the service's `IPAL_CRAWLER_SITES` (below) and redeploy the service.
4. **Service:** add the site to the service's `IAPL_CRAWLER_SITES` (below) and redeploy the service.
5. **Verify:** *Cookie review* shows "Check site" enabled (when disabled, the box names the missing env
var). Click it: the status says "Crawling…", then after one to a few minutes "Last crawl …: N pages,
N violations, N new unknown" and the list reloads. *Privacy → Cookie check* shows the latest
@@ -363,7 +363,7 @@ A Coolify **Scheduled Task** on the site's application (or any cron) starts a cr
no editor session needed:
```bash
curl -fsS -X POST -H "Authorization: Bearer $IPAL_COOKIE_SCAN_TOKEN" "$NEXT_PUBLIC_SERVER_URL/api/ipal/cookie-crawl"
curl -fsS -X POST -H "Authorization: Bearer $IAPL_COOKIE_SCAN_TOKEN" "$NEXT_PUBLIC_SERVER_URL/api/ipal/cookie-crawl"
```
Weekly is plenty (`0 6 * * 1`). New violations, unknown cookies and cookies waiting for approval then
@@ -376,8 +376,8 @@ to the cookie banner until an editor approves it.
| Key | Default | What it does |
|---|---|---|
| `serviceUrl` | env `IPAL_COOKIE_SCAN_URL` | scanner service base URL |
| `token` | env `IPAL_COOKIE_SCAN_TOKEN` | shared secret (≥ 16 characters); shorter = not configured |
| `serviceUrl` | env `IAPL_COOKIE_SCAN_URL` | scanner service base URL |
| `token` | env `IAPL_COOKIE_SCAN_TOKEN` | shared secret (≥ 16 characters); shorter = not configured |
| `siteUrl` | Payload `serverURL`, else `NEXT_PUBLIC_SERVER_URL` | public origin to crawl; the callback goes to `<siteUrl>/api/ipal/cookie-crawl/results` |
| `maxPages` | `20` (max 100) | sitemap pages besides the site URL |
| `acceptSelector` | `[data-ipal="accept"]` | the banner's "Accept all" button (the plugin's `CookieBanner` has it in every mode) |
@@ -403,10 +403,10 @@ Paths: `COOKIE_CRAWL_PATH`, `COOKIE_CRAWL_RESULTS_PATH`; env names: `COOKIE_SCAN
### Scanner service on Coolify
One service for every site the team runs. Code: `services/cookie-crawler/` in the ipal-kit repository
One service for every site the team runs. Code: `services/cookie-crawler/` in the IAPL repository
(Node + Playwright, no other dependency; not part of the npm package).
1. **Coolify → Project → New Resource → Application** from the ipal-kit Git repository.
1. **Coolify → Project → New Resource → Application** from the IAPL Git repository.
- Build pack: **Dockerfile**; base directory `services/cookie-crawler`; Dockerfile `Dockerfile`.
- Port: `3000`. Health check path: `/health` (the image also has a Docker `HEALTHCHECK`).
- Domain: e.g. `https://cookie-crawler.intecion.net` (Coolify issues the certificate).
@@ -416,7 +416,7 @@ One service for every site the team runs. Code: `services/cookie-crawler/` in th
| Variable | Default | |
|---|---|---|
| `IPAL_CRAWLER_SITES` | — (required) | `acme.pl=TOKEN1,shop.example.com=TOKEN2` — the sites it may crawl, each with its own token (≥ 16 characters; `www.` is ignored). A token only opens its own site |
| `IAPL_CRAWLER_SITES` | — (required) | `acme.pl=TOKEN1,shop.example.com=TOKEN2` — the sites it may crawl, each with its own token (≥ 16 characters; `www.` is ignored). A token only opens its own site |
| `PORT` | `3000` | |
| `CRAWLER_CONCURRENCY` | `1` | crawls at the same time |
| `CRAWLER_QUEUE_MAX` | `20` | waiting crawls; more → `429` |
@@ -425,12 +425,12 @@ One service for every site the team runs. Code: `services/cookie-crawler/` in th
| `CRAWLER_ALLOW_HTTP` | unset | `1` only for local tests; sites must be https |
3. **Deploy**, then check: `curl https://cookie-crawler.intecion.net/health` → `{"ok":true,…}`.
4. **Adding a site:** generate a token, add `host=token` to `IPAL_CRAWLER_SITES`, redeploy the service;
set the same token as the site's `IPAL_COOKIE_SCAN_TOKEN`.
4. **Adding a site:** generate a token, add `host=token` to `IAPL_CRAWLER_SITES`, redeploy the service;
set the same token as the site's `IAPL_COOKIE_SCAN_TOKEN`.
5. **Updating Playwright:** the npm version in `services/cookie-crawler/package.json` and the image tag
in its `Dockerfile` (`mcr.microsoft.com/playwright:v1.64.0-noble`) must match; change both, redeploy.
What the service refuses: a site not in `IPAL_CRAWLER_SITES`, a token that is not that site's, a
What the service refuses: a site not in `IAPL_CRAWLER_SITES`, a token that is not that site's, a
callback URL on another origin than the site, plain http. It crawls only the listed origins (no
open proxy), runs Chromium as the image's non-root user, and keeps nothing after a crawl.
@@ -455,7 +455,7 @@ open proxy), runs Chromium as the image's non-root user, and keeps nothing after
The same crawl, without the service: `cd services/cookie-crawler && npm install && npx playwright
install chromium`, then `node cli.mjs https://acme.pl --pages 10` prints the result as JSON (exit code
1 when anything but the consent cookie is stored before consent). It does not know the site's
categories — the panel's **Check site** gives the verdict. `ipal-consent-check` → cookie-scan
categories — the panel's **Check site** gives the verdict. `iapl-consent-check` → cookie-scan
(`cookie-scan.mjs`) stays the quick check for projects without the service; paste the names it reports
as unknown into **More cookie names**.