permdock 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/README.md +2 -1
  2. package/dist/a2a/index.d.ts +5 -5
  3. package/dist/a2a/index.js +5 -4
  4. package/dist/{adoption-scan-UkQisAqe.js → adoption-scan-_bHLMnVQ.js} +1 -1
  5. package/dist/agent/index.d.ts +2 -2
  6. package/dist/agent/index.js +1 -1
  7. package/dist/ai-sdk/index.d.ts +4 -4
  8. package/dist/ai-sdk/index.js +3 -3
  9. package/dist/app/index.d.ts +85 -0
  10. package/dist/app/index.js +91 -0
  11. package/dist/app-DIvM65Mv.js +24 -0
  12. package/dist/{approval-policies-CKlByf5o.d.ts → approval-policies-UnDSxT__.d.ts} +2 -2
  13. package/dist/{approval-prompt-CQFiO1KE.d.ts → approval-prompt-2hTqo6IM.d.ts} +2 -2
  14. package/dist/approvals/index.d.ts +3 -3
  15. package/dist/approvals/index.js +3 -3
  16. package/dist/{approvals-CuXILe52.js → approvals-B_sn4Wrn.js} +6 -6
  17. package/dist/{arazzo-CUthH61H.js → arazzo-BXD-VJU_.js} +1 -1
  18. package/dist/{arazzo-BC3uLIZy.js → arazzo-Ct0PGblq.js} +3 -3
  19. package/dist/astro/index.d.ts +6 -6
  20. package/dist/astro/index.js +2 -2
  21. package/dist/{audience-BUonniPx.js → audience-5Xx1hdIv.js} +1 -1
  22. package/dist/{auth-j3Eu-j4h.js → auth-BxXHxWRy.js} +1 -1
  23. package/dist/authzen/index.d.ts +5 -5
  24. package/dist/authzen/index.js +4 -4
  25. package/dist/{automation-CpOk7Tlu.d.ts → automation-B20_8UoT.d.ts} +3 -3
  26. package/dist/{automation-x3KEUusw.js → automation-BueW05db.js} +2 -2
  27. package/dist/better-auth/index.d.ts +2 -2
  28. package/dist/better-auth/index.js +1 -1
  29. package/dist/better-supabase/index.d.ts +113 -56
  30. package/dist/better-supabase/index.js +200 -62
  31. package/dist/better-supabase-DF8f8oly.js +194 -0
  32. package/dist/{bind-CJf7S-Jd.js → bind-B4Z0U2Gr.js} +5 -5
  33. package/dist/{bind-XvnD_SUz.d.ts → bind-CnOMjazH.d.ts} +7 -7
  34. package/dist/{build-instance-CkRKgjSj.js → build-instance-B0vsViF5.js} +3 -25
  35. package/dist/{capability-zN6T9fxe.js → capability-CenWwTMR.js} +1 -1
  36. package/dist/{capability-v2xZB7us.d.ts → capability-YkRMUAsF.d.ts} +2 -2
  37. package/dist/{casbin-BOZN1P2Y.js → casbin-D5evU3lX.js} +1 -1
  38. package/dist/{casbin-v9Xo_XPa.js → casbin-imBS3UIf.js} +1 -1
  39. package/dist/catalog/index.d.ts +5 -5
  40. package/dist/catalog/index.js +5 -5
  41. package/dist/catalog-C462QC3A.js +1 -0
  42. package/dist/{catalog-DjDc87R2.js → catalog-CoyKnU5c.js} +1 -1
  43. package/dist/{catalog-s0waIrfY.js → catalog-Y4CjN8NA.js} +4 -4
  44. package/dist/{catalog-operations-BD22drQf.js → catalog-operations-Do1eD-Rt.js} +1 -1
  45. package/dist/{challenge-DbkpCx_v.js → challenge-B__LcNve.js} +3 -3
  46. package/dist/chat/index.d.ts +1 -1
  47. package/dist/chat/index.js +3 -2
  48. package/dist/chat-sdk/index.d.ts +3 -3
  49. package/dist/claude-agent/index.d.ts +3 -3
  50. package/dist/claude-agent/index.js +2 -2
  51. package/dist/clerk/index.d.ts +3 -3
  52. package/dist/cli/bin.js +1 -1
  53. package/dist/cli/index.d.ts +8 -7
  54. package/dist/cli/index.js +3 -3
  55. package/dist/cloud/index.d.ts +8 -8
  56. package/dist/cloud/index.js +3 -3
  57. package/dist/{cloud-CB0btByh.js → cloud-DWCeStPH.js} +2 -2
  58. package/dist/{codemod-C3a3Iz_w.js → codemod-B7QKJ_ak.js} +2 -2
  59. package/dist/{codemod-B-duJDFD.js → codemod-BaPmaCYQ.js} +13 -6
  60. package/dist/{collect-DN_x7hvV.js → collect-Cr71JA7z.js} +8 -7
  61. package/dist/{collect-DMQ6Sxr6.js → collect-ScSG05VJ.js} +2 -2
  62. package/dist/collect-W9i7REKT.js +1 -0
  63. package/dist/compile/index.d.ts +1 -1
  64. package/dist/compile/index.js +1 -1
  65. package/dist/{compile-B_oJqmIg.js → compile-Cvru58id.js} +2 -2
  66. package/dist/{compile-DonvwG9x.d.ts → compile-DC-BrhH1.d.ts} +3 -3
  67. package/dist/{completion-6IshPaPd.js → completion-DOUMyCwa.js} +1 -1
  68. package/dist/{delegation-aK4T_5WU.js → condition-evaluate-bVVRSdzq.js} +159 -159
  69. package/dist/{config-C45X7mpm.js → config-DRp-E8Ly.js} +1 -1
  70. package/dist/{config-D2oXUwos.js → config-DyNanTjZ.js} +10 -8
  71. package/dist/{config-report-Bmo62RRr.js → config-report-Bh_nLdAE.js} +2 -2
  72. package/dist/{config-shape-D9paLhEX.js → config-shape-C4zqzG2K.js} +9 -2
  73. package/dist/{context-YhyXyqBI.js → context-Cem4QafV.js} +2 -2
  74. package/dist/convex/index.d.ts +5 -5
  75. package/dist/convex/index.js +2 -2
  76. package/dist/{core-Dxkwz4xR.js → core-CUjhfz0W.js} +6 -6
  77. package/dist/{core-9KbhurkH.d.ts → core-D2JNg5jA.d.ts} +3 -3
  78. package/dist/coverage-D8jBJdgD.d.ts +114 -0
  79. package/dist/coverage-Dh2W_DmF.js +211 -0
  80. package/dist/{create-DH4ZD0A7.d.ts → create-B2tdOygC.d.ts} +7 -7
  81. package/dist/{create-Q0wF9Elt.js → create-BJ2_8NDO.js} +5 -5
  82. package/dist/{create-BRiRVNUO.js → create-BsL5lCWR.js} +8 -7
  83. package/dist/{create-BzgDDamI.d.ts → create-CPDSbK1a.d.ts} +5 -5
  84. package/dist/{create-BQOQkYYg.d.ts → create-oMCcZV4X.d.ts} +9 -9
  85. package/dist/{credential-B3Hj4puZ.js → credential-Bap3HClV.js} +4 -4
  86. package/dist/{server-D0PW6ZCw.js → credentials-BXV0oz56.js} +3 -146
  87. package/dist/credentials-DPX140fN.d.ts +125 -0
  88. package/dist/delivery/index.d.ts +4 -4
  89. package/dist/delivery/index.js +1 -1
  90. package/dist/{denied-text-De8cw3MW.d.ts → denied-text-BXQkWU7d.d.ts} +2 -2
  91. package/dist/{describe-DibQM6g-.d.ts → describe-DVobr5FX.d.ts} +2 -2
  92. package/dist/{diff-BJv7I3GR.js → diff-BR9JArxz.js} +6 -6
  93. package/dist/{diff-3fpwo3UD.js → diff-Jc_kbDz-.js} +1 -1
  94. package/dist/{doctor-Bz7s3JYD.js → doctor-BBMW5ZT_.js} +310 -36
  95. package/dist/{doctor-keoa9DpH.js → doctor-DhqSiPkq.js} +3 -3
  96. package/dist/drizzle/index.d.ts +3 -3
  97. package/dist/drizzle/index.js +1 -1
  98. package/dist/elysia/index.d.ts +5 -5
  99. package/dist/elysia/index.js +3 -3
  100. package/dist/{errors-OTE9u4Wk.d.ts → errors-D_JIQJYb.d.ts} +1 -1
  101. package/dist/{evaluate-Dcq_U2TV.js → evaluate-B5yZHmts.js} +16 -16
  102. package/dist/{evaluations-CNMVJVD6.js → evaluations-BzTDWO4m.js} +57 -57
  103. package/dist/{evaluations-OCm_Z-8V.d.ts → evaluations-DQYfh4Jh.d.ts} +3 -3
  104. package/dist/eve/index.d.ts +5 -5
  105. package/dist/eve/index.js +3 -3
  106. package/dist/express/index.d.ts +5 -5
  107. package/dist/express/index.js +3 -3
  108. package/dist/fastify/index.d.ts +5 -5
  109. package/dist/fastify/index.js +3 -3
  110. package/dist/{fetch-adapter-BlL-ZhHq.d.ts → fetch-adapter-DxqsIXSO.d.ts} +4 -4
  111. package/dist/{fetch-adapter-4EB3cLgB.js → fetch-adapter-MoYZ-vF5.js} +3 -3
  112. package/dist/{fields-D_TfExiI.js → fields-CVyOk-f1.js} +2 -2
  113. package/dist/{fixtures-Cemqurt8.js → fixtures-BVZc7OCF.js} +1 -1
  114. package/dist/{from-snapshot-DHnb8Fh4.js → from-snapshot-oR_N97dM.js} +346 -14
  115. package/dist/{gen-DYF4LKUP.js → gen-DXXoFjyf.js} +1 -1
  116. package/dist/{gen-Cf7nQsOb.js → gen-WdycZ_-b.js} +5 -5
  117. package/dist/{grantee-conditions-DX4K_gGI.js → grantee-conditions-Dzprappv.js} +1 -1
  118. package/dist/{grantee-match-BP-k4vRJ.js → grantee-match-8J2y60MF.js} +3 -3
  119. package/dist/h3/index.d.ts +4 -4
  120. package/dist/h3/index.js +3 -3
  121. package/dist/{helpers-D-MXwkOF.js → helpers-DzBIfL1N.js} +25 -25
  122. package/dist/hono/index.d.ts +5 -5
  123. package/dist/hono/index.js +3 -3
  124. package/dist/{hosted-C2Pmhy2x.js → hosted-C5I2TSXm.js} +4 -4
  125. package/dist/{hosted-yhyAuQkL.d.ts → hosted-DXq1plaP.d.ts} +1 -1
  126. package/dist/{http-DhMWeB_h.js → http-dptLQzPP.js} +1 -1
  127. package/dist/{expiry-6XByK0dm.js → ids-DzhJaCUj.js} +23 -23
  128. package/dist/{import-CQ_kH_Ny.js → import-BE5sDazm.js} +2 -2
  129. package/dist/{import-C2ExjVvv.js → import-CvXswHDy.js} +2 -2
  130. package/dist/index-BcS8c_2S.d.ts +101 -0
  131. package/dist/{index--AwSBzJC.d.ts → index-BdZpqhJK.d.ts} +2 -2
  132. package/dist/{index-CLbGOPBr.d.ts → index-C-R8lBPb.d.ts} +3 -3
  133. package/dist/{index-Do7FqHEr.d.ts → index-C_8uxAlv.d.ts} +5 -5
  134. package/dist/{index-tuR-kZoJ.d.ts → index-Cjfa1Uwr.d.ts} +21 -40
  135. package/dist/{index-BqzpT-90.d.ts → index-iIsqXFVu.d.ts} +6 -6
  136. package/dist/index.d.ts +19 -20
  137. package/dist/index.js +25 -24
  138. package/dist/{init-kTFkEu8S.js → init-B_S8Xdz1.js} +4 -4
  139. package/dist/{init-DvkvbvZ_.js → init-CqGHcvyR.js} +2 -2
  140. package/dist/{instance-options-Cq66kEeR.d.ts → instance-options-C6gEDOts.d.ts} +1 -1
  141. package/dist/instance-options-URVwqpMW.js +24 -0
  142. package/dist/{instance-snapshot-Bi4-dJk0.js → instance-snapshot-D_dGTq--.js} +9 -9
  143. package/dist/jwt/index.d.ts +4 -4
  144. package/dist/jwt/index.js +2 -2
  145. package/dist/{kernel-CLEzDmbv.js → kernel-NmxiWII2.js} +8 -8
  146. package/dist/kysely/index.d.ts +3 -3
  147. package/dist/kysely/index.js +1 -1
  148. package/dist/limits-CAhpRrhk.js +167 -0
  149. package/dist/{load-BaEamml-.js → load-C4p4VgwR.js} +2 -2
  150. package/dist/load-DiBUJx77.js +1 -0
  151. package/dist/{login-9ycIcJZH.js → login-CzwlsBEO.js} +4 -4
  152. package/dist/{login-CM_etiLM.js → login-DoLxv1s5.js} +3 -3
  153. package/dist/{manifest-CCd-xrM3.js → manifest-BAf7cgRx.js} +35 -35
  154. package/dist/{map-claims-PQwHynxV.js → map-claims-CAa_bQt9.js} +1 -1
  155. package/dist/{map-error-EOhahOVA.js → map-error-p4ROJ_26.js} +1 -1
  156. package/dist/mcp/index.d.ts +9 -9
  157. package/dist/mcp/index.js +9 -8
  158. package/dist/{migrate-CkLHdwuH.js → migrate-DVsxeE0y.js} +1 -1
  159. package/dist/{module-values-BYuNtdK5.js → module-values-BLiVlO1X.js} +3 -3
  160. package/dist/nest/index.d.ts +5 -5
  161. package/dist/nest/index.js +3 -3
  162. package/dist/next/index.d.ts +43 -17
  163. package/dist/next/index.js +54 -21
  164. package/dist/next/plugin.d.ts +1 -1
  165. package/dist/next/plugin.js +1 -1
  166. package/dist/node/index.d.ts +5 -5
  167. package/dist/node/index.js +2 -2
  168. package/dist/openai/index.d.ts +5 -5
  169. package/dist/openai/index.js +3 -3
  170. package/dist/openapi/index.d.ts +5 -59
  171. package/dist/openapi/index.js +3 -2
  172. package/dist/{openapi-BOsx0xn9.js → openapi-Cc-aS9xC.js} +6 -135
  173. package/dist/{openapi-QnnU2A1c.js → openapi-DroBcLJZ.js} +2 -2
  174. package/dist/{openapi-DA7FVG2F.js → openapi-EmvKwuWj.js} +4 -4
  175. package/dist/{operations-Ci_rT6Uo.d.ts → operations-BMPx7HyO.d.ts} +1 -1
  176. package/dist/optional-8TKc-0j4.js +47 -0
  177. package/dist/orpc/index.d.ts +7 -7
  178. package/dist/orpc/index.js +4 -4
  179. package/dist/otel/index.d.ts +3 -3
  180. package/dist/otel/index.js +1 -1
  181. package/dist/{output-KT0a3B3H.js → output-CYgfpT6o.js} +1 -1
  182. package/dist/{ownership-CeNOtQMV.js → ownership-adPAsUwY.js} +15 -13
  183. package/dist/{parse-CXTT7hBq.js → parse-CORUNcCo.js} +1 -1
  184. package/dist/{parse-local-manifest-CE4tgFsj.d.ts → parse-local-manifest-BaCqsqwC.d.ts} +1 -1
  185. package/dist/pdp/index.d.ts +3 -3
  186. package/dist/pdp/index.js +4 -3
  187. package/dist/{permdock-DbAq8_Fp.js → permdock-B5LyNVgn.js} +70 -34
  188. package/dist/{permdock-CsrvbzHk.d.ts → permdock-BaB-KQqn.d.ts} +46 -9
  189. package/dist/{permissions-Dz79qsFw.js → permissions-COpRGKt7.js} +1 -1
  190. package/dist/{permissions-Bx6UI8n1.d.ts → permissions-DriWkV7q.d.ts} +1 -2
  191. package/dist/{policy-from-catalog-BtqfxytV.js → policy-from-catalog-Cy103lsm.js} +8 -8
  192. package/dist/{policy-types-BI9C5Sp5.d.ts → policy-types-rNfz7t0M.d.ts} +9 -3
  193. package/dist/{policy-CaAME-Rh.js → policy-wGzbAPQF.js} +7 -7
  194. package/dist/{policy-Dh9WVSVz.d.ts → policy-x8RBKW8d.d.ts} +2 -2
  195. package/dist/{postgrest-CWCCbaxm.d.ts → postgrest-Cn0Res25.d.ts} +9 -21
  196. package/dist/powersync-BdoR7nwS.js +1 -0
  197. package/dist/{powersync-CWsN-QaK.js → powersync-BeI0VmEK.js} +2 -2
  198. package/dist/{powersync-DiqY3VBG.js → powersync-Dpa5AnnN.js} +11 -11
  199. package/dist/preset/index.js +1 -1
  200. package/dist/{preset-pPrVyGU5.js → preset-Bn5Z54cH.js} +5 -6
  201. package/dist/prisma/index.d.ts +2 -2
  202. package/dist/prisma/index.js +1 -1
  203. package/dist/{protected-action-CuG0xz4P.d.ts → protected-action-C4aj1KjO.d.ts} +6 -7
  204. package/dist/{protected-action-CD1HXwQK.js → protected-action-E7Sdt_Dt.js} +1 -1
  205. package/dist/{provider-ihxuJbMi.d.ts → provider-B-1DlOGM.d.ts} +1 -1
  206. package/dist/{provider-qESIf_C0.js → provider-DKO9KHua.js} +2 -2
  207. package/dist/{provider-store-BTHGJH9j.js → provider-store-D4PU1my_.js} +2 -2
  208. package/dist/{pull-B4EhSqOG.js → pull-3tkn25ll.js} +5 -5
  209. package/dist/pull-D90HqWNP.js +1 -0
  210. package/dist/{push-DYOI4bPf.js → push-dMyKdlEm.js} +6 -6
  211. package/dist/{pushed-policy-Dszouliu.js → pushed-policy-Bi5-il4C.js} +2 -2
  212. package/dist/{pushed-policy-P0hgyLBh.d.ts → pushed-policy-P55cJNx5.d.ts} +1 -1
  213. package/dist/react/index.d.ts +6 -6
  214. package/dist/react/index.js +3 -3
  215. package/dist/react/provider-client.d.ts +1 -1
  216. package/dist/react/provider-client.js +1 -1
  217. package/dist/react-native/index.d.ts +9 -9
  218. package/dist/react-native/index.js +7 -7
  219. package/dist/{relation-walk-DK_gkgL7.js → relation-walk-BDTaTKTM.js} +1 -1
  220. package/dist/{relations-BxvRvDHK.js → relations-CMsJ1ARY.js} +1 -1
  221. package/dist/{replay-DYXI4gRN.d.ts → replay-DKhFvt0L.d.ts} +1 -1
  222. package/dist/{request-context-VjeXst1z.js → request-context-5gl_oxO1.js} +2 -2
  223. package/dist/resend/index.d.ts +4 -4
  224. package/dist/resend/index.js +2 -2
  225. package/dist/{resolve-names-BIHnWL_L.js → resolve-names-BnGJU88N.js} +4 -4
  226. package/dist/{rls-C7qXye9M.js → rls-DIYSRnDZ.js} +1 -1
  227. package/dist/{rls-CMFZWosz.js → rls-qrehUPf_.js} +45 -18
  228. package/dist/{role-builder-C5AgaC1x.js → role-builder-boQiUvfo.js} +3 -3
  229. package/dist/{rpc-CYXICjM1.d.ts → rpc-BqRiVpbP.d.ts} +2 -2
  230. package/dist/{rpc-BNIQwEB6.js → rpc-Dhi55Whd.js} +2 -2
  231. package/dist/run-elFdnSZx.js +1 -0
  232. package/dist/{run-CMJX9x7b.js → run-oNqBe0gc.js} +3 -3
  233. package/dist/{run-ticket-CjvXr6wj.js → run-ticket-Ddxt9OuU.js} +2 -2
  234. package/dist/{run-ticket-BXYqQ9dy.d.ts → run-ticket-Dulj4RQk.d.ts} +2 -2
  235. package/dist/{saas-DHFfthXv.js → saas-DABv6vjy.js} +6 -5
  236. package/dist/{scan-CSOkcNdl.js → scan-BYXqcgON.js} +1 -1
  237. package/dist/{schema-7pXCaRYB.js → schema-Wf-SvlHG.js} +1 -1
  238. package/dist/scim/index.d.ts +1 -1
  239. package/dist/scim/index.js +1 -1
  240. package/dist/{scopes-BSdYaGHs.js → scopes-gdH__vDZ.js} +1 -1
  241. package/dist/server/index.d.ts +11 -10
  242. package/dist/server/index.js +7 -6
  243. package/dist/server-CKjFooaJ.js +147 -0
  244. package/dist/{server-types-Bfl-IrzZ.d.ts → server-types--_Hann81.d.ts} +9 -9
  245. package/dist/{shared-sW3VYchq.js → shared-DfaIWvIJ.js} +11 -2
  246. package/dist/{sink-RwmP7ZHs.d.ts → sink-Cs6z34AX.d.ts} +4 -4
  247. package/dist/{skills-DAjg-rgF.js → skills-417bOj4o.js} +1 -1
  248. package/dist/{skills-DrX83QBK.js → skills-B9U465B7.js} +2 -2
  249. package/dist/{snapshot-DHPih65J.js → snapshot-C2j96x97.js} +4 -4
  250. package/dist/{snapshot-cache-MPinwwgZ.d.ts → snapshot-cache-Cc7VNabe.d.ts} +1 -1
  251. package/dist/solid/index.d.ts +6 -7
  252. package/dist/solid/index.js +2 -2
  253. package/dist/solid-start/index.d.ts +6 -6
  254. package/dist/solid-start/index.js +3 -3
  255. package/dist/{sources-sgQlMfmz.d.ts → sources-BfTza0zT.d.ts} +1 -1
  256. package/dist/{src-Cop53_X1.js → src-BG9YJM3Q.js} +96 -247
  257. package/dist/ssf/index.d.ts +3 -3
  258. package/dist/ssf/index.js +3 -3
  259. package/dist/{standard-webhooks-CFZIYtBF.d.ts → standard-webhooks-CJBgfl7y.d.ts} +2 -2
  260. package/dist/{store-CSOsXd5s.js → store-BpKH-pLm.js} +2 -2
  261. package/dist/{store-CRQ5VrWR.d.ts → store-DSyjHD5-.d.ts} +5 -5
  262. package/dist/{store-options-CDvoX52-.js → store-options-CXv6BHH6.js} +5 -6
  263. package/dist/{stores-PpYVQ5yF.js → stores-BuqAHjp_.js} +1 -1
  264. package/dist/{stores-pEBMy94l.d.ts → stores-C6-7TPTV.d.ts} +6 -7
  265. package/dist/{postgrest-BrjrckDG.js → subject-BqFwS6l3.js} +214 -319
  266. package/dist/subject-cache-BT1fGuea.js +193 -0
  267. package/dist/subject-cache-d_Z4KAnm.d.ts +144 -0
  268. package/dist/supabase/index.d.ts +6 -5
  269. package/dist/supabase/index.js +3 -2
  270. package/dist/supabase/middleware.d.ts +6 -6
  271. package/dist/supabase/middleware.js +6 -6
  272. package/dist/{supabase-Cbl2orB2.js → supabase-D0J99yqL.js} +2 -2
  273. package/dist/{supabase-CVZuytCC.js → supabase-DnazO6W4.js} +3 -3
  274. package/dist/{supabase-hook-BUcu3vPM.js → supabase-hook-Bh5syR9N.js} +174 -62
  275. package/dist/supabase-hook-CVAenq-w.js +1 -0
  276. package/dist/{supautils-a_253u1X.js → supautils-ChXR-4Or.js} +302 -43
  277. package/dist/{support-session-BsmPCbz8.js → support-session-BGeEYDSq.js} +2 -2
  278. package/dist/svelte/index.d.ts +5 -5
  279. package/dist/svelte/index.js +3 -3
  280. package/dist/svelte/runtime.d.ts +3 -3
  281. package/dist/svelte/runtime.js +1 -1
  282. package/dist/svelte/source.d.ts +5 -5
  283. package/dist/svelte/source.js +2 -2
  284. package/dist/sveltekit/index.d.ts +6 -6
  285. package/dist/sveltekit/index.js +2 -2
  286. package/dist/{tables-XrvffTMj.js → tables-CbEOy2Ma.js} +137 -55
  287. package/dist/tanstack-start/index.d.ts +6 -6
  288. package/dist/tanstack-start/index.js +2 -2
  289. package/dist/{tenancy-DvOHHk3-.js → tenancy-BlxY5T0q.js} +2 -2
  290. package/dist/terminal/index.d.ts +6 -6
  291. package/dist/terminal/index.js +6 -6
  292. package/dist/testing/core.d.ts +1 -1
  293. package/dist/testing/core.js +1 -1
  294. package/dist/testing/fixtures/index.d.ts +35 -2
  295. package/dist/testing/fixtures/index.js +39 -2
  296. package/dist/testing/index.d.ts +41 -25
  297. package/dist/testing/index.js +114 -26
  298. package/dist/testing/saas/index.d.ts +5 -5
  299. package/dist/testing/saas/index.js +2 -2
  300. package/dist/testing/saas/permissions.d.ts +1 -1
  301. package/dist/testing/saas/permissions.js +1 -1
  302. package/dist/trpc/index.d.ts +6 -6
  303. package/dist/trpc/index.js +4 -4
  304. package/dist/{type-helpers-BjOLGVy1.d.ts → type-helpers-iXJEIDe7.d.ts} +3 -4
  305. package/dist/{types-p8mhWTcR.d.ts → types-B9F0EZAF.d.ts} +3 -3
  306. package/dist/{types-DZwEOsK1.d.ts → types-BSNZMp5b.d.ts} +1 -1
  307. package/dist/{types-MixnvXQ5.d.ts → types-BpxdxaRD.d.ts} +5 -5
  308. package/dist/{types-C3C9ien9.d.ts → types-CD1qmxdx.d.ts} +4 -4
  309. package/dist/{types-D1NjjwI4.d.ts → types-CS1DI_Ke.d.ts} +40 -9
  310. package/dist/{types-zh4WGQcP.d.ts → types-C_a44wSr.d.ts} +3 -3
  311. package/dist/{types-DBVSljAx.d.ts → types-Cq2rvv-C.d.ts} +3 -3
  312. package/dist/{types--_lpWUGV.d.ts → types-CuDXvyIT.d.ts} +5 -5
  313. package/dist/{types-7Vlz1Wi2.d.ts → types-DAyp592k.d.ts} +2 -2
  314. package/dist/{types-DjGZAU64.d.ts → types-NikV1pND.d.ts} +4 -4
  315. package/dist/{types-BzxA2OAD.d.ts → types-ZfjQB0KC.d.ts} +2 -2
  316. package/dist/{types-DotXrris.d.ts → types-_pi9kxS2.d.ts} +2 -2
  317. package/dist/unplugin/index.d.ts +1 -1
  318. package/dist/unplugin/index.js +1 -1
  319. package/dist/{usage-DPbdI3Vi.js → usage-0wsl83uw.js} +10 -10
  320. package/dist/{usage-DHsqp4lN.js → usage-Bl-BkXEq.js} +1 -1
  321. package/dist/usage-CmyGbo4e.js +1 -0
  322. package/dist/{validation-error-DkOK9zUE.d.ts → validation-error-DLAYFlkr.d.ts} +1 -1
  323. package/dist/{verify-C0jGJrmb.js → verify-BSLotSa0.js} +41 -24
  324. package/dist/version-sources-BC3hf2ME.js +34 -0
  325. package/dist/{permission-types-CAY-GU7e.d.ts → vocabulary-DeZvUaTw.d.ts} +69 -1
  326. package/dist/vue/index.d.ts +6 -7
  327. package/dist/vue/index.js +2 -2
  328. package/dist/{waiter-BjVI_Byg.d.ts → waiter-cbK1CBhT.d.ts} +2 -2
  329. package/dist/{watch-Dz2LNM1R.js → watch-BigZ260i.js} +2 -2
  330. package/dist/watch-CHURMgrv.js +1 -0
  331. package/dist/webmcp/index.d.ts +2 -2
  332. package/dist/{who-can-CZeAwQZD.js → who-can-CjfMP9a4.js} +8 -8
  333. package/dist/workflow/index.d.ts +3 -3
  334. package/dist/workflow/index.js +6 -5
  335. package/dist/workflow-sdk/index.d.ts +5 -5
  336. package/dist/{wrap-EQ6Or2Hi.d.ts → wrap-B-k2qHJx.d.ts} +2 -2
  337. package/package.json +16 -4
  338. package/skills/permdock-wire/references/presets-and-recipes.md +2 -2
  339. package/dist/better-supabase-ayun1IKE.js +0 -122
  340. package/dist/catalog-BTPySmbp.js +0 -1
  341. package/dist/collect-eSTXOZDC.js +0 -1
  342. package/dist/index-DuOF7OqS.d.ts +0 -222
  343. package/dist/load-CjnlPxpL.js +0 -1
  344. package/dist/powersync-CWCirKAJ.js +0 -1
  345. package/dist/pull-VzcECZ-R.js +0 -1
  346. package/dist/run-D2e1tybu.js +0 -1
  347. package/dist/supabase-hook-QWphWBnG.js +0 -1
  348. package/dist/usage-dmSjKx-Z.js +0 -1
  349. package/dist/version-cache-q5cpaDSt.d.ts +0 -57
  350. package/dist/vocabulary-DEJ5j4mR.d.ts +0 -70
  351. package/dist/watch-CS69ftMP.js +0 -1
  352. package/dist/where-scope-BAyOsPQW.js +0 -332
  353. package/dist/{approval-normalize-hlfO9BJv.js → approval-normalize-DNLW0zOM.js} +1 -1
  354. package/dist/{body-C9JbIoqb.js → body-B3ylkmmE.js} +1 -1
  355. package/dist/{catalog-doc-nrgfbh8I.js → catalog-doc-Zi0jRpyH.js} +2 -2
  356. package/dist/{device-BwbJNmb2.js → device-BkSynWdg.js} +1 -1
  357. package/dist/{prompt-BYc6drYW.js → prompt-D1Gj1W4Y.js} +1 -1
  358. package/dist/{scim-C30QBBoF.js → scim-BG6uPUeW.js} +1 -1
  359. package/dist/{wrap-C5PWzgkq.js → wrap-BKU5Arsu.js} +1 -1
