@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.
Files changed (348) hide show
  1. package/package.json +14 -14
  2. package/src/lib/app-utils/actions.d.ts +25 -374
  3. package/src/lib/app-utils/actions.js +101 -561
  4. package/src/lib/app-utils/actions.js.map +1 -1
  5. package/src/lib/app-utils/activity-presenter.d.ts +3 -3
  6. package/src/lib/app-utils/activity-presenter.js +36 -52
  7. package/src/lib/app-utils/activity-presenter.js.map +1 -1
  8. package/src/lib/app-utils/admin-audit-index.js +2 -2
  9. package/src/lib/app-utils/admin-audit-index.js.map +1 -1
  10. package/src/lib/app-utils/analytics-events.d.ts +11 -2
  11. package/src/lib/app-utils/analytics-events.js +11 -2
  12. package/src/lib/app-utils/analytics-events.js.map +1 -1
  13. package/src/lib/app-utils/analytics-provider.d.ts +182 -0
  14. package/src/lib/app-utils/analytics-provider.js +133 -0
  15. package/src/lib/app-utils/analytics-provider.js.map +1 -0
  16. package/src/lib/app-utils/api-plugins.d.ts +46 -0
  17. package/src/lib/app-utils/api-plugins.js +19 -0
  18. package/src/lib/app-utils/api-plugins.js.map +1 -1
  19. package/src/lib/app-utils/{marketplace-overrides.d.ts → artifact-overrides.d.ts} +9 -6
  20. package/src/lib/app-utils/{marketplace-overrides.js → artifact-overrides.js} +10 -7
  21. package/src/lib/app-utils/artifact-overrides.js.map +1 -0
  22. package/src/lib/app-utils/{marketplace-provenance.d.ts → artifact-provenance.d.ts} +12 -10
  23. package/src/lib/app-utils/{marketplace-provenance.js → artifact-provenance.js} +9 -7
  24. package/src/lib/app-utils/artifact-provenance.js.map +1 -0
  25. package/src/lib/app-utils/assist-credits.js +2 -1
  26. package/src/lib/app-utils/assist-credits.js.map +1 -1
  27. package/src/lib/app-utils/binding-token-catalog.d.ts +5 -13
  28. package/src/lib/app-utils/binding-token-catalog.js +17 -41
  29. package/src/lib/app-utils/binding-token-catalog.js.map +1 -1
  30. package/src/lib/app-utils/binding-tokens.js +1 -1
  31. package/src/lib/app-utils/binding-tokens.js.map +1 -1
  32. package/src/lib/app-utils/brand-support-line.d.ts +36 -0
  33. package/src/lib/app-utils/brand-support-line.js +38 -0
  34. package/src/lib/app-utils/brand-support-line.js.map +1 -0
  35. package/src/lib/app-utils/campaign-touch.d.ts +5 -5
  36. package/src/lib/app-utils/campaign-touch.js +8 -8
  37. package/src/lib/app-utils/campaign-touch.js.map +1 -1
  38. package/src/lib/app-utils/collection-entries.d.ts +2 -2
  39. package/src/lib/app-utils/collection-entries.js.map +1 -1
  40. package/src/lib/app-utils/consent-group-change.d.ts +4 -0
  41. package/src/lib/app-utils/consent-group-change.js.map +1 -1
  42. package/src/lib/app-utils/console-record-links.d.ts +10 -89
  43. package/src/lib/app-utils/console-record-links.js +3 -107
  44. package/src/lib/app-utils/console-record-links.js.map +1 -1
  45. package/src/lib/app-utils/console-routes.d.ts +16 -7
  46. package/src/lib/app-utils/console-routes.js +9 -3
  47. package/src/lib/app-utils/console-routes.js.map +1 -1
  48. package/src/lib/app-utils/contacts.d.ts +23 -1
  49. package/src/lib/app-utils/contacts.js +21 -5
  50. package/src/lib/app-utils/contacts.js.map +1 -1
  51. package/src/lib/app-utils/cross-pool-desync.d.ts +39 -0
  52. package/src/lib/app-utils/cross-pool-desync.js +47 -0
  53. package/src/lib/app-utils/cross-pool-desync.js.map +1 -0
  54. package/src/lib/app-utils/csv-upload.d.ts +29 -0
  55. package/src/lib/app-utils/csv-upload.js +29 -0
  56. package/src/lib/app-utils/csv-upload.js.map +1 -0
  57. package/src/lib/app-utils/dataset-models.d.ts +5 -5
  58. package/src/lib/app-utils/dataset-models.js +19 -2
  59. package/src/lib/app-utils/dataset-models.js.map +1 -1
  60. package/src/lib/app-utils/datasets.d.ts +65 -11
  61. package/src/lib/app-utils/datasets.js +74 -11
  62. package/src/lib/app-utils/datasets.js.map +1 -1
  63. package/src/lib/app-utils/docs-deflection.d.ts +6 -6
  64. package/src/lib/app-utils/docs-deflection.js.map +1 -1
  65. package/src/lib/app-utils/docs-help.generated.d.ts +12 -6
  66. package/src/lib/app-utils/docs-help.generated.js +21 -6
  67. package/src/lib/app-utils/docs-help.generated.js.map +1 -1
  68. package/src/lib/app-utils/docs-index.generated.d.ts +2 -2
  69. package/src/lib/app-utils/docs-index.generated.js +514 -318
  70. package/src/lib/app-utils/docs-index.generated.js.map +1 -1
  71. package/src/lib/app-utils/docs-retrieval.d.ts +3 -3
  72. package/src/lib/app-utils/docs-retrieval.js +14 -10
  73. package/src/lib/app-utils/docs-retrieval.js.map +1 -1
  74. package/src/lib/app-utils/duplicate-resource.d.ts +4 -1
  75. package/src/lib/app-utils/duplicate-resource.js +7 -4
  76. package/src/lib/app-utils/duplicate-resource.js.map +1 -1
  77. package/src/lib/app-utils/dynamic-list-rule.d.ts +1 -1
  78. package/src/lib/app-utils/dynamic-list-rule.js.map +1 -1
  79. package/src/lib/app-utils/element-ui.d.ts +1 -1
  80. package/src/lib/app-utils/element-ui.js +1 -1
  81. package/src/lib/app-utils/element-ui.js.map +1 -1
  82. package/src/lib/app-utils/email-starter-policy.js +3 -3
  83. package/src/lib/app-utils/email-starter-policy.js.map +1 -1
  84. package/src/lib/app-utils/entity-picker-context.d.ts +10 -5
  85. package/src/lib/app-utils/entity-picker-context.js.map +1 -1
  86. package/src/lib/app-utils/error-beacon.d.ts +75 -6
  87. package/src/lib/app-utils/error-beacon.js +160 -21
  88. package/src/lib/app-utils/error-beacon.js.map +1 -1
  89. package/src/lib/app-utils/expand-repeatables.d.ts +10 -10
  90. package/src/lib/app-utils/expand-repeatables.js +10 -10
  91. package/src/lib/app-utils/expand-repeatables.js.map +1 -1
  92. package/src/lib/app-utils/host-events.d.ts +82 -0
  93. package/src/lib/app-utils/host-events.js +62 -0
  94. package/src/lib/app-utils/host-events.js.map +1 -0
  95. package/src/lib/app-utils/lockdown.d.ts +33 -1
  96. package/src/lib/app-utils/lockdown.js +45 -4
  97. package/src/lib/app-utils/lockdown.js.map +1 -1
  98. package/src/lib/app-utils/margin-utilization.d.ts +4 -69
  99. package/src/lib/app-utils/margin-utilization.js +82 -69
  100. package/src/lib/app-utils/margin-utilization.js.map +1 -1
  101. package/src/lib/app-utils/node-definition-sanitizer.d.ts +16 -16
  102. package/src/lib/app-utils/node-definition-sanitizer.js +24 -20
  103. package/src/lib/app-utils/node-definition-sanitizer.js.map +1 -1
  104. package/src/lib/app-utils/node-interactions.d.ts +7 -7
  105. package/src/lib/app-utils/node-interactions.js.map +1 -1
  106. package/src/lib/app-utils/notifications.d.ts +78 -47
  107. package/src/lib/app-utils/notifications.js +63 -44
  108. package/src/lib/app-utils/notifications.js.map +1 -1
  109. package/src/lib/app-utils/payments-configured.d.ts +8 -21
  110. package/src/lib/app-utils/payments-configured.js +8 -23
  111. package/src/lib/app-utils/payments-configured.js.map +1 -1
  112. package/src/lib/app-utils/plan-entitlements.d.ts +43 -128
  113. package/src/lib/app-utils/plan-entitlements.js +145 -304
  114. package/src/lib/app-utils/plan-entitlements.js.map +1 -1
  115. package/src/lib/app-utils/platform-brand.d.ts +10 -0
  116. package/src/lib/app-utils/platform-brand.js +14 -3
  117. package/src/lib/app-utils/platform-brand.js.map +1 -1
  118. package/src/lib/app-utils/plugin-api-rate-limit.d.ts +7 -1
  119. package/src/lib/app-utils/plugin-api-rate-limit.js +11 -3
  120. package/src/lib/app-utils/plugin-api-rate-limit.js.map +1 -1
  121. package/src/lib/app-utils/plugin-bundle-checks.js +2 -2
  122. package/src/lib/app-utils/plugin-bundle-checks.js.map +1 -1
  123. package/src/lib/app-utils/plugin-host-events.generated.d.ts +12 -0
  124. package/src/lib/app-utils/plugin-host-events.generated.js +169 -0
  125. package/src/lib/app-utils/plugin-host-events.generated.js.map +1 -0
  126. package/src/lib/app-utils/plugin-release-flags.generated.d.ts +12 -0
  127. package/src/lib/app-utils/plugin-release-flags.generated.js +106 -0
  128. package/src/lib/app-utils/plugin-release-flags.generated.js.map +1 -0
  129. package/src/lib/app-utils/realm-host-surface.generated.js +2 -0
  130. package/src/lib/app-utils/realm-host-surface.generated.js.map +1 -1
  131. package/src/lib/app-utils/release-flags.d.ts +14 -5
  132. package/src/lib/app-utils/release-flags.js +21 -125
  133. package/src/lib/app-utils/release-flags.js.map +1 -1
  134. package/src/lib/app-utils/repeat-sources.d.ts +9 -0
  135. package/src/lib/app-utils/repeat-sources.js.map +1 -1
  136. package/src/lib/app-utils/retained-refusals.d.ts +73 -0
  137. package/src/lib/app-utils/retained-refusals.js +186 -0
  138. package/src/lib/app-utils/retained-refusals.js.map +1 -0
  139. package/src/lib/app-utils/scope-tokens.d.ts +27 -0
  140. package/src/lib/app-utils/scope-tokens.js +61 -0
  141. package/src/lib/app-utils/scope-tokens.js.map +1 -1
  142. package/src/lib/app-utils/screen-link-context.js +3 -3
  143. package/src/lib/app-utils/screen-link-context.js.map +1 -1
  144. package/src/lib/app-utils/screen-route.d.ts +15 -0
  145. package/src/lib/app-utils/screen-route.js +21 -1
  146. package/src/lib/app-utils/screen-route.js.map +1 -1
  147. package/src/lib/app-utils/seo-audit.d.ts +132 -0
  148. package/src/lib/app-utils/seo-audit.js +246 -0
  149. package/src/lib/app-utils/seo-audit.js.map +1 -0
  150. package/src/lib/app-utils/seo-keywords.d.ts +48 -0
  151. package/src/lib/app-utils/seo-keywords.js +60 -0
  152. package/src/lib/app-utils/seo-keywords.js.map +1 -0
  153. package/src/lib/app-utils/seo-page-facts.d.ts +66 -0
  154. package/src/lib/app-utils/seo-page-facts.js +155 -0
  155. package/src/lib/app-utils/seo-page-facts.js.map +1 -0
  156. package/src/lib/app-utils/seo-site-scan.d.ts +126 -0
  157. package/src/lib/app-utils/seo-site-scan.js +162 -0
  158. package/src/lib/app-utils/seo-site-scan.js.map +1 -0
  159. package/src/lib/app-utils/seo-title-variables.js +1 -1
  160. package/src/lib/app-utils/seo-title-variables.js.map +1 -1
  161. package/src/lib/app-utils/server.d.ts +6 -9
  162. package/src/lib/app-utils/server.js +17 -27
  163. package/src/lib/app-utils/server.js.map +1 -1
  164. package/src/lib/app-utils/site-interactions.d.ts +501 -0
  165. package/src/lib/app-utils/site-interactions.js +554 -0
  166. package/src/lib/app-utils/site-interactions.js.map +1 -0
  167. package/src/lib/app-utils/{marketplace-theme.d.ts → site-theme.d.ts} +13 -2
  168. package/src/lib/app-utils/{marketplace-theme.js → site-theme.js} +5 -2
  169. package/src/lib/app-utils/site-theme.js.map +1 -0
  170. package/src/lib/app-utils/sitemap.d.ts +4 -3
  171. package/src/lib/app-utils/sitemap.js +9 -7
  172. package/src/lib/app-utils/sitemap.js.map +1 -1
  173. package/src/lib/app-utils/stale-build-error.d.ts +51 -0
  174. package/src/lib/app-utils/stale-build-error.js +100 -1
  175. package/src/lib/app-utils/stale-build-error.js.map +1 -1
  176. package/src/lib/app-utils/starter-templates.d.ts +20 -0
  177. package/src/lib/app-utils/starter-templates.js +49 -0
  178. package/src/lib/app-utils/starter-templates.js.map +1 -1
  179. package/src/lib/app-utils/tax-jurisdiction-figures.d.ts +118 -0
  180. package/src/lib/app-utils/tax-jurisdiction-figures.js +123 -0
  181. package/src/lib/app-utils/tax-jurisdiction-figures.js.map +1 -0
  182. package/src/lib/app-utils/theme-library.d.ts +10 -3
  183. package/src/lib/app-utils/theme-library.js +13 -4
  184. package/src/lib/app-utils/theme-library.js.map +1 -1
  185. package/src/lib/app-utils/{campaign-attribution.d.ts → utm-attribution.d.ts} +11 -6
  186. package/src/lib/app-utils/{campaign-attribution.js → utm-attribution.js} +13 -8
  187. package/src/lib/app-utils/utm-attribution.js.map +1 -0
  188. package/src/lib/app-utils/{campaign-forwarding.d.ts → utm-forwarding.d.ts} +14 -14
  189. package/src/lib/app-utils/{campaign-forwarding.js → utm-forwarding.js} +26 -26
  190. package/src/lib/app-utils/utm-forwarding.js.map +1 -0
  191. package/src/lib/app-utils/video-object.js +6 -5
  192. package/src/lib/app-utils/video-object.js.map +1 -1
  193. package/src/lib/app-utils/visitor-consent.d.ts +41 -164
  194. package/src/lib/app-utils/visitor-consent.js +66 -277
  195. package/src/lib/app-utils/visitor-consent.js.map +1 -1
  196. package/src/lib/app-utils/web-vitals-rum.d.ts +7 -7
  197. package/src/lib/app-utils/web-vitals-rum.js +31 -63
  198. package/src/lib/app-utils/web-vitals-rum.js.map +1 -1
  199. package/src/lib/app-utils/where-used.d.ts +11 -6
  200. package/src/lib/app-utils/where-used.js +3 -8
  201. package/src/lib/app-utils/where-used.js.map +1 -1
  202. package/src/lib/canvas-manager/canvas-manager.js +3 -3
  203. package/src/lib/canvas-manager/canvas-manager.js.map +1 -1
  204. package/src/lib/foundation/definitions/components.types.d.ts +1 -1
  205. package/src/lib/foundation/definitions/components.types.js +1 -1
  206. package/src/lib/foundation/definitions/components.types.js.map +1 -1
  207. package/src/lib/foundation/definitions/org-billing.types.d.ts +18 -135
  208. package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
  209. package/src/lib/foundation/definitions/organization.types.d.ts +6 -3
  210. package/src/lib/foundation/definitions/organization.types.js.map +1 -1
  211. package/src/lib/foundation/definitions/platform.types.d.ts +27 -5
  212. package/src/lib/foundation/definitions/platform.types.js.map +1 -1
  213. package/src/lib/foundation/definitions/write-deny-coverage.util.d.ts +16 -0
  214. package/src/lib/foundation/definitions/write-deny-coverage.util.js +20 -0
  215. package/src/lib/foundation/definitions/write-deny-coverage.util.js.map +1 -1
  216. package/src/lib/foundation/index.d.ts +1 -1
  217. package/src/lib/foundation/index.js.map +1 -1
  218. package/src/lib/plugin-manager/besigner-documents.d.ts +96 -0
  219. package/src/lib/plugin-manager/besigner-documents.js +61 -0
  220. package/src/lib/plugin-manager/besigner-documents.js.map +1 -0
  221. package/src/lib/plugin-manager/computed-variables.d.ts +71 -0
  222. package/src/lib/plugin-manager/computed-variables.js +74 -0
  223. package/src/lib/plugin-manager/computed-variables.js.map +1 -0
  224. package/src/lib/plugin-manager/custom-fields.d.ts +29 -2
  225. package/src/lib/plugin-manager/custom-fields.js +47 -1
  226. package/src/lib/plugin-manager/custom-fields.js.map +1 -1
  227. package/src/lib/plugin-manager/feature-plugins.d.ts +292 -20
  228. package/src/lib/plugin-manager/feature-plugins.js +105 -17
  229. package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
  230. package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +123 -0
  231. package/src/lib/plugin-manager/first-party-plugins.generated.js +785 -14
  232. package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
  233. package/src/lib/plugin-manager/plugin-activity-actions.d.ts +12 -0
  234. package/src/lib/plugin-manager/plugin-activity-actions.js +25 -0
  235. package/src/lib/plugin-manager/plugin-activity-actions.js.map +1 -1
  236. package/src/lib/plugin-manager/plugin-contributions.d.ts +1 -1
  237. package/src/lib/plugin-manager/plugin-contributions.js.map +1 -1
  238. package/src/lib/plugin-manager/plugin-declarations-repair.d.ts +36 -0
  239. package/src/lib/plugin-manager/plugin-declarations-repair.js +64 -0
  240. package/src/lib/plugin-manager/plugin-declarations-repair.js.map +1 -0
  241. package/src/lib/plugin-manager/plugin-dependents.d.ts +101 -0
  242. package/src/lib/plugin-manager/plugin-dependents.js +75 -0
  243. package/src/lib/plugin-manager/plugin-dependents.js.map +1 -0
  244. package/src/lib/plugin-manager/plugin-distribution.d.ts +55 -0
  245. package/src/lib/plugin-manager/plugin-distribution.js +45 -0
  246. package/src/lib/plugin-manager/plugin-distribution.js.map +1 -0
  247. package/src/lib/plugin-manager/plugin-host-collections.d.ts +17 -0
  248. package/src/lib/plugin-manager/plugin-host-collections.js +6 -0
  249. package/src/lib/plugin-manager/plugin-host-collections.js.map +1 -1
  250. package/src/lib/plugin-manager/plugin-host-resources.d.ts +133 -0
  251. package/src/lib/plugin-manager/plugin-host-resources.js +52 -0
  252. package/src/lib/plugin-manager/plugin-host-resources.js.map +1 -0
  253. package/src/lib/plugin-manager/plugin-org-erasure.d.ts +28 -2
  254. package/src/lib/plugin-manager/plugin-org-erasure.js +61 -2
  255. package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -1
  256. package/src/lib/plugin-manager/plugin-plan-entitlements.d.ts +123 -0
  257. package/src/lib/plugin-manager/plugin-plan-entitlements.js +101 -0
  258. package/src/lib/plugin-manager/plugin-plan-entitlements.js.map +1 -0
  259. package/src/lib/plugin-manager/plugin-record-index.d.ts +95 -0
  260. package/src/lib/plugin-manager/plugin-record-index.js +51 -0
  261. package/src/lib/plugin-manager/plugin-record-index.js.map +1 -0
  262. package/src/lib/plugin-manager/plugin-record-written.d.ts +58 -0
  263. package/src/lib/plugin-manager/plugin-record-written.js +42 -0
  264. package/src/lib/plugin-manager/plugin-record-written.js.map +1 -0
  265. package/src/lib/plugin-manager/plugin-revenue-sources.d.ts +213 -0
  266. package/src/lib/plugin-manager/plugin-revenue-sources.js +194 -0
  267. package/src/lib/plugin-manager/plugin-revenue-sources.js.map +1 -0
  268. package/src/lib/plugin-manager/plugin-site-bundle.d.ts +145 -0
  269. package/src/lib/plugin-manager/plugin-site-bundle.js +78 -0
  270. package/src/lib/plugin-manager/plugin-site-bundle.js.map +1 -0
  271. package/src/lib/plugin-manager/plugin-site-cache.d.ts +12 -0
  272. package/src/lib/plugin-manager/plugin-site-cache.js.map +1 -1
  273. package/src/lib/plugin-manager/plugin-site-export.d.ts +81 -0
  274. package/src/lib/plugin-manager/plugin-site-export.js +40 -0
  275. package/src/lib/plugin-manager/plugin-site-export.js.map +1 -0
  276. package/src/lib/plugin-manager/plugin-sitemap-sections.d.ts +88 -0
  277. package/src/lib/plugin-manager/plugin-sitemap-sections.js +29 -0
  278. package/src/lib/plugin-manager/plugin-sitemap-sections.js.map +1 -0
  279. package/src/lib/plugin-manager/plugin-tax-profile.d.ts +20 -4
  280. package/src/lib/plugin-manager/plugin-tax-profile.js.map +1 -1
  281. package/src/lib/plugin-manager/plugin-tax-return-sources.d.ts +255 -0
  282. package/src/lib/plugin-manager/plugin-tax-return-sources.js +191 -0
  283. package/src/lib/plugin-manager/plugin-tax-return-sources.js.map +1 -0
  284. package/src/lib/plugin-manager/plugin-template-sources.d.ts +75 -0
  285. package/src/lib/plugin-manager/plugin-template-sources.js +37 -0
  286. package/src/lib/plugin-manager/plugin-template-sources.js.map +1 -0
  287. package/src/lib/plugin-manager/plugin-usage-axes.d.ts +107 -0
  288. package/src/lib/plugin-manager/plugin-usage-axes.js +107 -0
  289. package/src/lib/plugin-manager/plugin-usage-axes.js.map +1 -0
  290. package/src/lib/plugin-manager/plugin-zones.d.ts +4 -5
  291. package/src/lib/plugin-manager/plugin-zones.js.map +1 -1
  292. package/src/lib/plugin-manager/realm-host-aglyn.generated.js +2 -0
  293. package/src/lib/plugin-manager/realm-host-aglyn.generated.js.map +1 -1
  294. package/src/lib/plugin-manager/record-captured-contact.d.ts +1 -14
  295. package/src/lib/plugin-manager/record-captured-contact.js +10 -32
  296. package/src/lib/plugin-manager/record-captured-contact.js.map +1 -1
  297. package/src/lib/plugin-manager/repeat-rows.d.ts +124 -0
  298. package/src/lib/plugin-manager/repeat-rows.js +108 -0
  299. package/src/lib/plugin-manager/repeat-rows.js.map +1 -0
  300. package/src/lib/plugin-manager/submission-record-target.d.ts +144 -0
  301. package/src/lib/plugin-manager/submission-record-target.js +125 -0
  302. package/src/lib/plugin-manager/submission-record-target.js.map +1 -0
  303. package/src/lib/plugin-manager/video-embed-provider.d.ts +108 -0
  304. package/src/lib/plugin-manager/video-embed-provider.js +165 -0
  305. package/src/lib/plugin-manager/video-embed-provider.js.map +1 -0
  306. package/src/lib/types/nodes.d.ts +2 -2
  307. package/src/lib/types/nodes.js.map +1 -1
  308. package/src/lib/app-utils/campaign-attribution.js.map +0 -1
  309. package/src/lib/app-utils/campaign-forwarding.js.map +0 -1
  310. package/src/lib/app-utils/contact-holder.d.ts +0 -68
  311. package/src/lib/app-utils/contact-holder.js +0 -129
  312. package/src/lib/app-utils/contact-holder.js.map +0 -1
  313. package/src/lib/app-utils/contact-merge.d.ts +0 -136
  314. package/src/lib/app-utils/contact-merge.js +0 -412
  315. package/src/lib/app-utils/contact-merge.js.map +0 -1
  316. package/src/lib/app-utils/crm-csv.d.ts +0 -239
  317. package/src/lib/app-utils/crm-csv.js +0 -467
  318. package/src/lib/app-utils/crm-csv.js.map +0 -1
  319. package/src/lib/app-utils/crm-digest.d.ts +0 -185
  320. package/src/lib/app-utils/crm-digest.js +0 -272
  321. package/src/lib/app-utils/crm-digest.js.map +0 -1
  322. package/src/lib/app-utils/form-dataset-binding.d.ts +0 -50
  323. package/src/lib/app-utils/form-dataset-binding.js +0 -74
  324. package/src/lib/app-utils/form-dataset-binding.js.map +0 -1
  325. package/src/lib/app-utils/list-import.d.ts +0 -158
  326. package/src/lib/app-utils/list-import.js +0 -332
  327. package/src/lib/app-utils/list-import.js.map +0 -1
  328. package/src/lib/app-utils/marketplace-listing-visibility.d.ts +0 -122
  329. package/src/lib/app-utils/marketplace-listing-visibility.js +0 -147
  330. package/src/lib/app-utils/marketplace-listing-visibility.js.map +0 -1
  331. package/src/lib/app-utils/marketplace-overrides.js.map +0 -1
  332. package/src/lib/app-utils/marketplace-provenance.js.map +0 -1
  333. package/src/lib/app-utils/marketplace-theme.js.map +0 -1
  334. package/src/lib/app-utils/marketplace-update-state.d.ts +0 -119
  335. package/src/lib/app-utils/marketplace-update-state.js +0 -132
  336. package/src/lib/app-utils/marketplace-update-state.js.map +0 -1
  337. package/src/lib/app-utils/publisher-agreement.d.ts +0 -289
  338. package/src/lib/app-utils/publisher-agreement.js +0 -321
  339. package/src/lib/app-utils/publisher-agreement.js.map +0 -1
  340. package/src/lib/app-utils/wistia-embed.d.ts +0 -104
  341. package/src/lib/app-utils/wistia-embed.js +0 -138
  342. package/src/lib/app-utils/wistia-embed.js.map +0 -1
  343. package/src/lib/app-utils/workflows.d.ts +0 -136
  344. package/src/lib/app-utils/workflows.js +0 -346
  345. package/src/lib/app-utils/workflows.js.map +0 -1
  346. package/src/lib/plugin-manager/commerce-zone-props.d.ts +0 -172
  347. package/src/lib/plugin-manager/commerce-zone-props.js +0 -31
  348. package/src/lib/plugin-manager/commerce-zone-props.js.map +0 -1
