@aglyn/plugins-ai 1.0.0-beta.229 → 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 (340) hide show
  1. package/README.md +3 -3
  2. package/package.json +17 -17
  3. package/src/lib/activity/ai-activity-actions.js +7 -1
  4. package/src/lib/activity/ai-activity-actions.js.map +1 -1
  5. package/src/lib/components/ai-assist-provider-on-host.component.d.ts +66 -0
  6. package/src/lib/components/ai-assist-provider-on-host.component.js +78 -0
  7. package/src/lib/components/ai-assist-provider-on-host.component.js.map +1 -0
  8. package/src/lib/components/ai-assist-provider.component.js +9 -10
  9. package/src/lib/components/ai-assist-provider.component.js.map +1 -1
  10. package/src/lib/components/ai-automation-zones.d.ts +38 -0
  11. package/src/lib/components/ai-automation-zones.js +5 -1
  12. package/src/lib/components/ai-automation-zones.js.map +1 -1
  13. package/src/lib/components/ai-brief-dialog.component.d.ts +20 -2
  14. package/src/lib/components/ai-brief-dialog.component.js +87 -8
  15. package/src/lib/components/ai-brief-dialog.component.js.map +1 -1
  16. package/src/lib/components/ai-campaign-create.component.d.ts +54 -0
  17. package/src/lib/components/ai-campaign-create.component.js +270 -0
  18. package/src/lib/components/ai-campaign-create.component.js.map +1 -0
  19. package/src/lib/components/ai-describe-automation.component.d.ts +8 -3
  20. package/src/lib/components/ai-describe-automation.component.js +15 -6
  21. package/src/lib/components/ai-describe-automation.component.js.map +1 -1
  22. package/src/lib/components/ai-describe-button.component.d.ts +20 -8
  23. package/src/lib/components/ai-describe-button.component.js +19 -36
  24. package/src/lib/components/ai-describe-button.component.js.map +1 -1
  25. package/src/lib/components/ai-describe-email.component.d.ts +31 -0
  26. package/src/lib/components/ai-describe-email.component.js +22 -0
  27. package/src/lib/components/ai-describe-email.component.js.map +1 -0
  28. package/src/lib/components/ai-describe-org-automation.component.d.ts +36 -0
  29. package/src/lib/components/ai-describe-org-automation.component.js +238 -0
  30. package/src/lib/components/ai-describe-org-automation.component.js.map +1 -0
  31. package/src/lib/components/ai-experiment-cards.component.d.ts +9 -1
  32. package/src/lib/components/ai-experiment-cards.component.js +104 -18
  33. package/src/lib/components/ai-experiment-cards.component.js.map +1 -1
  34. package/src/lib/components/ai-explain-automation.component.js +1 -5
  35. package/src/lib/components/ai-explain-automation.component.js.map +1 -1
  36. package/src/lib/components/ai-funnel-zones.component.d.ts +61 -0
  37. package/src/lib/components/ai-funnel-zones.component.js +178 -0
  38. package/src/lib/components/ai-funnel-zones.component.js.map +1 -0
  39. package/src/lib/components/ai-insight-card.component.d.ts +42 -0
  40. package/src/lib/components/ai-insight-card.component.js +137 -0
  41. package/src/lib/components/ai-insight-card.component.js.map +1 -0
  42. package/src/lib/components/ai-insight-dialog.component.d.ts +6 -0
  43. package/src/lib/components/ai-insight-dialog.component.js +9 -3
  44. package/src/lib/components/ai-insight-dialog.component.js.map +1 -1
  45. package/src/lib/components/ai-job-plan.component.d.ts +7 -2
  46. package/src/lib/components/ai-job-plan.component.js +38 -6
  47. package/src/lib/components/ai-job-plan.component.js.map +1 -1
  48. package/src/lib/components/ai-job-requests.d.ts +17 -1
  49. package/src/lib/components/ai-job-requests.js +39 -3
  50. package/src/lib/components/ai-job-requests.js.map +1 -1
  51. package/src/lib/components/ai-logic-zones.d.ts +64 -0
  52. package/src/lib/components/ai-logic-zones.js +18 -0
  53. package/src/lib/components/ai-logic-zones.js.map +1 -0
  54. package/src/lib/components/ai-logic.component.d.ts +77 -0
  55. package/src/lib/components/ai-logic.component.js +553 -0
  56. package/src/lib/components/ai-logic.component.js.map +1 -0
  57. package/src/lib/components/ai-marketing-insight.component.d.ts +30 -0
  58. package/src/lib/components/ai-marketing-insight.component.js +80 -0
  59. package/src/lib/components/ai-marketing-insight.component.js.map +1 -0
  60. package/src/lib/components/ai-media-create.component.d.ts +55 -0
  61. package/src/lib/components/ai-media-create.component.js +433 -0
  62. package/src/lib/components/ai-media-create.component.js.map +1 -0
  63. package/src/lib/components/ai-overlay-cards.component.d.ts +83 -0
  64. package/src/lib/components/ai-overlay-cards.component.js +505 -0
  65. package/src/lib/components/ai-overlay-cards.component.js.map +1 -0
  66. package/src/lib/components/ai-permissions-on-host.component.d.ts +3 -46
  67. package/src/lib/components/ai-permissions-on-host.component.js +5 -53
  68. package/src/lib/components/ai-permissions-on-host.component.js.map +1 -1
  69. package/src/lib/components/ai-product-zones.d.ts +5 -0
  70. package/src/lib/components/ai-product-zones.js +1 -1
  71. package/src/lib/components/ai-product-zones.js.map +1 -1
  72. package/src/lib/components/ai-products-create-button.component.d.ts +42 -0
  73. package/src/lib/components/ai-products-create-button.component.js +67 -0
  74. package/src/lib/components/ai-products-create-button.component.js.map +1 -0
  75. package/src/lib/components/ai-products-hub-card.component.js +100 -81
  76. package/src/lib/components/ai-products-hub-card.component.js.map +1 -1
  77. package/src/lib/components/ai-revise-automation.component.d.ts +16 -0
  78. package/src/lib/components/ai-revise-automation.component.js +207 -0
  79. package/src/lib/components/ai-revise-automation.component.js.map +1 -0
  80. package/src/lib/components/ai-site-build-page.component.js +160 -24
  81. package/src/lib/components/ai-site-build-page.component.js.map +1 -1
  82. package/src/lib/components/ai-upsell-dialog.component.d.ts +53 -0
  83. package/src/lib/components/ai-upsell-dialog.component.js +177 -0
  84. package/src/lib/components/ai-upsell-dialog.component.js.map +1 -0
  85. package/src/lib/components/assist-build-card.component.d.ts +42 -0
  86. package/src/lib/components/assist-build-card.component.js +183 -0
  87. package/src/lib/components/assist-build-card.component.js.map +1 -0
  88. package/src/lib/components/assist-edit-canvas.d.ts +2 -0
  89. package/src/lib/components/assist-edit-canvas.js +56 -1
  90. package/src/lib/components/assist-edit-canvas.js.map +1 -1
  91. package/src/lib/components/assist-jobs-drawer.component.js +48 -3
  92. package/src/lib/components/assist-jobs-drawer.component.js.map +1 -1
  93. package/src/lib/components/assist-panel.component.js +51 -2
  94. package/src/lib/components/assist-panel.component.js.map +1 -1
  95. package/src/lib/components/use-ai-job-run.d.ts +3 -14
  96. package/src/lib/components/use-ai-job-run.js +0 -50
  97. package/src/lib/components/use-ai-job-run.js.map +1 -1
  98. package/src/lib/jobs/ai-build-capabilities.d.ts +58 -0
  99. package/src/lib/jobs/ai-build-capabilities.js +256 -0
  100. package/src/lib/jobs/ai-build-capabilities.js.map +1 -0
  101. package/src/lib/jobs/ai-build-unit-outcome.d.ts +52 -0
  102. package/src/lib/jobs/ai-build-unit-outcome.js +140 -0
  103. package/src/lib/jobs/ai-build-unit-outcome.js.map +1 -0
  104. package/src/lib/jobs/ai-job-auto-confirm.d.ts +8 -0
  105. package/src/lib/jobs/ai-job-auto-confirm.js +30 -6
  106. package/src/lib/jobs/ai-job-auto-confirm.js.map +1 -1
  107. package/src/lib/jobs/ai-job-build-step.d.ts +144 -0
  108. package/src/lib/jobs/ai-job-build-step.js +668 -0
  109. package/src/lib/jobs/ai-job-build-step.js.map +1 -0
  110. package/src/lib/jobs/ai-job-draft-ids.js +9 -1
  111. package/src/lib/jobs/ai-job-draft-ids.js.map +1 -1
  112. package/src/lib/jobs/ai-job-drafts.d.ts +14 -4
  113. package/src/lib/jobs/ai-job-drafts.js +25 -4
  114. package/src/lib/jobs/ai-job-drafts.js.map +1 -1
  115. package/src/lib/jobs/ai-job-generation.d.ts +8 -0
  116. package/src/lib/jobs/ai-job-generation.js +13 -2
  117. package/src/lib/jobs/ai-job-generation.js.map +1 -1
  118. package/src/lib/jobs/ai-job-insight-step.js +8 -1
  119. package/src/lib/jobs/ai-job-insight-step.js.map +1 -1
  120. package/src/lib/jobs/ai-job-layout-language.d.ts +73 -0
  121. package/src/lib/jobs/ai-job-layout-language.js +194 -0
  122. package/src/lib/jobs/ai-job-layout-language.js.map +1 -0
  123. package/src/lib/jobs/ai-job-layout-site-pages.d.ts +13 -2
  124. package/src/lib/jobs/ai-job-layout-site-pages.js +18 -2
  125. package/src/lib/jobs/ai-job-layout-site-pages.js.map +1 -1
  126. package/src/lib/jobs/ai-job-layout-step.d.ts +5 -0
  127. package/src/lib/jobs/ai-job-layout-step.js +105 -5
  128. package/src/lib/jobs/ai-job-layout-step.js.map +1 -1
  129. package/src/lib/jobs/ai-job-logic-step.d.ts +107 -0
  130. package/src/lib/jobs/ai-job-logic-step.js +395 -0
  131. package/src/lib/jobs/ai-job-logic-step.js.map +1 -0
  132. package/src/lib/jobs/ai-job-overlay-copy.d.ts +70 -0
  133. package/src/lib/jobs/ai-job-overlay-copy.js +178 -0
  134. package/src/lib/jobs/ai-job-overlay-copy.js.map +1 -0
  135. package/src/lib/jobs/ai-job-page-language.d.ts +149 -0
  136. package/src/lib/jobs/ai-job-page-language.js +355 -0
  137. package/src/lib/jobs/ai-job-page-language.js.map +1 -0
  138. package/src/lib/jobs/ai-job-page-sections.d.ts +37 -1
  139. package/src/lib/jobs/ai-job-page-sections.js +93 -11
  140. package/src/lib/jobs/ai-job-page-sections.js.map +1 -1
  141. package/src/lib/jobs/ai-job-page-step.d.ts +4 -4
  142. package/src/lib/jobs/ai-job-page-step.js +111 -20
  143. package/src/lib/jobs/ai-job-page-step.js.map +1 -1
  144. package/src/lib/jobs/ai-job-plan-step.d.ts +27 -2
  145. package/src/lib/jobs/ai-job-plan-step.js +87 -13
  146. package/src/lib/jobs/ai-job-plan-step.js.map +1 -1
  147. package/src/lib/jobs/ai-job-site-step.d.ts +19 -1
  148. package/src/lib/jobs/ai-job-site-step.js +220 -61
  149. package/src/lib/jobs/ai-job-site-step.js.map +1 -1
  150. package/src/lib/jobs/ai-job-text-step.d.ts +22 -1
  151. package/src/lib/jobs/ai-job-text-step.js +12 -0
  152. package/src/lib/jobs/ai-job-text-step.js.map +1 -1
  153. package/src/lib/jobs/ai-job-workflow-step.d.ts +54 -4
  154. package/src/lib/jobs/ai-job-workflow-step.js +320 -15
  155. package/src/lib/jobs/ai-job-workflow-step.js.map +1 -1
  156. package/src/lib/jobs/ai-jobs.d.ts +80 -2
  157. package/src/lib/jobs/ai-jobs.js +391 -18
  158. package/src/lib/jobs/ai-jobs.js.map +1 -1
  159. package/src/lib/jobs/ai-layout-full-height.d.ts +40 -0
  160. package/src/lib/jobs/ai-layout-full-height.js +82 -0
  161. package/src/lib/jobs/ai-layout-full-height.js.map +1 -0
  162. package/src/lib/jobs/ai-layout-site-facts.d.ts +54 -0
  163. package/src/lib/jobs/ai-layout-site-facts.js +153 -0
  164. package/src/lib/jobs/ai-layout-site-facts.js.map +1 -0
  165. package/src/lib/jobs/ai-logic-records.d.ts +40 -0
  166. package/src/lib/jobs/ai-logic-records.js +55 -0
  167. package/src/lib/jobs/ai-logic-records.js.map +1 -0
  168. package/src/lib/jobs/ai-site-publish.d.ts +7 -0
  169. package/src/lib/jobs/ai-site-publish.js +9 -0
  170. package/src/lib/jobs/ai-site-publish.js.map +1 -1
  171. package/src/lib/jobs/ai-workflow-records.d.ts +4 -0
  172. package/src/lib/jobs/ai-workflow-records.js +40 -1
  173. package/src/lib/jobs/ai-workflow-records.js.map +1 -1
  174. package/src/lib/layout-language/ai-layout-compiler.d.ts +145 -0
  175. package/src/lib/layout-language/ai-layout-compiler.js +1148 -0
  176. package/src/lib/layout-language/ai-layout-compiler.js.map +1 -0
  177. package/src/lib/layout-language/ai-layout-copy.d.ts +73 -0
  178. package/src/lib/layout-language/ai-layout-copy.js +137 -0
  179. package/src/lib/layout-language/ai-layout-copy.js.map +1 -0
  180. package/src/lib/layout-language/ai-layout-frame.d.ts +52 -0
  181. package/src/lib/layout-language/ai-layout-frame.js +457 -0
  182. package/src/lib/layout-language/ai-layout-frame.js.map +1 -0
  183. package/src/lib/layout-language/ai-layout-gaps.d.ts +63 -0
  184. package/src/lib/layout-language/ai-layout-gaps.js +345 -0
  185. package/src/lib/layout-language/ai-layout-gaps.js.map +1 -0
  186. package/src/lib/layout-language/ai-layout-language.d.ts +161 -0
  187. package/src/lib/layout-language/ai-layout-language.js +446 -0
  188. package/src/lib/layout-language/ai-layout-language.js.map +1 -0
  189. package/src/lib/layout-language/ai-layout-links.d.ts +80 -0
  190. package/src/lib/layout-language/ai-layout-links.js +109 -0
  191. package/src/lib/layout-language/ai-layout-links.js.map +1 -0
  192. package/src/lib/layout-language/ai-layout-store.d.ts +39 -0
  193. package/src/lib/layout-language/ai-layout-store.js +69 -0
  194. package/src/lib/layout-language/ai-layout-store.js.map +1 -0
  195. package/src/lib/layout-language/ai-layout-tree.d.ts +59 -0
  196. package/src/lib/layout-language/ai-layout-tree.js +84 -0
  197. package/src/lib/layout-language/ai-layout-tree.js.map +1 -0
  198. package/src/lib/lazy-widget.d.ts +45 -0
  199. package/src/lib/lazy-widget.js +53 -0
  200. package/src/lib/lazy-widget.js.map +1 -0
  201. package/src/lib/model/ai-automation-draft.d.ts +18 -0
  202. package/src/lib/model/ai-automation-draft.js +86 -0
  203. package/src/lib/model/ai-automation-draft.js.map +1 -1
  204. package/src/lib/model/ai-build-job.d.ts +201 -0
  205. package/src/lib/model/ai-build-job.js +472 -0
  206. package/src/lib/model/ai-build-job.js.map +1 -0
  207. package/src/lib/model/ai-build-plan.d.ts +61 -0
  208. package/src/lib/model/ai-build-plan.js +154 -9
  209. package/src/lib/model/ai-build-plan.js.map +1 -1
  210. package/src/lib/model/ai-build-progress.d.ts +73 -0
  211. package/src/lib/model/ai-build-progress.js +170 -0
  212. package/src/lib/model/ai-build-progress.js.map +1 -0
  213. package/src/lib/model/ai-host-publish-context.d.ts +51 -0
  214. package/src/lib/model/ai-host-publish-context.js +104 -0
  215. package/src/lib/model/ai-host-publish-context.js.map +1 -0
  216. package/src/lib/model/ai-insight.d.ts +20 -10
  217. package/src/lib/model/ai-insight.js +72 -9
  218. package/src/lib/model/ai-insight.js.map +1 -1
  219. package/src/lib/model/ai-job-activity.d.ts +22 -0
  220. package/src/lib/model/ai-job-activity.js +25 -2
  221. package/src/lib/model/ai-job-activity.js.map +1 -1
  222. package/src/lib/model/ai-job-failure-copy.d.ts +38 -1
  223. package/src/lib/model/ai-job-failure-copy.js +56 -1
  224. package/src/lib/model/ai-job-failure-copy.js.map +1 -1
  225. package/src/lib/model/ai-job-notice.d.ts +3 -1
  226. package/src/lib/model/ai-job-notice.js +31 -9
  227. package/src/lib/model/ai-job-notice.js.map +1 -1
  228. package/src/lib/model/ai-jobs.types.d.ts +99 -2
  229. package/src/lib/model/ai-jobs.types.js +3 -1
  230. package/src/lib/model/ai-jobs.types.js.map +1 -1
  231. package/src/lib/model/ai-logic-job.d.ts +108 -0
  232. package/src/lib/model/ai-logic-job.js +327 -0
  233. package/src/lib/model/ai-logic-job.js.map +1 -0
  234. package/src/lib/model/ai-media-credits.d.ts +52 -0
  235. package/src/lib/model/ai-media-credits.js +61 -0
  236. package/src/lib/model/ai-media-credits.js.map +1 -0
  237. package/src/lib/model/ai-overlay-copy.d.ts +114 -0
  238. package/src/lib/model/ai-overlay-copy.js +175 -0
  239. package/src/lib/model/ai-overlay-copy.js.map +1 -0
  240. package/src/lib/model/ai-site-build-progress.d.ts +25 -4
  241. package/src/lib/model/ai-site-build-progress.js +194 -11
  242. package/src/lib/model/ai-site-build-progress.js.map +1 -1
  243. package/src/lib/model/ai-site-job.d.ts +8 -0
  244. package/src/lib/model/ai-site-job.js +9 -0
  245. package/src/lib/model/ai-site-job.js.map +1 -1
  246. package/src/lib/model/ai-site-start-seo.d.ts +1 -1
  247. package/src/lib/model/ai-site-start.d.ts +5 -2
  248. package/src/lib/model/ai-site-start.js +5 -2
  249. package/src/lib/model/ai-site-start.js.map +1 -1
  250. package/src/lib/model/ai-svg.d.ts +69 -0
  251. package/src/lib/model/ai-svg.js +265 -0
  252. package/src/lib/model/ai-svg.js.map +1 -0
  253. package/src/lib/model/ai-usage-by-user.d.ts +3 -2
  254. package/src/lib/model/ai-usage-by-user.js.map +1 -1
  255. package/src/lib/model/ai-workflow-job.d.ts +92 -4
  256. package/src/lib/model/ai-workflow-job.js +124 -7
  257. package/src/lib/model/ai-workflow-job.js.map +1 -1
  258. package/src/lib/model/assist-build.d.ts +58 -0
  259. package/src/lib/model/assist-build.js +52 -0
  260. package/src/lib/model/assist-build.js.map +1 -0
  261. package/src/lib/model/assist-edit.d.ts +48 -3
  262. package/src/lib/model/assist-edit.js +48 -4
  263. package/src/lib/model/assist-edit.js.map +1 -1
  264. package/src/lib/plugin-config.js +2 -0
  265. package/src/lib/plugin-config.js.map +1 -1
  266. package/src/lib/plugin.js +308 -47
  267. package/src/lib/plugin.js.map +1 -1
  268. package/src/lib/providers/catalog.d.ts +82 -5
  269. package/src/lib/providers/catalog.js +83 -12
  270. package/src/lib/providers/catalog.js.map +1 -1
  271. package/src/lib/providers/image-contract.d.ts +116 -0
  272. package/src/lib/providers/image-contract.js +74 -0
  273. package/src/lib/providers/image-contract.js.map +1 -0
  274. package/src/lib/providers/model-choice.js +11 -0
  275. package/src/lib/providers/model-choice.js.map +1 -1
  276. package/src/lib/providers/routing.js +18 -0
  277. package/src/lib/providers/routing.js.map +1 -1
  278. package/src/lib/providers/vertex-image.d.ts +121 -0
  279. package/src/lib/providers/vertex-image.js +312 -0
  280. package/src/lib/providers/vertex-image.js.map +1 -0
  281. package/src/lib/runtime/ai-doctrine-validators.d.ts +101 -0
  282. package/src/lib/runtime/ai-doctrine-validators.js +525 -4
  283. package/src/lib/runtime/ai-doctrine-validators.js.map +1 -1
  284. package/src/lib/runtime/ai-doctrine.js +21 -6
  285. package/src/lib/runtime/ai-doctrine.js.map +1 -1
  286. package/src/lib/runtime/ai-eval-live.js +4 -0
  287. package/src/lib/runtime/ai-eval-live.js.map +1 -1
  288. package/src/lib/runtime/ai-eval.d.ts +15 -1
  289. package/src/lib/runtime/ai-eval.js +52 -1
  290. package/src/lib/runtime/ai-eval.js.map +1 -1
  291. package/src/lib/runtime/ai-icon-library.d.ts +257 -0
  292. package/src/lib/runtime/ai-icon-library.js +254 -0
  293. package/src/lib/runtime/ai-icon-library.js.map +1 -0
  294. package/src/lib/runtime/ai-node-tree.d.ts +9 -0
  295. package/src/lib/runtime/ai-node-tree.js +30 -4
  296. package/src/lib/runtime/ai-node-tree.js.map +1 -1
  297. package/src/lib/runtime/ai-palette.d.ts +6 -0
  298. package/src/lib/runtime/ai-palette.generated.js +70 -0
  299. package/src/lib/runtime/ai-palette.generated.js.map +1 -1
  300. package/src/lib/runtime/ai-palette.js.map +1 -1
  301. package/src/lib/runtime/experiment-variant-copy.d.ts +34 -0
  302. package/src/lib/runtime/experiment-variant-copy.js +102 -0
  303. package/src/lib/runtime/experiment-variant-copy.js.map +1 -0
  304. package/src/lib/server/ai-experiment-versions.d.ts +51 -0
  305. package/src/lib/server/ai-experiment-versions.js +270 -0
  306. package/src/lib/server/ai-experiment-versions.js.map +1 -0
  307. package/src/lib/server/ai-jobs-resume.js +74 -4
  308. package/src/lib/server/ai-jobs-resume.js.map +1 -1
  309. package/src/lib/server/ai-media-image.d.ts +66 -0
  310. package/src/lib/server/ai-media-image.js +521 -0
  311. package/src/lib/server/ai-media-image.js.map +1 -0
  312. package/src/lib/server/ai-media-svg.d.ts +91 -0
  313. package/src/lib/server/ai-media-svg.js +186 -0
  314. package/src/lib/server/ai-media-svg.js.map +1 -0
  315. package/src/lib/server/assist-build.d.ts +54 -0
  316. package/src/lib/server/assist-build.js +121 -0
  317. package/src/lib/server/assist-build.js.map +1 -0
  318. package/src/lib/server/assist-chat.js +108 -12
  319. package/src/lib/server/assist-chat.js.map +1 -1
  320. package/src/lib/server/assist-edit.js +213 -3
  321. package/src/lib/server/assist-edit.js.map +1 -1
  322. package/src/lib/server/assist-view-context.js +242 -4
  323. package/src/lib/server/assist-view-context.js.map +1 -1
  324. package/src/lib/server.js +26 -0
  325. package/src/lib/server.js.map +1 -1
  326. package/src/lib/tools/ai-logic-tool.d.ts +27 -0
  327. package/src/lib/tools/ai-logic-tool.js +207 -0
  328. package/src/lib/tools/ai-logic-tool.js.map +1 -0
  329. package/src/lib/tools/ai-overlay-tool.d.ts +35 -0
  330. package/src/lib/tools/ai-overlay-tool.js +107 -0
  331. package/src/lib/tools/ai-overlay-tool.js.map +1 -0
  332. package/src/lib/tools/ai-workflow-tool.d.ts +17 -2
  333. package/src/lib/tools/ai-workflow-tool.js +47 -14
  334. package/src/lib/tools/ai-workflow-tool.js.map +1 -1
  335. package/src/lib/usage/assist-job-refund.d.ts +28 -1
  336. package/src/lib/usage/assist-job-refund.js +44 -9
  337. package/src/lib/usage/assist-job-refund.js.map +1 -1
  338. package/src/lib/usage/assist-usage.d.ts +5 -0
  339. package/src/lib/usage/assist-usage.js +2 -0
  340. package/src/lib/usage/assist-usage.js.map +1 -1
