permdock 0.23.0 → 0.25.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 (307) hide show
  1. package/dist/a2a/index.d.ts +4 -4
  2. package/dist/a2a/index.js +4 -4
  3. package/dist/{adoption-scan-CNoE5yBA.js → adoption-scan-DhZejKH8.js} +1 -1
  4. package/dist/agent/index.d.ts +2 -2
  5. package/dist/agent/index.js +1 -1
  6. package/dist/ai-sdk/index.d.ts +3 -3
  7. package/dist/ai-sdk/index.js +3 -3
  8. package/dist/app/index.d.ts +28 -10
  9. package/dist/app/index.js +69 -46
  10. package/dist/{app-DIvM65Mv.js → app-J9PE1LNm.js} +1 -1
  11. package/dist/{approval-policies-D7moEfTM.d.ts → approval-policies-BiXMlYBu.d.ts} +1 -1
  12. package/dist/{approval-prompt-DtfKSH-8.d.ts → approval-prompt-j5PTItiy.d.ts} +1 -1
  13. package/dist/approvals/index.d.ts +3 -3
  14. package/dist/{arazzo-rsYPFgga.js → arazzo-2_9pOddr.js} +2 -2
  15. package/dist/{arazzo-4rMFOHbu.js → arazzo-BDDzHgwW.js} +1 -1
  16. package/dist/astro/index.d.ts +4 -4
  17. package/dist/astro/index.js +1 -1
  18. package/dist/{audience-N2BqOvES.js → audience-DLoopY4q.js} +1 -1
  19. package/dist/authzen/index.d.ts +5 -5
  20. package/dist/authzen/index.js +1 -1
  21. package/dist/{automation-CrGcfIZn.d.ts → automation-_iGeP54L.d.ts} +1 -1
  22. package/dist/better-auth/index.d.ts +1 -1
  23. package/dist/better-supabase/index.d.ts +63 -38
  24. package/dist/better-supabase/index.js +55 -38
  25. package/dist/{bind-N5jf6kjk.d.ts → bind-CTj4dHc1.d.ts} +7 -7
  26. package/dist/{bind-Cx10JuJ-.js → bind-LQ6zbARV.js} +2 -2
  27. package/dist/{build-instance-BDGzsGcn.js → build-instance-Bq8wkJ4i.js} +1 -1
  28. package/dist/{capability-mLbd3KZ0.d.ts → capability-DqCyFGip.d.ts} +1 -1
  29. package/dist/{casbin-CjUT-wqV.js → casbin-BspH3-6_.js} +1 -1
  30. package/dist/{casbin-Dg5N0Gfa.js → casbin-XFqehd6I.js} +1 -1
  31. package/dist/catalog/index.d.ts +4 -4
  32. package/dist/catalog/index.js +4 -4
  33. package/dist/{catalog-BJu0A15r.js → catalog-B1MAmRQI.js} +2 -2
  34. package/dist/catalog-BCVIH7kq.js +1 -0
  35. package/dist/{catalog-CgA6-DQA.js → catalog-CaZoXBD8.js} +1 -1
  36. package/dist/{challenge-DVw1SrH9.js → challenge-DKJpP-5P.js} +1 -1
  37. package/dist/chat/index.d.ts +1 -1
  38. package/dist/chat/index.js +2 -2
  39. package/dist/chat-sdk/index.d.ts +3 -3
  40. package/dist/claude-agent/index.d.ts +3 -3
  41. package/dist/claude-agent/index.js +2 -2
  42. package/dist/clerk/index.d.ts +2 -2
  43. package/dist/cli/bin.js +1 -1
  44. package/dist/cli/index.d.ts +4 -4
  45. package/dist/cli/index.js +3 -3
  46. package/dist/cloud/index.d.ts +8 -8
  47. package/dist/cloud/index.js +1 -1
  48. package/dist/{cloud-Blw4AaQv.js → cloud-CUvR7okV.js} +2 -2
  49. package/dist/{codemod-BFFXaS-S.js → codemod-iwXnO0fg.js} +1 -1
  50. package/dist/{codemod-ByRUKVp-.js → codemod-uZsk1b6T.js} +2 -2
  51. package/dist/{collect-D3ToPa6Z.js → collect-BG-SXFQv.js} +1 -1
  52. package/dist/{collect-COqPRz6O.js → collect-CxPJRjoc.js} +2 -2
  53. package/dist/collect-ZLgHgujd.js +1 -0
  54. package/dist/compile/index.d.ts +1 -1
  55. package/dist/{compile-DSwZUJmL.d.ts → compile-Dh9pW_Co.d.ts} +2 -2
  56. package/dist/{completion-BW53byZN.js → completion-DenWMczI.js} +1 -1
  57. package/dist/{config-B0qti4jI.js → config-CoUYTCCu.js} +1 -1
  58. package/dist/{config-DyNanTjZ.js → config-DC7aiuhP.js} +2 -2
  59. package/dist/{config-report-DgMqeeK6.js → config-report-C5D1rPiF.js} +2 -2
  60. package/dist/{config-shape-C4zqzG2K.js → config-shape-ChhsuGSV.js} +2 -1
  61. package/dist/{context-KrAhRY22.js → context-BXM0MDB0.js} +2 -2
  62. package/dist/convex/index.d.ts +4 -4
  63. package/dist/convex/index.js +2 -2
  64. package/dist/{core-DMQsq2Gv.js → core-BTJlqWsv.js} +5 -5
  65. package/dist/{core-KsoqXWhf.d.ts → core-BhZEo5Le.d.ts} +2 -2
  66. package/dist/{coverage-D8jBJdgD.d.ts → coverage-BuGlwUms.d.ts} +30 -9
  67. package/dist/{coverage-Dh2W_DmF.js → coverage-CGu_Kovx.js} +114 -64
  68. package/dist/{create-goT32QIN.d.ts → create--q7-j0hX.d.ts} +6 -6
  69. package/dist/{create-ChK8bpCK.d.ts → create-C5IQw_-i.d.ts} +7 -7
  70. package/dist/{create-DGFv7Dje.d.ts → create-CYj0cjTu.d.ts} +4 -4
  71. package/dist/{create-BRr7Gu7N.js → create-D7D94oNh.js} +4 -4
  72. package/dist/{create-bYkJ4-tg.js → create-DaddhCIg.js} +3 -3
  73. package/dist/{credentials-UwTE2wCW.js → credentials-BZU7Twpt.js} +1 -1
  74. package/dist/{credentials-fqa_Xzzh.d.ts → credentials-Bq-Xa7Vq.d.ts} +2 -2
  75. package/dist/delivery/index.d.ts +4 -4
  76. package/dist/delivery/index.js +1 -1
  77. package/dist/{denied-text-BTMxIn5W.d.ts → denied-text-B6s29jcf.d.ts} +1 -1
  78. package/dist/{describe-CazEjtOH.d.ts → describe-DwcoWMLB.d.ts} +1 -1
  79. package/dist/{diff-DLcsCeVo.js → diff-BnYHpRSI.js} +3 -3
  80. package/dist/{diff-BkuW_5dK.js → diff-H75YU6Q-.js} +1 -1
  81. package/dist/{doctor-oD08zL1e.js → doctor-CF9TXVkX.js} +68 -32
  82. package/dist/{doctor-Jk2Ifezw.js → doctor-DreyO1At.js} +2 -2
  83. package/dist/drizzle/index.d.ts +3 -3
  84. package/dist/elysia/index.d.ts +4 -4
  85. package/dist/elysia/index.js +1 -1
  86. package/dist/{errors-CXxQwtbZ.d.ts → errors-D_SnqcRn.d.ts} +1 -1
  87. package/dist/{evaluate-_JdlbJ32.js → evaluate-BQ2nWOki.js} +2 -2
  88. package/dist/{evaluations-DcUW5VkX.d.ts → evaluations-BVtY66lF.d.ts} +3 -3
  89. package/dist/evaluator-CDl2YUd_.js +2 -0
  90. package/dist/{evaluator-eager-DvmrpdZt.js → evaluator-eager-CULtQ8t6.js} +1 -1
  91. package/dist/eve/index.d.ts +4 -4
  92. package/dist/eve/index.js +2 -2
  93. package/dist/express/index.d.ts +4 -4
  94. package/dist/express/index.js +1 -1
  95. package/dist/fastify/index.d.ts +4 -4
  96. package/dist/fastify/index.js +1 -1
  97. package/dist/{fetch-adapter-eQ-mdk8n.d.ts → fetch-adapter-BJ76IZZg.d.ts} +2 -2
  98. package/dist/{fetch-adapter-CAA3VJMX.js → fetch-adapter-CXeBg4CH.js} +1 -1
  99. package/dist/{fields-B17OWcPx.js → fields-D9PIYlJy.js} +13 -7
  100. package/dist/{from-snapshot-CdGYjHUg.js → from-snapshot-FdVXG_QZ.js} +20 -14
  101. package/dist/{gen-BwcwwLok.js → gen-BU5glz2Q.js} +2 -2
  102. package/dist/{gen-D4ulqsYR.js → gen-C75KIBdA.js} +1 -1
  103. package/dist/h3/index.d.ts +4 -4
  104. package/dist/h3/index.js +2 -2
  105. package/dist/hono/index.d.ts +4 -4
  106. package/dist/hono/index.js +1 -1
  107. package/dist/{hosted-cPDyrlsQ.js → hosted-CQW_YNx7.js} +1 -1
  108. package/dist/{hosted-BUCpV8-u.d.ts → hosted-D5StFpKa.d.ts} +1 -1
  109. package/dist/{import-BsrnU4BF.js → import-B34PyXgL.js} +3 -16
  110. package/dist/{import-B2jgnNS0.js → import-BYYXmHvP.js} +1 -1
  111. package/dist/{index-DD2FBFdm.d.ts → index-B1-tE0Kx.d.ts} +14 -7
  112. package/dist/{index-DQCBzEhO.d.ts → index-BwSEp_O5.d.ts} +4 -4
  113. package/dist/{index-CvKGALWb.d.ts → index-CB_eM-qx.d.ts} +4 -4
  114. package/dist/{index-BXS29UnX.d.ts → index-CvcE9mYP.d.ts} +1 -1
  115. package/dist/{index-DYAJ9JX1.d.ts → index-D7sMtTf6.d.ts} +4 -4
  116. package/dist/{index-CxA-ygwc.d.ts → index-d7f0hNss.d.ts} +2 -2
  117. package/dist/index.d.ts +17 -17
  118. package/dist/index.js +13 -13
  119. package/dist/{init-Baq0yYfu.js → init-C-nzibt_.js} +1 -1
  120. package/dist/{init-Cik6ITgM.js → init-C1Bj0BFA.js} +3 -3
  121. package/dist/{instance-options-BDHB3qBG.d.ts → instance-options-DhQVCuhT.d.ts} +1 -1
  122. package/dist/{instance-snapshot-LPNBG9np.js → instance-snapshot-DyG_5ASl.js} +5 -5
  123. package/dist/jwt/index.d.ts +4 -4
  124. package/dist/{kernel-BY3rVRs2.js → kernel-D9AxUqmz.js} +5 -5
  125. package/dist/kysely/index.d.ts +3 -3
  126. package/dist/{login-CUboKh0f.js → login-Cm_ebe5M.js} +3 -3
  127. package/dist/{login-CcBS1xkU.js → login-DjuUQqqK.js} +1 -1
  128. package/dist/{manifest-CIlVL-QT.js → manifest-9KSrH_1h.js} +35 -35
  129. package/dist/{may-use-D0_wNcgB.js → may-use-WDhFPqGG.js} +5 -6
  130. package/dist/mcp/index.d.ts +8 -8
  131. package/dist/mcp/index.js +3 -3
  132. package/dist/{membership-filter-CfLdP_F9.js → membership-filter-BWnfRQzo.js} +1 -1
  133. package/dist/{module-values-BLiVlO1X.js → module-values-CdaVwrab.js} +1 -1
  134. package/dist/nest/index.d.ts +4 -4
  135. package/dist/nest/index.js +1 -1
  136. package/dist/next/index.d.ts +10 -10
  137. package/dist/next/index.js +2 -2
  138. package/dist/next/plugin.d.ts +1 -1
  139. package/dist/next/plugin.js +1 -1
  140. package/dist/node/index.d.ts +4 -4
  141. package/dist/node/index.js +1 -1
  142. package/dist/oauth-security-X7Em8DbH.js +26 -0
  143. package/dist/openai/index.d.ts +4 -4
  144. package/dist/openai/index.js +3 -3
  145. package/dist/openapi/index.d.ts +4 -4
  146. package/dist/openapi/index.js +1 -1
  147. package/dist/{openapi-DobvXTF6.js → openapi-C2WGtmFa.js} +2 -2
  148. package/dist/{openapi-DglIpD53.js → openapi-DvTtFkwY.js} +2 -2
  149. package/dist/orpc/index.d.ts +5 -5
  150. package/dist/orpc/index.js +2 -2
  151. package/dist/otel/index.d.ts +3 -3
  152. package/dist/{output-B81GJ6u6.js → output-CuJfGWo6.js} +1 -1
  153. package/dist/{ownership-B7Ea-hUY.js → ownership-C_5eZ6N2.js} +1 -1
  154. package/dist/{parse-local-manifest-DzZOzDsK.d.ts → parse-local-manifest-w_ksIkB9.d.ts} +1 -1
  155. package/dist/pdp/index.d.ts +3 -3
  156. package/dist/pdp/index.js +1 -1
  157. package/dist/{permdock-HfTF99xX.js → permdock-B3zE16To.js} +14 -18
  158. package/dist/{permdock-vD3mwLSm.d.ts → permdock-DV3opaI3.d.ts} +3 -3
  159. package/dist/{permissions-CGYZqYsY.js → permissions-D-M48hW-.js} +1 -1
  160. package/dist/{policy-B_cqFLHu.d.ts → policy-DIHfTqm6.d.ts} +1 -1
  161. package/dist/{policy-from-catalog-lKL280I8.js → policy-from-catalog-Z0hvSffr.js} +3 -3
  162. package/dist/{policy-types-CCBrL7me.d.ts → policy-types-DU389Elz.d.ts} +30 -3
  163. package/dist/{postgrest-5WOO47Ud.d.ts → postgrest-3dE9SGx9.d.ts} +2 -2
  164. package/dist/powersync-BO1ty3Mf.js +1 -0
  165. package/dist/{powersync-BUUqJfH2.js → powersync-Bqy5Un2J.js} +6 -6
  166. package/dist/{powersync-B6f4l8C1.js → powersync-CCQAqiOo.js} +2 -2
  167. package/dist/prisma/index.d.ts +2 -2
  168. package/dist/{protected-action-DGuJNiMA.d.ts → protected-action-CjSUoPGx.d.ts} +5 -5
  169. package/dist/{protected-action-CdqR2-E2.js → protected-action-D41o5LvP.js} +6 -3
  170. package/dist/provider-Bzzux0TR.js +12 -0
  171. package/dist/{provider-yIM04TwN.d.ts → provider-D1jsNJ85.d.ts} +1 -1
  172. package/dist/{provider-store-BLd4UEmg.js → provider-store-tIAwP4aW.js} +3 -3
  173. package/dist/{provider-6mpRZO1E.js → provider-with-Do28DhxP.js} +6 -24
  174. package/dist/pull-CYdd5HzX.js +1 -0
  175. package/dist/{pull-4Yi8zYeU.js → pull-DLkaZBwH.js} +2 -2
  176. package/dist/{push-Dv1nfFPr.js → push-sJ5dy46a.js} +2 -2
  177. package/dist/{pushed-policy-B2ZSpnRY.d.ts → pushed-policy-Db651nih.d.ts} +1 -1
  178. package/dist/{pushed-policy-DJoyBZsd.js → pushed-policy-UZyQinrL.js} +1 -1
  179. package/dist/react/index.d.ts +6 -6
  180. package/dist/react/index.js +3 -3
  181. package/dist/react/lazy.d.ts +12 -0
  182. package/dist/react/lazy.js +36 -0
  183. package/dist/react/provider-client.d.ts +1 -1
  184. package/dist/react/provider-client.js +1 -1
  185. package/dist/react-native/index.d.ts +8 -8
  186. package/dist/react-native/index.js +7 -7
  187. package/dist/{replay-CsErjiHt.d.ts → replay-BpmpY2ev.d.ts} +1 -1
  188. package/dist/{request-context-B_L4ev8L.js → request-context-dyCY4V1t.js} +1 -1
  189. package/dist/resend/index.d.ts +4 -4
  190. package/dist/{resolve-names-SGcLjtFc.js → resolve-names-DHDedxk0.js} +2 -2
  191. package/dist/{rls-hmwRIS3-.js → rls-B3-tGA4r.js} +13 -13
  192. package/dist/{rls-Df9NEWD3.js → rls-BW2u4lQW.js} +1 -1
  193. package/dist/{rpc-DFtputZ1.js → rpc-BdFGYcWm.js} +1 -1
  194. package/dist/{rpc-D3St8vPO.d.ts → rpc-DKRQobOX.d.ts} +1 -1
  195. package/dist/{run-BXmJIjRA.js → run-2GwcSago.js} +3 -3
  196. package/dist/run-CdGNonHf.js +1 -0
  197. package/dist/{run-ticket-zfABczfh.d.ts → run-ticket-o4RxoaEN.d.ts} +2 -2
  198. package/dist/{saas-DIThcxbn.js → saas-D9maBt0q.js} +3 -3
  199. package/dist/{scan-BrTSlc_5.js → scan-CB46GDQ0.js} +1 -1
  200. package/dist/{schema-UOeI_LTB.js → schema-CyEB_zeO.js} +1 -1
  201. package/dist/scim/index.d.ts +1 -1
  202. package/dist/server/index.d.ts +11 -11
  203. package/dist/server/index.js +2 -2
  204. package/dist/{server-types-CtJSDhOv.d.ts → server-types-C4q8_8MM.d.ts} +8 -8
  205. package/dist/{sink-BskpqwLl.d.ts → sink-C3KDccl9.d.ts} +2 -2
  206. package/dist/{skills-BTVeFptV.js → skills-BYHCObpD.js} +1 -1
  207. package/dist/{skills-CAgWKbDR.js → skills-C-9wjNaE.js} +1 -1
  208. package/dist/{snapshot-BcHYtUIg.js → snapshot-D0VOanxQ.js} +7 -0
  209. package/dist/{snapshot-cache-BnXMcJbK.d.ts → snapshot-cache-C1mN0pXe.d.ts} +2 -2
  210. package/dist/snapshot-compact-CUtXsx6i.js +75 -0
  211. package/dist/{snapshot-empty-BoPBFoB8.js → snapshot-empty-F7d5BRlc.js} +1 -0
  212. package/dist/{snapshot-evaluate-CwYVSUgO.js → snapshot-evaluate-C3ZA35O_.js} +1 -1
  213. package/dist/{snapshot-reads-DOsTYC82.js → snapshot-reads-CNNmp1cK.js} +2 -2
  214. package/dist/solid/index.d.ts +5 -5
  215. package/dist/solid/index.js +2 -2
  216. package/dist/solid-start/index.d.ts +4 -4
  217. package/dist/solid-start/index.js +2 -2
  218. package/dist/{sources-DhCtO9G8.d.ts → sources-2virTxHt.d.ts} +1 -1
  219. package/dist/{src-BZKQe1lr.js → src-ieIv22BA.js} +11 -7
  220. package/dist/ssf/index.d.ts +3 -3
  221. package/dist/{standard-webhooks-kQDkIPj3.d.ts → standard-webhooks-B2g_yWK8.d.ts} +2 -2
  222. package/dist/{store-core-CDabEiO9.d.ts → store-core-BI-9ZU-5.d.ts} +4 -4
  223. package/dist/{store-options-COLWAd1K.js → store-options-BYKNX_JG.js} +8 -6
  224. package/dist/{stores-DYxx75fk.js → stores-DtM8pt8o.js} +1 -1
  225. package/dist/{stores-Mw_VAJ3B.d.ts → stores-DwGfIcmq.d.ts} +5 -5
  226. package/dist/{subject-cache-DrJGnRiV.d.ts → subject-cache-TY2tw-k9.d.ts} +1 -1
  227. package/dist/{subject-BqFwS6l3.js → subject-jG6o8eKo.js} +1 -1
  228. package/dist/supabase/index.d.ts +6 -6
  229. package/dist/supabase/index.js +2 -2
  230. package/dist/supabase/middleware.d.ts +5 -5
  231. package/dist/supabase/middleware.js +4 -4
  232. package/dist/{supabase-BDr-fIHp.js → supabase-BlAqmxD8.js} +1 -1
  233. package/dist/{supabase-Bt8rb-ah.js → supabase-C1hExXsZ.js} +2 -2
  234. package/dist/supabase-hook-DCemge7i.js +1 -0
  235. package/dist/{supabase-hook-Cb3UZpGC.js → supabase-hook-DJA8AJYz.js} +5 -5
  236. package/dist/{supautils-CuR9rPsi.js → supautils-DuwkBqKm.js} +7 -7
  237. package/dist/svelte/index.d.ts +5 -5
  238. package/dist/svelte/index.js +3 -3
  239. package/dist/svelte/runtime.d.ts +3 -3
  240. package/dist/svelte/runtime.js +1 -1
  241. package/dist/svelte/source.d.ts +5 -5
  242. package/dist/svelte/source.js +2 -2
  243. package/dist/sveltekit/index.d.ts +4 -4
  244. package/dist/sveltekit/index.js +1 -1
  245. package/dist/{tables-Bl_ozD0k.js → tables-B3w3EtUF.js} +1 -1
  246. package/dist/tanstack-start/index.d.ts +4 -4
  247. package/dist/tanstack-start/index.js +1 -1
  248. package/dist/terminal/index.d.ts +5 -5
  249. package/dist/terminal/index.js +6 -5
  250. package/dist/testing/core.d.ts +1 -1
  251. package/dist/testing/core.js +1 -1
  252. package/dist/testing/fixtures/index.d.ts +3 -3
  253. package/dist/testing/fixtures/index.js +2 -2
  254. package/dist/testing/index.d.ts +32 -25
  255. package/dist/testing/index.js +25 -16
  256. package/dist/testing/saas/index.d.ts +3 -3
  257. package/dist/testing/saas/index.js +2 -2
  258. package/dist/testing/saas/permissions.js +1 -1
  259. package/dist/trpc/index.d.ts +5 -5
  260. package/dist/trpc/index.js +2 -2
  261. package/dist/{type-helpers-fQdBvtU0.d.ts → type-helpers-tDoGEIsd.d.ts} +1 -1
  262. package/dist/{types-JmB6unT6.d.ts → types-61f3KMtI.d.ts} +7 -2
  263. package/dist/{types-CdXM6qPc.d.ts → types-BDgMzK1i.d.ts} +2 -2
  264. package/dist/{types-DyA4Loy4.d.ts → types-BIvkpVoc.d.ts} +3 -3
  265. package/dist/{types-CXUwgZ3d.d.ts → types-BWjNPQkS.d.ts} +2 -2
  266. package/dist/{types-CErg7ft6.d.ts → types-Bq4AU68k.d.ts} +3 -3
  267. package/dist/{types-ChYCRn7Y.d.ts → types-BsqLNNvG.d.ts} +1 -1
  268. package/dist/{types-Cc68_zqR.d.ts → types-CH67RMvL.d.ts} +2 -2
  269. package/dist/{types-BSGrzDPi.d.ts → types-DEDocm4c.d.ts} +4 -4
  270. package/dist/{types-DDlaFDM3.d.ts → types-DQQkzF97.d.ts} +4 -4
  271. package/dist/{types-DM0o1YyJ.d.ts → types-DdeivUBP.d.ts} +4 -4
  272. package/dist/{types-CAp7UGiB.d.ts → types-X40XNxRP.d.ts} +1 -1
  273. package/dist/unplugin/index.d.ts +1 -1
  274. package/dist/unplugin/index.js +1 -1
  275. package/dist/{usage-B6sQwycY.js → usage-BBEm7GVn.js} +4 -4
  276. package/dist/{usage-CNkKk27O.js → usage-CkKbvpmL.js} +1 -1
  277. package/dist/usage-GQxn7qkA.js +1 -0
  278. package/dist/{validation-error-BE8bpmhR.d.ts → validation-error-CV0nV6_L.d.ts} +1 -1
  279. package/dist/{verify-OtU4yCzg.js → verify-lgYu1Twv.js} +10 -10
  280. package/dist/{version-sources-BZ7V6Z8Z.js → version-sources-BRb9ZteH.js} +1 -1
  281. package/dist/vue/index.d.ts +5 -5
  282. package/dist/vue/index.js +2 -2
  283. package/dist/{waiter-LdnPaBJE.d.ts → waiter-BophA4BT.d.ts} +2 -2
  284. package/dist/{watch-CR2ZIT_5.js → watch-CJKYQYNb.js} +2 -2
  285. package/dist/watch-Cv-xvI6e.js +1 -0
  286. package/dist/webmcp/index.d.ts +1 -1
  287. package/dist/webmcp/index.js +9 -1
  288. package/dist/{who-can-DcrHB6ya.js → who-can-Yh9WdiwK.js} +1 -1
  289. package/dist/workflow/index.d.ts +3 -3
  290. package/dist/workflow/index.js +2 -2
  291. package/dist/workflow-sdk/index.d.ts +4 -4
  292. package/dist/{wrap-CVBPIuEs.d.ts → wrap-Bq9fHwuT.d.ts} +2 -2
  293. package/package.json +8 -4
  294. package/schemas/snapshot-v1.json +208 -52
  295. package/skills/permdock-wire/references/adapters.md +4 -2
  296. package/dist/catalog-DqYnQz8U.js +0 -1
  297. package/dist/collect-CjFczu8a.js +0 -1
  298. package/dist/evaluator-mHAoYEkk.js +0 -2
  299. package/dist/powersync-D12Q6Chj.js +0 -1
  300. package/dist/pull-Dr6Bq5Jo.js +0 -1
  301. package/dist/run-DnzrDgU-.js +0 -1
  302. package/dist/supabase-hook-D1pwHu87.js +0 -1
  303. package/dist/usage-Cem1FOeJ.js +0 -1
  304. package/dist/watch-B8F7Wgdy.js +0 -1
  305. package/dist/{catalog-doc-BoSOQRXT.js → catalog-doc-DnQDviXY.js} +1 -1
  306. package/dist/{credential-DrVrRL7z.js → credential-BMsbcaeP.js} +1 -1
  307. package/dist/{policy-BovcTojN.js → policy-DnNOTENd.js} +1 -1
