permdock 0.34.0 → 0.35.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 (256) hide show
  1. package/dist/a2a/index.d.ts +4 -4
  2. package/dist/{adoption-scan-BPW1eWy5.js → adoption-scan-oaPsvHSN.js} +1 -1
  3. package/dist/agent/index.d.ts +2 -2
  4. package/dist/ai-sdk/index.d.ts +3 -3
  5. package/dist/app/index.d.ts +1 -1
  6. package/dist/{approval-prompt-CJvYBdja.d.ts → approval-prompt-BKxaKtby.d.ts} +1 -1
  7. package/dist/approvals/index.d.ts +3 -3
  8. package/dist/{arazzo-DqzmZG-x.js → arazzo-1oDMApA_.js} +1 -1
  9. package/dist/{arazzo-BUXKjylF.js → arazzo-B2PszcDL.js} +1 -1
  10. package/dist/astro/index.d.ts +4 -4
  11. package/dist/authzen/index.d.ts +6 -6
  12. package/dist/{automation-BqUmdFfe.d.ts → automation-C7WH5XcZ.d.ts} +1 -1
  13. package/dist/better-auth/index.d.ts +1 -1
  14. package/dist/better-supabase/index.d.ts +13 -13
  15. package/dist/better-supabase/index.js +2 -2
  16. package/dist/{bind-Bwk9tt1z.d.ts → bind-BnrOLyJq.d.ts} +7 -7
  17. package/dist/{bsb-access-tags-Nv4nDQ2U.js → bsb-access-tags-uDuwPUbT.js} +2 -2
  18. package/dist/{bsb-action-keys-CYEREFMg.js → bsb-action-keys-BfZAwg-9.js} +1 -1
  19. package/dist/{capability-qoD_jlcI.d.ts → capability-BW-vAxJi.d.ts} +1 -1
  20. package/dist/{casbin-qEW6RfXA.js → casbin-DrdS0vLy.js} +1 -1
  21. package/dist/{casbin-CM9mWO1V.js → casbin-vtIUd-6L.js} +1 -1
  22. package/dist/catalog/index.d.ts +4 -4
  23. package/dist/chat/index.d.ts +1 -1
  24. package/dist/chat-sdk/index.d.ts +3 -3
  25. package/dist/claude-agent/index.d.ts +3 -3
  26. package/dist/clerk/index.d.ts +2 -2
  27. package/dist/cli/bin.js +1 -1
  28. package/dist/cli/generate/watch-worker.js +2 -2
  29. package/dist/cli/index.d.ts +6 -6
  30. package/dist/cli/index.js +2 -2
  31. package/dist/cli/plugins/app.d.ts +1 -1
  32. package/dist/cli/plugins/app.js +1 -1
  33. package/dist/cli/plugins/better-supabase.d.ts +1 -1
  34. package/dist/cli/plugins/openapi.d.ts +1 -1
  35. package/dist/cli/plugins/openapi.js +1 -1
  36. package/dist/cli/plugins/powersync.d.ts +1 -1
  37. package/dist/cli/plugins/powersync.js +1 -1
  38. package/dist/cli/plugins/rls.d.ts +2 -2
  39. package/dist/cli/plugins/rls.js +1 -1
  40. package/dist/cli/plugins/schemas.d.ts +1 -1
  41. package/dist/cli/plugins/schemas.js +1 -1
  42. package/dist/cli/plugins/scim.d.ts +2 -2
  43. package/dist/cli/plugins/supabase-hook.d.ts +2 -2
  44. package/dist/cli/plugins/supabase-hook.js +1 -1
  45. package/dist/cli/plugins/supabase.d.ts +3 -3
  46. package/dist/cli/plugins/supabase.js +2 -2
  47. package/dist/cli/plugins/ui.d.ts +1 -1
  48. package/dist/cli/plugins/ui.js +1 -1
  49. package/dist/{client-subject-Dzo49nco.d.ts → client-subject-YAGMzRa-.d.ts} +2 -2
  50. package/dist/cloud/index.d.ts +8 -8
  51. package/dist/{cloud-CNGblWX0.js → cloud-BQnIR-SS.js} +1 -1
  52. package/dist/{codemod-BtJFcsD7.js → codemod-C0OHCnaj.js} +6 -6
  53. package/dist/{codemod-Dlhxov9D.js → codemod-rv5XSBNw.js} +1 -1
  54. package/dist/{collect-CE5wK0AX.js → collect-Ba7ccZ23.js} +1 -1
  55. package/dist/compile/index.d.ts +1 -1
  56. package/dist/{compile-nR1gQhXo.js → compile-BRDpja_Y.js} +2 -2
  57. package/dist/{compile-DNgpHgcK.d.ts → compile-CoUadQXF.d.ts} +2 -2
  58. package/dist/{completion-BIN9YXIe.js → completion-Dgjdte2-.js} +1 -1
  59. package/dist/{config-7QvEq57a.js → config-Dan6vcvj.js} +2 -2
  60. package/dist/{config-CoYhD6ur.js → config-anQ9E37F.js} +1 -1
  61. package/dist/{config-report-D_L1HXDb.js → config-report-C43BSFHY.js} +1 -1
  62. package/dist/{config-shape-BTojaD-H.js → config-shape-BODqM-rG.js} +1 -1
  63. package/dist/{context-D8tN3SZm.js → context-rioF4fQl.js} +1 -1
  64. package/dist/convex/index.d.ts +4 -4
  65. package/dist/{core-DPuDmlbL.d.ts → core-DCMIztx1.d.ts} +2 -2
  66. package/dist/{create-BKrKxipb.d.ts → create-BYL8xCJB.d.ts} +4 -4
  67. package/dist/{create-CdB9FCZh.d.ts → create-T_NqxU31.d.ts} +7 -7
  68. package/dist/{create-CdbVXh5I.d.ts → create-iCwrnaFE.d.ts} +6 -6
  69. package/dist/{credentials-Dl0-R2aB.d.ts → credentials-DzNrCNZY.d.ts} +2 -2
  70. package/dist/{define-permdock-4IkoNaB3.d.ts → define-permdock-Bhye7WSY.d.ts} +6 -6
  71. package/dist/{definition-options-DO0kIrB9.js → definition-options-DLBlRrPO.js} +1 -8
  72. package/dist/delivery/index.d.ts +4 -4
  73. package/dist/{denied-text-CllTzVJM.d.ts → denied-text-DgNqDAPH.d.ts} +1 -1
  74. package/dist/{describe-FT1oVN_o.d.ts → describe-DEoWvk00.d.ts} +1 -1
  75. package/dist/{doctor-Bn5OPJMB.js → doctor-GnMgqGO8.js} +25 -24
  76. package/dist/{doctor-C9lLeLp2.js → doctor-sAqU02Fx.js} +2 -2
  77. package/dist/drizzle/index.d.ts +3 -3
  78. package/dist/elysia/index.d.ts +4 -4
  79. package/dist/{errors-BGosrHl8.d.ts → errors-BliKrfmP.d.ts} +1 -1
  80. package/dist/{evaluations-CaXNkxTp.d.ts → evaluations-CUkSKioS.d.ts} +3 -3
  81. package/dist/eve/index.d.ts +4 -4
  82. package/dist/{execute-DsHFIBuO.js → execute-xF5fwAel.js} +3 -3
  83. package/dist/express/index.d.ts +4 -4
  84. package/dist/fastify/index.d.ts +4 -4
  85. package/dist/{fetch-adapter-Dci9NnyZ.d.ts → fetch-adapter-Ds2-fUUi.d.ts} +2 -2
  86. package/dist/gen-BPYFr_tZ.js +1 -0
  87. package/dist/{gen-Fi4GcvIY.js → gen-djPw1RS-.js} +2 -2
  88. package/dist/{gen-kind-DR2-to9P.js → gen-kind-Vhq_ZIZm.js} +1 -1
  89. package/dist/{generate-BSD_eI61.js → generate-BcH-uL0z.js} +10 -10
  90. package/dist/{generate-QEHCJSyv.js → generate-CYHeuPq8.js} +3 -3
  91. package/dist/{generate-options-BZ2nqy28.js → generate-options-DDSeUTFU.js} +6 -6
  92. package/dist/h3/index.d.ts +4 -4
  93. package/dist/hono/index.d.ts +4 -4
  94. package/dist/{hook-sql-CbkH78FC.js → hook-sql-EksAnz-T.js} +7 -7
  95. package/dist/{hosted-BISipW6F.d.ts → hosted-DZgmEG4b.d.ts} +1 -1
  96. package/dist/identity-scopes-CRVAV0HU.js +11 -0
  97. package/dist/{import-DppjSugv.js → import-C45gc74U.js} +1 -1
  98. package/dist/{index-giCl-aQY.d.ts → index-BOJPdIBk.d.ts} +4 -4
  99. package/dist/{index-Co_e22iJ.d.ts → index-CAE_Z53Y.d.ts} +1 -1
  100. package/dist/{index-BF4IlvkT.d.ts → index-CWBCzwOp.d.ts} +4 -4
  101. package/dist/{index-BDJ2OZvV.d.ts → index-Cjr8Q-uq.d.ts} +6 -6
  102. package/dist/{index-CWwWkz10.d.ts → index-DBBRSw6r.d.ts} +2 -2
  103. package/dist/{index-BO5f180f.d.ts → index-ktQ7E4qB.d.ts} +4 -4
  104. package/dist/index.d.ts +15 -15
  105. package/dist/{init-DJYSpo-H.js → init-B6aZxzd7.js} +1 -1
  106. package/dist/{init-BOYIObRF.js → init-CCBVeyW8.js} +3 -3
  107. package/dist/{inspect-functions-CwEAQpVF.js → inspect-functions-BUACOlgS.js} +1 -1
  108. package/dist/{instance-options-hq5Cp2Ih.d.ts → instance-options-DDERlopm.d.ts} +1 -1
  109. package/dist/jwt/index.d.ts +4 -4
  110. package/dist/{keys-U2V0maaq.js → keys-BWhAnANj.js} +1 -1
  111. package/dist/kysely/index.d.ts +3 -3
  112. package/dist/{lazy-provider-W8KwlWJU.d.ts → lazy-provider-Clt2095H.d.ts} +1 -1
  113. package/dist/{login-Dv8TFykx.js → login-BnE2iUUA.js} +1 -1
  114. package/dist/{login-xgjt0a5o.js → login-d631Tpa9.js} +3 -3
  115. package/dist/{manager-chain-FggG63qD.js → manager-chain-CFkceFls.js} +1 -1
  116. package/dist/{manifest-BUeAHWDT.js → manifest-1w67doim.js} +34 -34
  117. package/dist/mcp/index.d.ts +8 -8
  118. package/dist/{measure-DZtly0oE.js → measure-BKsYdwKd.js} +1 -1
  119. package/dist/{model-D0EKt-ED.js → model-BYCtXS_g.js} +1 -1
  120. package/dist/{module-values-B09BBJIj.js → module-values-D-AiNhBp.js} +1 -1
  121. package/dist/nest/index.d.ts +4 -4
  122. package/dist/next/index.d.ts +11 -11
  123. package/dist/next/plugin.d.ts +1 -1
  124. package/dist/next/plugin.js +1 -1
  125. package/dist/node/index.d.ts +4 -4
  126. package/dist/openai/index.d.ts +4 -4
  127. package/dist/openapi/index.d.ts +2 -2
  128. package/dist/{openapi-g58VVrsc.js → openapi-BnKSxOrh.js} +1 -1
  129. package/dist/{openapi-Bfakk4cF.js → openapi-CN2Oq9zN.js} +1 -1
  130. package/dist/{openapi-document-ZWpur4f1.js → openapi-document-XnGRbWBb.js} +1 -1
  131. package/dist/orpc/index.d.ts +5 -5
  132. package/dist/otel/index.d.ts +3 -3
  133. package/dist/{output-D4FLF3_v.js → output-dO4bArCS.js} +1 -1
  134. package/dist/{ownership-DvmaGcup.js → ownership-CSdLGGfW.js} +1 -1
  135. package/dist/{parse-local-manifest-AJWs3pkW.d.ts → parse-local-manifest-DoLQFkRb.d.ts} +1 -1
  136. package/dist/pdp/index.d.ts +3 -3
  137. package/dist/{permdock-V86uejcm.d.ts → permdock-DkvkGVF0.d.ts} +2 -2
  138. package/dist/{pipeline-DCERGTTY.js → pipeline-BAGSNnct.js} +2 -2
  139. package/dist/{plugin-BnvEp5tS.d.ts → plugin-DDPXES4k.d.ts} +2 -2
  140. package/dist/{policy-DZORR-Fw.d.ts → policy-BoUbJ2c0.d.ts} +1 -1
  141. package/dist/{policy-DoHkOOTQ.js → policy-CTn-9VQm.js} +1 -1
  142. package/dist/{policy-bundle-CsnNAo-n.js → policy-bundle-BHd1dqU9.js} +3 -3
  143. package/dist/{policy-types-BnBZvh7N.d.ts → policy-types-DuM3k5Ao.d.ts} +1 -1
  144. package/dist/{postgrest-BG0ipED3.d.ts → postgrest-B1bTbVE4.d.ts} +2 -2
  145. package/dist/{powersync-Dbpn-n0o.js → powersync-CZkZgVyi.js} +1 -1
  146. package/dist/{powersync-CTKfjnPT.js → powersync-DJ7dY-Vf.js} +6 -6
  147. package/dist/{powersync-Cz3MUw6R.js → powersync-Jj57J-X8.js} +1 -1
  148. package/dist/prisma/index.d.ts +2 -2
  149. package/dist/{protected-action-aGL_gT4j.d.ts → protected-action-gBxeetqY.d.ts} +5 -5
  150. package/dist/{provider-W8KwlWJU.d.ts → provider-Clt2095H.d.ts} +1 -1
  151. package/dist/{prune-config--x-cEF8G.js → prune-config-Bwz4wNQA.js} +5 -5
  152. package/dist/pull-BOC-0kJV.js +1 -0
  153. package/dist/{pull-BQELP7aV.js → pull-Cj_ngsuu.js} +1 -1
  154. package/dist/{pushed-policy-CQaXRDe3.d.ts → pushed-policy-C65TbLtU.d.ts} +1 -1
  155. package/dist/{rbac-BRMnQ9Rl.js → rbac-DbyaaNLa.js} +1 -1
  156. package/dist/react/index.d.ts +6 -6
  157. package/dist/react/lazy.d.ts +6 -6
  158. package/dist/react/provider-client-lazy.d.ts +1 -1
  159. package/dist/react/provider-client.d.ts +1 -1
  160. package/dist/react-native/index.d.ts +15 -15
  161. package/dist/react-native/index.js +1 -1
  162. package/dist/{rename-BjP2CFUY.js → rename-CI6NIF9t.js} +1 -1
  163. package/dist/replay-B__gzUx3.d.ts +3 -0
  164. package/dist/resend/index.d.ts +4 -4
  165. package/dist/{resolve-names-xBg9s2IJ.js → resolve-names-CuEhEQyB.js} +1 -1
  166. package/dist/{resolver-C_a-bddD.js → resolver-D2c1CcoZ.js} +1 -1
  167. package/dist/{rls-rk-QH4fc.js → rls-BDtyip5c.js} +7 -7
  168. package/dist/{rls-BzCz7ZV0.js → rls-DcqSn7b2.js} +3 -3
  169. package/dist/{rls-files-Bu0O7cZ6.js → rls-files-CRRtjXxG.js} +1 -1
  170. package/dist/{rls-options-f1wRhXSG.d.ts → rls-options-DCLdZaTZ.d.ts} +1 -1
  171. package/dist/{rpc-DyCWVn6C.d.ts → rpc-BYFB37KV.d.ts} +1 -1
  172. package/dist/run-DOP1UKWw.js +1 -0
  173. package/dist/{run-DTz-e3Od.js → run-DvbrPkgt.js} +3 -3
  174. package/dist/{run-ticket-mVPqm6M6.d.ts → run-ticket-CRldclc7.d.ts} +2 -2
  175. package/dist/{scan-Cn79IAJs.js → scan-CmfWbAbz.js} +1 -1
  176. package/dist/{schema-CbzVUpWv.js → schema-CO3btX_O.js} +1 -1
  177. package/dist/scim/index.d.ts +1 -1
  178. package/dist/seeds/index.d.ts +1 -1
  179. package/dist/{seeds-DLjPbhvM.d.ts → seeds-BZMPfWcC.d.ts} +1 -1
  180. package/dist/server/index.d.ts +11 -11
  181. package/dist/{server-types-BlMijUtb.d.ts → server-types-FkdDSB9h.d.ts} +8 -8
  182. package/dist/{sink-DhrVLPSJ.d.ts → sink-CoMI_OVw.d.ts} +2 -2
  183. package/dist/{skills-oZ8Ng2e7.js → skills-C28GUaJC.js} +1 -1
  184. package/dist/{skills-BKrN1qej.js → skills-CA8GfQxQ.js} +1 -1
  185. package/dist/{snapshot-cache-CVYqOThu.d.ts → snapshot-cache-R1lJjYmI.d.ts} +1 -1
  186. package/dist/solid/index.d.ts +5 -5
  187. package/dist/solid-start/index.d.ts +4 -4
  188. package/dist/{sources-Bq7k7g34.d.ts → sources-Dp6FQ8np.d.ts} +1 -1
  189. package/dist/ssf/index.d.ts +3 -3
  190. package/dist/{standard-webhooks-D6SPYjSQ.d.ts → standard-webhooks-D2FwHtMX.d.ts} +2 -2
  191. package/dist/{store-core-Bq7Qc9QM.d.ts → store-core-aluQ3R1M.d.ts} +4 -4
  192. package/dist/{stores-Dn7TpQFa.d.ts → stores-hHICuiQl.d.ts} +5 -5
  193. package/dist/{subject-cache-UKUgQCEX.d.ts → subject-cache-Bn4oJY_R.d.ts} +1 -1
  194. package/dist/supabase/index.d.ts +8 -8
  195. package/dist/supabase/index.js +3 -3
  196. package/dist/supabase/middleware.d.ts +5 -5
  197. package/dist/supabase/middleware.js +1 -1
  198. package/dist/{supabase-DrazwRER.js → supabase-ByhSqBDB.js} +2 -2
  199. package/dist/{supabase-BNPS-Gr1.js → supabase-DXEcFJGM.js} +2 -2
  200. package/dist/supabase-hook-C_ViYz3g.js +2 -0
  201. package/dist/{supabase-hook-t1HnQf8U.js → supabase-hook-D-ybV98H.js} +5 -5
  202. package/dist/{supabase-schemas-_ubYYw9i.js → supabase-schemas-CVhpyYB6.js} +1 -1
  203. package/dist/svelte/index.d.ts +5 -5
  204. package/dist/svelte/runtime.d.ts +3 -3
  205. package/dist/svelte/source.d.ts +5 -5
  206. package/dist/sveltekit/index.d.ts +4 -4
  207. package/dist/{table-reads-Ci-ZVo5m.js → table-reads-BcceuV7h.js} +1 -1
  208. package/dist/{table-reads-B7z40Yu-.js → table-reads-BoF_58yh.js} +1 -1
  209. package/dist/{tables-Bxmf2beb.js → tables-BTXmioCH.js} +85 -12
  210. package/dist/tanstack-start/index.d.ts +4 -4
  211. package/dist/{tenant-check-DW0kbH-a.js → tenant-check-DNbm8OiV.js} +3 -3
  212. package/dist/terminal/index.d.ts +5 -5
  213. package/dist/testing/core.d.ts +1 -1
  214. package/dist/testing/fixtures/index.d.ts +3 -3
  215. package/dist/testing/index.d.ts +22 -22
  216. package/dist/testing/saas/index.d.ts +3 -3
  217. package/dist/trpc/index.d.ts +5 -5
  218. package/dist/{type-helpers-CVN-p62O.d.ts → type-helpers-CsWH9z8p.d.ts} +1 -1
  219. package/dist/{types-5cvjmHTG.d.ts → types-BGN3coSe.d.ts} +1 -1
  220. package/dist/{types-BmTW35E5.d.ts → types-BwjOhlgx.d.ts} +4 -4
  221. package/dist/{types-Dl2jRkyq.d.ts → types-BzsplNgO.d.ts} +4 -4
  222. package/dist/{types-CrUguLsE.d.ts → types-CBUYbPwl.d.ts} +2 -2
  223. package/dist/{types-CgaGxF5q.d.ts → types-CKwI6AT4.d.ts} +1 -1
  224. package/dist/{types-B_I8TBA9.d.ts → types-Cvfe-G_N.d.ts} +2 -2
  225. package/dist/{types-CDkJNA3a.d.ts → types-D3GI2B9O.d.ts} +3 -3
  226. package/dist/{types-DNOJRhyn.d.ts → types-D417woMp.d.ts} +3 -3
  227. package/dist/{types-BMKDvcXc.d.ts → types-DRMoZjJm.d.ts} +2 -2
  228. package/dist/{types-config-CyawIkMF.d.ts → types-config-DYRoZ8Iw.d.ts} +11 -5
  229. package/dist/{types-gp1w86cV.d.ts → types-dtDg4goh.d.ts} +4 -4
  230. package/dist/{types-run-ByHuYUen.d.ts → types-run-CeCrWO0v.d.ts} +1 -1
  231. package/dist/unplugin/index.d.ts +1 -1
  232. package/dist/unplugin/index.js +1 -1
  233. package/dist/{usage-B8ca_Nj_.js → usage-BGuSrwiW.js} +2 -2
  234. package/dist/usage-CW6PfRfC.js +1 -0
  235. package/dist/{usage-Do7LQ4i4.js → usage-D5QwWiNp.js} +1 -1
  236. package/dist/{validation-error-BKgVVMc1.d.ts → validation-error-MZ7KLNHt.d.ts} +1 -1
  237. package/dist/{verify-ZojGAC3f.js → verify-GWeopgxU.js} +3 -3
  238. package/dist/vue/index.d.ts +5 -5
  239. package/dist/{waiter-Bov7Cig6.d.ts → waiter-DdwtUSzB.d.ts} +2 -2
  240. package/dist/{warm-BKD3FN6k.d.ts → warm-znYuJoUZ.d.ts} +1 -1
  241. package/dist/{watch-D-5ztqN8.js → watch-14vng0pg.js} +1 -1
  242. package/dist/watch-Be7ja4dL.js +1 -0
  243. package/dist/{watch-EzX_aG73.js → watch-DuIAsqFR.js} +2 -2
  244. package/dist/webmcp/index.d.ts +1 -1
  245. package/dist/workflow/index.d.ts +3 -3
  246. package/dist/workflow-sdk/index.d.ts +4 -4
  247. package/dist/{wrap-CaAA3ubO.d.ts → wrap-C36-eV-C.d.ts} +2 -2
  248. package/package.json +1 -1
  249. package/skills/permdock-data/references/queries-and-rls.md +1 -1
  250. package/dist/gen-CpS9JkCb.js +0 -1
  251. package/dist/pull-C_ZiPZ5X.js +0 -1
  252. package/dist/replay-Dg5-l7xu.d.ts +0 -3
  253. package/dist/run-BvtApZDp.js +0 -1
  254. package/dist/supabase-hook-D0Yzbl19.js +0 -2
  255. package/dist/usage-CKTsomEq.js +0 -1
  256. package/dist/watch-J1PfGMfb.js +0 -1
