permdock 0.32.0 → 0.34.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 (378) hide show
  1. package/dist/a2a/index.d.ts +4 -4
  2. package/dist/a2a/index.js +2 -2
  3. package/dist/{adoption-scan-BJMEEu7V.js → adoption-scan-BPW1eWy5.js} +1 -1
  4. package/dist/agent/index.d.ts +2 -2
  5. package/dist/agent/index.js +1 -1
  6. package/dist/ai-sdk/index.d.ts +3 -3
  7. package/dist/ai-sdk/index.js +3 -3
  8. package/dist/app/index.d.ts +1 -1
  9. package/dist/app/index.js +1 -1
  10. package/dist/{approval-chain-D97rgMoA.js → approval-chain-BEeExHpb.js} +15 -10
  11. package/dist/{approval-prompt-yNyhQqn8.d.ts → approval-prompt-CJvYBdja.d.ts} +1 -1
  12. package/dist/approvals/index.d.ts +3 -3
  13. package/dist/{arazzo-C_xK2Kaa.js → arazzo-BUXKjylF.js} +1 -1
  14. package/dist/{arazzo-BAgh0PT6.js → arazzo-DqzmZG-x.js} +2 -2
  15. package/dist/astro/index.d.ts +4 -4
  16. package/dist/astro/index.js +1 -1
  17. package/dist/{audience-CARf-b-R.js → audience-B6DQ5wQu.js} +1 -1
  18. package/dist/authzen/index.d.ts +6 -6
  19. package/dist/authzen/index.js +1 -1
  20. package/dist/{automation-0VF1xe4o.d.ts → automation-BqUmdFfe.d.ts} +1 -1
  21. package/dist/better-auth/index.d.ts +1 -1
  22. package/dist/better-supabase/index.d.ts +34 -13
  23. package/dist/better-supabase/index.js +21 -21
  24. package/dist/{bind-zQacwAOg.d.ts → bind-Bwk9tt1z.d.ts} +7 -7
  25. package/dist/{bind-BYeoLJgN.js → bind-DPptdk31.js} +2 -2
  26. package/dist/{bsb-access-tags-CjeR7v7-.js → bsb-access-tags-Nv4nDQ2U.js} +11 -2
  27. package/dist/{budgets-Dpumu_Dt.js → budgets-hi-ecgEd.js} +3 -3
  28. package/dist/{build-instance-CFiegi_w.js → build-instance-DZEWYO-A.js} +1 -1
  29. package/dist/bundle-size-BRFeBvuv.js +1 -0
  30. package/dist/{bundle-size-Ddhv_H_v.js → bundle-size-DbXV65Ix.js} +2 -2
  31. package/dist/{capability-BPzseilU.d.ts → capability-qoD_jlcI.d.ts} +1 -1
  32. package/dist/{casbin-EwdKipQs.js → casbin-CM9mWO1V.js} +1 -1
  33. package/dist/{casbin-BErdqy1J.js → casbin-qEW6RfXA.js} +1 -1
  34. package/dist/catalog/index.d.ts +4 -4
  35. package/dist/catalog/index.js +4 -4
  36. package/dist/{challenge-CRB1X3Ry.js → challenge-E9sicsCA.js} +1 -1
  37. package/dist/chat/index.d.ts +1 -1
  38. package/dist/chat/index.js +1 -1
  39. package/dist/chat-sdk/index.d.ts +3 -3
  40. package/dist/{claims-size-BsSDVD5u.js → claims-size-BUhCWS88.js} +18 -3
  41. package/dist/claims-size-C6oKGuOM.js +1 -0
  42. package/dist/claude-agent/index.d.ts +3 -3
  43. package/dist/claude-agent/index.js +2 -2
  44. package/dist/clerk/index.d.ts +2 -2
  45. package/dist/cli/bin.js +1 -1
  46. package/dist/cli/generate/watch-worker.js +1 -1
  47. package/dist/cli/index.d.ts +6 -6
  48. package/dist/cli/index.js +2 -2
  49. package/dist/cli/plugins/app.d.ts +1 -1
  50. package/dist/cli/plugins/app.js +1 -1
  51. package/dist/cli/plugins/better-supabase.d.ts +1 -1
  52. package/dist/cli/plugins/openapi.d.ts +1 -1
  53. package/dist/cli/plugins/openapi.js +1 -1
  54. package/dist/cli/plugins/powersync.d.ts +1 -1
  55. package/dist/cli/plugins/powersync.js +1 -1
  56. package/dist/cli/plugins/rls.d.ts +2 -2
  57. package/dist/cli/plugins/rls.js +1 -1
  58. package/dist/cli/plugins/schemas.d.ts +1 -1
  59. package/dist/cli/plugins/schemas.js +1 -1
  60. package/dist/cli/plugins/scim.d.ts +2 -2
  61. package/dist/cli/plugins/supabase-hook.d.ts +2 -2
  62. package/dist/cli/plugins/supabase-hook.js +1 -1
  63. package/dist/cli/plugins/supabase.d.ts +3 -3
  64. package/dist/cli/plugins/supabase.js +2 -2
  65. package/dist/cli/plugins/ui.d.ts +1 -1
  66. package/dist/cli/plugins/ui.js +1 -1
  67. package/dist/{client-subject-xCSkKD1C.d.ts → client-subject-Dzo49nco.d.ts} +2 -2
  68. package/dist/cloud/index.d.ts +8 -8
  69. package/dist/cloud/index.js +1 -1
  70. package/dist/{cloud-DW3q3qnp.js → cloud-CNGblWX0.js} +2 -2
  71. package/dist/{codemod-DVDMFsTX.js → codemod-BtJFcsD7.js} +5 -5
  72. package/dist/{codemod-CF7NNDzA.js → codemod-Dlhxov9D.js} +1 -1
  73. package/dist/compile/index.d.ts +1 -1
  74. package/dist/{compile-tG1zkSgX.d.ts → compile-DNgpHgcK.d.ts} +2 -2
  75. package/dist/{compile-BXKYYmT1.js → compile-nR1gQhXo.js} +10 -9
  76. package/dist/{completion-B59uPAnZ.js → completion-BIN9YXIe.js} +1 -1
  77. package/dist/{config-VCa1RLUe.js → config-CoYhD6ur.js} +1 -1
  78. package/dist/{config-report-CjvA6lGI.js → config-report-D_L1HXDb.js} +3 -3
  79. package/dist/{context-CAFddgb9.js → context-D8tN3SZm.js} +1 -1
  80. package/dist/{context-BQHKgT1m.js → context-Nr3nknZX.js} +2 -2
  81. package/dist/convex/index.d.ts +4 -4
  82. package/dist/convex/index.js +2 -2
  83. package/dist/{core-C5yCD-Ls.js → core-DIUrkFNL.js} +5 -5
  84. package/dist/{core-bf8qgaZf.d.ts → core-DPuDmlbL.d.ts} +2 -2
  85. package/dist/{create-Cn5EpEez.d.ts → create-BKrKxipb.d.ts} +4 -4
  86. package/dist/{create-COQVXK6C.js → create-BMRnaZel.js} +3 -3
  87. package/dist/{create-nOWD3Joc.js → create-BRY0OtFV.js} +3 -3
  88. package/dist/{create-B7Xa4jSQ.d.ts → create-CdB9FCZh.d.ts} +7 -7
  89. package/dist/{create-DHA0fhmi.d.ts → create-CdbVXh5I.d.ts} +6 -6
  90. package/dist/{credentials-COT-cjnP.d.ts → credentials-Dl0-R2aB.d.ts} +2 -2
  91. package/dist/{custom-role-rebuild-BK73tPib.js → custom-role-rebuild-wzN8pqDk.js} +5 -5
  92. package/dist/{define-permdock-DBgwTFi1.d.ts → define-permdock-4IkoNaB3.d.ts} +6 -6
  93. package/dist/{define-permdock-D7aKxIax.js → define-permdock-CO7YNrOF.js} +2 -2
  94. package/dist/{definition-options-9o8Hdww3.js → definition-options-DO0kIrB9.js} +7 -1
  95. package/dist/delivery/index.d.ts +4 -4
  96. package/dist/delivery/index.js +1 -1
  97. package/dist/{denied-text-C_AWc0f0.d.ts → denied-text-CllTzVJM.d.ts} +1 -1
  98. package/dist/{describe-AdETpWsn.d.ts → describe-FT1oVN_o.d.ts} +1 -1
  99. package/dist/{diff-CW9eZy9X.js → diff-CS8ks9h3.js} +1 -1
  100. package/dist/{diff-COdwpP31.js → diff-CkSZF7LO.js} +2 -2
  101. package/dist/{doctor-ervtBRzG.js → doctor-Bn5OPJMB.js} +94 -35
  102. package/dist/{doctor-ELj5hrVv.js → doctor-C9lLeLp2.js} +2 -2
  103. package/dist/drizzle/index.d.ts +3 -3
  104. package/dist/elysia/index.d.ts +4 -4
  105. package/dist/elysia/index.js +1 -1
  106. package/dist/{errors-COoiWqIs.d.ts → errors-BGosrHl8.d.ts} +1 -1
  107. package/dist/{evaluate-Dmd0bShm.js → evaluate-DNz6wMYv.js} +1 -1
  108. package/dist/{evaluations-GW9j_ARq.d.ts → evaluations-CaXNkxTp.d.ts} +3 -3
  109. package/dist/{evaluator-eager-CpVYslzY.js → evaluator-eager-BLNVbEAC.js} +1 -1
  110. package/dist/evaluator-zpeC7zel.js +2 -0
  111. package/dist/eve/index.d.ts +4 -4
  112. package/dist/eve/index.js +2 -2
  113. package/dist/{execute-ix7AAdWg.js → execute-DsHFIBuO.js} +4 -4
  114. package/dist/{explain-DRC9V5Qb.js → explain-D4ipf8IH.js} +1 -1
  115. package/dist/{explain-jg0KLCVt.js → explain-DISCeeYS.js} +2 -2
  116. package/dist/express/index.d.ts +4 -4
  117. package/dist/express/index.js +1 -1
  118. package/dist/fastify/index.d.ts +4 -4
  119. package/dist/fastify/index.js +1 -1
  120. package/dist/{fetch-adapter-CU1DIkXu.js → fetch-adapter-BXQc4NoV.js} +1 -1
  121. package/dist/{fetch-adapter-CJncmsPg.d.ts → fetch-adapter-Dci9NnyZ.d.ts} +2 -2
  122. package/dist/{fields-y_PSRCyJ.js → fields-CwFej4gp.js} +3 -3
  123. package/dist/{from-snapshot-DGc9W4QU.js → from-snapshot-DZ4D2sLa.js} +14 -9
  124. package/dist/gen-CpS9JkCb.js +1 -0
  125. package/dist/{gen-8rW_AUG5.js → gen-Fi4GcvIY.js} +3 -3
  126. package/dist/{gen-kind-C9ikF8nb.js → gen-kind-DR2-to9P.js} +1 -1
  127. package/dist/{generate-CW7gNfLr.js → generate-BSD_eI61.js} +18 -17
  128. package/dist/{generate-BmpCt5oi.js → generate-QEHCJSyv.js} +3 -3
  129. package/dist/{generate-options-DiR4r_sk.js → generate-options-BZ2nqy28.js} +14 -13
  130. package/dist/h3/index.d.ts +4 -4
  131. package/dist/h3/index.js +2 -2
  132. package/dist/{helper-calls-DHvgN9tr.js → helper-calls-B5MOl99d.js} +1 -1
  133. package/dist/hono/index.d.ts +4 -4
  134. package/dist/hono/index.js +1 -1
  135. package/dist/{hook-sql-D-abRHut.js → hook-sql-CbkH78FC.js} +267 -223
  136. package/dist/{hosted-Bkw3Oyh-.d.ts → hosted-BISipW6F.d.ts} +1 -1
  137. package/dist/{hosted-DZwCFrcy.js → hosted-D3USbpS6.js} +1 -1
  138. package/dist/{import-D_8tLF9g.js → import-Bz6IKoMM.js} +3 -3
  139. package/dist/{import-BAhoTYTk.js → import-DppjSugv.js} +1 -1
  140. package/dist/{index-DT3hOxA7.d.ts → index-BDJ2OZvV.d.ts} +34 -11
  141. package/dist/{index-Kj5S3IWE.d.ts → index-BF4IlvkT.d.ts} +4 -4
  142. package/dist/{index-DWmIuQLz.d.ts → index-BO5f180f.d.ts} +4 -4
  143. package/dist/{index-WOx7TBbj.d.ts → index-CWwWkz10.d.ts} +2 -2
  144. package/dist/{index-xShPsK8G.d.ts → index-Co_e22iJ.d.ts} +1 -1
  145. package/dist/{index-DPVeDtAO.d.ts → index-giCl-aQY.d.ts} +4 -4
  146. package/dist/index.d.ts +16 -16
  147. package/dist/index.js +13 -13
  148. package/dist/{init-DkRHIe8-.js → init-BOYIObRF.js} +3 -3
  149. package/dist/{init-zxb0BVDJ.js → init-DJYSpo-H.js} +1 -1
  150. package/dist/inspect-functions-CwEAQpVF.js +34 -0
  151. package/dist/{instance-options-DQCiBBuz.d.ts → instance-options-hq5Cp2Ih.d.ts} +1 -1
  152. package/dist/{instance-snapshot-D9kjL37B.js → instance-snapshot-D03srwnf.js} +9 -8
  153. package/dist/{interactive-only-Dqww0ABO.js → interactive-only-Bbq9e61G.js} +10 -182
  154. package/dist/jwt/index.d.ts +4 -4
  155. package/dist/{kernel-C5akxw5n.js → kernel-DSnWVZ0O.js} +5 -5
  156. package/dist/{keys-DQsHrgBM.js → keys-U2V0maaq.js} +1 -1
  157. package/dist/kysely/index.d.ts +3 -3
  158. package/dist/{lazy-provider-CMgFAGf8.d.ts → lazy-provider-W8KwlWJU.d.ts} +1 -1
  159. package/dist/{lazy-provider-DNVjY4n3.js → lazy-provider-b8UHGi8P.js} +2 -2
  160. package/dist/{login-C1p3gmj8.js → login-Dv8TFykx.js} +1 -1
  161. package/dist/{login-DOEZveP6.js → login-xgjt0a5o.js} +3 -3
  162. package/dist/{manager-chain-DdkiCw5q.js → manager-chain-FggG63qD.js} +1 -1
  163. package/dist/{manifest-31igzVGQ.js → manifest-BUeAHWDT.js} +44 -37
  164. package/dist/{manifest-DgsxeAsM.d.ts → manifest-BwhZ1s5b.d.ts} +35 -3
  165. package/dist/{manifest-B487A3po.js → manifest-CIWOmdlP.js} +1 -1
  166. package/dist/{manifest-schema-D7RQbnGY.js → manifest-schema-N3v2RVL-.js} +24 -0
  167. package/dist/{may-use-4HzzgYJ3.js → may-use-ikNCnNgZ.js} +1 -1
  168. package/dist/mcp/index.d.ts +8 -8
  169. package/dist/mcp/index.js +2 -2
  170. package/dist/measure-DZtly0oE.js +272 -0
  171. package/dist/membership-claim-sql-DGfhIn__.js +33 -0
  172. package/dist/{membership-filter-C7ZuhAqJ.js → membership-filter-Bz9QX6E9.js} +1 -1
  173. package/dist/memberships-4e6qi8Uv.js +1 -0
  174. package/dist/memberships-CNoAlsma.js +180 -0
  175. package/dist/{migrate-pg-lkbDu.js → migrate-BXk_rUmb.js} +2 -2
  176. package/dist/{model-BXhr8gUI.js → model-D0EKt-ED.js} +3 -3
  177. package/dist/names-DBxKx2bz.js +182 -0
  178. package/dist/nest/index.d.ts +4 -4
  179. package/dist/nest/index.js +1 -1
  180. package/dist/next/index.d.ts +11 -11
  181. package/dist/next/index.js +3 -3
  182. package/dist/next/plugin.d.ts +1 -1
  183. package/dist/node/index.d.ts +4 -4
  184. package/dist/node/index.js +1 -1
  185. package/dist/openai/index.d.ts +4 -4
  186. package/dist/openai/index.js +3 -3
  187. package/dist/openapi/index.d.ts +2 -2
  188. package/dist/{openapi-DEGesHWH.js → openapi-Bfakk4cF.js} +1 -1
  189. package/dist/{openapi-document-CEQ6jqqR.js → openapi-document-ZWpur4f1.js} +1 -1
  190. package/dist/{openapi-BeMVHVY4.js → openapi-g58VVrsc.js} +2 -2
  191. package/dist/orpc/index.d.ts +5 -5
  192. package/dist/orpc/index.js +2 -2
  193. package/dist/otel/index.d.ts +3 -3
  194. package/dist/{output-C7EPeSZj.js → output-D4FLF3_v.js} +1 -1
  195. package/dist/{ownership-Csk9C3Js.js → ownership-DvmaGcup.js} +7 -6
  196. package/dist/{parse-local-manifest-B92rFWnk.d.ts → parse-local-manifest-AJWs3pkW.d.ts} +1 -1
  197. package/dist/pdp/index.d.ts +3 -3
  198. package/dist/pdp/index.js +1 -1
  199. package/dist/{permdock-CJPIwU1T.js → permdock-JM9TKevZ.js} +14 -14
  200. package/dist/{permdock-BShHM8OJ.d.ts → permdock-V86uejcm.d.ts} +2 -2
  201. package/dist/{permissions-wEkTVr_I.js → permissions-xPyAmuXi.js} +1 -1
  202. package/dist/{pipeline-Bbu7uw28.js → pipeline-DCERGTTY.js} +2 -2
  203. package/dist/{plugin-L3G7jPGE.d.ts → plugin-BnvEp5tS.d.ts} +2 -2
  204. package/dist/{policy-BBvhhH9X.js → policy-CZBJDcTx.js} +2 -1
  205. package/dist/{policy-BUtwixSN.d.ts → policy-DZORR-Fw.d.ts} +1 -1
  206. package/dist/{policy-CSOOQ3rR.js → policy-DoHkOOTQ.js} +1 -1
  207. package/dist/{policy-bundle-KYI0EnrM.js → policy-bundle-CsnNAo-n.js} +3 -3
  208. package/dist/{policy-from-catalog-_zwn1sNj.js → policy-from-catalog-BohzTN3J.js} +3 -3
  209. package/dist/{policy-types-CfW4X_yX.d.ts → policy-types-BnBZvh7N.d.ts} +50 -1
  210. package/dist/{postgrest-PQ3zAOD2.d.ts → postgrest-BG0ipED3.d.ts} +9 -2
  211. package/dist/{powersync-CM6Vg4RH.js → powersync-CTKfjnPT.js} +12 -12
  212. package/dist/{powersync-CGvu6j5U.js → powersync-Cz3MUw6R.js} +1 -1
  213. package/dist/{powersync-C1ix7CEY.js → powersync-Dbpn-n0o.js} +1 -1
  214. package/dist/prisma/index.d.ts +2 -2
  215. package/dist/{protected-action-BPN0NaRb.js → protected-action-DDYvU-9Z.js} +1 -1
  216. package/dist/{protected-action-DhCQ4bSe.d.ts → protected-action-aGL_gT4j.d.ts} +5 -5
  217. package/dist/{provider-BV_v0JAY.js → provider-BwqzED5h.js} +83 -50
  218. package/dist/{provider-1xqxLVEz.js → provider-NQwLSlgb.js} +2 -2
  219. package/dist/{provider-CMgFAGf8.d.ts → provider-W8KwlWJU.d.ts} +1 -1
  220. package/dist/{provider-store-Cf8HRNtb.js → provider-store-BizF6jyu.js} +2 -2
  221. package/dist/{provider-with-cpL9vRjC.js → provider-with-DtBgCCV_.js} +1 -1
  222. package/dist/{prune-config-CdoPJIGz.js → prune-config--x-cEF8G.js} +5 -5
  223. package/dist/{pull-BaB401Bk.js → pull-BQELP7aV.js} +2 -2
  224. package/dist/pull-C_ZiPZ5X.js +1 -0
  225. package/dist/{push-DcjvEj0m.js → push-D5so0ptb.js} +2 -2
  226. package/dist/{pushed-policy-DcvO8NXy.d.ts → pushed-policy-CQaXRDe3.d.ts} +1 -1
  227. package/dist/{pushed-policy-DSjSWEAl.js → pushed-policy-dm_hFstN.js} +1 -1
  228. package/dist/{quote-BKrTBbcH.js → quote-LNaBdCGA.js} +1 -1
  229. package/dist/{rbac-mblGDx-Z.js → rbac-BRMnQ9Rl.js} +5 -4
  230. package/dist/react/index.d.ts +6 -6
  231. package/dist/react/index.js +3 -3
  232. package/dist/react/lazy.d.ts +6 -6
  233. package/dist/react/lazy.js +3 -3
  234. package/dist/react/provider-client-lazy.d.ts +1 -1
  235. package/dist/react/provider-client-lazy.js +1 -1
  236. package/dist/react/provider-client.d.ts +1 -1
  237. package/dist/react/provider-client.js +1 -1
  238. package/dist/react-native/index.d.ts +8 -8
  239. package/dist/react-native/index.js +5 -5
  240. package/dist/read-memberships-DVBitJZG.js +164 -0
  241. package/dist/{rename-BZNOV8H9.js → rename-BjP2CFUY.js} +5 -5
  242. package/dist/replay-Dg5-l7xu.d.ts +3 -0
  243. package/dist/{report-DCAiUc5U.js → report-DF0zUNut.js} +1 -1
  244. package/dist/{report-DievqWhf.js → report-XdCm1y_J.js} +1 -1
  245. package/dist/{request-context-BNVY3kZ1.js → request-context-CqqdiVp4.js} +1 -1
  246. package/dist/resend/index.d.ts +4 -4
  247. package/dist/{resolve-config-9NYYVc30.js → resolve-config-Cu_mE2wt.js} +1 -1
  248. package/dist/{resolve-names-Cth1UQ-8.js → resolve-names-xBg9s2IJ.js} +7 -6
  249. package/dist/{resolver-CuIY8aFD.js → resolver-C_a-bddD.js} +99 -15
  250. package/dist/{rls-BtkZgaZp.js → rls-BzCz7ZV0.js} +51 -4
  251. package/dist/{rls-files-ucAI0J5j.js → rls-files-Bu0O7cZ6.js} +1 -1
  252. package/dist/{rls-options-BFGRmdcH.d.ts → rls-options-f1wRhXSG.d.ts} +1 -1
  253. package/dist/{rls-DUYok5e9.js → rls-rk-QH4fc.js} +13 -13
  254. package/dist/{rpc-D7G7IJDa.js → rpc-BQPa7tLP.js} +1 -1
  255. package/dist/{rpc-COnquydd.d.ts → rpc-DyCWVn6C.d.ts} +1 -1
  256. package/dist/run-BvtApZDp.js +1 -0
  257. package/dist/{run-WIqPbnjD.js → run-DTz-e3Od.js} +2 -2
  258. package/dist/{run-ticket-Mmor5sYW.d.ts → run-ticket-mVPqm6M6.d.ts} +2 -2
  259. package/dist/{saas-DcqUkynn.js → saas-DSeazNrN.js} +3 -3
  260. package/dist/{scan-Badcllgg.js → scan-Cn79IAJs.js} +1 -1
  261. package/dist/{schema-DBRKgQb4.js → schema-CbzVUpWv.js} +1 -1
  262. package/dist/scim/index.d.ts +1 -1
  263. package/dist/seeds/index.d.ts +1 -1
  264. package/dist/{seeds-Cih1ztkf.d.ts → seeds-DLjPbhvM.d.ts} +1 -1
  265. package/dist/server/index.d.ts +11 -11
  266. package/dist/server/index.js +1 -1
  267. package/dist/{server-types-C2XX60aF.d.ts → server-types-BlMijUtb.d.ts} +8 -8
  268. package/dist/share-key-claims-CZGAeVqa.js +28 -0
  269. package/dist/{shared-C6_T7QUo.js → shared-DnVY767H.js} +2 -1
  270. package/dist/{sink-BQ_6K81r.d.ts → sink-DhrVLPSJ.d.ts} +2 -2
  271. package/dist/{size-l1pDHE2z.js → size-CY6rK6l9.js} +3 -3
  272. package/dist/{skills-Ba9hHGO6.js → skills-BKrN1qej.js} +1 -1
  273. package/dist/{skills-CTKq3o8D.js → skills-oZ8Ng2e7.js} +1 -1
  274. package/dist/{snapshot-Ty0uk9wZ.js → snapshot-Dzi4LR6n.js} +8 -1
  275. package/dist/{snapshot-cache-DGvLQW0-.d.ts → snapshot-cache-CVYqOThu.d.ts} +1 -1
  276. package/dist/{snapshot-compact-yXFxZLPo.js → snapshot-compact-BWMLnIXK.js} +35 -4
  277. package/dist/{snapshot-evaluate-DSNj2rhV.js → snapshot-evaluate-C382Z1mQ.js} +1 -1
  278. package/dist/{snapshot-reads-BnAHiuoa.js → snapshot-reads-JxcUSUfW.js} +2 -2
  279. package/dist/{snapshot-size-DNY1MTsV.js → snapshot-size-D6ixbYvH.js} +1 -1
  280. package/dist/{snapshot-size-2fkXbCkP.js → snapshot-size-NklqBKcV.js} +1 -1
  281. package/dist/solid/index.d.ts +5 -5
  282. package/dist/solid/index.js +2 -2
  283. package/dist/solid-start/index.d.ts +4 -4
  284. package/dist/solid-start/index.js +2 -2
  285. package/dist/{sources-CjgZns7t.d.ts → sources-Bq7k7g34.d.ts} +7 -2
  286. package/dist/{sources-DnjJPGfb.js → sources-C6Id63F8.js} +2 -1
  287. package/dist/{src-HRYn4UFj.js → src-BXDohWNO.js} +154 -11
  288. package/dist/ssf/index.d.ts +3 -3
  289. package/dist/{standard-webhooks-Bnnrqa6d.d.ts → standard-webhooks-D6SPYjSQ.d.ts} +2 -2
  290. package/dist/{store-core-BdFcruPm.d.ts → store-core-Bq7Qc9QM.d.ts} +4 -4
  291. package/dist/{store-options-DpCQo0vB.js → store-options-DgOuhUSn.js} +4 -4
  292. package/dist/{stores-D6MIjN_-.d.ts → stores-Dn7TpQFa.d.ts} +5 -5
  293. package/dist/{stores-KpBCaY6c.js → stores-jgDndNHa.js} +1 -1
  294. package/dist/{subject-CrldGifz.js → subject-B7p94Y0s.js} +1 -1
  295. package/dist/{subject-cache-CnJcz2K_.d.ts → subject-cache-UKUgQCEX.d.ts} +3 -1
  296. package/dist/supabase/index.d.ts +36 -9
  297. package/dist/supabase/index.js +8 -7
  298. package/dist/supabase/middleware.d.ts +5 -5
  299. package/dist/supabase/middleware.js +4 -4
  300. package/dist/{supabase-CGiB83XQ.js → supabase-BNPS-Gr1.js} +15 -1
  301. package/dist/{supabase-kWQlkrHw.js → supabase-DrazwRER.js} +14 -7
  302. package/dist/supabase-hook-D0Yzbl19.js +2 -0
  303. package/dist/{supabase-hook-CqO_0Koh.js → supabase-hook-t1HnQf8U.js} +7 -7
  304. package/dist/{supabase-schemas-BglbAG2Z.js → supabase-schemas-_ubYYw9i.js} +2 -2
  305. package/dist/svelte/index.d.ts +5 -5
  306. package/dist/svelte/index.js +5 -3
  307. package/dist/svelte/runtime.d.ts +3 -3
  308. package/dist/svelte/runtime.js +1 -1
  309. package/dist/svelte/source.d.ts +5 -5
  310. package/dist/svelte/source.js +2 -2
  311. package/dist/sveltekit/index.d.ts +4 -4
  312. package/dist/sveltekit/index.js +1 -1
  313. package/dist/{table-reads-AnHPrBp8.js → table-reads-B7z40Yu-.js} +297 -48
  314. package/dist/{table-reads-BviGc0L_.js → table-reads-Ci-ZVo5m.js} +1 -1
  315. package/dist/{tables-CDq0HVVq.js → tables-Bxmf2beb.js} +102 -8
  316. package/dist/tanstack-start/index.d.ts +4 -4
  317. package/dist/tanstack-start/index.js +1 -1
  318. package/dist/{tenant-check-D7g9oNVH.js → tenant-check-DW0kbH-a.js} +4 -4
  319. package/dist/terminal/index.d.ts +5 -5
  320. package/dist/terminal/index.js +3 -3
  321. package/dist/testing/core.d.ts +1 -1
  322. package/dist/testing/core.js +1 -1
  323. package/dist/testing/fixtures/index.d.ts +4 -4
  324. package/dist/testing/fixtures/index.js +29 -11
  325. package/dist/testing/index.d.ts +23 -23
  326. package/dist/testing/index.js +13 -13
  327. package/dist/testing/saas/index.d.ts +3 -3
  328. package/dist/testing/saas/index.js +2 -2
  329. package/dist/testing/saas/permissions.js +1 -1
  330. package/dist/trpc/index.d.ts +5 -5
  331. package/dist/trpc/index.js +2 -2
  332. package/dist/{type-helpers-CUmJFGV6.d.ts → type-helpers-CVN-p62O.d.ts} +1 -1
  333. package/dist/{types-vKKndyxx.d.ts → types-5cvjmHTG.d.ts} +1 -1
  334. package/dist/{types-DwoRXDvN.d.ts → types-BMKDvcXc.d.ts} +2 -2
  335. package/dist/{types-CIzXPPV-.d.ts → types-B_I8TBA9.d.ts} +2 -2
  336. package/dist/{types-h9W3CNC_.d.ts → types-BmTW35E5.d.ts} +4 -4
  337. package/dist/{types-BhBfMdQ5.d.ts → types-CDkJNA3a.d.ts} +3 -3
  338. package/dist/{types-euUv1wsO.d.ts → types-CgaGxF5q.d.ts} +1 -1
  339. package/dist/{types-BsRf5rKk.d.ts → types-CrUguLsE.d.ts} +2 -2
  340. package/dist/{types-BRECeQ2n.d.ts → types-DNOJRhyn.d.ts} +3 -3
  341. package/dist/{types-BKnUwgvx.d.ts → types-Dl2jRkyq.d.ts} +4 -4
  342. package/dist/{types-config-DNIw_Gt5.d.ts → types-config-CyawIkMF.d.ts} +2 -2
  343. package/dist/{types-CjZscT16.d.ts → types-gp1w86cV.d.ts} +4 -4
  344. package/dist/{types-run-Bwn1MuW0.d.ts → types-run-ByHuYUen.d.ts} +1 -1
  345. package/dist/unplugin/index.d.ts +1 -1
  346. package/dist/{usage-CW6xhRcV.js → usage-B8ca_Nj_.js} +2 -2
  347. package/dist/usage-CKTsomEq.js +1 -0
  348. package/dist/{usage-n4V2k_a6.js → usage-Do7LQ4i4.js} +1 -1
  349. package/dist/{validation-error-P4Z9HUuP.d.ts → validation-error-BKgVVMc1.d.ts} +1 -1
  350. package/dist/{verify-CKzngsUH.js → verify-ZojGAC3f.js} +12 -12
  351. package/dist/{version-cache-BzK8dwJy.js → version-cache-Ccrfu2A4.js} +6 -1
  352. package/dist/vue/index.d.ts +5 -5
  353. package/dist/vue/index.js +2 -2
  354. package/dist/{waiter-BqUxSRxq.d.ts → waiter-Bov7Cig6.d.ts} +2 -2
  355. package/dist/{warm-BR-mrnY-.d.ts → warm-BKD3FN6k.d.ts} +1 -1
  356. package/dist/{warm-5yxlUmBh.js → warm-BZ0ZwSmO.js} +1 -1
  357. package/dist/{watch-C12Ub7x4.js → watch-EzX_aG73.js} +1 -1
  358. package/dist/webmcp/index.d.ts +1 -1
  359. package/dist/webmcp/index.js +1 -1
  360. package/dist/{who-can-CGVpM3fZ.js → who-can-CIgYpEvy.js} +1 -1
  361. package/dist/workflow/index.d.ts +3 -3
  362. package/dist/workflow/index.js +1 -1
  363. package/dist/workflow-sdk/index.d.ts +4 -4
  364. package/dist/{wrap-D8WtzrB7.d.ts → wrap-CaAA3ubO.d.ts} +2 -2
  365. package/package.json +11 -11
  366. package/schemas/snapshot-v2.json +20 -0
  367. package/schemas/supabase-claims-v1.json +48 -2
  368. package/schemas/supabase-manifest-v1.json +28 -0
  369. package/dist/bundle-size-DwZ4e1gu.js +0 -1
  370. package/dist/claims-size-B6j0Ff4Q.js +0 -1
  371. package/dist/evaluator-COmATWCr.js +0 -2
  372. package/dist/gen-BtiGMiuH.js +0 -1
  373. package/dist/pull-Bp63vtgu.js +0 -1
  374. package/dist/read-memberships-BkePIa1F.js +0 -63
  375. package/dist/replay-BCOZifwx.d.ts +0 -3
  376. package/dist/run-BjMxYYTe.js +0 -1
  377. package/dist/supabase-hook-CluYxKee.js +0 -2
  378. package/dist/usage-Ci7Glu-H.js +0 -1
