@aglyn/plugins-ai 1.0.0-beta.230 → 1.0.0-beta.231

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 (139) hide show
  1. package/package.json +17 -17
  2. package/src/lib/components/ai-assist-provider-on-host.component.d.ts +66 -0
  3. package/src/lib/components/ai-assist-provider-on-host.component.js +78 -0
  4. package/src/lib/components/ai-assist-provider-on-host.component.js.map +1 -0
  5. package/src/lib/components/ai-assist-provider.component.js +9 -10
  6. package/src/lib/components/ai-assist-provider.component.js.map +1 -1
  7. package/src/lib/components/ai-job-plan.component.js +3 -1
  8. package/src/lib/components/ai-job-plan.component.js.map +1 -1
  9. package/src/lib/components/ai-permissions-on-host.component.d.ts +3 -46
  10. package/src/lib/components/ai-permissions-on-host.component.js +5 -53
  11. package/src/lib/components/ai-permissions-on-host.component.js.map +1 -1
  12. package/src/lib/components/ai-site-build-page.component.js +20 -8
  13. package/src/lib/components/ai-site-build-page.component.js.map +1 -1
  14. package/src/lib/jobs/ai-build-unit-outcome.js +4 -2
  15. package/src/lib/jobs/ai-build-unit-outcome.js.map +1 -1
  16. package/src/lib/jobs/ai-job-auto-confirm.d.ts +8 -0
  17. package/src/lib/jobs/ai-job-auto-confirm.js +30 -6
  18. package/src/lib/jobs/ai-job-auto-confirm.js.map +1 -1
  19. package/src/lib/jobs/ai-job-build-step.js +11 -0
  20. package/src/lib/jobs/ai-job-build-step.js.map +1 -1
  21. package/src/lib/jobs/ai-job-generation.d.ts +8 -0
  22. package/src/lib/jobs/ai-job-generation.js +13 -2
  23. package/src/lib/jobs/ai-job-generation.js.map +1 -1
  24. package/src/lib/jobs/ai-job-insight-step.js +8 -1
  25. package/src/lib/jobs/ai-job-insight-step.js.map +1 -1
  26. package/src/lib/jobs/ai-job-layout-language.d.ts +73 -0
  27. package/src/lib/jobs/ai-job-layout-language.js +194 -0
  28. package/src/lib/jobs/ai-job-layout-language.js.map +1 -0
  29. package/src/lib/jobs/ai-job-layout-site-pages.d.ts +13 -2
  30. package/src/lib/jobs/ai-job-layout-site-pages.js +18 -2
  31. package/src/lib/jobs/ai-job-layout-site-pages.js.map +1 -1
  32. package/src/lib/jobs/ai-job-layout-step.d.ts +5 -0
  33. package/src/lib/jobs/ai-job-layout-step.js +105 -5
  34. package/src/lib/jobs/ai-job-layout-step.js.map +1 -1
  35. package/src/lib/jobs/ai-job-page-language.d.ts +149 -0
  36. package/src/lib/jobs/ai-job-page-language.js +355 -0
  37. package/src/lib/jobs/ai-job-page-language.js.map +1 -0
  38. package/src/lib/jobs/ai-job-page-sections.d.ts +37 -1
  39. package/src/lib/jobs/ai-job-page-sections.js +93 -11
  40. package/src/lib/jobs/ai-job-page-sections.js.map +1 -1
  41. package/src/lib/jobs/ai-job-page-step.d.ts +4 -4
  42. package/src/lib/jobs/ai-job-page-step.js +105 -14
  43. package/src/lib/jobs/ai-job-page-step.js.map +1 -1
  44. package/src/lib/jobs/ai-job-plan-step.d.ts +1 -1
  45. package/src/lib/jobs/ai-job-plan-step.js +8 -2
  46. package/src/lib/jobs/ai-job-plan-step.js.map +1 -1
  47. package/src/lib/jobs/ai-job-site-step.d.ts +4 -0
  48. package/src/lib/jobs/ai-job-site-step.js +20 -3
  49. package/src/lib/jobs/ai-job-site-step.js.map +1 -1
  50. package/src/lib/jobs/ai-job-workflow-step.js +2 -2
  51. package/src/lib/jobs/ai-job-workflow-step.js.map +1 -1
  52. package/src/lib/jobs/ai-jobs.d.ts +1 -1
  53. package/src/lib/jobs/ai-jobs.js +17 -8
  54. package/src/lib/jobs/ai-jobs.js.map +1 -1
  55. package/src/lib/jobs/ai-layout-full-height.d.ts +40 -0
  56. package/src/lib/jobs/ai-layout-full-height.js +82 -0
  57. package/src/lib/jobs/ai-layout-full-height.js.map +1 -0
  58. package/src/lib/jobs/ai-layout-site-facts.d.ts +54 -0
  59. package/src/lib/jobs/ai-layout-site-facts.js +153 -0
  60. package/src/lib/jobs/ai-layout-site-facts.js.map +1 -0
  61. package/src/lib/layout-language/ai-layout-compiler.d.ts +145 -0
  62. package/src/lib/layout-language/ai-layout-compiler.js +1148 -0
  63. package/src/lib/layout-language/ai-layout-compiler.js.map +1 -0
  64. package/src/lib/layout-language/ai-layout-copy.d.ts +73 -0
  65. package/src/lib/layout-language/ai-layout-copy.js +137 -0
  66. package/src/lib/layout-language/ai-layout-copy.js.map +1 -0
  67. package/src/lib/layout-language/ai-layout-frame.d.ts +52 -0
  68. package/src/lib/layout-language/ai-layout-frame.js +457 -0
  69. package/src/lib/layout-language/ai-layout-frame.js.map +1 -0
  70. package/src/lib/layout-language/ai-layout-gaps.d.ts +63 -0
  71. package/src/lib/layout-language/ai-layout-gaps.js +345 -0
  72. package/src/lib/layout-language/ai-layout-gaps.js.map +1 -0
  73. package/src/lib/layout-language/ai-layout-language.d.ts +161 -0
  74. package/src/lib/layout-language/ai-layout-language.js +446 -0
  75. package/src/lib/layout-language/ai-layout-language.js.map +1 -0
  76. package/src/lib/layout-language/ai-layout-links.d.ts +80 -0
  77. package/src/lib/layout-language/ai-layout-links.js +109 -0
  78. package/src/lib/layout-language/ai-layout-links.js.map +1 -0
  79. package/src/lib/layout-language/ai-layout-store.d.ts +39 -0
  80. package/src/lib/layout-language/ai-layout-store.js +69 -0
  81. package/src/lib/layout-language/ai-layout-store.js.map +1 -0
  82. package/src/lib/layout-language/ai-layout-tree.d.ts +59 -0
  83. package/src/lib/layout-language/ai-layout-tree.js +84 -0
  84. package/src/lib/layout-language/ai-layout-tree.js.map +1 -0
  85. package/src/lib/lazy-widget.d.ts +45 -0
  86. package/src/lib/lazy-widget.js +53 -0
  87. package/src/lib/lazy-widget.js.map +1 -0
  88. package/src/lib/model/ai-build-job.js +2 -1
  89. package/src/lib/model/ai-build-job.js.map +1 -1
  90. package/src/lib/model/ai-build-progress.d.ts +20 -3
  91. package/src/lib/model/ai-build-progress.js +48 -6
  92. package/src/lib/model/ai-build-progress.js.map +1 -1
  93. package/src/lib/model/ai-host-publish-context.d.ts +51 -0
  94. package/src/lib/model/ai-host-publish-context.js +104 -0
  95. package/src/lib/model/ai-host-publish-context.js.map +1 -0
  96. package/src/lib/model/ai-job-activity.d.ts +22 -0
  97. package/src/lib/model/ai-job-activity.js +22 -1
  98. package/src/lib/model/ai-job-activity.js.map +1 -1
  99. package/src/lib/model/ai-job-failure-copy.d.ts +38 -1
  100. package/src/lib/model/ai-job-failure-copy.js +56 -1
  101. package/src/lib/model/ai-job-failure-copy.js.map +1 -1
  102. package/src/lib/model/ai-job-notice.d.ts +3 -1
  103. package/src/lib/model/ai-job-notice.js +31 -9
  104. package/src/lib/model/ai-job-notice.js.map +1 -1
  105. package/src/lib/model/ai-jobs.types.d.ts +19 -0
  106. package/src/lib/model/ai-jobs.types.js.map +1 -1
  107. package/src/lib/model/ai-site-build-progress.d.ts +5 -1
  108. package/src/lib/model/ai-site-build-progress.js +27 -4
  109. package/src/lib/model/ai-site-build-progress.js.map +1 -1
  110. package/src/lib/model/ai-site-job.d.ts +8 -0
  111. package/src/lib/model/ai-site-job.js +9 -0
  112. package/src/lib/model/ai-site-job.js.map +1 -1
  113. package/src/lib/model/ai-site-start-seo.d.ts +1 -1
  114. package/src/lib/model/ai-site-start.d.ts +5 -2
  115. package/src/lib/model/ai-site-start.js +5 -2
  116. package/src/lib/model/ai-site-start.js.map +1 -1
  117. package/src/lib/plugin.js +79 -47
  118. package/src/lib/plugin.js.map +1 -1
  119. package/src/lib/providers/catalog.d.ts +1 -1
  120. package/src/lib/providers/catalog.js +3 -3
  121. package/src/lib/providers/catalog.js.map +1 -1
  122. package/src/lib/runtime/ai-doctrine-validators.d.ts +82 -0
  123. package/src/lib/runtime/ai-doctrine-validators.js +436 -4
  124. package/src/lib/runtime/ai-doctrine-validators.js.map +1 -1
  125. package/src/lib/runtime/ai-doctrine.js +12 -3
  126. package/src/lib/runtime/ai-doctrine.js.map +1 -1
  127. package/src/lib/runtime/ai-icon-library.d.ts +257 -0
  128. package/src/lib/runtime/ai-icon-library.js +254 -0
  129. package/src/lib/runtime/ai-icon-library.js.map +1 -0
  130. package/src/lib/runtime/ai-node-tree.d.ts +9 -0
  131. package/src/lib/runtime/ai-node-tree.js +30 -4
  132. package/src/lib/runtime/ai-node-tree.js.map +1 -1
  133. package/src/lib/runtime/ai-palette.d.ts +6 -0
  134. package/src/lib/runtime/ai-palette.generated.js +70 -0
  135. package/src/lib/runtime/ai-palette.generated.js.map +1 -1
  136. package/src/lib/runtime/ai-palette.js.map +1 -1
  137. package/src/lib/tools/ai-workflow-tool.d.ts +6 -2
  138. package/src/lib/tools/ai-workflow-tool.js +16 -14
  139. package/src/lib/tools/ai-workflow-tool.js.map +1 -1
@@ -118,8 +118,11 @@ export declare function aiSiteStartBrief(answers: AiSiteStartAnswers): string;
118
118
  * without a prompt of their own.
119
119
  *
120
120
  * The per-site variables an agency batch fills — the business name, the city,
121
- * the brand — are left empty: this is one person's own site, and its name is
122
- * on the site already.
121
+ * the brand — are left empty here: the questions never ask them. The name is
122
+ * the site's own, and the create door fills it from the site
123
+ * (`aiJobAdmittedInputs`, AGL-3596) when the job is started — a job that
124
+ * reached the model with no name had the model invent one for its header and
125
+ * footer.
123
126
  */
124
127
  export declare function aiSiteStartInputs(answers: AiSiteStartAnswers): Omit<AiSiteJobInputs, 'batchId'>;
125
128
  /** The site inputs a guided start's answers become, by name: what a summary carries back (AGL-3596). */
@@ -140,8 +140,11 @@
140
140
  * without a prompt of their own.
141
141
  *
142
142
  * The per-site variables an agency batch fills — the business name, the city,
