@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,1017 @@
|
|
|
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
|
+
*/ 'use client';
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
|
+
import { aiAddonName } from "@aglyn/aglyn";
|
|
19
|
+
import { pluginDocsHelp } from "@aglyn/aglyn/app-utils/docs-help";
|
|
20
|
+
import { CardDisplay } from "@aglyn/shared-ui-jsx";
|
|
21
|
+
import { ScrollTable } from "@aglyn/shared-ui-jsx/components/scroll-table.component";
|
|
22
|
+
import { Accordion, AccordionDetails, AccordionSummary, Alert, Box, Chip, LinearProgress, Stack, TableBody, TableCell, TableHead, TableRow, Typography } from "@mui/material";
|
|
23
|
+
import { useEffect, useRef, useState } from "react";
|
|
24
|
+
import { useUser } from "@aglyn/tenant-feature-instance";
|
|
25
|
+
import { authorizedFetch } from "@aglyn/shared-util-http/authorized-token";
|
|
26
|
+
import { costSplitRows, freeTasteRefusals, kindTokenRows } from "../usage/assist-signal-mining.js";
|
|
27
|
+
/**
|
|
28
|
+
* The Assist docs-gap and cost board (AGL-1860, AGL-2252) — the read side of
|
|
29
|
+
* the data loop, and until now the half that did not exist.
|
|
30
|
+
*
|
|
31
|
+
* AGL-1972 split every assist turn into prose that expires and a signal that
|
|
32
|
+
* does not, on the reasoning that "the corpus the loop needs outlives the
|
|
33
|
+
* words that produced it". That is only true once something reads the corpus.
|
|
34
|
+
* This is that something.
|
|
35
|
+
*
|
|
36
|
+
* Four panels, in the order the questions actually get asked:
|
|
37
|
+
*
|
|
38
|
+
* 1. **Docs gaps** — cited pages ranked by thumbs-down, then volume. A page
|
|
39
|
+
* high on this list is being found and is not answering, which is a docs
|
|
40
|
+
* issue with its evidence attached. The `orgs` column is the sanity
|
|
41
|
+
* check: a gap one workspace has is a workspace, not a gap.
|
|
42
|
+
* 2. **Ungrounded questions** — turns where retrieval matched nothing at
|
|
43
|
+
* all, grouped by the screen the person was on. These cite no page, so
|
|
44
|
+
* they can never appear in the ranking above; a missing page is invisible
|
|
45
|
+
* to anything keyed on paths, and this panel is the only place it shows.
|
|
46
|
+
* 3. **Cost** — per org, dearest first, plus the fleet totals and the
|
|
47
|
+
* cache-read rate. The rate is not decoration: the cached system prefix
|
|
48
|
+
* measures 1,030–1,190 tokens against Sonnet 5's 1,024-token minimum, so
|
|
49
|
+
* whether it caches is an empirical question the chat route could only
|
|
50
|
+
* pose, and this is the evidence.
|
|
51
|
+
* 4. **Tokens by kind** — what each kind of model request costs per
|
|
52
|
+
* request, what it sends and generates, how much of its prompt the cache
|
|
53
|
+
* served, and the p95 output its `max_tokens` is sized against
|
|
54
|
+
* (AGL-2937).
|
|
55
|
+
*
|
|
56
|
+
* Read through `/api/ai/admin/signals` rather than Firestore directly.
|
|
57
|
+
* `assistSignals` is absent from the rules file on purpose — default-deny for
|
|
58
|
+
* every client — which is exactly what lets it hold cross-tenant analytics.
|
|
59
|
+
*
|
|
60
|
+
* The AI plugin's staff page (AGL-2939): the console's generic staff route
|
|
61
|
+
* draws the header, the breadcrumbs and the staff gate around this body, and
|
|
62
|
+
* gives it the tab it had.
|
|
63
|
+
*/ const money = (value)=>`$${(Number(value) || 0).toFixed(Math.abs(Number(value) || 0) < 1 ? 4 : 2)}`;
|
|
64
|
+
const percent = (value)=>value == null ? '—' : `${Math.round(value * 100)}%`;
|
|
65
|
+
/**
|
|
66
|
+
* One cost breakdown — tier or model, dearest first (AGL-2340).
|
|
67
|
+
*
|
|
68
|
+
* The `share` column is why this is a table rather than a row of chips. The
|
|
69
|
+
* decision it feeds is always comparative — "is free eating the margin" is a
|
|
70
|
+
* question about proportion, not about a dollar figure — and a reader asked
|
|
71
|
+
* to divide two numbers in their head does not do it.
|
|
72
|
+
*
|
|
73
|
+
* `turns` is kept beside the money on purpose: a tier that is a third of the
|
|
74
|
+
* traffic and two thirds of the bill is the finding, and neither column says
|
|
75
|
+
* that alone.
|
|
76
|
+
*
|
|
77
|
+
* ## Full width, and stacked rather than side by side
|
|
78
|
+
*
|
|
79
|
+
* Both breakdowns split the SAME total, so the reader's act is scanning one
|
|
80
|
+
* against the other: does the tier carrying the turns also carry the money,
|
|
81
|
+
* and would a cheaper model on the common path move it. Two tables squeezed
|
|
82
|
+
* into thirds of a row put each Cost column at a different horizontal
|
|
83
|
+
* position, so that comparison becomes two separate readings held in the
|
|
84
|
+
* head. Stacked full-width, the Cost and Share columns of both land on the
|
|
85
|
+
* same axis and the comparison is a glance down the page.
|
|
86
|
+
*
|
|
87
|
+
* ## Why the caption is not a row of the table
|
|
88
|
+
*
|
|
89
|
+
* It used to be a `colSpan={4}` cell in `TableHead`, which gave it header
|
|
90
|
+
* styling and made the header two rows deep — so this table's head sat at a
|
|
91
|
+
* different weight and height from the four sibling tables on the same page,
|
|
92
|
+
* which is most of what made the card read as a foreign fragment.
|
|
93
|
+
*
|
|
94
|
+
* ## No footer, and why
|
|
95
|
+
*
|
|
96
|
+
* A breakdown has one row per tier and one per model — single digits, and
|
|
97
|
+
* bounded by the vocabulary rather than by a collection that grows. There is
|
|
98
|
+
* no page two to go to, and a pager over four rows is furniture that teaches
|
|
99
|
+
* a reader to look for pages that never exist.
|
|
100
|
+
*/ function CostSplitTable({ caption, label, rows, totalUsd }) {
|
|
101
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
102
|
+
spacing: 1,
|
|
103
|
+
sx: {
|
|
104
|
+
width: '100%'
|
|
105
|
+
},
|
|
106
|
+
children: [
|
|
107
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
108
|
+
variant: "subtitle2",
|
|
109
|
+
children: caption
|
|
110
|
+
}),
|
|
111
|
+
/*#__PURE__*/ _jsxs(ScrollTable, {
|
|
112
|
+
size: "small",
|
|
113
|
+
children: [
|
|
114
|
+
/*#__PURE__*/ _jsx(TableHead, {
|
|
115
|
+
children: /*#__PURE__*/ _jsxs(TableRow, {
|
|
116
|
+
children: [
|
|
117
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
118
|
+
children: label
|
|
119
|
+
}),
|
|
120
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
121
|
+
align: "right",
|
|
122
|
+
children: "Turns"
|
|
123
|
+
}),
|
|
124
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
125
|
+
align: "right",
|
|
126
|
+
children: "Cost"
|
|
127
|
+
}),
|
|
128
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
129
|
+
align: "right",
|
|
130
|
+
children: "Share"
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
})
|
|
134
|
+
}),
|
|
135
|
+
/*#__PURE__*/ _jsx(TableBody, {
|
|
136
|
+
children: !rows.length ? /*#__PURE__*/ _jsx(TableRow, {
|
|
137
|
+
children: /*#__PURE__*/ _jsx(TableCell, {
|
|
138
|
+
colSpan: 4,
|
|
139
|
+
children: /*#__PURE__*/ _jsx(Typography, {
|
|
140
|
+
variant: "body2",
|
|
141
|
+
color: "text.secondary",
|
|
142
|
+
children: "No turns in this sample."
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
}) : rows.map((row)=>/*#__PURE__*/ _jsxs(TableRow, {
|
|
146
|
+
children: [
|
|
147
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
148
|
+
children: row.key
|
|
149
|
+
}),
|
|
150
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
151
|
+
align: "right",
|
|
152
|
+
children: row.messages.toLocaleString()
|
|
153
|
+
}),
|
|
154
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
155
|
+
align: "right",
|
|
156
|
+
children: money(row.providerCostUsd)
|
|
157
|
+
}),
|
|
158
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
159
|
+
align: "right",
|
|
160
|
+
children: percent(totalUsd > 0 ? row.providerCostUsd / totalUsd : null)
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
}, row.key))
|
|
164
|
+
})
|
|
165
|
+
]
|
|
166
|
+
})
|
|
167
|
+
]
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* The count line under a RANKED table — how much of the ranking is on screen.
|
|
172
|
+
*
|
|
173
|
+
* These three tables are not paged, and the reason is the same for all of
|
|
174
|
+
* them: each is a ranking whose value is its top. Page two of "where are the
|
|
175
|
+
* docs thin" is, by construction, the pages least worth rewriting, and a
|
|
176
|
+
* pager over a ranking invites a reader to walk it as if position carried no
|
|
177
|
+
* meaning. What a pager WOULD have given honestly is the count — how much of
|
|
178
|
+
* this am I looking at, and is there more — so that is what this says, and it
|
|
179
|
+
* says it whether or not the ranking was cut.
|
|
180
|
+
*
|
|
181
|
+
* Rendered even when nothing was cut. A disclosure that appears only on
|
|
182
|
+
* truncation is one a reader has never seen before the day it matters, and
|
|
183
|
+
* cannot tell from a card that simply has no footer.
|
|
184
|
+
*/ function RankingFootnote({ shown, total, noun }) {
|
|
185
|
+
if (!total) return null;
|
|
186
|
+
const counted = `${total.toLocaleString()} ${total === 1 ? noun.one : noun.many}`;
|
|
187
|
+
return /*#__PURE__*/ _jsx(Typography, {
|
|
188
|
+
variant: "caption",
|
|
189
|
+
color: "text.secondary",
|
|
190
|
+
children: shown >= total ? `Showing all ${counted}.` : `Showing the top ${shown.toLocaleString()} of ${counted}. This is a ranking, not a page — what is past the cut is what it ranked lowest.`
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
export function AssistSignalsPage(_props) {
|
|
194
|
+
var _ref, _ref1, _ref2, _totals_deflected, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10;
|
|
195
|
+
var _spend_rows, _spend_rows1, _report_docsGaps, _report_docsGaps1, _report_ranked, _report_ungrounded_routes, _report_ungrounded, _report_ungrounded_routes1, _report_ungrounded1, _report_ranked1, _report_orgs, _report_orgs1, _report_ranked2;
|
|
196
|
+
const { data: user } = useUser();
|
|
197
|
+
// Keyed on who is signed in, not on the user object's identity.
|
|
198
|
+
const signedInUid = (_ref = user == null ? void 0 : user.uid) != null ? _ref : null;
|
|
199
|
+
const userRef = useRef(user);
|
|
200
|
+
userRef.current = user;
|
|
201
|
+
const [report, setReport] = useState(null);
|
|
202
|
+
const [error, setError] = useState(null);
|
|
203
|
+
const [loading, setLoading] = useState(false);
|
|
204
|
+
useEffect(()=>{
|
|
205
|
+
// Mounted only for a confirmed staff reader: the generic staff route
|
|
206
|
+
// renders this inside `StaffOnly`, which draws nothing while the claim
|
|
207
|
+
// loads, so no request is fired from the loading default.
|
|
208
|
+
const user = userRef.current;
|
|
209
|
+
if (!signedInUid || !user) return undefined;
|
|
210
|
+
let active = true;
|
|
211
|
+
void (async ()=>{
|
|
212
|
+
setLoading(true);
|
|
213
|
+
setError(null);
|
|
214
|
+
try {
|
|
215
|
+
const response = await authorizedFetch(user, '/api/ai/admin/signals');
|
|
216
|
+
const body = await response.json().catch(()=>null);
|
|
217
|
+
if (!active) return;
|
|
218
|
+
if (!response.ok) {
|
|
219
|
+
var _ref;
|
|
220
|
+
setError((_ref = body == null ? void 0 : body.error) != null ? _ref : 'Assist signal lookup failed');
|
|
221
|
+
} else {
|
|
222
|
+
setReport(body);
|
|
223
|
+
}
|
|
224
|
+
} catch (unused) {
|
|
225
|
+
if (active) setError('Assist signal lookup failed');
|
|
226
|
+
} finally{
|
|
227
|
+
if (active) setLoading(false);
|
|
228
|
+
}
|
|
229
|
+
})();
|
|
230
|
+
return ()=>{
|
|
231
|
+
active = false;
|
|
232
|
+
};
|
|
233
|
+
}, [
|
|
234
|
+
signedInUid
|
|
235
|
+
]);
|
|
236
|
+
const totals = report == null ? void 0 : report.totals;
|
|
237
|
+
// The route serves the prose beside the report (AGL-2314) — it is not part
|
|
238
|
+
// of the pure miner's output, because the miner never touches Firestore.
|
|
239
|
+
const prose = (_ref1 = report == null ? void 0 : report.prose) != null ? _ref1 : [];
|
|
240
|
+
// The month's spend leaderboard (AGL-2930), likewise served beside the
|
|
241
|
+
// report: it reads the month documents, which the miner never sees.
|
|
242
|
+
const spend = (_ref2 = report == null ? void 0 : report.spend) != null ? _ref2 : null;
|
|
243
|
+
// Absent from a route older than the page, which reads as no kinds.
|
|
244
|
+
const kindRows = (totals == null ? void 0 : totals.byKind) ? kindTokenRows(totals.byKind) : [];
|
|
245
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
246
|
+
spacing: 3,
|
|
247
|
+
children: [
|
|
248
|
+
loading && /*#__PURE__*/ _jsx(LinearProgress, {}),
|
|
249
|
+
error && /*#__PURE__*/ _jsx(Alert, {
|
|
250
|
+
severity: "error",
|
|
251
|
+
children: error
|
|
252
|
+
}),
|
|
253
|
+
(report == null ? void 0 : report.truncated) && // Never a silent partial. A ranking cut short looks exactly
|
|
254
|
+
// like a complete one, and this one decides where docs effort
|
|
255
|
+
// goes.
|
|
256
|
+
/*#__PURE__*/ _jsx(Alert, {
|
|
257
|
+
severity: "warning",
|
|
258
|
+
children: `Ranked the first ${report.scanned.toLocaleString()} signals only — there are more. Every number below describes that sample, not the fleet.`
|
|
259
|
+
}),
|
|
260
|
+
/*#__PURE__*/ _jsx(CardDisplay, {
|
|
261
|
+
header: 'Fleet',
|
|
262
|
+
help: pluginDocsHelp('assistSignals', {
|
|
263
|
+
anchor: '#fleet'
|
|
264
|
+
}),
|
|
265
|
+
contentGutterX: true,
|
|
266
|
+
contentGutterY: true,
|
|
267
|
+
children: !totals ? /*#__PURE__*/ _jsx(Typography, {
|
|
268
|
+
variant: "body2",
|
|
269
|
+
color: "text.secondary",
|
|
270
|
+
children: loading ? 'Reading signals…' : 'No assist turns recorded yet.'
|
|
271
|
+
}) : // Neither `gap` nor `flexWrap` is a Stack prop under MUI 9
|
|
272
|
+
// — both go through `sx` or it is a typecheck error.
|
|
273
|
+
// AGL-1891 is the same drift, in the Assist panel itself.
|
|
274
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
275
|
+
direction: "row",
|
|
276
|
+
sx: {
|
|
277
|
+
flexWrap: 'wrap',
|
|
278
|
+
gap: 1
|
|
279
|
+
},
|
|
280
|
+
children: [
|
|
281
|
+
/*#__PURE__*/ _jsx(Chip, {
|
|
282
|
+
label: `${totals.messages.toLocaleString()} turns`
|
|
283
|
+
}),
|
|
284
|
+
/*#__PURE__*/ _jsx(Chip, {
|
|
285
|
+
label: `${money(totals.providerCostUsd)} estimated`
|
|
286
|
+
}),
|
|
287
|
+
/*#__PURE__*/ _jsx(Chip, {
|
|
288
|
+
// `?? 0` on the count, and it is not defensive noise: this
|
|
289
|
+
// whole object is JSON off `/api/ai/admin/signals`,
|
|
290
|
+
// and a chip that throws on a missing number takes the
|
|
291
|
+
// ENTIRE staff page down with it rather than rendering a
|
|
292
|
+
// dash. The rate beside it is legitimately nullable —
|
|
293
|
+
// `percent` renders that — so the two are handled
|
|
294
|
+
// differently on purpose.
|
|
295
|
+
label: `answered free ${percent(totals.deflectionRate)} (${((_totals_deflected = totals.deflected) != null ? _totals_deflected : 0).toLocaleString()})`,
|
|
296
|
+
color: totals.deflectionRate != null && totals.deflectionRate > 0.5 ? 'success' : 'default'
|
|
297
|
+
}),
|
|
298
|
+
/*#__PURE__*/ _jsx(Chip, {
|
|
299
|
+
label: `${totals.inputTokens.toLocaleString()} in / ${totals.outputTokens.toLocaleString()} out`
|
|
300
|
+
}),
|
|
301
|
+
/*#__PURE__*/ _jsx(Chip, {
|
|
302
|
+
label: `cache reads ${percent(totals.cacheReadRate)}`,
|
|
303
|
+
color: totals.cacheReadRate != null && totals.cacheReadRate > 0.5 ? 'success' : 'default'
|
|
304
|
+
}),
|
|
305
|
+
/*#__PURE__*/ _jsx(Chip, {
|
|
306
|
+
label: `cache writes ${totals.cacheWriteTokens.toLocaleString()}`
|
|
307
|
+
}),
|
|
308
|
+
/*#__PURE__*/ _jsx(Chip, {
|
|
309
|
+
label: `👍 ${totals.feedback.up} · 👎 ${totals.feedback.down} · unrated ${totals.feedback.none}`
|
|
310
|
+
}),
|
|
311
|
+
Object.entries(totals.stopReasons).map(([reason, count])=>/*#__PURE__*/ _jsx(Chip, {
|
|
312
|
+
size: "small",
|
|
313
|
+
// A refusal and a truncation both read as a short
|
|
314
|
+
// answer in the data and need opposite fixes: a rising
|
|
315
|
+
// refusal rate is a prompt problem, a rising max_tokens
|
|
316
|
+
// rate is a ceiling problem.
|
|
317
|
+
color: reason === 'refusal' || reason === 'max_tokens' ? 'warning' : 'default',
|
|
318
|
+
label: `${reason}: ${count}`
|
|
319
|
+
}, reason)),
|
|
320
|
+
report.freeSpend ? /*#__PURE__*/ _jsx(Chip, {
|
|
321
|
+
color: report.freeSpend.paused ? 'error' : report.freeSpend.alerted ? 'warning' : 'default',
|
|
322
|
+
label: `free tier today ${money(report.freeSpend.estCostUsd)} of ` + `${money(report.freeSpend.ceilingUsd)} ceiling · ` + `${report.freeSpend.requests.toLocaleString()} requests` + (report.freeSpend.paused ? ' · PAUSED until tomorrow' : '')
|
|
323
|
+
}) : null
|
|
324
|
+
]
|
|
325
|
+
})
|
|
326
|
+
}),
|
|
327
|
+
/*#__PURE__*/ _jsxs(CardDisplay, {
|
|
328
|
+
header: `AI spend this month, by workspace${spend ? ` · ${spend.month}` : ''}`,
|
|
329
|
+
help: pluginDocsHelp('aiMonitoring', {
|
|
330
|
+
anchor: '#the-spend-leaderboard'
|
|
331
|
+
}),
|
|
332
|
+
contentGutterX: true,
|
|
333
|
+
contentGutterY: true,
|
|
334
|
+
children: [
|
|
335
|
+
(spend == null ? void 0 : spend.failed) ? /*#__PURE__*/ _jsx(Alert, {
|
|
336
|
+
severity: "warning",
|
|
337
|
+
sx: {
|
|
338
|
+
mb: 1
|
|
339
|
+
},
|
|
340
|
+
children: 'Could not read this month’s spend documents — a failed read, not a month in which nobody spent.'
|
|
341
|
+
}) : (spend == null ? void 0 : spend.truncated) ? /*#__PURE__*/ _jsx(Alert, {
|
|
342
|
+
severity: "warning",
|
|
343
|
+
sx: {
|
|
344
|
+
mb: 1
|
|
345
|
+
},
|
|
346
|
+
children: 'Ranked over a sample of the month documents — there are more. This is not the whole fleet.'
|
|
347
|
+
}) : null,
|
|
348
|
+
/*#__PURE__*/ _jsxs(ScrollTable, {
|
|
349
|
+
size: "small",
|
|
350
|
+
children: [
|
|
351
|
+
/*#__PURE__*/ _jsx(TableHead, {
|
|
352
|
+
children: /*#__PURE__*/ _jsxs(TableRow, {
|
|
353
|
+
children: [
|
|
354
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
355
|
+
children: "Workspace"
|
|
356
|
+
}),
|
|
357
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
358
|
+
children: "Plan"
|
|
359
|
+
}),
|
|
360
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
361
|
+
children: aiAddonName()
|
|
362
|
+
}),
|
|
363
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
364
|
+
align: "right",
|
|
365
|
+
children: "Credits"
|
|
366
|
+
}),
|
|
367
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
368
|
+
align: "right",
|
|
369
|
+
children: "Cost"
|
|
370
|
+
}),
|
|
371
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
372
|
+
align: "right",
|
|
373
|
+
children: "Refusals"
|
|
374
|
+
})
|
|
375
|
+
]
|
|
376
|
+
})
|
|
377
|
+
}),
|
|
378
|
+
/*#__PURE__*/ _jsx(TableBody, {
|
|
379
|
+
children: !(spend == null ? void 0 : (_spend_rows = spend.rows) == null ? void 0 : _spend_rows.length) ? /*#__PURE__*/ _jsx(TableRow, {
|
|
380
|
+
children: /*#__PURE__*/ _jsx(TableCell, {
|
|
381
|
+
colSpan: 6,
|
|
382
|
+
children: /*#__PURE__*/ _jsx(Typography, {
|
|
383
|
+
variant: "body2",
|
|
384
|
+
color: "text.secondary",
|
|
385
|
+
children: "No workspace has spent AI credits this month."
|
|
386
|
+
})
|
|
387
|
+
})
|
|
388
|
+
}) : spend.rows.map((row)=>{
|
|
389
|
+
var _row_orgLabel;
|
|
390
|
+
return /*#__PURE__*/ _jsxs(TableRow, {
|
|
391
|
+
children: [
|
|
392
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
393
|
+
children: (_row_orgLabel = row.orgLabel) != null ? _row_orgLabel : row.orgId
|
|
394
|
+
}),
|
|
395
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
396
|
+
children: row.plan
|
|
397
|
+
}),
|
|
398
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
399
|
+
children: /*#__PURE__*/ _jsx(Chip, {
|
|
400
|
+
size: "small",
|
|
401
|
+
variant: row.aiAddon ? 'filled' : 'outlined',
|
|
402
|
+
color: row.aiAddon ? 'primary' : 'default',
|
|
403
|
+
label: row.aiAddon ? 'on' : 'off'
|
|
404
|
+
})
|
|
405
|
+
}),
|
|
406
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
407
|
+
align: "right",
|
|
408
|
+
children: row.credits.toLocaleString()
|
|
409
|
+
}),
|
|
410
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
411
|
+
align: "right",
|
|
412
|
+
sx: {
|
|
413
|
+
fontFamily: 'monospace'
|
|
414
|
+
},
|
|
415
|
+
children: money(row.providerCostUsd)
|
|
416
|
+
}),
|
|
417
|
+
/*#__PURE__*/ _jsxs(TableCell, {
|
|
418
|
+
align: "right",
|
|
419
|
+
children: [
|
|
420
|
+
row.refusals.total.toLocaleString(),
|
|
421
|
+
row.refusals.total > 0 ? /*#__PURE__*/ _jsx(Typography, {
|
|
422
|
+
variant: "caption",
|
|
423
|
+
color: "text.secondary",
|
|
424
|
+
sx: {
|
|
425
|
+
display: 'block'
|
|
426
|
+
},
|
|
427
|
+
children: `band ${row.refusals.band} · ceiling ${row.refusals.cap} · messages ${row.refusals.messages} · backstop ${row.refusals.budget}${row.refusals.allotment > 0 ? ` · allotments ${row.refusals.allotment}` : ''}${freeTasteRefusals(row.refusals) > 0 ? ` · free taste ${freeTasteRefusals(row.refusals)}` : ''}`
|
|
428
|
+
}) : null
|
|
429
|
+
]
|
|
430
|
+
})
|
|
431
|
+
]
|
|
432
|
+
}, row.orgId);
|
|
433
|
+
})
|
|
434
|
+
})
|
|
435
|
+
]
|
|
436
|
+
}),
|
|
437
|
+
/*#__PURE__*/ _jsx(RankingFootnote, {
|
|
438
|
+
shown: (_ref3 = spend == null ? void 0 : (_spend_rows1 = spend.rows) == null ? void 0 : _spend_rows1.length) != null ? _ref3 : 0,
|
|
439
|
+
total: (_ref4 = spend == null ? void 0 : spend.ranked) != null ? _ref4 : 0,
|
|
440
|
+
noun: {
|
|
441
|
+
one: 'workspace',
|
|
442
|
+
many: 'workspaces'
|
|
443
|
+
}
|
|
444
|
+
})
|
|
445
|
+
]
|
|
446
|
+
}),
|
|
447
|
+
/*#__PURE__*/ _jsxs(CardDisplay, {
|
|
448
|
+
header: 'Where the money goes',
|
|
449
|
+
help: pluginDocsHelp('assistSignals', {
|
|
450
|
+
anchor: '#where-the-money-goes'
|
|
451
|
+
}),
|
|
452
|
+
contentGutterX: true,
|
|
453
|
+
contentGutterY: true,
|
|
454
|
+
children: [
|
|
455
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
456
|
+
variant: "body2",
|
|
457
|
+
color: "text.secondary",
|
|
458
|
+
gutterBottom: true,
|
|
459
|
+
children: "The same spend split two ways. By tier answers whether the free cap or the paid price is the lever; by model answers whether a cheaper model on the common path would do — the one lever that never reaches the customer."
|
|
460
|
+
}),
|
|
461
|
+
!totals ? /*#__PURE__*/ _jsx(Typography, {
|
|
462
|
+
variant: "body2",
|
|
463
|
+
color: "text.secondary",
|
|
464
|
+
children: loading ? 'Reading signals…' : 'No assist turns recorded yet.'
|
|
465
|
+
}) : totals.providerCostUsd === 0 ? /*
|
|
466
|
+
* ZERO SPEND IS A FINDING, NOT AN EMPTY TABLE.
|
|
467
|
+
*
|
|
468
|
+
* Rendered as a sentence rather than two grids of `$0.0000`
|
|
469
|
+
* and em dashes. A share column is a proportion of the total,
|
|
470
|
+
* and there is no proportion of nothing — so the grid could
|
|
471
|
+
* only ever print a dash in every cell, which reads as a card
|
|
472
|
+
* that failed rather than as a bill that is genuinely zero.
|
|
473
|
+
*
|
|
474
|
+
* The two zeros mean OPPOSITE things and are separated here.
|
|
475
|
+
* Every turn deflected is the deflection path working: those
|
|
476
|
+
* turns were answered from the docs index or the answer cache
|
|
477
|
+
* with no provider call, so nothing was spent because nothing
|
|
478
|
+
* was bought. A turn that reached a model and still priced at
|
|
479
|
+
* zero is the other case — the model is missing from the
|
|
480
|
+
* model catalog's rates and its spend is landing nowhere,
|
|
481
|
+
* which is a hole in the meter and must not be reported as
|
|
482
|
+
* thrift.
|
|
483
|
+
*/ /*#__PURE__*/ _jsx(Typography, {
|
|
484
|
+
variant: "body2",
|
|
485
|
+
color: "text.secondary",
|
|
486
|
+
children: totals.deflected >= totals.messages ? `Nothing spent on these ${totals.messages.toLocaleString()} turns — every one was answered from the docs index or the answer cache, with no model call. There is no split to show until a turn reaches a provider.` : `${(totals.messages - totals.deflected).toLocaleString()} of ${totals.messages.toLocaleString()} turns reached a model and every one priced at $0. That is a gap in the rate table, not a saving — the serving model has no entry in the cost model, so its spend is landing nowhere.`
|
|
487
|
+
}) : /*#__PURE__*/ _jsxs(Stack, {
|
|
488
|
+
spacing: 3,
|
|
489
|
+
children: [
|
|
490
|
+
/*#__PURE__*/ _jsx(CostSplitTable, {
|
|
491
|
+
caption: "By tier",
|
|
492
|
+
label: "Tier",
|
|
493
|
+
rows: costSplitRows(totals.byTier),
|
|
494
|
+
totalUsd: totals.providerCostUsd
|
|
495
|
+
}),
|
|
496
|
+
/*#__PURE__*/ _jsx(CostSplitTable, {
|
|
497
|
+
caption: "By model",
|
|
498
|
+
label: "Model",
|
|
499
|
+
rows: costSplitRows(totals.byModel),
|
|
500
|
+
totalUsd: totals.providerCostUsd
|
|
501
|
+
})
|
|
502
|
+
]
|
|
503
|
+
})
|
|
504
|
+
]
|
|
505
|
+
}),
|
|
506
|
+
/*#__PURE__*/ _jsxs(CardDisplay, {
|
|
507
|
+
header: 'Tokens by kind',
|
|
508
|
+
help: pluginDocsHelp('assistSignals', {
|
|
509
|
+
anchor: '#tokens-by-kind'
|
|
510
|
+
}),
|
|
511
|
+
contentGutterX: true,
|
|
512
|
+
contentGutterY: true,
|
|
513
|
+
children: [
|
|
514
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
515
|
+
variant: "body2",
|
|
516
|
+
color: "text.secondary",
|
|
517
|
+
gutterBottom: true,
|
|
518
|
+
children: "What each kind of model request costs per request, what its prompts and answers weigh, how much of its prompt the cache served, and the answer size 95 of every 100 requests stayed within — the figure its output ceiling is sized against."
|
|
519
|
+
}),
|
|
520
|
+
/*#__PURE__*/ _jsxs(ScrollTable, {
|
|
521
|
+
size: "small",
|
|
522
|
+
children: [
|
|
523
|
+
/*#__PURE__*/ _jsx(TableHead, {
|
|
524
|
+
children: /*#__PURE__*/ _jsxs(TableRow, {
|
|
525
|
+
children: [
|
|
526
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
527
|
+
children: "Kind"
|
|
528
|
+
}),
|
|
529
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
530
|
+
align: "right",
|
|
531
|
+
children: "Requests"
|
|
532
|
+
}),
|
|
533
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
534
|
+
align: "right",
|
|
535
|
+
children: "Per request"
|
|
536
|
+
}),
|
|
537
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
538
|
+
align: "right",
|
|
539
|
+
children: "In"
|
|
540
|
+
}),
|
|
541
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
542
|
+
align: "right",
|
|
543
|
+
children: "Cache reads"
|
|
544
|
+
}),
|
|
545
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
546
|
+
align: "right",
|
|
547
|
+
children: "Cache writes"
|
|
548
|
+
}),
|
|
549
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
550
|
+
align: "right",
|
|
551
|
+
children: "Out"
|
|
552
|
+
}),
|
|
553
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
554
|
+
align: "right",
|
|
555
|
+
children: "p95 out"
|
|
556
|
+
}),
|
|
557
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
558
|
+
align: "right",
|
|
559
|
+
children: "Cache hit"
|
|
560
|
+
})
|
|
561
|
+
]
|
|
562
|
+
})
|
|
563
|
+
}),
|
|
564
|
+
/*#__PURE__*/ _jsx(TableBody, {
|
|
565
|
+
children: !kindRows.length ? /*#__PURE__*/ _jsx(TableRow, {
|
|
566
|
+
children: /*#__PURE__*/ _jsx(TableCell, {
|
|
567
|
+
colSpan: 9,
|
|
568
|
+
children: /*#__PURE__*/ _jsx(Typography, {
|
|
569
|
+
variant: "body2",
|
|
570
|
+
color: "text.secondary",
|
|
571
|
+
children: "No model turns in this sample."
|
|
572
|
+
})
|
|
573
|
+
})
|
|
574
|
+
}) : kindRows.map((row)=>/*#__PURE__*/ _jsxs(TableRow, {
|
|
575
|
+
children: [
|
|
576
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
577
|
+
children: row.kind
|
|
578
|
+
}),
|
|
579
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
580
|
+
align: "right",
|
|
581
|
+
children: row.messages.toLocaleString()
|
|
582
|
+
}),
|
|
583
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
584
|
+
align: "right",
|
|
585
|
+
sx: {
|
|
586
|
+
fontFamily: 'monospace'
|
|
587
|
+
},
|
|
588
|
+
children: money(row.messages ? row.providerCostUsd / row.messages : 0)
|
|
589
|
+
}),
|
|
590
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
591
|
+
align: "right",
|
|
592
|
+
children: row.inputTokens.toLocaleString()
|
|
593
|
+
}),
|
|
594
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
595
|
+
align: "right",
|
|
596
|
+
children: row.cacheReadTokens.toLocaleString()
|
|
597
|
+
}),
|
|
598
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
599
|
+
align: "right",
|
|
600
|
+
children: row.cacheWriteTokens.toLocaleString()
|
|
601
|
+
}),
|
|
602
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
603
|
+
align: "right",
|
|
604
|
+
children: row.outputTokens.toLocaleString()
|
|
605
|
+
}),
|
|
606
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
607
|
+
align: "right",
|
|
608
|
+
children: row.outputP95.toLocaleString()
|
|
609
|
+
}),
|
|
610
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
611
|
+
align: "right",
|
|
612
|
+
children: percent(row.cacheHitRate)
|
|
613
|
+
})
|
|
614
|
+
]
|
|
615
|
+
}, row.kind))
|
|
616
|
+
})
|
|
617
|
+
]
|
|
618
|
+
})
|
|
619
|
+
]
|
|
620
|
+
}),
|
|
621
|
+
/*#__PURE__*/ _jsxs(CardDisplay, {
|
|
622
|
+
header: 'Docs gaps',
|
|
623
|
+
help: pluginDocsHelp('assistSignals', {
|
|
624
|
+
anchor: '#docs-gaps'
|
|
625
|
+
}),
|
|
626
|
+
contentGutterX: true,
|
|
627
|
+
contentGutterY: true,
|
|
628
|
+
children: [
|
|
629
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
630
|
+
variant: "body2",
|
|
631
|
+
color: "text.secondary",
|
|
632
|
+
gutterBottom: true,
|
|
633
|
+
children: "Cited pages ranked by thumbs-down, then by how often a question landed there. A page near the top is being found and is not answering — that is a docs issue with its evidence attached."
|
|
634
|
+
}),
|
|
635
|
+
/*#__PURE__*/ _jsxs(ScrollTable, {
|
|
636
|
+
size: "small",
|
|
637
|
+
children: [
|
|
638
|
+
/*#__PURE__*/ _jsx(TableHead, {
|
|
639
|
+
children: /*#__PURE__*/ _jsxs(TableRow, {
|
|
640
|
+
children: [
|
|
641
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
642
|
+
children: "Docs page"
|
|
643
|
+
}),
|
|
644
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
645
|
+
align: "right",
|
|
646
|
+
children: "Questions"
|
|
647
|
+
}),
|
|
648
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
649
|
+
align: "right",
|
|
650
|
+
children: "👍"
|
|
651
|
+
}),
|
|
652
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
653
|
+
align: "right",
|
|
654
|
+
children: "👎"
|
|
655
|
+
}),
|
|
656
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
657
|
+
align: "right",
|
|
658
|
+
children: "Down rate"
|
|
659
|
+
}),
|
|
660
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
661
|
+
align: "right",
|
|
662
|
+
children: "Orgs"
|
|
663
|
+
}),
|
|
664
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
665
|
+
align: "right",
|
|
666
|
+
children: "Cost"
|
|
667
|
+
})
|
|
668
|
+
]
|
|
669
|
+
})
|
|
670
|
+
}),
|
|
671
|
+
/*#__PURE__*/ _jsx(TableBody, {
|
|
672
|
+
children: !(report == null ? void 0 : (_report_docsGaps = report.docsGaps) == null ? void 0 : _report_docsGaps.length) ? /*#__PURE__*/ _jsx(TableRow, {
|
|
673
|
+
children: /*#__PURE__*/ _jsx(TableCell, {
|
|
674
|
+
colSpan: 7,
|
|
675
|
+
children: /*#__PURE__*/ _jsx(Typography, {
|
|
676
|
+
variant: "body2",
|
|
677
|
+
color: "text.secondary",
|
|
678
|
+
children: "Nothing cited yet."
|
|
679
|
+
})
|
|
680
|
+
})
|
|
681
|
+
}) : report.docsGaps.map((row)=>/*#__PURE__*/ _jsxs(TableRow, {
|
|
682
|
+
children: [
|
|
683
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
684
|
+
sx: {
|
|
685
|
+
fontFamily: 'monospace'
|
|
686
|
+
},
|
|
687
|
+
children: row.path
|
|
688
|
+
}),
|
|
689
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
690
|
+
align: "right",
|
|
691
|
+
children: row.questions
|
|
692
|
+
}),
|
|
693
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
694
|
+
align: "right",
|
|
695
|
+
children: row.up
|
|
696
|
+
}),
|
|
697
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
698
|
+
align: "right",
|
|
699
|
+
children: row.down
|
|
700
|
+
}),
|
|
701
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
702
|
+
align: "right",
|
|
703
|
+
children: percent(row.downRate)
|
|
704
|
+
}),
|
|
705
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
706
|
+
align: "right",
|
|
707
|
+
children: row.orgs
|
|
708
|
+
}),
|
|
709
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
710
|
+
align: "right",
|
|
711
|
+
sx: {
|
|
712
|
+
fontFamily: 'monospace'
|
|
713
|
+
},
|
|
714
|
+
children: money(row.providerCostUsd)
|
|
715
|
+
})
|
|
716
|
+
]
|
|
717
|
+
}, row.path))
|
|
718
|
+
})
|
|
719
|
+
]
|
|
720
|
+
}),
|
|
721
|
+
/*#__PURE__*/ _jsx(RankingFootnote, {
|
|
722
|
+
shown: (_ref5 = report == null ? void 0 : (_report_docsGaps1 = report.docsGaps) == null ? void 0 : _report_docsGaps1.length) != null ? _ref5 : 0,
|
|
723
|
+
total: (_ref6 = report == null ? void 0 : (_report_ranked = report.ranked) == null ? void 0 : _report_ranked.docsGaps) != null ? _ref6 : 0,
|
|
724
|
+
noun: {
|
|
725
|
+
one: 'cited page',
|
|
726
|
+
many: 'cited pages'
|
|
727
|
+
}
|
|
728
|
+
})
|
|
729
|
+
]
|
|
730
|
+
}),
|
|
731
|
+
/*#__PURE__*/ _jsxs(CardDisplay, {
|
|
732
|
+
header: 'Questions the docs could not answer',
|
|
733
|
+
help: pluginDocsHelp('assistSignals', {
|
|
734
|
+
anchor: '#questions-the-docs-could-not-answer'
|
|
735
|
+
}),
|
|
736
|
+
contentGutterX: true,
|
|
737
|
+
contentGutterY: true,
|
|
738
|
+
children: [
|
|
739
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
740
|
+
variant: "body2",
|
|
741
|
+
color: "text.secondary",
|
|
742
|
+
gutterBottom: true,
|
|
743
|
+
children: report ? `${report.ungrounded.questions.toLocaleString()} turns matched no documentation at all, ${report.ungrounded.down} of them rated down. These cite no page, so they cannot appear in the ranking above — a missing page is invisible to anything keyed on paths.` : 'Turns where retrieval matched no documentation at all.'
|
|
744
|
+
}),
|
|
745
|
+
/*#__PURE__*/ _jsxs(ScrollTable, {
|
|
746
|
+
size: "small",
|
|
747
|
+
children: [
|
|
748
|
+
/*#__PURE__*/ _jsx(TableHead, {
|
|
749
|
+
children: /*#__PURE__*/ _jsxs(TableRow, {
|
|
750
|
+
children: [
|
|
751
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
752
|
+
children: "Asked from"
|
|
753
|
+
}),
|
|
754
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
755
|
+
align: "right",
|
|
756
|
+
children: "Questions"
|
|
757
|
+
}),
|
|
758
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
759
|
+
align: "right",
|
|
760
|
+
children: "👎"
|
|
761
|
+
})
|
|
762
|
+
]
|
|
763
|
+
})
|
|
764
|
+
}),
|
|
765
|
+
/*#__PURE__*/ _jsx(TableBody, {
|
|
766
|
+
children: !(report == null ? void 0 : (_report_ungrounded = report.ungrounded) == null ? void 0 : (_report_ungrounded_routes = _report_ungrounded.routes) == null ? void 0 : _report_ungrounded_routes.length) ? /*#__PURE__*/ _jsx(TableRow, {
|
|
767
|
+
children: /*#__PURE__*/ _jsx(TableCell, {
|
|
768
|
+
colSpan: 3,
|
|
769
|
+
children: /*#__PURE__*/ _jsx(Typography, {
|
|
770
|
+
variant: "body2",
|
|
771
|
+
color: "text.secondary",
|
|
772
|
+
children: "Every question so far matched something."
|
|
773
|
+
})
|
|
774
|
+
})
|
|
775
|
+
}) : report.ungrounded.routes.map((row)=>/*#__PURE__*/ _jsxs(TableRow, {
|
|
776
|
+
children: [
|
|
777
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
778
|
+
sx: {
|
|
779
|
+
fontFamily: 'monospace'
|
|
780
|
+
},
|
|
781
|
+
children: row.route
|
|
782
|
+
}),
|
|
783
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
784
|
+
align: "right",
|
|
785
|
+
children: row.questions
|
|
786
|
+
}),
|
|
787
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
788
|
+
align: "right",
|
|
789
|
+
children: row.down
|
|
790
|
+
})
|
|
791
|
+
]
|
|
792
|
+
}, row.route))
|
|
793
|
+
})
|
|
794
|
+
]
|
|
795
|
+
}),
|
|
796
|
+
/*#__PURE__*/ _jsx(RankingFootnote, {
|
|
797
|
+
shown: (_ref7 = report == null ? void 0 : (_report_ungrounded1 = report.ungrounded) == null ? void 0 : (_report_ungrounded_routes1 = _report_ungrounded1.routes) == null ? void 0 : _report_ungrounded_routes1.length) != null ? _ref7 : 0,
|
|
798
|
+
total: (_ref8 = report == null ? void 0 : (_report_ranked1 = report.ranked) == null ? void 0 : _report_ranked1.ungroundedRoutes) != null ? _ref8 : 0,
|
|
799
|
+
noun: {
|
|
800
|
+
one: 'screen',
|
|
801
|
+
many: 'screens'
|
|
802
|
+
}
|
|
803
|
+
})
|
|
804
|
+
]
|
|
805
|
+
}),
|
|
806
|
+
/*#__PURE__*/ _jsxs(CardDisplay, {
|
|
807
|
+
header: 'What people actually asked',
|
|
808
|
+
help: pluginDocsHelp('assistSignals', {
|
|
809
|
+
anchor: '#what-people-actually-asked'
|
|
810
|
+
}),
|
|
811
|
+
contentGutterX: true,
|
|
812
|
+
contentGutterY: true,
|
|
813
|
+
children: [
|
|
814
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
815
|
+
variant: "body2",
|
|
816
|
+
color: "text.secondary",
|
|
817
|
+
gutterBottom: true,
|
|
818
|
+
children: 'The verbatim question behind each failing turn — rated down, ' + 'or grounded in nothing. Kept for 180 days and then deleted, ' + 'so an older failure shows its counts with the words gone. ' + 'Who asked is deliberately not shown: the question is what ' + 'this is for.'
|
|
819
|
+
}),
|
|
820
|
+
!prose.length ? /*#__PURE__*/ _jsx(Typography, {
|
|
821
|
+
variant: "body2",
|
|
822
|
+
color: "text.secondary",
|
|
823
|
+
children: loading ? 'Reading exchanges…' : 'No failing turns in this sample — nothing to read.'
|
|
824
|
+
}) : /*#__PURE__*/ _jsxs(Accordion, {
|
|
825
|
+
children: [
|
|
826
|
+
/*#__PURE__*/ _jsx(AccordionSummary, {
|
|
827
|
+
expandIcon: /*#__PURE__*/ _jsx("span", {
|
|
828
|
+
"aria-hidden": true,
|
|
829
|
+
children: '▾'
|
|
830
|
+
}),
|
|
831
|
+
children: /*#__PURE__*/ _jsx(Typography, {
|
|
832
|
+
variant: "body2",
|
|
833
|
+
children: `Show ${prose.length} question${prose.length === 1 ? '' : 's'}`
|
|
834
|
+
})
|
|
835
|
+
}),
|
|
836
|
+
/*#__PURE__*/ _jsx(AccordionDetails, {
|
|
837
|
+
children: /*#__PURE__*/ _jsx(Stack, {
|
|
838
|
+
spacing: 2,
|
|
839
|
+
children: prose.map((row)=>{
|
|
840
|
+
var _row_orgLabel;
|
|
841
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
842
|
+
spacing: 0.5,
|
|
843
|
+
children: [
|
|
844
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
845
|
+
direction: "row",
|
|
846
|
+
sx: {
|
|
847
|
+
flexWrap: 'wrap',
|
|
848
|
+
gap: 1,
|
|
849
|
+
alignItems: 'center'
|
|
850
|
+
},
|
|
851
|
+
children: [
|
|
852
|
+
/*#__PURE__*/ _jsx(Chip, {
|
|
853
|
+
size: "small",
|
|
854
|
+
color: row.feedback === 'down' ? 'error' : 'default',
|
|
855
|
+
label: row.feedback === 'down' ? 'rated down' : 'no documentation matched'
|
|
856
|
+
}),
|
|
857
|
+
/*#__PURE__*/ _jsxs(Typography, {
|
|
858
|
+
variant: "caption",
|
|
859
|
+
color: "text.secondary",
|
|
860
|
+
children: [
|
|
861
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
862
|
+
component: "span",
|
|
863
|
+
sx: {
|
|
864
|
+
fontFamily: 'monospace'
|
|
865
|
+
},
|
|
866
|
+
children: row.route
|
|
867
|
+
}),
|
|
868
|
+
` · ${(_row_orgLabel = row.orgLabel) != null ? _row_orgLabel : row.orgId}`
|
|
869
|
+
]
|
|
870
|
+
})
|
|
871
|
+
]
|
|
872
|
+
}),
|
|
873
|
+
row.expired ? // Said out loud. A shortlist quietly shorter than
|
|
874
|
+
// the failure count it came from would read as
|
|
875
|
+
// "these are all the failures".
|
|
876
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
877
|
+
variant: "body2",
|
|
878
|
+
color: "text.secondary",
|
|
879
|
+
children: 'The words are past their 180-day retention and ' + 'have been deleted. The counts above still ' + 'include this turn.'
|
|
880
|
+
}) : /*#__PURE__*/ _jsxs(_Fragment, {
|
|
881
|
+
children: [
|
|
882
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
883
|
+
variant: "body2",
|
|
884
|
+
children: row.question || '(no question recorded)'
|
|
885
|
+
}),
|
|
886
|
+
row.answer ? /*#__PURE__*/ _jsx(Typography, {
|
|
887
|
+
variant: "caption",
|
|
888
|
+
color: "text.secondary",
|
|
889
|
+
children: `We said: ${row.answer}${row.answerTruncated ? '…' : ''}`
|
|
890
|
+
}) : null
|
|
891
|
+
]
|
|
892
|
+
})
|
|
893
|
+
]
|
|
894
|
+
}, `${row.orgId}:${row.exchangeId}`);
|
|
895
|
+
})
|
|
896
|
+
})
|
|
897
|
+
})
|
|
898
|
+
]
|
|
899
|
+
})
|
|
900
|
+
]
|
|
901
|
+
}),
|
|
902
|
+
/*#__PURE__*/ _jsxs(CardDisplay, {
|
|
903
|
+
header: 'What Assist costs, by workspace',
|
|
904
|
+
help: pluginDocsHelp('assistSignals', {
|
|
905
|
+
anchor: '#what-assist-costs-by-workspace'
|
|
906
|
+
}),
|
|
907
|
+
contentGutterX: true,
|
|
908
|
+
contentGutterY: true,
|
|
909
|
+
children: [
|
|
910
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
911
|
+
variant: "body2",
|
|
912
|
+
color: "text.secondary",
|
|
913
|
+
gutterBottom: true,
|
|
914
|
+
children: "Our estimated cost at the serving model's list rates — telemetry for tuning price against margin, not a bill."
|
|
915
|
+
}),
|
|
916
|
+
/*#__PURE__*/ _jsxs(ScrollTable, {
|
|
917
|
+
size: "small",
|
|
918
|
+
children: [
|
|
919
|
+
/*#__PURE__*/ _jsx(TableHead, {
|
|
920
|
+
children: /*#__PURE__*/ _jsxs(TableRow, {
|
|
921
|
+
children: [
|
|
922
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
923
|
+
children: "Workspace"
|
|
924
|
+
}),
|
|
925
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
926
|
+
align: "right",
|
|
927
|
+
children: "Turns"
|
|
928
|
+
}),
|
|
929
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
930
|
+
align: "right",
|
|
931
|
+
children: "In"
|
|
932
|
+
}),
|
|
933
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
934
|
+
align: "right",
|
|
935
|
+
children: "Out"
|
|
936
|
+
}),
|
|
937
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
938
|
+
align: "right",
|
|
939
|
+
children: "Cache reads"
|
|
940
|
+
}),
|
|
941
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
942
|
+
align: "right",
|
|
943
|
+
children: "👎"
|
|
944
|
+
}),
|
|
945
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
946
|
+
align: "right",
|
|
947
|
+
children: "Cost"
|
|
948
|
+
})
|
|
949
|
+
]
|
|
950
|
+
})
|
|
951
|
+
}),
|
|
952
|
+
/*#__PURE__*/ _jsx(TableBody, {
|
|
953
|
+
children: !(report == null ? void 0 : (_report_orgs = report.orgs) == null ? void 0 : _report_orgs.length) ? /*#__PURE__*/ _jsx(TableRow, {
|
|
954
|
+
children: /*#__PURE__*/ _jsx(TableCell, {
|
|
955
|
+
colSpan: 7,
|
|
956
|
+
children: /*#__PURE__*/ _jsx(Typography, {
|
|
957
|
+
variant: "body2",
|
|
958
|
+
color: "text.secondary",
|
|
959
|
+
children: "No workspace has used Assist yet."
|
|
960
|
+
})
|
|
961
|
+
})
|
|
962
|
+
}) : report.orgs.map((row)=>{
|
|
963
|
+
var _row_orgLabel;
|
|
964
|
+
return /*#__PURE__*/ _jsxs(TableRow, {
|
|
965
|
+
children: [
|
|
966
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
967
|
+
children: (_row_orgLabel = row.orgLabel) != null ? _row_orgLabel : row.orgId
|
|
968
|
+
}),
|
|
969
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
970
|
+
align: "right",
|
|
971
|
+
children: row.messages
|
|
972
|
+
}),
|
|
973
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
974
|
+
align: "right",
|
|
975
|
+
children: row.inputTokens.toLocaleString()
|
|
976
|
+
}),
|
|
977
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
978
|
+
align: "right",
|
|
979
|
+
children: row.outputTokens.toLocaleString()
|
|
980
|
+
}),
|
|
981
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
982
|
+
align: "right",
|
|
983
|
+
children: row.cacheReadTokens.toLocaleString()
|
|
984
|
+
}),
|
|
985
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
986
|
+
align: "right",
|
|
987
|
+
children: row.down
|
|
988
|
+
}),
|
|
989
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
990
|
+
align: "right",
|
|
991
|
+
sx: {
|
|
992
|
+
fontFamily: 'monospace'
|
|
993
|
+
},
|
|
994
|
+
children: money(row.providerCostUsd)
|
|
995
|
+
})
|
|
996
|
+
]
|
|
997
|
+
}, row.orgId);
|
|
998
|
+
})
|
|
999
|
+
})
|
|
1000
|
+
]
|
|
1001
|
+
}),
|
|
1002
|
+
/*#__PURE__*/ _jsx(RankingFootnote, {
|
|
1003
|
+
shown: (_ref9 = report == null ? void 0 : (_report_orgs1 = report.orgs) == null ? void 0 : _report_orgs1.length) != null ? _ref9 : 0,
|
|
1004
|
+
total: (_ref10 = report == null ? void 0 : (_report_ranked2 = report.ranked) == null ? void 0 : _report_ranked2.orgs) != null ? _ref10 : 0,
|
|
1005
|
+
noun: {
|
|
1006
|
+
one: 'workspace',
|
|
1007
|
+
many: 'workspaces'
|
|
1008
|
+
}
|
|
1009
|
+
})
|
|
1010
|
+
]
|
|
1011
|
+
})
|
|
1012
|
+
]
|
|
1013
|
+
});
|
|
1014
|
+
}
|
|
1015
|
+
export default AssistSignalsPage;
|
|
1016
|
+
|
|
1017
|
+
//# sourceMappingURL=assist-signals-page.component.js.map
|