@@ -1,11 +1,11 @@
1
- import { t as fromSnapshot } from "./from-snapshot-DGc9W4QU.js";
1
+ import { t as fromSnapshot } from "./from-snapshot-DZ4D2sLa.js";
2
2
  import { c as listPermissions } from "./permission-registry-DstT40VS.js";
3
- import { t as getPermDock } from "./permdock-CJPIwU1T.js";
4
- import { C as membershipsClaim } from "./evaluate-Dmd0bShm.js";
3
+ import { t as getPermDock } from "./permdock-JM9TKevZ.js";
4
+ import { C as membershipsClaim } from "./evaluate-DNz6wMYv.js";
5
5
  import { d as scopeList } from "./scopes-B-KX9EI8.js";
6
6
  import { c as quoteSqlTable, n as defaultSqlCommand, o as quoteSqlIdent, t as SQL_IDENT } from "./sql-T4GaBh9X.js";
7
- import { k as memoryCustomRoleSource } from "./src-HRYn4UFj.js";
8
- import { n as parseSnapshot } from "./snapshot-Ty0uk9wZ.js";
7
+ import { A as memoryCustomRoleSource } from "./src-BXDohWNO.js";
8
+ import { n as parseSnapshot } from "./snapshot-Dzi4LR6n.js";
9
9
  import "./budget-BH81q2cj.js";
