@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,372 @@
|
|
|
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 { NodesMap } from '@aglyn/aglyn/types/nodes';
|
|
18
|
+
import { type AiBuildPlan } from '../model/ai-build-plan';
|
|
19
|
+
import type { AiPlanCapabilities } from '../model/ai-plan-capabilities';
|
|
20
|
+
import { type AiSiteInventory } from '../model/ai-site-inventory';
|
|
21
|
+
import type { AiStepKind } from '../providers/catalog';
|
|
22
|
+
import { aiStoppedAtCeiling, type AiProvider } from '../providers/contract';
|
|
23
|
+
import { type AiPluginSettings } from '../providers/routing';
|
|
24
|
+
import { type AiEffort, type AiMessage, type AiSystemBlock, type AiThinking, type AiTool, type AiUsage } from './ai-runtime';
|
|
25
|
+
import { type AiCopyFraming, type AiDoctrineTree, type AiDoctrineTreeContext, type AiDoctrineViolation, type AiOutputScore } from './ai-doctrine-validators';
|
|
26
|
+
import { AI_GENERATION_MAX_ATTEMPTS } from './ai-generation-bounds';
|
|
27
|
+
import type { AiNodeTreeContext } from './ai-node-tree';
|
|
28
|
+
import { type AiLoadEstimate, type AiOutputKind, type AiSurface } from './ai-palette';
|
|
29
|
+
/**
|
|
30
|
+
* What a generation kind produces, and therefore which of the rules below can
|
|
31
|
+
* bind it (AGL-2937).
|
|
32
|
+
*
|
|
33
|
+
* The seventeen rules are written for a kind that composes a DOCUMENT: they
|
|
34
|
+
* name nodes, instances, layouts, slugs and budgets. A kind that produces
|
|
35
|
+
* short fields a door checks itself — a page's search listing, an audit's
|
|
36
|
+
* fixes — can break exactly one of them, and the other sixteen are bytes it
|
|
37
|
+
* pays for on every attempt without ever being held to them. On a fast-tier
|
|
38
|
+
* model, whose cached-prefix minimum no SEO prompt reaches, those bytes are
|
|
39
|
+
* billed at full input rate every single time.
|
|
40
|
+
*
|
|
41
|
+
* Sending fewer rules is not only cheaper here, it is more accurate: rule 14
|
|
42
|
+
* tells a writer to mark a fact it lacks in square brackets, which is right
|
|
43
|
+
* for page copy a person edits before publishing and wrong for a search title
|
|
44
|
+
* that is published exactly as written — and the SEO doors' own rules already
|
|
45
|
+
* say to write only from the text they were given.
|
|
46
|
+
*/
|
|
47
|
+
export type AiDoctrineScope =
|
|
48
|
+
/** A document the palette composes, or a plan for them: all seventeen rules. */
|
|
49
|
+
'documents'
|
|
50
|
+
/** Values a door reads and checks itself, composing nothing. */
|
|
51
|
+
| 'fields';
|
|
52
|
+
/**
|
|
53
|
+
* The procedures in the model's terms, for one scope. Static text only: the
|
|
54
|
+
* budgets are read from `AI_OUTPUT_BUDGETS` once, at load, so a scope's text
|
|
55
|
+
* is the same bytes on every request and changes only when a budget does.
|
|
56
|
+
*/
|
|
57
|
+
export declare function aiBuildingDoctrine(scope: AiDoctrineScope): string;
|
|
58
|
+
/** Every rule, as the kinds that compose a document are told them. */
|
|
59
|
+
export declare const AI_BUILDING_DOCTRINE: string;
|
|
60
|
+
/** The doctrine block a kind that composes a document is sent. */
|
|
61
|
+
export declare const AI_DOCTRINE_SYSTEM_BLOCK: AiSystemBlock;
|
|
62
|
+
/** The doctrine block for one scope. */
|
|
63
|
+
export declare function aiDoctrineSystemBlock(scope: AiDoctrineScope): AiSystemBlock;
|
|
64
|
+
/**
|
|
65
|
+
* The scope a generation kind is told the rules in. A kind absent from this
|
|
66
|
+
* map composes a document and is told all seventeen — the three SEO kinds are
|
|
67
|
+
* the only ones today that write values instead, and a new kind that does the
|
|
68
|
+
* same names itself here rather than paying for rules it cannot break.
|
|
69
|
+
*/
|
|
70
|
+
export declare const AI_DOCTRINE_KIND_SCOPE: Readonly<Record<string, AiDoctrineScope>>;
|
|
71
|
+
/** The scope for a kind; `documents` unless the kind names another. */
|
|
72
|
+
export declare function aiDoctrineScopeFor(kind: string): AiDoctrineScope;
|
|
73
|
+
/**
|
|
74
|
+
* The inventory as the prompt's VOLATILE block: per site, so it never sits
|
|
75
|
+
* inside a cached prefix. Held to `AI_SITE_INVENTORY_MAX_CHARS` by cutting
|
|
76
|
+
* the longest kind a line at a time, each cut kind named, so no one kind can
|
|
77
|
+
* crowd the others out.
|
|
78
|
+
*
|
|
79
|
+
* It lists `AI_SITE_INVENTORY_LISTED_PER_KIND` records of each kind, not the
|
|
80
|
+
* whole window the reader holds (AGL-2937): the block is billed at full input
|
|
81
|
+
* rate on every attempt, so a large site would spend most of a plan's prompt
|
|
82
|
+
* on rows it will not use. A kind with more — cut by the listing cap or by
|
|
83
|
+
* the read itself — is named as having more, and the sentence points at the
|
|
84
|
+
* lookup tool the loop offers beside the door's own, so the answer to "is
|
|
85
|
+
* there already a pricing card?" is a question the model can ask rather than
|
|
86
|
+
* a gap it fills by creating one.
|
|
87
|
+
*/
|
|
88
|
+
export declare function aiSiteInventoryBlock(inventory: AiSiteInventory | null): string;
|
|
89
|
+
/** What a tree generated against this inventory may reference, for `validateAiNodeTree`. */
|
|
90
|
+
export declare function aiNodeTreeContextFromInventory(inventory: AiSiteInventory | null): AiNodeTreeContext;
|
|
91
|
+
export interface AiDoctrineSystemOptions {
|
|
92
|
+
/** The door's own static instructions, cached after the doctrine. */
|
|
93
|
+
instructions?: readonly AiSystemBlock[];
|
|
94
|
+
/** The palette surface a tree is composed on; its catalog is cached after the instructions. */
|
|
95
|
+
surface?: AiSurface;
|
|
96
|
+
/** Which rules the doctrine block states; `documents` when the door names none. */
|
|
97
|
+
scope?: AiDoctrineScope;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The palette catalog a generation on this surface is shown: the elements the
|
|
101
|
+
* surface allows, the props each takes and the named blocks to imitate. The
|
|
102
|
+
* one reader of it, so a door that composes its own prompt shows the model
|
|
103
|
+
* the catalog the loop below shows it.
|
|
104
|
+
*/
|
|
105
|
+
export declare function aiDoctrineCatalog(surface: AiSurface): string;
|
|
106
|
+
/**
|
|
107
|
+
* The system prompt every generator sends, in cache order: the doctrine
|
|
108
|
+
* (cached), the door's instructions, the surface's palette catalog (cached),
|
|
109
|
+
* then the site inventory (volatile). With no catalog behind them, the
|
|
110
|
+
* instructions close the cached prefix themselves. The runtime refuses the
|
|
111
|
+
* request if a door slips a volatile block inside the cached span.
|
|
112
|
+
*
|
|
113
|
+
* `null` is a site whose inventory was not read, and the model is told so;
|
|
114
|
+
* `undefined` is a kind that builds from no site structure at all — a theme
|
|
115
|
+
* builds from the theme — and sends no inventory block.
|
|
116
|
+
*/
|
|
117
|
+
export declare function aiDoctrineSystemBlocks(inventory: AiSiteInventory | null | undefined, options?: AiDoctrineSystemOptions): AiSystemBlock[];
|
|
118
|
+
/** What a generation kind is: a document the palette composes, a plan, or a door's own kind. */
|
|
119
|
+
export type AiGenerationKind = AiOutputKind | 'plan';
|
|
120
|
+
/**
|
|
121
|
+
* `max_tokens` per kind (AGL-2937): the ceiling of one answer, sized to the
|
|
122
|
+
* kind's budget with room for the model's reasoning. A kind a door brings
|
|
123
|
+
* with its own check takes `AI_CUSTOM_GENERATION_MAX_TOKENS` unless the door
|
|
124
|
+
* names its own.
|
|
125
|
+
*/
|
|
126
|
+
export declare const AI_GENERATION_MAX_TOKENS: Record<AiGenerationKind, number>;
|
|
127
|
+
export declare const AI_CUSTOM_GENERATION_MAX_TOKENS = 8000;
|
|
128
|
+
/** One answer, and one re-ask with the violations named. */
|
|
129
|
+
export { AI_GENERATION_MAX_ATTEMPTS };
|
|
130
|
+
/** How much of the offending parts a re-ask quotes. */
|
|
131
|
+
export declare const AI_REASK_OFFENDING_MAX_CHARS = 6000;
|
|
132
|
+
export declare function isAiOutputKind(kind: string): kind is AiOutputKind;
|
|
133
|
+
/** What one check made of one answer. */
|
|
134
|
+
export interface AiGenerationCheckResult<T> {
|
|
135
|
+
/** The value to keep; `null` when the answer could not be read as one. */
|
|
136
|
+
value: T | null;
|
|
137
|
+
violations: AiDoctrineViolation[];
|
|
138
|
+
/** The parts of the answer at fault, keyed as the model wrote them, for the re-ask. */
|
|
139
|
+
offending?: Record<string, unknown>;
|
|
140
|
+
}
|
|
141
|
+
export type AiGenerationCheck<T> = (answer: Record<string, unknown>) => AiGenerationCheckResult<T>;
|
|
142
|
+
/** A tree that passed the palette validator and every doctrine rule. */
|
|
143
|
+
export interface AiValidatedTree {
|
|
144
|
+
rootId: string;
|
|
145
|
+
nodes: NodesMap;
|
|
146
|
+
/** What the palette validator dropped or normalized on the way in. */
|
|
147
|
+
repairs: string[];
|
|
148
|
+
/** Each minted id → the id the model wrote for that node. */
|
|
149
|
+
sourceIds: Record<string, string>;
|
|
150
|
+
score: AiOutputScore;
|
|
151
|
+
/** The weight the proposal shows; `null` for an email. */
|
|
152
|
+
load: AiLoadEstimate | null;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* The strict tool a tree arrives through. The node map rides as JSON text:
|
|
156
|
+
* a map keyed by the model's own node ids has no fixed properties, and a
|
|
157
|
+
* strict schema must close every object it declares.
|
|
158
|
+
*/
|
|
159
|
+
export declare function aiDoctrineTreeTool(kind: AiOutputKind): AiTool;
|
|
160
|
+
/** The tree a tool answer carries: `tree` as an object or JSON text, else the answer itself. */
|
|
161
|
+
export declare function aiAnswerTree(answer: Record<string, unknown>): unknown;
|
|
162
|
+
/**
|
|
163
|
+
* The doctrine's check for a tree kind: the palette validator, every tree
|
|
164
|
+
* rule and the budget, with each offending node reported and quoted by the
|
|
165
|
+
* id the MODEL wrote — the minted ids are ones it never saw.
|
|
166
|
+
*/
|
|
167
|
+
export declare function aiDoctrineTreeCheck(kind: AiOutputKind, context?: AiDoctrineTreeContext, otherPages?: readonly AiDoctrineTree[]): AiGenerationCheck<AiValidatedTree>;
|
|
168
|
+
/**
|
|
169
|
+
* The doctrine's check for a plan: its shape, then every plan rule against
|
|
170
|
+
* the inventory and, where the job read them, against what it may create on
|
|
171
|
+
* the site (AGL-3030).
|
|
172
|
+
*/
|
|
173
|
+
export declare function aiDoctrinePlanCheck(inventory: AiSiteInventory | null, framing?: AiCopyFraming, capabilities?: AiPlanCapabilities | null): AiGenerationCheck<AiBuildPlan>;
|
|
174
|
+
/** The finding an answer that ran past its output ceiling is refused for (AGL-3042). */
|
|
175
|
+
export declare const AI_ANSWER_CUT_OFF_CODE = "answer-cut-off";
|
|
176
|
+
/**
|
|
177
|
+
* Whether a model call stopped at its output ceiling (AGL-3042). The
|
|
178
|
+
* contract owns the predicate, because an adapter reads it to decide whether
|
|
179
|
+
* to keep the call's raw output; the doctrine re-exports it, which is where
|
|
180
|
+
* every door already reads it from.
|
|
181
|
+
*/
|
|
182
|
+
export { aiStoppedAtCeiling };
|
|
183
|
+
/**
|
|
184
|
+
* How a door names what it generates, and what makes it smaller, for an
|
|
185
|
+
* answer cut off at its ceiling (AGL-3042).
|
|
186
|
+
*/
|
|
187
|
+
export interface AiGenerationCutOff {
|
|
188
|
+
/** What a person calls the output: `section` reads "This section was too large to build in one pass." */
|
|
189
|
+
noun: string;
|
|
190
|
+
/**
|
|
191
|
+
* What the re-ask tells the model makes an answer of this kind smaller, in
|
|
192
|
+
* its own sentence: a section's element budget, shorter copy, a repeated
|
|
193
|
+
* item placed as an instance.
|
|
194
|
+
*/
|
|
195
|
+
smaller: string;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* The re-ask: the rules broken, where, and the offending parts as the model
|
|
199
|
+
* wrote them. An answer cut off at its ceiling is told that first, with what
|
|
200
|
+
* makes it smaller (AGL-3042): it broke no rule it can mend by reading one,
|
|
201
|
+
* and asking for the same answer again is asking to be cut off again.
|
|
202
|
+
*/
|
|
203
|
+
export declare function aiReaskMessage(kind: string, toolName: string, violations: readonly AiDoctrineViolation[], offending?: Record<string, unknown>): string;
|
|
204
|
+
/**
|
|
205
|
+
* What a person reads when the second answer still broke a rule. An answer
|
|
206
|
+
* cut off at its ceiling broke none (AGL-3042), so its own sentence is what
|
|
207
|
+
* they read: it was too large, and what helps.
|
|
208
|
+
*/
|
|
209
|
+
export declare function aiDoctrineNeedsInputMessage(violations: readonly AiDoctrineViolation[]): string;
|
|
210
|
+
interface AiGenerationInputBase {
|
|
211
|
+
/**
|
|
212
|
+
* The routing table's step kind: it decides the model (never a model
|
|
213
|
+
* literal) unless `model` names one already resolved. One of the two is
|
|
214
|
+
* required.
|
|
215
|
+
*/
|
|
216
|
+
step?: AiStepKind;
|
|
217
|
+
/** The org's resolved `pluginSettings/ai`, for its provider and model choices. */
|
|
218
|
+
settings?: AiPluginSettings;
|
|
219
|
+
/** A route the door already resolved; the routing table's answer for `step` otherwise. */
|
|
220
|
+
model?: string;
|
|
221
|
+
/** The door's own static instructions. */
|
|
222
|
+
instructions: readonly AiSystemBlock[];
|
|
223
|
+
/** The site the output is built for; `null` when none was read. */
|
|
224
|
+
inventory: AiSiteInventory | null;
|
|
225
|
+
/** The brief and whatever the door sends in the user turn. */
|
|
226
|
+
messages: readonly AiMessage[];
|
|
227
|
+
/** The strict tool the answer arrives through. */
|
|
228
|
+
tool: AiTool;
|
|
229
|
+
/**
|
|
230
|
+
* The ceiling of one answer; `AI_GENERATION_MAX_TOKENS` for the kind when
|
|
231
|
+
* absent. The whole generation — its answers and every lookup round before
|
|
232
|
+
* them — spends at most `AI_GENERATION_MAX_ATTEMPTS` of it (AGL-3036).
|
|
233
|
+
*/
|
|
234
|
+
maxTokens?: number;
|
|
235
|
+
/**
|
|
236
|
+
* What the output is called, and what makes it smaller, when an answer is
|
|
237
|
+
* cut off at `maxTokens` (AGL-3042). Absent, a plan or a palette kind is
|
|
238
|
+
* called by its kind, any other output an answer, and the model is asked
|
|
239
|
+
* for a smaller one of its kind.
|
|
240
|
+
*/
|
|
241
|
+
cutOff?: AiGenerationCutOff;
|
|
242
|
+
thinking?: AiThinking;
|
|
243
|
+
effort?: AiEffort;
|
|
244
|
+
signal?: AbortSignal;
|
|
245
|
+
/** A provider chosen ahead of every setting; specs use it. */
|
|
246
|
+
provider?: AiProvider;
|
|
247
|
+
}
|
|
248
|
+
export interface AiTreeGenerationInput extends AiGenerationInputBase {
|
|
249
|
+
/** What the tree rules read beyond the inventory: asset sizes, the brand, embeds, framing. */
|
|
250
|
+
context?: AiDoctrineTreeContext;
|
|
251
|
+
/** Trees generated beside this one, for rule 1 across pages. */
|
|
252
|
+
otherPages?: readonly AiDoctrineTree[];
|
|
253
|
+
/** Checks the door adds to the doctrine's own, run on a tree the doctrine admitted. */
|
|
254
|
+
extend?: (tree: AiValidatedTree, answer: Record<string, unknown>) => AiDoctrineViolation[];
|
|
255
|
+
}
|
|
256
|
+
export interface AiPlanGenerationInput extends AiGenerationInputBase {
|
|
257
|
+
framing?: AiCopyFraming;
|
|
258
|
+
/**
|
|
259
|
+
* What the job may create on its site (AGL-3030). The plan rules refuse a
|
|
260
|
+
* creation outside it, and build inline where the workspace keeps no
|
|
261
|
+
* reusable components; absent, the doctrine applies whole.
|
|
262
|
+
*/
|
|
263
|
+
capabilities?: AiPlanCapabilities | null;
|
|
264
|
+
/** Checks the door adds to the doctrine's own, run on a plan that parsed. */
|
|
265
|
+
extend?: (plan: AiBuildPlan, answer: Record<string, unknown>) => AiDoctrineViolation[];
|
|
266
|
+
}
|
|
267
|
+
export interface AiCustomGenerationInput<T> extends Omit<AiGenerationInputBase, 'inventory'> {
|
|
268
|
+
/**
|
|
269
|
+
* The site the output is built for, `null` when none was read. A kind that
|
|
270
|
+
* builds from no site structure — a theme builds from the theme — leaves it
|
|
271
|
+
* out, and no inventory block is sent.
|
|
272
|
+
*/
|
|
273
|
+
inventory?: AiSiteInventory | null;
|
|
274
|
+
/**
|
|
275
|
+
* How a kind the doctrine has no reader for is read and checked — a theme
|
|
276
|
+
* change, an edit. Rule 13 is held on every answer whatever it returns.
|
|
277
|
+
*/
|
|
278
|
+
check: AiGenerationCheck<T>;
|
|
279
|
+
}
|
|
280
|
+
/** What a generation spent, whatever its outcome. */
|
|
281
|
+
export interface AiGenerationSpend {
|
|
282
|
+
/**
|
|
283
|
+
* Model calls made, all of which the meter bills: one per answer — 2 when
|
|
284
|
+
* the first was re-asked — plus one per site-inventory lookup answered
|
|
285
|
+
* along the way (AGL-2937).
|
|
286
|
+
*/
|
|
287
|
+
attempts: number;
|
|
288
|
+
/** Tokens across every attempt; the meter bills all of them. */
|
|
289
|
+
usage: AiUsage;
|
|
290
|
+
estCostUsd: number;
|
|
291
|
+
model: string;
|
|
292
|
+
stopReason: string | null;
|
|
293
|
+
/** The thinking effort the requests asked for; `null` when they named none. */
|
|
294
|
+
effort: AiEffort | null;
|
|
295
|
+
}
|
|
296
|
+
export type AiValidatedGeneration<T> = (AiGenerationSpend & {
|
|
297
|
+
status: 'ok';
|
|
298
|
+
value: T;
|
|
299
|
+
})
|
|
300
|
+
/** The re-ask still broke a rule: a person decides. `message` is customer-safe. */
|
|
301
|
+
| (AiGenerationSpend & {
|
|
302
|
+
status: 'needs_input';
|
|
303
|
+
violations: AiDoctrineViolation[];
|
|
304
|
+
message: string;
|
|
305
|
+
/**
|
|
306
|
+
* The answer the violations were found in, as it came through the tool
|
|
307
|
+
* (AGL-3078): what a job's review outlines the parts they name from.
|
|
308
|
+
* Held in memory only, and `null` when no answer arrived.
|
|
309
|
+
*/
|
|
310
|
+
answer?: Record<string, unknown> | null;
|
|
311
|
+
/**
|
|
312
|
+
* What the provider wrote for the attempt its ceiling cut off
|
|
313
|
+
* (AGL-3143), when it sent it: the bytes behind `answer`, which is only
|
|
314
|
+
* as much of them as still parsed. Held in memory only, like `answer`,
|
|
315
|
+
* and `null` when nothing was cut off. It is the trace's, never a
|
|
316
|
+
* customer's — a caller that keeps it keeps it out of what it shows.
|
|
317
|
+
*/
|
|
318
|
+
rawOutput?: string | null;
|
|
319
|
+
})
|
|
320
|
+
/** The model declined; tokens were spent. */
|
|
321
|
+
| (AiGenerationSpend & {
|
|
322
|
+
status: 'refused';
|
|
323
|
+
});
|
|
324
|
+
/**
|
|
325
|
+
* What a tree built for this site is checked against: the brand an email is
|
|
326
|
+
* held to, the ids the inventory lists, and whatever the door adds — asset
|
|
327
|
+
* sizes, embeds, framing.
|
|
328
|
+
*/
|
|
329
|
+
export declare function aiDoctrineTreeContext(inventory: AiSiteInventory | null, extra?: AiDoctrineTreeContext): AiDoctrineTreeContext;
|
|
330
|
+
/**
|
|
331
|
+
* Generate one output under the doctrine: ask, check, re-ask once with the
|
|
332
|
+
* violations named, and give up with `needs_input` rather than spend again.
|
|
333
|
+
*
|
|
334
|
+
* `kind` decides the check: `'plan'` and the six palette kinds are read and
|
|
335
|
+
* held by the doctrine itself; any other kind brings its own `check`, and the
|
|
336
|
+
* doctrine still holds rule 13 on it. Throws only what the runtime throws — a
|
|
337
|
+
* provider failure, an abort, a prompt the cache guard refuses — so a job
|
|
338
|
+
* step's retry and failure paths stay the machine's.
|
|
339
|
+
*/
|
|
340
|
+
export declare function runValidatedGeneration(kind: 'plan', input: AiPlanGenerationInput): Promise<AiValidatedGeneration<AiBuildPlan>>;
|
|
341
|
+
export declare function runValidatedGeneration(kind: AiOutputKind, input: AiTreeGenerationInput): Promise<AiValidatedGeneration<AiValidatedTree>>;
|
|
342
|
+
export declare function runValidatedGeneration<T>(kind: string, input: AiCustomGenerationInput<T>): Promise<AiValidatedGeneration<T>>;
|
|
343
|
+
/** What a streamed answer came to: a value with what its check left out, or the reasons there is none. */
|
|
344
|
+
export type AiStreamedGeneration<T> = {
|
|
345
|
+
status: 'ok';
|
|
346
|
+
value: T;
|
|
347
|
+
violations: AiDoctrineViolation[];
|
|
348
|
+
}
|
|
349
|
+
/** No value, or a numbered rule broken. `message` is customer-safe. */
|
|
350
|
+
| {
|
|
351
|
+
status: 'needs_input';
|
|
352
|
+
violations: AiDoctrineViolation[];
|
|
353
|
+
message: string;
|
|
354
|
+
};
|
|
355
|
+
/**
|
|
356
|
+
* An answer a door has already received, held to the doctrine without a
|
|
357
|
+
* request. A door that streams its reply to the reader as it arrives — the
|
|
358
|
+
* chat door's edit rung — can read the answer only once it is on screen, with
|
|
359
|
+
* no turn left to re-ask in, so the loop above cannot carry it.
|
|
360
|
+
*
|
|
361
|
+
* The check is the loop's for a kind the doctrine has no reader for: the
|
|
362
|
+
* door's own, with rule 13 held on the answer. So are the verdicts, less the
|
|
363
|
+
* re-ask. No value, or a numbered rule broken, is `needs_input` with the
|
|
364
|
+
* reasons. A value is `ok` with the door's own findings beside it — what its
|
|
365
|
+
* check already left out of the value, such as the changes an edit could not
|
|
366
|
+
* make. A plan or a palette kind is refused here: the loop reads those, and a
|
|
367
|
+
* broken rule in one is asked for again, never kept.
|
|
368
|
+
*/
|
|
369
|
+
export declare function validateStreamedGeneration<T>(kind: string, input: {
|
|
370
|
+
answer: Record<string, unknown>;
|
|
371
|
+
check: AiGenerationCheck<T>;
|
|
372
|
+
}): AiStreamedGeneration<T>;
|