permdock 0.8.0 → 0.10.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 (277) hide show
  1. package/dist/a2a/index.d.ts +4 -4
  2. package/dist/a2a/index.js +3 -3
  3. package/dist/{action-result-CL-QCITA.d.ts → action-result-BcudBQOF.d.ts} +1 -1
  4. package/dist/active-tenant-DVee32-T.js +39 -0
  5. package/dist/{adoption-scan-BLs67P1l.js → adoption-scan-0oFt2RD5.js} +1 -1
  6. package/dist/agent/index.d.ts +2 -2
  7. package/dist/agent/index.js +1 -1
  8. package/dist/ai-sdk/index.d.ts +3 -3
  9. package/dist/ai-sdk/index.js +3 -3
  10. package/dist/{approval-prompt-PYagyQUj.d.ts → approval-prompt-3BqWczTt.d.ts} +1 -1
  11. package/dist/approvals/index.d.ts +3 -3
  12. package/dist/{arazzo-3RhGfkAK.js → arazzo-DA9PCXew.js} +1 -1
  13. package/dist/{arazzo-B5-ulWif.js → arazzo-DhxDfYt-.js} +2 -2
  14. package/dist/astro/index.d.ts +4 -4
  15. package/dist/astro/index.js +1 -1
  16. package/dist/{audience-BAkBDMqn.js → audience-DTjR8xet.js} +1 -1
  17. package/dist/authzen/index.d.ts +5 -5
  18. package/dist/authzen/index.js +1 -1
  19. package/dist/{automation-DqEoWHBc.d.ts → automation-C6Jg75xq.d.ts} +1 -1
  20. package/dist/better-auth/index.d.ts +1 -1
  21. package/dist/better-supabase/index.d.ts +192 -27
  22. package/dist/better-supabase/index.js +248 -64
  23. package/dist/{bind-D_sZSVA3.js → bind-BNQA9JK9.js} +7 -3
  24. package/dist/{bind-Cp2hBHzP.d.ts → bind-YYjvfpB9.d.ts} +12 -7
  25. package/dist/{build-instance-CNWaYJyr.js → build-instance-BWXqwQYU.js} +1 -1
  26. package/dist/{capability-ChuiONQU.d.ts → capability-Di9tiUvi.d.ts} +1 -1
  27. package/dist/{casbin-H0rKxBx2.js → casbin-BJu2liqU.js} +1 -1
  28. package/dist/{casbin-cbSbhT_k.js → casbin-BkhqGh2z.js} +1 -1
  29. package/dist/catalog/index.d.ts +4 -4
  30. package/dist/catalog/index.js +2 -2
  31. package/dist/{catalog-BFpz2EmT.js → catalog-CGlSwU6j.js} +2 -2
  32. package/dist/catalog-D3oS2GH3.js +1 -0
  33. package/dist/{catalog-DCspHDc8.js → catalog-amPDr0JQ.js} +1 -1
  34. package/dist/{catalog-operations-Dadrl7Z-.js → catalog-operations-DeHTrJSV.js} +1 -1
  35. package/dist/chat/index.d.ts +1 -1
  36. package/dist/chat/index.js +1 -1
  37. package/dist/chat-sdk/index.d.ts +3 -3
  38. package/dist/claude-agent/index.d.ts +3 -3
  39. package/dist/claude-agent/index.js +2 -2
  40. package/dist/clerk/index.d.ts +2 -2
  41. package/dist/cli/bin.js +1 -1
  42. package/dist/cli/index.d.ts +9 -4
  43. package/dist/cli/index.js +11 -3
  44. package/dist/cloud/index.d.ts +8 -8
  45. package/dist/{cloud-BFlGMaak.js → cloud-3RIuS4E9.js} +2 -2
  46. package/dist/{codemod-DLQ9Zpo4.js → codemod-DLcp-B6v.js} +2 -2
  47. package/dist/{codemod-DWSN2erG.js → codemod-DRl_w-bY.js} +1 -1
  48. package/dist/collect-D-eroIfV.js +1 -0
  49. package/dist/{collect-Bzv3le0A.js → collect-D9Tt0Bcx.js} +2 -2
  50. package/dist/{collect-B7ZFAJU3.js → collect-WCl8cJQV.js} +1 -1
  51. package/dist/compile/index.d.ts +1 -1
  52. package/dist/{compile-BFzysW3o.d.ts → compile-BEklRUYo.d.ts} +2 -2
  53. package/dist/{completion-saoYiRFO.js → completion-VSWvaaPO.js} +1 -1
  54. package/dist/{config-BwPBfN0t.js → config-BR23fL8m.js} +2 -2
  55. package/dist/{config-DBeXXmBF.js → config-kL36AxkE.js} +1 -1
  56. package/dist/{config-report-BipSWA6V.js → config-report-osnfUNg5.js} +3 -3
  57. package/dist/{config-shape-ykV0Vm2n.js → config-shape-tsxHx71E.js} +2 -1
  58. package/dist/convex/index.d.ts +4 -4
  59. package/dist/convex/index.js +2 -2
  60. package/dist/{core-hWIARPDz.d.ts → core-CFepFiDP.d.ts} +2 -2
  61. package/dist/{core-H-mbhpZc.js → core-DzVINFbU.js} +3 -3
  62. package/dist/{create-Cq4Uox0f.js → create-6EwRQlig.js} +3 -3
  63. package/dist/{create-_noSrY1T.js → create-BLPKnJKa.js} +23 -7
  64. package/dist/{create-BSNrVuxh.d.ts → create-BPUopdfL.d.ts} +7 -7
  65. package/dist/{create-CM1FciYG.d.ts → create-CDd9c22W.d.ts} +15 -6
  66. package/dist/{create-BVq1lNQE.d.ts → create-DBvUsgzK.d.ts} +4 -4
  67. package/dist/delivery/index.d.ts +4 -4
  68. package/dist/delivery/index.js +1 -1
  69. package/dist/{denied-text-CHNlVInN.d.ts → denied-text-DHldhVUv.d.ts} +1 -1
  70. package/dist/{describe-ByS9LgHK.d.ts → describe-BbFPBSms.d.ts} +1 -1
  71. package/dist/{diff-CN8IYhC_.js → diff-BwR1JdP2.js} +1 -1
  72. package/dist/{diff-iZWV65nC.js → diff-CQegtBAo.js} +2 -2
  73. package/dist/{doctor-D3wo-yuz.js → doctor-B9FY9H0F.js} +2 -2
  74. package/dist/{doctor-CHD1M9R5.js → doctor-DfTnMaUt.js} +144 -16
  75. package/dist/drizzle/index.d.ts +3 -3
  76. package/dist/elysia/index.d.ts +4 -4
  77. package/dist/elysia/index.js +1 -1
  78. package/dist/{errors-zi_4T-rx.d.ts → errors-BIM4MFsJ.d.ts} +1 -1
  79. package/dist/{evaluate-Dd8Ta0Ie.js → evaluate-BAmf_AQd.js} +13 -4
  80. package/dist/{evaluations-z8dQFDaN.d.ts → evaluations-DOWuBpWv.d.ts} +3 -3
  81. package/dist/eve/index.d.ts +4 -4
  82. package/dist/eve/index.js +2 -2
  83. package/dist/express/index.d.ts +4 -4
  84. package/dist/express/index.js +1 -1
  85. package/dist/fastify/index.d.ts +4 -4
  86. package/dist/fastify/index.js +1 -1
  87. package/dist/{fetch-adapter-C1DCvpqV.d.ts → fetch-adapter-BIbBAtPZ.d.ts} +2 -2
  88. package/dist/{fetch-adapter-JL43jD3E.js → fetch-adapter-dPTgJVHd.js} +1 -1
  89. package/dist/{fields-D0vUI6dq.js → fields-DI8s3cPl.js} +1 -1
  90. package/dist/{gen-DWCYcMQM.js → gen-DuAhghDw.js} +2 -2
  91. package/dist/{gen-B5kvbAoZ.js → gen-DwgCSC6V.js} +1 -1
  92. package/dist/h3/index.d.ts +4 -4
  93. package/dist/h3/index.js +2 -2
  94. package/dist/hono/index.d.ts +4 -4
  95. package/dist/hono/index.js +1 -1
  96. package/dist/{hosted-Cmtxogd0.d.ts → hosted-DVxlLZMe.d.ts} +1 -1
  97. package/dist/{import-CST57XLp.js → import-CNBF96hB.js} +2 -2
  98. package/dist/{import-_YqhhwvX.js → import-Iuk9mx8A.js} +1 -1
  99. package/dist/{index-BhxEUY9J.d.ts → index-BinlXeU-.d.ts} +2 -2
  100. package/dist/{index-B8s204GL.d.ts → index-CV-7DWeD.d.ts} +4 -4
  101. package/dist/{index-BW_0MZOS.d.ts → index-Cay5-Kvx.d.ts} +13 -8
  102. package/dist/{index-_9UiQIkt.d.ts → index-DJwEgYzA.d.ts} +4 -4
  103. package/dist/{index-BT5-1VsX.d.ts → index-Dj2qF9VC.d.ts} +1 -1
  104. package/dist/{index-Bv5iXPqU.d.ts → index-ymept53A.d.ts} +4 -4
  105. package/dist/index.d.ts +16 -15
  106. package/dist/index.js +6 -6
  107. package/dist/{init-cE3A8aXq.js → init-DeoSvkh2.js} +1 -1
  108. package/dist/{init-Dz_PsHdv.js → init-fNF_XmTa.js} +3 -3
  109. package/dist/{instance-options-B0KXqTrJ.d.ts → instance-options-CoHn-0e8.d.ts} +1 -1
  110. package/dist/{instance-snapshot--JWiTrvO.js → instance-snapshot-DuWf1cT3.js} +13 -8
  111. package/dist/jwt/index.d.ts +4 -4
  112. package/dist/jwt/index.js +1 -1
  113. package/dist/{kernel-C-fYydV2.js → kernel-qv4cr9w8.js} +4 -4
  114. package/dist/kysely/index.d.ts +3 -3
  115. package/dist/{login-DplQ0s84.js → login-CutVtcmQ.js} +1 -1
  116. package/dist/{login-D-8tMqzo.js → login-DYazeWc9.js} +3 -3
  117. package/dist/{manifest-Cgiq5oqc.js → manifest-B4ENCp2I.js} +35 -35
  118. package/dist/{manifest-CzzWtnAb.d.ts → manifest-B5yF3CIq.d.ts} +19 -0
  119. package/dist/{manifest-wg8WkkpD.js → manifest-BXTbHNIV.js} +1 -1
  120. package/dist/{manifest-schema-2r37XRhD.js → manifest-schema-DQkBK2Mr.js} +28 -1
  121. package/dist/{map-claims-BNWCJtmP.js → map-claims-C-nv08_n.js} +2 -1
  122. package/dist/mcp/index.d.ts +8 -8
  123. package/dist/mcp/index.js +4 -4
  124. package/dist/{migrate-B7oP_sQU.js → migrate-BJHxQqT5.js} +2 -2
  125. package/dist/{module-values-BJTBdo6y.js → module-values-B1EVTkHP.js} +1 -1
  126. package/dist/nest/index.d.ts +4 -4
  127. package/dist/nest/index.js +1 -1
  128. package/dist/next/index.d.ts +32 -12
  129. package/dist/next/index.js +15 -8
  130. package/dist/next/plugin.d.ts +1 -1
  131. package/dist/next/plugin.js +1 -1
  132. package/dist/node/index.d.ts +4 -4
  133. package/dist/node/index.js +1 -1
  134. package/dist/openai/index.d.ts +4 -4
  135. package/dist/openai/index.js +3 -3
  136. package/dist/openapi/index.d.ts +2 -2
  137. package/dist/{openapi-VeHHU2l9.js → openapi-C-ADypaY.js} +1 -1
  138. package/dist/{openapi-CBZUhA3l.js → openapi-DFj0cirS.js} +2 -2
  139. package/dist/orpc/index.d.ts +5 -5
  140. package/dist/orpc/index.js +2 -2
  141. package/dist/otel/index.d.ts +3 -3
  142. package/dist/{output-tkju6U7R.js → output-LsbLe41I.js} +1 -1
  143. package/dist/{ownership-B4L59T9u.js → ownership-qqBuGJXr.js} +11 -6
  144. package/dist/{parse-local-manifest-BQhTlLQS.d.ts → parse-local-manifest-CCmbhnxP.d.ts} +1 -1
  145. package/dist/pdp/index.d.ts +3 -3
  146. package/dist/pdp/index.js +1 -1
  147. package/dist/{permdock-L-_I_3zP.js → permdock-BvjivVb9.js} +143 -107
  148. package/dist/{permdock-B6Sf4T_S.d.ts → permdock-CprAPN3w.d.ts} +9 -2
  149. package/dist/{permissions-mDcTWoBs.js → permissions-CYcHj_w7.js} +1 -1
  150. package/dist/{policy-Ba4bDhaj.d.ts → policy-BycVKnXv.d.ts} +1 -1
  151. package/dist/{policy-from-catalog-CJgOm6aq.js → policy-from-catalog-CU3An8uP.js} +1 -1
  152. package/dist/{policy-types-CCiDRZBH.d.ts → policy-types-DGIO_gxq.d.ts} +54 -18
  153. package/dist/{postgrest-DicQyqm-.d.ts → postgrest-D5nUGm-c.d.ts} +4 -3
  154. package/dist/{postgrest-D4nuPXIQ.js → postgrest-DAxFltvO.js} +35 -56
  155. package/dist/{powersync-DXqGuq9A.js → powersync-B_8uwz7f.js} +2 -2
  156. package/dist/powersync-CSzDCHRu.js +1 -0
  157. package/dist/{powersync-DHNQX06W.js → powersync-DUT-UKgw.js} +190 -38
  158. package/dist/prisma/index.d.ts +2 -2
  159. package/dist/{protected-action-BE7N_Luo.d.ts → protected-action-D8x73IGm.d.ts} +6 -6
  160. package/dist/{provider-DXfq5c2d.d.ts → provider-DfLeek9O.d.ts} +1 -1
  161. package/dist/{pull-CwpGaQSi.js → pull-DQCgvJSC.js} +2 -2
  162. package/dist/pull-DYbyod1f.js +1 -0
  163. package/dist/{push-DgssgzkK.js → push-Dq_ca4-j.js} +3 -3
  164. package/dist/{pushed-policy-ITwYKvvH.js → pushed-policy-CDuOL2de.js} +1 -1
  165. package/dist/{pushed-policy-D1Eoi6NM.d.ts → pushed-policy-CryQheKq.d.ts} +1 -1
  166. package/dist/react/index.d.ts +7 -7
  167. package/dist/react/provider-client.d.ts +1 -1
  168. package/dist/react-native/index.d.ts +9 -9
  169. package/dist/{replay-DNftIb_R.d.ts → replay-Bs9Df2fQ.d.ts} +1 -1
  170. package/dist/{request-context-C25ilqiJ.js → request-context-Duzdf0cd.js} +1 -1
  171. package/dist/resend/index.d.ts +4 -4
  172. package/dist/{resolve-names-CF7xXLSG.js → resolve-names-Y1Cb22cp.js} +4 -4
  173. package/dist/{rls-CNEH2_BG.js → rls-B57mIeVq.js} +34 -20
  174. package/dist/{rls-Ca8Jz9b5.js → rls-j0YrFPpW.js} +1 -1
  175. package/dist/{rpc-fNqAIqQk.js → rpc-vHIwyXCp.js} +1 -1
  176. package/dist/run-BATawNVH.js +1 -0
  177. package/dist/{run-Bz26OTfO.js → run-CLP_fQUF.js} +3 -3
  178. package/dist/{run-ticket-Dv7aF7Dk.js → run-ticket-DfnZCh-u.js} +19 -6
  179. package/dist/{run-ticket-DbWI9f99.d.ts → run-ticket-ylovhyFQ.d.ts} +18 -3
  180. package/dist/{saas-iWnUdwCt.js → saas-DK4V-3Is.js} +2 -2
  181. package/dist/{scan-DCj1KQfn.js → scan-B7xrAvRm.js} +1 -1
  182. package/dist/{schema-Dst9I9Gs.js → schema-3PJ8wAeL.js} +1 -1
  183. package/dist/scim/index.d.ts +1 -1
  184. package/dist/server/index.d.ts +11 -11
  185. package/dist/server/index.js +2 -2
  186. package/dist/{server-types-CIlpSA2G.d.ts → server-types-CyRN0-Cd.d.ts} +15 -8
  187. package/dist/{shared-Afctg7B0.js → shared-DrGLwM3s.js} +1 -1
  188. package/dist/{sink-Dvi7YZG_.d.ts → sink-B5zoUW_O.d.ts} +2 -2
  189. package/dist/{skills-OuoMR49L.js → skills-BUI8DMqy.js} +1 -1
  190. package/dist/{skills-Bjj7BNEQ.js → skills-iwbRxavw.js} +1 -1
  191. package/dist/{snapshot-cache-BAXZ0KOp.d.ts → snapshot-cache-BjAWkchD.d.ts} +1 -1
  192. package/dist/solid/index.d.ts +6 -6
  193. package/dist/solid-start/index.d.ts +4 -4
  194. package/dist/solid-start/index.js +2 -2
  195. package/dist/{sources-CMAM-2A3.js → sources-C4vkzZJV.js} +12 -7
  196. package/dist/{types-ah9NlU6j.d.ts → sources-oB1Hg1Fm.d.ts} +316 -2
  197. package/dist/{src-DZ0l9UAg.js → src-C_pi2Rnh.js} +106 -5
  198. package/dist/ssf/index.d.ts +3 -3
  199. package/dist/{standard-webhooks-C-qX4mJW.d.ts → standard-webhooks-DOYEuOLx.d.ts} +2 -2
  200. package/dist/{stores-C0Kta5Ft.d.ts → stores-DZJvxFIZ.d.ts} +6 -6
  201. package/dist/{stream-ltuLdtTG.d.ts → stream-9y9qw51m.d.ts} +1 -1
  202. package/dist/supabase/index.d.ts +5 -6
  203. package/dist/supabase/index.js +4 -4
  204. package/dist/supabase/middleware.d.ts +5 -5
  205. package/dist/supabase/middleware.js +4 -4
  206. package/dist/{supabase-BL1qJzzY.js → supabase-B1EfuD47.js} +2 -2
  207. package/dist/{supabase-D39cuGPt.js → supabase-BaizG0n7.js} +2 -2
  208. package/dist/{supabase-hook-B-yXnzUl.js → supabase-hook-BT2P9wah.js} +110 -47
  209. package/dist/supabase-hook-CbvGAutK.js +1 -0
  210. package/dist/{supautils-BU-pAEpf.js → supautils-DBKOoyjn.js} +247 -200
  211. package/dist/svelte/index.d.ts +6 -6
  212. package/dist/svelte/runtime.d.ts +3 -3
  213. package/dist/svelte/source.d.ts +6 -6
  214. package/dist/sveltekit/index.d.ts +4 -4
  215. package/dist/sveltekit/index.js +1 -1
  216. package/dist/{tables-DeMNEy6V.js → tables-DimBcVWY.js} +3 -3
  217. package/dist/tanstack-start/index.d.ts +4 -4
  218. package/dist/tanstack-start/index.js +1 -1
  219. package/dist/terminal/index.d.ts +5 -5
  220. package/dist/terminal/index.js +2 -2
  221. package/dist/testing/core.d.ts +1 -1
  222. package/dist/testing/core.js +1 -1
  223. package/dist/testing/fixtures/index.d.ts +1 -1
  224. package/dist/testing/fixtures/index.js +26 -28
  225. package/dist/testing/index.d.ts +23 -21
  226. package/dist/testing/index.js +64 -10
  227. package/dist/testing/saas/index.d.ts +3 -3
  228. package/dist/testing/saas/index.js +2 -2
  229. package/dist/testing/saas/permissions.js +1 -1
  230. package/dist/trpc/index.d.ts +5 -5
  231. package/dist/trpc/index.js +2 -2
  232. package/dist/{type-helpers-BIPIDa6a.d.ts → type-helpers-c7Xo_2Cu.d.ts} +1 -1
  233. package/dist/{types-B2mlGuhW.d.ts → types-B2efzoSX.d.ts} +1 -1
  234. package/dist/{types-DHKPcqzr.d.ts → types-B6ExllNo.d.ts} +2 -2
  235. package/dist/{types-AMJ5qoU_.d.ts → types-BB-zWDcR.d.ts} +4 -4
  236. package/dist/{types-djVzLlIV.d.ts → types-CEinc15V.d.ts} +4 -4
  237. package/dist/{types-yUuPR5Hy.d.ts → types-CN0LsqbK.d.ts} +3 -3
  238. package/dist/{types-HzqOtvsJ.d.ts → types-CWBsAwqn.d.ts} +4 -4
  239. package/dist/{types-DC1Loeh3.d.ts → types-Cklw5hJo.d.ts} +26 -3
  240. package/dist/{types-B_tiYvk8.d.ts → types-DLvhVm1r.d.ts} +1 -1
  241. package/dist/{types-B4uqKDnp.d.ts → types-DlelvQk4.d.ts} +2 -2
  242. package/dist/{types-DjuMBNF9.d.ts → types-DsHGPtkR.d.ts} +2 -2
  243. package/dist/{types-BJk0BKRX.d.ts → types-rCRV4Ge-.d.ts} +4 -4
  244. package/dist/{types-B_d_g7T3.d.ts → types-tQB2CEnY.d.ts} +4 -4
  245. package/dist/unplugin/index.d.ts +1 -1
  246. package/dist/unplugin/index.js +1 -1
  247. package/dist/{usage-ab0PdusX.js → usage-B1ZJOUdr.js} +1 -1
  248. package/dist/{usage-CxEzS4ey.js → usage-t_nXnwCW.js} +3 -3
  249. package/dist/usage-weohzv2f.js +1 -0
  250. package/dist/{validation-error-YGg2mXyH.d.ts → validation-error-uvp-kyfO.d.ts} +1 -1
  251. package/dist/{verify-DZeqoWu5.js → verify-jHrbmn-E.js} +9 -9
  252. package/dist/version-cache-Df11C2Qp.d.ts +51 -0
  253. package/dist/vue/index.d.ts +6 -6
  254. package/dist/{waiter-Bu9zAlE0.d.ts → waiter-CqUKX6CY.d.ts} +2 -2
  255. package/dist/{watch-Cx_WciLE.js → watch-Bpci3hBY.js} +2 -2
  256. package/dist/watch-COuvly20.js +1 -0
  257. package/dist/webmcp/index.d.ts +1 -1
  258. package/dist/{who-can-rI7dCR9Q.js → who-can-BoDJm0Nc.js} +1 -1
  259. package/dist/workflow/index.d.ts +3 -3
  260. package/dist/workflow/index.js +23 -7
  261. package/dist/workflow-sdk/index.d.ts +4 -4
  262. package/dist/{wrap-DlJE3gS_.d.ts → wrap-DxXB54Wu.d.ts} +2 -2
  263. package/package.json +3 -3
  264. package/schemas/run-v1.json +16 -0
  265. package/schemas/supabase-manifest-v1.json +28 -0
  266. package/skills/permdock-agents/references/operations-automations-chat.md +1 -0
  267. package/skills/permdock-data/references/queries-and-rls.md +1 -1
  268. package/skills/permdock-wire/references/adapters.md +4 -3
  269. package/dist/catalog-mRQQQhNK.js +0 -1
  270. package/dist/collect-B5BL3klN.js +0 -1
  271. package/dist/powersync-Djf-zCpB.js +0 -1
  272. package/dist/pull-B65ndFNZ.js +0 -1
  273. package/dist/run-D-JE8QWb.js +0 -1
  274. package/dist/sources-B1Os_YUu.d.ts +0 -312
  275. package/dist/supabase-hook-H-MtE9Wd.js +0 -1
  276. package/dist/usage-CYeXek0p.js +0 -1
  277. package/dist/watch-DB42U1ib.js +0 -1
