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
@@ -0,0 +1,182 @@
1
+ import { a as scopeMembershipTable, i as scopeColumn } from "./compile-BUKXrueE.js";
2
+ import { c as rootScope, l as scopeChain } from "./scopes-B-KX9EI8.js";
3
+ import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
4
+ import { l as roleColumn } from "./sources-C6Id63F8.js";
5
+ import { i as configError } from "./errors-DgLOqc6j.js";
6
+ import { a as quoteIdent, o as quoteLiteral, t as CLI } from "./quote-LNaBdCGA.js";
7
+ import { f as subjectIdSql } from "./subject-B7p94Y0s.js";
8
+ // src/cli/sql/names.ts
9
+ /** The closure table graph grants read. Part of the SQL contract. */
10
+ const CLOSURE = { table: "permdock_closure" };
11
+ /**
12
+ * The snake_case SQL name of a resource or link (`chatThread` becomes
13
+ * `chat_thread`), or `undefined` when it is not made of ASCII letters, digits
14
+ * and underscores starting with a letter.
15
+ */
16
+ function graphSqlName(name) {
17
+ if (!/^[A-Za-z][A-Za-z0-9_]*$/u.test(name)) return;
18
+ return name.replaceAll(/([a-z0-9])([A-Z])/gu, "$1_$2").replaceAll(/([A-Z]+)([A-Z][a-z])/gu, "$1_$2").toLowerCase();
19
+ }
20
+ function sqlNameOf(name, label) {
21
+ const sql = graphSqlName(name);
22
+ if (sql === void 0) throw configError(`PermDock CLI: ${label} is not a SQL name (letters, digits and underscores, starting with a letter), so rls generate cannot name its helper`);
23
+ return sql;
24
+ }
25
+ /**
26
+ * The helper returning the ids of `resource` the subject holds a relation on:
27
+ * `permitted_<snake_case resource>_ids`.
28
+ */
29
+ function graphHelper(resource) {
30
+ return permittedIdsHelper(sqlNameOf(resource, `resource '${resource}'`));
31
+ }
32
+ function inheritedRowsHelper(resource) {
33
+ return `permitted_${sqlNameOf(resource, `resource '${resource}'`)}_rows`;
34
+ }
35
+ /**
36
+ * The helper returning the ids of `resource` whose `link` points into the ids
37
+ * it is given.
38
+ */
39
+ function linkHelper(resource, link) {
40
+ return `permdock_link_${sqlNameOf(resource, `resource '${resource}'`)}_${sqlNameOf(link, `link '${link}' on ${resource}`)}`;
41
+ }
42
+ function restrictedHelper(resource) {
43
+ return `permdock_restricted_${sqlNameOf(resource, `resource '${resource}'`)}`;
44
+ }
45
+ /**
46
+ * Graph SQL parts as RLS text: values inline as literals, the subject from the
47
+ * dialect's claim.
48
+ */
49
+ function graphSqlText(parts, ctx) {
50
+ return parts.map((part) => {
51
+ if ("text" in part) return part.text;
52
+ if ("column" in part) return quoteIdent(part.column);
53
+ if ("subject" in part) return subjectIdSql(ctx);
54
+ return typeof part.value === "string" ? quoteLiteral(part.value) : String(part.value);
55
+ }).join("");
56
+ }
57
+ /**
58
+ * The role column of an `rls.memberships` table aliased `alias`; a `through`
59
+ * column joins its roles table as `<alias>k`, after a newline and `indent`
60
+ * (inline without one).
61
+ */
62
+ function memberRoleOf(table, alias = "m", indent) {
63
+ return roleColumn(table.role, qualifySqlTable(table.table), alias, {
64
+ label: `rls.memberships ${table.table} role`,
65
+ prefix: CLI,
66
+ ...indent === void 0 ? {} : { indent }
67
+ });
68
+ }
69
+ /** The schema-qualified name of a table under `search_path = ''`. */
70
+ /** The helper returning the ids of scope `name` a grant key reaches. */
71
+ function permittedIdsHelper(name) {
72
+ if (!/^[a-z][a-z0-9_]*$/u.test(name)) throw configError(`PermDock CLI: unsafe scope name '${name}'`);
73
+ return `permitted_${name}_ids`;
74
+ }
75
+ /**
76
+ * `permitted_<scope>_ids_for(p_user, p_grant)`: the same ids for a user the
77
+ * caller names.
78
+ */
79
+ function permittedForHelper(name) {
80
+ return `${permittedIdsHelper(name)}_for`;
81
+ }
82
+ /**
83
+ * The helper returning the ids of scope `name` the subject holds any live
84
+ * membership of.
85
+ */
86
+ function memberIdsHelper(name) {
87
+ if (!/^[a-z][a-z0-9_]*$/u.test(name)) throw configError(`PermDock CLI: unsafe scope name '${name}'`);
88
+ return `member_${name}_ids`;
89
+ }
90
+ /**
91
+ * `member_<scope>_ids_for(p_user uuid)`: the same rows for a user the caller
92
+ * names; the token hook's helper.
93
+ */
94
+ function memberForHelper(name) {
95
+ return `${memberIdsHelper(name)}_for`;
96
+ }
97
+ /**
98
+ * `member_<scope>_ids_of(p_user uuid)`: `member_<scope>_ids_for(p_user)` when
99
+ * `p_user` is the caller and no rows otherwise, so `authenticated` may execute
100
+ * it; better-supabase's `teamIdsOf` template calls it.
101
+ */
102
+ function memberOfHelper(name) {
103
+ return `${memberIdsHelper(name)}_of`;
104
+ }
105
+ /** better-supabase's `bootstrapPermissions` reader. Part of the SQL contract. */
106
+ const BOOTSTRAP_PERMISSIONS = "permdock_bootstrap_permissions";
107
+ /** A scope better-supabase reads as its teams: `team` or `teams` (doctor BS417). */
108
+ function isTeamScope(name) {
109
+ return /^teams?$/u.test(name);
110
+ }
111
+ /**
112
+ * Whether `member_<scope>_ids_of` is generated: a team scope with
113
+ * `member_<scope>_ids_for`.
114
+ */
115
+ function hasMemberOf(input, name) {
116
+ return isTeamScope(name) && hasMemberFor(input, name);
117
+ }
118
+ /**
119
+ * Whether `member_<scope>_ids_for` is generated for `name`: Supabase only (its
120
+ * one caller is `supabase_auth_admin`), and only where `memberships` maps a
121
+ * table for the scope or a membership source can hold it.
122
+ */
123
+ function hasMemberFor(input, name) {
124
+ if (input.dialect !== "supabase") return false;
125
+ return memberForTable(input, name) !== void 0 || memberForSources(input, name).length > 0;
126
+ }
127
+ /**
128
+ * Whether `permitted_<scope>_users` can list the members of one instance of
129
+ * `name`: a mapped membership table, or sources that all read a table.
130
+ */
131
+ function hasPermittedUsers(input, name) {
132
+ if (memberForTable(input, name) !== void 0) return true;
133
+ const sources = memberForSources(input, name);
134
+ return sources.length > 0 && sources.every((source) => source.sql.holders !== void 0);
135
+ }
136
+ /**
137
+ * The table `member_<scope>_ids_for` reads for scope `name`, when `memberships`
138
+ * maps one with its id column.
139
+ */
140
+ function memberForTable(input, name) {
141
+ const table = scopeMembershipTable(input.memberships, input.scopes, name);
142
+ return table !== void 0 && scopeColumn(table, input.scopes, name) !== void 0 ? table : void 0;
143
+ }
144
+ /**
145
+ * The sources `member_<scope>_ids_for` reads: none when a table is mapped, as
146
+ * in `database` mode.
147
+ */
148
+ function memberForSources(input, name) {
149
+ if (memberForTable(input, name) !== void 0) return [];
150
+ return (input.memberSources ?? []).filter((source) => source.sql.scope === void 0 || source.sql.scope === name);
151
+ }
152
+ /**
153
+ * The membership sources that can hold scope `name` when `memberships` maps no
154
+ * table for it: every `tableMembershipSource` source and the
155
+ * `junctionMembershipSource` sources of that scope. Empty outside `database`
156
+ * mode.
157
+ */
158
+ function scopeSources(ctx, name) {
159
+ if (ctx.authorize !== "database" || scopeTable(ctx, name) !== void 0) return [];
160
+ return (ctx.sources ?? []).filter((source) => source.sql.scope === void 0 || source.sql.scope === name);
161
+ }
162
+ /**
163
+ * The membership table mapped for scope `name`, with the column of its id and
164
+ * of the first scope's id.
165
+ */
166
+ function scopeTable(ctx, name) {
167
+ const table = scopeMembershipTable(ctx.memberships, ctx.scopes, name);
168
+ if (table === void 0) return;
169
+ const column = scopeColumn(table, ctx.scopes, name);
170
+ if (column === void 0) return;
171
+ const root = rootScope(ctx.scopes);
172
+ const tenantColumn = root !== void 0 && scopeChain(ctx.scopes, name).includes(root) ? scopeColumn(table, ctx.scopes, root) : void 0;
173
+ return tenantColumn === void 0 ? {
174
+ table,
175
+ column
176
+ } : {
177
+ table,
178
+ column,
179
+ tenantColumn
180
+ };
181
+ }
182
+ export { scopeTable as S, memberRoleOf as _, graphSqlText as a, restrictedHelper as b, hasPermittedUsers as c, linkHelper as d, memberForHelper as f, memberOfHelper as g, memberIdsHelper as h, graphSqlName as i, inheritedRowsHelper as l, memberForTable as m, CLOSURE as n, hasMemberFor as o, memberForSources as p, graphHelper as r, hasMemberOf as s, BOOTSTRAP_PERMISSIONS as t, isTeamScope as u, permittedForHelper as v, scopeSources as x, permittedIdsHelper as y };
@@ -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 } from "../policy-types-CfW4X_yX.js";
4
+ import { D as Policy, 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 { r as sendResponse, t as NodeRequest } from "../http-BUIYu1Kc.js";
8
8
  import { CanActivate, DynamicModule, ExceptionFilter, ExecutionContext, Type } from "@nestjs/common";
9
9
  /**
@@ -2,7 +2,7 @@ import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSi
2
2
  import { t as compact } from "../compact-C4LFuqbW.js";
3
3
  import { n as PermDockDeniedError, r as PermDockRevokedError, t as PermDockApprovalRequiredError } from "../errors-DOSkVeTC.js";
4
4
  import { n as PermDockValidationError } from "../validation-error-CgDOA6VS.js";
5
- import { a as socketConnection, r as bindKernel } from "../bind-BYeoLJgN.js";
5
+ import { a as socketConnection, r as bindKernel } from "../bind-DPptdk31.js";
6
6
  import { c as writeReply, r as hasCredentials } from "../http-C9jDw_bZ.js";
7
7
  import { t as problemFromError } from "../map-error-DYQbf-3Q.js";
8
8
  import { a as onRevoked, n as closeReason, t as POLICY_VIOLATION } from "../stream-DdF94h7T.js";
@@ -1,15 +1,15 @@
1
- import { a as snapshotHeaders, i as cacheLifeFor, n as SnapshotHeaders, o as snapshotKey, r as SnapshotHeadersOptions, s as snapshotTag, t as CacheLifeForOptions } from "../snapshot-cache-DGvLQW0-.js";
2
- import { r as warm, t as WarmReport } from "../warm-BR-mrnY-.js";
3
- import { D as Policy, Er as Principal, N as PolicyVocabulary, Or as Subject, Q as Intent, ar as DenialReason, dn as SnapshotTenants, nn as Snapshot, nr as Decision } from "../policy-types-CfW4X_yX.js";
4
- import { m as ApprovalStore } from "../types-vKKndyxx.js";
5
- import { b as ProtectedAction, y as ActionResult } from "../store-core-BdFcruPm.js";
6
- import { F as PermissionState, P as PermissionCheck, a as PermDock, d as UncheckedData, s as RowData } from "../permdock-BShHM8OJ.js";
7
- import { n as DescribeMessages } from "../describe-AdETpWsn.js";
8
- import { t as InstanceOptions } from "../instance-options-DQCiBBuz.js";
1
+ import { a as snapshotHeaders, i as cacheLifeFor, n as SnapshotHeaders, o as snapshotKey, r as SnapshotHeadersOptions, s as snapshotTag, t as CacheLifeForOptions } from "../snapshot-cache-CVYqOThu.js";
2
+ import { r as warm, t as WarmReport } from "../warm-BKD3FN6k.js";
3
+ import { Ar as Subject, D as Policy, N as PolicyVocabulary, Or as Principal, Q as Intent, ir as Decision, pn as SnapshotTenants, rn as Snapshot, sr as DenialReason } from "../policy-types-BnBZvh7N.js";
4
+ import { m as ApprovalStore } from "../types-5cvjmHTG.js";
5
+ import { b as ProtectedAction, y as ActionResult } from "../store-core-Bq7Qc9QM.js";
6
+ import { F as PermissionState, P as PermissionCheck, a as PermDock, d as UncheckedData, s as RowData } from "../permdock-V86uejcm.js";
7
+ import { n as DescribeMessages } from "../describe-FT1oVN_o.js";
8
+ import { t as InstanceOptions } from "../instance-options-hq5Cp2Ih.js";
9
9
  import { w as Permission } from "../vocabulary-DHfKPIC5.js";
10
- import { n as PermDockWrap } from "../wrap-D8WtzrB7.js";
11
- import { o as OtelWrap } from "../types-DwoRXDvN.js";
12
- import { n as PermDockProviderProps } from "../types-BKnUwgvx.js";
10
+ import { n as PermDockWrap } from "../wrap-CaAA3ubO.js";
11
+ import { o as OtelWrap } from "../types-BMKDvcXc.js";
12
+ import { n as PermDockProviderProps } from "../types-Dl2jRkyq.js";
13
13
  import { n as TenantSlugResolver } from "../tenant-from-path-Dq3jkqjh.js";
14
14
  import { ReactElement, ReactNode } from "react";
15
15
  import { StandardSchemaV1 } from "@standard-schema/spec";
@@ -1,7 +1,7 @@
1
1
  import { i as snapshotTag, n as snapshotHeaders, r as snapshotKey, t as cacheLifeFor } from "../snapshot-cache-DTTEfmxv.js";
2
- import { t as warm } from "../warm-5yxlUmBh.js";
3
- import { u as withApp } from "../permdock-CJPIwU1T.js";
4
- import { n as resolveOrNull, t as buildInstance } from "../build-instance-CFiegi_w.js";
2
+ import { t as warm } from "../warm-BZ0ZwSmO.js";
3
+ import { u as withApp } from "../permdock-JM9TKevZ.js";
4
+ import { n as resolveOrNull, t as buildInstance } from "../build-instance-DZEWYO-A.js";
5
5
  import { a as permissionStates } from "../checks-DSm45qH7.js";
6
6
  import { t as compact } from "../compact-C4LFuqbW.js";
7
7
  import { n as NO_GRANT, t as LOAD_FAILED } from "../decision-hHv4UZgy.js";
@@ -1,4 +1,4 @@
1
- import { n as PermDockPluginOptions } from "../types-run-Bwn1MuW0.js";
1
+ import { n as PermDockPluginOptions } from "../types-run-ByHuYUen.js";
2
2
  /** Any object: Next's `NextConfig` is an interface, so no index signature. */
3
3
  type NextConfigLike = object;
4
4
  /** What `next.config` may export: an object, or a function of the phase. */
@@ -1,8 +1,8 @@
1
- import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, r as Guard, s as ScopeGuard, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-C2XX60aF.js";
2
- import { a as PermDock } from "../permdock-BShHM8OJ.js";
1
+ import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, r as Guard, s as ScopeGuard, 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";
5
- import { t as ServerAdapterOptions } from "../bind-zQacwAOg.js";
4
+ import { D as Policy, N as PolicyVocabulary, Or as Principal } from "../policy-types-BnBZvh7N.js";
5
+ import { t as ServerAdapterOptions } from "../bind-Bwk9tt1z.js";
6
6
  import { i as toRequest, n as isServerResponse, r as sendResponse, t as NodeRequest } from "../http-BUIYu1Kc.js";
7
7
  import { IncomingMessage, ServerResponse } from "node:http";
8
8
  type NodePermDockOptions<TUser = unknown> = ServerAdapterOptions<NodeRequest, TUser>;
@@ -1,5 +1,5 @@
1
1
  import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
2
- import { r as bindKernel } from "../bind-BYeoLJgN.js";
2
+ import { r as bindKernel } from "../bind-DPptdk31.js";
3
3
  import { n as sendResponse, r as toRequest, t as isServerResponse } from "../http-dNltTpC8.js";
4
4
  // src/node/create.ts
5
5
  const nodeRequest = (req) => req;
@@ -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
  /** The app context passed to `run(agent, input, { context })`. */
7
7
  type OpenAiContext = {
8
8
  readonly user?: unknown;
@@ -1,6 +1,6 @@
1
- import { t as agentRuntime } from "../create-nOWD3Joc.js";
2
- import { t as approvalTokenOf } from "../kernel-C5akxw5n.js";
3
- import { u as withApp } from "../permdock-CJPIwU1T.js";
1
+ import { t as agentRuntime } from "../create-BRY0OtFV.js";
2
+ import { t as approvalTokenOf } from "../kernel-DSnWVZ0O.js";
3
+ import { u as withApp } from "../permdock-JM9TKevZ.js";
4
4
  import { t as compact } from "../compact-C4LFuqbW.js";
5
5
  // src/openai/create.ts
6
6
  function appContext(runContext) {
@@ -1,7 +1,7 @@
1
- import { D as Policy, Er as Principal, Nr as Condition } from "../policy-types-CfW4X_yX.js";
1
+ import { D as Policy, Fr as Condition, Or as Principal } from "../policy-types-BnBZvh7N.js";
2
2
  import { w as Permission } from "../vocabulary-DHfKPIC5.js";
3
3
  import { a as OpenApiOperationRef, c as OperationEntry, d as OperationSkipCause, f as operationPermissions, i as OPERATION_SKIP_CAUSES, l as OperationLookup, n as OperationCoverageOptions, o as OperationDeclaration, p as operationPermissionsFromOpenApi, r as operationCoverage, s as OperationEnforcement, t as OperationCoverage, u as OperationPermissions } from "../coverage-AOeWiQ7Z.js";
4
- import { a as ProblemDetails } from "../errors-COoiWqIs.js";
4
+ import { a as ProblemDetails } from "../errors-BGosrHl8.js";
5
5
  import { StandardJSONSchemaV1, StandardSchemaV1 } from "@standard-schema/spec";
6
6
  type OpenApiTarget = "3.1" | "3.2" | "3.3";
7
7
  type OverlayVersion = "1.1" | "1.2";
@@ -88,7 +88,7 @@ const importDocument = defineLeaf({
88
88
  async run(ctx, { flags }) {
89
89
  const doc = given(flags.doc);
90
90
  if (doc === void 0) throw missingInput("openapi import", ["--doc"], "the OpenAPI document to import");
91
- return (await import("./import-BAhoTYTk.js")).runOpenapiImport({
91
+ return (await import("./import-DppjSugv.js")).runOpenapiImport({
92
92
  cwd: ctx.cwd,
93
93
  doc,
94
94
  out: fileOut("openapi import", flags.out),
@@ -3,7 +3,7 @@ import { n as CliError } from "./errors-DgLOqc6j.js";
3
3
  /** The annotated document, without writing it. */
4
4
  async function openapiDocument(task, options, source) {
5
5
  if (options.doc === void 0) return [];
6
- const { runOpenapi } = await import("./openapi-BeMVHVY4.js");
6
+ const { runOpenapi } = await import("./openapi-g58VVrsc.js");
7
7
  const outcome = await runOpenapi({
8
8
  cwd: source.cwd,
9
9
  config: source.config,
@@ -1,5 +1,5 @@
1
1
  import { r as isRecord } from "./compact-C4LFuqbW.js";
2
- import { r as definePolicy } from "./policy-BBvhhH9X.js";
2
+ import { r as definePolicy } from "./policy-CZBJDcTx.js";
3
3
  import { a as getResource, n as findPermission } from "./permission-registry-DstT40VS.js";
4
4
  import { i as createPermDock, o as openapiVersion } from "./openapi-CZu6sVsP.js";
5
5
  import { i as configError } from "./errors-DgLOqc6j.js";
@@ -7,7 +7,7 @@ import { i as fileDrift } from "./output-files-8lfALMSU.js";
7
7
  import { t as shortDiff } from "./text-diff-DxKRNFlx.js";
8
8
  import { i as readJsonFile, s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
9
9
  import { a as loadModule, n as asPolicy, s as pickNamed, t as asPermissionTree } from "./load-m7jmit3y.js";
10
- import { n as validateOverlay, t as validateOpenapi } from "./schema-DBRKgQb4.js";
10
+ import { n as validateOverlay, t as validateOpenapi } from "./schema-CbzVUpWv.js";
11
11
  import { existsSync } from "node:fs";
12
12
  import { resolve } from "node:path";
13
13
  // src/cli/openapi/emit/merge.ts
@@ -1,10 +1,10 @@
1
- import { a as PermDock } from "../permdock-BShHM8OJ.js";
1
+ import { a as PermDock } from "../permdock-V86uejcm.js";
2
2
  import { w as Permission } from "../vocabulary-DHfKPIC5.js";
3
- import { D as Policy, Er as Principal, N as PolicyVocabulary } from "../policy-types-CfW4X_yX.js";
3
+ import { D as Policy, N as PolicyVocabulary, Or as Principal } from "../policy-types-BnBZvh7N.js";
4
4
  import { n as RevocationFeed } from "../revocations-ku_f2d2y.js";
5
- import { t as ServerAdapterOptions } from "../bind-zQacwAOg.js";
6
- import { D as ConnectionOptions, T as Connection, i as OpenApiHooks } from "../server-types-C2XX60aF.js";
7
- import { t as RpcProtectOptions } from "../rpc-COnquydd.js";
5
+ import { t as ServerAdapterOptions } from "../bind-Bwk9tt1z.js";
6
+ import { D as ConnectionOptions, T as Connection, i as OpenApiHooks } from "../server-types-BlMijUtb.js";
7
+ import { t as RpcProtectOptions } from "../rpc-DyCWVn6C.js";
8
8
  import { a as OperationInput, t as Operation } from "../operations-DaEoGpMV.js";
9
9
  import { AnySchema, MetaPlugin, Middleware, Procedure, Schema } from "@orpc/server";
10
10
  import { StandardSchemaV1 } from "@standard-schema/spec";
@@ -1,9 +1,9 @@
1
1
  import { t as compact } from "../compact-C4LFuqbW.js";
2
2
  import { o as isPermission } from "../permission-registry-DstT40VS.js";
3
- import { n as attached } from "../bind-BYeoLJgN.js";
3
+ import { n as attached } from "../bind-DPptdk31.js";
4
4
  import { o as problemMessage } from "../http-C9jDw_bZ.js";
5
5
  import { t as problemFromError } from "../map-error-DYQbf-3Q.js";
6
- import { i as rpcCode, n as guardStream, r as problemBody, t as bindRpcKernel } from "../rpc-D7G7IJDa.js";
6
+ import { i as rpcCode, n as guardStream, r as problemBody, t as bindRpcKernel } from "../rpc-BQPa7tLP.js";
7
7
  import { i as isAsyncIterable, o as reloadAfter } from "../stream-DdF94h7T.js";
8
8
  import { r as permissionList } from "../decide-set-CgNcE6pP.js";
9
9
  import { ORPCError, os } from "@orpc/server";
@@ -1,6 +1,6 @@
1
- import { a as PermDock } from "../permdock-BShHM8OJ.js";
2
- import { N as PolicyVocabulary } from "../policy-types-CfW4X_yX.js";
3
- import { a as OtelOptions, i as OtelApi, n as GEN_AI_TOOL_CALL_ID, o as OtelWrap, r as GEN_AI_TOOL_NAME, s as StructuralLogger, t as GENAI_SEMCONV_PIN } from "../types-DwoRXDvN.js";
1
+ import { a as PermDock } from "../permdock-V86uejcm.js";
2
+ import { N as PolicyVocabulary } from "../policy-types-BnBZvh7N.js";
3
+ import { a as OtelOptions, i as OtelApi, n as GEN_AI_TOOL_CALL_ID, o as OtelWrap, r as GEN_AI_TOOL_NAME, s as StructuralLogger, t as GENAI_SEMCONV_PIN } from "../types-BMKDvcXc.js";
4
4
  /**
5
5
  * Listens on one instance. Spans carry no duration and no histogram is
6
6
  * recorded, because a listener only sees a decision after it is made; use
@@ -1,5 +1,5 @@
1
1
  import { c as isActionRequired, l as isRetryable, n as CliError, t as CLI_ERRORS_URL } from "./errors-DgLOqc6j.js";
2
- import { t as DOCS_BASE } from "./manifest-31igzVGQ.js";
2
+ import { t as DOCS_BASE } from "./manifest-BUeAHWDT.js";
3
3
  import { s as cliVersion } from "./version-D-jWyJb9.js";
4
4
  import { createHash } from "node:crypto";
5
5
  // src/cli/core/consent.ts
@@ -1,13 +1,14 @@
1
1
  import { l as scopeChain, s as resolveScope } from "./scopes-B-KX9EI8.js";
2
2
  import { r as findRole } from "./vocabulary-CE2k7s1a.js";
3
- import { A as membershipRows, D as globalRoleRows, I as hasCustomRoleChecksFor, T as sourcesKeep, V as storedTenant, at as memberRoleOf, d as disabledColumn, h as memberColumn, j as roleRows, l as claimKeptLines, lt as scopeSources, n as delegatedGlobalSql, nt as memberForTable, o as interactiveSessionSql, ut as scopeTable, x as sourceFilters } from "./interactive-only-Dqww0ABO.js";
4
- import { C as tenantTypeOf, a as kindFilterSql, f as subjectIdSql, r as globalKindFilterSql, s as memberVia } from "./subject-CrldGifz.js";
3
+ import { S as scopeTable, _ as memberRoleOf, m as memberForTable, x as scopeSources } from "./names-DBxKx2bz.js";
4
+ import { C as tenantTypeOf, a as kindFilterSql, f as subjectIdSql, r as globalKindFilterSql, s as memberVia } from "./subject-B7p94Y0s.js";
5
5
  import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
6
- import { l as roleColumn } from "./sources-DnjJPGfb.js";
6
+ import { l as roleColumn } from "./sources-C6Id63F8.js";
7
7
  import { i as configError } from "./errors-DgLOqc6j.js";
8
- import { a as quoteIdent, i as qualified, n as declaredArray, o as quoteLiteral, s as quoteQualified } from "./quote-BKrTBbcH.js";
9
- import { s as signedIn, t as CUSTOM_ROLES } from "./shared-C6_T7QUo.js";
10
- import { _ as sourceTransferTriggerSql, b as ASSIGNMENTS, g as sourceRowsSql, h as sourceHoldersTriggerSql, m as pairsSql, p as holderSources, v as holdersTriggerSql, x as OWNERSHIP, y as transferTriggerSql } from "./tables-CDq0HVVq.js";
8
+ import { a as quoteIdent, i as qualified, n as declaredArray, o as quoteLiteral, s as quoteQualified } from "./quote-LNaBdCGA.js";
9
+ import { s as signedIn, t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
10
+ import { A as membershipRows, D as globalRoleRows, I as hasCustomRoleChecksFor, T as sourcesKeep, V as storedTenant, d as disabledColumn, h as memberColumn, j as roleRows, l as claimKeptLines, n as delegatedGlobalSql, o as interactiveSessionSql, x as sourceFilters } from "./interactive-only-Bbq9e61G.js";
11
+ import { _ as sourceTransferTriggerSql, b as ASSIGNMENTS, g as sourceRowsSql, h as sourceHoldersTriggerSql, m as pairsSql, p as holderSources, v as holdersTriggerSql, x as OWNERSHIP, y as transferTriggerSql } from "./tables-Bxmf2beb.js";
11
12
  // src/cli/rls/assignments.ts
12
13
  /**
13
14
  * The client roles whose writes the assignment triggers check; any other role
@@ -1,4 +1,4 @@
1
- import { en as LocalSnapshotManifest } from "./policy-types-CfW4X_yX.js";
1
+ import { tn as LocalSnapshotManifest } from "./policy-types-BnBZvh7N.js";
2
2
  /**
3
3
  * Whether `value` has the shape `localSnapshotManifest(policy)` writes, with no
4
4
  * prototype keys. A JSON import widens `v: 1` to `number`; this narrows it back
@@ -1,6 +1,6 @@
1
- import { o as PermDockOptions } from "../permdock-BShHM8OJ.js";
2
- import { D as Policy, Er as Principal, N as PolicyVocabulary, Y as DecisionProvider } from "../policy-types-CfW4X_yX.js";
3
- import { a as RelationMap, c as RemotePdpEndpoints, d as SpiceDbCheck, f as SpiceDbOptions, i as PdpPermDock, l as RemotePdpMapping, n as OpenFgaTuple, o as RemotePdpAuth, r as PdpFactory, s as RemotePdpCache, t as OpenFgaOptions, u as RemotePdpOptions } from "../types-BsRf5rKk.js";
1
+ import { o as PermDockOptions } from "../permdock-V86uejcm.js";
2
+ import { D as Policy, N as PolicyVocabulary, Or as Principal, Y as DecisionProvider } from "../policy-types-BnBZvh7N.js";
3
+ import { a as RelationMap, c as RemotePdpEndpoints, d as SpiceDbCheck, f as SpiceDbOptions, i as PdpPermDock, l as RemotePdpMapping, n as OpenFgaTuple, o as RemotePdpAuth, r as PdpFactory, s as RemotePdpCache, t as OpenFgaOptions, u as RemotePdpOptions } from "../types-CrUguLsE.js";
4
4
  /**
5
5
  * The PDP-aware instance, built synchronously like core `getPermDockSync`; use
6
6
  * `getPermDock` for asynchronous inputs.
package/dist/pdp/index.js CHANGED
@@ -4,7 +4,7 @@ import { n as PermDockValidationError } from "../validation-error-CgDOA6VS.js";
4
4
  import { a as deniedMessage, i as approvalMessage, n as PermDockDeniedError, t as PermDockApprovalRequiredError } from "../errors-DOSkVeTC.js";
5
5
  import { n as freezeDeep } from "../freeze-DGfJq_j2.js";
6
6
  import { n as internalsOf, t as attachInternals } from "../internals-D58TnmDB.js";
7
- import { n as getPermDockSync$1, t as getPermDock$1 } from "../permdock-CJPIwU1T.js";
7
+ import { n as getPermDockSync$1, t as getPermDock$1 } from "../permdock-JM9TKevZ.js";
8
8
  import { a as getResource, c as listPermissions } from "../permission-registry-DstT40VS.js";
9
9
  import { a as postJson, c as ttlMs, i as joinUrl, n as denied, o as resourceIdOf, r as granted, s as ttlCache, t as cacheKey } from "../shared-BOsJIQf4.js";
10
10
  import { n as toWireDelegation } from "../wire-delegation-DC5Cyec4.js";
@@ -1,14 +1,14 @@
1
1
  import { n as isReadonlyArray, r as isRecord, t as compact } from "./compact-C4LFuqbW.js";
2
- import { A as emptyListeners, I as contactMemberships, L as isContact, a as assignableNamesFor, c as roleSourceFor, j as finish, k as emitSafe, l as sourceName, o as customRolesFor, t as evaluate, y as indexCustomRoles } from "./evaluate-Dmd0bShm.js";
2
+ import { A as emptyListeners, I as contactMemberships, L as isContact, a as assignableNamesFor, c as roleSourceFor, j as finish, k as emitSafe, l as sourceName, o as customRolesFor, t as evaluate, y as indexCustomRoles } from "./evaluate-DNz6wMYv.js";
3
3
  import { n as PermDockValidationError } from "./validation-error-CgDOA6VS.js";
4
4
  import { n as isThenable } from "./thenable-BxMy2v8w.js";
5
- import { c as heldRoleNames, d as audiencesOf, g as asMembershipSource, i as assignableIn, l as roleLeaf, m as roleMeta, n as snapshotScopes, o as collectSnapshotGrants, s as whereGrant, t as snapshotOf, u as applyRoleKinds } from "./instance-snapshot-D9kjL37B.js";
5
+ import { c as heldRoleNames, d as audiencesOf, g as asMembershipSource, i as assignableIn, l as roleLeaf, m as roleMeta, n as snapshotScopes, o as collectSnapshotGrants, s as whereGrant, t as snapshotOf, u as applyRoleKinds } from "./instance-snapshot-D03srwnf.js";
6
6
  import { i as readAppData } from "./app-data-DbSPSPIl.js";
7
7
  import { n as pickVisible, r as sanitizeContext } from "./fields-C0L2FoZk.js";
8
8
  import { n as freezeDeep, t as freezeCopy } from "./freeze-DGfJq_j2.js";
9
9
  import { t as byCodePoint } from "./compare-dfHDj8kT.js";
10
10
  import { _ as keyToScope, a as getResource, c as listPermissions, g as formerScopes, n as findPermission } from "./permission-registry-DstT40VS.js";
11
- import { f as policyX, n as declaredRoleNames } from "./policy-BBvhhH9X.js";
11
+ import { f as policyX, n as declaredRoleNames } from "./policy-CZBJDcTx.js";
12
12
  import { d as scopeList, o as normalizeMemberships, p as tenantOf, s as resolveScope } from "./scopes-B-KX9EI8.js";
13
13
  import { r as isSubject, t as anonymousSubject } from "./subject-DkxY-AhF.js";
14
14
  import { c as nowSeconds, d as resolveActiveTenant, m as tenantsOf, p as scopeField, t as heldRoleNamesIn, u as relatesTo } from "./tenancy-B5Xxt9Sc.js";
@@ -16,15 +16,15 @@ import { a as deniedMessage, i as approvalMessage, n as PermDockDeniedError, t a
16
16
  import { i as decideAllWith, n as canAllWith } from "./checks-DSm45qH7.js";
17
17
  import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
18
18
  import { r as sha256Digest } from "./sha256-DFsnyVPo.js";
19
- import { a as internGrants, n as compactSnapshot } from "./snapshot-compact-yXFxZLPo.js";
19
+ import { a as internGrants, n as compactSnapshot } from "./snapshot-compact-BWMLnIXK.js";
20
20
  import { i as withoutRequirement } from "./snapshot-requires-DfUqCLEb.js";
21
- import { a as snapshotVocabulary, i as snapshotGrant, s as subjectFromSnapshot } from "./snapshot-Ty0uk9wZ.js";
21
+ import { a as snapshotVocabulary, i as snapshotGrant, s as subjectFromSnapshot } from "./snapshot-Dzi4LR6n.js";
22
22
  import { r as findRole } from "./vocabulary-CE2k7s1a.js";
23
- import { a as permittedScopeIds, c as deniedFor, i as permittedIds, n as filterIds, o as withExpandedView, r as mayUseOf, s as decideForTarget } from "./may-use-4HzzgYJ3.js";
23
+ import { a as permittedScopeIds, c as deniedFor, i as permittedIds, n as filterIds, o as withExpandedView, r as mayUseOf, s as decideForTarget } from "./may-use-ikNCnNgZ.js";
24
24
  import { o as flattenGrantee } from "./grantee-BSCdpIF3.js";
25
- import { i as whereFromGrants, r as subjectInTenant, t as evaluateSnapshot } from "./snapshot-evaluate-DSNj2rhV.js";
25
+ import { i as whereFromGrants, r as subjectInTenant, t as evaluateSnapshot } from "./snapshot-evaluate-C382Z1mQ.js";
26
26
  import { t as attachInternals } from "./internals-D58TnmDB.js";
27
- import { n as signSnapshot, t as filterMemberships } from "./membership-filter-C7ZuhAqJ.js";
27
+ import { n as signSnapshot, t as filterMemberships } from "./membership-filter-Bz9QX6E9.js";
28
28
  import { r as relationReader, t as pendingRelations } from "./relations-CIgB5KPJ.js";
29
29
  // src/core/granted-permissions.ts
30
30
  /**
@@ -111,12 +111,12 @@ function probeMembership(policy, role, scope) {
111
111
  roles: [role]
112
112
  };
113
113
  }
114
- function probeSnapshot(policy, principal) {
114
+ function probeSnapshot(policy, principal, customRoles = []) {
115
115
  return snapshotOf(policy, {
116
116
  principal,
117
117
  context: {}
118
118
  }, {
119
- customRoles: [],
119
+ customRoles,
120
120
  omitAssignable: true,
121
121
  omitTypeLevel: true,
122
122
  tenants: "all"
@@ -227,7 +227,7 @@ function sameList(a, b) {
227
227
  * from the bundle in any term (a bound claim, a plan gate, a delegation, an
228
228
  * `include`) stays inline, so the client never rebuilds a rule.
229
229
  */
230
- function compactWithBundle(policy, expanded) {
230
+ function compactWithBundle(policy, expanded, custom) {
231
231
  const { bundle, expected: expectedByRole, shared } = memoOf(policy);
232
232
  const memberships = expanded.subject.principal?.memberships ?? [];
233
233
  const memberAt = /* @__PURE__ */ new Map();
@@ -278,7 +278,7 @@ function compactWithBundle(policy, expanded) {
278
278
  }
279
279
  const sharedDigest = shared !== void 0 && bundle.shared !== void 0 && sameList(sharedCanon, shared) ? bundle.shared.digest : void 0;
280
280
  if (sharedDigest !== void 0) for (const at of sharedAt) removed.add(at);
281
- if (held.length === 0 && sharedDigest === void 0) return compactSnapshot(expanded, void 0, bundle);
281
+ if (held.length === 0 && sharedDigest === void 0) return compactSnapshot(expanded, void 0, bundle, custom);
282
282
  const wire = {
283
283
  held,
284
284
  digests,
@@ -287,7 +287,7 @@ function compactWithBundle(policy, expanded) {
287
287
  return compactSnapshot({
288
288
  ...expanded,
289
289
  grants: expanded.grants.filter((_, at) => !removed.has(at))
290
- }, wire, bundle);
290
+ }, wire, bundle, custom);
291
291
  }
292
292
  // src/core/app.ts
293
293
  const APP = Symbol.for("permdock.app");
@@ -1558,4 +1558,4 @@ function getPermDock(policy, user, options = {}) {
1558
1558
  const { instances, ...rest } = options;
1559
1559
  return Promise.resolve().then(() => instances === void 0 ? create(policy, user, rest) : cachedInstance(policy, user, rest, instances, (cached) => create(policy, user, cached)));
1560
1560
  }
1561
- export { delegatedScopeMap as a, APP as c, clientBundle as d, compactWithBundle as f, challengeScope as i, appOf as l, getPermDockSync as n, hasScope as o, isGlobalPermission as p, resolveSubject as r, scopesReaching as s, getPermDock as t, withApp as u };
1561
+ export { sameList as _, delegatedScopeMap as a, APP as c, PROBE as d, canonOf as f, probeSnapshot as g, probeGroup as h, challengeScope as i, appOf as l, compactWithBundle as m, getPermDockSync as n, hasScope as o, clientBundle as p, resolveSubject as r, scopesReaching as s, getPermDock as t, withApp as u, isGlobalPermission as v };
@@ -1,7 +1,7 @@
1
- import { D as Policy, Er as Principal, J as CustomRoleSourceFactory, N as PolicyVocabulary, Nr as Condition, Or as Subject, Q as Intent, Sr as Delegation, Tr as Membership, X as DecisionSink, Z as EntitlementSource, _ as Grant, _n as DecisionEvent, _t as TokenSigner, ct as RelationSource, dn as SnapshotTenants, dr as Obligation, fr as Quota, gr as Actor, it as MembershipSource, jr as AdapterId, kn as Scope, lr as LimitDetail, lt as SettingsSource, mn as AuthEvent, nn as Snapshot, nr as Decision, nt as LimitStore, o as ApprovalOption, q as CustomRoleSource, qt as Instant, sr as ExplainedDecision, y as GrantLimit } from "./policy-types-CfW4X_yX.js";
1
+ import { Ar as Subject, D as Policy, Dr as Membership, Fr as Condition, J as CustomRoleSourceFactory, N as PolicyVocabulary, Nr as AdapterId, Or as Principal, Q as Intent, X as DecisionSink, Z as EntitlementSource, _ as Grant, _t as TokenSigner, ct as RelationSource, dr as LimitDetail, gn as AuthEvent, ir as Decision, it as MembershipSource, jn as Scope, lr as ExplainedDecision, lt as SettingsSource, mr as Quota, nt as LimitStore, o as ApprovalOption, pn as SnapshotTenants, pr as Obligation, q as CustomRoleSource, qt as Instant, rn as Snapshot, vr as Actor, wr as Delegation, y as GrantLimit, yn as DecisionEvent } from "./policy-types-BnBZvh7N.js";
2
2
  import { K as AppData, P as ResourceNode, V as RowOf, a as RoleTree, n as PlanTree, r as Role, w as Permission } from "./vocabulary-DHfKPIC5.js";
3
3
  import { i as OperationEffect, s as OperationMeta, t as Operation, u as OperationRisk } from "./operations-DaEoGpMV.js";
4
- import { a as HostedPolicies } from "./hosted-Bkw3Oyh-.js";
4
+ import { a as HostedPolicies } from "./hosted-BISipW6F.js";
5
5
  /**
6
6
  * One approval requirement kept as data, for a tenant or the whole platform. It
7
7
  * adds to what the code requires and never removes a requirement.
@@ -1,4 +1,4 @@
1
- import { c as crud } from "./src-HRYn4UFj.js";
1
+ import { c as crud } from "./src-BXDohWNO.js";
2
2
  import { t as definePermissions } from "./permissions-DJ_QV9L7.js";
3
3
  import { n as defineRoles, t as definePlans } from "./vocabulary-CE2k7s1a.js";
4
4
  import { v as resource } from "./permission-registry-DstT40VS.js";
@@ -2,8 +2,8 @@ import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
2
2
  import { r as planFiles, t as applyFiles } from "./files-DuV7wRim.js";
3
3
  import { s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
4
4
  import { n as CliError } from "./errors-DgLOqc6j.js";
5
- import { a as ownedObjects, i as inReservedDir, n as foreignSchemaFiles, o as shownKey, s as withoutOwned, t as policyModel } from "./model-BXhr8gUI.js";
6
- import { n as resolveSchemas } from "./supabase-schemas-BglbAG2Z.js";
5
+ import { a as ownedObjects, i as inReservedDir, n as foreignSchemaFiles, o as shownKey, s as withoutOwned, t as policyModel } from "./model-D0EKt-ED.js";
6
+ import { n as resolveSchemas } from "./supabase-schemas-_ubYYw9i.js";
7
7
  import { i as orderPlugins } from "./plugin-MQVfUBUS.js";
8
8
  import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
9
9
  import { join, relative, resolve } from "node:path";
@@ -1,5 +1,5 @@
1
- import { D as Policy, Nr as Condition, _ as Grant, kn as Scope } from "./policy-types-CfW4X_yX.js";
2
- import { a as PermDockConfig } from "./types-config-DNIw_Gt5.js";
1
+ import { D as Policy, Fr as Condition, _ as Grant, jn as Scope } from "./policy-types-BnBZvh7N.js";
2
+ import { a as PermDockConfig } from "./types-config-CyawIkMF.js";
3
3
  import { P as ResourceNode } from "./vocabulary-DHfKPIC5.js";
4
4
  /** The settings of the Supabase project config doctor reads. */
5
5
  type SupabaseConfig = {
@@ -293,7 +293,8 @@ function indexPolicy(roles, grants, vocabulary) {
293
293
  supports,
294
294
  grantsByKey: byKey,
295
295
  resolve: buildResolveIndex(roles, listed, vocabulary),
296
- bundle: /* @__PURE__ */ new WeakMap()
296
+ bundle: /* @__PURE__ */ new WeakMap(),
297
+ customRecords: /* @__PURE__ */ new WeakMap()
297
298
  });
298
299
  }
299
300
  function normalizeLevels(resources) {
@@ -1,4 +1,4 @@
1
- import { D as Policy, Er as Principal, Or as Subject } from "./policy-types-CfW4X_yX.js";
1
+ import { Ar as Subject, D as Policy, Or as Principal } from "./policy-types-BnBZvh7N.js";
2
2
  import { c as saasPlans, l as saasRoles, s as saasPermissions } from "./permissions-UyQD5nRN.js";
3
3
  /** Daily API-key quota per subject; the bucket should be per tenant too. */
4
4
  declare const SAAS_API_KEY_LIMIT = 5;