@@ -30,20 +30,20 @@ const SECTIONS = [
30
30
  docs: "init",
31
31
  effects: ["files"],
32
32
  config: false,
33
- load: async () => (await import("./init-kTFkEu8S.js")).init
33
+ load: async () => (await import("./init-B_S8Xdz1.js")).init
34
34
  }),
35
35
  group("preset", "Decode a preset code, or print its permdock.com/create link", "preset", [leaf("decode", "Print what a preset code holds", {
36
36
  examples: ["permdock preset decode p1AQIDBAc"],
37
37
  docs: "preset",
38
38
  effects: [],
39
39
  config: false,
40
- load: async () => (await import("./init-kTFkEu8S.js")).presetDecode
40
+ load: async () => (await import("./init-B_S8Xdz1.js")).presetDecode
41
41
  }), leaf("url", "Print the permdock.com/create link that opens a code", {
42
42
  examples: ["permdock preset url p1AQIDBAc"],
43
43
  docs: "preset",
44
44
  effects: [],
45
45
  config: false,
46
- load: async () => (await import("./init-kTFkEu8S.js")).presetUrl
46
+ load: async () => (await import("./init-B_S8Xdz1.js")).presetUrl
47
47
  })]),
48
48
  group("skills", "Install, update or list the PermDock Agent Skills", "skills", [
49
49
  leaf("install", "Copy the Agent Skills into the agent folders", {
@@ -55,21 +55,21 @@ const SECTIONS = [
55
55
  docs: "skills",
56
56
  effects: ["files"],
57
57
  config: false,
58
- load: async () => (await import("./skills-DrX83QBK.js")).install
58
+ load: async () => (await import("./skills-B9U465B7.js")).install
59
59
  }),
60
60
  leaf("update", "Replace installed skills with this version's", {
61
61
  examples: ["permdock skills update"],
62
62
  docs: "skills",
63
63
  effects: ["files"],
64
64
  config: false,
65
- load: async () => (await import("./skills-DrX83QBK.js")).update
65
+ load: async () => (await import("./skills-B9U465B7.js")).update
66
66
  }),
67
67
  leaf("list", "List the skills and where each is installed", {
68
68
  examples: ["permdock skills list"],
69
69
  docs: "skills",
70
70
  effects: [],
71
71
  config: false,
72
- load: async () => (await import("./skills-DrX83QBK.js")).list
72
+ load: async () => (await import("./skills-B9U465B7.js")).list
73
73
  })
74
74
  ]),
75
75
  leaf("doctor", "Check a PermDock installation and print a fix for each finding", {
@@ -83,7 +83,7 @@ const SECTIONS = [
83
83
  effects: ["files", "database:read"],
84
84
  config: true,
85
85
  findings: true,
86
- load: async () => (await import("./doctor-keoa9DpH.js")).doctor
86
+ load: async () => (await import("./doctor-DhqSiPkq.js")).doctor
87
87
  }),
88
88
  leaf("completion", "Print the shell completion script for bash, zsh or fish", {
89
89
  examples: ["permdock completion zsh > ~/.zfunc/_permdock", "eval \"$(permdock completion bash)\""],
@@ -91,7 +91,7 @@ const SECTIONS = [
91
91
  effects: [],
92
92
  config: false,
93
93
  shellOutput: true,
94
- load: async () => (await import("./completion-6IshPaPd.js")).completion
94
+ load: async () => (await import("./completion-DOUMyCwa.js")).completion
95
95
  })
96
96
  ]
97
97
  },
@@ -107,14 +107,14 @@ const SECTIONS = [
107
107
  docs: "collect",
108
108
  effects: ["files"],
109
109
  config: true,
110
- load: async () => (await import("./collect-DMQ6Sxr6.js")).collect
110
+ load: async () => (await import("./collect-ScSG05VJ.js")).collect
111
111
  }),
