create-ailk 0.9.0 → 0.11.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.
Files changed (104) hide show
  1. package/README.md +10 -5
  2. package/dist/cli.js +17 -2
  3. package/dist/content-payloads.d.ts +37 -0
  4. package/dist/content-payloads.js +64 -0
  5. package/dist/lib/fetch-module.d.ts +3 -3
  6. package/dist/lib/fetch-module.js +11 -5
  7. package/dist/lib/fetch-template.d.ts +1 -1
  8. package/dist/lib/fetch-template.js +7 -4
  9. package/dist/lib/module-license-gate.d.ts +29 -23
  10. package/dist/lib/module-license-gate.js +98 -0
  11. package/dist/module-architecture.d.ts +9 -0
  12. package/dist/module-architecture.js +46 -14
  13. package/dist/parse-args.d.ts +2 -0
  14. package/dist/parse-args.js +7 -0
  15. package/dist/programmatic.js +12 -4
  16. package/dist/starter-grid.d.ts +4 -67
  17. package/dist/starter-grid.js +6 -84
  18. package/dist/surfaces.js +2 -3
  19. package/dist/template-manifest.d.ts +1 -1
  20. package/dist/template-manifest.js +5 -5
  21. package/package.json +6 -4
  22. package/release-scope.json +25 -0
  23. package/site-templates/designs/minimalism/sample/README.md +2 -2
  24. package/site-templates/designs/minimalism/sample/content/en/HomePage/home.mdx +1 -1
  25. package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.md +4 -3
  26. package/templates/.claude/agents/web.md +10 -8
  27. package/templates/.claude/rules/architecture.md +10 -7
  28. package/templates/.claude/settings.json +12 -0
  29. package/templates/.env.example +24 -3
  30. package/templates/CLAUDE.md +38 -22
  31. package/templates/README.md +12 -12
  32. package/templates/apps/api/jest.config.cjs +1 -0
  33. package/templates/apps/api/package.json +1 -0
  34. package/templates/apps/mcp/CLAUDE.md +23 -10
  35. package/templates/apps/mcp/__tests__/catalog-drift.test.ts +160 -17
  36. package/templates/apps/mcp/__tests__/index.test.ts +118 -1
  37. package/templates/apps/mcp/__tests__/lib/commerce-claim.test.ts +425 -5
  38. package/templates/apps/mcp/__tests__/module-exclusion.test.ts +67 -3
  39. package/templates/apps/mcp/__tests__/server.test.ts +162 -1
  40. package/templates/apps/mcp/src/index.ts +35 -3
  41. package/templates/apps/mcp/src/lib/commerce-claim.ts +193 -24
  42. package/templates/apps/mcp/src/server.ts +77 -5
  43. package/templates/apps/mcp/src/tools/purchase.ts +1 -1
  44. package/templates/apps/web/app/.well-known/mcp.json/build-manifest.ts +15 -0
  45. package/templates/apps/web/app/.well-known/mcp.json/route.ts +10 -3
  46. package/templates/apps/web/src/lib/commerce-claim.ts +15 -6
  47. package/templates/content/_site.mdx +23 -4
  48. package/templates/database/CHANGELOG.md +7 -0
  49. package/templates/database/package.json +1 -1
  50. package/templates/package.json +2 -0
  51. package/versions.json +34 -33
  52. package/dist/modules/commerce/0.6.0.tar.gz +0 -0
  53. package/dist/modules/commerce/0.6.1.tar.gz +0 -0
  54. package/dist/modules/docs-blog/0.6.0.tar.gz +0 -0
  55. package/dist/modules/docs-blog/0.6.1.tar.gz +0 -0
  56. package/dist/modules/marketing-site/0.6.1.tar.gz +0 -0
  57. package/dist/modules/minimalism-site/0.6.1.tar.gz +0 -0
  58. package/dist/modules/multi-tenant/0.6.0.tar.gz +0 -0
  59. package/dist/modules/multi-tenant/0.6.1.tar.gz +0 -0
  60. package/dist/modules/saas-product/0.6.1.tar.gz +0 -0
  61. package/dist/modules/scheduling/0.6.0.tar.gz +0 -0
  62. package/dist/modules/scheduling/0.6.1.tar.gz +0 -0
  63. package/dist/modules/signal-collectors/0.6.0.tar.gz +0 -0
  64. package/dist/modules/signal-collectors/0.6.1.tar.gz +0 -0
  65. package/dist/modules/simple-service/0.6.1.tar.gz +0 -0
  66. package/dist/modules/workspace/0.6.0.tar.gz +0 -0
  67. package/dist/modules/workspace/0.6.1.tar.gz +0 -0
  68. package/site-templates/aliases/minimalism-site.TEMPLATE-MANIFEST.json +0 -538
  69. package/templates/.claude/skills/README.md +0 -37
  70. package/templates/.claude/skills/add-auth/SKILL.md +0 -261
  71. package/templates/.claude/skills/add-auth/references/env-vars.md +0 -98
  72. package/templates/.claude/skills/add-auth/references/oauth-app-setup.md +0 -172
  73. package/templates/.claude/skills/add-page/SKILL.md +0 -260
  74. package/templates/.claude/skills/add-page/references/page-types.md +0 -124
  75. package/templates/.claude/skills/add-page/scripts/site-pages.mjs +0 -87
  76. package/templates/.claude/skills/add-page/templates/comparison-page.mdx.tmpl +0 -99
  77. package/templates/.claude/skills/add-page/templates/content.mdx.tmpl +0 -18
  78. package/templates/.claude/skills/add-page/templates/flow-landing-page.mdx.tmpl +0 -43
  79. package/templates/.claude/skills/add-page/templates/report-page.mdx.tmpl +0 -52
  80. package/templates/.claude/skills/add-page/templates/reports-list.mdx.tmpl +0 -38
  81. package/templates/.claude/skills/check-site/SKILL.md +0 -235
  82. package/templates/.claude/skills/check-site/references/common-errors.md +0 -113
  83. package/templates/.claude/skills/check-site/references/findings-glossary.md +0 -140
  84. package/templates/.claude/skills/check-site/references/severity-levels.md +0 -114
  85. package/templates/.claude/skills/fill-page/SKILL.md +0 -199
  86. package/templates/.claude/skills/fill-page/profiles/plumbing.yaml +0 -80
  87. package/templates/.claude/skills/fill-page/references/section-sources.md +0 -41
  88. package/templates/.claude/skills/setup-database/SKILL.md +0 -156
  89. package/templates/.claude/skills/setup-database/scripts/verify-inbox.ts +0 -154
  90. package/templates/.claude/skills/setup-deploy/SKILL.md +0 -275
  91. package/templates/.claude/skills/setup-deploy/references/env-vars-template.md +0 -192
  92. package/templates/.claude/skills/setup-deploy/references/runbook-template.md +0 -204
  93. package/templates/.claude/skills/setup-deploy/references/vercel-json-template.md +0 -98
  94. package/templates/.claude/skills/update-page/SKILL.md +0 -117
  95. package/templates/.claude/skills/update-page/scripts/update-page.ts +0 -640
  96. package/templates/.claude/skills/update-page/templates/redirects.mjs.tmpl +0 -31
  97. package/templates/.claude/skills/upgrade-plan/SKILL.md +0 -121
  98. package/templates/.claude/skills/upgrade-plan/references/options.md +0 -24
  99. package/templates/.claude/skills/upgrade-plan/scripts/upgrade-plan.ts +0 -527
  100. package/templates/apps/api/.ailk/inbox/2026-09-20T14-57-31.552Z-fallback-1789916251590-037e9005.json +0 -8
  101. package/templates/apps/api/.ailk/inbox/2026-09-20T14-57-33.840Z-fallback-1789916253842-b52659e9.json +0 -12
  102. package/templates/apps/api/.ailk/inbox/2026-09-20T14-57-33.844Z-fallback-1789916253845-6b266f8c.json +0 -12
  103. package/templates/apps/mcp/__tests__/lib/require-paid-tier.test.ts +0 -75
  104. package/templates/apps/mcp/src/lib/require-paid-tier.ts +0 -44
