permdock 0.21.0 → 0.22.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 (359) hide show
  1. package/README.md +2 -1
  2. package/dist/a2a/index.d.ts +5 -5
  3. package/dist/a2a/index.js +5 -4
  4. package/dist/{adoption-scan-UkQisAqe.js → adoption-scan-_bHLMnVQ.js} +1 -1
  5. package/dist/agent/index.d.ts +2 -2
  6. package/dist/agent/index.js +1 -1
  7. package/dist/ai-sdk/index.d.ts +4 -4
  8. package/dist/ai-sdk/index.js +3 -3
  9. package/dist/app/index.d.ts +85 -0
  10. package/dist/app/index.js +91 -0
  11. package/dist/app-DIvM65Mv.js +24 -0
  12. package/dist/{approval-policies-CKlByf5o.d.ts → approval-policies-UnDSxT__.d.ts} +2 -2
  13. package/dist/{approval-prompt-CQFiO1KE.d.ts → approval-prompt-2hTqo6IM.d.ts} +2 -2
  14. package/dist/approvals/index.d.ts +3 -3
  15. package/dist/approvals/index.js +3 -3
  16. package/dist/{approvals-CuXILe52.js → approvals-B_sn4Wrn.js} +6 -6
  17. package/dist/{arazzo-CUthH61H.js → arazzo-BXD-VJU_.js} +1 -1
  18. package/dist/{arazzo-BC3uLIZy.js → arazzo-Ct0PGblq.js} +3 -3
  19. package/dist/astro/index.d.ts +6 -6
  20. package/dist/astro/index.js +2 -2
  21. package/dist/{audience-BUonniPx.js → audience-5Xx1hdIv.js} +1 -1
  22. package/dist/{auth-j3Eu-j4h.js → auth-BxXHxWRy.js} +1 -1
  23. package/dist/authzen/index.d.ts +5 -5
  24. package/dist/authzen/index.js +4 -4
  25. package/dist/{automation-CpOk7Tlu.d.ts → automation-B20_8UoT.d.ts} +3 -3
  26. package/dist/{automation-x3KEUusw.js → automation-BueW05db.js} +2 -2
  27. package/dist/better-auth/index.d.ts +2 -2
  28. package/dist/better-auth/index.js +1 -1
  29. package/dist/better-supabase/index.d.ts +113 -56
  30. package/dist/better-supabase/index.js +200 -62
  31. package/dist/better-supabase-DF8f8oly.js +194 -0
  32. package/dist/{bind-CJf7S-Jd.js → bind-B4Z0U2Gr.js} +5 -5
  33. package/dist/{bind-XvnD_SUz.d.ts → bind-CnOMjazH.d.ts} +7 -7
  34. package/dist/{build-instance-CkRKgjSj.js → build-instance-B0vsViF5.js} +3 -25
  35. package/dist/{capability-zN6T9fxe.js → capability-CenWwTMR.js} +1 -1
  36. package/dist/{capability-v2xZB7us.d.ts → capability-YkRMUAsF.d.ts} +2 -2
  37. package/dist/{casbin-BOZN1P2Y.js → casbin-D5evU3lX.js} +1 -1
  38. package/dist/{casbin-v9Xo_XPa.js → casbin-imBS3UIf.js} +1 -1
  39. package/dist/catalog/index.d.ts +5 -5
  40. package/dist/catalog/index.js +5 -5
  41. package/dist/catalog-C462QC3A.js +1 -0
  42. package/dist/{catalog-DjDc87R2.js → catalog-CoyKnU5c.js} +1 -1
  43. package/dist/{catalog-s0waIrfY.js → catalog-Y4CjN8NA.js} +4 -4
  44. package/dist/{catalog-operations-BD22drQf.js → catalog-operations-Do1eD-Rt.js} +1 -1
  45. package/dist/{challenge-DbkpCx_v.js → challenge-B__LcNve.js} +3 -3
  46. package/dist/chat/index.d.ts +1 -1
  47. package/dist/chat/index.js +3 -2
  48. package/dist/chat-sdk/index.d.ts +3 -3
  49. package/dist/claude-agent/index.d.ts +3 -3
  50. package/dist/claude-agent/index.js +2 -2
  51. package/dist/clerk/index.d.ts +3 -3
  52. package/dist/cli/bin.js +1 -1
  53. package/dist/cli/index.d.ts +8 -7
  54. package/dist/cli/index.js +3 -3
  55. package/dist/cloud/index.d.ts +8 -8
  56. package/dist/cloud/index.js +3 -3
  57. package/dist/{cloud-CB0btByh.js → cloud-DWCeStPH.js} +2 -2
  58. package/dist/{codemod-C3a3Iz_w.js → codemod-B7QKJ_ak.js} +2 -2
  59. package/dist/{codemod-B-duJDFD.js → codemod-BaPmaCYQ.js} +13 -6
  60. package/dist/{collect-DN_x7hvV.js → collect-Cr71JA7z.js} +8 -7
  61. package/dist/{collect-DMQ6Sxr6.js → collect-ScSG05VJ.js} +2 -2
  62. package/dist/collect-W9i7REKT.js +1 -0
  63. package/dist/compile/index.d.ts +1 -1
  64. package/dist/compile/index.js +1 -1
  65. package/dist/{compile-B_oJqmIg.js → compile-Cvru58id.js} +2 -2
  66. package/dist/{compile-DonvwG9x.d.ts → compile-DC-BrhH1.d.ts} +3 -3
  67. package/dist/{completion-6IshPaPd.js → completion-DOUMyCwa.js} +1 -1
  68. package/dist/{delegation-aK4T_5WU.js → condition-evaluate-bVVRSdzq.js} +159 -159
  69. package/dist/{config-C45X7mpm.js → config-DRp-E8Ly.js} +1 -1
  70. package/dist/{config-D2oXUwos.js → config-DyNanTjZ.js} +10 -8
  71. package/dist/{config-report-Bmo62RRr.js → config-report-Bh_nLdAE.js} +2 -2
  72. package/dist/{config-shape-D9paLhEX.js → config-shape-C4zqzG2K.js} +9 -2
  73. package/dist/{context-YhyXyqBI.js → context-Cem4QafV.js} +2 -2
  74. package/dist/convex/index.d.ts +5 -5
  75. package/dist/convex/index.js +2 -2
  76. package/dist/{core-Dxkwz4xR.js → core-CUjhfz0W.js} +6 -6
  77. package/dist/{core-9KbhurkH.d.ts → core-D2JNg5jA.d.ts} +3 -3
  78. package/dist/coverage-D8jBJdgD.d.ts +114 -0
  79. package/dist/coverage-Dh2W_DmF.js +211 -0
  80. package/dist/{create-DH4ZD0A7.d.ts → create-B2tdOygC.d.ts} +7 -7
  81. package/dist/{create-Q0wF9Elt.js → create-BJ2_8NDO.js} +5 -5
  82. package/dist/{create-BRiRVNUO.js → create-BsL5lCWR.js} +8 -7
  83. package/dist/{create-BzgDDamI.d.ts → create-CPDSbK1a.d.ts} +5 -5
  84. package/dist/{create-BQOQkYYg.d.ts → create-oMCcZV4X.d.ts} +9 -9
  85. package/dist/{credential-B3Hj4puZ.js → credential-Bap3HClV.js} +4 -4
  86. package/dist/{server-D0PW6ZCw.js → credentials-BXV0oz56.js} +3 -146
  87. package/dist/credentials-DPX140fN.d.ts +125 -0
  88. package/dist/delivery/index.d.ts +4 -4
  89. package/dist/delivery/index.js +1 -1
  90. package/dist/{denied-text-De8cw3MW.d.ts → denied-text-BXQkWU7d.d.ts} +2 -2
  91. package/dist/{describe-DibQM6g-.d.ts → describe-DVobr5FX.d.ts} +2 -2
  92. package/dist/{diff-BJv7I3GR.js → diff-BR9JArxz.js} +6 -6
  93. package/dist/{diff-3fpwo3UD.js → diff-Jc_kbDz-.js} +1 -1
  94. package/dist/{doctor-Bz7s3JYD.js → doctor-BBMW5ZT_.js} +310 -36
  95. package/dist/{doctor-keoa9DpH.js → doctor-DhqSiPkq.js} +3 -3
  96. package/dist/drizzle/index.d.ts +3 -3
  97. package/dist/drizzle/index.js +1 -1
  98. package/dist/elysia/index.d.ts +5 -5
  99. package/dist/elysia/index.js +3 -3
  100. package/dist/{errors-OTE9u4Wk.d.ts → errors-D_JIQJYb.d.ts} +1 -1
  101. package/dist/{evaluate-Dcq_U2TV.js → evaluate-B5yZHmts.js} +16 -16
  102. package/dist/{evaluations-CNMVJVD6.js → evaluations-BzTDWO4m.js} +57 -57
  103. package/dist/{evaluations-OCm_Z-8V.d.ts → evaluations-DQYfh4Jh.d.ts} +3 -3
  104. package/dist/eve/index.d.ts +5 -5
  105. package/dist/eve/index.js +3 -3
  106. package/dist/express/index.d.ts +5 -5
  107. package/dist/express/index.js +3 -3
  108. package/dist/fastify/index.d.ts +5 -5
  109. package/dist/fastify/index.js +3 -3
  110. package/dist/{fetch-adapter-BlL-ZhHq.d.ts → fetch-adapter-DxqsIXSO.d.ts} +4 -4
  111. package/dist/{fetch-adapter-4EB3cLgB.js → fetch-adapter-MoYZ-vF5.js} +3 -3
  112. package/dist/{fields-D_TfExiI.js → fields-CVyOk-f1.js} +2 -2
  113. package/dist/{fixtures-Cemqurt8.js → fixtures-BVZc7OCF.js} +1 -1
  114. package/dist/{from-snapshot-DHnb8Fh4.js → from-snapshot-oR_N97dM.js} +346 -14
  115. package/dist/{gen-DYF4LKUP.js → gen-DXXoFjyf.js} +1 -1
  116. package/dist/{gen-Cf7nQsOb.js → gen-WdycZ_-b.js} +5 -5
  117. package/dist/{grantee-conditions-DX4K_gGI.js → grantee-conditions-Dzprappv.js} +1 -1
  118. package/dist/{grantee-match-BP-k4vRJ.js → grantee-match-8J2y60MF.js} +3 -3
  119. package/dist/h3/index.d.ts +4 -4
  120. package/dist/h3/index.js +3 -3
  121. package/dist/{helpers-D-MXwkOF.js → helpers-DzBIfL1N.js} +25 -25
  122. package/dist/hono/index.d.ts +5 -5
  123. package/dist/hono/index.js +3 -3
  124. package/dist/{hosted-C2Pmhy2x.js → hosted-C5I2TSXm.js} +4 -4
  125. package/dist/{hosted-yhyAuQkL.d.ts → hosted-DXq1plaP.d.ts} +1 -1
  126. package/dist/{http-DhMWeB_h.js → http-dptLQzPP.js} +1 -1
  127. package/dist/{expiry-6XByK0dm.js → ids-DzhJaCUj.js} +23 -23
  128. package/dist/{import-CQ_kH_Ny.js → import-BE5sDazm.js} +2 -2
  129. package/dist/{import-C2ExjVvv.js → import-CvXswHDy.js} +2 -2
  130. package/dist/index-BcS8c_2S.d.ts +101 -0
  131. package/dist/{index--AwSBzJC.d.ts → index-BdZpqhJK.d.ts} +2 -2
  132. package/dist/{index-CLbGOPBr.d.ts → index-C-R8lBPb.d.ts} +3 -3
  133. package/dist/{index-Do7FqHEr.d.ts → index-C_8uxAlv.d.ts} +5 -5
  134. package/dist/{index-tuR-kZoJ.d.ts → index-Cjfa1Uwr.d.ts} +21 -40
  135. package/dist/{index-BqzpT-90.d.ts → index-iIsqXFVu.d.ts} +6 -6
  136. package/dist/index.d.ts +19 -20
  137. package/dist/index.js +25 -24
  138. package/dist/{init-kTFkEu8S.js → init-B_S8Xdz1.js} +4 -4
  139. package/dist/{init-DvkvbvZ_.js → init-CqGHcvyR.js} +2 -2
  140. package/dist/{instance-options-Cq66kEeR.d.ts → instance-options-C6gEDOts.d.ts} +1 -1
  141. package/dist/instance-options-URVwqpMW.js +24 -0
  142. package/dist/{instance-snapshot-Bi4-dJk0.js → instance-snapshot-D_dGTq--.js} +9 -9
  143. package/dist/jwt/index.d.ts +4 -4
  144. package/dist/jwt/index.js +2 -2
  145. package/dist/{kernel-CLEzDmbv.js → kernel-NmxiWII2.js} +8 -8
  146. package/dist/kysely/index.d.ts +3 -3
  147. package/dist/kysely/index.js +1 -1
  148. package/dist/limits-CAhpRrhk.js +167 -0
  149. package/dist/{load-BaEamml-.js → load-C4p4VgwR.js} +2 -2
  150. package/dist/load-DiBUJx77.js +1 -0
  151. package/dist/{login-9ycIcJZH.js → login-CzwlsBEO.js} +4 -4
  152. package/dist/{login-CM_etiLM.js → login-DoLxv1s5.js} +3 -3
  153. package/dist/{manifest-CCd-xrM3.js → manifest-BAf7cgRx.js} +35 -35
  154. package/dist/{map-claims-PQwHynxV.js → map-claims-CAa_bQt9.js} +1 -1
  155. package/dist/{map-error-EOhahOVA.js → map-error-p4ROJ_26.js} +1 -1
  156. package/dist/mcp/index.d.ts +9 -9
  157. package/dist/mcp/index.js +9 -8
  158. package/dist/{migrate-CkLHdwuH.js → migrate-DVsxeE0y.js} +1 -1
  159. package/dist/{module-values-BYuNtdK5.js → module-values-BLiVlO1X.js} +3 -3
  160. package/dist/nest/index.d.ts +5 -5
  161. package/dist/nest/index.js +3 -3
  162. package/dist/next/index.d.ts +43 -17
  163. package/dist/next/index.js +54 -21
  164. package/dist/next/plugin.d.ts +1 -1
  165. package/dist/next/plugin.js +1 -1
  166. package/dist/node/index.d.ts +5 -5
  167. package/dist/node/index.js +2 -2
  168. package/dist/openai/index.d.ts +5 -5
  169. package/dist/openai/index.js +3 -3
  170. package/dist/openapi/index.d.ts +5 -59
  171. package/dist/openapi/index.js +3 -2
  172. package/dist/{openapi-BOsx0xn9.js → openapi-Cc-aS9xC.js} +6 -135
  173. package/dist/{openapi-QnnU2A1c.js → openapi-DroBcLJZ.js} +2 -2
  174. package/dist/{openapi-DA7FVG2F.js → openapi-EmvKwuWj.js} +4 -4
  175. package/dist/{operations-Ci_rT6Uo.d.ts → operations-BMPx7HyO.d.ts} +1 -1
  176. package/dist/optional-8TKc-0j4.js +47 -0
  177. package/dist/orpc/index.d.ts +7 -7
  178. package/dist/orpc/index.js +4 -4
  179. package/dist/otel/index.d.ts +3 -3
  180. package/dist/otel/index.js +1 -1
  181. package/dist/{output-KT0a3B3H.js → output-CYgfpT6o.js} +1 -1
  182. package/dist/{ownership-CeNOtQMV.js → ownership-adPAsUwY.js} +15 -13
  183. package/dist/{parse-CXTT7hBq.js → parse-CORUNcCo.js} +1 -1
  184. package/dist/{parse-local-manifest-CE4tgFsj.d.ts → parse-local-manifest-BaCqsqwC.d.ts} +1 -1
  185. package/dist/pdp/index.d.ts +3 -3
  186. package/dist/pdp/index.js +4 -3
  187. package/dist/{permdock-DbAq8_Fp.js → permdock-B5LyNVgn.js} +70 -34
  188. package/dist/{permdock-CsrvbzHk.d.ts → permdock-BaB-KQqn.d.ts} +46 -9
  189. package/dist/{permissions-Dz79qsFw.js → permissions-COpRGKt7.js} +1 -1
  190. package/dist/{permissions-Bx6UI8n1.d.ts → permissions-DriWkV7q.d.ts} +1 -2
  191. package/dist/{policy-from-catalog-BtqfxytV.js → policy-from-catalog-Cy103lsm.js} +8 -8
  192. package/dist/{policy-types-BI9C5Sp5.d.ts → policy-types-rNfz7t0M.d.ts} +9 -3
  193. package/dist/{policy-CaAME-Rh.js → policy-wGzbAPQF.js} +7 -7
  194. package/dist/{policy-Dh9WVSVz.d.ts → policy-x8RBKW8d.d.ts} +2 -2
  195. package/dist/{postgrest-CWCCbaxm.d.ts → postgrest-Cn0Res25.d.ts} +9 -21
  196. package/dist/powersync-BdoR7nwS.js +1 -0
  197. package/dist/{powersync-CWsN-QaK.js → powersync-BeI0VmEK.js} +2 -2
  198. package/dist/{powersync-DiqY3VBG.js → powersync-Dpa5AnnN.js} +11 -11
  199. package/dist/preset/index.js +1 -1
  200. package/dist/{preset-pPrVyGU5.js → preset-Bn5Z54cH.js} +5 -6
  201. package/dist/prisma/index.d.ts +2 -2
  202. package/dist/prisma/index.js +1 -1
  203. package/dist/{protected-action-CuG0xz4P.d.ts → protected-action-C4aj1KjO.d.ts} +6 -7
  204. package/dist/{protected-action-CD1HXwQK.js → protected-action-E7Sdt_Dt.js} +1 -1
  205. package/dist/{provider-ihxuJbMi.d.ts → provider-B-1DlOGM.d.ts} +1 -1
  206. package/dist/{provider-qESIf_C0.js → provider-DKO9KHua.js} +2 -2
  207. package/dist/{provider-store-BTHGJH9j.js → provider-store-D4PU1my_.js} +2 -2
  208. package/dist/{pull-B4EhSqOG.js → pull-3tkn25ll.js} +5 -5
  209. package/dist/pull-D90HqWNP.js +1 -0
  210. package/dist/{push-DYOI4bPf.js → push-dMyKdlEm.js} +6 -6
  211. package/dist/{pushed-policy-Dszouliu.js → pushed-policy-Bi5-il4C.js} +2 -2
  212. package/dist/{pushed-policy-P0hgyLBh.d.ts → pushed-policy-P55cJNx5.d.ts} +1 -1
  213. package/dist/react/index.d.ts +6 -6
  214. package/dist/react/index.js +3 -3
  215. package/dist/react/provider-client.d.ts +1 -1
  216. package/dist/react/provider-client.js +1 -1
  217. package/dist/react-native/index.d.ts +9 -9
  218. package/dist/react-native/index.js +7 -7
  219. package/dist/{relation-walk-DK_gkgL7.js → relation-walk-BDTaTKTM.js} +1 -1
  220. package/dist/{relations-BxvRvDHK.js → relations-CMsJ1ARY.js} +1 -1
  221. package/dist/{replay-DYXI4gRN.d.ts → replay-DKhFvt0L.d.ts} +1 -1
  222. package/dist/{request-context-VjeXst1z.js → request-context-5gl_oxO1.js} +2 -2
  223. package/dist/resend/index.d.ts +4 -4
  224. package/dist/resend/index.js +2 -2
  225. package/dist/{resolve-names-BIHnWL_L.js → resolve-names-BnGJU88N.js} +4 -4
  226. package/dist/{rls-C7qXye9M.js → rls-DIYSRnDZ.js} +1 -1
  227. package/dist/{rls-CMFZWosz.js → rls-qrehUPf_.js} +45 -18
  228. package/dist/{role-builder-C5AgaC1x.js → role-builder-boQiUvfo.js} +3 -3
  229. package/dist/{rpc-CYXICjM1.d.ts → rpc-BqRiVpbP.d.ts} +2 -2
  230. package/dist/{rpc-BNIQwEB6.js → rpc-Dhi55Whd.js} +2 -2
  231. package/dist/run-elFdnSZx.js +1 -0
  232. package/dist/{run-CMJX9x7b.js → run-oNqBe0gc.js} +3 -3
  233. package/dist/{run-ticket-CjvXr6wj.js → run-ticket-Ddxt9OuU.js} +2 -2
  234. package/dist/{run-ticket-BXYqQ9dy.d.ts → run-ticket-Dulj4RQk.d.ts} +2 -2
  235. package/dist/{saas-DHFfthXv.js → saas-DABv6vjy.js} +6 -5
  236. package/dist/{scan-CSOkcNdl.js → scan-BYXqcgON.js} +1 -1
  237. package/dist/{schema-7pXCaRYB.js → schema-Wf-SvlHG.js} +1 -1
  238. package/dist/scim/index.d.ts +1 -1
  239. package/dist/scim/index.js +1 -1
  240. package/dist/{scopes-BSdYaGHs.js → scopes-gdH__vDZ.js} +1 -1
  241. package/dist/server/index.d.ts +11 -10
  242. package/dist/server/index.js +7 -6
  243. package/dist/server-CKjFooaJ.js +147 -0
  244. package/dist/{server-types-Bfl-IrzZ.d.ts → server-types--_Hann81.d.ts} +9 -9
  245. package/dist/{shared-sW3VYchq.js → shared-DfaIWvIJ.js} +11 -2
  246. package/dist/{sink-RwmP7ZHs.d.ts → sink-Cs6z34AX.d.ts} +4 -4
  247. package/dist/{skills-DAjg-rgF.js → skills-417bOj4o.js} +1 -1
  248. package/dist/{skills-DrX83QBK.js → skills-B9U465B7.js} +2 -2
  249. package/dist/{snapshot-DHPih65J.js → snapshot-C2j96x97.js} +4 -4
  250. package/dist/{snapshot-cache-MPinwwgZ.d.ts → snapshot-cache-Cc7VNabe.d.ts} +1 -1
  251. package/dist/solid/index.d.ts +6 -7
  252. package/dist/solid/index.js +2 -2
  253. package/dist/solid-start/index.d.ts +6 -6
  254. package/dist/solid-start/index.js +3 -3
  255. package/dist/{sources-sgQlMfmz.d.ts → sources-BfTza0zT.d.ts} +1 -1
  256. package/dist/{src-Cop53_X1.js → src-BG9YJM3Q.js} +96 -247
  257. package/dist/ssf/index.d.ts +3 -3
  258. package/dist/ssf/index.js +3 -3
  259. package/dist/{standard-webhooks-CFZIYtBF.d.ts → standard-webhooks-CJBgfl7y.d.ts} +2 -2
  260. package/dist/{store-CSOsXd5s.js → store-BpKH-pLm.js} +2 -2
  261. package/dist/{store-CRQ5VrWR.d.ts → store-DSyjHD5-.d.ts} +5 -5
  262. package/dist/{store-options-CDvoX52-.js → store-options-CXv6BHH6.js} +5 -6
  263. package/dist/{stores-PpYVQ5yF.js → stores-BuqAHjp_.js} +1 -1
  264. package/dist/{stores-pEBMy94l.d.ts → stores-C6-7TPTV.d.ts} +6 -7
  265. package/dist/{postgrest-BrjrckDG.js → subject-BqFwS6l3.js} +214 -319
  266. package/dist/subject-cache-BT1fGuea.js +193 -0
  267. package/dist/subject-cache-d_Z4KAnm.d.ts +144 -0
  268. package/dist/supabase/index.d.ts +6 -5
  269. package/dist/supabase/index.js +3 -2
  270. package/dist/supabase/middleware.d.ts +6 -6
  271. package/dist/supabase/middleware.js +6 -6
  272. package/dist/{supabase-Cbl2orB2.js → supabase-D0J99yqL.js} +2 -2
  273. package/dist/{supabase-CVZuytCC.js → supabase-DnazO6W4.js} +3 -3
  274. package/dist/{supabase-hook-BUcu3vPM.js → supabase-hook-Bh5syR9N.js} +174 -62
  275. package/dist/supabase-hook-CVAenq-w.js +1 -0
  276. package/dist/{supautils-a_253u1X.js → supautils-ChXR-4Or.js} +302 -43
  277. package/dist/{support-session-BsmPCbz8.js → support-session-BGeEYDSq.js} +2 -2
  278. package/dist/svelte/index.d.ts +5 -5
  279. package/dist/svelte/index.js +3 -3
  280. package/dist/svelte/runtime.d.ts +3 -3
  281. package/dist/svelte/runtime.js +1 -1
  282. package/dist/svelte/source.d.ts +5 -5
  283. package/dist/svelte/source.js +2 -2
  284. package/dist/sveltekit/index.d.ts +6 -6
  285. package/dist/sveltekit/index.js +2 -2
  286. package/dist/{tables-XrvffTMj.js → tables-CbEOy2Ma.js} +137 -55
  287. package/dist/tanstack-start/index.d.ts +6 -6
  288. package/dist/tanstack-start/index.js +2 -2
  289. package/dist/{tenancy-DvOHHk3-.js → tenancy-BlxY5T0q.js} +2 -2
  290. package/dist/terminal/index.d.ts +6 -6
  291. package/dist/terminal/index.js +6 -6
  292. package/dist/testing/core.d.ts +1 -1
  293. package/dist/testing/core.js +1 -1
  294. package/dist/testing/fixtures/index.d.ts +35 -2
  295. package/dist/testing/fixtures/index.js +39 -2
  296. package/dist/testing/index.d.ts +41 -25
  297. package/dist/testing/index.js +114 -26
  298. package/dist/testing/saas/index.d.ts +5 -5
  299. package/dist/testing/saas/index.js +2 -2
  300. package/dist/testing/saas/permissions.d.ts +1 -1
  301. package/dist/testing/saas/permissions.js +1 -1
  302. package/dist/trpc/index.d.ts +6 -6
  303. package/dist/trpc/index.js +4 -4
  304. package/dist/{type-helpers-BjOLGVy1.d.ts → type-helpers-iXJEIDe7.d.ts} +3 -4
  305. package/dist/{types-p8mhWTcR.d.ts → types-B9F0EZAF.d.ts} +3 -3
  306. package/dist/{types-DZwEOsK1.d.ts → types-BSNZMp5b.d.ts} +1 -1
  307. package/dist/{types-MixnvXQ5.d.ts → types-BpxdxaRD.d.ts} +5 -5
  308. package/dist/{types-C3C9ien9.d.ts → types-CD1qmxdx.d.ts} +4 -4
  309. package/dist/{types-D1NjjwI4.d.ts → types-CS1DI_Ke.d.ts} +40 -9
  310. package/dist/{types-zh4WGQcP.d.ts → types-C_a44wSr.d.ts} +3 -3
  311. package/dist/{types-DBVSljAx.d.ts → types-Cq2rvv-C.d.ts} +3 -3
  312. package/dist/{types--_lpWUGV.d.ts → types-CuDXvyIT.d.ts} +5 -5
  313. package/dist/{types-7Vlz1Wi2.d.ts → types-DAyp592k.d.ts} +2 -2
  314. package/dist/{types-DjGZAU64.d.ts → types-NikV1pND.d.ts} +4 -4
  315. package/dist/{types-BzxA2OAD.d.ts → types-ZfjQB0KC.d.ts} +2 -2
  316. package/dist/{types-DotXrris.d.ts → types-_pi9kxS2.d.ts} +2 -2
  317. package/dist/unplugin/index.d.ts +1 -1
  318. package/dist/unplugin/index.js +1 -1
  319. package/dist/{usage-DPbdI3Vi.js → usage-0wsl83uw.js} +10 -10
  320. package/dist/{usage-DHsqp4lN.js → usage-Bl-BkXEq.js} +1 -1
  321. package/dist/usage-CmyGbo4e.js +1 -0
  322. package/dist/{validation-error-DkOK9zUE.d.ts → validation-error-DLAYFlkr.d.ts} +1 -1
  323. package/dist/{verify-C0jGJrmb.js → verify-BSLotSa0.js} +41 -24
  324. package/dist/version-sources-BC3hf2ME.js +34 -0
  325. package/dist/{permission-types-CAY-GU7e.d.ts → vocabulary-DeZvUaTw.d.ts} +69 -1
  326. package/dist/vue/index.d.ts +6 -7
  327. package/dist/vue/index.js +2 -2
  328. package/dist/{waiter-BjVI_Byg.d.ts → waiter-cbK1CBhT.d.ts} +2 -2
  329. package/dist/{watch-Dz2LNM1R.js → watch-BigZ260i.js} +2 -2
  330. package/dist/watch-CHURMgrv.js +1 -0
  331. package/dist/webmcp/index.d.ts +2 -2
  332. package/dist/{who-can-CZeAwQZD.js → who-can-CjfMP9a4.js} +8 -8
  333. package/dist/workflow/index.d.ts +3 -3
  334. package/dist/workflow/index.js +6 -5
  335. package/dist/workflow-sdk/index.d.ts +5 -5
  336. package/dist/{wrap-EQ6Or2Hi.d.ts → wrap-B-k2qHJx.d.ts} +2 -2
  337. package/package.json +16 -4
  338. package/skills/permdock-wire/references/presets-and-recipes.md +2 -2
  339. package/dist/better-supabase-ayun1IKE.js +0 -122
  340. package/dist/catalog-BTPySmbp.js +0 -1
  341. package/dist/collect-eSTXOZDC.js +0 -1
  342. package/dist/index-DuOF7OqS.d.ts +0 -222
  343. package/dist/load-CjnlPxpL.js +0 -1
  344. package/dist/powersync-CWCirKAJ.js +0 -1
  345. package/dist/pull-VzcECZ-R.js +0 -1
  346. package/dist/run-D2e1tybu.js +0 -1
  347. package/dist/supabase-hook-QWphWBnG.js +0 -1
  348. package/dist/usage-dmSjKx-Z.js +0 -1
  349. package/dist/version-cache-q5cpaDSt.d.ts +0 -57
  350. package/dist/vocabulary-DEJ5j4mR.d.ts +0 -70
  351. package/dist/watch-CS69ftMP.js +0 -1
  352. package/dist/where-scope-BAyOsPQW.js +0 -332
  353. package/dist/{approval-normalize-hlfO9BJv.js → approval-normalize-DNLW0zOM.js} +1 -1
  354. package/dist/{body-C9JbIoqb.js → body-B3ylkmmE.js} +1 -1
  355. package/dist/{catalog-doc-nrgfbh8I.js → catalog-doc-Zi0jRpyH.js} +2 -2
  356. package/dist/{device-BwbJNmb2.js → device-BkSynWdg.js} +1 -1
  357. package/dist/{prompt-BYc6drYW.js → prompt-D1Gj1W4Y.js} +1 -1
  358. package/dist/{scim-C30QBBoF.js → scim-BG6uPUeW.js} +1 -1
  359. package/dist/{wrap-C5PWzgkq.js → wrap-BKU5Arsu.js} +1 -1