112
112
  leaf("catalog", "Export the catalog as catalog JSON, JSON Schema or Markdown", {
113
113
  examples: ["permdock catalog --out permissions.catalog.json", "permdock catalog --kind markdown"],
114
114
  docs: "catalog",
115
115
  effects: ["files"],
116
116
  config: true,
117
- load: async () => (await import("./catalog-DjDc87R2.js")).catalog
117
+ load: async () => (await import("./catalog-CoyKnU5c.js")).catalog
118
118
  }),
119
119
  leaf("gen", "Write typed constants, schemas, factories, hooks and messages from the policy", {
120
120
  examples: [
@@ -125,7 +125,7 @@ const SECTIONS = [
125
125
  docs: "gen",
126
126
  effects: ["files"],
127
127
  config: true,
128
- load: async () => (await import("./gen-DYF4LKUP.js")).gen
128
+ load: async () => (await import("./gen-DXXoFjyf.js")).gen
129
129
  }),
130
130
  leaf("usage", "Report unused, ungranted and role-less permissions and conditions on undeclared fields", {
131
131
  examples: ["permdock usage", "permdock usage --fail-on warning"],
@@ -133,14 +133,14 @@ const SECTIONS = [
133
133
  effects: [],
134
134
  config: true,
135
135
  findings: true,
136
- load: async () => (await import("./usage-DHsqp4lN.js")).usage
136
+ load: async () => (await import("./usage-Bl-BkXEq.js")).usage
137
137
  }),
138
138
  leaf("diff", "Compare two policies or catalogs; exit 1 on a breaking change", {
139
139
  examples: ["permdock diff main.catalog.json permissions.catalog.json", "permdock diff ./old-policy.ts ./src/policy.ts --impact"],
140
140
  docs: "diff",
141
141
  effects: [],
142
142
  config: true,
143
- load: async () => (await import("./diff-3fpwo3UD.js")).diff
143
+ load: async () => (await import("./diff-Jc_kbDz-.js")).diff
144
144
  }),
145
145
  leaf("config", "Check permdock.config.ts for unknown keys, or print the effective config", {
146
146
  examples: ["permdock config", "permdock config --print"],
@@ -148,7 +148,7 @@ const SECTIONS = [
148
148
  effects: [],
149
149
  config: true,
150
150
  findings: true,
151
- load: async () => (await import("./config-C45X7mpm.js")).config
151
+ load: async () => (await import("./config-DRp-E8Ly.js")).config
152
152
  })
153
153
  ]
154
154
  },
@@ -165,14 +165,14 @@ const SECTIONS = [
165
165
  "network"
166
166
  ],
167
167
  config: true,
168
- load: async () => (await import("./rls-C7qXye9M.js")).generate
168
+ load: async () => (await import("./rls-DIYSRnDZ.js")).generate
169
169
  }),
