create-ailk 0.47.0 → 0.48.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 (137) hide show
  1. package/README.md +192 -43
  2. package/component-catalog.json +223 -285
  3. package/component-catalog.md +1 -1
  4. package/dist/apply-design.d.ts +26 -68
  5. package/dist/apply-design.js +150 -322
  6. package/dist/cli.js +152 -17
  7. package/dist/compare-chrome.d.ts +108 -0
  8. package/dist/compare-chrome.js +481 -0
  9. package/dist/compare-look.d.ts +94 -0
  10. package/dist/compare-look.js +378 -0
  11. package/dist/copy.js +1 -1
  12. package/dist/design-compile.d.ts +17 -21
  13. package/dist/design-compile.js +32 -56
  14. package/dist/design-files.d.ts +93 -0
  15. package/dist/design-files.js +312 -0
  16. package/dist/design-home.d.ts +4 -2
  17. package/dist/design-home.js +88 -6
  18. package/dist/design-names.d.ts +13 -0
  19. package/dist/design-names.js +76 -0
  20. package/dist/design-package.d.ts +46 -56
  21. package/dist/design-package.js +285 -288
  22. package/dist/design-presets.d.ts +41 -0
  23. package/dist/design-presets.js +83 -4
  24. package/dist/design-scaffold.d.ts +12 -2
  25. package/dist/design-scaffold.js +72 -34
  26. package/dist/generated/design-settings.d.ts +56 -0
  27. package/dist/generated/design-settings.js +237 -0
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.js +2 -2
  30. package/dist/inventory.d.ts +3 -2
  31. package/dist/inventory.js +10 -4
  32. package/dist/lib/design-checks.d.ts +46 -0
  33. package/dist/lib/design-checks.js +79 -1
  34. package/dist/lib/env-catalog.js +1 -1
  35. package/dist/lib/module-license-gate.d.ts +1 -1
  36. package/dist/lib/module-license-gate.js +1 -1
  37. package/dist/lib/render-verdict.d.ts +13 -1
  38. package/dist/lib/render-verdict.js +41 -1
  39. package/dist/look-hub.d.ts +44 -0
  40. package/dist/look-hub.js +130 -0
  41. package/dist/look-record.d.ts +35 -0
  42. package/dist/look-record.js +85 -0
  43. package/dist/look-samples.d.ts +66 -0
  44. package/dist/look-samples.js +456 -0
  45. package/dist/look-settings.d.ts +53 -0
  46. package/dist/look-settings.js +807 -0
  47. package/dist/module-architecture.js +12 -0
  48. package/dist/parse-args.d.ts +10 -6
  49. package/dist/parse-args.js +26 -13
  50. package/dist/programmatic.d.ts +1 -19
  51. package/dist/programmatic.js +65 -103
  52. package/dist/retired-design-bodies.d.ts +29 -0
  53. package/dist/retired-design-bodies.js +51 -0
  54. package/dist/seed-flows.d.ts +1 -1
  55. package/dist/seed-flows.js +12 -14
  56. package/dist/seed-workspace.d.ts +4 -1
  57. package/dist/seed-workspace.js +139 -17
  58. package/dist/site-chrome.d.ts +42 -41
  59. package/dist/site-chrome.js +51 -70
  60. package/dist/site-fonts.d.ts +14 -14
  61. package/dist/site-fonts.js +9 -4
  62. package/dist/starter-grid.d.ts +2 -2
  63. package/dist/strip-look-copies.d.ts +67 -0
  64. package/dist/strip-look-copies.js +591 -0
  65. package/dist/template-manifest.d.ts +6 -14
  66. package/dist/template-manifest.js +0 -9
  67. package/dist/template-record.d.ts +3 -1
  68. package/dist/template-record.js +3 -1
  69. package/dist/topology.d.ts +15 -0
  70. package/dist/topology.js +60 -0
  71. package/dist/update.d.ts +57 -1
  72. package/dist/update.js +742 -13
  73. package/package.json +3 -4
  74. package/site-templates/aliases/hub.TEMPLATE-MANIFEST.json +2 -31
  75. package/site-templates/designs/minimalism/DESIGN.md +163 -297
  76. package/site-templates/designs/minimalism/LOOK.md +42 -0
  77. package/site-templates/designs/minimalism/design.yaml +167 -0
  78. package/site-templates/designs/standard/DESIGN.md +145 -149
  79. package/site-templates/designs/standard/LOOK.md +42 -0
  80. package/site-templates/designs/standard/design.yaml +72 -0
  81. package/site-templates/marketing-site/TEMPLATE-MANIFEST.json +2 -31
  82. package/site-templates/marketing-site/TEMPLATE-MANIFEST.md +1 -25
  83. package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.json +2 -31
  84. package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.md +1 -25
  85. package/site-templates/shapes/local-business-service/TEMPLATE-MANIFEST.json +2 -31
  86. package/site-templates/shapes/local-business-service/TEMPLATE-MANIFEST.md +1 -25
  87. package/site-templates/shapes/organization-service/TEMPLATE-MANIFEST.json +2 -31
  88. package/site-templates/shapes/organization-service/TEMPLATE-MANIFEST.md +1 -25
  89. package/site-templates/shapes/person-service/TEMPLATE-MANIFEST.json +2 -31
  90. package/site-templates/shapes/person-service/TEMPLATE-MANIFEST.md +1 -25
  91. package/site-templates/shapes/person-service/content/_site.mdx +0 -26
  92. package/templates/.claude/rules/extending.md +3 -2
  93. package/templates/.env.example +11 -4
  94. package/templates/CLAUDE.md +1 -1
  95. package/templates/DESIGN.md +145 -149
  96. package/templates/README.md +15 -16
  97. package/templates/apps/api/.env.example +11 -4
  98. package/templates/apps/api/CLAUDE.md +6 -4
  99. package/templates/apps/api/src/lib/__mocks__/prisma.ts +15 -5
  100. package/templates/apps/mcp/CLAUDE.md +4 -2
  101. package/templates/apps/web/.env.example +10 -3
  102. package/templates/apps/web/CLAUDE.md +14 -3
  103. package/templates/apps/web/app/[locale]/layout.tsx +53 -50
  104. package/templates/apps/web/app/not-found.tsx +11 -11
  105. package/templates/apps/web/auth.ts +48 -35
  106. package/templates/apps/web/jest.config.cjs +5 -0
  107. package/templates/apps/web/lib/__tests__/hub-site-config.test.ts +179 -31
  108. package/templates/apps/web/lib/__tests__/library-fonts.test.ts +35 -0
  109. package/templates/apps/web/lib/__tests__/page-chrome-navigation.test.ts +71 -32
  110. package/templates/apps/web/lib/__tests__/page-chrome.test.ts +123 -26
  111. package/templates/apps/web/lib/__tests__/section-look.test.ts +150 -0
  112. package/templates/apps/web/lib/__tests__/site-theme.test.ts +81 -289
  113. package/templates/apps/web/lib/deck-page.ts +3 -10
  114. package/templates/apps/web/lib/deploy-fonts.ts +12 -0
  115. package/templates/apps/web/lib/hub-site-config.ts +97 -14
  116. package/templates/apps/web/lib/library-fonts.ts +41 -0
  117. package/templates/apps/web/lib/mcp-oauth.ts +11 -4
  118. package/templates/apps/web/lib/page-chrome.ts +52 -34
  119. package/templates/apps/web/lib/section-look.ts +28 -0
  120. package/templates/apps/web/lib/site-design.ts +205 -0
  121. package/templates/apps/web/lib/site-theme-head.ts +98 -13
  122. package/templates/apps/web/lib/site-theme.ts +40 -62
  123. package/templates/apps/web/messages/en.json +0 -6
  124. package/templates/apps/web/next.config.mjs +195 -6
  125. package/templates/apps/web/package.json +2 -0
  126. package/templates/apps/web/site-pages.config.tsx +4 -2
  127. package/templates/content/_site.mdx +0 -26
  128. package/templates/design.yaml +75 -0
  129. package/templates/project.yaml +14 -0
  130. package/versions.json +52 -51
  131. package/site-templates/marketing-site/DESIGN.md +0 -259
  132. package/site-templates/marketing-site-free/DESIGN.md +0 -259
  133. package/site-templates/saas-product/DESIGN.md +0 -259
  134. package/templates/apps/web/lib/__tests__/deck-page.test.ts +0 -288
  135. package/templates/apps/web/lib/__tests__/site-theme-head.test.ts +0 -70
  136. package/templates/apps/web/lib/site-chrome.ts +0 -46
  137. package/templates/apps/web/lib/site-fonts.ts +0 -15