@@ -1,9 +1,9 @@
1
- import { $n as DeniedDecision, D as Policy, Jn as ApprovalRequiredDecision, N as PolicyVocabulary, tr as GrantedDecision, xr as Subject, yr as Principal } from "./policy-types-CCBrL7me.js";
1
+ import { D as Policy, N as PolicyVocabulary, Sr as Subject, Yn as ApprovalRequiredDecision, br as Principal, er as DeniedDecision, nr as GrantedDecision } from "./policy-types-DU389Elz.js";
2
2
  import { t as Operation } from "./operations-BMPx7HyO.js";
3
- import { _ as PrincipalSource, a as PermDock, o as PermDockOptions } from "./permdock-vD3mwLSm.js";
4
- import { m as ApprovalStore, p as ApprovalStatus } from "./types-CAp7UGiB.js";
3
+ import { _ as PrincipalSource, a as PermDock, o as PermDockOptions } from "./permdock-DV3opaI3.js";
4
+ import { m as ApprovalStore, p as ApprovalStatus } from "./types-X40XNxRP.js";
5
5
  import { n as ApprovalErrorCode } from "./errors-CHwoRRpB.js";
6
- import { t as ApprovalPrompt } from "./approval-prompt-DtfKSH-8.js";
6
+ import { t as ApprovalPrompt } from "./approval-prompt-j5PTItiy.js";
7
7
  //#region src/chat/subject.d.ts
