emdash 1.1.0 → 1.2.0

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 (1283) hide show
  1. package/dist/action-token-BdWad2YG.mjs +26 -0
  2. package/dist/action-token-BdWad2YG.mjs.map +1 -0
  3. package/dist/adapters-B4-nbElt.d.mts +173 -0
  4. package/dist/adapters-B4-nbElt.d.mts.map +1 -0
  5. package/dist/allowed-origins-CLpHGGlc.mjs +116 -0
  6. package/dist/allowed-origins-CLpHGGlc.mjs.map +1 -0
  7. package/dist/api/route-utils.d.mts +4 -4
  8. package/dist/api/route-utils.d.mts.map +1 -1
  9. package/dist/api/route-utils.mjs +39 -39
  10. package/dist/api/schemas/index.d.mts +2 -2
  11. package/dist/api/schemas/index.mjs +10 -10
  12. package/dist/api-DBw_IWoi.mjs +5024 -0
  13. package/dist/api-DBw_IWoi.mjs.map +1 -0
  14. package/dist/api-tokens-B0ZipcZ-.mjs +173 -0
  15. package/dist/api-tokens-B0ZipcZ-.mjs.map +1 -0
  16. package/dist/apply-Cx48saFC.mjs +1680 -0
  17. package/dist/apply-Cx48saFC.mjs.map +1 -0
  18. package/dist/approvals-BXgtXA2s.mjs +460 -0
  19. package/dist/approvals-BXgtXA2s.mjs.map +1 -0
  20. package/dist/artifact-fetch-DsRczRGG.mjs +659 -0
  21. package/dist/artifact-fetch-DsRczRGG.mjs.map +1 -0
  22. package/dist/artifacts-D-O-qj9C.mjs +307 -0
  23. package/dist/artifacts-D-O-qj9C.mjs.map +1 -0
  24. package/dist/astro/image-endpoint.d.mts.map +1 -1
  25. package/dist/astro/image-endpoint.mjs +26 -6
  26. package/dist/astro/image-endpoint.mjs.map +1 -1
  27. package/dist/astro/index.d.mts +14 -14
  28. package/dist/astro/index.d.mts.map +1 -1
  29. package/dist/astro/index.mjs +225 -15
  30. package/dist/astro/index.mjs.map +1 -1
  31. package/dist/astro/middleware/auth.d.mts +12 -12
  32. package/dist/astro/middleware/auth.d.mts.map +1 -1
  33. package/dist/astro/middleware/auth.mjs +15 -11
  34. package/dist/astro/middleware/auth.mjs.map +1 -1
  35. package/dist/astro/middleware/media-usage-write-fence.mjs +4 -4
  36. package/dist/astro/middleware/redirect.d.mts.map +1 -1
  37. package/dist/astro/middleware/redirect.mjs +30 -15
  38. package/dist/astro/middleware/redirect.mjs.map +1 -1
  39. package/dist/astro/middleware/request-context.d.mts.map +1 -1
  40. package/dist/astro/middleware/request-context.mjs +71 -44
  41. package/dist/astro/middleware/request-context.mjs.map +1 -1
  42. package/dist/astro/middleware/setup.mjs +1 -1
  43. package/dist/astro/middleware.d.mts +12 -12
  44. package/dist/astro/middleware.d.mts.map +1 -1
  45. package/dist/astro/middleware.mjs +129 -107
  46. package/dist/astro/middleware.mjs.map +1 -1
  47. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +13 -13
  48. package/dist/astro/routes/api/admin/allowed-domains/index.mjs +13 -13
  49. package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +6 -5
  50. package/dist/astro/routes/api/admin/api-tokens/_id_.mjs.map +1 -1
  51. package/dist/astro/routes/api/admin/api-tokens/index.mjs +7 -6
  52. package/dist/astro/routes/api/admin/api-tokens/index.mjs.map +1 -1
  53. package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +5 -5
  54. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +15 -15
  55. package/dist/astro/routes/api/admin/byline-fields/index.mjs +15 -15
  56. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +15 -15
  57. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +20 -20
  58. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +20 -20
  59. package/dist/astro/routes/api/admin/bylines/index.mjs +20 -20
  60. package/dist/astro/routes/api/admin/comments/_id_/status.mjs +17 -17
  61. package/dist/astro/routes/api/admin/comments/_id_.mjs +6 -6
  62. package/dist/astro/routes/api/admin/comments/bulk.mjs +16 -16
  63. package/dist/astro/routes/api/admin/comments/counts.mjs +6 -6
  64. package/dist/astro/routes/api/admin/comments/index.mjs +16 -16
  65. package/dist/astro/routes/api/admin/core-update.mjs +6 -6
  66. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +5 -5
  67. package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +4 -4
  68. package/dist/astro/routes/api/admin/media-usage/activation.mjs +17 -17
  69. package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +19 -19
  70. package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +19 -19
  71. package/dist/astro/routes/api/admin/media-usage/progress.mjs +16 -16
  72. package/dist/astro/routes/api/admin/media-usage/repair.mjs +22 -22
  73. package/dist/astro/routes/api/admin/media-usage/work/index.mjs +19 -19
  74. package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +19 -19
  75. package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +5 -5
  76. package/dist/astro/routes/api/admin/oauth-clients/index.mjs +5 -5
  77. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +7 -7
  78. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +7 -7
  79. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +63 -63
  80. package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +6 -6
  81. package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +62 -62
  82. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +63 -63
  83. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +72 -72
  84. package/dist/astro/routes/api/admin/plugins/index.mjs +63 -63
  85. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +6 -6
  86. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +62 -62
  87. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +71 -71
  88. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +62 -62
  89. package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +63 -63
  90. package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +73 -73
  91. package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +8 -8
  92. package/dist/astro/routes/api/admin/plugins/registry/install.mjs +65 -65
  93. package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs +6 -6
  94. package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +63 -63
  95. package/dist/astro/routes/api/admin/plugins/updates.mjs +62 -62
  96. package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs +4 -4
  97. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +62 -62
  98. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +6 -6
  99. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +62 -62
  100. package/dist/astro/routes/api/admin/transfer/_...path_.mjs +3 -3
  101. package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs +30 -30
  102. package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs +30 -30
  103. package/dist/astro/routes/api/admin/transfer/approvals/index.mjs +32 -32
  104. package/dist/astro/routes/api/admin/transfer/capabilities.mjs +32 -32
  105. package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs +32 -32
  106. package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs +33 -33
  107. package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs +33 -33
  108. package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs +32 -32
  109. package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs +33 -33
  110. package/dist/astro/routes/api/admin/transfer/exports/index.mjs +34 -34
  111. package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs +32 -32
  112. package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs +32 -32
  113. package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs +34 -34
  114. package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs +32 -32
  115. package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs +34 -34
  116. package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs +32 -32
  117. package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs +32 -32
  118. package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs +34 -34
  119. package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs +32 -32
  120. package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs +32 -32
  121. package/dist/astro/routes/api/admin/transfer/imports/index.mjs +34 -34
  122. package/dist/astro/routes/api/admin/users/_id_/disable.mjs +3 -3
  123. package/dist/astro/routes/api/admin/users/_id_/enable.mjs +3 -3
  124. package/dist/astro/routes/api/admin/users/_id_/index.mjs +13 -13
  125. package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +5 -5
  126. package/dist/astro/routes/api/admin/users/index.mjs +13 -13
  127. package/dist/astro/routes/api/auth/dev-bypass.mjs +5 -5
  128. package/dist/astro/routes/api/auth/handover.d.mts +8 -0
  129. package/dist/astro/routes/api/auth/handover.d.mts.map +1 -0
  130. package/dist/astro/routes/api/auth/handover.mjs +49 -0
  131. package/dist/astro/routes/api/auth/handover.mjs.map +1 -0
  132. package/dist/astro/routes/api/auth/invite/accept.mjs +3 -3
  133. package/dist/astro/routes/api/auth/invite/complete.mjs +18 -18
  134. package/dist/astro/routes/api/auth/invite/index.mjs +15 -15
  135. package/dist/astro/routes/api/auth/invite/register-options.mjs +16 -16
  136. package/dist/astro/routes/api/auth/logout.mjs +4 -4
  137. package/dist/astro/routes/api/auth/magic-link/send.mjs +18 -17
  138. package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -1
  139. package/dist/astro/routes/api/auth/magic-link/verify.d.mts.map +1 -1
  140. package/dist/astro/routes/api/auth/magic-link/verify.mjs +22 -16
  141. package/dist/astro/routes/api/auth/magic-link/verify.mjs.map +1 -1
  142. package/dist/astro/routes/api/auth/me.mjs +14 -14
  143. package/dist/astro/routes/api/auth/mode.mjs +4 -4
  144. package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +7 -7
  145. package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
  146. package/dist/astro/routes/api/auth/passkey/_id_.mjs +13 -13
  147. package/dist/astro/routes/api/auth/passkey/index.mjs +3 -3
  148. package/dist/astro/routes/api/auth/passkey/options.d.mts.map +1 -1
  149. package/dist/astro/routes/api/auth/passkey/options.mjs +26 -19
  150. package/dist/astro/routes/api/auth/passkey/options.mjs.map +1 -1
  151. package/dist/astro/routes/api/auth/passkey/register/options.mjs +16 -16
  152. package/dist/astro/routes/api/auth/passkey/register/verify.mjs +17 -17
  153. package/dist/astro/routes/api/auth/passkey/verify.mjs +18 -18
  154. package/dist/astro/routes/api/auth/signup/complete.mjs +18 -18
  155. package/dist/astro/routes/api/auth/signup/request.mjs +17 -16
  156. package/dist/astro/routes/api/auth/signup/request.mjs.map +1 -1
  157. package/dist/astro/routes/api/auth/signup/verify.mjs +3 -3
  158. package/dist/astro/routes/api/calendar.mjs +14 -14
  159. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +11 -11
  160. package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +17 -17
  161. package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +4 -4
  162. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +15 -15
  163. package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +4 -4
  164. package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +15 -15
  165. package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +4 -4
  166. package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs +8 -8
  167. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +23 -23
  168. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +15 -15
  169. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +27 -27
  170. package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +27 -27
  171. package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +4 -4
  172. package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +4 -4
  173. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +15 -15
  174. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +20 -20
  175. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +4 -4
  176. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +15 -15
  177. package/dist/astro/routes/api/content/_collection_/_id_.mjs +15 -15
  178. package/dist/astro/routes/api/content/_collection_/authors.mjs +4 -4
  179. package/dist/astro/routes/api/content/_collection_/index.mjs +14 -14
  180. package/dist/astro/routes/api/content/_collection_/trash.mjs +14 -14
  181. package/dist/astro/routes/api/dashboard.mjs +9 -9
  182. package/dist/astro/routes/api/dev/emails.mjs +4 -4
  183. package/dist/astro/routes/api/health.mjs +5 -5
  184. package/dist/astro/routes/api/import/probe.d.mts +3 -3
  185. package/dist/astro/routes/api/import/probe.mjs +22 -22
  186. package/dist/astro/routes/api/import/wordpress/analyze.mjs +4 -4
  187. package/dist/astro/routes/api/import/wordpress/execute.d.mts +13 -13
  188. package/dist/astro/routes/api/import/wordpress/execute.mjs +28 -21
  189. package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
  190. package/dist/astro/routes/api/import/wordpress/media.d.mts +12 -12
  191. package/dist/astro/routes/api/import/wordpress/media.mjs +16 -16
  192. package/dist/astro/routes/api/import/wordpress/prepare.mjs +16 -16
  193. package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts +8 -0
  194. package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts.map +1 -1
  195. package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.mjs +67 -31
  196. package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.mjs.map +1 -1
  197. package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +13 -13
  198. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +20 -20
  199. package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
  200. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +22 -22
  201. package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +13 -13
  202. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +35 -28
  203. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
  204. package/dist/astro/routes/api/manifest.mjs +8 -5
  205. package/dist/astro/routes/api/manifest.mjs.map +1 -1
  206. package/dist/astro/routes/api/mcp.mjs +81 -81
  207. package/dist/astro/routes/api/media/_id_/confirm.d.mts.map +1 -1
  208. package/dist/astro/routes/api/media/_id_/confirm.mjs +32 -16
  209. package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -1
  210. package/dist/astro/routes/api/media/_id_/replace.mjs +13 -13
  211. package/dist/astro/routes/api/media/_id_/upload.mjs +6 -6
  212. package/dist/astro/routes/api/media/_id_/usage.mjs +24 -24
  213. package/dist/astro/routes/api/media/_id_.mjs +22 -22
  214. package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +5 -5
  215. package/dist/astro/routes/api/media/file/_...key_.d.mts.map +1 -1
  216. package/dist/astro/routes/api/media/file/_...key_.mjs +44 -14
  217. package/dist/astro/routes/api/media/file/_...key_.mjs.map +1 -1
  218. package/dist/astro/routes/api/media/folders/_id_.mjs +15 -15
  219. package/dist/astro/routes/api/media/folders/index.mjs +15 -15
  220. package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +4 -4
  221. package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +4 -4
  222. package/dist/astro/routes/api/media/providers/index.mjs +4 -4
  223. package/dist/astro/routes/api/media/upload-url.mjs +39 -19
  224. package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
  225. package/dist/astro/routes/api/media.d.mts.map +1 -1
  226. package/dist/astro/routes/api/media.mjs +33 -23
  227. package/dist/astro/routes/api/media.mjs.map +1 -1
  228. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +15 -15
  229. package/dist/astro/routes/api/menus/_name_/items.mjs +15 -15
  230. package/dist/astro/routes/api/menus/_name_/reorder.mjs +15 -15
  231. package/dist/astro/routes/api/menus/_name_/translations.mjs +15 -15
  232. package/dist/astro/routes/api/menus/_name_.mjs +15 -15
  233. package/dist/astro/routes/api/menus/index.mjs +15 -15
  234. package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
  235. package/dist/astro/routes/api/oauth/device/authorize.mjs +7 -7
  236. package/dist/astro/routes/api/oauth/device/code.mjs +11 -10
  237. package/dist/astro/routes/api/oauth/device/code.mjs.map +1 -1
  238. package/dist/astro/routes/api/oauth/device/token.mjs +10 -9
  239. package/dist/astro/routes/api/oauth/device/token.mjs.map +1 -1
  240. package/dist/astro/routes/api/oauth/register.mjs +7 -6
  241. package/dist/astro/routes/api/oauth/register.mjs.map +1 -1
  242. package/dist/astro/routes/api/oauth/token/refresh.mjs +7 -7
  243. package/dist/astro/routes/api/oauth/token/revoke.mjs +7 -7
  244. package/dist/astro/routes/api/oauth/token.mjs +7 -7
  245. package/dist/astro/routes/api/openapi.json.mjs +21 -21
  246. package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
  247. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +8 -8
  248. package/dist/astro/routes/api/redirects/404s/index.mjs +18 -18
  249. package/dist/astro/routes/api/redirects/404s/summary.mjs +18 -18
  250. package/dist/astro/routes/api/redirects/_id_.mjs +18 -18
  251. package/dist/astro/routes/api/redirects/index.mjs +18 -18
  252. package/dist/astro/routes/api/relations/_id_/index.mjs +27 -27
  253. package/dist/astro/routes/api/relations/index.mjs +27 -27
  254. package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +4 -4
  255. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +15 -15
  256. package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs +62 -62
  257. package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs +62 -62
  258. package/dist/astro/routes/api/schema/block-types/index.mjs +62 -62
  259. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +62 -62
  260. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +62 -62
  261. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +62 -62
  262. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +62 -62
  263. package/dist/astro/routes/api/schema/collections/index.mjs +62 -62
  264. package/dist/astro/routes/api/schema/collections/reorder.mjs +62 -62
  265. package/dist/astro/routes/api/schema/index.mjs +10 -10
  266. package/dist/astro/routes/api/schema/index.mjs.map +1 -1
  267. package/dist/astro/routes/api/schema/orphans/_slug_.mjs +62 -62
  268. package/dist/astro/routes/api/schema/orphans/index.mjs +62 -62
  269. package/dist/astro/routes/api/search/enable.mjs +17 -17
  270. package/dist/astro/routes/api/search/index.mjs +16 -16
  271. package/dist/astro/routes/api/search/rebuild.mjs +17 -17
  272. package/dist/astro/routes/api/search/stats.mjs +7 -7
  273. package/dist/astro/routes/api/search/suggest.mjs +16 -16
  274. package/dist/astro/routes/api/sections/_slug_.mjs +16 -16
  275. package/dist/astro/routes/api/sections/index.mjs +16 -16
  276. package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +6 -6
  277. package/dist/astro/routes/api/settings/backups/archives/index.mjs +6 -6
  278. package/dist/astro/routes/api/settings/backups/export.mjs +6 -6
  279. package/dist/astro/routes/api/settings/backups/index.mjs +7 -7
  280. package/dist/astro/routes/api/settings/domain-notify.d.mts +8 -0
  281. package/dist/astro/routes/api/settings/domain-notify.d.mts.map +1 -0
  282. package/dist/astro/routes/api/settings/domain-notify.mjs +125 -0
  283. package/dist/astro/routes/api/settings/domain-notify.mjs.map +1 -0
  284. package/dist/astro/routes/api/settings/domain.d.mts +9 -0
  285. package/dist/astro/routes/api/settings/domain.d.mts.map +1 -0
  286. package/dist/astro/routes/api/settings/domain.mjs +61 -0
  287. package/dist/astro/routes/api/settings/domain.mjs.map +1 -0
  288. package/dist/astro/routes/api/settings/email.mjs +5 -5
  289. package/dist/astro/routes/api/settings.mjs +18 -18
  290. package/dist/astro/routes/api/setup/admin-verify.mjs +19 -19
  291. package/dist/astro/routes/api/setup/admin.mjs +17 -17
  292. package/dist/astro/routes/api/setup/dev-bypass.mjs +34 -34
  293. package/dist/astro/routes/api/setup/dev-reset.mjs +3 -3
  294. package/dist/astro/routes/api/setup/index.d.mts.map +1 -1
  295. package/dist/astro/routes/api/setup/index.mjs +44 -40
  296. package/dist/astro/routes/api/setup/index.mjs.map +1 -1
  297. package/dist/astro/routes/api/setup/status.mjs +5 -5
  298. package/dist/astro/routes/api/site/domain-proof.d.mts +8 -0
  299. package/dist/astro/routes/api/site/domain-proof.d.mts.map +1 -0
  300. package/dist/astro/routes/api/site/domain-proof.mjs +33 -0
  301. package/dist/astro/routes/api/site/domain-proof.mjs.map +1 -0
  302. package/dist/astro/routes/api/snapshot.mjs +7 -7
  303. package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +19 -19
  304. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +19 -19
  305. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +19 -19
  306. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +19 -19
  307. package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +19 -19
  308. package/dist/astro/routes/api/taxonomies/_name_.mjs +19 -19
  309. package/dist/astro/routes/api/taxonomies/bulk-tag.mjs +27 -27
  310. package/dist/astro/routes/api/taxonomies/index.mjs +19 -19
  311. package/dist/astro/routes/api/themes/preview.mjs +5 -5
  312. package/dist/astro/routes/api/typegen.mjs +5 -5
  313. package/dist/astro/routes/api/visual-editing/action-token.mjs +5 -5
  314. package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +17 -17
  315. package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +3 -3
  316. package/dist/astro/routes/api/well-known/auth.mjs +1 -1
  317. package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
  318. package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
  319. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +14 -14
  320. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +16 -16
  321. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +16 -16
  322. package/dist/astro/routes/api/widget-areas/_name_.mjs +6 -6
  323. package/dist/astro/routes/api/widget-areas/index.mjs +16 -16
  324. package/dist/astro/routes/api/widget-components.mjs +4 -4
  325. package/dist/astro/routes/robots.txt.mjs +4 -4
  326. package/dist/astro/routes/sitemap-_collection_.xml.d.mts.map +1 -1
  327. package/dist/astro/routes/sitemap-_collection_.xml.mjs +27 -10
  328. package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
  329. package/dist/astro/routes/sitemap.xml.d.mts.map +1 -1
  330. package/dist/astro/routes/sitemap.xml.mjs +11 -10
  331. package/dist/astro/routes/sitemap.xml.mjs.map +1 -1
  332. package/dist/astro/types.d.mts +30 -18
  333. package/dist/astro/types.d.mts.map +1 -1
  334. package/dist/auth/providers/github.d.mts +1 -1
  335. package/dist/auth/providers/google.d.mts +1 -1
  336. package/dist/auth/providers/microsoft.d.mts +1 -1
  337. package/dist/authoritative-records-Dcs7l2H5.mjs +5183 -0
  338. package/dist/authoritative-records-Dcs7l2H5.mjs.map +1 -0
  339. package/dist/authorize-TdIGpRSE.mjs +49 -0
  340. package/dist/authorize-TdIGpRSE.mjs.map +1 -0
  341. package/dist/backup-CZt5Mzwx.mjs +246 -0
  342. package/dist/backup-CZt5Mzwx.mjs.map +1 -0
  343. package/dist/block-types-DHnkzE6u.mjs +132 -0
  344. package/dist/block-types-DHnkzE6u.mjs.map +1 -0
  345. package/dist/block-values-C4N_F2-G.mjs +175 -0
  346. package/dist/block-values-C4N_F2-G.mjs.map +1 -0
  347. package/dist/byline-BmVKOQ8l.mjs +909 -0
  348. package/dist/byline-BmVKOQ8l.mjs.map +1 -0
  349. package/dist/byline-fields-B8SDs3M_.mjs +123 -0
  350. package/dist/byline-fields-B8SDs3M_.mjs.map +1 -0
  351. package/dist/byline-fields-Bze3ZdAw.mjs +280 -0
  352. package/dist/byline-fields-Bze3ZdAw.mjs.map +1 -0
  353. package/dist/bylines-CHhR28r9.mjs +150 -0
  354. package/dist/bylines-CHhR28r9.mjs.map +1 -0
  355. package/dist/bylines-DZS4OflA.mjs +234 -0
  356. package/dist/bylines-DZS4OflA.mjs.map +1 -0
  357. package/dist/cache-x0z8t_m9.mjs +133 -0
  358. package/dist/cache-x0z8t_m9.mjs.map +1 -0
  359. package/dist/canonical-BUcKRYpG.mjs +174 -0
  360. package/dist/canonical-BUcKRYpG.mjs.map +1 -0
  361. package/dist/challenge-store-BHgdPVze.mjs +51 -0
  362. package/dist/challenge-store-BHgdPVze.mjs.map +1 -0
  363. package/dist/checksum-BYR5i7qe.mjs +162 -0
  364. package/dist/checksum-BYR5i7qe.mjs.map +1 -0
  365. package/dist/chunks-Dr5Vr0zA.mjs +25 -0
  366. package/dist/chunks-Dr5Vr0zA.mjs.map +1 -0
  367. package/dist/cli/index.mjs +44 -42
  368. package/dist/cli/index.mjs.map +1 -1
  369. package/dist/client/cf-access.d.mts +1 -1
  370. package/dist/client/index.d.mts +107 -107
  371. package/dist/client/index.d.mts.map +1 -1
  372. package/dist/client/index.mjs +2 -2
  373. package/dist/client/index.mjs.map +1 -1
  374. package/dist/comment-CWla6OHV.mjs +325 -0
  375. package/dist/comment-CWla6OHV.mjs.map +1 -0
  376. package/dist/comment-reaction-RZrcs5cW.mjs +85 -0
  377. package/dist/comment-reaction-RZrcs5cW.mjs.map +1 -0
  378. package/dist/comments-BzmIKVb2.mjs +99 -0
  379. package/dist/comments-BzmIKVb2.mjs.map +1 -0
  380. package/dist/comments-Da_dI2O1.mjs +195 -0
  381. package/dist/comments-Da_dI2O1.mjs.map +1 -0
  382. package/dist/components-oFXumpf5.mjs +112 -0
  383. package/dist/components-oFXumpf5.mjs.map +1 -0
  384. package/dist/config--wamYxBW.d.mts +39 -0
  385. package/dist/config--wamYxBW.d.mts.map +1 -0
  386. package/dist/config-Bo4eOOdV.mjs +228 -0
  387. package/dist/config-Bo4eOOdV.mjs.map +1 -0
  388. package/dist/config-C4-UxIk7.d.mts +6790 -0
  389. package/dist/config-C4-UxIk7.d.mts.map +1 -0
  390. package/dist/connection-UpzYxtE2.mjs +36 -0
  391. package/dist/connection-UpzYxtE2.mjs.map +1 -0
  392. package/dist/content-CcHrqkgp.mjs +2072 -0
  393. package/dist/content-CcHrqkgp.mjs.map +1 -0
  394. package/dist/content-list-query-Bxxdd9fv.d.mts +26 -0
  395. package/dist/content-list-query-Bxxdd9fv.d.mts.map +1 -0
  396. package/dist/content-repair-havk1F0-.mjs +442 -0
  397. package/dist/content-repair-havk1F0-.mjs.map +1 -0
  398. package/dist/context-CvhgHgSH.mjs +2043 -0
  399. package/dist/context-CvhgHgSH.mjs.map +1 -0
  400. package/dist/credits-CygUrPOi.mjs +110 -0
  401. package/dist/credits-CygUrPOi.mjs.map +1 -0
  402. package/dist/cron-C6ytTOLw.mjs +306 -0
  403. package/dist/cron-C6ytTOLw.mjs.map +1 -0
  404. package/dist/dashboard-7_FYfafc.mjs +151 -0
  405. package/dist/dashboard-7_FYfafc.mjs.map +1 -0
  406. package/dist/db/index.d.mts +3 -3
  407. package/dist/db/index.mjs +1 -1
  408. package/dist/db/libsql-migrations.d.mts +1 -1
  409. package/dist/db/libsql-migrations.mjs +4 -4
  410. package/dist/db/libsql.d.mts +1 -1
  411. package/dist/db/postgres-migrations.d.mts +1 -1
  412. package/dist/db/postgres-migrations.mjs +4 -4
  413. package/dist/db/postgres.d.mts +1 -1
  414. package/dist/db/sqlite-migrations.d.mts +1 -1
  415. package/dist/db/sqlite-migrations.mjs +4 -4
  416. package/dist/db/sqlite.d.mts +1 -1
  417. package/dist/db/sqlite.mjs +1 -1
  418. package/dist/default-CHCUkV4Z.mjs +81 -0
  419. package/dist/default-CHCUkV4Z.mjs.map +1 -0
  420. package/dist/deferred-tasks-G0xhcJTl.d.mts +9 -0
  421. package/dist/deferred-tasks-G0xhcJTl.d.mts.map +1 -0
  422. package/dist/device-flow-CzDJmQ1q.mjs +521 -0
  423. package/dist/device-flow-CzDJmQ1q.mjs.map +1 -0
  424. package/dist/digest-xJmyPv2r.mjs +194 -0
  425. package/dist/digest-xJmyPv2r.mjs.map +1 -0
  426. package/dist/direct-executor-BXiYIVJ9.mjs +104 -0
  427. package/dist/direct-executor-BXiYIVJ9.mjs.map +1 -0
  428. package/dist/email-console-7ZPApLlm.mjs +50 -0
  429. package/dist/email-console-7ZPApLlm.mjs.map +1 -0
  430. package/dist/email-locale-DFdUA6UF.mjs +25 -0
  431. package/dist/email-locale-DFdUA6UF.mjs.map +1 -0
  432. package/dist/emdash-runtime-C4oFeVpN.mjs +4363 -0
  433. package/dist/emdash-runtime-C4oFeVpN.mjs.map +1 -0
  434. package/dist/entry-lock-B4n0HdQ_.mjs +163 -0
  435. package/dist/entry-lock-B4n0HdQ_.mjs.map +1 -0
  436. package/dist/entry-lock-BAAlKYrz.d.mts +4566 -0
  437. package/dist/entry-lock-BAAlKYrz.d.mts.map +1 -0
  438. package/dist/entry-lock-Cjz0h45X.mjs +1209 -0
  439. package/dist/entry-lock-Cjz0h45X.mjs.map +1 -0
  440. package/dist/env-types-4bkF6Bqg.mjs +38 -0
  441. package/dist/env-types-4bkF6Bqg.mjs.map +1 -0
  442. package/dist/error-DxgQdaZ_.mjs +90 -0
  443. package/dist/error-DxgQdaZ_.mjs.map +1 -0
  444. package/dist/errors-CjtE5aWF.mjs +120 -0
  445. package/dist/errors-CjtE5aWF.mjs.map +1 -0
  446. package/dist/errors-hskQ0C8G.mjs +479 -0
  447. package/dist/errors-hskQ0C8G.mjs.map +1 -0
  448. package/dist/escape-ESFhYzwG.mjs +9 -0
  449. package/dist/escape-ESFhYzwG.mjs.map +1 -0
  450. package/dist/fence-vc3aHgRA.mjs +162 -0
  451. package/dist/fence-vc3aHgRA.mjs.map +1 -0
  452. package/dist/field-defs-cache-zoow36nz.mjs +77 -0
  453. package/dist/field-defs-cache-zoow36nz.mjs.map +1 -0
  454. package/dist/field-map-JD1wG0Tq.mjs +83 -0
  455. package/dist/field-map-JD1wG0Tq.mjs.map +1 -0
  456. package/dist/fts-manager-WJCN8uU6.mjs +443 -0
  457. package/dist/fts-manager-WJCN8uU6.mjs.map +1 -0
  458. package/dist/gc-CsGZiKdH.mjs +75 -0
  459. package/dist/gc-CsGZiKdH.mjs.map +1 -0
  460. package/dist/hook-result-CXjtMk7Q.d.mts +31 -0
  461. package/dist/hook-result-CXjtMk7Q.d.mts.map +1 -0
  462. package/dist/hreflang-BAma7iRr.mjs +105 -0
  463. package/dist/hreflang-BAma7iRr.mjs.map +1 -0
  464. package/dist/hreflang-BsYo4x_M.d.mts +50 -0
  465. package/dist/hreflang-BsYo4x_M.d.mts.map +1 -0
  466. package/dist/http-route-dispatch-C8G7hAK6.mjs +342 -0
  467. package/dist/http-route-dispatch-C8G7hAK6.mjs.map +1 -0
  468. package/dist/identity-BwBKM1fH.mjs +35 -0
  469. package/dist/identity-BwBKM1fH.mjs.map +1 -0
  470. package/dist/import-DJ3Z2wxE.mjs +2021 -0
  471. package/dist/import-DJ3Z2wxE.mjs.map +1 -0
  472. package/dist/index-DYsn97dY.d.mts +623 -0
  473. package/dist/index-DYsn97dY.d.mts.map +1 -0
  474. package/dist/index.d.mts +24 -24
  475. package/dist/index.mjs +87 -87
  476. package/dist/install-finalization-DCFnFSHv.mjs +58 -0
  477. package/dist/install-finalization-DCFnFSHv.mjs.map +1 -0
  478. package/dist/keys-CGvAndSp.mjs +61 -0
  479. package/dist/keys-CGvAndSp.mjs.map +1 -0
  480. package/dist/kinds-DT1W4T4Y.mjs +974 -0
  481. package/dist/kinds-DT1W4T4Y.mjs.map +1 -0
  482. package/dist/lifecycle-BzglCSY0.mjs +25 -0
  483. package/dist/lifecycle-BzglCSY0.mjs.map +1 -0
  484. package/dist/load-DjUqmf3s.mjs +28 -0
  485. package/dist/load-DjUqmf3s.mjs.map +1 -0
  486. package/dist/loader-CetY659y.mjs +1355 -0
  487. package/dist/loader-CetY659y.mjs.map +1 -0
  488. package/dist/loops-DkT1zkPH.mjs +205 -0
  489. package/dist/loops-DkT1zkPH.mjs.map +1 -0
  490. package/dist/manifest-builder-BOFCd9rX.mjs +189 -0
  491. package/dist/manifest-builder-BOFCd9rX.mjs.map +1 -0
  492. package/dist/manifest-schema-BiFBPEsp.mjs +497 -0
  493. package/dist/manifest-schema-BiFBPEsp.mjs.map +1 -0
  494. package/dist/marketplace-CUlenvZm.mjs +257 -0
  495. package/dist/marketplace-CUlenvZm.mjs.map +1 -0
  496. package/dist/media/image-endpoint.d.mts +26 -2
  497. package/dist/media/image-endpoint.d.mts.map +1 -1
  498. package/dist/media/image-endpoint.mjs +73 -3
  499. package/dist/media/image-endpoint.mjs.map +1 -1
  500. package/dist/media/index.d.mts +1 -1
  501. package/dist/media/local-runtime.d.mts +14 -14
  502. package/dist/media/local-runtime.mjs +4 -4
  503. package/dist/media-CRKsKlfK.mjs +416 -0
  504. package/dist/media-CRKsKlfK.mjs.map +1 -0
  505. package/dist/media-C_z7sRuC.mjs +294 -0
  506. package/dist/media-C_z7sRuC.mjs.map +1 -0
  507. package/dist/media-IT8hQleU.mjs +373 -0
  508. package/dist/media-IT8hQleU.mjs.map +1 -0
  509. package/dist/media-allowlist-Ct6wvnT2.mjs +45 -0
  510. package/dist/media-allowlist-Ct6wvnT2.mjs.map +1 -0
  511. package/dist/media-folders-DtMt-vAA.mjs +210 -0
  512. package/dist/media-folders-DtMt-vAA.mjs.map +1 -0
  513. package/dist/media-url-BpXLqCmf.mjs +43 -0
  514. package/dist/media-url-BpXLqCmf.mjs.map +1 -0
  515. package/dist/media-usage-DEPHZZ9X.mjs +282 -0
  516. package/dist/media-usage-DEPHZZ9X.mjs.map +1 -0
  517. package/dist/media-usage-activation-V2Siabtw.mjs +78 -0
  518. package/dist/media-usage-activation-V2Siabtw.mjs.map +1 -0
  519. package/dist/media-usage-work-Cv1OE59F.mjs +151 -0
  520. package/dist/media-usage-work-Cv1OE59F.mjs.map +1 -0
  521. package/dist/media-usage-work-cgDYGvrt.mjs +1015 -0
  522. package/dist/media-usage-work-cgDYGvrt.mjs.map +1 -0
  523. package/dist/menus-CvVYfsuk.mjs +753 -0
  524. package/dist/menus-CvVYfsuk.mjs.map +1 -0
  525. package/dist/menus-D1HC8npj.mjs +92 -0
  526. package/dist/menus-D1HC8npj.mjs.map +1 -0
  527. package/dist/menus-DL8IPIcm.mjs +3721 -0
  528. package/dist/menus-DL8IPIcm.mjs.map +1 -0
  529. package/dist/migrations/index.d.mts +1 -1
  530. package/dist/migrations/index.mjs +3 -3
  531. package/dist/mode-eieqAWLe.mjs +23 -0
  532. package/dist/mode-eieqAWLe.mjs.map +1 -0
  533. package/dist/node-sqlite-compat-VuyzJw1b.mjs +63 -0
  534. package/dist/node-sqlite-compat-VuyzJw1b.mjs.map +1 -0
  535. package/dist/oauth-authorization-B6ZJbMd2.mjs +274 -0
  536. package/dist/oauth-authorization-B6ZJbMd2.mjs.map +1 -0
  537. package/dist/oauth-clients-DVjRc9v3.mjs +266 -0
  538. package/dist/oauth-clients-DVjRc9v3.mjs.map +1 -0
  539. package/dist/oauth-state-store-CnmYYsVQ.mjs +50 -0
  540. package/dist/oauth-state-store-CnmYYsVQ.mjs.map +1 -0
  541. package/dist/oauth-user-lookup-Dz1_R5vT.mjs +26 -0
  542. package/dist/oauth-user-lookup-Dz1_R5vT.mjs.map +1 -0
  543. package/dist/object-cache/memory.d.mts +1 -1
  544. package/dist/options-BR9XZl7h.d.mts +81 -0
  545. package/dist/options-BR9XZl7h.d.mts.map +1 -0
  546. package/dist/ownership-COPyVysP.mjs +12 -0
  547. package/dist/ownership-COPyVysP.mjs.map +1 -0
  548. package/dist/page/index.d.mts +2 -2
  549. package/dist/page/index.mjs +3 -3
  550. package/dist/parse-BOGhrwSq.d.mts +174 -0
  551. package/dist/parse-BOGhrwSq.d.mts.map +1 -0
  552. package/dist/parse-Cn5aSk1N.mjs +81 -0
  553. package/dist/parse-Cn5aSk1N.mjs.map +1 -0
  554. package/dist/passkey-config-mMFRQUCj.mjs +46 -0
  555. package/dist/passkey-config-mMFRQUCj.mjs.map +1 -0
  556. package/dist/paths-BmcAdBo9.mjs +77 -0
  557. package/dist/paths-BmcAdBo9.mjs.map +1 -0
  558. package/dist/patterns-CMNnYCgf.mjs +159 -0
  559. package/dist/patterns-CMNnYCgf.mjs.map +1 -0
  560. package/dist/placeholder-nOep3_Gn.d.mts +306 -0
  561. package/dist/placeholder-nOep3_Gn.d.mts.map +1 -0
  562. package/dist/plan-CDY4K8CH.mjs +135 -0
  563. package/dist/plan-CDY4K8CH.mjs.map +1 -0
  564. package/dist/plugin-test-runtime.d.mts +14 -14
  565. package/dist/plugin-test-runtime.d.mts.map +1 -1
  566. package/dist/plugin-test-runtime.mjs +100 -100
  567. package/dist/plugin-types.d.mts +2 -2
  568. package/dist/plugin-utils.d.mts +12 -12
  569. package/dist/plugin-utils.mjs +1 -1
  570. package/dist/plugin-utils.mjs.map +1 -1
  571. package/dist/plugins/adapt-sandbox-entry.d.mts +12 -12
  572. package/dist/plugins/adapt-sandbox-entry.mjs +3 -3
  573. package/dist/plugins/host.d.mts +5 -5
  574. package/dist/plugins/host.mjs +35 -35
  575. package/dist/plugins-DFBpfbO3.mjs +261 -0
  576. package/dist/plugins-DFBpfbO3.mjs.map +1 -0
  577. package/dist/policy-B_2qnHSy.mjs +45 -0
  578. package/dist/policy-B_2qnHSy.mjs.map +1 -0
  579. package/dist/portable-text-Dc2YAusw.mjs +307 -0
  580. package/dist/portable-text-Dc2YAusw.mjs.map +1 -0
  581. package/dist/preview-BtzikJ9O.mjs +107 -0
  582. package/dist/preview-BtzikJ9O.mjs.map +1 -0
  583. package/dist/protocol-M268ox8L.d.mts +61 -0
  584. package/dist/protocol-M268ox8L.d.mts.map +1 -0
  585. package/dist/public-submission-BQZavgZU.mjs +251 -0
  586. package/dist/public-submission-BQZavgZU.mjs.map +1 -0
  587. package/dist/public-url-uT1Ok2Tu.mjs +101 -0
  588. package/dist/public-url-uT1Ok2Tu.mjs.map +1 -0
  589. package/dist/query-BGG3sDEd.mjs +1127 -0
  590. package/dist/query-BGG3sDEd.mjs.map +1 -0
  591. package/dist/query-C_CWlifp.mjs +41 -0
  592. package/dist/query-C_CWlifp.mjs.map +1 -0
  593. package/dist/range-CXK_kDbI.mjs +51 -0
  594. package/dist/range-CXK_kDbI.mjs.map +1 -0
  595. package/dist/rate-limit-Dvamvay-.mjs +127 -0
  596. package/dist/rate-limit-Dvamvay-.mjs.map +1 -0
  597. package/dist/receipt-BmQGzquP.mjs +43 -0
  598. package/dist/receipt-BmQGzquP.mjs.map +1 -0
  599. package/dist/redirect-B39kTQ_0.mjs +423 -0
  600. package/dist/redirect-B39kTQ_0.mjs.map +1 -0
  601. package/dist/redirect-BguJ00Pv.mjs +19 -0
  602. package/dist/redirect-BguJ00Pv.mjs.map +1 -0
  603. package/dist/redirects-C8G4BsfP.mjs +446 -0
  604. package/dist/redirects-C8G4BsfP.mjs.map +1 -0
  605. package/dist/redirects-DFT7Wr-e.mjs +148 -0
  606. package/dist/redirects-DFT7Wr-e.mjs.map +1 -0
  607. package/dist/registry/testing.mjs +3 -3
  608. package/dist/registry-DeZ27gVi.mjs +8374 -0
  609. package/dist/registry-DeZ27gVi.mjs.map +1 -0
  610. package/dist/relations-DBB1bRJW.mjs +776 -0
  611. package/dist/relations-DBB1bRJW.mjs.map +1 -0
  612. package/dist/request-context.d.mts +1 -1
  613. package/dist/request-meta-BSvkhIBX.mjs +141 -0
  614. package/dist/request-meta-BSvkhIBX.mjs.map +1 -0
  615. package/dist/resolve-BxH64HN9.mjs +100 -0
  616. package/dist/resolve-BxH64HN9.mjs.map +1 -0
  617. package/dist/route-wire-CwbWB_6O.mjs +197 -0
  618. package/dist/route-wire-CwbWB_6O.mjs.map +1 -0
  619. package/dist/routes-BfIxc7ft.mjs +272 -0
  620. package/dist/routes-BfIxc7ft.mjs.map +1 -0
  621. package/dist/runner-DkeafPBA.d.mts +68 -0
  622. package/dist/runner-DkeafPBA.d.mts.map +1 -0
  623. package/dist/runner-wqt4BrIW.mjs +6383 -0
  624. package/dist/runner-wqt4BrIW.mjs.map +1 -0
  625. package/dist/runtime.d.mts +13 -13
  626. package/dist/runtime.mjs +1 -1
  627. package/dist/schema/project-env-types.mjs +29 -29
  628. package/dist/schema-BXIW-JHi.mjs +815 -0
  629. package/dist/schema-BXIW-JHi.mjs.map +1 -0
  630. package/dist/schema-I74JwYte.mjs +13 -0
  631. package/dist/schema-I74JwYte.mjs.map +1 -0
  632. package/dist/scopes-RWZ5ft_Z.mjs +34 -0
  633. package/dist/scopes-RWZ5ft_Z.mjs.map +1 -0
  634. package/dist/search-DxwagyWS.mjs +450 -0
  635. package/dist/search-DxwagyWS.mjs.map +1 -0
  636. package/dist/sections-Ccq9ZgyD.mjs +346 -0
  637. package/dist/sections-Ccq9ZgyD.mjs.map +1 -0
  638. package/dist/seed/index.d.mts +2 -2
  639. package/dist/seed/index.mjs +27 -27
  640. package/dist/seo/index.d.mts +3 -3
  641. package/dist/seo/index.mjs +14 -14
  642. package/dist/seo-CCnfPWAQ.mjs +133 -0
  643. package/dist/seo-CCnfPWAQ.mjs.map +1 -0
  644. package/dist/seo-QCtJ1jjV.mjs +188 -0
  645. package/dist/seo-QCtJ1jjV.mjs.map +1 -0
  646. package/dist/service-DX84s2rw.mjs +150 -0
  647. package/dist/service-DX84s2rw.mjs.map +1 -0
  648. package/dist/session-user-1dtJc2zv.mjs +61 -0
  649. package/dist/session-user-1dtJc2zv.mjs.map +1 -0
  650. package/dist/settings-B1jOxAIl.mjs +443 -0
  651. package/dist/settings-B1jOxAIl.mjs.map +1 -0
  652. package/dist/settings-Bc1IBl1t.mjs +66 -0
  653. package/dist/settings-Bc1IBl1t.mjs.map +1 -0
  654. package/dist/settings-GaZ5sVgg.mjs +73 -0
  655. package/dist/settings-GaZ5sVgg.mjs.map +1 -0
  656. package/dist/setup-complete-DidMAWJS.mjs +65 -0
  657. package/dist/setup-complete-DidMAWJS.mjs.map +1 -0
  658. package/dist/setup-nonce-DKl4S4c6.mjs +25 -0
  659. package/dist/setup-nonce-DKl4S4c6.mjs.map +1 -0
  660. package/dist/site-domain-CbI51Pc2.mjs +113 -0
  661. package/dist/site-domain-CbI51Pc2.mjs.map +1 -0
  662. package/dist/site-settings-CDdT4mVm.mjs +50 -0
  663. package/dist/site-settings-CDdT4mVm.mjs.map +1 -0
  664. package/dist/site-url-CrDZaAvo.mjs +45 -0
  665. package/dist/site-url-CrDZaAvo.mjs.map +1 -0
  666. package/dist/sitemap-name-W3BTor6X.mjs +26 -0
  667. package/dist/sitemap-name-W3BTor6X.mjs.map +1 -0
  668. package/dist/slug-BJhHKoOH.mjs +16 -0
  669. package/dist/slug-BJhHKoOH.mjs.map +1 -0
  670. package/dist/slugify-bu2-jKia.mjs +22 -0
  671. package/dist/slugify-bu2-jKia.mjs.map +1 -0
  672. package/dist/snapshot-BuI_2uDe.mjs +414 -0
  673. package/dist/snapshot-BuI_2uDe.mjs.map +1 -0
  674. package/dist/ssrf-LM_0wpGA.mjs +406 -0
  675. package/dist/ssrf-LM_0wpGA.mjs.map +1 -0
  676. package/dist/stage-DhzZuYaT.mjs +662 -0
  677. package/dist/stage-DhzZuYaT.mjs.map +1 -0
  678. package/dist/staged-DboEaWsV.mjs +686 -0
  679. package/dist/staged-DboEaWsV.mjs.map +1 -0
  680. package/dist/state-DCXDzjHq.mjs +178 -0
  681. package/dist/state-DCXDzjHq.mjs.map +1 -0
  682. package/dist/status-Dl85BK39.mjs +30 -0
  683. package/dist/status-Dl85BK39.mjs.map +1 -0
  684. package/dist/storage/local.d.mts +2 -2
  685. package/dist/storage/local.d.mts.map +1 -1
  686. package/dist/storage/local.mjs +11 -4
  687. package/dist/storage/local.mjs.map +1 -1
  688. package/dist/storage/s3.d.mts +4 -2
  689. package/dist/storage/s3.d.mts.map +1 -1
  690. package/dist/storage/s3.mjs +56 -9
  691. package/dist/storage/s3.mjs.map +1 -1
  692. package/dist/storage-query-BOBmeDMD.d.mts +1615 -0
  693. package/dist/storage-query-BOBmeDMD.d.mts.map +1 -0
  694. package/dist/tar-K40edFMt.mjs +449 -0
  695. package/dist/tar-K40edFMt.mjs.map +1 -0
  696. package/dist/target-BOighEY1.mjs +27 -0
  697. package/dist/target-BOighEY1.mjs.map +1 -0
  698. package/dist/taxonomies-DQSywBvX.mjs +697 -0
  699. package/dist/taxonomies-DQSywBvX.mjs.map +1 -0
  700. package/dist/taxonomies-Dj5eaobC.mjs +939 -0
  701. package/dist/taxonomies-Dj5eaobC.mjs.map +1 -0
  702. package/dist/taxonomy-QrNmTfIZ.mjs +550 -0
  703. package/dist/taxonomy-QrNmTfIZ.mjs.map +1 -0
  704. package/dist/tokens-j5L0as2H.mjs +171 -0
  705. package/dist/tokens-j5L0as2H.mjs.map +1 -0
  706. package/dist/transfer-CYEw8Tu4.mjs +8873 -0
  707. package/dist/transfer-CYEw8Tu4.mjs.map +1 -0
  708. package/dist/transfer-DDX10hkD.mjs +166 -0
  709. package/dist/transfer-DDX10hkD.mjs.map +1 -0
  710. package/dist/transfer-download-BAqq6GJv.mjs +33 -0
  711. package/dist/transfer-download-BAqq6GJv.mjs.map +1 -0
  712. package/dist/transformations-De44wqV_.mjs +196 -0
  713. package/dist/transformations-De44wqV_.mjs.map +1 -0
  714. package/dist/transport-1QjUhCRO.d.mts +42 -0
  715. package/dist/transport-1QjUhCRO.d.mts.map +1 -0
  716. package/dist/transport-Ds5pVX7p.mjs +136 -0
  717. package/dist/transport-Ds5pVX7p.mjs.map +1 -0
  718. package/dist/trusted-proxy-d4Tk6biT.mjs +51 -0
  719. package/dist/trusted-proxy-d4Tk6biT.mjs.map +1 -0
  720. package/dist/turnstile-DaFLtyrs.mjs +58 -0
  721. package/dist/turnstile-DaFLtyrs.mjs.map +1 -0
  722. package/dist/types-B4-1P2DK.d.mts +227 -0
  723. package/dist/types-B4-1P2DK.d.mts.map +1 -0
  724. package/dist/types-BKXA0f-c.mjs +16 -0
  725. package/dist/types-BKXA0f-c.mjs.map +1 -0
  726. package/dist/types-BiHcpUoO.d.mts +374 -0
  727. package/dist/types-BiHcpUoO.d.mts.map +1 -0
  728. package/dist/types-BihhvkyN.d.mts +85 -0
  729. package/dist/types-BihhvkyN.d.mts.map +1 -0
  730. package/dist/types-Bq9Wohd7.d.mts +363 -0
  731. package/dist/types-Bq9Wohd7.d.mts.map +1 -0
  732. package/dist/types-C-Xp0CcN.mjs.map +1 -1
  733. package/dist/types-C4P7F1Vq.d.mts +1741 -0
  734. package/dist/types-C4P7F1Vq.d.mts.map +1 -0
  735. package/dist/types-CGaqwHw4.mjs +37 -0
  736. package/dist/types-CGaqwHw4.mjs.map +1 -0
  737. package/dist/types-D4ECCE4X.mjs +77 -0
  738. package/dist/types-D4ECCE4X.mjs.map +1 -0
  739. package/dist/types-DcRJp0vS.d.mts +125 -0
  740. package/dist/types-DcRJp0vS.d.mts.map +1 -0
  741. package/dist/types-Ff85fTzU.d.mts +289 -0
  742. package/dist/types-Ff85fTzU.d.mts.map +1 -0
  743. package/dist/types-UKr5Sf4y.d.mts +916 -0
  744. package/dist/types-UKr5Sf4y.d.mts.map +1 -0
  745. package/dist/types-YpN8hZW7.d.mts +204 -0
  746. package/dist/types-YpN8hZW7.d.mts.map +1 -0
  747. package/dist/update-check-DrlsK-tt.mjs +161 -0
  748. package/dist/update-check-DrlsK-tt.mjs.map +1 -0
  749. package/dist/upload-attempts-D8CPPvRU.mjs +32 -0
  750. package/dist/upload-attempts-D8CPPvRU.mjs.map +1 -0
  751. package/dist/url-pattern-Di4Nn3vP.mjs +41 -0
  752. package/dist/url-pattern-Di4Nn3vP.mjs.map +1 -0
  753. package/dist/user-B-ZdGjhI.mjs +171 -0
  754. package/dist/user-B-ZdGjhI.mjs.map +1 -0
  755. package/dist/utils-D7wL3r6-.mjs +437 -0
  756. package/dist/utils-D7wL3r6-.mjs.map +1 -0
  757. package/dist/validate-BSZbSUDk.mjs +524 -0
  758. package/dist/validate-BSZbSUDk.mjs.map +1 -0
  759. package/dist/validate-Dfv0DpZi.d.mts +468 -0
  760. package/dist/validate-Dfv0DpZi.d.mts.map +1 -0
  761. package/dist/validation-DRyC_Vm5.mjs +219 -0
  762. package/dist/validation-DRyC_Vm5.mjs.map +1 -0
  763. package/dist/version-C4kz0PcO.mjs +7 -0
  764. package/dist/version-C4kz0PcO.mjs.map +1 -0
  765. package/dist/version-jhs2BRtl.mjs +9 -0
  766. package/dist/version-jhs2BRtl.mjs.map +1 -0
  767. package/dist/video-DReZ48Un.mjs +54 -0
  768. package/dist/video-DReZ48Un.mjs.map +1 -0
  769. package/dist/virtual-modules-D0e6VbEv.mjs +516 -0
  770. package/dist/virtual-modules-D0e6VbEv.mjs.map +1 -0
  771. package/dist/widgets-BkcMzKct.mjs +121 -0
  772. package/dist/widgets-BkcMzKct.mjs.map +1 -0
  773. package/dist/wxr-taxonomies-BxI0CbTg.mjs +453 -0
  774. package/dist/wxr-taxonomies-BxI0CbTg.mjs.map +1 -0
  775. package/dist/wxr-taxonomies-Dad33GJi.d.mts +34 -0
  776. package/dist/wxr-taxonomies-Dad33GJi.d.mts.map +1 -0
  777. package/package.json +13 -10
  778. package/src/api/errors.ts +9 -0
  779. package/src/api/handlers/api-tokens.ts +12 -6
  780. package/src/api/handlers/content.ts +57 -8
  781. package/src/api/handlers/domain-move-notice.ts +94 -0
  782. package/src/api/handlers/index.ts +2 -0
  783. package/src/api/handlers/manifest.ts +5 -0
  784. package/src/api/handlers/media-usage.ts +2 -1
  785. package/src/api/handlers/media.ts +1 -0
  786. package/src/api/handlers/seo.ts +155 -59
  787. package/src/api/handlers/settings.ts +31 -1
  788. package/src/api/handlers/site-domain.ts +143 -0
  789. package/src/api/openapi/document.ts +2 -2
  790. package/src/api/public-url.ts +1 -1
  791. package/src/api/schemas/content.ts +20 -0
  792. package/src/api/schemas/media-usage.ts +7 -1
  793. package/src/api/schemas/media.ts +12 -0
  794. package/src/api/site-url.ts +53 -5
  795. package/src/api/types.ts +2 -0
  796. package/src/astro/image-endpoint.ts +46 -4
  797. package/src/astro/integration/admin-locales.ts +168 -0
  798. package/src/astro/integration/dev-env.ts +84 -0
  799. package/src/astro/integration/index.ts +49 -9
  800. package/src/astro/integration/routes.ts +20 -0
  801. package/src/astro/integration/runtime.ts +15 -0
  802. package/src/astro/integration/vite-config.ts +18 -1
  803. package/src/astro/middleware/auth.ts +16 -3
  804. package/src/astro/middleware/csp.ts +1 -0
  805. package/src/astro/middleware/redirect.ts +27 -12
  806. package/src/astro/middleware/request-context.ts +12 -6
  807. package/src/astro/middleware.ts +53 -14
  808. package/src/astro/routes/api/auth/handover.ts +58 -0
  809. package/src/astro/routes/api/auth/magic-link/verify.ts +11 -3
  810. package/src/astro/routes/api/auth/passkey/options.ts +10 -2
  811. package/src/astro/routes/api/import/wordpress/execute.ts +19 -0
  812. package/src/astro/routes/api/import/wordpress/rewrite-url-helpers.ts +80 -42
  813. package/src/astro/routes/api/import/wordpress-plugin/execute.ts +15 -0
  814. package/src/astro/routes/api/manifest.ts +10 -0
  815. package/src/astro/routes/api/media/[id]/confirm.ts +19 -0
  816. package/src/astro/routes/api/media/file/[...key].ts +60 -12
  817. package/src/astro/routes/api/media/upload-url.ts +28 -4
  818. package/src/astro/routes/api/media.ts +15 -0
  819. package/src/astro/routes/api/schema/index.ts +1 -1
  820. package/src/astro/routes/api/settings/domain-notify.ts +76 -0
  821. package/src/astro/routes/api/settings/domain.ts +63 -0
  822. package/src/astro/routes/api/setup/index.ts +7 -0
  823. package/src/astro/routes/api/site/domain-proof.ts +28 -0
  824. package/src/astro/routes/sitemap-[collection].xml.ts +31 -8
  825. package/src/astro/routes/sitemap.xml.ts +12 -10
  826. package/src/astro/types.ts +13 -1
  827. package/src/auth/rate-limit.ts +18 -13
  828. package/src/auth/types.ts +7 -0
  829. package/src/aws-sdk.d.ts +2 -1
  830. package/src/cleanup.ts +26 -0
  831. package/src/cli/commands/export-seed.ts +2 -0
  832. package/src/cli/commands/seed.ts +5 -4
  833. package/src/client/index.ts +6 -1
  834. package/src/comments/public-submission.ts +15 -8
  835. package/src/components/CommentForm.astro +48 -8
  836. package/src/components/Comments.astro +50 -28
  837. package/src/components/EmDashImage.astro +6 -4
  838. package/src/components/Gallery.astro +4 -3
  839. package/src/components/Image.astro +4 -3
  840. package/src/components/InlinePortableTextEditor.tsx +148 -26
  841. package/src/components/Video.astro +100 -0
  842. package/src/components/index.ts +4 -1
  843. package/src/components/inline-code-block.tsx +8 -0
  844. package/src/components/webmcp-search.ts +15 -19
  845. package/src/components/widgets/RecentPosts.astro +57 -17
  846. package/src/content/converters/mark-safety.ts +3 -3
  847. package/src/content/converters/portable-text-identity.ts +1 -0
  848. package/src/content/converters/portable-text-to-prosemirror.ts +7 -0
  849. package/src/content/converters/prosemirror-to-portable-text.ts +16 -0
  850. package/src/content/converters/types.ts +22 -0
  851. package/src/content/converters/video.ts +77 -0
  852. package/src/database/datetime-storage.ts +1 -1
  853. package/src/database/migrations/runner.ts +13 -1
  854. package/src/database/repositories/comment.ts +17 -3
  855. package/src/database/repositories/content.ts +22 -3
  856. package/src/database/repositories/plugin-storage.ts +28 -19
  857. package/src/database/repositories/redirect.ts +24 -2
  858. package/src/database/repositories/taxonomy.ts +61 -46
  859. package/src/database/repositories/types.ts +2 -0
  860. package/src/emdash-runtime.ts +217 -68
  861. package/src/import/sources/wordpress-plugin.ts +3 -2
  862. package/src/import/utils.ts +2 -3
  863. package/src/index.ts +3 -0
  864. package/src/loader.ts +134 -43
  865. package/src/media/image-endpoint.ts +101 -1
  866. package/src/media/responsive.ts +14 -7
  867. package/src/media/usage/extractor.ts +19 -2
  868. package/src/media/usage/types.ts +5 -1
  869. package/src/plugin-utils.ts +1 -1
  870. package/src/plugins/context.ts +3 -7
  871. package/src/plugins/hooks.ts +1 -1
  872. package/src/plugins/http-route-dispatch.ts +5 -1
  873. package/src/plugins/manifest-schema.ts +1 -0
  874. package/src/plugins/route-error.ts +14 -0
  875. package/src/plugins/routes.ts +2 -2
  876. package/src/plugins/state.ts +36 -0
  877. package/src/plugins/types.ts +6 -0
  878. package/src/query.ts +8 -0
  879. package/src/redirects/patterns.ts +26 -2
  880. package/src/schema/registry.ts +7 -4
  881. package/src/schema/slug.ts +19 -0
  882. package/src/search/text-extraction.ts +6 -1
  883. package/src/seed/validate.ts +31 -0
  884. package/src/seo/sitemap-name.ts +22 -0
  885. package/src/storage/index.ts +2 -0
  886. package/src/storage/local.ts +10 -2
  887. package/src/storage/range.ts +54 -0
  888. package/src/storage/s3.ts +52 -8
  889. package/src/storage/types.ts +30 -3
  890. package/src/ui.ts +1 -0
  891. package/src/utils/slugify.ts +6 -1
  892. package/src/visual-editing/toolbar.ts +80 -35
  893. package/src/widgets/components.ts +4 -0
  894. package/src/widgets/index.ts +74 -82
  895. package/src/widgets/recent-posts.ts +62 -0
  896. package/dist/action-token-AgOs1UWD.mjs +0 -26
  897. package/dist/action-token-AgOs1UWD.mjs.map +0 -1
  898. package/dist/adapters-DM1oyHIN.d.mts +0 -173
  899. package/dist/adapters-DM1oyHIN.d.mts.map +0 -1
  900. package/dist/allowed-origins-CFtudhyw.mjs +0 -116
  901. package/dist/allowed-origins-CFtudhyw.mjs.map +0 -1
  902. package/dist/api-CltsXhiX.mjs +0 -4980
  903. package/dist/api-CltsXhiX.mjs.map +0 -1
  904. package/dist/api-tokens-P3mAaQgr.mjs +0 -166
  905. package/dist/api-tokens-P3mAaQgr.mjs.map +0 -1
  906. package/dist/apply-Q7uvzBWW.mjs +0 -1680
  907. package/dist/apply-Q7uvzBWW.mjs.map +0 -1
  908. package/dist/approvals-DycwI6lZ.mjs +0 -460
  909. package/dist/approvals-DycwI6lZ.mjs.map +0 -1
  910. package/dist/artifact-fetch-CWxyELVI.mjs +0 -659
  911. package/dist/artifact-fetch-CWxyELVI.mjs.map +0 -1
  912. package/dist/artifacts-UzWbysb8.mjs +0 -307
  913. package/dist/artifacts-UzWbysb8.mjs.map +0 -1
  914. package/dist/authoritative-records-dSvXCfzb.mjs +0 -5172
  915. package/dist/authoritative-records-dSvXCfzb.mjs.map +0 -1
  916. package/dist/authorize-DeWfk--K.mjs +0 -49
  917. package/dist/authorize-DeWfk--K.mjs.map +0 -1
  918. package/dist/backup-CFnbdTSJ.mjs +0 -246
  919. package/dist/backup-CFnbdTSJ.mjs.map +0 -1
  920. package/dist/block-types-C0YFSfR7.mjs +0 -132
  921. package/dist/block-types-C0YFSfR7.mjs.map +0 -1
  922. package/dist/block-values-H4E0XwE8.mjs +0 -175
  923. package/dist/block-values-H4E0XwE8.mjs.map +0 -1
  924. package/dist/byline-BhVslYLz.mjs +0 -909
  925. package/dist/byline-BhVslYLz.mjs.map +0 -1
  926. package/dist/byline-fields-DHJs0Mja.mjs +0 -280
  927. package/dist/byline-fields-DHJs0Mja.mjs.map +0 -1
  928. package/dist/byline-fields-xdxE9kxZ.mjs +0 -123
  929. package/dist/byline-fields-xdxE9kxZ.mjs.map +0 -1
  930. package/dist/bylines-B_nN9liM.mjs +0 -234
  931. package/dist/bylines-B_nN9liM.mjs.map +0 -1
  932. package/dist/bylines-C71YACkL.mjs +0 -150
  933. package/dist/bylines-C71YACkL.mjs.map +0 -1
  934. package/dist/cache-aTYCL9nK.mjs +0 -133
  935. package/dist/cache-aTYCL9nK.mjs.map +0 -1
  936. package/dist/canonical-Y1dpjCnp.mjs +0 -174
  937. package/dist/canonical-Y1dpjCnp.mjs.map +0 -1
  938. package/dist/challenge-store-CxZxPqaw.mjs +0 -51
  939. package/dist/challenge-store-CxZxPqaw.mjs.map +0 -1
  940. package/dist/checksum-DtH6m5uk.mjs +0 -162
  941. package/dist/checksum-DtH6m5uk.mjs.map +0 -1
  942. package/dist/chunks-zlGB5IQP.mjs +0 -25
  943. package/dist/chunks-zlGB5IQP.mjs.map +0 -1
  944. package/dist/comment-Bu08Wvr3.mjs +0 -313
  945. package/dist/comment-Bu08Wvr3.mjs.map +0 -1
  946. package/dist/comment-reaction-B8SfT-yM.mjs +0 -85
  947. package/dist/comment-reaction-B8SfT-yM.mjs.map +0 -1
  948. package/dist/comments-BRtp992B.mjs +0 -99
  949. package/dist/comments-BRtp992B.mjs.map +0 -1
  950. package/dist/comments-DVUYqdyC.mjs +0 -195
  951. package/dist/comments-DVUYqdyC.mjs.map +0 -1
  952. package/dist/components-CQY-Sgm-.mjs +0 -108
  953. package/dist/components-CQY-Sgm-.mjs.map +0 -1
  954. package/dist/config-B-uePMLj.d.mts +0 -39
  955. package/dist/config-B-uePMLj.d.mts.map +0 -1
  956. package/dist/config-B6BDSsz2.d.mts +0 -6712
  957. package/dist/config-B6BDSsz2.d.mts.map +0 -1
  958. package/dist/config-BsJHiQxC.mjs +0 -228
  959. package/dist/config-BsJHiQxC.mjs.map +0 -1
  960. package/dist/connection-B9pIasFd.mjs +0 -36
  961. package/dist/connection-B9pIasFd.mjs.map +0 -1
  962. package/dist/content-Dji9vEiW.mjs +0 -2063
  963. package/dist/content-Dji9vEiW.mjs.map +0 -1
  964. package/dist/content-list-query-DiNwyKtd.d.mts +0 -26
  965. package/dist/content-list-query-DiNwyKtd.d.mts.map +0 -1
  966. package/dist/content-repair-B7wnbzhN.mjs +0 -442
  967. package/dist/content-repair-B7wnbzhN.mjs.map +0 -1
  968. package/dist/context-Ctcxc8Ia.mjs +0 -2026
  969. package/dist/context-Ctcxc8Ia.mjs.map +0 -1
  970. package/dist/credits-Bu7dlobo.mjs +0 -110
  971. package/dist/credits-Bu7dlobo.mjs.map +0 -1
  972. package/dist/cron-xe5XKqA-.mjs +0 -306
  973. package/dist/cron-xe5XKqA-.mjs.map +0 -1
  974. package/dist/dashboard-B5hVHOtf.mjs +0 -151
  975. package/dist/dashboard-B5hVHOtf.mjs.map +0 -1
  976. package/dist/default-DaoYyFRS.mjs +0 -81
  977. package/dist/default-DaoYyFRS.mjs.map +0 -1
  978. package/dist/deferred-tasks-BYcDx2o_.d.mts +0 -9
  979. package/dist/deferred-tasks-BYcDx2o_.d.mts.map +0 -1
  980. package/dist/device-flow-Ma5P5d2e.mjs +0 -521
  981. package/dist/device-flow-Ma5P5d2e.mjs.map +0 -1
  982. package/dist/digest-xIpR3o64.mjs +0 -194
  983. package/dist/digest-xIpR3o64.mjs.map +0 -1
  984. package/dist/direct-executor-DMWwCey3.mjs +0 -104
  985. package/dist/direct-executor-DMWwCey3.mjs.map +0 -1
  986. package/dist/email-console-DmqVF5J_.mjs +0 -50
  987. package/dist/email-console-DmqVF5J_.mjs.map +0 -1
  988. package/dist/email-locale-Cc5YSXfJ.mjs +0 -25
  989. package/dist/email-locale-Cc5YSXfJ.mjs.map +0 -1
  990. package/dist/emdash-runtime-BlybX9Ui.mjs +0 -4249
  991. package/dist/emdash-runtime-BlybX9Ui.mjs.map +0 -1
  992. package/dist/entry-lock-De1L8qUQ.mjs +0 -163
  993. package/dist/entry-lock-De1L8qUQ.mjs.map +0 -1
  994. package/dist/entry-lock-esmMbgI9.d.mts +0 -4551
  995. package/dist/entry-lock-esmMbgI9.d.mts.map +0 -1
  996. package/dist/entry-lock-sxz2PGAT.mjs +0 -1197
  997. package/dist/entry-lock-sxz2PGAT.mjs.map +0 -1
  998. package/dist/env-types-BkjCtN13.mjs +0 -38
  999. package/dist/env-types-BkjCtN13.mjs.map +0 -1
  1000. package/dist/error-B0rgPgsQ.mjs +0 -90
  1001. package/dist/error-B0rgPgsQ.mjs.map +0 -1
  1002. package/dist/errors-CuHQRiBW.mjs +0 -120
  1003. package/dist/errors-CuHQRiBW.mjs.map +0 -1
  1004. package/dist/errors-DTE6C3K_.mjs +0 -470
  1005. package/dist/errors-DTE6C3K_.mjs.map +0 -1
  1006. package/dist/escape-nJW7dR0s.mjs +0 -9
  1007. package/dist/escape-nJW7dR0s.mjs.map +0 -1
  1008. package/dist/fence-CGw57S4v.mjs +0 -162
  1009. package/dist/fence-CGw57S4v.mjs.map +0 -1
  1010. package/dist/field-defs-cache-Bw8w499w.mjs +0 -77
  1011. package/dist/field-defs-cache-Bw8w499w.mjs.map +0 -1
  1012. package/dist/field-map-hn-D-SyH.mjs +0 -83
  1013. package/dist/field-map-hn-D-SyH.mjs.map +0 -1
  1014. package/dist/fts-manager-DacCYIe4.mjs +0 -443
  1015. package/dist/fts-manager-DacCYIe4.mjs.map +0 -1
  1016. package/dist/gc-BBplHrv6.mjs +0 -75
  1017. package/dist/gc-BBplHrv6.mjs.map +0 -1
  1018. package/dist/hook-result-DSRRxu_-.d.mts +0 -31
  1019. package/dist/hook-result-DSRRxu_-.d.mts.map +0 -1
  1020. package/dist/hreflang-CKPunvU0.mjs +0 -105
  1021. package/dist/hreflang-CKPunvU0.mjs.map +0 -1
  1022. package/dist/hreflang-egumj6WF.d.mts +0 -50
  1023. package/dist/hreflang-egumj6WF.d.mts.map +0 -1
  1024. package/dist/http-route-dispatch-DjNFZcJ2.mjs +0 -339
  1025. package/dist/http-route-dispatch-DjNFZcJ2.mjs.map +0 -1
  1026. package/dist/identity-Dfrx2_Bc.mjs +0 -35
  1027. package/dist/identity-Dfrx2_Bc.mjs.map +0 -1
  1028. package/dist/import-ROBvhbNc.mjs +0 -2021
  1029. package/dist/import-ROBvhbNc.mjs.map +0 -1
  1030. package/dist/index-B4sIdCAT.d.mts +0 -623
  1031. package/dist/index-B4sIdCAT.d.mts.map +0 -1
  1032. package/dist/install-finalization-CPM7Gged.mjs +0 -58
  1033. package/dist/install-finalization-CPM7Gged.mjs.map +0 -1
  1034. package/dist/keys-DxqxcAD4.mjs +0 -61
  1035. package/dist/keys-DxqxcAD4.mjs.map +0 -1
  1036. package/dist/kinds-BQl5gN6e.mjs +0 -974
  1037. package/dist/kinds-BQl5gN6e.mjs.map +0 -1
  1038. package/dist/lifecycle-DGQI7itS.mjs +0 -25
  1039. package/dist/lifecycle-DGQI7itS.mjs.map +0 -1
  1040. package/dist/load-DMxRl4VK.mjs +0 -28
  1041. package/dist/load-DMxRl4VK.mjs.map +0 -1
  1042. package/dist/loader-1DMiOq5s.mjs +0 -1303
  1043. package/dist/loader-1DMiOq5s.mjs.map +0 -1
  1044. package/dist/loops-Dn1i16FP.mjs +0 -205
  1045. package/dist/loops-Dn1i16FP.mjs.map +0 -1
  1046. package/dist/manifest-builder-CTw4FmZk.mjs +0 -189
  1047. package/dist/manifest-builder-CTw4FmZk.mjs.map +0 -1
  1048. package/dist/manifest-schema-gy37bD_D.mjs +0 -496
  1049. package/dist/manifest-schema-gy37bD_D.mjs.map +0 -1
  1050. package/dist/marketplace-tHWSsCUo.mjs +0 -257
  1051. package/dist/marketplace-tHWSsCUo.mjs.map +0 -1
  1052. package/dist/media-Bw-Q65ve.mjs +0 -294
  1053. package/dist/media-Bw-Q65ve.mjs.map +0 -1
  1054. package/dist/media-BzUDu7nl.mjs +0 -373
  1055. package/dist/media-BzUDu7nl.mjs.map +0 -1
  1056. package/dist/media-aahnKHze.mjs +0 -408
  1057. package/dist/media-aahnKHze.mjs.map +0 -1
  1058. package/dist/media-allowlist-RMrjo8TU.mjs +0 -45
  1059. package/dist/media-allowlist-RMrjo8TU.mjs.map +0 -1
  1060. package/dist/media-folders-kabR1oJf.mjs +0 -210
  1061. package/dist/media-folders-kabR1oJf.mjs.map +0 -1
  1062. package/dist/media-url-DloW2xrP.mjs +0 -43
  1063. package/dist/media-url-DloW2xrP.mjs.map +0 -1
  1064. package/dist/media-usage-CHHpV7ee.mjs +0 -282
  1065. package/dist/media-usage-CHHpV7ee.mjs.map +0 -1
  1066. package/dist/media-usage-activation-BinYqC_r.mjs +0 -78
  1067. package/dist/media-usage-activation-BinYqC_r.mjs.map +0 -1
  1068. package/dist/media-usage-work-C734aq6s.mjs +0 -1015
  1069. package/dist/media-usage-work-C734aq6s.mjs.map +0 -1
  1070. package/dist/media-usage-work-lxvV0-UO.mjs +0 -151
  1071. package/dist/media-usage-work-lxvV0-UO.mjs.map +0 -1
  1072. package/dist/menus-6RHNq4ZK.mjs +0 -753
  1073. package/dist/menus-6RHNq4ZK.mjs.map +0 -1
  1074. package/dist/menus-AuCTaO9W.mjs +0 -3704
  1075. package/dist/menus-AuCTaO9W.mjs.map +0 -1
  1076. package/dist/menus-BQKqf0Up.mjs +0 -92
  1077. package/dist/menus-BQKqf0Up.mjs.map +0 -1
  1078. package/dist/mode-nh0ppSX5.mjs +0 -23
  1079. package/dist/mode-nh0ppSX5.mjs.map +0 -1
  1080. package/dist/node-sqlite-compat-CDOEcc97.mjs +0 -63
  1081. package/dist/node-sqlite-compat-CDOEcc97.mjs.map +0 -1
  1082. package/dist/oauth-authorization-BtYQ80uU.mjs +0 -274
  1083. package/dist/oauth-authorization-BtYQ80uU.mjs.map +0 -1
  1084. package/dist/oauth-clients-C1S4NQHh.mjs +0 -266
  1085. package/dist/oauth-clients-C1S4NQHh.mjs.map +0 -1
  1086. package/dist/oauth-state-store-CpGi2FZH.mjs +0 -50
  1087. package/dist/oauth-state-store-CpGi2FZH.mjs.map +0 -1
  1088. package/dist/oauth-user-lookup-BNp1aFAr.mjs +0 -26
  1089. package/dist/oauth-user-lookup-BNp1aFAr.mjs.map +0 -1
  1090. package/dist/options-B41aLm1I.d.mts +0 -81
  1091. package/dist/options-B41aLm1I.d.mts.map +0 -1
  1092. package/dist/ownership-DoeAIuTg.mjs +0 -12
  1093. package/dist/ownership-DoeAIuTg.mjs.map +0 -1
  1094. package/dist/parse-CmFDTGzp.mjs +0 -81
  1095. package/dist/parse-CmFDTGzp.mjs.map +0 -1
  1096. package/dist/parse-QVS0t5oR.d.mts +0 -172
  1097. package/dist/parse-QVS0t5oR.d.mts.map +0 -1
  1098. package/dist/passkey-config-C-MxsV22.mjs +0 -46
  1099. package/dist/passkey-config-C-MxsV22.mjs.map +0 -1
  1100. package/dist/paths-kr8hAMMI.mjs +0 -77
  1101. package/dist/paths-kr8hAMMI.mjs.map +0 -1
  1102. package/dist/patterns-DyZJ67I7.mjs +0 -140
  1103. package/dist/patterns-DyZJ67I7.mjs.map +0 -1
  1104. package/dist/placeholder-Dn7MMdWr.d.mts +0 -306
  1105. package/dist/placeholder-Dn7MMdWr.d.mts.map +0 -1
  1106. package/dist/plan-CuQOeU9g.mjs +0 -135
  1107. package/dist/plan-CuQOeU9g.mjs.map +0 -1
  1108. package/dist/plugins-CGb-G98c.mjs +0 -261
  1109. package/dist/plugins-CGb-G98c.mjs.map +0 -1
  1110. package/dist/policy-C5wrDXYV.mjs +0 -45
  1111. package/dist/policy-C5wrDXYV.mjs.map +0 -1
  1112. package/dist/portable-text-BnRuiR1-.mjs +0 -307
  1113. package/dist/portable-text-BnRuiR1-.mjs.map +0 -1
  1114. package/dist/preview-xWNSR1Li.mjs +0 -107
  1115. package/dist/preview-xWNSR1Li.mjs.map +0 -1
  1116. package/dist/protocol-ClxN-m1e.d.mts +0 -61
  1117. package/dist/protocol-ClxN-m1e.d.mts.map +0 -1
  1118. package/dist/public-submission-CkmT2SKv.mjs +0 -250
  1119. package/dist/public-submission-CkmT2SKv.mjs.map +0 -1
  1120. package/dist/public-url-B5a0QAh6.mjs +0 -101
  1121. package/dist/public-url-B5a0QAh6.mjs.map +0 -1
  1122. package/dist/query-DHqFiqqH.mjs +0 -41
  1123. package/dist/query-DHqFiqqH.mjs.map +0 -1
  1124. package/dist/query-DT85BehD.mjs +0 -1125
  1125. package/dist/query-DT85BehD.mjs.map +0 -1
  1126. package/dist/rate-limit-iMvcu3eu.mjs +0 -120
  1127. package/dist/rate-limit-iMvcu3eu.mjs.map +0 -1
  1128. package/dist/receipt-Dpp1uaX9.mjs +0 -43
  1129. package/dist/receipt-Dpp1uaX9.mjs.map +0 -1
  1130. package/dist/redirect-BRoLiWQE.mjs +0 -19
  1131. package/dist/redirect-BRoLiWQE.mjs.map +0 -1
  1132. package/dist/redirect-xZNpBoGp.mjs +0 -417
  1133. package/dist/redirect-xZNpBoGp.mjs.map +0 -1
  1134. package/dist/redirects-D4EWeXAo.mjs +0 -148
  1135. package/dist/redirects-D4EWeXAo.mjs.map +0 -1
  1136. package/dist/redirects-DCKqwiWp.mjs +0 -446
  1137. package/dist/redirects-DCKqwiWp.mjs.map +0 -1
  1138. package/dist/registry-DaXmUsD4.mjs +0 -8369
  1139. package/dist/registry-DaXmUsD4.mjs.map +0 -1
  1140. package/dist/relations-JvBP8nGP.mjs +0 -776
  1141. package/dist/relations-JvBP8nGP.mjs.map +0 -1
  1142. package/dist/request-meta-B6blULFY.mjs +0 -141
  1143. package/dist/request-meta-B6blULFY.mjs.map +0 -1
  1144. package/dist/resolve-DAhHi5tn.mjs +0 -100
  1145. package/dist/resolve-DAhHi5tn.mjs.map +0 -1
  1146. package/dist/route-wire-DK600v4u.mjs +0 -197
  1147. package/dist/route-wire-DK600v4u.mjs.map +0 -1
  1148. package/dist/routes-BeZyaCzv.mjs +0 -272
  1149. package/dist/routes-BeZyaCzv.mjs.map +0 -1
  1150. package/dist/runner-CskI4Hmq.mjs +0 -6372
  1151. package/dist/runner-CskI4Hmq.mjs.map +0 -1
  1152. package/dist/runner-J3Cj6DGk.d.mts +0 -68
  1153. package/dist/runner-J3Cj6DGk.d.mts.map +0 -1
  1154. package/dist/schema-CK0ihqMR.mjs +0 -815
  1155. package/dist/schema-CK0ihqMR.mjs.map +0 -1
  1156. package/dist/schema-VtaZSrC-.mjs +0 -13
  1157. package/dist/schema-VtaZSrC-.mjs.map +0 -1
  1158. package/dist/scopes-BRnGlL9t.mjs +0 -34
  1159. package/dist/scopes-BRnGlL9t.mjs.map +0 -1
  1160. package/dist/search-D6-XK1Sn.mjs +0 -448
  1161. package/dist/search-D6-XK1Sn.mjs.map +0 -1
  1162. package/dist/sections-CBDCf7qR.mjs +0 -346
  1163. package/dist/sections-CBDCf7qR.mjs.map +0 -1
  1164. package/dist/seo-BdeEPDNW.mjs +0 -133
  1165. package/dist/seo-BdeEPDNW.mjs.map +0 -1
  1166. package/dist/seo-C61bnPuV.mjs +0 -114
  1167. package/dist/seo-C61bnPuV.mjs.map +0 -1
  1168. package/dist/service-BuRKLMxa.mjs +0 -150
  1169. package/dist/service-BuRKLMxa.mjs.map +0 -1
  1170. package/dist/session-user-CqkPtrPL.mjs +0 -61
  1171. package/dist/session-user-CqkPtrPL.mjs.map +0 -1
  1172. package/dist/settings-0u0lTthS.mjs +0 -51
  1173. package/dist/settings-0u0lTthS.mjs.map +0 -1
  1174. package/dist/settings-WHr45II1.mjs +0 -61
  1175. package/dist/settings-WHr45II1.mjs.map +0 -1
  1176. package/dist/settings-m5tIYnF0.mjs +0 -443
  1177. package/dist/settings-m5tIYnF0.mjs.map +0 -1
  1178. package/dist/setup-complete-B2_dhZZz.mjs +0 -65
  1179. package/dist/setup-complete-B2_dhZZz.mjs.map +0 -1
  1180. package/dist/setup-nonce-CJV9ftSK.mjs +0 -25
  1181. package/dist/setup-nonce-CJV9ftSK.mjs.map +0 -1
  1182. package/dist/site-settings-KJOqJW6W.mjs +0 -50
  1183. package/dist/site-settings-KJOqJW6W.mjs.map +0 -1
  1184. package/dist/site-url-Ceq_AUK0.mjs +0 -16
  1185. package/dist/site-url-Ceq_AUK0.mjs.map +0 -1
  1186. package/dist/slugify-T5GHH42D.mjs +0 -17
  1187. package/dist/slugify-T5GHH42D.mjs.map +0 -1
  1188. package/dist/snapshot-Dzsn3NZa.mjs +0 -414
  1189. package/dist/snapshot-Dzsn3NZa.mjs.map +0 -1
  1190. package/dist/ssrf-DsmvZB80.mjs +0 -406
  1191. package/dist/ssrf-DsmvZB80.mjs.map +0 -1
  1192. package/dist/stage-Csnh_yEd.mjs +0 -662
  1193. package/dist/stage-Csnh_yEd.mjs.map +0 -1
  1194. package/dist/staged-Q7pnEVvI.mjs +0 -686
  1195. package/dist/staged-Q7pnEVvI.mjs.map +0 -1
  1196. package/dist/state-kGdOMQRY.mjs +0 -153
  1197. package/dist/state-kGdOMQRY.mjs.map +0 -1
  1198. package/dist/status-D39Fpy8R.mjs +0 -30
  1199. package/dist/status-D39Fpy8R.mjs.map +0 -1
  1200. package/dist/storage-query-C7iy6eUb.d.mts +0 -1615
  1201. package/dist/storage-query-C7iy6eUb.d.mts.map +0 -1
  1202. package/dist/tar-BWiraSUY.mjs +0 -449
  1203. package/dist/tar-BWiraSUY.mjs.map +0 -1
  1204. package/dist/target-DOFs5oUC.mjs +0 -27
  1205. package/dist/target-DOFs5oUC.mjs.map +0 -1
  1206. package/dist/taxonomies-BS40Wxvi.mjs +0 -939
  1207. package/dist/taxonomies-BS40Wxvi.mjs.map +0 -1
  1208. package/dist/taxonomies-DAZU9VDd.mjs +0 -697
  1209. package/dist/taxonomies-DAZU9VDd.mjs.map +0 -1
  1210. package/dist/taxonomy-XzLE95Vx.mjs +0 -525
  1211. package/dist/taxonomy-XzLE95Vx.mjs.map +0 -1
  1212. package/dist/tokens-DSQan4p7.mjs +0 -171
  1213. package/dist/tokens-DSQan4p7.mjs.map +0 -1
  1214. package/dist/transfer-BcCVxDgf.mjs +0 -166
  1215. package/dist/transfer-BcCVxDgf.mjs.map +0 -1
  1216. package/dist/transfer-OMrancOt.mjs +0 -8873
  1217. package/dist/transfer-OMrancOt.mjs.map +0 -1
  1218. package/dist/transfer-download-Dc-ltjZY.mjs +0 -33
  1219. package/dist/transfer-download-Dc-ltjZY.mjs.map +0 -1
  1220. package/dist/transformations-Ddx7UtrY.mjs +0 -196
  1221. package/dist/transformations-Ddx7UtrY.mjs.map +0 -1
  1222. package/dist/transport-flR-Zmds.d.mts +0 -42
  1223. package/dist/transport-flR-Zmds.d.mts.map +0 -1
  1224. package/dist/transport-umzEbgYO.mjs +0 -136
  1225. package/dist/transport-umzEbgYO.mjs.map +0 -1
  1226. package/dist/trusted-proxy-BqfQFs6a.mjs +0 -51
  1227. package/dist/trusted-proxy-BqfQFs6a.mjs.map +0 -1
  1228. package/dist/turnstile-Do60baId.mjs +0 -58
  1229. package/dist/turnstile-Do60baId.mjs.map +0 -1
  1230. package/dist/types-BT1p3uyb.d.mts +0 -1735
  1231. package/dist/types-BT1p3uyb.d.mts.map +0 -1
  1232. package/dist/types-BYaPWs_F.d.mts +0 -198
  1233. package/dist/types-BYaPWs_F.d.mts.map +0 -1
  1234. package/dist/types-CLTQ9b_r.d.mts +0 -374
  1235. package/dist/types-CLTQ9b_r.d.mts.map +0 -1
  1236. package/dist/types-CPkQw2T2.d.mts +0 -85
  1237. package/dist/types-CPkQw2T2.d.mts.map +0 -1
  1238. package/dist/types-CQLvuXoZ.d.mts +0 -198
  1239. package/dist/types-CQLvuXoZ.d.mts.map +0 -1
  1240. package/dist/types-CV5xszpF.d.mts +0 -363
  1241. package/dist/types-CV5xszpF.d.mts.map +0 -1
  1242. package/dist/types-CdEMurNh.mjs +0 -77
  1243. package/dist/types-CdEMurNh.mjs.map +0 -1
  1244. package/dist/types-CxwtnuSS.mjs +0 -37
  1245. package/dist/types-CxwtnuSS.mjs.map +0 -1
  1246. package/dist/types-DGw8KMX_.mjs +0 -16
  1247. package/dist/types-DGw8KMX_.mjs.map +0 -1
  1248. package/dist/types-DOfVMPoo.d.mts +0 -125
  1249. package/dist/types-DOfVMPoo.d.mts.map +0 -1
  1250. package/dist/types-LtS0SM4F.d.mts +0 -287
  1251. package/dist/types-LtS0SM4F.d.mts.map +0 -1
  1252. package/dist/types-ifgOkcBa.d.mts +0 -916
  1253. package/dist/types-ifgOkcBa.d.mts.map +0 -1
  1254. package/dist/update-check-DOc2aBIU.mjs +0 -161
  1255. package/dist/update-check-DOc2aBIU.mjs.map +0 -1
  1256. package/dist/upload-attempts-nzdc3cay.mjs +0 -32
  1257. package/dist/upload-attempts-nzdc3cay.mjs.map +0 -1
  1258. package/dist/url-pattern-hVbqpXs6.mjs +0 -41
  1259. package/dist/url-pattern-hVbqpXs6.mjs.map +0 -1
  1260. package/dist/user-Dnp53zTq.mjs +0 -171
  1261. package/dist/user-Dnp53zTq.mjs.map +0 -1
  1262. package/dist/utils-CoV-PYhg.mjs +0 -439
  1263. package/dist/utils-CoV-PYhg.mjs.map +0 -1
  1264. package/dist/validate-CfQ9_YlD.d.mts +0 -468
  1265. package/dist/validate-CfQ9_YlD.d.mts.map +0 -1
  1266. package/dist/validate-DBX3DKtL.mjs +0 -516
  1267. package/dist/validate-DBX3DKtL.mjs.map +0 -1
  1268. package/dist/validation-BJMiDhB1.mjs +0 -219
  1269. package/dist/validation-BJMiDhB1.mjs.map +0 -1
  1270. package/dist/version-BaT8yKIT.mjs +0 -7
  1271. package/dist/version-BaT8yKIT.mjs.map +0 -1
  1272. package/dist/version-BwEGkqkx.mjs +0 -9
  1273. package/dist/version-BwEGkqkx.mjs.map +0 -1
  1274. package/dist/virtual-modules-B6vJW15k.mjs +0 -516
  1275. package/dist/virtual-modules-B6vJW15k.mjs.map +0 -1
  1276. package/dist/widgets-BkxBAgZ_.mjs +0 -126
  1277. package/dist/widgets-BkxBAgZ_.mjs.map +0 -1
  1278. package/dist/wxr-taxonomies-D7gAJyOF.mjs +0 -453
  1279. package/dist/wxr-taxonomies-D7gAJyOF.mjs.map +0 -1
  1280. package/dist/wxr-taxonomies-DM5J9AsT.d.mts +0 -34
  1281. package/dist/wxr-taxonomies-DM5J9AsT.d.mts.map +0 -1
  1282. /package/dist/{api-tokens-BLz2MtQs.mjs → api-tokens-D2zgAIEt.mjs} +0 -0
  1283. /package/dist/{ssrf-tA45vIPX.mjs → ssrf-BvNItdxk.mjs} +0 -0
