@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,95 @@
|
|
|
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 AiDoctrineViolation } from './ai-doctrine-validators';
|
|
18
|
+
/**
|
|
19
|
+
* A repeated item written once (AGL-3053).
|
|
20
|
+
*
|
|
21
|
+
* A workspace that keeps no reusable components can place no instance, so a
|
|
22
|
+
* row of cards is drawn card by card. Written out in a model's answer, every
|
|
23
|
+
* card repeats its whole subtree — the Card, its body, its heading and its
|
|
24
|
+
* text, each node's JSON escaped inside the tool call — and four practice
|
|
25
|
+
* areas with real copy run past a section pass's answer ceiling. So on such a
|
|
26
|
+
* workspace an answer writes the item ONCE and lists what differs between its
|
|
27
|
+
* copies, and this module draws the copies before any check reads the answer:
|
|
28
|
+
*
|
|
29
|
+
* ```json
|
|
30
|
+
* "card": { "componentId": "muiCard", "nodes": ["body"],
|
|
31
|
+
* "repeat": [["Estate planning", "Wills and trusts…"],
|
|
32
|
+
* ["Real estate", "Closings and title…"]] },
|
|
33
|
+
* "title": { "componentId": "muiTypography", "props": { "children": "{{1}}" } },
|
|
34
|
+
* "text": { "componentId": "muiTypography", "props": { "children": "{{2}}" } }
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* `repeat` holds one list of values a copy, and `{{n}}` stands for a copy's
|
|
38
|
+
* n-th value wherever it appears in the item's props or styles.
|
|
39
|
+
*
|
|
40
|
+
* - **Positional, because it is the smallest list a copy can be.** Each value
|
|
41
|
+
* costs its quotes and a comma. A named value repeats its name on every
|
|
42
|
+
* copy, and a list of columns keeps a copy's values apart from each other.
|
|
43
|
+
* - **Numbered, because no binding token is a number.** A site variable's
|
|
44
|
+
* `{{name}}` starts with a letter, and a component's `{{prop.name}}`, a
|
|
45
|
+
* template's `{{entry.field}}` and a function's `{{fn:…}}` carry a dot or a
|
|
46
|
+
* colon (`binding-tokens.ts`), so copy that binds one keeps its token, and
|
|
47
|
+
* nothing a placeholder leaves behind can bind.
|
|
48
|
+
*
|
|
49
|
+
* The copies are the item cloned in order, in its place under its parent. The
|
|
50
|
+
* first keeps the ids the model wrote, and copy `n` takes `<id>~<n>` on every
|
|
51
|
+
* node of the subtree, so one answer always draws one tree and every id a copy
|
|
52
|
+
* took leads back to the node the model wrote (`sourceIds`). The drawn tree is
|
|
53
|
+
* what every check reads and what a page stores: nothing downstream sees
|
|
54
|
+
* `repeat` or a placeholder.
|
|
55
|
+
*
|
|
56
|
+
* Refused, each with a sentence a re-ask can act on and the model's own nodes
|
|
57
|
+
* named: `repeat` where the workspace keeps reusable components (rule 1: place
|
|
58
|
+
* a component's instances), on the document wrapper or what it holds
|
|
59
|
+
* directly, or inside another repeated item; a list that is not one list of
|
|
60
|
+
* values a copy; fewer than 2 copies or more than `AI_REPEAT_MAX_COPIES`; a
|
|
61
|
+
* placeholder a copy gives no value for, or one outside every repeated item; a
|
|
62
|
+
* value no placeholder uses; and a copy's id that the answer already gives
|
|
63
|
+
* another node. Pure: no provider and no Firestore.
|
|
64
|
+
*/
|
|
65
|
+
/** The key a repeated item's node lists its copies' values under. */
|
|
66
|
+
export declare const AI_REPEAT_KEY = "repeat";
|
|
67
|
+
/**
|
|
68
|
+
* The most copies one item may list: a list of `AI_TYPED_LIST_MIN_ITEMS` or
|
|
69
|
+
* more typed into a page is data (rule 8), which a plan binds or shortens.
|
|
70
|
+
*/
|
|
71
|
+
export declare const AI_REPEAT_MAX_COPIES: number;
|
|
72
|
+
export interface AiRepeatedItemsOptions {
|
|
73
|
+
/** The workspace keeps no reusable components: the one place an item is written once. */
|
|
74
|
+
inline: boolean;
|
|
75
|
+
/** What the answer is, as a person reads a refusal: `section`, `page`. */
|
|
76
|
+
noun: string;
|
|
77
|
+
}
|
|
78
|
+
export type AiRepeatedItemsResult = {
|
|
79
|
+
ok: true;
|
|
80
|
+
/** The answer with every repeated item drawn into its copies; the answer itself when none is. */
|
|
81
|
+
tree: unknown;
|
|
82
|
+
/** Each id a copy took → the id the model wrote for that node. */
|
|
83
|
+
sourceIds: Record<string, string>;
|
|
84
|
+
/** How many items were written once. */
|
|
85
|
+
items: number;
|
|
86
|
+
} | {
|
|
87
|
+
ok: false;
|
|
88
|
+
violations: AiDoctrineViolation[];
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* The answer with every repeated item drawn into its copies, or the reasons it
|
|
92
|
+
* cannot be. An answer that is not a node map, or that writes nothing once, is
|
|
93
|
+
* handed back as it came, for the palette validator to read as it always has.
|
|
94
|
+
*/
|
|
95
|
+
export declare function expandAiRepeatedItems(input: unknown, options: AiRepeatedItemsOptions): AiRepeatedItemsResult;
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
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_TYPED_LIST_MIN_ITEMS } from "./ai-doctrine-validators.js";
|
|
18
|
+
/**
|
|
19
|
+
* A repeated item written once (AGL-3053).
|
|
20
|
+
*
|
|
21
|
+
* A workspace that keeps no reusable components can place no instance, so a
|
|
22
|
+
* row of cards is drawn card by card. Written out in a model's answer, every
|
|
23
|
+
* card repeats its whole subtree — the Card, its body, its heading and its
|
|
24
|
+
* text, each node's JSON escaped inside the tool call — and four practice
|
|
25
|
+
* areas with real copy run past a section pass's answer ceiling. So on such a
|
|
26
|
+
* workspace an answer writes the item ONCE and lists what differs between its
|
|
27
|
+
* copies, and this module draws the copies before any check reads the answer:
|
|
28
|
+
*
|
|
29
|
+
* ```json
|
|
30
|
+
* "card": { "componentId": "muiCard", "nodes": ["body"],
|
|
31
|
+
* "repeat": [["Estate planning", "Wills and trusts…"],
|
|
32
|
+
* ["Real estate", "Closings and title…"]] },
|
|
33
|
+
* "title": { "componentId": "muiTypography", "props": { "children": "{{1}}" } },
|
|
34
|
+
* "text": { "componentId": "muiTypography", "props": { "children": "{{2}}" } }
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* `repeat` holds one list of values a copy, and `{{n}}` stands for a copy's
|
|
38
|
+
* n-th value wherever it appears in the item's props or styles.
|
|
39
|
+
*
|
|
40
|
+
* - **Positional, because it is the smallest list a copy can be.** Each value
|
|
41
|
+
* costs its quotes and a comma. A named value repeats its name on every
|
|
42
|
+
* copy, and a list of columns keeps a copy's values apart from each other.
|
|
43
|
+
* - **Numbered, because no binding token is a number.** A site variable's
|
|
44
|
+
* `{{name}}` starts with a letter, and a component's `{{prop.name}}`, a
|
|
45
|
+
* template's `{{entry.field}}` and a function's `{{fn:…}}` carry a dot or a
|
|
46
|
+
* colon (`binding-tokens.ts`), so copy that binds one keeps its token, and
|
|
47
|
+
* nothing a placeholder leaves behind can bind.
|
|
48
|
+
*
|
|
49
|
+
* The copies are the item cloned in order, in its place under its parent. The
|
|
50
|
+
* first keeps the ids the model wrote, and copy `n` takes `<id>~<n>` on every
|
|
51
|
+
* node of the subtree, so one answer always draws one tree and every id a copy
|
|
52
|
+
* took leads back to the node the model wrote (`sourceIds`). The drawn tree is
|
|
53
|
+
* what every check reads and what a page stores: nothing downstream sees
|
|
54
|
+
* `repeat` or a placeholder.
|
|
55
|
+
*
|
|
56
|
+
* Refused, each with a sentence a re-ask can act on and the model's own nodes
|
|
57
|
+
* named: `repeat` where the workspace keeps reusable components (rule 1: place
|
|
58
|
+
* a component's instances), on the document wrapper or what it holds
|
|
59
|
+
* directly, or inside another repeated item; a list that is not one list of
|
|
60
|
+
* values a copy; fewer than 2 copies or more than `AI_REPEAT_MAX_COPIES`; a
|
|
61
|
+
* placeholder a copy gives no value for, or one outside every repeated item; a
|
|
62
|
+
* value no placeholder uses; and a copy's id that the answer already gives
|
|
63
|
+
* another node. Pure: no provider and no Firestore.
|
|
64
|
+
*/ /** The key a repeated item's node lists its copies' values under. */ export const AI_REPEAT_KEY = 'repeat';
|
|
65
|
+
/**
|
|
66
|
+
* The most copies one item may list: a list of `AI_TYPED_LIST_MIN_ITEMS` or
|
|
67
|
+
* more typed into a page is data (rule 8), which a plan binds or shortens.
|
|
68
|
+
*/ export const AI_REPEAT_MAX_COPIES = AI_TYPED_LIST_MIN_ITEMS - 1;
|
|
69
|
+
/** A copy's `n`-th value, by its 1-based position. */ const PLACEHOLDER = /\{\{\s*(\d+)\s*\}\}/g;
|
|
70
|
+
/** A string that is one placeholder and nothing else, whose value keeps its own type. */ const WHOLE_PLACEHOLDER = /^\s*\{\{\s*(\d+)\s*\}\}\s*$/;
|
|
71
|
+
/** What a list of copies looks like, in every sentence that asks for one. */ const EXAMPLE = '[["Title 1", "Text 1"], ["Title 2", "Text 2"]]';
|
|
72
|
+
function isRecord(value) {
|
|
73
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
74
|
+
}
|
|
75
|
+
function isScalar(value) {
|
|
76
|
+
return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' && Number.isFinite(value);
|
|
77
|
+
}
|
|
78
|
+
function childIds(node) {
|
|
79
|
+
const children = node == null ? void 0 : node['nodes'];
|
|
80
|
+
return Array.isArray(children) ? children.filter((id)=>typeof id === 'string') : [];
|
|
81
|
+
}
|
|
82
|
+
/** Every placeholder position a value uses, however deep in props or styles. */ function positionsIn(value, into) {
|
|
83
|
+
if (typeof value === 'string') {
|
|
84
|
+
for (const match of value.matchAll(PLACEHOLDER))into.add(Number(match[1]));
|
|
85
|
+
} else if (Array.isArray(value)) {
|
|
86
|
+
for (const inner of value)positionsIn(inner, into);
|
|
87
|
+
} else if (isRecord(value)) {
|
|
88
|
+
for (const inner of Object.values(value))positionsIn(inner, into);
|
|
89
|
+
}
|
|
90
|
+
return into;
|
|
91
|
+
}
|
|
92
|
+
/** The positions one node's props and styles use. */ function nodePositions(node) {
|
|
93
|
+
return positionsIn(node['sx'], positionsIn(node['props'], new Set()));
|
|
94
|
+
}
|
|
95
|
+
/** A value with every placeholder filled from one copy's values. */ function fill(value, values) {
|
|
96
|
+
if (typeof value === 'string') {
|
|
97
|
+
const whole = WHOLE_PLACEHOLDER.exec(value);
|
|
98
|
+
if (whole) return values[Number(whole[1]) - 1];
|
|
99
|
+
return value.replace(PLACEHOLDER, (_token, position)=>String(values[Number(position) - 1]));
|
|
100
|
+
}
|
|
101
|
+
if (Array.isArray(value)) return value.map((inner)=>fill(inner, values));
|
|
102
|
+
if (isRecord(value)) {
|
|
103
|
+
return Object.fromEntries(Object.entries(value).map(([key, inner])=>[
|
|
104
|
+
key,
|
|
105
|
+
fill(inner, values)
|
|
106
|
+
]));
|
|
107
|
+
}
|
|
108
|
+
return value;
|
|
109
|
+
}
|
|
110
|
+
/** 1 → first, 2 → second, 12 → 12th. */ function ordinal(position) {
|
|
111
|
+
var _;
|
|
112
|
+
const word = [
|
|
113
|
+
'first',
|
|
114
|
+
'second',
|
|
115
|
+
'third',
|
|
116
|
+
'fourth',
|
|
117
|
+
'fifth',
|
|
118
|
+
'sixth',
|
|
119
|
+
'seventh'
|
|
120
|
+
][position - 1];
|
|
121
|
+
if (word) return word;
|
|
122
|
+
const tens = position % 100;
|
|
123
|
+
const suffix = tens >= 11 && tens <= 13 ? 'th' : (_ = [
|
|
124
|
+
'th',
|
|
125
|
+
'st',
|
|
126
|
+
'nd',
|
|
127
|
+
'rd'
|
|
128
|
+
][position % 10]) != null ? _ : 'th';
|
|
129
|
+
return `${position}${suffix}`;
|
|
130
|
+
}
|
|
131
|
+
/** `{{1}}`, `{{1}} and {{2}}`, `{{1}}, {{2}} and {{3}}`. */ function placeholders(positions) {
|
|
132
|
+
const list = [
|
|
133
|
+
...positions
|
|
134
|
+
].sort((a, b)=>a - b).map((position)=>`{{${position}}}`);
|
|
135
|
+
return list.length <= 1 ? list.join('') : `${list.slice(0, -1).join(', ')} and ${list[list.length - 1]}`;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* The answer with every repeated item drawn into its copies, or the reasons it
|
|
139
|
+
* cannot be. An answer that is not a node map, or that writes nothing once, is
|
|
140
|
+
* handed back as it came, for the palette validator to read as it always has.
|
|
141
|
+
*/ export function expandAiRepeatedItems(input, options) {
|
|
142
|
+
const unchanged = {
|
|
143
|
+
ok: true,
|
|
144
|
+
tree: input,
|
|
145
|
+
sourceIds: {},
|
|
146
|
+
items: 0
|
|
147
|
+
};
|
|
148
|
+
if (!isRecord(input) || typeof input['rootId'] !== 'string' || !isRecord(input['nodes'])) return unchanged;
|
|
149
|
+
const rootId = input['rootId'];
|
|
150
|
+
const nodes = input['nodes'];
|
|
151
|
+
const nodeOf = (id)=>{
|
|
152
|
+
const node = nodes[id];
|
|
153
|
+
return isRecord(node) ? node : undefined;
|
|
154
|
+
};
|
|
155
|
+
// The walk the palette validator makes: breadth first from the root, each
|
|
156
|
+
// node under the first parent that lists it.
|
|
157
|
+
const parentOf = new Map([
|
|
158
|
+
[
|
|
159
|
+
rootId,
|
|
160
|
+
null
|
|
161
|
+
]
|
|
162
|
+
]);
|
|
163
|
+
const order = [];
|
|
164
|
+
const queue = [
|
|
165
|
+
rootId
|
|
166
|
+
];
|
|
167
|
+
for(let index = 0; index < queue.length; index += 1){
|
|
168
|
+
const id = queue[index];
|
|
169
|
+
if (!nodeOf(id)) continue;
|
|
170
|
+
order.push(id);
|
|
171
|
+
for (const child of childIds(nodeOf(id))){
|
|
172
|
+
if (parentOf.has(child)) continue;
|
|
173
|
+
parentOf.set(child, id);
|
|
174
|
+
queue.push(child);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
const marked = order.filter((id)=>Object.prototype.hasOwnProperty.call(nodeOf(id), AI_REPEAT_KEY));
|
|
178
|
+
if (!options.inline) {
|
|
179
|
+
return marked.length ? {
|
|
180
|
+
ok: false,
|
|
181
|
+
violations: [
|
|
182
|
+
{
|
|
183
|
+
rule: 1,
|
|
184
|
+
code: 'repeat-not-inline',
|
|
185
|
+
message: 'This draws a repeated item to be copied, instead of placing it as instances of a component.',
|
|
186
|
+
detail: `Remove "${AI_REPEAT_KEY}", and place each copy as an instance of a component the site has (componentId "reusableInstance").`,
|
|
187
|
+
nodeIds: marked
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
} : unchanged;
|
|
191
|
+
}
|
|
192
|
+
/** A node and everything under it, each node once. */ const subtreeOf = (id)=>{
|
|
193
|
+
const seen = new Set();
|
|
194
|
+
const stack = [
|
|
195
|
+
id
|
|
196
|
+
];
|
|
197
|
+
const out = [];
|
|
198
|
+
while(stack.length){
|
|
199
|
+
const next = stack.pop();
|
|
200
|
+
if (seen.has(next) || !nodeOf(next)) continue;
|
|
201
|
+
seen.add(next);
|
|
202
|
+
out.push(next);
|
|
203
|
+
stack.push(...childIds(nodeOf(next)).reverse());
|
|
204
|
+
}
|
|
205
|
+
return out;
|
|
206
|
+
};
|
|
207
|
+
const ancestorsOf = (id)=>{
|
|
208
|
+
const out = [];
|
|
209
|
+
for(let parent = parentOf.get(id); parent; parent = parentOf.get(parent))out.push(parent);
|
|
210
|
+
return out;
|
|
211
|
+
};
|
|
212
|
+
const violations = [];
|
|
213
|
+
const refuse = (code, detail, nodeIds)=>{
|
|
214
|
+
violations.push({
|
|
215
|
+
rule: null,
|
|
216
|
+
code,
|
|
217
|
+
message: `The answer could not be used as a ${options.noun}.`,
|
|
218
|
+
detail,
|
|
219
|
+
nodeIds: [
|
|
220
|
+
...new Set(nodeIds)
|
|
221
|
+
]
|
|
222
|
+
});
|
|
223
|
+
};
|
|
224
|
+
const inItem = new Set(marked.flatMap(subtreeOf));
|
|
225
|
+
const topLevel = new Set([
|
|
226
|
+
rootId,
|
|
227
|
+
...childIds(nodeOf(rootId))
|
|
228
|
+
]);
|
|
229
|
+
const taken = new Set(Object.keys(nodes));
|
|
230
|
+
const items = [];
|
|
231
|
+
for (const id of marked){
|
|
232
|
+
var _nodeOf;
|
|
233
|
+
const outer = ancestorsOf(id).find((ancestor)=>marked.includes(ancestor));
|
|
234
|
+
if (outer) {
|
|
235
|
+
refuse('repeat-nested', `"${id}" has "${AI_REPEAT_KEY}" inside "${outer}", which repeats already: keep "${AI_REPEAT_KEY}" on "${outer}" alone, and write what repeats inside it out in full.`, [
|
|
236
|
+
id,
|
|
237
|
+
outer
|
|
238
|
+
]);
|
|
239
|
+
continue;
|
|
240
|
+
}
|
|
241
|
+
if (topLevel.has(id)) {
|
|
242
|
+
refuse('repeat-on-section', `"${id}" is the document wrapper or what it holds directly, and never repeats: put "${AI_REPEAT_KEY}" on the item that repeats inside the ${options.noun}.`, [
|
|
243
|
+
id
|
|
244
|
+
]);
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
const list = (_nodeOf = nodeOf(id)) == null ? void 0 : _nodeOf[AI_REPEAT_KEY];
|
|
248
|
+
if (!Array.isArray(list)) {
|
|
249
|
+
refuse('repeat-shape', `"${AI_REPEAT_KEY}" on "${id}" is not a list of copies: give it one list of values for each copy, such as ${EXAMPLE}.`, [
|
|
250
|
+
id
|
|
251
|
+
]);
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
// A copy of one value may be the value itself.
|
|
255
|
+
const listed = list.map((copy)=>isScalar(copy) ? [
|
|
256
|
+
copy
|
|
257
|
+
] : copy);
|
|
258
|
+
const malformed = listed.findIndex((copy)=>!Array.isArray(copy) || !copy.every(isScalar));
|
|
259
|
+
if (malformed !== -1) {
|
|
260
|
+
refuse('repeat-shape', `The ${ordinal(malformed + 1)} copy of "${id}" is not a list of text values: give each copy one list, such as ${EXAMPLE}.`, [
|
|
261
|
+
id
|
|
262
|
+
]);
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
const copies = listed;
|
|
266
|
+
if (copies.length < 2 || copies.length > AI_REPEAT_MAX_COPIES) {
|
|
267
|
+
refuse('repeat-count', `"${AI_REPEAT_KEY}" on "${id}" lists ${copies.length} ${copies.length === 1 ? 'copy' : 'copies'}: list from 2 to ${AI_REPEAT_MAX_COPIES}, and write an item that appears once without "${AI_REPEAT_KEY}".`, [
|
|
268
|
+
id
|
|
269
|
+
]);
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
const subtree = subtreeOf(id);
|
|
273
|
+
const users = new Map();
|
|
274
|
+
for (const node of subtree){
|
|
275
|
+
for (const position of nodePositions(nodeOf(node))){
|
|
276
|
+
var _users_get;
|
|
277
|
+
users.set(position, [
|
|
278
|
+
...(_users_get = users.get(position)) != null ? _users_get : [],
|
|
279
|
+
node
|
|
280
|
+
]);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
const used = [
|
|
284
|
+
...users.keys()
|
|
285
|
+
].sort((a, b)=>a - b);
|
|
286
|
+
const highest = used.length ? used[used.length - 1] : 0;
|
|
287
|
+
if (users.has(0)) {
|
|
288
|
+
refuse('repeat-placeholder-without-value', `"${users.get(0)[0]}" uses {{0}}, and a copy's values count from {{1}}: write {{1}} for each copy's first value.`, [
|
|
289
|
+
id,
|
|
290
|
+
...users.get(0)
|
|
291
|
+
]);
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
const gap = used.findIndex((position, index)=>position !== index + 1) + 1;
|
|
295
|
+
if (gap > 0) {
|
|
296
|
+
refuse('repeat-value-without-placeholder', `"${id}" uses ${placeholders(used)} and no {{${gap}}}, so each copy's ${ordinal(gap)} value fills nothing: number the placeholders from {{1}} with no gap.`, [
|
|
297
|
+
id
|
|
298
|
+
]);
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
301
|
+
const short = copies.findIndex((copy)=>copy.length < highest);
|
|
302
|
+
if (short !== -1) {
|
|
303
|
+
const unfilled = used.filter((position)=>position > copies[short].length);
|
|
304
|
+
refuse('repeat-placeholder-without-value', `The ${ordinal(short + 1)} copy of "${id}" gives ${copies[short].length} ${copies[short].length === 1 ? 'value' : 'values'}, and the item uses ${placeholders(used)}: give every copy one value for each placeholder, in order.`, [
|
|
305
|
+
id,
|
|
306
|
+
...unfilled.flatMap((position)=>{
|
|
307
|
+
var _users_get;
|
|
308
|
+
return (_users_get = users.get(position)) != null ? _users_get : [];
|
|
309
|
+
})
|
|
310
|
+
]);
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
313
|
+
const long = copies.findIndex((copy)=>copy.length > highest);
|
|
314
|
+
if (long !== -1) {
|
|
315
|
+
refuse('repeat-value-without-placeholder', highest ? `The ${ordinal(long + 1)} copy of "${id}" gives ${copies[long].length} values, and the item uses only ${placeholders(used)}: give every copy one value for each placeholder, in order.` : `"${id}" lists values and uses no placeholder for them: write {{1}}, {{2}} and on where its copies differ, each copy's values in that order.`, [
|
|
316
|
+
id
|
|
317
|
+
]);
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
320
|
+
const collision = subtree.flatMap((node)=>copies.slice(1).map((_values, index)=>({
|
|
321
|
+
node,
|
|
322
|
+
copy: index + 2
|
|
323
|
+
}))).find(({ node, copy })=>taken.has(`${node}~${copy}`));
|
|
324
|
+
if (collision) {
|
|
325
|
+
const clash = `${collision.node}~${collision.copy}`;
|
|
326
|
+
refuse('repeat-id-collision', `The ${ordinal(collision.copy)} copy of "${collision.node}" takes the id "${clash}", which the answer already gives another node: rename "${clash}".`, [
|
|
327
|
+
id,
|
|
328
|
+
clash
|
|
329
|
+
]);
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
for (const node of subtree)copies.slice(1).forEach((_values, index)=>taken.add(`${node}~${index + 2}`));
|
|
333
|
+
items.push({
|
|
334
|
+
id,
|
|
335
|
+
parent: parentOf.get(id),
|
|
336
|
+
subtree,
|
|
337
|
+
copies
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
// A placeholder in no repeated item has no copy to take a value from.
|
|
341
|
+
for (const id of order){
|
|
342
|
+
if (inItem.has(id)) continue;
|
|
343
|
+
const positions = nodePositions(nodeOf(id));
|
|
344
|
+
if (!positions.size) continue;
|
|
345
|
+
refuse('repeat-placeholder-without-value', `"${id}" uses ${placeholders(positions)} and sits in no item with "${AI_REPEAT_KEY}": write its text out, or put "${AI_REPEAT_KEY}" on the item it repeats in.`, [
|
|
346
|
+
id
|
|
347
|
+
]);
|
|
348
|
+
}
|
|
349
|
+
if (violations.length) return {
|
|
350
|
+
ok: false,
|
|
351
|
+
violations
|
|
352
|
+
};
|
|
353
|
+
if (!items.length) return unchanged;
|
|
354
|
+
const drawn = _extends({}, nodes);
|
|
355
|
+
const sourceIds = {};
|
|
356
|
+
for (const item of items){
|
|
357
|
+
const members = new Set(item.subtree);
|
|
358
|
+
const idIn = (node, copy)=>copy === 1 || !members.has(node) ? node : `${node}~${copy}`;
|
|
359
|
+
item.copies.forEach((values, index)=>{
|
|
360
|
+
const copy = index + 1;
|
|
361
|
+
for (const node of item.subtree){
|
|
362
|
+
const source = nodeOf(node);
|
|
363
|
+
const clone = _extends({}, source);
|
|
364
|
+
delete clone[AI_REPEAT_KEY];
|
|
365
|
+
if (source['props'] !== undefined) clone['props'] = fill(source['props'], values);
|
|
366
|
+
if (source['sx'] !== undefined) clone['sx'] = fill(source['sx'], values);
|
|
367
|
+
if (Array.isArray(source['nodes'])) {
|
|
368
|
+
clone['nodes'] = source['nodes'].map((child)=>typeof child === 'string' ? idIn(child, copy) : child);
|
|
369
|
+
}
|
|
370
|
+
if (node !== item.id && typeof source['parentId'] === 'string') clone['parentId'] = idIn(source['parentId'], copy);
|
|
371
|
+
const id = idIn(node, copy);
|
|
372
|
+
drawn[id] = clone;
|
|
373
|
+
if (copy > 1) sourceIds[id] = node;
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
// Every copy in the item's place, in order: the parent as drawn so far,
|
|
377
|
+
// which an item beside this one may already have drawn into.
|
|
378
|
+
const parent = drawn[item.parent];
|
|
379
|
+
const siblings = Array.isArray(parent['nodes']) ? [
|
|
380
|
+
...parent['nodes']
|
|
381
|
+
] : [];
|
|
382
|
+
siblings.splice(siblings.indexOf(item.id), 1, ...item.copies.map((_values, index)=>idIn(item.id, index + 1)));
|
|
383
|
+
drawn[item.parent] = _extends({}, parent, {
|
|
384
|
+
nodes: siblings
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
return {
|
|
388
|
+
ok: true,
|
|
389
|
+
tree: _extends({}, input, {
|
|
390
|
+
nodes: drawn
|
|
391
|
+
}),
|
|
392
|
+
sourceIds,
|
|
393
|
+
items: items.length
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
//# sourceMappingURL=ai-repeated-items.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/runtime/ai-repeated-items.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AI_TYPED_LIST_MIN_ITEMS, type AiDoctrineViolation } from './ai-doctrine-validators'\n\n/**\n * A repeated item written once (AGL-3053).\n *\n * A workspace that keeps no reusable components can place no instance, so a\n * row of cards is drawn card by card. Written out in a model's answer, every\n * card repeats its whole subtree — the Card, its body, its heading and its\n * text, each node's JSON escaped inside the tool call — and four practice\n * areas with real copy run past a section pass's answer ceiling. So on such a\n * workspace an answer writes the item ONCE and lists what differs between its\n * copies, and this module draws the copies before any check reads the answer:\n *\n * ```json\n * \"card\": { \"componentId\": \"muiCard\", \"nodes\": [\"body\"],\n * \"repeat\": [[\"Estate planning\", \"Wills and trusts…\"],\n * [\"Real estate\", \"Closings and title…\"]] },\n * \"title\": { \"componentId\": \"muiTypography\", \"props\": { \"children\": \"{{1}}\" } },\n * \"text\": { \"componentId\": \"muiTypography\", \"props\": { \"children\": \"{{2}}\" } }\n * ```\n *\n * `repeat` holds one list of values a copy, and `{{n}}` stands for a copy's\n * n-th value wherever it appears in the item's props or styles.\n *\n * - **Positional, because it is the smallest list a copy can be.** Each value\n * costs its quotes and a comma. A named value repeats its name on every\n * copy, and a list of columns keeps a copy's values apart from each other.\n * - **Numbered, because no binding token is a number.** A site variable's\n * `{{name}}` starts with a letter, and a component's `{{prop.name}}`, a\n * template's `{{entry.field}}` and a function's `{{fn:…}}` carry a dot or a\n * colon (`binding-tokens.ts`), so copy that binds one keeps its token, and\n * nothing a placeholder leaves behind can bind.\n *\n * The copies are the item cloned in order, in its place under its parent. The\n * first keeps the ids the model wrote, and copy `n` takes `<id>~<n>` on every\n * node of the subtree, so one answer always draws one tree and every id a copy\n * took leads back to the node the model wrote (`sourceIds`). The drawn tree is\n * what every check reads and what a page stores: nothing downstream sees\n * `repeat` or a placeholder.\n *\n * Refused, each with a sentence a re-ask can act on and the model's own nodes\n * named: `repeat` where the workspace keeps reusable components (rule 1: place\n * a component's instances), on the document wrapper or what it holds\n * directly, or inside another repeated item; a list that is not one list of\n * values a copy; fewer than 2 copies or more than `AI_REPEAT_MAX_COPIES`; a\n * placeholder a copy gives no value for, or one outside every repeated item; a\n * value no placeholder uses; and a copy's id that the answer already gives\n * another node. Pure: no provider and no Firestore.\n */\n\n/** The key a repeated item's node lists its copies' values under. */\nexport const AI_REPEAT_KEY = 'repeat'\n\n/**\n * The most copies one item may list: a list of `AI_TYPED_LIST_MIN_ITEMS` or\n * more typed into a page is data (rule 8), which a plan binds or shortens.\n */\nexport const AI_REPEAT_MAX_COPIES = AI_TYPED_LIST_MIN_ITEMS - 1\n\n/** A copy's `n`-th value, by its 1-based position. */\nconst PLACEHOLDER = /\\{\\{\\s*(\\d+)\\s*\\}\\}/g\n\n/** A string that is one placeholder and nothing else, whose value keeps its own type. */\nconst WHOLE_PLACEHOLDER = /^\\s*\\{\\{\\s*(\\d+)\\s*\\}\\}\\s*$/\n\n/** What a list of copies looks like, in every sentence that asks for one. */\nconst EXAMPLE = '[[\"Title 1\", \"Text 1\"], [\"Title 2\", \"Text 2\"]]'\n\nexport interface AiRepeatedItemsOptions {\n /** The workspace keeps no reusable components: the one place an item is written once. */\n inline: boolean\n /** What the answer is, as a person reads a refusal: `section`, `page`. */\n noun: string\n}\n\nexport type AiRepeatedItemsResult =\n | {\n ok: true\n /** The answer with every repeated item drawn into its copies; the answer itself when none is. */\n tree: unknown\n /** Each id a copy took → the id the model wrote for that node. */\n sourceIds: Record<string, string>\n /** How many items were written once. */\n items: number\n }\n | { ok: false; violations: AiDoctrineViolation[] }\n\ntype RawNode = Record<string, unknown>\ntype Scalar = string | number | boolean\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\nfunction isScalar(value: unknown): value is Scalar {\n return (\n typeof value === 'string' || typeof value === 'boolean' || (typeof value === 'number' && Number.isFinite(value))\n )\n}\n\nfunction childIds(node: RawNode | undefined): string[] {\n const children = node?.['nodes']\n return Array.isArray(children) ? children.filter((id): id is string => typeof id === 'string') : []\n}\n\n/** Every placeholder position a value uses, however deep in props or styles. */\nfunction positionsIn(value: unknown, into: Set<number>): Set<number> {\n if (typeof value === 'string') {\n for (const match of value.matchAll(PLACEHOLDER)) into.add(Number(match[1]))\n } else if (Array.isArray(value)) {\n for (const inner of value) positionsIn(inner, into)\n } else if (isRecord(value)) {\n for (const inner of Object.values(value)) positionsIn(inner, into)\n }\n return into\n}\n\n/** The positions one node's props and styles use. */\nfunction nodePositions(node: RawNode): Set<number> {\n return positionsIn(node['sx'], positionsIn(node['props'], new Set()))\n}\n\n/** A value with every placeholder filled from one copy's values. */\nfunction fill(value: unknown, values: readonly Scalar[]): unknown {\n if (typeof value === 'string') {\n const whole = WHOLE_PLACEHOLDER.exec(value)\n if (whole) return values[Number(whole[1]) - 1]\n return value.replace(PLACEHOLDER, (_token, position: string) => String(values[Number(position) - 1]))\n }\n if (Array.isArray(value)) return value.map((inner) => fill(inner, values))\n if (isRecord(value)) {\n return Object.fromEntries(Object.entries(value).map(([key, inner]) => [key, fill(inner, values)]))\n }\n return value\n}\n\n/** 1 → first, 2 → second, 12 → 12th. */\nfunction ordinal(position: number): string {\n const word = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh'][position - 1]\n if (word) return word\n const tens = position % 100\n const suffix = tens >= 11 && tens <= 13 ? 'th' : (['th', 'st', 'nd', 'rd'][position % 10] ?? 'th')\n return `${position}${suffix}`\n}\n\n/** `{{1}}`, `{{1}} and {{2}}`, `{{1}}, {{2}} and {{3}}`. */\nfunction placeholders(positions: Iterable<number>): string {\n const list = [...positions].sort((a, b) => a - b).map((position) => `{{${position}}}`)\n return list.length <= 1 ? list.join('') : `${list.slice(0, -1).join(', ')} and ${list[list.length - 1]}`\n}\n\n/**\n * The answer with every repeated item drawn into its copies, or the reasons it\n * cannot be. An answer that is not a node map, or that writes nothing once, is\n * handed back as it came, for the palette validator to read as it always has.\n */\nexport function expandAiRepeatedItems(input: unknown, options: AiRepeatedItemsOptions): AiRepeatedItemsResult {\n const unchanged: AiRepeatedItemsResult = { ok: true, tree: input, sourceIds: {}, items: 0 }\n if (!isRecord(input) || typeof input['rootId'] !== 'string' || !isRecord(input['nodes'])) return unchanged\n const rootId = input['rootId']\n const nodes = input['nodes'] as Record<string, unknown>\n const nodeOf = (id: string): RawNode | undefined => {\n const node = nodes[id]\n return isRecord(node) ? node : undefined\n }\n\n // The walk the palette validator makes: breadth first from the root, each\n // node under the first parent that lists it.\n const parentOf = new Map<string, string | null>([[rootId, null]])\n const order: string[] = []\n const queue = [rootId]\n for (let index = 0; index < queue.length; index += 1) {\n const id = queue[index]\n if (!nodeOf(id)) continue\n order.push(id)\n for (const child of childIds(nodeOf(id))) {\n if (parentOf.has(child)) continue\n parentOf.set(child, id)\n queue.push(child)\n }\n }\n const marked = order.filter((id) => Object.prototype.hasOwnProperty.call(nodeOf(id), AI_REPEAT_KEY))\n\n if (!options.inline) {\n return marked.length\n ? {\n ok: false,\n violations: [\n {\n rule: 1,\n code: 'repeat-not-inline',\n message: 'This draws a repeated item to be copied, instead of placing it as instances of a component.',\n detail: `Remove \"${AI_REPEAT_KEY}\", and place each copy as an instance of a component the site has (componentId \"reusableInstance\").`,\n nodeIds: marked,\n },\n ],\n }\n : unchanged\n }\n\n /** A node and everything under it, each node once. */\n const subtreeOf = (id: string): string[] => {\n const seen = new Set<string>()\n const stack = [id]\n const out: string[] = []\n while (stack.length) {\n const next = stack.pop() as string\n if (seen.has(next) || !nodeOf(next)) continue\n seen.add(next)\n out.push(next)\n stack.push(...childIds(nodeOf(next)).reverse())\n }\n return out\n }\n const ancestorsOf = (id: string): string[] => {\n const out: string[] = []\n for (let parent = parentOf.get(id); parent; parent = parentOf.get(parent)) out.push(parent)\n return out\n }\n\n const violations: AiDoctrineViolation[] = []\n const refuse = (code: string, detail: string, nodeIds: string[]) => {\n violations.push({\n rule: null,\n code,\n message: `The answer could not be used as a ${options.noun}.`,\n detail,\n nodeIds: [...new Set(nodeIds)],\n })\n }\n const inItem = new Set(marked.flatMap(subtreeOf))\n const topLevel = new Set([rootId, ...childIds(nodeOf(rootId))])\n const taken = new Set(Object.keys(nodes))\n const items: Array<{ id: string; parent: string; subtree: string[]; copies: Scalar[][] }> = []\n\n for (const id of marked) {\n const outer = ancestorsOf(id).find((ancestor) => marked.includes(ancestor))\n if (outer) {\n refuse(\n 'repeat-nested',\n `\"${id}\" has \"${AI_REPEAT_KEY}\" inside \"${outer}\", which repeats already: keep \"${AI_REPEAT_KEY}\" on \"${outer}\" alone, and write what repeats inside it out in full.`,\n [id, outer],\n )\n continue\n }\n if (topLevel.has(id)) {\n refuse(\n 'repeat-on-section',\n `\"${id}\" is the document wrapper or what it holds directly, and never repeats: put \"${AI_REPEAT_KEY}\" on the item that repeats inside the ${options.noun}.`,\n [id],\n )\n continue\n }\n const list = nodeOf(id)?.[AI_REPEAT_KEY]\n if (!Array.isArray(list)) {\n refuse(\n 'repeat-shape',\n `\"${AI_REPEAT_KEY}\" on \"${id}\" is not a list of copies: give it one list of values for each copy, such as ${EXAMPLE}.`,\n [id],\n )\n continue\n }\n // A copy of one value may be the value itself.\n const listed = list.map((copy: unknown) => (isScalar(copy) ? [copy] : copy))\n const malformed = listed.findIndex((copy) => !Array.isArray(copy) || !copy.every(isScalar))\n if (malformed !== -1) {\n refuse(\n 'repeat-shape',\n `The ${ordinal(malformed + 1)} copy of \"${id}\" is not a list of text values: give each copy one list, such as ${EXAMPLE}.`,\n [id],\n )\n continue\n }\n const copies = listed as Scalar[][]\n if (copies.length < 2 || copies.length > AI_REPEAT_MAX_COPIES) {\n refuse(\n 'repeat-count',\n `\"${AI_REPEAT_KEY}\" on \"${id}\" lists ${copies.length} ${copies.length === 1 ? 'copy' : 'copies'}: list from 2 to ${AI_REPEAT_MAX_COPIES}, and write an item that appears once without \"${AI_REPEAT_KEY}\".`,\n [id],\n )\n continue\n }\n const subtree = subtreeOf(id)\n const users = new Map<number, string[]>()\n for (const node of subtree) {\n for (const position of nodePositions(nodeOf(node) as RawNode)) {\n users.set(position, [...(users.get(position) ?? []), node])\n }\n }\n const used = [...users.keys()].sort((a, b) => a - b)\n const highest = used.length ? used[used.length - 1] : 0\n if (users.has(0)) {\n refuse(\n 'repeat-placeholder-without-value',\n `\"${(users.get(0) as string[])[0]}\" uses {{0}}, and a copy's values count from {{1}}: write {{1}} for each copy's first value.`,\n [id, ...(users.get(0) as string[])],\n )\n continue\n }\n const gap = used.findIndex((position, index) => position !== index + 1) + 1\n if (gap > 0) {\n refuse(\n 'repeat-value-without-placeholder',\n `\"${id}\" uses ${placeholders(used)} and no {{${gap}}}, so each copy's ${ordinal(gap)} value fills nothing: number the placeholders from {{1}} with no gap.`,\n [id],\n )\n continue\n }\n const short = copies.findIndex((copy) => copy.length < highest)\n if (short !== -1) {\n const unfilled = used.filter((position) => position > copies[short].length)\n refuse(\n 'repeat-placeholder-without-value',\n `The ${ordinal(short + 1)} copy of \"${id}\" gives ${copies[short].length} ${copies[short].length === 1 ? 'value' : 'values'}, and the item uses ${placeholders(used)}: give every copy one value for each placeholder, in order.`,\n [id, ...unfilled.flatMap((position) => users.get(position) ?? [])],\n )\n continue\n }\n const long = copies.findIndex((copy) => copy.length > highest)\n if (long !== -1) {\n refuse(\n 'repeat-value-without-placeholder',\n highest\n ? `The ${ordinal(long + 1)} copy of \"${id}\" gives ${copies[long].length} values, and the item uses only ${placeholders(used)}: give every copy one value for each placeholder, in order.`\n : `\"${id}\" lists values and uses no placeholder for them: write {{1}}, {{2}} and on where its copies differ, each copy's values in that order.`,\n [id],\n )\n continue\n }\n const collision = subtree\n .flatMap((node) => copies.slice(1).map((_values, index) => ({ node, copy: index + 2 })))\n .find(({ node, copy }) => taken.has(`${node}~${copy}`))\n if (collision) {\n const clash = `${collision.node}~${collision.copy}`\n refuse(\n 'repeat-id-collision',\n `The ${ordinal(collision.copy)} copy of \"${collision.node}\" takes the id \"${clash}\", which the answer already gives another node: rename \"${clash}\".`,\n [id, clash],\n )\n continue\n }\n for (const node of subtree) copies.slice(1).forEach((_values, index) => taken.add(`${node}~${index + 2}`))\n items.push({ id, parent: parentOf.get(id) as string, subtree, copies })\n }\n\n // A placeholder in no repeated item has no copy to take a value from.\n for (const id of order) {\n if (inItem.has(id)) continue\n const positions = nodePositions(nodeOf(id) as RawNode)\n if (!positions.size) continue\n refuse(\n 'repeat-placeholder-without-value',\n `\"${id}\" uses ${placeholders(positions)} and sits in no item with \"${AI_REPEAT_KEY}\": write its text out, or put \"${AI_REPEAT_KEY}\" on the item it repeats in.`,\n [id],\n )\n }\n\n if (violations.length) return { ok: false, violations }\n if (!items.length) return unchanged\n\n const drawn: Record<string, unknown> = { ...nodes }\n const sourceIds: Record<string, string> = {}\n for (const item of items) {\n const members = new Set(item.subtree)\n const idIn = (node: string, copy: number) => (copy === 1 || !members.has(node) ? node : `${node}~${copy}`)\n item.copies.forEach((values, index) => {\n const copy = index + 1\n for (const node of item.subtree) {\n const source = nodeOf(node) as RawNode\n const clone: RawNode = { ...source }\n delete clone[AI_REPEAT_KEY]\n if (source['props'] !== undefined) clone['props'] = fill(source['props'], values)\n if (source['sx'] !== undefined) clone['sx'] = fill(source['sx'], values)\n if (Array.isArray(source['nodes'])) {\n clone['nodes'] = source['nodes'].map((child: unknown) => (typeof child === 'string' ? idIn(child, copy) : child))\n }\n if (node !== item.id && typeof source['parentId'] === 'string') clone['parentId'] = idIn(source['parentId'], copy)\n const id = idIn(node, copy)\n drawn[id] = clone\n if (copy > 1) sourceIds[id] = node\n }\n })\n // Every copy in the item's place, in order: the parent as drawn so far,\n // which an item beside this one may already have drawn into.\n const parent = drawn[item.parent] as RawNode\n const siblings = Array.isArray(parent['nodes']) ? [...parent['nodes']] : []\n siblings.splice(siblings.indexOf(item.id), 1, ...item.copies.map((_values, index) => idIn(item.id, index + 1)))\n drawn[item.parent] = { ...parent, nodes: siblings }\n }\n return { ok: true, tree: { ...input, nodes: drawn }, sourceIds, items: items.length }\n}\n"],"names":["AI_TYPED_LIST_MIN_ITEMS","AI_REPEAT_KEY","AI_REPEAT_MAX_COPIES","PLACEHOLDER","WHOLE_PLACEHOLDER","EXAMPLE","isRecord","value","Array","isArray","isScalar","Number","isFinite","childIds","node","children","filter","id","positionsIn","into","match","matchAll","add","inner","Object","values","nodePositions","Set","fill","whole","exec","replace","_token","position","String","map","fromEntries","entries","key","ordinal","word","tens","suffix","placeholders","positions","list","sort","a","b","length","join","slice","expandAiRepeatedItems","input","options","unchanged","ok","tree","sourceIds","items","rootId","nodes","nodeOf","undefined","parentOf","Map","order","queue","index","push","child","has","set","marked","prototype","hasOwnProperty","call","inline","violations","rule","code","message","detail","nodeIds","subtreeOf","seen","stack","out","next","pop","reverse","ancestorsOf","parent","get","refuse","noun","inItem","flatMap","topLevel","taken","keys","outer","find","ancestor","includes","listed","copy","malformed","findIndex","every","copies","subtree","users","used","highest","gap","short","unfilled","long","collision","_values","clash","forEach","size","drawn","item","members","idIn","source","clone","siblings","splice","indexOf"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,uBAAuB,QAAkC,8BAA0B;AAE5F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CC,GAED,mEAAmE,GACnE,OAAO,MAAMC,gBAAgB,SAAQ;AAErC;;;CAGC,GACD,OAAO,MAAMC,uBAAuBF,0BAA0B,EAAC;AAE/D,oDAAoD,GACpD,MAAMG,cAAc;AAEpB,uFAAuF,GACvF,MAAMC,oBAAoB;AAE1B,2EAA2E,GAC3E,MAA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