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,5 +1,5 @@
1
1
  import { a as CatalogDocument } from "../../types-ZzRGoViD.js";
2
- import { i as SupabaseManifest } from "../../manifest-CzzWtnAb.js";
2
+ import { i as SupabaseManifest } from "../../manifest-B5yF3CIq.js";
3
3
  //#region src/testing/fixtures/index.d.ts
4
4
  /**
5
5
  * The `permissions.catalog.json` of `apps/examples/next-better-supabase`, a
@@ -1,12 +1,12 @@
1
- import { n as parseSupabaseManifest } from "../../manifest-wg8WkkpD.js";
1
+ import { n as parseSupabaseManifest } from "../../manifest-BXTbHNIV.js";
2
2
  import { t as parseCatalog } from "../../parse-1_ZheTW5.js";
3
3
  //#region src/testing/fixtures/better-supabase.catalog.json
4
4
  var better_supabase_catalog_default = {
5
5
  $schema: "https://permdock.com/schemas/catalog-v1.json",
6
6
  version: 1,
7
- generatedAt: "2026-10-21T18:26:20.894Z",
8
- generator: "permdock@0.7.0",
9
- fingerprint: "sha-256:2VY9uDRP6NWXTNcU989MMBZa3-z22VbDWKWkvnXaTFc",
7
+ generatedAt: "2026-10-25T13:10:40.583Z",
8
+ generator: "permdock@0.9.0",
9
+ fingerprint: "sha-256:vWJUJuM8Qg6Cd8ozHqIOkaPdpE4p6cxof-Hypzwe3tg",
10
10
  resources: {
11
11
  "staff": {
12
12
  "id": "id",
@@ -115,29 +115,29 @@ var better_supabase_catalog_default = {
115
115
  },
116
116
  permissions: [
117
117
  {
118
- "key": "audit.revert",
119
- "scope": "audit:revert",
118
+ "key": "audit.read",
119
+ "scope": "audit:read",
120
120
  "resource": "audit",
121
- "action": "revert",
121
+ "action": "read",
122
122
  "arity": "collection",
123
123
  "meta": {},
124
124
  "usages": [{
125
125
  "file": "src/policy.ts",
126
- "line": 29,
126
+ "line": 28,
127
127
  "call": "reference"
128
128
  }],
129
129
  "rowConditions": false
130
130
  },
131
131
  {
132
- "key": "audit.view",
133
- "scope": "audit:view",
132
+ "key": "audit.revert",
133
+ "scope": "audit:revert",
134
134
  "resource": "audit",
135
- "action": "view",
135
+ "action": "revert",
136
136
  "arity": "collection",
137
137
  "meta": {},
138
138
  "usages": [{
139
139
  "file": "src/policy.ts",
140
- "line": 28,
140
+ "line": 29,
141
141
  "call": "reference"
142
142
  }],
143
143
  "rowConditions": false
@@ -334,7 +334,7 @@ var better_supabase_catalog_default = {
334
334
  ],
335
335
  grants: [
336
336
  {
337
- "permission": "audit.revert",
337
+ "permission": "audit.read",
338
338
  "effect": "allow",
339
339
  "role": "owner",
340
340
  "to": {
@@ -345,7 +345,7 @@ var better_supabase_catalog_default = {
345
345
  "scope": "organization"
346
346
  },
347
347
  {
348
- "permission": "audit.view",
348
+ "permission": "audit.revert",
349
349
  "effect": "allow",
350
350
  "role": "owner",
351
351
  "to": {
@@ -512,6 +512,7 @@ var better_supabase_manifest_default = {
512
512
  "schema": "permdock",
513
513
  "function": "custom_access_token_hook",
514
514
  "out": "supabase/schemas/permdock/functions/custom_access_token_hook.sql",
515
+ "activeFrom": { "appMetadata": "active_organization" },
515
516
  "schemas": "pg-delta"
516
517
  },
517
518
  helpers: {
@@ -580,15 +581,14 @@ var better_supabase_manifest_default = {
580
581
  "args": "p_users uuid[]"
581
582
  },
582
583
  memberships: [{
583
- "table": "public.memberships",
584
+ "table": "public.organization_memberships",
584
585
  "user": { "column": "user_id" },
585
- "scope": { "column": "scope" },
586
- "id": { "column": "scope_id" },
586
+ "scope": { "value": "organization" },
587
+ "id": { "column": "organization_id" },
587
588
  "role": { "column": "role" },
588
589
  "columns": [
589
590
  "user_id",
590
- "scope",
591
- "scope_id",
591
+ "organization_id",
592
592
  "role"
593
593
  ]
594
594
  }, {
@@ -722,15 +722,14 @@ var better_supabase_manifest_default = {
722
722
  }
723
723
  ],
724
724
  "memberships": [{
725
- "table": "public.memberships",
725
+ "table": "public.organization_memberships",
726
726
  "user": { "column": "user_id" },
727
- "scope": { "column": "scope" },
728
- "id": { "column": "scope_id" },
727
+ "scope": { "value": "organization" },
728
+ "id": { "column": "organization_id" },
729
729
  "role": { "column": "role" },
730
730
  "columns": [
731
731
  "user_id",
732
- "scope",
733
- "scope_id",
732
+ "organization_id",
734
733
  "role"
735
734
  ]
736
735
  }, {
@@ -758,10 +757,9 @@ var better_supabase_manifest_default = {
758
757
  "public.contacts.customer_id",
759
758
  "public.contacts.organization_id",
760
759
  "public.contacts.user_id",
761
- "public.memberships.role",
762
- "public.memberships.scope",
763
- "public.memberships.scope_id",
764
- "public.memberships.user_id"
760
+ "public.organization_memberships.organization_id",
761
+ "public.organization_memberships.role",
762
+ "public.organization_memberships.user_id"
765
763
  ],
766
764
  markers: {
767
765
  "hook": "v1",
@@ -1,29 +1,30 @@
1
- import { Gt as Snapshot, J as EntitlementSource, K as DecisionProvider, Q as LimitStore, T as Policy, U as CredentialVerifier, W as CustomRoleSource, at as SettingsSource, dt as TokenVerifier, et as MembershipSource, it as RelationSource, lr as Subject, mt as WhereCompiler, or as Membership, ot as SnapshotSource, q as DecisionSink, sr as Principal, st as SubjectResolver, tn as DeliveryChannel, ut as TokenSigner } from "../policy-types-CCiDRZBH.js";
1
+ import { G as CustomRoleSource, J as DecisionSink, T as Policy, U as CredentialVerifier, Y as EntitlementSource, Zt as Snapshot, bt as WhereCompiler, ct as SnapshotSource, dt as SubjectResolver, et as LimitStore, fr as Membership, hr as Subject, ht as TokenVerifier, mt as TokenSigner, nt as MembershipSource, ot as RelationSource, pr as Principal, q as DecisionProvider, sn as DeliveryChannel, st as SettingsSource } from "../policy-types-DGIO_gxq.js";
2
2
  import { g as ResourceInit, l as InferPermissionTree, u as Permission } from "../permission-types-CAY-GU7e.js";
3
3
  import { r as Role } from "../vocabulary-DEJ5j4mR.js";
4
- import { st as LegacyCheck } from "../index-BW_0MZOS.js";
5
- import { D as ApprovalPolicySource, _ as PrincipalSource, a as PermDock, b as Limits, h as PrincipalIdentity } from "../permdock-B6Sf4T_S.js";
6
- import { s as PolicySource } from "../hosted-Cmtxogd0.js";
7
- import { a as ApprovalDelegationSource, m as ApprovalStore } from "../types-B_tiYvk8.js";
8
- import { a as ProblemDetails } from "../errors-zi_4T-rx.js";
9
- import { c as ModelMap, t as AgentPermDock, u as ToolMap } from "../create-BSNrVuxh.js";
10
- import { c as AccessReviewStore } from "../types-B2mlGuhW.js";
11
- import { R as IdempotencyStore } from "../index-_9UiQIkt.js";
4
+ import { st as LegacyCheck } from "../index-Cay5-Kvx.js";
5
+ import { D as ApprovalPolicySource, _ as PrincipalSource, a as PermDock, b as Limits, h as PrincipalIdentity } from "../permdock-CprAPN3w.js";
6
+ import { s as PolicySource } from "../hosted-DVxlLZMe.js";
7
+ import { a as ApprovalDelegationSource, m as ApprovalStore } from "../types-DLvhVm1r.js";
8
+ import { a as ProblemDetails } from "../errors-BIM4MFsJ.js";
9
+ import { c as ModelMap, t as AgentPermDock, u as ToolMap } from "../create-BPUopdfL.js";
10
+ import { c as AccessReviewStore } from "../types-B2efzoSX.js";
11
+ import { R as IdempotencyStore } from "../index-DJwEgYzA.js";
12
12
  import { n as RevocationFeed } from "../revocations-BaUXHM1N.js";
13
- import { s as SupportSessionSource } from "../index-B8s204GL.js";
14
- import { a as AutomationSource, t as Automation } from "../automation-DqEoWHBc.js";
15
- import { c as DeliveryTransport, g as TransportMessages } from "../types-yUuPR5Hy.js";
16
- import { r as SupabaseHookManifest } from "../manifest-CzzWtnAb.js";
13
+ import { s as SupportSessionSource } from "../index-CV-7DWeD.js";
14
+ import { r as SupabaseHookManifest } from "../manifest-B5yF3CIq.js";
15
+ import { n as VersionCache } from "../version-cache-Df11C2Qp.js";
17
16
  import { t as supabaseMembershipsBudget } from "../budget-hYsPz_yE.js";
18
- import { t as CloudApproverOptions } from "../types-AMJ5qoU_.js";
19
- import { n as ApprovalWaiter } from "../waiter-Bu9zAlE0.js";
20
- import { g as SetQueue, l as ReplayStore } from "../types-DjuMBNF9.js";
21
- import { r as SnapshotStorage } from "../types-HzqOtvsJ.js";
22
- import { x as DirectoryStore } from "../index-BT5-1VsX.js";
23
- import { S as SsfStreamStore } from "../index-BhxEUY9J.js";
24
- import { S as policyMatrix, _ as DescribePolicyConfig, a as OrmParityScenario, b as PolicyMatrixCell, c as RlsFieldsOutcome, d as RlsParityOptions, f as RlsParityReport, g as testRlsParity, h as RlsQueryResult, i as OrmParityRunInput, l as RlsParityCase, m as RlsQueryFn, n as OrmParityOptions, o as testOrmParity, p as RlsParitySubject, r as OrmParityReport, s as RlsDbOutcome, t as OrmParityCase, u as RlsParityFixture, v as MatrixCell, x as PolicyMatrixReport, y as MatrixOutcome } from "../core-hWIARPDz.js";
17
+ import { a as AutomationSource, t as Automation } from "../automation-C6Jg75xq.js";
18
+ import { c as DeliveryTransport, g as TransportMessages } from "../types-CN0LsqbK.js";
19
+ import { t as CloudApproverOptions } from "../types-BB-zWDcR.js";
20
+ import { n as ApprovalWaiter } from "../waiter-CqUKX6CY.js";
21
+ import { g as SetQueue, l as ReplayStore } from "../types-DsHGPtkR.js";
22
+ import { r as SnapshotStorage } from "../types-CWBsAwqn.js";
23
+ import { x as DirectoryStore } from "../index-Dj2qF9VC.js";
24
+ import { S as SsfStreamStore } from "../index-BinlXeU-.js";
25
+ import { S as policyMatrix, _ as DescribePolicyConfig, a as OrmParityScenario, b as PolicyMatrixCell, c as RlsFieldsOutcome, d as RlsParityOptions, f as RlsParityReport, g as testRlsParity, h as RlsQueryResult, i as OrmParityRunInput, l as RlsParityCase, m as RlsQueryFn, n as OrmParityOptions, o as testOrmParity, p as RlsParitySubject, r as OrmParityReport, s as RlsDbOutcome, t as OrmParityCase, u as RlsParityFixture, v as MatrixCell, x as PolicyMatrixReport, y as MatrixOutcome } from "../core-CFepFiDP.js";
25
26
  import { a as SaasProject } from "../permissions-Bx6UI8n1.js";
26
- import { n as saasPolicy } from "../policy-Ba4bDhaj.js";
27
+ import { n as saasPolicy } from "../policy-BycVKnXv.js";
27
28
  import { expectTypeOf } from "vitest";
28
29
  //#region src/testing/describe-policy.d.ts
29
30
  /** `policyMatrix` under Vitest: one test per cell, plus the exhaustive check. */
