dineway 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/README.md +17 -17
  2. package/dist/{activity-DUaz_w7p.mjs → activity-BDMlkpYY.mjs} +2 -2
  3. package/dist/{activity-events-CJDvE2uc.mjs → activity-events-DEYmJhWd.mjs} +1 -1
  4. package/dist/{allowed-origins--OwHHiY8.mjs → allowed-origins-VLgv2PL1.mjs} +1 -1
  5. package/dist/api/route-utils.d.mts +9 -9
  6. package/dist/api/route-utils.mjs +13 -13
  7. package/dist/api/schemas/index.d.mts +1 -1
  8. package/dist/api/schemas/index.mjs +3 -3
  9. package/dist/{api-B4PHIF4V.mjs → api-DsO87Qak.mjs} +15 -15
  10. package/dist/{api-tokens-tbK_sORH.mjs → api-tokens-C4K9eocv.mjs} +1 -1
  11. package/dist/{apply-DjTqq6Ae.mjs → apply-DHT0l398.mjs} +18 -18
  12. package/dist/astro/index.d.mts +10 -10
  13. package/dist/astro/index.mjs +11 -3
  14. package/dist/astro/middleware/auth.d.mts +8 -8
  15. package/dist/astro/middleware/auth.mjs +6 -6
  16. package/dist/astro/middleware/redirect.mjs +5 -5
  17. package/dist/astro/middleware/request-context.mjs +2 -2
  18. package/dist/astro/middleware/seed.d.mts +1 -1
  19. package/dist/astro/middleware/seed.mjs +1 -1
  20. package/dist/astro/middleware/setup.mjs +1 -1
  21. package/dist/astro/middleware.mjs +78 -76
  22. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +5 -5
  23. package/dist/astro/routes/api/admin/allowed-domains/index.mjs +5 -5
  24. package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
  25. package/dist/astro/routes/api/admin/api-tokens/index.mjs +6 -6
  26. package/dist/astro/routes/api/admin/briefing.mjs +16 -16
  27. package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +2 -2
  28. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +6 -6
  29. package/dist/astro/routes/api/admin/byline-fields/index.mjs +6 -6
  30. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +6 -6
  31. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +13 -13
  32. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +13 -13
  33. package/dist/astro/routes/api/admin/bylines/index.mjs +13 -13
  34. package/dist/astro/routes/api/admin/comments/_id_/status.mjs +11 -11
  35. package/dist/astro/routes/api/admin/comments/_id_.mjs +5 -5
  36. package/dist/astro/routes/api/admin/comments/bulk.mjs +9 -9
  37. package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
  38. package/dist/astro/routes/api/admin/comments/index.mjs +9 -9
  39. package/dist/astro/routes/api/admin/context/_id_/history.mjs +23 -23
  40. package/dist/astro/routes/api/admin/context/_id_/index.mjs +23 -23
  41. package/dist/astro/routes/api/admin/context/_id_/review.mjs +28 -28
  42. package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +28 -28
  43. package/dist/astro/routes/api/admin/context/diff.mjs +27 -27
  44. package/dist/astro/routes/api/admin/context/index.mjs +28 -28
  45. package/dist/astro/routes/api/admin/context/stale.mjs +27 -27
  46. package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +23 -23
  47. package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +27 -27
  48. package/dist/astro/routes/api/admin/hitl-requests/index.mjs +27 -27
  49. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +24 -24
  50. package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +2 -2
  51. package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +6 -6
  52. package/dist/astro/routes/api/admin/oauth-clients/index.mjs +6 -6
  53. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +50 -47
  54. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +50 -47
  55. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +42 -39
  56. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +49 -46
  57. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +49 -46
  58. package/dist/astro/routes/api/admin/plugins/index.mjs +42 -39
  59. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
  60. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +42 -39
  61. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +49 -46
  62. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +42 -39
  63. package/dist/astro/routes/api/admin/plugins/updates.mjs +42 -39
  64. package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +5 -5
  65. package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +28 -28
  66. package/dist/astro/routes/api/admin/review-requests/index.mjs +28 -28
  67. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +42 -39
  68. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
  69. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +42 -39
  70. package/dist/astro/routes/api/admin/users/_id_/disable.mjs +1 -1
  71. package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
  72. package/dist/astro/routes/api/admin/users/_id_/index.mjs +5 -5
  73. package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
  74. package/dist/astro/routes/api/admin/users/index.mjs +5 -5
  75. package/dist/astro/routes/api/auth/dev-bypass.mjs +4 -4
  76. package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
  77. package/dist/astro/routes/api/auth/invite/complete.mjs +9 -9
  78. package/dist/astro/routes/api/auth/invite/index.mjs +6 -6
  79. package/dist/astro/routes/api/auth/invite/register-options.mjs +8 -8
  80. package/dist/astro/routes/api/auth/logout.mjs +2 -2
  81. package/dist/astro/routes/api/auth/magic-link/send.mjs +8 -8
  82. package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
  83. package/dist/astro/routes/api/auth/me.mjs +7 -7
  84. package/dist/astro/routes/api/auth/mode.mjs +1 -1
  85. package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +2 -2
  86. package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
  87. package/dist/astro/routes/api/auth/passkey/_id_.mjs +5 -5
  88. package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
  89. package/dist/astro/routes/api/auth/passkey/options.mjs +10 -10
  90. package/dist/astro/routes/api/auth/passkey/register/options.mjs +8 -8
  91. package/dist/astro/routes/api/auth/passkey/register/verify.mjs +9 -9
  92. package/dist/astro/routes/api/auth/passkey/verify.mjs +9 -9
  93. package/dist/astro/routes/api/auth/setup-token/index.mjs +5 -5
  94. package/dist/astro/routes/api/auth/setup-token/verify.mjs +2 -2
  95. package/dist/astro/routes/api/auth/signup/complete.mjs +9 -9
  96. package/dist/astro/routes/api/auth/signup/request.mjs +8 -8
  97. package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
  98. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +12 -12
  99. package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +11 -11
  100. package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
  101. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +6 -6
  102. package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +6 -6
  103. package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +6 -6
  104. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +9 -9
  105. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +15 -15
  106. package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +6 -6
  107. package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
  108. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +15 -15
  109. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +12 -12
  110. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
  111. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +6 -6
  112. package/dist/astro/routes/api/content/_collection_/_id_.mjs +10 -10
  113. package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
  114. package/dist/astro/routes/api/content/_collection_/index.mjs +10 -10
  115. package/dist/astro/routes/api/content/_collection_/trash.mjs +6 -6
  116. package/dist/astro/routes/api/dashboard.mjs +8 -8
  117. package/dist/astro/routes/api/dev/emails.mjs +2 -2
  118. package/dist/astro/routes/api/health.mjs +1 -1
  119. package/dist/astro/routes/api/import/probe.d.mts +3 -3
  120. package/dist/astro/routes/api/import/probe.mjs +17 -17
  121. package/dist/astro/routes/api/import/wordpress/analyze.mjs +8 -8
  122. package/dist/astro/routes/api/import/wordpress/execute.d.mts +8 -8
  123. package/dist/astro/routes/api/import/wordpress/execute.mjs +32 -32
  124. package/dist/astro/routes/api/import/wordpress/media.d.mts +8 -8
  125. package/dist/astro/routes/api/import/wordpress/media.mjs +9 -9
  126. package/dist/astro/routes/api/import/wordpress/prepare.mjs +31 -31
  127. package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +9 -9
  128. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +28 -28
  129. package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
  130. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +20 -20
  131. package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +8 -8
  132. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +36 -36
  133. package/dist/astro/routes/api/integrations/_provider_.d.mts +8 -0
  134. package/dist/astro/routes/api/integrations/_provider_.mjs +51 -0
  135. package/dist/astro/routes/api/integrations/index.d.mts +7 -0
  136. package/dist/astro/routes/api/integrations/index.mjs +24 -0
  137. package/dist/astro/routes/api/manifest.mjs +4 -4
  138. package/dist/astro/routes/api/mcp.mjs +231 -311
  139. package/dist/astro/routes/api/media/_id_/confirm.mjs +8 -8
  140. package/dist/astro/routes/api/media/_id_.mjs +6 -6
  141. package/dist/astro/routes/api/media/file/_...key_.mjs +1 -1
  142. package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +2 -2
  143. package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +2 -2
  144. package/dist/astro/routes/api/media/providers/index.mjs +2 -2
  145. package/dist/astro/routes/api/media/upload-url.mjs +9 -9
  146. package/dist/astro/routes/api/media.mjs +9 -9
  147. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +28 -28
  148. package/dist/astro/routes/api/menus/_name_/items.mjs +28 -28
  149. package/dist/astro/routes/api/menus/_name_/reorder.mjs +28 -28
  150. package/dist/astro/routes/api/menus/_name_/translations.mjs +28 -28
  151. package/dist/astro/routes/api/menus/_name_.mjs +28 -28
  152. package/dist/astro/routes/api/menus/index.mjs +28 -28
  153. package/dist/astro/routes/api/oauth/authorize.mjs +7 -7
  154. package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
  155. package/dist/astro/routes/api/oauth/device/code.mjs +9 -9
  156. package/dist/astro/routes/api/oauth/device/token.mjs +8 -8
  157. package/dist/astro/routes/api/oauth/register.mjs +4 -4
  158. package/dist/astro/routes/api/oauth/token/refresh.mjs +6 -6
  159. package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
  160. package/dist/astro/routes/api/oauth/token.mjs +6 -6
  161. package/dist/astro/routes/api/openapi.json.mjs +4 -4
  162. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
  163. package/dist/astro/routes/api/redirects/404s/index.mjs +9 -9
  164. package/dist/astro/routes/api/redirects/404s/summary.mjs +9 -9
  165. package/dist/astro/routes/api/redirects/_id_.mjs +29 -29
  166. package/dist/astro/routes/api/redirects/index.mjs +29 -29
  167. package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -2
  168. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +2 -2
  169. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +44 -41
  170. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +44 -41
  171. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +44 -41
  172. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +44 -41
  173. package/dist/astro/routes/api/schema/collections/index.mjs +44 -41
  174. package/dist/astro/routes/api/schema/index.mjs +7 -7
  175. package/dist/astro/routes/api/schema/orphans/_slug_.mjs +42 -39
  176. package/dist/astro/routes/api/schema/orphans/index.mjs +42 -39
  177. package/dist/astro/routes/api/search/enable.mjs +10 -10
  178. package/dist/astro/routes/api/search/index.mjs +9 -9
  179. package/dist/astro/routes/api/search/rebuild.mjs +10 -10
  180. package/dist/astro/routes/api/search/stats.mjs +6 -6
  181. package/dist/astro/routes/api/search/suggest.mjs +9 -9
  182. package/dist/astro/routes/api/sections/_slug_.mjs +28 -28
  183. package/dist/astro/routes/api/sections/index.mjs +28 -28
  184. package/dist/astro/routes/api/settings/email.mjs +3 -3
  185. package/dist/astro/routes/api/settings.mjs +28 -28
  186. package/dist/astro/routes/api/setup/admin-verify.mjs +11 -11
  187. package/dist/astro/routes/api/setup/admin.mjs +9 -9
  188. package/dist/astro/routes/api/setup/dev-bypass.mjs +23 -23
  189. package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
  190. package/dist/astro/routes/api/setup/index.mjs +24 -24
  191. package/dist/astro/routes/api/setup/status.mjs +3 -3
  192. package/dist/astro/routes/api/snapshot.mjs +6 -6
  193. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +31 -31
  194. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +31 -31
  195. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +31 -31
  196. package/dist/astro/routes/api/taxonomies/index.mjs +31 -31
  197. package/dist/astro/routes/api/themes/preview.mjs +4 -4
  198. package/dist/astro/routes/api/typegen.mjs +4 -4
  199. package/dist/astro/routes/api/well-known/auth.mjs +2 -2
  200. package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +3 -3
  201. package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +3 -3
  202. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +27 -27
  203. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +28 -28
  204. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +28 -28
  205. package/dist/astro/routes/api/widget-areas/_name_.mjs +25 -25
  206. package/dist/astro/routes/api/widget-areas/index.mjs +28 -28
  207. package/dist/astro/routes/api/widget-components.mjs +2 -2
  208. package/dist/astro/routes/robots.txt.mjs +5 -5
  209. package/dist/astro/routes/sitemap-_collection_.xml.mjs +7 -7
  210. package/dist/astro/routes/sitemap.xml.mjs +5 -5
  211. package/dist/astro/session-driver.d.mts +1 -1
  212. package/dist/astro/session-driver.mjs +2 -2
  213. package/dist/astro/types.d.mts +11 -11
  214. package/dist/{audit-B2pRxZ20.mjs → audit-BzhwRVym.mjs} +1 -1
  215. package/dist/auth/providers/github.d.mts +1 -1
  216. package/dist/auth/providers/google.d.mts +1 -1
  217. package/dist/{auth-control-guard-D71jourk.mjs → auth-control-guard-B_Dx-epW.mjs} +1 -1
  218. package/dist/{authorize-ZXPGPwKn.mjs → authorize-D6MkRtPw.mjs} +1 -1
  219. package/dist/{briefing-kRhegBoF.mjs → briefing-Cl70iEH5.mjs} +1 -1
  220. package/dist/{briefing-0rf-su3-.mjs → briefing-GFhLTLJo.mjs} +5 -5
  221. package/dist/{bundle-CEcdUa1s.mjs → bundle-CIrUlrkQ.mjs} +2 -2
  222. package/dist/{byline-7xR185Ly.mjs → byline-BJa1MyKB.mjs} +4 -4
  223. package/dist/{byline-fields-WN7RQT4q.mjs → byline-fields-yT4herdN.mjs} +1 -1
  224. package/dist/{bylines-C-EL6dh3.mjs → bylines-B53Saxdb.mjs} +3 -3
  225. package/dist/{bylines-CmZFCMr0.mjs → bylines-kixFoaRV.mjs} +5 -5
  226. package/dist/{cache-DkVCKGio.mjs → cache-fpisdt5Q.mjs} +1 -1
  227. package/dist/{chunks-ChGNDY8r.mjs → chunks-DX_b8_4Z.mjs} +1 -1
  228. package/dist/cli/index.mjs +625 -588
  229. package/dist/cli/plugin-kit.mjs +2 -2
  230. package/dist/client/external-auth-headers.d.mts +1 -1
  231. package/dist/client/index.d.mts +2 -2
  232. package/dist/{client-factory-BDD9azPJ.mjs → client-factory-DEtHApCc.mjs} +93 -3
  233. package/dist/{comment-DFALgsJD.mjs → comment-B88XcvU1.mjs} +1 -1
  234. package/dist/{comment-reaction-C37bf99u.mjs → comment-reaction-Ckn6vCmB.mjs} +1 -1
  235. package/dist/{comments-B3NwDBxl.mjs → comments-BDXsbL7z.mjs} +1 -1
  236. package/dist/{content-DJcAYFhz.mjs → content-Cbl8HbIR.mjs} +2 -2
  237. package/dist/{content-refresh-B4ZCmxgd.mjs → content-refresh-BmkilU5M.mjs} +2 -2
  238. package/dist/{context-DnpXcp6Y.mjs → context-AJNd0tcG.mjs} +2 -2
  239. package/dist/{context-fSCYLL3c.mjs → context-DT0tIsfw.mjs} +8 -8
  240. package/dist/{context-route-helpers-CI8XzcsK.mjs → context-route-helpers-DhP--tTq.mjs} +2 -2
  241. package/dist/{dashboard-D0nj5oWg.mjs → dashboard-YvDEYbS3.mjs} +4 -4
  242. package/dist/db/index.d.mts +3 -3
  243. package/dist/db/index.mjs +1 -1
  244. package/dist/db/libsql.d.mts +1 -1
  245. package/dist/db/postgres.d.mts +1 -1
  246. package/dist/db/sqlite.d.mts +1 -1
  247. package/dist/{device-flow-BJe6VEhP.mjs → device-flow-BKKeobcV.mjs} +4 -4
  248. package/dist/{error-CSVaQNZy.mjs → error-BW9f_ynq.mjs} +16 -2
  249. package/dist/{field-defs-cache-DL-T2XVS.mjs → field-defs-cache-CiXP3eO3.mjs} +1 -1
  250. package/dist/{fts-manager-ewTGohf4.mjs → fts-manager-Zo9uhGel.mjs} +1 -1
  251. package/dist/{hitl-requests-DEFj8e6u.mjs → hitl-requests-Bee8Cjj8.mjs} +2 -2
  252. package/dist/{hitl-route-helpers-C23JHaWz.mjs → hitl-route-helpers-DtHaKGgm.mjs} +5 -5
  253. package/dist/{import-CXXL5pip.mjs → import-C-zxnT89.mjs} +7 -7
  254. package/dist/{index-DcnOCD1e.d.mts → index-DybFmYtZ.d.mts} +3 -3
  255. package/dist/index.d.mts +14 -14
  256. package/dist/index.mjs +71 -69
  257. package/dist/integration-credentials-D3ZneN0L.mjs +49 -0
  258. package/dist/{jsonld-DzKbhRZ4.d.mts → jsonld-CoTa8I1a.d.mts} +2 -2
  259. package/dist/{load-CFtJRT3c.mjs → load-Cuiyh8LT.mjs} +1 -1
  260. package/dist/{loader-aWkkc1_o.mjs → loader-WHf22FwU.mjs} +2 -2
  261. package/dist/{manifest-schema-uA6pRFXi.mjs → manifest-schema-DKa3ZaJL.mjs} +1 -1
  262. package/dist/{mcp-reviewed-executor-Dn52L_yY.mjs → mcp-reviewed-executor-DnlF7mIL.mjs} +4 -4
  263. package/dist/media/index.d.mts +1 -1
  264. package/dist/media/local-runtime.d.mts +10 -10
  265. package/dist/media/local-runtime.mjs +2 -2
  266. package/dist/{media-CVMOoywq.mjs → media-B4m-cnmj.mjs} +1 -1
  267. package/dist/{menus-CmyIkRG5.mjs → menus-LYALU2Mf.mjs} +1 -1
  268. package/dist/{menus-CCG2z5um.mjs → menus-oYfViqfE.mjs} +5 -5
  269. package/dist/{oauth-authorization-B9H7X85L.mjs → oauth-authorization-CX7aa8Ph.mjs} +4 -4
  270. package/dist/{oauth-clients-Dwl32-Uj.mjs → oauth-clients-D9Gg0WjF.mjs} +2 -2
  271. package/dist/object-cache/memory.d.mts +1 -1
  272. package/dist/page/index.d.mts +9 -9
  273. package/dist/page/index.mjs +1 -1
  274. package/dist/{parse-i15EFSAE.mjs → parse-B-Y84oJl.mjs} +1 -1
  275. package/dist/plugin-utils.d.mts +8 -8
  276. package/dist/plugins/adapt-sandbox-entry.d.mts +8 -8
  277. package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
  278. package/dist/{plugins-CPA2PtfY.mjs → plugins-B7-4Okii.mjs} +5 -5
  279. package/dist/{preview-BjedZm8G.mjs → preview-BMIReQGc.mjs} +2 -2
  280. package/dist/{provider-loader-DC2JdWeO.d.mts → provider-loader-BIbIiz0P.d.mts} +1 -1
  281. package/dist/{public-url-DQJCnYi9.d.mts → public-url-DYISdY_R.d.mts} +1 -1
  282. package/dist/{publication-authorization-RKiHXKtq.mjs → publication-authorization-BVQ5rCAF.mjs} +6 -6
  283. package/dist/{query-DEv5x6yB.mjs → query-C_m8sn-S.mjs} +12 -12
  284. package/dist/{query-C2U5u5_p.mjs → query-DNczixZr.mjs} +2 -2
  285. package/dist/{rate-limit-DglsAJSw.mjs → rate-limit-oUGexQO1.mjs} +2 -2
  286. package/dist/{redirect-ubhEqQCQ.mjs → redirect-DoDgOWIA.mjs} +1 -1
  287. package/dist/{redirects-xs2yahLq.mjs → redirects-CrP6U4hZ.mjs} +3 -3
  288. package/dist/{redirects-Bhpm8bRe.mjs → redirects-E_B6hvuz.mjs} +2 -2
  289. package/dist/{registry-BYYyb2tF.mjs → registry-SEJqFliS.mjs} +4 -4
  290. package/dist/{request-meta-CFe1tW2M.mjs → request-meta-DHFIzWcf.mjs} +1 -1
  291. package/dist/{review-requests-CTWGnWUt.mjs → review-requests-CObSuTYU.mjs} +1 -1
  292. package/dist/{review-requests-D42VEP1l.mjs → review-requests-Cu9051_B.mjs} +1 -1
  293. package/dist/{review-route-helpers-C31vO6SI.mjs → review-route-helpers-Dp_7PH8r.mjs} +2 -2
  294. package/dist/{runner-D6hzs8L9.d.mts → runner-Bcy5w0vj.d.mts} +1 -1
  295. package/dist/{runner-BgmttQmD.mjs → runner-BfWbi9YY.mjs} +461 -446
  296. package/dist/runtime.d.mts +9 -9
  297. package/dist/runtime.mjs +3 -3
  298. package/dist/schema-Dk_N31V4.mjs +8 -0
  299. package/dist/{search-DUKgZUlm.mjs → search-BXEQepxL.mjs} +3 -3
  300. package/dist/{sections-DvFgsnda.mjs → sections-DxvEF6Bj.mjs} +2 -2
  301. package/dist/seed/index.d.mts +2 -2
  302. package/dist/seed/index.mjs +17 -17
  303. package/dist/seo/index.d.mts +1 -1
  304. package/dist/seo/index.mjs +1 -1
  305. package/dist/{seo-BU8MLCS9.mjs → seo-D1RiaooQ.mjs} +1 -1
  306. package/dist/service-CY0aH6eI.mjs +347 -0
  307. package/dist/{service-FL3fB0Rx.mjs → service-QdG0YHws.mjs} +2 -2
  308. package/dist/{settings-EzADu-dd.mjs → settings-Dje-PHXo.mjs} +2 -2
  309. package/dist/{settings-BECcAIRH.mjs → settings-SVDAB7_W.mjs} +2 -2
  310. package/dist/{site-activity-h8smOlYI.mjs → site-activity-BVK40wCy.mjs} +1 -1
  311. package/dist/{site-context-B8T1kpUP.mjs → site-context-CzaEGizi.mjs} +13 -13
  312. package/dist/storage/local.d.mts +1 -1
  313. package/dist/storage/local.mjs +1 -1
  314. package/dist/storage/s3.d.mts +1 -1
  315. package/dist/storage/s3.mjs +1 -1
  316. package/dist/store-CCfMD6nw.mjs +262 -0
  317. package/dist/{taxonomies-BiM9NtgW.mjs → taxonomies-DuhGjBa8.mjs} +3 -3
  318. package/dist/{taxonomies-DSnY5nOa.mjs → taxonomies-WVnFki0o.mjs} +5 -5
  319. package/dist/{taxonomy-0k_vRVsD.mjs → taxonomy-CCo2plmV.mjs} +2 -2
  320. package/dist/{types-DuQn1G7-.d.mts → types-BFeoAIHl.d.mts} +13 -0
  321. package/dist/{types-ChxYDRvx.mjs → types-Bshd_6wQ.mjs} +1 -1
  322. package/dist/{types-DwoUifGE.d.mts → types-CJezJeNE.d.mts} +25 -24
  323. package/dist/{types-opjX_kz6.d.mts → types-GtwhHAg8.d.mts} +1 -1
  324. package/dist/ui/server-runtime.d.mts +12 -12
  325. package/dist/ui/server-runtime.mjs +19 -19
  326. package/dist/{user-BH-n01y3.mjs → user-Bcvr5ihC.mjs} +2 -2
  327. package/dist/{validate-CbVFoJgc.d.mts → validate-YiX3rly5.d.mts} +3 -3
  328. package/dist/{validate-D1HL-oLR.mjs → validate-qKzI3BCv.mjs} +1 -1
  329. package/dist/version-DEAV9k58.mjs +6 -0
  330. package/dist/{widgets-BZrLrNgS.mjs → widgets-DyGcotPM.mjs} +2 -2
  331. package/dist/{zod-generator-C7AsLpSB.mjs → zod-generator-Cr3SiHsc.mjs} +1 -1
  332. package/package.json +8 -6
  333. package/dist/forgeway-seo-client-G5ddhVHd.mjs +0 -456
  334. package/dist/project-env-DKibmuP8.mjs +0 -95
  335. package/dist/schema-DUtnZxjZ.mjs +0 -8
  336. package/dist/version-C3iVRuaF.mjs +0 -6
  337. /package/dist/{actor-0QJ1Gbtf.mjs → actor-DA7yL9Yp.mjs} +0 -0
  338. /package/dist/{adapters-BiRymx02.d.mts → adapters-DnMDRQ4e.d.mts} +0 -0
  339. /package/dist/{api-tokens-Ypaly90d.mjs → api-tokens-D4tcY8R6.mjs} +0 -0
  340. /package/dist/{byline-fields-Ckeqd1OY.d.mts → byline-fields-DxMpdtsZ.d.mts} +0 -0
  341. /package/dist/{challenge-store-D5pSY2S1.mjs → challenge-store-BMkL2kmt.mjs} +0 -0
  342. /package/dist/{components-DImzlLhb.mjs → components-D0w9MzQe.mjs} +0 -0
  343. /package/dist/{cron-B1SL_lsb.mjs → cron-D_c3WUPN.mjs} +0 -0
  344. /package/dist/{default-D4Vygcy_.mjs → default-BxoI3SoK.mjs} +0 -0
  345. /package/dist/{email-console-Bp0r68iF.mjs → email-console-BEMwuxhV.mjs} +0 -0
  346. /package/dist/{escape-DN4Qmjsl.mjs → escape-smSUOb7u.mjs} +0 -0
  347. /package/dist/{experimental-workflows-GVhUgzEs.mjs → experimental-workflows-CgO73K4e.mjs} +0 -0
  348. /package/dist/{media-allowlist-zDNJmXCo.mjs → media-allowlist-BQyIBPzd.mjs} +0 -0
  349. /package/dist/{media-url-BdoLPvg8.mjs → media-url-B6d-yVI6.mjs} +0 -0
  350. /package/dist/{mode-C8yZnIlR.mjs → mode-DPC7segX.mjs} +0 -0
  351. /package/dist/{oauth-state-store-CndT35iw.mjs → oauth-state-store-DPVzeoyY.mjs} +0 -0
  352. /package/dist/{oauth-user-lookup-CMehAaKs.mjs → oauth-user-lookup-3E5jlXrr.mjs} +0 -0
  353. /package/dist/{output-DhBe5_Pi.mjs → output-13u4dvu-.mjs} +0 -0
  354. /package/dist/{parser-06LLLL4E.mjs → parser-DX_c5iG3.mjs} +0 -0
  355. /package/dist/{passkey-config-NYukYGed.mjs → passkey-config-DE_0EGEP.mjs} +0 -0
  356. /package/dist/{placeholder-DkWkXfDI.d.mts → placeholder-C6ZjZcmJ.d.mts} +0 -0
  357. /package/dist/{portable-text-E79LyjGo.d.mts → portable-text-Ehqj3I_y.d.mts} +0 -0
  358. /package/dist/{provider-loader-BtfrrzfD.mjs → provider-loader-BeQcnPN1.mjs} +0 -0
  359. /package/dist/{public-url-Cp6hyjVR.mjs → public-url-BA-7LKvQ.mjs} +0 -0
  360. /package/dist/{redirect-DrbEmU9a.mjs → redirect-CZFAqHLr.mjs} +0 -0
  361. /package/dist/{resolve-DE71WcL9.mjs → resolve-B6BpqwAR.mjs} +0 -0
  362. /package/dist/{secrets-ZV5rd8yV.mjs → secrets-CpGpyGcO.mjs} +0 -0
  363. /package/dist/{seo-contributions-GnCuL1ML.mjs → seo-contributions-Ci8_12_r.mjs} +0 -0
  364. /package/dist/{session-user-Ct6GBLvn.mjs → session-user-BwliEFp0.mjs} +0 -0
  365. /package/dist/{setup-complete-Da0axZEE.mjs → setup-complete-PvF8I7Oh.mjs} +0 -0
  366. /package/dist/{setup-nonce-BtkKnvxQ.mjs → setup-nonce-DkpYROqg.mjs} +0 -0
  367. /package/dist/{sidecar-client-Ctzfyyp-.mjs → sidecar-client-dt5fv23q.mjs} +0 -0
  368. /package/dist/{site-url-DJEid0ml.mjs → site-url-DfYDZyWl.mjs} +0 -0
  369. /package/dist/{ssrf-FJqwQzj4.mjs → ssrf-BZHvtFEv.mjs} +0 -0
  370. /package/dist/{status-NqWOSFAD.mjs → status-BN40hMpr.mjs} +0 -0
  371. /package/dist/{tokens-BDQU29Vd.mjs → tokens-DIzhPT80.mjs} +0 -0
  372. /package/dist/{transport-D9pKAzFP.d.mts → transport-BZ3aqdu7.d.mts} +0 -0
  373. /package/dist/{trusted-proxy-Dm7Mxvt6.mjs → trusted-proxy-czZuby6G.mjs} +0 -0
  374. /package/dist/{types-Cw0PeCT_.d.mts → types-BsTXSvKG.d.mts} +0 -0
  375. /package/dist/{types-BLQCz46p.d.mts → types-CDcuRd4z.d.mts} +0 -0
  376. /package/dist/{types-A8fPOJnl.mjs → types-CK0r-Xq4.mjs} +0 -0
  377. /package/dist/{types-g0zMtraY.d.mts → types-S9VIopdY.d.mts} +0 -0
  378. /package/dist/{types-wFu80FrO.d.mts → types-YxFz4lDr.d.mts} +0 -0
  379. /package/dist/{types-mVVgRPaU.mjs → types-gvNBqijt.mjs} +0 -0
  380. /package/dist/{types-B_FlxIIl.d.mts → types-ywmuDETA.d.mts} +0 -0
  381. /package/dist/{url-EMAguGVk.mjs → url-D282S1Zw.mjs} +0 -0
  382. /package/dist/{utils-D1SrKGtP.mjs → utils-B7gemXz5.mjs} +0 -0
  383. /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-ChxYDRvx.mjs";
