permdock 0.8.0 → 0.9.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 (258) hide show
  1. package/dist/a2a/index.d.ts +4 -4
  2. package/dist/a2a/index.js +3 -3
  3. package/dist/{action-result-CL-QCITA.d.ts → action-result-BcudBQOF.d.ts} +1 -1
  4. package/dist/{adoption-scan-BLs67P1l.js → adoption-scan-Ch07MdxN.js} +1 -1
  5. package/dist/agent/index.d.ts +2 -2
  6. package/dist/agent/index.js +1 -1
  7. package/dist/ai-sdk/index.d.ts +3 -3
  8. package/dist/ai-sdk/index.js +3 -3
  9. package/dist/{approval-prompt-PYagyQUj.d.ts → approval-prompt-3BqWczTt.d.ts} +1 -1
  10. package/dist/approvals/index.d.ts +3 -3
  11. package/dist/{arazzo-3RhGfkAK.js → arazzo-BpS7LnV0.js} +1 -1
  12. package/dist/{arazzo-B5-ulWif.js → arazzo-CmQaGPkM.js} +2 -2
  13. package/dist/astro/index.d.ts +4 -4
  14. package/dist/astro/index.js +1 -1
  15. package/dist/{audience-BAkBDMqn.js → audience-DTjR8xet.js} +1 -1
  16. package/dist/authzen/index.d.ts +5 -5
  17. package/dist/authzen/index.js +1 -1
  18. package/dist/{automation-DqEoWHBc.d.ts → automation-C6Jg75xq.d.ts} +1 -1
  19. package/dist/better-auth/index.d.ts +1 -1
  20. package/dist/better-supabase/index.d.ts +6 -6
  21. package/dist/better-supabase/index.js +3 -3
  22. package/dist/{bind-D_sZSVA3.js → bind-BNQA9JK9.js} +7 -3
  23. package/dist/{bind-Cp2hBHzP.d.ts → bind-YYjvfpB9.d.ts} +12 -7
  24. package/dist/{build-instance-CNWaYJyr.js → build-instance-BWXqwQYU.js} +1 -1
  25. package/dist/{capability-ChuiONQU.d.ts → capability-Di9tiUvi.d.ts} +1 -1
  26. package/dist/{casbin-cbSbhT_k.js → casbin-B7_yS-oo.js} +1 -1
  27. package/dist/{casbin-H0rKxBx2.js → casbin-bHyIxTNQ.js} +1 -1
  28. package/dist/catalog/index.d.ts +4 -4
  29. package/dist/catalog/index.js +2 -2
  30. package/dist/{catalog-BFpz2EmT.js → catalog-CGlSwU6j.js} +2 -2
  31. package/dist/catalog-D3oS2GH3.js +1 -0
  32. package/dist/{catalog-DCspHDc8.js → catalog-amPDr0JQ.js} +1 -1
  33. package/dist/{catalog-operations-Dadrl7Z-.js → catalog-operations-DeHTrJSV.js} +1 -1
  34. package/dist/chat/index.d.ts +1 -1
  35. package/dist/chat/index.js +1 -1
  36. package/dist/chat-sdk/index.d.ts +3 -3
  37. package/dist/claude-agent/index.d.ts +3 -3
  38. package/dist/claude-agent/index.js +2 -2
  39. package/dist/clerk/index.d.ts +2 -2
  40. package/dist/cli/bin.js +1 -1
  41. package/dist/cli/index.d.ts +4 -4
  42. package/dist/cli/index.js +2 -2
  43. package/dist/cloud/index.d.ts +8 -8
  44. package/dist/{cloud-BFlGMaak.js → cloud-3kWfjnYy.js} +2 -2
  45. package/dist/{codemod-DWSN2erG.js → codemod-Bv5i-Mzo.js} +1 -1
  46. package/dist/{codemod-DLQ9Zpo4.js → codemod-D9Aiii1r.js} +2 -2
  47. package/dist/{collect-Bzv3le0A.js → collect-B80GYEot.js} +2 -2
  48. package/dist/collect-D-eroIfV.js +1 -0
  49. package/dist/{collect-B7ZFAJU3.js → collect-WCl8cJQV.js} +1 -1
  50. package/dist/compile/index.d.ts +1 -1
  51. package/dist/{compile-BFzysW3o.d.ts → compile-BEklRUYo.d.ts} +2 -2
  52. package/dist/{completion-saoYiRFO.js → completion-_bc0OUQ-.js} +1 -1
  53. package/dist/{config-DBeXXmBF.js → config-D5XrLWpk.js} +1 -1
  54. package/dist/{config-report-BipSWA6V.js → config-report-BmWIskD7.js} +2 -2
  55. package/dist/convex/index.d.ts +4 -4
  56. package/dist/convex/index.js +2 -2
  57. package/dist/{core-hWIARPDz.d.ts → core-CFepFiDP.d.ts} +2 -2
  58. package/dist/{core-H-mbhpZc.js → core-DzVINFbU.js} +3 -3
  59. package/dist/{create-Cq4Uox0f.js → create-6EwRQlig.js} +3 -3
  60. package/dist/{create-_noSrY1T.js → create-BLPKnJKa.js} +23 -7
  61. package/dist/{create-BSNrVuxh.d.ts → create-BPUopdfL.d.ts} +7 -7
  62. package/dist/{create-CM1FciYG.d.ts → create-BamXmeob.d.ts} +6 -6
  63. package/dist/{create-BVq1lNQE.d.ts → create-DBvUsgzK.d.ts} +4 -4
  64. package/dist/delivery/index.d.ts +4 -4
  65. package/dist/delivery/index.js +1 -1
  66. package/dist/{denied-text-CHNlVInN.d.ts → denied-text-DHldhVUv.d.ts} +1 -1
  67. package/dist/{describe-ByS9LgHK.d.ts → describe-BbFPBSms.d.ts} +1 -1
  68. package/dist/{diff-CN8IYhC_.js → diff-BwR1JdP2.js} +1 -1
  69. package/dist/{diff-iZWV65nC.js → diff-CQegtBAo.js} +2 -2
  70. package/dist/{doctor-CHD1M9R5.js → doctor-ClRVAtXQ.js} +13 -13
  71. package/dist/{doctor-D3wo-yuz.js → doctor-LPMYjSqO.js} +2 -2
  72. package/dist/drizzle/index.d.ts +3 -3
  73. package/dist/elysia/index.d.ts +4 -4
  74. package/dist/elysia/index.js +1 -1
  75. package/dist/{errors-zi_4T-rx.d.ts → errors-BIM4MFsJ.d.ts} +1 -1
  76. package/dist/{evaluate-Dd8Ta0Ie.js → evaluate-BAmf_AQd.js} +13 -4
  77. package/dist/{evaluations-z8dQFDaN.d.ts → evaluations-DOWuBpWv.d.ts} +3 -3
  78. package/dist/eve/index.d.ts +4 -4
  79. package/dist/eve/index.js +2 -2
  80. package/dist/express/index.d.ts +4 -4
  81. package/dist/express/index.js +1 -1
  82. package/dist/fastify/index.d.ts +4 -4
  83. package/dist/fastify/index.js +1 -1
  84. package/dist/{fetch-adapter-C1DCvpqV.d.ts → fetch-adapter-BIbBAtPZ.d.ts} +2 -2
  85. package/dist/{fetch-adapter-JL43jD3E.js → fetch-adapter-dPTgJVHd.js} +1 -1
  86. package/dist/{gen-B5kvbAoZ.js → gen-BFfzZSLH.js} +1 -1
  87. package/dist/{gen-DWCYcMQM.js → gen-BtfFWGbz.js} +2 -2
  88. package/dist/h3/index.d.ts +4 -4
  89. package/dist/h3/index.js +2 -2
  90. package/dist/hono/index.d.ts +4 -4
  91. package/dist/hono/index.js +1 -1
  92. package/dist/{hosted-Cmtxogd0.d.ts → hosted-DVxlLZMe.d.ts} +1 -1
  93. package/dist/{import-_YqhhwvX.js → import-ACkOrv6g.js} +1 -1
  94. package/dist/{index-BhxEUY9J.d.ts → index-BinlXeU-.d.ts} +2 -2
  95. package/dist/{index-B8s204GL.d.ts → index-CV-7DWeD.d.ts} +4 -4
  96. package/dist/{index-_9UiQIkt.d.ts → index-DJwEgYzA.d.ts} +4 -4
  97. package/dist/{index-BT5-1VsX.d.ts → index-Dj2qF9VC.d.ts} +1 -1
  98. package/dist/{index-BW_0MZOS.d.ts → index-vYjMrXyK.d.ts} +62 -9
  99. package/dist/{index-Bv5iXPqU.d.ts → index-ymept53A.d.ts} +4 -4
  100. package/dist/index.d.ts +15 -15
  101. package/dist/index.js +6 -6
  102. package/dist/{init-cE3A8aXq.js → init-BjuFDYT1.js} +1 -1
  103. package/dist/{init-Dz_PsHdv.js → init-txYTuW9u.js} +3 -3
  104. package/dist/{instance-options-B0KXqTrJ.d.ts → instance-options-CoHn-0e8.d.ts} +1 -1
  105. package/dist/{instance-snapshot--JWiTrvO.js → instance-snapshot-DuWf1cT3.js} +13 -8
  106. package/dist/jwt/index.d.ts +4 -4
  107. package/dist/jwt/index.js +1 -1
  108. package/dist/{kernel-C-fYydV2.js → kernel-qv4cr9w8.js} +4 -4
  109. package/dist/kysely/index.d.ts +3 -3
  110. package/dist/{login-D-8tMqzo.js → login-CfImTJGb.js} +3 -3
  111. package/dist/{login-DplQ0s84.js → login-CgfCTO3F.js} +1 -1
  112. package/dist/{manifest-Cgiq5oqc.js → manifest-B2QPh19C.js} +35 -35
  113. package/dist/{map-claims-BNWCJtmP.js → map-claims-C-nv08_n.js} +2 -1
  114. package/dist/mcp/index.d.ts +8 -8
  115. package/dist/mcp/index.js +4 -4
  116. package/dist/nest/index.d.ts +4 -4
  117. package/dist/nest/index.js +1 -1
  118. package/dist/next/index.d.ts +16 -9
  119. package/dist/next/index.js +14 -7
  120. package/dist/next/plugin.d.ts +1 -1
  121. package/dist/next/plugin.js +1 -1
  122. package/dist/node/index.d.ts +4 -4
  123. package/dist/node/index.js +1 -1
  124. package/dist/openai/index.d.ts +4 -4
  125. package/dist/openai/index.js +3 -3
  126. package/dist/openapi/index.d.ts +2 -2
  127. package/dist/{openapi-VeHHU2l9.js → openapi-BGeuunWC.js} +1 -1
  128. package/dist/{openapi-CBZUhA3l.js → openapi-BIpw3Mb7.js} +2 -2
  129. package/dist/orpc/index.d.ts +5 -5
  130. package/dist/orpc/index.js +2 -2
  131. package/dist/otel/index.d.ts +3 -3
  132. package/dist/{output-tkju6U7R.js → output-DV5dwOTs.js} +1 -1
  133. package/dist/{ownership-B4L59T9u.js → ownership-DA5YdYTm.js} +9 -4
  134. package/dist/{parse-local-manifest-BQhTlLQS.d.ts → parse-local-manifest-CCmbhnxP.d.ts} +1 -1
  135. package/dist/pdp/index.d.ts +3 -3
  136. package/dist/pdp/index.js +1 -1
  137. package/dist/{permdock-L-_I_3zP.js → permdock-BvjivVb9.js} +143 -107
  138. package/dist/{permdock-B6Sf4T_S.d.ts → permdock-CprAPN3w.d.ts} +9 -2
  139. package/dist/{permissions-mDcTWoBs.js → permissions-CYcHj_w7.js} +1 -1
  140. package/dist/{policy-Ba4bDhaj.d.ts → policy-BycVKnXv.d.ts} +1 -1
  141. package/dist/{policy-from-catalog-CJgOm6aq.js → policy-from-catalog-CU3An8uP.js} +1 -1
  142. package/dist/{policy-types-CCiDRZBH.d.ts → policy-types-DGIO_gxq.d.ts} +54 -18
  143. package/dist/{postgrest-D4nuPXIQ.js → postgrest-5Dr3W64L.js} +34 -55
  144. package/dist/{postgrest-DicQyqm-.d.ts → postgrest-D5nUGm-c.d.ts} +4 -3
  145. package/dist/powersync-B701tvhE.js +1 -0
  146. package/dist/{powersync-DXqGuq9A.js → powersync-Bg8u-JcR.js} +2 -2
  147. package/dist/{powersync-DHNQX06W.js → powersync-CJrT1DSc.js} +5 -5
  148. package/dist/prisma/index.d.ts +2 -2
  149. package/dist/{protected-action-BE7N_Luo.d.ts → protected-action-D8x73IGm.d.ts} +6 -6
  150. package/dist/{provider-DXfq5c2d.d.ts → provider-DfLeek9O.d.ts} +1 -1
  151. package/dist/{pull-CwpGaQSi.js → pull-2nJr0qg_.js} +1 -1
  152. package/dist/pull-C3EEGzSw.js +1 -0
  153. package/dist/{push-DgssgzkK.js → push-Bn-lMEmI.js} +2 -2
  154. package/dist/{pushed-policy-ITwYKvvH.js → pushed-policy-CDuOL2de.js} +1 -1
  155. package/dist/{pushed-policy-D1Eoi6NM.d.ts → pushed-policy-CryQheKq.d.ts} +1 -1
  156. package/dist/react/index.d.ts +7 -7
  157. package/dist/react/provider-client.d.ts +1 -1
  158. package/dist/react-native/index.d.ts +9 -9
  159. package/dist/{replay-DNftIb_R.d.ts → replay-Bs9Df2fQ.d.ts} +1 -1
  160. package/dist/{request-context-C25ilqiJ.js → request-context-Duzdf0cd.js} +1 -1
  161. package/dist/resend/index.d.ts +4 -4
  162. package/dist/{resolve-names-CF7xXLSG.js → resolve-names-ConCSj1y.js} +1 -1
  163. package/dist/{rls-Ca8Jz9b5.js → rls-Ba9wN0SP.js} +1 -1
  164. package/dist/{rls-CNEH2_BG.js → rls-Cx0dtsB7.js} +20 -13
  165. package/dist/{rpc-fNqAIqQk.js → rpc-vHIwyXCp.js} +1 -1
  166. package/dist/run-Ck22anC2.js +1 -0
  167. package/dist/{run-Bz26OTfO.js → run-PbRlXTfh.js} +2 -2
  168. package/dist/{run-ticket-DbWI9f99.d.ts → run-ticket-B2o2Kxz8.d.ts} +2 -2
  169. package/dist/{saas-iWnUdwCt.js → saas-DK4V-3Is.js} +2 -2
  170. package/dist/{scan-DCj1KQfn.js → scan-CRTj6fke.js} +1 -1
  171. package/dist/{schema-Dst9I9Gs.js → schema-BTsE1WRT.js} +1 -1
  172. package/dist/scim/index.d.ts +1 -1
  173. package/dist/server/index.d.ts +10 -10
  174. package/dist/server/index.js +1 -1
  175. package/dist/{server-types-CIlpSA2G.d.ts → server-types-CyRN0-Cd.d.ts} +15 -8
  176. package/dist/{sink-Dvi7YZG_.d.ts → sink-B5zoUW_O.d.ts} +2 -2
  177. package/dist/{skills-OuoMR49L.js → skills-C9uKfSF5.js} +1 -1
  178. package/dist/{skills-Bjj7BNEQ.js → skills-CQQcuGBi.js} +1 -1
  179. package/dist/{snapshot-cache-BAXZ0KOp.d.ts → snapshot-cache-BjAWkchD.d.ts} +1 -1
  180. package/dist/solid/index.d.ts +6 -6
  181. package/dist/solid-start/index.d.ts +4 -4
  182. package/dist/solid-start/index.js +2 -2
  183. package/dist/{sources-B1Os_YUu.d.ts → sources-CWG32C0G.d.ts} +2 -2
  184. package/dist/{src-DZ0l9UAg.js → src-C_pi2Rnh.js} +106 -5
  185. package/dist/ssf/index.d.ts +3 -3
  186. package/dist/{standard-webhooks-C-qX4mJW.d.ts → standard-webhooks-DOYEuOLx.d.ts} +2 -2
  187. package/dist/{stores-C0Kta5Ft.d.ts → stores-DZJvxFIZ.d.ts} +6 -6
  188. package/dist/{stream-ltuLdtTG.d.ts → stream-9y9qw51m.d.ts} +1 -1
  189. package/dist/supabase/index.d.ts +5 -5
  190. package/dist/supabase/index.js +2 -2
  191. package/dist/supabase/middleware.d.ts +5 -5
  192. package/dist/supabase/middleware.js +4 -4
  193. package/dist/{supabase-BL1qJzzY.js → supabase-DnMMg5Fn.js} +1 -1
  194. package/dist/{supabase-D39cuGPt.js → supabase-SBs3MYUE.js} +2 -2
  195. package/dist/supabase-hook-C0FyEACZ.js +1 -0
  196. package/dist/{supabase-hook-B-yXnzUl.js → supabase-hook-CrgU06WH.js} +5 -5
  197. package/dist/{supautils-BU-pAEpf.js → supautils-ByezN3b8.js} +244 -197
  198. package/dist/svelte/index.d.ts +6 -6
  199. package/dist/svelte/runtime.d.ts +3 -3
  200. package/dist/svelte/source.d.ts +6 -6
  201. package/dist/sveltekit/index.d.ts +4 -4
  202. package/dist/sveltekit/index.js +1 -1
  203. package/dist/{tables-DeMNEy6V.js → tables-BqrxBCir.js} +1 -1
  204. package/dist/tanstack-start/index.d.ts +4 -4
  205. package/dist/tanstack-start/index.js +1 -1
  206. package/dist/terminal/index.d.ts +5 -5
  207. package/dist/terminal/index.js +2 -2
  208. package/dist/testing/core.d.ts +1 -1
  209. package/dist/testing/core.js +1 -1
  210. package/dist/testing/index.d.ts +21 -20
  211. package/dist/testing/index.js +61 -8
  212. package/dist/testing/saas/index.d.ts +3 -3
  213. package/dist/testing/saas/index.js +2 -2
  214. package/dist/testing/saas/permissions.js +1 -1
  215. package/dist/trpc/index.d.ts +5 -5
  216. package/dist/trpc/index.js +2 -2
  217. package/dist/{type-helpers-BIPIDa6a.d.ts → type-helpers-c7Xo_2Cu.d.ts} +1 -1
  218. package/dist/{types-B2mlGuhW.d.ts → types-B2efzoSX.d.ts} +1 -1
  219. package/dist/{types-DHKPcqzr.d.ts → types-B6ExllNo.d.ts} +2 -2
  220. package/dist/{types-AMJ5qoU_.d.ts → types-BB-zWDcR.d.ts} +4 -4
  221. package/dist/{types-ah9NlU6j.d.ts → types-BMVDHvI0.d.ts} +1 -1
  222. package/dist/{types-djVzLlIV.d.ts → types-CEinc15V.d.ts} +4 -4
  223. package/dist/{types-yUuPR5Hy.d.ts → types-CN0LsqbK.d.ts} +3 -3
  224. package/dist/{types-HzqOtvsJ.d.ts → types-CWBsAwqn.d.ts} +4 -4
  225. package/dist/{types-DC1Loeh3.d.ts → types-CzOeVvcC.d.ts} +5 -3
  226. package/dist/{types-B_tiYvk8.d.ts → types-DLvhVm1r.d.ts} +1 -1
  227. package/dist/{types-B4uqKDnp.d.ts → types-DlelvQk4.d.ts} +2 -2
  228. package/dist/{types-DjuMBNF9.d.ts → types-DsHGPtkR.d.ts} +2 -2
  229. package/dist/{types-BJk0BKRX.d.ts → types-rCRV4Ge-.d.ts} +4 -4
  230. package/dist/{types-B_d_g7T3.d.ts → types-tQB2CEnY.d.ts} +4 -4
  231. package/dist/unplugin/index.d.ts +1 -1
  232. package/dist/unplugin/index.js +1 -1
  233. package/dist/usage-0hjZPIRX.js +1 -0
  234. package/dist/{usage-CxEzS4ey.js → usage-B9EtHWLa.js} +3 -3
  235. package/dist/{usage-ab0PdusX.js → usage-CBzgwfIs.js} +1 -1
  236. package/dist/{validation-error-YGg2mXyH.d.ts → validation-error-uvp-kyfO.d.ts} +1 -1
  237. package/dist/{verify-DZeqoWu5.js → verify-DlUcTDBz.js} +6 -6
  238. package/dist/vue/index.d.ts +6 -6
  239. package/dist/{waiter-Bu9zAlE0.d.ts → waiter-CqUKX6CY.d.ts} +2 -2
  240. package/dist/{watch-Cx_WciLE.js → watch-BFDKqmUa.js} +1 -1
  241. package/dist/watch-ClLuO2TL.js +1 -0
  242. package/dist/webmcp/index.d.ts +1 -1
  243. package/dist/{who-can-rI7dCR9Q.js → who-can-BoDJm0Nc.js} +1 -1
  244. package/dist/workflow/index.d.ts +3 -3
  245. package/dist/workflow/index.js +1 -1
  246. package/dist/workflow-sdk/index.d.ts +4 -4
  247. package/dist/{wrap-DlJE3gS_.d.ts → wrap-DxXB54Wu.d.ts} +2 -2
  248. package/package.json +2 -2
  249. package/skills/permdock-data/references/queries-and-rls.md +1 -1
  250. package/skills/permdock-wire/references/adapters.md +2 -1
  251. package/dist/catalog-mRQQQhNK.js +0 -1
  252. package/dist/collect-B5BL3klN.js +0 -1
  253. package/dist/powersync-Djf-zCpB.js +0 -1
  254. package/dist/pull-B65ndFNZ.js +0 -1
  255. package/dist/run-D-JE8QWb.js +0 -1
  256. package/dist/supabase-hook-H-MtE9Wd.js +0 -1
  257. package/dist/usage-CYeXek0p.js +0 -1
  258. package/dist/watch-DB42U1ib.js +0 -1