@@ -0,0 +1,1741 @@
1
+ import { r as ContentFieldFilters } from "./content-list-query-Bxxdd9fv.mjs";
2
+ import { f as FieldType, m as FieldWidgetOptions, p as FieldValidation } from "./types-BiHcpUoO.mjs";
3
+ import { z } from "astro/zod";
4
+ import { Permission } from "@emdash-cms/auth";
5
+ import { CAPABILITY_RENAMES, CurrentPluginCapability, DeclaredAccess, DeprecatedPluginCapability, ManifestHookEntry as ManifestHookEntry$1, ManifestRouteEntry as ManifestRouteEntry$1, PluginCapability, PluginEditorDraftAccess, PluginEditorDraftFieldSelector, PluginFormData, PluginMcpManifestConfig, PluginRouteBodyMode, PluginRouteQuery, PluginRouteRequest, PluginStorageConfig, RouteOptions, StorageCollectionConfig, isDeprecatedCapability, normalizeCapabilities, normalizeCapability } from "@emdash-cms/plugin-types";
6
+ import { ConfirmDialog, Element, PluginUiContext } from "@emdash-cms/blocks";
7
+ import { JSX } from "astro/jsx-runtime";
8
+
9
+ //#region src/plugins/types.d.ts
10
+ declare function normalizePluginCapabilities(capabilities: readonly PluginCapability[]): PluginCapability[];
11
+ declare function normalizePluginCapabilities(capabilities: readonly string[]): string[];
12
+ /**
13
+ * Query filter operators
14
+ */
15
+ interface RangeFilter {
16
+ gt?: number | string;
17
+ gte?: number | string;
18
+ lt?: number | string;
19
+ lte?: number | string;
20
+ }
21
+ interface InFilter {
22
+ in: Array<string | number>;
23
+ }
24
+ interface StartsWithFilter {
25
+ startsWith: string;
26
+ }
27
+ /**
28
+ * Where clause value types
29
+ */
30
+ type WhereValue = string | number | boolean | null | RangeFilter | InFilter | StartsWithFilter;
31
+ /**
32
+ * Where clause for storage queries
33
+ */
34
+ type WhereClause = Record<string, WhereValue>;
35
+ /**
36
+ * Query options for storage.query()
37
+ */
38
+ interface QueryOptions {
39
+ where?: WhereClause;
40
+ orderBy?: Record<string, "asc" | "desc">;
41
+ /** Default 50, max 100 */
42
+ limit?: number;
43
+ cursor?: string;
44
+ }
45
+ /**
46
+ * Paginated result (used by storage.query, content.list, media.list)
47
+ */
48
+ interface PaginatedResult<T> {
49
+ items: T[];
50
+ cursor?: string;
51
+ hasMore: boolean;
52
+ }
53
+ interface VersionedValue<T = unknown> {
54
+ value: T;
55
+ /** Opaque host revision, valid only for the key from which it was read. */
56
+ revision: string;
57
+ }
58
+ type ConditionalWriteResult = {
59
+ applied: true;
60
+ revision: string;
61
+ } | {
62
+ applied: false;
63
+ };
64
+ interface ConditionalDeleteResult {
65
+ applied: boolean;
66
+ }
67
+ /**
68
+ * A single per-field integer delta for {@link StorageCollection.updateIf}.
69
+ *
70
+ * `inc`/`dec` values must be safe integers, enforced at runtime with
71
+ * `Number.isSafeInteger` (which also rejects `NaN`/`Infinity`), because a TS
72
+ * `number` cannot forbid float literals. Deltas are applied entirely in-SQL
73
+ * over the stored value with `COALESCE(<value>, 0) ± n`, so a delta on a
74
+ * missing or JSON-`null` field starts from `0` (never corrupts the document).
75
+ *
76
+ * `updateIf` does NOT clamp: a `dec` can drive a field negative when the
77
+ * `where` guard doesn't cover the delta magnitude (e.g. stock `2` with
78
+ * `where: { stock: { gte: 1 } }` and `delta: { stock: { dec: 3 } }` → `-1`,
79
+ * `applied: true`). The guard is the caller's responsibility — pair a `dec: k`
80
+ * with a `gte: k` guard to prevent underflow.
81
+ */
82
+ type NumericDelta = {
83
+ inc: number;
84
+ } | {
85
+ dec: number;
86
+ };
87
+ /**
88
+ * Arguments to {@link StorageCollection.updateIf}.
89
+ *
90
+ * `where` reuses the {@link QueryOptions} `WhereClause` verbatim — the guard is
91
+ * evaluated in-SQL with the same numeric-correct, total comparisons as
92
+ * `query()`. An empty `where: {}` emits no guard, i.e. it matches the row
93
+ * unconditionally (update-if-row-exists) — a footgun in the no-oversell case,
94
+ * where a real predicate (e.g. `{ stock: { gte: 1 } }`) is what you want.
95
+ *
96
+ * At least one of `set` / `delta` must be present (a runtime error is thrown
97
+ * otherwise). A field may not appear in both `set` and `delta` in the same
98
+ * call. `set` and `delta` are separate arguments (not a union) so a wholesale
99
+ * value that happens to look like `{ inc: 5 }` is never mistaken for a delta.
100
+ */
101
+ interface UpdateIfArgs<T> {
102
+ /**
103
+ * Guard evaluated in-SQL; identical semantics to `query({ where })`. An
104
+ * empty `{}` means "match the row unconditionally (no guard)".
105
+ */
106
+ where: WhereClause;
107
+ /** Wholesale field values merged into the stored JSON document. */
108
+ set?: Partial<T>;
109
+ /** Per-field integer deltas applied in-SQL (`COALESCE(base, 0) ± n`). */
110
+ delta?: { [K in keyof T]?: NumericDelta };
111
+ }
112
+ /**
113
+ * Result of {@link StorageCollection.updateIf}.
114
+ *
115
+ * `applied: false` intentionally conflates "row absent" and "guard failed": a
116
+ * single-statement guarded `UPDATE` cannot distinguish them, and the caller
117
+ * should not need to. `updateIf` is update-only — it never inserts a missing
118
+ * row.
119
+ */
120
+ type UpdateIfResult<T> = {
121
+ applied: true;
122
+ data: T;
123
+ } | {
124
+ applied: false;
125
+ };
126
+ /**
127
+ * Storage collection interface - the API exposed to plugins
128
+ * No async iterators - all operations return promises with pagination
129
+ */
130
+ interface StorageCollection<T = unknown> {
131
+ get(id: string): Promise<T | null>;
132
+ put(id: string, data: T): Promise<void>;
133
+ delete(id: string): Promise<boolean>;
134
+ exists(id: string): Promise<boolean>;
135
+ /** A stored JSON null returns an envelope with value: null; only an absent row returns null. */
136
+ getVersioned(id: string): Promise<VersionedValue<T> | null>;
137
+ /** A null expected revision creates only when absent. Errors reject; conflicts return applied: false. */
138
+ compareAndSet(id: string, expectedRevision: string | null, data: T): Promise<ConditionalWriteResult>;
139
+ compareAndDelete(id: string, expectedRevision: string): Promise<ConditionalDeleteResult>;
140
+ getMany(ids: string[]): Promise<Map<string, T>>;
141
+ putMany(items: Array<{
142
+ id: string;
143
+ data: T;
144
+ }>): Promise<void>;
145
+ deleteMany(ids: string[]): Promise<number>;
146
+ query(options?: QueryOptions): Promise<PaginatedResult<{
147
+ id: string;
148
+ data: T;
149
+ }>>;
150
+ count(where?: WhereClause): Promise<number>;
151
+ /**
152
+ * Predicate-guarded atomic update. Applies `set`/`delta` to the row `id`
153
+ * only if it exists and the `where` guard matches, in a single guarded
154
+ * `UPDATE … RETURNING`. This is the no-oversell primitive: the guard and the
155
+ * arithmetic live in one statement, so N concurrent guarded decrements
156
+ * serialize correctly. `applied: false` means the row was absent OR the
157
+ * guard failed (the two are intentionally indistinguishable). Non-object
158
+ * documents, invalid counters and unsafe arithmetic results also fail the
159
+ * guard. Never inserts.
160
+ *
161
+ * Serialization failures and deadlocks throw `StorageSerializationError`.
162
+ * Retry the write with a bounded policy; restart an explicit transaction
163
+ * before retrying its operations.
164
+ */
165
+ updateIf(id: string, args: UpdateIfArgs<T>): Promise<UpdateIfResult<T>>;
166
+ }
167
+ /**
168
+ * Plugin storage context - typed based on declared collections
169
+ */
170
+ type PluginStorage<T extends PluginStorageConfig> = { [K in keyof T]: StorageCollection };
171
+ /**
172
+ * Plugin-scoped key-value state.
173
+ *
174
+ * Convention:
175
+ * - `state:*` - Internal plugin state (not shown to users)
176
+ * - `cache:*` - Reusable computed or remote data
177
+ *
178
+ * The `settings:*` namespace remains a compatibility alias through EmDash
179
+ * 0.x. New code uses `PluginContext.settings` for user configuration.
180
+ */
181
+ interface KVAccess {
182
+ get<T>(key: string): Promise<T | null>;
183
+ getVersioned<T>(key: string): Promise<VersionedValue<T> | null>;
184
+ /** A null expected revision creates only when absent. Errors reject; conflicts return applied: false. */
185
+ compareAndSet(key: string, expectedRevision: string | null, value: unknown): Promise<ConditionalWriteResult>;
186
+ compareAndDelete(key: string, expectedRevision: string): Promise<ConditionalDeleteResult>;
187
+ set(key: string, value: unknown): Promise<void>;
188
+ delete(key: string): Promise<boolean>;
189
+ list(prefix?: string): Promise<Array<{
190
+ key: string;
191
+ value: unknown;
192
+ }>>;
193
+ }
194
+ /** Plugin settings. Fields declared as `secret` in `admin.settingsSchema` are encrypted. */
195
+ interface SettingsAccess {
196
+ get<T>(key: string): Promise<T | null>;
197
+ getVersioned<T>(key: string): Promise<VersionedValue<T> | null>;
198
+ compareAndSet(key: string, expectedRevision: string | null, value: unknown): Promise<ConditionalWriteResult>;
199
+ compareAndDelete(key: string, expectedRevision: string): Promise<ConditionalDeleteResult>;
200
+ set(key: string, value: unknown): Promise<void>;
201
+ delete(key: string): Promise<boolean>;
202
+ list(prefix?: string): Promise<Array<{
203
+ key: string;
204
+ value: unknown;
205
+ }>>;
206
+ }
207
+ /**
208
+ * SEO metadata for a content item, as stored in the core SEO panel.
209
+ *
210
+ * Only present on items in collections with `has_seo = 1`. For collections
211
+ * without SEO enabled, `ContentItem.seo` is `undefined`.
212
+ */
213
+ interface ContentItemSeo {
214
+ title: string | null;
215
+ description: string | null;
216
+ image: string | null;
217
+ canonical: string | null;
218
+ noIndex: boolean;
219
+ }
220
+ /**
221
+ * SEO input accepted by content write operations.
222
+ *
223
+ * All fields are optional — only fields that are present overwrite existing
224
+ * values. An empty object is treated as a no-op.
225
+ */
226
+ interface ContentItemSeoInput {
227
+ title?: string | null;
228
+ description?: string | null;
229
+ image?: string | null;
230
+ canonical?: string | null;
231
+ noIndex?: boolean;
232
+ }
233
+ /**
234
+ * Content item returned from content API
235
+ */
236
+ interface ContentItem {
237
+ id: string;
238
+ type: string;
239
+ slug: string | null;
240
+ status: string;
241
+ locale: string | null;
242
+ data: Record<string, unknown>;
243
+ /**
244
+ * SEO metadata, populated when the collection has SEO enabled
245
+ * (`has_seo = 1`). `undefined` for non-SEO collections.
246
+ */
247
+ seo?: ContentItemSeo;
248
+ createdAt: string;
249
+ updatedAt: string;
250
+ publishedAt: string | null;
251
+ /** Scheduled publication time, if set (e.g. scheduled items or scheduled draft changes). */
252
+ scheduledAt?: string | null;
253
+ authorId?: string | null;
254
+ translationGroup?: string | null;
255
+ liveRevisionId?: string | null;
256
+ draftRevisionId?: string | null;
257
+ version?: number;
258
+ }
259
+ interface ContentTranslationSummary {
260
+ id: string;
261
+ locale: string | null;
262
+ slug: string | null;
263
+ status: string;
264
+ updatedAt: string;
265
+ }
266
+ interface ContentRevisionInfo {
267
+ id: string;
268
+ collection: string;
269
+ entryId: string;
270
+ data: Record<string, unknown>;
271
+ createdAt: string;
272
+ }
273
+ interface FieldSchemaInfo {
274
+ slug: string;
275
+ label: string;
276
+ type: FieldType;
277
+ required: boolean;
278
+ unique: boolean;
279
+ default?: unknown;
280
+ validation?: FieldValidation;
281
+ widget?: string;
282
+ options?: FieldWidgetOptions;
283
+ searchable: boolean;
284
+ indexed: boolean;
285
+ translatable: boolean;
286
+ sortOrder: number;
287
+ }
288
+ interface CollectionSchemaInfo {
289
+ slug: string;
290
+ label: string;
291
+ labelSingular: string | null;
292
+ description: string | null;
293
+ supports: string[];
294
+ hasSeo: boolean;
295
+ titleField: string | null;
296
+ dateField: string | null;
297
+ urlPattern: string | null;
298
+ routable: boolean;
299
+ hidden: boolean;
300
+ fields: FieldSchemaInfo[];
301
+ }
302
+ interface SchemaAccess {
303
+ listCollections(): Promise<CollectionSchemaInfo[]>;
304
+ getCollection(slug: string): Promise<CollectionSchemaInfo | null>;
305
+ }
306
+ interface ContentListWhere {
307
+ /** Exact match on `status` (e.g. `"published"`, `"draft"`). */
308
+ status?: string;
309
+ /** Exact match on `locale` (e.g. `"en"`, `"fr-CA"`). */
310
+ locale?: string;
311
+ /** AND-combined filters over custom fields explicitly marked as indexed. */
312
+ fieldFilters?: ContentFieldFilters;
313
+ }
314
+ /**
315
+ * Content list options
316
+ */
317
+ interface ContentListOptions {
318
+ limit?: number;
319
+ cursor?: string;
320
+ orderBy?: Record<string, "asc" | "desc">;
321
+ where?: ContentListWhere;
322
+ }
323
+ /**
324
+ * Input accepted by `content.create` / `content.update`.
325
+ *
326
+ * Most entries are field slugs mapped to their values. The reserved `seo`
327
+ * key is extracted and routed to the core SEO panel (the `_emdash_seo`
328
+ * table), matching the shape accepted by the REST API. Passing `seo` for a
329
+ * collection that does not have SEO enabled throws a validation error.
330
+ */
331
+ type ContentWriteInput = Record<string, unknown> & {
332
+ seo?: ContentItemSeoInput;
333
+ };
334
+ /** Options accepted by `content.create`. */
335
+ interface ContentCreateOptions {
336
+ /** Locale for the new content row. Defaults to the configured site locale, then `en`. */
337
+ locale?: string;
338
+ /** Existing row in the same collection whose translation group the new row joins. */
339
+ translationOf?: string;
340
+ }
341
+ type PluginContentCreateCallback = (pluginId: string, collection: string, data: ContentWriteInput, options?: ContentCreateOptions & {
342
+ /** Save-hook origin supplied by sandbox transports to prevent hook re-entry. */originHook?: "content:beforeSave" | "content:afterSave";
343
+ sandboxOrigin?: true;
344
+ }) => Promise<ContentItem>;
345
+ /**
346
+ * Taxonomy definition returned from the taxonomy API (e.g. "category", "tag").
347
+ */
348
+ interface TaxonomyDefInfo {
349
+ name: string;
350
+ label: string;
351
+ labelSingular: string | null;
352
+ hierarchical: boolean;
353
+ /** Collections this taxonomy is attached to (e.g. `["posts"]`). */
354
+ collections: string[];
355
+ locale: string;
356
+ }
357
+ /**
358
+ * Taxonomy term returned from the taxonomy API. Flat shape — for hierarchical
359
+ * taxonomies the tree is reconstructed via `parentId` (which stores the
360
+ * parent's locale-agnostic `translationGroup`).
361
+ */
362
+ interface TaxonomyTermInfo {
363
+ id: string;
364
+ /** Taxonomy name this term belongs to (e.g. "category"). */
365
+ taxonomy: string;
366
+ slug: string;
367
+ label: string;
368
+ parentId: string | null;
369
+ /** Term metadata as edited in the admin (`description` etc.). */
370
+ data: Record<string, unknown> | null;
371
+ locale: string;
372
+ translationGroup: string | null;
373
+ }
374
+ /**
375
+ * Options accepted by taxonomy read operations. Omitting `locale` returns
376
+ * rows for every locale.
377
+ */
378
+ interface TaxonomyReadOptions {
379
+ locale?: string;
380
+ }
381
+ interface TaxonomyTermCreateInput {
382
+ label: string;
383
+ slug?: string;
384
+ parentId?: string | null;
385
+ description?: string;
386
+ locale?: string;
387
+ translationOf?: string;
388
+ }
389
+ /**
390
+ * Content access interface - capability-gated
391
+ */
392
+ interface ContentAccess {
393
+ get(collection: string, id: string): Promise<ContentItem | null>;
394
+ list(collection: string, options?: ContentListOptions): Promise<PaginatedResult<ContentItem>>;
395
+ getTranslations?(collection: string, id: string): Promise<{
396
+ translationGroup: string;
397
+ translations: ContentTranslationSummary[];
398
+ }>;
399
+ getPublicUrl?(collection: string, id: string): Promise<string | null>;
400
+ listRevisions?(collection: string, id: string, options?: {
401
+ limit?: number;
402
+ }): Promise<ContentRevisionInfo[]>;
403
+ getRevision?(collection: string, id: string, revisionId: string): Promise<ContentRevisionInfo | null>;
404
+ create?(collection: string, data: ContentWriteInput, options?: ContentCreateOptions): Promise<ContentItem>;
405
+ update?(collection: string, id: string, data: ContentWriteInput): Promise<ContentItem>;
406
+ delete?(collection: string, id: string): Promise<boolean>;
407
+ getVersioned?(collection: string, id: string): Promise<VersionedContentItem | null>;
408
+ publish?(collection: string, id: string, options: {
409
+ _rev: string;
410
+ }): Promise<VersionedContentItem>;
411
+ unpublish?(collection: string, id: string, options: {
412
+ _rev: string;
413
+ }): Promise<VersionedContentItem>;
414
+ schedule?(collection: string, id: string, options: {
415
+ scheduledAt: string;
416
+ _rev: string;
417
+ }): Promise<VersionedContentItem>;
418
+ unschedule?(collection: string, id: string, options: {
419
+ _rev: string;
420
+ }): Promise<VersionedContentItem>;
421
+ getTrashedVersioned?(collection: string, id: string): Promise<VersionedContentItem | null>;
422
+ restore?(collection: string, id: string, options: {
423
+ _rev: string;
424
+ }): Promise<VersionedContentItem>;
425
+ }
426
+ interface VersionedContentItem {
427
+ item: ContentItem;
428
+ _rev: string;
429
+ }
430
+ /**
431
+ * Taxonomy access interface — capability-gated on `taxonomies:read`.
432
+ */
433
+ interface TaxonomyAccess {
434
+ /** List taxonomy definitions. */
435
+ getAll(options?: TaxonomyReadOptions): Promise<TaxonomyDefInfo[]>;
436
+ /** All terms of a taxonomy, ordered by label. */
437
+ getTerms(taxonomy: string, options?: TaxonomyReadOptions): Promise<TaxonomyTermInfo[]>;
438
+ /** Terms assigned to a content entry, optionally scoped to one taxonomy. */
439
+ getEntryTerms(collection: string, entryId: string, options?: TaxonomyReadOptions & {
440
+ taxonomy?: string;
441
+ }): Promise<TaxonomyTermInfo[]>;
442
+ createTerm?(taxonomy: string, input: TaxonomyTermCreateInput): Promise<TaxonomyTermInfo>;
443
+ addEntryTerms?(collection: string, entryId: string, taxonomy: string, termIds: string[]): Promise<TaxonomyTermInfo[]>;
444
+ removeEntryTerms?(collection: string, entryId: string, taxonomy: string, termIds: string[]): Promise<TaxonomyTermInfo[]>;
445
+ }
446
+ /** Taxonomy mutations available with `taxonomies:write`. */
447
+ interface TaxonomyAccessWithWrite extends TaxonomyAccess {
448
+ createTerm(taxonomy: string, input: TaxonomyTermCreateInput): Promise<TaxonomyTermInfo>;
449
+ addEntryTerms(collection: string, entryId: string, taxonomy: string, termIds: string[]): Promise<TaxonomyTermInfo[]>;
450
+ removeEntryTerms(collection: string, entryId: string, taxonomy: string, termIds: string[]): Promise<TaxonomyTermInfo[]>;
451
+ }
452
+ /**
453
+ * Public byline profile returned from the byline API. Omits the linked user
454
+ * account, guest flag, and custom field values.
455
+ */
456
+ interface BylineInfo {
457
+ id: string;
458
+ slug: string;
459
+ displayName: string;
460
+ bio: string | null;
461
+ websiteUrl: string | null;
462
+ /** Media ID of the avatar image. Resolve it with `ctx.media.get()`. */
463
+ avatarMediaId: string | null;
464
+ locale: string;
465
+ /** Locale-agnostic identity shared by every translation of the byline. */
466
+ translationGroup: string;
467
+ }
468
+ /** A byline credited on a content entry. */
469
+ interface BylineCreditInfo {
470
+ byline: BylineInfo;
471
+ sortOrder: number;
472
+ roleLabel: string | null;
473
+ /**
474
+ * `explicit` for a credit assigned in the editor; `inferred` when the entry
475
+ * has no credits and the byline linked to the entry's author is used.
476
+ */
477
+ source: "explicit" | "inferred";
478
+ }
479
+ interface BylineListOptions {
480
+ /** Match one locale. Omit to list every locale. */
481
+ locale?: string;
482
+ /** Page size, clamped to 1–100. Defaults to 50. */
483
+ limit?: number;
484
+ cursor?: string;
485
+ }
486
+ /** Byline credits for one entry in a batched lookup. */
487
+ interface EntryBylineCredits {
488
+ entryId: string;
489
+ bylines: BylineCreditInfo[];
490
+ }
491
+ /**
492
+ * Byline access interface — capability-gated on `bylines:read`.
493
+ */
494
+ interface BylineAccess {
495
+ /** Get a byline by its row ID. */
496
+ get(id: string): Promise<BylineInfo | null>;
497
+ /** List bylines, newest first. */
498
+ list(options?: BylineListOptions): Promise<PaginatedResult<BylineInfo>>;
499
+ /**
500
+ * Bylines credited on up to 100 entries of one collection, in the order the
501
+ * IDs were given. Duplicate IDs are returned once. Credits resolve at each
502
+ * entry's own locale, matching what the site renders. Trashed and missing
503
+ * entries have no credits.
504
+ */
505
+ getEntriesBylines(collection: string, entryIds: string[]): Promise<EntryBylineCredits[]>;
506
+ }
507
+ type RedirectStatus = 301 | 302 | 307 | 308 | 410 | 451;
508
+ interface RedirectInfo {
509
+ id: string;
510
+ source: string;
511
+ destination: string;
512
+ type: RedirectStatus;
513
+ isPattern: boolean;
514
+ enabled: boolean;
515
+ hits: number;
516
+ lastHitAt: string | null;
517
+ groupName: string | null;
518
+ auto: boolean;
519
+ createdAt: string;
520
+ updatedAt: string;
521
+ }
522
+ interface VersionedRedirect {
523
+ redirect: RedirectInfo;
524
+ /** Opaque host revision. Pass it back unchanged for update or delete. */
525
+ _rev: string;
526
+ }
527
+ interface RedirectListOptions {
528
+ limit?: number;
529
+ cursor?: string;
530
+ search?: string;
531
+ group?: string;
532
+ enabled?: boolean;
533
+ auto?: boolean;
534
+ }
535
+ interface RedirectCreateInput {
536
+ source: string;
537
+ destination?: string;
538
+ type?: RedirectStatus;
539
+ enabled?: boolean;
540
+ groupName?: string | null;
541
+ }
542
+ interface RedirectUpdateInput {
543
+ source?: string;
544
+ destination?: string;
545
+ type?: RedirectStatus;
546
+ enabled?: boolean;
547
+ groupName?: string | null;
548
+ }
549
+ interface RedirectAccess {
550
+ list(options?: RedirectListOptions): Promise<PaginatedResult<RedirectInfo>>;
551
+ get(id: string): Promise<VersionedRedirect | null>;
552
+ create?(input: RedirectCreateInput): Promise<VersionedRedirect>;
553
+ update?(id: string, input: RedirectUpdateInput & {
554
+ _rev: string;
555
+ }): Promise<VersionedRedirect>;
556
+ delete?(id: string, options: {
557
+ _rev: string;
558
+ }): Promise<boolean>;
559
+ }
560
+ interface RedirectAccessWithWrite extends RedirectAccess {
561
+ create(input: RedirectCreateInput): Promise<VersionedRedirect>;
562
+ update(id: string, input: RedirectUpdateInput & {
563
+ _rev: string;
564
+ }): Promise<VersionedRedirect>;
565
+ delete(id: string, options: {
566
+ _rev: string;
567
+ }): Promise<boolean>;
568
+ }
569
+ /**
570
+ * Full content access with write operations
571
+ */
572
+ interface ContentAccessWithWrite extends ContentAccess {
573
+ create(collection: string, data: ContentWriteInput, options?: ContentCreateOptions): Promise<ContentItem>;
574
+ update(collection: string, id: string, data: ContentWriteInput): Promise<ContentItem>;
575
+ delete(collection: string, id: string): Promise<boolean>;
576
+ }
577
+ /**
578
+ * Media item returned from media API
579
+ */
580
+ interface MediaItem {
581
+ id: string;
582
+ filename: string;
583
+ mimeType: string;
584
+ size: number | null;
585
+ url: string;
586
+ createdAt: string;
587
+ width?: number | null;
588
+ height?: number | null;
589
+ alt?: string | null;
590
+ caption?: string | null;
591
+ focalX?: number | null;
592
+ focalY?: number | null;
593
+ blurhash?: string | null;
594
+ dominantColor?: string | null;
595
+ folderId?: string | null;
596
+ status?: "ready";
597
+ }
598
+ interface MediaBytes {
599
+ bytes: Uint8Array;
600
+ filename: string;
601
+ mimeType: string;
602
+ size: number;
603
+ contentHash?: string;
604
+ }
605
+ interface MediaMetadataPatch {
606
+ alt?: string | null;
607
+ caption?: string | null;
608
+ focalX?: number | null;
609
+ focalY?: number | null;
610
+ }
611
+ /**
612
+ * Media list options
613
+ */
614
+ interface MediaListOptions {
615
+ limit?: number;
616
+ cursor?: string;
617
+ mimeType?: string;
618
+ }
619
+ /**
620
+ * Media access interface - capability-gated
621
+ */
622
+ interface MediaAccess {
623
+ get(id: string): Promise<MediaItem | null>;
624
+ list(options?: MediaListOptions): Promise<PaginatedResult<MediaItem>>;
625
+ /** Read ready media bytes, bounded by the caller's limit and the host maximum. */
626
+ readBytes?(id: string, options?: {
627
+ maxBytes?: number;
628
+ }): Promise<MediaBytes>;
629
+ /** Change only alt text, caption, or the complete focal-point pair. */
630
+ updateMetadata?(id: string, patch: MediaMetadataPatch): Promise<MediaItem>;
631
+ getUploadUrl?(filename: string, contentType: string): Promise<{
632
+ uploadUrl: string;
633
+ mediaId: string;
634
+ }>;
635
+ /**
636
+ * Upload media bytes directly. Preferred in sandboxed mode where
637
+ * plugins cannot make external requests to a presigned URL.
638
+ * Returns the created media item.
639
+ */
640
+ upload?(filename: string, contentType: string, bytes: ArrayBuffer): Promise<{
641
+ mediaId: string;
642
+ storageKey: string;
643
+ url: string;
644
+ }>;
645
+ delete?(id: string): Promise<boolean>;
646
+ }
647
+ /**
648
+ * Full media access with write operations
649
+ */
650
+ interface MediaAccessWithWrite extends MediaAccess {
651
+ getUploadUrl(filename: string, contentType: string): Promise<{
652
+ uploadUrl: string;
653
+ mediaId: string;
654
+ }>;
655
+ upload(filename: string, contentType: string, bytes: ArrayBuffer): Promise<{
656
+ mediaId: string;
657
+ storageKey: string;
658
+ url: string;
659
+ }>;
660
+ delete(id: string): Promise<boolean>;
661
+ }
662
+ /**
663
+ * HTTP client interface - requires network:request capability
664
+ */
665
+ interface HttpAccess {
666
+ /**
667
+ * Fetch an allowed external URL and return a buffered response.
668
+ * Decoded request and response bodies are each limited to 8 MiB.
669
+ */
670
+ fetch(url: string, init?: RequestInit): Promise<Response>;
671
+ }
672
+ /**
673
+ * Logger interface - always available
674
+ */
675
+ interface LogAccess {
676
+ debug(message: string, data?: unknown): void;
677
+ info(message: string, data?: unknown): void;
678
+ warn(message: string, data?: unknown): void;
679
+ error(message: string, data?: unknown): void;
680
+ }
681
+ /**
682
+ * Site information available to all plugins
683
+ */
684
+ interface SiteInfo {
685
+ /** Site name (from settings) */
686
+ name: string;
687
+ /** Site URL (from settings or request) */
688
+ url: string;
689
+ /** Site locale (from settings, defaults to "en") */
690
+ locale: string;
691
+ /**
692
+ * Astro's `trailingSlash` routing policy, from the host's Astro config.
693
+ * Plugins that build absolute URLs (sitemap, canonical, hreflang) should
694
+ * honor this so the URLs they emit match what the site serves. `createSiteInfo`
695
+ * always populates it (defaulting to `"ignore"`, Astro's default); it is
696
+ * optional on the type so pre-existing `SiteInfo` construction stays valid.
697
+ */
698
+ trailingSlash?: "always" | "never" | "ignore";
699
+ }
700
+ /**
701
+ * Read-only user information exposed to plugins.
702
+ * Sensitive fields (password hashes, sessions, passkeys) are excluded.
703
+ */
704
+ interface UserInfo {
705
+ id: string;
706
+ email: string;
707
+ name: string | null;
708
+ role: number;
709
+ createdAt: string;
710
+ }
711
+ /**
712
+ * User access interface - requires read:users capability
713
+ */
714
+ interface UserAccess {
715
+ /** Get a user by ID */
716
+ get(id: string): Promise<UserInfo | null>;
717
+ /** Get a user by email */
718
+ getByEmail(email: string): Promise<UserInfo | null>;
719
+ /** List users with optional filters */
720
+ list(opts?: {
721
+ role?: number;
722
+ limit?: number;
723
+ cursor?: string;
724
+ }): Promise<{
725
+ items: UserInfo[];
726
+ nextCursor?: string;
727
+ }>;
728
+ }
729
+ type PluginCommentStatus = "approved" | "pending" | "spam";
730
+ /** Comment data exposed by the explicit personal-data `comments:read` capability. */
731
+ interface PluginComment {
732
+ id: string;
733
+ collection: string;
734
+ contentId: string;
735
+ parentId: string | null;
736
+ authorName: string;
737
+ authorEmail: string;
738
+ body: string;
739
+ status: PluginCommentStatus;
740
+ ipHash: string | null;
741
+ userAgent: string | null;
742
+ moderationMetadata: Record<string, unknown> | null;
743
+ createdAt: string;
744
+ updatedAt: string;
745
+ }
746
+ interface CommentListOptions {
747
+ status?: PluginCommentStatus;
748
+ collection?: string;
749
+ contentId?: string;
750
+ limit?: number;
751
+ cursor?: string;
752
+ }
753
+ interface CommentCountOptions {
754
+ status?: PluginCommentStatus;
755
+ collection?: string;
756
+ contentId?: string;
757
+ }
758
+ interface CommentAccess {
759
+ get(id: string): Promise<PluginComment | null>;
760
+ list(options?: CommentListOptions): Promise<PaginatedResult<PluginComment>>;
761
+ count(options?: CommentCountOptions): Promise<number>;
762
+ setStatus?(id: string, status: PluginCommentStatus, options: {
763
+ expectedStatus: PluginCommentStatus;
764
+ }): Promise<PluginComment>;
765
+ }
766
+ /**
767
+ * The unified plugin context - same shape for all hooks and routes
768
+ */
769
+ interface PluginContext<TStorage extends PluginStorageConfig = PluginStorageConfig> {
770
+ /** Plugin metadata */
771
+ plugin: {
772
+ id: string;
773
+ version: string;
774
+ };
775
+ /** Storage collections - only if plugin declares storage */
776
+ storage: PluginStorage<TStorage>;
777
+ /** Key-value store for internal state */
778
+ kv: KVAccess;
779
+ /** Plugin settings. Secret schema fields are encrypted by the host. */
780
+ settings: SettingsAccess;
781
+ /** Content access - only if read:content or write:content capability */
782
+ content?: ContentAccess | ContentAccessWithWrite;
783
+ /** Schema discovery - only if schema:read capability */
784
+ schema?: SchemaAccess;
785
+ /** Taxonomy access - only if a taxonomy capability is declared. */
786
+ taxonomies?: TaxonomyAccess | TaxonomyAccessWithWrite;
787
+ /** Byline access - only if bylines:read capability */
788
+ bylines?: BylineAccess;
789
+ /** Redirect access - only if redirects:read or redirects:write capability */
790
+ redirects?: RedirectAccess | RedirectAccessWithWrite;
791
+ /** Media access - only if read:media or write:media capability */
792
+ media?: MediaAccess | MediaAccessWithWrite;
793
+ /** HTTP client - only if network:request capability */
794
+ http?: HttpAccess;
795
+ /** Logger - always available */
796
+ log: LogAccess;
797
+ /** Site information - always available */
798
+ site: SiteInfo;
799
+ /** URL helper - generates absolute URLs from paths. Always available. */
800
+ url(path: string): string;
801
+ /** User access - only if read:users capability */
802
+ users?: UserAccess;
803
+ /** Comment access — only if comments:read or comments:moderate is declared. */
804
+ comments?: CommentAccess;
805
+ /** Cron task scheduling - always available, scoped to plugin */
806
+ cron?: CronAccess;
807
+ /** Email access - only if email:send capability and a provider is configured */
808
+ email?: EmailAccess;
809
+ }
810
+ /**
811
+ * Cron access interface �� always available on plugin context, scoped to plugin.
812
+ */
813
+ interface CronAccess {
814
+ /** Schedule a recurring or one-shot task */
815
+ schedule(name: string, opts: {
816
+ schedule: string;
817
+ data?: Record<string, unknown>;
818
+ }): Promise<void>;
819
+ /** Cancel a scheduled task */
820
+ cancel(name: string): Promise<void>;
821
+ /** List this plugin's scheduled tasks */
822
+ list(): Promise<CronTaskInfo[]>;
823
+ }
824
+ /**
825
+ * Task info returned from CronAccess.list()
826
+ */
827
+ interface CronTaskInfo {
828
+ name: string;
829
+ schedule: string;
830
+ nextRunAt: string;
831
+ lastRunAt: string | null;
832
+ }
833
+ /**
834
+ * Event passed to the `cron` hook handler
835
+ */
836
+ interface CronEvent {
837
+ name: string;
838
+ data?: Record<string, unknown>;
839
+ scheduledAt: string;
840
+ }
841
+ /**
842
+ * Cron hook handler type
843
+ */
844
+ type CronHandler = (event: CronEvent, ctx: PluginContext) => Promise<void>;
845
+ /**
846
+ * Email access interface — requires `email:send` capability.
847
+ * Undefined when no `email:deliver` provider is configured.
848
+ *
849
+ * Related capabilities:
850
+ * - `email:send` — grants ctx.email (this interface)
851
+ * - `email:provide` — allows registering the `email:deliver` exclusive hook
852
+ * - `email:intercept` — allows registering `email:beforeSend` / `email:afterSend` hooks
853
+ */
854
+ interface EmailAccess {
855
+ send(message: EmailMessage): Promise<void>;
856
+ }
857
+ /**
858
+ * Email message shape
859
+ */
860
+ interface EmailMessage {
861
+ to: string;
862
+ /** Additional visible recipients. */
863
+ cc?: string[];
864
+ /** Address that replies go to instead of the sender. */
865
+ replyTo?: string;
866
+ subject: string;
867
+ text: string;
868
+ html?: string;
869
+ }
870
+ /**
871
+ * Event passed to email:beforeSend hooks (middleware — transform, validate, cancel)
872
+ */
873
+ interface EmailBeforeSendEvent {
874
+ message: EmailMessage;
875
+ /** Where the email originated — "system" for auth emails, plugin ID for plugin emails */
876
+ source: string;
877
+ }
878
+ /**
879
+ * Event passed to email:deliver hook (exclusive — exactly one provider delivers)
880
+ */
881
+ interface EmailDeliverEvent {
882
+ message: EmailMessage;
883
+ source: string;
884
+ }
885
+ /**
886
+ * Event passed to email:afterSend hooks (logging, analytics, fire-and-forget)
887
+ */
888
+ interface EmailAfterSendEvent {
889
+ message: EmailMessage;
890
+ source: string;
891
+ }
892
+ /**
893
+ * Handler type for email:beforeSend hooks.
894
+ * Returns modified message, or false to cancel delivery.
895
+ */
896
+ type EmailBeforeSendHandler = (event: EmailBeforeSendEvent, ctx: PluginContext) => Promise<EmailMessage | false>;
897
+ /**
898
+ * Handler type for email:deliver hooks (exclusive provider).
899
+ */
900
+ type EmailDeliverHandler = (event: EmailDeliverEvent, ctx: PluginContext) => Promise<void>;
901
+ /**
902
+ * Handler type for email:afterSend hooks (fire-and-forget).
903
+ */
904
+ type EmailAfterSendHandler = (event: EmailAfterSendEvent, ctx: PluginContext) => Promise<void>;
905
+ /**
906
+ * Collection comment settings (read from _emdash_collections)
907
+ */
908
+ interface CollectionCommentSettings {
909
+ commentsEnabled: boolean;
910
+ commentsModeration: "all" | "first_time" | "none";
911
+ commentsClosedAfterDays: number;
912
+ commentsAutoApproveUsers: boolean;
913
+ }
914
+ /**
915
+ * Event passed to comment:beforeCreate hooks (middleware — transform, enrich, reject)
916
+ */
917
+ interface CommentBeforeCreateEvent {
918
+ comment: {
919
+ collection: string;
920
+ contentId: string;
921
+ parentId: string | null;
922
+ authorName: string;
923
+ authorEmail: string;
924
+ authorUserId: string | null;
925
+ body: string;
926
+ ipHash: string | null;
927
+ userAgent: string | null;
928
+ };
929
+ /** Metadata bag — plugins can attach signals for the moderator */
930
+ metadata: Record<string, unknown>;
931
+ }
932
+ /**
933
+ * Event passed to comment:moderate hook (exclusive — decides initial status)
934
+ */
935
+ interface CommentModerateEvent {
936
+ comment: CommentBeforeCreateEvent["comment"];
937
+ metadata: Record<string, unknown>;
938
+ collectionSettings: CollectionCommentSettings;
939
+ /** Number of prior approved comments from this email address */
940
+ priorApprovedCount: number;
941
+ }
942
+ /**
943
+ * Moderation decision returned by the comment:moderate handler
944
+ */
945
+ interface ModerationDecision {
946
+ status: "approved" | "pending" | "spam";
947
+ /** Optional reason for admin visibility */
948
+ reason?: string;
949
+ }
950
+ /**
951
+ * Stored comment shape (full record with id, status, timestamps)
952
+ */
953
+ interface StoredComment {
954
+ id: string;
955
+ collection: string;
956
+ contentId: string;
957
+ parentId: string | null;
958
+ authorName: string;
959
+ authorEmail: string;
960
+ authorUserId: string | null;
961
+ body: string;
962
+ status: string;
963
+ moderationMetadata: Record<string, unknown> | null;
964
+ createdAt: string;
965
+ updatedAt: string;
966
+ }
967
+ /**
968
+ * Event passed to comment:afterCreate hooks (fire-and-forget)
969
+ */
970
+ interface CommentAfterCreateEvent {
971
+ comment: StoredComment;
972
+ metadata: Record<string, unknown>;
973
+ /** The content item the comment is on */
974
+ content: {
975
+ id: string;
976
+ collection: string;
977
+ slug: string;
978
+ title?: string;
979
+ };
980
+ /** The content author (for notifications) */
981
+ contentAuthor?: {
982
+ id: string;
983
+ name: string | null;
984
+ email: string;
985
+ };
986
+ }
987
+ /**
988
+ * Event passed to comment:afterModerate hooks (fire-and-forget, admin status change)
989
+ */
990
+ interface CommentAfterModerateEvent {
991
+ comment: StoredComment;
992
+ previousStatus: string;
993
+ newStatus: string;
994
+ /** The admin who moderated */
995
+ moderator: {
996
+ id: string;
997
+ name: string | null;
998
+ };
999
+ /** Identifies whether an administrator or a plugin initiated the transition. */
1000
+ origin?: {
1001
+ source: "admin";
1002
+ userId: string;
1003
+ } | {
1004
+ source: "plugin";
1005
+ pluginId: string;
1006
+ };
1007
+ }
1008
+ /**
1009
+ * Handler type for comment:beforeCreate hooks.
1010
+ * Returns modified event, or false to reject the comment.
1011
+ */
1012
+ type CommentBeforeCreateHandler = (event: CommentBeforeCreateEvent, ctx: PluginContext) => Promise<CommentBeforeCreateEvent | false | void>;
1013
+ /**
1014
+ * Handler type for comment:moderate hook (exclusive provider).
1015
+ */
1016
+ type CommentModerateHandler = (event: CommentModerateEvent, ctx: PluginContext) => Promise<ModerationDecision>;
1017
+ /**
1018
+ * Handler type for comment:afterCreate hooks (fire-and-forget).
1019
+ */
1020
+ type CommentAfterCreateHandler = (event: CommentAfterCreateEvent, ctx: PluginContext) => Promise<void>;
1021
+ /**
1022
+ * Handler type for comment:afterModerate hooks (fire-and-forget).
1023
+ */
1024
+ type CommentAfterModerateHandler = (event: CommentAfterModerateEvent, ctx: PluginContext) => Promise<void>;
1025
+ /**
1026
+ * Hook configuration
1027
+ */
1028
+ interface HookConfig<THandler> {
1029
+ /** Explicit ordering - lower numbers run first (default: 100) */
1030
+ priority?: number;
1031
+ /** Max execution time in ms (default: 5000) */
1032
+ timeout?: number;
1033
+ /** Run after these plugins */
1034
+ dependencies?: string[];
1035
+ /** Error handling policy */
1036
+ errorPolicy?: "continue" | "abort";
1037
+ /**
1038
+ * Mark this hook as exclusive — only one plugin can be the active provider.
1039
+ * Exclusive hooks skip the priority pipeline and dispatch only to the
1040
+ * admin-selected provider. Used for email:deliver, search, image optimization, etc.
1041
+ */
1042
+ exclusive?: boolean;
1043
+ /** The hook handler */
1044
+ handler: THandler;
1045
+ }
1046
+ /**
1047
+ * Acting user that triggered a content hook. Present for authenticated
1048
+ * saves; absent for unauthenticated or internal writes.
1049
+ */
1050
+ interface ActorInfo {
1051
+ readonly id: string;
1052
+ readonly role: number;
1053
+ readonly source?: "api" | "mcp" | "visual-editor";
1054
+ }
1055
+ type ContentActionOrigin = {
1056
+ source: "api" | "mcp" | "visual-editor";
1057
+ } | {
1058
+ source: "plugin";
1059
+ pluginId: string;
1060
+ } | {
1061
+ source: "scheduler";
1062
+ } | {
1063
+ source: "system";
1064
+ };
1065
+ type ContentPolicyDecision = void | {
1066
+ cancel: true;
1067
+ reason: string;
1068
+ };
1069
+ /**
1070
+ * Content hook event
1071
+ */
1072
+ interface ContentHookEvent {
1073
+ content: Record<string, unknown>;
1074
+ collection: string;
1075
+ isNew: boolean;
1076
+ /**
1077
+ * ID of the existing item on `content:beforeSave` for an update. Absent on
1078
+ * creates, where the ID is assigned when the save completes, and on
1079
+ * `content:afterSave`, where `content.id` carries it.
1080
+ */
1081
+ id?: string;
1082
+ /**
1083
+ * The acting user for this save. Carries the same authenticated identity
1084
+ * used to set the revision author, so plugins (e.g. audit logs) can record
1085
+ * who made the change.
1086
+ */
1087
+ actor?: ActorInfo;
1088
+ /**
1089
+ * Locale of the entry being saved: the resolved target locale on a create,
1090
+ * the stored entry's locale on an update.
1091
+ */
1092
+ locale?: string;
1093
+ /**
1094
+ * ID of the source entry when a create comes from the translation flow.
1095
+ * Absent on updates and on creates that start a new translation group.
1096
+ */
1097
+ translationOf?: string;
1098
+ }
1099
+ /** Locale details a save passes to its `content:beforeSave` and `content:afterSave` hooks. */
1100
+ interface ContentSaveHookDetails {
1101
+ locale?: string;
1102
+ translationOf?: string;
1103
+ }
1104
+ /**
1105
+ * Content delete hook event
1106
+ */
1107
+ interface ContentDeleteEvent {
1108
+ id: string;
1109
+ collection: string;
1110
+ /** `true` when the content is permanently deleted (not just trashed). */
1111
+ permanent: boolean;
1112
+ }
1113
+ /**
1114
+ * Content state-change hook event (fired after publish, unpublish, restore,
1115
+ * schedule, or unschedule).
1116
+ */
1117
+ interface ContentStateChangeEvent {
1118
+ content: Record<string, unknown>;
1119
+ collection: string;
1120
+ }
1121
+ /**
1122
+ * Content publish/unpublish hook event.
1123
+ */
1124
+ type ContentPublishStateChangeEvent = ContentStateChangeEvent;
1125
+ /**
1126
+ * Content restore hook event.
1127
+ */
1128
+ type ContentRestoreStateChangeEvent = ContentStateChangeEvent;
1129
+ /**
1130
+ * Content schedule/unschedule hook event.
1131
+ */
1132
+ type ContentScheduleStateChangeEvent = ContentStateChangeEvent;
1133
+ interface ContentPolicyEvent extends ContentStateChangeEvent {
1134
+ origin: ContentActionOrigin;
1135
+ actor?: ActorInfo;
1136
+ }
1137
+ interface ContentSchedulePolicyEvent extends ContentPolicyEvent {
1138
+ scheduledAt: string;
1139
+ }
1140
+ /**
1141
+ * Media hook event
1142
+ */
1143
+ interface MediaUploadEvent {
1144
+ file: {
1145
+ name: string;
1146
+ type: string;
1147
+ size: number;
1148
+ };
1149
+ }
1150
+ /**
1151
+ * Media after upload event
1152
+ */
1153
+ interface MediaAfterUploadEvent {
1154
+ media: MediaItem;
1155
+ }
1156
+ /**
1157
+ * Lifecycle hook event
1158
+ */
1159
+ interface LifecycleEvent {}
1160
+ /**
1161
+ * Uninstall hook event
1162
+ */
1163
+ interface UninstallEvent {
1164
+ deleteData: boolean;
1165
+ }
1166
+ type ContentBeforeSaveHandler = (event: ContentHookEvent, ctx: PluginContext) => Promise<Record<string, unknown> | void>;
1167
+ type ContentAfterSaveHandler = (event: ContentHookEvent, ctx: PluginContext) => Promise<void>;
1168
+ type ContentBeforeDeleteHandler = (event: ContentDeleteEvent, ctx: PluginContext) => Promise<boolean | void>;
1169
+ type ContentAfterDeleteHandler = (event: ContentDeleteEvent, ctx: PluginContext) => Promise<void>;
1170
+ type ContentBeforePublishHandler = (event: ContentPolicyEvent, ctx: PluginContext) => Promise<ContentPolicyDecision>;
1171
+ type ContentBeforeScheduleHandler = (event: ContentSchedulePolicyEvent, ctx: PluginContext) => Promise<ContentPolicyDecision>;
1172
+ type ContentBeforeUnpublishHandler = (event: ContentPolicyEvent, ctx: PluginContext) => Promise<ContentPolicyDecision>;
1173
+ type ContentAfterPublishHandler = (event: ContentPublishStateChangeEvent, ctx: PluginContext) => Promise<void>;
1174
+ type ContentAfterUnpublishHandler = (event: ContentPublishStateChangeEvent, ctx: PluginContext) => Promise<void>;
1175
+ type ContentAfterRestoreHandler = (event: ContentRestoreStateChangeEvent, ctx: PluginContext) => Promise<void>;
1176
+ type ContentAfterScheduleHandler = (event: ContentScheduleStateChangeEvent, ctx: PluginContext) => Promise<void>;
1177
+ type ContentAfterUnscheduleHandler = (event: ContentScheduleStateChangeEvent, ctx: PluginContext) => Promise<void>;
1178
+ /**
1179
+ * Event for `byline:afterSave`, fired after a byline profile or one of its
1180
+ * locale translations is created or updated.
1181
+ */
1182
+ interface BylineAfterSaveEvent {
1183
+ byline: BylineInfo;
1184
+ isNew: boolean;
1185
+ }
1186
+ /**
1187
+ * Event for `byline:afterDelete`, fired after a byline row is deleted. When it
1188
+ * was the last locale of its translation group, its credits have already been
1189
+ * removed from every entry.
1190
+ */
1191
+ interface BylineAfterDeleteEvent {
1192
+ byline: BylineInfo;
1193
+ }
1194
+ type BylineAfterSaveHandler = (event: BylineAfterSaveEvent, ctx: PluginContext) => Promise<void>;
1195
+ type BylineAfterDeleteHandler = (event: BylineAfterDeleteEvent, ctx: PluginContext) => Promise<void>;
1196
+ type MediaBeforeUploadHandler = (event: MediaUploadEvent, ctx: PluginContext) => Promise<{
1197
+ name: string;
1198
+ type: string;
1199
+ size: number;
1200
+ } | void>;
1201
+ type MediaAfterUploadHandler = (event: MediaAfterUploadEvent, ctx: PluginContext) => Promise<void>;
1202
+ type LifecycleHandler = (event: LifecycleEvent, ctx: PluginContext) => Promise<void>;
1203
+ type UninstallHandler = (event: UninstallEvent, ctx: PluginContext) => Promise<void>;
1204
+ /** Placement targets for page fragment contributions */
1205
+ type PagePlacement = "head" | "body:start" | "body:end";
1206
+ /**
1207
+ * A single breadcrumb trail item. Used by `PublicPageContext.breadcrumbs`
1208
+ * so themes can publish breadcrumb trails that SEO plugins consume.
1209
+ */
1210
+ interface BreadcrumbItem {
1211
+ /** Display name for this crumb (e.g. "Home", "Blog", "My Post"). */
1212
+ name: string;
1213
+ /** Absolute or root-relative URL for this crumb. */
1214
+ url: string;
1215
+ }
1216
+ /**
1217
+ * Describes the page being rendered. Passed to page hooks so plugins
1218
+ * can decide what to contribute without fetching content themselves.
1219
+ */
1220
+ interface PublicPageContext {
1221
+ url: string;
1222
+ path: string;
1223
+ locale: string | null;
1224
+ kind: "content" | "custom";
1225
+ pageType: string;
1226
+ /** Full document title for the rendered page */
1227
+ title: string | null;
1228
+ /** Page-only title for OG/Twitter/JSON-LD headline output */
1229
+ pageTitle?: string | null;
1230
+ description: string | null;
1231
+ canonical: string | null;
1232
+ image: string | null;
1233
+ content?: {
1234
+ collection: string;
1235
+ id: string;
1236
+ slug: string | null;
1237
+ };
1238
+ /** SEO meta for base metadata generation in EmDashHead */
1239
+ seo?: {
1240
+ ogTitle?: string | null;
1241
+ ogDescription?: string | null;
1242
+ ogImage?: string | null;
1243
+ robots?: string | null;
1244
+ };
1245
+ /** Article metadata for Open Graph article: tags */
1246
+ articleMeta?: {
1247
+ publishedTime?: string | null;
1248
+ modifiedTime?: string | null;
1249
+ author?: string | null;
1250
+ };
1251
+ /** Site name for structured data and og:site_name */
1252
+ siteName?: string;
1253
+ /**
1254
+ * Optional breadcrumb trail for this page, root first. When set,
1255
+ * SEO plugins should use this verbatim rather than deriving a trail
1256
+ * from `path`. Themes typically populate this at the point they
1257
+ * build the context (e.g. from a content hierarchy walk, taxonomy
1258
+ * lookup, or per-`pageType` routing logic).
1259
+ *
1260
+ * Semantics for consumers:
1261
+ * - `undefined` — theme has no opinion; consumer falls back to
1262
+ * its own derivation.
1263
+ * - `[]` — this page has no breadcrumbs (e.g. homepage); consumer
1264
+ * should skip `BreadcrumbList` emission entirely.
1265
+ * - Non-empty array — used verbatim for `BreadcrumbList` output.
1266
+ */
1267
+ breadcrumbs?: BreadcrumbItem[];
1268
+ /** Public-facing site URL (origin) for structured data */
1269
+ siteUrl?: string;
1270
+ }
1271
+ interface PageMetadataEvent {
1272
+ page: PublicPageContext;
1273
+ }
1274
+ /**
1275
+ * Allowed rel values for link contributions.
1276
+ * This is a security-critical allowlist -- sandboxed plugins can only inject
1277
+ * link tags with these rel values. Adding "stylesheet", "prefetch", "prerender"
1278
+ * etc. would allow sandboxed plugins to inject external resources.
1279
+ */
1280
+ type PageMetadataLinkRel = "canonical" | "alternate" | "author" | "license" | "nlweb" | "site.standard.document";
1281
+ type PageMetadataContribution = {
1282
+ kind: "meta";
1283
+ name: string;
1284
+ content: string;
1285
+ key?: string;
1286
+ } | {
1287
+ kind: "property";
1288
+ property: string;
1289
+ content: string;
1290
+ key?: string;
1291
+ } | {
1292
+ kind: "link";
1293
+ rel: PageMetadataLinkRel;
1294
+ href: string;
1295
+ hreflang?: string;
1296
+ key?: string;
1297
+ } | {
1298
+ kind: "jsonld";
1299
+ id?: string;
1300
+ graph: Record<string, unknown> | Array<Record<string, unknown>>;
1301
+ };
1302
+ type PageMetadataHandler = (event: PageMetadataEvent, ctx: PluginContext) => PageMetadataContribution | PageMetadataContribution[] | null | Promise<PageMetadataContribution | PageMetadataContribution[] | null>;
1303
+ interface PageFragmentEvent {
1304
+ page: PublicPageContext;
1305
+ }
1306
+ type PageFragmentContribution = {
1307
+ kind: "external-script";
1308
+ placement: PagePlacement;
1309
+ src: string;
1310
+ async?: boolean;
1311
+ defer?: boolean;
1312
+ attributes?: Record<string, string>;
1313
+ key?: string;
1314
+ } | {
1315
+ kind: "inline-script";
1316
+ placement: PagePlacement;
1317
+ code: string;
1318
+ attributes?: Record<string, string>;
1319
+ key?: string;
1320
+ } | {
1321
+ kind: "html";
1322
+ placement: PagePlacement;
1323
+ html: string;
1324
+ key?: string;
1325
+ };
1326
+ type PageFragmentHandler = (event: PageFragmentEvent, ctx: PluginContext) => PageFragmentContribution | PageFragmentContribution[] | null | Promise<PageFragmentContribution | PageFragmentContribution[] | null>;
1327
+ /**
1328
+ * Plugin hooks definition
1329
+ */
1330
+ interface PluginHooks {
1331
+ "plugin:install"?: HookConfig<LifecycleHandler> | LifecycleHandler;
1332
+ "plugin:activate"?: HookConfig<LifecycleHandler> | LifecycleHandler;
1333
+ "plugin:deactivate"?: HookConfig<LifecycleHandler> | LifecycleHandler;
1334
+ "plugin:uninstall"?: HookConfig<UninstallHandler> | UninstallHandler;
1335
+ "content:beforeSave"?: HookConfig<ContentBeforeSaveHandler> | ContentBeforeSaveHandler;
1336
+ "content:afterSave"?: HookConfig<ContentAfterSaveHandler> | ContentAfterSaveHandler;
1337
+ "content:beforeDelete"?: HookConfig<ContentBeforeDeleteHandler> | ContentBeforeDeleteHandler;
1338
+ "content:afterDelete"?: HookConfig<ContentAfterDeleteHandler> | ContentAfterDeleteHandler;
1339
+ "content:beforePublish"?: HookConfig<ContentBeforePublishHandler> | ContentBeforePublishHandler;
1340
+ "content:beforeSchedule"?: HookConfig<ContentBeforeScheduleHandler> | ContentBeforeScheduleHandler;
1341
+ "content:beforeUnpublish"?: HookConfig<ContentBeforeUnpublishHandler> | ContentBeforeUnpublishHandler;
1342
+ "content:afterPublish"?: HookConfig<ContentAfterPublishHandler> | ContentAfterPublishHandler;
1343
+ "content:afterUnpublish"?: HookConfig<ContentAfterUnpublishHandler> | ContentAfterUnpublishHandler;
1344
+ "content:afterRestore"?: HookConfig<ContentAfterRestoreHandler> | ContentAfterRestoreHandler;
1345
+ "content:afterSchedule"?: HookConfig<ContentAfterScheduleHandler> | ContentAfterScheduleHandler;
1346
+ "content:afterUnschedule"?: HookConfig<ContentAfterUnscheduleHandler> | ContentAfterUnscheduleHandler;
1347
+ "media:beforeUpload"?: HookConfig<MediaBeforeUploadHandler> | MediaBeforeUploadHandler;
1348
+ "media:afterUpload"?: HookConfig<MediaAfterUploadHandler> | MediaAfterUploadHandler;
1349
+ cron?: HookConfig<CronHandler> | CronHandler;
1350
+ "email:beforeSend"?: HookConfig<EmailBeforeSendHandler> | EmailBeforeSendHandler;
1351
+ "email:deliver"?: HookConfig<EmailDeliverHandler> | EmailDeliverHandler;
1352
+ "email:afterSend"?: HookConfig<EmailAfterSendHandler> | EmailAfterSendHandler;
1353
+ "comment:beforeCreate"?: HookConfig<CommentBeforeCreateHandler> | CommentBeforeCreateHandler;
1354
+ "comment:moderate"?: HookConfig<CommentModerateHandler> | CommentModerateHandler;
1355
+ "comment:afterCreate"?: HookConfig<CommentAfterCreateHandler> | CommentAfterCreateHandler;
1356
+ "comment:afterModerate"?: HookConfig<CommentAfterModerateHandler> | CommentAfterModerateHandler;
1357
+ "byline:afterSave"?: HookConfig<BylineAfterSaveHandler> | BylineAfterSaveHandler;
1358
+ "byline:afterDelete"?: HookConfig<BylineAfterDeleteHandler> | BylineAfterDeleteHandler;
1359
+ "page:metadata"?: HookConfig<PageMetadataHandler> | PageMetadataHandler;
1360
+ "page:fragments"?: HookConfig<PageFragmentHandler> | PageFragmentHandler;
1361
+ }
1362
+ /**
1363
+ * Hook names
1364
+ */
1365
+ /**
1366
+ * Hook name in a manifest. Core's exhaustive union of recognised hook names,
1367
+ * derived from the `PluginHooks` registry. The serialised manifest carries
1368
+ * these as opaque strings; this stricter type is only used for type-checking
1369
+ * inside core. `ManifestHookEntry` is re-exported from
1370
+ * `@emdash-cms/plugin-types` near the top of this file.
1371
+ */
1372
+ type HookName = keyof PluginHooks;
1373
+ /**
1374
+ * Resolved hook with normalized config
1375
+ */
1376
+ interface ResolvedHook<THandler> {
1377
+ priority: number;
1378
+ timeout: number;
1379
+ dependencies: string[];
1380
+ errorPolicy: "continue" | "abort";
1381
+ /** Whether this hook is exclusive (provider pattern) */
1382
+ exclusive: boolean;
1383
+ handler: THandler;
1384
+ pluginId: string;
1385
+ }
1386
+ /**
1387
+ * Geographic location information derived from the request.
1388
+ * Available when running on Cloudflare Workers (via the `cf` object).
1389
+ */
1390
+ interface GeoInfo {
1391
+ country: string | null;
1392
+ region: string | null;
1393
+ city: string | null;
1394
+ }
1395
+ /**
1396
+ * Normalized request metadata available to plugin route handlers.
1397
+ * Extracted from request headers and platform-specific properties.
1398
+ */
1399
+ interface RequestMeta {
1400
+ ip: string | null;
1401
+ userAgent: string | null;
1402
+ referer: string | null;
1403
+ geo: GeoInfo | null;
1404
+ }
1405
+ /**
1406
+ * Route handler context extends plugin context with request-specific data
1407
+ */
1408
+ interface RouteContext<TInput = unknown> extends PluginContext {
1409
+ /** Validated input from request body */
1410
+ input: TInput;
1411
+ /** Original request */
1412
+ request: Request;
1413
+ /** Normalized request metadata (IP, user agent, geo) */
1414
+ requestMeta: RequestMeta;
1415
+ /** Host-attested context for a validated Block Kit request. */
1416
+ ui?: PluginUiContext;
1417
+ /**
1418
+ * Authenticated caller, if the route is private. The host has already
1419
+ * authenticated and authorized this user before dispatch, so the value
1420
+ * is trustworthy — unlike a user id read from the request body.
1421
+ *
1422
+ * `undefined` for public routes (which skip auth entirely) and for
1423
+ * token-authed requests where no user is bound to the token.
1424
+ *
1425
+ * Not gated by the `users:read` capability: this is the caller's own
1426
+ * identity for the current request, not a user directory lookup.
1427
+ */
1428
+ user?: UserInfo;
1429
+ }
1430
+ /**
1431
+ * Route definition
1432
+ */
1433
+ interface PluginRoute<TInput = unknown> extends Omit<RouteOptions, "request"> {
1434
+ /** Zod schema for input validation */
1435
+ input?: z.ZodType<TInput>;
1436
+ /**
1437
+ * Mark this route as publicly accessible (no authentication required).
1438
+ * Public routes skip session/token auth and CSRF checks.
1439
+ */
1440
+ public?: boolean;
1441
+ /** RBAC permission required to invoke the route. Legacy routes default to plugins:manage. */
1442
+ permission?: Permission;
1443
+ /**
1444
+ * `Cache-Control` header value for successful GET responses, e.g.
1445
+ * `"public, max-age=60, stale-while-revalidate=300"`. Only honored on
1446
+ * routes that are also `public: true` — authenticated responses always
1447
+ * keep the default `private, no-store`. Errors are never cached.
1448
+ */
1449
+ cacheControl?: string;
1450
+ /** Bounded request parsing and incoming-header declaration. */
1451
+ request?: PluginRouteRequest;
1452
+ /** Route handler */
1453
+ handler: {
1454
+ bivarianceHack(ctx: RouteContext<TInput>): Promise<unknown>;
1455
+ }["bivarianceHack"];
1456
+ }
1457
+ type PluginRouteInput<TMode extends PluginRouteBodyMode> = TMode extends "none" ? PluginRouteQuery : TMode extends "text" ? string : TMode extends "bytes" ? Uint8Array : TMode extends "form-data" ? PluginFormData : unknown;
1458
+ type PluginRouteDefinition<TMode extends PluginRouteBodyMode = PluginRouteBodyMode> = Omit<PluginRoute<PluginRouteInput<TMode>>, "request"> & {
1459
+ request: PluginRouteRequest & {
1460
+ body: TMode;
1461
+ };
1462
+ };
1463
+ interface PluginMcpToolDefinition {
1464
+ description: string;
1465
+ route: string;
1466
+ input: z.ZodType;
1467
+ output?: z.ZodType;
1468
+ destructive?: boolean;
1469
+ }
1470
+ interface PluginMcpConfig {
1471
+ tools: Record<string, PluginMcpToolDefinition>;
1472
+ }
1473
+ /**
1474
+ * Admin page definition
1475
+ */
1476
+ interface PluginAdminPage {
1477
+ path: string;
1478
+ label: string;
1479
+ icon?: string;
1480
+ /**
1481
+ * Admin sidebar folder. Pages sharing a group with a collection shown in
1482
+ * the sidebar join that folder; pages with any other group share a folder
1483
+ * with that label in the Plugins section, across plugins.
1484
+ */
1485
+ group?: string;
1486
+ }
1487
+ /**
1488
+ * Dashboard widget definition
1489
+ */
1490
+ interface PluginDashboardWidget {
1491
+ id: string;
1492
+ size?: "full" | "half" | "third";
1493
+ title?: string;
1494
+ }
1495
+ interface PluginEditorPanel {
1496
+ id: string;
1497
+ title: string;
1498
+ route: string;
1499
+ collections?: string[];
1500
+ order?: number;
1501
+ draft?: PluginEditorDraftAccess;
1502
+ }
1503
+ interface PluginEditorAction {
1504
+ id: string;
1505
+ label: string;
1506
+ route: string;
1507
+ placement: "toolbar" | "overflow";
1508
+ collections?: string[];
1509
+ style?: "default" | "danger";
1510
+ confirm?: ConfirmDialog;
1511
+ draft?: PluginEditorDraftAccess;
1512
+ }
1513
+ /**
1514
+ * Settings field types (for admin UI generation)
1515
+ */
1516
+ type SettingFieldType = "string" | "number" | "boolean" | "select" | "secret" | "url" | "email";
1517
+ interface BaseSettingField {
1518
+ type: SettingFieldType;
1519
+ label: string;
1520
+ description?: string;
1521
+ }
1522
+ interface StringSettingField extends BaseSettingField {
1523
+ type: "string";
1524
+ default?: string;
1525
+ multiline?: boolean;
1526
+ }
1527
+ interface NumberSettingField extends BaseSettingField {
1528
+ type: "number";
1529
+ default?: number;
1530
+ min?: number;
1531
+ max?: number;
1532
+ }
1533
+ interface BooleanSettingField extends BaseSettingField {
1534
+ type: "boolean";
1535
+ default?: boolean;
1536
+ }
1537
+ interface SelectSettingField extends BaseSettingField {
1538
+ type: "select";
1539
+ options: Array<{
1540
+ value: string;
1541
+ label: string;
1542
+ }>;
1543
+ default?: string;
1544
+ }
1545
+ interface SecretSettingField extends BaseSettingField {
1546
+ type: "secret";
1547
+ }
1548
+ interface UrlSettingField extends BaseSettingField {
1549
+ type: "url";
1550
+ default?: string;
1551
+ placeholder?: string;
1552
+ }
1553
+ interface EmailSettingField extends BaseSettingField {
1554
+ type: "email";
1555
+ default?: string;
1556
+ placeholder?: string;
1557
+ }
1558
+ type SettingField = StringSettingField | NumberSettingField | BooleanSettingField | SelectSettingField | SecretSettingField | UrlSettingField | EmailSettingField;
1559
+ /**
1560
+ * Block Kit element for block editing fields.
1561
+ * This is the `Element` discriminated union from `@emdash-cms/blocks`.
1562
+ * Plugin authors should use `@emdash-cms/blocks` builder functions to create these.
1563
+ */
1564
+ type PortableTextBlockField = Element;
1565
+ /**
1566
+ * Configuration for a Portable Text block type contributed by a plugin
1567
+ */
1568
+ interface PortableTextBlockConfig {
1569
+ /** Block type name (must match the `_type` in Portable Text) */
1570
+ type: string;
1571
+ /** Human-readable label shown in slash commands and modals */
1572
+ label: string;
1573
+ /** Icon key (e.g., "video", "code", "link", "link-external") */
1574
+ icon?: string;
1575
+ /** Description shown in slash command menu */
1576
+ description?: string;
1577
+ /** Placeholder text for the URL input */
1578
+ placeholder?: string;
1579
+ /** Block Kit form fields for the editing UI. If declared, replaces the simple URL input. */
1580
+ fields?: PortableTextBlockField[];
1581
+ /**
1582
+ * Optional. Display category in the slash menu. Defaults to "Embeds".
1583
+ *
1584
+ * Plugin authors should pick a meaningful category that reflects what the
1585
+ * block actually is — e.g. "Sections", "Marketing", "Media", "Embeds",
1586
+ * "Layout". Blocks with the same category are grouped together in the
1587
+ * editor's slash menu.
1588
+ */
1589
+ category?: string;
1590
+ }
1591
+ /**
1592
+ * Configuration for a field widget type contributed by a plugin.
1593
+ * A field widget provides a custom editing UI for a schema field.
1594
+ * The field references the widget via `widget: "pluginId:widgetName"`.
1595
+ */
1596
+ interface FieldWidgetConfig {
1597
+ /** Widget name (without plugin ID prefix) */
1598
+ name: string;
1599
+ /** Human-readable label for the admin UI */
1600
+ label: string;
1601
+ /** Which field types this widget can edit (e.g., ["json", "string"]) */
1602
+ fieldTypes: FieldType[];
1603
+ /** Block Kit elements for sandboxed rendering. Omit for trusted plugins using React. */
1604
+ elements?: Element[];
1605
+ }
1606
+ /**
1607
+ * Admin configuration
1608
+ */
1609
+ interface PluginAdminConfig {
1610
+ /** Module specifier for admin UI exports (e.g., "@emdash-cms/plugin-audit-log/admin") */
1611
+ entry?: string;
1612
+ /** Settings schema for auto-generated UI */
1613
+ settingsSchema?: Record<string, SettingField>;
1614
+ /** Admin pages */
1615
+ pages?: PluginAdminPage[];
1616
+ /** Dashboard widgets */
1617
+ widgets?: PluginDashboardWidget[];
1618
+ /** Saved-entry Block Kit panels. */
1619
+ editorPanels?: PluginEditorPanel[];
1620
+ /** Saved-entry host-rendered actions. */
1621
+ editorActions?: PluginEditorAction[];
1622
+ /** Portable Text block types this plugin provides */
1623
+ portableTextBlocks?: PortableTextBlockConfig[];
1624
+ /** Field widget types this plugin provides */
1625
+ fieldWidgets?: FieldWidgetConfig[];
1626
+ }
1627
+ /**
1628
+ * Plugin definition - input to definePlugin()
1629
+ */
1630
+ interface PluginDefinition<TStorage extends PluginStorageConfig = PluginStorageConfig> {
1631
+ /** Unique plugin identifier */
1632
+ id: string;
1633
+ /** Plugin version (semver) */
1634
+ version: string;
1635
+ /** Declared capabilities */
1636
+ capabilities?: PluginCapability[];
1637
+ /** Allowed hosts for network:request (wildcards supported: *.example.com) */
1638
+ allowedHosts?: string[];
1639
+ /** Storage collections with indexes */
1640
+ storage?: TStorage;
1641
+ /** Hooks */
1642
+ hooks?: PluginHooks;
1643
+ /** API routes */
1644
+ routes?: Record<string, PluginRoute>;
1645
+ /** Routes explicitly exposed as agent-callable MCP tools. */
1646
+ mcp?: PluginMcpConfig;
1647
+ /** Admin UI configuration */
1648
+ admin?: PluginAdminConfig;
1649
+ }
1650
+ /**
1651
+ * Resolved plugin - after definePlugin() processing
1652
+ */
1653
+ interface ResolvedPlugin<TStorage extends PluginStorageConfig = PluginStorageConfig> {
1654
+ id: string;
1655
+ version: string;
1656
+ capabilities: PluginCapability[];
1657
+ allowedHosts: string[];
1658
+ storage: TStorage;
1659
+ hooks: ResolvedPluginHooks;
1660
+ routes: Record<string, PluginRoute>;
1661
+ mcp?: PluginMcpConfig;
1662
+ admin: PluginAdminConfig;
1663
+ }
1664
+ /**
1665
+ * Resolved hooks with normalized config
1666
+ */
1667
+ interface ResolvedPluginHooks {
1668
+ "plugin:install"?: ResolvedHook<LifecycleHandler>;
1669
+ "plugin:activate"?: ResolvedHook<LifecycleHandler>;
1670
+ "plugin:deactivate"?: ResolvedHook<LifecycleHandler>;
1671
+ "plugin:uninstall"?: ResolvedHook<UninstallHandler>;
1672
+ "content:beforeSave"?: ResolvedHook<ContentBeforeSaveHandler>;
1673
+ "content:afterSave"?: ResolvedHook<ContentAfterSaveHandler>;
1674
+ "content:beforeDelete"?: ResolvedHook<ContentBeforeDeleteHandler>;
1675
+ "content:afterDelete"?: ResolvedHook<ContentAfterDeleteHandler>;
1676
+ "content:beforePublish"?: ResolvedHook<ContentBeforePublishHandler>;
1677
+ "content:beforeSchedule"?: ResolvedHook<ContentBeforeScheduleHandler>;
1678
+ "content:beforeUnpublish"?: ResolvedHook<ContentBeforeUnpublishHandler>;
1679
+ "content:afterPublish"?: ResolvedHook<ContentAfterPublishHandler>;
1680
+ "content:afterUnpublish"?: ResolvedHook<ContentAfterUnpublishHandler>;
1681
+ "content:afterRestore"?: ResolvedHook<ContentAfterRestoreHandler>;
1682
+ "content:afterSchedule"?: ResolvedHook<ContentAfterScheduleHandler>;
1683
+ "content:afterUnschedule"?: ResolvedHook<ContentAfterUnscheduleHandler>;
1684
+ "media:beforeUpload"?: ResolvedHook<MediaBeforeUploadHandler>;
1685
+ "media:afterUpload"?: ResolvedHook<MediaAfterUploadHandler>;
1686
+ cron?: ResolvedHook<CronHandler>;
1687
+ "email:beforeSend"?: ResolvedHook<EmailBeforeSendHandler>;
1688
+ "email:deliver"?: ResolvedHook<EmailDeliverHandler>;
1689
+ "email:afterSend"?: ResolvedHook<EmailAfterSendHandler>;
1690
+ "comment:beforeCreate"?: ResolvedHook<CommentBeforeCreateHandler>;
1691
+ "comment:moderate"?: ResolvedHook<CommentModerateHandler>;
1692
+ "comment:afterCreate"?: ResolvedHook<CommentAfterCreateHandler>;
1693
+ "comment:afterModerate"?: ResolvedHook<CommentAfterModerateHandler>;
1694
+ "byline:afterSave"?: ResolvedHook<BylineAfterSaveHandler>;
1695
+ "byline:afterDelete"?: ResolvedHook<BylineAfterDeleteHandler>;
1696
+ "page:metadata"?: ResolvedHook<PageMetadataHandler>;
1697
+ "page:fragments"?: ResolvedHook<PageFragmentHandler>;
1698
+ }
1699
+ /**
1700
+ * What a plugin exports from its /admin entrypoint
1701
+ * Uses generic component type to avoid React dependency
1702
+ */
1703
+ interface PluginAdminExports {
1704
+ widgets?: Record<string, JSX.Element>;
1705
+ pages?: Record<string, JSX.Element>;
1706
+ fields?: Record<string, JSX.Element>;
1707
+ }
1708
+ /**
1709
+ * Plugin manifest — the metadata portion of a plugin bundle, used for
1710
+ * sandboxed plugins loaded from the marketplace.
1711
+ *
1712
+ * This interface is core's stricter version of the manifest contract: it
1713
+ * uses the exhaustive `HookName` union and core's typed `PluginAdminConfig`.
1714
+ * The wire-shape lives in `@emdash-cms/plugin-types` as `PluginManifest`
1715
+ * with looser types (so the registry CLI can serialise hook names it
1716
+ * doesn't know about). Both must stay structurally compatible: every value
1717
+ * of this type must be assignable to the shared one. The static assertion
1718
+ * below catches any drift at compile time.
1719
+ */
1720
+ interface PluginManifest {
1721
+ id: string;
1722
+ version: string;
1723
+ /**
1724
+ * The trust contract (see `@emdash-cms/plugin-types`). Authoritative;
1725
+ * `capabilities`/`allowedHosts` are derived from it at the parse boundary
1726
+ * via `reconcileManifestAccess`. Optional during the wire-format migration.
1727
+ */
1728
+ declaredAccess?: DeclaredAccess;
1729
+ capabilities: PluginCapability[];
1730
+ allowedHosts: string[];
1731
+ storage: PluginStorageConfig;
1732
+ /** Hook declarations — either plain name strings or structured objects */
1733
+ hooks: Array<ManifestHookEntry$1 | HookName>;
1734
+ /** Route declarations — either plain name strings or structured objects */
1735
+ routes: Array<ManifestRouteEntry$1 | string>;
1736
+ mcp?: PluginMcpManifestConfig;
1737
+ admin: PluginAdminConfig;
1738
+ }
1739
+ //#endregion
1740
+ export { ContentSchedulePolicyEvent as $, PluginContext as $t, ContentAfterDeleteHandler as A, StorageCollection as An, MediaBeforeUploadHandler as At, ContentBeforeScheduleHandler as B, UninstallHandler as Bn, PageMetadataContribution as Bt, CommentModerateEvent as C, ResolvedPlugin as Cn, KVAccess as Ct, ContentAccess as D, SettingField as Dn, MediaAccess as Dt, ConditionalWriteResult as E, SchemaAccess as En, LogAccess as Et, ContentAfterUnpublishHandler as F, TaxonomyDefInfo as Fn, ModerationDecision as Ft, ContentItem as G, VersionedRedirect as Gn, PaginatedResult as Gt, ContentCreateOptions as H, UpdateIfResult as Hn, PageMetadataHandler as Ht, ContentAfterUnscheduleHandler as I, TaxonomyReadOptions as In, NumericDelta as It, ContentPolicyEvent as J, isDeprecatedCapability as Jn, PluginAdminPage as Jt, ContentListOptions as K, VersionedValue as Kn, PluginAdminConfig as Kt, ContentBeforeDeleteHandler as L, TaxonomyTermCreateInput as Ln, PageFragmentContribution as Lt, ContentAfterRestoreHandler as M, StoredComment as Mn, MediaItem as Mt, ContentAfterSaveHandler as N, TaxonomyAccess as Nn, MediaMetadataPatch as Nt, ContentAccessWithWrite as O, SettingsAccess as On, MediaAfterUploadEvent as Ot, ContentAfterScheduleHandler as P, TaxonomyAccessWithWrite as Pn, MediaUploadEvent as Pt, ContentSaveHookDetails as Q, PluginContentCreateCallback as Qt, ContentBeforePublishHandler as R, TaxonomyTermInfo as Rn, PageFragmentEvent as Rt, CommentListOptions as S, ResolvedHook as Sn, HttpAccess as St, ConditionalDeleteResult as T, RouteContext as Tn, LifecycleHandler as Tt, ContentDeleteEvent as U, UserInfo as Un, PageMetadataLinkRel as Ut, ContentBeforeUnpublishHandler as V, UpdateIfArgs as Vn, PageMetadataEvent as Vt, ContentHookEvent as W, VersionedContentItem as Wn, PagePlacement as Wt, ContentRestoreStateChangeEvent as X, normalizeCapability as Xn, PluginComment as Xt, ContentPublishStateChangeEvent as Y, normalizeCapabilities as Yn, PluginCapability as Yt, ContentRevisionInfo as Z, normalizePluginCapabilities as Zn, PluginCommentStatus as Zt, CommentAfterModerateEvent as _, RedirectInfo as _n, EntryBylineCredits as _t, BylineAfterDeleteHandler as a, PluginManifest as an, CronEvent as at, CommentBeforeCreateHandler as b, RedirectUpdateInput as bn, HookConfig as bt, BylineCreditInfo as c, PluginRouteDefinition as cn, CurrentPluginCapability as ct, CAPABILITY_RENAMES as d, PortableTextBlockField as dn, EmailAfterSendHandler as dt, PluginDefinition as en, ContentScheduleStateChangeEvent as et, CollectionCommentSettings as f, PublicPageContext as fn, EmailBeforeSendEvent as ft, CommentAfterCreateHandler as g, RedirectCreateInput as gn, EmailMessage as gt, CommentAfterCreateEvent as h, RedirectAccessWithWrite as hn, EmailDeliverHandler as ht, BylineAfterDeleteEvent as i, PluginHooks as in, CronAccess as it, ContentAfterPublishHandler as j, StorageCollectionConfig as jn, MediaBytes as jt, ContentActionOrigin as k, SiteInfo as kn, MediaAfterUploadHandler as kt, BylineInfo as l, PluginStorageConfig as ln, DeprecatedPluginCapability as lt, CommentAccess as m, RedirectAccess as mn, EmailDeliverEvent as mt, BreadcrumbItem as n, PluginEditorDraftFieldSelector as nn, ContentTranslationSummary as nt, BylineAfterSaveEvent as o, PluginMcpManifestConfig as on, CronHandler as ot, CollectionSchemaInfo as p, QueryOptions as pn, EmailBeforeSendHandler as pt, ContentPolicyDecision as q, WhereClause as qn, PluginAdminExports as qt, BylineAccess as r, PluginEditorPanel as rn, ContentWriteInput as rt, BylineAfterSaveHandler as s, PluginRoute as sn, CronTaskInfo as st, ActorInfo as t, PluginEditorAction as tn, ContentStateChangeEvent as tt, BylineListOptions as u, PortableTextBlockConfig as un, EmailAfterSendEvent as ut, CommentAfterModerateHandler as v, RedirectListOptions as vn, FieldSchemaInfo as vt, CommentModerateHandler as w, ResolvedPluginHooks as wn, LifecycleEvent as wt, CommentCountOptions as x, RequestMeta as xn, HookName as xt, CommentBeforeCreateEvent as y, RedirectStatus as yn, FieldWidgetConfig as yt, ContentBeforeSaveHandler as z, UninstallEvent as zn, PageFragmentHandler as zt };
1741
+ //# sourceMappingURL=types-C4P7F1Vq.d.mts.map