permdock 0.16.0 → 0.18.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 (384) hide show
  1. package/dist/a2a/index.d.ts +4 -4
  2. package/dist/a2a/index.js +3 -3
  3. package/dist/{adapter-context-CIQpQxbE.js → adapter-context-OHikyRqV.js} +1 -1
  4. package/dist/{adoption-scan-C2BCiUEG.js → adoption-scan-CxExBYSJ.js} +1 -1
  5. package/dist/agent/index.d.ts +2 -2
  6. package/dist/agent/index.js +1 -1
  7. package/dist/ai-sdk/index.d.ts +3 -3
  8. package/dist/ai-sdk/index.js +3 -3
  9. package/dist/approval-normalize-CUjgSsOl.js +189 -0
  10. package/dist/approval-policies-oNnckT12.d.ts +138 -0
  11. package/dist/{approval-prompt-3BqWczTt.d.ts → approval-prompt-Bg7gDSqd.d.ts} +1 -1
  12. package/dist/approvals/index.d.ts +5 -4
  13. package/dist/approvals/index.js +7 -6
  14. package/dist/{approvals-DnIBTuXE.js → approvals-DGId_hgJ.js} +3 -3
  15. package/dist/{approvers-B4r0N_Uz.js → approvers-BaNwKYgd.js} +20 -1
  16. package/dist/{arazzo-ClYz2Z0W.js → arazzo--riLuGY0.js} +4 -4
  17. package/dist/{arazzo-CHoYnQXO.js → arazzo-CEDbb-uM.js} +2 -2
  18. package/dist/{args-0FrVs5EH.js → args-iafbHiXn.js} +2 -5
  19. package/dist/astro/index.d.ts +4 -4
  20. package/dist/astro/index.js +2 -2
  21. package/dist/{audience-DTjR8xet.js → audience-B4YR9UpV.js} +1 -1
  22. package/dist/{auth--yPyZNgr.js → auth-j3Eu-j4h.js} +1 -1
  23. package/dist/authz-topic-Dbc-HDOS.js +15 -0
  24. package/dist/authzen/index.d.ts +5 -5
  25. package/dist/authzen/index.js +2 -2
  26. package/dist/{automation-C6Jg75xq.d.ts → automation-Bfa_wD1h.d.ts} +1 -1
  27. package/dist/better-auth/index.d.ts +1 -1
  28. package/dist/better-auth/index.js +10 -8
  29. package/dist/better-supabase/index.d.ts +335 -38
  30. package/dist/better-supabase/index.js +778 -117
  31. package/dist/{better-supabase-Dirf_8Ec.js → better-supabase-BJtQ-kNf.js} +26 -10
  32. package/dist/{bind-BNQA9JK9.js → bind-B4pMH9bm.js} +6 -6
  33. package/dist/{bind-YYjvfpB9.d.ts → bind-DR6ku3A9.d.ts} +7 -7
  34. package/dist/{budget-BELja5A9.js → budget-BBCPDOGP.js} +1 -1
  35. package/dist/{budget-hYsPz_yE.d.ts → budget-CNLsV2SL.d.ts} +1 -1
  36. package/dist/{build-instance-BWXqwQYU.js → build-instance-BFMFQdE_.js} +3 -2
  37. package/dist/{capability-Di9tiUvi.d.ts → capability-BZ_veK9o.d.ts} +1 -1
  38. package/dist/{capability-BqX94r07.js → capability-zN6T9fxe.js} +2 -3
  39. package/dist/{casbin-D_rVQ31U.js → casbin-DCQHkkyj.js} +2 -2
  40. package/dist/{casbin-C9EvElBb.js → casbin-bKC1FpEx.js} +2 -2
  41. package/dist/{casl-C4OINZHI.js → casl-CjBVJj8R.js} +2 -2
  42. package/dist/{casl-CHHoCldP.js → casl-CkBssiB1.js} +1 -1
  43. package/dist/catalog/index.d.ts +5 -5
  44. package/dist/catalog/index.js +7 -7
  45. package/dist/catalog-Caqhbdix.js +1 -0
  46. package/dist/{catalog-CGlSwU6j.js → catalog-D1fw8qif.js} +5 -5
  47. package/dist/{catalog-doc-DjMKzJp9.js → catalog-doc-C4DGfJCO.js} +3 -3
  48. package/dist/{catalog-operations-DeHTrJSV.js → catalog-operations-BD22drQf.js} +4 -4
  49. package/dist/{catalog-amPDr0JQ.js → catalog-zzNuR3sY.js} +3 -3
  50. package/dist/{challenge-DImNcR7B.js → challenge-B2O2OLEk.js} +2 -2
  51. package/dist/chat/index.d.ts +1 -1
  52. package/dist/chat/index.js +2 -2
  53. package/dist/chat-sdk/index.d.ts +3 -3
  54. package/dist/{checks-CGkP3Z7A.js → checks-fyDOhcz0.js} +33 -1
  55. package/dist/claude-agent/index.d.ts +3 -3
  56. package/dist/claude-agent/index.js +2 -2
  57. package/dist/clerk/index.d.ts +2 -2
  58. package/dist/clerk/index.js +10 -7
  59. package/dist/cli/bin.js +1 -1
  60. package/dist/cli/index.d.ts +5 -5
  61. package/dist/cli/index.js +3 -3
  62. package/dist/client-CH7vzSAY.d.ts +32 -0
  63. package/dist/cloud/index.d.ts +8 -8
  64. package/dist/cloud/index.js +1 -1
  65. package/dist/{cloud-DdaJ7ILM.js → cloud-C0vXBmLG.js} +4 -4
  66. package/dist/{codemod-B1USJS7a.js → codemod-C-L0w-u7.js} +3 -3
  67. package/dist/{codemod-ammy6wv4.js → codemod-eYI1FbeJ.js} +395 -8
  68. package/dist/{collect-DnXL4B8c.js → collect-CU85z6Ta.js} +4 -4
  69. package/dist/{collect-WCl8cJQV.js → collect-D878zLDP.js} +4 -4
  70. package/dist/collect-KCtOigxx.js +1 -0
  71. package/dist/compile/index.d.ts +1 -1
  72. package/dist/compile/index.js +1 -1
  73. package/dist/{compile-EzEMB-7v.js → compile-B_oJqmIg.js} +4 -4
  74. package/dist/{compile-BEklRUYo.d.ts → compile-DBm0ub4p.d.ts} +2 -2
  75. package/dist/{completion--Y4YItFZ.js → completion-Dauc6pVT.js} +3 -3
  76. package/dist/{config-CcLlvEYW.js → config-COHmivz9.js} +4 -4
  77. package/dist/{config-BQ77xMZk.js → config-DWp2PucY.js} +2 -2
  78. package/dist/{config-report-DVMOLJ7F.js → config-report-DKpFm5ID.js} +2 -2
  79. package/dist/{context-BnIzxTNE.js → context-DeammvFl.js} +2 -2
  80. package/dist/convex/index.d.ts +4 -4
  81. package/dist/convex/index.js +3 -3
  82. package/dist/{core-lxoANyai.js → core-B8sLve3z.js} +7 -7
  83. package/dist/{core-CFepFiDP.d.ts → core-D87h2kpR.d.ts} +2 -2
  84. package/dist/{create-BLPKnJKa.js → create-3A7J9KRR.js} +6 -5
  85. package/dist/{create-CDd9c22W.d.ts → create-BrQXL-Wt.d.ts} +6 -6
  86. package/dist/{create-BPUopdfL.d.ts → create-BzwjZuRS.d.ts} +7 -7
  87. package/dist/{create-Coq5fIrq.js → create-C-tm3KIF.js} +5 -5
  88. package/dist/{create-DBvUsgzK.d.ts → create-CtoT1lIQ.d.ts} +4 -4
  89. package/dist/{credential-CyyyvCsL.js → credential-B3Hj4puZ.js} +4 -3
  90. package/dist/{credentials-CdDxp7jN.js → credentials-dkycUsY3.js} +1 -1
  91. package/dist/decision-CaG5_eNJ.js +21 -0
  92. package/dist/{delegation-CDB6_keF.js → delegation-aK4T_5WU.js} +3 -3
  93. package/dist/delivery/index.d.ts +4 -4
  94. package/dist/delivery/index.js +1 -1
  95. package/dist/{denied-text-DHldhVUv.d.ts → denied-text-DlIxt8fh.d.ts} +1 -1
  96. package/dist/{describe-BbFPBSms.d.ts → describe-BKtC_8PG.d.ts} +1 -1
  97. package/dist/{describe-Bb4hGK5d.js → describe-BZAlPHxT.js} +2 -1
  98. package/dist/{diff-DfmYaIhB.js → diff-BnNHqtHj.js} +8 -8
  99. package/dist/{diff-CxtbOi2l.js → diff-CBCzOTWM.js} +2 -2
  100. package/dist/{doctor-D1Xnmy6u.js → doctor-CkYKCuX7.js} +233 -30
  101. package/dist/{doctor-CwYc2lJb.js → doctor-xUpR5rXg.js} +3 -3
  102. package/dist/drizzle/index.d.ts +3 -3
  103. package/dist/drizzle/index.js +1 -1
  104. package/dist/elysia/index.d.ts +4 -4
  105. package/dist/elysia/index.js +3 -3
  106. package/dist/{errors-Vpu6rKHl.js → errors-BhRkoNS7.js} +0 -2
  107. package/dist/{errors-BIM4MFsJ.d.ts → errors-TpzkEKgJ.d.ts} +1 -1
  108. package/dist/{evaluate-BAmf_AQd.js → evaluate-Czbj7thS.js} +18 -15
  109. package/dist/{evaluations-DOWuBpWv.d.ts → evaluations-CisTTURl.d.ts} +3 -3
  110. package/dist/{evaluations-IBceAeKT.js → evaluations-h3KoJAPa.js} +3 -22
  111. package/dist/eve/index.d.ts +4 -4
  112. package/dist/eve/index.js +3 -3
  113. package/dist/express/index.d.ts +4 -4
  114. package/dist/express/index.js +3 -3
  115. package/dist/fastify/index.d.ts +4 -4
  116. package/dist/fastify/index.js +3 -3
  117. package/dist/{fetch-adapter-BIbBAtPZ.d.ts → fetch-adapter-BdmfnbJM.d.ts} +2 -2
  118. package/dist/{fetch-adapter-dPTgJVHd.js → fetch-adapter-DH-NJPbL.js} +2 -2
  119. package/dist/{fields-DI8s3cPl.js → fields-CrjL6A49.js} +3 -3
  120. package/dist/{files-B3AA05f1.js → files-CfiRtQ-m.js} +1 -1
  121. package/dist/{fixtures-Bm4_K1ke.js → fixtures-Cemqurt8.js} +10 -4
  122. package/dist/{flags-DXjoTVbS.js → flags-BlmpmXoY.js} +2 -2
  123. package/dist/{from-snapshot-DCakWRsr.js → from-snapshot-DMlSSo9b.js} +14 -12
  124. package/dist/{gen-DwgCSC6V.js → gen-BEIN-DRM.js} +2 -2
  125. package/dist/{gen-DuAhghDw.js → gen-mf-MRwVr.js} +9 -9
  126. package/dist/{generate-CRVV5V7l.js → generate-BqkZq8Dr.js} +2 -2
  127. package/dist/{grantee-conditions-BrYPe-w0.js → grantee-conditions-DX4K_gGI.js} +1 -1
  128. package/dist/{grantee-match-7RZZvoT_.js → grantee-match-BP-k4vRJ.js} +2 -2
  129. package/dist/h3/index.d.ts +4 -4
  130. package/dist/h3/index.js +3 -3
  131. package/dist/{helpers-DJicaG6f.js → helpers-DmqGy63f.js} +85 -13
  132. package/dist/hono/index.d.ts +4 -4
  133. package/dist/hono/index.js +3 -3
  134. package/dist/{hosted-DVxlLZMe.d.ts → hosted-BFNXwcjd.d.ts} +1 -1
  135. package/dist/{hosted-D0IzESu_.js → hosted-waouw2V-.js} +12 -10
  136. package/dist/{http-DOL33cO0.js → http-DhMWeB_h.js} +1 -1
  137. package/dist/{import-CNBF96hB.js → import-C1XXpG_m.js} +4 -4
  138. package/dist/{import-Dfe2unKO.js → import-DObwEota.js} +3 -3
  139. package/dist/{index-BinlXeU-.d.ts → index-BhnOOnp9.d.ts} +2 -2
  140. package/dist/{index-ymept53A.d.ts → index-CVGio3cH.d.ts} +4 -4
  141. package/dist/{index-DJwEgYzA.d.ts → index-CdMOd-GY.d.ts} +17 -11
  142. package/dist/{index-Cay5-Kvx.d.ts → index-CdUTE6qd.d.ts} +11 -10
  143. package/dist/{index-Dj2qF9VC.d.ts → index-Dfv9Toct.d.ts} +1 -1
  144. package/dist/{index-CV-7DWeD.d.ts → index-rFp6X_QP.d.ts} +4 -4
  145. package/dist/index.d.ts +18 -16
  146. package/dist/index.js +24 -20
  147. package/dist/{init-BUo2G-FI.js → init-CNJ8lLjo.js} +5 -5
  148. package/dist/{init-C6cWP3xW.js → init-DS3PEsCG.js} +5 -5
  149. package/dist/{instance-options-CoHn-0e8.d.ts → instance-options-2sFGSdsf.d.ts} +2 -2
  150. package/dist/{instance-snapshot-DuWf1cT3.js → instance-snapshot-BWa71my8.js} +15 -12
  151. package/dist/jwt/index.d.ts +4 -4
  152. package/dist/jwt/index.js +3 -3
  153. package/dist/{kernel-BD8QuMnv.js → kernel-30Z2zM_d.js} +10 -10
  154. package/dist/kysely/index.d.ts +3 -3
  155. package/dist/kysely/index.js +1 -1
  156. package/dist/{load-DjSU5KXO.js → load-BaEamml-.js} +1 -1
  157. package/dist/load-CjnlPxpL.js +1 -0
  158. package/dist/{login-D1MHOomI.js → login-BgK5Jloo.js} +4 -4
  159. package/dist/{login-DCKE5pVy.js → login-DUVzBLh7.js} +4 -4
  160. package/dist/{manifest-BXTbHNIV.js → manifest-BdzBobNK.js} +1 -1
  161. package/dist/{manifest-schema-DQkBK2Mr.js → manifest-schema-CsFsYLF-.js} +1 -1
  162. package/dist/{manifest-Cft51TLK.js → manifest-wclLWBVH.js} +37 -37
  163. package/dist/{map-claims-C-nv08_n.js → map-claims-PQwHynxV.js} +25 -11
  164. package/dist/{map-error-pasIGqMT.js → map-error-BH16Ah8P.js} +1 -1
  165. package/dist/mcp/index.d.ts +8 -8
  166. package/dist/mcp/index.js +9 -9
  167. package/dist/{migrate-BJHxQqT5.js → migrate-BbY5-Khy.js} +4 -4
  168. package/dist/{module-values-B1EVTkHP.js → module-values-B8tNIxdd.js} +2 -2
  169. package/dist/nest/index.d.ts +4 -4
  170. package/dist/nest/index.js +3 -3
  171. package/dist/next/index.d.ts +45 -13
  172. package/dist/next/index.js +68 -30
  173. package/dist/next/plugin.d.ts +1 -1
  174. package/dist/next/plugin.js +2 -2
  175. package/dist/node/index.d.ts +4 -4
  176. package/dist/node/index.js +2 -2
  177. package/dist/openai/index.d.ts +4 -4
  178. package/dist/openai/index.js +3 -3
  179. package/dist/openapi/index.d.ts +2 -2
  180. package/dist/{openapi-BwWkHxvW.js → openapi-C4gFqeRz.js} +4 -4
  181. package/dist/{openapi-DSzQN7Zu.js → openapi-zMEB9qxn.js} +5 -5
  182. package/dist/{operation-findings-CXtFzlKJ.js → operation-findings-CVwJHEu_.js} +1 -1
  183. package/dist/operation-risks-BKOcTv8J.js +13 -0
  184. package/dist/operations-Bm9HFecz.js +89 -0
  185. package/dist/orpc/index.d.ts +5 -5
  186. package/dist/orpc/index.js +3 -3
  187. package/dist/otel/index.d.ts +3 -3
  188. package/dist/otel/index.js +1 -1
  189. package/dist/{output-DlICTjBh.js → output-BFWLER4r.js} +1 -1
  190. package/dist/output-files-BYscrQl-.js +1 -0
  191. package/dist/{output-files-BIQ_9pIs.js → output-files-CM0BnH05.js} +1 -1
  192. package/dist/{ownership-qqBuGJXr.js → ownership-D-mIt-w0.js} +6 -6
  193. package/dist/{parse-1_ZheTW5.js → parse-UTC-sDrt.js} +2 -2
  194. package/dist/{parse-local-manifest-DEiCF4ah.js → parse-local-manifest-CxcSMQgl.js} +2 -2
  195. package/dist/{parse-local-manifest-CCmbhnxP.d.ts → parse-local-manifest-DvjTQNuO.d.ts} +1 -1
  196. package/dist/{parse-request-CwCZpyjV.js → parse-request-DOBVaeiQ.js} +1 -1
  197. package/dist/pdp/index.d.ts +3 -3
  198. package/dist/pdp/index.js +3 -3
  199. package/dist/{peer-Q0fuZ6hx.js → peer-BuK9F53f.js} +1 -1
  200. package/dist/{peer-C9LvBCcb.js → peer-n-swIV4H.js} +1 -1
  201. package/dist/{permdock-BvjivVb9.js → permdock-D-_WrdKu.js} +205 -102
  202. package/dist/{permdock-CprAPN3w.d.ts → permdock-ffY4CMd9.d.ts} +101 -131
  203. package/dist/{permissions-CYcHj_w7.js → permissions-B3ggI88M.js} +2 -2
  204. package/dist/{permissions-CVXmRILq.js → permissions-BaoLxy66.js} +1 -13
  205. package/dist/{pg-DQTqRrou.js → pg-Ddxsd5ZB.js} +2 -2
  206. package/dist/{policy-BycVKnXv.d.ts → policy-BtKSApSt.d.ts} +1 -1
  207. package/dist/{policy-CLQ8__GF.js → policy-cV_wwPb8.js} +5 -4
  208. package/dist/{policy-from-catalog-CU3An8uP.js → policy-from-catalog-B68hGC0S.js} +9 -8
  209. package/dist/{policy-types-DGIO_gxq.d.ts → policy-types-D-GwfQTc.d.ts} +72 -19
  210. package/dist/{postgrest-DAxFltvO.js → postgrest-BrjrckDG.js} +74 -19
  211. package/dist/{postgrest-D5nUGm-c.d.ts → postgrest-D84p5dbA.d.ts} +12 -7
  212. package/dist/{powersync-CBhTBhG2.js → powersync-9PYOE1wt.js} +158 -21
  213. package/dist/{powersync-DAfo0EL5.js → powersync-DStC_g0B.js} +3 -3
  214. package/dist/powersync-xNRlC4jN.js +1 -0
  215. package/dist/preset/index.js +1 -1
  216. package/dist/{preset-BjLzeFpp.js → preset-pPrVyGU5.js} +74 -7
  217. package/dist/prisma/index.d.ts +2 -2
  218. package/dist/prisma/index.js +1 -1
  219. package/dist/{protected-action-QEA8arRB.js → protected-action-B40tU3yP.js} +15 -5
  220. package/dist/{protected-action-D8x73IGm.d.ts → protected-action-Ds_EUY8B.d.ts} +14 -7
  221. package/dist/{protected-action-DUYqb-Ma.js → protected-action-OpOxtTsN.js} +1 -1
  222. package/dist/{provider-C55OGXJ7.js → provider-CY4TSSJo.js} +2 -2
  223. package/dist/{provider-DfLeek9O.d.ts → provider-OtnIiFWm.d.ts} +1 -1
  224. package/dist/{provider-store-CaTv00tr.js → provider-store-BQP_pp8s.js} +2 -2
  225. package/dist/{pull-CQCGy1gv.js → pull-DLP4I1Kl.js} +7 -7
  226. package/dist/pull-UBjDnf4b.js +1 -0
  227. package/dist/{push-Dq_ca4-j.js → push-BSb8j1EW.js} +8 -8
  228. package/dist/{pushed-policy-CDuOL2de.js → pushed-policy-BecMsTtM.js} +1 -1
  229. package/dist/{pushed-policy-CryQheKq.d.ts → pushed-policy-Ck3FZcoy.d.ts} +1 -1
  230. package/dist/react/index.d.ts +8 -8
  231. package/dist/react/index.js +6 -6
  232. package/dist/react/provider-client.d.ts +1 -1
  233. package/dist/react/provider-client.js +1 -1
  234. package/dist/react-native/index.d.ts +104 -39
  235. package/dist/react-native/index.js +199 -40
  236. package/dist/refresh-on-L9UOwATg.d.ts +49 -0
  237. package/dist/{replay-Bs9Df2fQ.d.ts → replay-E5X9E1lC.d.ts} +1 -1
  238. package/dist/{request-context-Duzdf0cd.js → request-context-DM6_jY1n.js} +2 -2
  239. package/dist/{request-schema-DhX7UbfQ.js → request-schema-CMP8Cmxd.js} +5 -0
  240. package/dist/resend/index.d.ts +4 -4
  241. package/dist/{resolve-names-Y1Cb22cp.js → resolve-names-CBl4r4_r.js} +6 -6
  242. package/dist/{rls-tHu7N_Pe.js → rls-DGBL-jDY.js} +20 -20
  243. package/dist/{rls-C5ZGzR_B.js → rls-pAHGYgTb.js} +4 -4
  244. package/dist/{role-builder-BK2-T6oD.js → role-builder-CMW4wWzn.js} +3 -157
  245. package/dist/{rpc-vHIwyXCp.js → rpc-KwX_Jcxz.js} +2 -2
  246. package/dist/{run-DUq1xU4K.js → run-B7lv3NuK.js} +8 -40
  247. package/dist/run-UPbacxPg.js +1 -0
  248. package/dist/{run-ticket-DfnZCh-u.js → run-ticket-CjvXr6wj.js} +1 -1
  249. package/dist/{run-ticket-ylovhyFQ.d.ts → run-ticket-DPaD27_r.d.ts} +2 -2
  250. package/dist/{runtime-BGnrOkVH.js → runtime-rf0ZuyF3.js} +1 -1
  251. package/dist/{saas-DK4V-3Is.js → saas-B8H1MsQ3.js} +13 -10
  252. package/dist/{scan-C3HRH9Fs.js → scan-0r3OZqqK.js} +1 -1
  253. package/dist/{schema-DvXvxPhQ.js → schema-B_9tXrbG.js} +1 -1
  254. package/dist/{schema-BOJjqlWL.js → schema-CuX70xgH.js} +15 -2
  255. package/dist/scim/index.d.ts +1 -1
  256. package/dist/scim/index.js +1 -1
  257. package/dist/{scim-jJBJ7g1Z.js → scim-C30QBBoF.js} +2 -1
  258. package/dist/{scim-D8YupzX1.js → scim-CovliQUg.js} +2 -2
  259. package/dist/{scopes-0Up_UA2t.js → scopes-BSdYaGHs.js} +9 -40
  260. package/dist/server/index.d.ts +11 -11
  261. package/dist/server/index.js +8 -8
  262. package/dist/{server-3cVlTLde.js → server-D0PW6ZCw.js} +2 -2
  263. package/dist/{server-types-CyRN0-Cd.d.ts → server-types-3OnXjZ2D.d.ts} +8 -8
  264. package/dist/{shared-l0oGGetg.js → shared-BRmCJxDK.js} +2 -2
  265. package/dist/{shared-DrGLwM3s.js → shared-DyYVEjKC.js} +2 -2
  266. package/dist/{sink-B5zoUW_O.d.ts → sink-ogbVkyeo.d.ts} +2 -2
  267. package/dist/{skills-Celu2W6v.js → skills-B4MPRxQd.js} +2 -2
  268. package/dist/{skills-B2qTbaQa.js → skills-C9sTD70r.js} +2 -2
  269. package/dist/{snapshot-CXlzi69u.js → snapshot-DN_8J27z.js} +6 -2
  270. package/dist/{snapshot-cache-BjAWkchD.d.ts → snapshot-cache-B4YvlGG_.d.ts} +20 -6
  271. package/dist/{snapshot-cache-Bx_4xC_6.js → snapshot-cache-B66h7FBK.js} +25 -8
  272. package/dist/solid/index.d.ts +7 -7
  273. package/dist/solid/index.js +6 -6
  274. package/dist/solid-start/index.d.ts +4 -4
  275. package/dist/solid-start/index.js +3 -3
  276. package/dist/{sources-oB1Hg1Fm.d.ts → sources-xdQShLDU.d.ts} +1 -1
  277. package/dist/{src-C_pi2Rnh.js → src-Brzq_0in.js} +193 -128
  278. package/dist/ssf/index.d.ts +3 -3
  279. package/dist/ssf/index.js +1 -1
  280. package/dist/{standard-webhooks-DOYEuOLx.d.ts → standard-webhooks-BfPaZ6T1.d.ts} +2 -2
  281. package/dist/{types-tQB2CEnY.d.ts → store-DYeB-_U3.d.ts} +114 -113
  282. package/dist/{store-RNFvaJJv.js → store-DmVqy74I.js} +13 -7
  283. package/dist/{store-options-Dil3lraY.js → store-options--zWn48PK.js} +76 -7
  284. package/dist/{stores-DxZWDXCs.js → stores-BYFopOm1.js} +3 -3
  285. package/dist/{stores-DZJvxFIZ.d.ts → stores-EPul_8MN.d.ts} +5 -6
  286. package/dist/{stream-9y9qw51m.d.ts → stream-W2RuUYly.d.ts} +1 -1
  287. package/dist/{subject-BGoM5o8B.js → subject-C7RddW0G.js} +8 -1
  288. package/dist/supabase/client.d.ts +2 -0
  289. package/dist/supabase/client.js +21 -0
  290. package/dist/supabase/index.d.ts +37 -6
  291. package/dist/supabase/index.js +6 -5
  292. package/dist/supabase/middleware.d.ts +8 -7
  293. package/dist/supabase/middleware.js +6 -6
  294. package/dist/{supabase-CDHMsDD0.js → supabase-BiViJpQ4.js} +31 -8
  295. package/dist/{supabase-DYWnT800.js → supabase-CogTyJH2.js} +3 -3
  296. package/dist/supabase-hook-BN46IrVI.js +1 -0
  297. package/dist/{supabase-hook-HPgwYb9V.js → supabase-hook-DX38Hj8h.js} +393 -32
  298. package/dist/{supautils-SwE642N1.js → supautils-BGf6zRvM.js} +12 -12
  299. package/dist/svelte/index.d.ts +7 -7
  300. package/dist/svelte/index.js +8 -8
  301. package/dist/svelte/runtime.d.ts +3 -3
  302. package/dist/svelte/runtime.js +3 -3
  303. package/dist/svelte/source.d.ts +7 -7
  304. package/dist/svelte/source.js +5 -5
  305. package/dist/sveltekit/index.d.ts +4 -4
  306. package/dist/sveltekit/index.js +2 -2
  307. package/dist/{tables-DimBcVWY.js → tables-BfOk0ymL.js} +7 -7
  308. package/dist/tanstack-start/index.d.ts +4 -4
  309. package/dist/tanstack-start/index.js +2 -2
  310. package/dist/{tenancy-5d1zVBvK.js → tenancy-DvOHHk3-.js} +1 -1
  311. package/dist/terminal/index.d.ts +5 -5
  312. package/dist/terminal/index.js +6 -6
  313. package/dist/testing/core.d.ts +1 -1
  314. package/dist/testing/core.js +1 -1
  315. package/dist/testing/fixtures/index.d.ts +1 -1
  316. package/dist/testing/fixtures/index.js +2 -2
  317. package/dist/testing/index.d.ts +29 -22
  318. package/dist/testing/index.js +120 -48
  319. package/dist/testing/saas/index.d.ts +3 -3
  320. package/dist/testing/saas/index.js +2 -2
  321. package/dist/testing/saas/permissions.js +1 -1
  322. package/dist/token-D6pWn8Uj.d.ts +11 -0
  323. package/dist/{token-DC9EQiet.js → token-DaMnIU9O.js} +24 -8
  324. package/dist/{tool-refusal-Qpjs_W6M.js → tool-refusal-D4spOJ7I.js} +1 -1
  325. package/dist/trpc/index.d.ts +5 -5
  326. package/dist/trpc/index.js +3 -3
  327. package/dist/{type-helpers-c7Xo_2Cu.d.ts → type-helpers-i1EJ3Eb1.d.ts} +1 -1
  328. package/dist/{types-Cklw5hJo.d.ts → types-3Y8UpFkF.d.ts} +40 -1
  329. package/dist/{types-DlelvQk4.d.ts → types-B8qUkGja.d.ts} +2 -2
  330. package/dist/{types-CN0LsqbK.d.ts → types-CCEeSCMB.d.ts} +3 -3
  331. package/dist/{types-B2efzoSX.d.ts → types-CDVXR6YD.d.ts} +1 -1
  332. package/dist/{types-DsHGPtkR.d.ts → types-Ck1KOfug.d.ts} +2 -2
  333. package/dist/{types-DLvhVm1r.d.ts → types-CqcsNCaN.d.ts} +16 -7
  334. package/dist/{types-BB-zWDcR.d.ts → types-D-JO7lh8.d.ts} +5 -5
  335. package/dist/{types-CEinc15V.d.ts → types-D19MK4t-.d.ts} +3 -4
  336. package/dist/{types-B6ExllNo.d.ts → types-DGf_cpKF.d.ts} +2 -2
  337. package/dist/{types-rCRV4Ge-.d.ts → types-DmbfLu2p.d.ts} +4 -4
  338. package/dist/{types-ZzRGoViD.d.ts → types-NYoj8JBm.d.ts} +2 -2
  339. package/dist/{types-CWBsAwqn.d.ts → types-o1vu6Ks3.d.ts} +4 -4
  340. package/dist/unplugin/index.d.ts +1 -1
  341. package/dist/unplugin/index.js +2 -2
  342. package/dist/usage-Cl5eb-e1.js +1 -0
  343. package/dist/{usage-CPXeuAdT.js → usage-DC0UKe6C.js} +6 -6
  344. package/dist/{usage-CfZCQd0F.js → usage-DYtRVkcN.js} +2 -2
  345. package/dist/{validation-error-uvp-kyfO.d.ts → validation-error-Dx8PipbO.d.ts} +1 -1
  346. package/dist/{verify-DfT0QYNh.js → verify-Bpj0hauG.js} +19 -19
  347. package/dist/{version-cache-Df11C2Qp.d.ts → version-cache-DzNKWiI6.d.ts} +9 -3
  348. package/dist/{views-CD8wuL4Z.js → views-MWmJ6Y4P.js} +1 -1
  349. package/dist/vue/index.d.ts +7 -7
  350. package/dist/vue/index.js +6 -6
  351. package/dist/{waiter-CqUKX6CY.d.ts → waiter-NK_UuZbb.d.ts} +2 -2
  352. package/dist/{watch-DAkjm75Y.js → watch-CBHADqBH.js} +3 -3
  353. package/dist/watch-OYwAPCzx.js +1 -0
  354. package/dist/webmcp/index.d.ts +1 -1
  355. package/dist/webmcp/index.js +1 -1
  356. package/dist/{where-scope-DlCdCM_8.js → where-scope-BKrqUDVk.js} +5 -5
  357. package/dist/{who-can-BoDJm0Nc.js → who-can-KhVWMxtf.js} +4 -4
  358. package/dist/workflow/index.d.ts +3 -3
  359. package/dist/workflow/index.js +5 -4
  360. package/dist/workflow-sdk/index.d.ts +4 -4
  361. package/dist/{wrap-DxXB54Wu.d.ts → wrap-BHGA-SMM.d.ts} +2 -2
  362. package/dist/{wrap-B2wziJI_.js → wrap-C5PWzgkq.js} +1 -1
  363. package/package.json +8 -5
  364. package/schemas/approval-request-v1.json +5 -0
  365. package/schemas/catalog-v1.json +18 -2
  366. package/schemas/cli-result-v1.json +0 -2
  367. package/schemas/snapshot-v1.json +9 -0
  368. package/schemas/supabase-manifest-v1.json +1 -1
  369. package/skills/permdock-approvals/SKILL.md +8 -8
  370. package/skills/permdock-approvals/references/stores-and-resume.md +7 -3
  371. package/skills/permdock-audit/SKILL.md +1 -1
  372. package/skills/permdock-wire/references/adapters.md +3 -1
  373. package/dist/action-result-BcudBQOF.d.ts +0 -19
  374. package/dist/catalog-D3oS2GH3.js +0 -1
  375. package/dist/collect-D-eroIfV.js +0 -1
  376. package/dist/load-Dm0pSYH3.js +0 -1
  377. package/dist/output-files-BHOIlrfD.js +0 -1
  378. package/dist/powersync-0QVP_DuR.js +0 -1
  379. package/dist/pull-CCAChKuy.js +0 -1
  380. package/dist/renames-CGj7YwcQ.js +0 -175
  381. package/dist/run-C5P3x1EI.js +0 -1
  382. package/dist/supabase-hook-qsewAVZY.js +0 -1
  383. package/dist/usage-DmmO_xjJ.js +0 -1
  384. package/dist/watch-CuPz0D2M.js +0 -1