170
170
  leaf("import", "Turn existing RLS policies into a generated definition", {
171
171
  examples: ["permdock rls import --sql schema.sql --out src/permissions.generated.ts", "permdock rls import --db-url-stdin --out src/permissions.generated.ts"],
172
172
  docs: "rls",
173
173
  effects: ["files", "database:read"],
174
174
  config: true,
175
- load: async () => (await import("./rls-C7qXye9M.js")).importPolicies
175
+ load: async () => (await import("./rls-DIYSRnDZ.js")).importPolicies
176
176
  }),
177
177
  leaf("verify", "Run the fixtures against the policies, or compare a live database", {
178
178
  examples: [
@@ -184,21 +184,21 @@ const SECTIONS = [
184
184
  effects: ["files", "database:read"],
185
185
  config: true,
186
186
  findings: true,
187
- load: async () => (await import("./rls-C7qXye9M.js")).verify
187
+ load: async () => (await import("./rls-DIYSRnDZ.js")).verify
188
188
  }),
189
189
  leaf("migrate", "Rewrite hand-written policies onto the generated helpers", {
190
190
  examples: ["permdock rls migrate --sql supabase/migrations --dry-run", "permdock rls migrate --sql supabase/migrations"],
191
191
  docs: "rls",
192
192
  effects: ["rewrite", "files"],
193
193
  config: true,
194
- load: async () => (await import("./rls-C7qXye9M.js")).migrate
194
+ load: async () => (await import("./rls-DIYSRnDZ.js")).migrate
195
195
  }),
196
196
  leaf("explain", "Show the tables, membership sources and triggers the SQL binds to", {
197
197
  examples: ["permdock rls explain", "permdock rls explain --db-url-stdin --json"],
198
198
  docs: "rls",
199
199
  effects: ["database:read"],
200
200
  config: true,
201
- load: async () => (await import("./rls-C7qXye9M.js")).explain
201
+ load: async () => (await import("./rls-DIYSRnDZ.js")).explain
202
202
  })
203
203
  ]),
