Commit Graph
22 Commits
Author SHA1 Message Date
Radosław SmolińskiandClaude Fable 5.2 38b903fcfa IAPL rename, review fixes I-1 to I-11
I-1  ipalEnvRules() keeps the IPAL_ rule names (IAPL_ as aliases); iaplEnvRules() the other way round; the IAPL_ value
     is the one checked when both are set
I-2  COOKIE_SCAN_URL_ENV / COOKIE_SCAN_TOKEN_ENV (and the internal SITE_NOINDEX_ENV) keep their old values;
     IAPL_COOKIE_SCAN_URL_ENV / IAPL_COOKIE_SCAN_TOKEN_ENV added
I-3  bin/ipal-*.mjs: five files that run the new ones (1.16's audit skill and CI call them by path); legacy:site checks it
I-4  storage-names sees <SiteProviders … stats> when a JSX prop comes first (the reference layout's shape)
I-5  AGENT.md: a text naming an ipal-<name> skill means iapl-<name> (the vendored ext-* skills)
I-6  leftover text in the skills-current message
I-7  iapl-skills removes the old pointer block when both are in AGENTS.md
I-8, I-11  changelog: the doctor's summary line, IAPL_DOCTOR_STATUS, --strict in CI until the skills are refreshed
I-9  env.md: an empty IAPL_ variable does not switch the IPAL_ one off
I-10 verifyLimit.keyPrefix undefined or empty is 'not given'

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 18:45:36 +01:00
Radosław SmolińskiandClaude Fable 5.2 03452376f9 IAPL rename: three places where the brand rule had replaced a path segment or a test's needle
scripts/starter-gate.mjs (node_modules/@intecion/ipal-kit), dev/tsconfig.json (the 'ipal-kit' path alias),
test/starter.test.ts (the lockfile must not contain 'ipal-kit'); two JSDoc import lines.
Found by pnpm starter:gate.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 18:04:26 +01:00
Radosław SmolińskiandClaude Fable 5.2 3d5106bc4a IAPL rename: readEnv exported, the MCP server name left as it was, legacy:site needs a database
- readEnv / legacyEnvName exported from the root and /env (a project's own code reads IAPL_* with the IPAL_* fallback);
  the name constants hold the IAPL_ spelling — changelog and env.md say so
- createMcpRoute: the default serverName stays 'ipal-site' (clients see it); the scripted step had changed it
- legacy:site: the builds read the database; the script and PROGRAMISTA say which

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 17:47:11 +01:00
Radosław SmolińskiandClaude Fable 5.2 926ba4a67e IAPL rename: gate checks, and two breaks they found on an unedited 1.16.7 site
- pnpm legacy:site (scripts/legacy-site-check.mjs): the reference site of v1.16.7, unedited, installed against
  this build — old commands, doctor without errors, import map unchanged, tsc, builds with webpack and Turbopack
- test/legacyNameForms.test.ts: the remaining spellings with 'ipal' as a closed list; a new one fails
- found by legacy:site and fixed: 'ipal-tokens --check' called a tokens.css written before 1.17.0 out of date
  (its header names the command); the doctor's env-example rule did not accept IPAL_* in .env.example
- the doctor's seed rules catch IPAL_SEED_ALLOW_FULL=1 as before
- PROGRAMISTA: the new release check

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 17:41:26 +01:00
Radosław SmolińskiandClaude Fable 5.2 b91984fbcd 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]>
2026-11-25 17:36:09 +01:00
Radosław SmolińskiandClaude Fable 5.2 0a4f001797 IAPL rename, scripted: preferred names in src, bin, scripts, services, tests; bin files and skill folders moved
Replaced by an explicit list of forms only (ten exported names, runtime env names, project file
names and marks, commands, skill names, the log prefix, the brand in prose). Package name, import
paths, routes, CSS tokens, data attributes, custom keys, context flags, the cookie and kv keys are
not touched. package.json keeps the five old bin names beside the five new ones.
The old names stop working in this commit and come back as aliases in the next; docs follow.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 17:24:21 +01:00
Radosław SmolińskiandClaude Fable 5.2 c9540d291a Copied staff collections: access guide, API table, changelog, reference index
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 03:48:21 +01:00
Radosław SmolińskiandClaude Fable 5.2 ccc6f85924 Security follow-ups to 1.16.7: changelog, access guide, skills, API table, release gate, reference index
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 02:59:44 +01:00
Radosław SmolińskiandClaude Fable 5.2 01219b69d3 F-3: pnpm e2e:built puts the reference site's generated files back, also on failure
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 02:53:41 +01:00
Radosław SmolińskiandClaude Fable 5.2 e77c607bca R4-3: pnpm e2e:built (webpack and Turbopack); Playwright runs reset the test admins first
The command builds the reference site with both bundlers, checks the public files for a package manifest and runs
the late-staff spec and the published-files check against each built site. A global setup resets the test admins
and their stored 2FA attempt counts before every run, so a spec no longer depends on what ran before it.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 02:53:41 +01:00
Radosław SmolińskiandClaude Fable 5.2 9a648b0498 The plugin's version is a constant: no package.json among a site's public assets
pluginVersion() named package.json relative to its own module. A bundler takes such a file for an asset:
a Turbopack build of a site copied the plugin's whole package.json (dependency lists, scripts, the registry
and repository addresses; no secret) to /_next/static/media/package.<hash>.json, served to anyone. Webpack kept
it on the server side. The version now comes from src/version.ts (scripts/write-version.mjs, run by the
`version` script; a test fails when it differs from package.json). A smoke test of the built site: nothing
under .next/static is a package manifest.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 02:53:41 +01:00
Radosław SmolińskiandClaude Fable 5.2 8a01c72c2a M1 review round 3: a built-site e2e for a late staff collection (both bundlers); docs follow
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 00:39:24 +01:00
Radosław SmolińskiandClaude Fable 5.2 81cee02e78 M1: the reference e2e suite follows the stored 2FA verify count
The verify count now survives a restart of the site, so the specs can no longer
share one test admin across server runs: create-test-admin.ts makes two test
admins and clears their stored counts; the setup spec signs in as the second.
The whole suite passes in one run (20 passed, 1 skipped).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 00:39:23 +01:00
Radosław SmolińskiandClaude Fable 5.2 2aaaaa115a 2FA setup required: an account without TOTP reaches only setup, within a 72 h window
twoFactor.requireSetup (on by default with 2FA): an account of the 2FA
collection that has not set TOTP up is refused by ipal-kit's second-factor
check on every collection, global and plugin endpoint; the setup screen and
/api/setup-totp are all it reaches. It has 72 hours from its creation or
from an admin's reset (field totpSetupFrom, stamped by a hook); after that
setup is refused too until an admin reopens it.

Accounts that existed before get their window at the first start after the
upgrade (backfill in onInit), so nobody is blocked when a site upgrades.

Admin side: status and reset / 'Reopen setup' button on the account page
(TwoFactorStatusField), POST /api/ipal/two-factor/reset, a dashboard notice
(TwoFactorAlert), a notice on the setup screen; texts in English and Polish.
ipal-doctor reports blocked accounts and a switched-off mode.

Overridable: requireSetup false, windowHours (false / 0 = none), exempt for
a service account, resetAccess; the per-entity second-factor opt-out applies.
API keys, seeds, bearer-token routes and sites with twoFactor false are not
affected.

HTTP tests (REST, GraphQL, first admin on an empty database) run on SQLite,
Postgres and MongoDB; a browser test on the reference site covers the first
admin, a new editor and the admin's reset. Docs, guide, skills, changelog.

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

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

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

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 15:29:06 +01:00
Radosław SmolińskiandClaude Fable 5.2 ea43d94dd2 Reference index: describe the mail sink
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-13 16:43:41 +01:00
Radosław SmolińskiandClaude Opus 5.5 7e1f09c95a starter:gate: the production full-seed check needs the guard's message; an early exit is retried
payload run can end with exit 0 and no output before Payload initializes (its bin does `void start()`;
when the script's top-level await is left without live handles, Node exits). Such a run proved nothing
but passed or failed the `refused !== 0` check at random. Now only "full seed refused" with a non-zero
exit counts; a run without "[ipal] Plugin initialized" is inconclusive and retried up to 3 times; all
three inconclusive fails the gate with that reason.

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

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

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

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

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:17:11 +01:00
Radosław SmolińskiandClaude Opus 5.5 e1f82ce387 ipal-skills --external: vendored third-party agent skills, pinned
- docs/agent/external: Vercel react-best-practices and composition-patterns
  (MIT), Addy Osmani accessibility (MIT), Anthropic frontend-design
  (Apache-2.0), official Payload skill at v3.92.1 (MIT) — text only, each
  with its licence, SOURCE.md (repo, commit) and an override note in front
  of the SKILL.md (ipal-kit first, Payload fetching over swr, DESIGN.md
  tokens, Payload 3 not 4); manifest.json with sha256 per file
- scripts/vendor-external-skills.mjs (maintainer, not shipped): fetches by
  full commit SHA only, rejects non-text or executable files, regenerates
  the manifest; --check verifies it
- ipal-skills --external [names]: copies ext-* after checking every file
  against the manifest, downloads nothing, never touches ext-* folders
  without ipal-kit's SOURCE.md, removes only retired ones it installed;
  an unknown name stops the run before anything is copied
- AGENT.md §14, ipal-setup stage 2 (optional step), README: usage,
  overrides, how to update the pins
- test/externalSkills.test.ts: pins are SHAs, no branch fetch, checksums,
  text only, licences, override note, installer leaves other folders alone

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 11:54:35 +01:00
Radosław SmolińskiandClaude Opus 5.5 ab45cf48be Bundle the Open Cookie Database (Apache-2.0) with a refresh script
scripts/refresh-cookie-database.mjs (pnpm cookie-db:refresh) downloads the CSV
and license at a pinned commit, refuses a non-Apache license, and writes
src/modules/consent/scanner/data/openCookieDatabase.ts (source commit and
change notice in the header) plus docs/licenses/open-cookie-database-LICENSE.txt.
Nothing is fetched at runtime.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:55:19 +01:00