@@ -1,32 +1,32 @@
1
- import { Ar as Subject, Ct as WhereCompiler, D as Policy, Dr as Membership, G as CredentialVerifier, Or as Principal, X as DecisionSink, Y as DecisionProvider, Z as EntitlementSource, _t as TokenSigner, bn as DeliveryChannel, ct as RelationSource, it as MembershipSource, lt as SettingsSource, mt as SubjectResolver, nt as LimitStore, q as CustomRoleSource, rn as Snapshot, ut as SnapshotSource, vt as TokenVerifier } from "../policy-types-BnBZvh7N.js";
2
- 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-DPuDmlbL.js";
1
+ import { Ar as Subject, Ct as WhereCompiler, D as Policy, Dr as Membership, G as CredentialVerifier, Or as Principal, X as DecisionSink, Y as DecisionProvider, Z as EntitlementSource, _t as TokenSigner, bn as DeliveryChannel, ct as RelationSource, it as MembershipSource, lt as SettingsSource, mt as SubjectResolver, nt as LimitStore, q as CustomRoleSource, rn as Snapshot, ut as SnapshotSource, vt as TokenVerifier } from "../policy-types-DuM3k5Ao.js";
2
+ 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-DCMIztx1.js";
3
3
  import { A as ResourceInit, C as InferPermissionTree, r as Role, w as Permission } from "../vocabulary-DHfKPIC5.js";