8
8
  /**
9
9
  * The platform user behind a chat message or action. Fill it only from an event
@@ -3,14 +3,14 @@ import { n as freezeDeep } from "./freeze-jjan0lCv.js";
3
3
  import { n as problemDetails } from "./problem-details-CLDgX1KV.js";
4
4
  import { c as listPermissions } from "./permission-registry-B8tYxPIt.js";
5
5
  import { n as resourceRef } from "./resource-ref-CaS9yVPi.js";
6
- import { i as challengeScope } from "./permdock-HfTF99xX.js";
7
- import { r as withApp } from "./app-DIvM65Mv.js";
6
+ import { i as challengeScope } from "./permdock-B3zE16To.js";
7
+ import { r as withApp } from "./app-J9PE1LNm.js";
8
8
  import { n as tenantScope, t as actorFrom } from "./adapter-context-OHikyRqV.js";
9
- import { n as resolveOrNull } from "./build-instance-BDGzsGcn.js";
9
+ import { n as resolveOrNull } from "./build-instance-Bq8wkJ4i.js";
10
10
  import { t as LOAD_FAILED } from "./decision-CaG5_eNJ.js";
11
11
  import { a as decisionResponse, c as problemFromDecision, d as unauthenticatedProblem, s as notFoundProblem, t as ANONYMOUS } from "./problem-CPB8kqk7.js";
12
12
  import { f as InvalidSignatureError, n as applyApprovalResume, o as evaluationsHandler } from "./evaluations-Bj5xw0EM.js";
13
- import { n as requestContext, t as buildReportingInstance } from "./request-context-B_L4ev8L.js";
13
+ import { n as requestContext, t as buildReportingInstance } from "./request-context-dyCY4V1t.js";
14
14
  import { n as decideSet, r as permissionList } from "./decide-set-DXEPepY1.js";
15
15
  import { r as hasCredentials } from "./http-DKLXrFGk.js";
16
16
  //#region src/server/kernel-problems.ts
@@ -1,10 +1,10 @@
1
1
  import { t as compact } from "./compact-CAf557ZB.js";
2
2
  import { n as freezeDeep } from "./freeze-jjan0lCv.js";
3
- import { a as deniedFor } from "./may-use-D0_wNcgB.js";
4
- import { r as withApp } from "./app-DIvM65Mv.js";
3
+ import { a as deniedFor } from "./may-use-WDhFPqGG.js";
4
+ import { r as withApp } from "./app-J9PE1LNm.js";
5
5
  import { t as composeWraps } from "./wrap-C5PWzgkq.js";
6
6
  import { t as instanceOptions } from "./instance-options-URVwqpMW.js";
7
- import { n as createAgentKernel } from "./kernel-BY3rVRs2.js";
7
+ import { n as createAgentKernel } from "./kernel-D9AxUqmz.js";
8
8
  //#region src/agent/create.ts
9
9
  function modelRow(modelId) {
10
10
  return { id: modelId };
@@ -4,7 +4,7 @@ import { f as nowMillis, u as isoAt } from "./time-nR1JesoH.js";
4
4
  import { t as bytesToBase64Url } from "./sha256-C-4WXKIu.js";
5
5
  import { t as anonymousSubject } from "./subject-C7RddW0G.js";
6
6
  import { c as credentialEvent } from "./sink-D9_vh372.js";
7
- import { i as credentialTenant, n as credentialPolicyViolation, o as isFeedId, r as credentialSubject, s as parseCredential } from "./credential-DrVrRL7z.js";
7
+ import { i as credentialTenant, n as credentialPolicyViolation, o as isFeedId, r as credentialSubject, s as parseCredential } from "./credential-BMsbcaeP.js";
8
8
  //#region src/server/credentials.ts
9
9
  const PREFIX = "pdk_";
10
10
  const ID = /^[\w-]{1,128}$/u;
@@ -1,6 +1,6 @@
1
- import { G as CredentialVerifier, Mt as Credential, Pt as CredentialKind, X as DecisionSink, jt as ApiKeyPrincipal, lt as SettingsSource, sn as AuthEvent, xr as Subject } from "./policy-types-CCBrL7me.js";
1
+ import { G as CredentialVerifier, Mt as Credential, Pt as CredentialKind, Sr as Subject, X as DecisionSink, cn as AuthEvent, jt as ApiKeyPrincipal, lt as SettingsSource } from "./policy-types-DU389Elz.js";
2
2
  import { E as PermissionTree } from "./vocabulary-DeZvUaTw.js";
3
- import { _ as PrincipalSource } from "./permdock-vD3mwLSm.js";
3
+ import { _ as PrincipalSource } from "./permdock-DV3opaI3.js";
4
4
  //#region src/server/credentials.d.ts
5
5
  /** `on('auth')` causes for an API key that resolves to the anonymous subject. */