@@ -1,13 +1,14 @@
1
- import { Kn as DenialReason, T as Policy, Un as Decision, X as Intent, Zt as Snapshot, hr as Subject, j as PolicyVocabulary, pr as Principal } from "../policy-types-DGIO_gxq.js";
1
+ import { $t as Snapshot, E as Policy, M as PolicyVocabulary, Xn as DenialReason, Z as Intent, _r as Principal, qn as Decision, yr as Subject } from "../policy-types-D-GwfQTc.js";
2
2
  import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { a as PermDock, d as UncheckedData, s as RowData } from "../permdock-CprAPN3w.js";
4
- import { m as ApprovalStore } from "../types-DLvhVm1r.js";
5
- import { t as InstanceOptions } from "../instance-options-CoHn-0e8.js";
6
- import { n as PermDockWrap } from "../wrap-DxXB54Wu.js";
7
- import { o as OtelWrap } from "../types-B6ExllNo.js";
8
- import { n as DescribeMessages } from "../describe-BbFPBSms.js";
9
- import { a as snapshotHeaders, i as cacheLifeFor, n as SnapshotHeaders, o as snapshotTag, r as SnapshotHeadersOptions, t as CacheLifeForOptions } from "../snapshot-cache-BjAWkchD.js";
10
- import { n as ProtectedAction, t as ActionResult } from "../action-result-BcudBQOF.js";
3
+ import { A as PermissionState, a as PermDock, d as UncheckedData, k as PermissionCheck, s as RowData } from "../permdock-ffY4CMd9.js";
4
+ import { m as ApprovalStore } from "../types-CqcsNCaN.js";
5
+ import { t as InstanceOptions } from "../instance-options-2sFGSdsf.js";
6
+ import { n as PermDockWrap } from "../wrap-BHGA-SMM.js";
7
+ import { o as OtelWrap } from "../types-DGf_cpKF.js";
8
+ import { n as DescribeMessages } from "../describe-BKtC_8PG.js";
9
+ 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-B4YvlGG_.js";
10
+ import { v as ActionResult, y as ProtectedAction } from "../store-DYeB-_U3.js";
11
+ import { n as PermDockProviderProps } from "../types-DmbfLu2p.js";
11
12
  import { ReactElement, ReactNode } from "react";