@@ -1,6 +1,8 @@
1
- import { Zt as AuthEvent, sr as Principal } from "./policy-types-CCiDRZBH.js";
1
+ import { nt as MembershipSource, pr as Principal, rn as AuthEvent } from "./policy-types-DGIO_gxq.js";
2
2
  import { t as ClaimsMap } from "./claims-map-D1Pb5oRq.js";
3
3
  import { t as ClientNames } from "./clients-C_NOET3z.js";
4
+ import { c as SupabaseManifestMembership } from "./manifest-B5yF3CIq.js";
5
+ import { t as SqlQuery } from "./sql-B80DFdpG.js";
4
6
  import { StandardSchemaV1 } from "@standard-schema/spec";
5
7
  //#region src/supabase/claims.d.ts
6
8
  /**
@@ -404,4 +406,316 @@ type SupabaseDelegation = {
404
406
  readonly scopes: readonly string[];
405
407
  };
406
408
  //#endregion
407
- export { SupabaseClaims as C, SupabasePermDockClaims as D, SupabaseMembershipClaim as E, supabaseClaims as O, SupabaseActClaim as S, SupabaseClaimsSchema as T, SupabaseStorage as _, SupabaseActor as a, SupabaseSuspendedScope as b, SupabaseInclude as c, SupabasePrincipal as d, SupabaseRealtime as f, SupabaseSessionLike as g, SupabaseRlsOptions as h, SupabaseActiveRow as i, SupabaseMembershipTable as l, SupabaseRlsMembershipTable as m, RoleMap as n, SupabaseActorResult as o, SupabaseRlsConfig as p, RoleThrough as r, SupabaseDelegation as s, AuthorizeSqlOptions as t, SupabasePermissionRef as u, SupabaseSubjectOptions as v, SupabaseClaimsOptions as w, SupabaseSuspension as x, SupabaseSuspendedMembership as y };
409
+ //#region src/supabase/roles.d.ts
410
+ /** A roles table a role column references, by `schema.table`. */
411
+ type RoleKeys = {
412
+ readonly table: string;
413
+ /** The roles table column the reference points at. */
414
+ readonly id: string;
415
+ /** The roles table column holding the role key. */
416
+ readonly key: string;
417
+ /** The referencing table's column. */
418
+ readonly ref: string;
419
+ /**
420
+ * Every referencing column and the column of `table` it matches, `ref` and
421
+ * `id` first; more than one pair for a composite reference.
422
+ */
423
+ readonly match: readonly (readonly [ref: string, id: string])[];
424
+ };
425
+ /**
426
+ * One role source of a membership row: a key column, or a reference to a roles
427
+ * table.
428
+ */
429
+ type RoleSource = string | RoleThrough | RoleMap;
430
+ /** A role source, or several the row holds at once. */
431
+ type RoleSpec = RoleSource | readonly RoleSource[];
432
+ /**
433
+ * A roles table whose tenant rows are written by tenants. A role key read
434
+ * through it from a tenant row that is one of `declared` reads as null, so a
435
+ * tenant cannot claim the grants of a declared role by naming a role after it.
436
+ */
437
+ type RoleGuard = {
438
+ /** `schema.table`, or `public`. */
439
+ readonly table: string;
440
+ /** The tenant column of the roles table. */
441
+ readonly tenant: string;
442
+ /**
443
+ * A tenant row with this column true is the application's own copy of a
444
+ * declared role.
445
+ */
446
+ readonly skip?: string | undefined;
447
+ readonly declared: readonly string[];
448
+ };
449
+ //#endregion
450
+ //#region src/supabase/sources.d.ts
451
+ type Common = {
452
+ readonly table: string;
453
+ /**
454
+ * Runs the lookups; without it the source only describes SQL (for `permdock
455
+ * supabase hook generate`).
456
+ */
457
+ readonly query?: SqlQuery;
458
+ /**
459
+ * Drop suspended users and memberships under suspended instances, like
460
+ * `rls.suspension`.
461
+ */
462
+ readonly suspension?: SupabaseSuspension;
463
+ };
464
+ type MembershipTableOptions = Common & {
465
+ /**
466
+ * Column names; `user`, `scope`, `id` and `role` default to `user_id`,
467
+ * `scope`, `scope_id`, `role`.
468
+ */
469
+ readonly columns?: {
470
+ /** The user id column, or a reference to a table that holds the user id. */
471
+ readonly user?: string | RoleThrough;
472
+ readonly scope?: string;
473
+ readonly id?: string;
474
+ /** A `jsonb` column of ancestor ids keyed by scope name. */
475
+ readonly within?: string;
476
+ /**
477
+ * The role key column, a reference to a roles table that holds the key, or
478
+ * several of them: the row holds every non-null key.
479
+ */
480
+ readonly role?: RoleSpec;
481
+ readonly via?: string;
482
+ readonly expiresAt?: string;
483
+ readonly disabledAt?: string;
484
+ /** The principal id that wrote the membership (`grantedBy`). */
485
+ readonly grantedBy?: string;
486
+ /** Free-text justification recorded on the membership (`reason`). */
487
+ readonly reason?: string;
488
+ /** A subgroup column filling `member.group`. */
489
+ readonly group?: string;
490
+ /**
491
+ * A text column; the value `idp` marks the row as owned by the identity
492
+ * provider.
493
+ */
494
+ readonly managedBy?: string;
495
+ /** A `text[]` column of seats. */
496
+ readonly seats?: string;
497
+ /** A `jsonb` column of app data (`Membership.x`); never written into claims. */
498
+ readonly x?: string;
499
+ };
500
+ };
501
+ type MembershipJunctionOptions = Common & {
502
+ /** The declared scope every row is a membership of. */
503
+ readonly scope: string;
504
+ /**
505
+ * The user id column (default `user_id`), or a reference to a table that
506
+ * holds the user id.
507
+ */
508
+ readonly user?: string | RoleThrough;
509
+ /** The column holding the scope instance id. Default `<scope>_id`. */
510
+ readonly id?: string;
511
+ /** Ancestor id columns keyed by scope name. */
512
+ readonly within?: Readonly<Record<string, string>>;
513
+ /**
514
+ * A role column, a reference to a roles table that holds the key, fixed roles
515
+ * every row holds (a contact table with no role column), or `{ sources }`:
516
+ * several role columns whose non-null keys the row holds.
517
+ */
518
+ readonly roles: string | RoleThrough | RoleMap | readonly string[] | {
519
+ readonly sources: readonly RoleSource[];
520
+ };
521
+ /** The membership kind every row has (`contact`, `staff`, `partner`). */
522
+ readonly via?: string;
523
+ readonly expiresAt?: string;
524
+ readonly disabledAt?: string;
525
+ /** The principal id that wrote the membership (`grantedBy`). */
526
+ readonly grantedBy?: string;
527
+ /** Free-text justification recorded on the membership (`reason`). */
528
+ readonly reason?: string;
529
+ /** A subgroup filling `member.group`: a fixed name every row has, or a column. */
530
+ readonly group?: string | {
531
+ readonly column: string;
532
+ };
533
+ /**
534
+ * `idp` when the identity provider owns every row, or a text column holding
535
+ * `idp` per row.
536
+ */
537
+ readonly managedBy?: "idp" | {
538
+ readonly column: string;
539
+ };
540
+ /** A `text[]` column of seats. */
541
+ readonly seats?: string;
542
+ /** A `jsonb` column of app data (`Membership.x`); never written into claims. */
543
+ readonly x?: string;
544
+ };
545
+ /**
546
+ * What `permdock supabase hook generate` compiles; the same SQL the source
547
+ * runs.
548
+ */
549
+ type MembershipSql = {
550
+ readonly table: string;
551
+ /**
552
+ * The table's user column: the user id, or with `userThrough` the reference
553
+ * to the row holding it.
554
+ */
555
+ readonly user: string;
556
+ /**
557
+ * The table that holds the user id when `user` references it; a change of
558
+ * that id bumps the old and the new user.
559
+ */
560
+ readonly userThrough?: RoleKeys;
561
+ /**
562
+ * `<table>.<user>%type`: the PL/pgSQL type of the user id column, for a
563
+ * variable `select` compares with.
564
+ */
565
+ readonly userType: string;
566
+ /**
567
+ * The `select` of claim rows for one user, with every filter applied. `user`
568
+ * must have the column's type (a `userType` variable, or an untyped `$1`
569
+ * Postgres infers): the column is compared uncast so its index applies.
570
+ * `keep` adds the `keep` column; it defaults to `keeps`, and a `union` with a
571
+ * source that keeps passes `true`.
572
+ */
573
+ select: (user: string, keep?: boolean) => string;
574
+ /** The `select` of member rows for one scope instance (`$1` scope, `$2` id). */
575
+ list: (keep?: boolean) => string;
576
+ /**
577
+ * A suspended scope on the source keeps permissions: rows of its suspended
578
+ * instances stay, with a `keep` column.
579
+ */
580
+ readonly keeps: boolean;
581
+ /**
582
+ * A text column holding `idp` for rows the identity provider owns; `''` when
583
+ * every row is owned.
584
+ */
585
+ readonly managed?: string;
586
+ /** Other tables the `select` reads (suspension tables). */
587
+ readonly reads: readonly string[];
588
+ /**
589
+ * The roles table the role column references; a key change bumps every
590
+ * holder's authorization version.
591
+ */
592
+ readonly through?: RoleKeys;
593
+ /** Every roles table the role columns reference, `through` first. */
594
+ readonly throughs: readonly RoleKeys[];
595
+ /**
596
+ * Every column that decides who holds which membership: user, scope, id,
597
+ * `within`, role, `via` and expiry.
598
+ */
599
+ readonly columns: readonly string[];
600
+ /**
601
+ * For a single-scope source: its scope and the scopes whose ids each row
602
+ * carries.
603
+ */
604
+ readonly scope?: string;
605
+ readonly holds?: readonly string[];
606
+ /** The source's entry in the hook manifest's `memberships`. */
607
+ readonly manifest: SupabaseManifestMembership;
608
+ /** What the ownership triggers count; absent on a source that is not a table. */
609
+ readonly holders?: MembershipHolders;
610
+ /**
611
+ * The rows as plain columns, for Sync Streams and `powerSyncSource`; a source
612
+ * without it does not sync.
613
+ */
614
+ readonly stream?: MembershipStream;
615
+ };
616
+ /**
617
+ * One membership source as columns a Sync Streams query can filter on. Tables
618
+ * are `schema.table`; a `through` table is qualified in the source's schema
619
+ * when it names none.
620
+ */
621
+ type MembershipStream = {
622
+ readonly table: string;
623
+ /** The user id column, or the reference to the table that holds the user id. */
624
+ readonly user: string | RoleThrough;
625
+ /** The scope column, or the scope every row is a membership of. */
626
+ readonly scope: {
627
+ readonly column: string;
628
+ } | {
629
+ readonly value: string;
630
+ };
631
+ readonly id: string;
632
+ /**
633
+ * The role sources (the row holds every non-null key), or the fixed roles
634
+ * every row holds.
635
+ */
636
+ readonly roles: RoleSpec | {
637
+ readonly value: readonly string[];
638
+ };
639
+ /** The membership kind column, or the kind every row has. */
640
+ readonly via?: {
641
+ readonly column: string;
642
+ } | {
643
+ readonly value: string;
644
+ };
645
+ readonly expiresAt?: string;
646
+ readonly disabledAt?: string;
647
+ /**
648
+ * A row may hold no role key: such a row is no membership, and a reader drops
649
+ * it.
650
+ */
651
+ readonly nullableRoles: boolean;
652
+ /**
653
+ * The guard the source reads its roles table with: a tenant row named like a
654
+ * declared role is no role.
655
+ */
656
+ readonly guard?: RoleGuard;
657
+ };
658
+ /**
659
+ * The rows of a membership table, for the holder-count and transfer-only
660
+ * triggers `permdock rls generate` puts on it. No suspension filter: a
661
+ * suspended holder still holds the role.
662
+ */
663
+ type MembershipHolders = {
664
+ /**
665
+ * `<table>.<id column>%type`: the type of a variable `rows` compares the id
666
+ * column with.
667
+ */
668
+ readonly idType: string;
669
+ /**
670
+ * The instance id of scope `scope` the PL/pgSQL record `row` holds, as text;
671
+ * null on a row of another scope.
672
+ */
673
+ id: (scope: string, row: string) => string;
674
+ /**
675
+ * `select id, user_id, role, via, live` over the rows of scope `scope` in
676
+ * `from` (default the table): one row per held role key, `live` false once
677
+ * expired. `id` is an expression of `idType` the id column must equal.
678
+ */
679
+ rows: (scope: string, options?: {
680
+ readonly id?: string;
681
+ readonly from?: string;
682
+ }) => string;
683
+ };
684
+ type SqlMembershipSource = MembershipSource & {
685
+ readonly sql: MembershipSql;
686
+ /**
687
+ * The same source with the role keys of tenant rows of `guard.table` named
688
+ * like a declared role read as null.
689
+ */
690
+ readonly guarded?: (guard: RoleGuard) => SqlMembershipSource;
691
+ };
692
+ /** The part of `@supabase/server`'s `PostgresApi` a `SqlQuery` needs. */
693
+ type SupabasePostgres = {
694
+ readonly queryRaw: (text: string, params?: unknown[]) => Promise<readonly Record<string, unknown>[]>;
695
+ };
696
+ declare function supabasePostgresQuery(postgres: SupabasePostgres): SqlQuery;
697
+ /**
698
+ * Memberships from one table holding every scope: a row per user, scope,
699
+ * instance and role (`user_id, scope, scope_id, role`), with optional `within`,
700
+ * `via`, expiry, owner and seat columns. Rows of the same instance merge into
701
+ * one membership.
702
+ */
703
+ declare function tableMembershipSource(options: MembershipTableOptions): SqlMembershipSource;
704
+ /**
705
+ * Memberships from a table of one scope (`customer_contacts`): every row is a
706
+ * membership of `scope`, with roles from a column or fixed (`['contact']`), a
707
+ * fixed `via`, and ancestor ids from `within` columns.
708
+ */
709
+ declare function junctionMembershipSource(options: MembershipJunctionOptions): SqlMembershipSource;
710
+ declare const AUTHZ_VERSION_TABLE = "permdock_authz_version";
711
+ /**
712
+ * Reads the authorization version `permdock supabase hook generate` keeps in
713
+ * `<schema>.permdock_authz_version`: pass it to `claimsFirst(sources, { version
714
+ * })`.
715
+ */
716
+ declare function authzVersion(options: {
717
+ readonly query: SqlQuery;
718
+ readonly schema?: string;
719
+ }): NonNullable<MembershipSource["version"]>;
720
+ //#endregion
721
+ export { SupabaseSubjectOptions as A, supabaseClaims as B, SupabasePrincipal as C, SupabaseRlsOptions as D, SupabaseRlsMembershipTable as E, SupabaseClaims as F, SupabaseClaimsOptions as I, SupabaseClaimsSchema as L, SupabaseSuspendedScope as M, SupabaseSuspension as N, SupabaseSessionLike as O, SupabaseActClaim as P, SupabaseMembershipClaim as R, SupabasePermissionRef as S, SupabaseRlsConfig as T, SupabaseActor as _, MembershipStream as a, SupabaseInclude as b, SupabasePostgres as c, supabasePostgresQuery as d, tableMembershipSource as f, SupabaseActiveRow as g, RoleThrough as h, MembershipSql as i, SupabaseSuspendedMembership as j, SupabaseStorage as k, authzVersion as l, RoleMap as m, MembershipHolders as n, MembershipTableOptions as o, AuthorizeSqlOptions as p, MembershipJunctionOptions as r, SqlMembershipSource as s, AUTHZ_VERSION_TABLE as t, junctionMembershipSource as u, SupabaseActorResult as v, SupabaseRealtime as w, SupabaseMembershipTable as x, SupabaseDelegation as y, SupabasePermDockClaims as z };
@@ -8,7 +8,7 @@ import { n as internalsOf } from "./internals-B3IgHrvo.js";
8
8
  import { c as listPermissions, i as getRegistry, n as findPermission, o as isPermission } from "./permission-registry-B8tYxPIt.js";
