better-supabase 0.35.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (520) hide show
  1. package/dist/{adapter-CWzyKepA.js → adapter-ddQ9Hzka.js} +126 -91
  2. package/dist/{agents-DXiOPB3V.d.ts → agents-BwUHtvD6.d.ts} +4 -4
  3. package/dist/{ai-cache-CLiAXCPH.d.ts → ai-cache-CPOP2PYz.d.ts} +4 -4
  4. package/dist/{ai-chat-DlcBdOhJ.d.ts → ai-chat-BZhfCHHr.d.ts} +106 -25
  5. package/dist/{ai-schedules-Drx2KRTn.d.ts → ai-schedules-BZPmySUa.d.ts} +5 -5
  6. package/dist/ai-sdk/agents/index.d.ts +6 -6
  7. package/dist/ai-sdk/batches/index.d.ts +3 -3
  8. package/dist/ai-sdk/cache/index.d.ts +1 -1
  9. package/dist/ai-sdk/chat/index.d.ts +2 -2
  10. package/dist/ai-sdk/chat/index.js +3 -272
  11. package/dist/ai-sdk/embeddings/index.d.ts +2 -2
  12. package/dist/ai-sdk/files/index.d.ts +1 -1
  13. package/dist/ai-sdk/index.d.ts +5 -5
  14. package/dist/ai-sdk/index.js +2 -3
  15. package/dist/ai-sdk/mcp/index.d.ts +3 -3
  16. package/dist/ai-sdk/memory/index.d.ts +3 -3
  17. package/dist/ai-sdk/workflow/index.d.ts +6 -5
  18. package/dist/ai-sdk/workflow/index.js +9 -9
  19. package/dist/{api-myq2e9t5.d.ts → api-XEaCJbgv.d.ts} +5 -5
  20. package/dist/{api-keys-DbIbkGxx.d.ts → api-keys-C82fMru4.d.ts} +4 -4
  21. package/dist/{app-tables-X3yzJljM.d.ts → app-tables-C0XVpQEJ.d.ts} +1 -1
  22. package/dist/{approvals-Da4uAANx.js → approvals-D8gR1R8R.js} +95 -11
  23. package/dist/{approvals-DZoGtNFv.d.ts → approvals-DqCv7f-G.d.ts} +101 -7
  24. package/dist/{assistant-BEbRPjhn.d.ts → assistant-5heV2GeR.d.ts} +7 -3
  25. package/dist/assistant-BHZ6fqBR.js +300 -0
  26. package/dist/astro/index.d.ts +7 -7
  27. package/dist/astro/index.js +5 -5
  28. package/dist/{auth-module-CqXdm8qD.js → auth-module-DkqapRZJ.js} +1 -1
  29. package/dist/{authorization-D1P3VBOd.d.ts → authorization-2Rv1AJQJ.d.ts} +114 -39
  30. package/dist/{authorization-hooks-CxwsRnfV.d.ts → authorization-hooks-C0GfMvFm.d.ts} +8 -2
  31. package/dist/authz-topic-D7fPUY4P.js +13 -0
  32. package/dist/{availability-CebEOfMN.d.ts → availability-CZlcrkqD.d.ts} +49 -8
  33. package/dist/{base64-CVyKHBBw.js → base64-CEBz6-Jj.js} +9 -2
  34. package/dist/better-result/index.d.ts +3 -3
  35. package/dist/{bind-Bvv-Zrdh.d.ts → bind-C2XvMlfg.d.ts} +7 -7
  36. package/dist/{block-env-h_uPl2f_.d.ts → block-env-BQrtLPyc.d.ts} +4 -4
  37. package/dist/{block-helpers-disoUWCp.d.ts → block-helpers-BNtM1tqy.d.ts} +1 -1
  38. package/dist/{block-hooks-DrA_d1dJ.d.ts → block-hooks-CtMsgLQr.d.ts} +2 -2
  39. package/dist/{block-subjects-Br2MQNFn.d.ts → block-subjects-Bkieh2Xk.d.ts} +1 -1
  40. package/dist/{block-tables-pj3eHfoP.d.ts → block-tables-DPOgnT3y.d.ts} +1 -1
  41. package/dist/{block-transport-BEtC_Kis.d.ts → block-transport-CDmOUuLZ.d.ts} +2 -2
  42. package/dist/blocks/access-requests/index.d.ts +5 -5
  43. package/dist/blocks/activities/index.d.ts +9 -9
  44. package/dist/blocks/agents/index.d.ts +4 -4
  45. package/dist/blocks/ai-cache/index.d.ts +3 -3
  46. package/dist/blocks/ai-chat/index.d.ts +8 -8
  47. package/dist/blocks/ai-chat/index.js +80 -20
  48. package/dist/blocks/ai-files/index.d.ts +3 -3
  49. package/dist/blocks/ai-keys/index.d.ts +4 -4
  50. package/dist/blocks/ai-schedules/index.d.ts +3 -3
  51. package/dist/blocks/announcements/index.d.ts +8 -8
  52. package/dist/blocks/api-keys/index.d.ts +3 -3
  53. package/dist/blocks/approvals/index.d.ts +16 -5
  54. package/dist/blocks/approvals/index.js +7 -4
  55. package/dist/blocks/assets/index.d.ts +6 -6
  56. package/dist/blocks/assignment/index.d.ts +7 -7
  57. package/dist/blocks/attachments/index.d.ts +4 -4
  58. package/dist/blocks/audit/index.d.ts +13 -13
  59. package/dist/blocks/audit/index.js +1 -1
  60. package/dist/blocks/automations/index.d.ts +12 -12
  61. package/dist/blocks/billable-time/index.d.ts +6 -6
  62. package/dist/blocks/billing/index.d.ts +9 -9
  63. package/dist/blocks/billing/index.js +1 -1
  64. package/dist/blocks/bookings/index.d.ts +6 -6
  65. package/dist/blocks/bulk/index.d.ts +4 -4
  66. package/dist/blocks/calendar/index.d.ts +46 -8
  67. package/dist/blocks/calendar/index.js +306 -47
  68. package/dist/blocks/catalog/index.d.ts +39 -17
  69. package/dist/blocks/catalog/index.js +35 -15
  70. package/dist/blocks/channels/index.d.ts +7 -7
  71. package/dist/blocks/collections/index.d.ts +6 -6
  72. package/dist/blocks/comments/index.d.ts +10 -10
  73. package/dist/blocks/compliance/index.d.ts +5 -5
  74. package/dist/blocks/connectors/index.d.ts +4 -4
  75. package/dist/blocks/contacts/index.d.ts +6 -6
  76. package/dist/blocks/content/index.d.ts +5 -5
  77. package/dist/blocks/contracts/index.d.ts +6 -6
  78. package/dist/blocks/courses/index.d.ts +5 -5
  79. package/dist/blocks/created-by/index.d.ts +2 -2
  80. package/dist/blocks/custom-fields/index.d.ts +6 -6
  81. package/dist/blocks/data-lifecycle/index.d.ts +8 -8
  82. package/dist/blocks/deals/index.d.ts +6 -6
  83. package/dist/blocks/dispatch/index.d.ts +6 -6
  84. package/dist/blocks/documents/index.d.ts +4 -4
  85. package/dist/blocks/documents/index.js +1 -1
  86. package/dist/blocks/domains/index.d.ts +6 -6
  87. package/dist/blocks/donations/index.d.ts +6 -6
  88. package/dist/blocks/drive/index.d.ts +6 -6
  89. package/dist/blocks/employees/index.d.ts +8 -8
  90. package/dist/blocks/enrichment/index.d.ts +6 -6
  91. package/dist/blocks/enrollments/index.d.ts +74 -9
  92. package/dist/blocks/enrollments/index.js +67 -3
  93. package/dist/blocks/entitlements/index.d.ts +6 -6
  94. package/dist/blocks/expenses/index.d.ts +93 -6
  95. package/dist/blocks/expenses/index.js +95 -4
  96. package/dist/blocks/field-history/index.d.ts +4 -4
  97. package/dist/blocks/flags/index.d.ts +5 -5
  98. package/dist/blocks/forecasts/index.d.ts +6 -6
  99. package/dist/blocks/forms/index.d.ts +6 -6
  100. package/dist/blocks/goals/index.d.ts +4 -4
  101. package/dist/blocks/guests/index.d.ts +6 -6
  102. package/dist/blocks/hiring/index.d.ts +6 -6
  103. package/dist/blocks/identities/index.d.ts +5 -5
  104. package/dist/blocks/imports/index.d.ts +5 -5
  105. package/dist/blocks/inbox/index.d.ts +11 -11
  106. package/dist/blocks/inbox/index.js +56 -1
  107. package/dist/blocks/incidents/index.d.ts +5 -5
  108. package/dist/blocks/index.d.ts +9 -9
  109. package/dist/blocks/inventory/index.d.ts +6 -6
  110. package/dist/blocks/invoices/index.d.ts +26 -10
  111. package/dist/blocks/invoices/index.js +23 -7
  112. package/dist/blocks/knowledge/index.d.ts +4 -4
  113. package/dist/blocks/knowledge/index.js +1 -1
  114. package/dist/blocks/lead-scoring/index.d.ts +7 -7
  115. package/dist/blocks/leases/index.d.ts +6 -6
  116. package/dist/blocks/leave/index.d.ts +88 -15
  117. package/dist/blocks/leave/index.js +65 -14
  118. package/dist/blocks/ledger/index.d.ts +6 -6
  119. package/dist/blocks/mail-sync/index.d.ts +5 -5
  120. package/dist/blocks/memberships/index.d.ts +2 -2
  121. package/dist/blocks/memory/index.d.ts +5 -5
  122. package/dist/blocks/memory/index.js +30 -5
  123. package/dist/blocks/messaging/index.d.ts +11 -11
  124. package/dist/blocks/metrics/index.d.ts +6 -6
  125. package/dist/blocks/mfa/index.d.ts +2 -2
  126. package/dist/blocks/moderation/index.d.ts +6 -6
  127. package/dist/blocks/notifications/index.d.ts +11 -11
  128. package/dist/blocks/notifications/index.js +1 -1
  129. package/dist/blocks/numbering/index.d.ts +4 -4
  130. package/dist/blocks/oauth-server/index.d.ts +5 -5
  131. package/dist/blocks/oauth-server/index.js +1 -1
  132. package/dist/blocks/onboarding/index.d.ts +5 -5
  133. package/dist/blocks/orders/index.d.ts +7 -7
  134. package/dist/blocks/organizations/index.d.ts +8 -8
  135. package/dist/blocks/outbox/index.d.ts +4 -4
  136. package/dist/blocks/outbox/index.js +1 -1
  137. package/dist/blocks/passes/index.d.ts +8 -8
  138. package/dist/blocks/passes/index.js +2 -2
  139. package/dist/blocks/permissions/index.d.ts +7 -7
  140. package/dist/blocks/pipelines/index.d.ts +6 -6
  141. package/dist/blocks/posts/index.d.ts +5 -5
  142. package/dist/blocks/profiles/index.d.ts +4 -4
  143. package/dist/blocks/promotions/index.d.ts +5 -5
  144. package/dist/blocks/push/index.d.ts +7 -7
  145. package/dist/blocks/queue/index.d.ts +6 -6
  146. package/dist/blocks/queue/index.js +2 -2
  147. package/dist/blocks/quotes/index.d.ts +119 -27
  148. package/dist/blocks/quotes/index.js +111 -17
  149. package/dist/blocks/rank/index.d.ts +4 -4
  150. package/dist/blocks/reactions/index.d.ts +9 -9
  151. package/dist/blocks/relations/index.d.ts +7 -7
  152. package/dist/blocks/reminders/index.d.ts +78 -11
  153. package/dist/blocks/reminders/index.js +118 -6
  154. package/dist/blocks/reviews/index.d.ts +5 -5
  155. package/dist/blocks/saved-views/index.d.ts +6 -6
  156. package/dist/blocks/scores/index.d.ts +5 -5
  157. package/dist/blocks/search/index.d.ts +7 -7
  158. package/dist/blocks/security-events/index.d.ts +7 -7
  159. package/dist/blocks/security-events/index.js +1 -1
  160. package/dist/blocks/segments/index.d.ts +7 -7
  161. package/dist/blocks/sequences/index.d.ts +6 -6
  162. package/dist/blocks/service-accounts/index.d.ts +5 -5
  163. package/dist/blocks/sessions/index.d.ts +2 -2
  164. package/dist/blocks/sessions/index.js +1 -1
  165. package/dist/blocks/settings/index.d.ts +6 -6
  166. package/dist/blocks/share-links/index.d.ts +5 -5
  167. package/dist/blocks/shipments/index.d.ts +6 -6
  168. package/dist/blocks/shipments/index.js +1 -1
  169. package/dist/blocks/signatures/index.d.ts +5 -5
  170. package/dist/blocks/signing-keys/index.d.ts +4 -4
  171. package/dist/blocks/signing-keys/index.js +2 -2
  172. package/dist/blocks/sla/index.d.ts +7 -7
  173. package/dist/blocks/sso/index.d.ts +6 -6
  174. package/dist/blocks/state-machine/index.d.ts +27 -7
  175. package/dist/blocks/state-machine/index.js +7 -2
  176. package/dist/blocks/subjects/index.d.ts +6 -6
  177. package/dist/blocks/tags/index.d.ts +6 -6
  178. package/dist/blocks/tasks/index.d.ts +9 -9
  179. package/dist/blocks/teams/index.d.ts +4 -4
  180. package/dist/blocks/templates/index.d.ts +7 -7
  181. package/dist/blocks/time-tracking/index.d.ts +7 -7
  182. package/dist/blocks/timeline/index.d.ts +8 -8
  183. package/dist/blocks/trash/index.d.ts +6 -6
  184. package/dist/blocks/undo/index.d.ts +4 -4
  185. package/dist/blocks/updated-at/index.d.ts +2 -2
  186. package/dist/blocks/usage/index.d.ts +4 -4
  187. package/dist/blocks/vercel-marketplace/index.d.ts +5 -5
  188. package/dist/blocks/vercel-marketplace/index.js +3 -3
  189. package/dist/blocks/versions/index.d.ts +6 -6
  190. package/dist/blocks/waitlist/index.d.ts +5 -5
  191. package/dist/blocks/waitlist/index.js +1 -1
  192. package/dist/blocks/webhooks/index.d.ts +13 -13
  193. package/dist/blocks/webhooks/index.js +5 -5
  194. package/dist/blocks/workflow-editor/index.d.ts +10 -10
  195. package/dist/blocks/workflow-editor/index.js +65 -2
  196. package/dist/blocks/workflows/index.d.ts +7 -7
  197. package/dist/{bookings-Br0VXzaf.d.ts → bookings-Dj5cvXKv.d.ts} +4 -4
  198. package/dist/{bucket-DvG66r5G.d.ts → bucket-CrsJNHzi.d.ts} +1 -1
  199. package/dist/chat-sdk/index.d.ts +6 -6
  200. package/dist/claims/index.d.ts +6 -6
  201. package/dist/claims/index.js +2 -2
  202. package/dist/cli/{add-DzgsOE8V.js → add-D2CH8t_B.js} +2 -2
  203. package/dist/cli/add-De73Ghlh.js +1 -0
  204. package/dist/cli/{add-CYreXA68.js → add-Duf1-19E.js} +16 -14
  205. package/dist/cli/{agent-59XWXsRi.js → agent-Tqq3MAqx.js} +26 -1
  206. package/dist/cli/{app-table-files-BnISa3uY.js → app-table-files-ha8X0rRE.js} +2 -2
  207. package/dist/cli/app-tables-BIyQcsHH.js +42 -0
  208. package/dist/cli/{backfill-BLLTSDSa.js → backfill-CLgA6-ll.js} +3 -3
  209. package/dist/cli/bin.js +1 -1
  210. package/dist/cli/{blocks-uzh1g_0v.js → blocks-9AeouX4h.js} +2 -2
  211. package/dist/cli/{blocks-CpRvI7x8.js → blocks-BVB1fMMj.js} +1 -1
  212. package/dist/cli/{cache-BPWC7tGD.js → cache-aMk9vF1_.js} +1 -1
  213. package/dist/cli/{codemod-CbJVS_kG.js → codemod-B5wrcnF2.js} +113 -4
  214. package/dist/cli/{command-BpZ4AuhR.js → command-DM_x_yzZ.js} +6 -0
  215. package/dist/cli/{completion-DHTT6rjI.js → completion-CusuUJNn.js} +1 -1
  216. package/dist/cli/{completion-B08Q0xB3.js → completion-Cx2UYd-y.js} +2 -2
  217. package/dist/cli/{completion-CwL7e93t.js → completion-DbYb3N8e.js} +2 -2
  218. package/dist/cli/{config-D-Upz3jV.js → config-BeuImpav.js} +1 -1
  219. package/dist/cli/{content-mapper-Cjkm2Sg3.js → content-mapper-CEtdbshU.js} +2 -2
  220. package/dist/cli/{db-Diy1OebO.js → db-CeiQzhPq.js} +2 -2
  221. package/dist/cli/{doctor-D94FEJZs.js → doctor-DaOUWfRN.js} +386 -49
  222. package/dist/cli/env-BfWbheiC.js +1 -0
  223. package/dist/cli/{env-BAJn6wCA.js → env-DVV10l_r.js} +1 -1
  224. package/dist/cli/{gen-Cd0VNDjE.js → gen-BO-2NF-G.js} +14 -14
  225. package/dist/cli/index.d.ts +1 -1
  226. package/dist/cli/index.js +7 -7
  227. package/dist/cli/{init-Co1N9ZoA.js → init-Xit9Hnbb.js} +9 -9
  228. package/dist/cli/{keys-CxajkV_7.js → keys-DJTN2Avl.js} +1 -1
  229. package/dist/cli/{live-NFNeZsP7.js → live-CuMpyRjF.js} +2 -2
  230. package/dist/cli/{mcp-WZ8t7NMz.js → mcp-C7d4j5cq.js} +4 -4
  231. package/dist/cli/{metadata-BzMkmrZR.js → metadata-D2YvkY2D.js} +3 -3
  232. package/dist/cli/{migrate-C9gyDAV7.js → migrate-BCXxyTKt.js} +2 -2
  233. package/dist/cli/{migration-safety-BNi8PIiM.js → migration-safety-DfwTOBQ4.js} +1 -1
  234. package/dist/cli/{migrations-Ds0J_TmZ.js → migrations-nomh4TBo.js} +2 -2
  235. package/dist/cli/{module-migration-hFrlzQZ5.js → module-migration--9T_T-zt.js} +2 -2
  236. package/dist/cli/{moved-BAFPdJz_.js → moved-CT6i1csY.js} +1 -1
  237. package/dist/cli/{parse-BueItuNJ.js → parse-qgJylE_A.js} +1 -1
  238. package/dist/cli/{powersync-oFiwgsBi.js → powersync-DB9WZsIv.js} +4 -4
  239. package/dist/cli/powersync-IBM_v_eJ.js +1 -0
  240. package/dist/cli/{print-BtreoJSm.js → print-S6IF5rZm.js} +2 -2
  241. package/dist/cli/{providers-Be2dgyuR.js → providers-BDTcal71.js} +1 -1
  242. package/dist/cli/{prune-workflows-BPxgRrqY.js → prune-workflows-Zr2DjByi.js} +3 -3
  243. package/dist/cli/{remove-B4ad996E.js → remove-CPX5Tg5s.js} +6 -6
  244. package/dist/cli/{render-C-Mfq-o3.js → render-Bp7a7XQ9.js} +18 -4
  245. package/dist/cli/{run-D2nuyyPo.js → run-BclCFEyP.js} +12 -48
  246. package/dist/cli/{run-dY9uOC3W.js → run-BlVaLnt_.js} +2 -2
  247. package/dist/cli/{run-cLdnJHH0.js → run-kgG50x_Z.js} +44 -43
  248. package/dist/cli/{seed-BpaqqyO8.js → seed-Cn2R91cd.js} +2 -2
  249. package/dist/cli/seed-DGGjReq4.js +1 -0
  250. package/dist/cli/{shared-DCHxLAEL.js → shared-D60W9NS-.js} +1 -1
  251. package/dist/cli/{skills-jZThjL3B.js → skills-DH-yPDny.js} +1 -1
  252. package/dist/cli/{snapshot-CloKPNxv.js → snapshot-C3_eQUgY.js} +2 -2
  253. package/dist/cli/{source-Bwyp18Rj.js → source-Bk6XwIAK.js} +1 -1
  254. package/dist/cli/{spec-DsVq4_qV.js → spec-BDTpcBns.js} +1 -1
  255. package/dist/cli/{spec-DAUF4ybu.js → spec-C8ydQwZC.js} +3 -3
  256. package/dist/cli/{sql-layout-CHpEL0oq.js → sql-layout-DVQ20UMi.js} +2 -2
  257. package/dist/cli/{stack-147NqctC.js → stack-CmhSfY5V.js} +3 -2
  258. package/dist/cli/{sync-DZu1r34s.js → sync-D-WO4Yvl.js} +4 -4
  259. package/dist/cli/{table-D9FbJS8h.js → table-k5OABwy3.js} +1 -1
  260. package/dist/cli/{upgrade-Bpvi70zm.js → upgrade-DGe5Pv6v.js} +5 -5
  261. package/dist/cli/{upgrade-A-BALvp3.js → upgrade-XdhMuHAu.js} +3 -3
  262. package/dist/cli/{version-B59mZJoy.js → version-DKfeme2I.js} +1 -1
  263. package/dist/client/index.d.ts +6 -6
  264. package/dist/client/index.js +1 -1
  265. package/dist/client/native/index.d.ts +5 -5
  266. package/dist/client/native/index.js +2 -2
  267. package/dist/{client-Bky2z09B.js → client-DrejIxsu.js} +1 -1
  268. package/dist/{cloud-event-DXWmXrus.d.ts → cloud-event-BEmAUdl1.d.ts} +1 -1
  269. package/dist/commerce/index.js +1 -1
  270. package/dist/{compiler-qlXlokKn.d.ts → compiler-BOW4yPcW.d.ts} +2 -2
  271. package/dist/{composite-CIxjVcL1.d.ts → composite-B-oAH16L.d.ts} +7 -7
  272. package/dist/{composite-D2JnIiHt.js → composite-BidYZWZY.js} +3 -3
  273. package/dist/config/index.d.ts +3 -3
  274. package/dist/config/index.js +4 -4
  275. package/dist/{config-BZWSFxkG.js → config-BKxjItQ-.js} +3 -3
  276. package/dist/{config-DQP0IvDX.js → config-BrRlSxhx.js} +1 -1
  277. package/dist/{connectors-Cf2LeAuZ.d.ts → connectors-CrLRW4Ol.d.ts} +4 -4
  278. package/dist/{context-CderJRZf.d.ts → context-yfOlyAqb.d.ts} +3 -3
  279. package/dist/contract/index.d.ts +9 -9
  280. package/dist/{controller-DaWA9eWS.d.ts → controller-CAcLEndc.d.ts} +1 -1
  281. package/dist/{conversion-C9rndpEI.d.ts → conversion-s1NtB6S-.d.ts} +1 -1
  282. package/dist/create/index.d.ts +3 -3
  283. package/dist/create/index.js +3 -3
  284. package/dist/create/lite/index.d.ts +4 -4
  285. package/dist/create/lite/index.js +2 -2
  286. package/dist/credentials/index.d.ts +4 -4
  287. package/dist/credentials/index.js +1 -1
  288. package/dist/{cron-route-DSITg1yC.js → cron-route-uTsC2BD0.js} +1 -1
  289. package/dist/{data-engine-CMENsp3d.d.ts → data-engine-CX1oYDZl.d.ts} +1 -1
  290. package/dist/{define-ITQA71fw.d.ts → define-BvkaC3Oh.d.ts} +5 -5
  291. package/dist/{define-B6D55cO0.js → define-Duh2mMYk.js} +1 -1
  292. package/dist/{define-block-COmMkx2x.d.ts → define-block-Ds3aLZwz.d.ts} +12 -12
  293. package/dist/{documents-DeZw83ue.d.ts → documents-Btk0MhC0.d.ts} +3 -3
  294. package/dist/edge/index.d.ts +9 -9
  295. package/dist/edge/index.js +7 -7
  296. package/dist/elysia/index.d.ts +1 -1
  297. package/dist/elysia/index.js +1 -1
  298. package/dist/{embeddings-rVR2AKVz.d.ts → embeddings-CI6P_mtD.d.ts} +1 -1
  299. package/dist/{ended-NC_ZesY4.d.ts → ended-iq2wp8fc.d.ts} +8 -3
  300. package/dist/{entitlements-BefkpQIz.d.ts → entitlements-Dhu-4vlH.d.ts} +2 -2
  301. package/dist/env/index.d.ts +1 -1
  302. package/dist/{messages-CRk1g6oe.js → errors-0Qid9fGz.js} +107 -3
  303. package/dist/eve/index.d.ts +9 -9
  304. package/dist/eve/index.js +3 -3
  305. package/dist/{eve-DIKjuPp5.d.ts → eve-DleYrhwj.d.ts} +2 -2
  306. package/dist/{event-calendar-DUtFyRrv.d.ts → event-calendar-DPMcqy7Q.d.ts} +1 -1
  307. package/dist/events/index.d.ts +3 -3
  308. package/dist/{events-DVt3Z9hw.d.ts → events-DCw3c6pj.d.ts} +1 -1
  309. package/dist/{executor-DqNRrFxx.d.ts → executor-B-o7QMPp.d.ts} +16 -2
  310. package/dist/{executor-CFmee_nV.d.ts → executor-DoSNec_H.d.ts} +1 -1
  311. package/dist/{executor-CHnoKOxk.d.ts → executor-H8ZLkeHj.d.ts} +4 -4
  312. package/dist/{executor-BDMqPbVU.js → executor-RYiR4z47.js} +71 -37
  313. package/dist/expo/index.d.ts +4 -4
  314. package/dist/expo/index.js +7 -7
  315. package/dist/{field-errors-D1meOs_H.d.ts → field-errors-DXZk9Qjt.d.ts} +10 -10
  316. package/dist/{fields-CAVk9dxX.d.ts → fields-CP46SPNE.d.ts} +1 -1
  317. package/dist/{filter-evaluate-Bz3Fzhz2.d.ts → filter-evaluate-Bkbb0nuQ.d.ts} +1 -1
  318. package/dist/{filter-query-DV-x8fio.d.ts → filter-query-Xj40B5KT.d.ts} +1 -1
  319. package/dist/{flags-6emyAXly.d.ts → flags-Cuew4tGx.d.ts} +2 -2
  320. package/dist/flags-sdk/index.d.ts +2 -2
  321. package/dist/{framework-BFlaPuvv.d.ts → framework-Byr_j8G-.d.ts} +8 -8
  322. package/dist/{framework-ChzJYkJW.js → framework-z3KTPRjk.js} +4 -4
  323. package/dist/{gateway-DaekJ_Me.d.ts → gateway-B9k89AC4.d.ts} +3 -3
  324. package/dist/h3/index.d.ts +1 -1
  325. package/dist/h3/index.js +1 -1
  326. package/dist/h3/v1/index.d.ts +1 -1
  327. package/dist/h3/v1/index.js +1 -1
  328. package/dist/hono/index.d.ts +9 -10
  329. package/dist/hono/index.js +8 -8
  330. package/dist/{inbox-DavCzW7b.d.ts → inbox-yGfUVQr2.d.ts} +61 -6
  331. package/dist/{index-Dvpu22CJ.d.ts → index-1uV69AZq.d.ts} +1 -1
  332. package/dist/{index-BbDiBiKt.d.ts → index-6H-8Ib1w.d.ts} +4 -4
  333. package/dist/{index-M1izbwbN.d.ts → index-Ag-T51Jl.d.ts} +1 -1
  334. package/dist/{index-ZQZMQF4l.d.ts → index-BUluRi0b.d.ts} +6 -6
  335. package/dist/{index-BQlLxOj5.d.ts → index-C78VPlXW.d.ts} +1 -1
  336. package/dist/{index-D18su_r5.d.ts → index-CY612vAg.d.ts} +10 -5
  337. package/dist/{index-DXUiRyEk.d.ts → index-CnzGRpeH.d.ts} +5 -5
  338. package/dist/{index-BIAtapnD.d.ts → index-Dbd1E5Au.d.ts} +5 -5
  339. package/dist/{index-ChLuLxy-.d.ts → index-Dv6lfL5p.d.ts} +14 -14
  340. package/dist/{index-8w4OB5En.d.ts → index-F6lsRlsr.d.ts} +1 -1
  341. package/dist/{index-D9aV0Fvx.d.ts → index-kkZwp5M1.d.ts} +6 -6
  342. package/dist/{index-C13UgV67.d.ts → index-lMApFSAd.d.ts} +5 -5
  343. package/dist/index.d.ts +7 -7
  344. package/dist/index.js +1 -1
  345. package/dist/{instances-D9YrkoAy.js → instances-xQ2lupVE.js} +218 -11
  346. package/dist/jwks-cache-CBKtICNV.js +114 -0
  347. package/dist/{jws-B8p0ppgh.js → jws-De9qjIPV.js} +1 -1
  348. package/dist/{kit-9pZP5iLU.js → kit-D5rRAKWJ.js} +2 -2
  349. package/dist/{kit-OgFOW9rX.d.ts → kit-DCuO1ZhB.d.ts} +4 -4
  350. package/dist/{knowledge-DdZzUTQ-.js → knowledge-CJnZOaix.js} +67 -7
  351. package/dist/{knowledge-BBC2sfAY.d.ts → knowledge-DWXAxvkN.d.ts} +82 -11
  352. package/dist/lint/index.d.ts +1 -1
  353. package/dist/list/index.d.ts +3 -3
  354. package/dist/{list-query-C7V8kUaD.d.ts → list-query-D1h3Dmnk.d.ts} +3 -3
  355. package/dist/mapper/bin.js +5 -5
  356. package/dist/mcp/index.d.ts +3 -3
  357. package/dist/mcp/index.js +5 -5
  358. package/dist/mcp/sdk/index.d.ts +6 -6
  359. package/dist/mcp/sdk/index.js +2 -2
  360. package/dist/{messaging-D5z2TR37.d.ts → messaging-Bfe4p9Pm.d.ts} +4 -4
  361. package/dist/{model-messages-BcrkjsPE.js → model-messages-CIHqP7Z3.js} +1 -1
  362. package/dist/nestjs/index.d.ts +2 -2
  363. package/dist/nestjs/index.js +1 -1
  364. package/dist/next/client/index.d.ts +1 -1
  365. package/dist/next/index.d.ts +331 -79
  366. package/dist/next/index.js +520 -105
  367. package/dist/node/index.d.ts +2 -2
  368. package/dist/node/index.js +1 -1
  369. package/dist/{operations-t_hlXkS4.d.ts → operations-SWpzGC_K.d.ts} +1 -1
  370. package/dist/{options-D4dxMGHF.js → options-Bgnm4pTD.js} +1 -0
  371. package/dist/{options-C13-dVMH.js → options-D-jiqb0l.js} +2 -0
  372. package/dist/{options-C9bp3SEA.js → options-DqmTs2nv.js} +2 -1
  373. package/dist/{options-CuPWezcV.js → options-RYbyaVhv.js} +3 -1
  374. package/dist/options-SOjQVgfS.js +37 -0
  375. package/dist/{options-JnPEVbBJ.js → options-ScQ6Hnxo.js} +2 -1
  376. package/dist/{options-CuaWhsQS.js → options-X61tvckX.js} +2 -1
  377. package/dist/orpc/index.d.ts +8 -8
  378. package/dist/orpc/index.js +6 -6
  379. package/dist/otel/index.d.ts +2 -2
  380. package/dist/otel/index.js +4 -4
  381. package/dist/{outbox-7zgh-7nw.d.ts → outbox-BFZS6Kvz.d.ts} +4 -4
  382. package/dist/{permissions-C8p6RlIZ.d.ts → permissions-2UlVQDzY.d.ts} +1 -1
  383. package/dist/{pool-D-4HyhuW.d.ts → pool-yO-LzZAd.d.ts} +3 -3
  384. package/dist/{ports-CmEXVqhg.js → ports-CkygVOeE.js} +2 -2
  385. package/dist/{ports-C-8uduFM.d.ts → ports-prqYrReN.d.ts} +1 -1
  386. package/dist/postgres/index.d.ts +4 -4
  387. package/dist/{postgrest-DZtM2nIS.d.ts → postgrest-Bjain6nf.d.ts} +1 -1
  388. package/dist/powersync/index.d.ts +6 -6
  389. package/dist/preset/index.d.ts +3 -3
  390. package/dist/preset/index.js +3 -3
  391. package/dist/{preset-B_sSI9vg.js → preset-BvHNleCo.js} +2 -2
  392. package/dist/{project-DVlXQGEp.js → project-CBvowdKY.js} +5 -5
  393. package/dist/{provider-BI0KC4u5.d.ts → provider-bIAzxVMB.d.ts} +1 -1
  394. package/dist/{push-token-D41lOoE8.d.ts → push-token-DtqJeg8w.d.ts} +1 -1
  395. package/dist/query/index.d.ts +1 -1
  396. package/dist/{rate-limit-CRhlLFhP.js → rate-limit-BJ4EMdAy.js} +1 -1
  397. package/dist/react/index.d.ts +9 -9
  398. package/dist/react/index.js +3 -3
  399. package/dist/react/native/index.d.ts +1 -1
  400. package/dist/react/native/index.js +1 -1
  401. package/dist/react/server.d.ts +9 -9
  402. package/dist/react/server.js +2 -2
  403. package/dist/react/session.d.ts +2 -32
  404. package/dist/react/session.js +1 -37
  405. package/dist/{react-COIov1yC.js → react-DZ7AW2yf.js} +2 -2
  406. package/dist/react-router/index.d.ts +6 -6
  407. package/dist/react-router/index.js +5 -5
  408. package/dist/realtime/index.d.ts +6 -6
  409. package/dist/{record-form-DU2EoVsv.d.ts → record-form-BQA-lawE.d.ts} +1 -1
  410. package/dist/{recordings-D69Va7gP.d.ts → recordings-Bw5LoocX.d.ts} +1 -1
  411. package/dist/records/index.d.ts +9 -9
  412. package/dist/{refusal-CGi-0Q18.d.ts → refusal-BX1EvmpJ.d.ts} +3 -3
  413. package/dist/{refusal-5c6UMpUP.js → refusal-rnbr6RZD.js} +2 -2
  414. package/dist/{refresh-B8t_KE3s.js → request-kind-tNDM5Z_o.js} +15 -31
  415. package/dist/{resolve--LfVoOMg.d.ts → resolve-BIpQRhvF.d.ts} +97 -36
  416. package/dist/{resolve-FW8oeXvh.js → resolve-CZV31iCm.js} +402 -392
  417. package/dist/{resolved-names-h-3UbKcw.js → resolved-names-b6P2--jK.js} +1 -1
  418. package/dist/{resource-BbWk4hoP.js → resource-COaS9_i8.js} +1 -1
  419. package/dist/{resource-DWllVW8k.d.ts → resource-CaYpB07K.d.ts} +1 -1
  420. package/dist/{resource-execute-DUBYKTYU.d.ts → resource-execute-A1NbR-sd.d.ts} +2 -2
  421. package/dist/{resource-types-RgaljPs0.d.ts → resource-types-CTcc37WL.d.ts} +4 -4
  422. package/dist/{resources-Bki1J4jy.d.ts → resources-13ZFX1G6.d.ts} +2 -2
  423. package/dist/{resources-DYSx9NYM.js → resources-DhiK3yLO.js} +1 -1
  424. package/dist/{respond-DLH4tD2d.js → respond-8A3EOo61.js} +1 -1
  425. package/dist/{respond-BYOV7KZp.d.ts → respond-CAxhkwAi.d.ts} +15 -19
  426. package/dist/{sales-lines-DuNVoKHA.d.ts → sales-lines-wQHuL-pa.d.ts} +1 -1
  427. package/dist/{sandboxes-B2hBoBvJ.d.ts → sandboxes-BF9RxxCU.d.ts} +1 -1
  428. package/dist/{scores-FAORS4qU.d.ts → scores-Ce8MxQX9.d.ts} +5 -5
  429. package/dist/server/index.d.ts +58 -36
  430. package/dist/server/index.js +35 -41
  431. package/dist/{server-types-C2hlvhP4.d.ts → server-types-DEjva0MW.d.ts} +19 -17
  432. package/dist/{session-B4VasaAA.d.ts → session-BA0YDmjt.d.ts} +11 -12
  433. package/dist/session-BjPYE4dT.js +180 -0
  434. package/dist/session-CeYL3EPm.d.ts +77 -0
  435. package/dist/{session-status-D8CBxCqv.d.ts → session-status-Df6tuKY9.d.ts} +4 -3
  436. package/dist/{sign-in-CX1a5i2P.d.ts → sign-in-4u4vLtXG.d.ts} +16 -4
  437. package/dist/{sign-in-CxdoTEp5.js → sign-in-djgvab1X.js} +3 -3
  438. package/dist/{sign-in-BMm1xhKq.js → sign-in-k2lXELeC.js} +2 -2
  439. package/dist/{signatures-CBn7w4VR.js → signatures-DK01D2S7.js} +1 -1
  440. package/dist/{signers-6ih6i9aq.d.ts → signers-Dw9DBZjJ.d.ts} +4 -4
  441. package/dist/{signing-keys-De09WNJ3.d.ts → signing-keys-FglIQ6iL.d.ts} +2 -2
  442. package/dist/{signing-keys-BC5_hJN5.js → signing-keys-sGaXklwD.js} +1 -1
  443. package/dist/{snapshot-CVMSyTHH.js → snapshot-BOA7lkRg.js} +9 -17
  444. package/dist/solid/index.d.ts +10 -10
  445. package/dist/solid/index.js +1 -1
  446. package/dist/solid-start/index.d.ts +6 -6
  447. package/dist/solid-start/index.js +5 -5
  448. package/dist/spec/index.d.ts +2 -2
  449. package/dist/sql/index.d.ts +5 -5
  450. package/dist/sql/index.js +3 -3
  451. package/dist/{sql-C9nO-Mat.js → sql-BChN3Hxv.js} +7382 -2219
  452. package/dist/sqlite/index.d.ts +3 -3
  453. package/dist/{sso-CuzAjsc8.d.ts → sso-B7w7h8RJ.d.ts} +3 -3
  454. package/dist/ssr/index.d.ts +5 -6
  455. package/dist/ssr/index.js +3 -3
  456. package/dist/storage/index.d.ts +3 -3
  457. package/dist/storage/index.js +1 -1
  458. package/dist/streams/index.d.ts +1 -1
  459. package/dist/{subject-readers-BlD8tALG.d.ts → subject-readers-YL8H9G8X.d.ts} +2 -2
  460. package/dist/{subjects-Bv2dPflD.d.ts → subjects-CVjAE7nz.d.ts} +3 -3
  461. package/dist/{support-DxYI6sDM.d.ts → support-BwtMgjVg.d.ts} +4 -4
  462. package/dist/{support-view-DSmCett7.d.ts → support-view-GykHOIQ2.d.ts} +1 -1
  463. package/dist/svelte/index.d.ts +9 -9
  464. package/dist/svelte/index.js +1 -1
  465. package/dist/sveltekit/index.d.ts +7 -7
  466. package/dist/sveltekit/index.js +5 -5
  467. package/dist/{tags--k2fbPfO.d.ts → tags-CAfvzA1U.d.ts} +1 -1
  468. package/dist/tanstack-db/index.d.ts +3 -3
  469. package/dist/tanstack-start/index.d.ts +6 -6
  470. package/dist/tanstack-start/index.js +5 -5
  471. package/dist/{tenant-gezshhcs.d.ts → tenant-lBgoqg9T.d.ts} +1 -1
  472. package/dist/testing/index.d.ts +27 -28
  473. package/dist/testing/index.js +5 -5
  474. package/dist/{timeline-Bq658xsi.d.ts → timeline-CrO48Qa6.d.ts} +5 -5
  475. package/dist/{topic-BVq5RdsI.d.ts → topic-x-mrN_Ff.d.ts} +5 -5
  476. package/dist/{types-C8UyJOPJ.d.ts → types-6PMaLIyw.d.ts} +3 -3
  477. package/dist/{types-Dh2OGEW5.d.ts → types-BdhE7I8Z.d.ts} +5 -5
  478. package/dist/{types-BkYEUWdz.d.ts → types-BzIYSSWK.d.ts} +16 -1
  479. package/dist/{types-DCoqai8o.d.ts → types-C7K8mu9B.d.ts} +45 -15
  480. package/dist/{types-d0JBRTAg.d.ts → types-C9XfFGmA.d.ts} +128 -13
  481. package/dist/{types-hTj5OuFo.d.ts → types-CJqNGQKb.d.ts} +2 -2
  482. package/dist/{types-TH3zlMiM.d.ts → types-D5uf0l4_.d.ts} +1 -1
  483. package/dist/{types-BBqP9H6w.d.ts → types-auvHrNWC.d.ts} +4 -4
  484. package/dist/{undo-22ofP6Zp.d.ts → undo-CdKp5_2X.d.ts} +2 -2
  485. package/dist/{usage-CNCT6_3D.d.ts → usage-DZ8j5Tm_.d.ts} +4 -4
  486. package/dist/{vault-yGQD5Rdl.d.ts → vault-DjbG4XQS.d.ts} +2 -2
  487. package/dist/vercel-connect/index.d.ts +1 -1
  488. package/dist/vercel-sandbox/index.d.ts +2 -2
  489. package/dist/{verify-DY_j4GPZ.js → verify-96j8d5ps.js} +1 -1
  490. package/dist/{verify-BQu3eBNW.d.ts → verify-HOiu3lRR.d.ts} +2 -2
  491. package/dist/{view-BfEqjZJ_.js → view-Ch0Qtr36.js} +1 -1
  492. package/dist/{view-Cy2XxYp1.d.ts → view-DdDY88SC.d.ts} +1 -1
  493. package/dist/vue/index.d.ts +10 -10
  494. package/dist/vue/index.js +1 -1
  495. package/dist/{watch-topic-BOclyLFd.d.ts → watch-topic-D6bcqOrJ.d.ts} +1 -1
  496. package/dist/workflow-sdk/builder/index.d.ts +29 -5
  497. package/dist/workflow-sdk/builder/index.js +39 -12
  498. package/dist/workflow-sdk/index.d.ts +1 -1
  499. package/dist/workflow-sdk/index.js +2 -2
  500. package/dist/workflow-sdk/world/index.d.ts +1 -1
  501. package/dist/workflow-sdk/world/index.js +1 -1
  502. package/dist/{workflow-sdk-BL3wzkdp.js → workflow-sdk-CBS8L2Ku.js} +5 -0
  503. package/dist/{workflow-sdk-yIkECybp.d.ts → workflow-sdk-D3H10W5h.d.ts} +3 -3
  504. package/dist/{workflows-BljkWRxE.d.ts → workflows-BI4yKqFh.d.ts} +3 -3
  505. package/dist/yjs/index.d.ts +2 -2
  506. package/dist/yjs/index.js +1 -1
  507. package/package.json +1 -1
  508. package/schemas/config-v1.json +126 -0
  509. package/schemas/doctor-report-v1.json +4 -0
  510. package/skills/better-supabase-auth/SKILL.md +45 -11
  511. package/dist/cli/add-BaB3y1lv.js +0 -1
  512. package/dist/cli/env-UN6PJFX6.js +0 -1
  513. package/dist/cli/powersync-J2Kms2NT.js +0 -1
  514. package/dist/cli/seed-ByLneY1H.js +0 -1
  515. package/dist/errors-D3-4c-XF.js +0 -102
  516. package/dist/http-BDC1IvBX.js +0 -27
  517. package/dist/jwks-cache-IZaiICAV.js +0 -48
  518. package/dist/options-Itq7QYoW.js +0 -20
  519. package/dist/refresh-BtbC2rZe.d.ts +0 -52
  520. package/dist/snapshot-BGsJw9xn.d.ts +0 -83
