@aglyn/plugins-ai 1.0.0-beta.229 → 1.0.0-beta.231
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +17 -17
- package/src/lib/activity/ai-activity-actions.js +7 -1
- package/src/lib/activity/ai-activity-actions.js.map +1 -1
- package/src/lib/components/ai-assist-provider-on-host.component.d.ts +66 -0
- package/src/lib/components/ai-assist-provider-on-host.component.js +78 -0
- package/src/lib/components/ai-assist-provider-on-host.component.js.map +1 -0
- package/src/lib/components/ai-assist-provider.component.js +9 -10
- package/src/lib/components/ai-assist-provider.component.js.map +1 -1
- package/src/lib/components/ai-automation-zones.d.ts +38 -0
- package/src/lib/components/ai-automation-zones.js +5 -1
- package/src/lib/components/ai-automation-zones.js.map +1 -1
- package/src/lib/components/ai-brief-dialog.component.d.ts +20 -2
- package/src/lib/components/ai-brief-dialog.component.js +87 -8
- package/src/lib/components/ai-brief-dialog.component.js.map +1 -1
- package/src/lib/components/ai-campaign-create.component.d.ts +54 -0
- package/src/lib/components/ai-campaign-create.component.js +270 -0
- package/src/lib/components/ai-campaign-create.component.js.map +1 -0
- package/src/lib/components/ai-describe-automation.component.d.ts +8 -3
- package/src/lib/components/ai-describe-automation.component.js +15 -6
- package/src/lib/components/ai-describe-automation.component.js.map +1 -1
- package/src/lib/components/ai-describe-button.component.d.ts +20 -8
- package/src/lib/components/ai-describe-button.component.js +19 -36
- package/src/lib/components/ai-describe-button.component.js.map +1 -1
- package/src/lib/components/ai-describe-email.component.d.ts +31 -0
- package/src/lib/components/ai-describe-email.component.js +22 -0
- package/src/lib/components/ai-describe-email.component.js.map +1 -0
- package/src/lib/components/ai-describe-org-automation.component.d.ts +36 -0
- package/src/lib/components/ai-describe-org-automation.component.js +238 -0
- package/src/lib/components/ai-describe-org-automation.component.js.map +1 -0
- package/src/lib/components/ai-experiment-cards.component.d.ts +9 -1
- package/src/lib/components/ai-experiment-cards.component.js +104 -18
- package/src/lib/components/ai-experiment-cards.component.js.map +1 -1
- package/src/lib/components/ai-explain-automation.component.js +1 -5
- package/src/lib/components/ai-explain-automation.component.js.map +1 -1
- package/src/lib/components/ai-funnel-zones.component.d.ts +61 -0
- package/src/lib/components/ai-funnel-zones.component.js +178 -0
- package/src/lib/components/ai-funnel-zones.component.js.map +1 -0
- package/src/lib/components/ai-insight-card.component.d.ts +42 -0
- package/src/lib/components/ai-insight-card.component.js +137 -0
- package/src/lib/components/ai-insight-card.component.js.map +1 -0
- package/src/lib/components/ai-insight-dialog.component.d.ts +6 -0
- package/src/lib/components/ai-insight-dialog.component.js +9 -3
- package/src/lib/components/ai-insight-dialog.component.js.map +1 -1
- package/src/lib/components/ai-job-plan.component.d.ts +7 -2
- package/src/lib/components/ai-job-plan.component.js +38 -6
- package/src/lib/components/ai-job-plan.component.js.map +1 -1
- package/src/lib/components/ai-job-requests.d.ts +17 -1
- package/src/lib/components/ai-job-requests.js +39 -3
- package/src/lib/components/ai-job-requests.js.map +1 -1
- package/src/lib/components/ai-logic-zones.d.ts +64 -0
- package/src/lib/components/ai-logic-zones.js +18 -0
- package/src/lib/components/ai-logic-zones.js.map +1 -0
- package/src/lib/components/ai-logic.component.d.ts +77 -0
- package/src/lib/components/ai-logic.component.js +553 -0
- package/src/lib/components/ai-logic.component.js.map +1 -0
- package/src/lib/components/ai-marketing-insight.component.d.ts +30 -0
- package/src/lib/components/ai-marketing-insight.component.js +80 -0
- package/src/lib/components/ai-marketing-insight.component.js.map +1 -0
- package/src/lib/components/ai-media-create.component.d.ts +55 -0
- package/src/lib/components/ai-media-create.component.js +433 -0
- package/src/lib/components/ai-media-create.component.js.map +1 -0
- package/src/lib/components/ai-overlay-cards.component.d.ts +83 -0
- package/src/lib/components/ai-overlay-cards.component.js +505 -0
- package/src/lib/components/ai-overlay-cards.component.js.map +1 -0
- package/src/lib/components/ai-permissions-on-host.component.d.ts +3 -46
- package/src/lib/components/ai-permissions-on-host.component.js +5 -53
- package/src/lib/components/ai-permissions-on-host.component.js.map +1 -1
- package/src/lib/components/ai-product-zones.d.ts +5 -0
- package/src/lib/components/ai-product-zones.js +1 -1
- package/src/lib/components/ai-product-zones.js.map +1 -1
- package/src/lib/components/ai-products-create-button.component.d.ts +42 -0
- package/src/lib/components/ai-products-create-button.component.js +67 -0
- package/src/lib/components/ai-products-create-button.component.js.map +1 -0
- package/src/lib/components/ai-products-hub-card.component.js +100 -81
- package/src/lib/components/ai-products-hub-card.component.js.map +1 -1
- package/src/lib/components/ai-revise-automation.component.d.ts +16 -0
- package/src/lib/components/ai-revise-automation.component.js +207 -0
- package/src/lib/components/ai-revise-automation.component.js.map +1 -0
- package/src/lib/components/ai-site-build-page.component.js +160 -24
- package/src/lib/components/ai-site-build-page.component.js.map +1 -1
- package/src/lib/components/ai-upsell-dialog.component.d.ts +53 -0
- package/src/lib/components/ai-upsell-dialog.component.js +177 -0
- package/src/lib/components/ai-upsell-dialog.component.js.map +1 -0
- package/src/lib/components/assist-build-card.component.d.ts +42 -0
- package/src/lib/components/assist-build-card.component.js +183 -0
- package/src/lib/components/assist-build-card.component.js.map +1 -0
- package/src/lib/components/assist-edit-canvas.d.ts +2 -0
- package/src/lib/components/assist-edit-canvas.js +56 -1
- package/src/lib/components/assist-edit-canvas.js.map +1 -1
- package/src/lib/components/assist-jobs-drawer.component.js +48 -3
- package/src/lib/components/assist-jobs-drawer.component.js.map +1 -1
- package/src/lib/components/assist-panel.component.js +51 -2
- package/src/lib/components/assist-panel.component.js.map +1 -1
- package/src/lib/components/use-ai-job-run.d.ts +3 -14
- package/src/lib/components/use-ai-job-run.js +0 -50
- package/src/lib/components/use-ai-job-run.js.map +1 -1
- package/src/lib/jobs/ai-build-capabilities.d.ts +58 -0
- package/src/lib/jobs/ai-build-capabilities.js +256 -0
- package/src/lib/jobs/ai-build-capabilities.js.map +1 -0
- package/src/lib/jobs/ai-build-unit-outcome.d.ts +52 -0
- package/src/lib/jobs/ai-build-unit-outcome.js +140 -0
- package/src/lib/jobs/ai-build-unit-outcome.js.map +1 -0
- package/src/lib/jobs/ai-job-auto-confirm.d.ts +8 -0
- package/src/lib/jobs/ai-job-auto-confirm.js +30 -6
- package/src/lib/jobs/ai-job-auto-confirm.js.map +1 -1
- package/src/lib/jobs/ai-job-build-step.d.ts +144 -0
- package/src/lib/jobs/ai-job-build-step.js +668 -0
- package/src/lib/jobs/ai-job-build-step.js.map +1 -0
- package/src/lib/jobs/ai-job-draft-ids.js +9 -1
- package/src/lib/jobs/ai-job-draft-ids.js.map +1 -1
- package/src/lib/jobs/ai-job-drafts.d.ts +14 -4
- package/src/lib/jobs/ai-job-drafts.js +25 -4
- package/src/lib/jobs/ai-job-drafts.js.map +1 -1
- package/src/lib/jobs/ai-job-generation.d.ts +8 -0
- package/src/lib/jobs/ai-job-generation.js +13 -2
- package/src/lib/jobs/ai-job-generation.js.map +1 -1
- package/src/lib/jobs/ai-job-insight-step.js +8 -1
- package/src/lib/jobs/ai-job-insight-step.js.map +1 -1
- package/src/lib/jobs/ai-job-layout-language.d.ts +73 -0
- package/src/lib/jobs/ai-job-layout-language.js +194 -0
- package/src/lib/jobs/ai-job-layout-language.js.map +1 -0
- package/src/lib/jobs/ai-job-layout-site-pages.d.ts +13 -2
- package/src/lib/jobs/ai-job-layout-site-pages.js +18 -2
- package/src/lib/jobs/ai-job-layout-site-pages.js.map +1 -1
- package/src/lib/jobs/ai-job-layout-step.d.ts +5 -0
- package/src/lib/jobs/ai-job-layout-step.js +105 -5
- package/src/lib/jobs/ai-job-layout-step.js.map +1 -1
- package/src/lib/jobs/ai-job-logic-step.d.ts +107 -0
- package/src/lib/jobs/ai-job-logic-step.js +395 -0
- package/src/lib/jobs/ai-job-logic-step.js.map +1 -0
- package/src/lib/jobs/ai-job-overlay-copy.d.ts +70 -0
- package/src/lib/jobs/ai-job-overlay-copy.js +178 -0
- package/src/lib/jobs/ai-job-overlay-copy.js.map +1 -0
- package/src/lib/jobs/ai-job-page-language.d.ts +149 -0
- package/src/lib/jobs/ai-job-page-language.js +355 -0
- package/src/lib/jobs/ai-job-page-language.js.map +1 -0
- package/src/lib/jobs/ai-job-page-sections.d.ts +37 -1
- package/src/lib/jobs/ai-job-page-sections.js +93 -11
- package/src/lib/jobs/ai-job-page-sections.js.map +1 -1
- package/src/lib/jobs/ai-job-page-step.d.ts +4 -4
- package/src/lib/jobs/ai-job-page-step.js +111 -20
- package/src/lib/jobs/ai-job-page-step.js.map +1 -1
- package/src/lib/jobs/ai-job-plan-step.d.ts +27 -2
- package/src/lib/jobs/ai-job-plan-step.js +87 -13
- package/src/lib/jobs/ai-job-plan-step.js.map +1 -1
- package/src/lib/jobs/ai-job-site-step.d.ts +19 -1
- package/src/lib/jobs/ai-job-site-step.js +220 -61
- package/src/lib/jobs/ai-job-site-step.js.map +1 -1
- package/src/lib/jobs/ai-job-text-step.d.ts +22 -1
- package/src/lib/jobs/ai-job-text-step.js +12 -0
- package/src/lib/jobs/ai-job-text-step.js.map +1 -1
- package/src/lib/jobs/ai-job-workflow-step.d.ts +54 -4
- package/src/lib/jobs/ai-job-workflow-step.js +320 -15
- package/src/lib/jobs/ai-job-workflow-step.js.map +1 -1
- package/src/lib/jobs/ai-jobs.d.ts +80 -2
- package/src/lib/jobs/ai-jobs.js +391 -18
- package/src/lib/jobs/ai-jobs.js.map +1 -1
- package/src/lib/jobs/ai-layout-full-height.d.ts +40 -0
- package/src/lib/jobs/ai-layout-full-height.js +82 -0
- package/src/lib/jobs/ai-layout-full-height.js.map +1 -0
- package/src/lib/jobs/ai-layout-site-facts.d.ts +54 -0
- package/src/lib/jobs/ai-layout-site-facts.js +153 -0
- package/src/lib/jobs/ai-layout-site-facts.js.map +1 -0
- package/src/lib/jobs/ai-logic-records.d.ts +40 -0
- package/src/lib/jobs/ai-logic-records.js +55 -0
- package/src/lib/jobs/ai-logic-records.js.map +1 -0
- package/src/lib/jobs/ai-site-publish.d.ts +7 -0
- package/src/lib/jobs/ai-site-publish.js +9 -0
- package/src/lib/jobs/ai-site-publish.js.map +1 -1
- package/src/lib/jobs/ai-workflow-records.d.ts +4 -0
- package/src/lib/jobs/ai-workflow-records.js +40 -1
- package/src/lib/jobs/ai-workflow-records.js.map +1 -1
- package/src/lib/layout-language/ai-layout-compiler.d.ts +145 -0
- package/src/lib/layout-language/ai-layout-compiler.js +1148 -0
- package/src/lib/layout-language/ai-layout-compiler.js.map +1 -0
- package/src/lib/layout-language/ai-layout-copy.d.ts +73 -0
- package/src/lib/layout-language/ai-layout-copy.js +137 -0
- package/src/lib/layout-language/ai-layout-copy.js.map +1 -0
- package/src/lib/layout-language/ai-layout-frame.d.ts +52 -0
- package/src/lib/layout-language/ai-layout-frame.js +457 -0
- package/src/lib/layout-language/ai-layout-frame.js.map +1 -0
- package/src/lib/layout-language/ai-layout-gaps.d.ts +63 -0
- package/src/lib/layout-language/ai-layout-gaps.js +345 -0
- package/src/lib/layout-language/ai-layout-gaps.js.map +1 -0
- package/src/lib/layout-language/ai-layout-language.d.ts +161 -0
- package/src/lib/layout-language/ai-layout-language.js +446 -0
- package/src/lib/layout-language/ai-layout-language.js.map +1 -0
- package/src/lib/layout-language/ai-layout-links.d.ts +80 -0
- package/src/lib/layout-language/ai-layout-links.js +109 -0
- package/src/lib/layout-language/ai-layout-links.js.map +1 -0
- package/src/lib/layout-language/ai-layout-store.d.ts +39 -0
- package/src/lib/layout-language/ai-layout-store.js +69 -0
- package/src/lib/layout-language/ai-layout-store.js.map +1 -0
- package/src/lib/layout-language/ai-layout-tree.d.ts +59 -0
- package/src/lib/layout-language/ai-layout-tree.js +84 -0
- package/src/lib/layout-language/ai-layout-tree.js.map +1 -0
- package/src/lib/lazy-widget.d.ts +45 -0
- package/src/lib/lazy-widget.js +53 -0
- package/src/lib/lazy-widget.js.map +1 -0
- package/src/lib/model/ai-automation-draft.d.ts +18 -0
- package/src/lib/model/ai-automation-draft.js +86 -0
- package/src/lib/model/ai-automation-draft.js.map +1 -1
- package/src/lib/model/ai-build-job.d.ts +201 -0
- package/src/lib/model/ai-build-job.js +472 -0
- package/src/lib/model/ai-build-job.js.map +1 -0
- package/src/lib/model/ai-build-plan.d.ts +61 -0
- package/src/lib/model/ai-build-plan.js +154 -9
- package/src/lib/model/ai-build-plan.js.map +1 -1
- package/src/lib/model/ai-build-progress.d.ts +73 -0
- package/src/lib/model/ai-build-progress.js +170 -0
- package/src/lib/model/ai-build-progress.js.map +1 -0
- package/src/lib/model/ai-host-publish-context.d.ts +51 -0
- package/src/lib/model/ai-host-publish-context.js +104 -0
- package/src/lib/model/ai-host-publish-context.js.map +1 -0
- package/src/lib/model/ai-insight.d.ts +20 -10
- package/src/lib/model/ai-insight.js +72 -9
- package/src/lib/model/ai-insight.js.map +1 -1
- package/src/lib/model/ai-job-activity.d.ts +22 -0
- package/src/lib/model/ai-job-activity.js +25 -2
- package/src/lib/model/ai-job-activity.js.map +1 -1
- package/src/lib/model/ai-job-failure-copy.d.ts +38 -1
- package/src/lib/model/ai-job-failure-copy.js +56 -1
- package/src/lib/model/ai-job-failure-copy.js.map +1 -1
- package/src/lib/model/ai-job-notice.d.ts +3 -1
- package/src/lib/model/ai-job-notice.js +31 -9
- package/src/lib/model/ai-job-notice.js.map +1 -1
- package/src/lib/model/ai-jobs.types.d.ts +99 -2
- package/src/lib/model/ai-jobs.types.js +3 -1
- package/src/lib/model/ai-jobs.types.js.map +1 -1
- package/src/lib/model/ai-logic-job.d.ts +108 -0
- package/src/lib/model/ai-logic-job.js +327 -0
- package/src/lib/model/ai-logic-job.js.map +1 -0
- package/src/lib/model/ai-media-credits.d.ts +52 -0
- package/src/lib/model/ai-media-credits.js +61 -0
- package/src/lib/model/ai-media-credits.js.map +1 -0
- package/src/lib/model/ai-overlay-copy.d.ts +114 -0
- package/src/lib/model/ai-overlay-copy.js +175 -0
- package/src/lib/model/ai-overlay-copy.js.map +1 -0
- package/src/lib/model/ai-site-build-progress.d.ts +25 -4
- package/src/lib/model/ai-site-build-progress.js +194 -11
- package/src/lib/model/ai-site-build-progress.js.map +1 -1
- package/src/lib/model/ai-site-job.d.ts +8 -0
- package/src/lib/model/ai-site-job.js +9 -0
- package/src/lib/model/ai-site-job.js.map +1 -1
- package/src/lib/model/ai-site-start-seo.d.ts +1 -1
- package/src/lib/model/ai-site-start.d.ts +5 -2
- package/src/lib/model/ai-site-start.js +5 -2
- package/src/lib/model/ai-site-start.js.map +1 -1
- package/src/lib/model/ai-svg.d.ts +69 -0
- package/src/lib/model/ai-svg.js +265 -0
- package/src/lib/model/ai-svg.js.map +1 -0
- package/src/lib/model/ai-usage-by-user.d.ts +3 -2
- package/src/lib/model/ai-usage-by-user.js.map +1 -1
- package/src/lib/model/ai-workflow-job.d.ts +92 -4
- package/src/lib/model/ai-workflow-job.js +124 -7
- package/src/lib/model/ai-workflow-job.js.map +1 -1
- package/src/lib/model/assist-build.d.ts +58 -0
- package/src/lib/model/assist-build.js +52 -0
- package/src/lib/model/assist-build.js.map +1 -0
- package/src/lib/model/assist-edit.d.ts +48 -3
- package/src/lib/model/assist-edit.js +48 -4
- package/src/lib/model/assist-edit.js.map +1 -1
- package/src/lib/plugin-config.js +2 -0
- package/src/lib/plugin-config.js.map +1 -1
- package/src/lib/plugin.js +308 -47
- package/src/lib/plugin.js.map +1 -1
- package/src/lib/providers/catalog.d.ts +82 -5
- package/src/lib/providers/catalog.js +83 -12
- package/src/lib/providers/catalog.js.map +1 -1
- package/src/lib/providers/image-contract.d.ts +116 -0
- package/src/lib/providers/image-contract.js +74 -0
- package/src/lib/providers/image-contract.js.map +1 -0
- package/src/lib/providers/model-choice.js +11 -0
- package/src/lib/providers/model-choice.js.map +1 -1
- package/src/lib/providers/routing.js +18 -0
- package/src/lib/providers/routing.js.map +1 -1
- package/src/lib/providers/vertex-image.d.ts +121 -0
- package/src/lib/providers/vertex-image.js +312 -0
- package/src/lib/providers/vertex-image.js.map +1 -0
- package/src/lib/runtime/ai-doctrine-validators.d.ts +101 -0
- package/src/lib/runtime/ai-doctrine-validators.js +525 -4
- package/src/lib/runtime/ai-doctrine-validators.js.map +1 -1
- package/src/lib/runtime/ai-doctrine.js +21 -6
- package/src/lib/runtime/ai-doctrine.js.map +1 -1
- package/src/lib/runtime/ai-eval-live.js +4 -0
- package/src/lib/runtime/ai-eval-live.js.map +1 -1
- package/src/lib/runtime/ai-eval.d.ts +15 -1
- package/src/lib/runtime/ai-eval.js +52 -1
- package/src/lib/runtime/ai-eval.js.map +1 -1
- package/src/lib/runtime/ai-icon-library.d.ts +257 -0
- package/src/lib/runtime/ai-icon-library.js +254 -0
- package/src/lib/runtime/ai-icon-library.js.map +1 -0
- package/src/lib/runtime/ai-node-tree.d.ts +9 -0
- package/src/lib/runtime/ai-node-tree.js +30 -4
- package/src/lib/runtime/ai-node-tree.js.map +1 -1
- package/src/lib/runtime/ai-palette.d.ts +6 -0
- package/src/lib/runtime/ai-palette.generated.js +70 -0
- package/src/lib/runtime/ai-palette.generated.js.map +1 -1
- package/src/lib/runtime/ai-palette.js.map +1 -1
- package/src/lib/runtime/experiment-variant-copy.d.ts +34 -0
- package/src/lib/runtime/experiment-variant-copy.js +102 -0
- package/src/lib/runtime/experiment-variant-copy.js.map +1 -0
- package/src/lib/server/ai-experiment-versions.d.ts +51 -0
- package/src/lib/server/ai-experiment-versions.js +270 -0
- package/src/lib/server/ai-experiment-versions.js.map +1 -0
- package/src/lib/server/ai-jobs-resume.js +74 -4
- package/src/lib/server/ai-jobs-resume.js.map +1 -1
- package/src/lib/server/ai-media-image.d.ts +66 -0
- package/src/lib/server/ai-media-image.js +521 -0
- package/src/lib/server/ai-media-image.js.map +1 -0
- package/src/lib/server/ai-media-svg.d.ts +91 -0
- package/src/lib/server/ai-media-svg.js +186 -0
- package/src/lib/server/ai-media-svg.js.map +1 -0
- package/src/lib/server/assist-build.d.ts +54 -0
- package/src/lib/server/assist-build.js +121 -0
- package/src/lib/server/assist-build.js.map +1 -0
- package/src/lib/server/assist-chat.js +108 -12
- package/src/lib/server/assist-chat.js.map +1 -1
- package/src/lib/server/assist-edit.js +213 -3
- package/src/lib/server/assist-edit.js.map +1 -1
- package/src/lib/server/assist-view-context.js +242 -4
- package/src/lib/server/assist-view-context.js.map +1 -1
- package/src/lib/server.js +26 -0
- package/src/lib/server.js.map +1 -1
- package/src/lib/tools/ai-logic-tool.d.ts +27 -0
- package/src/lib/tools/ai-logic-tool.js +207 -0
- package/src/lib/tools/ai-logic-tool.js.map +1 -0
- package/src/lib/tools/ai-overlay-tool.d.ts +35 -0
- package/src/lib/tools/ai-overlay-tool.js +107 -0
- package/src/lib/tools/ai-overlay-tool.js.map +1 -0
- package/src/lib/tools/ai-workflow-tool.d.ts +17 -2
- package/src/lib/tools/ai-workflow-tool.js +47 -14
- package/src/lib/tools/ai-workflow-tool.js.map +1 -1
- package/src/lib/usage/assist-job-refund.d.ts +28 -1
- package/src/lib/usage/assist-job-refund.js +44 -9
- package/src/lib/usage/assist-job-refund.js.map +1 -1
- package/src/lib/usage/assist-usage.d.ts +5 -0
- package/src/lib/usage/assist-usage.js +2 -0
- package/src/lib/usage/assist-usage.js.map +1 -1
package/src/lib/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/plugins/ai/src/lib/plugin.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PLATFORM_BRAND_NAME, registerConsoleExtension } from '@aglyn/aglyn'\nimport { AiCollaboratorPermissionsCell } from './components/ai-collaborator-permissions-column.component'\nimport { AiSaveAsComponent } from './components/ai-save-as-component.component'\nimport {\n AiGenerateSectionControl,\n AiRewriteControl,\n} from './components/besigner-ai-controls.component'\nimport {\n AiAssistProviderOnHost,\n AssistPanelOnHost,\n} from './components/ai-permissions-on-host.component'\nimport AiCreditsCard from './components/ai-credits-card.component'\nimport AiJobsTopBarIndicator from './components/ai-jobs-indicator.component'\nimport {\n AiCollaboratorCreditsCell,\n AiCollaboratorCreditsHeader,\n AiMemberCreditsCell,\n AiMemberCreditsHeader,\n} from './components/ai-credits-columns.component'\nimport { AssistSignalsPage } from './components/assist-signals-page.component'\nimport BillingAssistOverageCard from './components/billing-assist-overage-card.component'\nimport { AiTopUsersCard } from './components/billing-ai-top-users.component'\nimport { AiAllotmentsCard } from './components/billing-ai-allotments.component'\nimport {\n AiCollaboratorAllotmentCell,\n AiCollaboratorAllotmentHeader,\n AiSiteAllotmentCard,\n} from './components/host-ai-allotments.component'\nimport MemberAiAllotmentCard from './components/member-ai-allotment-card.component'\nimport MemberAiUsageCard from './components/member-ai-usage-card.component'\nimport AiThemeProposalCard from './components/ai-theme-proposal-card.component'\nimport StaffOrgAiCard from './components/staff-org-ai-card.component'\nimport {\n StaffOrgUsageAiCreditsCell,\n StaffOrgUsageAiOverageCell,\n StaffOrgUsageAiPool,\n StaffOrgUsageAssistCell,\n} from './components/staff-org-usage-ai-columns.component'\nimport {\n StaffOrgsAiSpendCell,\n StaffOrgsAiSpendHeader,\n} from './components/staff-orgs-ai-spend-column.component'\nimport StaffUserAiUsageCard from './components/staff-user-ai-usage-card.component'\nimport AiSeoAuditCard from './components/ai-seo-audit-card.component'\nimport AiSiteBatchCard from './components/ai-site-batch-card.component'\nimport AiSiteSeoStartCard from './components/ai-site-seo-start-card.component'\nimport AiSiteStartCard from './components/ai-site-start-card.component'\nimport AiSeoFieldsCard from './components/ai-seo-fields-card.component'\nimport AiDescribeAutomationButton from './components/ai-describe-automation.component'\nimport AiCrmEmailDraft from './components/ai-crm-email-draft.component'\nimport AiCrmImportMapping from './components/ai-crm-import-mapping.component'\nimport AiCrmRecordCard from './components/ai-crm-record-card.component'\nimport AiDescribePageButton from './components/ai-describe-page.component'\nimport {\n AiDescribeComponentButton,\n AiDescribeFormButton,\n AiDescribeLayoutButton,\n AiDescribeTemplateButton,\n} from './components/ai-describe-button.component'\nimport {\n AiExperimentResultCard,\n AiExperimentVariantsCard,\n} from './components/ai-experiment-cards.component'\nimport {\n AiExplainAutomation,\n AiExplainRunFailure,\n} from './components/ai-explain-automation.component'\nimport AiProductCopyCard from './components/ai-product-copy-card.component'\nimport AiProductImportOption from './components/ai-product-import-option.component'\nimport AiProductsHubCard from './components/ai-products-hub-card.component'\nimport AiJobsPage from './components/ai-jobs-page.component'\nimport { AI_PLUGIN_ID } from './constants'\nimport { registerAiDeclarations } from './declarations'\n\n/**\n * The Aglyn AI plugin's console half (AGL-2939): the assistant dock, the\n * besigner copy assistant's provider, the billing, member and staff cards,\n * the member tables' credit columns and the Assist signal staff page — each\n * mounted through a shell-owned zone (AGL-2940) or the staff area's generic\n * route, so no console page imports this plugin.\n *\n * No `featureFlag` on the extension: the plugin's doors are gated one by\n * one — the dock reads the `release_assist` verdict the shell hands it, the\n * generative doors answer 404 behind `release_ai_generative`, the billing\n * cards render only where the plan sells a band — and a flag here would\n * switch off the released doors with the unreleased ones.\n */\nexport function registerAiConsole(): void {\n registerAiDeclarations()\n registerConsoleExtension({\n pluginId: AI_PLUGIN_ID,\n displayName: 'AI',\n // The besigner copy assistant (AGL-89/419): mounted by the shell around\n // every console page, and opened by this plugin's besigner controls.\n providers: [AiAssistProviderOnHost],\n // The Assist docs-gap and cost board (AGL-1860, AGL-2252), at the staff\n // URL and under the tab it has always had.\n staffPages: [\n {\n id: 'assist-signals',\n label: 'Assist signal',\n header: {\n // The configured brand, not ours (AGL-2153/2260): a white-label\n // deployment and a self-host operator both read this header.\n title: `${PLATFORM_BRAND_NAME} Assist Signal`,\n docsTopic: 'assistSignals',\n },\n Component: AssistSignalsPage,\n },\n ],\n // A site's AI jobs (AGL-3596), an address under the site and no tab:\n // `/ai-jobs` lists them, and `/ai-jobs/{jobId}` is one job's page —\n // \"Building your site\" (AGL-3594), where the guided start lands a person\n // and where a site job's notification opens. The `href` is a literal,\n // `AI_SITE_BUILD_HREF`'s value, because the tab-title manifest is read\n // from this source (`ai-jobs-page.spec.tsx` holds the two equal).\n navItems: [\n {\n label: 'AI jobs',\n href: '/ai-jobs',\n recordTitle: 'Building your site',\n header: { title: 'AI jobs', docsTopic: 'howAglynAiBuilds', docsAnchor: '#finding-your-ai-jobs' },\n unlisted: true,\n ownsSubtree: true,\n permission: 'ai.generate',\n Component: AiJobsPage,\n },\n ],\n widgets: [\n {\n slot: 'consoleDock',\n widgetId: 'ai-assist-dock',\n title: 'Assistant',\n Component: AssistPanelOnHost,\n },\n // The AI jobs indicator (AGL-3593), beside the notifications bell on\n // every page: what the workspace's jobs are doing, and the way to them.\n // Gated as the other generative widgets are; it asks the shell for the\n // release flags of the jobs and of the panel it opens.\n {\n slot: 'consoleTopBar',\n widgetId: 'ai-jobs-indicator',\n title: 'AI jobs',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiJobsTopBarIndicator,\n },\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-credits-meter',\n title: 'AI credits',\n Component: AiCreditsCard,\n },\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-credits-overage',\n title: 'AI credits overage',\n Component: BillingAssistOverageCard,\n },\n // The per-member usage (AGL-2928): who drew the credits the meter\n // counts, on Billing → Usage, on each member's page, on the staff\n // user page, and as a column of both member tables.\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-usage-by-member',\n title: 'Who is generating what',\n permission: 'billing.view',\n Component: AiTopUsersCard,\n },\n // The collaborators table's AI column (AGL-2927): whether each person\n // may open the AI doors on the site, per site, ahead of the columns\n // that report what they drew.\n {\n slot: 'hostMembers',\n widgetId: 'ai-collaborator-permissions',\n title: 'AI',\n column: { header: 'AI' },\n Component: AiCollaboratorPermissionsCell,\n },\n // The copy assistant's besigner controls (AGL-89, AGL-169): Generate a\n // section on every editor's toolbar, and Rewrite with AI under the\n // selected element's fields. Each opens the provider's dialog, and is\n // drawn only while the reader holds the door's permission.\n {\n slot: 'besignerToolbar',\n widgetId: 'ai-generate-section',\n title: 'Generate a section with AI',\n Component: AiGenerateSectionControl,\n },\n {\n slot: 'besignerInspector',\n widgetId: 'ai-rewrite-copy',\n title: 'Rewrite with AI',\n Component: AiRewriteControl,\n },\n // Save the selection as a reusable component (AGL-2908): the component\n // job's second entry point, which proposes the properties a section\n // should declare and applies them as the manual promote does.\n {\n slot: 'besignerInspector',\n widgetId: 'ai-save-as-component',\n title: 'Make a reusable component with AI',\n permission: 'ai.generate',\n Component: AiSaveAsComponent,\n },\n {\n slot: 'orgMember',\n widgetId: 'ai-member-usage',\n title: 'AI usage',\n Component: MemberAiUsageCard,\n },\n // The allotments (AGL-2942): a member's or a site's monthly share of\n // the pool, set on Billing → Usage, on each member's page and on a\n // site's collaborators card — each card asks the route what its\n // reader may see and change.\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-allotments',\n title: 'AI allotments',\n permission: 'billing.view',\n Component: AiAllotmentsCard,\n },\n {\n slot: 'orgMember',\n widgetId: 'ai-member-allotment',\n title: 'AI allotment',\n Component: MemberAiAllotmentCard,\n },\n {\n slot: 'hostMembers',\n widgetId: 'ai-collaborator-allotment',\n title: 'AI allotment',\n column: {\n header: 'AI allotment',\n align: 'right',\n Header: AiCollaboratorAllotmentHeader,\n },\n Component: AiCollaboratorAllotmentCell,\n },\n {\n slot: 'hostMembers',\n widgetId: 'ai-site-allotment',\n title: 'Site AI allotment',\n Component: AiSiteAllotmentCard,\n },\n // Themes by AI (AGL-2938): a brief on the site's Theme section, a\n // proposal previewed before and after, and the editor's own Save to\n // keep it. Generation is sold as `aiGenerative` and held by\n // `ai.generate`, so the shell withholds the card from a plan or a\n // member without either; the card itself asks the route about the\n // release flag before it shows anything.\n {\n slot: 'hostTheme',\n widgetId: 'ai-theme-proposal',\n title: 'Theme assistant',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiThemeProposalCard,\n },\n {\n slot: 'staffOrg',\n widgetId: 'ai-org-usage',\n title: 'AI usage',\n Component: StaffOrgAiCard,\n },\n {\n slot: 'staffUser',\n widgetId: 'ai-account-usage',\n title: 'AI usage across organizations',\n Component: StaffUserAiUsageCard,\n },\n // The staff tables' AI figures (AGL-2984): the Organizations list's\n // spend column, and the usage table's three columns with the credit\n // pool line the org page draws above it.\n {\n slot: 'staffOrgsListColumn',\n widgetId: 'ai-orgs-spend',\n title: 'AI spend (month)',\n column: {\n header: 'AI spend (month)',\n align: 'right',\n Header: StaffOrgsAiSpendHeader,\n },\n Component: StaffOrgsAiSpendCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-assist-cost',\n title: 'Assist',\n column: { header: 'Assist', align: 'right' },\n Component: StaffOrgUsageAssistCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-credits',\n title: 'AI credits used',\n column: { header: 'AI credits used', align: 'right' },\n Component: StaffOrgUsageAiCreditsCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-overage',\n title: 'AI overage billed ($)',\n column: { header: 'AI overage billed ($)', align: 'right' },\n Component: StaffOrgUsageAiOverageCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-pool',\n title: 'AI credit pool',\n Component: StaffOrgUsageAiPool,\n },\n {\n slot: 'orgMembersListColumn',\n widgetId: 'ai-member-credits',\n title: 'AI credits (month)',\n column: { header: 'AI credits (month)', align: 'right', Header: AiMemberCreditsHeader },\n Component: AiMemberCreditsCell,\n },\n {\n slot: 'hostMembers',\n widgetId: 'ai-collaborator-credits',\n title: 'AI credits (site, month)',\n column: {\n header: 'AI credits (site, month)',\n align: 'right',\n Header: AiCollaboratorCreditsHeader,\n },\n Component: AiCollaboratorCreditsCell,\n },\n // SEO by AI (AGL-2910): \"Write SEO\" inside every search listing editor\n // — a page's SEO card and a product's listing — and the site audit on\n // the site's SEO section. Generation is sold as `aiGenerative` and held\n // by `ai.generate`, so the shell withholds both from a plan or a member\n // without either; each card asks the jobs route about the release flag\n // before it shows anything, and neither ever writes what it proposes.\n {\n slot: 'seoFields',\n widgetId: 'ai-seo-fields',\n title: 'SEO assistant',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSeoFieldsCard,\n },\n {\n slot: 'hostSeo',\n widgetId: 'ai-seo-audit',\n title: 'SEO audit',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSeoAuditCard,\n },\n // A page from a brief (AGL-2907): \"Create with AI\" beside Templates and\n // Create New Screen. Gated as the other generative widgets are, and it\n // asks the jobs route about the release flag before it shows anything.\n {\n slot: 'hostScreens',\n widgetId: 'ai-describe-page',\n title: 'Describe a page',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiDescribePageButton,\n },\n // The same entry for a page template, a layout and a form (AGL-3043),\n // beside the create action of the page that lists each: the same\n // dialog, the same gates, and the same question to the jobs route\n // before it shows anything.\n {\n slot: 'hostTemplates',\n widgetId: 'ai-describe-template',\n title: 'Describe a page template',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiDescribeTemplateButton,\n },\n {\n slot: 'hostLayouts',\n widgetId: 'ai-describe-layout',\n title: 'Describe a layout',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiDescribeLayoutButton,\n },\n {\n slot: 'hostForms',\n widgetId: 'ai-describe-form',\n title: 'Describe a form',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiDescribeFormButton,\n },\n // And a reusable component from a brief (AGL-3051), beside Templates\n // and Create Component: the component job's first entry point, which\n // had none in the console.\n {\n slot: 'hostComponents',\n widgetId: 'ai-describe-component',\n title: 'Describe a reusable component',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiDescribeComponentButton,\n },\n // Automations by AI (AGL-2919), in the zones the workflows plugin hosts\n // on its Automation page: \"Create with AI\" beside Add action and Recipes,\n // \"Explain it\" in the editor of a saved automation, and \"Why did this\n // fail?\" on a failed run. Gated as the other generative widgets are;\n // each asks the jobs route about the release flag before it shows\n // anything, and none of them changes an automation.\n {\n slot: 'hostAutomations',\n widgetId: 'ai-describe-automation',\n title: 'Describe an automation',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiDescribeAutomationButton,\n },\n {\n slot: 'automationEditor',\n widgetId: 'ai-explain-automation',\n title: 'Explain this automation',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiExplainAutomation,\n },\n {\n slot: 'automationRun',\n widgetId: 'ai-explain-run-failure',\n title: 'Why did this run fail?',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiExplainRunFailure,\n },\n // CRM by AI (AGL-2917): a record's summary and next step on its page,\n // a draft in the one-to-one composer, and an import's column matches.\n // The CRM hosts each zone, so it is drawn only where the CRM is; the\n // shell holds the plan and `ai.generate`, each card asks the jobs route\n // about the release flag before it shows anything, and none writes what\n // it proposes.\n {\n slot: 'recordInsights',\n widgetId: 'ai-crm-record',\n title: 'AI summary',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiCrmRecordCard,\n },\n {\n slot: 'recordEmail',\n widgetId: 'ai-crm-email',\n title: 'Draft with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiCrmEmailDraft,\n },\n {\n slot: 'importMapping',\n widgetId: 'ai-crm-import-mapping',\n title: 'Match columns with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiCrmImportMapping,\n },\n // The guided start (AGL-2918), on the page a newly created site lands\n // on: a few questions that become a site scaffold. Gated as the other\n // generative widgets are, and it asks the jobs route about the release\n // flag before it shows anything — so a workspace the feature is not\n // released to gets the blank page and nothing else. Skipping is the\n // zone's own `startBlank`, which creates nothing.\n {\n slot: 'hostFirstRun',\n widgetId: 'ai-site-start',\n title: 'Start this site with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSiteStartCard,\n },\n // The listing those answers describe (AGL-2918), on the site's SEO\n // section: the site-wide search title and description the guided start\n // implies, offered where they are edited. The same gates as every\n // generative widget, and it stages into the SEO form rather than\n // writing it — a person's Update is the write, as it is for the audit\n // card beside it.\n {\n slot: 'hostSeo',\n widgetId: 'ai-site-seo-start',\n title: 'The listing your answers describe',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSiteSeoStartCard,\n },\n // The agency batch (AGL-2911): one brief across many of the org's\n // sites, from the page that lists them. The card asks the jobs route\n // about the release flag before it shows anything, and its own door\n // holds the plan band and the caller's permission on every site it is\n // pointed at.\n {\n slot: 'orgSites',\n widgetId: 'ai-site-batch',\n title: 'Generate sites with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSiteBatchCard,\n },\n // Commerce by AI (AGL-2916): product copy in the product editor, the\n // catalog, categories and discounts on the products hub, and copy for\n // an import as it lands. The commerce plugin hosts the zones and makes\n // every write; each card asks the jobs route about the release flag\n // before it shows anything.\n {\n slot: 'productEditor',\n widgetId: 'ai-product-copy',\n title: 'Product copy assistant',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiProductCopyCard,\n },\n {\n slot: 'productsHub',\n widgetId: 'ai-products-hub',\n title: 'Build your catalog with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiProductsHubCard,\n },\n {\n slot: 'productImport',\n widgetId: 'ai-product-import',\n title: 'Write imported product copy with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiProductImportOption,\n },\n // A/B tests by AI (AGL-2914): variants written in the experiment\n // editor, and one test's result read in plain words below its figures.\n // The A/B testing card hosts both zones, so they are drawn only where\n // that card is and only on a site with A/B testing; the shell holds the\n // plan band and `ai.generate`, and each card asks the jobs route about\n // the release flag before it shows anything. Neither writes: the\n // experiment editor's Save is the only write, and an explanation has\n // nothing to apply.\n {\n slot: 'experimentVariants',\n widgetId: 'ai-experiment-variants',\n title: 'Write variants with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiExperimentVariantsCard,\n },\n {\n slot: 'experimentResult',\n widgetId: 'ai-experiment-result',\n title: 'Explain this result with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiExperimentResultCard,\n },\n ],\n })\n}\n"],"names":["PLATFORM_BRAND_NAME","registerConsoleExtension","AiCollaboratorPermissionsCell","AiSaveAsComponent","AiGenerateSectionControl","AiRewriteControl","AiAssistProviderOnHost","AssistPanelOnHost","AiCreditsCard","AiJobsTopBarIndicator","AiCollaboratorCreditsCell","AiCollaboratorCreditsHeader","AiMemberCreditsCell","AiMemberCreditsHeader","AssistSignalsPage","BillingAssistOverageCard","AiTopUsersCard","AiAllotmentsCard","AiCollaboratorAllotmentCell","AiCollaboratorAllotmentHeader","AiSiteAllotmentCard","MemberAiAllotmentCard","MemberAiUsageCard","AiThemeProposalCard","StaffOrgAiCard","StaffOrgUsageAiCreditsCell","StaffOrgUsageAiOverageCell","StaffOrgUsageAiPool","StaffOrgUsageAssistCell","StaffOrgsAiSpendCell","StaffOrgsAiSpendHeader","StaffUserAiUsageCard","AiSeoAuditCard","AiSiteBatchCard","AiSiteSeoStartCard","AiSiteStartCard","AiSeoFieldsCard","AiDescribeAutomationButton","AiCrmEmailDraft","AiCrmImportMapping","AiCrmRecordCard","AiDescribePageButton","AiDescribeComponentButton","AiDescribeFormButton","AiDescribeLayoutButton","AiDescribeTemplateButton","AiExperimentResultCard","AiExperimentVariantsCard","AiExplainAutomation","AiExplainRunFailure","AiProductCopyCard","AiProductImportOption","AiProductsHubCard","AiJobsPage","AI_PLUGIN_ID","registerAiDeclarations","registerAiConsole","pluginId","displayName","providers","staffPages","id","label","header","title","docsTopic","Component","navItems","href","recordTitle","docsAnchor","unlisted","ownsSubtree","permission","widgets","slot","widgetId","featureFlag","column","align","Header"],"mappings":"AAAA;;;;;;;;;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;YACvE,sEAAsE;YACtE,wEAAwE;YACxE,uEAAuE;YACvE,iEAAiE;YACjE,qEAAqE;YACrE,oBAAoB;YACpB;gBACEwB,MAAM;gBACNC,UAAU;gBACVZ,OAAO;gBACPa,aAAa;gBACbJ,YAAY;gBACZP,WAAWnB;YACb;YACA;gBACE4B,MAAM;gBACNC,UAAU;gBACVZ,OAAO;gBACPa,aAAa;gBACbJ,YAAY;gBACZP,WAAWpB;YACb;SACD;IACH;AACF"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/plugins/ai/src/lib/plugin.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PLATFORM_BRAND_NAME, registerConsoleExtension } from '@aglyn/aglyn'\nimport { LinearProgress } from '@mui/material'\nimport { createElement } from 'react'\nimport { AiAssistProviderOnHost } from './components/ai-assist-provider-on-host.component'\nimport { AI_PLUGIN_ID } from './constants'\nimport { registerAiDeclarations } from './declarations'\nimport { lazyWidget } from './lazy-widget'\n\n/*\n * Every component below is registered by name and loaded the first time the\n * shell draws it (AGL-3649); see `lazyWidget`. The console loads this plugin\n * on every screen, so a static import of a component here is downloaded by\n * every reader of every page, staff cards included.\n */\n\n/** What a page shows while its code arrives. */\nconst PAGE_LOADING = createElement(LinearProgress, { 'aria-label': 'Loading' })\n\nconst AiCollaboratorPermissionsCell = lazyWidget(\n 'AiCollaboratorPermissionsCell',\n () =>\n import('./components/ai-collaborator-permissions-column.component').then(\n (m) => m.AiCollaboratorPermissionsCell,\n ),\n)\nconst AiSaveAsComponent = lazyWidget('AiSaveAsComponent', () =>\n import('./components/ai-save-as-component.component').then(\n (m) => m.AiSaveAsComponent,\n ),\n)\nconst AiGenerateSectionControl = lazyWidget('AiGenerateSectionControl', () =>\n import('./components/besigner-ai-controls.component').then(\n (m) => m.AiGenerateSectionControl,\n ),\n)\nconst AiRewriteControl = lazyWidget('AiRewriteControl', () =>\n import('./components/besigner-ai-controls.component').then(\n (m) => m.AiRewriteControl,\n ),\n)\nconst AssistPanelOnHost = lazyWidget('AssistPanelOnHost', () =>\n import('./components/ai-permissions-on-host.component').then(\n (m) => m.AssistPanelOnHost,\n ),\n)\nconst AiCreditsCard = lazyWidget('AiCreditsCard', () =>\n import('./components/ai-credits-card.component').then((m) => m.default),\n)\nconst AiJobsTopBarIndicator = lazyWidget('AiJobsTopBarIndicator', () =>\n import('./components/ai-jobs-indicator.component').then((m) => m.default),\n)\nconst AiCollaboratorCreditsCell = lazyWidget('AiCollaboratorCreditsCell', () =>\n import('./components/ai-credits-columns.component').then(\n (m) => m.AiCollaboratorCreditsCell,\n ),\n)\nconst AiCollaboratorCreditsHeader = lazyWidget(\n 'AiCollaboratorCreditsHeader',\n () =>\n import('./components/ai-credits-columns.component').then(\n (m) => m.AiCollaboratorCreditsHeader,\n ),\n)\nconst AiMemberCreditsCell = lazyWidget('AiMemberCreditsCell', () =>\n import('./components/ai-credits-columns.component').then(\n (m) => m.AiMemberCreditsCell,\n ),\n)\nconst AiMemberCreditsHeader = lazyWidget('AiMemberCreditsHeader', () =>\n import('./components/ai-credits-columns.component').then(\n (m) => m.AiMemberCreditsHeader,\n ),\n)\nconst AssistSignalsPage = lazyWidget(\n 'AssistSignalsPage',\n () =>\n import('./components/assist-signals-page.component').then(\n (m) => m.AssistSignalsPage,\n ),\n PAGE_LOADING,\n)\nconst BillingAssistOverageCard = lazyWidget('BillingAssistOverageCard', () =>\n import('./components/billing-assist-overage-card.component').then(\n (m) => m.default,\n ),\n)\nconst AiTopUsersCard = lazyWidget('AiTopUsersCard', () =>\n import('./components/billing-ai-top-users.component').then(\n (m) => m.AiTopUsersCard,\n ),\n)\nconst AiAllotmentsCard = lazyWidget('AiAllotmentsCard', () =>\n import('./components/billing-ai-allotments.component').then(\n (m) => m.AiAllotmentsCard,\n ),\n)\nconst AiCollaboratorAllotmentCell = lazyWidget(\n 'AiCollaboratorAllotmentCell',\n () =>\n import('./components/host-ai-allotments.component').then(\n (m) => m.AiCollaboratorAllotmentCell,\n ),\n)\nconst AiCollaboratorAllotmentHeader = lazyWidget(\n 'AiCollaboratorAllotmentHeader',\n () =>\n import('./components/host-ai-allotments.component').then(\n (m) => m.AiCollaboratorAllotmentHeader,\n ),\n)\nconst AiSiteAllotmentCard = lazyWidget('AiSiteAllotmentCard', () =>\n import('./components/host-ai-allotments.component').then(\n (m) => m.AiSiteAllotmentCard,\n ),\n)\nconst MemberAiAllotmentCard = lazyWidget('MemberAiAllotmentCard', () =>\n import('./components/member-ai-allotment-card.component').then(\n (m) => m.default,\n ),\n)\nconst MemberAiUsageCard = lazyWidget('MemberAiUsageCard', () =>\n import('./components/member-ai-usage-card.component').then((m) => m.default),\n)\nconst AiThemeProposalCard = lazyWidget('AiThemeProposalCard', () =>\n import('./components/ai-theme-proposal-card.component').then(\n (m) => m.default,\n ),\n)\nconst StaffOrgAiCard = lazyWidget('StaffOrgAiCard', () =>\n import('./components/staff-org-ai-card.component').then((m) => m.default),\n)\nconst StaffOrgUsageAiCreditsCell = lazyWidget(\n 'StaffOrgUsageAiCreditsCell',\n () =>\n import('./components/staff-org-usage-ai-columns.component').then(\n (m) => m.StaffOrgUsageAiCreditsCell,\n ),\n)\nconst StaffOrgUsageAiOverageCell = lazyWidget(\n 'StaffOrgUsageAiOverageCell',\n () =>\n import('./components/staff-org-usage-ai-columns.component').then(\n (m) => m.StaffOrgUsageAiOverageCell,\n ),\n)\nconst StaffOrgUsageAiPool = lazyWidget('StaffOrgUsageAiPool', () =>\n import('./components/staff-org-usage-ai-columns.component').then(\n (m) => m.StaffOrgUsageAiPool,\n ),\n)\nconst StaffOrgUsageAssistCell = lazyWidget('StaffOrgUsageAssistCell', () =>\n import('./components/staff-org-usage-ai-columns.component').then(\n (m) => m.StaffOrgUsageAssistCell,\n ),\n)\nconst StaffOrgsAiSpendCell = lazyWidget('StaffOrgsAiSpendCell', () =>\n import('./components/staff-orgs-ai-spend-column.component').then(\n (m) => m.StaffOrgsAiSpendCell,\n ),\n)\nconst StaffOrgsAiSpendHeader = lazyWidget('StaffOrgsAiSpendHeader', () =>\n import('./components/staff-orgs-ai-spend-column.component').then(\n (m) => m.StaffOrgsAiSpendHeader,\n ),\n)\nconst StaffUserAiUsageCard = lazyWidget('StaffUserAiUsageCard', () =>\n import('./components/staff-user-ai-usage-card.component').then(\n (m) => m.default,\n ),\n)\nconst AiSeoAuditCard = lazyWidget('AiSeoAuditCard', () =>\n import('./components/ai-seo-audit-card.component').then((m) => m.default),\n)\nconst AiSiteBatchCard = lazyWidget('AiSiteBatchCard', () =>\n import('./components/ai-site-batch-card.component').then((m) => m.default),\n)\nconst AiSiteSeoStartCard = lazyWidget('AiSiteSeoStartCard', () =>\n import('./components/ai-site-seo-start-card.component').then(\n (m) => m.default,\n ),\n)\nconst AiSiteStartCard = lazyWidget('AiSiteStartCard', () =>\n import('./components/ai-site-start-card.component').then((m) => m.default),\n)\nconst AiSeoFieldsCard = lazyWidget('AiSeoFieldsCard', () =>\n import('./components/ai-seo-fields-card.component').then((m) => m.default),\n)\nconst AiDescribeAutomationButton = lazyWidget(\n 'AiDescribeAutomationButton',\n () =>\n import('./components/ai-describe-automation.component').then(\n (m) => m.default,\n ),\n)\nconst AiReviseAutomation = lazyWidget('AiReviseAutomation', () =>\n import('./components/ai-revise-automation.component').then((m) => m.default),\n)\nconst AiDescribeOrgAutomationButton = lazyWidget(\n 'AiDescribeOrgAutomationButton',\n () =>\n import('./components/ai-describe-org-automation.component').then(\n (m) => m.default,\n ),\n)\nconst AiInsightHostCard = lazyWidget('AiInsightHostCard', () =>\n import('./components/ai-insight-card.component').then(\n (m) => m.AiInsightHostCard,\n ),\n)\nconst AiInsightOrgCard = lazyWidget('AiInsightOrgCard', () =>\n import('./components/ai-insight-card.component').then(\n (m) => m.AiInsightOrgCard,\n ),\n)\nconst AiLogicCreateButton = lazyWidget('AiLogicCreateButton', () =>\n import('./components/ai-logic.component').then((m) => m.AiLogicCreateButton),\n)\nconst AiLogicFixReference = lazyWidget('AiLogicFixReference', () =>\n import('./components/ai-logic.component').then((m) => m.AiLogicFixReference),\n)\nconst AiLogicFunctionTools = lazyWidget('AiLogicFunctionTools', () =>\n import('./components/ai-logic.component').then((m) => m.AiLogicFunctionTools),\n)\nconst AiFunnelAskButton = lazyWidget('AiFunnelAskButton', () =>\n import('./components/ai-funnel-zones.component').then(\n (m) => m.AiFunnelAskButton,\n ),\n)\nconst AiFunnelCreateButton = lazyWidget('AiFunnelCreateButton', () =>\n import('./components/ai-funnel-zones.component').then(\n (m) => m.AiFunnelCreateButton,\n ),\n)\nconst AiCrmEmailDraft = lazyWidget('AiCrmEmailDraft', () =>\n import('./components/ai-crm-email-draft.component').then((m) => m.default),\n)\nconst AiCrmImportMapping = lazyWidget('AiCrmImportMapping', () =>\n import('./components/ai-crm-import-mapping.component').then((m) => m.default),\n)\nconst AiCrmRecordCard = lazyWidget('AiCrmRecordCard', () =>\n import('./components/ai-crm-record-card.component').then((m) => m.default),\n)\nconst AiDescribePageButton = lazyWidget('AiDescribePageButton', () =>\n import('./components/ai-describe-page.component').then((m) => m.default),\n)\nconst AiMediaCreateButton = lazyWidget('AiMediaCreateButton', () =>\n import('./components/ai-media-create.component').then((m) => m.default),\n)\nconst AiDescribeComponentButton = lazyWidget('AiDescribeComponentButton', () =>\n import('./components/ai-describe-button.component').then(\n (m) => m.AiDescribeComponentButton,\n ),\n)\nconst AiDescribeFormButton = lazyWidget('AiDescribeFormButton', () =>\n import('./components/ai-describe-button.component').then(\n (m) => m.AiDescribeFormButton,\n ),\n)\nconst AiDescribeLayoutButton = lazyWidget('AiDescribeLayoutButton', () =>\n import('./components/ai-describe-button.component').then(\n (m) => m.AiDescribeLayoutButton,\n ),\n)\nconst AiDescribeTemplateButton = lazyWidget('AiDescribeTemplateButton', () =>\n import('./components/ai-describe-button.component').then(\n (m) => m.AiDescribeTemplateButton,\n ),\n)\nconst AiDescribeEmailButton = lazyWidget('AiDescribeEmailButton', () =>\n import('./components/ai-describe-email.component').then(\n (m) => m.AiDescribeEmailButton,\n ),\n)\nconst AiExperimentResultCard = lazyWidget('AiExperimentResultCard', () =>\n import('./components/ai-experiment-cards.component').then(\n (m) => m.AiExperimentResultCard,\n ),\n)\nconst AiExperimentVariantsCard = lazyWidget('AiExperimentVariantsCard', () =>\n import('./components/ai-experiment-cards.component').then(\n (m) => m.AiExperimentVariantsCard,\n ),\n)\nconst AiExplainAutomation = lazyWidget('AiExplainAutomation', () =>\n import('./components/ai-explain-automation.component').then(\n (m) => m.AiExplainAutomation,\n ),\n)\nconst AiExplainRunFailure = lazyWidget('AiExplainRunFailure', () =>\n import('./components/ai-explain-automation.component').then(\n (m) => m.AiExplainRunFailure,\n ),\n)\nconst AiCreateCampaignButton = lazyWidget('AiCreateCampaignButton', () =>\n import('./components/ai-campaign-create.component').then((m) => m.default),\n)\nconst AiMarketingInsightButton = lazyWidget('AiMarketingInsightButton', () =>\n import('./components/ai-marketing-insight.component').then((m) => m.default),\n)\nconst AiCreateOverlayButton = lazyWidget('AiCreateOverlayButton', () =>\n import('./components/ai-overlay-cards.component').then(\n (m) => m.AiCreateOverlayButton,\n ),\n)\nconst AiOverlayEditorCard = lazyWidget('AiOverlayEditorCard', () =>\n import('./components/ai-overlay-cards.component').then(\n (m) => m.AiOverlayEditorCard,\n ),\n)\nconst AiProductCopyCard = lazyWidget('AiProductCopyCard', () =>\n import('./components/ai-product-copy-card.component').then((m) => m.default),\n)\nconst AiProductImportOption = lazyWidget('AiProductImportOption', () =>\n import('./components/ai-product-import-option.component').then(\n (m) => m.default,\n ),\n)\nconst AiProductsHubCard = lazyWidget('AiProductsHubCard', () =>\n import('./components/ai-products-hub-card.component').then((m) => m.default),\n)\nconst AiCreateProductsButton = lazyWidget('AiCreateProductsButton', () =>\n import('./components/ai-products-create-button.component').then(\n (m) => m.default,\n ),\n)\nconst AiJobsPage = lazyWidget(\n 'AiJobsPage',\n () => import('./components/ai-jobs-page.component').then((m) => m.default),\n PAGE_LOADING,\n)\n\n/**\n * The Aglyn AI plugin's console half (AGL-2939): the assistant dock, the\n * besigner copy assistant's provider, the billing, member and staff cards,\n * the member tables' credit columns and the Assist signal staff page — each\n * mounted through a shell-owned zone (AGL-2940) or the staff area's generic\n * route, so no console page imports this plugin.\n *\n * No `featureFlag` on the extension: the plugin's doors are gated one by\n * one — the dock reads the `release_assist` verdict the shell hands it, the\n * generative doors answer 404 behind `release_ai_generative`, the billing\n * cards render only where the plan sells a band — and a flag here would\n * switch off the released doors with the unreleased ones.\n */\nexport function registerAiConsole(): void {\n registerAiDeclarations()\n registerConsoleExtension({\n pluginId: AI_PLUGIN_ID,\n displayName: 'AI',\n // The besigner copy assistant (AGL-89/419): mounted by the shell around\n // every console page, and opened by this plugin's besigner controls.\n providers: [AiAssistProviderOnHost],\n // The Assist docs-gap and cost board (AGL-1860, AGL-2252), at the staff\n // URL and under the tab it has always had.\n staffPages: [\n {\n id: 'assist-signals',\n label: 'Assist signal',\n header: {\n // The configured brand, not ours (AGL-2153/2260): a white-label\n // deployment and a self-host operator both read this header.\n title: `${PLATFORM_BRAND_NAME} Assist Signal`,\n docsTopic: 'assistSignals',\n },\n Component: AssistSignalsPage,\n },\n ],\n // A site's AI jobs (AGL-3596), an address under the site and no tab:\n // `/ai-jobs` lists them, and `/ai-jobs/{jobId}` is one job's page —\n // \"Building your site\" (AGL-3594), where the guided start lands a person\n // and where a site job's notification opens. The `href` is a literal,\n // `AI_SITE_BUILD_HREF`'s value, because the tab-title manifest is read\n // from this source (`ai-jobs-page.spec.tsx` holds the two equal).\n navItems: [\n {\n label: 'AI jobs',\n href: '/ai-jobs',\n recordTitle: 'Building your site',\n header: { title: 'AI jobs', docsTopic: 'howAglynAiBuilds', docsAnchor: '#finding-your-ai-jobs' },\n unlisted: true,\n ownsSubtree: true,\n permission: 'ai.generate',\n Component: AiJobsPage,\n },\n ],\n widgets: [\n {\n slot: 'consoleDock',\n widgetId: 'ai-assist-dock',\n title: 'Assistant',\n Component: AssistPanelOnHost,\n },\n // The AI jobs indicator (AGL-3593), beside the notifications bell on\n // every page: what the workspace's jobs are doing, and the way to them.\n // Gated as the other generative widgets are; it asks the shell for the\n // release flags of the jobs and of the panel it opens.\n {\n slot: 'consoleTopBar',\n widgetId: 'ai-jobs-indicator',\n title: 'AI jobs',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiJobsTopBarIndicator,\n },\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-credits-meter',\n title: 'AI credits',\n Component: AiCreditsCard,\n },\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-credits-overage',\n title: 'AI credits overage',\n Component: BillingAssistOverageCard,\n },\n // The per-member usage (AGL-2928): who drew the credits the meter\n // counts, on Billing → Usage, on each member's page, on the staff\n // user page, and as a column of both member tables.\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-usage-by-member',\n title: 'Who is generating what',\n permission: 'billing.view',\n Component: AiTopUsersCard,\n },\n // The collaborators table's AI column (AGL-2927): whether each person\n // may open the AI doors on the site, per site, ahead of the columns\n // that report what they drew.\n {\n slot: 'hostMembers',\n widgetId: 'ai-collaborator-permissions',\n title: 'AI',\n column: { header: 'AI' },\n Component: AiCollaboratorPermissionsCell,\n },\n // The copy assistant's besigner controls (AGL-89, AGL-169): Generate a\n // section on every editor's toolbar, and Rewrite with AI under the\n // selected element's fields. Each opens the provider's dialog, and is\n // drawn only while the reader holds the door's permission.\n {\n slot: 'besignerToolbar',\n widgetId: 'ai-generate-section',\n title: 'Generate a section with AI',\n Component: AiGenerateSectionControl,\n },\n {\n slot: 'besignerInspector',\n widgetId: 'ai-rewrite-copy',\n title: 'Rewrite with AI',\n Component: AiRewriteControl,\n },\n // Save the selection as a reusable component (AGL-2908): the component\n // job's second entry point, which proposes the properties a section\n // should declare and applies them as the manual promote does.\n {\n slot: 'besignerInspector',\n widgetId: 'ai-save-as-component',\n title: 'Make a reusable component with AI',\n permission: 'ai.generate',\n Component: AiSaveAsComponent,\n },\n {\n slot: 'orgMember',\n widgetId: 'ai-member-usage',\n title: 'AI usage',\n Component: MemberAiUsageCard,\n },\n // The allotments (AGL-2942): a member's or a site's monthly share of\n // the pool, set on Billing → Usage, on each member's page and on a\n // site's collaborators card — each card asks the route what its\n // reader may see and change.\n {\n slot: 'orgBillingUsage',\n widgetId: 'ai-allotments',\n title: 'AI allotments',\n permission: 'billing.view',\n Component: AiAllotmentsCard,\n },\n {\n slot: 'orgMember',\n widgetId: 'ai-member-allotment',\n title: 'AI allotment',\n Component: MemberAiAllotmentCard,\n },\n {\n slot: 'hostMembers',\n widgetId: 'ai-collaborator-allotment',\n title: 'AI allotment',\n column: {\n header: 'AI allotment',\n align: 'right',\n Header: AiCollaboratorAllotmentHeader,\n },\n Component: AiCollaboratorAllotmentCell,\n },\n {\n slot: 'hostMembers',\n widgetId: 'ai-site-allotment',\n title: 'Site AI allotment',\n Component: AiSiteAllotmentCard,\n },\n // Themes by AI (AGL-2938): a brief on the site's Theme section, a\n // proposal previewed before and after, and the editor's own Save to\n // keep it. Generation is sold as `aiGenerative` and held by\n // `ai.generate`, so the shell withholds the card from a plan or a\n // member without either; the card itself asks the route about the\n // release flag before it shows anything.\n {\n slot: 'hostTheme',\n widgetId: 'ai-theme-proposal',\n title: 'Theme assistant',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiThemeProposalCard,\n },\n {\n slot: 'staffOrg',\n widgetId: 'ai-org-usage',\n title: 'AI usage',\n Component: StaffOrgAiCard,\n },\n {\n slot: 'staffUser',\n widgetId: 'ai-account-usage',\n title: 'AI usage across organizations',\n Component: StaffUserAiUsageCard,\n },\n // The staff tables' AI figures (AGL-2984): the Organizations list's\n // spend column, and the usage table's three columns with the credit\n // pool line the org page draws above it.\n {\n slot: 'staffOrgsListColumn',\n widgetId: 'ai-orgs-spend',\n title: 'AI spend (month)',\n column: {\n header: 'AI spend (month)',\n align: 'right',\n Header: StaffOrgsAiSpendHeader,\n },\n Component: StaffOrgsAiSpendCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-assist-cost',\n title: 'Assist',\n column: { header: 'Assist', align: 'right' },\n Component: StaffOrgUsageAssistCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-credits',\n title: 'AI credits used',\n column: { header: 'AI credits used', align: 'right' },\n Component: StaffOrgUsageAiCreditsCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-overage',\n title: 'AI overage billed ($)',\n column: { header: 'AI overage billed ($)', align: 'right' },\n Component: StaffOrgUsageAiOverageCell,\n },\n {\n slot: 'staffOrgUsageColumn',\n widgetId: 'ai-usage-pool',\n title: 'AI credit pool',\n Component: StaffOrgUsageAiPool,\n },\n {\n slot: 'orgMembersListColumn',\n widgetId: 'ai-member-credits',\n title: 'AI credits (month)',\n column: { header: 'AI credits (month)', align: 'right', Header: AiMemberCreditsHeader },\n Component: AiMemberCreditsCell,\n },\n {\n slot: 'hostMembers',\n widgetId: 'ai-collaborator-credits',\n title: 'AI credits (site, month)',\n column: {\n header: 'AI credits (site, month)',\n align: 'right',\n Header: AiCollaboratorCreditsHeader,\n },\n Component: AiCollaboratorCreditsCell,\n },\n // SEO by AI (AGL-2910): \"Write SEO\" inside every search listing editor\n // — a page's SEO card and a product's listing — and the site audit on\n // the site's SEO section. Generation is sold as `aiGenerative` and held\n // by `ai.generate`, so the shell withholds both from a plan or a member\n // without either; each card asks the jobs route about the release flag\n // before it shows anything, and neither ever writes what it proposes.\n {\n slot: 'seoFields',\n widgetId: 'ai-seo-fields',\n title: 'SEO assistant',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSeoFieldsCard,\n },\n {\n slot: 'hostSeo',\n widgetId: 'ai-seo-audit',\n title: 'SEO audit',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSeoAuditCard,\n },\n // A page from a brief (AGL-2907): \"Create with AI\" beside Templates and\n // Create New Screen. Gated as the other generative widgets are.\n // On a plan that could buy the AI add-on and has not, each \"Create with\n // AI\" entry here is mounted anyway (`showWhenNotEntitled`) and opens\n // the add-on's dialog instead of the brief (AGL-3601). The shell holds\n // each behind `release_ai_generative` too, so an entry draws at once\n // and asks the jobs route nothing until its brief is sent.\n {\n slot: 'hostScreens',\n widgetId: 'ai-describe-page',\n title: 'Describe a page',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribePageButton,\n },\n // The same entry for a page template, a layout and a form (AGL-3043),\n // beside the create action of the page that lists each: the same\n // dialog and the same gates.\n {\n slot: 'hostTemplates',\n widgetId: 'ai-describe-template',\n title: 'Describe a page template',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeTemplateButton,\n },\n {\n slot: 'hostLayouts',\n widgetId: 'ai-describe-layout',\n title: 'Describe a layout',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeLayoutButton,\n },\n {\n slot: 'hostForms',\n widgetId: 'ai-describe-form',\n title: 'Describe a form',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeFormButton,\n },\n // And a reusable component from a brief (AGL-3051), beside Templates\n // and Create Component: the component job's first entry point, which\n // had none in the console.\n // Pictures from a description (AGL-3602): \"Create with AI\" beside Upload\n // media in the media library, and in its empty state. Gated as the\n // other generative widgets are, by the shell alone: it asks nothing of\n // a server until someone creates a picture, and the door decides then.\n {\n slot: 'mediaLibrary',\n widgetId: 'ai-media-create',\n title: 'Create images with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiMediaCreateButton,\n },\n {\n slot: 'hostComponents',\n widgetId: 'ai-describe-component',\n title: 'Describe a reusable component',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeComponentButton,\n },\n // An email design from a brief (AGL-3596), beside New template on a\n // site's email templates — the zone the email plugin hosts. Its dialog\n // also offers the draft campaign that would send it; the Campaigns\n // section's own door is `ai-create-campaign`, below.\n {\n slot: 'hostEmailTemplates',\n widgetId: 'ai-describe-email',\n title: 'Describe an email',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeEmailButton,\n },\n // Automations by AI (AGL-2919), in the zones the workflows plugin hosts\n // on its Automation page: \"Create with AI\" beside Add action and Recipes,\n // \"Explain it\" in the editor of a saved automation, and \"Why did this\n // fail?\" on a failed run. Gated as the other generative widgets are,\n // the release flag included, by the shell alone (AGL-3601): none asks\n // the jobs route anything until it is used, and none of them changes an\n // automation.\n {\n slot: 'hostAutomations',\n widgetId: 'ai-describe-automation',\n title: 'Describe an automation',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeAutomationButton,\n },\n // Funnels by AI (AGL-3605), in the zones the funnels plugin hosts on\n // its card: a draft from a description, and its results explained.\n {\n slot: 'funnelsCreate',\n widgetId: 'ai-describe-funnel',\n title: 'Describe a funnel',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiFunnelCreateButton,\n },\n {\n slot: 'funnelInsight',\n widgetId: 'ai-explain-funnel',\n title: 'Ask AI about this funnel',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiFunnelAskButton,\n },\n {\n slot: 'automationEditor',\n widgetId: 'ai-explain-automation',\n title: 'Explain this automation',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiExplainAutomation,\n },\n // \"Change with AI\" and \"Fix with AI\" in a saved action's editor\n // (AGL-3603): a changed copy drafted OFF beside it, never the saved\n // action written in place.\n {\n slot: 'automationEditor',\n widgetId: 'ai-revise-automation',\n title: 'Change this automation with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiReviseAutomation,\n },\n // \"Create with AI\" on the workspace's Org automations (AGL-3603): one\n // of the workspace's automations drafted from a description and opened\n // in that section's editor, unsaved and switched off.\n {\n slot: 'orgAutomations',\n widgetId: 'ai-describe-org-automation',\n title: 'Describe an org automation',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiDescribeOrgAutomationButton,\n },\n // \"Ask AI about these numbers\" (AGL-3603): a tile on a site's\n // dashboard and Analytics page, which both draw `hostDashboard`, and on\n // the workspace's sites page. It opens the insight dialog the Assist\n // panel opens, gated as every generative widget is.\n {\n slot: 'hostDashboard',\n widgetId: 'ai-insight-ask',\n title: 'Ask AI about these numbers',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiInsightHostCard,\n },\n {\n slot: 'orgDashboard',\n widgetId: 'ai-insight-ask',\n title: 'Ask AI about these numbers',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiInsightOrgCard,\n },\n // Logic by AI (AGL-3603), in the zones the logic plugin hosts on its\n // Functions & Variables page: Create with AI in the Functions and\n // Variables card headers, Explain / Change / Fix in a saved function's\n // editor, and Fix with AI on a broken reference an automation holds.\n // Each proposal opens unsaved in the logic editor; none is saved here.\n {\n slot: 'hostLogic',\n widgetId: 'ai-describe-logic',\n title: 'Describe a function or variable',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiLogicCreateButton,\n },\n {\n slot: 'logicFunctionEditor',\n widgetId: 'ai-logic-function',\n title: 'This function with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiLogicFunctionTools,\n },\n {\n slot: 'logicReferenceIssue',\n widgetId: 'ai-logic-fix-reference',\n title: 'Fix this reference with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiLogicFixReference,\n },\n {\n slot: 'automationRun',\n widgetId: 'ai-explain-run-failure',\n title: 'Why did this run fail?',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiExplainRunFailure,\n },\n // CRM by AI (AGL-2917): a record's summary and next step on its page,\n // a draft in the one-to-one composer, and an import's column matches.\n // The CRM hosts each zone, so it is drawn only where the CRM is; the\n // shell holds the plan and `ai.generate`, each card asks the jobs route\n // about the release flag before it shows anything, and none writes what\n // it proposes.\n {\n slot: 'recordInsights',\n widgetId: 'ai-crm-record',\n title: 'AI summary',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiCrmRecordCard,\n },\n {\n slot: 'recordEmail',\n widgetId: 'ai-crm-email',\n title: 'Draft with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiCrmEmailDraft,\n },\n {\n slot: 'importMapping',\n widgetId: 'ai-crm-import-mapping',\n title: 'Match columns with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiCrmImportMapping,\n },\n // The guided start (AGL-2918), on the page a newly created site lands\n // on: a few questions that become a site scaffold. Gated as the other\n // generative widgets are, and it asks the jobs route about the release\n // flag before it shows anything — so a workspace the feature is not\n // released to gets the blank page and nothing else. Skipping is the\n // zone's own `startBlank`, which creates nothing.\n {\n slot: 'hostFirstRun',\n widgetId: 'ai-site-start',\n title: 'Start this site with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSiteStartCard,\n },\n // The listing those answers describe (AGL-2918), on the site's SEO\n // section: the site-wide search title and description the guided start\n // implies, offered where they are edited. The same gates as every\n // generative widget, and it stages into the SEO form rather than\n // writing it — a person's Update is the write, as it is for the audit\n // card beside it.\n {\n slot: 'hostSeo',\n widgetId: 'ai-site-seo-start',\n title: 'The listing your answers describe',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSiteSeoStartCard,\n },\n // The agency batch (AGL-2911): one brief across many of the org's\n // sites, from the page that lists them. The card asks the jobs route\n // about the release flag before it shows anything, and its own door\n // holds the plan band and the caller's permission on every site it is\n // pointed at.\n {\n slot: 'orgSites',\n widgetId: 'ai-site-batch',\n title: 'Generate sites with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiSiteBatchCard,\n },\n // Commerce by AI (AGL-2916): product copy in the product editor, the\n // catalog, categories and discounts on the products hub, and copy for\n // an import as it lands. The commerce plugin hosts the zones and makes\n // every write. The shell holds the release flag; the products hub card\n // reads its recent proposals before it draws its own controls, but\n // offers the \"Create with AI\" door's brief from the moment it mounts.\n {\n slot: 'productEditor',\n widgetId: 'ai-product-copy',\n title: 'Product copy assistant',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiProductCopyCard,\n },\n {\n slot: 'productsHub',\n widgetId: 'ai-products-hub',\n title: 'Build your catalog with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiProductsHubCard,\n },\n // \"Create with AI\" beside Add product and in the empty catalog\n // (AGL-3596): a door to the card's Propose products brief, shown only\n // while that card is on the page to take it.\n {\n slot: 'productsCreate',\n widgetId: 'ai-products-create',\n title: 'Propose products',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiCreateProductsButton,\n },\n {\n slot: 'productImport',\n widgetId: 'ai-product-import',\n title: 'Write imported product copy with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n Component: AiProductImportOption,\n },\n // A/B tests by AI (AGL-2914): variants written in the experiment\n // editor, and one test's result read in plain words below its figures.\n // The A/B testing card hosts both zones, so they are drawn only where\n // that card is and only on a site with A/B testing; the shell holds the\n // plan band, `ai.generate` and the release flag, and neither card asks\n // the jobs route anything until it is used (AGL-3601). Neither writes: the\n // experiment editor's Save is the only write, and an explanation has\n // nothing to apply.\n {\n slot: 'experimentVariants',\n widgetId: 'ai-experiment-variants',\n title: 'Write variants with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiExperimentVariantsCard,\n },\n {\n slot: 'experimentResult',\n widgetId: 'ai-experiment-result',\n title: 'Explain this result with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiExperimentResultCard,\n },\n // Overlays by AI (AGL-3603), in the zones the marketing plugin's\n // overlays list hosts: \"Create with AI\" beside New bar and New popup,\n // and \"Write with AI\" among the overlay editor's fields. Both start a\n // `text` job asked for overlay copy; neither writes — the list saves a\n // created overlay switched off, and the editor's Save is the write.\n {\n slot: 'hostOverlays',\n widgetId: 'ai-create-overlay',\n title: 'Create an overlay with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiCreateOverlayButton,\n },\n {\n slot: 'overlayEditor',\n widgetId: 'ai-overlay-copy',\n title: 'Write overlay copy with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n releaseFlag: 'release_ai_generative',\n Component: AiOverlayEditorCard,\n },\n // A campaign from a brief (AGL-3603), beside Create campaign on the\n // Campaigns section the marketing plugin hosts: the `campaign` job's\n // first console door, or the `email` job's where the plan sends no\n // campaign email. Both write drafts that are aimed at nobody and sent\n // by nobody until a member does.\n {\n slot: 'hostCampaigns',\n widgetId: 'ai-create-campaign',\n title: 'Create a campaign with AI',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiCreateCampaignButton,\n },\n // The figures in words (AGL-3603), in the header of the Conversions\n // section and of one campaign's report: the insight dialog the Assist\n // panel opens, on the Marketing surface, for the site the figures are.\n // It reads and cites; it changes nothing.\n {\n slot: 'marketingInsights',\n widgetId: 'ai-marketing-insight',\n title: 'Ask AI about these numbers',\n featureFlag: 'aiGenerative',\n permission: 'ai.generate',\n showWhenNotEntitled: true,\n releaseFlag: 'release_ai_generative',\n Component: AiMarketingInsightButton,\n },\n ],\n })\n}\n"],"names":["PLATFORM_BRAND_NAME","registerConsoleExtension","LinearProgress","createElement","AiAssistProviderOnHost","AI_PLUGIN_ID","registerAiDeclarations","lazyWidget","PAGE_LOADING","AiCollaboratorPermissionsCell","then","m","AiSaveAsComponent","AiGenerateSectionControl","AiRewriteControl","AssistPanelOnHost","AiCreditsCard","default","AiJobsTopBarIndicator","AiCollaboratorCreditsCell","AiCollaboratorCreditsHeader","AiMemberCreditsCell","AiMemberCreditsHeader","AssistSignalsPage","BillingAssistOverageCard","AiTopUsersCard","AiAllotmentsCard","AiCollaboratorAllotmentCell","AiCollaboratorAllotmentHeader","AiSiteAllotmentCard","MemberAiAllotmentCard","MemberAiUsageCard","AiThemeProposalCard","StaffOrgAiCard","StaffOrgUsageAiCreditsCell","StaffOrgUsageAiOverageCell","StaffOrgUsageAiPool","StaffOrgUsageAssistCell","StaffOrgsAiSpendCell","StaffOrgsAiSpendHeader","StaffUserAiUsageCard","AiSeoAuditCard","AiSiteBatchCard","AiSiteSeoStartCard","AiSiteStartCard","AiSeoFieldsCard","AiDescribeAutomationButton","AiReviseAutomation","AiDescribeOrgAutomationButton","AiInsightHostCard","AiInsightOrgCard","AiLogicCreateButton","AiLogicFixReference","AiLogicFunctionTools","AiFunnelAskButton","AiFunnelCreateButton","AiCrmEmailDraft","AiCrmImportMapping","AiCrmRecordCard","AiDescribePageButton","AiMediaCreateButton","AiDescribeComponentButton","AiDescribeFormButton","AiDescribeLayoutButton","AiDescribeTemplateButton","AiDescribeEmailButton","AiExperimentResultCard","AiExperimentVariantsCard","AiExplainAutomation","AiExplainRunFailure","AiCreateCampaignButton","AiMarketingInsightButton","AiCreateOverlayButton","AiOverlayEditorCard","AiProductCopyCard","AiProductImportOption","AiProductsHubCard","AiCreateProductsButton","AiJobsPage","registerAiConsole","pluginId","displayName","providers","staffPages","id","label","header","title","docsTopic","Component","navItems","href","recordTitle","docsAnchor","unlisted","ownsSubtree","permission","widgets","slot","widgetId","featureFlag","column","align","Header","showWhenNotEntitled","releaseFlag"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,mBAAmB,EAAEC,wBAAwB,QAAQ,eAAc;AAC5E,SAASC,cAAc,QAAQ,gBAAe;AAC9C,SAASC,aAAa,QAAQ,QAAO;AACrC,SAASC,sBAAsB,QAAQ,uDAAmD;AAC1F,SAASC,YAAY,QAAQ,iBAAa;AAC1C,SAASC,sBAAsB,QAAQ,oBAAgB;AACvD,SAASC,UAAU,QAAQ,mBAAe;AAE1C;;;;;CAKC,GAED,8CAA8C,GAC9C,MAAMC,eAAeL,cAAcD,gBAAgB;IAAE,cAAc;AAAU;AAE7E,MAAMO,gCAAgCF,WACpC,iCACA,IACE,MAAM,CAAC,gEAA6DG,IAAI,CACtE,CAACC,IAAMA,EAAEF,6BAA6B;AAG5C,MAAMG,oBAAoBL,WAAW,qBAAqB,IACxD,MAAM,CAAC,kDAA+CG,IAAI,CACxD,CAACC,IAAMA,EAAEC,iBAAiB;AAG9B,MAAMC,2BAA2BN,WAA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;IACH;AACF"}
|
|
@@ -149,7 +149,7 @@ export declare const ANTHROPIC_CRM_ASSISTANCE_DISCLOSED: AnthropicCrmAssistanceW
|
|
|
149
149
|
* wording the Subprocessors row and Privacy Policy section 2 were
|
|
150
150
|
* republished with on October 5, 2026 (legal v10), before
|
|
151
151
|
* `release_crm_assist_whole_record` may be turned on. The catalog row below
|
|
152
|
-
* carries it
|
|
152
|
+
* carries it in `dataReceived`.
|
|
153
153
|
*/
|
|
154
154
|
export declare const ANTHROPIC_CRM_ASSISTANCE_WHOLE_RECORD: AnthropicCrmAssistanceWording;
|
|
155
155
|
/** The Anthropic row's data cell, with CRM assistance worded as `crm` words it. */
|
|
@@ -162,6 +162,82 @@ export declare function anthropicDataReceived(crm: AnthropicCrmAssistanceWording
|
|
|
162
162
|
*/
|
|
163
163
|
export declare const AI_CATALOG_PROVIDERS: readonly AiCatalogProvider[];
|
|
164
164
|
export declare const AI_MODEL_CATALOG: readonly AiCatalogEntry[];
|
|
165
|
+
/**
|
|
166
|
+
* The IMAGE models (AGL-3602): every model id the Media library's "Create
|
|
167
|
+
* with AI" photo mode may route to — Google's Gemini image models on Vertex
|
|
168
|
+
* AI — with a per-picture provider rate and a per-picture billed rate, and the
|
|
169
|
+
* token rates the same request's prompt and thinking are billed at. Kept
|
|
170
|
+
* apart from `AI_MODEL_CATALOG` because nothing that lists text models — the
|
|
171
|
+
* model selector, the routing table, the allotments' allowlists — may ever
|
|
172
|
+
* offer one of these for a conversation.
|
|
173
|
+
*
|
|
174
|
+
* ## The rates
|
|
175
|
+
*
|
|
176
|
+
* Google prices an output picture as image-output tokens: Gemini 3.1 Flash
|
|
177
|
+
* Image writes a 1K picture as 1,120 tokens at $60 per million on the global
|
|
178
|
+
* endpoint, so $0.0672 a picture. Its prompt is input tokens ($0.50 per
|
|
179
|
+
* million) and its thinking is text output ($3.00 per million). Every figure
|
|
180
|
+
* here is the global endpoint's list price, read from Google's Vertex AI
|
|
181
|
+
* pricing page on 2026-10-06; a regional endpoint lists 10% higher, so a
|
|
182
|
+
* deployment that moves off `global` reads its cost low by that much.
|
|
183
|
+
*
|
|
184
|
+
* Every billed figure is the provider figure at `AI_IMAGE_BILLED_MARKUP`:
|
|
185
|
+
* the same ratio the balanced text tier is billed at over its provider rate
|
|
186
|
+
* (Claude Sonnet 5, $3/$15 billed over $2/$10), so a credit buys the same
|
|
187
|
+
* share of margin whether it is spent on words or on pictures. A picture is
|
|
188
|
+
* NEVER billed at provider cost; `billed-rate-is-not-provider-cost.spec.ts`
|
|
189
|
+
* refuses a row that is.
|
|
190
|
+
*
|
|
191
|
+
* A credit is $0.001 of billed spend (`ASSIST_CREDIT_COST_USD`), so the
|
|
192
|
+
* default model's picture is 101 credits before its prompt and thinking.
|
|
193
|
+
*/
|
|
194
|
+
export interface AiImageCatalogEntry extends AiCatalogRates {
|
|
195
|
+
id: string;
|
|
196
|
+
/** The image provider the model is served by. */
|
|
197
|
+
provider: string;
|
|
198
|
+
label: string;
|
|
199
|
+
/** What the provider bills us for one generated picture. */
|
|
200
|
+
providerUsdPerImage: number;
|
|
201
|
+
/** What one picture draws from a customer's credits. */
|
|
202
|
+
billedUsdPerImage: number;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* The billed rate over the provider rate: the balanced text tier's own markup
|
|
206
|
+
* (`claude-sonnet-5`, 3 / 2), restated as a number so an image row cannot be
|
|
207
|
+
* written at list by accident.
|
|
208
|
+
*/
|
|
209
|
+
export declare const AI_IMAGE_BILLED_MARKUP = 1.5;
|
|
210
|
+
/**
|
|
211
|
+
* An image row's four figures from Google's list prices — USD per output
|
|
212
|
+
* picture, and USD per million input and text-output tokens — each billed at
|
|
213
|
+
* `AI_IMAGE_BILLED_MARKUP`.
|
|
214
|
+
*/
|
|
215
|
+
export declare function aiImageRatesAtMarkup(providerUsdPerImage: number, inputPerMTok: number, outputPerMTok: number): Pick<AiImageCatalogEntry, 'providerUsdPerImage' | 'billedUsdPerImage' | 'providerRates' | 'billedRates'>;
|
|
216
|
+
/** The image model a photo is made with when the operator names none. */
|
|
217
|
+
export declare const AI_IMAGE_DEFAULT_MODEL = "gemini-3.1-flash-image";
|
|
218
|
+
/** The image provider's id: Google's models on Vertex AI. */
|
|
219
|
+
export declare const AI_IMAGE_VERTEX_PROVIDER_ID = "google-vertex";
|
|
220
|
+
export declare const AI_IMAGE_MODEL_CATALOG: readonly AiImageCatalogEntry[];
|
|
221
|
+
/**
|
|
222
|
+
* The per-picture rates an unknown image model id is priced at: the dearest
|
|
223
|
+
* row, on both rates, for the reason `AI_FALLBACK_RATES` gives — an estimate
|
|
224
|
+
* that errs low is worse than one that errs high.
|
|
225
|
+
*/
|
|
226
|
+
export declare const AI_IMAGE_FALLBACK_RATES: Pick<AiImageCatalogEntry, 'providerUsdPerImage' | 'billedUsdPerImage'>;
|
|
227
|
+
/** The image catalog row for a model id, or `undefined` for an unknown id. */
|
|
228
|
+
export declare function aiImageCatalogEntry(modelId: string): AiImageCatalogEntry | undefined;
|
|
229
|
+
/** What the provider charges us for one picture from `modelId`. */
|
|
230
|
+
export declare function aiImageProviderUsdPerImage(modelId: string): number;
|
|
231
|
+
/** What one picture from `modelId` draws from a customer's credits. */
|
|
232
|
+
export declare function aiImageBilledUsdPerImage(modelId: string): number;
|
|
233
|
+
/**
|
|
234
|
+
* Usage as the meter prices it: a text exchange's tokens, and, for a door
|
|
235
|
+
* that makes pictures, how many it delivered. `images` is absent on every
|
|
236
|
+
* text exchange, which prices exactly as it always did.
|
|
237
|
+
*/
|
|
238
|
+
export type AiMeteredUsage = AiUsage & {
|
|
239
|
+
images?: number;
|
|
240
|
+
};
|
|
165
241
|
/** The dearest known tier, used when a model id is not in the catalog. */
|
|
166
242
|
export declare const AI_FALLBACK_RATES: AiTokenRates;
|
|
167
243
|
/**
|
|
@@ -177,7 +253,8 @@ export declare function aiModelCacheMinTokens(modelId: string): number;
|
|
|
177
253
|
export declare function aiCatalogEntry(modelId: string): AiCatalogEntry | undefined;
|
|
178
254
|
/**
|
|
179
255
|
* What the PROVIDER charges for a model id — our bill. A meter sentinel is
|
|
180
|
-
* free; an
|
|
256
|
+
* free; an image model's prompt and thinking are priced at its image row's
|
|
257
|
+
* token rates (AGL-3602); an unknown id is priced at the dearest tier.
|
|
181
258
|
*
|
|
182
259
|
* The figure every cost and margin surface prices usage at. Answering the
|
|
183
260
|
* customer's question from here would report a margin the platform does not
|
|
@@ -198,13 +275,13 @@ export declare function aiBilledRatesForModel(modelId: string): AiTokenRates;
|
|
|
198
275
|
* What one exchange COST US, at the serving model's provider rates, rounded
|
|
199
276
|
* to 6dp. Real money, and the only figure a margin may be taken against.
|
|
200
277
|
*/
|
|
201
|
-
export declare function estimateAiProviderCostUsd(usage:
|
|
278
|
+
export declare function estimateAiProviderCostUsd(usage: AiMeteredUsage, modelId: string): number;
|
|
202
279
|
/**
|
|
203
280
|
* What one exchange DRAWS FROM A CUSTOMER, at the serving model's billed
|
|
204
281
|
* rates, rounded to 6dp — the figure `assistCreditsFromUsd` turns into
|
|
205
282
|
* credits. At or above `estimateAiProviderCostUsd` for the same exchange.
|
|
206
283
|
*/
|
|
207
|
-
export declare function estimateAiBilledUsd(usage:
|
|
284
|
+
export declare function estimateAiBilledUsd(usage: AiMeteredUsage, modelId: string): number;
|
|
208
285
|
/** Every catalog id a provider serves. */
|
|
209
286
|
export declare function aiModelIdsForProvider(providerId: string): string[];
|
|
210
287
|
/**
|
|
@@ -213,7 +290,7 @@ export declare function aiModelIdsForProvider(providerId: string): string[];
|
|
|
213
290
|
* incident override, an org's own setting, a cheaper model for a cheap
|
|
214
291
|
* step — is one row rather than a search through the doors (AGL-2937).
|
|
215
292
|
*/
|
|
216
|
-
export type AiStepKind = 'assist.chat' | 'copy.element' | 'copy.section' | 'copy.blog' | 'generate.section' | 'job.component' | 'job.crm' | 'job.experiment' | 'job.form' | 'job.insight' | 'job.layout' | 'job.template' | 'job.page' | 'job.products' | 'job.seo' | 'job.text' | 'job.theme' | 'job.plan' | 'job.email' | 'job.campaign' | 'job.workflow';
|
|
293
|
+
export type AiStepKind = 'assist.chat' | 'copy.element' | 'copy.section' | 'copy.blog' | 'generate.section' | 'job.component' | 'job.crm' | 'job.experiment' | 'job.form' | 'job.insight' | 'job.layout' | 'job.logic' | 'job.template' | 'job.page' | 'job.products' | 'job.seo' | 'job.text' | 'job.theme' | 'job.plan' | 'job.email' | 'job.campaign' | 'job.workflow';
|
|
217
294
|
/** The tier each step kind is served from when no setting overrides it. */
|
|
218
295
|
export declare const AI_STEP_TIERS: Record<AiStepKind, AiCatalogEntry['tier']>;
|
|
219
296
|
/** The first catalog model of a tier on a provider, or the provider's first model. */
|
|
@@ -63,7 +63,7 @@ const OPENAI_COMPATIBLE = 'openai-compatible';
|
|
|
63
63
|
* wording the Subprocessors row and Privacy Policy section 2 were
|
|
64
64
|
* republished with on October 5, 2026 (legal v10), before
|
|
65
65
|
* `release_crm_assist_whole_record` may be turned on. The catalog row below
|
|
66
|
-
* carries it
|
|
66
|
+
* carries it in `dataReceived`.
|
|
67
67
|
*/ export const ANTHROPIC_CRM_ASSISTANCE_WHOLE_RECORD = {
|
|
68
68
|
record: 'For CRM assistance, the opened record as the CRM shows it, with all of its standard and custom fields, including contact details, notes, timeline and related records.',
|
|
69
69
|
never: 'No account identifiers or authentication tokens, and no email address outside an opened CRM record.'
|
|
@@ -83,8 +83,8 @@ const OPENAI_COMPATIBLE = 'openai-compatible';
|
|
|
83
83
|
subprocessor: {
|
|
84
84
|
entity: 'Anthropic, PBC',
|
|
85
85
|
region: 'United States',
|
|
86
|
-
purpose: "AI
|
|
87
|
-
publishedOn: '2026-10-
|
|
86
|
+
purpose: "AI features of the Services, including the Aglyn Assist helper: creating, editing and reviewing content, drafts and settings for a customer’s site, store and CRM, and explaining and summarizing the customer’s own setup and data",
|
|
87
|
+
publishedOn: '2026-10-07',
|
|
88
88
|
reason: "Reached through the AI plugin's Anthropic adapter (`libs/plugins/ai/src/lib/providers/anthropic.ts`) by the doors that call the AI runtime. `libs/plugins/ai/src/lib/server/assist-chat.ts` is gated by `release_assist` AND the key, and a generation job's text step by `release_ai_generative`; `libs/plugins/ai/src/lib/server/ai-assist.ts` carries NO release flag, so setting `{apiKeyEnv}` in production is by itself what starts this flow. `assist-anthropic-subprocessor-gate.spec.ts` holds the per-door detail and is the deeper guard for this one vendor.",
|
|
89
89
|
dataReceived: anthropicDataReceived(ANTHROPIC_CRM_ASSISTANCE_WHOLE_RECORD)
|
|
90
90
|
}
|
|
@@ -210,6 +210,71 @@ export const AI_MODEL_CATALOG = [
|
|
|
210
210
|
cacheMinTokens: 1024
|
|
211
211
|
})
|
|
212
212
|
];
|
|
213
|
+
/**
|
|
214
|
+
* The billed rate over the provider rate: the balanced text tier's own markup
|
|
215
|
+
* (`claude-sonnet-5`, 3 / 2), restated as a number so an image row cannot be
|
|
216
|
+
* written at list by accident.
|
|
217
|
+
*/ export const AI_IMAGE_BILLED_MARKUP = 1.5;
|
|
218
|
+
/**
|
|
219
|
+
* An image row's four figures from Google's list prices — USD per output
|
|
220
|
+
* picture, and USD per million input and text-output tokens — each billed at
|
|
221
|
+
* `AI_IMAGE_BILLED_MARKUP`.
|
|
222
|
+
*/ export function aiImageRatesAtMarkup(providerUsdPerImage, inputPerMTok, outputPerMTok) {
|
|
223
|
+
return {
|
|
224
|
+
providerUsdPerImage,
|
|
225
|
+
billedUsdPerImage: roundUsd(providerUsdPerImage * AI_IMAGE_BILLED_MARKUP),
|
|
226
|
+
providerRates: aiRatesPerMTok(inputPerMTok, outputPerMTok),
|
|
227
|
+
billedRates: aiRatesPerMTok(inputPerMTok * AI_IMAGE_BILLED_MARKUP, outputPerMTok * AI_IMAGE_BILLED_MARKUP)
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
/** The image model a photo is made with when the operator names none. */ export const AI_IMAGE_DEFAULT_MODEL = 'gemini-3.1-flash-image';
|
|
231
|
+
/** The image provider's id: Google's models on Vertex AI. */ export const AI_IMAGE_VERTEX_PROVIDER_ID = 'google-vertex';
|
|
232
|
+
export const AI_IMAGE_MODEL_CATALOG = [
|
|
233
|
+
_extends({
|
|
234
|
+
// The default: Google's own replacement for Imagen 4, which Vertex AI
|
|
235
|
+
// discontinued in 2026.
|
|
236
|
+
id: 'gemini-3.1-flash-image',
|
|
237
|
+
provider: AI_IMAGE_VERTEX_PROVIDER_ID,
|
|
238
|
+
label: 'Gemini 3.1 Flash Image'
|
|
239
|
+
}, aiImageRatesAtMarkup(0.0672, 0.5, 3)),
|
|
240
|
+
_extends({
|
|
241
|
+
id: 'gemini-3.1-flash-lite-image',
|
|
242
|
+
provider: AI_IMAGE_VERTEX_PROVIDER_ID,
|
|
243
|
+
label: 'Gemini 3.1 Flash-Lite Image'
|
|
244
|
+
}, aiImageRatesAtMarkup(0.0336, 0.25, 1.5)),
|
|
245
|
+
_extends({
|
|
246
|
+
id: 'gemini-3-pro-image',
|
|
247
|
+
provider: AI_IMAGE_VERTEX_PROVIDER_ID,
|
|
248
|
+
label: 'Gemini 3 Pro Image'
|
|
249
|
+
}, aiImageRatesAtMarkup(0.1344, 2, 12))
|
|
250
|
+
];
|
|
251
|
+
/**
|
|
252
|
+
* The per-picture rates an unknown image model id is priced at: the dearest
|
|
253
|
+
* row, on both rates, for the reason `AI_FALLBACK_RATES` gives — an estimate
|
|
254
|
+
* that errs low is worse than one that errs high.
|
|
255
|
+
*/ export const AI_IMAGE_FALLBACK_RATES = {
|
|
256
|
+
providerUsdPerImage: Math.max(...AI_IMAGE_MODEL_CATALOG.map((row)=>row.providerUsdPerImage)),
|
|
257
|
+
billedUsdPerImage: Math.max(...AI_IMAGE_MODEL_CATALOG.map((row)=>row.billedUsdPerImage))
|
|
258
|
+
};
|
|
259
|
+
/** The image catalog row for a model id, or `undefined` for an unknown id. */ export function aiImageCatalogEntry(modelId) {
|
|
260
|
+
return AI_IMAGE_MODEL_CATALOG.find((entry)=>entry.id === modelId);
|
|
261
|
+
}
|
|
262
|
+
/** What the provider charges us for one picture from `modelId`. */ export function aiImageProviderUsdPerImage(modelId) {
|
|
263
|
+
var _aiImageCatalogEntry;
|
|
264
|
+
return ((_aiImageCatalogEntry = aiImageCatalogEntry(modelId)) != null ? _aiImageCatalogEntry : AI_IMAGE_FALLBACK_RATES).providerUsdPerImage;
|
|
265
|
+
}
|
|
266
|
+
/** What one picture from `modelId` draws from a customer's credits. */ export function aiImageBilledUsdPerImage(modelId) {
|
|
267
|
+
var _aiImageCatalogEntry;
|
|
268
|
+
return ((_aiImageCatalogEntry = aiImageCatalogEntry(modelId)) != null ? _aiImageCatalogEntry : AI_IMAGE_FALLBACK_RATES).billedUsdPerImage;
|
|
269
|
+
}
|
|
270
|
+
/** Pictures on a usage record: whole, finite, non-negative, else 0. */ function aiImageCount(usage) {
|
|
271
|
+
var _usage_images;
|
|
272
|
+
const value = Number((_usage_images = usage.images) != null ? _usage_images : 0);
|
|
273
|
+
return Number.isFinite(value) && value > 0 ? Math.floor(value) : 0;
|
|
274
|
+
}
|
|
275
|
+
function roundUsd(value) {
|
|
276
|
+
return Math.round(value * 1000000) / 1000000;
|
|
277
|
+
}
|
|
213
278
|
/** The dearest known tier, used when a model id is not in the catalog. */ export const AI_FALLBACK_RATES = aiRatesPerMTok(10, 50);
|
|
214
279
|
/**
|
|
215
280
|
* The minimum an unknown model id is assumed to have: the largest one the
|
|
@@ -229,7 +294,8 @@ const ZERO_RATES = aiRatesPerMTok(0, 0);
|
|
|
229
294
|
const isSentinel = (modelId)=>Object.values(AI_METER_SENTINELS).includes(modelId);
|
|
230
295
|
/**
|
|
231
296
|
* What the PROVIDER charges for a model id — our bill. A meter sentinel is
|
|
232
|
-
* free; an
|
|
297
|
+
* free; an image model's prompt and thinking are priced at its image row's
|
|
298
|
+
* token rates (AGL-3602); an unknown id is priced at the dearest tier.
|
|
233
299
|
*
|
|
234
300
|
* The figure every cost and margin surface prices usage at. Answering the
|
|
235
301
|
* customer's question from here would report a margin the platform does not
|
|
@@ -237,10 +303,10 @@ const isSentinel = (modelId)=>Object.values(AI_METER_SENTINELS).includes(modelId
|
|
|
237
303
|
* not pay; the two are separate functions so neither is reachable by
|
|
238
304
|
* forgetting which one was meant.
|
|
239
305
|
*/ export function aiProviderRatesForModel(modelId) {
|
|
240
|
-
var _ref;
|
|
241
|
-
var _aiCatalogEntry;
|
|
306
|
+
var _ref, _ref1;
|
|
307
|
+
var _aiCatalogEntry, _aiImageCatalogEntry;
|
|
242
308
|
if (isSentinel(modelId)) return ZERO_RATES;
|
|
243
|
-
return (_ref = (_aiCatalogEntry = aiCatalogEntry(modelId)) == null ? void 0 : _aiCatalogEntry.providerRates) != null ? _ref : AI_FALLBACK_RATES;
|
|
309
|
+
return (_ref = (_ref1 = (_aiCatalogEntry = aiCatalogEntry(modelId)) == null ? void 0 : _aiCatalogEntry.providerRates) != null ? _ref1 : (_aiImageCatalogEntry = aiImageCatalogEntry(modelId)) == null ? void 0 : _aiImageCatalogEntry.providerRates) != null ? _ref : AI_FALLBACK_RATES;
|
|
244
310
|
}
|
|
245
311
|
/**
|
|
246
312
|
* What a CUSTOMER'S CREDITS are charged at for a model id. A meter sentinel
|
|
@@ -249,10 +315,10 @@ const isSentinel = (modelId)=>Object.values(AI_METER_SENTINELS).includes(modelId
|
|
|
249
315
|
* The figure the credit meter, the band and the model selector price usage
|
|
250
316
|
* at. It is at or above `aiProviderRatesForModel` on every row.
|
|
251
317
|
*/ export function aiBilledRatesForModel(modelId) {
|
|
252
|
-
var _ref;
|
|
253
|
-
var _aiCatalogEntry;
|
|
318
|
+
var _ref, _ref1;
|
|
319
|
+
var _aiCatalogEntry, _aiImageCatalogEntry;
|
|
254
320
|
if (isSentinel(modelId)) return ZERO_RATES;
|
|
255
|
-
return (_ref = (_aiCatalogEntry = aiCatalogEntry(modelId)) == null ? void 0 : _aiCatalogEntry.billedRates) != null ? _ref : AI_FALLBACK_RATES;
|
|
321
|
+
return (_ref = (_ref1 = (_aiCatalogEntry = aiCatalogEntry(modelId)) == null ? void 0 : _aiCatalogEntry.billedRates) != null ? _ref1 : (_aiImageCatalogEntry = aiImageCatalogEntry(modelId)) == null ? void 0 : _aiImageCatalogEntry.billedRates) != null ? _ref : AI_FALLBACK_RATES;
|
|
256
322
|
}
|
|
257
323
|
function priceUsage(usage, rate) {
|
|
258
324
|
const raw = usage.inputTokens * rate.inputPerToken + usage.outputTokens * rate.outputPerToken + usage.cacheReadTokens * rate.cacheReadPerToken + usage.cacheWriteTokens * rate.cacheWritePerToken;
|
|
@@ -262,14 +328,14 @@ function priceUsage(usage, rate) {
|
|
|
262
328
|
* What one exchange COST US, at the serving model's provider rates, rounded
|
|
263
329
|
* to 6dp. Real money, and the only figure a margin may be taken against.
|
|
264
330
|
*/ export function estimateAiProviderCostUsd(usage, modelId) {
|
|
265
|
-
return priceUsage(usage, aiProviderRatesForModel(modelId));
|
|
331
|
+
return roundUsd(priceUsage(usage, aiProviderRatesForModel(modelId)) + aiImageCount(usage) * aiImageProviderUsdPerImage(modelId));
|
|
266
332
|
}
|
|
267
333
|
/**
|
|
268
334
|
* What one exchange DRAWS FROM A CUSTOMER, at the serving model's billed
|
|
269
335
|
* rates, rounded to 6dp — the figure `assistCreditsFromUsd` turns into
|
|
270
336
|
* credits. At or above `estimateAiProviderCostUsd` for the same exchange.
|
|
271
337
|
*/ export function estimateAiBilledUsd(usage, modelId) {
|
|
272
|
-
return priceUsage(usage, aiBilledRatesForModel(modelId));
|
|
338
|
+
return roundUsd(priceUsage(usage, aiBilledRatesForModel(modelId)) + aiImageCount(usage) * aiImageBilledUsdPerImage(modelId));
|
|
273
339
|
}
|
|
274
340
|
/** Every catalog id a provider serves. */ export function aiModelIdsForProvider(providerId) {
|
|
275
341
|
return AI_MODEL_CATALOG.filter((entry)=>entry.provider === providerId).map((entry)=>entry.id);
|
|
@@ -303,6 +369,11 @@ function priceUsage(usage, rate) {
|
|
|
303
369
|
// A layout or a page template is one structured tree held to every
|
|
304
370
|
// building rule; the fast tier re-asks more than it saves.
|
|
305
371
|
'job.layout': 'balanced',
|
|
372
|
+
// A site function or variable (AGL-3603): a small structured answer held
|
|
373
|
+
// to the evaluator's grammar, the names it may read and a first run, whose
|
|
374
|
+
// judgment is turning a description into conditions and arithmetic; the
|
|
375
|
+
// fast tier re-asks more than it saves.
|
|
376
|
+
'job.logic': 'balanced',
|
|
306
377
|
'job.template': 'balanced',
|
|
307
378
|
// A page section (AGL-2907) is held to the whole page's building rules on
|
|
308
379
|
// every pass, for the same reason.
|