@@ -640,6 +641,7 @@ export declare function testSnapshotSource(source: SnapshotSource): void;
640
641
  export declare function testPolicySource(source: PolicySource, options?: {
641
642
  readonly policy?: Policy;
642
643
  }): void;
644
+ export declare function testVersionCache(cache: VersionCache): void;
643
645
  //#endregion
644
646
  //#region src/testing/conformance/providers.d.ts
645
647
  type DecisionProviderRunnerOptions = {
@@ -2,7 +2,7 @@ import { r as isRecord } from "../compact-CAf557ZB.js";
2
2
  import { n as freezeDeep } from "../freeze-jjan0lCv.js";
3
3
  import { i as principal } from "../refs-C8BKxc_e.js";
4
4
  import { n as role, r as allow } from "../role-builder-BK2-T6oD.js";
5
- import { A as memoryCustomRoleSource, S as memoryLimitStore, T as approvalPoliciesFor, d as snapshotFor, x as limits } from "../src-DZ0l9UAg.js";
5
+ import { C as memoryLimitStore, E as approvalPoliciesFor, S as limits, d as snapshotFor, j as memoryCustomRoleSource } from "../src-C_pi2Rnh.js";
6
6
  import { t as memoryRevocationFeed } from "../revocations-Bhr0aMIC.js";
7
7
  import { n as loadPrincipalByIdentity, t as loadPrincipal } from "../principal-source-C6N60GtM.js";
8
8
  import { v as resource } from "../permission-registry-B8tYxPIt.js";
@@ -15,10 +15,10 @@ import { t as byCodePoint } from "../compare-DTfyUunF.js";
15
15
  import { r as definePolicy } from "../policy-CLQ8__GF.js";
16
16
  import { c as mergeHostedGrants, l as parsePolicyDocument } from "../hosted-D0IzESu_.js";
17
17
  import { t as definePermissions } from "../permissions-CVXmRILq.js";
18
- import { T as validateCustomRole } from "../evaluate-Dd8Ta0Ie.js";
18
+ import { T as validateCustomRole } from "../evaluate-BAmf_AQd.js";
19
19
  import { n as parseSnapshot } from "../snapshot-CXlzi69u.js";
20
20
  import { n as fromSnapshot } from "../from-snapshot-DCakWRsr.js";
21
- import { t as getPermDock } from "../permdock-L-_I_3zP.js";
21
+ import { t as getPermDock } from "../permdock-BvjivVb9.js";
22
22
  import { t as APPROVAL_HEADER } from "../types-CcUXciSj.js";
23
23
  import { i as memoryApprovalStore } from "../store-RNFvaJJv.js";
24
24
  import { t as catalogFingerprint } from "../catalog-fingerprint-e6aCWosn.js";
@@ -34,11 +34,11 @@ import { l as sha256Hex, n as scimHandler, t as directoryMembershipSource } from
34
34
  import { c as quoteSqlTable, o as quoteSqlIdent } from "../sql-0WjxIp9g.js";
35
35
  import { i as cloudEndpoints, n as cloud, s as approverHeaders, t as bearerChallenge } from "../challenge-DImNcR7B.js";
36
36
  import { t as supabaseMembershipsBudget } from "../budget-BELja5A9.js";
37
- import { t as supabaseManifestSchema } from "../manifest-schema-2r37XRhD.js";
38
- import { t as PUSHED_POLICY_SCHEMA } from "../pushed-policy-ITwYKvvH.js";
39
- import { i as policyMatrixLayout, n as testRlsParity, r as policyMatrix, t as testOrmParity } from "../core-H-mbhpZc.js";
40
- import { i as saasPermissions } from "../permissions-mDcTWoBs.js";
41
- import { C as saasOrg, E as saasSeed, S as saasMemberships, a as saasProject, g as verifySaasSession, h as signSaasToken, k as saasPolicy, t as saasDoc, w as saasPrincipal, x as saasCustomRoles } from "../saas-iWnUdwCt.js";
37
+ import { t as supabaseManifestSchema } from "../manifest-schema-DQkBK2Mr.js";
38
+ import { t as PUSHED_POLICY_SCHEMA } from "../pushed-policy-CDuOL2de.js";
39
+ import { i as policyMatrixLayout, n as testRlsParity, r as policyMatrix, t as testOrmParity } from "../core-DzVINFbU.js";
40
+ import { i as saasPermissions } from "../permissions-CYcHj_w7.js";
41
+ import { C as saasOrg, E as saasSeed, S as saasMemberships, a as saasProject, g as verifySaasSession, h as signSaasToken, k as saasPolicy, t as saasDoc, w as saasPrincipal, x as saasCustomRoles } from "../saas-DK4V-3Is.js";
42
42
  import { t as POLICY_NOT_PUBLISHED } from "../problem-types-DSsRfONQ.js";
43
43
  import { t as require__2020 } from "../2020-CJbO8Bvz.js";
44
44
  import { afterAll, assert, beforeAll, describe, expect, expectTypeOf, it, vi } from "vitest";
@@ -2456,6 +2456,59 @@ function testPolicySource(source, options = {}) {
2456
2456
  });