@@ -4,14 +4,14 @@ import { n as describe } from "./describe-Bb4hGK5d.js";
4
4
  import { a as deniedMessage } from "./errors-B6R_lg2a.js";
5
5
  import { t as actorMayCallTool } from "./delegation-CDB6_keF.js";
6
6
  import { c as nowSeconds, r as isMembershipExpired } from "./tenancy-5d1zVBvK.js";
7
- import { k as activate } from "./evaluate-Dd8Ta0Ie.js";
7
+ import { k as activate } from "./evaluate-BAmf_AQd.js";
8
8
  import { n as resourceRef } from "./resource-ref-CaS9yVPi.js";
9
9
  import { n as delegationAllows } from "./where-scope-DlCdCM_8.js";
10
- import { l as withApp } from "./permdock-L-_I_3zP.js";
10
+ import { l as withApp } from "./permdock-BvjivVb9.js";
11
11
  import { l as storedApprovalToken, s as resumeDecision } from "./helpers-DJicaG6f.js";
12
- import { n as resolveOrNull } from "./build-instance-CNWaYJyr.js";
12
+ import { n as resolveOrNull } from "./build-instance-BWXqwQYU.js";
13
13
  import { n as tenantScope, t as actorFrom } from "./adapter-context-CIQpQxbE.js";