204
204
  group("supabase", "Generate the Supabase Custom Access Token Hook, or inspect its manifest", "supabase", [group("hook", "The Custom Access Token Hook", "supabase", [leaf("generate", "Compile the membership sources into the hook migration", {
@@ -206,26 +206,26 @@ const SECTIONS = [
206
206
  docs: "supabase",
207
207
  effects: ["files", "database:read"],
208
208
  config: true,
209
- load: async () => (await import("./supabase-Cbl2orB2.js")).hookGenerate
209
+ load: async () => (await import("./supabase-D0J99yqL.js")).hookGenerate
210
210
  })]), leaf("inspect", "Print or write the hook and helper manifest", {
211
211
  examples: ["permdock supabase inspect", "permdock supabase inspect --out"],
212
212
  docs: "supabase",
213
213
  effects: ["files"],
214
214
  config: true,
215
- load: async () => (await import("./supabase-Cbl2orB2.js")).inspect
215
+ load: async () => (await import("./supabase-D0J99yqL.js")).inspect
216
216
  })]),
217
217
  group("powersync", "Generate PowerSync Sync Streams from the policy, or verify them", "powersync", [leaf("generate", "Compile the read grants into sync-config.yaml", {
218
218
  examples: ["permdock powersync generate", "permdock powersync generate --check"],
219
219
  docs: "powersync",
220
220
  effects: ["files"],
221
221
  config: true,
222
- load: async () => (await import("./powersync-CWsN-QaK.js")).generate
222
+ load: async () => (await import("./powersync-BeI0VmEK.js")).generate
223
223
  }), leaf("verify", "Fail on stale streams or a stream that syncs a denied row", {
224
224
  examples: ["permdock powersync verify", "permdock powersync verify --db-url-stdin"],
225
225
  docs: "powersync",
226
226
  effects: ["database:read"],
227
227
  config: true,
228
- load: async () => (await import("./powersync-CWsN-QaK.js")).verify
228
+ load: async () => (await import("./powersync-BeI0VmEK.js")).verify
229
229
  })]),
230
230
  group("scim", "Generate the Postgres tables postgresDirectoryStore keeps a SCIM directory in", "scim", [leaf("generate", "Write the tenant-keyed users, groups and members tables", {
231
231
  examples: [
@@ -248,13 +248,13 @@ const SECTIONS = [
248
248
  docs: "openapi",
249
249
  effects: ["files"],
250
250
  config: true,
251
- load: async () => (await import("./openapi-QnnU2A1c.js")).emit
251
+ load: async () => (await import("./openapi-DroBcLJZ.js")).emit
252
252
  }), leaf("import", "Turn an OpenAPI document into a generated definition", {
253
253
  examples: ["permdock openapi import --doc openapi.yaml --out src/permissions.generated.ts"],
254
254
  docs: "openapi",
255
255
  effects: ["files", "network"],
256
256
  config: false,
257
- load: async () => (await import("./openapi-QnnU2A1c.js")).importDocument
257
+ load: async () => (await import("./openapi-DroBcLJZ.js")).importDocument
258
258
  })]),
259
259
  group("arazzo", "Check Arazzo workflows against the permissions", "arazzo", [leaf("check", "Resolve every Arazzo step to x-permdock-permissions", {
260
260
  examples: ["permdock arazzo check --doc arazzo.json --openapi openapi.json"],
@@ -262,7 +262,7 @@ const SECTIONS = [
262
262
  effects: [],
263
263
  config: true,
264
264
  findings: true,
265
- load: async () => (await import("./arazzo-CUthH61H.js")).check
265
+ load: async () => (await import("./arazzo-BXD-VJU_.js")).check
266
266
  })]),
267
267
  leaf("scan", "List authorization checks written without PermDock, to adopt it in an existing app", {
268
268
  examples: ["permdock scan", "permdock scan --src app,lib --pattern isBeta"],
@@ -270,7 +270,7 @@ const SECTIONS = [
270
270
  effects: [],
271
271
  config: true,
272
272
  findings: true,
273
- load: async () => (await import("./scan-CSOkcNdl.js")).scan
273
+ load: async () => (await import("./scan-BYXqcgON.js")).scan
274
274
  }),
275
275
  group("casl", "Import CASL rules into a generated module", "casl", [leaf("import", "Turn CASL rules per role into a permissions and policy module", {
276
276
  examples: ["permdock casl import --rules rules.json --out src/permissions.generated.ts"],
@@ -284,7 +284,7 @@ const SECTIONS = [
284
284
  docs: "casbin",
285
285
  effects: ["files"],
286
286
  config: false,
287
- load: async () => (await import("./casbin-v9Xo_XPa.js")).casbinImport
287
+ load: async () => (await import("./casbin-imBS3UIf.js")).casbinImport
288
288
  })])
289
289
  ]
290
290
  },
@@ -296,34 +296,34 @@ const SECTIONS = [
296
296
  docs: "login",
297
297
  effects: ["network", "files"],
298
298
  config: false,
299
- load: async () => (await import("./login-CM_etiLM.js")).login
299
+ load: async () => (await import("./login-DoLxv1s5.js")).login
300
300
  }),
301
301
  leaf("logout", "Revoke and delete the stored PermDock Cloud login", {
302
302
  examples: ["permdock logout"],
303
303
  docs: "login",
304
304
  effects: ["network", "files"],
305
305
  config: false,
306
- load: async () => (await import("./login-CM_etiLM.js")).logout
306
+ load: async () => (await import("./login-DoLxv1s5.js")).logout
307
307
  }),
308
308
  leaf("whoami", "Print the PermDock Cloud identity the CLI acts as", {
309
309
  examples: ["permdock whoami", "permdock whoami --json"],
310
310
  docs: "login",
311
311
  effects: [],
312
312
  config: false,
313
- load: async () => (await import("./login-CM_etiLM.js")).whoami
313
+ load: async () => (await import("./login-DoLxv1s5.js")).whoami
314
314
  }),
315
315
  group("cloud", "Publish to or pull from a PermDock Cloud project", "cloud", [leaf("push", "Publish the catalog, policy and manifest to a Cloud project", {
316
316
  examples: ["permdock cloud push --dry-run", "permdock cloud push --project prj_123"],
317
317
  docs: "cloud",
318
318
  effects: ["network", "cloud:write"],
319
319
  config: true,
320
- load: async () => (await import("./cloud-CB0btByh.js")).push
320
+ load: async () => (await import("./cloud-DWCeStPH.js")).push
321
321
  }), leaf("pull", "Write a Cloud project's published catalog and manifest", {
322
322
  examples: ["permdock cloud pull --project prj_123"],
323
323
  docs: "cloud",
324
324
  effects: ["network", "files"],
325
325
  config: true,
326
- load: async () => (await import("./cloud-CB0btByh.js")).pull
326
+ load: async () => (await import("./cloud-DWCeStPH.js")).pull
327
327
  })])
328
328
  ]
329
329
  },
@@ -334,7 +334,7 @@ const SECTIONS = [
334
334
  docs: "codemod",
335
335
  effects: ["rewrite"],
336
336
  config: false,
337
- load: async () => (await import("./codemod-C3a3Iz_w.js")).codemod
337
+ load: async () => (await import("./codemod-B7QKJ_ak.js")).codemod
338
338
  })]
