emdash 0.36.0 → 0.38.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.
- package/dist/{activation-K0kGBWuJ.mjs → activation-DyNTe_Tl.mjs} +3 -3
- package/dist/{activation-K0kGBWuJ.mjs.map → activation-DyNTe_Tl.mjs.map} +1 -1
- package/dist/{adapters-CzL3H752.d.mts → adapters-DCEgOBXi.d.mts} +4 -2
- package/dist/{adapters-CzL3H752.d.mts.map → adapters-DCEgOBXi.d.mts.map} +1 -1
- package/dist/{allowed-origins-maylGaHv.mjs → allowed-origins-GFUVavRj.mjs} +2 -2
- package/dist/{allowed-origins-maylGaHv.mjs.map → allowed-origins-GFUVavRj.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.mjs +25 -24
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +5 -5
- package/dist/api-BvxJmnFY.mjs +10094 -0
- package/dist/api-BvxJmnFY.mjs.map +1 -0
- package/dist/{api-tokens-9YrrCoE6.mjs → api-tokens-xpGqMHrC.mjs} +2 -2
- package/dist/{api-tokens-9YrrCoE6.mjs.map → api-tokens-xpGqMHrC.mjs.map} +1 -1
- package/dist/{apply-B_VMpJ2P.mjs → apply-DLmM3R7f.mjs} +26 -22
- package/dist/apply-DLmM3R7f.mjs.map +1 -0
- package/dist/artifact-fetch-P2JXVwOq.mjs +972 -0
- package/dist/artifact-fetch-P2JXVwOq.mjs.map +1 -0
- package/dist/astro/image-endpoint.mjs +2 -2
- package/dist/astro/image-endpoint.mjs.map +1 -1
- package/dist/astro/index.d.mts +12 -12
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +138 -39
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +10 -10
- package/dist/astro/middleware/auth.mjs +6 -6
- package/dist/astro/middleware/media-usage-write-fence.mjs +3 -3
- package/dist/astro/middleware/redirect.mjs +7 -5
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.mjs +3 -3
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +10 -10
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +223 -232
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +6 -6
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +6 -6
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +3 -3
- package/dist/astro/routes/api/admin/api-tokens/index.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +5 -5
- package/dist/astro/routes/api/admin/api-tokens/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +9 -9
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +9 -9
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +9 -9
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +17 -17
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +17 -17
- package/dist/astro/routes/api/admin/bylines/index.mjs +17 -17
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +13 -13
- package/dist/astro/routes/api/admin/comments/_id_.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/bulk.mjs +10 -10
- package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/index.mjs +10 -10
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +4 -4
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +3 -3
- package/dist/astro/routes/api/admin/media-usage/activation.mjs +13 -13
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +15 -15
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +15 -15
- package/dist/astro/routes/api/admin/media-usage/progress.mjs +14 -14
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +17 -17
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs +15 -15
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +15 -15
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +4 -4
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +59 -56
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +59 -56
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +57 -54
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +57 -54
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +58 -55
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +58 -55
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +57 -54
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +57 -54
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +58 -55
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +57 -54
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +58 -55
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +64 -57
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +18 -16
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +65 -58
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/verify.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/registry/verify.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +96 -0
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/updates.mjs +57 -54
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +57 -54
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +57 -54
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +6 -6
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +3 -3
- package/dist/astro/routes/api/admin/users/index.mjs +6 -6
- package/dist/astro/routes/api/auth/dev-bypass.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +11 -11
- package/dist/astro/routes/api/auth/invite/index.mjs +8 -8
- package/dist/astro/routes/api/auth/invite/register-options.mjs +10 -10
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +10 -10
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +7 -7
- package/dist/astro/routes/api/auth/mode.mjs +2 -2
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +4 -4
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +6 -6
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +12 -12
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +11 -11
- package/dist/astro/routes/api/auth/passkey/verify.mjs +11 -11
- package/dist/astro/routes/api/auth/signup/complete.mjs +11 -11
- package/dist/astro/routes/api/auth/signup/request.mjs +10 -10
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +14 -14
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +19 -5
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/lock.d.mts +10 -0
- package/dist/astro/routes/api/content/_collection_/_id_/lock.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +66 -0
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +11 -11
- package/dist/astro/routes/api/content/_collection_/_id_/publish.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +18 -10
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +20 -18
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +20 -18
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +15 -8
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +16 -15
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +19 -5
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +23 -11
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +14 -9
- package/dist/astro/routes/api/content/_collection_/index.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/trash.mjs +7 -7
- package/dist/astro/routes/api/dashboard.mjs +8 -8
- package/dist/astro/routes/api/dev/emails.mjs +2 -2
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +18 -18
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +3 -3
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/execute.mjs +15 -14
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.d.mts +10 -10
- package/dist/astro/routes/api/import/wordpress/media.mjs +11 -11
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +10 -10
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +13 -13
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +18 -18
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +29 -28
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/manifest.mjs.map +1 -1
- package/dist/astro/routes/api/mcp.mjs +213 -74
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +11 -11
- package/dist/astro/routes/api/media/_id_/replace.d.mts +8 -0
- package/dist/astro/routes/api/media/_id_/replace.d.mts.map +1 -0
- package/dist/astro/routes/api/media/_id_/replace.mjs +91 -0
- package/dist/astro/routes/api/media/_id_/replace.mjs.map +1 -0
- package/dist/astro/routes/api/media/_id_/upload.mjs +6 -6
- package/dist/astro/routes/api/media/_id_/usage.mjs +19 -19
- package/dist/astro/routes/api/media/_id_.mjs +18 -18
- package/dist/astro/routes/api/media/file/_...key_.d.mts.map +1 -1
- package/dist/astro/routes/api/media/file/_...key_.mjs +3 -2
- package/dist/astro/routes/api/media/file/_...key_.mjs.map +1 -1
- package/dist/astro/routes/api/media/folders/_id_.mjs +8 -8
- package/dist/astro/routes/api/media/folders/index.mjs +8 -8
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +2 -2
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +2 -2
- package/dist/astro/routes/api/media/providers/index.mjs +2 -2
- package/dist/astro/routes/api/media/upload-url.mjs +16 -14
- package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
- package/dist/astro/routes/api/media.d.mts.map +1 -1
- package/dist/astro/routes/api/media.mjs +53 -30
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +20 -13
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.mjs +15 -11
- package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +15 -11
- package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.mjs +16 -12
- package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_.mjs +21 -14
- package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/index.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/index.mjs +15 -11
- package/dist/astro/routes/api/menus/index.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +5 -5
- package/dist/astro/routes/api/oauth/device/code.mjs +8 -8
- package/dist/astro/routes/api/oauth/device/token.mjs +7 -7
- package/dist/astro/routes/api/oauth/register.mjs +2 -2
- package/dist/astro/routes/api/oauth/token/refresh.mjs +5 -5
- package/dist/astro/routes/api/oauth/token/revoke.mjs +5 -5
- package/dist/astro/routes/api/oauth/token.mjs +5 -5
- package/dist/astro/routes/api/openapi.json.mjs +184 -52
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
- package/dist/astro/routes/api/redirects/404s/index.mjs +12 -11
- package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/summary.mjs +12 -11
- package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.mjs +13 -12
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +13 -12
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.mjs +20 -18
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/translations.mjs +15 -13
- package/dist/astro/routes/api/relations/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/relations/index.mjs +20 -18
- package/dist/astro/routes/api/relations/index.mjs.map +1 -1
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -2
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +3 -3
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +57 -54
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +57 -54
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +57 -54
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +57 -54
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +57 -54
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.mjs +57 -54
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +13 -11
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +57 -54
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +57 -54
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +12 -11
- package/dist/astro/routes/api/search/enable.mjs.map +1 -1
- package/dist/astro/routes/api/search/index.mjs +11 -10
- package/dist/astro/routes/api/search/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/rebuild.mjs +12 -11
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
- package/dist/astro/routes/api/search/stats.mjs +7 -6
- package/dist/astro/routes/api/search/stats.mjs.map +1 -1
- package/dist/astro/routes/api/search/suggest.mjs +11 -10
- package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
- package/dist/astro/routes/api/sections/_slug_.mjs +11 -10
- package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/sections/index.mjs +11 -10
- package/dist/astro/routes/api/sections/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +7 -6
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +6 -5
- package/dist/astro/routes/api/settings/backups/archives/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/export.mjs +7 -6
- package/dist/astro/routes/api/settings/backups/export.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/index.mjs +8 -7
- package/dist/astro/routes/api/settings/backups/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/email.mjs +5 -5
- package/dist/astro/routes/api/settings/email.mjs.map +1 -1
- package/dist/astro/routes/api/settings.d.mts.map +1 -1
- package/dist/astro/routes/api/settings.mjs +21 -17
- package/dist/astro/routes/api/settings.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.mjs +12 -12
- package/dist/astro/routes/api/setup/admin.mjs +11 -11
- package/dist/astro/routes/api/setup/dev-bypass.mjs +35 -33
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
- package/dist/astro/routes/api/setup/index.mjs +35 -33
- package/dist/astro/routes/api/setup/index.mjs.map +1 -1
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +8 -7
- package/dist/astro/routes/api/snapshot.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +22 -17
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +23 -18
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +27 -19
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +22 -17
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +16 -15
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_.mjs +28 -20
- package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.mjs +22 -17
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +5 -5
- package/dist/astro/routes/api/typegen.mjs +4 -4
- package/dist/astro/routes/api/well-known/auth.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +10 -8
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +18 -14
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +16 -13
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_.mjs +9 -7
- package/dist/astro/routes/api/widget-areas/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/index.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/index.mjs +16 -13
- package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +8 -8
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +13 -12
- package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
- package/dist/astro/routes/sitemap.xml.mjs +9 -9
- package/dist/astro/types.d.mts +50 -20
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{authorize-ByYs-Uxs.mjs → authorize-C2QHlWSS.mjs} +2 -2
- package/dist/{authorize-ByYs-Uxs.mjs.map → authorize-C2QHlWSS.mjs.map} +1 -1
- package/dist/{backup-ChyHfIoX.mjs → backup-oS8ft5Cm.mjs} +5 -5
- package/dist/{backup-ChyHfIoX.mjs.map → backup-oS8ft5Cm.mjs.map} +1 -1
- package/dist/{bundle-DZFhFurR.mjs → bundle-CL0JjIPx.mjs} +4 -4
- package/dist/{bundle-DZFhFurR.mjs.map → bundle-CL0JjIPx.mjs.map} +1 -1
- package/dist/{byline-Cpnwrje1.mjs → byline-Vdi85CsZ.mjs} +27 -14
- package/dist/byline-Vdi85CsZ.mjs.map +1 -0
- package/dist/{byline-fields-CAyA_Umd.mjs → byline-fields-DPVRFMz2.mjs} +2 -2
- package/dist/{byline-fields-CAyA_Umd.mjs.map → byline-fields-DPVRFMz2.mjs.map} +1 -1
- package/dist/{byline-registry-Bpu9-MVs.mjs → byline-registry-BxDGIO0I.mjs} +2 -2
- package/dist/{byline-registry-Bpu9-MVs.mjs.map → byline-registry-BxDGIO0I.mjs.map} +1 -1
- package/dist/{bylines-BSo9B9RX.mjs → bylines-BX8QhcTk.mjs} +7 -7
- package/dist/{bylines-BSo9B9RX.mjs.map → bylines-BX8QhcTk.mjs.map} +1 -1
- package/dist/{bylines-CHjvehVX.mjs → bylines-w-E1IEQd.mjs} +3 -3
- package/dist/{bylines-CHjvehVX.mjs.map → bylines-w-E1IEQd.mjs.map} +1 -1
- package/dist/{cache-5VirJ2Cn.mjs → cache--7HKu5Xm.mjs} +4 -4
- package/dist/{cache-5VirJ2Cn.mjs.map → cache--7HKu5Xm.mjs.map} +1 -1
- package/dist/{capture-triggers-CNW1q3HK.mjs → capture-triggers-CeAsC76Z.mjs} +2 -2
- package/dist/{capture-triggers-CNW1q3HK.mjs.map → capture-triggers-CeAsC76Z.mjs.map} +1 -1
- package/dist/{challenge-store-D5pSY2S1.mjs → challenge-store-BIOak-tp.mjs} +5 -3
- package/dist/challenge-store-BIOak-tp.mjs.map +1 -0
- package/dist/chrome-tags-DzDQBCjX.mjs +24 -0
- package/dist/chrome-tags-DzDQBCjX.mjs.map +1 -0
- package/dist/{chunks-bNiX6_DR.mjs → chunks-VG_tyqnP.mjs} +2 -2
- package/dist/{chunks-bNiX6_DR.mjs.map → chunks-VG_tyqnP.mjs.map} +1 -1
- package/dist/cli/index.mjs +68 -40
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +17 -7
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +17 -12
- package/dist/client/index.mjs.map +1 -1
- package/dist/{collection-deletion-m_oi2c0N.mjs → collection-deletion-BCwaWTDw.mjs} +4 -4
- package/dist/{collection-deletion-m_oi2c0N.mjs.map → collection-deletion-BCwaWTDw.mjs.map} +1 -1
- package/dist/collection-slugs-cache-7lTmNzeA.mjs +85 -0
- package/dist/collection-slugs-cache-7lTmNzeA.mjs.map +1 -0
- package/dist/{comment-reaction-CRuItEjt.mjs → comment-reaction-CDyvPQRj.mjs} +2 -2
- package/dist/{comment-reaction-CRuItEjt.mjs.map → comment-reaction-CDyvPQRj.mjs.map} +1 -1
- package/dist/{comment-DhvLEdhQ.mjs → comment-vxOzWbZN.mjs} +2 -2
- package/dist/{comment-DhvLEdhQ.mjs.map → comment-vxOzWbZN.mjs.map} +1 -1
- package/dist/{comments-CLj4bi8I.mjs → comments-VzmVLyaC.mjs} +2 -2
- package/dist/{comments-CLj4bi8I.mjs.map → comments-VzmVLyaC.mjs.map} +1 -1
- package/dist/{components-v4U4DT2y.mjs → components-CL6Wkdk-.mjs} +1 -1
- package/dist/{components-v4U4DT2y.mjs.map → components-CL6Wkdk-.mjs.map} +1 -1
- package/dist/config--eWjQJE5.mjs +217 -0
- package/dist/config--eWjQJE5.mjs.map +1 -0
- package/dist/{index-DWbJrsAg.d.mts → config-CGAhyOjP.d.mts} +276 -76
- package/dist/config-CGAhyOjP.d.mts.map +1 -0
- package/dist/{config-DrfghTPe.d.mts → config-ChFzshGd.d.mts} +1 -1
- package/dist/{config-DrfghTPe.d.mts.map → config-ChFzshGd.d.mts.map} +1 -1
- package/dist/{content-CP-SeXNa.mjs → content-CNfMWuhY.mjs} +202 -46
- package/dist/content-CNfMWuhY.mjs.map +1 -0
- package/dist/{content-list-query-BhejKVqb.d.mts → content-list-query-B8d4UQp9.d.mts} +1 -1
- package/dist/{content-list-query-BhejKVqb.d.mts.map → content-list-query-B8d4UQp9.d.mts.map} +1 -1
- package/dist/{content-refresh-DLOfIhYc.mjs → content-refresh-GTMyi2Xy.mjs} +53 -26
- package/dist/content-refresh-GTMyi2Xy.mjs.map +1 -0
- package/dist/{content-repair-BCxzy0r4.mjs → content-repair-CIMt5C0U.mjs} +4 -4
- package/dist/{content-repair-BCxzy0r4.mjs.map → content-repair-CIMt5C0U.mjs.map} +1 -1
- package/dist/{context-BR5hRWiK.mjs → context-C9PB8vGd.mjs} +308 -33
- package/dist/context-C9PB8vGd.mjs.map +1 -0
- package/dist/{cron-CWfWrWKG.mjs → cron-DHAy9oyq.mjs} +1 -1
- package/dist/{cron-CWfWrWKG.mjs.map → cron-DHAy9oyq.mjs.map} +1 -1
- package/dist/{dashboard-CkIV2rnQ.mjs → dashboard-BNSvAN8A.mjs} +5 -5
- package/dist/{dashboard-CkIV2rnQ.mjs.map → dashboard-BNSvAN8A.mjs.map} +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +2 -2
- package/dist/db/index.mjs.map +1 -1
- package/dist/db/libsql-migrations.d.mts +1 -1
- package/dist/db/libsql-migrations.mjs +5 -5
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres-migrations.d.mts +1 -1
- package/dist/db/postgres-migrations.mjs +5 -5
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/postgres.d.mts.map +1 -1
- package/dist/db/postgres.mjs +19 -3
- package/dist/db/postgres.mjs.map +1 -1
- package/dist/db/sqlite-migrations.d.mts +1 -1
- package/dist/db/sqlite-migrations.mjs +5 -5
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.mjs +1 -1
- package/dist/{default-YMEfcQUx.mjs → default-ByZ0JqZo.mjs} +1 -1
- package/dist/{default-YMEfcQUx.mjs.map → default-ByZ0JqZo.mjs.map} +1 -1
- package/dist/{deferred-tasks-DfqxH5Xf.d.mts → deferred-tasks-Cu4NSJpa.d.mts} +1 -1
- package/dist/{deferred-tasks-DfqxH5Xf.d.mts.map → deferred-tasks-Cu4NSJpa.d.mts.map} +1 -1
- package/dist/dev-typegen-DHT7lcMU.mjs +29 -0
- package/dist/dev-typegen-DHT7lcMU.mjs.map +1 -0
- package/dist/{device-flow-CojjSBwb.mjs → device-flow-Cf6bhCCT.mjs} +4 -4
- package/dist/{device-flow-CojjSBwb.mjs.map → device-flow-Cf6bhCCT.mjs.map} +1 -1
- package/dist/{dialect-helpers-BSbfaO3F.mjs → dialect-helpers-BcQvkHgn.mjs} +83 -2
- package/dist/dialect-helpers-BcQvkHgn.mjs.map +1 -0
- package/dist/{direct-executor-BWeWiRYB.mjs → direct-executor-yAyUGSqB.mjs} +3 -3
- package/dist/{direct-executor-BWeWiRYB.mjs.map → direct-executor-yAyUGSqB.mjs.map} +1 -1
- package/dist/{dist-89xCrGqi.mjs → dist-BAsh8dbf.mjs} +1 -1
- package/dist/{dist-89xCrGqi.mjs.map → dist-BAsh8dbf.mjs.map} +1 -1
- package/dist/{email-console-CEJgR_LB.mjs → email-console-DNup1Fku.mjs} +1 -1
- package/dist/{email-console-CEJgR_LB.mjs.map → email-console-DNup1Fku.mjs.map} +1 -1
- package/dist/{enrich-BX0IDp4z.mjs → enrich-t2Xvjdqa.mjs} +3 -3
- package/dist/{enrich-BX0IDp4z.mjs.map → enrich-t2Xvjdqa.mjs.map} +1 -1
- package/dist/entry-lock-BEr8gDkG.mjs +163 -0
- package/dist/entry-lock-BEr8gDkG.mjs.map +1 -0
- package/dist/{relations-C7B46bcU.d.mts → entry-lock-CGAtrwAR.d.mts} +265 -76
- package/dist/entry-lock-CGAtrwAR.d.mts.map +1 -0
- package/dist/{redirects-CRIM55KH.mjs → entry-lock-DIYHAaSw.mjs} +112 -34
- package/dist/entry-lock-DIYHAaSw.mjs.map +1 -0
- package/dist/entry-locks-BEcX7ET0.mjs +167 -0
- package/dist/entry-locks-BEcX7ET0.mjs.map +1 -0
- package/dist/{error-D9w94fjV.mjs → error-BDcFyoRt.mjs} +2 -2
- package/dist/{error-D9w94fjV.mjs.map → error-BDcFyoRt.mjs.map} +1 -1
- package/dist/{errors-n2j49uNf.mjs → errors-DvMdNrgf.mjs} +10 -1
- package/dist/errors-DvMdNrgf.mjs.map +1 -0
- package/dist/{escape-DN4Qmjsl.mjs → escape-B3asJC6W.mjs} +1 -1
- package/dist/{escape-DN4Qmjsl.mjs.map → escape-B3asJC6W.mjs.map} +1 -1
- package/dist/{field-defs-cache-Bh4q6oar.mjs → field-defs-cache-Cf5FHK0M.mjs} +5 -5
- package/dist/{field-defs-cache-Bh4q6oar.mjs.map → field-defs-cache-Cf5FHK0M.mjs.map} +1 -1
- package/dist/{fts-manager-BhOdW0bi.mjs → fts-manager-iddym8cd.mjs} +4 -4
- package/dist/{fts-manager-BhOdW0bi.mjs.map → fts-manager-iddym8cd.mjs.map} +1 -1
- package/dist/{hash-CTcngWvj.mjs → hash-BRweX6jz.mjs} +1 -1
- package/dist/{hash-CTcngWvj.mjs.map → hash-BRweX6jz.mjs.map} +1 -1
- package/dist/hook-result-BrshYHLx.d.mts +31 -0
- package/dist/hook-result-BrshYHLx.d.mts.map +1 -0
- package/dist/{hreflang-7pTHsLZJ.d.mts → hreflang-CQpu5bMy.d.mts} +2 -2
- package/dist/{hreflang-7pTHsLZJ.d.mts.map → hreflang-CQpu5bMy.d.mts.map} +1 -1
- package/dist/{hreflang-Huc6O5wa.mjs → hreflang-DshnweTC.mjs} +9 -8
- package/dist/{hreflang-Huc6O5wa.mjs.map → hreflang-DshnweTC.mjs.map} +1 -1
- package/dist/{identity-DXmb4aVp.mjs → identity-CjGKDq8J.mjs} +3 -3
- package/dist/{identity-DXmb4aVp.mjs.map → identity-CjGKDq8J.mjs.map} +1 -1
- package/dist/{import-C4_O3KXU.mjs → import-D96g2otw.mjs} +6 -6
- package/dist/{import-C4_O3KXU.mjs.map → import-D96g2otw.mjs.map} +1 -1
- package/dist/{index-6bRee8zb.d.mts → index-1ECYpfiF.d.mts} +3 -3
- package/dist/{index-6bRee8zb.d.mts.map → index-1ECYpfiF.d.mts.map} +1 -1
- package/dist/index.d.mts +22 -21
- package/dist/index.mjs +84 -81
- package/dist/{init-lock-DJkX6Hto.mjs → init-lock-CFNBe_iH.mjs} +1 -1
- package/dist/{init-lock-DJkX6Hto.mjs.map → init-lock-CFNBe_iH.mjs.map} +1 -1
- package/dist/{load-Bo7fZAbg.mjs → load-DPtY9cZo.mjs} +2 -2
- package/dist/{load-Bo7fZAbg.mjs.map → load-DPtY9cZo.mjs.map} +1 -1
- package/dist/{loader-ZsjE4paL.mjs → loader-WJi6GFRn.mjs} +90 -17
- package/dist/loader-WJi6GFRn.mjs.map +1 -0
- package/dist/{manifest-builder-QXuqvVMP.mjs → manifest-builder-BfNlGQIA.mjs} +2 -2
- package/dist/{manifest-builder-QXuqvVMP.mjs.map → manifest-builder-BfNlGQIA.mjs.map} +1 -1
- package/dist/{manifest-schema-CUYPfCEH.mjs → manifest-schema-CILooI5J.mjs} +5 -5
- package/dist/manifest-schema-CILooI5J.mjs.map +1 -0
- package/dist/media/image-endpoint.d.mts +4 -2
- package/dist/media/image-endpoint.d.mts.map +1 -1
- package/dist/media/image-endpoint.mjs +6 -4
- package/dist/media/image-endpoint.mjs.map +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +3 -3
- package/dist/media/local-runtime.d.mts +12 -12
- package/dist/media/local-runtime.mjs +7 -7
- package/dist/{media-D6SeAfBl.mjs → media-BBm8Wg3f.mjs} +30 -2
- package/dist/media-BBm8Wg3f.mjs.map +1 -0
- package/dist/{media-BjwNuLEu.mjs → media-C1EIZKh1.mjs} +35 -5
- package/dist/media-C1EIZKh1.mjs.map +1 -0
- package/dist/{media-allowlist-D35v7bmL.mjs → media-allowlist-elXJgb_K.mjs} +2 -2
- package/dist/{media-allowlist-D35v7bmL.mjs.map → media-allowlist-elXJgb_K.mjs.map} +1 -1
- package/dist/{media-folders-D-0CmRZj.mjs → media-folders-DASfX_DH.mjs} +1 -1
- package/dist/{media-folders-D-0CmRZj.mjs.map → media-folders-DASfX_DH.mjs.map} +1 -1
- package/dist/{media-upload-C7bLXGcI.mjs → media-upload-C7_AQJ5v.mjs} +9 -9
- package/dist/{media-upload-C7bLXGcI.mjs.map → media-upload-C7_AQJ5v.mjs.map} +1 -1
- package/dist/{media-url-DH7giMx_.mjs → media-url-8dVl1loq.mjs} +19 -2
- package/dist/media-url-8dVl1loq.mjs.map +1 -0
- package/dist/{media-usage-BTRJvS6V.mjs → media-usage-C1EswMTq.mjs} +10 -10
- package/dist/{media-usage-BTRJvS6V.mjs.map → media-usage-C1EswMTq.mjs.map} +1 -1
- package/dist/{media-usage-activation-Dx0kPV6b.mjs → media-usage-activation-CrHNltlL.mjs} +3 -3
- package/dist/{media-usage-activation-Dx0kPV6b.mjs.map → media-usage-activation-CrHNltlL.mjs.map} +1 -1
- package/dist/{media-usage-work-C-fhM30c.mjs → media-usage-work-C5B1zT1c.mjs} +2 -2
- package/dist/{media-usage-work-C-fhM30c.mjs.map → media-usage-work-C5B1zT1c.mjs.map} +1 -1
- package/dist/{media-usage-work-DWb2XPMI.mjs → media-usage-work-IkQx_Yz6.mjs} +4 -4
- package/dist/{media-usage-work-DWb2XPMI.mjs.map → media-usage-work-IkQx_Yz6.mjs.map} +1 -1
- package/dist/{media-usage-write-fence-BwoJVRDC.mjs → media-usage-write-fence-B9anjOSg.mjs} +3 -3
- package/dist/{media-usage-write-fence-BwoJVRDC.mjs.map → media-usage-write-fence-B9anjOSg.mjs.map} +1 -1
- package/dist/{menus-CNg0QlDt.mjs → menus-D8mC4eaN.mjs} +406 -175
- package/dist/menus-D8mC4eaN.mjs.map +1 -0
- package/dist/{menus-CD7EFLwz.mjs → menus-UdwjHZJC.mjs} +12 -4
- package/dist/{menus-CD7EFLwz.mjs.map → menus-UdwjHZJC.mjs.map} +1 -1
- package/dist/migrations/index.d.mts +1 -1
- package/dist/migrations/index.mjs +4 -4
- package/dist/{mime-CUIG6x84.mjs → mime-DYpsOAny.mjs} +1 -1
- package/dist/{mime-CUIG6x84.mjs.map → mime-DYpsOAny.mjs.map} +1 -1
- package/dist/{mode-DaUM_MB2.mjs → mode-Dm4BHhRH.mjs} +1 -1
- package/dist/{mode-DaUM_MB2.mjs.map → mode-Dm4BHhRH.mjs.map} +1 -1
- package/dist/{node-sqlite-compat-Udb4Y-rs.mjs → node-sqlite-compat-2sezm-Zd.mjs} +1 -1
- package/dist/{node-sqlite-compat-Udb4Y-rs.mjs.map → node-sqlite-compat-2sezm-Zd.mjs.map} +1 -1
- package/dist/{normalize-CSxdKBVa.mjs → normalize-4nkKGsuW.mjs} +15 -5
- package/dist/normalize-4nkKGsuW.mjs.map +1 -0
- package/dist/{oauth-authorization-Dpsb-fMJ.mjs → oauth-authorization-BxE_lURD.mjs} +4 -4
- package/dist/{oauth-authorization-Dpsb-fMJ.mjs.map → oauth-authorization-BxE_lURD.mjs.map} +1 -1
- package/dist/{oauth-clients-Bxnoe_67.mjs → oauth-clients-DJIdOdq0.mjs} +1 -1
- package/dist/{oauth-clients-Bxnoe_67.mjs.map → oauth-clients-DJIdOdq0.mjs.map} +1 -1
- package/dist/{oauth-state-store-0C4s0K6w.mjs → oauth-state-store-CsdxP57n.mjs} +1 -1
- package/dist/{oauth-state-store-0C4s0K6w.mjs.map → oauth-state-store-CsdxP57n.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-wlGYSeqX.mjs → oauth-user-lookup-HzzW-dkF.mjs} +1 -1
- package/dist/{oauth-user-lookup-wlGYSeqX.mjs.map → oauth-user-lookup-HzzW-dkF.mjs.map} +1 -1
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{object-cache-71tPfV4A.mjs → object-cache-DVKnyOfy.mjs} +19 -3
- package/dist/object-cache-DVKnyOfy.mjs.map +1 -0
- package/dist/{options-BHPeIbBd.mjs → options-D1FBiAv1.mjs} +60 -5
- package/dist/options-D1FBiAv1.mjs.map +1 -0
- package/dist/{options-BhZIeFY1.d.mts → options-D8Y0VHc7.d.mts} +30 -11
- package/dist/options-D8Y0VHc7.d.mts.map +1 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/page/index.d.mts.map +1 -1
- package/dist/page/index.mjs +12 -0
- package/dist/page/index.mjs.map +1 -1
- package/dist/{parse-BRJg1kz8.mjs → parse-WRg5C3NX.mjs} +2 -2
- package/dist/{parse-BRJg1kz8.mjs.map → parse-WRg5C3NX.mjs.map} +1 -1
- package/dist/{passkey-config-B3P0nHRR.mjs → passkey-config-qIdO-wF6.mjs} +1 -1
- package/dist/{passkey-config-B3P0nHRR.mjs.map → passkey-config-qIdO-wF6.mjs.map} +1 -1
- package/dist/{patterns-D9iDO3j8.mjs → patterns-DC8CLptu.mjs} +1 -1
- package/dist/{patterns-D9iDO3j8.mjs.map → patterns-DC8CLptu.mjs.map} +1 -1
- package/dist/{placeholder-BR4ZhVJl.d.mts → placeholder-COrvARyD.d.mts} +1 -1
- package/dist/{placeholder-BR4ZhVJl.d.mts.map → placeholder-COrvARyD.d.mts.map} +1 -1
- package/dist/plugin-types.d.mts +8 -3
- package/dist/plugin-types.d.mts.map +1 -1
- package/dist/plugin-utils.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.mjs +2 -2
- package/dist/{policy-BVRganJQ.mjs → policy-XCfb-IE9.mjs} +2 -2
- package/dist/{policy-BVRganJQ.mjs.map → policy-XCfb-IE9.mjs.map} +1 -1
- package/dist/{portable-text-C8Tvp4_g.mjs → portable-text-BS3d5n-0.mjs} +1 -1
- package/dist/{portable-text-C8Tvp4_g.mjs.map → portable-text-BS3d5n-0.mjs.map} +1 -1
- package/dist/{preview-dn2dUyM0.mjs → preview-BxwsGgGp.mjs} +2 -2
- package/dist/{preview-dn2dUyM0.mjs.map → preview-BxwsGgGp.mjs.map} +1 -1
- package/dist/{protocol-CuBEsqgE.d.mts → protocol-CLn58-nw.d.mts} +2 -2
- package/dist/{protocol-CuBEsqgE.d.mts.map → protocol-CLn58-nw.d.mts.map} +1 -1
- package/dist/{public-url-DRz_AinV.mjs → public-url-FWWAvnre.mjs} +1 -1
- package/dist/{public-url-DRz_AinV.mjs.map → public-url-FWWAvnre.mjs.map} +1 -1
- package/dist/{query-D18vTdha.mjs → query-DygOte9M.mjs} +26 -17
- package/dist/query-DygOte9M.mjs.map +1 -0
- package/dist/{query-tZDEdtCN.mjs → query-gtXT03Wc.mjs} +5 -5
- package/dist/{query-tZDEdtCN.mjs.map → query-gtXT03Wc.mjs.map} +1 -1
- package/dist/{rate-limit-on7KPo-v.mjs → rate-limit-CQUPm0dh.mjs} +2 -2
- package/dist/{rate-limit-on7KPo-v.mjs.map → rate-limit-CQUPm0dh.mjs.map} +1 -1
- package/dist/{redirect-DrbEmU9a.mjs → redirect-D1cWafi6.mjs} +1 -1
- package/dist/{redirect-DrbEmU9a.mjs.map → redirect-D1cWafi6.mjs.map} +1 -1
- package/dist/{redirect-CZkbozu9.mjs → redirect-DId44BS1.mjs} +19 -6
- package/dist/redirect-DId44BS1.mjs.map +1 -0
- package/dist/{redirects-BahWiu8Z.mjs → redirects-DN-ZE33W.mjs} +5 -5
- package/dist/{redirects-BahWiu8Z.mjs.map → redirects-DN-ZE33W.mjs.map} +1 -1
- package/dist/{registry-Cx-jEJOS.mjs → registry-DTqaqxed.mjs} +46 -12
- package/dist/registry-DTqaqxed.mjs.map +1 -0
- package/dist/{relation-A6wLF_DS.mjs → relation-DxgCHOBw.mjs} +2 -2
- package/dist/{relation-A6wLF_DS.mjs.map → relation-DxgCHOBw.mjs.map} +1 -1
- package/dist/{relations-Cj5hZ6Zg.mjs → relations-KKDSLUwS.mjs} +4 -4
- package/dist/{relations-Cj5hZ6Zg.mjs.map → relations-KKDSLUwS.mjs.map} +1 -1
- package/dist/{relations-BTPM2saV.mjs → relations-rOmbndUJ.mjs} +8 -8
- package/dist/relations-rOmbndUJ.mjs.map +1 -0
- package/dist/{request-cache-DH9zdCOD.mjs → request-cache-DAZZmesc.mjs} +1 -1
- package/dist/{request-cache-DH9zdCOD.mjs.map → request-cache-DAZZmesc.mjs.map} +1 -1
- package/dist/request-context.d.mts +1 -1
- package/dist/{request-meta-DRp5ENd_.mjs → request-meta-BgjUQLQ-.mjs} +2 -2
- package/dist/{request-meta-DRp5ENd_.mjs.map → request-meta-BgjUQLQ-.mjs.map} +1 -1
- package/dist/{resolve-DxUpTMmE.mjs → resolve-Cy0aWSRj.mjs} +37 -4
- package/dist/resolve-Cy0aWSRj.mjs.map +1 -0
- package/dist/{runner-zgqA_CqP.d.mts → runner-CfwysRM0.d.mts} +3 -2
- package/dist/runner-CfwysRM0.d.mts.map +1 -0
- package/dist/{runner-77GOZCnH.mjs → runner-nEzvnogG.mjs} +476 -295
- package/dist/runner-nEzvnogG.mjs.map +1 -0
- package/dist/runtime.d.mts +11 -11
- package/dist/runtime.mjs +3 -2
- package/dist/runtime.mjs.map +1 -1
- package/dist/{schema-BY-oVntF.mjs → schema-CRu38Pr5.mjs} +3 -3
- package/dist/{schema-BY-oVntF.mjs.map → schema-CRu38Pr5.mjs.map} +1 -1
- package/dist/{schema-Cw9kVK0I.mjs → schema-DifxndJx.mjs} +5 -5
- package/dist/{schema-Cw9kVK0I.mjs.map → schema-DifxndJx.mjs.map} +1 -1
- package/dist/{scopes-vMR1uIbt.mjs → scopes-D5A1OZbq.mjs} +3 -3
- package/dist/{scopes-vMR1uIbt.mjs.map → scopes-D5A1OZbq.mjs.map} +1 -1
- package/dist/{search-CfT3KxO5.mjs → search-DEPFSBFq.mjs} +4 -4
- package/dist/{search-CfT3KxO5.mjs.map → search-DEPFSBFq.mjs.map} +1 -1
- package/dist/{secrets-BH2Qow1-.mjs → secrets-CdfzLdoO.mjs} +3 -3
- package/dist/{secrets-BH2Qow1-.mjs.map → secrets-CdfzLdoO.mjs.map} +1 -1
- package/dist/{sections-DTfjyf1z.mjs → sections-3X52kmIR.mjs} +2 -2
- package/dist/{sections-DTfjyf1z.mjs.map → sections-3X52kmIR.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +28 -26
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.d.mts.map +1 -1
- package/dist/seo/index.mjs +20 -21
- package/dist/seo/index.mjs.map +1 -1
- package/dist/{seo-Cm-dtvgk.mjs → seo-Bw68KxRc.mjs} +3 -3
- package/dist/{seo-Cm-dtvgk.mjs.map → seo-Bw68KxRc.mjs.map} +1 -1
- package/dist/{seo-BSiTIXzd.mjs → seo-C4AmbsMU.mjs} +3 -2
- package/dist/seo-C4AmbsMU.mjs.map +1 -0
- package/dist/{service-DYsDHEKe.mjs → service-J_-Vgo7R.mjs} +3 -3
- package/dist/{service-DYsDHEKe.mjs.map → service-J_-Vgo7R.mjs.map} +1 -1
- package/dist/{session-user-CNAfvsdw.mjs → session-user-CbnMMwk6.mjs} +1 -1
- package/dist/{session-user-CNAfvsdw.mjs.map → session-user-CbnMMwk6.mjs.map} +1 -1
- package/dist/{settings-DjtkUo__.mjs → settings-AnEFYICn.mjs} +3 -3
- package/dist/{settings-DjtkUo__.mjs.map → settings-AnEFYICn.mjs.map} +1 -1
- package/dist/{settings-BgN-0DT-.mjs → settings-DcMjREe5.mjs} +21 -8
- package/dist/settings-DcMjREe5.mjs.map +1 -0
- package/dist/{setup-complete-CcpXaPU7.mjs → setup-complete-BClXXTvr.mjs} +2 -2
- package/dist/{setup-complete-CcpXaPU7.mjs.map → setup-complete-BClXXTvr.mjs.map} +1 -1
- package/dist/{setup-nonce-Reyw30jg.mjs → setup-nonce-BheRa4RG.mjs} +1 -1
- package/dist/{setup-nonce-Reyw30jg.mjs.map → setup-nonce-BheRa4RG.mjs.map} +1 -1
- package/dist/{single-flight-cache-BPuGPdcN.mjs → single-flight-cache-jaswDzmQ.mjs} +2 -2
- package/dist/{single-flight-cache-BPuGPdcN.mjs.map → single-flight-cache-jaswDzmQ.mjs.map} +1 -1
- package/dist/{site-url-Cs_V9n3V.mjs → site-url-Bqf-ea3N.mjs} +3 -3
- package/dist/{site-url-Cs_V9n3V.mjs.map → site-url-Bqf-ea3N.mjs.map} +1 -1
- package/dist/{snapshot-DSB8P7Lm.mjs → snapshot-C4CtXntb.mjs} +51 -35
- package/dist/snapshot-C4CtXntb.mjs.map +1 -0
- package/dist/{ssrf-DqebVE34.mjs → ssrf-gl4gFNhw.mjs} +151 -93
- package/dist/ssrf-gl4gFNhw.mjs.map +1 -0
- package/dist/{state-BJfU9Uzw.mjs → state-1F6IOhdQ.mjs} +1 -1
- package/dist/{state-BJfU9Uzw.mjs.map → state-1F6IOhdQ.mjs.map} +1 -1
- package/dist/{status-DDu8HIQl.mjs → status-Cenfk_r5.mjs} +1 -1
- package/dist/{status-DDu8HIQl.mjs.map → status-Cenfk_r5.mjs.map} +1 -1
- package/dist/storage/local.d.mts +2 -1
- package/dist/storage/local.d.mts.map +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/local.mjs.map +1 -1
- package/dist/storage/s3.d.mts +2 -1
- package/dist/storage/s3.d.mts.map +1 -1
- package/dist/storage/s3.mjs +3 -2
- package/dist/storage/s3.mjs.map +1 -1
- package/dist/{target-D0o26Azo.mjs → target-CRzeTs8G.mjs} +1 -1
- package/dist/{target-D0o26Azo.mjs.map → target-CRzeTs8G.mjs.map} +1 -1
- package/dist/{taxonomies-CPGxo-bn.mjs → taxonomies-BOdxuZpV.mjs} +23 -13
- package/dist/taxonomies-BOdxuZpV.mjs.map +1 -0
- package/dist/{taxonomies-kmyudNGP.mjs → taxonomies-NcFDq5Gg.mjs} +58 -23
- package/dist/taxonomies-NcFDq5Gg.mjs.map +1 -0
- package/dist/{taxonomy-8X09dLN5.mjs → taxonomy-DP1vny4K.mjs} +12 -4
- package/dist/{taxonomy-8X09dLN5.mjs.map → taxonomy-DP1vny4K.mjs.map} +1 -1
- package/dist/{tokens-gTS-IVUp.mjs → tokens-CDk8ox9p.mjs} +1 -1
- package/dist/{tokens-gTS-IVUp.mjs.map → tokens-CDk8ox9p.mjs.map} +1 -1
- package/dist/{transport-_6R1ub7t.d.mts → transport-BVn4tVb9.d.mts} +1 -1
- package/dist/{transport-_6R1ub7t.d.mts.map → transport-BVn4tVb9.d.mts.map} +1 -1
- package/dist/{transport-fX59xaJz.mjs → transport-DP0JI-8i.mjs} +1 -1
- package/dist/{transport-fX59xaJz.mjs.map → transport-DP0JI-8i.mjs.map} +1 -1
- package/dist/{trusted-proxy-fe6nEgR4.mjs → trusted-proxy-BTM6UxqD.mjs} +1 -1
- package/dist/{trusted-proxy-fe6nEgR4.mjs.map → trusted-proxy-BTM6UxqD.mjs.map} +1 -1
- package/dist/{types-D_DWe7k9.d.mts → types-2n848aVW.d.mts} +3 -2
- package/dist/types-2n848aVW.d.mts.map +1 -0
- package/dist/types-A2cN6a4a.mjs +3 -0
- package/dist/{types-75KIqzL9.mjs → types-BMXnRIrX.mjs} +4 -2
- package/dist/types-BMXnRIrX.mjs.map +1 -0
- package/dist/{types-Vg6f5i3s.d.mts → types-BouXpOsa.d.mts} +121 -4
- package/dist/types-BouXpOsa.d.mts.map +1 -0
- package/dist/{types-BXUmsINL.mjs → types-ByG2coLw.mjs} +1 -1
- package/dist/{types-BXUmsINL.mjs.map → types-ByG2coLw.mjs.map} +1 -1
- package/dist/types-CQPWhPxE.mjs.map +1 -1
- package/dist/{types-Blb-MRC3.d.mts → types-DEfNJ__A.d.mts} +1 -1
- package/dist/{types-Blb-MRC3.d.mts.map → types-DEfNJ__A.d.mts.map} +1 -1
- package/dist/{types-Br-ERaxh.d.mts → types-DKcKSbtB.d.mts} +23 -7
- package/dist/types-DKcKSbtB.d.mts.map +1 -0
- package/dist/{types-BzBd3PeX.d.mts → types-DRYs7uTL.d.mts} +1 -1
- package/dist/{types-BzBd3PeX.d.mts.map → types-DRYs7uTL.d.mts.map} +1 -1
- package/dist/{types-CLqvnd05.d.mts → types-DaEg7KX2.d.mts} +1 -1
- package/dist/{types-CLqvnd05.d.mts.map → types-DaEg7KX2.d.mts.map} +1 -1
- package/dist/{types-DJQxln7q.d.mts → types-LU8utpP_.d.mts} +14 -10
- package/dist/types-LU8utpP_.d.mts.map +1 -0
- package/dist/{types-D5VVLr7J.d.mts → types-VpYfPUxN.d.mts} +1 -1
- package/dist/{types-D5VVLr7J.d.mts.map → types-VpYfPUxN.d.mts.map} +1 -1
- package/dist/{types-DM3vioBY.mjs → types-c9GP7Dj5.mjs} +1 -1
- package/dist/{types-DM3vioBY.mjs.map → types-c9GP7Dj5.mjs.map} +1 -1
- package/dist/{types-DHxzBjbD.d.mts → types-tJWDK__M.d.mts} +14 -1
- package/dist/types-tJWDK__M.d.mts.map +1 -0
- package/dist/{upload-attempts-CNyGSepg.mjs → upload-attempts-C6S2y-lp.mjs} +1 -1
- package/dist/{upload-attempts-CNyGSepg.mjs.map → upload-attempts-C6S2y-lp.mjs.map} +1 -1
- package/dist/{url-pattern-K-KdXcSe.mjs → url-pattern-UYtxVTuj.mjs} +1 -1
- package/dist/{url-pattern-K-KdXcSe.mjs.map → url-pattern-UYtxVTuj.mjs.map} +1 -1
- package/dist/{user-CtYY0tp2.mjs → user-DIsIXogT.mjs} +2 -2
- package/dist/{user-CtYY0tp2.mjs.map → user-DIsIXogT.mjs.map} +1 -1
- package/dist/{utils-HztC73hq.mjs → utils-BicP5Qbg.mjs} +2 -2
- package/dist/{utils-HztC73hq.mjs.map → utils-BicP5Qbg.mjs.map} +1 -1
- package/dist/{validate-Dd-IUjnZ.mjs → validate-D8VPn4Hv.mjs} +8 -3
- package/dist/validate-D8VPn4Hv.mjs.map +1 -0
- package/dist/{validate-DlqdOZXB.d.mts → validate-Df6Dvwbw.d.mts} +12 -7
- package/dist/validate-Df6Dvwbw.d.mts.map +1 -0
- package/dist/{validation-D83n7Npi.mjs → validation-CzMJn9Ku.mjs} +13 -11
- package/dist/{validation-D83n7Npi.mjs.map → validation-CzMJn9Ku.mjs.map} +1 -1
- package/dist/version-CK67_SXX.mjs +7 -0
- package/dist/{version-ri-sCyAp.mjs.map → version-CK67_SXX.mjs.map} +1 -1
- package/dist/{widgets-CpmZd9Q-.mjs → widgets-RFVAxQl3.mjs} +18 -5
- package/dist/widgets-RFVAxQl3.mjs.map +1 -0
- package/dist/{wxr-taxonomies-BFd0y72_.d.mts → wxr-taxonomies-BX4yQL9s.d.mts} +1 -1
- package/dist/{wxr-taxonomies-BFd0y72_.d.mts.map → wxr-taxonomies-BX4yQL9s.d.mts.map} +1 -1
- package/dist/{wxr-taxonomies-Df4vxWcU.mjs → wxr-taxonomies-Csdp7yde.mjs} +4 -4
- package/dist/{wxr-taxonomies-Df4vxWcU.mjs.map → wxr-taxonomies-Csdp7yde.mjs.map} +1 -1
- package/dist/{zod-generator-DylzusHh.mjs → zod-generator-CNRGdnBY.mjs} +11 -7
- package/dist/zod-generator-CNRGdnBY.mjs.map +1 -0
- package/package.json +16 -11
- package/src/api/errors.ts +9 -0
- package/src/api/handlers/content.ts +115 -90
- package/src/api/handlers/entry-lock.ts +206 -0
- package/src/api/handlers/index.ts +1 -0
- package/src/api/handlers/manifest.ts +162 -12
- package/src/api/handlers/marketplace.ts +28 -20
- package/src/api/handlers/media.ts +30 -0
- package/src/api/handlers/menus.ts +9 -0
- package/src/api/handlers/registry.ts +406 -297
- package/src/api/handlers/revision.ts +2 -1
- package/src/api/handlers/seo.ts +10 -1
- package/src/api/handlers/snapshot.ts +84 -72
- package/src/api/handlers/taxonomies.ts +25 -9
- package/src/api/openapi/document.ts +196 -11
- package/src/api/parse.ts +1 -1
- package/src/api/schemas/auth.ts +4 -4
- package/src/api/schemas/bylines.ts +3 -3
- package/src/api/schemas/comments.ts +1 -1
- package/src/api/schemas/common.ts +3 -2
- package/src/api/schemas/content.ts +86 -22
- package/src/api/schemas/entry-lock.ts +48 -0
- package/src/api/schemas/index.ts +1 -0
- package/src/api/schemas/media.ts +52 -0
- package/src/api/schemas/redirects.ts +6 -1
- package/src/api/schemas/schema.ts +14 -1
- package/src/api/schemas/setup.ts +1 -1
- package/src/api/schemas/taxonomies.ts +2 -2
- package/src/api/schemas/users.ts +1 -1
- package/src/api/types.ts +25 -10
- package/src/astro/dev-typegen.ts +35 -0
- package/src/astro/image-endpoint.ts +2 -2
- package/src/astro/integration/dev-typegen.ts +91 -0
- package/src/astro/integration/index.ts +18 -50
- package/src/astro/integration/routes.ts +10 -0
- package/src/astro/integration/runtime.ts +13 -5
- package/src/astro/integration/vite-config.ts +51 -2
- package/src/astro/middleware.ts +21 -0
- package/src/astro/routes/api/admin/api-tokens/index.ts +4 -1
- package/src/astro/routes/api/admin/oauth-clients/[id].ts +1 -1
- package/src/astro/routes/api/admin/oauth-clients/index.ts +1 -1
- package/src/astro/routes/api/admin/plugins/registry/[id]/update.ts +4 -0
- package/src/astro/routes/api/admin/plugins/registry/artifact.ts +3 -7
- package/src/astro/routes/api/admin/plugins/registry/install.ts +4 -0
- package/src/astro/routes/api/admin/plugins/registry/verify.ts +60 -0
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +18 -2
- package/src/astro/routes/api/content/[collection]/[id]/lock.ts +133 -0
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +12 -1
- package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +20 -0
- package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +16 -2
- package/src/astro/routes/api/content/[collection]/[id].ts +27 -2
- package/src/astro/routes/api/content/[collection]/index.ts +3 -0
- package/src/astro/routes/api/manifest.ts +1 -1
- package/src/astro/routes/api/media/[id]/replace.ts +114 -0
- package/src/astro/routes/api/media/file/[...key].ts +4 -1
- package/src/astro/routes/api/media/upload-url.ts +8 -4
- package/src/astro/routes/api/media.ts +54 -8
- package/src/astro/routes/api/menus/[name]/items/[id].ts +7 -2
- package/src/astro/routes/api/menus/[name]/items.ts +4 -1
- package/src/astro/routes/api/menus/[name]/reorder.ts +4 -1
- package/src/astro/routes/api/menus/[name]/translations.ts +4 -1
- package/src/astro/routes/api/menus/[name].ts +7 -2
- package/src/astro/routes/api/menus/index.ts +4 -1
- package/src/astro/routes/api/settings/email.ts +1 -1
- package/src/astro/routes/api/settings.ts +4 -1
- package/src/astro/routes/api/taxonomies/[name]/reorder.ts +4 -1
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug]/translations.ts +4 -1
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug].ts +7 -2
- package/src/astro/routes/api/taxonomies/[name]/terms/index.ts +4 -1
- package/src/astro/routes/api/taxonomies/[name].ts +7 -2
- package/src/astro/routes/api/taxonomies/index.ts +4 -1
- package/src/astro/routes/api/widget-areas/[name]/reorder.ts +3 -1
- package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +5 -2
- package/src/astro/routes/api/widget-areas/[name]/widgets.ts +3 -1
- package/src/astro/routes/api/widget-areas/[name].ts +3 -1
- package/src/astro/routes/api/widget-areas/index.ts +3 -1
- package/src/astro/routes/sitemap-[collection].xml.ts +4 -0
- package/src/astro/types.ts +36 -8
- package/src/auth/challenge-store.ts +3 -1
- package/src/aws-sdk.d.ts +1 -0
- package/src/cache/chrome-tags.ts +24 -0
- package/src/cli/commands/content.ts +31 -5
- package/src/cli/commands/export-seed.ts +2 -0
- package/src/client/index.ts +34 -7
- package/src/components/EmDashBodyEnd.astro +4 -1
- package/src/components/EmDashBodyStart.astro +4 -1
- package/src/components/EmDashHead.astro +35 -16
- package/src/components/EmDashImage.astro +2 -1
- package/src/components/EmDashMedia.astro +2 -1
- package/src/components/Gallery.astro +18 -4
- package/src/components/InlineEditor.astro +3 -1
- package/src/components/InlinePortableTextEditor.tsx +112 -12
- package/src/components/PortableText.astro +4 -0
- package/src/components/Table.astro +147 -62
- package/src/components/widgets/Archives.astro +2 -37
- package/src/config/errors.ts +13 -0
- package/src/content/converters/index.ts +2 -0
- package/src/content/converters/mark-safety.ts +1 -0
- package/src/content/converters/portable-text-identity.ts +139 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +226 -69
- package/src/content/converters/prosemirror-to-portable-text.ts +128 -28
- package/src/content/converters/types.ts +11 -0
- package/src/database/dialect-helpers.ts +125 -0
- package/src/database/migrations/017_authorization_codes.ts +14 -4
- package/src/database/migrations/074_content_deleted_scheduled_index.ts +55 -0
- package/src/database/migrations/075_entry_edit_locks.ts +44 -0
- package/src/database/migrations/076_collection_nav_group.ts +22 -0
- package/src/database/migrations/077_plugin_storage_revisions.ts +89 -0
- package/src/database/migrations/runner.ts +9 -1
- package/src/database/repositories/byline.ts +32 -16
- package/src/database/repositories/content.ts +284 -48
- package/src/database/repositories/entry-locks.ts +257 -0
- package/src/database/repositories/media-usage.ts +66 -37
- package/src/database/repositories/media.ts +60 -1
- package/src/database/repositories/options.ts +69 -5
- package/src/database/repositories/plugin-storage.ts +233 -9
- package/src/database/repositories/redirect.ts +17 -6
- package/src/database/repositories/taxonomy.ts +8 -0
- package/src/database/repositories/types.ts +11 -7
- package/src/database/types.ts +15 -1
- package/src/db/adapters.ts +8 -1
- package/src/db/postgres.ts +23 -0
- package/src/emdash-runtime.ts +196 -199
- package/src/fields/boolean.ts +1 -1
- package/src/fields/datetime.ts +1 -1
- package/src/fields/file.ts +1 -1
- package/src/fields/integer.ts +1 -1
- package/src/fields/json.ts +1 -1
- package/src/fields/multiselect.ts +1 -1
- package/src/fields/number.ts +1 -1
- package/src/fields/portable-text.ts +1 -1
- package/src/fields/richtext.ts +1 -1
- package/src/fields/select.ts +1 -1
- package/src/fields/slug.ts +1 -1
- package/src/fields/text.ts +1 -1
- package/src/fields/textarea.ts +1 -1
- package/src/fields/types.ts +2 -2
- package/src/i18n/resolve.ts +44 -4
- package/src/index.ts +39 -3
- package/src/loader.ts +96 -12
- package/src/mcp/server.ts +251 -29
- package/src/media/image-endpoint.ts +5 -2
- package/src/media/normalize.ts +15 -4
- package/src/media/responsive.ts +23 -0
- package/src/media/usage/cleanup.ts +9 -8
- package/src/media/usage/content-refresh.ts +2 -1
- package/src/menus/index.ts +33 -21
- package/src/object-cache/index.ts +44 -2
- package/src/page/seo-contributions.ts +78 -1
- package/src/page/seo-panel.ts +47 -0
- package/src/plugin-types.ts +27 -1
- package/src/plugins/conditional-storage.ts +30 -0
- package/src/plugins/context.ts +49 -17
- package/src/plugins/hooks.ts +10 -1
- package/src/plugins/index.ts +15 -0
- package/src/plugins/manager.ts +6 -2
- package/src/plugins/manifest-schema.ts +1 -1
- package/src/plugins/routes.ts +3 -1
- package/src/plugins/sandbox/hook-result.ts +52 -0
- package/src/plugins/sandbox/index.ts +10 -0
- package/src/plugins/sandbox/types.ts +16 -2
- package/src/plugins/storage-query.ts +45 -0
- package/src/plugins/storage-update.ts +96 -0
- package/src/plugins/types.ts +120 -0
- package/src/query.ts +29 -3
- package/src/registry/artifact-checksum.ts +15 -0
- package/src/registry/artifact-verification.ts +85 -0
- package/src/registry/authoritative-records.ts +180 -0
- package/src/registry/config.ts +130 -27
- package/src/registry/record-labels.ts +28 -0
- package/src/registry/types.ts +5 -6
- package/src/schema/collection-slugs-cache.ts +157 -0
- package/src/schema/registry.ts +45 -3
- package/src/schema/types.ts +25 -6
- package/src/schema/zod-generator.ts +16 -13
- package/src/security/ssrf.ts +172 -143
- package/src/seed/apply.ts +4 -0
- package/src/seed/types.ts +7 -2
- package/src/seed/validate.ts +18 -1
- package/src/seo/hreflang.ts +1 -0
- package/src/seo/index.ts +5 -10
- package/src/seo/media-url.ts +26 -0
- package/src/settings/index.ts +16 -0
- package/src/storage/local.ts +1 -0
- package/src/storage/s3.ts +2 -0
- package/src/storage/types.ts +2 -0
- package/src/taxonomies/index.ts +40 -20
- package/src/taxonomies/term-counts.ts +22 -5
- package/src/widgets/archives.ts +67 -0
- package/src/widgets/index.ts +16 -0
- package/dist/api-B0w3uBiG.mjs +0 -2269
- package/dist/api-B0w3uBiG.mjs.map +0 -1
- package/dist/apply-B_VMpJ2P.mjs.map +0 -1
- package/dist/byline-Cpnwrje1.mjs.map +0 -1
- package/dist/challenge-store-D5pSY2S1.mjs.map +0 -1
- package/dist/content-CP-SeXNa.mjs.map +0 -1
- package/dist/content-refresh-DLOfIhYc.mjs.map +0 -1
- package/dist/context-BR5hRWiK.mjs.map +0 -1
- package/dist/dialect-helpers-BSbfaO3F.mjs.map +0 -1
- package/dist/errors-n2j49uNf.mjs.map +0 -1
- package/dist/index-DWbJrsAg.d.mts.map +0 -1
- package/dist/loader-ZsjE4paL.mjs.map +0 -1
- package/dist/manifest-schema-CUYPfCEH.mjs.map +0 -1
- package/dist/media-BjwNuLEu.mjs.map +0 -1
- package/dist/media-D6SeAfBl.mjs.map +0 -1
- package/dist/media-url-DH7giMx_.mjs.map +0 -1
- package/dist/menus-CNg0QlDt.mjs.map +0 -1
- package/dist/normalize-CSxdKBVa.mjs.map +0 -1
- package/dist/object-cache-71tPfV4A.mjs.map +0 -1
- package/dist/options-BHPeIbBd.mjs.map +0 -1
- package/dist/options-BhZIeFY1.d.mts.map +0 -1
- package/dist/query-D18vTdha.mjs.map +0 -1
- package/dist/redirect-CZkbozu9.mjs.map +0 -1
- package/dist/redirects-CRIM55KH.mjs.map +0 -1
- package/dist/registry-BiO5WwPq.mjs +0 -2716
- package/dist/registry-BiO5WwPq.mjs.map +0 -1
- package/dist/registry-Cx-jEJOS.mjs.map +0 -1
- package/dist/relations-BTPM2saV.mjs.map +0 -1
- package/dist/relations-C7B46bcU.d.mts.map +0 -1
- package/dist/resolve-DxUpTMmE.mjs.map +0 -1
- package/dist/runner-77GOZCnH.mjs.map +0 -1
- package/dist/runner-zgqA_CqP.d.mts.map +0 -1
- package/dist/seo-BSiTIXzd.mjs.map +0 -1
- package/dist/settings-BgN-0DT-.mjs.map +0 -1
- package/dist/snapshot-DSB8P7Lm.mjs.map +0 -1
- package/dist/ssrf-DqebVE34.mjs.map +0 -1
- package/dist/taxonomies-CPGxo-bn.mjs.map +0 -1
- package/dist/taxonomies-kmyudNGP.mjs.map +0 -1
- package/dist/types-75KIqzL9.mjs.map +0 -1
- package/dist/types-Br-ERaxh.d.mts.map +0 -1
- package/dist/types-D6OcIp2P.mjs +0 -3
- package/dist/types-DHxzBjbD.d.mts.map +0 -1
- package/dist/types-DJQxln7q.d.mts.map +0 -1
- package/dist/types-D_DWe7k9.d.mts.map +0 -1
- package/dist/types-Vg6f5i3s.d.mts.map +0 -1
- package/dist/validate-Dd-IUjnZ.mjs.map +0 -1
- package/dist/validate-DlqdOZXB.d.mts.map +0 -1
- package/dist/version-ri-sCyAp.mjs +0 -7
- package/dist/widgets-CpmZd9Q-.mjs.map +0 -1
- package/dist/zod-generator-DylzusHh.mjs.map +0 -1
- /package/dist/{api-tokens-B5NHLNUN.mjs → api-tokens-B_lfpmH3.mjs} +0 -0
- /package/dist/{ssrf-BPKzkm6O.mjs → ssrf-TQhaljuI.mjs} +0 -0
|
@@ -1,46 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Registry
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* aggregator's `resolvePackage` XRPC.
|
|
9
|
-
* 2. Look up the requested release (or the policy-filtered latest one)
|
|
10
|
-
* via `getLatestRelease` / `listReleases`.
|
|
11
|
-
* 3. Require the aggregator's approved listing projection, then apply the
|
|
12
|
-
* independent release-age and environment policies.
|
|
13
|
-
* 4. Fetch the bundle artifact through an advertised record-scoped cache,
|
|
14
|
-
* the publisher PDS, or the publisher-declared URL.
|
|
15
|
-
* 5. Verify the artifact's multibase checksum against the signed
|
|
16
|
-
* release record's `artifacts.package.checksum`.
|
|
17
|
-
* 6. Extract `manifest.json` + `backend.js` + optional `admin.js` from
|
|
18
|
-
* the gzipped tar bundle.
|
|
19
|
-
* 7. Store the extracted files in site-local R2 under the
|
|
20
|
-
* `registry/<plugin-id>/<version>/` prefix.
|
|
21
|
-
* 8. Write a `plugin_states` row with `source = "registry"` and the
|
|
22
|
-
* `(publisher_did, slug)` pair so updates can be resolved later.
|
|
23
|
-
* 9. Sync the runtime so the plugin becomes active immediately.
|
|
24
|
-
*
|
|
25
|
-
* Known gaps (tracked separately):
|
|
26
|
-
*
|
|
27
|
-
* - The aggregator-supplied records are not yet cryptographically
|
|
28
|
-
* verified against the publisher's MST signature. The signed bytes
|
|
29
|
-
* and CIDs are passed through verbatim per the lexicon, but full
|
|
30
|
-
* PDS-direct verification with proof traversal is follow-up work.
|
|
31
|
-
* The artifact checksum is verified end-to-end against the value
|
|
32
|
-
* in the (aggregator-relayed) release record, which is the actual
|
|
33
|
-
* trust boundary for the bytes that end up in the sandbox.
|
|
34
|
-
* - Listing approval controls whether metadata is eligible for discovery.
|
|
35
|
-
* It is never treated as approval of plugin code: checksum, bundle,
|
|
36
|
-
* manifest, access, consent, sandbox, and environment gates remain
|
|
37
|
-
* independent below.
|
|
2
|
+
* Registry installs use aggregator results only for discovery and moderation
|
|
3
|
+
* metadata. The handler reads profile and release records from the publisher's
|
|
4
|
+
* PDS, verifies their repository proofs, then validates the bundle checksum,
|
|
5
|
+
* manifest, policy, and consent before storing or activating executable code.
|
|
6
|
+
* Applicable labels can block installation but cannot supply any verified
|
|
7
|
+
* record, checksum, permission, or executable byte.
|
|
38
8
|
*/
|
|
39
9
|
|
|
40
10
|
import { ClientResponseError, ClientValidationError } from "@atcute/client";
|
|
41
11
|
import type { Did } from "@atcute/lexicons";
|
|
12
|
+
import { canonicalizeDeclaredAccess } from "@emdash-cms/plugin-types";
|
|
13
|
+
import type { CanonicalDeclaredAccess } from "@emdash-cms/plugin-types";
|
|
42
14
|
import { checkEnvCompatibility, findSkippedEnvConstraints } from "@emdash-cms/registry-client/env";
|
|
43
15
|
import type { HostEnv } from "@emdash-cms/registry-client/env";
|
|
16
|
+
import { isProvenFirstRelease } from "@emdash-cms/registry-client/listing-policy";
|
|
44
17
|
import { evaluateRegistryReleaseWithdrawal } from "@emdash-cms/registry-client/withdrawal";
|
|
45
18
|
import { NSID } from "@emdash-cms/registry-lexicons";
|
|
46
19
|
import {
|
|
@@ -50,8 +23,7 @@ import {
|
|
|
50
23
|
import type { Kysely } from "kysely";
|
|
51
24
|
|
|
52
25
|
import type { Database } from "../../database/types.js";
|
|
53
|
-
import {
|
|
54
|
-
import type { PluginBundle } from "../../plugins/marketplace.js";
|
|
26
|
+
import { withUnavailableReason } from "../../plugins/sandbox/types.js";
|
|
55
27
|
import type { SandboxRunner } from "../../plugins/sandbox/types.js";
|
|
56
28
|
import { PluginStateRepository } from "../../plugins/state.js";
|
|
57
29
|
import {
|
|
@@ -61,6 +33,19 @@ import {
|
|
|
61
33
|
import { declaredAccessToCapabilities } from "../../plugins/types.js";
|
|
62
34
|
import type { DeclaredAccess } from "../../plugins/types.js";
|
|
63
35
|
import { fetchRegistryArtifactUrl } from "../../registry/artifact-fetch.js";
|
|
36
|
+
import {
|
|
37
|
+
validateRegistryArtifact,
|
|
38
|
+
type RegistryArtifactVerificationCode,
|
|
39
|
+
} from "../../registry/artifact-verification.js";
|
|
40
|
+
import {
|
|
41
|
+
readAuthoritativePackageRelease,
|
|
42
|
+
verifyAuthoritativePackageRelease,
|
|
43
|
+
type AuthoritativeRecordErrorCode,
|
|
44
|
+
type AuthoritativeRecordReader,
|
|
45
|
+
type AuthoritativeRecordReadOptions,
|
|
46
|
+
type VerifiedAuthoritativeReleaseReport,
|
|
47
|
+
type VerifiedAuthoritativeRecords,
|
|
48
|
+
} from "../../registry/authoritative-records.js";
|
|
64
49
|
import {
|
|
65
50
|
canonicalCapabilitiesForDriftCheck,
|
|
66
51
|
coerceRegistryConfig,
|
|
@@ -69,6 +54,7 @@ import {
|
|
|
69
54
|
validateAggregatorUrl,
|
|
70
55
|
} from "../../registry/config.js";
|
|
71
56
|
import { makeRegistryPluginId } from "../../registry/plugin-id.js";
|
|
57
|
+
import { hasCurrentRecordLabel } from "../../registry/record-labels.js";
|
|
72
58
|
import type { RegistryConfigInput } from "../../registry/types.js";
|
|
73
59
|
import { resolveAndValidateExternalUrlTarget } from "../../security/ssrf.js";
|
|
74
60
|
import { EmDashStorageError } from "../../storage/types.js";
|
|
@@ -84,8 +70,6 @@ import {
|
|
|
84
70
|
|
|
85
71
|
export { assertSafeArtifactUrl } from "../../registry/artifact-fetch.js";
|
|
86
72
|
|
|
87
|
-
const RELEASE_EXTENSION_NSID = "com.emdashcms.experimental.package.releaseExtension";
|
|
88
|
-
|
|
89
73
|
/**
|
|
90
74
|
* Whether two `declaredAccess` blocks grant exactly the same enforced access --
|
|
91
75
|
* the same capabilities AND the same host allow-list. Both are lowered through
|
|
@@ -104,6 +88,10 @@ export function enforcedAccessEqual(a: DeclaredAccess, b: DeclaredAccess): boole
|
|
|
104
88
|
);
|
|
105
89
|
}
|
|
106
90
|
|
|
91
|
+
function verifiedAccessEqual(a: CanonicalDeclaredAccess, b: DeclaredAccess): boolean {
|
|
92
|
+
return JSON.stringify(a) === JSON.stringify(canonicalizeDeclaredAccess(b));
|
|
93
|
+
}
|
|
94
|
+
|
|
107
95
|
// ── Types ──────────────────────────────────────────────────────────
|
|
108
96
|
|
|
109
97
|
export interface RegistryInstallInput {
|
|
@@ -134,6 +122,8 @@ export interface RegistryInstallInput {
|
|
|
134
122
|
*/
|
|
135
123
|
acknowledgedDeclaredAccess?: unknown;
|
|
136
124
|
acknowledgedMcpTools?: unknown;
|
|
125
|
+
acknowledgedProfileCid?: string;
|
|
126
|
+
acknowledgedReleaseCid?: string;
|
|
137
127
|
}
|
|
138
128
|
|
|
139
129
|
export interface RegistryInstallResult {
|
|
@@ -147,84 +137,120 @@ export interface RegistryInstallResult {
|
|
|
147
137
|
version: string;
|
|
148
138
|
/** Capabilities surfaced from the bundle's manifest. */
|
|
149
139
|
capabilities: string[];
|
|
140
|
+
declaredAccess: DeclaredAccess;
|
|
141
|
+
mcpTools: RegistryMcpConsentTool[];
|
|
142
|
+
verification: RegistryRecordVerificationSummary;
|
|
150
143
|
}
|
|
151
144
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
145
|
+
export interface RegistryMcpConsentTool {
|
|
146
|
+
name: string;
|
|
147
|
+
description: string;
|
|
148
|
+
route: string;
|
|
149
|
+
permission: string;
|
|
150
|
+
destructive: boolean;
|
|
151
|
+
}
|
|
156
152
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
153
|
+
export interface RegistryRecordVerificationSummary {
|
|
154
|
+
profileCid: string;
|
|
155
|
+
releaseCid: string;
|
|
156
|
+
provenance: "verified" | "absent-optional";
|
|
157
|
+
policy: {
|
|
158
|
+
requireProvenance: boolean;
|
|
159
|
+
confirmation: "escalation-only" | "always";
|
|
160
|
+
approvers: string[];
|
|
161
|
+
};
|
|
163
162
|
}
|
|
164
163
|
|
|
165
|
-
|
|
166
|
-
const MULTIHASH_SHA256_CODE = 0x12;
|
|
167
|
-
/** sha2-256 digest length in bytes (single-byte varint). */
|
|
168
|
-
const MULTIHASH_SHA256_LENGTH = 0x20;
|
|
164
|
+
// ── Helpers ────────────────────────────────────────────────────────
|
|
169
165
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
166
|
+
export function registryArtifactError(
|
|
167
|
+
code: RegistryArtifactVerificationCode,
|
|
168
|
+
message: string,
|
|
169
|
+
operation: "install" | "update",
|
|
170
|
+
): ApiResult<never> {
|
|
171
|
+
let apiCode: string;
|
|
172
|
+
switch (code) {
|
|
173
|
+
case "BUNDLE_ID_MISMATCH":
|
|
174
|
+
apiCode = operation === "install" ? "MANIFEST_ID_MISMATCH" : "BUNDLE_IDENTITY_MISMATCH";
|
|
175
|
+
break;
|
|
176
|
+
case "BUNDLE_VERSION_MISMATCH":
|
|
177
|
+
apiCode = operation === "install" ? "MANIFEST_VERSION_MISMATCH" : code;
|
|
178
|
+
break;
|
|
179
|
+
case "CHECKSUM_MISMATCH":
|
|
180
|
+
case "INVALID_MULTIHASH":
|
|
181
|
+
case "UNSUPPORTED_MULTIHASH":
|
|
182
|
+
apiCode = "CHECKSUM_MISMATCH";
|
|
183
|
+
break;
|
|
184
|
+
case "FETCH_FAILED":
|
|
185
|
+
case "HOST_REJECTED":
|
|
186
|
+
case "REDIRECT_LIMIT_EXCEEDED":
|
|
187
|
+
case "REDIRECT_LOCATION_MISSING":
|
|
188
|
+
case "RESOURCE_STATUS_ERROR":
|
|
189
|
+
case "RESOURCE_TIMEOUT":
|
|
190
|
+
apiCode = operation === "install" ? "INSTALL_FAILED" : "UPDATE_FAILED";
|
|
191
|
+
break;
|
|
192
|
+
default:
|
|
193
|
+
apiCode = "INVALID_BUNDLE";
|
|
194
|
+
}
|
|
195
|
+
return {
|
|
196
|
+
success: false,
|
|
197
|
+
error: {
|
|
198
|
+
code: apiCode,
|
|
199
|
+
message,
|
|
200
|
+
details: { verificationCode: code },
|
|
201
|
+
},
|
|
202
|
+
};
|
|
191
203
|
}
|
|
192
204
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
* Hash functions other than sha2-256 are out of scope for this
|
|
207
|
-
* initial release; the install fails closed.
|
|
208
|
-
*/
|
|
209
|
-
export async function verifyChecksum(bytes: Uint8Array, checksum: string): Promise<boolean> {
|
|
210
|
-
if (SHA256_HEX_PATTERN.test(checksum)) {
|
|
211
|
-
const actual = await sha256Hex(bytes);
|
|
212
|
-
return checksum.toLowerCase() === actual;
|
|
213
|
-
}
|
|
205
|
+
function registryRecordError(
|
|
206
|
+
code: AuthoritativeRecordErrorCode,
|
|
207
|
+
message: string,
|
|
208
|
+
): ApiResult<never> {
|
|
209
|
+
return {
|
|
210
|
+
success: false,
|
|
211
|
+
error: {
|
|
212
|
+
code: "RECORD_VERIFICATION_FAILED",
|
|
213
|
+
message,
|
|
214
|
+
details: { verificationCode: code },
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
}
|
|
214
218
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
219
|
+
function recordConsentError(
|
|
220
|
+
input: { profileCid?: string; releaseCid?: string },
|
|
221
|
+
records: VerifiedAuthoritativeRecords,
|
|
222
|
+
): ApiResult<never> | null {
|
|
223
|
+
if (!input.profileCid || !input.releaseCid) {
|
|
224
|
+
return {
|
|
225
|
+
success: false,
|
|
226
|
+
error: {
|
|
227
|
+
code: "RECORD_CONSENT_REQUIRED",
|
|
228
|
+
message: "Verify the signed package records before confirming this action.",
|
|
229
|
+
},
|
|
230
|
+
};
|
|
225
231
|
}
|
|
232
|
+
if (input.profileCid !== records.profile.cid || input.releaseCid !== records.release.cid) {
|
|
233
|
+
return {
|
|
234
|
+
success: false,
|
|
235
|
+
error: {
|
|
236
|
+
code: "RECORD_VERIFICATION_DRIFT",
|
|
237
|
+
message: "The signed package records changed after review. Verify them again.",
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
return null;
|
|
242
|
+
}
|
|
226
243
|
|
|
227
|
-
|
|
244
|
+
function recordVerificationSummary(
|
|
245
|
+
records: VerifiedAuthoritativeRecords,
|
|
246
|
+
report: VerifiedAuthoritativeReleaseReport,
|
|
247
|
+
): RegistryRecordVerificationSummary {
|
|
248
|
+
return {
|
|
249
|
+
profileCid: records.profile.cid,
|
|
250
|
+
releaseCid: records.release.cid,
|
|
251
|
+
provenance: report.provenance.status,
|
|
252
|
+
policy: report.value.policy,
|
|
253
|
+
};
|
|
228
254
|
}
|
|
229
255
|
|
|
230
256
|
/**
|
|
@@ -281,6 +307,16 @@ const AGGREGATOR_REQUEST_TIMEOUT_MS = 15_000;
|
|
|
281
307
|
*/
|
|
282
308
|
const AGGREGATOR_TOTAL_BUDGET_MS = 30_000;
|
|
283
309
|
|
|
310
|
+
class RegistryArtifactFetchError extends Error {
|
|
311
|
+
constructor(
|
|
312
|
+
readonly code: RegistryArtifactVerificationCode,
|
|
313
|
+
message: string,
|
|
314
|
+
) {
|
|
315
|
+
super(message);
|
|
316
|
+
this.name = "RegistryArtifactFetchError";
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
284
320
|
/** Build a fetch function that enforces a per-request and per-budget timeout. */
|
|
285
321
|
function timedFetch(totalDeadline: number): typeof fetch {
|
|
286
322
|
return (input: Parameters<typeof fetch>[0], init?: Parameters<typeof fetch>[1]) => {
|
|
@@ -339,7 +375,7 @@ async function fetchArtifact(
|
|
|
339
375
|
},
|
|
340
376
|
);
|
|
341
377
|
if (!result.success) {
|
|
342
|
-
throw new
|
|
378
|
+
throw new RegistryArtifactFetchError(result.error.code, result.error.message);
|
|
343
379
|
}
|
|
344
380
|
return result.value.bytes;
|
|
345
381
|
}
|
|
@@ -398,7 +434,13 @@ export async function handleRegistryInstall(
|
|
|
398
434
|
sandboxRunner: SandboxRunner | null,
|
|
399
435
|
registryConfigInput: RegistryConfigInput | undefined,
|
|
400
436
|
input: RegistryInstallInput,
|
|
401
|
-
opts?: {
|
|
437
|
+
opts?: {
|
|
438
|
+
configuredPluginIds?: Set<string>;
|
|
439
|
+
hostEnv?: HostEnv;
|
|
440
|
+
authoritativeRecords?: AuthoritativeRecordReadOptions;
|
|
441
|
+
readAuthoritativeRecords?: AuthoritativeRecordReader;
|
|
442
|
+
verifyOnly?: boolean;
|
|
443
|
+
},
|
|
402
444
|
): Promise<ApiResult<RegistryInstallResult>> {
|
|
403
445
|
// Accept either the bare-string shorthand or the full
|
|
404
446
|
// `RegistryConfig` object (see `RegistryConfigInput`).
|
|
@@ -428,7 +470,10 @@ export async function handleRegistryInstall(
|
|
|
428
470
|
success: false,
|
|
429
471
|
error: {
|
|
430
472
|
code: "SANDBOX_NOT_AVAILABLE",
|
|
431
|
-
message:
|
|
473
|
+
message: withUnavailableReason(
|
|
474
|
+
"Sandbox runner is required for registry plugins",
|
|
475
|
+
sandboxRunner,
|
|
476
|
+
),
|
|
432
477
|
},
|
|
433
478
|
};
|
|
434
479
|
}
|
|
@@ -549,19 +594,9 @@ export async function handleRegistryInstall(
|
|
|
549
594
|
};
|
|
550
595
|
}
|
|
551
596
|
|
|
552
|
-
//
|
|
553
|
-
//
|
|
554
|
-
//
|
|
555
|
-
// different `(did, slug, version)` than we asked for; the
|
|
556
|
-
// handler would then fetch + checksum-verify + install bytes
|
|
557
|
-
// under the requested package's pluginId but for a different
|
|
558
|
-
// publisher's record. Checksum verification only proves the bytes
|
|
559
|
-
// match the *returned* record, not that the record belongs to
|
|
560
|
-
// the package we requested.
|
|
561
|
-
// `releaseView.release` is validated against the release lexicon by
|
|
562
|
-
// DiscoveryClient (or `null` if it didn't conform). A `null` here makes
|
|
563
|
-
// the identity checks below fail closed, which is the desired outcome.
|
|
564
|
-
const signedRelease = releaseView.release;
|
|
597
|
+
// The aggregator selects the package/version and supplies mirrors and
|
|
598
|
+
// moderation metadata. Its copies of the signed records are not
|
|
599
|
+
// verification inputs.
|
|
565
600
|
if (packageView.did !== publisherDid || packageView.slug !== slug) {
|
|
566
601
|
return {
|
|
567
602
|
success: false,
|
|
@@ -574,9 +609,7 @@ export async function handleRegistryInstall(
|
|
|
574
609
|
if (
|
|
575
610
|
releaseView.did !== publisherDid ||
|
|
576
611
|
releaseView.package !== slug ||
|
|
577
|
-
|
|
578
|
-
(requestedVersion !== undefined && releaseView.version !== requestedVersion) ||
|
|
579
|
-
signedRelease?.version !== releaseView.version
|
|
612
|
+
(requestedVersion !== undefined && releaseView.version !== requestedVersion)
|
|
580
613
|
) {
|
|
581
614
|
return {
|
|
582
615
|
success: false,
|
|
@@ -599,6 +632,55 @@ export async function handleRegistryInstall(
|
|
|
599
632
|
};
|
|
600
633
|
}
|
|
601
634
|
|
|
635
|
+
const authoritative = await (opts?.readAuthoritativeRecords ?? readAuthoritativePackageRelease)(
|
|
636
|
+
publisherDid,
|
|
637
|
+
slug,
|
|
638
|
+
version,
|
|
639
|
+
opts?.authoritativeRecords,
|
|
640
|
+
);
|
|
641
|
+
if (!authoritative.success) {
|
|
642
|
+
return registryRecordError(authoritative.error.code, authoritative.error.message);
|
|
643
|
+
}
|
|
644
|
+
const records = authoritative.value;
|
|
645
|
+
const { profile, release } = records.inspection.value;
|
|
646
|
+
if (
|
|
647
|
+
packageView.uri !== records.profile.uri ||
|
|
648
|
+
packageView.cid !== records.profile.cid ||
|
|
649
|
+
releaseView.uri !== records.release.uri ||
|
|
650
|
+
releaseView.cid !== records.release.cid
|
|
651
|
+
) {
|
|
652
|
+
return {
|
|
653
|
+
success: false,
|
|
654
|
+
error: {
|
|
655
|
+
code: "AGGREGATOR_RECORD_MISMATCH",
|
|
656
|
+
message: "Aggregator metadata does not match the publisher's signed records.",
|
|
657
|
+
},
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
if (!opts?.verifyOnly) {
|
|
661
|
+
const consentError = recordConsentError(
|
|
662
|
+
{
|
|
663
|
+
profileCid: input.acknowledgedProfileCid,
|
|
664
|
+
releaseCid: input.acknowledgedReleaseCid,
|
|
665
|
+
},
|
|
666
|
+
records,
|
|
667
|
+
);
|
|
668
|
+
if (consentError) return consentError;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
const packageYanked =
|
|
672
|
+
hasCurrentRecordLabel(packageView.labels ?? [], "security:yanked", records.profile) ||
|
|
673
|
+
hasCurrentRecordLabel(packageView.labels ?? [], "security-yanked", records.profile);
|
|
674
|
+
if (packageYanked) {
|
|
675
|
+
return {
|
|
676
|
+
success: false,
|
|
677
|
+
error: {
|
|
678
|
+
code: "RELEASE_YANKED",
|
|
679
|
+
message: "This release has been withdrawn",
|
|
680
|
+
},
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
|
|
602
684
|
// Environment compatibility remains an install-safety gate. Listing
|
|
603
685
|
// approval says only that displayed metadata passed moderation. A release
|
|
604
686
|
// may carry a `requires` block (`env:emdash`, `env:astro`, ...). Refuse
|
|
@@ -607,7 +689,7 @@ export async function handleRegistryInstall(
|
|
|
607
689
|
// disabled Install button. `requires` is lexicon-`unknown`; the
|
|
608
690
|
// helper guards its shape.
|
|
609
691
|
if (opts?.hostEnv) {
|
|
610
|
-
const envError = assertEnvCompatible(
|
|
692
|
+
const envError = assertEnvCompatible(release.requires, opts.hostEnv);
|
|
611
693
|
if (envError) return { success: false, error: envError };
|
|
612
694
|
}
|
|
613
695
|
|
|
@@ -617,13 +699,11 @@ export async function handleRegistryInstall(
|
|
|
617
699
|
// must still hit the holdback. The `minimumReleaseAgeExclude`
|
|
618
700
|
// allowlist short-circuits the check for trusted publisher DIDs.
|
|
619
701
|
//
|
|
620
|
-
//
|
|
621
|
-
//
|
|
622
|
-
//
|
|
623
|
-
//
|
|
624
|
-
//
|
|
625
|
-
// follow-up that adds full MST verification). If the timestamp
|
|
626
|
-
// is missing or malformed, we fail closed and reject the install.
|
|
702
|
+
// `releaseView.indexedAt` is aggregator operational data, not part
|
|
703
|
+
// of the signed release. The release schema has no publication
|
|
704
|
+
// timestamp, so minimum age remains a local discovery holdback
|
|
705
|
+
// rather than a cryptographic property. A missing or malformed
|
|
706
|
+
// timestamp fails closed.
|
|
627
707
|
// `registryConfig` is the user-supplied integration option, not
|
|
628
708
|
// the normalized manifest shape, so the duration parse runs once
|
|
629
709
|
// per install. Catch a malformed value here -- normally caught at
|
|
@@ -653,7 +733,9 @@ export async function handleRegistryInstall(
|
|
|
653
733
|
const exclude = registryConfig.policy?.minimumReleaseAgeExclude?.map((e) =>
|
|
654
734
|
e.trim().toLowerCase(),
|
|
655
735
|
);
|
|
656
|
-
const exempt =
|
|
736
|
+
const exempt =
|
|
737
|
+
releaseExemptFromMinimumAge(exclude, publisherDid, slug) ||
|
|
738
|
+
isProvenFirstRelease(packageView);
|
|
657
739
|
if (!exempt) {
|
|
658
740
|
const indexedAt = Date.parse(releaseView.indexedAt);
|
|
659
741
|
if (!Number.isFinite(indexedAt)) {
|
|
@@ -728,13 +810,10 @@ export async function handleRegistryInstall(
|
|
|
728
810
|
};
|
|
729
811
|
}
|
|
730
812
|
|
|
731
|
-
// Step
|
|
732
|
-
//
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
const release = releaseView.release;
|
|
736
|
-
const packageArtifact = release?.artifacts?.package;
|
|
737
|
-
const declaredChecksum = packageArtifact?.checksum;
|
|
813
|
+
// Step 6: fetch bytes through an aggregator cache, the publisher PDS,
|
|
814
|
+
// or the URL in the authoritative signed release. Every source remains untrusted.
|
|
815
|
+
const packageArtifact = release.artifacts.package;
|
|
816
|
+
const declaredChecksum = release.artifacts.package.checksum;
|
|
738
817
|
|
|
739
818
|
if (!packageArtifact || !declaredChecksum) {
|
|
740
819
|
return {
|
|
@@ -746,72 +825,54 @@ export async function handleRegistryInstall(
|
|
|
746
825
|
};
|
|
747
826
|
}
|
|
748
827
|
|
|
749
|
-
|
|
750
|
-
releaseView.artifactCaches ?? [],
|
|
751
|
-
packageArtifact,
|
|
752
|
-
{
|
|
753
|
-
did: publisherDid,
|
|
754
|
-
collection: NSID.packageRelease,
|
|
755
|
-
rkey: `${slug}:${version}`,
|
|
756
|
-
cid: releaseView.cid,
|
|
757
|
-
},
|
|
758
|
-
release.auth,
|
|
759
|
-
);
|
|
760
|
-
|
|
761
|
-
// Step 5: verify the bytes against the signed record's checksum.
|
|
762
|
-
const checksumOk = await verifyChecksum(artifactBytes, declaredChecksum);
|
|
763
|
-
if (!checksumOk) {
|
|
764
|
-
return {
|
|
765
|
-
success: false,
|
|
766
|
-
error: {
|
|
767
|
-
code: "CHECKSUM_MISMATCH",
|
|
768
|
-
message:
|
|
769
|
-
"Artifact bytes do not match the release record's checksum, or the checksum encoding is unsupported.",
|
|
770
|
-
},
|
|
771
|
-
};
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
// Step 6: extract the bundle.
|
|
775
|
-
let bundle: PluginBundle;
|
|
828
|
+
let artifactBytes: Uint8Array;
|
|
776
829
|
try {
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
830
|
+
artifactBytes = await fetchArtifact(
|
|
831
|
+
releaseView.artifactCaches ?? [],
|
|
832
|
+
packageArtifact,
|
|
833
|
+
{
|
|
834
|
+
did: publisherDid,
|
|
835
|
+
collection: NSID.packageRelease,
|
|
836
|
+
rkey: `${slug}:${version}`,
|
|
837
|
+
cid: releaseView.cid,
|
|
784
838
|
},
|
|
785
|
-
|
|
839
|
+
release.auth,
|
|
840
|
+
);
|
|
841
|
+
} catch (error) {
|
|
842
|
+
if (error instanceof RegistryArtifactFetchError) {
|
|
843
|
+
return registryArtifactError(error.code, error.message, "install");
|
|
844
|
+
}
|
|
845
|
+
throw error;
|
|
786
846
|
}
|
|
787
847
|
|
|
788
|
-
//
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
848
|
+
// Steps 6-7: verify the signed checksum, archive, manifest, and
|
|
849
|
+
// expected package identity with the runtime-neutral verifier used
|
|
850
|
+
// by the release service.
|
|
851
|
+
const artifactReport = await validateRegistryArtifact(
|
|
852
|
+
artifactBytes,
|
|
853
|
+
declaredChecksum,
|
|
854
|
+
slug,
|
|
855
|
+
version,
|
|
856
|
+
);
|
|
857
|
+
if (!artifactReport.success) {
|
|
858
|
+
return registryArtifactError(
|
|
859
|
+
artifactReport.error.code,
|
|
860
|
+
artifactReport.error.message,
|
|
861
|
+
"install",
|
|
862
|
+
);
|
|
797
863
|
}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
success: false,
|
|
809
|
-
error: {
|
|
810
|
-
code: "MANIFEST_ID_MISMATCH",
|
|
811
|
-
message: `Bundle manifest id (${bundle.manifest.id}) does not match registry slug (${slug})`,
|
|
812
|
-
},
|
|
813
|
-
};
|
|
864
|
+
const { bundle, artifactDigest, artifactDigests } = artifactReport.value;
|
|
865
|
+
const recordReport = await verifyAuthoritativePackageRelease(records, artifactDigest, {
|
|
866
|
+
...opts?.authoritativeRecords,
|
|
867
|
+
artifactDigests,
|
|
868
|
+
});
|
|
869
|
+
if (!recordReport.success) {
|
|
870
|
+
return registryRecordError(
|
|
871
|
+
recordReport.code,
|
|
872
|
+
recordReport.reasons[0]?.message ?? "The release provenance is invalid.",
|
|
873
|
+
);
|
|
814
874
|
}
|
|
875
|
+
const verification = recordVerificationSummary(records, recordReport);
|
|
815
876
|
|
|
816
877
|
// Rewrite the manifest's id to the derived opaque pluginId before
|
|
817
878
|
// it reaches R2 storage or the sandbox loader. The sandbox uses
|
|
@@ -829,13 +890,8 @@ export async function handleRegistryInstall(
|
|
|
829
890
|
// outside what the user reviewed. The capability-set consent gate below
|
|
830
891
|
// is blind to constraint content (host scope), so compare the full
|
|
831
892
|
// enforced access of record vs bundle here and refuse on any difference.
|
|
832
|
-
const recordExt =
|
|
833
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- extensions is the lexicon's open `unknown` map; narrow to read our own extension
|
|
834
|
-
(release?.extensions as Record<string, { declaredAccess?: DeclaredAccess }> | undefined)?.[
|
|
835
|
-
RELEASE_EXTENSION_NSID
|
|
836
|
-
];
|
|
837
893
|
if (
|
|
838
|
-
!
|
|
894
|
+
!verifiedAccessEqual(recordReport.value.declaredAccess, bundle.manifest.declaredAccess ?? {})
|
|
839
895
|
) {
|
|
840
896
|
return {
|
|
841
897
|
success: false,
|
|
@@ -849,13 +905,9 @@ export async function handleRegistryInstall(
|
|
|
849
905
|
|
|
850
906
|
// Capability consent gate: the admin MUST acknowledge the
|
|
851
907
|
// capabilities the bundle's manifest actually declares before we
|
|
852
|
-
// install it. The bundle manifest is the
|
|
853
|
-
// the
|
|
854
|
-
//
|
|
855
|
-
// assertion that the publisher may or may not have included,
|
|
856
|
-
// and trusting it would let a malicious publisher (or a
|
|
857
|
-
// compromised aggregator) ship a bundle whose manifest
|
|
858
|
-
// requests `content:*` etc. behind an empty consent dialog.
|
|
908
|
+
// install it. The bundle manifest is the runtime enforcement
|
|
909
|
+
// currency; the exact-equality check above binds it to the
|
|
910
|
+
// independently verified signed release.
|
|
859
911
|
//
|
|
860
912
|
// Two outcomes after normalization (filter to strings, dedupe,
|
|
861
913
|
// sort):
|
|
@@ -872,7 +924,7 @@ export async function handleRegistryInstall(
|
|
|
872
924
|
// the runtime starts enforcing `declaredAccess` natively, this
|
|
873
925
|
// comparison switches to that shape.
|
|
874
926
|
const actualCapabilities = canonicalCapabilitiesForDriftCheck(bundle.manifest.capabilities);
|
|
875
|
-
if (actualCapabilities.length > 0) {
|
|
927
|
+
if (!opts?.verifyOnly && actualCapabilities.length > 0) {
|
|
876
928
|
if (input.acknowledgedDeclaredAccess === undefined) {
|
|
877
929
|
return {
|
|
878
930
|
success: false,
|
|
@@ -902,19 +954,31 @@ export async function handleRegistryInstall(
|
|
|
902
954
|
const actualMcpTools = (bundle.manifest.mcp?.tools ?? []).map(
|
|
903
955
|
({ inputSchema: _, outputSchema: __, ...tool }) => tool,
|
|
904
956
|
);
|
|
905
|
-
if (actualMcpTools.length > 0) {
|
|
957
|
+
if (!opts?.verifyOnly && actualMcpTools.length > 0) {
|
|
906
958
|
if (JSON.stringify(input.acknowledgedMcpTools) !== JSON.stringify(actualMcpTools)) {
|
|
907
959
|
return {
|
|
908
960
|
success: false,
|
|
909
961
|
error: {
|
|
910
962
|
code: "MCP_TOOL_CONSENT_REQUIRED",
|
|
911
963
|
message: "Plugin MCP tools require explicit consent",
|
|
912
|
-
details: { mcpTools: actualMcpTools },
|
|
964
|
+
details: { mcpTools: actualMcpTools, verification },
|
|
913
965
|
},
|
|
914
966
|
};
|
|
915
967
|
}
|
|
916
968
|
}
|
|
917
969
|
|
|
970
|
+
const result: RegistryInstallResult = {
|
|
971
|
+
pluginId,
|
|
972
|
+
publisherDid,
|
|
973
|
+
slug,
|
|
974
|
+
version,
|
|
975
|
+
capabilities: bundle.manifest.capabilities,
|
|
976
|
+
declaredAccess: recordReport.value.releaseExtension.declaredAccess,
|
|
977
|
+
mcpTools: actualMcpTools,
|
|
978
|
+
verification,
|
|
979
|
+
};
|
|
980
|
+
if (opts?.verifyOnly) return { success: true, data: result };
|
|
981
|
+
|
|
918
982
|
// Step 7: store in R2 under the registry prefix.
|
|
919
983
|
await storeBundleInR2(storage, pluginId, version, bundle, "registry");
|
|
920
984
|
|
|
@@ -947,13 +1011,11 @@ export async function handleRegistryInstall(
|
|
|
947
1011
|
// Cleanup is best-effort; if it also fails, the row failure
|
|
948
1012
|
// still surfaces to the caller and the orphan R2 bundle costs
|
|
949
1013
|
// only the storage of a single checksum-verified zip.
|
|
950
|
-
// `packageView.profile` is lexicon-validated by DiscoveryClient (or null).
|
|
951
|
-
const profile = packageView.profile;
|
|
952
1014
|
try {
|
|
953
1015
|
await stateRepo.upsert(pluginId, version, "active", {
|
|
954
1016
|
source: "registry",
|
|
955
|
-
displayName: profile
|
|
956
|
-
description: profile
|
|
1017
|
+
displayName: profile.name ?? slug,
|
|
1018
|
+
description: profile.description ?? undefined,
|
|
957
1019
|
registryPublisherDid: publisherDid,
|
|
958
1020
|
registrySlug: slug,
|
|
959
1021
|
});
|
|
@@ -985,13 +1047,7 @@ export async function handleRegistryInstall(
|
|
|
985
1047
|
|
|
986
1048
|
return {
|
|
987
1049
|
success: true,
|
|
988
|
-
data:
|
|
989
|
-
pluginId,
|
|
990
|
-
publisherDid,
|
|
991
|
-
slug,
|
|
992
|
-
version,
|
|
993
|
-
capabilities: bundle.manifest.capabilities,
|
|
994
|
-
},
|
|
1050
|
+
data: result,
|
|
995
1051
|
};
|
|
996
1052
|
} catch (err) {
|
|
997
1053
|
if (err instanceof ClientValidationError) {
|
|
@@ -1129,6 +1185,7 @@ export interface RegistryUpdateResult {
|
|
|
1129
1185
|
capabilityChanges: { added: string[]; removed: string[] };
|
|
1130
1186
|
/** Set only when `newlyPublic` is non-empty, mirroring marketplace. */
|
|
1131
1187
|
routeVisibilityChanges?: { newlyPublic: string[] };
|
|
1188
|
+
verification: RegistryRecordVerificationSummary;
|
|
1132
1189
|
}
|
|
1133
1190
|
|
|
1134
1191
|
/**
|
|
@@ -1153,7 +1210,11 @@ export async function handleRegistryUpdate(
|
|
|
1153
1210
|
confirmCapabilityChanges?: boolean;
|
|
1154
1211
|
confirmRouteVisibilityChanges?: boolean;
|
|
1155
1212
|
confirmMcpTools?: boolean;
|
|
1213
|
+
acknowledgedProfileCid?: string;
|
|
1214
|
+
acknowledgedReleaseCid?: string;
|
|
1156
1215
|
hostEnv?: HostEnv;
|
|
1216
|
+
authoritativeRecords?: AuthoritativeRecordReadOptions;
|
|
1217
|
+
readAuthoritativeRecords?: AuthoritativeRecordReader;
|
|
1157
1218
|
},
|
|
1158
1219
|
): Promise<ApiResult<RegistryUpdateResult>> {
|
|
1159
1220
|
const registryConfig = coerceRegistryConfig(registryConfigInput);
|
|
@@ -1175,7 +1236,10 @@ export async function handleRegistryUpdate(
|
|
|
1175
1236
|
if (!sandboxRunner || !sandboxRunner.isAvailable()) {
|
|
1176
1237
|
return {
|
|
1177
1238
|
success: false,
|
|
1178
|
-
error: {
|
|
1239
|
+
error: {
|
|
1240
|
+
code: "SANDBOX_NOT_AVAILABLE",
|
|
1241
|
+
message: withUnavailableReason("Sandbox runner is required", sandboxRunner),
|
|
1242
|
+
},
|
|
1179
1243
|
};
|
|
1180
1244
|
}
|
|
1181
1245
|
try {
|
|
@@ -1264,16 +1328,12 @@ export async function handleRegistryUpdate(
|
|
|
1264
1328
|
};
|
|
1265
1329
|
}
|
|
1266
1330
|
|
|
1267
|
-
//
|
|
1268
|
-
//
|
|
1269
|
-
// (did, slug, version) under this plugin's pluginId.
|
|
1270
|
-
const signedRelease = releaseView.release;
|
|
1331
|
+
// The aggregator selects the target version and supplies mirrors and
|
|
1332
|
+
// moderation metadata. Its release-record copy is not trusted.
|
|
1271
1333
|
if (
|
|
1272
1334
|
releaseView.did !== publisherDid ||
|
|
1273
1335
|
releaseView.package !== slug ||
|
|
1274
|
-
|
|
1275
|
-
(opts?.version !== undefined && releaseView.version !== opts.version) ||
|
|
1276
|
-
signedRelease?.version !== releaseView.version
|
|
1336
|
+
(opts?.version !== undefined && releaseView.version !== opts.version)
|
|
1277
1337
|
) {
|
|
1278
1338
|
return {
|
|
1279
1339
|
success: false,
|
|
@@ -1284,6 +1344,16 @@ export async function handleRegistryUpdate(
|
|
|
1284
1344
|
},
|
|
1285
1345
|
};
|
|
1286
1346
|
}
|
|
1347
|
+
const packageView = await discovery.getPackage({ did: publisherDid, slug });
|
|
1348
|
+
if (!packageView || packageView.did !== publisherDid || packageView.slug !== slug) {
|
|
1349
|
+
return {
|
|
1350
|
+
success: false,
|
|
1351
|
+
error: {
|
|
1352
|
+
code: "AGGREGATOR_IDENTITY_MISMATCH",
|
|
1353
|
+
message: "Aggregator returned a package view that does not match the installed plugin.",
|
|
1354
|
+
},
|
|
1355
|
+
};
|
|
1356
|
+
}
|
|
1287
1357
|
|
|
1288
1358
|
const newVersion = releaseView.version;
|
|
1289
1359
|
if (evaluateRegistryReleaseWithdrawal(releaseView, discovery.labelerPolicy).withdrawn) {
|
|
@@ -1301,17 +1371,64 @@ export async function handleRegistryUpdate(
|
|
|
1301
1371
|
},
|
|
1302
1372
|
};
|
|
1303
1373
|
}
|
|
1304
|
-
|
|
1374
|
+
const authoritative = await (opts?.readAuthoritativeRecords ?? readAuthoritativePackageRelease)(
|
|
1375
|
+
publisherDid,
|
|
1376
|
+
slug,
|
|
1377
|
+
newVersion,
|
|
1378
|
+
opts?.authoritativeRecords,
|
|
1379
|
+
);
|
|
1380
|
+
if (!authoritative.success) {
|
|
1381
|
+
return registryRecordError(authoritative.error.code, authoritative.error.message);
|
|
1382
|
+
}
|
|
1383
|
+
const records = authoritative.value;
|
|
1384
|
+
const { profile, release } = records.inspection.value;
|
|
1385
|
+
if (
|
|
1386
|
+
packageView.uri !== records.profile.uri ||
|
|
1387
|
+
packageView.cid !== records.profile.cid ||
|
|
1388
|
+
releaseView.uri !== records.release.uri ||
|
|
1389
|
+
releaseView.cid !== records.release.cid
|
|
1390
|
+
) {
|
|
1391
|
+
return {
|
|
1392
|
+
success: false,
|
|
1393
|
+
error: {
|
|
1394
|
+
code: "AGGREGATOR_RECORD_MISMATCH",
|
|
1395
|
+
message: "Aggregator metadata does not match the publisher's signed records.",
|
|
1396
|
+
},
|
|
1397
|
+
};
|
|
1398
|
+
}
|
|
1399
|
+
const packageYanked =
|
|
1400
|
+
hasCurrentRecordLabel(packageView.labels ?? [], "security:yanked", records.profile) ||
|
|
1401
|
+
hasCurrentRecordLabel(packageView.labels ?? [], "security-yanked", records.profile);
|
|
1402
|
+
if (packageYanked) {
|
|
1403
|
+
return {
|
|
1404
|
+
success: false,
|
|
1405
|
+
error: { code: "YANKED", message: "Package has been withdrawn" },
|
|
1406
|
+
};
|
|
1407
|
+
}
|
|
1408
|
+
if (
|
|
1409
|
+
opts?.confirmCapabilityChanges ||
|
|
1410
|
+
opts?.confirmRouteVisibilityChanges ||
|
|
1411
|
+
opts?.confirmMcpTools
|
|
1412
|
+
) {
|
|
1413
|
+
const consentError = recordConsentError(
|
|
1414
|
+
{
|
|
1415
|
+
profileCid: opts.acknowledgedProfileCid,
|
|
1416
|
+
releaseCid: opts.acknowledgedReleaseCid,
|
|
1417
|
+
},
|
|
1418
|
+
records,
|
|
1419
|
+
);
|
|
1420
|
+
if (consentError) return consentError;
|
|
1421
|
+
}
|
|
1305
1422
|
// Environment compatibility remains independent from listing approval.
|
|
1306
1423
|
// An ungated update could otherwise
|
|
1307
1424
|
// land a version whose `requires` the host doesn't satisfy. Same
|
|
1308
1425
|
// guard as install; `requires` is lexicon-`unknown`.
|
|
1309
1426
|
if (opts?.hostEnv) {
|
|
1310
|
-
const envError = assertEnvCompatible(
|
|
1427
|
+
const envError = assertEnvCompatible(release.requires, opts.hostEnv);
|
|
1311
1428
|
if (envError) return { success: false, error: envError };
|
|
1312
1429
|
}
|
|
1313
1430
|
|
|
1314
|
-
const packageArtifact =
|
|
1431
|
+
const packageArtifact = release.artifacts.package;
|
|
1315
1432
|
const declaredChecksum = packageArtifact?.checksum;
|
|
1316
1433
|
if (!packageArtifact || !declaredChecksum) {
|
|
1317
1434
|
return {
|
|
@@ -1323,47 +1440,50 @@ export async function handleRegistryUpdate(
|
|
|
1323
1440
|
};
|
|
1324
1441
|
}
|
|
1325
1442
|
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
);
|
|
1337
|
-
if (!(await verifyChecksum(artifactBytes, declaredChecksum))) {
|
|
1338
|
-
return {
|
|
1339
|
-
success: false,
|
|
1340
|
-
error: {
|
|
1341
|
-
code: "CHECKSUM_MISMATCH",
|
|
1342
|
-
message: "Artifact bytes do not match the release's published checksum",
|
|
1443
|
+
let artifactBytes: Uint8Array;
|
|
1444
|
+
try {
|
|
1445
|
+
artifactBytes = await fetchArtifact(
|
|
1446
|
+
releaseView.artifactCaches ?? [],
|
|
1447
|
+
packageArtifact,
|
|
1448
|
+
{
|
|
1449
|
+
did: publisherDid,
|
|
1450
|
+
collection: NSID.packageRelease,
|
|
1451
|
+
rkey: `${slug}:${newVersion}`,
|
|
1452
|
+
cid: releaseView.cid,
|
|
1343
1453
|
},
|
|
1344
|
-
|
|
1454
|
+
release.auth,
|
|
1455
|
+
);
|
|
1456
|
+
} catch (error) {
|
|
1457
|
+
if (error instanceof RegistryArtifactFetchError) {
|
|
1458
|
+
return registryArtifactError(error.code, error.message, "update");
|
|
1459
|
+
}
|
|
1460
|
+
throw error;
|
|
1345
1461
|
}
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1462
|
+
const artifactReport = await validateRegistryArtifact(
|
|
1463
|
+
artifactBytes,
|
|
1464
|
+
declaredChecksum,
|
|
1465
|
+
slug,
|
|
1466
|
+
newVersion,
|
|
1467
|
+
);
|
|
1468
|
+
if (!artifactReport.success) {
|
|
1469
|
+
return registryArtifactError(
|
|
1470
|
+
artifactReport.error.code,
|
|
1471
|
+
artifactReport.error.message,
|
|
1472
|
+
"update",
|
|
1473
|
+
);
|
|
1357
1474
|
}
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1475
|
+
const { bundle, artifactDigest, artifactDigests } = artifactReport.value;
|
|
1476
|
+
const recordReport = await verifyAuthoritativePackageRelease(records, artifactDigest, {
|
|
1477
|
+
...opts?.authoritativeRecords,
|
|
1478
|
+
artifactDigests,
|
|
1479
|
+
});
|
|
1480
|
+
if (!recordReport.success) {
|
|
1481
|
+
return registryRecordError(
|
|
1482
|
+
recordReport.code,
|
|
1483
|
+
recordReport.reasons[0]?.message ?? "The release provenance is invalid.",
|
|
1484
|
+
);
|
|
1366
1485
|
}
|
|
1486
|
+
const verification = recordVerificationSummary(records, recordReport);
|
|
1367
1487
|
|
|
1368
1488
|
// Rewrite manifest.id to the opaque pluginId so the sandbox loader
|
|
1369
1489
|
// and R2 layout stay in sync across install and update.
|
|
@@ -1374,13 +1494,8 @@ export async function handleRegistryUpdate(
|
|
|
1374
1494
|
// that changes only the host scope (e.g. api.good.com -> evil.com) keeps
|
|
1375
1495
|
// the capability set identical, sails through the escalation diff below,
|
|
1376
1496
|
// and installs a bundle enforcing a scope the record never showed.
|
|
1377
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- extensions is the lexicon's open `unknown` map; narrow to read our own extension
|
|
1378
|
-
const updateRecordExtensions = signedRelease?.extensions as
|
|
1379
|
-
| Record<string, { declaredAccess?: DeclaredAccess }>
|
|
1380
|
-
| undefined;
|
|
1381
|
-
const recordExt = updateRecordExtensions?.[RELEASE_EXTENSION_NSID];
|
|
1382
1497
|
if (
|
|
1383
|
-
!
|
|
1498
|
+
!verifiedAccessEqual(recordReport.value.declaredAccess, bundle.manifest.declaredAccess ?? {})
|
|
1384
1499
|
) {
|
|
1385
1500
|
return {
|
|
1386
1501
|
success: false,
|
|
@@ -1406,7 +1521,7 @@ export async function handleRegistryUpdate(
|
|
|
1406
1521
|
error: {
|
|
1407
1522
|
code: "CAPABILITY_ESCALATION",
|
|
1408
1523
|
message: "Plugin update requires new capabilities",
|
|
1409
|
-
details: { capabilityChanges },
|
|
1524
|
+
details: { capabilityChanges, verification },
|
|
1410
1525
|
},
|
|
1411
1526
|
};
|
|
1412
1527
|
}
|
|
@@ -1419,7 +1534,7 @@ export async function handleRegistryUpdate(
|
|
|
1419
1534
|
error: {
|
|
1420
1535
|
code: "ROUTE_VISIBILITY_ESCALATION",
|
|
1421
1536
|
message: "Plugin update exposes new public (unauthenticated) routes",
|
|
1422
|
-
details: { routeVisibilityChanges, capabilityChanges },
|
|
1537
|
+
details: { routeVisibilityChanges, capabilityChanges, verification },
|
|
1423
1538
|
},
|
|
1424
1539
|
};
|
|
1425
1540
|
}
|
|
@@ -1438,6 +1553,7 @@ export async function handleRegistryUpdate(
|
|
|
1438
1553
|
message: "Plugin update changes its MCP tools",
|
|
1439
1554
|
details: {
|
|
1440
1555
|
mcpTools: newMcpTools.map(({ inputSchema: _, outputSchema: __, ...tool }) => tool),
|
|
1556
|
+
verification,
|
|
1441
1557
|
},
|
|
1442
1558
|
},
|
|
1443
1559
|
};
|
|
@@ -1447,28 +1563,20 @@ export async function handleRegistryUpdate(
|
|
|
1447
1563
|
// so a retry of the same update is idempotent.
|
|
1448
1564
|
await storeBundleInR2(storage, pluginId, newVersion, bundle, "registry");
|
|
1449
1565
|
|
|
1450
|
-
//
|
|
1451
|
-
//
|
|
1452
|
-
// re-fetch the profile here — that's a separate `getPackage` round
|
|
1453
|
-
// trip and the install-time values are still authoritative for
|
|
1454
|
-
// the same package identity).
|
|
1566
|
+
// Refresh display metadata from the same signed profile used for
|
|
1567
|
+
// release-policy verification.
|
|
1455
1568
|
await stateRepo.upsert(pluginId, newVersion, "active", {
|
|
1456
1569
|
source: "registry",
|
|
1457
1570
|
registryPublisherDid: publisherDid,
|
|
1458
1571
|
registrySlug: slug,
|
|
1459
|
-
displayName:
|
|
1460
|
-
description:
|
|
1572
|
+
displayName: profile.name ?? slug,
|
|
1573
|
+
description: profile.description ?? undefined,
|
|
1461
1574
|
mcpToolsEnabled: false,
|
|
1462
1575
|
mcpToolsConsent: null,
|
|
1463
1576
|
});
|
|
1464
1577
|
|
|
1465
1578
|
await syncDeclaredStorageIndexes(db, [bundle.manifest]);
|
|
1466
1579
|
|
|
1467
|
-
// Best-effort cleanup of the old bundle. Failures here don't roll
|
|
1468
|
-
// back the upgrade (the new bundle is already stored and committed
|
|
1469
|
-
// in the state row); the orphan is just storage we'll pay for.
|
|
1470
|
-
deleteBundleFromR2(storage, pluginId, oldVersion, "registry").catch(() => {});
|
|
1471
|
-
|
|
1472
1580
|
return {
|
|
1473
1581
|
success: true,
|
|
1474
1582
|
data: {
|
|
@@ -1477,6 +1585,7 @@ export async function handleRegistryUpdate(
|
|
|
1477
1585
|
newVersion,
|
|
1478
1586
|
capabilityChanges,
|
|
1479
1587
|
routeVisibilityChanges: hasNewPublicRoutes ? routeVisibilityChanges : undefined,
|
|
1588
|
+
verification,
|
|
1480
1589
|
},
|
|
1481
1590
|
};
|
|
1482
1591
|
} catch (err) {
|