@@ -0,0 +1,64 @@
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
+ * The app's boot-time declarations step, offered to core so a reader that
18
+ * finds a declaration missing can run it (AGL-3080).
19
+ *
20
+ * Every app registers the plugins' declarations from its instrumentation, and
21
+ * wraps that in a `catch` so one bad declaration cannot cost every route. A
22
+ * boot that went wrong therefore leaves a process where whatever the
23
+ * declarations register is silently absent. Core cannot run the step itself:
24
+ * the generated manifest names every plugin, which is the one import core may
25
+ * not make. So the app hands the step over, and a core reader that finds
26
+ * nobody registered runs it and asks again.
27
+ *
28
+ * A leaf with no imports, so a client-safe module (the custom field registry)
29
+ * and a server one (contact capture) can both read it.
30
+ *
31
+ * Held on `globalThis` rather than in a module `let` (AGL-3412): the app
32
+ * offers it from `instrumentation.ts`, which Next compiles into a different
33
+ * module graph from the routes that read it, so a module-scoped slot is set
34
+ * in one copy and read as empty in the other.
35
+ */ const REPAIR_KEY = Symbol.for('@aglyn/aglyn:plugin-declarations-repair');
36
+ const globalScope = globalThis;
37
+ /**
38
+ * The app offers its boot step, so a reader that finds nobody can run it.
39
+ *
40
+ * Called at boot from the app's own instrumentation, beside the declarations
41
+ * themselves and BEFORE them — this is a plain assignment that cannot fail,
42
+ * and the failure it exists to repair is the one immediately after it.
43
+ *
44
+ * Idempotent and last-one-wins; an app registers exactly once per process.
45
+ */ export function registerPluginDeclarationsRepair(run) {
46
+ globalScope[REPAIR_KEY] = run;
47
+ }
48
+ /** Only for specs: forgets the registered boot step. */ export function resetPluginDeclarationsRepairForTests() {
49
+ globalScope[REPAIR_KEY] = null;
50
+ }
51
+ /**
52
+ * Runs the app's boot step, when it offered one. Answers whether one ran.
53
+ *
54
+ * Throws what the step throws; each caller decides what a failed repair
55
+ * costs it. The app's step memoizes its own promise, so this is one attempt
56
+ * per process rather than one per call.
57
+ */ export async function runPluginDeclarationsRepair() {
58
+ const repair = globalScope[REPAIR_KEY];
59
+ if (!repair) return false;
60
+ await repair();
61
+ return true;
62
+ }
63
+
64
+ //# sourceMappingURL=plugin-declarations-repair.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-declarations-repair.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 * The app's boot-time declarations step, offered to core so a reader that\n * finds a declaration missing can run it (AGL-3080).\n *\n * Every app registers the plugins' declarations from its instrumentation, and\n * wraps that in a `catch` so one bad declaration cannot cost every route. A\n * boot that went wrong therefore leaves a process where whatever the\n * declarations register is silently absent. Core cannot run the step itself:\n * the generated manifest names every plugin, which is the one import core may\n * not make. So the app hands the step over, and a core reader that finds\n * nobody registered runs it and asks again.\n *\n * A leaf with no imports, so a client-safe module (the custom field registry)\n * and a server one (contact capture) can both read it.\n *\n * Held on `globalThis` rather than in a module `let` (AGL-3412): the app\n * offers it from `instrumentation.ts`, which Next compiles into a different\n * module graph from the routes that read it, so a module-scoped slot is set\n * in one copy and read as empty in the other.\n */\nconst REPAIR_KEY = Symbol.for('@aglyn/aglyn:plugin-declarations-repair')\n\nconst globalScope = globalThis as typeof globalThis & {\n [REPAIR_KEY]?: (() => Promise<void>) | null\n}\n\n/**\n * The app offers its boot step, so a reader that finds nobody can run it.\n *\n * Called at boot from the app's own instrumentation, beside the declarations\n * themselves and BEFORE them — this is a plain assignment that cannot fail,\n * and the failure it exists to repair is the one immediately after it.\n *\n * Idempotent and last-one-wins; an app registers exactly once per process.\n */\nexport function registerPluginDeclarationsRepair(run: () => Promise<void>): void {\n globalScope[REPAIR_KEY] = run\n}\n\n/** Only for specs: forgets the registered boot step. */\nexport function resetPluginDeclarationsRepairForTests(): void {\n globalScope[REPAIR_KEY] = null\n}\n\n/**\n * Runs the app's boot step, when it offered one. Answers whether one ran.\n *\n * Throws what the step throws; each caller decides what a failed repair\n * costs it. The app's step memoizes its own promise, so this is one attempt\n * per process rather than one per call.\n */\nexport async function runPluginDeclarationsRepair(): Promise<boolean> {\n const repair = globalScope[REPAIR_KEY]\n if (!repair) return false\n await repair()\n return true\n}\n"],"names":["REPAIR_KEY","Symbol","for","globalScope","globalThis","registerPluginDeclarationsRepair","run","resetPluginDeclarationsRepairForTests","runPluginDeclarationsRepair","repair"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;;;;;;;CAmBC,GACD,MAAMA,aAAaC,OAAOC,GAAG,CAAC;AAE9B,MAAMC,cAAcC;AAIpB;;;;;;;;CAQC,GACD,OAAO,SAASC,iCAAiCC,GAAwB;IACvEH,WAAW,CAACH,WAAW,GAAGM;AAC5B;AAEA,sDAAsD,GACtD,OAAO,SAASC;IACdJ,WAAW,CAACH,WAAW,GAAG;AAC5B;AAEA;;;;;;CAMC,GACD,OAAO,eAAeQ;IACpB,MAAMC,SAASN,WAAW,CAACH,WAAW;IACtC,IAAI,CAACS,QAAQ,OAAO;IACpB,MAAMA;IACN,OAAO;AACT"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import type { BindingRefVia } from '../app-utils/binding-tokens';
18
+ /**
19
+ * WHAT DEPENDS ON A THING, answered by the plugins whose records refer to it.
20
+ *
21
+ * The "Used by" scan (`/api/hosts/where-used`) tells a person what they would
22
+ * break by deleting or renaming one of a site's things — a variable, a
23
+ * function, a workflow. What refers to it from a published page is the
24
+ * platform's to find: the scan reads the published screens and layouts
25
+ * itself. What refers to it from inside a plugin's records — a step that
26
+ * calls a function, a variable whose value is computed from somewhere else —
27
+ * is that plugin's: its storage, its field names, and its rule for what
28
+ * counts as a reference.
29
+ *
30
+ * So a plugin that keeps referring records registers a DEPENDENTS SOURCE: the
31
+ * kinds of thing it finds references to, and a `find` that answers the
32
+ * referring records of one site. The scan asks every source registered for
33
+ * the kind and lists what they answer beside its own findings. That is also
34
+ * how one plugin learns what another plugin's records need of its own: the
35
+ * owner of a thing asks the scan, and whichever plugin keeps the references
36
+ * answers, with neither importing the other.
37
+ *
38
+ * Its siblings: `plugin-record-index` lists a plugin's records for another
39
+ * surface to work on; this answers which of them point at something.
40
+ *
41
+ * ## Not registered is an answer; failing is not
42
+ *
43
+ * No source for a kind means no plugin keeps records that refer to one in
44
+ * this process, and the answer is complete. A source that THROWS is a scan
45
+ * that did not finish: its answer is marked incomplete, exactly as a scan
46
+ * that stopped at its read cap is, so "nothing uses this" is never said on
47
+ * the strength of a reader that failed.
48
+ */
49
+ /** One record that refers to the thing asked about. */
50
+ export interface PluginDependent {
51
+ /** What kind of record refers to it, in the words the scan lists it under ("variable"). */
52
+ type: string;
53
+ id: string;
54
+ /** What a person calls it. */
55
+ name: string;
56
+ /**
57
+ * How it refers: `id` survives a rename, `name` is a name reference a
58
+ * rename breaks. Both when the record carries both and both match.
59
+ */
60
+ via: BindingRefVia[];
61
+ }
62
+ /** The thing a scan asks about, on one site. */
63
+ export interface PluginDependentsRequest {
64
+ hostId: string;
65
+ /** What kind of thing it is: "function", "workflow". */
66
+ kind: string;
67
+ /** Its document id. */
68
+ id: string;
69
+ /** Its current name, for records that refer to it by name. */
70
+ name?: string;
71
+ }
72
+ export interface PluginDependentsAnswer {
73
+ dependents: PluginDependent[];
74
+ /** The source read less than all of its records, so more may refer to it. */
75
+ truncated: boolean;
76
+ }
77
+ export interface PluginDependentsSource {
78
+ /** The kinds of thing this source finds references to. */
79
+ kinds: readonly string[];
80
+ find(request: PluginDependentsRequest): Promise<PluginDependentsAnswer>;
81
+ }
82
+ export declare const PLUGIN_DEPENDENTS_SOURCES: import("./plugin-services").PluginServiceContract<PluginDependentsSource>;
83
+ /**
84
+ * Registers a plugin's dependents source. The owner is the loader's marker
85
+ * when a register fn is running, else `options.pluginId`; with neither the
86
+ * registration throws. A plugin registering several sources tells them apart
87
+ * with `key`; registering the same key again replaces it in place.
88
+ */
89
+ export declare function registerPluginDependentsSource(source: PluginDependentsSource, options?: {
90
+ pluginId?: string;
91
+ key?: string;
92
+ }): void;
93
+ /**
94
+ * Every dependent the registered sources answer for one thing, in
95
+ * registration order, and whether the answer is COMPLETE: `false` when any
96
+ * source read only part of its records or failed to answer at all.
97
+ */
98
+ export declare function findPluginDependents(request: PluginDependentsRequest): Promise<{
99
+ dependents: PluginDependent[];
100
+ complete: boolean;
101
+ }>;
@@ -0,0 +1,75 @@
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
+ */ import { _ as _extends } from "@swc/helpers/_/_extends";
17
+ import { getRegisteringPluginId } from "../app-utils/registering-plugin.js";
18
+ import { definePluginServiceContract, registerPluginService, resolvePluginServices } from "./plugin-services.js";
19
+ export const PLUGIN_DEPENDENTS_SOURCES = definePluginServiceContract('core.dependents-source', {
20
+ multiple: true
21
+ });
22
+ /**
23
+ * Registers a plugin's dependents source. The owner is the loader's marker
24
+ * when a register fn is running, else `options.pluginId`; with neither the
25
+ * registration throws. A plugin registering several sources tells them apart
26
+ * with `key`; registering the same key again replaces it in place.
27
+ */ export function registerPluginDependentsSource(source, options) {
28
+ var _ref, _getRegisteringPluginId, _ref1;
29
+ const pluginId = ((_ref = (_getRegisteringPluginId = getRegisteringPluginId()) != null ? _getRegisteringPluginId : options == null ? void 0 : options.pluginId) != null ? _ref : '').trim();
30
+ if (!pluginId) {
31
+ throw new Error('a dependents source was registered with no owner');
32
+ }
33
+ const kinds = source.kinds.map((kind)=>kind.trim()).filter(Boolean);
34
+ if (!kinds.length) {
35
+ throw new Error(`the dependents source of "${pluginId}" names no kind it answers for`);
36
+ }
37
+ registerPluginService(PLUGIN_DEPENDENTS_SOURCES, source, {
38
+ pluginId,
39
+ key: (_ref1 = options == null ? void 0 : options.key) != null ? _ref1 : kinds.join(',')
40
+ });
41
+ }
42
+ /**
43
+ * Every dependent the registered sources answer for one thing, in
44
+ * registration order, and whether the answer is COMPLETE: `false` when any
45
+ * source read only part of its records or failed to answer at all.
46
+ */ export async function findPluginDependents(request) {
47
+ const kind = request.kind.trim();
48
+ const sources = resolvePluginServices(PLUGIN_DEPENDENTS_SOURCES).filter((entry)=>entry.impl.kinds.some((one)=>one.trim() === kind));
49
+ const answers = await Promise.all(sources.map(async ({ pluginId, impl })=>{
50
+ try {
51
+ return await impl.find(_extends({}, request, {
52
+ kind
53
+ }));
54
+ } catch (error) {
55
+ console.error(`dependents source of "${pluginId}" failed for a ${kind}`, error);
56
+ return null;
57
+ }
58
+ }));
59
+ const dependents = [];
60
+ let complete = true;
61
+ for (const answer of answers){
62
+ if (!answer) {
63
+ complete = false;
64
+ continue;
65
+ }
66
+ if (answer.truncated) complete = false;
67
+ dependents.push(...answer.dependents);
68
+ }
69
+ return {
70
+ dependents,
71
+ complete
72
+ };
73
+ }
74
+
75
+ //# sourceMappingURL=plugin-dependents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-dependents.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { BindingRefVia } from '../app-utils/binding-tokens'\nimport { getRegisteringPluginId } from '../app-utils/registering-plugin'\nimport {\n definePluginServiceContract,\n registerPluginService,\n resolvePluginServices,\n} from './plugin-services'\n\n/**\n * WHAT DEPENDS ON A THING, answered by the plugins whose records refer to it.\n *\n * The \"Used by\" scan (`/api/hosts/where-used`) tells a person what they would\n * break by deleting or renaming one of a site's things — a variable, a\n * function, a workflow. What refers to it from a published page is the\n * platform's to find: the scan reads the published screens and layouts\n * itself. What refers to it from inside a plugin's records — a step that\n * calls a function, a variable whose value is computed from somewhere else —\n * is that plugin's: its storage, its field names, and its rule for what\n * counts as a reference.\n *\n * So a plugin that keeps referring records registers a DEPENDENTS SOURCE: the\n * kinds of thing it finds references to, and a `find` that answers the\n * referring records of one site. The scan asks every source registered for\n * the kind and lists what they answer beside its own findings. That is also\n * how one plugin learns what another plugin's records need of its own: the\n * owner of a thing asks the scan, and whichever plugin keeps the references\n * answers, with neither importing the other.\n *\n * Its siblings: `plugin-record-index` lists a plugin's records for another\n * surface to work on; this answers which of them point at something.\n *\n * ## Not registered is an answer; failing is not\n *\n * No source for a kind means no plugin keeps records that refer to one in\n * this process, and the answer is complete. A source that THROWS is a scan\n * that did not finish: its answer is marked incomplete, exactly as a scan\n * that stopped at its read cap is, so \"nothing uses this\" is never said on\n * the strength of a reader that failed.\n */\n\n/** One record that refers to the thing asked about. */\nexport interface PluginDependent {\n /** What kind of record refers to it, in the words the scan lists it under (\"variable\"). */\n type: string\n id: string\n /** What a person calls it. */\n name: string\n /**\n * How it refers: `id` survives a rename, `name` is a name reference a\n * rename breaks. Both when the record carries both and both match.\n */\n via: BindingRefVia[]\n}\n\n/** The thing a scan asks about, on one site. */\nexport interface PluginDependentsRequest {\n hostId: string\n /** What kind of thing it is: \"function\", \"workflow\". */\n kind: string\n /** Its document id. */\n id: string\n /** Its current name, for records that refer to it by name. */\n name?: string\n}\n\nexport interface PluginDependentsAnswer {\n dependents: PluginDependent[]\n /** The source read less than all of its records, so more may refer to it. */\n truncated: boolean\n}\n\nexport interface PluginDependentsSource {\n /** The kinds of thing this source finds references to. */\n kinds: readonly string[]\n find(request: PluginDependentsRequest): Promise<PluginDependentsAnswer>\n}\n\nexport const PLUGIN_DEPENDENTS_SOURCES = definePluginServiceContract<PluginDependentsSource>(\n 'core.dependents-source',\n { multiple: true },\n)\n\n/**\n * Registers a plugin's dependents source. The owner is the loader's marker\n * when a register fn is running, else `options.pluginId`; with neither the\n * registration throws. A plugin registering several sources tells them apart\n * with `key`; registering the same key again replaces it in place.\n */\nexport function registerPluginDependentsSource(\n source: PluginDependentsSource,\n options?: { pluginId?: string; key?: string },\n): void {\n const pluginId = (getRegisteringPluginId() ?? options?.pluginId ?? '').trim()\n if (!pluginId) {\n throw new Error('a dependents source was registered with no owner')\n }\n const kinds = source.kinds.map((kind) => kind.trim()).filter(Boolean)\n if (!kinds.length) {\n throw new Error(`the dependents source of \"${pluginId}\" names no kind it answers for`)\n }\n registerPluginService(PLUGIN_DEPENDENTS_SOURCES, source, {\n pluginId,\n key: options?.key ?? kinds.join(','),\n })\n}\n\n/**\n * Every dependent the registered sources answer for one thing, in\n * registration order, and whether the answer is COMPLETE: `false` when any\n * source read only part of its records or failed to answer at all.\n */\nexport async function findPluginDependents(\n request: PluginDependentsRequest,\n): Promise<{ dependents: PluginDependent[]; complete: boolean }> {\n const kind = request.kind.trim()\n const sources = resolvePluginServices(PLUGIN_DEPENDENTS_SOURCES).filter((entry) =>\n entry.impl.kinds.some((one) => one.trim() === kind),\n )\n const answers = await Promise.all(\n sources.map(async ({ pluginId, impl }) => {\n try {\n return await impl.find({ ...request, kind })\n } catch (error) {\n console.error(`dependents source of \"${pluginId}\" failed for a ${kind}`, error)\n return null\n }\n }),\n )\n const dependents: PluginDependent[] = []\n let complete = true\n for (const answer of answers) {\n if (!answer) {\n complete = false\n continue\n }\n if (answer.truncated) complete = false\n dependents.push(...answer.dependents)\n }\n return { dependents, complete }\n}\n"],"names":["getRegisteringPluginId","definePluginServiceContract","registerPluginService","resolvePluginServices","PLUGIN_DEPENDENTS_SOURCES","multiple","registerPluginDependentsSource","source","options","pluginId","trim","Error","kinds","map","kind","filter","Boolean","length","key","join","findPluginDependents","request","sources","entry","impl","some","one","answers","Promise","all","find","error","console","dependents","complete","answer","truncated","push"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;AAGD,SAASA,sBAAsB,QAAQ,qCAAiC;AACxE,SACEC,2BAA2B,EAC3BC,qBAAqB,EACrBC,qBAAqB,QAChB,uBAAmB;AAuE1B,OAAO,MAAMC,4BAA4BH,4BACvC,0BACA;IAAEI,UAAU;AAAK,GAClB;AAED;;;;;CAKC,GACD,OAAO,SAASC,+BACdC,MAA8B,EAC9BC,OAA6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,WAAWI,IAAI,IAAIF,OAAOF,UAAU;IACtC;IACA,OAAO;QAAEA;QAAYC;IAAS;AAChC"}
@@ -0,0 +1,55 @@
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
+ * Where published third-party plugin versions and their kill switches are
19
+ * stored, declared by the plugin that publishes them (AGL-3080).
20
+ *
21
+ * The realm loader is the platform's: it joins a workspace's install pins
22
+ * with the version each pin names, keeps only a version carrying the
23
+ * platform's trust grant, and drops one a kill switch has stopped. The
24
+ * documents it joins against are the distributing plugin's — a version is
25
+ * written under that plugin's listing when it is published, and its kill
26
+ * switch when staff revoke it. So the loader asks this declaration where they
27
+ * are, and names no plugin's collection itself.
28
+ *
29
+ * ## Compiled, never registered
30
+ *
31
+ * Every reader is a security gate on a server path that loads no plugin code:
32
+ * the published page's plugin join, both apps' remote server-bundle loaders,
33
+ * the console's realm gate. A runtime registry one of them had not filled
34
+ * would answer "nowhere" — and "nowhere" must mean "nothing loads", which is
35
+ * only safe because it is also what an unfilled registry would say. That is
36
+ * the AGL-3025 shape one step from the kill switch, so the plugin declares
37
+ * this as data in `plugins.config.json` and the generator compiles it.
38
+ *
39
+ * ## Absent is closed
40
+ *
41
+ * With no distributing plugin, {@link PLUGIN_DISTRIBUTION} is `null`, and
42
+ * every reader fails CLOSED: no version resolves, and every pin reads as
43
+ * revoked. A pin with no store to check it against cannot be vouched for.
44
+ */
45
+ export interface PluginDistribution {
46
+ /** The plugin that declared it. */
47
+ pluginId: string;
48
+ /** The top-level collection of listings, keyed by the id an install pins. */
49
+ listings: string;
50
+ /** The subcollection of a listing holding one document per version. */
51
+ versions: string;
52
+ /** The top-level collection of kill switches, keyed by the listing id. */
53
+ revocations: string;
54
+ }
55
+ export { PLUGIN_DISTRIBUTION } from './first-party-plugins.generated';
@@ -0,0 +1,45 @@
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
+ * Where published third-party plugin versions and their kill switches are
18
+ * stored, declared by the plugin that publishes them (AGL-3080).
19
+ *
20
+ * The realm loader is the platform's: it joins a workspace's install pins
21
+ * with the version each pin names, keeps only a version carrying the
22
+ * platform's trust grant, and drops one a kill switch has stopped. The
23
+ * documents it joins against are the distributing plugin's — a version is
24
+ * written under that plugin's listing when it is published, and its kill
25
+ * switch when staff revoke it. So the loader asks this declaration where they
26
+ * are, and names no plugin's collection itself.
27
+ *
28
+ * ## Compiled, never registered
29
+ *
30
+ * Every reader is a security gate on a server path that loads no plugin code:
31
+ * the published page's plugin join, both apps' remote server-bundle loaders,
32
+ * the console's realm gate. A runtime registry one of them had not filled
33
+ * would answer "nowhere" — and "nowhere" must mean "nothing loads", which is
34
+ * only safe because it is also what an unfilled registry would say. That is
35
+ * the AGL-3025 shape one step from the kill switch, so the plugin declares
36
+ * this as data in `plugins.config.json` and the generator compiles it.
37
+ *
38
+ * ## Absent is closed
39
+ *
40
+ * With no distributing plugin, {@link PLUGIN_DISTRIBUTION} is `null`, and
41
+ * every reader fails CLOSED: no version resolves, and every pin reads as
42
+ * revoked. A pin with no store to check it against cannot be vouched for.
43
+ */ export { PLUGIN_DISTRIBUTION } from "./first-party-plugins.generated.js";
44
+
45
+ //# sourceMappingURL=plugin-distribution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-distribution.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 * Where published third-party plugin versions and their kill switches are\n * stored, declared by the plugin that publishes them (AGL-3080).\n *\n * The realm loader is the platform's: it joins a workspace's install pins\n * with the version each pin names, keeps only a version carrying the\n * platform's trust grant, and drops one a kill switch has stopped. The\n * documents it joins against are the distributing plugin's — a version is\n * written under that plugin's listing when it is published, and its kill\n * switch when staff revoke it. So the loader asks this declaration where they\n * are, and names no plugin's collection itself.\n *\n * ## Compiled, never registered\n *\n * Every reader is a security gate on a server path that loads no plugin code:\n * the published page's plugin join, both apps' remote server-bundle loaders,\n * the console's realm gate. A runtime registry one of them had not filled\n * would answer \"nowhere\" — and \"nowhere\" must mean \"nothing loads\", which is\n * only safe because it is also what an unfilled registry would say. That is\n * the AGL-3025 shape one step from the kill switch, so the plugin declares\n * this as data in `plugins.config.json` and the generator compiles it.\n *\n * ## Absent is closed\n *\n * With no distributing plugin, {@link PLUGIN_DISTRIBUTION} is `null`, and\n * every reader fails CLOSED: no version resolves, and every pin reads as\n * revoked. A pin with no store to check it against cannot be vouched for.\n */\nexport interface PluginDistribution {\n /** The plugin that declared it. */\n pluginId: string\n /** The top-level collection of listings, keyed by the id an install pins. */\n listings: string\n /** The subcollection of a listing holding one document per version. */\n versions: string\n /** The top-level collection of kill switches, keyed by the listing id. */\n revocations: string\n}\n\nexport { PLUGIN_DISTRIBUTION } from './first-party-plugins.generated'\n"],"names":["PLUGIN_DISTRIBUTION"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BC,GAYD,SAASA,mBAAmB,QAAQ,qCAAiC"}
@@ -14,6 +14,8 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
+ import type { PluginHostResourceDeclaration } from './plugin-host-resources';
18
+ import type { PluginHostCollectionSiteExport } from './plugin-site-export';
17
19
  /**
18
20
  * The host subcollections a plugin owns, declared by that plugin (AGL-3124).
19
21
  *
@@ -111,6 +113,21 @@ export interface PluginHostCollectionDeclaration {
111
113
  * counters total beside its screens, layouts, components and templates.
112
114
  */
