@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,192 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2026 Aglyn LLC
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/ import { AI_BUILD_PLAN_CREATION_NOUNS, isAiPlanNewRef } from "../model/ai-build-plan.js";
|
|
18
|
+
import { aiJobPlanCreditEstimate } from "../model/ai-site-job.js";
|
|
19
|
+
import { Box, Button, Collapse, Stack, Typography } from "@mui/material";
|
|
20
|
+
import { useState } from "react";
|
|
21
|
+
/**
|
|
22
|
+
* Where a refused answer broke its rules, and the outline of those parts, as
|
|
23
|
+
* lines staff read (AGL-3078): each finding with the nodes or plan entries it
|
|
24
|
+
* names, then each outlined node indented by its depth, with its element, a
|
|
25
|
+
* Grid's layout as written, and the names of what it sets and holds.
|
|
26
|
+
*/ export function aiJobReviewDetails(review) {
|
|
27
|
+
var _review_outline;
|
|
28
|
+
if ((review == null ? void 0 : review.reason) !== 'doctrine') return [];
|
|
29
|
+
const lines = review.findings.flatMap((finding)=>{
|
|
30
|
+
var _finding_nodeIds, _finding_paths;
|
|
31
|
+
const where = ((_finding_nodeIds = finding.nodeIds) == null ? void 0 : _finding_nodeIds.length) ? `nodes ${finding.nodeIds.join(', ')}` : ((_finding_paths = finding.paths) == null ? void 0 : _finding_paths.length) ? `at ${finding.paths.join(', ')}` : null;
|
|
32
|
+
return where ? [
|
|
33
|
+
`${finding.rule === null ? '' : `Rule ${finding.rule} `}${finding.code}: ${where}`
|
|
34
|
+
] : [];
|
|
35
|
+
});
|
|
36
|
+
for (const node of (_review_outline = review.outline) != null ? _review_outline : []){
|
|
37
|
+
var _node_grid;
|
|
38
|
+
var _node_sx;
|
|
39
|
+
lines.push([
|
|
40
|
+
`${' '.repeat(node.depth)}${node.id} ${node.componentId}`,
|
|
41
|
+
...Object.entries((_node_grid = node.grid) != null ? _node_grid : {}).map(([name, value])=>`${name}=${JSON.stringify(value)}`),
|
|
42
|
+
...node.props.length ? [
|
|
43
|
+
`props ${node.props.join(', ')}`
|
|
44
|
+
] : [],
|
|
45
|
+
...((_node_sx = node.sx) == null ? void 0 : _node_sx.length) ? [
|
|
46
|
+
`sx ${node.sx.join(', ')}`
|
|
47
|
+
] : [],
|
|
48
|
+
...node.children.length ? [
|
|
49
|
+
`holds ${node.children.join(', ')}`
|
|
50
|
+
] : []
|
|
51
|
+
].join(' · '));
|
|
52
|
+
}
|
|
53
|
+
return lines;
|
|
54
|
+
}
|
|
55
|
+
export function AiJobPlan({ job, onResume, busy = false, staff = false }) {
|
|
56
|
+
const [detailsOpen, setDetailsOpen] = useState(false);
|
|
57
|
+
const { plan, review } = job;
|
|
58
|
+
if (!plan && !review) return null;
|
|
59
|
+
const details = staff ? aiJobReviewDetails(review) : [];
|
|
60
|
+
/** A reference as a person reads it: the record's name, or what the plan creates. */ const named = (ref)=>{
|
|
61
|
+
var _ref;
|
|
62
|
+
return !ref ? '' : isAiPlanNewRef(ref) ? ref.slice('new:'.length) : (_ref = plan == null ? void 0 : plan.labels[ref]) != null ? _ref : ref;
|
|
63
|
+
};
|
|
64
|
+
const waiting = job.status === 'needs_review' && review !== null;
|
|
65
|
+
// The guard rail (AGL-2911): what the plan is estimated to cost is read
|
|
66
|
+
// before it is confirmed, not after it has been spent. An estimate, and
|
|
67
|
+
// said to be one — the plan's own passes at the nominal credits a step
|
|
68
|
+
// holds, where what a step really costs is its model's tokens. A page job
|
|
69
|
+
// counts the creations it builds before its page (AGL-3031).
|
|
70
|
+
const estimate = plan && waiting && review.reason === 'plan' ? aiJobPlanCreditEstimate(job.kind, plan) : 0;
|
|
71
|
+
return /*#__PURE__*/ _jsxs(Box, {
|
|
72
|
+
sx: {
|
|
73
|
+
mt: 1
|
|
74
|
+
},
|
|
75
|
+
children: [
|
|
76
|
+
plan && /*#__PURE__*/ _jsxs(Stack, {
|
|
77
|
+
spacing: 0.5,
|
|
78
|
+
role: "list",
|
|
79
|
+
"aria-label": "Plan",
|
|
80
|
+
children: [
|
|
81
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
82
|
+
variant: "caption",
|
|
83
|
+
color: "text.secondary",
|
|
84
|
+
children: plan.status === 'confirmed' ? 'Confirmed plan' : 'Proposed plan'
|
|
85
|
+
}),
|
|
86
|
+
plan.reuse.map((entry, index)=>/*#__PURE__*/ _jsxs(Typography, {
|
|
87
|
+
variant: "body2",
|
|
88
|
+
role: "listitem",
|
|
89
|
+
children: [
|
|
90
|
+
"Reuses the ",
|
|
91
|
+
entry.kind,
|
|
92
|
+
" ",
|
|
93
|
+
named(entry.id),
|
|
94
|
+
" — ",
|
|
95
|
+
entry.purpose
|
|
96
|
+
]
|
|
97
|
+
}, `reuse-${index}`)),
|
|
98
|
+
plan.create.map((entry, index)=>/*#__PURE__*/ _jsxs(Typography, {
|
|
99
|
+
variant: "body2",
|
|
100
|
+
role: "listitem",
|
|
101
|
+
children: [
|
|
102
|
+
"Creates the ",
|
|
103
|
+
AI_BUILD_PLAN_CREATION_NOUNS[entry.kind].noun,
|
|
104
|
+
" ",
|
|
105
|
+
entry.name,
|
|
106
|
+
entry.duplicateOf ? `, from a copy of ${named(entry.duplicateOf)}` : '',
|
|
107
|
+
' ',
|
|
108
|
+
"— ",
|
|
109
|
+
entry.why
|
|
110
|
+
]
|
|
111
|
+
}, `create-${index}`)),
|
|
112
|
+
plan.screens.map((screen, index)=>/*#__PURE__*/ _jsxs(Typography, {
|
|
113
|
+
variant: "body2",
|
|
114
|
+
role: "listitem",
|
|
115
|
+
children: [
|
|
116
|
+
"Builds the screen ",
|
|
117
|
+
screen.title,
|
|
118
|
+
" at ",
|
|
119
|
+
screen.slug,
|
|
120
|
+
screen.layout ? ` in ${named(screen.layout)}` : '',
|
|
121
|
+
screen.sections.length ? `: ${screen.sections.map((section)=>section.name).join(', ')}` : ''
|
|
122
|
+
]
|
|
123
|
+
}, `screen-${index}`))
|
|
124
|
+
]
|
|
125
|
+
}),
|
|
126
|
+
(review == null ? void 0 : review.reason) === 'doctrine' && review.findings.length > 0 && /*#__PURE__*/ _jsx(Box, {
|
|
127
|
+
component: "ul",
|
|
128
|
+
sx: {
|
|
129
|
+
my: 0.5,
|
|
130
|
+
pl: 2.5
|
|
131
|
+
},
|
|
132
|
+
"aria-label": "Building rules broken",
|
|
133
|
+
children: review.findings.map((finding, index)=>/*#__PURE__*/ _jsx(Typography, {
|
|
134
|
+
component: "li",
|
|
135
|
+
variant: "caption",
|
|
136
|
+
children: finding.message
|
|
137
|
+
}, `finding-${index}`))
|
|
138
|
+
}),
|
|
139
|
+
details.length > 0 && /*#__PURE__*/ _jsxs(Box, {
|
|
140
|
+
sx: {
|
|
141
|
+
mt: 0.5
|
|
142
|
+
},
|
|
143
|
+
children: [
|
|
144
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
145
|
+
size: "small",
|
|
146
|
+
"aria-expanded": detailsOpen,
|
|
147
|
+
onClick: ()=>setDetailsOpen((prior)=>!prior),
|
|
148
|
+
children: detailsOpen ? 'Hide what was refused' : 'Show what was refused'
|
|
149
|
+
}),
|
|
150
|
+
/*#__PURE__*/ _jsx(Collapse, {
|
|
151
|
+
in: detailsOpen,
|
|
152
|
+
unmountOnExit: true,
|
|
153
|
+
children: /*#__PURE__*/ _jsx(Typography, {
|
|
154
|
+
variant: "caption",
|
|
155
|
+
component: "pre",
|
|
156
|
+
"aria-label": "What was refused",
|
|
157
|
+
sx: {
|
|
158
|
+
m: 0,
|
|
159
|
+
fontFamily: 'monospace',
|
|
160
|
+
whiteSpace: 'pre',
|
|
161
|
+
overflowX: 'auto'
|
|
162
|
+
},
|
|
163
|
+
children: details.join('\n')
|
|
164
|
+
})
|
|
165
|
+
})
|
|
166
|
+
]
|
|
167
|
+
}),
|
|
168
|
+
estimate > 0 && /*#__PURE__*/ _jsx(Typography, {
|
|
169
|
+
variant: "caption",
|
|
170
|
+
color: "text.secondary",
|
|
171
|
+
sx: {
|
|
172
|
+
display: 'block',
|
|
173
|
+
mt: 1
|
|
174
|
+
},
|
|
175
|
+
children: `Estimated cost: about ${estimate.toLocaleString('en-US')} credits. What it costs is what its steps spend.`
|
|
176
|
+
}),
|
|
177
|
+
waiting && /*#__PURE__*/ _jsx(Button, {
|
|
178
|
+
size: "small",
|
|
179
|
+
variant: "contained",
|
|
180
|
+
disabled: busy,
|
|
181
|
+
onClick: ()=>onResume(job),
|
|
182
|
+
sx: {
|
|
183
|
+
mt: 1
|
|
184
|
+
},
|
|
185
|
+
children: review.reason === 'plan' ? 'Confirm plan' : 'Try again'
|
|
186
|
+
})
|
|
187
|
+
]
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
export default AiJobPlan;
|
|
191
|
+
|
|
192
|
+
//# sourceMappingURL=ai-job-plan.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/components/ai-job-plan.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AI_BUILD_PLAN_CREATION_NOUNS, isAiPlanNewRef } from '../model/ai-build-plan'\nimport type { AiJobReview, AiJobSummary } from '../model/ai-jobs.types'\nimport { aiJobPlanCreditEstimate } from '../model/ai-site-job'\nimport { Box, Button, Collapse, Stack, Typography } from '@mui/material'\nimport { useState } from 'react'\n\n/**\n * A job's plan and what it waits for (AGL-2935), inside the AI jobs drawer:\n * what the job reuses from the site, what it creates and why, the screens it\n * builds — and, while the job waits for a person, the one button that\n * confirms the plan or tries a refused step again. The drawer owns the\n * request; this renders.\n */\nexport interface AiJobPlanProps {\n job: AiJobSummary\n /** Confirms the plan, or tries the refused step again. */\n onResume: (job: AiJobSummary) => void\n /** A resume for this job is in flight. */\n busy?: boolean\n /**\n * The viewer is staff (AGL-3078), who can open where a refused answer broke\n * its rules and the outline of those parts, to tell a shape the rules should\n * allow from an answer that ignored its re-ask. A member reads the findings.\n */\n staff?: boolean\n}\n\n/**\n * Where a refused answer broke its rules, and the outline of those parts, as\n * lines staff read (AGL-3078): each finding with the nodes or plan entries it\n * names, then each outlined node indented by its depth, with its element, a\n * Grid's layout as written, and the names of what it sets and holds.\n */\nexport function aiJobReviewDetails(review: AiJobReview | null): string[] {\n if (review?.reason !== 'doctrine') return []\n const lines = review.findings.flatMap((finding) => {\n const where = finding.nodeIds?.length\n ? `nodes ${finding.nodeIds.join(', ')}`\n : finding.paths?.length\n ? `at ${finding.paths.join(', ')}`\n : null\n return where ? [`${finding.rule === null ? '' : `Rule ${finding.rule} `}${finding.code}: ${where}`] : []\n })\n for (const node of review.outline ?? []) {\n lines.push(\n [\n `${' '.repeat(node.depth)}${node.id} ${node.componentId}`,\n ...Object.entries(node.grid ?? {}).map(([name, value]) => `${name}=${JSON.stringify(value)}`),\n ...(node.props.length ? [`props ${node.props.join(', ')}`] : []),\n ...(node.sx?.length ? [`sx ${node.sx.join(', ')}`] : []),\n ...(node.children.length ? [`holds ${node.children.join(', ')}`] : []),\n ].join(' · '),\n )\n }\n return lines\n}\n\nexport function AiJobPlan({\n job,\n onResume,\n busy = false,\n staff = false,\n}: AiJobPlanProps): JSX.Element | null {\n const [detailsOpen, setDetailsOpen] = useState(false)\n const { plan, review } = job\n if (!plan && !review) return null\n const details = staff ? aiJobReviewDetails(review) : []\n /** A reference as a person reads it: the record's name, or what the plan creates. */\n const named = (ref: string | null): string =>\n !ref\n ? ''\n : isAiPlanNewRef(ref)\n ? ref.slice('new:'.length)\n : (plan?.labels[ref] ?? ref)\n const waiting = job.status === 'needs_review' && review !== null\n // The guard rail (AGL-2911): what the plan is estimated to cost is read\n // before it is confirmed, not after it has been spent. An estimate, and\n // said to be one — the plan's own passes at the nominal credits a step\n // holds, where what a step really costs is its model's tokens. A page job\n // counts the creations it builds before its page (AGL-3031).\n const estimate =\n plan && waiting && review.reason === 'plan' ? aiJobPlanCreditEstimate(job.kind, plan) : 0\n return (\n <Box sx={{ mt: 1 }}>\n {plan && (\n <Stack spacing={0.5} role=\"list\" aria-label=\"Plan\">\n <Typography variant=\"caption\" color=\"text.secondary\">\n {plan.status === 'confirmed' ? 'Confirmed plan' : 'Proposed plan'}\n </Typography>\n {plan.reuse.map((entry, index) => (\n <Typography key={`reuse-${index}`} variant=\"body2\" role=\"listitem\">\n Reuses the {entry.kind} {named(entry.id)} — {entry.purpose}\n </Typography>\n ))}\n {plan.create.map((entry, index) => (\n <Typography key={`create-${index}`} variant=\"body2\" role=\"listitem\">\n Creates the {AI_BUILD_PLAN_CREATION_NOUNS[entry.kind].noun} {entry.name}\n {entry.duplicateOf\n ? `, from a copy of ${named(entry.duplicateOf)}`\n : ''}{' '}\n — {entry.why}\n </Typography>\n ))}\n {plan.screens.map((screen, index) => (\n <Typography key={`screen-${index}`} variant=\"body2\" role=\"listitem\">\n Builds the screen {screen.title} at {screen.slug}\n {screen.layout ? ` in ${named(screen.layout)}` : ''}\n {screen.sections.length\n ? `: ${screen.sections.map((section) => section.name).join(', ')}`\n : ''}\n </Typography>\n ))}\n </Stack>\n )}\n {review?.reason === 'doctrine' && review.findings.length > 0 && (\n <Box\n component=\"ul\"\n sx={{ my: 0.5, pl: 2.5 }}\n aria-label=\"Building rules broken\"\n >\n {review.findings.map((finding, index) => (\n <Typography\n key={`finding-${index}`}\n component=\"li\"\n variant=\"caption\"\n >\n {finding.message}\n </Typography>\n ))}\n </Box>\n )}\n {details.length > 0 && (\n <Box sx={{ mt: 0.5 }}>\n <Button\n size=\"small\"\n aria-expanded={detailsOpen}\n onClick={() => setDetailsOpen((prior) => !prior)}\n >\n {detailsOpen ? 'Hide what was refused' : 'Show what was refused'}\n </Button>\n <Collapse in={detailsOpen} unmountOnExit>\n <Typography\n variant=\"caption\"\n component=\"pre\"\n aria-label=\"What was refused\"\n sx={{ m: 0, fontFamily: 'monospace', whiteSpace: 'pre', overflowX: 'auto' }}\n >\n {details.join('\\n')}\n </Typography>\n </Collapse>\n </Box>\n )}\n {estimate > 0 && (\n <Typography\n variant=\"caption\"\n color=\"text.secondary\"\n sx={{ display: 'block', mt: 1 }}\n >\n {`Estimated cost: about ${estimate.toLocaleString('en-US')} credits. What it costs is what its steps spend.`}\n </Typography>\n )}\n {waiting && (\n <Button\n size=\"small\"\n variant=\"contained\"\n disabled={busy}\n onClick={() => onResume(job)}\n sx={{ mt: 1 }}\n >\n {review.reason === 'plan' ? 'Confirm plan' : 'Try again'}\n </Button>\n )}\n </Box>\n )\n}\n\nexport default AiJobPlan\n"],"names":["AI_BUILD_PLAN_CREATION_NOUNS","isAiPlanNewRef","aiJobPlanCreditEstimate","Box","Button","Collapse","Stack","Typography","useState","aiJobReviewDetails","review","reason","lines","findings","flatMap","finding","where","nodeIds","length","join","paths","rule","code","node","outline","push","repeat","depth","id","componentId","Object","entries","grid","map","name","value","JSON","stringify","props","sx","children","AiJobPlan","job","onResume","busy","staff","detailsOpen","setDetailsOpen","plan","details","named","ref","slice","labels","waiting","status","estimate","kind","mt","spacing","role","aria-label","variant","color","reuse","entry","index","purpose","create","noun","duplicateOf","why","screens","screen","title","slug","layout","sections","section","component","my","pl","message","size","aria-expanded","onClick","prior","in","unmountOnExit","m","fontFamily","whiteSpace","overflowX","display","toLocaleString","disabled"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,4BAA4B,EAAEC,cAAc,QAAQ,4BAAwB;AAErF,SAASC,uBAAuB,QAAQ,0BAAsB;AAC9D,SAASC,GAAG,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,UAAU,QAAQ,gBAAe;AACxE,SAASC,QAAQ,QAAQ,QAAO;AAuBhC;;;;;CAKC,GACD,OAAO,SAASC,mBAAmBC,MAA0B;QAUxCA;IATnB,IAAIA,CAAAA,0BAAAA,OAAQC,MAAM,MAAK,YAAY,OAAO,EAAE;IAC5C,MAAMC,QAAQF,OAAOG,QAAQ,CAACC,OAAO,CAAC,CAACC;YACvBA,kBAEVA;QAFJ,MAAMC,QAAQD,EAAAA,mBAAAA,QAAQE,OAAO,qBAAfF,iBAAiBG,MAAM,IACjC,CAAC,MAAM,EAAEH,QAAQE,OAAO,CAACE,IAAI,CAAC,OAAO,GACrCJ,EAAAA,iBAAAA,QAAQK,KAAK,qBAAbL,eAAeG,MAAM,IACnB,CAAC,GAAG,EAAEH,QAAQK,KAAK,CAACD,IAAI,CAAC,OAAO,GAChC;QACN,OAAOH,QAAQ;YAAC,GAAGD,QAAQM,IAAI,KAAK,OAAO,KAAK,CAAC,KAAK,EAAEN,QAAQM,IAAI,CAAC,CAAC,CAAC,GAAGN,QAAQO,IAAI,CAAC,EAAE,EAAEN,OAAO;SAAC,GAAG,EAAE;IAC1G;IACA,KAAK,MAAMO,SAAQb,kBAAAA,OAAOc,OAAO,YAAdd,kBAAkB,EAAE,CAAE;YAIjBa;YAEdA;QALRX,MAAMa,IAAI,CACR;YACE,GAAG,KAAKC,MAAM,CAACH,KAAKI,KAAK,IAAIJ,KAAKK,EAAE,CAAC,CAAC,EAAEL,KAAKM,WAAW,EAAE;eACvDC,OAAOC,OAAO,EAACR,aAAAA,KAAKS,IAAI,YAATT,aAAa,CAAC,GAAGU,GAAG,CAAC,CAAC,CAACC,MAAMC,MAAM,GAAK,GAAGD,KAAK,CAAC,EAAEE,KAAKC,SAAS,CAACF,QAAQ;eACxFZ,KAAKe,KAAK,CAACpB,MAAM,GAAG;gBAAC,CAAC,MAAM,EAAEK,KAAKe,KAAK,CAACnB,IAAI,CAAC,OAAO;aAAC,GAAG,EAAE;eAC3DI,EAAAA,WAAAA,KAAKgB,EAAE,qBAAPhB,SAASL,MAAM,IAAG;gBAAC,CAAC,GAAG,EAAEK,KAAKgB,EAAE,CAACpB,IAAI,CAAC,OAAO;aAAC,GAAG,EAAE;eACnDI,KAAKiB,QAAQ,CAACtB,MAAM,GAAG;gBAAC,CAAC,MAAM,EAAEK,KAAKiB,QAAQ,CAACrB,IAAI,CAAC,OAAO;aAAC,GAAG,EAAE;SACtE,CAACA,IAAI,CAAC;IAEX;IACA,OAAOP;AACT;AAEA,OAAO,SAAS6B,UAAU,EACxBC,GAAG,EACHC,QAAQ,EACRC,OAAO,KAAK,EACZC,QAAQ,KAAK,EACE;IACf,MAAM,CAACC,aAAaC,eAAe,GAAGvC,SAAS;IAC/C,MAAM,EAAEwC,IAAI,EAAEtC,MAAM,EAAE,GAAGgC;IACzB,IAAI,CAACM,QAAQ,CAACtC,QAAQ,OAAO;IAC7B,MAAMuC,UAAUJ,QAAQpC,mBAAmBC,UAAU,EAAE;IACvD,mFAAmF,GACnF,MAAMwC,QAAQ,CAACC;;eACb,CAACA,MACG,KACAlD,eAAekD,OACbA,IAAIC,KAAK,CAAC,OAAOlC,MAAM,YACtB8B,wBAAAA,KAAMK,MAAM,CAACF,IAAI,mBAAIA;;IAC9B,MAAMG,UAAUZ,IAAIa,MAAM,KAAK,kBAAkB7C,WAAW;IAC5D,wEAAwE;IACxE,wEAAwE;IACxE,uEAAuE;IACvE,0EAA0E;IAC1E,6DAA6D;IAC7D,MAAM8C,WACJR,QAAQM,WAAW5C,OAAOC,MAAM,KAAK,SAAST,wBAAwBwC,IAAIe,IAAI,EAAET,QAAQ;IAC1F,qBACE,MAAC7C;QAAIoC,IAAI;YAAEmB,IAAI;QAAE;;YACdV,sBACC,MAAC1C;gBAAMqD,SAAS;gBAAKC,MAAK;gBAAOC,cAAW;;kCAC1C,KAACtD;wBAAWuD,SAAQ;wBAAUC,OAAM;kCACjCf,KAAKO,MAAM,KAAK,cAAc,mBAAmB;;oBAEnDP,KAAKgB,KAAK,CAAC/B,GAAG,CAAC,CAACgC,OAAOC,sBACtB,MAAC3D;4BAAkCuD,SAAQ;4BAAQF,MAAK;;gCAAW;gCACrDK,MAAMR,IAAI;gCAAC;gCAAEP,MAAMe,MAAMrC,EAAE;gCAAE;gCAAIqC,MAAME,OAAO;;2BAD3C,CAAC,MAAM,EAAED,OAAO;oBAIlClB,KAAKoB,MAAM,CAACnC,GAAG,CAAC,CAACgC,OAAOC,sBACvB,MAAC3D;4BAAmCuD,SAAQ;4BAAQF,MAAK;;gCAAW;gCACrD5D,4BAA4B,CAACiE,MAAMR,IAAI,CAAC,CAACY,IAAI;gCAAC;gCAAEJ,MAAM/B,IAAI;gCACtE+B,MAAMK,WAAW,GACd,CAAC,iBAAiB,EAAEpB,MAAMe,MAAMK,WAAW,GAAG,GAC9C;gCAAI;gCAAI;gCACTL,MAAMM,GAAG;;2BALG,CAAC,OAAO,EAAEL,OAAO;oBAQnClB,KAAKwB,OAAO,CAACvC,GAAG,CAAC,CAACwC,QAAQP,sBACzB,MAAC3D;4BAAmCuD,SAAQ;4BAAQF,MAAK;;gCAAW;gCAC/Ca,OAAOC,KAAK;gCAAC;gCAAKD,OAAOE,IAAI;gCAC/CF,OAAOG,MAAM,GAAG,CAAC,IAAI,EAAE1B,MAAMuB,OAAOG,MAAM,GAAG,GAAG;gCAChDH,OAAOI,QAAQ,CAAC3D,MAAM,GACnB,CAAC,EAAE,EAAEuD,OAAOI,QAAQ,CAAC5C,GAAG,CAAC,CAAC6C,UAAYA,QAAQ5C,IAAI,EAAEf,IAAI,CAAC,OAAO,GAChE;;2BALW,CAAC,OAAO,EAAE+C,OAAO;;;YAUvCxD,CAAAA,0BAAAA,OAAQC,MAAM,MAAK,cAAcD,OAAOG,QAAQ,CAACK,MAAM,GAAG,mBACzD,KAACf;gBACC4E,WAAU;gBACVxC,IAAI;oBAAEyC,IAAI;oBAAKC,IAAI;gBAAI;gBACvBpB,cAAW;0BAEVnD,OAAOG,QAAQ,CAACoB,GAAG,CAAC,CAAClB,SAASmD,sBAC7B,KAAC3D;wBAECwE,WAAU;wBACVjB,SAAQ;kCAEP/C,QAAQmE,OAAO;uBAJX,CAAC,QAAQ,EAAEhB,OAAO;;YAS9BjB,QAAQ/B,MAAM,GAAG,mBAChB,MAACf;gBAAIoC,IAAI;oBAAEmB,IAAI;gBAAI;;kCACjB,KAACtD;wBACC+E,MAAK;wBACLC,iBAAetC;wBACfuC,SAAS,IAAMtC,eAAe,CAACuC,QAAU,CAACA;kCAEzCxC,cAAc,0BAA0B;;kCAE3C,KAACzC;wBAASkF,IAAIzC;wBAAa0C,aAAa;kCACtC,cAAA,KAACjF;4BACCuD,SAAQ;4BACRiB,WAAU;4BACVlB,cAAW;4BACXtB,IAAI;gCAAEkD,GAAG;gCAAGC,YAAY;gCAAaC,YAAY;gCAAOC,WAAW;4BAAO;sCAEzE3C,QAAQ9B,IAAI,CAAC;;;;;YAKrBqC,WAAW,mBACV,KAACjD;gBACCuD,SAAQ;gBACRC,OAAM;gBACNxB,IAAI;oBAAEsD,SAAS;oBAASnC,IAAI;gBAAE;0BAE7B,CAAC,sBAAsB,EAAEF,SAASsC,cAAc,CAAC,SAAS,gDAAgD,CAAC;;YAG/GxC,yBACC,KAAClD;gBACC+E,MAAK;gBACLrB,SAAQ;gBACRiC,UAAUnD;gBACVyC,SAAS,IAAM1C,SAASD;gBACxBH,IAAI;oBAAEmB,IAAI;gBAAE;0BAEXhD,OAAOC,MAAM,KAAK,SAAS,iBAAiB;;;;AAKvD;AAEA,eAAe8B,UAAS"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AiModelChoiceState } from './use-ai-model-choice';
|
|
2
|
+
export interface AiModelSelectorProps {
|
|
3
|
+
choice: AiModelChoiceState;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* THE MODEL SWITCH (AGL-2942): Auto, and the models the reader's plan, the
|
|
8
|
+
* workspace's restriction and their allotment allow — each with what a
|
|
9
|
+
* typical request costs on it and the multiple of Auto.
|
|
10
|
+
*
|
|
11
|
+
* Every label and id comes from the provider catalog through the options
|
|
12
|
+
* route; this component names no model. The pick is remembered per person
|
|
13
|
+
* per surface (`use-ai-model-choice.ts`), and the door the request goes to
|
|
14
|
+
* decides again, so a stale pick runs on Auto rather than on a model the
|
|
15
|
+
* reader may no longer have.
|
|
16
|
+
*/
|
|
17
|
+
export declare function AiModelSelector({ choice, disabled }: AiModelSelectorProps): import("react").JSX.Element;
|
|
18
|
+
export declare namespace AiModelSelector {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
21
|
+
export default AiModelSelector;
|
|
@@ -0,0 +1,109 @@
|
|
|
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 { Button, ListItemText, Menu, MenuItem } from "@mui/material";
|
|
19
|
+
import { useState } from "react";
|
|
20
|
+
const perRequest = (credits)=>`≈ ${credits.toLocaleString()} credit${credits === 1 ? '' : 's'} a request`;
|
|
21
|
+
/**
|
|
22
|
+
* THE MODEL SWITCH (AGL-2942): Auto, and the models the reader's plan, the
|
|
23
|
+
* workspace's restriction and their allotment allow — each with what a
|
|
24
|
+
* typical request costs on it and the multiple of Auto.
|
|
25
|
+
*
|
|
26
|
+
* Every label and id comes from the provider catalog through the options
|
|
27
|
+
* route; this component names no model. The pick is remembered per person
|
|
28
|
+
* per surface (`use-ai-model-choice.ts`), and the door the request goes to
|
|
29
|
+
* decides again, so a stale pick runs on Auto rather than on a model the
|
|
30
|
+
* reader may no longer have.
|
|
31
|
+
*/ export function AiModelSelector({ choice, disabled }) {
|
|
32
|
+
const [anchor, setAnchor] = useState(null);
|
|
33
|
+
const open = (event)=>{
|
|
34
|
+
setAnchor(event.currentTarget);
|
|
35
|
+
choice.load();
|
|
36
|
+
};
|
|
37
|
+
const close = ()=>setAnchor(null);
|
|
38
|
+
const pick = (option)=>{
|
|
39
|
+
choice.select(option);
|
|
40
|
+
close();
|
|
41
|
+
};
|
|
42
|
+
const { options, status } = choice;
|
|
43
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
44
|
+
children: [
|
|
45
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
46
|
+
size: "small",
|
|
47
|
+
color: "inherit",
|
|
48
|
+
onClick: open,
|
|
49
|
+
disabled: disabled,
|
|
50
|
+
"aria-haspopup": "menu",
|
|
51
|
+
"aria-expanded": Boolean(anchor),
|
|
52
|
+
"aria-label": `AI model: ${choice.label}`,
|
|
53
|
+
sx: {
|
|
54
|
+
textTransform: 'none',
|
|
55
|
+
minWidth: 0,
|
|
56
|
+
px: 1,
|
|
57
|
+
color: 'text.secondary'
|
|
58
|
+
},
|
|
59
|
+
children: `Model: ${choice.label}`
|
|
60
|
+
}),
|
|
61
|
+
/*#__PURE__*/ _jsxs(Menu, {
|
|
62
|
+
anchorEl: anchor,
|
|
63
|
+
open: Boolean(anchor),
|
|
64
|
+
onClose: close,
|
|
65
|
+
children: [
|
|
66
|
+
status === 'loading' || status === 'idle' ? /*#__PURE__*/ _jsx(MenuItem, {
|
|
67
|
+
disabled: true,
|
|
68
|
+
children: 'Loading models…'
|
|
69
|
+
}) : null,
|
|
70
|
+
status === 'refused' ? /*#__PURE__*/ _jsx(MenuItem, {
|
|
71
|
+
disabled: true,
|
|
72
|
+
children: 'Your role does not include AI assistance'
|
|
73
|
+
}) : null,
|
|
74
|
+
status === 'error' ? /*#__PURE__*/ _jsx(MenuItem, {
|
|
75
|
+
disabled: true,
|
|
76
|
+
children: 'The models could not be loaded — try again'
|
|
77
|
+
}) : null,
|
|
78
|
+
status === 'ready' && (options == null ? void 0 : options.auto) ? /*#__PURE__*/ _jsx(MenuItem, {
|
|
79
|
+
selected: choice.model === null,
|
|
80
|
+
onClick: ()=>pick(null),
|
|
81
|
+
children: /*#__PURE__*/ _jsx(ListItemText, {
|
|
82
|
+
primary: options.auto.label,
|
|
83
|
+
secondary: `${perRequest(options.auto.creditsPerRequest)} · picked for each request`
|
|
84
|
+
})
|
|
85
|
+
}) : null,
|
|
86
|
+
status === 'ready' && options ? options.options.map((option)=>/*#__PURE__*/ _jsx(MenuItem, {
|
|
87
|
+
selected: choice.model === option.id,
|
|
88
|
+
onClick: ()=>pick({
|
|
89
|
+
id: option.id,
|
|
90
|
+
label: option.label
|
|
91
|
+
}),
|
|
92
|
+
children: /*#__PURE__*/ _jsx(ListItemText, {
|
|
93
|
+
primary: option.label,
|
|
94
|
+
secondary: `${perRequest(option.creditsPerRequest)} · ${option.multiplier}× Auto`
|
|
95
|
+
})
|
|
96
|
+
}, option.id)) : null,
|
|
97
|
+
status === 'ready' && options && !options.options.length ? /*#__PURE__*/ _jsx(MenuItem, {
|
|
98
|
+
disabled: true,
|
|
99
|
+
children: 'This workspace runs on Auto'
|
|
100
|
+
}) : null
|
|
101
|
+
]
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
AiModelSelector.displayName = 'AiModelSelector';
|
|
107
|
+
export default AiModelSelector;
|
|
108
|
+
|
|
109
|
+
//# sourceMappingURL=ai-model-selector.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/components/ai-model-selector.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport { Button, ListItemText, Menu, MenuItem } from '@mui/material'\nimport { useState, type MouseEvent } from 'react'\nimport type { AiModelChoiceState } from './use-ai-model-choice'\n\nexport interface AiModelSelectorProps {\n choice: AiModelChoiceState\n disabled?: boolean\n}\n\nconst perRequest = (credits: number): string =>\n `≈ ${credits.toLocaleString()} credit${credits === 1 ? '' : 's'} a request`\n\n/**\n * THE MODEL SWITCH (AGL-2942): Auto, and the models the reader's plan, the\n * workspace's restriction and their allotment allow — each with what a\n * typical request costs on it and the multiple of Auto.\n *\n * Every label and id comes from the provider catalog through the options\n * route; this component names no model. The pick is remembered per person\n * per surface (`use-ai-model-choice.ts`), and the door the request goes to\n * decides again, so a stale pick runs on Auto rather than on a model the\n * reader may no longer have.\n */\nexport function AiModelSelector({ choice, disabled }: AiModelSelectorProps) {\n const [anchor, setAnchor] = useState<HTMLElement | null>(null)\n const open = (event: MouseEvent<HTMLElement>) => {\n setAnchor(event.currentTarget)\n choice.load()\n }\n const close = () => setAnchor(null)\n const pick = (option: { id: string; label: string } | null) => {\n choice.select(option)\n close()\n }\n const { options, status } = choice\n return (\n <>\n <Button\n size=\"small\"\n color=\"inherit\"\n onClick={open}\n disabled={disabled}\n aria-haspopup=\"menu\"\n aria-expanded={Boolean(anchor)}\n aria-label={`AI model: ${choice.label}`}\n sx={{ textTransform: 'none', minWidth: 0, px: 1, color: 'text.secondary' }}\n >\n {`Model: ${choice.label}`}\n </Button>\n <Menu anchorEl={anchor} open={Boolean(anchor)} onClose={close}>\n {status === 'loading' || status === 'idle' ? (\n <MenuItem disabled>{'Loading models…'}</MenuItem>\n ) : null}\n {status === 'refused' ? (\n <MenuItem disabled>{'Your role does not include AI assistance'}</MenuItem>\n ) : null}\n {status === 'error' ? (\n <MenuItem disabled>{'The models could not be loaded — try again'}</MenuItem>\n ) : null}\n {status === 'ready' && options?.auto ? (\n <MenuItem selected={choice.model === null} onClick={() => pick(null)}>\n <ListItemText\n primary={options.auto.label}\n secondary={`${perRequest(options.auto.creditsPerRequest)} · picked for each request`}\n />\n </MenuItem>\n ) : null}\n {status === 'ready' && options\n ? options.options.map((option) => (\n <MenuItem\n key={option.id}\n selected={choice.model === option.id}\n onClick={() => pick({ id: option.id, label: option.label })}\n >\n <ListItemText\n primary={option.label}\n secondary={`${perRequest(option.creditsPerRequest)} · ${option.multiplier}× Auto`}\n />\n </MenuItem>\n ))\n : null}\n {status === 'ready' && options && !options.options.length ? (\n <MenuItem disabled>{'This workspace runs on Auto'}</MenuItem>\n ) : null}\n </Menu>\n </>\n )\n}\nAiModelSelector.displayName = 'AiModelSelector'\n\nexport default AiModelSelector\n"],"names":["Button","ListItemText","Menu","MenuItem","useState","perRequest","credits","toLocaleString","AiModelSelector","choice","disabled","anchor","setAnchor","open","event","currentTarget","load","close","pick","option","select","options","status","size","color","onClick","aria-haspopup","aria-expanded","Boolean","aria-label","label","sx","textTransform","minWidth","px","anchorEl","onClose","auto","selected","model","primary","secondary","creditsPerRequest","map","id","multiplier","length","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;AAEA,SAASA,MAAM,EAAEC,YAAY,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,gBAAe;AACpE,SAASC,QAAQ,QAAyB,QAAO;AAQjD,MAAMC,aAAa,CAACC,UAClB,CAAC,EAAE,EAAEA,QAAQC,cAAc,GAAG,OAAO,EAAED,YAAY,IAAI,KAAK,IAAI,UAAU,CAAC;AAE7E;;;;;;;;;;CAUC,GACD,OAAO,SAASE,gBAAgB,EAAEC,MAAM,EAAEC,QAAQ,EAAwB;IACxE,MAAM,CAACC,QAAQC,UAAU,GAAGR,SAA6B;IACzD,MAAMS,OAAO,CAACC;QACZF,UAAUE,MAAMC,aAAa;QAC7BN,OAAOO,IAAI;IACb;IACA,MAAMC,QAAQ,IAAML,UAAU;IAC9B,MAAMM,OAAO,CAACC;QACZV,OAAOW,MAAM,CAACD;QACdF;IACF;IACA,MAAM,EAAEI,OAAO,EAAEC,MAAM,EAAE,GAAGb;IAC5B,qBACE;;0BACE,KAACT;gBACCuB,MAAK;gBACLC,OAAM;gBACNC,SAASZ;gBACTH,UAAUA;gBACVgB,iBAAc;gBACdC,iBAAeC,QAAQjB;gBACvBkB,cAAY,CAAC,UAAU,EAAEpB,OAAOqB,KAAK,EAAE;gBACvCC,IAAI;oBAAEC,eAAe;oBAAQC,UAAU;oBAAGC,IAAI;oBAAGV,OAAO;gBAAiB;0BAExE,CAAC,OAAO,EAAEf,OAAOqB,KAAK,EAAE;;0BAE3B,MAAC5B;gBAAKiC,UAAUxB;gBAAQE,MAAMe,QAAQjB;gBAASyB,SAASnB;;oBACrDK,WAAW,aAAaA,WAAW,uBAClC,KAACnB;wBAASO,QAAQ;kCAAE;yBAClB;oBACHY,WAAW,0BACV,KAACnB;wBAASO,QAAQ;kCAAE;yBAClB;oBACHY,WAAW,wBACV,KAACnB;wBAASO,QAAQ;kCAAE;yBAClB;oBACHY,WAAW,YAAWD,2BAAAA,QAASgB,IAAI,kBAClC,KAAClC;wBAASmC,UAAU7B,OAAO8B,KAAK,KAAK;wBAAMd,SAAS,IAAMP,KAAK;kCAC7D,cAAA,KAACjB;4BACCuC,SAASnB,QAAQgB,IAAI,CAACP,KAAK;4BAC3BW,WAAW,GAAGpC,WAAWgB,QAAQgB,IAAI,CAACK,iBAAiB,EAAE,0BAA0B,CAAC;;yBAGtF;oBACHpB,WAAW,WAAWD,UACnBA,QAAQA,OAAO,CAACsB,GAAG,CAAC,CAACxB,uBACnB,KAAChB;4BAECmC,UAAU7B,OAAO8B,KAAK,KAAKpB,OAAOyB,EAAE;4BACpCnB,SAAS,IAAMP,KAAK;oCAAE0B,IAAIzB,OAAOyB,EAAE;oCAAEd,OAAOX,OAAOW,KAAK;gCAAC;sCAEzD,cAAA,KAAC7B;gCACCuC,SAASrB,OAAOW,KAAK;gCACrBW,WAAW,GAAGpC,WAAWc,OAAOuB,iBAAiB,EAAE,GAAG,EAAEvB,OAAO0B,UAAU,CAAC,MAAM,CAAC;;2BAN9E1B,OAAOyB,EAAE,KAUlB;oBACHtB,WAAW,WAAWD,WAAW,CAACA,QAAQA,OAAO,CAACyB,MAAM,iBACvD,KAAC3C;wBAASO,QAAQ;kCAAE;yBAClB;;;;;AAIZ;AACAF,gBAAgBuC,WAAW,GAAG;AAE9B,eAAevC,gBAAe"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 AiBriefDialogProps } from './ai-brief-dialog.component';
|
|
18
|
+
/**
|
|
19
|
+
* "Describe a page" (AGL-2907): the brief dialog both page entry points open,
|
|
20
|
+
* the Screens page's "Describe it" and the Assist panel's AI jobs.
|
|
21
|
+
*
|
|
22
|
+
* It is the shared brief dialog for a `page` job (AGL-3043): one text box and
|
|
23
|
+
* an optional page type. The job plans first and waits in AI jobs, where the
|
|
24
|
+
* member confirms the plan and opens the draft once it is built; nothing here
|
|
25
|
+
* builds or writes anything.
|
|
26
|
+
*/
|
|
27
|
+
export type AiPageBriefDialogProps = Omit<AiBriefDialogProps, 'kind'>;
|
|
28
|
+
export declare function AiPageBriefDialog(props: AiPageBriefDialogProps): import("react").JSX.Element;
|
|
29
|
+
export default AiPageBriefDialog;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2026 Aglyn LLC
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/ import { AiBriefDialog } from "./ai-brief-dialog.component.js";
|
|
20
|
+
export function AiPageBriefDialog(props) {
|
|
21
|
+
return /*#__PURE__*/ _jsx(AiBriefDialog, _extends({}, props, {
|
|
22
|
+
kind: "page"
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
export default AiPageBriefDialog;
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=ai-page-brief-dialog.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/components/ai-page-brief-dialog.component.tsx"],"sourcesContent":["'use client'\n\n/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AiBriefDialog, type AiBriefDialogProps } from './ai-brief-dialog.component'\n\n/**\n * \"Describe a page\" (AGL-2907): the brief dialog both page entry points open,\n * the Screens page's \"Describe it\" and the Assist panel's AI jobs.\n *\n * It is the shared brief dialog for a `page` job (AGL-3043): one text box and\n * an optional page type. The job plans first and waits in AI jobs, where the\n * member confirms the plan and opens the draft once it is built; nothing here\n * builds or writes anything.\n */\n\nexport type AiPageBriefDialogProps = Omit<AiBriefDialogProps, 'kind'>\n\nexport function AiPageBriefDialog(props: AiPageBriefDialogProps) {\n return <AiBriefDialog {...props} kind=\"page\" />\n}\n\nexport default AiPageBriefDialog\n"],"names":["AiBriefDialog","AiPageBriefDialog","props","kind"],"mappings":"AAAA;;;AAEA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,aAAa,QAAiC,iCAA6B;AAcpF,OAAO,SAASC,kBAAkBC,KAA6B;IAC7D,qBAAO,KAACF,4BAAkBE;QAAOC,MAAK;;AACxC;AAEA,eAAeF,kBAAiB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type ComponentProps } from 'react';
|
|
2
|
+
import { AiAssistProvider } from './ai-assist-provider.component';
|
|
3
|
+
import { AssistPanelComponent } from './assist-panel.component';
|
|
4
|
+
/**
|
|
5
|
+
* What the console shell hands a provider and the assistant dock (AGL-2984):
|
|
6
|
+
* the reader's verdict for every catalog key a plugin declared, on the site
|
|
7
|
+
* in view, with `loaded` false until every read behind it has answered.
|
|
8
|
+
*/
|
|
9
|
+
export interface ShellPermissionsOnHost {
|
|
10
|
+
loaded: boolean;
|
|
11
|
+
granted: Readonly<Record<string, boolean>>;
|
|
12
|
+
}
|
|
13
|
+
/** The AI half of that answer, in the shape the AI surfaces hold on. */
|
|
14
|
+
export interface AiPermissionsAnswer {
|
|
15
|
+
loaded: boolean;
|
|
16
|
+
use: boolean;
|
|
17
|
+
generate: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The shell's answer read for the two AI keys. `undefined` while the shell
|
|
21
|
+
* has handed nothing, which the provider reads as pending; one object per
|
|
22
|
+
* verdict, so the callbacks keyed on it are not rebuilt on every render.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useAiPermissionsOnHost(answer: ShellPermissionsOnHost | undefined): AiPermissionsAnswer | undefined;
|
|
25
|
+
type ProviderProps = Omit<ComponentProps<typeof AiAssistProvider>, 'aiPermissions'> & {
|
|
26
|
+
permissionsOnHost?: ShellPermissionsOnHost;
|
|
27
|
+
/**
|
|
28
|
+
* The plugins that run on the site in view, as the shell resolved them
|
|
29
|
+
* (AGL-3028). Absent where the shell hands none, which reads as no site
|
|
30
|
+
* narrowing at all.
|
|
31
|
+
*/
|
|
32
|
+
enabledPluginIds?: readonly string[];
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* The besigner copy assistant's provider, holding on the shell's permission
|
|
36
|
+
* answer.
|
|
37
|
+
*
|
|
38
|
+
* On a site with AI switched off (AGL-3028) it stays MOUNTED — it wraps every
|
|
39
|
+
* console page, and a provider that came and went per site would remount the
|
|
40
|
+
* whole tree beneath it — and opens nothing: a settled refusal publishes no
|
|
41
|
+
* callback, so no control can reach its dialogs.
|
|
42
|
+
*/
|
|
43
|
+
export declare function AiAssistProviderOnHost(props: ProviderProps): import("react").JSX.Element;
|
|
44
|
+
export declare namespace AiAssistProviderOnHost {
|
|
45
|
+
var displayName: string;
|
|
46
|
+
}
|
|
47
|
+
type PanelProps = Omit<ComponentProps<typeof AssistPanelComponent>, 'aiPermissions'> & {
|
|
48
|
+
permissionsOnHost?: ShellPermissionsOnHost;
|
|
49
|
+
};
|
|
50
|
+
/** The assistant dock, holding on the shell's permission answer. */
|
|
51
|
+
export declare function AssistPanelOnHost(props: PanelProps): import("react").JSX.Element;
|
|
52
|
+
export declare namespace AssistPanelOnHost {
|
|
53
|
+
var displayName: string;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
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 { _ as _extends } from "@swc/helpers/_/_extends";
|
|
18
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
19
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
+
import { useMemo } from "react";
|
|
21
|
+
import { AI_PLUGIN_ID } from "../constants.js";
|
|
22
|
+
import { aiPermissionsOf } from "../model/ai-permissions.js";
|
|
23
|
+
import { AiAssistProvider } from "./ai-assist-provider.component.js";
|
|
24
|
+
import { AssistPanelComponent } from "./assist-panel.component.js";
|
|
25
|
+
const HELD = {
|
|
26
|
+
loaded: false,
|
|
27
|
+
use: false,
|
|
28
|
+
generate: false
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The shell's answer read for the two AI keys. `undefined` while the shell
|
|
32
|
+
* has handed nothing, which the provider reads as pending; one object per
|
|
33
|
+
* verdict, so the callbacks keyed on it are not rebuilt on every render.
|
|
34
|
+
*/ export function useAiPermissionsOnHost(answer) {
|
|
35
|
+
const present = answer !== undefined;
|
|
36
|
+
const loaded = (answer == null ? void 0 : answer.loaded) === true;
|
|
37
|
+
const verdict = aiPermissionsOf(loaded ? answer == null ? void 0 : answer.granted : null);
|
|
38
|
+
const use = verdict['ai.use'];
|
|
39
|
+
const generate = verdict['ai.generate'];
|
|
40
|
+
return useMemo(()=>present ? {
|
|
41
|
+
loaded,
|
|
42
|
+
use,
|
|
43
|
+
generate
|
|
44
|
+
} : undefined, [
|
|
45
|
+
present,
|
|
46
|
+
loaded,
|
|
47
|
+
use,
|
|
48
|
+
generate
|
|
49
|
+
]);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Every AI door closed, as a settled answer: what the provider holds on a site
|
|
53
|
+
* that switched AI off. One object, so the callbacks keyed on it are stable.
|
|
54
|
+
*/ const OFF_FOR_SITE = {
|
|
55
|
+
loaded: true,
|
|
56
|
+
use: false,
|
|
57
|
+
generate: false
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* The besigner copy assistant's provider, holding on the shell's permission
|
|
61
|
+
* answer.
|
|
62
|
+
*
|
|
63
|
+
* On a site with AI switched off (AGL-3028) it stays MOUNTED — it wraps every
|
|
64
|
+
* console page, and a provider that came and went per site would remount the
|
|
65
|
+
* whole tree beneath it — and opens nothing: a settled refusal publishes no
|
|
66
|
+
* callback, so no control can reach its dialogs.
|
|
67
|
+
*/ export function AiAssistProviderOnHost(props) {
|
|
68
|
+
const { permissionsOnHost, enabledPluginIds } = props, rest = _object_without_properties_loose(props, [
|
|
69
|
+
"permissionsOnHost",
|
|
70
|
+
"enabledPluginIds"
|
|
71
|
+
]);
|
|
72
|
+
const aiPermissions = useAiPermissionsOnHost(permissionsOnHost);
|
|
73
|
+
const offForSite = Boolean(enabledPluginIds) && !(enabledPluginIds == null ? void 0 : enabledPluginIds.includes(AI_PLUGIN_ID));
|
|
74
|
+
return /*#__PURE__*/ _jsx(AiAssistProvider, _extends({}, rest, {
|
|
75
|
+
aiPermissions: offForSite ? OFF_FOR_SITE : aiPermissions
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
AiAssistProviderOnHost.displayName = 'AiAssistProviderOnHost';
|
|
79
|
+
/** The assistant dock, holding on the shell's permission answer. */ export function AssistPanelOnHost(props) {
|
|
80
|
+
var _useAiPermissionsOnHost;
|
|
81
|
+
const { permissionsOnHost } = props, rest = _object_without_properties_loose(props, [
|
|
82
|
+
"permissionsOnHost"
|
|
83
|
+
]);
|
|
84
|
+
const aiPermissions = (_useAiPermissionsOnHost = useAiPermissionsOnHost(permissionsOnHost)) != null ? _useAiPermissionsOnHost : HELD;
|
|
85
|
+
return /*#__PURE__*/ _jsx(AssistPanelComponent, _extends({}, rest, {
|
|
86
|
+
aiPermissions: aiPermissions
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
AssistPanelOnHost.displayName = 'AssistPanelOnHost';
|
|
90
|
+
|
|
91
|
+
//# sourceMappingURL=ai-permissions-on-host.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/components/ai-permissions-on-host.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport { useMemo, type ComponentProps } from 'react'\nimport { AI_PLUGIN_ID } from '../constants'\nimport { aiPermissionsOf } from '../model/ai-permissions'\nimport { AiAssistProvider } from './ai-assist-provider.component'\nimport { AssistPanelComponent } from './assist-panel.component'\n\n/**\n * What the console shell hands a provider and the assistant dock (AGL-2984):\n * the reader's verdict for every catalog key a plugin declared, on the site\n * in view, with `loaded` false until every read behind it has answered.\n */\nexport interface ShellPermissionsOnHost {\n loaded: boolean\n granted: Readonly<Record<string, boolean>>\n}\n\n/** The AI half of that answer, in the shape the AI surfaces hold on. */\nexport interface AiPermissionsAnswer {\n loaded: boolean\n use: boolean\n generate: boolean\n}\n\nconst HELD: AiPermissionsAnswer = { loaded: false, use: false, generate: false }\n\n/**\n * The shell's answer read for the two AI keys. `undefined` while the shell\n * has handed nothing, which the provider reads as pending; one object per\n * verdict, so the callbacks keyed on it are not rebuilt on every render.\n */\nexport function useAiPermissionsOnHost(\n answer: ShellPermissionsOnHost | undefined,\n): AiPermissionsAnswer | undefined {\n const present = answer !== undefined\n const loaded = answer?.loaded === true\n const verdict = aiPermissionsOf(loaded ? answer?.granted : null)\n const use = verdict['ai.use']\n const generate = verdict['ai.generate']\n return useMemo(\n () => (present ? { loaded, use, generate } : undefined),\n [present, loaded, use, generate],\n )\n}\n\ntype ProviderProps = Omit<ComponentProps<typeof AiAssistProvider>, 'aiPermissions'> & {\n permissionsOnHost?: ShellPermissionsOnHost\n /**\n * The plugins that run on the site in view, as the shell resolved them\n * (AGL-3028). Absent where the shell hands none, which reads as no site\n * narrowing at all.\n */\n enabledPluginIds?: readonly string[]\n}\n\n/**\n * Every AI door closed, as a settled answer: what the provider holds on a site\n * that switched AI off. One object, so the callbacks keyed on it are stable.\n */\nconst OFF_FOR_SITE: AiPermissionsAnswer = { loaded: true, use: false, generate: false }\n\n/**\n * The besigner copy assistant's provider, holding on the shell's permission\n * answer.\n *\n * On a site with AI switched off (AGL-3028) it stays MOUNTED — it wraps every\n * console page, and a provider that came and went per site would remount the\n * whole tree beneath it — and opens nothing: a settled refusal publishes no\n * callback, so no control can reach its dialogs.\n */\nexport function AiAssistProviderOnHost(props: ProviderProps) {\n const { permissionsOnHost, enabledPluginIds, ...rest } = props\n const aiPermissions = useAiPermissionsOnHost(permissionsOnHost)\n const offForSite = Boolean(enabledPluginIds) && !enabledPluginIds?.includes(AI_PLUGIN_ID)\n return (\n <AiAssistProvider {...rest} aiPermissions={offForSite ? OFF_FOR_SITE : aiPermissions} />\n )\n}\nAiAssistProviderOnHost.displayName = 'AiAssistProviderOnHost'\n\ntype PanelProps = Omit<ComponentProps<typeof AssistPanelComponent>, 'aiPermissions'> & {\n permissionsOnHost?: ShellPermissionsOnHost\n}\n\n/** The assistant dock, holding on the shell's permission answer. */\nexport function AssistPanelOnHost(props: PanelProps) {\n const { permissionsOnHost, ...rest } = props\n const aiPermissions = useAiPermissionsOnHost(permissionsOnHost) ?? HELD\n return <AssistPanelComponent {...rest} aiPermissions={aiPermissions} />\n}\nAssistPanelOnHost.displayName = 'AssistPanelOnHost'\n"],"names":["useMemo","AI_PLUGIN_ID","aiPermissionsOf","AiAssistProvider","AssistPanelComponent","HELD","loaded","use","generate","useAiPermissionsOnHost","answer","present","undefined","verdict","granted","OFF_FOR_SITE","AiAssistProviderOnHost","props","permissionsOnHost","enabledPluginIds","rest","aiPermissions","offForSite","Boolean","includes","displayName","AssistPanelOnHost"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;;;AAEA,SAASA,OAAO,QAA6B,QAAO;AACpD,SAASC,YAAY,QAAQ,kBAAc;AAC3C,SAASC,eAAe,QAAQ,6BAAyB;AACzD,SAASC,gBAAgB,QAAQ,oCAAgC;AACjE,SAASC,oBAAoB,QAAQ,8BAA0B;AAmB/D,MAAMC,OAA4B;IAAEC,QAAQ;IAAOC,KAAK;IAAOC,UAAU;AAAM;AAE/E;;;;CAIC,GACD,OAAO,SAASC,uBACdC,MAA0C;IAE1C,MAAMC,UAAUD,WAAWE;IAC3B,MAAMN,SAASI,CAAAA,0BAAAA,OAAQJ,MAAM,MAAK;IAClC,MAAMO,UAAUX,gBAAgBI,SAASI,0BAAAA,OAAQI,OAAO,GAAG;IAC3D,MAAMP,MAAMM,OAAO,CAAC,SAAS;IAC7B,MAAML,WAAWK,OAAO,CAAC,cAAc;IACvC,OAAOb,QACL,IAAOW,UAAU;YAAEL;YAAQC;YAAKC;QAAS,IAAII,WAC7C;QAACD;QAASL;QAAQC;QAAKC;KAAS;AAEpC;AAYA;;;CAGC,GACD,MAAMO,eAAoC;IAAET,QAAQ;IAAMC,KAAK;IAAOC,UAAU;AAAM;AAEtF;;;;;;;;CAQC,GACD,OAAO,SAASQ,uBAAuBC,KAAoB;IACzD,MAAM,EAAEC,iBAAiB,EAAEC,gBAAgB,EAAW,GAAGF,OAATG,wCAASH;;;;IACzD,MAAMI,gBAAgBZ,uBAAuBS;IAC7C,MAAMI,aAAaC,QAAQJ,qBAAqB,EAACA,oCAAAA,iBAAkBK,QAAQ,CAACvB;IAC5E,qBACE,KAACE,+BAAqBiB;QAAMC,eAAeC,aAAaP,eAAeM;;AAE3E;AACAL,uBAAuBS,WAAW,GAAG;AAMrC,kEAAkE,GAClE,OAAO,SAASC,kBAAkBT,KAAiB;QAE3BR;IADtB,MAAM,EAAES,iBAAiB,EAAW,GAAGD,OAATG,wCAASH;;;IACvC,MAAMI,iBAAgBZ,0BAAAA,uBAAuBS,8BAAvBT,0BAA6CJ;IACnE,qBAAO,KAACD,mCAAyBgB;QAAMC,eAAeA;;AACxD;AACAK,kBAAkBD,WAAW,GAAG"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ConsoleProductCopyValues, ConsoleProductEditorZoneProps } from '@aglyn/aglyn/plugin-manager/feature-plugins';
|
|
2
|
+
import { type AiProductCopyProposal } from '../model/ai-products';
|
|
3
|
+
/**
|
|
4
|
+
* "Write with AI" in the commerce product editor (AGL-2916), through the
|
|
5
|
+
* `productEditor` zone. A `products` job writes the product's description,
|
|
6
|
+
* search listing, tags, categories and clearer option names from what the
|
|
7
|
+
* editor holds: its name, text, tags and options, and its first photo for a
|
|
8
|
+
* model that reads pictures. The proposal is shown in full, with any fact the
|
|
9
|
+
* copy could not know marked for the person to fill in, and "Put in the
|
|
10
|
+
* fields" stages it in the editor as unsaved changes. Save product is the
|
|
11
|
+
* write; this card never writes a product.
|
|
12
|
+
*/
|
|
13
|
+
/** The brief a product copy job carries, which the jobs list shows. */
|
|
14
|
+
export declare const aiProductCopyBrief: (name: string) => string;
|
|
15
|
+
/** The values a proposal stages, in the editor's terms. */
|
|
16
|
+
export declare function aiProductCopyValues(proposal: AiProductCopyProposal): ConsoleProductCopyValues;
|
|
17
|
+
/** The proposed copy, field by field. */
|
|
18
|
+
export declare function AiProductCopyProposalView(props: {
|
|
19
|
+
proposal: AiProductCopyProposal;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
export declare function AiProductCopyCard(props: ConsoleProductEditorZoneProps): import("react").JSX.Element;
|
|
22
|
+
export declare namespace AiProductCopyCard {
|
|
23
|
+
var displayName: string;
|
|
24
|
+
}
|
|
25
|
+
export default AiProductCopyCard;
|