@aglyn/plugins-ai 1.0.0-beta.143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +25 -0
- package/package.json +60 -0
- package/src/index.d.ts +21 -0
- package/src/index.js +22 -0
- package/src/index.js.map +1 -0
- package/src/lib/activity/ai-activity-actions.d.ts +106 -0
- package/src/lib/activity/ai-activity-actions.js +209 -0
- package/src/lib/activity/ai-activity-actions.js.map +1 -0
- package/src/lib/activity/ai-activity.d.ts +219 -0
- package/src/lib/activity/ai-activity.js +251 -0
- package/src/lib/activity/ai-activity.js.map +1 -0
- package/src/lib/billing/ai-overage-charge.d.ts +102 -0
- package/src/lib/billing/ai-overage-charge.js +258 -0
- package/src/lib/billing/ai-overage-charge.js.map +1 -0
- package/src/lib/billing/ai-overage-close.d.ts +62 -0
- package/src/lib/billing/ai-overage-close.js +129 -0
- package/src/lib/billing/ai-overage-close.js.map +1 -0
- package/src/lib/billing/ai-overage-cutover.d.ts +63 -0
- package/src/lib/billing/ai-overage-cutover.js +114 -0
- package/src/lib/billing/ai-overage-cutover.js.map +1 -0
- package/src/lib/billing/ai-overage-events.d.ts +77 -0
- package/src/lib/billing/ai-overage-events.js +174 -0
- package/src/lib/billing/ai-overage-events.js.map +1 -0
- package/src/lib/billing/ai-overage-gate.d.ts +147 -0
- package/src/lib/billing/ai-overage-gate.js +177 -0
- package/src/lib/billing/ai-overage-gate.js.map +1 -0
- package/src/lib/billing/ai-overage-ledger.d.ts +135 -0
- package/src/lib/billing/ai-overage-ledger.js +278 -0
- package/src/lib/billing/ai-overage-ledger.js.map +1 -0
- package/src/lib/billing/ai-overage-standing-writes.d.ts +110 -0
- package/src/lib/billing/ai-overage-standing-writes.js +205 -0
- package/src/lib/billing/ai-overage-standing-writes.js.map +1 -0
- package/src/lib/billing/ai-overage-standing.d.ts +168 -0
- package/src/lib/billing/ai-overage-standing.js +215 -0
- package/src/lib/billing/ai-overage-standing.js.map +1 -0
- package/src/lib/billing/ai-overage-trigger.d.ts +30 -0
- package/src/lib/billing/ai-overage-trigger.js +76 -0
- package/src/lib/billing/ai-overage-trigger.js.map +1 -0
- package/src/lib/components/ai-allotment-editor.component.d.ts +40 -0
- package/src/lib/components/ai-allotment-editor.component.js +213 -0
- package/src/lib/components/ai-allotment-editor.component.js.map +1 -0
- package/src/lib/components/ai-assist-actions-context.d.ts +13 -0
- package/src/lib/components/ai-assist-actions-context.js +21 -0
- package/src/lib/components/ai-assist-actions-context.js.map +1 -0
- package/src/lib/components/ai-assist-provider.component.d.ts +51 -0
- package/src/lib/components/ai-assist-provider.component.js +519 -0
- package/src/lib/components/ai-assist-provider.component.js.map +1 -0
- package/src/lib/components/ai-brief-dialog.component.d.ts +56 -0
- package/src/lib/components/ai-brief-dialog.component.js +319 -0
- package/src/lib/components/ai-brief-dialog.component.js.map +1 -0
- package/src/lib/components/ai-collaborator-permissions-column.component.d.ts +32 -0
- package/src/lib/components/ai-collaborator-permissions-column.component.js +132 -0
- package/src/lib/components/ai-collaborator-permissions-column.component.js.map +1 -0
- package/src/lib/components/ai-credits-card.component.d.ts +34 -0
- package/src/lib/components/ai-credits-card.component.js +131 -0
- package/src/lib/components/ai-credits-card.component.js.map +1 -0
- package/src/lib/components/ai-credits-columns.component.d.ts +56 -0
- package/src/lib/components/ai-credits-columns.component.js +118 -0
- package/src/lib/components/ai-credits-columns.component.js.map +1 -0
- package/src/lib/components/ai-crm-email-draft.component.d.ts +17 -0
- package/src/lib/components/ai-crm-email-draft.component.js +159 -0
- package/src/lib/components/ai-crm-email-draft.component.js.map +1 -0
- package/src/lib/components/ai-crm-import-mapping.component.d.ts +20 -0
- package/src/lib/components/ai-crm-import-mapping.component.js +167 -0
- package/src/lib/components/ai-crm-import-mapping.component.js.map +1 -0
- package/src/lib/components/ai-crm-record-card.component.d.ts +27 -0
- package/src/lib/components/ai-crm-record-card.component.js +263 -0
- package/src/lib/components/ai-crm-record-card.component.js.map +1 -0
- package/src/lib/components/ai-describe-automation.component.d.ts +31 -0
- package/src/lib/components/ai-describe-automation.component.js +226 -0
- package/src/lib/components/ai-describe-automation.component.js.map +1 -0
- package/src/lib/components/ai-describe-button.component.d.ts +39 -0
- package/src/lib/components/ai-describe-button.component.js +87 -0
- package/src/lib/components/ai-describe-button.component.js.map +1 -0
- package/src/lib/components/ai-describe-page.component.d.ts +26 -0
- package/src/lib/components/ai-describe-page.component.js +18 -0
- package/src/lib/components/ai-describe-page.component.js.map +1 -0
- package/src/lib/components/ai-experiment-cards.component.d.ts +75 -0
- package/src/lib/components/ai-experiment-cards.component.js +573 -0
- package/src/lib/components/ai-experiment-cards.component.js.map +1 -0
- package/src/lib/components/ai-explain-automation.component.d.ts +31 -0
- package/src/lib/components/ai-explain-automation.component.js +265 -0
- package/src/lib/components/ai-explain-automation.component.js.map +1 -0
- package/src/lib/components/ai-insight-dialog.component.d.ts +37 -0
- package/src/lib/components/ai-insight-dialog.component.js +441 -0
- package/src/lib/components/ai-insight-dialog.component.js.map +1 -0
- package/src/lib/components/ai-job-plan.component.d.ts +46 -0
- package/src/lib/components/ai-job-plan.component.js +192 -0
- package/src/lib/components/ai-job-plan.component.js.map +1 -0
- package/src/lib/components/ai-model-selector.component.d.ts +21 -0
- package/src/lib/components/ai-model-selector.component.js +109 -0
- package/src/lib/components/ai-model-selector.component.js.map +1 -0
- package/src/lib/components/ai-page-brief-dialog.component.d.ts +29 -0
- package/src/lib/components/ai-page-brief-dialog.component.js +27 -0
- package/src/lib/components/ai-page-brief-dialog.component.js.map +1 -0
- package/src/lib/components/ai-permissions-on-host.component.d.ts +55 -0
- package/src/lib/components/ai-permissions-on-host.component.js +91 -0
- package/src/lib/components/ai-permissions-on-host.component.js.map +1 -0
- package/src/lib/components/ai-product-copy-card.component.d.ts +25 -0
- package/src/lib/components/ai-product-copy-card.component.js +328 -0
- package/src/lib/components/ai-product-copy-card.component.js.map +1 -0
- package/src/lib/components/ai-product-import-option.component.d.ts +14 -0
- package/src/lib/components/ai-product-import-option.component.js +58 -0
- package/src/lib/components/ai-product-import-option.component.js.map +1 -0
- package/src/lib/components/ai-products-hub-card.component.d.ts +15 -0
- package/src/lib/components/ai-products-hub-card.component.js +418 -0
- package/src/lib/components/ai-products-hub-card.component.js.map +1 -0
- package/src/lib/components/ai-products-proposals.component.d.ts +19 -0
- package/src/lib/components/ai-products-proposals.component.js +547 -0
- package/src/lib/components/ai-products-proposals.component.js.map +1 -0
- package/src/lib/components/ai-save-as-component.component.d.ts +38 -0
- package/src/lib/components/ai-save-as-component.component.js +231 -0
- package/src/lib/components/ai-save-as-component.component.js.map +1 -0
- package/src/lib/components/ai-seo-audit-card.component.d.ts +9 -0
- package/src/lib/components/ai-seo-audit-card.component.js +620 -0
- package/src/lib/components/ai-seo-audit-card.component.js.map +1 -0
- package/src/lib/components/ai-seo-fields-card.component.d.ts +10 -0
- package/src/lib/components/ai-seo-fields-card.component.js +453 -0
- package/src/lib/components/ai-seo-fields-card.component.js.map +1 -0
- package/src/lib/components/ai-site-batch-card.component.d.ts +32 -0
- package/src/lib/components/ai-site-batch-card.component.js +531 -0
- package/src/lib/components/ai-site-batch-card.component.js.map +1 -0
- package/src/lib/components/ai-site-seo-start-card.component.d.ts +26 -0
- package/src/lib/components/ai-site-seo-start-card.component.js +178 -0
- package/src/lib/components/ai-site-seo-start-card.component.js.map +1 -0
- package/src/lib/components/ai-site-start-card.component.d.ts +19 -0
- package/src/lib/components/ai-site-start-card.component.js +348 -0
- package/src/lib/components/ai-site-start-card.component.js.map +1 -0
- package/src/lib/components/ai-template-collection-field.component.d.ts +32 -0
- package/src/lib/components/ai-template-collection-field.component.js +63 -0
- package/src/lib/components/ai-template-collection-field.component.js.map +1 -0
- package/src/lib/components/ai-theme-proposal-card.component.d.ts +6 -0
- package/src/lib/components/ai-theme-proposal-card.component.js +619 -0
- package/src/lib/components/ai-theme-proposal-card.component.js.map +1 -0
- package/src/lib/components/ai-usage-strip.component.d.ts +27 -0
- package/src/lib/components/ai-usage-strip.component.js +145 -0
- package/src/lib/components/ai-usage-strip.component.js.map +1 -0
- package/src/lib/components/assist-edit-canvas.d.ts +169 -0
- package/src/lib/components/assist-edit-canvas.js +636 -0
- package/src/lib/components/assist-edit-canvas.js.map +1 -0
- package/src/lib/components/assist-edit-card.component.d.ts +16 -0
- package/src/lib/components/assist-edit-card.component.js +181 -0
- package/src/lib/components/assist-edit-card.component.js.map +1 -0
- package/src/lib/components/assist-jobs-drawer.component.d.ts +72 -0
- package/src/lib/components/assist-jobs-drawer.component.js +626 -0
- package/src/lib/components/assist-jobs-drawer.component.js.map +1 -0
- package/src/lib/components/assist-panel.component.d.ts +136 -0
- package/src/lib/components/assist-panel.component.js +1099 -0
- package/src/lib/components/assist-panel.component.js.map +1 -0
- package/src/lib/components/assist-signals-page.component.d.ts +3 -0
- package/src/lib/components/assist-signals-page.component.js +1017 -0
- package/src/lib/components/assist-signals-page.component.js.map +1 -0
- package/src/lib/components/besigner-ai-controls.component.d.ts +29 -0
- package/src/lib/components/besigner-ai-controls.component.js +81 -0
- package/src/lib/components/besigner-ai-controls.component.js.map +1 -0
- package/src/lib/components/billing-ai-allotments.component.d.ts +36 -0
- package/src/lib/components/billing-ai-allotments.component.js +486 -0
- package/src/lib/components/billing-ai-allotments.component.js.map +1 -0
- package/src/lib/components/billing-ai-top-users.component.d.ts +44 -0
- package/src/lib/components/billing-ai-top-users.component.js +304 -0
- package/src/lib/components/billing-ai-top-users.component.js.map +1 -0
- package/src/lib/components/billing-assist-overage-card.component.d.ts +69 -0
- package/src/lib/components/billing-assist-overage-card.component.js +437 -0
- package/src/lib/components/billing-assist-overage-card.component.js.map +1 -0
- package/src/lib/components/host-ai-allotments.component.d.ts +40 -0
- package/src/lib/components/host-ai-allotments.component.js +239 -0
- package/src/lib/components/host-ai-allotments.component.js.map +1 -0
- package/src/lib/components/member-ai-allotment-card.component.d.ts +28 -0
- package/src/lib/components/member-ai-allotment-card.component.js +172 -0
- package/src/lib/components/member-ai-allotment-card.component.js.map +1 -0
- package/src/lib/components/member-ai-usage-card.component.d.ts +28 -0
- package/src/lib/components/member-ai-usage-card.component.js +240 -0
- package/src/lib/components/member-ai-usage-card.component.js.map +1 -0
- package/src/lib/components/staff-org-ai-card.component.d.ts +17 -0
- package/src/lib/components/staff-org-ai-card.component.js +739 -0
- package/src/lib/components/staff-org-ai-card.component.js.map +1 -0
- package/src/lib/components/staff-org-usage-ai-columns.component.d.ts +41 -0
- package/src/lib/components/staff-org-usage-ai-columns.component.js +65 -0
- package/src/lib/components/staff-org-usage-ai-columns.component.js.map +1 -0
- package/src/lib/components/staff-orgs-ai-spend-column.component.d.ts +28 -0
- package/src/lib/components/staff-orgs-ai-spend-column.component.js +89 -0
- package/src/lib/components/staff-orgs-ai-spend-column.component.js.map +1 -0
- package/src/lib/components/staff-user-ai-usage-card.component.d.ts +27 -0
- package/src/lib/components/staff-user-ai-usage-card.component.js +183 -0
- package/src/lib/components/staff-user-ai-usage-card.component.js.map +1 -0
- package/src/lib/components/use-ai-allotments.d.ts +49 -0
- package/src/lib/components/use-ai-allotments.js +171 -0
- package/src/lib/components/use-ai-allotments.js.map +1 -0
- package/src/lib/components/use-ai-crm-answer.d.ts +50 -0
- package/src/lib/components/use-ai-crm-answer.js +220 -0
- package/src/lib/components/use-ai-crm-answer.js.map +1 -0
- package/src/lib/components/use-ai-job-run.d.ts +51 -0
- package/src/lib/components/use-ai-job-run.js +176 -0
- package/src/lib/components/use-ai-job-run.js.map +1 -0
- package/src/lib/components/use-ai-model-choice.d.ts +47 -0
- package/src/lib/components/use-ai-model-choice.js +150 -0
- package/src/lib/components/use-ai-model-choice.js.map +1 -0
- package/src/lib/components/use-ai-products-jobs.d.ts +36 -0
- package/src/lib/components/use-ai-products-jobs.js +190 -0
- package/src/lib/components/use-ai-products-jobs.js.map +1 -0
- package/src/lib/components/use-ai-usage-meter.d.ts +11 -0
- package/src/lib/components/use-ai-usage-meter.js +96 -0
- package/src/lib/components/use-ai-usage-meter.js.map +1 -0
- package/src/lib/components/use-org-ai-usage.d.ts +42 -0
- package/src/lib/components/use-org-ai-usage.js +181 -0
- package/src/lib/components/use-org-ai-usage.js.map +1 -0
- package/src/lib/components/use-staff-orgs-ai-spend.d.ts +18 -0
- package/src/lib/components/use-staff-orgs-ai-spend.js +127 -0
- package/src/lib/components/use-staff-orgs-ai-spend.js.map +1 -0
- package/src/lib/constants.d.ts +24 -0
- package/src/lib/constants.js +23 -0
- package/src/lib/constants.js.map +1 -0
- package/src/lib/declarations.d.ts +48 -0
- package/src/lib/declarations.js +129 -0
- package/src/lib/declarations.js.map +1 -0
- package/src/lib/declarations.server.d.ts +35 -0
- package/src/lib/declarations.server.js +138 -0
- package/src/lib/declarations.server.js.map +1 -0
- package/src/lib/insights/ai-figure-readers.d.ts +90 -0
- package/src/lib/insights/ai-figure-readers.js +863 -0
- package/src/lib/insights/ai-figure-readers.js.map +1 -0
- package/src/lib/insights/ai-insight-digest.d.ts +165 -0
- package/src/lib/insights/ai-insight-digest.js +363 -0
- package/src/lib/insights/ai-insight-digest.js.map +1 -0
- package/src/lib/insights/ai-insight-readers.d.ts +71 -0
- package/src/lib/insights/ai-insight-readers.js +141 -0
- package/src/lib/insights/ai-insight-readers.js.map +1 -0
- package/src/lib/jobs/ai-crm-access.d.ts +61 -0
- package/src/lib/jobs/ai-crm-access.js +94 -0
- package/src/lib/jobs/ai-crm-access.js.map +1 -0
- package/src/lib/jobs/ai-email-bindings.d.ts +97 -0
- package/src/lib/jobs/ai-email-bindings.js +147 -0
- package/src/lib/jobs/ai-email-bindings.js.map +1 -0
- package/src/lib/jobs/ai-job-admission.d.ts +82 -0
- package/src/lib/jobs/ai-job-admission.js +45 -0
- package/src/lib/jobs/ai-job-admission.js.map +1 -0
- package/src/lib/jobs/ai-job-budget.d.ts +167 -0
- package/src/lib/jobs/ai-job-budget.js +161 -0
- package/src/lib/jobs/ai-job-budget.js.map +1 -0
- package/src/lib/jobs/ai-job-campaign-step.d.ts +108 -0
- package/src/lib/jobs/ai-job-campaign-step.js +340 -0
- package/src/lib/jobs/ai-job-campaign-step.js.map +1 -0
- package/src/lib/jobs/ai-job-component-checks.d.ts +74 -0
- package/src/lib/jobs/ai-job-component-checks.js +442 -0
- package/src/lib/jobs/ai-job-component-checks.js.map +1 -0
- package/src/lib/jobs/ai-job-component-step.d.ts +75 -0
- package/src/lib/jobs/ai-job-component-step.js +262 -0
- package/src/lib/jobs/ai-job-component-step.js.map +1 -0
- package/src/lib/jobs/ai-job-crm-step.d.ts +192 -0
- package/src/lib/jobs/ai-job-crm-step.js +734 -0
- package/src/lib/jobs/ai-job-crm-step.js.map +1 -0
- package/src/lib/jobs/ai-job-draft-ids.d.ts +62 -0
- package/src/lib/jobs/ai-job-draft-ids.js +132 -0
- package/src/lib/jobs/ai-job-draft-ids.js.map +1 -0
- package/src/lib/jobs/ai-job-drafts.d.ts +304 -0
- package/src/lib/jobs/ai-job-drafts.js +557 -0
- package/src/lib/jobs/ai-job-drafts.js.map +1 -0
- package/src/lib/jobs/ai-job-email-step.d.ts +195 -0
- package/src/lib/jobs/ai-job-email-step.js +547 -0
- package/src/lib/jobs/ai-job-email-step.js.map +1 -0
- package/src/lib/jobs/ai-job-experiment-step.d.ts +105 -0
- package/src/lib/jobs/ai-job-experiment-step.js +445 -0
- package/src/lib/jobs/ai-job-experiment-step.js.map +1 -0
- package/src/lib/jobs/ai-job-form-step.d.ts +250 -0
- package/src/lib/jobs/ai-job-form-step.js +634 -0
- package/src/lib/jobs/ai-job-form-step.js.map +1 -0
- package/src/lib/jobs/ai-job-generation.d.ts +114 -0
- package/src/lib/jobs/ai-job-generation.js +384 -0
- package/src/lib/jobs/ai-job-generation.js.map +1 -0
- package/src/lib/jobs/ai-job-insight-budget.d.ts +41 -0
- package/src/lib/jobs/ai-job-insight-budget.js +46 -0
- package/src/lib/jobs/ai-job-insight-budget.js.map +1 -0
- package/src/lib/jobs/ai-job-insight-step.d.ts +58 -0
- package/src/lib/jobs/ai-job-insight-step.js +350 -0
- package/src/lib/jobs/ai-job-insight-step.js.map +1 -0
- package/src/lib/jobs/ai-job-layout-step.d.ts +103 -0
- package/src/lib/jobs/ai-job-layout-step.js +340 -0
- package/src/lib/jobs/ai-job-layout-step.js.map +1 -0
- package/src/lib/jobs/ai-job-page-budget.d.ts +57 -0
- package/src/lib/jobs/ai-job-page-budget.js +60 -0
- package/src/lib/jobs/ai-job-page-budget.js.map +1 -0
- package/src/lib/jobs/ai-job-page-sections.d.ts +150 -0
- package/src/lib/jobs/ai-job-page-sections.js +450 -0
- package/src/lib/jobs/ai-job-page-sections.js.map +1 -0
- package/src/lib/jobs/ai-job-page-step.d.ts +198 -0
- package/src/lib/jobs/ai-job-page-step.js +667 -0
- package/src/lib/jobs/ai-job-page-step.js.map +1 -0
- package/src/lib/jobs/ai-job-plan-conformance.d.ts +107 -0
- package/src/lib/jobs/ai-job-plan-conformance.js +164 -0
- package/src/lib/jobs/ai-job-plan-conformance.js.map +1 -0
- package/src/lib/jobs/ai-job-plan-step.d.ts +196 -0
- package/src/lib/jobs/ai-job-plan-step.js +458 -0
- package/src/lib/jobs/ai-job-plan-step.js.map +1 -0
- package/src/lib/jobs/ai-job-plugin-drafts.d.ts +76 -0
- package/src/lib/jobs/ai-job-plugin-drafts.js +91 -0
- package/src/lib/jobs/ai-job-plugin-drafts.js.map +1 -0
- package/src/lib/jobs/ai-job-products-step.d.ts +106 -0
- package/src/lib/jobs/ai-job-products-step.js +436 -0
- package/src/lib/jobs/ai-job-products-step.js.map +1 -0
- package/src/lib/jobs/ai-job-seo-budget.d.ts +52 -0
- package/src/lib/jobs/ai-job-seo-budget.js +63 -0
- package/src/lib/jobs/ai-job-seo-budget.js.map +1 -0
- package/src/lib/jobs/ai-job-seo-step.d.ts +145 -0
- package/src/lib/jobs/ai-job-seo-step.js +809 -0
- package/src/lib/jobs/ai-job-seo-step.js.map +1 -0
- package/src/lib/jobs/ai-job-site-step.d.ts +252 -0
- package/src/lib/jobs/ai-job-site-step.js +538 -0
- package/src/lib/jobs/ai-job-site-step.js.map +1 -0
- package/src/lib/jobs/ai-job-template-step.d.ts +105 -0
- package/src/lib/jobs/ai-job-template-step.js +391 -0
- package/src/lib/jobs/ai-job-template-step.js.map +1 -0
- package/src/lib/jobs/ai-job-text-step.d.ts +125 -0
- package/src/lib/jobs/ai-job-text-step.js +128 -0
- package/src/lib/jobs/ai-job-text-step.js.map +1 -0
- package/src/lib/jobs/ai-job-theme-budget.d.ts +38 -0
- package/src/lib/jobs/ai-job-theme-budget.js +43 -0
- package/src/lib/jobs/ai-job-theme-budget.js.map +1 -0
- package/src/lib/jobs/ai-job-theme-step.d.ts +115 -0
- package/src/lib/jobs/ai-job-theme-step.js +337 -0
- package/src/lib/jobs/ai-job-theme-step.js.map +1 -0
- package/src/lib/jobs/ai-job-workflow-step.d.ts +139 -0
- package/src/lib/jobs/ai-job-workflow-step.js +530 -0
- package/src/lib/jobs/ai-job-workflow-step.js.map +1 -0
- package/src/lib/jobs/ai-jobs-beat.d.ts +78 -0
- package/src/lib/jobs/ai-jobs-beat.js +93 -0
- package/src/lib/jobs/ai-jobs-beat.js.map +1 -0
- package/src/lib/jobs/ai-jobs-pause.d.ts +38 -0
- package/src/lib/jobs/ai-jobs-pause.js +45 -0
- package/src/lib/jobs/ai-jobs-pause.js.map +1 -0
- package/src/lib/jobs/ai-jobs.d.ts +558 -0
- package/src/lib/jobs/ai-jobs.js +1410 -0
- package/src/lib/jobs/ai-jobs.js.map +1 -0
- package/src/lib/jobs/ai-media-asset-server.d.ts +34 -0
- package/src/lib/jobs/ai-media-asset-server.js +34 -0
- package/src/lib/jobs/ai-media-asset-server.js.map +1 -0
- package/src/lib/jobs/ai-media-asset.d.ts +59 -0
- package/src/lib/jobs/ai-media-asset.js +86 -0
- package/src/lib/jobs/ai-media-asset.js.map +1 -0
- package/src/lib/jobs/ai-product-image.d.ts +78 -0
- package/src/lib/jobs/ai-product-image.js +113 -0
- package/src/lib/jobs/ai-product-image.js.map +1 -0
- package/src/lib/jobs/ai-theme-brand-inputs.d.ts +125 -0
- package/src/lib/jobs/ai-theme-brand-inputs.js +378 -0
- package/src/lib/jobs/ai-theme-brand-inputs.js.map +1 -0
- package/src/lib/jobs/ai-theme-brand-server.d.ts +33 -0
- package/src/lib/jobs/ai-theme-brand-server.js +33 -0
- package/src/lib/jobs/ai-theme-brand-server.js.map +1 -0
- package/src/lib/jobs/ai-workflow-records.d.ts +84 -0
- package/src/lib/jobs/ai-workflow-records.js +158 -0
- package/src/lib/jobs/ai-workflow-records.js.map +1 -0
- package/src/lib/jobs/fixtures/ai-free-page-built-recording.d.ts +31 -0
- package/src/lib/jobs/fixtures/ai-free-page-built-recording.js +367 -0
- package/src/lib/jobs/fixtures/ai-free-page-built-recording.js.map +1 -0
- package/src/lib/jobs/fixtures/ai-free-page-recording.d.ts +69 -0
- package/src/lib/jobs/fixtures/ai-free-page-recording.js +442 -0
- package/src/lib/jobs/fixtures/ai-free-page-recording.js.map +1 -0
- package/src/lib/jobs/fixtures/ai-page-briefs.d.ts +146 -0
- package/src/lib/jobs/fixtures/ai-page-briefs.js +1850 -0
- package/src/lib/jobs/fixtures/ai-page-briefs.js.map +1 -0
- package/src/lib/model/ai-allotments.d.ts +208 -0
- package/src/lib/model/ai-allotments.js +269 -0
- package/src/lib/model/ai-allotments.js.map +1 -0
- package/src/lib/model/ai-automation-draft.d.ts +74 -0
- package/src/lib/model/ai-automation-draft.js +310 -0
- package/src/lib/model/ai-automation-draft.js.map +1 -0
- package/src/lib/model/ai-automation-outline.d.ts +50 -0
- package/src/lib/model/ai-automation-outline.js +262 -0
- package/src/lib/model/ai-automation-outline.js.map +1 -0
- package/src/lib/model/ai-build-plan.d.ts +197 -0
- package/src/lib/model/ai-build-plan.js +438 -0
- package/src/lib/model/ai-build-plan.js.map +1 -0
- package/src/lib/model/ai-crm.d.ts +237 -0
- package/src/lib/model/ai-crm.js +225 -0
- package/src/lib/model/ai-crm.js.map +1 -0
- package/src/lib/model/ai-experiment-proposal.d.ts +68 -0
- package/src/lib/model/ai-experiment-proposal.js +146 -0
- package/src/lib/model/ai-experiment-proposal.js.map +1 -0
- package/src/lib/model/ai-experiment.d.ts +309 -0
- package/src/lib/model/ai-experiment.js +395 -0
- package/src/lib/model/ai-experiment.js.map +1 -0
- package/src/lib/model/ai-insight.d.ts +178 -0
- package/src/lib/model/ai-insight.js +201 -0
- package/src/lib/model/ai-insight.js.map +1 -0
- package/src/lib/model/ai-jobs.types.d.ts +412 -0
- package/src/lib/model/ai-jobs.types.js +42 -0
- package/src/lib/model/ai-jobs.types.js.map +1 -0
- package/src/lib/model/ai-page-job.d.ts +92 -0
- package/src/lib/model/ai-page-job.js +159 -0
- package/src/lib/model/ai-page-job.js.map +1 -0
- package/src/lib/model/ai-permissions.d.ts +49 -0
- package/src/lib/model/ai-permissions.js +97 -0
- package/src/lib/model/ai-permissions.js.map +1 -0
- package/src/lib/model/ai-plan-capabilities.d.ts +139 -0
- package/src/lib/model/ai-plan-capabilities.js +149 -0
- package/src/lib/model/ai-plan-capabilities.js.map +1 -0
- package/src/lib/model/ai-products.d.ts +251 -0
- package/src/lib/model/ai-products.js +253 -0
- package/src/lib/model/ai-products.js.map +1 -0
- package/src/lib/model/ai-seo.d.ts +208 -0
- package/src/lib/model/ai-seo.js +150 -0
- package/src/lib/model/ai-seo.js.map +1 -0
- package/src/lib/model/ai-site-inventory.d.ts +164 -0
- package/src/lib/model/ai-site-inventory.js +145 -0
- package/src/lib/model/ai-site-inventory.js.map +1 -0
- package/src/lib/model/ai-site-job.d.ts +247 -0
- package/src/lib/model/ai-site-job.js +314 -0
- package/src/lib/model/ai-site-job.js.map +1 -0
- package/src/lib/model/ai-site-start-seo.d.ts +103 -0
- package/src/lib/model/ai-site-start-seo.js +154 -0
- package/src/lib/model/ai-site-start-seo.js.map +1 -0
- package/src/lib/model/ai-site-start.d.ts +122 -0
- package/src/lib/model/ai-site-start.js +159 -0
- package/src/lib/model/ai-site-start.js.map +1 -0
- package/src/lib/model/ai-site-switch.d.ts +56 -0
- package/src/lib/model/ai-site-switch.js +73 -0
- package/src/lib/model/ai-site-switch.js.map +1 -0
- package/src/lib/model/ai-storefront-claims.d.ts +70 -0
- package/src/lib/model/ai-storefront-claims.js +130 -0
- package/src/lib/model/ai-storefront-claims.js.map +1 -0
- package/src/lib/model/ai-template-subjects.d.ts +82 -0
- package/src/lib/model/ai-template-subjects.js +136 -0
- package/src/lib/model/ai-template-subjects.js.map +1 -0
- package/src/lib/model/ai-theme-proposal.d.ts +210 -0
- package/src/lib/model/ai-theme-proposal.js +506 -0
- package/src/lib/model/ai-theme-proposal.js.map +1 -0
- package/src/lib/model/ai-tokens.d.ts +96 -0
- package/src/lib/model/ai-tokens.js +117 -0
- package/src/lib/model/ai-tokens.js.map +1 -0
- package/src/lib/model/ai-usage-by-user.d.ts +120 -0
- package/src/lib/model/ai-usage-by-user.js +139 -0
- package/src/lib/model/ai-usage-by-user.js.map +1 -0
- package/src/lib/model/ai-workflow-job.d.ts +111 -0
- package/src/lib/model/ai-workflow-job.js +183 -0
- package/src/lib/model/ai-workflow-job.js.map +1 -0
- package/src/lib/model/assist-edit.d.ts +261 -0
- package/src/lib/model/assist-edit.js +175 -0
- package/src/lib/model/assist-edit.js.map +1 -0
- package/src/lib/plugin-config.d.ts +33 -0
- package/src/lib/plugin-config.js +118 -0
- package/src/lib/plugin-config.js.map +1 -0
- package/src/lib/plugin.d.ts +30 -0
- package/src/lib/plugin.js +525 -0
- package/src/lib/plugin.js.map +1 -0
- package/src/lib/providers/anthropic.d.ts +84 -0
- package/src/lib/providers/anthropic.js +432 -0
- package/src/lib/providers/anthropic.js.map +1 -0
- package/src/lib/providers/catalog.d.ts +197 -0
- package/src/lib/providers/catalog.js +312 -0
- package/src/lib/providers/catalog.js.map +1 -0
- package/src/lib/providers/contract.d.ts +464 -0
- package/src/lib/providers/contract.js +274 -0
- package/src/lib/providers/contract.js.map +1 -0
- package/src/lib/providers/model-choice.d.ts +119 -0
- package/src/lib/providers/model-choice.js +416 -0
- package/src/lib/providers/model-choice.js.map +1 -0
- package/src/lib/providers/openai-compatible.d.ts +58 -0
- package/src/lib/providers/openai-compatible.js +361 -0
- package/src/lib/providers/openai-compatible.js.map +1 -0
- package/src/lib/providers/registry.d.ts +49 -0
- package/src/lib/providers/registry.js +71 -0
- package/src/lib/providers/registry.js.map +1 -0
- package/src/lib/providers/routing.d.ts +98 -0
- package/src/lib/providers/routing.js +450 -0
- package/src/lib/providers/routing.js.map +1 -0
- package/src/lib/runtime/ai-abuse-guards.d.ts +113 -0
- package/src/lib/runtime/ai-abuse-guards.js +148 -0
- package/src/lib/runtime/ai-abuse-guards.js.map +1 -0
- package/src/lib/runtime/ai-component-bindings.d.ts +67 -0
- package/src/lib/runtime/ai-component-bindings.js +106 -0
- package/src/lib/runtime/ai-component-bindings.js.map +1 -0
- package/src/lib/runtime/ai-device-audit.d.ts +109 -0
- package/src/lib/runtime/ai-device-audit.js +97 -0
- package/src/lib/runtime/ai-device-audit.js.map +1 -0
- package/src/lib/runtime/ai-doctrine-validators.d.ts +720 -0
- package/src/lib/runtime/ai-doctrine-validators.js +3133 -0
- package/src/lib/runtime/ai-doctrine-validators.js.map +1 -0
- package/src/lib/runtime/ai-doctrine.d.ts +372 -0
- package/src/lib/runtime/ai-doctrine.js +944 -0
- package/src/lib/runtime/ai-doctrine.js.map +1 -0
- package/src/lib/runtime/ai-eval-live.d.ts +321 -0
- package/src/lib/runtime/ai-eval-live.js +1257 -0
- package/src/lib/runtime/ai-eval-live.js.map +1 -0
- package/src/lib/runtime/ai-eval-memory-firestore.d.ts +51 -0
- package/src/lib/runtime/ai-eval-memory-firestore.js +183 -0
- package/src/lib/runtime/ai-eval-memory-firestore.js.map +1 -0
- package/src/lib/runtime/ai-eval.d.ts +441 -0
- package/src/lib/runtime/ai-eval.js +1151 -0
- package/src/lib/runtime/ai-eval.js.map +1 -0
- package/src/lib/runtime/ai-gate.d.ts +130 -0
- package/src/lib/runtime/ai-gate.js +272 -0
- package/src/lib/runtime/ai-gate.js.map +1 -0
- package/src/lib/runtime/ai-generation-bounds.d.ts +24 -0
- package/src/lib/runtime/ai-generation-bounds.js +23 -0
- package/src/lib/runtime/ai-generation-bounds.js.map +1 -0
- package/src/lib/runtime/ai-insight-check.d.ts +76 -0
- package/src/lib/runtime/ai-insight-check.js +281 -0
- package/src/lib/runtime/ai-insight-check.js.map +1 -0
- package/src/lib/runtime/ai-node-tree.d.ts +181 -0
- package/src/lib/runtime/ai-node-tree.js +931 -0
- package/src/lib/runtime/ai-node-tree.js.map +1 -0
- package/src/lib/runtime/ai-page-links.d.ts +79 -0
- package/src/lib/runtime/ai-page-links.js +135 -0
- package/src/lib/runtime/ai-page-links.js.map +1 -0
- package/src/lib/runtime/ai-palette.d.ts +252 -0
- package/src/lib/runtime/ai-palette.generated.d.ts +34 -0
- package/src/lib/runtime/ai-palette.generated.js +5263 -0
- package/src/lib/runtime/ai-palette.generated.js.map +1 -0
- package/src/lib/runtime/ai-palette.js +187 -0
- package/src/lib/runtime/ai-palette.js.map +1 -0
- package/src/lib/runtime/ai-products-generation.d.ts +107 -0
- package/src/lib/runtime/ai-products-generation.js +250 -0
- package/src/lib/runtime/ai-products-generation.js.map +1 -0
- package/src/lib/runtime/ai-repeated-items.d.ts +95 -0
- package/src/lib/runtime/ai-repeated-items.js +397 -0
- package/src/lib/runtime/ai-repeated-items.js.map +1 -0
- package/src/lib/runtime/ai-runtime.d.ts +148 -0
- package/src/lib/runtime/ai-runtime.js +237 -0
- package/src/lib/runtime/ai-runtime.js.map +1 -0
- package/src/lib/runtime/ai-template-examples.d.ts +71 -0
- package/src/lib/runtime/ai-template-examples.js +135 -0
- package/src/lib/runtime/ai-template-examples.js.map +1 -0
- package/src/lib/runtime/assist-answer-cache.d.ts +80 -0
- package/src/lib/runtime/assist-answer-cache.js +184 -0
- package/src/lib/runtime/assist-answer-cache.js.map +1 -0
- package/src/lib/runtime/seo-audit.d.ts +93 -0
- package/src/lib/runtime/seo-audit.js +260 -0
- package/src/lib/runtime/seo-audit.js.map +1 -0
- package/src/lib/runtime/seo-content-fixes.d.ts +41 -0
- package/src/lib/runtime/seo-content-fixes.js +168 -0
- package/src/lib/runtime/seo-content-fixes.js.map +1 -0
- package/src/lib/runtime/seo-fields.d.ts +152 -0
- package/src/lib/runtime/seo-fields.js +215 -0
- package/src/lib/runtime/seo-fields.js.map +1 -0
- package/src/lib/runtime/seo-page-facts.d.ts +61 -0
- package/src/lib/runtime/seo-page-facts.js +150 -0
- package/src/lib/runtime/seo-page-facts.js.map +1 -0
- package/src/lib/runtime/site-inventory.d.ts +63 -0
- package/src/lib/runtime/site-inventory.js +230 -0
- package/src/lib/runtime/site-inventory.js.map +1 -0
- package/src/lib/server/ai-admin-org.d.ts +33 -0
- package/src/lib/server/ai-admin-org.js +381 -0
- package/src/lib/server/ai-admin-org.js.map +1 -0
- package/src/lib/server/ai-admin-orgs-spend.d.ts +40 -0
- package/src/lib/server/ai-admin-orgs-spend.js +129 -0
- package/src/lib/server/ai-admin-orgs-spend.js.map +1 -0
- package/src/lib/server/ai-admin-overage.d.ts +19 -0
- package/src/lib/server/ai-admin-overage.js +246 -0
- package/src/lib/server/ai-admin-overage.js.map +1 -0
- package/src/lib/server/ai-admin-signals.d.ts +34 -0
- package/src/lib/server/ai-admin-signals.js +330 -0
- package/src/lib/server/ai-admin-signals.js.map +1 -0
- package/src/lib/server/ai-admin-user.d.ts +27 -0
- package/src/lib/server/ai-admin-user.js +128 -0
- package/src/lib/server/ai-admin-user.js.map +1 -0
- package/src/lib/server/ai-allotments.d.ts +27 -0
- package/src/lib/server/ai-allotments.js +544 -0
- package/src/lib/server/ai-allotments.js.map +1 -0
- package/src/lib/server/ai-assist-prompts.d.ts +102 -0
- package/src/lib/server/ai-assist-prompts.js +207 -0
- package/src/lib/server/ai-assist-prompts.js.map +1 -0
- package/src/lib/server/ai-assist.d.ts +119 -0
- package/src/lib/server/ai-assist.js +517 -0
- package/src/lib/server/ai-assist.js.map +1 -0
- package/src/lib/server/ai-crm-answer.d.ts +30 -0
- package/src/lib/server/ai-crm-answer.js +98 -0
- package/src/lib/server/ai-crm-answer.js.map +1 -0
- package/src/lib/server/ai-generate-component.d.ts +111 -0
- package/src/lib/server/ai-generate-component.js +643 -0
- package/src/lib/server/ai-generate-component.js.map +1 -0
- package/src/lib/server/ai-host-permissions.d.ts +46 -0
- package/src/lib/server/ai-host-permissions.js +204 -0
- package/src/lib/server/ai-host-permissions.js.map +1 -0
- package/src/lib/server/ai-insight-answer.d.ts +30 -0
- package/src/lib/server/ai-insight-answer.js +83 -0
- package/src/lib/server/ai-insight-answer.js.map +1 -0
- package/src/lib/server/ai-insight-digest-route.d.ts +30 -0
- package/src/lib/server/ai-insight-digest-route.js +156 -0
- package/src/lib/server/ai-insight-digest-route.js.map +1 -0
- package/src/lib/server/ai-jobs-batch.d.ts +48 -0
- package/src/lib/server/ai-jobs-batch.js +306 -0
- package/src/lib/server/ai-jobs-batch.js.map +1 -0
- package/src/lib/server/ai-jobs-beat-route.d.ts +36 -0
- package/src/lib/server/ai-jobs-beat-route.js +86 -0
- package/src/lib/server/ai-jobs-beat-route.js.map +1 -0
- package/src/lib/server/ai-jobs-cancel.d.ts +30 -0
- package/src/lib/server/ai-jobs-cancel.js +74 -0
- package/src/lib/server/ai-jobs-cancel.js.map +1 -0
- package/src/lib/server/ai-jobs-events-route.d.ts +31 -0
- package/src/lib/server/ai-jobs-events-route.js +51 -0
- package/src/lib/server/ai-jobs-events-route.js.map +1 -0
- package/src/lib/server/ai-jobs-events.d.ts +55 -0
- package/src/lib/server/ai-jobs-events.js +144 -0
- package/src/lib/server/ai-jobs-events.js.map +1 -0
- package/src/lib/server/ai-jobs-gate.d.ts +47 -0
- package/src/lib/server/ai-jobs-gate.js +106 -0
- package/src/lib/server/ai-jobs-gate.js.map +1 -0
- package/src/lib/server/ai-jobs-resume.d.ts +23 -0
- package/src/lib/server/ai-jobs-resume.js +209 -0
- package/src/lib/server/ai-jobs-resume.js.map +1 -0
- package/src/lib/server/ai-jobs-route.d.ts +32 -0
- package/src/lib/server/ai-jobs-route.js +307 -0
- package/src/lib/server/ai-jobs-route.js.map +1 -0
- package/src/lib/server/ai-models.d.ts +18 -0
- package/src/lib/server/ai-models.js +134 -0
- package/src/lib/server/ai-models.js.map +1 -0
- package/src/lib/server/ai-seo-apply.d.ts +53 -0
- package/src/lib/server/ai-seo-apply.js +294 -0
- package/src/lib/server/ai-seo-apply.js.map +1 -0
- package/src/lib/server/ai-usage.d.ts +18 -0
- package/src/lib/server/ai-usage.js +220 -0
- package/src/lib/server/ai-usage.js.map +1 -0
- package/src/lib/server/assist-chat.d.ts +234 -0
- package/src/lib/server/assist-chat.js +1446 -0
- package/src/lib/server/assist-chat.js.map +1 -0
- package/src/lib/server/assist-edit-applied.d.ts +22 -0
- package/src/lib/server/assist-edit-applied.js +239 -0
- package/src/lib/server/assist-edit-applied.js.map +1 -0
- package/src/lib/server/assist-edit.d.ts +124 -0
- package/src/lib/server/assist-edit.js +1000 -0
- package/src/lib/server/assist-edit.js.map +1 -0
- package/src/lib/server/assist-feedback.d.ts +31 -0
- package/src/lib/server/assist-feedback.js +115 -0
- package/src/lib/server/assist-feedback.js.map +1 -0
- package/src/lib/server/assist-view-context.d.ts +343 -0
- package/src/lib/server/assist-view-context.js +690 -0
- package/src/lib/server/assist-view-context.js.map +1 -0
- package/src/lib/server/billing-credits.d.ts +59 -0
- package/src/lib/server/billing-credits.js +146 -0
- package/src/lib/server/billing-credits.js.map +1 -0
- package/src/lib/server/billing-overage.d.ts +19 -0
- package/src/lib/server/billing-overage.js +337 -0
- package/src/lib/server/billing-overage.js.map +1 -0
- package/src/lib/server.d.ts +32 -0
- package/src/lib/server.js +265 -0
- package/src/lib/server.js.map +1 -0
- package/src/lib/subprocessors.d.ts +18 -0
- package/src/lib/subprocessors.js +52 -0
- package/src/lib/subprocessors.js.map +1 -0
- package/src/lib/tools/ai-component-tool.d.ts +99 -0
- package/src/lib/tools/ai-component-tool.js +369 -0
- package/src/lib/tools/ai-component-tool.js.map +1 -0
- package/src/lib/tools/ai-crm-tool.d.ts +106 -0
- package/src/lib/tools/ai-crm-tool.js +488 -0
- package/src/lib/tools/ai-crm-tool.js.map +1 -0
- package/src/lib/tools/ai-duplicate-resource-tool.d.ts +71 -0
- package/src/lib/tools/ai-duplicate-resource-tool.js +164 -0
- package/src/lib/tools/ai-duplicate-resource-tool.js.map +1 -0
- package/src/lib/tools/ai-experiment-tool.d.ts +40 -0
- package/src/lib/tools/ai-experiment-tool.js +155 -0
- package/src/lib/tools/ai-experiment-tool.js.map +1 -0
- package/src/lib/tools/ai-insight-tool.d.ts +46 -0
- package/src/lib/tools/ai-insight-tool.js +200 -0
- package/src/lib/tools/ai-insight-tool.js.map +1 -0
- package/src/lib/tools/ai-inventory-lookup-tool.d.ts +86 -0
- package/src/lib/tools/ai-inventory-lookup-tool.js +164 -0
- package/src/lib/tools/ai-inventory-lookup-tool.js.map +1 -0
- package/src/lib/tools/ai-products-tool.d.ts +65 -0
- package/src/lib/tools/ai-products-tool.js +644 -0
- package/src/lib/tools/ai-products-tool.js.map +1 -0
- package/src/lib/tools/ai-seo-tool.d.ts +162 -0
- package/src/lib/tools/ai-seo-tool.js +546 -0
- package/src/lib/tools/ai-seo-tool.js.map +1 -0
- package/src/lib/tools/ai-theme-tool.d.ts +101 -0
- package/src/lib/tools/ai-theme-tool.js +562 -0
- package/src/lib/tools/ai-theme-tool.js.map +1 -0
- package/src/lib/tools/ai-workflow-tool.d.ts +166 -0
- package/src/lib/tools/ai-workflow-tool.js +860 -0
- package/src/lib/tools/ai-workflow-tool.js.map +1 -0
- package/src/lib/usage/ai-allotment-alerts.d.ts +72 -0
- package/src/lib/usage/ai-allotment-alerts.js +157 -0
- package/src/lib/usage/ai-allotment-alerts.js.map +1 -0
- package/src/lib/usage/ai-allotments.d.ts +125 -0
- package/src/lib/usage/ai-allotments.js +239 -0
- package/src/lib/usage/ai-allotments.js.map +1 -0
- package/src/lib/usage/ai-model-sample.d.ts +36 -0
- package/src/lib/usage/ai-model-sample.js +68 -0
- package/src/lib/usage/ai-model-sample.js.map +1 -0
- package/src/lib/usage/ai-usage-alerts.d.ts +55 -0
- package/src/lib/usage/ai-usage-alerts.js +114 -0
- package/src/lib/usage/ai-usage-alerts.js.map +1 -0
- package/src/lib/usage/ai-usage-by-user.d.ts +161 -0
- package/src/lib/usage/ai-usage-by-user.js +211 -0
- package/src/lib/usage/ai-usage-by-user.js.map +1 -0
- package/src/lib/usage/ai-usage-eraser.d.ts +29 -0
- package/src/lib/usage/ai-usage-eraser.js +40 -0
- package/src/lib/usage/ai-usage-eraser.js.map +1 -0
- package/src/lib/usage/ai-usage-meter.d.ts +39 -0
- package/src/lib/usage/ai-usage-meter.js +85 -0
- package/src/lib/usage/ai-usage-meter.js.map +1 -0
- package/src/lib/usage/ai-usage-wire.d.ts +184 -0
- package/src/lib/usage/ai-usage-wire.js +98 -0
- package/src/lib/usage/ai-usage-wire.js.map +1 -0
- package/src/lib/usage/assist-ceiling.d.ts +87 -0
- package/src/lib/usage/assist-ceiling.js +110 -0
- package/src/lib/usage/assist-ceiling.js.map +1 -0
- package/src/lib/usage/assist-free-taste.d.ts +225 -0
- package/src/lib/usage/assist-free-taste.js +308 -0
- package/src/lib/usage/assist-free-taste.js.map +1 -0
- package/src/lib/usage/assist-refusals.d.ts +69 -0
- package/src/lib/usage/assist-refusals.js +79 -0
- package/src/lib/usage/assist-refusals.js.map +1 -0
- package/src/lib/usage/assist-signal-mining.d.ts +375 -0
- package/src/lib/usage/assist-signal-mining.js +344 -0
- package/src/lib/usage/assist-signal-mining.js.map +1 -0
- package/src/lib/usage/assist-usage.d.ts +571 -0
- package/src/lib/usage/assist-usage.js +978 -0
- package/src/lib/usage/assist-usage.js.map +1 -0
- package/src/lib/usage/staff-org-ai.d.ts +242 -0
- package/src/lib/usage/staff-org-ai.js +173 -0
- package/src/lib/usage/staff-org-ai.js.map +1 -0
- package/src/lib/usage/staff-org-usage-ai.d.ts +83 -0
- package/src/lib/usage/staff-org-usage-ai.js +59 -0
- package/src/lib/usage/staff-org-usage-ai.js.map +1 -0
- package/src/lib/usage/staff-orgs-ai-spend.d.ts +83 -0
- package/src/lib/usage/staff-orgs-ai-spend.js +114 -0
- package/src/lib/usage/staff-orgs-ai-spend.js.map +1 -0
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import { registerPluginApiRoute } from "@aglyn/aglyn/server";
|
|
17
|
+
import { registerAiDeclarations } from "./declarations.js";
|
|
18
|
+
import { AI_JOBS_BEAT_PATH } from "./jobs/ai-jobs-beat.js";
|
|
19
|
+
import { registerAiJobPlan } from "./jobs/ai-job-plan-step.js";
|
|
20
|
+
import { registerAiJobsPause } from "./jobs/ai-jobs-pause.js";
|
|
21
|
+
import { registerAiComponentJob } from "./jobs/ai-job-component-step.js";
|
|
22
|
+
import { registerAiCrmJob } from "./jobs/ai-job-crm-step.js";
|
|
23
|
+
import { registerAiLayoutJob } from "./jobs/ai-job-layout-step.js";
|
|
24
|
+
import { registerAiTemplateJob } from "./jobs/ai-job-template-step.js";
|
|
25
|
+
import { registerAiExperimentJob } from "./jobs/ai-job-experiment-step.js";
|
|
26
|
+
import { registerAiFormJob } from "./jobs/ai-job-form-step.js";
|
|
27
|
+
import { registerAiPageJob } from "./jobs/ai-job-page-step.js";
|
|
28
|
+
import { registerAiProductsJob } from "./jobs/ai-job-products-step.js";
|
|
29
|
+
import { registerAiEmailJob } from "./jobs/ai-job-email-step.js";
|
|
30
|
+
import { registerAiCampaignJob } from "./jobs/ai-job-campaign-step.js";
|
|
31
|
+
import { registerAiSiteJob } from "./jobs/ai-job-site-step.js";
|
|
32
|
+
import { registerAiWorkflowJob } from "./jobs/ai-job-workflow-step.js";
|
|
33
|
+
import { registerAiInsightJob } from "./jobs/ai-job-insight-step.js";
|
|
34
|
+
import { registerAiFigureReaders } from "./insights/ai-figure-readers.js";
|
|
35
|
+
import { firebaseAdmin } from "@aglyn/tenant-data-admin/server/firebase-admin";
|
|
36
|
+
import { ensureFirstPartyAiProviders } from "./providers/registry.js";
|
|
37
|
+
import { aiAssistHandler } from "./server/ai-assist.js";
|
|
38
|
+
import { GET as aiCrmAnswer } from "./server/ai-crm-answer.js";
|
|
39
|
+
import { POST as runAiJobsBeat } from "./server/ai-jobs-beat-route.js";
|
|
40
|
+
import { POST as cancelAiJob } from "./server/ai-jobs-cancel.js";
|
|
41
|
+
import { GET as aiJobEvents } from "./server/ai-jobs-events-route.js";
|
|
42
|
+
import { POST as createAiSiteBatch } from "./server/ai-jobs-batch.js";
|
|
43
|
+
import { GET as listAiJobs, POST as createAiJob } from "./server/ai-jobs-route.js";
|
|
44
|
+
import { POST as resumeAiJob } from "./server/ai-jobs-resume.js";
|
|
45
|
+
import { POST as aiGenerateComponent } from "./server/ai-generate-component.js";
|
|
46
|
+
import { POST as applyAiSeoAudit } from "./server/ai-seo-apply.js";
|
|
47
|
+
import { POST as assistChat } from "./server/assist-chat.js";
|
|
48
|
+
import { POST as assistEditApplied } from "./server/assist-edit-applied.js";
|
|
49
|
+
import { POST as assistFeedback } from "./server/assist-feedback.js";
|
|
50
|
+
import { PATCH as aiHostPermissions } from "./server/ai-host-permissions.js";
|
|
51
|
+
import { GET as aiAdminOrg } from "./server/ai-admin-org.js";
|
|
52
|
+
import { GET as aiAdminOrgsSpend } from "./server/ai-admin-orgs-spend.js";
|
|
53
|
+
import { GET as aiAdminSignals } from "./server/ai-admin-signals.js";
|
|
54
|
+
import { GET as aiAdminUser } from "./server/ai-admin-user.js";
|
|
55
|
+
import { POST as aiAdminOverage } from "./server/ai-admin-overage.js";
|
|
56
|
+
import { GET as aiUsage } from "./server/ai-usage.js";
|
|
57
|
+
import { GET as aiAllotments } from "./server/ai-allotments.js";
|
|
58
|
+
import { GET as aiInsightAnswer } from "./server/ai-insight-answer.js";
|
|
59
|
+
import { POST as runAiInsightsDigest } from "./server/ai-insight-digest-route.js";
|
|
60
|
+
import { AI_INSIGHTS_DIGEST_PATH } from "./insights/ai-insight-digest.js";
|
|
61
|
+
import { GET as aiModels } from "./server/ai-models.js";
|
|
62
|
+
import { GET as billingCredits } from "./server/billing-credits.js";
|
|
63
|
+
import { POST as billingOverage } from "./server/billing-overage.js";
|
|
64
|
+
export * from "./providers/contract.js";
|
|
65
|
+
export * from "./providers/catalog.js";
|
|
66
|
+
export * from "./providers/registry.js";
|
|
67
|
+
export * from "./providers/routing.js";
|
|
68
|
+
export * from "./runtime/ai-runtime.js";
|
|
69
|
+
/**
|
|
70
|
+
* The two first-party adapters, registered once per process. A marketplace
|
|
71
|
+
* plugin registers its own against `AI_PROVIDER_CONTRACT` from its own
|
|
72
|
+
* entry and never touches this.
|
|
73
|
+
*/ const registerFirstPartyProviders = ensureFirstPartyAiProviders;
|
|
74
|
+
/**
|
|
75
|
+
* Every job kind this plugin runs beyond the three the machine registers
|
|
76
|
+
* itself (AGL-3025). Each is a CALL, never an import made for what the
|
|
77
|
+
* module does as it loads: this package declares only this file
|
|
78
|
+
* effect-ful, so a bundler honoring `sideEffects` deletes an import whose
|
|
79
|
+
* exports go unused — and a step registered that way ran in every spec and
|
|
80
|
+
* in neither app. `registrations-survive-a-bundler.spec.ts` holds this.
|
|
81
|
+
*
|
|
82
|
+
* The console surface is the only caller (AGL-3026): its doors run a job's
|
|
83
|
+
* first step inline, and its beat runs every step after it. The tenant app
|
|
84
|
+
* loads no server surface of this plugin at all, so nothing that serves a
|
|
85
|
+
* published site can reach a provider.
|
|
86
|
+
*/ function registerAiJobKinds() {
|
|
87
|
+
// The workspace AI pause the machine asks before it claims any step, so a
|
|
88
|
+
// paused workspace's queued jobs spend nothing (AGL-3037).
|
|
89
|
+
registerAiJobsPause();
|
|
90
|
+
// The plan step every planned kind runs first (AGL-2935).
|
|
91
|
+
registerAiJobPlan();
|
|
92
|
+
// Components, layouts and templates (AGL-2908, AGL-2909).
|
|
93
|
+
registerAiComponentJob();
|
|
94
|
+
registerAiLayoutJob();
|
|
95
|
+
registerAiTemplateJob();
|
|
96
|
+
// Forms (AGL-2913).
|
|
97
|
+
registerAiExperimentJob();
|
|
98
|
+
registerAiFormJob();
|
|
99
|
+
// Pages, with the least time one pass needs (AGL-2907).
|
|
100
|
+
registerAiPageJob();
|
|
101
|
+
// Email designs and campaigns, whose drafts the email and marketing
|
|
102
|
+
// plugins write on the resource-draft seam (AGL-2912).
|
|
103
|
+
registerAiEmailJob();
|
|
104
|
+
registerAiCampaignJob();
|
|
105
|
+
// Automations drafted from a description, and explained, whose drafts the
|
|
106
|
+
// workflows plugin writes on the resource-draft seam (AGL-2919).
|
|
107
|
+
registerAiWorkflowJob();
|
|
108
|
+
// Product copy, and a store's products, categories and discounts from a
|
|
109
|
+
// brief, as proposals the commerce plugin's surfaces apply (AGL-2916).
|
|
110
|
+
registerAiProductsJob();
|
|
111
|
+
// The site scaffold, which builds a whole site through the steps above
|
|
112
|
+
// (AGL-2911).
|
|
113
|
+
registerAiSiteJob();
|
|
114
|
+
// Insights (AGL-2915): a question about a site's figures, answered from
|
|
115
|
+
// tables the figure readers return, and the weekly digest. The readers for
|
|
116
|
+
// the platform's own records — page views, forms, datasets — are this
|
|
117
|
+
// plugin's; every other plugin registers its own from its console surface.
|
|
118
|
+
registerAiFigureReaders(()=>firebaseAdmin.app().firestore());
|
|
119
|
+
registerAiInsightJob();
|
|
120
|
+
// CRM by AI (AGL-2917): a record's summary and next step, an email draft
|
|
121
|
+
// and an import's column matches, read through the CRM's facts readers.
|
|
122
|
+
registerAiCrmJob();
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The console-side API (AGL-2939): every AI door, under the `ai` and
|
|
126
|
+
* `assist` prefixes the plugin owns. The URLs the panel and the besigner
|
|
127
|
+
* call are unchanged — `/api/assist/chat`, `/api/ai/assist`,
|
|
128
|
+
* `/api/ai/jobs` — because the dispatcher serves them from the registry
|
|
129
|
+
* exactly where the named routes used to; the two billing doors and the
|
|
130
|
+
* per-member usage read (`ai/usage`) live under the plugin's own prefix.
|
|
131
|
+
* The jobs beat is the one path outside them, for the reason
|
|
132
|
+
* `AI_JOBS_BEAT_PATH` gives.
|
|
133
|
+
*/ export function registerAiConsoleApi() {
|
|
134
|
+
registerAiDeclarations();
|
|
135
|
+
registerFirstPartyProviders();
|
|
136
|
+
registerAiJobKinds();
|
|
137
|
+
registerPluginApiRoute('assist/chat', {
|
|
138
|
+
web: assistChat
|
|
139
|
+
});
|
|
140
|
+
registerPluginApiRoute('assist/feedback', {
|
|
141
|
+
web: assistFeedback
|
|
142
|
+
});
|
|
143
|
+
// The applied-edit record (AGL-2906): counts of a proposal the author
|
|
144
|
+
// applied in their editor, written to the site's activity log.
|
|
145
|
+
registerPluginApiRoute('assist/edit-applied', {
|
|
146
|
+
web: assistEditApplied
|
|
147
|
+
});
|
|
148
|
+
// A collaborator's AI toggles on one site (AGL-2927), set from the site's
|
|
149
|
+
// collaborators card through this plugin's column there.
|
|
150
|
+
registerPluginApiRoute('ai/host-permissions', {
|
|
151
|
+
web: aiHostPermissions
|
|
152
|
+
});
|
|
153
|
+
registerPluginApiRoute('ai/assist', aiAssistHandler);
|
|
154
|
+
registerPluginApiRoute('ai/jobs', {
|
|
155
|
+
web: (request)=>request.method === 'GET' ? listAiJobs(request) : createAiJob(request)
|
|
156
|
+
});
|
|
157
|
+
// The agency batch (AGL-2911): one brief, one `site` job per named site,
|
|
158
|
+
// under one batch id. Before the `:jobId` routes, which it is not one of.
|
|
159
|
+
registerPluginApiRoute('ai/jobs/batch', {
|
|
160
|
+
web: createAiSiteBatch
|
|
161
|
+
});
|
|
162
|
+
registerPluginApiRoute('ai/jobs/:jobId/cancel', {
|
|
163
|
+
web: (request, context)=>cancelAiJob(request, {
|
|
164
|
+
params: Promise.resolve({
|
|
165
|
+
jobId: String(context.params['jobId'])
|
|
166
|
+
})
|
|
167
|
+
})
|
|
168
|
+
});
|
|
169
|
+
registerPluginApiRoute('ai/jobs/:jobId/resume', {
|
|
170
|
+
web: (request, context)=>resumeAiJob(request, {
|
|
171
|
+
params: Promise.resolve({
|
|
172
|
+
jobId: String(context.params['jobId'])
|
|
173
|
+
})
|
|
174
|
+
})
|
|
175
|
+
});
|
|
176
|
+
// An insight job's answer (AGL-2915), which is kept off the job document
|
|
177
|
+
// and served only to the member who asked, or for a digest to the site's
|
|
178
|
+
// members.
|
|
179
|
+
registerPluginApiRoute('ai/insights/:jobId', {
|
|
180
|
+
web: (request, context)=>aiInsightAnswer(request, {
|
|
181
|
+
params: Promise.resolve({
|
|
182
|
+
jobId: String(context.params['jobId'])
|
|
183
|
+
})
|
|
184
|
+
})
|
|
185
|
+
});
|
|
186
|
+
// A CRM job's answer (AGL-2917), which is kept off the job document and
|
|
187
|
+
// served only to a member the CRM still lets read the record.
|
|
188
|
+
registerPluginApiRoute('ai/crm/:jobId', {
|
|
189
|
+
web: (request, context)=>aiCrmAnswer(request, {
|
|
190
|
+
params: Promise.resolve({
|
|
191
|
+
jobId: String(context.params['jobId'])
|
|
192
|
+
})
|
|
193
|
+
})
|
|
194
|
+
});
|
|
195
|
+
registerPluginApiRoute('ai/jobs/:jobId/events', {
|
|
196
|
+
web: (request, context)=>aiJobEvents(request, {
|
|
197
|
+
params: Promise.resolve({
|
|
198
|
+
jobId: String(context.params['jobId'])
|
|
199
|
+
})
|
|
200
|
+
})
|
|
201
|
+
});
|
|
202
|
+
// The jobs beat (AGL-3026): every step the doors leave queued, run every
|
|
203
|
+
// minute by the console's scheduler on the cron secret, on the one surface
|
|
204
|
+
// that holds the provider's key.
|
|
205
|
+
registerPluginApiRoute(AI_JOBS_BEAT_PATH, {
|
|
206
|
+
web: runAiJobsBeat
|
|
207
|
+
});
|
|
208
|
+
// The weekly insights (AGL-2915): Monday's digests made for the people who
|
|
209
|
+
// asked for them, and delivered once the beat has written them. Beside the
|
|
210
|
+
// beat under `/api/admin/`, where the console's scheduled sweeps live.
|
|
211
|
+
registerPluginApiRoute(AI_INSIGHTS_DIGEST_PATH, {
|
|
212
|
+
web: runAiInsightsDigest
|
|
213
|
+
});
|
|
214
|
+
// A site SEO audit's "Apply all" (AGL-2910): content fixes as new
|
|
215
|
+
// unpublished versions, listing values staged for their SEO cards.
|
|
216
|
+
registerPluginApiRoute('ai/seo/apply', {
|
|
217
|
+
web: applyAiSeoAudit
|
|
218
|
+
});
|
|
219
|
+
// Save the selection as a reusable component, with AI (AGL-2908): the
|
|
220
|
+
// second entry point of the component job, from the besigner's Attributes
|
|
221
|
+
// panel. It proposes, and the person's Apply writes.
|
|
222
|
+
registerPluginApiRoute('ai/generate/component', {
|
|
223
|
+
web: aiGenerateComponent
|
|
224
|
+
});
|
|
225
|
+
registerPluginApiRoute('ai/billing/credits', {
|
|
226
|
+
web: billingCredits
|
|
227
|
+
});
|
|
228
|
+
registerPluginApiRoute('ai/billing/overage', {
|
|
229
|
+
web: billingOverage
|
|
230
|
+
});
|
|
231
|
+
registerPluginApiRoute('ai/usage', {
|
|
232
|
+
web: aiUsage
|
|
233
|
+
});
|
|
234
|
+
// The allotments a manager sets, and the options the model switch lists
|
|
235
|
+
// (AGL-2942). One handler answers the allotments' GET and POST.
|
|
236
|
+
registerPluginApiRoute('ai/allotments', {
|
|
237
|
+
web: aiAllotments
|
|
238
|
+
});
|
|
239
|
+
registerPluginApiRoute('ai/models', {
|
|
240
|
+
web: aiModels
|
|
241
|
+
});
|
|
242
|
+
// The staff doors (AGL-2928, AGL-2930, AGL-2252): one org's AI in full,
|
|
243
|
+
// one account's usage across its workspaces, and the fleet's Assist
|
|
244
|
+
// signals behind the Assist signal staff page.
|
|
245
|
+
registerPluginApiRoute('ai/admin/org', {
|
|
246
|
+
web: aiAdminOrg
|
|
247
|
+
});
|
|
248
|
+
registerPluginApiRoute('ai/admin/orgs-spend', {
|
|
249
|
+
web: aiAdminOrgsSpend
|
|
250
|
+
});
|
|
251
|
+
registerPluginApiRoute('ai/admin/user', {
|
|
252
|
+
web: aiAdminUser
|
|
253
|
+
});
|
|
254
|
+
registerPluginApiRoute('ai/admin/signals', {
|
|
255
|
+
web: aiAdminSignals
|
|
256
|
+
});
|
|
257
|
+
// One workspace's overage standing and the four acts staff have over it
|
|
258
|
+
// (AGL-3011): the ceiling override, lifting a pause — the only way a
|
|
259
|
+
// dispute pause comes off — and resetting the step. Every act audited.
|
|
260
|
+
registerPluginApiRoute('ai/admin/overage', {
|
|
261
|
+
web: aiAdminOverage
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/plugins/ai/src/lib/server.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 { registerPluginApiRoute } from '@aglyn/aglyn/server'\nimport { registerAiDeclarations } from './declarations'\nimport { AI_JOBS_BEAT_PATH } from './jobs/ai-jobs-beat'\nimport { registerAiJobPlan } from './jobs/ai-job-plan-step'\nimport { registerAiJobsPause } from './jobs/ai-jobs-pause'\nimport { registerAiComponentJob } from './jobs/ai-job-component-step'\nimport { registerAiCrmJob } from './jobs/ai-job-crm-step'\nimport { registerAiLayoutJob } from './jobs/ai-job-layout-step'\nimport { registerAiTemplateJob } from './jobs/ai-job-template-step'\nimport { registerAiExperimentJob } from './jobs/ai-job-experiment-step'\nimport { registerAiFormJob } from './jobs/ai-job-form-step'\nimport { registerAiPageJob } from './jobs/ai-job-page-step'\nimport { registerAiProductsJob } from './jobs/ai-job-products-step'\nimport { registerAiEmailJob } from './jobs/ai-job-email-step'\nimport { registerAiCampaignJob } from './jobs/ai-job-campaign-step'\nimport { registerAiSiteJob } from './jobs/ai-job-site-step'\nimport { registerAiWorkflowJob } from './jobs/ai-job-workflow-step'\nimport { registerAiInsightJob } from './jobs/ai-job-insight-step'\nimport { registerAiFigureReaders } from './insights/ai-figure-readers'\nimport { firebaseAdmin } from '@aglyn/tenant-data-admin/server/firebase-admin'\nimport { ensureFirstPartyAiProviders } from './providers/registry'\nimport { aiAssistHandler } from './server/ai-assist'\nimport { GET as aiCrmAnswer } from './server/ai-crm-answer'\nimport { POST as runAiJobsBeat } from './server/ai-jobs-beat-route'\nimport { POST as cancelAiJob } from './server/ai-jobs-cancel'\nimport { GET as aiJobEvents } from './server/ai-jobs-events-route'\nimport { POST as createAiSiteBatch } from './server/ai-jobs-batch'\nimport { GET as listAiJobs, POST as createAiJob } from './server/ai-jobs-route'\nimport { POST as resumeAiJob } from './server/ai-jobs-resume'\nimport { POST as aiGenerateComponent } from './server/ai-generate-component'\nimport { POST as applyAiSeoAudit } from './server/ai-seo-apply'\nimport { POST as assistChat } from './server/assist-chat'\nimport { POST as assistEditApplied } from './server/assist-edit-applied'\nimport { POST as assistFeedback } from './server/assist-feedback'\nimport { PATCH as aiHostPermissions } from './server/ai-host-permissions'\nimport { GET as aiAdminOrg } from './server/ai-admin-org'\nimport { GET as aiAdminOrgsSpend } from './server/ai-admin-orgs-spend'\nimport { GET as aiAdminSignals } from './server/ai-admin-signals'\nimport { GET as aiAdminUser } from './server/ai-admin-user'\nimport { POST as aiAdminOverage } from './server/ai-admin-overage'\nimport { GET as aiUsage } from './server/ai-usage'\nimport { GET as aiAllotments } from './server/ai-allotments'\nimport { GET as aiInsightAnswer } from './server/ai-insight-answer'\nimport { POST as runAiInsightsDigest } from './server/ai-insight-digest-route'\nimport { AI_INSIGHTS_DIGEST_PATH } from './insights/ai-insight-digest'\nimport { GET as aiModels } from './server/ai-models'\nimport { GET as billingCredits } from './server/billing-credits'\nimport { POST as billingOverage } from './server/billing-overage'\n\nexport * from './providers/contract'\nexport * from './providers/catalog'\nexport * from './providers/registry'\nexport * from './providers/routing'\nexport * from './runtime/ai-runtime'\n\n/**\n * The two first-party adapters, registered once per process. A marketplace\n * plugin registers its own against `AI_PROVIDER_CONTRACT` from its own\n * entry and never touches this.\n */\nconst registerFirstPartyProviders = ensureFirstPartyAiProviders\n\n/**\n * Every job kind this plugin runs beyond the three the machine registers\n * itself (AGL-3025). Each is a CALL, never an import made for what the\n * module does as it loads: this package declares only this file\n * effect-ful, so a bundler honoring `sideEffects` deletes an import whose\n * exports go unused — and a step registered that way ran in every spec and\n * in neither app. `registrations-survive-a-bundler.spec.ts` holds this.\n *\n * The console surface is the only caller (AGL-3026): its doors run a job's\n * first step inline, and its beat runs every step after it. The tenant app\n * loads no server surface of this plugin at all, so nothing that serves a\n * published site can reach a provider.\n */\nfunction registerAiJobKinds(): void {\n // The workspace AI pause the machine asks before it claims any step, so a\n // paused workspace's queued jobs spend nothing (AGL-3037).\n registerAiJobsPause()\n // The plan step every planned kind runs first (AGL-2935).\n registerAiJobPlan()\n // Components, layouts and templates (AGL-2908, AGL-2909).\n registerAiComponentJob()\n registerAiLayoutJob()\n registerAiTemplateJob()\n // Forms (AGL-2913).\n registerAiExperimentJob()\n registerAiFormJob()\n // Pages, with the least time one pass needs (AGL-2907).\n registerAiPageJob()\n // Email designs and campaigns, whose drafts the email and marketing\n // plugins write on the resource-draft seam (AGL-2912).\n registerAiEmailJob()\n registerAiCampaignJob()\n // Automations drafted from a description, and explained, whose drafts the\n // workflows plugin writes on the resource-draft seam (AGL-2919).\n registerAiWorkflowJob()\n // Product copy, and a store's products, categories and discounts from a\n // brief, as proposals the commerce plugin's surfaces apply (AGL-2916).\n registerAiProductsJob()\n // The site scaffold, which builds a whole site through the steps above\n // (AGL-2911).\n registerAiSiteJob()\n // Insights (AGL-2915): a question about a site's figures, answered from\n // tables the figure readers return, and the weekly digest. The readers for\n // the platform's own records — page views, forms, datasets — are this\n // plugin's; every other plugin registers its own from its console surface.\n registerAiFigureReaders(() => firebaseAdmin.app().firestore())\n registerAiInsightJob()\n // CRM by AI (AGL-2917): a record's summary and next step, an email draft\n // and an import's column matches, read through the CRM's facts readers.\n registerAiCrmJob()\n}\n\n/**\n * The console-side API (AGL-2939): every AI door, under the `ai` and\n * `assist` prefixes the plugin owns. The URLs the panel and the besigner\n * call are unchanged — `/api/assist/chat`, `/api/ai/assist`,\n * `/api/ai/jobs` — because the dispatcher serves them from the registry\n * exactly where the named routes used to; the two billing doors and the\n * per-member usage read (`ai/usage`) live under the plugin's own prefix.\n * The jobs beat is the one path outside them, for the reason\n * `AI_JOBS_BEAT_PATH` gives.\n */\nexport function registerAiConsoleApi(): void {\n registerAiDeclarations()\n registerFirstPartyProviders()\n registerAiJobKinds()\n registerPluginApiRoute('assist/chat', { web: assistChat })\n registerPluginApiRoute('assist/feedback', { web: assistFeedback })\n // The applied-edit record (AGL-2906): counts of a proposal the author\n // applied in their editor, written to the site's activity log.\n registerPluginApiRoute('assist/edit-applied', { web: assistEditApplied })\n // A collaborator's AI toggles on one site (AGL-2927), set from the site's\n // collaborators card through this plugin's column there.\n registerPluginApiRoute('ai/host-permissions', { web: aiHostPermissions })\n registerPluginApiRoute('ai/assist', aiAssistHandler)\n registerPluginApiRoute('ai/jobs', {\n web: (request) => (request.method === 'GET' ? listAiJobs(request) : createAiJob(request)),\n })\n // The agency batch (AGL-2911): one brief, one `site` job per named site,\n // under one batch id. Before the `:jobId` routes, which it is not one of.\n registerPluginApiRoute('ai/jobs/batch', { web: createAiSiteBatch })\n registerPluginApiRoute('ai/jobs/:jobId/cancel', {\n web: (request, context) =>\n cancelAiJob(request, { params: Promise.resolve({ jobId: String(context.params['jobId']) }) }),\n })\n registerPluginApiRoute('ai/jobs/:jobId/resume', {\n web: (request, context) =>\n resumeAiJob(request, { params: Promise.resolve({ jobId: String(context.params['jobId']) }) }),\n })\n // An insight job's answer (AGL-2915), which is kept off the job document\n // and served only to the member who asked, or for a digest to the site's\n // members.\n registerPluginApiRoute('ai/insights/:jobId', {\n web: (request, context) =>\n aiInsightAnswer(request, { params: Promise.resolve({ jobId: String(context.params['jobId']) }) }),\n })\n // A CRM job's answer (AGL-2917), which is kept off the job document and\n // served only to a member the CRM still lets read the record.\n registerPluginApiRoute('ai/crm/:jobId', {\n web: (request, context) =>\n aiCrmAnswer(request, { params: Promise.resolve({ jobId: String(context.params['jobId']) }) }),\n })\n registerPluginApiRoute('ai/jobs/:jobId/events', {\n web: (request, context) =>\n aiJobEvents(request, { params: Promise.resolve({ jobId: String(context.params['jobId']) }) }),\n })\n // The jobs beat (AGL-3026): every step the doors leave queued, run every\n // minute by the console's scheduler on the cron secret, on the one surface\n // that holds the provider's key.\n registerPluginApiRoute(AI_JOBS_BEAT_PATH, { web: runAiJobsBeat })\n // The weekly insights (AGL-2915): Monday's digests made for the people who\n // asked for them, and delivered once the beat has written them. Beside the\n // beat under `/api/admin/`, where the console's scheduled sweeps live.\n registerPluginApiRoute(AI_INSIGHTS_DIGEST_PATH, { web: runAiInsightsDigest })\n // A site SEO audit's \"Apply all\" (AGL-2910): content fixes as new\n // unpublished versions, listing values staged for their SEO cards.\n registerPluginApiRoute('ai/seo/apply', { web: applyAiSeoAudit })\n // Save the selection as a reusable component, with AI (AGL-2908): the\n // second entry point of the component job, from the besigner's Attributes\n // panel. It proposes, and the person's Apply writes.\n registerPluginApiRoute('ai/generate/component', { web: aiGenerateComponent })\n registerPluginApiRoute('ai/billing/credits', { web: billingCredits })\n registerPluginApiRoute('ai/billing/overage', { web: billingOverage })\n registerPluginApiRoute('ai/usage', { web: aiUsage })\n // The allotments a manager sets, and the options the model switch lists\n // (AGL-2942). One handler answers the allotments' GET and POST.\n registerPluginApiRoute('ai/allotments', { web: aiAllotments })\n registerPluginApiRoute('ai/models', { web: aiModels })\n // The staff doors (AGL-2928, AGL-2930, AGL-2252): one org's AI in full,\n // one account's usage across its workspaces, and the fleet's Assist\n // signals behind the Assist signal staff page.\n registerPluginApiRoute('ai/admin/org', { web: aiAdminOrg })\n registerPluginApiRoute('ai/admin/orgs-spend', { web: aiAdminOrgsSpend })\n registerPluginApiRoute('ai/admin/user', { web: aiAdminUser })\n registerPluginApiRoute('ai/admin/signals', { web: aiAdminSignals })\n // One workspace's overage standing and the four acts staff have over it\n // (AGL-3011): the ceiling override, lifting a pause — the only way a\n // dispute pause comes off — and resetting the step. Every act audited.\n registerPluginApiRoute('ai/admin/overage', { web: aiAdminOverage })\n}\n"],"names":["registerPluginApiRoute","registerAiDeclarations","AI_JOBS_BEAT_PATH","registerAiJobPlan","registerAiJobsPause","registerAiComponentJob","registerAiCrmJob","registerAiLayoutJob","registerAiTemplateJob","registerAiExperimentJob","registerAiFormJob","registerAiPageJob","registerAiProductsJob","registerAiEmailJob","registerAiCampaignJob","registerAiSiteJob","registerAiWorkflowJob","registerAiInsightJob","registerAiFigureReaders","firebaseAdmin","ensureFirstPartyAiProviders","aiAssistHandler","GET","aiCrmAnswer","POST","runAiJobsBeat","cancelAiJob","aiJobEvents","createAiSiteBatch","listAiJobs","createAiJob","resumeAiJob","aiGenerateComponent","applyAiSeoAudit","assistChat","assistEditApplied","assistFeedback","PATCH","aiHostPermissions","aiAdminOrg","aiAdminOrgsSpend","aiAdminSignals","aiAdminUser","aiAdminOverage","aiUsage","aiAllotments","aiInsightAnswer","runAiInsightsDigest","AI_INSIGHTS_DIGEST_PATH","aiModels","billingCredits","billingOverage","registerFirstPartyProviders","registerAiJobKinds","app","firestore","registerAiConsoleApi","web","request","method","context","params","Promise","resolve","jobId","String"],"mappings":"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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import type { PluginSubprocessorDeclaration } from '@aglyn/aglyn/plugin-manager/plugin-subprocessors';
|
|
18
|
+
export declare function aiSubprocessors(): PluginSubprocessorDeclaration[];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import { AI_CATALOG_PROVIDERS } from "./providers/catalog.js";
|
|
17
|
+
import { listAiProviders } from "./providers/registry.js";
|
|
18
|
+
/**
|
|
19
|
+
* The plugin's SUBPROCESSORS (AGL-2984): one declaration for every
|
|
20
|
+
* registered provider whose catalog entry carries a subprocessor row, at
|
|
21
|
+
* the host that provider reports. Named under `subprocessors` in
|
|
22
|
+
* `plugins.config.json`: the manifest generator calls it and writes the
|
|
23
|
+
* result into the console's subprocessors manifest as data, and the
|
|
24
|
+
* subprocessor inventory folds that in through core's
|
|
25
|
+
* `foldPluginSubprocessors`.
|
|
26
|
+
*
|
|
27
|
+
* Provider-generic by construction. The wording is the catalog's; the host
|
|
28
|
+
* and the credential's name are the adapter's; this module names no
|
|
29
|
+
* vendor. A provider whose endpoint an operator names carries no row in the
|
|
30
|
+
* catalog, so it contributes nothing here.
|
|
31
|
+
*/ /** Stands for the provider's `apiKeyEnv` in the catalog wording. */ const API_KEY_ENV_PLACEHOLDER = '{apiKeyEnv}';
|
|
32
|
+
export function aiSubprocessors() {
|
|
33
|
+
const declarations = [];
|
|
34
|
+
for (const provider of listAiProviders()){
|
|
35
|
+
var _AI_CATALOG_PROVIDERS_find;
|
|
36
|
+
const wording = (_AI_CATALOG_PROVIDERS_find = AI_CATALOG_PROVIDERS.find((entry)=>entry.id === provider.id)) == null ? void 0 : _AI_CATALOG_PROVIDERS_find.subprocessor;
|
|
37
|
+
if (!wording) continue;
|
|
38
|
+
const fill = (text)=>text.replaceAll(API_KEY_ENV_PLACEHOLDER, provider.apiKeyEnv);
|
|
39
|
+
declarations.push({
|
|
40
|
+
host: provider.endpointHost,
|
|
41
|
+
entity: fill(wording.entity),
|
|
42
|
+
region: fill(wording.region),
|
|
43
|
+
purpose: fill(wording.purpose),
|
|
44
|
+
publishedOn: fill(wording.publishedOn),
|
|
45
|
+
reason: fill(wording.reason),
|
|
46
|
+
dataReceived: fill(wording.dataReceived)
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return declarations;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=subprocessors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/plugins/ai/src/lib/subprocessors.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 type { PluginSubprocessorDeclaration } from '@aglyn/aglyn/plugin-manager/plugin-subprocessors'\nimport { AI_CATALOG_PROVIDERS } from './providers/catalog'\nimport { listAiProviders } from './providers/registry'\n\n/**\n * The plugin's SUBPROCESSORS (AGL-2984): one declaration for every\n * registered provider whose catalog entry carries a subprocessor row, at\n * the host that provider reports. Named under `subprocessors` in\n * `plugins.config.json`: the manifest generator calls it and writes the\n * result into the console's subprocessors manifest as data, and the\n * subprocessor inventory folds that in through core's\n * `foldPluginSubprocessors`.\n *\n * Provider-generic by construction. The wording is the catalog's; the host\n * and the credential's name are the adapter's; this module names no\n * vendor. A provider whose endpoint an operator names carries no row in the\n * catalog, so it contributes nothing here.\n */\n\n/** Stands for the provider's `apiKeyEnv` in the catalog wording. */\nconst API_KEY_ENV_PLACEHOLDER = '{apiKeyEnv}'\n\nexport function aiSubprocessors(): PluginSubprocessorDeclaration[] {\n const declarations: PluginSubprocessorDeclaration[] = []\n for (const provider of listAiProviders()) {\n const wording = AI_CATALOG_PROVIDERS.find((entry) => entry.id === provider.id)?.subprocessor\n if (!wording) continue\n const fill = (text: string) => text.replaceAll(API_KEY_ENV_PLACEHOLDER, provider.apiKeyEnv)\n declarations.push({\n host: provider.endpointHost,\n entity: fill(wording.entity),\n region: fill(wording.region),\n purpose: fill(wording.purpose),\n publishedOn: fill(wording.publishedOn),\n reason: fill(wording.reason),\n dataReceived: fill(wording.dataReceived),\n })\n }\n return declarations\n}\n"],"names":["AI_CATALOG_PROVIDERS","listAiProviders","API_KEY_ENV_PLACEHOLDER","aiSubprocessors","declarations","provider","wording","find","entry","id","subprocessor","fill","text","replaceAll","apiKeyEnv","push","host","endpointHost","entity","region","purpose","publishedOn","reason","dataReceived"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAGD,SAASA,oBAAoB,QAAQ,yBAAqB;AAC1D,SAASC,eAAe,QAAQ,0BAAsB;AAEtD;;;;;;;;;;;;;CAaC,GAED,kEAAkE,GAClE,MAAMC,0BAA0B;AAEhC,OAAO,SAASC;IACd,MAAMC,eAAgD,EAAE;IACxD,KAAK,MAAMC,YAAYJ,kBAAmB;YACxBD;QAAhB,MAAMM,WAAUN,6BAAAA,qBAAqBO,IAAI,CAAC,CAACC,QAAUA,MAAMC,EAAE,KAAKJ,SAASI,EAAE,sBAA7DT,2BAAgEU,YAAY;QAC5F,IAAI,CAACJ,SAAS;QACd,MAAMK,OAAO,CAACC,OAAiBA,KAAKC,UAAU,CAACX,yBAAyBG,SAASS,SAAS;QAC1FV,aAAaW,IAAI,CAAC;YAChBC,MAAMX,SAASY,YAAY;YAC3BC,QAAQP,KAAKL,QAAQY,MAAM;YAC3BC,QAAQR,KAAKL,QAAQa,MAAM;YAC3BC,SAAST,KAAKL,QAAQc,OAAO;YAC7BC,aAAaV,KAAKL,QAAQe,WAAW;YACrCC,QAAQX,KAAKL,QAAQgB,MAAM;YAC3BC,cAAcZ,KAAKL,QAAQiB,YAAY;QACzC;IACF;IACA,OAAOnB;AACT"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import type { ReusableComponentProp, ReusableComponentPropType } from '@aglyn/aglyn/foundation/definitions/platform.types';
|
|
18
|
+
import type { AiTool } from '../providers/contract';
|
|
19
|
+
import type { AiDoctrineViolation } from '../runtime/ai-doctrine-validators';
|
|
20
|
+
/**
|
|
21
|
+
* The tool a generated reusable component arrives through (AGL-2908), and
|
|
22
|
+
* the reading of the properties it declares.
|
|
23
|
+
*
|
|
24
|
+
* ── The kinds are the Properties dialog's ────────────────────────────────
|
|
25
|
+
*
|
|
26
|
+
* FILE ▸ Properties… declares a property as one of `REUSABLE_PROP_KINDS`,
|
|
27
|
+
* and so does this tool: the kinds it offers are that table less the ones
|
|
28
|
+
* `AI_COMPONENT_PROP_KINDS_NOT_OFFERED` names, each with the reason it is
|
|
29
|
+
* left out, and a spec holds the two in both directions. A kind added to the
|
|
30
|
+
* dialog does not compile here until it is offered or given a reason.
|
|
31
|
+
*
|
|
32
|
+
* What is offered is what a generated element can carry and a brief can
|
|
33
|
+
* fill: copy (Text, Long text), a picture (Image), a link (Link), an icon
|
|
34
|
+
* the site owner picks (Icon), a number (Number), a switch or a part's
|
|
35
|
+
* visibility (Yes / no), and a setting with fixed answers (Choice).
|
|
36
|
+
*
|
|
37
|
+
* ── A declaration as the dialog saves one ────────────────────────────────
|
|
38
|
+
*
|
|
39
|
+
* `readAiComponentProps` returns each property in the shape the dialog's
|
|
40
|
+
* cleaner stores: trimmed, with only the fields its kind uses, and a default
|
|
41
|
+
* in the kind's own type — a Yes / no a real `true` or `false`, a Number a
|
|
42
|
+
* number. Every refusal is a building-rule finding the doctrine's re-ask
|
|
43
|
+
* quotes by its path.
|
|
44
|
+
*/
|
|
45
|
+
type OfferedKind = 'text' | 'richText' | 'image' | 'href' | 'icon' | 'number' | 'boolean' | 'choice';
|
|
46
|
+
/**
|
|
47
|
+
* Why each property kind the dialog declares is not offered to a model.
|
|
48
|
+
* Keyed by every kind outside the offered ones, so the table is complete by
|
|
49
|
+
* type.
|
|
50
|
+
*/
|
|
51
|
+
export declare const AI_COMPONENT_PROP_KINDS_NOT_OFFERED: Readonly<Record<Exclude<ReusableComponentPropType, OfferedKind>, string>>;
|
|
52
|
+
/**
|
|
53
|
+
* The kinds a generated component may declare: the dialog's table less the
|
|
54
|
+
* kinds above, in the dialog's own order.
|
|
55
|
+
*/
|
|
56
|
+
export declare const AI_COMPONENT_PROP_KINDS: readonly OfferedKind[];
|
|
57
|
+
export type AiComponentPropKind = OfferedKind;
|
|
58
|
+
/**
|
|
59
|
+
* The kinds a property proposed for a section already on a page may take
|
|
60
|
+
* (AGL-3054): every offered kind but an Icon. That door reads each default off
|
|
61
|
+
* the live field it binds, and an icon's default is drawn from a path the
|
|
62
|
+
* picker stores beside its id, which the field it reads does not carry.
|
|
63
|
+
*/
|
|
64
|
+
export declare const AI_COMPONENT_SELECTION_PROP_KINDS: readonly AiComponentPropKind[];
|
|
65
|
+
/** The kinds as a model reads them: the stored type and the name a page reads. */
|
|
66
|
+
export declare function aiComponentPropKindWords(kinds?: readonly AiComponentPropKind[]): string;
|
|
67
|
+
export declare const AI_COMPONENT_TOOL_NAME = "submit_component";
|
|
68
|
+
/** The most properties one generated component declares. */
|
|
69
|
+
export declare const AI_COMPONENT_MAX_PROPS = 20;
|
|
70
|
+
/**
|
|
71
|
+
* The strict tool a component arrives through: the doctrine's tree, as the
|
|
72
|
+
* doctrine's own component tool carries it, and the properties beside it.
|
|
73
|
+
* Every field of a property is required and flat, because optional
|
|
74
|
+
* properties are not portable across strict tool implementations; a kind
|
|
75
|
+
* that has no answers sends `[]`.
|
|
76
|
+
*/
|
|
77
|
+
export declare function aiComponentTool(): AiTool;
|
|
78
|
+
export interface AiComponentPropsScope {
|
|
79
|
+
/** The screens a Link default may name: the site inventory's. */
|
|
80
|
+
screenIds: ReadonlySet<string>;
|
|
81
|
+
}
|
|
82
|
+
export interface AiComponentPropsReading {
|
|
83
|
+
/** Every property that could be read, as the Properties dialog stores one. */
|
|
84
|
+
props: ReusableComponentProp[];
|
|
85
|
+
/**
|
|
86
|
+
* The names of properties that were declared under a usable name and
|
|
87
|
+
* refused for something else — their kind, answers, default or label — so
|
|
88
|
+
* a check of the tree does not report their tokens a second time.
|
|
89
|
+
*/
|
|
90
|
+
refused: string[];
|
|
91
|
+
violations: AiDoctrineViolation[];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The properties a component answer declares, read into the shape the
|
|
95
|
+
* Properties dialog stores, with a finding for everything that would not
|
|
96
|
+
* save there or would not read as the brief's own copy.
|
|
97
|
+
*/
|
|
98
|
+
export declare function readAiComponentProps(answer: Record<string, unknown>, scope: AiComponentPropsScope): AiComponentPropsReading;
|
|
99
|
+
export {};
|