6
6
  type ApiKeyFailureCause = "malformed" | "unknown-credential" | "invalid-claims" | "expired" | "credential-policy" | "credential-revoked" | "owner-unavailable";
@@ -1,5 +1,5 @@
1
- import { dn as DeliveryChannel, hn as EmailCategory, pn as DeliveryFailureCause } from "../policy-types-CCBrL7me.js";
2
- import { i as approvalUrlFor, n as ApprovalUrl, r as approvalPrompt, t as ApprovalPrompt } from "../approval-prompt-DtfKSH-8.js";
3
- import { _ as TransportOptions, a as DeliveryReport, c as DeliveryTransport, d as EmailTransport, f as EmailUnsubscribe, g as TransportMessages, h as TransportItem, i as DeliveryMessages, l as DeliveryTransports, m as Recipient, n as ChatTransport, o as DeliveryResult, p as OutgoingEmail, r as DeliverOptions, s as DeliveryTarget, t as ChatMessage, u as EmailMessage, v as WebhookMessage, y as WebhookTransport } from "../types-DyA4Loy4.js";
4
- import { C as audience, S as SubscriberEvent, _ as ParseConnectorResult, a as DeliveryPermDock, b as Audience, c as MemoryDelivery, d as memoryDeliveryTransport, f as CONNECTOR_SCHEMA, g as ConnectorKind, h as ConnectorIssue, i as isDeliveryTarget, l as MemoryDeliveryTransport, m as Connector, n as webhookTransport, o as DeliveryPermDockOptions, p as CONNECTOR_KINDS, r as isAddrSpec, s as createPermDock, t as WebhookTransportOptions, u as MemoryDeliveryTransportOptions, v as SiemDestination, w as subscribersFor, x as AudienceOptions, y as parseConnector } from "../index-DQCBzEhO.js";
1
+ import { fn as DeliveryChannel, gn as EmailCategory, mn as DeliveryFailureCause } from "../policy-types-DU389Elz.js";
2
+ import { i as approvalUrlFor, n as ApprovalUrl, r as approvalPrompt, t as ApprovalPrompt } from "../approval-prompt-j5PTItiy.js";
3
+ import { _ as TransportOptions, a as DeliveryReport, c as DeliveryTransport, d as EmailTransport, f as EmailUnsubscribe, g as TransportMessages, h as TransportItem, i as DeliveryMessages, l as DeliveryTransports, m as Recipient, n as ChatTransport, o as DeliveryResult, p as OutgoingEmail, r as DeliverOptions, s as DeliveryTarget, t as ChatMessage, u as EmailMessage, v as WebhookMessage, y as WebhookTransport } from "../types-BIvkpVoc.js";
4
+ import { C as audience, S as SubscriberEvent, _ as ParseConnectorResult, a as DeliveryPermDock, b as Audience, c as MemoryDelivery, d as memoryDeliveryTransport, f as CONNECTOR_SCHEMA, g as ConnectorKind, h as ConnectorIssue, i as isDeliveryTarget, l as MemoryDeliveryTransport, m as Connector, n as webhookTransport, o as DeliveryPermDockOptions, p as CONNECTOR_KINDS, r as isAddrSpec, s as createPermDock, t as WebhookTransportOptions, u as MemoryDeliveryTransportOptions, v as SiemDestination, w as subscribersFor, x as AudienceOptions, y as parseConnector } from "../index-BwSEp_O5.js";
5
5
  export { type ApprovalPrompt, type ApprovalUrl, type Audience, type AudienceOptions, CONNECTOR_KINDS, CONNECTOR_SCHEMA, type ChatMessage, type ChatTransport, type Connector, type ConnectorIssue, type ConnectorKind, type DeliverOptions, type DeliveryChannel, type DeliveryFailureCause, type DeliveryMessages, type DeliveryPermDock, type DeliveryPermDockOptions, type DeliveryReport, type DeliveryResult, type DeliveryTarget, type DeliveryTransport, type DeliveryTransports, type EmailCategory, type EmailMessage, type EmailTransport, type EmailUnsubscribe, type MemoryDelivery, type MemoryDeliveryTransport, type MemoryDeliveryTransportOptions, type OutgoingEmail, type ParseConnectorResult, type Recipient, type SiemDestination, type SubscriberEvent, type TransportItem, type TransportMessages, type TransportOptions, type WebhookMessage, type WebhookTransport, type WebhookTransportOptions, approvalPrompt, approvalUrlFor, audience, createPermDock, isAddrSpec, isDeliveryTarget, memoryDeliveryTransport, parseConnector, subscribersFor, webhookTransport };
@@ -1,5 +1,5 @@
1
1
  import { n as approvalUrlFor, t as approvalPrompt } from "../approval-prompt-B8hQY69x.js";
2
- import { n as subscribersFor, t as audience } from "../audience-N2BqOvES.js";
2
+ import { n as subscribersFor, t as audience } from "../audience-DLoopY4q.js";
3
3
  import { t as CONNECTOR_SCHEMA } from "../connector-schema-CYLQNMYq.js";
