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.
- package/README.md +10 -5
- package/dist/cli.js +17 -2
- package/dist/content-payloads.d.ts +37 -0
- package/dist/content-payloads.js +64 -0
- package/dist/lib/fetch-module.d.ts +3 -3
- package/dist/lib/fetch-module.js +11 -5
- package/dist/lib/fetch-template.d.ts +1 -1
- package/dist/lib/fetch-template.js +7 -4
- package/dist/lib/module-license-gate.d.ts +29 -23
- package/dist/lib/module-license-gate.js +98 -0
- package/dist/module-architecture.d.ts +9 -0
- package/dist/module-architecture.js +46 -14
- package/dist/parse-args.d.ts +2 -0
- package/dist/parse-args.js +7 -0
- package/dist/programmatic.js +12 -4
- package/dist/starter-grid.d.ts +4 -67
- package/dist/starter-grid.js +6 -84
- package/dist/surfaces.js +2 -3
- package/dist/template-manifest.d.ts +1 -1
- package/dist/template-manifest.js +5 -5
- package/package.json +6 -4
- package/release-scope.json +25 -0
- package/site-templates/designs/minimalism/sample/README.md +2 -2
- package/site-templates/designs/minimalism/sample/content/en/HomePage/home.mdx +1 -1
- package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.md +4 -3
- package/templates/.claude/agents/web.md +10 -8
- package/templates/.claude/rules/architecture.md +10 -7
- package/templates/.claude/settings.json +12 -0
- package/templates/.env.example +24 -3
- package/templates/CLAUDE.md +38 -22
- package/templates/README.md +12 -12
- package/templates/apps/api/jest.config.cjs +1 -0
- package/templates/apps/api/package.json +1 -0
- package/templates/apps/mcp/CLAUDE.md +23 -10
- package/templates/apps/mcp/__tests__/catalog-drift.test.ts +160 -17
- package/templates/apps/mcp/__tests__/index.test.ts +118 -1
- package/templates/apps/mcp/__tests__/lib/commerce-claim.test.ts +425 -5
- package/templates/apps/mcp/__tests__/module-exclusion.test.ts +67 -3
- package/templates/apps/mcp/__tests__/server.test.ts +162 -1
- package/templates/apps/mcp/src/index.ts +35 -3
- package/templates/apps/mcp/src/lib/commerce-claim.ts +193 -24
- package/templates/apps/mcp/src/server.ts +77 -5
- package/templates/apps/mcp/src/tools/purchase.ts +1 -1
- package/templates/apps/web/app/.well-known/mcp.json/build-manifest.ts +15 -0
- package/templates/apps/web/app/.well-known/mcp.json/route.ts +10 -3
- package/templates/apps/web/src/lib/commerce-claim.ts +15 -6
- package/templates/content/_site.mdx +23 -4
- package/templates/database/CHANGELOG.md +7 -0
- package/templates/database/package.json +1 -1
- package/templates/package.json +2 -0
- package/versions.json +34 -33
- package/dist/modules/commerce/0.6.0.tar.gz +0 -0
- package/dist/modules/commerce/0.6.1.tar.gz +0 -0
- package/dist/modules/docs-blog/0.6.0.tar.gz +0 -0
- package/dist/modules/docs-blog/0.6.1.tar.gz +0 -0
- package/dist/modules/marketing-site/0.6.1.tar.gz +0 -0
- package/dist/modules/minimalism-site/0.6.1.tar.gz +0 -0
- package/dist/modules/multi-tenant/0.6.0.tar.gz +0 -0
- package/dist/modules/multi-tenant/0.6.1.tar.gz +0 -0
- package/dist/modules/saas-product/0.6.1.tar.gz +0 -0
- package/dist/modules/scheduling/0.6.0.tar.gz +0 -0
- package/dist/modules/scheduling/0.6.1.tar.gz +0 -0
- package/dist/modules/signal-collectors/0.6.0.tar.gz +0 -0
- package/dist/modules/signal-collectors/0.6.1.tar.gz +0 -0
- package/dist/modules/simple-service/0.6.1.tar.gz +0 -0
- package/dist/modules/workspace/0.6.0.tar.gz +0 -0
- package/dist/modules/workspace/0.6.1.tar.gz +0 -0
- package/site-templates/aliases/minimalism-site.TEMPLATE-MANIFEST.json +0 -538
- package/templates/.claude/skills/README.md +0 -37
- package/templates/.claude/skills/add-auth/SKILL.md +0 -261
- package/templates/.claude/skills/add-auth/references/env-vars.md +0 -98
- package/templates/.claude/skills/add-auth/references/oauth-app-setup.md +0 -172
- package/templates/.claude/skills/add-page/SKILL.md +0 -260
- package/templates/.claude/skills/add-page/references/page-types.md +0 -124
- package/templates/.claude/skills/add-page/scripts/site-pages.mjs +0 -87
- package/templates/.claude/skills/add-page/templates/comparison-page.mdx.tmpl +0 -99
- package/templates/.claude/skills/add-page/templates/content.mdx.tmpl +0 -18
- package/templates/.claude/skills/add-page/templates/flow-landing-page.mdx.tmpl +0 -43
- package/templates/.claude/skills/add-page/templates/report-page.mdx.tmpl +0 -52
- package/templates/.claude/skills/add-page/templates/reports-list.mdx.tmpl +0 -38
- package/templates/.claude/skills/check-site/SKILL.md +0 -235
- package/templates/.claude/skills/check-site/references/common-errors.md +0 -113
- package/templates/.claude/skills/check-site/references/findings-glossary.md +0 -140
- package/templates/.claude/skills/check-site/references/severity-levels.md +0 -114
- package/templates/.claude/skills/fill-page/SKILL.md +0 -199
- package/templates/.claude/skills/fill-page/profiles/plumbing.yaml +0 -80
- package/templates/.claude/skills/fill-page/references/section-sources.md +0 -41
- package/templates/.claude/skills/setup-database/SKILL.md +0 -156
- package/templates/.claude/skills/setup-database/scripts/verify-inbox.ts +0 -154
- package/templates/.claude/skills/setup-deploy/SKILL.md +0 -275
- package/templates/.claude/skills/setup-deploy/references/env-vars-template.md +0 -192
- package/templates/.claude/skills/setup-deploy/references/runbook-template.md +0 -204
- package/templates/.claude/skills/setup-deploy/references/vercel-json-template.md +0 -98
- package/templates/.claude/skills/update-page/SKILL.md +0 -117
- package/templates/.claude/skills/update-page/scripts/update-page.ts +0 -640
- package/templates/.claude/skills/update-page/templates/redirects.mjs.tmpl +0 -31
- package/templates/.claude/skills/upgrade-plan/SKILL.md +0 -121
- package/templates/.claude/skills/upgrade-plan/references/options.md +0 -24
- package/templates/.claude/skills/upgrade-plan/scripts/upgrade-plan.ts +0 -527
- package/templates/apps/api/.ailk/inbox/2026-09-20T14-57-31.552Z-fallback-1789916251590-037e9005.json +0 -8
- package/templates/apps/api/.ailk/inbox/2026-09-20T14-57-33.840Z-fallback-1789916253842-b52659e9.json +0 -12
- package/templates/apps/api/.ailk/inbox/2026-09-20T14-57-33.844Z-fallback-1789916253845-6b266f8c.json +0 -12
- package/templates/apps/mcp/__tests__/lib/require-paid-tier.test.ts +0 -75
- 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 {
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
29
|
-
);
|
|
33
|
+
if (result.revoked === true) return [];
|
|
34
|
+
return Array.isArray(result.features) ? result.features : [];
|
|
30
35
|
} catch {
|
|
31
|
-
return
|
|
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
|
|
52
|
+
`siteIdentity.kind` takes one of four values:
|
|
53
53
|
|
|
54
|
-
- Organization
|
|
55
|
-
- Person
|
|
56
|
-
- LocalBusiness
|
|
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
|
package/templates/package.json
CHANGED
|
@@ -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.
|
|
3
|
-
"@working-theory/aeo": "0.
|
|
4
|
-
"@working-theory/agent-context": "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.
|
|
9
|
-
"@working-theory/api-client": "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.
|
|
12
|
-
"@working-theory/common": "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.
|
|
15
|
-
"@working-theory/content-projection": "0.
|
|
16
|
-
"@working-theory/email": "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.
|
|
19
|
-
"@working-theory/fumadocs-schema": "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.
|
|
22
|
-
"@working-theory/license": "0.
|
|
23
|
-
"@working-theory/metadata": "0.
|
|
24
|
-
"@working-theory/observability": "0.
|
|
25
|
-
"@working-theory/page-renderer": "0.
|
|
26
|
-
"@working-theory/
|
|
27
|
-
"@working-theory/schema
|
|
28
|
-
"@working-theory/schema-
|
|
29
|
-
"@working-theory/
|
|
30
|
-
"@working-theory/
|
|
31
|
-
"@working-theory/
|
|
32
|
-
"@working-theory/
|
|
33
|
-
"@working-theory/
|
|
34
|
-
"@working-theory/
|
|
35
|
-
"@working-theory/
|
|
36
|
-
"@working-theory/
|
|
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.
|
|
45
|
-
"@working-theory/ui-docs-blog": "0.23.
|
|
46
|
-
"@working-theory/ui-scheduling": "0.23.
|
|
47
|
-
"@working-theory/ui-signal-collectors": "0.24.
|
|
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.
|
|
52
|
+
"@working-theory/database": "0.30.0"
|
|
52
53
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|