permdock 0.31.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 (390) hide show
  1. package/dist/a2a/index.d.ts +4 -4
  2. package/dist/a2a/index.js +2 -2
  3. package/dist/{adoption-scan-9brJ_mUG.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-C0bltfjv.js → arazzo-BUXKjylF.js} +1 -1
  14. package/dist/{arazzo-Cs-3yoxR.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 +57 -14
  23. package/dist/better-supabase/index.js +29 -20
  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-B1TBUQLj.js → bsb-access-tags-Nv4nDQ2U.js} +20 -44
  27. package/dist/{bsb-action-keys-iKmZChtQ.js → bsb-action-keys-CYEREFMg.js} +1 -1
  28. package/dist/{budgets-Dpumu_Dt.js → budgets-hi-ecgEd.js} +3 -3
  29. package/dist/{build-instance-CFiegi_w.js → build-instance-DZEWYO-A.js} +1 -1
  30. package/dist/bundle-size-BRFeBvuv.js +1 -0
  31. package/dist/{bundle-size-Ddhv_H_v.js → bundle-size-DbXV65Ix.js} +2 -2
  32. package/dist/{capability-BPzseilU.d.ts → capability-qoD_jlcI.d.ts} +1 -1
  33. package/dist/{casbin-s6_zDJi1.js → casbin-CM9mWO1V.js} +1 -1
  34. package/dist/{casbin-DGsO-QmR.js → casbin-qEW6RfXA.js} +1 -1
  35. package/dist/catalog/index.d.ts +4 -4
  36. package/dist/catalog/index.js +4 -4
  37. package/dist/{challenge-CRB1X3Ry.js → challenge-E9sicsCA.js} +1 -1
  38. package/dist/chat/index.d.ts +1 -1
  39. package/dist/chat/index.js +1 -1
  40. package/dist/chat-sdk/index.d.ts +3 -3
  41. package/dist/{claims-size-BsSDVD5u.js → claims-size-BUhCWS88.js} +18 -3
  42. package/dist/claims-size-C6oKGuOM.js +1 -0
  43. package/dist/claude-agent/index.d.ts +3 -3
  44. package/dist/claude-agent/index.js +2 -2
  45. package/dist/clerk/index.d.ts +2 -2
  46. package/dist/cli/bin.js +1 -1
  47. package/dist/cli/generate/watch-worker.js +2 -2
  48. package/dist/cli/index.d.ts +6 -6
  49. package/dist/cli/index.js +3 -3
  50. package/dist/cli/plugins/app.d.ts +1 -1
  51. package/dist/cli/plugins/app.js +1 -1
  52. package/dist/cli/plugins/better-supabase.d.ts +1 -1
  53. package/dist/cli/plugins/openapi.d.ts +1 -1
  54. package/dist/cli/plugins/openapi.js +1 -1
  55. package/dist/cli/plugins/powersync.d.ts +1 -1
  56. package/dist/cli/plugins/powersync.js +1 -1
  57. package/dist/cli/plugins/rls.d.ts +2 -2
  58. package/dist/cli/plugins/rls.js +1 -1
  59. package/dist/cli/plugins/schemas.d.ts +1 -1
  60. package/dist/cli/plugins/schemas.js +1 -1
  61. package/dist/cli/plugins/scim.d.ts +2 -2
  62. package/dist/cli/plugins/supabase-hook.d.ts +2 -2
  63. package/dist/cli/plugins/supabase-hook.js +1 -1
  64. package/dist/cli/plugins/supabase.d.ts +3 -3
  65. package/dist/cli/plugins/supabase.js +2 -2
  66. package/dist/cli/plugins/ui.d.ts +1 -1
  67. package/dist/cli/plugins/ui.js +1 -1
  68. package/dist/{client-subject-BOPbpwgm.d.ts → client-subject-Dzo49nco.d.ts} +2 -2
  69. package/dist/cloud/index.d.ts +8 -8
  70. package/dist/cloud/index.js +1 -1
  71. package/dist/{cloud-fRv3j6sq.js → cloud-CNGblWX0.js} +2 -2
  72. package/dist/{codemod-DT0dMVdd.js → codemod-BtJFcsD7.js} +8 -7
  73. package/dist/{codemod-DsqEKP6A.js → codemod-Dlhxov9D.js} +14 -11
  74. package/dist/{collect-CCgmm5xN.js → collect-CE5wK0AX.js} +1 -1
  75. package/dist/compile/index.d.ts +1 -1
  76. package/dist/{compile-tG1zkSgX.d.ts → compile-DNgpHgcK.d.ts} +2 -2
  77. package/dist/{compile-DNVVdVWs.js → compile-nR1gQhXo.js} +10 -9
  78. package/dist/{completion-DrJkWgZa.js → completion-BIN9YXIe.js} +1 -1
  79. package/dist/{config-D8iWeV9k.js → config-7QvEq57a.js} +2 -2
  80. package/dist/{config-BaKkd6HB.js → config-CoYhD6ur.js} +1 -1
  81. package/dist/{config-report-uuD5eVEn.js → config-report-D_L1HXDb.js} +3 -3
  82. package/dist/{context-Ne0EdD45.js → context-D8tN3SZm.js} +1 -1
  83. package/dist/{context-BQHKgT1m.js → context-Nr3nknZX.js} +2 -2
  84. package/dist/convex/index.d.ts +4 -4
  85. package/dist/convex/index.js +2 -2
  86. package/dist/{core-C5yCD-Ls.js → core-DIUrkFNL.js} +5 -5
  87. package/dist/{core-bf8qgaZf.d.ts → core-DPuDmlbL.d.ts} +2 -2
  88. package/dist/{create-Cn5EpEez.d.ts → create-BKrKxipb.d.ts} +4 -4
  89. package/dist/{create-COQVXK6C.js → create-BMRnaZel.js} +3 -3
  90. package/dist/{create-nOWD3Joc.js → create-BRY0OtFV.js} +3 -3
  91. package/dist/{create-B7Xa4jSQ.d.ts → create-CdB9FCZh.d.ts} +7 -7
  92. package/dist/{create-DHA0fhmi.d.ts → create-CdbVXh5I.d.ts} +6 -6
  93. package/dist/{credentials-COT-cjnP.d.ts → credentials-Dl0-R2aB.d.ts} +2 -2
  94. package/dist/{custom-role-rebuild-BBKC7Bt1.js → custom-role-rebuild-wzN8pqDk.js} +5 -5
  95. package/dist/{define-permdock-DBgwTFi1.d.ts → define-permdock-4IkoNaB3.d.ts} +6 -6
  96. package/dist/{define-permdock-D7aKxIax.js → define-permdock-CO7YNrOF.js} +2 -2
  97. package/dist/{definition-options-9o8Hdww3.js → definition-options-DO0kIrB9.js} +7 -1
  98. package/dist/delivery/index.d.ts +4 -4
  99. package/dist/delivery/index.js +1 -1
  100. package/dist/{denied-text-C_AWc0f0.d.ts → denied-text-CllTzVJM.d.ts} +1 -1
  101. package/dist/{describe-AdETpWsn.d.ts → describe-FT1oVN_o.d.ts} +1 -1
  102. package/dist/{diff-CW9eZy9X.js → diff-CS8ks9h3.js} +1 -1
  103. package/dist/{diff-COdwpP31.js → diff-CkSZF7LO.js} +2 -2
  104. package/dist/{doctor-C1T2G2mn.js → doctor-Bn5OPJMB.js} +131 -44
  105. package/dist/{doctor-Ch4VGl2q.js → doctor-C9lLeLp2.js} +2 -2
  106. package/dist/drizzle/index.d.ts +3 -3
  107. package/dist/elysia/index.d.ts +4 -4
  108. package/dist/elysia/index.js +1 -1
  109. package/dist/{errors-COoiWqIs.d.ts → errors-BGosrHl8.d.ts} +1 -1
  110. package/dist/{evaluate-Dmd0bShm.js → evaluate-DNz6wMYv.js} +1 -1
  111. package/dist/{evaluations-GW9j_ARq.d.ts → evaluations-CaXNkxTp.d.ts} +3 -3
  112. package/dist/{evaluator-eager-CpVYslzY.js → evaluator-eager-BLNVbEAC.js} +1 -1
  113. package/dist/evaluator-zpeC7zel.js +2 -0
  114. package/dist/eve/index.d.ts +4 -4
  115. package/dist/eve/index.js +2 -2
  116. package/dist/{execute-BhWXiQAy.js → execute-DsHFIBuO.js} +4 -4
  117. package/dist/{explain-DRC9V5Qb.js → explain-D4ipf8IH.js} +1 -1
  118. package/dist/{explain-jg0KLCVt.js → explain-DISCeeYS.js} +2 -2
  119. package/dist/express/index.d.ts +4 -4
  120. package/dist/express/index.js +1 -1
  121. package/dist/fastify/index.d.ts +4 -4
  122. package/dist/fastify/index.js +1 -1
  123. package/dist/{fetch-adapter-CU1DIkXu.js → fetch-adapter-BXQc4NoV.js} +1 -1
  124. package/dist/{fetch-adapter-CJncmsPg.d.ts → fetch-adapter-Dci9NnyZ.d.ts} +2 -2
  125. package/dist/{fields-y_PSRCyJ.js → fields-CwFej4gp.js} +3 -3
  126. package/dist/{from-snapshot-DGc9W4QU.js → from-snapshot-DZ4D2sLa.js} +14 -9
  127. package/dist/gen-CpS9JkCb.js +1 -0
  128. package/dist/{gen-CGjbD8I_.js → gen-Fi4GcvIY.js} +3 -3
  129. package/dist/{gen-kind-thoT0NYV.js → gen-kind-DR2-to9P.js} +1 -1
  130. package/dist/{generate-eor7vXGN.js → generate-BSD_eI61.js} +22 -17
  131. package/dist/{generate-vEW8Brg8.js → generate-QEHCJSyv.js} +3 -3
  132. package/dist/{generate-options-MJgn0dgl.js → generate-options-BZ2nqy28.js} +14 -13
  133. package/dist/h3/index.d.ts +4 -4
  134. package/dist/h3/index.js +2 -2
  135. package/dist/{helper-calls-DHvgN9tr.js → helper-calls-B5MOl99d.js} +1 -1
  136. package/dist/hono/index.d.ts +4 -4
  137. package/dist/hono/index.js +1 -1
  138. package/dist/{hook-sql-DJQ_yOEC.js → hook-sql-CbkH78FC.js} +267 -223
  139. package/dist/{hosted-Bkw3Oyh-.d.ts → hosted-BISipW6F.d.ts} +1 -1
  140. package/dist/{hosted-DZwCFrcy.js → hosted-D3USbpS6.js} +1 -1
  141. package/dist/{import-D_8tLF9g.js → import-Bz6IKoMM.js} +3 -3
  142. package/dist/{import-CGQIK3iN.js → import-DppjSugv.js} +1 -1
  143. package/dist/{index-DT3hOxA7.d.ts → index-BDJ2OZvV.d.ts} +34 -11
  144. package/dist/{index-Kj5S3IWE.d.ts → index-BF4IlvkT.d.ts} +4 -4
  145. package/dist/{index-DWmIuQLz.d.ts → index-BO5f180f.d.ts} +4 -4
  146. package/dist/{index-WOx7TBbj.d.ts → index-CWwWkz10.d.ts} +2 -2
  147. package/dist/{index-xShPsK8G.d.ts → index-Co_e22iJ.d.ts} +1 -1
  148. package/dist/{index-DPVeDtAO.d.ts → index-giCl-aQY.d.ts} +4 -4
  149. package/dist/index.d.ts +16 -16
  150. package/dist/index.js +13 -13
  151. package/dist/{init-C6te_dSg.js → init-BOYIObRF.js} +3 -3
  152. package/dist/{init-DN19mlwE.js → init-DJYSpo-H.js} +1 -1
  153. package/dist/inspect-functions-CwEAQpVF.js +34 -0
  154. package/dist/{instance-options-DQCiBBuz.d.ts → instance-options-hq5Cp2Ih.d.ts} +1 -1
  155. package/dist/{instance-snapshot-D9kjL37B.js → instance-snapshot-D03srwnf.js} +9 -8
  156. package/dist/{interactive-only-BjYwp9mm.js → interactive-only-Bbq9e61G.js} +27 -182
  157. package/dist/jwt/index.d.ts +4 -4
  158. package/dist/{kernel-C5akxw5n.js → kernel-DSnWVZ0O.js} +5 -5
  159. package/dist/{keys-qFqDoYeF.js → keys-U2V0maaq.js} +1 -1
  160. package/dist/kysely/index.d.ts +3 -3
  161. package/dist/{lazy-provider-CMgFAGf8.d.ts → lazy-provider-W8KwlWJU.d.ts} +1 -1
  162. package/dist/{lazy-provider-DNVjY4n3.js → lazy-provider-b8UHGi8P.js} +2 -2
  163. package/dist/{login-BYXaH_yT.js → login-Dv8TFykx.js} +1 -1
  164. package/dist/{login-CMzfsdm8.js → login-xgjt0a5o.js} +3 -3
  165. package/dist/{manager-chain-CStuYb7A.js → manager-chain-FggG63qD.js} +2 -2
  166. package/dist/{manifest-CowZuywo.js → manifest-BUeAHWDT.js} +45 -38
  167. package/dist/{manifest-CA3E0KP8.d.ts → manifest-BwhZ1s5b.d.ts} +71 -2
  168. package/dist/{manifest-DdNYR_pl.js → manifest-CIWOmdlP.js} +1 -1
  169. package/dist/{manifest-schema-CLbcbDz7.js → manifest-schema-N3v2RVL-.js} +68 -1
  170. package/dist/{may-use-4HzzgYJ3.js → may-use-ikNCnNgZ.js} +1 -1
  171. package/dist/mcp/index.d.ts +8 -8
  172. package/dist/mcp/index.js +2 -2
  173. package/dist/measure-DZtly0oE.js +272 -0
  174. package/dist/membership-claim-sql-DGfhIn__.js +33 -0
  175. package/dist/{membership-filter-C7ZuhAqJ.js → membership-filter-Bz9QX6E9.js} +1 -1
  176. package/dist/memberships-4e6qi8Uv.js +1 -0
  177. package/dist/memberships-CNoAlsma.js +180 -0
  178. package/dist/{migrate-pg-lkbDu.js → migrate-BXk_rUmb.js} +2 -2
  179. package/dist/{model-BqHWwfcg.js → model-D0EKt-ED.js} +3 -3
  180. package/dist/names-DBxKx2bz.js +182 -0
  181. package/dist/nest/index.d.ts +4 -4
  182. package/dist/nest/index.js +1 -1
  183. package/dist/next/index.d.ts +12 -11
  184. package/dist/next/index.js +4 -3
  185. package/dist/next/plugin.d.ts +1 -1
  186. package/dist/next/plugin.js +1 -1
  187. package/dist/node/index.d.ts +4 -4
  188. package/dist/node/index.js +1 -1
  189. package/dist/openai/index.d.ts +4 -4
  190. package/dist/openai/index.js +3 -3
  191. package/dist/openapi/index.d.ts +2 -2
  192. package/dist/{openapi-BP7YpJeF.js → openapi-Bfakk4cF.js} +1 -1
  193. package/dist/{openapi-document-_QSOtSKS.js → openapi-document-ZWpur4f1.js} +1 -1
  194. package/dist/{openapi-Dsh0MDSZ.js → openapi-g58VVrsc.js} +2 -2
  195. package/dist/orpc/index.d.ts +5 -5
  196. package/dist/orpc/index.js +2 -2
  197. package/dist/otel/index.d.ts +3 -3
  198. package/dist/{output-Didy9Ys4.js → output-D4FLF3_v.js} +1 -1
  199. package/dist/{ownership-CG5_N8b5.js → ownership-DvmaGcup.js} +13 -9
  200. package/dist/{parse-local-manifest-B92rFWnk.d.ts → parse-local-manifest-AJWs3pkW.d.ts} +1 -1
  201. package/dist/pdp/index.d.ts +3 -3
  202. package/dist/pdp/index.js +1 -1
  203. package/dist/{permdock-CJPIwU1T.js → permdock-JM9TKevZ.js} +14 -14
  204. package/dist/{permdock-BShHM8OJ.d.ts → permdock-V86uejcm.d.ts} +2 -2
  205. package/dist/{permissions-wEkTVr_I.js → permissions-xPyAmuXi.js} +1 -1
  206. package/dist/{pipeline-B4iyaOK7.js → pipeline-DCERGTTY.js} +2 -2
  207. package/dist/{plugin-DQJuZVl1.d.ts → plugin-BnvEp5tS.d.ts} +2 -2
  208. package/dist/{policy-BBvhhH9X.js → policy-CZBJDcTx.js} +2 -1
  209. package/dist/{policy-BUtwixSN.d.ts → policy-DZORR-Fw.d.ts} +1 -1
  210. package/dist/{policy-hnVT4MC4.js → policy-DoHkOOTQ.js} +1 -1
  211. package/dist/{policy-bundle-BIDV0DZF.js → policy-bundle-CsnNAo-n.js} +3 -3
  212. package/dist/{policy-from-catalog-_zwn1sNj.js → policy-from-catalog-BohzTN3J.js} +3 -3
  213. package/dist/{policy-types-CfW4X_yX.d.ts → policy-types-BnBZvh7N.d.ts} +50 -1
  214. package/dist/{postgrest-PQ3zAOD2.d.ts → postgrest-BG0ipED3.d.ts} +9 -2
  215. package/dist/{powersync-_2ElzOhQ.js → powersync-CTKfjnPT.js} +12 -12
  216. package/dist/{powersync-D7YfMHke.js → powersync-Cz3MUw6R.js} +1 -1
  217. package/dist/{powersync-DUvN9v5a.js → powersync-Dbpn-n0o.js} +1 -1
  218. package/dist/prisma/index.d.ts +2 -2
  219. package/dist/{protected-action-BPN0NaRb.js → protected-action-DDYvU-9Z.js} +1 -1
  220. package/dist/{protected-action-DhCQ4bSe.d.ts → protected-action-aGL_gT4j.d.ts} +5 -5
  221. package/dist/{provider-D1vlNPWo.js → provider-BwqzED5h.js} +100 -52
  222. package/dist/{provider-1xqxLVEz.js → provider-NQwLSlgb.js} +2 -2
  223. package/dist/{provider-CMgFAGf8.d.ts → provider-W8KwlWJU.d.ts} +1 -1
  224. package/dist/{provider-store-Cf8HRNtb.js → provider-store-BizF6jyu.js} +2 -2
  225. package/dist/{provider-with-cpL9vRjC.js → provider-with-DtBgCCV_.js} +1 -1
  226. package/dist/{prune-config-5vtQpiLk.js → prune-config--x-cEF8G.js} +6 -6
  227. package/dist/{pull-BnxZmo3f.js → pull-BQELP7aV.js} +2 -2
  228. package/dist/pull-C_ZiPZ5X.js +1 -0
  229. package/dist/{push-Bu0uCkJg.js → push-D5so0ptb.js} +2 -2
  230. package/dist/{pushed-policy-DcvO8NXy.d.ts → pushed-policy-CQaXRDe3.d.ts} +1 -1
  231. package/dist/{pushed-policy-DSjSWEAl.js → pushed-policy-dm_hFstN.js} +1 -1
  232. package/dist/{quote-BKrTBbcH.js → quote-LNaBdCGA.js} +1 -1
  233. package/dist/{rbac-CwcucZPx.js → rbac-BRMnQ9Rl.js} +5 -4
  234. package/dist/react/index.d.ts +6 -6
  235. package/dist/react/index.js +3 -3
  236. package/dist/react/lazy.d.ts +6 -6
  237. package/dist/react/lazy.js +3 -3
  238. package/dist/react/provider-client-lazy.d.ts +1 -1
  239. package/dist/react/provider-client-lazy.js +1 -1
  240. package/dist/react/provider-client.d.ts +1 -1
  241. package/dist/react/provider-client.js +1 -1
  242. package/dist/react-native/index.d.ts +8 -8
  243. package/dist/react-native/index.js +5 -5
  244. package/dist/read-memberships-DVBitJZG.js +164 -0
  245. package/dist/{rename-CLoDRrbc.js → rename-BjP2CFUY.js} +5 -5
  246. package/dist/replay-Dg5-l7xu.d.ts +3 -0
  247. package/dist/report-DF0zUNut.js +1 -0
  248. package/dist/{report-BI_hek_d.js → report-XdCm1y_J.js} +76 -6
  249. package/dist/{request-context-BNVY3kZ1.js → request-context-CqqdiVp4.js} +1 -1
  250. package/dist/resend/index.d.ts +4 -4
  251. package/dist/{resolve-config-9NYYVc30.js → resolve-config-Cu_mE2wt.js} +1 -1
  252. package/dist/{resolve-names-CTji5IPe.js → resolve-names-xBg9s2IJ.js} +7 -6
  253. package/dist/{resolver-CuIY8aFD.js → resolver-C_a-bddD.js} +99 -15
  254. package/dist/{rls-UY6p6ztg.js → rls-BzCz7ZV0.js} +55 -3
  255. package/dist/{rls-files-CDZdTh8v.js → rls-files-Bu0O7cZ6.js} +1 -1
  256. package/dist/{rls-options-BgD-KZkm.d.ts → rls-options-f1wRhXSG.d.ts} +1 -1
  257. package/dist/{rls-BPHCyA5v.js → rls-rk-QH4fc.js} +22 -12
  258. package/dist/{rpc-D7G7IJDa.js → rpc-BQPa7tLP.js} +1 -1
  259. package/dist/{rpc-COnquydd.d.ts → rpc-DyCWVn6C.d.ts} +1 -1
  260. package/dist/run-BvtApZDp.js +1 -0
  261. package/dist/{run-C3ztA88m.js → run-DTz-e3Od.js} +3 -3
  262. package/dist/{run-ticket-Mmor5sYW.d.ts → run-ticket-mVPqm6M6.d.ts} +2 -2
  263. package/dist/{saas-DcqUkynn.js → saas-DSeazNrN.js} +3 -3
  264. package/dist/{scan-m5m1M6Qn.js → scan-Cn79IAJs.js} +1 -1
  265. package/dist/{schema-BpGuLrwk.js → schema-CbzVUpWv.js} +1 -1
  266. package/dist/scim/index.d.ts +1 -1
  267. package/dist/seeds/index.d.ts +1 -1
  268. package/dist/{seeds-Cih1ztkf.d.ts → seeds-DLjPbhvM.d.ts} +1 -1
  269. package/dist/server/index.d.ts +11 -11
  270. package/dist/server/index.js +1 -1
  271. package/dist/{server-types-C2XX60aF.d.ts → server-types-BlMijUtb.d.ts} +8 -8
  272. package/dist/share-key-claims-CZGAeVqa.js +28 -0
  273. package/dist/{shared-C6_T7QUo.js → shared-DnVY767H.js} +2 -1
  274. package/dist/{sink-BQ_6K81r.d.ts → sink-DhrVLPSJ.d.ts} +2 -2
  275. package/dist/{size-l1pDHE2z.js → size-CY6rK6l9.js} +3 -3
  276. package/dist/{skills-BytzDi34.js → skills-BKrN1qej.js} +1 -1
  277. package/dist/{skills-CzhnDo-C.js → skills-oZ8Ng2e7.js} +1 -1
  278. package/dist/{snapshot-Ty0uk9wZ.js → snapshot-Dzi4LR6n.js} +8 -1
  279. package/dist/{snapshot-cache-DGvLQW0-.d.ts → snapshot-cache-CVYqOThu.d.ts} +1 -1
  280. package/dist/{snapshot-compact-yXFxZLPo.js → snapshot-compact-BWMLnIXK.js} +35 -4
  281. package/dist/{snapshot-evaluate-DSNj2rhV.js → snapshot-evaluate-C382Z1mQ.js} +1 -1
  282. package/dist/{snapshot-reads-BnAHiuoa.js → snapshot-reads-JxcUSUfW.js} +2 -2
  283. package/dist/{snapshot-size-DNY1MTsV.js → snapshot-size-D6ixbYvH.js} +1 -1
  284. package/dist/{snapshot-size-2fkXbCkP.js → snapshot-size-NklqBKcV.js} +1 -1
  285. package/dist/solid/index.d.ts +5 -5
  286. package/dist/solid/index.js +2 -2
  287. package/dist/solid-start/index.d.ts +4 -4
  288. package/dist/solid-start/index.js +2 -2
  289. package/dist/{sources-D5n28164.d.ts → sources-Bq7k7g34.d.ts} +7 -2
  290. package/dist/{sources-DnjJPGfb.js → sources-C6Id63F8.js} +2 -1
  291. package/dist/{src-HRYn4UFj.js → src-BXDohWNO.js} +154 -11
  292. package/dist/ssf/index.d.ts +3 -3
  293. package/dist/{standard-webhooks-Bnnrqa6d.d.ts → standard-webhooks-D6SPYjSQ.d.ts} +2 -2
  294. package/dist/{store-core-BdFcruPm.d.ts → store-core-Bq7Qc9QM.d.ts} +4 -4
  295. package/dist/{store-options-DpCQo0vB.js → store-options-DgOuhUSn.js} +4 -4
  296. package/dist/{stores-D6MIjN_-.d.ts → stores-Dn7TpQFa.d.ts} +5 -5
  297. package/dist/{stores-KpBCaY6c.js → stores-jgDndNHa.js} +1 -1
  298. package/dist/{subject-CrldGifz.js → subject-B7p94Y0s.js} +1 -1
  299. package/dist/{subject-cache-CnJcz2K_.d.ts → subject-cache-UKUgQCEX.d.ts} +3 -1
  300. package/dist/supabase/index.d.ts +36 -9
  301. package/dist/supabase/index.js +8 -7
  302. package/dist/supabase/middleware.d.ts +5 -5
  303. package/dist/supabase/middleware.js +4 -4
  304. package/dist/{supabase-CAswAUeb.js → supabase-BNPS-Gr1.js} +15 -1
  305. package/dist/{supabase-kWQlkrHw.js → supabase-DrazwRER.js} +14 -7
  306. package/dist/supabase-hook-D0Yzbl19.js +2 -0
  307. package/dist/{supabase-hook-C0LIaT7b.js → supabase-hook-t1HnQf8U.js} +11 -185
  308. package/dist/{supabase-schemas-BUFeyErz.js → supabase-schemas-_ubYYw9i.js} +10 -9
  309. package/dist/svelte/index.d.ts +5 -5
  310. package/dist/svelte/index.js +5 -3
  311. package/dist/svelte/runtime.d.ts +3 -3
  312. package/dist/svelte/runtime.js +1 -1
  313. package/dist/svelte/source.d.ts +5 -5
  314. package/dist/svelte/source.js +2 -2
  315. package/dist/sveltekit/index.d.ts +4 -4
  316. package/dist/sveltekit/index.js +1 -1
  317. package/dist/table-reads-B7z40Yu-.js +766 -0
  318. package/dist/table-reads-Ci-ZVo5m.js +1 -0
  319. package/dist/{tables-sLA1CpuN.js → tables-Bxmf2beb.js} +108 -11
  320. package/dist/tanstack-start/index.d.ts +4 -4
  321. package/dist/tanstack-start/index.js +1 -1
  322. package/dist/tenant-check-DW0kbH-a.js +105 -0
  323. package/dist/terminal/index.d.ts +5 -5
  324. package/dist/terminal/index.js +3 -3
  325. package/dist/testing/core.d.ts +1 -1
  326. package/dist/testing/core.js +1 -1
  327. package/dist/testing/fixtures/index.d.ts +4 -4
  328. package/dist/testing/fixtures/index.js +41 -17
  329. package/dist/testing/index.d.ts +23 -23
  330. package/dist/testing/index.js +13 -13
  331. package/dist/testing/saas/index.d.ts +3 -3
  332. package/dist/testing/saas/index.js +2 -2
  333. package/dist/testing/saas/permissions.js +1 -1
  334. package/dist/trpc/index.d.ts +5 -5
  335. package/dist/trpc/index.js +2 -2
  336. package/dist/{type-helpers-CUmJFGV6.d.ts → type-helpers-CVN-p62O.d.ts} +1 -1
  337. package/dist/{types-vKKndyxx.d.ts → types-5cvjmHTG.d.ts} +1 -1
  338. package/dist/{types-DwoRXDvN.d.ts → types-BMKDvcXc.d.ts} +2 -2
  339. package/dist/{types-CIzXPPV-.d.ts → types-B_I8TBA9.d.ts} +2 -2
  340. package/dist/{types-h9W3CNC_.d.ts → types-BmTW35E5.d.ts} +4 -4
  341. package/dist/{types-BhBfMdQ5.d.ts → types-CDkJNA3a.d.ts} +3 -3
  342. package/dist/{types-euUv1wsO.d.ts → types-CgaGxF5q.d.ts} +1 -1
  343. package/dist/{types-BsRf5rKk.d.ts → types-CrUguLsE.d.ts} +2 -2
  344. package/dist/{types-BRECeQ2n.d.ts → types-DNOJRhyn.d.ts} +3 -3
  345. package/dist/{types-BKnUwgvx.d.ts → types-Dl2jRkyq.d.ts} +4 -4
  346. package/dist/{types-config-BiMM_zJ-.d.ts → types-config-CyawIkMF.d.ts} +2 -2
  347. package/dist/{types-CjZscT16.d.ts → types-gp1w86cV.d.ts} +4 -4
  348. package/dist/{types-run-N2ffLN_Z.d.ts → types-run-ByHuYUen.d.ts} +1 -1
  349. package/dist/unplugin/index.d.ts +1 -1
  350. package/dist/unplugin/index.js +1 -1
  351. package/dist/{usage-DT6QK86a.js → usage-B8ca_Nj_.js} +2 -2
  352. package/dist/usage-CKTsomEq.js +1 -0
  353. package/dist/{usage-Dcbg6zu6.js → usage-Do7LQ4i4.js} +1 -1
  354. package/dist/{validation-error-P4Z9HUuP.d.ts → validation-error-BKgVVMc1.d.ts} +1 -1
  355. package/dist/{verify-DNERav8K.js → verify-ZojGAC3f.js} +12 -12
  356. package/dist/{version-cache-BzK8dwJy.js → version-cache-Ccrfu2A4.js} +6 -1
  357. package/dist/vue/index.d.ts +5 -5
  358. package/dist/vue/index.js +2 -2
  359. package/dist/{waiter-BqUxSRxq.d.ts → waiter-Bov7Cig6.d.ts} +2 -2
  360. package/dist/warm-BKD3FN6k.d.ts +16 -0
  361. package/dist/warm-BZ0ZwSmO.js +32 -0
  362. package/dist/{watch-fldErlRf.js → watch-D-5ztqN8.js} +1 -1
  363. package/dist/{watch-BsQ4n3NV.js → watch-EzX_aG73.js} +2 -2
  364. package/dist/watch-J1PfGMfb.js +1 -0
  365. package/dist/webmcp/index.d.ts +1 -1
  366. package/dist/webmcp/index.js +1 -1
  367. package/dist/{who-can-CGVpM3fZ.js → who-can-CIgYpEvy.js} +1 -1
  368. package/dist/workflow/index.d.ts +3 -3
  369. package/dist/workflow/index.js +1 -1
  370. package/dist/workflow-sdk/index.d.ts +4 -4
  371. package/dist/{wrap-D8WtzrB7.d.ts → wrap-CaAA3ubO.d.ts} +2 -2
  372. package/package.json +11 -11
  373. package/schemas/snapshot-v2.json +20 -0
  374. package/schemas/supabase-claims-v1.json +48 -2
  375. package/schemas/supabase-manifest-v1.json +137 -19
  376. package/skills/permdock-data/references/queries-and-rls.md +1 -1
  377. package/dist/bundle-size-DwZ4e1gu.js +0 -1
  378. package/dist/claims-size-B6j0Ff4Q.js +0 -1
  379. package/dist/evaluator-COmATWCr.js +0 -2
  380. package/dist/gen-CkUEZ5Z6.js +0 -1
  381. package/dist/platform-CSxTsLsr.js +0 -35
  382. package/dist/pull-CGncYZNZ.js +0 -1
  383. package/dist/read-memberships-BkePIa1F.js +0 -63
  384. package/dist/replay-BCOZifwx.d.ts +0 -3
  385. package/dist/report-BevPHMy6.js +0 -1
  386. package/dist/run-3ySqmufy.js +0 -1
  387. package/dist/supabase-hook-DXGg5bNn.js +0 -2
  388. package/dist/tenant-check-gL2miiaS.js +0 -31
  389. package/dist/usage-DdOFc5xq.js +0 -1
  390. package/dist/watch-eay1PztJ.js +0 -1
