create-ailk 0.45.0 → 0.46.1

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.
Files changed (42) hide show
  1. package/README.md +6 -3
  2. package/component-catalog.json +217 -4
  3. package/component-catalog.md +10 -7
  4. package/dist/lib/env-catalog.js +1 -1
  5. package/dist/lib/import-mdx.js +10 -2
  6. package/dist/seed-workspace.d.ts +1 -1
  7. package/dist/seed-workspace.js +10 -3
  8. package/dist/surfaces.js +1 -1
  9. package/package.json +3 -3
  10. package/templates/apps/api/.env.example +23 -0
  11. package/templates/apps/api/CLAUDE.md +13 -6
  12. package/templates/apps/api/src/lib/__mocks__/prisma.ts +11 -0
  13. package/templates/apps/mcp/.env.example +8 -0
  14. package/templates/apps/mcp/CLAUDE.md +22 -6
  15. package/templates/apps/web/.env.example +1 -1
  16. package/templates/apps/web/CLAUDE.md +80 -16
  17. package/templates/apps/web/app/.well-known/mcp.json/route.ts +6 -7
  18. package/templates/apps/web/app/[locale]/layout.tsx +10 -7
  19. package/templates/apps/web/app/api/site-status/__tests__/route.test.ts +120 -0
  20. package/templates/apps/web/app/api/site-status/route.ts +62 -0
  21. package/templates/apps/web/app/llms.txt/route.ts +3 -3
  22. package/templates/apps/web/app/openapi.json/__tests__/route.test.ts +21 -4
  23. package/templates/apps/web/app/openapi.json/route.ts +10 -9
  24. package/templates/apps/web/app/sitemap.xml/route.ts +3 -3
  25. package/templates/apps/web/auth.ts +25 -1
  26. package/templates/apps/web/lib/__tests__/fixtures/mcp-stub-server.ts +10 -3
  27. package/templates/apps/web/lib/__tests__/mcp-served-tools.test.ts +61 -0
  28. package/templates/apps/web/lib/__tests__/offerings-pricing.test.ts +384 -1
  29. package/templates/apps/web/lib/__tests__/pricing-page.test.ts +675 -0
  30. package/templates/apps/web/lib/__tests__/site-brand.test.ts +5 -6
  31. package/templates/apps/web/lib/__tests__/site-visibility.test.ts +64 -0
  32. package/templates/apps/web/lib/mcp-oauth.ts +64 -0
  33. package/templates/apps/web/lib/mcp-served-tools.ts +51 -9
  34. package/templates/apps/web/lib/offerings-pricing.ts +173 -20
  35. package/templates/apps/web/lib/pricing-page.ts +382 -43
  36. package/templates/apps/web/lib/site-brand.tsx +1 -7
  37. package/templates/apps/web/lib/site-visibility.ts +45 -0
  38. package/templates/apps/web/messages/en.json +9 -0
  39. package/templates/apps/web/middleware.ts +16 -1
  40. package/templates/apps/web/src/lib/routes.ts +3 -3
  41. package/versions.json +51 -51
  42. package/templates/apps/web/app/.well-known/ai-plugin.json/route.ts +0 -93
package/README.md CHANGED
@@ -797,9 +797,12 @@ AILK_AGENT_KEY=<agent key> create-ailk seed-workspace ./my-site --api-url <api o
797
797
  and the origin's source, before any request.
798
798
  - The agent key is read from `AILK_AGENT_KEY` only — never a flag or a file —
799
799
  and never printed. An owner issues it in the Admin with the `content-edit`
800
- and `content-publish` grants. After the first refused publish, the rest of
801
- the pages are saved as drafts and fail `not published`; a re-run with a
802
- granted key publishes them.
800
+ and `content-publish` grants, and the agent's person sets its level to
801
+ Autonomous on the agent's page: below Autonomous an agent does not publish,
802
+ and every new agent starts at Training. After the first refused publish, the
803
+ rest of the pages are saved as drafts and fail `not published`, and the
804
+ report says when the agent's level held it back; a re-run publishes them only
805
+ once the agent is at Autonomous with both grants.
803
806
  - Each page prints `created`, `updated`, `unchanged`, `skipped` or `failed`,
804
807
  then a count line. A re-run creates nothing and reports every page
805
808
  `unchanged`. An agent writes ten times a minute, so a first seed of about
@@ -17,7 +17,7 @@
17
17
  "importPath": "@working-theory/ui/blocks",
18
18
  "rootBarrel": "@working-theory/ui",
19
19
  "sourceRoot": "packages/ui/src/blocks",
20
- "count": 110
20
+ "count": 111
21
21
  },
22
22
  {
23
23
  "name": "chrome",
@@ -25,7 +25,7 @@
25
25
  "importPath": "@working-theory/ui/chrome",
26
26
  "rootBarrel": "@working-theory/ui",
27
27
  "sourceRoot": "packages/ui/src/chrome",
28
- "count": 19
28
+ "count": 20
29
29
  },