14
- import { n as requestContext, t as buildReportingInstance } from "./request-context-C25ilqiJ.js";
14
+ import { n as requestContext, t as buildReportingInstance } from "./request-context-Duzdf0cd.js";
15
15
  //#region src/agent/denied-text.ts
16
16
  /**
17
17
  * The hook's text, or `event.text` when there is no hook or it throws or
@@ -1,7 +1,7 @@
1
- import { Rt as Instant, lr as Subject, mr as Condition } from "../policy-types-CCiDRZBH.js";
2
- import { f as WhereResult } from "../permdock-B6Sf4T_S.js";
1
+ import { Wt as Instant, br as Condition, hr as Subject } from "../policy-types-DGIO_gxq.js";
2
+ import { f as WhereResult } from "../permdock-CprAPN3w.js";
3
3
  import { r as RelationsMapping } from "../graph-sql-BwFC4Qjs.js";
4
- import { s as MembershipsMapping } from "../compile-BFzysW3o.js";
4
+ import { s as MembershipsMapping } from "../compile-BEklRUYo.js";
5
5
  import { n as RowCheck, t as WithSubjectOptions } from "../subject-settings-vNW8qmUH.js";
6
6
  //#region src/kysely/types.d.ts
7
7
  type KyselySelectQuery = {
@@ -27,7 +27,7 @@ const login = defineLeaf({
27
27
  }
28
28
  },
29
29
  async run(ctx, { flags }) {
30
- const { runLogin } = await import("./login-DplQ0s84.js");
30
+ const { runLogin } = await import("./login-CgfCTO3F.js");
31
31
  return runLogin({
32
32
  cwd: ctx.cwd,
33
33
  url: given(flags.url),
@@ -43,7 +43,7 @@ const login = defineLeaf({
43
43
  const logout = defineLeaf({
44
44
  flags: { ...urlFlag },
45
45
  async run(ctx, { flags }) {
46
- const { runLogout } = await import("./login-DplQ0s84.js");
46
+ const { runLogout } = await import("./login-CgfCTO3F.js");
47
47
  return runLogout({
48
48
  url: given(flags.url),
49
49
  json: ctx.json,
@@ -55,7 +55,7 @@ const logout = defineLeaf({
55
55
  const whoami = defineLeaf({
56
56
  flags: { ...urlFlag },
57
57
  async run(ctx, { flags }) {
58
- const { runWhoami } = await import("./login-DplQ0s84.js");
58
+ const { runWhoami } = await import("./login-CgfCTO3F.js");
59
59
  return runWhoami({
60
60
  url: given(flags.url),
61
61
  json: ctx.json,
@@ -3,7 +3,7 @@ import { n as CliError } from "./errors-Vpu6rKHl.js";
3
3
  import { i as postForm, r as parseToken, s as runDeviceFlow } from "./device-BwbJNmb2.js";
4
4
  import { i as writeCredentials, n as deleteCredentials, r as readCredentials, t as credentialsPath } from "./storage-C2bWdvJH.js";
5
5
  import { n as randomToken, t as pkce } from "./pkce-CnmmYqUZ.js";
6
- import { a as nonEmptyOr } from "./output-tkju6U7R.js";
6
+ import { a as nonEmptyOr } from "./output-DV5dwOTs.js";
7
7
  import { n as httpRequest } from "./http-DOL33cO0.js";
8
8
  import { c as READ_SCOPES, d as issuerMetadata, i as credentialsInsideRepository, l as cloudUrl, n as cliRuntime, r as credentialStorage, s as CLI_CLIENT_ID, t as CREDENTIAL_SERVICE } from "./auth--yPyZNgr.js";
9
9
  import { spawn } from "node:child_process";
@@ -30,20 +30,20 @@ const SECTIONS = [
30
30
  docs: "init",
31
31
  effects: ["files"],
32
32
  config: false,
33
- load: async () => (await import("./init-Dz_PsHdv.js")).init
33
+ load: async () => (await import("./init-txYTuW9u.js")).init
34
34
  }),
35
35
  group("preset", "Decode a preset code, or print its permdock.com/create link", "preset", [leaf("decode", "Print what a preset code holds", {
36
36
  examples: ["permdock preset decode p1AQIDBAc"],
37
37
  docs: "preset",
38
38
  effects: [],
39
39
  config: false,
40
- load: async () => (await import("./init-Dz_PsHdv.js")).presetDecode
40
+ load: async () => (await import("./init-txYTuW9u.js")).presetDecode
41
41
  }), leaf("url", "Print the permdock.com/create link that opens a code", {
42
42
  examples: ["permdock preset url p1AQIDBAc"],
43
43
  docs: "preset",
44
44
  effects: [],
45
45
  config: false,
46
- load: async () => (await import("./init-Dz_PsHdv.js")).presetUrl
46
+ load: async () => (await import("./init-txYTuW9u.js")).presetUrl
47
47
  })]),
48
48
  group("skills", "Install, update or list the PermDock Agent Skills", "skills", [
49
49
  leaf("install", "Copy the Agent Skills into the agent folders", {
@@ -55,21 +55,21 @@ const SECTIONS = [
55
55
  docs: "skills",
56
56
  effects: ["files"],
57
57
  config: false,
58
- load: async () => (await import("./skills-OuoMR49L.js")).install
58
+ load: async () => (await import("./skills-C9uKfSF5.js")).install
59
59
  }),
60
60
  leaf("update", "Replace installed skills with this version's", {
61
61
  examples: ["permdock skills update"],
62
62
  docs: "skills",
63
63
  effects: ["files"],
64
64
  config: false,
65
- load: async () => (await import("./skills-OuoMR49L.js")).update
65
+ load: async () => (await import("./skills-C9uKfSF5.js")).update
66
66
  }),
67
67
  leaf("list", "List the skills and where each is installed", {
68
68
  examples: ["permdock skills list"],
69
69
  docs: "skills",
70
70
  effects: [],
71
71
  config: false,
72
- load: async () => (await import("./skills-OuoMR49L.js")).list
72
+ load: async () => (await import("./skills-C9uKfSF5.js")).list
73
73
  })
74
74
  ]),
75
75
  leaf("doctor", "Check a PermDock installation and print a fix for each finding", {
@@ -82,7 +82,7 @@ const SECTIONS = [
82
82
  effects: ["files"],
83
83
  config: true,
84
84
  findings: true,
85
- load: async () => (await import("./doctor-D3wo-yuz.js")).doctor
85
+ load: async () => (await import("./doctor-LPMYjSqO.js")).doctor
86
86
  }),
87
87
  leaf("completion", "Print the shell completion script for bash, zsh or fish", {
88
88
  examples: ["permdock completion zsh > ~/.zfunc/_permdock", "eval \"$(permdock completion bash)\""],
@@ -90,7 +90,7 @@ const SECTIONS = [
90
90
  effects: [],
91
91
  config: false,
92
92
  shellOutput: true,
93
- load: async () => (await import("./completion-saoYiRFO.js")).completion
93
+ load: async () => (await import("./completion-_bc0OUQ-.js")).completion
94
94
  })
95
95
  ]
96
96
  },
@@ -106,14 +106,14 @@ const SECTIONS = [
106
106
  docs: "collect",
107
107
  effects: ["files"],
108
108
  config: true,
109
- load: async () => (await import("./collect-Bzv3le0A.js")).collect
109
+ load: async () => (await import("./collect-B80GYEot.js")).collect
110
110
  }),
111
111
  leaf("catalog", "Export the catalog as catalog JSON, JSON Schema or Markdown", {
112
112
  examples: ["permdock catalog --out permissions.catalog.json", "permdock catalog --kind markdown"],
113
113
  docs: "catalog",
114
114
  effects: ["files"],
115
115
  config: true,
116
- load: async () => (await import("./catalog-DCspHDc8.js")).catalog
116
+ load: async () => (await import("./catalog-amPDr0JQ.js")).catalog
117
117
  }),
118
118
  leaf("gen", "Write typed constants, schemas, factories, hooks and messages from the policy", {
119
119
  examples: [
@@ -124,7 +124,7 @@ const SECTIONS = [
124
124
  docs: "gen",
125
125
  effects: ["files"],
126
126
  config: true,
127
- load: async () => (await import("./gen-B5kvbAoZ.js")).gen
127
+ load: async () => (await import("./gen-BFfzZSLH.js")).gen
128
128
  }),
129
129
  leaf("usage", "Report unused, ungranted and role-less permissions and conditions on undeclared fields", {
130
130
  examples: ["permdock usage", "permdock usage --fail-on warning"],
@@ -132,14 +132,14 @@ const SECTIONS = [
132
132
  effects: [],
133
133
  config: true,
134
134
  findings: true,
135
- load: async () => (await import("./usage-ab0PdusX.js")).usage
135
+ load: async () => (await import("./usage-CBzgwfIs.js")).usage
136
136
  }),
137
137
  leaf("diff", "Compare two policies or catalogs; exit 1 on a breaking change", {
138
138
  examples: ["permdock diff main.catalog.json permissions.catalog.json", "permdock diff ./old-policy.ts ./src/policy.ts --impact"],
139
139
  docs: "diff",
140
140
  effects: [],
141
141
  config: true,
142
- load: async () => (await import("./diff-CN8IYhC_.js")).diff
142
+ load: async () => (await import("./diff-BwR1JdP2.js")).diff
143
143
  }),
144
144
  leaf("config", "Check permdock.config.ts for unknown keys, or print the effective config", {
145
145
  examples: ["permdock config", "permdock config --print"],
@@ -147,7 +147,7 @@ const SECTIONS = [
147
147
  effects: [],
148
148
  config: true,
149
149
  findings: true,
150
- load: async () => (await import("./config-DBeXXmBF.js")).config
150
+ load: async () => (await import("./config-D5XrLWpk.js")).config
151
151
  })
152
152
  ]
153
153
  },
@@ -164,14 +164,14 @@ const SECTIONS = [
164
164
  "network"
165
165
  ],
166
166
  config: true,
167
- load: async () => (await import("./rls-Ca8Jz9b5.js")).generate
167
+ load: async () => (await import("./rls-Ba9wN0SP.js")).generate
168
168
  }),
169
169
  leaf("import", "Turn existing RLS policies into a generated definition", {
170
170
  examples: ["permdock rls import --sql schema.sql --out src/permissions.generated.ts", "permdock rls import --db-url-stdin --out src/permissions.generated.ts"],
171
171
  docs: "rls",
172
172
  effects: ["files", "database:read"],
173
173
  config: true,
174
- load: async () => (await import("./rls-Ca8Jz9b5.js")).importPolicies
174
+ load: async () => (await import("./rls-Ba9wN0SP.js")).importPolicies
175
175
  }),
176
176
  leaf("verify", "Run the fixtures against the policies, or compare a live database", {
177
177
  examples: [
@@ -183,21 +183,21 @@ const SECTIONS = [
183
183
  effects: ["files", "database:read"],
184
184
  config: true,
185
185
  findings: true,
186
- load: async () => (await import("./rls-Ca8Jz9b5.js")).verify
186
+ load: async () => (await import("./rls-Ba9wN0SP.js")).verify
187
187
  }),
188
188
  leaf("migrate", "Rewrite hand-written policies onto the generated helpers", {
189
189
  examples: ["permdock rls migrate --sql supabase/migrations --dry-run", "permdock rls migrate --sql supabase/migrations"],
190
190
  docs: "rls",
191
191
  effects: ["rewrite", "files"],
192
192
  config: true,
193
- load: async () => (await import("./rls-Ca8Jz9b5.js")).migrate
193
+ load: async () => (await import("./rls-Ba9wN0SP.js")).migrate
194
194
  }),
195
195
  leaf("explain", "Show the tables, membership sources and triggers the SQL binds to", {
196
196
  examples: ["permdock rls explain", "permdock rls explain --db-url-stdin --json"],
197
197
  docs: "rls",
198
198
  effects: ["database:read"],
199
199
  config: true,
200
- load: async () => (await import("./rls-Ca8Jz9b5.js")).explain
200
+ load: async () => (await import("./rls-Ba9wN0SP.js")).explain
201
201
  })
202
202
  ]),
203
203
  group("supabase", "Generate the Supabase Custom Access Token Hook, or inspect its manifest", "supabase", [group("hook", "The Custom Access Token Hook", "supabase", [leaf("generate", "Compile the membership sources into the hook migration", {
@@ -205,26 +205,26 @@ const SECTIONS = [
205
205
  docs: "supabase",
206
206
  effects: ["files", "database:read"],
207
207
  config: true,
208
- load: async () => (await import("./supabase-D39cuGPt.js")).hookGenerate
208
+ load: async () => (await import("./supabase-SBs3MYUE.js")).hookGenerate
209
209
  })]), leaf("inspect", "Print or write the hook and helper manifest", {
210
210
  examples: ["permdock supabase inspect", "permdock supabase inspect --out"],
211
211
  docs: "supabase",
212
212
  effects: ["files"],
213
213
  config: true,
214
- load: async () => (await import("./supabase-D39cuGPt.js")).inspect
214
+ load: async () => (await import("./supabase-SBs3MYUE.js")).inspect
215
215
  })]),
216
216
  group("powersync", "Generate PowerSync Sync Streams from the policy, or verify them", "powersync", [leaf("generate", "Compile the read grants into sync-config.yaml", {
217
217
  examples: ["permdock powersync generate", "permdock powersync generate --check"],
218
218
  docs: "powersync",
219
219
  effects: ["files"],
220
220
  config: true,
221
- load: async () => (await import("./powersync-DXqGuq9A.js")).generate
221
+ load: async () => (await import("./powersync-Bg8u-JcR.js")).generate
222
222
  }), leaf("verify", "Fail on stale streams or a stream that syncs a denied row", {
223
223
  examples: ["permdock powersync verify", "permdock powersync verify --db-url-stdin"],
224
224
  docs: "powersync",
225
225
  effects: ["database:read"],
226
226
  config: true,
227
- load: async () => (await import("./powersync-DXqGuq9A.js")).verify
227
+ load: async () => (await import("./powersync-Bg8u-JcR.js")).verify
228
228
  })]),
229
229
  group("scim", "Generate the Postgres tables postgresDirectoryStore keeps a SCIM directory in", "scim", [leaf("generate", "Write the tenant-keyed users, groups and members tables", {
230
230
  examples: [
@@ -247,13 +247,13 @@ const SECTIONS = [
247
247
  docs: "openapi",
248
248
  effects: ["files"],
249
249
  config: true,
250
- load: async () => (await import("./openapi-CBZUhA3l.js")).emit
250
+ load: async () => (await import("./openapi-BIpw3Mb7.js")).emit
251
251
  }), leaf("import", "Turn an OpenAPI document into a generated definition", {
252
252
  examples: ["permdock openapi import --doc openapi.yaml --out src/permissions.generated.ts"],
253
253
  docs: "openapi",
254
254
  effects: ["files", "network"],
255
255
  config: false,
256
- load: async () => (await import("./openapi-CBZUhA3l.js")).importDocument
256
+ load: async () => (await import("./openapi-BIpw3Mb7.js")).importDocument
257
257
  })]),
258
258
  group("arazzo", "Check Arazzo workflows against the permissions", "arazzo", [leaf("check", "Resolve every Arazzo step to x-permdock-permissions", {
259
259
  examples: ["permdock arazzo check --doc arazzo.json --openapi openapi.json"],
@@ -261,7 +261,7 @@ const SECTIONS = [
261
261
  effects: [],
262
262
  config: true,
263
263
  findings: true,
264
- load: async () => (await import("./arazzo-3RhGfkAK.js")).check
264
+ load: async () => (await import("./arazzo-BpS7LnV0.js")).check
265
265
  })]),
266
266
  leaf("scan", "List authorization checks written without PermDock, to adopt it in an existing app", {
267
267
  examples: ["permdock scan", "permdock scan --src app,lib --pattern isBeta"],
@@ -269,7 +269,7 @@ const SECTIONS = [
269
269
  effects: [],
270
270
  config: true,
271
271
  findings: true,
272
- load: async () => (await import("./scan-DCj1KQfn.js")).scan
272
+ load: async () => (await import("./scan-CRTj6fke.js")).scan
273
273
  }),
274
274
  group("casl", "Import CASL rules into a generated module", "casl", [leaf("import", "Turn CASL rules per role into a permissions and policy module", {
275
275
  examples: ["permdock casl import --rules rules.json --out src/permissions.generated.ts"],
@@ -283,7 +283,7 @@ const SECTIONS = [
283
283
  docs: "casbin",
284
284
  effects: ["files"],
285
285
  config: false,
286
- load: async () => (await import("./casbin-cbSbhT_k.js")).casbinImport
286
+ load: async () => (await import("./casbin-B7_yS-oo.js")).casbinImport
287
287
  })])
288
288
  ]
289
289
  },
@@ -295,34 +295,34 @@ const SECTIONS = [
295
295
  docs: "login",
296
296
  effects: ["network", "files"],
297
297
  config: false,
298
- load: async () => (await import("./login-D-8tMqzo.js")).login
298
+ load: async () => (await import("./login-CfImTJGb.js")).login
299
299
  }),
300
300
  leaf("logout", "Revoke and delete the stored PermDock Cloud login", {
301
301
  examples: ["permdock logout"],
302
302
  docs: "login",
303
303
  effects: ["network", "files"],
304
304
  config: false,
305
- load: async () => (await import("./login-D-8tMqzo.js")).logout
305
+ load: async () => (await import("./login-CfImTJGb.js")).logout
306
306
  }),
307
307
  leaf("whoami", "Print the PermDock Cloud identity the CLI acts as", {
308
308
  examples: ["permdock whoami", "permdock whoami --json"],
309
309
  docs: "login",
310
310
  effects: [],
311
311
  config: false,
312
- load: async () => (await import("./login-D-8tMqzo.js")).whoami
312
+ load: async () => (await import("./login-CfImTJGb.js")).whoami
313
313
  }),
314
314
  group("cloud", "Publish to or pull from a PermDock Cloud project", "cloud", [leaf("push", "Publish the catalog, policy and manifest to a Cloud project", {
315
315
  examples: ["permdock cloud push --dry-run", "permdock cloud push --project prj_123"],
316
316
  docs: "cloud",
317
317
  effects: ["network", "cloud:write"],
318
318
  config: true,
319
- load: async () => (await import("./cloud-BFlGMaak.js")).push
319
+ load: async () => (await import("./cloud-3kWfjnYy.js")).push
320
320
  }), leaf("pull", "Write a Cloud project's published catalog and manifest", {
321
321
  examples: ["permdock cloud pull --project prj_123"],
322
322
  docs: "cloud",
323
323
  effects: ["network", "files"],
324
324
  config: true,
325
- load: async () => (await import("./cloud-BFlGMaak.js")).pull
325
+ load: async () => (await import("./cloud-3kWfjnYy.js")).pull
326
326
  })])
327
327
  ]
328
328
  },
@@ -333,7 +333,7 @@ const SECTIONS = [
333
333
  docs: "codemod",
334
334
  effects: ["rewrite"],
335
335
  config: false,
336
- load: async () => (await import("./codemod-DLQ9Zpo4.js")).codemod
336
+ load: async () => (await import("./codemod-D9Aiii1r.js")).codemod
337
337
  })]
338
338
  }
339
339
  ];
@@ -345,7 +345,7 @@ const COMPLETE_LEAF = leaf("__complete", "Print completion candidates for a part
345
345
  config: false,
346
346
  shellOutput: true,
347
347
  hidden: true,
348
- load: async () => (await import("./completion-saoYiRFO.js")).complete
348
+ load: async () => (await import("./completion-_bc0OUQ-.js")).complete
349
349
  });
350
350
  const ROOT = group("permdock", "Collect, export, diff and check the permissions a PermDock policy declares", "", [...SECTIONS.flatMap((section) => section.entries), COMPLETE_LEAF]);
351
351
  /** Each leaf with its path from the root, in manifest order. */