@@ -12,7 +12,9 @@
12
12
  * the deployments whose MCP server registers it. Without that, a KEYED site
13
13
  * would register `start_purchase` while hiding it from its own manifest —
14
14
  * the surface disagreement `apps/mcp/__tests__/catalog-drift.test.ts` exists
15
- * to make impossible.
15
+ * to make impossible. The same single read also yields the licence features
16
+ * the deployment holds (#7136), which gate the five `feature`-tagged tools
17
+ * here exactly as they gate registration on the MCP server.
16
18
  *
17
19
  * Mirrors /.well-known/ai-plugin.json conventions: Response.json with a
18
20
  * conservative cache-control header.
@@ -23,7 +25,10 @@
23
25
  */
24
26
 
25
27
  import packageJson from "../../../package.json";
26
- import { resolveCommerceClaim } from "../../../src/lib/commerce-claim";
28
+ import {
29
+ COMMERCE_FEATURE,
30
+ resolveLicenceFeatures,
31
+ } from "../../../src/lib/commerce-claim";
27
32
  import { resolveBaseUrl } from "../../../src/lib/routes";
28
33
 
29
34
  import { buildMcpManifest } from "./build-manifest";
@@ -46,11 +51,13 @@ export async function GET(): Promise<Response> {
46
51
  // (apps/mcp running in HTTP mode). When set, the manifest includes it
47
52
  // as an additional transport descriptor for discovering agents.
48
53
  const mcpHttpUrlEnv = process.env["MCP_PUBLIC_HTTP_URL"];
54
+ const heldFeatures = await resolveLicenceFeatures();
49
55
 
50
56
  const manifest = buildMcpManifest({
51
57
  baseUrl: resolveBaseUrl(),
52
58
  ailkVersion: packageJson.version,
53
- commerceClaimed: await resolveCommerceClaim(),
59
+ commerceClaimed: heldFeatures.includes(COMMERCE_FEATURE),
60
+ heldFeatures,
54
61
  // Spread conditional to satisfy exactOptionalPropertyTypes: omit the key
55
62
  // entirely when the env var is not set rather than passing undefined.
56
63
  ...(mcpHttpUrlEnv ? { mcpHttpUrl: mcpHttpUrlEnv } : {}),
@@ -15,19 +15,28 @@
15
15
  * unlike `apps/mcp/src/lib/commerce-claim.ts`'s boot-time memoisation — so a
16
16
  * site that buys commerce after its last deploy starts serving immediately
17
17
  * rather than waiting on a redeploy.
18
+ *
19
+ * {@link resolveLicenceFeatures} (#7136) is the same single read, returning
20
+ * every licence feature the deployment holds: `/.well-known/mcp.json` gates
21
+ * the five `feature`-tagged MCP tools on it, from one call per request.
18
22
  */
19
23
  import { checkLicense } from "@working-theory/license";
20
24
 
21
25
  /** The licence `features[]` claim that turns the commerce add-on on. */
22
- const COMMERCE_FEATURE = "commerce";
26
+ export const COMMERCE_FEATURE = "commerce";
23
27
 
24
- export async function resolveCommerceClaim(): Promise<boolean> {
28
+ /** The licence features this deployment positively holds — `[]` when the
29
+ * licence is revoked, carries no `features` array, or cannot be read. */
30
+ export async function resolveLicenceFeatures(): Promise<readonly string[]> {
25
31
  try {
26
32
  const result = await checkLicense();
27
- return (
28
- result.revoked !== true && result.features.includes(COMMERCE_FEATURE)
29
- );
33
+ if (result.revoked === true) return [];
34
+ return Array.isArray(result.features) ? result.features : [];
30
35
  } catch {
31
- return false;
36
+ return [];
32
37
  }
33
38
  }
39
+
40
+ export async function resolveCommerceClaim(): Promise<boolean> {
41
+ return (await resolveLicenceFeatures()).includes(COMMERCE_FEATURE);
42
+ }
@@ -49,11 +49,13 @@ theme:
49
49
  This file is your site's canonical configuration. Edit the frontmatter above to
50
50
  set your site name, base URL, default locale, and identity.
51
51
 
52
- `siteIdentity.kind` takes one of three values:
52
+ `siteIdentity.kind` takes one of four values:
53
53
 
54
- - Organization — a company, agency, nonprofit, or team
55
- - Person — a solo practitioner, consultant, or personal site
56
- - LocalBusiness — a business with a physical location customers visit
54
+ - Organization — a company, agency, nonprofit, or team
55
+ - Person — a solo practitioner, consultant, or personal site
56
+ - LocalBusiness — a business with a physical location customers visit
57
+ - SoftwareApplication — a product's own site, when its maker has a site of
58
+ its own (see below)
57
59
 
58
60
  `siteIdentity.secondary` (optional) names a second entity the site is about, and
59
61
  every page's structured data carries it:
@@ -73,6 +75,23 @@ For example, nested under `siteIdentity:`
73
75
  name: Acme App
74
76
  url: https://example.com/app
75
77
 
78
+ `kind: SoftwareApplication` is the inverse of that product secondary: the
79
+ product is the site's entity, and its maker — whose own site already declares
80
+ it — is named as `publisher` by the stable `@id` that site publishes. It takes
81
+ the product's `name` and `url` (optional `logo`, `description`,
82
+ `applicationCategory`, `operatingSystem`, `sameAs`) and a required `publisher`
83
+ with an `id` URL and an optional `name`; it takes no `secondary`. No second
84
+ Organization is declared here — every page's structured data points at the
85
+ maker's `@id`, and the home page's main entity is the product. For example:
86
+
87
+ siteIdentity:
88
+ kind: SoftwareApplication
89
+ name: Acme App
90
+ url: https://acme-app.example
91
+ publisher:
92
+ id: https://acme.example/#organization
93
+ name: Acme Inc.
94
+
76
95
  `sameAs` is the list of URLs that are unambiguously the same entity as you —
77
96
  your LinkedIn company page, your GitHub org, your X profile. Answer engines use
78
97
  it to reconcile your site with the rest of your presence, so it is worth
@@ -1,5 +1,12 @@
1
1
  # @working-theory/database
2
2
 
3
+ ## 0.30.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @working-theory/validation@0.30.0
9
+
3
10
  ## 0.29.0
4
11
 
5
12
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@working-theory/database",
3
- "version": "0.29.0",
3
+ "version": "0.30.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -23,6 +23,7 @@
23
23
  "preflight": "pnpm architecture && pnpm claude-md:check && pnpm type-check && pnpm lint && pnpm build"
24
24
  },
25
25
  "devDependencies": {
26
+ "@arethetypeswrong/cli": "^0.18.5",
26
27
  "@changesets/changelog-github": "^0.7.0",
27
28
  "@changesets/cli": "^2.27.0",
28
29
  "@eslint/js": "^10.0.1",
@@ -51,6 +52,7 @@
51
52
  "jest": "^30.4.2",
52
53
  "jiti": "^2.4.2",
53
54
  "prettier": "^3.9.4",
55
+ "publint": "^0.3.24",
54
56
  "ts-declaration-location": "^1.0.7",
55
57
  "ts-jest": "^29.4.11",
56
58
  "tsx": "^4.22.4",
package/versions.json CHANGED
@@ -1,39 +1,40 @@
1
1
  {
2
- "@working-theory/admin-ui": "0.29.0",
3
- "@working-theory/aeo": "0.29.0",
4
- "@working-theory/agent-context": "0.29.0",
2
+ "@working-theory/admin-ui": "0.30.0",
3
+ "@working-theory/aeo": "0.30.0",
4
+ "@working-theory/agent-context": "0.30.0",
5
5
  "@working-theory/agent-contract": "0.1.0",
6
6
  "@working-theory/agent-memory": "0.0.0",
7
7
  "@working-theory/ai": "0.1.0",
8
- "@working-theory/analytics": "0.29.0",
9
- "@working-theory/api-client": "0.29.0",
8
+ "@working-theory/analytics": "0.30.0",
9
+ "@working-theory/api-client": "0.30.0",
10
10
  "@working-theory/cda-filesystem": "0.0.0",
11
- "@working-theory/cli": "0.29.0",
12
- "@working-theory/common": "0.29.0",
11
+ "@working-theory/cli": "0.30.0",
12
+ "@working-theory/common": "0.30.0",
13
13
  "@working-theory/consent": "0.1.0",
14
- "@working-theory/content-adapters": "0.29.0",
15
- "@working-theory/content-projection": "0.29.0",
16
- "@working-theory/email": "0.29.0",
14
+ "@working-theory/content-adapters": "0.30.0",
15
+ "@working-theory/content-projection": "0.30.0",
16
+ "@working-theory/email": "0.30.0",
17
17
  "@working-theory/env": "0.0.0",
18
- "@working-theory/eslint-config": "0.29.0",
19
- "@working-theory/fumadocs-schema": "0.29.0",
18
+ "@working-theory/eslint-config": "0.30.0",
19
+ "@working-theory/fumadocs-schema": "0.30.0",
20
20
  "@working-theory/ids": "0.8.0",
21
- "@working-theory/jsonld": "0.29.0",
22
- "@working-theory/license": "0.29.0",
23
- "@working-theory/metadata": "0.29.0",
24
- "@working-theory/observability": "0.29.0",
25
- "@working-theory/page-renderer": "0.29.0",
26
- "@working-theory/schema": "0.29.0",
27
- "@working-theory/schema-pack-registry": "0.29.0",
28
- "@working-theory/schema-validator": "0.29.0",
29
- "@working-theory/sections-registry": "0.29.0",
30
- "@working-theory/site-config": "0.29.0",
31
- "@working-theory/stripe-client": "0.29.0",
32
- "@working-theory/templates": "0.29.0",
33
- "@working-theory/theme": "0.29.0",
34
- "@working-theory/ui": "0.29.0",
35
- "@working-theory/validation": "0.29.0",
36
- "@working-theory/web-i18n": "0.29.0",
21
+ "@working-theory/jsonld": "0.30.0",
22
+ "@working-theory/license": "0.30.0",
23
+ "@working-theory/metadata": "0.30.0",
24
+ "@working-theory/observability": "0.30.0",
25
+ "@working-theory/page-renderer": "0.30.0",
26
+ "@working-theory/plugin-mcp": "0.1.1",
27
+ "@working-theory/schema": "0.30.0",
28
+ "@working-theory/schema-pack-registry": "0.30.0",
29
+ "@working-theory/schema-validator": "0.30.0",
30
+ "@working-theory/sections-registry": "0.30.0",
31
+ "@working-theory/site-config": "0.30.0",
32
+ "@working-theory/stripe-client": "0.30.0",
33
+ "@working-theory/templates": "0.30.0",
34
+ "@working-theory/theme": "0.30.0",
35
+ "@working-theory/ui": "0.30.0",
36
+ "@working-theory/validation": "0.30.0",
37
+ "@working-theory/web-i18n": "0.30.0",
37
38
  "@working-theory/billing-client": "0.0.0",
38
39
  "@working-theory/branding": "0.0.0",
39
40
  "@working-theory/license-client": "0.0.0",
@@ -41,12 +42,12 @@
41
42
  "@working-theory/marketing-api-client": "0.0.0",
42
43
  "@working-theory/partner-session": "0.0.0",
43
44
  "@working-theory/preview-protocol": "0.0.0",
44
- "@working-theory/ui-commerce": "0.23.6",
45
- "@working-theory/ui-docs-blog": "0.23.6",
46
- "@working-theory/ui-scheduling": "0.23.6",
47
- "@working-theory/ui-signal-collectors": "0.24.4",
45
+ "@working-theory/ui-commerce": "0.23.7",
46
+ "@working-theory/ui-docs-blog": "0.23.7",
47
+ "@working-theory/ui-scheduling": "0.23.7",
48
+ "@working-theory/ui-signal-collectors": "0.24.5",
48
49
  "@working-theory/web": "0.0.0",
49
50
  "@working-theory/api": "1.0.0",
50
51
  "@working-theory/mcp": "0.0.0",
51
- "@working-theory/database": "0.29.0"
52
+ "@working-theory/database": "0.30.0"
52
53
  }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file