@aglyn/aglyn 1.0.0-beta.218 → 1.0.0-beta.220

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 (455) hide show
  1. package/package.json +12 -12
  2. package/src/lib/app-utils/actions.d.ts +26 -433
  3. package/src/lib/app-utils/actions.js +108 -633
  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/analytics-events.d.ts +1 -1
  9. package/src/lib/app-utils/analytics-events.js.map +1 -1
  10. package/src/lib/app-utils/analytics-provider.d.ts +182 -0
  11. package/src/lib/app-utils/analytics-provider.js +133 -0
  12. package/src/lib/app-utils/analytics-provider.js.map +1 -0
  13. package/src/lib/app-utils/api-plugins.d.ts +46 -0
  14. package/src/lib/app-utils/api-plugins.js +19 -0
  15. package/src/lib/app-utils/api-plugins.js.map +1 -1
  16. package/src/lib/app-utils/{marketplace-overrides.d.ts → artifact-overrides.d.ts} +9 -6
  17. package/src/lib/app-utils/{marketplace-overrides.js → artifact-overrides.js} +10 -7
  18. package/src/lib/app-utils/artifact-overrides.js.map +1 -0
  19. package/src/lib/app-utils/{marketplace-provenance.d.ts → artifact-provenance.d.ts} +12 -10
  20. package/src/lib/app-utils/{marketplace-provenance.js → artifact-provenance.js} +9 -7
  21. package/src/lib/app-utils/artifact-provenance.js.map +1 -0
  22. package/src/lib/app-utils/binding-token-catalog.d.ts +5 -13
  23. package/src/lib/app-utils/binding-token-catalog.js +17 -41
  24. package/src/lib/app-utils/binding-token-catalog.js.map +1 -1
  25. package/src/lib/app-utils/brand-support-line.d.ts +36 -0
  26. package/src/lib/app-utils/brand-support-line.js +38 -0
  27. package/src/lib/app-utils/brand-support-line.js.map +1 -0
  28. package/src/lib/app-utils/collection-entries.d.ts +2 -2
  29. package/src/lib/app-utils/collection-entries.js.map +1 -1
  30. package/src/lib/app-utils/consent-group-change.d.ts +4 -0
  31. package/src/lib/app-utils/consent-group-change.js.map +1 -1
  32. package/src/lib/app-utils/consent-groups.d.ts +1 -1
  33. package/src/lib/app-utils/consent-groups.js.map +1 -1
  34. package/src/lib/app-utils/console-routes.d.ts +15 -42
  35. package/src/lib/app-utils/console-routes.js +10 -39
  36. package/src/lib/app-utils/console-routes.js.map +1 -1
  37. package/src/lib/app-utils/contacts.d.ts +24 -2
  38. package/src/lib/app-utils/contacts.js +21 -5
  39. package/src/lib/app-utils/contacts.js.map +1 -1
  40. package/src/lib/app-utils/container-membership.d.ts +93 -0
  41. package/src/lib/app-utils/container-membership.js +165 -0
  42. package/src/lib/app-utils/container-membership.js.map +1 -0
  43. package/src/lib/app-utils/crm-task-reminders.d.ts +23 -6
  44. package/src/lib/app-utils/crm-task-reminders.js +32 -11
  45. package/src/lib/app-utils/crm-task-reminders.js.map +1 -1
  46. package/src/lib/app-utils/crm.d.ts +24 -4
  47. package/src/lib/app-utils/crm.js +23 -0
  48. package/src/lib/app-utils/crm.js.map +1 -1
  49. package/src/lib/app-utils/cross-pool-desync.d.ts +39 -0
  50. package/src/lib/app-utils/cross-pool-desync.js +47 -0
  51. package/src/lib/app-utils/cross-pool-desync.js.map +1 -0
  52. package/src/lib/app-utils/csv-upload.d.ts +29 -0
  53. package/src/lib/app-utils/csv-upload.js +29 -0
  54. package/src/lib/app-utils/csv-upload.js.map +1 -0
  55. package/src/lib/app-utils/{dataset-csv.d.ts → csv.d.ts} +10 -43
  56. package/src/lib/app-utils/{dataset-csv.js → csv.js} +10 -81
  57. package/src/lib/app-utils/csv.js.map +1 -0
  58. package/src/lib/app-utils/dataset-models.d.ts +5 -5
  59. package/src/lib/app-utils/dataset-models.js +19 -2
  60. package/src/lib/app-utils/dataset-models.js.map +1 -1
  61. package/src/lib/app-utils/datasets.d.ts +65 -30
  62. package/src/lib/app-utils/datasets.js +74 -24
  63. package/src/lib/app-utils/datasets.js.map +1 -1
  64. package/src/lib/app-utils/docs-deflection.d.ts +6 -6
  65. package/src/lib/app-utils/docs-deflection.js.map +1 -1
  66. package/src/lib/app-utils/docs-help.generated.d.ts +14 -8
  67. package/src/lib/app-utils/docs-help.generated.js +23 -6
  68. package/src/lib/app-utils/docs-help.generated.js.map +1 -1
  69. package/src/lib/app-utils/docs-index.generated.d.ts +2 -2
  70. package/src/lib/app-utils/docs-index.generated.js +570 -346
  71. package/src/lib/app-utils/docs-index.generated.js.map +1 -1
  72. package/src/lib/app-utils/docs-retrieval.d.ts +3 -3
  73. package/src/lib/app-utils/docs-retrieval.js +14 -10
  74. package/src/lib/app-utils/docs-retrieval.js.map +1 -1
  75. package/src/lib/app-utils/duplicate-resource.d.ts +4 -1
  76. package/src/lib/app-utils/duplicate-resource.js +7 -4
  77. package/src/lib/app-utils/duplicate-resource.js.map +1 -1
  78. package/src/lib/app-utils/dynamic-list-rule.d.ts +1 -1
  79. package/src/lib/app-utils/dynamic-list-rule.js +3 -3
  80. package/src/lib/app-utils/dynamic-list-rule.js.map +1 -1
  81. package/src/lib/app-utils/element-ui.d.ts +1 -1
  82. package/src/lib/app-utils/element-ui.js +1 -1
  83. package/src/lib/app-utils/element-ui.js.map +1 -1
  84. package/src/lib/app-utils/email-starter-policy.js +3 -3
  85. package/src/lib/app-utils/email-starter-policy.js.map +1 -1
  86. package/src/lib/app-utils/email-text.d.ts +80 -0
  87. package/src/lib/app-utils/email-text.js +189 -0
  88. package/src/lib/app-utils/email-text.js.map +1 -0
  89. package/src/lib/app-utils/{list-assignment-policy.d.ts → enrollment-basis.d.ts} +4 -0
  90. package/src/lib/app-utils/{list-assignment-policy.js → enrollment-basis.js} +5 -1
  91. package/src/lib/app-utils/enrollment-basis.js.map +1 -0
  92. package/src/lib/app-utils/entity-picker-context.d.ts +10 -5
  93. package/src/lib/app-utils/entity-picker-context.js.map +1 -1
  94. package/src/lib/app-utils/error-beacon.d.ts +75 -6
  95. package/src/lib/app-utils/error-beacon.js +160 -21
  96. package/src/lib/app-utils/error-beacon.js.map +1 -1
  97. package/src/lib/app-utils/expand-repeatables.d.ts +10 -10
  98. package/src/lib/app-utils/expand-repeatables.js +14 -14
  99. package/src/lib/app-utils/expand-repeatables.js.map +1 -1
  100. package/src/lib/app-utils/forms.js +2 -2
  101. package/src/lib/app-utils/forms.js.map +1 -1
  102. package/src/lib/app-utils/health-report.d.ts +2 -3
  103. package/src/lib/app-utils/health-report.js +8 -6
  104. package/src/lib/app-utils/health-report.js.map +1 -1
  105. package/src/lib/app-utils/host-events.d.ts +82 -0
  106. package/src/lib/app-utils/host-events.js +62 -0
  107. package/src/lib/app-utils/host-events.js.map +1 -0
  108. package/src/lib/app-utils/inbound-mail-domain.d.ts +27 -0
  109. package/src/lib/app-utils/inbound-mail-domain.js +31 -0
  110. package/src/lib/app-utils/inbound-mail-domain.js.map +1 -0
  111. package/src/lib/app-utils/lockdown.d.ts +11 -0
  112. package/src/lib/app-utils/lockdown.js +33 -3
  113. package/src/lib/app-utils/lockdown.js.map +1 -1
  114. package/src/lib/app-utils/margin-utilization.d.ts +4 -69
  115. package/src/lib/app-utils/margin-utilization.js +82 -69
  116. package/src/lib/app-utils/margin-utilization.js.map +1 -1
  117. package/src/lib/app-utils/member-email-aliases.d.ts +25 -0
  118. package/src/lib/app-utils/member-email-aliases.js +29 -0
  119. package/src/lib/app-utils/member-email-aliases.js.map +1 -1
  120. package/src/lib/app-utils/node-definition-sanitizer.d.ts +16 -16
  121. package/src/lib/app-utils/node-definition-sanitizer.js +24 -20
  122. package/src/lib/app-utils/node-definition-sanitizer.js.map +1 -1
  123. package/src/lib/app-utils/node-interactions.d.ts +7 -7
  124. package/src/lib/app-utils/node-interactions.js.map +1 -1
  125. package/src/lib/app-utils/notifications.d.ts +147 -47
  126. package/src/lib/app-utils/notifications.js +182 -44
  127. package/src/lib/app-utils/notifications.js.map +1 -1
  128. package/src/lib/app-utils/operator-alerts.d.ts +15 -1
  129. package/src/lib/app-utils/operator-alerts.js +47 -10
  130. package/src/lib/app-utils/operator-alerts.js.map +1 -1
  131. package/src/lib/app-utils/payments-configured.d.ts +8 -21
  132. package/src/lib/app-utils/payments-configured.js +8 -23
  133. package/src/lib/app-utils/payments-configured.js.map +1 -1
  134. package/src/lib/app-utils/plan-entitlements.d.ts +207 -306
  135. package/src/lib/app-utils/plan-entitlements.js +345 -528
  136. package/src/lib/app-utils/plan-entitlements.js.map +1 -1
  137. package/src/lib/app-utils/platform-brand.d.ts +10 -0
  138. package/src/lib/app-utils/platform-brand.js +14 -3
  139. package/src/lib/app-utils/platform-brand.js.map +1 -1
  140. package/src/lib/app-utils/platform-marketing-consent.d.ts +56 -2
  141. package/src/lib/app-utils/platform-marketing-consent.js +6 -5
  142. package/src/lib/app-utils/platform-marketing-consent.js.map +1 -1
  143. package/src/lib/app-utils/plugin-api-rate-limit.d.ts +7 -1
  144. package/src/lib/app-utils/plugin-api-rate-limit.js +11 -3
  145. package/src/lib/app-utils/plugin-api-rate-limit.js.map +1 -1
  146. package/src/lib/app-utils/plugin-bundle-checks.js +2 -2
  147. package/src/lib/app-utils/plugin-bundle-checks.js.map +1 -1
  148. package/src/lib/app-utils/plugin-host-events.generated.d.ts +12 -0
  149. package/src/lib/app-utils/plugin-host-events.generated.js +169 -0
  150. package/src/lib/app-utils/plugin-host-events.generated.js.map +1 -0
  151. package/src/lib/app-utils/plugin-release-flags.generated.d.ts +12 -0
  152. package/src/lib/app-utils/plugin-release-flags.generated.js +106 -0
  153. package/src/lib/app-utils/plugin-release-flags.generated.js.map +1 -0
  154. package/src/lib/app-utils/plugin-starter-templates.generated.d.ts +12 -0
  155. package/src/lib/app-utils/plugin-starter-templates.generated.js +711 -0
  156. package/src/lib/app-utils/plugin-starter-templates.generated.js.map +1 -0
  157. package/src/lib/app-utils/realm-host-surface.generated.js +2 -0
  158. package/src/lib/app-utils/realm-host-surface.generated.js.map +1 -1
  159. package/src/lib/app-utils/release-flags.d.ts +14 -5
  160. package/src/lib/app-utils/release-flags.js +21 -125
  161. package/src/lib/app-utils/release-flags.js.map +1 -1
  162. package/src/lib/app-utils/repeat-query.d.ts +56 -0
  163. package/src/lib/app-utils/{dataset-query.js → repeat-query.js} +16 -16
  164. package/src/lib/app-utils/repeat-query.js.map +1 -0
  165. package/src/lib/app-utils/repeat-sources.d.ts +9 -0
  166. package/src/lib/app-utils/repeat-sources.js.map +1 -1
  167. package/src/lib/app-utils/retained-refusals.d.ts +73 -0
  168. package/src/lib/app-utils/retained-refusals.js +186 -0
  169. package/src/lib/app-utils/retained-refusals.js.map +1 -0
  170. package/src/lib/app-utils/scope-tokens.d.ts +27 -0
  171. package/src/lib/app-utils/scope-tokens.js +61 -0
  172. package/src/lib/app-utils/scope-tokens.js.map +1 -1
  173. package/src/lib/app-utils/screen-link-context.js +3 -3
  174. package/src/lib/app-utils/screen-link-context.js.map +1 -1
  175. package/src/lib/app-utils/screen-route.js +1 -1
  176. package/src/lib/app-utils/screen-route.js.map +1 -1
  177. package/src/lib/app-utils/seo-audit.d.ts +132 -0
  178. package/src/lib/app-utils/seo-audit.js +246 -0
  179. package/src/lib/app-utils/seo-audit.js.map +1 -0
  180. package/src/lib/app-utils/seo-keywords.d.ts +48 -0
  181. package/src/lib/app-utils/seo-keywords.js +60 -0
  182. package/src/lib/app-utils/seo-keywords.js.map +1 -0
  183. package/src/lib/app-utils/seo-page-facts.d.ts +66 -0
  184. package/src/lib/app-utils/seo-page-facts.js +155 -0
  185. package/src/lib/app-utils/seo-page-facts.js.map +1 -0
  186. package/src/lib/app-utils/seo-site-scan.d.ts +126 -0
  187. package/src/lib/app-utils/seo-site-scan.js +162 -0
  188. package/src/lib/app-utils/seo-site-scan.js.map +1 -0
  189. package/src/lib/app-utils/seo-title-variables.js +1 -1
  190. package/src/lib/app-utils/seo-title-variables.js.map +1 -1
  191. package/src/lib/app-utils/server.d.ts +13 -18
  192. package/src/lib/app-utils/server.js +33 -51
  193. package/src/lib/app-utils/server.js.map +1 -1
  194. package/src/lib/app-utils/site-interactions.d.ts +501 -0
  195. package/src/lib/app-utils/site-interactions.js +554 -0
  196. package/src/lib/app-utils/site-interactions.js.map +1 -0
  197. package/src/lib/app-utils/{marketplace-theme.d.ts → site-theme.d.ts} +13 -2
  198. package/src/lib/app-utils/{marketplace-theme.js → site-theme.js} +2 -2
  199. package/src/lib/app-utils/site-theme.js.map +1 -0
  200. package/src/lib/app-utils/sitemap.d.ts +4 -3
  201. package/src/lib/app-utils/sitemap.js +9 -7
  202. package/src/lib/app-utils/sitemap.js.map +1 -1
  203. package/src/lib/app-utils/stale-build-error.d.ts +51 -0
  204. package/src/lib/app-utils/stale-build-error.js +100 -1
  205. package/src/lib/app-utils/stale-build-error.js.map +1 -1
  206. package/src/lib/app-utils/starter-template-nodes.d.ts +137 -0
  207. package/src/lib/app-utils/starter-template-nodes.js +129 -0
  208. package/src/lib/app-utils/starter-template-nodes.js.map +1 -0
  209. package/src/lib/app-utils/starter-templates.d.ts +11 -34
  210. package/src/lib/app-utils/starter-templates.js +19 -230
  211. package/src/lib/app-utils/starter-templates.js.map +1 -1
  212. package/src/lib/app-utils/{email-topics.d.ts → subscription-topics.d.ts} +64 -48
  213. package/src/lib/app-utils/{email-topics.js → subscription-topics.js} +39 -109
  214. package/src/lib/app-utils/subscription-topics.js.map +1 -0
  215. package/src/lib/app-utils/tax-jurisdiction-figures.d.ts +118 -0
  216. package/src/lib/app-utils/tax-jurisdiction-figures.js +123 -0
  217. package/src/lib/app-utils/tax-jurisdiction-figures.js.map +1 -0
  218. package/src/lib/app-utils/theme-library.d.ts +10 -3
  219. package/src/lib/app-utils/theme-library.js +13 -4
  220. package/src/lib/app-utils/theme-library.js.map +1 -1
  221. package/src/lib/app-utils/usage-budget.d.ts +73 -188
  222. package/src/lib/app-utils/usage-budget.js +58 -194
  223. package/src/lib/app-utils/usage-budget.js.map +1 -1
  224. package/src/lib/app-utils/{campaign-attribution.d.ts → utm-attribution.d.ts} +11 -6
  225. package/src/lib/app-utils/{campaign-attribution.js → utm-attribution.js} +13 -8
  226. package/src/lib/app-utils/utm-attribution.js.map +1 -0
  227. package/src/lib/app-utils/{campaign-forwarding.d.ts → utm-forwarding.d.ts} +14 -14
  228. package/src/lib/app-utils/{campaign-forwarding.js → utm-forwarding.js} +26 -26
  229. package/src/lib/app-utils/utm-forwarding.js.map +1 -0
  230. package/src/lib/app-utils/{campaign-touch.d.ts → utm-touch.d.ts} +25 -17
  231. package/src/lib/app-utils/{campaign-touch.js → utm-touch.js} +38 -30
  232. package/src/lib/app-utils/utm-touch.js.map +1 -0
  233. package/src/lib/app-utils/variables.d.ts +9 -9
  234. package/src/lib/app-utils/variables.js.map +1 -1
  235. package/src/lib/app-utils/video-object.js +6 -5
  236. package/src/lib/app-utils/video-object.js.map +1 -1
  237. package/src/lib/app-utils/visitor-consent.d.ts +41 -164
  238. package/src/lib/app-utils/visitor-consent.js +66 -277
  239. package/src/lib/app-utils/visitor-consent.js.map +1 -1
  240. package/src/lib/app-utils/visitor-record-ceiling.d.ts +32 -0
  241. package/src/lib/app-utils/visitor-record-ceiling.js +39 -0
  242. package/src/lib/app-utils/visitor-record-ceiling.js.map +1 -1
  243. package/src/lib/app-utils/web-vitals-rum.d.ts +7 -7
  244. package/src/lib/app-utils/web-vitals-rum.js +31 -63
  245. package/src/lib/app-utils/web-vitals-rum.js.map +1 -1
  246. package/src/lib/app-utils/where-used.d.ts +11 -6
  247. package/src/lib/app-utils/where-used.js +3 -8
  248. package/src/lib/app-utils/where-used.js.map +1 -1
  249. package/src/lib/foundation/definitions/components.types.d.ts +1 -1
  250. package/src/lib/foundation/definitions/components.types.js +1 -1
  251. package/src/lib/foundation/definitions/components.types.js.map +1 -1
  252. package/src/lib/foundation/definitions/org-billing.types.d.ts +11 -137
  253. package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
  254. package/src/lib/foundation/definitions/organization.types.d.ts +1 -3
  255. package/src/lib/foundation/definitions/organization.types.js.map +1 -1
  256. package/src/lib/foundation/definitions/platform.types.d.ts +11 -5
  257. package/src/lib/foundation/definitions/platform.types.js.map +1 -1
  258. package/src/lib/foundation/definitions/write-deny-coverage.util.d.ts +16 -0
  259. package/src/lib/foundation/definitions/write-deny-coverage.util.js +20 -0
  260. package/src/lib/foundation/definitions/write-deny-coverage.util.js.map +1 -1
  261. package/src/lib/foundation/index.d.ts +1 -1
  262. package/src/lib/foundation/index.js.map +1 -1
  263. package/src/lib/plugin-manager/besigner-documents.d.ts +96 -0
  264. package/src/lib/plugin-manager/besigner-documents.js +61 -0
  265. package/src/lib/plugin-manager/besigner-documents.js.map +1 -0
  266. package/src/lib/plugin-manager/computed-variables.d.ts +71 -0
  267. package/src/lib/plugin-manager/computed-variables.js +74 -0
  268. package/src/lib/plugin-manager/computed-variables.js.map +1 -0
  269. package/src/lib/plugin-manager/custom-fields.d.ts +29 -2
  270. package/src/lib/plugin-manager/custom-fields.js +47 -1
  271. package/src/lib/plugin-manager/custom-fields.js.map +1 -1
  272. package/src/lib/plugin-manager/feature-plugins.d.ts +372 -99
  273. package/src/lib/plugin-manager/feature-plugins.js +126 -51
  274. package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
  275. package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +134 -0
  276. package/src/lib/plugin-manager/first-party-plugins.generated.js +840 -10
  277. package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
  278. package/src/lib/plugin-manager/index.d.ts +0 -1
  279. package/src/lib/plugin-manager/index.js +0 -1
  280. package/src/lib/plugin-manager/index.js.map +1 -1
  281. package/src/lib/plugin-manager/plugin-activity-actions.d.ts +12 -0
  282. package/src/lib/plugin-manager/plugin-activity-actions.js +25 -0
  283. package/src/lib/plugin-manager/plugin-activity-actions.js.map +1 -1
  284. package/src/lib/plugin-manager/plugin-contact-capture.d.ts +9 -4
  285. package/src/lib/plugin-manager/plugin-contact-capture.js.map +1 -1
  286. package/src/lib/plugin-manager/plugin-containers.d.ts +68 -0
  287. package/src/lib/plugin-manager/plugin-containers.generated.d.ts +10 -0
  288. package/src/lib/plugin-manager/plugin-containers.generated.js +20 -0
  289. package/src/lib/plugin-manager/plugin-containers.generated.js.map +1 -0
  290. package/src/lib/plugin-manager/plugin-containers.js +27 -0
  291. package/src/lib/plugin-manager/plugin-containers.js.map +1 -0
  292. package/src/lib/plugin-manager/plugin-contributions.d.ts +1 -1
  293. package/src/lib/plugin-manager/plugin-contributions.js.map +1 -1
  294. package/src/lib/plugin-manager/plugin-declarations-repair.d.ts +36 -0
  295. package/src/lib/plugin-manager/plugin-declarations-repair.js +64 -0
  296. package/src/lib/plugin-manager/plugin-declarations-repair.js.map +1 -0
  297. package/src/lib/plugin-manager/plugin-dependents.d.ts +101 -0
  298. package/src/lib/plugin-manager/plugin-dependents.js +75 -0
  299. package/src/lib/plugin-manager/plugin-dependents.js.map +1 -0
  300. package/src/lib/plugin-manager/plugin-distribution.d.ts +55 -0
  301. package/src/lib/plugin-manager/plugin-distribution.js +45 -0
  302. package/src/lib/plugin-manager/plugin-distribution.js.map +1 -0
  303. package/src/lib/plugin-manager/plugin-entitlements.d.ts +8 -0
  304. package/src/lib/plugin-manager/plugin-entitlements.js.map +1 -1
  305. package/src/lib/plugin-manager/plugin-host-collections.d.ts +17 -0
  306. package/src/lib/plugin-manager/plugin-host-collections.js +6 -0
  307. package/src/lib/plugin-manager/plugin-host-collections.js.map +1 -1
  308. package/src/lib/plugin-manager/plugin-host-resources.d.ts +133 -0
  309. package/src/lib/plugin-manager/plugin-host-resources.js +52 -0
  310. package/src/lib/plugin-manager/plugin-host-resources.js.map +1 -0
  311. package/src/lib/plugin-manager/plugin-membership-detach.js +1 -1
  312. package/src/lib/plugin-manager/plugin-membership-detach.js.map +1 -1
  313. package/src/lib/plugin-manager/plugin-org-erasure.d.ts +28 -2
  314. package/src/lib/plugin-manager/plugin-org-erasure.js +61 -2
  315. package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -1
  316. package/src/lib/plugin-manager/plugin-plan-entitlements.d.ts +123 -0
  317. package/src/lib/plugin-manager/plugin-plan-entitlements.js +101 -0
  318. package/src/lib/plugin-manager/plugin-plan-entitlements.js.map +1 -0
  319. package/src/lib/plugin-manager/plugin-record-email-state.d.ts +69 -0
  320. package/src/lib/plugin-manager/plugin-record-email-state.js +32 -0
  321. package/src/lib/plugin-manager/plugin-record-email-state.js.map +1 -1
  322. package/src/lib/plugin-manager/plugin-record-index.d.ts +95 -0
  323. package/src/lib/plugin-manager/plugin-record-index.js +51 -0
  324. package/src/lib/plugin-manager/plugin-record-index.js.map +1 -0
  325. package/src/lib/plugin-manager/plugin-record-lists.d.ts +115 -0
  326. package/src/lib/plugin-manager/plugin-record-lists.js +75 -0
  327. package/src/lib/plugin-manager/plugin-record-lists.js.map +1 -0
  328. package/src/lib/plugin-manager/plugin-record-timeline.d.ts +42 -8
  329. package/src/lib/plugin-manager/plugin-record-timeline.js.map +1 -1
  330. package/src/lib/plugin-manager/plugin-record-written.d.ts +58 -0
  331. package/src/lib/plugin-manager/plugin-record-written.js +42 -0
  332. package/src/lib/plugin-manager/plugin-record-written.js.map +1 -0
  333. package/src/lib/plugin-manager/plugin-revenue-sources.d.ts +213 -0
  334. package/src/lib/plugin-manager/plugin-revenue-sources.js +194 -0
  335. package/src/lib/plugin-manager/plugin-revenue-sources.js.map +1 -0
  336. package/src/lib/plugin-manager/plugin-site-beacons.d.ts +71 -0
  337. package/src/lib/plugin-manager/plugin-site-beacons.js +54 -0
  338. package/src/lib/plugin-manager/plugin-site-beacons.js.map +1 -0
  339. package/src/lib/plugin-manager/plugin-site-bundle.d.ts +145 -0
  340. package/src/lib/plugin-manager/plugin-site-bundle.js +78 -0
  341. package/src/lib/plugin-manager/plugin-site-bundle.js.map +1 -0
  342. package/src/lib/plugin-manager/plugin-site-cache.d.ts +12 -0
  343. package/src/lib/plugin-manager/plugin-site-cache.js.map +1 -1
  344. package/src/lib/plugin-manager/plugin-site-export.d.ts +81 -0
  345. package/src/lib/plugin-manager/plugin-site-export.js +40 -0
  346. package/src/lib/plugin-manager/plugin-site-export.js.map +1 -0
  347. package/src/lib/plugin-manager/plugin-sitemap-sections.d.ts +88 -0
  348. package/src/lib/plugin-manager/plugin-sitemap-sections.js +29 -0
  349. package/src/lib/plugin-manager/plugin-sitemap-sections.js.map +1 -0
  350. package/src/lib/plugin-manager/plugin-subscription-topics.generated.d.ts +11 -0
  351. package/src/lib/plugin-manager/plugin-subscription-topics.generated.js +41 -0
  352. package/src/lib/plugin-manager/plugin-subscription-topics.generated.js.map +1 -0
  353. package/src/lib/plugin-manager/plugin-tax-profile.d.ts +20 -4
  354. package/src/lib/plugin-manager/plugin-tax-profile.js.map +1 -1
  355. package/src/lib/plugin-manager/plugin-tax-return-sources.d.ts +255 -0
  356. package/src/lib/plugin-manager/plugin-tax-return-sources.js +191 -0
  357. package/src/lib/plugin-manager/plugin-tax-return-sources.js.map +1 -0
  358. package/src/lib/plugin-manager/plugin-template-sources.d.ts +75 -0
  359. package/src/lib/plugin-manager/plugin-template-sources.js +37 -0
  360. package/src/lib/plugin-manager/plugin-template-sources.js.map +1 -0
  361. package/src/lib/plugin-manager/plugin-usage-axes.d.ts +319 -0
  362. package/src/lib/plugin-manager/plugin-usage-axes.js +186 -0
  363. package/src/lib/plugin-manager/plugin-usage-axes.js.map +1 -0
  364. package/src/lib/plugin-manager/plugin-usage-meters.d.ts +108 -0
  365. package/src/lib/plugin-manager/plugin-usage-meters.js +105 -0
  366. package/src/lib/plugin-manager/plugin-usage-meters.js.map +1 -0
  367. package/src/lib/plugin-manager/plugin-zones.d.ts +4 -5
  368. package/src/lib/plugin-manager/plugin-zones.js.map +1 -1
  369. package/src/lib/plugin-manager/realm-host-aglyn.generated.js +2 -0
  370. package/src/lib/plugin-manager/realm-host-aglyn.generated.js.map +1 -1
  371. package/src/lib/plugin-manager/record-captured-contact.d.ts +1 -14
  372. package/src/lib/plugin-manager/record-captured-contact.js +10 -32
  373. package/src/lib/plugin-manager/record-captured-contact.js.map +1 -1
  374. package/src/lib/plugin-manager/repeat-rows.d.ts +124 -0
  375. package/src/lib/plugin-manager/repeat-rows.js +108 -0
  376. package/src/lib/plugin-manager/repeat-rows.js.map +1 -0
  377. package/src/lib/plugin-manager/submission-record-target.d.ts +144 -0
  378. package/src/lib/plugin-manager/submission-record-target.js +125 -0
  379. package/src/lib/plugin-manager/submission-record-target.js.map +1 -0
  380. package/src/lib/plugin-manager/usage-alert-contributors.d.ts +76 -6
  381. package/src/lib/plugin-manager/usage-alert-contributors.js +23 -10
  382. package/src/lib/plugin-manager/usage-alert-contributors.js.map +1 -1
  383. package/src/lib/plugin-manager/video-embed-provider.d.ts +108 -0
  384. package/src/lib/plugin-manager/video-embed-provider.js +165 -0
  385. package/src/lib/plugin-manager/video-embed-provider.js.map +1 -0
  386. package/src/lib/types/nodes.d.ts +2 -2
  387. package/src/lib/types/nodes.js.map +1 -1
  388. package/src/lib/app-utils/assist-credits.d.ts +0 -482
  389. package/src/lib/app-utils/assist-credits.js +0 -509
  390. package/src/lib/app-utils/assist-credits.js.map +0 -1
  391. package/src/lib/app-utils/campaign-attribution.js.map +0 -1
  392. package/src/lib/app-utils/campaign-forwarding.js.map +0 -1
  393. package/src/lib/app-utils/campaign-membership.d.ts +0 -121
  394. package/src/lib/app-utils/campaign-membership.js +0 -189
  395. package/src/lib/app-utils/campaign-membership.js.map +0 -1
  396. package/src/lib/app-utils/campaign-touch.js.map +0 -1
  397. package/src/lib/app-utils/console-record-links.d.ts +0 -163
  398. package/src/lib/app-utils/console-record-links.js +0 -180
  399. package/src/lib/app-utils/console-record-links.js.map +0 -1
  400. package/src/lib/app-utils/contact-holder.d.ts +0 -68
  401. package/src/lib/app-utils/contact-holder.js +0 -129
  402. package/src/lib/app-utils/contact-holder.js.map +0 -1
  403. package/src/lib/app-utils/contact-merge.d.ts +0 -136
  404. package/src/lib/app-utils/contact-merge.js +0 -412
  405. package/src/lib/app-utils/contact-merge.js.map +0 -1
  406. package/src/lib/app-utils/crm-booking.d.ts +0 -75
  407. package/src/lib/app-utils/crm-booking.js +0 -133
  408. package/src/lib/app-utils/crm-booking.js.map +0 -1
  409. package/src/lib/app-utils/crm-csv.d.ts +0 -239
  410. package/src/lib/app-utils/crm-csv.js +0 -467
  411. package/src/lib/app-utils/crm-csv.js.map +0 -1
  412. package/src/lib/app-utils/crm-digest.d.ts +0 -185
  413. package/src/lib/app-utils/crm-digest.js +0 -272
  414. package/src/lib/app-utils/crm-digest.js.map +0 -1
  415. package/src/lib/app-utils/crm-inbound.d.ts +0 -245
  416. package/src/lib/app-utils/crm-inbound.js +0 -407
  417. package/src/lib/app-utils/crm-inbound.js.map +0 -1
  418. package/src/lib/app-utils/crm-reports.d.ts +0 -479
  419. package/src/lib/app-utils/crm-reports.js +0 -680
  420. package/src/lib/app-utils/crm-reports.js.map +0 -1
  421. package/src/lib/app-utils/dataset-csv.js.map +0 -1
  422. package/src/lib/app-utils/dataset-query.d.ts +0 -57
  423. package/src/lib/app-utils/dataset-query.js.map +0 -1
  424. package/src/lib/app-utils/email-topics.js.map +0 -1
  425. package/src/lib/app-utils/form-dataset-binding.d.ts +0 -50
  426. package/src/lib/app-utils/form-dataset-binding.js +0 -74
  427. package/src/lib/app-utils/form-dataset-binding.js.map +0 -1
  428. package/src/lib/app-utils/list-assignment-policy.js.map +0 -1
  429. package/src/lib/app-utils/list-import.d.ts +0 -158
  430. package/src/lib/app-utils/list-import.js +0 -332
  431. package/src/lib/app-utils/list-import.js.map +0 -1
  432. package/src/lib/app-utils/marketplace-listing-visibility.d.ts +0 -122
  433. package/src/lib/app-utils/marketplace-listing-visibility.js +0 -147
  434. package/src/lib/app-utils/marketplace-listing-visibility.js.map +0 -1
  435. package/src/lib/app-utils/marketplace-overrides.js.map +0 -1
  436. package/src/lib/app-utils/marketplace-provenance.js.map +0 -1
  437. package/src/lib/app-utils/marketplace-theme.js.map +0 -1
  438. package/src/lib/app-utils/marketplace-update-state.d.ts +0 -119
  439. package/src/lib/app-utils/marketplace-update-state.js +0 -132
  440. package/src/lib/app-utils/marketplace-update-state.js.map +0 -1
  441. package/src/lib/app-utils/publisher-agreement.d.ts +0 -289
  442. package/src/lib/app-utils/publisher-agreement.js +0 -321
  443. package/src/lib/app-utils/publisher-agreement.js.map +0 -1
  444. package/src/lib/app-utils/wistia-embed.d.ts +0 -104
  445. package/src/lib/app-utils/wistia-embed.js +0 -138
  446. package/src/lib/app-utils/wistia-embed.js.map +0 -1
  447. package/src/lib/app-utils/workflows.d.ts +0 -136
  448. package/src/lib/app-utils/workflows.js +0 -346
  449. package/src/lib/app-utils/workflows.js.map +0 -1
  450. package/src/lib/plugin-manager/commerce-zone-props.d.ts +0 -172
  451. package/src/lib/plugin-manager/commerce-zone-props.js +0 -31
  452. package/src/lib/plugin-manager/commerce-zone-props.js.map +0 -1
  453. package/src/lib/plugin-manager/plugin-metered-lines.d.ts +0 -97
  454. package/src/lib/plugin-manager/plugin-metered-lines.js +0 -123
  455. package/src/lib/plugin-manager/plugin-metered-lines.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-subscription-topics.generated.ts"],"sourcesContent":["/**\n * GENERATED FILE — do not edit. Regenerate with:\n * node tools/scripts/generate-plugin-manifests.mjs\n *\n * The subscription topics plugins declare (AGL-3080): each plugin's\n * `subscriptionTopics` block in plugins.config.json, in preference-page\n * order. Core's `app-utils/subscription-topics.ts` reads them as the\n * built-in floor of every org's topic catalog; core names no stream.\n */\n\nimport type { DeclaredSubscriptionTopic } from '../app-utils/subscription-topics'\n\nexport const PLUGIN_SUBSCRIPTION_TOPICS_DECLARED: readonly DeclaredSubscriptionTopic[] = [\n {\n \"pluginId\": \"marketing\",\n \"id\": \"marketing\",\n \"name\": \"Promotions and offers\",\n \"description\": \"Sales, discounts and seasonal campaigns.\",\n \"order\": 10,\n \"default\": true\n },\n {\n \"pluginId\": \"commerce\",\n \"id\": \"newsletter\",\n \"name\": \"Newsletter\",\n \"description\": \"Regular news and stories from us.\",\n \"order\": 20\n },\n {\n \"pluginId\": \"commerce\",\n \"id\": \"product-updates\",\n \"name\": \"Product updates\",\n \"description\": \"New products, restocks and changes to what we offer.\",\n \"order\": 30\n },\n {\n \"pluginId\": \"outreach\",\n \"id\": \"sales\",\n \"name\": \"Sales outreach\",\n \"description\": \"Messages from a person here about working together.\",\n \"order\": 40\n }\n]\n"],"names":["PLUGIN_SUBSCRIPTION_TOPICS_DECLARED"],"mappings":"AAAA;;;;;;;;CAQC,GAID,OAAO,MAAMA,sCAA4E;IACvF;QACE,YAAY;QACZ,MAAM;QACN,QAAQ;QACR,eAAe;QACf,SAAS;QACT,WAAW;IACb;IACA;QACE,YAAY;QACZ,MAAM;QACN,QAAQ;QACR,eAAe;QACf,SAAS;IACX;IACA;QACE,YAAY;QACZ,MAAM;QACN,QAAQ;QACR,eAAe;QACf,SAAS;IACX;IACA;QACE,YAAY;QACZ,MAAM;QACN,QAAQ;QACR,eAAe;QACf,SAAS;IACX;CACD,CAAA"}