4
4
  import { a as parseConnector, i as CONNECTOR_KINDS, n as createPermDock, r as memoryDeliveryTransport, t as webhookTransport } from "../delivery-BupfvJIV.js";
5
5
  import { i as isDeliveryTarget, n as isAddrSpec } from "../target-qdEAnnhU.js";
@@ -1,4 +1,4 @@
1
- import { Yn as Decision } from "./policy-types-CCBrL7me.js";
1
+ import { Xn as Decision } from "./policy-types-DU389Elz.js";
2
2
  import { w as Permission } from "./vocabulary-DeZvUaTw.js";
3
3
  //#region src/agent/denied-text.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { $n as DeniedDecision, Qn as DenialReason, Yn as Decision } from "./policy-types-CCBrL7me.js";
1
+ import { $n as DenialReason, Xn as Decision, er as DeniedDecision } from "./policy-types-DU389Elz.js";
2
2
  import { w as Permission } from "./vocabulary-DeZvUaTw.js";
3
3
  //#region src/core/describe.d.ts
4
4
  type DecisionDescription = {
@@ -1,10 +1,10 @@
1
- import { D as memoryCustomRoleSource } from "./src-BZKQe1lr.js";
1
+ import { D as memoryCustomRoleSource } from "./src-ieIv22BA.js";
2
2
  import { n as findPermission } from "./permission-registry-B8tYxPIt.js";
3
3
  import { g as secondsOf } from "./time-nR1JesoH.js";
4
4
  import { t as canonicalJson } from "./canonical-json-DwilZ1iB.js";
5
- import { t as getPermDock } from "./permdock-HfTF99xX.js";
5
+ import { t as getPermDock } from "./permdock-B3zE16To.js";
6
6
  import { i as configError, u as usageResult } from "./errors-BhRkoNS7.js";
7
- import { t as buildCatalog } from "./catalog-doc-BoSOQRXT.js";
7
+ import { t as buildCatalog } from "./catalog-doc-DnQDviXY.js";
8
8
  import { a as loadModule, n as asPolicy, s as pickNamed } from "./load-C4p4VgwR.js";
9
9
  import { t as parseCatalog } from "./parse-CORUNcCo.js";
10
10
  import { t as operationFindings } from "./operation-findings-CVwJHEu_.js";
@@ -21,7 +21,7 @@ const diff = defineLeaf({
21
21
  }
22
22
  },
23
23
  async run(ctx, { flags, args }) {
24
- return (await import("./diff-DLcsCeVo.js")).runDiff({
24
+ return (await import("./diff-BnYHpRSI.js")).runDiff({
25
25
  cwd: ctx.cwd,
26
26
  config: ctx.config,
27
27
  sources: [args["before"], args["after"]].filter((value) => value !== void 0),
@@ -5,22 +5,22 @@ import { u as isPrincipalRelation } from "./resource-relations-8-pCScBO.js";
5
5
  import { o as flattenGrantee } from "./grantee-OG4klcNr.js";
6
6
  import { c as rootScope, d as scopeList, o as normalizeMemberships, s as resolveScope } from "./scopes-gdH__vDZ.js";
7
7
  import { t as canonicalJson } from "./canonical-json-DwilZ1iB.js";
8
- import { u as separationConflicts } from "./policy-BovcTojN.js";
9
- import { T as validateCustomRole } from "./evaluate-_JdlbJ32.js";
10
- import { s as parseCredential } from "./credential-DrVrRL7z.js";
8
+ import { u as separationConflicts } from "./policy-DnNOTENd.js";
9
+ import { T as validateCustomRole } from "./evaluate-BQ2nWOki.js";
10
+ import { s as parseCredential } from "./credential-BMsbcaeP.js";
11
11
  import "./authz-topic-Dbc-HDOS.js";
12
12
  import { a as describeError, i as configError } from "./errors-BhRkoNS7.js";
13
13
  import { t as policyRowConditionKeys } from "./row-conditions-BAGHOmVq.js";
14
14
  import { a as rel, n as doctorSrcPath, o as sqlFiles, r as listSourceFiles } from "./files-BSjrtIHw.js";
15
15
  import { i as DOCTOR_REPORT_SCHEMA } from "./version-DMQ0dnN5.js";
16
- import { c as jsonSchemaOf, i as catalogOAuthScopes } from "./catalog-doc-BoSOQRXT.js";
16
+ import { c as jsonSchemaOf, i as catalogOAuthScopes } from "./catalog-doc-DnQDviXY.js";
17
17
  import { r as parseSync, t as createVisitor } from "./optional-8TKc-0j4.js";
18
18
  import { a as loadModule, i as loadConfiguredPolicy, n as asPolicy, s as pickNamed } from "./load-C4p4VgwR.js";
19
19
  import { t as catalogPath } from "./catalog-path-CnI0XTFK.js";
20
- import { r as runCollect } from "./collect-D3ToPa6Z.js";
20
+ import { r as runCollect } from "./collect-BG-SXFQv.js";
21
21
  import { n as supabaseTenantClaim } from "./budget-BBCPDOGP.js";
22
22
  import { a as betterSupabaseInstalled, c as filesOf, i as betterSupabaseDefaults, l as nodeFiles, n as betterSupabaseAuthzVersions, o as betterSupabaseTenantClaim, r as betterSupabaseConfig, s as workspaceDirs, t as BETTER_SUPABASE_AUTHZ_TOPIC, u as readJson } from "./better-supabase-DF8f8oly.js";
23
- import { t as operationCoverage } from "./coverage-Dh2W_DmF.js";
23
+ import { t as operationCoverage } from "./coverage-CGu_Kovx.js";
24
24
  import { i as qualifySqlTable, s as quoteSqlLiteral } from "./sql-0WjxIp9g.js";
25
25
  import { a as scopeMembershipTable } from "./compile-Cvru58id.js";
26
26
  import { d as keptKeys, r as PERMDOCK_SCHEMA } from "./sources-C4vkzZJV.js";
@@ -28,25 +28,25 @@ import { t as parseCatalog } from "./parse-CORUNcCo.js";
28
28
  import { n as activeTenantMismatch } from "./active-tenant-DVee32-T.js";
29
29
  import "./markers-BeHZ4x9Q.js";
30
30
  import { t as didYouMean } from "./args-iafbHiXn.js";
31
- import { t as DOCS_BASE } from "./manifest-CIlVL-QT.js";
31
+ import { t as DOCS_BASE } from "./manifest-9KSrH_1h.js";
32
32
  import { t as createStyle } from "./style-Ds11Hmk4.js";
33
- import { a as nonEmptyOr, r as findingOf } from "./output-B81GJ6u6.js";
34
- import { i as runSkillsInstall } from "./skills-CAgWKbDR.js";
33
+ import { a as nonEmptyOr, r as findingOf } from "./output-CuJfGWo6.js";
34
+ import { i as runSkillsInstall } from "./skills-C-9wjNaE.js";
35
35
  import { n as MIGRATION_DIRS, t as DEFAULT_SENSITIVE_ACTIONS } from "./constants-DcJABbLW.js";
36
36
  import { l as partPath } from "./output-files-CM0BnH05.js";
37
37
  import { n as pgConnector } from "./pg-Ddxsd5ZB.js";
38
- import { _ as readSupabaseConfig, a as supabaseHookManifest, c as activeSource, d as resolveSchemas, g as pd074, h as pd045, l as pd039, m as attrsPlan, n as hookOut, v as supabaseConfig } from "./supabase-hook-Cb3UZpGC.js";
38
+ import { _ as readSupabaseConfig, a as supabaseHookManifest, c as activeSource, d as resolveSchemas, g as pd074, h as pd045, l as pd039, m as attrsPlan, n as hookOut, v as supabaseConfig } from "./supabase-hook-DJA8AJYz.js";
39
39
  import { O as quoteIdent, t as CUSTOM_ROLES } from "./shared-DfaIWvIJ.js";
40
- import { $ as byKey, c as graphPlan, i as tableNames, ot as graphSqlName, r as tableNameOf } from "./tables-Bl_ozD0k.js";
41
- import { a as guardedTables, p as contextRefs, r as unsatisfiedKinds, t as ownershipRules } from "./ownership-B7Ea-hUY.js";
40
+ import { $ as byKey, c as graphPlan, i as tableNames, ot as graphSqlName, r as tableNameOf } from "./tables-B3w3EtUF.js";
41
+ import { a as guardedTables, p as contextRefs, r as unsatisfiedKinds, t as ownershipRules } from "./ownership-C_5eZ6N2.js";
42
42
  import { t as membershipSourcesOf } from "./sources-qoIJQrJv.js";
43
43
  import { i as group, n as membershipColumns, o as sqlStatements, r as tableKey } from "./deciding-columns-NB4wcyBf.js";
44
- import { t as FIELD_VIEWS } from "./fields-B17OWcPx.js";
45
- import { t as resolveNames } from "./resolve-names-SGcLjtFc.js";
46
- import { C as splitIgnored, S as parseIgnores, d as rowConditionMessage, f as commandFor, h as tableFor, p as compileGrants, s as ROW_CONDITION_FIX, u as helperTablePolicies } from "./verify-OtU4yCzg.js";
47
- import { a as pd010, c as pd014, d as pd038, f as pd041, i as pd008, l as pd015, n as pd001, o as pd011, p as pd057, r as pd007, s as pd013, t as runUsage, u as pd036 } from "./usage-B6sQwycY.js";
48
- import { a as streamOf, i as scopeSourcesOf, r as staleFiles, t as powersyncFiles } from "./powersync-BUUqJfH2.js";
49
- import { a as buildContext, n as generateOptions, r as isRefusal, s as inheritTargets, t as supautilsRejections } from "./supautils-CuR9rPsi.js";
44
+ import { t as FIELD_VIEWS } from "./fields-D9PIYlJy.js";
45
+ import { t as resolveNames } from "./resolve-names-DHDedxk0.js";
46
+ import { C as splitIgnored, S as parseIgnores, d as rowConditionMessage, f as commandFor, h as tableFor, p as compileGrants, s as ROW_CONDITION_FIX, u as helperTablePolicies } from "./verify-lgYu1Twv.js";
47
+ import { a as pd010, c as pd014, d as pd038, f as pd041, i as pd008, l as pd015, n as pd001, o as pd011, p as pd057, r as pd007, s as pd013, t as runUsage, u as pd036 } from "./usage-BBEm7GVn.js";
48
+ import { a as streamOf, i as scopeSourcesOf, r as staleFiles, t as powersyncFiles } from "./powersync-Bqy5Un2J.js";
49
+ import { a as buildContext, n as generateOptions, r as isRefusal, s as inheritTargets, t as supautilsRejections } from "./supautils-DuwkBqKm.js";
50
50
  import { n as legacyHelperNames, r as retirePlan, t as legacyHelperCalls } from "./retire-B2xffQgY.js";
51
51
  import { basename, dirname, join, resolve } from "node:path";
52
52
  import { pathToFileURL } from "node:url";
@@ -954,6 +954,18 @@ const MAX_LEVELS = 8;
954
954
  * the parenthesised groups.
955
955
  */
956
956
  const SNAPSHOT_KEY = /^ {2}'?permdock@([^(:'\s]+)((?:\([^)]*\))*)'?:\s*$/gmu;
957
+ /**
958
+ * The body of the top-level `snapshots:` section. `packages:` lists the same
959
+ * name once without peers, which is not a second copy.
960
+ */
961
+ function snapshotsSection(lock) {
962
+ const start = /^snapshots:\s*$/mu.exec(lock);
963
+ if (start === null) return "";
964
+ const rest = lock.slice(start.index + start[0].length);
965
+ const end = /^\S/mu.exec(rest.replace(/^\r?\n/u, ""));
966
+ const body = rest.replace(/^\r?\n/u, "");
967
+ return end === null ? body : body.slice(0, end.index);
968
+ }
957
969
  function lockfileFrom(project) {
958
970
  let dir = project.cwd;
959
971
  for (let level = 0; level < MAX_LEVELS; level += 1) {
@@ -973,10 +985,10 @@ function pd092(project) {
973
985
  const lockfile = lockfileFrom(project);
974
986
  if (lockfile === void 0) return [];
975
987
  const variants = /* @__PURE__ */ new Map();
976
- for (const match of project.files.read(lockfile).matchAll(SNAPSHOT_KEY)) {
977
- const version = match[1] ?? "";
988
+ for (const match of snapshotsSection(project.files.read(lockfile)).matchAll(SNAPSHOT_KEY)) {
989
+ const version = String(match[1]);
978
990
  const peers = variants.get(version) ?? /* @__PURE__ */ new Set();
979
- peers.add(match[2] ?? "");
991
+ peers.add(String(match[2]));
980
992
  variants.set(version, peers);
981
993
  }
982
994
  return [...variants].filter(([, peers]) => peers.size > 1).map(([version, peers]) => {
@@ -1128,6 +1140,8 @@ async function pd091(project) {
1128
1140
  fix: "export the operationPermissions(...) result and name it as '<module>#<export>'",
1129
1141
  target: openapi.operations
1130
1142
  }];
1143
+ const kernel = Reflect.get(operations, "kernel");
1144
+ const checked = openapi.enforcement === "kernel" && isOperationPermissions(kernel) ? kernel : operations;
1131
1145
  const findings = [];
1132
1146
  for (const doc of openapi.doc ?? []) {
1133
1147
  const abs = resolve(project.cwd, doc);
@@ -1145,7 +1159,7 @@ async function pd091(project) {
1145
1159
  });
1146
1160
  continue;
1147
1161
  }
1148
- const coverage = operationCoverage(operations, document, {
1162
+ const coverage = operationCoverage(checked, document, {
1149
1163
  tenantPaths: openapi.tenantPaths,
1150
1164
  ...openapi.base === void 0 ? {} : { base: openapi.base }
1151
1165
  });
@@ -2784,7 +2798,9 @@ function pd066(cwd, config, files = nodeFiles) {
2784
2798
  }
2785
2799
  const ROWS_HELPER = String.raw`(?:"[^"]+"\.|\w+\.)?"?permitted_\w+_rows"?`;
2786
2800
  const TEXT_CAST_ON_ROWS = new RegExp(String.raw`::\s*text\s+in\s*\(\s*select\s+${ROWS_HELPER}\s*\(|${ROWS_HELPER}\s*\([^()]*(?:\([^()]*\)[^()]*)*\)\s*::\s*text\b|(?:"[^"]+"\.|\w+\.)?"?permitted_\w+_row"?\s*\(\s*[^,()]+::\s*text\s*,`, "iu");
2787
- const KNOWN_ID_IN_ROWS = new RegExp(String.raw`(?:\$\d+|\bp_\w+|\b(?:new|old)\.\w+)(?:\s*::\s*\w+)?\s+in\s*\(\s*select\s+${ROWS_HELPER}\s*\(`, "iu");
2801
+ const KNOWN_ID = String.raw`(?:\$\d+|\bp_\w+|\b(?:new|old)\.\w+)(?:\s*::\s*\w+)?`;
2802
+ const KNOWN_ID_IN_ROWS = new RegExp(String.raw`${KNOWN_ID}\s+in\s*\(\s*select\s+${ROWS_HELPER}\s*\(|${KNOWN_ID}\s*=\s*any\s*\(\s*array\s*\(\s*select\s+${ROWS_HELPER}\s*\(`, "iu");
2803
+ const GENERATED_ROW_HELPER = /^create\s+(?:or\s+replace\s+)?function\s+(?:"?\w+"?\.)?"?permitted_\w+/iu;
2788
2804
  function firstLine(statement, index) {
2789
2805
  return statement.line + statement.text.slice(0, index).split("\n").length - 1;
2790
2806
  }
@@ -2809,12 +2825,13 @@ function pd088(cwd, config, files = nodeFiles) {
2809
2825
  });
2810
2826
  }
2811
2827
  /**
2812
- * PD089: `<known id> in (select permitted_*_rows(...))`. The `_rows` helper
2813
- * lists every permitted row; for one id the `permitted_*_row(id, permission)`
2814
- * overload checks that row alone.
2828
+ * PD089: `<known id> in (select permitted_*_rows(...))` or `<known id> =
2829
+ * any(array(select permitted_*_rows(...)))`, in a policy or a function body.
2830
+ * The `_rows` helper lists every permitted row; for one id the
2831
+ * `permitted_*_row(id, permission)` overload checks that row alone.
2815
2832
  */
2816
2833
  function pd089(cwd, config, files = nodeFiles) {
2817
- return rowHelperStatements(cwd, config, files).flatMap((statement) => {
2834
+ return migrationStatements(files, cwd, config).filter((statement) => !GENERATED_ROW_HELPER.test(statement.text)).flatMap((statement) => {
2818
2835
  const match = KNOWN_ID_IN_ROWS.exec(statement.text);
2819
2836
  return match === null ? [] : [{
2820
2837
  code: "PD089",
@@ -2826,6 +2843,11 @@ function pd089(cwd, config, files = nodeFiles) {
2826
2843
  }
2827
2844
  const POLICY_COMMAND = /\bfor\s+(all|select|insert|update|delete)\b/iu;
2828
2845
  const ACTOR_GUARD_CALL = /\bpermdock_actor_may_write\s*\(/iu;
2846
+ /** The expression `rls generate` inlined into the policies of 0.24 and earlier. */
2847
+ const INLINED_ACTOR_GUARD = /'act'[\s\S]*'read_only'/iu;
2848
+ function inlinesActorGuard(text) {
2849
+ return INLINED_ACTOR_GUARD.test(text.replaceAll("\"", ""));
2850
+ }
2829
2851
  const WRITE_COMMANDS = [
2830
2852
  "insert",
2831
2853
  "update",
@@ -2841,17 +2863,31 @@ function policyStatements(statements) {
2841
2863
  name: unquote(group(match, 1)),
2842
2864
  table: tableKey(group(match, 2)),
2843
2865
  commands: command === void 0 || command === "all" ? WRITE_COMMANDS : [command],
2844
- guarded: ACTOR_GUARD_CALL.test(statement.text)
2866
+ guarded: ACTOR_GUARD_CALL.test(statement.text) || inlinesActorGuard(statement.text)
2845
2867
  }];
2846
2868
  });
2847
2869
  }
2848
2870
  /**
2849
- * PD090: a hand-written policy calls `permdock_actor_may_write()` on a table
2850
- * and command where `permdock rls generate` already writes a restrictive
2851
- * `*_read_only_actors` policy, so the guard runs twice.
2871
+ * The statements PD090 reads: the migration folders, plus the declarative
2872
+ * schemas and `rls.out`, which `doctor.migrations` does not drop.
2873
+ */
2874
+ function guardStatements(files, cwd, config) {
2875
+ const out = config.rls?.out;
2876
+ const entries = [
2877
+ ...config.doctor?.migrations ?? MIGRATION_DIRS,
2878
+ "supabase/schemas",
2879
+ ...out === void 0 ? [] : [out]
2880
+ ];
2881
+ return [...new Set(sqlFiles(cwd, entries))].flatMap((file) => sqlStatements(files.read(file)).map((statement) => Object.assign({ file: rel(cwd, file) }, statement)));
2882
+ }
2883
+ /**
2884
+ * PD090: a hand-written policy calls `permdock_actor_may_write()`, or inlines
2885
+ * the guard expression of 0.24 and earlier, on a table and command where
2886
+ * `permdock rls generate` already writes a restrictive `*_read_only_actors`
2887
+ * policy, so the guard runs twice.
2852
2888
  */
2853
2889
  function pd090(cwd, config, files = nodeFiles) {
2854
- const policies = policyStatements(migrationStatements(files, cwd, config));
2890
+ const policies = policyStatements(guardStatements(files, cwd, config));
2855
2891
  const generated = new Set(policies.filter((policy) => policy.name.endsWith("_read_only_actors")).flatMap((policy) => policy.commands.map((command) => `${policy.table}:${command}`)));
2856
2892
  return policies.filter((policy) => !policy.name.endsWith("_read_only_actors")).filter((policy) => policy.guarded && policy.commands.some((command) => generated.has(`${policy.table}:${command}`))).map((policy) => ({
2857
2893
  code: "PD090",
@@ -10,7 +10,7 @@ const doctor = defineLeaf({
10
10
  description: "Check codes or groups to run",
11
11
  valueHint: "code",
12
12
  async complete() {
13
- const { DOCTOR_CHECKS } = await import("./doctor-oD08zL1e.js");
13
+ const { DOCTOR_CHECKS } = await import("./doctor-CF9TXVkX.js");
14
14
  return [.../* @__PURE__ */ new Set([...DOCTOR_CHECKS.map(({ code }) => code), ...DOCTOR_CHECKS.flatMap(({ groups }) => groups)])];
15
15
  }
16
16
  },
@@ -35,7 +35,7 @@ const doctor = defineLeaf({
35
35
  if (answer === void 0) return CANCELLED;
36
36
  fix = answer;
37
37
  }
38
- return (await import("./doctor-oD08zL1e.js")).runDoctor({
38
+ return (await import("./doctor-CF9TXVkX.js")).runDoctor({
39
39
  cwd: ctx.cwd,
40
40
  config: ctx.config,
41
41
  only: flags.only,
@@ -1,7 +1,7 @@
1
- import { Er as Condition, qt as Instant, xr as Subject } from "../policy-types-CCBrL7me.js";
2
- import { f as WhereResult } from "../permdock-vD3mwLSm.js";
1
+ import { Dr as Condition, Sr as Subject, qt as Instant } from "../policy-types-DU389Elz.js";
2
+ import { f as WhereResult } from "../permdock-DV3opaI3.js";
3
3
  import { r as RelationsMapping } from "../graph-sql-BwFC4Qjs.js";
4
- import { s as MembershipsMapping } from "../compile-DSwZUJmL.js";
4
+ import { s as MembershipsMapping } from "../compile-Dh9pW_Co.js";
5
5
  import { n as RowCheck, t as WithSubjectOptions } from "../subject-settings-vNW8qmUH.js";
6
6
  import { SQL, Table } from "drizzle-orm";
7
7
  //#region src/drizzle/types.d.ts
@@ -1,9 +1,9 @@
1
- import { D as Policy, N as PolicyVocabulary, yr as Principal } from "../policy-types-CCBrL7me.js";
1
+ import { D as Policy, N as PolicyVocabulary, br as Principal } from "../policy-types-DU389Elz.js";
2
2
  import { w as Permission } from "../vocabulary-DeZvUaTw.js";
3
- import { a as PermDock } from "../permdock-vD3mwLSm.js";
3
+ import { a as PermDock } from "../permdock-DV3opaI3.js";
4
4
  import { n as RevocationFeed } from "../revocations-BaUXHM1N.js";
5
- import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-CtJSDhOv.js";
6
- import { t as ServerAdapterOptions } from "../bind-N5jf6kjk.js";
5
+ import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-C4q8_8MM.js";
6
+ import { t as ServerAdapterOptions } from "../bind-CTj4dHc1.js";
7
7
  import { Elysia } from "elysia";
8
8
  //#region src/elysia/create.d.ts
9
9
  type ElysiaRequestContext = {
@@ -1,6 +1,6 @@
1
1
  import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-Bj5xw0EM.js";
2
2
  import { a as parsedBody, r as hasCredentials } from "../http-DKLXrFGk.js";
3
- import { a as socketConnection, i as decorate, r as bindKernel } from "../bind-Cx10JuJ-.js";
3
+ import { a as socketConnection, i as decorate, r as bindKernel } from "../bind-LQ6zbARV.js";
4
4
  import { t as problemFromError } from "../map-error-BCdb2Nrp.js";
5
5
  import { a as onRevoked, n as closeReason, t as POLICY_VIOLATION } from "../stream-DQ3rbO3J.js";
6
6
  import { Elysia } from "elysia";
@@ -1,4 +1,4 @@
1
- import { Yn as Decision, xr as Subject, yn as WireDenial } from "./policy-types-CCBrL7me.js";
1
+ import { Sr as Subject, Xn as Decision, bn as WireDenial } from "./policy-types-DU389Elz.js";
2
2
  import { StandardSchemaV1 } from "@standard-schema/spec";
3
3
  //#region src/core/problem-details.d.ts
4
4
  type Disclosure = "hide" | "reveal";
@@ -12,6 +12,7 @@ import { a as authenticated, i as assurance, o as flattenGrantee, r as asGrantee
12
12
  import { a as durationOf, d as isoNow, o as epochSeconds, r as assertDuration, s as instantAt, t as INVALID_NOW } from "./time-nR1JesoH.js";
13
13
  import { i as sameId } from "./ids-DzhJaCUj.js";
14
14
  import { d as scopeList, f as subjectForPermission, i as keepsPermission, o as normalizeMemberships, p as tenantOf, s as resolveScope } from "./scopes-gdH__vDZ.js";
15
+ import { t as canonicalJson } from "./canonical-json-DwilZ1iB.js";
15
16
  import { a as readOnlyActorRefuses, i as delegatedPermissions, n as coveredByDelegation, o as requiresStandIn, r as coversRequirements, s as evaluateCondition } from "./delegation-CrdqnesZ.js";
16
17
  import { t as requiresApproval } from "./approval-required-TzNB9oQA.js";
17
18
  import { o as resourceRoleCondition } from "./grantee-conditions-Dzprappv.js";
@@ -21,11 +22,10 @@ import { t as grantCoversField } from "./fields-DlKwZYiy.js";
21
22
  import { t as resourceIdOf } from "./resource-ref-CaS9yVPi.js";
22
23
  import { n as rowIdOf, r as rowValues, t as isRowPair } from "./row-pair-DglMdRFh.js";
23
24
  import { c as nowSeconds, i as matchScopedMembership, l as partitionsOf, n as inTeam, p as scopeField, r as isMembershipExpired } from "./tenancy-BlxY5T0q.js";
24
- import { t as canonicalJson } from "./canonical-json-DwilZ1iB.js";
25
25
  import { a as versionOf, i as tokenPayload, n as decisionToken } from "./token-DaMnIU9O.js";
26
26
  import { n as toWireDelegation } from "./wire-delegation-Cv3W2eaM.js";
27
27
  import { n as internalsOf } from "./internals-B3IgHrvo.js";
28
- import { i as grantList, n as declaredRoleNames, s as levelCondition } from "./policy-BovcTojN.js";
28
+ import { i as grantList, n as declaredRoleNames, s as levelCondition } from "./policy-DnNOTENd.js";
29
29
  import { i as rootMembershipId } from "./subject-C7RddW0G.js";
30
30
  import { n as resolveRelated } from "./relation-walk-BDTaTKTM.js";
31
31
  import { t as eventInstant } from "./event-time-BGy48400.js";
@@ -1,6 +1,6 @@
1
- import { D as Policy } from "./policy-types-CCBrL7me.js";
2
- import { a as PermDock } from "./permdock-vD3mwLSm.js";
3
- import { m as ApprovalStore } from "./types-CAp7UGiB.js";
1
+ import { D as Policy } from "./policy-types-DU389Elz.js";
2
+ import { a as PermDock } from "./permdock-DV3opaI3.js";
3
+ import { m as ApprovalStore } from "./types-X40XNxRP.js";
4
4
  //#region src/server/evaluations.d.ts
5
5
  /** AuthZEN 1.0 section 7.1.2.1 `options.evaluations_semantic` values. */
6
6
  declare const EVALUATIONS_SEMANTICS: readonly ["execute_all", "deny_on_first_deny", "permit_on_first_permit"];
@@ -0,0 +1,2 @@
1
+ export { t as buildInstance } from "./from-snapshot-FdVXG_QZ.js";
2
+ import "./evaluator-BvRk9kiK.js";
@@ -1,4 +1,4 @@
1
- import { t as fromSnapshot } from "./from-snapshot-CdGYjHUg.js";
1
+ import { t as fromSnapshot } from "./from-snapshot-FdVXG_QZ.js";
2
2
  //#region src/client/evaluator-eager.ts
3
3
  /** The evaluator in the entry itself, for adapters that render without Suspense. */
4
4
  const eagerEvaluator = {
@@ -1,8 +1,8 @@
1
- import { D as Policy, N as PolicyVocabulary, yr as Principal } from "../policy-types-CCBrL7me.js";
1
+ import { D as Policy, N as PolicyVocabulary, br as Principal } from "../policy-types-DU389Elz.js";
2
2
  import { w as Permission } from "../vocabulary-DeZvUaTw.js";
3
- import { a as PermDock } from "../permdock-vD3mwLSm.js";
4
- import { u as ApprovalRequest } from "../types-CAp7UGiB.js";
5
- import { o as AgentAdapterOptions, t as AgentPermDock } from "../create-ChK8bpCK.js";
3
+ import { a as PermDock } from "../permdock-DV3opaI3.js";
4
+ import { u as ApprovalRequest } from "../types-X40XNxRP.js";
5
+ import { o as AgentAdapterOptions, t as AgentPermDock } from "../create-C5IQw_-i.js";
6
6
  //#region src/eve/create.d.ts
7
7
  /** Structural `SessionAuthContext` from `eve`. */
8
8
  type EvePrincipal = {
package/dist/eve/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { t as compact } from "../compact-CAf557ZB.js";
2
- import { r as withApp } from "../app-DIvM65Mv.js";
2
+ import { r as withApp } from "../app-J9PE1LNm.js";
3
3
  import { c as isApprovalError } from "../types-CcUXciSj.js";
4
4
  import { o as resolveApproval } from "../helpers-CO2hDpBU.js";
5
- import { t as agentRuntime } from "../create-bYkJ4-tg.js";
5
+ import { t as agentRuntime } from "../create-DaddhCIg.js";
6
6
  import { t as boundedMap } from "../lru-8q4WZjBV.js";
7
7
  //#region src/eve/create.ts
8
8
  const TOKENS_PER_PROCESS = 1e3;
@@ -1,8 +1,8 @@
1
- import { D as Policy, N as PolicyVocabulary, yr as Principal } from "../policy-types-CCBrL7me.js";
1
+ import { D as Policy, N as PolicyVocabulary, br as Principal } from "../policy-types-DU389Elz.js";
2
2
  import { w as Permission } from "../vocabulary-DeZvUaTw.js";
3
- import { a as PermDock } from "../permdock-vD3mwLSm.js";
4
- import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-CtJSDhOv.js";
5
- import { t as ServerAdapterOptions } from "../bind-N5jf6kjk.js";
3
+ import { a as PermDock } from "../permdock-DV3opaI3.js";
4
+ import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-C4q8_8MM.js";
5
+ import { t as ServerAdapterOptions } from "../bind-CTj4dHc1.js";
6
6
  import { i as toRequest, r as sendResponse } from "../http-B_LphE5Y.js";
7
7
  import { ErrorRequestHandler, Request, RequestHandler, Response, Router } from "express";
8
8
  //#region src/express/create.d.ts
@@ -1,6 +1,6 @@
1
1
  import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-Bj5xw0EM.js";
2
2
  import { r as hasCredentials } from "../http-DKLXrFGk.js";
3
- import { i as decorate, r as bindKernel } from "../bind-Cx10JuJ-.js";
3
+ import { i as decorate, r as bindKernel } from "../bind-LQ6zbARV.js";
4
4
  import { t as problemFromError } from "../map-error-BCdb2Nrp.js";
5
5
  import { n as sendResponse, r as toRequest } from "../http-DH94eh6f.js";
6
6
  import express from "express";
@@ -1,8 +1,8 @@
1
- import { D as Policy, N as PolicyVocabulary, yr as Principal } from "../policy-types-CCBrL7me.js";
1
+ import { D as Policy, N as PolicyVocabulary, br as Principal } from "../policy-types-DU389Elz.js";
2
2
  import { w as Permission } from "../vocabulary-DeZvUaTw.js";
3
- import { a as PermDock } from "../permdock-vD3mwLSm.js";
4
- import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-CtJSDhOv.js";
5
- import { t as ServerAdapterOptions } from "../bind-N5jf6kjk.js";
3
+ import { a as PermDock } from "../permdock-DV3opaI3.js";
4
+ import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-C4q8_8MM.js";
5
+ import { t as ServerAdapterOptions } from "../bind-CTj4dHc1.js";
6
6
  import { FastifyPluginAsync, FastifyReply, FastifyRequest, FastifySchema, FastifyTypeProvider, FastifyTypeProviderDefault, RawRequestDefaultExpression, RawServerDefault, RouteGenericInterface } from "fastify";
7
7
  //#region src/server/http.d.ts
8
8
  /** A Fastify-style reply: `code`, `header` and `send`. */
@@ -1,6 +1,6 @@
1
1
  import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-Bj5xw0EM.js";
2
2
  import { c as writeReply, i as headersFrom, n as firstHeader, r as hasCredentials, t as fetchRequest } from "../http-DKLXrFGk.js";
3
- import { i as decorate, r as bindKernel } from "../bind-Cx10JuJ-.js";
3
+ import { i as decorate, r as bindKernel } from "../bind-LQ6zbARV.js";
4
4
  import { t as problemFromError } from "../map-error-BCdb2Nrp.js";
5
5
  //#region src/fastify/http.ts
6
6
  function toRequest(request) {
@@ -1,8 +1,8 @@
1
1
  import { w as Permission } from "./vocabulary-DeZvUaTw.js";
2
2
  import { a as OperationInput, t as Operation } from "./operations-BMPx7HyO.js";
3
3
  import { n as RevocationFeed } from "./revocations-BaUXHM1N.js";
4
- import { o as ProtectOptions } from "./server-types-CtJSDhOv.js";
5
- import { t as ServerAdapterOptions } from "./bind-N5jf6kjk.js";
4
+ import { o as ProtectOptions } from "./server-types-C4q8_8MM.js";
5
+ import { t as ServerAdapterOptions } from "./bind-CTj4dHc1.js";
6
6
  //#region src/server/fetch-adapter.d.ts
7
7
  /**
8
8
  * What `protect` checks: a permission, an operation from `defineOperations`, or
@@ -2,7 +2,7 @@ import { t as compact } from "./compact-CAf557ZB.js";
2
2
  import { o as isPermission } from "./permission-registry-B8tYxPIt.js";
3
3
  import { o as methodNotAllowed } from "./problem-CPB8kqk7.js";
4
4
  import { r as hasCredentials } from "./http-DKLXrFGk.js";
5
- import { i as decorate, r as bindKernel } from "./bind-Cx10JuJ-.js";
5
+ import { i as decorate, r as bindKernel } from "./bind-LQ6zbARV.js";
6
6
  import { t as problemFromError } from "./map-error-BCdb2Nrp.js";
7
7
  //#region src/server/fetch-adapter.ts
8
8
  /**
@@ -1,6 +1,6 @@
1
1
  import { a as sole } from "./compact-CAf557ZB.js";
2
2
  import { i as configError } from "./errors-BhRkoNS7.js";
3
- import { c as jsonSchemaOf } from "./catalog-doc-BoSOQRXT.js";
3
+ import { c as jsonSchemaOf } from "./catalog-doc-DnQDviXY.js";
4
4
  import { A as quoteQualified, D as qualified, E as helperSchema, O as quoteIdent, _ as subjectClaimJsonSql, k as quoteLiteral, s as signedIn } from "./shared-DfaIWvIJ.js";
5
5
  //#region src/cli/sql/clauses.ts
6
6
  /**
@@ -227,13 +227,19 @@ grant execute on function ${fn}() to authenticated;
227
227
  `;
228
228
  }
229
229
  /**
230
+ * The call a generated read-only actor policy makes: one `InitPlan` per
231
+ * statement.
232
+ */
233
+ function actorMayWriteCall(ctx) {
234
+ return `(select ${qualified(ctx, ACTOR_MAY_WRITE)}())`;
235
+ }
236
+ /**
230
237
  * One restrictive policy per table and write command the allow policies grant
231
- * to `authenticated`: the write passes unless the token's `act` claim (`act`,
232
- * as SQL `jsonb`) is a session of one of `kinds` that is not `read_only:
233
- * false`. Reads are never touched.
238
+ * to `authenticated`. `passes` is the guard expression, in generated SQL
239
+ * {@link actorMayWriteCall}; the function {@link actorMayWriteSql} writes must
240
+ * come before these policies. Reads are never touched.
234
241
  */
235
- function readOnlyActorPolicies(policies, act, kinds) {
236
- const passes = readOnlyActorPasses(act, kinds);
242
+ function readOnlyActorPolicies(policies, passes) {
237
243
  const seen = /* @__PURE__ */ new Set();
238
244
  const out = [];
239
245
  for (const policy of policies) {
@@ -495,4 +501,4 @@ function fieldViewsSql(views) {
495
501
  }).join("\n\n");
496
502
  }
497
503
  //#endregion
498
- export { wrapSql as _, fieldViewsSql as a, ACTOR_MAY_WRITE as c, orSql as d, readOnlyActorKinds as f, validitySql as g, branchClauses as h, fieldViews as i, actorMayWriteSql as l, andSql as m, columnGrantSql as n, rowBranches as o, readOnlyActorPolicies as p, columnRevokeSql as r, viewName as s, FIELD_VIEWS as t, assemblePolicies as u };
504
+ export { validitySql as _, fieldViewsSql as a, ACTOR_MAY_WRITE as c, assemblePolicies as d, orSql as f, branchClauses as g, andSql as h, fieldViews as i, actorMayWriteCall as l, readOnlyActorPolicies as m, columnGrantSql as n, rowBranches as o, readOnlyActorKinds as p, columnRevokeSql as r, viewName as s, FIELD_VIEWS as t, actorMayWriteSql as u, wrapSql as v };