@aglyn/plugins-ai 1.0.0-beta.233 → 1.0.0-beta.234

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/package.json +17 -17
  2. package/src/lib/components/ai-job-links.d.ts +6 -0
  3. package/src/lib/components/ai-job-links.js +9 -0
  4. package/src/lib/components/ai-job-links.js.map +1 -1
  5. package/src/lib/components/ai-site-build-page.component.js +41 -3
  6. package/src/lib/components/ai-site-build-page.component.js.map +1 -1
  7. package/src/lib/components/ai-site-start-card.component.js +91 -8
  8. package/src/lib/components/ai-site-start-card.component.js.map +1 -1
  9. package/src/lib/jobs/ai-job-admission.d.ts +2 -1
  10. package/src/lib/jobs/ai-job-admission.js.map +1 -1
  11. package/src/lib/jobs/ai-job-email-step.d.ts +39 -0
  12. package/src/lib/jobs/ai-job-email-step.js +116 -5
  13. package/src/lib/jobs/ai-job-email-step.js.map +1 -1
  14. package/src/lib/jobs/ai-job-layout-language.d.ts +3 -0
  15. package/src/lib/jobs/ai-job-layout-language.js +3 -1
  16. package/src/lib/jobs/ai-job-layout-language.js.map +1 -1
  17. package/src/lib/jobs/ai-job-layout-site-pages.d.ts +2 -0
  18. package/src/lib/jobs/ai-job-layout-site-pages.js +23 -11
  19. package/src/lib/jobs/ai-job-layout-site-pages.js.map +1 -1
  20. package/src/lib/jobs/ai-job-layout-step.js +3 -2
  21. package/src/lib/jobs/ai-job-layout-step.js.map +1 -1
  22. package/src/lib/jobs/ai-job-page-language.d.ts +16 -0
  23. package/src/lib/jobs/ai-job-page-language.js +35 -6
  24. package/src/lib/jobs/ai-job-page-language.js.map +1 -1
  25. package/src/lib/jobs/ai-job-page-step.d.ts +3 -0
  26. package/src/lib/jobs/ai-job-page-step.js +18 -4
  27. package/src/lib/jobs/ai-job-page-step.js.map +1 -1
  28. package/src/lib/jobs/ai-job-plan-step.d.ts +34 -0
  29. package/src/lib/jobs/ai-job-plan-step.js +106 -14
  30. package/src/lib/jobs/ai-job-plan-step.js.map +1 -1
  31. package/src/lib/jobs/ai-job-site-content.d.ts +6 -6
  32. package/src/lib/jobs/ai-job-site-content.js +6 -12
  33. package/src/lib/jobs/ai-job-site-content.js.map +1 -1
  34. package/src/lib/jobs/ai-job-site-step.d.ts +11 -0
  35. package/src/lib/jobs/ai-job-site-step.js +96 -44
  36. package/src/lib/jobs/ai-job-site-step.js.map +1 -1
  37. package/src/lib/jobs/ai-jobs.d.ts +8 -4
  38. package/src/lib/jobs/ai-jobs.js +19 -2
  39. package/src/lib/jobs/ai-jobs.js.map +1 -1
  40. package/src/lib/jobs/ai-layout-stock-photos.d.ts +98 -0
  41. package/src/lib/jobs/ai-layout-stock-photos.js +248 -0
  42. package/src/lib/jobs/ai-layout-stock-photos.js.map +1 -0
  43. package/src/lib/jobs/ai-site-publish.d.ts +11 -0
  44. package/src/lib/jobs/ai-site-publish.js +31 -1
  45. package/src/lib/jobs/ai-site-publish.js.map +1 -1
  46. package/src/lib/jobs/fixtures/ai-juniper-portfolio-page-recording.d.ts +151 -0
  47. package/src/lib/jobs/fixtures/ai-juniper-portfolio-page-recording.js +183 -0
  48. package/src/lib/jobs/fixtures/ai-juniper-portfolio-page-recording.js.map +1 -0
  49. package/src/lib/jobs/fixtures/ai-slow-roads-site-plan-recording.d.ts +27 -0
  50. package/src/lib/jobs/fixtures/ai-slow-roads-site-plan-recording.js +192 -0
  51. package/src/lib/jobs/fixtures/ai-slow-roads-site-plan-recording.js.map +1 -0
  52. package/src/lib/jobs/fixtures/ai-yoga-site-plan-recording.d.ts +27 -0
  53. package/src/lib/jobs/fixtures/ai-yoga-site-plan-recording.js +222 -0
  54. package/src/lib/jobs/fixtures/ai-yoga-site-plan-recording.js.map +1 -0
  55. package/src/lib/layout-language/ai-layout-compiler.d.ts +29 -0
  56. package/src/lib/layout-language/ai-layout-compiler.js +698 -12
  57. package/src/lib/layout-language/ai-layout-compiler.js.map +1 -1
  58. package/src/lib/layout-language/ai-layout-design.d.ts +107 -0
  59. package/src/lib/layout-language/ai-layout-design.js +197 -0
  60. package/src/lib/layout-language/ai-layout-design.js.map +1 -0
  61. package/src/lib/layout-language/ai-layout-frame.d.ts +6 -0
  62. package/src/lib/layout-language/ai-layout-frame.js +22 -6
  63. package/src/lib/layout-language/ai-layout-frame.js.map +1 -1
  64. package/src/lib/layout-language/ai-layout-language.d.ts +2 -0
  65. package/src/lib/layout-language/ai-layout-language.js +15 -1
  66. package/src/lib/layout-language/ai-layout-language.js.map +1 -1
  67. package/src/lib/layout-language/ai-layout-links.d.ts +11 -0
  68. package/src/lib/layout-language/ai-layout-links.js +4 -0
  69. package/src/lib/layout-language/ai-layout-links.js.map +1 -1
  70. package/src/lib/layout-language/ai-layout-pictures.d.ts +11 -5
  71. package/src/lib/layout-language/ai-layout-pictures.js +80 -17
  72. package/src/lib/layout-language/ai-layout-pictures.js.map +1 -1
  73. package/src/lib/model/ai-job-notice.d.ts +9 -1
  74. package/src/lib/model/ai-job-notice.js +23 -0
  75. package/src/lib/model/ai-job-notice.js.map +1 -1
  76. package/src/lib/model/ai-plan-capabilities.d.ts +7 -0
  77. package/src/lib/model/ai-plan-capabilities.js.map +1 -1
  78. package/src/lib/model/ai-site-build-progress.d.ts +12 -2
  79. package/src/lib/model/ai-site-build-progress.js +78 -4
  80. package/src/lib/model/ai-site-build-progress.js.map +1 -1
  81. package/src/lib/model/ai-site-job.d.ts +209 -22
  82. package/src/lib/model/ai-site-job.js +247 -20
  83. package/src/lib/model/ai-site-job.js.map +1 -1
  84. package/src/lib/model/ai-site-kinds.js +6 -1
  85. package/src/lib/model/ai-site-kinds.js.map +1 -1
  86. package/src/lib/model/ai-site-look.d.ts +21 -0
  87. package/src/lib/model/ai-site-look.js +63 -14
  88. package/src/lib/model/ai-site-look.js.map +1 -1
  89. package/src/lib/runtime/ai-doctrine-validators.d.ts +32 -1
  90. package/src/lib/runtime/ai-doctrine-validators.js +227 -4
  91. package/src/lib/runtime/ai-doctrine-validators.js.map +1 -1
  92. package/src/lib/runtime/ai-doctrine.js +5 -3
  93. package/src/lib/runtime/ai-doctrine.js.map +1 -1
  94. package/src/lib/runtime/ai-palette.generated.d.ts +2 -0
  95. package/src/lib/runtime/ai-palette.generated.js +18 -2
  96. package/src/lib/runtime/ai-palette.generated.js.map +1 -1
  97. package/src/lib/server/ai-jobs-resume.js.map +1 -1
  98. package/src/lib/server/ai-jobs-route.js +15 -3
  99. package/src/lib/server/ai-jobs-route.js.map +1 -1
  100. package/src/lib/server/assist-edit.js +5 -2
  101. package/src/lib/server/assist-edit.js.map +1 -1
  102. package/src/lib/usage/free-ai-credits-left.d.ts +54 -0
  103. package/src/lib/usage/free-ai-credits-left.js +62 -0
  104. package/src/lib/usage/free-ai-credits-left.js.map +1 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/model/ai-site-job.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { aiSiteKind } from './ai-site-kinds'\nimport {\n AI_BUILD_PLAN_CREATION_NOUNS,\n aiPlanUndeclaredRefs,\n type AiBuildPlan,\n type AiBuildPlanCreateKind,\n} from './ai-build-plan'\nimport { AI_JOB_CREATE_KINDS } from './ai-job-creations'\nimport { AI_PAGE_CREATE_KINDS } from './ai-page-job'\n\n/**\n * What a site scaffold is (AGL-2911): the inputs a `site` job is admitted\n * with, the plans a scaffold can build, and what one is estimated to cost\n * before it starts.\n *\n * A scaffold is the one job kind that builds a whole site rather than one\n * record: a plan of four to eight screens, the layout they render inside,\n * the contact form they place, a palette suggestion, and — where the email\n * step is loaded — a welcome email. It builds each of those through the job\n * kind that already owns it, so this module describes what a scaffold may\n * ask for and refuses the rest at confirmation, before a credit is spent,\n * naming what to make first.\n *\n * ── The estimate is the guard rail ───────────────────────────────────────\n *\n * A scaffold is tens of model calls, where every other kind is a few, so the\n * member reads what it will cost before they confirm the plan that spends\n * it. The figure is the machine's own nominal credits per step multiplied by\n * the passes the plan implies — an estimate, and said to be one wherever it\n * is shown.\n *\n * This module imports nothing at runtime, so the doors, the step, the batch\n * card and the plan proposal read one vocabulary.\n */\n\n/** How many pages a scaffold builds: enough to be a site, few enough to read. */\nexport const AI_SITE_PAGES = { min: 4, max: 8 } as const\n\n/**\n * How many pages a Free workspace's scaffold builds (AGL-3594): its home page\n * and the one page the brief most needs. A product decision, not a figure the\n * wall derives — the wall's proof (`jobs/ai-job-free-site.spec.ts`) shows a\n * plan and a build of this many pages fit the Free taste with room for one\n * retried section.\n */\nexport const AI_SITE_FREE_PAGES = { min: 1, max: 2 } as const\n\n/** The pages a scaffold builds for a workspace on the Free taste or on a paid plan. */\nexport function aiSitePagesBand(\n freeTaste: boolean | null | undefined,\n): { readonly min: number; readonly max: number } {\n return freeTaste ? AI_SITE_FREE_PAGES : AI_SITE_PAGES\n}\n\n/**\n * The job input a guided site start sets so its plan is confirmed for it\n * (AGL-3594); `jobs/ai-job-auto-confirm.ts` says where it is honored.\n */\nexport const AI_JOB_AUTO_CONFIRM_INPUT = 'autoConfirm'\n\n/** What a Free site start's page selector says under it (AGL-3594). */\nexport const AI_SITE_FREE_PAGES_NOTE = 'Paid plans can generate more pages.'\n\n/**\n * The plan's answer ceiling for a scaffold (AGL-3594), Free and paid. A plan\n * is an outline — each page's title, address, search listing and sections by\n * name — and the build steps write everything else, so a scaffold plans with\n * no thinking and at a ceiling sized to the outline of its largest band with\n * room to spare: about 300 tokens a page. The 13,491-token plan a Free site\n * spent 227 of its 300 credits on was its thinking, at the routing table's\n * 8,000 a call.\n */\nexport const AI_SITE_PLAN_MAX_TOKENS = { free: 2_000, paid: 4_000 } as const\n\n/** What each exchange of a Free site job comes to at its worst, in credits. */\nexport interface AiFreeSiteWorstCase {\n /** The site plan: its answer and its one re-ask, each at its ceiling. */\n plan: number\n /** The site's look (AGL-3660): its one answer at its ceiling, on the fast tier. */\n look: number\n /** The one layout a Free plan includes, built first on a site with none. */\n layout: number\n /** A page's first section pass, which writes the cached prefix. */\n firstSection: number\n /** Each later section pass. */\n laterSection: number\n /** A page's listing. */\n listing: number\n}\n\n/**\n * The Free site start's wall at its worst (AGL-3594): the site plan as\n * `jobs/ai-job-free-site.spec.ts` derives it from the plan request as it\n * stands, on the model a Free site plans with, every answer at its ceiling;\n * the build's exchanges are the Free page's (`AI_FREE_PAGE_WORST_CASE_CREDITS`),\n * which the same spec holds these to. The spec fails when a figure it derives\n * moves and this does not.\n */\nexport const AI_FREE_SITE_WORST_CASE_CREDITS: Readonly<AiFreeSiteWorstCase> = {\n plan: 35,\n look: 7,\n layout: 64,\n firstSection: 44,\n laterSection: 20,\n listing: 3,\n}\n\n/**\n * The most sections a Free site's plan fits in the Free taste at its worst,\n * across all its pages: the plan, the look, the layouts it builds first, each page's\n * listing and first pass, and ROOM FOR ONE RETRIED SECTION, then as many later\n * passes as the rest pays for; none when that is already past the wall. Every\n * page's first pass is counted as a cache write, which errs dear.\n */\nexport function aiFreeSiteSectionsWithin(\n creations: { layouts: number; pages: number },\n taste: number,\n credits: Readonly<AiFreeSiteWorstCase> = AI_FREE_SITE_WORST_CASE_CREDITS,\n): number {\n const pages = Math.max(1, Math.floor(creations.pages))\n const before =\n credits.plan +\n credits.look +\n creations.layouts * credits.layout +\n pages * (credits.listing + credits.firstSection) +\n credits.firstSection\n if (before > taste) return 0\n return pages + Math.floor((taste - before) / credits.laterSection)\n}\n\n/** Sections a Free site's page is assumed to hold before its plan names them. */\nexport const AI_FREE_SITE_NOMINAL_SECTIONS = 3\n\n/**\n * About what a Free site start of this many pages costs at its worst, in\n * credits, for the dialog that asks for one: the site plan, its look, each page's\n * listing and its sections at the nominal count, from the figures the wall is\n * proven with rather than the nominal credits a paid estimate counts.\n */\nexport function aiFreeSiteCreditEstimate(\n pages: number,\n credits: Readonly<AiFreeSiteWorstCase> = AI_FREE_SITE_WORST_CASE_CREDITS,\n): number {\n const count = Math.max(1, Math.floor(pages))\n return (\n credits.plan +\n credits.look +\n count * (credits.listing + credits.firstSection) +\n count * (AI_FREE_SITE_NOMINAL_SECTIONS - 1) * credits.laterSection\n )\n}\n\n/**\n * The most sections one scaffolded page may hold. The plan model allows more\n * for a page job, which builds one page; a scaffold builds eight, and each\n * section is a pass of its own.\n */\nexport const AI_SITE_MAX_SECTIONS = 8\n\n/**\n * Sections a page is assumed to hold before a plan names them, for the\n * estimate a member reads when they ask for a scaffold. A declared\n * assumption, not a measurement: the plan's own section counts replace it\n * the moment the plan exists.\n */\nexport const AI_SITE_NOMINAL_SECTIONS = 5\n\n/**\n * The credits one pass is held against: the machine's\n * `AI_JOB_STEP_RESERVE_CREDITS`, declared here so the estimate stays a pure\n * number the console computes without the Admin SDK. `ai-site-job.spec.ts`\n * holds the two equal.\n */\nexport const AI_SITE_PASS_CREDITS = 50\n\n/** The longest a scaffold's scalar inputs may run; they are names, not copy. */\nexport const AI_SITE_INPUT_MAX_CHARS = 120\n\n/** The sites one agency batch may generate for in one request. */\nexport const AI_SITE_BATCH_MAX = 25\n\n/**\n * The sites a plan must hold before the org Sites page offers the batch at\n * all: the Agency and Advanced bands, which the plan's `hostLimit` is what\n * distinguishes.\n */\nexport const AI_SITE_BATCH_MIN_HOST_LIMIT = 25\n\nexport interface AiSiteJobInputs {\n /** What the business is, in a few words: the brief's subject. */\n businessType: string\n /**\n * Who the site is for, in a few words (AGL-2918); empty when nobody said.\n * The plan step puts it in front of the model on a line of its own, as it\n * does every other scalar here, so it narrows the pages a plan proposes\n * without a prompt of its own.\n */\n audience: string\n /**\n * The starter site whose shape the person liked (AGL-2918), by its\n * `STARTER_TEMPLATES` id; empty when they picked none.\n *\n * A hint carried as the id rather than the starter, because an id is what\n * the guided start's list, this door and the plan's line all agree on\n * without any of them loading a catalog of node maps. Unrecognized ids are\n * admitted for the same reason an unrecognized business type is: it is a\n * few words in a brief, not a lookup.\n */\n starter: string\n /**\n * The kind of site the person picked (AGL-3660), by its `AI_SITE_KINDS`\n * id; empty when nobody picked one, and the business type suggests it.\n * It sets the look the site is designed in and how its pages are arranged.\n */\n siteKind: string\n /** How many pages the member asked for. */\n pages: number\n /** The per-site variables an agency batch varies; empty when none was given. */\n businessName: string\n city: string\n brand: string\n /** Whether the scaffold also drafts a welcome email. */\n welcomeEmail: boolean\n /**\n * Where the contact form's submissions go (AGL-2918); `null` where nobody\n * said, which is every job created before the question existed and every\n * door that does not ask it.\n *\n * The one setting a new site owner actually needs made, and the one thing\n * about a contact form a model cannot know: whether a submission is a note\n * to read or a lead to chase is a decision about how the business runs. So\n * an answer BINDS the form step rather than hinting to it, and `null`\n * leaves the model's own proposal standing, exactly as it stood before.\n */\n submissions: AiSiteSubmissions | null\n /** The batch this job was created under (AGL-2911); `null` for a single site. */\n batchId: string | null\n}\n\n/**\n * Where a site's contact form sends what a visitor writes.\n *\n * Two, not three. The form step's own vocabulary has a third — a mailing\n * list — which it can only answer with a note, because the stored routing has\n * no place for a list; offering it as a question would be asking somebody to\n * pick an outcome the platform then explains it cannot store.\n */\nexport const AI_SITE_SUBMISSIONS = ['inbox', 'lead'] as const\n\nexport type AiSiteSubmissions = (typeof AI_SITE_SUBMISSIONS)[number]\n\n/**\n * What each answer to \"where do submissions go\" is called, and what it means.\n *\n * Here rather than beside the guided start's own questions, because it is not\n * only the guided start that asks: the agency batch asks the same thing of a\n * whole run (AGL-2918), and two surfaces wording one decision two ways is two\n * decisions. `ai-site-job.spec.ts` holds the list to {@link AI_SITE_SUBMISSIONS}.\n */\nexport const AI_SITE_SUBMISSION_CHOICES: ReadonlyArray<{\n id: AiSiteSubmissions\n label: string\n blurb: string\n}> = [\n {\n id: 'inbox',\n label: 'The Inbox',\n blurb: 'Every message is one to read and reply to.',\n },\n {\n id: 'lead',\n label: 'The Inbox, and CRM as a lead',\n blurb: 'Every message with an email address is also somebody to follow up.',\n },\n]\n\n/**\n * Which kind of email a scaffold's email unit is (AGL-2918), carried on the\n * derived job as `inputs.emailType`. The email step names the kind on the one\n * line it puts above the brief, and a scaffold was naming none.\n *\n * A key of the email step's own `AI_EMAIL_TYPES`, held here because neither\n * step may import the other: a scaffold delegates by job kind, and a\n * deployment that scaffolds is not necessarily one that has loaded the email\n * step. `ai-job-email-step.spec.ts` holds this key to that catalog.\n *\n * `reply` and not `welcome`. The five kinds a member picks are campaigns\n * somebody sends to an audience, and this is an answer to one person who\n * wrote in through the site; the nearest, `welcome`, is a label about signing\n * up, and a kind that misdescribes the email is worse than an absent one\n * because it is the first thing the model is told.\n */\nexport const AI_SITE_EMAIL_TYPE = 'reply'\n\n/**\n * What a site job's plan and every unit it builds are told about the\n * business's name (AGL-3596): that it is the name, used as written. Said on\n * the job's own turn, never in a cached system block, because it is one\n * site's. A model handed only what the business does named it itself —\n * \"Hillside Dog Grooming\" was built as \"Austin Paws Grooming\".\n */\nexport function aiSiteNameSentence(name: string): string {\n return `The business is named “${name}”: the site names it exactly that way, in the header, the footer, the copy and the search listing, and never by any other name.`\n}\n\n/** Where a job's inputs say submissions go, or `null` where they do not say. */\nexport function aiSiteSubmissions(\n inputs: Readonly<Record<string, unknown>> | null | undefined,\n): AiSiteSubmissions | null {\n const value = inputs?.['submissions']\n return (AI_SITE_SUBMISSIONS as readonly unknown[]).includes(value)\n ? (value as AiSiteSubmissions)\n : null\n}\n\nconst ID_CHARS = /^[A-Za-z0-9_-]{1,64}$/\n\n/** A scaffold's inputs, or the sentence the door refuses them with. */\nexport function parseAiSiteJobInputs(\n inputs: Readonly<Record<string, unknown>> | null | undefined,\n): AiSiteJobInputs | string {\n const text = (key: string): string | null => {\n const value = inputs?.[key]\n if (value === undefined || value === null || value === '') return ''\n if (typeof value !== 'string') return null\n const trimmed = value.trim()\n return trimmed.length > AI_SITE_INPUT_MAX_CHARS ? null : trimmed\n }\n const businessType = text('businessType')\n if (businessType === null) {\n return `businessType must be text under ${AI_SITE_INPUT_MAX_CHARS} characters`\n }\n if (!businessType) return 'Say what kind of business the site is for'\n const businessName = text('businessName')\n const city = text('city')\n const brand = text('brand')\n const audience = text('audience')\n const starter = text('starter')\n // A kind this deployment does not know is nobody having picked one.\n const siteKind = aiSiteKind(inputs?.['siteKind'])?.id ?? ''\n for (const [key, value] of [\n ['businessName', businessName],\n ['city', city],\n ['brand', brand],\n ['audience', audience],\n ['starter', starter],\n ] as const) {\n if (value === null)\n return `${key} must be text under ${AI_SITE_INPUT_MAX_CHARS} characters`\n }\n const rawPages = inputs?.['pages']\n const pages =\n typeof rawPages === 'number' ? rawPages : Number(rawPages ?? NaN)\n // Read here across both bands; the door holds a workspace to its own\n // (`aiSitePagesRefusal`), since only it knows the workspace's plan.\n if (\n !Number.isInteger(pages) ||\n pages < AI_SITE_FREE_PAGES.min ||\n pages > AI_SITE_PAGES.max\n ) {\n return `pages must be a whole number from ${AI_SITE_FREE_PAGES.min} to ${AI_SITE_PAGES.max}`\n }\n // Where submissions go is admitted only as one of the two the form step\n // can actually bind; anything else is nobody having said, and the model\n // proposes as it always did rather than the door refusing the whole job.\n const submissions = aiSiteSubmissions(inputs)\n const rawBatch = inputs?.['batchId']\n const batchId =\n rawBatch === undefined || rawBatch === null || rawBatch === ''\n ? null\n : typeof rawBatch === 'string' && ID_CHARS.test(rawBatch)\n ? rawBatch\n : undefined\n if (batchId === undefined) return 'batchId is not a batch id'\n return {\n businessType,\n audience: audience as string,\n starter: starter as string,\n siteKind,\n pages,\n businessName: businessName as string,\n city: city as string,\n brand: brand as string,\n welcomeEmail: inputs?.['welcomeEmail'] !== false,\n submissions,\n batchId,\n }\n}\n\n/**\n * Why a workspace cannot ask for this many pages (AGL-3594), in a sentence a\n * member reads; `null` when it can. A Free workspace builds one or two, and a\n * paid one four to eight, as it always has. Refused rather than clamped: the\n * guided start offers only the band, so a request outside it was not made\n * there, and a job quietly building fewer pages than it was asked for is a\n * worse answer than a sentence saying why.\n */\nexport function aiSitePagesRefusal(pages: number, freeTaste: boolean | null | undefined): string | null {\n const band = aiSitePagesBand(freeTaste)\n if (pages >= band.min && pages <= band.max) return null\n return freeTaste\n ? `A Free workspace's AI site start builds ${AI_SITE_FREE_PAGES.min} or ${AI_SITE_FREE_PAGES.max} pages. ${AI_SITE_FREE_PAGES_NOTE}`\n : `A site is planned with ${band.min} to ${band.max} pages.`\n}\n\n/**\n * What the site itself is, as a step that is NOT the scaffold reads it off a\n * job's inputs (AGL-2918).\n *\n * A scaffold delegates unit by unit under a job derived from its own — a page\n * job, a form job — and the derived job carries the scaffold's inputs. So the\n * two answers that describe the site rather than one record of it are\n * readable by every delegated step, and a step that wants them does not have\n * to know it was delegated to.\n *\n * Lenient where {@link parseAiSiteJobInputs} is strict, because it reads the\n * inputs of jobs that are not scaffolds: a page job started from the Screens\n * page has no `businessType` and no `pages`, and that is not an error here —\n * it is a site nobody described, and the answer is two empty strings.\n */\nexport interface AiSiteWords {\n /** What kind of site it is; empty when the job's inputs do not say. */\n about: string\n /** Who it is for; empty when the job's inputs do not say. */\n audience: string\n}\n\n/** Whether either half of {@link AiSiteWords} says anything. */\nexport function aiSiteWordsSaidAnything(words: AiSiteWords): boolean {\n return Boolean(words.about || words.audience)\n}\n\n/** What a job's inputs say the site is, read defensively and trimmed to the input ceiling. */\nexport function aiSiteWords(\n inputs: Readonly<Record<string, unknown>> | null | undefined,\n): AiSiteWords {\n const read = (key: string): string => {\n const value = inputs?.[key]\n if (typeof value !== 'string') return ''\n return value.replace(/\\s+/g, ' ').trim().slice(0, AI_SITE_INPUT_MAX_CHARS).trim()\n }\n return { about: read('businessType'), audience: read('audience') }\n}\n\n/**\n * What a scaffold builds for itself: the layout its pages render inside, the\n * form they place, and the palette suggestion a member applies in the Theme\n * section. Anything else a plan asks to create is a job of its own.\n */\nexport const AI_SITE_CREATE_KINDS: readonly AiBuildPlanCreateKind[] = [\n 'layout',\n 'form',\n 'theme-change',\n]\n\n/** The creations a scaffold cannot build, in the order the plan lists them, each named once. */\nexport function aiSitePlanPrerequisites(\n plan: AiBuildPlan,\n): Array<{ kind: AiBuildPlanCreateKind; name: string }> {\n const seen = new Set<string>()\n const prerequisites: Array<{ kind: AiBuildPlanCreateKind; name: string }> = []\n const add = (kind: AiBuildPlanCreateKind, name: string) => {\n const key = `${kind}:${name.toLowerCase()}`\n if (seen.has(key)) return\n seen.add(key)\n prerequisites.push({ kind, name })\n }\n for (const entry of plan.create) {\n if (!AI_SITE_CREATE_KINDS.includes(entry.kind)) add(entry.kind, entry.name)\n }\n // A reference the create list does not carry is refused by the plan rules\n // before a plan is kept: rule 2 for a screen's layout, rule 7 for anything\n // else (`plan-creation-undeclared`, AGL-3040). A plan confirmed before that\n // rule existed can still carry one. It is named as a component: the\n // reference carries no kind, and the refusal must say where one is made.\n for (const { name } of aiPlanUndeclaredRefs(plan)) add('component', name)\n return prerequisites\n}\n\n/**\n * Why a scaffold cannot build a plan of this SHAPE — the page band, a page's\n * sections, its addresses, its navigation — in a sentence a member reads;\n * `null` when the shape is one it builds. The plan step holds a plan to it\n * with a re-ask (AGL-3030), and the doors hold a confirmed plan to it again\n * through `aiSitePlanRefusal`.\n */\nexport function aiSitePlanShapeRefusal(\n plan: AiBuildPlan,\n options: { freeTaste?: boolean } = {},\n): string | null {\n const { screens } = plan\n const band = aiSitePagesBand(options.freeTaste)\n if (screens.length < band.min || screens.length > band.max) {\n return `This plan builds ${screens.length} ${screens.length === 1 ? 'page' : 'pages'}, and ${\n options.freeTaste ? \"a Free workspace's site scaffold\" : 'a site scaffold'\n } builds ${band.min} to ${band.max}. Describe the site again.`\n }\n const slugs = new Set<string>()\n for (const screen of screens) {\n if (!screen.sections.length) {\n return `The page “${screen.title}” has no sections to build. Describe the site again.`\n }\n if (screen.sections.length > AI_SITE_MAX_SECTIONS) {\n return `The page “${screen.title}” has ${screen.sections.length} sections, and a scaffolded page holds ${AI_SITE_MAX_SECTIONS}. Describe the site again.`\n }\n const slug = screen.slug.trim().toLowerCase()\n if (slugs.has(slug)) {\n return `Two pages in this plan share the address ${screen.slug}. Describe the site again.`\n }\n slugs.add(slug)\n }\n if (!screens.some((screen) => screen.nav)) {\n return 'No page in this plan is in the site navigation. Describe the site again.'\n }\n return null\n}\n\n/**\n * Why a scaffold cannot build this plan, in a sentence a member reads when\n * confirming it; `null` when it can.\n */\nexport function aiSitePlanRefusal(\n plan: AiBuildPlan,\n options: { freeTaste?: boolean } = {},\n): string | null {\n const shape = aiSitePlanShapeRefusal(plan, options)\n if (shape) return shape\n const prerequisites = aiSitePlanPrerequisites(plan)\n if (!prerequisites.length) return null\n const parts = prerequisites.map(\n ({ kind, name }) =>\n `the ${AI_BUILD_PLAN_CREATION_NOUNS[kind].noun} “${name}” ${AI_BUILD_PLAN_CREATION_NOUNS[kind].where}`,\n )\n const listed =\n parts.length === 1\n ? parts[0]\n : `${parts.slice(0, -1).join(', ')} and ${parts[parts.length - 1]}`\n return `This site needs what the workspace does not have yet. Create ${listed}, then describe the site again.`\n}\n\n/** What the estimate counts a plan in: whether a welcome email follows, and the creations the job builds. */\nexport interface AiPlanPassOptions {\n welcomeEmail?: boolean\n /** The creation kinds the job builds itself; a scaffold's when absent. */\n creates?: readonly AiBuildPlanCreateKind[]\n}\n\n/**\n * The passes a plan implies: one per section of every screen, one more per\n * screen for its search listing and its draft, and one for each thing the\n * plan creates that the job builds. What the estimate is counted in.\n */\nexport function aiPlanPasses(plan: AiBuildPlan, options: AiPlanPassOptions = {}): number {\n const screens = plan.screens.reduce(\n (total, screen) => total + screen.sections.length + 1,\n 0,\n )\n const creates = options.creates ?? AI_SITE_CREATE_KINDS\n const creations = plan.create.filter((entry) => creates.includes(entry.kind)).length\n return screens + creations + (options.welcomeEmail ? 1 : 0)\n}\n\n/**\n * About what a plan costs to build, in credits. An ESTIMATE: the nominal\n * credits the machine holds per step, times the passes the plan implies.\n * What each pass actually costs is its model's tokens, recorded on the job\n * as it runs.\n */\nexport function aiPlanCreditEstimate(plan: AiBuildPlan, options: AiPlanPassOptions = {}): number {\n return aiPlanPasses(plan, options) * AI_SITE_PASS_CREDITS\n}\n\n/**\n * About what a job of this kind costs to build from its plan (AGL-3031): a\n * page job counts the layout, forms and components it builds before its\n * page; a template, layout, component, form or email job counts its own\n * record and every creation it builds before it (AGL-3143 §15); and a\n * scaffold counts what it builds. The figure the proposal shows beside\n * Confirm, and the hold a confirmation takes.\n */\nexport function aiJobPlanCreditEstimate(kind: string, plan: AiBuildPlan): number {\n const creates =\n kind === 'page' ? AI_PAGE_CREATE_KINDS : AI_JOB_CREATE_KINDS[kind as keyof typeof AI_JOB_CREATE_KINDS]\n return aiPlanCreditEstimate(plan, creates ? { creates } : {})\n}\n\n/**\n * About what a scaffold of this many pages costs, before a plan names its\n * sections: the same arithmetic on the nominal section count, plus the plan\n * step that proposes it. Shown where a member asks for a scaffold.\n */\nexport function aiSiteCreditEstimate(\n pages: number,\n options: { welcomeEmail?: boolean } = {},\n): number {\n const screens = Math.max(0, Math.floor(pages))\n const passes =\n 1 +\n screens * (AI_SITE_NOMINAL_SECTIONS + 1) +\n 2 +\n (options.welcomeEmail ? 1 : 0)\n return passes * AI_SITE_PASS_CREDITS\n}\n"],"names":["aiSiteKind","AI_BUILD_PLAN_CREATION_NOUNS","aiPlanUndeclaredRefs","AI_JOB_CREATE_KINDS","AI_PAGE_CREATE_KINDS","AI_SITE_PAGES","min","max","AI_SITE_FREE_PAGES","aiSitePagesBand","freeTaste","AI_JOB_AUTO_CONFIRM_INPUT","AI_SITE_FREE_PAGES_NOTE","AI_SITE_PLAN_MAX_TOKENS","free","paid","AI_FREE_SITE_WORST_CASE_CREDITS","plan","look","layout","firstSection","laterSection","listing","aiFreeSiteSectionsWithin","creations","taste","credits","pages","Math","floor","before","layouts","AI_FREE_SITE_NOMINAL_SECTIONS","aiFreeSiteCreditEstimate","count","AI_SITE_MAX_SECTIONS","AI_SITE_NOMINAL_SECTIONS","AI_SITE_PASS_CREDITS","AI_SITE_INPUT_MAX_CHARS","AI_SITE_BATCH_MAX","AI_SITE_BATCH_MIN_HOST_LIMIT","AI_SITE_SUBMISSIONS","AI_SITE_SUBMISSION_CHOICES","id","label","blurb","AI_SITE_EMAIL_TYPE","aiSiteNameSentence","name","aiSiteSubmissions","inputs","value","includes","ID_CHARS","parseAiSiteJobInputs","text","key","undefined","trimmed","trim","length","businessType","businessName","city","brand","audience","starter","siteKind","rawPages","Number","NaN","isInteger","submissions","rawBatch","batchId","test","welcomeEmail","aiSitePagesRefusal","band","aiSiteWordsSaidAnything","words","Boolean","about","aiSiteWords","read","replace","slice","AI_SITE_CREATE_KINDS","aiSitePlanPrerequisites","seen","Set","prerequisites","add","kind","toLowerCase","has","push","entry","create","aiSitePlanShapeRefusal","options","screens","slugs","screen","sections","title","slug","some","nav","aiSitePlanRefusal","shape","parts","map","noun","where","listed","join","aiPlanPasses","reduce","total","creates","filter","aiPlanCreditEstimate","aiJobPlanCreditEstimate","aiSiteCreditEstimate","passes"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,UAAU,QAAQ,qBAAiB;AAC5C,SACEC,4BAA4B,EAC5BC,oBAAoB,QAGf,qBAAiB;AACxB,SAASC,mBAAmB,QAAQ,wBAAoB;AACxD,SAASC,oBAAoB,QAAQ,mBAAe;AAEpD;;;;;;;;;;;;;;;;;;;;;;;CAuBC,GAED,+EAA+E,GAC/E,OAAO,MAAMC,gBAAgB;IAAEC,KAAK;IAAGC,KAAK;AAAE,EAAU;AAExD;;;;;;CAMC,GACD,OAAO,MAAMC,qBAAqB;IAAEF,KAAK;IAAGC,KAAK;AAAE,EAAU;AAE7D,qFAAqF,GACrF,OAAO,SAASE,gBACdC,SAAqC;IAErC,OAAOA,YAAYF,qBAAqBH;AAC1C;AAEA;;;CAGC,GACD,OAAO,MAAMM,4BAA4B,cAAa;AAEtD,qEA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hB,MAAMC,UAAUpF,KAAKoF,OAAO,CAACiB,MAAM,CACjC,CAACC,OAAOhB,SAAWgB,QAAQhB,OAAOC,QAAQ,CAAC5C,MAAM,GAAG,GACpD;IAEF,MAAM4D,WAAUpB,mBAAAA,QAAQoB,OAAO,YAAfpB,mBAAmBb;IACnC,MAAM/D,YAAYP,KAAKiF,MAAM,CAACuB,MAAM,CAAC,CAACxB,QAAUuB,QAAQpE,QAAQ,CAAC6C,MAAMJ,IAAI,GAAGjC,MAAM;IACpF,OAAOyC,UAAU7E,YAAa4E,CAAAA,QAAQxB,YAAY,GAAG,IAAI,CAAA;AAC3D;AAEA;;;;;CAKC,GACD,OAAO,SAAS8C,qBAAqBzG,IAAiB,EAAEmF,UAA6B,CAAC,CAAC;IACrF,OAAOiB,aAAapG,MAAMmF,WAAW/D;AACvC;AAEA;;;;;;;CAOC,GACD,OAAO,SAASsF,wBAAwB9B,IAAY,EAAE5E,IAAiB;IACrE,MAAMuG,UACJ3B,SAAS,SAASzF,uBAAuBD,mBAAmB,CAAC0F,KAAyC;IACxG,OAAO6B,qBAAqBzG,MAAMuG,UAAU;QAAEA;IAAQ,IAAI,CAAC;AAC7D;AAEA;;;;CAIC,GACD,OAAO,SAASI,qBACdjG,KAAa,EACbyE,UAAsC,CAAC,CAAC;IAExC,MAAMC,UAAUzE,KAAKrB,GAAG,CAAC,GAAGqB,KAAKC,KAAK,CAACF;IACvC,MAAMkG,SACJ,IACAxB,UAAWjE,CAAAA,2BAA2B,CAAA,IACtC,IACCgE,CAAAA,QAAQxB,YAAY,GAAG,IAAI,CAAA;IAC9B,OAAOiD,SAASxF;AAClB"}
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/model/ai-site-job.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { aiSiteKind } from './ai-site-kinds'\nimport {\n AI_BUILD_PLAN_CREATION_NOUNS,\n aiPlanUndeclaredRefs,\n type AiBuildPlan,\n type AiBuildPlanCreateKind,\n} from './ai-build-plan'\nimport { AI_JOB_CREATE_KINDS } from './ai-job-creations'\nimport { AI_PAGE_CREATE_KINDS } from './ai-page-job'\n\n/**\n * What a site scaffold is (AGL-2911): the inputs a `site` job is admitted\n * with, the plans a scaffold can build, and what one is estimated to cost\n * before it starts.\n *\n * A scaffold is the one job kind that builds a whole site rather than one\n * record: a plan of four to eight screens, the layout they render inside,\n * the contact form they place, a palette suggestion, and — where the email\n * step is loaded — a welcome email. It builds each of those through the job\n * kind that already owns it, so this module describes what a scaffold may\n * ask for and refuses the rest at confirmation, before a credit is spent,\n * naming what to make first.\n *\n * ── The estimate is the guard rail ───────────────────────────────────────\n *\n * A scaffold is tens of model calls, where every other kind is a few, so the\n * member reads what it will cost before they confirm the plan that spends\n * it. The figure is the machine's own nominal credits per step multiplied by\n * the passes the plan implies — an estimate, and said to be one wherever it\n * is shown.\n *\n * This module imports nothing at runtime, so the doors, the step, the batch\n * card and the plan proposal read one vocabulary.\n */\n\n/** How many pages a scaffold builds: enough to be a site, few enough to read. */\nexport const AI_SITE_PAGES = { min: 4, max: 8 } as const\n\n/**\n * How many pages a Free workspace's scaffold builds (AGL-3594): its home page\n * and the one page the brief most needs. A product decision, not a figure the\n * wall derives — the wall's proof (`jobs/ai-job-free-site.spec.ts`) shows a\n * plan and a build of this many pages fit the Free taste with room for one\n * retried page.\n */\nexport const AI_SITE_FREE_PAGES = { min: 1, max: 2 } as const\n\n/** The pages a scaffold builds for a workspace on the Free taste or on a paid plan. */\nexport function aiSitePagesBand(\n freeTaste: boolean | null | undefined,\n): { readonly min: number; readonly max: number } {\n return freeTaste ? AI_SITE_FREE_PAGES : AI_SITE_PAGES\n}\n\n/**\n * The job input a guided site start sets so its plan is confirmed for it\n * (AGL-3594); `jobs/ai-job-auto-confirm.ts` says where it is honored.\n */\nexport const AI_JOB_AUTO_CONFIRM_INPUT = 'autoConfirm'\n\n/** What a Free site start's page selector says under it (AGL-3594). */\nexport const AI_SITE_FREE_PAGES_NOTE = 'Paid plans can generate more pages.'\n\n/**\n * The plan's answer ceiling for a scaffold (AGL-3594), Free and paid. A plan\n * is an outline — each page's title, address, search listing and sections by\n * name — and the build steps write everything else, so a scaffold plans with\n * no thinking and at a ceiling sized to the outline of its largest band with\n * room to spare: about 300 tokens a page. The 13,491-token plan a Free site\n * spent 227 of its 300 credits on was its thinking, at the routing table's\n * 8,000 a call.\n */\nexport const AI_SITE_PLAN_MAX_TOKENS = { free: 2_000, paid: 4_000 } as const\n\n/** What each exchange of a Free site job comes to at its worst, in credits. */\nexport interface AiFreeSiteWorstCase {\n /** The site plan: its answer and its one re-ask, each at its ceiling. */\n plan: number\n /** The site's look (AGL-3660): its one answer at its ceiling, on the fast tier. */\n look: number\n /**\n * The layout a site with none has built first (AGL-3660): its header and\n * footer as ONE answer in the layout language, writing its cached prefix,\n * at the most a live frame answer wrote, and never under what the live\n * guided start's layout step metered.\n */\n layout: number\n /** The saved form a guided start makes (AGL-3596), at what the live guided start's form step metered. */\n form: number\n /**\n * A language page's answer before its sections (AGL-3660): its cached\n * prefix written, its turn, and the whole room its ceiling keeps for\n * thinking. A page is ONE answer, not a pass a section.\n */\n page: number\n /** Each planned section's words in that answer, at the most a section is written in. */\n section: number\n /**\n * Room for one page asked again: the answer once more, reading its cached\n * prefix, with its thinking room and a full page of sections.\n */\n retry: number\n /** A page's listing. */\n listing: number\n}\n\n/**\n * The Free site start's wall at its worst (AGL-3594, re-derived for the\n * layout language in AGL-3660): the plan and the look as\n * `jobs/ai-job-free-site.spec.ts` derives them from their requests at their\n * ceilings; the layout, form and pages from the language requests as they\n * stand, priced as each field says. The spec fails when a figure it derives\n * moves and this does not.\n */\nexport const AI_FREE_SITE_WORST_CASE_CREDITS: Readonly<AiFreeSiteWorstCase> = {\n plan: 35,\n look: 7,\n layout: 23,\n form: 29,\n page: 43,\n section: 4,\n retry: 64,\n listing: 3,\n}\n\n/**\n * The most sections a Free site plans across its pages (AGL-3660), whatever\n * the wall leaves: a full home of five and a page of two or three. A product\n * figure, so the spend a site EXPECTS stays near what it measured; the wall\n * proves it fits.\n */\nexport const AI_FREE_SITE_MAX_SECTIONS = 8\n\n/** What a Free site start builds before its sections: the layouts it builds first, its forms and its pages. */\nexport interface AiFreeSiteCreations {\n layouts: number\n pages: number\n /** The saved forms it makes; a guided start makes one where it places a form. */\n forms: number\n}\n\n/** A Free site start's credits at its worst for this many sections, its room for one retried page included. */\nexport function aiFreeSiteWorstCaseCredits(\n creations: AiFreeSiteCreations,\n sections: number,\n credits: Readonly<AiFreeSiteWorstCase> = AI_FREE_SITE_WORST_CASE_CREDITS,\n): number {\n const pages = Math.max(1, Math.floor(creations.pages))\n return (\n credits.plan +\n credits.look +\n creations.layouts * credits.layout +\n creations.forms * credits.form +\n pages * (credits.page + credits.listing) +\n sections * credits.section +\n credits.retry\n )\n}\n\n/**\n * The most sections a Free site's plan fits in the Free taste at its worst,\n * across all its pages (AGL-3660): the plan, the look, the layout and form it\n * builds first, each page's answer and listing, ROOM FOR ONE RETRIED PAGE,\n * and as many sections as the rest pays for — at most\n * `AI_FREE_SITE_MAX_SECTIONS`, and at most what the pages hold. None when the\n * rest is already past the wall.\n */\nexport function aiFreeSiteSectionsWithin(\n creations: AiFreeSiteCreations,\n taste: number,\n credits: Readonly<AiFreeSiteWorstCase> = AI_FREE_SITE_WORST_CASE_CREDITS,\n): number {\n const pages = Math.max(1, Math.floor(creations.pages))\n const before = aiFreeSiteWorstCaseCredits(creations, 0, credits)\n if (before > taste) return 0\n const paid = credits.section > 0 ? Math.floor((taste - before) / credits.section) : Number.POSITIVE_INFINITY\n return Math.min(AI_FREE_SITE_MAX_SECTIONS, pages * AI_SITE_MAX_SECTIONS, paid)\n}\n\n/** Sections a Free site's page is assumed to hold before its plan names them. */\nexport const AI_FREE_SITE_NOMINAL_SECTIONS = 4\n\n/**\n * About what a Free site start of this many pages costs at its worst, in\n * credits, for the dialog that asks for one: the plan, its look, the layout\n * and form a new site builds, each page's answer and listing, and its\n * sections at the nominal count, from the figures the wall is proven with\n * rather than the nominal credits a paid estimate counts. No retry room: the\n * dialog says what a start costs, not what the wall holds back.\n */\nexport function aiFreeSiteCreditEstimate(\n pages: number,\n credits: Readonly<AiFreeSiteWorstCase> = AI_FREE_SITE_WORST_CASE_CREDITS,\n): number {\n const count = Math.max(1, Math.floor(pages))\n return (\n aiFreeSiteWorstCaseCredits({ layouts: 1, forms: 1, pages: count }, count * AI_FREE_SITE_NOMINAL_SECTIONS, credits) -\n credits.retry\n )\n}\n\n/**\n * What a Free workspace has left of its Free AI credits this month: the less\n * of its own band's balance and its owner's, since the owner's allowance is\n * shared by every Free workspace they hold (AGL-2925) and the reservation\n * refuses at whichever wall is reached first. `resetsOn` is the UTC day the\n * month — and with it both balances — rolls over, `YYYY-MM-DD`.\n */\nexport interface AiFreeCreditsLeft {\n left: number\n total: number\n resetsOn: string\n}\n\n/** The first UTC day of the month after `now`, `YYYY-MM-DD`: when the Free credits come back. */\nexport function aiFreeCreditsResetOn(now: Date): string {\n const next = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth() + 1, 1))\n return next.toISOString().slice(0, 10)\n}\n\n/** A reset day as a person reads it: \"November 1\". */\nexport function aiFreeCreditsResetLabel(resetsOn: string): string {\n const at = new Date(`${resetsOn}T00:00:00.000Z`)\n return Number.isFinite(at.getTime())\n ? at.toLocaleDateString('en-US', { month: 'long', day: 'numeric', timeZone: 'UTC' })\n : 'the first of next month'\n}\n\n/**\n * The credits a Free site start needs and does not have (AGL-3660), or `null`\n * when what is left covers it — or when nothing is known about what is left,\n * since the reservation still refuses at the wall. The figure is the one the\n * dialog quotes (`aiFreeSiteCreditEstimate`), so the number a person is shown\n * is the number they are held to.\n */\nexport function aiFreeSiteShortfall(\n credits: Pick<AiFreeCreditsLeft, 'left'> | null | undefined,\n pages: number,\n): { needed: number; left: number } | null {\n if (!credits || !Number.isFinite(credits.left)) return null\n const needed = aiFreeSiteCreditEstimate(pages)\n const left = Math.max(0, Math.floor(credits.left))\n return left < needed ? { needed, left } : null\n}\n\n/** Why a Free site start is refused before it spends: what is left, when it comes back, and the way on. */\nexport function aiFreeSiteShortfallText(\n shortfall: { needed: number; left: number },\n resetsOn: string,\n): string {\n const left = shortfall.left === 1 ? '1 is' : `${shortfall.left.toLocaleString('en-US')} are`\n return (\n `Building this site can take up to about ${shortfall.needed.toLocaleString('en-US')} AI credits, ` +\n `and only ${left} left of your free AI credits this month. They are shared by all your Free ` +\n `workspaces and reset on ${aiFreeCreditsResetLabel(resetsOn)}. Upgrade this workspace to build ` +\n 'your site now, or start from the starter site and try AI again after the reset.'\n )\n}\n\n/**\n * The most sections one scaffolded page may hold. The plan model allows more\n * for a page job, which builds one page; a scaffold builds eight, and each\n * section is a pass of its own.\n */\nexport const AI_SITE_MAX_SECTIONS = 8\n\n/**\n * The fewest sections a site start's home page is planned with (AGL-3660).\n * A new site is a full website (Zach, 2026-10-04): its home reads as one — a\n * hero, then bands such as the offer, why us, social proof, and a closing\n * call to action. A plan is an outline and nothing asked for more than a\n * ceiling, so a live Free yoga start (2026-10-07) planned its home with two\n * sections. The plan step names this count in the plan's turn and re-asks a\n * first answer whose home is under it (`aiSiteThinHomeViolations`).\n */\nexport const AI_SITE_HOME_MIN_SECTIONS = 5\n\n/**\n * The blog a paid guided start writes its first posts into (AGL-3676), and\n * the addresses it may answer at, in order of preference: the first one no\n * planned page takes.\n */\nexport const AI_SITE_BLOG_NAME = 'Blog'\nexport const AI_SITE_BLOG_SLUGS = ['blog', 'posts', 'journal', 'articles', 'writing', 'stories'] as const\n\n/** A planned page's first path segment, lower-cased: `/journal/2026` → `journal`. */\nconst firstSegment = (slug: string) => slug.trim().replace(/^\\/+/, '').split('/')[0].toLowerCase()\n\n/** The address the blog answers at, beside these planned pages: the first of `AI_SITE_BLOG_SLUGS` none of them takes. */\nexport function aiSiteBlogSlug(screens: ReadonlyArray<{ slug: string }>): string {\n const taken = new Set(screens.map((screen) => firstSegment(screen.slug)).filter(Boolean))\n return AI_SITE_BLOG_SLUGS.find((slug) => !taken.has(slug)) ?? AI_SITE_BLOG_SLUGS[0]\n}\n\n/** The header's link to the blog (AGL-3660): a path, not a page, since the blog is the posts collection. */\nexport const AI_SITE_BLOG_NAV_ID = 'aiSiteBlog'\n\n/** The nav entry a site whose start writes posts links its blog by. */\nexport function aiSiteBlogNavPage(screens: ReadonlyArray<{ slug: string }>): {\n id: string\n label: string\n slug: string\n href: string\n} {\n const slug = aiSiteBlogSlug(screens)\n return { id: AI_SITE_BLOG_NAV_ID, label: AI_SITE_BLOG_NAME, slug: `/${slug}`, href: `/${slug}` }\n}\n\n/** The code a planned page that stands in for the written blog is re-asked under. */\nexport const AI_SITE_BLOG_PAGE_CODE = 'plan-blog-page-duplicate'\n\n/** A page's name that says it lists the posts. */\nconst BLOG_PAGE_WORDS = /\\b(blog|posts?|articles?|journal|writing|stories|news)\\b/i\n\n/**\n * A site plan's pages that stand in for the blog its start writes (AGL-3660):\n * the live Slow Roads start (2026-10-08) planned an \"Articles\" page of\n * featured cards beside the posts it wrote at /blog, and the header linked\n * Articles and never the blog. A page whose address is one of the blog's, or\n * whose name says it lists posts, duplicates it; the home page never does.\n */\nexport function aiSiteBlogStandInViolations(\n plan: Pick<AiBuildPlan, 'screens'>,\n): Array<{ rule: null; code: string; message: string; paths: string[] }> {\n const blogSlugs = new Set<string>(AI_SITE_BLOG_SLUGS)\n const standIns = plan.screens.flatMap((screen, index) => {\n if (aiSitePlanIsHome(screen)) return []\n const segment = firstSegment(screen.slug)\n return blogSlugs.has(segment) || BLOG_PAGE_WORDS.test(screen.title) ? [{ screen, index }] : []\n })\n if (!standIns.length) return []\n const names = standIns.map(({ screen }) => `\"${screen.title}\" at ${screen.slug}`).join(', ')\n return [\n {\n rule: null,\n code: AI_SITE_BLOG_PAGE_CODE,\n message: `${names} ${standIns.length === 1 ? 'stands' : 'stand'} in for the blog this site already gets: its first posts are written at /blog, and the header links it. Take ${standIns.length === 1 ? 'that page' : 'those pages'} out, and plan another page the brief needs, or feature the posts in a section of the home page.`,\n paths: standIns.map(({ index }) => `screens[${index}]`),\n },\n ]\n}\n\n/** The code a site plan's work section planned without its pieces is re-asked under. */\nexport const AI_SITE_EMPTY_GALLERY_CODE = 'plan-empty-gallery'\n\n/** The pieces a section that shows the work is planned with (AGL-3660). */\nexport const AI_SITE_GALLERY_MIN_ITEMS = 3\nexport const AI_SITE_GALLERY_MAX_ITEMS = 6\n\n/**\n * A planned section that shows the work: a gallery, a portfolio, a\n * collection, selected or featured work. \"Galleries\" — an audience, as in\n * \"Why galleries choose us\" — and \"how we work\" are not.\n */\nconst GALLERY_SECTION =\n /\\b(gallery|portfolio|collections?|lookbook|showcase|works|projects|(?:selected|featured|recent|our|past) (?:work|pieces|projects))\\b/i\n\n/** A section that only opens, introduces or closes a page, whatever page it is on: \"Portfolio Hero\". */\nconst FRAMING_SECTION = /\\b(hero|intro(?:duction)?|banner|header|cta|call to action|contact|inquiry|enquiry|about)\\b/i\n\n/** Whether a planned section's name says it shows the work. */\nexport function aiSiteSectionShowsWork(name: string): boolean {\n return GALLERY_SECTION.test(name) && !FRAMING_SECTION.test(name)\n}\n\n/** The sentence a site plan's turn states about a section that shows the work. */\nexport const AI_SITE_GALLERY_SENTENCE = `A section that shows the work — a gallery, portfolio, collection or selected works — counts its pieces in its items: ${AI_SITE_GALLERY_MIN_ITEMS} to ${AI_SITE_GALLERY_MAX_ITEMS}.`\n\n/**\n * A site plan's sections that show the work with fewer than three pieces\n * (AGL-3660). The live Juniper Clay start (2026-10-08) planned its Portfolio\n * page's \"Works Gallery\" with no items, and the page's works lost their place\n * to an inquiry form: a page about the work showed none.\n */\nexport function aiSiteEmptyGalleryViolations(\n plan: Pick<AiBuildPlan, 'screens'>,\n): Array<{ rule: null; code: string; message: string; paths: string[] }> {\n const thin = plan.screens.flatMap((screen, screenIndex) =>\n screen.sections.flatMap((section, sectionIndex) =>\n aiSiteSectionShowsWork(section.name) && section.items < AI_SITE_GALLERY_MIN_ITEMS\n ? [{ name: `\"${section.name}\" on ${screen.title}`, path: `screens[${screenIndex}].sections[${sectionIndex}].items` }]\n : [],\n ),\n )\n if (!thin.length) return []\n const names = thin.map((entry) => entry.name).join(', ')\n return [\n {\n rule: null,\n code: AI_SITE_EMPTY_GALLERY_CODE,\n message: `${names} ${thin.length === 1 ? 'shows' : 'show'} the work with fewer than ${AI_SITE_GALLERY_MIN_ITEMS} pieces. Plan ${thin.length === 1 ? 'it' : 'each'} with ${AI_SITE_GALLERY_MIN_ITEMS} to ${AI_SITE_GALLERY_MAX_ITEMS} items, one for each piece it shows.`,\n paths: thin.map((entry) => entry.path),\n },\n ]\n}\n\n/** The violation a site plan whose home page is under its fewest sections is re-asked under. */\nexport const AI_SITE_THIN_HOME_CODE = 'plan-thin-home'\n\n/** What a site plan's home is composed of, in the words the plan's turn and its re-ask both use. */\nexport const AI_SITE_HOME_BANDS =\n 'a hero first, then bands such as services or the offer, about or why us, and testimonials or other social proof, and a closing call to action or contact band last'\n\n/**\n * The fewest sections this site start's home is held to (AGL-3660): five, or\n * 0 — no minimum — where the Free wall cannot pay for a full home beside the\n * other pages. `across` is the sections the Free taste fits across `pages`\n * pages, each other page keeping at least one; `null` is a paid start, which\n * no wall shares out.\n *\n * ⛔ NEVER a lowered minimum. A Free guided start creates its site empty and\n * plans its layout, and the wall then fits 4 sections across two pages. Told\n * \"a home of at least 3\" beside that, the live yoga start of 2026-10-08\n * planned 4 + 3 and then 4 + 2, was refused for the wall twice, and stopped:\n * a home asked for in bands the wall cannot pay for is a start that fails.\n */\nexport function aiSiteHomeMinSections(input: { pages: number; across: number | null }): number {\n if (input.across === null) return AI_SITE_HOME_MIN_SECTIONS\n const others = Math.max(0, Math.floor(input.pages) - 1)\n return input.across - others >= AI_SITE_HOME_MIN_SECTIONS ? AI_SITE_HOME_MIN_SECTIONS : 0\n}\n\n/**\n * What a site start's plan is told to BUILD with (AGL-3660): the sections are\n * a budget to use, never a ceiling to stay under. Told only \"at most 8\", the\n * live prod start of 2026-10-08 planned a home of two sections, and Zach: \"that\n * didn't mean do as little as possible.\" On the Free taste the sentence shares\n * the wall's sections out — a home of five or six, the other page two or\n * three, about seven or eight in all; a paid start's home is asked to be rich.\n * `min` is the home's fewest (`aiSiteHomeMinSections`), 0 where the plan\n * plans no home or the wall cannot pay for a full one.\n */\nexport function aiSiteFullPlanSentence(input: { pages: number; across: number | null; min: number }): string {\n const { across, min } = input\n if (across === null) {\n return min > 0\n ? `Plan a full website, never a minimal one: a rich home page of ${min + 1} or more sections where the brief gives them, and every page with the sections it needs.`\n : 'Plan a full website, never a minimal one: every page with the sections it needs.'\n }\n const lead = `The ${across} sections are the budget to use, not a ceiling to stay under: plan a full website, never a minimal one`\n const others = Math.max(0, Math.floor(input.pages) - 1)\n if (min <= 0 || across < min) return `${lead}.`\n const homeHi = Math.max(min, Math.min(min + 1, across - others))\n if (!others) return `${lead}: the home page at / with ${min} to ${homeHi} sections.`\n const otherHi = Math.max(1, Math.min(3, Math.floor((across - min) / others)))\n const otherLo = Math.max(1, Math.min(2, otherHi, Math.floor((across - homeHi) / others)))\n const totalLo = Math.max(min + others, across - 1)\n const range = (lo: number, hi: number) => (lo === hi ? `${lo}` : `${lo} to ${hi}`)\n const pagesWord = others === 1 ? 'the other page' : 'each other page'\n return `${lead}: the home page at / with ${range(min, homeHi)} sections, ${pagesWord} ${range(otherLo, otherHi)}, about ${range(totalLo, across)} in total.`\n}\n\n/** Whether a planned page is the site's home: the one at `/`. */\nexport function aiSitePlanIsHome(screen: { slug: string }): boolean {\n const slug = screen.slug.trim()\n return slug === '/' || slug === ''\n}\n\n/**\n * A site plan's home page under its fewest sections (AGL-3660), as the plan\n * step's re-ask names it. A plan with no page at `/` — the owner's own home\n * stays — has no home to hold. `across` is the Free wall's section count, so\n * the re-ask says where the sections come from rather than tripping the wall.\n */\nexport function aiSiteThinHomeViolations(\n plan: Pick<AiBuildPlan, 'screens'>,\n options: { min: number; across: number | null },\n): Array<{ rule: null; code: string; message: string; paths: string[] }> {\n const index = plan.screens.findIndex(aiSitePlanIsHome)\n if (index < 0) return []\n const count = plan.screens[index].sections.length\n if (count >= options.min) return []\n const within =\n options.across === null\n ? ''\n : ` Keep the whole plan within ${options.across} sections: take them from the other page where you must.`\n return [\n {\n rule: null,\n code: AI_SITE_THIN_HOME_CODE,\n message: `The home page has ${count} ${count === 1 ? 'section' : 'sections'}, and a new site's home page reads as a full website with at least ${options.min}: ${AI_SITE_HOME_BANDS}.${within}`,\n paths: [`screens[${index}].sections`],\n },\n ]\n}\n\n/**\n * Sections a page is assumed to hold before a plan names them, for the\n * estimate a member reads when they ask for a scaffold. A declared\n * assumption, not a measurement: the plan's own section counts replace it\n * the moment the plan exists.\n */\nexport const AI_SITE_NOMINAL_SECTIONS = 5\n\n/**\n * The credits one pass is held against: the machine's\n * `AI_JOB_STEP_RESERVE_CREDITS`, declared here so the estimate stays a pure\n * number the console computes without the Admin SDK. `ai-site-job.spec.ts`\n * holds the two equal.\n */\nexport const AI_SITE_PASS_CREDITS = 50\n\n/** The longest a scaffold's scalar inputs may run; they are names, not copy. */\nexport const AI_SITE_INPUT_MAX_CHARS = 120\n\n/** The sites one agency batch may generate for in one request. */\nexport const AI_SITE_BATCH_MAX = 25\n\n/**\n * The sites a plan must hold before the org Sites page offers the batch at\n * all: the Agency and Advanced bands, which the plan's `hostLimit` is what\n * distinguishes.\n */\nexport const AI_SITE_BATCH_MIN_HOST_LIMIT = 25\n\nexport interface AiSiteJobInputs {\n /** What the business is, in a few words: the brief's subject. */\n businessType: string\n /**\n * Who the site is for, in a few words (AGL-2918); empty when nobody said.\n * The plan step puts it in front of the model on a line of its own, as it\n * does every other scalar here, so it narrows the pages a plan proposes\n * without a prompt of its own.\n */\n audience: string\n /**\n * The starter site whose shape the person liked (AGL-2918), by its\n * `STARTER_TEMPLATES` id; empty when they picked none.\n *\n * A hint carried as the id rather than the starter, because an id is what\n * the guided start's list, this door and the plan's line all agree on\n * without any of them loading a catalog of node maps. Unrecognized ids are\n * admitted for the same reason an unrecognized business type is: it is a\n * few words in a brief, not a lookup.\n */\n starter: string\n /**\n * The kind of site the person picked (AGL-3660), by its `AI_SITE_KINDS`\n * id; empty when nobody picked one, and the business type suggests it.\n * It sets the look the site is designed in and how its pages are arranged.\n */\n siteKind: string\n /** How many pages the member asked for. */\n pages: number\n /** The per-site variables an agency batch varies; empty when none was given. */\n businessName: string\n city: string\n brand: string\n /** Whether the scaffold also drafts a welcome email. */\n welcomeEmail: boolean\n /**\n * Where the contact form's submissions go (AGL-2918); `null` where nobody\n * said, which is every job created before the question existed and every\n * door that does not ask it.\n *\n * The one setting a new site owner actually needs made, and the one thing\n * about a contact form a model cannot know: whether a submission is a note\n * to read or a lead to chase is a decision about how the business runs. So\n * an answer BINDS the form step rather than hinting to it, and `null`\n * leaves the model's own proposal standing, exactly as it stood before.\n */\n submissions: AiSiteSubmissions | null\n /** The batch this job was created under (AGL-2911); `null` for a single site. */\n batchId: string | null\n}\n\n/**\n * Where a site's contact form sends what a visitor writes.\n *\n * Two, not three. The form step's own vocabulary has a third — a mailing\n * list — which it can only answer with a note, because the stored routing has\n * no place for a list; offering it as a question would be asking somebody to\n * pick an outcome the platform then explains it cannot store.\n */\nexport const AI_SITE_SUBMISSIONS = ['inbox', 'lead'] as const\n\nexport type AiSiteSubmissions = (typeof AI_SITE_SUBMISSIONS)[number]\n\n/**\n * What each answer to \"where do submissions go\" is called, and what it means.\n *\n * Here rather than beside the guided start's own questions, because it is not\n * only the guided start that asks: the agency batch asks the same thing of a\n * whole run (AGL-2918), and two surfaces wording one decision two ways is two\n * decisions. `ai-site-job.spec.ts` holds the list to {@link AI_SITE_SUBMISSIONS}.\n */\nexport const AI_SITE_SUBMISSION_CHOICES: ReadonlyArray<{\n id: AiSiteSubmissions\n label: string\n blurb: string\n}> = [\n {\n id: 'inbox',\n label: 'The Inbox',\n blurb: 'Every message is one to read and reply to.',\n },\n {\n id: 'lead',\n label: 'The Inbox, and CRM as a lead',\n blurb: 'Every message with an email address is also somebody to follow up.',\n },\n]\n\n/**\n * Which kind of email a scaffold's email unit is (AGL-2918), carried on the\n * derived job as `inputs.emailType`. The email step names the kind on the one\n * line it puts above the brief, and a scaffold was naming none.\n *\n * A key of the email step's own `AI_EMAIL_TYPES`, held here because neither\n * step may import the other: a scaffold delegates by job kind, and a\n * deployment that scaffolds is not necessarily one that has loaded the email\n * step. `ai-job-email-step.spec.ts` holds this key to that catalog.\n *\n * `reply` and not `welcome`. The five kinds a member picks are campaigns\n * somebody sends to an audience, and this is an answer to one person who\n * wrote in through the site; the nearest, `welcome`, is a label about signing\n * up, and a kind that misdescribes the email is worse than an absent one\n * because it is the first thing the model is told.\n */\nexport const AI_SITE_EMAIL_TYPE = 'reply'\n\n/**\n * What a site job's plan and every unit it builds are told about the\n * business's name (AGL-3596): that it is the name, used as written. Said on\n * the job's own turn, never in a cached system block, because it is one\n * site's. A model handed only what the business does named it itself —\n * \"Hillside Dog Grooming\" was built as \"Austin Paws Grooming\".\n */\nexport function aiSiteNameSentence(name: string): string {\n return `The business is named “${name}”: the site names it exactly that way, in the header, the footer, the copy and the search listing, and never by any other name.`\n}\n\n/** Where a job's inputs say submissions go, or `null` where they do not say. */\nexport function aiSiteSubmissions(\n inputs: Readonly<Record<string, unknown>> | null | undefined,\n): AiSiteSubmissions | null {\n const value = inputs?.['submissions']\n return (AI_SITE_SUBMISSIONS as readonly unknown[]).includes(value)\n ? (value as AiSiteSubmissions)\n : null\n}\n\nconst ID_CHARS = /^[A-Za-z0-9_-]{1,64}$/\n\n/** A scaffold's inputs, or the sentence the door refuses them with. */\nexport function parseAiSiteJobInputs(\n inputs: Readonly<Record<string, unknown>> | null | undefined,\n): AiSiteJobInputs | string {\n const text = (key: string): string | null => {\n const value = inputs?.[key]\n if (value === undefined || value === null || value === '') return ''\n if (typeof value !== 'string') return null\n const trimmed = value.trim()\n return trimmed.length > AI_SITE_INPUT_MAX_CHARS ? null : trimmed\n }\n const businessType = text('businessType')\n if (businessType === null) {\n return `businessType must be text under ${AI_SITE_INPUT_MAX_CHARS} characters`\n }\n if (!businessType) return 'Say what kind of business the site is for'\n const businessName = text('businessName')\n const city = text('city')\n const brand = text('brand')\n const audience = text('audience')\n const starter = text('starter')\n // A kind this deployment does not know is nobody having picked one.\n const siteKind = aiSiteKind(inputs?.['siteKind'])?.id ?? ''\n for (const [key, value] of [\n ['businessName', businessName],\n ['city', city],\n ['brand', brand],\n ['audience', audience],\n ['starter', starter],\n ] as const) {\n if (value === null)\n return `${key} must be text under ${AI_SITE_INPUT_MAX_CHARS} characters`\n }\n const rawPages = inputs?.['pages']\n const pages =\n typeof rawPages === 'number' ? rawPages : Number(rawPages ?? NaN)\n // Read here across both bands; the door holds a workspace to its own\n // (`aiSitePagesRefusal`), since only it knows the workspace's plan.\n if (\n !Number.isInteger(pages) ||\n pages < AI_SITE_FREE_PAGES.min ||\n pages > AI_SITE_PAGES.max\n ) {\n return `pages must be a whole number from ${AI_SITE_FREE_PAGES.min} to ${AI_SITE_PAGES.max}`\n }\n // Where submissions go is admitted only as one of the two the form step\n // can actually bind; anything else is nobody having said, and the model\n // proposes as it always did rather than the door refusing the whole job.\n const submissions = aiSiteSubmissions(inputs)\n const rawBatch = inputs?.['batchId']\n const batchId =\n rawBatch === undefined || rawBatch === null || rawBatch === ''\n ? null\n : typeof rawBatch === 'string' && ID_CHARS.test(rawBatch)\n ? rawBatch\n : undefined\n if (batchId === undefined) return 'batchId is not a batch id'\n return {\n businessType,\n audience: audience as string,\n starter: starter as string,\n siteKind,\n pages,\n businessName: businessName as string,\n city: city as string,\n brand: brand as string,\n welcomeEmail: inputs?.['welcomeEmail'] !== false,\n submissions,\n batchId,\n }\n}\n\n/**\n * Why a workspace cannot ask for this many pages (AGL-3594), in a sentence a\n * member reads; `null` when it can. A Free workspace builds one or two, and a\n * paid one four to eight, as it always has. Refused rather than clamped: the\n * guided start offers only the band, so a request outside it was not made\n * there, and a job quietly building fewer pages than it was asked for is a\n * worse answer than a sentence saying why.\n */\nexport function aiSitePagesRefusal(pages: number, freeTaste: boolean | null | undefined): string | null {\n const band = aiSitePagesBand(freeTaste)\n if (pages >= band.min && pages <= band.max) return null\n return freeTaste\n ? `A Free workspace's AI site start builds ${AI_SITE_FREE_PAGES.min} or ${AI_SITE_FREE_PAGES.max} pages. ${AI_SITE_FREE_PAGES_NOTE}`\n : `A site is planned with ${band.min} to ${band.max} pages.`\n}\n\n/**\n * What the site itself is, as a step that is NOT the scaffold reads it off a\n * job's inputs (AGL-2918).\n *\n * A scaffold delegates unit by unit under a job derived from its own — a page\n * job, a form job — and the derived job carries the scaffold's inputs. So the\n * two answers that describe the site rather than one record of it are\n * readable by every delegated step, and a step that wants them does not have\n * to know it was delegated to.\n *\n * Lenient where {@link parseAiSiteJobInputs} is strict, because it reads the\n * inputs of jobs that are not scaffolds: a page job started from the Screens\n * page has no `businessType` and no `pages`, and that is not an error here —\n * it is a site nobody described, and the answer is two empty strings.\n */\nexport interface AiSiteWords {\n /** What kind of site it is; empty when the job's inputs do not say. */\n about: string\n /** Who it is for; empty when the job's inputs do not say. */\n audience: string\n}\n\n/** Whether either half of {@link AiSiteWords} says anything. */\nexport function aiSiteWordsSaidAnything(words: AiSiteWords): boolean {\n return Boolean(words.about || words.audience)\n}\n\n/** What a job's inputs say the site is, read defensively and trimmed to the input ceiling. */\nexport function aiSiteWords(\n inputs: Readonly<Record<string, unknown>> | null | undefined,\n): AiSiteWords {\n const read = (key: string): string => {\n const value = inputs?.[key]\n if (typeof value !== 'string') return ''\n return value.replace(/\\s+/g, ' ').trim().slice(0, AI_SITE_INPUT_MAX_CHARS).trim()\n }\n return { about: read('businessType'), audience: read('audience') }\n}\n\n/**\n * What a scaffold builds for itself: the layout its pages render inside, the\n * form they place, and the palette suggestion a member applies in the Theme\n * section. Anything else a plan asks to create is a job of its own.\n */\nexport const AI_SITE_CREATE_KINDS: readonly AiBuildPlanCreateKind[] = [\n 'layout',\n 'form',\n 'theme-change',\n]\n\n/** The creations a scaffold cannot build, in the order the plan lists them, each named once. */\nexport function aiSitePlanPrerequisites(\n plan: AiBuildPlan,\n): Array<{ kind: AiBuildPlanCreateKind; name: string }> {\n const seen = new Set<string>()\n const prerequisites: Array<{ kind: AiBuildPlanCreateKind; name: string }> = []\n const add = (kind: AiBuildPlanCreateKind, name: string) => {\n const key = `${kind}:${name.toLowerCase()}`\n if (seen.has(key)) return\n seen.add(key)\n prerequisites.push({ kind, name })\n }\n for (const entry of plan.create) {\n if (!AI_SITE_CREATE_KINDS.includes(entry.kind)) add(entry.kind, entry.name)\n }\n // A reference the create list does not carry is refused by the plan rules\n // before a plan is kept: rule 2 for a screen's layout, rule 7 for anything\n // else (`plan-creation-undeclared`, AGL-3040). A plan confirmed before that\n // rule existed can still carry one. It is named as a component: the\n // reference carries no kind, and the refusal must say where one is made.\n for (const { name } of aiPlanUndeclaredRefs(plan)) add('component', name)\n return prerequisites\n}\n\n/**\n * Why a scaffold cannot build a plan of this SHAPE — the page band, a page's\n * sections, its addresses, its navigation — in a sentence a member reads;\n * `null` when the shape is one it builds. The plan step holds a plan to it\n * with a re-ask (AGL-3030), and the doors hold a confirmed plan to it again\n * through `aiSitePlanRefusal`.\n */\nexport function aiSitePlanShapeRefusal(\n plan: AiBuildPlan,\n options: { freeTaste?: boolean } = {},\n): string | null {\n const { screens } = plan\n const band = aiSitePagesBand(options.freeTaste)\n if (screens.length < band.min || screens.length > band.max) {\n return `This plan builds ${screens.length} ${screens.length === 1 ? 'page' : 'pages'}, and ${\n options.freeTaste ? \"a Free workspace's site scaffold\" : 'a site scaffold'\n } builds ${band.min} to ${band.max}. Describe the site again.`\n }\n const slugs = new Set<string>()\n for (const screen of screens) {\n if (!screen.sections.length) {\n return `The page “${screen.title}” has no sections to build. Describe the site again.`\n }\n if (screen.sections.length > AI_SITE_MAX_SECTIONS) {\n return `The page “${screen.title}” has ${screen.sections.length} sections, and a scaffolded page holds ${AI_SITE_MAX_SECTIONS}. Describe the site again.`\n }\n const slug = screen.slug.trim().toLowerCase()\n if (slugs.has(slug)) {\n return `Two pages in this plan share the address ${screen.slug}. Describe the site again.`\n }\n slugs.add(slug)\n }\n if (!screens.some((screen) => screen.nav)) {\n return 'No page in this plan is in the site navigation. Describe the site again.'\n }\n return null\n}\n\n/**\n * Why a scaffold cannot build this plan, in a sentence a member reads when\n * confirming it; `null` when it can.\n */\nexport function aiSitePlanRefusal(\n plan: AiBuildPlan,\n options: { freeTaste?: boolean } = {},\n): string | null {\n const shape = aiSitePlanShapeRefusal(plan, options)\n if (shape) return shape\n const prerequisites = aiSitePlanPrerequisites(plan)\n if (!prerequisites.length) return null\n const parts = prerequisites.map(\n ({ kind, name }) =>\n `the ${AI_BUILD_PLAN_CREATION_NOUNS[kind].noun} “${name}” ${AI_BUILD_PLAN_CREATION_NOUNS[kind].where}`,\n )\n const listed =\n parts.length === 1\n ? parts[0]\n : `${parts.slice(0, -1).join(', ')} and ${parts[parts.length - 1]}`\n return `This site needs what the workspace does not have yet. Create ${listed}, then describe the site again.`\n}\n\n/** What the estimate counts a plan in: whether a welcome email follows, and the creations the job builds. */\nexport interface AiPlanPassOptions {\n welcomeEmail?: boolean\n /** The creation kinds the job builds itself; a scaffold's when absent. */\n creates?: readonly AiBuildPlanCreateKind[]\n}\n\n/**\n * The passes a plan implies: one per section of every screen, one more per\n * screen for its search listing and its draft, and one for each thing the\n * plan creates that the job builds. What the estimate is counted in.\n */\nexport function aiPlanPasses(plan: AiBuildPlan, options: AiPlanPassOptions = {}): number {\n const screens = plan.screens.reduce(\n (total, screen) => total + screen.sections.length + 1,\n 0,\n )\n const creates = options.creates ?? AI_SITE_CREATE_KINDS\n const creations = plan.create.filter((entry) => creates.includes(entry.kind)).length\n return screens + creations + (options.welcomeEmail ? 1 : 0)\n}\n\n/**\n * About what a plan costs to build, in credits. An ESTIMATE: the nominal\n * credits the machine holds per step, times the passes the plan implies.\n * What each pass actually costs is its model's tokens, recorded on the job\n * as it runs.\n */\nexport function aiPlanCreditEstimate(plan: AiBuildPlan, options: AiPlanPassOptions = {}): number {\n return aiPlanPasses(plan, options) * AI_SITE_PASS_CREDITS\n}\n\n/**\n * About what a job of this kind costs to build from its plan (AGL-3031): a\n * page job counts the layout, forms and components it builds before its\n * page; a template, layout, component, form or email job counts its own\n * record and every creation it builds before it (AGL-3143 §15); and a\n * scaffold counts what it builds. The figure the proposal shows beside\n * Confirm, and the hold a confirmation takes.\n */\nexport function aiJobPlanCreditEstimate(kind: string, plan: AiBuildPlan): number {\n const creates =\n kind === 'page' ? AI_PAGE_CREATE_KINDS : AI_JOB_CREATE_KINDS[kind as keyof typeof AI_JOB_CREATE_KINDS]\n return aiPlanCreditEstimate(plan, creates ? { creates } : {})\n}\n\n/**\n * About what a scaffold of this many pages costs, before a plan names its\n * sections: the same arithmetic on the nominal section count, plus the plan\n * step that proposes it. Shown where a member asks for a scaffold.\n */\nexport function aiSiteCreditEstimate(\n pages: number,\n options: { welcomeEmail?: boolean } = {},\n): number {\n const screens = Math.max(0, Math.floor(pages))\n const passes =\n 1 +\n screens * (AI_SITE_NOMINAL_SECTIONS + 1) +\n 2 +\n (options.welcomeEmail ? 1 : 0)\n return passes * AI_SITE_PASS_CREDITS\n}\n"],"names":["aiSiteKind","AI_BUILD_PLAN_CREATION_NOUNS","aiPlanUndeclaredRefs","AI_JOB_CREATE_KINDS","AI_PAGE_CREATE_KINDS","AI_SITE_PAGES","min","max","AI_SITE_FREE_PAGES","aiSitePagesBand","freeTaste","AI_JOB_AUTO_CONFIRM_INPUT","AI_SITE_FREE_PAGES_NOTE","AI_SITE_PLAN_MAX_TOKENS","free","paid","AI_FREE_SITE_WORST_CASE_CREDITS","plan","look","layout","form","page","section","retry","listing","AI_FREE_SITE_MAX_SECTIONS","aiFreeSiteWorstCaseCredits","creations","sections","credits","pages","Math","floor","layouts","forms","aiFreeSiteSectionsWithin","taste","before","Number","POSITIVE_INFINITY","AI_SITE_MAX_SECTIONS","AI_FREE_SITE_NOMINAL_SECTIONS","aiFreeSiteCreditEstimate","count","aiFreeCreditsResetOn","now","next","Date","UTC","getUTCFullYear","getUTCMonth","toISOString","slice","aiFreeCreditsResetLabel","resetsOn","at","isFinite","getTime","toLocaleDateString","month","day","timeZone","aiFreeSiteShortfall","left","needed","aiFreeSiteShortfallText","shortfall","toLocaleString","AI_SITE_HOME_MIN_SECTIONS","AI_SITE_BLOG_NAME","AI_SITE_BLOG_SLUGS","firstSegment","slug","trim","replace","split","toLowerCase","aiSiteBlogSlug","screens","taken","Set","map","screen","filter","Boolean","find","has","AI_SITE_BLOG_NAV_ID","aiSiteBlogNavPage","id","label","href","AI_SITE_BLOG_PAGE_CODE","BLOG_PAGE_WORDS","aiSiteBlogStandInViolations","blogSlugs","standIns","flatMap","index","aiSitePlanIsHome","segment","test","title","length","names","join","rule","code","message","paths","AI_SITE_EMPTY_GALLERY_CODE","AI_SITE_GALLERY_MIN_ITEMS","AI_SITE_GALLERY_MAX_ITEMS","GALLERY_SECTION","FRAMING_SECTION","aiSiteSectionShowsWork","name","AI_SITE_GALLERY_SENTENCE","aiSiteEmptyGalleryViolations","thin","screenIndex","sectionIndex","items","path","entry","AI_SITE_THIN_HOME_CODE","AI_SITE_HOME_BANDS","aiSiteHomeMinSections","input","across","others","aiSiteFullPlanSentence","lead","homeHi","otherHi","otherLo","totalLo","range","lo","hi","pagesWord","aiSiteThinHomeViolations","options","findIndex","within","AI_SITE_NOMINAL_SECTIONS","AI_SITE_PASS_CREDITS","AI_SITE_INPUT_MAX_CHARS","AI_SITE_BATCH_MAX","AI_SITE_BATCH_MIN_HOST_LIMIT","AI_SITE_SUBMISSIONS","AI_SITE_SUBMISSION_CHOICES","blurb","AI_SITE_EMAIL_TYPE","aiSiteNameSentence","aiSiteSubmissions","inputs","value","includes","ID_CHARS","parseAiSiteJobInputs","text","key","undefined","trimmed","businessType","businessName","city","brand","audience","starter","siteKind","rawPages","NaN","isInteger","submissions","rawBatch","batchId","welcomeEmail","aiSitePagesRefusal","band","aiSiteWordsSaidAnything","words","about","aiSiteWords","read","AI_SITE_CREATE_KINDS","aiSitePlanPrerequisites","seen","prerequisites","add","kind","push","create","aiSitePlanShapeRefusal","slugs","some","nav","aiSitePlanRefusal","shape","parts","noun","where","listed","aiPlanPasses","reduce","total","creates","aiPlanCreditEstimate","aiJobPlanCreditEstimate","aiSiteCreditEstimate","passes"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,UAAU,QAAQ,qBAAiB;AAC5C,SACEC,4BAA4B,EAC5BC,oBAAoB,QAGf,qBAAiB;AACxB,SAASC,mBAAmB,QAAQ,wBAAoB;AACxD,SAASC,oBAAoB,QAAQ,mBAAe;AAEpD;;;;;;;;;;;;;;;;;;;;;;;CAuBC,GAED,+EAA+E,GAC/E,OAAO,MAAMC,gBAAgB;IAAEC,KAAK;IAAGC,KAAK;AAAE,EAAU;AAExD;;;;;;CAMC,GACD,OAAO,MAAMC,qBAAqB;IAAEF,KAAK;IAAGC,KAAK;AAAE,EAAU;AAE7D,qFAAqF,GACrF,OAAO,SAASE,gBACdC,SAAqC;IAErC,OAAOA,YAAYF,qBAAqBH;AAC1C;AAEA;;;CAGC,GACD,OAAO,MAAMM,4BAA4B,cAAa;AAEtD,qEAAqE,GACrE,OAAO,MAAMC,0BAA0B,sCAAqC;AAE5E;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B;IAAEC,MAAM;IAAOC,MAAM;AAAM,EAAU;AAkC5E;;;;;;;CAOC,GACD,OAAO,MAAMC,kCAAiE;IAC5EC,MAAM;IACNC,MAAM;IACNC,QAAQ;IACRC,MAAM;IACNC,MAA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AClC,MAAMmE,IAAI,GAAGxF,MAAM;IACpF,OAAOzB,UAAUnD,YAAamH,CAAAA,QAAQoC,YAAY,GAAG,IAAI,CAAA;AAC3D;AAEA;;;;;CAKC,GACD,OAAO,SAAS8B,qBAAqB/L,IAAiB,EAAE6H,UAA6B,CAAC,CAAC;IACrF,OAAO8D,aAAa3L,MAAM6H,WAAWI;AACvC;AAEA;;;;;;;CAOC,GACD,OAAO,SAAS+D,wBAAwBlB,IAAY,EAAE9K,IAAiB;IACrE,MAAM8L,UACJhB,SAAS,SAAS3L,uBAAuBD,mBAAmB,CAAC4L,KAAyC;IACxG,OAAOiB,qBAAqB/L,MAAM8L,UAAU;QAAEA;IAAQ,IAAI,CAAC;AAC7D;AAEA;;;;CAIC,GACD,OAAO,SAASG,qBACdpL,KAAa,EACbgH,UAAsC,CAAC,CAAC;IAExC,MAAMhE,UAAU/C,KAAKxB,GAAG,CAAC,GAAGwB,KAAKC,KAAK,CAACF;IACvC,MAAMqL,SACJ,IACArI,UAAWmE,CAAAA,2BAA2B,CAAA,IACtC,IACCH,CAAAA,QAAQoC,YAAY,GAAG,IAAI,CAAA;IAC9B,OAAOiC,SAASjE;AAClB"}
@@ -1729,8 +1729,13 @@ const ALL_HUES = [
1729
1729
  label: 'Personal & resume',
1730
1730
  blurb: 'A simple page about you and your work',
1731
1731
  icon: 'person',
1732
+ // "Personal" only as a site about the person (AGL-3660): as a bare word it
1733
+ // is the adjective in "a personal travel blog", which it beat on length.
1732
1734
  keywords: [
1733
- 'personal',
1735
+ 'personal site',
1736
+ 'personal website',
1737
+ 'personal page',
1738
+ 'about me',
1734
1739
  'resume',
1735
1740
  'cv',
1736
1741
  'me',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/model/ai-site-kinds.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The kinds of website a guided start offers (AGL-3660), and the style\n * direction each one sets.\n *\n * A kind is NOT a template. It is a direction in two halves:\n *\n * - a LOOK FAMILY the code applies — how saturated the palette is, the hues\n * that suit the kind, the page grounds, the font pairings, the corners,\n * the button style, the heading scale and the density — inside which the\n * model picks this business's own look and a per-job seed varies it\n * (`ai-site-look.ts`), so two sites of one kind never share a theme;\n * - GUIDANCE the model reads: how the kind's pages are usually arranged\n * (band rhythm, image share, density) and which pages it usually has.\n *\n * Every page a kind suggests is one the site job builds itself out of the\n * layout language: sections, cards, images, a form. On a paid plan the site\n * job also writes a blog's first posts into a content collection and a\n * store's first products as unpriced drafts (AGL-3676,\n * `jobs/ai-job-site-content.ts`), and the pages are told their titles; on\n * the Free taste it writes neither. No event records are created, and no\n * guidance here promises posts, products or events, since the plan reads it\n * on every plan (the owner adds more from the Content, Commerce and Events\n * sections afterward).\n *\n * Pure data and two small readers, safe for the console to import: no\n * theme compiler, no network.\n */\n\n/** A font pairing the look may choose: a heading family over a body family. */\nexport interface AiSiteFontPairing {\n id: string\n /** What the pairing reads like, as the model is told. */\n feel: string\n heading: { family: string; category: 'sans-serif' | 'serif'; weight: number; sub: number }\n body: { family: string; category: 'sans-serif' | 'serif'; weights: number[] }\n /** Letter spacing the headings carry, in em. */\n tracking?: number\n /** Headings set in capitals: a condensed display face. */\n caps?: boolean\n}\n\n/**\n * The pairings, every family from the Google Fonts catalog the fonts plugin\n * serves (`google-fonts.catalog.json`) and every weight one that family\n * has — `ai-site-look.spec.ts` holds both. The tenant loads them the way it\n * loads the starter theme's family, so nothing here adds a font host.\n */\nexport const AI_SITE_FONT_PAIRINGS: readonly AiSiteFontPairing[] = [\n { id: 'jakarta', feel: 'modern, friendly sans', heading: { family: 'Plus Jakarta Sans', category: 'sans-serif', weight: 800, sub: 700 }, body: { family: 'Plus Jakarta Sans', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.02 },\n { id: 'inter', feel: 'neutral, precise sans', heading: { family: 'Inter', category: 'sans-serif', weight: 700, sub: 600 }, body: { family: 'Inter', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.025 },\n { id: 'grotesk', feel: 'designer grotesk', heading: { family: 'Space Grotesk', category: 'sans-serif', weight: 600, sub: 600 }, body: { family: 'Inter', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.03 },\n { id: 'syne', feel: 'expressive, art-school display', heading: { family: 'Syne', category: 'sans-serif', weight: 700, sub: 600 }, body: { family: 'Inter', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.02 },\n { id: 'bricolage', feel: 'contemporary, characterful sans', heading: { family: 'Bricolage Grotesque', category: 'sans-serif', weight: 700, sub: 600 }, body: { family: 'DM Sans', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.025 },\n { id: 'editorial', feel: 'editorial serif over clean sans', heading: { family: 'Playfair Display', category: 'serif', weight: 700, sub: 600 }, body: { family: 'Source Sans 3', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.01 },\n { id: 'fraunces', feel: 'warm, soft serif', heading: { family: 'Fraunces', category: 'serif', weight: 600, sub: 600 }, body: { family: 'Inter', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.015 },\n { id: 'instrument', feel: 'elegant, light serif headlines', heading: { family: 'Instrument Serif', category: 'serif', weight: 400, sub: 400 }, body: { family: 'Inter', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.01 },\n { id: 'reading', feel: 'reading-first serif, serif body', heading: { family: 'Newsreader', category: 'serif', weight: 600, sub: 600 }, body: { family: 'Source Serif 4', category: 'serif', weights: [400, 600, 700] }, tracking: -0.01 },\n { id: 'garamond', feel: 'refined, classic serif', heading: { family: 'Cormorant Garamond', category: 'serif', weight: 600, sub: 600 }, body: { family: 'Montserrat', category: 'sans-serif', weights: [400, 500, 600, 700] } },\n { id: 'baskerville', feel: 'established, trustworthy serif', heading: { family: 'Libre Baskerville', category: 'serif', weight: 700, sub: 700 }, body: { family: 'Source Sans 3', category: 'sans-serif', weights: [400, 500, 600, 700] } },\n { id: 'merriweather', feel: 'sturdy, readable serif', heading: { family: 'Merriweather', category: 'serif', weight: 700, sub: 700 }, body: { family: 'Lato', category: 'sans-serif', weights: [400, 700] } },\n { id: 'lora', feel: 'gentle, calm serif', heading: { family: 'Lora', category: 'serif', weight: 600, sub: 600 }, body: { family: 'Open Sans', category: 'sans-serif', weights: [400, 500, 600, 700] } },\n { id: 'dmserif', feel: 'polished display serif', heading: { family: 'DM Serif Display', category: 'serif', weight: 400, sub: 400 }, body: { family: 'DM Sans', category: 'sans-serif', weights: [400, 500, 600, 700] } },\n { id: 'oswald', feel: 'bold, condensed, workmanlike', heading: { family: 'Oswald', category: 'sans-serif', weight: 600, sub: 500 }, body: { family: 'Roboto', category: 'sans-serif', weights: [400, 500, 700] }, caps: true, tracking: 0.01 },\n { id: 'archivo', feel: 'heavy, high-impact sans', heading: { family: 'Archivo Black', category: 'sans-serif', weight: 400, sub: 400 }, body: { family: 'Archivo', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.01 },\n { id: 'barlow', feel: 'athletic, condensed sans', heading: { family: 'Barlow Condensed', category: 'sans-serif', weight: 700, sub: 600 }, body: { family: 'Barlow', category: 'sans-serif', weights: [400, 500, 600, 700] }, caps: true, tracking: 0.01 },\n { id: 'anton', feel: 'loud poster display', heading: { family: 'Anton', category: 'sans-serif', weight: 400, sub: 400 }, body: { family: 'Inter', category: 'sans-serif', weights: [400, 500, 600, 700] }, caps: true, tracking: 0.01 },\n { id: 'nunito', feel: 'rounded, approachable sans', heading: { family: 'Nunito', category: 'sans-serif', weight: 800, sub: 700 }, body: { family: 'Nunito Sans', category: 'sans-serif', weights: [400, 600, 700] } },\n { id: 'quicksand', feel: 'soft, airy rounded sans', heading: { family: 'Quicksand', category: 'sans-serif', weight: 700, sub: 600 }, body: { family: 'Nunito Sans', category: 'sans-serif', weights: [400, 600, 700] } },\n { id: 'manrope', feel: 'crisp, confident sans', heading: { family: 'Manrope', category: 'sans-serif', weight: 800, sub: 700 }, body: { family: 'Manrope', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.02 },\n { id: 'outfit', feel: 'geometric, upbeat sans', heading: { family: 'Outfit', category: 'sans-serif', weight: 700, sub: 600 }, body: { family: 'Outfit', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.02 },\n { id: 'plex', feel: 'technical, engineered sans', heading: { family: 'IBM Plex Sans', category: 'sans-serif', weight: 600, sub: 600 }, body: { family: 'IBM Plex Sans', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.01 },\n]\n\nexport type AiSiteFontPairingId = string\n\n/**\n * The platform's built-in themes a site's look is layered on, by the short\n * name of the themes plugin's preset id (\\`theme-presets.<name>\\`), and\n * \\`starter\\`: the theme a new site is born with (AGL-3497).\n */\nexport const AI_SITE_BASES = [\n 'starter',\n 'material-ui',\n 'bootstrap',\n 'minimal',\n 'material3',\n 'ant-design',\n 'fluent',\n 'carbon',\n 'cupertino',\n] as const\nexport type AiSiteBase = (typeof AI_SITE_BASES)[number]\n\n/** How saturated a kind's palette runs. `neutral` is an ink-and-paper ground with one accent. */\nexport type AiSiteChroma = 'neutral' | 'muted' | 'balanced' | 'vivid'\n/** The page ground the light scheme sits on. */\nexport type AiSiteGround = 'white' | 'warm' | 'cool' | 'tinted'\nexport const AI_SITE_GROUNDS: readonly AiSiteGround[] = ['white', 'warm', 'cool', 'tinted']\n/** Corner rounding, cards and fields. */\nexport type AiSiteCorners = 'sharp' | 'soft' | 'round' | 'pill'\nexport const AI_SITE_CORNERS: readonly AiSiteCorners[] = ['sharp', 'soft', 'round', 'pill']\n/** How buttons are drawn: on the corner radius, as pills, square, in capitals, or with quiet buttons as underlined links. */\nexport type AiSiteButtons = 'rounded' | 'pill' | 'square' | 'caps' | 'link'\n/**\n * How a site's pages alternate their bands: calm (mostly plain, one soft),\n * alternating (plain and soft by turns), or bold (brand and dark bands for\n * its key moments).\n */\nexport type AiSiteRhythm = 'calm' | 'alternating' | 'bold'\nexport const AI_SITE_RHYTHMS: readonly AiSiteRhythm[] = ['calm', 'alternating', 'bold']\n\n/** Spacing: tighter, regular or airier than the platform's unit. */\nexport type AiSiteDensity = 'compact' | 'regular' | 'airy'\n\n/** What the code applies for a kind: the bounds a look is chosen and varied in. */\nexport interface AiSiteLookFamily {\n /** The platform's base themes that suit the kind, best first (`AI_SITE_BASES`). */\n bases: readonly AiSiteBase[]\n chroma: AiSiteChroma\n /** How the header is arranged: the brand at the start with the links after it, or both centered. */\n headerAligns?: readonly ('start' | 'center')[]\n /** The band rhythm its pages lean to (`AI_SITE_RHYTHMS`). */\n rhythms?: readonly AiSiteRhythm[]\n /** Hue ranges in degrees that suit the kind, `[from, to]`, wrapping past 360. */\n hues: ReadonlyArray<readonly [number, number]>\n grounds: readonly AiSiteGround[]\n fonts: readonly AiSiteFontPairingId[]\n corners: readonly AiSiteCorners[]\n buttons: AiSiteButtons\n /** Display and heading sizes against the platform's, 1 = as shipped. */\n headingScale: number\n density: AiSiteDensity\n}\n\nexport interface AiSiteKind {\n /** A persisted identifier: the guided start's answer and the job's `siteKind` input. */\n id: string\n /** The card's title, in customer copy. */\n label: string\n /** One line under it. */\n blurb: string\n /** A word from the icon set the card shows. */\n icon: string\n /** Words in \"what kind of site\" that suggest this kind, matched whole. */\n keywords: readonly string[]\n /** The starter whose shape this kind follows, where one fits (`STARTER_TEMPLATES`). */\n starter: string\n look: AiSiteLookFamily\n /** How its pages are arranged, as every page and the header and footer are told. */\n design: string\n /** The pages it usually has, as the plan is told. */\n pages: string\n}\n\nconst ALL_HUES: ReadonlyArray<readonly [number, number]> = [[0, 360]]\n\n/**\n * The kinds, in the order the guided start shows them. Drawn from the template\n * categories the large site builders offer, merged where two would build the\n * same site: designer and agency are one studio, law and accounting one\n * practice, health and therapy one wellness kind.\n */\nexport const AI_SITE_KINDS: readonly AiSiteKind[] = [\n {\n id: 'business',\n label: 'Business & services',\n blurb: 'Say what you do, why choose you, and how to reach you',\n icon: 'briefcase',\n keywords: ['cleaning', 'cleaner', 'janitorial', 'pet', 'groomer', 'grooming', 'dog', 'staffing', 'printing', 'courier'],\n starter: 'business',\n look: { bases: ['starter', 'material3', 'fluent', 'minimal', 'ant-design'], chroma: 'balanced', hues: ALL_HUES, grounds: ['white', 'cool', 'warm', 'tinted'], fonts: ['jakarta', 'manrope', 'outfit', 'inter', 'bricolage', 'fraunces'], corners: ['soft', 'round'], buttons: 'rounded', headingScale: 1, density: 'regular' },\n design: 'Lead with what the business does and for whom, then services as cards, the reasons to choose it, how it works as steps, and a clear call to get in touch. Mix plain and soft bands with one brand band.',\n pages: 'Home, Services, About and Contact are typical; a pricing or booking page where the brief asks for one.',\n },\n {\n id: 'trades',\n label: 'Home services & trades',\n blurb: 'Roofers, plumbers, towing, landscaping: bold, direct, built on trust',\n icon: 'wrench',\n keywords: ['roofer', 'roofing', 'plumber', 'plumbing', 'electrician', 'hvac', 'towing', 'tow', 'landscaping', 'landscaper', 'contractor', 'construction', 'handyman', 'painter', 'painting', 'mover', 'moving', 'pest', 'remodeling', 'repair', 'mechanic', 'auto', 'trades', 'trade', 'garage', 'locksmith', 'flooring', 'fencing', 'pool'],\n starter: 'business',\n look: { bases: ['bootstrap', 'carbon', 'material-ui', 'fluent', 'starter'], chroma: 'vivid', hues: [[4, 18], [20, 38], [42, 56], [128, 158], [195, 212], [214, 240]], grounds: ['white', 'cool'], fonts: ['oswald', 'archivo', 'barlow', 'manrope'], corners: ['sharp', 'soft'], buttons: 'square', headingScale: 1.05, density: 'compact' },\n design: 'Direct and high-contrast: a big promise and a call-to-action button in the first section, the services as a tight grid of cards, why customers can trust the business (licensed, insured, years, guarantees, but only what the brief gives), the area served, and a call or quote request repeated near the end. Use a dark band and a brand band.',\n pages: 'Home, Services, About or Why us, and a Quote or Contact page with the form.',\n },\n {\n id: 'professional',\n label: 'Law, finance & consulting',\n blurb: 'Law firms, accountants, advisers: calm, established, credible',\n icon: 'scale',\n keywords: ['law', 'lawyer', 'attorney', 'legal', 'firm', 'accountant', 'accounting', 'cpa', 'tax', 'bookkeeping', 'financial', 'advisor', 'adviser', 'consulting', 'insurance', 'notary', 'mediator'],\n starter: 'business',\n look: { bases: ['carbon', 'fluent', 'minimal', 'starter'], chroma: 'muted', hues: [[210, 250], [340, 360], [0, 15], [150, 175]], grounds: ['white', 'warm', 'cool'], fonts: ['baskerville', 'merriweather', 'editorial', 'plex', 'lora'], corners: ['sharp', 'soft'], buttons: 'rounded', headingScale: 0.95, density: 'airy' },\n design: 'Measured and credible: generous space, a calm opening statement, practice areas as cards with short plain explanations, the approach as steps, and an unhurried invitation to a consultation. Prefer plain and soft bands, at most one dark band.',\n pages: 'Home, Practice areas or Services, About or Our team, and Contact with a consultation form.',\n },\n {\n id: 'wellness',\n label: 'Health & wellness',\n blurb: 'Therapists, clinics, dentists, coaches: warm, reassuring, clear',\n icon: 'heart',\n keywords: ['therapist', 'therapy', 'counselor', 'counseling', 'counselling', 'psychologist', 'dentist', 'dental', 'clinic', 'doctor', 'chiropractor', 'massage', 'wellness', 'health', 'nutrition', 'nutritionist', 'acupuncture', 'physio', 'physiotherapy', 'coach', 'coaching', 'healing', 'mental', 'medical', 'vet', 'veterinary'],\n starter: 'business',\n look: { bases: ['material3', 'cupertino', 'starter', 'fluent'], chroma: 'muted', hues: [[150, 200], [250, 290], [20, 40], [90, 130]], grounds: ['warm', 'tinted', 'white'], fonts: ['lora', 'fraunces', 'quicksand', 'dmserif', 'nunito'], corners: ['round', 'pill'], buttons: 'pill', headingScale: 1, density: 'airy' },\n design: 'Reassuring and gentle: a warm opening that names who it helps, what a first visit or session is like as steps, services as soft cards, answers to common worries as an FAQ, and a low-pressure way to book or ask. Prefer soft bands, avoid dark ones.',\n pages: 'Home, Services or Approach, About, and Book or Contact with the form.',\n },\n {\n id: 'restaurant',\n label: 'Restaurant & café',\n blurb: 'Warm, photo-led pages for food, drink and a place to visit',\n icon: 'utensils',\n keywords: ['restaurant', 'cafe', 'café', 'coffee', 'bakery', 'bar', 'pub', 'bistro', 'diner', 'pizzeria', 'pizza', 'food', 'catering', 'brewery', 'winery', 'kitchen', 'truck', 'tea', 'deli'],\n starter: 'business',\n look: { bases: ['material3', 'starter', 'cupertino'], chroma: 'balanced', hues: [[0, 45], [80, 150], [330, 360]], grounds: ['warm', 'tinted'], fonts: ['fraunces', 'editorial', 'dmserif', 'garamond', 'bricolage'], corners: ['soft', 'round'], buttons: 'rounded', headingScale: 1.1, density: 'regular' },\n design: 'Photo-led and inviting: a large image beside the opening line, the menu highlights as cards with pictures, the story of the place, and a clear visit or reserve section. Use images generously and a warm brand band.',\n pages: 'Home, Menu, About or Our story, and Visit or Reserve with the form.',\n },\n {\n id: 'store',\n label: 'Online store',\n blurb: 'Product-first pages for things you sell',\n icon: 'bag',\n keywords: ['store', 'shop', 'boutique', 'ecommerce', 'e-commerce', 'products', 'sell', 'selling', 'merch', 'jewelry', 'clothing', 'apparel', 'candles', 'soap', 'brand'],\n starter: 'physical-shop',\n look: { bases: ['minimal', 'cupertino', 'material3'], chroma: 'balanced', hues: ALL_HUES, grounds: ['white', 'warm'], fonts: ['inter', 'outfit', 'manrope', 'dmserif', 'syne'], corners: ['soft', 'sharp', 'round'], buttons: 'pill', headingScale: 1, density: 'regular' },\n design: 'Product-grid first: a short opening with one strong image, then the product range as a grid of image cards, what makes the products different, and care, shipping or returns answers only as the brief gives them. Keep copy short and let images lead.',\n pages: 'Home, Shop presenting the range as image cards, About, and Contact. Products, a cart and checkout are added in Commerce, so plan no checkout page.',\n },\n {\n id: 'portfolio',\n label: 'Portfolio',\n blurb: 'Minimal, image-led pages that put the work first',\n icon: 'grid',\n keywords: ['portfolio', 'illustrator', 'artist', 'art', 'architect', 'architecture', 'developer', 'engineer', 'writer', 'copywriter', 'animator', 'freelance', 'freelancer', 'maker', 'ceramics', 'sculptor'],\n starter: 'portfolio',\n look: { bases: ['minimal', 'cupertino', 'carbon'], chroma: 'neutral', hues: ALL_HUES, grounds: ['white', 'warm'], fonts: ['inter', 'grotesk', 'syne', 'instrument'], corners: ['sharp', 'soft'], buttons: 'square', headingScale: 1.3, density: 'airy' },\n design: 'Minimal and image-led: a large, short statement as the title, then the work as a grid of image cards with one-line captions, a brief about, and a quiet way to get in touch. Mostly plain bands, lots of space, big type, one accent color.',\n pages: 'Home with selected work, Work or Projects, About, and Contact.',\n },\n {\n id: 'studio',\n label: 'Design studio & agency',\n blurb: 'Bold type and case studies for creative teams',\n icon: 'sparkle',\n keywords: ['design', 'designer', 'agency', 'creative', 'branding', 'marketing', 'advertising', 'web', 'digital', 'production', 'video', 'animation'],\n starter: 'portfolio',\n look: { bases: ['minimal', 'carbon', 'cupertino'], chroma: 'neutral', hues: ALL_HUES, grounds: ['white', 'cool'], fonts: ['syne', 'grotesk', 'bricolage', 'inter'], corners: ['sharp', 'soft'], buttons: 'pill', headingScale: 1.3, density: 'airy' },\n design: 'Confident and editorial: an oversized statement, selected case studies as large image cards with the outcome in a line, services as a short list, how the studio works as steps, and a bold dark band to start a project.',\n pages: 'Home, Work or Case studies, Services, About, and Contact or Start a project.',\n },\n {\n id: 'photography',\n label: 'Photography',\n blurb: 'Galleries first, words second',\n icon: 'camera',\n keywords: ['photographer', 'photography', 'photo', 'photos', 'videographer', 'wedding photographer', 'portraits'],\n starter: 'portfolio',\n look: { bases: ['minimal', 'cupertino', 'carbon'], chroma: 'neutral', hues: ALL_HUES, grounds: ['white', 'warm'], fonts: ['instrument', 'garamond', 'inter', 'grotesk'], corners: ['sharp'], buttons: 'square', headingScale: 1.2, density: 'airy' },\n design: 'Gallery-first: one full image to open, then galleries as image cards by subject, a short personal about, packages only as the brief gives them, and a booking inquiry. Few words, many images, mostly plain bands and one dark band.',\n pages: 'Home, Galleries or Portfolio, About, and Book or Contact with the form.',\n },\n {\n id: 'blog',\n label: 'Blog & writing',\n blurb: 'Reading-first pages with a calm serif voice',\n icon: 'book',\n keywords: ['blog', 'blogger', 'writing', 'journal', 'magazine', 'newsletter', 'podcast', 'stories', 'essays', 'author', 'publication'],\n starter: 'business',\n look: { bases: ['minimal', 'starter', 'cupertino'], chroma: 'muted', hues: ALL_HUES, grounds: ['white', 'warm'], fonts: ['reading', 'editorial', 'instrument', 'lora'], corners: ['sharp', 'soft'], buttons: 'rounded', headingScale: 1.05, density: 'airy' },\n design: 'Reading-first: a short introduction to the writer and the subject, featured writing as cards with a title and a one-line summary, the topics covered as a list, and a sign-up or contact section. Narrow, calm, mostly plain bands.',\n pages: 'Home, Articles presenting the writing as cards, About, and Subscribe or Contact. Posts themselves are added in Data as a collection, so plan the articles page as an introduction and a few featured cards.',\n },\n {\n id: 'events',\n label: 'Events & weddings',\n blurb: 'Dates, places and the details guests need',\n icon: 'calendar',\n keywords: ['event', 'events', 'wedding', 'conference', 'festival', 'party', 'gala', 'meetup', 'summit', 'concert', 'retreat', 'workshop', 'venue', 'planner'],\n starter: 'landing',\n look: { bases: ['material3', 'cupertino', 'starter'], chroma: 'balanced', hues: [[320, 360], [0, 30], [250, 290], [140, 170], [40, 55]], grounds: ['warm', 'tinted', 'white'], fonts: ['garamond', 'editorial', 'dmserif', 'anton', 'syne'], corners: ['soft', 'round'], buttons: 'pill', headingScale: 1.2, density: 'regular' },\n design: 'Celebratory and clear: the name and what it is in a big opening, when and where only as the brief gives them, the schedule as steps, details guests ask about as an FAQ, and an RSVP or registration section. One brand band.',\n pages: 'Home, Schedule or Details, Travel or Venue where the brief names one, and RSVP or Register with the form.',\n },\n {\n id: 'fitness',\n label: 'Fitness & sports',\n blurb: 'Gyms, trainers and studios with energy',\n icon: 'bolt',\n keywords: ['gym', 'fitness', 'trainer', 'training', 'personal trainer', 'crossfit', 'boxing', 'martial', 'karate', 'pilates', 'sports', 'running', 'climbing', 'dance', 'swim', 'team', 'club'],\n starter: 'business',\n look: { bases: ['bootstrap', 'material-ui', 'carbon', 'material3'], chroma: 'vivid', hues: [[0, 30], [90, 140], [180, 210], [270, 300]], grounds: ['white', 'cool'], fonts: ['barlow', 'anton', 'archivo', 'outfit'], corners: ['sharp', 'soft'], buttons: 'caps', headingScale: 1.15, density: 'compact' },\n design: 'High-energy: a punchy opening with a strong call to action, classes or programs as cards, how to start as steps, and a repeated join or book section. Use a dark band and a brand band.',\n pages: 'Home, Classes or Programs, About or Coaches, and Join or Contact with the form.',\n },\n {\n id: 'yoga',\n label: 'Yoga & mindfulness',\n blurb: 'Calm, spacious pages for classes and retreats',\n icon: 'leaf',\n keywords: ['yoga', 'meditation', 'mindfulness', 'breathwork', 'reiki', 'spa', 'retreat', 'sound'],\n starter: 'business',\n look: { bases: ['material3', 'cupertino', 'starter', 'fluent'], chroma: 'muted', hues: [[20, 50], [80, 150], [260, 300], [170, 200]], grounds: ['warm', 'tinted'], fonts: ['garamond', 'lora', 'quicksand', 'instrument', 'fraunces'], corners: ['round', 'pill'], buttons: 'pill', headingScale: 1.05, density: 'airy' },\n design: 'Calm and spacious: a quiet opening, classes as soft cards, what a first class is like as steps, a gentle about, and an easy way to book. Soft bands, no dark band, lots of space.',\n pages: 'Home, Classes or Schedule, About, and Book or Contact with the form.',\n },\n {\n id: 'beauty',\n label: 'Beauty & salon',\n blurb: 'Salons, barbers, spas and studios with style',\n icon: 'scissors',\n keywords: ['salon', 'hair', 'hairdresser', 'barber', 'barbershop', 'nails', 'nail', 'beauty', 'makeup', 'lashes', 'brows', 'esthetician', 'skincare', 'tattoo', 'stylist'],\n starter: 'business',\n look: { bases: ['material3', 'cupertino', 'minimal'], chroma: 'balanced', hues: [[320, 360], [0, 25], [270, 300], [20, 45]], grounds: ['warm', 'tinted', 'white'], fonts: ['garamond', 'dmserif', 'instrument', 'outfit', 'syne'], corners: ['round', 'pill', 'sharp'], buttons: 'pill', headingScale: 1.1, density: 'regular' },\n design: 'Stylish and image-led: a striking opening image, services as cards, the look and feel of the place in images, and booking made obvious. One brand band.',\n pages: 'Home, Services, About or The team, and Book or Contact with the form.',\n },\n {\n id: 'realestate',\n label: 'Real estate',\n blurb: 'Agents, brokers and property: polished and local',\n icon: 'home',\n keywords: ['real estate', 'realtor', 'realty', 'broker', 'property', 'properties', 'homes', 'rentals', 'rental', 'apartment', 'apartments', 'mortgage', 'airbnb', 'vacation'],\n starter: 'business',\n look: { bases: ['fluent', 'minimal', 'carbon'], chroma: 'muted', hues: [[200, 240], [150, 180], [20, 45], [0, 360]], grounds: ['white', 'warm', 'cool'], fonts: ['dmserif', 'manrope', 'editorial', 'outfit'], corners: ['soft', 'sharp'], buttons: 'rounded', headingScale: 1.05, density: 'regular' },\n design: 'Polished and local: an image-led opening, the areas served, how buying or selling works as steps, featured listings only as image cards the owner fills in, and a valuation or contact request. One dark band.',\n pages: 'Home, Buy or Listings, Sell, About, and Contact with the form.',\n },\n {\n id: 'education',\n label: 'Courses & education',\n blurb: 'Tutors, schools and courses, clear and encouraging',\n icon: 'school',\n keywords: ['course', 'courses', 'school', 'tutoring', 'tutor', 'teacher', 'lessons', 'academy', 'education', 'learning', 'training', 'daycare', 'preschool', 'music lessons', 'driving'],\n starter: 'business',\n look: { bases: ['material3', 'ant-design', 'material-ui'], chroma: 'balanced', hues: [[200, 240], [140, 170], [30, 50], [260, 290]], grounds: ['white', 'tinted', 'cool'], fonts: ['nunito', 'outfit', 'jakarta', 'lora', 'manrope'], corners: ['round', 'soft'], buttons: 'rounded', headingScale: 1, density: 'regular' },\n design: 'Clear and encouraging: who it is for and the result they get, courses or subjects as cards, how it works as steps, common questions as an FAQ, and a sign-up or inquiry section.',\n pages: 'Home, Courses or Lessons, About or Teachers, and Enroll or Contact with the form.',\n },\n {\n id: 'nonprofit',\n label: 'Nonprofit & community',\n blurb: 'A cause, its impact and how to help',\n icon: 'hands',\n keywords: ['nonprofit', 'non-profit', 'charity', 'foundation', 'church', 'community', 'volunteer', 'volunteers', 'association', 'ngo', 'mission', 'ministry', 'rescue', 'shelter', 'cause'],\n starter: 'business',\n look: { bases: ['material3', 'fluent', 'starter'], chroma: 'balanced', hues: [[130, 200], [20, 45], [200, 230], [340, 360]], grounds: ['white', 'warm'], fonts: ['merriweather', 'lora', 'jakarta', 'fraunces', 'nunito'], corners: ['soft', 'round'], buttons: 'rounded', headingScale: 1.05, density: 'regular' },\n design: 'Mission-led: the cause in one line, what the organization does as cards, how to help as steps (volunteer, give, spread the word), and a clear way to get involved. A brand band for the call to help.',\n pages: 'Home, Our work or Programs, About, and Get involved or Contact with the form.',\n },\n {\n id: 'music',\n label: 'Music & bands',\n blurb: 'Artists, bands and DJs, loud and visual',\n icon: 'music',\n keywords: ['band', 'musician', 'music', 'dj', 'singer', 'rapper', 'producer', 'orchestra', 'choir', 'composer', 'artist music'],\n starter: 'landing',\n look: { bases: ['carbon', 'minimal', 'material-ui'], chroma: 'vivid', hues: ALL_HUES, grounds: ['white', 'cool', 'tinted'], fonts: ['anton', 'syne', 'grotesk', 'archivo'], corners: ['sharp'], buttons: 'caps', headingScale: 1.3, density: 'regular' },\n design: 'Loud and visual: the name huge in the opening, an image band, releases or shows as image cards only as the brief gives them, a short bio, and a booking or contact section. Dark bands are welcome.',\n pages: 'Home, Music or Shows, About, and Booking or Contact with the form.',\n },\n {\n id: 'personal',\n label: 'Personal & resume',\n blurb: 'A simple page about you and your work',\n icon: 'person',\n keywords: ['personal', 'resume', 'cv', 'me', 'myself', 'profile', 'job', 'candidate', 'speaker'],\n starter: 'portfolio',\n look: { bases: ['minimal', 'cupertino', 'starter', 'fluent'], chroma: 'muted', hues: ALL_HUES, grounds: ['white', 'warm', 'cool'], fonts: ['inter', 'instrument', 'manrope', 'lora', 'grotesk'], corners: ['soft', 'round'], buttons: 'rounded', headingScale: 1.1, density: 'airy' },\n design: 'Simple and personal: who the person is in one line, what they do, experience or highlights as a list or steps, selected work as cards where the brief names some, and a way to get in touch. Mostly plain bands.',\n pages: 'Home, About or Experience, Work where the brief names some, and Contact.',\n },\n {\n id: 'landing',\n label: 'Landing page',\n blurb: 'One page that leads to one action',\n icon: 'rocket',\n keywords: ['landing', 'launch', 'app', 'startup', 'saas', 'software', 'product', 'waitlist', 'campaign', 'offer', 'ebook', 'webinar'],\n starter: 'landing',\n look: { bases: ['material3', 'minimal', 'ant-design'], chroma: 'vivid', hues: ALL_HUES, grounds: ['white', 'cool', 'tinted'], fonts: ['outfit', 'jakarta', 'manrope', 'bricolage', 'inter'], corners: ['round', 'soft'], buttons: 'pill', headingScale: 1.15, density: 'regular' },\n design: 'One action: a strong promise and the call to action first, the benefits as cards, how it works as steps, answers to objections as an FAQ, and the call to action again. A brand band to close.',\n pages: 'One long home page carries the story; a second page only for the form or details the brief asks for.',\n },\n {\n id: 'coming-soon',\n label: 'Coming soon',\n blurb: 'A placeholder that collects interest',\n icon: 'clock',\n keywords: ['coming soon', 'soon', 'prelaunch', 'pre-launch', 'under construction', 'placeholder'],\n starter: 'landing',\n look: { bases: ['minimal', 'material3', 'cupertino'], chroma: 'vivid', hues: ALL_HUES, grounds: ['white', 'tinted', 'cool'], fonts: ['syne', 'anton', 'outfit', 'instrument'], corners: ['round', 'pill'], buttons: 'pill', headingScale: 1.3, density: 'airy' },\n design: 'Short and striking: what is coming in one big line, two or three reasons to care, and a way to hear first through the form. Few sections, big type.',\n pages: 'A home page that says what is coming and invites people to sign up; nothing else unless the brief asks.',\n },\n]\n\n/** A kind by id, or `null`. */\nexport function aiSiteKind(id: unknown): AiSiteKind | null {\n if (typeof id !== 'string' || !id) return null\n return AI_SITE_KINDS.find((kind) => kind.id === id) ?? null\n}\n\n/** A pairing by id, or `null`. */\nexport function aiSiteFontPairing(id: unknown): AiSiteFontPairing | null {\n if (typeof id !== 'string' || !id) return null\n return AI_SITE_FONT_PAIRINGS.find((pairing) => pairing.id === id) ?? null\n}\n\nconst words = (text: string) => ` ${text.toLowerCase().replace(/[^a-z0-9é&'-]+/g, ' ')} `\n\n/**\n * The kind a \"what kind of site\" answer suggests, or `business` when nothing\n * in it matches: the card the guided start selects until the person picks\n * another. A longer keyword wins over a shorter one (\"wedding photographer\"\n * is photography, not events), and of two as long the later one wins, since\n * English puts the noun last (\"a food blog\" is a blog).\n */\nexport function aiSiteKindFor(siteType: string): AiSiteKind {\n const text = words(siteType)\n let best: { kind: AiSiteKind; length: number; at: number } | null = null\n for (const kind of AI_SITE_KINDS) {\n for (const keyword of kind.keywords) {\n const at = text.lastIndexOf(words(keyword))\n if (at === -1) continue\n if (!best || keyword.length > best.length || (keyword.length === best.length && at > best.at)) {\n best = { kind, length: keyword.length, at }\n }\n }\n }\n return best?.kind ?? (AI_SITE_KINDS[0] as AiSiteKind)\n}\n\n/** The kind a job's inputs name, else the one its business type suggests; `null` for a job that names neither. */\nexport function aiSiteKindOfInputs(inputs: Readonly<Record<string, unknown>> | null | undefined): AiSiteKind | null {\n const named = aiSiteKind(inputs?.['siteKind'])\n if (named) return named\n const type = inputs?.['businessType']\n return typeof type === 'string' && type.trim() ? aiSiteKindFor(type) : null\n}\n\n/** What each band rhythm asks of a page's sections. */\nconst RHYTHM_WORDS: Record<AiSiteRhythm, string> = {\n calm: 'mostly plain bands with one soft band, and a brand or dark band only for the closing call to action',\n alternating: 'plain and soft bands by turns, with one brand band',\n bold: 'a dark or brand band to open or close, and strong contrast between neighboring sections',\n}\n\n/** The site's own look tokens a unit is handed (AGL-3660), read defensively. */\nexport function aiSiteStyleTokens(\n inputs: Readonly<Record<string, unknown>> | null | undefined,\n): { headerAlign?: 'start' | 'center'; rhythm?: AiSiteRhythm } {\n const raw = inputs?.['siteStyle']\n if (!raw || typeof raw !== 'object') return {}\n const style = raw as Record<string, unknown>\n return {\n ...(style['headerAlign'] === 'start' || style['headerAlign'] === 'center' ? { headerAlign: style['headerAlign'] } : {}),\n ...(AI_SITE_RHYTHMS.includes(style['rhythm'] as AiSiteRhythm) ? { rhythm: style['rhythm'] as AiSiteRhythm } : {}),\n }\n}\n\n/** The style lines a page, the header and the footer are told for the job's kind and look; empty for none. */\nexport function aiSiteKindDesignLines(inputs: Readonly<Record<string, unknown>> | null | undefined): string[] {\n const kind = aiSiteKindOfInputs(inputs)\n const { rhythm } = aiSiteStyleTokens(inputs)\n return [\n ...(kind ? [`Style: a ${kind.label.toLowerCase()} site. ${kind.design}`] : []),\n ...(rhythm ? [`Band rhythm for this site: ${RHYTHM_WORDS[rhythm]}.`] : []),\n ]\n}\n"],"names":["AI_SITE_FONT_PAIRINGS","id","feel","heading","family","category","weight","sub","body","weights","tracking","caps","AI_SITE_BASES","AI_SITE_GROUNDS","AI_SITE_CORNERS","AI_SITE_RHYTHMS","ALL_HUES","AI_SITE_KINDS","label","blurb","icon","keywords","starter","look","bases","chroma","hues","grounds","fonts","corners","buttons","headingScale","density","design","pages","aiSiteKind","find","kind","aiSiteFontPairing","pairing","words","text","toLowerCase","replace","aiSiteKindFor","siteType","best","keyword","at","lastIndexOf","length","aiSiteKindOfInputs","inputs","named","type","trim","RHYTHM_WORDS","calm","alternating","bold","aiSiteStyleTokens","raw","style","headerAlign","includes","rhythm","aiSiteKindDesignLines"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BC,GAED,6EAA6E;AAa7E;;;;;CAKC,GACD,OAAO,MAAMA,wBAAsD;IACjE;QAAEC,IAAI;QAAWC,MAAM;QAAyBC,SAAS;YAAEC,QAAQ;YAAqBC,UAAU;YAAcC,QAAQ;YAAKC,KAAK;QAAI;QAAGC,MAAM;YAAEJ,QAAQ;YAAqBC,UAAU;YAAcI,SAAS;gBAAC;gBAAK;gBAAK;gBAAK;aAAI;QAAC;QAAGC,UAAU,CAAC;IAAK;IACvP;QAAET,IAAI;QAASC,MAAM;QAAyBC,SAAS;YAAEC,QAAQ;YAASC,UAAU;YAAcC,QAAQ;YAAKC,KAAK;QAAI;QAAGC,MAAM;Y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AACH"}
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/model/ai-site-kinds.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The kinds of website a guided start offers (AGL-3660), and the style\n * direction each one sets.\n *\n * A kind is NOT a template. It is a direction in two halves:\n *\n * - a LOOK FAMILY the code applies — how saturated the palette is, the hues\n * that suit the kind, the page grounds, the font pairings, the corners,\n * the button style, the heading scale and the density — inside which the\n * model picks this business's own look and a per-job seed varies it\n * (`ai-site-look.ts`), so two sites of one kind never share a theme;\n * - GUIDANCE the model reads: how the kind's pages are usually arranged\n * (band rhythm, image share, density) and which pages it usually has.\n *\n * Every page a kind suggests is one the site job builds itself out of the\n * layout language: sections, cards, images, a form. On a paid plan the site\n * job also writes a blog's first posts into a content collection and a\n * store's first products as unpriced drafts (AGL-3676,\n * `jobs/ai-job-site-content.ts`), and the pages are told their titles; on\n * the Free taste it writes neither. No event records are created, and no\n * guidance here promises posts, products or events, since the plan reads it\n * on every plan (the owner adds more from the Content, Commerce and Events\n * sections afterward).\n *\n * Pure data and two small readers, safe for the console to import: no\n * theme compiler, no network.\n */\n\n/** A font pairing the look may choose: a heading family over a body family. */\nexport interface AiSiteFontPairing {\n id: string\n /** What the pairing reads like, as the model is told. */\n feel: string\n heading: { family: string; category: 'sans-serif' | 'serif'; weight: number; sub: number }\n body: { family: string; category: 'sans-serif' | 'serif'; weights: number[] }\n /** Letter spacing the headings carry, in em. */\n tracking?: number\n /** Headings set in capitals: a condensed display face. */\n caps?: boolean\n}\n\n/**\n * The pairings, every family from the Google Fonts catalog the fonts plugin\n * serves (`google-fonts.catalog.json`) and every weight one that family\n * has — `ai-site-look.spec.ts` holds both. The tenant loads them the way it\n * loads the starter theme's family, so nothing here adds a font host.\n */\nexport const AI_SITE_FONT_PAIRINGS: readonly AiSiteFontPairing[] = [\n { id: 'jakarta', feel: 'modern, friendly sans', heading: { family: 'Plus Jakarta Sans', category: 'sans-serif', weight: 800, sub: 700 }, body: { family: 'Plus Jakarta Sans', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.02 },\n { id: 'inter', feel: 'neutral, precise sans', heading: { family: 'Inter', category: 'sans-serif', weight: 700, sub: 600 }, body: { family: 'Inter', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.025 },\n { id: 'grotesk', feel: 'designer grotesk', heading: { family: 'Space Grotesk', category: 'sans-serif', weight: 600, sub: 600 }, body: { family: 'Inter', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.03 },\n { id: 'syne', feel: 'expressive, art-school display', heading: { family: 'Syne', category: 'sans-serif', weight: 700, sub: 600 }, body: { family: 'Inter', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.02 },\n { id: 'bricolage', feel: 'contemporary, characterful sans', heading: { family: 'Bricolage Grotesque', category: 'sans-serif', weight: 700, sub: 600 }, body: { family: 'DM Sans', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.025 },\n { id: 'editorial', feel: 'editorial serif over clean sans', heading: { family: 'Playfair Display', category: 'serif', weight: 700, sub: 600 }, body: { family: 'Source Sans 3', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.01 },\n { id: 'fraunces', feel: 'warm, soft serif', heading: { family: 'Fraunces', category: 'serif', weight: 600, sub: 600 }, body: { family: 'Inter', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.015 },\n { id: 'instrument', feel: 'elegant, light serif headlines', heading: { family: 'Instrument Serif', category: 'serif', weight: 400, sub: 400 }, body: { family: 'Inter', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.01 },\n { id: 'reading', feel: 'reading-first serif, serif body', heading: { family: 'Newsreader', category: 'serif', weight: 600, sub: 600 }, body: { family: 'Source Serif 4', category: 'serif', weights: [400, 600, 700] }, tracking: -0.01 },\n { id: 'garamond', feel: 'refined, classic serif', heading: { family: 'Cormorant Garamond', category: 'serif', weight: 600, sub: 600 }, body: { family: 'Montserrat', category: 'sans-serif', weights: [400, 500, 600, 700] } },\n { id: 'baskerville', feel: 'established, trustworthy serif', heading: { family: 'Libre Baskerville', category: 'serif', weight: 700, sub: 700 }, body: { family: 'Source Sans 3', category: 'sans-serif', weights: [400, 500, 600, 700] } },\n { id: 'merriweather', feel: 'sturdy, readable serif', heading: { family: 'Merriweather', category: 'serif', weight: 700, sub: 700 }, body: { family: 'Lato', category: 'sans-serif', weights: [400, 700] } },\n { id: 'lora', feel: 'gentle, calm serif', heading: { family: 'Lora', category: 'serif', weight: 600, sub: 600 }, body: { family: 'Open Sans', category: 'sans-serif', weights: [400, 500, 600, 700] } },\n { id: 'dmserif', feel: 'polished display serif', heading: { family: 'DM Serif Display', category: 'serif', weight: 400, sub: 400 }, body: { family: 'DM Sans', category: 'sans-serif', weights: [400, 500, 600, 700] } },\n { id: 'oswald', feel: 'bold, condensed, workmanlike', heading: { family: 'Oswald', category: 'sans-serif', weight: 600, sub: 500 }, body: { family: 'Roboto', category: 'sans-serif', weights: [400, 500, 700] }, caps: true, tracking: 0.01 },\n { id: 'archivo', feel: 'heavy, high-impact sans', heading: { family: 'Archivo Black', category: 'sans-serif', weight: 400, sub: 400 }, body: { family: 'Archivo', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.01 },\n { id: 'barlow', feel: 'athletic, condensed sans', heading: { family: 'Barlow Condensed', category: 'sans-serif', weight: 700, sub: 600 }, body: { family: 'Barlow', category: 'sans-serif', weights: [400, 500, 600, 700] }, caps: true, tracking: 0.01 },\n { id: 'anton', feel: 'loud poster display', heading: { family: 'Anton', category: 'sans-serif', weight: 400, sub: 400 }, body: { family: 'Inter', category: 'sans-serif', weights: [400, 500, 600, 700] }, caps: true, tracking: 0.01 },\n { id: 'nunito', feel: 'rounded, approachable sans', heading: { family: 'Nunito', category: 'sans-serif', weight: 800, sub: 700 }, body: { family: 'Nunito Sans', category: 'sans-serif', weights: [400, 600, 700] } },\n { id: 'quicksand', feel: 'soft, airy rounded sans', heading: { family: 'Quicksand', category: 'sans-serif', weight: 700, sub: 600 }, body: { family: 'Nunito Sans', category: 'sans-serif', weights: [400, 600, 700] } },\n { id: 'manrope', feel: 'crisp, confident sans', heading: { family: 'Manrope', category: 'sans-serif', weight: 800, sub: 700 }, body: { family: 'Manrope', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.02 },\n { id: 'outfit', feel: 'geometric, upbeat sans', heading: { family: 'Outfit', category: 'sans-serif', weight: 700, sub: 600 }, body: { family: 'Outfit', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.02 },\n { id: 'plex', feel: 'technical, engineered sans', heading: { family: 'IBM Plex Sans', category: 'sans-serif', weight: 600, sub: 600 }, body: { family: 'IBM Plex Sans', category: 'sans-serif', weights: [400, 500, 600, 700] }, tracking: -0.01 },\n]\n\nexport type AiSiteFontPairingId = string\n\n/**\n * The platform's built-in themes a site's look is layered on, by the short\n * name of the themes plugin's preset id (\\`theme-presets.<name>\\`), and\n * \\`starter\\`: the theme a new site is born with (AGL-3497).\n */\nexport const AI_SITE_BASES = [\n 'starter',\n 'material-ui',\n 'bootstrap',\n 'minimal',\n 'material3',\n 'ant-design',\n 'fluent',\n 'carbon',\n 'cupertino',\n] as const\nexport type AiSiteBase = (typeof AI_SITE_BASES)[number]\n\n/** How saturated a kind's palette runs. `neutral` is an ink-and-paper ground with one accent. */\nexport type AiSiteChroma = 'neutral' | 'muted' | 'balanced' | 'vivid'\n/** The page ground the light scheme sits on. */\nexport type AiSiteGround = 'white' | 'warm' | 'cool' | 'tinted'\nexport const AI_SITE_GROUNDS: readonly AiSiteGround[] = ['white', 'warm', 'cool', 'tinted']\n/** Corner rounding, cards and fields. */\nexport type AiSiteCorners = 'sharp' | 'soft' | 'round' | 'pill'\nexport const AI_SITE_CORNERS: readonly AiSiteCorners[] = ['sharp', 'soft', 'round', 'pill']\n/** How buttons are drawn: on the corner radius, as pills, square, in capitals, or with quiet buttons as underlined links. */\nexport type AiSiteButtons = 'rounded' | 'pill' | 'square' | 'caps' | 'link'\n/**\n * How a site's pages alternate their bands: calm (mostly plain, one soft),\n * alternating (plain and soft by turns), or bold (brand and dark bands for\n * its key moments).\n */\nexport type AiSiteRhythm = 'calm' | 'alternating' | 'bold'\nexport const AI_SITE_RHYTHMS: readonly AiSiteRhythm[] = ['calm', 'alternating', 'bold']\n\n/** Spacing: tighter, regular or airier than the platform's unit. */\nexport type AiSiteDensity = 'compact' | 'regular' | 'airy'\n\n/** What the code applies for a kind: the bounds a look is chosen and varied in. */\nexport interface AiSiteLookFamily {\n /** The platform's base themes that suit the kind, best first (`AI_SITE_BASES`). */\n bases: readonly AiSiteBase[]\n chroma: AiSiteChroma\n /** How the header is arranged: the brand at the start with the links after it, or both centered. */\n headerAligns?: readonly ('start' | 'center')[]\n /** The band rhythm its pages lean to (`AI_SITE_RHYTHMS`). */\n rhythms?: readonly AiSiteRhythm[]\n /** Hue ranges in degrees that suit the kind, `[from, to]`, wrapping past 360. */\n hues: ReadonlyArray<readonly [number, number]>\n grounds: readonly AiSiteGround[]\n fonts: readonly AiSiteFontPairingId[]\n corners: readonly AiSiteCorners[]\n buttons: AiSiteButtons\n /** Display and heading sizes against the platform's, 1 = as shipped. */\n headingScale: number\n density: AiSiteDensity\n}\n\nexport interface AiSiteKind {\n /** A persisted identifier: the guided start's answer and the job's `siteKind` input. */\n id: string\n /** The card's title, in customer copy. */\n label: string\n /** One line under it. */\n blurb: string\n /** A word from the icon set the card shows. */\n icon: string\n /** Words in \"what kind of site\" that suggest this kind, matched whole. */\n keywords: readonly string[]\n /** The starter whose shape this kind follows, where one fits (`STARTER_TEMPLATES`). */\n starter: string\n look: AiSiteLookFamily\n /** How its pages are arranged, as every page and the header and footer are told. */\n design: string\n /** The pages it usually has, as the plan is told. */\n pages: string\n}\n\nconst ALL_HUES: ReadonlyArray<readonly [number, number]> = [[0, 360]]\n\n/**\n * The kinds, in the order the guided start shows them. Drawn from the template\n * categories the large site builders offer, merged where two would build the\n * same site: designer and agency are one studio, law and accounting one\n * practice, health and therapy one wellness kind.\n */\nexport const AI_SITE_KINDS: readonly AiSiteKind[] = [\n {\n id: 'business',\n label: 'Business & services',\n blurb: 'Say what you do, why choose you, and how to reach you',\n icon: 'briefcase',\n keywords: ['cleaning', 'cleaner', 'janitorial', 'pet', 'groomer', 'grooming', 'dog', 'staffing', 'printing', 'courier'],\n starter: 'business',\n look: { bases: ['starter', 'material3', 'fluent', 'minimal', 'ant-design'], chroma: 'balanced', hues: ALL_HUES, grounds: ['white', 'cool', 'warm', 'tinted'], fonts: ['jakarta', 'manrope', 'outfit', 'inter', 'bricolage', 'fraunces'], corners: ['soft', 'round'], buttons: 'rounded', headingScale: 1, density: 'regular' },\n design: 'Lead with what the business does and for whom, then services as cards, the reasons to choose it, how it works as steps, and a clear call to get in touch. Mix plain and soft bands with one brand band.',\n pages: 'Home, Services, About and Contact are typical; a pricing or booking page where the brief asks for one.',\n },\n {\n id: 'trades',\n label: 'Home services & trades',\n blurb: 'Roofers, plumbers, towing, landscaping: bold, direct, built on trust',\n icon: 'wrench',\n keywords: ['roofer', 'roofing', 'plumber', 'plumbing', 'electrician', 'hvac', 'towing', 'tow', 'landscaping', 'landscaper', 'contractor', 'construction', 'handyman', 'painter', 'painting', 'mover', 'moving', 'pest', 'remodeling', 'repair', 'mechanic', 'auto', 'trades', 'trade', 'garage', 'locksmith', 'flooring', 'fencing', 'pool'],\n starter: 'business',\n look: { bases: ['bootstrap', 'carbon', 'material-ui', 'fluent', 'starter'], chroma: 'vivid', hues: [[4, 18], [20, 38], [42, 56], [128, 158], [195, 212], [214, 240]], grounds: ['white', 'cool'], fonts: ['oswald', 'archivo', 'barlow', 'manrope'], corners: ['sharp', 'soft'], buttons: 'square', headingScale: 1.05, density: 'compact' },\n design: 'Direct and high-contrast: a big promise and a call-to-action button in the first section, the services as a tight grid of cards, why customers can trust the business (licensed, insured, years, guarantees, but only what the brief gives), the area served, and a call or quote request repeated near the end. Use a dark band and a brand band.',\n pages: 'Home, Services, About or Why us, and a Quote or Contact page with the form.',\n },\n {\n id: 'professional',\n label: 'Law, finance & consulting',\n blurb: 'Law firms, accountants, advisers: calm, established, credible',\n icon: 'scale',\n keywords: ['law', 'lawyer', 'attorney', 'legal', 'firm', 'accountant', 'accounting', 'cpa', 'tax', 'bookkeeping', 'financial', 'advisor', 'adviser', 'consulting', 'insurance', 'notary', 'mediator'],\n starter: 'business',\n look: { bases: ['carbon', 'fluent', 'minimal', 'starter'], chroma: 'muted', hues: [[210, 250], [340, 360], [0, 15], [150, 175]], grounds: ['white', 'warm', 'cool'], fonts: ['baskerville', 'merriweather', 'editorial', 'plex', 'lora'], corners: ['sharp', 'soft'], buttons: 'rounded', headingScale: 0.95, density: 'airy' },\n design: 'Measured and credible: generous space, a calm opening statement, practice areas as cards with short plain explanations, the approach as steps, and an unhurried invitation to a consultation. Prefer plain and soft bands, at most one dark band.',\n pages: 'Home, Practice areas or Services, About or Our team, and Contact with a consultation form.',\n },\n {\n id: 'wellness',\n label: 'Health & wellness',\n blurb: 'Therapists, clinics, dentists, coaches: warm, reassuring, clear',\n icon: 'heart',\n keywords: ['therapist', 'therapy', 'counselor', 'counseling', 'counselling', 'psychologist', 'dentist', 'dental', 'clinic', 'doctor', 'chiropractor', 'massage', 'wellness', 'health', 'nutrition', 'nutritionist', 'acupuncture', 'physio', 'physiotherapy', 'coach', 'coaching', 'healing', 'mental', 'medical', 'vet', 'veterinary'],\n starter: 'business',\n look: { bases: ['material3', 'cupertino', 'starter', 'fluent'], chroma: 'muted', hues: [[150, 200], [250, 290], [20, 40], [90, 130]], grounds: ['warm', 'tinted', 'white'], fonts: ['lora', 'fraunces', 'quicksand', 'dmserif', 'nunito'], corners: ['round', 'pill'], buttons: 'pill', headingScale: 1, density: 'airy' },\n design: 'Reassuring and gentle: a warm opening that names who it helps, what a first visit or session is like as steps, services as soft cards, answers to common worries as an FAQ, and a low-pressure way to book or ask. Prefer soft bands, avoid dark ones.',\n pages: 'Home, Services or Approach, About, and Book or Contact with the form.',\n },\n {\n id: 'restaurant',\n label: 'Restaurant & café',\n blurb: 'Warm, photo-led pages for food, drink and a place to visit',\n icon: 'utensils',\n keywords: ['restaurant', 'cafe', 'café', 'coffee', 'bakery', 'bar', 'pub', 'bistro', 'diner', 'pizzeria', 'pizza', 'food', 'catering', 'brewery', 'winery', 'kitchen', 'truck', 'tea', 'deli'],\n starter: 'business',\n look: { bases: ['material3', 'starter', 'cupertino'], chroma: 'balanced', hues: [[0, 45], [80, 150], [330, 360]], grounds: ['warm', 'tinted'], fonts: ['fraunces', 'editorial', 'dmserif', 'garamond', 'bricolage'], corners: ['soft', 'round'], buttons: 'rounded', headingScale: 1.1, density: 'regular' },\n design: 'Photo-led and inviting: a large image beside the opening line, the menu highlights as cards with pictures, the story of the place, and a clear visit or reserve section. Use images generously and a warm brand band.',\n pages: 'Home, Menu, About or Our story, and Visit or Reserve with the form.',\n },\n {\n id: 'store',\n label: 'Online store',\n blurb: 'Product-first pages for things you sell',\n icon: 'bag',\n keywords: ['store', 'shop', 'boutique', 'ecommerce', 'e-commerce', 'products', 'sell', 'selling', 'merch', 'jewelry', 'clothing', 'apparel', 'candles', 'soap', 'brand'],\n starter: 'physical-shop',\n look: { bases: ['minimal', 'cupertino', 'material3'], chroma: 'balanced', hues: ALL_HUES, grounds: ['white', 'warm'], fonts: ['inter', 'outfit', 'manrope', 'dmserif', 'syne'], corners: ['soft', 'sharp', 'round'], buttons: 'pill', headingScale: 1, density: 'regular' },\n design: 'Product-grid first: a short opening with one strong image, then the product range as a grid of image cards, what makes the products different, and care, shipping or returns answers only as the brief gives them. Keep copy short and let images lead.',\n pages: 'Home, Shop presenting the range as image cards, About, and Contact. Products, a cart and checkout are added in Commerce, so plan no checkout page.',\n },\n {\n id: 'portfolio',\n label: 'Portfolio',\n blurb: 'Minimal, image-led pages that put the work first',\n icon: 'grid',\n keywords: ['portfolio', 'illustrator', 'artist', 'art', 'architect', 'architecture', 'developer', 'engineer', 'writer', 'copywriter', 'animator', 'freelance', 'freelancer', 'maker', 'ceramics', 'sculptor'],\n starter: 'portfolio',\n look: { bases: ['minimal', 'cupertino', 'carbon'], chroma: 'neutral', hues: ALL_HUES, grounds: ['white', 'warm'], fonts: ['inter', 'grotesk', 'syne', 'instrument'], corners: ['sharp', 'soft'], buttons: 'square', headingScale: 1.3, density: 'airy' },\n design: 'Minimal and image-led: a large, short statement as the title, then the work as a grid of image cards with one-line captions, a brief about, and a quiet way to get in touch. Mostly plain bands, lots of space, big type, one accent color.',\n pages: 'Home with selected work, Work or Projects, About, and Contact.',\n },\n {\n id: 'studio',\n label: 'Design studio & agency',\n blurb: 'Bold type and case studies for creative teams',\n icon: 'sparkle',\n keywords: ['design', 'designer', 'agency', 'creative', 'branding', 'marketing', 'advertising', 'web', 'digital', 'production', 'video', 'animation'],\n starter: 'portfolio',\n look: { bases: ['minimal', 'carbon', 'cupertino'], chroma: 'neutral', hues: ALL_HUES, grounds: ['white', 'cool'], fonts: ['syne', 'grotesk', 'bricolage', 'inter'], corners: ['sharp', 'soft'], buttons: 'pill', headingScale: 1.3, density: 'airy' },\n design: 'Confident and editorial: an oversized statement, selected case studies as large image cards with the outcome in a line, services as a short list, how the studio works as steps, and a bold dark band to start a project.',\n pages: 'Home, Work or Case studies, Services, About, and Contact or Start a project.',\n },\n {\n id: 'photography',\n label: 'Photography',\n blurb: 'Galleries first, words second',\n icon: 'camera',\n keywords: ['photographer', 'photography', 'photo', 'photos', 'videographer', 'wedding photographer', 'portraits'],\n starter: 'portfolio',\n look: { bases: ['minimal', 'cupertino', 'carbon'], chroma: 'neutral', hues: ALL_HUES, grounds: ['white', 'warm'], fonts: ['instrument', 'garamond', 'inter', 'grotesk'], corners: ['sharp'], buttons: 'square', headingScale: 1.2, density: 'airy' },\n design: 'Gallery-first: one full image to open, then galleries as image cards by subject, a short personal about, packages only as the brief gives them, and a booking inquiry. Few words, many images, mostly plain bands and one dark band.',\n pages: 'Home, Galleries or Portfolio, About, and Book or Contact with the form.',\n },\n {\n id: 'blog',\n label: 'Blog & writing',\n blurb: 'Reading-first pages with a calm serif voice',\n icon: 'book',\n keywords: ['blog', 'blogger', 'writing', 'journal', 'magazine', 'newsletter', 'podcast', 'stories', 'essays', 'author', 'publication'],\n starter: 'business',\n look: { bases: ['minimal', 'starter', 'cupertino'], chroma: 'muted', hues: ALL_HUES, grounds: ['white', 'warm'], fonts: ['reading', 'editorial', 'instrument', 'lora'], corners: ['sharp', 'soft'], buttons: 'rounded', headingScale: 1.05, density: 'airy' },\n design: 'Reading-first: a short introduction to the writer and the subject, featured writing as cards with a title and a one-line summary, the topics covered as a list, and a sign-up or contact section. Narrow, calm, mostly plain bands.',\n pages: 'Home, Articles presenting the writing as cards, About, and Subscribe or Contact. Posts themselves are added in Data as a collection, so plan the articles page as an introduction and a few featured cards.',\n },\n {\n id: 'events',\n label: 'Events & weddings',\n blurb: 'Dates, places and the details guests need',\n icon: 'calendar',\n keywords: ['event', 'events', 'wedding', 'conference', 'festival', 'party', 'gala', 'meetup', 'summit', 'concert', 'retreat', 'workshop', 'venue', 'planner'],\n starter: 'landing',\n look: { bases: ['material3', 'cupertino', 'starter'], chroma: 'balanced', hues: [[320, 360], [0, 30], [250, 290], [140, 170], [40, 55]], grounds: ['warm', 'tinted', 'white'], fonts: ['garamond', 'editorial', 'dmserif', 'anton', 'syne'], corners: ['soft', 'round'], buttons: 'pill', headingScale: 1.2, density: 'regular' },\n design: 'Celebratory and clear: the name and what it is in a big opening, when and where only as the brief gives them, the schedule as steps, details guests ask about as an FAQ, and an RSVP or registration section. One brand band.',\n pages: 'Home, Schedule or Details, Travel or Venue where the brief names one, and RSVP or Register with the form.',\n },\n {\n id: 'fitness',\n label: 'Fitness & sports',\n blurb: 'Gyms, trainers and studios with energy',\n icon: 'bolt',\n keywords: ['gym', 'fitness', 'trainer', 'training', 'personal trainer', 'crossfit', 'boxing', 'martial', 'karate', 'pilates', 'sports', 'running', 'climbing', 'dance', 'swim', 'team', 'club'],\n starter: 'business',\n look: { bases: ['bootstrap', 'material-ui', 'carbon', 'material3'], chroma: 'vivid', hues: [[0, 30], [90, 140], [180, 210], [270, 300]], grounds: ['white', 'cool'], fonts: ['barlow', 'anton', 'archivo', 'outfit'], corners: ['sharp', 'soft'], buttons: 'caps', headingScale: 1.15, density: 'compact' },\n design: 'High-energy: a punchy opening with a strong call to action, classes or programs as cards, how to start as steps, and a repeated join or book section. Use a dark band and a brand band.',\n pages: 'Home, Classes or Programs, About or Coaches, and Join or Contact with the form.',\n },\n {\n id: 'yoga',\n label: 'Yoga & mindfulness',\n blurb: 'Calm, spacious pages for classes and retreats',\n icon: 'leaf',\n keywords: ['yoga', 'meditation', 'mindfulness', 'breathwork', 'reiki', 'spa', 'retreat', 'sound'],\n starter: 'business',\n look: { bases: ['material3', 'cupertino', 'starter', 'fluent'], chroma: 'muted', hues: [[20, 50], [80, 150], [260, 300], [170, 200]], grounds: ['warm', 'tinted'], fonts: ['garamond', 'lora', 'quicksand', 'instrument', 'fraunces'], corners: ['round', 'pill'], buttons: 'pill', headingScale: 1.05, density: 'airy' },\n design: 'Calm and spacious: a quiet opening, classes as soft cards, what a first class is like as steps, a gentle about, and an easy way to book. Soft bands, no dark band, lots of space.',\n pages: 'Home, Classes or Schedule, About, and Book or Contact with the form.',\n },\n {\n id: 'beauty',\n label: 'Beauty & salon',\n blurb: 'Salons, barbers, spas and studios with style',\n icon: 'scissors',\n keywords: ['salon', 'hair', 'hairdresser', 'barber', 'barbershop', 'nails', 'nail', 'beauty', 'makeup', 'lashes', 'brows', 'esthetician', 'skincare', 'tattoo', 'stylist'],\n starter: 'business',\n look: { bases: ['material3', 'cupertino', 'minimal'], chroma: 'balanced', hues: [[320, 360], [0, 25], [270, 300], [20, 45]], grounds: ['warm', 'tinted', 'white'], fonts: ['garamond', 'dmserif', 'instrument', 'outfit', 'syne'], corners: ['round', 'pill', 'sharp'], buttons: 'pill', headingScale: 1.1, density: 'regular' },\n design: 'Stylish and image-led: a striking opening image, services as cards, the look and feel of the place in images, and booking made obvious. One brand band.',\n pages: 'Home, Services, About or The team, and Book or Contact with the form.',\n },\n {\n id: 'realestate',\n label: 'Real estate',\n blurb: 'Agents, brokers and property: polished and local',\n icon: 'home',\n keywords: ['real estate', 'realtor', 'realty', 'broker', 'property', 'properties', 'homes', 'rentals', 'rental', 'apartment', 'apartments', 'mortgage', 'airbnb', 'vacation'],\n starter: 'business',\n look: { bases: ['fluent', 'minimal', 'carbon'], chroma: 'muted', hues: [[200, 240], [150, 180], [20, 45], [0, 360]], grounds: ['white', 'warm', 'cool'], fonts: ['dmserif', 'manrope', 'editorial', 'outfit'], corners: ['soft', 'sharp'], buttons: 'rounded', headingScale: 1.05, density: 'regular' },\n design: 'Polished and local: an image-led opening, the areas served, how buying or selling works as steps, featured listings only as image cards the owner fills in, and a valuation or contact request. One dark band.',\n pages: 'Home, Buy or Listings, Sell, About, and Contact with the form.',\n },\n {\n id: 'education',\n label: 'Courses & education',\n blurb: 'Tutors, schools and courses, clear and encouraging',\n icon: 'school',\n keywords: ['course', 'courses', 'school', 'tutoring', 'tutor', 'teacher', 'lessons', 'academy', 'education', 'learning', 'training', 'daycare', 'preschool', 'music lessons', 'driving'],\n starter: 'business',\n look: { bases: ['material3', 'ant-design', 'material-ui'], chroma: 'balanced', hues: [[200, 240], [140, 170], [30, 50], [260, 290]], grounds: ['white', 'tinted', 'cool'], fonts: ['nunito', 'outfit', 'jakarta', 'lora', 'manrope'], corners: ['round', 'soft'], buttons: 'rounded', headingScale: 1, density: 'regular' },\n design: 'Clear and encouraging: who it is for and the result they get, courses or subjects as cards, how it works as steps, common questions as an FAQ, and a sign-up or inquiry section.',\n pages: 'Home, Courses or Lessons, About or Teachers, and Enroll or Contact with the form.',\n },\n {\n id: 'nonprofit',\n label: 'Nonprofit & community',\n blurb: 'A cause, its impact and how to help',\n icon: 'hands',\n keywords: ['nonprofit', 'non-profit', 'charity', 'foundation', 'church', 'community', 'volunteer', 'volunteers', 'association', 'ngo', 'mission', 'ministry', 'rescue', 'shelter', 'cause'],\n starter: 'business',\n look: { bases: ['material3', 'fluent', 'starter'], chroma: 'balanced', hues: [[130, 200], [20, 45], [200, 230], [340, 360]], grounds: ['white', 'warm'], fonts: ['merriweather', 'lora', 'jakarta', 'fraunces', 'nunito'], corners: ['soft', 'round'], buttons: 'rounded', headingScale: 1.05, density: 'regular' },\n design: 'Mission-led: the cause in one line, what the organization does as cards, how to help as steps (volunteer, give, spread the word), and a clear way to get involved. A brand band for the call to help.',\n pages: 'Home, Our work or Programs, About, and Get involved or Contact with the form.',\n },\n {\n id: 'music',\n label: 'Music & bands',\n blurb: 'Artists, bands and DJs, loud and visual',\n icon: 'music',\n keywords: ['band', 'musician', 'music', 'dj', 'singer', 'rapper', 'producer', 'orchestra', 'choir', 'composer', 'artist music'],\n starter: 'landing',\n look: { bases: ['carbon', 'minimal', 'material-ui'], chroma: 'vivid', hues: ALL_HUES, grounds: ['white', 'cool', 'tinted'], fonts: ['anton', 'syne', 'grotesk', 'archivo'], corners: ['sharp'], buttons: 'caps', headingScale: 1.3, density: 'regular' },\n design: 'Loud and visual: the name huge in the opening, an image band, releases or shows as image cards only as the brief gives them, a short bio, and a booking or contact section. Dark bands are welcome.',\n pages: 'Home, Music or Shows, About, and Booking or Contact with the form.',\n },\n {\n id: 'personal',\n label: 'Personal & resume',\n blurb: 'A simple page about you and your work',\n icon: 'person',\n // \"Personal\" only as a site about the person (AGL-3660): as a bare word it\n // is the adjective in \"a personal travel blog\", which it beat on length.\n keywords: ['personal site', 'personal website', 'personal page', 'about me', 'resume', 'cv', 'me', 'myself', 'profile', 'job', 'candidate', 'speaker'],\n starter: 'portfolio',\n look: { bases: ['minimal', 'cupertino', 'starter', 'fluent'], chroma: 'muted', hues: ALL_HUES, grounds: ['white', 'warm', 'cool'], fonts: ['inter', 'instrument', 'manrope', 'lora', 'grotesk'], corners: ['soft', 'round'], buttons: 'rounded', headingScale: 1.1, density: 'airy' },\n design: 'Simple and personal: who the person is in one line, what they do, experience or highlights as a list or steps, selected work as cards where the brief names some, and a way to get in touch. Mostly plain bands.',\n pages: 'Home, About or Experience, Work where the brief names some, and Contact.',\n },\n {\n id: 'landing',\n label: 'Landing page',\n blurb: 'One page that leads to one action',\n icon: 'rocket',\n keywords: ['landing', 'launch', 'app', 'startup', 'saas', 'software', 'product', 'waitlist', 'campaign', 'offer', 'ebook', 'webinar'],\n starter: 'landing',\n look: { bases: ['material3', 'minimal', 'ant-design'], chroma: 'vivid', hues: ALL_HUES, grounds: ['white', 'cool', 'tinted'], fonts: ['outfit', 'jakarta', 'manrope', 'bricolage', 'inter'], corners: ['round', 'soft'], buttons: 'pill', headingScale: 1.15, density: 'regular' },\n design: 'One action: a strong promise and the call to action first, the benefits as cards, how it works as steps, answers to objections as an FAQ, and the call to action again. A brand band to close.',\n pages: 'One long home page carries the story; a second page only for the form or details the brief asks for.',\n },\n {\n id: 'coming-soon',\n label: 'Coming soon',\n blurb: 'A placeholder that collects interest',\n icon: 'clock',\n keywords: ['coming soon', 'soon', 'prelaunch', 'pre-launch', 'under construction', 'placeholder'],\n starter: 'landing',\n look: { bases: ['minimal', 'material3', 'cupertino'], chroma: 'vivid', hues: ALL_HUES, grounds: ['white', 'tinted', 'cool'], fonts: ['syne', 'anton', 'outfit', 'instrument'], corners: ['round', 'pill'], buttons: 'pill', headingScale: 1.3, density: 'airy' },\n design: 'Short and striking: what is coming in one big line, two or three reasons to care, and a way to hear first through the form. Few sections, big type.',\n pages: 'A home page that says what is coming and invites people to sign up; nothing else unless the brief asks.',\n },\n]\n\n/** A kind by id, or `null`. */\nexport function aiSiteKind(id: unknown): AiSiteKind | null {\n if (typeof id !== 'string' || !id) return null\n return AI_SITE_KINDS.find((kind) => kind.id === id) ?? null\n}\n\n/** A pairing by id, or `null`. */\nexport function aiSiteFontPairing(id: unknown): AiSiteFontPairing | null {\n if (typeof id !== 'string' || !id) return null\n return AI_SITE_FONT_PAIRINGS.find((pairing) => pairing.id === id) ?? null\n}\n\nconst words = (text: string) => ` ${text.toLowerCase().replace(/[^a-z0-9é&'-]+/g, ' ')} `\n\n/**\n * The kind a \"what kind of site\" answer suggests, or `business` when nothing\n * in it matches: the card the guided start selects until the person picks\n * another. A longer keyword wins over a shorter one (\"wedding photographer\"\n * is photography, not events), and of two as long the later one wins, since\n * English puts the noun last (\"a food blog\" is a blog).\n */\nexport function aiSiteKindFor(siteType: string): AiSiteKind {\n const text = words(siteType)\n let best: { kind: AiSiteKind; length: number; at: number } | null = null\n for (const kind of AI_SITE_KINDS) {\n for (const keyword of kind.keywords) {\n const at = text.lastIndexOf(words(keyword))\n if (at === -1) continue\n if (!best || keyword.length > best.length || (keyword.length === best.length && at > best.at)) {\n best = { kind, length: keyword.length, at }\n }\n }\n }\n return best?.kind ?? (AI_SITE_KINDS[0] as AiSiteKind)\n}\n\n/** The kind a job's inputs name, else the one its business type suggests; `null` for a job that names neither. */\nexport function aiSiteKindOfInputs(inputs: Readonly<Record<string, unknown>> | null | undefined): AiSiteKind | null {\n const named = aiSiteKind(inputs?.['siteKind'])\n if (named) return named\n const type = inputs?.['businessType']\n return typeof type === 'string' && type.trim() ? aiSiteKindFor(type) : null\n}\n\n/** What each band rhythm asks of a page's sections. */\nconst RHYTHM_WORDS: Record<AiSiteRhythm, string> = {\n calm: 'mostly plain bands with one soft band, and a brand or dark band only for the closing call to action',\n alternating: 'plain and soft bands by turns, with one brand band',\n bold: 'a dark or brand band to open or close, and strong contrast between neighboring sections',\n}\n\n/** The site's own look tokens a unit is handed (AGL-3660), read defensively. */\nexport function aiSiteStyleTokens(\n inputs: Readonly<Record<string, unknown>> | null | undefined,\n): { headerAlign?: 'start' | 'center'; rhythm?: AiSiteRhythm } {\n const raw = inputs?.['siteStyle']\n if (!raw || typeof raw !== 'object') return {}\n const style = raw as Record<string, unknown>\n return {\n ...(style['headerAlign'] === 'start' || style['headerAlign'] === 'center' ? { headerAlign: style['headerAlign'] } : {}),\n ...(AI_SITE_RHYTHMS.includes(style['rhythm'] as AiSiteRhythm) ? { rhythm: style['rhythm'] as AiSiteRhythm } : {}),\n }\n}\n\n/** The style lines a page, the header and the footer are told for the job's kind and look; empty for none. */\nexport function aiSiteKindDesignLines(inputs: Readonly<Record<string, unknown>> | null | undefined): string[] {\n const kind = aiSiteKindOfInputs(inputs)\n const { rhythm } = aiSiteStyleTokens(inputs)\n return [\n ...(kind ? [`Style: a ${kind.label.toLowerCase()} site. ${kind.design}`] : []),\n ...(rhythm ? [`Band rhythm for this site: ${RHYTHM_WORDS[rhythm]}.`] : []),\n ]\n}\n"],"names":["AI_SITE_FONT_PAIRINGS","id","feel","heading","family","category","weight","sub","body","weights","tracking","caps","AI_SITE_BASES","AI_SITE_GROUNDS","AI_SITE_CORNERS","AI_SITE_RHYTHMS","ALL_HUES","AI_SITE_KINDS","label","blurb","icon","keywords","starter","look","bases","chroma","hues","grounds","fonts","corners","buttons","headingScale","density","design","pages","aiSiteKind","find","kind","aiSiteFontPairing","pairing","words","text","toLowerCase","replace","aiSiteKindFor","siteType","best","keyword","at","lastIndexOf","length","aiSiteKindOfInputs","inputs","named","type","trim","RHYTHM_WORDS","calm","alternating","bold","aiSiteStyleTokens","raw","style","headerAlign","includes","rhythm","aiSiteKindDesignLines"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BC,GAED,6EAA6E;AAa7E;;;;;CAKC,GACD,OAAO,MAAMA,wBAAsD;IACjE;QAAEC,IAAI;QAAWC,MAAM;QAAyBC,SAAS;YAAEC,QAAQ;YAAqBC,UAAU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AsBd,MAA4D;IAChG,MAAMf,OAAOc,mBAAmBC;IAChC,MAAM,EAAEa,MAAM,EAAE,GAAGL,kBAAkBR;IACrC,OAAO;WACDf,OAAO;YAAC,CAAC,SAAS,EAAEA,KAAKnB,KAAK,CAACwB,WAAW,GAAG,OAAO,EAAEL,KAAKJ,MAAM,EAAE;SAAC,GAAG,EAAE;WACzEgC,SAAS;YAAC,CAAC,2BAA2B,EAAET,YAAY,CAACS,OAAO,CAAC,CAAC,CAAC;SAAC,GAAG,EAAE;KAC1E;AACH"}
@@ -136,11 +136,32 @@ export declare function aiHexOklch(hex: string): {
136
136
  C: number;
137
137
  h: number;
138
138
  };
139
+ /** How far apart two hues sit on the wheel, in degrees: 0 to 180. */
140
+ export declare function aiHueGap(a: number, b: number): number;
141
+ /**
142
+ * The widest gap an accent may keep from the brand hue and still color a
143
+ * button beside it (AGL-3660). Past it the accent clashes: a live portfolio of
144
+ * green (hue 131) and magenta (323) showed its outlined buttons as a pink wash
145
+ * and its footer button as purple under green words, on a Cupertino base.
146
+ */
147
+ export declare const AI_SITE_ACCENT_CLASH_DEGREES = 60;
139
148
  /** Both schemes' colors for a style. */
140
149
  export declare function aiSiteColors(style: AiSiteStyle): {
141
150
  light: HostThemeSchemeColors;
142
151
  dark: HostThemeSchemeColors;
143
152
  };
153
+ /**
154
+ * The kinds whose titles are their design (AGL-3660): a portfolio's or a
155
+ * studio's statement, a photographer's name over a cover, a publication's
156
+ * masthead are set larger than a business site's, the way the designer
157
+ * templates set them. The display line grows most, the page title a little,
158
+ * and nothing under it; a phone still steps every size down
159
+ * (`responsiveFontSizes`).
160
+ */
161
+ export declare const AI_SITE_DISPLAY_BOOST: Readonly<Record<string, {
162
+ display: number;
163
+ title: number;
164
+ }>>;
144
165
  /**
145
166
  * The site's theme: the base theme with this style layered over it. Colors,
146
167
  * type, corners, spacing and the building blocks' component styles are the