@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,720 @@
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 { type AiBuildPlan } from '../model/ai-build-plan';
18
+ import { type AiPlanCapabilities } from '../model/ai-plan-capabilities';
19
+ import type { AiSiteInventory } from '../model/ai-site-inventory';
20
+ import { type AiNodeTreeContext, type AiNodeTreeResult } from './ai-node-tree';
21
+ import { type AiBudgetMetric, type AiLoadEstimate, type AiOutputKind } from './ai-palette';
22
+ /**
23
+ * The building doctrine's validators (AGL-2935): the rules a generated
24
+ * document is held to, each checked by code rather than asked of a prompt.
25
+ *
26
+ * A generator's system prompt carries the doctrine (`ai-doctrine.ts`), and a
27
+ * model mostly follows it. "Mostly" is what these are for. Every tree and
28
+ * every plan passes through them inside `runValidatedGeneration`; a finding
29
+ * is a VIOLATION that names its rule and says, in a sentence a customer can
30
+ * read, what was refused and what to do instead. The runtime re-asks the
31
+ * model once with the findings, and stops for a person when the second
32
+ * answer still breaks one.
33
+ *
34
+ * Trees are checked AFTER `validateAiNodeTree` (AGL-2905) has admitted them,
35
+ * never instead of it: the palette validator decides what may be stored at
36
+ * all, and these decide whether it was built the way a careful author would
37
+ * build it. Plans are checked against the site inventory, which is where
38
+ * "reuse before create" becomes checkable.
39
+ *
40
+ * Rule 17 is a MEASUREMENT, in the platform's existing units: the stored
41
+ * node map in the bytes the save counts (`nodeMapBytes`), images at the size
42
+ * the media library recorded, an email's HTML as the send path renders it,
43
+ * and a page's load on top of the page weight the platform already measured.
44
+ * Nothing here invents a second measure of a page.
45
+ */
46
+ export type AiDoctrineRuleNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17;
47
+ /** Each rule's title, in the words the proposal and the docs page use. */
48
+ export declare const AI_DOCTRINE_RULES: Readonly<Record<AiDoctrineRuleNumber, string>>;
49
+ export declare const AI_DOCTRINE_RULE_NUMBERS: AiDoctrineRuleNumber[];
50
+ export interface AiDoctrineViolation {
51
+ /**
52
+ * The rule broken; `null` when the answer could not be read as the output
53
+ * at all, or asks for what its job does not build rather than breaking a
54
+ * building rule.
55
+ */
56
+ rule: AiDoctrineRuleNumber | null;
57
+ /** Stable per finding, for specs and logs. */
58
+ code: string;
59
+ /** One customer-safe sentence: what was refused and what to do instead. */
60
+ message: string;
61
+ /** What the model is told beyond `message`, when the validator's own words say more. */
62
+ detail?: string;
63
+ /** Offending nodes, by the ids of the tree that was checked. */
64
+ nodeIds?: string[];
65
+ /** Offending plan entries or answer fields, as `screens[1].sections[2]`. */
66
+ paths?: string[];
67
+ /** Rule 17: the measured figure against its budget. */
68
+ figure?: {
69
+ metric: AiBudgetMetric;
70
+ value: number;
71
+ budget: number;
72
+ };
73
+ }
74
+ /** A violation as one line: the rule's number and title, then its sentence. */
75
+ export declare function aiDoctrineViolationText(violation: AiDoctrineViolation): string;
76
+ /** Who the copy is framed for; agency and enterprise copy holds to the judgment-word rule. */
77
+ export type AiCopyFraming = 'agency' | 'enterprise' | null;
78
+ export interface AiDoctrineNode {
79
+ componentId: string;
80
+ props?: Record<string, unknown>;
81
+ sx?: Record<string, unknown>;
82
+ nodes?: string[];
83
+ }
84
+ /** A validated flat node map, as `validateAiNodeTree` returns it. */
85
+ export interface AiDoctrineTree {
86
+ rootId: string;
87
+ nodes: Record<string, AiDoctrineNode>;
88
+ }
89
+ /** What a library asset records about itself, for the image weight. */
90
+ export interface AiAssetFacts {
91
+ sizeBytes?: number;
92
+ width?: number;
93
+ height?: number;
94
+ }
95
+ export interface AiDoctrineTreeContext extends AiNodeTreeContext {
96
+ /** The brand an email is held to: palette path → color, and the families. */
97
+ brand?: {
98
+ colors: Record<string, string>;
99
+ fonts: string[];
100
+ } | null;
101
+ /** Placed library assets by media id. */
102
+ assets?: Record<string, AiAssetFacts>;
103
+ /** The plan named a third-party embed the brief asked for, and its cost. */
104
+ allowEmbeds?: boolean;
105
+ framing?: AiCopyFraming;
106
+ /**
107
+ * Whether the workspace keeps reusable components and saved forms
108
+ * (AGL-3030). `false` builds inline, the one way such a workspace can: a
109
+ * form is a Form holding its fields, and a repeated block is drawn where it
110
+ * repeats. Absent is `true`, the doctrine whole.
111
+ */
112
+ reusableComponents?: boolean;
113
+ /**
114
+ * The site's home screens, by id (AGL-3056): the screen a link falls back
115
+ * to when the site has none for what it promises. Absent: none is known.
116
+ */
117
+ homeScreenIds?: readonly string[];
118
+ /**
119
+ * The node as the model wrote it, by the id the checked tree gives it
120
+ * (AGL-3078), for a tree that was stored before it is checked: a page
121
+ * section is checked as part of the page, whose props the palette validator
122
+ * has already read, and a value it could not read is absent there. Absent,
123
+ * the tree the check is given is what the model wrote.
124
+ */
125
+ writtenNode?: (id: string) => unknown;
126
+ /**
127
+ * The page's sections by their names in its plan, in order, where the tree
128
+ * is a page a plan lays out (AGL-3097). A Button or a Screen Link may then go
129
+ * to one of them, by `scrollTo` naming it or an `href` fragment its name's
130
+ * words make up, which the page step writes as the platform's Scroll to
131
+ * element interaction. Absent: a link goes only where its `screenId` or
132
+ * `href` says.
133
+ */
134
+ pageSections?: readonly string[];
135
+ /**
136
+ * The section roots of the page, by id, where the tree checked is the page as
137
+ * the page step stores it (AGL-3097): a link there that carries a Scroll to
138
+ * element interaction to one of them, built or still to come, goes there.
139
+ * Only a stored page is given them. The palette validator drops every
140
+ * interaction a model writes before anything is stored, and an answer's own
141
+ * are never read.
142
+ */
143
+ scrollTargetIds?: readonly string[];
144
+ }
145
+ /** One node of a walk: its id, its depth, and its ancestors' ids from the root down. */
146
+ export interface Visit {
147
+ id: string;
148
+ node: AiDoctrineNode;
149
+ depth: number;
150
+ ancestors: string[];
151
+ }
152
+ /**
153
+ * Every reachable node in document order, each once. Exported for a door's
154
+ * own checks (`extend`), which read a tree the way these detectors do.
155
+ */
156
+ export declare function walkTree(tree: AiDoctrineTree): Visit[];
157
+ /** Below this, a repeat is a row of buttons, not a block worth a component. */
158
+ export declare const AI_REPEAT_MIN_NODES = 3;
159
+ /** Rule 1: a block on one page this many times is a component. */
160
+ export declare const AI_REPEAT_MIN_COUNT = 3;
161
+ /** Rule 1 across pages: a block this large on two pages is a component. */
162
+ export declare const AI_REPEAT_ACROSS_PAGES_MIN_NODES = 5;
163
+ /** Rule 8: a hand-typed list this long is data. */
164
+ export declare const AI_TYPED_LIST_MIN_ITEMS = 8;
165
+ /**
166
+ * Rule 1. A block repeated on one page, or a block this page shares with
167
+ * another page generated beside it, is one component placed as instances.
168
+ *
169
+ * A workspace that keeps no reusable components can place no instance, so
170
+ * there a repeated block is drawn where it repeats, and nothing is refused.
171
+ */
172
+ export declare function detectRepeatedSubtrees(tree: AiDoctrineTree, otherPages?: readonly AiDoctrineTree[], context?: Pick<AiDoctrineTreeContext, 'reusableComponents'>): AiDoctrineViolation[];
173
+ /**
174
+ * How many copies of one repeated thing a document shows, read as
175
+ * generously as the tree allows (AGL-3024): the largest group of nodes the
176
+ * shape index calls the same shape — the index rule 1 counts repeats with —
177
+ * or, where a node's children outnumber that, its fan-out.
178
+ *
179
+ * GENEROUS ON PURPOSE. The one caller compares this against a count a plan
180
+ * promised and speaks only when the count is SHORT, so every reading that
181
+ * finds more items makes the check quieter, never louder: three cards whose
182
+ * headings a hero's subtitle happens to match read as four and are let
183
+ * through, and four cards laid out as two rows of two read as four either by
184
+ * their shared shape or by the rows' fan-out. What it cannot do is find four
185
+ * items in a document that holds three of everything.
186
+ */
187
+ export declare function aiRepeatedItemCount(tree: AiDoctrineTree): number;
188
+ /** Whether a document draws its repeated items from a collection, which fills them at render. */
189
+ export declare function aiBindsRepeatedItems(tree: AiDoctrineTree): boolean;
190
+ /**
191
+ * The regions a layout is built out of, and how each one is found in a tree
192
+ * (AGL-3024): the landmark elements it may be written as, and the palette
193
+ * elements that ARE one wherever they appear.
194
+ *
195
+ * A CLOSED vocabulary, because it is what a plan's promise of a region is
196
+ * checked against: a planner naming a region outside it has promised
197
+ * something no check can find, which the plan rules refuse rather than let
198
+ * pass as built.
199
+ */
200
+ export declare const AI_LAYOUT_REGIONS: {
201
+ readonly header: {
202
+ readonly elements: readonly ["header"];
203
+ readonly componentIds: readonly ["muiAppBar"];
204
+ };
205
+ readonly nav: {
206
+ readonly elements: readonly ["nav"];
207
+ readonly componentIds: readonly [];
208
+ };
209
+ readonly sidebar: {
210
+ readonly elements: readonly ["aside"];
211
+ readonly componentIds: readonly [];
212
+ };
213
+ readonly main: {
214
+ readonly elements: readonly ["main"];
215
+ readonly componentIds: readonly ["layoutSlot"];
216
+ };
217
+ readonly footer: {
218
+ readonly elements: readonly ["footer"];
219
+ readonly componentIds: readonly [];
220
+ };
221
+ };
222
+ export type AiLayoutRegion = keyof typeof AI_LAYOUT_REGIONS;
223
+ export declare const AI_LAYOUT_REGION_NAMES: AiLayoutRegion[];
224
+ /**
225
+ * The region a plan's word names, or `null` for a word the vocabulary does
226
+ * not hold.
227
+ *
228
+ * Read the way a recorded plan writes one. A planner names a region as
229
+ * `header`, as `layoutSlot:slot` or as `footer:region (firm name, address)`,
230
+ * so the name is what stands before the first colon, capitals are word
231
+ * breaks, and a trailing "region" or "area" is filler once the whole name has
232
+ * been tried: "Sidebar region", "side-bar" and `sidebar:links` are one thing.
233
+ */
234
+ export declare function aiLayoutRegionOf(word: string): AiLayoutRegion | null;
235
+ /** Every region a built tree carries, by the elements and palette elements it holds. */
236
+ export declare function aiTreeLayoutRegions(tree: AiDoctrineTree): Set<AiLayoutRegion>;
237
+ /**
238
+ * Rule 2. A page carries no copy of what every page carries: an app bar, or
239
+ * a header, navigation or footer element near the top of the document. The
240
+ * header of an article inside the page is the article's, not the site's.
241
+ */
242
+ export declare function detectLayoutRegions(tree: AiDoctrineTree, outputKind: AiOutputKind): AiDoctrineViolation[];
243
+ /**
244
+ * Rule 3. A form on a page is a Form bound by id to a form built on the
245
+ * Forms page — fields, validation, consent and routing kept in one place.
246
+ * Loose fields, an unbound Form, and fields drawn inside a bound Form (which
247
+ * the page never renders: the placed form's own design replaces them) are
248
+ * refused. A form's own design is the one place fields are drawn.
249
+ *
250
+ * A workspace that keeps no saved forms (AGL-3030) has no Forms page to build
251
+ * one on, so there the form IS the page's: an unbound Form holding its Form
252
+ * Fields, which the site's submit route collects like any other. Loose fields
253
+ * are still refused, and so is an unbound Form with no field to send.
254
+ */
255
+ export declare function detectInlineForms(tree: AiDoctrineTree, outputKind: AiOutputKind, context?: Pick<AiDoctrineTreeContext, 'reusableComponents'>): AiDoctrineViolation[];
256
+ /**
257
+ * Rule 5. Every color, spacing, radius and type size is a theme token. A
258
+ * color the theme lacks is a theme change for the theme door to draft, not a
259
+ * value written onto one element.
260
+ */
261
+ export declare function detectLiteralStyles(tree: AiDoctrineTree, outputKind: AiOutputKind): AiDoctrineViolation[];
262
+ /**
263
+ * Rule 6. An email is painted with the brand: its colors are the site's
264
+ * brand colors and its fonts the brand's. A mail client cannot resolve a
265
+ * theme token, so the brand's own values are what an email may name — and
266
+ * with no brand recorded, the blocks' own defaults.
267
+ */
268
+ export declare function detectOffBrandEmail(tree: AiDoctrineTree, outputKind: AiOutputKind, brand: AiDoctrineTreeContext['brand']): AiDoctrineViolation[];
269
+ /**
270
+ * Rule 8 (tree). A long list typed out item by item is data: bound to a
271
+ * dataset or a content collection it stays current; typed, it is a copy that
272
+ * goes stale. Instances of one component filled in side by side are the same
273
+ * list in a component's clothes, and are counted the same way.
274
+ *
275
+ * A list is counted within the Section it sits in, the unit a plan counts a
276
+ * section's items in (AGL-3061): a page's four practice areas and its four
277
+ * steps are two short lists that happen to share a card, not one long one,
278
+ * and a plan that kept them must not build a page this refuses. The same
279
+ * list split across a section's columns is still one list. A tree with no
280
+ * Section is one group.
281
+ */
282
+ export declare function detectTypedData(tree: AiDoctrineTree): AiDoctrineViolation[];
283
+ /**
284
+ * Rule 9. Images are placed from the media library — an asset, or an empty
285
+ * slot for the author to fill — never hot-linked from another site, and
286
+ * every picture carries alt text (or says it is decorative).
287
+ */
288
+ export declare function detectImageSources(tree: AiDoctrineTree, context?: AiNodeTreeContext): AiDoctrineViolation[];
289
+ /**
290
+ * A heading's level: the element it renders as, else the variant's own.
291
+ * Exported for a door's own checks, which read an outline the way rule 11
292
+ * reads a page's.
293
+ */
294
+ export declare function aiHeadingLevel(node: AiDoctrineNode): number | null;
295
+ /**
296
+ * Rule 11. One `main` landmark per document, and a heading outline that
297
+ * starts at one `h1` and never skips a level. The platform places the one
298
+ * landmark on the layout's slot, or on a page's root when it has no layout
299
+ * (`stampDocumentLandmark`); a tree that declares two leaves it to pick the
300
+ * wrong one. A component, a form or an email is placed inside pages, so it
301
+ * carries no landmark of its own, and a layout carries no `h1`: every page
302
+ * placed in it brings its own.
303
+ */
304
+ export declare function detectDocumentStructure(tree: AiDoctrineTree, outputKind: AiOutputKind): AiDoctrineViolation[];
305
+ /**
306
+ * Rule 12. Widths follow the theme's breakpoints and the palette's
307
+ * responsive props — a Container's max width, a Grid's span — never a fixed
308
+ * pixel or viewport width that holds at one screen size. An email's column
309
+ * is fixed by the medium, and is exempt.
310
+ */
311
+ export declare function detectAdHocWidths(tree: AiDoctrineTree, outputKind: AiOutputKind): AiDoctrineViolation[];
312
+ /**
313
+ * Rule 12, for a Grid (AGL-3055). The palette's Grid is one element in both
314
+ * roles: a CONTAINER lays its direct Grid children out in columns, and an ITEM
315
+ * takes a size. The sizes are fractions of the container's columns, so an
316
+ * item under a Grid that is not a container is sized against nothing, and a
317
+ * row of them stacks one under another at every width; a size that holds at
318
+ * every width keeps a phone's columns as narrow as a desktop's; and an `sx`
319
+ * gap on a container spaces the columns outside the widths the items were
320
+ * sized by, so the last column wraps onto a row of its own. A live About
321
+ * page's practice areas were the first: a Grid with no container holding three
322
+ * items sized "4", one column at every width.
323
+ *
324
+ * A Grid that is not a container is told what to do by what it was written as
325
+ * (AGL-3078), because one sentence does not mend every shape: a live About
326
+ * page's section was refused twice for rule 12, with a re-ask that only ever
327
+ * said to make the Grid a container of sized columns.
328
+ *
329
+ * - `grid-not-container`: a row that is not a container. A Grid that holds
330
+ * sized Grid items, sets a prop only a row reads, or holds two or more
331
+ * elements of one shape side by side. The rule's intent: a row of cards is a
332
+ * container of sized items.
333
+ * - `grid-as-stack`: any other Grid that is not a container and sets a prop
334
+ * only a container reads, or holds two or more elements without being an
335
+ * item: a group that only stacks, such as a heading over its text, or one
336
+ * written with a column direction, which a Grid does not have. The re-ask
337
+ * offers a Stack or a Box for the group, or a container of sized items.
338
+ * - `grid-item-outside-container`: a sized Grid item that sits in another
339
+ * element, such as a Box inside its container. A container sizes only the
340
+ * items directly in it, so the re-ask asks to move the item there. A Box or a
341
+ * Stack in a container that holds nothing but sized items is refused through
342
+ * its items, not as a child of the container that is no item.
343
+ * - `grid-container-text`: a Grid whose `container` was written as a value the
344
+ * palette validator cannot read as true or false, such as the text "True". The
345
+ * re-ask names the value as the fault.
346
+ * - `grid-item-size`: a container's child that is not a Grid item sized full
347
+ * width on a phone, or a container of several whose items never step down
348
+ * to columns at a larger width.
349
+ * - `grid-gap`: a container spaced by an `sx` gap rather than its spacing.
350
+ *
351
+ * Each re-ask names the Grid or its items by the model's own ids and says what
352
+ * to write, in the size format the renderer reads. `written` is the node as
353
+ * the model wrote it, by an id of `tree`, where that is known: the palette
354
+ * validator reads a `container` it cannot parse, and a column direction, as
355
+ * absent, and only what was written can name them.
356
+ */
357
+ export declare function detectUnresponsiveGrids(tree: AiDoctrineTree, outputKind: AiOutputKind, written?: (id: string) => unknown): AiDoctrineViolation[];
358
+ /** Whether an element is one rule 10 holds to a destination: a Button or a Screen Link. */
359
+ export declare function isAiLinkElement(componentId: unknown): boolean;
360
+ /**
361
+ * Rule 5, for a link on a colored band (AGL-3056). The doctrine asks for
362
+ * palette tokens, and a band in `primary.main` holding a Screen Link that
363
+ * sets no color is two valid tokens: but the link keeps the theme's primary
364
+ * color, so its words are navy on navy. A live About page's footer was the
365
+ * first, a "Request a Consultation" link on a primary band. A link or a button
366
+ * whose words are drawn in the family of the band it sits on is refused, with
367
+ * a re-ask to inherit the band's contrast text or to set it.
368
+ */
369
+ export declare function detectInvisibleLinks(tree: AiDoctrineTree, outputKind: AiOutputKind): AiDoctrineViolation[];
370
+ /**
371
+ * Rule 10, for a link sent where the site has nothing for it (AGL-3056). A
372
+ * link whose purpose the site has no screen for is left out; it never goes to
373
+ * a screen that does something else. The site inventory cannot say what each
374
+ * screen is for, but it can name the one a model falls back to: a live About
375
+ * page's footer sent "Request a Consultation" to the home screen, because the
376
+ * site had no consultation screen. So a Screen Link or a Button, outside the
377
+ * header and the navigation, that links the home screen with words that do
378
+ * not say home is refused, with a re-ask to link the screen that does what it
379
+ * says, or to leave the link out.
380
+ */
381
+ export declare function detectUnrelatedScreenLinks(tree: AiDoctrineTree, outputKind: AiOutputKind, context?: Pick<AiDoctrineTreeContext, 'homeScreenIds'>): AiDoctrineViolation[];
382
+ /**
383
+ * Rule 10, for a link that goes nowhere (AGL-3072). A Button or a Screen Link
384
+ * goes where its `screenId` or its `href` says, and those are the only
385
+ * destinations either element carries: the palette validator keeps a
386
+ * `screenId` the site has, and an `href` that is a path on the site, an
387
+ * `https:` address or a binding the caller admitted. Nothing else can stand
388
+ * in for one. A form is sent by the button the Form draws from its own
389
+ * `submitLabel`, the elements a page places carry no id an anchor could name
390
+ * (AGL-2867), and a generated node sets no interaction. So a link with
391
+ * neither is a dead control: a live About page's hero carried a "Request a
392
+ * Consultation" button with no destination. It is refused, with a re-ask
393
+ * naming its words and what it may link.
394
+ *
395
+ * On a page a plan lays out (`context.pageSections`), a link may also go to a
396
+ * section of the same page (AGL-3097). A live hero's re-ask was answered with
397
+ * "#consultation-form", an anchor to the form the plan places last, and the
398
+ * page stopped at its first section. A link that names a section, by
399
+ * `scrollTo` or by a fragment that section's name's words make up, goes
400
+ * there, and the page step writes the platform's Scroll to element
401
+ * interaction for it. On a page as stored (`context.scrollTargetIds`), a link
402
+ * carrying that interaction to one of its section roots goes there. Two
403
+ * faults get a sentence of their own:
404
+ *
405
+ * - `link-fragment`: an `href` fragment that names no section. The palette
406
+ * validator drops it, so what the link was written with goes nowhere.
407
+ * - `scroll-target-unknown`: a `scrollTo` naming no section of the page.
408
+ *
409
+ * `written` is the node as the model wrote it and `stored` the node as the
410
+ * check was given it, each by an id of `tree`.
411
+ */
412
+ export declare function detectLinksWithoutDestination(tree: AiDoctrineTree, outputKind: AiOutputKind, context?: Pick<AiDoctrineTreeContext, 'pageSections' | 'scrollTargetIds'>, written?: (id: string) => unknown, stored?: (id: string) => unknown): AiDoctrineViolation[];
413
+ /**
414
+ * Rule 13. The AI writes drafts. An answer that asks for anything to be
415
+ * published, or to go live, is refused whatever else it got right; nothing
416
+ * downstream reads such a field, and the refusal is what keeps a future
417
+ * reader from starting to.
418
+ */
419
+ export declare function detectPublishIntent(answer: unknown): AiDoctrineViolation[];
420
+ /**
421
+ * The facts in square brackets copy holds (rule 14), each once whatever its
422
+ * case, in the order they first appear, as the copy spells them
423
+ * (AGL-3056): what a member fills in before a draft is published.
424
+ */
425
+ export declare function aiBracketedFacts(texts: Iterable<string>): string[];
426
+ export interface AiCopySample {
427
+ /** A node id for a tree, a path for a plan. */
428
+ at: string;
429
+ text: string;
430
+ }
431
+ /**
432
+ * Rule 14. Copy in the site's voice: no lorem ipsum or "your text here"
433
+ * filler, and — for copy framed for agencies and enterprises — no words that
434
+ * judge the reader's work as simple or cheap.
435
+ */
436
+ export declare function detectOffVoiceCopy(samples: readonly AiCopySample[], framing?: AiCopyFraming): AiDoctrineViolation[];
437
+ /** Every piece of copy a tree carries, with the node it sits on. */
438
+ export declare function aiTreeCopy(tree: AiDoctrineTree, context?: AiNodeTreeContext): AiCopySample[];
439
+ /**
440
+ * The word a line ends on when that word leaves it unfinished (AGL-3072), or
441
+ * `null`. A line that closes itself, ends on a binding or a bracketed fact the
442
+ * member fills, or ends on any other word, is finished as far as a check can
443
+ * tell. Exported for the specs that hold the closed list.
444
+ */
445
+ export declare function aiDanglingWord(line: string): string | null;
446
+ /**
447
+ * Rule 14, for a line cut short (AGL-3072). Copy in the site's voice is
448
+ * finished copy: a heading, a subhead or a body text that ends on an article
449
+ * or a joining conjunction, or on a word that opens a phrase right after a
450
+ * comma, with no closing punctuation, reads as a sentence cut off mid-thought.
451
+ * A live About page's hero subhead ended "…that matter most, with". A closed
452
+ * list of words, on the lines a reader reads, keeps it deterministic: a
453
+ * label, a button, a caption and a bracketed fact are never held to it.
454
+ */
455
+ export declare function detectDanglingWords(tree: AiDoctrineTree): AiDoctrineViolation[];
456
+ /**
457
+ * Rule 14, for a line cut at its ceiling (AGL-3076). The palette validator
458
+ * holds copy to a ceiling for its role and cuts what runs past it, and says so
459
+ * only in its repairs. A cut line is unfinished wherever the cut falls, after
460
+ * a word or inside one, and a heading style's ceiling of
461
+ * `AI_TEXT_LIMITS.headline` characters is one the catalog never shows a model:
462
+ * a live About page's hero subhead, a Typography in the h5 style, was cut at
463
+ * 120 characters to "…that matter most, with". So a heading, a subhead, a body
464
+ * line, or a button's or a link's label the validator cut is refused, with a
465
+ * re-ask naming the ceiling.
466
+ *
467
+ * `repairs` are the palette validator's, naming nodes by the ids of the tree
468
+ * it was given, `written`; `idOf` turns such an id into the id the violation
469
+ * names.
470
+ */
471
+ export declare function detectCutLines(repairs: readonly string[], written: Readonly<Record<string, unknown>>, idOf?: (id: string) => string): AiDoctrineViolation[];
472
+ /**
473
+ * Rule 16. The flattest tree that renders the design: no container that
474
+ * wraps one other container and adds nothing, no empty containers, no inline
475
+ * style repeated where a token or a component prop would carry it, no font
476
+ * beyond the theme's, images lazy below the first, video by poster rather
477
+ * than autoplay, and no third-party embed the plan did not name.
478
+ */
479
+ export declare function detectHeavyDocument(tree: AiDoctrineTree, outputKind: AiOutputKind, context?: AiDoctrineTreeContext): AiDoctrineViolation[];
480
+ /**
481
+ * Rule 16, for an item with nothing in it (AGL-3072). A list item or a card
482
+ * that holds elements, none of which shows a word, a picture or anything
483
+ * else, is an empty row or an empty box on the page: a live About page's list
484
+ * of estate planning services ended on a List Item whose List Item Text had
485
+ * no words. An item that holds no element at all is `empty-container`'s, and
486
+ * is not reported twice.
487
+ */
488
+ export declare function detectEmptyItems(tree: AiDoctrineTree): AiDoctrineViolation[];
489
+ export interface AiOutputScore {
490
+ nodes: number;
491
+ /** The stored node map, in the save's own bytes. */
492
+ bytes: number;
493
+ /** What the placed library images request, from their recorded sizes. */
494
+ imageBytes: number;
495
+ /** Placed images the media library could not size: hot-linked, or no facts supplied. */
496
+ imagesUnmeasured: number;
497
+ embeds: number;
498
+ fontFamilies: number;
499
+ /** An email's rendered HTML; `null` for every other output. */
500
+ emailHtmlBytes: number | null;
501
+ }
502
+ /** The rule-17 measurements of one validated tree. */
503
+ export declare function scoreAiOutput(tree: AiDoctrineTree, outputKind: AiOutputKind, context?: AiDoctrineTreeContext): AiOutputScore;
504
+ /**
505
+ * Rule 17. An output over its kind's budget is refused with the figure, the
506
+ * budget and the heaviest parts named, so the re-ask knows where to cut.
507
+ */
508
+ export declare function detectOverBudget(score: AiOutputScore, outputKind: AiOutputKind, tree: AiDoctrineTree, context?: AiDoctrineTreeContext): AiDoctrineViolation[];
509
+ /**
510
+ * What a first visit to a generated output is estimated to transfer.
511
+ *
512
+ * The page half is a MEASUREMENT the platform already holds, not a guess:
513
+ * `ESTIMATED_PAGE_TRANSFER_BYTES` is the first-party weight a published page
514
+ * measured at settle, which `check:page-view-rate` holds against the
515
+ * tenant page budget and the bandwidth meter is priced from. The tenant's
516
+ * real-user vitals (`web-vitals-rum.ts`) report to analytics per visit and
517
+ * are not readable for a draft nobody has visited, so they are not a second
518
+ * source here. On top of that weight go this output's own stored document
519
+ * and the images it places. A component or a layout reports what it adds to
520
+ * a page; an email is not a page load and has none.
521
+ */
522
+ export declare function estimateAiOutputLoad(score: AiOutputScore, outputKind: AiOutputKind): AiLoadEstimate | null;
523
+ /**
524
+ * A NODE MAP THAT DOES NOT AGREE WITH ITSELF (AGL-3143).
525
+ *
526
+ * A flat node map is two halves that have to match: what each node lists
527
+ * under `nodes`, and what the map holds. A model writing one section in one
528
+ * pass gets them out of step in two ways, and neither reaches it as
529
+ * something it can act on.
530
+ *
531
+ * An element written but listed by nobody is dropped on the way in, so the
532
+ * container that should have held it reads as empty and the answer comes
533
+ * back "an element meant to hold content is empty — remove it, or fill it".
534
+ * The content is already written; it is one line away from being placed, and
535
+ * the re-ask does not say so. A live page build was told exactly that of a
536
+ * card grid whose repeated card it had written and not placed; it answered by
537
+ * naming four children and writing one.
538
+ *
539
+ * Which is the other half: a name listed under `nodes` that the map never
540
+ * holds. That one is refused, but by the sanitizer under the palette
541
+ * validator, as `Missing node "card2"` — which the door turns into "the
542
+ * answer could not be used as a section", with no rule, no node and nothing
543
+ * to change. It cost that page its last attempt and the build stopped three
544
+ * sections in, so the page's form — the thing being measured — was never
545
+ * reached at all.
546
+ *
547
+ * Both are read off the tree AS THE MODEL WROTE IT, before the palette
548
+ * validator drops anything, so a re-ask can quote the node at fault.
549
+ */
550
+ export declare function detectDisagreeingNodes(input: unknown): AiDoctrineViolation[];
551
+ export interface AiDoctrineTreeReport {
552
+ ok: boolean;
553
+ /** The palette validator's result: the tree to store, its repairs and its id map. */
554
+ tree: Extract<AiNodeTreeResult, {
555
+ ok: true;
556
+ }> | null;
557
+ violations: AiDoctrineViolation[];
558
+ score: AiOutputScore | null;
559
+ load: AiLoadEstimate | null;
560
+ }
561
+ /**
562
+ * The whole check on one emitted tree: the palette validator first, then
563
+ * every tree rule, then the budget. `otherPages` are the trees generated
564
+ * beside this one, for the across-pages half of rule 1.
565
+ */
566
+ export declare function validateAiDoctrineTree(input: unknown, outputKind: AiOutputKind, context?: AiDoctrineTreeContext, otherPages?: readonly AiDoctrineTree[]): AiDoctrineTreeReport;
567
+ /**
568
+ * Whether two names name the same thing: the same words once filler is
569
+ * dropped, or every word of a name of two or more words inside the other.
570
+ */
571
+ export declare function aiNamesMatch(left: string, right: string): boolean;
572
+ /**
573
+ * Rule 1 (plan): repeated items place a component, and a section two screens
574
+ * share is one. A workspace that keeps no reusable components draws them in
575
+ * their sections instead (AGL-3030), and nothing is refused.
576
+ */
577
+ export declare function detectPlanRepeats(plan: AiBuildPlan, inventory: AiSiteInventory | null, capabilities?: AiPlanCapabilities | null): AiDoctrineViolation[];
578
+ /** The fewest sections of one item, side by side and of one kind, that are one list split apart. */
579
+ export declare const AI_SPLIT_LIST_MIN_SECTIONS = 2;
580
+ /**
581
+ * Rule 1 (plan): a list is one section whose items repeat (AGL-3071). A
582
+ * section's `items` counts what it repeats, so two or more sections side by
583
+ * side that each show one item of the same kind — the same component, or a
584
+ * name that labels the same kind of item — are one list split apart. A live
585
+ * Free About page planned "the four areas we practice" as four sections of one
586
+ * item: none was drawn from the one written-once item a repeated section is
587
+ * built from, and the four came out in three different shapes. The re-ask
588
+ * names the sections and gives the one section to plan instead. Where the
589
+ * workspace keeps reusable components, a list long enough for rule 1 places
590
+ * one for its item, so the section it gives places one too.
591
+ *
592
+ * Sections of several items are never joined: two lists that share a card
593
+ * are two lists, and rule 8 counts each within its own section (AGL-3061).
594
+ */
595
+ export declare function detectPlanSplitLists(plan: AiBuildPlan, inventory: AiSiteInventory | null, capabilities?: AiPlanCapabilities | null): AiDoctrineViolation[];
596
+ /**
597
+ * Rule 2 (plan): every screen declares a layout, no section is a copy of a
598
+ * layout region, and no section places a layout, which frames a whole screen
599
+ * (AGL-3040). A site with no layout, where this job may not create one
600
+ * (AGL-3030), has nothing to declare: its screens name none, and a screen
601
+ * that names none is not refused there. A screen whose layout is a `new:`
602
+ * reference the plan never creates is refused here, and only here.
603
+ */
604
+ export declare function detectPlanLayoutRegions(plan: AiBuildPlan, inventory: AiSiteInventory | null, capabilities?: AiPlanCapabilities | null): AiDoctrineViolation[];
605
+ /**
606
+ * Rule 3 (plan): a section that collects answers places a form from the Forms
607
+ * page. A workspace that keeps no saved forms draws the form on the page
608
+ * (AGL-3030), and nothing is refused.
609
+ */
610
+ export declare function detectPlanInlineForms(plan: AiBuildPlan, inventory: AiSiteInventory | null, capabilities?: AiPlanCapabilities | null): AiDoctrineViolation[];
611
+ /** Pages sharing one shape this many times are a template applied. */
612
+ export declare const AI_SIMILAR_PAGES_MIN = 3;
613
+ /**
614
+ * Rule 4 (plan): three or more screens with the same sections share one
615
+ * template, and a template is what a screen applies, never what one of its
616
+ * sections places (AGL-3040).
617
+ */
618
+ export declare function detectUntemplatedSimilarPages(plan: AiBuildPlan, inventory?: AiSiteInventory | null): AiDoctrineViolation[];
619
+ /** Rule 5 (plan): a color value belongs only in a theme change. */
620
+ export declare function detectPlanLiteralColors(plan: AiBuildPlan): AiDoctrineViolation[];
621
+ /** Rule 7 (plan): reuse names real records, and a creation is an exception that says why. */
622
+ export declare function detectCreateBeforeReuse(plan: AiBuildPlan, inventory: AiSiteInventory | null): AiDoctrineViolation[];
623
+ /**
624
+ * Rule 7 (plan): a plan creates only what the request says this job may
625
+ * create on this site (AGL-3030) — what the workspace's plan includes, what
626
+ * the site has room for, and what the job builds itself. One violation a
627
+ * creation, each saying why and what to do instead.
628
+ */
629
+ export declare function detectPlanUncreatable(plan: AiBuildPlan, capabilities: AiPlanCapabilities | null): AiDoctrineViolation[];
630
+ /**
631
+ * Rule 7 (plan): what a plan places, it reuses or it creates (AGL-3040). The
632
+ * doctrine has a plan refer to what it creates as new:<name>, so a reference
633
+ * that names no entry of the create list is a creation nothing builds. A page
634
+ * kept with one stops at its first pass, sending the member to make that
635
+ * creation by hand, which a workspace that cannot make it never can. Each is
636
+ * refused with the one re-ask, once a name however often it is placed, and
637
+ * says what to do on THIS workspace: declare the creation where the job may
638
+ * make one more of that kind, and otherwise build the page without it, drawn
639
+ * on the page or placed from what the site has. A screen's layout is rule
640
+ * 2's (`plan-screen-without-layout`), and is not reported twice.
641
+ */
642
+ export declare function detectPlanUndeclaredCreations(plan: AiBuildPlan, inventory: AiSiteInventory | null, capabilities?: AiPlanCapabilities | null): AiDoctrineViolation[];
643
+ /**
644
+ * Rule 8 (plan): long lists are bound, and a list the site already holds is
645
+ * bound to it. Where this job may not create a dataset (AGL-3030), the way
646
+ * out the refusal names is a shorter list rather than a dataset it would
647
+ * only refuse next.
648
+ */
649
+ export declare function detectPlanTypedData(plan: AiBuildPlan, inventory: AiSiteInventory | null, capabilities?: AiPlanCapabilities | null): AiDoctrineViolation[];
650
+ export declare const AI_SEO_TITLE_MAX = 70;
651
+ export declare const AI_SEO_DESCRIPTION_MAX = 170;
652
+ /** Rule 10 (plan): every screen has a free, well-formed slug, an SEO title and description. */
653
+ export declare function detectMissingNavAndSeo(plan: AiBuildPlan, inventory: AiSiteInventory | null): AiDoctrineViolation[];
654
+ /** Every piece of copy a plan carries, with its path. */
655
+ export declare function aiPlanCopy(plan: AiBuildPlan): AiCopySample[];
656
+ /** Rule 15 (plan): a screen or template like one the site has starts as its duplicate. */
657
+ export declare function detectMissedDuplicate(plan: AiBuildPlan, inventory: AiSiteInventory | null): AiDoctrineViolation[];
658
+ /** What each exchange of a Free page job comes to at its worst, in credits. */
659
+ export interface AiFreePageWorstCase {
660
+ /** The page plan. */
661
+ plan: number;
662
+ /** The one layout a Free plan includes, built first on a site with none (AGL-3031). */
663
+ layout: number;
664
+ /** The first section pass, which writes the cached prefix. */
665
+ firstSection: number;
666
+ /** Each later section pass, which reads it. */
667
+ laterSection: number;
668
+ /** A page's listing. */
669
+ listing: number;
670
+ }
671
+ /**
672
+ * The Free taste's wall at its worst (AGL-3030, AGL-3070): each exchange of a
673
+ * Free page job in credits, every answer at its ceiling, as
674
+ * `jobs/ai-job-free-page.spec.ts` derives them from the page plan and the
675
+ * layout generation measured live and the requests as they stand. The spec
676
+ * fails when a figure it derives moves and this does not, so the section cap
677
+ * below cannot drift from the proof.
678
+ */
679
+ export declare const AI_FREE_PAGE_WORST_CASE_CREDITS: Readonly<AiFreePageWorstCase>;
680
+ /**
681
+ * The most sections a Free job fits in `FREE_AI_TASTE_CREDITS_PER_MONTH` at
682
+ * its worst: the plan, the layouts it builds first, a listing for each page
683
+ * and the first section's pass, then as many later passes as the rest pays
684
+ * for; none when that is already past the wall. A component or a form is never
685
+ * a Free creation, since rule 7 refuses both on a workspace that keeps no
686
+ * reusable components, so the wall's proof measures neither.
687
+ */
688
+ export declare function aiFreePageSectionsWithin(creations: {
689
+ layouts: number;
690
+ pages?: number;
691
+ }, credits?: Readonly<AiFreePageWorstCase>): number;
692
+ /**
693
+ * The Free wall (plan): a plan asks for no more sections than the Free taste
694
+ * pays for at its worst beside what the job builds first (AGL-3070). A live
695
+ * Free plan asked for eight sections beside its layout, where the wall's worst
696
+ * case pays for six, and fit only because every exchange ran under its
697
+ * ceiling; one that does not runs out of credits with its page half built. The
698
+ * cap only lowers what a plan may ask for, from the same figures the wall is
699
+ * proven with, so no plan the proof admits is refused. It is no building rule,
700
+ * so it names none.
701
+ */
702
+ export declare function detectPlanOverFreeWall(plan: AiBuildPlan, inventory: AiSiteInventory | null, capabilities: AiPlanCapabilities | null): AiDoctrineViolation[];
703
+ /**
704
+ * Rule 2 (plan): a layout the plan creates lists the regions it has, and
705
+ * every one is a region this platform builds (AGL-3024).
706
+ *
707
+ * A layout has no properties, so its `fields` are its REGIONS — the promise
708
+ * the build is later held to. A word the vocabulary does not hold is refused
709
+ * HERE, on the plan, where the re-ask costs a sentence: a promise nothing can
710
+ * look for would otherwise reach the build as a commitment no check can
711
+ * settle, and a build that cannot settle its own plan stops for a person
712
+ * instead of reporting itself done.
713
+ */
714
+ export declare function detectPlanUnreadableRegions(plan: AiBuildPlan): AiDoctrineViolation[];
715
+ /**
716
+ * Every plan rule, against the site inventory the plan was made from and,
717
+ * where the job read them, what it may create there (AGL-3030). `null`
718
+ * capabilities restrict nothing: the doctrine applies whole.
719
+ */
720
+ export declare function validateAiBuildPlan(plan: AiBuildPlan, inventory: AiSiteInventory | null, framing?: AiCopyFraming, capabilities?: AiPlanCapabilities | null): AiDoctrineViolation[];