@@ -1868,6 +1868,18 @@ export const EXCLUDE_TEMPLATE_DIRS = [
1868
1868
  // (after `--install`), in `update` and by `add-module`, never snapshotted.
1869
1869
  "apps/web/app/[locale]/docs",
1870
1870
  "apps/web/app/[locale]/blog",
1871
+ // #12593 — these five suites test the site's reading of the hub design
1872
+ // record (#12473, #12477, #12506) against the monorepo's own design library,
1873
+ // `packages/create-ailk/site-templates/designs/*/design.yaml`, which no
1874
+ // scaffold carries (two read it at load time, so the whole suite fails to
1875
+ // run). They keep running in this monorepo on every PR; a scaffold has
1876
+ // no library to read. page-chrome.test.ts ships (#10704 AC-3) and skips
1877
+ // its one library-reading block when the library is absent.
1878
+ "apps/web/lib/__tests__/deck-page.test.ts",
1879
+ "apps/web/lib/__tests__/deploy-fonts-build.test.ts",
1880
+ "apps/web/lib/__tests__/look-files-retired.test.ts",
1881
+ "apps/web/lib/__tests__/site-design.test.ts",
1882
+ "apps/web/lib/__tests__/site-theme-head.test.ts",
1871
1883
  ];
1872
1884
  export function paidModuleTemplateExclusions(snapshotRoots, repoRoot) {
1873
1885
  const roots = new Set(snapshotRoots);
@@ -16,16 +16,14 @@ export type ModuleName = (typeof RECOGNIZED_MODULES)[number];
16
16
  * Declared HERE rather than imported from `template-manifest.ts` for the
17
17
  * reason `RECOGNIZED_MODULES` is: importing the registry closes the runtime
18
18
  * cycle `template-names.ts`'s header records. `parse-args.test.ts` pins this
19
- * list, `RESERVED_SHAPES` and `RECOGNIZED_DESIGNS` to their authorities
20
- * (`STARTER_SHAPES`, `STARTER_DESIGNS`, `SHAPE_ROSTERS`).
19
+ * list and `RESERVED_SHAPES` to their authorities (`STARTER_SHAPES`,
20
+ * `SHAPE_ROSTERS`). The `--design` names are read from the installer's design
21
+ * directory (`shippedDesigns()`, #12500 D6), never typed here.
21
22
  */
22
23
  export declare const RECOGNIZED_SHAPES: readonly ["organization-product", "organization-service", "local-business-service", "person-service"];
23
24
  export type ShapeName = (typeof RECOGNIZED_SHAPES)[number];
24
25
  /** Shapes the contract names but no release builds yet. */
25
26
  export declare const RESERVED_SHAPES: readonly ["local-business-product"];
26
- /** The `--design` vocabulary (#6754 D1) — `STARTER_DESIGNS`, pinned by test. */
27
- export declare const RECOGNIZED_DESIGNS: readonly ["standard", "minimalism"];
28
- export type DesignName = (typeof RECOGNIZED_DESIGNS)[number];
29
27
  /**
30
28
  * The `--topology` vocabulary (#7426 D1) — orthogonal to `--shape`: any shape
31
29
  * can be scaffolded as either. Declared here rather than imported from
@@ -51,7 +49,7 @@ export interface CliOptions {
51
49
  /**
52
50
  * The starter's design (`--design`, #6754; widened to a path #6813 D1/D3):
53
51
  * a recognized name, lowercased, or an absolute directory holding a
54
- * `DESIGN.md`, case preserved. Never set with `template`.
52
+ * `design.yaml`, case preserved. Never set with `template`.
55
53
  */
56
54
  design?: string;
57
55
  /**
@@ -133,6 +131,12 @@ export interface ParseEnv {
133
131
  /** The two lines that install the `ailk` plugin in a Claude Code session (#7298). */
134
132
  export declare const PLUGIN_INSTALL_LINES: readonly ["/plugin marketplace add working-theory-labs/claude-plugins", "/plugin install ailk@working-theory"];
135
133
  export declare const helpText: string;
134
+ /**
135
+ * The help's list of `--design` names (#12500 D6), read from the installer's
136
+ * design directory when the help is printed — never at import, so `helpText`
137
+ * stays a constant that names no look.
138
+ */
139
+ export declare function designsHelp(): string;
136
140
  /**
137
141
  * Parse `create-ailk` argv. `env.interactive` defaults to false —
138
142
  * fail-closed: a caller that does not assert a human is present gets refusal
@@ -11,6 +11,7 @@ import { existsSync, statSync } from "node:fs";
11
11
  import { join, resolve } from "node:path";
12
12
  import { createInterface } from "node:readline/promises";
13
13
  import { parseArgs } from "node:util";
14
+ import { shippedDesigns } from "./design-names.js";
14
15
  import { assertLicenseKeyShape } from "./lib/license-key-files.js";
15
16
  import { RECOGNIZED_SURFACES, parseSurfaces } from "./surfaces.js";
16
17
  import { RECOGNIZED_TEMPLATES } from "./template-names.js";
@@ -38,8 +39,9 @@ export const RECOGNIZED_MODULES = [
38
39
  * Declared HERE rather than imported from `template-manifest.ts` for the
39
40
  * reason `RECOGNIZED_MODULES` is: importing the registry closes the runtime
40
41
  * cycle `template-names.ts`'s header records. `parse-args.test.ts` pins this
41
- * list, `RESERVED_SHAPES` and `RECOGNIZED_DESIGNS` to their authorities
42
- * (`STARTER_SHAPES`, `STARTER_DESIGNS`, `SHAPE_ROSTERS`).
42
+ * list and `RESERVED_SHAPES` to their authorities (`STARTER_SHAPES`,
43
+ * `SHAPE_ROSTERS`). The `--design` names are read from the installer's design
44
+ * directory (`shippedDesigns()`, #12500 D6), never typed here.
43
45
  */
44
46
  export const RECOGNIZED_SHAPES = [
45
47
  "organization-product",
@@ -49,8 +51,6 @@ export const RECOGNIZED_SHAPES = [
49
51
  ];
50
52
  /** Shapes the contract names but no release builds yet. */
51
53
  export const RESERVED_SHAPES = ["local-business-product"];
52
- /** The `--design` vocabulary (#6754 D1) — `STARTER_DESIGNS`, pinned by test. */
53
- export const RECOGNIZED_DESIGNS = ["standard", "minimalism"];
54
54
  /** What each shape is, for the prompt (D3). A shape without one is a type error. */
55
55
  const SHAPE_DESCRIPTIONS = {
56
56
  "organization-product": "a company selling a product",
@@ -110,9 +110,9 @@ Options:
110
110
  Installs that shape's Free starter. A run naming
111
111
  neither --shape nor --template asks for a shape on
112
112
  a terminal, and refuses without one.
113
- --design <design> The look to render the starter in: a design name
114
- (recognized: ${RECOGNIZED_DESIGNS.join(", ")}) or a
115
- directory holding a DESIGN.md. Defaults to the
113
+ --design <design> The look to render the starter in: the name of a
114
+ look this installer ships (listed below) or a
115
+ directory holding a design.yaml. Defaults to the
116
116
  starter's own.
117
117
  --template <name> The site template to install (recognized:
118
118
  ${RECOGNIZED_TEMPLATES.join(", ")}).
@@ -202,6 +202,14 @@ ${PLUGIN_INSTALL_LINES.map((line) => ` ${line}`).join("\n")}
202
202
 
203
203
  Reference: ADR 0007 — \`pnpm create ailk@latest\` is the canonical install path.
204
204
  `;
205
+ /**
206
+ * The help's list of `--design` names (#12500 D6), read from the installer's
207
+ * design directory when the help is printed — never at import, so `helpText`
208
+ * stays a constant that names no look.
209
+ */
210
+ export function designsHelp() {
211
+ return `Looks this installer ships (--design): ${shippedDesigns().join(", ")}\n`;
212
+ }
205
213
  /**
206
214
  * Parse `create-ailk` argv. `env.interactive` defaults to false —
207
215
  * fail-closed: a caller that does not assert a human is present gets refusal
@@ -421,20 +429,24 @@ function isExistingDir(path) {
421
429
  }
422
430
  /**
423
431
  * `dir` (resolved from `raw`) as a design path: an existing directory
424
- * holding a `DESIGN.md`, else `ParseError` naming `raw` (#6813 D1 rule 2).
432
+ * holding a `design.yaml`, else `ParseError` naming `raw` (#6813 D1 rule 2;
433
+ * #12468 — a `DESIGN.md` is a design's guide, never its settings).
425
434
  */
426
435
  function validateDesignDir(dir, raw) {
427
436
  if (!isExistingDir(dir)) {
428
437
  throw new ParseError(`design directory "${raw}" does not exist`);
429
438
  }
430
- if (!existsSync(join(dir, "DESIGN.md"))) {
431
- throw new ParseError(`design directory "${raw}" holds no DESIGN.md`);
439
+ if (!existsSync(join(dir, "design.yaml"))) {
440
+ if (existsSync(join(dir, "DESIGN.md"))) {
441
+ throw new ParseError(`design directory "${raw}" holds a DESIGN.md but no design.yaml — a design's settings are its design.yaml`);
442
+ }
443
+ throw new ParseError(`design directory "${raw}" holds no design.yaml`);
432
444
  }
433
445
  return dir;
434
446
  }
435
447
  /**
436
448
  * Validate `--design` (#6754 D2 step 2, widened #6813 D1): a recognized
437
- * name, or a directory holding a `DESIGN.md`. A value with no `/` or `\` is
449
+ * name, or a directory holding a `design.yaml`. A value with no `/` or `\` is
438
450
  * classified as a name first (trimmed and lowercased, filesystem never
439
451
  * consulted) — falling back to a path only when it names an existing
440
452
  * directory in `process.cwd()`, so `--design mydesign` and `--design
@@ -450,14 +462,15 @@ function parseDesign(raw) {
450
462
  const hasSeparator = trimmed.includes("/") || trimmed.includes("\\");
451
463
  if (!hasSeparator) {
452
464
  const name = trimmed.toLowerCase();
453
- if (RECOGNIZED_DESIGNS.includes(name)) {
465
+ const shipped = shippedDesigns();
466
+ if (shipped.includes(name)) {
454
467
  return name;
455
468
  }
456
469
  const dir = resolve(process.cwd(), trimmed);
457
470
  if (isExistingDir(dir)) {
458
471
  return validateDesignDir(dir, raw);
459
472
  }
460
- throw new ParseError(`unknown design "${raw}". Recognized: ${RECOGNIZED_DESIGNS.join(", ")}`);
473
+ throw new ParseError(`unknown design "${raw}". Recognized: ${shipped.join(", ")}`);
461
474
  }
462
475
  return validateDesignDir(resolve(process.cwd(), trimmed), raw);
463
476
  }
@@ -20,7 +20,6 @@ import { type SyncClaudeMdResult } from "./claude-md.js";
20
20
  import { CATALOG_TARGET_PATH } from "./component-catalog.js";
21
21
  import { type ModuleName } from "./parse-args.js";
22
22
  import { type RemoveModuleResult } from "./remove-module.js";
23
- import { type TemplateLayout } from "./site-chrome.js";
24
23
  import { type SyncRoutesResult } from "./sync-routes.js";
25
24
  import { type StarterShape } from "./template-manifest.js";
26
25
  import { type Topology } from "./topology.js";
@@ -112,16 +111,7 @@ export interface ScaffoldOptions {
112
111
  /** Injected fetch for tests. Never a live network call in CI or in this repo's evidence runs. */
113
112
  fetchImpl?: typeof fetch;
114
113
  /**
115
- * Resolved template layout knobs (#5612 D1/D2) — INTERNAL: populated by
116
- * `scaffold()` from the resolved template's `layout` block (the code
117
- * registry's `TemplateManifest.layout`) before calling `scaffoldSync`. Never
118
- * set by a CLI/MCP caller directly. `scaffoldSync` fills every unset field
119
- * with `DEFAULT_SITE_CHROME`, so a call naming no `layout` (every existing
120
- * caller) writes the same defaults `site-chrome.ts` always has.
121
- */
122
- layout?: TemplateLayout;
123
- /**
124
- * A design name or a directory holding a DESIGN.md (#6638; widened to a
114
+ * A design name or a directory holding a design.yaml (#6638; widened to a
125
115
  * path #6813 D1/D3). `scaffold()` sets it from the resolved template's
126
116
  * `design`; a caller may name one to OVERRIDE the template's — the
127
117
  * shape × design pairing `verify-scaffold.mjs --design` renders (#6638
@@ -130,14 +120,6 @@ export interface ScaffoldOptions {
130
120
  * (#6760): a non-Free design needs a Pro or Pro Plus level.
131
121
  */
132
122
  design?: string;
133
- /**
134
- * INTERNAL — the resolved design's own layout knobs (#6813 D2/D4/D8),
135
- * populated by `scaffold()` from `resolveDesign(...).pkg.layout` before
136
- * calling `scaffoldSync`. Never set by a CLI/MCP caller. Replaces the
137
- * design-NAME lookup `scaffoldSync` used to do internally through the
138
- * code registry that has since been deleted (#6638's per-name table).
139
- */
140
- designLayout?: TemplateLayout;
141
123
  /**
142
124
  * The scaffold's topology (`--topology`, #7426 D1). `"hub"` — the default
143
125
  * — is the whole site. `"spoke"` is the same scaffold with nodes removed
@@ -15,19 +15,19 @@
15
15
  * import { scaffoldSync } from './programmatic.js';
16
16
  * const result = scaffoldSync({ targetDir: '/tmp/my-site', projectName: 'my-site' });
17
17
  */
18
- import { existsSync, mkdirSync, readdirSync, readFileSync, rmdirSync, rmSync, statSync, writeFileSync, } from "node:fs";
18
+ import { existsSync, readdirSync, readFileSync, rmdirSync, rmSync, statSync, writeFileSync, } from "node:fs";
19
19
  import { basename, dirname, join, relative, resolve, sep } from "node:path";
20
20
  import { fileURLToPath } from "node:url";
21
21
  import { AddModuleRefusedError, addModuleSiteTopology, applyModuleToScaffold, } from "./add-module.js";
22
- import { planDesignMd } from "./apply-design-md.js";
23
22
  import { renderClaudeMd, syncClaudeMd, } from "./claude-md.js";
24
23
  import { CATALOG_TARGET_PATH, writeComponentCatalog, } from "./component-catalog.js";
25
24
  import { buildScaffoldMarkers, copyTemplate } from "./copy.js";
26
25
  import { deriveArchitecture } from "./derive-architecture.js";
27
- import { compileDesignFonts, compileDesignTheme } from "./design-compile.js";
26
+ import { compileDesignTheme } from "./design-compile.js";
27
+ import { DESIGN_GUIDE_FILE, DESIGN_SETTINGS_FILE, LOOK_FILE, guideCopiedFrom, planDesignFiles } from "./design-files.js";
28
28
  import { DESIGN_SEED_PAGES, designHomeSeeds, planDesignHome, shapeHomePath, shippedHomeSeeds, siteIdentityName, } from "./design-home.js";
29
- import { applyDesignPresets, readSectionLookCatalog, shippedPageTypes, validateDesignPresets, } from "./design-presets.js";
30
- import { resolveDesign, spliceThemeBlock, } from "./design-scaffold.js";
29
+ import { readSectionLookCatalog, shippedPageTypes, validateDesignPresets, } from "./design-presets.js";
30
+ import { resolveDesign, } from "./design-scaffold.js";
31
31
  import { writeAuthSecretFile } from "./lib/auth-secret-file.js";
32
32
  import { appendEnvRows } from "./lib/declared-env.js";
33
33
  import { ENV_CATALOG } from "./lib/env-catalog.js";
@@ -36,14 +36,14 @@ import { fetchTemplate } from "./lib/fetch-template.js";
36
36
  import { assertLicenseKeyShape, writeLicenseKeyFiles, } from "./lib/license-key-files.js";
37
37
  import { assertDesignAllowed, assertReleased, deriveDesignLevel, deriveLevel, resolveModuleSet, resolvePaidModules, } from "./lib/module-license-gate.js";
38
38
  import { classifyModules, isAddition } from "./lib/module-tier.js";
39
+ import { fillLookSamples, readLookSamples } from "./look-samples.js";
39
40
  import { normalizeModules } from "./module-architecture.js";
40
41
  import { withLevelMcpPackages, writePaidSections } from "./paid-sections.js";
41
42
  import { RECOGNIZED_SHAPES, RESERVED_SHAPES, } from "./parse-args.js";
42
43
  import { RemoveModuleRefusedError, removeModuleFromScaffold, } from "./remove-module.js";
43
44
  import { scaffoldSeamRows } from "./seam-refresh.js";
44
45
  import { writeSpokeFlowsReadme } from "./seed-flows.js";
45
- import { SITE_CHROME_PATH, renderSiteChrome, resolveSiteChrome, } from "./site-chrome.js";
46
- import { SITE_FONTS_PATH, renderSiteFonts } from "./site-fonts.js";
46
+ import { resolveSiteChrome } from "./site-chrome.js";
47
47
  import { planSiteManifest } from "./site-manifest.js";
48
48
  import { SITE_ROSTER_PATH, planHomeRecord, planSiteManifestDesign, readSiteRoster, withMeetPlaceholderSeeds, } from "./site-roster.js";
49
49
  import { LEAD_SITE_ENV_VAR, dropSpokeCheckoutDependency, spokeCheckoutSite, spokeEnvRowOptions, writeSpokeCheckoutSlice, } from "./spoke-checkout.js";
@@ -97,24 +97,6 @@ function countFiles(dir) {
97
97
  }
98
98
  return count;
99
99
  }
100
- /** Every `.mdx` file under `dir`, recursively, sorted (#6816 D6). */
101
- function listMdxFiles(dir) {
102
- if (!existsSync(dir))
103
- return [];
104
- const out = [];
105
- const stack = [dir];
106
- while (stack.length > 0) {
107
- const current = stack.pop();
108
- for (const entry of readdirSync(current, { withFileTypes: true })) {
109
- const abs = join(current, entry.name);
110
- if (entry.isDirectory())
111
- stack.push(abs);
112
- else if (entry.name.endsWith(".mdx"))
113
- out.push(abs);
114
- }
115
- }
116
- return out.sort();
117
- }
118
100
  /**
119
101
  * The template a `shape` scaffolds (#6754 D5, extended #6757 D6 row 1): the
120
102
  * one FREE-delivery manifest of that shape — a declared `--template` alias
@@ -217,12 +199,6 @@ export function scaffoldSync(opts, copied) {
217
199
  // the template's copy in place would link /docs and /blog sitewide in a
218
200
  // scaffold that carries neither route.
219
201
  writeFileSync(join(targetAbs, NAV_CONFIG_PATH), renderNavConfig(enabledSurfaces));
220
- // Site-level chrome knobs (#5612 D2) — beside nav-config.ts, same GENERATED
221
- // idiom. `opts.layout` is set only by `scaffold()`, from the resolved
222
- // template's `layout` block; a bare `scaffoldSync` call (every existing
223
- // synchronous caller) writes DEFAULT_SITE_CHROME, byte-identical to the
224
- // monorepo's own committed apps/web/lib/site-chrome.ts.
225
- writeFileSync(join(targetAbs, SITE_CHROME_PATH), renderSiteChrome(resolveSiteChrome(opts.layout, opts.designLayout)));
226
202
  // The paid-sections registry (#7536), from this scaffold's own
227
203
  // `apps/web/package.json` — on the keyless snapshot, the all-stub render.
228
204
  // `scaffold()` writes it again once every layer has landed.
@@ -307,7 +283,7 @@ export async function scaffold(opts) {
307
283
  // #6813 D8 step 3 — the design this scaffold renders, resolved from its
308
284
  // package ONCE, before any fetch or write: the caller's override, else the
309
285
  // template's own. Unset for a scaffold naming neither. Replaces the
310
- // `STARTER_DESIGNS.includes` name check: an unrecognized name or a missing
286
+ // `shippedDesigns().includes` name check: an unrecognized name or a missing
311
287
  // directory throws `TemplateError` here; a malformed package throws
312
288
  // `DesignPackageError` (never caught), each naming the field.
313
289
  const designRef = opts.design ?? template?.design;
@@ -328,7 +304,7 @@ export async function scaffold(opts) {
328
304
  validateDesignPresets(resolvedDesign.pkg.sections, {
329
305
  catalog: catalog(),
330
306
  pageTypes: shippedPageTypes(SITE_TEMPLATES_DIR),
331
- file: join(resolvedDesign.dir, "DESIGN.md"),
307
+ file: join(resolvedDesign.dir, "design.yaml"),
332
308
  });
333
309
  }
334
310
  // #7743 D5 — the design's home seeds are read and validated beside its
@@ -341,6 +317,13 @@ export async function scaffold(opts) {
341
317
  const designContactSeeds = resolvedDesign !== undefined
342
318
  ? designHomeSeeds(resolvedDesign, { designsDir: DESIGNS_DIR, catalog, page: "contact" })
343
319
  : [];
320
+ // #12472 D3 — the design's sample images, checked for form and read here,
321
+ // before the target is created: a malformed manifest, file or LOOK.md
322
+ // throws `LookSamplesError` naming it. Undefined for a design with no
323
+ // `samples/` (both shipped looks today), which copies and fills nothing.
324
+ const lookSamples = resolvedDesign !== undefined
325
+ ? readLookSamples(resolvedDesign.dir, { designsDir: DESIGNS_DIR })
326
+ : undefined;
344
327
  // #6813 D7 — the resolved design only when the CALLER chose one (`opts.design`);
345
328
  // a template's own declared design is never gated (#6778 option (c)).
346
329
  const chosenDesign = opts.design !== undefined ? resolvedDesign : undefined;
@@ -564,15 +547,6 @@ export async function scaffold(opts) {
564
547
  modules,
565
548
  ...(spoke !== undefined ? { topology: "spoke", mcp: spoke.mcp } : {}),
566
549
  ...(surfaces !== undefined ? { surfaces } : {}),
567
- // #5612 D1/D2 — the code registry's own `layout` block, known
568
- // synchronously (unlike a bundle's `ailk-template.json`, only readable
569
- // after install below). A template declaring none resolves to its
570
- // design's knobs (#6638), and a `standard` one to the same defaults
571
- // `scaffoldSync` already writes for a templateless scaffold.
572
- ...(template?.layout !== undefined ? { layout: template.layout } : {}),
573
- // #6813 D8 step 6 — the resolved design's OWN layout (never its name):
574
- // `resolveSiteChrome` reads a layout object now, not a `StarterDesign`.
575
- ...(resolvedDesign !== undefined ? { designLayout: resolvedDesign.pkg.layout } : {}),
576
550
  }, copied);
577
551
  // #6460 — the SAME marker map `scaffoldSync` just substituted the base
578
552
  // `templates/` copy with, rebuilt here from the same inputs (`scaffold()`
@@ -665,9 +639,8 @@ export async function scaffold(opts) {
665
639
  // (validated by `readAilkTemplateManifest`), if it declares one. Read
666
640
  // only now: it lives in the bundle/tree, unreachable before install. When
667
641
  // declared, it is authoritative over the code registry's `template.layout`
668
- // already baked into `result`'s site-chrome.ts above — overwritten below.
669
- // Absent (every shipped template today), the registry-resolved write from
670
- // `scaffoldSync` stands untouched.
642
+ // in the manifest's record below. No layout file is written: the site's
643
+ // layout knobs are its hub design record's (#12477 D4).
671
644
  const installed = templateBundle !== undefined
672
645
  ? await extractModuleBundle({
673
646
  bytes: templateBundle,
@@ -702,9 +675,6 @@ export async function scaffold(opts) {
702
675
  });
703
676
  })();
704
677
  installedLayout = installed.layout;
705
- if (installed.layout !== undefined) {
706
- writeFileSync(join(result.targetDir, SITE_CHROME_PATH), renderSiteChrome(resolveSiteChrome(installed.layout, resolvedDesign?.pkg.layout)));
707
- }
708
678
  // #6878 D6 — re-render the nav with the SERVICE slugs the installed tree
709
679
  // just landed (`content/en/Service/*.mdx`, absent on a product shape),
710
680
  // now that `content/en/Service` exists to read. `scaffoldSync`'s own
@@ -726,51 +696,62 @@ export async function scaffold(opts) {
726
696
  pruneUnrosteredSeeds(result.targetDir, mergeRoster(template, template.requires), result.surfaces, ownership);
727
697
  }
728
698
  // #6813 D5/D8 steps 9-10 — whenever a design is resolved (the caller's,
729
- // else the template's): the design's DESIGN.md (#6939); the compiled theme,
730
- // spliced into the scaffold's `content/_site.mdx` LAST; then the site manifest records the APPLIED
731
- // design, only when a template installed one (`saas-product` ships none).
699
+ // else the template's): the design's design.yaml and guide (#6939, #12468);
700
+ // then the site manifest records the APPLIED design, only when a template
701
+ // installed one (`saas-product` ships none). No look file is written — no
702
+ // `theme:` block, layout or faces file, no section preset copy: the site
703
+ // renders its look from its hub design record, which the seed writes
704
+ // (#12477 D4).
732
705
  // A scaffold naming neither a design nor a template (the bare overlay)
733
706
  // executes no new statement.
734
707
  if (resolvedDesign !== undefined) {
735
- // #6939 — the scaffold's DESIGN.md is the design it wears, not the one
736
- // its template layer shipped; the site's own header lines are kept.
737
- writeFileSync(join(result.targetDir, "DESIGN.md"), planDesignMd(resolvedDesign.dir, result.targetDir));
738
- // #10040 D8 — a treeless alias (`ownTree: false`) ships no DESIGN.md of
739
- // its own, so the kept line would still name the overlay's `_base`;
740
- // the scaffold's provenance is the alias.
741
- if (template !== undefined && !isOwnTree(template.name)) {
742
- const designPath = join(result.targetDir, "DESIGN.md");
743
- writeFileSync(designPath, readFileSync(designPath, "utf8").replace(/^([ \t]*)Source template:.*$/m, (_m, indent) => `${indent}Source template: ${template.name}`));
744
- }
745
- // #7720 D4.1 — the faces the design sources, beside site-chrome.ts. A
746
- // design that sources none renders the overlay's committed default, so
747
- // the file is left as the template tree wrote it.
748
- const siteFontsPath = join(result.targetDir, SITE_FONTS_PATH);
749
- const siteFonts = renderSiteFonts(compileDesignFonts(resolvedDesign.pkg));
750
- if (!existsSync(siteFontsPath) || readFileSync(siteFontsPath, "utf8") !== siteFonts) {
751
- mkdirSync(dirname(siteFontsPath), { recursive: true });
752
- writeFileSync(siteFontsPath, siteFonts);
753
- }
754
- const compiledTheme = compileDesignTheme(resolvedDesign.pkg);
708
+ // #6939, #12468 D5 — the scaffold's design.yaml is the design it wears,
709
+ // under the site's provenance lines: the template's name for every
710
+ // template but a bare-shape starter, which keeps the overlay's `_base`
711
+ // line. Then the design's guide, copied whole, at DESIGN.md.
712
+ const designFiles = planDesignFiles({
713
+ designDir: resolvedDesign.dir,
714
+ designsDir: DESIGNS_DIR,
715
+ siteDir: result.targetDir,
716
+ recorded: resolvedDesign.recorded,
717
+ ...(template !== undefined && !Object.hasOwn(SHAPE_STARTERS, template.name)
718
+ ? { sourceTemplate: template.name }
719
+ : {}),
720
+ version: markers["CREATE_AILK_VERSION"] ?? "",
721
+ });
722
+ writeFileSync(join(result.targetDir, DESIGN_SETTINGS_FILE), designFiles.designYaml);
723
+ const guidePath = join(result.targetDir, DESIGN_GUIDE_FILE);
724
+ if (designFiles.guide.action === "write")
725
+ writeFileSync(guidePath, designFiles.guide.text);
726
+ else if (designFiles.guide.action === "remove")
727
+ rmSync(guidePath);
728
+ // #12472 D4 — then the look's LOOK.md, by the guide's rule.
729
+ const lookPath = join(result.targetDir, LOOK_FILE);
730
+ if (designFiles.look.action === "write")
731
+ writeFileSync(lookPath, designFiles.look.text);
732
+ else if (designFiles.look.action === "remove")
733
+ rmSync(lookPath);
734
+ // SEC-12468-7 — the same line apply-design prints, for a guide from a path design.
735
+ const copiedFrom = guideCopiedFrom(designFiles.guide, DESIGNS_DIR);
736
+ if (copiedFrom !== undefined)
737
+ process.stdout.write(`guide copied from ${copiedFrom}\n`);
738
+ // SEC-12472-6 — a LOOK.md from a path design is announced the same way.
739
+ const lookCopiedFrom = guideCopiedFrom(designFiles.look, DESIGNS_DIR);
740
+ if (lookCopiedFrom !== undefined)
741
+ process.stdout.write(`look copied from ${lookCopiedFrom}\n`);
755
742
  const siteMdxPath = join(result.targetDir, "content", "_site.mdx");
756
- if (existsSync(siteMdxPath)) {
757
- const current = readFileSync(siteMdxPath, "utf8");
758
- const spliced = spliceThemeBlock(current, compiledTheme, siteMdxPath);
759
- if (spliced !== current)
760
- writeFileSync(siteMdxPath, spliced);
761
- }
762
743
  if (template !== undefined) {
763
744
  const rosterPath = join(result.targetDir, SITE_ROSTER_PATH);
764
745
  if (existsSync(rosterPath)) {
765
746
  const rosterText = readFileSync(rosterPath, "utf8");
766
747
  const chromeWritten = resolveSiteChrome(installedLayout ?? template.layout, resolvedDesign.pkg.layout);
767
- const nextManifest = planSiteManifestDesign(rosterText, { design: resolvedDesign.recorded, layout: chromeWritten, theme: compiledTheme }, rosterPath);
748
+ const nextManifest = planSiteManifestDesign(rosterText, { design: resolvedDesign.recorded, layout: chromeWritten, theme: compileDesignTheme(resolvedDesign.pkg) }, rosterPath);
768
749
  if (nextManifest !== undefined)
769
750
  writeFileSync(rosterPath, nextManifest);
770
751
  }
771
752
  }
772
753
  // #7743 D5 — the design's home arc, seeded over a placeholder home once
773
- // every layer has landed, before the presets dress it. A home that is not
754
+ // every layer has landed. A home that is not
774
755
  // the shape's placeholder is never written; `--design standard` (no
775
756
  // seeds) leaves the shape's home byte-identical. The one
776
757
  // `planDesignHome` call site in scaffold(). #8661 D11 — the contact page
@@ -804,32 +785,13 @@ export async function scaffold(opts) {
804
785
  }
805
786
  }
806
787
  }
807
- // #6816 D6 step 10b — the design's section presets, written onto the
808
- // pages of the page types the roster of record places, once every layer
809
- // has landed. The one `applyDesignPresets` call site. A scaffold with no
810
- // roster (the bare overlay, `saas-product`) validated its presets at
811
- // step 3b and applies none: nothing "the shape placed" to resolve against.
812
- if (template !== undefined &&
813
- Object.keys(resolvedDesign.pkg.sections).length > 0) {
814
- const roster = readSiteRoster(result.targetDir);
815
- if (roster !== undefined) {
816
- const pageTypes = new Set();
817
- for (const row of roster.rows) {
818
- const pageType = row.value["pageType"];
819
- if (typeof pageType === "string")
820
- pageTypes.add(pageType);
821
- }
822
- const contentDir = join(result.targetDir, "content");
823
- const pages = listMdxFiles(contentDir)
824
- .filter((path) => path !== join(contentDir, "_site.mdx"))
825
- .map((path) => ({ path, text: readFileSync(path, "utf8") }));
826
- const presetResult = applyDesignPresets(pages, resolvedDesign.pkg.sections, { pageTypes });
827
- for (const page of presetResult.pages)
828
- writeFileSync(page.path, page.text);
829
- }
788
+ // #12472 D3 — the look's samples, copied into the site and drawn in the
789
+ // empty image slots of its seeded pages, before the home is recorded.
790
+ if (lookSamples !== undefined) {
791
+ fillLookSamples(result.targetDir, lookSamples.look, lookSamples.samples);
830
792
  }
831
793
  // #7743 D6 — the manifest's `/` row records the seeded home's sections,
832
- // as the presets left them. #8661 — and the `/contact` row the seeded
794
+ // as seeded. #8661 — and the `/contact` row the seeded
833
795
  // contact page's.
834
796
  const rosterPath = join(result.targetDir, SITE_ROSTER_PATH);
835
797
  if (seededPages.length > 0 && existsSync(rosterPath)) {
@@ -0,0 +1,29 @@
1
+ /**
2
+ * The sha256 of every retired-format DESIGN.md body create-ailk has shipped
3
+ * (#12468 D6 step 2, SEC-12468-3), normalised by `legacyBodyHash`
4
+ * (`design-files.ts`): the text after the closing `---` line, LF line
5
+ * endings, and the `Source template:` / `Design:` / `Version:` lines dropped
6
+ * only inside the body's leading `<!-- … -->` comment block — the same line
7
+ * anywhere else is the site's own text and stays in the hash.
8
+ *
9
+ * `create-ailk update` removes or replaces a site's retired DESIGN.md only
10
+ * when its body hashes into this set; any other body is the site's own edit
11
+ * and is kept as `DESIGN.retired.md`. A missing hash costs a review entry,
12
+ * never a site's text.
13
+ *
14
+ * Generated once, from the repository root, over every blob of the four
15
+ * shipped paths in `git log` up to 0db04b0d (35 retired-format blobs, 21
16
+ * distinct bodies):
17
+ *
18
+ * git log --format= --raw --no-abbrev 0db04b0d -- \
19
+ * 'packages/create-ailk/site-templates/designs/*\/DESIGN.md' \
20
+ * 'packages/create-ailk/site-templates/*\/DESIGN.md' \
21
+ * 'packages/create-ailk/template-*\/DESIGN.md' 'design-library/*\/DESIGN.md' \
22
+ * | awk '{ print $3; print $4 }' | grep -v '^0*$' | sort -u \
23
+ * | while read -r blob; do git cat-file -p "$blob" > "$TMP/$blob"; echo "$TMP/$blob"; done \
24
+ * | pnpm exec tsx -e 'import { readFileSync } from "node:fs";
25
+ * import { isLegacyDesignMd, legacyBodyHash } from "./packages/create-ailk/src/design-files.ts";
26
+ * const texts = readFileSync(0, "utf8").trim().split("\n").map((p) => readFileSync(p, "utf8"));
27
+ * console.log([...new Set(texts.filter(isLegacyDesignMd).map(legacyBodyHash))].sort().join("\n"));'
28
+ */
29
+ export declare const RETIRED_DESIGN_BODIES: ReadonlySet<string>;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * The sha256 of every retired-format DESIGN.md body create-ailk has shipped
3
+ * (#12468 D6 step 2, SEC-12468-3), normalised by `legacyBodyHash`
4
+ * (`design-files.ts`): the text after the closing `---` line, LF line
5
+ * endings, and the `Source template:` / `Design:` / `Version:` lines dropped
6
+ * only inside the body's leading `<!-- … -->` comment block — the same line
7
+ * anywhere else is the site's own text and stays in the hash.
8
+ *
9
+ * `create-ailk update` removes or replaces a site's retired DESIGN.md only
10
+ * when its body hashes into this set; any other body is the site's own edit
11
+ * and is kept as `DESIGN.retired.md`. A missing hash costs a review entry,
12
+ * never a site's text.
13
+ *
14
+ * Generated once, from the repository root, over every blob of the four
15
+ * shipped paths in `git log` up to 0db04b0d (35 retired-format blobs, 21
16
+ * distinct bodies):
17
+ *
18
+ * git log --format= --raw --no-abbrev 0db04b0d -- \
19
+ * 'packages/create-ailk/site-templates/designs/*\/DESIGN.md' \
20
+ * 'packages/create-ailk/site-templates/*\/DESIGN.md' \
21
+ * 'packages/create-ailk/template-*\/DESIGN.md' 'design-library/*\/DESIGN.md' \
22
+ * | awk '{ print $3; print $4 }' | grep -v '^0*$' | sort -u \
23
+ * | while read -r blob; do git cat-file -p "$blob" > "$TMP/$blob"; echo "$TMP/$blob"; done \
24
+ * | pnpm exec tsx -e 'import { readFileSync } from "node:fs";
25
+ * import { isLegacyDesignMd, legacyBodyHash } from "./packages/create-ailk/src/design-files.ts";
26
+ * const texts = readFileSync(0, "utf8").trim().split("\n").map((p) => readFileSync(p, "utf8"));
27
+ * console.log([...new Set(texts.filter(isLegacyDesignMd).map(legacyBodyHash))].sort().join("\n"));'
28
+ */
29
+ export const RETIRED_DESIGN_BODIES = new Set([
30
+ "0675af3be4327bd15c260913f7912ac318bbad56ca82d5a1f165559f5048fec8",
31
+ "095ef4be475d0ce1fbf2cd1dbae9b621261a1d16266fe4cdf9c6bd4b6b03ff2a",
32
+ "0f970440bfdeb8beabbedad7948a26b0a5eb4b0ae9d779f350b7c452e462b3bb",
33
+ "5a0c984ae41a715e45d70fd0870fb76359acd2f07fdf7aa09c021a9f6a181985",
34
+ "60947b2625996128ec9c187da4e46e5bc9229b1118a717361669d52814c0cdcf",
35
+ "6d1b264eee40252e77322431e8f9b1478c5873d9e657797cc1ef17c9d2a99231",
36
+ "7056b3a1e7e3de6c390f0b3f09cc19e07fddc96c92eb1e8204b680daf6345364",
37
+ "8d86e6835dfade028851375c0e82bb9a4af0c2c63c327eb8d6c72afa1fa8c1f8",
38
+ "94385ac9a3310fc592b0ac900a738a14d34a42d5bd23718b90f47f177460c574",
39
+ "99b77394e725ffb351032a6d4668fe4843b5b0c8d432a7a88808f0281141d0cd",
40
+ "a329a8f55bded4dddc0ce1ad35735d9b79518de3e1d4ff32bffb3838225c5393",
41
+ "a3607db8d4025c504120c8aac9eb9fcdb85d02d1dc16310a23e2d75903059921",
42
+ "b0e55842f47f47b64156d281a873bfd9fb789f62049d7a4b4600c032061f3d07",
43
+ "b7ddb3f6223b51111ee45dba079b3ce7708dd2a52005878e563707b1c04f52fc",
44
+ "b8a6b7a6b34f855cc4b78cf96237b811fba5f2347314800c7f1ad9a3e3feee18",
45
+ "c30315ffc589b4c08217093844f1fbbe0f2c317a4255585ddd016f9f573b3f04",
46
+ "d318f2469a93075c5feebfdd78100cdff694cdf6ed3b66c1894449beb4936d97",
47
+ "dfb1e4b7c08b35adf5659530e65a570acc62a1e68f0008a05fd3e3fbbbd68056",
48
+ "e53d71f1b974e757dce8e50cc119064b8ab1c7ca5a88983e75191e70f88c24e6",
49
+ "f5c4fe56e3dad9af8f8598c1e1b7073db7d015d59d9818e2bbcbac07a7c0c491",
50
+ "fa49266844f3c3aba1450ffe665ca91d91d713606bb162358d9021536517acfb",
51
+ ]);
@@ -64,5 +64,5 @@ export interface SeedFlowsArgs {
64
64
  dryRun: boolean;
65
65
  help: boolean;
66
66
  }
67
- export declare const SEED_FLOWS_HELP = "create-ailk seed-flows \u2014 send a spoke's declared flows to its hub.\n\nUsage:\n AILK_SPOKE_KEY=<key> create-ailk seed-flows [<dir>] [--hub-url <origin>] [--dry-run]\n\nArguments:\n <dir> The spoke site. Defaults to the current dir.\n\nOptions:\n --hub-url <origin> The hub's origin. Else AILK_API_URL. The\n AILK_API_URL= line of apps/web/.env.local is read\n for --dry-run only. https: only (http: on\n localhost or 127.0.0.1).\n --dry-run Check every flows/*.json and print what would be sent.\n Sends nothing and reads no key.\n -h, --help Show this help.\n\nEach flows/<slug>.json is sent to PUT <hub>/v1/flows/<slug>/definition with\nthe spoke key, which is read from AILK_SPOKE_KEY only. The hub must have\nAILK_SPOKE_FLOW_SEED=true. Exit 0 when every flow was accepted, 1 when any\nfailed, 2 on a refusal (nothing is sent).\n";
67
+ export declare const SEED_FLOWS_HELP = "create-ailk seed-flows \u2014 send a spoke's declared flows to its hub.\n\nUsage:\n AILK_SPOKE_KEY=<key> create-ailk seed-flows [<dir>] [--hub-url <origin>] [--dry-run]\n\nArguments:\n <dir> The spoke site. Defaults to the current dir.\n\nOptions:\n --hub-url <origin> The hub's origin. Else AILK_API_URL. It must be\n the origin the AILK_API_URL= line of\n apps/web/.env.local names; that line alone is read\n for --dry-run only. https: only (http: on\n localhost or 127.0.0.1).\n --dry-run Check every flows/*.json and print what would be sent.\n Sends nothing and reads no key.\n -h, --help Show this help.\n\nEach flows/<slug>.json is sent to PUT <hub>/v1/flows/<slug>/definition with\nthe spoke key, which is read from AILK_SPOKE_KEY only. The hub must have\nAILK_SPOKE_FLOW_SEED=true. Exit 0 when every flow was accepted, 1 when any\nfailed, 2 on a refusal (nothing is sent).\n";
68
68
  export declare function parseSeedFlowsArgs(argv: string[]): SeedFlowsArgs;