@@ -335,7 +335,8 @@ function mapClaimsToSubject(claims, options) {
335
335
  delegation: options.accept === "id-token" ? void 0 : delegationOf(claims, options, act.status === "ok" ? act.chain : void 0),
336
336
  context: {},
337
337
  session: typeof sessionValue === "string" ? sessionValue : void 0,
338
- expiresAt
338
+ expiresAt,
339
+ issuedAt: typeof claims.iat === "number" && Number.isFinite(claims.iat) ? claims.iat : void 0
339
340
  })),
340
341
  invalidClaims,
341
342
  invalidChain: false
@@ -1,14 +1,14 @@
1
- import { T as Policy, Y as JwtClaims, dt as TokenVerifier, lr as Subject, rr as Delegation, sr as Principal } from "../policy-types-CCiDRZBH.js";
1
+ import { T as Policy, Z as JwtClaims, hr as Subject, ht as TokenVerifier, lr as Delegation, pr as Principal } from "../policy-types-DGIO_gxq.js";
2
2
  import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { m as ApprovalStore } from "../types-B_tiYvk8.js";
4
- import { t as ApprovalHint } from "../errors-zi_4T-rx.js";
5
- import { t as InstanceOptions } from "../instance-options-B0KXqTrJ.js";
3
+ import { m as ApprovalStore } from "../types-DLvhVm1r.js";
4
+ import { t as ApprovalHint } from "../errors-BIM4MFsJ.js";
5
+ import { t as InstanceOptions } from "../instance-options-CoHn-0e8.js";
6
6
  import { t as RequestContext } from "../request-context-C2_1lchh.js";
