@aglyn/aglyn 1.0.0-beta.217 → 1.0.0-beta.219
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/package.json +14 -14
- package/src/lib/app-utils/actions.d.ts +25 -374
- package/src/lib/app-utils/actions.js +101 -561
- package/src/lib/app-utils/actions.js.map +1 -1
- package/src/lib/app-utils/activity-presenter.d.ts +3 -3
- package/src/lib/app-utils/activity-presenter.js +36 -52
- package/src/lib/app-utils/activity-presenter.js.map +1 -1
- package/src/lib/app-utils/admin-audit-index.js +2 -2
- package/src/lib/app-utils/admin-audit-index.js.map +1 -1
- package/src/lib/app-utils/analytics-events.d.ts +11 -2
- package/src/lib/app-utils/analytics-events.js +11 -2
- package/src/lib/app-utils/analytics-events.js.map +1 -1
- package/src/lib/app-utils/analytics-provider.d.ts +182 -0
- package/src/lib/app-utils/analytics-provider.js +133 -0
- package/src/lib/app-utils/analytics-provider.js.map +1 -0
- package/src/lib/app-utils/api-plugins.d.ts +46 -0
- package/src/lib/app-utils/api-plugins.js +19 -0
- package/src/lib/app-utils/api-plugins.js.map +1 -1
- package/src/lib/app-utils/{marketplace-overrides.d.ts → artifact-overrides.d.ts} +9 -6
- package/src/lib/app-utils/{marketplace-overrides.js → artifact-overrides.js} +10 -7
- package/src/lib/app-utils/artifact-overrides.js.map +1 -0
- package/src/lib/app-utils/{marketplace-provenance.d.ts → artifact-provenance.d.ts} +12 -10
- package/src/lib/app-utils/{marketplace-provenance.js → artifact-provenance.js} +9 -7
- package/src/lib/app-utils/artifact-provenance.js.map +1 -0
- package/src/lib/app-utils/assist-credits.js +2 -1
- package/src/lib/app-utils/assist-credits.js.map +1 -1
- package/src/lib/app-utils/binding-token-catalog.d.ts +5 -13
- package/src/lib/app-utils/binding-token-catalog.js +17 -41
- package/src/lib/app-utils/binding-token-catalog.js.map +1 -1
- package/src/lib/app-utils/binding-tokens.js +1 -1
- package/src/lib/app-utils/binding-tokens.js.map +1 -1
- package/src/lib/app-utils/brand-support-line.d.ts +36 -0
- package/src/lib/app-utils/brand-support-line.js +38 -0
- package/src/lib/app-utils/brand-support-line.js.map +1 -0
- package/src/lib/app-utils/campaign-touch.d.ts +5 -5
- package/src/lib/app-utils/campaign-touch.js +8 -8
- package/src/lib/app-utils/campaign-touch.js.map +1 -1
- package/src/lib/app-utils/collection-entries.d.ts +2 -2
- package/src/lib/app-utils/collection-entries.js.map +1 -1
- package/src/lib/app-utils/consent-group-change.d.ts +4 -0
- package/src/lib/app-utils/consent-group-change.js.map +1 -1
- package/src/lib/app-utils/console-record-links.d.ts +10 -89
- package/src/lib/app-utils/console-record-links.js +3 -107
- package/src/lib/app-utils/console-record-links.js.map +1 -1
- package/src/lib/app-utils/console-routes.d.ts +16 -7
- package/src/lib/app-utils/console-routes.js +9 -3
- package/src/lib/app-utils/console-routes.js.map +1 -1
- package/src/lib/app-utils/contacts.d.ts +23 -1
- package/src/lib/app-utils/contacts.js +21 -5
- package/src/lib/app-utils/contacts.js.map +1 -1
- package/src/lib/app-utils/cross-pool-desync.d.ts +39 -0
- package/src/lib/app-utils/cross-pool-desync.js +47 -0
- package/src/lib/app-utils/cross-pool-desync.js.map +1 -0
- package/src/lib/app-utils/csv-upload.d.ts +29 -0
- package/src/lib/app-utils/csv-upload.js +29 -0
- package/src/lib/app-utils/csv-upload.js.map +1 -0
- package/src/lib/app-utils/dataset-models.d.ts +5 -5
- package/src/lib/app-utils/dataset-models.js +19 -2
- package/src/lib/app-utils/dataset-models.js.map +1 -1
- package/src/lib/app-utils/datasets.d.ts +65 -11
- package/src/lib/app-utils/datasets.js +74 -11
- package/src/lib/app-utils/datasets.js.map +1 -1
- package/src/lib/app-utils/docs-deflection.d.ts +6 -6
- package/src/lib/app-utils/docs-deflection.js.map +1 -1
- package/src/lib/app-utils/docs-help.generated.d.ts +12 -6
- package/src/lib/app-utils/docs-help.generated.js +21 -6
- package/src/lib/app-utils/docs-help.generated.js.map +1 -1
- package/src/lib/app-utils/docs-index.generated.d.ts +2 -2
- package/src/lib/app-utils/docs-index.generated.js +514 -318
- package/src/lib/app-utils/docs-index.generated.js.map +1 -1
- package/src/lib/app-utils/docs-retrieval.d.ts +3 -3
- package/src/lib/app-utils/docs-retrieval.js +14 -10
- package/src/lib/app-utils/docs-retrieval.js.map +1 -1
- package/src/lib/app-utils/duplicate-resource.d.ts +4 -1
- package/src/lib/app-utils/duplicate-resource.js +7 -4
- package/src/lib/app-utils/duplicate-resource.js.map +1 -1
- package/src/lib/app-utils/dynamic-list-rule.d.ts +1 -1
- package/src/lib/app-utils/dynamic-list-rule.js.map +1 -1
- package/src/lib/app-utils/element-ui.d.ts +1 -1
- package/src/lib/app-utils/element-ui.js +1 -1
- package/src/lib/app-utils/element-ui.js.map +1 -1
- package/src/lib/app-utils/email-starter-policy.js +3 -3
- package/src/lib/app-utils/email-starter-policy.js.map +1 -1
- package/src/lib/app-utils/entity-picker-context.d.ts +10 -5
- package/src/lib/app-utils/entity-picker-context.js.map +1 -1
- package/src/lib/app-utils/error-beacon.d.ts +75 -6
- package/src/lib/app-utils/error-beacon.js +160 -21
- package/src/lib/app-utils/error-beacon.js.map +1 -1
- package/src/lib/app-utils/expand-repeatables.d.ts +10 -10
- package/src/lib/app-utils/expand-repeatables.js +10 -10
- package/src/lib/app-utils/expand-repeatables.js.map +1 -1
- package/src/lib/app-utils/host-events.d.ts +82 -0
- package/src/lib/app-utils/host-events.js +62 -0
- package/src/lib/app-utils/host-events.js.map +1 -0
- package/src/lib/app-utils/lockdown.d.ts +33 -1
- package/src/lib/app-utils/lockdown.js +45 -4
- package/src/lib/app-utils/lockdown.js.map +1 -1
- package/src/lib/app-utils/margin-utilization.d.ts +4 -69
- package/src/lib/app-utils/margin-utilization.js +82 -69
- package/src/lib/app-utils/margin-utilization.js.map +1 -1
- package/src/lib/app-utils/node-definition-sanitizer.d.ts +16 -16
- package/src/lib/app-utils/node-definition-sanitizer.js +24 -20
- package/src/lib/app-utils/node-definition-sanitizer.js.map +1 -1
- package/src/lib/app-utils/node-interactions.d.ts +7 -7
- package/src/lib/app-utils/node-interactions.js.map +1 -1
- package/src/lib/app-utils/notifications.d.ts +78 -47
- package/src/lib/app-utils/notifications.js +63 -44
- package/src/lib/app-utils/notifications.js.map +1 -1
- package/src/lib/app-utils/payments-configured.d.ts +8 -21
- package/src/lib/app-utils/payments-configured.js +8 -23
- package/src/lib/app-utils/payments-configured.js.map +1 -1
- package/src/lib/app-utils/plan-entitlements.d.ts +43 -128
- package/src/lib/app-utils/plan-entitlements.js +145 -304
- package/src/lib/app-utils/plan-entitlements.js.map +1 -1
- package/src/lib/app-utils/platform-brand.d.ts +10 -0
- package/src/lib/app-utils/platform-brand.js +14 -3
- package/src/lib/app-utils/platform-brand.js.map +1 -1
- package/src/lib/app-utils/plugin-api-rate-limit.d.ts +7 -1
- package/src/lib/app-utils/plugin-api-rate-limit.js +11 -3
- package/src/lib/app-utils/plugin-api-rate-limit.js.map +1 -1
- package/src/lib/app-utils/plugin-bundle-checks.js +2 -2
- package/src/lib/app-utils/plugin-bundle-checks.js.map +1 -1
- package/src/lib/app-utils/plugin-host-events.generated.d.ts +12 -0
- package/src/lib/app-utils/plugin-host-events.generated.js +169 -0
- package/src/lib/app-utils/plugin-host-events.generated.js.map +1 -0
- package/src/lib/app-utils/plugin-release-flags.generated.d.ts +12 -0
- package/src/lib/app-utils/plugin-release-flags.generated.js +106 -0
- package/src/lib/app-utils/plugin-release-flags.generated.js.map +1 -0
- package/src/lib/app-utils/realm-host-surface.generated.js +2 -0
- package/src/lib/app-utils/realm-host-surface.generated.js.map +1 -1
- package/src/lib/app-utils/release-flags.d.ts +14 -5
- package/src/lib/app-utils/release-flags.js +21 -125
- package/src/lib/app-utils/release-flags.js.map +1 -1
- package/src/lib/app-utils/repeat-sources.d.ts +9 -0
- package/src/lib/app-utils/repeat-sources.js.map +1 -1
- package/src/lib/app-utils/retained-refusals.d.ts +73 -0
- package/src/lib/app-utils/retained-refusals.js +186 -0
- package/src/lib/app-utils/retained-refusals.js.map +1 -0
- package/src/lib/app-utils/scope-tokens.d.ts +27 -0
- package/src/lib/app-utils/scope-tokens.js +61 -0
- package/src/lib/app-utils/scope-tokens.js.map +1 -1
- package/src/lib/app-utils/screen-link-context.js +3 -3
- package/src/lib/app-utils/screen-link-context.js.map +1 -1
- package/src/lib/app-utils/screen-route.d.ts +15 -0
- package/src/lib/app-utils/screen-route.js +21 -1
- package/src/lib/app-utils/screen-route.js.map +1 -1
- package/src/lib/app-utils/seo-audit.d.ts +132 -0
- package/src/lib/app-utils/seo-audit.js +246 -0
- package/src/lib/app-utils/seo-audit.js.map +1 -0
- package/src/lib/app-utils/seo-keywords.d.ts +48 -0
- package/src/lib/app-utils/seo-keywords.js +60 -0
- package/src/lib/app-utils/seo-keywords.js.map +1 -0
- package/src/lib/app-utils/seo-page-facts.d.ts +66 -0
- package/src/lib/app-utils/seo-page-facts.js +155 -0
- package/src/lib/app-utils/seo-page-facts.js.map +1 -0
- package/src/lib/app-utils/seo-site-scan.d.ts +126 -0
- package/src/lib/app-utils/seo-site-scan.js +162 -0
- package/src/lib/app-utils/seo-site-scan.js.map +1 -0
- package/src/lib/app-utils/seo-title-variables.js +1 -1
- package/src/lib/app-utils/seo-title-variables.js.map +1 -1
- package/src/lib/app-utils/server.d.ts +6 -9
- package/src/lib/app-utils/server.js +17 -27
- package/src/lib/app-utils/server.js.map +1 -1
- package/src/lib/app-utils/site-interactions.d.ts +501 -0
- package/src/lib/app-utils/site-interactions.js +554 -0
- package/src/lib/app-utils/site-interactions.js.map +1 -0
- package/src/lib/app-utils/{marketplace-theme.d.ts → site-theme.d.ts} +13 -2
- package/src/lib/app-utils/{marketplace-theme.js → site-theme.js} +5 -2
- package/src/lib/app-utils/site-theme.js.map +1 -0
- package/src/lib/app-utils/sitemap.d.ts +4 -3
- package/src/lib/app-utils/sitemap.js +9 -7
- package/src/lib/app-utils/sitemap.js.map +1 -1
- package/src/lib/app-utils/stale-build-error.d.ts +51 -0
- package/src/lib/app-utils/stale-build-error.js +100 -1
- package/src/lib/app-utils/stale-build-error.js.map +1 -1
- package/src/lib/app-utils/starter-templates.d.ts +20 -0
- package/src/lib/app-utils/starter-templates.js +49 -0
- package/src/lib/app-utils/starter-templates.js.map +1 -1
- package/src/lib/app-utils/tax-jurisdiction-figures.d.ts +118 -0
- package/src/lib/app-utils/tax-jurisdiction-figures.js +123 -0
- package/src/lib/app-utils/tax-jurisdiction-figures.js.map +1 -0
- package/src/lib/app-utils/theme-library.d.ts +10 -3
- package/src/lib/app-utils/theme-library.js +13 -4
- package/src/lib/app-utils/theme-library.js.map +1 -1
- package/src/lib/app-utils/{campaign-attribution.d.ts → utm-attribution.d.ts} +11 -6
- package/src/lib/app-utils/{campaign-attribution.js → utm-attribution.js} +13 -8
- package/src/lib/app-utils/utm-attribution.js.map +1 -0
- package/src/lib/app-utils/{campaign-forwarding.d.ts → utm-forwarding.d.ts} +14 -14
- package/src/lib/app-utils/{campaign-forwarding.js → utm-forwarding.js} +26 -26
- package/src/lib/app-utils/utm-forwarding.js.map +1 -0
- package/src/lib/app-utils/video-object.js +6 -5
- package/src/lib/app-utils/video-object.js.map +1 -1
- package/src/lib/app-utils/visitor-consent.d.ts +41 -164
- package/src/lib/app-utils/visitor-consent.js +66 -277
- package/src/lib/app-utils/visitor-consent.js.map +1 -1
- package/src/lib/app-utils/web-vitals-rum.d.ts +7 -7
- package/src/lib/app-utils/web-vitals-rum.js +31 -63
- package/src/lib/app-utils/web-vitals-rum.js.map +1 -1
- package/src/lib/app-utils/where-used.d.ts +11 -6
- package/src/lib/app-utils/where-used.js +3 -8
- package/src/lib/app-utils/where-used.js.map +1 -1
- package/src/lib/canvas-manager/canvas-manager.js +3 -3
- package/src/lib/canvas-manager/canvas-manager.js.map +1 -1
- package/src/lib/foundation/definitions/components.types.d.ts +1 -1
- package/src/lib/foundation/definitions/components.types.js +1 -1
- package/src/lib/foundation/definitions/components.types.js.map +1 -1
- package/src/lib/foundation/definitions/org-billing.types.d.ts +18 -135
- package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
- package/src/lib/foundation/definitions/organization.types.d.ts +6 -3
- package/src/lib/foundation/definitions/organization.types.js.map +1 -1
- package/src/lib/foundation/definitions/platform.types.d.ts +27 -5
- package/src/lib/foundation/definitions/platform.types.js.map +1 -1
- package/src/lib/foundation/definitions/write-deny-coverage.util.d.ts +16 -0
- package/src/lib/foundation/definitions/write-deny-coverage.util.js +20 -0
- package/src/lib/foundation/definitions/write-deny-coverage.util.js.map +1 -1
- package/src/lib/foundation/index.d.ts +1 -1
- package/src/lib/foundation/index.js.map +1 -1
- package/src/lib/plugin-manager/besigner-documents.d.ts +96 -0
- package/src/lib/plugin-manager/besigner-documents.js +61 -0
- package/src/lib/plugin-manager/besigner-documents.js.map +1 -0
- package/src/lib/plugin-manager/computed-variables.d.ts +71 -0
- package/src/lib/plugin-manager/computed-variables.js +74 -0
- package/src/lib/plugin-manager/computed-variables.js.map +1 -0
- package/src/lib/plugin-manager/custom-fields.d.ts +29 -2
- package/src/lib/plugin-manager/custom-fields.js +47 -1
- package/src/lib/plugin-manager/custom-fields.js.map +1 -1
- package/src/lib/plugin-manager/feature-plugins.d.ts +292 -20
- package/src/lib/plugin-manager/feature-plugins.js +105 -17
- package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
- package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +123 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.js +785 -14
- package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
- package/src/lib/plugin-manager/plugin-activity-actions.d.ts +12 -0
- package/src/lib/plugin-manager/plugin-activity-actions.js +25 -0
- package/src/lib/plugin-manager/plugin-activity-actions.js.map +1 -1
- package/src/lib/plugin-manager/plugin-contributions.d.ts +1 -1
- package/src/lib/plugin-manager/plugin-contributions.js.map +1 -1
- package/src/lib/plugin-manager/plugin-declarations-repair.d.ts +36 -0
- package/src/lib/plugin-manager/plugin-declarations-repair.js +64 -0
- package/src/lib/plugin-manager/plugin-declarations-repair.js.map +1 -0
- package/src/lib/plugin-manager/plugin-dependents.d.ts +101 -0
- package/src/lib/plugin-manager/plugin-dependents.js +75 -0
- package/src/lib/plugin-manager/plugin-dependents.js.map +1 -0
- package/src/lib/plugin-manager/plugin-distribution.d.ts +55 -0
- package/src/lib/plugin-manager/plugin-distribution.js +45 -0
- package/src/lib/plugin-manager/plugin-distribution.js.map +1 -0
- package/src/lib/plugin-manager/plugin-host-collections.d.ts +17 -0
- package/src/lib/plugin-manager/plugin-host-collections.js +6 -0
- package/src/lib/plugin-manager/plugin-host-collections.js.map +1 -1
- package/src/lib/plugin-manager/plugin-host-resources.d.ts +133 -0
- package/src/lib/plugin-manager/plugin-host-resources.js +52 -0
- package/src/lib/plugin-manager/plugin-host-resources.js.map +1 -0
- package/src/lib/plugin-manager/plugin-org-erasure.d.ts +28 -2
- package/src/lib/plugin-manager/plugin-org-erasure.js +61 -2
- package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -1
- package/src/lib/plugin-manager/plugin-plan-entitlements.d.ts +123 -0
- package/src/lib/plugin-manager/plugin-plan-entitlements.js +101 -0
- package/src/lib/plugin-manager/plugin-plan-entitlements.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-index.d.ts +95 -0
- package/src/lib/plugin-manager/plugin-record-index.js +51 -0
- package/src/lib/plugin-manager/plugin-record-index.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-written.d.ts +58 -0
- package/src/lib/plugin-manager/plugin-record-written.js +42 -0
- package/src/lib/plugin-manager/plugin-record-written.js.map +1 -0
- package/src/lib/plugin-manager/plugin-revenue-sources.d.ts +213 -0
- package/src/lib/plugin-manager/plugin-revenue-sources.js +194 -0
- package/src/lib/plugin-manager/plugin-revenue-sources.js.map +1 -0
- package/src/lib/plugin-manager/plugin-site-bundle.d.ts +145 -0
- package/src/lib/plugin-manager/plugin-site-bundle.js +78 -0
- package/src/lib/plugin-manager/plugin-site-bundle.js.map +1 -0
- package/src/lib/plugin-manager/plugin-site-cache.d.ts +12 -0
- package/src/lib/plugin-manager/plugin-site-cache.js.map +1 -1
- package/src/lib/plugin-manager/plugin-site-export.d.ts +81 -0
- package/src/lib/plugin-manager/plugin-site-export.js +40 -0
- package/src/lib/plugin-manager/plugin-site-export.js.map +1 -0
- package/src/lib/plugin-manager/plugin-sitemap-sections.d.ts +88 -0
- package/src/lib/plugin-manager/plugin-sitemap-sections.js +29 -0
- package/src/lib/plugin-manager/plugin-sitemap-sections.js.map +1 -0
- package/src/lib/plugin-manager/plugin-tax-profile.d.ts +20 -4
- package/src/lib/plugin-manager/plugin-tax-profile.js.map +1 -1
- package/src/lib/plugin-manager/plugin-tax-return-sources.d.ts +255 -0
- package/src/lib/plugin-manager/plugin-tax-return-sources.js +191 -0
- package/src/lib/plugin-manager/plugin-tax-return-sources.js.map +1 -0
- package/src/lib/plugin-manager/plugin-template-sources.d.ts +75 -0
- package/src/lib/plugin-manager/plugin-template-sources.js +37 -0
- package/src/lib/plugin-manager/plugin-template-sources.js.map +1 -0
- package/src/lib/plugin-manager/plugin-usage-axes.d.ts +107 -0
- package/src/lib/plugin-manager/plugin-usage-axes.js +107 -0
- package/src/lib/plugin-manager/plugin-usage-axes.js.map +1 -0
- package/src/lib/plugin-manager/plugin-zones.d.ts +4 -5
- package/src/lib/plugin-manager/plugin-zones.js.map +1 -1
- package/src/lib/plugin-manager/realm-host-aglyn.generated.js +2 -0
- package/src/lib/plugin-manager/realm-host-aglyn.generated.js.map +1 -1
- package/src/lib/plugin-manager/record-captured-contact.d.ts +1 -14
- package/src/lib/plugin-manager/record-captured-contact.js +10 -32
- package/src/lib/plugin-manager/record-captured-contact.js.map +1 -1
- package/src/lib/plugin-manager/repeat-rows.d.ts +124 -0
- package/src/lib/plugin-manager/repeat-rows.js +108 -0
- package/src/lib/plugin-manager/repeat-rows.js.map +1 -0
- package/src/lib/plugin-manager/submission-record-target.d.ts +144 -0
- package/src/lib/plugin-manager/submission-record-target.js +125 -0
- package/src/lib/plugin-manager/submission-record-target.js.map +1 -0
- package/src/lib/plugin-manager/video-embed-provider.d.ts +108 -0
- package/src/lib/plugin-manager/video-embed-provider.js +165 -0
- package/src/lib/plugin-manager/video-embed-provider.js.map +1 -0
- package/src/lib/types/nodes.d.ts +2 -2
- package/src/lib/types/nodes.js.map +1 -1
- package/src/lib/app-utils/campaign-attribution.js.map +0 -1
- package/src/lib/app-utils/campaign-forwarding.js.map +0 -1
- package/src/lib/app-utils/contact-holder.d.ts +0 -68
- package/src/lib/app-utils/contact-holder.js +0 -129
- package/src/lib/app-utils/contact-holder.js.map +0 -1
- package/src/lib/app-utils/contact-merge.d.ts +0 -136
- package/src/lib/app-utils/contact-merge.js +0 -412
- package/src/lib/app-utils/contact-merge.js.map +0 -1
- package/src/lib/app-utils/crm-csv.d.ts +0 -239
- package/src/lib/app-utils/crm-csv.js +0 -467
- package/src/lib/app-utils/crm-csv.js.map +0 -1
- package/src/lib/app-utils/crm-digest.d.ts +0 -185
- package/src/lib/app-utils/crm-digest.js +0 -272
- package/src/lib/app-utils/crm-digest.js.map +0 -1
- package/src/lib/app-utils/form-dataset-binding.d.ts +0 -50
- package/src/lib/app-utils/form-dataset-binding.js +0 -74
- package/src/lib/app-utils/form-dataset-binding.js.map +0 -1
- package/src/lib/app-utils/list-import.d.ts +0 -158
- package/src/lib/app-utils/list-import.js +0 -332
- package/src/lib/app-utils/list-import.js.map +0 -1
- package/src/lib/app-utils/marketplace-listing-visibility.d.ts +0 -122
- package/src/lib/app-utils/marketplace-listing-visibility.js +0 -147
- package/src/lib/app-utils/marketplace-listing-visibility.js.map +0 -1
- package/src/lib/app-utils/marketplace-overrides.js.map +0 -1
- package/src/lib/app-utils/marketplace-provenance.js.map +0 -1
- package/src/lib/app-utils/marketplace-theme.js.map +0 -1
- package/src/lib/app-utils/marketplace-update-state.d.ts +0 -119
- package/src/lib/app-utils/marketplace-update-state.js +0 -132
- package/src/lib/app-utils/marketplace-update-state.js.map +0 -1
- package/src/lib/app-utils/publisher-agreement.d.ts +0 -289
- package/src/lib/app-utils/publisher-agreement.js +0 -321
- package/src/lib/app-utils/publisher-agreement.js.map +0 -1
- package/src/lib/app-utils/wistia-embed.d.ts +0 -104
- package/src/lib/app-utils/wistia-embed.js +0 -138
- package/src/lib/app-utils/wistia-embed.js.map +0 -1
- package/src/lib/app-utils/workflows.d.ts +0 -136
- package/src/lib/app-utils/workflows.js +0 -346
- package/src/lib/app-utils/workflows.js.map +0 -1
- package/src/lib/plugin-manager/commerce-zone-props.d.ts +0 -172
- package/src/lib/plugin-manager/commerce-zone-props.js +0 -31
- package/src/lib/plugin-manager/commerce-zone-props.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/first-party-plugins.generated.ts"],"sourcesContent":["/**\n * GENERATED FILE — do not edit. Regenerate with:\n * node tools/scripts/generate-plugin-manifests.mjs\n *\n * The switchboard catalog (AGL-3080): one row per plugin and capability, each\n * declared by its own `catalog` block in plugins.config.json. The core holds\n * the types and the resolvers in `enabled-plugins.ts`; it holds no row.\n */\n\nimport type { FirstPartyPlugin, PluginEditBarLink, PublishedSiteImpact } from './enabled-plugins'\nimport type { ResolvedPluginHostCollection, ResolvedPluginOrgCollection } from './plugin-host-collections'\nimport type { ResolvedPluginOrgCapacity } from './plugin-org-capacity'\nimport type { FunctionBindings } from './plugin-contributions'\n\nexport const FIRST_PARTY_PLUGINS: readonly FirstPartyPlugin[] = [\n {\n \"id\": \"mui\",\n \"label\": \"Components\",\n \"alwaysOn\": true,\n \"description\": \"The base component and theme library every site builds on.\"\n },\n {\n \"id\": \"forms\",\n \"label\": \"Forms\",\n \"alwaysOnForWorkspace\": true,\n \"description\": \"Forms on the site and the catalog that owns them.\",\n \"siteOff\": {\n \"stops\": \"Switching Forms off for this site stops forms rendering on its published pages, refuses every submission sent to it, and blocks publishing a form, or a page that carries one, until Forms is back on.\",\n \"keeps\": \"Submissions already received, the workspace’s form catalog and the CRM leads its forms created are kept, and forms keep working on the workspace’s other sites.\",\n \"confirm\": true,\n \"pages\": {\n \"heading\": \"These published pages carry a form. Their forms stop rendering and stop accepting submissions:\",\n \"none\": \"No published page on this site carries a form.\"\n }\n }\n },\n {\n \"id\": \"ai\",\n \"label\": \"AI\",\n \"alwaysOnForWorkspace\": true,\n \"description\": \"The assistant, generative building and automation, and the AI add-on.\",\n \"siteOff\": {\n \"stops\": \"Switching AI off for this site hides the assistant, Describe it, the AI cards and the editor’s AI controls on this site, refuses every AI request made for it, and stops its queued AI jobs without spending credits.\",\n \"keeps\": \"It does not stop the workspace’s AI add-on, credits, allotments or overage billing, and AI keeps working on the workspace’s other sites.\"\n }\n },\n {\n \"id\": \"theme-presets\",\n \"label\": \"Themes\",\n \"alwaysOnForWorkspace\": true,\n \"description\": \"Built-in themes to pick from on Setup → Theme: Bootstrap, Minimal and Material 3.\",\n \"siteOff\": {\n \"stops\": \"Switching Themes off for this site removes its built-in themes from the theme picker.\",\n \"keeps\": \"A site already using one keeps it, with every edit made to it: picking a theme copies it onto the site, so nothing on the published site changes.\"\n }\n },\n {\n \"id\": \"accounts\",\n \"label\": \"User Accounts\",\n \"description\": \"Visitor accounts on the site: the /signin, /signup and /recover pages, and the Members blocks. On for a new site; a site created before that stays off until you turn it on.\",\n \"releaseFlag\": \"release_member_accounts\",\n \"defaultOffPerSite\": true,\n \"requires\": [\n \"commerce\"\n ]\n },\n {\n \"id\": \"bookings\",\n \"label\": \"Bookings\",\n \"description\": \"Services, open slots, and paid bookings.\",\n \"releaseFlag\": \"release_bookings\"\n },\n {\n \"id\": \"commerce\",\n \"label\": \"Commerce\",\n \"description\": \"Products, carts, checkout, orders, POS.\",\n \"releaseFlag\": \"release_commerce_v2\"\n },\n {\n \"id\": \"marketplace\",\n \"label\": \"Marketplace\",\n \"description\": \"Marketplace listings, templates, and installs.\",\n \"releaseFlag\": \"release_marketplace\"\n },\n {\n \"id\": \"crm\",\n \"label\": \"CRM\",\n \"description\": \"Leads, contacts, companies, deals, tasks and reports.\",\n \"releaseFlag\": \"release_crm\"\n },\n {\n \"id\": \"outreach\",\n \"label\": \"Sequences\",\n \"description\": \"One-to-one email sequences sent from connected mailboxes.\",\n \"releaseFlag\": \"release_outreach\"\n },\n {\n \"id\": \"data\",\n \"label\": \"Data\",\n \"description\": \"Datasets, records, and CSV import/export.\",\n \"releaseFlag\": \"release_data_store\"\n },\n {\n \"id\": \"email\",\n \"label\": \"Email\",\n \"description\": \"Designed emails and campaign sending.\",\n \"releaseFlag\": \"release_email\"\n },\n {\n \"id\": \"events-calendar\",\n \"label\": \"Events Calendar\",\n \"description\": \"Event lists and calendars.\",\n \"releaseFlag\": \"release_events\"\n },\n {\n \"id\": \"inbox\",\n \"label\": \"Inbox\",\n \"description\": \"Form submissions and lead inbox.\",\n \"releaseFlag\": \"release_inbox\"\n },\n {\n \"id\": \"logic\",\n \"label\": \"Logic\",\n \"description\": \"Variables, functions, and reference health.\",\n \"releaseFlag\": \"release_logic\"\n },\n {\n \"id\": \"marketing\",\n \"label\": \"Marketing\",\n \"description\": \"Overlays, campaigns, and experiments.\",\n \"releaseFlag\": \"release_marketing\"\n },\n {\n \"id\": \"redirects\",\n \"label\": \"Redirects\",\n \"description\": \"URL redirect rules.\",\n \"releaseFlag\": \"release_redirects\"\n },\n {\n \"id\": \"workflows\",\n \"label\": \"Automation\",\n \"description\": \"Workflows, actions, webhooks, and run logs.\",\n \"releaseFlag\": \"release_workflows\"\n },\n]\n\nexport const PUBLISHED_SITE_IMPACT: Readonly<Record<string, PublishedSiteImpact>> = {\n \"mui\": \"elements\",\n \"forms\": \"elements\",\n \"ai\": \"console-only\",\n \"theme-presets\": \"console-only\",\n \"accounts\": \"routes\",\n \"bookings\": \"elements\",\n \"commerce\": \"elements\",\n \"marketplace\": \"console-only\",\n \"crm\": \"console-only\",\n \"outreach\": \"console-only\",\n \"data\": \"console-only\",\n \"email\": \"elements\",\n \"events-calendar\": \"elements\",\n \"inbox\": \"console-only\",\n \"logic\": \"console-only\",\n \"marketing\": \"elements\",\n \"redirects\": \"routes\",\n \"workflows\": \"routes\",\n}\n\n/**\n * The admin edit bar's quick links, in the order they are drawn — each\n * declared by the plugin whose console page it opens (AGL-3080).\n */\nexport const PLUGIN_EDIT_BAR_LINKS: readonly PluginEditBarLink[] = [\n {\n \"pluginId\": \"inbox\",\n \"order\": 20,\n \"label\": \"Inbox\",\n \"path\": \"/inbox\"\n },\n {\n \"pluginId\": \"commerce\",\n \"order\": 30,\n \"label\": \"Orders\",\n \"path\": \"/products/orders\"\n },\n]\n\n/**\n * Every host subcollection a first-party plugin owns, declared by that plugin\n * (AGL-3080). Core's readers ask this list; core names no collection.\n */\nexport const PLUGIN_HOST_COLLECTIONS_DECLARED: readonly ResolvedPluginHostCollection[] = [\n {\n \"pluginId\": \"forms\",\n \"name\": \"forms\",\n \"routeSlug\": \"forms\"\n },\n {\n \"pluginId\": \"bookings\",\n \"name\": \"services\",\n \"routeSlug\": \"bookings\"\n },\n {\n \"pluginId\": \"bookings\",\n \"name\": \"bookings\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Booking records — a customer, a time and a service pointer. The service holds the imagery and IS scanned; a booking is the transaction against it.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"products\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"productCategories\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"suppliers\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"locations\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"coupons\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"discounts\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"reviews\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"memberPosts\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"resources\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"settings\",\n \"label\": \"Store settings\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"siteMembers\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"siteMemberCredentials\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"A site member's password hash, one document per member, read and written only by the membership routes (AGL-3308). A credential with no content field, and no client may read it.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"orders\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Completed orders. Line items COPY a product's `imageUrl` at purchase time, so these would match — and matching would be the wrong answer: an order is an immutable record of what was sold, deleting the asset changes nothing about it, and no author can edit one. A busy store also holds more of these than the whole read budget.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"carts\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Live and abandoned carts, with the same copied line-item image and the same reasoning, at higher volume — one document per shopper session.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"checkouts\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"In-flight checkout sessions. Transient buyer state carrying the same line-item snapshot as `carts`.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"reservations\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"POS and booking holds. Short-lived transaction rows pointing at a resource that is itself scanned.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"stockHolds\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Inventory holds taken during checkout. Machine-written, short-lived, and a quantity rather than content.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"subscriptions\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Site membership subscriptions: a plan pointer, a status and Stripe ids. Server-written from the billing webhook.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"registers\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"POS register allocations — a count against the register add-on, read by billing (AGL-1775). No content field at all.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"giftCards\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Gift card balances and redemption history. Money, not content.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"licenseKeys\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Digital-product license keys issued at fulfilment: a code, an order pointer and a revocation flag.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"inventoryAdjustments\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"The append-only stock adjustment ledger (AGL-2269). One row per manual stock edit and per cancellation release, unbounded over a store's life.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"inventoryReconciliation\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Reconciliation runs comparing counted stock against recorded stock. Machine-written totals.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"restockAlerts\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Back-in-stock requests: an email address and a product pointer, written by visitors.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"stripeTaxRates\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Cached Stripe tax rate ids, written by the tax sync. Vendor ids.\"\n },\n {\n \"pluginId\": \"marketplace\",\n \"name\": \"installs\"\n },\n {\n \"pluginId\": \"crm\",\n \"name\": \"leads\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Captured leads, on the same footing as `formSubmissions`: visitor-submitted, unbounded, and never a place an author places an asset.\"\n },\n {\n \"pluginId\": \"email\",\n \"name\": \"suppressions\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Unsubscribes, bounces and spam complaints. Email addresses and a reason.\"\n },\n {\n \"pluginId\": \"events-calendar\",\n \"name\": \"events\",\n \"routeSlug\": \"events\"\n },\n {\n \"pluginId\": \"inbox\",\n \"name\": \"formSubmissions\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Visitor form submissions. Unbounded, PII-heavy, and a file attached to one is the visitor's upload — not a library asset an author picked, and not something deleting a library asset would break.\"\n },\n {\n \"pluginId\": \"logic\",\n \"name\": \"functions\",\n \"routeSlug\": \"logic\"\n },\n {\n \"pluginId\": \"logic\",\n \"name\": \"variables\",\n \"routeSlug\": \"logic\"\n },\n {\n \"pluginId\": \"marketing\",\n \"name\": \"experiments\",\n \"routeSlug\": \"marketing\"\n },\n {\n \"pluginId\": \"marketing\",\n \"name\": \"overlays\",\n \"routeSlug\": \"marketing\"\n },\n {\n \"pluginId\": \"marketing\",\n \"name\": \"campaignAttributions\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"One row per conversion — a form submission, a lead, a contact or a booking — recording which campaign the visitor arrived from. Written only by the Admin SDK, and the whole record is three sanitized UTM strings capped at a hundred characters: there is no field an asset could occupy and no surface that could pick one into it. Unbounded on the same footing as the conversions it credits.\"\n },\n {\n \"pluginId\": \"redirects\",\n \"name\": \"redirects\",\n \"routeSlug\": \"redirects\"\n },\n {\n \"pluginId\": \"workflows\",\n \"name\": \"workflows\",\n \"routeSlug\": \"automation\"\n },\n {\n \"pluginId\": \"workflows\",\n \"name\": \"webhooks\",\n \"routeSlug\": \"automation\"\n },\n {\n \"pluginId\": \"workflows\",\n \"name\": \"actions\",\n \"routeSlug\": \"automation\"\n },\n]\n\n/**\n * Every org collection a first-party plugin owns whose documents the media\n * scan reads, declared by that plugin (AGL-3273).\n */\nexport const PLUGIN_ORG_COLLECTIONS_DECLARED: readonly ResolvedPluginOrgCollection[] = [\n {\n \"pluginId\": \"marketing\",\n \"name\": \"campaigns\",\n \"routeSlug\": \"marketing\",\n \"siteField\": \"hostId\",\n \"holdsTransferWhile\": {\n \"field\": \"status\",\n \"values\": [\n \"scheduled\",\n \"sending\"\n ]\n }\n },\n {\n \"pluginId\": \"marketing\",\n \"name\": \"emailCampaigns\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"The campaign CONTAINER — a name, a date window, the list ids it is aimed at, a topic and the sites it runs on. Distinct from `campaigns`, which holds the sends and IS scanned because a send carries the copy that went out. A container carries no copy and no asset reference: the design a send renders is a screen, and the screen is where the picker writes.\"\n },\n {\n \"pluginId\": \"workflows\",\n \"name\": \"automations\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"An org automation (AGL-3302) — a trigger, its conditions, the sites it is placed on, and a step list drawn from the server steps only: email subject and body as plain text, list, dataset and campaign ids, CRM fields and waits. No step it may hold carries a media reference, the in-page steps that could (custom HTML, popups) are refused by its save route, and it is written only by that route.\"\n },\n]\n\n/**\n * Every org capacity a first-party plugin backs, declared by that plugin\n * (AGL-3080). Core owns the money; this says what is counted and what it is\n * called.\n */\nexport const PLUGIN_ORG_CAPACITIES_DECLARED: readonly ResolvedPluginOrgCapacity[] = [\n {\n \"pluginId\": \"data\",\n \"kind\": \"datasets\",\n \"order\": 30,\n \"collection\": \"datasets\",\n \"addonKind\": \"datasets\",\n \"includedEntitlement\": \"datasetsPerOrg\",\n \"purchaseCeilingEntitlement\": \"maxDatasetsPerOrg\",\n \"nouns\": {\n \"one\": \"dataset\",\n \"many\": \"datasets\",\n \"addon\": \"extra datasets\"\n }\n },\n]\n\n/**\n * Every first-party element that runs a site function, and the prop naming\n * it, declared by that element's plugin (AGL-3393). Core names no element.\n */\nexport const FIRST_PARTY_FUNCTION_BINDINGS: FunctionBindings = {\n \"functionScope\": \"functionName\",\n \"functionWidget\": \"functionName\",\n}\n"],"names":["FIRST_PARTY_PLUGINS","PUBLISHED_SITE_IMPACT","PLUGIN_EDIT_BAR_LINKS","PLUGIN_HOST_COLLECTIONS_DECLARED","PLUGIN_ORG_COLLECTIONS_DECLARED","PLUGIN_ORG_CAPACITIES_DECLARED","FIRST_PARTY_FUNCTION_BINDINGS"],"mappings":"AAAA;;;;;;;CAOC,GAOD,OAAO,MAAMA,sBAAmD;IAC9D;QACE,MAAM;QACN,SAAS;QACT,YAAY;QACZ,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,wBAAwB;QACxB,eAAe;QACf,WAAW;YACT,SAAS;YACT,SAAS;YACT,WAAW;YACX,SAAS;gBACP,WAAW;gBACX,QAAQ;YACV;QACF;IACF;IACA;QACE,MAAM;QACN,SAAS;QACT,wBAAwB;QACxB,eAAe;QACf,WAAW;YACT,SAAS;YACT,SAAS;QACX;IACF;IACA;QACE,MAAM;QACN,SAAS;QACT,wBAAwB;QACxB,eAAe;QACf,WAAW;YACT,SAAS;YACT,SAAS;QACX;IACF;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;QACf,qBAAqB;QACrB,YAAY;YACV;SACD;IACH;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;CACD,CAAA;AAED,OAAO,MAAMC,wBAAuE;I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f;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;IACf;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;IACf;CACD,CAAA;AAED;;;CAGC,GACD,OAAO,MAAMC,kCAA0E;IACrF;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,aAAa;QACb,sBAAsB;YACpB,SAAS;YACT,UAAU;gBACR;gBACA;aACD;QACH;IACF;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,mBAAmB;IACrB;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,mBAAmB;IACrB;CACD,CAAA;AAED;;;;CAIC,GACD,OAAO,MAAMC,iCAAuE;IAClF;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,cAAc;QACd,aAAa;QACb,uBAAuB;QACvB,8BAA8B;QAC9B,SAAS;YACP,OAAO;YACP,QAAQ;YACR,SAAS;QACX;IACF;CACD,CAAA;AAED;;;CAGC,GACD,OAAO,MAAMC,gCAAkD;IAC7D,iBAAiB;IACjB,kBAAkB;AACpB,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/first-party-plugins.generated.ts"],"sourcesContent":["/**\n * GENERATED FILE — do not edit. Regenerate with:\n * node tools/scripts/generate-plugin-manifests.mjs\n *\n * The switchboard catalog (AGL-3080): one row per plugin and capability, each\n * declared by its own `catalog` block in plugins.config.json. The core holds\n * the types and the resolvers in `enabled-plugins.ts`; it holds no row.\n */\n\nimport type { FirstPartyPlugin, PluginEditBarLink, PublishedSiteImpact } from './enabled-plugins'\nimport type { ResolvedPluginHostCollection, ResolvedPluginOrgCollection } from './plugin-host-collections'\nimport type { ResolvedPluginSitemapSection } from './plugin-sitemap-sections'\nimport type { ResolvedPluginSiteBundleSectionDeclaration } from './plugin-site-bundle'\nimport type { ResolvedPluginOrgCapacity } from './plugin-org-capacity'\nimport type { ResolvedPluginCostAxis, ResolvedPluginUsageBand } from './plugin-usage-axes'\nimport type { ResolvedPluginPlanFeature, ResolvedPluginPlanQuota } from './plugin-plan-entitlements'\nimport type { FunctionBindings } from './plugin-contributions'\nimport type { PluginDistribution } from './plugin-distribution'\nimport type { RepeatSourceDeclaration } from './repeat-rows'\nimport type { PluginTemplateSource } from './plugin-template-sources'\nimport type { FormRecordTargetDeclaration } from './submission-record-target'\nimport type { ResolvedBesignerDocument } from './besigner-documents'\nimport type { PluginOrgKeyedCollection } from './plugin-org-erasure'\nimport type { ResolvedVideoEmbedProvider } from './video-embed-provider'\nimport type { AnalyticsProviderDeclaration } from '../app-utils/analytics-provider'\nimport type { InteractionStepDeclaration } from '../app-utils/site-interactions'\nimport type { NotificationCategoryDeclaration, NotificationDigestDeclaration } from '../app-utils/notifications'\n\nexport const FIRST_PARTY_PLUGINS: readonly FirstPartyPlugin[] = [\n {\n \"id\": \"mui\",\n \"label\": \"Components\",\n \"alwaysOn\": true,\n \"description\": \"The base component and theme library every site builds on.\"\n },\n {\n \"id\": \"forms\",\n \"label\": \"Forms\",\n \"alwaysOnForWorkspace\": true,\n \"description\": \"Forms on the site and the catalog that owns them.\",\n \"siteOff\": {\n \"stops\": \"Switching Forms off for this site stops forms rendering on its published pages, refuses every submission sent to it, and blocks publishing a form, or a page that carries one, until Forms is back on.\",\n \"keeps\": \"Submissions already received, the workspace’s form catalog and the CRM leads its forms created are kept, and forms keep working on the workspace’s other sites.\",\n \"confirm\": true,\n \"pages\": {\n \"heading\": \"These published pages carry a form. Their forms stop rendering and stop accepting submissions:\",\n \"none\": \"No published page on this site carries a form.\"\n }\n }\n },\n {\n \"id\": \"ai\",\n \"label\": \"AI\",\n \"alwaysOnForWorkspace\": true,\n \"description\": \"The assistant, generative building and automation, and the AI add-on.\",\n \"siteOff\": {\n \"stops\": \"Switching AI off for this site hides the assistant, Describe it, the AI cards and the editor’s AI controls on this site, refuses every AI request made for it, and stops its queued AI jobs without spending credits.\",\n \"keeps\": \"It does not stop the workspace’s AI add-on, credits, allotments or overage billing, and AI keeps working on the workspace’s other sites.\"\n }\n },\n {\n \"id\": \"theme-presets\",\n \"label\": \"Themes\",\n \"alwaysOnForWorkspace\": true,\n \"description\": \"Built-in themes to pick from on Setup → Theme: Bootstrap, Minimal and Material 3.\",\n \"siteOff\": {\n \"stops\": \"Switching Themes off for this site removes its built-in themes from the theme picker.\",\n \"keeps\": \"A site already using one keeps it, with every edit made to it: picking a theme copies it onto the site, so nothing on the published site changes.\"\n }\n },\n {\n \"id\": \"accounts\",\n \"label\": \"User Accounts\",\n \"description\": \"Visitor accounts on the site: the /signin, /signup and /recover pages, and the Members blocks. On for a new site; a site created before that stays off until you turn it on.\",\n \"releaseFlag\": \"release_member_accounts\",\n \"defaultOffPerSite\": true,\n \"requires\": [\n \"commerce\"\n ]\n },\n {\n \"id\": \"bookings\",\n \"label\": \"Bookings\",\n \"description\": \"Services, open slots, and paid bookings.\",\n \"releaseFlag\": \"release_bookings\"\n },\n {\n \"id\": \"commerce\",\n \"label\": \"Commerce\",\n \"description\": \"Products, carts, checkout, orders, POS.\",\n \"releaseFlag\": \"release_commerce_v2\"\n },\n {\n \"id\": \"marketplace\",\n \"label\": \"Marketplace\",\n \"description\": \"Marketplace listings, templates, and installs.\",\n \"releaseFlag\": \"release_marketplace\"\n },\n {\n \"id\": \"crm\",\n \"label\": \"CRM\",\n \"description\": \"Leads, contacts, companies, deals, tasks and reports.\",\n \"releaseFlag\": \"release_crm\"\n },\n {\n \"id\": \"outreach\",\n \"label\": \"Sequences\",\n \"description\": \"One-to-one email sequences sent from connected mailboxes.\",\n \"releaseFlag\": \"release_outreach\"\n },\n {\n \"id\": \"data\",\n \"label\": \"Data\",\n \"description\": \"Datasets, records, and CSV import/export.\",\n \"releaseFlag\": \"release_data_store\"\n },\n {\n \"id\": \"email\",\n \"label\": \"Email\",\n \"description\": \"Designed emails and campaign sending.\",\n \"releaseFlag\": \"release_email\"\n },\n {\n \"id\": \"events-calendar\",\n \"label\": \"Events Calendar\",\n \"description\": \"Event lists and calendars.\",\n \"releaseFlag\": \"release_events\"\n },\n {\n \"id\": \"inbox\",\n \"label\": \"Inbox\",\n \"description\": \"Form submissions and lead inbox.\",\n \"releaseFlag\": \"release_inbox\"\n },\n {\n \"id\": \"logic\",\n \"label\": \"Logic\",\n \"description\": \"Variables, functions, and reference health.\",\n \"releaseFlag\": \"release_logic\"\n },\n {\n \"id\": \"marketing\",\n \"label\": \"Marketing\",\n \"description\": \"Overlays, campaigns, and experiments.\",\n \"releaseFlag\": \"release_marketing\"\n },\n {\n \"id\": \"redirects\",\n \"label\": \"Redirects\",\n \"description\": \"URL redirect rules.\",\n \"releaseFlag\": \"release_redirects\"\n },\n {\n \"id\": \"workflows\",\n \"label\": \"Automation\",\n \"description\": \"Workflows, actions, webhooks, and run logs.\",\n \"releaseFlag\": \"release_workflows\"\n },\n]\n\nexport const PUBLISHED_SITE_IMPACT: Readonly<Record<string, PublishedSiteImpact>> = {\n \"mui\": \"elements\",\n \"forms\": \"elements\",\n \"ai\": \"console-only\",\n \"theme-presets\": \"console-only\",\n \"accounts\": \"routes\",\n \"bookings\": \"elements\",\n \"commerce\": \"elements\",\n \"marketplace\": \"console-only\",\n \"crm\": \"console-only\",\n \"outreach\": \"console-only\",\n \"data\": \"console-only\",\n \"email\": \"elements\",\n \"events-calendar\": \"elements\",\n \"inbox\": \"console-only\",\n \"logic\": \"console-only\",\n \"marketing\": \"elements\",\n \"redirects\": \"routes\",\n \"workflows\": \"routes\",\n}\n\n/**\n * The admin edit bar's quick links, in the order they are drawn — each\n * declared by the plugin whose console page it opens (AGL-3080).\n */\nexport const PLUGIN_EDIT_BAR_LINKS: readonly PluginEditBarLink[] = [\n {\n \"pluginId\": \"inbox\",\n \"order\": 20,\n \"label\": \"Inbox\",\n \"path\": \"/inbox\"\n },\n {\n \"pluginId\": \"commerce\",\n \"order\": 30,\n \"label\": \"Orders\",\n \"path\": \"/products/orders\"\n },\n]\n\n/**\n * Every host subcollection a first-party plugin owns, declared by that plugin\n * (AGL-3080). Core's readers ask this list; core names no collection.\n */\nexport const PLUGIN_HOST_COLLECTIONS_DECLARED: readonly ResolvedPluginHostCollection[] = [\n {\n \"pluginId\": \"forms\",\n \"name\": \"forms\",\n \"routeSlug\": \"forms\"\n },\n {\n \"pluginId\": \"bookings\",\n \"name\": \"services\",\n \"routeSlug\": \"bookings\",\n \"resource\": {\n \"kind\": \"service\",\n \"label\": \"services\",\n \"activityNoun\": \"service\",\n \"quotaKey\": \"servicesPerHost\",\n \"entitlement\": \"bookings\",\n \"fields\": [\n \"name\",\n \"description\",\n \"durationMinutes\",\n \"priceUsd\",\n \"timezone\",\n \"windows\",\n \"crmFollowUpTask\",\n \"crmMeetingActivity\"\n ]\n },\n \"siteExport\": {\n \"limit\": 50,\n \"fields\": [\n \"name\",\n \"description\",\n \"durationMinutes\",\n \"priceUsd\",\n \"timezone\",\n \"windows\",\n \"crmFollowUpTask\",\n \"crmMeetingActivity\"\n ]\n }\n },\n {\n \"pluginId\": \"bookings\",\n \"name\": \"bookings\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Booking records — a customer, a time and a service pointer. The service holds the imagery and IS scanned; a booking is the transaction against it.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"products\",\n \"routeSlug\": \"products\",\n \"resource\": {\n \"kind\": \"product\",\n \"label\": \"products\",\n \"activityNoun\": \"product\",\n \"quotaKey\": \"productsPerHost\",\n \"entitlement\": \"commerce\",\n \"fields\": [\n \"name\",\n \"slug\",\n \"description\",\n \"type\",\n \"status\",\n \"mediaUrls\",\n \"categoryIds\",\n \"tags\",\n \"options\",\n \"variants\",\n \"seo\",\n \"supplierId\",\n \"oversellPolicy\",\n \"taxExempt\",\n \"digitalFiles\",\n \"downloadLimit\",\n \"subscription\",\n \"subscriptionOptional\",\n \"gatedVideos\",\n \"relatedProductIds\",\n \"giftCard\",\n \"lowStockThreshold\",\n \"createdAtMs\",\n \"updatedAtMs\",\n \"nameLower\",\n \"nameTokens\",\n \"nameReversed\",\n \"skus\",\n \"barcodes\",\n \"priceFromCents\",\n \"soldOut\",\n \"collectionIds\",\n \"priceUsd\",\n \"inventory\",\n \"imageUrl\"\n ],\n \"stamps\": {\n \"deletedAt\": null\n }\n }\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"productCategories\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"suppliers\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"locations\",\n \"routeSlug\": \"products\",\n \"resource\": {\n \"kind\": \"location\",\n \"label\": \"inventory locations\",\n \"activityNoun\": \"inventory location\",\n \"quotaKey\": \"inventoryLocations\",\n \"entitlement\": \"commerce\",\n \"fields\": [\n \"name\",\n \"isDefault\",\n \"address\"\n ]\n }\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"coupons\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"discounts\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"reviews\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"memberPosts\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"resources\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"settings\",\n \"label\": \"Store settings\",\n \"routeSlug\": \"products\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"siteMembers\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"siteMemberCredentials\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"A site member's password hash, one document per member, read and written only by the membership routes (AGL-3308). A credential with no content field, and no client may read it.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"orders\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Completed orders. Line items COPY a product's `imageUrl` at purchase time, so these would match — and matching would be the wrong answer: an order is an immutable record of what was sold, deleting the asset changes nothing about it, and no author can edit one. A busy store also holds more of these than the whole read budget.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"carts\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Live and abandoned carts, with the same copied line-item image and the same reasoning, at higher volume — one document per shopper session.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"checkouts\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"In-flight checkout sessions. Transient buyer state carrying the same line-item snapshot as `carts`.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"reservations\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"POS and booking holds. Short-lived transaction rows pointing at a resource that is itself scanned.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"stockHolds\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Inventory holds taken during checkout. Machine-written, short-lived, and a quantity rather than content.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"subscriptions\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Site membership subscriptions: a plan pointer, a status and Stripe ids. Server-written from the billing webhook.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"registers\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"POS register allocations — a count against the register add-on, read by billing (AGL-1775). No content field at all.\",\n \"resource\": {\n \"kind\": \"register\",\n \"label\": \"POS registers\",\n \"activityNoun\": \"POS register\",\n \"quotaKey\": \"posRegisters\",\n \"entitlement\": \"pos\",\n \"fields\": [\n \"name\",\n \"locationId\"\n ]\n }\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"giftCards\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Gift card balances and redemption history. Money, not content.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"licenseKeys\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Digital-product license keys issued at fulfilment: a code, an order pointer and a revocation flag.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"inventoryAdjustments\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"The append-only stock adjustment ledger (AGL-2269). One row per manual stock edit and per cancellation release, unbounded over a store's life.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"inventoryReconciliation\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Reconciliation runs comparing counted stock against recorded stock. Machine-written totals.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"restockAlerts\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Back-in-stock requests: an email address and a product pointer, written by visitors.\"\n },\n {\n \"pluginId\": \"commerce\",\n \"name\": \"stripeTaxRates\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Cached Stripe tax rate ids, written by the tax sync. Vendor ids.\"\n },\n {\n \"pluginId\": \"marketplace\",\n \"name\": \"installs\"\n },\n {\n \"pluginId\": \"crm\",\n \"name\": \"leads\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Captured leads, on the same footing as `formSubmissions`: visitor-submitted, unbounded, and never a place an author places an asset.\"\n },\n {\n \"pluginId\": \"email\",\n \"name\": \"suppressions\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Unsubscribes, bounces and spam complaints. Email addresses and a reason.\"\n },\n {\n \"pluginId\": \"events-calendar\",\n \"name\": \"events\",\n \"routeSlug\": \"events\"\n },\n {\n \"pluginId\": \"inbox\",\n \"name\": \"formSubmissions\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"Visitor form submissions. Unbounded, PII-heavy, and a file attached to one is the visitor's upload — not a library asset an author picked, and not something deleting a library asset would break.\"\n },\n {\n \"pluginId\": \"logic\",\n \"name\": \"functions\",\n \"routeSlug\": \"logic\",\n \"resource\": {\n \"kind\": \"function\",\n \"label\": \"functions\",\n \"activityNoun\": \"function\",\n \"activityType\": \"function\",\n \"quotaKey\": \"functionsPerHost\",\n \"fields\": [\n \"name\",\n \"parameters\",\n \"variables\",\n \"operations\",\n \"returnValue\"\n ]\n },\n \"siteExport\": {\n \"limit\": 100,\n \"fields\": [\n \"name\",\n \"parameters\",\n \"variables\",\n \"operations\",\n \"returnValue\"\n ]\n }\n },\n {\n \"pluginId\": \"logic\",\n \"name\": \"variables\",\n \"routeSlug\": \"logic\",\n \"resource\": {\n \"kind\": \"variable\",\n \"label\": \"variables\",\n \"activityNoun\": \"variable\",\n \"activityType\": \"variable\",\n \"quotaKey\": \"variablesPerHost\",\n \"fields\": [\n \"name\",\n \"type\",\n \"value\",\n \"workflowId\",\n \"workflowName\"\n ]\n },\n \"siteExport\": {\n \"limit\": 100,\n \"fields\": [\n \"name\",\n \"type\",\n \"value\",\n \"workflowId\",\n \"workflowName\"\n ]\n }\n },\n {\n \"pluginId\": \"marketing\",\n \"name\": \"experiments\",\n \"routeSlug\": \"marketing\"\n },\n {\n \"pluginId\": \"marketing\",\n \"name\": \"overlays\",\n \"routeSlug\": \"marketing\"\n },\n {\n \"pluginId\": \"marketing\",\n \"name\": \"campaignAttributions\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"One row per conversion — a form submission, a lead, a contact or a booking — recording which campaign the visitor arrived from. Written only by the Admin SDK, and the whole record is three sanitized UTM strings capped at a hundred characters: there is no field an asset could occupy and no surface that could pick one into it. Unbounded on the same footing as the conversions it credits.\"\n },\n {\n \"pluginId\": \"redirects\",\n \"name\": \"redirects\",\n \"routeSlug\": \"redirects\",\n \"resource\": {\n \"kind\": \"redirect\",\n \"label\": \"redirects\",\n \"activityNoun\": \"redirect\",\n \"quotaKey\": \"redirectsPerHost\",\n \"entitlement\": \"redirects\",\n \"requiresPublishRole\": true,\n \"fields\": [\n \"source\",\n \"destination\",\n \"statusCode\",\n \"kind\",\n \"priority\",\n \"enabled\"\n ],\n \"externalDestination\": {\n \"field\": \"destination\",\n \"approvedByField\": \"externalDestinationApprovedBy\"\n },\n \"livePathField\": \"source\"\n }\n },\n {\n \"pluginId\": \"workflows\",\n \"name\": \"workflows\",\n \"routeSlug\": \"automation\",\n \"resource\": {\n \"kind\": \"workflow\",\n \"label\": \"workflows\",\n \"activityNoun\": \"workflow\",\n \"activityType\": \"workflow\",\n \"quotaKey\": \"workflowsPerHost\",\n \"entitlement\": \"workflows\",\n \"fields\": [\n \"name\",\n \"steps\",\n \"returnValue\",\n \"trigger\"\n ],\n \"duplicate\": {\n \"nameField\": \"name\",\n \"fields\": [\n \"steps\",\n \"returnValue\"\n ],\n \"stamps\": {\n \"trigger\": null\n }\n }\n },\n \"siteExport\": {\n \"limit\": 100,\n \"fields\": [\n \"name\",\n \"steps\",\n \"returnValue\",\n \"trigger\"\n ]\n }\n },\n {\n \"pluginId\": \"workflows\",\n \"name\": \"webhooks\",\n \"routeSlug\": \"automation\",\n \"resource\": {\n \"kind\": \"webhook\",\n \"label\": \"webhooks\",\n \"activityNoun\": \"webhook\",\n \"entitlement\": \"webhooks\",\n \"platformCap\": \"WEBHOOK_MAX_PER_HOST\",\n \"softDeletes\": true,\n \"fields\": [\n \"name\",\n \"direction\",\n \"url\",\n \"workflowName\",\n \"secret\",\n \"enabled\"\n ]\n }\n },\n {\n \"pluginId\": \"workflows\",\n \"name\": \"actions\",\n \"routeSlug\": \"automation\",\n \"resource\": {\n \"kind\": \"action\",\n \"label\": \"interactions and actions\",\n \"activityNoun\": \"action\",\n \"platformCap\": \"ACTIONS_MAX_PER_HOST\",\n \"softDeletes\": true,\n \"fields\": [\n \"name\",\n \"description\",\n \"trigger\",\n \"steps\",\n \"enabled\",\n \"frequency\",\n \"cooldownMinutes\",\n \"audience\",\n \"nodeId\",\n \"screenId\"\n ]\n },\n \"siteExport\": {\n \"limit\": 100,\n \"fields\": [\n \"name\",\n \"trigger\",\n \"steps\",\n \"enabled\",\n \"recipe\"\n ]\n }\n },\n]\n\n/**\n * Every child sitemap a first-party plugin's documents fill, declared by that\n * plugin (AGL-3080), in the order the index lists them.\n */\nexport const PLUGIN_SITEMAP_SECTIONS_DECLARED: readonly ResolvedPluginSitemapSection[] = [\n {\n \"pluginId\": \"commerce\",\n \"section\": \"products\",\n \"collection\": \"products\",\n \"where\": {\n \"field\": \"status\",\n \"equals\": \"active\"\n },\n \"enabledBy\": {\n \"doc\": \"settings/store\",\n \"field\": \"pdpScreenId\"\n },\n \"path\": \"/products/{slug}\",\n \"skipWhen\": \"deletedAt\",\n \"lastmod\": [\n \"updatedAtMs\",\n \"createdAtMs\"\n ]\n },\n {\n \"pluginId\": \"commerce\",\n \"section\": \"catalog\",\n \"collection\": \"collections\",\n \"where\": {\n \"field\": \"kind\",\n \"equals\": \"catalog\"\n },\n \"enabledBy\": {\n \"doc\": \"settings/store\",\n \"field\": \"collectionScreenId\"\n },\n \"path\": \"/collections/{slug}\",\n \"lastmod\": [\n \"updatedAt\",\n \"createdAt\"\n ]\n },\n]\n\n/**\n * Every section of the whole-site backup a first-party plugin answers for,\n * declared by that plugin (AGL-3080), in the order the bundle carries them.\n */\nexport const PLUGIN_SITE_BUNDLE_SECTIONS_DECLARED: readonly ResolvedPluginSiteBundleSectionDeclaration[] = [\n {\n \"pluginId\": \"data\",\n \"key\": \"datasets\",\n \"limit\": 50\n }\n]\n\n/**\n * Every org collection a first-party plugin owns whose documents the media\n * scan reads, declared by that plugin (AGL-3273).\n */\nexport const PLUGIN_ORG_COLLECTIONS_DECLARED: readonly ResolvedPluginOrgCollection[] = [\n {\n \"pluginId\": \"marketing\",\n \"name\": \"campaigns\",\n \"routeSlug\": \"marketing\",\n \"siteField\": \"hostId\",\n \"holdsTransferWhile\": {\n \"field\": \"status\",\n \"values\": [\n \"scheduled\",\n \"sending\"\n ]\n }\n },\n {\n \"pluginId\": \"marketing\",\n \"name\": \"emailCampaigns\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"The campaign CONTAINER — a name, a date window, the list ids it is aimed at, a topic and the sites it runs on. Distinct from `campaigns`, which holds the sends and IS scanned because a send carries the copy that went out. A container carries no copy and no asset reference: the design a send renders is a screen, and the screen is where the picker writes.\"\n },\n {\n \"pluginId\": \"workflows\",\n \"name\": \"automations\",\n \"mediaScan\": \"none\",\n \"mediaScanReason\": \"An org automation (AGL-3302) — a trigger, its conditions, the sites it is placed on, and a step list drawn from the server steps only: email subject and body as plain text, list, dataset and campaign ids, CRM fields and waits. No step it may hold carries a media reference, the in-page steps that could (custom HTML, popups) are refused by its save route, and it is written only by that route.\"\n },\n]\n\n/**\n * Every org capacity a first-party plugin backs, declared by that plugin\n * (AGL-3080). Core owns the money; this says what is counted and what it is\n * called.\n */\nexport const PLUGIN_ORG_CAPACITIES_DECLARED: readonly ResolvedPluginOrgCapacity[] = [\n {\n \"pluginId\": \"data\",\n \"kind\": \"datasets\",\n \"order\": 30,\n \"collection\": \"datasets\",\n \"addonKind\": \"datasets\",\n \"includedEntitlement\": \"datasetsPerOrg\",\n \"purchaseCeilingEntitlement\": \"maxDatasetsPerOrg\",\n \"nouns\": {\n \"one\": \"dataset\",\n \"many\": \"datasets\",\n \"addon\": \"extra datasets\"\n }\n },\n]\n\n/**\n * What each plan includes of every quota a first-party plugin owns, declared\n * by that plugin (AGL-3080). `PLAN_ENTITLEMENTS` composes these; core names\n * no key.\n */\nexport const PLUGIN_PLAN_QUOTAS_DECLARED: readonly ResolvedPluginPlanQuota[] = [\n {\n \"pluginId\": \"forms\",\n \"key\": \"formSubmissionsPerMonth\",\n \"label\": \"Form subs / mo\",\n \"byPlan\": {\n \"free\": 20,\n \"starter\": 200,\n \"pro\": 1000,\n \"business\": 8000,\n \"scale\": 25000,\n \"advanced\": 40000,\n \"agency\": 25000,\n \"enterprise\": 50000\n }\n },\n {\n \"pluginId\": \"marketplace\",\n \"key\": \"marketplaceFeePct\",\n \"label\": \"Marketplace fee %\",\n \"price\": true,\n \"byPlan\": {\n \"free\": 30,\n \"starter\": 20,\n \"pro\": 20,\n \"business\": 20,\n \"scale\": 20,\n \"advanced\": 20,\n \"agency\": 20,\n \"enterprise\": 20\n }\n },\n {\n \"pluginId\": \"crm\",\n \"key\": \"crmEmailsPerDay\",\n \"label\": \"One-to-one emails / day\",\n \"byPlan\": {\n \"free\": 0,\n \"starter\": 50,\n \"pro\": 150,\n \"business\": 200,\n \"scale\": 300,\n \"advanced\": 500,\n \"agency\": 1000,\n \"enterprise\": 2000\n }\n },\n {\n \"pluginId\": \"workflows\",\n \"key\": \"workflowRunsPerMonth\",\n \"label\": \"Workflow runs / mo\",\n \"byPlan\": {\n \"free\": 0,\n \"starter\": 500,\n \"pro\": 5000,\n \"business\": 50000,\n \"scale\": 150000,\n \"advanced\": 500000,\n \"agency\": 2000000,\n \"enterprise\": 4000000\n }\n },\n {\n \"pluginId\": \"ai\",\n \"key\": \"assistCreditsPerMonth\",\n \"label\": \"AI credits / mo\",\n \"byPlan\": {\n \"free\": 300,\n \"starter\": 750,\n \"pro\": 2750,\n \"business\": 7500,\n \"scale\": 10000,\n \"advanced\": 13000,\n \"agency\": 58000,\n \"enterprise\": 116000\n }\n },\n]\n\n/**\n * What each plan includes of every feature a first-party plugin owns,\n * declared by that plugin (AGL-3080).\n */\nexport const PLUGIN_PLAN_FEATURES_DECLARED: readonly ResolvedPluginPlanFeature[] = [\n {\n \"pluginId\": \"commerce\",\n \"key\": \"storefrontSubscriptions\",\n \"label\": \"Storefront subscriptions\",\n \"byPlan\": {\n \"free\": false,\n \"starter\": false,\n \"pro\": false,\n \"business\": true,\n \"scale\": true,\n \"advanced\": true,\n \"agency\": true,\n \"enterprise\": true\n }\n },\n {\n \"pluginId\": \"commerce\",\n \"key\": \"giftCards\",\n \"label\": \"Gift cards\",\n \"byPlan\": {\n \"free\": false,\n \"starter\": false,\n \"pro\": false,\n \"business\": true,\n \"scale\": true,\n \"advanced\": true,\n \"agency\": true,\n \"enterprise\": true\n }\n },\n {\n \"pluginId\": \"commerce\",\n \"key\": \"commerceAnalytics\",\n \"label\": \"Commerce analytics\",\n \"byPlan\": {\n \"free\": false,\n \"starter\": false,\n \"pro\": true,\n \"business\": true,\n \"scale\": true,\n \"advanced\": true,\n \"agency\": true,\n \"enterprise\": true\n }\n },\n {\n \"pluginId\": \"marketplace\",\n \"key\": \"marketplaceSelling\",\n \"label\": \"Sell on the marketplace\",\n \"byPlan\": {\n \"free\": false,\n \"starter\": false,\n \"pro\": true,\n \"business\": true,\n \"scale\": true,\n \"advanced\": true,\n \"agency\": true,\n \"enterprise\": true\n }\n },\n]\n\n/**\n * Every meter a first-party plugin contributes to the platform's cost model,\n * in breakdown order, declared by that plugin (AGL-3080). Core keeps the rates.\n */\nexport const PLUGIN_COST_AXES_DECLARED: readonly ResolvedPluginCostAxis[] = [\n {\n \"pluginId\": \"forms\",\n \"id\": \"formSubmissions\",\n \"order\": 30,\n \"fields\": [\n \"formSubmissions\"\n ],\n \"rate\": \"perFormSubmission\"\n },\n {\n \"pluginId\": \"crm\",\n \"id\": \"contacts\",\n \"order\": 60,\n \"fields\": [\n \"crmRecordsCount\"\n ],\n \"fallbackFields\": [\n \"contactsCount\"\n ],\n \"recordedFields\": [\n \"companiesCount\",\n \"dealsCount\"\n ],\n \"rate\": \"perContactMonth\"\n },\n {\n \"pluginId\": \"ai\",\n \"id\": \"assist\",\n \"order\": 80,\n \"fields\": [\n \"assistCostUsd\"\n ],\n \"live\": {\n \"collection\": \"assistUsage\",\n \"fields\": [\n \"providerCostUsd\",\n \"estCostUsd\"\n ]\n }\n },\n {\n \"pluginId\": \"workflows\",\n \"id\": \"runs\",\n \"order\": 90,\n \"fields\": [\n \"workflowRuns\",\n \"actionRuns\"\n ],\n \"rate\": \"perRun\"\n },\n]\n\n/**\n * Every band a first-party plugin contributes to the utilization table, in\n * column order, declared by that plugin (AGL-3080).\n */\nexport const PLUGIN_USAGE_BANDS_DECLARED: readonly ResolvedPluginUsageBand[] = [\n {\n \"pluginId\": \"forms\",\n \"id\": \"formSubmissions\",\n \"label\": \"Form submissions\",\n \"order\": 40,\n \"fields\": [\n \"formSubmissions\"\n ],\n \"entitlement\": \"formSubmissionsPerMonth\",\n \"perHost\": true\n },\n {\n \"pluginId\": \"crm\",\n \"id\": \"contactsCount\",\n \"label\": \"CRM records\",\n \"order\": 70,\n \"fields\": [\n \"crmRecordsCount\"\n ],\n \"fallbackFields\": [\n \"contactsCount\"\n ],\n \"entitlement\": \"contactsPerHost\"\n },\n {\n \"pluginId\": \"ai\",\n \"id\": \"assistCredits\",\n \"label\": \"Assist credits\",\n \"order\": 90,\n \"fields\": [\n \"assistCostUsd\"\n ],\n \"entitlement\": \"assistCreditsPerMonth\",\n \"unitCostUsd\": 0.001\n },\n {\n \"pluginId\": \"workflows\",\n \"id\": \"workflowRuns\",\n \"label\": \"Workflow runs\",\n \"order\": 100,\n \"fields\": [\n \"workflowRuns\"\n ],\n \"entitlement\": \"workflowRunsPerMonth\"\n },\n {\n \"pluginId\": \"workflows\",\n \"id\": \"actionRuns\",\n \"label\": \"Action runs\",\n \"order\": 110,\n \"fields\": [\n \"actionRuns\"\n ],\n \"entitlement\": \"actionRunsPerMonth\"\n },\n]\n\n/**\n * Every top-level plugin collection a workspace erasure sweeps by the field\n * naming the organization, declared by the plugin that owns it (AGL-3080).\n */\nexport const PLUGIN_ORG_KEYED_COLLECTIONS: readonly PluginOrgKeyedCollection[] = [\n {\n \"pluginId\": \"outreach\",\n \"name\": \"outreachMailboxCredentials\",\n \"orgField\": \"orgId\"\n },\n {\n \"pluginId\": \"outreach\",\n \"name\": \"outreachLinks\",\n \"orgField\": \"orgId\"\n },\n]\n\n/**\n * The plugins whose org eraser a workspace erasure may not run without\n * (AGL-3080): each holds a record the erasure promises to destroy.\n */\nexport const PLUGIN_REQUIRED_ORG_ERASERS: readonly string[] = [\"marketplace\"]\n\n/**\n * The plugins whose sales the operator's sales tax return may not be filed\n * without (AGL-3080): each registers a tax return source, and one that did\n * not is refused rather than read as nothing sold.\n */\nexport const PLUGIN_TAX_RETURN_SOURCES: readonly string[] = [\"commerce\",\"marketplace\"]\n\n/**\n * The plugins whose earnings the operator's revenue report may not be read\n * without (AGL-3080): each registers a revenue source, and one that did not\n * is refused rather than read as nothing earned.\n */\nexport const PLUGIN_REVENUE_SOURCES: readonly string[] = [\"commerce\",\"marketplace\"]\n\n/**\n * Where published plugin versions and their kill switches are stored, declared\n * by the plugin that distributes them (AGL-3080). `null` when none does, and\n * the realm loader then resolves nothing.\n */\nexport const PLUGIN_DISTRIBUTION: PluginDistribution | null = {\n \"pluginId\": \"marketplace\",\n \"listings\": \"marketplaceListings\",\n \"versions\": \"pluginVersions\",\n \"revocations\": \"revocations\"\n}\n\n/**\n * The plugin that answers a published page's repeats, declared by that plugin\n * (AGL-3080). `null` when none does, and a repeat then renders its element\n * once, as written.\n */\nexport const PLUGIN_REPEAT_SOURCE_DECLARED: RepeatSourceDeclaration | null = {\n \"pluginId\": \"data\",\n \"id\": \"dataset\"\n}\n\n/**\n * The site documents a plugin authors in the besigner, declared by that\n * plugin (AGL-3080). Empty when none does, and the console's plugin-document\n * editor routes answer 404.\n */\nexport const PLUGIN_BESIGNER_DOCUMENTS_DECLARED: readonly ResolvedBesignerDocument[] = [\n {\n \"pluginId\": \"forms\",\n \"kind\": \"form\",\n \"segment\": \"forms\",\n \"collection\": \"forms\",\n \"noun\": \"form\",\n \"publish\": {\n \"path\": \"/api/forms/promote\",\n \"idField\": \"formId\"\n }\n },\n]\n\n/**\n * The plugin whose records a form's submission may also be filed as, declared\n * by that plugin (AGL-3080). `null` when none does, and no form writes one.\n */\nexport const PLUGIN_FORM_RECORD_TARGET_DECLARED: FormRecordTargetDeclaration | null = {\n \"pluginId\": \"data\",\n \"id\": \"dataset\"\n}\n\n/**\n * What a site's template library calls a template a plugin installed, by the\n * `source.type` that plugin stamps, declared by that plugin (AGL-3080).\n * Core names no installer.\n */\nexport const PLUGIN_TEMPLATE_SOURCES: readonly PluginTemplateSource[] = [\n {\n \"pluginId\": \"marketplace\",\n \"type\": \"marketplace\",\n \"label\": \"Marketplace\",\n \"description\": \"Installed from the marketplace\"\n },\n]\n\n/**\n * The analytics settings each provider mounts a tag for, declared by the\n * plugin that adapts the vendor (AGL-3080). Empty when none does, and then no\n * setting configures a tag.\n */\nexport const ANALYTICS_PROVIDERS_DECLARED: readonly AnalyticsProviderDeclaration[] = [\n {\n \"pluginId\": \"marketing\",\n \"settings\": [\n \"gaMeasurementId\",\n \"gtmContainerId\"\n ]\n },\n]\n\n/**\n * Every interaction step a first-party plugin offers in the interaction\n * builder, declared by that plugin (AGL-3080). Core names no plugin step.\n */\nexport const PLUGIN_INTERACTION_STEPS_DECLARED: readonly InteractionStepDeclaration[] = [\n {\n \"pluginId\": \"marketing\",\n \"type\": \"showOverlay\",\n \"label\": \"Open an overlay\",\n \"picks\": {\n \"collection\": \"overlays\",\n \"limit\": 50,\n \"idField\": \"overlayId\",\n \"nameField\": \"overlayName\",\n \"label\": \"Overlay\",\n \"missing\": \"pick an overlay\"\n }\n },\n {\n \"pluginId\": \"workflows\",\n \"type\": \"runWorkflow\",\n \"label\": \"Run a workflow\",\n \"picks\": {\n \"collection\": \"workflows\",\n \"limit\": 100,\n \"idField\": \"workflowId\",\n \"nameField\": \"workflowName\",\n \"label\": \"Workflow\",\n \"missing\": \"pick a workflow\"\n }\n },\n]\n\n/**\n * Every first-party element that runs a site function, and the prop naming\n * it, declared by that element's plugin (AGL-3393). Core names no element.\n */\nexport const FIRST_PARTY_FUNCTION_BINDINGS: FunctionBindings = {}\n\n/**\n * Every video host whose own player the Video element frames, declared by\n * the plugin that plays it (AGL-3080). Core names no host.\n */\nexport const FIRST_PARTY_VIDEO_EMBED_PROVIDERS: readonly ResolvedVideoEmbedProvider[] = [\n {\n \"pluginId\": \"mui\",\n \"id\": \"wistia\",\n \"label\": \"Wistia\",\n \"domains\": [\n \"wistia.com\",\n \"wistia.net\",\n \"wi.st\"\n ],\n \"mediaIdPaths\": [\n \"^\\\\/medias\\\\/([^/]+)(?:\\\\/manage)?\\\\/?$\",\n \"^\\\\/m\\\\/([^/]+)\\\\/?$\",\n \"^\\\\/embed\\\\/iframe\\\\/([^/]+)\\\\/?$\",\n \"^\\\\/embed\\\\/medias\\\\/([^/.]+)(?:\\\\.jsonp?)?\\\\/?$\"\n ],\n \"mediaIdPattern\": \"^[a-z0-9]{10}$\",\n \"playerOrigin\": \"https://fast.wistia.net\",\n \"playerPath\": \"/embed/iframe/{id}\",\n \"playerQuery\": [\n {\n \"param\": \"autoPlay\",\n \"option\": \"autoPlay\",\n \"on\": \"true\",\n \"off\": \"false\"\n },\n {\n \"param\": \"roundedPlayer\",\n \"value\": \"false\"\n },\n {\n \"param\": \"doNotTrack\",\n \"option\": \"doNotTrack\",\n \"on\": \"true\"\n },\n {\n \"param\": \"muted\",\n \"option\": \"muted\",\n \"on\": \"true\"\n },\n {\n \"param\": \"endVideoBehavior\",\n \"option\": \"loop\",\n \"on\": \"loop\"\n }\n ]\n },\n]\n\n/**\n * The notification categories first-party plugins add to the settings page\n * and to every recipient's preferences, declared by each plugin (AGL-3080).\n */\nexport const PLUGIN_NOTIFICATION_CATEGORIES_DECLARED: readonly NotificationCategoryDeclaration[] = [\n {\n \"pluginId\": \"marketplace\",\n \"id\": \"marketplace\",\n \"label\": \"Marketplace\",\n \"description\": \"Decisions on plugin listings you submitted for review.\",\n \"defaults\": {\n \"console\": true,\n \"email\": false\n }\n },\n]\n\n/**\n * The digests first-party plugins send on their own schedule, each with the\n * key its switch is stored under, declared by the plugin that sends it\n * (AGL-3080).\n */\nexport const PLUGIN_NOTIFICATION_DIGESTS_DECLARED: readonly NotificationDigestDeclaration[] = [\n {\n \"pluginId\": \"crm\",\n \"key\": \"crmDaily\",\n \"label\": \"Daily CRM digest\",\n \"description\": \"Each morning: your overdue and due-today tasks and the leads nobody has worked, here and by email.\"\n },\n]\n"],"names":["FIRST_PARTY_PLUGINS","PUBLISHED_SITE_IMPACT","PLUGIN_EDIT_BAR_LINKS","PLUGIN_HOST_COLLECTIONS_DECLARED","PLUGIN_SITEMAP_SECTIONS_DECLARED","PLUGIN_SITE_BUNDLE_SECTIONS_DECLARED","PLUGIN_ORG_COLLECTIONS_DECLARED","PLUGIN_ORG_CAPACITIES_DECLARED","PLUGIN_PLAN_QUOTAS_DECLARED","PLUGIN_PLAN_FEATURES_DECLARED","PLUGIN_COST_AXES_DECLARED","PLUGIN_USAGE_BANDS_DECLARED","PLUGIN_ORG_KEYED_COLLECTIONS","PLUGIN_REQUIRED_ORG_ERASERS","PLUGIN_TAX_RETURN_SOURCES","PLUGIN_REVENUE_SOURCES","PLUGIN_DISTRIBUTION","PLUGIN_REPEAT_SOURCE_DECLARED","PLUGIN_BESIGNER_DOCUMENTS_DECLARED","PLUGIN_FORM_RECORD_TARGET_DECLARED","PLUGIN_TEMPLATE_SOURCES","ANALYTICS_PROVIDERS_DECLARED","PLUGIN_INTERACTION_STEPS_DECLARED","FIRST_PARTY_FUNCTION_BINDINGS","FIRST_PARTY_VIDEO_EMBED_PROVIDERS","PLUGIN_NOTIFICATION_CATEGORIES_DECLARED","PLUGIN_NOTIFICATION_DIGESTS_DECLARED"],"mappings":"AAAA;;;;;;;CAOC,GAqBD,OAAO,MAAMA,sBAAmD;IAC9D;QACE,MAAM;QACN,SAAS;QACT,YAAY;QACZ,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,wBAAwB;QACxB,eAAe;QACf,WAAW;YACT,SAAS;YACT,SAAS;YACT,WAAW;YACX,SAAS;gBACP,WAAW;gBACX,QAAQ;YACV;QACF;IACF;IACA;QACE,MAAM;QACN,SAAS;QACT,wBAAwB;QACxB,eAAe;QACf,WAAW;YACT,SAAS;YACT,SAAS;QACX;IACF;IACA;QACE,MAAM;QACN,SAAS;QACT,wBAAwB;QACxB,eAAe;QACf,WAAW;YACT,SAAS;YACT,SAAS;QACX;IACF;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;QACf,qBAAqB;QACrB,YAAY;YACV;SACD;IACH;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;IACA;QACE,MAAM;QACN,SAAS;QACT,eAAe;QACf,eAAe;IACjB;CACD,CAAA;AAED,OAAO,MAAMC,wBAAuE;IAClF,OAAO;IACP,SAAS;IACT,MAAM;IACN,iBAAiB;IACjB,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,SAAS;IACT,mBAAmB;IACnB,SAAS;IACT,SAAS;IACT,aAAa;IACb,aAAa;IACb,aAAa;AACf,EAAC;AAED;;;CAGC,GACD,OAAO,MAAMC,wBAAsD;IACjE;QACE,YAAY;QACZ,SAAS;QACT,SAAS;QACT,QAAQ;IACV;IACA;QACE,YAAY;QACZ,SAAS;QACT,SAAS;QACT,QAAQ;IACV;CACD,CAAA;AAED;;;CAGC,GACD,OAAO,MAAMC,mCAA4E;IACvF;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;IACf;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,YAAY;YACV,QAAQ;YACR,SAAS;YACT,gBAAgB;YAChB,YAAY;YACZ,eAAe;YACf,UAAU;gBACR;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;aACD;QACH;QACA,cAAc;YACZ,SAAS;YACT,UAAU;gBACR;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;aACD;QACH;IACF;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,mBAAmB;IACrB;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,YAAY;YACV,QAAQ;YACR,SAAS;YACT,gBAAgB;YAChB,YAAY;YACZ,eAAe;YACf,UAAU;gBACR;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;aACD;YACD,UAAU;gBACR,aAAa;YACf;QACF;IACF;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;IACf;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;IACf;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,YAAY;YACV,QAAQ;YACR,SAAS;YACT,gBAAgB;YAChB,YAAY;YACZ,eAAe;YACf,UAAU;gBACR;gBACA;gBACA;aACD;QACH;IACF;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;IACf;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;IACf;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;IACf;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;IACf;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;IACf;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,aAAa;IACf;IACA;QACE,YAAY;QACZ,QAAQ;IACV;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,mBAAmB;IACrB;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,mBAAmB;IACrB;IACA;QACE,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YACZ,SAAS;YACT,UAAU;gBACR;gBACA;gBACA;gBACA;gBACA;aACD;QACH;IACF;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,YAAY;YACV,QAAQ;YACR,SAAS;YACT,gBAAgB;YAChB,gBAAgB;YAChB,YAAY;YACZ,UAAU;gBACR;gBACA;gBACA;gBACA;gBACA;aACD;QACH;QACA,cAAc;YACZ,SAAS;YACT,UAAU;gBACR;gBACA;gBACA;gBACA;gBACA;aACD;QACH;IACF;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;IACf;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;IACf;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,mBAAmB;IACrB;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,YAAY;YACV,QAAQ;YACR,SAAS;YACT,gBAAgB;YAChB,YAAY;YACZ,eAAe;YACf,uBAAuB;YACvB,UAAU;gBACR;gBACA;gBACA;gBACA;gBACA;gBACA;aACD;YACD,uBAAuB;gBACrB,SAAS;gBACT,mBAAmB;YACrB;YACA,iBAAiB;QACnB;IACF;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,YAAY;YACV,QAAQ;YACR,SAAS;YACT,gBAAgB;YAChB,gBAAgB;YAChB,YAAY;YACZ,eAAe;YACf,UAAU;gBACR;gBACA;gBACA;gBACA;aACD;YACD,aAAa;gBACX,aAAa;gBACb,UAAU;oBACR;oBACA;iBACD;gBACD,UAAU;oBACR,WAAW;gBACb;YACF;QACF;QACA,cAAc;YACZ,SAAS;YACT,UAAU;gBACR;gBACA;gBACA;gBACA;aACD;QACH;IACF;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,YAAY;YACV,QAAQ;YACR,SAAS;YACT,gBAAgB;YAChB,eAAe;YACf,eAAe;YACf,eAAe;YACf,UAAU;gBACR;gBACA;gBACA;gBACA;gBACA;gBACA;aACD;QACH;IACF;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,YAAY;YACV,QAAQ;YACR,SAAS;YACT,gBAAgB;YAChB,eAAe;YACf,eAAe;YACf,UAAU;gBACR;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;aACD;QACH;QACA,cAAc;YACZ,SAAS;YACT,UAAU;gBACR;gBACA;gBACA;gBACA;gBACA;aACD;QACH;IACF;CACD,CAAA;AAED;;;CAGC,GACD,OAAO,MAAMC,mCAA4E;IACvF;QACE,YAAY;QACZ,WAAW;QACX,cAAc;QACd,SAAS;YACP,SAAS;YACT,UAAU;QACZ;QACA,aAAa;YACX,OAAO;YACP,SAAS;QACX;QACA,QAAQ;QACR,YAAY;QACZ,WAAW;YACT;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,WAAW;QACX,cAAc;QACd,SAAS;YACP,SAAS;YACT,UAAU;QACZ;QACA,aAAa;YACX,OAAO;YACP,SAAS;QACX;QACA,QAAQ;QACR,WAAW;YACT;YACA;SACD;IACH;CACD,CAAA;AAED;;;CAGC,GACD,OAAO,MAAMC,uCAA8F;IACzG;QACE,YAAY;QACZ,OAAO;QACP,SAAS;IACX;CACD,CAAA;AAED;;;CAGC,GACD,OAAO,MAAMC,kCAA0E;IACrF;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,aAAa;QACb,sBAAsB;YACpB,SAAS;YACT,UAAU;gBACR;gBACA;aACD;QACH;IACF;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,mBAAmB;IACrB;IACA;QACE,YAAY;QACZ,QAAQ;QACR,aAAa;QACb,mBAAmB;IACrB;CACD,CAAA;AAED;;;;CAIC,GACD,OAAO,MAAMC,iCAAuE;IAClF;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,cAAc;QACd,aAAa;QACb,uBAAuB;QACvB,8BAA8B;QAC9B,SAAS;YACP,OAAO;YACP,QAAQ;YACR,SAAS;QACX;IACF;CACD,CAAA;AAED;;;;CAIC,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YAAY;YACZ,SAAS;YACT,YAAY;YACZ,UAAU;YACV,cAAc;QAChB;IACF;IACA;QACE,YAAY;QACZ,OAAO;QACP,SAAS;QACT,UAAU;YACR,QAAQ;YACR,WAAW;YACX,OAAO;YACP,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,UAAU;YACV,cAAc;QAChB;IACF;CACD,CAAA;AAED;;;CAGC,GACD,OAAO,MAAMC,4BAA+D;IAC1E;QACE,YAAY;QACZ,MAAM;QACN,SAAS;QACT,UAAU;YACR;SACD;QACD,QAAQ;IACV;IACA;QACE,YAAY;QACZ,MAAM;QACN,SAAS;QACT,UAAU;YACR;SACD;QACD,kBAAkB;YAChB;SACD;QACD,kBAAkB;YAChB;YACA;SACD;QACD,QAAQ;IACV;IACA;QACE,YAAY;QACZ,MAAM;QACN,SAAS;QACT,UAAU;YACR;SACD;QACD,QAAQ;YACN,cAAc;YACd,UAAU;gBACR;gBACA;aACD;QACH;IACF;IACA;QACE,YAAY;QACZ,MAAM;QACN,SAAS;QACT,UAAU;YACR;YACA;SACD;QACD,QAAQ;IACV;CACD,CAAA;AAED;;;CAGC,GACD,OAAO,MAAMC,8BAAkE;IAC7E;QACE,YAAY;QACZ,MAAM;QACN,SAAS;QACT,SAAS;QACT,UAAU;YACR;SACD;QACD,eAAe;QACf,WAAW;IACb;IACA;QACE,YAAY;QACZ,MAAM;QACN,SAAS;QACT,SAAS;QACT,UAAU;YACR;SACD;QACD,kBAAkB;YAChB;SACD;QACD,eAAe;IACjB;IACA;QACE,YAAY;QACZ,MAAM;QACN,SAAS;QACT,SAAS;QACT,UAAU;YACR;SACD;QACD,eAAe;QACf,eAAe;IACjB;IACA;QACE,YAAY;QACZ,MAAM;QACN,SAAS;QACT,SAAS;QACT,UAAU;YACR;SACD;QACD,eAAe;IACjB;IACA;QACE,YAAY;QACZ,MAAM;QACN,SAAS;QACT,SAAS;QACT,UAAU;YACR;SACD;QACD,eAAe;IACjB;CACD,CAAA;AAED;;;CAGC,GACD,OA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D,CAAA;AAED;;;CAGC,GACD,OAAO,MAAMC,gCAAkD,CAAC,EAAC;AAEjE;;;CAGC,GACD,OAAO,MAAMC,oCAA2E;IACtF;QACE,YAAY;QACZ,MAAM;QACN,SAAS;QACT,WAAW;YACT;YACA;YACA;SACD;QACD,gBAAgB;YACd;YACA;YACA;YACA;SACD;QACD,kBAAkB;QAClB,gBAAgB;QAChB,cAAc;QACd,eAAe;YACb;gBACE,SAAS;gBACT,UAAU;gBACV,MAAM;gBACN,OAAO;YACT;YACA;gBACE,SAAS;gBACT,SAAS;YACX;YACA;gBACE,SAAS;gBACT,UAAU;gBACV,MAAM;YACR;YACA;gBACE,SAAS;gBACT,UAAU;gBACV,MAAM;YACR;YACA;gBACE,SAAS;gBACT,UAAU;gBACV,MAAM;YACR;SACD;IACH;CACD,CAAA;AAED;;;CAGC,GACD,OAAO,MAAMC,0CAAsF;IACjG;QACE,YAAY;QACZ,MAAM;QACN,SAAS;QACT,eAAe;QACf,YAAY;YACV,WAAW;YACX,SAAS;QACX;IACF;CACD,CAAA;AAED;;;;CAIC,GACD,OAAO,MAAMC,uCAAiF;IAC5F;QACE,YAAY;QACZ,OAAO;QACP,SAAS;QACT,eAAe;IACjB;CACD,CAAA"}
|
|
@@ -85,6 +85,13 @@ export interface PluginActivityRegistration {
|
|
|
85
85
|
pluginId: string;
|
|
86
86
|
group: PluginActivityGroup;
|
|
87
87
|
actions: readonly PluginActivityAction[];
|
|
88
|
+
/**
|
|
89
|
+
* Target types the plugin's rows are filed under that are NOT namespaced,
|
|
90
|
+
* with the noun a reader sees for each (AGL-3080): rows written before
|
|
91
|
+
* `pluginId:noun` existed, whose stored type cannot change. A namespaced
|
|
92
|
+
* type needs no entry — the feed reads its noun off the type itself.
|
|
93
|
+
*/
|
|
94
|
+
targetTypes?: Readonly<Record<string, string>>;
|
|
88
95
|
}
|
|
89
96
|
/**
|
|
90
97
|
* The most codes one group may hold. A group's chip asks `action is any of`
|
|
@@ -100,6 +107,11 @@ export declare const PLUGIN_ACTIVITY_GROUP_MAX_ACTIONS = 30;
|
|
|
100
107
|
* too, since its chip could never be applied.
|
|
101
108
|
*/
|
|
102
109
|
export declare function registerPluginActivityActions(registration: PluginActivityRegistration): void;
|
|
110
|
+
/**
|
|
111
|
+
* The noun a plugin declared for one of its un-namespaced target types, or
|
|
112
|
+
* `undefined` when no plugin declared the type.
|
|
113
|
+
*/
|
|
114
|
+
export declare function pluginActivityTargetLabel(type: unknown): string | undefined;
|
|
103
115
|
/** Every registration, in registration order. */
|
|
104
116
|
export declare function listPluginActivityRegistrations(): PluginActivityRegistration[];
|
|
105
117
|
/** Every declared action across plugins. */
|
|
@@ -53,6 +53,7 @@ const registrations = new Map();
|
|
|
53
53
|
* group of more than `PLUGIN_ACTIVITY_GROUP_MAX_ACTIONS` codes is refused
|
|
54
54
|
* too, since its chip could never be applied.
|
|
55
55
|
*/ export function registerPluginActivityActions(registration) {
|
|
56
|
+
var _registration_targetTypes;
|
|
56
57
|
const pluginId = registration.pluginId.trim();
|
|
57
58
|
if (!pluginId) throw new Error('plugin activity actions need a pluginId');
|
|
58
59
|
if (registration.actions.length > PLUGIN_ACTIVITY_GROUP_MAX_ACTIONS) {
|
|
@@ -64,8 +65,32 @@ const registrations = new Map();
|
|
|
64
65
|
throw new Error(`activity action "${action.key}" is already declared by "${owner}"; ` + `refused "${pluginId}"`);
|
|
65
66
|
}
|
|
66
67
|
}
|
|
68
|
+
for (const type of Object.keys((_registration_targetTypes = registration.targetTypes) != null ? _registration_targetTypes : {})){
|
|
69
|
+
var _find;
|
|
70
|
+
const owner = (_find = [
|
|
71
|
+
...registrations.values()
|
|
72
|
+
].find((entry)=>{
|
|
73
|
+
var _entry_targetTypes;
|
|
74
|
+
return entry.pluginId !== pluginId && ((_entry_targetTypes = entry.targetTypes) == null ? void 0 : _entry_targetTypes[type]) !== undefined;
|
|
75
|
+
})) == null ? void 0 : _find.pluginId;
|
|
76
|
+
if (owner) {
|
|
77
|
+
throw new Error(`activity target type "${type}" is already declared by "${owner}"; ` + `refused "${pluginId}"`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
67
80
|
registrations.set(pluginId, registration);
|
|
68
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* The noun a plugin declared for one of its un-namespaced target types, or
|
|
84
|
+
* `undefined` when no plugin declared the type.
|
|
85
|
+
*/ export function pluginActivityTargetLabel(type) {
|
|
86
|
+
if (typeof type !== 'string') return undefined;
|
|
87
|
+
for (const registration of registrations.values()){
|
|
88
|
+
var _registration_targetTypes;
|
|
89
|
+
const label = (_registration_targetTypes = registration.targetTypes) == null ? void 0 : _registration_targetTypes[type];
|
|
90
|
+
if (label) return label;
|
|
91
|
+
}
|
|
92
|
+
return undefined;
|
|
93
|
+
}
|
|
69
94
|
function ownerOfActivityAction(key) {
|
|
70
95
|
for (const registration of registrations.values()){
|
|
71
96
|
if (registration.actions.some((action)=>action.key === key)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-activity-actions.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\n/**\n * Plugin-declared activity actions (AGL-2940).\n *\n * Most rows in `orgs/{orgId}/activity` and `hosts/{hostId}/activity` store\n * a prose action written at the call site. A plugin whose rows are read by\n * more than a person — a filter chip, a staff facet, an actor table — stores\n * a CODE (`ai.job.output`) and declares here what the code means: the label\n * a reader sees, the scope it is written at, and the group its filter chip\n * belongs to. The activity renderers read this catalog for labels and\n * filters, so a second plugin with coded rows gets a chip and a facet group\n * by registering, with no edit to the renderers.\n *\n * Declared at module scope from both the client barrel and the `/server`\n * entry (the AGL-428 pattern), with an explicit `pluginId`: module scope\n * runs before the loader's ownership marker is set.\n */\n\nexport type PluginActivityScope = 'org' | 'host' | 'staff'\n\n/**\n * A resource a PLUGIN files an org activity row under (AGL-2978): the\n * plugin's id, a colon and the plugin's own noun — `acme-mail:mailbox`.\n *\n * Core's activity targets are a closed list of core's own resources. A\n * plugin's resource is not one of them and is never added to that list; the\n * org log's target type accepts any namespaced type instead, and the feed\n * reads the noun after the colon for a reader. The namespace keeps two\n * plugins' nouns from meaning one thing.\n */\nexport type PluginActivityTargetType = `${string}:${string}`\n\n/** A namespaced type as the log stores it: `pluginId:noun`, both parts plain. */\nconst PLUGIN_TARGET_TYPE = /^([a-z][a-z0-9-]*):([A-Za-z][A-Za-z0-9]*)$/\n\n/** Whether a stored target type is a plugin's namespaced one. */\nexport function isPluginActivityTargetType(type: unknown): type is PluginActivityTargetType {\n return typeof type === 'string' && PLUGIN_TARGET_TYPE.test(type)\n}\n\n/**\n * The noun a plugin's namespaced type names — `acme-mail:mailbox` →\n * `mailbox` — or `undefined` for any other type.\n */\nexport function pluginActivityTargetNoun(type: unknown): string | undefined {\n if (typeof type !== 'string') return undefined\n return PLUGIN_TARGET_TYPE.exec(type)?.[2]\n}\n\nexport interface PluginActivityAction {\n /** The stored action code — dotted, stable, never a sentence. */\n key: string\n /** What a person reads for the code in the feed and the actor table. */\n label: string\n /** Which log(s) the writers put the code in. */\n scope: PluginActivityScope | readonly PluginActivityScope[]\n /** The feed target types rows carrying this code file their output under. */\n resourceTypes?: readonly string[]\n}\n\n/**\n * The filter a plugin's coded rows share: one chip in the org feed and the\n * actor table, one facet group on the staff audit page.\n */\nexport interface PluginActivityGroup {\n /** Stable group id — the facet's value (`ai`). */\n id: string\n /** The chip and the facet option (`AI`). */\n label: string\n /**\n * Staff audit actions that belong to the group without carrying one of the\n * registered codes — rows written by core on the plugin's behalf, matched\n * by prefix (`billing.assistOverage.`).\n */\n staffAuditPrefixes?: readonly string[]\n /**\n * Staff audit actions a plugin's staff doors write when staff READ\n * something rather than change it (AGL-2939): the audit log files them as\n * an access. Matched exactly.\n */\n staffAuditAccessActions?: readonly string[]\n}\n\nexport interface PluginActivityRegistration {\n pluginId: string\n group: PluginActivityGroup\n actions: readonly PluginActivityAction[]\n}\n\nconst registrations = new Map<string, PluginActivityRegistration>()\n\n/**\n * The most codes one group may hold. A group's chip asks `action is any of`\n * its codes, which the feeds' queries serve as one Firestore `in` — capped at\n * thirty values — so a larger group would be a chip the list always refuses.\n */\nexport const PLUGIN_ACTIVITY_GROUP_MAX_ACTIONS = 30\n\n/**\n * Idempotent per plugin — re-registration replaces that plugin's catalog. A\n * code already declared by a DIFFERENT plugin is refused for the whole\n * registration: two owners for one code would give the row two labels. A\n * group of more than `PLUGIN_ACTIVITY_GROUP_MAX_ACTIONS` codes is refused\n * too, since its chip could never be applied.\n */\nexport function registerPluginActivityActions(\n registration: PluginActivityRegistration,\n): void {\n const pluginId = registration.pluginId.trim()\n if (!pluginId) throw new Error('plugin activity actions need a pluginId')\n if (registration.actions.length > PLUGIN_ACTIVITY_GROUP_MAX_ACTIONS) {\n throw new Error(\n `activity group \"${registration.group.id}\" declares ` +\n `${registration.actions.length} actions; its filter chip can ask for at most ` +\n `${PLUGIN_ACTIVITY_GROUP_MAX_ACTIONS}, refused \"${pluginId}\"`,\n )\n }\n for (const action of registration.actions) {\n const owner = ownerOfActivityAction(action.key)\n if (owner && owner !== pluginId) {\n throw new Error(\n `activity action \"${action.key}\" is already declared by \"${owner}\"; ` +\n `refused \"${pluginId}\"`,\n )\n }\n }\n registrations.set(pluginId, registration)\n}\n\nfunction ownerOfActivityAction(key: string): string | undefined {\n for (const registration of registrations.values()) {\n if (registration.actions.some((action) => action.key === key)) {\n return registration.pluginId\n }\n }\n return undefined\n}\n\n/** Every registration, in registration order. */\nexport function listPluginActivityRegistrations(): PluginActivityRegistration[] {\n return [...registrations.values()]\n}\n\n/** Every declared action across plugins. */\nexport function listPluginActivityActions(): PluginActivityAction[] {\n return listPluginActivityRegistrations().flatMap((entry) => [...entry.actions])\n}\n\n/** The readable label for a declared code; `undefined` for any other action. */\nexport function pluginActivityActionLabel(action: unknown): string | undefined {\n if (typeof action !== 'string') return undefined\n for (const registration of registrations.values()) {\n const match = registration.actions.find((entry) => entry.key === action)\n if (match) return match.label\n }\n return undefined\n}\n\n/** The group a stored action's code belongs to, or `undefined`. */\nexport function pluginActivityGroupForAction(\n action: unknown,\n): PluginActivityGroup | undefined {\n if (typeof action !== 'string') return undefined\n for (const registration of registrations.values()) {\n if (registration.actions.some((entry) => entry.key === action)) {\n return registration.group\n }\n }\n return undefined\n}\n\n/**\n * The filter chips the feeds offer: one per registered group, each with the\n * codes its chip keeps. What an `action isAnyOf …` request sends.\n */\nexport function listPluginActivityFilters(): Array<{\n group: PluginActivityGroup\n actions: string[]\n}> {\n return listPluginActivityRegistrations().map((entry) => ({\n group: entry.group,\n actions: entry.actions.map((action) => action.key),\n }))\n}\n\n/**\n * The staff audit facet group for an action: a registered group when the\n * action is one of its codes or starts with one of its prefixes, else the\n * action's leading namespace (`billing`, `org`, `plugins`).\n */\nexport function pluginStaffAuditActionGroup(action: unknown): string {\n const text = typeof action === 'string' ? action.trim() : ''\n if (!text) return ''\n const byCode = pluginActivityGroupForAction(text)\n if (byCode) return byCode.id\n for (const registration of registrations.values()) {\n const prefixes = registration.group.staffAuditPrefixes ?? []\n if (prefixes.some((prefix) => text.startsWith(prefix))) {\n return registration.group.id\n }\n }\n const dot = text.indexOf('.')\n return dot > 0 ? text.slice(0, dot) : text\n}\n\n/** Whether a staff audit action is a read some plugin declared (AGL-2939). */\nexport function isPluginStaffAuditAccess(action: unknown): boolean {\n if (typeof action !== 'string' || !action) return false\n for (const registration of registrations.values()) {\n if (registration.group.staffAuditAccessActions?.includes(action)) return true\n }\n return false\n}\n\n/** How a facet group reads in the menu: a registered label, else the id. */\nexport function pluginStaffAuditActionGroupLabel(group: string): string {\n for (const registration of registrations.values()) {\n if (registration.group.id === group) return registration.group.label\n }\n return group\n}\n\n/** Test seam: forget every registration. */\nexport function resetPluginActivityActionsForTests(): void {\n registrations.clear()\n}\n"],"names":["PLUGIN_TARGET_TYPE","isPluginActivityTargetType","type","test","pluginActivityTargetNoun","undefined","exec","registrations","Map","PLUGIN_ACTIVITY_GROUP_MAX_ACTIONS","registerPluginActivityActions","registration","pluginId","trim","Error","actions","length","group","id","action","owner","ownerOfActivityAction","key","set","values","some","listPluginActivityRegistrations","listPluginActivityActions","flatMap","entry","pluginActivityActionLabel","match","find","label","pluginActivityGroupForAction","listPluginActivityFilters","map","pluginStaffAuditActionGroup","text","byCode","prefixes","staffAuditPrefixes","prefix","startsWith","dot","indexOf","slice","isPluginStaffAuditAccess","staffAuditAccessActions","includes","pluginStaffAuditActionGroupLabel","resetPluginActivityActionsForTests","clear"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;;;CAeC,GAgBD,+EAA+E,GAC/E,MAAMA,qBAAqB;AAE3B,+DAA+D,GAC/D,OAAO,SAASC,2BAA2BC,IAAa;IACtD,OAAO,OAAOA,SAAS,YAAYF,mBAAmBG,IAAI,CAACD;AAC7D;AAEA;;;CAGC,GACD,OAAO,SAASE,yBAAyBF,IAAa;QAE7CF;IADP,IAAI,OAAOE,SAAS,UAAU,OAAOG;IACrC,QAAOL,2BAAAA,mBAAmBM,IAAI,CAACJ,0BAAxBF,wBAA+B,CAAC,EAAE;AAC3C;AA0CA,MAAMO,gBAAgB,IAAIC;AAE1B;;;;CAIC,GACD,OAAO,MAAMC,oCAAoC,GAAE;AAEnD;;;;;;CAMC,GACD,OAAO,SAASC,8BACdC,YAAwC;IAExC,MAAMC,WAAWD,aAAaC,QAAQ,CAACC,IAAI;IAC3C,IAAI,CAACD,UAAU,MAAM,IAAIE,MAAM;IAC/B,IAAIH,aAAaI,OAAO,CAACC,MAAM,GAAGP,mCAAmC;QACnE,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8CAAAA,aAAaM,KAAK,CAAC+B,uBAAuB,qBAA1CrC,4CAA4CsC,QAAQ,CAAC9B,SAAS,OAAO;IAC3E;IACA,OAAO;AACT;AAEA,0EAA0E,GAC1E,OAAO,SAAS+B,iCAAiCjC,KAAa;IAC5D,KAAK,MAAMN,gBAAgBJ,cAAciB,MAAM,GAAI;QACjD,IAAIb,aAAaM,KAAK,CAACC,EAAE,KAAKD,OAAO,OAAON,aAAaM,KAAK,CAACgB,KAAK;IACtE;IACA,OAAOhB;AACT;AAEA,0CAA0C,GAC1C,OAAO,SAASkC;IACd5C,cAAc6C,KAAK;AACrB"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-activity-actions.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\n/**\n * Plugin-declared activity actions (AGL-2940).\n *\n * Most rows in `orgs/{orgId}/activity` and `hosts/{hostId}/activity` store\n * a prose action written at the call site. A plugin whose rows are read by\n * more than a person — a filter chip, a staff facet, an actor table — stores\n * a CODE (`ai.job.output`) and declares here what the code means: the label\n * a reader sees, the scope it is written at, and the group its filter chip\n * belongs to. The activity renderers read this catalog for labels and\n * filters, so a second plugin with coded rows gets a chip and a facet group\n * by registering, with no edit to the renderers.\n *\n * Declared at module scope from both the client barrel and the `/server`\n * entry (the AGL-428 pattern), with an explicit `pluginId`: module scope\n * runs before the loader's ownership marker is set.\n */\n\nexport type PluginActivityScope = 'org' | 'host' | 'staff'\n\n/**\n * A resource a PLUGIN files an org activity row under (AGL-2978): the\n * plugin's id, a colon and the plugin's own noun — `acme-mail:mailbox`.\n *\n * Core's activity targets are a closed list of core's own resources. A\n * plugin's resource is not one of them and is never added to that list; the\n * org log's target type accepts any namespaced type instead, and the feed\n * reads the noun after the colon for a reader. The namespace keeps two\n * plugins' nouns from meaning one thing.\n */\nexport type PluginActivityTargetType = `${string}:${string}`\n\n/** A namespaced type as the log stores it: `pluginId:noun`, both parts plain. */\nconst PLUGIN_TARGET_TYPE = /^([a-z][a-z0-9-]*):([A-Za-z][A-Za-z0-9]*)$/\n\n/** Whether a stored target type is a plugin's namespaced one. */\nexport function isPluginActivityTargetType(type: unknown): type is PluginActivityTargetType {\n return typeof type === 'string' && PLUGIN_TARGET_TYPE.test(type)\n}\n\n/**\n * The noun a plugin's namespaced type names — `acme-mail:mailbox` →\n * `mailbox` — or `undefined` for any other type.\n */\nexport function pluginActivityTargetNoun(type: unknown): string | undefined {\n if (typeof type !== 'string') return undefined\n return PLUGIN_TARGET_TYPE.exec(type)?.[2]\n}\n\nexport interface PluginActivityAction {\n /** The stored action code — dotted, stable, never a sentence. */\n key: string\n /** What a person reads for the code in the feed and the actor table. */\n label: string\n /** Which log(s) the writers put the code in. */\n scope: PluginActivityScope | readonly PluginActivityScope[]\n /** The feed target types rows carrying this code file their output under. */\n resourceTypes?: readonly string[]\n}\n\n/**\n * The filter a plugin's coded rows share: one chip in the org feed and the\n * actor table, one facet group on the staff audit page.\n */\nexport interface PluginActivityGroup {\n /** Stable group id — the facet's value (`ai`). */\n id: string\n /** The chip and the facet option (`AI`). */\n label: string\n /**\n * Staff audit actions that belong to the group without carrying one of the\n * registered codes — rows written by core on the plugin's behalf, matched\n * by prefix (`billing.assistOverage.`).\n */\n staffAuditPrefixes?: readonly string[]\n /**\n * Staff audit actions a plugin's staff doors write when staff READ\n * something rather than change it (AGL-2939): the audit log files them as\n * an access. Matched exactly.\n */\n staffAuditAccessActions?: readonly string[]\n}\n\nexport interface PluginActivityRegistration {\n pluginId: string\n group: PluginActivityGroup\n actions: readonly PluginActivityAction[]\n /**\n * Target types the plugin's rows are filed under that are NOT namespaced,\n * with the noun a reader sees for each (AGL-3080): rows written before\n * `pluginId:noun` existed, whose stored type cannot change. A namespaced\n * type needs no entry — the feed reads its noun off the type itself.\n */\n targetTypes?: Readonly<Record<string, string>>\n}\n\nconst registrations = new Map<string, PluginActivityRegistration>()\n\n/**\n * The most codes one group may hold. A group's chip asks `action is any of`\n * its codes, which the feeds' queries serve as one Firestore `in` — capped at\n * thirty values — so a larger group would be a chip the list always refuses.\n */\nexport const PLUGIN_ACTIVITY_GROUP_MAX_ACTIONS = 30\n\n/**\n * Idempotent per plugin — re-registration replaces that plugin's catalog. A\n * code already declared by a DIFFERENT plugin is refused for the whole\n * registration: two owners for one code would give the row two labels. A\n * group of more than `PLUGIN_ACTIVITY_GROUP_MAX_ACTIONS` codes is refused\n * too, since its chip could never be applied.\n */\nexport function registerPluginActivityActions(\n registration: PluginActivityRegistration,\n): void {\n const pluginId = registration.pluginId.trim()\n if (!pluginId) throw new Error('plugin activity actions need a pluginId')\n if (registration.actions.length > PLUGIN_ACTIVITY_GROUP_MAX_ACTIONS) {\n throw new Error(\n `activity group \"${registration.group.id}\" declares ` +\n `${registration.actions.length} actions; its filter chip can ask for at most ` +\n `${PLUGIN_ACTIVITY_GROUP_MAX_ACTIONS}, refused \"${pluginId}\"`,\n )\n }\n for (const action of registration.actions) {\n const owner = ownerOfActivityAction(action.key)\n if (owner && owner !== pluginId) {\n throw new Error(\n `activity action \"${action.key}\" is already declared by \"${owner}\"; ` +\n `refused \"${pluginId}\"`,\n )\n }\n }\n for (const type of Object.keys(registration.targetTypes ?? {})) {\n const owner = [...registrations.values()].find(\n (entry) => entry.pluginId !== pluginId && entry.targetTypes?.[type] !== undefined,\n )?.pluginId\n if (owner) {\n throw new Error(\n `activity target type \"${type}\" is already declared by \"${owner}\"; ` +\n `refused \"${pluginId}\"`,\n )\n }\n }\n registrations.set(pluginId, registration)\n}\n\n/**\n * The noun a plugin declared for one of its un-namespaced target types, or\n * `undefined` when no plugin declared the type.\n */\nexport function pluginActivityTargetLabel(type: unknown): string | undefined {\n if (typeof type !== 'string') return undefined\n for (const registration of registrations.values()) {\n const label = registration.targetTypes?.[type]\n if (label) return label\n }\n return undefined\n}\n\nfunction ownerOfActivityAction(key: string): string | undefined {\n for (const registration of registrations.values()) {\n if (registration.actions.some((action) => action.key === key)) {\n return registration.pluginId\n }\n }\n return undefined\n}\n\n/** Every registration, in registration order. */\nexport function listPluginActivityRegistrations(): PluginActivityRegistration[] {\n return [...registrations.values()]\n}\n\n/** Every declared action across plugins. */\nexport function listPluginActivityActions(): PluginActivityAction[] {\n return listPluginActivityRegistrations().flatMap((entry) => [...entry.actions])\n}\n\n/** The readable label for a declared code; `undefined` for any other action. */\nexport function pluginActivityActionLabel(action: unknown): string | undefined {\n if (typeof action !== 'string') return undefined\n for (const registration of registrations.values()) {\n const match = registration.actions.find((entry) => entry.key === action)\n if (match) return match.label\n }\n return undefined\n}\n\n/** The group a stored action's code belongs to, or `undefined`. */\nexport function pluginActivityGroupForAction(\n action: unknown,\n): PluginActivityGroup | undefined {\n if (typeof action !== 'string') return undefined\n for (const registration of registrations.values()) {\n if (registration.actions.some((entry) => entry.key === action)) {\n return registration.group\n }\n }\n return undefined\n}\n\n/**\n * The filter chips the feeds offer: one per registered group, each with the\n * codes its chip keeps. What an `action isAnyOf …` request sends.\n */\nexport function listPluginActivityFilters(): Array<{\n group: PluginActivityGroup\n actions: string[]\n}> {\n return listPluginActivityRegistrations().map((entry) => ({\n group: entry.group,\n actions: entry.actions.map((action) => action.key),\n }))\n}\n\n/**\n * The staff audit facet group for an action: a registered group when the\n * action is one of its codes or starts with one of its prefixes, else the\n * action's leading namespace (`billing`, `org`, `plugins`).\n */\nexport function pluginStaffAuditActionGroup(action: unknown): string {\n const text = typeof action === 'string' ? action.trim() : ''\n if (!text) return ''\n const byCode = pluginActivityGroupForAction(text)\n if (byCode) return byCode.id\n for (const registration of registrations.values()) {\n const prefixes = registration.group.staffAuditPrefixes ?? []\n if (prefixes.some((prefix) => text.startsWith(prefix))) {\n return registration.group.id\n }\n }\n const dot = text.indexOf('.')\n return dot > 0 ? text.slice(0, dot) : text\n}\n\n/** Whether a staff audit action is a read some plugin declared (AGL-2939). */\nexport function isPluginStaffAuditAccess(action: unknown): boolean {\n if (typeof action !== 'string' || !action) return false\n for (const registration of registrations.values()) {\n if (registration.group.staffAuditAccessActions?.includes(action)) return true\n }\n return false\n}\n\n/** How a facet group reads in the menu: a registered label, else the id. */\nexport function pluginStaffAuditActionGroupLabel(group: string): string {\n for (const registration of registrations.values()) {\n if (registration.group.id === group) return registration.group.label\n }\n return group\n}\n\n/** Test seam: forget every registration. */\nexport function resetPluginActivityActionsForTests(): void {\n registrations.clear()\n}\n"],"names":["PLUGIN_TARGET_TYPE","isPluginActivityTargetType","type","test","pluginActivityTargetNoun","undefined","exec","registrations","Map","PLUGIN_ACTIVITY_GROUP_MAX_ACTIONS","registerPluginActivityActions","registration","pluginId","trim","Error","actions","length","group","id","action","owner","ownerOfActivityAction","key","Object","keys","targetTypes","values","find","entry","set","pluginActivityTargetLabel","label","some","listPluginActivityRegistrations","listPluginActivityActions","flatMap","pluginActivityActionLabel","match","pluginActivityGroupForAction","listPluginActivityFilters","map","pluginStaffAuditActionGroup","text","byCode","prefixes","staffAuditPrefixes","prefix","startsWith","dot","indexOf","slice","isPluginStaffAuditAccess","staffAuditAccessActions","includes","pluginStaffAuditActionGroupLabel","resetPluginActivityActionsForTests","clear"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;;;CAeC,GAgBD,+EAA+E,GAC/E,MAAMA,qBAAqB;AAE3B,+DAA+D,GAC/D,OAAO,SAASC,2BAA2BC,IAAa;IACtD,OAAO,OAAOA,SAAS,YAAYF,mBAAmBG,IAAI,CAACD;AAC7D;AAEA;;;CAGC,GACD,OAAO,SAASE,yBAAyBF,IAAa;QAE7CF;IADP,IAAI,OAAOE,SAAS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AAClC,SAAS,OAAO;IAC3E;IACA,OAAO;AACT;AAEA,0EAA0E,GAC1E,OAAO,SAASmC,iCAAiCrC,KAAa;IAC5D,KAAK,MAAMN,gBAAgBJ,cAAcmB,MAAM,GAAI;QACjD,IAAIf,aAAaM,KAAK,CAACC,EAAE,KAAKD,OAAO,OAAON,aAAaM,KAAK,CAACc,KAAK;IACtE;IACA,OAAOd;AACT;AAEA,0CAA0C,GAC1C,OAAO,SAASsC;IACdhD,cAAciD,KAAK;AACrB"}
|
|
@@ -83,7 +83,7 @@ export interface PluginSiteContributions {
|
|
|
83
83
|
export interface PluginConsoleContributions {
|
|
84
84
|
/**
|
|
85
85
|
* The widget slots its widgets fill: the `CONSOLE_WIDGET_SLOTS` zones, the
|
|
86
|
-
* panels the shell draws as slots (the
|
|
86
|
+
* panels the shell draws as slots (the console dock `consoleDock`, the
|
|
87
87
|
* besigner's `besignerInspector`), and zones another plugin hosts. A screen
|
|
88
88
|
* that renders one of them loads the plugin.
|
|
89
89
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-contributions.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\n/**\n * What a plugin contributes, and where (AGL-3116).\n *\n * A plugin loads only where something uses it. Installing one loads nothing:\n * a published page fetches a plugin's code when the page places one of its\n * elements or the site runs one of its features, and a console screen\n * fetches it when the screen renders one of its slots or routes, or when the\n * plugin draws something the shell renders on every screen.\n *\n * The loaders cannot learn that by running a plugin, because running it is\n * the cost being avoided. So each plugin DECLARES its contributions:\n * first-party plugins in `plugins.config.json`, marketplace plugins in the\n * manifest they publish (`contributes`). The declaration is the whole of what\n * a loader reads, and it is data: this module is dependency-free so the\n * server, both apps, the verifier and the build tools share one reading.\n *\n * A declared surface only narrows where to look. Presence is the rule: a\n * plugin that declares a component loads on the pages that place it, not on\n * every page of the site that installed it.\n *\n * ## A plugin that declares nothing\n *\n * Every marketplace version published before this contract has no\n * `contributes`. Such a plugin keeps working under one default:\n *\n * - **On a published page it loads only where its element is placed**: a\n * node whose `pluginId` names the plugin (its manifest id or its listing\n * id). That is the one presence signal a page carries without running the\n * bundle, and it is the only way a page can show an element the plugin\n * registers. A site runtime of an undeclared plugin does not load, and the\n * publish pipeline refuses a bundle that registers one without declaring\n * it, so the only plugins this default governs are the ones already\n * published.\n * - **In the console it loads with the workspace shell**, as it always did,\n * because a nav tab or a provider is only discoverable by running\n * `register()`. Nothing on a published page depends on this.\n */\n\n/** What a plugin adds to a published site. */\nexport interface PluginSiteContributions {\n /**\n * Canvas component ids the plugin registers: the elements a page places. A\n * published page loads the plugin only when its node tree places one.\n */\n components?: string[]\n /**\n * Site features: runtimes the plugin mounts on every page of a site that\n * switched it on (an announcement bar, an experiment runner), named by the\n * `runtimeId` it registers. A plugin with a feature loads on every page of\n * such a site, which is what a feature is.\n */\n features?: string[]\n /**\n * The elements that run a site function in the visitor's browser (AGL-3393),\n * each keyed by its component id and naming the prop that holds the\n * function's name. Compose hands such a node the function's definition and\n * the site variables it reads; no other node is given either.\n *\n * Declared DATA rather than read off a registered schema: compose runs where\n * no plugin code loads — the tenant's server components — so the only thing\n * it can consult is a declaration. A first-party plugin declares it in\n * `plugins.config.json`, a marketplace plugin in its manifest, and both reach\n * compose as the same map. Every key must also be one of `components`.\n */\n functionBindings?: Record<string, string>\n}\n\n/** What a plugin adds to the console. */\nexport interface PluginConsoleContributions {\n /**\n * The widget slots its widgets fill: the `CONSOLE_WIDGET_SLOTS` zones, the\n * panels the shell draws as slots (the assistant dock `assistPanel`, the\n * besigner's `besignerInspector`), and zones another plugin hosts. A screen\n * that renders one of them loads the plugin.\n */\n slots?: string[]\n /** Site-level console routes it serves (`/forms`), beneath `/hosts/[host]`. */\n routes?: string[]\n /** Organization-level console routes it serves (`/outreach`). */\n orgRoutes?: string[]\n /**\n * The shell draws something of it on every screen of a workspace: a nav\n * tab, an organization tab, a staff tab or a provider. Such a plugin loads\n * with the shell, because every screen renders it.\n */\n shell?: boolean\n}\n\nexport interface PluginContributions {\n site?: PluginSiteContributions\n console?: PluginConsoleContributions\n}\n\n/** Bound on each declared list, so a manifest cannot hand a loader a novel. */\nexport const PLUGIN_MAX_CONTRIBUTIONS = 128\n\n/**\n * A component, feature or slot id: an identifier with the separators ids in\n * the platform use (`muiTypography`, `marketplacePlugin`, `ai.assist`).\n */\nconst CONTRIBUTION_ID = /^[A-Za-z_][A-Za-z0-9_.:-]{0,79}$/\n\n/**\n * A console route: one or more path segments, as a nav item's `href` names\n * them. Never a URL, never `..`.\n */\nconst CONTRIBUTION_ROUTE = /^(\\/[A-Za-z0-9_-]+){1,8}$/\n\n/** A prop name a function binding may name: a plain identifier. */\nconst BINDING_PROP = /^[A-Za-z_$][A-Za-z0-9_$]{0,63}$/\n\ntype Sanitized =\n | { ok: true; contributions: PluginContributions }\n | { ok: false; error: string }\n\n/**\n * Validates a declared `contributes` block.\n *\n * Malformed input is REFUSED rather than trimmed: a loader reads this to\n * decide where a plugin runs, so a declaration that silently lost an entry\n * would stop the plugin loading where it is used, and nobody would see why.\n * Duplicates are collapsed and empty lists dropped, because neither changes\n * what the declaration means.\n *\n * `{}` is valid and means \"contributes nothing anywhere\", which is a\n * different statement from an absent block (see the module note).\n */\nexport function sanitizePluginContributions(input: unknown): Sanitized {\n if (!isPlainObject(input)) {\n return { ok: false, error: 'contributes must be an object' }\n }\n const out: PluginContributions = {}\n for (const key of Object.keys(input)) {\n if (key !== 'site' && key !== 'console') {\n return { ok: false, error: `contributes.${key} is not a known surface` }\n }\n }\n\n if (input['site'] !== undefined) {\n const site = input['site']\n if (!isPlainObject(site)) {\n return { ok: false, error: 'contributes.site must be an object' }\n }\n const next: PluginSiteContributions = {}\n for (const key of Object.keys(site)) {\n if (key === 'functionBindings') continue\n if (key !== 'components' && key !== 'features') {\n return { ok: false, error: `contributes.site.${key} is not a known contribution` }\n }\n const list = idList(site[key], `contributes.site.${key}`, CONTRIBUTION_ID)\n if (list.ok === false) return { ok: false, error: list.error }\n if (list.values.length) next[key] = list.values\n }\n if (site['functionBindings'] !== undefined) {\n const bindings = functionBindingMap(\n site['functionBindings'],\n next.components ?? [],\n )\n if (bindings.ok === false) return { ok: false, error: bindings.error }\n if (Object.keys(bindings.value).length) {\n next.functionBindings = bindings.value\n }\n }\n if (Object.keys(next).length) out.site = next\n }\n\n if (input['console'] !== undefined) {\n const consoleInput = input['console']\n if (!isPlainObject(consoleInput)) {\n return { ok: false, error: 'contributes.console must be an object' }\n }\n const next: PluginConsoleContributions = {}\n for (const key of Object.keys(consoleInput)) {\n if (key === 'shell') {\n if (typeof consoleInput['shell'] !== 'boolean') {\n return { ok: false, error: 'contributes.console.shell must be true or false' }\n }\n if (consoleInput['shell']) next.shell = true\n continue\n }\n if (key !== 'slots' && key !== 'routes' && key !== 'orgRoutes') {\n return {\n ok: false,\n error: `contributes.console.${key} is not a known contribution`,\n }\n }\n const list = idList(\n consoleInput[key],\n `contributes.console.${key}`,\n key === 'slots' ? CONTRIBUTION_ID : CONTRIBUTION_ROUTE,\n )\n if (list.ok === false) return { ok: false, error: list.error }\n if (list.values.length) next[key] = list.values\n }\n if (Object.keys(next).length) out.console = next\n }\n\n return { ok: true, contributions: out }\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === 'object' && !Array.isArray(value)\n}\n\nfunction idList(\n value: unknown,\n where: string,\n pattern: RegExp,\n): { ok: true; values: string[] } | { ok: false; error: string } {\n if (!Array.isArray(value)) return { ok: false, error: `${where} must be a list` }\n if (value.length > PLUGIN_MAX_CONTRIBUTIONS) {\n return { ok: false, error: `${where} lists more than ${PLUGIN_MAX_CONTRIBUTIONS}` }\n }\n const values: string[] = []\n for (const entry of value) {\n if (typeof entry !== 'string' || !pattern.test(entry)) {\n return { ok: false, error: `${where} has an invalid entry \"${String(entry)}\"` }\n }\n if (!values.includes(entry)) values.push(entry)\n }\n return { ok: true, values }\n}\n\n/**\n * `contributes.site.functionBindings`, validated against the components the\n * same block declares: a binding on an element the plugin does not register\n * would hand a function's definition, and the variable values it reads, to\n * whichever element happens to own that id.\n */\nfunction functionBindingMap(\n value: unknown,\n components: readonly string[],\n): { ok: true; value: Record<string, string> } | { ok: false; error: string } {\n const where = 'contributes.site.functionBindings'\n if (!isPlainObject(value)) {\n return { ok: false, error: `${where} must be an object` }\n }\n const entries = Object.entries(value)\n if (entries.length > PLUGIN_MAX_CONTRIBUTIONS) {\n return { ok: false, error: `${where} lists more than ${PLUGIN_MAX_CONTRIBUTIONS}` }\n }\n const out: Record<string, string> = {}\n for (const [componentId, prop] of entries) {\n if (!components.includes(componentId)) {\n return {\n ok: false,\n error: `${where} names \"${componentId}\", which contributes.site.components does not declare`,\n }\n }\n if (typeof prop !== 'string' || !BINDING_PROP.test(prop)) {\n return {\n ok: false,\n error: `${where}.${componentId} must name a prop, not \"${String(prop)}\"`,\n }\n }\n out[componentId] = prop\n }\n return { ok: true, value: out }\n}\n\n/**\n * A declared `contributes` block as a loader may trust it: the sanitized\n * block, or `undefined` for one that is absent or does not validate.\n *\n * Loaders read this from stored documents (a pinned version's manifest), and\n * a malformed stored block is treated as UNDECLARED — the default applies —\n * never as \"contributes nothing\", which would stop a plugin that is in use.\n */\nexport function readPluginContributions(\n input: unknown,\n): PluginContributions | undefined {\n if (input === undefined || input === null) return undefined\n const verdict = sanitizePluginContributions(input)\n return verdict.ok ? verdict.contributions : undefined\n}\n\n/**\n * What the surface a plugin is being registered into actually uses\n * (AGL-3141).\n *\n * The loaders carry this from the surface that computed it to each plugin's\n * register function, unchanged. A plugin that can register a part of itself\n * reads it; one that cannot ignores it, and the platform's behavior is the\n * same either way.\n *\n * An absent field means \"everything of that kind\". A surface that cannot say\n * what it uses must be handed all of it, because an element the surface\n * places and the set omits has no registered component and renders NOTHING,\n * silently (the blank-canvas invariant, AGL-52). Narrowing is an optimization\n * and must fail toward the whole.\n */\nexport interface PluginUse {\n /**\n * Canvas component ids the surface places, read from the FULL composed\n * document the way `pagePresence` reads it — withheld lazy-panel subtrees\n * included, because an element inside a panel the visitor opens later is\n * still this page's element.\n */\n componentIds?: readonly string[]\n}\n\n/** A node as presence reads it: the two ids a placed element carries. */\nexport interface PresenceNode {\n componentId?: string\n pluginId?: string\n}\n\n/** What a published page places: its component ids and the plugin ids stamped on its nodes. */\nexport interface PagePresence {\n componentIds: ReadonlySet<string>\n pluginIds: ReadonlySet<string>\n}\n\n/**\n * The component ids and plugin ids a node tree places.\n *\n * Read from the FULL composed document — layouts, grafted reusable\n * components and withheld lazy panels included — because an element inside\n * a panel the visitor opens later is still this page's element.\n */\nexport function pagePresence(\n nodes: Record<string, PresenceNode | null | undefined> | null | undefined,\n): PagePresence {\n const componentIds = new Set<string>()\n const pluginIds = new Set<string>()\n for (const node of Object.values(nodes ?? {})) {\n if (typeof node?.componentId === 'string' && node.componentId) {\n componentIds.add(node.componentId)\n }\n if (typeof node?.pluginId === 'string' && node.pluginId) {\n pluginIds.add(node.pluginId)\n }\n }\n return { componentIds, pluginIds }\n}\n\n/** A plugin as the presence rules see it. */\nexport interface PresenceSubject {\n /** The plugin's own id (a manifest `id`, or a first-party catalog id). */\n pluginId?: string\n /** A marketplace plugin's listing id, which its elements may carry instead. */\n listingId?: string\n /**\n * A marketplace plugin's identity, `<publisher handle>.<manifest id>`\n * (AGL-3390): the `pluginId` its namespaced elements carry.\n */\n identity?: string\n /** Its declaration; `undefined` when it declares nothing. */\n contributes?: PluginContributions\n}\n\n/**\n * Whether a published page uses a plugin, so the page must load it.\n *\n * - An element of it is placed: a node stamped with the plugin's id, or,\n * for a declared plugin, a node whose component id it declares.\n * - It declares a site feature. The caller only asks about plugins the site\n * has switched on, and a feature runs on every page of such a site.\n *\n * A plugin that declares nothing is present only through its stamped\n * elements — the default in the module note.\n */\nexport function isPluginUsedOnPage(\n subject: PresenceSubject,\n page: PagePresence,\n): boolean {\n if (subject.pluginId && page.pluginIds.has(subject.pluginId)) return true\n if (subject.listingId && page.pluginIds.has(subject.listingId)) return true\n if (subject.identity && page.pluginIds.has(subject.identity)) return true\n const site = subject.contributes?.site\n if (!site) return false\n if (site.features?.length) return true\n return (site.components ?? []).some((id) => page.componentIds.has(id))\n}\n\n/**\n * Whether a plugin declares anything a site draws: an element an author can\n * place, or a feature that runs on the site's pages. The editor loads exactly\n * these (AGL-3391). A plugin that declares nothing is not among them: its\n * site half is only discoverable by running `register()`, and the console\n * shell already does that for it.\n */\nexport function declaresSiteElements(\n contributes: PluginContributions | undefined,\n): boolean {\n const site = contributes?.site\n return Boolean(site?.components?.length || site?.features?.length)\n}\n\n/**\n * Every id a plugin's elements and presets may carry as their `pluginId`: its\n * own id and, for a marketplace plugin, its listing id and its identity. A\n * surface that filters registry entries by plugin set needs all of them, or it\n * hides the elements of a plugin it just loaded.\n */\nexport function presenceIds(subject: PresenceSubject): string[] {\n const ids: string[] = []\n for (const id of [subject.identity, subject.pluginId, subject.listingId]) {\n if (id && !ids.includes(id)) ids.push(id)\n }\n return ids\n}\n\n/**\n * Function bindings (AGL-3393): component id → the prop naming the site\n * function that element runs.\n */\nexport type FunctionBindings = Readonly<Record<string, string>>\n\n/**\n * The function bindings a set of plugins declares, merged into one map.\n *\n * Where two plugins bind the same component id the FIRST one listed wins, so a\n * caller that passes first-party declarations ahead of marketplace ones keeps\n * a marketplace manifest from rebinding a first-party element. Marketplace ids\n * are namespaced by their publisher (see {@link isNamespacedComponentId}), so\n * a collision is a mistake, never a feature.\n */\nexport function mergeFunctionBindings(\n ...sources: ReadonlyArray<\n FunctionBindings | { contributes?: PluginContributions } | null | undefined\n >\n): FunctionBindings {\n const merged: Record<string, string> = {}\n for (const source of sources) {\n if (!source) continue\n const declared: FunctionBindings | undefined =\n 'contributes' in source\n ? (source.contributes as PluginContributions | undefined)?.site\n ?.functionBindings\n : (source as FunctionBindings)\n for (const [componentId, prop] of Object.entries(declared ?? {})) {\n if (typeof prop !== 'string') continue\n if (!Object.prototype.hasOwnProperty.call(merged, componentId)) {\n merged[componentId] = prop\n }\n }\n }\n return merged\n}\n\n/**\n * Whether a component id belongs to a marketplace plugin's namespace\n * (AGL-3387): `<publisher handle>.<plugin id>.<role>`. A `.` is reserved for\n * those ids — no first-party component carries one, which the manifest\n * generator enforces — so compose can tell, without loading anything, that a\n * tree places an element only an installed plugin can declare.\n */\nexport function isNamespacedComponentId(componentId: unknown): boolean {\n return typeof componentId === 'string' && componentId.includes('.')\n}\n\n/**\n * Where a plugin's console code loads, resolved with the default applied: a\n * plugin that declares nothing loads with the shell, as it always did.\n */\nexport interface ConsoleLoadPoints {\n shell: boolean\n slots: readonly string[]\n routes: readonly string[]\n orgRoutes: readonly string[]\n}\n\nexport function consoleLoadPoints(\n contributes: PluginContributions | undefined,\n): ConsoleLoadPoints {\n if (!contributes) return { shell: true, slots: [], routes: [], orgRoutes: [] }\n const declared = contributes.console ?? {}\n return {\n shell: Boolean(declared.shell),\n slots: declared.slots ?? [],\n routes: declared.routes ?? [],\n orgRoutes: declared.orgRoutes ?? [],\n }\n}\n\n/**\n * Whether a declared route serves `href`: the route itself, or a path beneath\n * it on a segment boundary, the way the shell's page resolver matches a nav\n * item that owns its subtree. `/products` serves `/products/orders` and never\n * `/products-archive`.\n */\nexport function routeServes(route: string, href: string): boolean {\n return href === route || href.startsWith(`${route}/`)\n}\n\n/**\n * A place in the console that loads plugins, as the surface drawing it names\n * itself (AGL-3142).\n *\n * - `shell`: the workspace chrome every screen has. It draws whatever a\n * plugin adds to every screen — a nav tab, an organization tab, a staff\n * tab, a provider — so a plugin that declares any of those loads here, and\n * so does one that declares nothing at all.\n * - `slots`: the zones a screen renders. The zones it names, not the plugins\n * it expects in them: a screen must never hold a plugin id.\n * - `route`: the path the reader has open, plugin-relative (`/products`,\n * `/products/orders`), on the level its route tree serves — `site` beneath\n * `/hosts/[host]`, `org` beneath the organization.\n * - `editor`: the Besigner, which draws a site's elements and offers them in\n * its Elements panel (AGL-3391). A plugin loads here when it declares site\n * elements or site features, whether or not the page open uses them, since\n * the author is choosing what to place.\n */\nexport type ConsoleLoadWhere =\n | { at: 'shell' }\n | { at: 'slots'; slots: readonly string[] }\n | { at: 'route'; href: string; level: 'site' | 'org' }\n | { at: 'editor' }\n\n/**\n * Whether a console surface uses a plugin, so it must load it.\n *\n * The console twin of {@link isPluginUsedOnPage}, and the same rule: a\n * declaration says where a plugin's code belongs, and the surface that draws\n * that place is the one that fetches it. A screen asks about the zones it\n * renders and the path it serves; it never asks about a plugin by name.\n *\n * A plugin that declares nothing loads with the shell — the default in the\n * module note, and the reason the shell branch reads\n * {@link consoleLoadPoints} rather than the raw block. Its nav tab or its\n * provider is only discoverable by running `register()`, so narrowing it\n * anywhere else would take a tab away with no way to notice.\n */\nexport function isPluginUsedInConsole(\n contributes: PluginContributions | undefined,\n where: ConsoleLoadWhere,\n): boolean {\n if (where.at === 'editor') return declaresSiteElements(contributes)\n const points = consoleLoadPoints(contributes)\n if (where.at === 'shell') return points.shell\n if (where.at === 'slots') {\n return points.slots.some((slot) => where.slots.includes(slot))\n }\n const routes = where.level === 'org' ? points.orgRoutes : points.routes\n return routes.some((route) => routeServes(route, where.href))\n}\n"],"names":["PLUGIN_MAX_CONTRIBUTIONS","CONTRIBUTION_ID","CONTRIBUTION_ROUTE","BINDING_PROP","sanitizePluginContributions","input","isPlainObject","ok","error","out","key","Object","keys","undefined","site","next","list","idList","values","length","bindings","functionBindingMap","components","value","functionBindings","consoleInput","shell","console","contributions","Boolean","Array","isArray","where","pattern","entry","test","String","includes","push","entries","componentId","prop","readPluginContributions","verdict","pagePresence","nodes","componentIds","Set","pluginIds","node","add","pluginId","isPluginUsedOnPage","subject","page","has","listingId","identity","contributes","features","some","id","declaresSiteElements","presenceIds","ids","mergeFunctionBindings","sources","merged","source","declared","prototype","hasOwnProperty","call","isNamespacedComponentId","consoleLoadPoints","slots","routes","orgRoutes","routeServes","route","href","startsWith","isPluginUsedInConsole","at","points","slot","level"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCC,GAED,4CAA4C,GAuD5C,6EAA6E,GAC7E,OAAO,MAAMA,2BAA2B,IAAG;AAE3C;;;CAGC,GACD,MAAMC,kBAAkB;AAExB;;;CAGC,GACD,MAAMC,qBAAqB;AAE3B,iEAAiE,GACjE,MAAMC,eAAe;AAMrB;;;;;;;;;;;CAWC,GACD,OAAO,SAASC,4BAA4BC,KAAc;IACxD,IAAI,CAACC,cAAcD,QAAQ;QACzB,OAAO;YAAEE,IAAI;YAAOC,OAAO;QAAgC;IAC7D;IACA,MAAMC,MAA2B,CAAC;IAClC,KAAK,MAAMC,OAAOC,OAAOC,IAAI,CAACP,OAAQ;QACpC,IAAIK,QAAQ,UAAUA,QAAQ,WAAW;YACvC,OAAO;gBAAEH,IAAI;gBAAOC,OAAO,CAAC,YAAY,EAAEE,IAAI,uBAAuB,CAAC;YAAC;QACzE;IACF;IAEA,IAAIL,KAAK,CAAC,OAAO,KAAKQ,WAAW;QAC/B,MAAMC,OAAOT,KAAK,CAAC,OAAO;QAC1B,IAAI,CAACC,cAAcQ,OAAO;YACxB,OAAO;gBAAEP,IAAI;gBAAOC,OAAO;YAAqC;QAClE;QACA,MAAMO,OAAgC,CAAC;QACvC,KAAK,MAAML,OAAOC,OAAOC,IAAI,CAACE,MAAO;YACnC,IAAIJ,QAAQ,oBAAoB;YAChC,IAAIA,QAAQ,gBAAgBA,QAAQ,YAAY;gBAC9C,OAAO;oBAAEH,IAAI;oBAAOC,OAAO,CAAC,iBAAiB,EAAEE,IAAI,4BAA4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,EAAE;IAAC;IAC7E,MAAMR,YAAWX,uBAAAA,YAAY/B,OAAO,YAAnB+B,uBAAuB,CAAC;IACzC,OAAO;QACLhC,OAAOG,QAAQwC,SAAS3C,KAAK;QAC7BiD,KAAK,GAAEN,kBAAAA,SAASM,KAAK,YAAdN,kBAAkB,EAAE;QAC3BO,MAAM,GAAEP,mBAAAA,SAASO,MAAM,YAAfP,mBAAmB,EAAE;QAC7BQ,SAAS,GAAER,sBAAAA,SAASQ,SAAS,YAAlBR,sBAAsB,EAAE;IACrC;AACF;AAEA;;;;;CAKC,GACD,OAAO,SAASS,YAAYC,KAAa,EAAEC,IAAY;IACrD,OAAOA,SAASD,SAASC,KAAKC,UAAU,CAAC,GAAGF,MAAM,CAAC,CAAC;AACtD;AA0BA;;;;;;;;;;;;;CAaC,GACD,OAAO,SAASG,sBACdxB,WAA4C,EAC5C1B,KAAuB;IAEvB,IAAIA,MAAMmD,EAAE,KAAK,UAAU,OAAOrB,qBAAqBJ;IACvD,MAAM0B,SAASV,kBAAkBhB;IACjC,IAAI1B,MAAMmD,EAAE,KAAK,SAAS,OAAOC,OAAO1D,KAAK;IAC7C,IAAIM,MAAMmD,EAAE,KAAK,SAAS;QACxB,OAAOC,OAAOT,KAAK,CAACf,IAAI,CAAC,CAACyB,OAASrD,MAAM2C,KAAK,CAACtC,QAAQ,CAACgD;IAC1D;IACA,MAAMT,SAAS5C,MAAMsD,KAAK,KAAK,QAAQF,OAAOP,SAAS,GAAGO,OAAOR,MAAM;IACvE,OAAOA,OAAOhB,IAAI,CAAC,CAACmB,QAAUD,YAAYC,OAAO/C,MAAMgD,IAAI;AAC7D"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-contributions.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\n/**\n * What a plugin contributes, and where (AGL-3116).\n *\n * A plugin loads only where something uses it. Installing one loads nothing:\n * a published page fetches a plugin's code when the page places one of its\n * elements or the site runs one of its features, and a console screen\n * fetches it when the screen renders one of its slots or routes, or when the\n * plugin draws something the shell renders on every screen.\n *\n * The loaders cannot learn that by running a plugin, because running it is\n * the cost being avoided. So each plugin DECLARES its contributions:\n * first-party plugins in `plugins.config.json`, marketplace plugins in the\n * manifest they publish (`contributes`). The declaration is the whole of what\n * a loader reads, and it is data: this module is dependency-free so the\n * server, both apps, the verifier and the build tools share one reading.\n *\n * A declared surface only narrows where to look. Presence is the rule: a\n * plugin that declares a component loads on the pages that place it, not on\n * every page of the site that installed it.\n *\n * ## A plugin that declares nothing\n *\n * Every marketplace version published before this contract has no\n * `contributes`. Such a plugin keeps working under one default:\n *\n * - **On a published page it loads only where its element is placed**: a\n * node whose `pluginId` names the plugin (its manifest id or its listing\n * id). That is the one presence signal a page carries without running the\n * bundle, and it is the only way a page can show an element the plugin\n * registers. A site runtime of an undeclared plugin does not load, and the\n * publish pipeline refuses a bundle that registers one without declaring\n * it, so the only plugins this default governs are the ones already\n * published.\n * - **In the console it loads with the workspace shell**, as it always did,\n * because a nav tab or a provider is only discoverable by running\n * `register()`. Nothing on a published page depends on this.\n */\n\n/** What a plugin adds to a published site. */\nexport interface PluginSiteContributions {\n /**\n * Canvas component ids the plugin registers: the elements a page places. A\n * published page loads the plugin only when its node tree places one.\n */\n components?: string[]\n /**\n * Site features: runtimes the plugin mounts on every page of a site that\n * switched it on (an announcement bar, an experiment runner), named by the\n * `runtimeId` it registers. A plugin with a feature loads on every page of\n * such a site, which is what a feature is.\n */\n features?: string[]\n /**\n * The elements that run a site function in the visitor's browser (AGL-3393),\n * each keyed by its component id and naming the prop that holds the\n * function's name. Compose hands such a node the function's definition and\n * the site variables it reads; no other node is given either.\n *\n * Declared DATA rather than read off a registered schema: compose runs where\n * no plugin code loads — the tenant's server components — so the only thing\n * it can consult is a declaration. A first-party plugin declares it in\n * `plugins.config.json`, a marketplace plugin in its manifest, and both reach\n * compose as the same map. Every key must also be one of `components`.\n */\n functionBindings?: Record<string, string>\n}\n\n/** What a plugin adds to the console. */\nexport interface PluginConsoleContributions {\n /**\n * The widget slots its widgets fill: the `CONSOLE_WIDGET_SLOTS` zones, the\n * panels the shell draws as slots (the console dock `consoleDock`, the\n * besigner's `besignerInspector`), and zones another plugin hosts. A screen\n * that renders one of them loads the plugin.\n */\n slots?: string[]\n /** Site-level console routes it serves (`/forms`), beneath `/hosts/[host]`. */\n routes?: string[]\n /** Organization-level console routes it serves (`/outreach`). */\n orgRoutes?: string[]\n /**\n * The shell draws something of it on every screen of a workspace: a nav\n * tab, an organization tab, a staff tab or a provider. Such a plugin loads\n * with the shell, because every screen renders it.\n */\n shell?: boolean\n}\n\nexport interface PluginContributions {\n site?: PluginSiteContributions\n console?: PluginConsoleContributions\n}\n\n/** Bound on each declared list, so a manifest cannot hand a loader a novel. */\nexport const PLUGIN_MAX_CONTRIBUTIONS = 128\n\n/**\n * A component, feature or slot id: an identifier with the separators ids in\n * the platform use (`muiTypography`, `marketplacePlugin`, `ai.assist`).\n */\nconst CONTRIBUTION_ID = /^[A-Za-z_][A-Za-z0-9_.:-]{0,79}$/\n\n/**\n * A console route: one or more path segments, as a nav item's `href` names\n * them. Never a URL, never `..`.\n */\nconst CONTRIBUTION_ROUTE = /^(\\/[A-Za-z0-9_-]+){1,8}$/\n\n/** A prop name a function binding may name: a plain identifier. */\nconst BINDING_PROP = /^[A-Za-z_$][A-Za-z0-9_$]{0,63}$/\n\ntype Sanitized =\n | { ok: true; contributions: PluginContributions }\n | { ok: false; error: string }\n\n/**\n * Validates a declared `contributes` block.\n *\n * Malformed input is REFUSED rather than trimmed: a loader reads this to\n * decide where a plugin runs, so a declaration that silently lost an entry\n * would stop the plugin loading where it is used, and nobody would see why.\n * Duplicates are collapsed and empty lists dropped, because neither changes\n * what the declaration means.\n *\n * `{}` is valid and means \"contributes nothing anywhere\", which is a\n * different statement from an absent block (see the module note).\n */\nexport function sanitizePluginContributions(input: unknown): Sanitized {\n if (!isPlainObject(input)) {\n return { ok: false, error: 'contributes must be an object' }\n }\n const out: PluginContributions = {}\n for (const key of Object.keys(input)) {\n if (key !== 'site' && key !== 'console') {\n return { ok: false, error: `contributes.${key} is not a known surface` }\n }\n }\n\n if (input['site'] !== undefined) {\n const site = input['site']\n if (!isPlainObject(site)) {\n return { ok: false, error: 'contributes.site must be an object' }\n }\n const next: PluginSiteContributions = {}\n for (const key of Object.keys(site)) {\n if (key === 'functionBindings') continue\n if (key !== 'components' && key !== 'features') {\n return { ok: false, error: `contributes.site.${key} is not a known contribution` }\n }\n const list = idList(site[key], `contributes.site.${key}`, CONTRIBUTION_ID)\n if (list.ok === false) return { ok: false, error: list.error }\n if (list.values.length) next[key] = list.values\n }\n if (site['functionBindings'] !== undefined) {\n const bindings = functionBindingMap(\n site['functionBindings'],\n next.components ?? [],\n )\n if (bindings.ok === false) return { ok: false, error: bindings.error }\n if (Object.keys(bindings.value).length) {\n next.functionBindings = bindings.value\n }\n }\n if (Object.keys(next).length) out.site = next\n }\n\n if (input['console'] !== undefined) {\n const consoleInput = input['console']\n if (!isPlainObject(consoleInput)) {\n return { ok: false, error: 'contributes.console must be an object' }\n }\n const next: PluginConsoleContributions = {}\n for (const key of Object.keys(consoleInput)) {\n if (key === 'shell') {\n if (typeof consoleInput['shell'] !== 'boolean') {\n return { ok: false, error: 'contributes.console.shell must be true or false' }\n }\n if (consoleInput['shell']) next.shell = true\n continue\n }\n if (key !== 'slots' && key !== 'routes' && key !== 'orgRoutes') {\n return {\n ok: false,\n error: `contributes.console.${key} is not a known contribution`,\n }\n }\n const list = idList(\n consoleInput[key],\n `contributes.console.${key}`,\n key === 'slots' ? CONTRIBUTION_ID : CONTRIBUTION_ROUTE,\n )\n if (list.ok === false) return { ok: false, error: list.error }\n if (list.values.length) next[key] = list.values\n }\n if (Object.keys(next).length) out.console = next\n }\n\n return { ok: true, contributions: out }\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === 'object' && !Array.isArray(value)\n}\n\nfunction idList(\n value: unknown,\n where: string,\n pattern: RegExp,\n): { ok: true; values: string[] } | { ok: false; error: string } {\n if (!Array.isArray(value)) return { ok: false, error: `${where} must be a list` }\n if (value.length > PLUGIN_MAX_CONTRIBUTIONS) {\n return { ok: false, error: `${where} lists more than ${PLUGIN_MAX_CONTRIBUTIONS}` }\n }\n const values: string[] = []\n for (const entry of value) {\n if (typeof entry !== 'string' || !pattern.test(entry)) {\n return { ok: false, error: `${where} has an invalid entry \"${String(entry)}\"` }\n }\n if (!values.includes(entry)) values.push(entry)\n }\n return { ok: true, values }\n}\n\n/**\n * `contributes.site.functionBindings`, validated against the components the\n * same block declares: a binding on an element the plugin does not register\n * would hand a function's definition, and the variable values it reads, to\n * whichever element happens to own that id.\n */\nfunction functionBindingMap(\n value: unknown,\n components: readonly string[],\n): { ok: true; value: Record<string, string> } | { ok: false; error: string } {\n const where = 'contributes.site.functionBindings'\n if (!isPlainObject(value)) {\n return { ok: false, error: `${where} must be an object` }\n }\n const entries = Object.entries(value)\n if (entries.length > PLUGIN_MAX_CONTRIBUTIONS) {\n return { ok: false, error: `${where} lists more than ${PLUGIN_MAX_CONTRIBUTIONS}` }\n }\n const out: Record<string, string> = {}\n for (const [componentId, prop] of entries) {\n if (!components.includes(componentId)) {\n return {\n ok: false,\n error: `${where} names \"${componentId}\", which contributes.site.components does not declare`,\n }\n }\n if (typeof prop !== 'string' || !BINDING_PROP.test(prop)) {\n return {\n ok: false,\n error: `${where}.${componentId} must name a prop, not \"${String(prop)}\"`,\n }\n }\n out[componentId] = prop\n }\n return { ok: true, value: out }\n}\n\n/**\n * A declared `contributes` block as a loader may trust it: the sanitized\n * block, or `undefined` for one that is absent or does not validate.\n *\n * Loaders read this from stored documents (a pinned version's manifest), and\n * a malformed stored block is treated as UNDECLARED — the default applies —\n * never as \"contributes nothing\", which would stop a plugin that is in use.\n */\nexport function readPluginContributions(\n input: unknown,\n): PluginContributions | undefined {\n if (input === undefined || input === null) return undefined\n const verdict = sanitizePluginContributions(input)\n return verdict.ok ? verdict.contributions : undefined\n}\n\n/**\n * What the surface a plugin is being registered into actually uses\n * (AGL-3141).\n *\n * The loaders carry this from the surface that computed it to each plugin's\n * register function, unchanged. A plugin that can register a part of itself\n * reads it; one that cannot ignores it, and the platform's behavior is the\n * same either way.\n *\n * An absent field means \"everything of that kind\". A surface that cannot say\n * what it uses must be handed all of it, because an element the surface\n * places and the set omits has no registered component and renders NOTHING,\n * silently (the blank-canvas invariant, AGL-52). Narrowing is an optimization\n * and must fail toward the whole.\n */\nexport interface PluginUse {\n /**\n * Canvas component ids the surface places, read from the FULL composed\n * document the way `pagePresence` reads it — withheld lazy-panel subtrees\n * included, because an element inside a panel the visitor opens later is\n * still this page's element.\n */\n componentIds?: readonly string[]\n}\n\n/** A node as presence reads it: the two ids a placed element carries. */\nexport interface PresenceNode {\n componentId?: string\n pluginId?: string\n}\n\n/** What a published page places: its component ids and the plugin ids stamped on its nodes. */\nexport interface PagePresence {\n componentIds: ReadonlySet<string>\n pluginIds: ReadonlySet<string>\n}\n\n/**\n * The component ids and plugin ids a node tree places.\n *\n * Read from the FULL composed document — layouts, grafted reusable\n * components and withheld lazy panels included — because an element inside\n * a panel the visitor opens later is still this page's element.\n */\nexport function pagePresence(\n nodes: Record<string, PresenceNode | null | undefined> | null | undefined,\n): PagePresence {\n const componentIds = new Set<string>()\n const pluginIds = new Set<string>()\n for (const node of Object.values(nodes ?? {})) {\n if (typeof node?.componentId === 'string' && node.componentId) {\n componentIds.add(node.componentId)\n }\n if (typeof node?.pluginId === 'string' && node.pluginId) {\n pluginIds.add(node.pluginId)\n }\n }\n return { componentIds, pluginIds }\n}\n\n/** A plugin as the presence rules see it. */\nexport interface PresenceSubject {\n /** The plugin's own id (a manifest `id`, or a first-party catalog id). */\n pluginId?: string\n /** A marketplace plugin's listing id, which its elements may carry instead. */\n listingId?: string\n /**\n * A marketplace plugin's identity, `<publisher handle>.<manifest id>`\n * (AGL-3390): the `pluginId` its namespaced elements carry.\n */\n identity?: string\n /** Its declaration; `undefined` when it declares nothing. */\n contributes?: PluginContributions\n}\n\n/**\n * Whether a published page uses a plugin, so the page must load it.\n *\n * - An element of it is placed: a node stamped with the plugin's id, or,\n * for a declared plugin, a node whose component id it declares.\n * - It declares a site feature. The caller only asks about plugins the site\n * has switched on, and a feature runs on every page of such a site.\n *\n * A plugin that declares nothing is present only through its stamped\n * elements — the default in the module note.\n */\nexport function isPluginUsedOnPage(\n subject: PresenceSubject,\n page: PagePresence,\n): boolean {\n if (subject.pluginId && page.pluginIds.has(subject.pluginId)) return true\n if (subject.listingId && page.pluginIds.has(subject.listingId)) return true\n if (subject.identity && page.pluginIds.has(subject.identity)) return true\n const site = subject.contributes?.site\n if (!site) return false\n if (site.features?.length) return true\n return (site.components ?? []).some((id) => page.componentIds.has(id))\n}\n\n/**\n * Whether a plugin declares anything a site draws: an element an author can\n * place, or a feature that runs on the site's pages. The editor loads exactly\n * these (AGL-3391). A plugin that declares nothing is not among them: its\n * site half is only discoverable by running `register()`, and the console\n * shell already does that for it.\n */\nexport function declaresSiteElements(\n contributes: PluginContributions | undefined,\n): boolean {\n const site = contributes?.site\n return Boolean(site?.components?.length || site?.features?.length)\n}\n\n/**\n * Every id a plugin's elements and presets may carry as their `pluginId`: its\n * own id and, for a marketplace plugin, its listing id and its identity. A\n * surface that filters registry entries by plugin set needs all of them, or it\n * hides the elements of a plugin it just loaded.\n */\nexport function presenceIds(subject: PresenceSubject): string[] {\n const ids: string[] = []\n for (const id of [subject.identity, subject.pluginId, subject.listingId]) {\n if (id && !ids.includes(id)) ids.push(id)\n }\n return ids\n}\n\n/**\n * Function bindings (AGL-3393): component id → the prop naming the site\n * function that element runs.\n */\nexport type FunctionBindings = Readonly<Record<string, string>>\n\n/**\n * The function bindings a set of plugins declares, merged into one map.\n *\n * Where two plugins bind the same component id the FIRST one listed wins, so a\n * caller that passes first-party declarations ahead of marketplace ones keeps\n * a marketplace manifest from rebinding a first-party element. Marketplace ids\n * are namespaced by their publisher (see {@link isNamespacedComponentId}), so\n * a collision is a mistake, never a feature.\n */\nexport function mergeFunctionBindings(\n ...sources: ReadonlyArray<\n FunctionBindings | { contributes?: PluginContributions } | null | undefined\n >\n): FunctionBindings {\n const merged: Record<string, string> = {}\n for (const source of sources) {\n if (!source) continue\n const declared: FunctionBindings | undefined =\n 'contributes' in source\n ? (source.contributes as PluginContributions | undefined)?.site\n ?.functionBindings\n : (source as FunctionBindings)\n for (const [componentId, prop] of Object.entries(declared ?? {})) {\n if (typeof prop !== 'string') continue\n if (!Object.prototype.hasOwnProperty.call(merged, componentId)) {\n merged[componentId] = prop\n }\n }\n }\n return merged\n}\n\n/**\n * Whether a component id belongs to a marketplace plugin's namespace\n * (AGL-3387): `<publisher handle>.<plugin id>.<role>`. A `.` is reserved for\n * those ids — no first-party component carries one, which the manifest\n * generator enforces — so compose can tell, without loading anything, that a\n * tree places an element only an installed plugin can declare.\n */\nexport function isNamespacedComponentId(componentId: unknown): boolean {\n return typeof componentId === 'string' && componentId.includes('.')\n}\n\n/**\n * Where a plugin's console code loads, resolved with the default applied: a\n * plugin that declares nothing loads with the shell, as it always did.\n */\nexport interface ConsoleLoadPoints {\n shell: boolean\n slots: readonly string[]\n routes: readonly string[]\n orgRoutes: readonly string[]\n}\n\nexport function consoleLoadPoints(\n contributes: PluginContributions | undefined,\n): ConsoleLoadPoints {\n if (!contributes) return { shell: true, slots: [], routes: [], orgRoutes: [] }\n const declared = contributes.console ?? {}\n return {\n shell: Boolean(declared.shell),\n slots: declared.slots ?? [],\n routes: declared.routes ?? [],\n orgRoutes: declared.orgRoutes ?? [],\n }\n}\n\n/**\n * Whether a declared route serves `href`: the route itself, or a path beneath\n * it on a segment boundary, the way the shell's page resolver matches a nav\n * item that owns its subtree. `/products` serves `/products/orders` and never\n * `/products-archive`.\n */\nexport function routeServes(route: string, href: string): boolean {\n return href === route || href.startsWith(`${route}/`)\n}\n\n/**\n * A place in the console that loads plugins, as the surface drawing it names\n * itself (AGL-3142).\n *\n * - `shell`: the workspace chrome every screen has. It draws whatever a\n * plugin adds to every screen — a nav tab, an organization tab, a staff\n * tab, a provider — so a plugin that declares any of those loads here, and\n * so does one that declares nothing at all.\n * - `slots`: the zones a screen renders. The zones it names, not the plugins\n * it expects in them: a screen must never hold a plugin id.\n * - `route`: the path the reader has open, plugin-relative (`/products`,\n * `/products/orders`), on the level its route tree serves — `site` beneath\n * `/hosts/[host]`, `org` beneath the organization.\n * - `editor`: the Besigner, which draws a site's elements and offers them in\n * its Elements panel (AGL-3391). A plugin loads here when it declares site\n * elements or site features, whether or not the page open uses them, since\n * the author is choosing what to place.\n */\nexport type ConsoleLoadWhere =\n | { at: 'shell' }\n | { at: 'slots'; slots: readonly string[] }\n | { at: 'route'; href: string; level: 'site' | 'org' }\n | { at: 'editor' }\n\n/**\n * Whether a console surface uses a plugin, so it must load it.\n *\n * The console twin of {@link isPluginUsedOnPage}, and the same rule: a\n * declaration says where a plugin's code belongs, and the surface that draws\n * that place is the one that fetches it. A screen asks about the zones it\n * renders and the path it serves; it never asks about a plugin by name.\n *\n * A plugin that declares nothing loads with the shell — the default in the\n * module note, and the reason the shell branch reads\n * {@link consoleLoadPoints} rather than the raw block. Its nav tab or its\n * provider is only discoverable by running `register()`, so narrowing it\n * anywhere else would take a tab away with no way to notice.\n */\nexport function isPluginUsedInConsole(\n contributes: PluginContributions | undefined,\n where: ConsoleLoadWhere,\n): boolean {\n if (where.at === 'editor') return declaresSiteElements(contributes)\n const points = consoleLoadPoints(contributes)\n if (where.at === 'shell') return points.shell\n if (where.at === 'slots') {\n return points.slots.some((slot) => where.slots.includes(slot))\n }\n const routes = where.level === 'org' ? points.orgRoutes : points.routes\n return routes.some((route) => routeServes(route, where.href))\n}\n"],"names":["PLUGIN_MAX_CONTRIBUTIONS","CONTRIBUTION_ID","CONTRIBUTION_ROUTE","BINDING_PROP","sanitizePluginContributions","input","isPlainObject","ok","error","out","key","Object","keys","undefined","site","next","list","idList","values","length","bindings","functionBindingMap","components","value","functionBindings","consoleInput","shell","console","contributions","Boolean","Array","isArray","where","pattern","entry","test","String","includes","push","entries","componentId","prop","readPluginContributions","verdict","pagePresence","nodes","componentIds","Set","pluginIds","node","add","pluginId","isPluginUsedOnPage","subject","page","has","listingId","identity","contributes","features","some","id","declaresSiteElements","presenceIds","ids","mergeFunctionBindings","sources","merged","source","declared","prototype","hasOwnProperty","call","isNamespacedComponentId","consoleLoadPoints","slots","routes","orgRoutes","routeServes","route","href","startsWith","isPluginUsedInConsole","at","points","slot","level"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCC,GAED,4CAA4C,GAuD5C,6EAA6E,GAC7E,OAAO,MAAMA,2BAA2B,IAAG;AAE3C;;;CAGC,GACD,MAAMC,kBAAkB;AAExB;;;CAGC,GACD,MAAMC,qBAAqB;AAE3B,iEAAiE,GACjE,MAAMC,eAAe;AAMrB;;;;;;;;;;;CAWC,GACD,OAAO,SAASC,4BAA4BC,KAAc;IACxD,IAAI,CAACC,cAAcD,QAAQ;QACzB,OAAO;YAAEE,IAAI;YAAOC,OAAO;QAAgC;IAC7D;IACA,MAAMC,MAA2B,CAAC;IAClC,KAAK,MAAMC,OAAOC,OAAOC,IAAI,CAACP,OAAQ;QACpC,IAAIK,QAAQ,UAAUA,QAAQ,WAAW;YACvC,OAAO;gBAAEH,IAAI;gBAAOC,OAAO,CAAC,YAAY,EAAEE,IAAI,uBAAuB,CAAC;YAAC;QACzE;IACF;IAEA,IAAIL,KAAK,CAAC,OAAO,KA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,MAAMsD,KAAK,KAAK,QAAQF,OAAOP,SAAS,GAAGO,OAAOR,MAAM;IACvE,OAAOA,OAAOhB,IAAI,CAAC,CAACmB,QAAUD,YAAYC,OAAO/C,MAAMgD,IAAI;AAC7D"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
/**
|
|
18
|
+
* The app offers its boot step, so a reader that finds nobody can run it.
|
|
19
|
+
*
|
|
20
|
+
* Called at boot from the app's own instrumentation, beside the declarations
|
|
21
|
+
* themselves and BEFORE them — this is a plain assignment that cannot fail,
|
|
22
|
+
* and the failure it exists to repair is the one immediately after it.
|
|
23
|
+
*
|
|
24
|
+
* Idempotent and last-one-wins; an app registers exactly once per process.
|
|
25
|
+
*/
|
|
26
|
+
export declare function registerPluginDeclarationsRepair(run: () => Promise<void>): void;
|
|
27
|
+
/** Only for specs: forgets the registered boot step. */
|
|
28
|
+
export declare function resetPluginDeclarationsRepairForTests(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Runs the app's boot step, when it offered one. Answers whether one ran.
|
|
31
|
+
*
|
|
32
|
+
* Throws what the step throws; each caller decides what a failed repair
|
|
33
|
+
* costs it. The app's step memoizes its own promise, so this is one attempt
|
|
34
|
+
* per process rather than one per call.
|
|
35
|
+
*/
|
|
36
|
+
export declare function runPluginDeclarationsRepair(): Promise<boolean>;
|