30
30
  {
31
31
  "name": "primitives",
@@ -1552,6 +1552,17 @@
1552
1552
  "descriptionGrade": "strong",
1553
1553
  "sectionType": null
1554
1554
  },
1555
+ {
1556
+ "name": "PlanBar",
1557
+ "tier": "blocks",
1558
+ "sourcePath": "packages/ui/src/blocks/PlanBar.tsx",
1559
+ "importPath": "@working-theory/ui/blocks",
1560
+ "exported": false,
1561
+ "description": "The plan bar of a long pricing page (spec).",
1562
+ "descriptionSource": "doc-comment",
1563
+ "descriptionGrade": "weak",
1564
+ "sectionType": null
1565
+ },
1555
1566
  {
1556
1567
  "name": "PostArchiveRow",
1557
1568
  "tier": "blocks",
@@ -2157,6 +2168,17 @@
2157
2168
  "descriptionGrade": "strong",
2158
2169
  "sectionType": null
2159
2170
  },
2171
+ {
2172
+ "name": "PricingRail",
2173
+ "tier": "chrome",
2174
+ "sourcePath": "packages/ui/src/chrome/PricingRail.tsx",
2175
+ "importPath": "@working-theory/ui/chrome",
2176
+ "exported": true,
2177
+ "description": "Wraps a pricing page's rendered content and owns its layout region. The current page carries `aria-current=\"page\"` in both. Every string is the caller's (`labels`, the items, the `cta`): no English defaults.",
2178
+ "descriptionSource": "doc-comment",
2179
+ "descriptionGrade": "strong",
2180
+ "sectionType": null
2181
+ },
2160
2182
  {
2161
2183
  "name": "SectionNav",
2162
2184
  "tier": "chrome",
@@ -7317,6 +7339,12 @@
7317
7339
  "danger",
7318
7340
  "warning"
7319
7341
  ]
7342
+ },
7343
+ "annualPriceNote": {
7344
+ "type": "string"
7345
+ },
7346
+ "priceFootnoteAnnualOnly": {
7347
+ "type": "boolean"
7320
7348
  }
7321
7349
  },
7322
7350
  "required": [
@@ -7327,6 +7355,22 @@
7327
7355
  ]
7328
7356
  }
7329
7357
  },
7358
+ "offeringPlans": {
7359
+ "minItems": 1,
7360
+ "maxItems": 12,
7361
+ "type": "array",
7362
+ "items": {
7363
+ "type": "string",
7364
+ "pattern": "^[a-z0-9][a-z0-9-]{0,39}$"
7365
+ }
7366
+ },
7367
+ "source": {
7368
+ "type": "string",
7369
+ "enum": [
7370
+ "offerings",
7371
+ "written"
7372
+ ]
7373
+ },
7330
7374
  "billingToggle": {
7331
7375
  "type": "boolean"
7332
7376
  },
@@ -7552,6 +7596,12 @@
7552
7596
  "danger",
7553
7597
  "warning"
7554
7598
  ]
7599
+ },
7600
+ "annualPriceNote": {
7601
+ "type": "string"
7602
+ },
7603
+ "priceFootnoteAnnualOnly": {
7604
+ "type": "boolean"
7555
7605
  }
7556
7606
  },
7557
7607
  "required": [
@@ -7577,8 +7627,7 @@
7577
7627
  }
7578
7628
  },
7579
7629
  "required": [
7580
- "title",
7581
- "description"
7630
+ "title"
7582
7631
  ]
7583
7632
  }
7584
7633
  },
@@ -7599,6 +7648,9 @@
7599
7648
  "qualifier": {
7600
7649
  "type": "string"
7601
7650
  },
