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
@@ -2,17 +2,16 @@ import { a as getResource } from "./permission-registry-B8tYxPIt.js";
2
2
  import { u as usageResult } from "./errors-BhRkoNS7.js";
3
3
  import { a as rel, r as listSourceFiles } from "./files-BSjrtIHw.js";
4
4
  import { o as USAGE_REPORT_SCHEMA } from "./version-DMQ0dnN5.js";
5
- import { c as jsonSchemaOf } from "./catalog-doc-nrgfbh8I.js";
6
- import { a as loadModule, n as asPolicy, s as pickNamed } from "./load-BaEamml-.js";
7
- import { r as runCollect } from "./collect-DN_x7hvV.js";
5
+ import { c as jsonSchemaOf } from "./catalog-doc-Zi0jRpyH.js";
6
+ import { n as jiti, r as parseSync, t as createVisitor } from "./optional-8TKc-0j4.js";
7
+ import { a as loadModule, n as asPolicy, s as pickNamed } from "./load-C4p4VgwR.js";
8
+ import { r as runCollect } from "./collect-Cr71JA7z.js";
8
9
  import { t as beforeFirst } from "./text-BMFRfBqc.js";
9
- import { t as DOCS_BASE } from "./manifest-CCd-xrM3.js";
10
- import { r as findingOf } from "./output-KT0a3B3H.js";
10
+ import { t as DOCS_BASE } from "./manifest-BAf7cgRx.js";
11
+ import { r as findingOf } from "./output-CYgfpT6o.js";
11
12
  import { existsSync, readFileSync, realpathSync } from "node:fs";
12
13
  import { dirname, resolve } from "node:path";
13
14
  import { fileURLToPath, pathToFileURL } from "node:url";
14
- import { createJiti } from "jiti";
15
- import { Visitor, parseSync } from "oxc-parser";
16
15
  import { isBuiltin } from "node:module";
17
16
  //#region src/cli/doctor/source.ts
18
17
  /**
@@ -23,6 +22,7 @@ const SERVER_SPECIFIERS = [
23
22
  "permdock/a2a",
24
23
  "permdock/agent",
25
24
  "permdock/ai-sdk",
25
+ "permdock/app",
26
26
  "permdock/approvals",
27
27
  "permdock/astro",
28
28
  "permdock/authzen",
@@ -144,12 +144,12 @@ function realFile(path) {
144
144
  * `exports`. An unresolvable specifier gives `undefined`.
145
145
  */