@@ -1,4 +1,44 @@
1
1
  /// <reference lib="esnext.temporal" />
2
+ /** RFC 5545 `ACTION`, in lowercase. */
3
+ type CalendarAlarmAction = "display" | "email" | "audio";
4
+ /**
5
+ * One alarm of an event (`VALARM`), as feeds and exports write it: an alarm
6
+ * stored with the event, or a reminder of the reminders block. A `method` of
7
+ * `display`, `email` or `audio` is the alarm's `ACTION`; any other method, such
8
+ * as the reminders block's `notification`, exports as a display alarm marked
9
+ * `X-BSB-METHOD`, which an import skips.
10
+ */
11
+ interface CalendarReminder {
12
+ readonly method: string;
13
+ /**
14
+ * Minutes before the start (or the end, with `related: "end"`); a negative
15
+ * value fires after it. `at` takes its place when set.
16
+ */
17
+ readonly offsetMinutes: number;
18
+ readonly id?: string;
19
+ /** What `offsetMinutes` counts from. Default `start`. */
20
+ readonly related?: "start" | "end";
21
+ /** An absolute time, instead of `offsetMinutes`. */
22
+ readonly at?: Temporal.Instant;
23
+ /** How many more times it fires after the first (`REPEAT`). Default 0. */
24
+ readonly repeat?: number;
25
+ /** Minutes between repeats (`DURATION`), required with `repeat`. */
26
+ readonly repeatMinutes?: number;
27
+ /** The alarm's text. Export falls back to the event's title. */
28
+ readonly description?: string;
29
+ /** An email alarm's subject. Export falls back to the event's title. */
30
+ readonly summary?: string;
31
+ }
32
+ /**
33
+ * An alarm stored with the event (`calendar_event_alarms`): event data that
34
+ * every reader of the event gets in exports and feeds, fired by the reader's
35
+ * calendar client. A reminder the server sends to one user lives in the
36
+ * reminders block instead.
37
+ */
38
+ interface CalendarAlarm extends CalendarReminder {
39
+ /** The `ACTION`. Default `display`. */
40
+ readonly method: CalendarAlarmAction;
41
+ }
2
42
  /** How an attendee takes part (RFC 5545 `ROLE`), in lowercase. */
