dineway 0.2.1 → 0.2.3
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/README.md +17 -17
- package/dist/{activity-DUaz_w7p.mjs → activity-BDMlkpYY.mjs} +2 -2
- package/dist/{activity-events-CJDvE2uc.mjs → activity-events-DEYmJhWd.mjs} +1 -1
- package/dist/{allowed-origins--OwHHiY8.mjs → allowed-origins-VLgv2PL1.mjs} +1 -1
- package/dist/api/route-utils.d.mts +9 -9
- package/dist/api/route-utils.mjs +13 -13
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +3 -3
- package/dist/{api-B4PHIF4V.mjs → api-BFey0dOt.mjs} +15 -15
- package/dist/{api-tokens-tbK_sORH.mjs → api-tokens-C4K9eocv.mjs} +1 -1
- package/dist/{apply-DjTqq6Ae.mjs → apply-DHT0l398.mjs} +18 -18
- package/dist/astro/index.d.mts +10 -10
- package/dist/astro/index.mjs +11 -3
- package/dist/astro/middleware/auth.d.mts +8 -8
- 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 +78 -76
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +5 -5
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +5 -5
- 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 +16 -16
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +2 -2
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +6 -6
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +6 -6
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +6 -6
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +13 -13
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +13 -13
- package/dist/astro/routes/api/admin/bylines/index.mjs +13 -13
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +11 -11
- package/dist/astro/routes/api/admin/comments/_id_.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/bulk.mjs +9 -9
- package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/index.mjs +9 -9
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +23 -23
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +23 -23
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +28 -28
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +28 -28
- package/dist/astro/routes/api/admin/context/diff.mjs +27 -27
- package/dist/astro/routes/api/admin/context/index.mjs +28 -28
- package/dist/astro/routes/api/admin/context/stale.mjs +27 -27
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +23 -23
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +27 -27
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +27 -27
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +24 -24
- 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 +50 -47
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +50 -47
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +42 -39
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +49 -46
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +49 -46
- package/dist/astro/routes/api/admin/plugins/index.mjs +42 -39
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +42 -39
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +49 -46
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +42 -39
- package/dist/astro/routes/api/admin/plugins/updates.mjs +42 -39
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +5 -5
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +28 -28
- package/dist/astro/routes/api/admin/review-requests/index.mjs +28 -28
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +42 -39
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +42 -39
- 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 +5 -5
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
- package/dist/astro/routes/api/admin/users/index.mjs +5 -5
- 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 +9 -9
- package/dist/astro/routes/api/auth/invite/index.mjs +6 -6
- package/dist/astro/routes/api/auth/invite/register-options.mjs +8 -8
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +8 -8
- 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 +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 +5 -5
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +8 -8
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +9 -9
- package/dist/astro/routes/api/auth/passkey/verify.mjs +9 -9
- 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 +9 -9
- package/dist/astro/routes/api/auth/signup/request.mjs +8 -8
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +12 -12
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +11 -11
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +15 -15
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +15 -15
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/trash.mjs +6 -6
- 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 +17 -17
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +8 -8
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +8 -8
- package/dist/astro/routes/api/import/wordpress/execute.mjs +32 -32
- package/dist/astro/routes/api/import/wordpress/media.d.mts +8 -8
- package/dist/astro/routes/api/import/wordpress/media.mjs +9 -9
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +31 -31
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +9 -9
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +28 -28
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +20 -20
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +8 -8
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +36 -36
- package/dist/astro/routes/api/integrations/_provider_.d.mts +8 -0
- package/dist/astro/routes/api/integrations/_provider_.mjs +51 -0
- package/dist/astro/routes/api/integrations/index.d.mts +7 -0
- package/dist/astro/routes/api/integrations/index.mjs +24 -0
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/mcp.mjs +232 -312
- package/dist/astro/routes/api/media/_id_/confirm.mjs +8 -8
- package/dist/astro/routes/api/media/_id_.mjs +6 -6
- 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 +9 -9
- package/dist/astro/routes/api/media.mjs +9 -9
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +28 -28
- package/dist/astro/routes/api/menus/_name_/items.mjs +28 -28
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +28 -28
- package/dist/astro/routes/api/menus/_name_/translations.mjs +28 -28
- package/dist/astro/routes/api/menus/_name_.mjs +28 -28
- package/dist/astro/routes/api/menus/index.mjs +28 -28
- 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 +4 -4
- package/dist/astro/routes/api/redirects/404s/index.mjs +9 -9
- package/dist/astro/routes/api/redirects/404s/summary.mjs +9 -9
- package/dist/astro/routes/api/redirects/_id_.mjs +29 -29
- package/dist/astro/routes/api/redirects/index.mjs +29 -29
- 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 +44 -41
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +44 -41
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +44 -41
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +44 -41
- package/dist/astro/routes/api/schema/collections/index.mjs +44 -41
- package/dist/astro/routes/api/schema/index.mjs +7 -7
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +42 -39
- package/dist/astro/routes/api/schema/orphans/index.mjs +42 -39
- package/dist/astro/routes/api/search/enable.mjs +10 -10
- package/dist/astro/routes/api/search/index.mjs +9 -9
- package/dist/astro/routes/api/search/rebuild.mjs +10 -10
- package/dist/astro/routes/api/search/stats.mjs +6 -6
- package/dist/astro/routes/api/search/suggest.mjs +9 -9
- package/dist/astro/routes/api/sections/_slug_.mjs +28 -28
- package/dist/astro/routes/api/sections/index.mjs +28 -28
- package/dist/astro/routes/api/settings/email.mjs +3 -3
- package/dist/astro/routes/api/settings.mjs +28 -28
- package/dist/astro/routes/api/setup/admin-verify.mjs +11 -11
- package/dist/astro/routes/api/setup/admin.mjs +9 -9
- package/dist/astro/routes/api/setup/dev-bypass.mjs +23 -23
- package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
- package/dist/astro/routes/api/setup/index.mjs +24 -24
- 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 +31 -31
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +31 -31
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +31 -31
- package/dist/astro/routes/api/taxonomies/index.mjs +31 -31
- 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 +27 -27
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +28 -28
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +28 -28
- package/dist/astro/routes/api/widget-areas/_name_.mjs +25 -25
- package/dist/astro/routes/api/widget-areas/index.mjs +28 -28
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +5 -5
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +7 -7
- package/dist/astro/routes/sitemap.xml.mjs +5 -5
- package/dist/astro/session-driver.d.mts +1 -1
- package/dist/astro/session-driver.mjs +2 -2
- package/dist/astro/types.d.mts +11 -11
- package/dist/{audit-B2pRxZ20.mjs → audit-BzhwRVym.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-D71jourk.mjs → auth-control-guard-B_Dx-epW.mjs} +1 -1
- package/dist/{authorize-ZXPGPwKn.mjs → authorize-D6MkRtPw.mjs} +1 -1
- package/dist/{briefing-kRhegBoF.mjs → briefing-Cl70iEH5.mjs} +1 -1
- package/dist/{briefing-0rf-su3-.mjs → briefing-GFhLTLJo.mjs} +5 -5
- package/dist/{bundle-CEcdUa1s.mjs → bundle-CIrUlrkQ.mjs} +2 -2
- package/dist/{byline-7xR185Ly.mjs → byline-BJa1MyKB.mjs} +4 -4
- package/dist/{byline-fields-Ckeqd1OY.d.mts → byline-fields-sRHzS0aM.d.mts} +24 -24
- package/dist/{byline-fields-WN7RQT4q.mjs → byline-fields-yT4herdN.mjs} +1 -1
- package/dist/{bylines-C-EL6dh3.mjs → bylines-B53Saxdb.mjs} +3 -3
- package/dist/{bylines-CmZFCMr0.mjs → bylines-kixFoaRV.mjs} +5 -5
- package/dist/{cache-DkVCKGio.mjs → cache-fpisdt5Q.mjs} +1 -1
- package/dist/{chunks-ChGNDY8r.mjs → chunks-DX_b8_4Z.mjs} +1 -1
- package/dist/cli/index.mjs +626 -589
- package/dist/cli/plugin-kit.mjs +2 -2
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +2 -2
- package/dist/client/index.mjs +2 -2
- package/dist/{client-factory-BDD9azPJ.mjs → client-factory-DEtHApCc.mjs} +93 -3
- package/dist/{comment-DFALgsJD.mjs → comment-B88XcvU1.mjs} +1 -1
- package/dist/{comment-reaction-C37bf99u.mjs → comment-reaction-Ckn6vCmB.mjs} +1 -1
- package/dist/{comments-B3NwDBxl.mjs → comments-BDXsbL7z.mjs} +1 -1
- package/dist/{content-DJcAYFhz.mjs → content-Cbl8HbIR.mjs} +2 -2
- package/dist/{content-refresh-B4ZCmxgd.mjs → content-refresh-BmkilU5M.mjs} +2 -2
- package/dist/{context-DnpXcp6Y.mjs → context-AJNd0tcG.mjs} +2 -2
- package/dist/{context-fSCYLL3c.mjs → context-DT0tIsfw.mjs} +8 -8
- package/dist/{context-route-helpers-CI8XzcsK.mjs → context-route-helpers-DhP--tTq.mjs} +2 -2
- package/dist/{dashboard-D0nj5oWg.mjs → dashboard-YvDEYbS3.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-BJe6VEhP.mjs → device-flow-BKKeobcV.mjs} +4 -4
- package/dist/{error-CSVaQNZy.mjs → error-BW9f_ynq.mjs} +16 -2
- package/dist/{field-defs-cache-DL-T2XVS.mjs → field-defs-cache-CiXP3eO3.mjs} +1 -1
- package/dist/{fts-manager-ewTGohf4.mjs → fts-manager-Zo9uhGel.mjs} +1 -1
- package/dist/{hitl-requests-DEFj8e6u.mjs → hitl-requests-Bee8Cjj8.mjs} +2 -2
- package/dist/{hitl-route-helpers-C23JHaWz.mjs → hitl-route-helpers-DtHaKGgm.mjs} +5 -5
- package/dist/{import-CXXL5pip.mjs → import-C-zxnT89.mjs} +7 -7
- package/dist/{index-DcnOCD1e.d.mts → index-DybFmYtZ.d.mts} +3 -3
- package/dist/index.d.mts +14 -14
- package/dist/index.mjs +71 -69
- package/dist/integration-credentials-D3ZneN0L.mjs +49 -0
- package/dist/{jsonld-DzKbhRZ4.d.mts → jsonld-B9A2e0yv.d.mts} +2 -2
- package/dist/{load-CFtJRT3c.mjs → load-Cuiyh8LT.mjs} +1 -1
- package/dist/{loader-aWkkc1_o.mjs → loader-WHf22FwU.mjs} +2 -2
- package/dist/{manifest-schema-uA6pRFXi.mjs → manifest-schema-DKa3ZaJL.mjs} +1 -1
- package/dist/{mcp-reviewed-executor-Dn52L_yY.mjs → mcp-reviewed-executor-DnlF7mIL.mjs} +4 -4
- package/dist/media/index.d.mts +1 -1
- package/dist/media/local-runtime.d.mts +10 -10
- package/dist/media/local-runtime.mjs +2 -2
- package/dist/{media-CVMOoywq.mjs → media-B4m-cnmj.mjs} +1 -1
- package/dist/{menus-CmyIkRG5.mjs → menus-LYALU2Mf.mjs} +1 -1
- package/dist/{menus-CCG2z5um.mjs → menus-oYfViqfE.mjs} +5 -5
- package/dist/{oauth-authorization-B9H7X85L.mjs → oauth-authorization-CX7aa8Ph.mjs} +4 -4
- package/dist/{oauth-clients-Dwl32-Uj.mjs → oauth-clients-D9Gg0WjF.mjs} +2 -2
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/page/index.d.mts +9 -9
- package/dist/page/index.mjs +1 -1
- package/dist/{parse-i15EFSAE.mjs → parse-B-Y84oJl.mjs} +1 -1
- package/dist/plugin-utils.d.mts +8 -8
- package/dist/plugins/adapt-sandbox-entry.d.mts +8 -8
- package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
- package/dist/{plugins-CPA2PtfY.mjs → plugins-B7-4Okii.mjs} +5 -5
- package/dist/{preview-BjedZm8G.mjs → preview-BMIReQGc.mjs} +2 -2
- package/dist/{provider-loader-DC2JdWeO.d.mts → provider-loader-BIbIiz0P.d.mts} +1 -1
- package/dist/{public-url-DQJCnYi9.d.mts → public-url-C8QUncg3.d.mts} +1 -1
- package/dist/{publication-authorization-RKiHXKtq.mjs → publication-authorization-BVQ5rCAF.mjs} +6 -6
- package/dist/{query-DEv5x6yB.mjs → query-C_m8sn-S.mjs} +12 -12
- package/dist/{query-C2U5u5_p.mjs → query-DNczixZr.mjs} +2 -2
- package/dist/{rate-limit-DglsAJSw.mjs → rate-limit-oUGexQO1.mjs} +2 -2
- package/dist/{redirect-ubhEqQCQ.mjs → redirect-DoDgOWIA.mjs} +1 -1
- package/dist/{redirects-xs2yahLq.mjs → redirects-CrP6U4hZ.mjs} +3 -3
- package/dist/{redirects-Bhpm8bRe.mjs → redirects-E_B6hvuz.mjs} +2 -2
- package/dist/{registry-BYYyb2tF.mjs → registry-SEJqFliS.mjs} +4 -4
- package/dist/{request-meta-CFe1tW2M.mjs → request-meta-DHFIzWcf.mjs} +1 -1
- package/dist/{review-requests-CTWGnWUt.mjs → review-requests-CObSuTYU.mjs} +1 -1
- package/dist/{review-requests-D42VEP1l.mjs → review-requests-Cu9051_B.mjs} +1 -1
- package/dist/{review-route-helpers-C31vO6SI.mjs → review-route-helpers-Dp_7PH8r.mjs} +2 -2
- package/dist/{runner-D6hzs8L9.d.mts → runner-Bcy5w0vj.d.mts} +1 -1
- package/dist/{runner-BgmttQmD.mjs → runner-BfWbi9YY.mjs} +461 -446
- package/dist/runtime.d.mts +9 -9
- package/dist/runtime.mjs +3 -3
- package/dist/schema-Dk_N31V4.mjs +8 -0
- package/dist/{search-DUKgZUlm.mjs → search-BXEQepxL.mjs} +3 -3
- package/dist/{sections-DvFgsnda.mjs → sections-DxvEF6Bj.mjs} +2 -2
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +17 -17
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo/index.mjs +1 -1
- package/dist/{seo-BU8MLCS9.mjs → seo-D1RiaooQ.mjs} +1 -1
- package/dist/service-DbHMAoiN.mjs +347 -0
- package/dist/{service-FL3fB0Rx.mjs → service-QdG0YHws.mjs} +2 -2
- package/dist/{settings-EzADu-dd.mjs → settings-Dje-PHXo.mjs} +2 -2
- package/dist/{settings-BECcAIRH.mjs → settings-SVDAB7_W.mjs} +2 -2
- package/dist/{site-activity-h8smOlYI.mjs → site-activity-BVK40wCy.mjs} +1 -1
- package/dist/{site-context-B8T1kpUP.mjs → site-context-CzaEGizi.mjs} +13 -13
- 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/store-CCfMD6nw.mjs +262 -0
- package/dist/{taxonomies-BiM9NtgW.mjs → taxonomies-DuhGjBa8.mjs} +3 -3
- package/dist/{taxonomies-DSnY5nOa.mjs → taxonomies-WVnFki0o.mjs} +5 -5
- package/dist/{taxonomy-0k_vRVsD.mjs → taxonomy-CCo2plmV.mjs} +2 -2
- package/dist/{types-DuQn1G7-.d.mts → types-BFeoAIHl.d.mts} +13 -0
- package/dist/{types-ChxYDRvx.mjs → types-Bshd_6wQ.mjs} +1 -1
- package/dist/{types-opjX_kz6.d.mts → types-GtwhHAg8.d.mts} +1 -1
- package/dist/{types-DwoUifGE.d.mts → types-JovwyJFE.d.mts} +28 -27
- package/dist/ui/server-runtime.d.mts +12 -12
- package/dist/ui/server-runtime.mjs +19 -19
- package/dist/{user-BH-n01y3.mjs → user-Bcvr5ihC.mjs} +2 -2
- package/dist/{validate-CbVFoJgc.d.mts → validate-YiX3rly5.d.mts} +3 -3
- package/dist/{validate-D1HL-oLR.mjs → validate-qKzI3BCv.mjs} +1 -1
- package/dist/version-O6Zw1eqK.mjs +6 -0
- package/dist/{widgets-BZrLrNgS.mjs → widgets-DyGcotPM.mjs} +2 -2
- package/dist/{zod-generator-C7AsLpSB.mjs → zod-generator-Cr3SiHsc.mjs} +1 -1
- package/package.json +8 -6
- package/dist/forgeway-seo-client-G5ddhVHd.mjs +0 -456
- package/dist/project-env-DKibmuP8.mjs +0 -95
- package/dist/schema-DUtnZxjZ.mjs +0 -8
- package/dist/version-C3iVRuaF.mjs +0 -6
- /package/dist/{actor-0QJ1Gbtf.mjs → actor-DA7yL9Yp.mjs} +0 -0
- /package/dist/{adapters-BiRymx02.d.mts → adapters-DnMDRQ4e.d.mts} +0 -0
- /package/dist/{api-tokens-Ypaly90d.mjs → api-tokens-D4tcY8R6.mjs} +0 -0
- /package/dist/{challenge-store-D5pSY2S1.mjs → challenge-store-BMkL2kmt.mjs} +0 -0
- /package/dist/{components-DImzlLhb.mjs → components-D0w9MzQe.mjs} +0 -0
- /package/dist/{cron-B1SL_lsb.mjs → cron-D_c3WUPN.mjs} +0 -0
- /package/dist/{default-D4Vygcy_.mjs → default-BxoI3SoK.mjs} +0 -0
- /package/dist/{email-console-Bp0r68iF.mjs → email-console-BEMwuxhV.mjs} +0 -0
- /package/dist/{escape-DN4Qmjsl.mjs → escape-smSUOb7u.mjs} +0 -0
- /package/dist/{experimental-workflows-GVhUgzEs.mjs → experimental-workflows-CgO73K4e.mjs} +0 -0
- /package/dist/{media-allowlist-zDNJmXCo.mjs → media-allowlist-BQyIBPzd.mjs} +0 -0
- /package/dist/{media-url-BdoLPvg8.mjs → media-url-B6d-yVI6.mjs} +0 -0
- /package/dist/{mode-C8yZnIlR.mjs → mode-DPC7segX.mjs} +0 -0
- /package/dist/{oauth-state-store-CndT35iw.mjs → oauth-state-store-DPVzeoyY.mjs} +0 -0
- /package/dist/{oauth-user-lookup-CMehAaKs.mjs → oauth-user-lookup-3E5jlXrr.mjs} +0 -0
- /package/dist/{output-DhBe5_Pi.mjs → output-BbqsKnS_.mjs} +0 -0
- /package/dist/{parser-06LLLL4E.mjs → parser-DX_c5iG3.mjs} +0 -0
- /package/dist/{passkey-config-NYukYGed.mjs → passkey-config-DE_0EGEP.mjs} +0 -0
- /package/dist/{placeholder-DkWkXfDI.d.mts → placeholder-C6ZjZcmJ.d.mts} +0 -0
- /package/dist/{portable-text-E79LyjGo.d.mts → portable-text-Ehqj3I_y.d.mts} +0 -0
- /package/dist/{portable-text-BASHceim.mjs → portable-text-y8QVqTzd.mjs} +0 -0
- /package/dist/{provider-loader-BtfrrzfD.mjs → provider-loader-BeQcnPN1.mjs} +0 -0
- /package/dist/{public-url-Cp6hyjVR.mjs → public-url-BA-7LKvQ.mjs} +0 -0
- /package/dist/{redirect-DrbEmU9a.mjs → redirect-CZFAqHLr.mjs} +0 -0
- /package/dist/{resolve-DE71WcL9.mjs → resolve-B6BpqwAR.mjs} +0 -0
- /package/dist/{secrets-ZV5rd8yV.mjs → secrets-CpGpyGcO.mjs} +0 -0
- /package/dist/{seo-contributions-GnCuL1ML.mjs → seo-contributions-Ci8_12_r.mjs} +0 -0
- /package/dist/{session-user-Ct6GBLvn.mjs → session-user-BwliEFp0.mjs} +0 -0
- /package/dist/{setup-complete-Da0axZEE.mjs → setup-complete-PvF8I7Oh.mjs} +0 -0
- /package/dist/{setup-nonce-BtkKnvxQ.mjs → setup-nonce-DkpYROqg.mjs} +0 -0
- /package/dist/{sidecar-client-Ctzfyyp-.mjs → sidecar-client-dt5fv23q.mjs} +0 -0
- /package/dist/{site-url-DJEid0ml.mjs → site-url-DfYDZyWl.mjs} +0 -0
- /package/dist/{ssrf-FJqwQzj4.mjs → ssrf-BZHvtFEv.mjs} +0 -0
- /package/dist/{status-NqWOSFAD.mjs → status-BN40hMpr.mjs} +0 -0
- /package/dist/{tokens-BDQU29Vd.mjs → tokens-DIzhPT80.mjs} +0 -0
- /package/dist/{transport-D9pKAzFP.d.mts → transport-BZ3aqdu7.d.mts} +0 -0
- /package/dist/{transport-C46KHLMP.mjs → transport-D0dLIuDC.mjs} +0 -0
- /package/dist/{trusted-proxy-Dm7Mxvt6.mjs → trusted-proxy-czZuby6G.mjs} +0 -0
- /package/dist/{types-Cw0PeCT_.d.mts → types-BsTXSvKG.d.mts} +0 -0
- /package/dist/{types-BLQCz46p.d.mts → types-CDcuRd4z.d.mts} +0 -0
- /package/dist/{types-A8fPOJnl.mjs → types-CK0r-Xq4.mjs} +0 -0
- /package/dist/{types-g0zMtraY.d.mts → types-S9VIopdY.d.mts} +0 -0
- /package/dist/{types-wFu80FrO.d.mts → types-YxFz4lDr.d.mts} +0 -0
- /package/dist/{types-mVVgRPaU.mjs → types-gvNBqijt.mjs} +0 -0
- /package/dist/{types-B_FlxIIl.d.mts → types-ywmuDETA.d.mts} +0 -0
- /package/dist/{url-EMAguGVk.mjs → url-D282S1Zw.mjs} +0 -0
- /package/dist/{utils-D1SrKGtP.mjs → utils-B7gemXz5.mjs} +0 -0
- /package/dist/{wordpress-slugs-C3PWcowq.mjs → wordpress-slugs-D_LfQCan.mjs} +0 -0
|
@@ -1,352 +1,260 @@
|
|
|
1
1
|
import "../../../dialect-helpers-fk43GbDb.mjs";
|
|
2
2
|
import "../../../base64-F8-DUraK.mjs";
|
|
3
|
-
import "../../../types-
|
|
4
|
-
import "../../../loader-
|
|
3
|
+
import "../../../types-Bshd_6wQ.mjs";
|
|
4
|
+
import "../../../loader-WHf22FwU.mjs";
|
|
5
5
|
import "../../../object-cache-D51qOseS.mjs";
|
|
6
|
-
import "../../../content-
|
|
7
|
-
import "../../../media-
|
|
6
|
+
import "../../../content-Cbl8HbIR.mjs";
|
|
7
|
+
import "../../../media-B4m-cnmj.mjs";
|
|
8
8
|
import "../../../options-DQPTH5n0.mjs";
|
|
9
|
-
import "../../../site-activity-
|
|
10
|
-
import { t as ReviewRequestRepository } from "../../../review-requests-
|
|
11
|
-
import { a as HITL_REQUEST_STATUSES, i as HITL_REQUEST_PRIORITIES, o as HitlRequestRepository, r as ReleasePayloadBuilder, t as PublicationAuthorizationError } from "../../../publication-authorization-
|
|
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-
|
|
9
|
+
import "../../../site-activity-BVK40wCy.mjs";
|
|
10
|
+
import { t as ReviewRequestRepository } from "../../../review-requests-CObSuTYU.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-BVQ5rCAF.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-CzaEGizi.mjs";
|
|
13
13
|
import "../../../request-cache-CBFjCwSt.mjs";
|
|
14
|
-
import { a as ContextRepository, i as parseSiteBriefingScope, r as formatSiteBriefingText, t as SiteBriefingAssembler } from "../../../briefing-
|
|
14
|
+
import { a as ContextRepository, i as parseSiteBriefingScope, r as formatSiteBriefingText, t as SiteBriefingAssembler } from "../../../briefing-GFhLTLJo.mjs";
|
|
15
15
|
import { t as SITE_CONTEXT_TYPES } from "../../../context-types-eBuMDAg-.mjs";
|
|
16
|
-
import "../../../content-refresh-
|
|
17
|
-
import "../../../fts-manager-
|
|
18
|
-
import "../../../registry-
|
|
19
|
-
import { a as getSiteSettingsWithDb } from "../../../settings-
|
|
16
|
+
import "../../../content-refresh-BmkilU5M.mjs";
|
|
17
|
+
import "../../../fts-manager-Zo9uhGel.mjs";
|
|
18
|
+
import "../../../registry-SEJqFliS.mjs";
|
|
19
|
+
import { a as getSiteSettingsWithDb } from "../../../settings-SVDAB7_W.mjs";
|
|
20
20
|
import { t as ReviewPayloadBuilder } from "../../../review-payload-BysRWpxS.mjs";
|
|
21
|
-
import { n as VERSION } from "../../../version-
|
|
22
|
-
import "../../../query-
|
|
23
|
-
import "../../../zod-generator-
|
|
24
|
-
import "../../../schema-
|
|
25
|
-
import { t as
|
|
26
|
-
import {
|
|
27
|
-
import "../../../
|
|
28
|
-
import "../../../
|
|
21
|
+
import { n as VERSION } from "../../../version-O6Zw1eqK.mjs";
|
|
22
|
+
import "../../../query-DNczixZr.mjs";
|
|
23
|
+
import "../../../zod-generator-Cr3SiHsc.mjs";
|
|
24
|
+
import "../../../schema-Dk_N31V4.mjs";
|
|
25
|
+
import { t as DinewaySecretsError } from "../../../secrets-CpGpyGcO.mjs";
|
|
26
|
+
import { t as IntegrationCredentialStore } from "../../../store-CCfMD6nw.mjs";
|
|
27
|
+
import { t as apiError } from "../../../error-BW9f_ynq.mjs";
|
|
28
|
+
import { Cn as contentBylineInputSchema, P as settingsUpdateBody, _n as bylineCreateBody, cn as contentSeoInput, xn as bylineUpdateBody } from "../../../redirects-E_B6hvuz.mjs";
|
|
29
|
+
import "../../../byline-fields-yT4herdN.mjs";
|
|
30
|
+
import "../../../status-BN40hMpr.mjs";
|
|
29
31
|
import "../../../api/schemas/index.mjs";
|
|
30
|
-
import { i as hasScope } from "../../../api-tokens-
|
|
31
|
-
import { r as registerPluginMcpRegistry, t as createReviewedPluginMcpCommandExecutor } from "../../../mcp-reviewed-executor-
|
|
32
|
-
import { n as resolveActorIdentity } from "../../../actor-
|
|
33
|
-
import "../../../activity-
|
|
34
|
-
import { d as logSchemaActivity, o as logContentActivity, p as logSiteActivitySafely, r as contentMcpToolSource, t as activityChangedKeys, x as schemaMcpToolSource } from "../../../activity-events-
|
|
35
|
-
import "../../../utils-
|
|
36
|
-
import "../../../search-
|
|
37
|
-
import { n as
|
|
38
|
-
import { n as convertDataForWrite, t as convertDataForRead } from "../../../portable-text-
|
|
32
|
+
import { i as hasScope } from "../../../api-tokens-D4tcY8R6.mjs";
|
|
33
|
+
import { r as registerPluginMcpRegistry, t as createReviewedPluginMcpCommandExecutor } from "../../../mcp-reviewed-executor-DnlF7mIL.mjs";
|
|
34
|
+
import { n as resolveActorIdentity } from "../../../actor-DA7yL9Yp.mjs";
|
|
35
|
+
import "../../../activity-BDMlkpYY.mjs";
|
|
36
|
+
import { d as logSchemaActivity, o as logContentActivity, p as logSiteActivitySafely, r as contentMcpToolSource, t as activityChangedKeys, x as schemaMcpToolSource } from "../../../activity-events-DEYmJhWd.mjs";
|
|
37
|
+
import "../../../utils-B7gemXz5.mjs";
|
|
38
|
+
import "../../../search-BXEQepxL.mjs";
|
|
39
|
+
import { f as readStoredForgewayAccount, n as DinewayToolsService, p as refreshForgewayAccountCredentials, s as createForgewayAccountClient, t as DinewayToolsError, u as normalizeForgewayApiUrl } from "../../../service-DbHMAoiN.mjs";
|
|
40
|
+
import { n as convertDataForWrite, t as convertDataForRead } from "../../../portable-text-y8QVqTzd.mjs";
|
|
39
41
|
import { z } from "zod";
|
|
40
42
|
import { Role, canActOnOwn, hasPermission } from "@dineway-ai/auth";
|
|
41
43
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
42
44
|
import { ErrorCode, McpError } from "@modelcontextprotocol/sdk/types.js";
|
|
45
|
+
import { ForgewayClient } from "@forgeway/sdk";
|
|
43
46
|
import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
|
|
44
47
|
|
|
45
|
-
//#region src/
|
|
46
|
-
|
|
48
|
+
//#region src/dineway-tools/runtime.ts
|
|
49
|
+
async function createDinewayToolsRuntimeService(options = {}) {
|
|
50
|
+
const platformApiUrl = normalizeForgewayApiUrl(options.platformApiUrl ?? readEnv("DINEWAY_API_BASE_URL", "DINEWAY_FORGEWAY_API_URL", "FORGEWAY_API_URL"));
|
|
51
|
+
const accessToken = options.accessToken ?? readEnv("DINEWAY_FORGEWAY_ACCESS_TOKEN");
|
|
52
|
+
if (accessToken) return new DinewayToolsService(createForgewayAccountClient(platformApiUrl, accessToken).integration);
|
|
53
|
+
const apiKey = options.apiKey ?? readEnv("DINEWAY_API_KEY", "FORGEWAY_API_KEY");
|
|
54
|
+
if (apiKey) return new DinewayToolsService(new ForgewayClient({
|
|
55
|
+
baseUrl: platformApiUrl,
|
|
56
|
+
isServerMode: true,
|
|
57
|
+
headers: { "X-API-Key": apiKey },
|
|
58
|
+
auth: { detectOAuthCallback: false }
|
|
59
|
+
}).integration);
|
|
60
|
+
const stored = await readStoredForgewayAccount({ platformApiUrl });
|
|
61
|
+
if (!stored) throw new DinewayToolsError("Dineway Tools requires a Forgeway account or DINEWAY_API_KEY in this runtime.", "FORGEWAY_ACCOUNT_REQUIRED");
|
|
62
|
+
const refreshed = await refreshForgewayAccountCredentials(stored);
|
|
63
|
+
return new DinewayToolsService(createForgewayAccountClient(refreshed.platformApiUrl, refreshed.accessToken).integration);
|
|
64
|
+
}
|
|
65
|
+
function readEnv(...names) {
|
|
66
|
+
const meta = import.meta.env ?? {};
|
|
67
|
+
const proc = typeof process !== "undefined" && process.env ? process.env : {};
|
|
68
|
+
for (const name of names) {
|
|
69
|
+
const value = meta[name] ?? proc[name];
|
|
70
|
+
if (value) return value;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/mcp/dineway-tools.ts
|
|
76
|
+
const readAnnotations = {
|
|
47
77
|
readOnlyHint: true,
|
|
48
78
|
destructiveHint: false,
|
|
79
|
+
idempotentHint: true,
|
|
80
|
+
openWorldHint: true
|
|
81
|
+
};
|
|
82
|
+
const runAnnotations = {
|
|
83
|
+
readOnlyHint: false,
|
|
84
|
+
destructiveHint: true,
|
|
49
85
|
idempotentHint: false,
|
|
50
86
|
openWorldHint: true
|
|
51
87
|
};
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
...forceRefreshInput
|
|
88
|
+
const stopAnnotations = {
|
|
89
|
+
readOnlyHint: false,
|
|
90
|
+
destructiveHint: true,
|
|
91
|
+
idempotentHint: true,
|
|
92
|
+
openWorldHint: true
|
|
58
93
|
};
|
|
59
|
-
|
|
60
|
-
|
|
94
|
+
const billingModeSchema = z.enum(["site_byok", "hosted"]).default("site_byok").describe("Billing mode. Defaults to site_byok; hosted credits are used only when explicitly selected.");
|
|
95
|
+
const jsonValueSchema = z.json();
|
|
96
|
+
const jsonObjectSchema = z.record(z.string(), jsonValueSchema);
|
|
97
|
+
const endpointInputSchema = z.object({
|
|
98
|
+
body: jsonValueSchema.optional(),
|
|
99
|
+
query_params: jsonObjectSchema.optional(),
|
|
100
|
+
path_params: jsonObjectSchema.optional(),
|
|
101
|
+
header_params: jsonObjectSchema.optional(),
|
|
102
|
+
body_type: z.string().trim().min(1).optional()
|
|
103
|
+
}).strict();
|
|
104
|
+
async function serviceOrThrow(options) {
|
|
105
|
+
const service = options.service ?? await options.resolveService?.();
|
|
106
|
+
if (!service) throw new DinewayToolsError("Dineway Tools is unavailable in this runtime.", "TOOLS_UNAVAILABLE");
|
|
61
107
|
return service;
|
|
62
108
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
109
|
+
function result(data) {
|
|
110
|
+
const structuredContent = isRecord(data) ? data : { result: data };
|
|
111
|
+
return {
|
|
112
|
+
content: [{
|
|
113
|
+
type: "text",
|
|
114
|
+
text: JSON.stringify(data, null, 2)
|
|
115
|
+
}],
|
|
116
|
+
structuredContent
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function isRecord(value) {
|
|
120
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
68
121
|
}
|
|
69
122
|
function errorResult$1(error) {
|
|
70
123
|
return {
|
|
71
124
|
content: [{
|
|
72
125
|
type: "text",
|
|
73
|
-
text: error instanceof
|
|
126
|
+
text: error instanceof DinewayToolsError || error instanceof DinewaySecretsError ? error.message : "Dineway Tools request failed. Check the endpoint input and try again."
|
|
74
127
|
}],
|
|
75
128
|
isError: true
|
|
76
129
|
};
|
|
77
130
|
}
|
|
78
|
-
function
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
|
131
|
+
async function credentialFor(provider, billingMode, extra, options) {
|
|
132
|
+
if (billingMode === "hosted") return void 0;
|
|
133
|
+
const credential = await options.resolveCredential(provider, options.getContext(extra));
|
|
134
|
+
if (!credential) throw new DinewayToolsError(`No site BYOK credential is configured for provider ${provider}. Configure it in Settings > Integrations or explicitly select hosted billing.`, "SITE_BYOK_CREDENTIAL_MISSING");
|
|
135
|
+
return credential;
|
|
136
|
+
}
|
|
137
|
+
function mapInput(input) {
|
|
138
|
+
if (!input) return {};
|
|
139
|
+
return {
|
|
140
|
+
body: input.body,
|
|
141
|
+
queryParams: input.query_params,
|
|
142
|
+
pathParams: input.path_params,
|
|
143
|
+
headerParams: input.header_params,
|
|
144
|
+
bodyType: input.body_type
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function registerDinewayTools(server, options) {
|
|
148
|
+
server.registerTool("tools_discover", {
|
|
149
|
+
title: "Discover Dineway Tools",
|
|
150
|
+
description: "Search hundreds of Forgeway integration endpoints using natural language. Use inspect before run.",
|
|
151
|
+
inputSchema: z.object({
|
|
152
|
+
query: z.string().trim().min(1).max(500),
|
|
153
|
+
limit: z.number().int().min(1).max(100).default(10),
|
|
154
|
+
min_score: z.number().min(0).max(1).optional()
|
|
187
155
|
}),
|
|
188
|
-
annotations
|
|
156
|
+
annotations: readAnnotations
|
|
189
157
|
}, async (args, extra) => {
|
|
190
|
-
options.
|
|
158
|
+
options.authorizeRead(extra);
|
|
191
159
|
try {
|
|
192
|
-
return
|
|
160
|
+
return result(await (await serviceOrThrow(options)).discover({
|
|
193
161
|
query: args.query,
|
|
194
162
|
limit: args.limit,
|
|
195
|
-
|
|
196
|
-
forceRefresh: args.force_refresh
|
|
163
|
+
minScore: args.min_score
|
|
197
164
|
}));
|
|
198
165
|
} catch (error) {
|
|
199
166
|
return errorResult$1(error);
|
|
200
167
|
}
|
|
201
168
|
});
|
|
202
|
-
server.registerTool("
|
|
203
|
-
title: "
|
|
204
|
-
description: "
|
|
169
|
+
server.registerTool("tools_inspect", {
|
|
170
|
+
title: "Inspect a Dineway Tool",
|
|
171
|
+
description: "Inspect one integration endpoint's input schema, output shape, risk policy, and credit price before running it.",
|
|
205
172
|
inputSchema: z.object({
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
...dataForSeoCommonInput
|
|
173
|
+
provider: z.string().trim().min(1).max(100),
|
|
174
|
+
endpoint: z.string().trim().min(1).max(500)
|
|
209
175
|
}),
|
|
210
|
-
annotations
|
|
176
|
+
annotations: readAnnotations
|
|
211
177
|
}, async (args, extra) => {
|
|
212
|
-
options.
|
|
178
|
+
options.authorizeRead(extra);
|
|
213
179
|
try {
|
|
214
|
-
return
|
|
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
|
-
}));
|
|
180
|
+
return result(await (await serviceOrThrow(options)).inspect(args));
|
|
222
181
|
} catch (error) {
|
|
223
182
|
return errorResult$1(error);
|
|
224
183
|
}
|
|
225
184
|
});
|
|
226
|
-
server.registerTool("
|
|
227
|
-
title: "
|
|
228
|
-
description: "
|
|
185
|
+
server.registerTool("tools_run", {
|
|
186
|
+
title: "Run a Dineway Tool",
|
|
187
|
+
description: "Start one inspected integration endpoint. Site BYOK is the safe default; hosted credits require explicit selection.",
|
|
229
188
|
inputSchema: z.object({
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
189
|
+
provider: z.string().trim().min(1).max(100),
|
|
190
|
+
endpoint: z.string().trim().min(1).max(500),
|
|
191
|
+
input: endpointInputSchema.optional(),
|
|
192
|
+
billing_mode: billingModeSchema,
|
|
193
|
+
force_refresh: z.boolean().default(false),
|
|
194
|
+
confirm_side_effect: z.boolean().default(false),
|
|
195
|
+
idempotency_key: z.string().trim().min(1).max(500).optional()
|
|
233
196
|
}),
|
|
234
|
-
annotations
|
|
197
|
+
annotations: runAnnotations
|
|
235
198
|
}, async (args, extra) => {
|
|
236
|
-
options.
|
|
199
|
+
options.authorizeRun(extra);
|
|
237
200
|
try {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
201
|
+
if (args.confirm_side_effect && !args.idempotency_key) throw new DinewayToolsError("An idempotency key is required when confirming an endpoint with side effects.", "IDEMPOTENCY_KEY_REQUIRED");
|
|
202
|
+
const credential = await credentialFor(args.provider, args.billing_mode, extra, options);
|
|
203
|
+
return result(await (await serviceOrThrow(options)).run({
|
|
204
|
+
provider: args.provider,
|
|
205
|
+
endpoint: args.endpoint,
|
|
206
|
+
input: mapInput(args.input),
|
|
207
|
+
credential,
|
|
208
|
+
forceRefresh: args.force_refresh,
|
|
209
|
+
confirmSideEffect: args.confirm_side_effect
|
|
210
|
+
}, { idempotencyKey: args.idempotency_key }));
|
|
246
211
|
} catch (error) {
|
|
247
212
|
return errorResult$1(error);
|
|
248
213
|
}
|
|
249
214
|
});
|
|
250
|
-
server.registerTool("
|
|
251
|
-
title: "Get
|
|
252
|
-
description: "
|
|
253
|
-
inputSchema: z.object({
|
|
254
|
-
|
|
255
|
-
limit: z.number().int().min(1).max(1e3).optional(),
|
|
256
|
-
...dataForSeoCommonInput
|
|
257
|
-
}),
|
|
258
|
-
annotations
|
|
215
|
+
server.registerTool("tools_get_run", {
|
|
216
|
+
title: "Get a Dineway Tools Run",
|
|
217
|
+
description: "Read the current state and result of one integration run.",
|
|
218
|
+
inputSchema: z.object({ run_id: z.string().uuid() }),
|
|
219
|
+
annotations: readAnnotations
|
|
259
220
|
}, async (args, extra) => {
|
|
260
|
-
options.
|
|
221
|
+
options.authorizeRead(extra);
|
|
261
222
|
try {
|
|
262
|
-
return
|
|
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
|
-
}));
|
|
223
|
+
return result(await (await serviceOrThrow(options)).getRun(args.run_id));
|
|
294
224
|
} catch (error) {
|
|
295
225
|
return errorResult$1(error);
|
|
296
226
|
}
|
|
297
227
|
});
|
|
298
|
-
server.registerTool("
|
|
299
|
-
title: "
|
|
300
|
-
description: "
|
|
228
|
+
server.registerTool("tools_list_runs", {
|
|
229
|
+
title: "List Dineway Tools Runs",
|
|
230
|
+
description: "List recent integration runs with cursor pagination.",
|
|
301
231
|
inputSchema: z.object({
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
"chat_gpt",
|
|
305
|
-
"gemini",
|
|
306
|
-
"perplexity"
|
|
307
|
-
]).optional(),
|
|
308
|
-
...dataForSeoCommonInput
|
|
232
|
+
limit: z.number().int().min(1).max(100).default(20),
|
|
233
|
+
cursor: z.string().trim().min(1).optional()
|
|
309
234
|
}),
|
|
310
|
-
annotations
|
|
235
|
+
annotations: readAnnotations
|
|
311
236
|
}, async (args, extra) => {
|
|
312
|
-
options.
|
|
237
|
+
options.authorizeRead(extra);
|
|
313
238
|
try {
|
|
314
|
-
return
|
|
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
|
-
}));
|
|
239
|
+
return result(await (await serviceOrThrow(options)).listRuns(args));
|
|
322
240
|
} catch (error) {
|
|
323
241
|
return errorResult$1(error);
|
|
324
242
|
}
|
|
325
243
|
});
|
|
326
|
-
server.registerTool("
|
|
327
|
-
title: "
|
|
328
|
-
description: "
|
|
244
|
+
server.registerTool("tools_stop_run", {
|
|
245
|
+
title: "Stop a Dineway Tools Run",
|
|
246
|
+
description: "Stop one cancellable integration run. Site BYOK is the safe default; hosted credits require explicit selection.",
|
|
329
247
|
inputSchema: z.object({
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
platform: z.enum(["google", "chat_gpt"]).optional(),
|
|
333
|
-
limit: z.number().int().min(1).max(1e3).optional(),
|
|
334
|
-
...dataForSeoCommonInput
|
|
248
|
+
run_id: z.string().uuid(),
|
|
249
|
+
billing_mode: billingModeSchema
|
|
335
250
|
}),
|
|
336
|
-
annotations
|
|
251
|
+
annotations: stopAnnotations
|
|
337
252
|
}, async (args, extra) => {
|
|
338
|
-
options.
|
|
253
|
+
options.authorizeRun(extra);
|
|
339
254
|
try {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
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
|
-
}));
|
|
255
|
+
const service = await serviceOrThrow(options);
|
|
256
|
+
const credential = await credentialFor((await service.getRun(args.run_id)).provider, args.billing_mode, extra, options);
|
|
257
|
+
return result(await service.stopRun(args.run_id, { credential }));
|
|
350
258
|
} catch (error) {
|
|
351
259
|
return errorResult$1(error);
|
|
352
260
|
}
|
|
@@ -424,7 +332,7 @@ function getDineway(extra) {
|
|
|
424
332
|
}
|
|
425
333
|
async function getCollectionFields(dineway, collection) {
|
|
426
334
|
try {
|
|
427
|
-
const { SchemaRegistry } = await import("../../../schema-
|
|
335
|
+
const { SchemaRegistry } = await import("../../../schema-Dk_N31V4.mjs").then((n) => n.t);
|
|
428
336
|
return (await new SchemaRegistry(dineway.db).getCollectionWithFields(collection))?.fields ?? null;
|
|
429
337
|
} catch {
|
|
430
338
|
return null;
|
|
@@ -441,7 +349,7 @@ async function applyReadMarkdown(dineway, collection, items) {
|
|
|
441
349
|
for (const item of items) if (item.data && typeof item.data === "object") item.data = convertDataForRead(item.data, fields, false);
|
|
442
350
|
}
|
|
443
351
|
async function invalidateBylines() {
|
|
444
|
-
const { invalidateBylineCache } = await import("../../../bylines-
|
|
352
|
+
const { invalidateBylineCache } = await import("../../../bylines-kixFoaRV.mjs").then((n) => n.t);
|
|
445
353
|
invalidateBylineCache();
|
|
446
354
|
}
|
|
447
355
|
function canReadDrafts(extra) {
|
|
@@ -831,12 +739,19 @@ function createMcpServer(options = {}) {
|
|
|
831
739
|
name: "dineway",
|
|
832
740
|
version: VERSION
|
|
833
741
|
}, { capabilities: { logging: {} } });
|
|
834
|
-
|
|
835
|
-
service: options.
|
|
836
|
-
|
|
837
|
-
|
|
742
|
+
registerDinewayTools(server, {
|
|
743
|
+
service: options.dinewayToolsService,
|
|
744
|
+
resolveService: options.resolveDinewayToolsService,
|
|
745
|
+
authorizeRead: (extra) => {
|
|
746
|
+
requireScope(extra, "tools:read");
|
|
838
747
|
requireRole(extra, Role.AUTHOR);
|
|
839
|
-
}
|
|
748
|
+
},
|
|
749
|
+
authorizeRun: (extra) => {
|
|
750
|
+
requireScope(extra, "tools:run");
|
|
751
|
+
requireRole(extra, Role.AUTHOR);
|
|
752
|
+
},
|
|
753
|
+
getContext: (extra) => getDineway(extra),
|
|
754
|
+
resolveCredential: async (provider, dineway) => await options.resolveDinewayToolsCredential?.(provider, dineway) ?? null
|
|
840
755
|
});
|
|
841
756
|
server.registerTool("site_briefing_get", {
|
|
842
757
|
title: "Get Site Briefing",
|
|
@@ -2451,7 +2366,7 @@ function createMcpServer(options = {}) {
|
|
|
2451
2366
|
requireRole(extra, Role.EDITOR);
|
|
2452
2367
|
const ec = getDineway(extra);
|
|
2453
2368
|
try {
|
|
2454
|
-
const { SchemaRegistry } = await import("../../../schema-
|
|
2369
|
+
const { SchemaRegistry } = await import("../../../schema-Dk_N31V4.mjs").then((n) => n.t);
|
|
2455
2370
|
return jsonResult({ items: await new SchemaRegistry(ec.db).listCollections() });
|
|
2456
2371
|
} catch (error) {
|
|
2457
2372
|
return errorResult(error);
|
|
@@ -2467,7 +2382,7 @@ function createMcpServer(options = {}) {
|
|
|
2467
2382
|
requireRole(extra, Role.EDITOR);
|
|
2468
2383
|
const ec = getDineway(extra);
|
|
2469
2384
|
try {
|
|
2470
|
-
const { SchemaRegistry } = await import("../../../schema-
|
|
2385
|
+
const { SchemaRegistry } = await import("../../../schema-Dk_N31V4.mjs").then((n) => n.t);
|
|
2471
2386
|
const collection = await new SchemaRegistry(ec.db).getCollectionWithFields(args.slug);
|
|
2472
2387
|
if (!collection) return errorResult(`Collection '${args.slug}' not found`);
|
|
2473
2388
|
return jsonResult(collection);
|
|
@@ -2497,7 +2412,7 @@ function createMcpServer(options = {}) {
|
|
|
2497
2412
|
requireRole(extra, Role.ADMIN);
|
|
2498
2413
|
const ec = getDineway(extra);
|
|
2499
2414
|
try {
|
|
2500
|
-
const { SchemaRegistry } = await import("../../../schema-
|
|
2415
|
+
const { SchemaRegistry } = await import("../../../schema-Dk_N31V4.mjs").then((n) => n.t);
|
|
2501
2416
|
const collection = await new SchemaRegistry(ec.db).createCollection({
|
|
2502
2417
|
slug: args.slug,
|
|
2503
2418
|
label: args.label,
|
|
@@ -2561,7 +2476,7 @@ function createMcpServer(options = {}) {
|
|
|
2561
2476
|
request
|
|
2562
2477
|
});
|
|
2563
2478
|
}
|
|
2564
|
-
const { SchemaRegistry } = await import("../../../schema-
|
|
2479
|
+
const { SchemaRegistry } = await import("../../../schema-Dk_N31V4.mjs").then((n) => n.t);
|
|
2565
2480
|
await new SchemaRegistry(ec.db).deleteCollection(args.slug, { force: args.force });
|
|
2566
2481
|
ec.invalidateManifest();
|
|
2567
2482
|
await logSchemaActivity(ec.db, locals, {
|
|
@@ -2625,7 +2540,7 @@ function createMcpServer(options = {}) {
|
|
|
2625
2540
|
requireRole(extra, Role.ADMIN);
|
|
2626
2541
|
const ec = getDineway(extra);
|
|
2627
2542
|
try {
|
|
2628
|
-
const { SchemaRegistry } = await import("../../../schema-
|
|
2543
|
+
const { SchemaRegistry } = await import("../../../schema-Dk_N31V4.mjs").then((n) => n.t);
|
|
2629
2544
|
const field = await new SchemaRegistry(ec.db).createField(args.collection, {
|
|
2630
2545
|
slug: args.slug,
|
|
2631
2546
|
label: args.label,
|
|
@@ -2694,7 +2609,7 @@ function createMcpServer(options = {}) {
|
|
|
2694
2609
|
request
|
|
2695
2610
|
});
|
|
2696
2611
|
}
|
|
2697
|
-
const { SchemaRegistry } = await import("../../../schema-
|
|
2612
|
+
const { SchemaRegistry } = await import("../../../schema-Dk_N31V4.mjs").then((n) => n.t);
|
|
2698
2613
|
await new SchemaRegistry(ec.db).deleteField(args.collection, args.fieldSlug);
|
|
2699
2614
|
ec.invalidateManifest();
|
|
2700
2615
|
await logSchemaActivity(ec.db, locals, {
|
|
@@ -2827,7 +2742,7 @@ function createMcpServer(options = {}) {
|
|
|
2827
2742
|
requireScope(extra, "content:read");
|
|
2828
2743
|
const ec = getDineway(extra);
|
|
2829
2744
|
try {
|
|
2830
|
-
const { searchWithDb } = await import("../../../search-
|
|
2745
|
+
const { searchWithDb } = await import("../../../search-BXEQepxL.mjs").then((n) => n.t);
|
|
2831
2746
|
return jsonResult(await searchWithDb(ec.db, args.query, {
|
|
2832
2747
|
collections: args.collections,
|
|
2833
2748
|
locale: args.locale,
|
|
@@ -2853,7 +2768,7 @@ function createMcpServer(options = {}) {
|
|
|
2853
2768
|
requireScope(extra, "content:read");
|
|
2854
2769
|
const ec = getDineway(extra);
|
|
2855
2770
|
try {
|
|
2856
|
-
const { BylineRepository } = await import("../../../byline-
|
|
2771
|
+
const { BylineRepository } = await import("../../../byline-BJa1MyKB.mjs").then((n) => n.n);
|
|
2857
2772
|
return jsonResult(await new BylineRepository(ec.db).findMany({
|
|
2858
2773
|
search: args.search,
|
|
2859
2774
|
isGuest: args.isGuest,
|
|
@@ -2875,7 +2790,7 @@ function createMcpServer(options = {}) {
|
|
|
2875
2790
|
requireScope(extra, "content:read");
|
|
2876
2791
|
const ec = getDineway(extra);
|
|
2877
2792
|
try {
|
|
2878
|
-
const { BylineRepository } = await import("../../../byline-
|
|
2793
|
+
const { BylineRepository } = await import("../../../byline-BJa1MyKB.mjs").then((n) => n.n);
|
|
2879
2794
|
const byline = await new BylineRepository(ec.db).findById(args.id);
|
|
2880
2795
|
if (!byline) return errorResult(`Byline '${args.id}' not found`);
|
|
2881
2796
|
return jsonResult(byline);
|
|
@@ -2893,7 +2808,7 @@ function createMcpServer(options = {}) {
|
|
|
2893
2808
|
requireRole(extra, Role.EDITOR);
|
|
2894
2809
|
const ec = getDineway(extra);
|
|
2895
2810
|
try {
|
|
2896
|
-
const { handleBylineCreate } = await import("../../../bylines-
|
|
2811
|
+
const { handleBylineCreate } = await import("../../../bylines-B53Saxdb.mjs").then((n) => n.t);
|
|
2897
2812
|
const result = await handleBylineCreate(ec.db, args);
|
|
2898
2813
|
if (result.success) await invalidateBylines();
|
|
2899
2814
|
return unwrap(result);
|
|
@@ -2913,7 +2828,7 @@ function createMcpServer(options = {}) {
|
|
|
2913
2828
|
requireRole(extra, Role.EDITOR);
|
|
2914
2829
|
const ec = getDineway(extra);
|
|
2915
2830
|
try {
|
|
2916
|
-
const { handleBylineUpdate } = await import("../../../bylines-
|
|
2831
|
+
const { handleBylineUpdate } = await import("../../../bylines-B53Saxdb.mjs").then((n) => n.t);
|
|
2917
2832
|
const { id, ...input } = args;
|
|
2918
2833
|
const result = await handleBylineUpdate(ec.db, id, input);
|
|
2919
2834
|
if (result.success) await invalidateBylines();
|
|
@@ -2932,7 +2847,7 @@ function createMcpServer(options = {}) {
|
|
|
2932
2847
|
requireRole(extra, Role.EDITOR);
|
|
2933
2848
|
const ec = getDineway(extra);
|
|
2934
2849
|
try {
|
|
2935
|
-
const { BylineRepository } = await import("../../../byline-
|
|
2850
|
+
const { BylineRepository } = await import("../../../byline-BJa1MyKB.mjs").then((n) => n.n);
|
|
2936
2851
|
if (!await new BylineRepository(ec.db).delete(args.id)) return errorResult(`Byline '${args.id}' not found`);
|
|
2937
2852
|
await invalidateBylines();
|
|
2938
2853
|
return jsonResult({ deleted: args.id });
|
|
@@ -2949,7 +2864,7 @@ function createMcpServer(options = {}) {
|
|
|
2949
2864
|
requireScope(extra, "content:read");
|
|
2950
2865
|
const ec = getDineway(extra);
|
|
2951
2866
|
try {
|
|
2952
|
-
const { handleBylineTranslations } = await import("../../../bylines-
|
|
2867
|
+
const { handleBylineTranslations } = await import("../../../bylines-B53Saxdb.mjs").then((n) => n.t);
|
|
2953
2868
|
return unwrap(await handleBylineTranslations(ec.db, args.id));
|
|
2954
2869
|
} catch (error) {
|
|
2955
2870
|
return errorResult(error);
|
|
@@ -2964,7 +2879,7 @@ function createMcpServer(options = {}) {
|
|
|
2964
2879
|
requireScope(extra, "content:read");
|
|
2965
2880
|
const ec = getDineway(extra);
|
|
2966
2881
|
try {
|
|
2967
|
-
const { handleTaxonomyList } = await import("../../../taxonomies-
|
|
2882
|
+
const { handleTaxonomyList } = await import("../../../taxonomies-DuhGjBa8.mjs").then((n) => n.l);
|
|
2968
2883
|
return unwrap(await handleTaxonomyList(ec.db, { locale: args.locale }));
|
|
2969
2884
|
} catch (error) {
|
|
2970
2885
|
return errorResult(error);
|
|
@@ -2984,12 +2899,12 @@ function createMcpServer(options = {}) {
|
|
|
2984
2899
|
requireScope(extra, "content:read");
|
|
2985
2900
|
const ec = getDineway(extra);
|
|
2986
2901
|
try {
|
|
2987
|
-
const { handleTaxonomyList } = await import("../../../taxonomies-
|
|
2902
|
+
const { handleTaxonomyList } = await import("../../../taxonomies-DuhGjBa8.mjs").then((n) => n.l);
|
|
2988
2903
|
const listResult = await handleTaxonomyList(ec.db, { locale: args.locale });
|
|
2989
2904
|
if (!listResult.success) return unwrap(listResult);
|
|
2990
2905
|
if (!listResult.data.taxonomies.find((t) => t.name === args.taxonomy)) return errorResult(`Taxonomy '${args.taxonomy}' not found`);
|
|
2991
|
-
const { TaxonomyRepository } = await import("../../../taxonomy-
|
|
2992
|
-
const { decodeCursor, encodeCursor } = await import("../../../types-
|
|
2906
|
+
const { TaxonomyRepository } = await import("../../../taxonomy-CCo2plmV.mjs").then((n) => n.n);
|
|
2907
|
+
const { decodeCursor, encodeCursor } = await import("../../../types-Bshd_6wQ.mjs").then((n) => n.a);
|
|
2993
2908
|
const repo = new TaxonomyRepository(ec.db);
|
|
2994
2909
|
const limit = Math.min(args.limit ?? 50, 100);
|
|
2995
2910
|
const terms = await repo.findByName(args.taxonomy, { locale: args.locale });
|
|
@@ -3038,7 +2953,7 @@ function createMcpServer(options = {}) {
|
|
|
3038
2953
|
requireRole(extra, Role.EDITOR);
|
|
3039
2954
|
const ec = getDineway(extra);
|
|
3040
2955
|
try {
|
|
3041
|
-
const { handleTermCreate } = await import("../../../taxonomies-
|
|
2956
|
+
const { handleTermCreate } = await import("../../../taxonomies-DuhGjBa8.mjs").then((n) => n.l);
|
|
3042
2957
|
return unwrap(await handleTermCreate(ec.db, args.taxonomy, {
|
|
3043
2958
|
slug: args.slug,
|
|
3044
2959
|
label: args.label,
|
|
@@ -3068,7 +2983,7 @@ function createMcpServer(options = {}) {
|
|
|
3068
2983
|
requireRole(extra, Role.EDITOR);
|
|
3069
2984
|
const ec = getDineway(extra);
|
|
3070
2985
|
try {
|
|
3071
|
-
const { handleTermUpdate } = await import("../../../taxonomies-
|
|
2986
|
+
const { handleTermUpdate } = await import("../../../taxonomies-DuhGjBa8.mjs").then((n) => n.l);
|
|
3072
2987
|
return unwrap(await handleTermUpdate(ec.db, args.taxonomy, args.termSlug, {
|
|
3073
2988
|
slug: args.slug,
|
|
3074
2989
|
label: args.label,
|
|
@@ -3093,7 +3008,7 @@ function createMcpServer(options = {}) {
|
|
|
3093
3008
|
requireRole(extra, Role.EDITOR);
|
|
3094
3009
|
const ec = getDineway(extra);
|
|
3095
3010
|
try {
|
|
3096
|
-
const { handleTermDelete } = await import("../../../taxonomies-
|
|
3011
|
+
const { handleTermDelete } = await import("../../../taxonomies-DuhGjBa8.mjs").then((n) => n.l);
|
|
3097
3012
|
return unwrap(await handleTermDelete(ec.db, args.taxonomy, args.termSlug, { locale: args.locale }));
|
|
3098
3013
|
} catch (error) {
|
|
3099
3014
|
return errorResult(error);
|
|
@@ -3108,7 +3023,7 @@ function createMcpServer(options = {}) {
|
|
|
3108
3023
|
requireScope(extra, "content:read");
|
|
3109
3024
|
const ec = getDineway(extra);
|
|
3110
3025
|
try {
|
|
3111
|
-
const { handleTermTranslations } = await import("../../../taxonomies-
|
|
3026
|
+
const { handleTermTranslations } = await import("../../../taxonomies-DuhGjBa8.mjs").then((n) => n.l);
|
|
3112
3027
|
return unwrap(await handleTermTranslations(ec.db, args.id));
|
|
3113
3028
|
} catch (error) {
|
|
3114
3029
|
return errorResult(error);
|
|
@@ -3123,7 +3038,7 @@ function createMcpServer(options = {}) {
|
|
|
3123
3038
|
requireScope(extra, "content:read");
|
|
3124
3039
|
const ec = getDineway(extra);
|
|
3125
3040
|
try {
|
|
3126
|
-
const { handleMenuList } = await import("../../../menus-
|
|
3041
|
+
const { handleMenuList } = await import("../../../menus-LYALU2Mf.mjs").then((n) => n.d);
|
|
3127
3042
|
return unwrap(await handleMenuList(ec.db, { locale: args.locale }));
|
|
3128
3043
|
} catch (error) {
|
|
3129
3044
|
return errorResult(error);
|
|
@@ -3141,7 +3056,7 @@ function createMcpServer(options = {}) {
|
|
|
3141
3056
|
requireScope(extra, "content:read");
|
|
3142
3057
|
const ec = getDineway(extra);
|
|
3143
3058
|
try {
|
|
3144
|
-
const { handleMenuGet } = await import("../../../menus-
|
|
3059
|
+
const { handleMenuGet } = await import("../../../menus-LYALU2Mf.mjs").then((n) => n.d);
|
|
3145
3060
|
return unwrap(await handleMenuGet(ec.db, args.name, { locale: args.locale }));
|
|
3146
3061
|
} catch (error) {
|
|
3147
3062
|
return errorResult(error);
|
|
@@ -3156,7 +3071,7 @@ function createMcpServer(options = {}) {
|
|
|
3156
3071
|
requireScope(extra, "content:read");
|
|
3157
3072
|
const ec = getDineway(extra);
|
|
3158
3073
|
try {
|
|
3159
|
-
const { handleMenuTranslations } = await import("../../../menus-
|
|
3074
|
+
const { handleMenuTranslations } = await import("../../../menus-LYALU2Mf.mjs").then((n) => n.d);
|
|
3160
3075
|
return unwrap(await handleMenuTranslations(ec.db, args.id));
|
|
3161
3076
|
} catch (error) {
|
|
3162
3077
|
return errorResult(error);
|
|
@@ -3176,7 +3091,7 @@ function createMcpServer(options = {}) {
|
|
|
3176
3091
|
requireRole(extra, Role.EDITOR);
|
|
3177
3092
|
const ec = getDineway(extra);
|
|
3178
3093
|
try {
|
|
3179
|
-
const { handleMenuCreate } = await import("../../../menus-
|
|
3094
|
+
const { handleMenuCreate } = await import("../../../menus-LYALU2Mf.mjs").then((n) => n.d);
|
|
3180
3095
|
return unwrap(await handleMenuCreate(ec.db, {
|
|
3181
3096
|
name: args.name,
|
|
3182
3097
|
label: args.label,
|
|
@@ -3200,7 +3115,7 @@ function createMcpServer(options = {}) {
|
|
|
3200
3115
|
requireRole(extra, Role.EDITOR);
|
|
3201
3116
|
const ec = getDineway(extra);
|
|
3202
3117
|
try {
|
|
3203
|
-
const { handleMenuUpdate } = await import("../../../menus-
|
|
3118
|
+
const { handleMenuUpdate } = await import("../../../menus-LYALU2Mf.mjs").then((n) => n.d);
|
|
3204
3119
|
return unwrap(await handleMenuUpdate(ec.db, args.name, {
|
|
3205
3120
|
label: args.label,
|
|
3206
3121
|
locale: args.locale
|
|
@@ -3222,7 +3137,7 @@ function createMcpServer(options = {}) {
|
|
|
3222
3137
|
requireRole(extra, Role.EDITOR);
|
|
3223
3138
|
const ec = getDineway(extra);
|
|
3224
3139
|
try {
|
|
3225
|
-
const { handleMenuDelete } = await import("../../../menus-
|
|
3140
|
+
const { handleMenuDelete } = await import("../../../menus-LYALU2Mf.mjs").then((n) => n.d);
|
|
3226
3141
|
return unwrap(await handleMenuDelete(ec.db, args.name, { locale: args.locale }));
|
|
3227
3142
|
} catch (error) {
|
|
3228
3143
|
return errorResult(error);
|
|
@@ -3257,7 +3172,7 @@ function createMcpServer(options = {}) {
|
|
|
3257
3172
|
requireRole(extra, Role.EDITOR);
|
|
3258
3173
|
const ec = getDineway(extra);
|
|
3259
3174
|
try {
|
|
3260
|
-
const { handleMenuSetItems } = await import("../../../menus-
|
|
3175
|
+
const { handleMenuSetItems } = await import("../../../menus-LYALU2Mf.mjs").then((n) => n.d);
|
|
3261
3176
|
return unwrap(await handleMenuSetItems(ec.db, args.name, args.items, { locale: args.locale }));
|
|
3262
3177
|
} catch (error) {
|
|
3263
3178
|
return errorResult(error);
|
|
@@ -3304,7 +3219,7 @@ function createMcpServer(options = {}) {
|
|
|
3304
3219
|
requireRole(extra, Role.ADMIN);
|
|
3305
3220
|
const ec = getDineway(extra);
|
|
3306
3221
|
try {
|
|
3307
|
-
const { handleSettingsGet } = await import("../../../settings-
|
|
3222
|
+
const { handleSettingsGet } = await import("../../../settings-Dje-PHXo.mjs").then((n) => n.r);
|
|
3308
3223
|
return unwrap(await handleSettingsGet(ec.db, ec.storage));
|
|
3309
3224
|
} catch (error) {
|
|
3310
3225
|
return errorResult(error);
|
|
@@ -3341,7 +3256,7 @@ function createMcpServer(options = {}) {
|
|
|
3341
3256
|
request
|
|
3342
3257
|
});
|
|
3343
3258
|
}
|
|
3344
|
-
const { handleSettingsUpdate } = await import("../../../settings-
|
|
3259
|
+
const { handleSettingsUpdate } = await import("../../../settings-Dje-PHXo.mjs").then((n) => n.r);
|
|
3345
3260
|
const result = await handleSettingsUpdate(ec.db, ec.storage, settingsInput);
|
|
3346
3261
|
if (!result.success) return unwrap(result);
|
|
3347
3262
|
await logSiteActivitySafely(ec.db, locals, {
|
|
@@ -3413,8 +3328,13 @@ const POST = async ({ request, locals }) => {
|
|
|
3413
3328
|
const { dineway, user } = locals;
|
|
3414
3329
|
if (!dineway) return apiError("NOT_CONFIGURED", "Dineway is not initialized", 500);
|
|
3415
3330
|
if (!user) return apiError("UNAUTHORIZED", "Authentication required", 401);
|
|
3331
|
+
let toolsService;
|
|
3416
3332
|
const server = createMcpServer({
|
|
3417
|
-
|
|
3333
|
+
resolveDinewayToolsService: () => {
|
|
3334
|
+
toolsService ??= createDinewayToolsRuntimeService();
|
|
3335
|
+
return toolsService;
|
|
3336
|
+
},
|
|
3337
|
+
resolveDinewayToolsCredential: (provider, handlers) => new IntegrationCredentialStore(handlers.db).resolveForRuntime(provider),
|
|
3418
3338
|
pluginMcpRegistry: dineway.getPluginMcpRegistry(),
|
|
3419
3339
|
executePluginMcpCommand: createReviewedPluginMcpCommandExecutor()
|
|
3420
3340
|
});
|