@@ -1,14 +1,14 @@
1
- import { D as Policy, Er as Principal, N as PolicyVocabulary, Or as Subject, Q as Intent, qt as Instant } from "../policy-types-CfW4X_yX.js";
2
- import { A as SupabaseSubjectOptions, B as supabaseClaims, C as SupabasePrincipal, D as SupabaseRlsOptions, E as SupabaseRlsMembershipTable, F as SupabaseClaims, I as SupabaseClaimsOptions, L as SupabaseClaimsSchema, M as SupabaseSuspendedScope, N as SupabaseSuspension, O as SupabaseSessionLike, P as SupabaseActClaim, R as SupabaseMembershipClaim, S as SupabasePermissionRef, T as SupabaseRlsConfig, _ as SupabaseActor, a as MembershipStream, b as SupabaseInclude, c as SupabasePostgres, d as supabasePostgresQuery, f as tableMembershipSource, g as SupabaseActiveRow, h as RoleThrough, i as MembershipSql, j as SupabaseSuspendedMembership, k as SupabaseStorage, l as authzVersion, n as MembershipHolders, o as MembershipTableOptions, p as AuthorizeSqlOptions, r as MembershipJunctionOptions, s as SqlMembershipSource, t as AUTHZ_VERSION_TABLE, u as junctionMembershipSource, v as SupabaseActorResult, w as SupabaseRealtime, x as SupabaseMembershipTable, y as SupabaseDelegation, z as SupabasePermDockClaims } from "../sources-D5n28164.js";
3
- import { a as ApprovalDelegationSource, m as ApprovalStore, u as ApprovalRequest } from "../types-vKKndyxx.js";
4
- import { a as SupabaseRpcResult, i as SupabaseRpcClient, n as PostgrestSourcesOptions, o as postgrestSources, r as SupabaseRpcCaller, t as PostgrestSources } from "../postgrest-PQ3zAOD2.js";
5
- import { F as PermissionState, P as PermissionCheck, a as PermDock, z as ApprovalPolicySource } from "../permdock-BShHM8OJ.js";
1
+ import { Ar as Subject, D as Policy, N as PolicyVocabulary, Or as Principal, Q as Intent, qt as Instant } from "../policy-types-BnBZvh7N.js";
2
+ import { A as SupabaseSubjectOptions, B as supabaseClaims, C as SupabasePrincipal, D as SupabaseRlsOptions, E as SupabaseRlsMembershipTable, F as SupabaseClaims, I as SupabaseClaimsOptions, L as SupabaseClaimsSchema, M as SupabaseSuspendedScope, N as SupabaseSuspension, O as SupabaseSessionLike, P as SupabaseActClaim, R as SupabaseMembershipClaim, S as SupabasePermissionRef, T as SupabaseRlsConfig, _ as SupabaseActor, a as MembershipStream, b as SupabaseInclude, c as SupabasePostgres, d as supabasePostgresQuery, f as tableMembershipSource, g as SupabaseActiveRow, h as RoleThrough, i as MembershipSql, j as SupabaseSuspendedMembership, k as SupabaseStorage, l as authzVersion, n as MembershipHolders, o as MembershipTableOptions, p as AuthorizeSqlOptions, r as MembershipJunctionOptions, s as SqlMembershipSource, t as AUTHZ_VERSION_TABLE, u as junctionMembershipSource, v as SupabaseActorResult, w as SupabaseRealtime, x as SupabaseMembershipTable, y as SupabaseDelegation, z as SupabasePermDockClaims } from "../sources-Bq7k7g34.js";
3
+ import { a as ApprovalDelegationSource, m as ApprovalStore, u as ApprovalRequest } from "../types-5cvjmHTG.js";
4
+ import { a as SupabaseRpcResult, i as SupabaseRpcClient, n as PostgrestSourcesOptions, o as postgrestSources, r as SupabaseRpcCaller, t as PostgrestSources } from "../postgrest-BG0ipED3.js";
5
+ import { F as PermissionState, P as PermissionCheck, a as PermDock, z as ApprovalPolicySource } from "../permdock-V86uejcm.js";
6
6
  import { t as SqlQuery } from "../sql-BYYNi1lu.js";
