create-ailk 0.44.0 → 0.46.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 +6 -3
- package/component-catalog.json +24 -1
- package/component-catalog.md +6 -5
- package/dist/add-module.d.ts +7 -0
- package/dist/add-module.js +17 -2
- package/dist/apply-design.js +1 -12
- package/dist/lib/env-catalog.js +2 -2
- package/dist/lib/import-mdx.js +10 -2
- package/dist/lib/license-key-files.d.ts +2 -0
- package/dist/lib/license-key-files.js +11 -0
- package/dist/paid-sections.d.ts +19 -0
- package/dist/paid-sections.js +41 -0
- package/dist/programmatic.js +56 -6
- package/dist/seed-workspace.d.ts +1 -1
- package/dist/seed-workspace.js +10 -3
- package/dist/surfaces.js +1 -1
- package/dist/update.d.ts +21 -2
- package/dist/update.js +188 -10
- package/package.json +3 -3
- package/templates/apps/api/.env.example +23 -0
- package/templates/apps/api/CLAUDE.md +17 -7
- package/templates/apps/api/src/lib/__mocks__/prisma.ts +11 -0
- package/templates/apps/mcp/.env.example +14 -3
- package/templates/apps/mcp/CLAUDE.md +47 -24
- package/templates/apps/mcp/src/index.ts +1 -1
- package/templates/apps/web/.env.example +1 -1
- package/templates/apps/web/CLAUDE.md +47 -16
- package/templates/apps/web/app/.well-known/mcp.json/build-manifest.ts +44 -41
- package/templates/apps/web/app/.well-known/mcp.json/route.ts +24 -33
- package/templates/apps/web/app/[locale]/layout.tsx +10 -7
- package/templates/apps/web/app/api/site-status/__tests__/route.test.ts +120 -0
- package/templates/apps/web/app/api/site-status/route.ts +62 -0
- package/templates/apps/web/app/llms.txt/route.ts +3 -3
- package/templates/apps/web/app/openapi.json/__tests__/route.test.ts +21 -4
- package/templates/apps/web/app/openapi.json/route.ts +10 -9
- package/templates/apps/web/app/sitemap.xml/route.ts +3 -3
- package/templates/apps/web/auth.ts +25 -1
- package/templates/apps/web/lib/__tests__/fixtures/mcp-stub-server.ts +245 -0
- package/templates/apps/web/lib/__tests__/mcp-served-tools.test.ts +395 -0
- package/templates/apps/web/lib/__tests__/offerings-pricing.test.ts +112 -0
- package/templates/apps/web/lib/__tests__/pricing-page.test.ts +280 -0
- package/templates/apps/web/lib/__tests__/site-brand.test.ts +5 -6
- package/templates/apps/web/lib/__tests__/site-visibility.test.ts +64 -0
- package/templates/apps/web/lib/__tests__/structured-data.test.tsx +108 -11
- package/templates/apps/web/lib/license-key-store.ts +1 -1
- package/templates/apps/web/lib/mcp-oauth.ts +64 -0
- package/templates/apps/web/lib/mcp-served-tools.ts +231 -0
- package/templates/apps/web/lib/offerings-pricing.ts +30 -6
- package/templates/apps/web/lib/pricing-page.ts +142 -35
- package/templates/apps/web/lib/site-brand.tsx +1 -7
- package/templates/apps/web/lib/site-visibility.ts +45 -0
- package/templates/apps/web/messages/en.json +8 -0
- package/templates/apps/web/middleware.ts +16 -1
- package/templates/apps/web/src/lib/routes.ts +3 -3
- package/versions.json +51 -51
- package/templates/apps/web/app/.well-known/ai-plugin.json/route.ts +0 -93
- package/templates/apps/web/lib/release-scope.ts +0 -47
package/dist/update.js
CHANGED
|
@@ -87,6 +87,15 @@
|
|
|
87
87
|
* additively. A written web file that uses, through `t(…)`, a template key a
|
|
88
88
|
* catalog still lacks after that is held with the catalog.
|
|
89
89
|
*
|
|
90
|
+
* The web build script comes with the template (#11940). `package.json` is
|
|
91
|
+
* never recorded, so `apps/web/package.json`'s `scripts.build` is read
|
|
92
|
+
* against the published history, as a stale copy is (#11147): a value equal
|
|
93
|
+
* to a published template's in the run's range is set to the running
|
|
94
|
+
* template's and listed under "Build scripts carried"; one matching none is
|
|
95
|
+
* the site's own, left as it is and listed under "Needs review". The carry
|
|
96
|
+
* waits, under review, while the site would lack a `tsx` file the new value
|
|
97
|
+
* runs.
|
|
98
|
+
*
|
|
90
99
|
* A route the site declined in `customizations.yaml` `declined_routes`
|
|
91
100
|
* (#11260) is the site's decision: no file under its directory is written —
|
|
92
101
|
* not updated, not added, not supplied as another file's dependency — and
|
|
@@ -97,7 +106,7 @@
|
|
|
97
106
|
*/
|
|
98
107
|
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, rmdirSync, statSync, writeFileSync, } from "node:fs";
|
|
99
108
|
import { createRequire } from "node:module";
|
|
100
|
-
import { dirname, join, relative, resolve, sep } from "node:path";
|
|
109
|
+
import { dirname, join, posix, relative, resolve, sep } from "node:path";
|
|
101
110
|
import { pathToFileURL } from "node:url";
|
|
102
111
|
import { parseArgs } from "node:util";
|
|
103
112
|
import { AddModuleRefusedError, readArchitectureHeader } from "./add-module-core.js";
|
|
@@ -111,16 +120,20 @@ import { ENV_CATALOG } from "./lib/env-catalog.js";
|
|
|
111
120
|
import { assertContentLengthWithinLimit, assertHttpsRegistryUrl, fetchTimeoutSignal, } from "./lib/fetch-guard.js";
|
|
112
121
|
import { DEFAULT_AILK_NPM_REGISTRY_URL, fetchTemplateSnapshot } from "./lib/fetch-template-snapshot.js";
|
|
113
122
|
import { exportsName, listFilesUnder, namedImportsOf } from "./lib/import-graph.js";
|
|
123
|
+
import { readSiteKey } from "./lib/license-key-files.js";
|
|
114
124
|
import { mergeThreeWay } from "./lib/merge-three-way.js";
|
|
125
|
+
import { deriveLevel } from "./lib/module-license-gate.js";
|
|
126
|
+
import { LEVEL_LABEL } from "./lib/module-tier.js";
|
|
115
127
|
import { publicTreeRemoved } from "./lib/site-modules.js";
|
|
116
128
|
import { escapeBareBraces, findBareBraces } from "./mdx-braces.js";
|
|
117
129
|
import { MODULE_SLICES } from "./module-architecture.js";
|
|
118
|
-
import { MODULE_FLAGS_PATH, PAID_MCP_TOOLS_PATH, PAID_SECTIONS_PATH, renderSitePaidSections, writeModuleFlags, writePaidMcpTools, writePaidSectionsRegistry, } from "./paid-sections.js";
|
|
130
|
+
import { MODULE_FLAGS_PATH, PAID_MCP_TOOLS_PATH, PAID_SECTIONS_PATH, levelMcpPackages, renderSitePaidSections, withLevelMcpPackages, writeModuleFlags, writePaidMcpTools, writePaidSectionsRegistry, } from "./paid-sections.js";
|
|
119
131
|
import { ParseError } from "./parse-args.js";
|
|
120
132
|
import { PAGE_DECISION_GUIDANCE, RoutesRefusedError, checkRoutes, customizationsRecord, isGenerated, writeRoutes } from "./routes.js";
|
|
121
133
|
import { planSeamRefresh, seamRow, siteSeamRenders } from "./seam-refresh.js";
|
|
122
134
|
import { SITE_LISTING_PATH } from "./site-listing-path.js";
|
|
123
135
|
import { SITE_ROSTER_PATH, planServedRoster, readRosterPageRoutes } from "./site-roster.js";
|
|
136
|
+
import { substituteMarkers } from "./substitute.js";
|
|
124
137
|
import { GATEABLE_SURFACES, excludedRoutePaths, isRemovedPublicRoutePath, resolveSurfaces, surfacesNamedByRoutes, } from "./surfaces.js";
|
|
125
138
|
import { DATABASE_BOOT_FILES, ROOT_TOOL_FILES, TEMPLATE_RECORD_PATH, isRecordable, parseTemplateRecord, serializeTemplateRecord, sha256Hex, } from "./template-record.js";
|
|
126
139
|
import { MCP_SEAM_PATH, MCP_SERVER_HUB, SPOKE_SEAM_FILES, TopologyError, isSpokeExcluded, readSpokeShape, spokeExclusions, } from "./topology.js";
|
|
@@ -1306,6 +1319,25 @@ const WEB_PACKAGE_JSON = "apps/web/package.json";
|
|
|
1306
1319
|
* Frozen; a name joins only with a spec.
|
|
1307
1320
|
*/
|
|
1308
1321
|
const WEB_CARRIED_DEPENDENCIES = Object.freeze(["botid"]);
|
|
1322
|
+
/**
|
|
1323
|
+
* The `apps/web/package.json` scripts `update` carries (#11940): a value that
|
|
1324
|
+
* is a published template's in the run's range moves to the running
|
|
1325
|
+
* template's; one matching none is the site's own and is reviewed. Frozen; a
|
|
1326
|
+
* name joins only with a spec.
|
|
1327
|
+
*/
|
|
1328
|
+
const WEB_CARRIED_SCRIPTS = Object.freeze(["build"]);
|
|
1329
|
+
/** Each `tsx <file>.ts` a script runs (#11940 D4), resolved under `apps/web/`. */
|
|
1330
|
+
const TSX_STEP = /\btsx\s+(\S+\.ts)\b/g;
|
|
1331
|
+
/** The `scripts` of a template's `apps/web/package.json` text — `undefined` when not JSON or not an object (#11940 D3). */
|
|
1332
|
+
function webScriptsOf(text) {
|
|
1333
|
+
try {
|
|
1334
|
+
const scripts = JSON.parse(text).scripts;
|
|
1335
|
+
return isPlainObject(scripts) ? scripts : undefined;
|
|
1336
|
+
}
|
|
1337
|
+
catch {
|
|
1338
|
+
return undefined;
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1309
1341
|
/** Whether the site's `pkg` declares `name`, in `dependencies` or `devDependencies`, at any range. */
|
|
1310
1342
|
function declares(pkg, name) {
|
|
1311
1343
|
return Object.hasOwn(pkg.dependencies ?? {}, name) || Object.hasOwn(pkg.devDependencies ?? {}, name);
|
|
@@ -1456,8 +1488,20 @@ export async function updateSite(opts) {
|
|
|
1456
1488
|
// ── The running version's rendered copies ─────────────────────────────
|
|
1457
1489
|
const runningRaw = walkLocalTemplates(opts.templatesDir);
|
|
1458
1490
|
const newMap = renderSnapshot(runningRaw, record.projectName, version);
|
|
1491
|
+
// #11940 D3 — a version's `apps/web/package.json` scripts, read before
|
|
1492
|
+
// `renderSnapshot` drops the unrecorded path. Markers only: the workspace
|
|
1493
|
+
// version pass rewrites `dependencies`, never `scripts`, and would refuse
|
|
1494
|
+
// here for want of a versions map.
|
|
1495
|
+
const webScriptsIn = (raw, v) => {
|
|
1496
|
+
const bytes = raw.get(WEB_PACKAGE_JSON);
|
|
1497
|
+
return bytes === undefined
|
|
1498
|
+
? undefined
|
|
1499
|
+
: webScriptsOf(substituteMarkers(Buffer.from(bytes).toString("utf8"), markersForVersion(record.projectName, v)));
|
|
1500
|
+
};
|
|
1501
|
+
const runningWebScripts = webScriptsIn(runningRaw, version);
|
|
1459
1502
|
// ── A cache of rendered copies by version, fetched at most once each ──
|
|
1460
1503
|
const versionCache = new Map();
|
|
1504
|
+
const webScriptsByVersion = new Map();
|
|
1461
1505
|
async function loadVersionMap(v) {
|
|
1462
1506
|
const cached = versionCache.get(v);
|
|
1463
1507
|
if (cached !== undefined)
|
|
@@ -1474,6 +1518,7 @@ export async function updateSite(opts) {
|
|
|
1474
1518
|
...(opts.fetchImpl !== undefined ? { fetchImpl: opts.fetchImpl } : {}),
|
|
1475
1519
|
});
|
|
1476
1520
|
result = renderSnapshot(raw, record.projectName, v);
|
|
1521
|
+
webScriptsByVersion.set(v, webScriptsIn(raw, v));
|
|
1477
1522
|
}
|
|
1478
1523
|
catch (err) {
|
|
1479
1524
|
result = { error: err.message };
|
|
@@ -1570,6 +1615,55 @@ export async function updateSite(opts) {
|
|
|
1570
1615
|
const mcpMove = existsSync(mcpPkgPath)
|
|
1571
1616
|
? planMcpMove(targetDir, header.modules, spoke === undefined, new Set(Object.keys(record.files)), opts.versions ?? {})
|
|
1572
1617
|
: undefined;
|
|
1618
|
+
// ── The level's MCP packs (#11952 D4), planned before the first write ──
|
|
1619
|
+
// A site missing a paid MCP pack its licence level ships gets it. The
|
|
1620
|
+
// level comes only from the site's own key (NFR1); a site already holding
|
|
1621
|
+
// every pack either paid level ships reads no key and sends no request.
|
|
1622
|
+
let mcpLevelPlan;
|
|
1623
|
+
let mcpLevelUnchecked;
|
|
1624
|
+
if (existsSync(mcpPkgPath)) {
|
|
1625
|
+
const haveText = mcpMove?.packageJson ?? readFileSync(mcpPkgPath, "utf8");
|
|
1626
|
+
let have;
|
|
1627
|
+
try {
|
|
1628
|
+
have = JSON.parse(haveText).dependencies ?? {};
|
|
1629
|
+
}
|
|
1630
|
+
catch (err) {
|
|
1631
|
+
throw new UpdateRefusedError(`${MCP_PACKAGE_JSON} is not valid JSON: ${err.message}`);
|
|
1632
|
+
}
|
|
1633
|
+
const paidPacks = [...new Set([...levelMcpPackages("pro"), ...levelMcpPackages("pro-plus")])];
|
|
1634
|
+
if (!paidPacks.every((name) => Object.hasOwn(have, name))) {
|
|
1635
|
+
const key = readSiteKey(targetDir, opts.env ?? process.env);
|
|
1636
|
+
let level = "free";
|
|
1637
|
+
if (key === undefined) {
|
|
1638
|
+
if (paidPacks.some((name) => Object.hasOwn(have, name))) {
|
|
1639
|
+
mcpLevelUnchecked = "no licence key (ailk.key or AILK_LICENSE_KEY)";
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
else {
|
|
1643
|
+
try {
|
|
1644
|
+
({ level } = await deriveLevel({
|
|
1645
|
+
licenseKey: key,
|
|
1646
|
+
...(opts.moduleRegistryUrl !== undefined ? { registryUrl: opts.moduleRegistryUrl } : {}),
|
|
1647
|
+
...(opts.fetchImpl !== undefined ? { fetchImpl: opts.fetchImpl } : {}),
|
|
1648
|
+
}));
|
|
1649
|
+
}
|
|
1650
|
+
catch (err) {
|
|
1651
|
+
mcpLevelUnchecked = `could not determine this site's licence level: ${err.message}`;
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
if (level !== "free") {
|
|
1655
|
+
let next;
|
|
1656
|
+
try {
|
|
1657
|
+
next = withLevelMcpPackages(haveText, level, opts.versions ?? {});
|
|
1658
|
+
}
|
|
1659
|
+
catch (err) {
|
|
1660
|
+
throw new UpdateRefusedError(err.message);
|
|
1661
|
+
}
|
|
1662
|
+
if (next.added.length > 0)
|
|
1663
|
+
mcpLevelPlan = { level, packages: next.added, text: next.text };
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1573
1667
|
// ── The API move (#9566), planned before the first write ──────────────
|
|
1574
1668
|
// A site scaffolded before #9564 carries the server under apps/api/src, an
|
|
1575
1669
|
// apps/api still named @working-theory/api and no @working-theory/api
|
|
@@ -2401,9 +2495,58 @@ export async function updateSite(opts) {
|
|
|
2401
2495
|
}
|
|
2402
2496
|
}
|
|
2403
2497
|
}
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2498
|
+
// #11940 — each carried script is the running template's when the site's
|
|
2499
|
+
// value is a published template's in the run's range, oldest first (the
|
|
2500
|
+
// scaffold's version is the floor, so the common case reads one tarball);
|
|
2501
|
+
// one matching none is the site's own, reviewed and left as it is. The
|
|
2502
|
+
// carry waits while a `tsx` file the running value runs would be absent
|
|
2503
|
+
// once the run lands. The hold cascade is final here and no write has run.
|
|
2504
|
+
const scriptsCarried = [];
|
|
2505
|
+
if (webDependencies !== undefined) {
|
|
2506
|
+
const siteScripts = webDependencies.pkg.scripts ?? {};
|
|
2507
|
+
for (const name of WEB_CARRIED_SCRIPTS) {
|
|
2508
|
+
const running = runningWebScripts?.[name];
|
|
2509
|
+
const site = siteScripts[name];
|
|
2510
|
+
if (typeof running !== "string" || site === running)
|
|
2511
|
+
continue;
|
|
2512
|
+
let matched;
|
|
2513
|
+
for (const v of [...(await (versionsInRange ??= listVersionsInRange()))].reverse()) {
|
|
2514
|
+
await loadVersionMap(v);
|
|
2515
|
+
const scripts = webScriptsByVersion.get(v);
|
|
2516
|
+
if (scripts !== undefined && scripts[name] === site) {
|
|
2517
|
+
matched = v;
|
|
2518
|
+
break;
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2521
|
+
if (matched === undefined) {
|
|
2522
|
+
review.push({
|
|
2523
|
+
path: WEB_PACKAGE_JSON,
|
|
2524
|
+
reason: `scripts.${name} is ${site === undefined ? "absent" : JSON.stringify(site)}, which matches no create-ailk template this run read; this template's is ${JSON.stringify(running)} — left as it is`,
|
|
2525
|
+
});
|
|
2526
|
+
continue;
|
|
2527
|
+
}
|
|
2528
|
+
const missing = [...running.matchAll(TSX_STEP)]
|
|
2529
|
+
.map((m) => posix.join(WEB_ROOT, m[1]))
|
|
2530
|
+
.find((path) => !presentAfter(path));
|
|
2531
|
+
if (missing !== undefined) {
|
|
2532
|
+
review.push({
|
|
2533
|
+
path: WEB_PACKAGE_JSON,
|
|
2534
|
+
reason: `scripts.${name} not carried: this template's ${JSON.stringify(running)} runs ${missing}, which this site will not have`,
|
|
2535
|
+
});
|
|
2536
|
+
continue;
|
|
2537
|
+
}
|
|
2538
|
+
(webDependencies.pkg.scripts ??= {})[name] = running;
|
|
2539
|
+
scriptsCarried.push({ script: name, version: matched });
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
const webDependenciesAdded = Object.keys(webDependencies?.entries ?? {}).sort();
|
|
2543
|
+
const webPackageJson = webDependencies === undefined
|
|
2544
|
+
? undefined
|
|
2545
|
+
: webDependenciesAdded.length > 0
|
|
2546
|
+
? withDependencies(webDependencies.pkg, webDependencies.entries)
|
|
2547
|
+
: scriptsCarried.length > 0
|
|
2548
|
+
? `${JSON.stringify(webDependencies.pkg, null, 2)}\n`
|
|
2549
|
+
: undefined;
|
|
2407
2550
|
// #11216 — a dependency written this run is in the site after all.
|
|
2408
2551
|
for (let i = skipped.length - 1; i >= 0; i--) {
|
|
2409
2552
|
const path = skipped[i].path;
|
|
@@ -2538,6 +2681,12 @@ export async function updateSite(opts) {
|
|
|
2538
2681
|
}
|
|
2539
2682
|
pruneEmptyDirs(join(targetDir, ...MCP_SRC.split("/")));
|
|
2540
2683
|
}
|
|
2684
|
+
// #11952 D4 — the level's packs, planned over the move's text so its packs are kept.
|
|
2685
|
+
if (mcpLevelPlan !== undefined) {
|
|
2686
|
+
writeFileSync(mcpPkgPath, mcpLevelPlan.text);
|
|
2687
|
+
if (!moved.updated.includes(MCP_PACKAGE_JSON))
|
|
2688
|
+
moved.updated.push(MCP_PACKAGE_JSON);
|
|
2689
|
+
}
|
|
2541
2690
|
const registry = writePaidMcpTools(targetDir);
|
|
2542
2691
|
if (registry === "added")
|
|
2543
2692
|
moved.added.push(PAID_MCP_TOOLS_PATH);
|
|
@@ -2693,6 +2842,12 @@ export async function updateSite(opts) {
|
|
|
2693
2842
|
...(adopted.some((row) => notHeld(row.path))
|
|
2694
2843
|
? { adopted: adopted.filter((row) => notHeld(row.path)) }
|
|
2695
2844
|
: {}),
|
|
2845
|
+
...(scriptsCarried.length > 0 ? { scriptsCarried } : {}),
|
|
2846
|
+
...(webDependenciesAdded.length > 0 ? { webDependenciesAdded } : {}),
|
|
2847
|
+
...(mcpLevelPlan !== undefined
|
|
2848
|
+
? { mcpPackagesAdded: { level: mcpLevelPlan.level, packages: mcpLevelPlan.packages } }
|
|
2849
|
+
: {}),
|
|
2850
|
+
...(mcpLevelUnchecked !== undefined ? { mcpLevelUnchecked } : {}),
|
|
2696
2851
|
headingsAdded: headings.written.map(sitePath),
|
|
2697
2852
|
bracesEscaped,
|
|
2698
2853
|
...(regenerated.length > 0 ? { regenerated: regenerated.sort() } : {}),
|
|
@@ -2808,6 +2963,15 @@ export function formatUpdateReport(result) {
|
|
|
2808
2963
|
lines.push(`Adopted (${result.adopted.length}):`);
|
|
2809
2964
|
lines.push(...result.adopted.map(({ path, version }) => ` ${path} — matched the ${version} template`));
|
|
2810
2965
|
}
|
|
2966
|
+
if (result.scriptsCarried !== undefined) {
|
|
2967
|
+
lines.push(`Build scripts carried (${result.scriptsCarried.length}):`);
|
|
2968
|
+
lines.push(...result.scriptsCarried.map(({ script, version }) => ` ${WEB_PACKAGE_JSON} scripts.${script} — was the ${version} template's`));
|
|
2969
|
+
}
|
|
2970
|
+
if (result.mcpPackagesAdded !== undefined) {
|
|
2971
|
+
const { level, packages } = result.mcpPackagesAdded;
|
|
2972
|
+
lines.push(`MCP packages added for the ${LEVEL_LABEL[level]} level (${packages.length}):`);
|
|
2973
|
+
lines.push(...packages.map((pkg) => ` ${pkg}`));
|
|
2974
|
+
}
|
|
2811
2975
|
if (result.review.length > 0) {
|
|
2812
2976
|
lines.push(`Needs review (${result.review.length}):`);
|
|
2813
2977
|
lines.push(...result.review.map((row) => ` ${row.path} — ${row.reason}`));
|
|
@@ -2864,6 +3028,8 @@ export function formatUpdateReport(result) {
|
|
|
2864
3028
|
result.regenerated === undefined &&
|
|
2865
3029
|
result.routesWritten === undefined &&
|
|
2866
3030
|
result.cliPin === undefined &&
|
|
3031
|
+
result.scriptsCarried === undefined &&
|
|
3032
|
+
result.mcpPackagesAdded === undefined &&
|
|
2867
3033
|
result.review.length === 0 &&
|
|
2868
3034
|
result.skipped.length === 0 &&
|
|
2869
3035
|
result.heldBack.length === 0 &&
|
|
@@ -2871,18 +3037,24 @@ export function formatUpdateReport(result) {
|
|
|
2871
3037
|
result.droppedRows === undefined &&
|
|
2872
3038
|
result.surfacesDeclared === undefined &&
|
|
2873
3039
|
result.rosterRowsDropped === undefined;
|
|
3040
|
+
// #11952 D4 — why the level's packs were not checked: the report's last line.
|
|
3041
|
+
const unchecked = result.mcpLevelUnchecked !== undefined
|
|
3042
|
+
? `MCP packages for this site's level not checked — ${result.mcpLevelUnchecked}\n`
|
|
3043
|
+
: "";
|
|
2874
3044
|
if (nothingHappened) {
|
|
2875
|
-
return `[create-ailk] Already up to date (create-ailk ${result.version}).\n`;
|
|
3045
|
+
return `[create-ailk] Already up to date (create-ailk ${result.version}).\n${unchecked}`;
|
|
2876
3046
|
}
|
|
2877
3047
|
// #9567 / #9566 — the MCP and API moves add dependencies (the mcp README
|
|
2878
3048
|
// § Move, step 7, names the install; the API half says the same), and so
|
|
2879
|
-
// does the web app's carried-dependency step (#9889 D9)
|
|
3049
|
+
// does the web app's carried-dependency step (#9889 D9) — never a write
|
|
3050
|
+
// that only carried a build script (#11940).
|
|
2880
3051
|
for (const pkgJson of [MCP_PACKAGE_JSON, API_PACKAGE_JSON, WEB_PACKAGE_JSON]) {
|
|
2881
|
-
|
|
3052
|
+
const gained = pkgJson === WEB_PACKAGE_JSON ? result.webDependenciesAdded !== undefined : result.updated.includes(pkgJson);
|
|
3053
|
+
if (gained) {
|
|
2882
3054
|
lines.push(`${pkgJson} gained dependencies: run \`pnpm install\`.`);
|
|
2883
3055
|
}
|
|
2884
3056
|
}
|
|
2885
|
-
return lines.join("\n") + "\n";
|
|
3057
|
+
return lines.join("\n") + "\n" + unchecked;
|
|
2886
3058
|
}
|
|
2887
3059
|
export const UPDATE_HELP = `create-ailk update — bring template fixes into a site's copied app code.
|
|
2888
3060
|
|
|
@@ -2908,7 +3080,13 @@ on one side and a value on the other; a written apps/web file that uses
|
|
|
2908
3080
|
through t(...) a key the catalog then lacks is held with it, listed under
|
|
2909
3081
|
"Held back with <catalog>". Each @working-theory/* package a written apps/web
|
|
2910
3082
|
file imports that apps/web/package.json does not declare is added to its
|
|
2911
|
-
dependencies at this release's version.
|
|
3083
|
+
dependencies at this release's version. A site missing a paid MCP package
|
|
3084
|
+
its licence level ships gets it in apps/mcp/package.json; the level is read
|
|
3085
|
+
from the site's key (ailk.key, else AILK_LICENSE_KEY) through the module
|
|
3086
|
+
registry, and a run with no key adds none. apps/web/package.json's
|
|
3087
|
+
scripts.build is set to this template's when it is a published create-ailk
|
|
3088
|
+
template's, listed under "Build scripts carried"; a build script matching no
|
|
3089
|
+
template's is left as it is and listed under "Needs review". An edited file whose
|
|
2912
3090
|
bytes are another published create-ailk version's copy is a stale copy, not
|
|
2913
3091
|
an edit: it is overwritten or removed as an untouched file is, listed with
|
|
2914
3092
|
the version it matched. An edit that touches only comment lines is listed as
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-ailk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0",
|
|
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/
|
|
32
|
-
"@working-theory/
|
|
31
|
+
"@working-theory/templates": "0.74.0",
|
|
32
|
+
"@working-theory/schema": "0.74.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
|