@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,441 @@
|
|
|
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 { HostTheme } from '@aglyn/shared-data-types';
|
|
18
|
+
import { type HostAction } from '@aglyn/aglyn/app-utils/actions';
|
|
19
|
+
import type { HostThemeSource } from '@aglyn/aglyn/app-utils/marketplace-theme';
|
|
20
|
+
import { type AiAutomationRecords } from '../model/ai-automation-draft';
|
|
21
|
+
import type { ConsoleImportColumn } from '@aglyn/aglyn/plugin-manager/record-zone-props';
|
|
22
|
+
import { type AiBuildPlanCreateKind } from '../model/ai-build-plan';
|
|
23
|
+
import { type AiPlanCapabilities } from '../model/ai-plan-capabilities';
|
|
24
|
+
import { type AiExperimentArm, type AiExperimentTarget, type AiExperimentTask } from '../model/ai-experiment';
|
|
25
|
+
import type { AiSiteInventory } from '../model/ai-site-inventory';
|
|
26
|
+
import type { AiAutomationCapabilities } from '../model/ai-workflow-job';
|
|
27
|
+
import type { AiStepKind } from '../providers/catalog';
|
|
28
|
+
import type { AiEffort, AiUsage } from '../providers/contract';
|
|
29
|
+
import { type AiProductCategory, type AiProductFacts, type AiProductPhotoRead } from '../model/ai-products';
|
|
30
|
+
import type { AiRunRecord } from '../model/ai-automation-outline';
|
|
31
|
+
import type { AiCrmRecordKind, AiCrmTask } from '../model/ai-crm';
|
|
32
|
+
import type { AiInsightTable } from '../model/ai-insight';
|
|
33
|
+
import { type AiDeviceAudit } from './ai-device-audit';
|
|
34
|
+
import { type AiValidatedTree } from './ai-doctrine';
|
|
35
|
+
import { type AiAssetFacts, type AiCopyFraming } from './ai-doctrine-validators';
|
|
36
|
+
import { type AiOutputKind } from './ai-palette';
|
|
37
|
+
/**
|
|
38
|
+
* THE EVAL HARNESS (AGL-2937): the measure that gates every token lever.
|
|
39
|
+
*
|
|
40
|
+
* A token saved on a page the customer then has to fix costs more than the
|
|
41
|
+
* token. So no lever ships on its token figure alone: each golden brief is
|
|
42
|
+
* held to the same checks the doctrine holds a live answer to, and a kind's
|
|
43
|
+
* pass rate and mean score must stay at or above its floor.
|
|
44
|
+
*
|
|
45
|
+
* A case is a golden brief for one output kind — the site it is built for,
|
|
46
|
+
* the plan shape a good answer has, reference answers, and controls that
|
|
47
|
+
* must fail. Every answer is scored on four checks:
|
|
48
|
+
*
|
|
49
|
+
* - **readable** — it reads as its kind: `validateAiNodeTree` admits the
|
|
50
|
+
* tree, the plan parses, the fields and the copy are there;
|
|
51
|
+
* - **rules** — no doctrine rule is broken (`ai-doctrine-validators.ts`),
|
|
52
|
+
* nor any rule of the kind's own (a link to a page the answer was not
|
|
53
|
+
* given, a title line on a blog body);
|
|
54
|
+
* - **budget** — within the kind's measured budget: rule 17 for a document,
|
|
55
|
+
* the length ceiling for copy;
|
|
56
|
+
* - **rubric** — a grade against the brief for structure, copy fit and
|
|
57
|
+
* reuse decisions, recorded from a stronger model on a live run.
|
|
58
|
+
*
|
|
59
|
+
* A document of a kind a site renders is also held to **responsive** (AGL-3020):
|
|
60
|
+
* rendered at every device of the besigner's switcher, nothing runs past the
|
|
61
|
+
* screen and no band keeps its desktop columns on a phone. It is measured in a
|
|
62
|
+
* browser by `tools/scripts/record-ai-page-axe.mts` and read back from that
|
|
63
|
+
* recording, so it gates a pass without moving a score: a page that only works
|
|
64
|
+
* on desktop does not pass, whatever its checks and grade average to.
|
|
65
|
+
*
|
|
66
|
+
* A planned kind's answer also carries the plan, held to the plan rules and
|
|
67
|
+
* to the case's expected shape.
|
|
68
|
+
*
|
|
69
|
+
* Offline is the default and the only mode CI runs: answers and grades are
|
|
70
|
+
* read from the fixtures under `tools/ai-eval/cases`, so a run costs nothing
|
|
71
|
+
* and asserts the same verdicts every time. An answer marked `authored` was
|
|
72
|
+
* written by hand as a reference and is graded by hand; one marked
|
|
73
|
+
* `recorded` came from a live run. A live run spends real money and is
|
|
74
|
+
* refused unless `AI_EVAL_LIVE=1` names it.
|
|
75
|
+
*/
|
|
76
|
+
/** The output kinds the harness holds golden briefs for. */
|
|
77
|
+
export type AiEvalKind = 'page' | 'template' | 'component' | 'layout' | 'form' | 'email' | 'section' | 'seo' | 'product' | 'catalog' | 'categories' | 'theme' | 'element' | 'blog' | 'text' | 'chat' | 'workflow' | 'insight' | 'crm' | 'experiment';
|
|
78
|
+
export declare const AI_EVAL_KINDS: readonly AiEvalKind[];
|
|
79
|
+
/** The document kind a tree kind is held to; a section rewrite is one reusable block. */
|
|
80
|
+
export declare const AI_EVAL_TREE_OUTPUT: Partial<Record<AiEvalKind, AiOutputKind>>;
|
|
81
|
+
/**
|
|
82
|
+
* Whether a kind's answer is a document a site renders, and so is held to
|
|
83
|
+
* every device width (AGL-3020). An email is not: its column is fixed at 600px
|
|
84
|
+
* by the medium, which rule 12 exempts it for.
|
|
85
|
+
*/
|
|
86
|
+
export declare function aiEvalRendersAtDeviceWidths(kind: AiEvalKind): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* The recorded device audit of an answer, or `null` when none was recorded
|
|
89
|
+
* from it. The spec that scores the cases reads the recordings and answers
|
|
90
|
+
* this; a scorer given none holds nothing to its widths.
|
|
91
|
+
*/
|
|
92
|
+
export type AiEvalAudits = (evalCase: AiEvalCase, answer: unknown) => AiDeviceAudit | null;
|
|
93
|
+
/** The checks an answer is scored on, beside its rubric. */
|
|
94
|
+
export type AiEvalCheck = 'readable' | 'rules' | 'budget' | 'plan' | 'responsive' | 'rubric';
|
|
95
|
+
/** A grade against the brief, each criterion from 1 (fails) to 5 (excellent). */
|
|
96
|
+
export interface AiEvalRubric {
|
|
97
|
+
/** Organized the way the brief needs, nothing missing, nothing extra. */
|
|
98
|
+
structure: number;
|
|
99
|
+
/** The words fit the brief, the site and its audience, with no filler. */
|
|
100
|
+
copy: number;
|
|
101
|
+
/** Reuses what the site lists before creating; `null` for a kind that places nothing. */
|
|
102
|
+
reuse: number | null;
|
|
103
|
+
/** The model that graded it, or `authored` for a grade given by hand. */
|
|
104
|
+
grader: string;
|
|
105
|
+
notes?: string;
|
|
106
|
+
}
|
|
107
|
+
/** A plan's expected shape: what a good plan for the brief has. */
|
|
108
|
+
export interface AiEvalPlanShape {
|
|
109
|
+
/** Screens planned, as `[min, max]`. */
|
|
110
|
+
screens: [number, number];
|
|
111
|
+
/** Inventory ids the plan must reuse. */
|
|
112
|
+
reuse?: string[];
|
|
113
|
+
/** The layout every planned screen renders inside. */
|
|
114
|
+
layout?: string;
|
|
115
|
+
/** The most creations a good plan needs. */
|
|
116
|
+
maxCreate?: number;
|
|
117
|
+
/** The kinds a creation may be. */
|
|
118
|
+
createKinds?: AiBuildPlanCreateKind[];
|
|
119
|
+
}
|
|
120
|
+
export interface AiEvalCandidate {
|
|
121
|
+
/** `authored` for a reference written by hand; `recorded` for one a live run captured. */
|
|
122
|
+
source: 'authored' | 'recorded';
|
|
123
|
+
/**
|
|
124
|
+
* `full` for an answer to the whole brief, the default; `plan` for the plan
|
|
125
|
+
* alone, which a live run records for a planned kind whose generator has
|
|
126
|
+
* not landed. A plan answer is held to the plan checks and its rubric, and
|
|
127
|
+
* counts toward the plan step's score rather than the kind's floor.
|
|
128
|
+
*/
|
|
129
|
+
scope?: 'full' | 'plan';
|
|
130
|
+
/** The routing step and model a recorded answer came from; `null` for an authored one. */
|
|
131
|
+
step: AiStepKind | null;
|
|
132
|
+
model: string | null;
|
|
133
|
+
effort: AiEffort | null;
|
|
134
|
+
/** The plan the plan step answered with, for a planned kind. */
|
|
135
|
+
plan: unknown;
|
|
136
|
+
/**
|
|
137
|
+
* The output as the kind's door answers: a tree tool's input (or the node
|
|
138
|
+
* map itself), the copy as text, `{ title, description }` for search
|
|
139
|
+
* fields, or the theme tool's input.
|
|
140
|
+
*/
|
|
141
|
+
answer: unknown;
|
|
142
|
+
/** What a recorded answer spent; `null` for an authored one. */
|
|
143
|
+
usage: AiUsage | null;
|
|
144
|
+
/**
|
|
145
|
+
* A recorded answer's spend, one entry per metered exchange in the order
|
|
146
|
+
* the job ran them — the plan, then every pass of its generation — with
|
|
147
|
+
* the credits each came to as the machine meters a step (AGL-3030).
|
|
148
|
+
* Absent on an authored answer, and on a recording that keeps its tokens
|
|
149
|
+
* alone.
|
|
150
|
+
*/
|
|
151
|
+
steps?: AiEvalRecordedStep[];
|
|
152
|
+
/**
|
|
153
|
+
* What a recorded product copy answer was written with of its product's
|
|
154
|
+
* photo, as the products step reports it (AGL-3074): `read` when the
|
|
155
|
+
* picture rode the request.
|
|
156
|
+
*/
|
|
157
|
+
photo?: AiProductPhotoRead;
|
|
158
|
+
/**
|
|
159
|
+
* What a recorded page was built as beside its tree (AGL-3073): its
|
|
160
|
+
* screen's address and listing, and the layout it renders inside. Absent
|
|
161
|
+
* on an authored answer, and on a recording made before it was kept.
|
|
162
|
+
*/
|
|
163
|
+
screen?: AiEvalRecordedScreen;
|
|
164
|
+
/**
|
|
165
|
+
* The grade, or `null` where the grader itself failed and there is none
|
|
166
|
+
* (AGL-3143). An authored candidate always carries one.
|
|
167
|
+
*
|
|
168
|
+
* A brief's answer is bought before it is graded, so a grader that throws
|
|
169
|
+
* would otherwise take the answer down with it and the run would pay
|
|
170
|
+
* again for what it already had. The answer is kept and the grade is
|
|
171
|
+
* marked missing instead of being invented: a fabricated 1/1 would read
|
|
172
|
+
* as "the model answered badly" and pull the kind's floor down for
|
|
173
|
+
* something the model never did, and the floors are the whole reason the
|
|
174
|
+
* harness exists. An ungraded recording passes nothing — `rubric` is what
|
|
175
|
+
* a score is taken from — so a missing grade can only read low, never
|
|
176
|
+
* high, and the run that wrote it exits non-zero naming the throw.
|
|
177
|
+
*/
|
|
178
|
+
rubric: AiEvalRubric | null;
|
|
179
|
+
note?: string;
|
|
180
|
+
/**
|
|
181
|
+
* What the provider wrote when the answer ran out of ceiling (AGL-3143):
|
|
182
|
+
* the bytes `answer` is only as much of as still parsed. Absent on every
|
|
183
|
+
* recording but one whose answer was cut off. It is here because the
|
|
184
|
+
* recording is the only place a live run's output outlives the run, and
|
|
185
|
+
* it is what says whether the ceiling went on a runaway string or on a
|
|
186
|
+
* decoding stall that wrote nothing usable. Never authored by hand.
|
|
187
|
+
*/
|
|
188
|
+
rawOutput?: string;
|
|
189
|
+
}
|
|
190
|
+
/** One metered exchange of a recorded job. */
|
|
191
|
+
export interface AiEvalRecordedStep {
|
|
192
|
+
step: AiStepKind;
|
|
193
|
+
model: string;
|
|
194
|
+
usage: AiUsage;
|
|
195
|
+
estCostUsd: number;
|
|
196
|
+
/** What the machine meters it as: the billed cost in credits, rounded up per exchange. */
|
|
197
|
+
credits: number;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* A recorded page's screen, as the page step stored its draft. None of it is
|
|
201
|
+
* a node of the page's tree: the address and the listing are fields of the
|
|
202
|
+
* screen, the navigation entry is a proposal beside it, and the header, the
|
|
203
|
+
* footer and the main landmark belong to the layout it renders inside.
|
|
204
|
+
*/
|
|
205
|
+
export interface AiEvalRecordedScreen {
|
|
206
|
+
/** The draft's one-segment address, as the draft writer stored it. */
|
|
207
|
+
slug: string;
|
|
208
|
+
/** The search title and description the draft holds; `null` where it holds none. */
|
|
209
|
+
seoTitle: string | null;
|
|
210
|
+
seoDescription: string | null;
|
|
211
|
+
/** Whether a navigation entry for the page travels with it as a proposal. */
|
|
212
|
+
nav: boolean;
|
|
213
|
+
/** The layout the draft renders inside; `null` for a page that renders inside none. */
|
|
214
|
+
layout: AiEvalRecordedLayout | null;
|
|
215
|
+
}
|
|
216
|
+
/** The layout a recorded page renders inside. */
|
|
217
|
+
export interface AiEvalRecordedLayout {
|
|
218
|
+
id: string;
|
|
219
|
+
name: string;
|
|
220
|
+
/** `true` for a layout the job built before the page; `false` for one the site already had. */
|
|
221
|
+
built: boolean;
|
|
222
|
+
/** Its tree as stored; `null` for a layout the case's site lists by name alone. */
|
|
223
|
+
tree: {
|
|
224
|
+
rootId: string;
|
|
225
|
+
nodes: Record<string, unknown>;
|
|
226
|
+
} | null;
|
|
227
|
+
}
|
|
228
|
+
/** An answer that must fail, and the checks it must fail. */
|
|
229
|
+
export interface AiEvalControl {
|
|
230
|
+
why: string;
|
|
231
|
+
answer: unknown;
|
|
232
|
+
plan?: unknown;
|
|
233
|
+
fails: AiEvalCheck[];
|
|
234
|
+
}
|
|
235
|
+
export interface AiEvalCase {
|
|
236
|
+
id: string;
|
|
237
|
+
kind: AiEvalKind;
|
|
238
|
+
brief: string;
|
|
239
|
+
framing: AiCopyFraming;
|
|
240
|
+
/** The site the answer is built for; `null` for a brief that builds from none. */
|
|
241
|
+
inventory: AiSiteInventory | null;
|
|
242
|
+
/**
|
|
243
|
+
* The site's name as its visitors read it, where the case gives one
|
|
244
|
+
* (AGL-3077): a recorded page's listing names the site by it. A case that
|
|
245
|
+
* gives none is recorded on an untitled site.
|
|
246
|
+
*/
|
|
247
|
+
siteName?: string;
|
|
248
|
+
/** Media library facts the image budget reads, by media id. */
|
|
249
|
+
assets?: Record<string, AiAssetFacts>;
|
|
250
|
+
/** The documentation URLs a chat answer was grounded in; it may link only these. */
|
|
251
|
+
docsUrls?: string[];
|
|
252
|
+
/** Copy ceilings the brief sets, beside the kind's own. */
|
|
253
|
+
maxChars?: number;
|
|
254
|
+
maxWords?: number;
|
|
255
|
+
/**
|
|
256
|
+
* For an insight brief (AGL-2915): the tables the readers returned, which
|
|
257
|
+
* every insight an answer writes is traced against.
|
|
258
|
+
*/
|
|
259
|
+
tables?: AiInsightTable[];
|
|
260
|
+
/**
|
|
261
|
+
* For a product copy brief (AGL-2916): the product as its editor handed it
|
|
262
|
+
* over, and the site's categories the request lists.
|
|
263
|
+
*/
|
|
264
|
+
product?: {
|
|
265
|
+
facts: AiProductFacts;
|
|
266
|
+
categories: AiProductCategory[];
|
|
267
|
+
};
|
|
268
|
+
/** For a categories brief: the names of the categories the store already has. */
|
|
269
|
+
existingCategoryNames?: string[];
|
|
270
|
+
/** For a theme brief: the site's current theme and where it comes from. */
|
|
271
|
+
siteTheme?: HostTheme;
|
|
272
|
+
themeSource?: HostThemeSource;
|
|
273
|
+
/**
|
|
274
|
+
* For an automation brief (AGL-2919): what the workspace can run, and the
|
|
275
|
+
* site's records the answer's words are looked up among. Absent, the
|
|
276
|
+
* workspace runs everything and the site holds nothing.
|
|
277
|
+
*/
|
|
278
|
+
automationCapabilities?: AiAutomationCapabilities;
|
|
279
|
+
automationRecords?: AiAutomationRecords;
|
|
280
|
+
/**
|
|
281
|
+
* For an automation brief about a saved automation (AGL-3074): the action
|
|
282
|
+
* as the site stores it, and for a run's diagnosis, what the run history
|
|
283
|
+
* recorded of the failed run. Absent, the brief asks for a draft.
|
|
284
|
+
*/
|
|
285
|
+
automation?: AiEvalAutomation;
|
|
286
|
+
/**
|
|
287
|
+
* The media library assets of the case's site a recording reads
|
|
288
|
+
* (AGL-3074), by media id: each the path of the file under
|
|
289
|
+
* `tools/ai-eval/fixtures` that holds its bytes. A product's photo is
|
|
290
|
+
* `media:<site id>/<media id>`, where the site is the inventory's, or
|
|
291
|
+
* `AI_EVAL_SITE_ID` for a case that describes none.
|
|
292
|
+
*/
|
|
293
|
+
media?: Record<string, string>;
|
|
294
|
+
/**
|
|
295
|
+
* For a CRM brief (AGL-2917): what the job was asked, about which kind of
|
|
296
|
+
* record, the facts the CRM reported for it, and a mapping's columns.
|
|
297
|
+
*/
|
|
298
|
+
crm?: AiEvalCrmContext;
|
|
299
|
+
/**
|
|
300
|
+
* For an A/B test brief (AGL-2914): which half of the step the brief asks
|
|
301
|
+
* for, what the test varies, the copy under test, and — for a result — the
|
|
302
|
+
* test's arms as the results reader published them.
|
|
303
|
+
*/
|
|
304
|
+
experiment?: AiEvalExperiment;
|
|
305
|
+
/**
|
|
306
|
+
* What the workspace may create on the case's site (AGL-3030): a brief
|
|
307
|
+
* for a workspace that keeps no reusable components is held to the inline
|
|
308
|
+
* doctrine, and its plan to what the workspace may create. Absent, the
|
|
309
|
+
* doctrine applies whole.
|
|
310
|
+
*/
|
|
311
|
+
capabilities?: AiPlanCapabilities;
|
|
312
|
+
expected?: {
|
|
313
|
+
plan?: AiEvalPlanShape;
|
|
314
|
+
};
|
|
315
|
+
candidates: AiEvalCandidate[];
|
|
316
|
+
controls: AiEvalControl[];
|
|
317
|
+
}
|
|
318
|
+
/** The site a case's job runs on when the case describes no inventory. */
|
|
319
|
+
export declare const AI_EVAL_SITE_ID = "eval-site";
|
|
320
|
+
/** What an automation brief's workspace can run when the case does not say: everything. */
|
|
321
|
+
export declare const AI_EVAL_AUTOMATION_CAPABILITIES: AiAutomationCapabilities;
|
|
322
|
+
/** A saved automation an automation brief asks about, as the workflow step reads one. */
|
|
323
|
+
export interface AiEvalAutomation {
|
|
324
|
+
/** The action as `hosts/{hostId}/actions/{id}` holds it. */
|
|
325
|
+
action: HostAction;
|
|
326
|
+
/** A failed run of it; given, the brief asks why that run failed. */
|
|
327
|
+
run?: AiRunRecord;
|
|
328
|
+
}
|
|
329
|
+
/** An A/B test brief, as the experiment step is given one. */
|
|
330
|
+
export interface AiEvalExperiment {
|
|
331
|
+
task: AiExperimentTask;
|
|
332
|
+
/** What the test varies; a variants brief always names one. */
|
|
333
|
+
target?: AiExperimentTarget;
|
|
334
|
+
/** The copy under test, as the surface handed it over. */
|
|
335
|
+
subject?: string;
|
|
336
|
+
/** A result brief's test, and its arms as the results reader published them. */
|
|
337
|
+
test?: string;
|
|
338
|
+
arms?: AiExperimentArm[];
|
|
339
|
+
}
|
|
340
|
+
/** What a CRM brief's answer is checked against, as the `crm` step checks it. */
|
|
341
|
+
export interface AiEvalCrmContext {
|
|
342
|
+
task: AiCrmTask;
|
|
343
|
+
/** The record a `record` or `email` brief is about. */
|
|
344
|
+
record?: AiCrmRecordKind;
|
|
345
|
+
/** The facts the CRM's reader reported: a record's, or an import's field catalog. */
|
|
346
|
+
facts?: Record<string, unknown>;
|
|
347
|
+
/** A mapping brief's columns: each header and its shape. */
|
|
348
|
+
columns?: ConsoleImportColumn[];
|
|
349
|
+
}
|
|
350
|
+
/** A kind's floor: the pass rate and the mean score its candidates may not fall below. */
|
|
351
|
+
export interface AiEvalFloor {
|
|
352
|
+
passRate: number;
|
|
353
|
+
meanScore: number;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* The floors, per kind. Every reference answer must pass, because each was
|
|
357
|
+
* written to; the mean floor leaves room for a rubric grade of four on an
|
|
358
|
+
* answer that passes every mechanical check. Recorded answers are held to
|
|
359
|
+
* the same floors, and a lever that lowers a kind below its floor does not
|
|
360
|
+
* ship.
|
|
361
|
+
*/
|
|
362
|
+
export declare const AI_EVAL_FLOORS: Readonly<Record<AiEvalKind, AiEvalFloor>>;
|
|
363
|
+
/** A rubric passes at this mean, with no criterion below three. */
|
|
364
|
+
export declare const AI_EVAL_RUBRIC_PASS_MEAN = 3.5;
|
|
365
|
+
/** How long a blog body may run: the blog mode's output ceiling, at four characters a token. */
|
|
366
|
+
export declare const AI_EVAL_BLOG_MAX_CHARS = 8000;
|
|
367
|
+
/** How long a job's copy may run when the brief implies no length: the text step's own rule. */
|
|
368
|
+
export declare const AI_EVAL_TEXT_MAX_WORDS = 150;
|
|
369
|
+
/** How long a chat answer may run: the chat door's output ceiling, at four characters a token. */
|
|
370
|
+
export declare const AI_EVAL_CHAT_MAX_CHARS = 4000;
|
|
371
|
+
export interface AiEvalScore {
|
|
372
|
+
caseId: string;
|
|
373
|
+
kind: AiEvalKind;
|
|
374
|
+
source: AiEvalCandidate['source'];
|
|
375
|
+
scope: NonNullable<AiEvalCandidate['scope']>;
|
|
376
|
+
model: string | null;
|
|
377
|
+
/** A check that does not apply to the answer — the plan of an unplanned kind, the document of a plan answer — is `null`. */
|
|
378
|
+
checks: Record<'rubric', boolean> & Record<Exclude<AiEvalCheck, 'rubric'>, boolean | null>;
|
|
379
|
+
/** The rubric's mean, from 0 (every criterion 1) to 1 (every criterion 5). */
|
|
380
|
+
rubricScore: number;
|
|
381
|
+
/** The checks and the rubric, averaged: from 0 to 1. */
|
|
382
|
+
score: number;
|
|
383
|
+
pass: boolean;
|
|
384
|
+
/** Why a check failed: violation codes and the kind's own findings. */
|
|
385
|
+
findings: string[];
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* The tree an answer of a tree kind is checked as — a page's repeated items
|
|
389
|
+
* drawn into their copies — or `null` when it cannot be read as one. The
|
|
390
|
+
* device audit renders exactly this tree (AGL-3020).
|
|
391
|
+
*/
|
|
392
|
+
export declare function aiEvalAnswerTree(evalCase: AiEvalCase, answer: unknown): AiValidatedTree | null;
|
|
393
|
+
/** The plan held to the plan rules, then to the shape the case expects. */
|
|
394
|
+
export declare function checkAiEvalPlan(evalCase: AiEvalCase, plan: unknown): {
|
|
395
|
+
pass: boolean;
|
|
396
|
+
findings: string[];
|
|
397
|
+
};
|
|
398
|
+
/** A rubric's mean and whether it passes: the mean at `AI_EVAL_RUBRIC_PASS_MEAN`, nothing under three. */
|
|
399
|
+
export declare function aiEvalRubricVerdict(rubric: AiEvalRubric | null | undefined): {
|
|
400
|
+
mean: number;
|
|
401
|
+
pass: boolean;
|
|
402
|
+
};
|
|
403
|
+
/** One answer to one golden brief, scored. */
|
|
404
|
+
export declare function scoreAiEvalCandidate(evalCase: AiEvalCase, candidate: AiEvalCandidate, audits?: AiEvalAudits): AiEvalScore;
|
|
405
|
+
/**
|
|
406
|
+
* The checks a control failed; the harness requires every one it names. A
|
|
407
|
+
* control whose widths were never recorded fails none of them.
|
|
408
|
+
*/
|
|
409
|
+
export declare function scoreAiEvalControl(evalCase: AiEvalCase, control: AiEvalControl, audits?: AiEvalAudits): AiEvalCheck[];
|
|
410
|
+
export interface AiEvalKindSummary {
|
|
411
|
+
kind: AiEvalKind;
|
|
412
|
+
candidates: number;
|
|
413
|
+
passed: number;
|
|
414
|
+
/** Passed over candidates; `null` with none, which is below every floor. */
|
|
415
|
+
passRate: number | null;
|
|
416
|
+
meanScore: number | null;
|
|
417
|
+
floor: AiEvalFloor;
|
|
418
|
+
belowFloor: boolean;
|
|
419
|
+
}
|
|
420
|
+
/** Every kind's pass rate and mean score against its floor; a kind with no candidate is below it. */
|
|
421
|
+
export declare function summarizeAiEval(scores: readonly AiEvalScore[]): AiEvalKindSummary[];
|
|
422
|
+
/** How the plans a planned kind's answers carry score, across every brief. */
|
|
423
|
+
export interface AiEvalPlanSummary {
|
|
424
|
+
plans: number;
|
|
425
|
+
passed: number;
|
|
426
|
+
passRate: number | null;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* The plan step's own score: every answer that carried a plan checked
|
|
430
|
+
* against its brief's expected shape, whole answers and plan answers alike.
|
|
431
|
+
*/
|
|
432
|
+
export declare function summarizeAiEvalPlans(scores: readonly AiEvalScore[]): AiEvalPlanSummary;
|
|
433
|
+
/** A recording a live run wrote: the brief it answers, and the answer. */
|
|
434
|
+
export interface AiEvalRecording {
|
|
435
|
+
caseId: string;
|
|
436
|
+
candidate: AiEvalCandidate;
|
|
437
|
+
}
|
|
438
|
+
/** A recording file read and checked for shape; throws naming the field at fault. */
|
|
439
|
+
export declare function readAiEvalRecording(raw: unknown, file: string): AiEvalRecording;
|
|
440
|
+
/** A case file read and checked for shape; throws naming the field at fault. */
|
|
441
|
+
export declare function readAiEvalCase(raw: unknown, file: string): AiEvalCase;
|