146
146
  function resolverFor(file) {
147
- const jiti = createJiti(file, { tsconfigPaths: dirname(file) });
147
+ const resolver = jiti().createJiti(file, { tsconfigPaths: dirname(file) });
148
148
  const parentURL = pathToFileURL(file);
149
149
  return (specifier) => {
150
150
  if (specifier === "" || isBuiltin(specifier)) return;
151
151
  try {
152
- const url = jiti.esmResolve(specifier, {
152
+ const url = resolver.esmResolve(specifier, {
153
153
  parentURL,
154
154
  try: true
155
155
  });
@@ -285,7 +285,7 @@ function permdockOptionObjects(source) {
285
285
  const namespaces = /* @__PURE__ */ new Set();
286
286
  const constants = /* @__PURE__ */ new Map();
287
287
  const calls = [];
288
- new Visitor({
288
+ createVisitor({
289
289
  ImportDeclaration(node) {
290
290
  if (node.importKind === "type" || !isPermDockSpecifier(node.source.value)) return;
291
291
  for (const specifier of node.specifiers) if (specifier.type === "ImportNamespaceSpecifier") namespaces.add(specifier.local.name);
@@ -16,7 +16,7 @@ const usage = defineLeaf({
16
16
  }
17
17
  },
18
18
  async run(ctx, { flags }) {
19
- return (await import("./usage-dmSjKx-Z.js")).runUsage({
19
+ return (await import("./usage-CmyGbo4e.js")).runUsage({
20
20
  cwd: ctx.cwd,
21
21
  config: ctx.config,
22
22
  ignore: flags.ignore,
@@ -0,0 +1 @@
1
+ export { t as runUsage } from "./usage-0wsl83uw.js";
@@ -1,4 +1,4 @@
1
- import { a as ProblemDetails } from "./errors-OTE9u4Wk.js";
1
+ import { a as ProblemDetails } from "./errors-D_JIQJYb.js";
2
2
  import { StandardSchemaV1 } from "@standard-schema/spec";
3
3
  //#region src/core/validation-error.d.ts
4
4
  /**
@@ -1,35 +1,35 @@
1
1
  import { a as sole, r as isRecord } from "./compact-CAf557ZB.js";
2
2
  import { l as isConditionRef, o as hasConditionOp } from "./refs-C8BKxc_e.js";
3
- import { A as memoryCustomRoleSource, S as memoryRelationSource } from "./src-Cop53_X1.js";
3
+ import { D as memoryCustomRoleSource, x as memoryRelationSource } from "./src-BG9YJM3Q.js";
4
4
  import { c as listPermissions, h as formerKeys, n as findPermission } from "./permission-registry-B8tYxPIt.js";
5
5
  import { c as isEdgeRelation, l as isFieldRelation, u as isPrincipalRelation } from "./resource-relations-8-pCScBO.js";
6
6
  import { f as nowMillis, u as isoAt } from "./time-nR1JesoH.js";
7
- import { t as canonicalJson } from "./canonical-json-DwilZ1iB.js";
8
- import { c as rootScope, d as scopeList, o as normalizeMemberships } from "./scopes-BSdYaGHs.js";
9
- import { o as requiresStandIn } from "./delegation-aK4T_5WU.js";
10
- import { p as scopeField } from "./tenancy-DvOHHk3-.js";
11
- import { l as policyLevels, t as coveredLevels } from "./policy-CaAME-Rh.js";
7
+ import { c as rootScope, d as scopeList, o as normalizeMemberships } from "./scopes-gdH__vDZ.js";
8
+ import { u as requiresStandIn } from "./condition-evaluate-bVVRSdzq.js";
9
+ import { p as scopeField } from "./tenancy-BlxY5T0q.js";
12
10
  import { t as requiresApproval } from "./approval-required-TzNB9oQA.js";
13
- import { c as andWhere, m as customRoleScope, v as leveled, y as membershipsClaim } from "./evaluate-Dcq_U2TV.js";
14
- import { t as getPermDock } from "./permdock-DbAq8_Fp.js";
11
+ import { t as canonicalJson } from "./canonical-json-DwilZ1iB.js";
12
+ import { t as getPermDock } from "./permdock-B5LyNVgn.js";
13
+ import { l as policyLevels, t as coveredLevels } from "./policy-wGzbAPQF.js";
14
+ import { c as andWhere, m as customRoleScope, v as leveled, y as membershipsClaim } from "./evaluate-B5yZHmts.js";
15
15
  import { a as describeError, i as configError, u as usageResult } from "./errors-BhRkoNS7.js";
16
16
  import { t as policyRowConditionKeys } from "./row-conditions-BAGHOmVq.js";
17
17
  import { s as writeFileEnsuringDir } from "./files-BSjrtIHw.js";
18
- import { c as jsonSchemaOf } from "./catalog-doc-nrgfbh8I.js";
19
- import { o as loadPolicyAt } from "./load-BaEamml-.js";
18
+ import { c as jsonSchemaOf } from "./catalog-doc-Zi0jRpyH.js";
19
+ import { o as loadPolicyAt } from "./load-C4p4VgwR.js";
20
20
  import "./budget-BBCPDOGP.js";
21
21
  import { i as qualifySqlTable, n as defaultSqlCommand, t as SQL_IDENT } from "./sql-0WjxIp9g.js";
22
- import { a as scopeMembershipTable, i as scopeColumn } from "./compile-B_oJqmIg.js";
22
+ import { a as scopeMembershipTable, i as scopeColumn } from "./compile-Cvru58id.js";
23
23
  import "./sources-C4vkzZJV.js";
24
24
  import { t as beforeFirst } from "./text-BMFRfBqc.js";
25
- import { t as DOCS_BASE } from "./manifest-CCd-xrM3.js";
26
- import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-Cemqurt8.js";
25
+ import { t as DOCS_BASE } from "./manifest-BAf7cgRx.js";
26
+ import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-BVZc7OCF.js";
27
27
  import { n as pgConnector, t as connectPgPool } from "./pg-Ddxsd5ZB.js";
28
- import { A as quoteQualified, N as arrayColumnsOf, O as quoteIdent, P as columnTypesOf, _ as subjectClaimJsonSql, a as customRolesOn, j as quoteTable, k as quoteLiteral, r as HELPERS, v as subjectClaimSql } from "./shared-sW3VYchq.js";
29
- import { C as accessSql, D as tokenScopeAllowsCall, S as requiresSql, ht as scopeTable, k as capabilityAccessSql, n as tableNameOf, o as graphPlan, q as apiKeyAllowsCall, r as tableNames } from "./tables-XrvffTMj.js";
30
- import { c as breakGlassKey, f as compileConditionSql, l as collectGrants, m as sqlFunctionNames, p as contextRefs, s as breakGlassHolder } from "./ownership-CeNOtQMV.js";
28
+ import { A as quoteQualified, N as arrayColumnsOf, O as quoteIdent, P as columnTypesOf, _ as subjectClaimJsonSql, a as customRolesOn, j as quoteTable, k as quoteLiteral, r as HELPERS, v as subjectClaimSql } from "./shared-DfaIWvIJ.js";
29
+ import { A as tokenScopeAllowsCall, Ct as scopeTable, N as capabilityAccessSql, T as accessSql, c as graphPlan, i as tableNames, r as tableNameOf, tt as apiKeyAllowsCall, w as requiresSql } from "./tables-CbEOy2Ma.js";
30
+ import { c as breakGlassKey, f as compileConditionSql, l as collectGrants, m as sqlFunctionNames, p as contextRefs, s as breakGlassHolder } from "./ownership-adPAsUwY.js";
31
31
  import { t as membershipSourcesOf } from "./sources-qoIJQrJv.js";
32
- import { _ as wrapSql, g as validitySql, m as andSql, s as viewName, t as FIELD_VIEWS } from "./fields-D_TfExiI.js";
32
+ import { _ as wrapSql, g as validitySql, m as andSql, s as viewName, t as FIELD_VIEWS } from "./fields-CVyOk-f1.js";
33
33
  import { resolve } from "node:path";
34
34
  import { createHash, randomUUID } from "node:crypto";
35
35
  //#region src/cli/core/ignores.ts
@@ -269,16 +269,33 @@ function levelReachOf(policy, keys) {
269
269
  return out.toSorted(([a, x], [b, y]) => a === b ? x < y ? -1 : 1 : a < b ? -1 : 1);
270
270
  }
271
271
  /**
272
+ * The first word of a camelCase, snake_case or kebab-case compound that is one
273
+ * of the six default verbs: `updateStatus` and `list_archived`. The prefix list
274
+ * is closed; any other verb needs an `rls.actions` entry.
275
+ */
276
+ const VERB_PREFIX = /^(read|list|get|create|update|delete)(?=[A-Z0-9_-])/u;
277
+ /**
278
+ * The SQL command a compound action name implies through its default-verb
279
+ * prefix, or `undefined` for an exact verb, a configured action or any other
280
+ * name.
281
+ */
282
+ function inferredCommand(action, actions) {
283
+ if (actions !== void 0 && Object.hasOwn(actions, action) || defaultSqlCommand(action) !== void 0) return;
284
+ const verb = VERB_PREFIX.exec(action)?.[1];
285
+ return verb === void 0 ? void 0 : defaultSqlCommand(verb);
286
+ }
287
+ /**
272
288
  * The SQL command `action` compiles to: `rls.actions` first, then the six
273
- * default verbs. Any other verb is `undefined`, as `'none'` is: no policy, and
274
- * its grants are still seeded.
289
+ * default verbs, then a compound whose prefix is one of them ({@link
290
+ * inferredCommand}). Any other verb is `undefined`, as `'none'` is: no policy,
291
+ * and its grants are still seeded.
275
292
  */
276
293
  function commandFor(action, actions) {
277
294
  if (actions !== void 0 && Object.hasOwn(actions, action)) {
278
295
  const configured = actions[action];
279
296
  return configured === "none" ? void 0 : configured;
280
297
  }
281
- return defaultSqlCommand(action);
298
+ return defaultSqlCommand(action) ?? inferredCommand(action, actions);
282
299
  }
283
300
  function tableFor(resource, tables) {
284
301
  return tables?.[resource] ?? resource;
@@ -375,7 +392,7 @@ function prepare(item, tables, warnings, skipClosures, sql, rowActions = false)
375
392
  const table = tableFor(grant.permission.resource, tables);
376
393
  if (command === void 0) {
377
394
  if (tableless && item.access.kind !== "role") {
378
- warnings.push(`skipped ${label}/${grant.permission.key}: rls.tables.${grant.permission.resource} is false, so the resource has no table, and only role grants are seeded`);
395
+ warnings.push(`skipped ${label}/${grant.permission.key}: rls.tables.${grant.permission.resource} is false or a tableOf, so the resource writes no policies of its own, and only role grants are seeded`);
379
396
  return;
380
397
  }
381
398
  if (item.access.kind !== "role" && rowActions) return {
@@ -1139,7 +1156,7 @@ function emitPgtap(input) {
1139
1156
  continue;
1140
1157
  }
1141
1158
  const outcome = status.granted ? "granted" : "denied";
1142
- const table = tableNameOf(input.config.rls?.tables?.[permission.resource], permission.resource);
1159
+ const table = tableNameOf(input.config.rls?.tables?.[permission.resource], permission.resource, input.config.rls?.tables);
1143
1160
  const statement = inlineStatement(statementFor(fixture, permission.action, table));
1144
1161
  lines.push(`-- ${label}`, "savepoint permdock_fixture;", ...databaseMode(input.config) ? fixtureMembershipSql(input.config, scopes, fixture, sources) : [], "set local role \"authenticated\";", ...subjectSettings(fixture, subject).map(([name, value]) => `select set_config(${quoteLiteral(name)}, ${quoteLiteral(value)}, true);`), `select is(${PGTAP_DECISION}(${quoteLiteral(statement)}), ${quoteLiteral(outcome)}, ${quoteLiteral(`${label} ${outcome}`)});`, "rollback to savepoint permdock_fixture;");
1145
1162
  }
@@ -1541,7 +1558,7 @@ async function verifyAgainstDatabase(input) {
1541
1558
  notes.push(`${fixture.action}: rls.tables.${permission.resource} is false, so there is no table`);
1542
1559
  continue;
1543
1560
  }
1544
- const table = tableNameOf(input.config.rls?.tables?.[permission.resource], permission.resource);
1561
+ const table = tableNameOf(input.config.rls?.tables?.[permission.resource], permission.resource, input.config.rls?.tables);
1545
1562
  await query("begin");
1546
1563
  try {
1547
1564
  if (seedsTables) await seedCustomRoles(query, schema, input.customRoles, scopes);
@@ -1716,4 +1733,4 @@ async function runRlsVerify(input) {
1716
1733
  });
1717
1734
  }
1718
1735
  //#endregion
1719
- export { splitIgnored as S, indexTargets as _, verifyResult as a, readTableIndexFacts as b, callsHelper as c, rowConditionMessage as d, commandFor as f, INDEX_COLUMNS_SQL as g, COLUMNS_SQL as h, verifyIgnores as i, helperCallKeys as l, tableFor as m, runRlsVerify as n, HELPER_TABLES as o, compileGrants as p, rlsFinding as r, ROW_CONDITION_FIX as s, canFixture as t, helperTablePolicies as u, indexesSql as v, parseIgnores as x, pruneIndexTargets as y };
1736
+ export { splitIgnored as C, parseIgnores as S, INDEX_COLUMNS_SQL as _, verifyResult as a, pruneIndexTargets as b, callsHelper as c, rowConditionMessage as d, commandFor as f, COLUMNS_SQL as g, tableFor as h, verifyIgnores as i, helperCallKeys as l, inferredCommand as m, runRlsVerify as n, HELPER_TABLES as o, compileGrants as p, rlsFinding as r, ROW_CONDITION_FIX as s, canFixture as t, helperTablePolicies as u, indexTargets as v, readTableIndexFacts as x, indexesSql as y };
@@ -0,0 +1,34 @@
1
+ import { _ as claimsFirst } from "./instance-snapshot-D_dGTq--.js";
2
+ //#region src/core/version-sources.ts
3
+ /**
4
+ * The instance options for one version cache: `memberships` wrapped in
5
+ * `claimsFirst(source, { onStale: 'reread', versions })`. One object per cache,
6
+ * so every instance of a subject at one version shares an `instances` entry.
7
+ */
8
+ function versionSources(input) {
9
+ const byCache = /* @__PURE__ */ new WeakMap();
10
+ let uncached;
11
+ const build = (versions) => ({
12
+ ...input.options,
13
+ ...input.instances === void 0 ? {} : { instances: input.instances },
14
+ ...input.memberships === void 0 ? {} : { memberships: claimsFirst(input.memberships, {
15
+ onStale: "reread",
16
+ ...input.version === void 0 ? {} : { version: input.version },
17
+ ...versions === void 0 ? {} : { versions }
18
+ }) }
19
+ });
20
+ return (given) => {
21
+ const versions = given ?? input.versions;
22
+ if (versions === void 0) {
23
+ uncached ??= build(void 0);
24
+ return uncached;
25
+ }
26
+ const known = byCache.get(versions);
27
+ if (known !== void 0) return known;
28
+ const created = build(versions);
29
+ byCache.set(versions, created);
30
+ return created;
31
+ };
32
+ }
33
+ //#endregion
34
+ export { versionSources as t };
@@ -330,4 +330,72 @@ type InferPermissionTree<Input, Prefix extends string = "", X = never> = Input e
330
330
  */
331
331
  type PermissionsOf<Input, PX = never, RX = never> = InferPermissionTree<Input, "", PX> & ResourceXTree<RX>;
332
332
  //#endregion
333
- export { RESOURCE_NAME as A, ResourceRelation as C, RowOf as D, ResourceXTree as E, WithX as F, AppData as M, AppDataSchema as N, PERMISSION_ROW as O, MetaValue as P, ResourceParent as S, ResourceRestricted as T, ResourceLevel as _, EdgeGroups as a, ResourceNode as b, FieldRelation as c, PermissionKind as d, PermissionTree as f, ResourceInit as g, PrincipalRelation as h, EdgeGroup as i, RESOURCE_X as j, POLICY_SCOPES as k, InferPermissionTree as l, PermissionsOptions as m, ActionMeta as n, EdgeMatch as o, PermissionsOf as p, ComputedRelation as r, EdgeRelation as s, ActionList as t, Permission as u, ResourceLink as v, ResourceRelationInput as w, ResourceOptions as x, ResourceMeta as y };
333
+ //#region src/core/vocabulary.d.ts
334
+ declare const ROLE_KIND: "role";
335
+ declare const PLAN_KIND: "plan";
336
+ /** `defineRoles` and `definePlans` options. */
337
+ type VocabularyOptions<X = never> = {
338
+ /**
339
+ * A Standard Schema for every leaf's `meta.x`, validated synchronously at
340
+ * definition time. On a role tree it also checks the `meta.x` of custom roles
341
+ * a `CustomRoleSource` returns; an invalid one is dropped, not the role.
342
+ */
343
+ readonly x?: AppDataSchema<X>;
344
+ };
345
+ /**
346
+ * A role's metadata. `audience` names the surface its holders use (`'staff'`,
347
+ * `'portal'`, `'platform'`); `permdock.audiences()` lists the distinct
348
+ * audiences of the roles held in the active scope.
349
+ */
350
+ type RoleMeta = ActionMeta & {
351
+ readonly audience?: string;
352
+ };
353
+ type Role<K extends string = string> = {
354
+ readonly key: K;
355
+ /** A declared scope name, or the `tenant` / `team` alias. */
356
+ readonly on?: string;
357
+ readonly assignable: boolean;
358
+ readonly meta: RoleMeta;
359
+ /**
360
+ * A shared custom role: the platform defines it for every tenant, and a
361
+ * tenant admin cannot edit it.
362
+ */
363
+ readonly shared?: true;
364
+ readonly kind: typeof ROLE_KIND;
365
+ };
366
+ type Plan<K extends string = string> = {
367
+ readonly key: K;
368
+ readonly meta: ActionMeta;
369
+ readonly kind: typeof PLAN_KIND;
370
+ };
371
+ type RoleInit = {
372
+ /** A declared scope name, or the `tenant` / `team` alias. */
373
+ readonly on?: string;
374
+ readonly assignable?: boolean;
375
+ readonly meta?: RoleMeta;
376
+ };
377
+ type PlanInit = {
378
+ readonly meta?: ActionMeta;
379
+ };
380
+ type RoleTree = {
381
+ readonly [key: string]: Role;
382
+ };
383
+ type PlanTree = {
384
+ readonly [key: string]: Plan;
385
+ };
386
+ type Vocabulary = {
387
+ readonly permissions?: unknown;
388
+ readonly roles?: RoleTree;
389
+ readonly plans?: PlanTree;
390
+ };
391
+ type InferRoleTree<Input, X = never> = { readonly [K in keyof Input & string]: WithX<Role<K>, X>; };
392
+ type InferPlanTree<Input, X = never> = { readonly [K in keyof Input & string]: WithX<Plan<K>, X>; };
393
+ declare function isRole(value: unknown): value is Role;
394
+ declare function isPlan(value: unknown): value is Plan;
395
+ declare function defineRoles<const Input extends Record<string, RoleInit>, X = never>(input: Input, options?: VocabularyOptions<X>): InferRoleTree<Input, X>;
396
+ declare function definePlans<const Input extends Record<string, PlanInit>, X = never>(input: Input, options?: VocabularyOptions<X>): InferPlanTree<Input, X>;
397
+ declare function listRoles(tree: RoleTree | undefined): readonly Role[];
398
+ declare function listPlans(tree: PlanTree | undefined): readonly Plan[];
399
+ declare function findRole(tree: RoleTree | undefined, key: string): Role | undefined;
400
+ //#endregion
401
+ export { ResourceInit as A, ResourceXTree as B, InferPermissionTree as C, PermissionsOf as D, PermissionTree as E, ResourceOptions as F, RESOURCE_X as G, PERMISSION_ROW as H, ResourceParent as I, MetaValue as J, AppData as K, ResourceRelation as L, ResourceLink as M, ResourceMeta as N, PermissionsOptions as O, ResourceNode as P, ResourceRelationInput as R, FieldRelation as S, PermissionKind as T, POLICY_SCOPES as U, RowOf as V, RESOURCE_NAME as W, ComputedRelation as _, RoleTree as a, EdgeMatch as b, definePlans as c, isPlan as d, isRole as f, ActionMeta as g, ActionList as h, RoleMeta as i, ResourceLevel as j, PrincipalRelation as k, defineRoles as l, listRoles as m, PlanTree as n, Vocabulary as o, listPlans as p, AppDataSchema as q, Role as r, VocabularyOptions as s, Plan as t, findRole as u, EdgeGroup as v, Permission as w, EdgeRelation as x, EdgeGroups as y, ResourceRestricted as z };
@@ -1,11 +1,10 @@
1
- import { Jn as ApprovalRequiredDecision, N as PolicyVocabulary, Yn as Decision, en as Snapshot, vr as Membership, vt as TokenVerifier } from "../policy-types-BI9C5Sp5.js";
2
- import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { r as Role } from "../vocabulary-DEJ5j4mR.js";
4
- import { d as UncheckedData, s as RowData } from "../permdock-CsrvbzHk.js";
5
- import { c as requiredPlans } from "../errors-OTE9u4Wk.js";
6
- import { i as describe, r as DescribeOptions, t as DecisionDescription } from "../describe-DibQM6g-.js";
1
+ import { Jn as ApprovalRequiredDecision, N as PolicyVocabulary, Yn as Decision, en as Snapshot, vr as Membership, vt as TokenVerifier } from "../policy-types-rNfz7t0M.js";
2
+ import { r as Role, w as Permission } from "../vocabulary-DeZvUaTw.js";
3
+ import { d as UncheckedData, s as RowData } from "../permdock-BaB-KQqn.js";
4
+ import { c as requiredPlans } from "../errors-D_JIQJYb.js";
5
+ import { i as describe, r as DescribeOptions, t as DecisionDescription } from "../describe-DVobr5FX.js";
7
6
  import { t as PermissionBoundaryState } from "../boundary-C9ck-3uK.js";
8
- import { _ as TenantView, a as ClientPermDock, c as GateMode, d as PermissionState, g as SubjectView, h as RolesOptions, i as ApprovalState, l as GateView, m as ProviderOptionsBase, o as ClientStatus, p as ProtectedActionView, r as ApprovalHandle, s as FilterResult, u as PermissionSet, v as ActionResult, y as ProtectedAction } from "../store-CRQ5VrWR.js";
7
+ import { _ as TenantView, a as ClientPermDock, c as GateMode, d as PermissionState, g as SubjectView, h as RolesOptions, i as ApprovalState, l as GateView, m as ProviderOptionsBase, o as ClientStatus, p as ProtectedActionView, r as ApprovalHandle, s as FilterResult, u as PermissionSet, v as ActionResult, y as ProtectedAction } from "../store-DSyjHD5-.js";
9
8
  import { a as broadcastChannelRefresh, c as visibilityRefresh, i as authzChangeRefresh, n as EventSourceRefreshOptions, o as eventSourceRefresh, r as RefreshTrigger, s as focusRefresh, t as AuthzChangeRefresh } from "../refresh-on-L9UOwATg.js";
10
9
  import { t as approvalHeaders } from "../headers-B9jQxjtW.js";
11
10
  import { ComputedRef, DefineComponent, MaybeRefOrGetter, Plugin, VNode } from "vue";
package/dist/vue/index.js CHANGED
@@ -3,8 +3,8 @@ import { n as describe } from "../describe-BZAlPHxT.js";
3
3
  import { n as boundaryFallback, t as boundaryDigest } from "../boundary-BV3O1eud.js";
4
4
  import { n as actionRunner, r as approvalHeaders, t as actionApproval } from "../protected-action-OpOxtTsN.js";
5
5
  import { a as livePermDock, c as rolesView, d as subjectView, f as tenantView, i as gateView, l as scopedTenant, n as describeWith, o as permissionSet, r as filterResult, s as protectedView, t as approvalHandle, u as slotContent } from "../views-MWmJ6Y4P.js";
6
- import { a as eventSourceRefresh, i as broadcastChannelRefresh, l as isPromiseLike, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-CDvoX52-.js";
7
- import { n as switchTenant, t as providerStore } from "../provider-store-BTHGJH9j.js";
6
+ import { a as eventSourceRefresh, i as broadcastChannelRefresh, l as isPromiseLike, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-CXv6BHH6.js";
7
+ import { n as switchTenant, t as providerStore } from "../provider-store-D4PU1my_.js";
8
8
  import { computed, defineComponent, effectScope, getCurrentScope, inject, isRef, onErrorCaptured, onScopeDispose, provide, shallowRef, toValue, watch } from "vue";
9
9
  //#region src/vue/context.ts
10
10
  const permDockKey = Symbol("permdock");
@@ -1,5 +1,5 @@
1
- import { qt as Instant } from "./policy-types-BI9C5Sp5.js";
2
- import { m as ApprovalStore } from "./types-BzxA2OAD.js";
1
+ import { qt as Instant } from "./policy-types-rNfz7t0M.js";
2
+ import { m as ApprovalStore } from "./types-ZfjQB0KC.js";
3
3
  //#region src/workflow/waiter.d.ts
4
4
  type ApprovalWaitOptions = {
5
5
  /**
@@ -1,8 +1,8 @@
1
1
  import { i as dateAt } from "./time-nR1JesoH.js";
2
2
  import { a as describeError } from "./errors-BhRkoNS7.js";
3
3
  import { t as defaultSrcPath } from "./files-BSjrtIHw.js";
4
- import { r as runCollect } from "./collect-DN_x7hvV.js";
5
- import { n as isConfigFile, r as loadConfig } from "./config-D2oXUwos.js";
4
+ import { r as runCollect } from "./collect-Cr71JA7z.js";
5
+ import { n as isConfigFile, r as loadConfig } from "./config-DyNanTjZ.js";
6
6
  import { watch } from "node:fs";
7
7
  import { basename, dirname, relative, resolve, sep } from "node:path";
8
8
  //#region src/cli/watch.ts
@@ -0,0 +1 @@
1
+ export { i as watchCollect } from "./watch-BigZ260i.js";
@@ -1,5 +1,5 @@
1
- import { Yn as Decision, en as Snapshot } from "../policy-types-BI9C5Sp5.js";
2
- import { f as PermissionTree, u as Permission } from "../permission-types-CAY-GU7e.js";
1
+ import { Yn as Decision, en as Snapshot } from "../policy-types-rNfz7t0M.js";
2
+ import { E as PermissionTree, w as Permission } from "../vocabulary-DeZvUaTw.js";
3
3
  import { StandardSchemaV1 } from "@standard-schema/spec";
4
4
  //#region src/webmcp/types.d.ts
5
5
  type WebMcpClientStatus = "ready" | "pending" | "stale" | "server-only";
@@ -1,18 +1,18 @@
1
1
  import { t as compact } from "./compact-CAf557ZB.js";
2
2
  import { n as freezeDeep } from "./freeze-jjan0lCv.js";
3
3
  import { r as ownGet } from "./paths-CUvURzHp.js";
4
- import { n as internalsOf } from "./internals-B3IgHrvo.js";
5
4
  import { a as getResource } from "./permission-registry-B8tYxPIt.js";
6
5
  import { a as expandRelation, c as isEdgeRelation, l as isFieldRelation, u as isPrincipalRelation } from "./resource-relations-8-pCScBO.js";
7
- import { s as instantAt } from "./time-nR1JesoH.js";
8
- import { c as rootScope, d as scopeList, o as normalizeMemberships, s as resolveScope } from "./scopes-BSdYaGHs.js";
9
6
  import { o as flattenGrantee } from "./grantee-Dke-9rd1.js";
7
+ import { s as instantAt } from "./time-nR1JesoH.js";
8
+ import { c as rootScope, d as scopeList, o as normalizeMemberships, s as resolveScope } from "./scopes-gdH__vDZ.js";
9
+ import { r as relationCondition } from "./grantee-conditions-Dzprappv.js";
10
+ import { c as nowSeconds, p as scopeField } from "./tenancy-BlxY5T0q.js";
11
+ import { n as internalsOf } from "./internals-B3IgHrvo.js";
10
12
  import { t as byCodePoint } from "./compare-DTfyUunF.js";
11
- import { r as relationCondition } from "./grantee-conditions-DX4K_gGI.js";
12
- import { c as nowSeconds, p as scopeField } from "./tenancy-DvOHHk3-.js";
13
- import { D as emptyListeners, t as evaluate } from "./evaluate-Dcq_U2TV.js";
14
- import { n as relationId, t as pendingRelations } from "./relations-BxvRvDHK.js";
15
- import { t as relationWalk } from "./relation-walk-DK_gkgL7.js";
13
+ import { D as emptyListeners, t as evaluate } from "./evaluate-B5yZHmts.js";
14
+ import { n as relationId, t as pendingRelations } from "./relations-CMsJ1ARY.js";
15
+ import { t as relationWalk } from "./relation-walk-BDTaTKTM.js";
16
16
  //#region src/core/who-can.ts
17
17
  const MAX_ROUNDS = 48;
18
18
  async function settle(cache) {
@@ -1,5 +1,5 @@
1
- import { a as AutomationSource, i as AutomationRequest, l as memoryAutomationSource, n as AutomationDecision, r as AutomationMode, s as MemoryAutomationSource, t as Automation, u as parseAutomation } from "../automation-CpOk7Tlu.js";
2
- import { i as pollingApprovalWaiter, n as ApprovalWaiter, r as PollingApprovalWaiterOptions, t as ApprovalWaitOptions } from "../waiter-BjVI_Byg.js";
3
- import { a as WorkflowPermDockOptions, i as WorkflowPermDock, n as AwaitApprovalOptions, o as createPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-DH4ZD0A7.js";
1
+ import { a as AutomationSource, i as AutomationRequest, l as memoryAutomationSource, n as AutomationDecision, r as AutomationMode, s as MemoryAutomationSource, t as Automation, u as parseAutomation } from "../automation-B20_8UoT.js";
2
+ import { i as pollingApprovalWaiter, n as ApprovalWaiter, r as PollingApprovalWaiterOptions, t as ApprovalWaitOptions } from "../waiter-cbK1CBhT.js";
3
+ import { a as WorkflowPermDockOptions, i as WorkflowPermDock, n as AwaitApprovalOptions, o as createPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-B2tdOygC.js";
4
4
  import "../index-CaxrMD1A.js";
5
5
  export { type ApprovalWaitOptions, type ApprovalWaiter, type Automation, type AutomationDecision, type AutomationMode, type AutomationOptions, type AutomationRequest, type AutomationSource, type AwaitApprovalOptions, type MemoryAutomationSource, type PollingApprovalWaiterOptions, type StartAutomationResult, type WorkflowPermDock, type WorkflowPermDockOptions, createPermDock, memoryAutomationSource, parseAutomation, pollingApprovalWaiter };
@@ -1,13 +1,14 @@
1
1
  import { t as compact } from "../compact-CAf557ZB.js";
2
2
  import { n as freezeDeep } from "../freeze-jjan0lCv.js";
3
- import { a as isId } from "../expiry-6XByK0dm.js";
4
3
  import { n as findPermission } from "../permission-registry-B8tYxPIt.js";
5
4
  import { n as isThenable } from "../thenable-BNSM1U2R.js";
6
- import { n as memoryAutomationSource, r as parseAutomation } from "../automation-x3KEUusw.js";
7
- import { l as withApp, t as getPermDock } from "../permdock-DbAq8_Fp.js";
5
+ import { r as isId } from "../ids-DzhJaCUj.js";
6
+ import { t as getPermDock } from "../permdock-B5LyNVgn.js";
7
+ import { n as memoryAutomationSource, r as parseAutomation } from "../automation-BueW05db.js";
8
+ import { r as withApp } from "../app-DIvM65Mv.js";
8
9
  import { o as automationEvent } from "../sink-D9_vh372.js";
9
- import { a as requestApproval, s as resumeDecision } from "../helpers-D-MXwkOF.js";
10
- import { i as subjectFromRunTicket, r as signRunTicket } from "../run-ticket-CjvXr6wj.js";
10
+ import { a as requestApproval, s as resumeDecision } from "../helpers-DzBIfL1N.js";
11
+ import { i as subjectFromRunTicket, r as signRunTicket } from "../run-ticket-Ddxt9OuU.js";
11
12
  import { t as pollingApprovalWaiter } from "../waiter-aBLM63_f.js";
12
13
  //#region src/workflow/create.ts
13
14
  function writeQuietly(sink, event) {
@@ -1,8 +1,8 @@
1
- import { Yn as Decision } 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";
4
- import { n as ApprovalWaiter } from "../waiter-BjVI_Byg.js";
5
- import { i as WorkflowPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-DH4ZD0A7.js";
1
+ import { Yn as Decision } 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
+ import { n as ApprovalWaiter } from "../waiter-cbK1CBhT.js";
5
+ import { i as WorkflowPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-B2tdOygC.js";
6
6
  //#region src/workflow-sdk/index.d.ts
7
7
  /**
8
8
  * The part of a Workflow SDK `Hook` the waiter reads: awaiting it suspends the
@@ -1,5 +1,5 @@
1
- import { N as PolicyVocabulary } from "./policy-types-BI9C5Sp5.js";
2
- import { a as PermDock } from "./permdock-CsrvbzHk.js";
1
+ import { N as PolicyVocabulary } from "./policy-types-rNfz7t0M.js";
2
+ import { a as PermDock } from "./permdock-BaB-KQqn.js";
3
3
  //#region src/core/wrap.d.ts
4
4
  /** A wrapper an adapter applies to each instance it builds, as `withOtel` does. */
5
5
  type PermDockWrap = <V extends PolicyVocabulary>(permdock: PermDock<V>) => PermDock<V>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "permdock",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "Typed permissions for TypeScript apps, APIs, databases, and AI agents, with the permdock CLI and test runners.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -46,6 +46,10 @@
46
46
  "types": "./dist/index.d.ts",
47
47
  "default": "./dist/index.js"
48
48
  },
49
+ "./app": {
50
+ "types": "./dist/app/index.d.ts",
51
+ "default": "./dist/app/index.js"
52
+ },
49
53
  "./approvals": {
50
54
  "types": "./dist/approvals/index.d.ts",
51
55
  "default": "./dist/approvals/index.js"
@@ -319,9 +323,7 @@
319
323
  "provenance": true
320
324
  },
321
325
  "dependencies": {
322
- "@standard-schema/spec": "1.1.0",
323
- "jiti": "2.7.0",
324
- "oxc-parser": "0.154.0"
326
+ "@standard-schema/spec": "1.1.0"
325
327
  },
326
328
  "devDependencies": {
327
329
  "@anthropic-ai/claude-agent-sdk": "0.3.303",
@@ -369,9 +371,11 @@
369
371
  "h3": "2.0.5",
370
372
  "happy-dom": "21.0.4",
371
373
  "hono": "4.13.13",
374
+ "jiti": "2.7.0",
372
375
  "jose": "6.2.12",
373
376
  "kysely": "0.29.7",
374
377
  "next": "16.4.2",
378
+ "oxc-parser": "0.154.0",
375
379
  "oxlint": "1.89.0",
376
380
  "oxlint-tsgolint": "7.0.2004",
377
381
  "package-manager-detector": "1.9.0",
@@ -423,9 +427,11 @@
423
427
  "fastify": ">=5",
424
428
  "h3": ">=2",
425
429
  "hono": ">=4",
430
+ "jiti": ">=2",
426
431
  "jose": ">=6",
427
432
  "kysely": ">=0.27",
428
433
  "next": ">=16.3",
434
+ "oxc-parser": ">=0.154",
429
435
  "pg": ">=8",
430
436
  "pgsql-parser": ">=18",
431
437
  "react": ">=19",
@@ -515,6 +521,9 @@
515
521
  "hono": {
516
522
  "optional": true
517
523
  },
524
+ "jiti": {
525
+ "optional": true
526
+ },
518
527
  "jose": {
519
528
  "optional": true
520
529
  },
@@ -524,6 +533,9 @@
524
533
  "next": {
525
534
  "optional": true
526
535
  },
536
+ "oxc-parser": {
537
+ "optional": true
538
+ },
527
539
  "pg": {
528
540
  "optional": true
529
541
  },
@@ -24,12 +24,12 @@ npx permdock preset decode <code>
24
24
 
25
25
  `init` keeps every file that exists unless `--force` is passed, installs nothing and calls no network. It prints the `npm install` line, the `npx shadcn add` line for the recipes and the docs pages to read. Run what it prints, then `permdock doctor`.
26
26
 
27
- What `init` writes is the app's own code: `src/permissions.ts`, `src/policy.ts`, `src/permdock.ts` (`defineApp` with a `profile` from `NODE_ENV`), `src/session.ts`, `src/data.ts`, the framework file and `permdock.config.ts` ([what each choice writes](https://permdock.com/docs/cli/init#generated-files)). With `--auth custom` the session returns `null` until it is wired, so every check denies; a provider's session calls its `subjectFrom*`. With `--backend memory` the loaders return demo rows: replace them, and do not add rules to them.
27
+ What `init` writes is the app's own code: `src/permissions.ts`, `src/policy.ts`, `src/permdock.ts` (`definePermDock` with a `profile` from `NODE_ENV`), `src/session.ts`, `src/data.ts`, the framework file and `permdock.config.ts` ([what each choice writes](https://permdock.com/docs/cli/init#generated-files)). With `--auth custom` the session returns `null` until it is wired, so every check denies; a provider's session calls its `subjectFrom*`. With `--backend memory` the loaders return demo rows: replace them, and do not add rules to them.
28
28
 
29
29
  ### Who owns what
30
30
 
31
31
  - The `permdock` package owns every rule: evaluation, role ceilings, approval binding, limits, token checks. `npm update` reaches it.
32
- - The app owns declarations (`definePermissions`, `definePolicy` data, `defineApp` options) and presentation (recipes).
32
+ - The app owns declarations (`definePermissions`, `definePolicy` data, `definePermDock` options) and presentation (recipes).
33
33
  - Never copy evaluation logic out of the package into the app, and never change a recipe so it decides on its own; it renders what `useGate` returns.
34
34
 
35
35
  `profile: "prod"` throws at startup when a store or limits a feature needs are missing ([apps and profiles](https://permdock.com/docs/concepts/apps)). Do not switch the profile to silence it; pass the store.