permdock 0.18.1 → 0.19.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 (311) hide show
  1. package/dist/a2a/index.d.ts +4 -4
  2. package/dist/a2a/index.js +6 -6
  3. package/dist/{adoption-scan-CxExBYSJ.js → adoption-scan-C_VQ-J2f.js} +1 -1
  4. package/dist/agent/index.d.ts +2 -2
  5. package/dist/agent/index.js +1 -1
  6. package/dist/ai-sdk/index.d.ts +3 -3
  7. package/dist/ai-sdk/index.js +4 -4
  8. package/dist/{approval-normalize-CUjgSsOl.js → approval-normalize-hlfO9BJv.js} +8 -1
  9. package/dist/{approval-policies-oNnckT12.d.ts → approval-policies-CYqdqAob.d.ts} +1 -1
  10. package/dist/{approval-prompt-Bg7gDSqd.d.ts → approval-prompt-BxYbwOAU.d.ts} +1 -1
  11. package/dist/approvals/index.d.ts +4 -4
  12. package/dist/approvals/index.js +3 -3
  13. package/dist/{approvals-DGId_hgJ.js → approvals-CuXILe52.js} +9 -6
  14. package/dist/{arazzo--riLuGY0.js → arazzo-4vfaXj0U.js} +2 -2
  15. package/dist/{arazzo-CEDbb-uM.js → arazzo-Dc969CA2.js} +1 -1
  16. package/dist/astro/index.d.ts +4 -4
  17. package/dist/astro/index.js +2 -2
  18. package/dist/{audience-B4YR9UpV.js → audience-GCXRRAeZ.js} +1 -1
  19. package/dist/authzen/index.d.ts +5 -5
  20. package/dist/authzen/index.js +3 -3
  21. package/dist/{automation-Bfa_wD1h.d.ts → automation-BJiJT_Xr.d.ts} +1 -1
  22. package/dist/better-auth/index.d.ts +1 -1
  23. package/dist/better-auth/index.js +1 -1
  24. package/dist/better-supabase/index.d.ts +20 -17
  25. package/dist/better-supabase/index.js +9 -9
  26. package/dist/{better-supabase-BJtQ-kNf.js → better-supabase-ayun1IKE.js} +38 -4
  27. package/dist/{bind-B4pMH9bm.js → bind-BnKPWRrE.js} +4 -4
  28. package/dist/{bind-DR6ku3A9.d.ts → bind-SpRxR213.d.ts} +7 -7
  29. package/dist/{body-CJQwYVa8.js → body-C9JbIoqb.js} +1 -1
  30. package/dist/{build-instance-BFMFQdE_.js → build-instance-DrIbZVnm.js} +1 -1
  31. package/dist/{capability-BZ_veK9o.d.ts → capability-Ci2S8Cdu.d.ts} +1 -1
  32. package/dist/{casbin-bKC1FpEx.js → casbin-C1TQqWkK.js} +1 -1
  33. package/dist/{casbin-DCQHkkyj.js → casbin-ChbpgfNR.js} +1 -1
  34. package/dist/catalog/index.d.ts +5 -5
  35. package/dist/catalog/index.js +5 -5
  36. package/dist/catalog-BTPySmbp.js +1 -0
  37. package/dist/{catalog-zzNuR3sY.js → catalog-DjDc87R2.js} +1 -1
  38. package/dist/{catalog-doc-C4DGfJCO.js → catalog-doc-nrgfbh8I.js} +2 -1
  39. package/dist/{catalog-D1fw8qif.js → catalog-s0waIrfY.js} +2 -2
  40. package/dist/{challenge-B2O2OLEk.js → challenge-D57I5G1k.js} +1 -1
  41. package/dist/chat/index.d.ts +1 -1
  42. package/dist/chat/index.js +2 -2
  43. package/dist/chat-sdk/index.d.ts +3 -3
  44. package/dist/claude-agent/index.d.ts +3 -3
  45. package/dist/claude-agent/index.js +2 -2
  46. package/dist/clerk/index.d.ts +2 -2
  47. package/dist/cli/bin.js +1 -1
  48. package/dist/cli/index.d.ts +5 -5
  49. package/dist/cli/index.js +3 -3
  50. package/dist/{client-CH7vzSAY.d.ts → client-JK504UCq.d.ts} +15 -2
  51. package/dist/cloud/index.d.ts +8 -8
  52. package/dist/cloud/index.js +2 -2
  53. package/dist/{cloud-C0vXBmLG.js → cloud-Dgj4FiEG.js} +2 -2
  54. package/dist/{codemod-C-L0w-u7.js → codemod-DN_fBt43.js} +2 -2
  55. package/dist/{codemod-eYI1FbeJ.js → codemod-WWxwgM77.js} +1 -1
  56. package/dist/{collect-CU85z6Ta.js → collect-DMQ6Sxr6.js} +2 -2
  57. package/dist/{collect-D878zLDP.js → collect-DN_x7hvV.js} +1 -1
  58. package/dist/collect-eSTXOZDC.js +1 -0
  59. package/dist/compile/index.d.ts +1 -1
  60. package/dist/{compile-DBm0ub4p.d.ts → compile-RaRUQhmD.d.ts} +2 -2
  61. package/dist/{completion-Dauc6pVT.js → completion-DnmUvCw0.js} +1 -1
  62. package/dist/{config-DWp2PucY.js → config-CmuEoob8.js} +1 -1
  63. package/dist/{config-COHmivz9.js → config-D2oXUwos.js} +8 -5
  64. package/dist/{config-report-DKpFm5ID.js → config-report-BVm8Dhbj.js} +2 -2
  65. package/dist/{config-shape-tsxHx71E.js → config-shape-D9paLhEX.js} +5 -1
  66. package/dist/{connection-B72dg5Q2.js → connection-QFsv-kbh.js} +1 -1
  67. package/dist/{context-DeammvFl.js → context-YhyXyqBI.js} +3 -2
  68. package/dist/convex/index.d.ts +4 -4
  69. package/dist/convex/index.js +3 -3
  70. package/dist/{core-D87h2kpR.d.ts → core-DNRWXyj4.d.ts} +2 -2
  71. package/dist/{core-B8sLve3z.js → core-ZIWZBi6-.js} +5 -5
  72. package/dist/{create-BzwjZuRS.d.ts → create-0B_bjJc-.d.ts} +7 -7
  73. package/dist/{create-BrQXL-Wt.d.ts → create-BECB6fns.d.ts} +6 -6
  74. package/dist/{create-C-tm3KIF.js → create-CAZyXZFC.js} +4 -4
  75. package/dist/{create-3A7J9KRR.js → create-CegYmYHu.js} +69 -29
  76. package/dist/{create-CtoT1lIQ.d.ts → create-DJ_5REgN.d.ts} +4 -4
  77. package/dist/decide-set-DXEPepY1.js +100 -0
  78. package/dist/{delegation-input-FTxMK3ji.js → delegation-input-DcXhiMkf.js} +1 -1
  79. package/dist/delivery/index.d.ts +4 -4
  80. package/dist/delivery/index.js +1 -1
  81. package/dist/{denied-text-DlIxt8fh.d.ts → denied-text-CF-2h8Vz.d.ts} +1 -1
  82. package/dist/{describe-BKtC_8PG.d.ts → describe-DyN-HX6o.d.ts} +1 -1
  83. package/dist/{diff-BnNHqtHj.js → diff-BOU7sSnv.js} +4 -4
  84. package/dist/{diff-CBCzOTWM.js → diff-BrmvcPXk.js} +1 -1
  85. package/dist/{doctor-CkYKCuX7.js → doctor-BhhNMkU8.js} +242 -65
  86. package/dist/{doctor-xUpR5rXg.js → doctor-CL1OigyD.js} +15 -5
  87. package/dist/drizzle/index.d.ts +3 -3
  88. package/dist/elysia/index.d.ts +4 -4
  89. package/dist/elysia/index.js +4 -4
  90. package/dist/{errors-TpzkEKgJ.d.ts → errors-POWcCXy7.d.ts} +1 -1
  91. package/dist/{errors-B6R_lg2a.js → errors-ynga1EQy.js} +1 -1
  92. package/dist/{evaluate-Czbj7thS.js → evaluate-CrKkjgXS.js} +2 -2
  93. package/dist/{evaluations-CisTTURl.d.ts → evaluations--rkKhMqY.d.ts} +3 -3
  94. package/dist/{evaluations-h3KoJAPa.js → evaluations-CNMVJVD6.js} +3 -3
  95. package/dist/eve/index.d.ts +4 -4
  96. package/dist/eve/index.js +3 -3
  97. package/dist/express/index.d.ts +4 -4
  98. package/dist/express/index.js +3 -3
  99. package/dist/fastify/index.d.ts +4 -4
  100. package/dist/fastify/index.js +3 -3
  101. package/dist/{fetch-adapter-DH-NJPbL.js → fetch-adapter-Bm1iZolz.js} +3 -3
  102. package/dist/{fetch-adapter-BdmfnbJM.d.ts → fetch-adapter-Bq4AB3W2.d.ts} +2 -2
  103. package/dist/{fields-CrjL6A49.js → fields-COvJbUva.js} +1 -1
  104. package/dist/{from-snapshot-DMlSSo9b.js → from-snapshot-DHnb8Fh4.js} +2 -2
  105. package/dist/{gen-mf-MRwVr.js → gen-D0NqzeOP.js} +2 -2
  106. package/dist/{gen-BEIN-DRM.js → gen-DonXr9Hg.js} +1 -1
  107. package/dist/h3/index.d.ts +4 -4
  108. package/dist/h3/index.js +3 -3
  109. package/dist/{helpers-DmqGy63f.js → helpers-D-MXwkOF.js} +28 -4
  110. package/dist/hono/index.d.ts +4 -4
  111. package/dist/hono/index.js +5 -5
  112. package/dist/{hosted-BFNXwcjd.d.ts → hosted-H1xp5Dfw.d.ts} +1 -1
  113. package/dist/{hosted-waouw2V-.js → hosted-iOGBI_ER.js} +4 -3
  114. package/dist/{import-C1XXpG_m.js → import-C8ffNykt.js} +2 -2
  115. package/dist/{import-DObwEota.js → import-DNaFHm53.js} +1 -1
  116. package/dist/{index-CVGio3cH.d.ts → index-B9-ZXNa-.d.ts} +4 -4
  117. package/dist/{index-BhnOOnp9.d.ts → index-C2pmTzFx.d.ts} +2 -2
  118. package/dist/{index-Dfv9Toct.d.ts → index-C5Tfpjex.d.ts} +1 -1
  119. package/dist/{index-CdUTE6qd.d.ts → index-Cm6mHTZ-.d.ts} +16 -10
  120. package/dist/{index-rFp6X_QP.d.ts → index-DLlWORcK.d.ts} +5 -5
  121. package/dist/{index-CdMOd-GY.d.ts → index-DZnpRB0q.d.ts} +24 -6
  122. package/dist/index.d.ts +17 -17
  123. package/dist/index.js +15 -15
  124. package/dist/{init-DS3PEsCG.js → init-4aRjat-S.js} +3 -3
  125. package/dist/{init-CNJ8lLjo.js → init-QfBfkrGu.js} +1 -1
  126. package/dist/{instance-options-2sFGSdsf.d.ts → instance-options-D6hyIKJF.d.ts} +1 -1
  127. package/dist/{instance-snapshot-BWa71my8.js → instance-snapshot-DXxcizAb.js} +3 -3
  128. package/dist/jwt/index.d.ts +4 -4
  129. package/dist/{kernel-30Z2zM_d.js → kernel-B2UCK36Z.js} +7 -7
  130. package/dist/kysely/index.d.ts +3 -3
  131. package/dist/{login-DUVzBLh7.js → login-Cg1la2yJ.js} +3 -3
  132. package/dist/{login-BgK5Jloo.js → login-lPtJIjbO.js} +1 -1
  133. package/dist/{manifest-wclLWBVH.js → manifest-CDhdXgf6.js} +38 -37
  134. package/dist/{map-error-BH16Ah8P.js → map-error-EOhahOVA.js} +3 -3
  135. package/dist/mcp/index.d.ts +57 -17
  136. package/dist/mcp/index.js +199 -53
  137. package/dist/{module-values-B8tNIxdd.js → module-values-BYuNtdK5.js} +1 -1
  138. package/dist/nest/index.d.ts +4 -4
  139. package/dist/nest/index.js +5 -5
  140. package/dist/next/index.d.ts +12 -12
  141. package/dist/next/index.js +8 -8
  142. package/dist/next/plugin.d.ts +1 -1
  143. package/dist/next/plugin.js +1 -1
  144. package/dist/node/index.d.ts +4 -4
  145. package/dist/node/index.js +2 -2
  146. package/dist/openai/index.d.ts +4 -4
  147. package/dist/openai/index.js +3 -3
  148. package/dist/openapi/index.d.ts +2 -2
  149. package/dist/{openapi-C4gFqeRz.js → openapi-C3BIVLTd.js} +2 -2
  150. package/dist/{openapi-zMEB9qxn.js → openapi-Cr0B3p2h.js} +2 -2
  151. package/dist/orpc/index.d.ts +21 -17
  152. package/dist/orpc/index.js +18 -11
  153. package/dist/otel/index.d.ts +3 -3
  154. package/dist/{output-BFWLER4r.js → output-DYq_o2dM.js} +1 -1
  155. package/dist/{ownership-D-mIt-w0.js → ownership-CrmMERZv.js} +1 -1
  156. package/dist/{parse-UTC-sDrt.js → parse-CXTT7hBq.js} +1 -1
  157. package/dist/{parse-local-manifest-DvjTQNuO.d.ts → parse-local-manifest-CQjRmzrw.d.ts} +1 -1
  158. package/dist/{parse-local-manifest-CxcSMQgl.js → parse-local-manifest-Ce2N-Opr.js} +1 -1
  159. package/dist/pdp/index.d.ts +3 -3
  160. package/dist/pdp/index.js +2 -2
  161. package/dist/{permdock-ffY4CMd9.d.ts → permdock-B45vPQb4.d.ts} +4 -4
  162. package/dist/{permdock-D-_WrdKu.js → permdock-DeOfonuG.js} +6 -6
  163. package/dist/{permissions-B3ggI88M.js → permissions-Rk9_Gm04.js} +1 -1
  164. package/dist/{policy-cV_wwPb8.js → policy-DTmkP72P.js} +2 -2
  165. package/dist/{policy-from-catalog-B68hGC0S.js → policy-from-catalog-Cljh_B5H.js} +6 -6
  166. package/dist/{policy-BtKSApSt.d.ts → policy-re2Oag8s.d.ts} +1 -1
  167. package/dist/{policy-types-D-GwfQTc.d.ts → policy-types-Ky7P23CP.d.ts} +24 -2
  168. package/dist/{postgrest-D84p5dbA.d.ts → postgrest-pwxeaeOW.d.ts} +1 -1
  169. package/dist/powersync-B96MUB_Q.js +1 -0
  170. package/dist/{powersync-9PYOE1wt.js → powersync-BoqBik-G.js} +77 -38
  171. package/dist/{powersync-DStC_g0B.js → powersync-PKC4yT62.js} +2 -2
  172. package/dist/prisma/index.d.ts +2 -2
  173. package/dist/{problem-BVLHFK33.js → problem-BWP1l86g.js} +8 -7
  174. package/dist/{protected-action-B40tU3yP.js → protected-action-CD1HXwQK.js} +2 -2
  175. package/dist/{protected-action-Ds_EUY8B.d.ts → protected-action-DHPqBLhz.d.ts} +5 -5
  176. package/dist/{provider-OtnIiFWm.d.ts → provider-C-CbGEii.d.ts} +1 -1
  177. package/dist/{provider-CY4TSSJo.js → provider-qESIf_C0.js} +5 -2
  178. package/dist/{provider-store-BQP_pp8s.js → provider-store-BTHGJH9j.js} +3 -2
  179. package/dist/pull-BjdsS9x1.js +1 -0
  180. package/dist/{pull-DLP4I1Kl.js → pull-FG0Tf8aF.js} +3 -3
  181. package/dist/{push-BSb8j1EW.js → push-CI5G7lRS.js} +3 -3
  182. package/dist/{pushed-policy-Ck3FZcoy.d.ts → pushed-policy-B94r9DlN.d.ts} +1 -1
  183. package/dist/{pushed-policy-BecMsTtM.js → pushed-policy-DftSiyD3.js} +1 -1
  184. package/dist/react/index.d.ts +6 -6
  185. package/dist/react/index.js +3 -3
  186. package/dist/react/provider-client.d.ts +1 -1
  187. package/dist/react/provider-client.js +1 -1
  188. package/dist/react-native/index.d.ts +28 -14
  189. package/dist/react-native/index.js +57 -37
  190. package/dist/{replay-E5X9E1lC.d.ts → replay-BqmXcP7x.d.ts} +1 -1
  191. package/dist/{request-context-DM6_jY1n.js → request-context-uvaevbBu.js} +1 -1
  192. package/dist/resend/index.d.ts +4 -4
  193. package/dist/resend/index.js +2 -2
  194. package/dist/{resolve-names-CBl4r4_r.js → resolve-names-Dg8560iu.js} +2 -2
  195. package/dist/{rls-DGBL-jDY.js → rls-CJbWbxXv.js} +19 -13
  196. package/dist/{rls-pAHGYgTb.js → rls-DJSczevJ.js} +1 -1
  197. package/dist/{role-builder-CMW4wWzn.js → role-builder-C_2kWB_x.js} +1 -1
  198. package/dist/rpc-D7cDHIVE.d.ts +22 -0
  199. package/dist/{rpc-KwX_Jcxz.js → rpc-m5hPklf-.js} +16 -6
  200. package/dist/run-4m-TyVTD.js +1 -0
  201. package/dist/{run-B7lv3NuK.js → run-BigMDvGR.js} +3 -3
  202. package/dist/{run-ticket-DPaD27_r.d.ts → run-ticket-DRA3POCY.d.ts} +2 -2
  203. package/dist/{saas-B8H1MsQ3.js → saas-BHeoBqbW.js} +4 -4
  204. package/dist/{scan-0r3OZqqK.js → scan-BKLwCSVV.js} +1 -1
  205. package/dist/{schema-CuX70xgH.js → schema-BlnU_TzE.js} +4 -0
  206. package/dist/{schema-B_9tXrbG.js → schema-CLuBlCCr.js} +1 -1
  207. package/dist/scim/index.d.ts +1 -1
  208. package/dist/server/index.d.ts +10 -10
  209. package/dist/server/index.js +5 -5
  210. package/dist/{server-types-3OnXjZ2D.d.ts → server-types-CwpJe664.d.ts} +31 -13
  211. package/dist/{sink-ogbVkyeo.d.ts → sink-7Lrch8dn.d.ts} +2 -2
  212. package/dist/{skills-B4MPRxQd.js → skills-CyD_3eoi.js} +1 -1
  213. package/dist/{skills-C9sTD70r.js → skills-D42EyC8G.js} +1 -1
  214. package/dist/{snapshot-DN_8J27z.js → snapshot-DHPih65J.js} +2 -1
  215. package/dist/{snapshot-cache-B4YvlGG_.d.ts → snapshot-cache-B9weL8NE.d.ts} +1 -1
  216. package/dist/solid/index.d.ts +5 -5
  217. package/dist/solid/index.js +3 -2
  218. package/dist/solid-start/index.d.ts +4 -4
  219. package/dist/solid-start/index.js +3 -3
  220. package/dist/{sources-xdQShLDU.d.ts → sources-4d3fl7cq.d.ts} +1 -1
  221. package/dist/{src-Brzq_0in.js → src-HDDf9Eum.js} +28 -13
  222. package/dist/ssf/index.d.ts +3 -3
  223. package/dist/ssf/index.js +2 -2
  224. package/dist/{standard-webhooks-BfPaZ6T1.d.ts → standard-webhooks-BGi8pUwo.d.ts} +2 -2
  225. package/dist/{store-DmVqy74I.js → store-CSOsXd5s.js} +8 -6
  226. package/dist/{store-DYeB-_U3.d.ts → store-CjJaZI_g.d.ts} +31 -4
  227. package/dist/{store-options--zWn48PK.js → store-options-CDvoX52-.js} +31 -8
  228. package/dist/{stores-EPul_8MN.d.ts → stores-Cam6GGAV.d.ts} +5 -5
  229. package/dist/{stores-BYFopOm1.js → stores-PpYVQ5yF.js} +1 -1
  230. package/dist/{stream-CDvF0sJm.js → stream-DQ3rbO3J.js} +1 -1
  231. package/dist/supabase/client.d.ts +1 -1
  232. package/dist/supabase/client.js +32 -4
  233. package/dist/supabase/index.d.ts +10 -5
  234. package/dist/supabase/index.js +1 -1
  235. package/dist/supabase/middleware.d.ts +5 -5
  236. package/dist/supabase/middleware.js +5 -5
  237. package/dist/{supabase-BiViJpQ4.js → supabase-CVZuytCC.js} +2 -2
  238. package/dist/{supabase-CogTyJH2.js → supabase-DBuZK2pP.js} +2 -2
  239. package/dist/supabase-hook-2M-EpoRp.js +1 -0
  240. package/dist/{supabase-hook-DX38Hj8h.js → supabase-hook-Btk56XD6.js} +151 -55
  241. package/dist/{supautils-BGf6zRvM.js → supautils-lwXmXPP_.js} +7 -7
  242. package/dist/svelte/index.d.ts +5 -5
  243. package/dist/svelte/index.js +3 -3
  244. package/dist/svelte/runtime.d.ts +3 -3
  245. package/dist/svelte/runtime.js +1 -1
  246. package/dist/svelte/source.d.ts +5 -5
  247. package/dist/svelte/source.js +2 -2
  248. package/dist/sveltekit/index.d.ts +4 -4
  249. package/dist/sveltekit/index.js +2 -2
  250. package/dist/{tables-BfOk0ymL.js → tables-B72q9UFD.js} +1 -1
  251. package/dist/tanstack-start/index.d.ts +4 -4
  252. package/dist/tanstack-start/index.js +2 -2
  253. package/dist/terminal/index.d.ts +5 -5
  254. package/dist/terminal/index.js +4 -4
  255. package/dist/testing/core.d.ts +1 -1
  256. package/dist/testing/core.js +1 -1
  257. package/dist/testing/fixtures/index.d.ts +1 -1
  258. package/dist/testing/fixtures/index.js +1 -1
  259. package/dist/testing/index.d.ts +23 -23
  260. package/dist/testing/index.js +22 -22
  261. package/dist/testing/saas/index.d.ts +3 -3
  262. package/dist/testing/saas/index.js +2 -2
  263. package/dist/testing/saas/permissions.js +1 -1
  264. package/dist/trpc/index.d.ts +15 -8
  265. package/dist/trpc/index.js +23 -19
  266. package/dist/{type-helpers-i1EJ3Eb1.d.ts → type-helpers-CDxxNswo.d.ts} +1 -1
  267. package/dist/{types-CqcsNCaN.d.ts → types--HfnkawU.d.ts} +13 -1
  268. package/dist/{types-NYoj8JBm.d.ts → types-7Vlz1Wi2.d.ts} +1 -0
  269. package/dist/{types-B8qUkGja.d.ts → types-BVn1w_0o.d.ts} +2 -2
  270. package/dist/{types-DmbfLu2p.d.ts → types-BlYPxJDR.d.ts} +9 -4
  271. package/dist/{types-D19MK4t-.d.ts → types-Bwdumeos.d.ts} +3 -3
  272. package/dist/{types-3Y8UpFkF.d.ts → types-BwuNGQRm.d.ts} +68 -4
  273. package/dist/{types-D-JO7lh8.d.ts → types-CChFKY10.d.ts} +5 -5
  274. package/dist/{types-CDVXR6YD.d.ts → types-Do4yihST.d.ts} +1 -1
  275. package/dist/{types-CCEeSCMB.d.ts → types-Do8qBcRO.d.ts} +3 -3
  276. package/dist/{types-o1vu6Ks3.d.ts → types-OLSfBLa5.d.ts} +4 -4
  277. package/dist/{types-DGf_cpKF.d.ts → types-g0Vk9k2c.d.ts} +2 -2
  278. package/dist/{types-Ck1KOfug.d.ts → types-oaqeYKQu.d.ts} +2 -2
  279. package/dist/unplugin/index.d.ts +1 -1
  280. package/dist/unplugin/index.js +1 -1
  281. package/dist/{usage-DYtRVkcN.js → usage-BLhhEPcZ.js} +1 -1
  282. package/dist/{usage-DC0UKe6C.js → usage-C-wta3rx.js} +4 -4
  283. package/dist/usage-Csc_ZRd0.js +1 -0
  284. package/dist/{validation-error-Dx8PipbO.d.ts → validation-error-AhCHeeff.d.ts} +1 -1
  285. package/dist/{verify-Bpj0hauG.js → verify-CaaZlnP5.js} +78 -57
  286. package/dist/{version-cache-DzNKWiI6.d.ts → version-cache-Ddvrfn1R.d.ts} +1 -1
  287. package/dist/vue/index.d.ts +5 -5
  288. package/dist/vue/index.js +2 -2
  289. package/dist/{waiter-NK_UuZbb.d.ts → waiter-CROiWRIP.d.ts} +2 -2
  290. package/dist/watch-CS69ftMP.js +1 -0
  291. package/dist/{watch-CBHADqBH.js → watch-Dz2LNM1R.js} +2 -2
  292. package/dist/webmcp/index.d.ts +1 -1
  293. package/dist/{where-scope-BKrqUDVk.js → where-scope-BAyOsPQW.js} +1 -1
  294. package/dist/{who-can-KhVWMxtf.js → who-can-jPfTABf-.js} +1 -1
  295. package/dist/workflow/index.d.ts +3 -3
  296. package/dist/workflow/index.js +2 -2
  297. package/dist/workflow-sdk/index.d.ts +4 -4
  298. package/dist/{wrap-BHGA-SMM.d.ts → wrap-C-4o-Dpy.d.ts} +2 -2
  299. package/package.json +1 -1
  300. package/schemas/catalog-v1.json +8 -0
  301. package/skills/permdock-agents/references/runtimes.md +2 -2
  302. package/skills/permdock-wire/references/adapters.md +1 -1
  303. package/dist/catalog-Caqhbdix.js +0 -1
  304. package/dist/collect-KCtOigxx.js +0 -1
  305. package/dist/powersync-xNRlC4jN.js +0 -1
  306. package/dist/pull-UBjDnf4b.js +0 -1
  307. package/dist/run-UPbacxPg.js +0 -1
  308. package/dist/stream-W2RuUYly.d.ts +0 -13
  309. package/dist/supabase-hook-BN46IrVI.js +0 -1
  310. package/dist/usage-Cl5eb-e1.js +0 -1
  311. package/dist/watch-OYwAPCzx.js +0 -1