7
- import { n as PermDockWrap } from "../wrap-DlJE3gS_.js";
8
- import { o as OtelWrap } from "../types-DHKPcqzr.js";
9
- import { n as DeniedTextEvent, t as DeniedText } from "../denied-text-CHNlVInN.js";
7
+ import { n as PermDockWrap } from "../wrap-DxXB54Wu.js";
8
+ import { o as OtelWrap } from "../types-B6ExllNo.js";
9
+ import { n as DeniedTextEvent, t as DeniedText } from "../denied-text-DHldhVUv.js";
10
10
  import { t as ClientNames } from "../clients-C_NOET3z.js";
11
- import { U as JwtSubjectOptions } from "../types-DjuMBNF9.js";
11
+ import { U as JwtSubjectOptions } from "../types-DsHGPtkR.js";
12
12
  import { CacheHint, Icon, McpServer, PromptCallback, ReadResourceCallback, ReadResourceTemplateCallback, RegisteredPrompt, RegisteredResource, RegisteredResourceTemplate, RegisteredTool, ResourceMetadata, ResourceTemplate, ScopeChallengeHandler, StandardSchemaWithJSON, ToolAnnotations, ToolCallback, Variables } from "@modelcontextprotocol/server";
13
13
  //#region src/mcp/types.d.ts