143
- * the brand — are left empty: this is one person's own site, and its name is
144
- * on the site already.
143
+ * the brand — are left empty here: the questions never ask them. The name is
144
+ * the site's own, and the create door fills it from the site
145
+ * (`aiJobAdmittedInputs`, AGL-3596) when the job is started — a job that
146
+ * reached the model with no name had the model invent one for its header and
147
+ * footer.
145
148
  */ export function aiSiteStartInputs(answers) {
146
149
  var _ref;
147
150
  const example = aiSiteStartExample(answers);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/model/ai-site-start.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 {\n AI_SITE_INPUT_MAX_CHARS,\n AI_SITE_SUBMISSIONS,\n aiSitePagesBand,\n type AiSiteJobInputs,\n type AiSiteSubmissions,\n} from './ai-site-job'\n\n/**\n * The guided start (AGL-2918): the questions a person answers on a site they\n * have just made, and the site job those answers become.\n *\n * A scaffold already exists — the `site` job plans four to eight pages, a\n * layout, a contact form, a palette and a welcome email, and builds every one\n * of them as a draft. What it had no way in through was a brief: somebody had\n * to know what to write, on a site where nothing has happened yet. So this\n * module is the QUESTIONS, and nothing else: what is asked, what an answer may\n * be, and how a set of answers becomes the brief and the scalar inputs the\n * `site` door already takes.\n *\n * ── Answering is never the way out ───────────────────────────────────────\n *\n * There is no answer here that means \"not this\". The way past the questions\n * is the `hostFirstRun` zone's own `startBlank`, which is drawn beside them\n * from the first one and creates nothing at all — see the zone in\n * `CONSOLE_WIDGET_SLOTS`. Putting the exit inside the question set would make\n * leaving a thing you answer your way to, and it is not.\n *\n * ── Every answer but the first is optional ───────────────────────────────\n *\n * Only what a site is FOR has no default worth guessing. The audience narrows\n * the copy, the example steers the shape, the page count and the welcome\n * email are defaults a person may change — so a person who types six words\n * and confirms gets a planned site, and the rest of the questions are there\n * for the person who wants to answer them.\n *\n * Pure: shapes, vocabularies and two string builders. No React, no network,\n * and no import of the starter catalog — {@link AI_SITE_START_EXAMPLES} names\n * the starters rather than reading them, so the console does not carry a\n * catalog of node maps to draw five cards. `ai-site-start.spec.ts` holds the\n * two lists to each other.\n */\n\n/** A worked example a person picks to steer what the site should look like. */\nexport interface AiSiteStartExample {\n /** A `STARTER_TEMPLATES` id, which is a persisted identifier. */\n id: string\n /** The starter as its card names it. */\n label: string\n /** The starter's category, which is how the examples group. */\n category: string\n /** What the example is, in one line a person reads before picking it. */\n blurb: string\n}\n\n/**\n * The examples the start offers, in the order they are shown. The platform's\n * own starter sites: a person who has no words for what they want has seen\n * these five shapes before, and picking one says more than a sentence would.\n */\nexport const AI_SITE_START_EXAMPLES: readonly AiSiteStartExample[] = [\n {\n id: 'business',\n label: 'Business',\n category: 'Business',\n blurb: 'A home page led by what you do, an about page and a contact page',\n },\n {\n id: 'landing',\n label: 'Landing Page',\n category: 'Marketing',\n blurb: 'One page that leads to one action, with the reasons to take it',\n },\n {\n id: 'portfolio',\n label: 'Portfolio',\n category: 'Personal',\n blurb: 'An introduction, a grid of work and a way to get in touch',\n },\n {\n id: 'physical-shop',\n label: 'Shop (physical products)',\n category: 'Commerce',\n blurb: 'Featured products, a shop to browse, and a cart',\n },\n {\n id: 'digital-shop',\n label: 'Shop (digital products)',\n category: 'Commerce',\n blurb: 'Downloads up front, a shop to browse, and a cart',\n },\n]\n\n/**\n * Kinds of site offered beside the first question's box, so answering it can\n * be a tap. They fill the box rather than replacing it: what somebody is\n * building is theirs to say, and a list of eight is a list somebody is not on.\n */\nexport const AI_SITE_START_TYPES: readonly string[] = [\n 'a local service business',\n 'a restaurant or cafe',\n 'a professional practice',\n 'a trades business',\n 'a shop',\n 'a nonprofit',\n 'a personal portfolio',\n 'an event',\n]\n\n/** What a person answered; the shape the card holds and the brief is built from. */\nexport interface AiSiteStartAnswers {\n /** What kind of site this is. The one answer with no default. */\n siteType: string\n /** Who the site is for; empty when they did not say. */\n audience: string\n /** The example they liked, by {@link AiSiteStartExample.id}; `null` for none. */\n example: string | null\n /** How many pages to plan. */\n pages: number\n /** Where the contact form's submissions go. */\n submissions: AiSiteSubmissions\n /** Whether the scaffold also drafts a welcome email. */\n welcomeEmail: boolean\n}\n\n/**\n * What the questions start on. Five pages because it is the middle of the\n * band the scaffold builds, a welcome email because the scaffold drafts one\n * unless it is told not to, and the Inbox because it is what every submission\n * does anyway — filing a lead as well is the addition, and an addition is the\n * thing a person should have to choose.\n */\nexport const AI_SITE_START_ANSWERS: AiSiteStartAnswers = {\n siteType: '',\n audience: '',\n example: null,\n pages: 5,\n submissions: 'inbox',\n welcomeEmail: true,\n}\n\n/** The example an answer names, or `null` when it names none this list knows. */\nexport function aiSiteStartExample(\n answers: AiSiteStartAnswers,\n): AiSiteStartExample | null {\n if (!answers.example) return null\n return AI_SITE_START_EXAMPLES.find((entry) => entry.id === answers.example) ?? null\n}\n\n/**\n * Why these answers cannot start a site, in a sentence a person reads; `null`\n * when they can. The door's own parser is what actually admits the job — this\n * is what the card says before it asks for one.\n */\nexport function aiSiteStartRefusal(\n answers: AiSiteStartAnswers,\n options: { freeTaste?: boolean } = {},\n): string | null {\n // The workspace's own band (AGL-3594): one or two pages on the Free taste.\n const band = aiSitePagesBand(options.freeTaste)\n const siteType = answers.siteType.trim()\n if (!siteType) return 'Say what kind of site this is.'\n if (siteType.length > AI_SITE_INPUT_MAX_CHARS) {\n return `Keep what kind of site this is under ${AI_SITE_INPUT_MAX_CHARS} characters.`\n }\n if (answers.audience.trim().length > AI_SITE_INPUT_MAX_CHARS) {\n return `Keep who the site is for under ${AI_SITE_INPUT_MAX_CHARS} characters.`\n }\n if (!Number.isInteger(answers.pages) || answers.pages < band.min || answers.pages > band.max) {\n return `A site is planned with ${band.min} to ${band.max} pages.`\n }\n if (answers.example !== null && !aiSiteStartExample(answers)) {\n return 'Pick one of the examples, or none of them.'\n }\n if (!(AI_SITE_SUBMISSIONS as readonly string[]).includes(answers.submissions)) {\n return 'Say where the contact form’s submissions go.'\n }\n return null\n}\n\n/**\n * The answers as the brief the `site` job is created with: the plan step reads\n * it as the person's own words, so it says what they said and asks for nothing\n * they did not.\n */\nexport function aiSiteStartBrief(answers: AiSiteStartAnswers): string {\n const siteType = answers.siteType.trim()\n const audience = answers.audience.trim()\n const example = aiSiteStartExample(answers)\n const sentences = [\n `A ${answers.pages}-page website for ${siteType}.`,\n ]\n if (audience) sentences.push(`It is for ${audience}.`)\n if (example) {\n sentences.push(\n `Follow the shape of the ${example.label} starter: ${example.blurb.toLowerCase()}.`,\n )\n }\n sentences.push(\n 'Plan a page for each thing a visitor comes to do, and a contact form on the page that asks to be contacted.',\n )\n if (audience) {\n // Said of the FORM as well as of the copy: who fills a form in is what\n // decides which fields it asks for, and a brief that named the audience\n // once, in a sentence about the pages, left the form to guess.\n sentences.push(`Ask the contact form for what ${audience} would be asked for.`)\n }\n return sentences.join(' ')\n}\n\n/**\n * The answers as the `site` job's scalar inputs. Read by the door's\n * {@link parseAiSiteJobInputs}, and put in front of the model one per line by\n * the plan step, which is how the audience and the example reach the plan\n * without a prompt of their own.\n *\n * The per-site variables an agency batch fills — the business name, the city,\n * the brand — are left empty: this is one person's own site, and its name is\n * on the site already.\n */\nexport function aiSiteStartInputs(\n answers: AiSiteStartAnswers,\n): Omit<AiSiteJobInputs, 'batchId'> {\n const example = aiSiteStartExample(answers)\n return {\n businessType: answers.siteType.trim(),\n audience: answers.audience.trim(),\n starter: example?.id ?? '',\n pages: answers.pages,\n businessName: '',\n city: '',\n brand: '',\n submissions: answers.submissions,\n welcomeEmail: answers.welcomeEmail,\n }\n}\n\n/** The site inputs a guided start's answers become, by name: what a summary carries back (AGL-3596). */\nexport const AI_SITE_START_INPUT_KEYS = [\n 'businessType',\n 'audience',\n 'starter',\n 'pages',\n 'businessName',\n 'city',\n 'brand',\n 'submissions',\n 'welcomeEmail',\n] as const\n\n/** A site job's scalar inputs, and nothing else its inputs carry; `null` when it has none. */\nexport function aiSiteStartInputsOf(\n inputs: Readonly<Record<string, unknown>> | null | undefined,\n): Record<string, unknown> | null {\n if (!inputs) return null\n const kept: Record<string, unknown> = {}\n for (const key of AI_SITE_START_INPUT_KEYS) {\n const value = inputs[key]\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') kept[key] = value\n }\n return Object.keys(kept).length ? kept : null\n}\n\n/**\n * A failed start's answers, back as the questions hold them (AGL-3596), so\n * Try again reopens the guided start filled in for the person to adjust:\n * the inverse of {@link aiSiteStartInputs}. Read defensively — an answer the\n * questions no longer offer goes back to its default — and held to the\n * workspace's page band. `null` when the inputs say no kind of site at all.\n */\nexport function aiSiteStartAnswersFromInputs(\n inputs: Readonly<Record<string, unknown>> | null | undefined,\n options: { freeTaste?: boolean } = {},\n): AiSiteStartAnswers | null {\n const text = (key: string) => (typeof inputs?.[key] === 'string' ? (inputs[key] as string).trim() : '')\n const siteType = text('businessType')\n if (!siteType) return null\n const band = aiSitePagesBand(options.freeTaste)\n const pages = typeof inputs?.['pages'] === 'number' ? Math.round(inputs['pages'] as number) : AI_SITE_START_ANSWERS.pages\n const starter = text('starter')\n const submissions = text('submissions')\n return {\n siteType,\n audience: text('audience'),\n example: AI_SITE_START_EXAMPLES.some((entry) => entry.id === starter) ? starter : null,\n pages: Math.min(band.max, Math.max(band.min, pages)),\n submissions: (AI_SITE_SUBMISSIONS as readonly string[]).includes(submissions)\n ? (submissions as AiSiteSubmissions)\n : AI_SITE_START_ANSWERS.submissions,\n welcomeEmail: options.freeTaste ? false : inputs?.['welcomeEmail'] !== false,\n }\n}\n"],"names":["AI_SITE_INPUT_MAX_CHARS","AI_SITE_SUBMISSIONS","aiSitePagesBand","AI_SITE_START_EXAMPLES","id","label","category","blurb","AI_SITE_START_TYPES","AI_SITE_START_ANSWERS","siteType","audience","example","pages","submissions","welcomeEmail","aiSiteStartExample","answers","find","entry","aiSiteStartRefusal","options","band","freeTaste","trim","length","Number","isInteger","min","max","includes","aiSiteStartBrief","sentences","push","toLowerCase","join","aiSiteStartInputs","businessType","starter","businessName","city","brand","AI_SITE_START_INPUT_KEYS","aiSiteStartInputsOf","inputs","kept","key","value","Object","keys","aiSiteStartAnswersFromInputs","text","Math","round","some"],"mappings":"AAAA;;;;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nC,sBAAsBI,KAAK;IACzH,MAAMyB,UAAUa,KAAK;IACrB,MAAMrC,cAAcqC,KAAK;IACzB,OAAO;QACLzC;QACAC,UAAUwC,KAAK;QACfvC,SAAST,uBAAuBmD,IAAI,CAAC,CAACnC,QAAUA,MAAMf,EAAE,KAAKkC,WAAWA,UAAU;QAClFzB,OAAOuC,KAAKxB,GAAG,CAACN,KAAKO,GAAG,EAAEuB,KAAKvB,GAAG,CAACP,KAAKM,GAAG,EAAEf;QAC7CC,aAAa,AAACb,oBAA0C6B,QAAQ,CAAChB,eAC5DA,cACDL,sBAAsBK,WAAW;QACrCC,cAAcM,QAAQE,SAAS,GAAG,QAAQqB,CAAAA,0BAAAA,MAAQ,CAAC,eAAe,MAAK;IACzE;AACF"}
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/model/ai-site-start.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 {\n AI_SITE_INPUT_MAX_CHARS,\n AI_SITE_SUBMISSIONS,\n aiSitePagesBand,\n type AiSiteJobInputs,\n type AiSiteSubmissions,\n} from './ai-site-job'\n\n/**\n * The guided start (AGL-2918): the questions a person answers on a site they\n * have just made, and the site job those answers become.\n *\n * A scaffold already exists — the `site` job plans four to eight pages, a\n * layout, a contact form, a palette and a welcome email, and builds every one\n * of them as a draft. What it had no way in through was a brief: somebody had\n * to know what to write, on a site where nothing has happened yet. So this\n * module is the QUESTIONS, and nothing else: what is asked, what an answer may\n * be, and how a set of answers becomes the brief and the scalar inputs the\n * `site` door already takes.\n *\n * ── Answering is never the way out ───────────────────────────────────────\n *\n * There is no answer here that means \"not this\". The way past the questions\n * is the `hostFirstRun` zone's own `startBlank`, which is drawn beside them\n * from the first one and creates nothing at all — see the zone in\n * `CONSOLE_WIDGET_SLOTS`. Putting the exit inside the question set would make\n * leaving a thing you answer your way to, and it is not.\n *\n * ── Every answer but the first is optional ───────────────────────────────\n *\n * Only what a site is FOR has no default worth guessing. The audience narrows\n * the copy, the example steers the shape, the page count and the welcome\n * email are defaults a person may change — so a person who types six words\n * and confirms gets a planned site, and the rest of the questions are there\n * for the person who wants to answer them.\n *\n * Pure: shapes, vocabularies and two string builders. No React, no network,\n * and no import of the starter catalog — {@link AI_SITE_START_EXAMPLES} names\n * the starters rather than reading them, so the console does not carry a\n * catalog of node maps to draw five cards. `ai-site-start.spec.ts` holds the\n * two lists to each other.\n */\n\n/** A worked example a person picks to steer what the site should look like. */\nexport interface AiSiteStartExample {\n /** A `STARTER_TEMPLATES` id, which is a persisted identifier. */\n id: string\n /** The starter as its card names it. */\n label: string\n /** The starter's category, which is how the examples group. */\n category: string\n /** What the example is, in one line a person reads before picking it. */\n blurb: string\n}\n\n/**\n * The examples the start offers, in the order they are shown. The platform's\n * own starter sites: a person who has no words for what they want has seen\n * these five shapes before, and picking one says more than a sentence would.\n */\nexport const AI_SITE_START_EXAMPLES: readonly AiSiteStartExample[] = [\n {\n id: 'business',\n label: 'Business',\n category: 'Business',\n blurb: 'A home page led by what you do, an about page and a contact page',\n },\n {\n id: 'landing',\n label: 'Landing Page',\n category: 'Marketing',\n blurb: 'One page that leads to one action, with the reasons to take it',\n },\n {\n id: 'portfolio',\n label: 'Portfolio',\n category: 'Personal',\n blurb: 'An introduction, a grid of work and a way to get in touch',\n },\n {\n id: 'physical-shop',\n label: 'Shop (physical products)',\n category: 'Commerce',\n blurb: 'Featured products, a shop to browse, and a cart',\n },\n {\n id: 'digital-shop',\n label: 'Shop (digital products)',\n category: 'Commerce',\n blurb: 'Downloads up front, a shop to browse, and a cart',\n },\n]\n\n/**\n * Kinds of site offered beside the first question's box, so answering it can\n * be a tap. They fill the box rather than replacing it: what somebody is\n * building is theirs to say, and a list of eight is a list somebody is not on.\n */\nexport const AI_SITE_START_TYPES: readonly string[] = [\n 'a local service business',\n 'a restaurant or cafe',\n 'a professional practice',\n 'a trades business',\n 'a shop',\n 'a nonprofit',\n 'a personal portfolio',\n 'an event',\n]\n\n/** What a person answered; the shape the card holds and the brief is built from. */\nexport interface AiSiteStartAnswers {\n /** What kind of site this is. The one answer with no default. */\n siteType: string\n /** Who the site is for; empty when they did not say. */\n audience: string\n /** The example they liked, by {@link AiSiteStartExample.id}; `null` for none. */\n example: string | null\n /** How many pages to plan. */\n pages: number\n /** Where the contact form's submissions go. */\n submissions: AiSiteSubmissions\n /** Whether the scaffold also drafts a welcome email. */\n welcomeEmail: boolean\n}\n\n/**\n * What the questions start on. Five pages because it is the middle of the\n * band the scaffold builds, a welcome email because the scaffold drafts one\n * unless it is told not to, and the Inbox because it is what every submission\n * does anyway — filing a lead as well is the addition, and an addition is the\n * thing a person should have to choose.\n */\nexport const AI_SITE_START_ANSWERS: AiSiteStartAnswers = {\n siteType: '',\n audience: '',\n example: null,\n pages: 5,\n submissions: 'inbox',\n welcomeEmail: true,\n}\n\n/** The example an answer names, or `null` when it names none this list knows. */\nexport function aiSiteStartExample(\n answers: AiSiteStartAnswers,\n): AiSiteStartExample | null {\n if (!answers.example) return null\n return AI_SITE_START_EXAMPLES.find((entry) => entry.id === answers.example) ?? null\n}\n\n/**\n * Why these answers cannot start a site, in a sentence a person reads; `null`\n * when they can. The door's own parser is what actually admits the job — this\n * is what the card says before it asks for one.\n */\nexport function aiSiteStartRefusal(\n answers: AiSiteStartAnswers,\n options: { freeTaste?: boolean } = {},\n): string | null {\n // The workspace's own band (AGL-3594): one or two pages on the Free taste.\n const band = aiSitePagesBand(options.freeTaste)\n const siteType = answers.siteType.trim()\n if (!siteType) return 'Say what kind of site this is.'\n if (siteType.length > AI_SITE_INPUT_MAX_CHARS) {\n return `Keep what kind of site this is under ${AI_SITE_INPUT_MAX_CHARS} characters.`\n }\n if (answers.audience.trim().length > AI_SITE_INPUT_MAX_CHARS) {\n return `Keep who the site is for under ${AI_SITE_INPUT_MAX_CHARS} characters.`\n }\n if (!Number.isInteger(answers.pages) || answers.pages < band.min || answers.pages > band.max) {\n return `A site is planned with ${band.min} to ${band.max} pages.`\n }\n if (answers.example !== null && !aiSiteStartExample(answers)) {\n return 'Pick one of the examples, or none of them.'\n }\n if (!(AI_SITE_SUBMISSIONS as readonly string[]).includes(answers.submissions)) {\n return 'Say where the contact form’s submissions go.'\n }\n return null\n}\n\n/**\n * The answers as the brief the `site` job is created with: the plan step reads\n * it as the person's own words, so it says what they said and asks for nothing\n * they did not.\n */\nexport function aiSiteStartBrief(answers: AiSiteStartAnswers): string {\n const siteType = answers.siteType.trim()\n const audience = answers.audience.trim()\n const example = aiSiteStartExample(answers)\n const sentences = [\n `A ${answers.pages}-page website for ${siteType}.`,\n ]\n if (audience) sentences.push(`It is for ${audience}.`)\n if (example) {\n sentences.push(\n `Follow the shape of the ${example.label} starter: ${example.blurb.toLowerCase()}.`,\n )\n }\n sentences.push(\n 'Plan a page for each thing a visitor comes to do, and a contact form on the page that asks to be contacted.',\n )\n if (audience) {\n // Said of the FORM as well as of the copy: who fills a form in is what\n // decides which fields it asks for, and a brief that named the audience\n // once, in a sentence about the pages, left the form to guess.\n sentences.push(`Ask the contact form for what ${audience} would be asked for.`)\n }\n return sentences.join(' ')\n}\n\n/**\n * The answers as the `site` job's scalar inputs. Read by the door's\n * {@link parseAiSiteJobInputs}, and put in front of the model one per line by\n * the plan step, which is how the audience and the example reach the plan\n * without a prompt of their own.\n *\n * The per-site variables an agency batch fills — the business name, the city,\n * the brand — are left empty here: the questions never ask them. The name is\n * the site's own, and the create door fills it from the site\n * (`aiJobAdmittedInputs`, AGL-3596) when the job is started — a job that\n * reached the model with no name had the model invent one for its header and\n * footer.\n */\nexport function aiSiteStartInputs(\n answers: AiSiteStartAnswers,\n): Omit<AiSiteJobInputs, 'batchId'> {\n const example = aiSiteStartExample(answers)\n return {\n businessType: answers.siteType.trim(),\n audience: answers.audience.trim(),\n starter: example?.id ?? '',\n pages: answers.pages,\n businessName: '',\n city: '',\n brand: '',\n submissions: answers.submissions,\n welcomeEmail: answers.welcomeEmail,\n }\n}\n\n/** The site inputs a guided start's answers become, by name: what a summary carries back (AGL-3596). */\nexport const AI_SITE_START_INPUT_KEYS = [\n 'businessType',\n 'audience',\n 'starter',\n 'pages',\n 'businessName',\n 'city',\n 'brand',\n 'submissions',\n 'welcomeEmail',\n] as const\n\n/** A site job's scalar inputs, and nothing else its inputs carry; `null` when it has none. */\nexport function aiSiteStartInputsOf(\n inputs: Readonly<Record<string, unknown>> | null | undefined,\n): Record<string, unknown> | null {\n if (!inputs) return null\n const kept: Record<string, unknown> = {}\n for (const key of AI_SITE_START_INPUT_KEYS) {\n const value = inputs[key]\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') kept[key] = value\n }\n return Object.keys(kept).length ? kept : null\n}\n\n/**\n * A failed start's answers, back as the questions hold them (AGL-3596), so\n * Try again reopens the guided start filled in for the person to adjust:\n * the inverse of {@link aiSiteStartInputs}. Read defensively — an answer the\n * questions no longer offer goes back to its default — and held to the\n * workspace's page band. `null` when the inputs say no kind of site at all.\n */\nexport function aiSiteStartAnswersFromInputs(\n inputs: Readonly<Record<string, unknown>> | null | undefined,\n options: { freeTaste?: boolean } = {},\n): AiSiteStartAnswers | null {\n const text = (key: string) => (typeof inputs?.[key] === 'string' ? (inputs[key] as string).trim() : '')\n const siteType = text('businessType')\n if (!siteType) return null\n const band = aiSitePagesBand(options.freeTaste)\n const pages = typeof inputs?.['pages'] === 'number' ? Math.round(inputs['pages'] as number) : AI_SITE_START_ANSWERS.pages\n const starter = text('starter')\n const submissions = text('submissions')\n return {\n siteType,\n audience: text('audience'),\n example: AI_SITE_START_EXAMPLES.some((entry) => entry.id === starter) ? starter : null,\n pages: Math.min(band.max, Math.max(band.min, pages)),\n submissions: (AI_SITE_SUBMISSIONS as readonly string[]).includes(submissions)\n ? (submissions as AiSiteSubmissions)\n : AI_SITE_START_ANSWERS.submissions,\n welcomeEmail: options.freeTaste ? false : inputs?.['welcomeEmail'] !== false,\n }\n}\n"],"names":["AI_SITE_INPUT_MAX_CHARS","AI_SITE_SUBMISSIONS","aiSitePagesBand","AI_SITE_START_EXAMPLES","id","label","category","blurb","AI_SITE_START_TYPES","AI_SITE_START_ANSWERS","siteType","audience","example","pages","submissions","welcomeEmail","aiSiteStartExample","answers","find","entry","aiSiteStartRefusal","options","band","freeTaste","trim","length","Number","isInteger","min","max","includes","aiSiteStartBrief","sentences","push","toLowerCase","join","aiSiteStartInputs","businessType","starter","businessName","city","brand","AI_SITE_START_INPUT_KEYS","aiSiteStartInputsOf","inputs","kept","key","value","Object","keys","aiSiteStartAnswersFromInputs","text","Math","round","some"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,uBAAuB,EACvBC,mBAAmB,EACnBC,eAAe,QAGV,mBAAe;AAiDtB;;;;CAIC,GACD,OAAO,MAAMC,yBAAwD;IACnE;QACEC,IAAI;QACJC,OAAO;QACPC,UAAU;QACVC,OAAO;IACT;IACA;QACEH,IAAI;QACJC,OAAO;QACPC,UAAU;QACVC,OAAO;IACT;IACA;QACEH,IAAI;QACJC,OAAO;QACPC,UAAU;QACVC,OAAO;IACT;IACA;QACEH,IAAI;QACJC,OAAO;QACPC,UAAU;QACVC,OAAO;IACT;IACA;QACEH,IAAI;QACJC,OAAO;QACPC,UAAU;QACVC,OAAO;IACT;CACD,CAAA;AAED;;;;CAIC,GACD,OAAO,MAAMC,sBAAyC;IACpD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAA;AAkBD;;;;;;CAMC,GACD,OAAO,MAAMC,wBAA4C;IACvDC,UAAU;IACVC,UAAU;IACVC,SAAS;IACTC,OAAO;IACPC,aAAa;IACbC,cAAc;AAChB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QACzB,IAAI,OAAOC,UAAU,YAAY,OAAOA,UAAU,YAAY,OAAOA,UAAU,WAAWF,IAAI,CAACC,IAAI,GAAGC;IACxG;IACA,OAAOC,OAAOC,IAAI,CAACJ,MAAMpB,MAAM,GAAGoB,OAAO;AAC3C;AAEA;;;;;;CAMC,GACD,OAAO,SAASK,6BACdN,MAA4D,EAC5DvB,UAAmC,CAAC,CAAC;IAErC,MAAM8B,OAAO,CAACL,MAAiB,QAAOF,0BAAAA,MAAQ,CAACE,IAAI,MAAK,WAAW,AAACF,MAAM,CAACE,IAAI,CAAYtB,IAAI,KAAK;IACpG,MAAMd,WAAWyC,KAAK;IACtB,IAAI,CAACzC,UAAU,OAAO;IACtB,MAAMY,OAAOpB,gBAAgBmB,QAAQE,SAAS;IAC9C,MAAMV,QAAQ,QAAO+B,0BAAAA,MAAQ,CAAC,QAAQ,MAAK,WAAWQ,KAAKC,KAAK,CAACT,MAAM,CAAC,QAAQ,IAAcnC,sBAAsBI,KAAK;IACzH,MAAMyB,UAAUa,KAAK;IACrB,MAAMrC,cAAcqC,KAAK;IACzB,OAAO;QACLzC;QACAC,UAAUwC,KAAK;QACfvC,SAAST,uBAAuBmD,IAAI,CAAC,CAACnC,QAAUA,MAAMf,EAAE,KAAKkC,WAAWA,UAAU;QAClFzB,OAAOuC,KAAKxB,GAAG,CAACN,KAAKO,GAAG,EAAEuB,KAAKvB,GAAG,CAACP,KAAKM,GAAG,EAAEf;QAC7CC,aAAa,AAACb,oBAA0C6B,QAAQ,CAAChB,eAC5DA,cACDL,sBAAsBK,WAAW;QACrCC,cAAcM,QAAQE,SAAS,GAAG,QAAQqB,CAAAA,0BAAAA,MAAQ,CAAC,eAAe,MAAK;IACzE;AACF"}
package/src/lib/plugin.js CHANGED
@@ -14,55 +14,87 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */ import { PLATFORM_BRAND_NAME, registerConsoleExtension } from "@aglyn/aglyn";
17
- import { AiCollaboratorPermissionsCell } from "./components/ai-collaborator-permissions-column.component.js";
18
- import { AiSaveAsComponent } from "./components/ai-save-as-component.component.js";
19
- import { AiGenerateSectionControl, AiRewriteControl } from "./components/besigner-ai-controls.component.js";
20
- import { AiAssistProviderOnHost, AssistPanelOnHost } from "./components/ai-permissions-on-host.component.js";
21
- import AiCreditsCard from "./components/ai-credits-card.component.js";
22
- import AiJobsTopBarIndicator from "./components/ai-jobs-indicator.component.js";
23
- import { AiCollaboratorCreditsCell, AiCollaboratorCreditsHeader, AiMemberCreditsCell, AiMemberCreditsHeader } from "./components/ai-credits-columns.component.js";
24
- import { AssistSignalsPage } from "./components/assist-signals-page.component.js";
25
- import BillingAssistOverageCard from "./components/billing-assist-overage-card.component.js";
26
- import { AiTopUsersCard } from "./components/billing-ai-top-users.component.js";
27
- import { AiAllotmentsCard } from "./components/billing-ai-allotments.component.js";
28
- import { AiCollaboratorAllotmentCell, AiCollaboratorAllotmentHeader, AiSiteAllotmentCard } from "./components/host-ai-allotments.component.js";
29
- import MemberAiAllotmentCard from "./components/member-ai-allotment-card.component.js";
30
- import MemberAiUsageCard from "./components/member-ai-usage-card.component.js";
31
- import AiThemeProposalCard from "./components/ai-theme-proposal-card.component.js";
32
- import StaffOrgAiCard from "./components/staff-org-ai-card.component.js";
33
- import { StaffOrgUsageAiCreditsCell, StaffOrgUsageAiOverageCell, StaffOrgUsageAiPool, StaffOrgUsageAssistCell } from "./components/staff-org-usage-ai-columns.component.js";
34
- import { StaffOrgsAiSpendCell, StaffOrgsAiSpendHeader } from "./components/staff-orgs-ai-spend-column.component.js";
35
- import StaffUserAiUsageCard from "./components/staff-user-ai-usage-card.component.js";
36
- import AiSeoAuditCard from "./components/ai-seo-audit-card.component.js";
37
- import AiSiteBatchCard from "./components/ai-site-batch-card.component.js";
38
- import AiSiteSeoStartCard from "./components/ai-site-seo-start-card.component.js";
39
- import AiSiteStartCard from "./components/ai-site-start-card.component.js";
40
- import AiSeoFieldsCard from "./components/ai-seo-fields-card.component.js";
41
- import AiDescribeAutomationButton from "./components/ai-describe-automation.component.js";
42
- import AiReviseAutomation from "./components/ai-revise-automation.component.js";
43
- import AiDescribeOrgAutomationButton from "./components/ai-describe-org-automation.component.js";
44
- import { AiInsightHostCard, AiInsightOrgCard } from "./components/ai-insight-card.component.js";
45
- import { AiLogicCreateButton, AiLogicFixReference, AiLogicFunctionTools } from "./components/ai-logic.component.js";
46
- import { AiFunnelAskButton, AiFunnelCreateButton } from "./components/ai-funnel-zones.component.js";
47
- import AiCrmEmailDraft from "./components/ai-crm-email-draft.component.js";
48
- import AiCrmImportMapping from "./components/ai-crm-import-mapping.component.js";
49
- import AiCrmRecordCard from "./components/ai-crm-record-card.component.js";
50
- import AiDescribePageButton from "./components/ai-describe-page.component.js";
51
- import AiMediaCreateButton from "./components/ai-media-create.component.js";
52
- import { AiDescribeComponentButton, AiDescribeFormButton, AiDescribeLayoutButton, AiDescribeTemplateButton } from "./components/ai-describe-button.component.js";
53
- import { AiDescribeEmailButton } from "./components/ai-describe-email.component.js";
54
- import { AiExperimentResultCard, AiExperimentVariantsCard } from "./components/ai-experiment-cards.component.js";
55
- import { AiExplainAutomation, AiExplainRunFailure } from "./components/ai-explain-automation.component.js";
56
- import AiCreateCampaignButton from "./components/ai-campaign-create.component.js";
57
- import AiMarketingInsightButton from "./components/ai-marketing-insight.component.js";
58
- import { AiCreateOverlayButton, AiOverlayEditorCard } from "./components/ai-overlay-cards.component.js";
59
- import AiProductCopyCard from "./components/ai-product-copy-card.component.js";
60
- import AiProductImportOption from "./components/ai-product-import-option.component.js";
61
- import AiProductsHubCard from "./components/ai-products-hub-card.component.js";
62
- import AiCreateProductsButton from "./components/ai-products-create-button.component.js";
63
- import AiJobsPage from "./components/ai-jobs-page.component.js";
17
+ import { LinearProgress } from "@mui/material";
18
+ import { createElement } from "react";
19
+ import { AiAssistProviderOnHost } from "./components/ai-assist-provider-on-host.component.js";
64
20
  import { AI_PLUGIN_ID } from "./constants.js";
65
21
  import { registerAiDeclarations } from "./declarations.js";
22
+ import { lazyWidget } from "./lazy-widget.js";
23
+ /*
24
+ * Every component below is registered by name and loaded the first time the
25
+ * shell draws it (AGL-3649); see `lazyWidget`. The console loads this plugin
26
+ * on every screen, so a static import of a component here is downloaded by
27
+ * every reader of every page, staff cards included.
28
+ */ /** What a page shows while its code arrives. */ const PAGE_LOADING = createElement(LinearProgress, {
29
+ 'aria-label': 'Loading'
30
+ });
31
+ const AiCollaboratorPermissionsCell = lazyWidget('AiCollaboratorPermissionsCell', ()=>import("./components/ai-collaborator-permissions-column.component.js").then((m)=>m.AiCollaboratorPermissionsCell));
32
+ const AiSaveAsComponent = lazyWidget('AiSaveAsComponent', ()=>import("./components/ai-save-as-component.component.js").then((m)=>m.AiSaveAsComponent));
33
+ const AiGenerateSectionControl = lazyWidget('AiGenerateSectionControl', ()=>import("./components/besigner-ai-controls.component.js").then((m)=>m.AiGenerateSectionControl));
34
+ const AiRewriteControl = lazyWidget('AiRewriteControl', ()=>import("./components/besigner-ai-controls.component.js").then((m)=>m.AiRewriteControl));
35
+ const AssistPanelOnHost = lazyWidget('AssistPanelOnHost', ()=>import("./components/ai-permissions-on-host.component.js").then((m)=>m.AssistPanelOnHost));
36
+ const AiCreditsCard = lazyWidget('AiCreditsCard', ()=>import("./components/ai-credits-card.component.js").then((m)=>m.default));
37
+ const AiJobsTopBarIndicator = lazyWidget('AiJobsTopBarIndicator', ()=>import("./components/ai-jobs-indicator.component.js").then((m)=>m.default));
38
+ const AiCollaboratorCreditsCell = lazyWidget('AiCollaboratorCreditsCell', ()=>import("./components/ai-credits-columns.component.js").then((m)=>m.AiCollaboratorCreditsCell));
39
+ const AiCollaboratorCreditsHeader = lazyWidget('AiCollaboratorCreditsHeader', ()=>import("./components/ai-credits-columns.component.js").then((m)=>m.AiCollaboratorCreditsHeader));
40
+ const AiMemberCreditsCell = lazyWidget('AiMemberCreditsCell', ()=>import("./components/ai-credits-columns.component.js").then((m)=>m.AiMemberCreditsCell));
41
+ const AiMemberCreditsHeader = lazyWidget('AiMemberCreditsHeader', ()=>import("./components/ai-credits-columns.component.js").then((m)=>m.AiMemberCreditsHeader));
42
+ const AssistSignalsPage = lazyWidget('AssistSignalsPage', ()=>import("./components/assist-signals-page.component.js").then((m)=>m.AssistSignalsPage), PAGE_LOADING);
43
+ const BillingAssistOverageCard = lazyWidget('BillingAssistOverageCard', ()=>import("./components/billing-assist-overage-card.component.js").then((m)=>m.default));
44
+ const AiTopUsersCard = lazyWidget('AiTopUsersCard', ()=>import("./components/billing-ai-top-users.component.js").then((m)=>m.AiTopUsersCard));
45
+ const AiAllotmentsCard = lazyWidget('AiAllotmentsCard', ()=>import("./components/billing-ai-allotments.component.js").then((m)=>m.AiAllotmentsCard));
46
+ const AiCollaboratorAllotmentCell = lazyWidget('AiCollaboratorAllotmentCell', ()=>import("./components/host-ai-allotments.component.js").then((m)=>m.AiCollaboratorAllotmentCell));
47
+ const AiCollaboratorAllotmentHeader = lazyWidget('AiCollaboratorAllotmentHeader', ()=>import("./components/host-ai-allotments.component.js").then((m)=>m.AiCollaboratorAllotmentHeader));
48
+ const AiSiteAllotmentCard = lazyWidget('AiSiteAllotmentCard', ()=>import("./components/host-ai-allotments.component.js").then((m)=>m.AiSiteAllotmentCard));
49
+ const MemberAiAllotmentCard = lazyWidget('MemberAiAllotmentCard', ()=>import("./components/member-ai-allotment-card.component.js").then((m)=>m.default));
50
+ const MemberAiUsageCard = lazyWidget('MemberAiUsageCard', ()=>import("./components/member-ai-usage-card.component.js").then((m)=>m.default));
51
+ const AiThemeProposalCard = lazyWidget('AiThemeProposalCard', ()=>import("./components/ai-theme-proposal-card.component.js").then((m)=>m.default));
52
+ const StaffOrgAiCard = lazyWidget('StaffOrgAiCard', ()=>import("./components/staff-org-ai-card.component.js").then((m)=>m.default));
53
+ const StaffOrgUsageAiCreditsCell = lazyWidget('StaffOrgUsageAiCreditsCell', ()=>import("./components/staff-org-usage-ai-columns.component.js").then((m)=>m.StaffOrgUsageAiCreditsCell));
54
+ const StaffOrgUsageAiOverageCell = lazyWidget('StaffOrgUsageAiOverageCell', ()=>import("./components/staff-org-usage-ai-columns.component.js").then((m)=>m.StaffOrgUsageAiOverageCell));
55
+ const StaffOrgUsageAiPool = lazyWidget('StaffOrgUsageAiPool', ()=>import("./components/staff-org-usage-ai-columns.component.js").then((m)=>m.StaffOrgUsageAiPool));
56
+ const StaffOrgUsageAssistCell = lazyWidget('StaffOrgUsageAssistCell', ()=>import("./components/staff-org-usage-ai-columns.component.js").then((m)=>m.StaffOrgUsageAssistCell));
57
+ const StaffOrgsAiSpendCell = lazyWidget('StaffOrgsAiSpendCell', ()=>import("./components/staff-orgs-ai-spend-column.component.js").then((m)=>m.StaffOrgsAiSpendCell));
58
+ const StaffOrgsAiSpendHeader = lazyWidget('StaffOrgsAiSpendHeader', ()=>import("./components/staff-orgs-ai-spend-column.component.js").then((m)=>m.StaffOrgsAiSpendHeader));
59
+ const StaffUserAiUsageCard = lazyWidget('StaffUserAiUsageCard', ()=>import("./components/staff-user-ai-usage-card.component.js").then((m)=>m.default));
60
+ const AiSeoAuditCard = lazyWidget('AiSeoAuditCard', ()=>import("./components/ai-seo-audit-card.component.js").then((m)=>m.default));
61
+ const AiSiteBatchCard = lazyWidget('AiSiteBatchCard', ()=>import("./components/ai-site-batch-card.component.js").then((m)=>m.default));
62
+ const AiSiteSeoStartCard = lazyWidget('AiSiteSeoStartCard', ()=>import("./components/ai-site-seo-start-card.component.js").then((m)=>m.default));
63
+ const AiSiteStartCard = lazyWidget('AiSiteStartCard', ()=>import("./components/ai-site-start-card.component.js").then((m)=>m.default));
64
+ const AiSeoFieldsCard = lazyWidget('AiSeoFieldsCard', ()=>import("./components/ai-seo-fields-card.component.js").then((m)=>m.default));
65
+ const AiDescribeAutomationButton = lazyWidget('AiDescribeAutomationButton', ()=>import("./components/ai-describe-automation.component.js").then((m)=>m.default));
66
+ const AiReviseAutomation = lazyWidget('AiReviseAutomation', ()=>import("./components/ai-revise-automation.component.js").then((m)=>m.default));
67
+ const AiDescribeOrgAutomationButton = lazyWidget('AiDescribeOrgAutomationButton', ()=>import("./components/ai-describe-org-automation.component.js").then((m)=>m.default));
68
+ const AiInsightHostCard = lazyWidget('AiInsightHostCard', ()=>import("./components/ai-insight-card.component.js").then((m)=>m.AiInsightHostCard));
69
+ const AiInsightOrgCard = lazyWidget('AiInsightOrgCard', ()=>import("./components/ai-insight-card.component.js").then((m)=>m.AiInsightOrgCard));
70
+ const AiLogicCreateButton = lazyWidget('AiLogicCreateButton', ()=>import("./components/ai-logic.component.js").then((m)=>m.AiLogicCreateButton));
71
+ const AiLogicFixReference = lazyWidget('AiLogicFixReference', ()=>import("./components/ai-logic.component.js").then((m)=>m.AiLogicFixReference));
72
+ const AiLogicFunctionTools = lazyWidget('AiLogicFunctionTools', ()=>import("./components/ai-logic.component.js").then((m)=>m.AiLogicFunctionTools));
73
+ const AiFunnelAskButton = lazyWidget('AiFunnelAskButton', ()=>import("./components/ai-funnel-zones.component.js").then((m)=>m.AiFunnelAskButton));
74
+ const AiFunnelCreateButton = lazyWidget('AiFunnelCreateButton', ()=>import("./components/ai-funnel-zones.component.js").then((m)=>m.AiFunnelCreateButton));
75
+ const AiCrmEmailDraft = lazyWidget('AiCrmEmailDraft', ()=>import("./components/ai-crm-email-draft.component.js").then((m)=>m.default));
76
+ const AiCrmImportMapping = lazyWidget('AiCrmImportMapping', ()=>import("./components/ai-crm-import-mapping.component.js").then((m)=>m.default));
77
+ const AiCrmRecordCard = lazyWidget('AiCrmRecordCard', ()=>import("./components/ai-crm-record-card.component.js").then((m)=>m.default));
78
+ const AiDescribePageButton = lazyWidget('AiDescribePageButton', ()=>import("./components/ai-describe-page.component.js").then((m)=>m.default));
79
+ const AiMediaCreateButton = lazyWidget('AiMediaCreateButton', ()=>import("./components/ai-media-create.component.js").then((m)=>m.default));
80
+ const AiDescribeComponentButton = lazyWidget('AiDescribeComponentButton', ()=>import("./components/ai-describe-button.component.js").then((m)=>m.AiDescribeComponentButton));
81
+ const AiDescribeFormButton = lazyWidget('AiDescribeFormButton', ()=>import("./components/ai-describe-button.component.js").then((m)=>m.AiDescribeFormButton));
82
+ const AiDescribeLayoutButton = lazyWidget('AiDescribeLayoutButton', ()=>import("./components/ai-describe-button.component.js").then((m)=>m.AiDescribeLayoutButton));
83
+ const AiDescribeTemplateButton = lazyWidget('AiDescribeTemplateButton', ()=>import("./components/ai-describe-button.component.js").then((m)=>m.AiDescribeTemplateButton));
84
+ const AiDescribeEmailButton = lazyWidget('AiDescribeEmailButton', ()=>import("./components/ai-describe-email.component.js").then((m)=>m.AiDescribeEmailButton));
85
+ const AiExperimentResultCard = lazyWidget('AiExperimentResultCard', ()=>import("./components/ai-experiment-cards.component.js").then((m)=>m.AiExperimentResultCard));
86
+ const AiExperimentVariantsCard = lazyWidget('AiExperimentVariantsCard', ()=>import("./components/ai-experiment-cards.component.js").then((m)=>m.AiExperimentVariantsCard));
87
+ const AiExplainAutomation = lazyWidget('AiExplainAutomation', ()=>import("./components/ai-explain-automation.component.js").then((m)=>m.AiExplainAutomation));
88
+ const AiExplainRunFailure = lazyWidget('AiExplainRunFailure', ()=>import("./components/ai-explain-automation.component.js").then((m)=>m.AiExplainRunFailure));
89
+ const AiCreateCampaignButton = lazyWidget('AiCreateCampaignButton', ()=>import("./components/ai-campaign-create.component.js").then((m)=>m.default));
90
+ const AiMarketingInsightButton = lazyWidget('AiMarketingInsightButton', ()=>import("./components/ai-marketing-insight.component.js").then((m)=>m.default));
91
+ const AiCreateOverlayButton = lazyWidget('AiCreateOverlayButton', ()=>import("./components/ai-overlay-cards.component.js").then((m)=>m.AiCreateOverlayButton));
92
+ const AiOverlayEditorCard = lazyWidget('AiOverlayEditorCard', ()=>import("./components/ai-overlay-cards.component.js").then((m)=>m.AiOverlayEditorCard));
93
+ const AiProductCopyCard = lazyWidget('AiProductCopyCard', ()=>import("./components/ai-product-copy-card.component.js").then((m)=>m.default));
94
+ const AiProductImportOption = lazyWidget('AiProductImportOption', ()=>import("./components/ai-product-import-option.component.js").then((m)=>m.default));
95
+ const AiProductsHubCard = lazyWidget('AiProductsHubCard', ()=>import("./components/ai-products-hub-card.component.js").then((m)=>m.default));
96
+ const AiCreateProductsButton = lazyWidget('AiCreateProductsButton', ()=>import("./components/ai-products-create-button.component.js").then((m)=>m.default));
97
+ const AiJobsPage = lazyWidget('AiJobsPage', ()=>import("./components/ai-jobs-page.component.js").then((m)=>m.default), PAGE_LOADING);
66
98
  /**
67
99
  * The Aglyn AI plugin's console half (AGL-2939): the assistant dock, the
68
100
  * besigner copy assistant's provider, the billing, member and staff cards,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../libs/plugins/ai/src/lib/plugin.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 { PLATFORM_BRAND_NAME, registerConsoleExtension } from '@aglyn/aglyn'\nimport { AiCollaboratorPermissionsCell } from './components/ai-collaborator-permissions-column.component'\nimport { AiSaveAsComponent } from './components/ai-save-as-component.component'\nimport {\n AiGenerateSectionControl,\n AiRewriteControl,\n} from './components/besigner-ai-controls.component'\nimport {\n AiAssistProviderOnHost,\n AssistPanelOnHost,\n} from './components/ai-permissions-on-host.component'\nimport AiCreditsCard from './components/ai-credits-card.component'\nimport AiJobsTopBarIndicator from './components/ai-jobs-indicator.component'\nimport {\n AiCollaboratorCreditsCell,\n AiCollaboratorCreditsHeader,\n AiMemberCreditsCell,\n AiMemberCreditsHeader,\n} from './components/ai-credits-columns.component'\nimport { AssistSignalsPage } from './components/assist-signals-page.component'\nimport BillingAssistOverageCard from './components/billing-assist-overage-card.component'\nimport { AiTopUsersCard } from './components/billing-ai-top-users.component'\nimport { AiAllotmentsCard } from './components/billing-ai-allotments.component'\nimport {\n AiCollaboratorAllotmentCell,\n AiCollaboratorAllotmentHeader,\n AiSiteAllotmentCard,\n} from './components/host-ai-allotments.component'\nimport MemberAiAllotmentCard from './components/member-ai-allotment-card.component'\nimport MemberAiUsageCard from './components/member-ai-usage-card.component'\nimport AiThemeProposalCard from './components/ai-theme-proposal-card.component'\nimport StaffOrgAiCard from './components/staff-org-ai-card.component'\nimport {\n StaffOrgUsageAiCreditsCell,\n StaffOrgUsageAiOverageCell,\n StaffOrgUsageAiPool,\n StaffOrgUsageAssistCell,\n} from './components/staff-org-usage-ai-columns.component'\nimport {\n StaffOrgsAiSpendCell,\n StaffOrgsAiSpendHeader,\n} from './components/staff-orgs-ai-spend-column.component'\nimport StaffUserAiUsageCard from './components/staff-user-ai-usage-card.component'\nimport AiSeoAuditCard from './components/ai-seo-audit-card.component'\nimport AiSiteBatchCard from './components/ai-site-batch-card.component'\nimport AiSiteSeoStartCard from './components/ai-site-seo-start-card.component'\nimport AiSiteStartCard from './components/ai-site-start-card.component'\nimport AiSeoFieldsCard from './components/ai-seo-fields-card.component'\nimport AiDescribeAutomationButton from './components/ai-describe-automation.component'\nimport AiReviseAutomation from './components/ai-revise-automation.component'\nimport AiDescribeOrgAutomationButton from './components/ai-describe-org-automation.component'\nimport { AiInsightHostCard, AiInsightOrgCard } from './components/ai-insight-card.component'\nimport {\n AiLogicCreateButton,\n AiLogicFixReference,\n AiLogicFunctionTools,\n} from './components/ai-logic.component'\nimport { AiFunnelAskButton, AiFunnelCreateButton } from './components/ai-funnel-zones.component'\nimport AiCrmEmailDraft from './components/ai-crm-email-draft.component'\nimport AiCrmImportMapping from './components/ai-crm-import-mapping.component'\nimport AiCrmRecordCard from './components/ai-crm-record-card.component'\nimport AiDescribePageButton from './components/ai-describe-page.component'\nimport AiMediaCreateButton from './components/ai-media-create.component'\nimport {\n AiDescribeComponentButton,\n AiDescribeFormButton,\n AiDescribeLayoutButton,\n AiDescribeTemplateButton,\n} from './components/ai-describe-button.component'\nimport { AiDescribeEmailButton } from './components/ai-describe-email.component'\nimport {\n AiExperimentResultCard,\n AiExperimentVariantsCard,\n} from './components/ai-experiment-cards.component'\nimport {\n AiExplainAutomation,\n AiExplainRunFailure,\n} from './components/ai-explain-automation.component'\nimport AiCreateCampaignButton from './components/ai-campaign-create.component'\nimport AiMarketingInsightButton from './components/ai-marketing-insight.component'\nimport {\n AiCreateOverlayButton,\n AiOverlayEditorCard,\n} from './components/ai-overlay-cards.component'\nimport AiProductCopyCard from './components/ai-product-copy-card.component'\nimport AiProductImportOption from './components/ai-product-import-option.component'\nimport AiProductsHubCard from './components/ai-products-hub-card.component'\nimport AiCreateProductsButton from './components/ai-products-create-button.component'\nimport AiJobsPage from './components/ai-jobs-page.component'\nimport { AI_PLUGIN_ID } from './constants'\nimport { registerAiDeclarations } from './declarations'\n\n/**\n * The Aglyn AI plugin's console half (AGL-2939): the assistant dock, the\n * besigner copy assistant's provider, the billing, member and staff cards,\n * the member tables' credit columns and the Assist signal staff page — each\n * mounted through a shell-owned zone (AGL-2940) or the staff area's generic\n * route, so no console page imports this plugin.\n *\n * No `featureFlag` on the extension: the plugin's doors are gated one by\n * one — the dock reads the `release_assist` verdict the shell hands it, the\n * generative doors answer 404 behind `release_ai_generative`, the billing\n * cards render only where the plan sells a band — and a flag here would\n * switch off the released doors with the unreleased ones.\n */\nexport function registerAiConsole(): void {\n registerAiDeclarations()\n registerConsoleExtension({\n pluginId: AI_PLUGIN_ID,\n displayName: 'AI',\n // The besigner copy assistant (AGL-89/419): mounted by the shell around\n // every console page, and opened by this plugin's besigner controls.\n providers: [AiAssistProviderOnHost],\n // The Assist docs-gap and cost board (AGL-1860, AGL-2252), at the staff\n // URL and under the tab it has always had.\n staffPages: [\n {\n id: 'assist-signals',\n label: 'Assist signal',\n header: {\n // The configured brand, not ours (AGL-2153/2260): a white-label\n // deployment and a self-host operator both read this header.\n title: `${PLATFORM_BRAND_NAME} Assist Signal`,\n docsTopic: 'assistSignals',\n },\n Component: AssistSignalsPage,\n },\n ],\n // A site's AI jobs (AGL-3596), an address under the site and no tab:\n // `/ai-jobs` lists them, and `/ai-jobs/{jobId}` is one job's page —\n // \"Building your site\" (AGL-3594), where the guided start lands a person\n // and where a site job's notification opens. The `href` is a literal,\n // `AI_SITE_BUILD_HREF`'s value, because the tab-title manifest is read\n // from this source (`ai-jobs-page.spec.tsx` holds the two equal).\n navItems: [\n {\n label: 'AI jobs',\n href: '/ai-jobs',\n recordTitle: 'Building your site',\n header: { title: 'AI jobs', docsTopic: 'howAglynAiBuilds', docsAnchor: '#finding-your-ai-jobs' },\n unlisted: true,\n ownsSubtree: true,\n permission: 'ai.generate',\n Component: AiJobsPage,\n },\n ],\n widgets: [\n {\n slot: 'consoleDock',\n widgetId: 'ai-assist-dock',\n title: 'Assistant',\n Component: AssistPanelOnHost,\n },\n // The AI jobs indicator (AGL-3593), beside the notifications bell on\n // every page: what the workspace's jobs are doing, and the way to them.\n // Gated as the other generative widgets are; it asks the shell for the\n // release flags of the jobs and of the panel it opens.\n {\n slot: 'consoleTopBar',\n widgetId: 'ai-jobs-indicator',\n title: 'AI jobs',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiJobsTopBarIndicator,\n },\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-credits-meter',\n title: 'AI credits',\n Component: AiCreditsCard,\n },\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-credits-overage',\n title: 'AI credits overage',\n Component: BillingAssistOverageCard,\n },\n // The per-member usage (AGL-2928): who drew the credits the meter\n // counts, on Billing → Usage, on each member's page, on the staff\n // user page, and as a column of both member tables.\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-usage-by-member',\n title: 'Who is generating what',\n permission: 'billing.view',\n Component: AiTopUsersCard,\n },\n // The collaborators table's AI column (AGL-2927): whether each person\n // may open the AI doors on the site, per site, ahead of the columns\n // that report what they drew.\n {\n slot: 'hostMembers',\n widgetId: 'ai-collaborator-permissions',\n title: 'AI',\n column: { header: 'AI' },\n Component: AiCollaboratorPermissionsCell,\n },\n // The copy assistant's besigner controls (AGL-89, AGL-169): Generate a\n // section on every editor's toolbar, and Rewrite with AI under the\n // selected element's fields. Each opens the provider's dialog, and is\n // drawn only while the reader holds the door's permission.\n {\n slot: 'besignerToolbar',\n widgetId: 'ai-generate-section',\n title: 'Generate a section with AI',\n Component: AiGenerateSectionControl,\n },\n {\n slot: 'besignerInspector',\n widgetId: 'ai-rewrite-copy',\n title: 'Rewrite with AI',\n Component: AiRewriteControl,\n },\n // Save the selection as a reusable component (AGL-2908): the component\n // job's second entry point, which proposes the properties a section\n // should declare and applies them as the manual promote does.\n {\n slot: 'besignerInspector',\n widgetId: 'ai-save-as-component',\n title: 'Make a reusable component with AI',\n permission: 'ai.generate',\n Component: AiSaveAsComponent,\n },\n {\n slot: 'orgMember',\n widgetId: 'ai-member-usage',\n title: 'AI usage',\n Component: MemberAiUsageCard,\n },\n // The allotments (AGL-2942): a member's or a site's monthly share of\n // the pool, set on Billing → Usage, on each member's page and on a\n // site's collaborators card — each card asks the route what its\n // reader may see and change.\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-allotments',\n title: 'AI allotments',\n permission: 'billing.view',\n Component: AiAllotmentsCard,\n },\n {\n slot: 'orgMember',\n widgetId: 'ai-member-allotment',\n title: 'AI allotment',\n Component: MemberAiAllotmentCard,\n },\n {\n slot: 'hostMembers',\n widgetId: 'ai-collaborator-allotment',\n title: 'AI allotment',\n column: {\n header: 'AI allotment',\n align: 'right',\n Header: AiCollaboratorAllotmentHeader,\n },\n Component: AiCollaboratorAllotmentCell,\n },\n {\n slot: 'hostMembers',\n widgetId: 'ai-site-allotment',\n title: 'Site AI allotment',\n Component: AiSiteAllotmentCard,\n },\n // Themes by AI (AGL-2938): a brief on the site's Theme section, a\n // proposal previewed before and after, and the editor's own Save to\n // keep it. Generation is sold as `aiGenerative` and held by\n // `ai.generate`, so the shell withholds the card from a plan or a\n // member without either; the card itself asks the route about the\n // release flag before it shows anything.\n {\n slot: 'hostTheme',\n widgetId: 'ai-theme-proposal',\n title: 'Theme assistant',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiThemeProposalCard,\n },\n {\n slot: 'staffOrg',\n widgetId: 'ai-org-usage',\n title: 'AI usage',\n Component: StaffOrgAiCard,\n },\n {\n slot: 'staffUser',\n widgetId: 'ai-account-usage',\n title: 'AI usage across organizations',\n Component: StaffUserAiUsageCard,\n },\n // The staff tables' AI figures (AGL-2984): the Organizations list's\n // spend column, and the usage table's three columns with the credit\n // pool line the org page draws above it.\n {\n slot: 'staffOrgsListColumn',\n widgetId: 'ai-orgs-spend',\n title: 'AI spend (month)',\n column: {\n header: 'AI spend (month)',\n align: 'right',\n Header: StaffOrgsAiSpendHeader,\n },\n Component: StaffOrgsAiSpendCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-assist-cost',\n title: 'Assist',\n column: { header: 'Assist', align: 'right' },\n Component: StaffOrgUsageAssistCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-credits',\n title: 'AI credits used',\n column: { header: 'AI credits used', align: 'right' },\n Component: StaffOrgUsageAiCreditsCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-overage',\n title: 'AI overage billed ($)',\n column: { header: 'AI overage billed ($)', align: 'right' },\n Component: StaffOrgUsageAiOverageCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-pool',\n title: 'AI credit pool',\n Component: StaffOrgUsageAiPool,\n },\n {\n slot: 'orgMembersListColumn',\n widgetId: 'ai-member-credits',\n title: 'AI credits (month)',\n column: { header: 'AI credits (month)', align: 'right', Header: AiMemberCreditsHeader },\n Component: AiMemberCreditsCell,\n },\n {\n slot: 'hostMembers',\n widgetId: 'ai-collaborator-credits',\n title: 'AI credits (site, month)',\n column: {\n header: 'AI credits (site, month)',\n align: 'right',\n Header: AiCollaboratorCreditsHeader,\n },\n Component: AiCollaboratorCreditsCell,\n },\n // SEO by AI (AGL-2910): \"Write SEO\" inside every search listing editor\n // — a page's SEO card and a product's listing — and the site audit on\n // the site's SEO section. Generation is sold as `aiGenerative` and held\n // by `ai.generate`, so the shell withholds both from a plan or a member\n // without either; each card asks the jobs route about the release flag\n // before it shows anything, and neither ever writes what it proposes.\n {\n slot: 'seoFields',\n widgetId: 'ai-seo-fields',\n title: 'SEO assistant',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSeoFieldsCard,\n },\n {\n slot: 'hostSeo',\n widgetId: 'ai-seo-audit',\n title: 'SEO audit',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSeoAuditCard,\n },\n // A page from a brief (AGL-2907): \"Create with AI\" beside Templates and\n // Create New Screen. Gated as the other generative widgets are.\n // On a plan that could buy the AI add-on and has not, each \"Create with\n // AI\" entry here is mounted anyway (`showWhenNotEntitled`) and opens\n // the add-on's dialog instead of the brief (AGL-3601). The shell holds\n // each behind `release_ai_generative` too, so an entry draws at once\n // and asks the jobs route nothing until its brief is sent.\n {\n slot: 'hostScreens',\n widgetId: 'ai-describe-page',\n title: 'Describe a page',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribePageButton,\n },\n // The same entry for a page template, a layout and a form (AGL-3043),\n // beside the create action of the page that lists each: the same\n // dialog and the same gates.\n {\n slot: 'hostTemplates',\n widgetId: 'ai-describe-template',\n title: 'Describe a page template',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeTemplateButton,\n },\n {\n slot: 'hostLayouts',\n widgetId: 'ai-describe-layout',\n title: 'Describe a layout',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeLayoutButton,\n },\n {\n slot: 'hostForms',\n widgetId: 'ai-describe-form',\n title: 'Describe a form',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeFormButton,\n },\n // And a reusable component from a brief (AGL-3051), beside Templates\n // and Create Component: the component job's first entry point, which\n // had none in the console.\n // Pictures from a description (AGL-3602): \"Create with AI\" beside Upload\n // media in the media library, and in its empty state. Gated as the\n // other generative widgets are, by the shell alone: it asks nothing of\n // a server until someone creates a picture, and the door decides then.\n {\n slot: 'mediaLibrary',\n widgetId: 'ai-media-create',\n title: 'Create images with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiMediaCreateButton,\n },\n {\n slot: 'hostComponents',\n widgetId: 'ai-describe-component',\n title: 'Describe a reusable component',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeComponentButton,\n },\n // An email design from a brief (AGL-3596), beside New template on a\n // site's email templates — the zone the email plugin hosts. Its dialog\n // also offers the draft campaign that would send it; the Campaigns\n // section's own door is `ai-create-campaign`, below.\n {\n slot: 'hostEmailTemplates',\n widgetId: 'ai-describe-email',\n title: 'Describe an email',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeEmailButton,\n },\n // Automations by AI (AGL-2919), in the zones the workflows plugin hosts\n // on its Automation page: \"Create with AI\" beside Add action and Recipes,\n // \"Explain it\" in the editor of a saved automation, and \"Why did this\n // fail?\" on a failed run. Gated as the other generative widgets are,\n // the release flag included, by the shell alone (AGL-3601): none asks\n // the jobs route anything until it is used, and none of them changes an\n // automation.\n {\n slot: 'hostAutomations',\n widgetId: 'ai-describe-automation',\n title: 'Describe an automation',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeAutomationButton,\n },\n // Funnels by AI (AGL-3605), in the zones the funnels plugin hosts on\n // its card: a draft from a description, and its results explained.\n {\n slot: 'funnelsCreate',\n widgetId: 'ai-describe-funnel',\n title: 'Describe a funnel',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiFunnelCreateButton,\n },\n {\n slot: 'funnelInsight',\n widgetId: 'ai-explain-funnel',\n title: 'Ask AI about this funnel',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiFunnelAskButton,\n },\n {\n slot: 'automationEditor',\n widgetId: 'ai-explain-automation',\n title: 'Explain this automation',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiExplainAutomation,\n },\n // \"Change with AI\" and \"Fix with AI\" in a saved action's editor\n // (AGL-3603): a changed copy drafted OFF beside it, never the saved\n // action written in place.\n {\n slot: 'automationEditor',\n widgetId: 'ai-revise-automation',\n title: 'Change this automation with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiReviseAutomation,\n },\n // \"Create with AI\" on the workspace's Org automations (AGL-3603): one\n // of the workspace's automations drafted from a description and opened\n // in that section's editor, unsaved and switched off.\n {\n slot: 'orgAutomations',\n widgetId: 'ai-describe-org-automation',\n title: 'Describe an org automation',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeOrgAutomationButton,\n },\n // \"Ask AI about these numbers\" (AGL-3603): a tile on a site's\n // dashboard and Analytics page, which both draw `hostDashboard`, and on\n // the workspace's sites page. It opens the insight dialog the Assist\n // panel opens, gated as every generative widget is.\n {\n slot: 'hostDashboard',\n widgetId: 'ai-insight-ask',\n title: 'Ask AI about these numbers',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiInsightHostCard,\n },\n {\n slot: 'orgDashboard',\n widgetId: 'ai-insight-ask',\n title: 'Ask AI about these numbers',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiInsightOrgCard,\n },\n // Logic by AI (AGL-3603), in the zones the logic plugin hosts on its\n // Functions & Variables page: Create with AI in the Functions and\n // Variables card headers, Explain / Change / Fix in a saved function's\n // editor, and Fix with AI on a broken reference an automation holds.\n // Each proposal opens unsaved in the logic editor; none is saved here.\n {\n slot: 'hostLogic',\n widgetId: 'ai-describe-logic',\n title: 'Describe a function or variable',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiLogicCreateButton,\n },\n {\n slot: 'logicFunctionEditor',\n widgetId: 'ai-logic-function',\n title: 'This function with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiLogicFunctionTools,\n },\n {\n slot: 'logicReferenceIssue',\n widgetId: 'ai-logic-fix-reference',\n title: 'Fix this reference with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiLogicFixReference,\n },\n {\n slot: 'automationRun',\n widgetId: 'ai-explain-run-failure',\n title: 'Why did this run fail?',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiExplainRunFailure,\n },\n // CRM by AI (AGL-2917): a record's summary and next step on its page,\n // a draft in the one-to-one composer, and an import's column matches.\n // The CRM hosts each zone, so it is drawn only where the CRM is; the\n // shell holds the plan and `ai.generate`, each card asks the jobs route\n // about the release flag before it shows anything, and none writes what\n // it proposes.\n {\n slot: 'recordInsights',\n widgetId: 'ai-crm-record',\n title: 'AI summary',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiCrmRecordCard,\n },\n {\n slot: 'recordEmail',\n widgetId: 'ai-crm-email',\n title: 'Draft with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiCrmEmailDraft,\n },\n {\n slot: 'importMapping',\n widgetId: 'ai-crm-import-mapping',\n title: 'Match columns with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiCrmImportMapping,\n },\n // The guided start (AGL-2918), on the page a newly created site lands\n // on: a few questions that become a site scaffold. Gated as the other\n // generative widgets are, and it asks the jobs route about the release\n // flag before it shows anything — so a workspace the feature is not\n // released to gets the blank page and nothing else. Skipping is the\n // zone's own `startBlank`, which creates nothing.\n {\n slot: 'hostFirstRun',\n widgetId: 'ai-site-start',\n title: 'Start this site with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSiteStartCard,\n },\n // The listing those answers describe (AGL-2918), on the site's SEO\n // section: the site-wide search title and description the guided start\n // implies, offered where they are edited. The same gates as every\n // generative widget, and it stages into the SEO form rather than\n // writing it — a person's Update is the write, as it is for the audit\n // card beside it.\n {\n slot: 'hostSeo',\n widgetId: 'ai-site-seo-start',\n title: 'The listing your answers describe',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSiteSeoStartCard,\n },\n // The agency batch (AGL-2911): one brief across many of the org's\n // sites, from the page that lists them. The card asks the jobs route\n // about the release flag before it shows anything, and its own door\n // holds the plan band and the caller's permission on every site it is\n // pointed at.\n {\n slot: 'orgSites',\n widgetId: 'ai-site-batch',\n title: 'Generate sites with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSiteBatchCard,\n },\n // Commerce by AI (AGL-2916): product copy in the product editor, the\n // catalog, categories and discounts on the products hub, and copy for\n // an import as it lands. The commerce plugin hosts the zones and makes\n // every write. The shell holds the release flag; the products hub card\n // reads its recent proposals before it draws its own controls, but\n // offers the \"Create with AI\" door's brief from the moment it mounts.\n {\n slot: 'productEditor',\n widgetId: 'ai-product-copy',\n title: 'Product copy assistant',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiProductCopyCard,\n },\n {\n slot: 'productsHub',\n widgetId: 'ai-products-hub',\n title: 'Build your catalog with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiProductsHubCard,\n },\n // \"Create with AI\" beside Add product and in the empty catalog\n // (AGL-3596): a door to the card's Propose products brief, shown only\n // while that card is on the page to take it.\n {\n slot: 'productsCreate',\n widgetId: 'ai-products-create',\n title: 'Propose products',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiCreateProductsButton,\n },\n {\n slot: 'productImport',\n widgetId: 'ai-product-import',\n title: 'Write imported product copy with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiProductImportOption,\n },\n // A/B tests by AI (AGL-2914): variants written in the experiment\n // editor, and one test's result read in plain words below its figures.\n // The A/B testing card hosts both zones, so they are drawn only where\n // that card is and only on a site with A/B testing; the shell holds the\n // plan band, `ai.generate` and the release flag, and neither card asks\n // the jobs route anything until it is used (AGL-3601). Neither writes: the\n // experiment editor's Save is the only write, and an explanation has\n // nothing to apply.\n {\n slot: 'experimentVariants',\n widgetId: 'ai-experiment-variants',\n title: 'Write variants with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiExperimentVariantsCard,\n },\n {\n slot: 'experimentResult',\n widgetId: 'ai-experiment-result',\n title: 'Explain this result with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiExperimentResultCard,\n },\n // Overlays by AI (AGL-3603), in the zones the marketing plugin's\n // overlays list hosts: \"Create with AI\" beside New bar and New popup,\n // and \"Write with AI\" among the overlay editor's fields. Both start a\n // `text` job asked for overlay copy; neither writes — the list saves a\n // created overlay switched off, and the editor's Save is the write.\n {\n slot: 'hostOverlays',\n widgetId: 'ai-create-overlay',\n title: 'Create an overlay with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiCreateOverlayButton,\n },\n {\n slot: 'overlayEditor',\n widgetId: 'ai-overlay-copy',\n title: 'Write overlay copy with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiOverlayEditorCard,\n },\n // A campaign from a brief (AGL-3603), beside Create campaign on the\n // Campaigns section the marketing plugin hosts: the `campaign` job's\n // first console door, or the `email` job's where the plan sends no\n // campaign email. Both write drafts that are aimed at nobody and sent\n // by nobody until a member does.\n {\n slot: 'hostCampaigns',\n widgetId: 'ai-create-campaign',\n title: 'Create a campaign with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiCreateCampaignButton,\n },\n // The figures in words (AGL-3603), in the header of the Conversions\n // section and of one campaign's report: the insight dialog the Assist\n // panel opens, on the Marketing surface, for the site the figures are.\n // It reads and cites; it changes nothing.\n {\n slot: 'marketingInsights',\n widgetId: 'ai-marketing-insight',\n title: 'Ask AI about these numbers',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiMarketingInsightButton,\n },\n ],\n })\n}\n"],"names":["PLATFORM_BRAND_NAME","registerConsoleExtension","AiCollaboratorPermissionsCell","AiSaveAsComponent","AiGenerateSectionControl","AiRewriteControl","AiAssistProviderOnHost","AssistPanelOnHost","AiCreditsCard","AiJobsTopBarIndicator","AiCollaboratorCreditsCell","AiCollaboratorCreditsHeader","AiMemberCreditsCell","AiMemberCreditsHeader","AssistSignalsPage","BillingAssistOverageCard","AiTopUsersCard","AiAllotmentsCard","AiCollaboratorAllotmentCell","AiCollaboratorAllotmentHeader","AiSiteAllotmentCard","MemberAiAllotmentCard","MemberAiUsageCard","AiThemeProposalCard","StaffOrgAiCard","StaffOrgUsageAiCreditsCell","StaffOrgUsageAiOverageCell","StaffOrgUsageAiPool","StaffOrgUsageAssistCell","StaffOrgsAiSpendCell","StaffOrgsAiSpendHeader","StaffUserAiUsageCard","AiSeoAuditCard","AiSiteBatchCard","AiSiteSeoStartCard","AiSiteStartCard","AiSeoFieldsCard","AiDescribeAutomationButton","AiReviseAutomation","AiDescribeOrgAutomationButton","AiInsightHostCard","AiInsightOrgCard","AiLogicCreateButton","AiLogicFixReference","AiLogicFunctionTools","AiFunnelAskButton","AiFunnelCreateButton","AiCrmEmailDraft","AiCrmImportMapping","AiCrmRecordCard","AiDescribePageButton","AiMediaCreateButton","AiDescribeComponentButton","AiDescribeFormButton","AiDescribeLayoutButton","AiDescribeTemplateButton","AiDescribeEmailButton","AiExperimentResultCard","AiExperimentVariantsCard","AiExplainAutomation","AiExplainRunFailure","AiCreateCampaignButton","AiMarketingInsightButton","AiCreateOverlayButton","AiOverlayEditorCard","AiProductCopyCard","AiProductImportOption","AiProductsHubCard","AiCreateProductsButton","AiJobsPage","AI_PLUGIN_ID","registerAiDeclarations","registerAiConsole","pluginId","displayName","providers","staffPages","id","label","header","title","docsTopic","Component","navItems","href","recordTitle","docsAnchor","unlisted","ownsSubtree","permission","widgets","slot","widgetId","featureFlag","column","align","Header","showWhenNotEntitled","releaseFlag"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,mBAAmB,EAAEC,wBAAwB,QAAQ,eAAc;AAC5E,SAASC,6BAA6B,QAAQ,+DAA2D;AACzG,SAASC,iBAAiB,QAAQ,iDAA6C;AAC/E,SACEC,wBAAwB,EACxBC,gBAAgB,QACX,iDAA6C;AACpD,SACEC,sBAAsB,EACtBC,iBAAiB,QACZ,mDAA+C;AACtD,OAAOC,mBAAm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U;gBACVZ,OAAO;gBACPa,aAAa;gBACbJ,YAAY;gBACZS,aAAa;gBACbhB,WAAWxB;YACb;YACA;gBACEiC,MAAM;gBACNC,UAAU;gBACVZ,OAAO;gBACPa,aAAa;gBACbJ,YAAY;gBACZS,aAAa;gBACbhB,WAAWzB;YACb;YACA,iEAAiE;YACjE,sEAAsE;YACtE,sEAAsE;YACtE,uEAAuE;YACvE,oEAAoE;YACpE;gBACEkC,MAAM;gBACNC,UAAU;gBACVZ,OAAO;gBACPa,aAAa;gBACbJ,YAAY;gBACZQ,qBAAqB;gBACrBC,aAAa;gBACbhB,WAAWnB;YACb;YACA;gBACE4B,MAAM;gBACNC,UAAU;gBACVZ,OAAO;gBACPa,aAAa;gBACbJ,YAAY;gBACZS,aAAa;gBACbhB,WAAWlB;YACb;YACA,oEAAoE;YACpE,qEAAqE;YACrE,mEAAmE;YACnE,sEAAsE;YACtE,iCAAiC;YACjC;gBACE2B,MAAM;gBACNC,UAAU;gBACVZ,OAAO;gBACPa,aAAa;gBACbJ,YAAY;gBACZQ,qBAAqB;gBACrBC,aAAa;gBACbhB,WAAWrB;YACb;YACA,oEAAoE;YACpE,sEAAsE;YACtE,uEAAuE;YACvE,0CAA0C;YAC1C;gBACE8B,MAAM;gBACNC,UAAU;gBACVZ,OAAO;gBACPa,aAAa;gBACbJ,YAAY;gBACZQ,qBAAqB;gBACrBC,aAAa;gBACbhB,WAAWpB;YACb;SACD;IACH;AACF"}
1
+ {"version":3,"sources":["../../../../../../libs/plugins/ai/src/lib/plugin.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 { PLATFORM_BRAND_NAME, registerConsoleExtension } from '@aglyn/aglyn'\nimport { LinearProgress } from '@mui/material'\nimport { createElement } from 'react'\nimport { AiAssistProviderOnHost } from './components/ai-assist-provider-on-host.component'\nimport { AI_PLUGIN_ID } from './constants'\nimport { registerAiDeclarations } from './declarations'\nimport { lazyWidget } from './lazy-widget'\n\n/*\n * Every component below is registered by name and loaded the first time the\n * shell draws it (AGL-3649); see `lazyWidget`. The console loads this plugin\n * on every screen, so a static import of a component here is downloaded by\n * every reader of every page, staff cards included.\n */\n\n/** What a page shows while its code arrives. */\nconst PAGE_LOADING = createElement(LinearProgress, { 'aria-label': 'Loading' })\n\nconst AiCollaboratorPermissionsCell = lazyWidget(\n 'AiCollaboratorPermissionsCell',\n () =>\n import('./components/ai-collaborator-permissions-column.component').then(\n (m) => m.AiCollaboratorPermissionsCell,\n ),\n)\nconst AiSaveAsComponent = lazyWidget('AiSaveAsComponent', () =>\n import('./components/ai-save-as-component.component').then(\n (m) => m.AiSaveAsComponent,\n ),\n)\nconst AiGenerateSectionControl = lazyWidget('AiGenerateSectionControl', () =>\n import('./components/besigner-ai-controls.component').then(\n (m) => m.AiGenerateSectionControl,\n ),\n)\nconst AiRewriteControl = lazyWidget('AiRewriteControl', () =>\n import('./components/besigner-ai-controls.component').then(\n (m) => m.AiRewriteControl,\n ),\n)\nconst AssistPanelOnHost = lazyWidget('AssistPanelOnHost', () =>\n import('./components/ai-permissions-on-host.component').then(\n (m) => m.AssistPanelOnHost,\n ),\n)\nconst AiCreditsCard = lazyWidget('AiCreditsCard', () =>\n import('./components/ai-credits-card.component').then((m) => m.default),\n)\nconst AiJobsTopBarIndicator = lazyWidget('AiJobsTopBarIndicator', () =>\n import('./components/ai-jobs-indicator.component').then((m) => m.default),\n)\nconst AiCollaboratorCreditsCell = lazyWidget('AiCollaboratorCreditsCell', () =>\n import('./components/ai-credits-columns.component').then(\n (m) => m.AiCollaboratorCreditsCell,\n ),\n)\nconst AiCollaboratorCreditsHeader = lazyWidget(\n 'AiCollaboratorCreditsHeader',\n () =>\n import('./components/ai-credits-columns.component').then(\n (m) => m.AiCollaboratorCreditsHeader,\n ),\n)\nconst AiMemberCreditsCell = lazyWidget('AiMemberCreditsCell', () =>\n import('./components/ai-credits-columns.component').then(\n (m) => m.AiMemberCreditsCell,\n ),\n)\nconst AiMemberCreditsHeader = lazyWidget('AiMemberCreditsHeader', () =>\n import('./components/ai-credits-columns.component').then(\n (m) => m.AiMemberCreditsHeader,\n ),\n)\nconst AssistSignalsPage = lazyWidget(\n 'AssistSignalsPage',\n () =>\n import('./components/assist-signals-page.component').then(\n (m) => m.AssistSignalsPage,\n ),\n PAGE_LOADING,\n)\nconst BillingAssistOverageCard = lazyWidget('BillingAssistOverageCard', () =>\n import('./components/billing-assist-overage-card.component').then(\n (m) => m.default,\n ),\n)\nconst AiTopUsersCard = lazyWidget('AiTopUsersCard', () =>\n import('./components/billing-ai-top-users.component').then(\n (m) => m.AiTopUsersCard,\n ),\n)\nconst AiAllotmentsCard = lazyWidget('AiAllotmentsCard', () =>\n import('./components/billing-ai-allotments.component').then(\n (m) => m.AiAllotmentsCard,\n ),\n)\nconst AiCollaboratorAllotmentCell = lazyWidget(\n 'AiCollaboratorAllotmentCell',\n () =>\n import('./components/host-ai-allotments.component').then(\n (m) => m.AiCollaboratorAllotmentCell,\n ),\n)\nconst AiCollaboratorAllotmentHeader = lazyWidget(\n 'AiCollaboratorAllotmentHeader',\n () =>\n import('./components/host-ai-allotments.component').then(\n (m) => m.AiCollaboratorAllotmentHeader,\n ),\n)\nconst AiSiteAllotmentCard = lazyWidget('AiSiteAllotmentCard', () =>\n import('./components/host-ai-allotments.component').then(\n (m) => m.AiSiteAllotmentCard,\n ),\n)\nconst MemberAiAllotmentCard = lazyWidget('MemberAiAllotmentCard', () =>\n import('./components/member-ai-allotment-card.component').then(\n (m) => m.default,\n ),\n)\nconst MemberAiUsageCard = lazyWidget('MemberAiUsageCard', () =>\n import('./components/member-ai-usage-card.component').then((m) => m.default),\n)\nconst AiThemeProposalCard = lazyWidget('AiThemeProposalCard', () =>\n import('./components/ai-theme-proposal-card.component').then(\n (m) => m.default,\n ),\n)\nconst StaffOrgAiCard = lazyWidget('StaffOrgAiCard', () =>\n import('./components/staff-org-ai-card.component').then((m) => m.default),\n)\nconst StaffOrgUsageAiCreditsCell = lazyWidget(\n 'StaffOrgUsageAiCreditsCell',\n () =>\n import('./components/staff-org-usage-ai-columns.component').then(\n (m) => m.StaffOrgUsageAiCreditsCell,\n ),\n)\nconst StaffOrgUsageAiOverageCell = lazyWidget(\n 'StaffOrgUsageAiOverageCell',\n () =>\n import('./components/staff-org-usage-ai-columns.component').then(\n (m) => m.StaffOrgUsageAiOverageCell,\n ),\n)\nconst StaffOrgUsageAiPool = lazyWidget('StaffOrgUsageAiPool', () =>\n import('./components/staff-org-usage-ai-columns.component').then(\n (m) => m.StaffOrgUsageAiPool,\n ),\n)\nconst StaffOrgUsageAssistCell = lazyWidget('StaffOrgUsageAssistCell', () =>\n import('./components/staff-org-usage-ai-columns.component').then(\n (m) => m.StaffOrgUsageAssistCell,\n ),\n)\nconst StaffOrgsAiSpendCell = lazyWidget('StaffOrgsAiSpendCell', () =>\n import('./components/staff-orgs-ai-spend-column.component').then(\n (m) => m.StaffOrgsAiSpendCell,\n ),\n)\nconst StaffOrgsAiSpendHeader = lazyWidget('StaffOrgsAiSpendHeader', () =>\n import('./components/staff-orgs-ai-spend-column.component').then(\n (m) => m.StaffOrgsAiSpendHeader,\n ),\n)\nconst StaffUserAiUsageCard = lazyWidget('StaffUserAiUsageCard', () =>\n import('./components/staff-user-ai-usage-card.component').then(\n (m) => m.default,\n ),\n)\nconst AiSeoAuditCard = lazyWidget('AiSeoAuditCard', () =>\n import('./components/ai-seo-audit-card.component').then((m) => m.default),\n)\nconst AiSiteBatchCard = lazyWidget('AiSiteBatchCard', () =>\n import('./components/ai-site-batch-card.component').then((m) => m.default),\n)\nconst AiSiteSeoStartCard = lazyWidget('AiSiteSeoStartCard', () =>\n import('./components/ai-site-seo-start-card.component').then(\n (m) => m.default,\n ),\n)\nconst AiSiteStartCard = lazyWidget('AiSiteStartCard', () =>\n import('./components/ai-site-start-card.component').then((m) => m.default),\n)\nconst AiSeoFieldsCard = lazyWidget('AiSeoFieldsCard', () =>\n import('./components/ai-seo-fields-card.component').then((m) => m.default),\n)\nconst AiDescribeAutomationButton = lazyWidget(\n 'AiDescribeAutomationButton',\n () =>\n import('./components/ai-describe-automation.component').then(\n (m) => m.default,\n ),\n)\nconst AiReviseAutomation = lazyWidget('AiReviseAutomation', () =>\n import('./components/ai-revise-automation.component').then((m) => m.default),\n)\nconst AiDescribeOrgAutomationButton = lazyWidget(\n 'AiDescribeOrgAutomationButton',\n () =>\n import('./components/ai-describe-org-automation.component').then(\n (m) => m.default,\n ),\n)\nconst AiInsightHostCard = lazyWidget('AiInsightHostCard', () =>\n import('./components/ai-insight-card.component').then(\n (m) => m.AiInsightHostCard,\n ),\n)\nconst AiInsightOrgCard = lazyWidget('AiInsightOrgCard', () =>\n import('./components/ai-insight-card.component').then(\n (m) => m.AiInsightOrgCard,\n ),\n)\nconst AiLogicCreateButton = lazyWidget('AiLogicCreateButton', () =>\n import('./components/ai-logic.component').then((m) => m.AiLogicCreateButton),\n)\nconst AiLogicFixReference = lazyWidget('AiLogicFixReference', () =>\n import('./components/ai-logic.component').then((m) => m.AiLogicFixReference),\n)\nconst AiLogicFunctionTools = lazyWidget('AiLogicFunctionTools', () =>\n import('./components/ai-logic.component').then((m) => m.AiLogicFunctionTools),\n)\nconst AiFunnelAskButton = lazyWidget('AiFunnelAskButton', () =>\n import('./components/ai-funnel-zones.component').then(\n (m) => m.AiFunnelAskButton,\n ),\n)\nconst AiFunnelCreateButton = lazyWidget('AiFunnelCreateButton', () =>\n import('./components/ai-funnel-zones.component').then(\n (m) => m.AiFunnelCreateButton,\n ),\n)\nconst AiCrmEmailDraft = lazyWidget('AiCrmEmailDraft', () =>\n import('./components/ai-crm-email-draft.component').then((m) => m.default),\n)\nconst AiCrmImportMapping = lazyWidget('AiCrmImportMapping', () =>\n import('./components/ai-crm-import-mapping.component').then((m) => m.default),\n)\nconst AiCrmRecordCard = lazyWidget('AiCrmRecordCard', () =>\n import('./components/ai-crm-record-card.component').then((m) => m.default),\n)\nconst AiDescribePageButton = lazyWidget('AiDescribePageButton', () =>\n import('./components/ai-describe-page.component').then((m) => m.default),\n)\nconst AiMediaCreateButton = lazyWidget('AiMediaCreateButton', () =>\n import('./components/ai-media-create.component').then((m) => m.default),\n)\nconst AiDescribeComponentButton = lazyWidget('AiDescribeComponentButton', () =>\n import('./components/ai-describe-button.component').then(\n (m) => m.AiDescribeComponentButton,\n ),\n)\nconst AiDescribeFormButton = lazyWidget('AiDescribeFormButton', () =>\n import('./components/ai-describe-button.component').then(\n (m) => m.AiDescribeFormButton,\n ),\n)\nconst AiDescribeLayoutButton = lazyWidget('AiDescribeLayoutButton', () =>\n import('./components/ai-describe-button.component').then(\n (m) => m.AiDescribeLayoutButton,\n ),\n)\nconst AiDescribeTemplateButton = lazyWidget('AiDescribeTemplateButton', () =>\n import('./components/ai-describe-button.component').then(\n (m) => m.AiDescribeTemplateButton,\n ),\n)\nconst AiDescribeEmailButton = lazyWidget('AiDescribeEmailButton', () =>\n import('./components/ai-describe-email.component').then(\n (m) => m.AiDescribeEmailButton,\n ),\n)\nconst AiExperimentResultCard = lazyWidget('AiExperimentResultCard', () =>\n import('./components/ai-experiment-cards.component').then(\n (m) => m.AiExperimentResultCard,\n ),\n)\nconst AiExperimentVariantsCard = lazyWidget('AiExperimentVariantsCard', () =>\n import('./components/ai-experiment-cards.component').then(\n (m) => m.AiExperimentVariantsCard,\n ),\n)\nconst AiExplainAutomation = lazyWidget('AiExplainAutomation', () =>\n import('./components/ai-explain-automation.component').then(\n (m) => m.AiExplainAutomation,\n ),\n)\nconst AiExplainRunFailure = lazyWidget('AiExplainRunFailure', () =>\n import('./components/ai-explain-automation.component').then(\n (m) => m.AiExplainRunFailure,\n ),\n)\nconst AiCreateCampaignButton = lazyWidget('AiCreateCampaignButton', () =>\n import('./components/ai-campaign-create.component').then((m) => m.default),\n)\nconst AiMarketingInsightButton = lazyWidget('AiMarketingInsightButton', () =>\n import('./components/ai-marketing-insight.component').then((m) => m.default),\n)\nconst AiCreateOverlayButton = lazyWidget('AiCreateOverlayButton', () =>\n import('./components/ai-overlay-cards.component').then(\n (m) => m.AiCreateOverlayButton,\n ),\n)\nconst AiOverlayEditorCard = lazyWidget('AiOverlayEditorCard', () =>\n import('./components/ai-overlay-cards.component').then(\n (m) => m.AiOverlayEditorCard,\n ),\n)\nconst AiProductCopyCard = lazyWidget('AiProductCopyCard', () =>\n import('./components/ai-product-copy-card.component').then((m) => m.default),\n)\nconst AiProductImportOption = lazyWidget('AiProductImportOption', () =>\n import('./components/ai-product-import-option.component').then(\n (m) => m.default,\n ),\n)\nconst AiProductsHubCard = lazyWidget('AiProductsHubCard', () =>\n import('./components/ai-products-hub-card.component').then((m) => m.default),\n)\nconst AiCreateProductsButton = lazyWidget('AiCreateProductsButton', () =>\n import('./components/ai-products-create-button.component').then(\n (m) => m.default,\n ),\n)\nconst AiJobsPage = lazyWidget(\n 'AiJobsPage',\n () => import('./components/ai-jobs-page.component').then((m) => m.default),\n PAGE_LOADING,\n)\n\n/**\n * The Aglyn AI plugin's console half (AGL-2939): the assistant dock, the\n * besigner copy assistant's provider, the billing, member and staff cards,\n * the member tables' credit columns and the Assist signal staff page — each\n * mounted through a shell-owned zone (AGL-2940) or the staff area's generic\n * route, so no console page imports this plugin.\n *\n * No `featureFlag` on the extension: the plugin's doors are gated one by\n * one — the dock reads the `release_assist` verdict the shell hands it, the\n * generative doors answer 404 behind `release_ai_generative`, the billing\n * cards render only where the plan sells a band — and a flag here would\n * switch off the released doors with the unreleased ones.\n */\nexport function registerAiConsole(): void {\n registerAiDeclarations()\n registerConsoleExtension({\n pluginId: AI_PLUGIN_ID,\n displayName: 'AI',\n // The besigner copy assistant (AGL-89/419): mounted by the shell around\n // every console page, and opened by this plugin's besigner controls.\n providers: [AiAssistProviderOnHost],\n // The Assist docs-gap and cost board (AGL-1860, AGL-2252), at the staff\n // URL and under the tab it has always had.\n staffPages: [\n {\n id: 'assist-signals',\n label: 'Assist signal',\n header: {\n // The configured brand, not ours (AGL-2153/2260): a white-label\n // deployment and a self-host operator both read this header.\n title: `${PLATFORM_BRAND_NAME} Assist Signal`,\n docsTopic: 'assistSignals',\n },\n Component: AssistSignalsPage,\n },\n ],\n // A site's AI jobs (AGL-3596), an address under the site and no tab:\n // `/ai-jobs` lists them, and `/ai-jobs/{jobId}` is one job's page —\n // \"Building your site\" (AGL-3594), where the guided start lands a person\n // and where a site job's notification opens. The `href` is a literal,\n // `AI_SITE_BUILD_HREF`'s value, because the tab-title manifest is read\n // from this source (`ai-jobs-page.spec.tsx` holds the two equal).\n navItems: [\n {\n label: 'AI jobs',\n href: '/ai-jobs',\n recordTitle: 'Building your site',\n header: { title: 'AI jobs', docsTopic: 'howAglynAiBuilds', docsAnchor: '#finding-your-ai-jobs' },\n unlisted: true,\n ownsSubtree: true,\n permission: 'ai.generate',\n Component: AiJobsPage,\n },\n ],\n widgets: [\n {\n slot: 'consoleDock',\n widgetId: 'ai-assist-dock',\n title: 'Assistant',\n Component: AssistPanelOnHost,\n },\n // The AI jobs indicator (AGL-3593), beside the notifications bell on\n // every page: what the workspace's jobs are doing, and the way to them.\n // Gated as the other generative widgets are; it asks the shell for the\n // release flags of the jobs and of the panel it opens.\n {\n slot: 'consoleTopBar',\n widgetId: 'ai-jobs-indicator',\n title: 'AI jobs',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiJobsTopBarIndicator,\n },\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-credits-meter',\n title: 'AI credits',\n Component: AiCreditsCard,\n },\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-credits-overage',\n title: 'AI credits overage',\n Component: BillingAssistOverageCard,\n },\n // The per-member usage (AGL-2928): who drew the credits the meter\n // counts, on Billing → Usage, on each member's page, on the staff\n // user page, and as a column of both member tables.\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-usage-by-member',\n title: 'Who is generating what',\n permission: 'billing.view',\n Component: AiTopUsersCard,\n },\n // The collaborators table's AI column (AGL-2927): whether each person\n // may open the AI doors on the site, per site, ahead of the columns\n // that report what they drew.\n {\n slot: 'hostMembers',\n widgetId: 'ai-collaborator-permissions',\n title: 'AI',\n column: { header: 'AI' },\n Component: AiCollaboratorPermissionsCell,\n },\n // The copy assistant's besigner controls (AGL-89, AGL-169): Generate a\n // section on every editor's toolbar, and Rewrite with AI under the\n // selected element's fields. Each opens the provider's dialog, and is\n // drawn only while the reader holds the door's permission.\n {\n slot: 'besignerToolbar',\n widgetId: 'ai-generate-section',\n title: 'Generate a section with AI',\n Component: AiGenerateSectionControl,\n },\n {\n slot: 'besignerInspector',\n widgetId: 'ai-rewrite-copy',\n title: 'Rewrite with AI',\n Component: AiRewriteControl,\n },\n // Save the selection as a reusable component (AGL-2908): the component\n // job's second entry point, which proposes the properties a section\n // should declare and applies them as the manual promote does.\n {\n slot: 'besignerInspector',\n widgetId: 'ai-save-as-component',\n title: 'Make a reusable component with AI',\n permission: 'ai.generate',\n Component: AiSaveAsComponent,\n },\n {\n slot: 'orgMember',\n widgetId: 'ai-member-usage',\n title: 'AI usage',\n Component: MemberAiUsageCard,\n },\n // The allotments (AGL-2942): a member's or a site's monthly share of\n // the pool, set on Billing → Usage, on each member's page and on a\n // site's collaborators card — each card asks the route what its\n // reader may see and change.\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-allotments',\n title: 'AI allotments',\n permission: 'billing.view',\n Component: AiAllotmentsCard,\n },\n {\n slot: 'orgMember',\n widgetId: 'ai-member-allotment',\n title: 'AI allotment',\n Component: MemberAiAllotmentCard,\n },\n {\n slot: 'hostMembers',\n widgetId: 'ai-collaborator-allotment',\n title: 'AI allotment',\n column: {\n header: 'AI allotment',\n align: 'right',\n Header: AiCollaboratorAllotmentHeader,\n },\n Component: AiCollaboratorAllotmentCell,\n },\n {\n slot: 'hostMembers',\n widgetId: 'ai-site-allotment',\n title: 'Site AI allotment',\n Component: AiSiteAllotmentCard,\n },\n // Themes by AI (AGL-2938): a brief on the site's Theme section, a\n // proposal previewed before and after, and the editor's own Save to\n // keep it. Generation is sold as `aiGenerative` and held by\n // `ai.generate`, so the shell withholds the card from a plan or a\n // member without either; the card itself asks the route about the\n // release flag before it shows anything.\n {\n slot: 'hostTheme',\n widgetId: 'ai-theme-proposal',\n title: 'Theme assistant',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiThemeProposalCard,\n },\n {\n slot: 'staffOrg',\n widgetId: 'ai-org-usage',\n title: 'AI usage',\n Component: StaffOrgAiCard,\n },\n {\n slot: 'staffUser',\n widgetId: 'ai-account-usage',\n title: 'AI usage across organizations',\n Component: StaffUserAiUsageCard,\n },\n // The staff tables' AI figures (AGL-2984): the Organizations list's\n // spend column, and the usage table's three columns with the credit\n // pool line the org page draws above it.\n {\n slot: 'staffOrgsListColumn',\n widgetId: 'ai-orgs-spend',\n title: 'AI spend (month)',\n column: {\n header: 'AI spend (month)',\n align: 'right',\n Header: StaffOrgsAiSpendHeader,\n },\n Component: StaffOrgsAiSpendCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-assist-cost',\n title: 'Assist',\n column: { header: 'Assist', align: 'right' },\n Component: StaffOrgUsageAssistCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-credits',\n title: 'AI credits used',\n column: { header: 'AI credits used', align: 'right' },\n Component: StaffOrgUsageAiCreditsCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-overage',\n title: 'AI overage billed ($)',\n column: { header: 'AI overage billed ($)', align: 'right' },\n Component: StaffOrgUsageAiOverageCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-pool',\n title: 'AI credit pool',\n Component: StaffOrgUsageAiPool,\n },\n {\n slot: 'orgMembersListColumn',\n widgetId: 'ai-member-credits',\n title: 'AI credits (month)',\n column: { header: 'AI credits (month)', align: 'right', Header: AiMemberCreditsHeader },\n Component: AiMemberCreditsCell,\n },\n {\n slot: 'hostMembers',\n widgetId: 'ai-collaborator-credits',\n title: 'AI credits (site, month)',\n column: {\n header: 'AI credits (site, month)',\n align: 'right',\n Header: AiCollaboratorCreditsHeader,\n },\n Component: AiCollaboratorCreditsCell,\n },\n // SEO by AI (AGL-2910): \"Write SEO\" inside every search listing editor\n // — a page's SEO card and a product's listing — and the site audit on\n // the site's SEO section. Generation is sold as `aiGenerative` and held\n // by `ai.generate`, so the shell withholds both from a plan or a member\n // without either; each card asks the jobs route about the release flag\n // before it shows anything, and neither ever writes what it proposes.\n {\n slot: 'seoFields',\n widgetId: 'ai-seo-fields',\n title: 'SEO assistant',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSeoFieldsCard,\n },\n {\n slot: 'hostSeo',\n widgetId: 'ai-seo-audit',\n title: 'SEO audit',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSeoAuditCard,\n },\n // A page from a brief (AGL-2907): \"Create with AI\" beside Templates and\n // Create New Screen. Gated as the other generative widgets are.\n // On a plan that could buy the AI add-on and has not, each \"Create with\n // AI\" entry here is mounted anyway (`showWhenNotEntitled`) and opens\n // the add-on's dialog instead of the brief (AGL-3601). The shell holds\n // each behind `release_ai_generative` too, so an entry draws at once\n // and asks the jobs route nothing until its brief is sent.\n {\n slot: 'hostScreens',\n widgetId: 'ai-describe-page',\n title: 'Describe a page',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribePageButton,\n },\n // The same entry for a page template, a layout and a form (AGL-3043),\n // beside the create action of the page that lists each: the same\n // dialog and the same gates.\n {\n slot: 'hostTemplates',\n widgetId: 'ai-describe-template',\n title: 'Describe a page template',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeTemplateButton,\n },\n {\n slot: 'hostLayouts',\n widgetId: 'ai-describe-layout',\n title: 'Describe a layout',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeLayoutButton,\n },\n {\n slot: 'hostForms',\n widgetId: 'ai-describe-form',\n title: 'Describe a form',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeFormButton,\n },\n // And a reusable component from a brief (AGL-3051), beside Templates\n // and Create Component: the component job's first entry point, which\n // had none in the console.\n // Pictures from a description (AGL-3602): \"Create with AI\" beside Upload\n // media in the media library, and in its empty state. Gated as the\n // other generative widgets are, by the shell alone: it asks nothing of\n // a server until someone creates a picture, and the door decides then.\n {\n slot: 'mediaLibrary',\n widgetId: 'ai-media-create',\n title: 'Create images with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiMediaCreateButton,\n },\n {\n slot: 'hostComponents',\n widgetId: 'ai-describe-component',\n title: 'Describe a reusable component',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeComponentButton,\n },\n // An email design from a brief (AGL-3596), beside New template on a\n // site's email templates — the zone the email plugin hosts. Its dialog\n // also offers the draft campaign that would send it; the Campaigns\n // section's own door is `ai-create-campaign`, below.\n {\n slot: 'hostEmailTemplates',\n widgetId: 'ai-describe-email',\n title: 'Describe an email',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeEmailButton,\n },\n // Automations by AI (AGL-2919), in the zones the workflows plugin hosts\n // on its Automation page: \"Create with AI\" beside Add action and Recipes,\n // \"Explain it\" in the editor of a saved automation, and \"Why did this\n // fail?\" on a failed run. Gated as the other generative widgets are,\n // the release flag included, by the shell alone (AGL-3601): none asks\n // the jobs route anything until it is used, and none of them changes an\n // automation.\n {\n slot: 'hostAutomations',\n widgetId: 'ai-describe-automation',\n title: 'Describe an automation',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeAutomationButton,\n },\n // Funnels by AI (AGL-3605), in the zones the funnels plugin hosts on\n // its card: a draft from a description, and its results explained.\n {\n slot: 'funnelsCreate',\n widgetId: 'ai-describe-funnel',\n title: 'Describe a funnel',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiFunnelCreateButton,\n },\n {\n slot: 'funnelInsight',\n widgetId: 'ai-explain-funnel',\n title: 'Ask AI about this funnel',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiFunnelAskButton,\n },\n {\n slot: 'automationEditor',\n widgetId: 'ai-explain-automation',\n title: 'Explain this automation',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiExplainAutomation,\n },\n // \"Change with AI\" and \"Fix with AI\" in a saved action's editor\n // (AGL-3603): a changed copy drafted OFF beside it, never the saved\n // action written in place.\n {\n slot: 'automationEditor',\n widgetId: 'ai-revise-automation',\n title: 'Change this automation with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiReviseAutomation,\n },\n // \"Create with AI\" on the workspace's Org automations (AGL-3603): one\n // of the workspace's automations drafted from a description and opened\n // in that section's editor, unsaved and switched off.\n {\n slot: 'orgAutomations',\n widgetId: 'ai-describe-org-automation',\n title: 'Describe an org automation',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeOrgAutomationButton,\n },\n // \"Ask AI about these numbers\" (AGL-3603): a tile on a site's\n // dashboard and Analytics page, which both draw `hostDashboard`, and on\n // the workspace's sites page. It opens the insight dialog the Assist\n // panel opens, gated as every generative widget is.\n {\n slot: 'hostDashboard',\n widgetId: 'ai-insight-ask',\n title: 'Ask AI about these numbers',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiInsightHostCard,\n },\n {\n slot: 'orgDashboard',\n widgetId: 'ai-insight-ask',\n title: 'Ask AI about these numbers',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiInsightOrgCard,\n },\n // Logic by AI (AGL-3603), in the zones the logic plugin hosts on its\n // Functions & Variables page: Create with AI in the Functions and\n // Variables card headers, Explain / Change / Fix in a saved function's\n // editor, and Fix with AI on a broken reference an automation holds.\n // Each proposal opens unsaved in the logic editor; none is saved here.\n {\n slot: 'hostLogic',\n widgetId: 'ai-describe-logic',\n title: 'Describe a function or variable',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiLogicCreateButton,\n },\n {\n slot: 'logicFunctionEditor',\n widgetId: 'ai-logic-function',\n title: 'This function with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiLogicFunctionTools,\n },\n {\n slot: 'logicReferenceIssue',\n widgetId: 'ai-logic-fix-reference',\n title: 'Fix this reference with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiLogicFixReference,\n },\n {\n slot: 'automationRun',\n widgetId: 'ai-explain-run-failure',\n title: 'Why did this run fail?',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiExplainRunFailure,\n },\n // CRM by AI (AGL-2917): a record's summary and next step on its page,\n // a draft in the one-to-one composer, and an import's column matches.\n // The CRM hosts each zone, so it is drawn only where the CRM is; the\n // shell holds the plan and `ai.generate`, each card asks the jobs route\n // about the release flag before it shows anything, and none writes what\n // it proposes.\n {\n slot: 'recordInsights',\n widgetId: 'ai-crm-record',\n title: 'AI summary',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiCrmRecordCard,\n },\n {\n slot: 'recordEmail',\n widgetId: 'ai-crm-email',\n title: 'Draft with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiCrmEmailDraft,\n },\n {\n slot: 'importMapping',\n widgetId: 'ai-crm-import-mapping',\n title: 'Match columns with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiCrmImportMapping,\n },\n // The guided start (AGL-2918), on the page a newly created site lands\n // on: a few questions that become a site scaffold. Gated as the other\n // generative widgets are, and it asks the jobs route about the release\n // flag before it shows anything — so a workspace the feature is not\n // released to gets the blank page and nothing else. Skipping is the\n // zone's own `startBlank`, which creates nothing.\n {\n slot: 'hostFirstRun',\n widgetId: 'ai-site-start',\n title: 'Start this site with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSiteStartCard,\n },\n // The listing those answers describe (AGL-2918), on the site's SEO\n // section: the site-wide search title and description the guided start\n // implies, offered where they are edited. The same gates as every\n // generative widget, and it stages into the SEO form rather than\n // writing it — a person's Update is the write, as it is for the audit\n // card beside it.\n {\n slot: 'hostSeo',\n widgetId: 'ai-site-seo-start',\n title: 'The listing your answers describe',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSiteSeoStartCard,\n },\n // The agency batch (AGL-2911): one brief across many of the org's\n // sites, from the page that lists them. The card asks the jobs route\n // about the release flag before it shows anything, and its own door\n // holds the plan band and the caller's permission on every site it is\n // pointed at.\n {\n slot: 'orgSites',\n widgetId: 'ai-site-batch',\n title: 'Generate sites with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSiteBatchCard,\n },\n // Commerce by AI (AGL-2916): product copy in the product editor, the\n // catalog, categories and discounts on the products hub, and copy for\n // an import as it lands. The commerce plugin hosts the zones and makes\n // every write. The shell holds the release flag; the products hub card\n // reads its recent proposals before it draws its own controls, but\n // offers the \"Create with AI\" door's brief from the moment it mounts.\n {\n slot: 'productEditor',\n widgetId: 'ai-product-copy',\n title: 'Product copy assistant',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiProductCopyCard,\n },\n {\n slot: 'productsHub',\n widgetId: 'ai-products-hub',\n title: 'Build your catalog with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiProductsHubCard,\n },\n // \"Create with AI\" beside Add product and in the empty catalog\n // (AGL-3596): a door to the card's Propose products brief, shown only\n // while that card is on the page to take it.\n {\n slot: 'productsCreate',\n widgetId: 'ai-products-create',\n title: 'Propose products',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiCreateProductsButton,\n },\n {\n slot: 'productImport',\n widgetId: 'ai-product-import',\n title: 'Write imported product copy with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiProductImportOption,\n },\n // A/B tests by AI (AGL-2914): variants written in the experiment\n // editor, and one test's result read in plain words below its figures.\n // The A/B testing card hosts both zones, so they are drawn only where\n // that card is and only on a site with A/B testing; the shell holds the\n // plan band, `ai.generate` and the release flag, and neither card asks\n // the jobs route anything until it is used (AGL-3601). Neither writes: the\n // experiment editor's Save is the only write, and an explanation has\n // nothing to apply.\n {\n slot: 'experimentVariants',\n widgetId: 'ai-experiment-variants',\n title: 'Write variants with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiExperimentVariantsCard,\n },\n {\n slot: 'experimentResult',\n widgetId: 'ai-experiment-result',\n title: 'Explain this result with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiExperimentResultCard,\n },\n // Overlays by AI (AGL-3603), in the zones the marketing plugin's\n // overlays list hosts: \"Create with AI\" beside New bar and New popup,\n // and \"Write with AI\" among the overlay editor's fields. Both start a\n // `text` job asked for overlay copy; neither writes — the list saves a\n // created overlay switched off, and the editor's Save is the write.\n {\n slot: 'hostOverlays',\n widgetId: 'ai-create-overlay',\n title: 'Create an overlay with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiCreateOverlayButton,\n },\n {\n slot: 'overlayEditor',\n widgetId: 'ai-overlay-copy',\n title: 'Write overlay copy with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiOverlayEditorCard,\n },\n // A campaign from a brief (AGL-3603), beside Create campaign on the\n // Campaigns section the marketing plugin hosts: the `campaign` job's\n // first console door, or the `email` job's where the plan sends no\n // campaign email. Both write drafts that are aimed at nobody and sent\n // by nobody until a member does.\n {\n slot: 'hostCampaigns',\n widgetId: 'ai-create-campaign',\n title: 'Create a campaign with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiCreateCampaignButton,\n },\n // The figures in words (AGL-3603), in the header of the Conversions\n // section and of one campaign's report: the insight dialog the Assist\n // panel opens, on the Marketing surface, for the site the figures are.\n // It reads and cites; it changes nothing.\n {\n slot: 'marketingInsights',\n widgetId: 'ai-marketing-insight',\n title: 'Ask AI about these numbers',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiMarketingInsightButton,\n },\n ],\n })\n}\n"],"names":["PLATFORM_BRAND_NAME","registerConsoleExtension","LinearProgress","createElement","AiAssistProviderOnHost","AI_PLUGIN_ID","registerAiDeclarations","lazyWidget","PAGE_LOADING","AiCollaboratorPermissionsCell","then","m","AiSaveAsComponent","AiGenerateSectionControl","AiRewriteControl","AssistPanelOnHost","AiCreditsCard","default","AiJobsTopBarIndicator","AiCollaboratorCreditsCell","AiCollaboratorCreditsHeader","AiMemberCreditsCell","AiMemberCreditsHeader","AssistSignalsPage","BillingAssistOverageCard","AiTopUsersCard","AiAllotmentsCard","AiCollaboratorAllotmentCell","AiCollaboratorAllotmentHeader","AiSiteAllotmentCard","MemberAiAllotmentCard","MemberAiUsageCard","AiThemeProposalCard","StaffOrgAiCard","StaffOrgUsageAiCreditsCell","StaffOrgUsageAiOverageCell","StaffOrgUsageAiPool","StaffOrgUsageAssistCell","StaffOrgsAiSpendCell","StaffOrgsAiSpendHeader","StaffUserAiUsageCard","AiSeoAuditCard","AiSiteBatchCard","AiSiteSeoStartCard","AiSiteStartCard","AiSeoFieldsCard","AiDescribeAutomationButton","AiReviseAutomation","AiDescribeOrgAutomationButton","AiInsightHostCard","AiInsightOrgCard","AiLogicCreateButton","AiLogicFixReference","AiLogicFunctionTools","AiFunnelAskButton","AiFunnelCreateButton","AiCrmEmailDraft","AiCrmImportMapping","AiCrmRecordCard","AiDescribePageButton","AiMediaCreateButton","AiDescribeComponentButton","AiDescribeFormButton","AiDescribeLayoutButton","AiDescribeTemplateButton","AiDescribeEmailButton","AiExperimentResultCard","AiExperimentVariantsCard","AiExplainAutomation","AiExplainRunFailure","AiCreateCampaignButton","AiMarketingInsightButton","AiCreateOverlayButton","AiOverlayEditorCard","AiProductCopyCard","AiProductImportOption","AiProductsHubCard","AiCreateProductsButton","AiJobsPage","registerAiConsole","pluginId","displayName","providers","staffPages","id","label","header","title","docsTopic","Component","navItems","href","recordTitle","docsAnchor","unlisted","ownsSubtree","permission","widgets","slot","widgetId","featureFlag","column","align","Header","showWhenNotEntitled","releaseFlag"],"mappings":"AAAA;;;;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AU;gBACVZ,OAAO;gBACPa,aAAa;gBACbJ,YAAY;gBACZQ,qBAAqB;gBACrBC,aAAa;gBACbhB,WAAWjB;YACb;YACA;gBACE0B,MAAM;gBACNC,UAAU;gBACVZ,OAAO;gBACPa,aAAa;gBACbJ,YAAY;gBACZS,aAAa;gBACbhB,WAAWhB;YACb;YACA,oEAAoE;YACpE,qEAAqE;YACrE,mEAAmE;YACnE,sEAAsE;YACtE,iCAAiC;YACjC;gBACEyB,MAAM;gBACNC,UAAU;gBACVZ,OAAO;gBACPa,aAAa;gBACbJ,YAAY;gBACZQ,qBAAqB;gBACrBC,aAAa;gBACbhB,WAAWnB;YACb;YACA,oEAAoE;YACpE,sEAAsE;YACtE,uEAAuE;YACvE,0CAA0C;YAC1C;gBACE4B,MAAM;gBACNC,UAAU;gBACVZ,OAAO;gBACPa,aAAa;gBACbJ,YAAY;gBACZQ,qBAAqB;gBACrBC,aAAa;gBACbhB,WAAWlB;YACb;SACD;IACH;AACF"}
@@ -149,7 +149,7 @@ export declare const ANTHROPIC_CRM_ASSISTANCE_DISCLOSED: AnthropicCrmAssistanceW
149
149
  * wording the Subprocessors row and Privacy Policy section 2 were
150
150
  * republished with on October 5, 2026 (legal v10), before
151
151
  * `release_crm_assist_whole_record` may be turned on. The catalog row below
152
- * carries it, dated to that change-log entry.
152
+ * carries it in `dataReceived`.
153
153
  */
154
154
  export declare const ANTHROPIC_CRM_ASSISTANCE_WHOLE_RECORD: AnthropicCrmAssistanceWording;
155
155
  /** The Anthropic row's data cell, with CRM assistance worded as `crm` words it. */
@@ -63,7 +63,7 @@ const OPENAI_COMPATIBLE = 'openai-compatible';
63
63
  * wording the Subprocessors row and Privacy Policy section 2 were
64
64
  * republished with on October 5, 2026 (legal v10), before
65
65
  * `release_crm_assist_whole_record` may be turned on. The catalog row below
66
- * carries it, dated to that change-log entry.
66
+ * carries it in `dataReceived`.
67
67
  */ export const ANTHROPIC_CRM_ASSISTANCE_WHOLE_RECORD = {
68
68
  record: 'For CRM assistance, the opened record as the CRM shows it, with all of its standard and custom fields, including contact details, notes, timeline and related records.',
69
69
  never: 'No account identifiers or authentication tokens, and no email address outside an opened CRM record.'
@@ -83,8 +83,8 @@ const OPENAI_COMPATIBLE = 'openai-compatible';
83
83
  subprocessor: {
84
84
  entity: 'Anthropic, PBC',
85
85
  region: 'United States',
86
- purpose: "AI-assisted features in the console and the site editor: the Aglyn Assist helper, including changes it proposes to a page, component, or layout open in the editor; editor assistance (rewriting element copy, drafting blog bodies, generating a section layout); and AI generation, which creates drafts and proposals for a customer's site from a brief or from what the site already holds, such as copy, layouts, templates, automations, search titles and descriptions, theme changes, product descriptions and tags, draft products, and store categories and discounts; explanations of a site's automations, including why an automation's run failed; AI insights, which answer a customer's questions about its own figures, such as site traffic, sales, bookings, forms, campaigns, A/B tests and datasets, and write a weekly summary of them for members who ask for one; and AI assistance in the CRM, which summarizes a contact, company, deal or lead for a user and suggests a next step, drafts a one-to-one email for the user to review and send, and suggests how the columns of a spreadsheet the user imports match CRM fields",
87
- publishedOn: '2026-10-05',
86
+ purpose: "AI features of the Services, including the Aglyn Assist helper: creating, editing and reviewing content, drafts and settings for a customer’s site, store and CRM, and explaining and summarizing the customer’s own setup and data",
87
+ publishedOn: '2026-10-07',
88
88
  reason: "Reached through the AI plugin's Anthropic adapter (`libs/plugins/ai/src/lib/providers/anthropic.ts`) by the doors that call the AI runtime. `libs/plugins/ai/src/lib/server/assist-chat.ts` is gated by `release_assist` AND the key, and a generation job's text step by `release_ai_generative`; `libs/plugins/ai/src/lib/server/ai-assist.ts` carries NO release flag, so setting `{apiKeyEnv}` in production is by itself what starts this flow. `assist-anthropic-subprocessor-gate.spec.ts` holds the per-door detail and is the deeper guard for this one vendor.",
89
89
  dataReceived: anthropicDataReceived(ANTHROPIC_CRM_ASSISTANCE_WHOLE_RECORD)
90
90
  }