7
- import { a as readSubjectRecord, r as SubjectRecord } from "../subject-cache-CnJcz2K_.js";
8
- import { _ as hasTokenHook, a as SupabaseManifestActiveRow, c as SupabaseManifestMembership, d as SupabaseManifestResourceNames, f as SupabaseManifestRls, g as SupabaseManifestValue, h as SupabaseManifestThrough, i as SupabaseManifest, l as SupabaseManifestNames, m as SupabaseManifestScopeNames, n as SupabaseHookClaim, o as SupabaseManifestColumn, p as SupabaseManifestRole, r as SupabaseHookManifest, s as SupabaseManifestHelper, t as SupabaseDatabaseManifest, u as SupabaseManifestRequires, v as parseSupabaseManifest } from "../manifest-CA3E0KP8.js";
9
- import { a as AppOptions, n as PermDockDefinition, r as PermDockQuery } from "../define-permdock-DBgwTFi1.js";
7
+ import { a as readSubjectRecord, r as SubjectRecord } from "../subject-cache-UKUgQCEX.js";
8
+ import { _ as hasTokenHook, a as SupabaseManifestActiveRow, c as SupabaseManifestMembership, d as SupabaseManifestResourceNames, f as SupabaseManifestRls, g as SupabaseManifestValue, h as SupabaseManifestThrough, i as SupabaseManifest, l as SupabaseManifestNames, m as SupabaseManifestScopeNames, n as SupabaseHookClaim, o as SupabaseManifestColumn, p as SupabaseManifestRole, r as SupabaseHookManifest, s as SupabaseManifestHelper, t as SupabaseDatabaseManifest, u as SupabaseManifestRequires, v as parseSupabaseManifest } from "../manifest-BwhZ1s5b.js";
9
+ import { a as AppOptions, n as PermDockDefinition, r as PermDockQuery } from "../define-permdock-4IkoNaB3.js";
10
10
  import { n as supabaseTenantClaim, t as supabaseMembershipsBudget } from "../budget-5LJ8kfZk.js";