14
14
  /**
package/dist/mcp/index.js CHANGED
@@ -5,14 +5,14 @@ import { n as describe } from "../describe-Bb4hGK5d.js";
5
5
  import { m as annotationsFor } from "../permission-registry-B8tYxPIt.js";
6
6
  import { t as actorMayCallTool } from "../delegation-CDB6_keF.js";
7
7
  import { n as resourceRef } from "../resource-ref-CaS9yVPi.js";
8
- import { i as challengeScope, l as withApp, o as hasScope, s as scopesReaching } from "../permdock-L-_I_3zP.js";
8
+ import { i as challengeScope, l as withApp, o as hasScope, s as scopesReaching } from "../permdock-BvjivVb9.js";
9
9
  import { t as anonymousSubject } from "../subject-BGoM5o8B.js";
10
10
  import { t as composeWraps } from "../wrap-B2wziJI_.js";
11
11
  import { l as problemResponse, o as methodNotAllowed, r as bearerChallenge, u as protectedResourceMetadataUrl } from "../problem-BVLHFK33.js";
12
12
  import { t as clientNameOf } from "../clients-DYr3U86j.js";
13
- import { r as mapClaimsToSubject } from "../map-claims-BNWCJtmP.js";
14
- import { r as instanceOptions } from "../build-instance-CNWaYJyr.js";
15
- import { i as refusalText, n as createAgentKernel } from "../kernel-C-fYydV2.js";
13
+ import { r as mapClaimsToSubject } from "../map-claims-C-nv08_n.js";
14
+ import { r as instanceOptions } from "../build-instance-BWXqwQYU.js";
15
+ import { i as refusalText, n as createAgentKernel } from "../kernel-qv4cr9w8.js";
16
16
  import { t as boundedMap } from "../lru-8q4WZjBV.js";
17
17
  import { t as delegationFrom } from "../delegation-input-FTxMK3ji.js";
18
18
  import { n as deniedToolRefusal, r as toolErrorResult, t as approvalToolRefusal } from "../tool-refusal-Qpjs_W6M.js";
@@ -1,9 +1,9 @@
1
- import { T as Policy, sr as Principal } from "../policy-types-CCiDRZBH.js";
1
+ import { T as Policy, pr as Principal } from "../policy-types-DGIO_gxq.js";
2
2
  import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { a as PermDock } from "../permdock-B6Sf4T_S.js";
3
+ import { a as PermDock } from "../permdock-CprAPN3w.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-CIlpSA2G.js";
6
- import { t as ServerAdapterOptions } from "../bind-Cp2hBHzP.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-CyRN0-Cd.js";
6
+ import { t as ServerAdapterOptions } from "../bind-YYjvfpB9.js";
7
7
  import { r as sendResponse, t as NodeRequest } from "../http-B_LphE5Y.js";
8
8
  import { CanActivate, DynamicModule, ExceptionFilter, ExecutionContext, Type } from "@nestjs/common";
9
9
  //#region src/nest/http.d.ts
@@ -4,7 +4,7 @@ import { n as PermDockDeniedError, r as PermDockRevokedError, t as PermDockAppro
4
4
  import { c as writeReply, r as hasCredentials } from "../http-DKLXrFGk.js";
5
5
  import { l as InvalidSignatureError, p as webBotAuthVerifier, u as discoverViaSignatureAgent } from "../evaluations-IBceAeKT.js";
6
6
  import { t as problemFromError } from "../map-error-pasIGqMT.js";
7
- import { a as socketConnection, r as bindKernel } from "../bind-D_sZSVA3.js";
7
+ import { a as socketConnection, r as bindKernel } from "../bind-BNQA9JK9.js";
8
8
  import { a as onRevoked, n as closeReason, t as POLICY_VIOLATION } from "../stream-CDvF0sJm.js";
9
9
  import { n as sendResponse, r as toRequest$1, t as isServerResponse } from "../http-DH94eh6f.js";
10
10
  import { Catch, Controller, Get, Inject, Injectable, Module, Post, Req, Res, createParamDecorator } from "@nestjs/common";
@@ -1,13 +1,13 @@
1
- import { Bn as DenialReason, Gt as Snapshot, Ln as Decision, T as Policy, j as PolicyVocabulary, lr as Subject, sr as Principal } from "../policy-types-CCiDRZBH.js";
1
+ import { Kn as DenialReason, T as Policy, Un as Decision, X as Intent, Zt as Snapshot, hr as Subject, j as PolicyVocabulary, pr as Principal } from "../policy-types-DGIO_gxq.js";
2
2
  import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { a as PermDock, d as UncheckedData, s as RowData } from "../permdock-B6Sf4T_S.js";
4
- import { m as ApprovalStore } from "../types-B_tiYvk8.js";
5
- import { t as InstanceOptions } from "../instance-options-B0KXqTrJ.js";
6
- import { n as PermDockWrap } from "../wrap-DlJE3gS_.js";
7
- import { o as OtelWrap } from "../types-DHKPcqzr.js";
8
- import { n as DescribeMessages } from "../describe-ByS9LgHK.js";
9
- import { a as snapshotHeaders, i as cacheLifeFor, n as SnapshotHeaders, o as snapshotTag, r as SnapshotHeadersOptions, t as CacheLifeForOptions } from "../snapshot-cache-BAXZ0KOp.js";
10
- import { n as ProtectedAction, t as ActionResult } from "../action-result-CL-QCITA.js";
3
+ import { a as PermDock, d as UncheckedData, s as RowData } from "../permdock-CprAPN3w.js";
4
+ import { m as ApprovalStore } from "../types-DLvhVm1r.js";
5
+ import { t as InstanceOptions } from "../instance-options-CoHn-0e8.js";
6
+ import { n as PermDockWrap } from "../wrap-DxXB54Wu.js";
7
+ import { o as OtelWrap } from "../types-B6ExllNo.js";
8
+ import { n as DescribeMessages } from "../describe-BbFPBSms.js";
9
+ import { a as snapshotHeaders, i as cacheLifeFor, n as SnapshotHeaders, o as snapshotTag, r as SnapshotHeadersOptions, t as CacheLifeForOptions } from "../snapshot-cache-BjAWkchD.js";
10
+ import { n as ProtectedAction, t as ActionResult } from "../action-result-BcudBQOF.js";
11
11
  import { ReactElement, ReactNode } from "react";
12
12
  import { StandardSchemaV1 } from "@standard-schema/spec";
13
13
  //#region src/next/types.d.ts
@@ -34,6 +34,13 @@ type NextPermDockOptions<TUser = NextSubjectInput> = InstanceOptions & {
34
34
  };
35
35
  type GetPermDockQuery = {
36
36
  readonly tenant?: string;
37
+ /**
38
+ * Default `'read'`: with `claimsFirst(…, { versions })` the token may be
39
+ * judged from the shared version cache, at most its `maxStaleMs` stale. Pass
40
+ * `'write'` before a mutation outside `protectAction`, which always reads the
41
+ * version live.
42
+ */
43
+ readonly intent?: Intent;
37
44
  };