10
10
  // src/testing/policy-matrix.ts
11
11
  function isOutcomeCell(value) {
@@ -1,5 +1,5 @@
1
- import { D as Policy, Tr as Membership, br as CustomRole, nr as Decision } from "./policy-types-CfW4X_yX.js";
2
- import { o as PermDockOptions, p as WhereResult } from "./permdock-BShHM8OJ.js";
1
+ import { D as Policy, Dr as Membership, Sr as CustomRole, ir as Decision } from "./policy-types-BnBZvh7N.js";
2
+ import { o as PermDockOptions, p as WhereResult } from "./permdock-V86uejcm.js";
3
3
  import { w as Permission } from "./vocabulary-DHfKPIC5.js";
4
4
  type MatrixOutcome = "granted" | "denied" | "approval-required";
5
5
  type MatrixCell = MatrixOutcome | {
@@ -1,9 +1,9 @@
1
1
  import { n as ApprovalErrorCode } from "./errors-KngVdJT9.js";
2
- import { m as ApprovalStore, p as ApprovalStatus } from "./types-vKKndyxx.js";
3
- import { D as Policy, Er as Principal, N as PolicyVocabulary, Or as Subject, cr as GrantedDecision, or as DeniedDecision, tr as ApprovalRequiredDecision } from "./policy-types-CfW4X_yX.js";
2
+ import { m as ApprovalStore, p as ApprovalStatus } from "./types-5cvjmHTG.js";
3
+ import { Ar as Subject, D as Policy, N as PolicyVocabulary, Or as Principal, cr as DeniedDecision, rr as ApprovalRequiredDecision, ur as GrantedDecision } from "./policy-types-BnBZvh7N.js";
4
4
  import { t as Operation } from "./operations-DaEoGpMV.js";
5
- import { a as PermDock, o as PermDockOptions, v as PrincipalSource } from "./permdock-BShHM8OJ.js";
6
- import { t as ApprovalPrompt } from "./approval-prompt-yNyhQqn8.js";
5
+ import { a as PermDock, o as PermDockOptions, v as PrincipalSource } from "./permdock-V86uejcm.js";
6
+ import { t as ApprovalPrompt } from "./approval-prompt-CJvYBdja.js";
7
7
  /**
8
8
  * The platform user behind a chat message or action. Fill it only from an event
9
9
  * whose platform signature the transport verified; a body field or a model
@@ -1,5 +1,5 @@
1
1
  import { n as tenantScope, t as actorFrom } from "./adapter-context-lHq_i_77.js";
2
- import { n as resolveOrNull } from "./build-instance-CFiegi_w.js";
2
+ import { n as resolveOrNull } from "./build-instance-DZEWYO-A.js";
3
3
  import { c as listPermissions } from "./permission-registry-DstT40VS.js";
4
4
  import { t as compact } from "./compact-C4LFuqbW.js";
5
5
  import { t as LOAD_FAILED } from "./decision-hHv4UZgy.js";
@@ -7,9 +7,9 @@ import { n as freezeDeep } from "./freeze-DGfJq_j2.js";
7
7
  import { n as problemDetails } from "./problem-details-EJHcvYCz.js";
8
8
  import { a as decisionResponse, c as problemFromDecision, d as unauthenticatedProblem, s as notFoundProblem, t as ANONYMOUS } from "./problem-BZB7zPC7.js";
9
9
  import { f as InvalidSignatureError, n as applyApprovalResume, o as evaluationsHandler } from "./evaluations-DPEAu_jM.js";
10
- import { i as challengeScope, u as withApp } from "./permdock-CJPIwU1T.js";
10
+ import { i as challengeScope, u as withApp } from "./permdock-JM9TKevZ.js";
11
11
  import { t as deferredSink } from "./deferred-sink-BZahJ8sO.js";
12
- import { n as requestContext, t as buildReportingInstance } from "./request-context-BNVY3kZ1.js";
12
+ import { n as requestContext, t as buildReportingInstance } from "./request-context-CqqdiVp4.js";
13
13
  import { n as decideSet, r as permissionList } from "./decide-set-CgNcE6pP.js";
14
14
  import { n as resourceRef } from "./resource-ref-BiQtFK-I.js";
15
15
  import { r as hasCredentials } from "./http-C9jDw_bZ.js";
@@ -1,10 +1,10 @@
1
- import { u as withApp } from "./permdock-CJPIwU1T.js";
1
+ import { u as withApp } from "./permdock-JM9TKevZ.js";
2
2
  import { t as compact } from "./compact-C4LFuqbW.js";
3
- import { c as deniedFor } from "./may-use-4HzzgYJ3.js";
3
+ import { c as deniedFor } from "./may-use-ikNCnNgZ.js";
4
4
  import { n as freezeDeep } from "./freeze-DGfJq_j2.js";
5
5
  import { t as instanceOptions } from "./instance-options-CLErhA76.js";
6
6
  import { t as composeWraps } from "./wrap-CsfsaJhd.js";
7
- import { n as createAgentKernel } from "./kernel-C5akxw5n.js";
7
+ import { n as createAgentKernel } from "./kernel-DSnWVZ0O.js";
8
8
  // src/agent/create.ts
9
9
  function modelRow(modelId) {
10
10
  return { id: modelId };
@@ -1,13 +1,13 @@
1
- import { D as Policy, Er as Principal, N as PolicyVocabulary, Or as Subject, Sr as Delegation, nr as Decision } from "./policy-types-CfW4X_yX.js";
2
- import { a as PermDock } from "./permdock-BShHM8OJ.js";
3
- import { m as ApprovalStore } from "./types-vKKndyxx.js";
4
- import { t as InstanceOptions } from "./instance-options-DQCiBBuz.js";
1
+ import { Ar as Subject, D as Policy, N as PolicyVocabulary, Or as Principal, ir as Decision, wr as Delegation } from "./policy-types-BnBZvh7N.js";
2
+ import { a as PermDock } from "./permdock-V86uejcm.js";
3
+ import { m as ApprovalStore } from "./types-5cvjmHTG.js";
4
+ import { t as InstanceOptions } from "./instance-options-hq5Cp2Ih.js";
5
5
  import { t as Operation } from "./operations-DaEoGpMV.js";
6
6
  import { w as Permission } from "./vocabulary-DHfKPIC5.js";
7
7
  import { t as RequestContext } from "./request-context-E3-ps-H_.js";
8
- import { n as PermDockWrap } from "./wrap-D8WtzrB7.js";
9
- import { o as OtelWrap } from "./types-DwoRXDvN.js";
10
- import { t as DeniedText } from "./denied-text-C_AWc0f0.js";
8
+ import { n as PermDockWrap } from "./wrap-CaAA3ubO.js";
9
+ import { o as OtelWrap } from "./types-BMKDvcXc.js";
10
+ import { t as DeniedText } from "./denied-text-CllTzVJM.js";
11
11
  /**
12
12
  * What the user can do to lift a denial: authenticate again with the `acr` and
13
13
  * `maxAge` the failing grants ask for, or activate a role they are eligible
@@ -1,10 +1,10 @@
1
- import { m as ApprovalStore } from "./types-vKKndyxx.js";
2
- import { a as AutomationSource } from "./automation-0VF1xe4o.js";
3
- import { D as Policy, Er as Principal, N as PolicyVocabulary, _t as TokenSigner, mn as AuthEvent, nr as Decision, qt as Instant, rr as Denial, vt as TokenVerifier } from "./policy-types-CfW4X_yX.js";
4
- import { a as PermDock, n as DecideOptions, o as PermDockOptions, v as PrincipalSource } from "./permdock-BShHM8OJ.js";
1
+ import { m as ApprovalStore } from "./types-5cvjmHTG.js";
2
+ import { a as AutomationSource } from "./automation-BqUmdFfe.js";
3
+ import { D as Policy, N as PolicyVocabulary, Or as Principal, _t as TokenSigner, ar as Denial, gn as AuthEvent, ir as Decision, qt as Instant, vt as TokenVerifier } from "./policy-types-BnBZvh7N.js";
4
+ import { a as PermDock, n as DecideOptions, o as PermDockOptions, v as PrincipalSource } from "./permdock-V86uejcm.js";
5
5
  import { w as Permission } from "./vocabulary-DHfKPIC5.js";
6
- import { c as RunResource, i as RunBinding, r as RunAutomation } from "./run-ticket-Mmor5sYW.js";
7
- import { n as ApprovalWaiter } from "./waiter-BqUxSRxq.js";
6
+ import { c as RunResource, i as RunBinding, r as RunAutomation } from "./run-ticket-mVPqm6M6.js";
7
+ import { n as ApprovalWaiter } from "./waiter-Bov7Cig6.js";
8
8
  type WorkflowPermDockOptions = PermDockOptions & {
9
9
  /** Signs the run tickets `start` mints. */
10
10
  readonly signer: TokenSigner;
@@ -1,6 +1,6 @@
1
- import { G as CredentialVerifier, Mt as Credential, Or as Subject, Pt as CredentialKind, X as DecisionSink, jt as ApiKeyPrincipal, lt as SettingsSource, mn as AuthEvent } from "./policy-types-CfW4X_yX.js";
1
+ import { Ar as Subject, G as CredentialVerifier, Mt as Credential, Pt as CredentialKind, X as DecisionSink, gn as AuthEvent, jt as ApiKeyPrincipal, lt as SettingsSource } from "./policy-types-BnBZvh7N.js";
2
2
  import { E as PermissionTree } from "./vocabulary-DHfKPIC5.js";
3
- import { v as PrincipalSource } from "./permdock-BShHM8OJ.js";
3
+ import { v as PrincipalSource } from "./permdock-V86uejcm.js";
4
4
  /** `on('auth')` causes for an API key that resolves to the anonymous subject. */
5
5
  type ApiKeyFailureCause = "malformed" | "unknown-credential" | "invalid-claims" | "expired" | "credential-policy" | "credential-revoked" | "owner-unavailable";
6
6
  /** An opaque key split at its last `_`: `pdk_<id>_<secret><checksum>`. */
@@ -1,12 +1,12 @@
1
1
  import { d as sqlTextArray, i as qualifySqlTable } from "./sql-T4GaBh9X.js";
2
- import { l as roleColumn } from "./sources-DnjJPGfb.js";
2
+ import { l as roleColumn } from "./sources-C6Id63F8.js";
3
3
  import { i as configError } from "./errors-DgLOqc6j.js";
4
4
  import { n as byKey, t as byCodeUnit } from "./compare-8SNJN-9U.js";
5
5
  import { t as beforeFirst } from "./text-D704xHVl.js";
6
- import { C as tenantTypeOf } from "./subject-CrldGifz.js";
7
- import { a as quoteIdent, c as quoteTable, i as qualified, o as quoteLiteral, s as quoteQualified } from "./quote-BKrTBbcH.js";
8
- import { t as CUSTOM_ROLES } from "./shared-C6_T7QUo.js";
9
- import { B as rolesTableScope, P as currentKeyExpr } from "./interactive-only-Dqww0ABO.js";
6
+ import { C as tenantTypeOf } from "./subject-B7p94Y0s.js";
7
+ import { a as quoteIdent, c as quoteTable, i as qualified, o as quoteLiteral, s as quoteQualified } from "./quote-LNaBdCGA.js";
8
+ import { t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
9
+ import { B as rolesTableScope, P as currentKeyExpr } from "./interactive-only-Bbq9e61G.js";
10
10
  // src/cli/rls/custom-role-rebuild.ts
11
11
  const PREFIX = "PermDock CLI";
12
12
  /** A column of the roles-table row `r`. */
@@ -1,10 +1,10 @@
1
- import { m as ApprovalStore } from "./types-vKKndyxx.js";
2
- import { r as ApiKeySubjectOptions } from "./credentials-COT-cjnP.js";
1
+ import { m as ApprovalStore } from "./types-5cvjmHTG.js";
2
+ import { r as ApiKeySubjectOptions } from "./credentials-Dl0-R2aB.js";
3
3
  import { t as ClaimsMap } from "./claims-map-CLKQWxJG.js";
4
- import { t as InstanceOptions } from "./instance-options-DQCiBBuz.js";
5
- import { a as PermDock, o as PermDockOptions } from "./permdock-BShHM8OJ.js";
6
- import { n as SubjectCache, s as VersionCache } from "./subject-cache-CnJcz2K_.js";
7
- import { D as Policy, Er as Principal, N as PolicyVocabulary } from "./policy-types-CfW4X_yX.js";
4
+ import { t as InstanceOptions } from "./instance-options-hq5Cp2Ih.js";
5
+ import { a as PermDock, o as PermDockOptions } from "./permdock-V86uejcm.js";
6
+ import { n as SubjectCache, s as VersionCache } from "./subject-cache-UKUgQCEX.js";
7
+ import { D as Policy, N as PolicyVocabulary, Or as Principal } from "./policy-types-BnBZvh7N.js";
8
8
  /**
9
9
  * How strict `definePermDock` is about the services the policy needs. `dev`
10
10
  * fills in in-process defaults (a memory approval store and a memory limit
@@ -1,9 +1,9 @@
1
1
  import { i as memoryApprovalStore } from "./store-n3yEN7dt.js";
2
- import { c as APP, t as getPermDock } from "./permdock-CJPIwU1T.js";
2
+ import { c as APP, t as getPermDock } from "./permdock-JM9TKevZ.js";
3
3
  import { r as isRecord, t as compact } from "./compact-C4LFuqbW.js";
4
4
  import { t as instanceOptions } from "./instance-options-CLErhA76.js";
5
5
  import { n as memoryLimitStore, t as limits } from "./limits-DpTxX6N4.js";
6
- import { _ as claimsFirst } from "./instance-snapshot-D9kjL37B.js";
6
+ import { _ as claimsFirst } from "./instance-snapshot-D03srwnf.js";
7
7
  import { r as mapClaimsToSubject } from "./map-claims-BKdnPwep.js";
8
8
  import { c as subjectFromApiKey } from "./credentials-B-hsgB4W.js";
9
9
  // src/core/version-sources.ts
@@ -2,7 +2,7 @@ import { r as isRecord, t as compact } from "./compact-C4LFuqbW.js";
2
2
  import { n as freezeDeep } from "./freeze-DGfJq_j2.js";
3
3
  import { r as validateRecord } from "./thenable-BxMy2v8w.js";
4
4
  import { t as anonymousSubject } from "./subject-DkxY-AhF.js";
5
- import { t as readMemberships } from "./read-memberships-BkePIa1F.js";
5
+ import { t as readMemberships } from "./read-memberships-DVBitJZG.js";
6
6
  import { t as readClaim } from "./claims-map-BGbpbvGD.js";
7
7
  import { t as clientNameOf } from "./clients-Bb_33pRE.js";
8
8
  import { t as CUSTOM_ROLES_VERSION_CLAIM } from "./budget-BH81q2cj.js";
@@ -276,6 +276,11 @@ function subjectActor(actor, options) {
276
276
  default: return actor;
277
277
  }
278
278
  }
279
+ function suspendedClaim(value) {
280
+ if (!Array.isArray(value)) return;
281
+ const ids = value.filter((item) => typeof item === "string");
282
+ return ids.length === 0 ? void 0 : ids;
283
+ }
279
284
  function mapClaims(claims, options) {
280
285
  const role = claims["role"];
281
286
  if (role === "anon" || role === "service_role") return anonymousSubject();
@@ -310,6 +315,7 @@ function mapClaims(claims, options) {
310
315
  plans: plans.length > 0 ? plans : void 0,
311
316
  memberships,
312
317
  membershipsTruncated: claimAt(claims, "memberships_truncated") === true ? true : void 0,
318
+ suspendedIn: suspendedClaim(claimAt(claims, "suspended_in")),
313
319
  authzVersion: typeof version === "number" && Number.isInteger(version) ? version : void 0,
314
320
  customRolesVersion: typeof rolesVersion === "number" && Number.isInteger(rolesVersion) ? rolesVersion : void 0,
315
321
  issuer: typeof claims["iss"] === "string" ? claims["iss"] : void 0,
@@ -1,5 +1,5 @@
1
- import { Sn as EmailCategory, bn as DeliveryFailureCause, vn as DeliveryChannel } from "../policy-types-CfW4X_yX.js";
2
- import { i as approvalUrlFor, n as ApprovalUrl, r as approvalPrompt, t as ApprovalPrompt } from "../approval-prompt-yNyhQqn8.js";
3
- import { _ as TransportOptions, a as DeliveryReport, c as DeliveryTransport, d as EmailTransport, f as EmailUnsubscribe, g as TransportMessages, h as TransportItem, i as DeliveryMessages, l as DeliveryTransports, m as Recipient, n as ChatTransport, o as DeliveryResult, p as OutgoingEmail, r as DeliverOptions, s as DeliveryTarget, t as ChatMessage, u as EmailMessage, v as WebhookMessage, y as WebhookTransport } from "../types-BhBfMdQ5.js";
4
- import { C as audience, S as SubscriberEvent, _ as ParseConnectorResult, a as DeliveryPermDock, b as Audience, c as MemoryDelivery, d as memoryDeliveryTransport, f as CONNECTOR_SCHEMA, g as ConnectorKind, h as ConnectorIssue, i as isDeliveryTarget, l as MemoryDeliveryTransport, m as Connector, n as webhookTransport, o as DeliveryPermDockOptions, p as CONNECTOR_KINDS, r as isAddrSpec, s as createPermDock, t as WebhookTransportOptions, u as MemoryDeliveryTransportOptions, v as SiemDestination, w as subscribersFor, x as AudienceOptions, y as parseConnector } from "../index-Kj5S3IWE.js";
1
+ import { Sn as DeliveryFailureCause, bn as DeliveryChannel, wn as EmailCategory } from "../policy-types-BnBZvh7N.js";
2
+ import { i as approvalUrlFor, n as ApprovalUrl, r as approvalPrompt, t as ApprovalPrompt } from "../approval-prompt-CJvYBdja.js";
3
+ import { _ as TransportOptions, a as DeliveryReport, c as DeliveryTransport, d as EmailTransport, f as EmailUnsubscribe, g as TransportMessages, h as TransportItem, i as DeliveryMessages, l as DeliveryTransports, m as Recipient, n as ChatTransport, o as DeliveryResult, p as OutgoingEmail, r as DeliverOptions, s as DeliveryTarget, t as ChatMessage, u as EmailMessage, v as WebhookMessage, y as WebhookTransport } from "../types-CDkJNA3a.js";
4
+ import { C as audience, S as SubscriberEvent, _ as ParseConnectorResult, a as DeliveryPermDock, b as Audience, c as MemoryDelivery, d as memoryDeliveryTransport, f as CONNECTOR_SCHEMA, g as ConnectorKind, h as ConnectorIssue, i as isDeliveryTarget, l as MemoryDeliveryTransport, m as Connector, n as webhookTransport, o as DeliveryPermDockOptions, p as CONNECTOR_KINDS, r as isAddrSpec, s as createPermDock, t as WebhookTransportOptions, u as MemoryDeliveryTransportOptions, v as SiemDestination, w as subscribersFor, x as AudienceOptions, y as parseConnector } from "../index-BF4IlvkT.js";
5
5
  export { type ApprovalPrompt, type ApprovalUrl, type Audience, type AudienceOptions, CONNECTOR_KINDS, CONNECTOR_SCHEMA, type ChatMessage, type ChatTransport, type Connector, type ConnectorIssue, type ConnectorKind, type DeliverOptions, type DeliveryChannel, type DeliveryFailureCause, type DeliveryMessages, type DeliveryPermDock, type DeliveryPermDockOptions, type DeliveryReport, type DeliveryResult, type DeliveryTarget, type DeliveryTransport, type DeliveryTransports, type EmailCategory, type EmailMessage, type EmailTransport, type EmailUnsubscribe, type MemoryDelivery, type MemoryDeliveryTransport, type MemoryDeliveryTransportOptions, type OutgoingEmail, type ParseConnectorResult, type Recipient, type SiemDestination, type SubscriberEvent, type TransportItem, type TransportMessages, type TransportOptions, type WebhookMessage, type WebhookTransport, type WebhookTransportOptions, approvalPrompt, approvalUrlFor, audience, createPermDock, isAddrSpec, isDeliveryTarget, memoryDeliveryTransport, parseConnector, subscribersFor, webhookTransport };
@@ -1,5 +1,5 @@
1
1
  import { n as approvalUrlFor, t as approvalPrompt } from "../approval-prompt-Covyx_DB.js";
2
- import { n as subscribersFor, t as audience } from "../audience-CARf-b-R.js";
2
+ import { n as subscribersFor, t as audience } from "../audience-B6DQ5wQu.js";
3
3
  import { t as CONNECTOR_SCHEMA } from "../connector-schema-BSRMyq4M.js";
4
4
  import { a as parseConnector, i as CONNECTOR_KINDS, n as createPermDock, r as memoryDeliveryTransport, t as webhookTransport } from "../delivery-Cb3VCij5.js";
5
5
  import { i as isDeliveryTarget, n as isAddrSpec } from "../target-BGpxgKsN.js";
@@ -1,4 +1,4 @@
1
- import { nr as Decision } from "./policy-types-CfW4X_yX.js";
1
+ import { ir as Decision } from "./policy-types-BnBZvh7N.js";
2
2
  import { w as Permission } from "./vocabulary-DHfKPIC5.js";
3
3
  /**
4
4
  * What an agent adapter's `deniedText` receives: the refusal and the text
@@ -1,4 +1,4 @@
1
- import { ar as DenialReason, nr as Decision, or as DeniedDecision } from "./policy-types-CfW4X_yX.js";
1
+ import { cr as DeniedDecision, ir as Decision, sr as DenialReason } from "./policy-types-BnBZvh7N.js";
2
2
  import { w as Permission } from "./vocabulary-DHfKPIC5.js";
3
3
  type DecisionDescription = {
4
4
  readonly kind: "granted" | "denied" | "approval" | "tenant" | "delegation" | "server-only" | "upgrade";
@@ -21,7 +21,7 @@ const diff = defineLeaf({
21
21
  }
22
22
  },
23
23
  async run(ctx, { flags, args }) {
24
- return (await import("./diff-COdwpP31.js")).runDiff({
24
+ return (await import("./diff-CkSZF7LO.js")).runDiff({
25
25
  cwd: ctx.cwd,
26
26
  config: ctx.config,
27
27
  sources: [args["before"], args["after"]].filter((value) => value !== void 0),
@@ -3,8 +3,8 @@ import { t as parseCatalog } from "./parse-CUqZ_lLC.js";
3
3
  import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
4
4
  import { g as secondsOf } from "./time-r0CKBm57.js";
5
5
  import { n as findPermission } from "./permission-registry-DstT40VS.js";
6
- import { t as getPermDock } from "./permdock-CJPIwU1T.js";
7
- import { k as memoryCustomRoleSource } from "./src-HRYn4UFj.js";
6
+ import { t as getPermDock } from "./permdock-JM9TKevZ.js";
7
+ import { A as memoryCustomRoleSource } from "./src-BXDohWNO.js";
8
8
  import { t as buildCatalog } from "./catalog-doc-D4g3nyFB.js";
9
9
  import { f as usageResult, i as configError } from "./errors-DgLOqc6j.js";
10
10
  import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-3aUUP6Nx.js";
@@ -2,8 +2,8 @@ import { c as rootScope, d as scopeList, o as normalizeMemberships, s as resolve
2
2
  import { r as supabaseTenantClaim } from "./budget-BH81q2cj.js";
3
3
  import { r as runCollect } from "./collect-CPimbkC5.js";
4
4
  import { t as didYouMean } from "./args-BSpXxMnb.js";
5
- import { t as DOCS_BASE } from "./manifest-31igzVGQ.js";
6
- import { o as nonEmptyOr, r as findingOf } from "./output-C7EPeSZj.js";
5
+ import { t as DOCS_BASE } from "./manifest-BUeAHWDT.js";
6
+ import { o as nonEmptyOr, r as findingOf } from "./output-D4FLF3_v.js";
7
7
  import { t as createStyle } from "./style-CQDaLJtP.js";
8
8
  import { i as DOCTOR_REPORT_SCHEMA } from "./version-D-jWyJb9.js";
9
9
  import { a as rel, n as doctorSrcPath, o as sqlFiles$1, r as listSourceFiles } from "./files-DAR51W3J.js";
@@ -11,73 +11,74 @@ import { r as pgConnector } from "./pg-DmS5ITHu.js";
11
11
  import { a as describeError, n as CliError } from "./errors-DgLOqc6j.js";
12
12
  import { S as restatedFacts, _ as workspaceDirs, b as readJson, d as betterSupabaseAuthzVersions, f as betterSupabaseConfig, g as betterSupabaseTenantClaim, h as betterSupabaseInstalled, m as betterSupabaseDefaults, o as readParsedConfig, p as betterSupabaseConfigPath, t as configFileIn, u as BETTER_SUPABASE_AUTHZ_TOPIC, v as filesOf, x as membershipDisagreements, y as nodeFiles } from "./config-7QvEq57a.js";
13
13
  import { a as loadModule, i as loadConfiguredPolicy, n as asPolicy, s as pickNamed } from "./load-m7jmit3y.js";
14
- import { i as runSkillsInstall } from "./skills-CTKq3o8D.js";
14
+ import { i as runSkillsInstall } from "./skills-oZ8Ng2e7.js";
15
15
  import { i as withSchemaDefaults, n as schemaDefaults, r as schemaTables } from "./schema-tables-Ba9LE_XB.js";
16
- import { a as pd074, c as readSupabaseConfig, i as pd045, l as supabaseConfig, n as resolveSchemas, o as pd127, s as pd136, u as supabaseConfigName } from "./supabase-schemas-BglbAG2Z.js";
17
- import { d as activeSource, i as supabaseHookManifest, n as hooklessDatabase, p as attrsPlan, r as supabaseDatabaseManifest } from "./hook-sql-D-abRHut.js";
18
- import { i as pd039, t as hookOut } from "./supabase-hook-CqO_0Koh.js";
16
+ import { a as pd074, c as readSupabaseConfig, i as pd045, l as supabaseConfig, n as resolveSchemas, o as pd127, s as pd136, u as supabaseConfigName } from "./supabase-schemas-_ubYYw9i.js";
17
+ import { f as attrsPlan, i as supabaseHookManifest, n as hooklessDatabase, r as supabaseDatabaseManifest } from "./hook-sql-CbkH78FC.js";
18
+ import { i as pd039, t as hookOut } from "./supabase-hook-t1HnQf8U.js";
19
19
  import { t as parseCatalog } from "./parse-CUqZ_lLC.js";
20
20
  import { t as catalogPath } from "./catalog-path-bG0XxHMu.js";
21
21
  import { n as bsbActions, t as answerOf } from "./bsb-actions-BHiyBxQZ.js";
22
22
  import { c as outFiles } from "./output-files-8lfALMSU.js";
23
- import { a as guardedTables, r as unsatisfiedKinds, t as ownershipRules } from "./ownership-Csk9C3Js.js";
23
+ import { a as guardedTables, r as unsatisfiedKinds, t as ownershipRules } from "./ownership-DvmaGcup.js";
24
24
  import { n as MIGRATION_DIRS, t as DEFAULT_SENSITIVE_ACTIONS } from "./constants-PCJiir_3.js";
25
25
  import { n as membershipColumns, r as tableKey } from "./deciding-columns-DBZsrpdD.js";
26
26
  import { a as parseSqlFile, c as readPolicy$1, d as sqlCalls, f as stringValues, h as sqlStatements, l as readRelation, o as parseSqlLenient, p as group, r as functionArgTypes, s as parseSqlStatements, t as SqlSyntaxError } from "./ast-Dnm2TOHN.js";
27
27
  import { t as applyFiles } from "./files-DuV7wRim.js";
28
- import { o as splitIgnored } from "./verify-CKzngsUH.js";
28
+ import { o as splitIgnored } from "./verify-ZojGAC3f.js";
29
29
  import { a as updatedBaseline, i as readBaseline, n as baselineText, t as applyBaseline } from "./baseline-file-BQoki1O_.js";
30
- import { n as activeTenantMismatch, t as authorizationProvider } from "./provider-BV_v0JAY.js";
30
+ import { n as activeTenantMismatch, t as authorizationProvider } from "./provider-BwqzED5h.js";
31
31
  import { r as isRecord } from "./compact-C4LFuqbW.js";
32
32
  import "./authz-topic-D8x24Jv-.js";
33
- import { n as budgetBreaches, r as snapshotProbeOptions, t as breachText } from "./budgets-Dpumu_Dt.js";
33
+ import { n as activeSource } from "./memberships-CNoAlsma.js";
34
+ import { n as budgetBreaches, r as snapshotProbeOptions, t as breachText } from "./budgets-hi-ecgEd.js";
34
35
  import { a as nameOf, i as lineIndex, o as nodes, r as child, u as walk } from "./ast-CAOxvn9t.js";
35
36
  import { r as parseSync, t as createVisitor } from "./optional-CaQWp9HA.js";
36
37
  import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
37
38
  import { c as jsonSchemaOf, i as catalogOAuthScopes } from "./catalog-doc-D4g3nyFB.js";
38
- import { a as pd015, i as pd014, n as ADAPTER_SPECIFIERS, o as runtimeSpecifiers, r as pd001, t as runUsage } from "./usage-CW6xhRcV.js";
39
+ import { a as pd015, i as pd014, n as ADAPTER_SPECIFIERS, o as runtimeSpecifiers, r as pd001, t as runUsage } from "./usage-B8ca_Nj_.js";
39
40
  import { c as listPermissions, h as formerKeys } from "./permission-registry-DstT40VS.js";
40
- import { t as resolveNames } from "./resolve-names-Cth1UQ-8.js";
41
+ import { t as resolveNames } from "./resolve-names-xBg9s2IJ.js";
41
42
  import "./markers-C-kThnKN.js";
42
43
  import { i as qualifySqlTable, s as quoteSqlLiteral } from "./sql-T4GaBh9X.js";
43
44
  import { s as parseCredential } from "./credential-D9in5keC.js";
44
- import { u as separationConflicts } from "./policy-BBvhhH9X.js";
45
- import { O as validateCustomRole } from "./evaluate-Dmd0bShm.js";
46
- import { d as keptKeys, r as PERMDOCK_SCHEMA } from "./sources-DnjJPGfb.js";
47
- import { a as quoteIdent } from "./quote-BKrTBbcH.js";
45
+ import { u as separationConflicts } from "./policy-CZBJDcTx.js";
46
+ import { O as validateCustomRole } from "./evaluate-DNz6wMYv.js";
47
+ import { d as keptKeys, r as PERMDOCK_SCHEMA } from "./sources-C6Id63F8.js";
48
+ import { a as quoteIdent } from "./quote-LNaBdCGA.js";
48
49
  import { t as configProperty } from "./config-paths-CQvGng3k.js";
49
50
  import { o as hasConditionOp, u as isSqlFunctionField } from "./refs-Cix9Zjis.js";
50
51
  import { o as flattenGrantee } from "./grantee-BSCdpIF3.js";
51
52
  import { u as isPrincipalRelation } from "./resource-relations-Ck5sjYQR.js";
52
53
  import { t as operationCoverage } from "./coverage-C3jVYC9Y.js";
53
- import { a as snapshotSize, r as mostPrivilegedRole, t as SNAPSHOT_BUDGET_BYTES } from "./snapshot-size-2fkXbCkP.js";
54
+ import { a as snapshotSize, r as mostPrivilegedRole, t as SNAPSHOT_BUDGET_BYTES } from "./snapshot-size-NklqBKcV.js";
54
55
  import { a as taggedPolicyId, o as taggedPolicyIds } from "./bsb-access-Bcw6GrQm.js";
55
56
  import { t as membershipSourcesOf } from "./sources-BbSUNmFX.js";
56
- import { a as ownedObjects, i as inReservedDir, o as shownKey, r as generatedByPermdock, s as withoutOwned, t as policyModel } from "./model-BXhr8gUI.js";
57
- import { a as pd114, i as pd110, r as pd109 } from "./claims-size-BsSDVD5u.js";
57
+ import { a as ownedObjects, i as inReservedDir, o as shownKey, r as generatedByPermdock, s as withoutOwned, t as policyModel } from "./model-D0EKt-ED.js";
58
+ import { a as pd114, i as pd110, r as pd109 } from "./claims-size-BUhCWS88.js";
58
59
  import { t as importFromApp } from "./app-peer-BnMh5lqz.js";
59
- import { c as rlsReport, o as policiesFor } from "./report-DievqWhf.js";
60
+ import { c as rlsReport, o as policiesFor } from "./report-XdCm1y_J.js";
60
61
  import { a as scopeMembershipTable } from "./compile-BUKXrueE.js";
61
- import { a as powersyncOut, c as streamOf, i as powersyncFiles, n as staleFiles, o as roleSources, s as scopeSourcesOf } from "./powersync-CM6Vg4RH.js";
62
+ import { a as powersyncOut, c as streamOf, i as powersyncFiles, n as staleFiles, o as roleSources, s as scopeSourcesOf } from "./powersync-CTKfjnPT.js";
62
63
  import { t as parseProgram } from "./program-CvarkLMS.js";
63
- import { t as FIELD_VIEWS } from "./fields-y_PSRCyJ.js";
64
- import { n as restatedDefaults } from "./resolve-config-9NYYVc30.js";
64
+ import { t as FIELD_VIEWS } from "./fields-CwFej4gp.js";
65
+ import { n as restatedDefaults } from "./resolve-config-Cu_mE2wt.js";
65
66
  import { t as policyRowConditionKeys } from "./row-conditions-DwIJocfQ.js";
66
- import { J as policyBundle, Q as graphPlan, i as tableNames, r as tableNameOf } from "./tables-CDq0HVVq.js";
67
+ import { J as policyBundle, Q as graphPlan, i as tableNames, r as tableNameOf } from "./tables-Bxmf2beb.js";
67
68
  import { n as byKey } from "./compare-8SNJN-9U.js";
68
- import { a as tableFor, n as commandFor, o as unmappedActions, r as compileGrants, t as INFERRED_VERBS } from "./compile-BXKYYmT1.js";
69
- import { p as contextRefs } from "./rbac-mblGDx-Z.js";
70
- import { c as rowConditionMessage, o as helperTablePolicies, r as ROW_CONDITION_FIX } from "./helper-calls-DHvgN9tr.js";
71
- import { K as graphSqlName } from "./interactive-only-Dqww0ABO.js";
72
- import { t as CUSTOM_ROLES } from "./shared-C6_T7QUo.js";
69
+ import { a as tableFor, n as commandFor, o as unmappedActions, r as compileGrants, t as INFERRED_VERBS } from "./compile-nR1gQhXo.js";
70
+ import { p as contextRefs } from "./rbac-BRMnQ9Rl.js";
71
+ import { c as rowConditionMessage, o as helperTablePolicies, r as ROW_CONDITION_FIX } from "./helper-calls-B5MOl99d.js";
72
+ import { i as graphSqlName } from "./names-DBxKx2bz.js";
73
+ import { t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
73
74
  import { n as isSeeds } from "./seeds-Bs44UDS3.js";
74
75
  import { r as FIXTURES_PATH, s as seedPathsLine } from "./seed-sql-CjF7u0aX.js";
75
- import { i as buildContext, n as isRefusal, o as inheritTargets, t as generateOptions } from "./generate-options-DiR4r_sk.js";
76
+ import { i as buildContext, n as isRefusal, o as inheritTargets, t as generateOptions } from "./generate-options-BZ2nqy28.js";
76
77
  import { n as propertyKey } from "./edits-CqU8s2GC.js";
77
78
  import { n as legacyHelperNames, r as retirePlan, t as legacyHelperCalls } from "./retire-FN4aY6-n.js";
78
79
  import { t as supautilsRejections } from "./supautils-C85NuESf.js";
79
80
  import { t as MANIFEST_FILE } from "./manifest-json-DMaBWmcG.js";
80
- import { o as sharedFunctionsOf, r as manifestTableReads, t as committedManifest } from "./table-reads-AnHPrBp8.js";
81
+ import { r as manifestTableReads, s as sharedFunctionsOf, t as committedManifest } from "./table-reads-B7z40Yu-.js";
81
82
  import { isDeepStrictEqual } from "node:util";
82
83
  import { readFileSync } from "node:fs";
83
84
  import { dirname, join, resolve } from "node:path";
@@ -5326,8 +5327,18 @@ async function pd128(input) {
5326
5327
  */
5327
5328
  async function pd137(input) {
5328
5329
  const manifest = committedManifest(input.cwd);
5329
- const recorded = manifest?.rls.sharedFunctions;
5330
- if (manifest === void 0 || recorded === void 0 || recorded.length === 0) return [];
5330
+ if (manifest === void 0) return [];
5331
+ const twoArgument = (manifest.rls.permissionFilters ?? []).flatMap((filter) => {
5332
+ return (manifest.rls.tenantPureHelpers ?? []).some((helper) => helper.name === filter.name) ? [{
5333
+ code: "PD137",
5334
+ severity: "error",
5335
+ target: `${MANIFEST_FILE}:rls.permissionFilters:${filter.name}`,
5336
+ message: `${MANIFEST_FILE} lists ${filter.name} in rls.permissionFilters, but it takes a tenant argument, so the share key would not cover another tenant`,
5337
+ fix: "list the one-argument helper that reads the tenant from the token, or run permdock supabase inspect --out"
5338
+ }] : [];
5339
+ });
5340
+ const recorded = manifest.rls.sharedFunctions;
5341
+ if (recorded === void 0 || recorded.length === 0) return twoArgument;
5331
5342
  const reads = await manifestTableReads(input.cwd, input.config, manifest);
5332
5343
  const now = new Map(reads.map((read) => [read.table, read]));
5333
5344
  const valid = new Set((await sharedFunctionsOf({
@@ -5336,7 +5347,7 @@ async function pd137(input) {
5336
5347
  schema: manifest.rls.schema,
5337
5348
  tableReads: reads
5338
5349
  })).map((entry) => entry.function));
5339
- return recorded.flatMap((entry) => {
5350
+ return [...twoArgument, ...recorded.flatMap((entry) => {
5340
5351
  if (valid.has(entry.function)) return [];
5341
5352
  const rows = entry.tables.filter((table) => now.get(table)?.share !== "tenant");
5342
5353
  const why = rows.length > 0 ? `it reads ${rows.join(", ")}, which ${rows.length === 1 ? "is" : "are"} not a tenant table` : "the schema files no longer define it as a stable, security invoker SQL function that reads no caller";
@@ -5347,7 +5358,48 @@ async function pd137(input) {
5347
5358
  message: `${MANIFEST_FILE} lists ${entry.function} in rls.sharedFunctions, but ${why}`,
5348
5359
  fix: "run permdock supabase inspect --out to rewrite the list, or restore the function"
5349
5360
  }];
5350
- });
5361
+ })];
5362
+ }
5363
+ // src/cli/doctor/truncated-users.ts
5364
+ /** The most users PD138 mints a token for. */
5365
+ const TRUNCATED_USERS_SAMPLE = 5e3;
5366
+ /**
5367
+ * PD138: with a database URL, how many users the hook's budget truncates. It
5368
+ * runs the hook for up to {@link TRUNCATED_USERS_SAMPLE} users of `auth.users`
5369
+ * inside a transaction it rolls back, and counts the tokens that carry
5370
+ * `memberships_truncated`. Those users take the database path for every
5371
+ * request, which the shared cache cannot serve with a share key.
5372
+ */
5373
+ async function pd138(project) {
5374
+ const { database } = project;
5375
+ const hook = project.config.supabase?.hook;
5376
+ if (database === void 0 || hook === void 0) return [];
5377
+ const schema = hook.schema ?? project.config.rls?.schema ?? "permdock";
5378
+ const fn = `${quoteIdent(schema)}.custom_access_token_hook`;
5379
+ const client = await database.connect(database.url);
5380
+ try {
5381
+ await client.query("begin", []);
5382
+ try {
5383
+ const result = await client.query(`select count(*)::int as users,
5384
+ count(*) filter (where ${fn}(jsonb_build_object('user_id', u.id, 'claims', '{}'::jsonb)) -> 'claims' ->> 'memberships_truncated' = 'true')::int as truncated
5385
+ from (select id from auth.users order by id limit $1) u`, [TRUNCATED_USERS_SAMPLE]);
5386
+ const users = Number(result.rows[0]?.["users"] ?? 0);
5387
+ const truncated = Number(result.rows[0]?.["truncated"] ?? 0);
5388
+ if (truncated === 0) return [];
5389
+ const budget = hook.budget ?? 1024;
5390
+ return [{
5391
+ code: "PD138",
5392
+ severity: "info",
5393
+ target: "supabase.hook.budget",
5394
+ message: `the ${String(budget)} byte budget truncates the memberships of ${String(truncated)} of ${String(users)} users${users === TRUNCATED_USERS_SAMPLE ? " sampled" : ""}; each of them reads the database on every request and gets a share key only for the active tenant`,
5395
+ fix: "raise supabase.hook.budget, or leave it: the token stays under the cookie limit and claimsFirst reads the sources for these users"
5396
+ }];
5397
+ } finally {
5398
+ await client.query("rollback", []);
5399
+ }
5400
+ } finally {
5401
+ await client.end();
5402
+ }
5351
5403
  }
5352
5404
  const DOCTOR_CHECKS = [
5353
5405
  {
@@ -6014,6 +6066,13 @@ const DOCTOR_CHECKS = [
6014
6066
  groups: ["supabase", "rls"],
6015
6067
  run: pd124
6016
6068
  },
6069
+ {
6070
+ code: "PD138",
6071
+ database: true,
6072
+ groups: ["supabase", "performance"],
6073
+ when: (config) => config.supabase?.hook !== void 0,
6074
+ run: pd138
6075
+ },
6017
6076
  {
6018
6077
  code: "PD120",
6019
6078
  groups: ["project"],
@@ -11,7 +11,7 @@ const doctor = defineLeaf({
11
11
  description: "Check codes or groups to run",
12
12
  valueHint: "code",
13
13
  async complete() {
14
- const { DOCTOR_CHECKS } = await import("./doctor-ervtBRzG.js");
14
+ const { DOCTOR_CHECKS } = await import("./doctor-Bn5OPJMB.js");
15
15
  return [.../* @__PURE__ */ new Set([...DOCTOR_CHECKS.map(({ code }) => code), ...DOCTOR_CHECKS.flatMap(({ groups }) => groups)])];
16
16
  }
17
17
  },
@@ -46,7 +46,7 @@ const doctor = defineLeaf({
46
46
  if (answer === void 0) return CANCELLED;
47
47
  fix = answer;
48
48
  }
49
- return (await import("./doctor-ervtBRzG.js")).runDoctor({
49
+ return (await import("./doctor-Bn5OPJMB.js")).runDoctor({
50
50
  cwd: ctx.cwd,
51
51
  config: ctx.config,
52
52
  only: flags.only,
@@ -1,7 +1,7 @@
1
- import { Nr as Condition, Or as Subject, qt as Instant } from "../policy-types-CfW4X_yX.js";
1
+ import { Ar as Subject, Fr as Condition, qt as Instant } from "../policy-types-BnBZvh7N.js";
2
2
  import { n as RowCheck, t as WithSubjectOptions } from "../subject-settings-C9F1sU1d.js";
3
- import { p as WhereResult } from "../permdock-BShHM8OJ.js";
4
- import { s as MembershipsMapping } from "../compile-tG1zkSgX.js";
3
+ import { p as WhereResult } from "../permdock-V86uejcm.js";
4
+ import { s as MembershipsMapping } from "../compile-DNgpHgcK.js";
5
5
  import { r as RelationsMapping } from "../graph-sql-Ds3nbevr.js";
6
6
  import { SQL, Table } from "drizzle-orm";
7
7
  /**
@@ -1,9 +1,9 @@
1
- import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-C2XX60aF.js";
2
- import { a as PermDock } from "../permdock-BShHM8OJ.js";
1
+ import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-BlMijUtb.js";
2
+ import { a as PermDock } from "../permdock-V86uejcm.js";
3
3
  import { w as Permission } from "../vocabulary-DHfKPIC5.js";
4
- import { D as Policy, Er as Principal, N as PolicyVocabulary } from "../policy-types-CfW4X_yX.js";
4
+ import { D as Policy, N as PolicyVocabulary, Or as Principal } from "../policy-types-BnBZvh7N.js";
5
5
  import { n as RevocationFeed } from "../revocations-ku_f2d2y.js";
6
- import { t as ServerAdapterOptions } from "../bind-zQacwAOg.js";
6
+ import { t as ServerAdapterOptions } from "../bind-Bwk9tt1z.js";
7
7
  import { Elysia } from "elysia";
8
8
  type ElysiaRequestContext = {
9
9
  readonly request: Request;
@@ -1,5 +1,5 @@
1
1
  import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
2
- import { a as socketConnection, i as decorate, r as bindKernel } from "../bind-BYeoLJgN.js";
2
+ import { a as socketConnection, i as decorate, r as bindKernel } from "../bind-DPptdk31.js";
3
3
  import { a as parsedBody, r as hasCredentials } from "../http-C9jDw_bZ.js";
4
4
  import { t as problemFromError } from "../map-error-DYQbf-3Q.js";
5
5
  import { a as onRevoked, n as closeReason, t as POLICY_VIOLATION } from "../stream-DdF94h7T.js";
@@ -1,4 +1,4 @@
1
- import { En as WireDenial, Or as Subject, nr as Decision } from "./policy-types-CfW4X_yX.js";
1
+ import { Ar as Subject, On as WireDenial, ir as Decision } from "./policy-types-BnBZvh7N.js";
2
2
  import { StandardSchemaV1 } from "@standard-schema/spec";
3
3
  type Disclosure = "hide" | "reveal";
4
4
  /**
@@ -15,7 +15,7 @@ import { a as isRole, r as findRole } from "./vocabulary-CE2k7s1a.js";
15
15
  import { a as interactiveOnlyRefuses, c as evaluateCondition, i as delegatedPermissions, n as coveredByDelegation, o as readOnlyActorRefuses, r as coversRequirements, s as requiresStandIn } from "./delegation-0DVVomzu.js";
16
16
  import { n as resolveRelated } from "./relation-walk-BlWy9gBK.js";
17
17
  import { n as isThenable, t as ignoreRejection } from "./thenable-BxMy2v8w.js";
18
- import { d as soleRole, i as grantList, n as declaredRoleNames, s as levelCondition } from "./policy-BBvhhH9X.js";
18
+ import { d as soleRole, i as grantList, n as declaredRoleNames, s as levelCondition } from "./policy-CZBJDcTx.js";
19
19
  import { n as rowIdOf, r as rowValues, t as isRowPair } from "./row-pair-CxEhErJU.js";
20
20
  import { t as requiresApproval } from "./approval-required-B-R4Yw3J.js";
21
21
  import { i as readAppData } from "./app-data-DbSPSPIl.js";
@@ -1,6 +1,6 @@
1
- import { m as ApprovalStore } from "./types-vKKndyxx.js";
2
- import { a as PermDock } from "./permdock-BShHM8OJ.js";
3
- import { D as Policy } from "./policy-types-CfW4X_yX.js";
1
+ import { m as ApprovalStore } from "./types-5cvjmHTG.js";
2
+ import { a as PermDock } from "./permdock-V86uejcm.js";
3
+ import { D as Policy } from "./policy-types-BnBZvh7N.js";
4
4
  /** AuthZEN 1.0 section 7.1.2.1 `options.evaluations_semantic` values. */
5
5
  declare const EVALUATIONS_SEMANTICS: readonly ["execute_all", "deny_on_first_deny", "permit_on_first_permit"];
6
6
  type EvaluationsSemantic = (typeof EVALUATIONS_SEMANTICS)[number];
@@ -1,4 +1,4 @@
1
- import { t as fromSnapshot } from "./from-snapshot-DGc9W4QU.js";
1
+ import { t as fromSnapshot } from "./from-snapshot-DZ4D2sLa.js";
2
2
  // src/client/evaluator-eager.ts
3
3
  /** The evaluator in the entry itself, for adapters that render without Suspense. */
4
4
  const eagerEvaluator = {
@@ -0,0 +1,2 @@
1
+ export { t as buildInstance } from "./from-snapshot-DZ4D2sLa.js";
2
+ import "./evaluator-BvRk9kiK.js";
@@ -1,8 +1,8 @@
1
- import { o as AgentAdapterOptions, t as AgentPermDock } from "../create-B7Xa4jSQ.js";
2
- import { u as ApprovalRequest } from "../types-vKKndyxx.js";
3
- import { a as PermDock } from "../permdock-BShHM8OJ.js";
1
+ import { o as AgentAdapterOptions, t as AgentPermDock } from "../create-CdB9FCZh.js";
2
+ import { u as ApprovalRequest } from "../types-5cvjmHTG.js";
3
+ import { a as PermDock } from "../permdock-V86uejcm.js";
4
4
  import { w as Permission } from "../vocabulary-DHfKPIC5.js";
5
- import { D as Policy, Er as Principal, N as PolicyVocabulary } from "../policy-types-CfW4X_yX.js";
5
+ import { D as Policy, N as PolicyVocabulary, Or as Principal } from "../policy-types-BnBZvh7N.js";
6
6
  /** Structural `SessionAuthContext` from `eve`. */
7
7
  type EvePrincipal = {
8
8
  readonly principalId: string;