12
13
  import { StandardSchemaV1 } from "@standard-schema/spec";
13
14
  //#region src/next/types.d.ts
@@ -31,6 +32,14 @@ type NextPermDockOptions<TUser = NextSubjectInput> = InstanceOptions & {
31
32
  * those checks are denied with reason `server-only`.
32
33
  */
33
34
  readonly endpoint?: string | false;
35
+ /**
36
+ * The principal's authorization version this request already read, such as
37
+ * `bsb.bootstrap()`'s `authzVersion`. Called once per request; a read-intent
38
+ * instance takes it as `version: { known }` and skips the version read. A
39
+ * write-intent instance, `protectAction` included, reads the version live.
40
+ * Anything but a non-negative integer, or a throw, reads it as usual.
41
+ */
42
+ readonly version?: () => number | null | undefined | Promise<number | null | undefined>;
34
43
  };
35
44
  type GetPermDockQuery = {
36
45
  readonly tenant?: string;
@@ -41,6 +50,11 @@ type GetPermDockQuery = {
41
50
  * version live.
42
51
  */
43
52
  readonly intent?: Intent;
53
+ /**
54
+ * The known authorization version for this call, in place of the `version`
55
+ * option. Read intent only.
56
+ */
57
+ readonly version?: number;
44
58
  };
45
59
  type GetSnapshotQuery = GetPermDockQuery & {
46
60
  readonly include?: readonly (Permission | {
@@ -52,6 +66,11 @@ type GetSnapshotQuery = GetPermDockQuery & {
52
66
  * tag.
53
67
  */
54
68
  readonly tags?: readonly string[];
69
+ /**
70
+ * `cacheLifeFor` options; `{ capToToken: true }` caps the entry at the
71
+ * token's expiry. Default 300 seconds.
72
+ */
73
+ readonly cacheLife?: CacheLifeForOptions;
55
74
  };
56
75
  type PermissionRequirementOptions = GetPermDockQuery & {
57
76
  /**
@@ -82,7 +101,12 @@ type NextPermDockProviderProps = NextPermDockProviderDisplay & ({
82
101
  })[];
83
102
  readonly tenants?: "all";
84
103
  });
85
- type NextPermDockProviderDisplay = {
104
+ /**
105
+ * Function props of the React provider: a Server Component cannot pass them to
106
+ * the client, so `useRefreshOn` from `permdock/react` adds triggers instead.
107
+ */
108
+ type ClientOnlyProp = "fetch" | "verifier" | "onSnapshot" | "onClear" | "refreshOn";
109
+ type NextPermDockProviderDisplay = Omit<PermDockProviderProps, "snapshot" | "snapshotPromise" | "children" | "defaults" | "messages" | ClientOnlyProp> & {
86
110
  readonly children: ReactNode;
87
111
  readonly tenant?: string;
88
112
  /** Overrides the factory's `endpoint`; `false` is snapshot-only. */
@@ -139,10 +163,18 @@ type NextPermDock<V extends PolicyVocabulary = PolicyVocabulary> = {
139
163
  <D>(permission: Permission, data?: UncheckedData<D>, query?: GetPermDockQuery): Promise<ServerPermissionState>;
140
164
  <P extends Permission>(permission: P, data?: RowData<P>, query?: GetPermDockQuery): Promise<ServerPermissionState>;
141
165
  };
166
+ /**
167
+ * One `{ allowed, outcome, reason? }` per named check, from one instance:
168
+ * frozen plain JSON an island can return from `'use cache: private'`. A check
169
+ * that throws denies its entry; an instance that cannot be built denies them
170
+ * all.
171
+ */
172
+ readonly getPermissions: <K extends string>(checks: Readonly<Record<K, PermissionCheck>>, query?: GetPermDockQuery) => Promise<Readonly<Record<K, PermissionState>>>;
142
173
  /**
143
174
  * The session's snapshot for a `'use cache: private'` function the app owns:
144
- * calls `cacheLife(cacheLifeFor(snapshot))` and `cacheTag(snapshotTag(sub),
145
- * ...tags)` in that scope, and throws outside one.
175
+ * calls `cacheLife(cacheLifeFor(snapshot, query.cacheLife))` and
176
+ * `cacheTag(snapshotTag(sub), ...tags)` in that scope, and throws outside
177
+ * one.
146
178
  */
147
179
  readonly getSnapshot: (query?: GetSnapshotQuery) => Promise<Snapshot>;
148
180
  /**
@@ -176,4 +208,4 @@ type NextPermDock<V extends PolicyVocabulary = PolicyVocabulary> = {
176
208
  //#region src/next/create.d.ts
177
209
  export declare function createPermDock<TUser = NextSubjectInput, TPrincipal extends Principal = Principal, V extends PolicyVocabulary = PolicyVocabulary>(policy: Policy<TUser, TPrincipal, V>, given: NextPermDockOptions<TUser>): NextPermDock<V>;
178
210
  //#endregion
179
- export { type ActionResult, type CacheLifeForOptions, type GetPermDockQuery, type GetSnapshotQuery, type NextPermDock, type NextPermDockOptions, type NextPermDockProviderProps, type PermDockHandler, type PermissionRequirementOptions, type ProtectAction, type ProtectActionOptions, type ProtectedAction, type ProtectedActionContext, type ProtectedActionHandler, type ServerPermissionState, type SnapshotHeaders, type SnapshotHeadersOptions, cacheLifeFor, snapshotHeaders, snapshotTag };
211
+ export { type ActionResult, type CacheLifeForOptions, type GetPermDockQuery, type GetSnapshotQuery, type NextPermDock, type NextPermDockOptions, type NextPermDockProviderProps, type PermDockHandler, type PermissionRequirementOptions, type ProtectAction, type ProtectActionOptions, type ProtectedAction, type ProtectedActionContext, type ProtectedActionHandler, type ServerPermissionState, type SnapshotHeaders, type SnapshotHeadersOptions, cacheLifeFor, snapshotHeaders, snapshotKey, snapshotTag };
@@ -3,13 +3,15 @@ import { n as PermDockValidationError } from "../validation-error-CYg2kJEw.js";
3
3
  import { o as statusProblem, t as notFoundDetails } from "../problem-details-CLDgX1KV.js";
4
4
  import { n as isThenable } from "../thenable-BNSM1U2R.js";
5
5
  import { n as resourceRef } from "../resource-ref-CaS9yVPi.js";
6
- import { l as withApp } from "../permdock-BvjivVb9.js";
7
- import { n as wrapPermDock } from "../wrap-B2wziJI_.js";
6
+ import { a as permissionStates } from "../checks-fyDOhcz0.js";
7
+ import { l as withApp } from "../permdock-D-_WrdKu.js";
8
+ import { n as wrapPermDock } from "../wrap-C5PWzgkq.js";
8
9
  import { i as decisionProblem } from "../problem-BVLHFK33.js";
9
- import { s as resumeDecision } from "../helpers-DJicaG6f.js";
10
- import { n as snapshotHeaders, r as snapshotTag, t as cacheLifeFor } from "../snapshot-cache-Bx_4xC_6.js";
11
- import { n as resolveOrNull, t as buildInstance } from "../build-instance-BWXqwQYU.js";
12
- import { _ as LOAD_FAILED, o as evaluationsHandler, v as NO_GRANT } from "../evaluations-IBceAeKT.js";
10
+ import { s as resumeDecision } from "../helpers-DmqGy63f.js";
11
+ import { i as snapshotTag, n as snapshotHeaders, r as snapshotKey, t as cacheLifeFor } from "../snapshot-cache-B66h7FBK.js";
12
+ import { n as resolveOrNull, t as buildInstance } from "../build-instance-BFMFQdE_.js";
13
+ import { n as NO_GRANT, t as LOAD_FAILED } from "../decision-CaG5_eNJ.js";
14
+ import { o as evaluationsHandler } from "../evaluations-h3KoJAPa.js";
13
15
  import { cache } from "react";
14
16
  import { jsx } from "react/jsx-runtime";
15
17
  import { forbidden, unauthorized, unstable_rethrow } from "#next/navigation";
@@ -113,16 +115,10 @@ function protectActionOf(deps) {
113
115
  //#endregion
114
116
  //#region src/next/provider.tsx
115
117
  function renderClientProvider(options) {
118
+ const { children, ...props } = options;
116
119
  return /* @__PURE__ */ jsx(PermDockProvider, {
117
- ...compact({
118
- snapshotPromise: options.snapshotPromise,
119
- endpoint: options.endpoint,
120
- tenant: options.tenant,
121
- suspend: options.suspend,
122
- defaults: options.defaults,
123
- messages: options.messages
124
- }),
125
- children: options.children
120
+ ...compact(props),
121
+ children
126
122
  });
127
123
  }
128
124
  //#endregion
@@ -148,6 +144,16 @@ function defer(task) {
148
144
  return false;
149
145
  }
150
146
  }
147
+ /** Read through `globalThis` so the entry loads on runtimes without `process`. */
148
+ function knownVersion(value) {
149
+ return typeof value === "number" && Number.isSafeInteger(value) && value >= 0 ? value : void 0;
150
+ }
151
+ function isDevelopment() {
152
+ const proc = Reflect.get(globalThis, "process");
153
+ if (typeof proc !== "object" || proc === null) return false;
154
+ const env = Reflect.get(proc, "env");
155
+ return typeof env === "object" && env !== null && Reflect.get(env, "NODE_ENV") === "development";
156
+ }
151
157
  function ignore() {}
152
158
  /**
153
159
  * Keeps the function alive until the sink has written and flushed: every
@@ -184,7 +190,17 @@ function createPermDock(policy, given) {
184
190
  return wrapInstance(options.wrap === void 0 ? traced : options.wrap(traced), options.onDenied);
185
191
  };
186
192
  const resolveFallbackTenant = cache(() => readTenant(options.tenant));
187
- const instantiate = cache(async (tenantKey, intent) => {
193
+ const resolveVersion = cache(async () => {
194
+ const read = options.version;
195
+ if (read === void 0) return;
196
+ try {
197
+ return knownVersion(await read());
198
+ } catch (error) {
199
+ unstable_rethrow(error);
200
+ return;
201
+ }
202
+ });
203
+ const instantiate = cache(async (tenantKey, intent, known) => {
188
204
  const tenant = tenantKey === "" ? void 0 : tenantKey;
189
205
  const user = await resolveSubject();
190
206
  await io();
@@ -195,14 +211,17 @@ function createPermDock(policy, given) {
195
211
  scope: {
196
212
  tenant,
197
213
  sink,
198
- intent
214
+ intent,
215
+ version: known === void 0 ? void 0 : { known }
199
216
  },
200
217
  wrap: decorate
201
218
  })).permdock;
202
219
  });
203
220
  const getPermDock = async (query) => {
204
221
  const tenant = query?.tenant ?? await resolveFallbackTenant();
205
- return instantiate(tenant ?? "", query?.intent ?? "read");
222
+ const intent = query?.intent ?? "read";
223
+ const known = intent === "read" ? knownVersion(query?.version) ?? await resolveVersion() : void 0;
224
+ return instantiate(tenant ?? "", intent, known);
206
225
  };
207
226
  const getPermission = async (permission, data, query) => {
208
227
  try {
@@ -221,14 +240,34 @@ function createPermDock(policy, given) {
221
240
  };
222
241
  }
223
242
  };
243
+ const getPermissions = async (checks, query) => {
244
+ let permdock;
245
+ try {
246
+ permdock = await getPermDock(query);
247
+ } catch (error) {
248
+ unstable_rethrow(error);
249
+ }
250
+ if (permdock === void 0) return permissionStates(() => NO_GRANT, checks);
251
+ const decide = permdock.decide;
252
+ return permissionStates(decide, checks);
253
+ };
254
+ let warnedShortLife = false;
224
255
  const getSnapshot = async (query = {}) => {
225
- const permdock = await getPermDock(compact({ tenant: query.tenant }));
256
+ const permdock = await getPermDock(compact({
257
+ tenant: query.tenant,
258
+ version: query.version
259
+ }));
226
260
  const snapshot = permdock.snapshot(compact({
227
261
  include: query.include,
228
262
  tenants: query.tenants
229
263
  }));
264
+ const life = cacheLifeFor(snapshot, query.cacheLife);
265
+ if (life.stale < 300 && !warnedShortLife && isDevelopment()) {
266
+ warnedShortLife = true;
267
+ console.warn(`PermDock: getSnapshot() caches for ${String(life.stale)} s; Next.js drops a private entry under 300 s from the App Shell prefetch.`);
268
+ }
230
269
  try {
231
- cacheLife(cacheLifeFor(snapshot));
270
+ cacheLife(life);
232
271
  cacheTag(snapshotTag(permdock.subject.principal?.id), ...query.tags ?? []);
233
272
  } catch (error) {
234
273
  unstable_rethrow(error);
@@ -239,7 +278,8 @@ function createPermDock(policy, given) {
239
278
  const requirePermission = async (permission, data, requirement = {}) => {
240
279
  const permdock = await getPermDock(compact({
241
280
  tenant: requirement.tenant,
242
- intent: requirement.intent
281
+ intent: requirement.intent,
282
+ version: requirement.version
243
283
  }));
244
284
  const assert = permdock.assert;
245
285
  const handler = requirement.onDenied ?? options.onDenied;
@@ -255,15 +295,12 @@ function createPermDock(policy, given) {
255
295
  include: props.include,
256
296
  tenants: props.tenants
257
297
  })));
258
- return renderClientProvider(compact({
298
+ const { snapshot: _snapshot, include: _include, tenants: _tenants, ...rest } = props;
299
+ return renderClientProvider({
300
+ ...rest,
259
301
  snapshotPromise,
260
- endpoint: props.endpoint ?? options.endpoint ?? "/api/permdock",
261
- tenant: props.tenant,
262
- suspend: props.suspend,
263
- defaults: props.defaults,
264
- messages: props.messages,
265
- children: props.children
266
- }));
302
+ endpoint: props.endpoint ?? options.endpoint ?? "/api/permdock"
303
+ });
267
304
  };
268
305
  const permdockHandler = () => evaluationsHandler(compact({
269
306
  policy,
@@ -273,6 +310,7 @@ function createPermDock(policy, given) {
273
310
  return {
274
311
  getPermDock,
275
312
  getPermission,
313
+ getPermissions,
276
314
  getSnapshot,
277
315
  requirePermission,
278
316
  PermDockProvider,
@@ -286,4 +324,4 @@ function createPermDock(policy, given) {
286
324
  };
287
325
  }
288
326
  //#endregion
289
- export { cacheLifeFor, createPermDock, snapshotHeaders, snapshotTag };
327
+ export { cacheLifeFor, createPermDock, snapshotHeaders, snapshotKey, snapshotTag };
@@ -1,4 +1,4 @@
1
- import { s as PermDockPluginOptions } from "../types-Cklw5hJo.js";
1
+ import { s as PermDockPluginOptions } from "../types-3Y8UpFkF.js";
2
2
  //#region src/cli/plugin.d.ts
3
3
  /** Any object: Next's `NextConfig` is an interface, so no index signature. */
4
4
  type NextConfigLike = object;
@@ -1,5 +1,5 @@
1
- import { a as describeError } from "../errors-Vpu6rKHl.js";
2
- import { n as createCollectScheduler, r as report, t as collectOnce } from "../watch-DAkjm75Y.js";
1
+ import { a as describeError } from "../errors-BhRkoNS7.js";
2
+ import { n as createCollectScheduler, r as report, t as collectOnce } from "../watch-CBHADqBH.js";
3
3
  //#region src/cli/plugin.ts
4
4
  const PHASE_BUILD = "phase-production-build";
5
5
  const PHASE_DEV = "phase-development-server";
@@ -1,8 +1,8 @@
1
- import { T as Policy, j as PolicyVocabulary, pr as Principal } from "../policy-types-DGIO_gxq.js";
1
+ import { E as Policy, M as PolicyVocabulary, _r as Principal } from "../policy-types-D-GwfQTc.js";
2
2
  import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { a as PermDock } from "../permdock-CprAPN3w.js";
4
- 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-CyRN0-Cd.js";
5
- import { t as ServerAdapterOptions } from "../bind-YYjvfpB9.js";
3
+ import { a as PermDock } from "../permdock-ffY4CMd9.js";
4
+ 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-3OnXjZ2D.js";
5
+ import { t as ServerAdapterOptions } from "../bind-DR6ku3A9.js";
6
6
  import { i as toRequest, n as isServerResponse, r as sendResponse, t as NodeRequest } from "../http-B_LphE5Y.js";
7
7
  import { IncomingMessage, ServerResponse } from "node:http";
8
8
  //#region src/node/create.d.ts
@@ -1,5 +1,5 @@
1
- import { l as InvalidSignatureError, p as webBotAuthVerifier, u as discoverViaSignatureAgent } from "../evaluations-IBceAeKT.js";
2
- import { r as bindKernel } from "../bind-BNQA9JK9.js";
1
+ import { l as InvalidSignatureError, p as webBotAuthVerifier, u as discoverViaSignatureAgent } from "../evaluations-h3KoJAPa.js";
2
+ import { r as bindKernel } from "../bind-B4pMH9bm.js";
3
3
  import { n as sendResponse, r as toRequest, t as isServerResponse } from "../http-DH94eh6f.js";
4
4
  //#region src/node/create.ts
5
5
  const nodeRequest = (req) => req;
@@ -1,8 +1,8 @@
1
- import { T as Policy, j as PolicyVocabulary, pr as Principal } from "../policy-types-DGIO_gxq.js";
1
+ import { E as Policy, M as PolicyVocabulary, _r as Principal } from "../policy-types-D-GwfQTc.js";
2
2
  import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { a as PermDock } from "../permdock-CprAPN3w.js";
4
- import { u as ApprovalRequest } from "../types-DLvhVm1r.js";
5
- import { o as AgentAdapterOptions, t as AgentPermDock } from "../create-BPUopdfL.js";
3
+ import { a as PermDock } from "../permdock-ffY4CMd9.js";
4
+ import { u as ApprovalRequest } from "../types-CqcsNCaN.js";
5
+ import { o as AgentAdapterOptions, t as AgentPermDock } from "../create-BzwjZuRS.js";
6
6
  //#region src/openai/create.d.ts
7
7
  /** The app context passed to `run(agent, input, { context })`. */
8
8
  type OpenAiContext = {
@@ -1,7 +1,7 @@
1
1
  import { t as compact } from "../compact-CAf557ZB.js";
2
- import { l as withApp } from "../permdock-BvjivVb9.js";
3
- import { t as approvalTokenOf } from "../kernel-BD8QuMnv.js";
4
- import { t as agentRuntime } from "../create-Coq5fIrq.js";
2
+ import { l as withApp } from "../permdock-D-_WrdKu.js";
3
+ import { t as approvalTokenOf } from "../kernel-30Z2zM_d.js";
4
+ import { t as agentRuntime } from "../create-C-tm3KIF.js";
5
5
  //#region src/openai/create.ts
6
6
  function appContext(runContext) {
7
7
  const context = runContext?.context;
@@ -1,6 +1,6 @@
1
- import { T as Policy, br as Condition, pr as Principal } from "../policy-types-DGIO_gxq.js";
1
+ import { E as Policy, _r as Principal, wr as Condition } from "../policy-types-D-GwfQTc.js";
2
2
  import { f as PermissionTree, u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { a as ProblemDetails } from "../errors-BIM4MFsJ.js";
3
+ import { a as ProblemDetails } from "../errors-TpzkEKgJ.js";
4
4
  import { StandardJSONSchemaV1, StandardSchemaV1 } from "@standard-schema/spec";
5
5
  //#region src/openapi/types.d.ts
6
6
  type OpenApiTarget = "3.1" | "3.2" | "3.3";
@@ -1,6 +1,6 @@
1
- import { c as missingInput } from "./errors-Vpu6rKHl.js";
1
+ import { c as missingInput } from "./errors-BhRkoNS7.js";
2
2
  import { t as defineLeaf } from "./command-L8EstFNm.js";
3
- import { c as given, d as policyFlag, f as validatorFlag, l as outFlag, o as fileOut, t as checkFlag } from "./flags-DXjoTVbS.js";
3
+ import { c as given, d as policyFlag, f as validatorFlag, l as outFlag, o as fileOut, t as checkFlag } from "./flags-BlmpmXoY.js";
4
4
  //#region src/cli/commands/openapi.ts
5
5
  const docFlag = { doc: {
6
6
  type: "string",
@@ -80,7 +80,7 @@ const emit = defineLeaf({
80
80
  }
81
81
  },
82
82
  async run(ctx, { flags }) {
83
- return (await import("./openapi-DSzQN7Zu.js")).runOpenapi({
83
+ return (await import("./openapi-zMEB9qxn.js")).runOpenapi({
84
84
  cwd: ctx.cwd,
85
85
  config: ctx.config,
86
86
  rest: ["emit"],
@@ -122,7 +122,7 @@ const importDocument = defineLeaf({
122
122
  async run(ctx, { flags }) {
123
123
  const doc = given(flags.doc);
124
124
  if (doc === void 0) throw missingInput("openapi import", ["--doc"], "the OpenAPI document to import");
125
- return (await import("./import-Dfe2unKO.js")).runOpenapiImport({
125
+ return (await import("./import-DObwEota.js")).runOpenapiImport({
126
126
  cwd: ctx.cwd,
127
127
  doc,
128
128
  out: fileOut("openapi import", flags.out),
@@ -1,13 +1,13 @@
1
1
  import { r as isRecord } from "./compact-CAf557ZB.js";
2
2
  import { a as getResource, n as findPermission } from "./permission-registry-B8tYxPIt.js";
3
- import { r as definePolicy } from "./policy-CLQ8__GF.js";
4
- import { i as configError } from "./errors-Vpu6rKHl.js";
3
+ import { r as definePolicy } from "./policy-cV_wwPb8.js";
4
+ import { i as configError } from "./errors-BhRkoNS7.js";
5
5
  import { i as readJsonFile, s as writeFileEnsuringDir } from "./files-BSjrtIHw.js";
6
- import { a as loadModule, n as asPolicy, s as pickNamed, t as asPermissionTree } from "./load-DjSU5KXO.js";
6
+ import { a as loadModule, n as asPolicy, s as pickNamed, t as asPermissionTree } from "./load-BaEamml-.js";
7
7
  import { t as shortDiff } from "./text-diff-BtfSmdUo.js";
8
8
  import { c as openapiVersion, o as createPermDock } from "./openapi-BOsx0xn9.js";
9
- import { i as fileDrift } from "./output-files-BIQ_9pIs.js";
10
- import { n as validateOverlay, t as validateOpenapi } from "./schema-DvXvxPhQ.js";
9
+ import { i as fileDrift } from "./output-files-CM0BnH05.js";
10
+ import { n as validateOverlay, t as validateOpenapi } from "./schema-B_9tXrbG.js";
11
11
  import { existsSync } from "node:fs";
12
12
  import { resolve } from "node:path";
13
13
  //#region src/cli/openapi/openapi.ts
@@ -1,4 +1,4 @@
1
- import { n as OPERATION_RISKS } from "./permissions-CVXmRILq.js";
1
+ import { t as OPERATION_RISKS } from "./operation-risks-BKOcTv8J.js";
2
2
  //#region src/catalog/operation-findings.ts
3
3
  function rank(risk) {
4
4
  return OPERATION_RISKS.indexOf(risk ?? "low");
@@ -0,0 +1,13 @@
1
+ //#region src/core/operation-risks.ts
2
+ /** Every `meta.risk` level, lowest first. */
3
+ const OPERATION_RISKS = Object.freeze([
4
+ "low",
5
+ "medium",
6
+ "high",
7
+ "critical"
8
+ ]);
9
+ function isOperationRisk(value) {
10
+ return OPERATION_RISKS.some((risk) => risk === value);
11
+ }
12
+ //#endregion
13
+ export { isOperationRisk as n, OPERATION_RISKS as t };
@@ -0,0 +1,89 @@
1
+ import { n as isForbiddenKey } from "./paths-CUvURzHp.js";
2
+ import { c as listPermissions, o as isPermission } from "./permission-registry-B8tYxPIt.js";
3
+ import { n as isOperationRisk, t as OPERATION_RISKS } from "./operation-risks-BKOcTv8J.js";
4
+ //#region src/core/operations.ts
5
+ const OPERATION_EFFECTS = Object.freeze([
6
+ "read",
7
+ "write",
8
+ "delete",
9
+ "send",
10
+ "spend",
11
+ "external"
12
+ ]);
13
+ /**
14
+ * MCP tool-name characters (MCP 2025-11-25, Tools: Tool names), so a name works
15
+ * as a tool name unchanged.
16
+ */
17
+ const NAME = /^[A-Za-z0-9_.-]{1,128}$/u;
18
+ const META_KEYS = /* @__PURE__ */ new Set([
19
+ "risk",
20
+ "effects",
21
+ "title"
22
+ ]);
23
+ function isOperationEffect(value) {
24
+ return OPERATION_EFFECTS.some((effect) => effect === value);
25
+ }
26
+ function readMeta(name, value) {
27
+ if (value === void 0) return Object.freeze({});
28
+ if (value === null || typeof value !== "object" || Array.isArray(value)) throw new TypeError(`Operation "${name}": meta must be an object.`);
29
+ for (const key of Object.keys(value)) if (!META_KEYS.has(key)) throw new TypeError(`Operation "${name}": meta.${key} is not one of risk, effects, title.`);
30
+ const meta = {};
31
+ const risk = Reflect.get(value, "risk");
32
+ if (risk !== void 0) {
33
+ if (!isOperationRisk(risk)) throw new TypeError(`Operation "${name}": meta.risk must be one of ${OPERATION_RISKS.join(", ")}.`);
34
+ meta.risk = risk;
35
+ }
36
+ const effects = Reflect.get(value, "effects");
37
+ if (effects !== void 0) {
38
+ if (!Array.isArray(effects) || !effects.every(isOperationEffect) || new Set(effects).size !== effects.length) throw new TypeError(`Operation "${name}": meta.effects must list distinct values of ${OPERATION_EFFECTS.join(", ")}.`);
39
+ meta.effects = Object.freeze([...effects]);
40
+ }
41
+ const title = Reflect.get(value, "title");
42
+ if (title !== void 0) {
43
+ if (typeof title !== "string" || title.trim() === "") throw new TypeError(`Operation "${name}": meta.title must be a non-empty string.`);
44
+ meta.title = title;
45
+ }
46
+ return Object.freeze(meta);
47
+ }
48
+ function treeLeaf(keys, name, field, value) {
49
+ if (!isPermission(value)) throw new TypeError(`Operation "${name}": ${field} must be a permission from the tree.`);
50
+ if (!keys.has(value.key)) throw new TypeError(`Operation "${name}": ${field} ${value.key} is not a permission of the tree passed to defineOperations.`);
51
+ return value;
52
+ }
53
+ /**
54
+ * Binds each named operation to a permission of `permissions`. Throws at
55
+ * definition time for a permission or `results` outside the tree, a name that
56
+ * is not 1 to 128 of `A-Z a-z 0-9 _ . -` or repeats another case-insensitively,
57
+ * a `data` that is not a function, or meta outside the closed lists.
58
+ */
59
+ function defineOperations(permissions, definitions) {
60
+ const keys = new Map(listPermissions(permissions).map((leaf) => [leaf.key, leaf]));
61
+ const seen = /* @__PURE__ */ new Map();
62
+ const out = {};
63
+ for (const name of Object.keys(definitions)) {
64
+ if (!NAME.test(name) || isForbiddenKey(name)) throw new TypeError(`Operation name "${name}" must be 1 to 128 of A-Z a-z 0-9 _ . -.`);
65
+ const folded = name.toLowerCase();
66
+ const previous = seen.get(folded);
67
+ if (previous !== void 0) throw new TypeError(`Operation name "${name}" is a duplicate of "${previous}".`);
68
+ seen.set(folded, name);
69
+ const definition = definitions[name];
70
+ if (definition === null || typeof definition !== "object" || Array.isArray(definition)) throw new TypeError(`Operation "${name}" must be an object.`);
71
+ const permission = treeLeaf(keys, name, "permission", Reflect.get(definition, "permission"));
72
+ const value = Reflect.get(definition, "data");
73
+ if (value !== void 0 && typeof value !== "function") throw new TypeError(`Operation "${name}": data must be a function.`);
74
+ const data = value;
75
+ const resultsValue = Reflect.get(definition, "results");
76
+ const results = resultsValue === void 0 ? void 0 : treeLeaf(keys, name, "results", resultsValue);
77
+ const meta = readMeta(name, Reflect.get(definition, "meta"));
78
+ out[name] = Object.freeze({
79
+ name,
80
+ permission,
81
+ ...data === void 0 ? {} : { data },
82
+ ...results === void 0 ? {} : { results },
83
+ meta
84
+ });
85
+ }
86
+ return Object.freeze(out);
87
+ }
88
+ //#endregion
89
+ export { isOperationEffect as n, defineOperations as t };
@@ -1,11 +1,11 @@
1
- import { T as Policy, j as PolicyVocabulary, pr as Principal } from "../policy-types-DGIO_gxq.js";
1
+ import { E as Policy, M as PolicyVocabulary, _r as Principal } from "../policy-types-D-GwfQTc.js";
2
2
  import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
3
  import { a as OperationInput, t as Operation } from "../operations-Ci_rT6Uo.js";
4
- import { a as PermDock } from "../permdock-CprAPN3w.js";
4
+ import { a as PermDock } from "../permdock-ffY4CMd9.js";
5
5
  import { n as RevocationFeed } from "../revocations-BaUXHM1N.js";
6
- import { D as ConnectionOptions, T as Connection, i as OpenApiHooks } from "../server-types-CyRN0-Cd.js";
7
- import { t as ServerAdapterOptions } from "../bind-YYjvfpB9.js";
8
- import { t as StreamProtectOptions } from "../stream-9y9qw51m.js";
6
+ import { D as ConnectionOptions, T as Connection, i as OpenApiHooks } from "../server-types-3OnXjZ2D.js";
7
+ import { t as ServerAdapterOptions } from "../bind-DR6ku3A9.js";
8
+ import { t as StreamProtectOptions } from "../stream-W2RuUYly.js";
9
9
  import { AnySchema, MetaPlugin, Middleware, Procedure, Schema } from "@orpc/server";
10
10
  import { StandardSchemaV1 } from "@standard-schema/spec";
11
11
  //#region src/orpc/operations.d.ts
@@ -1,10 +1,10 @@
1
1
  import { t as compact } from "../compact-CAf557ZB.js";
2
2
  import { o as isPermission } from "../permission-registry-B8tYxPIt.js";
3
3
  import { o as problemMessage } from "../http-DKLXrFGk.js";
4
- import { t as problemFromError } from "../map-error-pasIGqMT.js";
5
- import { n as attached } from "../bind-BNQA9JK9.js";
4
+ import { t as problemFromError } from "../map-error-BH16Ah8P.js";
5
+ import { n as attached } from "../bind-B4pMH9bm.js";
6
6
  import { i as isAsyncIterable, o as reloadAfter } from "../stream-CDvF0sJm.js";
7
- import { i as rpcCode, n as guardStream, r as problemBody, t as bindRpcKernel } from "../rpc-vHIwyXCp.js";
7
+ import { i as rpcCode, n as guardStream, r as problemBody, t as bindRpcKernel } from "../rpc-KwX_Jcxz.js";
8
8
  import { ORPCError, os } from "@orpc/server";
9
9
  //#region src/orpc/operations.ts
10
10
  const root = os;
@@ -1,6 +1,6 @@
1
- import { j as PolicyVocabulary } from "../policy-types-DGIO_gxq.js";
2
- import { a as PermDock } from "../permdock-CprAPN3w.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-B6ExllNo.js";
1
+ import { M as PolicyVocabulary } from "../policy-types-D-GwfQTc.js";
2
+ import { a as PermDock } from "../permdock-ffY4CMd9.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-DGf_cpKF.js";
4
4
  //#region src/otel/instrument.d.ts
5
5
  /**
6
6
  * Listens on one instance. Spans carry no duration and no histogram is
@@ -1,5 +1,5 @@
1
1
  import { t as compact } from "../compact-CAf557ZB.js";
2
- import { n as wrapPermDock } from "../wrap-B2wziJI_.js";
2
+ import { n as wrapPermDock } from "../wrap-C5PWzgkq.js";
3
3
  import { r as appObligationNames } from "../ocsf-TcjRBgIs.js";
4
4
  //#region src/otel/types.ts
5
5
  const GENAI_SEMCONV_PIN = "1.37.0";
@@ -1,5 +1,5 @@
1
1
  import { s as cliVersion } from "./version-DMQ0dnN5.js";
2
- import { t as DOCS_BASE } from "./manifest-Cft51TLK.js";
2
+ import { t as DOCS_BASE } from "./manifest-wclLWBVH.js";
3
3
  //#region src/cli/core/output.ts
4
4
  const CLI_RESULT_SCHEMA = "https://permdock.com/schemas/cli-result-v1.json";
5
5
  function envelope(input) {
@@ -0,0 +1 @@
1
+ export { t as SPLIT_PARTS } from "./output-files-CM0BnH05.js";
@@ -1,6 +1,6 @@
1
1
  import { i as dateAt } from "./time-nR1JesoH.js";
2
2
  import { t as shortDiff } from "./text-diff-BtfSmdUo.js";
3
- import { t as applyFiles } from "./files-B3AA05f1.js";
3
+ import { t as applyFiles } from "./files-CfiRtQ-m.js";
4
4
  import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
5
5
  import { basename, dirname, resolve } from "node:path";
6
6
  /** How `path` on disk differs from `expected`; `undefined` when `same` holds. */
@@ -2,16 +2,16 @@ import { a as sole, n as isReadonlyArray, r as isRecord } from "./compact-CAf557
2
2
  import { n as isForbiddenKey } from "./paths-CUvURzHp.js";
3
3
  import { u as isSqlFunctionField } from "./refs-C8BKxc_e.js";
4
4
  import { u as isoAt } from "./time-nR1JesoH.js";
5
- import { f as scopeList, l as rootScope, s as resolveScope, u as scopeChain } from "./scopes-0Up_UA2t.js";
5
+ import { c as rootScope, d as scopeList, l as scopeChain, s as resolveScope } from "./scopes-BSdYaGHs.js";
6
6
  import { t as isoInstant } from "./instant-DK3Iz83e.js";
7
7
  import { m as findRole, v as listRoles } from "./grantee-Dke-9rd1.js";
8
- import { r as relationCondition, t as inheritCondition } from "./grantee-conditions-BrYPe-w0.js";
9
- import { i as configError } from "./errors-Vpu6rKHl.js";
8
+ import { r as relationCondition, t as inheritCondition } from "./grantee-conditions-DX4K_gGI.js";
9
+ import { i as configError } from "./errors-BhRkoNS7.js";
10
10
  import { i as qualifySqlTable } from "./sql-0WjxIp9g.js";
11
- import { a as scopeMembershipTable, i as scopeColumn, s as relatedSql } from "./compile-EzEMB-7v.js";
11
+ import { a as scopeMembershipTable, i as scopeColumn, s as relatedSql } from "./compile-B_oJqmIg.js";
12
12
  import { l as roleColumn } from "./sources-C4vkzZJV.js";
13
- import { A as quoteQualified, D as qualified, E as helperSchema, L as sqlType, M as textArrayLiteral, O as quoteIdent, R as tenantTypeOf, S as CLAIM, T as declaredArray, _ as subjectClaimJsonSql, b as tenantClaimSql, d as keyTenantSql, f as kindFilterSql, h as roleKindSql, j as quoteTable, k as quoteLiteral, m as memberVia, p as liveSessionSql, s as signedIn, t as CUSTOM_ROLES, u as globalKindFilterSql, v as subjectClaimSql, y as subjectIdSql } from "./shared-DrGLwM3s.js";
14
- import { $ as graphSqlText, A as claimKeptLines, B as hasCustomRoleChecksFor, F as globalRoleRows, I as membershipRows, L as roleRows, M as memberColumn, N as sourceFilters, P as sourcesKeep, U as storedTenant, X as CLOSURE, Z as graphHelper, _t as activeMembershipSql, c as holderSources, ct as memberIdsHelper, d as sourceRowsSql, f as sourceTransferTriggerSql, g as OWNERSHIP, gt as activeInstancesSql, h as ASSIGNMENTS, ht as scopeTable, it as linkHelper, j as disabledColumn, l as pairsSql, m as transferTriggerSql, mt as scopeSources, nt as inheritedRowsHelper, p as holdersTriggerSql, pt as restrictedHelper, st as memberForTable, u as sourceHoldersTriggerSql, ut as memberRoleOf, yt as activeUserSql } from "./tables-DimBcVWY.js";
13
+ import { A as quoteQualified, D as qualified, E as helperSchema, L as sqlType, M as textArrayLiteral, O as quoteIdent, R as tenantTypeOf, S as CLAIM, T as declaredArray, _ as subjectClaimJsonSql, b as tenantClaimSql, d as keyTenantSql, f as kindFilterSql, h as roleKindSql, j as quoteTable, k as quoteLiteral, m as memberVia, p as liveSessionSql, s as signedIn, t as CUSTOM_ROLES, u as globalKindFilterSql, v as subjectClaimSql, y as subjectIdSql } from "./shared-DyYVEjKC.js";
14
+ import { $ as graphSqlText, A as claimKeptLines, B as hasCustomRoleChecksFor, F as globalRoleRows, I as membershipRows, L as roleRows, M as memberColumn, N as sourceFilters, P as sourcesKeep, U as storedTenant, X as CLOSURE, Z as graphHelper, _t as activeMembershipSql, c as holderSources, ct as memberIdsHelper, d as sourceRowsSql, f as sourceTransferTriggerSql, g as OWNERSHIP, gt as activeInstancesSql, h as ASSIGNMENTS, ht as scopeTable, it as linkHelper, j as disabledColumn, l as pairsSql, m as transferTriggerSql, mt as scopeSources, nt as inheritedRowsHelper, p as holdersTriggerSql, pt as restrictedHelper, st as memberForTable, u as sourceHoldersTriggerSql, ut as memberRoleOf, yt as activeUserSql } from "./tables-BfOk0ymL.js";
15
15
  //#region src/cli/sql/conditions.ts
16
16
  const MAX_CLAIM_DEPTH = 8;
17
17
  /**
@@ -1,9 +1,9 @@
1
1
  import { r as isRecord } from "./compact-CAf557ZB.js";
2
2
  import { n as freezeDeep } from "./freeze-jjan0lCv.js";
3
3
  import { n as PermDockValidationError } from "./validation-error-CYg2kJEw.js";
4
- import { f as scopeList, s as resolveScope } from "./scopes-0Up_UA2t.js";
4
+ import { d as scopeList, s as resolveScope } from "./scopes-BSdYaGHs.js";
5
5
  import { n as copyJson, t as checkSchema } from "./json-schema-BPGa-RjQ.js";
6
- import { t as catalogSchema } from "./schema-BOJjqlWL.js";
6
+ import { t as catalogSchema } from "./schema-CuX70xgH.js";
7
7
  //#region src/catalog/references.ts
8
8
  function duplicates(issues, list, name, field) {
9
9
  const seen = /* @__PURE__ */ new Set();