38
45
  type GetSnapshotQuery = GetPermDockQuery & {
39
46
  readonly include?: readonly (Permission | {
@@ -3,12 +3,12 @@ import { n as PermDockValidationError } from "../validation-error-CYg2kJEw.js";
3
3
  import { o as statusProblem, t as notFoundDetails } from "../problem-details-CLDgX1KV.js";
4
4
  import { n as isThenable } from "../thenable-BNSM1U2R.js";
5
5
  import { n as resourceRef } from "../resource-ref-CaS9yVPi.js";
6
- import { l as withApp } from "../permdock-L-_I_3zP.js";
6
+ import { l as withApp } from "../permdock-BvjivVb9.js";
7
7
  import { n as wrapPermDock } from "../wrap-B2wziJI_.js";
8
8
  import { i as decisionProblem } from "../problem-BVLHFK33.js";
9
9
  import { s as resumeDecision } from "../helpers-DJicaG6f.js";
10
10
  import { n as snapshotHeaders, r as snapshotTag, t as cacheLifeFor } from "../snapshot-cache-Bx_4xC_6.js";
11
- import { n as resolveOrNull, t as buildInstance } from "../build-instance-CNWaYJyr.js";
11
+ import { n as resolveOrNull, t as buildInstance } from "../build-instance-BWXqwQYU.js";
12
12
  import { _ as LOAD_FAILED, o as evaluationsHandler, v as NO_GRANT } from "../evaluations-IBceAeKT.js";
13
13
  import { cache } from "react";
14
14
  import { jsx } from "react/jsx-runtime";
@@ -63,7 +63,10 @@ function protectActionOf(deps) {
63
63
  let permdock;
64
64
  let data;
65
65
  try {
66
- permdock = await deps.getPermDock(compact({ tenant: options.tenant?.(input) }));
66
+ permdock = await deps.getPermDock(compact({
67
+ tenant: options.tenant?.(input),
68
+ intent: "write"
69
+ }));
67
70
  } catch (error) {
68
71
  deps.rethrow(error);
69
72
  return refused(decisionProblem(NO_GRANT, permission, void 0));
@@ -181,7 +184,7 @@ function createPermDock(policy, given) {
181
184
  return wrapInstance(options.wrap === void 0 ? traced : options.wrap(traced), options.onDenied);
182
185
  };
183
186
  const resolveFallbackTenant = cache(() => readTenant(options.tenant));
184
- const instantiate = cache(async (tenantKey) => {
187
+ const instantiate = cache(async (tenantKey, intent) => {
185
188
  const tenant = tenantKey === "" ? void 0 : tenantKey;
186
189
  const user = await resolveSubject();
187
190
  await io();
@@ -191,14 +194,15 @@ function createPermDock(policy, given) {
191
194
  sources: options,
192
195
  scope: {
193
196
  tenant,
194
- sink
197
+ sink,
198
+ intent
195
199
  },
196
200
  wrap: decorate
197
201
  })).permdock;
198
202
  });
199
203
  const getPermDock = async (query) => {
200
204
  const tenant = query?.tenant ?? await resolveFallbackTenant();
201
- return instantiate(tenant ?? "");
205
+ return instantiate(tenant ?? "", query?.intent ?? "read");
202
206
  };
203
207
  const getPermission = async (permission, data, query) => {
204
208
  try {
@@ -233,7 +237,10 @@ function createPermDock(policy, given) {
233
237
  return snapshot;
234
238
  };
235
239
  const requirePermission = async (permission, data, requirement = {}) => {
236
- const permdock = await getPermDock(requirement.tenant === void 0 ? void 0 : { tenant: requirement.tenant });
240
+ const permdock = await getPermDock(compact({
241
+ tenant: requirement.tenant,
242
+ intent: requirement.intent
243
+ }));
237
244
  const assert = permdock.assert;
238
245
  const handler = requirement.onDenied ?? options.onDenied;
239
246
  return assert(permission, data, { onDenied: (decision) => {
@@ -1,4 +1,4 @@
1
- import { s as PermDockPluginOptions } from "../types-DC1Loeh3.js";
1
+ import { s as PermDockPluginOptions } from "../types-CzOeVvcC.js";
2
2
  //#region src/cli/plugin.d.ts
3
3
  /** Any object: Next's `NextConfig` is an interface, so no index signature. */
4
4
  type NextConfigLike = object;
@@ -1,5 +1,5 @@
1
1
  import { a as describeError } from "../errors-Vpu6rKHl.js";
2
- import { n as createCollectScheduler, r as report, t as collectOnce } from "../watch-Cx_WciLE.js";
2
+ import { n as createCollectScheduler, r as report, t as collectOnce } from "../watch-BFDKqmUa.js";
3
3
  //#region src/cli/plugin.ts
4
4
  const PHASE_BUILD = "phase-production-build";
5
5
  const PHASE_DEV = "phase-development-server";
@@ -1,8 +1,8 @@
1
- import { T as Policy, j as PolicyVocabulary, sr as Principal } from "../policy-types-CCiDRZBH.js";
1
+ import { T as Policy, j as PolicyVocabulary, pr as Principal } from "../policy-types-DGIO_gxq.js";
2
2
  import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { a as PermDock } from "../permdock-B6Sf4T_S.js";
4
- import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, r as Guard, s as ScopeGuard, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-CIlpSA2G.js";
5
- import { t as ServerAdapterOptions } from "../bind-Cp2hBHzP.js";
3
+ import { a as PermDock } from "../permdock-CprAPN3w.js";
4
+ import { f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, r as Guard, s as ScopeGuard, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-CyRN0-Cd.js";
5
+ import { t as ServerAdapterOptions } from "../bind-YYjvfpB9.js";
6
6
  import { i as toRequest, n as isServerResponse, r as sendResponse, t as NodeRequest } from "../http-B_LphE5Y.js";
7
7
  import { IncomingMessage, ServerResponse } from "node:http";
8
8
  //#region src/node/create.d.ts
@@ -1,5 +1,5 @@
1
1
  import { l as InvalidSignatureError, p as webBotAuthVerifier, u as discoverViaSignatureAgent } from "../evaluations-IBceAeKT.js";
2
- import { r as bindKernel } from "../bind-D_sZSVA3.js";
2
+ import { r as bindKernel } from "../bind-BNQA9JK9.js";
3
3
  import { n as sendResponse, r as toRequest, t as isServerResponse } from "../http-DH94eh6f.js";
4
4
  //#region src/node/create.ts
5
5
  const nodeRequest = (req) => req;
@@ -1,8 +1,8 @@
1
- import { T as Policy, j as PolicyVocabulary, sr as Principal } from "../policy-types-CCiDRZBH.js";
1
+ import { T as Policy, j as PolicyVocabulary, pr as Principal } from "../policy-types-DGIO_gxq.js";
2
2
  import { u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { a as PermDock } from "../permdock-B6Sf4T_S.js";
4
- import { u as ApprovalRequest } from "../types-B_tiYvk8.js";
5
- import { o as AgentAdapterOptions, t as AgentPermDock } from "../create-BSNrVuxh.js";
3
+ import { a as PermDock } from "../permdock-CprAPN3w.js";
4
+ import { u as ApprovalRequest } from "../types-DLvhVm1r.js";
5
+ import { o as AgentAdapterOptions, t as AgentPermDock } from "../create-BPUopdfL.js";
6
6
  //#region src/openai/create.d.ts
7
7
  /** The app context passed to `run(agent, input, { context })`. */
8
8
  type OpenAiContext = {
@@ -1,7 +1,7 @@
1
1
  import { t as compact } from "../compact-CAf557ZB.js";
2
- import { l as withApp } from "../permdock-L-_I_3zP.js";
3
- import { t as approvalTokenOf } from "../kernel-C-fYydV2.js";
4
- import { t as agentRuntime } from "../create-Cq4Uox0f.js";
2
+ import { l as withApp } from "../permdock-BvjivVb9.js";
3
+ import { t as approvalTokenOf } from "../kernel-qv4cr9w8.js";
4
+ import { t as agentRuntime } from "../create-6EwRQlig.js";
5
5
  //#region src/openai/create.ts
6
6
  function appContext(runContext) {
7
7
  const context = runContext?.context;
@@ -1,6 +1,6 @@
1
- import { T as Policy, mr as Condition, sr as Principal } from "../policy-types-CCiDRZBH.js";
1
+ import { T as Policy, br as Condition, pr as Principal } from "../policy-types-DGIO_gxq.js";
2
2
  import { f as PermissionTree, u as Permission } from "../permission-types-CAY-GU7e.js";
3
- import { a as ProblemDetails } from "../errors-zi_4T-rx.js";
3
+ import { a as ProblemDetails } from "../errors-BIM4MFsJ.js";
4
4
  import { StandardJSONSchemaV1, StandardSchemaV1 } from "@standard-schema/spec";
5
5
  //#region src/openapi/types.d.ts
6
6
  type OpenApiTarget = "3.1" | "3.2" | "3.3";
@@ -7,7 +7,7 @@ import { a as loadModule, n as asPolicy, s as pickNamed, t as asPermissionTree }
7
7
  import { t as shortDiff } from "./text-diff-BtfSmdUo.js";
8
8
  import { c as openapiVersion, o as createPermDock } from "./openapi-BOsx0xn9.js";
9
9
  import { i as fileDrift } from "./output-files-BIQ_9pIs.js";
10
- import { n as validateOverlay, t as validateOpenapi } from "./schema-Dst9I9Gs.js";
10
+ import { n as validateOverlay, t as validateOpenapi } from "./schema-BTsE1WRT.js";
11
11
  import { existsSync } from "node:fs";
12
12
  import { resolve } from "node:path";
13
13
  //#region src/cli/openapi/openapi.ts