339
339
  }
340
340
  ];
@@ -346,7 +346,7 @@ const COMPLETE_LEAF = leaf("__complete", "Print completion candidates for a part
346
346
  config: false,
347
347
  shellOutput: true,
348
348
  hidden: true,
349
- load: async () => (await import("./completion-6IshPaPd.js")).complete
349
+ load: async () => (await import("./completion-DOUMyCwa.js")).complete
350
350
  });
351
351
  const ROOT = group("permdock", "Collect, export, diff and check the permissions a PermDock policy declares", "", [...SECTIONS.flatMap((section) => section.entries), COMPLETE_LEAF]);
352
352
  /** Each leaf with its path from the root, in manifest order. */
@@ -1,8 +1,8 @@
1
1
  import { r as isRecord, t as compact } from "./compact-CAf557ZB.js";
2
2
  import { n as freezeDeep } from "./freeze-jjan0lCv.js";
3
3
  import { n as isForbiddenKey, o as readPath } from "./paths-CUvURzHp.js";
4
- import { n as expirySeconds } from "./expiry-6XByK0dm.js";
5
4
  import { r as validateRecord } from "./thenable-BNSM1U2R.js";
5
+ import { o as expirySeconds } from "./ids-DzhJaCUj.js";
6
6
  import { t as anonymousSubject } from "./subject-C7RddW0G.js";
7
7
  import { t as readClaim } from "./claims-map-CKkoAAYF.js";
8
8
  import { t as clientNameOf } from "./clients-DYr3U86j.js";
@@ -2,7 +2,7 @@ import { t as compact } from "./compact-CAf557ZB.js";
2
2
  import { n as PermDockValidationError } from "./validation-error-CYg2kJEw.js";
3
3
  import { n as PermDockDeniedError, r as PermDockRevokedError, t as PermDockApprovalRequiredError } from "./errors-ynga1EQy.js";
4
4
  import { a as decisionResponse, l as problemResponse } from "./problem-BWP1l86g.js";
5
- import { l as InvalidSignatureError } from "./evaluations-CNMVJVD6.js";
5
+ import { f as InvalidSignatureError } from "./evaluations-BzTDWO4m.js";
6
6
  //#region src/server/map-error.ts
7
7
  /**
8
8
  * Turns a thrown PermDock error into its Problem Details response, with the
@@ -1,14 +1,14 @@
1
- import { $ as JwtClaims, D as Policy, hr as Delegation, vt as TokenVerifier, xr as Subject, yr as Principal } from "../policy-types-BI9C5Sp5.js";
2
- import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { m as ApprovalStore } from "../types-BzxA2OAD.js";
4
- import { t as ApprovalHint } from "../errors-OTE9u4Wk.js";
5
- import { t as InstanceOptions } from "../instance-options-Cq66kEeR.js";
1
+ import { $ as JwtClaims, D as Policy, hr as Delegation, vt as TokenVerifier, xr as Subject, yr as Principal } from "../policy-types-rNfz7t0M.js";
2
+ import { w as Permission } from "../vocabulary-DeZvUaTw.js";
3
+ import { m as ApprovalStore } from "../types-ZfjQB0KC.js";
4
+ import { t as ApprovalHint } from "../errors-D_JIQJYb.js";
5
+ import { t as InstanceOptions } from "../instance-options-C6gEDOts.js";
6
6
  import { t as RequestContext } from "../request-context-C2_1lchh.js";
7
- import { n as PermDockWrap } from "../wrap-EQ6Or2Hi.js";
8
- import { o as OtelWrap } from "../types-DotXrris.js";
9
- import { n as DeniedTextEvent, t as DeniedText } from "../denied-text-De8cw3MW.js";
7
+ import { n as PermDockWrap } from "../wrap-B-k2qHJx.js";
8
+ import { o as OtelWrap } from "../types-_pi9kxS2.js";
9
+ import { n as DeniedTextEvent, t as DeniedText } from "../denied-text-BXQkWU7d.js";
10
10
  import { t as ClientNames } from "../clients-C_NOET3z.js";
11
- import { U as JwtSubjectOptions } from "../types-DBVSljAx.js";
11
+ import { U as JwtSubjectOptions } from "../types-Cq2rvv-C.js";
12
12
  import { CacheHint, Icon, McpServer, PromptCallback, ReadResourceCallback, ReadResourceTemplateCallback, RegisteredPrompt, RegisteredResource, RegisteredResourceTemplate, RegisteredTool, ResourceMetadata, ResourceTemplate, ScopeChallengeHandler, StandardSchemaWithJSON, ToolAnnotations, ToolCallback, Variables } from "@modelcontextprotocol/server";
13
13
  //#region src/mcp/types.d.ts
14
14
  /**
package/dist/mcp/index.js CHANGED
@@ -3,17 +3,18 @@ import { n as freezeDeep } from "../freeze-jjan0lCv.js";
3
3
  import { i as stepUpOf, o as statusProblem } from "../problem-details-CLDgX1KV.js";
4
4
  import { n as describe } from "../describe-BZAlPHxT.js";
5
5
  import { c as listPermissions, m as annotationsFor } from "../permission-registry-B8tYxPIt.js";
6
- import { t as actorMayCallTool } from "../delegation-aK4T_5WU.js";
7
- import { t as anonymousSubject } from "../subject-C7RddW0G.js";
6
+ import { a as actorMayCallTool } from "../condition-evaluate-bVVRSdzq.js";
8
7
  import { n as resourceRef } from "../resource-ref-CaS9yVPi.js";
9
- import { i as challengeScope, l as withApp, o as hasScope, s as scopesReaching } from "../permdock-DbAq8_Fp.js";
10
- import { t as composeWraps } from "../wrap-C5PWzgkq.js";
11
- import { l as problemResponse, o as methodNotAllowed, r as bearerChallenge, u as protectedResourceMetadataUrl } from "../problem-BWP1l86g.js";
8
+ import { i as challengeScope, o as hasScope, s as scopesReaching } from "../permdock-B5LyNVgn.js";
9
+ import { t as anonymousSubject } from "../subject-C7RddW0G.js";
10
+ import { r as withApp } from "../app-DIvM65Mv.js";
11
+ import { t as composeWraps } from "../wrap-BKU5Arsu.js";
12
+ import { t as instanceOptions } from "../instance-options-URVwqpMW.js";
12
13
  import { t as clientNameOf } from "../clients-DYr3U86j.js";
13
- import { r as mapClaimsToSubject } from "../map-claims-PQwHynxV.js";
14
- import { r as instanceOptions } from "../build-instance-CkRKgjSj.js";
14
+ import { r as mapClaimsToSubject } from "../map-claims-CAa_bQt9.js";
15
+ import { l as problemResponse, o as methodNotAllowed, r as bearerChallenge, u as protectedResourceMetadataUrl } from "../problem-BWP1l86g.js";
15
16
  import { t as decideAll } from "../decide-set-DXEPepY1.js";
16
- import { i as refusalText, n as createAgentKernel } from "../kernel-CLEzDmbv.js";
17
+ import { i as refusalText, n as createAgentKernel } from "../kernel-NmxiWII2.js";
17
18
  import { t as boundedMap } from "../lru-8q4WZjBV.js";
18
19
  import { n as delegationFrom, t as authorizationDetailsOf } from "../delegation-input-DcXhiMkf.js";
19
20
  import { n as deniedToolRefusal, r as toolErrorResult, t as approvalToolRefusal } from "../tool-refusal-D4spOJ7I.js";
@@ -7,7 +7,7 @@ import "./sources-C4vkzZJV.js";
7
7
  import { a as RETIRE_MARKER } from "./markers-BeHZ4x9Q.js";
8
8
  import { i as refuseDirty, t as applyFiles } from "./files-CfiRtQ-m.js";
9
9
  import { f as writeOutputFiles, n as dataMigrationFile } from "./output-files-CM0BnH05.js";
10
- import { r as HELPERS } from "./shared-sW3VYchq.js";
10
+ import { r as HELPERS } from "./shared-DfaIWvIJ.js";
11
11
  import { o as sqlStatements } from "./deciding-columns-NB4wcyBf.js";
12
12
  import { i as retireSql, r as retirePlan } from "./retire-B2xffQgY.js";
13
13
  import { existsSync, readFileSync } from "node:fs";
@@ -1,10 +1,10 @@
1
1
  import { c as listPermissions } from "./permission-registry-B8tYxPIt.js";
2
2
  import { i as configError } from "./errors-BhRkoNS7.js";
3
- import { a as loadModule, s as pickNamed, t as asPermissionTree } from "./load-BaEamml-.js";
4
- import { i as isModuleKey, n as MODULE_KEYS } from "./config-shape-D9paLhEX.js";
3
+ import { r as parseSync } from "./optional-8TKc-0j4.js";
4
+ import { a as loadModule, s as pickNamed, t as asPermissionTree } from "./load-C4p4VgwR.js";
5
+ import { i as isModuleKey, n as MODULE_KEYS } from "./config-shape-C4zqzG2K.js";
5
6
  import { existsSync, readFileSync, statSync } from "node:fs";
6
7
  import { dirname, relative, resolve } from "node:path";
7
- import { parseSync } from "oxc-parser";
8
8
  //#region src/cli/project/module-values.ts
9
9
  /** The export each module key is read from, as `load.ts` reads it. */