4
4
  import { l as OperationLookup, n as OperationCoverageOptions } from "../coverage-AOeWiQ7Z.js";
5
- import { dt as LegacyCheck } from "../index-BDJ2OZvV.js";
6
- import { C as Limits, D as InstanceCache, a as PermDock, g as PrincipalIdentity, u as SnapshotOptions, v as PrincipalSource, z as ApprovalPolicySource } from "../permdock-V86uejcm.js";
7
- import { i as Seeds } from "../seeds-DLjPbhvM.js";
5
+ import { dt as LegacyCheck } from "../index-Cjr8Q-uq.js";
6
+ import { C as Limits, D as InstanceCache, a as PermDock, g as PrincipalIdentity, u as SnapshotOptions, v as PrincipalSource, z as ApprovalPolicySource } from "../permdock-DkvkGVF0.js";
7
+ import { i as Seeds } from "../seeds-BZMPfWcC.js";
8
8
  import { t as SqlQuery } from "../sql-BYYNi1lu.js";
9
- import { a as ApprovalDelegationSource, m as ApprovalStore } from "../types-5cvjmHTG.js";
9
+ import { a as ApprovalDelegationSource, m as ApprovalStore } from "../types-BGN3coSe.js";
10
10
  import { n as RevocationFeed } from "../revocations-ku_f2d2y.js";