3
43
  type AttendeeRole = "chair" | "required" | "optional" | "non-participant";
4
44
  /** An attendee's answer (RFC 5545 `PARTSTAT`), in lowercase. */
@@ -16,10 +56,6 @@ interface CalendarAttendee {
16
56
  readonly organizer?: boolean;
17
57
  readonly optional?: boolean;
18
58
  }
19
- interface CalendarReminder {
20
- readonly method: string;
21
- readonly offsetMinutes: number;
22
- }
23
59
  /** One `VEVENT`, ready for `importIcs` or `upsert`. */
24
60
  interface IcsEvent {
25
61
  readonly uid: string;
@@ -41,6 +77,8 @@ interface IcsEvent {
41
77
  readonly attendees: readonly CalendarAttendee[];
42
78
  /** `TRANSP:TRANSPARENT` reads as `transparent`; absent means opaque. */
43
79
  readonly transparency?: CalendarTransparency;
80
+ /** The event's `VALARM`s, without the per-user reminders `toIcs` writes. */
81
+ readonly alarms?: readonly CalendarAlarm[];
44
82
  }
45
83
  interface ParsedIcs {
46
84
  /** `X-WR-CALNAME`, when the file has one. */
@@ -53,9 +91,9 @@ interface ParsedIcs {
53
91
  }
54
92
  /**
55
93
  * Reads an iCalendar file (RFC 5545): unfolds lines, unescapes TEXT values and
56
- * reads each `VEVENT`'s times, recurrence (`RRULE`, `EXDATE`, `RECURRENCE-ID`)
57
- * and attendees. Times in a zone Temporal does not know, floating times and
58
- * dates use `X-WR-TIMEZONE`, else UTC.
94
+ * reads each `VEVENT`'s times, recurrence (`RRULE`, `EXDATE`, `RECURRENCE-ID`),
95
+ * attendees and alarms (`VALARM`). Times in a zone Temporal does not know,
96
+ * floating times and dates use `X-WR-TIMEZONE`, else UTC.
59
97
  */
60
98
  declare function parseIcs(text: string): ParsedIcs;
61
99
  /** The event fields `toIcs` writes. `CalendarEvent` has all of them. */
@@ -76,6 +114,7 @@ interface IcsSource {
76
114
  readonly originalStart?: Temporal.Instant;
77
115
  readonly attendees?: readonly CalendarAttendee[];
78
116
  readonly reminders?: readonly CalendarReminder[];
117
+ readonly alarms?: readonly CalendarAlarm[];
79
118
  readonly updatedAt?: Temporal.Instant;
80
119
  }
81
120
  interface ToIcsOptions {
@@ -124,6 +163,8 @@ interface CalendarEvent {
124
163
  readonly autoDecline?: boolean;
125
164
  readonly attendees: readonly CalendarAttendee[];
126
165
  readonly reminders?: readonly CalendarReminder[];
166
+ /** The event's alarms, when the calendar block has its alarms table. */
167
+ readonly alarms?: readonly CalendarAlarm[];
127
168
  readonly updatedAt?: Temporal.Instant;
128
169
  readonly visibility?: "public" | "private";
129
170
  readonly ownerId?: string;
@@ -233,4 +274,4 @@ declare function workingHoursOf(value: unknown): WorkingHours[];
233
274
  * time" view or a scheduling suggestion.
234
275
  */
235
276
  declare function commonFreeTime(freeBusy: readonly FreeBusy[], range: OccurrenceRange, options?: CommonFreeTimeOptions): BusyRange[];
236
- export { CalendarReminder as C, ToIcsOptions as D, ParsedIcs as E, parseIcs as O, CalendarEventStatus as S, IcsSource as T, expandOccurrences as _, FreeBusy as a, AttendeeRole as b, WorkingHoursInput as c, workingHoursOf as d, CalendarEvent as f, SplitRules as g, OccurrenceRange as h, CommonFreeTimeOptions as i, toIcs as k, commonFreeTime as l, OccurrenceOptions as m, CalendarEventKind as n, WeeklyHours as o, CalendarOccurrence as p, CalendarTransparency as r, WorkingHours as s, BusyRange as t, freeBusyOf as u, splitRule as v, IcsEvent as w, CalendarAttendee as x, AttendeeResponse as y };
277
+ export { CalendarAlarmAction as A, IcsEvent as C, parseIcs as D, ToIcsOptions as E, toIcs as O, CalendarEventStatus as S, ParsedIcs as T, expandOccurrences as _, FreeBusy as a, AttendeeRole as b, WorkingHoursInput as c, workingHoursOf as d, CalendarEvent as f, SplitRules as g, OccurrenceRange as h, CommonFreeTimeOptions as i, CalendarReminder as j, CalendarAlarm as k, commonFreeTime as l, OccurrenceOptions as m, CalendarEventKind as n, WeeklyHours as o, CalendarOccurrence as p, CalendarTransparency as r, WorkingHours as s, BusyRange as t, freeBusyOf as u, splitRule as v, IcsSource as w, CalendarAttendee as x, AttendeeResponse as y };
@@ -29,7 +29,14 @@ function base64ToText(text) {
29
29
  * reading claims such as `exp` from a token that is verified elsewhere.
30
30
  */
31
31
  function decodeJwtPayload(token) {
32
- const part = token.split(".")[1];
32
+ return decodeJwtPart(token, 1);
33
+ }
34
+ /** The protected header of a JWT (`alg`, `kid`), decoded without verifying it. */
35
+ function decodeJwtHeader(token) {
36
+ return decodeJwtPart(token, 0);
37
+ }
38
+ function decodeJwtPart(token, index) {
39
+ const part = token.split(".")[index];
33
40
  if (!part) return;
34
41
  try {
35
42
  const parsed = JSON.parse(base64ToText(part));
@@ -38,4 +45,4 @@ function decodeJwtPayload(token) {
38
45
  return;
39
46
  }
40
47
  }
41
- export { toBase64Url as a, toBase64 as i, decodeJwtPayload as n, fromBase64 as r, base64ToText as t };
48
+ export { toBase64 as a, fromBase64 as i, decodeJwtHeader as n, toBase64Url as o, decodeJwtPayload as r, base64ToText as t };
@@ -1,7 +1,7 @@
1
1
  import { b as DbError, n as BetterResultApi, t as AsyncResult } from "../result-DTOQRyGY.js";
2
- import { Ct as ApplyExtension, K as Insert, O as AnyFunctions, Z as PrimaryKeyValue, dt as TableMeta, ht as Update, k as AnyModels, ut as TableKey } from "../types-BkYEUWdz.js";
3
- import { $ as SearchArgs, A as OffsetPageArgs, At as GetArgs, B as Returned, C as FindExt, Ct as AggregateResult, D as ManyWriteArgs, E as ManyResult, F as PageOf, G as UpsertArgs, H as RpcArgs, I as PlainName, J as WriteManyArgs, K as UpsertManyArgs, L as RawRpcOptions, M as OverloadArgs, N as OverloadReturns, O as NoArgName, Ot as CountArgs, P as OverloadedName, Pt as ListArgs, S as DeleteExt, T as ManyOutcome, U as RpcOptions, V as RowFilter, Vt as Payload, W as UpdateArgs, bt as AggregateArgs, et as SearchScore, j as OffsetRangeArgs, lt as ReadSetResult, mt as QuerySpec, nt as ReadSet, pt as InferResult, q as WriteArgs, tt as InferReadSetParams, v as CursorPageArgs, w as GetKey, x as DeleteArgs, y as Db } from "../define-ITQA71fw.js";
4
- import { a as ListExtra, d as ListQuery, i as ListDefinition, o as ListPage, s as ListPagination } from "../list-query-C7V8kUaD.js";
2
+ import { O as AnyFunctions, Q as PrimaryKeyValue, dt as TableKey, ft as TableMeta, gt as Update, k as AnyModels, q as Insert, wt as ApplyExtension } from "../types-BzIYSSWK.js";
3
+ import { $ as SearchArgs, A as OffsetPageArgs, At as GetArgs, B as Returned, C as FindExt, Ct as AggregateResult, D as ManyWriteArgs, E as ManyResult, F as PageOf, G as UpsertArgs, H as RpcArgs, I as PlainName, J as WriteManyArgs, K as UpsertManyArgs, L as RawRpcOptions, M as OverloadArgs, N as OverloadReturns, O as NoArgName, Ot as CountArgs, P as OverloadedName, Pt as ListArgs, S as DeleteExt, T as ManyOutcome, U as RpcOptions, V as RowFilter, Vt as Payload, W as UpdateArgs, bt as AggregateArgs, et as SearchScore, j as OffsetRangeArgs, lt as ReadSetResult, mt as QuerySpec, nt as ReadSet, pt as InferResult, q as WriteArgs, tt as InferReadSetParams, v as CursorPageArgs, w as GetKey, x as DeleteArgs, y as Db } from "../define-BvkaC3Oh.js";
4
+ import { a as ListExtra, d as ListQuery, i as ListDefinition, o as ListPage, s as ListPagination } from "../list-query-D1h3Dmnk.js";
5
5
  import { Result } from "better-result";
6
6
  /**
7
7
  * Better-result's `Result` namespace with the function each `DbError` goes
@@ -1,10 +1,10 @@
1
- import { O as AnyFunctions, k as AnyModels } from "./types-BkYEUWdz.js";
2
- import { o as BlockTenant } from "./block-helpers-disoUWCp.js";
3
- import { t as BetterSupabase, y as Db } from "./define-ITQA71fw.js";
4
- import { n as DataEngine } from "./data-engine-CMENsp3d.js";
5
- import { Dn as GeneratedBlocks } from "./define-block-COmMkx2x.js";
6
- import { rt as BetterQueries } from "./index-BIAtapnD.js";
7
- import { t as ClientPorts } from "./ports-C-8uduFM.js";
1
+ import { O as AnyFunctions, k as AnyModels } from "./types-BzIYSSWK.js";
2
+ import { o as BlockTenant } from "./block-helpers-BNtM1tqy.js";
3
+ import { t as BetterSupabase, y as Db } from "./define-BvkaC3Oh.js";
4
+ import { n as DataEngine } from "./data-engine-CX1oYDZl.js";
5
+ import { Dn as GeneratedBlocks } from "./define-block-Ds3aLZwz.js";
6
+ import { rt as BetterQueries } from "./index-Dbd1E5Au.js";
7
+ import { t as ClientPorts } from "./ports-prqYrReN.js";
8
8
  import { SupabaseClient } from "@supabase/supabase-js";
9
9
  interface AuthUser {
10
10
  readonly id: string;
@@ -1,7 +1,7 @@
1
- import { Dn as GeneratedBlocks } from "./define-block-COmMkx2x.js";
2
- import { n as TopicPort } from "./watch-topic-BOclyLFd.js";
3
- import { t as ClientPorts } from "./ports-C-8uduFM.js";
4
- import { t as AuthPort } from "./controller-DaWA9eWS.js";
1
+ import { Dn as GeneratedBlocks } from "./define-block-Ds3aLZwz.js";
2
+ import { n as TopicPort } from "./watch-topic-D6bcqOrJ.js";
3
+ import { t as ClientPorts } from "./ports-prqYrReN.js";
4
+ import { t as AuthPort } from "./controller-CAcLEndc.js";
5
5
  import { SupabaseClient } from "@supabase/supabase-js";
6
6
  /**
7
7
  * What the block bindings hand their controllers: the provider's client,
@@ -1,5 +1,5 @@
1
1
  import { T as ErrorMapper, t as AsyncResult } from "./result-DTOQRyGY.js";
2
- import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
2
+ import { t as BlockTransport } from "./block-transport-CDmOUuLZ.js";
3
3
  /**
4
4
  * Where a block reads the active tenant: an organization id, or a function that
5
5
  * returns the current one, such as `() => db.$context.tenant` on the server or
@@ -1,7 +1,7 @@
1
1
  import { T as ErrorMapper, b as DbError, f as Result, t as AsyncResult } from "./result-DTOQRyGY.js";
2
2
  import { n as Logger } from "./logger-0LfhvwE4.js";
3
- import { t as BlockCall } from "./block-helpers-disoUWCp.js";
4
- import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
3
+ import { t as BlockCall } from "./block-helpers-BNtM1tqy.js";
4
+ import { t as BlockTransport } from "./block-transport-CDmOUuLZ.js";
5
5
  /** A block method: anything that returns an `AsyncResult`. */
6
6
  type BlockMethod = (...args: never[]) => AsyncResult<unknown>;
7
7
  /** The names of a block client's methods that return an `AsyncResult`. */
@@ -1,4 +1,4 @@
1
- import { $ as RecordRef } from "./types-BkYEUWdz.js";
1
+ import { et as RecordRef } from "./types-BzIYSSWK.js";
2
2
  /** The map key of a subject in a batch result: `type:id`. */
3
3
  declare function subjectKey(subject: RecordRef): string;
4
4
  export { subjectKey as t };
@@ -1,4 +1,4 @@
1
- import { cn as ResolvedConfig } from "./context-CderJRZf.js";
1
+ import { cn as ResolvedConfig } from "./context-yfOlyAqb.js";
2
2
  /**
3
3
  * One block table as the config names it: unquoted schema and table, and each
4
4
  * logical column's written name, or `null` when an adopted table lacks it.
@@ -1,5 +1,5 @@
1
- import { Bt as Executor } from "./types-BkYEUWdz.js";
2
- import { n as SqlClient } from "./executor-CFmee_nV.js";
1
+ import { Vt as Executor } from "./types-BzIYSSWK.js";
2
+ import { n as SqlClient } from "./executor-DoSNec_H.js";
3
3
  /**
4
4
  * Calls a block function as the current user and resolves with its result.
5
5
  * Rejects with the raw database error (a `pg` error or a PostgREST error
@@ -2,12 +2,12 @@
2
2
  import { T as ErrorMapper, t as AsyncResult } from "../../result-DTOQRyGY.js";
3
3
  import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
4
4
  import { r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
5
- import { Ct as Events, f as AccessRequestEventData } from "../../events-DVt3Z9hw.js";
5
+ import { Ct as Events, f as AccessRequestEventData } from "../../events-DCw3c6pj.js";
6
6
  import { n as Logger } from "../../logger-0LfhvwE4.js";
7
- import { r as BlockTemporalOptions } from "../../block-helpers-disoUWCp.js";
8
- import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
9
- import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
10
- import { c as BlockOf } from "../../define-block-COmMkx2x.js";
7
+ import { r as BlockTemporalOptions } from "../../block-helpers-BNtM1tqy.js";
8
+ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
9
+ import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
10
+ import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
11
11
  interface AccessRequestsOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockTemporalOptions {
12
12
  readonly transport: BlockTransport;
13
13
  /**
@@ -2,16 +2,16 @@
2
2
  import { T as ErrorMapper, t as AsyncResult } from "../../result-DTOQRyGY.js";
3
3
  import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
4
4
  import { r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
5
- import { Ct as Events } from "../../events-DVt3Z9hw.js";
6
- import { b as EngagementEventData, x as EngagementRecordingEventData } from "../../index-D18su_r5.js";
5
+ import { Ct as Events } from "../../events-DCw3c6pj.js";
6
+ import { b as EngagementEventData, x as EngagementRecordingEventData } from "../../index-CY612vAg.js";
7
7
  import { n as Logger } from "../../logger-0LfhvwE4.js";
8
- import { r as BlockTemporalOptions } from "../../block-helpers-disoUWCp.js";
9
- import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
10
- import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DrA_d1dJ.js";
11
- import { f as AiFiles } from "../../types-C8UyJOPJ.js";
12
- import { _ as JobHandler } from "../../types-Dh2OGEW5.js";
13
- import { Sn as EntitySchema, c as BlockOf } from "../../define-block-COmMkx2x.js";
14
- import { a as EngagementRecording, c as NoteTakerInput, d as Transcript, f as TranscriptSegment, i as EngagementNotesInput, l as Transcriber, n as EngagementActionItem, o as EngagementRecordingStatus, p as TranscriptSegmentInput, r as EngagementNotes, s as NoteTaker, t as ENGAGEMENT_TRANSCRIBE_QUEUE, u as TranscriberInput } from "../../recordings-D69Va7gP.js";
8
+ import { r as BlockTemporalOptions } from "../../block-helpers-BNtM1tqy.js";
9
+ import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
10
+ import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-CtMsgLQr.js";
11
+ import { f as AiFiles } from "../../types-6PMaLIyw.js";
12
+ import { _ as JobHandler } from "../../types-BdhE7I8Z.js";
13
+ import { Sn as EntitySchema, c as BlockOf } from "../../define-block-Ds3aLZwz.js";
14
+ import { a as EngagementRecording, c as NoteTakerInput, d as Transcript, f as TranscriptSegment, i as EngagementNotesInput, l as Transcriber, n as EngagementActionItem, o as EngagementRecordingStatus, p as TranscriptSegmentInput, r as EngagementNotes, s as NoteTaker, t as ENGAGEMENT_TRANSCRIBE_QUEUE, u as TranscriberInput } from "../../recordings-Bw5LoocX.js";
15
15
  /** A record an engagement is on. */
16
16
  interface EngagementSubject {
17
17
  readonly type: string;
@@ -1,7 +1,7 @@
1
- import { Ct as Events, p as AgentEventData } from "../../events-DVt3Z9hw.js";
2
- import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
3
- import { a as AgentSkill, c as AgentsOptions, i as AgentKnowledgeScope, l as NewAgent, n as AgentFields, o as AgentVisibility, r as AgentFilter, s as Agents, t as Agent, u as createAgents } from "../../agents-DXiOPB3V.js";
4
- import { c as BlockOf } from "../../define-block-COmMkx2x.js";
1
+ import { Ct as Events, p as AgentEventData } from "../../events-DCw3c6pj.js";
2
+ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
3
+ import { a as AgentSkill, c as AgentsOptions, i as AgentKnowledgeScope, l as NewAgent, n as AgentFields, o as AgentVisibility, r as AgentFilter, s as Agents, t as Agent, u as createAgents } from "../../agents-BwUHtvD6.js";
4
+ import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
5
5
  /** The events of the `agents` block: type to data. */
6
6
  type AgentsEvents = {
7
7
  readonly "agent.saved": AgentEventData;
@@ -1,6 +1,6 @@
1
- import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
2
- import { a as AiCacheSetOptions, i as AiCacheOptions, n as AiCacheEntry, o as cacheKey, r as AiCacheKind, s as createAiCache, t as AiCache } from "../../ai-cache-CLiAXCPH.js";
3
- import { c as BlockOf } from "../../define-block-COmMkx2x.js";
1
+ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
2
+ import { a as AiCacheSetOptions, i as AiCacheOptions, n as AiCacheEntry, o as cacheKey, r as AiCacheKind, s as createAiCache, t as AiCache } from "../../ai-cache-CPOP2PYz.js";
3
+ import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
4
4
  /** The `ai-cache` block's manifest (ADR 0029). */
5
5
  export declare const aiCacheBlock: BlockOf<"ai-cache", typeof createAiCache>;
6
6
  export { type AiCache, type AiCacheEntry, type AiCacheKind, type AiCacheOptions, type AiCacheSetOptions, type BlockTransport, cacheKey, createAiCache, dbTransport, rpcTransport, sqlTransport };
@@ -1,13 +1,13 @@
1
1
  import { b as DbError } from "../../result-DTOQRyGY.js";
2
- import { Ct as Events, g as AiToolEventData, m as AiChatEventData } from "../../events-DVt3Z9hw.js";
3
- import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
2
+ import { Ct as Events, g as AiToolEventData, m as AiChatEventData } from "../../events-DCw3c6pj.js";
3
+ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
4
4
  import { a as AiMessagePart, c as AiReasoningPart, d as AiTextPart, f as AiToolApprovalPart, g as isAiMessage, h as aiMessageSchema, i as AiMessage, l as AiSourcePart, m as AiToolResultPart, n as AiDataPart, o as AiMessagePartType, p as AiToolCallPart, r as AiFilePart, s as AiMessageRole, t as AI_MESSAGE_SCHEMA_ID, u as AiStepPart } from "../../message-Cc4bkdNw.js";
5
- import { A as AiStoredMessageStatus, B as AiHarnessSession, C as AiProject, D as AiSaveResult, E as AiRunStatus, F as AiUserMessageTrigger, G as AiRun, H as AiHarnessSessions, I as SharedAiChat, J as AiRunStep, K as AiRunQuery, L as aiChatListTopic, M as AiToolApproval, N as AiToolApprovalRequest, O as AiShareLink, P as AiToolPolicy, Q as createHarnessSessions, R as aiChatTopic, S as AiPendingInputRequest, T as AiRunRelease, U as AiHarnessStatus, V as AiHarnessSessionPatch, W as AiPendingApproval, X as AiRunStepStatus, Y as AiRunStepInput, Z as AiRuns, _ as AiModerationAction, a as AiChatInput, b as AiModerationStage, c as AiChatPatch, d as AiChatShare, f as AiChatVisibility, g as AiModelInput, h as AiModel, i as AiChat, j as AiStreamClaim, k as AiStoredMessage, l as AiChatQuery, m as AiMessageSibling, n as AiApprovalDecision, o as AiChatOptions, p as AiFeedback, q as AiRunState, r as AiAssistantMessageOptions, s as AiChatPage, t as AiAppendResult, u as AiChatRecord, v as AiModerationEvent, w as AiProjectInput, x as AiPendingInput, y as AiModerationInput, z as createAiChat } from "../../ai-chat-DlcBdOhJ.js";
6
- import { a as NewAiSandbox, i as AiSandboxes, n as AiSandboxStatus, r as AiSandboxStopper, t as AiSandbox } from "../../sandboxes-B2hBoBvJ.js";
7
- import { c as BlockOf } from "../../define-block-COmMkx2x.js";
8
- import { p as SubscriptionStatus } from "../../topic-BVq5RdsI.js";
9
- import { n as TopicPort } from "../../watch-topic-BOclyLFd.js";
10
- import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
5
+ import { $ as createHarnessSessions, A as AiRunStatus, B as SharedAiChat, C as AiModerationInput, D as AiProject, E as AiPendingInputRequest, F as AiStreamClaim, G as AiPendingApproval, H as AiHarnessSessionPatch, I as AiToolApproval, J as AiRunState, K as AiRun, L as AiToolApprovalRequest, M as AiShareLink, N as AiStoredMessage, O as AiProjectInput, P as AiStoredMessageStatus, Q as AiRuns, R as AiToolPolicy, S as AiModerationEvent, T as AiPendingInput, U as AiHarnessSessions, V as AiHarnessSession, W as AiHarnessStatus, X as AiRunStepInput, Y as AiRunStep, Z as AiRunStepStatus, _ as AiFeedback, a as createAiChat, b as AiModelInput, c as AiAssistantMessageOptions, d as AiChatPage, f as AiChatPatch, g as AiChatVisibility, h as AiChatShare, i as aiChatTopic, j as AiSaveResult, k as AiRunRelease, l as AiChatInput, m as AiChatRecord, n as AiChatOptions, o as AiAppendResult, p as AiChatQuery, q as AiRunQuery, r as aiChatListTopic, s as AiApprovalDecision, t as AiChat, v as AiMessageSibling, w as AiModerationStage, x as AiModerationAction, y as AiModel, z as AiUserMessageTrigger } from "../../ai-chat-BZhfCHHr.js";
6
+ import { a as NewAiSandbox, i as AiSandboxes, n as AiSandboxStatus, r as AiSandboxStopper, t as AiSandbox } from "../../sandboxes-BF9RxxCU.js";
7
+ import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
8
+ import { p as SubscriptionStatus } from "../../topic-x-mrN_Ff.js";
9
+ import { n as TopicPort } from "../../watch-topic-D6bcqOrJ.js";
10
+ import { n as Controller, t as AuthPort } from "../../controller-CAcLEndc.js";
11
11
  import { StandardSchemaV1 } from "@standard-schema/spec";
12
12
  /**
13
13
  * The `type` of each part in the canonical AI message (version 1); the SQL
@@ -1,6 +1,6 @@
1
1
  import { n as isRecord } from "../../guards-CsRa6v57.js";
2
2
  import { a as ok, t as AsyncResult } from "../../result-8xza7w5W.js";
3
- import { t as aiChatSqlOptions } from "../../options-Itq7QYoW.js";
3
+ import { t as aiChatSqlOptions } from "../../options-SOjQVgfS.js";
4
4
  import { t as AI_MESSAGE_PART_TYPES } from "../../ai-message-cnroprVB.js";
5
5
  import { n as runStateOf } from "../../run-state-DGiyDQxH.js";
6
6
  import { n as event, t as defineEvents } from "../../event-map-DxfsFgQT.js";
@@ -17,7 +17,7 @@ function chatOf(value) {
17
17
  const row = recordOf(value, "ai_chat");
18
18
  return {
19
19
  id: textOf(row["id"]),
20
- organizationId: textOf(row["organization_id"]),
20
+ organizationId: optionalText(row["organization_id"]),
21
21
  ownerId: textOf(row["owner_id"]),
22
22
  projectId: optionalText(row["project_id"]),
23
23
  agentId: optionalText(row["agent_id"]),
@@ -40,7 +40,7 @@ function projectOf(value) {
40
40
  const row = recordOf(value, "ai_project");
41
41
  return {
42
42
  id: textOf(row["id"]),
43
- organizationId: textOf(row["organization_id"]),
43
+ organizationId: optionalText(row["organization_id"]),
44
44
  ownerId: textOf(row["owner_id"]),
45
45
  name: textOf(row["name"]),
46
46
  instructions: textOf(row["instructions"] ?? ""),
@@ -68,15 +68,26 @@ const ROLES = [
68
68
  function storedOf(value) {
69
69
  const row = recordOf(value, "ai_message_path");
70
70
  const metadata = row["metadata"];
71
- const parts = Array.isArray(row["parts"]) ? row["parts"].filter(isPart) : [];
71
+ const format = textOf(row["format"] ?? "canonical");
72
+ const raw = Array.isArray(row["parts"]) ? row["parts"] : [];
73
+ const parts = raw.filter(isPart);
74
+ const hasMetadata = isRecord(metadata) && Object.keys(metadata).length > 0;
75
+ const id = textOf(row["id"]);
76
+ const role = oneOf(row["role"], ROLES, "user");
72
77
  return {
73
- id: textOf(row["id"]),
74
- role: oneOf(row["role"], ROLES, "user"),
78
+ id,
79
+ role,
75
80
  parts,
76
- ...isRecord(metadata) && Object.keys(metadata).length > 0 ? { metadata } : {},
81
+ ...hasMetadata ? { metadata } : {},
77
82
  parentId: optionalText(row["parent_id"]),
78
- format: textOf(row["format"] ?? "canonical"),
79
- native: row["native"] ?? void 0,
83
+ authorId: optionalText(row["author_id"]),
84
+ format,
85
+ native: format === "native" ? {
86
+ id,
87
+ role,
88
+ parts: raw,
89
+ ...hasMetadata ? { metadata } : {}
90
+ } : row["native"] ?? void 0,
80
91
  model: optionalText(row["model"]),
81
92
  status: oneOf(row["status"], [
82
93
  "complete",
@@ -194,7 +205,7 @@ function moderationOf(value) {
194
205
  const row = recordOf(value, "ai_moderation_event");
195
206
  return {
196
207
  id: textOf(row["id"]),
197
- organizationId: textOf(row["organization_id"]),
208
+ organizationId: optionalText(row["organization_id"]),
198
209
  chatId: optionalText(row["chat_id"]),
199
210
  messageId: optionalText(row["message_id"]),
200
211
  userId: optionalText(row["user_id"]),
@@ -253,6 +264,28 @@ const canonical = (message) => ({
253
264
  parts: message.parts,
254
265
  ...message.metadata === void 0 ? {} : { metadata: message.metadata }
255
266
  });
267
+ /** The SDK's own message as the module stores it with `parts: "native"`. */
268
+ function nativeMessage(value) {
269
+ const row = recordOf(value, "native message");
270
+ const metadata = row["metadata"];
271
+ return {
272
+ id: row["id"],
273
+ role: row["role"],
274
+ parts: row["parts"],
275
+ ...metadata === void 0 ? {} : { metadata }
276
+ };
277
+ }
278
+ function participantOf(value) {
279
+ const row = recordOf(value, "ai_chat_participant");
280
+ return {
281
+ chatId: textOf(row["chat_id"]),
282
+ userId: textOf(row["user_id"]),
283
+ role: oneOf(row["role"], ["viewer", "editor"], "viewer"),
284
+ addedBy: optionalText(row["added_by"]),
285
+ createdAt: optionalInstant(row["created_at"]),
286
+ fields: record(row["fields"])
287
+ };
288
+ }
256
289
  /**
257
290
  * The chat block over the `ai-chat` SQL module: chats with a message tree,
258
291
  * projects, stream claims, tool approvals, feedback, share links, the model
@@ -526,6 +559,11 @@ function createAiChat(options) {
526
559
  const call = blockCall(options.transport, options.schema, options.mappers);
527
560
  const service = blockCall(options.service ?? options.transport, options.schema, options.mappers);
528
561
  const isTrue = (value) => value === true;
562
+ const native = options.messages?.parts === "native";
563
+ const messageOf = (message, raw, fields) => ({
564
+ ...native && raw !== void 0 ? nativeMessage(raw) : canonical(message),
565
+ ...fields === void 0 ? {} : { fields }
566
+ });
529
567
  const count = (value) => typeof value === "number" ? value : Number(value ?? 0);
530
568
  const client = {
531
569
  chats: {
@@ -569,34 +607,55 @@ function createAiChat(options) {
569
607
  purge: (batch) => service("purge_ai_chats", { batch }, count)
570
608
  },
571
609
  projects: {
572
- create: (organizationId, input) => call("save_ai_project", {
610
+ create: (organizationId, input, extra = {}) => call("save_ai_project", {
573
611
  id: null,
574
612
  tenant: organizationId,
575
- fields: projectFields(input)
613
+ fields: {
614
+ ...extra,
615
+ ...projectFields(input)
616
+ }
576
617
  }, projectOf),
577
- update: (projectId, input) => call("save_ai_project", {
618
+ update: (projectId, input, extra = {}) => call("save_ai_project", {
578
619
  id: projectId,
579
620
  tenant: null,
580
- fields: projectFields(input)
621
+ fields: {
622
+ ...extra,
623
+ ...projectFields(input)
624
+ }
581
625
  }, projectOf),
582
626
  list: (organizationId) => call("list_ai_projects", { tenant: organizationId }, (value) => recordsOf(value, "list_ai_projects").map(projectOf)),
583
627
  remove: (projectId) => call("delete_ai_project", { id: projectId }, isTrue)
584
628
  },
629
+ participants: {
630
+ add: (chatId, userId, addOptions = {}) => call("add_ai_chat_participant", {
631
+ chat: chatId,
632
+ participant: userId,
633
+ participant_role: addOptions.role,
634
+ fields: addOptions.fields
635
+ }, participantOf),
636
+ remove: (chatId, userId) => call("remove_ai_chat_participant", {
637
+ chat: chatId,
638
+ participant: userId
639
+ }, isTrue),
640
+ list: (chatId) => call("list_ai_chat_participants", { chat: chatId }, (value) => recordsOf(value, "list_ai_chat_participants").map(participantOf))
641
+ },
585
642
  messages: {
586
643
  appendUser: (chatId, message, appendOptions = {}) => call("append_ai_user_message", {
587
644
  chat: chatId,
588
- message: canonical(message),
645
+ message: messageOf(message, appendOptions.native, appendOptions.fields),
589
646
  trigger: appendOptions.trigger,
590
647
  message_id: appendOptions.messageId
591
648
  }, savedOf),
592
649
  saveAssistant: (chatId, message, saveOptions) => service("save_ai_assistant_message", {
593
650
  chat: chatId,
594
- message: canonical(message),
651
+ message: messageOf(message, saveOptions.native, saveOptions.fields),
595
652
  parent_id: saveOptions.parentId,
596
653
  status: saveOptions.status,
597
654
  model: saveOptions.model,
598
- format: saveOptions.format,
599
- native: saveOptions.native === void 0 ? void 0 : { value: saveOptions.native },
655
+ ...native && saveOptions.native !== void 0 ? { format: "native" } : {
656
+ format: saveOptions.format,
657
+ native: saveOptions.native === void 0 ? void 0 : { value: saveOptions.native }
658
+ },
600
659
  run: saveOptions.runId
601
660
  }, savedOf),
602
661
  path: (chatId, pathOptions = {}) => call("ai_message_path", {
@@ -755,8 +814,9 @@ function createAiChat(options) {
755
814
  }, count)
756
815
  },
757
816
  moderation: {
758
- record: (event) => service("record_ai_moderation_event", { event: {
759
- organization_id: event.organizationId,
817
+ record: (event, extra) => service("record_ai_moderation_event", { event: {
818
+ ...extra === void 0 ? {} : { fields: extra },
819
+ organization_id: event.organizationId ?? null,
760
820
  stage: event.stage,
761
821
  action: event.action,
762
822
  chat_id: event.chatId ?? null,
@@ -1,8 +1,8 @@
1
1
  import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
2
2
  import { r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
3
- import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
4
- import { _ as NewAiFile, a as AiDocumentWithContent, c as AiFileSource, d as AiFileUpload, f as AiFiles, g as NewAiDocument, h as AiSuggestion, i as AiDocumentVersion, l as AiFileStatus, m as AiProviderFile, n as AiDocumentEdit, o as AiFile, p as AiFilesOptions, r as AiDocumentKind, s as AiFileBucket, t as AiDocument, u as AiFileStorage, v as StoredAiFile } from "../../types-C8UyJOPJ.js";
5
- import { c as BlockOf } from "../../define-block-COmMkx2x.js";
3
+ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
4
+ import { _ as NewAiFile, a as AiDocumentWithContent, c as AiFileSource, d as AiFileUpload, f as AiFiles, g as NewAiDocument, h as AiSuggestion, i as AiDocumentVersion, l as AiFileStatus, m as AiProviderFile, n as AiDocumentEdit, o as AiFile, p as AiFilesOptions, r as AiDocumentKind, s as AiFileBucket, t as AiDocument, u as AiFileStorage, v as StoredAiFile } from "../../types-6PMaLIyw.js";
5
+ import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
6
6
  /** The URL a message stores for a file: `supabase-storage://{bucket}/{path}`. */
7
7
  export declare function aiFileUrl(file: Pick<AiFile, "bucket" | "path">): string;
8
8
  /** The bucket and path of a `supabase-storage://` URL, or `undefined`. */
@@ -1,7 +1,7 @@
1
- import { Ct as Events, h as AiProviderKeyEventData } from "../../events-DVt3Z9hw.js";
2
- import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
3
- import { a as AiBatchItemStatus, c as AiKeys, d as AiProviderKeyInput, f as NewAiBatch, i as AiBatchItemInput, l as AiKeysOptions, n as AiBatchCounts, o as AiBatchPatch, p as ResolvedProviderKey, r as AiBatchItem, s as AiBatchStatus, t as AiBatch, u as AiProviderKey } from "../../types-BBqP9H6w.js";
4
- import { c as BlockOf } from "../../define-block-COmMkx2x.js";
1
+ import { Ct as Events, h as AiProviderKeyEventData } from "../../events-DCw3c6pj.js";
2
+ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
3
+ import { a as AiBatchItemStatus, c as AiKeys, d as AiProviderKeyInput, f as NewAiBatch, i as AiBatchItemInput, l as AiKeysOptions, n as AiBatchCounts, o as AiBatchPatch, p as ResolvedProviderKey, r as AiBatchItem, s as AiBatchStatus, t as AiBatch, u as AiProviderKey } from "../../types-auvHrNWC.js";
4
+ import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
5
5
  /** Per-tenant provider keys and provider batch jobs. */
6
6
  export declare function createAiKeys(options: AiKeysOptions): AiKeys;
7
7
  /** The events of the `ai-keys` block: type to data. */
@@ -1,6 +1,6 @@
1
- import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
2
- import { c as BlockOf } from "../../define-block-COmMkx2x.js";
3
- import { a as AiTaskOutcome, c as AiTaskRunner, i as AiTaskFields, l as NewAiTask, n as AiSchedulesOptions, o as AiTaskRun, r as AiTask, s as AiTaskRunStatus, t as AiSchedules, u as createAiSchedules } from "../../ai-schedules-Drx2KRTn.js";
1
+ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
2
+ import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
3
+ import { a as AiTaskOutcome, c as AiTaskRunner, i as AiTaskFields, l as NewAiTask, n as AiSchedulesOptions, o as AiTaskRun, r as AiTask, s as AiTaskRunStatus, t as AiSchedules, u as createAiSchedules } from "../../ai-schedules-BZPmySUa.js";
4
4
  /** The `ai-schedules` block's manifest (ADR 0029). */
5
5
  export declare const aiSchedulesBlock: BlockOf<"ai-schedules", typeof createAiSchedules, Record<never, never>, {
6
6
  readonly notifier: "optional";
@@ -2,15 +2,15 @@
2
2
  import { T as ErrorMapper, b as DbError, t as AsyncResult } from "../../result-DTOQRyGY.js";
3
3
  import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
4
4
  import { r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
5
- import { Ct as Events, _ as AnnouncementEventData } from "../../events-DVt3Z9hw.js";
5
+ import { Ct as Events, _ as AnnouncementEventData } from "../../events-DCw3c6pj.js";
6
6
  import { n as Logger } from "../../logger-0LfhvwE4.js";
7
- import { r as BlockTemporalOptions } from "../../block-helpers-disoUWCp.js";
8
- import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
9
- import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
10
- import { c as BlockOf } from "../../define-block-COmMkx2x.js";
11
- import { p as SubscriptionStatus } from "../../topic-BVq5RdsI.js";
12
- import { n as TopicPort } from "../../watch-topic-BOclyLFd.js";
13
- import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
7
+ import { r as BlockTemporalOptions } from "../../block-helpers-BNtM1tqy.js";
8
+ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
9
+ import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
10
+ import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
11
+ import { p as SubscriptionStatus } from "../../topic-x-mrN_Ff.js";
12
+ import { n as TopicPort } from "../../watch-topic-D6bcqOrJ.js";
13
+ import { n as Controller, t as AuthPort } from "../../controller-CAcLEndc.js";
14
14
  type AnnouncementSeverity = "info" | "success" | "warning" | "critical";
15
15
  /**
16
16
  * Who sees it: everyone, members of some tenants, members with some roles, or
@@ -1,4 +1,4 @@
1
- import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
2
- import { _ as createApiKeys, a as ApiKeyExtraClaims, c as ApiKeyState, d as CreateApiKeyInput, f as CreatedApiKey, g as apiKeyResolver, h as apiKeyClaims, i as ApiKeyExtraClaim, l as ApiKeys, m as apiKeyChecksum, n as ApiKeyCheck, o as ApiKeyReservedClaim, p as ParsedApiKey, r as ApiKeyClaimsOptions, s as ApiKeyResolverOptions, t as ApiKey, u as ApiKeysOptions, v as parseApiKey } from "../../api-keys-DbIbkGxx.js";
3
- import { a as ApiKeyDraft, c as ApiKeysControllerOptions, d as ApiKeyAuth, f as ApiKeyContributions, i as ApiKeyChange, l as ApiKeysSnapshot, m as withApiKey, n as ApiKeysEvents, o as ApiKeysActions, p as WithApiKeyOptions, r as apiKeysEvents, s as ApiKeysController, t as apiKeysBlock, u as createApiKeysController } from "../../index-DXUiRyEk.js";
1
+ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
2
+ import { _ as createApiKeys, a as ApiKeyExtraClaims, c as ApiKeyState, d as CreateApiKeyInput, f as CreatedApiKey, g as apiKeyResolver, h as apiKeyClaims, i as ApiKeyExtraClaim, l as ApiKeys, m as apiKeyChecksum, n as ApiKeyCheck, o as ApiKeyReservedClaim, p as ParsedApiKey, r as ApiKeyClaimsOptions, s as ApiKeyResolverOptions, t as ApiKey, u as ApiKeysOptions, v as parseApiKey } from "../../api-keys-C82fMru4.js";
3
+ import { a as ApiKeyDraft, c as ApiKeysControllerOptions, d as ApiKeyAuth, f as ApiKeyContributions, i as ApiKeyChange, l as ApiKeysSnapshot, m as withApiKey, n as ApiKeysEvents, o as ApiKeysActions, p as WithApiKeyOptions, r as apiKeysEvents, s as ApiKeysController, t as apiKeysBlock, u as createApiKeysController } from "../../index-CnzGRpeH.js";
4
4
  export { type ApiKey, type ApiKeyAuth, type ApiKeyChange, type ApiKeyCheck, type ApiKeyClaimsOptions, type ApiKeyContributions, type ApiKeyDraft, type ApiKeyExtraClaim, type ApiKeyExtraClaims, type ApiKeyReservedClaim, type ApiKeyResolverOptions, type ApiKeyState, type ApiKeys, type ApiKeysActions, type ApiKeysController, type ApiKeysControllerOptions, type ApiKeysEvents, type ApiKeysOptions, type ApiKeysSnapshot, type BlockTransport, type CreateApiKeyInput, type CreatedApiKey, type ParsedApiKey, type WithApiKeyOptions, apiKeyChecksum, apiKeyClaims, apiKeyResolver, apiKeysBlock, apiKeysEvents, createApiKeys, createApiKeysController, dbTransport, parseApiKey, rpcTransport, sqlTransport, withApiKey };
@@ -1,7 +1,15 @@
1
- import { A as CollaborationEventData, Ct as Events } from "../../events-DVt3Z9hw.js";
2
- import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
3
- import { c as BlockOf } from "../../define-block-COmMkx2x.js";
4
- import { a as ApprovalRequestDetail, c as ApprovalStep, d as createApprovals, i as ApprovalRequest, l as Approvals, n as ApprovalDecision, o as ApprovalRequestInput, r as ApprovalListOptions, s as ApprovalStatus, t as ApprovalApprovers, u as ApprovalsOptions } from "../../approvals-DZoGtNFv.js";
1
+ import { A as CollaborationEventData, Ct as Events } from "../../events-DCw3c6pj.js";
2
+ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
3
+ import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
4
+ import { a as ApprovalPolicyInput, c as ApprovalRequestInput, d as ApprovalStep, f as ApprovalTenantPolicy, g as createApprovals, h as approvalFingerprint, i as ApprovalMode, l as ApprovalRequirement, m as ApprovalsOptions, n as ApprovalDecision, o as ApprovalRequest, p as Approvals, r as ApprovalListOptions, s as ApprovalRequestDetail, t as ApprovalApprovers, u as ApprovalStatus } from "../../approvals-DqCv7f-G.js";
5
+ /** `approval_policy.saved` and `approval_policy.removed`. */
6
+ interface ApprovalPolicyEventData {
7
+ readonly organizationId: string;
8
+ /** The tenant policy. */
9
+ readonly id: string;
10
+ readonly subjectType: string;
11
+ readonly action: string;
12
+ }
5
13
  /** The events of the `approvals` block: type to data. */
6
14
  type ApprovalsEvents = {
7
15
  readonly "approval.requested": CollaborationEventData;
@@ -10,9 +18,12 @@ type ApprovalsEvents = {
10
18
  readonly "approval.cancelled": CollaborationEventData;
11
19
  readonly "approval.expired": CollaborationEventData;
12
20
  readonly "approval.delegated": CollaborationEventData;
21
+ readonly "approval.consumed": CollaborationEventData;
22
+ readonly "approval_policy.saved": ApprovalPolicyEventData;
23
+ readonly "approval_policy.removed": ApprovalPolicyEventData;
13
24
  };
14
25
  /** The `approvals` block's event types, for its manifest and `onBlockEvent`. */
15
26
  export declare const approvalsEvents: Events<ApprovalsEvents>;
16
27
  /** The `approvals` block's manifest (ADR 0029). */
17
28
  export declare const approvalsBlock: BlockOf<"approvals", typeof createApprovals, ApprovalsEvents>;
18
- export { type ApprovalApprovers, type ApprovalDecision, type ApprovalListOptions, type ApprovalRequest, type ApprovalRequestDetail, type ApprovalRequestInput, type ApprovalStatus, type ApprovalStep, type Approvals, type ApprovalsEvents, type ApprovalsOptions, type BlockTransport, createApprovals, dbTransport, rpcTransport, sqlTransport };
29
+ export { type ApprovalApprovers, type ApprovalDecision, type ApprovalListOptions, type ApprovalMode, type ApprovalPolicyInput, type ApprovalRequest, type ApprovalRequestDetail, type ApprovalRequestInput, type ApprovalRequirement, type ApprovalStatus, type ApprovalStep, type ApprovalTenantPolicy, type Approvals, type ApprovalsEvents, type ApprovalsOptions, type BlockTransport, approvalFingerprint, createApprovals, dbTransport, rpcTransport, sqlTransport };