7651
+ "note": {
7652
+ "type": "string"
7653
+ },
7602
7654
  "features": {
7603
7655
  "type": "array",
7604
7656
  "items": {
@@ -7790,6 +7842,103 @@
7790
7842
  },
7791
7843
  "collapseFeaturesOnMobile": {
7792
7844
  "type": "boolean"
7845
+ },
7846
+ "planBar": {
7847
+ "type": "object",
7848
+ "properties": {
7849
+ "price": {
7850
+ "type": "boolean"
7851
+ },
7852
+ "button": {
7853
+ "type": "boolean"
7854
+ },
7855
+ "billingSwitch": {
7856
+ "type": "boolean"
7857
+ },
7858
+ "recommended": {
7859
+ "type": "string",
7860
+ "enum": [
7861
+ "none",
7862
+ "label"
7863
+ ]
7864
+ },
7865
+ "recommendedLabel": {
7866
+ "type": "string",
7867
+ "minLength": 1,
7868
+ "maxLength": 24
7869
+ }
7870
+ },
7871
+ "additionalProperties": false
7872
+ },
7873
+ "comparisonPlanBar": {
7874
+ "type": "object",
7875
+ "properties": {
7876
+ "pickerLabel": {
7877
+ "type": "string",
7878
+ "minLength": 1,
7879
+ "maxLength": 40
7880
+ },
7881
+ "recommended": {
7882
+ "type": "string",
7883
+ "enum": [
7884
+ "none",
7885
+ "label",
7886
+ "column-tint"
7887
+ ]
7888
+ },
7889
+ "recommendedLabel": {
7890
+ "type": "string",
7891
+ "minLength": 1,
7892
+ "maxLength": 24
7893
+ },
7894
+ "labelCell": {
7895
+ "type": "object",
7896
+ "properties": {
7897
+ "title": {
7898
+ "type": "string",
7899
+ "minLength": 1,
7900
+ "maxLength": 60
7901
+ },
7902
+ "subtitle": {
7903
+ "type": "string",
7904
+ "minLength": 1,
7905
+ "maxLength": 60
7906
+ }
7907
+ },
7908
+ "required": [
7909
+ "title"
7910
+ ],
7911
+ "additionalProperties": false
7912
+ },
7913
+ "pinnedGroups": {
7914
+ "type": "boolean"
7915
+ },
7916
+ "groupRows": {
7917
+ "type": "string",
7918
+ "enum": [
7919
+ "plain",
7920
+ "tinted"
7921
+ ]
7922
+ },
7923
+ "groupsOpen": {
7924
+ "type": "string",
7925
+ "enum": [
7926
+ "first",
7927
+ "all",
7928
+ "none"
7929
+ ]
7930
+ },
7931
+ "price": {
7932
+ "type": "boolean"
7933
+ },
7934
+ "button": {
7935
+ "type": "boolean"
7936
+ }
7937
+ },
7938
+ "required": [
7939
+ "pickerLabel"
7940
+ ],
7941
+ "additionalProperties": false
7793
7942
  }
7794
7943
  },
7795
7944
  "required": [
@@ -11149,6 +11298,70 @@
11149
11298
  "filled",
11150
11299
  "inverted"
11151
11300
  ]
11301
+ },
11302
+ "planBar": {
11303
+ "type": "object",
11304
+ "properties": {
11305
+ "pickerLabel": {
11306
+ "type": "string",
11307
+ "minLength": 1,
11308
+ "maxLength": 40
11309
+ },
11310
+ "recommended": {
11311
+ "type": "string",
11312
+ "enum": [
11313
+ "none",
11314
+ "label",
11315
+ "column-tint"
11316
+ ]
11317
+ },
11318
+ "recommendedLabel": {
11319
+ "type": "string",
11320
+ "minLength": 1,
11321
+ "maxLength": 24
11322
+ },
11323
+ "labelCell": {
11324
+ "type": "object",
11325
+ "properties": {
11326
+ "title": {
11327
+ "type": "string",
11328
+ "minLength": 1,
11329
+ "maxLength": 60
11330
+ },
11331
+ "subtitle": {
11332
+ "type": "string",
11333
+ "minLength": 1,
11334
+ "maxLength": 60
11335
+ }
11336
+ },
11337
+ "required": [
11338
+ "title"
11339
+ ],
11340
+ "additionalProperties": false
11341
+ },
11342
+ "pinnedGroups": {
11343
+ "type": "boolean"
11344
+ },
11345
+ "groupRows": {
11346
+ "type": "string",
11347
+ "enum": [
11348
+ "plain",
11349
+ "tinted"
11350
+ ]
11351
+ },
11352
+ "groupsOpen": {
11353
+ "type": "string",
11354
+ "enum": [
11355
+ "first",
11356
+ "all",
11357
+ "none"
11358
+ ]
11359
+ }
11360
+ },
11361
+ "required": [
11362
+ "pickerLabel"
11363
+ ],
11364
+ "additionalProperties": false
11152
11365
  }
11153
11366
  },