9
9
  import { n as isThenable$1 } from "./thenable-BNSM1U2R.js";
10
10
  import { c as isEdgeRelation, m as restrictedStops, o as groupEntries, s as isComputedRelation, u as isPrincipalRelation } from "./resource-relations-8-pCScBO.js";
11
- import { a as durationOf, g as secondsOf, m as rfc3339, p as nowSeconds } from "./time-nR1JesoH.js";
11
+ import { a as durationOf, f as nowMillis, g as secondsOf, m as rfc3339, p as nowSeconds } from "./time-nR1JesoH.js";
12
12
  import { a as normalizeMembership$1, d as scopeIdOf, f as scopeList, h as tenantOf, l as rootScope, o as normalizeMemberships$1, s as resolveScope$1, u as scopeChain } from "./scopes-0Up_UA2t.js";
13
13
  import { u as evaluateCondition } from "./delegation-CDB6_keF.js";
14
14
  import { _ as listPlans, a as authenticated, m as findRole, o as flattenGrantee } from "./grantee-Dke-9rd1.js";
@@ -16,12 +16,12 @@ import { m as tenantsOf, r as isMembershipExpired } from "./tenancy-5d1zVBvK.js"
16
16
  import { c as levelNames, i as grantList, n as declaredRoleNames } from "./policy-CLQ8__GF.js";
