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

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 (358) hide show
  1. package/package.json +15 -11
  2. package/src/lib/app-utils/agent-openapi.js +1 -1
  3. package/src/lib/app-utils/agent-openapi.js.map +1 -1
  4. package/src/lib/app-utils/analytics-events.d.ts +3 -2
  5. package/src/lib/app-utils/analytics-events.js +3 -2
  6. package/src/lib/app-utils/analytics-events.js.map +1 -1
  7. package/src/lib/app-utils/api-plugins.d.ts +30 -0
  8. package/src/lib/app-utils/api-plugins.js +24 -1
  9. package/src/lib/app-utils/api-plugins.js.map +1 -1
  10. package/src/lib/app-utils/author-html.d.ts +1 -1
  11. package/src/lib/app-utils/author-html.js.map +1 -1
  12. package/src/lib/app-utils/bandwidth-cap.d.ts +12 -1
  13. package/src/lib/app-utils/bandwidth-cap.js +17 -1
  14. package/src/lib/app-utils/bandwidth-cap.js.map +1 -1
  15. package/src/lib/app-utils/compose-reusable-components.d.ts +19 -0
  16. package/src/lib/app-utils/compose-reusable-components.js +116 -26
  17. package/src/lib/app-utils/compose-reusable-components.js.map +1 -1
  18. package/src/lib/app-utils/console-routes.d.ts +4 -0
  19. package/src/lib/app-utils/console-routes.js +3 -0
  20. package/src/lib/app-utils/console-routes.js.map +1 -1
  21. package/src/lib/app-utils/contacts.d.ts +71 -0
  22. package/src/lib/app-utils/contacts.js +55 -0
  23. package/src/lib/app-utils/contacts.js.map +1 -1
  24. package/src/lib/app-utils/contexts.d.ts +1 -0
  25. package/src/lib/app-utils/contexts.js +1 -0
  26. package/src/lib/app-utils/contexts.js.map +1 -1
  27. package/src/lib/app-utils/crm-email-templates.js +21 -4
  28. package/src/lib/app-utils/crm-email-templates.js.map +1 -1
  29. package/src/lib/app-utils/crm-kinds.d.ts +2 -0
  30. package/src/lib/app-utils/crm-kinds.js +1 -0
  31. package/src/lib/app-utils/crm-kinds.js.map +1 -1
  32. package/src/lib/app-utils/crm.d.ts +1199 -67
  33. package/src/lib/app-utils/crm.js +1951 -310
  34. package/src/lib/app-utils/crm.js.map +1 -1
  35. package/src/lib/app-utils/csv-import.d.ts +10 -38
  36. package/src/lib/app-utils/csv-import.js +17 -42
  37. package/src/lib/app-utils/csv-import.js.map +1 -1
  38. package/src/lib/app-utils/csv.d.ts +32 -11
  39. package/src/lib/app-utils/csv.js +43 -5
  40. package/src/lib/app-utils/csv.js.map +1 -1
  41. package/src/lib/app-utils/default-site.d.ts +116 -0
  42. package/src/lib/app-utils/default-site.js +1024 -0
  43. package/src/lib/app-utils/default-site.js.map +1 -0
  44. package/src/lib/app-utils/docs-help.generated.d.ts +23 -23
  45. package/src/lib/app-utils/docs-help.generated.js +47 -10
  46. package/src/lib/app-utils/docs-help.generated.js.map +1 -1
  47. package/src/lib/app-utils/docs-index.generated.js +746 -151
  48. package/src/lib/app-utils/docs-index.generated.js.map +1 -1
  49. package/src/lib/app-utils/draft-placeholders.d.ts +76 -0
  50. package/src/lib/app-utils/draft-placeholders.js +115 -0
  51. package/src/lib/app-utils/draft-placeholders.js.map +1 -0
  52. package/src/lib/app-utils/entity-picker-context.d.ts +19 -15
  53. package/src/lib/app-utils/entity-picker-context.js +4 -4
  54. package/src/lib/app-utils/entity-picker-context.js.map +1 -1
  55. package/src/lib/app-utils/expand-repeatables.d.ts +66 -10
  56. package/src/lib/app-utils/expand-repeatables.js +88 -14
  57. package/src/lib/app-utils/expand-repeatables.js.map +1 -1
  58. package/src/lib/app-utils/forms.d.ts +33 -22
  59. package/src/lib/app-utils/forms.js +47 -28
  60. package/src/lib/app-utils/forms.js.map +1 -1
  61. package/src/lib/app-utils/full-use-cost.d.ts +277 -0
  62. package/src/lib/app-utils/full-use-cost.js +421 -0
  63. package/src/lib/app-utils/full-use-cost.js.map +1 -0
  64. package/src/lib/app-utils/health-report.js +33 -0
  65. package/src/lib/app-utils/health-report.js.map +1 -1
  66. package/src/lib/app-utils/leaving-notice.d.ts +96 -0
  67. package/src/lib/app-utils/leaving-notice.js +157 -0
  68. package/src/lib/app-utils/leaving-notice.js.map +1 -0
  69. package/src/lib/app-utils/llms-txt.d.ts +20 -0
  70. package/src/lib/app-utils/llms-txt.js +7 -1
  71. package/src/lib/app-utils/llms-txt.js.map +1 -1
  72. package/src/lib/app-utils/media-asset-facts.d.ts +16 -1
  73. package/src/lib/app-utils/media-asset-facts.js +40 -13
  74. package/src/lib/app-utils/media-asset-facts.js.map +1 -1
  75. package/src/lib/app-utils/media-bandwidth.d.ts +52 -0
  76. package/src/lib/app-utils/media-bandwidth.js +94 -0
  77. package/src/lib/app-utils/media-bandwidth.js.map +1 -0
  78. package/src/lib/app-utils/media-ref.d.ts +241 -33
  79. package/src/lib/app-utils/media-ref.js +324 -43
  80. package/src/lib/app-utils/media-ref.js.map +1 -1
  81. package/src/lib/app-utils/media-src.d.ts +8 -8
  82. package/src/lib/app-utils/media-src.js +27 -11
  83. package/src/lib/app-utils/media-src.js.map +1 -1
  84. package/src/lib/app-utils/media-takedown-reach.d.ts +4 -1
  85. package/src/lib/app-utils/media-takedown-reach.js +6 -3
  86. package/src/lib/app-utils/media-takedown-reach.js.map +1 -1
  87. package/src/lib/app-utils/notifications.d.ts +1 -1
  88. package/src/lib/app-utils/notifications.js +2 -0
  89. package/src/lib/app-utils/notifications.js.map +1 -1
  90. package/src/lib/app-utils/operator-alerts.js +17 -0
  91. package/src/lib/app-utils/operator-alerts.js.map +1 -1
  92. package/src/lib/app-utils/organizations.d.ts +51 -2
  93. package/src/lib/app-utils/organizations.js +56 -3
  94. package/src/lib/app-utils/organizations.js.map +1 -1
  95. package/src/lib/app-utils/page-record-sources.d.ts +87 -0
  96. package/src/lib/app-utils/page-record-sources.js +53 -0
  97. package/src/lib/app-utils/page-record-sources.js.map +1 -0
  98. package/src/lib/app-utils/paid-media-source.d.ts +3 -7
  99. package/src/lib/app-utils/paid-media-source.js +5 -19
  100. package/src/lib/app-utils/paid-media-source.js.map +1 -1
  101. package/src/lib/app-utils/person-erasure.d.ts +5 -2
  102. package/src/lib/app-utils/person-erasure.js.map +1 -1
  103. package/src/lib/app-utils/picklists.d.ts +187 -0
  104. package/src/lib/app-utils/picklists.js +320 -0
  105. package/src/lib/app-utils/picklists.js.map +1 -0
  106. package/src/lib/app-utils/plan-entitlements.d.ts +220 -50
  107. package/src/lib/app-utils/plan-entitlements.js +309 -115
  108. package/src/lib/app-utils/plan-entitlements.js.map +1 -1
  109. package/src/lib/app-utils/realm-host-surface.generated.js +2 -0
  110. package/src/lib/app-utils/realm-host-surface.generated.js.map +1 -1
  111. package/src/lib/app-utils/release-flags.d.ts +1 -1
  112. package/src/lib/app-utils/release-flags.js +11 -0
  113. package/src/lib/app-utils/release-flags.js.map +1 -1
  114. package/src/lib/app-utils/rendered-widths.d.ts +121 -0
  115. package/src/lib/app-utils/rendered-widths.js +211 -0
  116. package/src/lib/app-utils/rendered-widths.js.map +1 -0
  117. package/src/lib/app-utils/repeat-sources.d.ts +2 -1
  118. package/src/lib/app-utils/repeat-sources.js.map +1 -1
  119. package/src/lib/app-utils/screen-link-context-value.d.ts +7 -0
  120. package/src/lib/app-utils/screen-link-context-value.js.map +1 -1
  121. package/src/lib/app-utils/screen-link-context.js +14 -2
  122. package/src/lib/app-utils/screen-link-context.js.map +1 -1
  123. package/src/lib/app-utils/screen-route.d.ts +157 -36
  124. package/src/lib/app-utils/screen-route.js +191 -41
  125. package/src/lib/app-utils/screen-route.js.map +1 -1
  126. package/src/lib/app-utils/seo-audit.d.ts +11 -1
  127. package/src/lib/app-utils/seo-audit.js +33 -13
  128. package/src/lib/app-utils/seo-audit.js.map +1 -1
  129. package/src/lib/app-utils/seo-keywords.d.ts +11 -0
  130. package/src/lib/app-utils/seo-keywords.js +19 -5
  131. package/src/lib/app-utils/seo-keywords.js.map +1 -1
  132. package/src/lib/app-utils/seo-page-facts.d.ts +47 -4
  133. package/src/lib/app-utils/seo-page-facts.js +136 -31
  134. package/src/lib/app-utils/seo-page-facts.js.map +1 -1
  135. package/src/lib/app-utils/seo-site-scan.d.ts +42 -4
  136. package/src/lib/app-utils/seo-site-scan.js +113 -12
  137. package/src/lib/app-utils/seo-site-scan.js.map +1 -1
  138. package/src/lib/app-utils/server.d.ts +5 -4
  139. package/src/lib/app-utils/server.js +14 -5
  140. package/src/lib/app-utils/server.js.map +1 -1
  141. package/src/lib/app-utils/site-icon-set.d.ts +195 -0
  142. package/src/lib/app-utils/site-icon-set.js +351 -0
  143. package/src/lib/app-utils/site-icon-set.js.map +1 -0
  144. package/src/lib/app-utils/site-interactions.d.ts +101 -4
  145. package/src/lib/app-utils/site-interactions.js +120 -4
  146. package/src/lib/app-utils/site-interactions.js.map +1 -1
  147. package/src/lib/app-utils/starter-template-nodes.d.ts +7 -0
  148. package/src/lib/app-utils/starter-template-nodes.js +3 -0
  149. package/src/lib/app-utils/starter-template-nodes.js.map +1 -1
  150. package/src/lib/app-utils/starter-templates.d.ts +5 -19
  151. package/src/lib/app-utils/starter-templates.js +5 -49
  152. package/src/lib/app-utils/starter-templates.js.map +1 -1
  153. package/src/lib/app-utils/transfer-launcher-context.d.ts +136 -0
  154. package/src/lib/app-utils/transfer-launcher-context.js +23 -0
  155. package/src/lib/app-utils/transfer-launcher-context.js.map +1 -0
  156. package/src/lib/app-utils/transfer-resume-import.d.ts +39 -0
  157. package/src/lib/app-utils/transfer-resume-import.js +128 -0
  158. package/src/lib/app-utils/transfer-resume-import.js.map +1 -0
  159. package/src/lib/app-utils/upgrade-proposal.d.ts +66 -0
  160. package/src/lib/app-utils/upgrade-proposal.js +95 -0
  161. package/src/lib/app-utils/upgrade-proposal.js.map +1 -0
  162. package/src/lib/app-utils/utc-month.d.ts +33 -0
  163. package/src/lib/app-utils/utc-month.js +35 -0
  164. package/src/lib/app-utils/utc-month.js.map +1 -0
  165. package/src/lib/app-utils/visitor-record-ceiling.d.ts +4 -4
  166. package/src/lib/app-utils/visitor-record-ceiling.js +4 -4
  167. package/src/lib/app-utils/visitor-record-ceiling.js.map +1 -1
  168. package/src/lib/app-utils/wire-nodes.d.ts +39 -19
  169. package/src/lib/app-utils/wire-nodes.js +120 -34
  170. package/src/lib/app-utils/wire-nodes.js.map +1 -1
  171. package/src/lib/data-transfer/access.d.ts +74 -0
  172. package/src/lib/data-transfer/access.js +93 -0
  173. package/src/lib/data-transfer/access.js.map +1 -0
  174. package/src/lib/data-transfer/derive.d.ts +246 -0
  175. package/src/lib/data-transfer/derive.js +1007 -0
  176. package/src/lib/data-transfer/derive.js.map +1 -0
  177. package/src/lib/data-transfer/export-file.d.ts +46 -0
  178. package/src/lib/data-transfer/export-file.js +146 -0
  179. package/src/lib/data-transfer/export-file.js.map +1 -0
  180. package/src/lib/data-transfer/field-catalog.d.ts +134 -0
  181. package/src/lib/data-transfer/field-catalog.js +278 -0
  182. package/src/lib/data-transfer/field-catalog.js.map +1 -0
  183. package/src/lib/data-transfer/header-match.d.ts +129 -0
  184. package/src/lib/data-transfer/header-match.js +367 -0
  185. package/src/lib/data-transfer/header-match.js.map +1 -0
  186. package/src/lib/data-transfer/index.d.ts +34 -0
  187. package/src/lib/data-transfer/index.js +40 -0
  188. package/src/lib/data-transfer/index.js.map +1 -0
  189. package/src/lib/data-transfer/job.d.ts +190 -0
  190. package/src/lib/data-transfer/job.js +229 -0
  191. package/src/lib/data-transfer/job.js.map +1 -0
  192. package/src/lib/data-transfer/lookup.d.ts +45 -0
  193. package/src/lib/data-transfer/lookup.js +71 -0
  194. package/src/lib/data-transfer/lookup.js.map +1 -0
  195. package/src/lib/data-transfer/match.d.ts +99 -0
  196. package/src/lib/data-transfer/match.js +244 -0
  197. package/src/lib/data-transfer/match.js.map +1 -0
  198. package/src/lib/data-transfer/package-plan.d.ts +205 -0
  199. package/src/lib/data-transfer/package-plan.js +475 -0
  200. package/src/lib/data-transfer/package-plan.js.map +1 -0
  201. package/src/lib/data-transfer/package.d.ts +181 -0
  202. package/src/lib/data-transfer/package.js +426 -0
  203. package/src/lib/data-transfer/package.js.map +1 -0
  204. package/src/lib/data-transfer/picklist-map.d.ts +139 -0
  205. package/src/lib/data-transfer/picklist-map.js +271 -0
  206. package/src/lib/data-transfer/picklist-map.js.map +1 -0
  207. package/src/lib/data-transfer/plan.d.ts +176 -0
  208. package/src/lib/data-transfer/plan.js +451 -0
  209. package/src/lib/data-transfer/plan.js.map +1 -0
  210. package/src/lib/data-transfer/policy.d.ts +170 -0
  211. package/src/lib/data-transfer/policy.js +378 -0
  212. package/src/lib/data-transfer/policy.js.map +1 -0
  213. package/src/lib/data-transfer/resource.d.ts +211 -0
  214. package/src/lib/data-transfer/resource.js +241 -0
  215. package/src/lib/data-transfer/resource.js.map +1 -0
  216. package/src/lib/data-transfer/review.d.ts +70 -0
  217. package/src/lib/data-transfer/review.js +233 -0
  218. package/src/lib/data-transfer/review.js.map +1 -0
  219. package/src/lib/data-transfer/similarity.d.ts +40 -0
  220. package/src/lib/data-transfer/similarity.js +106 -0
  221. package/src/lib/data-transfer/similarity.js.map +1 -0
  222. package/src/lib/data-transfer/site-package.d.ts +365 -0
  223. package/src/lib/data-transfer/site-package.js +1077 -0
  224. package/src/lib/data-transfer/site-package.js.map +1 -0
  225. package/src/lib/data-transfer/source.d.ts +74 -0
  226. package/src/lib/data-transfer/source.js +293 -0
  227. package/src/lib/data-transfer/source.js.map +1 -0
  228. package/src/lib/data-transfer/transfer-api.d.ts +898 -0
  229. package/src/lib/data-transfer/transfer-api.js +107 -0
  230. package/src/lib/data-transfer/transfer-api.js.map +1 -0
  231. package/src/lib/foundation/definitions/org-billing.types.d.ts +31 -0
  232. package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
  233. package/src/lib/foundation/definitions/organization.types.d.ts +42 -1
  234. package/src/lib/foundation/definitions/organization.types.js.map +1 -1
  235. package/src/lib/foundation/definitions/platform.types.d.ts +6 -4
  236. package/src/lib/foundation/definitions/platform.types.js.map +1 -1
  237. package/src/lib/foundation/index.d.ts +1 -1
  238. package/src/lib/foundation/index.js.map +1 -1
  239. package/src/lib/plugin-manager/feature-plugins.d.ts +91 -2
  240. package/src/lib/plugin-manager/feature-plugins.js +48 -3
  241. package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
  242. package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +56 -0
  243. package/src/lib/plugin-manager/first-party-plugins.generated.js +1132 -27
  244. package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
  245. package/src/lib/plugin-manager/index.d.ts +0 -1
  246. package/src/lib/plugin-manager/index.js +0 -1
  247. package/src/lib/plugin-manager/index.js.map +1 -1
  248. package/src/lib/plugin-manager/interaction-recipes.d.ts +142 -0
  249. package/src/lib/plugin-manager/interaction-recipes.js +104 -0
  250. package/src/lib/plugin-manager/interaction-recipes.js.map +1 -0
  251. package/src/lib/plugin-manager/interaction-step-checks.d.ts +66 -0
  252. package/src/lib/plugin-manager/interaction-step-checks.js +86 -0
  253. package/src/lib/plugin-manager/interaction-step-checks.js.map +1 -0
  254. package/src/lib/plugin-manager/plugin-artifact-types.d.ts +235 -0
  255. package/src/lib/plugin-manager/plugin-artifact-types.js +99 -0
  256. package/src/lib/plugin-manager/plugin-artifact-types.js.map +1 -0
  257. package/src/lib/plugin-manager/plugin-contact-capture.d.ts +8 -0
  258. package/src/lib/plugin-manager/plugin-contact-capture.js.map +1 -1
  259. package/src/lib/plugin-manager/plugin-conversion-credit.d.ts +216 -0
  260. package/src/lib/plugin-manager/plugin-conversion-credit.js +91 -0
  261. package/src/lib/plugin-manager/plugin-conversion-credit.js.map +1 -0
  262. package/src/lib/plugin-manager/plugin-entity-pickers.d.ts +83 -0
  263. package/src/lib/plugin-manager/plugin-entity-pickers.js +87 -0
  264. package/src/lib/plugin-manager/plugin-entity-pickers.js.map +1 -0
  265. package/src/lib/plugin-manager/plugin-host-resources.d.ts +6 -0
  266. package/src/lib/plugin-manager/plugin-host-resources.js +6 -1
  267. package/src/lib/plugin-manager/plugin-host-resources.js.map +1 -1
  268. package/src/lib/plugin-manager/plugin-intake-gates.d.ts +75 -0
  269. package/src/lib/plugin-manager/plugin-intake-gates.js +49 -0
  270. package/src/lib/plugin-manager/plugin-intake-gates.js.map +1 -0
  271. package/src/lib/plugin-manager/plugin-jobs.d.ts +5 -5
  272. package/src/lib/plugin-manager/plugin-jobs.js +7 -7
  273. package/src/lib/plugin-manager/plugin-jobs.js.map +1 -1
  274. package/src/lib/plugin-manager/plugin-live-paths.d.ts +70 -0
  275. package/src/lib/plugin-manager/plugin-live-paths.js +66 -0
  276. package/src/lib/plugin-manager/plugin-live-paths.js.map +1 -0
  277. package/src/lib/plugin-manager/plugin-org-erasure.d.ts +3 -2
  278. package/src/lib/plugin-manager/plugin-org-erasure.js +30 -5
  279. package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -1
  280. package/src/lib/plugin-manager/plugin-person-erasure.d.ts +68 -9
  281. package/src/lib/plugin-manager/plugin-person-erasure.js +196 -51
  282. package/src/lib/plugin-manager/plugin-person-erasure.js.map +1 -1
  283. package/src/lib/plugin-manager/plugin-person-records.d.ts +275 -0
  284. package/src/lib/plugin-manager/plugin-person-records.js +107 -0
  285. package/src/lib/plugin-manager/plugin-person-records.js.map +1 -0
  286. package/src/lib/plugin-manager/plugin-record-counts.d.ts +76 -0
  287. package/src/lib/plugin-manager/plugin-record-counts.js +49 -0
  288. package/src/lib/plugin-manager/plugin-record-counts.js.map +1 -0
  289. package/src/lib/plugin-manager/plugin-record-email-state.d.ts +26 -0
  290. package/src/lib/plugin-manager/plugin-record-email-state.js +16 -0
  291. package/src/lib/plugin-manager/plugin-record-email-state.js.map +1 -1
  292. package/src/lib/plugin-manager/plugin-record-index.d.ts +10 -0
  293. package/src/lib/plugin-manager/plugin-record-index.js.map +1 -1
  294. package/src/lib/plugin-manager/plugin-record-lists.d.ts +86 -6
  295. package/src/lib/plugin-manager/plugin-record-lists.js +42 -5
  296. package/src/lib/plugin-manager/plugin-record-lists.js.map +1 -1
  297. package/src/lib/plugin-manager/plugin-record-origin.d.ts +79 -0
  298. package/src/lib/plugin-manager/plugin-record-origin.js +46 -0
  299. package/src/lib/plugin-manager/plugin-record-origin.js.map +1 -0
  300. package/src/lib/plugin-manager/plugin-record-pages.d.ts +37 -0
  301. package/src/lib/plugin-manager/plugin-record-pages.js +52 -0
  302. package/src/lib/plugin-manager/plugin-record-pages.js.map +1 -0
  303. package/src/lib/plugin-manager/plugin-record-timeline.d.ts +60 -0
  304. package/src/lib/plugin-manager/plugin-record-timeline.js +16 -0
  305. package/src/lib/plugin-manager/plugin-record-timeline.js.map +1 -1
  306. package/src/lib/plugin-manager/plugin-resource-drafts.d.ts +5 -5
  307. package/src/lib/plugin-manager/plugin-resource-drafts.js.map +1 -1
  308. package/src/lib/plugin-manager/plugin-revocations.d.ts +64 -0
  309. package/src/lib/plugin-manager/plugin-revocations.js +47 -0
  310. package/src/lib/plugin-manager/plugin-revocations.js.map +1 -0
  311. package/src/lib/plugin-manager/plugin-send-tallies.d.ts +69 -0
  312. package/src/lib/plugin-manager/plugin-send-tallies.js +45 -0
  313. package/src/lib/plugin-manager/plugin-send-tallies.js.map +1 -0
  314. package/src/lib/plugin-manager/plugin-server-steps.d.ts +170 -0
  315. package/src/lib/plugin-manager/plugin-server-steps.js +116 -0
  316. package/src/lib/plugin-manager/plugin-server-steps.js.map +1 -0
  317. package/src/lib/plugin-manager/plugin-site-bundle.d.ts +40 -0
  318. package/src/lib/plugin-manager/plugin-site-bundle.js +4 -0
  319. package/src/lib/plugin-manager/plugin-site-bundle.js.map +1 -1
  320. package/src/lib/plugin-manager/plugin-site-export.d.ts +57 -1
  321. package/src/lib/plugin-manager/plugin-site-export.js +23 -10
  322. package/src/lib/plugin-manager/plugin-site-export.js.map +1 -1
  323. package/src/lib/plugin-manager/plugin-sitemap-readers.d.ts +146 -0
  324. package/src/lib/plugin-manager/plugin-sitemap-readers.js +110 -0
  325. package/src/lib/plugin-manager/plugin-sitemap-readers.js.map +1 -0
  326. package/src/lib/plugin-manager/plugin-transfer-resources.d.ts +714 -0
  327. package/src/lib/plugin-manager/plugin-transfer-resources.js +443 -0
  328. package/src/lib/plugin-manager/plugin-transfer-resources.js.map +1 -0
  329. package/src/lib/plugin-manager/plugin-usage-axes.d.ts +54 -5
  330. package/src/lib/plugin-manager/plugin-usage-axes.js +11 -3
  331. package/src/lib/plugin-manager/plugin-usage-axes.js.map +1 -1
  332. package/src/lib/plugin-manager/plugin-user-erasure.js +9 -1
  333. package/src/lib/plugin-manager/plugin-user-erasure.js.map +1 -1
  334. package/src/lib/plugin-manager/plugin-visitor-doors.d.ts +104 -0
  335. package/src/lib/plugin-manager/plugin-visitor-doors.js +108 -0
  336. package/src/lib/plugin-manager/plugin-visitor-doors.js.map +1 -0
  337. package/src/lib/plugin-manager/realm-host-aglyn.generated.js +2 -0
  338. package/src/lib/plugin-manager/realm-host-aglyn.generated.js.map +1 -1
  339. package/src/lib/plugin-manager/repeat-rows.d.ts +5 -6
  340. package/src/lib/plugin-manager/repeat-rows.js.map +1 -1
  341. package/src/lib/app-utils/actions.d.ts +0 -310
  342. package/src/lib/app-utils/actions.js +0 -506
  343. package/src/lib/app-utils/actions.js.map +0 -1
  344. package/src/lib/app-utils/automation-placeholders.d.ts +0 -72
  345. package/src/lib/app-utils/automation-placeholders.js +0 -207
  346. package/src/lib/app-utils/automation-placeholders.js.map +0 -1
  347. package/src/lib/app-utils/dataset-models.d.ts +0 -339
  348. package/src/lib/app-utils/dataset-models.js +0 -722
  349. package/src/lib/app-utils/dataset-models.js.map +0 -1
  350. package/src/lib/app-utils/datasets.d.ts +0 -171
  351. package/src/lib/app-utils/datasets.js +0 -227
  352. package/src/lib/app-utils/datasets.js.map +0 -1
  353. package/src/lib/app-utils/form-abuse-ceiling.d.ts +0 -146
  354. package/src/lib/app-utils/form-abuse-ceiling.js +0 -158
  355. package/src/lib/app-utils/form-abuse-ceiling.js.map +0 -1
  356. package/src/lib/plugin-manager/order-fulfilment.d.ts +0 -142
  357. package/src/lib/plugin-manager/order-fulfilment.js +0 -104
  358. package/src/lib/plugin-manager/order-fulfilment.js.map +0 -1