11154
11367
  "required": [
@@ -15,13 +15,13 @@ The component inventory of `@working-theory/ui` and the shells of `@working-theo
15
15
  3. Check the Primitives, Panels and Shells tables too — a low-level control, a collapsible layout container, or a route-level frame lives there, not under Sections or Blocks.
16
16
  4. Only then build. If you do build, you are declaring the capability is genuinely absent.
17
17
 
18
- Inventory: **331 component files** across 16 tiers — 60 sections, 110 blocks, 19 chrome, 82 primitives, 6 panels, 8 shells, 5 docs-blog-blocks, 1 docs-blog-chrome, 2 docs-blog-shells, 2 scheduling-sections, 6 scheduling-blocks, 5 signal-collectors-sections, 9 signal-collectors-blocks, 2 commerce-sections, 13 commerce-blocks, 1 commerce-panels. 328 distinct names: `SchedulerEmbed`, `Separator`, `Tabs` exist in more than one tier as genuinely different components, listed once per tier with its own source path.
18
+ Inventory: **333 component files** across 16 tiers — 60 sections, 111 blocks, 20 chrome, 82 primitives, 6 panels, 8 shells, 5 docs-blog-blocks, 1 docs-blog-chrome, 2 docs-blog-shells, 2 scheduling-sections, 6 scheduling-blocks, 5 signal-collectors-sections, 9 signal-collectors-blocks, 2 commerce-sections, 13 commerce-blocks, 1 commerce-panels. 330 distinct names: `SchedulerEmbed`, `Separator`, `Tabs` exist in more than one tier as genuinely different components, listed once per tier with its own source path.
19
19
 
20
- Description coverage: **327/331** components carry a capability description derived from source — 45 from the section registry's hand-authored when-to-use text, 247 from the component's own doc-comment header, 35 from its tier barrel's roster line. **4** have none; they are listed under [Undescribed components](#undescribed-components) rather than given a sentence invented from their name.
20
+ Description coverage: **329/333** components carry a capability description derived from source — 45 from the section registry's hand-authored when-to-use text, 249 from the component's own doc-comment header, 35 from its tier barrel's roster line. **4** have none; they are listed under [Undescribed components](#undescribed-components) rather than given a sentence invented from their name.
21
21
 
22
- Of those, **294** are *strong* — a capability sentence you could match a requirement against — and **33** are *weak*: either one short clause, or a long one that spends itself on wiring (client boundaries, class names, which primitives it composes) instead of on what the thing is for. Weak rows are marked `(weak)` and listed in full under [Weak descriptions](#weak-descriptions). Coverage is 99%, but **findable-without-luck coverage is 89%**.
22
+ Of those, **295** are *strong* — a capability sentence you could match a requirement against — and **34** are *weak*: either one short clause, or a long one that spends itself on wiring (client boundaries, class names, which primitives it composes) instead of on what the thing is for. Weak rows are marked `(weak)` and listed in full under [Weak descriptions](#weak-descriptions). Coverage is 99%, but **findable-without-luck coverage is 89%**.
23
23
 
24
- Per tier, strong out of total: **Sections** 59/60 · **Blocks** 102/110 · **Chrome** 10/19 · **Primitives** 67/82 (4 undescribed) · **Panels** 6/6 · **Shells** 7/8 · **Docs + Blog Blocks** 5/5 · **Docs + Blog Chrome** 1/1 · **Docs + Blog Shells** 0/2 · **Scheduling Sections** 2/2 · **Scheduling Blocks** 6/6 · **Signal-Collectors Sections** 5/5 · **Signal-Collectors Blocks** 8/9 · **Commerce Sections** 2/2 · **Commerce Blocks** 13/13 · **Commerce Panels** 1/1. A tier low on this line is a tier where a capability search is most likely to come up empty on something that exists.
24
+ Per tier, strong out of total: **Sections** 59/60 · **Blocks** 102/111 · **Chrome** 11/20 · **Primitives** 67/82 (4 undescribed) · **Panels** 6/6 · **Shells** 7/8 · **Docs + Blog Blocks** 5/5 · **Docs + Blog Chrome** 1/1 · **Docs + Blog Shells** 0/2 · **Scheduling Sections** 2/2 · **Scheduling Blocks** 6/6 · **Signal-Collectors Sections** 5/5 · **Signal-Collectors Blocks** 8/9 · **Commerce Sections** 2/2 · **Commerce Blocks** 13/13 · **Commerce Panels** 1/1. A tier low on this line is a tier where a capability search is most likely to come up empty on something that exists.
25
25
 
26
26
  That grade is **mechanical**. It counts what it can measure — how much a description adds beyond the component's own name, how much of it is spent on wiring, whether the extraction came out damaged — and it cannot tell a fluent paragraph about the wrong subject from a useful one. A person reading these tables will find more rows unusable than the weak count admits. Treat it as a floor on the problem, not a measurement of it, and read the source before concluding a capability is absent.
27
27
 
@@ -124,7 +124,7 @@ Import: `import { X } from "@working-theory/ui/sections";` (or from the `@workin
124
124
 
125
125
  ---
126
126
 
127
- ## Blocks (110)
127
+ ## Blocks (111)
128
128
 
129
129
  Intermediate composition tiles — the pieces sections are built from. Compose primitives and panels; never import a section.
130
130
 
@@ -202,6 +202,7 @@ Import: `import { X } from "@working-theory/ui/blocks";` (or from the `@working-
202
202
  | `PageHeaderSwitcher` | Header-owned context-switcher island (DropdownMenu-backed). Header-owned segment switcher rendered inside PageHeader's `switcher` slot. Composes DropdownMenu (Radix-backed — positioning, click-outside, Escape, focus management, and roving keyboard nav all come for free). | `import { PageHeaderSwitcher } from "@working-theory/ui/blocks"` |
203
203
  | `PairingCard` | Quiet card naming a matched WaitlistRecommendation pairing: both resolved offer names + the resolved reason, joined against a caller-supplied offers[] by key. | `import { PairingCard } from "@working-theory/ui/blocks"` |
204
204
  | `PhoneNumberField` | Single-box combo phone input for the "tel" field kind (supersedes the two-segment country-Select + number-Input layout). | `import { PhoneNumberField } from "@working-theory/ui/blocks"` |
205
+ | `PlanBar` | The plan bar of a long pricing page (spec). *(weak)* | internal — compose from `packages/ui/src/blocks/PlanBar.tsx` |
205
206
  | `PostArchiveRow` | One "Previous posts" row: title link + meta, host-placed `Separator` between rows. Draws no divider of its own (border convention — the host places `Separator` between rows, as BlogList already does for PostRow). | `import { PostArchiveRow } from "@working-theory/ui/blocks"` |
206
207
  | `PostCard` | Same props as PostRow, a vertical arrangement. A single linked blog-index card (cover · date · reading time · title · excerpt · "Read more"). Tier 3 block; composes MediaFigure + primitives. RSC default. *(weak)* | `import { PostCard } from "@working-theory/ui/blocks"` |
207
208
  | `PostMetaLine` | `&lt;tag> · &lt;date>` meta line, either half optional (C4). Shows the tag alone, the date alone, or both joined by a middot; renders nothing with neither. | `import { PostMetaLine } from "@working-theory/ui/blocks"` |
@@ -245,7 +246,7 @@ Import: `import { X } from "@working-theory/ui/blocks";` (or from the `@working-
245
246
 
246
247
  ---
247
248
 
248
- ## Chrome (19)
249
+ ## Chrome (20)
249
250
 
250
251
  Persistent framing UI that wraps page content — navigation, footers, sidebars, banners. Not MDX-driven.
251
252
 
@@ -267,6 +268,7 @@ Import: `import { X } from "@working-theory/ui/chrome";` (or from the `@working-
267
268
  | `NavMobileMenu` | Client subcomponent for mobile hamburger state. Isolates "use client" to this narrow component so Nav (Server Component) stays clean. Renders a hamburger button + collapsible link list. Closes the menu automatically when the pathname changes (route navigation). *(weak)* | internal — compose from `packages/ui/src/chrome/NavMobileMenu.tsx` |
268
269
  | `NavOverflowMenu` | The Nav row's per-breakpoint link-overflow disclosure. The desktop link row never wraps: a fixed per-breakpoint inline-link budget (4 at md, 6 at lg+) is enforced by the caller (Nav), which splits `navItems` into an inline slice and an overflow slice. This component renders ONLY the overflow slice, behind a disclosure trigger, in source order — it never computes the budget itself. | internal — compose from `packages/ui/src/chrome/NavOverflowMenu.tsx` |
269
270
  | `NotificationsMenu` | Bell trigger + notifications popover chrome (ploy-capture app-frame). Presentational, props-driven. The unread count and row list arrive entirely via props — this component carries NO fetch/polling logic of its own. Rows are pre-formatted at the call site (relative time, heading, empty copy) per the AILK i18n/formatting convention (design-system-rules Rule 10). | `import { NotificationsMenu } from "@working-theory/ui/chrome"` |
271
+ | `PricingRail` | Wraps a pricing page's rendered content and owns its layout region. The current page carries `aria-current="page"` in both. Every string is the caller's (`labels`, the items, the `cta`): no English defaults. | `import { PricingRail } from "@working-theory/ui/chrome"` |
270
272
  | `SectionNav` | Chrome-tier route-aware section navigation. A horizontal, tab-styled section nav promoting Working Theory's bespoke `UnifiedTabs`/`TheoriesTabs` to a tokenized, tier-correct AILK component. | `import { SectionNav } from "@working-theory/ui/chrome"` |
271
273
  | `SidebarNav` | Application sidebar rail (nav + teams + user) for dashboard shells. Server Component (RSC). Renders the vertical sidebar rail for application-shell layouts. Used as the `sidebar` prop of AdminShell. Wrap in a FixedPanel (panels tier) to get the expanded ↔ rail ↔ hidden state machinery. Independently reusable in future shells (settings, analytics, etc.). *(weak)* | `import { SidebarNav } from "@working-theory/ui/chrome"` |
272
274
  | `SidebarNavRailItems` | Client boundary for the collapsed rail tooltip affordance. Isolated "use client" boundary so SidebarNav itself stays a Server Component. Renders icon-only nav links with Tooltip labels when the rail is collapsed. *(weak)* | internal — compose from `packages/ui/src/chrome/SidebarNavRailItems.tsx` |
@@ -562,13 +564,14 @@ Import: `import { X } from "@working-theory/ui-commerce";` (or from the `@workin
562
564
 
563
565
  ## Weak descriptions
564
566
 
565
- These 33 components have a description that is accurate but does not do the job well: too short to match against, or long but spent on implementation. A capability search reaches them only if the searcher's word happens to be in it, so they are the most likely place for this catalog to repeat the failure it was built to fix. Read the source before concluding the capability is absent — and if you own one of these components, its header is the fix.
567
+ These 34 components have a description that is accurate but does not do the job well: too short to match against, or long but spent on implementation. A capability search reaches them only if the searcher's word happens to be in it, so they are the most likely place for this catalog to repeat the failure it was built to fix. Read the source before concluding the capability is absent — and if you own one of these components, its header is the fix.
566
568
 
567
569
  | Component | Tier | What the source gives us |
568
570
  | --- | --- | --- |
569
571
  | `DocumentViewerClient` | sections | The interactive shell for DocumentViewer. Split out of DocumentViewer.tsx (which stays RSC) for the same reason AlertSection composes AlertSectionDismissIsland: interactivity is contained to one client island. |
570
572
  | `AgentContextCard` | blocks | Capability-bearing block that renders agent provenance. RSC note: no hooks or browser APIs — server-renderable by default. |
571
573
  | `PageHeader` | blocks | RSC. Page-level header composing the Breadcrumb primitive for the left-side wayfinding trail, a generic right-side `actions` slot, and an optional `switcher` slot for header-owned segment switching. Fills AppShell's `header` slot (AdminShell and similar). No accent bar. No tab API. No named action props — the caller assembles whatever button/menu nodes it needs and passes them as `actions`. |
574
+ | `PlanBar` | blocks | The plan bar of a long pricing page (spec). |
572
575
  | `PostCard` | blocks | Same props as PostRow, a vertical arrangement. A single linked blog-index card (cover · date · reading time · title · excerpt · "Read more"). Tier 3 block; composes MediaFigure + primitives. RSC default. |
573
576
  | `PostTeaser` | blocks | The featured post (`size="lg"`) and "Latest posts" grid card (`size="md"`); no cover renders no placeholder. Composes MediaFigure + PostMetaLine + primitives. No author byline (C7). RSC: no hooks or browser APIs. |
574
577
  | `PricingTierCardSeatControl` | blocks | Seat-count range picker for the Team tier card. Renders a Select primitive that lets the user choose an "Up to N seats" option from a caller-supplied list of numbers. The parent PricingTierCard stays a pure RSC; only this tiny island is hydrated. Pattern mirrors PageHeaderSwitcher.tsx: small "use client" island imported by an otherwise-server-rendered parent, keeping the client bundle minimal. |
@@ -256,7 +256,7 @@ export const ENV_CATALOG = {
256
256
  secret: false,
257
257
  },
258
258
  STEALTH: {
259
- description: 'Set to "true" to keep the site out of search indexes (noindex headers) until launch.',
259
+ description: 'Set to "true" to keep the site hidden until launch: on the website, crawlers are blocked and every page is noindexed; on the MCP server, the anonymous path refuses every caller.',
260
260
  secret: false,
261
261
  },
262
262
  };
@@ -58,7 +58,9 @@
58
58
  *
59
59
  * The key travels only as `authorization: Bearer <key>`, never across a
60
60
  * redirect (`redirect: "error"`), and is never printed. Of an API answer only
61
- * a status and a `[a-z0-9_]` error code reach output (SEC-7876-S1).
61
+ * a status and a `[a-z0-9_]` error code reach output (SEC-7876-S1). A 401 or
62
+ * 403 stops the run, except a 403 `plugin_required`, which fails its page
63
+ * alone (#12013 D9).
62
64
  *
63
65
  * Spec: docs/specs/10203-import-mdx-one-mdx-artifact-spec.md; the editorial
64
66
  * walk docs/specs/10701-import-mdx-walks-the-editorial-spec.md; its site
@@ -590,11 +592,17 @@ function failed(at, reason, halt) {
590
592
  ...(halt !== undefined && { halt }),
591
593
  };
592
594
  }
593
- /** A non-success answer: 401/403 stops the run, anything else fails the page. */
595
+ /**
596
+ * A non-success answer: 401/403 stops the run, anything else fails the page.
597
+ * A 403 `plugin_required` refuses one address, not the key, so it fails the
598
+ * page alone (#12013 D9).
599
+ */
594
600
  function refusedAnswer(at, answer) {
595
601
  if ("network" in answer)
596
602
  return failed(at, answer.network);
597
603
  const reason = `${answer.status} ${answer.code}`;
604
+ if (answer.status === 403 && answer.code === "plugin_required")
605
+ return failed(at, reason);
598
606
  return answer.status === 401 || answer.status === 403
599
607
  ? failed(at, reason, `not sent: the API refused the key (${reason})`)
600
608
  : failed(at, reason);
@@ -69,5 +69,5 @@ export interface SeedWorkspaceArgs {
69
69
  workspaceId: string | undefined;
70
70
  help: boolean;
71
71
  }
72
- export declare const SEED_WORKSPACE_HELP = "create-ailk seed-workspace \u2014 import a starter's pages into its workspace.\n\nUsage:\n AILK_AGENT_KEY=<key> create-ailk seed-workspace [<dir>] [--api-url <origin>] [--workspace <wksp_id>]\n\nArguments:\n <dir> The site. Defaults to the current dir.\n\nOptions:\n --api-url <origin> The site's API origin. Else AILK_API_URL. https:\n only (http: on localhost or 127.0.0.1).\n --workspace <wksp_id> The workspace the pages are written to. Else\n AILK_WORKSPACE_ID.\n -h, --help Show this help.\n\nEach content/en/<Type>/<slug>.mdx page is written to the workspace, and set\nLive when it has no Live version, through the API's content routes, with the\nagent key, which is read from AILK_AGENT_KEY only and needs the content-edit\nand content-publish grants. Each page prints created, updated, unchanged,\nskipped or failed, so a re-run is safe. When every page is Live, the site\nswitches apps/web and apps/api to CONTENT_ADAPTER=database, keeping a value\neither already sets. The site's dependencies must be installed. Exit 0 when\nevery page was seeded, 1 when any failed, 2 on a refusal (nothing is sent).\n";
72
+ export declare const SEED_WORKSPACE_HELP = "create-ailk seed-workspace \u2014 import a starter's pages into its workspace.\n\nUsage:\n AILK_AGENT_KEY=<key> create-ailk seed-workspace [<dir>] [--api-url <origin>] [--workspace <wksp_id>]\n\nArguments:\n <dir> The site. Defaults to the current dir.\n\nOptions:\n --api-url <origin> The site's API origin. Else AILK_API_URL. https:\n only (http: on localhost or 127.0.0.1).\n --workspace <wksp_id> The workspace the pages are written to. Else\n AILK_WORKSPACE_ID.\n -h, --help Show this help.\n\nEach content/en/<Type>/<slug>.mdx page is written to the workspace, and set\nLive when it has no Live version, through the API's content routes, with the\nagent key, which is read from AILK_AGENT_KEY only and needs the content-edit\nand content-publish grants, at Autonomous. Each page prints created, updated,\nunchanged, skipped or failed, so a re-run is safe. When every page is Live, the site\nswitches apps/web and apps/api to CONTENT_ADAPTER=database, keeping a value\neither already sets. The site's dependencies must be installed. Exit 0 when\nevery page was seeded, 1 when any failed, 2 on a refusal (nothing is sent).\n";
73
73
  export declare function parseSeedWorkspaceArgs(argv: string[]): SeedWorkspaceArgs;
@@ -43,6 +43,8 @@ export const AGENT_KEY_ENV_VAR = "AILK_AGENT_KEY";
43
43
  export const WORKSPACE_ID_ENV_VAR = "AILK_WORKSPACE_ID";
44
44
  /** The environment variable each app chooses its content source by (#10659). */
45
45
  export const CONTENT_ADAPTER_ENV_VAR = "CONTENT_ADAPTER";
46
+ /** A page the importer saved but whose publish the API refused 403 (`import-mdx.ts`'s reason). */
47
+ const PUBLISH_REFUSED = /not published \(403 [a-z0-9_]+\)$/;
46
48
  /** A refusal the CLI exits 2 on, thrown before any request is sent. */
47
49
  export class SeedWorkspaceRefusedError extends Error {
48
50
  exitCode = 2;
@@ -90,7 +92,7 @@ export async function seedWorkspace(opts) {
90
92
  }
91
93
  const apiKey = given(env[AGENT_KEY_ENV_VAR]);
92
94
  if (apiKey === undefined) {
93
- refuse(`set ${AGENT_KEY_ENV_VAR} to an agent key with the content-edit and content-publish grants. It is read from the environment only — never a flag or a file.`);
95
+ refuse(`set ${AGENT_KEY_ENV_VAR} to an agent key with the content-edit and content-publish grants, at Autonomous. It is read from the environment only — never a flag or a file.`);
94
96
  }
95
97
  const workspaceId = given(opts.workspaceId) ?? given(env[WORKSPACE_ID_ENV_VAR]);
96
98
  if (workspaceId === undefined) {
@@ -145,6 +147,11 @@ export async function seedWorkspace(opts) {
145
147
  if (failed > 0) {
146
148
  onLine(`${failed} page(s) were not seeded. Fix them and re-run: create-ailk seed-workspace ${opts.targetDir}`);
147
149
  }
150
+ // #12008 D12 — the key is an agent's, and below Autonomous an agent's
151
+ // publish is refused 403.
152
+ if (result.pages.some((page) => page.result === "failed" && PUBLISH_REFUSED.test(page.reason))) {
153
+ onLine("This agent's level holds back publishing. Its person sets it to Autonomous on the agent's page, then run this again.");
154
+ }
148
155
  onLine("Content source: content/ (unchanged) until every page is seeded and Live.");
149
156
  }
150
157
  return { result, exitCode: failed > 0 ? 1 : 0 };
@@ -235,8 +242,8 @@ Options:
235
242
  Each content/en/<Type>/<slug>.mdx page is written to the workspace, and set
236
243
  Live when it has no Live version, through the API's content routes, with the
237
244
  agent key, which is read from AILK_AGENT_KEY only and needs the content-edit
238
- and content-publish grants. Each page prints created, updated, unchanged,
239
- skipped or failed, so a re-run is safe. When every page is Live, the site
245
+ and content-publish grants, at Autonomous. Each page prints created, updated,
246
+ unchanged, skipped or failed, so a re-run is safe. When every page is Live, the site
240
247
  switches apps/web and apps/api to CONTENT_ADAPTER=database, keeping a value
241
248
  either already sets. The site's dependencies must be installed. Exit 0 when
242
249
  every page was seeded, 1 when any failed, 2 on a refusal (nothing is sent).
package/dist/surfaces.js CHANGED
@@ -452,7 +452,7 @@ export const GATEABLE_SURFACES = [
452
452
  // schedule/ directory by #5563), and the private index `/private`
453
453
  // (#8843 D10), a second directory gated with it. API-backed like
454
454
  // `flows`: every meeting fact comes from apps/api's
455
- // `GET /v1/schedule/meetings`, so there is no MDX of its own. Since
455
+ // `GET /v1/schedule/meeting-pages`, so there is no MDX of its own. Since
456
456
  // #11252 the pages ship in `@working-theory/ui-scheduling` and the
457
457
  // snapshot carries neither directory; the surface still gates the nav
458
458
  // label and the Free placeholders.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ailk",
3
- "version": "0.45.0",
3
+ "version": "0.46.1",
4
4
  "description": "Scaffolder for AI Launch Kit — `pnpm create ailk@latest <dir>` produces a starter repo consuming @working-theory/* from npm (per ADR 0007).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,8 +28,8 @@
28
28
  "tar": "^7.5.21"
29
29
  },
30
30
  "devDependencies": {
31
- "@working-theory/schema": "0.73.0",
32
- "@working-theory/templates": "0.73.0"
31
+ "@working-theory/schema": "0.75.0",
32
+ "@working-theory/templates": "0.75.0"
33
33
  },
34
34
  "repository": {
35
35
  "type": "git",
@@ -238,6 +238,29 @@ STRIPE_WEBHOOK_SECRET=whsec_xxx
238
238
  # the connect PUT (#7533). On a hub whose spokes all have connections, unset
239
239
  # this to retire the env receiver (it then answers 503).
240
240
  # CAL_WEBHOOK_SECRET=
241
+ #
242
+ # The plugin entitlements read (#12001) — whether a workspace has a plugin
243
+ # (positionary, design-shop, promote, growth-ops, study), asked of the entitlements
244
+ # service by one function, workspaceHasPlugin. ENTITLEMENTS_URL is the
245
+ # service's origin only (no path) and must be https:, except a loopback host
246
+ # in local development. PLUGINS_RESOLVE_SECRET is the service's resolve
247
+ # secret ONLY, never billing's LICENSE_ISSUER_INTERNAL_SECRET. Set both ONLY
248
+ # on a deployment the entitlements service's own operator runs, never on a
249
+ # customer's deployment.
250
+ # Unset, or a URL that fails the rule, makes every read a logged failure:
251
+ # the sold plugins answer no and growth-ops answers yes.
252
+ # ENTITLEMENTS_URL=
253
+ # PLUGINS_RESOLVE_SECRET=
254
+ #
255
+ # The craft delivery service (#12015; claude-setup#12180) — where
256
+ # GET /v1/workspaces/:workspaceId/craft/:command asks for one command's craft,
257
+ # sending this deployment's licence key. CRAFT_DELIVERY_URL is a LOCAL override
258
+ # only: accepted only as a loopback origin with a port
259
+ # (http://127.0.0.1:<port> or http://[::1]:<port>), for development and tests;
260
+ # any other value refuses every craft read and sends nothing. Production uses
261
+ # the origin built into the kit (CRAFT_DELIVERY_ORIGIN, https://api.ailaunchkit.ai);
262
+ # nothing needs setting.
263
+ # CRAFT_DELIVERY_URL=
241
264
  # GET /v1/schedule/appointments only returns rows where this deployment's
242
265
  # AILK_SITE_ID (declared below, under "Project listings — site addressing")
243
266
  # equals the caller's own workspace id: the receiver writes under