17
17
  import { o as isPortableCondition } from "./hosted-D0IzESu_.js";
18
18
  import { n as OPERATION_RISKS, r as isOperationRisk } from "./permissions-CVXmRILq.js";
19
- import { C as tenantCustomRoles, S as roleAllowKeys, f as customRoleId, l as ceilingGrants, m as customRoleScope, p as customRoleOf, x as resolveCustomRole } from "./evaluate-Dd8Ta0Ie.js";
20
- import { a as heldLevels, f as bindingOf, h as usesAssigns, m as roleMeta, n as snapshotScopes, o as collectSnapshotGrants, p as rankRoles, r as assignableCandidates, t as snapshotOf } from "./instance-snapshot--JWiTrvO.js";
19
+ import { C as tenantCustomRoles, S as roleAllowKeys, f as customRoleId, l as ceilingGrants, m as customRoleScope, p as customRoleOf, x as resolveCustomRole } from "./evaluate-BAmf_AQd.js";
20
+ import { a as heldLevels, f as bindingOf, h as usesAssigns, m as roleMeta, n as snapshotScopes, o as collectSnapshotGrants, p as rankRoles, r as assignableCandidates, t as snapshotOf } from "./instance-snapshot-DuWf1cT3.js";
21
21
  import { n as relationId } from "./relations-BxvRvDHK.js";