package/src/lib/plugin.js CHANGED
@@ -14,44 +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 AiCrmEmailDraft from "./components/ai-crm-email-draft.component.js";
43
- import AiCrmImportMapping from "./components/ai-crm-import-mapping.component.js";
44
- import AiCrmRecordCard from "./components/ai-crm-record-card.component.js";
45
- import AiDescribePageButton from "./components/ai-describe-page.component.js";
46
- import { AiDescribeComponentButton, AiDescribeFormButton, AiDescribeLayoutButton, AiDescribeTemplateButton } from "./components/ai-describe-button.component.js";
47
- import { AiExperimentResultCard, AiExperimentVariantsCard } from "./components/ai-experiment-cards.component.js";
48
- import { AiExplainAutomation, AiExplainRunFailure } from "./components/ai-explain-automation.component.js";
49
- import AiProductCopyCard from "./components/ai-product-copy-card.component.js";
50
- import AiProductImportOption from "./components/ai-product-import-option.component.js";
51
- import AiProductsHubCard from "./components/ai-products-hub-card.component.js";
52
- 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";
53
20
  import { AI_PLUGIN_ID } from "./constants.js";
54
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);
55
98
  /**
56
99
  * The Aglyn AI plugin's console half (AGL-2939): the assistant dock, the
57
100
  * besigner copy assistant's provider, the billing, member and staff cards,
@@ -351,26 +394,33 @@ import { registerAiDeclarations } from "./declarations.js";
351
394
  Component: AiSeoAuditCard
352
395
  },
353
396
  // A page from a brief (AGL-2907): "Create with AI" beside Templates and
354
- // Create New Screen. Gated as the other generative widgets are, and it
355
- // asks the jobs route about the release flag before it shows anything.
397
+ // Create New Screen. Gated as the other generative widgets are.
398
+ // On a plan that could buy the AI add-on and has not, each "Create with
399
+ // AI" entry here is mounted anyway (`showWhenNotEntitled`) and opens
400
+ // the add-on's dialog instead of the brief (AGL-3601). The shell holds
401
+ // each behind `release_ai_generative` too, so an entry draws at once
402
+ // and asks the jobs route nothing until its brief is sent.
356
403
  {
357
404
  slot: 'hostScreens',
358
405
  widgetId: 'ai-describe-page',
359
406
  title: 'Describe a page',
360
407
  featureFlag: 'aiGenerative',
361
408
  permission: 'ai.generate',
409
+ showWhenNotEntitled: true,
410
+ releaseFlag: 'release_ai_generative',
362
411
  Component: AiDescribePageButton
363
412
  },
364
413
  // The same entry for a page template, a layout and a form (AGL-3043),
365
414
  // beside the create action of the page that lists each: the same
366
- // dialog, the same gates, and the same question to the jobs route
367
- // before it shows anything.
415
+ // dialog and the same gates.
368
416
  {
369
417
  slot: 'hostTemplates',
370
418
  widgetId: 'ai-describe-template',
371
419
  title: 'Describe a page template',
372
420
  featureFlag: 'aiGenerative',
373
421
  permission: 'ai.generate',
422
+ showWhenNotEntitled: true,
423
+ releaseFlag: 'release_ai_generative',
374
424
  Component: AiDescribeTemplateButton
375
425
  },
376
426
  {
@@ -379,6 +429,8 @@ import { registerAiDeclarations } from "./declarations.js";
379
429
  title: 'Describe a layout',
380
430
  featureFlag: 'aiGenerative',
381
431
  permission: 'ai.generate',
432
+ showWhenNotEntitled: true,
433
+ releaseFlag: 'release_ai_generative',
382
434
  Component: AiDescribeLayoutButton
383
435
  },
384
436
  {
@@ -387,47 +439,186 @@ import { registerAiDeclarations } from "./declarations.js";
387
439
  title: 'Describe a form',
388
440
  featureFlag: 'aiGenerative',
389
441
  permission: 'ai.generate',
442
+ showWhenNotEntitled: true,
443
+ releaseFlag: 'release_ai_generative',
390
444
  Component: AiDescribeFormButton
391
445
  },
392
446
  // And a reusable component from a brief (AGL-3051), beside Templates
393
447
  // and Create Component: the component job's first entry point, which
394
448
  // had none in the console.
449
+ // Pictures from a description (AGL-3602): "Create with AI" beside Upload
450
+ // media in the media library, and in its empty state. Gated as the
451
+ // other generative widgets are, by the shell alone: it asks nothing of
452
+ // a server until someone creates a picture, and the door decides then.
453
+ {
454
+ slot: 'mediaLibrary',
455
+ widgetId: 'ai-media-create',
456
+ title: 'Create images with AI',
457
+ featureFlag: 'aiGenerative',
458
+ permission: 'ai.generate',
459
+ Component: AiMediaCreateButton
460
+ },
395
461
  {
396
462
  slot: 'hostComponents',
397
463
  widgetId: 'ai-describe-component',
398
464
  title: 'Describe a reusable component',
399
465
  featureFlag: 'aiGenerative',
400
466
  permission: 'ai.generate',
467
+ showWhenNotEntitled: true,
468
+ releaseFlag: 'release_ai_generative',
401
469
  Component: AiDescribeComponentButton
402
470
  },
471
+ // An email design from a brief (AGL-3596), beside New template on a
472
+ // site's email templates — the zone the email plugin hosts. Its dialog
473
+ // also offers the draft campaign that would send it; the Campaigns
474
+ // section's own door is `ai-create-campaign`, below.
475
+ {
476
+ slot: 'hostEmailTemplates',
477
+ widgetId: 'ai-describe-email',
478
+ title: 'Describe an email',
479
+ featureFlag: 'aiGenerative',
480
+ permission: 'ai.generate',
481
+ showWhenNotEntitled: true,
482
+ releaseFlag: 'release_ai_generative',
483
+ Component: AiDescribeEmailButton
484
+ },
403
485
  // Automations by AI (AGL-2919), in the zones the workflows plugin hosts
404
486
  // on its Automation page: "Create with AI" beside Add action and Recipes,
405
487
  // "Explain it" in the editor of a saved automation, and "Why did this
406
- // fail?" on a failed run. Gated as the other generative widgets are;
407
- // each asks the jobs route about the release flag before it shows
408
- // anything, and none of them changes an automation.
488
+ // fail?" on a failed run. Gated as the other generative widgets are,
489
+ // the release flag included, by the shell alone (AGL-3601): none asks
490
+ // the jobs route anything until it is used, and none of them changes an
491
+ // automation.
409
492
  {
410
493
  slot: 'hostAutomations',
411
494
  widgetId: 'ai-describe-automation',
412
495
  title: 'Describe an automation',
413
496
  featureFlag: 'aiGenerative',
414
497
  permission: 'ai.generate',
498
+ showWhenNotEntitled: true,
499
+ releaseFlag: 'release_ai_generative',
415
500
  Component: AiDescribeAutomationButton
416
501
  },
502
+ // Funnels by AI (AGL-3605), in the zones the funnels plugin hosts on
503
+ // its card: a draft from a description, and its results explained.
504
+ {
505
+ slot: 'funnelsCreate',
506
+ widgetId: 'ai-describe-funnel',
507
+ title: 'Describe a funnel',
508
+ featureFlag: 'aiGenerative',
509
+ permission: 'ai.generate',
510
+ showWhenNotEntitled: true,
511
+ releaseFlag: 'release_ai_generative',
512
+ Component: AiFunnelCreateButton
513
+ },
514
+ {
515
+ slot: 'funnelInsight',
516
+ widgetId: 'ai-explain-funnel',
517
+ title: 'Ask AI about this funnel',
518
+ featureFlag: 'aiGenerative',
519
+ permission: 'ai.generate',
520
+ showWhenNotEntitled: true,
521
+ releaseFlag: 'release_ai_generative',
522
+ Component: AiFunnelAskButton
523
+ },
417
524
  {
418
525
  slot: 'automationEditor',
419
526
  widgetId: 'ai-explain-automation',
420
527
  title: 'Explain this automation',
421
528
  featureFlag: 'aiGenerative',
422
529
  permission: 'ai.generate',
530
+ releaseFlag: 'release_ai_generative',
423
531
  Component: AiExplainAutomation
424
532
  },
533
+ // "Change with AI" and "Fix with AI" in a saved action's editor
534
+ // (AGL-3603): a changed copy drafted OFF beside it, never the saved
535
+ // action written in place.
536
+ {
537
+ slot: 'automationEditor',
538
+ widgetId: 'ai-revise-automation',
539
+ title: 'Change this automation with AI',
540
+ featureFlag: 'aiGenerative',
541
+ permission: 'ai.generate',
542
+ releaseFlag: 'release_ai_generative',
543
+ Component: AiReviseAutomation
544
+ },
545
+ // "Create with AI" on the workspace's Org automations (AGL-3603): one
546
+ // of the workspace's automations drafted from a description and opened
547
+ // in that section's editor, unsaved and switched off.
548
+ {
549
+ slot: 'orgAutomations',
550
+ widgetId: 'ai-describe-org-automation',
551
+ title: 'Describe an org automation',
552
+ featureFlag: 'aiGenerative',
553
+ permission: 'ai.generate',
554
+ showWhenNotEntitled: true,
555
+ releaseFlag: 'release_ai_generative',
556
+ Component: AiDescribeOrgAutomationButton
557
+ },
558
+ // "Ask AI about these numbers" (AGL-3603): a tile on a site's
559
+ // dashboard and Analytics page, which both draw `hostDashboard`, and on
560
+ // the workspace's sites page. It opens the insight dialog the Assist
561
+ // panel opens, gated as every generative widget is.
562
+ {
563
+ slot: 'hostDashboard',
564
+ widgetId: 'ai-insight-ask',
565
+ title: 'Ask AI about these numbers',
566
+ featureFlag: 'aiGenerative',
567
+ permission: 'ai.generate',
568
+ showWhenNotEntitled: true,
569
+ releaseFlag: 'release_ai_generative',
570
+ Component: AiInsightHostCard
571
+ },
572
+ {
573
+ slot: 'orgDashboard',
574
+ widgetId: 'ai-insight-ask',
575
+ title: 'Ask AI about these numbers',
576
+ featureFlag: 'aiGenerative',
577
+ permission: 'ai.generate',
578
+ showWhenNotEntitled: true,
579
+ releaseFlag: 'release_ai_generative',
580
+ Component: AiInsightOrgCard
581
+ },
582
+ // Logic by AI (AGL-3603), in the zones the logic plugin hosts on its
583
+ // Functions & Variables page: Create with AI in the Functions and
584
+ // Variables card headers, Explain / Change / Fix in a saved function's
585
+ // editor, and Fix with AI on a broken reference an automation holds.
586
+ // Each proposal opens unsaved in the logic editor; none is saved here.
587
+ {
588
+ slot: 'hostLogic',
589
+ widgetId: 'ai-describe-logic',
590
+ title: 'Describe a function or variable',
591
+ featureFlag: 'aiGenerative',
592
+ permission: 'ai.generate',
593
+ showWhenNotEntitled: true,
594
+ releaseFlag: 'release_ai_generative',
595
+ Component: AiLogicCreateButton
596
+ },
597
+ {
598
+ slot: 'logicFunctionEditor',
599
+ widgetId: 'ai-logic-function',
600
+ title: 'This function with AI',
601
+ featureFlag: 'aiGenerative',
602
+ permission: 'ai.generate',
603
+ releaseFlag: 'release_ai_generative',
604
+ Component: AiLogicFunctionTools
605
+ },
606
+ {
607
+ slot: 'logicReferenceIssue',
608
+ widgetId: 'ai-logic-fix-reference',
609
+ title: 'Fix this reference with AI',
610
+ featureFlag: 'aiGenerative',
611
+ permission: 'ai.generate',
612
+ releaseFlag: 'release_ai_generative',
613
+ Component: AiLogicFixReference
614
+ },
425
615
  {
426
616
  slot: 'automationRun',
427
617
  widgetId: 'ai-explain-run-failure',
428
618
  title: 'Why did this run fail?',
429
619
  featureFlag: 'aiGenerative',
430
620
  permission: 'ai.generate',
621
+ releaseFlag: 'release_ai_generative',
431
622
  Component: AiExplainRunFailure
432
623
  },
433
624
  // CRM by AI (AGL-2917): a record's summary and next step on its page,
@@ -504,8 +695,9 @@ import { registerAiDeclarations } from "./declarations.js";
504
695
  // Commerce by AI (AGL-2916): product copy in the product editor, the
505
696
  // catalog, categories and discounts on the products hub, and copy for
506
697
  // an import as it lands. The commerce plugin hosts the zones and makes
507
- // every write; each card asks the jobs route about the release flag
508
- // before it shows anything.
698
+ // every write. The shell holds the release flag; the products hub card
699
+ // reads its recent proposals before it draws its own controls, but
700
+ // offers the "Create with AI" door's brief from the moment it mounts.
509
701
  {
510
702
  slot: 'productEditor',
511
703
  widgetId: 'ai-product-copy',
@@ -520,8 +712,22 @@ import { registerAiDeclarations } from "./declarations.js";
520
712
  title: 'Build your catalog with AI',
521
713
  featureFlag: 'aiGenerative',
522
714
  permission: 'ai.generate',
715
+ releaseFlag: 'release_ai_generative',
523
716
  Component: AiProductsHubCard
524
717
  },
718
+ // "Create with AI" beside Add product and in the empty catalog
719
+ // (AGL-3596): a door to the card's Propose products brief, shown only
720
+ // while that card is on the page to take it.
721
+ {
722
+ slot: 'productsCreate',
723
+ widgetId: 'ai-products-create',
724
+ title: 'Propose products',
725
+ featureFlag: 'aiGenerative',
726
+ permission: 'ai.generate',
727
+ showWhenNotEntitled: true,
728
+ releaseFlag: 'release_ai_generative',
729
+ Component: AiCreateProductsButton
730
+ },
525
731
  {
526
732
  slot: 'productImport',
527
733
  widgetId: 'ai-product-import',
@@ -534,8 +740,8 @@ import { registerAiDeclarations } from "./declarations.js";
534
740
  // editor, and one test's result read in plain words below its figures.
535
741
  // The A/B testing card hosts both zones, so they are drawn only where
536
742
  // that card is and only on a site with A/B testing; the shell holds the
537
- // plan band and `ai.generate`, and each card asks the jobs route about
538
- // the release flag before it shows anything. Neither writes: the
743
+ // plan band, `ai.generate` and the release flag, and neither card asks
744
+ // the jobs route anything until it is used (AGL-3601). Neither writes: the
539
745
  // experiment editor's Save is the only write, and an explanation has
540
746
  // nothing to apply.
541
747
  {
@@ -544,6 +750,7 @@ import { registerAiDeclarations } from "./declarations.js";
544
750
  title: 'Write variants with AI',
545
751
  featureFlag: 'aiGenerative',
546
752
  permission: 'ai.generate',
753
+ releaseFlag: 'release_ai_generative',
547
754
  Component: AiExperimentVariantsCard
548
755
  },
549
756
  {
@@ -552,7 +759,61 @@ import { registerAiDeclarations } from "./declarations.js";
552
759
  title: 'Explain this result with AI',
553
760
  featureFlag: 'aiGenerative',
554
761
  permission: 'ai.generate',
762
+ releaseFlag: 'release_ai_generative',
555
763
  Component: AiExperimentResultCard
764
+ },
765
+ // Overlays by AI (AGL-3603), in the zones the marketing plugin's
766
+ // overlays list hosts: "Create with AI" beside New bar and New popup,
767
+ // and "Write with AI" among the overlay editor's fields. Both start a
768
+ // `text` job asked for overlay copy; neither writes — the list saves a
769
+ // created overlay switched off, and the editor's Save is the write.
770
+ {
771
+ slot: 'hostOverlays',
772
+ widgetId: 'ai-create-overlay',
773
+ title: 'Create an overlay with AI',
774
+ featureFlag: 'aiGenerative',
775
+ permission: 'ai.generate',
776
+ showWhenNotEntitled: true,
777
+ releaseFlag: 'release_ai_generative',
778
+ Component: AiCreateOverlayButton
779
+ },
780
+ {
781
+ slot: 'overlayEditor',
782
+ widgetId: 'ai-overlay-copy',
783
+ title: 'Write overlay copy with AI',
784
+ featureFlag: 'aiGenerative',
785
+ permission: 'ai.generate',
786
+ releaseFlag: 'release_ai_generative',
787
+ Component: AiOverlayEditorCard
788
+ },
789
+ // A campaign from a brief (AGL-3603), beside Create campaign on the
790
+ // Campaigns section the marketing plugin hosts: the `campaign` job's
791
+ // first console door, or the `email` job's where the plan sends no
792
+ // campaign email. Both write drafts that are aimed at nobody and sent
793
+ // by nobody until a member does.
794
+ {
795
+ slot: 'hostCampaigns',
796
+ widgetId: 'ai-create-campaign',
797
+ title: 'Create a campaign with AI',
798
+ featureFlag: 'aiGenerative',
799
+ permission: 'ai.generate',
800
+ showWhenNotEntitled: true,
801
+ releaseFlag: 'release_ai_generative',
802
+ Component: AiCreateCampaignButton
803
+ },
804
+ // The figures in words (AGL-3603), in the header of the Conversions
805
+ // section and of one campaign's report: the insight dialog the Assist
806
+ // panel opens, on the Marketing surface, for the site the figures are.
807
+ // It reads and cites; it changes nothing.
808
+ {
809
+ slot: 'marketingInsights',
810
+ widgetId: 'ai-marketing-insight',
811
+ title: 'Ask AI about these numbers',
812
+ featureFlag: 'aiGenerative',
813
+ permission: 'ai.generate',
814
+ showWhenNotEntitled: true,
815
+ releaseFlag: 'release_ai_generative',
816
+ Component: AiMarketingInsightButton
556
817
  }
557
818
  ]
558
819
  });