4
- import "../../../loader-aWkkc1_o.mjs";
3
+ import "../../../types-Bshd_6wQ.mjs";
4
+ import "../../../loader-WHf22FwU.mjs";
5
5
  import "../../../object-cache-D51qOseS.mjs";
6
- import "../../../content-DJcAYFhz.mjs";
7
- import "../../../media-CVMOoywq.mjs";
6
+ import "../../../content-Cbl8HbIR.mjs";
7
+ import "../../../media-B4m-cnmj.mjs";
8
8
  import "../../../options-DQPTH5n0.mjs";
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";
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-0rf-su3-.mjs";
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-B4ZCmxgd.mjs";
17
- import "../../../fts-manager-ewTGohf4.mjs";
18
- import "../../../registry-BYYyb2tF.mjs";
19
- import { a as getSiteSettingsWithDb } from "../../../settings-BECcAIRH.mjs";
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-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";
21
+ import { n as VERSION } from "../../../version-DEAV9k58.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-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";
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";
38
39
  import { n as convertDataForWrite, t as convertDataForRead } from "../../../portable-text-BASHceim.mjs";
40
+ import { f as readStoredForgewayAccount, n as DinewayToolsService, p as refreshForgewayAccountCredentials, s as createForgewayAccountClient, t as DinewayToolsError, u as normalizeForgewayApiUrl } from "../../../service-CY0aH6eI.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/mcp/seo-provider-tools.ts
46
- const annotations = {
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 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
88
+ const stopAnnotations = {
89
+ readOnlyHint: false,
90
+ destructiveHint: true,
91
+ idempotentHint: true,
92
+ openWorldHint: true
58
93
  };
59
- function serviceOrThrow(service) {
60
- if (!service) throw new Error("Dineway hosted SEO provider evidence is unavailable in this runtime.");
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 jsonResult$1(data) {
64
- return { content: [{
65
- type: "text",
66
- text: JSON.stringify(data, null, 2)
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 Error ? error.message : "SEO provider evidence request failed."
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 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
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.authorize(extra);
158
+ options.authorizeRead(extra);
191
159
  try {
192
- return jsonResult$1(await serviceOrThrow(options.service).firecrawlSearch({
160
+ return result(await (await serviceOrThrow(options)).discover({
193
161
  query: args.query,
194
162
  limit: args.limit,
195
- scrape: args.scrape,
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("seo_dataforseo_serp", {
203
- title: "Get Organic SERP Evidence",
204
- description: "Return bounded raw Google organic SERP evidence for one keyword.",
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
- keyword: z.string().trim().min(1).max(1e3),
207
- depth: z.number().int().min(1).max(100).optional(),
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.authorize(extra);
178
+ options.authorizeRead(extra);
213
179
  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
- }));
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("seo_dataforseo_maps", {
227
- title: "Get Maps SERP Evidence",
228
- description: "Return bounded raw Google Maps SERP evidence for one keyword.",
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
- keyword: z.string().trim().min(1).max(1e3),
231
- depth: z.number().int().min(1).max(100).optional(),
232
- ...dataForSeoCommonInput
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.authorize(extra);
199
+ options.authorizeRun(extra);
237
200
  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
- }));
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("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
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.authorize(extra);
221
+ options.authorizeRead(extra);
261
222
  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
- }));
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("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.",
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
- keyword: z.string().trim().min(1).max(1e3),
303
- platform: z.enum([
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.authorize(extra);
237
+ options.authorizeRead(extra);
313
238
  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
- }));
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("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.",
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
- 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
248
+ run_id: z.string().uuid(),
249
+ billing_mode: billingModeSchema
335
250
  }),
336
- annotations
251
+ annotations: stopAnnotations
337
252
  }, async (args, extra) => {
338
- options.authorize(extra);
253
+ options.authorizeRun(extra);
339
254
  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
- }));
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-DUtnZxjZ.mjs").then((n) => n.t);
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-CmZFCMr0.mjs").then((n) => n.t);
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
- registerSeoProviderTools(server, {
835
- service: options.seoProviderService,
836
- authorize: (extra) => {
837
- requireScope(extra, "seo:read");
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-DUtnZxjZ.mjs").then((n) => n.t);
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-DUtnZxjZ.mjs").then((n) => n.t);
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-DUtnZxjZ.mjs").then((n) => n.t);
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-DUtnZxjZ.mjs").then((n) => n.t);
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-DUtnZxjZ.mjs").then((n) => n.t);
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-DUtnZxjZ.mjs").then((n) => n.t);
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-DUKgZUlm.mjs").then((n) => n.t);
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-7xR185Ly.mjs").then((n) => n.n);
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-7xR185Ly.mjs").then((n) => n.n);
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-C-EL6dh3.mjs").then((n) => n.t);
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-C-EL6dh3.mjs").then((n) => n.t);
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-7xR185Ly.mjs").then((n) => n.n);
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-C-EL6dh3.mjs").then((n) => n.t);
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-BiM9NtgW.mjs").then((n) => n.l);
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-BiM9NtgW.mjs").then((n) => n.l);
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-0k_vRVsD.mjs").then((n) => n.n);
2992
- const { decodeCursor, encodeCursor } = await import("../../../types-ChxYDRvx.mjs").then((n) => n.a);
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-BiM9NtgW.mjs").then((n) => n.l);
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-BiM9NtgW.mjs").then((n) => n.l);
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-BiM9NtgW.mjs").then((n) => n.l);
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-BiM9NtgW.mjs").then((n) => n.l);
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-CmyIkRG5.mjs").then((n) => n.d);
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-CmyIkRG5.mjs").then((n) => n.d);
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-CmyIkRG5.mjs").then((n) => n.d);
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-CmyIkRG5.mjs").then((n) => n.d);
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-CmyIkRG5.mjs").then((n) => n.d);
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-CmyIkRG5.mjs").then((n) => n.d);
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-CmyIkRG5.mjs").then((n) => n.d);
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-EzADu-dd.mjs").then((n) => n.r);
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-EzADu-dd.mjs").then((n) => n.r);
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
- seoProviderService: new SeoProviderEvidenceService(new ForgewaySeoGatewayClient()),
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
  });