22
22
  import { i as snapshotGrant, r as plainPermission, t as buildSnapshot } from "./snapshot-CXlzi69u.js";
23
23
  import { n as LOCAL_CUSTOM_ROLE } from "./parse-local-manifest-DEiCF4ah.js";
24
- import { c as APP, r as resolveSubject } from "./permdock-L-_I_3zP.js";
24
+ import { c as APP, r as resolveSubject } from "./permdock-BvjivVb9.js";
25
25
  import { i as memoryApprovalStore } from "./store-RNFvaJJv.js";
26
26
  import { n as wrapPermDock } from "./wrap-B2wziJI_.js";
27
27
  //#region src/conditions/sql-function.ts
@@ -819,6 +819,107 @@ function signPolicyDocument(document, signer, options) {
819
819
  });
820
820
  }
821
821
  //#endregion
822
+ //#region src/core/version-cache.ts
823
+ const MAX_STALE_CEILING_MS = 6e4;
824
+ const DEFAULT_MAX_ENTRIES = 1e4;
825
+ /**
826
+ * An in-process `VersionCache`: a bounded LRU keyed by principal id that keeps
827
+ * resolved versions and shares reads in flight. Create it once at module
828
+ * scope.
829
+ */
830
+ function memoryVersionCache(options) {
831
+ const maxStaleMs = Math.min(Math.max(Math.floor(options.maxStaleMs), 0), MAX_STALE_CEILING_MS);
832
+ const maxEntries = Math.max(Math.floor(options.maxEntries ?? DEFAULT_MAX_ENTRIES), 1);
833
+ const entries = /* @__PURE__ */ new Map();
834
+ const inFlight = /* @__PURE__ */ new Map();
835
+ const counts = {
836
+ reads: 0,
837
+ shared: 0,
838
+ hits: 0,
839
+ evictions: 0
840
+ };
841
+ const now = () => nowMillis(options.now?.());
842
+ const store = (id, entry) => {
843
+ entries.delete(id);
844
+ entries.set(id, entry);
845
+ if (entries.size > maxEntries) {
846
+ const oldest = entries.keys().next();
847
+ if (oldest.done !== true) entries.delete(oldest.value);
848
+ }
849
+ };
850
+ const observe = (principal, at) => {
851
+ const claimed = principal.authzVersion;
852
+ if (typeof claimed !== "number") return;
853
+ const issued = typeof principal.issuedAt === "number" ? principal.issuedAt * 1e3 : void 0;
854
+ const entry = entries.get(principal.id);
855
+ if (entry === void 0) {
856
+ if (issued !== void 0 && issued <= at && at - issued <= maxStaleMs) store(principal.id, {
857
+ version: claimed,
858
+ at: issued
859
+ });
860
+ return;
861
+ }
862
+ if (claimed > entry.version) store(principal.id, {
863
+ version: claimed,
864
+ at: issued === void 0 ? entry.at : Math.max(entry.at, issued)
865
+ });
866
+ };
867
+ const start = (id, read, at) => {
868
+ counts.reads += 1;
869
+ const keep = (version) => {
870
+ if (typeof version === "number" && Number.isFinite(version)) {
871
+ const entry = entries.get(id);
872
+ store(id, {
873
+ version: Math.max(version, entry?.version ?? version),
874
+ at
875
+ });
876
+ }
877
+ return version;
878
+ };
879
+ const answer = read();
880
+ if (!isThenable$1(answer)) return keep(answer);
881
+ const pending = Promise.resolve(answer).then((version) => inFlight.get(id) === pending ? keep(version) : version);
882
+ inFlight.set(id, pending);
883
+ const settle = () => {
884
+ if (inFlight.get(id) === pending) inFlight.delete(id);
885
+ };
886
+ pending.then(settle, settle);
887
+ return pending;
888
+ };
889
+ return Object.freeze({
890
+ name: "memory",
891
+ maxStaleMs,
892
+ current(principal, read, { live }) {
893
+ const at = now();
894
+ if (live) return start(principal.id, read, at);
895
+ observe(principal, at);
896
+ const entry = entries.get(principal.id);
897
+ if (entry !== void 0 && at - entry.at <= maxStaleMs) {
898
+ counts.hits += 1;
899
+ store(principal.id, entry);
900
+ return entry.version;
901
+ }
902
+ const pending = inFlight.get(principal.id);
903
+ if (pending !== void 0) {
904
+ counts.shared += 1;
905
+ return pending;
906
+ }
907
+ return start(principal.id, read, at);
908
+ },
909
+ evict(principal) {
910
+ counts.evictions += 1;
911
+ entries.delete(principal);
912
+ inFlight.delete(principal);
913
+ },
914
+ stats() {
915
+ return {
916
+ ...counts,
917
+ size: entries.size
918
+ };
919
+ }
920
+ });
921
+ }
922
+ //#endregion
822
923
  //#region src/core/arazzo.ts