10
10
  const EXPORT_OF = {
@@ -1,9 +1,9 @@
1
- import { D as Policy, yr as Principal } from "../policy-types-BI9C5Sp5.js";
2
- import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { a as PermDock } from "../permdock-CsrvbzHk.js";
1
+ import { D as Policy, yr as Principal } from "../policy-types-rNfz7t0M.js";
2
+ import { w as Permission } from "../vocabulary-DeZvUaTw.js";
3
+ import { a as PermDock } from "../permdock-BaB-KQqn.js";
4
4
  import { n as RevocationFeed } from "../revocations-BaUXHM1N.js";
5
- 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-Bfl-IrzZ.js";
6
- import { t as ServerAdapterOptions } from "../bind-XvnD_SUz.js";
5
+ 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--_Hann81.js";
6
+ import { t as ServerAdapterOptions } from "../bind-CnOMjazH.js";
7
7
  import { r as sendResponse, t as NodeRequest } from "../http-B_LphE5Y.js";
8
8
  import { CanActivate, DynamicModule, ExceptionFilter, ExecutionContext, Type } from "@nestjs/common";
9
9
  //#region src/nest/http.d.ts
@@ -1,10 +1,10 @@
1
1
  import { t as compact } from "../compact-CAf557ZB.js";
2
2
  import { n as PermDockValidationError } from "../validation-error-CYg2kJEw.js";
3
3
  import { n as PermDockDeniedError, r as PermDockRevokedError, t as PermDockApprovalRequiredError } from "../errors-ynga1EQy.js";
4
+ import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-BzTDWO4m.js";
4
5
  import { c as writeReply, r as hasCredentials } from "../http-DKLXrFGk.js";
5
- import { l as InvalidSignatureError, p as webBotAuthVerifier, u as discoverViaSignatureAgent } from "../evaluations-CNMVJVD6.js";
6
- import { t as problemFromError } from "../map-error-EOhahOVA.js";
7
- import { a as socketConnection, r as bindKernel } from "../bind-CJf7S-Jd.js";
6
+ import { a as socketConnection, r as bindKernel } from "../bind-B4Z0U2Gr.js";
7
+ import { t as problemFromError } from "../map-error-p4ROJ_26.js";
8
8
  import { a as onRevoked, n as closeReason, t as POLICY_VIOLATION } from "../stream-DQ3rbO3J.js";
9
9
  import { n as sendResponse, r as toRequest$1, t as isServerResponse } from "../http-DH94eh6f.js";
10
10
  import { Catch, Controller, Get, Inject, Injectable, Module, Post, Req, Res, createParamDecorator } from "@nestjs/common";
@@ -1,14 +1,14 @@
1
- import { D as Policy, N as PolicyVocabulary, Q as Intent, Qn as DenialReason, Yn as Decision, an as SnapshotTenants, en as Snapshot, xr as Subject, yr as Principal } from "../policy-types-BI9C5Sp5.js";
2
- import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { A as PermissionState, a as PermDock, d as UncheckedData, k as PermissionCheck, s as RowData } from "../permdock-CsrvbzHk.js";
4
- import { m as ApprovalStore } from "../types-BzxA2OAD.js";
5
- import { t as InstanceOptions } from "../instance-options-Cq66kEeR.js";
6
- import { n as PermDockWrap } from "../wrap-EQ6Or2Hi.js";
7
- import { o as OtelWrap } from "../types-DotXrris.js";
8
- import { n as DescribeMessages } from "../describe-DibQM6g-.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-MPinwwgZ.js";
10
- import { v as ActionResult, y as ProtectedAction } from "../store-CRQ5VrWR.js";
11
- import { n as PermDockProviderProps } from "../types-MixnvXQ5.js";
1
+ import { D as Policy, N as PolicyVocabulary, Q as Intent, Qn as DenialReason, Yn as Decision, an as SnapshotTenants, en as Snapshot, xr as Subject, yr as Principal } from "../policy-types-rNfz7t0M.js";
2
+ import { w as Permission } from "../vocabulary-DeZvUaTw.js";
3
+ import { M as PermissionCheck, N as PermissionState, a as PermDock, d as UncheckedData, s as RowData } from "../permdock-BaB-KQqn.js";
4
+ import { m as ApprovalStore } from "../types-ZfjQB0KC.js";
5
+ import { t as InstanceOptions } from "../instance-options-C6gEDOts.js";
6
+ import { n as PermDockWrap } from "../wrap-B-k2qHJx.js";
7
+ import { o as OtelWrap } from "../types-_pi9kxS2.js";
8
+ import { n as DescribeMessages } from "../describe-DVobr5FX.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-Cc7VNabe.js";
10
+ import { v as ActionResult, y as ProtectedAction } from "../store-DSyjHD5-.js";
11
+ import { n as PermDockProviderProps } from "../types-BpxdxaRD.js";
12
12
  import { ReactElement, ReactNode } from "react";
13
13
  import { StandardSchemaV1 } from "@standard-schema/spec";
14
14
  //#region src/next/types.d.ts
@@ -137,24 +137,50 @@ type PermDockHandler = {
137
137
  readonly POST: (request: Request) => Promise<Response>;
138
138
  readonly GET: (request: Request) => Promise<Response>;
139
139
  };
140
- type ProtectActionOptions<TInput, TRow> = {
140
+ /** The schemas of the leading arguments, one per argument, in call order. */
141
+ type ProtectActionArgSchemas<TArgs extends readonly unknown[]> = { readonly [K in keyof TArgs]: StandardSchemaV1<unknown, TArgs[K]>; };
142
+ type ProtectActionOptions<TInput, TRow, TArgs extends readonly unknown[] = readonly []> = {
141
143
  /** Validates the action's argument before anything else runs. */
142
144
  readonly input: StandardSchemaV1<unknown, TInput>;
145
+ /**
146
+ * Validates the arguments before `input`, one schema per argument. The action
147
+ * is then called as `(...args, input, { approval }?)`.
148
+ */
149
+ readonly args?: ProtectActionArgSchemas<TArgs>;
143
150
  /** The row to decide on; `null` or `undefined` answers `404`. */
144
- readonly data?: (input: TInput) => TRow | null | undefined | Promise<TRow | null | undefined>;
151
+ readonly data?: (input: TInput, args: TArgs) => TRow | null | undefined | Promise<TRow | null | undefined>;
145
152
  /** The tenant to build the instance for; default the factory's `tenant`. */
146
- readonly tenant?: (input: TInput) => string | undefined;
153
+ readonly tenant?: (input: TInput, args: TArgs) => string | undefined;
147
154
  };
148
- type ProtectedActionContext<TRow, V extends PolicyVocabulary> = {
155
+ type ProtectedActionContext<TRow, V extends PolicyVocabulary, TArgs extends readonly unknown[] = readonly []> = {
149
156
  readonly permdock: PermDock<V>;
150
157
  readonly decision: Extract<Decision, {
151
158
  readonly outcome: "granted";
152
159
  }>;
153
160
  /** The loaded row; `undefined` without a `data` loader. */
154
161
  readonly data: TRow;
162
+ /** The validated leading arguments; empty without `args`. */
163
+ readonly args: TArgs;
164
+ };
165
+ type ProtectedActionHandler<TInput, TRow, TResult, V extends PolicyVocabulary, TArgs extends readonly unknown[] = readonly []> = (input: TInput, context: ProtectedActionContext<TRow, V, TArgs>) => TResult | Promise<TResult>;
166
+ /** `(...args, input, { approval }?)`; `args` is empty without the option. */
167
+ type ProtectedActionWithArgs<TArgs extends readonly unknown[], T> = (...call: [...{ readonly [K in keyof TArgs]: unknown; }, unknown, {
168
+ readonly approval?: string;
169
+ }?]) => Promise<ActionResult<T>>;
170
+ type ProtectAction<V extends PolicyVocabulary> = <TInput, TRow = undefined, const TArgs extends readonly unknown[] = readonly []>(permission: Permission, options: ProtectActionOptions<TInput, TRow, TArgs>) => <TResult, TMapped = Awaited<TResult>>(handler: ProtectedActionHandler<TInput, TRow, TResult, V, TArgs>, hooks?: ProtectActionHooks<TRow, V, TArgs, Awaited<TResult>, TMapped>) => ProtectedActionWithArgs<TArgs, TMapped>;
171
+ /**
172
+ * `after` runs once the handler returned, with the granted decision; a throw
173
+ * answers `500`. `result` maps the handler's result to the returned value. Both
174
+ * take the handler's result type, so they sit beside the handler.
175
+ */
176
+ type ProtectActionHooks<TRow, V extends PolicyVocabulary, TArgs extends readonly unknown[], TResult, TMapped> = {
177
+ readonly after?: (decision: Extract<Decision, {
178
+ readonly outcome: "granted";
179
+ }>, context: ProtectedActionContext<TRow, V, TArgs> & {
180
+ readonly result: TResult;
181
+ }) => void | Promise<void>;
182
+ readonly result?: (result: TResult, context: ProtectedActionContext<TRow, V, TArgs>) => TMapped | Promise<TMapped>;
155
183
  };
156
- type ProtectedActionHandler<TInput, TRow, TResult, V extends PolicyVocabulary> = (input: TInput, context: ProtectedActionContext<TRow, V>) => TResult | Promise<TResult>;
157
- type ProtectAction<V extends PolicyVocabulary> = <TInput, TRow = undefined>(permission: Permission, options: ProtectActionOptions<TInput, TRow>) => <TResult>(handler: ProtectedActionHandler<TInput, TRow, TResult, V>) => ProtectedAction<Awaited<TResult>>;
158
184
  type NextPermDock<V extends PolicyVocabulary = PolicyVocabulary> = {
159
185
  readonly getPermDock: (query?: GetPermDockQuery) => Promise<PermDock<V>>;
160
186
  /**
@@ -1,17 +1,17 @@
1
1
  import { t as compact } from "../compact-CAf557ZB.js";
2
2
  import { n as PermDockValidationError } from "../validation-error-CYg2kJEw.js";
3
3
  import { o as statusProblem, t as notFoundDetails } from "../problem-details-CLDgX1KV.js";
4
+ import { a as permissionStates } from "../checks-fyDOhcz0.js";
4
5
  import { n as isThenable } from "../thenable-BNSM1U2R.js";
5
6
  import { n as resourceRef } from "../resource-ref-CaS9yVPi.js";
6
- import { a as permissionStates } from "../checks-fyDOhcz0.js";
7
- import { l as withApp } from "../permdock-DbAq8_Fp.js";
8
- import { n as wrapPermDock } from "../wrap-C5PWzgkq.js";
7
+ import { r as withApp } from "../app-DIvM65Mv.js";
8
+ import { n as wrapPermDock } from "../wrap-BKU5Arsu.js";
9
+ import { n as resolveOrNull, t as buildInstance } from "../build-instance-B0vsViF5.js";
10
+ import { n as NO_GRANT, t as LOAD_FAILED } from "../decision-CaG5_eNJ.js";
9
11
  import { i as decisionProblem } from "../problem-BWP1l86g.js";
10
- import { s as resumeDecision } from "../helpers-D-MXwkOF.js";
12
+ import { o as evaluationsHandler } from "../evaluations-BzTDWO4m.js";
13
+ import { s as resumeDecision } from "../helpers-DzBIfL1N.js";
11
14
  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-CkRKgjSj.js";
13
- import { n as NO_GRANT, t as LOAD_FAILED } from "../decision-CaG5_eNJ.js";
14
- import { o as evaluationsHandler } from "../evaluations-CNMVJVD6.js";
15
15
  import { cache } from "react";
16
16
  import { jsx } from "react/jsx-runtime";
17
17
  import { forbidden, unauthorized, unstable_rethrow } from "#next/navigation";
@@ -51,22 +51,43 @@ function invalidInput(permission, issues) {
51
51
  message: `${permission.key}: ${issues.map((issue) => issue.message).join("; ")}.`
52
52
  }).toProblemDetails());
53
53
  }
54
+ /** Prefixes each issue path with the argument's position. */
55
+ function argIssues(index, issues) {
56
+ return issues.map((issue) => ({
57
+ message: issue.message,
58
+ path: [index, ...issue.path ?? []]
59
+ }));
60
+ }
61
+ async function parseArgs(schemas, values) {
62
+ const results = await Promise.all(schemas.map((schema, index) => parseInput(schema, values[index])));
63
+ const parsed = [];
64
+ for (const [index, result] of results.entries()) {
65
+ if (result.issues !== void 0) return { issues: plainIssues(argIssues(index, result.issues)) };
66
+ parsed.push(result.value);
67
+ }
68
+ return { value: parsed };
69
+ }
54
70
  /**
55
- * `protectAction(permission, { input, data?, tenant? })(handler)`: validates
56
- * the input, loads the row, decides, then runs the handler. Every refusal,
57
- * including a throw, is a Problem Details result; nothing but Next.js
58
- * interrupts leaves as an exception.
71
+ * `protectAction(permission, { input, args?, data?, tenant? })(handler,
72
+ * hooks?)`: validates the arguments and the input, loads the row, decides, then
73
+ * runs the handler. Every refusal, including a throw, is a Problem Details
74
+ * result; nothing but Next.js interrupts leaves as an exception.
59
75
  */
60
76
  function protectActionOf(deps) {
61
- return (permission, options) => (handler) => async (value, call) => {
62
- const parsed = await parseInput(options.input, value);
77
+ const protect = (permission, options) => (handler, hooks) => async (...call) => {
78
+ const schemas = options.args ?? [];
79
+ const parsedArgs = await parseArgs(schemas, call);
80
+ if ("issues" in parsedArgs) return invalidInput(permission, parsedArgs.issues);
81
+ const args = Object.freeze(parsedArgs.value);
82
+ const parsed = await parseInput(options.input, call[schemas.length]);
63
83
  if (parsed.issues !== void 0) return invalidInput(permission, parsed.issues);
64
84
  const input = parsed.value;
85
+ const approval = approvalOf(call[schemas.length + 1]);
65
86
  let permdock;
66
87
  let data;
67
88
  try {
68
89
  permdock = await deps.getPermDock(compact({
69
- tenant: options.tenant?.(input),
90
+ tenant: options.tenant?.(input, args),
70
91
  intent: "write"
71
92
  }));
72
93
  } catch (error) {
@@ -75,7 +96,7 @@ function protectActionOf(deps) {
75
96
  }
76
97
  if (options.data !== void 0) {
77
98
  try {
78
- data = await options.data(input) ?? void 0;
99
+ data = await options.data(input, args) ?? void 0;
79
100
  } catch (error) {
80
101
  deps.rethrow(error);
81
102
  return refused(decisionProblem(LOAD_FAILED, permission));
@@ -94,23 +115,35 @@ function protectActionOf(deps) {
94
115
  store: deps.store,
95
116
  resource: resourceRef(permission, data),
96
117
  adapter: "next",
97
- token: call?.approval
118
+ token: approval
98
119
  });
99
120
  if (decision.outcome !== "granted") return refused(decisionProblem(decision, permission, compact({ disclosure: data === void 0 ? void 0 : deps.policy.resources.get(permission.resource)?.disclosure })));
121
+ const context = {
122
+ permdock,
123
+ decision,
124
+ data,
125
+ args
126
+ };
100
127
  try {
128
+ const result = await handler(input, context);
129
+ await hooks?.after?.(decision, {
130
+ ...context,
131
+ result
132
+ });
101
133
  return {
102
134
  ok: true,
103
- value: await handler(input, {
104
- permdock,
105
- decision,
106
- data
107
- })
135
+ value: hooks?.result === void 0 ? result : await hooks.result(result, context)
108
136
  };
109
137
  } catch (error) {
110
138
  deps.rethrow(error);
111
139
  return refused(statusProblem(500, `${permission.key}: the action failed`));
112
140
  }
113
141
  };
142
+ return protect;
143
+ }
144
+ function approvalOf(call) {
145
+ if (typeof call !== "object" || call === null || !("approval" in call)) return;
146
+ return typeof call.approval === "string" ? call.approval : void 0;
114
147
  }
115
148
  //#endregion
116
149
  //#region src/next/provider.tsx