@@ -24,11 +24,18 @@
24
24
  * Importing the owner's model instead is how two money paths end up with two
25
25
  * rounding rules, and the second is found by an accountant.
26
26
  *
27
- * ## Pure, synchronous, and unauthenticated
27
+ * ## Where the rate is kept, and the arithmetic over it
28
28
  *
29
- * Both questions are arithmetic over values the caller already holds: a rate
30
- * off the settings it read, a charge in cents, a settled payment object.
31
- * Nothing is read and nobody is asked who they are.
29
+ * The merchant's rates are the owner's settings, stored where the owner keeps
30
+ * them, so a caller asks for one — {@link PluginTaxProfile.flatRate}, the
31
+ * contract's one read, by site and by the kind of charge — and never reads
32
+ * the owner's documents itself. A plugin that knew where another plugin kept
33
+ * a merchant's tax settings would charge untaxed, and record it as untaxed,
34
+ * the day those settings moved.
35
+ *
36
+ * The other two questions are pure and synchronous arithmetic over values the
37
+ * caller already holds: the rate it was handed, a charge in cents, a settled
38
+ * payment object. Nobody is asked who they are.
32
39
  *
33
40
  * ## No profile is a refusal, never a zero
34
41
  *
@@ -59,6 +66,15 @@ export interface PluginResolvedFlatTax {
59
66
  pct: number;
60
67
  }