823
924
  const VERSION = /^1\.[01]\.\d+(?:-.+)?$/u;
824
925
  const STEP_TARGETS = [
@@ -2039,4 +2140,4 @@ function toCsvRow(event) {
2039
2140
  ].map(field).join(",");
2040
2141
  }
2041
2142
  //#endregion
2042
- export { memoryCustomRoleSource as A, stripeEntitlementSource as C, validateApprovalPolicy as D, memoryApprovalPolicySource as E, sqlFunction as F, memoryMembershipSource as M, memorySettingsSource as N, defineOperations as O, memorySnapshotSource as P, memoryLimitStore as S, approvalPoliciesFor as T, arazzoFindings as _, normalizeMembership as a, memoryRelationSource as b, crud as c, snapshotFor as d, customRoleSource as f, localSnapshotManifest as g, defineApp as h, decideRoleChange as i, memoryEntitlementSource as j, isOperationEffect as k, readable as l, shadowMode as m, toCsvRow as n, normalizeMemberships as o, mayAccess as p, checkRoleChange as r, resolveScope as s, CSV_COLUMNS as t, writable as u, simulateArazzo as v, approvalPolicies as w, limits as x, signPolicyDocument as y };
2143
+ export { isOperationEffect as A, memoryLimitStore as C, memoryApprovalPolicySource as D, approvalPoliciesFor as E, memorySnapshotSource as F, sqlFunction as I, memoryEntitlementSource as M, memoryMembershipSource as N, validateApprovalPolicy as O, memorySettingsSource as P, limits as S, approvalPolicies as T, arazzoFindings as _, normalizeMembership as a, signPolicyDocument as b, crud as c, snapshotFor as d, customRoleSource as f, localSnapshotManifest as g, defineApp as h, decideRoleChange as i, memoryCustomRoleSource as j, defineOperations as k, readable as l, shadowMode as m, toCsvRow as n, normalizeMemberships as o, mayAccess as p, checkRoleChange as r, resolveScope as s, CSV_COLUMNS as t, writable as u, simulateArazzo as v, stripeEntitlementSource as w, memoryRelationSource as x, memoryVersionCache as y };
@@ -1,4 +1,4 @@
1
- import { A as SsfSubject, C as SsfEventName, D as SsfReceiver, E as SsfPermDockOptions, M as SsfTransmitterConfiguration, N as SsfVerification, O as SsfStreamConfiguration, S as SsfEventListener, T as SsfPermDock, _ as SetSubject, a as PollHandle, b as SsfEventHandler, c as PushSetOptions, d as SetDelivery, f as SetDeliveryFailureCause, g as SetQueue, h as SetPollHandlerOptions, i as CaepReason, j as SsfSubjectResolver, k as SsfStreamStatus, l as ReplayStore, m as SetEvent, n as CaepEventName, o as PollOptions, p as SetError, r as CaepInitiatingEntity, s as PollResult, t as CaepCommon, u as RiscEventName, v as SignSetOptions, w as SsfOnEvent, x as SsfEventInput, y as SsfAuditEvent } from "../types-DjuMBNF9.js";
2
- import { t as memoryReplayStore } from "../replay-DNftIb_R.js";
3
- import { A as createPermDock, C as memorySsfStreamStore, D as PollSetsResult, E as PollSetsOptions, O as PolledSet, S as SsfStreamStore, T as setPollHandler, _ as SsfFanOut, a as CaepTokenClaimsChange, b as ssfTransmitter, c as RiscEvents, d as caepEvents, f as pushSet, g as FanOutSetOptions, h as streamVerificationEvent, i as CaepEvents, k as pollSets, l as SSF_POLL_DELIVERY, m as signSet, n as CaepCredentialChange, o as RiscAccountDisabled, p as riscEvents, r as CaepDeviceComplianceChange, s as RiscCredentialCompromise, t as CaepAssuranceLevelChange, u as SSF_PUSH_DELIVERY, v as SsfTransmitterOptions, w as memorySetQueue, x as SsfStream, y as fanOutSet } from "../index-BhxEUY9J.js";
1
+ import { A as SsfSubject, C as SsfEventName, D as SsfReceiver, E as SsfPermDockOptions, M as SsfTransmitterConfiguration, N as SsfVerification, O as SsfStreamConfiguration, S as SsfEventListener, T as SsfPermDock, _ as SetSubject, a as PollHandle, b as SsfEventHandler, c as PushSetOptions, d as SetDelivery, f as SetDeliveryFailureCause, g as SetQueue, h as SetPollHandlerOptions, i as CaepReason, j as SsfSubjectResolver, k as SsfStreamStatus, l as ReplayStore, m as SetEvent, n as CaepEventName, o as PollOptions, p as SetError, r as CaepInitiatingEntity, s as PollResult, t as CaepCommon, u as RiscEventName, v as SignSetOptions, w as SsfOnEvent, x as SsfEventInput, y as SsfAuditEvent } from "../types-DsHGPtkR.js";
2
+ import { t as memoryReplayStore } from "../replay-Bs9Df2fQ.js";
3
+ import { A as createPermDock, C as memorySsfStreamStore, D as PollSetsResult, E as PollSetsOptions, O as PolledSet, S as SsfStreamStore, T as setPollHandler, _ as SsfFanOut, a as CaepTokenClaimsChange, b as ssfTransmitter, c as RiscEvents, d as caepEvents, f as pushSet, g as FanOutSetOptions, h as streamVerificationEvent, i as CaepEvents, k as pollSets, l as SSF_POLL_DELIVERY, m as signSet, n as CaepCredentialChange, o as RiscAccountDisabled, p as riscEvents, r as CaepDeviceComplianceChange, s as RiscCredentialCompromise, t as CaepAssuranceLevelChange, u as SSF_PUSH_DELIVERY, v as SsfTransmitterOptions, w as memorySetQueue, x as SsfStream, y as fanOutSet } from "../index-BinlXeU-.js";
4
4
  export { type CaepAssuranceLevelChange, type CaepCommon, type CaepCredentialChange, type CaepDeviceComplianceChange, type CaepEventName, type CaepEvents, type CaepInitiatingEntity, type CaepReason, type CaepTokenClaimsChange, type FanOutSetOptions, type PollHandle, type PollOptions, type PollResult, type PollSetsOptions, type PollSetsResult, type PolledSet, type PushSetOptions, type ReplayStore, type RiscAccountDisabled, type RiscCredentialCompromise, type RiscEventName, type RiscEvents, SSF_POLL_DELIVERY, SSF_PUSH_DELIVERY, type SetDelivery, type SetDeliveryFailureCause, type SetError, type SetEvent, type SetPollHandlerOptions, type SetQueue, type SetSubject, type SignSetOptions, type SsfAuditEvent, type SsfEventHandler, type SsfEventInput, type SsfEventListener, type SsfEventName, type SsfFanOut, type SsfOnEvent, type SsfPermDock, type SsfPermDockOptions, type SsfReceiver, type SsfStream, type SsfStreamConfiguration, type SsfStreamStatus, type SsfStreamStore, type SsfSubject, type SsfSubjectResolver, type SsfTransmitterConfiguration, type SsfTransmitterOptions, type SsfVerification, caepEvents, createPermDock, fanOutSet, memoryReplayStore, memorySetQueue, memorySsfStreamStore, pollSets, pushSet, riscEvents, setPollHandler, signSet, ssfTransmitter, streamVerificationEvent };