@@ -1,4 +1,4 @@
1
- import { h as RoleThrough, m as RoleMap, s as SqlMembershipSource } from "./sources-xdQShLDU.js";
1
+ import { h as RoleThrough, m as RoleMap, s as SqlMembershipSource } from "./sources-4d3fl7cq.js";
2
2
  //#region src/cli/core/errors.d.ts
3
3
  /**
4
4
  * 0 success, 1 failure, 2 usage, 3 action required, 130 interrupted (SIGINT or
@@ -193,6 +193,12 @@ type RlsConfig = {
193
193
  readonly roleValues?: Readonly<Record<string, string>>;
194
194
  readonly gucPrefix?: string;
195
195
  readonly out?: string;
196
+ /**
197
+ * The parts `rls generate --split` writes when the flag is absent. The hook
198
+ * part also moves `supabase.hook.out`'s default, read by `supabase inspect`
199
+ * and doctor, to `out` with `{part}` replaced by `hook`.
200
+ */
201
+ readonly split?: readonly ("helpers" | "seeds" | "indexes" | "policies" | "hook")[];
196
202
  /** `--target drizzle`: where each policy's `.link()` finds its table. */
197
203
  readonly drizzle?: {
198
204
  /** Module exporting the tables, as imported from `out`. Default `./schema`. */
@@ -436,6 +442,36 @@ type RlsConfig = {
436
442
  readonly shims?: boolean | RlsShimsConfig;
437
443
  };
438
444
  /** `rls.approvals.managers`: one row per user and manager. */
445
+ /** Column names of the table `rls.approvals.tenantPolicies` writes. */
446
+ type RlsApprovalPolicyColumns = {
447
+ readonly id?: string;
448
+ readonly tenant?: string;
449
+ readonly name?: string;
450
+ readonly body?: string;
451
+ readonly enabled?: string;
452
+ readonly createdAt?: string;
453
+ };
454
+ type RlsApprovalPolicies = {
455
+ /** The permission key whose holders in a tenant edit its policies. */
456
+ readonly manage: string;
457
+ /**
458
+ * The table, as `table` or `schema.table`; the helper schema's
459
+ * `approval_policies` by default. It is created when missing.
460
+ */
461
+ readonly table?: string;
462
+ /**
463
+ * The function `tableApprovalPolicySource` reads, in the helper schema;
464
+ * `permdock_approval_policies_for` by default. Pass the same name as
465
+ * `function` to the source.
466
+ */
467
+ readonly function?: string;
468
+ readonly columns?: RlsApprovalPolicyColumns;
469
+ /**
470
+ * Where the `ApprovalPolicy` sits inside the body column, as object keys; the
471
+ * column itself by default. The constraint requires an `approval` key there.
472
+ */
473
+ readonly path?: readonly string[];
474
+ };
439
475
  type RlsApprovalManagers = {
440
476
  /** `table` or `schema.table`. */
441
477
  readonly table: string;
@@ -471,9 +507,7 @@ type RlsApprovalsAdopt = {
471
507
  * tenant's rows; rows with `tenant` null are platform floors, written only by
472
508
  * the table owner. Off by default.
473
509
  */
474
- readonly tenantPolicies?: {
475
- readonly manage: string;
476
- };
510
+ readonly tenantPolicies?: RlsApprovalPolicies;
477
511
  /**
478
512
  * The app's table that names each user's manager, so `manager()` approvers
479
513
  * match in SQL: `permdock_manages` walks it and the four-argument
@@ -863,6 +897,15 @@ type SupabaseHookConfig = {
863
897
  readonly schema?: string;
864
898
  readonly prefix?: string;
865
899
  };
900
+ /**
901
+ * Whose rights the hook reads with. `'invoker'` (default) runs as
902
+ * `supabase_auth_admin`, so the hook grants it `select` and a read policy on
903
+ * every table it reads. `'definer'` runs as the owner of the migration
904
+ * (`postgres` on Supabase) and grants `supabase_auth_admin` only `execute`;
905
+ * the owner must be able to read every table. `permdock doctor
906
+ * --db-url-stdin` runs the hook as `supabase_auth_admin` either way (PD085).
907
+ */
908
+ readonly security?: "invoker" | "definer";
866
909
  /** The `jwt_expiry` the printed `config.toml` block sets. Default 900. */
867
910
  readonly jwtExpiry?: number;
868
911
  /** Suspended users get empty claims. Default `rls.suspension`. */
@@ -920,6 +963,27 @@ type DoctorConfig = {
920
963
  * them.
921
964
  */
922
965
  readonly sharedTables?: readonly string[];
966
+ /**
967
+ * Functions that build an object once and keep it; PD080 and PD081 skip a
968
+ * factory call passed to one of them, as in `once(() => claimsFirst(...))`.
969
+ */
970
+ readonly cacheHelpers?: readonly string[];
971
+ /**
972
+ * Findings accepted on purpose, by `<code>:<target>` id (printed after each
973
+ * finding). An entry that matches no finding is reported as stale.
974
+ */
975
+ readonly ignore?: readonly {
976
+ readonly id: string;
977
+ readonly reason: string;
978
+ }[];
979
+ /** PD017 findings accepted for one permission key. */
980
+ readonly waivers?: readonly DoctorWaiver[];
981
+ };
982
+ type DoctorWaiver = {
983
+ readonly code: "PD017";
984
+ /** The permission key the sensitive allow is for. */
985
+ readonly key: string;
986
+ readonly reason: string;
923
987
  };
924
988
  type PermDockConfig = {
925
989
  readonly permissions?: string;
@@ -1,8 +1,8 @@
1
- import { Y as DecisionSink, _t as TokenVerifier, gt as TokenSigner, lt as SnapshotSource, yr as Subject } from "./policy-types-D-GwfQTc.js";
2
- import { s as PolicySource } from "./hosted-BFNXwcjd.js";
3
- import { m as ApprovalStore, u as ApprovalRequest } from "./types-CqcsNCaN.js";
4
- import { a as CatalogDocument } from "./types-NYoj8JBm.js";
5
- import { a as CatalogFinding } from "./sink-ogbVkyeo.js";
1
+ import { X as DecisionSink, _t as TokenSigner, ut as SnapshotSource, vt as TokenVerifier, xr as Subject } from "./policy-types-Ky7P23CP.js";
2
+ import { s as PolicySource } from "./hosted-H1xp5Dfw.js";
3
+ import { m as ApprovalStore, u as ApprovalRequest } from "./types--HfnkawU.js";
4
+ import { a as CatalogDocument } from "./types-7Vlz1Wi2.js";
5
+ import { a as CatalogFinding } from "./sink-7Lrch8dn.js";
6
6
  //#region src/cloud/types.d.ts
7
7
  type CloudEndpointOptions = {
8
8
  readonly url?: string;
@@ -1,4 +1,4 @@
1
- import { wn as Approver } from "./policy-types-D-GwfQTc.js";
1
+ import { En as Approver } from "./policy-types-Ky7P23CP.js";
2
2
  //#region src/approvals/access-reviews/types.d.ts
3
3
  type AccessReviewStatus = "open" | "closed";
4
4
  type AccessReviewItemStatus = "pending" | "kept" | "revoked";
@@ -1,6 +1,6 @@
1
- import { $n as GrantedDecision, dn as DeliveryFailureCause, ln as DeliveryChannel, pn as EmailCategory, un as DeliveryEvent } from "./policy-types-D-GwfQTc.js";
2
- import { s as CloudEvent } from "./sink-ogbVkyeo.js";
3
- import { t as ApprovalPrompt } from "./approval-prompt-Bg7gDSqd.js";
1
+ import { dn as DeliveryChannel, fn as DeliveryEvent, hn as EmailCategory, pn as DeliveryFailureCause, tr as GrantedDecision } from "./policy-types-Ky7P23CP.js";
2
+ import { s as CloudEvent } from "./sink-7Lrch8dn.js";
3
+ import { t as ApprovalPrompt } from "./approval-prompt-BxYbwOAU.js";
4
4
  //#region src/delivery/types.d.ts
5
5
  /**
6
6
  * Who a delivery goes to. `{ principal }` names an app principal and the
@@ -1,7 +1,7 @@
1
- import { $t as Snapshot, _t as TokenVerifier, lt as SnapshotSource } from "./policy-types-D-GwfQTc.js";
2
- import { n as DescribeMessages } from "./describe-BKtC_8PG.js";
3
- import { n as ClientStoreOptions } from "./store-DYeB-_U3.js";
4
- import { t as PermDockDefaults } from "./types-DmbfLu2p.js";
1
+ import { en as Snapshot, ut as SnapshotSource, vt as TokenVerifier } from "./policy-types-Ky7P23CP.js";
2
+ import { n as DescribeMessages } from "./describe-DyN-HX6o.js";
3
+ import { n as ClientStoreOptions } from "./store-CjJaZI_g.js";
4
+ import { t as PermDockDefaults } from "./types-BlYPxJDR.js";
5
5
  import { ReactNode } from "react";
6
6
  //#region src/react-native/types.d.ts
7
7
  type SnapshotStorage = {
@@ -1,5 +1,5 @@
1
- import { M as PolicyVocabulary, cn as DecisionEvent } from "./policy-types-D-GwfQTc.js";
2
- import { a as PermDock } from "./permdock-ffY4CMd9.js";
1
+ import { N as PolicyVocabulary, un as DecisionEvent } from "./policy-types-Ky7P23CP.js";
2
+ import { a as PermDock } from "./permdock-B45vPQb4.js";
3
3
  //#region src/otel/types.d.ts
4
4
  declare const GENAI_SEMCONV_PIN = "1.37.0";
5
5
  declare const GEN_AI_TOOL_NAME = "gen_ai.tool.name";
@@ -1,5 +1,5 @@
1
- import { Q as JwtClaims, _r as Principal, _t as TokenVerifier, an as AuthEvent, ht as TokenFailureCause, rt as MembershipSource, sr as Actor, yr as Subject } from "./policy-types-D-GwfQTc.js";
2
- import { m as ApprovalStore } from "./types-CqcsNCaN.js";
1
+ import { $ as JwtClaims, gt as TokenFailureCause, it as MembershipSource, lr as Actor, sn as AuthEvent, vt as TokenVerifier, xr as Subject, yr as Principal } from "./policy-types-Ky7P23CP.js";
2
+ import { m as ApprovalStore } from "./types--HfnkawU.js";
3
3
  import { n as RevocationFeed } from "./revocations-BaUXHM1N.js";
4
4
  import { t as ClaimsMap } from "./claims-map-D1Pb5oRq.js";
5
5
  import { t as ClientNames } from "./clients-C_NOET3z.js";
@@ -1,4 +1,4 @@
1
- import { s as PermDockPluginOptions } from "../types-3Y8UpFkF.js";
1
+ import { s as PermDockPluginOptions } from "../types-BwuNGQRm.js";
2
2
  import { createUnplugin } from "unplugin";
3
3
  //#region src/unplugin/index.d.ts
4
4
  type CreateUnplugin = typeof createUnplugin<PermDockPluginOptions | undefined>;
@@ -1,4 +1,4 @@
1
- import { n as createCollectScheduler, r as report } from "../watch-CBHADqBH.js";
1
+ import { n as createCollectScheduler, r as report } from "../watch-Dz2LNM1R.js";
2
2
  import { r as peerHint } from "../peer-BuK9F53f.js";
3
3
  import { createRequire } from "node:module";
4
4
  //#region src/unplugin/index.ts
@@ -16,7 +16,7 @@ const usage = defineLeaf({
16
16
  }
17
17
  },
18
18
  async run(ctx, { flags }) {
19
- return (await import("./usage-Cl5eb-e1.js")).runUsage({
19
+ return (await import("./usage-Csc_ZRd0.js")).runUsage({
20
20
  cwd: ctx.cwd,
21
21
  config: ctx.config,
22
22
  ignore: flags.ignore,
@@ -2,12 +2,12 @@ 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-C4DGfJCO.js";
5
+ import { c as jsonSchemaOf } from "./catalog-doc-nrgfbh8I.js";
6
6
  import { a as loadModule, n as asPolicy, s as pickNamed } from "./load-BaEamml-.js";
7
- import { r as runCollect } from "./collect-D878zLDP.js";
7
+ import { r as runCollect } from "./collect-DN_x7hvV.js";
8
8
  import { t as beforeFirst } from "./text-BMFRfBqc.js";
9
- import { t as DOCS_BASE } from "./manifest-wclLWBVH.js";
10
- import { r as findingOf } from "./output-BFWLER4r.js";
9
+ import { t as DOCS_BASE } from "./manifest-CDhdXgf6.js";
10
+ import { r as findingOf } from "./output-DYq_o2dM.js";
11
11
  import { existsSync, readFileSync, realpathSync } from "node:fs";
12
12
  import { dirname, resolve } from "node:path";
13
13
  import { fileURLToPath, pathToFileURL } from "node:url";
@@ -0,0 +1 @@
1
+ export { t as runUsage } from "./usage-C-wta3rx.js";
@@ -1,4 +1,4 @@
1
- import { a as ProblemDetails } from "./errors-TpzkEKgJ.js";
1
+ import { a as ProblemDetails } from "./errors-POWcCXy7.js";
2
2
  import { StandardSchemaV1 } from "@standard-schema/spec";
3
3
  //#region src/core/validation-error.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
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-Brzq_0in.js";
3
+ import { A as memoryCustomRoleSource, S as memoryRelationSource } from "./src-HDDf9Eum.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";
@@ -8,30 +8,85 @@ import { t as canonicalJson } from "./canonical-json-DwilZ1iB.js";
8
8
  import { c as rootScope, d as scopeList, o as normalizeMemberships } from "./scopes-BSdYaGHs.js";
9
9
  import { o as requiresStandIn } from "./delegation-aK4T_5WU.js";
10
10
  import { p as scopeField } from "./tenancy-DvOHHk3-.js";
11
- import { l as policyLevels, t as coveredLevels } from "./policy-cV_wwPb8.js";
11
+ import { l as policyLevels, t as coveredLevels } from "./policy-DTmkP72P.js";
12
12
  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-Czbj7thS.js";
14
- import { t as getPermDock } from "./permdock-D-_WrdKu.js";
13
+ import { c as andWhere, m as customRoleScope, v as leveled, y as membershipsClaim } from "./evaluate-CrKkjgXS.js";
14
+ import { t as getPermDock } from "./permdock-DeOfonuG.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-C4DGfJCO.js";
18
+ import { c as jsonSchemaOf } from "./catalog-doc-nrgfbh8I.js";
19
19
  import { o as loadPolicyAt } from "./load-BaEamml-.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
22
  import { a as scopeMembershipTable, i as scopeColumn } from "./compile-B_oJqmIg.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-wclLWBVH.js";
25
+ import { t as DOCS_BASE } from "./manifest-CDhdXgf6.js";
26
26
  import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-Cemqurt8.js";
27
+ import { n as pgConnector, t as connectPgPool } from "./pg-Ddxsd5ZB.js";
27
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-DyYVEjKC.js";
28
- 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-BfOk0ymL.js";
29
- import { c as breakGlassKey, f as compileConditionSql, l as collectGrants, m as sqlFunctionNames, p as contextRefs, s as breakGlassHolder } from "./ownership-D-mIt-w0.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-B72q9UFD.js";
30
+ import { c as breakGlassKey, f as compileConditionSql, l as collectGrants, m as sqlFunctionNames, p as contextRefs, s as breakGlassHolder } from "./ownership-CrmMERZv.js";
30
31
  import { t as membershipSourcesOf } from "./sources-qoIJQrJv.js";
31
- import { n as pgConnector, t as connectPgPool } from "./pg-Ddxsd5ZB.js";
32
- import { _ as wrapSql, g as validitySql, m as andSql, s as viewName, t as FIELD_VIEWS } from "./fields-CrjL6A49.js";
32
+ import { _ as wrapSql, g as validitySql, m as andSql, s as viewName, t as FIELD_VIEWS } from "./fields-COvJbUva.js";
33
33
  import { resolve } from "node:path";
34
34
  import { createHash, randomUUID } from "node:crypto";
35
+ //#region src/cli/core/ignores.ts
36
+ /**
37
+ * Checks a config list of `{ id, reason }` and appends one entry per `--ignore`
38
+ * id. `path` names the list in error messages, such as `doctor.ignore`.
39
+ */
40
+ function parseIgnores(entries, path, flags = []) {
41
+ const list = entries ?? [];
42
+ if (!Array.isArray(list)) throw configError(`PermDock CLI: ${path} must be a list of { id, reason }`);
43
+ const out = [];
44
+ for (const [index, entry] of list.entries()) {
45
+ if (!isRecord(entry) || typeof entry["id"] !== "string" || entry["id"] === "" || typeof entry["reason"] !== "string" || entry["reason"].trim() === "") throw configError(`PermDock CLI: ${path}[${String(index)}] needs an id and a non-empty reason`);
46
+ out.push({
47
+ id: entry["id"],
48
+ reason: entry["reason"]
49
+ });
50
+ }
51
+ for (const id of flags) out.push({
52
+ id,
53
+ reason: "--ignore"
54
+ });
55
+ return out;
56
+ }
57
+ /**
58
+ * Splits `items` by `ignores`; an id listed twice counts once, with its first
59
+ * reason. `stale` holds the entries no item matched.
60
+ */
61
+ function splitIgnored(items, idOf, ignores) {
62
+ const reasons = /* @__PURE__ */ new Map();
63
+ for (const entry of ignores) if (!reasons.has(entry.id)) reasons.set(entry.id, entry.reason);
64
+ const matched = /* @__PURE__ */ new Set();
65
+ const kept = [];
66
+ const ignored = [];
67
+ for (const item of items) {
68
+ const id = idOf(item);
69
+ const reason = reasons.get(id);
70
+ if (reason === void 0) kept.push(item);
71
+ else {
72
+ matched.add(id);
73
+ ignored.push({
74
+ id,
75
+ reason,
76
+ item
77
+ });
78
+ }
79
+ }
80
+ return {
81
+ kept,
82
+ ignored,
83
+ stale: [...reasons].filter(([id]) => !matched.has(id)).map(([id, reason]) => ({
84
+ id,
85
+ reason
86
+ }))
87
+ };
88
+ }
89
+ //#endregion
35
90
  //#region src/cli/rls/indexes.ts
36
91
  /** Postgres truncates identifiers longer than this, in bytes. */
37
92
  const MAX_IDENT = 63;
@@ -749,55 +804,21 @@ function findingId(finding) {
749
804
  }
750
805
  /** `rls.verify.ignore`, checked, then one entry per `--ignore` id. */
751
806
  function verifyIgnores(config, flags = []) {
752
- const entries = config.rls?.verify?.ignore ?? [];
753
- if (!Array.isArray(entries)) throw configError("PermDock CLI: rls.verify.ignore must be a list of { id, reason }");
754
- const out = [];
755
- for (const [index, entry] of entries.entries()) {
756
- if (!isRecord(entry) || typeof entry["id"] !== "string" || entry["id"] === "" || typeof entry["reason"] !== "string" || entry["reason"].trim() === "") throw configError(`PermDock CLI: rls.verify.ignore[${String(index)}] needs an id and a non-empty reason`);
757
- out.push({
758
- id: entry["id"],
759
- reason: entry["reason"]
760
- });
761
- }
762
- for (const id of flags) out.push({
763
- id,
764
- reason: "--ignore"
765
- });
766
- return out;
807
+ return parseIgnores(config.rls?.verify?.ignore, "rls.verify.ignore", flags);
767
808
  }
768
- /**
769
- * Splits `findings` by `ignores`; an id listed twice counts once, with its
770
- * first reason.
771
- */
772
809
  function applyIgnores(findings, ignores) {
773
- const reasons = /* @__PURE__ */ new Map();
774
- for (const entry of ignores) if (!reasons.has(entry.id)) reasons.set(entry.id, entry.reason);
775
- const matched = /* @__PURE__ */ new Set();
776
- const kept = [];
777
- const ignored = [];
778
- for (const finding of findings) {
779
- const id = findingId(finding);
780
- const reason = reasons.get(id);
781
- if (reason === void 0) kept.push({
782
- ...finding,
783
- id
784
- });
785
- else {
786
- matched.add(id);
787
- ignored.push({
788
- id,
789
- reason,
790
- message: finding.message
791
- });
792
- }
793
- }
810
+ const split = splitIgnored(findings, findingId, ignores);
794
811
  return {
795
- findings: kept,
796
- ignored,
797
- stale: [...reasons].filter(([id]) => !matched.has(id)).map(([id, reason]) => ({
798
- id,
799
- reason
800
- }))
812
+ findings: split.kept.map((finding) => ({
813
+ ...finding,
814
+ id: findingId(finding)
815
+ })),
816
+ ignored: split.ignored.map((entry) => ({
817
+ id: entry.id,
818
+ reason: entry.reason,
819
+ message: entry.item.message
820
+ })),
821
+ stale: split.stale
801
822
  };
802
823
  }
803
824
  function prefixOf(severity) {
@@ -1695,4 +1716,4 @@ async function runRlsVerify(input) {
1695
1716
  });
1696
1717
  }
1697
1718
  //#endregion
1698
- export { 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, pruneIndexTargets as y };
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 };
@@ -1,4 +1,4 @@
1
- import { Kt as Instant, xt as VersionQuery } from "./policy-types-D-GwfQTc.js";
1
+ import { St as VersionQuery, qt as Instant } from "./policy-types-Ky7P23CP.js";
2
2
  //#region src/core/version-cache.d.ts
3
3
  type VersionCacheStats = {
4
4
  /** Version reads the cache started. */
@@ -1,11 +1,11 @@
1
- import { $t as Snapshot, Kn as ApprovalRequiredDecision, M as PolicyVocabulary, _t as TokenVerifier, gr as Membership, qn as Decision } from "../policy-types-D-GwfQTc.js";
1
+ import { Jn as ApprovalRequiredDecision, N as PolicyVocabulary, Yn as Decision, en as Snapshot, vr as Membership, vt as TokenVerifier } from "../policy-types-Ky7P23CP.js";
2
2
  import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
3
  import { r as Role } from "../vocabulary-DEJ5j4mR.js";
4
- import { d as UncheckedData, s as RowData } from "../permdock-ffY4CMd9.js";
5
- import { c as requiredPlans } from "../errors-TpzkEKgJ.js";
6
- import { i as describe, r as DescribeOptions, t as DecisionDescription } from "../describe-BKtC_8PG.js";
4
+ import { d as UncheckedData, s as RowData } from "../permdock-B45vPQb4.js";
5
+ import { c as requiredPlans } from "../errors-POWcCXy7.js";
6
+ import { i as describe, r as DescribeOptions, t as DecisionDescription } from "../describe-DyN-HX6o.js";
7
7
  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-DYeB-_U3.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-CjJaZI_g.js";
9
9
  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
10
  import { t as approvalHeaders } from "../headers-B9jQxjtW.js";
11
11
  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--zWn48PK.js";
7
- import { n as switchTenant, t as providerStore } from "../provider-store-BQP_pp8s.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";
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 { Kt as Instant } from "./policy-types-D-GwfQTc.js";
2
- import { m as ApprovalStore } from "./types-CqcsNCaN.js";
1
+ import { qt as Instant } from "./policy-types-Ky7P23CP.js";
2
+ import { m as ApprovalStore } from "./types--HfnkawU.js";
3
3
  //#region src/workflow/waiter.d.ts
4
4
  type ApprovalWaitOptions = {
5
5
  /**
@@ -0,0 +1 @@
1
+ export { i as watchCollect } from "./watch-Dz2LNM1R.js";
@@ -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-D878zLDP.js";
5
- import { n as isConfigFile, r as loadConfig } from "./config-COHmivz9.js";
4
+ import { r as runCollect } from "./collect-DN_x7hvV.js";
5
+ import { n as isConfigFile, r as loadConfig } from "./config-D2oXUwos.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
@@ -1,4 +1,4 @@
1
- import { $t as Snapshot, qn as Decision } from "../policy-types-D-GwfQTc.js";
1
+ import { Yn as Decision, en as Snapshot } from "../policy-types-Ky7P23CP.js";
2
2
  import { f as PermissionTree, u as Permission } from "../permission-types-CAY-GU7e.js";
3
3
  import { StandardSchemaV1 } from "@standard-schema/spec";
4
4
  //#region src/webmcp/types.d.ts
@@ -7,7 +7,7 @@ import { a as readOnlyActorRefuses, n as coveredByDelegation } from "./delegatio
7
7
  import { r as readWireValidity, t as isActive } from "./validity-Buc7w8E9.js";
8
8
  import { o as resourceRoleCondition } from "./grantee-conditions-DX4K_gGI.js";
9
9
  import { c as nowSeconds, n as inTeam, o as membershipField, r as isMembershipExpired } from "./tenancy-DvOHHk3-.js";
10
- import { a as bindConditionRefs, n as parseSnapshot } from "./snapshot-DN_8J27z.js";
10
+ import { a as bindConditionRefs, n as parseSnapshot } from "./snapshot-DHPih65J.js";
11
11
  //#region src/core/snapshot-sign.ts
12
12
  /**
13
13
  * The claims `signSnapshot` signs for `snapshot`. `issuedAt` and `expiresAt`
@@ -10,7 +10,7 @@ import { o as flattenGrantee } from "./grantee-Dke-9rd1.js";
10
10
  import { t as byCodePoint } from "./compare-DTfyUunF.js";
11
11
  import { r as relationCondition } from "./grantee-conditions-DX4K_gGI.js";
12
12
  import { c as nowSeconds, p as scopeField } from "./tenancy-DvOHHk3-.js";
13
- import { D as emptyListeners, t as evaluate } from "./evaluate-Czbj7thS.js";
13
+ import { D as emptyListeners, t as evaluate } from "./evaluate-CrKkjgXS.js";
14
14
  import { n as relationId, t as pendingRelations } from "./relations-BxvRvDHK.js";
15
15
  import { t as relationWalk } from "./relation-walk-DK_gkgL7.js";
16
16
  //#region src/core/who-can.ts
@@ -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-Bfa_wD1h.js";
2
- import { i as pollingApprovalWaiter, n as ApprovalWaiter, r as PollingApprovalWaiterOptions, t as ApprovalWaitOptions } from "../waiter-NK_UuZbb.js";
3
- import { a as WorkflowPermDockOptions, i as WorkflowPermDock, n as AwaitApprovalOptions, o as createPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-BrQXL-Wt.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-BJiJT_Xr.js";
2
+ import { i as pollingApprovalWaiter, n as ApprovalWaiter, r as PollingApprovalWaiterOptions, t as ApprovalWaitOptions } from "../waiter-CROiWRIP.js";
3
+ import { a as WorkflowPermDockOptions, i as WorkflowPermDock, n as AwaitApprovalOptions, o as createPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-BECB6fns.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 };
@@ -4,9 +4,9 @@ import { a as isId } from "../expiry-6XByK0dm.js";
4
4
  import { n as findPermission } from "../permission-registry-B8tYxPIt.js";
5
5
  import { n as isThenable } from "../thenable-BNSM1U2R.js";
6
6
  import { n as memoryAutomationSource, r as parseAutomation } from "../automation-x3KEUusw.js";
7
- import { l as withApp, t as getPermDock } from "../permdock-D-_WrdKu.js";
7
+ import { l as withApp, t as getPermDock } from "../permdock-DeOfonuG.js";
8
8
  import { o as automationEvent } from "../sink-D9_vh372.js";
9
- import { a as requestApproval, s as resumeDecision } from "../helpers-DmqGy63f.js";
9
+ import { a as requestApproval, s as resumeDecision } from "../helpers-D-MXwkOF.js";
10
10
  import { i as subjectFromRunTicket, r as signRunTicket } from "../run-ticket-CjvXr6wj.js";
11
11
  import { t as pollingApprovalWaiter } from "../waiter-aBLM63_f.js";
12
12
  //#region src/workflow/create.ts
@@ -1,8 +1,8 @@
1
- import { qn as Decision } from "../policy-types-D-GwfQTc.js";
1
+ import { Yn as Decision } from "../policy-types-Ky7P23CP.js";
2
2
  import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { a as PermDock } from "../permdock-ffY4CMd9.js";
4
- import { n as ApprovalWaiter } from "../waiter-NK_UuZbb.js";
5
- import { i as WorkflowPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-BrQXL-Wt.js";
3
+ import { a as PermDock } from "../permdock-B45vPQb4.js";
4
+ import { n as ApprovalWaiter } from "../waiter-CROiWRIP.js";
5
+ import { i as WorkflowPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-BECB6fns.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 { M as PolicyVocabulary } from "./policy-types-D-GwfQTc.js";
2
- import { a as PermDock } from "./permdock-ffY4CMd9.js";
1
+ import { N as PolicyVocabulary } from "./policy-types-Ky7P23CP.js";
2
+ import { a as PermDock } from "./permdock-B45vPQb4.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.18.1",
3
+ "version": "0.19.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",
@@ -325,6 +325,10 @@
325
325
  "description": "Written before 0.17; false reads as mode: confirm.",
326
326
  "type": "boolean"
327
327
  },
328
+ "fallback": {
329
+ "description": "confirm lets the request's principal approve while no other eligible approver exists.",
330
+ "const": "confirm"
331
+ },
328
332
  "staleOn": {
329
333
  "const": "resource-change"
330
334
  },
@@ -461,6 +465,10 @@
461
465
  "description": "Written before 0.17; false reads as mode: confirm.",
462
466
  "type": "boolean"
463
467
  },
468
+ "fallback": {
469
+ "description": "confirm lets the request's principal approve while no other eligible approver exists.",
470
+ "const": "confirm"
471
+ },
464
472
  "staleOn": {
465
473
  "const": "resource-change"
466
474
  },
@@ -119,11 +119,11 @@ server.registerTool(
119
119
  );
120
120
  ```
121
121
 
122
- `actor.kind` is `'mcp-client'` unless `actorKind` sets another (`'oauth-client'` makes the token the same actor kind `permdock/supabase` and `permdock/jwt` give it, so one delegation covers both), and `delegation` comes from the token's scopes and `authorization_details`. Every `registerTool` / `registerResource` / `registerPrompt` needs a `permission`, except an MCP Apps `ui://` view: it takes the permission of the tool whose `_meta.ui.resourceUri` names it, and a view no tool links is refused. Never give a view a looser permission than its tool. Lists are filtered per caller. A missing scope is an `insufficient_scope` step-up (HTTP `403`) naming only the scope the call needs. When the authorization server issues coarse scopes (`mcp:read`), declare them in `definePolicy({ oauthScopes })` instead of expanding scopes yourself: they are expanded into the delegation and named in challenges. Set `resource` to the server's URL so tokens for another audience are refused. Denied calls return `isError: true` with Decision `structuredContent`. `approval-required` parks the call in `store` and returns `isError: true` with the token, or an `input_required` URL request when `approval.at` is set and the client declares URL elicitation; the retried call runs once after approval (token optional under `_meta["dev.permdock/approval"]`, never from tool arguments) ([MCP adapter](https://permdock.com/docs/adapters/mcp)).
122
+ `actor.kind` is `'mcp-client'` unless `actorKind` sets another (`'oauth-client'` makes the token the same actor kind `permdock/supabase` and `permdock/jwt` give it, so one delegation covers both), and `delegation` comes from the token's scopes and `authorization_details`. Every `registerTool` / `registerResource` / `registerPrompt` needs a `permission`, except an MCP Apps `ui://` view: it takes the permission of the tool whose `_meta.ui.resourceUri` names it, and a view no tool links is refused. Never give a view a looser permission than its tool. `permission: null` makes a tool public (listed and called with no check); never leave `permission` out to mean public, it throws. A tool may take a permission list (all-of, or `anyOf: true`) and `rows(args)` to check every row a batch touches. Lists are filtered per caller. A missing scope is an `insufficient_scope` step-up (HTTP `403`) naming only the scope the call needs. When the authorization server issues coarse scopes (`mcp:read`), declare them in `definePolicy({ oauthScopes })` instead of expanding scopes yourself: they are expanded into the delegation and named in challenges. Set `resource` to the server's URL so tokens for another audience are refused. A session token with none of the policy's scopes (Supabase, Clerk) reaches nothing by default; `unscopedTokens: 'subject'` decides it on the subject, and a token with a `clientId` then needs a policy delegation to its actor kind. Denied calls return `isError: true` with Decision `structuredContent`. `approval-required` parks the call in `store` and returns `isError: true` with the token, or an `input_required` URL request when `approval.at` is set and the client declares URL elicitation; the retried call runs once after approval (token optional under `_meta["dev.permdock/approval"]`, never from tool arguments) ([MCP adapter](https://permdock.com/docs/adapters/mcp)).
123
123
 
124
124
  An MCP server that is not an SDK `McpServer` cannot be wrapped: narrow the tool's `meta` with `isPermission`, filter its tool list with `permdock.mayUse(permission)`, and decide each call with `permdock.decide(permission, args)` in its `authorize` hook. `mayUse` is a listing hint, never a decision.
125
125
 
126
- When a tool's handler calls an oRPC procedure that runs `protect`, use `protectServer(server, { enforce: 'procedure', permissionFor: (name) => permissionOf(procedures.get(name)) })` with `permissionOf` from `permdock/orpc`. `tools/list` and annotations follow the permission; the call is not guarded, so each call decides once, in the procedure. `data` and `longRunning` throw in this mode, and the mode covers the whole server. When the same operations are REST routes, declare each permission once with `operationPermissions({ 'GET /customers/{id}': { permission, operationId } })` from `permdock/openapi` and pass `permissionFor: operations.forOperation`; the HTTP gate reads `operations.forRequest(method, path)` from the same object. When two operations share a permission but need different coarse scopes (reading an export with `mcp:read`, creating one with `mcp:write`), list the permission under both in `oauthScopes`, then narrow each operation with `oauthScopes: ['mcp:read']` on its entry (or on the tool config): pass `oauthScopesFor: operations.oauthScopesForOperation` to `protectServer`, and `operations` to `permdock/server` (or `protect`'s `oauthScopes`) for the REST routes, which then answer `insufficient_scope` naming that scope. A route that checks no permission but should still require a scope (a chat endpoint, setting the active organization) uses `protect(null, undefined, { oauthScopes: ['api:chat'] })` or an operation entry with only `oauthScopes`; never write an app-side rule that maps HTTP methods to scopes.
126
+ When a tool's handler calls an oRPC procedure that runs `protect`, use `protectServer(server, { enforce: 'procedure', permissionFor: (name) => permissionOf(procedures.get(name)) })` with `permissionOf` from `permdock/orpc`. `tools/list` and annotations follow the permission; the call is not guarded, so each call decides once, in the procedure. `data`, `rows`, `anyOf` and `longRunning` throw in this mode, and the mode covers the whole server. When the same operations are REST routes, declare each permission once with `operationPermissions({ 'GET /customers/{id}': { permission, operationId } })` from `permdock/openapi` and pass `permissionFor: operations.forOperation`; the HTTP gate reads `operations.forRequest(method, path)` from the same object. When two operations share a permission but need different coarse scopes (reading an export with `mcp:read`, creating one with `mcp:write`), list the permission under both in `oauthScopes`, then narrow each operation with `oauthScopes: ['mcp:read']` on its entry (or on the tool config): pass `oauthScopesFor: operations.oauthScopesForOperation` to `protectServer`, and `operations` to `permdock/server` (or `protect`'s `oauthScopes`) for the REST routes, which then answer `insufficient_scope` naming that scope. A route that checks no permission but should still require a scope (a chat endpoint, setting the active organization) uses `protect(null, undefined, { oauthScopes: ['api:chat'] })` or an operation entry with only `oauthScopes`; never write an app-side rule that maps HTTP methods to scopes.
127
127
 
128
128
  ## A2A — `permdock/a2a`
129
129
 
@@ -300,7 +300,7 @@ procedure
300
300
  .mutation(({ ctx }) => deletePost(ctx.permdockData));
301
301
  ```
302
302
 
303
- `protect` throws `TRPCError` (`FORBIDDEN`, `BAD_REQUEST`, `UNAUTHORIZED`) with Problem Details as `cause`; pass `errorFormatter` to `initTRPC.create` so clients see it under `data`. `ctx.permdock.assert` in a resolver maps to the same error. Read the tenant from each procedure's input (`tenant: (opts) => opts.input?.org`) so a batch never shares one; `request: (ctx) => ctx.req` names the Web `Request` when the context holds it elsewhere. `permdockHandler()` returns the decision endpoint as a Fetch handler. `openapi.security(permission)` is the `trpc-to-openapi` meta fragment. On a subscription, `protect(permission, load, { items })` ends the iterator with `UNAUTHORIZED` or `FORBIDDEN` when the session is revoked or the permission re-denied, and drops items the subscriber cannot read; pass `revocations`.
303
+ `protect` throws `TRPCError` (`FORBIDDEN`, `BAD_REQUEST`, `UNAUTHORIZED`) with Problem Details as `cause`; pass `errorFormatter` to `initTRPC.create` so clients see it under `data`. `ctx.permdock.assert` in a resolver maps to the same error. Read the tenant from each procedure's input (`tenant: (opts) => opts.input?.org`) so a batch never shares one; `request: (ctx) => ctx.req` names the Web `Request` when the context holds it elsewhere. `permdockHandler()` returns the decision endpoint as a Fetch handler. `openapi.security(permission)` is the `trpc-to-openapi` meta fragment. `protect([a, b], load, { anyOf: true })` needs one of a permission list (all-of without `anyOf`); `protect(permission, undefined, { rows: (opts) => loadMany(opts.input.ids) })` checks every row of a batch and passes the rows as `ctx.permdockData`. oRPC's `protect` takes the same options. On a subscription, `protect(permission, load, { items })` ends the iterator with `UNAUTHORIZED` or `FORBIDDEN` when the session is revoked or the permission re-denied, and drops items the subscriber cannot read; pass `revocations`.
304
304
 
305
305
  ## oRPC — `permdock/orpc`
306
306