@@ -0,0 +1,475 @@
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
+ * A WORKSPACE PACKAGE'S PLAN (AGL-3535) — what importing one would do,
19
+ * decided before anything is written.
20
+ *
21
+ * A workspace package is an `aglyn-package` v2 file whose items belong to
22
+ * the workspace rather than a site: sequences, campaigns, automations,
23
+ * email templates. Each item's `kind` is the key of the transfer resource
24
+ * that owns it (`outreach.sequences`), so the job engine knows which
25
+ * plugin reads, writes and undoes it, and an item of a kind no enabled
26
+ * plugin owns is set aside rather than guessed at.
27
+ *
28
+ * ## Matching and deciding
29
+ *
30
+ * Every item is matched against what the workspace holds — by id, then
31
+ * slug, then name, within its kind (`matchPackageItems`) — and proposed a
32
+ * decision (`proposePackageDecision`): a new item is created, an identical
33
+ * one skipped, and one that differs waits for the person — replace, keep
34
+ * both, or skip. Replacing is never assumed.
35
+ *
36
+ * ## The ids every item ends up with
37
+ *
38
+ * Before anything is written, each item that will be written is given the
39
+ * id it will have: its own for a new item, the matched item's for a
40
+ * replace, a fresh one (and a `-copy` slug and a "(copy)" name) for keep
41
+ * both. A skipped item that matched points at the workspace's item. So
42
+ * every reference between items can be rewritten up front (`idMap`), in
43
+ * any order, and a pair of items that name each other is no harder than
44
+ * one that names the other.
45
+ *
46
+ * ## References the package cannot satisfy
47
+ *
48
+ * An item may name something the package does not carry and the
49
+ * workspace does not hold: a template from another workspace, a mailbox
50
+ * that was never connected here, a site. Each such reference is listed
51
+ * once, with what may be done about it — import the package's own copy
52
+ * (when the package holds it and it was skipped), map it to something the
53
+ * workspace has, drop the reference, or skip every item that needs it —
54
+ * and nothing is applied until each has an answer.
55
+ *
56
+ * Pure: the engine reads the workspace, the plugins say what each item
57
+ * names, and this decides.
58
+ *=========================================*/ import { keepBothSlug, matchPackageItems, packageDecisionsFor, packageDependencyOrder, packageItemKey, proposePackageDecision, contentHash } from "./package.js";
59
+ /** The kind a reference to one of the workspace's sites carries. Answered by the engine, not a plugin. */ export const TRANSFER_SITE_KIND = 'site';
60
+ /** The resource a workspace package's job is filed under: one package import runs at a time. */ export const TRANSFER_PACKAGE_RESOURCE = 'package';
61
+ /** The most items one workspace package may carry. */ export const TRANSFER_PACKAGE_MAX_ITEMS = 1000;
62
+ /** The most bytes one workspace package file may carry. */ export const TRANSFER_PACKAGE_MAX_BYTES = 3000000;
63
+ export const TRANSFER_PACKAGE_VERDICTS = [
64
+ 'create',
65
+ 'replace',
66
+ 'keepBoth',
67
+ 'skip',
68
+ 'fail'
69
+ ];
70
+ export const TRANSFER_PACKAGE_WARNING_CLASSES = [
71
+ 'replace',
72
+ 'dropReference',
73
+ 'failed'
74
+ ];
75
+ function caseless(value) {
76
+ return String(value != null ? value : '').trim().toLowerCase();
77
+ }
78
+ /**
79
+ * The name a kept-both copy takes: `<name> (copy)`, then `(copy 2)`,
80
+ * `(copy 3)`… until none of `taken` (compared caselessly).
81
+ */ export function keepBothName(name, taken) {
82
+ const used = new Set([
83
+ ...taken
84
+ ].map(caseless));
85
+ const base = `${name.replace(/\s*\(copy(?: \d+)?\)$/, '').trim()} (copy)`;
86
+ if (!used.has(caseless(base))) return base;
87
+ for(let n = 2;; n += 1){
88
+ const candidate = base.replace(/\(copy\)$/, `(copy ${n})`);
89
+ if (!used.has(caseless(candidate))) return candidate;
90
+ }
91
+ }
92
+ /**
93
+ * What a resource holds now, as matching reads it: each item's content
94
+ * hashed with `contentHash`. A resource's `items` hook answers with this
95
+ * over the same content `readItems` exports, so an item exported and
96
+ * imported unchanged compares `identical`.
97
+ */ export async function existingPackageItemsOf(kind, contents) {
98
+ const items = [];
99
+ for (const entry of contents){
100
+ items.push(_extends({
101
+ kind,
102
+ id: entry.id
103
+ }, entry.name ? {
104
+ name: entry.name
105
+ } : {}, entry.slug ? {
106
+ slug: entry.slug
107
+ } : {}, {
108
+ contentHash: await contentHash(entry.content)
109
+ }));
110
+ }
111
+ return items;
112
+ }
113
+ function emptySummary() {
114
+ return {
115
+ create: 0,
116
+ replace: 0,
117
+ keepBoth: 0,
118
+ skip: 0,
119
+ fail: 0,
120
+ total: 0
121
+ };
122
+ }
123
+ const WRITES = new Set([
124
+ 'create',
125
+ 'replace',
126
+ 'keepBoth',
127
+ 'merge'
128
+ ]);
129
+ function choicesFor(inPackage) {
130
+ return inPackage ? [
131
+ 'import',
132
+ 'mapTo',
133
+ 'dropReference',
134
+ 'skipItem'
135
+ ] : [
136
+ 'mapTo',
137
+ 'dropReference',
138
+ 'skipItem'
139
+ ];
140
+ }
141
+ /**
142
+ * The plan (see the block header). Deterministic for the same input,
143
+ * `newId` aside: decisions the person did not make are proposed, a
144
+ * decision an item may not take falls back to the proposal, and a
145
+ * reference choice that names nothing the workspace holds is no choice.
146
+ */ export function planTransferPackage(input) {
147
+ var _existingByKind_get, _input_references, _input_dependencyChoices;
148
+ const manifestItems = input.manifest.items;
149
+ const byKey = new Map(manifestItems.map((item)=>[
150
+ packageItemKey(item),
151
+ item
152
+ ]));
153
+ const known = manifestItems.filter((item)=>input.ownedKinds.has(item.kind));
154
+ const unknownKinds = [
155
+ ...new Set(manifestItems.filter((item)=>!input.ownedKinds.has(item.kind)).map((item)=>item.kind))
156
+ ];
157
+ const matches = new Map(matchPackageItems({
158
+ items: known
159
+ }, input.existing).map((match)=>[
160
+ packageItemKey(match.item),
161
+ match
162
+ ]));
163
+ const existingByKind = new Map();
164
+ for (const entry of input.existing)existingByKind.set(entry.kind, [
165
+ ...(_existingByKind_get = existingByKind.get(entry.kind)) != null ? _existingByKind_get : [],
166
+ entry
167
+ ]);
168
+ const referenceKinds = new Map(((_input_references = input.references) != null ? _input_references : []).map((kind)=>[
169
+ kind.kind,
170
+ kind
171
+ ]));
172
+ const labelOf = (kind)=>{
173
+ var _ref, _ref1;
174
+ var _referenceKinds_get, _input_kindLabels;
175
+ return (_ref = (_ref1 = (_referenceKinds_get = referenceKinds.get(kind)) == null ? void 0 : _referenceKinds_get.label) != null ? _ref1 : (_input_kindLabels = input.kindLabels) == null ? void 0 : _input_kindLabels[kind]) != null ? _ref : kind;
176
+ };
177
+ // The decision each item starts from: the person's, when it is one the item may take.
178
+ const decided = new Map();
179
+ const forcedImport = new Set();
180
+ for (const item of known){
181
+ var _input_decisions;
182
+ const key = packageItemKey(item);
183
+ const match = matches.get(key);
184
+ if (!match) continue;
185
+ const allowed = packageDecisionsFor(match);
186
+ const chosen = (_input_decisions = input.decisions) == null ? void 0 : _input_decisions[key];
187
+ decided.set(key, chosen && allowed.includes(chosen) ? chosen : proposePackageDecision(match).decision);
188
+ }
189
+ for (const [depKey, choice] of Object.entries((_input_dependencyChoices = input.dependencyChoices) != null ? _input_dependencyChoices : {})){
190
+ if ((choice == null ? void 0 : choice.action) !== 'import') continue;
191
+ const match = matches.get(depKey);
192
+ if ((match == null ? void 0 : match.comparison) === 'new' && decided.get(depKey) === 'skip') {
193
+ decided.set(depKey, 'create');
194
+ forcedImport.add(depKey);
195
+ }
196
+ }
197
+ // Skipped for want of a reference the person chose to skip them over; grows until it settles.
198
+ const skippedForDependency = new Set();
199
+ let references = [];
200
+ let idMap = {};
201
+ for(let pass = 0; pass <= known.length + 1; pass += 1){
202
+ const writes = (key)=>{
203
+ var _decided_get;
204
+ return WRITES.has((_decided_get = decided.get(key)) != null ? _decided_get : 'skip') && !skippedForDependency.has(key);
205
+ };
206
+ // Ids first: every reference below is resolved against them.
207
+ idMap = {};
208
+ for (const item of known){
209
+ const key = packageItemKey(item);
210
+ const match = matches.get(key);
211
+ const decision = decided.get(key);
212
+ if (!match) continue;
213
+ if (writes(key)) {
214
+ var _ref;
215
+ var _match_existing;
216
+ if (decision === 'replace' || decision === 'merge') idMap[key] = (_ref = (_match_existing = match.existing) == null ? void 0 : _match_existing.id) != null ? _ref : item.$id;
217
+ else if (decision === 'create') idMap[key] = item.$id;
218
+ } else if (match.existing) {
219
+ idMap[key] = match.existing.id;
220
+ }
221
+ }
222
+ // Kept-both ids are placeholders here; the real ones are minted once, below.
223
+ for (const item of known){
224
+ const key = packageItemKey(item);
225
+ if (writes(key) && decided.get(key) === 'keepBoth') idMap[key] = `\u0000${key}`;
226
+ }
227
+ const open = new Map();
228
+ for (const item of known){
229
+ const key = packageItemKey(item);
230
+ if (!writes(key)) continue;
231
+ for (const dep of item.deps){
232
+ var _existingByKind_get1, _ref1, _open_get, _existingByKind_get2, _ref2;
233
+ var _referenceKinds_get, _byKey_get, _byKey_get1, _referenceKinds_get1;
234
+ const depKey = packageItemKey(dep);
235
+ if (depKey in idMap) continue;
236
+ const held = input.ownedKinds.has(dep.kind) ? ((_existingByKind_get1 = existingByKind.get(dep.kind)) != null ? _existingByKind_get1 : []).some((entry)=>entry.id === dep.id) : ((_ref1 = (_referenceKinds_get = referenceKinds.get(dep.kind)) == null ? void 0 : _referenceKinds_get.targets) != null ? _ref1 : []).some((target)=>target.id === dep.id);
237
+ if (held) continue;
238
+ const inPackage = byKey.has(depKey) && input.ownedKinds.has(dep.kind);
239
+ const reference = (_open_get = open.get(depKey)) != null ? _open_get : _extends({
240
+ key: depKey,
241
+ kind: dep.kind,
242
+ id: dep.id,
243
+ label: labelOf(dep.kind)
244
+ }, ((_byKey_get = byKey.get(depKey)) == null ? void 0 : _byKey_get.name) ? {
245
+ name: (_byKey_get1 = byKey.get(depKey)) == null ? void 0 : _byKey_get1.name
246
+ } : {}, {
247
+ neededBy: [],
248
+ inPackage,
249
+ choice: null,
250
+ choices: choicesFor(inPackage),
251
+ targets: input.ownedKinds.has(dep.kind) ? ((_existingByKind_get2 = existingByKind.get(dep.kind)) != null ? _existingByKind_get2 : []).map((entry)=>_extends({
252
+ id: entry.id
253
+ }, entry.name ? {
254
+ name: entry.name
255
+ } : {})) : [
256
+ ...(_ref2 = (_referenceKinds_get1 = referenceKinds.get(dep.kind)) == null ? void 0 : _referenceKinds_get1.targets) != null ? _ref2 : []
257
+ ]
258
+ });
259
+ if (!reference.neededBy.includes(key)) reference.neededBy.push(key);
260
+ open.set(depKey, reference);
261
+ }
262
+ }
263
+ // A reference the person forced the import of resolves once its item writes; it is listed so the choice shows.
264
+ for (const depKey of forcedImport){
265
+ var _existingByKind_get3;
266
+ const item = byKey.get(depKey);
267
+ if (!item || open.has(depKey)) continue;
268
+ const neededBy = known.filter((other)=>writes(packageItemKey(other)) && other.deps.some((dep)=>packageItemKey(dep) === depKey)).map(packageItemKey);
269
+ open.set(depKey, _extends({
270
+ key: depKey,
271
+ kind: item.kind,
272
+ id: item.$id,
273
+ label: labelOf(item.kind)
274
+ }, item.name ? {
275
+ name: item.name
276
+ } : {}, {
277
+ neededBy,
278
+ inPackage: true,
279
+ choice: {
280
+ action: 'import'
281
+ },
282
+ choices: choicesFor(true),
283
+ targets: ((_existingByKind_get3 = existingByKind.get(item.kind)) != null ? _existingByKind_get3 : []).map((entry)=>_extends({
284
+ id: entry.id
285
+ }, entry.name ? {
286
+ name: entry.name
287
+ } : {}))
288
+ }));
289
+ }
290
+ let grew = false;
291
+ for (const reference of open.values()){
292
+ var _input_dependencyChoices1;
293
+ if (reference.choice) continue;
294
+ const choice = (_input_dependencyChoices1 = input.dependencyChoices) == null ? void 0 : _input_dependencyChoices1[reference.key];
295
+ if (!choice || !reference.choices.includes(choice.action)) continue;
296
+ if (choice.action === 'mapTo') {
297
+ if (!reference.targets.some((target)=>target.id === choice.id)) continue;
298
+ reference.choice = choice;
299
+ idMap[reference.key] = choice.id;
300
+ } else if (choice.action === 'dropReference') {
301
+ reference.choice = choice;
302
+ idMap[reference.key] = '';
303
+ } else if (choice.action === 'skipItem') {
304
+ reference.choice = choice;
305
+ for (const key of reference.neededBy){
306
+ if (!skippedForDependency.has(key)) {
307
+ skippedForDependency.add(key);
308
+ grew = true;
309
+ }
310
+ }
311
+ }
312
+ }
313
+ references = [
314
+ ...open.values()
315
+ ];
316
+ if (!grew) break;
317
+ }
318
+ // Kept-both copies: a fresh id, a free slug and a free name, in manifest order.
319
+ const renames = new Map();
320
+ const takenSlugs = new Map();
321
+ const takenNames = new Map();
322
+ for (const [kind, entries] of existingByKind){
323
+ takenSlugs.set(kind, entries.flatMap((entry)=>entry.slug ? [
324
+ entry.slug
325
+ ] : []));
326
+ takenNames.set(kind, entries.flatMap((entry)=>entry.name ? [
327
+ entry.name
328
+ ] : []));
329
+ }
330
+ for (const item of known){
331
+ const key = packageItemKey(item);
332
+ if (idMap[key] !== `\u0000${key}`) continue;
333
+ idMap[key] = input.newId();
334
+ const rename = {};
335
+ if (item.slug) {
336
+ var _takenSlugs_get, _takenSlugs_get1;
337
+ rename.slug = keepBothSlug(item.slug, (_takenSlugs_get = takenSlugs.get(item.kind)) != null ? _takenSlugs_get : []);
338
+ takenSlugs.set(item.kind, [
339
+ ...(_takenSlugs_get1 = takenSlugs.get(item.kind)) != null ? _takenSlugs_get1 : [],
340
+ rename.slug
341
+ ]);
342
+ }
343
+ if (item.name) {
344
+ var _takenNames_get, _takenNames_get1;
345
+ rename.name = keepBothName(item.name, (_takenNames_get = takenNames.get(item.kind)) != null ? _takenNames_get : []);
346
+ takenNames.set(item.kind, [
347
+ ...(_takenNames_get1 = takenNames.get(item.kind)) != null ? _takenNames_get1 : [],
348
+ rename.name
349
+ ]);
350
+ }
351
+ renames.set(key, rename);
352
+ }
353
+ const items = manifestItems.map((item, row)=>{
354
+ var _decided_get, _ref;
355
+ var _input_decisions, _input_problems;
356
+ const key = packageItemKey(item);
357
+ const base = _extends({
358
+ row,
359
+ key,
360
+ kind: item.kind,
361
+ id: item.$id
362
+ }, item.name ? {
363
+ name: item.name
364
+ } : {}, item.slug ? {
365
+ slug: item.slug
366
+ } : {});
367
+ const match = matches.get(key);
368
+ if (!match) {
369
+ return _extends({}, base, {
370
+ status: 'new',
371
+ comparison: 'new',
372
+ decision: 'skip',
373
+ decisions: [
374
+ 'skip'
375
+ ],
376
+ needsChoice: false,
377
+ verdict: 'skip',
378
+ reason: 'unknownKind',
379
+ problems: []
380
+ });
381
+ }
382
+ const decision = (_decided_get = decided.get(key)) != null ? _decided_get : 'skip';
383
+ const chosen = ((_input_decisions = input.decisions) == null ? void 0 : _input_decisions[key]) !== undefined || forcedImport.has(key);
384
+ const problems = [
385
+ ...(_ref = (_input_problems = input.problems) == null ? void 0 : _input_problems[key]) != null ? _ref : []
386
+ ];
387
+ const writing = WRITES.has(decision) && !skippedForDependency.has(key);
388
+ const verdict = !writing ? 'skip' : problems.length ? 'fail' : decision === 'merge' ? 'replace' : decision;
389
+ const reason = skippedForDependency.has(key) ? 'missingDependency' : verdict === 'fail' ? 'problems' : verdict === 'skip' ? match.comparison === 'identical' && !chosen ? 'identical' : 'chosen' : undefined;
390
+ return _extends({}, base, {
391
+ status: match.status,
392
+ comparison: match.comparison
393
+ }, match.matchedBy ? {
394
+ matchedBy: match.matchedBy
395
+ } : {}, match.existing ? {
396
+ existing: _extends({
397
+ id: match.existing.id
398
+ }, match.existing.name ? {
399
+ name: match.existing.name
400
+ } : {}, match.existing.slug ? {
401
+ slug: match.existing.slug
402
+ } : {})
403
+ } : {}, {
404
+ decision,
405
+ decisions: packageDecisionsFor(match),
406
+ needsChoice: match.comparison === 'differs' && !chosen,
407
+ verdict
408
+ }, writing ? {
409
+ targetId: idMap[key]
410
+ } : {}, renames.has(key) && writing ? {
411
+ rename: renames.get(key)
412
+ } : {}, reason ? {
413
+ reason
414
+ } : {}, {
415
+ problems
416
+ });
417
+ });
418
+ const summary = emptySummary();
419
+ for (const item of items){
420
+ summary[item.verdict] += 1;
421
+ summary.total += 1;
422
+ }
423
+ const blocking = [];
424
+ for (const item of items){
425
+ var _item_name;
426
+ if (item.needsChoice) blocking.push(`Choose what happens to ${(_item_name = item.name) != null ? _item_name : item.key}: it differs from the one you have.`);
427
+ }
428
+ for (const reference of references){
429
+ if (!reference.choice) {
430
+ var _reference_name;
431
+ blocking.push(`Choose what happens to the ${reference.label.toLowerCase()} ${(_reference_name = reference.name) != null ? _reference_name : reference.id}: ${reference.neededBy.length === 1 ? 'an item needs' : `${reference.neededBy.length} items need`} it, and this workspace has none by that id.`);
432
+ }
433
+ }
434
+ const writing = items.filter((item)=>item.verdict !== 'skip' && item.verdict !== 'fail');
435
+ const order = packageDependencyOrder(writing.map((item)=>byKey.get(item.key))).order.map(packageItemKey);
436
+ const acknowledgementsRequired = [];
437
+ if (summary.replace) acknowledgementsRequired.push('replace');
438
+ if (references.some((reference)=>{
439
+ var _reference_choice;
440
+ return ((_reference_choice = reference.choice) == null ? void 0 : _reference_choice.action) === 'dropReference';
441
+ })) acknowledgementsRequired.push('dropReference');
442
+ if (summary.fail) acknowledgementsRequired.push('failed');
443
+ return {
444
+ items,
445
+ references,
446
+ unknownKinds,
447
+ order,
448
+ idMap,
449
+ summary,
450
+ blocking,
451
+ acknowledgementsRequired
452
+ };
453
+ }
454
+ /** The warning classes a plan still needs acknowledged. */ export function missingPackageAcknowledgements(plan, acknowledged) {
455
+ return plan.acknowledgementsRequired.filter((warning)=>!acknowledged.includes(warning));
456
+ }
457
+ /** Whether a plan may be applied: nothing blocks, every warning is acknowledged, and something writes. */ export function canApplyTransferPackage(plan, acknowledged) {
458
+ const writes = plan.summary.create + plan.summary.replace + plan.summary.keepBoth;
459
+ return !plan.blocking.length && writes > 0 && !missingPackageAcknowledgements(plan, acknowledged).length;
460
+ }
461
+ /** The id map as `remapIds` takes it. */ export function packageIdMap(idMap) {
462
+ return new Map(Object.entries(idMap));
463
+ }
464
+ /**
465
+ * A reference rewritten through an id map: the id it now has, `null` when
466
+ * the person dropped it, or itself when nothing maps it (a reference the
467
+ * workspace already satisfies). The helper every `remapIds` uses.
468
+ */ export function remapPackageReference(idMap, kind, id) {
469
+ if (!id) return id != null ? id : null;
470
+ const mapped = idMap.get(`${kind}/${id}`);
471
+ if (mapped === undefined) return id;
472
+ return mapped === '' ? null : mapped;
473
+ }
474
+
475
+ //# sourceMappingURL=package-plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/data-transfer/package-plan.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 * A WORKSPACE PACKAGE'S PLAN (AGL-3535) — what importing one would do,\n * decided before anything is written.\n *\n * A workspace package is an `aglyn-package` v2 file whose items belong to\n * the workspace rather than a site: sequences, campaigns, automations,\n * email templates. Each item's `kind` is the key of the transfer resource\n * that owns it (`outreach.sequences`), so the job engine knows which\n * plugin reads, writes and undoes it, and an item of a kind no enabled\n * plugin owns is set aside rather than guessed at.\n *\n * ## Matching and deciding\n *\n * Every item is matched against what the workspace holds — by id, then\n * slug, then name, within its kind (`matchPackageItems`) — and proposed a\n * decision (`proposePackageDecision`): a new item is created, an identical\n * one skipped, and one that differs waits for the person — replace, keep\n * both, or skip. Replacing is never assumed.\n *\n * ## The ids every item ends up with\n *\n * Before anything is written, each item that will be written is given the\n * id it will have: its own for a new item, the matched item's for a\n * replace, a fresh one (and a `-copy` slug and a \"(copy)\" name) for keep\n * both. A skipped item that matched points at the workspace's item. So\n * every reference between items can be rewritten up front (`idMap`), in\n * any order, and a pair of items that name each other is no harder than\n * one that names the other.\n *\n * ## References the package cannot satisfy\n *\n * An item may name something the package does not carry and the\n * workspace does not hold: a template from another workspace, a mailbox\n * that was never connected here, a site. Each such reference is listed\n * once, with what may be done about it — import the package's own copy\n * (when the package holds it and it was skipped), map it to something the\n * workspace has, drop the reference, or skip every item that needs it —\n * and nothing is applied until each has an answer.\n *\n * Pure: the engine reads the workspace, the plugins say what each item\n * names, and this decides.\n *=========================================*/\n\nimport {\n keepBothSlug,\n matchPackageItems,\n packageDecisionsFor,\n packageDependencyOrder,\n packageItemKey,\n proposePackageDecision,\n contentHash,\n type ExistingPackageItem,\n type PackageItemComparison,\n type PackageItemDecision,\n type PackageItemStatus,\n type PackageManifest,\n type PackageManifestItem,\n} from './package'\n\n/** The kind a reference to one of the workspace's sites carries. Answered by the engine, not a plugin. */\nexport const TRANSFER_SITE_KIND = 'site'\n\n/** The resource a workspace package's job is filed under: one package import runs at a time. */\nexport const TRANSFER_PACKAGE_RESOURCE = 'package'\n\n/** The most items one workspace package may carry. */\nexport const TRANSFER_PACKAGE_MAX_ITEMS = 1000\n\n/** The most bytes one workspace package file may carry. */\nexport const TRANSFER_PACKAGE_MAX_BYTES = 3_000_000\n\n/** What importing one item comes to. */\nexport type TransferPackageVerdict = 'create' | 'replace' | 'keepBoth' | 'skip' | 'fail'\n\nexport const TRANSFER_PACKAGE_VERDICTS: readonly TransferPackageVerdict[] = [\n 'create',\n 'replace',\n 'keepBoth',\n 'skip',\n 'fail',\n]\n\n/** What to do about a reference the package cannot satisfy. */\nexport type TransferPackageDependencyChoice =\n /** Import the package's own copy of an item the person had skipped. */\n | { action: 'import' }\n /** Point the reference at something the workspace already has. */\n | { action: 'mapTo'; id: string }\n /** Leave the reference out of every item that names it. */\n | { action: 'dropReference' }\n /** Skip every item that needs it. */\n | { action: 'skipItem' }\n\nexport type TransferPackageDependencyAction = TransferPackageDependencyChoice['action']\n\n/** One thing a reference may be mapped to. */\nexport interface TransferReferenceTarget {\n id: string\n name?: string\n}\n\n/** What the workspace holds of a kind no package resource owns (its sites, its mailboxes, its lists). */\nexport interface TransferReferenceKind {\n kind: string\n /** What one of them is called (\"Mailbox\"). */\n label: string\n targets: TransferReferenceTarget[]\n}\n\n/** The warnings an import must have acknowledged before it writes. */\nexport type TransferPackageWarningClass = 'replace' | 'dropReference' | 'failed'\n\nexport const TRANSFER_PACKAGE_WARNING_CLASSES: readonly TransferPackageWarningClass[] = [\n 'replace',\n 'dropReference',\n 'failed',\n]\n\n/** Why an item is skipped or fails. */\nexport type TransferPackageItemReason =\n /** No enabled plugin owns its kind. */\n | 'unknownKind'\n /** The person chose to skip it. */\n | 'chosen'\n /** It is identical to the workspace's item. */\n | 'identical'\n /** A reference it needs was answered with \"skip every item that needs it\". */\n | 'missingDependency'\n /** The owning plugin's own checks refuse it (`problems`). */\n | 'problems'\n\n/** One item's line in the plan. */\nexport interface TransferPackagePlanItem {\n /** Its index in the manifest — the row the ledger and the results name. */\n row: number\n /** `<kind>/<id>`, as the file names it. */\n key: string\n kind: string\n id: string\n name?: string\n slug?: string\n status: PackageItemStatus\n comparison: PackageItemComparison\n matchedBy?: 'id' | 'slug' | 'name'\n existing?: { id: string; name?: string; slug?: string }\n /** What will be done with it. */\n decision: PackageItemDecision\n /** The decisions it may take. */\n decisions: PackageItemDecision[]\n /** It differs from the workspace's item and the person has not chosen yet. */\n needsChoice: boolean\n verdict: TransferPackageVerdict\n /** The id it is written under, for a write. */\n targetId?: string\n /** A kept-both copy's new name and slug. */\n rename?: { name?: string; slug?: string }\n reason?: TransferPackageItemReason\n /** The owning plugin's objections, each a sentence; any one fails the item. */\n problems: string[]\n}\n\n/** A reference no item in the package or the workspace satisfies, and what the person chose for it. */\nexport interface TransferPackageReference {\n /** `<kind>/<id>`. */\n key: string\n kind: string\n id: string\n /** What one of the kind is called. */\n label: string\n /** A name for it, when the package carries it. */\n name?: string\n /** The items that name it, by key. */\n neededBy: string[]\n /** The package carries it, and the person chose not to import it. */\n inPackage: boolean\n choice: TransferPackageDependencyChoice | null\n /** What may be chosen for it. */\n choices: TransferPackageDependencyAction[]\n /** What it may be mapped to. */\n targets: TransferReferenceTarget[]\n}\n\nexport type TransferPackageSummary = Record<TransferPackageVerdict, number> & { total: number }\n\n/** What importing a package would do. */\nexport interface TransferPackagePlan {\n items: TransferPackagePlanItem[]\n /** References needing (or holding) a choice. */\n references: TransferPackageReference[]\n /** Kinds in the file no enabled plugin owns; their items are skipped. */\n unknownKinds: string[]\n /** The keys of the items that write, dependencies first. */\n order: string[]\n /** Item key → the id it has after the import; `''` for a dropped reference. */\n idMap: Record<string, string>\n summary: TransferPackageSummary\n /** What still blocks Apply, each a sentence. */\n blocking: string[]\n acknowledgementsRequired: TransferPackageWarningClass[]\n}\n\nexport interface PlanTransferPackageInput {\n manifest: Pick<PackageManifest, 'items'>\n /** The kinds a package resource owns here — every other kind is unknown. */\n ownedKinds: ReadonlySet<string>\n /** What the workspace holds of every owned kind the package carries or names. */\n existing: readonly ExistingPackageItem[]\n /** What the workspace holds of the other kinds the items name. */\n references?: readonly TransferReferenceKind[]\n /** What a package kind is called, for a reference to one. */\n kindLabels?: Readonly<Record<string, string>>\n /** The person's decision per item key. */\n decisions?: Readonly<Record<string, PackageItemDecision>>\n /** The person's choice per reference key. */\n dependencyChoices?: Readonly<Record<string, TransferPackageDependencyChoice>>\n /** The objections each item's plugin raised, by item key. */\n problems?: Readonly<Record<string, readonly string[]>>\n /** A fresh id for a kept-both copy. Called once per such item, in manifest order. */\n newId: () => string\n}\n\nfunction caseless(value: string | undefined): string {\n return String(value ?? '').trim().toLowerCase()\n}\n\n/**\n * The name a kept-both copy takes: `<name> (copy)`, then `(copy 2)`,\n * `(copy 3)`… until none of `taken` (compared caselessly).\n */\nexport function keepBothName(name: string, taken: Iterable<string>): string {\n const used = new Set([...taken].map(caseless))\n const base = `${name.replace(/\\s*\\(copy(?: \\d+)?\\)$/, '').trim()} (copy)`\n if (!used.has(caseless(base))) return base\n for (let n = 2; ; n += 1) {\n const candidate = base.replace(/\\(copy\\)$/, `(copy ${n})`)\n if (!used.has(caseless(candidate))) return candidate\n }\n}\n\n/**\n * What a resource holds now, as matching reads it: each item's content\n * hashed with `contentHash`. A resource's `items` hook answers with this\n * over the same content `readItems` exports, so an item exported and\n * imported unchanged compares `identical`.\n */\nexport async function existingPackageItemsOf<T>(\n kind: string,\n contents: ReadonlyArray<{ id: string; name?: string; slug?: string; content: T }>,\n): Promise<ExistingPackageItem[]> {\n const items: ExistingPackageItem[] = []\n for (const entry of contents) {\n items.push({\n kind,\n id: entry.id,\n ...(entry.name ? { name: entry.name } : {}),\n ...(entry.slug ? { slug: entry.slug } : {}),\n contentHash: await contentHash(entry.content),\n })\n }\n return items\n}\n\nfunction emptySummary(): TransferPackageSummary {\n return { create: 0, replace: 0, keepBoth: 0, skip: 0, fail: 0, total: 0 }\n}\n\nconst WRITES: ReadonlySet<PackageItemDecision> = new Set(['create', 'replace', 'keepBoth', 'merge'])\n\nfunction choicesFor(inPackage: boolean): TransferPackageDependencyAction[] {\n return inPackage ? ['import', 'mapTo', 'dropReference', 'skipItem'] : ['mapTo', 'dropReference', 'skipItem']\n}\n\n/**\n * The plan (see the block header). Deterministic for the same input,\n * `newId` aside: decisions the person did not make are proposed, a\n * decision an item may not take falls back to the proposal, and a\n * reference choice that names nothing the workspace holds is no choice.\n */\nexport function planTransferPackage(input: PlanTransferPackageInput): TransferPackagePlan {\n const manifestItems = input.manifest.items\n const byKey = new Map(manifestItems.map((item) => [packageItemKey(item), item]))\n const known = manifestItems.filter((item) => input.ownedKinds.has(item.kind))\n const unknownKinds = [...new Set(manifestItems.filter((item) => !input.ownedKinds.has(item.kind)).map((item) => item.kind))]\n const matches = new Map(matchPackageItems({ items: known }, input.existing).map((match) => [packageItemKey(match.item), match]))\n const existingByKind = new Map<string, ExistingPackageItem[]>()\n for (const entry of input.existing) existingByKind.set(entry.kind, [...(existingByKind.get(entry.kind) ?? []), entry])\n const referenceKinds = new Map((input.references ?? []).map((kind) => [kind.kind, kind]))\n const labelOf = (kind: string) => referenceKinds.get(kind)?.label ?? input.kindLabels?.[kind] ?? kind\n\n // The decision each item starts from: the person's, when it is one the item may take.\n const decided = new Map<string, PackageItemDecision>()\n const forcedImport = new Set<string>()\n for (const item of known) {\n const key = packageItemKey(item)\n const match = matches.get(key)\n if (!match) continue\n const allowed = packageDecisionsFor(match)\n const chosen = input.decisions?.[key]\n decided.set(key, chosen && allowed.includes(chosen) ? chosen : proposePackageDecision(match).decision)\n }\n for (const [depKey, choice] of Object.entries(input.dependencyChoices ?? {})) {\n if (choice?.action !== 'import') continue\n const match = matches.get(depKey)\n if (match?.comparison === 'new' && decided.get(depKey) === 'skip') {\n decided.set(depKey, 'create')\n forcedImport.add(depKey)\n }\n }\n\n // Skipped for want of a reference the person chose to skip them over; grows until it settles.\n const skippedForDependency = new Set<string>()\n let references: TransferPackageReference[] = []\n let idMap: Record<string, string> = {}\n for (let pass = 0; pass <= known.length + 1; pass += 1) {\n const writes = (key: string) => WRITES.has(decided.get(key) ?? 'skip') && !skippedForDependency.has(key)\n // Ids first: every reference below is resolved against them.\n idMap = {}\n for (const item of known) {\n const key = packageItemKey(item)\n const match = matches.get(key)\n const decision = decided.get(key)\n if (!match) continue\n if (writes(key)) {\n if (decision === 'replace' || decision === 'merge') idMap[key] = match.existing?.id ?? item.$id\n else if (decision === 'create') idMap[key] = item.$id\n } else if (match.existing) {\n idMap[key] = match.existing.id\n }\n }\n // Kept-both ids are placeholders here; the real ones are minted once, below.\n for (const item of known) {\n const key = packageItemKey(item)\n if (writes(key) && decided.get(key) === 'keepBoth') idMap[key] = `\\u0000${key}`\n }\n\n const open = new Map<string, TransferPackageReference>()\n for (const item of known) {\n const key = packageItemKey(item)\n if (!writes(key)) continue\n for (const dep of item.deps) {\n const depKey = packageItemKey(dep)\n if (depKey in idMap) continue\n const held = input.ownedKinds.has(dep.kind)\n ? (existingByKind.get(dep.kind) ?? []).some((entry) => entry.id === dep.id)\n : (referenceKinds.get(dep.kind)?.targets ?? []).some((target) => target.id === dep.id)\n if (held) continue\n const inPackage = byKey.has(depKey) && input.ownedKinds.has(dep.kind)\n const reference = open.get(depKey) ?? {\n key: depKey,\n kind: dep.kind,\n id: dep.id,\n label: labelOf(dep.kind),\n ...(byKey.get(depKey)?.name ? { name: byKey.get(depKey)?.name } : {}),\n neededBy: [],\n inPackage,\n choice: null,\n choices: choicesFor(inPackage),\n targets: input.ownedKinds.has(dep.kind)\n ? (existingByKind.get(dep.kind) ?? []).map((entry) => ({ id: entry.id, ...(entry.name ? { name: entry.name } : {}) }))\n : [...(referenceKinds.get(dep.kind)?.targets ?? [])],\n }\n if (!reference.neededBy.includes(key)) reference.neededBy.push(key)\n open.set(depKey, reference)\n }\n }\n // A reference the person forced the import of resolves once its item writes; it is listed so the choice shows.\n for (const depKey of forcedImport) {\n const item = byKey.get(depKey)\n if (!item || open.has(depKey)) continue\n const neededBy = known\n .filter((other) => writes(packageItemKey(other)) && other.deps.some((dep) => packageItemKey(dep) === depKey))\n .map(packageItemKey)\n open.set(depKey, {\n key: depKey,\n kind: item.kind,\n id: item.$id,\n label: labelOf(item.kind),\n ...(item.name ? { name: item.name } : {}),\n neededBy,\n inPackage: true,\n choice: { action: 'import' },\n choices: choicesFor(true),\n targets: (existingByKind.get(item.kind) ?? []).map((entry) => ({ id: entry.id, ...(entry.name ? { name: entry.name } : {}) })),\n })\n }\n\n let grew = false\n for (const reference of open.values()) {\n if (reference.choice) continue\n const choice = input.dependencyChoices?.[reference.key]\n if (!choice || !reference.choices.includes(choice.action)) continue\n if (choice.action === 'mapTo') {\n if (!reference.targets.some((target) => target.id === choice.id)) continue\n reference.choice = choice\n idMap[reference.key] = choice.id\n } else if (choice.action === 'dropReference') {\n reference.choice = choice\n idMap[reference.key] = ''\n } else if (choice.action === 'skipItem') {\n reference.choice = choice\n for (const key of reference.neededBy) {\n if (!skippedForDependency.has(key)) {\n skippedForDependency.add(key)\n grew = true\n }\n }\n }\n }\n references = [...open.values()]\n if (!grew) break\n }\n\n // Kept-both copies: a fresh id, a free slug and a free name, in manifest order.\n const renames = new Map<string, { name?: string; slug?: string }>()\n const takenSlugs = new Map<string, string[]>()\n const takenNames = new Map<string, string[]>()\n for (const [kind, entries] of existingByKind) {\n takenSlugs.set(kind, entries.flatMap((entry) => (entry.slug ? [entry.slug] : [])))\n takenNames.set(kind, entries.flatMap((entry) => (entry.name ? [entry.name] : [])))\n }\n for (const item of known) {\n const key = packageItemKey(item)\n if (idMap[key] !== `\\u0000${key}`) continue\n idMap[key] = input.newId()\n const rename: { name?: string; slug?: string } = {}\n if (item.slug) {\n rename.slug = keepBothSlug(item.slug, takenSlugs.get(item.kind) ?? [])\n takenSlugs.set(item.kind, [...(takenSlugs.get(item.kind) ?? []), rename.slug])\n }\n if (item.name) {\n rename.name = keepBothName(item.name, takenNames.get(item.kind) ?? [])\n takenNames.set(item.kind, [...(takenNames.get(item.kind) ?? []), rename.name])\n }\n renames.set(key, rename)\n }\n\n const items: TransferPackagePlanItem[] = manifestItems.map((item, row) => {\n const key = packageItemKey(item)\n const base = {\n row,\n key,\n kind: item.kind,\n id: item.$id,\n ...(item.name ? { name: item.name } : {}),\n ...(item.slug ? { slug: item.slug } : {}),\n }\n const match = matches.get(key)\n if (!match) {\n return {\n ...base,\n status: 'new' as const,\n comparison: 'new' as const,\n decision: 'skip' as const,\n decisions: ['skip' as const],\n needsChoice: false,\n verdict: 'skip' as const,\n reason: 'unknownKind' as const,\n problems: [] as string[],\n }\n }\n const decision = decided.get(key) ?? 'skip'\n const chosen = input.decisions?.[key] !== undefined || forcedImport.has(key)\n const problems = [...(input.problems?.[key] ?? [])]\n const writing = WRITES.has(decision) && !skippedForDependency.has(key)\n const verdict: TransferPackageVerdict = !writing\n ? 'skip'\n : problems.length\n ? 'fail'\n : decision === 'merge'\n ? 'replace'\n : (decision as TransferPackageVerdict)\n const reason: TransferPackageItemReason | undefined = skippedForDependency.has(key)\n ? 'missingDependency'\n : verdict === 'fail'\n ? 'problems'\n : verdict === 'skip'\n ? match.comparison === 'identical' && !chosen\n ? 'identical'\n : 'chosen'\n : undefined\n return {\n ...base,\n status: match.status,\n comparison: match.comparison,\n ...(match.matchedBy ? { matchedBy: match.matchedBy } : {}),\n ...(match.existing\n ? {\n existing: {\n id: match.existing.id,\n ...(match.existing.name ? { name: match.existing.name } : {}),\n ...(match.existing.slug ? { slug: match.existing.slug } : {}),\n },\n }\n : {}),\n decision,\n decisions: packageDecisionsFor(match),\n needsChoice: match.comparison === 'differs' && !chosen,\n verdict,\n ...(writing ? { targetId: idMap[key] } : {}),\n ...(renames.has(key) && writing ? { rename: renames.get(key) } : {}),\n ...(reason ? { reason } : {}),\n problems,\n }\n })\n\n const summary = emptySummary()\n for (const item of items) {\n summary[item.verdict] += 1\n summary.total += 1\n }\n const blocking: string[] = []\n for (const item of items) {\n if (item.needsChoice) blocking.push(`Choose what happens to ${item.name ?? item.key}: it differs from the one you have.`)\n }\n for (const reference of references) {\n if (!reference.choice) {\n blocking.push(`Choose what happens to the ${reference.label.toLowerCase()} ${reference.name ?? reference.id}: ${reference.neededBy.length === 1 ? 'an item needs' : `${reference.neededBy.length} items need`} it, and this workspace has none by that id.`)\n }\n }\n const writing = items.filter((item) => item.verdict !== 'skip' && item.verdict !== 'fail')\n const order = packageDependencyOrder(\n writing.map((item) => byKey.get(item.key) as PackageManifestItem),\n ).order.map(packageItemKey)\n const acknowledgementsRequired: TransferPackageWarningClass[] = []\n if (summary.replace) acknowledgementsRequired.push('replace')\n if (references.some((reference) => reference.choice?.action === 'dropReference')) acknowledgementsRequired.push('dropReference')\n if (summary.fail) acknowledgementsRequired.push('failed')\n return { items, references, unknownKinds, order, idMap, summary, blocking, acknowledgementsRequired }\n}\n\n/** The warning classes a plan still needs acknowledged. */\nexport function missingPackageAcknowledgements(\n plan: Pick<TransferPackagePlan, 'acknowledgementsRequired'>,\n acknowledged: readonly string[],\n): TransferPackageWarningClass[] {\n return plan.acknowledgementsRequired.filter((warning) => !acknowledged.includes(warning))\n}\n\n/** Whether a plan may be applied: nothing blocks, every warning is acknowledged, and something writes. */\nexport function canApplyTransferPackage(\n plan: Pick<TransferPackagePlan, 'acknowledgementsRequired' | 'blocking' | 'summary'>,\n acknowledged: readonly string[],\n): boolean {\n const writes = plan.summary.create + plan.summary.replace + plan.summary.keepBoth\n return !plan.blocking.length && writes > 0 && !missingPackageAcknowledgements(plan, acknowledged).length\n}\n\n/** The id map as `remapIds` takes it. */\nexport function packageIdMap(idMap: Readonly<Record<string, string>>): ReadonlyMap<string, string> {\n return new Map(Object.entries(idMap))\n}\n\n/**\n * A reference rewritten through an id map: the id it now has, `null` when\n * the person dropped it, or itself when nothing maps it (a reference the\n * workspace already satisfies). The helper every `remapIds` uses.\n */\nexport function remapPackageReference(\n idMap: ReadonlyMap<string, string>,\n kind: string,\n id: string | null | undefined,\n): string | null {\n if (!id) return id ?? null\n const mapped = idMap.get(`${kind}/${id}`)\n if (mapped === undefined) return id\n return mapped === '' ? null : mapped\n}\n"],"names":["keepBothSlug","matchPackageItems","packageDecisionsFor","packageDependencyOrder","packageItemKey","proposePackageDecision","contentHash","TRANSFER_SITE_KIND","TRANSFER_PACKAGE_RESOURCE","TRANSFER_PACKAGE_MAX_ITEMS","TRANSFER_PACKAGE_MAX_BYTES","TRANSFER_PACKAGE_VERDICTS","TRANSFER_PACKAGE_WARNING_CLASSES","caseless","value","String","trim","toLowerCase","keepBothName","name","taken","used","Set","map","base","replace","has","n","candidate","existingPackageItemsOf","kind","contents","items","entry","push","id","slug","content","emptySummary","create","keepBoth","skip","fail","total","WRITES","choicesFor","inPackage","planTransferPackage","input","existingByKind","manifestItems","manifest","byKey","Map","item","known","filter","ownedKinds","unknownKinds","matches","existing","match","set","get","referenceKinds","references","labelOf","label","kindLabels","decided","forcedImport","key","allowed","chosen","decisions","includes","decision","depKey","choice","Object","entries","dependencyChoices","action","comparison","add","skippedForDependency","idMap","pass","length","writes","$id","open","dep","deps","held","some","targets","target","reference","neededBy","choices","other","grew","values","renames","takenSlugs","takenNames","flatMap","newId","rename","row","status","needsChoice","verdict","reason","problems","undefined","writing","matchedBy","targetId","summary","blocking","order","acknowledgementsRequired","missingPackageAcknowledgements","plan","acknowledged","warning","canApplyTransferPackage","packageIdMap","remapPackageReference","mapped"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAyC2C,GAE3C,SACEA,YAAY,EACZC,iBAAiB,EACjBC,mBAAmB,EACnBC,sBAAsB,EACtBC,cAAc,EACdC,sBAAsB,EACtBC,WAAW,QAON,eAAW;AAElB,wGAAwG,GACxG,OAAO,MAAMC,qBAAqB,OAAM;AAExC,8FAA8F,GAC9F,OAAO,MAAMC,4BAA4B,UAAS;AAElD,oDAAoD,GACpD,OAAO,MAAMC,6BAA6B,KAAI;AAE9C,yDAAyD,GACzD,OAAO,MAAMC,6BAA6B,QAAS;AAKnD,OAAO,MAAMC,4BAA+D;IAC1E;IACA;IACA;IACA;IACA;CACD,CAAA;AAgCD,OAAO,MAAMC,mCAA2E;IACtF;IACA;IACA;CACD,CAAA;AAyGD,SAASC,SAASC,KAAyB;IACzC,OAAOC,OAAOD,gBAAAA,QAAS,IAAIE,IAAI,GAAGC,WAAW;AAC/C;AAEA;;;CAGC,GACD,OAAO,SAASC,aAAaC,IAAY,EAAEC,KAAuB;IAChE,MAAMC,OAAO,IAAIC,IAAI;WAAIF;KAAM,CAACG,GAAG,CAACV;IACpC,MAAMW,OAAO,GAAGL,KAAKM,OAAO,CAAC,yBAAyB,IAAIT,IAAI,GAAG,OAAO,CAAC;IACzE,IAAI,CAACK,KAAKK,GAAG,CAACb,SAASW,QAAQ,OAAOA;IACtC,IAAK,IAAIG,IAAI,IAAKA,KAAK,EAAG;QACxB,MAAMC,YAAYJ,KAAKC,OAAO,CAAC,aAAa,CAAC,MAAM,EAAEE,EAAE,CAAC,CAAC;QACzD,IAAI,CAACN,KAAKK,GAAG,CAACb,SAASe,aAAa,OAAOA;I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