create-ailk 0.40.2 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/env-catalog.js +1 -1
- package/dist/module-architecture.js +14 -48
- package/dist/routes.d.ts +8 -2
- package/dist/routes.js +189 -15
- package/dist/surfaces.d.ts +2 -2
- package/dist/surfaces.js +49 -21
- package/dist/topology.js +0 -1
- package/dist/update.d.ts +16 -1
- package/dist/update.js +250 -6
- package/package.json +3 -3
- package/templates/apps/api/.env.example +2 -1
- package/templates/apps/web/.env.example +5 -6
- package/templates/apps/web/CLAUDE.md +29 -7
- package/templates/apps/web/account.config.tsx +3 -2
- package/templates/apps/web/app/llms.txt/__tests__/site-listing.test.ts +9 -1
- package/templates/apps/web/lib/__tests__/deck-page.test.ts +17 -0
- package/templates/apps/web/lib/__tests__/magnet-routes.test.ts +1 -0
- package/templates/apps/web/lib/__tests__/page-chrome.test.ts +18 -0
- package/templates/apps/web/lib/__tests__/structured-data.test.tsx +22 -7
- package/templates/apps/web/lib/deck-page.ts +20 -1
- package/templates/apps/web/lib/page-chrome.ts +3 -0
- package/templates/apps/web/lib/site-identity.ts +15 -1
- package/templates/apps/web/messages/en.json +0 -9
- package/versions.json +50 -50
- package/templates/apps/web/lib/deliverable-grant.ts +0 -18
|
@@ -68,7 +68,7 @@ Don't ship a page after one render. The expected per-page loop:
|
|
|
68
68
|
|
|
69
69
|
## Where the base pages live
|
|
70
70
|
|
|
71
|
-
**The base website's pages ship in `@working-theory/site-pages` (#11259, ADR 0040 phase 4).** The home page and the 62 pages under the 38 base directories (`[slug]`, `about`, … `working-agreement`, `(authed)/leads`) — with the actions, loaders and libs only they read (`hub-children`, `route-family`, `service-listing`, `template-listing`, `meet-placeholder`, `posting-title`, `lead-write`) and their tests — live in `packages/site-pages/src/{pages,lib}/`, at the paths they had here. This app's `app/[locale]/` holds only the 63 route files `create-ailk routes --write` generates from the package's `routes.json` — never hand-edited, pinned by `routes --check` — plus the module
|
|
71
|
+
**The base website's pages ship in `@working-theory/site-pages` (#11259, ADR 0040 phase 4).** The home page and the 62 pages under the 38 base directories (`[slug]`, `about`, … `working-agreement`, `(authed)/leads`) — with the actions, loaders and libs only they read (`hub-children`, `route-family`, `service-listing`, `template-listing`, `meet-placeholder`, `posting-title`, `lead-write`) and their tests — live in `packages/site-pages/src/{pages,lib}/`, at the paths they had here. This app's `app/[locale]/` holds only the 63 route files `create-ailk routes --write` generates from the package's `routes.json` — never hand-edited, pinned by `routes --check` — plus the module routes under those directories (`careers/apply` and `careers/[slug]/apply`, generated from `@working-theory/ui-signal-collectors` since #11657; `projects/apply`) and `contact/error.tsx`. The package reads the site through one typed file, `site-pages.config.tsx`, whose `site` export answers the `@working-theory/site-pages/site` seam (`next.config.mjs` and `jest.config.cjs` alias it); no page takes a customization option. The ten namespaces those pages read ship in the package (`sitePagesMessages`), merged under this app's catalog by `i18n/request.ts`; a key in `messages/en.json` is an override. `lib/site-contact-email.ts` and `lib/site-contact-lines.ts` (the `_site.mdx` readers the layout and the module pages share) stay the site's. The sections below name the pages by their old `app/[locale]/` place.
|
|
72
72
|
|
|
73
73
|
## The `(auth)` route group — which predicate an affordance keys on
|
|
74
74
|
|
|
@@ -500,6 +500,20 @@ Cal.com edit and the page.
|
|
|
500
500
|
|
|
501
501
|
## Magnet pages
|
|
502
502
|
|
|
503
|
+
**Where they live (#11657, ADR 0040).** The flows pages (#11251) and the
|
|
504
|
+
magnet pages — the reports hub, the report reader, its walk, its file proxy
|
|
505
|
+
and the deliverable renderer, the trial pair and the two careers walks — ship
|
|
506
|
+
in `@working-theory/ui-signal-collectors`
|
|
507
|
+
(`packages-paid/ui-signal-collectors/src/pages/{flows,reports,trial,careers}/`),
|
|
508
|
+
with their tests. This app's `app/[locale]/flows/`, `reports/`, `trial/`,
|
|
509
|
+
`careers/apply/` and `careers/[slug]/apply/` hold only the fourteen route
|
|
510
|
+
files `create-ailk routes --write` generates from the package's
|
|
511
|
+
`routes.json` — each `// oss: false`, never hand-edited, pinned by
|
|
512
|
+
`routes --check`. The two careers walks sit under site-pages' `careers`
|
|
513
|
+
prefix, which leaves them to the site (`siteOwned`); the package's manifest
|
|
514
|
+
`adopts` them. The `reports` strings ship in the package (`flowsMessages`).
|
|
515
|
+
The sections below name the pages by their old `app/[locale]/` place.
|
|
516
|
+
|
|
503
517
|
Every multi-step magnet is a page pair (#8840), rendered by one module,
|
|
504
518
|
`app/[locale]/flows/[slug]/magnet-page.tsx`:
|
|
505
519
|
|
|
@@ -534,7 +548,7 @@ Every multi-step magnet is a page pair (#8840), rendered by one module,
|
|
|
534
548
|
(the magnet's `landing.cta`, "Request a free trial") goes to
|
|
535
549
|
`/trial/request` rather than `/trial/start`, and the walk passes a
|
|
536
550
|
`title`, so an absent flow renders the contact email under its own `<h1>`,
|
|
537
|
-
as `/careers/apply` does. Both
|
|
551
|
+
as `/careers/apply` does. Both ship in the package (above).
|
|
538
552
|
Any other pair is written by `create-ailk add-route magnet --path <path>
|
|
539
553
|
--flow <slug>`: two short pages carrying the `Standard magnet page
|
|
540
554
|
(#8840)` marker, which `lib/__tests__/structured-data.test.tsx` exempts
|
|
@@ -577,7 +591,11 @@ Every multi-step magnet is a page pair (#8840), rendered by one module,
|
|
|
577
591
|
`NEXT_PUBLIC_API_URL`) is set —
|
|
578
592
|
reads `not-configured` (set once in `readMagnet`), and the slug 404s, as
|
|
579
593
|
does its `/start` (#9219). `/downloads` and `/downloads/<slug>` are
|
|
580
|
-
permanent redirects into `/reports`
|
|
594
|
+
permanent redirects into `/reports` and `/reports/<slug>`, declared as
|
|
595
|
+
`legacyRoutes` on the routes map's `/reports` rows — the slug held to
|
|
596
|
+
lowercase letters, digits and hyphens — and emitted by `next.config.mjs`'s
|
|
597
|
+
`legacyRedirects()`, each with a locale-prefixed twin (#11657); no page file
|
|
598
|
+
serves them.
|
|
581
599
|
|
|
582
600
|
## Pricing page
|
|
583
601
|
|
|
@@ -723,14 +741,14 @@ A visitor's browser never calls the hub. Lead capture, newsletter signup, callba
|
|
|
723
741
|
- **No cross-site POST.** A `Sec-Fetch-Site` other than `same-origin`, or an `Origin` not on this site's own host, is refused 403 before the hub is called.
|
|
724
742
|
- **Headers are an allow-list.** The visitor's `x-forwarded-for` (else `x-real-ip`) and `user-agent` pass through so per-visitor rate limits still count each visitor; no `authorization`, client-sent `x-ailk-*` or `host` is forwarded, and a `cookie` goes only on `POST /v1/commerce/invoices`, the one session route — and there only one of the two Better Auth session cookies the hub reads (`__Secure-better-auth.session_token` first, else `better-auth.session_token`), never a spoke's sealed `__Host-ailk-hub-session` or any other cookie (#8066).
|
|
725
743
|
- **The relay has its own per-visitor budget (#7707).** Each visitor gets 8 calls per 10 minutes across the five visitor routes, and the session route (`POST /v1/commerce/invoices`, a hub only) gets its own, wider budget of 30 per 10 minutes; the call that exceeds either gets `429 rate_limited` before any hub call. The budget is held in this instance's own process (no shared store, no env variable) and holds only where the site's edge overwrites `x-forwarded-for` and `x-real-ip` — Vercel does; a bare self-hosted Next server does not.
|
|
726
|
-
- **A bot check on the public writes (#9889, #9255).** On Vercel, `lib/bot-check.ts`'s `runBotCheck` asks Vercel BotID for a verdict before the hub is called — in the relay for `POST /v1/leads/{submit,subscribe,callback}` and `POST /v1/schedule/book` (`BOT_CHECKED_ROUTES`: `403 bot_detected`, or `503 bot_check_unavailable` when the check throws, answers no boolean or takes over 5 seconds), and in the contact, careers, newsletter, flow-step, flow-checkout
|
|
744
|
+
- **A bot check on the public writes (#9889, #9255).** On Vercel, `lib/bot-check.ts`'s `runBotCheck` asks Vercel BotID for a verdict before the hub is called — in the relay for `POST /v1/leads/{submit,subscribe,callback}` and `POST /v1/schedule/book` (`BOT_CHECKED_ROUTES`: `403 bot_detected`, or `503 bot_check_unavailable` when the check throws, answers no boolean or takes over 5 seconds), and in the contact, careers, newsletter, flow-step, flow-checkout and saved-recommendation Server Actions immediately before their hub call, which answer their own existing failure variant. The locale layout's `BotIdClient` protects every same-origin POST (`BOT_CLIENT_PROTECT`, `/*`), because a Server Action posts to the page it was submitted from; `next.config.mjs` wraps `withBotId` and `middleware.ts` keeps BotID's proxy prefix out of its matcher. It is on by default and inert off Vercel: `AILK_BOT_CHECK=off` turns every check off, `AILK_BOOKING_BOT_CHECK=off` the booking's alone, and MCP tools never pass through a site, so they are never challenged. A refusal logs `[<source>] bot refused` with BotID's `classificationReason`, `bypassed` and `isVerifiedBot`, the request's `host` and `forwardedHost`, and `proxied` (a `cf-ray` header) — no other header value, no form field (#10715). `AILK_BOT_CHECK=observe` runs the check and logs the same facts plus `isBot` as `observed`, but passes every write — for diagnosis only. **A BotID-protected site must be reached directly — Cloudflare DNS-only, no reverse proxy in front of Vercel (#10715).** Behind a proxy the write reaches Vercel from the proxy's egress rather than the browser that solved the challenge, so BotID refuses every real visitor; the first proxied request per process logs `[<source>] reverse proxy detected` (outcome `proxied`) naming that fix.
|
|
727
745
|
- `/v1` is exempt from next-intl's locale rewrite in `middleware.ts`, as `/api` is.
|
|
728
746
|
|
|
729
747
|
## Where the docs live (`docsPath`)
|
|
730
748
|
|
|
731
749
|
A site serves its docs at `/docs` unless `content/_site.mdx` sets a top-level `docsPath` (one to four lowercase kebab segments, leading slash, no trailing slash — e.g. `docsPath: /working-theory/docs`, #10041). The route never moves: it stays at `app/[locale]/docs/`, and every surface reads the one value through `lib/docs-path.ts` (`DOCS_PATH`, `toPublicDocsHref`).
|
|
732
750
|
|
|
733
|
-
- **Where the pages live (#11254, ADR 0040).** The `/docs` and `/blog` catch-alls ship in `@working-theory/ui-docs-blog` (`packages-paid/ui-docs-blog/src/pages/`), with their loaders — the runtime source and the two blog route adapters — and their tests. This app's `app/[locale]/docs/` and `app/[locale]/blog/` hold only the
|
|
751
|
+
- **Where the pages live (#11254, ADR 0040).** The `/docs` and `/blog` catch-alls ship in `@working-theory/ui-docs-blog` (`packages-paid/ui-docs-blog/src/pages/`), with their loaders — the runtime source and the two blog route adapters — and their tests. This app's `app/[locale]/docs/` and `app/[locale]/blog/` hold only the three route files `create-ailk routes --write` generates from the package's `routes.json` — the docs catch-all, the blog catch-all and the blog category index `blog/category/[tag]` (#11658) — each `// oss: false`, never hand-edited, pinned by `routes --check`. The site keeps what is built from its own content — `source.config.ts`, `lib/source.ts` (which hands the package's runtime source `DOCS_PATH`) and the codegen stub — and passes it in through one typed file, `docs-blog.config.tsx` (`defineDocsBlogConfig({ site })`: the two source resolvers, `DOCS_PATH`, `toPublicDocsHref` and `getOgImageUrl` — the host seam, no extension point), which every generated file passes to the page and to `generateMetadata` as `config`. The `docs` and `blog` strings ship in the package (`docsBlogMessages`), merged under this app's catalog by `i18n/request.ts` through `loadUiDocsBlog()`; a key in `messages/en.json` is an override.
|
|
734
752
|
|
|
735
753
|
- **Build.** `next.config.mjs` reads `docsPath`, bakes it into `NEXT_PUBLIC_AILK_DOCS_PATH`, and fails the build naming the value when it breaks the pattern, starts with `api`, `og`, `v1` or an enabled locale, sits under `/docs`, shadows a `ROUTES` page (a `:param` segment matches any segment, so `/products/docs` is refused) or sits under a catch-all (`/blog/...`), or when this site's `lib/source.ts` does not set `baseUrl: DOCS_PATH` — a site with no docs-blog module, or one whose docs-blog files predate the setting. Links inside a doc's body are re-pointed only on a site that sets `docsPath`; there they render through `Link`, which forwards a fixed prop set, so a body anchor's `title` / `target` / `rel` are not kept.
|
|
736
754
|
- **Request.** `middleware.ts` hands next-intl the internal `/docs/...` path for a request at or under `docsPath` (bare or locale-prefixed), so the browser keeps the public URL, and maps a redirect's `Location` and each hreflang `Link` entry back onto it. `/docs` and `/docs/...` answer with the site's 404 — rewritten to `/_ailk-docs-unmounted`, whose first segment is no locale, so the locale layout calls `notFound()`.
|
|
@@ -753,7 +771,7 @@ A site serves its services at `/services` unless `content/_site.mdx` sets `servi
|
|
|
753
771
|
A list page whose frontmatter sets `navOnly: true` (valid on a registry list type only, #10200) has no page of its own: `honourNavOnly` (`lib/hub-children.tsx`) answers `permanentRedirect` (308) to the first child in the route's own child order (a hub's is slug order after `includeChild`, not the order of links its authored sections carry), at the card's public path with the locale prefix kept, and `notFound()` when it lists none. Only an exact `true` acts; anything else renders as before.
|
|
754
772
|
|
|
755
773
|
- **Where.** The thirteen hubs inside `hubPageInput` (slug order after `includeChild`; `/services` at `servicePublicPath`), `/alternatives` (`/vs/<slug>`, slug-read order), `/templates`, `/careers` (newest first) and `/reports` (newest first) with one call each, and the childless `/faq`, `/glossary`, `/clients`, `/testimonials` and the `[slug]` `BlogList` teaser, which 404.
|
|
756
|
-
- **Not honoured.** The docs-blog module's Fumadocs `/blog` and `/docs`; `DownloadsList` (`/downloads`
|
|
774
|
+
- **Not honoured.** The docs-blog module's Fumadocs `/blog` and `/docs`; `DownloadsList` (`/downloads` is a routes-map redirect to `/reports`); `LocationsList` (no route). `/sitemap.xml` and `/llms.txt` still list a Nav-only list's URL.
|
|
757
775
|
- **The nav is untouched.** `lib/nav-config.ts` is generated from route surfaces, not from list pages, so the heading and its children stay in the menu.
|
|
758
776
|
|
|
759
777
|
## The owner's discovery switch
|
|
@@ -790,7 +808,11 @@ A list page whose frontmatter sets `navOnly: true` (valid on a registry list typ
|
|
|
790
808
|
- Don't reach into `apps/api` or `apps/mcp` from `apps/web`. They're peer apps — talk via HTTP/MCP.
|
|
791
809
|
- Don't commit images to `screenshots/` — only the `.gitkeep` is tracked.
|
|
792
810
|
|
|
793
|
-
Last updated: 2026-11-
|
|
811
|
+
Last updated: 2026-11-13 — § Magnet pages: the magnet pages ship in `@working-theory/ui-signal-collectors` beside the flows pages, the careers walks adopted from site-pages' prefix, the `reports` strings in the package, and `/downloads` a routes-map redirect; `/dev/purchase` and its Server Action are retired (#11657) — verified against `packages-paid/ui-signal-collectors/{routes.json,src/pages/}`, `app/[locale]/{reports,trial,careers/apply,careers/[slug]/apply}/`, `packages/templates/src/routes-map.ts` and `next.config.mjs`.
|
|
812
|
+
|
|
813
|
+
Prior: 2026-11-13 — § Where the docs live: the blog category index `/blog/category/[tag]` ships as its own route in `@working-theory/ui-docs-blog`, so `app/[locale]/blog/` holds two generated route files (#11658) — verified against `packages-paid/ui-docs-blog/routes.json` and `app/[locale]/blog/`.
|
|
814
|
+
|
|
815
|
+
Prior: 2026-11-12 — § The `(auth)` route group: the purchase spend answers this spoke's code, never the hub's verify URL, and the hub's Google provider refuses a raw ID token (#11109) — verified against `packages/auth/src/api/{auth/hub/purchase,hub-session/open}/route.ts` and `auth.ts`.
|
|
794
816
|
|
|
795
817
|
Prior: 2026-11-12 — § The MCP authorization server: a refresh racing a revoke is refused, the forced prompt is what makes a revoked client ask again, `/change-password` signs other devices out, the register limit applies without a trusted proxy, and the sweep runs after an accepted consent (#10459) — verified against `lib/mcp-oauth.ts` and `auth.ts`.
|
|
796
818
|
|
|
@@ -36,7 +36,7 @@ import { consentVisitorHeader, readConsentVisitor } from "./lib/consent-visitor"
|
|
|
36
36
|
import { formatMinorUnits, offeringsCheckoutHref } from "./lib/offerings-pricing";
|
|
37
37
|
import { readShownOfferings } from "./lib/pricing-page";
|
|
38
38
|
import { forwardedCookieInit } from "./lib/server-api";
|
|
39
|
-
import {
|
|
39
|
+
import { resolveSiteBrand } from "./lib/site-brand";
|
|
40
40
|
import { siteBillingSections } from "./lib/site-contributions";
|
|
41
41
|
import { siteLogo } from "./lib/site-logo";
|
|
42
42
|
import {
|
|
@@ -77,7 +77,8 @@ export const site = {
|
|
|
77
77
|
get signOutEndpoint() {
|
|
78
78
|
return SIGN_OUT_ENDPOINT;
|
|
79
79
|
},
|
|
80
|
-
|
|
80
|
+
// The hub identity's name when it holds one, else the file's (#11644).
|
|
81
|
+
siteName: async () => (await resolveSiteBrand()).siteName,
|
|
81
82
|
siteLogo,
|
|
82
83
|
readSession,
|
|
83
84
|
readOwnAccounts,
|
|
@@ -131,11 +131,19 @@ describe.each(ROUTES)("GET /llms.txt (%s) — the site listing (#10940)", (path)
|
|
|
131
131
|
it("AC-3: the default listing is the empty one — today's convention listing", async () => {
|
|
132
132
|
const byDefault = await llms(path, PUBLIC_ROWS);
|
|
133
133
|
expect(byDefault).toBe(await llms(path, PUBLIC_ROWS, {}));
|
|
134
|
-
for (const p of ["/projects-apply", "/meet/meet-discovery"
|
|
134
|
+
for (const p of ["/projects-apply", "/meet/meet-discovery"]) {
|
|
135
135
|
expect(byDefault).toContain(`URL: ${BASE}${p}`);
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
138
|
|
|
139
|
+
it("AC-3: never lists a private page, under either path (#11659 D3)", async () => {
|
|
140
|
+
for (const listing of [undefined, {}, LISTING]) {
|
|
141
|
+
const text = await llms(path, PUBLIC_ROWS, listing);
|
|
142
|
+
expect(text).not.toContain(`${BASE}/private-convo`);
|
|
143
|
+
expect(text).not.toContain(`${BASE}/private/convo`);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
139
147
|
it("AC-3: never lists a ThankYouPage, even with an empty listing", async () => {
|
|
140
148
|
const text = await llms(path, { ...PUBLIC_ROWS, ...THANKS }, {});
|
|
141
149
|
expect(text).not.toContain("/thanks/projects-approved");
|
|
@@ -92,6 +92,23 @@ describe("deckCandidates (#8687 D3, AC-2)", () => {
|
|
|
92
92
|
);
|
|
93
93
|
});
|
|
94
94
|
|
|
95
|
+
describe("deckCandidates — private pages (#11659)", () => {
|
|
96
|
+
const LOCALES = ["en", "es"];
|
|
97
|
+
|
|
98
|
+
it("/private/<s> resolves the LandingPage private-<s>", () => {
|
|
99
|
+
expect(deckCandidates("/en/private/convo", LOCALES)).toEqual([
|
|
100
|
+
{ type: "LandingPage", slug: "private-convo" },
|
|
101
|
+
]);
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it("a one-segment /private-<s> stays on the [slug] fallback", () => {
|
|
105
|
+
expect(deckCandidates("/private-convo", LOCALES)).toEqual([
|
|
106
|
+
{ type: "LandingPage", slug: "private-convo" },
|
|
107
|
+
{ type: "BlogList", slug: "private-convo" },
|
|
108
|
+
]);
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
95
112
|
describe("DECK_ROUTES parity (#8687 D3)", () => {
|
|
96
113
|
it("contains every routes-map row with seed content whose page.tsx renders sections, minus /", () => {
|
|
97
114
|
// DECK_ROUTES is a fixed superset, not a per-scaffold exact set: a shape
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
import { ROUTES } from "@working-theory/templates/routes";
|
|
19
19
|
|
|
20
20
|
import {
|
|
21
|
+
chromePageCandidates,
|
|
21
22
|
readClosingFooterSettings,
|
|
22
23
|
readSiteChromeSettings,
|
|
23
24
|
resolveChromePage,
|
|
@@ -503,3 +504,20 @@ describe("services base and categories (#10043 AC-7)", () => {
|
|
|
503
504
|
});
|
|
504
505
|
});
|
|
505
506
|
});
|
|
507
|
+
|
|
508
|
+
describe("private pages (#11659)", () => {
|
|
509
|
+
const locales = ["en", "es"];
|
|
510
|
+
|
|
511
|
+
it("names the LandingPage private-<s> as the chrome page of /private/<s>", () => {
|
|
512
|
+
expect(chromePageCandidates("/en/private/convo", locales)).toEqual([
|
|
513
|
+
{ type: "LandingPage", slug: "private-convo" },
|
|
514
|
+
]);
|
|
515
|
+
});
|
|
516
|
+
|
|
517
|
+
it("keeps a one-segment /private-<s> on the [slug] fallback", () => {
|
|
518
|
+
expect(chromePageCandidates("/private-convo", locales)).toEqual([
|
|
519
|
+
{ type: "LandingPage", slug: "private-convo" },
|
|
520
|
+
{ type: "BlogList", slug: "private-convo" },
|
|
521
|
+
]);
|
|
522
|
+
});
|
|
523
|
+
});
|
|
@@ -462,6 +462,8 @@ const GENERATED_CHECKOUT_ROUTE = "// Generated by create-ailk routes from @worki
|
|
|
462
462
|
// harness can read, and its landing's JSON-LD comes from the hub's record, so
|
|
463
463
|
// a page carrying both is exempt at ANY route: `create-ailk add-route magnet`
|
|
464
464
|
// writes a pair at a path the site picks. Keyed on the file, as #8513 is.
|
|
465
|
+
// #11657 — the generated re-export of a signal-collectors magnet page.
|
|
466
|
+
const GENERATED_SIGNAL_COLLECTORS_ROUTE = "// Generated by create-ailk routes from @working-theory/ui-signal-collectors";
|
|
465
467
|
const MAGNET_PAGE_MARKER = "Standard magnet page (#8840)";
|
|
466
468
|
const MAGNET_RENDERER_IMPORT = "flows/[slug]/magnet-page";
|
|
467
469
|
const MAGNET_PAGE_REASON =
|
|
@@ -540,17 +542,20 @@ const NO_STRUCTURED_DATA_ROUTES: ReadonlyArray<{
|
|
|
540
542
|
subtree: true,
|
|
541
543
|
},
|
|
542
544
|
{ route: "private", reason: "private booking index, API-backed and noindex (#8843 D8)" },
|
|
545
|
+
// #11657 — the magnet pages ship in `@working-theory/ui-signal-collectors`;
|
|
546
|
+
// each site file is its generated re-export (keyed on the header, so a
|
|
547
|
+
// site's own replacement is checked like any page). The moved suites cover
|
|
548
|
+
// the reader's and the hub's JSON-LD; the walks are magnet pages.
|
|
549
|
+
...["reports", "trial", "careers/apply", "careers/[slug]/apply"].map((route) => ({
|
|
550
|
+
route,
|
|
551
|
+
reason: "magnet pages ship in @working-theory/ui-signal-collectors (#11657); its suites check the JSON-LD",
|
|
552
|
+
subtree: true as const,
|
|
553
|
+
requires: [GENERATED_SIGNAL_COLLECTORS_ROUTE],
|
|
554
|
+
})),
|
|
543
555
|
{
|
|
544
556
|
route: "unsubscribe",
|
|
545
557
|
reason: "app-shaped landing, API-backed; no content page behind it",
|
|
546
558
|
},
|
|
547
|
-
// #8848 D12 — `/downloads` and `/downloads/<slug>` are permanent redirects
|
|
548
|
-
// into `/reports`; a redirect renders no page.
|
|
549
|
-
{
|
|
550
|
-
route: "downloads",
|
|
551
|
-
reason: "permanent redirect into /reports (#8848 D12); renders no page",
|
|
552
|
-
subtree: true,
|
|
553
|
-
},
|
|
554
559
|
// #6084 — both purchase return pages read a Checkout Session (or read
|
|
555
560
|
// nothing, for cancel) and render via SectionRenderer directly; neither
|
|
556
561
|
// is a content-adapter page, and the paid render's own schema.org node
|
|
@@ -767,6 +772,16 @@ describe("structured data — every route emits a valid JSON-LD script", () => {
|
|
|
767
772
|
console.info(`structured-data: ${label} not checked — no marketing module, / redirects to /account (#10040)`);
|
|
768
773
|
return;
|
|
769
774
|
}
|
|
775
|
+
// #11659 D5 — a private page renders through renderPage, which emits no
|
|
776
|
+
// JSON-LD for it by design (noindex, nofollow, unlisted), so it is
|
|
777
|
+
// skipped here rather than listed in NO_STRUCTURED_DATA_ROUTES (which
|
|
778
|
+
// refuses a renderPage route). page-renderer's renderPage-private suite
|
|
779
|
+
// pins the absent script.
|
|
780
|
+
if (route === "private/[slug]") {
|
|
781
|
+
expect(routeIdentity(src)?.type).toBe("LandingPage");
|
|
782
|
+
console.info(`structured-data: ${label} not checked — a private page emits no JSON-LD by design (#11659 D5)`);
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
770
785
|
const exempt = exemption(route, src);
|
|
771
786
|
// #10552 (merged in #10586) put a program-Event renderPage ahead of the
|
|
772
787
|
// meet hub's BookCall one in `[slug]/[detail]`. The params this check
|
|
@@ -14,7 +14,11 @@ import {
|
|
|
14
14
|
type DeckPageInputs,
|
|
15
15
|
type SchemaOrgType,
|
|
16
16
|
} from "@working-theory/page-renderer";
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
PRIVATE_PAGE_SLUG_PREFIX,
|
|
19
|
+
ROUTES,
|
|
20
|
+
type RouteRow,
|
|
21
|
+
} from "@working-theory/templates/routes";
|
|
18
22
|
import { readLocales } from "@working-theory/web-i18n";
|
|
19
23
|
import { headers } from "next/headers";
|
|
20
24
|
import { cache } from "react";
|
|
@@ -102,6 +106,19 @@ export function isAlwaysScaffolded(path: string): boolean {
|
|
|
102
106
|
return row !== undefined && row.gateable !== true && row.module === "marketing";
|
|
103
107
|
}
|
|
104
108
|
|
|
109
|
+
/**
|
|
110
|
+
* The private page `/private/<s>` serves — the LandingPage `private-<s>`
|
|
111
|
+
* (#11659 D2) — else `null`. Its routes-map row names no content directory,
|
|
112
|
+
* so the row walks never reach it.
|
|
113
|
+
*/
|
|
114
|
+
export function privatePageCandidate(
|
|
115
|
+
pathSegments: readonly string[],
|
|
116
|
+
): { type: SchemaOrgType; slug: string } | null {
|
|
117
|
+
const slug = pathSegments[1];
|
|
118
|
+
if (!matchesRoute("/private/:slug", pathSegments) || slug === undefined) return null;
|
|
119
|
+
return { type: "LandingPage", slug: `${PRIVATE_PAGE_SLUG_PREFIX}${slug}` };
|
|
120
|
+
}
|
|
121
|
+
|
|
105
122
|
/**
|
|
106
123
|
* The content pages that could serve `pathname`, in the order Next.js tries
|
|
107
124
|
* them (D3). `/` gives none — the home's deck is its own `layout.home` knob,
|
|
@@ -114,6 +131,8 @@ export function deckCandidates(
|
|
|
114
131
|
const path = normalizeRoutePath(pathname, locales);
|
|
115
132
|
if (path === "/") return [];
|
|
116
133
|
const segments = routeSegments(path);
|
|
134
|
+
const privatePage = privatePageCandidate(segments);
|
|
135
|
+
if (privatePage) return [privatePage];
|
|
117
136
|
const candidates: Array<{ type: SchemaOrgType; slug: string }> = [];
|
|
118
137
|
|
|
119
138
|
for (const routeDef of DECK_ROUTES) {
|
|
@@ -47,6 +47,7 @@ import { normalizeRoutePath } from "./closing-footer-path";
|
|
|
47
47
|
import {
|
|
48
48
|
isAlwaysScaffolded,
|
|
49
49
|
matchesRoute,
|
|
50
|
+
privatePageCandidate,
|
|
50
51
|
resolveTypeAndSlug,
|
|
51
52
|
} from "./deck-page";
|
|
52
53
|
import { toInternalDocsPath } from "./docs-path";
|
|
@@ -285,6 +286,8 @@ export function chromePageCandidates(
|
|
|
285
286
|
if (segments.length === 3 && segments[0] === SERVICES_ROUTE.slice(1)) {
|
|
286
287
|
return [{ type: "Service", slug: segments[2]! }];
|
|
287
288
|
}
|
|
289
|
+
const privatePage = privatePageCandidate(segments);
|
|
290
|
+
if (privatePage) return [privatePage];
|
|
288
291
|
const candidates: Array<{ type: SchemaOrgType; slug: string }> = [];
|
|
289
292
|
|
|
290
293
|
for (const row of ROUTES) {
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
* the file registration's `baseUrl` (never the hub `url`, so no workspace
|
|
22
22
|
* value moves an `@id`), else the module-load registration. A site that is not
|
|
23
23
|
* hub-connected registers no reader and composes exactly as before.
|
|
24
|
+
*
|
|
25
|
+
* #11644 — a hub-connected site registers the page-title brand reader the same
|
|
26
|
+
* way, so a page title written against the file's `siteName` carries the hub's.
|
|
24
27
|
*/
|
|
25
28
|
|
|
26
29
|
import { readdirSync, readFileSync } from "node:fs";
|
|
@@ -39,10 +42,17 @@ import {
|
|
|
39
42
|
} from "@working-theory/page-renderer";
|
|
40
43
|
import { featureListFromSections } from "@working-theory/schema";
|
|
41
44
|
import { SiteIdentitySchema } from "@working-theory/site-config/schema";
|
|
45
|
+
import { setPageTitleBrandReader } from "@working-theory/site-pages";
|
|
42
46
|
import { parse as parseYaml } from "yaml";
|
|
43
47
|
|
|
44
48
|
import { hubConnected, readHubSite } from "./hub-site-config";
|
|
45
|
-
import {
|
|
49
|
+
import {
|
|
50
|
+
brandFrom,
|
|
51
|
+
resolveContentRoot,
|
|
52
|
+
resolveSiteBrand,
|
|
53
|
+
SITE_BASE_URL,
|
|
54
|
+
SITE_NAME,
|
|
55
|
+
} from "./site-brand";
|
|
46
56
|
|
|
47
57
|
const FRONTMATTER_RE = /^---\r?\n([\s\S]*?)\r?\n---/;
|
|
48
58
|
|
|
@@ -220,6 +230,10 @@ const fileRegistration = readSiteIdentity();
|
|
|
220
230
|
setSiteIdentity(fileRegistration);
|
|
221
231
|
if (hubConnected()) {
|
|
222
232
|
setSiteIdentityReader(() => readHubSiteIdentity(fileRegistration));
|
|
233
|
+
setPageTitleBrandReader(async () => ({
|
|
234
|
+
fileName: SITE_NAME,
|
|
235
|
+
siteName: (await resolveSiteBrand()).siteName,
|
|
236
|
+
}));
|
|
223
237
|
}
|
|
224
238
|
|
|
225
239
|
// #10644 D3, D4 — under the database adapter the product's featureList is
|
|
@@ -201,15 +201,6 @@
|
|
|
201
201
|
"heading": "Alternatives",
|
|
202
202
|
"emptyState": "Comparisons coming soon."
|
|
203
203
|
},
|
|
204
|
-
"reports": {
|
|
205
|
-
"heading": "Reports",
|
|
206
|
-
"emptyState": "Reports coming soon.",
|
|
207
|
-
"gateIntro": "Tell us where to send it, and the report opens right away.",
|
|
208
|
-
"gateCta": "Get the report",
|
|
209
|
-
"openFile": "Open the report",
|
|
210
|
-
"fileByEmail": "The link is on its way to your email.",
|
|
211
|
-
"openExternal": "Open it"
|
|
212
|
-
},
|
|
213
204
|
"waitlistDashboard": {
|
|
214
205
|
"gate": {
|
|
215
206
|
"emptyHeadline": "Sign-in is not configured",
|
package/versions.json
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
1
|
{
|
|
2
|
-
"@working-theory/account": "0.
|
|
3
|
-
"@working-theory/admin-ui": "0.
|
|
4
|
-
"@working-theory/aeo": "0.
|
|
5
|
-
"@working-theory/agent-context": "0.
|
|
2
|
+
"@working-theory/account": "0.68.0",
|
|
3
|
+
"@working-theory/admin-ui": "0.68.0",
|
|
4
|
+
"@working-theory/aeo": "0.68.0",
|
|
5
|
+
"@working-theory/agent-context": "0.68.0",
|
|
6
6
|
"@working-theory/agent-contract": "0.1.0",
|
|
7
7
|
"@working-theory/agent-memory": "0.0.0",
|
|
8
8
|
"@working-theory/ai": "0.1.0",
|
|
9
|
-
"@working-theory/analytics": "0.
|
|
10
|
-
"@working-theory/api": "0.
|
|
11
|
-
"@working-theory/api-client": "0.
|
|
12
|
-
"@working-theory/auth": "0.
|
|
9
|
+
"@working-theory/analytics": "0.68.0",
|
|
10
|
+
"@working-theory/api": "0.68.0",
|
|
11
|
+
"@working-theory/api-client": "0.68.0",
|
|
12
|
+
"@working-theory/auth": "0.68.0",
|
|
13
13
|
"@working-theory/cda-filesystem": "0.0.0",
|
|
14
|
-
"@working-theory/cli": "0.
|
|
15
|
-
"@working-theory/common": "0.
|
|
14
|
+
"@working-theory/cli": "0.68.0",
|
|
15
|
+
"@working-theory/common": "0.68.0",
|
|
16
16
|
"@working-theory/consent": "0.1.0",
|
|
17
|
-
"@working-theory/content-adapters": "0.
|
|
18
|
-
"@working-theory/content-projection": "0.
|
|
19
|
-
"@working-theory/email": "0.
|
|
17
|
+
"@working-theory/content-adapters": "0.68.0",
|
|
18
|
+
"@working-theory/content-projection": "0.68.0",
|
|
19
|
+
"@working-theory/email": "0.68.0",
|
|
20
20
|
"@working-theory/env": "0.0.0",
|
|
21
|
-
"@working-theory/eslint-config": "0.
|
|
22
|
-
"@working-theory/fumadocs-schema": "0.
|
|
21
|
+
"@working-theory/eslint-config": "0.68.0",
|
|
22
|
+
"@working-theory/fumadocs-schema": "0.68.0",
|
|
23
23
|
"@working-theory/ids": "0.21.0",
|
|
24
|
-
"@working-theory/jsonld": "0.
|
|
25
|
-
"@working-theory/license": "0.
|
|
26
|
-
"@working-theory/mcp-server": "0.
|
|
27
|
-
"@working-theory/metadata": "0.
|
|
28
|
-
"@working-theory/observability": "0.
|
|
29
|
-
"@working-theory/page-renderer": "0.
|
|
24
|
+
"@working-theory/jsonld": "0.68.0",
|
|
25
|
+
"@working-theory/license": "0.68.0",
|
|
26
|
+
"@working-theory/mcp-server": "0.68.0",
|
|
27
|
+
"@working-theory/metadata": "0.68.0",
|
|
28
|
+
"@working-theory/observability": "0.68.0",
|
|
29
|
+
"@working-theory/page-renderer": "0.68.0",
|
|
30
30
|
"@working-theory/plugin-mcp": "0.1.3",
|
|
31
|
-
"@working-theory/schema": "0.
|
|
32
|
-
"@working-theory/schema-pack-registry": "0.
|
|
33
|
-
"@working-theory/schema-validator": "0.
|
|
34
|
-
"@working-theory/sections-registry": "0.
|
|
35
|
-
"@working-theory/site-config": "0.
|
|
36
|
-
"@working-theory/site-pages": "0.
|
|
37
|
-
"@working-theory/spoke-checkout": "0.7.
|
|
38
|
-
"@working-theory/stripe-client": "0.
|
|
39
|
-
"@working-theory/templates": "0.
|
|
40
|
-
"@working-theory/theme": "0.
|
|
41
|
-
"@working-theory/ui": "0.
|
|
42
|
-
"@working-theory/validation": "0.
|
|
43
|
-
"@working-theory/web-i18n": "0.
|
|
44
|
-
"@working-theory/admin": "0.
|
|
45
|
-
"@working-theory/api-commerce": "0.2.
|
|
46
|
-
"@working-theory/api-content-write": "0.
|
|
47
|
-
"@working-theory/api-hub": "0.7.
|
|
48
|
-
"@working-theory/api-multi-tenant": "0.4.
|
|
49
|
-
"@working-theory/api-scheduling": "0.6.
|
|
50
|
-
"@working-theory/api-signal-collectors": "0.6.
|
|
51
|
-
"@working-theory/api-workspace": "0.12.
|
|
31
|
+
"@working-theory/schema": "0.68.0",
|
|
32
|
+
"@working-theory/schema-pack-registry": "0.68.0",
|
|
33
|
+
"@working-theory/schema-validator": "0.68.0",
|
|
34
|
+
"@working-theory/sections-registry": "0.68.0",
|
|
35
|
+
"@working-theory/site-config": "0.68.0",
|
|
36
|
+
"@working-theory/site-pages": "0.68.0",
|
|
37
|
+
"@working-theory/spoke-checkout": "0.7.24",
|
|
38
|
+
"@working-theory/stripe-client": "0.68.0",
|
|
39
|
+
"@working-theory/templates": "0.68.0",
|
|
40
|
+
"@working-theory/theme": "0.68.0",
|
|
41
|
+
"@working-theory/ui": "0.68.0",
|
|
42
|
+
"@working-theory/validation": "0.68.0",
|
|
43
|
+
"@working-theory/web-i18n": "0.68.0",
|
|
44
|
+
"@working-theory/admin": "0.19.0",
|
|
45
|
+
"@working-theory/api-commerce": "0.2.2",
|
|
46
|
+
"@working-theory/api-content-write": "0.12.0",
|
|
47
|
+
"@working-theory/api-hub": "0.7.2",
|
|
48
|
+
"@working-theory/api-multi-tenant": "0.4.2",
|
|
49
|
+
"@working-theory/api-scheduling": "0.6.7",
|
|
50
|
+
"@working-theory/api-signal-collectors": "0.6.8",
|
|
51
|
+
"@working-theory/api-workspace": "0.12.2",
|
|
52
52
|
"@working-theory/billing-client": "0.0.0",
|
|
53
53
|
"@working-theory/branding": "0.0.0",
|
|
54
54
|
"@working-theory/license-client": "0.0.0",
|
|
55
55
|
"@working-theory/license-manifest": "0.0.0",
|
|
56
|
-
"@working-theory/mcp-scheduling": "0.4.
|
|
57
|
-
"@working-theory/mcp-signal-collectors": "0.2.
|
|
58
|
-
"@working-theory/mcp-workspace": "0.
|
|
56
|
+
"@working-theory/mcp-scheduling": "0.4.9",
|
|
57
|
+
"@working-theory/mcp-signal-collectors": "0.2.22",
|
|
58
|
+
"@working-theory/mcp-workspace": "0.11.0",
|
|
59
59
|
"@working-theory/partner-session": "0.0.0",
|
|
60
60
|
"@working-theory/preview-protocol": "0.0.0",
|
|
61
|
-
"@working-theory/ui-commerce": "0.
|
|
62
|
-
"@working-theory/ui-docs-blog": "0.
|
|
63
|
-
"@working-theory/ui-scheduling": "0.
|
|
64
|
-
"@working-theory/ui-signal-collectors": "0.
|
|
61
|
+
"@working-theory/ui-commerce": "0.68.0",
|
|
62
|
+
"@working-theory/ui-docs-blog": "0.68.0",
|
|
63
|
+
"@working-theory/ui-scheduling": "0.68.0",
|
|
64
|
+
"@working-theory/ui-signal-collectors": "0.68.0",
|
|
65
65
|
"@working-theory/web": "0.0.0",
|
|
66
66
|
"@working-theory/app-api": "1.0.0",
|
|
67
67
|
"@working-theory/mcp": "0.0.0",
|
|
68
|
-
"@working-theory/database": "0.
|
|
68
|
+
"@working-theory/database": "0.68.0"
|
|
69
69
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The shape a deliverable grant id must match before anything spends a hub
|
|
3
|
-
* call on it (#9125). One definition, read by the report page
|
|
4
|
-
* (`app/[locale]/reports/[slug]/page.tsx`, `resolveGrantId`) and its file
|
|
5
|
-
* route (`app/[locale]/reports/[slug]/file/route.ts`), so the page and the
|
|
6
|
-
* bytes can never disagree on which ids are worth probing.
|
|
7
|
-
*
|
|
8
|
-
* A grant id is minted as `dgrant_<uuidv7>` (database/inbox/schema.prisma).
|
|
9
|
-
* This is deliberately a charset-and-length check, not a `dgrant_` prefix
|
|
10
|
-
* match: the API stays the authority on which ids are real, and a future id
|
|
11
|
-
* scheme should not need an edit here. 128 is a generous ceiling over today's
|
|
12
|
-
* `dgrant_<uuid>`.
|
|
13
|
-
*
|
|
14
|
-
* Deliberately base-tree, not slice-owned: a keyed scaffold's
|
|
15
|
-
* signal-collectors bundle installs the page and route that import it, so it
|
|
16
|
-
* must already be in every scaffold.
|
|
17
|
-
*/
|
|
18
|
-
export const GRANT_ID_SHAPE = /^[A-Za-z0-9_-]{1,128}$/;
|