61
68
  export interface PluginTaxProfile {
69
+ /**
70
+ * The merchant's flat rate for one kind of charge on a site, as the owner
71
+ * stores it — to be handed to {@link PluginTaxProfile.flatTax} as read. `charge` names what
72
+ * is being sold in the owner's words for its rates (`service` for an
73
+ * appointment). A site that set none, or a kind the owner keeps no rate
74
+ * for, answers `undefined`, which `flatTax` prices at zero. Server-side:
75
+ * the owner reads its own settings document.
76
+ */
77
+ flatRate(hostId: string, charge: string): Promise<unknown>;
62
78
  /**
63
79
  * Tax, EXCLUSIVE, for a flat merchant rate on one charged amount. `rate` is
64
80
  * the merchant's stored setting, passed as read: the owner decides what a
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-tax-profile.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 {\n definePluginServiceContract,\n registerPluginService,\n resolvePluginServices,\n} from './plugin-services'\n\n/**\n * The tenant's tax rule, answered by the one plugin that owns it (AGL-3080).\n *\n * More than one plugin takes money — a storefront sells goods, a calendar\n * sells appointments — and a merchant has ONE tax profile. The plugin that\n * keeps it works out what a flat rate adds to a charge and which regime a\n * settled payment was taxed under; any other plugin that charges asks here.\n * Importing the owner's model instead is how two money paths end up with two\n * rounding rules, and the second is found by an accountant.\n *\n * ## Pure, synchronous, and unauthenticated\n *\n * Both questions are arithmetic over values the caller already holds: a rate\n * off the settings it read, a charge in cents, a settled payment object.\n * Nothing is read and nobody is asked who they are.\n *\n * ## No profile is a refusal, never a zero\n *\n * {@link pluginTaxProfile} THROWS when no plugin registered one. Every other\n * seam here answers `null` for \"nobody home\", and this one must not: a caller\n * that read `null` as \"no tax\" would charge a customer an untaxed total and\n * record it as untaxed, silently, and the merchant would owe the difference.\n * A refused sale is seen the same day.\n *\n * It cannot happen in a working build. Both apps load every plugin's server\n * entry before a plugin handler, a cron or the billing webhook runs\n * (`ensureAll`), so the owner's registration is in place wherever a charge is\n * priced; `tax-profile-is-registered.spec.ts` in each app holds that.\n *\n * ## One owner\n *\n * A workspace has one tax profile, so the contract is a slot: a second\n * plugin's profile is refused naming both and the incumbent keeps serving.\n *\n * Import this module by its own subpath\n * (`@aglyn/aglyn/plugin-manager/plugin-tax-profile`); it is not in the barrel.\n */\n\n/** What a flat rate adds to one charge. All zero and empty when it adds nothing. */\nexport interface PluginResolvedFlatTax {\n taxCents: number\n /** What the line is called on the receipt. */\n label: string\n pct: number\n}\n\nexport interface PluginTaxProfile {\n /**\n * Tax, EXCLUSIVE, for a flat merchant rate on one charged amount. `rate` is\n * the merchant's stored setting, passed as read: the owner decides what a\n * usable rate is, and an absent, zero, negative or out-of-range one answers\n * zero rather than throwing.\n */\n flatTax(\n rate: unknown,\n chargeCents: number,\n fallbackLabel: string,\n ): PluginResolvedFlatTax\n /**\n * Which regime a settled payment was taxed under, as the owner records it.\n * `manualTaxCents` is the tax this caller added as a line of its own, which\n * the payment processor reports as no tax at all.\n */\n taxModeOf(settledPayment: unknown, manualTaxCents?: number): string\n}\n\nexport const PLUGIN_TAX_PROFILE = definePluginServiceContract<PluginTaxProfile>(\n 'core.tax-profile',\n { multiple: false },\n)\n\n/** Registers the plugin that owns the tenant's tax rule. */\nexport function registerPluginTaxProfile(\n profile: PluginTaxProfile,\n options?: { pluginId?: string },\n): void {\n registerPluginService(PLUGIN_TAX_PROFILE, profile, {\n ...(options?.pluginId ? { pluginId: options.pluginId } : {}),\n })\n}\n\n/** The owner, or `null` — for a caller that only wants to know who it is. */\nexport function pluginTaxProfileOwner(): string | null {\n return resolvePluginServices(PLUGIN_TAX_PROFILE)[0]?.pluginId ?? null\n}\n\n/** The tax rule. THROWS when no plugin registered one; see the module note. */\nexport function pluginTaxProfile(): PluginTaxProfile {\n const entry = resolvePluginServices(PLUGIN_TAX_PROFILE)[0]\n if (!entry) {\n throw new Error(\n 'no plugin registered a tax profile, so this charge cannot be priced: ' +\n 'refusing rather than charging it untaxed',\n )\n }\n return entry.impl\n}\n"],"names":["definePluginServiceContract","registerPluginService","resolvePluginServices","PLUGIN_TAX_PROFILE","multiple","registerPluginTaxProfile","profile","options","pluginId","pluginTaxProfileOwner","pluginTaxProfile","entry","Error","impl"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,2BAA2B,EAC3BC,qBAAqB,EACrBC,qBAAqB,QAChB,uBAAmB;AAoE1B,OAAO,MAAMC,qBAAqBH,4BAChC,oBACA;IAAEI,UAAU;AAAM,GACnB;AAED,0DAA0D,GAC1D,OAAO,SAASC,yBACdC,OAAyB,EACzBC,OAA+B;IAE/BN,sBAAsBE,oBAAoBG,SAAS,aAC7CC,CAAAA,2BAAAA,QAASC,QAAQ,IAAG;QAAEA,UAAUD,QAAQC,QAAQ;IAAC,IAAI,CAAC;AAE9D;AAEA,2EAA2E,GAC3E,OAAO,SAASC;;QACPP;IAAP,gBAAOA,0BAAAA,sBAAsBC,mBAAmB,CAAC,EAAE,qBAA5CD,wBAA8CM,QAAQ,mBAAI;AACnE;AAEA,6EAA6E,GAC7E,OAAO,SAASE;IACd,MAAMC,QAAQT,sBAAsBC,mBAAmB,CAAC,EAAE;IAC1D,IAAI,CAACQ,OAAO;QACV,MAAM,IAAIC,MACR,0EACE;IAEN;IACA,OAAOD,MAAME,IAAI;AACnB"}
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-tax-profile.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 {\n definePluginServiceContract,\n registerPluginService,\n resolvePluginServices,\n} from './plugin-services'\n\n/**\n * The tenant's tax rule, answered by the one plugin that owns it (AGL-3080).\n *\n * More than one plugin takes money — a storefront sells goods, a calendar\n * sells appointments — and a merchant has ONE tax profile. The plugin that\n * keeps it works out what a flat rate adds to a charge and which regime a\n * settled payment was taxed under; any other plugin that charges asks here.\n * Importing the owner's model instead is how two money paths end up with two\n * rounding rules, and the second is found by an accountant.\n *\n * ## Where the rate is kept, and the arithmetic over it\n *\n * The merchant's rates are the owner's settings, stored where the owner keeps\n * them, so a caller asks for one — {@link PluginTaxProfile.flatRate}, the\n * contract's one read, by site and by the kind of charge — and never reads\n * the owner's documents itself. A plugin that knew where another plugin kept\n * a merchant's tax settings would charge untaxed, and record it as untaxed,\n * the day those settings moved.\n *\n * The other two questions are pure and synchronous arithmetic over values the\n * caller already holds: the rate it was handed, a charge in cents, a settled\n * payment object. Nobody is asked who they are.\n *\n * ## No profile is a refusal, never a zero\n *\n * {@link pluginTaxProfile} THROWS when no plugin registered one. Every other\n * seam here answers `null` for \"nobody home\", and this one must not: a caller\n * that read `null` as \"no tax\" would charge a customer an untaxed total and\n * record it as untaxed, silently, and the merchant would owe the difference.\n * A refused sale is seen the same day.\n *\n * It cannot happen in a working build. Both apps load every plugin's server\n * entry before a plugin handler, a cron or the billing webhook runs\n * (`ensureAll`), so the owner's registration is in place wherever a charge is\n * priced; `tax-profile-is-registered.spec.ts` in each app holds that.\n *\n * ## One owner\n *\n * A workspace has one tax profile, so the contract is a slot: a second\n * plugin's profile is refused naming both and the incumbent keeps serving.\n *\n * Import this module by its own subpath\n * (`@aglyn/aglyn/plugin-manager/plugin-tax-profile`); it is not in the barrel.\n */\n\n/** What a flat rate adds to one charge. All zero and empty when it adds nothing. */\nexport interface PluginResolvedFlatTax {\n taxCents: number\n /** What the line is called on the receipt. */\n label: string\n pct: number\n}\n\nexport interface PluginTaxProfile {\n /**\n * The merchant's flat rate for one kind of charge on a site, as the owner\n * stores it — to be handed to {@link PluginTaxProfile.flatTax} as read. `charge` names what\n * is being sold in the owner's words for its rates (`service` for an\n * appointment). A site that set none, or a kind the owner keeps no rate\n * for, answers `undefined`, which `flatTax` prices at zero. Server-side:\n * the owner reads its own settings document.\n */\n flatRate(hostId: string, charge: string): Promise<unknown>\n /**\n * Tax, EXCLUSIVE, for a flat merchant rate on one charged amount. `rate` is\n * the merchant's stored setting, passed as read: the owner decides what a\n * usable rate is, and an absent, zero, negative or out-of-range one answers\n * zero rather than throwing.\n */\n flatTax(\n rate: unknown,\n chargeCents: number,\n fallbackLabel: string,\n ): PluginResolvedFlatTax\n /**\n * Which regime a settled payment was taxed under, as the owner records it.\n * `manualTaxCents` is the tax this caller added as a line of its own, which\n * the payment processor reports as no tax at all.\n */\n taxModeOf(settledPayment: unknown, manualTaxCents?: number): string\n}\n\nexport const PLUGIN_TAX_PROFILE = definePluginServiceContract<PluginTaxProfile>(\n 'core.tax-profile',\n { multiple: false },\n)\n\n/** Registers the plugin that owns the tenant's tax rule. */\nexport function registerPluginTaxProfile(\n profile: PluginTaxProfile,\n options?: { pluginId?: string },\n): void {\n registerPluginService(PLUGIN_TAX_PROFILE, profile, {\n ...(options?.pluginId ? { pluginId: options.pluginId } : {}),\n })\n}\n\n/** The owner, or `null` — for a caller that only wants to know who it is. */\nexport function pluginTaxProfileOwner(): string | null {\n return resolvePluginServices(PLUGIN_TAX_PROFILE)[0]?.pluginId ?? null\n}\n\n/** The tax rule. THROWS when no plugin registered one; see the module note. */\nexport function pluginTaxProfile(): PluginTaxProfile {\n const entry = resolvePluginServices(PLUGIN_TAX_PROFILE)[0]\n if (!entry) {\n throw new Error(\n 'no plugin registered a tax profile, so this charge cannot be priced: ' +\n 'refusing rather than charging it untaxed',\n )\n }\n return entry.impl\n}\n"],"names":["definePluginServiceContract","registerPluginService","resolvePluginServices","PLUGIN_TAX_PROFILE","multiple","registerPluginTaxProfile","profile","options","pluginId","pluginTaxProfileOwner","pluginTaxProfile","entry","Error","impl"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,2BAA2B,EAC3BC,qBAAqB,EACrBC,qBAAqB,QAChB,uBAAmB;AAoF1B,OAAO,MAAMC,qBAAqBH,4BAChC,oBACA;IAAEI,UAAU;AAAM,GACnB;AAED,0DAA0D,GAC1D,OAAO,SAASC,yBACdC,OAAyB,EACzBC,OAA+B;IAE/BN,sBAAsBE,oBAAoBG,SAAS,aAC7CC,CAAAA,2BAAAA,QAASC,QAAQ,IAAG;QAAEA,UAAUD,QAAQC,QAAQ;IAAC,IAAI,CAAC;AAE9D;AAEA,2EAA2E,GAC3E,OAAO,SAASC;;QACPP;IAAP,gBAAOA,0BAAAA,sBAAsBC,mBAAmB,CAAC,EAAE,qBAA5CD,wBAA8CM,QAAQ,mBAAI;AACnE;AAEA,6EAA6E,GAC7E,OAAO,SAASE;IACd,MAAMC,QAAQT,sBAAsBC,mBAAmB,CAAC,EAAE;IAC1D,IAAI,CAACQ,OAAO;QACV,MAAM,IAAIC,MACR,0EACE;IAEN;IACA,OAAOD,MAAME,IAAI;AACnB"}
@@ -0,0 +1,255 @@
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 SALES A PLUGIN MADE THROUGH THE PLATFORM, ON THE OPERATOR'S RETURN
19
+ * (AGL-3080).
20
+ *
21
+ * The operator — whoever runs this deployment — files a sales tax return for
22
+ * the sales it FACILITATED, not only for its own. Its own subscription
23
+ * invoices are platform billing and the return sums them itself. A plugin
24
+ * that sells through the platform's account — a storefront checkout whose tax
25
+ * Stripe computes against the operator's registrations, a marketplace charge
26
+ * whose tax stays platform-side — holds records the return cannot read
27
+ * without knowing that plugin's storage, and a classification of them the
28
+ * return has no business restating.
29
+ *
30
+ * So the division is: the FILING is the platform's — the period, the
31
+ * jurisdiction and registration, the verdict, the working-papers export and
32
+ * the Texas Webfile lines. What a plugin sold, how each of its rows
33
+ * classifies and who is liable for it, and the words a preparer reads about
34
+ * it, are the plugin's. A source answers one period with a
35
+ * {@link TaxReturnSourceAnswer}: its findings, its lines for the filing
36
+ * figures, its tables and figures for the screen, its blocks for the export,
37
+ * and its own summary and rows carried whole for the audit.
38
+ *
39
+ * ## ⛔ AN UNREAD SOURCE REFUSES, IT NEVER READS AS ZERO
40
+ *
41
+ * Decided before anything else, because this is a legal filing. A source
42
+ * that answered nothing is indistinguishable, on a total, from a source that
43
+ * sold nothing — and a return signed on that total understates what the
44
+ * operator collected and holds. So:
45
+ *
46
+ * - **Declared and not registered** — every plugin whose sales belong on the
47
+ * return says so with `"taxReturnSource": true` in `plugins.config.json`,
48
+ * compiled into {@link PLUGIN_TAX_RETURN_SOURCES}. A declared plugin that
49
+ * registered no source in this process answers `outcome: 'refused'`. A
50
+ * runtime registry alone could not say this: an empty registry looks
51
+ * exactly like a deployment where nothing sells.
52
+ * - **Threw, or answered a malformed section** — `outcome: 'refused'`, with
53
+ * the sentence the return prints.
54
+ * - **Truncated, or holding rows no period can reach** — answered, and the
55
+ * platform raises each as a BLOCKING finding itself; a source cannot word
56
+ * its way out of either.
57
+ *
58
+ * The return turns every refusal into a blocking "do not file from this"
59
+ * finding. {@link readTaxReturnSources} never throws and never drops a
60
+ * declared source.
61
+ *
62
+ * The reader is the staff tax-return route, which awaits `ensureAll` on the
63
+ * `consoleApi` surface before it asks, so a runtime registry is filled before
64
+ * the question; the compiled declaration is what makes a MISSING
65
+ * registration a refusal rather than an absence.
66
+ *
67
+ * ⚑ The discriminant is a string: this repo compiles with
68
+ * `strictNullChecks: false`, under which a boolean-literal union does not
69
+ * narrow (see `plugin-artifact-inventory.ts`).
70
+ */
71
+ import { PLUGIN_TAX_RETURN_SOURCES } from './first-party-plugins.generated';
72
+ export { PLUGIN_TAX_RETURN_SOURCES };
73
+ /** Which exporter the filing jurisdiction gets. */
74
+ export type TaxReturnFilingForm = 'tx-webfile' | 'breakdown';
75
+ /**
76
+ * The jurisdiction the operator files in, as the platform resolved it from
77
+ * its own configuration. A source words its lines and findings for THIS
78
+ * jurisdiction and never assumes one.
79
+ */
80
+ export interface TaxReturnFiling {
81
+ /** The bucket key: `US-TX`, `US-CA`, `GB`. */
82
+ code: string;
83
+ /** How a sentence names it: `Texas`, or the code itself. */
84
+ label: string;
85
+ /** Which exporter the filing lines are for. */
86
+ form: TaxReturnFilingForm;
87
+ /** How a sentence names the filing figures: `Items 1–3`, `the breakdown`. */
88
+ figuresName: string;
89
+ }
90
+ /** What the return asks every source, once per period. */
91
+ export interface TaxReturnSourceRequest {
92
+ /** `2026-Q3` or `2026-09`, echoed for the record. */
93
+ period: string;
94
+ /** Half-open UTC bounds of the period. */
95
+ start: Date;
96
+ end: Date;
97
+ filing: TaxReturnFiling;
98
+ /**
99
+ * The most documents the operator will read for one source. Past it the
100
+ * answer is `truncated`, and a truncated source blocks the return: the
101
+ * ceiling is the operator's policy, so a source is TOLD it.
102
+ */
103
+ rowCap: number;
104
+ }
105
+ export type TaxReturnFindingSeverity = 'blocking' | 'review';
106
+ /**
107
+ * One finding, in the words a preparer reads. `blocking` means the return
108
+ * must not be filed until it is resolved; `review` means a figure is
109
+ * qualified. A zero count is not raised.
110
+ */
111
+ export interface TaxReturnFinding {
112
+ /** Stable, and unique on the return. */
113
+ id: string;
114
+ severity: TaxReturnFindingSeverity;
115
+ /** Rows, or cents where the label says so. */
116
+ count: number;
117
+ label: string;
118
+ /** What it means for the return, and what to do — not a restatement. */
119
+ detail: string;
120
+ }
121
+ /** A line printed beneath the platform's own filing figures. */
122
+ export interface TaxReturnFilingLine {
123
+ /** The form's item number where the figure maps to one, else `—`. */
124
+ item: string;
125
+ label: string;
126
+ /** Dollars, or null when the figure is not computed. */
127
+ dollars: string | null;
128
+ note: string;
129
+ }
130
+ /** One cell of a source's table on the screen. */
131
+ export interface TaxReturnSectionCell {
132
+ text: string;
133
+ /** A second, quieter line under the text. */
134
+ caption?: string;
135
+ /**
136
+ * A short tag beside the text. `attention` marks the figure that needs a
137
+ * decision; `neutral` qualifies one.
138
+ */
139
+ tag?: {
140
+ label: string;
141
+ tone: 'attention' | 'neutral';
142
+ };
143
+ /** The figure a reader must not miss. */
144
+ strong?: boolean;
145
+ }
146
+ export interface TaxReturnSectionColumn {
147
+ label: string;
148
+ /** Right-aligned. */
149
+ numeric?: boolean;
150
+ /** Money: set in a fixed-width face so columns of cents line up. */
151
+ money?: boolean;
152
+ }
153
+ /** A table on the source's card. */
154
+ export interface TaxReturnSectionTable {
155
+ /** A subheading above the table; the first table sits under the card's own. */
156
+ heading?: string;
157
+ /** A sentence between the heading and the table. */
158
+ description?: string;
159
+ columns: TaxReturnSectionColumn[];
160
+ rows: Array<{
161
+ key: string;
162
+ cells: TaxReturnSectionCell[];
163
+ }>;
164
+ /** What the table says when it has no rows. */
165
+ empty: string;
166
+ /** A caption under the table. */
167
+ footnote?: string;
168
+ }
169
+ /** One label/value line of a source's figures. */
170
+ export interface TaxReturnSectionFigure {
171
+ label: string;
172
+ value: string;
173
+ note: string;
174
+ }
175
+ /**
176
+ * One block of the working-papers export, as the CSV's own rows.
177
+ *
178
+ * `jurisdictions` places it beside the operator's own sales by jurisdiction,
179
+ * before the working papers; `sections` places it after them, where each
180
+ * source's figures sit. The platform separates blocks with a blank row.
181
+ */
182
+ export interface TaxReturnExportBlock {
183
+ placement: 'jurisdictions' | 'sections';
184
+ rows: string[][];
185
+ }
186
+ /** What a source answers for one period. */
187
+ export interface TaxReturnSourceAnswer {
188
+ /** Stable key for the source's findings and its card, unique on the return. */
189
+ id: string;
190
+ /** The noun for its rows: `Storefront`, `Marketplace`. */
191
+ name: string;
192
+ /** The card's heading. */
193
+ title: string;
194
+ /** The card's help, as a documentation excerpt. */
195
+ help: string;
196
+ /** The paragraph under the heading. */
197
+ intro: string;
198
+ /** Documents past the request's `rowCap` were not read. */
199
+ truncated: boolean;
200
+ /** Rows no period query can reach — in this return and every other. */
201
+ undatedRows: number;
202
+ /** The source's own findings. Truncation and undated rows are raised by the platform. */
203
+ findings: TaxReturnFinding[];
204
+ /** Lines beneath the filing figures, for the request's `filing.form`. */
205
+ filingLines: TaxReturnFilingLine[];
206
+ tables: TaxReturnSectionTable[];
207
+ figures: TaxReturnSectionFigure[];
208
+ exports: TaxReturnExportBlock[];
209
+ /** The source's own figures, carried whole for the audit. */
210
+ summary: unknown;
211
+ /** The rows behind them, as the source projects them for the working papers. */
212
+ rows: unknown[];
213
+ }
214
+ /** One source on the return: its answer, or why there is none. */
215
+ export type TaxReturnSection = ({
216
+ outcome: 'answered';
217
+ pluginId: string;
218
+ } & TaxReturnSourceAnswer) | {
219
+ outcome: 'refused';
220
+ pluginId: string;
221
+ /** The plugin id: a refused source never said what it calls itself. */
222
+ id: string;
223
+ /** Why nothing from this source is on the return, as the return prints it. */
224
+ reason: string;
225
+ };
226
+ export interface TaxReturnSource {
227
+ /**
228
+ * This plugin's sales for one period. May throw: the return refuses the
229
+ * source rather than read a throw as nothing sold.
230
+ */
231
+ read(request: TaxReturnSourceRequest): Promise<TaxReturnSourceAnswer>;
232
+ }
233
+ /** Every source answers; one per plugin. */
234
+ export declare const TAX_RETURN_SOURCES: import("./plugin-services").PluginServiceContract<TaxReturnSource>;
235
+ /**
236
+ * Installs a plugin's source. Owner = the loader's marker inside a register
237
+ * fn, else `options.pluginId`. Registering again replaces the plugin's
238
+ * earlier source, so a module evaluated twice does not answer twice.
239
+ */
240
+ export declare function registerTaxReturnSource(source: TaxReturnSource, options?: {
241
+ pluginId?: string;
242
+ }): void;
243
+ /** The plugins with a registered source, in the order they answer. */
244
+ export declare function listTaxReturnSources(): string[];
245
+ /**
246
+ * Every source's answer for one period — declared sources first, in the
247
+ * compiled order, then any other registered source in registration order.
248
+ *
249
+ * NEVER THROWS and never drops a declared source: a declared plugin with no
250
+ * registration, a source that threw, and a malformed or duplicate answer
251
+ * each come back as `outcome: 'refused'` with the sentence the return prints.
252
+ * `declared` is the compiled {@link PLUGIN_TAX_RETURN_SOURCES} unless a spec
253
+ * passes its own.
254
+ */
255
+ export declare function readTaxReturnSources(request: TaxReturnSourceRequest, declared?: readonly string[]): Promise<TaxReturnSection[]>;
@@ -0,0 +1,191 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ /**
3
+ * @license
4
+ * Copyright 2026 Aglyn LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */ /**
18
+ * THE SALES A PLUGIN MADE THROUGH THE PLATFORM, ON THE OPERATOR'S RETURN
19
+ * (AGL-3080).
20
+ *
21
+ * The operator — whoever runs this deployment — files a sales tax return for
22
+ * the sales it FACILITATED, not only for its own. Its own subscription
23
+ * invoices are platform billing and the return sums them itself. A plugin
24
+ * that sells through the platform's account — a storefront checkout whose tax
25
+ * Stripe computes against the operator's registrations, a marketplace charge
26
+ * whose tax stays platform-side — holds records the return cannot read
27
+ * without knowing that plugin's storage, and a classification of them the
28
+ * return has no business restating.
29
+ *
30
+ * So the division is: the FILING is the platform's — the period, the
31
+ * jurisdiction and registration, the verdict, the working-papers export and
32
+ * the Texas Webfile lines. What a plugin sold, how each of its rows
33
+ * classifies and who is liable for it, and the words a preparer reads about
34
+ * it, are the plugin's. A source answers one period with a
35
+ * {@link TaxReturnSourceAnswer}: its findings, its lines for the filing
36
+ * figures, its tables and figures for the screen, its blocks for the export,
37
+ * and its own summary and rows carried whole for the audit.
38
+ *
39
+ * ## ⛔ AN UNREAD SOURCE REFUSES, IT NEVER READS AS ZERO
40
+ *
41
+ * Decided before anything else, because this is a legal filing. A source
42
+ * that answered nothing is indistinguishable, on a total, from a source that
43
+ * sold nothing — and a return signed on that total understates what the
44
+ * operator collected and holds. So:
45
+ *
46
+ * - **Declared and not registered** — every plugin whose sales belong on the
47
+ * return says so with `"taxReturnSource": true` in `plugins.config.json`,
48
+ * compiled into {@link PLUGIN_TAX_RETURN_SOURCES}. A declared plugin that
49
+ * registered no source in this process answers `outcome: 'refused'`. A
50
+ * runtime registry alone could not say this: an empty registry looks
51
+ * exactly like a deployment where nothing sells.
52
+ * - **Threw, or answered a malformed section** — `outcome: 'refused'`, with
53
+ * the sentence the return prints.
54
+ * - **Truncated, or holding rows no period can reach** — answered, and the
55
+ * platform raises each as a BLOCKING finding itself; a source cannot word
56
+ * its way out of either.
57
+ *
58
+ * The return turns every refusal into a blocking "do not file from this"
59
+ * finding. {@link readTaxReturnSources} never throws and never drops a
60
+ * declared source.
61
+ *
62
+ * The reader is the staff tax-return route, which awaits `ensureAll` on the
63
+ * `consoleApi` surface before it asks, so a runtime registry is filled before
64
+ * the question; the compiled declaration is what makes a MISSING
65
+ * registration a refusal rather than an absence.
66
+ *
67
+ * ⚑ The discriminant is a string: this repo compiles with
68
+ * `strictNullChecks: false`, under which a boolean-literal union does not
69
+ * narrow (see `plugin-artifact-inventory.ts`).
70
+ */ import { PLUGIN_TAX_RETURN_SOURCES } from "./first-party-plugins.generated.js";
71
+ import { definePluginServiceContract, registerPluginService, resolvePluginServices } from "./plugin-services.js";
72
+ export { PLUGIN_TAX_RETURN_SOURCES };
73
+ /** Every source answers; one per plugin. */ export const TAX_RETURN_SOURCES = definePluginServiceContract('core.tax-return-sources', {
74
+ multiple: true
75
+ });
76
+ /**
77
+ * Installs a plugin's source. Owner = the loader's marker inside a register
78
+ * fn, else `options.pluginId`. Registering again replaces the plugin's
79
+ * earlier source, so a module evaluated twice does not answer twice.
80
+ */ export function registerTaxReturnSource(source, options) {
81
+ if (typeof (source == null ? void 0 : source.read) !== 'function') {
82
+ throw new Error('a tax return source needs a read function');
83
+ }
84
+ registerPluginService(TAX_RETURN_SOURCES, source, _extends({}, (options == null ? void 0 : options.pluginId) ? {
85
+ pluginId: options.pluginId
86
+ } : {}));
87
+ }
88
+ /** The plugins with a registered source, in the order they answer. */ export function listTaxReturnSources() {
89
+ return resolvePluginServices(TAX_RETURN_SOURCES).map((entry)=>entry.pluginId);
90
+ }
91
+ const isText = (value)=>typeof value === 'string' && value.trim().length > 0;
92
+ const isCount = (value)=>typeof value === 'number' && Number.isFinite(value) && value >= 0;
93
+ /**
94
+ * What is wrong with an answer, or null when it can be printed.
95
+ *
96
+ * Checked because the answer crosses a package boundary into a legal
97
+ * document: a finding with a NaN count sums to NaN and the verdict reads
98
+ * clean, and a missing array is a section that silently shows nothing.
99
+ */ function malformed(answer) {
100
+ if (!answer || typeof answer !== 'object') return 'no section';
101
+ if (!isText(answer.id) || !isText(answer.name) || !isText(answer.title)) {
102
+ return 'a section with no id, name or title';
103
+ }
104
+ if (typeof answer.truncated !== 'boolean') return 'no truncation flag';
105
+ if (!isCount(answer.undatedRows)) return 'no count of undated rows';
106
+ for (const key of [
107
+ 'findings',
108
+ 'filingLines',
109
+ 'tables',
110
+ 'figures',
111
+ 'exports',
112
+ 'rows'
113
+ ]){
114
+ if (!Array.isArray(answer[key])) return `no ${key}`;
115
+ }
116
+ const badFinding = answer.findings.find((finding)=>!isText(finding == null ? void 0 : finding.id) || finding.severity !== 'blocking' && finding.severity !== 'review' || !isCount(finding.count));
117
+ if (badFinding) return 'a finding with no id, severity or count';
118
+ return null;
119
+ }
120
+ /**
121
+ * Every source's answer for one period — declared sources first, in the
122
+ * compiled order, then any other registered source in registration order.
123
+ *
124
+ * NEVER THROWS and never drops a declared source: a declared plugin with no
125
+ * registration, a source that threw, and a malformed or duplicate answer
126
+ * each come back as `outcome: 'refused'` with the sentence the return prints.
127
+ * `declared` is the compiled {@link PLUGIN_TAX_RETURN_SOURCES} unless a spec
128
+ * passes its own.
129
+ */ export async function readTaxReturnSources(request, declared = PLUGIN_TAX_RETURN_SOURCES) {
130
+ const registered = resolvePluginServices(TAX_RETURN_SOURCES);
131
+ const order = [
132
+ ...declared,
133
+ ...registered.map((entry)=>entry.pluginId).filter((pluginId)=>!declared.includes(pluginId))
134
+ ].filter((pluginId, index, all)=>all.indexOf(pluginId) === index);
135
+ const answers = await Promise.all(order.map(async (pluginId)=>{
136
+ var _registered_find;
137
+ const source = (_registered_find = registered.find((entry)=>entry.pluginId === pluginId)) == null ? void 0 : _registered_find.impl;
138
+ if (!source) {
139
+ console.error(`[tax-return] "${pluginId}" declares a tax return source and none is ` + 'registered in this process; its sales cannot be read.');
140
+ return {
141
+ outcome: 'refused',
142
+ pluginId,
143
+ id: pluginId,
144
+ reason: `The “${pluginId}” plugin sells through the platform and registered ` + 'nothing to read its sales with.'
145
+ };
146
+ }
147
+ try {
148
+ const answer = await source.read(request);
149
+ const problem = malformed(answer);
150
+ if (problem) {
151
+ return {
152
+ outcome: 'refused',
153
+ pluginId,
154
+ id: pluginId,
155
+ reason: `The “${pluginId}” plugin answered ${problem}.`
156
+ };
157
+ }
158
+ return _extends({}, answer, {
159
+ outcome: 'answered',
160
+ pluginId
161
+ });
162
+ } catch (error) {
163
+ console.error(`[tax-return] "${pluginId}" failed to read its sales`, error);
164
+ return {
165
+ outcome: 'refused',
166
+ pluginId,
167
+ id: pluginId,
168
+ reason: `The “${pluginId}” plugin could not read its sales for this period.`
169
+ };
170
+ }
171
+ }));
172
+ // Two sources under one id would print two cards and one set of findings
173
+ // under the same key, and a finding that names the wrong source's rows is
174
+ // worse than none. The later one is refused, visibly.
175
+ const seen = new Set();
176
+ return answers.map((section)=>{
177
+ if (section.outcome !== 'answered') return section;
178
+ if (!seen.has(section.id)) {
179
+ seen.add(section.id);
180
+ return section;
181
+ }
182
+ return {
183
+ outcome: 'refused',
184
+ pluginId: section.pluginId,
185
+ id: section.pluginId,
186
+ reason: `The “${section.pluginId}” plugin answered as “${section.id}”, which ` + 'another source already is.'
187
+ };
188
+ });
189
+ }
190
+
191
+ //# sourceMappingURL=plugin-tax-return-sources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-tax-return-sources.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 SALES A PLUGIN MADE THROUGH THE PLATFORM, ON THE OPERATOR'S RETURN\n * (AGL-3080).\n *\n * The operator — whoever runs this deployment — files a sales tax return for\n * the sales it FACILITATED, not only for its own. Its own subscription\n * invoices are platform billing and the return sums them itself. A plugin\n * that sells through the platform's account — a storefront checkout whose tax\n * Stripe computes against the operator's registrations, a marketplace charge\n * whose tax stays platform-side — holds records the return cannot read\n * without knowing that plugin's storage, and a classification of them the\n * return has no business restating.\n *\n * So the division is: the FILING is the platform's — the period, the\n * jurisdiction and registration, the verdict, the working-papers export and\n * the Texas Webfile lines. What a plugin sold, how each of its rows\n * classifies and who is liable for it, and the words a preparer reads about\n * it, are the plugin's. A source answers one period with a\n * {@link TaxReturnSourceAnswer}: its findings, its lines for the filing\n * figures, its tables and figures for the screen, its blocks for the export,\n * and its own summary and rows carried whole for the audit.\n *\n * ## ⛔ AN UNREAD SOURCE REFUSES, IT NEVER READS AS ZERO\n *\n * Decided before anything else, because this is a legal filing. A source\n * that answered nothing is indistinguishable, on a total, from a source that\n * sold nothing — and a return signed on that total understates what the\n * operator collected and holds. So:\n *\n * - **Declared and not registered** — every plugin whose sales belong on the\n * return says so with `\"taxReturnSource\": true` in `plugins.config.json`,\n * compiled into {@link PLUGIN_TAX_RETURN_SOURCES}. A declared plugin that\n * registered no source in this process answers `outcome: 'refused'`. A\n * runtime registry alone could not say this: an empty registry looks\n * exactly like a deployment where nothing sells.\n * - **Threw, or answered a malformed section** — `outcome: 'refused'`, with\n * the sentence the return prints.\n * - **Truncated, or holding rows no period can reach** — answered, and the\n * platform raises each as a BLOCKING finding itself; a source cannot word\n * its way out of either.\n *\n * The return turns every refusal into a blocking \"do not file from this\"\n * finding. {@link readTaxReturnSources} never throws and never drops a\n * declared source.\n *\n * The reader is the staff tax-return route, which awaits `ensureAll` on the\n * `consoleApi` surface before it asks, so a runtime registry is filled before\n * the question; the compiled declaration is what makes a MISSING\n * registration a refusal rather than an absence.\n *\n * ⚑ The discriminant is a string: this repo compiles with\n * `strictNullChecks: false`, under which a boolean-literal union does not\n * narrow (see `plugin-artifact-inventory.ts`).\n */\n\nimport { PLUGIN_TAX_RETURN_SOURCES } from './first-party-plugins.generated'\nimport {\n definePluginServiceContract,\n registerPluginService,\n resolvePluginServices,\n} from './plugin-services'\n\nexport { PLUGIN_TAX_RETURN_SOURCES }\n\n/** Which exporter the filing jurisdiction gets. */\nexport type TaxReturnFilingForm = 'tx-webfile' | 'breakdown'\n\n/**\n * The jurisdiction the operator files in, as the platform resolved it from\n * its own configuration. A source words its lines and findings for THIS\n * jurisdiction and never assumes one.\n */\nexport interface TaxReturnFiling {\n /** The bucket key: `US-TX`, `US-CA`, `GB`. */\n code: string\n /** How a sentence names it: `Texas`, or the code itself. */\n label: string\n /** Which exporter the filing lines are for. */\n form: TaxReturnFilingForm\n /** How a sentence names the filing figures: `Items 1–3`, `the breakdown`. */\n figuresName: string\n}\n\n/** What the return asks every source, once per period. */\nexport interface TaxReturnSourceRequest {\n /** `2026-Q3` or `2026-09`, echoed for the record. */\n period: string\n /** Half-open UTC bounds of the period. */\n start: Date\n end: Date\n filing: TaxReturnFiling\n /**\n * The most documents the operator will read for one source. Past it the\n * answer is `truncated`, and a truncated source blocks the return: the\n * ceiling is the operator's policy, so a source is TOLD it.\n */\n rowCap: number\n}\n\nexport type TaxReturnFindingSeverity = 'blocking' | 'review'\n\n/**\n * One finding, in the words a preparer reads. `blocking` means the return\n * must not be filed until it is resolved; `review` means a figure is\n * qualified. A zero count is not raised.\n */\nexport interface TaxReturnFinding {\n /** Stable, and unique on the return. */\n id: string\n severity: TaxReturnFindingSeverity\n /** Rows, or cents where the label says so. */\n count: number\n label: string\n /** What it means for the return, and what to do — not a restatement. */\n detail: string\n}\n\n/** A line printed beneath the platform's own filing figures. */\nexport interface TaxReturnFilingLine {\n /** The form's item number where the figure maps to one, else `—`. */\n item: string\n label: string\n /** Dollars, or null when the figure is not computed. */\n dollars: string | null\n note: string\n}\n\n/** One cell of a source's table on the screen. */\nexport interface TaxReturnSectionCell {\n text: string\n /** A second, quieter line under the text. */\n caption?: string\n /**\n * A short tag beside the text. `attention` marks the figure that needs a\n * decision; `neutral` qualifies one.\n */\n tag?: { label: string; tone: 'attention' | 'neutral' }\n /** The figure a reader must not miss. */\n strong?: boolean\n}\n\nexport interface TaxReturnSectionColumn {\n label: string\n /** Right-aligned. */\n numeric?: boolean\n /** Money: set in a fixed-width face so columns of cents line up. */\n money?: boolean\n}\n\n/** A table on the source's card. */\nexport interface TaxReturnSectionTable {\n /** A subheading above the table; the first table sits under the card's own. */\n heading?: string\n /** A sentence between the heading and the table. */\n description?: string\n columns: TaxReturnSectionColumn[]\n rows: Array<{ key: string; cells: TaxReturnSectionCell[] }>\n /** What the table says when it has no rows. */\n empty: string\n /** A caption under the table. */\n footnote?: string\n}\n\n/** One label/value line of a source's figures. */\nexport interface TaxReturnSectionFigure {\n label: string\n value: string\n note: string\n}\n\n/**\n * One block of the working-papers export, as the CSV's own rows.\n *\n * `jurisdictions` places it beside the operator's own sales by jurisdiction,\n * before the working papers; `sections` places it after them, where each\n * source's figures sit. The platform separates blocks with a blank row.\n */\nexport interface TaxReturnExportBlock {\n placement: 'jurisdictions' | 'sections'\n rows: string[][]\n}\n\n/** What a source answers for one period. */\nexport interface TaxReturnSourceAnswer {\n /** Stable key for the source's findings and its card, unique on the return. */\n id: string\n /** The noun for its rows: `Storefront`, `Marketplace`. */\n name: string\n /** The card's heading. */\n title: string\n /** The card's help, as a documentation excerpt. */\n help: string\n /** The paragraph under the heading. */\n intro: string\n /** Documents past the request's `rowCap` were not read. */\n truncated: boolean\n /** Rows no period query can reach — in this return and every other. */\n undatedRows: number\n /** The source's own findings. Truncation and undated rows are raised by the platform. */\n findings: TaxReturnFinding[]\n /** Lines beneath the filing figures, for the request's `filing.form`. */\n filingLines: TaxReturnFilingLine[]\n tables: TaxReturnSectionTable[]\n figures: TaxReturnSectionFigure[]\n exports: TaxReturnExportBlock[]\n /** The source's own figures, carried whole for the audit. */\n summary: unknown\n /** The rows behind them, as the source projects them for the working papers. */\n rows: unknown[]\n}\n\n/** One source on the return: its answer, or why there is none. */\nexport type TaxReturnSection =\n | ({ outcome: 'answered'; pluginId: string } & TaxReturnSourceAnswer)\n | {\n outcome: 'refused'\n pluginId: string\n /** The plugin id: a refused source never said what it calls itself. */\n id: string\n /** Why nothing from this source is on the return, as the return prints it. */\n reason: string\n }\n\nexport interface TaxReturnSource {\n /**\n * This plugin's sales for one period. May throw: the return refuses the\n * source rather than read a throw as nothing sold.\n */\n read(request: TaxReturnSourceRequest): Promise<TaxReturnSourceAnswer>\n}\n\n/** Every source answers; one per plugin. */\nexport const TAX_RETURN_SOURCES = definePluginServiceContract<TaxReturnSource>(\n 'core.tax-return-sources',\n { multiple: true },\n)\n\n/**\n * Installs a plugin's source. Owner = the loader's marker inside a register\n * fn, else `options.pluginId`. Registering again replaces the plugin's\n * earlier source, so a module evaluated twice does not answer twice.\n */\nexport function registerTaxReturnSource(\n source: TaxReturnSource,\n options?: { pluginId?: string },\n): void {\n if (typeof source?.read !== 'function') {\n throw new Error('a tax return source needs a read function')\n }\n registerPluginService(TAX_RETURN_SOURCES, source, {\n ...(options?.pluginId ? { pluginId: options.pluginId } : {}),\n })\n}\n\n/** The plugins with a registered source, in the order they answer. */\nexport function listTaxReturnSources(): string[] {\n return resolvePluginServices(TAX_RETURN_SOURCES).map((entry) => entry.pluginId)\n}\n\nconst isText = (value: unknown): value is string =>\n typeof value === 'string' && value.trim().length > 0\n\nconst isCount = (value: unknown): boolean =>\n typeof value === 'number' && Number.isFinite(value) && value >= 0\n\n/**\n * What is wrong with an answer, or null when it can be printed.\n *\n * Checked because the answer crosses a package boundary into a legal\n * document: a finding with a NaN count sums to NaN and the verdict reads\n * clean, and a missing array is a section that silently shows nothing.\n */\nfunction malformed(answer: TaxReturnSourceAnswer): string | null {\n if (!answer || typeof answer !== 'object') return 'no section'\n if (!isText(answer.id) || !isText(answer.name) || !isText(answer.title)) {\n return 'a section with no id, name or title'\n }\n if (typeof answer.truncated !== 'boolean') return 'no truncation flag'\n if (!isCount(answer.undatedRows)) return 'no count of undated rows'\n for (const key of ['findings', 'filingLines', 'tables', 'figures', 'exports', 'rows'] as const) {\n if (!Array.isArray(answer[key])) return `no ${key}`\n }\n const badFinding = answer.findings.find(\n (finding) =>\n !isText(finding?.id) ||\n (finding.severity !== 'blocking' && finding.severity !== 'review') ||\n !isCount(finding.count),\n )\n if (badFinding) return 'a finding with no id, severity or count'\n return null\n}\n\n/**\n * Every source's answer for one period — declared sources first, in the\n * compiled order, then any other registered source in registration order.\n *\n * NEVER THROWS and never drops a declared source: a declared plugin with no\n * registration, a source that threw, and a malformed or duplicate answer\n * each come back as `outcome: 'refused'` with the sentence the return prints.\n * `declared` is the compiled {@link PLUGIN_TAX_RETURN_SOURCES} unless a spec\n * passes its own.\n */\nexport async function readTaxReturnSources(\n request: TaxReturnSourceRequest,\n declared: readonly string[] = PLUGIN_TAX_RETURN_SOURCES,\n): Promise<TaxReturnSection[]> {\n const registered = resolvePluginServices(TAX_RETURN_SOURCES)\n const order = [\n ...declared,\n ...registered\n .map((entry) => entry.pluginId)\n .filter((pluginId) => !declared.includes(pluginId)),\n ].filter((pluginId, index, all) => all.indexOf(pluginId) === index)\n\n const answers = await Promise.all(\n order.map(async (pluginId): Promise<TaxReturnSection> => {\n const source = registered.find((entry) => entry.pluginId === pluginId)?.impl\n if (!source) {\n console.error(\n `[tax-return] \"${pluginId}\" declares a tax return source and none is ` +\n 'registered in this process; its sales cannot be read.',\n )\n return {\n outcome: 'refused',\n pluginId,\n id: pluginId,\n reason:\n `The “${pluginId}” plugin sells through the platform and registered ` +\n 'nothing to read its sales with.',\n }\n }\n try {\n const answer = await source.read(request)\n const problem = malformed(answer)\n if (problem) {\n return {\n outcome: 'refused',\n pluginId,\n id: pluginId,\n reason: `The “${pluginId}” plugin answered ${problem}.`,\n }\n }\n return { ...answer, outcome: 'answered', pluginId }\n } catch (error) {\n console.error(`[tax-return] \"${pluginId}\" failed to read its sales`, error)\n return {\n outcome: 'refused',\n pluginId,\n id: pluginId,\n reason: `The “${pluginId}” plugin could not read its sales for this period.`,\n }\n }\n }),\n )\n\n // Two sources under one id would print two cards and one set of findings\n // under the same key, and a finding that names the wrong source's rows is\n // worse than none. The later one is refused, visibly.\n const seen = new Set<string>()\n return answers.map((section) => {\n if (section.outcome !== 'answered') return section\n if (!seen.has(section.id)) {\n seen.add(section.id)\n return section\n }\n return {\n outcome: 'refused',\n pluginId: section.pluginId,\n id: section.pluginId,\n reason:\n `The “${section.pluginId}” plugin answered as “${section.id}”, which ` +\n 'another source already is.',\n }\n })\n}\n"],"names":["PLUGIN_TAX_RETURN_SOURCES","definePluginServiceContract","registerPluginService","resolvePluginServices","TAX_RETURN_SOURCES","multiple","registerTaxReturnSource","source","options","read","Error","pluginId","listTaxReturnSources","map","entry","isText","value","trim","length","isCount","Number","isFinite","malformed","answer","id","name","title","truncated","undatedRows","key","Array","isArray","badFinding","findings","find","finding","severity","count","readTaxReturnSources","request","declared","registered","order","filter","includes","index","all","indexOf","answers","Promise","impl","console","error","outcome","reason","problem","seen","Set","section","has","add"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDC,GAED,SAASA,yBAAyB,QAAQ,qCAAiC;AAC3E,SACEC,2BAA2B,EAC3BC,qBAAqB,EACrBC,qBAAqB,QAChB,uBAAmB;AAE1B,SAASH,yBAAyB,GAAE;AAyKpC,0CAA0C,GAC1C,OAAO,MAAMI,qBAAqBH,4BAChC,2BACA;IAAEI,UAAU;AAAK,GAClB;AAED;;;;CAIC,GACD,OAAO,SAASC,wBACdC,MAAuB,EACvBC,OAA+B;IAE/B,IAAI,QAAOD,0BAAAA,OAAQE,IAAI,MAAK,YAAY;QACtC,MAAM,IAAIC,MAAM;IAClB;IACAR,sBAAsBE,oBAAoBG,QAAQ,aAC5CC,CAAAA,2BAAAA,QAASG,QAAQ,IAAG;QAAEA,UAAUH,QAAQG,QAAQ;IAAC,IAAI,CAAC;AAE9D;AAEA,oEAAoE,GACpE,OAAO,SAASC;IACd,OAAOT,sBAAsBC,oBAAoBS,GAAG,CAAC,CAACC,QAAUA,MAAMH,QAAQ;AAChF;AAEA,MAAMI,SAAS,CAACC,QACd,OAAOA,UAAU,YAAYA,MAAMC,IAAI,GAAGC,MAAM,GAAG;AAErD,MAAMC,UAAU,CAACH,QACf,OAAOA,UAAU,YAAYI,OAAOC,QAAQ,CAACL,UAAUA,SAAS;AAElE;;;;;;CAMC,GACD,SAASM,UAAUC,MAA6B;IAC9C,IAAI,CAACA,UAAU,OAAOA,WAAW,UAAU,OAAO;IAClD,IAAI,CAACR,OAAOQ,OAAOC,EAAE,KAAK,CAACT,OAAOQ,OAAOE,IAAI,KAAK,CAACV,OAAOQ,OAAOG,KAAK,GAAG;QACvE,OAAO;IACT;IACA,IAAI,OAAOH,OAAOI,SAAS,KAAK,WAAW,OAAO;IAClD,IAAI,CAACR,QAAQI,OAAOK,WAAW,GAAG,OAAO;IACzC,KAAK,MAAMC,OAAO;QAAC;QAAY;QAAe;QAAU;QAAW;QAAW;KAAO,CAAW;QAC9F,IAAI,CAACC,MAAMC,OAAO,CAACR,MAAM,CAACM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAEA,KAAK;IACrD;IACA,MAAMG,aAAaT,OAAOU,QAAQ,CAACC,IAAI,CACrC,CAACC,UACC,CAACpB,OAAOoB,2BAAAA,QAASX,EAAE,KAClBW,QAAQC,QAAQ,KAAK,cAAcD,QAAQC,QAAQ,KAAK,YACzD,CAACjB,QAAQgB,QAAQE,KAAK;IAE1B,IAAIL,YAAY,OAAO;IACvB,OAAO;AACT;AAEA;;;;;;;;;CASC,GACD,OAAO,eAAeM,qBACpBC,OAA+B,EAC/BC,WAA8BxC,yBAAyB;IAEvD,MAAMyC,aAAatC,sBAAsBC;IACzC,MAAMsC,QAAQ;WACTF;WACAC,WACA5B,GAAG,CAAC,CAACC,QAAUA,MAAMH,QAAQ,EAC7BgC,MAAM,CAAC,CAAChC,WAAa,CAAC6B,SAASI,QAAQ,CAACjC;KAC5C,CAACgC,MAAM,CAAC,CAAChC,UAAUkC,OAAOC,MAAQA,IAAIC,OAAO,CAACpC,cAAckC;IAE7D,MAAMG,UAAU,MAAMC,QAAQH,GAAG,CAC/BJ,MAAM7B,GAAG,CAAC,OAAOF;YACA8B;QAAf,MAAMlC,UAASkC,mBAAAA,WAAWP,IAAI,CAAC,CAACpB,QAAUA,MAAMH,QAAQ,KAAKA,8BAA9C8B,iBAAyDS,IAAI;QAC5E,IAAI,CAAC3C,QAAQ;YACX4C,QAAQC,KAAK,CACX,CAAC,cAAc,EAAEzC,SAAS,2CAA2C,CAAC,GACpE;YAEJ,OAAO;gBACL0C,SAAS;gBACT1C;gBACAa,IAAIb;gBACJ2C,QACE,CAAC,KAAK,EAAE3C,SAAS,mDAAmD,CAAC,GACrE;YACJ;QACF;QACA,IAAI;YACF,MAAMY,SAAS,MAAMhB,OAAOE,IAAI,CAAC8B;YACjC,MAAMgB,UAAUjC,UAAUC;YAC1B,IAAIgC,SAAS;gBACX,OAAO;oBACLF,SAAS;oBACT1C;oBACAa,IAAIb;oBACJ2C,QAAQ,CAAC,KAAK,EAAE3C,SAAS,kBAAkB,EAAE4C,QAAQ,CAAC,CAAC;gBACzD;YACF;YACA,OAAO,aAAKhC;gBAAQ8B,SAAS;gBAAY1C;;QAC3C,EAAE,OAAOyC,OAAO;YACdD,QAAQC,KAAK,CAAC,CAAC,cAAc,EAAEzC,SAAS,0BAA0B,CAAC,EAAEyC;YACrE,OAAO;gBACLC,SAAS;gBACT1C;gBACAa,IAAIb;gBACJ2C,QAAQ,CAAC,KAAK,EAAE3C,SAAS,kDAAkD,CAAC;YAC9E;QACF;IACF;IAGF,yEAAyE;IACzE,0EAA0E;IAC1E,sDAAsD;IACtD,MAAM6C,OAAO,IAAIC;IACjB,OAAOT,QAAQnC,GAAG,CAAC,CAAC6C;QAClB,IAAIA,QAAQL,OAAO,KAAK,YAAY,OAAOK;QAC3C,IAAI,CAACF,KAAKG,GAAG,CAACD,QAAQlC,EAAE,GAAG;YACzBgC,KAAKI,GAAG,CAACF,QAAQlC,EAAE;YACnB,OAAOkC;QACT;QACA,OAAO;YACLL,SAAS;YACT1C,UAAU+C,QAAQ/C,QAAQ;YAC1Ba,IAAIkC,QAAQ/C,QAAQ;YACpB2C,QACE,CAAC,KAAK,EAAEI,QAAQ/C,QAAQ,CAAC,sBAAsB,EAAE+C,QAAQlC,EAAE,CAAC,SAAS,CAAC,GACtE;QACJ;IACF;AACF"}
@@ -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
+ */
17
+ import { PLUGIN_TEMPLATE_SOURCES } from './first-party-plugins.generated';
18
+ /**
19
+ * Where a site's template came from, by its stored `source.type` (AGL-666,
20
+ * AGL-3080).
21
+ *
22
+ * The stamp is server-managed, which is what lets a site's library show it as
23
+ * a trust signal. Two values are the platform's own: {@link
24
+ * AUTHORED_TEMPLATE_SOURCE}, a template saved on the site, and {@link
25
+ * STARTER_TEMPLATE_SOURCE}, a first-party starter copied in when it was used
26
+ * or edited. Every other value is stamped by a plugin that INSTALLS templates
27
+ * into a site's library, and that plugin declares it as `templateSource` in
28
+ * `plugins.config.json`: the value its install route writes, the badge the
29
+ * library shows, and the sentence explaining the badge.
30
+ *
31
+ * ## Compiled, never registered
32
+ *
33
+ * The readers ask before any plugin code has loaded, and one of them asks
34
+ * Firestore by value: the template gallery's own shelf holds a site's saved
35
+ * AND installed templates, as a `source.type in [...]` clause. A runtime
36
+ * registry the page had not filled yet would leave every installed template
37
+ * off that shelf with nothing to say it was missing, so the declaration is
38
+ * data the generator compiles.
39
+ *
40
+ * ## A type no plugin declares
41
+ *
42
+ * A template installed by a plugin this build no longer carries keeps its
43
+ * stamp, and the stamp still says a server installed it. It reads as
44
+ * installed ({@link installedTemplateSource} answers `null`, and the
45
+ * library's badge says "Installed") rather than as something the site
46
+ * authored.
47
+ */
48
+ export interface PluginTemplateSource {
49
+ /** The plugin that declared it. */
50
+ pluginId: string;
51
+ /** The `source.type` the plugin's install route stamps. */
52
+ type: string;
53
+ /** The library's badge: the name of where the template came from. */
54
+ label: string;
55
+ /** One sentence saying where the template came from, for the badge's hint. */
56
+ description: string;
57
+ }
58
+ /** A template saved on the site itself — and one written before `source`. */
59
+ export declare const AUTHORED_TEMPLATE_SOURCE = "authored";
60
+ /** A first-party starter, copied into the library when it was used or edited. */
61
+ export declare const STARTER_TEMPLATE_SOURCE = "starter";
62
+ export { PLUGIN_TEMPLATE_SOURCES };
63
+ /** Every `source.type` a plugin in this build stamps on a template it installs. */
64
+ export declare const INSTALLED_TEMPLATE_SOURCE_TYPES: readonly string[];
65
+ /**
66
+ * The declaration behind a template's `source.type`, or `null` for the
67
+ * platform's own two values, a missing stamp, and a stamp no plugin in this
68
+ * build declares.
69
+ */
70
+ export declare function installedTemplateSource(type: unknown): PluginTemplateSource | null;
71
+ /**
72
+ * Whether a template was installed rather than saved here or started from a
73
+ * starter: any stamp but the platform's own two, declared or not.
74
+ */
75
+ export declare function isInstalledTemplateSource(type: unknown): boolean;