@@ -1,5 +1,5 @@
1
- import { Rt as Instant, ar as JsonWebKeyLike } from "./policy-types-CCiDRZBH.js";
2
- import { l as ReplayStore } from "./types-DjuMBNF9.js";
1
+ import { Wt as Instant, dr as JsonWebKeyLike } from "./policy-types-DGIO_gxq.js";
2
+ import { l as ReplayStore } from "./types-DsHGPtkR.js";
3
3
  //#region src/server/standard-webhooks.d.ts
4
4
  /** The three Standard Webhooks headers a delivery carries. */
5
5
  type WebhookHeaders = {
@@ -1,11 +1,11 @@
1
- import { Ln as Decision, j as PolicyVocabulary, or as Membership } from "./policy-types-CCiDRZBH.js";
1
+ import { Un as Decision, fr as Membership, j as PolicyVocabulary } from "./policy-types-DGIO_gxq.js";
2
2
  import { u as Permission } from "./permission-types-CAY-GU7e.js";
3
3
  import { r as Role } from "./vocabulary-DEJ5j4mR.js";
4
- import { d as UncheckedData, s as RowData } from "./permdock-B6Sf4T_S.js";
5
- import { r as DescribeOptions, t as DecisionDescription } from "./describe-ByS9LgHK.js";
6
- import { n as ProtectedAction } from "./action-result-CL-QCITA.js";
7
- import { a as FilterResult, c as PermissionSet, h as TenantView, l as PermissionState, m as SubjectView, o as GateMode, p as RolesOptions, r as ClientPermDock, s as GateView, t as ApprovalHandle } from "./types-B_d_g7T3.js";
8
- import { n as ProtectedActionReadable, r as SveltePermDockOptions } from "./types-djVzLlIV.js";
4
+ import { d as UncheckedData, s as RowData } from "./permdock-CprAPN3w.js";
5
+ import { r as DescribeOptions, t as DecisionDescription } from "./describe-BbFPBSms.js";
6
+ import { n as ProtectedAction } from "./action-result-BcudBQOF.js";
7
+ import { a as FilterResult, c as PermissionSet, h as TenantView, l as PermissionState, m as SubjectView, o as GateMode, p as RolesOptions, r as ClientPermDock, s as GateView, t as ApprovalHandle } from "./types-tQB2CEnY.js";
8
+ import { n as ProtectedActionReadable, r as SveltePermDockOptions } from "./types-CEinc15V.js";
9
9
  import { Readable } from "svelte/store";
10
10
  //#region src/svelte/stores.d.ts
11
11
  declare function setPermDock(options: SveltePermDockOptions): ClientPermDock;
@@ -1,5 +1,5 @@
1
1
  import { u as Permission } from "./permission-types-CAY-GU7e.js";
2
- import { o as ProtectOptions } from "./server-types-CIlpSA2G.js";
2
+ import { o as ProtectOptions } from "./server-types-CyRN0-Cd.js";
3
3
  //#region src/server/stream.d.ts
4
4
  type StreamProtectOptions = ProtectOptions & {
5
5
  /**
@@ -1,10 +1,9 @@
1
- import { Rt as Instant, lr as Subject } from "../policy-types-CCiDRZBH.js";
2
- import { a as ApprovalDelegationSource, m as ApprovalStore, u as ApprovalRequest } from "../types-B_tiYvk8.js";
3
- import { a as SupabaseRpcClient, c as readSubjectRecord, i as SupabaseRpcCaller, n as PostgrestSourcesOptions, o as SupabaseRpcResult, r as SubjectRecord, s as postgrestSources, t as PostgrestSources } from "../postgrest-DicQyqm-.js";
4
- import { C as SupabaseClaims, D as SupabasePermDockClaims, E as SupabaseMembershipClaim, O as supabaseClaims, S as SupabaseActClaim, T as SupabaseClaimsSchema, _ as SupabaseStorage, a as SupabaseActor, b as SupabaseSuspendedScope, c as SupabaseInclude, d as SupabasePrincipal, f as SupabaseRealtime, g as SupabaseSessionLike, h as SupabaseRlsOptions, i as SupabaseActiveRow, l as SupabaseMembershipTable, m as SupabaseRlsMembershipTable, o as SupabaseActorResult, p as SupabaseRlsConfig, r as RoleThrough, s as SupabaseDelegation, t as AuthorizeSqlOptions, u as SupabasePermissionRef, v as SupabaseSubjectOptions, w as SupabaseClaimsOptions, x as SupabaseSuspension, y as SupabaseSuspendedMembership } from "../types-ah9NlU6j.js";
1
+ import { Wt as Instant, hr as Subject } from "../policy-types-DGIO_gxq.js";
2
+ import { a as ApprovalDelegationSource, m as ApprovalStore, u as ApprovalRequest } from "../types-DLvhVm1r.js";
3
+ import { a as SupabaseRpcClient, c as readSubjectRecord, i as SupabaseRpcCaller, n as PostgrestSourcesOptions, o as SupabaseRpcResult, r as SubjectRecord, s as postgrestSources, t as PostgrestSources } from "../postgrest-D5nUGm-c.js";
4
+ import { A as SupabaseSubjectOptions, B as supabaseClaims, C as SupabasePrincipal, D as SupabaseRlsOptions, E as SupabaseRlsMembershipTable, F as SupabaseClaims, I as SupabaseClaimsOptions, L as SupabaseClaimsSchema, M as SupabaseSuspendedScope, N as SupabaseSuspension, O as SupabaseSessionLike, P as SupabaseActClaim, R as SupabaseMembershipClaim, S as SupabasePermissionRef, T as SupabaseRlsConfig, _ as SupabaseActor, a as MembershipStream, b as SupabaseInclude, c as SupabasePostgres, d as supabasePostgresQuery, f as tableMembershipSource, g as SupabaseActiveRow, h as RoleThrough, i as MembershipSql, j as SupabaseSuspendedMembership, k as SupabaseStorage, l as authzVersion, n as MembershipHolders, o as MembershipTableOptions, p as AuthorizeSqlOptions, r as MembershipJunctionOptions, s as SqlMembershipSource, t as AUTHZ_VERSION_TABLE, u as junctionMembershipSource, v as SupabaseActorResult, w as SupabaseRealtime, x as SupabaseMembershipTable, y as SupabaseDelegation, z as SupabasePermDockClaims } from "../sources-oB1Hg1Fm.js";
5
+ import { _ as hasTokenHook, a as SupabaseManifestActiveRow, c as SupabaseManifestMembership, d as SupabaseManifestResourceNames, f as SupabaseManifestRls, g as SupabaseManifestValue, h as SupabaseManifestThrough, i as SupabaseManifest, l as SupabaseManifestNames, m as SupabaseManifestScopeNames, n as SupabaseHookClaim, o as SupabaseManifestColumn, p as SupabaseManifestRole, r as SupabaseHookManifest, s as SupabaseManifestHelper, t as SupabaseDatabaseManifest, u as SupabaseManifestRequires, v as parseSupabaseManifest } from "../manifest-B5yF3CIq.js";
5
6
  import { t as SqlQuery } from "../sql-B80DFdpG.js";
6
- import { _ as hasTokenHook, a as SupabaseManifestActiveRow, c as SupabaseManifestMembership, d as SupabaseManifestResourceNames, f as SupabaseManifestRls, g as SupabaseManifestValue, h as SupabaseManifestThrough, i as SupabaseManifest, l as SupabaseManifestNames, m as SupabaseManifestScopeNames, n as SupabaseHookClaim, o as SupabaseManifestColumn, p as SupabaseManifestRole, r as SupabaseHookManifest, s as SupabaseManifestHelper, t as SupabaseDatabaseManifest, u as SupabaseManifestRequires, v as parseSupabaseManifest } from "../manifest-CzzWtnAb.js";
7
- import { a as MembershipStream, c as SupabasePostgres, d as supabasePostgresQuery, f as tableMembershipSource, i as MembershipSql, l as authzVersion, n as MembershipHolders, o as MembershipTableOptions, r as MembershipJunctionOptions, s as SqlMembershipSource, t as AUTHZ_VERSION_TABLE, u as junctionMembershipSource } from "../sources-B1Os_YUu.js";
8
7
  import { n as supabaseTenantClaim, t as supabaseMembershipsBudget } from "../budget-hYsPz_yE.js";
9
8
  //#region src/supabase/capability.d.ts
10
9
  type ExchangeCapabilityOptions = {
@@ -1,6 +1,6 @@
1
- import { a as supabaseClaims, i as supabaseApprovalStore, n as supabaseRls, o as exchangeCapability, r as tableApprovalDelegationSource, t as authorizeSql } from "../supabase-BL1qJzzY.js";
1
+ import { a as supabaseClaims, i as supabaseApprovalStore, n as supabaseRls, o as exchangeCapability, r as tableApprovalDelegationSource, t as authorizeSql } from "../supabase-B1EfuD47.js";
2
2
  import { n as supabaseTenantClaim, t as supabaseMembershipsBudget } from "../budget-BELja5A9.js";
3
- import { c as tableMembershipSource, i as authzVersion, o as junctionMembershipSource, s as supabasePostgresQuery, t as AUTHZ_VERSION_TABLE } from "../sources-CMAM-2A3.js";
4
- import { a as delegationOf, c as subjectFromSupabaseSession, i as actorOf, n as postgrestSources, r as readSubjectRecord, s as subjectFromSupabase } from "../postgrest-D4nuPXIQ.js";
5
- import { n as parseSupabaseManifest, t as hasTokenHook } from "../manifest-wg8WkkpD.js";
3
+ import { c as tableMembershipSource, i as authzVersion, o as junctionMembershipSource, s as supabasePostgresQuery, t as AUTHZ_VERSION_TABLE } from "../sources-C4vkzZJV.js";
4
+ import { a as delegationOf, c as subjectFromSupabaseSession, i as actorOf, n as postgrestSources, r as readSubjectRecord, s as subjectFromSupabase } from "../postgrest-DAxFltvO.js";
5
+ import { n as parseSupabaseManifest, t as hasTokenHook } from "../manifest-BXTbHNIV.js";
6
6
  export { AUTHZ_VERSION_TABLE, actorOf, authorizeSql, authzVersion, delegationOf, exchangeCapability, hasTokenHook, junctionMembershipSource, parseSupabaseManifest, postgrestSources, readSubjectRecord, subjectFromSupabase, subjectFromSupabaseSession, supabaseApprovalStore, supabaseClaims, supabaseMembershipsBudget, supabasePostgresQuery, supabaseRls, supabaseTenantClaim, tableApprovalDelegationSource, tableMembershipSource };
@@ -1,10 +1,10 @@
1
- import { T as Policy, j as PolicyVocabulary, lr as Subject, sr as Principal } from "../policy-types-CCiDRZBH.js";
1
+ import { T as Policy, hr as Subject, j as PolicyVocabulary, pr as Principal } from "../policy-types-DGIO_gxq.js";
2
2
  import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { a as PermDock } from "../permdock-B6Sf4T_S.js";
4
- import { t as InstanceOptions } from "../instance-options-B0KXqTrJ.js";
3
+ import { a as PermDock } from "../permdock-CprAPN3w.js";
4
+ import { t as InstanceOptions } from "../instance-options-CoHn-0e8.js";
5
5
  import { t as RequestContext } from "../request-context-C2_1lchh.js";
6
- import { i as OpenApiHooks } from "../server-types-CIlpSA2G.js";
7
- import { n as ServerAdapterServices } from "../bind-Cp2hBHzP.js";
6
+ import { i as OpenApiHooks } from "../server-types-CyRN0-Cd.js";
7
+ import { n as ServerAdapterServices } from "../bind-YYjvfpB9.js";
8
8
  import { Middleware } from "@supabase/middleware";
9
9
  //#region src/supabase/middleware.d.ts
10
10
  /**
@@ -1,11 +1,11 @@
1
1
  import { t as compact } from "../compact-CAf557ZB.js";
2
- import { l as withApp } from "../permdock-L-_I_3zP.js";
2
+ import { l as withApp } from "../permdock-BvjivVb9.js";
3
3
  import { t as composeWraps } from "../wrap-B2wziJI_.js";
4
4
  import { r as credentialSubject } from "../credential-CyyyvCsL.js";
5
5
  import { o as methodNotAllowed } from "../problem-BVLHFK33.js";
6
- import { r as instanceOptions } from "../build-instance-CNWaYJyr.js";
7
- import { t as createPermDock$1 } from "../create-_noSrY1T.js";
8
- import { n as attached } from "../bind-D_sZSVA3.js";
6
+ import { r as instanceOptions } from "../build-instance-BWXqwQYU.js";
7
+ import { t as createPermDock$1 } from "../create-BLPKnJKa.js";
8
+ import { n as attached } from "../bind-BNQA9JK9.js";
9
9
  import { defineMiddleware } from "@supabase/middleware";
10
10
  //#region src/supabase/middleware.ts
11
11
  const SECRET_KEY_NAME = /^[A-Za-z0-9_-]+$/u;
@@ -7,8 +7,8 @@ import { a as parseCapability } from "./capability-BqX94r07.js";
7
7
  import { t as loadJose } from "./load-jose-DZ4dnjri.js";
8
8
  import { a as quoteQualifiedTable, c as quoteSqlTable, d as sqlTextArray, i as qualifySqlTable, o as quoteSqlIdent, s as quoteSqlLiteral } from "./sql-0WjxIp9g.js";
9
9
  import "./budget-BELja5A9.js";
10
- import { d as keptKeys, l as roleColumn } from "./sources-CMAM-2A3.js";
11
- import { t as callRpc } from "./postgrest-D4nuPXIQ.js";
10
+ import { d as keptKeys, l as roleColumn } from "./sources-C4vkzZJV.js";
11
+ import { t as callRpc } from "./postgrest-DAxFltvO.js";
12
12
  //#region src/supabase/capability.ts
13
13
  const DEFAULT_TTL = 300;
14
14
  const MAX_TTL = 3600;
@@ -47,7 +47,7 @@ const hookGenerate = defineLeaf({
47
47
  const budget = given(flags.budget);
48
48
  const schema = given(flags.schema);
49
49
  const grantsOut = given(flags["grants-out"]);
50
- const { runSupabase } = await import("./supabase-hook-H-MtE9Wd.js");
50
+ const { runSupabase } = await import("./supabase-hook-CbvGAutK.js");
51
51
  return runSupabase({
52
52
  cwd: ctx.cwd,
53
53
  config: ctx.config,
@@ -76,7 +76,7 @@ const inspect = defineLeaf({
76
76
  },
77
77
  async run(ctx, { flags }) {
78
78
  const out = flags.out === "" ? true : flags.out === "-" ? void 0 : flags.out;
79
- const { runSupabase } = await import("./supabase-hook-H-MtE9Wd.js");
79
+ const { runSupabase } = await import("./supabase-hook-CbvGAutK.js");
80
80
  return runSupabase({
81
81
  cwd: ctx.cwd,
82
82
  config: ctx.config,