@aglyn/plugins-ai 1.0.0-beta.143

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 (717) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +25 -0
  3. package/package.json +60 -0
  4. package/src/index.d.ts +21 -0
  5. package/src/index.js +22 -0
  6. package/src/index.js.map +1 -0
  7. package/src/lib/activity/ai-activity-actions.d.ts +106 -0
  8. package/src/lib/activity/ai-activity-actions.js +209 -0
  9. package/src/lib/activity/ai-activity-actions.js.map +1 -0
  10. package/src/lib/activity/ai-activity.d.ts +219 -0
  11. package/src/lib/activity/ai-activity.js +251 -0
  12. package/src/lib/activity/ai-activity.js.map +1 -0
  13. package/src/lib/billing/ai-overage-charge.d.ts +102 -0
  14. package/src/lib/billing/ai-overage-charge.js +258 -0
  15. package/src/lib/billing/ai-overage-charge.js.map +1 -0
  16. package/src/lib/billing/ai-overage-close.d.ts +62 -0
  17. package/src/lib/billing/ai-overage-close.js +129 -0
  18. package/src/lib/billing/ai-overage-close.js.map +1 -0
  19. package/src/lib/billing/ai-overage-cutover.d.ts +63 -0
  20. package/src/lib/billing/ai-overage-cutover.js +114 -0
  21. package/src/lib/billing/ai-overage-cutover.js.map +1 -0
  22. package/src/lib/billing/ai-overage-events.d.ts +77 -0
  23. package/src/lib/billing/ai-overage-events.js +174 -0
  24. package/src/lib/billing/ai-overage-events.js.map +1 -0
  25. package/src/lib/billing/ai-overage-gate.d.ts +147 -0
  26. package/src/lib/billing/ai-overage-gate.js +177 -0
  27. package/src/lib/billing/ai-overage-gate.js.map +1 -0
  28. package/src/lib/billing/ai-overage-ledger.d.ts +135 -0
  29. package/src/lib/billing/ai-overage-ledger.js +278 -0
  30. package/src/lib/billing/ai-overage-ledger.js.map +1 -0
  31. package/src/lib/billing/ai-overage-standing-writes.d.ts +110 -0
  32. package/src/lib/billing/ai-overage-standing-writes.js +205 -0
  33. package/src/lib/billing/ai-overage-standing-writes.js.map +1 -0
  34. package/src/lib/billing/ai-overage-standing.d.ts +168 -0
  35. package/src/lib/billing/ai-overage-standing.js +215 -0
  36. package/src/lib/billing/ai-overage-standing.js.map +1 -0
  37. package/src/lib/billing/ai-overage-trigger.d.ts +30 -0
  38. package/src/lib/billing/ai-overage-trigger.js +76 -0
  39. package/src/lib/billing/ai-overage-trigger.js.map +1 -0
  40. package/src/lib/components/ai-allotment-editor.component.d.ts +40 -0
  41. package/src/lib/components/ai-allotment-editor.component.js +213 -0
  42. package/src/lib/components/ai-allotment-editor.component.js.map +1 -0
  43. package/src/lib/components/ai-assist-actions-context.d.ts +13 -0
  44. package/src/lib/components/ai-assist-actions-context.js +21 -0
  45. package/src/lib/components/ai-assist-actions-context.js.map +1 -0
  46. package/src/lib/components/ai-assist-provider.component.d.ts +51 -0
  47. package/src/lib/components/ai-assist-provider.component.js +519 -0
  48. package/src/lib/components/ai-assist-provider.component.js.map +1 -0
  49. package/src/lib/components/ai-brief-dialog.component.d.ts +56 -0
  50. package/src/lib/components/ai-brief-dialog.component.js +319 -0
  51. package/src/lib/components/ai-brief-dialog.component.js.map +1 -0
  52. package/src/lib/components/ai-collaborator-permissions-column.component.d.ts +32 -0
  53. package/src/lib/components/ai-collaborator-permissions-column.component.js +132 -0
  54. package/src/lib/components/ai-collaborator-permissions-column.component.js.map +1 -0
  55. package/src/lib/components/ai-credits-card.component.d.ts +34 -0
  56. package/src/lib/components/ai-credits-card.component.js +131 -0
  57. package/src/lib/components/ai-credits-card.component.js.map +1 -0
  58. package/src/lib/components/ai-credits-columns.component.d.ts +56 -0
  59. package/src/lib/components/ai-credits-columns.component.js +118 -0
  60. package/src/lib/components/ai-credits-columns.component.js.map +1 -0
  61. package/src/lib/components/ai-crm-email-draft.component.d.ts +17 -0
  62. package/src/lib/components/ai-crm-email-draft.component.js +159 -0
  63. package/src/lib/components/ai-crm-email-draft.component.js.map +1 -0
  64. package/src/lib/components/ai-crm-import-mapping.component.d.ts +20 -0
  65. package/src/lib/components/ai-crm-import-mapping.component.js +167 -0
  66. package/src/lib/components/ai-crm-import-mapping.component.js.map +1 -0
  67. package/src/lib/components/ai-crm-record-card.component.d.ts +27 -0
  68. package/src/lib/components/ai-crm-record-card.component.js +263 -0
  69. package/src/lib/components/ai-crm-record-card.component.js.map +1 -0
  70. package/src/lib/components/ai-describe-automation.component.d.ts +31 -0
  71. package/src/lib/components/ai-describe-automation.component.js +226 -0
  72. package/src/lib/components/ai-describe-automation.component.js.map +1 -0
  73. package/src/lib/components/ai-describe-button.component.d.ts +39 -0
  74. package/src/lib/components/ai-describe-button.component.js +87 -0
  75. package/src/lib/components/ai-describe-button.component.js.map +1 -0
  76. package/src/lib/components/ai-describe-page.component.d.ts +26 -0
  77. package/src/lib/components/ai-describe-page.component.js +18 -0
  78. package/src/lib/components/ai-describe-page.component.js.map +1 -0
  79. package/src/lib/components/ai-experiment-cards.component.d.ts +75 -0
  80. package/src/lib/components/ai-experiment-cards.component.js +573 -0
  81. package/src/lib/components/ai-experiment-cards.component.js.map +1 -0
  82. package/src/lib/components/ai-explain-automation.component.d.ts +31 -0
  83. package/src/lib/components/ai-explain-automation.component.js +265 -0
  84. package/src/lib/components/ai-explain-automation.component.js.map +1 -0
  85. package/src/lib/components/ai-insight-dialog.component.d.ts +37 -0
  86. package/src/lib/components/ai-insight-dialog.component.js +441 -0
  87. package/src/lib/components/ai-insight-dialog.component.js.map +1 -0
  88. package/src/lib/components/ai-job-plan.component.d.ts +46 -0
  89. package/src/lib/components/ai-job-plan.component.js +192 -0
  90. package/src/lib/components/ai-job-plan.component.js.map +1 -0
  91. package/src/lib/components/ai-model-selector.component.d.ts +21 -0
  92. package/src/lib/components/ai-model-selector.component.js +109 -0
  93. package/src/lib/components/ai-model-selector.component.js.map +1 -0
  94. package/src/lib/components/ai-page-brief-dialog.component.d.ts +29 -0
  95. package/src/lib/components/ai-page-brief-dialog.component.js +27 -0
  96. package/src/lib/components/ai-page-brief-dialog.component.js.map +1 -0
  97. package/src/lib/components/ai-permissions-on-host.component.d.ts +55 -0
  98. package/src/lib/components/ai-permissions-on-host.component.js +91 -0
  99. package/src/lib/components/ai-permissions-on-host.component.js.map +1 -0
  100. package/src/lib/components/ai-product-copy-card.component.d.ts +25 -0
  101. package/src/lib/components/ai-product-copy-card.component.js +328 -0
  102. package/src/lib/components/ai-product-copy-card.component.js.map +1 -0
  103. package/src/lib/components/ai-product-import-option.component.d.ts +14 -0
  104. package/src/lib/components/ai-product-import-option.component.js +58 -0
  105. package/src/lib/components/ai-product-import-option.component.js.map +1 -0
  106. package/src/lib/components/ai-products-hub-card.component.d.ts +15 -0
  107. package/src/lib/components/ai-products-hub-card.component.js +418 -0
  108. package/src/lib/components/ai-products-hub-card.component.js.map +1 -0
  109. package/src/lib/components/ai-products-proposals.component.d.ts +19 -0
  110. package/src/lib/components/ai-products-proposals.component.js +547 -0
  111. package/src/lib/components/ai-products-proposals.component.js.map +1 -0
  112. package/src/lib/components/ai-save-as-component.component.d.ts +38 -0
  113. package/src/lib/components/ai-save-as-component.component.js +231 -0
  114. package/src/lib/components/ai-save-as-component.component.js.map +1 -0
  115. package/src/lib/components/ai-seo-audit-card.component.d.ts +9 -0
  116. package/src/lib/components/ai-seo-audit-card.component.js +620 -0
  117. package/src/lib/components/ai-seo-audit-card.component.js.map +1 -0
  118. package/src/lib/components/ai-seo-fields-card.component.d.ts +10 -0
  119. package/src/lib/components/ai-seo-fields-card.component.js +453 -0
  120. package/src/lib/components/ai-seo-fields-card.component.js.map +1 -0
  121. package/src/lib/components/ai-site-batch-card.component.d.ts +32 -0
  122. package/src/lib/components/ai-site-batch-card.component.js +531 -0
  123. package/src/lib/components/ai-site-batch-card.component.js.map +1 -0
  124. package/src/lib/components/ai-site-seo-start-card.component.d.ts +26 -0
  125. package/src/lib/components/ai-site-seo-start-card.component.js +178 -0
  126. package/src/lib/components/ai-site-seo-start-card.component.js.map +1 -0
  127. package/src/lib/components/ai-site-start-card.component.d.ts +19 -0
  128. package/src/lib/components/ai-site-start-card.component.js +348 -0
  129. package/src/lib/components/ai-site-start-card.component.js.map +1 -0
  130. package/src/lib/components/ai-template-collection-field.component.d.ts +32 -0
  131. package/src/lib/components/ai-template-collection-field.component.js +63 -0
  132. package/src/lib/components/ai-template-collection-field.component.js.map +1 -0
  133. package/src/lib/components/ai-theme-proposal-card.component.d.ts +6 -0
  134. package/src/lib/components/ai-theme-proposal-card.component.js +619 -0
  135. package/src/lib/components/ai-theme-proposal-card.component.js.map +1 -0
  136. package/src/lib/components/ai-usage-strip.component.d.ts +27 -0
  137. package/src/lib/components/ai-usage-strip.component.js +145 -0
  138. package/src/lib/components/ai-usage-strip.component.js.map +1 -0
  139. package/src/lib/components/assist-edit-canvas.d.ts +169 -0
  140. package/src/lib/components/assist-edit-canvas.js +636 -0
  141. package/src/lib/components/assist-edit-canvas.js.map +1 -0
  142. package/src/lib/components/assist-edit-card.component.d.ts +16 -0
  143. package/src/lib/components/assist-edit-card.component.js +181 -0
  144. package/src/lib/components/assist-edit-card.component.js.map +1 -0
  145. package/src/lib/components/assist-jobs-drawer.component.d.ts +72 -0
  146. package/src/lib/components/assist-jobs-drawer.component.js +626 -0
  147. package/src/lib/components/assist-jobs-drawer.component.js.map +1 -0
  148. package/src/lib/components/assist-panel.component.d.ts +136 -0
  149. package/src/lib/components/assist-panel.component.js +1099 -0
  150. package/src/lib/components/assist-panel.component.js.map +1 -0
  151. package/src/lib/components/assist-signals-page.component.d.ts +3 -0
  152. package/src/lib/components/assist-signals-page.component.js +1017 -0
  153. package/src/lib/components/assist-signals-page.component.js.map +1 -0
  154. package/src/lib/components/besigner-ai-controls.component.d.ts +29 -0
  155. package/src/lib/components/besigner-ai-controls.component.js +81 -0
  156. package/src/lib/components/besigner-ai-controls.component.js.map +1 -0
  157. package/src/lib/components/billing-ai-allotments.component.d.ts +36 -0
  158. package/src/lib/components/billing-ai-allotments.component.js +486 -0
  159. package/src/lib/components/billing-ai-allotments.component.js.map +1 -0
  160. package/src/lib/components/billing-ai-top-users.component.d.ts +44 -0
  161. package/src/lib/components/billing-ai-top-users.component.js +304 -0
  162. package/src/lib/components/billing-ai-top-users.component.js.map +1 -0
  163. package/src/lib/components/billing-assist-overage-card.component.d.ts +69 -0
  164. package/src/lib/components/billing-assist-overage-card.component.js +437 -0
  165. package/src/lib/components/billing-assist-overage-card.component.js.map +1 -0
  166. package/src/lib/components/host-ai-allotments.component.d.ts +40 -0
  167. package/src/lib/components/host-ai-allotments.component.js +239 -0
  168. package/src/lib/components/host-ai-allotments.component.js.map +1 -0
  169. package/src/lib/components/member-ai-allotment-card.component.d.ts +28 -0
  170. package/src/lib/components/member-ai-allotment-card.component.js +172 -0
  171. package/src/lib/components/member-ai-allotment-card.component.js.map +1 -0
  172. package/src/lib/components/member-ai-usage-card.component.d.ts +28 -0
  173. package/src/lib/components/member-ai-usage-card.component.js +240 -0
  174. package/src/lib/components/member-ai-usage-card.component.js.map +1 -0
  175. package/src/lib/components/staff-org-ai-card.component.d.ts +17 -0
  176. package/src/lib/components/staff-org-ai-card.component.js +739 -0
  177. package/src/lib/components/staff-org-ai-card.component.js.map +1 -0
  178. package/src/lib/components/staff-org-usage-ai-columns.component.d.ts +41 -0
  179. package/src/lib/components/staff-org-usage-ai-columns.component.js +65 -0
  180. package/src/lib/components/staff-org-usage-ai-columns.component.js.map +1 -0
  181. package/src/lib/components/staff-orgs-ai-spend-column.component.d.ts +28 -0
  182. package/src/lib/components/staff-orgs-ai-spend-column.component.js +89 -0
  183. package/src/lib/components/staff-orgs-ai-spend-column.component.js.map +1 -0
  184. package/src/lib/components/staff-user-ai-usage-card.component.d.ts +27 -0
  185. package/src/lib/components/staff-user-ai-usage-card.component.js +183 -0
  186. package/src/lib/components/staff-user-ai-usage-card.component.js.map +1 -0
  187. package/src/lib/components/use-ai-allotments.d.ts +49 -0
  188. package/src/lib/components/use-ai-allotments.js +171 -0
  189. package/src/lib/components/use-ai-allotments.js.map +1 -0
  190. package/src/lib/components/use-ai-crm-answer.d.ts +50 -0
  191. package/src/lib/components/use-ai-crm-answer.js +220 -0
  192. package/src/lib/components/use-ai-crm-answer.js.map +1 -0
  193. package/src/lib/components/use-ai-job-run.d.ts +51 -0
  194. package/src/lib/components/use-ai-job-run.js +176 -0
  195. package/src/lib/components/use-ai-job-run.js.map +1 -0
  196. package/src/lib/components/use-ai-model-choice.d.ts +47 -0
  197. package/src/lib/components/use-ai-model-choice.js +150 -0
  198. package/src/lib/components/use-ai-model-choice.js.map +1 -0
  199. package/src/lib/components/use-ai-products-jobs.d.ts +36 -0
  200. package/src/lib/components/use-ai-products-jobs.js +190 -0
  201. package/src/lib/components/use-ai-products-jobs.js.map +1 -0
  202. package/src/lib/components/use-ai-usage-meter.d.ts +11 -0
  203. package/src/lib/components/use-ai-usage-meter.js +96 -0
  204. package/src/lib/components/use-ai-usage-meter.js.map +1 -0
  205. package/src/lib/components/use-org-ai-usage.d.ts +42 -0
  206. package/src/lib/components/use-org-ai-usage.js +181 -0
  207. package/src/lib/components/use-org-ai-usage.js.map +1 -0
  208. package/src/lib/components/use-staff-orgs-ai-spend.d.ts +18 -0
  209. package/src/lib/components/use-staff-orgs-ai-spend.js +127 -0
  210. package/src/lib/components/use-staff-orgs-ai-spend.js.map +1 -0
  211. package/src/lib/constants.d.ts +24 -0
  212. package/src/lib/constants.js +23 -0
  213. package/src/lib/constants.js.map +1 -0
  214. package/src/lib/declarations.d.ts +48 -0
  215. package/src/lib/declarations.js +129 -0
  216. package/src/lib/declarations.js.map +1 -0
  217. package/src/lib/declarations.server.d.ts +35 -0
  218. package/src/lib/declarations.server.js +138 -0
  219. package/src/lib/declarations.server.js.map +1 -0
  220. package/src/lib/insights/ai-figure-readers.d.ts +90 -0
  221. package/src/lib/insights/ai-figure-readers.js +863 -0
  222. package/src/lib/insights/ai-figure-readers.js.map +1 -0
  223. package/src/lib/insights/ai-insight-digest.d.ts +165 -0
  224. package/src/lib/insights/ai-insight-digest.js +363 -0
  225. package/src/lib/insights/ai-insight-digest.js.map +1 -0
  226. package/src/lib/insights/ai-insight-readers.d.ts +71 -0
  227. package/src/lib/insights/ai-insight-readers.js +141 -0
  228. package/src/lib/insights/ai-insight-readers.js.map +1 -0
  229. package/src/lib/jobs/ai-crm-access.d.ts +61 -0
  230. package/src/lib/jobs/ai-crm-access.js +94 -0
  231. package/src/lib/jobs/ai-crm-access.js.map +1 -0
  232. package/src/lib/jobs/ai-email-bindings.d.ts +97 -0
  233. package/src/lib/jobs/ai-email-bindings.js +147 -0
  234. package/src/lib/jobs/ai-email-bindings.js.map +1 -0
  235. package/src/lib/jobs/ai-job-admission.d.ts +82 -0
  236. package/src/lib/jobs/ai-job-admission.js +45 -0
  237. package/src/lib/jobs/ai-job-admission.js.map +1 -0
  238. package/src/lib/jobs/ai-job-budget.d.ts +167 -0
  239. package/src/lib/jobs/ai-job-budget.js +161 -0
  240. package/src/lib/jobs/ai-job-budget.js.map +1 -0
  241. package/src/lib/jobs/ai-job-campaign-step.d.ts +108 -0
  242. package/src/lib/jobs/ai-job-campaign-step.js +340 -0
  243. package/src/lib/jobs/ai-job-campaign-step.js.map +1 -0
  244. package/src/lib/jobs/ai-job-component-checks.d.ts +74 -0
  245. package/src/lib/jobs/ai-job-component-checks.js +442 -0
  246. package/src/lib/jobs/ai-job-component-checks.js.map +1 -0
  247. package/src/lib/jobs/ai-job-component-step.d.ts +75 -0
  248. package/src/lib/jobs/ai-job-component-step.js +262 -0
  249. package/src/lib/jobs/ai-job-component-step.js.map +1 -0
  250. package/src/lib/jobs/ai-job-crm-step.d.ts +192 -0
  251. package/src/lib/jobs/ai-job-crm-step.js +734 -0
  252. package/src/lib/jobs/ai-job-crm-step.js.map +1 -0
  253. package/src/lib/jobs/ai-job-draft-ids.d.ts +62 -0
  254. package/src/lib/jobs/ai-job-draft-ids.js +132 -0
  255. package/src/lib/jobs/ai-job-draft-ids.js.map +1 -0
  256. package/src/lib/jobs/ai-job-drafts.d.ts +304 -0
  257. package/src/lib/jobs/ai-job-drafts.js +557 -0
  258. package/src/lib/jobs/ai-job-drafts.js.map +1 -0
  259. package/src/lib/jobs/ai-job-email-step.d.ts +195 -0
  260. package/src/lib/jobs/ai-job-email-step.js +547 -0
  261. package/src/lib/jobs/ai-job-email-step.js.map +1 -0
  262. package/src/lib/jobs/ai-job-experiment-step.d.ts +105 -0
  263. package/src/lib/jobs/ai-job-experiment-step.js +445 -0
  264. package/src/lib/jobs/ai-job-experiment-step.js.map +1 -0
  265. package/src/lib/jobs/ai-job-form-step.d.ts +250 -0
  266. package/src/lib/jobs/ai-job-form-step.js +634 -0
  267. package/src/lib/jobs/ai-job-form-step.js.map +1 -0
  268. package/src/lib/jobs/ai-job-generation.d.ts +114 -0
  269. package/src/lib/jobs/ai-job-generation.js +384 -0
  270. package/src/lib/jobs/ai-job-generation.js.map +1 -0
  271. package/src/lib/jobs/ai-job-insight-budget.d.ts +41 -0
  272. package/src/lib/jobs/ai-job-insight-budget.js +46 -0
  273. package/src/lib/jobs/ai-job-insight-budget.js.map +1 -0
  274. package/src/lib/jobs/ai-job-insight-step.d.ts +58 -0
  275. package/src/lib/jobs/ai-job-insight-step.js +350 -0
  276. package/src/lib/jobs/ai-job-insight-step.js.map +1 -0
  277. package/src/lib/jobs/ai-job-layout-step.d.ts +103 -0
  278. package/src/lib/jobs/ai-job-layout-step.js +340 -0
  279. package/src/lib/jobs/ai-job-layout-step.js.map +1 -0
  280. package/src/lib/jobs/ai-job-page-budget.d.ts +57 -0
  281. package/src/lib/jobs/ai-job-page-budget.js +60 -0
  282. package/src/lib/jobs/ai-job-page-budget.js.map +1 -0
  283. package/src/lib/jobs/ai-job-page-sections.d.ts +150 -0
  284. package/src/lib/jobs/ai-job-page-sections.js +450 -0
  285. package/src/lib/jobs/ai-job-page-sections.js.map +1 -0
  286. package/src/lib/jobs/ai-job-page-step.d.ts +198 -0
  287. package/src/lib/jobs/ai-job-page-step.js +667 -0
  288. package/src/lib/jobs/ai-job-page-step.js.map +1 -0
  289. package/src/lib/jobs/ai-job-plan-conformance.d.ts +107 -0
  290. package/src/lib/jobs/ai-job-plan-conformance.js +164 -0
  291. package/src/lib/jobs/ai-job-plan-conformance.js.map +1 -0
  292. package/src/lib/jobs/ai-job-plan-step.d.ts +196 -0
  293. package/src/lib/jobs/ai-job-plan-step.js +458 -0
  294. package/src/lib/jobs/ai-job-plan-step.js.map +1 -0
  295. package/src/lib/jobs/ai-job-plugin-drafts.d.ts +76 -0
  296. package/src/lib/jobs/ai-job-plugin-drafts.js +91 -0
  297. package/src/lib/jobs/ai-job-plugin-drafts.js.map +1 -0
  298. package/src/lib/jobs/ai-job-products-step.d.ts +106 -0
  299. package/src/lib/jobs/ai-job-products-step.js +436 -0
  300. package/src/lib/jobs/ai-job-products-step.js.map +1 -0
  301. package/src/lib/jobs/ai-job-seo-budget.d.ts +52 -0
  302. package/src/lib/jobs/ai-job-seo-budget.js +63 -0
  303. package/src/lib/jobs/ai-job-seo-budget.js.map +1 -0
  304. package/src/lib/jobs/ai-job-seo-step.d.ts +145 -0
  305. package/src/lib/jobs/ai-job-seo-step.js +809 -0
  306. package/src/lib/jobs/ai-job-seo-step.js.map +1 -0
  307. package/src/lib/jobs/ai-job-site-step.d.ts +252 -0
  308. package/src/lib/jobs/ai-job-site-step.js +538 -0
  309. package/src/lib/jobs/ai-job-site-step.js.map +1 -0
  310. package/src/lib/jobs/ai-job-template-step.d.ts +105 -0
  311. package/src/lib/jobs/ai-job-template-step.js +391 -0
  312. package/src/lib/jobs/ai-job-template-step.js.map +1 -0
  313. package/src/lib/jobs/ai-job-text-step.d.ts +125 -0
  314. package/src/lib/jobs/ai-job-text-step.js +128 -0
  315. package/src/lib/jobs/ai-job-text-step.js.map +1 -0
  316. package/src/lib/jobs/ai-job-theme-budget.d.ts +38 -0
  317. package/src/lib/jobs/ai-job-theme-budget.js +43 -0
  318. package/src/lib/jobs/ai-job-theme-budget.js.map +1 -0
  319. package/src/lib/jobs/ai-job-theme-step.d.ts +115 -0
  320. package/src/lib/jobs/ai-job-theme-step.js +337 -0
  321. package/src/lib/jobs/ai-job-theme-step.js.map +1 -0
  322. package/src/lib/jobs/ai-job-workflow-step.d.ts +139 -0
  323. package/src/lib/jobs/ai-job-workflow-step.js +530 -0
  324. package/src/lib/jobs/ai-job-workflow-step.js.map +1 -0
  325. package/src/lib/jobs/ai-jobs-beat.d.ts +78 -0
  326. package/src/lib/jobs/ai-jobs-beat.js +93 -0
  327. package/src/lib/jobs/ai-jobs-beat.js.map +1 -0
  328. package/src/lib/jobs/ai-jobs-pause.d.ts +38 -0
  329. package/src/lib/jobs/ai-jobs-pause.js +45 -0
  330. package/src/lib/jobs/ai-jobs-pause.js.map +1 -0
  331. package/src/lib/jobs/ai-jobs.d.ts +558 -0
  332. package/src/lib/jobs/ai-jobs.js +1410 -0
  333. package/src/lib/jobs/ai-jobs.js.map +1 -0
  334. package/src/lib/jobs/ai-media-asset-server.d.ts +34 -0
  335. package/src/lib/jobs/ai-media-asset-server.js +34 -0
  336. package/src/lib/jobs/ai-media-asset-server.js.map +1 -0
  337. package/src/lib/jobs/ai-media-asset.d.ts +59 -0
  338. package/src/lib/jobs/ai-media-asset.js +86 -0
  339. package/src/lib/jobs/ai-media-asset.js.map +1 -0
  340. package/src/lib/jobs/ai-product-image.d.ts +78 -0
  341. package/src/lib/jobs/ai-product-image.js +113 -0
  342. package/src/lib/jobs/ai-product-image.js.map +1 -0
  343. package/src/lib/jobs/ai-theme-brand-inputs.d.ts +125 -0
  344. package/src/lib/jobs/ai-theme-brand-inputs.js +378 -0
  345. package/src/lib/jobs/ai-theme-brand-inputs.js.map +1 -0
  346. package/src/lib/jobs/ai-theme-brand-server.d.ts +33 -0
  347. package/src/lib/jobs/ai-theme-brand-server.js +33 -0
  348. package/src/lib/jobs/ai-theme-brand-server.js.map +1 -0
  349. package/src/lib/jobs/ai-workflow-records.d.ts +84 -0
  350. package/src/lib/jobs/ai-workflow-records.js +158 -0
  351. package/src/lib/jobs/ai-workflow-records.js.map +1 -0
  352. package/src/lib/jobs/fixtures/ai-free-page-built-recording.d.ts +31 -0
  353. package/src/lib/jobs/fixtures/ai-free-page-built-recording.js +367 -0
  354. package/src/lib/jobs/fixtures/ai-free-page-built-recording.js.map +1 -0
  355. package/src/lib/jobs/fixtures/ai-free-page-recording.d.ts +69 -0
  356. package/src/lib/jobs/fixtures/ai-free-page-recording.js +442 -0
  357. package/src/lib/jobs/fixtures/ai-free-page-recording.js.map +1 -0
  358. package/src/lib/jobs/fixtures/ai-page-briefs.d.ts +146 -0
  359. package/src/lib/jobs/fixtures/ai-page-briefs.js +1850 -0
  360. package/src/lib/jobs/fixtures/ai-page-briefs.js.map +1 -0
  361. package/src/lib/model/ai-allotments.d.ts +208 -0
  362. package/src/lib/model/ai-allotments.js +269 -0
  363. package/src/lib/model/ai-allotments.js.map +1 -0
  364. package/src/lib/model/ai-automation-draft.d.ts +74 -0
  365. package/src/lib/model/ai-automation-draft.js +310 -0
  366. package/src/lib/model/ai-automation-draft.js.map +1 -0
  367. package/src/lib/model/ai-automation-outline.d.ts +50 -0
  368. package/src/lib/model/ai-automation-outline.js +262 -0
  369. package/src/lib/model/ai-automation-outline.js.map +1 -0
  370. package/src/lib/model/ai-build-plan.d.ts +197 -0
  371. package/src/lib/model/ai-build-plan.js +438 -0
  372. package/src/lib/model/ai-build-plan.js.map +1 -0
  373. package/src/lib/model/ai-crm.d.ts +237 -0
  374. package/src/lib/model/ai-crm.js +225 -0
  375. package/src/lib/model/ai-crm.js.map +1 -0
  376. package/src/lib/model/ai-experiment-proposal.d.ts +68 -0
  377. package/src/lib/model/ai-experiment-proposal.js +146 -0
  378. package/src/lib/model/ai-experiment-proposal.js.map +1 -0
  379. package/src/lib/model/ai-experiment.d.ts +309 -0
  380. package/src/lib/model/ai-experiment.js +395 -0
  381. package/src/lib/model/ai-experiment.js.map +1 -0
  382. package/src/lib/model/ai-insight.d.ts +178 -0
  383. package/src/lib/model/ai-insight.js +201 -0
  384. package/src/lib/model/ai-insight.js.map +1 -0
  385. package/src/lib/model/ai-jobs.types.d.ts +412 -0
  386. package/src/lib/model/ai-jobs.types.js +42 -0
  387. package/src/lib/model/ai-jobs.types.js.map +1 -0
  388. package/src/lib/model/ai-page-job.d.ts +92 -0
  389. package/src/lib/model/ai-page-job.js +159 -0
  390. package/src/lib/model/ai-page-job.js.map +1 -0
  391. package/src/lib/model/ai-permissions.d.ts +49 -0
  392. package/src/lib/model/ai-permissions.js +97 -0
  393. package/src/lib/model/ai-permissions.js.map +1 -0
  394. package/src/lib/model/ai-plan-capabilities.d.ts +139 -0
  395. package/src/lib/model/ai-plan-capabilities.js +149 -0
  396. package/src/lib/model/ai-plan-capabilities.js.map +1 -0
  397. package/src/lib/model/ai-products.d.ts +251 -0
  398. package/src/lib/model/ai-products.js +253 -0
  399. package/src/lib/model/ai-products.js.map +1 -0
  400. package/src/lib/model/ai-seo.d.ts +208 -0
  401. package/src/lib/model/ai-seo.js +150 -0
  402. package/src/lib/model/ai-seo.js.map +1 -0
  403. package/src/lib/model/ai-site-inventory.d.ts +164 -0
  404. package/src/lib/model/ai-site-inventory.js +145 -0
  405. package/src/lib/model/ai-site-inventory.js.map +1 -0
  406. package/src/lib/model/ai-site-job.d.ts +247 -0
  407. package/src/lib/model/ai-site-job.js +314 -0
  408. package/src/lib/model/ai-site-job.js.map +1 -0
  409. package/src/lib/model/ai-site-start-seo.d.ts +103 -0
  410. package/src/lib/model/ai-site-start-seo.js +154 -0
  411. package/src/lib/model/ai-site-start-seo.js.map +1 -0
  412. package/src/lib/model/ai-site-start.d.ts +122 -0
  413. package/src/lib/model/ai-site-start.js +159 -0
  414. package/src/lib/model/ai-site-start.js.map +1 -0
  415. package/src/lib/model/ai-site-switch.d.ts +56 -0
  416. package/src/lib/model/ai-site-switch.js +73 -0
  417. package/src/lib/model/ai-site-switch.js.map +1 -0
  418. package/src/lib/model/ai-storefront-claims.d.ts +70 -0
  419. package/src/lib/model/ai-storefront-claims.js +130 -0
  420. package/src/lib/model/ai-storefront-claims.js.map +1 -0
  421. package/src/lib/model/ai-template-subjects.d.ts +82 -0
  422. package/src/lib/model/ai-template-subjects.js +136 -0
  423. package/src/lib/model/ai-template-subjects.js.map +1 -0
  424. package/src/lib/model/ai-theme-proposal.d.ts +210 -0
  425. package/src/lib/model/ai-theme-proposal.js +506 -0
  426. package/src/lib/model/ai-theme-proposal.js.map +1 -0
  427. package/src/lib/model/ai-tokens.d.ts +96 -0
  428. package/src/lib/model/ai-tokens.js +117 -0
  429. package/src/lib/model/ai-tokens.js.map +1 -0
  430. package/src/lib/model/ai-usage-by-user.d.ts +120 -0
  431. package/src/lib/model/ai-usage-by-user.js +139 -0
  432. package/src/lib/model/ai-usage-by-user.js.map +1 -0
  433. package/src/lib/model/ai-workflow-job.d.ts +111 -0
  434. package/src/lib/model/ai-workflow-job.js +183 -0
  435. package/src/lib/model/ai-workflow-job.js.map +1 -0
  436. package/src/lib/model/assist-edit.d.ts +261 -0
  437. package/src/lib/model/assist-edit.js +175 -0
  438. package/src/lib/model/assist-edit.js.map +1 -0
  439. package/src/lib/plugin-config.d.ts +33 -0
  440. package/src/lib/plugin-config.js +118 -0
  441. package/src/lib/plugin-config.js.map +1 -0
  442. package/src/lib/plugin.d.ts +30 -0
  443. package/src/lib/plugin.js +525 -0
  444. package/src/lib/plugin.js.map +1 -0
  445. package/src/lib/providers/anthropic.d.ts +84 -0
  446. package/src/lib/providers/anthropic.js +432 -0
  447. package/src/lib/providers/anthropic.js.map +1 -0
  448. package/src/lib/providers/catalog.d.ts +197 -0
  449. package/src/lib/providers/catalog.js +312 -0
  450. package/src/lib/providers/catalog.js.map +1 -0
  451. package/src/lib/providers/contract.d.ts +464 -0
  452. package/src/lib/providers/contract.js +274 -0
  453. package/src/lib/providers/contract.js.map +1 -0
  454. package/src/lib/providers/model-choice.d.ts +119 -0
  455. package/src/lib/providers/model-choice.js +416 -0
  456. package/src/lib/providers/model-choice.js.map +1 -0
  457. package/src/lib/providers/openai-compatible.d.ts +58 -0
  458. package/src/lib/providers/openai-compatible.js +361 -0
  459. package/src/lib/providers/openai-compatible.js.map +1 -0
  460. package/src/lib/providers/registry.d.ts +49 -0
  461. package/src/lib/providers/registry.js +71 -0
  462. package/src/lib/providers/registry.js.map +1 -0
  463. package/src/lib/providers/routing.d.ts +98 -0
  464. package/src/lib/providers/routing.js +450 -0
  465. package/src/lib/providers/routing.js.map +1 -0
  466. package/src/lib/runtime/ai-abuse-guards.d.ts +113 -0
  467. package/src/lib/runtime/ai-abuse-guards.js +148 -0
  468. package/src/lib/runtime/ai-abuse-guards.js.map +1 -0
  469. package/src/lib/runtime/ai-component-bindings.d.ts +67 -0
  470. package/src/lib/runtime/ai-component-bindings.js +106 -0
  471. package/src/lib/runtime/ai-component-bindings.js.map +1 -0
  472. package/src/lib/runtime/ai-device-audit.d.ts +109 -0
  473. package/src/lib/runtime/ai-device-audit.js +97 -0
  474. package/src/lib/runtime/ai-device-audit.js.map +1 -0
  475. package/src/lib/runtime/ai-doctrine-validators.d.ts +720 -0
  476. package/src/lib/runtime/ai-doctrine-validators.js +3133 -0
  477. package/src/lib/runtime/ai-doctrine-validators.js.map +1 -0
  478. package/src/lib/runtime/ai-doctrine.d.ts +372 -0
  479. package/src/lib/runtime/ai-doctrine.js +944 -0
  480. package/src/lib/runtime/ai-doctrine.js.map +1 -0
  481. package/src/lib/runtime/ai-eval-live.d.ts +321 -0
  482. package/src/lib/runtime/ai-eval-live.js +1257 -0
  483. package/src/lib/runtime/ai-eval-live.js.map +1 -0
  484. package/src/lib/runtime/ai-eval-memory-firestore.d.ts +51 -0
  485. package/src/lib/runtime/ai-eval-memory-firestore.js +183 -0
  486. package/src/lib/runtime/ai-eval-memory-firestore.js.map +1 -0
  487. package/src/lib/runtime/ai-eval.d.ts +441 -0
  488. package/src/lib/runtime/ai-eval.js +1151 -0
  489. package/src/lib/runtime/ai-eval.js.map +1 -0
  490. package/src/lib/runtime/ai-gate.d.ts +130 -0
  491. package/src/lib/runtime/ai-gate.js +272 -0
  492. package/src/lib/runtime/ai-gate.js.map +1 -0
  493. package/src/lib/runtime/ai-generation-bounds.d.ts +24 -0
  494. package/src/lib/runtime/ai-generation-bounds.js +23 -0
  495. package/src/lib/runtime/ai-generation-bounds.js.map +1 -0
  496. package/src/lib/runtime/ai-insight-check.d.ts +76 -0
  497. package/src/lib/runtime/ai-insight-check.js +281 -0
  498. package/src/lib/runtime/ai-insight-check.js.map +1 -0
  499. package/src/lib/runtime/ai-node-tree.d.ts +181 -0
  500. package/src/lib/runtime/ai-node-tree.js +931 -0
  501. package/src/lib/runtime/ai-node-tree.js.map +1 -0
  502. package/src/lib/runtime/ai-page-links.d.ts +79 -0
  503. package/src/lib/runtime/ai-page-links.js +135 -0
  504. package/src/lib/runtime/ai-page-links.js.map +1 -0
  505. package/src/lib/runtime/ai-palette.d.ts +252 -0
  506. package/src/lib/runtime/ai-palette.generated.d.ts +34 -0
  507. package/src/lib/runtime/ai-palette.generated.js +5263 -0
  508. package/src/lib/runtime/ai-palette.generated.js.map +1 -0
  509. package/src/lib/runtime/ai-palette.js +187 -0
  510. package/src/lib/runtime/ai-palette.js.map +1 -0
  511. package/src/lib/runtime/ai-products-generation.d.ts +107 -0
  512. package/src/lib/runtime/ai-products-generation.js +250 -0
  513. package/src/lib/runtime/ai-products-generation.js.map +1 -0
  514. package/src/lib/runtime/ai-repeated-items.d.ts +95 -0
  515. package/src/lib/runtime/ai-repeated-items.js +397 -0
  516. package/src/lib/runtime/ai-repeated-items.js.map +1 -0
  517. package/src/lib/runtime/ai-runtime.d.ts +148 -0
  518. package/src/lib/runtime/ai-runtime.js +237 -0
  519. package/src/lib/runtime/ai-runtime.js.map +1 -0
  520. package/src/lib/runtime/ai-template-examples.d.ts +71 -0
  521. package/src/lib/runtime/ai-template-examples.js +135 -0
  522. package/src/lib/runtime/ai-template-examples.js.map +1 -0
  523. package/src/lib/runtime/assist-answer-cache.d.ts +80 -0
  524. package/src/lib/runtime/assist-answer-cache.js +184 -0
  525. package/src/lib/runtime/assist-answer-cache.js.map +1 -0
  526. package/src/lib/runtime/seo-audit.d.ts +93 -0
  527. package/src/lib/runtime/seo-audit.js +260 -0
  528. package/src/lib/runtime/seo-audit.js.map +1 -0
  529. package/src/lib/runtime/seo-content-fixes.d.ts +41 -0
  530. package/src/lib/runtime/seo-content-fixes.js +168 -0
  531. package/src/lib/runtime/seo-content-fixes.js.map +1 -0
  532. package/src/lib/runtime/seo-fields.d.ts +152 -0
  533. package/src/lib/runtime/seo-fields.js +215 -0
  534. package/src/lib/runtime/seo-fields.js.map +1 -0
  535. package/src/lib/runtime/seo-page-facts.d.ts +61 -0
  536. package/src/lib/runtime/seo-page-facts.js +150 -0
  537. package/src/lib/runtime/seo-page-facts.js.map +1 -0
  538. package/src/lib/runtime/site-inventory.d.ts +63 -0
  539. package/src/lib/runtime/site-inventory.js +230 -0
  540. package/src/lib/runtime/site-inventory.js.map +1 -0
  541. package/src/lib/server/ai-admin-org.d.ts +33 -0
  542. package/src/lib/server/ai-admin-org.js +381 -0
  543. package/src/lib/server/ai-admin-org.js.map +1 -0
  544. package/src/lib/server/ai-admin-orgs-spend.d.ts +40 -0
  545. package/src/lib/server/ai-admin-orgs-spend.js +129 -0
  546. package/src/lib/server/ai-admin-orgs-spend.js.map +1 -0
  547. package/src/lib/server/ai-admin-overage.d.ts +19 -0
  548. package/src/lib/server/ai-admin-overage.js +246 -0
  549. package/src/lib/server/ai-admin-overage.js.map +1 -0
  550. package/src/lib/server/ai-admin-signals.d.ts +34 -0
  551. package/src/lib/server/ai-admin-signals.js +330 -0
  552. package/src/lib/server/ai-admin-signals.js.map +1 -0
  553. package/src/lib/server/ai-admin-user.d.ts +27 -0
  554. package/src/lib/server/ai-admin-user.js +128 -0
  555. package/src/lib/server/ai-admin-user.js.map +1 -0
  556. package/src/lib/server/ai-allotments.d.ts +27 -0
  557. package/src/lib/server/ai-allotments.js +544 -0
  558. package/src/lib/server/ai-allotments.js.map +1 -0
  559. package/src/lib/server/ai-assist-prompts.d.ts +102 -0
  560. package/src/lib/server/ai-assist-prompts.js +207 -0
  561. package/src/lib/server/ai-assist-prompts.js.map +1 -0
  562. package/src/lib/server/ai-assist.d.ts +119 -0
  563. package/src/lib/server/ai-assist.js +517 -0
  564. package/src/lib/server/ai-assist.js.map +1 -0
  565. package/src/lib/server/ai-crm-answer.d.ts +30 -0
  566. package/src/lib/server/ai-crm-answer.js +98 -0
  567. package/src/lib/server/ai-crm-answer.js.map +1 -0
  568. package/src/lib/server/ai-generate-component.d.ts +111 -0
  569. package/src/lib/server/ai-generate-component.js +643 -0
  570. package/src/lib/server/ai-generate-component.js.map +1 -0
  571. package/src/lib/server/ai-host-permissions.d.ts +46 -0
  572. package/src/lib/server/ai-host-permissions.js +204 -0
  573. package/src/lib/server/ai-host-permissions.js.map +1 -0
  574. package/src/lib/server/ai-insight-answer.d.ts +30 -0
  575. package/src/lib/server/ai-insight-answer.js +83 -0
  576. package/src/lib/server/ai-insight-answer.js.map +1 -0
  577. package/src/lib/server/ai-insight-digest-route.d.ts +30 -0
  578. package/src/lib/server/ai-insight-digest-route.js +156 -0
  579. package/src/lib/server/ai-insight-digest-route.js.map +1 -0
  580. package/src/lib/server/ai-jobs-batch.d.ts +48 -0
  581. package/src/lib/server/ai-jobs-batch.js +306 -0
  582. package/src/lib/server/ai-jobs-batch.js.map +1 -0
  583. package/src/lib/server/ai-jobs-beat-route.d.ts +36 -0
  584. package/src/lib/server/ai-jobs-beat-route.js +86 -0
  585. package/src/lib/server/ai-jobs-beat-route.js.map +1 -0
  586. package/src/lib/server/ai-jobs-cancel.d.ts +30 -0
  587. package/src/lib/server/ai-jobs-cancel.js +74 -0
  588. package/src/lib/server/ai-jobs-cancel.js.map +1 -0
  589. package/src/lib/server/ai-jobs-events-route.d.ts +31 -0
  590. package/src/lib/server/ai-jobs-events-route.js +51 -0
  591. package/src/lib/server/ai-jobs-events-route.js.map +1 -0
  592. package/src/lib/server/ai-jobs-events.d.ts +55 -0
  593. package/src/lib/server/ai-jobs-events.js +144 -0
  594. package/src/lib/server/ai-jobs-events.js.map +1 -0
  595. package/src/lib/server/ai-jobs-gate.d.ts +47 -0
  596. package/src/lib/server/ai-jobs-gate.js +106 -0
  597. package/src/lib/server/ai-jobs-gate.js.map +1 -0
  598. package/src/lib/server/ai-jobs-resume.d.ts +23 -0
  599. package/src/lib/server/ai-jobs-resume.js +209 -0
  600. package/src/lib/server/ai-jobs-resume.js.map +1 -0
  601. package/src/lib/server/ai-jobs-route.d.ts +32 -0
  602. package/src/lib/server/ai-jobs-route.js +307 -0
  603. package/src/lib/server/ai-jobs-route.js.map +1 -0
  604. package/src/lib/server/ai-models.d.ts +18 -0
  605. package/src/lib/server/ai-models.js +134 -0
  606. package/src/lib/server/ai-models.js.map +1 -0
  607. package/src/lib/server/ai-seo-apply.d.ts +53 -0
  608. package/src/lib/server/ai-seo-apply.js +294 -0
  609. package/src/lib/server/ai-seo-apply.js.map +1 -0
  610. package/src/lib/server/ai-usage.d.ts +18 -0
  611. package/src/lib/server/ai-usage.js +220 -0
  612. package/src/lib/server/ai-usage.js.map +1 -0
  613. package/src/lib/server/assist-chat.d.ts +234 -0
  614. package/src/lib/server/assist-chat.js +1446 -0
  615. package/src/lib/server/assist-chat.js.map +1 -0
  616. package/src/lib/server/assist-edit-applied.d.ts +22 -0
  617. package/src/lib/server/assist-edit-applied.js +239 -0
  618. package/src/lib/server/assist-edit-applied.js.map +1 -0
  619. package/src/lib/server/assist-edit.d.ts +124 -0
  620. package/src/lib/server/assist-edit.js +1000 -0
  621. package/src/lib/server/assist-edit.js.map +1 -0
  622. package/src/lib/server/assist-feedback.d.ts +31 -0
  623. package/src/lib/server/assist-feedback.js +115 -0
  624. package/src/lib/server/assist-feedback.js.map +1 -0
  625. package/src/lib/server/assist-view-context.d.ts +343 -0
  626. package/src/lib/server/assist-view-context.js +690 -0
  627. package/src/lib/server/assist-view-context.js.map +1 -0
  628. package/src/lib/server/billing-credits.d.ts +59 -0
  629. package/src/lib/server/billing-credits.js +146 -0
  630. package/src/lib/server/billing-credits.js.map +1 -0
  631. package/src/lib/server/billing-overage.d.ts +19 -0
  632. package/src/lib/server/billing-overage.js +337 -0
  633. package/src/lib/server/billing-overage.js.map +1 -0
  634. package/src/lib/server.d.ts +32 -0
  635. package/src/lib/server.js +265 -0
  636. package/src/lib/server.js.map +1 -0
  637. package/src/lib/subprocessors.d.ts +18 -0
  638. package/src/lib/subprocessors.js +52 -0
  639. package/src/lib/subprocessors.js.map +1 -0
  640. package/src/lib/tools/ai-component-tool.d.ts +99 -0
  641. package/src/lib/tools/ai-component-tool.js +369 -0
  642. package/src/lib/tools/ai-component-tool.js.map +1 -0
  643. package/src/lib/tools/ai-crm-tool.d.ts +106 -0
  644. package/src/lib/tools/ai-crm-tool.js +488 -0
  645. package/src/lib/tools/ai-crm-tool.js.map +1 -0
  646. package/src/lib/tools/ai-duplicate-resource-tool.d.ts +71 -0
  647. package/src/lib/tools/ai-duplicate-resource-tool.js +164 -0
  648. package/src/lib/tools/ai-duplicate-resource-tool.js.map +1 -0
  649. package/src/lib/tools/ai-experiment-tool.d.ts +40 -0
  650. package/src/lib/tools/ai-experiment-tool.js +155 -0
  651. package/src/lib/tools/ai-experiment-tool.js.map +1 -0
  652. package/src/lib/tools/ai-insight-tool.d.ts +46 -0
  653. package/src/lib/tools/ai-insight-tool.js +200 -0
  654. package/src/lib/tools/ai-insight-tool.js.map +1 -0
  655. package/src/lib/tools/ai-inventory-lookup-tool.d.ts +86 -0
  656. package/src/lib/tools/ai-inventory-lookup-tool.js +164 -0
  657. package/src/lib/tools/ai-inventory-lookup-tool.js.map +1 -0
  658. package/src/lib/tools/ai-products-tool.d.ts +65 -0
  659. package/src/lib/tools/ai-products-tool.js +644 -0
  660. package/src/lib/tools/ai-products-tool.js.map +1 -0
  661. package/src/lib/tools/ai-seo-tool.d.ts +162 -0
  662. package/src/lib/tools/ai-seo-tool.js +546 -0
  663. package/src/lib/tools/ai-seo-tool.js.map +1 -0
  664. package/src/lib/tools/ai-theme-tool.d.ts +101 -0
  665. package/src/lib/tools/ai-theme-tool.js +562 -0
  666. package/src/lib/tools/ai-theme-tool.js.map +1 -0
  667. package/src/lib/tools/ai-workflow-tool.d.ts +166 -0
  668. package/src/lib/tools/ai-workflow-tool.js +860 -0
  669. package/src/lib/tools/ai-workflow-tool.js.map +1 -0
  670. package/src/lib/usage/ai-allotment-alerts.d.ts +72 -0
  671. package/src/lib/usage/ai-allotment-alerts.js +157 -0
  672. package/src/lib/usage/ai-allotment-alerts.js.map +1 -0
  673. package/src/lib/usage/ai-allotments.d.ts +125 -0
  674. package/src/lib/usage/ai-allotments.js +239 -0
  675. package/src/lib/usage/ai-allotments.js.map +1 -0
  676. package/src/lib/usage/ai-model-sample.d.ts +36 -0
  677. package/src/lib/usage/ai-model-sample.js +68 -0
  678. package/src/lib/usage/ai-model-sample.js.map +1 -0
  679. package/src/lib/usage/ai-usage-alerts.d.ts +55 -0
  680. package/src/lib/usage/ai-usage-alerts.js +114 -0
  681. package/src/lib/usage/ai-usage-alerts.js.map +1 -0
  682. package/src/lib/usage/ai-usage-by-user.d.ts +161 -0
  683. package/src/lib/usage/ai-usage-by-user.js +211 -0
  684. package/src/lib/usage/ai-usage-by-user.js.map +1 -0
  685. package/src/lib/usage/ai-usage-eraser.d.ts +29 -0
  686. package/src/lib/usage/ai-usage-eraser.js +40 -0
  687. package/src/lib/usage/ai-usage-eraser.js.map +1 -0
  688. package/src/lib/usage/ai-usage-meter.d.ts +39 -0
  689. package/src/lib/usage/ai-usage-meter.js +85 -0
  690. package/src/lib/usage/ai-usage-meter.js.map +1 -0
  691. package/src/lib/usage/ai-usage-wire.d.ts +184 -0
  692. package/src/lib/usage/ai-usage-wire.js +98 -0
  693. package/src/lib/usage/ai-usage-wire.js.map +1 -0
  694. package/src/lib/usage/assist-ceiling.d.ts +87 -0
  695. package/src/lib/usage/assist-ceiling.js +110 -0
  696. package/src/lib/usage/assist-ceiling.js.map +1 -0
  697. package/src/lib/usage/assist-free-taste.d.ts +225 -0
  698. package/src/lib/usage/assist-free-taste.js +308 -0
  699. package/src/lib/usage/assist-free-taste.js.map +1 -0
  700. package/src/lib/usage/assist-refusals.d.ts +69 -0
  701. package/src/lib/usage/assist-refusals.js +79 -0
  702. package/src/lib/usage/assist-refusals.js.map +1 -0
  703. package/src/lib/usage/assist-signal-mining.d.ts +375 -0
  704. package/src/lib/usage/assist-signal-mining.js +344 -0
  705. package/src/lib/usage/assist-signal-mining.js.map +1 -0
  706. package/src/lib/usage/assist-usage.d.ts +571 -0
  707. package/src/lib/usage/assist-usage.js +978 -0
  708. package/src/lib/usage/assist-usage.js.map +1 -0
  709. package/src/lib/usage/staff-org-ai.d.ts +242 -0
  710. package/src/lib/usage/staff-org-ai.js +173 -0
  711. package/src/lib/usage/staff-org-ai.js.map +1 -0
  712. package/src/lib/usage/staff-org-usage-ai.d.ts +83 -0
  713. package/src/lib/usage/staff-org-usage-ai.js +59 -0
  714. package/src/lib/usage/staff-org-usage-ai.js.map +1 -0
  715. package/src/lib/usage/staff-orgs-ai-spend.d.ts +83 -0
  716. package/src/lib/usage/staff-orgs-ai-spend.js +114 -0
  717. package/src/lib/usage/staff-orgs-ai-spend.js.map +1 -0