2457
2457
  }
2458
2458
  }
2459
+ function testVersionCache(cache) {
2460
+ const counted = (version) => {
2461
+ const calls = { count: 0 };
2462
+ const read = async () => {
2463
+ calls.count += 1;
2464
+ return version;
2465
+ };
2466
+ return {
2467
+ calls,
2468
+ read
2469
+ };
2470
+ };
2471
+ it("reads live for a write and answers a read from that entry", async () => {
2472
+ const { calls, read } = counted(4);
2473
+ const principal = { id: "u-version-write" };
2474
+ expect(await cache.current(principal, read, { live: true })).toBe(4);
2475
+ expect(await cache.current(principal, read, { live: true })).toBe(4);
2476
+ expect(calls.count).toBe(2);
2477
+ if (cache.maxStaleMs > 0) {
2478
+ expect(await cache.current(principal, read, { live: false })).toBe(4);
2479
+ expect(calls.count).toBe(2);
2480
+ }
2481
+ });
2482
+ it("shares one read between concurrent reads", async () => {
2483
+ const { calls, read } = counted(2);
2484
+ const principal = { id: "u-version-shared" };
2485
+ const answers = await Promise.all(Array.from({ length: 5 }, async () => cache.current(principal, read, { live: false })));
2486
+ expect(answers).toStrictEqual([
2487
+ 2,
2488
+ 2,
2489
+ 2,
2490
+ 2,
2491
+ 2
2492
+ ]);
2493
+ expect(calls.count).toBe(1);
2494
+ });
2495
+ it("stores no rejected read", async () => {
2496
+ const principal = { id: "u-version-failed" };
2497
+ await expect(cache.current(principal, () => Promise.reject(/* @__PURE__ */ new Error("down")), { live: false })).rejects.toThrow("down");
2498
+ const { calls, read } = counted(1);
2499
+ expect(await cache.current(principal, read, { live: false })).toBe(1);
2500
+ expect(calls.count).toBe(1);
2501
+ });
2502
+ it("reads again after evict", async () => {
2503
+ const { calls, read } = counted(3);
2504
+ const principal = { id: "u-version-evict" };
2505
+ await cache.current(principal, read, { live: false });
2506
+ cache.evict(principal.id);
2507
+ await cache.current(principal, read, { live: false });
2508
+ expect(calls.count).toBe(2);
2509
+ expect(cache.stats().reads).toBeGreaterThanOrEqual(2);
2510
+ });
2511
+ }
2459
2512
  //#endregion