113
115
  artifact?: boolean;
116
+ /**
117
+ * The kind a client CREATES a document here as, through the platform's
118
+ * generic create route — see `plugin-host-resources.ts`. Compiled only: a
119
+ * runtime registration carrying one is refused, because the route is the
120
+ * writable-field allow-list and must never depend on a registry a process
121
+ * may not have filled.
122
+ */
123
+ resource?: PluginHostResourceDeclaration;
124
+ /**
125
+ * How the whole-site export carries this collection, and what a restore
126
+ * writes back — see `plugin-site-export.ts`. Compiled only, like
127
+ * `resource`: a backup that depended on a registry a process had not
128
+ * filled would be missing the collection with nothing to say so.
129
+ */
130
+ siteExport?: PluginHostCollectionSiteExport;
114
131
  }
115
132
  /** A declaration with the plugin that made it. */
116
133
  export type ResolvedPluginHostCollection = PluginHostCollectionDeclaration & {
@@ -36,6 +36,12 @@ export const PLUGIN_HOST_COLLECTIONS = definePluginServiceContract('core.host-co
36
36
  var _declaration_name, _declaration_mediaScanReason;
37
37
  const name = (_ref = (_declaration_name = declaration.name) == null ? void 0 : _declaration_name.trim()) != null ? _ref : '';
38
38
  if (!name) throw new Error('a host collection needs a name');
39
+ if (declaration.resource) {
40
+ throw new Error(`host collection "${name}" declares a resource kind at runtime: the ` + 'create route reads only the compiled declarations in ' + 'plugins.config.json, so a kind registered here could never be created');
41
+ }
42
+ if (declaration.siteExport) {
43
+ throw new Error(`host collection "${name}" declares a site export at runtime: the ` + 'export and restore read only the compiled declarations in ' + 'plugins.config.json, so a backup would silently leave it out');
44
+ }
39
45
  if (declaration.mediaScan === 'none' && !((_declaration_mediaScanReason = declaration.mediaScanReason) == null ? void 0 : _declaration_mediaScanReason.trim())) {
40
46
  throw new Error(`host collection "${name}" is not scanned for media and says no ` + 'reason: mediaScanReason has to name what scanning would cost, or ' + 'what it would get wrong');
41
47
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-host-collections.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getRegisteringPluginId } from '../app-utils/registering-plugin'\nimport { hostContentCollectionLabel } from '../foundation/definitions/host-content-collections'\nimport {\n PLUGIN_HOST_COLLECTIONS_DECLARED,\n PLUGIN_ORG_COLLECTIONS_DECLARED,\n} from './first-party-plugins.generated'\nimport {\n definePluginServiceContract,\n registerPluginService,\n resolvePluginServices,\n} from './plugin-services'\n\n/**\n * The host subcollections a plugin owns, declared by that plugin (AGL-3124).\n *\n * A first-party plugin writes ordinary documents under `hosts/{hostId}` with\n * the ordinary SDKs, and several core surfaces have to know which plugin owns\n * which of them: the media-usage scan decides what to read before an author\n * deletes an asset, a reference row deep-links to the console page that shows\n * one, and the artifact counters total what a site holds.\n *\n * Core answered all three by listing the collections and switching over plugin\n * ids — `services` and `resources` are bookings', `campaigns` and `experiments`\n * are marketing's, `functions`, `variables` and `actions` are logic's — which\n * is the platform holding a map of its plugins' storage. Every entry is also a\n * thing that can silently fall out of step: a plugin that ships a new\n * collection is invisible to all three until somebody remembers the list.\n *\n * So the plugin declares what it owns, once, and the three readers ask.\n *\n * ## What a declaration says, and what it deliberately does not\n *\n * A declaration names the collection, how the media scan should treat it, the\n * console slug a reference row links to, and whether a document in it is an\n * ARTIFACT the site's counters total beside screens and layouts. It does NOT\n * name fields: the scan flattens a document generically on purpose, and a\n * field list here would be the same staleness trap one level down.\n *\n * The media default is inherited from the scan's own rule and is the whole\n * reason that rule survives this move: **a collection is scanned unless its\n * declaration says why it is not.** A plugin that ships a media-bearing\n * collection is covered the day it lands rather than the day somebody\n * remembers it, and `mediaScan: 'none'` without a reason is refused — \"it\n * probably has no images in it\" is the guess the scan's design exists to\n * avoid making.\n *\n * ## One collection, one owner\n *\n * Two plugins writing one collection under one site would be two schemas in\n * one place, and the scan, the deep link and the counters would each pick a\n * winner by registration order. So a collection another plugin declared is\n * refused naming both, and the incumbent keeps it; the same plugin declaring\n * again replaces its own.\n *\n * ## Declared in the config, not registered at boot (AGL-3080)\n *\n * A first-party plugin declares its collections in `plugins.config.json` and\n * the generator compiles them, so every reader has the whole list the moment\n * it imports this module. That is not a preference: the media scan answers\n * \"what uses this asset\" in the moment before an author deletes it, every way\n * it can be wrong points at \"unused\", and it runs inside a console request\n * that loads no plugin code. A registry that request had not filled would\n * report every plugin-owned document as holding nothing, with nothing red —\n * the shape of AGL-3025, on the one answer here that somebody acts on.\n *\n * {@link registerPluginHostCollections} is still the door for a plugin the\n * compiler never sees, and the two compose: the compiled rows are a floor a\n * registration cannot lower, and a registration naming a compiled collection\n * is refused the same way a second plugin's would be.\n *\n * Reached by its own subpath rather than through `plugin-manager/index.ts`:\n * the readers are the media scan, the console counters and the reference\n * rows, none of which a published page renders.\n */\n\n/** How the media-usage scan reads a collection. */\nexport type PluginHostCollectionMediaScan =\n /** Flattened and searched generically, with no per-collection decoder. */\n | 'generic'\n /** Read by a pass that knows its shape, the way screens and layouts are. */\n | 'own'\n /** Not read; {@link PluginHostCollectionDeclaration.mediaScanReason} says why. */\n | 'none'\n\nexport interface PluginHostCollectionDeclaration {\n /** The subcollection under `hosts/{hostId}`, spelled as Firestore holds it. */\n name: string\n /**\n * What one of its documents is called in a reference row. Derived from the\n * collection name when absent, so a new collection reads correctly without\n * a second list to keep in step.\n */\n label?: string\n /** Default `generic` — see this module's note on why the default is to scan. */\n mediaScan?: PluginHostCollectionMediaScan\n /**\n * Why the scan does not read it. Required with `mediaScan: 'none'`, and it\n * has to answer what scanning would COST or what it would get WRONG.\n */\n mediaScanReason?: string\n /**\n * The `[pluginSlug]` segment of the plugin's console hub, for a reference\n * row's deep link. Optional on purpose: a row with no destination still\n * renders as text, which is better than the row not existing.\n */\n routeSlug?: string\n /**\n * Whether a document here is a live ARTIFACT — something the site's own\n * counters total beside its screens, layouts, components and templates.\n */\n artifact?: boolean\n}\n\n/** A declaration with the plugin that made it. */\nexport type ResolvedPluginHostCollection = PluginHostCollectionDeclaration & {\n pluginId: string\n}\n\nexport const PLUGIN_HOST_COLLECTIONS =\n definePluginServiceContract<PluginHostCollectionDeclaration>(\n 'core.host-collections',\n { multiple: true },\n )\n\n/**\n * Declares the host subcollections the registering plugin owns. The owner is\n * the loader's marker when a register fn is running, else `options.pluginId`;\n * with neither the registration throws. A collection another plugin declared\n * throws naming both, and nothing in the same call is registered — a\n * declaration is one plugin's statement about its own storage, so half of it\n * landing would be worse than none.\n */\nexport function registerPluginHostCollections(\n collections: readonly PluginHostCollectionDeclaration[],\n options?: { pluginId?: string },\n): void {\n const pluginId = (getRegisteringPluginId() ?? options?.pluginId ?? '').trim()\n const prepared = collections.map((declaration) => {\n const name = declaration.name?.trim() ?? ''\n if (!name) throw new Error('a host collection needs a name')\n if (declaration.mediaScan === 'none' && !declaration.mediaScanReason?.trim()) {\n throw new Error(\n `host collection \"${name}\" is not scanned for media and says no ` +\n 'reason: mediaScanReason has to name what scanning would cost, or ' +\n 'what it would get wrong',\n )\n }\n const incumbent = pluginHostCollection(name)\n if (incumbent && pluginId && incumbent.pluginId !== pluginId) {\n throw new Error(\n `host collection \"${name}\" is already declared by ` +\n `\"${incumbent.pluginId}\"; refused \"${pluginId}\"`,\n )\n }\n return { ...declaration, name }\n })\n for (const declaration of prepared) {\n registerPluginService(PLUGIN_HOST_COLLECTIONS, declaration, {\n ...(options?.pluginId ? { pluginId: options.pluginId } : {}),\n key: declaration.name,\n })\n }\n}\n\n/**\n * Every declared collection, with its owner: the compiled rows first, then\n * anything registered at runtime that they do not already name.\n */\nexport function listPluginHostCollections(): ResolvedPluginHostCollection[] {\n const compiled = PLUGIN_HOST_COLLECTIONS_DECLARED.map((row) => ({ ...row }))\n const named = new Set(compiled.map((row) => row.name))\n const registered = resolvePluginServices(PLUGIN_HOST_COLLECTIONS)\n .map((entry) => ({ ...entry.impl, pluginId: entry.pluginId }))\n .filter((row) => !named.has(row.name))\n return [...compiled, ...registered]\n}\n\n/** One declared collection by name, with its owner, or `null`. */\nexport function pluginHostCollection(\n name: string,\n): ResolvedPluginHostCollection | null {\n const key = name.trim()\n return listPluginHostCollections().find((one) => one.name === key) ?? null\n}\n\n/** The plugin that owns a collection, or `undefined` when none declares it. */\nexport function pluginIdForHostCollection(name: string): string | undefined {\n return pluginHostCollection(name)?.pluginId\n}\n\n/**\n * The console hub slug a reference row for this collection links to, or\n * `undefined` when the owner routes none. A row found by the org pass names an\n * org collection, so an org declaration answers when no host one does.\n */\nexport function pluginHostCollectionRouteSlug(\n name: string,\n): string | undefined {\n return pluginHostCollection(name)?.routeSlug ?? pluginOrgCollection(name)?.routeSlug\n}\n\n/**\n * The declared collections the media scan reads generically — the list the\n * scan walks, in place of one core keeps by hand.\n */\nexport function pluginHostCollectionsScannedGenerically(): string[] {\n return listPluginHostCollections()\n .filter((one) => (one.mediaScan ?? 'generic') === 'generic')\n .map((one) => one.name)\n}\n\n/** The declared collections the scan does not read, with the reason given. */\nexport function pluginHostCollectionsExcludedFromMediaScan(): Array<{\n name: string\n reason: string\n pluginId: string\n}> {\n return listPluginHostCollections()\n .filter((one) => one.mediaScan === 'none')\n .map((one) => ({\n name: one.name,\n reason: one.mediaScanReason ?? '',\n pluginId: one.pluginId,\n }))\n}\n\n/** The declared collections whose documents the site's artifact counters total. */\nexport function pluginHostArtifactCollections(): string[] {\n return listPluginHostCollections()\n .filter((one) => one.artifact === true)\n .map((one) => one.name)\n}\n\n/**\n * What to call one of a collection's documents in a reference row: the\n * declared label, else core's own derivation from the name.\n *\n * The derivation is `hostContentCollectionLabel` rather than a second copy of\n * it, because a reference row does not know or care whether the collection it\n * names belongs to a plugin — two spellings of \"Product category\" reachable\n * by two paths is the kind of difference nobody notices until a screenshot\n * disagrees with a test.\n */\nexport function pluginHostCollectionLabel(name: string): string {\n const declared = (\n pluginHostCollection(name)?.label ?? pluginOrgCollection(name)?.label\n )?.trim()\n return declared || hostContentCollectionLabel(name)\n}\n\n/**\n * The ORG collections a plugin owns, for the media-usage scan (AGL-3273).\n *\n * Everything above is about `hosts/{hostId}/…`, and the scan's completeness\n * guard sweeps the source for exactly that shape. Some plugin storage lives on\n * the organization instead — Marketing's email sends are\n * `orgs/{orgId}/campaigns`, each naming the site it was sent as — and a\n * collection the scan does not know about is read as holding nothing, which\n * is the answer \"Find where this is used\" must never give by omission.\n *\n * So a plugin declares those too, in the `orgCollections` block of\n * `plugins.config.json`, compiled like the host rows. The same inverted\n * default holds — scanned unless the declaration says why not — and\n * `siteField` names the field that says which site a document belongs to, so\n * a reference row can name that site and link into its hub.\n *\n * Compiled only. There is no runtime door: nothing outside the first-party\n * config writes org storage the scan must read, and a door nobody uses is a\n * registry the scan's request would have to be trusted to have filled.\n */\nexport interface PluginOrgCollectionDeclaration {\n /** The subcollection under `orgs/{orgId}`, spelled as Firestore holds it. */\n name: string\n /** What one of its documents is called in a reference row. */\n label?: string\n /** Default `generic`. An org collection has no dedicated pass to be `own`. */\n mediaScan?: Exclude<PluginHostCollectionMediaScan, 'own'>\n /** Why the scan does not read it. Required with `mediaScan: 'none'`. */\n mediaScanReason?: string\n /** The `[pluginSlug]` of the site hub a reference row links to. */\n routeSlug?: string\n /**\n * The field on each document naming the site it BELONGS to. Two readers\n * act on it: a reference row names that site and links into its hub, and\n * deleting the site deletes the documents that name it (`eraseHost`). A\n * collection whose documents are placed on sites rather than owned by one\n * declares none.\n */\n siteField?: string\n /**\n * The states in which a document the site owns is work still IN FLIGHT —\n * `{ field: 'status', values: ['scheduled', 'sending'] }` — and so holds\n * the site where it is. Moving the site to another organization is refused\n * while any document naming it matches (AGL-3381): the work would land\n * for an organization the site no longer belongs to. Needs `siteField`.\n */\n holdsTransferWhile?: { field: string; values: string[] }\n}\n\n/** An org declaration with the plugin that made it. */\nexport type ResolvedPluginOrgCollection = PluginOrgCollectionDeclaration & {\n pluginId: string\n}\n\n/** Every declared org collection, with its owner. */\nexport function listPluginOrgCollections(): ResolvedPluginOrgCollection[] {\n return PLUGIN_ORG_COLLECTIONS_DECLARED.map((row) => ({ ...row }))\n}\n\n/** One declared org collection by name, with its owner, or `null`. */\nexport function pluginOrgCollection(\n name: string,\n): ResolvedPluginOrgCollection | null {\n const key = name.trim()\n return listPluginOrgCollections().find((one) => one.name === key) ?? null\n}\n\n/** The declared org collections the media scan reads generically. */\nexport function pluginOrgCollectionsScannedGenerically(): ResolvedPluginOrgCollection[] {\n return listPluginOrgCollections().filter(\n (one) => (one.mediaScan ?? 'generic') === 'generic',\n )\n}\n"],"names":["getRegisteringPluginId","hostContentCollectionLabel","PLUGIN_HOST_COLLECTIONS_DECLARED","PLUGIN_ORG_COLLECTIONS_DECLARED","definePluginServiceContract","registerPluginService","resolvePluginServices","PLUGIN_HOST_COLLECTIONS","multiple","registerPluginHostCollections","collections","options","pluginId","trim","prepared","map","declaration","name","Error","mediaScan","mediaScanReason","incumbent","pluginHostCollection","key","listPluginHostCollections","compiled","row","named","Set","registered","entry","impl","filter","has","find","one","pluginIdForHostCollection","pluginHostCollectionRouteSlug","pluginOrgCollection","routeSlug","pluginHostCollectionsScannedGenerically","pluginHostCollectionsExcludedFromMediaScan","reason","pluginHostArtifactCollections","artifact","pluginHostCollectionLabel","declared","label","listPluginOrgCollections","pluginOrgCollectionsScannedGenerically"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,sBAAsB,QAAQ,qCAAiC;AACxE,SAASC,0BAA0B,QAAQ,wDAAoD;AAC/F,SACEC,gCAAgC,EAChCC,+BAA+B,QAC1B,qCAAiC;AACxC,SACEC,2BAA2B,EAC3BC,qBAAqB,EACrBC,qBAAqB,QAChB,uBAAmB;AA4G1B,OAAO,MAAMC,0BACXH,4BACE,yBACA;IAAEI,UAAU;AAAK,GAClB;AAEH;;;;;;;CAOC,GACD,OAAO,SAASC,8BACdC,WAAuD,EACvDC,OAA+B;QAEbX,MAAAA;IAAlB,MAAMY,WAAW,EAACZ,QAAAA,0BAAAA,oCAAAA,0BAA4BW,2BAAAA,QAASC,QAAQ,YAA7CZ,OAAiD,IAAIa,IAAI;IAC3E,MAAMC,WAAWJ,YAAYK,GAAG,CAAC,CAACC;;YACnBA,mBAE4BA;QAFzC,MAAMC,gBAAOD,oBAAAA,YAAYC,IAAI,qBAAhBD,kBAAkBH,IAAI,qBAAM;QACzC,IAAI,CAACI,MAAM,MAAM,IAAIC,MAAM;QAC3B,IAAIF,YAAYG,SAAS,KAAK,UAAU,GAACH,+BAAAA,YAAYI,eAAe,qBAA3BJ,6BAA6BH,IAAI,KAAI;YAC5E,MAAM,IAAIK,MACR,CAAC,iBAAiB,EAAED,KAAK,uCAAuC,CAAC,GAC/D,sEACA;QAEN;QACA,MAAMI,YAAYC,qBAAqBL;QACvC,IAAII,aAAaT,YAAYS,UAAUT,QAAQ,KAAKA,UAAU;YAC5D,MAAM,IAAIM,MACR,CAAC,iBAAiB,EAAED,KAAK,yBAAyB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BhB,MAAM,CACtC,CAACG;YAASA;eAAD,EAACA,iBAAAA,IAAIhB,SAAS,YAAbgB,iBAAiB,eAAe;;AAE9C"}
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-host-collections.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getRegisteringPluginId } from '../app-utils/registering-plugin'\nimport { hostContentCollectionLabel } from '../foundation/definitions/host-content-collections'\nimport type { PluginHostResourceDeclaration } from './plugin-host-resources'\nimport type { PluginHostCollectionSiteExport } from './plugin-site-export'\nimport {\n PLUGIN_HOST_COLLECTIONS_DECLARED,\n PLUGIN_ORG_COLLECTIONS_DECLARED,\n} from './first-party-plugins.generated'\nimport {\n definePluginServiceContract,\n registerPluginService,\n resolvePluginServices,\n} from './plugin-services'\n\n/**\n * The host subcollections a plugin owns, declared by that plugin (AGL-3124).\n *\n * A first-party plugin writes ordinary documents under `hosts/{hostId}` with\n * the ordinary SDKs, and several core surfaces have to know which plugin owns\n * which of them: the media-usage scan decides what to read before an author\n * deletes an asset, a reference row deep-links to the console page that shows\n * one, and the artifact counters total what a site holds.\n *\n * Core answered all three by listing the collections and switching over plugin\n * ids — `services` and `resources` are bookings', `campaigns` and `experiments`\n * are marketing's, `functions`, `variables` and `actions` are logic's — which\n * is the platform holding a map of its plugins' storage. Every entry is also a\n * thing that can silently fall out of step: a plugin that ships a new\n * collection is invisible to all three until somebody remembers the list.\n *\n * So the plugin declares what it owns, once, and the three readers ask.\n *\n * ## What a declaration says, and what it deliberately does not\n *\n * A declaration names the collection, how the media scan should treat it, the\n * console slug a reference row links to, and whether a document in it is an\n * ARTIFACT the site's counters total beside screens and layouts. It does NOT\n * name fields: the scan flattens a document generically on purpose, and a\n * field list here would be the same staleness trap one level down.\n *\n * The media default is inherited from the scan's own rule and is the whole\n * reason that rule survives this move: **a collection is scanned unless its\n * declaration says why it is not.** A plugin that ships a media-bearing\n * collection is covered the day it lands rather than the day somebody\n * remembers it, and `mediaScan: 'none'` without a reason is refused — \"it\n * probably has no images in it\" is the guess the scan's design exists to\n * avoid making.\n *\n * ## One collection, one owner\n *\n * Two plugins writing one collection under one site would be two schemas in\n * one place, and the scan, the deep link and the counters would each pick a\n * winner by registration order. So a collection another plugin declared is\n * refused naming both, and the incumbent keeps it; the same plugin declaring\n * again replaces its own.\n *\n * ## Declared in the config, not registered at boot (AGL-3080)\n *\n * A first-party plugin declares its collections in `plugins.config.json` and\n * the generator compiles them, so every reader has the whole list the moment\n * it imports this module. That is not a preference: the media scan answers\n * \"what uses this asset\" in the moment before an author deletes it, every way\n * it can be wrong points at \"unused\", and it runs inside a console request\n * that loads no plugin code. A registry that request had not filled would\n * report every plugin-owned document as holding nothing, with nothing red —\n * the shape of AGL-3025, on the one answer here that somebody acts on.\n *\n * {@link registerPluginHostCollections} is still the door for a plugin the\n * compiler never sees, and the two compose: the compiled rows are a floor a\n * registration cannot lower, and a registration naming a compiled collection\n * is refused the same way a second plugin's would be.\n *\n * Reached by its own subpath rather than through `plugin-manager/index.ts`:\n * the readers are the media scan, the console counters and the reference\n * rows, none of which a published page renders.\n */\n\n/** How the media-usage scan reads a collection. */\nexport type PluginHostCollectionMediaScan =\n /** Flattened and searched generically, with no per-collection decoder. */\n | 'generic'\n /** Read by a pass that knows its shape, the way screens and layouts are. */\n | 'own'\n /** Not read; {@link PluginHostCollectionDeclaration.mediaScanReason} says why. */\n | 'none'\n\nexport interface PluginHostCollectionDeclaration {\n /** The subcollection under `hosts/{hostId}`, spelled as Firestore holds it. */\n name: string\n /**\n * What one of its documents is called in a reference row. Derived from the\n * collection name when absent, so a new collection reads correctly without\n * a second list to keep in step.\n */\n label?: string\n /** Default `generic` — see this module's note on why the default is to scan. */\n mediaScan?: PluginHostCollectionMediaScan\n /**\n * Why the scan does not read it. Required with `mediaScan: 'none'`, and it\n * has to answer what scanning would COST or what it would get WRONG.\n */\n mediaScanReason?: string\n /**\n * The `[pluginSlug]` segment of the plugin's console hub, for a reference\n * row's deep link. Optional on purpose: a row with no destination still\n * renders as text, which is better than the row not existing.\n */\n routeSlug?: string\n /**\n * Whether a document here is a live ARTIFACT — something the site's own\n * counters total beside its screens, layouts, components and templates.\n */\n artifact?: boolean\n /**\n * The kind a client CREATES a document here as, through the platform's\n * generic create route — see `plugin-host-resources.ts`. Compiled only: a\n * runtime registration carrying one is refused, because the route is the\n * writable-field allow-list and must never depend on a registry a process\n * may not have filled.\n */\n resource?: PluginHostResourceDeclaration\n /**\n * How the whole-site export carries this collection, and what a restore\n * writes back — see `plugin-site-export.ts`. Compiled only, like\n * `resource`: a backup that depended on a registry a process had not\n * filled would be missing the collection with nothing to say so.\n */\n siteExport?: PluginHostCollectionSiteExport\n}\n\n/** A declaration with the plugin that made it. */\nexport type ResolvedPluginHostCollection = PluginHostCollectionDeclaration & {\n pluginId: string\n}\n\nexport const PLUGIN_HOST_COLLECTIONS =\n definePluginServiceContract<PluginHostCollectionDeclaration>(\n 'core.host-collections',\n { multiple: true },\n )\n\n/**\n * Declares the host subcollections the registering plugin owns. The owner is\n * the loader's marker when a register fn is running, else `options.pluginId`;\n * with neither the registration throws. A collection another plugin declared\n * throws naming both, and nothing in the same call is registered — a\n * declaration is one plugin's statement about its own storage, so half of it\n * landing would be worse than none.\n */\nexport function registerPluginHostCollections(\n collections: readonly PluginHostCollectionDeclaration[],\n options?: { pluginId?: string },\n): void {\n const pluginId = (getRegisteringPluginId() ?? options?.pluginId ?? '').trim()\n const prepared = collections.map((declaration) => {\n const name = declaration.name?.trim() ?? ''\n if (!name) throw new Error('a host collection needs a name')\n if (declaration.resource) {\n throw new Error(\n `host collection \"${name}\" declares a resource kind at runtime: the ` +\n 'create route reads only the compiled declarations in ' +\n 'plugins.config.json, so a kind registered here could never be created',\n )\n }\n if (declaration.siteExport) {\n throw new Error(\n `host collection \"${name}\" declares a site export at runtime: the ` +\n 'export and restore read only the compiled declarations in ' +\n 'plugins.config.json, so a backup would silently leave it out',\n )\n }\n if (declaration.mediaScan === 'none' && !declaration.mediaScanReason?.trim()) {\n throw new Error(\n `host collection \"${name}\" is not scanned for media and says no ` +\n 'reason: mediaScanReason has to name what scanning would cost, or ' +\n 'what it would get wrong',\n )\n }\n const incumbent = pluginHostCollection(name)\n if (incumbent && pluginId && incumbent.pluginId !== pluginId) {\n throw new Error(\n `host collection \"${name}\" is already declared by ` +\n `\"${incumbent.pluginId}\"; refused \"${pluginId}\"`,\n )\n }\n return { ...declaration, name }\n })\n for (const declaration of prepared) {\n registerPluginService(PLUGIN_HOST_COLLECTIONS, declaration, {\n ...(options?.pluginId ? { pluginId: options.pluginId } : {}),\n key: declaration.name,\n })\n }\n}\n\n/**\n * Every declared collection, with its owner: the compiled rows first, then\n * anything registered at runtime that they do not already name.\n */\nexport function listPluginHostCollections(): ResolvedPluginHostCollection[] {\n const compiled = PLUGIN_HOST_COLLECTIONS_DECLARED.map((row) => ({ ...row }))\n const named = new Set(compiled.map((row) => row.name))\n const registered = resolvePluginServices(PLUGIN_HOST_COLLECTIONS)\n .map((entry) => ({ ...entry.impl, pluginId: entry.pluginId }))\n .filter((row) => !named.has(row.name))\n return [...compiled, ...registered]\n}\n\n/** One declared collection by name, with its owner, or `null`. */\nexport function pluginHostCollection(\n name: string,\n): ResolvedPluginHostCollection | null {\n const key = name.trim()\n return listPluginHostCollections().find((one) => one.name === key) ?? null\n}\n\n/** The plugin that owns a collection, or `undefined` when none declares it. */\nexport function pluginIdForHostCollection(name: string): string | undefined {\n return pluginHostCollection(name)?.pluginId\n}\n\n/**\n * The console hub slug a reference row for this collection links to, or\n * `undefined` when the owner routes none. A row found by the org pass names an\n * org collection, so an org declaration answers when no host one does.\n */\nexport function pluginHostCollectionRouteSlug(\n name: string,\n): string | undefined {\n return pluginHostCollection(name)?.routeSlug ?? pluginOrgCollection(name)?.routeSlug\n}\n\n/**\n * The declared collections the media scan reads generically — the list the\n * scan walks, in place of one core keeps by hand.\n */\nexport function pluginHostCollectionsScannedGenerically(): string[] {\n return listPluginHostCollections()\n .filter((one) => (one.mediaScan ?? 'generic') === 'generic')\n .map((one) => one.name)\n}\n\n/** The declared collections the scan does not read, with the reason given. */\nexport function pluginHostCollectionsExcludedFromMediaScan(): Array<{\n name: string\n reason: string\n pluginId: string\n}> {\n return listPluginHostCollections()\n .filter((one) => one.mediaScan === 'none')\n .map((one) => ({\n name: one.name,\n reason: one.mediaScanReason ?? '',\n pluginId: one.pluginId,\n }))\n}\n\n/** The declared collections whose documents the site's artifact counters total. */\nexport function pluginHostArtifactCollections(): string[] {\n return listPluginHostCollections()\n .filter((one) => one.artifact === true)\n .map((one) => one.name)\n}\n\n/**\n * What to call one of a collection's documents in a reference row: the\n * declared label, else core's own derivation from the name.\n *\n * The derivation is `hostContentCollectionLabel` rather than a second copy of\n * it, because a reference row does not know or care whether the collection it\n * names belongs to a plugin — two spellings of \"Product category\" reachable\n * by two paths is the kind of difference nobody notices until a screenshot\n * disagrees with a test.\n */\nexport function pluginHostCollectionLabel(name: string): string {\n const declared = (\n pluginHostCollection(name)?.label ?? pluginOrgCollection(name)?.label\n )?.trim()\n return declared || hostContentCollectionLabel(name)\n}\n\n/**\n * The ORG collections a plugin owns, for the media-usage scan (AGL-3273).\n *\n * Everything above is about `hosts/{hostId}/…`, and the scan's completeness\n * guard sweeps the source for exactly that shape. Some plugin storage lives on\n * the organization instead — Marketing's email sends are\n * `orgs/{orgId}/campaigns`, each naming the site it was sent as — and a\n * collection the scan does not know about is read as holding nothing, which\n * is the answer \"Find where this is used\" must never give by omission.\n *\n * So a plugin declares those too, in the `orgCollections` block of\n * `plugins.config.json`, compiled like the host rows. The same inverted\n * default holds — scanned unless the declaration says why not — and\n * `siteField` names the field that says which site a document belongs to, so\n * a reference row can name that site and link into its hub.\n *\n * Compiled only. There is no runtime door: nothing outside the first-party\n * config writes org storage the scan must read, and a door nobody uses is a\n * registry the scan's request would have to be trusted to have filled.\n */\nexport interface PluginOrgCollectionDeclaration {\n /** The subcollection under `orgs/{orgId}`, spelled as Firestore holds it. */\n name: string\n /** What one of its documents is called in a reference row. */\n label?: string\n /** Default `generic`. An org collection has no dedicated pass to be `own`. */\n mediaScan?: Exclude<PluginHostCollectionMediaScan, 'own'>\n /** Why the scan does not read it. Required with `mediaScan: 'none'`. */\n mediaScanReason?: string\n /** The `[pluginSlug]` of the site hub a reference row links to. */\n routeSlug?: string\n /**\n * The field on each document naming the site it BELONGS to. Two readers\n * act on it: a reference row names that site and links into its hub, and\n * deleting the site deletes the documents that name it (`eraseHost`). A\n * collection whose documents are placed on sites rather than owned by one\n * declares none.\n */\n siteField?: string\n /**\n * The states in which a document the site owns is work still IN FLIGHT —\n * `{ field: 'status', values: ['scheduled', 'sending'] }` — and so holds\n * the site where it is. Moving the site to another organization is refused\n * while any document naming it matches (AGL-3381): the work would land\n * for an organization the site no longer belongs to. Needs `siteField`.\n */\n holdsTransferWhile?: { field: string; values: string[] }\n}\n\n/** An org declaration with the plugin that made it. */\nexport type ResolvedPluginOrgCollection = PluginOrgCollectionDeclaration & {\n pluginId: string\n}\n\n/** Every declared org collection, with its owner. */\nexport function listPluginOrgCollections(): ResolvedPluginOrgCollection[] {\n return PLUGIN_ORG_COLLECTIONS_DECLARED.map((row) => ({ ...row }))\n}\n\n/** One declared org collection by name, with its owner, or `null`. */\nexport function pluginOrgCollection(\n name: string,\n): ResolvedPluginOrgCollection | null {\n const key = name.trim()\n return listPluginOrgCollections().find((one) => one.name === key) ?? null\n}\n\n/** The declared org collections the media scan reads generically. */\nexport function pluginOrgCollectionsScannedGenerically(): ResolvedPluginOrgCollection[] {\n return listPluginOrgCollections().filter(\n (one) => (one.mediaScan ?? 'generic') === 'generic',\n )\n}\n"],"names":["getRegisteringPluginId","hostContentCollectionLabel","PLUGIN_HOST_COLLECTIONS_DECLARED","PLUGIN_ORG_COLLECTIONS_DECLARED","definePluginServiceContract","registerPluginService","resolvePluginServices","PLUGIN_HOST_COLLECTIONS","multiple","registerPluginHostCollections","collections","options","pluginId","trim","prepared","map","declaration","name","Error","resource","siteExport","mediaScan","mediaScanReason","incumbent","pluginHostCollection","key","listPluginHostCollections","compiled","row","named","Set","registered","entry","impl","filter","has","find","one","pluginIdForHostCollection","pluginHostCollectionRouteSlug","pluginOrgCollection","routeSlug","pluginHostCollectionsScannedGenerically","pluginHostCollectionsExcludedFromMediaScan","reason","pluginHostArtifactCollections","artifact","pluginHostCollectionLabel","declared","label","listPluginOrgCollections","pluginOrgCollectionsScannedGenerically"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,sBAAsB,QAAQ,qCAAiC;AACxE,SAASC,0BAA0B,QAAQ,wDAAoD;AAG/F,SACEC,gCAAgC,EAChCC,+BAA+B,QAC1B,qCAAiC;AACxC,SACEC,2BAA2B,EAC3BC,qBAAqB,EACrBC,qBAAqB,QAChB,uBAAmB;AA2H1B,OAAO,MAAMC,0BACXH,4BACE,yBACA;IAAEI,UAAU;AAAK,GAClB;AAEH;;;;;;;CAOC,GACD,OAAO,SAASC,8BACdC,WAAuD,EACvDC,OAA+B;QAEbX,MAAAA;IAAlB,MAAMY,WAAW,EAACZ,QAAAA,0BAAAA,oCAAAA,0BAA4BW,2BAAAA,QAASC,QAAQ,YAA7CZ,OAAiD,IAAIa,IAAI;IAC3E,MAAMC,WAAWJ,YAAYK,GAAG,CAAC,CAACC;;YACnBA,mBAgB4BA;QAhBzC,MAAMC,gBAAOD,oBAAAA,YAAYC,IAAI,qBAAhBD,kBAAkBH,IAAI,qBAAM;QACzC,IAAI,CAACI,MAAM,MAAM,IAAIC,MAAM;QAC3B,IAAIF,YAAYG,QA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