@@ -0,0 +1,442 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ import { COMPONENT_PROP_NAME_PATTERN, NODE_HIDE_IF_PROP, NODE_HIDE_UNLESS_PROP, REUSABLE_INSTANCE_COMPONENT_ID, REUSABLE_INSTANCE_PROP_VALUES_KEY } from "@aglyn/aglyn/app-utils/reusable-component-keys";
17
+ import { REUSABLE_PROP_KINDS, reusablePropValueShape } from "@aglyn/aglyn/foundation/definitions/property-kinds";
18
+ import { AI_COMPONENT_COPY_KINDS, aiComponentKindBindsTo, aiComponentPropBindsToField, aiComponentPropNamesIn, aiComponentUnofferedAnswers, isAiComponentPropToken } from "../runtime/ai-component-bindings.js";
19
+ import { aiHeadingLevel, detectOffVoiceCopy, walkTree } from "../runtime/ai-doctrine-validators.js";
20
+ import { AI_INSTANCE_REF_PROP } from "../runtime/ai-node-tree.js";
21
+ import { AI_PALETTE } from "../runtime/ai-palette.generated.js";
22
+ import { readAiComponentProps } from "../tools/ai-component-tool.js";
23
+ import { aiModelNodeIds, aiPlacedComponentIds, aiPlanCreation, aiPlanReuseViolations } from "./ai-job-generation.js";
24
+ /**
25
+ * The component door's own checks (AGL-2908): what a generated reusable
26
+ * component is held to beyond the doctrine, on a tree the doctrine admitted
27
+ * and the properties the same answer declared.
28
+ *
29
+ * - every token names a property the component declares, and every declared
30
+ * property is bound, so no field a page sets changes nothing;
31
+ * - a property binds only to a field that holds its kind of value
32
+ * (`runtime/ai-component-bindings.ts`): a switch takes a Yes / no, a
33
+ * dropdown a Choice whose answers it lists, a screen picker a Link
34
+ * (AGL-2871), an icon picker an Icon;
35
+ * - an icon is an Icon the site owner picks, never words (AGL-3054): a copy
36
+ * property named or labeled as an icon, shown as copy, is refused;
37
+ * - its headings start at h3 (AGL-3057): a component is placed inside a page
38
+ * section, which opens with its own h2, and a page's outline check sees an
39
+ * instance as one node, never the headings it grafts in;
40
+ * - an optional part is switched off by a Yes / no labeled `Hide …` that
41
+ * defaults to No, bound to `hideIf` on that part and never on the whole
42
+ * component;
43
+ * - a default is what the component shows until a page sets it, in the
44
+ * site's voice (rule 14), and fits the field it fills;
45
+ * - what the confirmed plan names is there: the components it reuses, and
46
+ * the properties it lists for this component, an icon as an icon (rule 7).
47
+ *
48
+ * Pure: no Firestore and no provider, so the component step, the eval
49
+ * harness and their specs read one definition of a component's checks.
50
+ */ /** The label a Yes / no that hides a part opens with, so a page reads what it does. */ const HIDE_LABEL = /^Hide\b/;
51
+ /** The kinds of a placed component's property that copy fills as text. */ const COPY_FIELD_KINDS = new Set([
52
+ 'text',
53
+ 'richText'
54
+ ]);
55
+ /**
56
+ * The highest heading a component may carry (AGL-3057): a page section opens
57
+ * with its own h2, and whatever the section places sits under it.
58
+ */ export const AI_COMPONENT_TOP_HEADING_LEVEL = 3;
59
+ /** A word naming an icon, in a label or in a name split at its capitals and underscores. */ const ICON_WORD = /\bicons?\b/i;
60
+ /** The fields the confirmed plan lists for its component, read from `name:type`, each name once. */ export function aiPlannedComponentFields(plan) {
61
+ var _ref;
62
+ var _aiPlanCreation;
63
+ const fields = new Map();
64
+ for (const field of (_ref = (_aiPlanCreation = aiPlanCreation(plan, 'component')) == null ? void 0 : _aiPlanCreation.fields) != null ? _ref : []){
65
+ const [name = '', type = ''] = field.split(':').map((part)=>part.trim());
66
+ if (COMPONENT_PROP_NAME_PATTERN.test(name) && !fields.has(name)) fields.set(name, {
67
+ name,
68
+ type
69
+ });
70
+ }
71
+ return [
72
+ ...fields.values()
73
+ ];
74
+ }
75
+ /** The property names the confirmed plan lists for its component, from its `name:type` fields. */ export function aiPlannedComponentProps(plan) {
76
+ return aiPlannedComponentFields(plan).map((field)=>field.name);
77
+ }
78
+ /** A property's kind as a sentence names one: "an Image", "a Yes / no". */ function aKind(type) {
79
+ var _ref;
80
+ var _REUSABLE_PROP_KINDS_;
81
+ const label = (_ref = (_REUSABLE_PROP_KINDS_ = REUSABLE_PROP_KINDS[type != null ? type : 'text']) == null ? void 0 : _REUSABLE_PROP_KINDS_.label) != null ? _ref : REUSABLE_PROP_KINDS.text.label;
82
+ return `${/^[AEIOU]/i.test(label) ? 'an' : 'a'} ${label}`;
83
+ }
84
+ function fieldPhrase(componentId, field) {
85
+ var _ref;
86
+ var _AI_PALETTE_componentId;
87
+ return `the ${(_ref = (_AI_PALETTE_componentId = AI_PALETTE[componentId]) == null ? void 0 : _AI_PALETTE_componentId.displayName) != null ? _ref : componentId}’s ${field}`;
88
+ }
89
+ const tokenOf = (name)=>`{{prop.${name}}}`;
90
+ /** Whether a property's name or label says it is an icon. */ function namedAsIcon(prop) {
91
+ var _prop_label;
92
+ const words = prop.name.replace(/([a-z0-9])([A-Z])/g, '$1 $2').replace(/_/g, ' ');
93
+ return ICON_WORD.test(words) || ICON_WORD.test((_prop_label = prop.label) != null ? _prop_label : '');
94
+ }
95
+ /** "{{prop.a}} is" or "{{prop.a}}, {{prop.b}} are", for a finding that names its properties. */ function tokensAre(names) {
96
+ const tokens = [
97
+ ...new Set(names)
98
+ ].map(tokenOf);
99
+ return `${tokens.slice(0, 3).join(', ')} ${tokens.length === 1 ? 'is' : 'are'}`;
100
+ }
101
+ /**
102
+ * Whether a property handed on to a placed component fits the property it
103
+ * fills there: copy into copy, whole or inside a sentence; a picture or a
104
+ * link only into its own kind, whole; any other kind into one whose value has
105
+ * its shape.
106
+ */ function handsOnTo(prop, placedType, whole) {
107
+ var _prop_type;
108
+ const type = (_prop_type = prop.type) != null ? _prop_type : 'text';
109
+ if (AI_COMPONENT_COPY_KINDS.has(type) && COPY_FIELD_KINDS.has(placedType)) return true;
110
+ if (!whole) return false;
111
+ if ([
112
+ type,
113
+ placedType
114
+ ].some((kind)=>kind === 'image' || kind === 'href')) return type === placedType;
115
+ return reusablePropValueShape(prop) === reusablePropValueShape({
116
+ type: placedType
117
+ });
118
+ }
119
+ /**
120
+ * The component door's check of its bindings, on a tree the doctrine admitted
121
+ * and the properties the same answer declared: every token names a declared
122
+ * property on a field of its kind, every property is bound, an icon is never
123
+ * shown as words, a part is hidden by a `Hide …` Yes / no that defaults to No,
124
+ * and a default fits the field it fills. `refused` names properties the answer
125
+ * declared and the reading refused, which are reported there and not again
126
+ * here.
127
+ */ export function aiComponentBindingViolations(tree, props, inventory, refused = []) {
128
+ var _ref;
129
+ var _root_nodes;
130
+ const declared = new Map(props.map((prop)=>[
131
+ prop.name,
132
+ prop
133
+ ]));
134
+ const skipped = new Set(refused);
135
+ const placedProps = new Map(((_ref = inventory == null ? void 0 : inventory.components) != null ? _ref : []).map((component)=>[
136
+ component.id,
137
+ component.props
138
+ ]));
139
+ const nodes = tree.nodes;
140
+ // The whole component: its root, and the one element a document wrapper holds.
141
+ const whole = new Set([
142
+ tree.rootId
143
+ ]);
144
+ const root = nodes[tree.rootId];
145
+ if ((root == null ? void 0 : root.componentId) === 'div' && ((_root_nodes = root.nodes) == null ? void 0 : _root_nodes.length) === 1) whole.add(root.nodes[0]);
146
+ const bound = new Set();
147
+ const undeclared = [];
148
+ const unfit = [];
149
+ const unoffered = [];
150
+ const tooLong = [];
151
+ const iconAsText = [];
152
+ const hidesWhole = [];
153
+ const hideForm = [];
154
+ const named = (id, name)=>{
155
+ const prop = declared.get(name);
156
+ if (prop) {
157
+ bound.add(name);
158
+ return prop;
159
+ }
160
+ if (!skipped.has(name)) undeclared.push({
161
+ id,
162
+ name
163
+ });
164
+ return null;
165
+ };
166
+ for (const { id, node } of walkTree({
167
+ rootId: tree.rootId,
168
+ nodes
169
+ })){
170
+ var _node_props, _placedProps_get;
171
+ var _node_props1, _node_props2;
172
+ const entry = AI_PALETTE[node.componentId];
173
+ for (const [field, value] of Object.entries((_node_props = node.props) != null ? _node_props : {})){
174
+ const placement = isAiComponentPropToken(value) ? 'whole' : 'inside';
175
+ for (const name of aiComponentPropNamesIn(value)){
176
+ const prop = named(id, name);
177
+ if (!prop) continue;
178
+ if (!aiComponentPropBindsToField(prop, entry, field, placement)) {
179
+ unfit.push({
180
+ id,
181
+ name,
182
+ at: fieldPhrase(node.componentId, field)
183
+ });
184
+ continue;
185
+ }
186
+ if (field === NODE_HIDE_IF_PROP || field === NODE_HIDE_UNLESS_PROP) {
187
+ var _prop_label;
188
+ if (whole.has(id)) hidesWhole.push({
189
+ id,
190
+ name
191
+ });
192
+ if (field === NODE_HIDE_IF_PROP && (!HIDE_LABEL.test((_prop_label = prop.label) != null ? _prop_label : '') || prop.defaultValue === true)) {
193
+ hideForm.push({
194
+ id,
195
+ name
196
+ });
197
+ }
198
+ continue;
199
+ }
200
+ // Copy the tree shows as words is the wrong home for an icon: the
201
+ // words a page types in are drawn as text, never as the icon.
202
+ if ((entry == null ? void 0 : entry.propRoles[field]) === 'text' && namedAsIcon(prop)) iconAsText.push({
203
+ id,
204
+ name
205
+ });
206
+ const values = aiComponentUnofferedAnswers(prop, entry, field);
207
+ if (values.length) unoffered.push({
208
+ id,
209
+ name,
210
+ at: fieldPhrase(node.componentId, field),
211
+ values
212
+ });
213
+ const limit = entry == null ? void 0 : entry.textLimits[field];
214
+ if (placement === 'whole' && limit !== undefined && typeof prop.defaultValue === 'string' && prop.defaultValue.length > limit) {
215
+ tooLong.push({
216
+ id,
217
+ name,
218
+ at: fieldPhrase(node.componentId, field),
219
+ limit
220
+ });
221
+ }
222
+ }
223
+ }
224
+ // A property handed on to a component this one places.
225
+ const refId = (_node_props1 = node.props) == null ? void 0 : _node_props1[AI_INSTANCE_REF_PROP];
226
+ const handed = (_node_props2 = node.props) == null ? void 0 : _node_props2[REUSABLE_INSTANCE_PROP_VALUES_KEY];
227
+ if (node.componentId !== REUSABLE_INSTANCE_COMPONENT_ID || typeof refId !== 'string' || !handed || typeof handed !== 'object' || Array.isArray(handed)) {
228
+ continue;
229
+ }
230
+ const types = (_placedProps_get = placedProps.get(refId)) != null ? _placedProps_get : {};
231
+ for (const [field, value] of Object.entries(handed)){
232
+ const wholeValue = isAiComponentPropToken(value);
233
+ for (const name of aiComponentPropNamesIn(value)){
234
+ var _types_field;
235
+ const prop = named(id, name);
236
+ if (prop && !handsOnTo(prop, (_types_field = types[field]) != null ? _types_field : 'text', wholeValue)) {
237
+ unfit.push({
238
+ id,
239
+ name,
240
+ at: `the placed component’s ${field}`
241
+ });
242
+ }
243
+ }
244
+ }
245
+ }
246
+ const at = (list)=>aiModelNodeIds([
247
+ ...new Set(list.map((entry)=>entry.id))
248
+ ], tree.sourceIds);
249
+ const violations = [];
250
+ if (undeclared.length) {
251
+ const tokens = [
252
+ ...new Set(undeclared.map((entry)=>tokenOf(entry.name)))
253
+ ];
254
+ violations.push({
255
+ rule: 1,
256
+ code: 'prop-undeclared',
257
+ message: `The tree binds ${tokens.slice(0, 3).join(', ')}, which the component does not declare. Declare every property the tree binds.`,
258
+ nodeIds: at(undeclared)
259
+ });
260
+ }
261
+ if (unfit.length) {
262
+ var _declared_get;
263
+ const [first] = unfit;
264
+ violations.push({
265
+ rule: 1,
266
+ code: 'binding-field',
267
+ message: `${tokenOf(first.name)} is ${aKind((_declared_get = declared.get(first.name)) == null ? void 0 : _declared_get.type)} property bound to ${first.at}, which does not take one. Bind each property only to a field that holds its kind of value.`,
268
+ nodeIds: at(unfit)
269
+ });
270
+ }
271
+ const shownAsWords = iconAsText.filter((entry)=>{
272
+ var _ref;
273
+ var _declared_get;
274
+ return AI_COMPONENT_COPY_KINDS.has((_ref = (_declared_get = declared.get(entry.name)) == null ? void 0 : _declared_get.type) != null ? _ref : 'text');
275
+ });
276
+ if (shownAsWords.length) {
277
+ const one = new Set(shownAsWords.map((entry)=>entry.name)).size === 1;
278
+ violations.push({
279
+ rule: 1,
280
+ code: 'icon-as-text',
281
+ message: `${tokensAre(shownAsWords.map((entry)=>entry.name))} named as an icon and shown as words. Make ${one ? 'it an icon property' : 'each an icon property'} ("type": "icon", "defaultValue": "") bound whole to an Icon element’s iconId, for the site owner to pick.`,
282
+ nodeIds: at(shownAsWords)
283
+ });
284
+ }
285
+ if (unoffered.length) {
286
+ const [first] = unoffered;
287
+ violations.push({
288
+ rule: 1,
289
+ code: 'binding-answers',
290
+ message: `${tokenOf(first.name)} offers ${first.values.map((value)=>`"${value}"`).join(', ')}, which ${first.at} does not list. Give a Choice only answers whose values the field lists.`,
291
+ nodeIds: at(unoffered)
292
+ });
293
+ }
294
+ if (tooLong.length) {
295
+ const [first] = tooLong;
296
+ violations.push({
297
+ rule: 1,
298
+ code: 'prop-default-too-long',
299
+ message: `The default of ${tokenOf(first.name)} is longer than ${first.at} holds (${first.limit} characters). Shorten it.`,
300
+ nodeIds: at(tooLong)
301
+ });
302
+ }
303
+ if (hidesWhole.length) {
304
+ violations.push({
305
+ rule: 1,
306
+ code: 'hide-whole-component',
307
+ message: 'The whole component is hidden by one of its own properties, so a page could place it and show nothing. Put hideIf on the optional part instead.',
308
+ nodeIds: at(hidesWhole)
309
+ });
310
+ }
311
+ if (hideForm.length) {
312
+ const tokens = [
313
+ ...new Set(hideForm.map((entry)=>tokenOf(entry.name)))
314
+ ];
315
+ violations.push({
316
+ rule: 1,
317
+ code: 'hide-label',
318
+ message: `${tokens.join(', ')} ${tokens.length === 1 ? 'hides a part, so it is' : 'hide parts, so each is'} a Yes / no labeled "Hide …" whose default is false: the part shows until a page hides it.`,
319
+ nodeIds: at(hideForm)
320
+ });
321
+ }
322
+ const unbound = props.filter((prop)=>!bound.has(prop.name));
323
+ if (unbound.length) {
324
+ const one = unbound.length === 1;
325
+ // Where each unbound kind goes, once a kind, so the re-ask says what to write.
326
+ const kinds = [
327
+ ...new Set(unbound.map((prop)=>{
328
+ var _prop_type;
329
+ return (_prop_type = prop.type) != null ? _prop_type : 'text';
330
+ }))
331
+ ];
332
+ violations.push({
333
+ rule: 1,
334
+ code: 'prop-unbound',
335
+ message: `The component declares ${unbound.slice(0, 3).map((prop)=>tokenOf(prop.name)).join(', ')} and binds ${one ? 'it' : 'them'} nowhere, so a page that sets ${one ? 'it' : 'them'} changes nothing. Bind every property you declare where its kind goes: ${kinds.map((type)=>`${aKind(type)} to ${aiComponentKindBindsTo(type)}`).join('; ')}.`
336
+ });
337
+ }
338
+ return violations;
339
+ }
340
+ /**
341
+ * Rule 7: the properties the confirmed plan lists for the component are
342
+ * declared, and a field the plan lists as an icon is an icon property, so
343
+ * the plan and the binding checks ask for the same thing (AGL-3054).
344
+ */ export function aiPlannedPropViolations(plan, props) {
345
+ const declared = new Map(props.map((prop)=>[
346
+ prop.name,
347
+ prop
348
+ ]));
349
+ const planned = aiPlannedComponentFields(plan);
350
+ const violations = [];
351
+ const missing = planned.filter((field)=>!declared.has(field.name)).map((field)=>field.name);
352
+ if (missing.length) {
353
+ const one = missing.length === 1;
354
+ violations.push({
355
+ rule: 7,
356
+ code: 'plan-prop-missing',
357
+ message: `The confirmed plan lists the ${one ? 'property' : 'properties'} ${missing.map((name)=>`"${name}"`).join(', ')}, and the component does not declare ${one ? 'it' : 'them'}. Declare every property the plan lists.`
358
+ });
359
+ }
360
+ // A property refused on its reading carries no kind, and is reported there.
361
+ const notIcons = planned.filter((field)=>{
362
+ var _declared_get;
363
+ const type = (_declared_get = declared.get(field.name)) == null ? void 0 : _declared_get.type;
364
+ return field.type === 'icon' && type !== undefined && type !== 'icon';
365
+ });
366
+ if (notIcons.length) {
367
+ var _declared_get;
368
+ const [first] = notIcons;
369
+ violations.push({
370
+ rule: 7,
371
+ code: 'plan-prop-kind',
372
+ message: `The confirmed plan lists "${first.name}" as an icon, and the component declares it as ${aKind((_declared_get = declared.get(first.name)) == null ? void 0 : _declared_get.type)}. Declare it as an icon property ("type": "icon", "defaultValue": "") bound whole to an Icon element’s iconId.`
373
+ });
374
+ }
375
+ return violations;
376
+ }
377
+ /**
378
+ * Rule 11 on a component's own outline (AGL-3057). A page's outline check
379
+ * reads an instance as one node, and the site inventory carries no component
380
+ * tree to read in its place, so a component's h2 renders beside the h2 that
381
+ * opens the section placing it, and the page reads h2, h2, h2. The component
382
+ * is held to headings a section can hold instead: h3 or below. A component
383
+ * that would be a whole section, its own h2 and all, is refused the same way:
384
+ * that section is built on the page.
385
+ */ export function aiComponentHeadingViolations(tree) {
386
+ const nodes = tree.nodes;
387
+ const high = walkTree({
388
+ rootId: tree.rootId,
389
+ nodes
390
+ }).filter(({ node })=>{
391
+ const level = aiHeadingLevel(node);
392
+ return level !== null && level < AI_COMPONENT_TOP_HEADING_LEVEL;
393
+ }).map((visit)=>visit.id);
394
+ if (!high.length) return [];
395
+ return [
396
+ {
397
+ rule: 11,
398
+ code: 'component-heading-level',
399
+ message: `A component sits inside a page section that opens with its own h2, so its headings start at h${AI_COMPONENT_TOP_HEADING_LEVEL}. Set each heading’s Typography "component" to "h${AI_COMPONENT_TOP_HEADING_LEVEL}" or lower.`,
400
+ nodeIds: aiModelNodeIds(high, tree.sourceIds)
401
+ }
402
+ ];
403
+ }
404
+ /** Rule 14 on the copy a component shows until a page sets it. */ export function aiComponentDefaultCopyViolations(props) {
405
+ return detectOffVoiceCopy(props.flatMap((prop, index)=>(prop.type === 'text' || prop.type === 'richText') && typeof prop.defaultValue === 'string' ? [
406
+ {
407
+ at: `props[${index}].defaultValue`,
408
+ text: prop.defaultValue
409
+ }
410
+ ] : []));
411
+ }
412
+ /**
413
+ * Every check the component door adds to the doctrine's, on a tree it
414
+ * admitted and the answer the tree came in. `onProps` receives the properties
415
+ * that answer declared, so the step keeps the declaration of the answer the
416
+ * loop keeps — the last one it checked.
417
+ */ export function aiComponentCheck(input) {
418
+ var _ref;
419
+ var _input_inventory;
420
+ const screenIds = new Set(((_ref = (_input_inventory = input.inventory) == null ? void 0 : _input_inventory.screens) != null ? _ref : []).map((screen)=>screen.id));
421
+ return (tree, answer)=>{
422
+ const reading = readAiComponentProps(answer, {
423
+ screenIds
424
+ });
425
+ input.onProps(reading.props);
426
+ return [
427
+ ...reading.violations,
428
+ ...aiComponentBindingViolations(tree, reading.props, input.inventory, reading.refused),
429
+ ...aiComponentHeadingViolations(tree),
430
+ ...aiComponentDefaultCopyViolations(reading.props),
431
+ ...aiPlanReuseViolations(input.inventory, input.plan, aiPlacedComponentIds(tree), 'component'),
432
+ ...aiPlannedPropViolations(input.plan, [
433
+ ...reading.props,
434
+ ...reading.refused.map((name)=>({
435
+ name
436
+ }))
437
+ ])
438
+ ];
439
+ };
440
+ }
441
+
442
+ //# sourceMappingURL=ai-job-component-checks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/jobs/ai-job-component-checks.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 COMPONENT_PROP_NAME_PATTERN,\n NODE_HIDE_IF_PROP,\n NODE_HIDE_UNLESS_PROP,\n REUSABLE_INSTANCE_COMPONENT_ID,\n REUSABLE_INSTANCE_PROP_VALUES_KEY,\n} from '@aglyn/aglyn/app-utils/reusable-component-keys'\nimport type {\n ReusableComponentProp,\n ReusableComponentPropType,\n} from '@aglyn/aglyn/foundation/definitions/platform.types'\nimport {\n REUSABLE_PROP_KINDS,\n reusablePropValueShape,\n} from '@aglyn/aglyn/foundation/definitions/property-kinds'\nimport type { AiJobPlan } from '../model/ai-jobs.types'\nimport type { AiSiteInventory } from '../model/ai-site-inventory'\nimport {\n AI_COMPONENT_COPY_KINDS,\n aiComponentKindBindsTo,\n aiComponentPropBindsToField,\n aiComponentPropNamesIn,\n aiComponentUnofferedAnswers,\n isAiComponentPropToken,\n} from '../runtime/ai-component-bindings'\nimport type { AiValidatedTree } from '../runtime/ai-doctrine'\nimport {\n aiHeadingLevel,\n detectOffVoiceCopy,\n walkTree,\n type AiDoctrineNode,\n type AiDoctrineViolation,\n} from '../runtime/ai-doctrine-validators'\nimport { AI_INSTANCE_REF_PROP } from '../runtime/ai-node-tree'\nimport { AI_PALETTE } from '../runtime/ai-palette.generated'\nimport { readAiComponentProps } from '../tools/ai-component-tool'\nimport {\n aiModelNodeIds,\n aiPlacedComponentIds,\n aiPlanCreation,\n aiPlanReuseViolations,\n} from './ai-job-generation'\n\n/**\n * The component door's own checks (AGL-2908): what a generated reusable\n * component is held to beyond the doctrine, on a tree the doctrine admitted\n * and the properties the same answer declared.\n *\n * - every token names a property the component declares, and every declared\n * property is bound, so no field a page sets changes nothing;\n * - a property binds only to a field that holds its kind of value\n * (`runtime/ai-component-bindings.ts`): a switch takes a Yes / no, a\n * dropdown a Choice whose answers it lists, a screen picker a Link\n * (AGL-2871), an icon picker an Icon;\n * - an icon is an Icon the site owner picks, never words (AGL-3054): a copy\n * property named or labeled as an icon, shown as copy, is refused;\n * - its headings start at h3 (AGL-3057): a component is placed inside a page\n * section, which opens with its own h2, and a page's outline check sees an\n * instance as one node, never the headings it grafts in;\n * - an optional part is switched off by a Yes / no labeled `Hide …` that\n * defaults to No, bound to `hideIf` on that part and never on the whole\n * component;\n * - a default is what the component shows until a page sets it, in the\n * site's voice (rule 14), and fits the field it fills;\n * - what the confirmed plan names is there: the components it reuses, and\n * the properties it lists for this component, an icon as an icon (rule 7).\n *\n * Pure: no Firestore and no provider, so the component step, the eval\n * harness and their specs read one definition of a component's checks.\n */\n\n/** The label a Yes / no that hides a part opens with, so a page reads what it does. */\nconst HIDE_LABEL = /^Hide\\b/\n\n/** The kinds of a placed component's property that copy fills as text. */\nconst COPY_FIELD_KINDS: ReadonlySet<string> = new Set(['text', 'richText'])\n\n/**\n * The highest heading a component may carry (AGL-3057): a page section opens\n * with its own h2, and whatever the section places sits under it.\n */\nexport const AI_COMPONENT_TOP_HEADING_LEVEL = 3\n\n/** A word naming an icon, in a label or in a name split at its capitals and underscores. */\nconst ICON_WORD = /\\bicons?\\b/i\n\n/** One `name:type` field of the confirmed plan's component; `type` is empty when the field names none. */\nexport interface AiPlannedComponentField {\n name: string\n type: string\n}\n\n/** The fields the confirmed plan lists for its component, read from `name:type`, each name once. */\nexport function aiPlannedComponentFields(plan: AiJobPlan | null): AiPlannedComponentField[] {\n const fields = new Map<string, AiPlannedComponentField>()\n for (const field of aiPlanCreation(plan, 'component')?.fields ?? []) {\n const [name = '', type = ''] = field.split(':').map((part) => part.trim())\n if (COMPONENT_PROP_NAME_PATTERN.test(name) && !fields.has(name)) fields.set(name, { name, type })\n }\n return [...fields.values()]\n}\n\n/** The property names the confirmed plan lists for its component, from its `name:type` fields. */\nexport function aiPlannedComponentProps(plan: AiJobPlan | null): string[] {\n return aiPlannedComponentFields(plan).map((field) => field.name)\n}\n\ninterface BindingFinding {\n id: string\n name: string\n}\n\n/** A property's kind as a sentence names one: \"an Image\", \"a Yes / no\". */\nfunction aKind(type: string | undefined): string {\n const label =\n REUSABLE_PROP_KINDS[(type ?? 'text') as ReusableComponentPropType]?.label ??\n REUSABLE_PROP_KINDS.text.label\n return `${/^[AEIOU]/i.test(label) ? 'an' : 'a'} ${label}`\n}\n\nfunction fieldPhrase(componentId: string, field: string): string {\n return `the ${AI_PALETTE[componentId]?.displayName ?? componentId}’s ${field}`\n}\n\nconst tokenOf = (name: string): string => `{{prop.${name}}}`\n\n/** Whether a property's name or label says it is an icon. */\nfunction namedAsIcon(prop: Pick<ReusableComponentProp, 'name' | 'label'>): boolean {\n const words = prop.name.replace(/([a-z0-9])([A-Z])/g, '$1 $2').replace(/_/g, ' ')\n return ICON_WORD.test(words) || ICON_WORD.test(prop.label ?? '')\n}\n\n/** \"{{prop.a}} is\" or \"{{prop.a}}, {{prop.b}} are\", for a finding that names its properties. */\nfunction tokensAre(names: readonly string[]): string {\n const tokens = [...new Set(names)].map(tokenOf)\n return `${tokens.slice(0, 3).join(', ')} ${tokens.length === 1 ? 'is' : 'are'}`\n}\n\n/**\n * Whether a property handed on to a placed component fits the property it\n * fills there: copy into copy, whole or inside a sentence; a picture or a\n * link only into its own kind, whole; any other kind into one whose value has\n * its shape.\n */\nfunction handsOnTo(prop: ReusableComponentProp, placedType: string, whole: boolean): boolean {\n const type = prop.type ?? 'text'\n if (AI_COMPONENT_COPY_KINDS.has(type) && COPY_FIELD_KINDS.has(placedType)) return true\n if (!whole) return false\n if ([type, placedType].some((kind) => kind === 'image' || kind === 'href')) return type === placedType\n return (\n reusablePropValueShape(prop) ===\n reusablePropValueShape({ type: placedType as ReusableComponentPropType })\n )\n}\n\n/**\n * The component door's check of its bindings, on a tree the doctrine admitted\n * and the properties the same answer declared: every token names a declared\n * property on a field of its kind, every property is bound, an icon is never\n * shown as words, a part is hidden by a `Hide …` Yes / no that defaults to No,\n * and a default fits the field it fills. `refused` names properties the answer\n * declared and the reading refused, which are reported there and not again\n * here.\n */\nexport function aiComponentBindingViolations(\n tree: Pick<AiValidatedTree, 'rootId' | 'nodes' | 'sourceIds'>,\n props: readonly ReusableComponentProp[],\n inventory: AiSiteInventory | null,\n refused: readonly string[] = [],\n): AiDoctrineViolation[] {\n const declared = new Map(props.map((prop) => [prop.name, prop]))\n const skipped = new Set(refused)\n const placedProps = new Map(\n (inventory?.components ?? []).map((component) => [component.id, component.props]),\n )\n const nodes = tree.nodes as unknown as Record<string, AiDoctrineNode>\n // The whole component: its root, and the one element a document wrapper holds.\n const whole = new Set([tree.rootId])\n const root = nodes[tree.rootId]\n if (root?.componentId === 'div' && root.nodes?.length === 1) whole.add(root.nodes[0])\n\n const bound = new Set<string>()\n const undeclared: BindingFinding[] = []\n const unfit: Array<BindingFinding & { at: string }> = []\n const unoffered: Array<BindingFinding & { at: string; values: string[] }> = []\n const tooLong: Array<BindingFinding & { at: string; limit: number }> = []\n const iconAsText: BindingFinding[] = []\n const hidesWhole: BindingFinding[] = []\n const hideForm: BindingFinding[] = []\n const named = (id: string, name: string): ReusableComponentProp | null => {\n const prop = declared.get(name)\n if (prop) {\n bound.add(name)\n return prop\n }\n if (!skipped.has(name)) undeclared.push({ id, name })\n return null\n }\n\n for (const { id, node } of walkTree({ rootId: tree.rootId, nodes })) {\n const entry = AI_PALETTE[node.componentId]\n for (const [field, value] of Object.entries(node.props ?? {})) {\n const placement = isAiComponentPropToken(value) ? 'whole' : 'inside'\n for (const name of aiComponentPropNamesIn(value)) {\n const prop = named(id, name)\n if (!prop) continue\n if (!aiComponentPropBindsToField(prop, entry, field, placement)) {\n unfit.push({ id, name, at: fieldPhrase(node.componentId, field) })\n continue\n }\n if (field === NODE_HIDE_IF_PROP || field === NODE_HIDE_UNLESS_PROP) {\n if (whole.has(id)) hidesWhole.push({ id, name })\n if (\n field === NODE_HIDE_IF_PROP &&\n (!HIDE_LABEL.test(prop.label ?? '') || prop.defaultValue === true)\n ) {\n hideForm.push({ id, name })\n }\n continue\n }\n // Copy the tree shows as words is the wrong home for an icon: the\n // words a page types in are drawn as text, never as the icon.\n if (entry?.propRoles[field] === 'text' && namedAsIcon(prop)) iconAsText.push({ id, name })\n const values = aiComponentUnofferedAnswers(prop, entry, field)\n if (values.length) unoffered.push({ id, name, at: fieldPhrase(node.componentId, field), values })\n const limit = entry?.textLimits[field]\n if (\n placement === 'whole' &&\n limit !== undefined &&\n typeof prop.defaultValue === 'string' &&\n prop.defaultValue.length > limit\n ) {\n tooLong.push({ id, name, at: fieldPhrase(node.componentId, field), limit })\n }\n }\n }\n // A property handed on to a component this one places.\n const refId = node.props?.[AI_INSTANCE_REF_PROP]\n const handed = node.props?.[REUSABLE_INSTANCE_PROP_VALUES_KEY]\n if (\n node.componentId !== REUSABLE_INSTANCE_COMPONENT_ID ||\n typeof refId !== 'string' ||\n !handed ||\n typeof handed !== 'object' ||\n Array.isArray(handed)\n ) {\n continue\n }\n const types = placedProps.get(refId) ?? {}\n for (const [field, value] of Object.entries(handed as Record<string, unknown>)) {\n const wholeValue = isAiComponentPropToken(value)\n for (const name of aiComponentPropNamesIn(value)) {\n const prop = named(id, name)\n if (prop && !handsOnTo(prop, types[field] ?? 'text', wholeValue)) {\n unfit.push({ id, name, at: `the placed component’s ${field}` })\n }\n }\n }\n }\n\n const at = (list: ReadonlyArray<{ id: string }>): string[] =>\n aiModelNodeIds([...new Set(list.map((entry) => entry.id))], tree.sourceIds)\n const violations: AiDoctrineViolation[] = []\n if (undeclared.length) {\n const tokens = [...new Set(undeclared.map((entry) => tokenOf(entry.name)))]\n violations.push({\n rule: 1,\n code: 'prop-undeclared',\n message: `The tree binds ${tokens.slice(0, 3).join(', ')}, which the component does not declare. Declare every property the tree binds.`,\n nodeIds: at(undeclared),\n })\n }\n if (unfit.length) {\n const [first] = unfit\n violations.push({\n rule: 1,\n code: 'binding-field',\n message: `${tokenOf(first.name)} is ${aKind(declared.get(first.name)?.type)} property bound to ${first.at}, which does not take one. Bind each property only to a field that holds its kind of value.`,\n nodeIds: at(unfit),\n })\n }\n const shownAsWords = iconAsText.filter((entry) => AI_COMPONENT_COPY_KINDS.has(declared.get(entry.name)?.type ?? 'text'))\n if (shownAsWords.length) {\n const one = new Set(shownAsWords.map((entry) => entry.name)).size === 1\n violations.push({\n rule: 1,\n code: 'icon-as-text',\n message: `${tokensAre(shownAsWords.map((entry) => entry.name))} named as an icon and shown as words. Make ${\n one ? 'it an icon property' : 'each an icon property'\n } (\"type\": \"icon\", \"defaultValue\": \"\") bound whole to an Icon element’s iconId, for the site owner to pick.`,\n nodeIds: at(shownAsWords),\n })\n }\n if (unoffered.length) {\n const [first] = unoffered\n violations.push({\n rule: 1,\n code: 'binding-answers',\n message: `${tokenOf(first.name)} offers ${first.values.map((value) => `\"${value}\"`).join(', ')}, which ${first.at} does not list. Give a Choice only answers whose values the field lists.`,\n nodeIds: at(unoffered),\n })\n }\n if (tooLong.length) {\n const [first] = tooLong\n violations.push({\n rule: 1,\n code: 'prop-default-too-long',\n message: `The default of ${tokenOf(first.name)} is longer than ${first.at} holds (${first.limit} characters). Shorten it.`,\n nodeIds: at(tooLong),\n })\n }\n if (hidesWhole.length) {\n violations.push({\n rule: 1,\n code: 'hide-whole-component',\n message:\n 'The whole component is hidden by one of its own properties, so a page could place it and show nothing. Put hideIf on the optional part instead.',\n nodeIds: at(hidesWhole),\n })\n }\n if (hideForm.length) {\n const tokens = [...new Set(hideForm.map((entry) => tokenOf(entry.name)))]\n violations.push({\n rule: 1,\n code: 'hide-label',\n message: `${tokens.join(', ')} ${tokens.length === 1 ? 'hides a part, so it is' : 'hide parts, so each is'} a Yes / no labeled \"Hide …\" whose default is false: the part shows until a page hides it.`,\n nodeIds: at(hideForm),\n })\n }\n const unbound = props.filter((prop) => !bound.has(prop.name))\n if (unbound.length) {\n const one = unbound.length === 1\n // Where each unbound kind goes, once a kind, so the re-ask says what to write.\n const kinds = [...new Set(unbound.map((prop) => prop.type ?? 'text'))]\n violations.push({\n rule: 1,\n code: 'prop-unbound',\n message: `The component declares ${unbound\n .slice(0, 3)\n .map((prop) => tokenOf(prop.name))\n .join(', ')} and binds ${one ? 'it' : 'them'} nowhere, so a page that sets ${one ? 'it' : 'them'} changes nothing. Bind every property you declare where its kind goes: ${kinds\n .map((type) => `${aKind(type)} to ${aiComponentKindBindsTo(type)}`)\n .join('; ')}.`,\n })\n }\n return violations\n}\n\n/**\n * Rule 7: the properties the confirmed plan lists for the component are\n * declared, and a field the plan lists as an icon is an icon property, so\n * the plan and the binding checks ask for the same thing (AGL-3054).\n */\nexport function aiPlannedPropViolations(\n plan: AiJobPlan | null,\n props: readonly Pick<ReusableComponentProp, 'name' | 'type'>[],\n): AiDoctrineViolation[] {\n const declared = new Map(props.map((prop) => [prop.name, prop]))\n const planned = aiPlannedComponentFields(plan)\n const violations: AiDoctrineViolation[] = []\n const missing = planned.filter((field) => !declared.has(field.name)).map((field) => field.name)\n if (missing.length) {\n const one = missing.length === 1\n violations.push({\n rule: 7,\n code: 'plan-prop-missing',\n message: `The confirmed plan lists the ${one ? 'property' : 'properties'} ${missing\n .map((name) => `\"${name}\"`)\n .join(', ')}, and the component does not declare ${one ? 'it' : 'them'}. Declare every property the plan lists.`,\n })\n }\n // A property refused on its reading carries no kind, and is reported there.\n const notIcons = planned.filter((field) => {\n const type = declared.get(field.name)?.type\n return field.type === 'icon' && type !== undefined && type !== 'icon'\n })\n if (notIcons.length) {\n const [first] = notIcons\n violations.push({\n rule: 7,\n code: 'plan-prop-kind',\n message: `The confirmed plan lists \"${first.name}\" as an icon, and the component declares it as ${aKind(\n declared.get(first.name)?.type,\n )}. Declare it as an icon property (\"type\": \"icon\", \"defaultValue\": \"\") bound whole to an Icon element’s iconId.`,\n })\n }\n return violations\n}\n\n/**\n * Rule 11 on a component's own outline (AGL-3057). A page's outline check\n * reads an instance as one node, and the site inventory carries no component\n * tree to read in its place, so a component's h2 renders beside the h2 that\n * opens the section placing it, and the page reads h2, h2, h2. The component\n * is held to headings a section can hold instead: h3 or below. A component\n * that would be a whole section, its own h2 and all, is refused the same way:\n * that section is built on the page.\n */\nexport function aiComponentHeadingViolations(\n tree: Pick<AiValidatedTree, 'rootId' | 'nodes' | 'sourceIds'>,\n): AiDoctrineViolation[] {\n const nodes = tree.nodes as unknown as Record<string, AiDoctrineNode>\n const high = walkTree({ rootId: tree.rootId, nodes })\n .filter(({ node }) => {\n const level = aiHeadingLevel(node)\n return level !== null && level < AI_COMPONENT_TOP_HEADING_LEVEL\n })\n .map((visit) => visit.id)\n if (!high.length) return []\n return [\n {\n rule: 11,\n code: 'component-heading-level',\n message: `A component sits inside a page section that opens with its own h2, so its headings start at h${AI_COMPONENT_TOP_HEADING_LEVEL}. Set each heading’s Typography \"component\" to \"h${AI_COMPONENT_TOP_HEADING_LEVEL}\" or lower.`,\n nodeIds: aiModelNodeIds(high, tree.sourceIds),\n },\n ]\n}\n\n/** Rule 14 on the copy a component shows until a page sets it. */\nexport function aiComponentDefaultCopyViolations(props: readonly ReusableComponentProp[]): AiDoctrineViolation[] {\n return detectOffVoiceCopy(\n props.flatMap((prop, index) =>\n (prop.type === 'text' || prop.type === 'richText') && typeof prop.defaultValue === 'string'\n ? [{ at: `props[${index}].defaultValue`, text: prop.defaultValue }]\n : [],\n ),\n )\n}\n\n/**\n * Every check the component door adds to the doctrine's, on a tree it\n * admitted and the answer the tree came in. `onProps` receives the properties\n * that answer declared, so the step keeps the declaration of the answer the\n * loop keeps — the last one it checked.\n */\nexport function aiComponentCheck(input: {\n inventory: AiSiteInventory | null\n plan: AiJobPlan | null\n onProps: (props: ReusableComponentProp[]) => void\n}): (tree: AiValidatedTree, answer: Record<string, unknown>) => AiDoctrineViolation[] {\n const screenIds = new Set((input.inventory?.screens ?? []).map((screen) => screen.id))\n return (tree, answer) => {\n const reading = readAiComponentProps(answer, { screenIds })\n input.onProps(reading.props)\n return [\n ...reading.violations,\n ...aiComponentBindingViolations(tree, reading.props, input.inventory, reading.refused),\n ...aiComponentHeadingViolations(tree),\n ...aiComponentDefaultCopyViolations(reading.props),\n ...aiPlanReuseViolations(input.inventory, input.plan, aiPlacedComponentIds(tree), 'component'),\n ...aiPlannedPropViolations(input.plan, [\n ...reading.props,\n ...reading.refused.map((name) => ({ name })),\n ]),\n ]\n }\n}\n"],"names":["COMPONENT_PROP_NAME_PATTERN","NODE_HIDE_IF_PROP","NODE_HIDE_UNLESS_PROP","REUSABLE_INSTANCE_COMPONENT_ID","REUSABLE_INSTANCE_PROP_VALUES_KEY","REUSABLE_PROP_KINDS","reusablePropValueShape","AI_COMPONENT_COPY_KINDS","aiComponentKindBindsTo","aiComponentPropBindsToField","aiComponentPropNamesIn","aiComponentUnofferedAnswers","isAiComponentPropToken","aiHeadingLevel","detectOffVoiceCopy","walkTree","AI_INSTANCE_REF_PROP","AI_PALETTE","readAiComponentProps","aiModelNodeIds","aiPlacedComponentIds","aiPlanCreation","aiPlanReuseViolations","HIDE_LABEL","COPY_FIELD_KINDS","Set","AI_COMPONENT_TOP_HEADING_LEVEL","ICON_WORD","aiPlannedComponentFields","plan","fields","Map","field","name","type","split","map","part","trim","test","has","set","values","aiPlannedComponentProps","aKind","label","text","fieldPhrase","componentId","displayName","tokenOf","namedAsIcon","prop","words","replace","tokensAre","names","tokens","slice","join","length","handsOnTo","placedType","whole","some","kind","aiComponentBindingViolations","tree","props","inventory","refused","root","declared","skipped","placedProps","components","component","id","nodes","rootId","add","bound","undeclared","unfit","unoffered","tooLong","iconAsText","hidesWhole","hideForm","named","get","push","node","entry","value","Object","entries","placement","at","defaultValue","propRoles","limit","textLimits","undefined","refId","handed","Array","isArray","types","wholeValue","list","sourceIds","violations","rule","code","message","nodeIds","first","shownAsWords","filter","one","size","unbound","kinds","aiPlannedPropViolations","planned","missing","notIcons","aiComponentHeadingViolations","high","level","visit","aiComponentDefaultCopyViolations","flatMap","index","aiComponentCheck","input","screenIds","screens","screen","answer","reading","onProps"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,2BAA2B,EAC3BC,iBAAiB,EACjBC,qBAAqB,EACrBC,8BAA8B,EAC9BC,iCAAiC,QAC5B,iDAAgD;AAKvD,SACEC,mBAAmB,EACnBC,sBAAsB,QACjB,qDAAoD;AAG3D,SACEC,uBAAuB,EACvBC,sBAAsB,EACtBC,2BAA2B,EAC3BC,sBAAsB,EACtBC,2BAA2B,EAC3BC,sBAAsB,QACjB,sCAAkC;AAEzC,SACEC,cAAc,EACdC,kBAAkB,EAClBC,QAAQ,QAGH,uCAAmC;AAC1C,SAASC,oBAAoB,QAAQ,6BAAyB;AAC9D,SAASC,UAAU,QAAQ,qCAAiC;AAC5D,SAASC,oBAAoB,QAAQ,gCAA4B;AACjE,SACEC,cAAc,EACdC,oBAAoB,EACpBC,cAAc,EACdC,qBAAqB,QAChB,yBAAqB;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BC,GAED,qFAAqF,GACrF,MAAMC,aAAa;AAEnB,wEAAwE,GACxE,MAAMC,mBAAwC,IAAIC,IAAI;IAAC;IAAQ;CAAW;AAE1E;;;CAGC,GACD,OAAO,MAAMC,iCAAiC,EAAC;AAE/C,0FAA0F,GAC1F,MAAMC,YAAY;AAQlB,kGAAkG,GAClG,OAAO,SAASC,yBAAyBC,IAAsB;;QAEzCR;IADpB,MAAMS,SAAS,IAAIC;IACnB,KAAK,MAAMC,kBAASX,kBAAAA,eAAeQ,MAAM,iCAArBR,gBAAmCS,MAAM,mBAAI,EAAE,CAAE;QACnE,MAAM,CAACG,OAAO,EAAE,EAAEC,OAAO,EAAE,CAAC,GAAGF,MAAMG,KAAK,CAAC,KAAKC,GAAG,CAAC,CAACC,OAASA,KAAKC,I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,CAACuG,SAAWA,OAAO9D,EAAE;IACpF,OAAO,CAACV,MAAMyE;QACZ,MAAMC,UAAU3H,qBAAqB0H,QAAQ;YAAEH;QAAU;QACzDD,MAAMM,OAAO,CAACD,QAAQzE,KAAK;QAC3B,OAAO;eACFyE,QAAQ7B,UAAU;eAClB9C,6BAA6BC,MAAM0E,QAAQzE,KAAK,EAAEoE,MAAMnE,SAAS,EAAEwE,QAAQvE,OAAO;eAClF0D,6BAA6B7D;eAC7BiE,iCAAiCS,QAAQzE,KAAK;eAC9C9C,sBAAsBkH,MAAMnE,SAAS,EAAEmE,MAAM3G,IAAI,EAAET,qBAAqB+C,OAAO;eAC/EyD,wBAAwBY,MAAM3G,IAAI,EAAE;mBAClCgH,QAAQzE,KAAK;mBACbyE,QAAQvE,OAAO,CAAClC,GAAG,CAAC,CAACH,OAAU,CAAA;wBAAEA;oBAAK,CAAA;aAC1C;SACF;IACH;AACF"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { duplicateResource } from '@aglyn/tenant-data-admin/server/duplicate-resource';
18
+ import type { AiJob, AiJobPlan } from '../model/ai-jobs.types';
19
+ import type { AiSystemBlock } from '../runtime/ai-runtime';
20
+ import { readSiteInventory } from '../runtime/site-inventory';
21
+ import { type AiJobAdmission } from './ai-job-admission';
22
+ import type { AiJobStepRunner } from './ai-job-text-step';
23
+ /**
24
+ * The component step (AGL-2908): the generation step of a `component` job,
25
+ * run once a member confirmed the job's plan.
26
+ *
27
+ * It builds ONE reusable component from the brief — its tree, and the typed
28
+ * properties each page that places it fills in — through
29
+ * `runValidatedGeneration('component', …)`, so every building rule holds on
30
+ * the tree before it is kept. The tree binds each property with
31
+ * `{{prop.<name>}}`; the palette validator keeps those tokens as written
32
+ * (`definesComponent`), and the step's own check, through `extend`, holds
33
+ * each binding to what the Properties dialog and the Attributes panel allow
34
+ * (`ai-job-component-checks.ts`).
35
+ *
36
+ * The component lands as a new draft (`ai-job-drafts.ts`) that no page
37
+ * places, and gets its first version when a member opens it, as every
38
+ * component created outside the besigner does. A plan that starts from a copy
39
+ * of a component the site has gets that copy, through the platform's
40
+ * duplicate module, and nothing generated.
41
+ *
42
+ * A generation step runs on the job beat, never at an inline door: it
43
+ * registers the least time its lookup rounds, its answer and its re-ask need
44
+ * (AGL-3035), runs without extended thinking, and asks for no more of the
45
+ * ceiling the layout and template steps keep than fits that time on the model
46
+ * it runs. The step's spec measures the request and the answer against it.
47
+ */
48
+ /** The longest answer a component may run to; the tree is held to the component budget either way. */
49
+ export declare const AI_JOB_COMPONENT_MAX_TOKENS: number;
50
+ /**
51
+ * The component step's time (AGL-3035, AGL-3036): its two inventory-lookup
52
+ * rounds, its answer and its re-ask at the routing table's ceiling on the tier
53
+ * `job.component` is served from, fitted to what a beat can give a step.
54
+ */
55
+ export declare const AI_JOB_COMPONENT_STEP_BUDGET: import("./ai-job-budget").AiJobStepBudget;
56
+ /** The least time one component step needs before it starts. */
57
+ export declare const AI_JOB_COMPONENT_STEP_MINIMUM_MS: number;
58
+ /** A component's name when the plan names none. */
59
+ export declare const AI_JOB_COMPONENT_DEFAULT_NAME = "Component";
60
+ /** The component step's own instructions, cached after the doctrine and before the catalog. */
61
+ export declare const AI_JOB_COMPONENT_INSTRUCTIONS: readonly AiSystemBlock[];
62
+ /** The component job as the generation's user turn: the name, the brief, the confirmed plan. */
63
+ export declare function aiJobComponentPrompt(job: Pick<AiJob, 'brief'>, plan: AiJobPlan | null, name: string): string;
64
+ /** A component job is admitted for a site of the job's own org whose plan includes reusable components. */
65
+ export declare const aiComponentJobAdmission: AiJobAdmission;
66
+ export interface AiJobComponentStepDeps {
67
+ /** The inventory reader; specs hand in a fake. */
68
+ readInventory?: typeof readSiteInventory;
69
+ /** The platform's duplicate module, for a plan that starts from a copy. */
70
+ duplicate?: typeof duplicateResource;
71
+ }
72
+ export declare function createAiJobComponentStep(deps?: AiJobComponentStepDeps): AiJobStepRunner;
73
+ export declare const runAiJobComponentStep: AiJobStepRunner;
74
+ /** Registers the component step and the check a component job passes before it is created or resumed. */
75
+ export declare function registerAiComponentJob(): void;