2460
2513
  //#region src/testing/cloud-api/platform.ts
2461
2514
  const CATALOG = "https://permdock.com/schemas/catalog-v1.json";
@@ -6249,7 +6302,8 @@ const supabaseHookManifestFixture = {
6249
6302
  hook: {
6250
6303
  schema: "permdock",
6251
6304
  function: "custom_access_token_hook",
6252
- out: "supabase/permdock-hook.sql"
6305
+ out: "supabase/permdock-hook.sql",
6306
+ activeFrom: { appMetadata: "active_tenant" }
6253
6307
  },
6254
6308
  helpers: {
6255
6309
  schema: "permdock",
@@ -6532,4 +6586,4 @@ const PROBLEM_EXAMPLES = Object.freeze({
6532
6586
  }
6533
6587
  });
6534
6588
  //#endregion
6535
- export { AGENT_THROWING_ROW, AGENT_THROWING_USER, PROBLEM_EXAMPLES, authzenTodoData, authzenTodoPermissions, authzenTodoPolicy, authzenTodoUsers, authzenTodoVectors, describePolicy, expectTypeOf, jwtFixtureAudience, jwtFixtureIssuer, jwtFixtureJwks, jwtFixtureTokens, policyMatrix, seedRows, snapshotFixture, supabaseClaimFixtures, supabaseClaimVectors, supabaseHookManifestFixture, supabaseMembershipsBudget, testAccessReviewStore, testAgentAdapter, testAgentRuntime, testApprovalDelegationSource, testApprovalPolicySource, testApprovalStore, testApprovalWaiter, testAuthzen, testAutomationSource, testClientParity, testClientStore, testCloudApi, testCredentialVerifier, testCustomRoleSource, testDecisionProvider, testDecisionSink, testDeliveryTransport, testDirectoryStore, testEntitlementSource, testHttpAdapter, testIdempotencyStore, testLegacyParity, testLimitStore, testMembershipSource, testOrmParity, testPolicySource, testPrincipalSource, testRelationSource, testReplayStore, testRevocationFeed, testRlsParity, testSetQueue, testSettingsSource, testSnapshotSource, testSnapshotStorage, testSsfStreamStore, testSubjectResolver, testSupportSessionSource, testTokenSigner, testTokenVerifier, testWhereCompiler };
6589
+ export { AGENT_THROWING_ROW, AGENT_THROWING_USER, PROBLEM_EXAMPLES, authzenTodoData, authzenTodoPermissions, authzenTodoPolicy, authzenTodoUsers, authzenTodoVectors, describePolicy, expectTypeOf, jwtFixtureAudience, jwtFixtureIssuer, jwtFixtureJwks, jwtFixtureTokens, policyMatrix, seedRows, snapshotFixture, supabaseClaimFixtures, supabaseClaimVectors, supabaseHookManifestFixture, supabaseMembershipsBudget, testAccessReviewStore, testAgentAdapter, testAgentRuntime, testApprovalDelegationSource, testApprovalPolicySource, testApprovalStore, testApprovalWaiter, testAuthzen, testAutomationSource, testClientParity, testClientStore, testCloudApi, testCredentialVerifier, testCustomRoleSource, testDecisionProvider, testDecisionSink, testDeliveryTransport, testDirectoryStore, testEntitlementSource, testHttpAdapter, testIdempotencyStore, testLegacyParity, testLimitStore, testMembershipSource, testOrmParity, testPolicySource, testPrincipalSource, testRelationSource, testReplayStore, testRevocationFeed, testRlsParity, testSetQueue, testSettingsSource, testSnapshotSource, testSnapshotStorage, testSsfStreamStore, testSubjectResolver, testSupportSessionSource, testTokenSigner, testTokenVerifier, testVersionCache, testWhereCompiler };
@@ -1,8 +1,8 @@
1
- import { Q as LimitStore, Rt as Instant, Zn as Actor, it as RelationSource, lr as Subject, or as Membership, rr as Delegation, sr as Principal, tr as CustomRole } from "../../policy-types-CCiDRZBH.js";
1
+ import { Wt as Instant, et as LimitStore, fr as Membership, hr as Subject, lr as Delegation, ot as RelationSource, pr as Principal, rr as Actor, sr as CustomRole } from "../../policy-types-DGIO_gxq.js";
2
2
  import { u as Permission } from "../../permission-types-CAY-GU7e.js";
3
- import { o as PermDockOptions } from "../../permdock-B6Sf4T_S.js";
3
+ import { o as PermDockOptions } from "../../permdock-CprAPN3w.js";
4
4
  import { a as SaasProject, c as saasPlans, i as SaasFolderSchema, l as saasRoles, n as SaasDocSchema, o as SaasProjectSchema, r as SaasFolder, s as saasPermissions, t as SaasDoc, u as saasTenantRoleNames } from "../../permissions-Bx6UI8n1.js";
5
- import { n as saasPolicy, t as SAAS_API_KEY_LIMIT } from "../../policy-Ba4bDhaj.js";
5
+ import { n as saasPolicy, t as SAAS_API_KEY_LIMIT } from "../../policy-BycVKnXv.js";
6
6
  import { StandardSchemaV1 } from "@standard-schema/spec";
7
7
  //#region src/testing/saas/schema.d.ts
8
8
  type FieldKind = "string" | "boolean" | "nullable-string";
@@ -1,3 +1,3 @@
1
- import { a as saasPlans, c as rowSchema, i as saasPermissions, n as SaasFolderSchema, o as saasRoles, r as SaasProjectSchema, s as saasTenantRoleNames, t as SaasDocSchema } from "../../permissions-mDcTWoBs.js";
2
- import { C as saasOrg, D as saasUsers, E as saasSeed, O as SAAS_API_KEY_LIMIT, S as saasMemberships, T as saasRelations, _ as verifySaasToken, a as saasProject, b as SAAS_EXPIRED_AT, c as saasUser, d as saasIssuer, f as saasJwks, g as verifySaasSession, h as signSaasToken, i as saasLimitStore, k as saasPolicy, l as SAAS_TOKEN_TTL_SECONDS, m as saasPublicJwk, n as saasFolder, o as saasScenarioOptions, p as saasPrivateJwk, r as saasFolderScenarios, s as saasScenarios, t as saasDoc, u as saasAudience, v as saasSchemaSql, w as saasPrincipal, x as saasCustomRoles, y as saasSeedSql } from "../../saas-iWnUdwCt.js";
1
+ import { a as saasPlans, c as rowSchema, i as saasPermissions, n as SaasFolderSchema, o as saasRoles, r as SaasProjectSchema, s as saasTenantRoleNames, t as SaasDocSchema } from "../../permissions-CYcHj_w7.js";
2
+ import { C as saasOrg, D as saasUsers, E as saasSeed, O as SAAS_API_KEY_LIMIT, S as saasMemberships, T as saasRelations, _ as verifySaasToken, a as saasProject, b as SAAS_EXPIRED_AT, c as saasUser, d as saasIssuer, f as saasJwks, g as verifySaasSession, h as signSaasToken, i as saasLimitStore, k as saasPolicy, l as SAAS_TOKEN_TTL_SECONDS, m as saasPublicJwk, n as saasFolder, o as saasScenarioOptions, p as saasPrivateJwk, r as saasFolderScenarios, s as saasScenarios, t as saasDoc, u as saasAudience, v as saasSchemaSql, w as saasPrincipal, x as saasCustomRoles, y as saasSeedSql } from "../../saas-DK4V-3Is.js";
3
3
  export { SAAS_API_KEY_LIMIT, SAAS_EXPIRED_AT, SAAS_TOKEN_TTL_SECONDS, SaasDocSchema, SaasFolderSchema, SaasProjectSchema, rowSchema, saasAudience, saasCustomRoles, saasDoc, saasFolder, saasFolderScenarios, saasIssuer, saasJwks, saasLimitStore, saasMemberships, saasOrg, saasPermissions, saasPlans, saasPolicy, saasPrincipal, saasPrivateJwk, saasProject, saasPublicJwk, saasRelations, saasRoles, saasScenarioOptions, saasScenarios, saasSchemaSql, saasSeed, saasSeedSql, saasTenantRoleNames, saasUser, saasUsers, signSaasToken, verifySaasSession, verifySaasToken };
@@ -1 +1 @@
1
- export { t as SaasDocSchema, n as SaasFolderSchema, r as SaasProjectSchema, i as saasPermissions, a as saasPlans, o as saasRoles, s as saasTenantRoleNames } from "../../permissions-mDcTWoBs.js";
1
+ export { t as SaasDocSchema, n as SaasFolderSchema, r as SaasProjectSchema, i as saasPermissions, a as saasPlans, o as saasRoles, s as saasTenantRoleNames } from "../../permissions-CYcHj_w7.js";
@@ -1,10 +1,10 @@
1
- import { T as Policy, sr as Principal } from "../policy-types-CCiDRZBH.js";
1
+ import { T as Policy, 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";
3
+ import { a as PermDock } from "../permdock-CprAPN3w.js";
4
4
  import { n as RevocationFeed } from "../revocations-BaUXHM1N.js";
5
- import { D as ConnectionOptions, T as Connection, i as OpenApiHooks } from "../server-types-CIlpSA2G.js";
6
- import { t as ServerAdapterOptions } from "../bind-Cp2hBHzP.js";
7
- import { t as StreamProtectOptions } from "../stream-ltuLdtTG.js";
5
+ import { D as ConnectionOptions, T as Connection, i as OpenApiHooks } from "../server-types-CyRN0-Cd.js";
6
+ import { t as ServerAdapterOptions } from "../bind-YYjvfpB9.js";
7
+ import { t as StreamProtectOptions } from "../stream-9y9qw51m.js";
8
8
  import { AnyTRPCMiddlewareFunction } from "@trpc/server";
9
9
  //#region src/trpc/create.d.ts
10
10
  type TrpcMiddlewareOpts<TCtx = object, TInput = unknown> = {
@@ -1,8 +1,8 @@
1
1
  import { o as problemMessage } from "../http-DKLXrFGk.js";
2
2
  import { t as problemFromError } from "../map-error-pasIGqMT.js";
3
- import { n as attached } from "../bind-D_sZSVA3.js";
3
+ import { n as attached } from "../bind-BNQA9JK9.js";
4
4
  import { i as isAsyncIterable, o as reloadAfter } from "../stream-CDvF0sJm.js";
5
- import { i as rpcCode, n as guardStream, r as problemBody, t as bindRpcKernel } from "../rpc-fNqAIqQk.js";
5
+ import { i as rpcCode, n as guardStream, r as problemBody, t as bindRpcKernel } from "../rpc-vHIwyXCp.js";
6
6
  import { TRPCError, isTrackedEnvelope } from "@trpc/server";
7
7
  //#region src/trpc/create.ts
8
8
  const PROBLEM = Symbol.for("permdock.problem");
@@ -1,4 +1,4 @@
1
- import { j as PolicyVocabulary, mn as ScopeNames } from "./policy-types-CCiDRZBH.js";
1
+ import { bn as ScopeNames, j as PolicyVocabulary } from "./policy-types-DGIO_gxq.js";
2
2
  import { k as POLICY_SCOPES, u as Permission } from "./permission-types-CAY-GU7e.js";
3
3
  import { n as PlanTree } from "./vocabulary-DEJ5j4mR.js";
4
4
  import { o as OperationMap } from "./operations-Ci_rT6Uo.js";
@@ -1,4 +1,4 @@
1
- import { gn as Approver } from "./policy-types-CCiDRZBH.js";
1
+ import { Sn as Approver } from "./policy-types-DGIO_gxq.js";
2
2
  //#region src/approvals/access-reviews/types.d.ts
3
3
  type AccessReviewStatus = "open" | "closed";
4
4
  type AccessReviewItemStatus = "pending" | "kept" | "revoked";
@@ -1,5 +1,5 @@
1
- import { en as DecisionEvent, j as PolicyVocabulary } from "./policy-types-CCiDRZBH.js";
2
- import { a as PermDock } from "./permdock-B6Sf4T_S.js";
1
+ import { j as PolicyVocabulary, on as DecisionEvent } from "./policy-types-DGIO_gxq.js";
2
+ import { a as PermDock } from "./permdock-CprAPN3w.js";
3
3
  //#region src/otel/types.d.ts
4
4
  declare const GENAI_SEMCONV_PIN = "1.37.0";
5
5
  declare const GEN_AI_TOOL_NAME = "gen_ai.tool.name";
@@ -1,8 +1,8 @@
1
- import { dt as TokenVerifier, lr as Subject, ot as SnapshotSource, q as DecisionSink, ut as TokenSigner } from "./policy-types-CCiDRZBH.js";
2
- import { s as PolicySource } from "./hosted-Cmtxogd0.js";
3
- import { m as ApprovalStore, u as ApprovalRequest } from "./types-B_tiYvk8.js";
1
+ import { J as DecisionSink, ct as SnapshotSource, hr as Subject, ht as TokenVerifier, mt as TokenSigner } from "./policy-types-DGIO_gxq.js";
2
+ import { s as PolicySource } from "./hosted-DVxlLZMe.js";
3
+ import { m as ApprovalStore, u as ApprovalRequest } from "./types-DLvhVm1r.js";
4
4
  import { a as CatalogDocument } from "./types-ZzRGoViD.js";
5
- import { a as CatalogFinding } from "./sink-Dvi7YZG_.js";
5
+ import { a as CatalogFinding } from "./sink-B5zoUW_O.js";
6
6
  //#region src/cloud/types.d.ts
7
7
  type CloudEndpointOptions = {
8
8
  readonly url?: string;
@@ -1,9 +1,9 @@
1
- import { Gt as Snapshot, In as ApprovalRequiredDecision, Ln as Decision, Un as GrantedDecision, dt as TokenVerifier } from "./policy-types-CCiDRZBH.js";
1
+ import { Hn as ApprovalRequiredDecision, Un as Decision, Yn as GrantedDecision, Zt as Snapshot, ht as TokenVerifier } 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";
3
+ import { a as PermDock } from "./permdock-CprAPN3w.js";
4
4
  import { t as PermissionBoundaryState } from "./boundary-C9ck-3uK.js";
5
- import { t as ActionResult } from "./action-result-CL-QCITA.js";
6
- import { d as ProtectedActionView, f as ProviderOptionsBase, g as ClientStore, l as PermissionState } from "./types-B_d_g7T3.js";
5
+ import { t as ActionResult } from "./action-result-BcudBQOF.js";
6
+ import { d as ProtectedActionView, f as ProviderOptionsBase, g as ClientStore, l as PermissionState } from "./types-tQB2CEnY.js";
7
7
  import { Snippet } from "svelte";
8
8
  import { Readable } from "svelte/store";
9
9
  //#region src/client/views.d.ts
@@ -1,6 +1,6 @@
1
- import { Un as GrantedDecision, an as EmailCategory, nn as DeliveryEvent, rn as DeliveryFailureCause, tn as DeliveryChannel } from "./policy-types-CCiDRZBH.js";
2
- import { s as CloudEvent } from "./sink-Dvi7YZG_.js";
3
- import { t as ApprovalPrompt } from "./approval-prompt-PYagyQUj.js";
1
+ import { Yn as GrantedDecision, cn as DeliveryEvent, dn as EmailCategory, ln as DeliveryFailureCause, sn as DeliveryChannel } from "./policy-types-DGIO_gxq.js";
2
+ import { s as CloudEvent } from "./sink-B5zoUW_O.js";
3
+ import { t as ApprovalPrompt } from "./approval-prompt-3BqWczTt.js";
4
4
  //#region src/delivery/types.d.ts
5
5
  /**
6
6
  * Who a delivery goes to. `{ principal }` names an app principal and the
@@ -1,7 +1,7 @@
1
- import { Gt as Snapshot, dt as TokenVerifier, ot as SnapshotSource } from "./policy-types-CCiDRZBH.js";
2
- import { n as DescribeMessages } from "./describe-ByS9LgHK.js";
3
- import { _ as ClientStoreOptions } from "./types-B_d_g7T3.js";
4
- import { t as PermDockDefaults } from "./types-BJk0BKRX.js";
1
+ import { Zt as Snapshot, ct as SnapshotSource, ht as TokenVerifier } from "./policy-types-DGIO_gxq.js";
2
+ import { n as DescribeMessages } from "./describe-BbFPBSms.js";
3
+ import { _ as ClientStoreOptions } from "./types-tQB2CEnY.js";
4
+ import { t as PermDockDefaults } from "./types-rCRV4Ge-.js";
5
5
  import { ReactNode } from "react";
6
6
  //#region src/react-native/types.d.ts
7
7
  type SnapshotStorage = {
@@ -1,5 +1,4 @@
1
- import { n as RoleMap, r as RoleThrough } from "./types-ah9NlU6j.js";
2
- import { s as SqlMembershipSource } from "./sources-B1Os_YUu.js";
1
+ import { h as RoleThrough, m as RoleMap, s as SqlMembershipSource } from "./sources-oB1Hg1Fm.js";
3
2
  //#region src/cli/core/errors.d.ts
4
3
  /**
5
4
  * 0 success, 1 failure, 2 usage, 3 action required, 130 interrupted (SIGINT or
@@ -408,7 +407,9 @@ type RlsConfig = {
408
407
  */
409
408
  readonly helpersOnly?: boolean;
410
409
  /**
411
- * Emit `permitted_<resource>_rows(p_permission)` and its `_for` form for
410
+ * Emit `permitted_<resource>_rows(p_permission)`, its `_for` form,
411
+ * `permitted_<resource>_rows(p_permission, p_ids)` limited to candidate ids
412
+ * and the row-valued `permitted_<resource>_row(p_row, p_permission)` for
412
413
  * these resources, or for every resource a grant reaches with `true`: the row
413
414
  * ids the caller may act on, as the generated policies decide them.
414
415
  */
@@ -933,6 +934,28 @@ type PowerSyncConfig = {
933
934
  * `localSnapshot` and `powerSyncSource`; none by default.
934
935
  */
935
936
  readonly manifest?: string;
937
+ /**
938
+ * Tables that are not resources, by `schema.table`, each synced as its own
939
+ * stream: the user's own rows, the rows that point at a resource row the user
940
+ * reads, or both.
941
+ */
942
+ readonly tables?: Readonly<Record<string, PowerSyncTable>>;
943
+ };
944
+ type PowerSyncTable = {
945
+ /** The user id column: the stream holds the rows whose column is the user. */
946
+ readonly user?: string;
947
+ /** The resources a row points at; the stream holds rows of any of them. */
948
+ readonly follow?: readonly PowerSyncFollow[];
949
+ };
950
+ /**
951
+ * A row points at a `resource` row through `field`, which holds its id; `match`
952
+ * keeps the rows whose columns equal the given values, for a table whose rows
953
+ * point at several resources.
954
+ */
955
+ type PowerSyncFollow = {
956
+ readonly resource: string;
957
+ readonly field: string;
958
+ readonly match?: Readonly<Record<string, string>>;
936
959
  };
937
960
  type CliIo = {
938
961
  readonly stdout: (text: string) => void;
@@ -1,4 +1,4 @@
1
- import { Dn as RelationGrantee, Rt as Instant, fr as AdapterId, gn as Approver, lr as Subject, o as ApprovalStage, or as Membership, r as ApprovalMode, un as WireDelegation } from "./policy-types-CCiDRZBH.js";
1
+ import { Nn as RelationGrantee, Sn as Approver, Wt as Instant, fr as Membership, gn as WireDelegation, hr as Subject, o as ApprovalStage, r as ApprovalMode, vr as AdapterId } from "./policy-types-DGIO_gxq.js";
2
2
  import { M as AppData } from "./permission-types-CAY-GU7e.js";
3
3
  //#region src/approvals/types.d.ts
4
4
  type ApprovalStatus = "pending" | "approved" | "rejected" | "expired";
@@ -1,6 +1,6 @@
1
- import { Hn as ExplainedDecision, Ln as Decision, T as Policy, j as PolicyVocabulary, lr as Subject, or as Membership, sr as Principal } from "./policy-types-CCiDRZBH.js";
1
+ import { Jn as ExplainedDecision, T as Policy, Un as Decision, fr as Membership, hr as Subject, j as PolicyVocabulary, pr as Principal } from "./policy-types-DGIO_gxq.js";
2
2
  import { f as PermissionTree, u as Permission } from "./permission-types-CAY-GU7e.js";
3
- import { C as PermissionCheck, a as PermDock, f as WhereResult, l as SimulateOptions, n as DecideOptions, o as PermDockOptions, r as DeriveOptions } from "./permdock-B6Sf4T_S.js";
3
+ import { C as PermissionCheck, a as PermDock, f as WhereResult, l as SimulateOptions, n as DecideOptions, o as PermDockOptions, r as DeriveOptions } from "./permdock-CprAPN3w.js";
4
4
  //#region src/pdp/types.d.ts
5
5
  type RemotePdpAuth = {
6
6
  readonly bearer: string | (() => string | Promise<string>);
@@ -1,5 +1,5 @@
1
- import { Y as JwtClaims, Zn as Actor, Zt as AuthEvent, dt as TokenVerifier, et as MembershipSource, lr as Subject, lt as TokenFailureCause, sr as Principal } from "./policy-types-CCiDRZBH.js";
2
- import { m as ApprovalStore } from "./types-B_tiYvk8.js";
1
+ import { Z as JwtClaims, hr as Subject, ht as TokenVerifier, nt as MembershipSource, pr as Principal, pt as TokenFailureCause, rn as AuthEvent, rr as Actor } from "./policy-types-DGIO_gxq.js";
2
+ import { m as ApprovalStore } from "./types-DLvhVm1r.js";
3
3
  import { n as RevocationFeed } from "./revocations-BaUXHM1N.js";
4
4
  import { t as ClaimsMap } from "./claims-map-D1Pb5oRq.js";
5
5
  import { t as ClientNames } from "./clients-C_NOET3z.js";
@@ -1,8 +1,8 @@
1
- import { Gt as Snapshot, In as ApprovalRequiredDecision, Ln as Decision, Un as GrantedDecision, dt as TokenVerifier } from "./policy-types-CCiDRZBH.js";
1
+ import { Hn as ApprovalRequiredDecision, Un as Decision, Yn as GrantedDecision, Zt as Snapshot, ht as TokenVerifier } from "./policy-types-DGIO_gxq.js";
2
2
  import { u as Permission } from "./permission-types-CAY-GU7e.js";
3
- import { s as RowData } from "./permdock-B6Sf4T_S.js";
4
- import { n as DescribeMessages } from "./describe-ByS9LgHK.js";
5
- import { _ as ClientStoreOptions } from "./types-B_d_g7T3.js";
3
+ import { s as RowData } from "./permdock-CprAPN3w.js";
4
+ import { n as DescribeMessages } from "./describe-BbFPBSms.js";
5
+ import { _ as ClientStoreOptions } from "./types-tQB2CEnY.js";
6
6
  import { ReactNode } from "react";
7
7
  //#region src/react/types.d.ts
8
8
  type PermDockProviderProps = ({
@@ -1,8 +1,8 @@
1
- import { Gt as Snapshot, Ln as Decision, Zn as Actor, dt as TokenVerifier, j as PolicyVocabulary, rr as Delegation, sr as Principal } from "./policy-types-CCiDRZBH.js";
1
+ import { Un as Decision, Zt as Snapshot, ht as TokenVerifier, j as PolicyVocabulary, lr as Delegation, pr as Principal, rr as Actor } 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 { n as DescribeMessages, t as DecisionDescription } from "./describe-ByS9LgHK.js";
5
- import { t as ActionResult } from "./action-result-CL-QCITA.js";
3
+ import { a as PermDock } from "./permdock-CprAPN3w.js";
4
+ import { n as DescribeMessages, t as DecisionDescription } from "./describe-BbFPBSms.js";
5
+ import { t as ActionResult } from "./action-result-BcudBQOF.js";
6
6
  //#region src/client/refresh-on.d.ts
7
7
  /**
8
8
  * Calls `refresh` when the snapshot may be out of date (a membership event, a
@@ -1,4 +1,4 @@
1
- import { s as PermDockPluginOptions } from "../types-DC1Loeh3.js";
1
+ import { s as PermDockPluginOptions } from "../types-Cklw5hJo.js";
2
2
  import { createUnplugin } from "unplugin";
3
3
  //#region src/unplugin/index.d.ts
4
4
  type CreateUnplugin = typeof createUnplugin<PermDockPluginOptions | undefined>;
@@ -1,4 +1,4 @@
1
- import { n as createCollectScheduler, r as report } from "../watch-Cx_WciLE.js";
1
+ import { n as createCollectScheduler, r as report } from "../watch-Bpci3hBY.js";
2
2
  import { r as peerHint } from "../peer-Q0fuZ6hx.js";
3
3
  import { createRequire } from "node:module";
4
4
  //#region src/unplugin/index.ts
@@ -16,7 +16,7 @@ const usage = defineLeaf({
16
16
  }
17
17
  },
18
18
  async run(ctx, { flags }) {
19
- return (await import("./usage-CYeXek0p.js")).runUsage({
19
+ return (await import("./usage-weohzv2f.js")).runUsage({
20
20
  cwd: ctx.cwd,
21
21
  config: ctx.config,
22
22
  ignore: flags.ignore,
@@ -4,10 +4,10 @@ import { a as rel, r as listSourceFiles } from "./files-BSjrtIHw.js";
4
4
  import { o as USAGE_REPORT_SCHEMA } from "./version-DMQ0dnN5.js";
5
5
  import { c as jsonSchemaOf } from "./catalog-doc-DjMKzJp9.js";
6
6
  import { a as loadModule, n as asPolicy, s as pickNamed } from "./load-DjSU5KXO.js";
7
- import { r as runCollect } from "./collect-B7ZFAJU3.js";
7
+ import { r as runCollect } from "./collect-WCl8cJQV.js";
8
8
  import { t as beforeFirst } from "./text-BMFRfBqc.js";
9
- import { t as DOCS_BASE } from "./manifest-Cgiq5oqc.js";
10
- import { r as findingOf } from "./output-tkju6U7R.js";
9
+ import { t as DOCS_BASE } from "./manifest-B4ENCp2I.js";
10
+ import { r as findingOf } from "./output-LsbLe41I.js";
11
11
  import { existsSync, readFileSync, realpathSync } from "node:fs";
12
12
  import { dirname, resolve } from "node:path";
13
13
  import { fileURLToPath, pathToFileURL } from "node:url";
@@ -0,0 +1 @@
1
+ export { t as runUsage } from "./usage-t_nXnwCW.js";