dineway 0.2.0 → 0.2.1
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/activity-DUaz_w7p.mjs +79 -0
- package/dist/{activity-events-y6eT8UW6.mjs → activity-events-CJDvE2uc.mjs} +1 -77
- package/dist/{actor-CrObAPV0.mjs → actor-0QJ1Gbtf.mjs} +1 -1
- package/dist/{allowed-origins-_oeyP6x-.mjs → allowed-origins--OwHHiY8.mjs} +1 -1
- package/dist/api/route-utils.d.mts +9 -10
- package/dist/api/route-utils.mjs +14 -14
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +5 -5
- package/dist/{api-ByrU2q-Z.mjs → api-B4PHIF4V.mjs} +51 -23
- package/dist/{api-tokens-CjVMQT-X.mjs → api-tokens-tbK_sORH.mjs} +1 -1
- package/dist/{apply-bZswmZPm.mjs → apply-DjTqq6Ae.mjs} +19 -19
- package/dist/astro/index.d.mts +10 -11
- package/dist/astro/index.mjs +10 -5
- package/dist/astro/middleware/auth.d.mts +9 -19
- package/dist/astro/middleware/auth.mjs +6 -6
- package/dist/astro/middleware/redirect.mjs +5 -5
- package/dist/astro/middleware/request-context.mjs +2 -2
- package/dist/astro/middleware/seed.d.mts +1 -1
- package/dist/astro/middleware/seed.mjs +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.mjs +140 -98
- 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 +4 -4
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +6 -6
- package/dist/astro/routes/api/admin/briefing.mjs +18 -18
- 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 +16 -16
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +16 -16
- package/dist/astro/routes/api/admin/bylines/index.mjs +16 -16
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +12 -12
- 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/context/_id_/history.mjs +25 -24
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +25 -24
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +30 -29
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +30 -29
- package/dist/astro/routes/api/admin/context/diff.mjs +29 -28
- package/dist/astro/routes/api/admin/context/index.mjs +30 -29
- package/dist/astro/routes/api/admin/context/stale.mjs +29 -28
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +25 -24
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +29 -28
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +29 -28
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +26 -25
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +2 -2
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +6 -6
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +52 -51
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +52 -51
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +44 -44
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +51 -50
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +51 -50
- package/dist/astro/routes/api/admin/plugins/index.mjs +44 -44
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +44 -44
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +51 -50
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +44 -44
- package/dist/astro/routes/api/admin/plugins/updates.mjs +44 -44
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +5 -5
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +30 -65
- package/dist/astro/routes/api/admin/review-requests/index.d.mts +2 -1
- package/dist/astro/routes/api/admin/review-requests/index.mjs +58 -11
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +44 -44
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +44 -44
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +7 -7
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
- package/dist/astro/routes/api/admin/users/index.mjs +6 -6
- package/dist/astro/routes/api/auth/dev-bypass.mjs +4 -4
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +10 -10
- package/dist/astro/routes/api/auth/invite/index.mjs +7 -7
- package/dist/astro/routes/api/auth/invite/register-options.mjs +9 -9
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +9 -9
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +8 -8
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +2 -2
- 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 +11 -11
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +9 -9
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/verify.mjs +10 -10
- package/dist/astro/routes/api/auth/setup-token/index.mjs +5 -5
- package/dist/astro/routes/api/auth/setup-token/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/signup/complete.mjs +10 -10
- package/dist/astro/routes/api/auth/signup/request.mjs +9 -9
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +13 -13
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +49 -21
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +67 -33
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +14 -14
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +11 -10
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +11 -10
- 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/health.mjs +1 -1
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +19 -19
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +8 -8
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +8 -9
- package/dist/astro/routes/api/import/wordpress/execute.mjs +35 -34
- package/dist/astro/routes/api/import/wordpress/media.d.mts +8 -9
- package/dist/astro/routes/api/import/wordpress/media.mjs +12 -12
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +34 -33
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +9 -10
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +31 -30
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +22 -22
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +8 -9
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +40 -39
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/mcp.mjs +554 -167
- package/dist/astro/routes/api/media/_id_/confirm.mjs +10 -10
- package/dist/astro/routes/api/media/_id_.mjs +8 -8
- package/dist/astro/routes/api/media/file/_...key_.mjs +1 -1
- 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 +11 -11
- package/dist/astro/routes/api/media.mjs +14 -14
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +30 -29
- package/dist/astro/routes/api/menus/_name_/items.mjs +30 -29
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +30 -29
- package/dist/astro/routes/api/menus/_name_/translations.mjs +30 -29
- package/dist/astro/routes/api/menus/_name_.mjs +30 -29
- package/dist/astro/routes/api/menus/index.mjs +30 -29
- package/dist/astro/routes/api/oauth/authorize.mjs +7 -7
- package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/code.mjs +9 -9
- package/dist/astro/routes/api/oauth/device/token.mjs +8 -8
- package/dist/astro/routes/api/oauth/register.mjs +4 -4
- package/dist/astro/routes/api/oauth/token/refresh.mjs +6 -6
- package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
- package/dist/astro/routes/api/oauth/token.mjs +6 -6
- package/dist/astro/routes/api/openapi.json.mjs +4 -4
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +20 -5
- package/dist/astro/routes/api/redirects/404s/index.mjs +10 -10
- package/dist/astro/routes/api/redirects/404s/summary.mjs +10 -10
- package/dist/astro/routes/api/redirects/_id_.mjs +31 -30
- package/dist/astro/routes/api/redirects/index.mjs +31 -30
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -2
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +2 -2
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +46 -45
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +46 -45
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +46 -45
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +46 -45
- package/dist/astro/routes/api/schema/collections/index.mjs +46 -45
- package/dist/astro/routes/api/schema/index.mjs +8 -8
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +44 -44
- package/dist/astro/routes/api/schema/orphans/index.mjs +44 -44
- package/dist/astro/routes/api/search/enable.mjs +11 -11
- package/dist/astro/routes/api/search/index.mjs +10 -10
- package/dist/astro/routes/api/search/rebuild.mjs +11 -11
- package/dist/astro/routes/api/search/stats.mjs +6 -6
- package/dist/astro/routes/api/search/suggest.mjs +10 -10
- package/dist/astro/routes/api/sections/_slug_.mjs +30 -29
- package/dist/astro/routes/api/sections/index.mjs +30 -29
- package/dist/astro/routes/api/settings/email.mjs +3 -3
- package/dist/astro/routes/api/settings.mjs +30 -29
- package/dist/astro/routes/api/setup/admin-verify.mjs +12 -12
- package/dist/astro/routes/api/setup/admin.mjs +10 -10
- package/dist/astro/routes/api/setup/dev-bypass.mjs +25 -25
- package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
- package/dist/astro/routes/api/setup/index.mjs +27 -27
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +6 -6
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +33 -32
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +33 -32
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +33 -32
- package/dist/astro/routes/api/taxonomies/index.mjs +33 -32
- package/dist/astro/routes/api/themes/preview.mjs +4 -4
- 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 +3 -3
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +3 -3
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +29 -28
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +30 -29
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +30 -29
- package/dist/astro/routes/api/widget-areas/_name_.mjs +27 -26
- package/dist/astro/routes/api/widget-areas/index.mjs +30 -29
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +6 -6
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +9 -9
- package/dist/astro/routes/sitemap.xml.mjs +7 -7
- package/dist/astro/session-driver.d.mts +1 -1
- package/dist/astro/session-driver.mjs +2 -2
- package/dist/astro/types.d.mts +13 -12
- package/dist/{audit-ByVKIwWF.mjs → audit-B2pRxZ20.mjs} +1 -1
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{auth-control-guard-CqeUmQsv.mjs → auth-control-guard-D71jourk.mjs} +1 -1
- package/dist/{authorize-CcBxcHtz.mjs → authorize-ZXPGPwKn.mjs} +1 -1
- package/dist/{briefing-CawZ59CY.mjs → briefing-0rf-su3-.mjs} +7 -7
- package/dist/{briefing-BJaJI8dm.mjs → briefing-kRhegBoF.mjs} +1 -1
- package/dist/{bundle-7C_DpkEq.mjs → bundle-CEcdUa1s.mjs} +2 -2
- package/dist/{byline-e51-fWRs.mjs → byline-7xR185Ly.mjs} +6 -6
- package/dist/{byline-fields-D-N5qVIG.mjs → byline-fields-BKzA0fJU.mjs} +1 -1
- package/dist/{byline-fields-CUvbslGc.d.mts → byline-fields-Ckeqd1OY.d.mts} +57 -47
- package/dist/{byline-fields-DOJO16Gm.mjs → byline-fields-WN7RQT4q.mjs} +10 -4
- package/dist/{byline-registry-87nNnYl4.mjs → byline-registry-Ba54M74c.mjs} +2 -2
- package/dist/{bylines-CMQNCNFh.mjs → bylines-C-EL6dh3.mjs} +3 -3
- package/dist/{bylines-y4LO-dTj.mjs → bylines-CmZFCMr0.mjs} +5 -5
- package/dist/{cache-C-FNTFYK.mjs → cache-DkVCKGio.mjs} +2 -2
- package/dist/{chunks-CxBt-GxR.mjs → chunks-ChGNDY8r.mjs} +1 -1
- package/dist/cli/index.d.mts +29 -1
- package/dist/cli/index.mjs +1391 -1123
- package/dist/cli/plugin-kit.d.mts +75 -0
- package/dist/cli/plugin-kit.mjs +4 -0
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +27 -52
- package/dist/client/index.mjs +34 -7
- package/dist/client-factory-BDD9azPJ.mjs +233 -0
- package/dist/{comment-DlA4iChg.mjs → comment-DFALgsJD.mjs} +1 -1
- package/dist/{comment-reaction-DfFao1ST.mjs → comment-reaction-C37bf99u.mjs} +1 -1
- package/dist/{comments-DApFGMsP.mjs → comments-B3NwDBxl.mjs} +1 -1
- package/dist/{content-Bh4BDjv8.mjs → content-DJcAYFhz.mjs} +2 -2
- package/dist/{content-refresh-CgutSUfO.mjs → content-refresh-B4ZCmxgd.mjs} +5 -5
- package/dist/{context-CK4ym2Sf.mjs → context-DnpXcp6Y.mjs} +2 -2
- package/dist/{context-C5W3G18y.mjs → context-fSCYLL3c.mjs} +24 -13
- package/dist/{context-route-helpers-MASyGgWf.mjs → context-route-helpers-CI8XzcsK.mjs} +2 -2
- package/dist/{dashboard-DQkVT7Ei.mjs → dashboard-D0nj5oWg.mjs} +4 -4
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +1 -1
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{device-flow-BnqRH-T9.mjs → device-flow-BJe6VEhP.mjs} +5 -5
- package/dist/{enrich-DIFIFA8O.mjs → enrich-Ck9tfMqe.mjs} +1 -1
- package/dist/{experimental-workflows-BMsUnIAw.mjs → experimental-workflows-GVhUgzEs.mjs} +1 -1
- package/dist/{field-defs-cache-DRNdhBJv.mjs → field-defs-cache-DL-T2XVS.mjs} +4 -4
- package/dist/forgeway-seo-client-G5ddhVHd.mjs +456 -0
- package/dist/{fts-manager-Crzypjqu.mjs → fts-manager-ewTGohf4.mjs} +1 -1
- package/dist/{hitl-requests-B4Vbcmaq.mjs → hitl-requests-DEFj8e6u.mjs} +2 -2
- package/dist/{hitl-route-helpers-hEVzvP8l.mjs → hitl-route-helpers-C23JHaWz.mjs} +5 -5
- package/dist/{import-Bh9biJfx.mjs → import-CXXL5pip.mjs} +7 -7
- package/dist/{index-D4y6NGiy.d.mts → index-DcnOCD1e.d.mts} +79 -3
- package/dist/index.d.mts +15 -17
- package/dist/index.mjs +81 -78
- package/dist/{jsonld-Dq0gsnOH.d.mts → jsonld-DzKbhRZ4.d.mts} +2 -2
- package/dist/{load-DmYeniXl.mjs → load-CFtJRT3c.mjs} +1 -1
- package/dist/{loader-CjWqjweO.mjs → loader-aWkkc1_o.mjs} +2 -2
- package/dist/{manifest-schema-BxVPYMJR.mjs → manifest-schema-uA6pRFXi.mjs} +6 -2
- package/dist/{mcp-reviewed-executor-TwVbMzG6.mjs → mcp-reviewed-executor-Dn52L_yY.mjs} +6 -3
- package/dist/media/image-endpoint.mjs +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +2 -2
- package/dist/media/local-runtime.d.mts +10 -11
- package/dist/media/local-runtime.mjs +2 -2
- package/dist/{media-DMj0grzC.mjs → media-CVMOoywq.mjs} +1 -1
- package/dist/{media-allowlist-BlVCSzHx.mjs → media-allowlist-zDNJmXCo.mjs} +1 -1
- package/dist/{menus-xvsnVZXw.mjs → menus-CCG2z5um.mjs} +6 -6
- package/dist/{menus-TaW1gKnk.mjs → menus-CmyIkRG5.mjs} +2 -2
- package/dist/{oauth-authorization-DiaGvRVz.mjs → oauth-authorization-B9H7X85L.mjs} +5 -5
- package/dist/{oauth-clients-Dl9E8dEM.mjs → oauth-clients-Dwl32-Uj.mjs} +2 -2
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/output-DhBe5_Pi.mjs +68 -0
- package/dist/page/index.d.mts +9 -3
- package/dist/page/index.mjs +1 -1
- package/dist/{parse-CbymENaR.mjs → parse-i15EFSAE.mjs} +1 -1
- package/dist/plugin-utils.d.mts +8 -9
- package/dist/plugins/adapt-sandbox-entry.d.mts +8 -9
- package/dist/plugins/adapt-sandbox-entry.mjs +3 -1
- package/dist/{plugins-BolVa-tl.mjs → plugins-CPA2PtfY.mjs} +95 -10
- package/dist/portable-text-E79LyjGo.d.mts +45 -0
- package/dist/{preview-vSVg6fwG.mjs → preview-BjedZm8G.mjs} +2 -2
- package/dist/project-env-DKibmuP8.mjs +95 -0
- package/dist/{provider-loader-MD8zAbnH.d.mts → provider-loader-DC2JdWeO.d.mts} +1 -1
- package/dist/{public-url-gsp3oUbu.d.mts → public-url-DQJCnYi9.d.mts} +1 -1
- package/dist/publication-authorization-RKiHXKtq.mjs +985 -0
- package/dist/{query-jaAmw8E1.mjs → query-C2U5u5_p.mjs} +3 -3
- package/dist/{query-CfRCdaL3.mjs → query-DEv5x6yB.mjs} +13 -13
- package/dist/{rate-limit-ZLdyWoZF.mjs → rate-limit-DglsAJSw.mjs} +2 -2
- package/dist/{redirect-BAjt4Z6b.mjs → redirect-ubhEqQCQ.mjs} +2 -2
- package/dist/{redirects-CA-xylPG.mjs → redirects-Bhpm8bRe.mjs} +18 -10
- package/dist/{redirects-BTdwpQtE.mjs → redirects-xs2yahLq.mjs} +4 -4
- package/dist/{registry-CtyVedcN.mjs → registry-BYYyb2tF.mjs} +24 -10
- package/dist/{request-meta-CUypToDJ.mjs → request-meta-CFe1tW2M.mjs} +1 -1
- package/dist/review-payload-BysRWpxS.mjs +111 -0
- package/dist/{review-requests-DUyEmtmG.mjs → review-requests-CTWGnWUt.mjs} +1 -1
- package/dist/review-requests-D42VEP1l.mjs +142 -0
- package/dist/review-route-helpers-C31vO6SI.mjs +41 -0
- package/dist/{runner-DB7CRfOF.mjs → runner-BgmttQmD.mjs} +1151 -447
- package/dist/{runner-1tC2tIRV.d.mts → runner-D6hzs8L9.d.mts} +1 -1
- package/dist/runtime.d.mts +9 -10
- package/dist/runtime.mjs +3 -3
- package/dist/schema-DUtnZxjZ.mjs +8 -0
- package/dist/{search-DSaLgEFI.mjs → search-DUKgZUlm.mjs} +3 -3
- package/dist/{secrets-CDZo2k8L.mjs → secrets-ZV5rd8yV.mjs} +1 -1
- package/dist/{sections-PVVXHGfp.mjs → sections-DvFgsnda.mjs} +2 -2
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +19 -19
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo/index.mjs +1 -1
- package/dist/{seo-CQG3GCHQ.mjs → seo-BU8MLCS9.mjs} +1 -1
- package/dist/{service-DiN4ZuPp.mjs → service-FL3fB0Rx.mjs} +2 -2
- package/dist/{settings-BbqgHWpU.mjs → settings-BECcAIRH.mjs} +5 -5
- package/dist/{settings-i4VPP8bT.mjs → settings-EzADu-dd.mjs} +2 -2
- package/dist/{site-activity-Dy3FROs0.mjs → site-activity-h8smOlYI.mjs} +1 -1
- package/dist/{site-context-DQiL8Fl5.mjs → site-context-B8T1kpUP.mjs} +565 -129
- package/dist/stable-hash-DshcXvRE.mjs +19 -0
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/{taxonomies-9s-v03H-.mjs → taxonomies-BiM9NtgW.mjs} +3 -3
- package/dist/{taxonomies-DRiixp_E.mjs → taxonomies-DSnY5nOa.mjs} +6 -6
- package/dist/{taxonomy-Dvsw6BOs.mjs → taxonomy-0k_vRVsD.mjs} +2 -2
- package/dist/{types-4garmdWa.mjs → types-A8fPOJnl.mjs} +5 -2
- package/dist/{types-DW_-sFyz.d.mts → types-B_FlxIIl.d.mts} +2 -0
- package/dist/{types-Dq1qT19x.mjs → types-ChxYDRvx.mjs} +1 -1
- package/dist/{types-DU0bU2Wu.d.mts → types-DuQn1G7-.d.mts} +583 -2
- package/dist/{runtime-BOeiQsCv.d.mts → types-DwoUifGE.d.mts} +3560 -1355
- package/dist/{types-C_ly5eTp.d.mts → types-opjX_kz6.d.mts} +1 -1
- package/dist/ui/server-runtime.d.mts +12 -14
- package/dist/ui/server-runtime.mjs +21 -21
- package/dist/{user-BIZPzCb9.mjs → user-BH-n01y3.mjs} +2 -2
- package/dist/{utils-CMDhr5Xd.mjs → utils-D1SrKGtP.mjs} +1 -1
- package/dist/{validate-CZvb-BKB.d.mts → validate-CbVFoJgc.d.mts} +59 -5
- package/dist/{validate-DNs0pTSc.mjs → validate-D1HL-oLR.mjs} +2 -2
- package/dist/version-C3iVRuaF.mjs +6 -0
- package/dist/{widgets-f0ibZUIq.mjs → widgets-BZrLrNgS.mjs} +3 -3
- package/dist/{wordpress-slugs-BhHJX8XE.mjs → wordpress-slugs-C3PWcowq.mjs} +1 -1
- package/dist/{zod-generator-B7TMjyFJ.mjs → zod-generator-C7AsLpSB.mjs} +2 -2
- package/package.json +13 -5
- package/dist/hitl-Hw1RmWOq.mjs +0 -677
- package/dist/review-requests-C9Ff11Vq.mjs +0 -79
- package/dist/schema-DXdYj4R3.mjs +0 -8
- package/dist/types-C46EvNdc.d.mts +0 -56
- package/dist/types-C8XW6L19.d.mts +0 -1468
- package/dist/version-BTvfRGc6.mjs +0 -6
- /package/dist/{adapters-NVSs4UH7.d.mts → adapters-BiRymx02.d.mts} +0 -0
- /package/dist/{api-tokens-2r7OWi_I.mjs → api-tokens-Ypaly90d.mjs} +0 -0
- /package/dist/{challenge-store-Bjlepa2E.mjs → challenge-store-D5pSY2S1.mjs} +0 -0
- /package/dist/{components-Bclf98Be.mjs → components-DImzlLhb.mjs} +0 -0
- /package/dist/{context-types-DqTo6C79.mjs → context-types-eBuMDAg-.mjs} +0 -0
- /package/dist/{cron-cKcNTix_.mjs → cron-B1SL_lsb.mjs} +0 -0
- /package/dist/{default--K40jqm0.mjs → default-D4Vygcy_.mjs} +0 -0
- /package/dist/{email-console-ChgKFO8-.mjs → email-console-Bp0r68iF.mjs} +0 -0
- /package/dist/{error-CytFlgcd.mjs → error-CSVaQNZy.mjs} +0 -0
- /package/dist/{escape-Bd4P_xKg.mjs → escape-DN4Qmjsl.mjs} +0 -0
- /package/dist/{hash-BPmX6P8I.mjs → hash-mxxx2oPW.mjs} +0 -0
- /package/dist/{media-url-lEKSrpr9.mjs → media-url-BdoLPvg8.mjs} +0 -0
- /package/dist/{mime-CA7Lgovc.mjs → mime-C0vOHFm7.mjs} +0 -0
- /package/dist/{mode-C4CIyjtR.mjs → mode-C8yZnIlR.mjs} +0 -0
- /package/dist/{normalize-5ek_z7de.mjs → normalize-Cyt7JdF7.mjs} +0 -0
- /package/dist/{oauth-state-store-CNoXafF7.mjs → oauth-state-store-CndT35iw.mjs} +0 -0
- /package/dist/{oauth-user-lookup-Ygw4bNyt.mjs → oauth-user-lookup-CMehAaKs.mjs} +0 -0
- /package/dist/{parser-C1nYd-81.mjs → parser-06LLLL4E.mjs} +0 -0
- /package/dist/{passkey-config-BUwu8BA3.mjs → passkey-config-NYukYGed.mjs} +0 -0
- /package/dist/{patterns-BhAvqO0S.mjs → patterns-CoqlXUvk.mjs} +0 -0
- /package/dist/{placeholder-uvNRZBX9.d.mts → placeholder-DkWkXfDI.d.mts} +0 -0
- /package/dist/{portable-text-dA_UlJwW.mjs → portable-text-BASHceim.mjs} +0 -0
- /package/dist/{process-cache-7xgAO9JY.mjs → process-cache-CCDgti7j.mjs} +0 -0
- /package/dist/{provider-loader-D0w9dqjm.mjs → provider-loader-BtfrrzfD.mjs} +0 -0
- /package/dist/{public-url-BEz_sM9n.mjs → public-url-Cp6hyjVR.mjs} +0 -0
- /package/dist/{redirect-wphRBv4y.mjs → redirect-DrbEmU9a.mjs} +0 -0
- /package/dist/{request-cache-D9GQBxMP.mjs → request-cache-CBFjCwSt.mjs} +0 -0
- /package/dist/{resolve-Cb6Dbz-C.mjs → resolve-DE71WcL9.mjs} +0 -0
- /package/dist/{seo-qa7Dn0jK.mjs → seo-BLszyJxd.mjs} +0 -0
- /package/dist/{seo-contributions-C1EnikHB.mjs → seo-contributions-GnCuL1ML.mjs} +0 -0
- /package/dist/{session-user-CAKImna3.mjs → session-user-Ct6GBLvn.mjs} +0 -0
- /package/dist/{setup-complete-B8fl-mjV.mjs → setup-complete-Da0axZEE.mjs} +0 -0
- /package/dist/{setup-nonce-CoyjILvW.mjs → setup-nonce-BtkKnvxQ.mjs} +0 -0
- /package/dist/{sidecar-client-C3mqXg4C.mjs → sidecar-client-Ctzfyyp-.mjs} +0 -0
- /package/dist/{site-url-BML3GQYm.mjs → site-url-DJEid0ml.mjs} +0 -0
- /package/dist/{ssrf-DWe8jwAp.mjs → ssrf-FJqwQzj4.mjs} +0 -0
- /package/dist/{status-DANd8ERo.mjs → status-NqWOSFAD.mjs} +0 -0
- /package/dist/{tokens-1RK1n6ED.mjs → tokens-BDQU29Vd.mjs} +0 -0
- /package/dist/{transaction-C2EOMTJA.mjs → transaction-0LEAAy8R.mjs} +0 -0
- /package/dist/{transport-BNmCqLu7.mjs → transport-C46KHLMP.mjs} +0 -0
- /package/dist/{transport-CcJu3Co8.d.mts → transport-D9pKAzFP.d.mts} +0 -0
- /package/dist/{trusted-proxy-DTXQ2IMv.mjs → trusted-proxy-Dm7Mxvt6.mjs} +0 -0
- /package/dist/{types-B3t5cxhU.mjs → types-B7TDDFMG.mjs} +0 -0
- /package/dist/{types-DF7ZuGGk.d.mts → types-BLQCz46p.d.mts} +0 -0
- /package/dist/{types-CDpH6MA4.d.mts → types-Cw0PeCT_.d.mts} +0 -0
- /package/dist/{types-Rc3gQqqw.d.mts → types-g0zMtraY.d.mts} +0 -0
- /package/dist/{types-C5CVgwsV.mjs → types-mVVgRPaU.mjs} +0 -0
- /package/dist/{types-POH8PQZh.d.mts → types-wFu80FrO.d.mts} +0 -0
- /package/dist/{url-CpyFDFpO.mjs → url-EMAguGVk.mjs} +0 -0
- /package/dist/{url-Cac7a9QZ.mjs → url-guoXQQcV.mjs} +0 -0
|
@@ -1,44 +1,359 @@
|
|
|
1
1
|
import "../../../dialect-helpers-fk43GbDb.mjs";
|
|
2
2
|
import "../../../base64-F8-DUraK.mjs";
|
|
3
|
-
import "../../../types-
|
|
4
|
-
import "../../../loader-
|
|
3
|
+
import "../../../types-ChxYDRvx.mjs";
|
|
4
|
+
import "../../../loader-aWkkc1_o.mjs";
|
|
5
5
|
import "../../../object-cache-D51qOseS.mjs";
|
|
6
|
-
import "../../../content-
|
|
7
|
-
import "../../../media-
|
|
6
|
+
import "../../../content-DJcAYFhz.mjs";
|
|
7
|
+
import "../../../media-CVMOoywq.mjs";
|
|
8
8
|
import "../../../options-DQPTH5n0.mjs";
|
|
9
|
-
import "../../../site-activity-
|
|
10
|
-
import { t as ReviewRequestRepository } from "../../../review-requests-
|
|
11
|
-
import { a as
|
|
12
|
-
import "../../../
|
|
13
|
-
import
|
|
14
|
-
import { t as
|
|
15
|
-
import "../../../
|
|
16
|
-
import "../../../
|
|
17
|
-
import "../../../
|
|
18
|
-
import "../../../
|
|
19
|
-
import {
|
|
20
|
-
import "../../../
|
|
21
|
-
import "../../../
|
|
22
|
-
import "../../../
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import "../../../
|
|
26
|
-
import "../../../
|
|
9
|
+
import "../../../site-activity-h8smOlYI.mjs";
|
|
10
|
+
import { t as ReviewRequestRepository } from "../../../review-requests-CTWGnWUt.mjs";
|
|
11
|
+
import { a as HITL_REQUEST_STATUSES, i as HITL_REQUEST_PRIORITIES, o as HitlRequestRepository, r as ReleasePayloadBuilder, t as PublicationAuthorizationError } from "../../../publication-authorization-RKiHXKtq.mjs";
|
|
12
|
+
import { C as ASSIGNMENT_STATUSES, S as ASSIGNMENT_PRIORITIES, _ as toPublicContextDiff, a as EntityResolver, b as HitlRequestService, d as SettingsHitlPayloadBuilder, g as RiskPolicyEvaluator, h as SchemaHitlPayloadBuilder, i as ActorExpertiseService, n as AssignmentService, r as HandoffSnapshotStore, t as WorkflowHitlCoordinator, v as toPublicContextEntry, x as ASSIGNMENT_ACTOR_TYPES, y as toPublicContextEntryPage } from "../../../site-context-B8T1kpUP.mjs";
|
|
13
|
+
import "../../../request-cache-CBFjCwSt.mjs";
|
|
14
|
+
import { a as ContextRepository, i as parseSiteBriefingScope, r as formatSiteBriefingText, t as SiteBriefingAssembler } from "../../../briefing-0rf-su3-.mjs";
|
|
15
|
+
import { t as SITE_CONTEXT_TYPES } from "../../../context-types-eBuMDAg-.mjs";
|
|
16
|
+
import "../../../content-refresh-B4ZCmxgd.mjs";
|
|
17
|
+
import "../../../fts-manager-ewTGohf4.mjs";
|
|
18
|
+
import "../../../registry-BYYyb2tF.mjs";
|
|
19
|
+
import { a as getSiteSettingsWithDb } from "../../../settings-BECcAIRH.mjs";
|
|
20
|
+
import { t as ReviewPayloadBuilder } from "../../../review-payload-BysRWpxS.mjs";
|
|
21
|
+
import { n as VERSION } from "../../../version-C3iVRuaF.mjs";
|
|
22
|
+
import "../../../query-C2U5u5_p.mjs";
|
|
23
|
+
import "../../../zod-generator-C7AsLpSB.mjs";
|
|
24
|
+
import "../../../schema-DUtnZxjZ.mjs";
|
|
25
|
+
import { t as apiError } from "../../../error-CSVaQNZy.mjs";
|
|
26
|
+
import { Cn as contentBylineInputSchema, P as settingsUpdateBody, _n as bylineCreateBody, cn as contentSeoInput, xn as bylineUpdateBody } from "../../../redirects-Bhpm8bRe.mjs";
|
|
27
|
+
import "../../../byline-fields-WN7RQT4q.mjs";
|
|
28
|
+
import "../../../status-NqWOSFAD.mjs";
|
|
27
29
|
import "../../../api/schemas/index.mjs";
|
|
28
|
-
import { i as hasScope } from "../../../api-tokens-
|
|
29
|
-
import { r as registerPluginMcpRegistry, t as createReviewedPluginMcpCommandExecutor } from "../../../mcp-reviewed-executor-
|
|
30
|
-
import {
|
|
31
|
-
import
|
|
32
|
-
import "../../../
|
|
33
|
-
import "../../../
|
|
34
|
-
import
|
|
35
|
-
import {
|
|
30
|
+
import { i as hasScope } from "../../../api-tokens-Ypaly90d.mjs";
|
|
31
|
+
import { r as registerPluginMcpRegistry, t as createReviewedPluginMcpCommandExecutor } from "../../../mcp-reviewed-executor-Dn52L_yY.mjs";
|
|
32
|
+
import { n as resolveActorIdentity } from "../../../actor-0QJ1Gbtf.mjs";
|
|
33
|
+
import "../../../activity-DUaz_w7p.mjs";
|
|
34
|
+
import { d as logSchemaActivity, o as logContentActivity, p as logSiteActivitySafely, r as contentMcpToolSource, t as activityChangedKeys, x as schemaMcpToolSource } from "../../../activity-events-CJDvE2uc.mjs";
|
|
35
|
+
import "../../../utils-D1SrKGtP.mjs";
|
|
36
|
+
import "../../../search-DUKgZUlm.mjs";
|
|
37
|
+
import { n as SeoProviderEvidenceService, t as ForgewaySeoGatewayClient } from "../../../forgeway-seo-client-G5ddhVHd.mjs";
|
|
38
|
+
import { n as convertDataForWrite, t as convertDataForRead } from "../../../portable-text-BASHceim.mjs";
|
|
36
39
|
import { z } from "zod";
|
|
37
40
|
import { Role, canActOnOwn, hasPermission } from "@dineway-ai/auth";
|
|
38
41
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
39
42
|
import { ErrorCode, McpError } from "@modelcontextprotocol/sdk/types.js";
|
|
40
43
|
import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
|
|
41
44
|
|
|
45
|
+
//#region src/mcp/seo-provider-tools.ts
|
|
46
|
+
const annotations = {
|
|
47
|
+
readOnlyHint: true,
|
|
48
|
+
destructiveHint: false,
|
|
49
|
+
idempotentHint: false,
|
|
50
|
+
openWorldHint: true
|
|
51
|
+
};
|
|
52
|
+
const forceRefreshInput = { force_refresh: z.boolean().optional().describe("Bypass the managed provider cache") };
|
|
53
|
+
const dataForSeoCommonInput = {
|
|
54
|
+
location_code: z.number().int().min(1).max(1e7).optional(),
|
|
55
|
+
language_code: z.string().trim().min(1).max(20).optional(),
|
|
56
|
+
device: z.enum(["desktop", "mobile"]).optional(),
|
|
57
|
+
...forceRefreshInput
|
|
58
|
+
};
|
|
59
|
+
function serviceOrThrow(service) {
|
|
60
|
+
if (!service) throw new Error("Dineway hosted SEO provider evidence is unavailable in this runtime.");
|
|
61
|
+
return service;
|
|
62
|
+
}
|
|
63
|
+
function jsonResult$1(data) {
|
|
64
|
+
return { content: [{
|
|
65
|
+
type: "text",
|
|
66
|
+
text: JSON.stringify(data, null, 2)
|
|
67
|
+
}] };
|
|
68
|
+
}
|
|
69
|
+
function errorResult$1(error) {
|
|
70
|
+
return {
|
|
71
|
+
content: [{
|
|
72
|
+
type: "text",
|
|
73
|
+
text: error instanceof Error ? error.message : "SEO provider evidence request failed."
|
|
74
|
+
}],
|
|
75
|
+
isError: true
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function registerSeoProviderTools(server, options) {
|
|
79
|
+
server.registerTool("seo_firecrawl_scrape", {
|
|
80
|
+
title: "Scrape URL with Firecrawl",
|
|
81
|
+
description: "Fetch bounded managed-provider evidence for one HTTP(S) URL. Returns raw evidence without interpretation or persistence.",
|
|
82
|
+
inputSchema: z.object({
|
|
83
|
+
url: z.string().trim().min(1).max(2048),
|
|
84
|
+
formats: z.array(z.string().trim().min(1).max(50)).min(1).max(10).optional(),
|
|
85
|
+
only_main_content: z.boolean().optional(),
|
|
86
|
+
timeout_ms: z.number().int().min(1e3).max(12e4).optional(),
|
|
87
|
+
...forceRefreshInput
|
|
88
|
+
}),
|
|
89
|
+
annotations
|
|
90
|
+
}, async (args, extra) => {
|
|
91
|
+
options.authorize(extra);
|
|
92
|
+
try {
|
|
93
|
+
return jsonResult$1(await serviceOrThrow(options.service).firecrawlScrape({
|
|
94
|
+
url: args.url,
|
|
95
|
+
formats: args.formats,
|
|
96
|
+
onlyMainContent: args.only_main_content,
|
|
97
|
+
timeoutMs: args.timeout_ms,
|
|
98
|
+
forceRefresh: args.force_refresh
|
|
99
|
+
}));
|
|
100
|
+
} catch (error) {
|
|
101
|
+
return errorResult$1(error);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
server.registerTool("seo_firecrawl_map", {
|
|
105
|
+
title: "Map URLs with Firecrawl",
|
|
106
|
+
description: "Discover a bounded URL map for one HTTP(S) origin through the managed provider bridge.",
|
|
107
|
+
inputSchema: z.object({
|
|
108
|
+
url: z.string().trim().min(1).max(2048),
|
|
109
|
+
search: z.string().trim().min(1).max(500).optional(),
|
|
110
|
+
sitemap: z.enum([
|
|
111
|
+
"skip",
|
|
112
|
+
"include",
|
|
113
|
+
"only"
|
|
114
|
+
]).optional(),
|
|
115
|
+
limit: z.number().int().min(1).max(1e3).optional(),
|
|
116
|
+
include_subdomains: z.boolean().optional(),
|
|
117
|
+
ignore_query_parameters: z.boolean().optional(),
|
|
118
|
+
...forceRefreshInput
|
|
119
|
+
}),
|
|
120
|
+
annotations
|
|
121
|
+
}, async (args, extra) => {
|
|
122
|
+
options.authorize(extra);
|
|
123
|
+
try {
|
|
124
|
+
return jsonResult$1(await serviceOrThrow(options.service).firecrawlMap({
|
|
125
|
+
url: args.url,
|
|
126
|
+
search: args.search,
|
|
127
|
+
sitemap: args.sitemap,
|
|
128
|
+
limit: args.limit,
|
|
129
|
+
includeSubdomains: args.include_subdomains,
|
|
130
|
+
ignoreQueryParameters: args.ignore_query_parameters,
|
|
131
|
+
forceRefresh: args.force_refresh
|
|
132
|
+
}));
|
|
133
|
+
} catch (error) {
|
|
134
|
+
return errorResult$1(error);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
server.registerTool("seo_firecrawl_crawl_start", {
|
|
138
|
+
title: "Start Firecrawl Crawl",
|
|
139
|
+
description: "Start one bounded managed crawl and return the raw provider task payload. Does not create a Dineway workflow task.",
|
|
140
|
+
inputSchema: z.object({
|
|
141
|
+
url: z.string().trim().min(1).max(2048),
|
|
142
|
+
limit: z.number().int().min(1).max(1e3).optional(),
|
|
143
|
+
max_discovery_depth: z.number().int().min(0).max(20).optional(),
|
|
144
|
+
allow_external_links: z.boolean().optional(),
|
|
145
|
+
allow_subdomains: z.boolean().optional(),
|
|
146
|
+
scrape_formats: z.array(z.string().trim().min(1).max(50)).min(1).max(10).optional(),
|
|
147
|
+
...forceRefreshInput
|
|
148
|
+
}),
|
|
149
|
+
annotations
|
|
150
|
+
}, async (args, extra) => {
|
|
151
|
+
options.authorize(extra);
|
|
152
|
+
try {
|
|
153
|
+
return jsonResult$1(await serviceOrThrow(options.service).firecrawlCrawlStart({
|
|
154
|
+
url: args.url,
|
|
155
|
+
limit: args.limit,
|
|
156
|
+
maxDiscoveryDepth: args.max_discovery_depth,
|
|
157
|
+
allowExternalLinks: args.allow_external_links,
|
|
158
|
+
allowSubdomains: args.allow_subdomains,
|
|
159
|
+
scrapeFormats: args.scrape_formats,
|
|
160
|
+
forceRefresh: args.force_refresh
|
|
161
|
+
}));
|
|
162
|
+
} catch (error) {
|
|
163
|
+
return errorResult$1(error);
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
server.registerTool("seo_firecrawl_crawl_status", {
|
|
167
|
+
title: "Get Firecrawl Crawl Status",
|
|
168
|
+
description: "Read the raw status of one managed crawl by its provider crawl ID.",
|
|
169
|
+
inputSchema: z.object({ id: z.string().trim().min(1).max(500) }),
|
|
170
|
+
annotations
|
|
171
|
+
}, async (args, extra) => {
|
|
172
|
+
options.authorize(extra);
|
|
173
|
+
try {
|
|
174
|
+
return jsonResult$1(await serviceOrThrow(options.service).firecrawlCrawlStatus({ id: args.id }));
|
|
175
|
+
} catch (error) {
|
|
176
|
+
return errorResult$1(error);
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
server.registerTool("seo_firecrawl_search", {
|
|
180
|
+
title: "Search with Firecrawl",
|
|
181
|
+
description: "Return bounded raw web-search evidence through the managed provider bridge.",
|
|
182
|
+
inputSchema: z.object({
|
|
183
|
+
query: z.string().trim().min(1).max(1e3),
|
|
184
|
+
limit: z.number().int().min(1).max(1e3).optional(),
|
|
185
|
+
scrape: z.boolean().optional(),
|
|
186
|
+
...forceRefreshInput
|
|
187
|
+
}),
|
|
188
|
+
annotations
|
|
189
|
+
}, async (args, extra) => {
|
|
190
|
+
options.authorize(extra);
|
|
191
|
+
try {
|
|
192
|
+
return jsonResult$1(await serviceOrThrow(options.service).firecrawlSearch({
|
|
193
|
+
query: args.query,
|
|
194
|
+
limit: args.limit,
|
|
195
|
+
scrape: args.scrape,
|
|
196
|
+
forceRefresh: args.force_refresh
|
|
197
|
+
}));
|
|
198
|
+
} catch (error) {
|
|
199
|
+
return errorResult$1(error);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
server.registerTool("seo_dataforseo_serp", {
|
|
203
|
+
title: "Get Organic SERP Evidence",
|
|
204
|
+
description: "Return bounded raw Google organic SERP evidence for one keyword.",
|
|
205
|
+
inputSchema: z.object({
|
|
206
|
+
keyword: z.string().trim().min(1).max(1e3),
|
|
207
|
+
depth: z.number().int().min(1).max(100).optional(),
|
|
208
|
+
...dataForSeoCommonInput
|
|
209
|
+
}),
|
|
210
|
+
annotations
|
|
211
|
+
}, async (args, extra) => {
|
|
212
|
+
options.authorize(extra);
|
|
213
|
+
try {
|
|
214
|
+
return jsonResult$1(await serviceOrThrow(options.service).dataForSeoSerp({
|
|
215
|
+
keyword: args.keyword,
|
|
216
|
+
depth: args.depth,
|
|
217
|
+
locationCode: args.location_code,
|
|
218
|
+
languageCode: args.language_code,
|
|
219
|
+
device: args.device,
|
|
220
|
+
forceRefresh: args.force_refresh
|
|
221
|
+
}));
|
|
222
|
+
} catch (error) {
|
|
223
|
+
return errorResult$1(error);
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
server.registerTool("seo_dataforseo_maps", {
|
|
227
|
+
title: "Get Maps SERP Evidence",
|
|
228
|
+
description: "Return bounded raw Google Maps SERP evidence for one keyword.",
|
|
229
|
+
inputSchema: z.object({
|
|
230
|
+
keyword: z.string().trim().min(1).max(1e3),
|
|
231
|
+
depth: z.number().int().min(1).max(100).optional(),
|
|
232
|
+
...dataForSeoCommonInput
|
|
233
|
+
}),
|
|
234
|
+
annotations
|
|
235
|
+
}, async (args, extra) => {
|
|
236
|
+
options.authorize(extra);
|
|
237
|
+
try {
|
|
238
|
+
return jsonResult$1(await serviceOrThrow(options.service).dataForSeoMaps({
|
|
239
|
+
keyword: args.keyword,
|
|
240
|
+
depth: args.depth,
|
|
241
|
+
locationCode: args.location_code,
|
|
242
|
+
languageCode: args.language_code,
|
|
243
|
+
device: args.device,
|
|
244
|
+
forceRefresh: args.force_refresh
|
|
245
|
+
}));
|
|
246
|
+
} catch (error) {
|
|
247
|
+
return errorResult$1(error);
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
server.registerTool("seo_dataforseo_keywords", {
|
|
251
|
+
title: "Get Keyword Evidence",
|
|
252
|
+
description: "Return bounded raw keyword suggestions for one seed keyword.",
|
|
253
|
+
inputSchema: z.object({
|
|
254
|
+
keyword: z.string().trim().min(1).max(1e3),
|
|
255
|
+
limit: z.number().int().min(1).max(1e3).optional(),
|
|
256
|
+
...dataForSeoCommonInput
|
|
257
|
+
}),
|
|
258
|
+
annotations
|
|
259
|
+
}, async (args, extra) => {
|
|
260
|
+
options.authorize(extra);
|
|
261
|
+
try {
|
|
262
|
+
return jsonResult$1(await serviceOrThrow(options.service).dataForSeoKeywords({
|
|
263
|
+
keyword: args.keyword,
|
|
264
|
+
limit: args.limit,
|
|
265
|
+
locationCode: args.location_code,
|
|
266
|
+
languageCode: args.language_code,
|
|
267
|
+
device: args.device,
|
|
268
|
+
forceRefresh: args.force_refresh
|
|
269
|
+
}));
|
|
270
|
+
} catch (error) {
|
|
271
|
+
return errorResult$1(error);
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
server.registerTool("seo_dataforseo_competitors", {
|
|
275
|
+
title: "Get Competitor Domain Evidence",
|
|
276
|
+
description: "Return bounded raw competitor-domain evidence for one target domain.",
|
|
277
|
+
inputSchema: z.object({
|
|
278
|
+
domain: z.string().trim().min(1).max(253),
|
|
279
|
+
limit: z.number().int().min(1).max(1e3).optional(),
|
|
280
|
+
...dataForSeoCommonInput
|
|
281
|
+
}),
|
|
282
|
+
annotations
|
|
283
|
+
}, async (args, extra) => {
|
|
284
|
+
options.authorize(extra);
|
|
285
|
+
try {
|
|
286
|
+
return jsonResult$1(await serviceOrThrow(options.service).dataForSeoCompetitors({
|
|
287
|
+
domain: args.domain,
|
|
288
|
+
limit: args.limit,
|
|
289
|
+
locationCode: args.location_code,
|
|
290
|
+
languageCode: args.language_code,
|
|
291
|
+
device: args.device,
|
|
292
|
+
forceRefresh: args.force_refresh
|
|
293
|
+
}));
|
|
294
|
+
} catch (error) {
|
|
295
|
+
return errorResult$1(error);
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
server.registerTool("seo_dataforseo_ai_scrape", {
|
|
299
|
+
title: "Get Managed AI Result Evidence",
|
|
300
|
+
description: "Return raw managed AI-result evidence for one keyword. This does not replace direct user-account observations.",
|
|
301
|
+
inputSchema: z.object({
|
|
302
|
+
keyword: z.string().trim().min(1).max(1e3),
|
|
303
|
+
platform: z.enum([
|
|
304
|
+
"chat_gpt",
|
|
305
|
+
"gemini",
|
|
306
|
+
"perplexity"
|
|
307
|
+
]).optional(),
|
|
308
|
+
...dataForSeoCommonInput
|
|
309
|
+
}),
|
|
310
|
+
annotations
|
|
311
|
+
}, async (args, extra) => {
|
|
312
|
+
options.authorize(extra);
|
|
313
|
+
try {
|
|
314
|
+
return jsonResult$1(await serviceOrThrow(options.service).dataForSeoAiScrape({
|
|
315
|
+
keyword: args.keyword,
|
|
316
|
+
platform: args.platform,
|
|
317
|
+
locationCode: args.location_code,
|
|
318
|
+
languageCode: args.language_code,
|
|
319
|
+
device: args.device,
|
|
320
|
+
forceRefresh: args.force_refresh
|
|
321
|
+
}));
|
|
322
|
+
} catch (error) {
|
|
323
|
+
return errorResult$1(error);
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
server.registerTool("seo_dataforseo_ai_mentions", {
|
|
327
|
+
title: "Get Managed AI Mention Evidence",
|
|
328
|
+
description: "Return bounded raw managed mention evidence for a domain, keyword, or both. This does not generate visibility conclusions.",
|
|
329
|
+
inputSchema: z.object({
|
|
330
|
+
domain: z.string().trim().min(1).max(253).optional(),
|
|
331
|
+
keyword: z.string().trim().min(1).max(1e3).optional(),
|
|
332
|
+
platform: z.enum(["google", "chat_gpt"]).optional(),
|
|
333
|
+
limit: z.number().int().min(1).max(1e3).optional(),
|
|
334
|
+
...dataForSeoCommonInput
|
|
335
|
+
}),
|
|
336
|
+
annotations
|
|
337
|
+
}, async (args, extra) => {
|
|
338
|
+
options.authorize(extra);
|
|
339
|
+
try {
|
|
340
|
+
return jsonResult$1(await serviceOrThrow(options.service).dataForSeoAiMentions({
|
|
341
|
+
domain: args.domain,
|
|
342
|
+
keyword: args.keyword,
|
|
343
|
+
platform: args.platform,
|
|
344
|
+
limit: args.limit,
|
|
345
|
+
locationCode: args.location_code,
|
|
346
|
+
languageCode: args.language_code,
|
|
347
|
+
device: args.device,
|
|
348
|
+
forceRefresh: args.force_refresh
|
|
349
|
+
}));
|
|
350
|
+
} catch (error) {
|
|
351
|
+
return errorResult$1(error);
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
//#endregion
|
|
42
357
|
//#region src/mcp/server.ts
|
|
43
358
|
const COLLECTION_SLUG_PATTERN = /^[a-z][a-z0-9_]*$/;
|
|
44
359
|
const ENTITY_RESOLVE_TYPES = [
|
|
@@ -109,7 +424,7 @@ function getDineway(extra) {
|
|
|
109
424
|
}
|
|
110
425
|
async function getCollectionFields(dineway, collection) {
|
|
111
426
|
try {
|
|
112
|
-
const { SchemaRegistry } = await import("../../../schema-
|
|
427
|
+
const { SchemaRegistry } = await import("../../../schema-DUtnZxjZ.mjs").then((n) => n.t);
|
|
113
428
|
return (await new SchemaRegistry(dineway.db).getCollectionWithFields(collection))?.fields ?? null;
|
|
114
429
|
} catch {
|
|
115
430
|
return null;
|
|
@@ -126,7 +441,7 @@ async function applyReadMarkdown(dineway, collection, items) {
|
|
|
126
441
|
for (const item of items) if (item.data && typeof item.data === "object") item.data = convertDataForRead(item.data, fields, false);
|
|
127
442
|
}
|
|
128
443
|
async function invalidateBylines() {
|
|
129
|
-
const { invalidateBylineCache } = await import("../../../bylines-
|
|
444
|
+
const { invalidateBylineCache } = await import("../../../bylines-CmZFCMr0.mjs").then((n) => n.t);
|
|
130
445
|
invalidateBylineCache();
|
|
131
446
|
}
|
|
132
447
|
function canReadDrafts(extra) {
|
|
@@ -304,27 +619,83 @@ function allowedEntityResolveTypes(payload, requestedTypes) {
|
|
|
304
619
|
if (disallowed.length > 0) throw new McpError(ErrorCode.InvalidRequest, `Insufficient scope or role for entity types: ${disallowed.join(", ")}`);
|
|
305
620
|
return requestedTypes;
|
|
306
621
|
}
|
|
307
|
-
function
|
|
308
|
-
|
|
309
|
-
const actor = resolveActorIdentity(actorLocals(payload));
|
|
310
|
-
return new RiskPolicyEvaluator({
|
|
311
|
-
db: payload.dineway.db,
|
|
312
|
-
handlers: payload.dineway
|
|
313
|
-
}).requiresContentPublishReview(actor);
|
|
622
|
+
function contentPublicationService(payload) {
|
|
623
|
+
return payload.dineway.createPublicationAuthorizationService();
|
|
314
624
|
}
|
|
315
|
-
|
|
316
|
-
|
|
625
|
+
function contentPublicationError(error) {
|
|
626
|
+
return error instanceof PublicationAuthorizationError ? errorResult(`[${error.code}] ${error.message}`) : errorResult(error);
|
|
627
|
+
}
|
|
628
|
+
async function ensureContentReleaseRequest(payload, input) {
|
|
317
629
|
const actor = resolveActorIdentity(actorLocals(payload));
|
|
318
|
-
const
|
|
319
|
-
|
|
320
|
-
handlers: payload.dineway
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
collection,
|
|
324
|
-
id,
|
|
325
|
-
|
|
630
|
+
const settings = await getSiteSettingsWithDb(payload.dineway.db);
|
|
631
|
+
const release = await new ReleasePayloadBuilder({
|
|
632
|
+
handlers: payload.dineway,
|
|
633
|
+
reviewRequests: new ReviewRequestRepository(payload.dineway.db)
|
|
634
|
+
}).buildContentReleasePayload({
|
|
635
|
+
collection: input.collection,
|
|
636
|
+
id: input.id,
|
|
637
|
+
operation: input.operation,
|
|
638
|
+
editorialReviewRequestId: input.editorialReviewRequestId,
|
|
639
|
+
publishedAt: input.publishedAt,
|
|
640
|
+
scheduledAt: input.scheduledAt,
|
|
641
|
+
siteTimezone: settings.timezone?.trim() || "UTC"
|
|
642
|
+
});
|
|
643
|
+
const repository = new HitlRequestRepository(payload.dineway.db);
|
|
644
|
+
const existing = (await repository.list({
|
|
645
|
+
scope: release.scope,
|
|
646
|
+
statuses: ["pending", "approved"],
|
|
647
|
+
actionType: release.actionType,
|
|
648
|
+
targetRefType: "content",
|
|
649
|
+
targetRefId: release.entryId,
|
|
650
|
+
requestedByActorType: actor.actorType,
|
|
651
|
+
requestedByActorId: actor.actorId,
|
|
652
|
+
limit: 100
|
|
653
|
+
})).items.find((request) => request.metadata.actionHash === release.actionHash);
|
|
654
|
+
if (existing) return {
|
|
655
|
+
created: false,
|
|
656
|
+
request: existing
|
|
657
|
+
};
|
|
658
|
+
const request = await repository.create({
|
|
659
|
+
scope: release.scope,
|
|
660
|
+
actionType: release.actionType,
|
|
661
|
+
title: `${input.operation === "publish" ? "Publish" : "Schedule"} ${release.collection}/${release.entryId}`,
|
|
662
|
+
summary: `Authorize exact ${input.operation} release for reviewed Draft`,
|
|
663
|
+
riskReason: "Agent-authenticated content release requires explicit approval.",
|
|
664
|
+
reviewPayload: release.releasePayload,
|
|
665
|
+
targetRefType: "content",
|
|
666
|
+
targetRefId: release.entryId,
|
|
667
|
+
requestedByActorType: actor.actorType,
|
|
668
|
+
requestedByActorId: actor.actorId,
|
|
669
|
+
requestedAuthMetadata: actor.authMetadata,
|
|
670
|
+
metadata: {
|
|
671
|
+
actionHash: release.actionHash,
|
|
672
|
+
editorialReviewRequestId: release.editorialReviewRequestId,
|
|
673
|
+
operation: release.operation,
|
|
674
|
+
scheduledAt: release.scheduledAt,
|
|
675
|
+
publishedAt: release.publishedAt
|
|
676
|
+
}
|
|
326
677
|
});
|
|
327
|
-
|
|
678
|
+
await logSiteActivitySafely(payload.dineway.db, actorLocals(payload), {
|
|
679
|
+
actionType: "hitl.submitted",
|
|
680
|
+
subjectType: "hitl_request",
|
|
681
|
+
subjectId: request.id,
|
|
682
|
+
scope: request.scope,
|
|
683
|
+
sourceType: "mcp_tool",
|
|
684
|
+
sourceName: "content_release_request",
|
|
685
|
+
resultStatus: "pending",
|
|
686
|
+
summary: `Submitted release request for ${release.actionType}`,
|
|
687
|
+
detail: {
|
|
688
|
+
collection: release.collection,
|
|
689
|
+
entryId: release.entryId,
|
|
690
|
+
operation: release.operation,
|
|
691
|
+
editorialReviewRequestId: release.editorialReviewRequestId,
|
|
692
|
+
actionHash: release.actionHash
|
|
693
|
+
}
|
|
694
|
+
});
|
|
695
|
+
return {
|
|
696
|
+
created: true,
|
|
697
|
+
request
|
|
698
|
+
};
|
|
328
699
|
}
|
|
329
700
|
async function ensureWorkflowHitlRequest(extra, action) {
|
|
330
701
|
const payload = getExtra(extra);
|
|
@@ -460,6 +831,13 @@ function createMcpServer(options = {}) {
|
|
|
460
831
|
name: "dineway",
|
|
461
832
|
version: VERSION
|
|
462
833
|
}, { capabilities: { logging: {} } });
|
|
834
|
+
registerSeoProviderTools(server, {
|
|
835
|
+
service: options.seoProviderService,
|
|
836
|
+
authorize: (extra) => {
|
|
837
|
+
requireScope(extra, "seo:read");
|
|
838
|
+
requireRole(extra, Role.AUTHOR);
|
|
839
|
+
}
|
|
840
|
+
});
|
|
463
841
|
server.registerTool("site_briefing_get", {
|
|
464
842
|
title: "Get Site Briefing",
|
|
465
843
|
description: "Build a read-only Site Context Engine briefing for a site, collection, content item, plugin, taxonomy, or menu scope. The briefing includes inherited scopes, authorized schema, recent activity, active plugin capabilities, curated settings/SEO, and forward-compatible context/review/staleness sections.",
|
|
@@ -889,7 +1267,7 @@ function createMcpServer(options = {}) {
|
|
|
889
1267
|
});
|
|
890
1268
|
server.registerTool("assignment_create", {
|
|
891
1269
|
title: "Create Assignment",
|
|
892
|
-
description:
|
|
1270
|
+
description: "Create a workflow assignment attached to a Dineway scope. Assignments are durable human-agent handoffs and must use explicit lifecycle transitions instead of ad hoc status patches.",
|
|
893
1271
|
inputSchema: z.object({
|
|
894
1272
|
scope: z.string().describe("Assignment scope string."),
|
|
895
1273
|
assignment_type: z.string().describe("Workflow-specific assignment type label."),
|
|
@@ -941,7 +1319,7 @@ function createMcpServer(options = {}) {
|
|
|
941
1319
|
});
|
|
942
1320
|
server.registerTool("assignment_get", {
|
|
943
1321
|
title: "Get Assignment",
|
|
944
|
-
description:
|
|
1322
|
+
description: "Fetch one workflow assignment by id.",
|
|
945
1323
|
inputSchema: z.object({ id: z.string().describe("Assignment id.") }),
|
|
946
1324
|
annotations: { readOnlyHint: true }
|
|
947
1325
|
}, async (args, extra) => {
|
|
@@ -956,7 +1334,7 @@ function createMcpServer(options = {}) {
|
|
|
956
1334
|
});
|
|
957
1335
|
server.registerTool("assignment_list", {
|
|
958
1336
|
title: "List Assignments",
|
|
959
|
-
description:
|
|
1337
|
+
description: "List workflow assignments visible to the current actor. Non-editor actors are automatically limited to assignments they assigned or were assigned.",
|
|
960
1338
|
inputSchema: z.object({
|
|
961
1339
|
scope: z.string().optional().describe("Optional exact scope filter."),
|
|
962
1340
|
statuses: z.array(z.enum(ASSIGNMENT_STATUSES)).optional().describe("Optional assignment status filters."),
|
|
@@ -990,7 +1368,7 @@ function createMcpServer(options = {}) {
|
|
|
990
1368
|
});
|
|
991
1369
|
server.registerTool("assignment_accept", {
|
|
992
1370
|
title: "Accept Assignment",
|
|
993
|
-
description:
|
|
1371
|
+
description: "Accept a pending workflow assignment.",
|
|
994
1372
|
inputSchema: z.object({ id: z.string().describe("Assignment id.") })
|
|
995
1373
|
}, async (args, extra) => {
|
|
996
1374
|
requireWorkflowWrite(extra);
|
|
@@ -1022,7 +1400,7 @@ function createMcpServer(options = {}) {
|
|
|
1022
1400
|
});
|
|
1023
1401
|
server.registerTool("assignment_start", {
|
|
1024
1402
|
title: "Start Assignment",
|
|
1025
|
-
description:
|
|
1403
|
+
description: "Move an assignment into in_progress. When the assignment is currently blocked, this acts as the validated resume transition.",
|
|
1026
1404
|
inputSchema: z.object({ id: z.string().describe("Assignment id.") })
|
|
1027
1405
|
}, async (args, extra) => {
|
|
1028
1406
|
requireWorkflowWrite(extra);
|
|
@@ -1054,7 +1432,7 @@ function createMcpServer(options = {}) {
|
|
|
1054
1432
|
});
|
|
1055
1433
|
server.registerTool("assignment_complete", {
|
|
1056
1434
|
title: "Complete Assignment",
|
|
1057
|
-
description:
|
|
1435
|
+
description: "Mark a workflow assignment complete.",
|
|
1058
1436
|
inputSchema: z.object({
|
|
1059
1437
|
id: z.string().describe("Assignment id."),
|
|
1060
1438
|
completion_note: z.string().optional().describe("Optional completion note.")
|
|
@@ -1091,7 +1469,7 @@ function createMcpServer(options = {}) {
|
|
|
1091
1469
|
});
|
|
1092
1470
|
server.registerTool("assignment_decline", {
|
|
1093
1471
|
title: "Decline Assignment",
|
|
1094
|
-
description:
|
|
1472
|
+
description: "Decline a workflow assignment.",
|
|
1095
1473
|
inputSchema: z.object({
|
|
1096
1474
|
id: z.string().describe("Assignment id."),
|
|
1097
1475
|
reason: z.string().optional().describe("Optional decline reason.")
|
|
@@ -1128,7 +1506,7 @@ function createMcpServer(options = {}) {
|
|
|
1128
1506
|
});
|
|
1129
1507
|
server.registerTool("assignment_block", {
|
|
1130
1508
|
title: "Block Assignment",
|
|
1131
|
-
description:
|
|
1509
|
+
description: "Mark a workflow assignment blocked and record why.",
|
|
1132
1510
|
inputSchema: z.object({
|
|
1133
1511
|
id: z.string().describe("Assignment id."),
|
|
1134
1512
|
reason: z.string().optional().describe("Optional blocking reason.")
|
|
@@ -1165,7 +1543,7 @@ function createMcpServer(options = {}) {
|
|
|
1165
1543
|
});
|
|
1166
1544
|
server.registerTool("assignment_cancel", {
|
|
1167
1545
|
title: "Cancel Assignment",
|
|
1168
|
-
description:
|
|
1546
|
+
description: "Cancel a workflow assignment that should no longer continue.",
|
|
1169
1547
|
inputSchema: z.object({
|
|
1170
1548
|
id: z.string().describe("Assignment id."),
|
|
1171
1549
|
reason: z.string().optional().describe("Optional cancellation reason.")
|
|
@@ -1408,7 +1786,7 @@ function createMcpServer(options = {}) {
|
|
|
1408
1786
|
});
|
|
1409
1787
|
server.registerTool("agent_handoff_capture", {
|
|
1410
1788
|
title: "Capture Agent Handoff",
|
|
1411
|
-
description:
|
|
1789
|
+
description: "Capture the current agent objective, reasoning, findings, touched objects, and pending actions before pausing or handing work off.",
|
|
1412
1790
|
inputSchema: z.object({
|
|
1413
1791
|
scope: z.string().describe("Scope string: site, collection:{slug}, content:{collection}:{id}, or plugin:{id}."),
|
|
1414
1792
|
objective: z.string().min(1).describe("Current objective or outcome the agent was pursuing."),
|
|
@@ -1513,7 +1891,7 @@ function createMcpServer(options = {}) {
|
|
|
1513
1891
|
});
|
|
1514
1892
|
server.registerTool("agent_handoff_resume", {
|
|
1515
1893
|
title: "Resume Agent Handoff",
|
|
1516
|
-
description:
|
|
1894
|
+
description: "Resume from a stored handoff snapshot and return a deterministic diff of activity, context, and review changes since capture time.",
|
|
1517
1895
|
inputSchema: z.object({
|
|
1518
1896
|
snapshot_id: z.string().describe("Handoff snapshot id returned by agent_handoff_capture."),
|
|
1519
1897
|
activity_limit: z.number().int().min(1).max(100).optional().describe("Maximum activity rows to include in the diff. Defaults to 25."),
|
|
@@ -1619,7 +1997,7 @@ function createMcpServer(options = {}) {
|
|
|
1619
1997
|
collection: z.string().describe("Collection slug (e.g. 'posts', 'pages')"),
|
|
1620
1998
|
data: z.record(z.string(), z.unknown()).describe("Field values as key-value pairs matching the collection schema"),
|
|
1621
1999
|
slug: z.string().optional().describe("URL slug (auto-generated from title if omitted)"),
|
|
1622
|
-
status: z.
|
|
2000
|
+
status: z.literal("draft").optional().describe("Initial status. Content creation is draft-only."),
|
|
1623
2001
|
locale: z.string().optional().describe("Locale for this content (e.g. 'fr'). Defaults to default locale."),
|
|
1624
2002
|
translationOf: z.string().optional().describe("ID of the content item this is a translation of. Links items in the same translation group."),
|
|
1625
2003
|
bylines: z.array(contentBylineInputSchema).optional().describe("Bylines to credit. Each entry references an existing byline by id, with an optional roleLabel. The first entry becomes the primary byline.")
|
|
@@ -1637,35 +2015,6 @@ function createMcpServer(options = {}) {
|
|
|
1637
2015
|
requireOwnership(extra, extractContentAuthorId(source.data), "content:edit_own", "content:edit_any");
|
|
1638
2016
|
}
|
|
1639
2017
|
const data = await convertWriteData(dineway, args.collection, args.data);
|
|
1640
|
-
if (args.status === "published") {
|
|
1641
|
-
if (!hasPermission({
|
|
1642
|
-
id: userId,
|
|
1643
|
-
role: getExtra(extra).userRole
|
|
1644
|
-
}, "content:publish_own")) throw new McpError(ErrorCode.InvalidRequest, "Insufficient permissions: publishing requires content:publish_own");
|
|
1645
|
-
if (contentPublishReviewRequired(extra)) throw new McpError(ErrorCode.InvalidRequest, "Token-authenticated content creation with immediate publish is review-gated. Create a draft first, submit review_request_submit, resolve it as approved, then call content_publish with review_request_id.");
|
|
1646
|
-
const result = await dineway.handleContentCreate(args.collection, {
|
|
1647
|
-
data,
|
|
1648
|
-
slug: args.slug,
|
|
1649
|
-
authorId: userId,
|
|
1650
|
-
locale: args.locale,
|
|
1651
|
-
translationOf: args.translationOf,
|
|
1652
|
-
bylines: args.bylines
|
|
1653
|
-
});
|
|
1654
|
-
if (!result.success) return unwrap(result);
|
|
1655
|
-
const itemId = extractContentId(result.data);
|
|
1656
|
-
if (itemId) {
|
|
1657
|
-
await logMcpContentActivity(dineway, locals, args.collection, itemId, "created", "content_create", {
|
|
1658
|
-
changedFields: activityChangedKeys(args.data),
|
|
1659
|
-
slugProvided: args.slug !== void 0,
|
|
1660
|
-
locale: args.locale ?? null,
|
|
1661
|
-
translationOf: args.translationOf ?? null
|
|
1662
|
-
});
|
|
1663
|
-
const publishResult = await dineway.handleContentPublish(args.collection, itemId);
|
|
1664
|
-
if (publishResult.success) await logMcpContentActivity(dineway, locals, args.collection, itemId, "published", "content_create");
|
|
1665
|
-
return unwrap(publishResult);
|
|
1666
|
-
}
|
|
1667
|
-
return unwrap(result);
|
|
1668
|
-
}
|
|
1669
2018
|
const result = await dineway.handleContentCreate(args.collection, {
|
|
1670
2019
|
data,
|
|
1671
2020
|
slug: args.slug,
|
|
@@ -1694,15 +2043,14 @@ function createMcpServer(options = {}) {
|
|
|
1694
2043
|
locale: z.string().optional().describe("Locale to scope slug lookup. Only affects slug resolution; IDs are globally unique."),
|
|
1695
2044
|
data: z.record(z.string(), z.unknown()).optional().describe("Field values to update (only include changed fields)"),
|
|
1696
2045
|
slug: z.string().optional().describe("New URL slug"),
|
|
1697
|
-
status: z.
|
|
2046
|
+
status: z.literal("draft").optional().describe("Set to 'draft' to unpublish the item. Publishing uses content_publish."),
|
|
1698
2047
|
seo: contentSeoInput.optional().describe("Per-content SEO metadata. Only valid for collections with SEO enabled."),
|
|
1699
2048
|
bylines: z.array(contentBylineInputSchema).optional().describe("Replace the byline list for this item. The first entry becomes the primary byline."),
|
|
1700
2049
|
publishedAt: z.iso.datetime({
|
|
1701
2050
|
offset: true,
|
|
1702
2051
|
message: "must be an ISO 8601 datetime"
|
|
1703
2052
|
}).nullish().describe("Override the publication timestamp. Requires content:publish_any permission. Pass null to clear."),
|
|
1704
|
-
_rev: z.string().optional().describe("Revision token from content_get for conflict detection")
|
|
1705
|
-
review_request_id: z.string().optional().describe("Approved review request id required for token-authenticated content.publish actions.")
|
|
2053
|
+
_rev: z.string().optional().describe("Revision token from content_get for conflict detection")
|
|
1706
2054
|
})
|
|
1707
2055
|
}, async (args, extra) => {
|
|
1708
2056
|
requireScope(extra, "content:write");
|
|
@@ -1723,34 +2071,6 @@ function createMcpServer(options = {}) {
|
|
|
1723
2071
|
}
|
|
1724
2072
|
const hasInlineUpdates = args.data || args.slug || args.seo !== void 0 || args.bylines !== void 0 || args.publishedAt !== void 0;
|
|
1725
2073
|
const data = args.data ? await convertWriteData(dineway, args.collection, args.data) : args.data;
|
|
1726
|
-
if (args.status === "published") {
|
|
1727
|
-
requireOwnership(extra, ownerId, "content:publish_own", "content:publish_any");
|
|
1728
|
-
if (contentPublishReviewRequired(extra) && hasInlineUpdates) throw new McpError(ErrorCode.InvalidRequest, "Token-authenticated publish with inline content changes is review-gated. Save the draft first, submit review_request_submit, resolve it as approved, then publish with review_request_id.");
|
|
1729
|
-
if (hasInlineUpdates) {
|
|
1730
|
-
const updateResult = await dineway.handleContentUpdate(args.collection, resolvedId, {
|
|
1731
|
-
data,
|
|
1732
|
-
slug: args.slug,
|
|
1733
|
-
authorId: userId,
|
|
1734
|
-
locale: args.locale,
|
|
1735
|
-
seo: args.seo,
|
|
1736
|
-
bylines: args.bylines,
|
|
1737
|
-
publishedAt: args.publishedAt,
|
|
1738
|
-
_rev: args._rev
|
|
1739
|
-
});
|
|
1740
|
-
if (!updateResult.success) return unwrap(updateResult);
|
|
1741
|
-
await logMcpContentActivity(dineway, locals, args.collection, resolvedId, "updated", "content_update", {
|
|
1742
|
-
changedFields: activityChangedKeys(args.data),
|
|
1743
|
-
slugChanged: args.slug !== void 0,
|
|
1744
|
-
seoChanged: args.seo !== void 0,
|
|
1745
|
-
bylinesChanged: args.bylines !== void 0,
|
|
1746
|
-
publishedAtChanged: args.publishedAt !== void 0
|
|
1747
|
-
});
|
|
1748
|
-
}
|
|
1749
|
-
await requireApprovedContentPublishReview(extra, args.collection, resolvedId, args.review_request_id);
|
|
1750
|
-
const publishResult = await dineway.handleContentPublish(args.collection, resolvedId);
|
|
1751
|
-
if (publishResult.success) await logMcpContentActivity(dineway, locals, args.collection, resolvedId, "published", "content_update", { reviewRequestId: args.review_request_id ?? null });
|
|
1752
|
-
return unwrap(publishResult);
|
|
1753
|
-
}
|
|
1754
2074
|
if (args.status === "draft") {
|
|
1755
2075
|
requireOwnership(extra, ownerId, "content:publish_own", "content:publish_any");
|
|
1756
2076
|
if (hasInlineUpdates) {
|
|
@@ -1859,6 +2179,43 @@ function createMcpServer(options = {}) {
|
|
|
1859
2179
|
if (result.success) await logMcpContentActivity(ec, locals, args.collection, resolvedId, "permanently_deleted", "content_permanent_delete");
|
|
1860
2180
|
return unwrap(result);
|
|
1861
2181
|
});
|
|
2182
|
+
server.registerTool("content_release_request", {
|
|
2183
|
+
title: "Request Content Release Authorization",
|
|
2184
|
+
description: "Create or reuse an exact HITL request for publishing or scheduling an approved Draft. The server derives the action hash from current content, review, time, Site Settings, and policies.",
|
|
2185
|
+
inputSchema: z.object({
|
|
2186
|
+
collection: z.string().describe("Collection slug"),
|
|
2187
|
+
id: z.string().describe("Content item ID or slug"),
|
|
2188
|
+
operation: z.enum(["publish", "schedule"]).describe("Release operation"),
|
|
2189
|
+
review_request_id: z.string().describe("Approved editorial Review Request bound to the exact Draft"),
|
|
2190
|
+
publishedAt: z.iso.datetime({
|
|
2191
|
+
offset: true,
|
|
2192
|
+
message: "must be an ISO 8601 datetime"
|
|
2193
|
+
}).optional().describe("Optional publication timestamp for a publish release"),
|
|
2194
|
+
scheduledAt: z.iso.datetime({
|
|
2195
|
+
offset: true,
|
|
2196
|
+
message: "must be an ISO 8601 datetime"
|
|
2197
|
+
}).optional().describe("Required exact publication time for a schedule release")
|
|
2198
|
+
}).strict()
|
|
2199
|
+
}, async (args, extra) => {
|
|
2200
|
+
requireScope(extra, "content:write");
|
|
2201
|
+
requireRole(extra, Role.AUTHOR);
|
|
2202
|
+
const payload = getExtra(extra);
|
|
2203
|
+
const existing = await payload.dineway.handleContentGet(args.collection, args.id);
|
|
2204
|
+
if (!existing.success) return unwrap(existing);
|
|
2205
|
+
requireOwnership(extra, extractContentAuthorId(existing.data), "content:publish_own", "content:publish_any");
|
|
2206
|
+
try {
|
|
2207
|
+
return jsonResult(await ensureContentReleaseRequest(payload, {
|
|
2208
|
+
collection: args.collection,
|
|
2209
|
+
id: extractContentId(existing.data) ?? args.id,
|
|
2210
|
+
operation: args.operation,
|
|
2211
|
+
editorialReviewRequestId: args.review_request_id,
|
|
2212
|
+
publishedAt: args.publishedAt,
|
|
2213
|
+
scheduledAt: args.scheduledAt
|
|
2214
|
+
}));
|
|
2215
|
+
} catch (error) {
|
|
2216
|
+
return contentPublicationError(error);
|
|
2217
|
+
}
|
|
2218
|
+
});
|
|
1862
2219
|
server.registerTool("content_publish", {
|
|
1863
2220
|
title: "Publish Content",
|
|
1864
2221
|
description: "Publish a content item, making it live on the site. Creates a published revision from the current draft. Further edits create a new draft without affecting the live version until re-published. Pass `publishedAt` to backdate imported or historical content; this requires content:publish_any.",
|
|
@@ -1869,7 +2226,8 @@ function createMcpServer(options = {}) {
|
|
|
1869
2226
|
offset: true,
|
|
1870
2227
|
message: "must be an ISO 8601 datetime"
|
|
1871
2228
|
}).optional().describe("Override publication timestamp. Requires content:publish_any permission."),
|
|
1872
|
-
review_request_id: z.string().
|
|
2229
|
+
review_request_id: z.string().describe("Approved editorial Review Request bound to the exact Draft."),
|
|
2230
|
+
release_authorization_id: z.string().optional().describe("Approved exact release HITL request required for token actors.")
|
|
1873
2231
|
})
|
|
1874
2232
|
}, async (args, extra) => {
|
|
1875
2233
|
requireScope(extra, "content:write");
|
|
@@ -1887,13 +2245,20 @@ function createMcpServer(options = {}) {
|
|
|
1887
2245
|
role: userRole
|
|
1888
2246
|
}, "content:publish_any")) return errorResult("[INSUFFICIENT_PERMISSIONS] Setting publishedAt requires content:publish_any permission");
|
|
1889
2247
|
}
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
2248
|
+
try {
|
|
2249
|
+
return unwrap((await contentPublicationService(payload).publishAuthorizedContent({
|
|
2250
|
+
actor: resolveActorIdentity(locals),
|
|
2251
|
+
collection: args.collection,
|
|
2252
|
+
id: resolvedId,
|
|
2253
|
+
editorialReviewRequestId: args.review_request_id,
|
|
2254
|
+
releaseHitlRequestId: args.release_authorization_id,
|
|
2255
|
+
publishedAt: args.publishedAt,
|
|
2256
|
+
sourceType: "mcp_tool",
|
|
2257
|
+
sourceName: "content_publish"
|
|
2258
|
+
})).result);
|
|
2259
|
+
} catch (error) {
|
|
2260
|
+
return contentPublicationError(error);
|
|
2261
|
+
}
|
|
1897
2262
|
});
|
|
1898
2263
|
server.registerTool("content_unpublish", {
|
|
1899
2264
|
title: "Unpublish Content",
|
|
@@ -1922,7 +2287,9 @@ function createMcpServer(options = {}) {
|
|
|
1922
2287
|
inputSchema: z.object({
|
|
1923
2288
|
collection: z.string().describe("Collection slug"),
|
|
1924
2289
|
id: z.string().describe("Content item ID or slug"),
|
|
1925
|
-
scheduledAt: z.string().describe("ISO 8601 datetime for publication (e.g. '2025-06-01T09:00:00Z')")
|
|
2290
|
+
scheduledAt: z.string().describe("ISO 8601 datetime for publication (e.g. '2025-06-01T09:00:00Z')"),
|
|
2291
|
+
review_request_id: z.string().describe("Approved editorial Review Request bound to the exact Draft."),
|
|
2292
|
+
release_authorization_id: z.string().optional().describe("Approved exact release HITL request required for token actors.")
|
|
1926
2293
|
})
|
|
1927
2294
|
}, async (args, extra) => {
|
|
1928
2295
|
requireScope(extra, "content:write");
|
|
@@ -1934,9 +2301,20 @@ function createMcpServer(options = {}) {
|
|
|
1934
2301
|
if (!existing.success) return unwrap(existing);
|
|
1935
2302
|
requireOwnership(extra, extractContentAuthorId(existing.data), "content:publish_own", "content:publish_any");
|
|
1936
2303
|
const resolvedId = extractContentId(existing.data) ?? args.id;
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
2304
|
+
try {
|
|
2305
|
+
return unwrap((await contentPublicationService(payload).scheduleAuthorizedContent({
|
|
2306
|
+
actor: resolveActorIdentity(locals),
|
|
2307
|
+
collection: args.collection,
|
|
2308
|
+
id: resolvedId,
|
|
2309
|
+
editorialReviewRequestId: args.review_request_id,
|
|
2310
|
+
releaseHitlRequestId: args.release_authorization_id,
|
|
2311
|
+
scheduledAt: args.scheduledAt,
|
|
2312
|
+
sourceType: "mcp_tool",
|
|
2313
|
+
sourceName: "content_schedule"
|
|
2314
|
+
})).result);
|
|
2315
|
+
} catch (error) {
|
|
2316
|
+
return contentPublicationError(error);
|
|
2317
|
+
}
|
|
1940
2318
|
});
|
|
1941
2319
|
server.registerTool("content_unschedule", {
|
|
1942
2320
|
title: "Cancel Scheduled Publication",
|
|
@@ -1955,9 +2333,17 @@ function createMcpServer(options = {}) {
|
|
|
1955
2333
|
if (!existing.success) return unwrap(existing);
|
|
1956
2334
|
requireOwnership(extra, extractContentAuthorId(existing.data), "content:publish_own", "content:publish_any");
|
|
1957
2335
|
const resolvedId = extractContentId(existing.data) ?? args.id;
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
2336
|
+
try {
|
|
2337
|
+
return unwrap((await contentPublicationService(payload).unscheduleAuthorizedContent({
|
|
2338
|
+
actor: resolveActorIdentity(locals),
|
|
2339
|
+
collection: args.collection,
|
|
2340
|
+
id: resolvedId,
|
|
2341
|
+
sourceType: "mcp_tool",
|
|
2342
|
+
sourceName: "content_unschedule"
|
|
2343
|
+
})).result);
|
|
2344
|
+
} catch (error) {
|
|
2345
|
+
return contentPublicationError(error);
|
|
2346
|
+
}
|
|
1961
2347
|
});
|
|
1962
2348
|
server.registerTool("content_compare", {
|
|
1963
2349
|
title: "Compare Live vs Draft",
|
|
@@ -2065,7 +2451,7 @@ function createMcpServer(options = {}) {
|
|
|
2065
2451
|
requireRole(extra, Role.EDITOR);
|
|
2066
2452
|
const ec = getDineway(extra);
|
|
2067
2453
|
try {
|
|
2068
|
-
const { SchemaRegistry } = await import("../../../schema-
|
|
2454
|
+
const { SchemaRegistry } = await import("../../../schema-DUtnZxjZ.mjs").then((n) => n.t);
|
|
2069
2455
|
return jsonResult({ items: await new SchemaRegistry(ec.db).listCollections() });
|
|
2070
2456
|
} catch (error) {
|
|
2071
2457
|
return errorResult(error);
|
|
@@ -2081,7 +2467,7 @@ function createMcpServer(options = {}) {
|
|
|
2081
2467
|
requireRole(extra, Role.EDITOR);
|
|
2082
2468
|
const ec = getDineway(extra);
|
|
2083
2469
|
try {
|
|
2084
|
-
const { SchemaRegistry } = await import("../../../schema-
|
|
2470
|
+
const { SchemaRegistry } = await import("../../../schema-DUtnZxjZ.mjs").then((n) => n.t);
|
|
2085
2471
|
const collection = await new SchemaRegistry(ec.db).getCollectionWithFields(args.slug);
|
|
2086
2472
|
if (!collection) return errorResult(`Collection '${args.slug}' not found`);
|
|
2087
2473
|
return jsonResult(collection);
|
|
@@ -2111,7 +2497,7 @@ function createMcpServer(options = {}) {
|
|
|
2111
2497
|
requireRole(extra, Role.ADMIN);
|
|
2112
2498
|
const ec = getDineway(extra);
|
|
2113
2499
|
try {
|
|
2114
|
-
const { SchemaRegistry } = await import("../../../schema-
|
|
2500
|
+
const { SchemaRegistry } = await import("../../../schema-DUtnZxjZ.mjs").then((n) => n.t);
|
|
2115
2501
|
const collection = await new SchemaRegistry(ec.db).createCollection({
|
|
2116
2502
|
slug: args.slug,
|
|
2117
2503
|
label: args.label,
|
|
@@ -2175,7 +2561,7 @@ function createMcpServer(options = {}) {
|
|
|
2175
2561
|
request
|
|
2176
2562
|
});
|
|
2177
2563
|
}
|
|
2178
|
-
const { SchemaRegistry } = await import("../../../schema-
|
|
2564
|
+
const { SchemaRegistry } = await import("../../../schema-DUtnZxjZ.mjs").then((n) => n.t);
|
|
2179
2565
|
await new SchemaRegistry(ec.db).deleteCollection(args.slug, { force: args.force });
|
|
2180
2566
|
ec.invalidateManifest();
|
|
2181
2567
|
await logSchemaActivity(ec.db, locals, {
|
|
@@ -2239,7 +2625,7 @@ function createMcpServer(options = {}) {
|
|
|
2239
2625
|
requireRole(extra, Role.ADMIN);
|
|
2240
2626
|
const ec = getDineway(extra);
|
|
2241
2627
|
try {
|
|
2242
|
-
const { SchemaRegistry } = await import("../../../schema-
|
|
2628
|
+
const { SchemaRegistry } = await import("../../../schema-DUtnZxjZ.mjs").then((n) => n.t);
|
|
2243
2629
|
const field = await new SchemaRegistry(ec.db).createField(args.collection, {
|
|
2244
2630
|
slug: args.slug,
|
|
2245
2631
|
label: args.label,
|
|
@@ -2308,7 +2694,7 @@ function createMcpServer(options = {}) {
|
|
|
2308
2694
|
request
|
|
2309
2695
|
});
|
|
2310
2696
|
}
|
|
2311
|
-
const { SchemaRegistry } = await import("../../../schema-
|
|
2697
|
+
const { SchemaRegistry } = await import("../../../schema-DUtnZxjZ.mjs").then((n) => n.t);
|
|
2312
2698
|
await new SchemaRegistry(ec.db).deleteField(args.collection, args.fieldSlug);
|
|
2313
2699
|
ec.invalidateManifest();
|
|
2314
2700
|
await logSchemaActivity(ec.db, locals, {
|
|
@@ -2441,7 +2827,7 @@ function createMcpServer(options = {}) {
|
|
|
2441
2827
|
requireScope(extra, "content:read");
|
|
2442
2828
|
const ec = getDineway(extra);
|
|
2443
2829
|
try {
|
|
2444
|
-
const { searchWithDb } = await import("../../../search-
|
|
2830
|
+
const { searchWithDb } = await import("../../../search-DUKgZUlm.mjs").then((n) => n.t);
|
|
2445
2831
|
return jsonResult(await searchWithDb(ec.db, args.query, {
|
|
2446
2832
|
collections: args.collections,
|
|
2447
2833
|
locale: args.locale,
|
|
@@ -2467,7 +2853,7 @@ function createMcpServer(options = {}) {
|
|
|
2467
2853
|
requireScope(extra, "content:read");
|
|
2468
2854
|
const ec = getDineway(extra);
|
|
2469
2855
|
try {
|
|
2470
|
-
const { BylineRepository } = await import("../../../byline-
|
|
2856
|
+
const { BylineRepository } = await import("../../../byline-7xR185Ly.mjs").then((n) => n.n);
|
|
2471
2857
|
return jsonResult(await new BylineRepository(ec.db).findMany({
|
|
2472
2858
|
search: args.search,
|
|
2473
2859
|
isGuest: args.isGuest,
|
|
@@ -2489,7 +2875,7 @@ function createMcpServer(options = {}) {
|
|
|
2489
2875
|
requireScope(extra, "content:read");
|
|
2490
2876
|
const ec = getDineway(extra);
|
|
2491
2877
|
try {
|
|
2492
|
-
const { BylineRepository } = await import("../../../byline-
|
|
2878
|
+
const { BylineRepository } = await import("../../../byline-7xR185Ly.mjs").then((n) => n.n);
|
|
2493
2879
|
const byline = await new BylineRepository(ec.db).findById(args.id);
|
|
2494
2880
|
if (!byline) return errorResult(`Byline '${args.id}' not found`);
|
|
2495
2881
|
return jsonResult(byline);
|
|
@@ -2507,7 +2893,7 @@ function createMcpServer(options = {}) {
|
|
|
2507
2893
|
requireRole(extra, Role.EDITOR);
|
|
2508
2894
|
const ec = getDineway(extra);
|
|
2509
2895
|
try {
|
|
2510
|
-
const { handleBylineCreate } = await import("../../../bylines-
|
|
2896
|
+
const { handleBylineCreate } = await import("../../../bylines-C-EL6dh3.mjs").then((n) => n.t);
|
|
2511
2897
|
const result = await handleBylineCreate(ec.db, args);
|
|
2512
2898
|
if (result.success) await invalidateBylines();
|
|
2513
2899
|
return unwrap(result);
|
|
@@ -2527,7 +2913,7 @@ function createMcpServer(options = {}) {
|
|
|
2527
2913
|
requireRole(extra, Role.EDITOR);
|
|
2528
2914
|
const ec = getDineway(extra);
|
|
2529
2915
|
try {
|
|
2530
|
-
const { handleBylineUpdate } = await import("../../../bylines-
|
|
2916
|
+
const { handleBylineUpdate } = await import("../../../bylines-C-EL6dh3.mjs").then((n) => n.t);
|
|
2531
2917
|
const { id, ...input } = args;
|
|
2532
2918
|
const result = await handleBylineUpdate(ec.db, id, input);
|
|
2533
2919
|
if (result.success) await invalidateBylines();
|
|
@@ -2546,7 +2932,7 @@ function createMcpServer(options = {}) {
|
|
|
2546
2932
|
requireRole(extra, Role.EDITOR);
|
|
2547
2933
|
const ec = getDineway(extra);
|
|
2548
2934
|
try {
|
|
2549
|
-
const { BylineRepository } = await import("../../../byline-
|
|
2935
|
+
const { BylineRepository } = await import("../../../byline-7xR185Ly.mjs").then((n) => n.n);
|
|
2550
2936
|
if (!await new BylineRepository(ec.db).delete(args.id)) return errorResult(`Byline '${args.id}' not found`);
|
|
2551
2937
|
await invalidateBylines();
|
|
2552
2938
|
return jsonResult({ deleted: args.id });
|
|
@@ -2563,7 +2949,7 @@ function createMcpServer(options = {}) {
|
|
|
2563
2949
|
requireScope(extra, "content:read");
|
|
2564
2950
|
const ec = getDineway(extra);
|
|
2565
2951
|
try {
|
|
2566
|
-
const { handleBylineTranslations } = await import("../../../bylines-
|
|
2952
|
+
const { handleBylineTranslations } = await import("../../../bylines-C-EL6dh3.mjs").then((n) => n.t);
|
|
2567
2953
|
return unwrap(await handleBylineTranslations(ec.db, args.id));
|
|
2568
2954
|
} catch (error) {
|
|
2569
2955
|
return errorResult(error);
|
|
@@ -2578,7 +2964,7 @@ function createMcpServer(options = {}) {
|
|
|
2578
2964
|
requireScope(extra, "content:read");
|
|
2579
2965
|
const ec = getDineway(extra);
|
|
2580
2966
|
try {
|
|
2581
|
-
const { handleTaxonomyList } = await import("../../../taxonomies-
|
|
2967
|
+
const { handleTaxonomyList } = await import("../../../taxonomies-BiM9NtgW.mjs").then((n) => n.l);
|
|
2582
2968
|
return unwrap(await handleTaxonomyList(ec.db, { locale: args.locale }));
|
|
2583
2969
|
} catch (error) {
|
|
2584
2970
|
return errorResult(error);
|
|
@@ -2598,12 +2984,12 @@ function createMcpServer(options = {}) {
|
|
|
2598
2984
|
requireScope(extra, "content:read");
|
|
2599
2985
|
const ec = getDineway(extra);
|
|
2600
2986
|
try {
|
|
2601
|
-
const { handleTaxonomyList } = await import("../../../taxonomies-
|
|
2987
|
+
const { handleTaxonomyList } = await import("../../../taxonomies-BiM9NtgW.mjs").then((n) => n.l);
|
|
2602
2988
|
const listResult = await handleTaxonomyList(ec.db, { locale: args.locale });
|
|
2603
2989
|
if (!listResult.success) return unwrap(listResult);
|
|
2604
2990
|
if (!listResult.data.taxonomies.find((t) => t.name === args.taxonomy)) return errorResult(`Taxonomy '${args.taxonomy}' not found`);
|
|
2605
|
-
const { TaxonomyRepository } = await import("../../../taxonomy-
|
|
2606
|
-
const { decodeCursor, encodeCursor } = await import("../../../types-
|
|
2991
|
+
const { TaxonomyRepository } = await import("../../../taxonomy-0k_vRVsD.mjs").then((n) => n.n);
|
|
2992
|
+
const { decodeCursor, encodeCursor } = await import("../../../types-ChxYDRvx.mjs").then((n) => n.a);
|
|
2607
2993
|
const repo = new TaxonomyRepository(ec.db);
|
|
2608
2994
|
const limit = Math.min(args.limit ?? 50, 100);
|
|
2609
2995
|
const terms = await repo.findByName(args.taxonomy, { locale: args.locale });
|
|
@@ -2652,7 +3038,7 @@ function createMcpServer(options = {}) {
|
|
|
2652
3038
|
requireRole(extra, Role.EDITOR);
|
|
2653
3039
|
const ec = getDineway(extra);
|
|
2654
3040
|
try {
|
|
2655
|
-
const { handleTermCreate } = await import("../../../taxonomies-
|
|
3041
|
+
const { handleTermCreate } = await import("../../../taxonomies-BiM9NtgW.mjs").then((n) => n.l);
|
|
2656
3042
|
return unwrap(await handleTermCreate(ec.db, args.taxonomy, {
|
|
2657
3043
|
slug: args.slug,
|
|
2658
3044
|
label: args.label,
|
|
@@ -2682,7 +3068,7 @@ function createMcpServer(options = {}) {
|
|
|
2682
3068
|
requireRole(extra, Role.EDITOR);
|
|
2683
3069
|
const ec = getDineway(extra);
|
|
2684
3070
|
try {
|
|
2685
|
-
const { handleTermUpdate } = await import("../../../taxonomies-
|
|
3071
|
+
const { handleTermUpdate } = await import("../../../taxonomies-BiM9NtgW.mjs").then((n) => n.l);
|
|
2686
3072
|
return unwrap(await handleTermUpdate(ec.db, args.taxonomy, args.termSlug, {
|
|
2687
3073
|
slug: args.slug,
|
|
2688
3074
|
label: args.label,
|
|
@@ -2707,7 +3093,7 @@ function createMcpServer(options = {}) {
|
|
|
2707
3093
|
requireRole(extra, Role.EDITOR);
|
|
2708
3094
|
const ec = getDineway(extra);
|
|
2709
3095
|
try {
|
|
2710
|
-
const { handleTermDelete } = await import("../../../taxonomies-
|
|
3096
|
+
const { handleTermDelete } = await import("../../../taxonomies-BiM9NtgW.mjs").then((n) => n.l);
|
|
2711
3097
|
return unwrap(await handleTermDelete(ec.db, args.taxonomy, args.termSlug, { locale: args.locale }));
|
|
2712
3098
|
} catch (error) {
|
|
2713
3099
|
return errorResult(error);
|
|
@@ -2722,7 +3108,7 @@ function createMcpServer(options = {}) {
|
|
|
2722
3108
|
requireScope(extra, "content:read");
|
|
2723
3109
|
const ec = getDineway(extra);
|
|
2724
3110
|
try {
|
|
2725
|
-
const { handleTermTranslations } = await import("../../../taxonomies-
|
|
3111
|
+
const { handleTermTranslations } = await import("../../../taxonomies-BiM9NtgW.mjs").then((n) => n.l);
|
|
2726
3112
|
return unwrap(await handleTermTranslations(ec.db, args.id));
|
|
2727
3113
|
} catch (error) {
|
|
2728
3114
|
return errorResult(error);
|
|
@@ -2737,7 +3123,7 @@ function createMcpServer(options = {}) {
|
|
|
2737
3123
|
requireScope(extra, "content:read");
|
|
2738
3124
|
const ec = getDineway(extra);
|
|
2739
3125
|
try {
|
|
2740
|
-
const { handleMenuList } = await import("../../../menus-
|
|
3126
|
+
const { handleMenuList } = await import("../../../menus-CmyIkRG5.mjs").then((n) => n.d);
|
|
2741
3127
|
return unwrap(await handleMenuList(ec.db, { locale: args.locale }));
|
|
2742
3128
|
} catch (error) {
|
|
2743
3129
|
return errorResult(error);
|
|
@@ -2755,7 +3141,7 @@ function createMcpServer(options = {}) {
|
|
|
2755
3141
|
requireScope(extra, "content:read");
|
|
2756
3142
|
const ec = getDineway(extra);
|
|
2757
3143
|
try {
|
|
2758
|
-
const { handleMenuGet } = await import("../../../menus-
|
|
3144
|
+
const { handleMenuGet } = await import("../../../menus-CmyIkRG5.mjs").then((n) => n.d);
|
|
2759
3145
|
return unwrap(await handleMenuGet(ec.db, args.name, { locale: args.locale }));
|
|
2760
3146
|
} catch (error) {
|
|
2761
3147
|
return errorResult(error);
|
|
@@ -2770,7 +3156,7 @@ function createMcpServer(options = {}) {
|
|
|
2770
3156
|
requireScope(extra, "content:read");
|
|
2771
3157
|
const ec = getDineway(extra);
|
|
2772
3158
|
try {
|
|
2773
|
-
const { handleMenuTranslations } = await import("../../../menus-
|
|
3159
|
+
const { handleMenuTranslations } = await import("../../../menus-CmyIkRG5.mjs").then((n) => n.d);
|
|
2774
3160
|
return unwrap(await handleMenuTranslations(ec.db, args.id));
|
|
2775
3161
|
} catch (error) {
|
|
2776
3162
|
return errorResult(error);
|
|
@@ -2790,7 +3176,7 @@ function createMcpServer(options = {}) {
|
|
|
2790
3176
|
requireRole(extra, Role.EDITOR);
|
|
2791
3177
|
const ec = getDineway(extra);
|
|
2792
3178
|
try {
|
|
2793
|
-
const { handleMenuCreate } = await import("../../../menus-
|
|
3179
|
+
const { handleMenuCreate } = await import("../../../menus-CmyIkRG5.mjs").then((n) => n.d);
|
|
2794
3180
|
return unwrap(await handleMenuCreate(ec.db, {
|
|
2795
3181
|
name: args.name,
|
|
2796
3182
|
label: args.label,
|
|
@@ -2814,7 +3200,7 @@ function createMcpServer(options = {}) {
|
|
|
2814
3200
|
requireRole(extra, Role.EDITOR);
|
|
2815
3201
|
const ec = getDineway(extra);
|
|
2816
3202
|
try {
|
|
2817
|
-
const { handleMenuUpdate } = await import("../../../menus-
|
|
3203
|
+
const { handleMenuUpdate } = await import("../../../menus-CmyIkRG5.mjs").then((n) => n.d);
|
|
2818
3204
|
return unwrap(await handleMenuUpdate(ec.db, args.name, {
|
|
2819
3205
|
label: args.label,
|
|
2820
3206
|
locale: args.locale
|
|
@@ -2836,7 +3222,7 @@ function createMcpServer(options = {}) {
|
|
|
2836
3222
|
requireRole(extra, Role.EDITOR);
|
|
2837
3223
|
const ec = getDineway(extra);
|
|
2838
3224
|
try {
|
|
2839
|
-
const { handleMenuDelete } = await import("../../../menus-
|
|
3225
|
+
const { handleMenuDelete } = await import("../../../menus-CmyIkRG5.mjs").then((n) => n.d);
|
|
2840
3226
|
return unwrap(await handleMenuDelete(ec.db, args.name, { locale: args.locale }));
|
|
2841
3227
|
} catch (error) {
|
|
2842
3228
|
return errorResult(error);
|
|
@@ -2871,7 +3257,7 @@ function createMcpServer(options = {}) {
|
|
|
2871
3257
|
requireRole(extra, Role.EDITOR);
|
|
2872
3258
|
const ec = getDineway(extra);
|
|
2873
3259
|
try {
|
|
2874
|
-
const { handleMenuSetItems } = await import("../../../menus-
|
|
3260
|
+
const { handleMenuSetItems } = await import("../../../menus-CmyIkRG5.mjs").then((n) => n.d);
|
|
2875
3261
|
return unwrap(await handleMenuSetItems(ec.db, args.name, args.items, { locale: args.locale }));
|
|
2876
3262
|
} catch (error) {
|
|
2877
3263
|
return errorResult(error);
|
|
@@ -2918,7 +3304,7 @@ function createMcpServer(options = {}) {
|
|
|
2918
3304
|
requireRole(extra, Role.ADMIN);
|
|
2919
3305
|
const ec = getDineway(extra);
|
|
2920
3306
|
try {
|
|
2921
|
-
const { handleSettingsGet } = await import("../../../settings-
|
|
3307
|
+
const { handleSettingsGet } = await import("../../../settings-EzADu-dd.mjs").then((n) => n.r);
|
|
2922
3308
|
return unwrap(await handleSettingsGet(ec.db, ec.storage));
|
|
2923
3309
|
} catch (error) {
|
|
2924
3310
|
return errorResult(error);
|
|
@@ -2955,7 +3341,7 @@ function createMcpServer(options = {}) {
|
|
|
2955
3341
|
request
|
|
2956
3342
|
});
|
|
2957
3343
|
}
|
|
2958
|
-
const { handleSettingsUpdate } = await import("../../../settings-
|
|
3344
|
+
const { handleSettingsUpdate } = await import("../../../settings-EzADu-dd.mjs").then((n) => n.r);
|
|
2959
3345
|
const result = await handleSettingsUpdate(ec.db, ec.storage, settingsInput);
|
|
2960
3346
|
if (!result.success) return unwrap(result);
|
|
2961
3347
|
await logSiteActivitySafely(ec.db, locals, {
|
|
@@ -3028,6 +3414,7 @@ const POST = async ({ request, locals }) => {
|
|
|
3028
3414
|
if (!dineway) return apiError("NOT_CONFIGURED", "Dineway is not initialized", 500);
|
|
3029
3415
|
if (!user) return apiError("UNAUTHORIZED", "Authentication required", 401);
|
|
3030
3416
|
const server = createMcpServer({
|
|
3417
|
+
seoProviderService: new SeoProviderEvidenceService(new ForgewaySeoGatewayClient()),
|
|
3031
3418
|
pluginMcpRegistry: dineway.getPluginMcpRegistry(),
|
|
3032
3419
|
executePluginMcpCommand: createReviewedPluginMcpCommandExecutor()
|
|
3033
3420
|
});
|