11
11
  import { a as SaasProject } from "../permissions-UyQD5nRN.js";
12
- import { n as saasPolicy } from "../policy-DZORR-Fw.js";
13
- import { c as ModelMap, t as AgentPermDock, u as ToolMap } from "../create-CdB9FCZh.js";
14
- import { t as CloudApproverOptions } from "../types-BmTW35E5.js";
15
- import { c as AccessReviewStore } from "../types-CgaGxF5q.js";
12
+ import { n as saasPolicy } from "../policy-BoUbJ2c0.js";
13
+ import { c as ModelMap, t as AgentPermDock, u as ToolMap } from "../create-T_NqxU31.js";
14
+ import { t as CloudApproverOptions } from "../types-BwjOhlgx.js";
15
+ import { c as AccessReviewStore } from "../types-CKwI6AT4.js";
16
16
  import { t as supabaseMembershipsBudget } from "../budget-5LJ8kfZk.js";
17
- import { R as IdempotencyStore } from "../index-giCl-aQY.js";
18
- import { g as SetQueue, l as ReplayStore } from "../types-B_I8TBA9.js";
19
- import { S as SsfStreamStore } from "../index-CWwWkz10.js";
20
- import { s as PolicySource } from "../hosted-BISipW6F.js";
21
- import { l as VersionStore, n as SubjectCache, s as VersionCache } from "../subject-cache-UKUgQCEX.js";
22
- import { r as SnapshotStorage } from "../types-gp1w86cV.js";
23
- import { a as AutomationSource, t as Automation } from "../automation-BqUmdFfe.js";
24
- import { s as SupportSessionSource } from "../index-BO5f180f.js";
25
- import { n as ApprovalWaiter } from "../waiter-Bov7Cig6.js";
26
- import { c as DeliveryTransport, g as TransportMessages } from "../types-CDkJNA3a.js";
27
- import { x as DirectoryStore } from "../index-Co_e22iJ.js";
17
+ import { R as IdempotencyStore } from "../index-BOJPdIBk.js";
18
+ import { g as SetQueue, l as ReplayStore } from "../types-Cvfe-G_N.js";
19
+ import { S as SsfStreamStore } from "../index-DBBRSw6r.js";
20
+ import { s as PolicySource } from "../hosted-DZgmEG4b.js";
21
+ import { l as VersionStore, n as SubjectCache, s as VersionCache } from "../subject-cache-Bn4oJY_R.js";
22
+ import { r as SnapshotStorage } from "../types-dtDg4goh.js";
23
+ import { a as AutomationSource, t as Automation } from "../automation-C7WH5XcZ.js";
24
+ import { s as SupportSessionSource } from "../index-ktQ7E4qB.js";
25
+ import { n as ApprovalWaiter } from "../waiter-DdwtUSzB.js";
26
+ import { c as DeliveryTransport, g as TransportMessages } from "../types-D3GI2B9O.js";
27
+ import { x as DirectoryStore } from "../index-CAE_Z53Y.js";
28
28
  import { r as SupabaseHookManifest } from "../manifest-BwhZ1s5b.js";
29
- import { a as ProblemDetails } from "../errors-BGosrHl8.js";
29
+ import { a as ProblemDetails } from "../errors-BliKrfmP.js";
30
30
  import { expectTypeOf } from "vitest";
31
31
  /** `policyMatrix` under Vitest: one test per cell, plus the exhaustive check. */
32
32
  export declare function describePolicy<TSubject>(policy: Policy, config: DescribePolicyConfig<TSubject>): void;
@@ -1,7 +1,7 @@
1
1
  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-UyQD5nRN.js";
2
- import { n as saasPolicy, t as SAAS_API_KEY_LIMIT } from "../../policy-DZORR-Fw.js";
3
- import { Ar as Subject, Dr as Membership, Or as Principal, Sr as CustomRole, ct as RelationSource, nt as LimitStore, qt as Instant, vr as Actor, wr as Delegation } from "../../policy-types-BnBZvh7N.js";
4
- import { o as PermDockOptions } from "../../permdock-V86uejcm.js";
2
+ import { n as saasPolicy, t as SAAS_API_KEY_LIMIT } from "../../policy-BoUbJ2c0.js";
3
+ import { Ar as Subject, Dr as Membership, Or as Principal, Sr as CustomRole, ct as RelationSource, nt as LimitStore, qt as Instant, vr as Actor, wr as Delegation } from "../../policy-types-DuM3k5Ao.js";
4
+ import { o as PermDockOptions } from "../../permdock-DkvkGVF0.js";
5
5
  import { w as Permission } from "../../vocabulary-DHfKPIC5.js";
6
6
  import { StandardSchemaV1 } from "@standard-schema/spec";
7
7
  type FieldKind = "string" | "boolean" | "nullable-string";
@@ -1,10 +1,10 @@
1
- import { a as PermDock } from "../permdock-V86uejcm.js";
1
+ import { a as PermDock } from "../permdock-DkvkGVF0.js";
2
2
  import { w as Permission } from "../vocabulary-DHfKPIC5.js";
3
- import { D as Policy, Or as Principal } from "../policy-types-BnBZvh7N.js";
3
+ import { D as Policy, Or as Principal } from "../policy-types-DuM3k5Ao.js";
4
4
  import { n as RevocationFeed } from "../revocations-ku_f2d2y.js";