@@ -1,24 +1,24 @@
1
- import { $n as DeniedDecision, D as Policy, Dn as ApproverInput, G as CredentialVerifier, N as PolicyVocabulary, Q as Intent, Tt as SupportSession, it as MembershipSource, jt as ApiKeyPrincipal, qt as Instant, sn as AuthEvent, xr as Subject, yr as Principal } from "../policy-types-BI9C5Sp5.js";
2
- import { f as PermissionTree, u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { i as OperationEffect } from "../operations-Ci_rT6Uo.js";
4
- import { i as ApprovalPolicySource } from "../approval-policies-CKlByf5o.js";
5
- import { A as PermissionState, _ as PrincipalSource, a as PermDock, h as PrincipalIdentity, k as PermissionCheck, o as PermDockOptions, w as InstanceCache } from "../permdock-CsrvbzHk.js";
6
- import { m as ApprovalStore } from "../types-BzxA2OAD.js";
7
- import { t as InstanceOptions } from "../instance-options-Cq66kEeR.js";
8
- import { c as AccessReviewStore } from "../types-DZwEOsK1.js";
9
- import { i as SupabaseRpcCaller } from "../postgrest-CWCCbaxm.js";
10
- import { a as CatalogDocument } from "../types-7Vlz1Wi2.js";
11
- import { n as VersionCache } from "../version-cache-q5cpaDSt.js";
12
- import { A as SupabaseSubjectOptions, C as SupabasePrincipal, N as SupabaseSuspension, O as SupabaseSessionLike, s as SqlMembershipSource } from "../sources-sgQlMfmz.js";
1
+ import { $n as DeniedDecision, D as Policy, Dn as ApproverInput, G as CredentialVerifier, N as PolicyVocabulary, Q as Intent, Tt as SupportSession, it as MembershipSource, jt as ApiKeyPrincipal, qt as Instant, sn as AuthEvent, xr as Subject, yr as Principal } from "../policy-types-rNfz7t0M.js";
2
+ import { E as PermissionTree, w as Permission } from "../vocabulary-DeZvUaTw.js";
3
+ import { i as OperationEffect } from "../operations-BMPx7HyO.js";
4
+ import { i as ApprovalPolicySource } from "../approval-policies-UnDSxT__.js";
5
+ import { M as PermissionCheck, N as PermissionState, T as InstanceCache, _ as PrincipalSource, a as PermDock, h as PrincipalIdentity, o as PermDockOptions } from "../permdock-BaB-KQqn.js";
6
+ import { m as ApprovalStore } from "../types-ZfjQB0KC.js";
7
+ import { t as InstanceOptions } from "../instance-options-C6gEDOts.js";
8
+ import { n as SubjectCache, s as VersionCache } from "../subject-cache-d_Z4KAnm.js";
9
+ import { c as AccessReviewStore } from "../types-BSNZMp5b.js";
10
+ import { r as SupabaseRpcCaller } from "../postgrest-Cn0Res25.js";
11
+ import { a as CatalogDocument } from "../types-DAyp592k.js";
12
+ import { A as SupabaseSubjectOptions, C as SupabasePrincipal, N as SupabaseSuspension, O as SupabaseSessionLike, s as SqlMembershipSource } from "../sources-BfTza0zT.js";
13
13
  import { t as SqlQuery } from "../sql-B80DFdpG.js";
14
- import { c as LinkPolicy, o as CapabilityPrincipal, t as Capability } from "../capability-v2xZB7us.js";
14
+ import { c as LinkPolicy, o as CapabilityPrincipal, t as Capability } from "../capability-YkRMUAsF.js";
15
15
  import { AccessBucketPolicy, AccessTopicPolicy, AuthorizationHooks, AuthorizationProvider, AuthorizationRequest, Authorizer, BlockTables, CredentialProvider, SupportAuthorize, SupportAuthorizeInput, ToolDecision, ToolRef } from "better-supabase/contract";
16
16
  import { EntitlementClaimOptions } from "better-supabase/blocks/entitlements";
17
17
  import { AuthSession } from "better-supabase/server";
18
18
  import { ApiKey, ApiKeyClaimsOptions, ApiKeys } from "better-supabase/blocks/api-keys";
19
19
  import { AuthorizeHookOptions, ProtectWebHandlerOptions } from "better-supabase/workflow-sdk";
20
20
  //#region src/better-supabase/access-reviews.d.ts
21
- type AccessReviewApplierOptions = {
21
+ type AccessReviewApplierOptions<V extends PolicyVocabulary = PolicyVocabulary> = {
22
22
  /**
23
23
  * A supabase-js client that may call the organizations and invitations block
24
24
  * functions. Pass the reviewer's client so the block's own permission and
@@ -30,7 +30,7 @@ type AccessReviewApplierOptions = {
30
30
  * Decides whether a fallback role or an invitation's role grants the reviewed
31
31
  * permission.
32
32
  */
33
- readonly policy: Policy;
33
+ readonly policy: Policy<unknown, Principal, V>;
34
34
  /**
35
35
  * The role a revoked member moves to with `update_member_role`: one role, or
36
36
  * a map from the roles in the item's `via` to their fallback. A fallback that
@@ -47,7 +47,7 @@ type AccessReviewApplierOptions = {
47
47
  * An instance for the member in the review's tenant, read after the change.
48
48
  * An item it still grants is not marked applied.
49
49
  */
50
- readonly permdockFor?: (principalId: string, tenant: string) => PermDock | Promise<PermDock>;
50
+ readonly permdockFor?: (principalId: string, tenant: string) => PermDock<V> | Promise<PermDock<V>>;
51
51
  /**
52
52
  * The schema of the block functions; better-supabase's default is
53
53
  * `better_supabase`.
@@ -80,7 +80,7 @@ type AccessReviewApplyResult = {
80
80
  * error leaves the item unapplied in `failed`, and one item's failure never
81
81
  * stops the others. Throws `review-not-found` for an unknown review.
82
82
  */
83
- export declare function accessReviewApplier(options: AccessReviewApplierOptions): (reviewId: string) => Promise<AccessReviewApplyResult>;
83
+ export declare function accessReviewApplier<V extends PolicyVocabulary = PolicyVocabulary>(options: AccessReviewApplierOptions<V>): (reviewId: string) => Promise<AccessReviewApplyResult>;
84
84
  //#endregion
85
85
  //#region src/better-supabase/approvals-block.d.ts
86
86
  /** better-supabase's `AsyncResult`: awaiting it gives `{ ok, data, error }`. */
@@ -338,6 +338,36 @@ type BetterSupabaseSubjectOptions = Omit<SupabaseSubjectOptions, "claims"> & {
338
338
  */
339
339
  export declare function subjectFromBetterSupabase(session: SupabaseSessionLike | ApiKeySession | SessionSnapshotLike | null | undefined, options?: BetterSupabaseSubjectOptions): Subject<SupabasePrincipal> | Subject<ApiKeyPrincipal> | Subject;
340
340
  //#endregion
341
+ //#region src/better-supabase/version-cache.d.ts
342
+ /**
343
+ * better-supabase's module-scope version cache (`createVersionCache`): `get`
344
+ * answers the cached version, `seed` keeps the higher one and `evict` forgets a
345
+ * user.
346
+ */
347
+ type BetterSupabaseVersionCache = {
348
+ get: (userId: string) => number | undefined | PromiseLike<number | undefined>;
349
+ seed?: (userId: string, version: number) => void | PromiseLike<void>;
350
+ evict: (userId: string) => void | PromiseLike<void>;
351
+ };
352
+ /** Either cache shape a PermDock option or better-supabase's runtime may hold. */
353
+ type AnyVersionCache = VersionCache | BetterSupabaseVersionCache;
354
+ type BetterSupabaseVersionCacheOptions = {
355
+ /**
356
+ * Reported as `maxStaleMs`; the cache itself bounds staleness. Default
357
+ * 30,000.
358
+ */
359
+ readonly maxStaleMs?: number;
360
+ };
361
+ /** better-supabase's cache is the one shape with `get` and no `current`. */
362
+ export declare function isBetterSupabaseVersionCache(value: unknown): value is BetterSupabaseVersionCache;
363
+ /**
364
+ * A PermDock `VersionCache` over better-supabase's `createVersionCache`, so
365
+ * `claimsFirst(source, { versions })` and the cache `createNext({ versions })`
366
+ * evicts are one store. A read answers from `get`; a version PermDock reads is
367
+ * seeded back, and a failing cache reads the version itself.
368
+ */
369
+ export declare function betterSupabaseVersionCache(cache: BetterSupabaseVersionCache, options?: BetterSupabaseVersionCacheOptions): VersionCache;
370
+ //#endregion
341
371
  //#region src/better-supabase/permdock-for.d.ts
342
372
  /**
343
373
  * What `bsb.bootstrap()` and `bsb.getAccess()` return: a session with the
@@ -349,6 +379,12 @@ type PermDockForResult = {
349
379
  readonly authzVersion: number | null;
350
380
  /** `bsb.bootstrap()`'s `session_active()`; `false` is signed out. */
351
381
  readonly sessionActive?: boolean;
382
+ /**
383
+ * The `permdock_subject()` record the bootstrap read in the same round trip.
384
+ * It seeds `subjects` when its user is the session's and its `authzVersion`
385
+ * is `authzVersion`, so the instance reads no `subject_for`.
386
+ */
387
+ readonly subject?: unknown;
352
388
  };
353
389
  /** Who an instance is for. */
354
390
  type PermDockForInput = SupabaseSessionLike | ApiKeySession | SessionSnapshotLike | PermDockForResult | Subject | null | undefined;
@@ -366,14 +402,14 @@ type PermDockForQuery = {
366
402
  * replaces the `versions` option.
367
403
  */
368
404
  type PermDockFor<V extends PolicyVocabulary = PolicyVocabulary> = {
369
- (source: PermDockForInput, query?: PermDockForQuery | string | null, versions?: VersionCache): Promise<PermDock<V>>;
405
+ (source: PermDockForInput, query?: PermDockForQuery | string | null, versions?: AnyVersionCache): Promise<PermDock<V>>;
370
406
  /**
371
407
  * The instance options every instance of `versions` (default the `versions`
372
408
  * option) is built with: the same object on every call, so an adapter that
373
409
  * spreads it into its own options, such as oRPC's or MCP's `createPermDock`,
374
410
  * shares the `claimsFirst` memberships and the `instances` entries.
375
411
  */
376
- readonly sources: (versions?: VersionCache) => InstanceOptions;
412
+ readonly sources: (versions?: AnyVersionCache) => InstanceOptions;
377
413
  };
378
414
  type PermDockForOptions<V extends PolicyVocabulary = PolicyVocabulary> = {
379
415
  readonly policy: Policy<unknown, Principal, V>;
@@ -390,9 +426,15 @@ type PermDockForOptions<V extends PolicyVocabulary = PolicyVocabulary> = {
390
426
  */
391
427
  readonly version?: MembershipSource["version"];
392
428
  /** The process-wide version cache (`createNext({ versions })`). */
393
- readonly versions?: VersionCache;
429
+ readonly versions?: AnyVersionCache;
394
430
  /** The process-wide instance cache, shared with the app's other adapters. */
395
431
  readonly instances?: InstanceCache;
432
+ /**
433
+ * The `subjects` cache of the app's `postgrestSources`. A call that knows
434
+ * the user's authorization version (a `bootstrap` or `getAccess` result)
435
+ * tells it that version, which drops a record older than it.
436
+ */
437
+ readonly subjects?: SubjectCache;
396
438
  /** Sources and sinks for each instance. */
397
439
  readonly options?: Omit<PermDockOptions, "tenant" | "intent" | "version">;
398
440
  };
@@ -424,8 +466,8 @@ type SubscriberPolicyEvent = {
424
466
  readonly actorId: string | null;
425
467
  readonly payload: unknown;
426
468
  };
427
- type SubscriberPolicyOptions<E extends SubscriberPolicyEvent = SubscriberPolicyEvent> = {
428
- readonly policy: Policy;
469
+ type SubscriberPolicyOptions<E extends SubscriberPolicyEvent = SubscriberPolicyEvent, V extends PolicyVocabulary = PolicyVocabulary> = {
470
+ readonly policy: Policy<unknown, Principal, V>;
429
471
  /** Loads the sender and every subscriber's principal. */
430
472
  readonly principals: PrincipalSource;
431
473
  /**
@@ -459,7 +501,7 @@ type SubscriberPolicyOptions<E extends SubscriberPolicyEvent = SubscriberPolicyE
459
501
  * unmapped type, an event without a tenant or sender, a sender outside the
460
502
  * tenant and a throw reach no one.
461
503
  */
462
- export declare function subscriberPolicy<E extends SubscriberPolicyEvent = SubscriberPolicyEvent>(options: SubscriberPolicyOptions<E>): <S extends {
504
+ export declare function subscriberPolicy<E extends SubscriberPolicyEvent = SubscriberPolicyEvent, V extends PolicyVocabulary = PolicyVocabulary>(options: SubscriberPolicyOptions<E, V>): <S extends {
463
505
  readonly principal: string;
464
506
  }>(event: E, subscribers: readonly S[]) => Promise<S[]>;
465
507
  //#endregion
@@ -472,8 +514,8 @@ type PendingSupportSession = {
472
514
  readonly token: string;
473
515
  readonly session: SupportSession;
474
516
  };
475
- type SupportPolicyOptions = {
476
- readonly policy: Policy;
517
+ type SupportPolicyOptions<V extends PolicyVocabulary = PolicyVocabulary> = {
518
+ readonly policy: Policy<unknown, Principal, V>;
477
519
  /**
478
520
  * How the admin's verified claims map to a subject; the defaults of
479
521
  * `subjectFromBetterSupabase`.
@@ -519,27 +561,20 @@ type SupportPolicyOptions = {
519
561
  * distinct approver for its token. `readOnly: false` needs `writable`. A throw
520
562
  * is `false`.
521
563
  */
522
- export declare function supportPolicy(options: SupportPolicyOptions): SupportAuthorize;
564
+ export declare function supportPolicy<V extends PolicyVocabulary = PolicyVocabulary>(options: SupportPolicyOptions<V>): SupportAuthorize;
523
565
  //#endregion
524
566
  //#region src/better-supabase/hooks.d.ts
525
567
  type Maybe$1<T> = T | null | undefined | Promise<T | null | undefined>;
526
568
  type Claims = Readonly<Record<string, unknown>>;
527
- type AuthorizationHooksOptions = {
528
- readonly policy: Policy;
569
+ type AuthorizationHooksBase<V extends PolicyVocabulary> = {
570
+ readonly policy: Policy<unknown, Principal, V>;
529
571
  /**
530
572
  * The app's `permdockFor` resolver, shared with `authorizer({ permdockFor })`
531
573
  * so a hook reuses the instances the checks built. It holds `subject`,
532
574
  * `memberships`, `version`, `versions`, `instances` and `options`; passing
533
575
  * one of those as well throws a `TypeError`.
534
576
  */
535
- readonly permdockFor?: PermDockFor;
536
- /**
537
- * The claims better-supabase mints for `userId` now, or `null` for a user
538
- * deleted, suspended or unknown: the same loader `principalSource` takes.
539
- */
540
- readonly claims: (userId: string, options: {
541
- readonly tenant?: string;
542
- }) => Maybe$1<Claims>;
577
+ readonly permdockFor?: PermDockFor<V>;
543
578
  /**
544
579
  * How the claims map to a subject; the defaults of
545
580
  * `subjectFromBetterSupabase`.
@@ -552,12 +587,6 @@ type AuthorizationHooksOptions = {
552
587
  readonly instances?: InstanceCache;
553
588
  /** Sources for every instance the hooks build. */
554
589
  readonly options?: Omit<PermDockOptions, "tenant" | "actor" | "delegation" | "session" | "expiresAt">;
555
- /**
556
- * The claims an organization-owned automation runs as in `tenant`, such as
557
- * its default service principal's. Without it such an automation runs as no
558
- * one.
559
- */
560
- readonly service?: (tenant: string | null) => Maybe$1<Claims>;
561
590
  /**
562
591
  * The `principalSource` for `identities` and `delivery`; without it neither
563
592
  * hook is set.
@@ -575,8 +604,25 @@ type AuthorizationHooksOptions = {
575
604
  * `approverOf`.
576
605
  */
577
606
  readonly approvers?: ProviderApprovers;
607
+ };
608
+ /** The options that read claims; each needs `claims`. */
609
+ type ClaimsHooks<V extends PolicyVocabulary> = {
610
+ /**
611
+ * The claims better-supabase mints for `userId` now, or `null` for a user
612
+ * deleted, suspended or unknown: the same loader `principalSource` takes.
613
+ * Without it the hooks have no `automation`.
614
+ */
615
+ readonly claims: (userId: string, options: {
616
+ readonly tenant?: string;
617
+ }) => Maybe$1<Claims>;
618
+ /**
619
+ * The claims an organization-owned automation runs as in `tenant`, such as
620
+ * its default service principal's. Without it such an automation runs as no
621
+ * one.
622
+ */
623
+ readonly service?: (tenant: string | null) => Maybe$1<Claims>;
578
624
  /** `supportPolicy`'s options without `policy`; sets `support.authorize`. */
579
- readonly support?: Omit<SupportPolicyOptions, "policy">;
625
+ readonly support?: Omit<SupportPolicyOptions<V>, "policy">;
580
626
  /**
581
627
  * The user and tenant a run ticket stands for, looked up in the app's store;
582
628
  * `null` refuses the ticket. Sets `tickets.subject`, which loads the user's
@@ -587,19 +633,30 @@ type AuthorizationHooksOptions = {
587
633
  readonly tenant?: string;
588
634
  }>;
589
635
  };
636
+ /**
637
+ * With `claims` the hooks set `automation`, `support` and `tickets`; without it
638
+ * only `sessionTags`, `delegation`, `approverOf`, `identities` and `delivery`,
639
+ * and passing `service`, `support` or `tickets` is a type error.
640
+ */
641
+ type AuthorizationHooksOptions<V extends PolicyVocabulary = PolicyVocabulary> = (AuthorizationHooksBase<V> & ClaimsHooks<V>) | (AuthorizationHooksBase<V> & {
642
+ readonly claims?: undefined;
643
+ readonly service?: undefined;
644
+ readonly support?: undefined;
645
+ readonly tickets?: undefined;
646
+ });
590
647
  /**
591
648
  * better-supabase's `AuthorizationHooks` (`createServer(betterSupabase, {
592
649
  * authorization })`), decided by `policy`. Every hook builds the principal's
593
650
  * instance from the claims `claims` loads now, never from the request, and
594
651
  * fails closed: a throw, an unknown key and `approval-required` refuse.
595
- * `automation`, `delegation` and `sessionTags` (`snapshotTag(userId)`, so
596
- * `evictSession` and sign-out clear PermDock snapshots) are always set;
597
- * `identities`, `delivery`, `approverOf`, `support` and `tickets` only with the
598
- * options they read. `delegation.permissions` maps each scope to the keys whose
599
- * `.scope` it is, was renamed from, or that a policy `oauthScopes` entry
600
- * covers, and reads no `authorization_details`.
652
+ * `delegation` and `sessionTags` (`snapshotTag(userId)`, so `evictSession` and
653
+ * sign-out clear PermDock snapshots) are always set; `automation`, `support`
654
+ * and `tickets` only with `claims`; `identities`, `delivery` and `approverOf`
655
+ * only with the options they read. `delegation.permissions` maps each scope to
656
+ * the keys whose `.scope` it is, was renamed from, or that a policy
657
+ * `oauthScopes` entry covers, and reads no `authorization_details`.
601
658
  */
602
- export declare function authorizationHooks(options: AuthorizationHooksOptions): AuthorizationHooks;
659
+ export declare function authorizationHooks<V extends PolicyVocabulary = PolicyVocabulary>(options: AuthorizationHooksOptions<V>): AuthorizationHooks;
603
660
  //#endregion
604
661
  //#region src/better-supabase/active-tenant.d.ts
605
662
  /**
@@ -696,8 +753,8 @@ type BetterSupabaseOnError = (error: unknown, context: BetterSupabaseErrorContex
696
753
  * `forOperation`.
697
754
  */
698
755
  type AuthorizerOperation = "list" | "get" | "create" | "update" | "delete";
699
- type AuthorizerOptions = {
700
- readonly policy: Policy;
756
+ type AuthorizerOptions<V extends PolicyVocabulary = PolicyVocabulary> = {
757
+ readonly policy: Policy<unknown, Principal, V>;
701
758
  /**
702
759
  * The app's `permdockFor` resolver: `bsb.action`, `protectAction` and every
703
760
  * adapter that spreads `permdockFor.sources()` then share one instance per
@@ -706,7 +763,7 @@ type AuthorizerOptions = {
706
763
  * `instances` and `options`; passing one of those as well throws a
707
764
  * `TypeError`.
708
765
  */
709
- readonly permdockFor?: PermDockFor;
766
+ readonly permdockFor?: PermDockFor<V>;
710
767
  /**
711
768
  * How the verified claims map to a subject; the defaults of
712
769
  * `subjectFromBetterSupabase`.
@@ -737,7 +794,7 @@ type AuthorizerOptions = {
737
794
  * The version cache for `memberships` when better-supabase passes none (a
738
795
  * server created without `versions`).
739
796
  */
740
- readonly versions?: VersionCache;
797
+ readonly versions?: AnyVersionCache;
741
798
  /**
742
799
  * The intent of one check. By default better-supabase's `context.intent`;
743
800
  * without it a batch (`evaluations`, list and row filtering) and an action
@@ -775,7 +832,7 @@ type AuthorizerOptions = {
775
832
  * throw denies. With better-supabase's runtime `memo`, the checks of one
776
833
  * request scope share an instance per claims, tenant and intent.
777
834
  */
778
- export declare function authorizer(options: AuthorizerOptions): Authorizer<Permission, VersionCache>;
835
+ export declare function authorizer<V extends PolicyVocabulary = PolicyVocabulary>(options: AuthorizerOptions<V>): Authorizer<Permission, AnyVersionCache>;
779
836
  //#endregion
780
837
  //#region src/better-supabase/block-memberships.d.ts
781
838
  /**
@@ -1215,4 +1272,4 @@ type WorkflowResourceResult = {
1215
1272
  */
1216
1273
  export declare function workflowResource(subject: unknown, types: WorkflowSubjectTypes): WorkflowResourceResult;
1217
1274
  //#endregion
1218
- export type { AccessPolicyOptions, AccessReviewApplierOptions, AccessReviewApplyFailure, AccessReviewApplyResult, ApiKeySession, ApiKeySessionOptions, ApiKeyVerifierOptions, AuthorizationHooksOptions, AuthorizationProviderOptions, AuthorizerOperation, AuthorizerOptions, BetterSupabaseActiveTenant, BetterSupabaseErrorContext, BetterSupabaseIdentityLink, BetterSupabaseMembershipRow, BetterSupabaseOnError, BetterSupabaseSubjectOptions, BlockApprovalApprovers, BlockApprovalPoliciesClient, BlockApprovalPolicySourceOptions, BlockApprovalRecord, BlockApprovalStoreOptions, BlockApprovalTenantPolicy, BlockApprovalsClient, BlockDecide, BlockInstant, BlockMembershipSourceOptions, BlockRoleJunction, BlockRoleThrough, BucketAccess, CredentialGuardOptions, HandlerCanOptions, HandlerPermDockSource, HookCanOptions, McpToolDecision, McpToolRef, PendingSupportSession, PermDockFor, PermDockForInput, PermDockForOptions, PermDockForQuery, PermDockForResult, PrincipalFromMembershipsOptions, PrincipalSourceOptions, ProviderApprovers, RoleOrderOptions, ServiceRoles, SessionSnapshotLike, ShareLinkResolver, ShareLinkRow, ShareLinkSubjectOptions, ShareLinkTarget, SubscriberPolicyEvent, SubscriberPolicyOptions, SupabasePrincipal, SupportPolicyOptions, ToolPolicy, ToolPolicyOptions, TopicAccess, WorkflowRecordRef, WorkflowResourceResult, WorkflowSubjectTypes };
1275
+ export type { AccessPolicyOptions, AccessReviewApplierOptions, AccessReviewApplyFailure, AccessReviewApplyResult, AnyVersionCache, ApiKeySession, ApiKeySessionOptions, ApiKeyVerifierOptions, AuthorizationHooksOptions, AuthorizationProviderOptions, AuthorizerOperation, AuthorizerOptions, BetterSupabaseActiveTenant, BetterSupabaseErrorContext, BetterSupabaseIdentityLink, BetterSupabaseMembershipRow, BetterSupabaseOnError, BetterSupabaseSubjectOptions, BetterSupabaseVersionCache, BetterSupabaseVersionCacheOptions, BlockApprovalApprovers, BlockApprovalPoliciesClient, BlockApprovalPolicySourceOptions, BlockApprovalRecord, BlockApprovalStoreOptions, BlockApprovalTenantPolicy, BlockApprovalsClient, BlockDecide, BlockInstant, BlockMembershipSourceOptions, BlockRoleJunction, BlockRoleThrough, BucketAccess, CredentialGuardOptions, HandlerCanOptions, HandlerPermDockSource, HookCanOptions, McpToolDecision, McpToolRef, PendingSupportSession, PermDockFor, PermDockForInput, PermDockForOptions, PermDockForQuery, PermDockForResult, PrincipalFromMembershipsOptions, PrincipalSourceOptions, ProviderApprovers, RoleOrderOptions, ServiceRoles, SessionSnapshotLike, ShareLinkResolver, ShareLinkRow, ShareLinkSubjectOptions, ShareLinkTarget, SubscriberPolicyEvent, SubscriberPolicyOptions, SupabasePrincipal, SupportPolicyOptions, ToolPolicy, ToolPolicyOptions, TopicAccess, WorkflowRecordRef, WorkflowResourceResult, WorkflowSubjectTypes };