11
- import { n as subjectFromSupabaseClient, t as SupabaseClaimsClient } from "../client-subject-BOPbpwgm.js";
11
+ import { n as subjectFromSupabaseClient, t as SupabaseClaimsClient } from "../client-subject-Dzo49nco.js";
12
12
  /**
13
13
  * The server topic the generated version trigger broadcasts on without
14
14
  * better-supabase; no user may join it. With better-supabase it is
@@ -46,6 +46,33 @@ type ExchangeCapabilityOptions = {
46
46
  * read. `undefined` for any subject that is not a live link.
47
47
  */
48
48
  export declare function exchangeCapability(subject: Subject, options: ExchangeCapabilityOptions): Promise<string | undefined>;
49
+ /**
50
+ * The compact `memberships` claim the hook writes: `s` lists the scopes and `r`
51
+ * the roles and `v` the `via` labels the entries use, `e` holds one `[scope
52
+ * index, id, via index or -1, ...role indexes]` array per plain entry, and `o`
53
+ * keeps the entries that carry more than a scope, an id, roles and a `via`
54
+ * (`within`, `grants`, `expires_at`, …) as objects. An id that is a UUID is its
55
+ * 22 character base64url form; any other id is `=` and the text.
56
+ */
57
+ type CompactMemberships = {
58
+ readonly s?: readonly string[];
59
+ readonly r?: readonly string[];
60
+ readonly v?: readonly string[];
61
+ readonly e?: readonly (readonly (string | number)[])[];
62
+ readonly o?: readonly unknown[];
63
+ };
64
+ /**
65
+ * The compact claim for `entries`: the shape the generated hook writes. The
66
+ * claims-size report and the tests use it to measure the claim without a
67
+ * database.
68
+ */
69
+ export declare function compactMemberships(entries: readonly unknown[]): CompactMemberships | readonly unknown[];
70
+ /**
71
+ * The entry array of a `memberships` claim: an array stays as it is and the
72
+ * compact object expands to the entries it stands for. A row that does not
73
+ * resolve becomes `null`, which `readMemberships` drops and reports.
74
+ */
75
+ export declare function expandMemberships(value: unknown): unknown;
49
76
  type SupabaseApprovalStoreOptions = {
50
77
  /** Schema of the generated store functions (`rls.schema`). Default `permdock`. */
51
78
  readonly schema?: string;
@@ -1,9 +1,10 @@
1
- import { r as readSubjectRecord } from "../version-cache-BzK8dwJy.js";
1
+ import { r as readSubjectRecord } from "../version-cache-Ccrfu2A4.js";
2
+ import { n as compactMemberships, r as expandMemberships } from "../read-memberships-DVBitJZG.js";
2
3
  import { n as AUTHZ_TOPIC, r as authzUserTopic, t as AUTHZ_EVENT } from "../authz-topic-D8x24Jv-.js";
3
4
  import { n as supabaseMembershipsBudget, r as supabaseTenantClaim } from "../budget-BH81q2cj.js";
4
- import { a as tableApprovalPolicySource, c as exchangeCapability, i as tableApprovalDelegationSource, n as authorizeSql, o as supabaseApprovalStore, r as supabaseRls, s as supabaseClaims, t as definePermDock } from "../supabase-kWQlkrHw.js";
5
- import { c as tableMembershipSource, i as authzVersion, o as junctionMembershipSource, s as supabasePostgresQuery, t as AUTHZ_VERSION_TABLE } from "../sources-DnjJPGfb.js";
6
- import { r as subjectFromSupabaseClient, s as postgrestSources } from "../resolver-CuIY8aFD.js";
7
- import { a as delegationOf, i as actorOf, o as subjectFromSupabase, s as subjectFromSupabaseSession } from "../definition-options-9o8Hdww3.js";
8
- import { n as parseSupabaseManifest, t as hasTokenHook } from "../manifest-DdNYR_pl.js";
9
- export { AUTHZ_EVENT, AUTHZ_TOPIC, AUTHZ_VERSION_TABLE, actorOf, authorizeSql, authzUserTopic, authzVersion, definePermDock, delegationOf, exchangeCapability, hasTokenHook, junctionMembershipSource, parseSupabaseManifest, postgrestSources, readSubjectRecord, subjectFromSupabase, subjectFromSupabaseClient, subjectFromSupabaseSession, supabaseApprovalStore, supabaseClaims, supabaseMembershipsBudget, supabasePostgresQuery, supabaseRls, supabaseTenantClaim, tableApprovalDelegationSource, tableApprovalPolicySource, tableMembershipSource };
5
+ import { a as tableApprovalPolicySource, c as exchangeCapability, i as tableApprovalDelegationSource, n as authorizeSql, o as supabaseApprovalStore, r as supabaseRls, s as supabaseClaims, t as definePermDock } from "../supabase-DrazwRER.js";
6
+ import { c as tableMembershipSource, i as authzVersion, o as junctionMembershipSource, s as supabasePostgresQuery, t as AUTHZ_VERSION_TABLE } from "../sources-C6Id63F8.js";
7
+ import { r as subjectFromSupabaseClient, s as postgrestSources } from "../resolver-C_a-bddD.js";
8
+ import { a as delegationOf, i as actorOf, o as subjectFromSupabase, s as subjectFromSupabaseSession } from "../definition-options-DO0kIrB9.js";
9
+ import { n as parseSupabaseManifest, t as hasTokenHook } from "../manifest-CIWOmdlP.js";
10
+ export { AUTHZ_EVENT, AUTHZ_TOPIC, AUTHZ_VERSION_TABLE, actorOf, authorizeSql, authzUserTopic, authzVersion, compactMemberships, definePermDock, delegationOf, exchangeCapability, expandMemberships, hasTokenHook, junctionMembershipSource, parseSupabaseManifest, postgrestSources, readSubjectRecord, subjectFromSupabase, subjectFromSupabaseClient, subjectFromSupabaseSession, supabaseApprovalStore, supabaseClaims, supabaseMembershipsBudget, supabasePostgresQuery, supabaseRls, supabaseTenantClaim, tableApprovalDelegationSource, tableApprovalPolicySource, tableMembershipSource };
@@ -1,11 +1,11 @@
1
1
  import { n as TenantSlugResolver, t as TenantFromPathOptions } from "../tenant-from-path-Dq3jkqjh.js";
2
- import { t as InstanceOptions } from "../instance-options-DQCiBBuz.js";
3
- import { a as PermDock } from "../permdock-BShHM8OJ.js";
2
+ import { t as InstanceOptions } from "../instance-options-hq5Cp2Ih.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, Or as Subject } from "../policy-types-CfW4X_yX.js";
6
- import { n as ServerAdapterServices } from "../bind-zQacwAOg.js";
5
+ import { Ar as Subject, D as Policy, N as PolicyVocabulary, Or as Principal } from "../policy-types-BnBZvh7N.js";
6
+ import { n as ServerAdapterServices } from "../bind-Bwk9tt1z.js";
7
7
  import { t as RequestContext } from "../request-context-E3-ps-H_.js";
8
- import { i as OpenApiHooks } from "../server-types-C2XX60aF.js";
8
+ import { i as OpenApiHooks } from "../server-types-BlMijUtb.js";
9
9
  import { FetchHandler, Middleware } from "@supabase/middleware";
10
10
  /**
11
11
  * The verified Supabase Auth access-token payload as `@supabase/server`
@@ -1,13 +1,13 @@
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
3
  import { r as credentialSubject } from "../credential-D9in5keC.js";
4
4
  import { t as instanceOptions } from "../instance-options-CLErhA76.js";
5
5
  import { t as composeWraps } from "../wrap-CsfsaJhd.js";
6
- import { n as attached } from "../bind-BYeoLJgN.js";
7
- import { t as createPermDock$1 } from "../create-COQVXK6C.js";
6
+ import { n as attached } from "../bind-DPptdk31.js";
7
+ import { t as createPermDock$1 } from "../create-BMRnaZel.js";
8
8
  import { o as methodNotAllowed } from "../problem-BZB7zPC7.js";
9
9
  import { n as tenantFromPath$1 } from "../tenant-from-path-AKTSY7uR.js";
10
- import { n as supabaseOptionsOf, o as subjectFromSupabase, t as SUPABASE_OPTIONS } from "../definition-options-9o8Hdww3.js";
10
+ import { n as supabaseOptionsOf, o as subjectFromSupabase, t as SUPABASE_OPTIONS } from "../definition-options-DO0kIrB9.js";
11
11
  import { defineMiddleware } from "@supabase/middleware";
12
12
  // src/supabase/middleware.ts
13
13
  /**
@@ -11,11 +11,25 @@ const inspect = defineLeaf({
11
11
  description: "File to write; a bare --out writes permdock.manifest.json",
12
12
  valueHint: "file"
13
13
  },
14
+ functions: {
15
+ type: "string",
16
+ description: "Print, for each function matching the pattern (public.*_payload), a pass or every reason it is not shared; writes nothing",
17
+ valueHint: "pattern"
18
+ },
14
19
  ...checkFlag
15
20
  },
16
21
  async run(ctx, { flags }) {
22
+ if (flags.functions !== void 0) {
23
+ const { inspectFunctions } = await import("./inspect-functions-CwEAQpVF.js");
24
+ return inspectFunctions({
25
+ cwd: ctx.cwd,
26
+ config: ctx.config,
27
+ pattern: flags.functions,
28
+ json: ctx.json
29
+ });
30
+ }
17
31
  const out = flags.out === "" ? true : flags.out === "-" ? void 0 : flags.out;
18
- const { runSupabase } = await import("./supabase-hook-DXGg5bNn.js");
32
+ const { runSupabase } = await import("./supabase-hook-D0Yzbl19.js");
19
33
  return runSupabase({
20
34
  cwd: ctx.cwd,
21
35
  config: ctx.config,
@@ -3,15 +3,17 @@ import { d as isoNow, i as dateAt, p as nowSeconds, u as isoAt } from "./time-r0
3
3
  import { t as loadJose } from "./load-jose-CjzIBSKI.js";
4
4
  import { r as isRecord, t as compact } from "./compact-C4LFuqbW.js";
5
5
  import { r as memoByFrozenObject } from "./freeze-DGfJq_j2.js";
6
+ import { r as expandMemberships } from "./read-memberships-DVBitJZG.js";
6
7
  import { t as CUSTOM_ROLES_VERSION_CLAIM } from "./budget-BH81q2cj.js";
7
8
  import { s as ApprovalError } from "./types-DFZKovb3.js";
8
9
  import { c as decodeApprovalCursor, l as encodeApprovalCursor, s as approvalPageSize, t as applyApprovalVerdict } from "./store-n3yEN7dt.js";
9
10
  import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
10
- import { a as withMembers, i as ownedCaches, n as getPermissions, o as callRpc, r as subjectFromSupabaseClient, s as postgrestSources, t as createResolver } from "./resolver-CuIY8aFD.js";
11
- import { d as keptKeys, l as roleColumn } from "./sources-DnjJPGfb.js";
11
+ import { a as withMembers, i as ownedCaches, n as getPermissions, o as callRpc, r as subjectFromSupabaseClient, s as postgrestSources, t as createResolver } from "./resolver-C_a-bddD.js";
12
+ import { d as keptKeys, l as roleColumn } from "./sources-C6Id63F8.js";
12
13
  import { a as quoteQualifiedTable, c as quoteSqlTable, d as sqlTextArray, i as qualifySqlTable, o as quoteSqlIdent, s as quoteSqlLiteral } from "./sql-T4GaBh9X.js";
13
- import { o as subjectFromSupabase, t as SUPABASE_OPTIONS } from "./definition-options-9o8Hdww3.js";
14
- import { t as definePermDock$1 } from "./define-permdock-D7aKxIax.js";
14
+ import { t as compactMembershipsSql } from "./membership-claim-sql-DGfhIn__.js";
15
+ import { o as subjectFromSupabase, t as SUPABASE_OPTIONS } from "./definition-options-DO0kIrB9.js";
16
+ import { t as definePermDock$1 } from "./define-permdock-CO7YNrOF.js";
15
17
  import { r as isSubject } from "./subject-DkxY-AhF.js";
16
18
  // src/supabase/capability.ts
17
19
  const DEFAULT_TTL = 300;
@@ -64,6 +66,7 @@ const KNOWN = /* @__PURE__ */ new Set([
64
66
  "roles",
65
67
  "memberships",
66
68
  "memberships_truncated",
69
+ "suspended_in",
67
70
  "team_ids",
68
71
  "attrs",
69
72
  "authz_ver",
@@ -119,7 +122,8 @@ function checkPermDockClaims(record, tenantClaim, path, issues) {
119
122
  optional(record, "roles", path, issues, isStrings, "an array of strings");
120
123
  const memberships = own(record, "memberships");
121
124
  if (memberships !== void 0) {
122
- if (Array.isArray(memberships)) for (const [index, item] of memberships.entries()) checkMembership(item, [
125
+ const entries = expandMemberships(memberships);
126
+ if (Array.isArray(entries)) for (const [index, item] of entries.entries()) checkMembership(item, [
123
127
  ...path,
124
128
  "memberships",
125
129
  index
@@ -127,6 +131,7 @@ function checkPermDockClaims(record, tenantClaim, path, issues) {
127
131
  else issue(issues, [...path, "memberships"], "Expected an array");
128
132
  }
129
133
  optional(record, "memberships_truncated", path, issues, (value) => typeof value === "boolean", "a boolean");
134
+ optional(record, "suspended_in", path, issues, isStrings, "an array of strings");
130
135
  optional(record, "team_ids", path, issues, isStrings, "an array of strings");
131
136
  optional(record, tenantClaim, path, issues, isString, "a string");
132
137
  optional(record, "attrs", path, issues, isRecord, "an object");
@@ -625,9 +630,11 @@ const CLAIM_UNEXPIRED = `case jsonb_typeof(m -> 'expires_at')
625
630
  else true
626
631
  end`;
627
632
  function jwtBody(q, scope, custom, suspension) {
633
+ const claimed = "coalesce(claims -> 'memberships', claims -> 'app_metadata' -> 'memberships')";
628
634
  const memberships = `jsonb_array_elements(
629
- case jsonb_typeof(coalesce(claims -> 'memberships', claims -> 'app_metadata' -> 'memberships'))
630
- when 'array' then coalesce(claims -> 'memberships', claims -> 'app_metadata' -> 'memberships')
635
+ case jsonb_typeof(${claimed})
636
+ when 'array' then ${claimed}
637
+ when 'object' then ${compactMembershipsSql(claimed)}
631
638
  else '[]'::jsonb
632
639
  end
633
640
  ) m
@@ -0,0 +1,2 @@
1
+ import "./hook-sql-CbkH78FC.js";
2
+ export { r as runSupabase } from "./supabase-hook-t1HnQf8U.js";
@@ -1,197 +1,22 @@
1
1
  import { r as isRecord } from "./compact-C4LFuqbW.js";
2
2
  import { d as scopeList } from "./scopes-B-KX9EI8.js";
3
- import "./sources-DnjJPGfb.js";
3
+ import "./sources-C6Id63F8.js";
4
4
  import { _ as writeOutputFiles, d as pgDeltaPath, g as underSchemaDir, h as serviceRel, r as driftOf, u as partPath } from "./output-files-8lfALMSU.js";
5
5
  import { i as readJsonFile, o as sqlFiles, s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
6
6
  import { n as formatManifestJson, t as MANIFEST_FILE } from "./manifest-json-DMaBWmcG.js";
7
7
  import { c as requirePolicy } from "./load-m7jmit3y.js";
8
- import { n as hookUri } from "./rbac-CwcucZPx.js";
9
- import { a as parseSqlFile, c as readPolicy, d as sqlCalls, t as SqlSyntaxError } from "./ast-Dnm2TOHN.js";
10
- import { i as taggedAccessPolicies } from "./bsb-access-Bcw6GrQm.js";
11
- import { t as isPlatformSchema } from "./platform-CSxTsLsr.js";
12
- import { n as tenantCheck } from "./tenant-check-gL2miiaS.js";
13
- import { i as droppedPolicy, o as reportFiles } from "./report-BI_hek_d.js";
14
- import { a as supabaseHookSql, c as asideAuthzReceive, f as declarativeSql, i as supabaseHookManifest, l as configToml, n as hooklessDatabase, o as defaultOut, r as supabaseDatabaseManifest, s as hookMarker, t as grantsLabel } from "./hook-sql-DJQ_yOEC.js";
8
+ import { a as tryKeyReasons } from "./tenant-check-DW0kbH-a.js";
9
+ import { n as hookUri } from "./rbac-BRMnQ9Rl.js";
10
+ import { a as withTableReads } from "./table-reads-B7z40Yu-.js";
11
+ import { a as supabaseHookSql, c as asideAuthzReceive, d as declarativeSql, i as supabaseHookManifest, l as configToml, n as hooklessDatabase, o as defaultOut, r as supabaseDatabaseManifest, s as hookMarker, t as grantsLabel } from "./hook-sql-CbkH78FC.js";
15
12
  import { r as HOOK_MARKER, s as hookMarkerFields } from "./markers-C-kThnKN.js";
16
13
  import { i as withSchemaDefaults } from "./schema-tables-Ba9LE_XB.js";
17
- import { l as supabaseConfig, n as resolveSchemas, r as schemasRefusal, t as isSupabaseSchemas } from "./supabase-schemas-BUFeyErz.js";
18
- import { t as readMemberships } from "./read-memberships-BkePIa1F.js";
14
+ import { l as supabaseConfig, n as resolveSchemas, r as schemasRefusal, t as isSupabaseSchemas } from "./supabase-schemas-_ubYYw9i.js";
15
+ import { t as readMemberships } from "./read-memberships-DVBitJZG.js";
19
16
  import { r as pgConnector } from "./pg-DmS5ITHu.js";
20
17
  import { n as MIGRATION_DIRS } from "./constants-PCJiir_3.js";
21
18
  import { existsSync, readFileSync, readdirSync } from "node:fs";
22
19
  import { dirname, join, resolve } from "node:path";
23
- // src/cli/rls/table-reads.ts
24
- /** better-supabase's own tables, which its block SQL owns. */
25
- const LIBRARY_SCHEMAS = /* @__PURE__ */ new Set(["better_supabase"]);
26
- function relationName(relation) {
27
- if (!isRecord(relation) || typeof relation["relname"] !== "string") return;
28
- return `${typeof relation["schemaname"] === "string" ? relation["schemaname"] : "public"}.${relation["relname"]}`.toLowerCase();
29
- }
30
- function enablesRls(node) {
31
- return (Array.isArray(node["cmds"]) ? node["cmds"] : []).some((cmd) => {
32
- const alter = isRecord(cmd) ? cmd["AlterTableCmd"] : void 0;
33
- return isRecord(alter) && alter["subtype"] === "AT_EnableRowSecurity";
34
- });
35
- }
36
- function readsColumn(expr) {
37
- if (Array.isArray(expr)) return expr.some((item) => readsColumn(item));
38
- if (!isRecord(expr)) return false;
39
- return Object.entries(expr).some(([key, child]) => key === "ColumnRef" || readsColumn(child));
40
- }
41
- function appliesToSelect(policy) {
42
- return (policy.command === "select" || policy.command === "all") && policy.roles.some((role) => role === "authenticated" || role === "public");
43
- }
44
- /** The rule a permissive select policy that is not the tenant form breaks. */
45
- function ruleOf(policy, plainHelper) {
46
- const names = sqlCalls(policy.using).map((call) => call.name.join("."));
47
- if (names.length > 0 && names.every((name) => name === plainHelper)) return "form";
48
- if (names.some((name) => name.includes("follows"))) return "follows";
49
- if (names.some((name) => name.includes("_via"))) return "via";
50
- if (names.some((name) => name.includes("walk"))) return "walk";
51
- if (names.some((name) => name === "auth.uid" || name.endsWith("permdock_user_id"))) return "owner";
52
- return policy.using === void 0 ? "unknown" : "condition";
53
- }
54
- function keysOf(expr, helper) {
55
- return sqlCalls(expr).flatMap((call) => {
56
- if (call.name.join(".") !== helper) return [];
57
- const args = Array.isArray(call.node["args"]) ? call.node["args"] : [];
58
- const constant = args.length === 1 && isRecord(args[0]) ? args[0]["A_Const"] : void 0;
59
- const value = isRecord(constant) && isRecord(constant["sval"]) ? constant["sval"]["sval"] : void 0;
60
- return typeof value === "string" ? [value] : [];
61
- });
62
- }
63
- function readOf(table, facts, helpers, fieldTables) {
64
- if (facts === void 0 || !facts.rls) return {
65
- table,
66
- share: "row",
67
- rules: ["unknown"]
68
- };
69
- const selects = [...facts.policies.values()].filter(appliesToSelect);
70
- const permissive = selects.filter((policy) => policy.permissive);
71
- const rules = /* @__PURE__ */ new Set();
72
- const columns = /* @__PURE__ */ new Set();
73
- const keys = /* @__PURE__ */ new Set();
74
- if (fieldTables.has(table)) rules.add("fields");
75
- if (permissive.length === 0) rules.add("unknown");
76
- for (const policy of permissive) {
77
- const check = policy.tagged ?? tenantCheck(policy.using, helpers.byPermission);
78
- for (const key of policy.tagged === void 0 ? keysOf(policy.using, helpers.byPermission) : [policy.tagged.key]) keys.add(key);
79
- if (check === void 0) rules.add(ruleOf(policy, helpers.plain));
80
- else columns.add(check.column);
81
- }
82
- if (selects.some((policy) => !policy.permissive && readsColumn(policy.using))) rules.add("restrictive");
83
- if (rules.size === 0 && columns.size > 1) rules.add("condition");
84
- const permissions = [...keys].toSorted();
85
- const listed = permissions.length === 0 ? {} : { permissions };
86
- if (rules.size > 0) return {
87
- table,
88
- share: "row",
89
- ...listed,
90
- rules: [...rules].toSorted()
91
- };
92
- const [column] = columns;
93
- return {
94
- table,
95
- share: "tenant",
96
- ...column === void 0 ? {} : { column },
97
- ...listed
98
- };
99
- }
100
- /**
101
- * `rls.tableReads`: for each table the schema files and migrations create, from
102
- * the select policies they leave defined plus the policies `@bsb access` tags
103
- * render. A table is `tenant` only when row level security is on, it has no
104
- * field view, every permissive select policy for `authenticated` is `<column>
105
- * in (select <schema>.permitted_<root>_ids_by_permission('<key>'))` on one
106
- * column, and every restrictive select policy reads no column of the row.
107
- * Everything else is `row`, with the rules it breaks. Tables in the helpers'
108
- * schema, `better_supabase` and platform schemas are left out. A file
109
- * libpg_query rejects is skipped. The files are read from disk, so select
110
- * policies a `generate` run changes in `rls.out` are recorded on the next run.
111
- */
112
- async function tableReads(input) {
113
- const created = /* @__PURE__ */ new Set();
114
- const facts = /* @__PURE__ */ new Map();
115
- const factsOf = (table) => {
116
- const found = facts.get(table) ?? {
117
- rls: false,
118
- policies: /* @__PURE__ */ new Map()
119
- };
120
- facts.set(table, found);
121
- return found;
122
- };
123
- for (const file of reportFiles(input.cwd, input.config)) {
124
- let nodes;
125
- try {
126
- nodes = await parseSqlFile(readFileSync(file, "utf8"));
127
- } catch (error) {
128
- if (error instanceof SqlSyntaxError) continue;
129
- throw error;
130
- }
131
- for (const node of nodes) if (node.kind === "CreateStmt") {
132
- const table = relationName(node.node["relation"]);
133
- if (table !== void 0) created.add(table);
134
- } else if (node.kind === "AlterTableStmt" && enablesRls(node.node)) {
135
- const table = relationName(node.node["relation"]);
136
- if (table !== void 0) factsOf(table).rls = true;
137
- } else if (node.kind === "DropStmt") {
138
- const dropped = droppedPolicy(node.node);
139
- if (dropped !== void 0) facts.get(`${dropped.schema}.${dropped.table}`.toLowerCase())?.policies.delete(dropped.name);
140
- } else {
141
- const policy = readPolicy(node);
142
- if (policy !== void 0) factsOf(`${policy.schema}.${policy.table}`.toLowerCase()).policies.set(policy.name, policy);
143
- }
144
- }
145
- for (const tagged of await taggedAccessPolicies(input.cwd)) {
146
- if (tagged.operation.toLowerCase() !== "read") continue;
147
- factsOf(`${tagged.schema}.${tagged.table}`.toLowerCase()).policies.set(tagged.name, {
148
- name: tagged.name,
149
- command: "select",
150
- permissive: true,
151
- roles: ["authenticated"],
152
- tagged: {
153
- column: tagged.tenantColumn,
154
- key: tagged.key
155
- }
156
- });
157
- }
158
- const helpers = {
159
- plain: `${input.schema}.permitted_${input.root}_ids`,
160
- byPermission: `${input.schema}.permitted_${input.root}_ids_by_permission`
161
- };
162
- const helperSchema = input.schema.toLowerCase();
163
- return [...created].filter((table) => {
164
- const schema = table.slice(0, table.indexOf("."));
165
- return schema !== helperSchema && !LIBRARY_SCHEMAS.has(schema) && !isPlatformSchema(schema);
166
- }).toSorted().map((table) => readOf(table, facts.get(table), helpers, input.fieldTables ?? /* @__PURE__ */ new Set()));
167
- }
168
- /** `tableReads` for the helpers, root scope and field views `manifest` names. */
169
- function manifestTableReads(cwd, config, manifest) {
170
- const root = manifest.rls.scopes[0]?.name;
171
- if (root === void 0) return Promise.resolve([]);
172
- const fieldTables = new Set(Object.values(manifest.names?.resources ?? {}).flatMap((names) => names.table === void 0 || names.visible === void 0 ? [] : [(names.table.includes(".") ? names.table : `public.${names.table}`).toLowerCase()]));
173
- return tableReads({
174
- cwd,
175
- config,
176
- schema: manifest.rls.schema,
177
- root,
178
- fieldTables
179
- });
180
- }
181
- /**
182
- * `manifest` with `rls.tableReads` from the files on disk; unchanged when the
183
- * files create no table.
184
- */
185
- async function withTableReads(cwd, config, manifest) {
186
- const reads = await manifestTableReads(cwd, config, manifest);
187
- return reads.length === 0 ? manifest : {
188
- ...manifest,
189
- rls: {
190
- ...manifest.rls,
191
- tableReads: reads
192
- }
193
- };
194
- }
195
20
  // src/cli/supabase-setup.ts
196
21
  const HELPER_NAME = /^(?:permdock_has|permitted_[a-z][a-z0-9_]*_ids|member_[a-z][a-z0-9_]*_ids(?:_for|_of)?)$/u;
197
22
  function escape(text) {
@@ -484,8 +309,9 @@ async function runSupabase(input) {
484
309
  if (area === "inspect" && action === void 0) {
485
310
  const policy = await loadHookPolicy(input.cwd, input.config);
486
311
  const config = await withSchemaDefaults(input.cwd, input.config, policy);
312
+ const reasons = tryKeyReasons(input.config, policy, input.cwd);
487
313
  if (hooklessDatabase(input.config)) {
488
- const bare = await withTableReads(input.cwd, input.config, supabaseDatabaseManifest(scopeList(policy.scopes), config, overrides, policy));
314
+ const bare = await withTableReads(input.cwd, input.config, supabaseDatabaseManifest(scopeList(policy.scopes), config, overrides, policy), reasons);
489
315
  if (input.out !== void 0 || input.check) return manifestFile(input.cwd, typeof input.out === "string" ? input.out : MANIFEST_FILE, bare, input.check);
490
316
  return {
491
317
  code: 0,
@@ -496,7 +322,7 @@ async function runSupabase(input) {
496
322
  ...overrides,
497
323
  out: hookOut(input.cwd, input.config, input.schema, flag),
498
324
  schemas: schemas.mode
499
- }, policy));
325
+ }, policy), reasons);
500
326
  const api = managementApi(input.cwd, manifest);
501
327
  if (input.out !== void 0 || input.check) return manifestFile(input.cwd, typeof input.out === "string" ? input.out : MANIFEST_FILE, {
502
328
  ...manifest,
@@ -581,4 +407,4 @@ async function runSupabase(input) {
581
407
  ].join("\n")
582
408
  };
583
409
  }
584
- export { manifestTableReads as a, pd039 as i, loadScopes as n, runSupabase as r, hookOut as t };
410
+ export { pd039 as i, loadScopes as n, runSupabase as r, hookOut as t };
@@ -1,7 +1,7 @@
1
- import "./sources-DnjJPGfb.js";
1
+ import "./sources-C6Id63F8.js";
2
2
  import { a as describeError } from "./errors-DgLOqc6j.js";
3
- import { n as hookUri } from "./rbac-CwcucZPx.js";
4
- import { t as supabaseConfigFile } from "./supabase-dir-0lxKbrYu.js";
3
+ import { n as hookUri } from "./rbac-BRMnQ9Rl.js";
4
+ import { n as supabaseDir, t as supabaseConfigFile } from "./supabase-dir-0lxKbrYu.js";
5
5
  import { existsSync, readFileSync } from "node:fs";
6
6
  import { join, posix } from "node:path";
7
7
  import { createRequire } from "node:module";
@@ -931,18 +931,19 @@ function readSupabaseConfig(cwd, env = process.env) {
931
931
  } },
932
932
  ...pgDelta === void 0 ? {} : { pgDelta: {
933
933
  ...typeof enabled === "boolean" ? { enabled } : {},
934
- schemaDir: declarativeSchemaDir(schemaPath)
934
+ schemaDir: declarativeSchemaDir(schemaPath, cwd)
935
935
  } },
936
936
  ...unresolved.length === 0 ? {} : { unresolvedEnv: unresolved }
937
937
  }
938
938
  };
939
939
  }
940
940
  /**
941
- * `supabase/` joined with `declarative_schema_path`, which defaults to
942
- * `schemas`.
941
+ * The Supabase directory joined with `declarative_schema_path`, which defaults
942
+ * to `schemas`, relative to `cwd`. The directory is the nearest `supabase/`
943
+ * above `cwd` (`supabaseDir`), so a package of a monorepo finds the root one.
943
944
  */
944
- function declarativeSchemaDir(schemaPath) {
945
- return posix.join("supabase", typeof schemaPath === "string" ? schemaPath : "schemas").replace(/\/$/u, "");
945
+ function declarativeSchemaDir(schemaPath, cwd) {
946
+ return posix.join(cwd === void 0 ? "supabase" : supabaseDir(cwd), typeof schemaPath === "string" ? schemaPath : "schemas").replace(/\/$/u, "");
946
947
  }
947
948
  /**
948
949
  * The parsed config, or `{}` when it is missing or does not parse (PD045
@@ -1068,7 +1069,7 @@ function resolveSchemas(cwd, config, flag) {
1068
1069
  switch (mode) {
1069
1070
  case "pg-delta": return {
1070
1071
  mode,
1071
- schemaDir: toml?.schemaDir ?? declarativeSchemaDir()
1072
+ schemaDir: toml?.schemaDir ?? declarativeSchemaDir(void 0, cwd)
1072
1073
  };
1073
1074
  case "migra":
1074
1075
  case "migrations": return { mode };
@@ -1,11 +1,11 @@
1
- import { i as ProtectedProps, n as ProtectedActionReadable, r as SveltePermDockOptions, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-BRECeQ2n.js";
2
- import { i as describe } from "../describe-AdETpWsn.js";
3
- import { c as requiredPlans } from "../errors-COoiWqIs.js";
1
+ import { i as ProtectedProps, n as ProtectedActionReadable, r as SveltePermDockOptions, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-DNOJRhyn.js";
2
+ import { i as describe } from "../describe-FT1oVN_o.js";
3
+ import { c as requiredPlans } from "../errors-BGosrHl8.js";
4
4
  import { t as approvalHeaders } from "../headers-D1oRr-js.js";
5
5
  import { a as broadcastChannelRefresh, c as visibilityRefresh, i as authzChangeRefresh, n as EventSourceRefreshOptions, o as eventSourceRefresh, r as RefreshTrigger, s as focusRefresh, t as AuthzChangeRefresh } from "../refresh-on-C1zIMtJr.js";
6
- import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-D6MIjN_-.js";
6
+ import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-Dn7TpQFa.js";
7
7
  import { t as PermissionBoundaryState } from "../boundary-DJqHADKu.js";
8
- import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, i as ApprovalState, l as GateView, m as ProtectedActionView, o as ClientStatus, r as ApprovalHandle, s as FilterResult, v as TenantView, y as ActionResult } from "../store-core-BdFcruPm.js";
8
+ import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, i as ApprovalState, l as GateView, m as ProtectedActionView, o as ClientStatus, r as ApprovalHandle, s as FilterResult, v as TenantView, y as ActionResult } from "../store-core-Bq7Qc9QM.js";
9
9
  import { Component } from "svelte";
10
10
  export declare const Protected: Component<ProtectedProps>;
11
11
  export declare const PermissionBoundary: Component<PermissionBoundaryProps>;
@@ -1,16 +1,17 @@
1
1
  import { n as boundaryFallback, t as boundaryDigest } from "../boundary--5Swp7sN.js";
2
- import { n as getUi, t as getStore } from "../context-BQHKgT1m.js";
2
+ import { n as getUi, t as getStore } from "../context-Nr3nknZX.js";
3
3
  import { n as viewFor, t as scopedFor } from "../runtime-Cl6xSbEq.js";
4
4
  import { d as slotContent } from "../views-Dpr1uB16.js";
5
5
  import { n as describe } from "../describe-B7EosIKA.js";
6
6
  import { r as requiredPlans } from "../problem-details-EJHcvYCz.js";
7
7
  import { r as approvalHeaders } from "../protected-action-DiXulRVj.js";
8
- import { a as eventSourceRefresh, i as broadcastChannelRefresh, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-DpCQo0vB.js";
9
- import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-KpBCaY6c.js";
8
+ import { a as eventSourceRefresh, i as broadcastChannelRefresh, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-DgOuhUSn.js";
9
+ import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-jgDndNHa.js";
10
10
  import "svelte/internal/disclose-version";
11
11
  import * as $ from "svelte/internal/client";
12
12
  import { onDestroy } from "svelte";
13
13
  // src/svelte/PermissionBoundary.svelte
14
+ if (typeof window !== "undefined") await import("svelte/internal/init-operations");
14
15
  function PermissionBoundary$1($$anchor, $$props) {
15
16
  $.push($$props, true);
16
17
  let refused = $.state(null);
@@ -60,6 +61,7 @@ function PermissionBoundary$1($$anchor, $$props) {
60
61
  $.pop();
61
62
  }
62
63
  // src/svelte/Protected.svelte
64
+ if (typeof window !== "undefined") await import("svelte/internal/init-operations");
63
65
  function Protected$1($$anchor, $$props) {
64
66
  $.push($$props, true);
65
67
  const store = getStore();
@@ -1,7 +1,7 @@
1
1
  import { n as boundaryDigest, r as boundaryFallback, t as PermissionBoundaryState } from "../boundary-DJqHADKu.js";
2
- import { a as scopedFor, c as slotContent, i as ProtectedProps, o as viewFor, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-BRECeQ2n.js";
3
- import { t as ClientStore } from "../store-core-BdFcruPm.js";
4
- import { n as DescribeMessages } from "../describe-AdETpWsn.js";
2
+ import { a as scopedFor, c as slotContent, i as ProtectedProps, o as viewFor, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-DNOJRhyn.js";
3
+ import { t as ClientStore } from "../store-core-Bq7Qc9QM.js";
4
+ import { n as DescribeMessages } from "../describe-FT1oVN_o.js";
5
5
  /** The provider's `defaults` and `messages`. */
6
6
  type PermDockUi = {
7
7
  readonly defaults?: PermDockDefaults | undefined;
@@ -1,5 +1,5 @@
1
1
  import { n as boundaryFallback, t as boundaryDigest } from "../boundary--5Swp7sN.js";
2
2
  import { d as slotContent } from "../views-Dpr1uB16.js";
3
- import { n as getUi, t as getStore } from "../context-BQHKgT1m.js";
3
+ import { n as getUi, t as getStore } from "../context-Nr3nknZX.js";
4
4
  import { n as viewFor, t as scopedFor } from "../runtime-Cl6xSbEq.js";
5
5
  export { boundaryDigest, boundaryFallback, getStore, getUi, scopedFor, slotContent, viewFor };
@@ -1,11 +1,11 @@
1
- import { i as ProtectedProps, n as ProtectedActionReadable, r as SveltePermDockOptions, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-BRECeQ2n.js";
2
- import { i as describe } from "../describe-AdETpWsn.js";
3
- import { c as requiredPlans } from "../errors-COoiWqIs.js";
1
+ import { i as ProtectedProps, n as ProtectedActionReadable, r as SveltePermDockOptions, s as PermissionBoundaryProps, t as PermDockDefaults } from "../types-DNOJRhyn.js";
2
+ import { i as describe } from "../describe-FT1oVN_o.js";
3
+ import { c as requiredPlans } from "../errors-BGosrHl8.js";
4
4
  import { t as approvalHeaders } from "../headers-D1oRr-js.js";
5
5
  import { a as broadcastChannelRefresh, c as visibilityRefresh, i as authzChangeRefresh, n as EventSourceRefreshOptions, o as eventSourceRefresh, r as RefreshTrigger, s as focusRefresh, t as AuthzChangeRefresh } from "../refresh-on-C1zIMtJr.js";
6
- import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-D6MIjN_-.js";
6
+ import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-Dn7TpQFa.js";
7
7
  import { t as PermissionBoundaryState } from "../boundary-DJqHADKu.js";
8
- import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, i as ApprovalState, l as GateView, m as ProtectedActionView, o as ClientStatus, r as ApprovalHandle, s as FilterResult, v as TenantView, y as ActionResult } from "../store-core-BdFcruPm.js";
8
+ import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, i as ApprovalState, l as GateView, m as ProtectedActionView, o as ClientStatus, r as ApprovalHandle, s as FilterResult, v as TenantView, y as ActionResult } from "../store-core-Bq7Qc9QM.js";
9
9
  import { Component } from "svelte";
10
10
  export declare const Protected: Component<ProtectedProps>;
11
11
  export declare const PermissionBoundary: Component<PermissionBoundaryProps>;
@@ -1,8 +1,8 @@
1
1
  import { n as describe } from "../describe-B7EosIKA.js";
2
2
  import { r as requiredPlans } from "../problem-details-EJHcvYCz.js";
3
3
  import { r as approvalHeaders } from "../protected-action-DiXulRVj.js";
4
- import { a as eventSourceRefresh, i as broadcastChannelRefresh, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-DpCQo0vB.js";
5
- import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-KpBCaY6c.js";
4
+ import { a as eventSourceRefresh, i as broadcastChannelRefresh, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-DgOuhUSn.js";
5
+ import { a as gate, c as memberships, d as protectedAction, f as roles, h as tenant, i as filtered, l as permission, m as subject, n as assignable, o as getDescribe, p as setPermDock, r as assignablePermissions, s as getPermDock, t as approval, u as permissions } from "../stores-jgDndNHa.js";
6
6
  import PermissionBoundaryComponent from "./PermissionBoundary.svelte";
7
7
  import ProtectedComponent from "./Protected.svelte";
8
8
  // src/svelte/source.ts
@@ -1,9 +1,9 @@
1
- import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, u as SnapshotQuery, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-C2XX60aF.js";
1
+ import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, u as SnapshotQuery, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-BlMijUtb.js";
2
2
  import { a as OperationInput, t as Operation } from "../operations-DaEoGpMV.js";
3
- import { a as PermDock } from "../permdock-BShHM8OJ.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, nn as Snapshot } from "../policy-types-CfW4X_yX.js";
6
- import { a as ProtectTarget, i as PermDockHandlers, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-CJncmsPg.js";
5
+ import { D as Policy, N as PolicyVocabulary, Or as Principal, rn as Snapshot } from "../policy-types-BnBZvh7N.js";
6
+ import { a as ProtectTarget, i as PermDockHandlers, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-Dci9NnyZ.js";
7
7
  import { RequestEvent } from "@sveltejs/kit";
8
8
  /**
9
9
  * A `handle` hook. SvelteKit 2 exports `Handle` from `@sveltejs/kit` and
@@ -1,5 +1,5 @@
1
1
  import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
2
- import { n as guardedRoute, r as instanceRoute, t as fetchAdapter } from "../fetch-adapter-CU1DIkXu.js";
2
+ import { n as guardedRoute, r as instanceRoute, t as fetchAdapter } from "../fetch-adapter-BXQc4NoV.js";
3
3
  // src/sveltekit/create.ts
4
4
  const route = {
5
5
  context: (event) => event,