5
- import { t as ServerAdapterOptions } from "../bind-Bwk9tt1z.js";
6
- import { D as ConnectionOptions, T as Connection, i as OpenApiHooks } from "../server-types-BlMijUtb.js";
7
- import { t as RpcProtectOptions } from "../rpc-DyCWVn6C.js";
5
+ import { t as ServerAdapterOptions } from "../bind-BnrOLyJq.js";
6
+ import { D as ConnectionOptions, T as Connection, i as OpenApiHooks } from "../server-types-FkdDSB9h.js";
7
+ import { t as RpcProtectOptions } from "../rpc-BYFB37KV.js";
8
8
  import { AnyTRPCMiddlewareFunction } from "@trpc/server";
9
9
  type TrpcMiddlewareOpts<TCtx = object, TInput = unknown> = {
10
10
  readonly ctx: TCtx;
@@ -1,6 +1,6 @@
1
1
  import { U as POLICY_SCOPES, n as PlanTree, w as Permission } from "./vocabulary-DHfKPIC5.js";
2
2
  import { o as OperationMap } from "./operations-DaEoGpMV.js";
3
- import { N as PolicyVocabulary, Nn as ScopeNames } from "./policy-types-BnBZvh7N.js";
3
+ import { N as PolicyVocabulary, Nn as ScopeNames } from "./policy-types-DuM3k5Ao.js";
4
4
  /** Recursion guard: a tree nests resources at most this many levels deep. */
5
5
  type Depth = [never, 0, 1, 2, 3, 4, 5, 6, 7];
6
6
  /** The literal string keys of `T`, without an index signature. */
@@ -1,5 +1,5 @@
1
1
  import { K as AppData } from "./vocabulary-DHfKPIC5.js";
2
- import { Ar as Subject, Dr as Membership, Fn as Approver, Jn as RelationGrantee, Nr as AdapterId, a as ApprovalMode, c as ApprovalStage, i as ApprovalFallback, kn as WireDelegation, n as ApprovalCombine, qt as Instant } from "./policy-types-BnBZvh7N.js";
2
+ import { Ar as Subject, Dr as Membership, Fn as Approver, Jn as RelationGrantee, Nr as AdapterId, a as ApprovalMode, c as ApprovalStage, i as ApprovalFallback, kn as WireDelegation, n as ApprovalCombine, qt as Instant } from "./policy-types-DuM3k5Ao.js";
3
3
  type ApprovalStatus = "pending" | "approved" | "rejected" | "expired";
4
4
  type ApprovalApprovers = {
5
5
  /** Under `combine: 'any'` (the default). */
@@ -1,8 +1,8 @@
1
- import { m as ApprovalStore, u as ApprovalRequest } from "./types-5cvjmHTG.js";
1
+ import { m as ApprovalStore, u as ApprovalRequest } from "./types-BGN3coSe.js";
2
2
  import { a as CatalogDocument } from "./types-CbJ5mxXv.js";
3
- import { s as PolicySource } from "./hosted-BISipW6F.js";
4
- import { Ar as Subject, X as DecisionSink, _t as TokenSigner, ut as SnapshotSource, vt as TokenVerifier } from "./policy-types-BnBZvh7N.js";
5
- import { a as CatalogFinding } from "./sink-DhrVLPSJ.js";
3
+ import { s as PolicySource } from "./hosted-DZgmEG4b.js";
4
+ import { Ar as Subject, X as DecisionSink, _t as TokenSigner, ut as SnapshotSource, vt as TokenVerifier } from "./policy-types-DuM3k5Ao.js";
5
+ import { a as CatalogFinding } from "./sink-CoMI_OVw.js";
6
6
  type CloudEndpointOptions = {
7
7
  readonly url?: string;
8
8
  readonly environment?: string;
@@ -1,7 +1,7 @@
1
- import { n as ClientStoreOptions } from "./store-core-Bq7Qc9QM.js";
2
- import { Jt as ClientBundle, ir as Decision, rn as Snapshot, rr as ApprovalRequiredDecision, ur as GrantedDecision, vt as TokenVerifier } from "./policy-types-BnBZvh7N.js";
3
- import { n as DescribeMessages } from "./describe-FT1oVN_o.js";
4
- import { s as RowData } from "./permdock-V86uejcm.js";
1
+ import { n as ClientStoreOptions } from "./store-core-aluQ3R1M.js";
2
+ import { Jt as ClientBundle, ir as Decision, rn as Snapshot, rr as ApprovalRequiredDecision, ur as GrantedDecision, vt as TokenVerifier } from "./policy-types-DuM3k5Ao.js";
3
+ import { n as DescribeMessages } from "./describe-DEoWvk00.js";
4
+ import { s as RowData } from "./permdock-DkvkGVF0.js";
5
5
  import { w as Permission } from "./vocabulary-DHfKPIC5.js";
6
6
  import { ReactNode } from "react";
7
7
  type PermDockProviderProps = ({
@@ -1,5 +1,5 @@
1
- import { P as PermissionCheck, a as PermDock, f as WhereOptions, l as SimulateOptions, n as DecideOptions, o as PermDockOptions, p as WhereResult, r as DeriveOptions } from "./permdock-V86uejcm.js";
2
- import { Ar as Subject, D as Policy, Dr as Membership, N as PolicyVocabulary, Or as Principal, ir as Decision, lr as ExplainedDecision } from "./policy-types-BnBZvh7N.js";
1
+ import { P as PermissionCheck, a as PermDock, f as WhereOptions, l as SimulateOptions, n as DecideOptions, o as PermDockOptions, p as WhereResult, r as DeriveOptions } from "./permdock-DkvkGVF0.js";
2
+ import { Ar as Subject, D as Policy, Dr as Membership, N as PolicyVocabulary, Or as Principal, ir as Decision, lr as ExplainedDecision } from "./policy-types-DuM3k5Ao.js";
3
3
  import { E as PermissionTree, w as Permission } from "./vocabulary-DHfKPIC5.js";
4
4
  type RemotePdpAuth = {
5
5
  readonly bearer: string | (() => string | Promise<string>);
@@ -1,4 +1,4 @@
1
- import { Fn as Approver } from "./policy-types-BnBZvh7N.js";
1
+ import { Fn as Approver } from "./policy-types-DuM3k5Ao.js";
2
2
  type AccessReviewStatus = "open" | "closed";
3
3
  type AccessReviewItemStatus = "pending" | "kept" | "revoked";
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { m as ApprovalStore } from "./types-5cvjmHTG.js";
2
- import { $ as JwtClaims, Ar as Subject, Or as Principal, gn as AuthEvent, gt as TokenFailureCause, it as MembershipSource, vr as Actor, vt as TokenVerifier } from "./policy-types-BnBZvh7N.js";
1
+ import { m as ApprovalStore } from "./types-BGN3coSe.js";
2
+ import { $ as JwtClaims, Ar as Subject, Or as Principal, gn as AuthEvent, gt as TokenFailureCause, it as MembershipSource, vr as Actor, vt as TokenVerifier } from "./policy-types-DuM3k5Ao.js";
3
3
  import { n as RevocationFeed } from "./revocations-ku_f2d2y.js";
4
4
  import { t as ClaimsMap } from "./claims-map-CLKQWxJG.js";
5
5
  import { t as ClientNames } from "./clients-DGcyFDCc.js";
@@ -1,6 +1,6 @@
1
- import { Sn as DeliveryFailureCause, bn as DeliveryChannel, ur as GrantedDecision, wn as EmailCategory, xn as DeliveryEvent } from "./policy-types-BnBZvh7N.js";
2
- import { s as CloudEvent } from "./sink-DhrVLPSJ.js";
3
- import { t as ApprovalPrompt } from "./approval-prompt-CJvYBdja.js";
1
+ import { Sn as DeliveryFailureCause, bn as DeliveryChannel, ur as GrantedDecision, wn as EmailCategory, xn as DeliveryEvent } from "./policy-types-DuM3k5Ao.js";
2
+ import { s as CloudEvent } from "./sink-CoMI_OVw.js";
3
+ import { t as ApprovalPrompt } from "./approval-prompt-BKxaKtby.js";
4
4
  /**
5
5
  * Who a delivery goes to. `{ principal }` names an app principal and the
6
6
  * address the server loaded for it on `channel`. `{ address }` alone is an
@@ -1,8 +1,8 @@
1
- import { Jt as ClientBundle, ir as Decision, rn as Snapshot, rr as ApprovalRequiredDecision, ur as GrantedDecision, vt as TokenVerifier } from "./policy-types-BnBZvh7N.js";
1
+ import { Jt as ClientBundle, ir as Decision, rn as Snapshot, rr as ApprovalRequiredDecision, ur as GrantedDecision, vt as TokenVerifier } from "./policy-types-DuM3k5Ao.js";
2
2
  import { w as Permission } from "./vocabulary-DHfKPIC5.js";
3
- import { a as PermDock } from "./permdock-V86uejcm.js";
3
+ import { a as PermDock } from "./permdock-DkvkGVF0.js";
4
4
  import { t as PermissionBoundaryState } from "./boundary-DJqHADKu.js";
5
- import { f as PermissionState, h as ProviderOptionsBase, m as ProtectedActionView, t as ClientStore, y as ActionResult } from "./store-core-Bq7Qc9QM.js";
5
+ import { f as PermissionState, h as ProviderOptionsBase, m as ProtectedActionView, t as ClientStore, y as ActionResult } from "./store-core-aluQ3R1M.js";
6
6
  import { Snippet } from "svelte";
7
7
  import { Readable } from "svelte/store";
8
8
  /**
@@ -1,5 +1,5 @@
1
- import { N as PolicyVocabulary, yn as DecisionEvent } from "./policy-types-BnBZvh7N.js";
2
- import { a as PermDock } from "./permdock-V86uejcm.js";
1
+ import { N as PolicyVocabulary, yn as DecisionEvent } from "./policy-types-DuM3k5Ao.js";
2
+ import { a as PermDock } from "./permdock-DkvkGVF0.js";
3
3
  declare const GENAI_SEMCONV_PIN = "1.37.0";
4
4
  declare const GEN_AI_TOOL_NAME = "gen_ai.tool.name";
5
5
  declare const GEN_AI_TOOL_CALL_ID = "gen_ai.tool.call.id";
@@ -1,5 +1,5 @@
1
- import { i as Seeds } from "./seeds-DLjPbhvM.js";
2
- import { h as RoleThrough, m as RoleMap, s as SqlMembershipSource } from "./sources-Bq7k7g34.js";
1
+ import { i as Seeds } from "./seeds-BZMPfWcC.js";
2
+ import { h as RoleThrough, m as RoleMap, s as SqlMembershipSource } from "./sources-Dp6FQ8np.js";
3
3
  /**
4
4
  * `permdock powersync generate` and `verify` input. Tables and memberships come
5
5
  * from `rls`.
@@ -822,9 +822,15 @@ type RlsConfig = {
822
822
  * or impersonation session) by its `scope` claim in every helper and policy:
823
823
  * a grant passes only when one of the token's scopes reaches its permission
824
824
  * (the permission's own scope, a former scope, or a policy `oauthScopes`
825
- * entry). Denies always apply. Off by default.
826
- */
827
- readonly tokenScopes?: boolean;
825
+ * entry). Denies always apply. Off by default. With `{ delegations: true }`
826
+ * an OAuth client token (a `client_id` and no `act`) also reaches the keys a
827
+ * policy delegation to `actor('oauth-client')` from `authenticated()` hands
828
+ * over, so a token whose scopes are identity-only is capped at the delegation
829
+ * in Postgres too.
830
+ */
831
+ readonly tokenScopes?: boolean | {
832
+ readonly delegations?: boolean;
833
+ };
828
834
  /**
829
835
  * Supabase Realtime: policies on `realtime.messages` for private channels.
830
836
  * Supabase dialect only.
@@ -1,7 +1,7 @@
1
- import { n as ClientStoreOptions } from "./store-core-Bq7Qc9QM.js";
2
- import { n as DescribeMessages } from "./describe-FT1oVN_o.js";
3
- import { rn as Snapshot, ut as SnapshotSource, vt as TokenVerifier } from "./policy-types-BnBZvh7N.js";
4
- import { t as PermDockDefaults } from "./types-Dl2jRkyq.js";
1
+ import { n as ClientStoreOptions } from "./store-core-aluQ3R1M.js";
2
+ import { n as DescribeMessages } from "./describe-DEoWvk00.js";
3
+ import { rn as Snapshot, ut as SnapshotSource, vt as TokenVerifier } from "./policy-types-DuM3k5Ao.js";
4
+ import { t as PermDockDefaults } from "./types-BzsplNgO.js";
5
5
  import { ReactNode } from "react";
6
6
  type SnapshotStorage = {
7
7
  /** Names the implementation in errors and events. */
@@ -1,4 +1,4 @@
1
- import { n as CollectConfig } from "./types-config-CyawIkMF.js";
1
+ import { n as CollectConfig } from "./types-config-DYRoZ8Iw.js";
2
2
  /**
3
3
  * 0 success, 1 failure, 2 usage or an action only a person can take (an input,
4
4
  * a confirmation, a login), 130 interrupted (SIGINT or a cancelled prompt), 143
@@ -1,4 +1,4 @@
1
- import { n as PermDockPluginOptions } from "../types-run-ByHuYUen.js";
1
+ import { n as PermDockPluginOptions } from "../types-run-CeCrWO0v.js";
2
2
  import { createUnplugin } from "unplugin";
3
3
  type CreateUnplugin = typeof createUnplugin<PermDockPluginOptions | undefined>;
4
4
  export declare const createPermDockUnplugin: ReturnType<CreateUnplugin>;
@@ -1,5 +1,5 @@
1
1
  import { r as peerHint } from "../peer-D77JpXe-.js";
2
- import { i as report, r as createCollectScheduler } from "../watch-D-5ztqN8.js";
2
+ import { i as report, r as createCollectScheduler } from "../watch-14vng0pg.js";
3
3
  import { createRequire } from "node:module";
4
4
  // src/unplugin/index.ts
5
5
  function loadCreateUnplugin() {
@@ -2,8 +2,8 @@ import { a as getResource } from "./permission-registry-DstT40VS.js";
2
2
  import { c as jsonSchemaOf } from "./catalog-doc-D4g3nyFB.js";
3
3
  import { r as runCollect } from "./collect-CPimbkC5.js";
4
4
  import { f as usageResult } from "./errors-DgLOqc6j.js";
5
- import { t as DOCS_BASE } from "./manifest-BUeAHWDT.js";
6
- import { r as findingOf } from "./output-D4FLF3_v.js";
5
+ import { t as DOCS_BASE } from "./manifest-1w67doim.js";
6
+ import { r as findingOf } from "./output-dO4bArCS.js";
7
7
  import { o as USAGE_REPORT_SCHEMA } from "./version-D-jWyJb9.js";
8
8
  import { n as jiti, r as parseSync, t as createVisitor } from "./optional-CaQWp9HA.js";
9
9
  import { a as rel, r as listSourceFiles } from "./files-DAR51W3J.js";
@@ -0,0 +1 @@
1
+ export { t as runUsage } from "./usage-BGuSrwiW.js";
@@ -16,7 +16,7 @@ const usage = defineLeaf({
16
16
  }
17
17
  },
18
18
  async run(ctx, { flags }) {
19
- return (await import("./usage-CKTsomEq.js")).runUsage({
19
+ return (await import("./usage-CW6PfRfC.js")).runUsage({
20
20
  cwd: ctx.cwd,
21
21
  config: ctx.config,
22
22
  ignore: flags.ignore,
@@ -1,4 +1,4 @@
1
- import { a as ProblemDetails } from "./errors-BGosrHl8.js";
1
+ import { a as ProblemDetails } from "./errors-BliKrfmP.js";
2
2
  import { StandardSchemaV1 } from "@standard-schema/spec";
3
3
  /**
4
4
  * The base of every Problem Details `type` URI; defined here so a validation
@@ -7,15 +7,15 @@ import { s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
7
7
  import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-3aUUP6Nx.js";
8
8
  import { r as pgConnector } from "./pg-DmS5ITHu.js";
9
9
  import { o as loadPolicyAt } from "./load-m7jmit3y.js";
10
- import { n as commandFor } from "./compile-nR1gQhXo.js";
10
+ import { n as commandFor } from "./compile-BRDpja_Y.js";
11
11
  import { r as isRecord } from "./compact-C4LFuqbW.js";
12
12
  import { t as policyRowConditionKeys } from "./row-conditions-DwIJocfQ.js";
13
13
  import { c as rootScope, d as scopeList, o as normalizeMemberships } from "./scopes-B-KX9EI8.js";
14
14
  import { c as rowConditionMessage, n as HELPER_TABLE_POLICIES_SQL, s as helperTablePoliciesFromRows } from "./helper-calls-B5MOl99d.js";
15
15
  import { a as quoteIdent, c as quoteTable, o as quoteLiteral, s as quoteQualified } from "./quote-LNaBdCGA.js";
16
- import { Q as graphPlan, i as tableNames, r as tableNameOf } from "./tables-Bxmf2beb.js";
16
+ import { et as graphPlan, i as tableNames, r as tableNameOf } from "./tables-BTXmioCH.js";
17
17
  import { s as viewName, t as FIELD_VIEWS } from "./fields-CwFej4gp.js";
18
- import { t as DOCS_BASE } from "./manifest-BUeAHWDT.js";
18
+ import { t as DOCS_BASE } from "./manifest-1w67doim.js";
19
19
  import { C as membershipsClaim, g as customRoleScope } from "./evaluate-DNz6wMYv.js";
20
20
  import { n as defaultSqlCommand, t as SQL_IDENT } from "./sql-T4GaBh9X.js";
21
21
  import "./budget-BH81q2cj.js";
@@ -1,10 +1,10 @@
1
- import { i as describe, r as DescribeOptions, t as DecisionDescription } from "../describe-FT1oVN_o.js";
2
- import { c as requiredPlans } from "../errors-BGosrHl8.js";
1
+ import { i as describe, r as DescribeOptions, t as DecisionDescription } from "../describe-DEoWvk00.js";
2
+ import { c as requiredPlans } from "../errors-BliKrfmP.js";
3
3
  import { t as approvalHeaders } from "../headers-D1oRr-js.js";
4
4
  import { a as broadcastChannelRefresh, c as visibilityRefresh, i as authzChangeRefresh, n as EventSourceRefreshOptions, o as eventSourceRefresh, r as RefreshTrigger, s as focusRefresh, t as AuthzChangeRefresh } from "../refresh-on-C1zIMtJr.js";
5
- import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, h as ProviderOptionsBase, i as ApprovalState, l as GateView, m as ProtectedActionView, o as ClientStatus, r as ApprovalHandle, s as FilterResult, v as TenantView, y as ActionResult } from "../store-core-Bq7Qc9QM.js";
6
- import { Dr as Membership, Jt as ClientBundle, N as PolicyVocabulary, ir as Decision, rn as Snapshot, rr as ApprovalRequiredDecision, vt as TokenVerifier } from "../policy-types-BnBZvh7N.js";
7
- import { d as UncheckedData, s as RowData } from "../permdock-V86uejcm.js";
5
+ import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, h as ProviderOptionsBase, i as ApprovalState, l as GateView, m as ProtectedActionView, o as ClientStatus, r as ApprovalHandle, s as FilterResult, v as TenantView, y as ActionResult } from "../store-core-aluQ3R1M.js";
6
+ import { Dr as Membership, Jt as ClientBundle, N as PolicyVocabulary, ir as Decision, rn as Snapshot, rr as ApprovalRequiredDecision, vt as TokenVerifier } from "../policy-types-DuM3k5Ao.js";
7
+ import { d as UncheckedData, s as RowData } from "../permdock-DkvkGVF0.js";
8
8
  import { r as Role, w as Permission } from "../vocabulary-DHfKPIC5.js";
9
9
  import { t as PermissionBoundaryState } from "../boundary-DJqHADKu.js";
10
10
  import { ComputedRef, DefineComponent, MaybeRefOrGetter, Plugin, VNode } from "vue";
@@ -1,5 +1,5 @@
1
- import { m as ApprovalStore } from "./types-5cvjmHTG.js";
2
- import { qt as Instant } from "./policy-types-BnBZvh7N.js";
1
+ import { m as ApprovalStore } from "./types-BGN3coSe.js";
2
+ import { qt as Instant } from "./policy-types-DuM3k5Ao.js";
3
3
  type ApprovalWaitOptions = {
4
4
  /**
5
5
  * When the approval request expires; the wait ends then whatever the store
@@ -1,4 +1,4 @@
1
- import { D as Policy, N as PolicyVocabulary, Or as Principal } from "./policy-types-BnBZvh7N.js";
1
+ import { D as Policy, N as PolicyVocabulary, Or as Principal } from "./policy-types-DuM3k5Ao.js";
2
2
  /** What `warm` measured: `ms` covers the instance and the first check. */
3
3
  type WarmReport = {
4
4
  readonly ok: boolean;
@@ -2,7 +2,7 @@ import { f as nowMillis, i as dateAt } from "./time-r0CKBm57.js";
2
2
  import { r as runCollect } from "./collect-CPimbkC5.js";
3
3
  import { a as describeError } from "./errors-DgLOqc6j.js";
4
4
  import { t as defaultSrcPath } from "./files-DAR51W3J.js";
5
- import { i as loadConfig, r as isConfigFile } from "./config-7QvEq57a.js";
5
+ import { i as loadConfig, r as isConfigFile } from "./config-Dan6vcvj.js";
6
6
  import { statSync, watch } from "node:fs";
7
7
  import { basename, dirname, relative, resolve, sep } from "node:path";
8
8
  // src/cli/watch.ts
@@ -0,0 +1 @@
1
+ export { a as watchCollect } from "./watch-14vng0pg.js";
@@ -1,8 +1,8 @@
1
1
  import { r as isRecord } from "./compact-C4LFuqbW.js";
2
2
  import { i as dateAt } from "./time-r0CKBm57.js";
3
3
  import { a as describeError, n as CliError } from "./errors-DgLOqc6j.js";
4
- import { n as createChangeScheduler } from "./watch-D-5ztqN8.js";
5
- import { n as receiptRows } from "./pipeline-DCERGTTY.js";
4
+ import { n as createChangeScheduler } from "./watch-14vng0pg.js";
5
+ import { n as receiptRows } from "./pipeline-BAGSNnct.js";
6
6
  import { existsSync } from "node:fs";
7
7
  import { fileURLToPath } from "node:url";
8
8
  import { Worker } from "node:worker_threads";
@@ -1,4 +1,4 @@
1
- import { ir as Decision, rn as Snapshot } from "../policy-types-BnBZvh7N.js";
1
+ import { ir as Decision, rn as Snapshot } from "../policy-types-DuM3k5Ao.js";
2
2
  import { E as PermissionTree, w as Permission } from "../vocabulary-DHfKPIC5.js";
3
3
  import { StandardSchemaV1 } from "@standard-schema/spec";
4
4
  type WebMcpClientStatus = "ready" | "pending" | "stale" | "server-only";
@@ -1,5 +1,5 @@
1
- import { a as AutomationSource, i as AutomationRequest, l as memoryAutomationSource, n as AutomationDecision, r as AutomationMode, s as MemoryAutomationSource, t as Automation, u as parseAutomation } from "../automation-BqUmdFfe.js";
2
- import { i as pollingApprovalWaiter, n as ApprovalWaiter, r as PollingApprovalWaiterOptions, t as ApprovalWaitOptions } from "../waiter-Bov7Cig6.js";
3
- import { a as WorkflowPermDockOptions, i as WorkflowPermDock, n as AwaitApprovalOptions, o as createPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-CdbVXh5I.js";
1
+ import { a as AutomationSource, i as AutomationRequest, l as memoryAutomationSource, n as AutomationDecision, r as AutomationMode, s as MemoryAutomationSource, t as Automation, u as parseAutomation } from "../automation-C7WH5XcZ.js";
2
+ import { i as pollingApprovalWaiter, n as ApprovalWaiter, r as PollingApprovalWaiterOptions, t as ApprovalWaitOptions } from "../waiter-DdwtUSzB.js";
3
+ import { a as WorkflowPermDockOptions, i as WorkflowPermDock, n as AwaitApprovalOptions, o as createPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-iCwrnaFE.js";
4
4
  import "../index-CaxrMD1A.js";
5
5
  export { type ApprovalWaitOptions, type ApprovalWaiter, type Automation, type AutomationDecision, type AutomationMode, type AutomationOptions, type AutomationRequest, type AutomationSource, type AwaitApprovalOptions, type MemoryAutomationSource, type PollingApprovalWaiterOptions, type StartAutomationResult, type WorkflowPermDock, type WorkflowPermDockOptions, createPermDock, memoryAutomationSource, parseAutomation, pollingApprovalWaiter };
@@ -1,8 +1,8 @@
1
- import { ir as Decision } from "../policy-types-BnBZvh7N.js";
2
- import { a as PermDock } from "../permdock-V86uejcm.js";
1
+ import { ir as Decision } from "../policy-types-DuM3k5Ao.js";
2
+ import { a as PermDock } from "../permdock-DkvkGVF0.js";
3
3
  import { w as Permission } from "../vocabulary-DHfKPIC5.js";
4
- import { i as WorkflowPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-CdbVXh5I.js";
5
- import { n as ApprovalWaiter } from "../waiter-Bov7Cig6.js";
4
+ import { i as WorkflowPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-iCwrnaFE.js";
5
+ import { n as ApprovalWaiter } from "../waiter-DdwtUSzB.js";
6
6
  /**
7
7
  * The part of a Workflow SDK `Hook` the waiter reads: awaiting it suspends the
8
8
  * run.
@@ -1,5 +1,5 @@
1
- import { a as PermDock } from "./permdock-V86uejcm.js";
2
- import { N as PolicyVocabulary } from "./policy-types-BnBZvh7N.js";
1
+ import { a as PermDock } from "./permdock-DkvkGVF0.js";
2
+ import { N as PolicyVocabulary } from "./policy-types-DuM3k5Ao.js";
3
3
  /** A wrapper an adapter applies to each instance it builds, as `withOtel` does. */
4
4
  type PermDockWrap = <V extends PolicyVocabulary>(permdock: PermDock<V>) => PermDock<V>;
5
5
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "permdock",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "description": "Typed permissions for TypeScript apps, APIs, databases, and AI agents, with the permdock CLI and test runners.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -51,7 +51,7 @@ pnpm exec permdock rls verify --introspect
51
51
  - When support or impersonation tokens (an `act` claim) reach the Data API, set `rls.readOnlyActors: true`: each table and write command the policies grant gets a restrictive `{table}_{op}_read_only_actors` policy that refuses the write unless `act.read_only` is `false`. Never hand-write that policy per table. With `--helpers-only`, every hand-written insert, update and delete policy calls `(select permdock.permdock_actor_may_write())`, and `rls verify --introspect` names the ones that do not.
52
52
  - To list who holds a permission in one organization (notification fan-out, an approver list), server SQL calls `permitted_<scope>_users('<permission key>', <id>)` in `database` mode, never a hand-written join of memberships and `role_permissions`. No client role may execute it; grant it to the backend's Postgres role.
53
53
  - When a backend queries Postgres for a verified API key, set `rls.apiKeys` and put the key in the `api_key` claim (`scopes` as permission keys, `tenant` and `roles` for a key that belongs to a tenant): the helpers cap every allow at the scopes and treat a tenant key without `sub` as a service principal of that tenant. A user key whose claim names a `tenant` is held to that tenant even with `rls.tenants: 'all'`, and `permdock_has` is false for it. Never write a `has_scope` check per policy.
54
- - When OAuth clients, MCP clients or agents (a `client_id` or an agent `act` claim) reach the Data API, set `rls.tokenScopes: true`: the helpers and helper-free allows then pass a grant only when the token's `scope` claim reaches its permission, through the same map better-supabase's `delegation.scopes` reads. A policy delegation does not compile into SQL, so such a client needs permission scopes or `oauthScopes` in its token. Without `rls.tokenScopes` (or `rls.apiKeys` for an API key claim), `permdock_has` refuses every global grant to that token, so a delegated client never holds platform permissions at the Data API. Never hand-write a scope check per policy.
54
+ - When OAuth clients, MCP clients or agents (a `client_id` or an agent `act` claim) reach the Data API, set `rls.tokenScopes: true`: the helpers and helper-free allows then pass a grant only when the token's `scope` claim reaches its permission, through the same map better-supabase's `delegation.scopes` reads. A Supabase OAuth token carries identity scopes only, so when a policy delegation to `actor('oauth-client')` from `authenticated()` is what grants such a client, set `rls.tokenScopes: { delegations: true }`: the helpers then also pass the delegation's keys for a `client_id` token. Other delegations do not compile into SQL. Without `rls.tokenScopes` (or `rls.apiKeys` for an API key claim), `permdock_has` refuses every global grant to that token, so a delegated client never holds platform permissions at the Data API. Never hand-write a scope check per policy.
55
55
  - On Supabase every generated helper and policy reads the subject through `permdock_user_id()`: the `sub` in `request.jwt.claims`, and null for the empty `sub` of a tenant service key. It ignores the legacy `request.jwt.claim.sub` setting; SQL that impersonates a user sets `request.jwt.claims`. A hand-written policy such a token reaches calls `(select permdock.permdock_user_id())`, never `auth.uid()`, which fails the uuid cast.
56
56
  - `rls.assignments` puts a `permdock_assignment` trigger on each mapped membership table, the global-roles table `rls.roles` and each table in `tables`; `ownRole: 'refuse'` (or a map of tables) also refuses a client write to the caller's own row. `doctor` PD064 names a guarded table no migration puts the trigger on.
57
57
  - SQL that assigns roles calls `permdock_can_assign_any(role, tenant, scope, scope_id)`, which covers declared and custom roles; SQL acting later for a stored user (an invitation accept re-checking the inviter) calls `permdock_can_assign_any_for(user, ...)`. `permdock supabase inspect` lists both in the manifest's `rls.helpers`.
@@ -1 +0,0 @@
1
- export { n as renderKinds } from "./gen-Fi4GcvIY.js";
@@ -1 +0,0 @@
1
- export { n as runCloudPull } from "./pull-BQELP7aV.js";
@@ -1,3 +0,0 @@
1
- import { l as ReplayStore } from "./types-B_I8TBA9.js";
2
- declare function memoryReplayStore(): ReplayStore;
3
- export { memoryReplayStore as t };
@@ -1 +0,0 @@
1
- export { t as run } from "./run-DTz-e3Od.js";
@@ -1,2 +0,0 @@
1
- import "./hook-sql-CbkH78FC.js";
2
- export { r as runSupabase } from "./supabase-hook-t1HnQf8U.js";
@@ -1 +0,0 @@
1
- export { t as runUsage } from "./usage-B8ca_Nj_.js";
@@ -1 +0,0 @@
1
- export { a as watchCollect } from "./watch-D-5ztqN8.js";