dineway 0.1.4 → 0.1.6

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 (193) hide show
  1. package/README.md +6 -3
  2. package/dist/{apply-CAPvMfoU.mjs → apply-iVSqz2qs.mjs} +132 -39
  3. package/dist/astro/index.d.mts +18 -9
  4. package/dist/astro/index.mjs +238 -16
  5. package/dist/astro/middleware/auth.d.mts +16 -5
  6. package/dist/astro/middleware/auth.mjs +74 -37
  7. package/dist/astro/middleware/redirect.mjs +24 -8
  8. package/dist/astro/middleware/request-context.mjs +18 -5
  9. package/dist/astro/middleware/setup.mjs +1 -1
  10. package/dist/astro/middleware.mjs +411 -169
  11. package/dist/astro/types.d.mts +25 -8
  12. package/dist/{byline-DeWCMU_i.mjs → byline-OhH2dlRu.mjs} +6 -21
  13. package/dist/{bylines-DyqBV9EQ.mjs → bylines-BGpD9_hy.mjs} +16 -6
  14. package/dist/cache-BdSY-gQN.mjs +42 -0
  15. package/dist/chunks--4F8ddV4.mjs +18 -0
  16. package/dist/cli/index.mjs +935 -15
  17. package/dist/client/external-auth-headers.d.mts +1 -1
  18. package/dist/client/index.d.mts +11 -3
  19. package/dist/client/index.mjs +4 -3
  20. package/dist/{connection-C9pxzuag.mjs → connection-BCNICDWN.mjs} +22 -5
  21. package/dist/{content-zSgdNmnt.mjs → content-DWi4d0rT.mjs} +41 -2
  22. package/dist/database/instrumentation.d.mts +34 -0
  23. package/dist/database/instrumentation.mjs +53 -0
  24. package/dist/db/index.d.mts +3 -3
  25. package/dist/db/index.mjs +2 -2
  26. package/dist/db/libsql.d.mts +1 -1
  27. package/dist/db/libsql.mjs +11 -5
  28. package/dist/db/postgres.d.mts +1 -1
  29. package/dist/db/sqlite.d.mts +1 -1
  30. package/dist/db/sqlite.mjs +7 -1
  31. package/dist/db-errors-CEqD7qH9.mjs +23 -0
  32. package/dist/{default-WYlzADZL.mjs → default-VjJyuuG9.mjs} +2 -0
  33. package/dist/{dialect-helpers-B9uSp2GJ.mjs → dialect-helpers-DhTzaUxP.mjs} +3 -0
  34. package/dist/{error-DrxtnGPg.mjs → error-BmL6QipT.mjs} +7 -3
  35. package/dist/{index-C-jx21qs.d.mts → index-yvc6E_17.d.mts} +157 -30
  36. package/dist/index.d.mts +11 -11
  37. package/dist/index.mjs +24 -22
  38. package/dist/{loader-qKmo0wAY.mjs → loader-sMG4TZ-u.mjs} +9 -3
  39. package/dist/media/index.d.mts +1 -1
  40. package/dist/media/index.mjs +1 -1
  41. package/dist/media/local-runtime.d.mts +7 -7
  42. package/dist/page/index.d.mts +10 -2
  43. package/dist/page/index.mjs +22 -1
  44. package/dist/patterns-CrCYkMBb.mjs +92 -0
  45. package/dist/{placeholder-bOx1xCTY.d.mts → placeholder--wOi4TbO.d.mts} +1 -1
  46. package/dist/{placeholder-B3knXwNc.mjs → placeholder-Cp8g5Emj.mjs} +1 -1
  47. package/dist/plugins/adapt-sandbox-entry.d.mts +5 -5
  48. package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
  49. package/dist/{query-BiaPl_g2.mjs → query-kDmwCsHh.mjs} +118 -50
  50. package/dist/{redirect-JPqLAbxa.mjs → redirect-DnEWAkVg.mjs} +43 -99
  51. package/dist/{registry-DSd1GWB8.mjs → registry-C0zjeB9P.mjs} +191 -123
  52. package/dist/request-cache-Dk5qPSOx.mjs +66 -0
  53. package/dist/request-context.d.mts +4 -16
  54. package/dist/{runner-B5l1JfOj.d.mts → runner-CFI6B6J2.d.mts} +1 -1
  55. package/dist/{runner-BGUGywgG.mjs → runner-DWZm2KQm.mjs} +589 -137
  56. package/dist/runtime.d.mts +6 -6
  57. package/dist/runtime.mjs +2 -2
  58. package/dist/{search-BNruJHDL.mjs → search-BApX1xhM.mjs} +570 -424
  59. package/dist/seed/index.d.mts +2 -2
  60. package/dist/seed/index.mjs +11 -10
  61. package/dist/seo/index.d.mts +1 -1
  62. package/dist/storage/local.d.mts +1 -1
  63. package/dist/storage/local.mjs +1 -1
  64. package/dist/storage/s3.d.mts +11 -3
  65. package/dist/storage/s3.mjs +78 -15
  66. package/dist/taxonomies-1s5PaS_8.mjs +266 -0
  67. package/dist/transaction-Cn2rjY78.mjs +27 -0
  68. package/dist/{types-BgQeVaPj.d.mts → types-BuMDPy5C.d.mts} +52 -3
  69. package/dist/{types-DuNbGKjF.mjs → types-COeOq9nK.mjs} +6 -1
  70. package/dist/{types-ju-_ORz7.d.mts → types-CWbdtiux.d.mts} +13 -5
  71. package/dist/{types-D38djUXv.d.mts → types-Cj0KMIZV.d.mts} +16 -3
  72. package/dist/{types-DkvMXalq.d.mts → types-DOrVigru.d.mts} +159 -0
  73. package/dist/{validate-CXnRKfJK.mjs → validate-BZ5wnLLp.mjs} +2 -1
  74. package/dist/{validate-DVKJJ-M_.d.mts → validate-IPf8n4Fj.d.mts} +4 -51
  75. package/dist/{validate-CqRJb_xU.mjs → validate-VPnKoIzW.mjs} +10 -10
  76. package/dist/version-hmtC3Cmv.mjs +6 -0
  77. package/package.json +49 -38
  78. package/src/astro/routes/admin.astro +25 -9
  79. package/src/astro/routes/api/admin/api-tokens/[id].ts +4 -0
  80. package/src/astro/routes/api/admin/api-tokens/index.ts +24 -2
  81. package/src/astro/routes/api/admin/briefing.ts +76 -0
  82. package/src/astro/routes/api/admin/bylines/[id]/index.ts +3 -0
  83. package/src/astro/routes/api/admin/bylines/index.ts +2 -0
  84. package/src/astro/routes/api/admin/context/[id]/history.ts +35 -0
  85. package/src/astro/routes/api/admin/context/[id]/index.ts +35 -0
  86. package/src/astro/routes/api/admin/context/[id]/review.ts +57 -0
  87. package/src/astro/routes/api/admin/context/[id]/supersede.ts +58 -0
  88. package/src/astro/routes/api/admin/context/diff.ts +35 -0
  89. package/src/astro/routes/api/admin/context/index.ts +69 -0
  90. package/src/astro/routes/api/admin/context/stale.ts +35 -0
  91. package/src/astro/routes/api/admin/hitl-requests/[id]/index.ts +38 -0
  92. package/src/astro/routes/api/admin/hitl-requests/[id]/resolve.ts +54 -0
  93. package/src/astro/routes/api/admin/hitl-requests/index.ts +38 -0
  94. package/src/astro/routes/api/admin/hooks/exclusive/[hookName].ts +58 -17
  95. package/src/astro/routes/api/admin/oauth-clients/[id].ts +28 -1
  96. package/src/astro/routes/api/admin/oauth-clients/index.ts +25 -1
  97. package/src/astro/routes/api/admin/plugins/[id]/disable.ts +54 -2
  98. package/src/astro/routes/api/admin/plugins/[id]/enable.ts +54 -2
  99. package/src/astro/routes/api/admin/plugins/[id]/uninstall.ts +51 -1
  100. package/src/astro/routes/api/admin/plugins/[id]/update.ts +98 -3
  101. package/src/astro/routes/api/admin/plugins/marketplace/[id]/install.ts +72 -1
  102. package/src/astro/routes/api/admin/review-requests/[id]/index.ts +35 -0
  103. package/src/astro/routes/api/admin/review-requests/[id]/resolve.ts +52 -0
  104. package/src/astro/routes/api/admin/review-requests/index.ts +35 -0
  105. package/src/astro/routes/api/admin/users/[id]/disable.ts +26 -23
  106. package/src/astro/routes/api/admin/users/[id]/index.ts +41 -21
  107. package/src/astro/routes/api/auth/invite/register-options.ts +73 -0
  108. package/src/astro/routes/api/auth/magic-link/send.ts +2 -1
  109. package/src/astro/routes/api/auth/passkey/options.ts +2 -1
  110. package/src/astro/routes/api/auth/passkey/verify.ts +5 -1
  111. package/src/astro/routes/api/auth/signup/request.ts +20 -8
  112. package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +3 -4
  113. package/src/astro/routes/api/content/[collection]/[id]/compare.ts +1 -1
  114. package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +16 -2
  115. package/src/astro/routes/api/content/[collection]/[id]/duplicate.ts +16 -0
  116. package/src/astro/routes/api/content/[collection]/[id]/permanent.ts +9 -0
  117. package/src/astro/routes/api/content/[collection]/[id]/preview-url.ts +1 -1
  118. package/src/astro/routes/api/content/[collection]/[id]/publish.ts +45 -1
  119. package/src/astro/routes/api/content/[collection]/[id]/restore.ts +12 -2
  120. package/src/astro/routes/api/content/[collection]/[id]/revisions.ts +1 -1
  121. package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +24 -0
  122. package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +3 -0
  123. package/src/astro/routes/api/content/[collection]/[id]/translations.ts +20 -0
  124. package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +13 -0
  125. package/src/astro/routes/api/content/[collection]/[id].ts +36 -0
  126. package/src/astro/routes/api/content/[collection]/index.ts +48 -4
  127. package/src/astro/routes/api/content/[collection]/trash.ts +1 -1
  128. package/src/astro/routes/api/health.ts +54 -0
  129. package/src/astro/routes/api/import/wordpress/analyze.ts +2 -10
  130. package/src/astro/routes/api/import/wordpress/execute.ts +40 -6
  131. package/src/astro/routes/api/import/wordpress/prepare.ts +36 -5
  132. package/src/astro/routes/api/import/wordpress/rewrite-urls.ts +33 -1
  133. package/src/astro/routes/api/import/wordpress-plugin/analyze.ts +3 -3
  134. package/src/astro/routes/api/import/wordpress-plugin/execute.ts +57 -15
  135. package/src/astro/routes/api/manifest.ts +13 -1
  136. package/src/astro/routes/api/mcp.ts +1 -0
  137. package/src/astro/routes/api/media/providers/[providerId]/[itemId].ts +7 -2
  138. package/src/astro/routes/api/media/upload-url.ts +11 -2
  139. package/src/astro/routes/api/media.ts +9 -7
  140. package/src/astro/routes/api/menus/[name]/items.ts +124 -5
  141. package/src/astro/routes/api/menus/[name]/reorder.ts +47 -1
  142. package/src/astro/routes/api/menus/[name].ts +84 -4
  143. package/src/astro/routes/api/menus/index.ts +46 -2
  144. package/src/astro/routes/api/oauth/authorize.ts +21 -8
  145. package/src/astro/routes/api/oauth/device/code.ts +2 -1
  146. package/src/astro/routes/api/oauth/device/token.ts +2 -1
  147. package/src/astro/routes/api/oauth/register.ts +182 -0
  148. package/src/astro/routes/api/oauth/token.ts +18 -7
  149. package/src/astro/routes/api/openapi.json.ts +3 -2
  150. package/src/astro/routes/api/plugins/[pluginId]/[...path].ts +21 -4
  151. package/src/astro/routes/api/redirects/[id].ts +103 -4
  152. package/src/astro/routes/api/redirects/index.ts +50 -2
  153. package/src/astro/routes/api/schema/collections/[slug]/fields/[fieldSlug].ts +28 -0
  154. package/src/astro/routes/api/schema/collections/[slug]/fields/index.ts +15 -0
  155. package/src/astro/routes/api/schema/collections/[slug]/fields/reorder.ts +13 -0
  156. package/src/astro/routes/api/schema/collections/[slug]/index.ts +27 -0
  157. package/src/astro/routes/api/schema/collections/index.ts +14 -0
  158. package/src/astro/routes/api/search/index.ts +1 -0
  159. package/src/astro/routes/api/search/suggest.ts +1 -0
  160. package/src/astro/routes/api/sections/[slug].ts +123 -4
  161. package/src/astro/routes/api/sections/index.ts +57 -2
  162. package/src/astro/routes/api/settings.ts +51 -2
  163. package/src/astro/routes/api/setup/admin-verify.ts +25 -5
  164. package/src/astro/routes/api/setup/admin.ts +16 -8
  165. package/src/astro/routes/api/setup/index.ts +3 -2
  166. package/src/astro/routes/api/taxonomies/[name]/terms/[slug].ts +141 -4
  167. package/src/astro/routes/api/taxonomies/[name]/terms/index.ts +64 -2
  168. package/src/astro/routes/api/taxonomies/index.ts +57 -2
  169. package/src/astro/routes/api/well-known/auth.ts +3 -1
  170. package/src/astro/routes/api/well-known/oauth-authorization-server.ts +8 -5
  171. package/src/astro/routes/api/well-known/oauth-protected-resource.ts +3 -2
  172. package/src/astro/routes/api/widget-areas/[name]/reorder.ts +58 -16
  173. package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +124 -38
  174. package/src/astro/routes/api/widget-areas/[name]/widgets.ts +66 -20
  175. package/src/astro/routes/api/widget-areas/[name].ts +55 -7
  176. package/src/astro/routes/api/widget-areas/index.ts +56 -6
  177. package/src/components/DinewayHead.astro +15 -7
  178. package/src/components/DinewayMedia.astro +1 -1
  179. package/src/components/InlinePortableTextEditor.tsx +1 -1
  180. package/src/components/Table.astro +68 -41
  181. package/src/components/index.ts +2 -12
  182. package/src/components/marks.ts +19 -0
  183. package/LICENSE +0 -9
  184. /package/dist/{adapters-BlzWJG82.d.mts → adapters-C2ypTrZZ.d.mts} +0 -0
  185. /package/dist/{config-Cq8H0SfX.mjs → config-BXwuX8Bx.mjs} +0 -0
  186. /package/dist/{load-C6FCD1FU.mjs → load-Coc9HpHH.mjs} +0 -0
  187. /package/dist/{manifest-schema-CTSEyIJ3.mjs → manifest-schema-D1MSVnoI.mjs} +0 -0
  188. /package/dist/{mode-BlyYtIFO.mjs → mode-47goXBBK.mjs} +0 -0
  189. /package/dist/{tokens-4vgYuXsZ.mjs → tokens-CJz9ubV6.mjs} +0 -0
  190. /package/dist/{transport-C5FYnid7.mjs → transport-DB5eDN4x.mjs} +0 -0
  191. /package/dist/{transport-gIL-e43D.d.mts → transport-Wge_IzKl.d.mts} +0 -0
  192. /package/dist/{types-CLLdsG3g.d.mts → types-BzcUjoqg.d.mts} +0 -0
  193. /package/dist/{types-DShnjzb6.mjs → types-griIBQOQ.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import { u as FieldType } from "./types-BgQeVaPj.mjs";
1
+ import { m as FieldType } from "./types-BuMDPy5C.mjs";
2
2
  import { z } from "astro/zod";
3
3
  import { JSX } from "astro/jsx-runtime";
4
4
 
@@ -239,6 +239,8 @@ interface ContentItemSeoInput {
239
239
  interface ContentItem {
240
240
  id: string;
241
241
  type: string;
242
+ slug: string | null;
243
+ status: string;
242
244
  data: Record<string, unknown>;
243
245
  /**
244
246
  * SEO metadata, populated when the collection has SEO enabled
@@ -247,11 +249,21 @@ interface ContentItem {
247
249
  seo?: ContentItemSeo;
248
250
  createdAt: string;
249
251
  updatedAt: string;
252
+ publishedAt: string | null;
253
+ locale: string | null;
254
+ }
255
+ /**
256
+ * Content filters supported by the plugin content API.
257
+ */
258
+ interface ContentListWhere {
259
+ status?: string;
260
+ locale?: string;
250
261
  }
251
262
  /**
252
263
  * Content list options
253
264
  */
254
265
  interface ContentListOptions {
266
+ where?: ContentListWhere;
255
267
  limit?: number;
256
268
  cursor?: string;
257
269
  orderBy?: Record<string, "asc" | "desc">;
@@ -666,6 +678,7 @@ interface ContentHookEvent {
666
678
  interface ContentDeleteEvent {
667
679
  id: string;
668
680
  collection: string;
681
+ permanent: boolean;
669
682
  }
670
683
  /**
671
684
  * Content publish state change hook event (fired after publish or unpublish)
@@ -790,7 +803,7 @@ interface PageMetadataEvent {
790
803
  * link tags with these rel values. Adding "stylesheet", "prefetch", "prerender"
791
804
  * etc. would allow sandboxed plugins to inject external resources.
792
805
  */
793
- type PageMetadataLinkRel = "canonical" | "alternate" | "author" | "license" | "site.standard.document";
806
+ type PageMetadataLinkRel = "canonical" | "alternate" | "author" | "license" | "nlweb" | "site.standard.document";
794
807
  type PageMetadataContribution = {
795
808
  kind: "meta";
796
809
  name: string;
@@ -1193,4 +1206,4 @@ interface PluginManifest {
1193
1206
  admin: PluginAdminConfig;
1194
1207
  }
1195
1208
  //#endregion
1196
- export { StandardPluginDefinition as $, PageMetadataHandler as A, PluginManifest as B, MediaUploadEvent as C, PageFragmentHandler as D, PageFragmentEvent as E, PluginAdminPage as F, PublicPageContext as G, PluginStorageConfig as H, PluginCapability as I, ResolvedPlugin as J, RequestMeta as K, PluginContext as L, PagePlacement as M, PluginAdminConfig as N, PageMetadataContribution as O, PluginAdminExports as P, StandardHookHandler as Q, PluginDefinition as R, MediaItem as S, PageFragmentContribution as T, PortableTextBlockConfig as U, PluginRoute as V, PortableTextBlockField as W, RouteContext as X, ResolvedPluginHooks as Y, StandardHookEntry as Z, HookName as _, CommentAfterModerateEvent as a, Element as at, LogAccess as b, CommentBeforeCreateHandler as c, ContentAccess as d, StandardRouteEntry as et, ContentHookEvent as f, HookConfig as g, FieldWidgetConfig as h, CommentAfterCreateHandler as i, isStandardPluginDefinition as it, PageMetadataLinkRel as j, PageMetadataEvent as k, CommentModerateEvent as l, EmailMessage as m, CollectionCommentSettings as n, StorageCollection as nt, CommentAfterModerateHandler as o, CronEvent as p, ResolvedHook as q, CommentAfterCreateEvent as r, StoredComment as rt, CommentBeforeCreateEvent as s, BreadcrumbItem as t, StandardRouteHandler as tt, CommentModerateHandler as u, HttpAccess as v, ModerationDecision as w, MediaAccess as x, KVAccess as y, PluginHooks as z };
1209
+ export { StandardHookEntry as $, PageMetadataContribution as A, PluginDefinition as B, MediaAccess as C, PageFragmentContribution as D, ModerationDecision as E, PluginAdminConfig as F, PortableTextBlockConfig as G, PluginManifest as H, PluginAdminExports as I, RequestMeta as J, PortableTextBlockField as K, PluginAdminPage as L, PageMetadataHandler as M, PageMetadataLinkRel as N, PageFragmentEvent as O, PagePlacement as P, RouteContext as Q, PluginCapability as R, LogAccess as S, MediaUploadEvent as T, PluginRoute as U, PluginHooks as V, PluginStorageConfig as W, ResolvedPlugin as X, ResolvedHook as Y, ResolvedPluginHooks as Z, FieldWidgetConfig as _, CommentAfterModerateEvent as a, StoredComment as at, HttpAccess as b, CommentBeforeCreateHandler as c, ContentAccess as d, StandardHookHandler as et, ContentDeleteEvent as f, EmailMessage as g, CronEvent as h, CommentAfterCreateHandler as i, StorageCollection as it, PageMetadataEvent as j, PageFragmentHandler as k, CommentModerateEvent as l, ContentPublishStateChangeEvent as m, CollectionCommentSettings as n, StandardRouteEntry as nt, CommentAfterModerateHandler as o, isStandardPluginDefinition as ot, ContentHookEvent as p, PublicPageContext as q, CommentAfterCreateEvent as r, StandardRouteHandler as rt, CommentBeforeCreateEvent as s, Element as st, BreadcrumbItem as t, StandardPluginDefinition as tt, CommentModerateHandler as u, HookConfig as v, MediaItem as w, KVAccess as x, HookName as y, PluginContext as z };
@@ -170,6 +170,155 @@ interface AuditLogTable {
170
170
  details: string | null;
171
171
  status: string | null;
172
172
  }
173
+ interface SiteActivityLogTable {
174
+ id: string;
175
+ actor_type: "user" | "api_token" | "system";
176
+ actor_id: string;
177
+ auth_metadata: string | null;
178
+ action_type: string;
179
+ subject_type: string;
180
+ subject_id: string | null;
181
+ related_subject_type: string | null;
182
+ related_subject_id: string | null;
183
+ source_type: "api_route" | "mcp_tool" | "system" | "plugin" | "unknown" | null;
184
+ source_name: string | null;
185
+ result_status: Generated<"succeeded" | "pending" | "failed" | "blocked">;
186
+ scope: string;
187
+ summary: string;
188
+ detail: string | null;
189
+ created_at: Generated<string>;
190
+ }
191
+ interface ContextEntryTable {
192
+ id: string;
193
+ scope: string;
194
+ context_type: string;
195
+ title: string;
196
+ body: string;
197
+ policy_key: string | null;
198
+ source_activity_id: string | null;
199
+ created_by_actor_type: "user" | "api_token" | "system";
200
+ created_by_actor_id: string;
201
+ created_auth_metadata: string | null;
202
+ supersedes_id: string | null;
203
+ version: number;
204
+ is_current: Generated<number>;
205
+ valid_until: string | null;
206
+ reviewed_at: string | null;
207
+ reviewed_by_actor_type: "user" | "api_token" | "system" | null;
208
+ reviewed_by_actor_id: string | null;
209
+ review_note: string | null;
210
+ created_at: Generated<string>;
211
+ updated_at: Generated<string>;
212
+ }
213
+ interface ContextTagTable {
214
+ context_entry_id: string;
215
+ tag: string;
216
+ }
217
+ interface ReviewRequestTable {
218
+ id: string;
219
+ status: Generated<"pending" | "approved" | "rejected">;
220
+ collection: string;
221
+ entry_id: string;
222
+ scope: string;
223
+ live_revision_id: string | null;
224
+ draft_revision_id: string | null;
225
+ reviewed_rev: string;
226
+ action_type: string;
227
+ action_hash: string;
228
+ risk_reason: string | null;
229
+ review_payload: string;
230
+ requested_by_actor_type: "user" | "api_token" | "system";
231
+ requested_by_actor_id: string;
232
+ requested_auth_metadata: string | null;
233
+ resolved_by_actor_type: "user" | "api_token" | "system" | null;
234
+ resolved_by_actor_id: string | null;
235
+ resolved_auth_metadata: string | null;
236
+ review_note: string | null;
237
+ created_at: Generated<string>;
238
+ updated_at: Generated<string>;
239
+ resolved_at: string | null;
240
+ }
241
+ interface EntityAliasTable {
242
+ id: string;
243
+ entity_type: string;
244
+ collection_slug: string | null;
245
+ entity_id: string;
246
+ alias: string;
247
+ normalized_alias: string;
248
+ created_at: Generated<string>;
249
+ }
250
+ interface HandoffSnapshotTable {
251
+ id: string;
252
+ scope: string;
253
+ actor_type: "user" | "api_token" | "system";
254
+ actor_id: string;
255
+ auth_metadata: string | null;
256
+ objective: string;
257
+ reasoning: string;
258
+ key_findings: string;
259
+ touched_objects: string;
260
+ pending_actions: string;
261
+ tool_evidence: string;
262
+ confidence: number | null;
263
+ handoff_kind: "pause" | "review_request" | "assignment";
264
+ reference_type: "review_request" | "assignment" | null;
265
+ reference_id: string | null;
266
+ created_at: Generated<string>;
267
+ resumed_at: string | null;
268
+ }
269
+ interface AssignmentTable {
270
+ id: string;
271
+ scope: string;
272
+ assignment_type: string;
273
+ status: Generated<"pending" | "accepted" | "in_progress" | "blocked" | "completed" | "declined" | "cancelled">;
274
+ priority: Generated<"low" | "normal" | "high" | "urgent">;
275
+ title: string;
276
+ summary: string | null;
277
+ details: string | null;
278
+ assigned_by_actor_type: "user" | "api_token" | "system";
279
+ assigned_by_actor_id: string;
280
+ assigned_to_actor_type: "user" | "api_token" | "system" | null;
281
+ assigned_to_actor_id: string | null;
282
+ metadata: string;
283
+ related_handoff_snapshot_id: string | null;
284
+ related_hitl_request_id: string | null;
285
+ due_at: string | null;
286
+ created_at: Generated<string>;
287
+ updated_at: Generated<string>;
288
+ accepted_at: string | null;
289
+ started_at: string | null;
290
+ blocked_at: string | null;
291
+ completed_at: string | null;
292
+ declined_at: string | null;
293
+ cancelled_at: string | null;
294
+ }
295
+ interface HitlRequestTable {
296
+ id: string;
297
+ scope: string;
298
+ action_type: string;
299
+ status: Generated<"pending" | "approved" | "rejected">;
300
+ priority: Generated<"low" | "normal" | "high" | "urgent">;
301
+ title: string;
302
+ summary: string | null;
303
+ risk_reason: string;
304
+ review_payload: string;
305
+ target_ref_type: string;
306
+ target_ref_id: string;
307
+ requested_by_actor_type: "user" | "api_token" | "system";
308
+ requested_by_actor_id: string;
309
+ requested_auth_metadata: string | null;
310
+ resolved_by_actor_type: "user" | "api_token" | "system" | null;
311
+ resolved_by_actor_id: string | null;
312
+ resolved_auth_metadata: string | null;
313
+ review_note: string | null;
314
+ metadata: string;
315
+ related_assignment_id: string | null;
316
+ related_handoff_snapshot_id: string | null;
317
+ sla_due_at: string | null;
318
+ created_at: Generated<string>;
319
+ updated_at: Generated<string>;
320
+ resolved_at: string | null;
321
+ }
173
322
  interface MigrationTable {
174
323
  name: string;
175
324
  timestamp: string;
@@ -348,6 +497,14 @@ interface Database {
348
497
  auth_challenges: AuthChallengeTable;
349
498
  options: OptionTable;
350
499
  audit_logs: AuditLogTable;
500
+ _dineway_activity_log: SiteActivityLogTable;
501
+ _dineway_context_entries: ContextEntryTable;
502
+ _dineway_context_tags: ContextTagTable;
503
+ _dineway_review_requests: ReviewRequestTable;
504
+ _dineway_entity_aliases: EntityAliasTable;
505
+ _dineway_handoff_snapshots: HandoffSnapshotTable;
506
+ _dineway_assignments: AssignmentTable;
507
+ _dineway_hitl_requests: HitlRequestTable;
351
508
  _dineway_migrations: MigrationTable;
352
509
  _dineway_collections: CollectionTable;
353
510
  _dineway_fields: FieldTable;
@@ -393,6 +550,8 @@ interface NotFoundLogTable {
393
550
  referrer: string | null;
394
551
  user_agent: string | null;
395
552
  ip: string | null;
553
+ hits: number;
554
+ last_seen_at: string | null;
396
555
  created_at: string;
397
556
  }
398
557
  interface BylineTable {
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./chunk-ClPoSABd.mjs";
2
- import { t as FIELD_TYPES } from "./types-DuNbGKjF.mjs";
2
+ import { t as FIELD_TYPES } from "./types-COeOq9nK.mjs";
3
3
 
4
4
  //#region src/seed/validate.ts
5
5
  /**
@@ -59,6 +59,7 @@ function validateSeed(data) {
59
59
  collectionSlugs.add(collection.slug);
60
60
  }
61
61
  if (!collection.label) errors.push(`${prefix}: label is required`);
62
+ if (collection.urlPattern && !collection.urlPattern.includes("{slug}")) errors.push(`${prefix}.urlPattern: must include a {slug} placeholder`);
62
63
  if (!Array.isArray(collection.fields)) errors.push(`${prefix}.fields: must be an array`);
63
64
  else {
64
65
  const fieldSlugs = /* @__PURE__ */ new Set();
@@ -1,55 +1,8 @@
1
- import { t as Database } from "./types-DkvMXalq.mjs";
2
- import { u as FieldType } from "./types-BgQeVaPj.mjs";
3
- import { d as Storage } from "./types-ju-_ORz7.mjs";
1
+ import { t as Database } from "./types-DOrVigru.mjs";
2
+ import { i as SiteSettings, m as FieldType } from "./types-BuMDPy5C.mjs";
3
+ import { d as Storage } from "./types-CWbdtiux.mjs";
4
4
  import { Kysely } from "kysely";
5
5
 
6
- //#region src/settings/types.d.ts
7
- /**
8
- * Site Settings Types
9
- *
10
- * Global configuration for the site (title, logo, social links, etc.)
11
- */
12
- /** Media reference for logo/favicon */
13
- interface MediaReference {
14
- mediaId: string;
15
- alt?: string;
16
- }
17
- /** Site-level SEO settings */
18
- interface SeoSettings {
19
- /** Separator between page title and site title (e.g., " | ", " — ") */
20
- titleSeparator?: string;
21
- /** Default OG image when content has no seo_image */
22
- defaultOgImage?: MediaReference;
23
- /** Custom robots.txt content. If unset, a default is generated. */
24
- robotsTxt?: string;
25
- /** Google Search Console verification meta tag content */
26
- googleVerification?: string;
27
- /** Bing Webmaster Tools verification meta tag content */
28
- bingVerification?: string;
29
- }
30
- /** Site settings schema */
31
- interface SiteSettings {
32
- title: string;
33
- tagline?: string;
34
- logo?: MediaReference;
35
- favicon?: MediaReference;
36
- url?: string;
37
- postsPerPage: number;
38
- dateFormat: string;
39
- timezone: string;
40
- social?: {
41
- twitter?: string;
42
- github?: string;
43
- facebook?: string;
44
- instagram?: string;
45
- linkedin?: string;
46
- youtube?: string;
47
- };
48
- seo?: SeoSettings;
49
- }
50
- /** Keys that are valid site settings */
51
- type SiteSettingKey = keyof SiteSettings;
52
- //#endregion
53
6
  //#region src/seed/types.d.ts
54
7
  /**
55
8
  * Root seed file structure
@@ -374,4 +327,4 @@ declare function loadUserSeed(): Promise<SeedFile | null>;
374
327
  */
375
328
  declare function validateSeed(data: unknown): ValidationResult;
376
329
  //#endregion
377
- export { SiteSettingKey as C, SeoSettings as S, SeedTaxonomyTerm as _, applySeed as a, ValidationResult as b, SeedCollection as c, SeedFile as d, SeedMenu as f, SeedTaxonomy as g, SeedSection as h, defaultSeed as i, SeedContentEntry as l, SeedRedirect as m, loadSeed as n, SeedApplyOptions as o, SeedMenuItem as p, loadUserSeed as r, SeedApplyResult as s, validateSeed as t, SeedField as u, SeedWidget as v, SiteSettings as w, MediaReference as x, SeedWidgetArea as y };
330
+ export { SeedTaxonomyTerm as _, applySeed as a, ValidationResult as b, SeedCollection as c, SeedFile as d, SeedMenu as f, SeedTaxonomy as g, SeedSection as h, defaultSeed as i, SeedContentEntry as l, SeedRedirect as m, loadSeed as n, SeedApplyOptions as o, SeedMenuItem as p, loadUserSeed as r, SeedApplyResult as s, validateSeed as t, SeedField as u, SeedWidget as v, SeedWidgetArea as y };
@@ -61,16 +61,6 @@ function validateIdentifier(value, label = "identifier") {
61
61
  if (!IDENTIFIER_PATTERN.test(value)) throw new IdentifierError(`${label} must match /^[a-z][a-z0-9_]*$/ (got "${value}")`, value);
62
62
  }
63
63
  /**
64
- * Validate that a string is a safe SQL identifier, allowing hyphens.
65
- *
66
- * Like `validateIdentifier` but also permits hyphens, which appear in
67
- * plugin IDs (e.g., "my-plugin"). Matches `/^[a-z][a-z0-9_-]*$/`.
68
- *
69
- * @param value - The string to validate
70
- * @param label - Human-readable label for error messages
71
- * @throws {IdentifierError} If the value is not valid
72
- */
73
- /**
74
64
  * Validate that a string is a safe JSON field name for use in json_extract paths.
75
65
  *
76
66
  * More permissive than `validateIdentifier` — allows camelCase (mixed case)
@@ -86,6 +76,16 @@ function validateJsonFieldName(value, label = "JSON field name") {
86
76
  if (value.length > MAX_IDENTIFIER_LENGTH) throw new IdentifierError(`${label} must be ${MAX_IDENTIFIER_LENGTH} characters or less, got ${value.length}`, value);
87
77
  if (!GENERIC_IDENTIFIER_PATTERN.test(value)) throw new IdentifierError(`${label} must match /^[a-zA-Z][a-zA-Z0-9_]*$/ (got "${value}")`, value);
88
78
  }
79
+ /**
80
+ * Validate that a string is a safe SQL identifier, allowing hyphens.
81
+ *
82
+ * Like `validateIdentifier` but also permits hyphens, which appear in
83
+ * plugin IDs (e.g., "my-plugin"). Matches `/^[a-z][a-z0-9_-]*$/`.
84
+ *
85
+ * @param value - The string to validate
86
+ * @param label - Human-readable label for error messages
87
+ * @throws {IdentifierError} If the value is not valid
88
+ */
89
89
  function validatePluginIdentifier(value, label = "plugin identifier") {
90
90
  if (!value || typeof value !== "string") throw new IdentifierError(`${label} must be a non-empty string`, String(value));
91
91
  if (value.length > MAX_IDENTIFIER_LENGTH) throw new IdentifierError(`${label} must be ${MAX_IDENTIFIER_LENGTH} characters or less, got ${value.length}`, value);
@@ -0,0 +1,6 @@
1
+ //#region src/version.ts
2
+ const VERSION = "0.1.6";
3
+ const COMMIT = "e16302a0";
4
+
5
+ //#endregion
6
+ export { VERSION as n, COMMIT as t };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dineway",
3
- "version": "0.1.4",
4
- "description": "Agentic Web builder with WordPress migration support",
3
+ "version": "0.1.6",
4
+ "description": "Agentic Website builder for restaurants structured content meets AI via the Model Context Protocol",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
7
7
  "types": "dist/index.d.mts",
@@ -87,6 +87,10 @@
87
87
  "types": "./dist/request-context.d.mts",
88
88
  "default": "./dist/request-context.mjs"
89
89
  },
90
+ "./database/instrumentation": {
91
+ "types": "./dist/database/instrumentation.d.mts",
92
+ "default": "./dist/database/instrumentation.mjs"
93
+ },
90
94
  "./seed": {
91
95
  "types": "./dist/seed/index.d.mts",
92
96
  "default": "./dist/seed/index.mjs"
@@ -128,8 +132,11 @@
128
132
  "#api/*": "./src/api/*",
129
133
  "#db/*": "./src/database/*",
130
134
  "#auth/*": "./src/auth/*",
135
+ "#bylines/*": "./src/bylines/*",
136
+ "#taxonomies/*": "./src/taxonomies/*",
131
137
  "#schema/*": "./src/schema/*",
132
138
  "#search/*": "./src/search/*",
139
+ "#redirects/*": "./src/redirects/*",
133
140
  "#sections/*": "./src/sections/*",
134
141
  "#menus/*": "./src/menus/*",
135
142
  "#widgets/*": "./src/widgets/*",
@@ -143,6 +150,7 @@
143
150
  "#media/*": "./src/media/*",
144
151
  "#mcp/*": "./src/mcp/*",
145
152
  "#comments/*": "./src/comments/*",
153
+ "#site-context/*": "./src/site-context/*",
146
154
  "#types": "./src/astro/types.js"
147
155
  },
148
156
  "typesVersions": {
@@ -227,25 +235,38 @@
227
235
  ]
228
236
  }
229
237
  },
238
+ "scripts": {
239
+ "build": "tsdown",
240
+ "dev": "tsdown --watch",
241
+ "prepublishOnly": "node --run build",
242
+ "typecheck": "tsgo --noEmit",
243
+ "check": "publint && attw --pack --ignore-rules=cjs-resolves-to-esm --ignore-rules=no-resolution --ignore-rules=internal-resolution-error",
244
+ "test": "vitest",
245
+ "test:smoke": "vitest run --config vitest.smoke.config.ts",
246
+ "test:integration": "vitest run --config vitest.integration.config.ts"
247
+ },
230
248
  "dependencies": {
249
+ "@dineway-ai/admin": "workspace:*",
250
+ "@dineway-ai/auth": "workspace:*",
251
+ "@dineway-ai/gutenberg-to-portable-text": "workspace:*",
231
252
  "@floating-ui/react": "^0.27.16",
232
253
  "@modelcontextprotocol/sdk": "^1.26.0",
233
254
  "@portabletext/toolkit": "^5.0.1",
234
- "@tiptap/core": "^3.20.0",
235
- "@tiptap/extension-focus": "^3.20.0",
236
- "@tiptap/extension-image": "^3.20.0",
237
- "@tiptap/extension-link": "^3.20.0",
238
- "@tiptap/extension-placeholder": "^3.20.0",
239
- "@tiptap/extension-text-align": "^3.20.0",
240
- "@tiptap/extension-typography": "^3.20.0",
241
- "@tiptap/extension-underline": "^3.20.0",
242
- "@tiptap/react": "^3.20.0",
243
- "@tiptap/starter-kit": "^3.20.0",
244
- "@tiptap/suggestion": "^3.20.0",
255
+ "@tiptap/core": "catalog:",
256
+ "@tiptap/extension-focus": "catalog:",
257
+ "@tiptap/extension-image": "catalog:",
258
+ "@tiptap/extension-link": "catalog:",
259
+ "@tiptap/extension-placeholder": "catalog:",
260
+ "@tiptap/extension-text-align": "catalog:",
261
+ "@tiptap/extension-typography": "catalog:",
262
+ "@tiptap/extension-underline": "catalog:",
263
+ "@tiptap/react": "catalog:",
264
+ "@tiptap/starter-kit": "catalog:",
265
+ "@tiptap/suggestion": "catalog:",
245
266
  "@unpic/placeholder": "^0.1.2",
246
267
  "arctic": "^3.7.0",
247
268
  "astro-portabletext": "^0.11.0",
248
- "better-sqlite3": "^12.8.0",
269
+ "better-sqlite3": "catalog:",
249
270
  "blurhash": "^2.0.5",
250
271
  "citty": "^0.1.6",
251
272
  "consola": "^3.4.2",
@@ -261,10 +282,7 @@
261
282
  "sax": "^1.4.1",
262
283
  "ulidx": "^2.4.1",
263
284
  "upng-js": "^2.1.0",
264
- "zod": "^4.3.5",
265
- "@dineway-ai/auth": "0.1.3",
266
- "@dineway-ai/admin": "0.1.3",
267
- "@dineway-ai/gutenberg-to-portable-text": "0.1.3"
285
+ "zod": "^4.3.5"
268
286
  },
269
287
  "optionalDependencies": {
270
288
  "@libsql/kysely-libsql": "^0.4.0",
@@ -280,7 +298,8 @@
280
298
  },
281
299
  "devDependencies": {
282
300
  "@apidevtools/swagger-parser": "^12.1.0",
283
- "@arethetypeswrong/cli": "^0.18.2",
301
+ "@arethetypeswrong/cli": "catalog:",
302
+ "@dineway-ai/blocks": "workspace:*",
284
303
  "@rivet-dev/agent-os-common": "^0.0.260331072558",
285
304
  "@rivet-dev/agent-os-core": "^0.1.1",
286
305
  "@types/better-sqlite3": "^7.6.12",
@@ -288,29 +307,21 @@
288
307
  "@types/sanitize-html": "^2.16.0",
289
308
  "@types/sax": "^1.2.7",
290
309
  "@vitest/ui": "^4.0.17",
291
- "publint": "0.3.17",
292
- "tsdown": "0.20.3",
293
- "typescript": "^5.9.3",
310
+ "publint": "catalog:",
311
+ "tsdown": "catalog:",
312
+ "typescript": "catalog:",
294
313
  "vite": "^6.0.0",
295
- "vitest": "^4.0.18",
296
- "zod-openapi": "^5.4.6",
297
- "@dineway-ai/blocks": "0.1.3"
314
+ "vitest": "catalog:",
315
+ "zod-openapi": "^5.4.6"
298
316
  },
299
317
  "keywords": [
300
318
  "astro",
301
- "cms",
319
+ "restaurant",
320
+ "agentic",
321
+ "mcp",
302
322
  "content",
303
- "wordpress"
323
+ "cms"
304
324
  ],
305
325
  "author": "Matt Kane",
306
- "license": "MIT",
307
- "scripts": {
308
- "build": "tsdown",
309
- "dev": "tsdown --watch",
310
- "typecheck": "tsgo --noEmit",
311
- "check": "publint && attw --pack --ignore-rules=cjs-resolves-to-esm --ignore-rules=no-resolution --ignore-rules=internal-resolution-error",
312
- "test": "vitest",
313
- "test:smoke": "vitest run --config vitest.smoke.config.ts",
314
- "test:integration": "vitest run --config vitest.integration.config.ts"
315
- }
316
- }
326
+ "license": "MIT"
327
+ }
@@ -9,24 +9,38 @@ import "@dineway-ai/admin/styles.css";
9
9
  // Use package-qualified import so Astro generates a proper module URL
10
10
  // (relative imports resolve to absolute paths which break client hydration)
11
11
  import AdminWrapper from "dineway/routes/PluginRegistry";
12
+ import { Font } from "astro:assets";
12
13
 
13
14
  export const prerender = false;
14
15
 
15
- import { resolveLocale } from "@dineway-ai/admin/locales";
16
+ import { getLocaleDir, loadMessages, resolveLocale } from "@dineway-ai/admin/locales";
16
17
 
17
18
  const resolvedLocale = resolveLocale(Astro.request);
18
- const { messages } = await import(`@dineway-ai/admin/locales/${resolvedLocale}/messages.mjs`);
19
+ const resolvedDir = getLocaleDir(resolvedLocale);
20
+ const messages = await loadMessages(resolvedLocale);
21
+ const adminConfig = Astro.locals.dineway?.config.admin;
22
+ const pageTitle = adminConfig?.siteName ? `${adminConfig.siteName} Admin` : "Dineway Admin";
23
+ const loadingLabel = adminConfig?.siteName
24
+ ? `Loading ${adminConfig.siteName}...`
25
+ : "Loading Dineway...";
19
26
  ---
20
27
 
21
28
  <!doctype html>
22
- <html lang={resolvedLocale}>
29
+ <html lang={resolvedLocale} dir={resolvedDir}>
23
30
  <head>
24
31
  <meta charset="UTF-8" />
25
32
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
26
- <link rel="icon" href="/favicon.svg" />
27
- <title>Dineway Admin</title>
33
+ <Font cssVariable="--font-dineway" />
34
+ {
35
+ adminConfig?.favicon ? (
36
+ <link rel="icon" href={adminConfig.favicon} />
37
+ ) : (
38
+ <link rel="icon" href="/favicon.svg" />
39
+ )
40
+ }
41
+ <title>{pageTitle}</title>
28
42
  </head>
29
- <body>
43
+ <body class="isolate">
30
44
  <div id="admin-root" class="min-h-screen">
31
45
  <div id="dineway-boot-loader">
32
46
  <style>
@@ -59,10 +73,12 @@ const { messages } = await import(`@dineway-ai/admin/locales/${resolvedLocale}/m
59
73
  }
60
74
  #dineway-boot-loader p {
61
75
  margin-top: 1rem;
62
- font-family:
76
+ font-family: var(
77
+ --font-dineway,
63
78
  system-ui,
64
79
  -apple-system,
65
- sans-serif;
80
+ sans-serif
81
+ );
66
82
  font-size: 0.875rem;
67
83
  color: light-dark(hsl(215.4 16.3% 46.9%), hsl(215 20.2% 65.1%));
68
84
  }
@@ -74,7 +90,7 @@ const { messages } = await import(`@dineway-ai/admin/locales/${resolvedLocale}/m
74
90
  </style>
75
91
  <div class="loader-inner">
76
92
  <div class="spinner"></div>
77
- <p>Loading Dineway...</p>
93
+ <p>{loadingLabel}</p>
78
94
  </div>
79
95
  </div>
80
96
  <AdminWrapper client:only="react" locale={resolvedLocale} messages={messages} />
@@ -7,6 +7,7 @@
7
7
  import { Role } from "@dineway-ai/auth";
8
8
  import type { APIRoute } from "astro";
9
9
 
10
+ import { rejectApiTokenAuthControlWrite } from "#api/auth-control-guard.js";
10
11
  import { apiError, handleError, unwrapResult } from "#api/error.js";
11
12
  import { handleApiTokenRevoke } from "#api/handlers/api-tokens.js";
12
13
 
@@ -26,6 +27,9 @@ export const DELETE: APIRoute = async ({ params, locals }) => {
26
27
  return apiError("FORBIDDEN", "Admin privileges required", 403);
27
28
  }
28
29
 
30
+ const credentialGuard = rejectApiTokenAuthControlWrite(locals, "api_tokens");
31
+ if (credentialGuard) return credentialGuard;
32
+
29
33
  const tokenId = params.id;
30
34
  if (!tokenId) {
31
35
  return apiError("VALIDATION_ERROR", "Token ID is required", 400);
@@ -9,16 +9,22 @@ import { Role } from "@dineway-ai/auth";
9
9
  import type { APIRoute } from "astro";
10
10
  import { z } from "zod";
11
11
 
12
+ import { rejectApiTokenAuthControlWrite } from "#api/auth-control-guard.js";
12
13
  import { apiError, handleError, unwrapResult } from "#api/error.js";
13
14
  import { handleApiTokenCreate, handleApiTokenList } from "#api/handlers/api-tokens.js";
14
15
  import { isParseError, parseBody } from "#api/parse.js";
15
- import { VALID_SCOPES } from "#auth/api-tokens.js";
16
+ import { ALL_VALID_SCOPES } from "#auth/api-tokens.js";
17
+ import {
18
+ experimentalSiteContextWorkflowsEnabled,
19
+ getExperimentalSiteContextWorkflowsDisabledMessage,
20
+ requestedExperimentalSiteContextWorkflowScopes,
21
+ } from "#site-context/experimental-workflows.js";
16
22
 
17
23
  export const prerender = false;
18
24
 
19
25
  const createTokenSchema = z.object({
20
26
  name: z.string().min(1).max(100),
21
- scopes: z.array(z.enum(VALID_SCOPES)).min(1),
27
+ scopes: z.array(z.enum(ALL_VALID_SCOPES)).min(1),
22
28
  expiresAt: z.string().datetime().optional(),
23
29
  });
24
30
 
@@ -56,9 +62,25 @@ export const POST: APIRoute = async ({ request, locals }) => {
56
62
  return apiError("FORBIDDEN", "Admin privileges required", 403);
57
63
  }
58
64
 
65
+ const credentialGuard = rejectApiTokenAuthControlWrite(locals, "api_tokens");
66
+ if (credentialGuard) return credentialGuard;
67
+
59
68
  try {
60
69
  const body = await parseBody(request, createTokenSchema);
61
70
  if (isParseError(body)) return body;
71
+ const requestedWorkflowScopes = requestedExperimentalSiteContextWorkflowScopes(body.scopes);
72
+ if (requestedWorkflowScopes.length > 0 && !experimentalSiteContextWorkflowsEnabled()) {
73
+ return apiError(
74
+ "NOT_IMPLEMENTED",
75
+ getExperimentalSiteContextWorkflowsDisabledMessage(),
76
+ 501,
77
+ {
78
+ status: "workflow_token_scopes_disabled",
79
+ reason: "workflow_token_scopes_disabled",
80
+ scopes: requestedWorkflowScopes,
81
+ },
82
+ );
83
+ }
62
84
 
63
85
  const result = await handleApiTokenCreate(dineway.db, user.id, body);
64
86
  return unwrapResult(result, 201);