permdock 0.3.0 → 0.4.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 (323) hide show
  1. package/dist/a2a/index.d.ts +7 -5
  2. package/dist/a2a/index.js +14 -21
  3. package/dist/ai-sdk/index.d.ts +18 -6
  4. package/dist/ai-sdk/index.js +8 -5
  5. package/dist/app-data-CV8pqqMi.js +59 -0
  6. package/dist/approvals/index.d.ts +2 -2
  7. package/dist/approvals/index.js +3 -3
  8. package/dist/{approvals-DbYAuNkG.js → approvals-DZL76lKW.js} +35 -19
  9. package/dist/{approvers-DT4AVyIg.js → approvers-CqPOLD-o.js} +1 -1
  10. package/dist/{arazzo-BAgw9ap6.js → arazzo-C4BcskbX.js} +6 -5
  11. package/dist/{arazzo-CKwwqFWz.js → arazzo-CD8d0WLb.js} +2 -2
  12. package/dist/authzen/index.d.ts +3 -3
  13. package/dist/authzen/index.js +161 -23
  14. package/dist/better-auth/index.d.ts +2 -2
  15. package/dist/better-auth/index.js +6 -19
  16. package/dist/better-supabase/index.d.ts +112 -87
  17. package/dist/better-supabase/index.js +257 -156
  18. package/dist/{bind-C_ob3LKa.d.ts → bind-BzqG8SMb.d.ts} +16 -5
  19. package/dist/{bind-CuzGytRf.js → bind-kk-uyCwH.js} +14 -6
  20. package/dist/build-instance-DIIV9DbC.js +51 -0
  21. package/dist/{canonical-json-DemiK4Vp.js → canonical-json-CFKyFOke.js} +1 -3
  22. package/dist/{capability-2kYTMWDv.d.ts → capability-CksyCWDH.d.ts} +2 -2
  23. package/dist/{capability-4qPdO9gk.js → capability-txATtKV4.js} +3 -2
  24. package/dist/catalog/index.d.ts +1 -1
  25. package/dist/catalog/index.js +1 -1
  26. package/dist/catalog-6yWAX6Ps.js +2 -0
  27. package/dist/{catalog-dFZdWCGN.js → catalog-WHG4kBq7.js} +2 -2
  28. package/dist/{catalog-doc-DdGm82XT.js → catalog-doc-DWtg0gGR.js} +17 -10
  29. package/dist/{catalog-DWF5cYqB.js → catalog-tZUyOfOv.js} +4 -4
  30. package/dist/claude-agent/index.d.ts +4 -4
  31. package/dist/claude-agent/index.js +4 -5
  32. package/dist/clerk/index.d.ts +3 -3
  33. package/dist/clerk/index.js +8 -33
  34. package/dist/cli/bin.js +1 -1
  35. package/dist/cli/index.d.ts +3 -3
  36. package/dist/cli/index.js +3 -3
  37. package/dist/cloud/index.d.ts +4 -4
  38. package/dist/cloud/index.js +9 -15
  39. package/dist/{cloud-CB_ELYuX.js → cloud-C7bSDgX4.js} +2 -2
  40. package/dist/{cloud-DWLXO2af.js → cloud-PeBN3IEn.js} +5 -5
  41. package/dist/{collect-DSTE3ml9.js → collect-2SrB7lfk.js} +6 -8
  42. package/dist/collect-Bw2Jdq1q.js +2 -0
  43. package/dist/{collect-DClJsheJ.js → collect-CQx4hX4N.js} +3 -3
  44. package/dist/{commands-DSxCqG9A.js → commands-Cpip4ULx.js} +13 -13
  45. package/dist/{compact-y6vfu2_f.js → compact-CAf557ZB.js} +11 -1
  46. package/dist/compile/index.d.ts +1 -1
  47. package/dist/compile/index.js +1 -1
  48. package/dist/{compile-Ba4blROR.js → compile-CcEu2ZQ1.js} +6 -5
  49. package/dist/{compile-BkRyBDBw.d.ts → compile-CtTP7eur.d.ts} +2 -2
  50. package/dist/{config-BJiM-xAm.js → config-BIjREpyE.js} +4 -4
  51. package/dist/{config-Dnszbv-6.js → config-DLt6BvV7.js} +2 -2
  52. package/dist/{config-report-DMvWKUxL.js → config-report--Xb9APJS.js} +5 -6
  53. package/dist/{connection-CU8MQxRi.js → connection-DUsczpB5.js} +3 -2
  54. package/dist/constants-DcJABbLW.js +20 -0
  55. package/dist/{context-Bcy85rGi.js → context-DieZVJXu.js} +16 -5
  56. package/dist/convex/index.d.ts +4 -4
  57. package/dist/convex/index.js +14 -16
  58. package/dist/create-BBO24vj6.js +324 -0
  59. package/dist/{credential-8P81ff4u.js → credential-kue0qpbm.js} +4 -4
  60. package/dist/deciding-columns-Sq12mEA6.js +123 -0
  61. package/dist/delegation-input-FTxMK3ji.js +19 -0
  62. package/dist/denied-text-DfRk15uw.d.ts +19 -0
  63. package/dist/{describe-DMYiCjJV.d.ts → describe-C3ldA9os.d.ts} +11 -2
  64. package/dist/{describe-B_gVZEVi.js → describe-Cgkp7eP0.js} +5 -4
  65. package/dist/{diff-DBIhz_f2.js → diff-Cnghh_Ip.js} +2 -2
  66. package/dist/{diff-2VaeChzX.js → diff-rpqoe7Ag.js} +9 -9
  67. package/dist/{doctor-BwCAMLx_.js → doctor-CuVJvhV_.js} +2 -2
  68. package/dist/doctor-owlv6ddh.js +2166 -0
  69. package/dist/drizzle/index.d.ts +2 -2
  70. package/dist/drizzle/index.js +6 -14
  71. package/dist/elysia/index.d.ts +4 -4
  72. package/dist/elysia/index.js +7 -7
  73. package/dist/{errors-DPdqI50v.d.ts → errors-OD_4c__H.d.ts} +2 -2
  74. package/dist/{errors-Cz5zn0mW.js → errors-drnfxYtm.js} +3 -3
  75. package/dist/{evaluations-tz6D9A2G.js → evaluations-C9YJsv3H.js} +45 -7
  76. package/dist/eve/index.d.ts +5 -5
  77. package/dist/eve/index.js +5 -5
  78. package/dist/express/index.d.ts +4 -4
  79. package/dist/express/index.js +8 -7
  80. package/dist/fastify/index.d.ts +15 -5
  81. package/dist/fastify/index.js +9 -29
  82. package/dist/fields-fwfXN01n.js +1016 -0
  83. package/dist/{files-DWUN9PzI.js → files-D_JIzUrP.js} +12 -3
  84. package/dist/{fixtures-ht28Cplr.js → fixtures-h2eG2OZV.js} +5 -6
  85. package/dist/{from-snapshot-CTLijvdm.js → from-snapshot-7REQZe0H.js} +32 -22
  86. package/dist/{generate-CH7ThJ14.js → generate-CNU1pIOo.js} +1 -3
  87. package/dist/grantee-CXY-0C87.js +254 -0
  88. package/dist/grantee-conditions-MQs5NIuX.js +270 -0
  89. package/dist/grantee-match-fxYp9Nmt.js +141 -0
  90. package/dist/{helpers-H_KARDVC.js → helpers-C9YmyBIa.js} +7 -6
  91. package/dist/hono/index.d.ts +4 -4
  92. package/dist/hono/index.js +8 -8
  93. package/dist/hosted-CBHgkzDl.js +655 -0
  94. package/dist/{http-SO7qGttf.js → http-BBoKefeS.js} +35 -2
  95. package/dist/{http-BIhmLfCc.js → http-BEbdMZ05.js} +2 -24
  96. package/dist/{rls-import-BTFVk3jH.js → import-BFIlhetD.js} +86 -80
  97. package/dist/{openapi-import-cmwetbzw.js → import-UHk1N7vH.js} +6 -7
  98. package/dist/{index-C8z4RjQV.d.ts → index-BwMe94Xq.d.ts} +1 -1
  99. package/dist/{index-0nNqHspG.d.ts → index-DgM7w96K.d.ts} +2 -2
  100. package/dist/{index-C7Tw7MaW.d.ts → index-Dz7didpC.d.ts} +3 -3
  101. package/dist/{index-BNc7Wer_.d.ts → index-UdVQgq48.d.ts} +105 -38
  102. package/dist/index.d.ts +15 -13
  103. package/dist/index.js +22 -22
  104. package/dist/{instance-options-jARdwfPN.d.ts → instance-options-plkrsAog.d.ts} +1 -1
  105. package/dist/{json-schema-BsAflUGW.js → json-schema-DBkdUuCO.js} +1 -3
  106. package/dist/jwt/index.d.ts +4 -4
  107. package/dist/jwt/index.js +13 -13
  108. package/dist/{kernel-_RRHmnMY.js → kernel-CB3LrIJM.js} +81 -32
  109. package/dist/kysely/index.d.ts +2 -2
  110. package/dist/kysely/index.js +6 -14
  111. package/dist/{live-options-H2eG8dfJ.js → live-options-BaAFCIiu.js} +16 -3
  112. package/dist/load-B_shHrmd.js +2 -0
  113. package/dist/{load-DhWEB9P1.js → load-C3_oTHyO.js} +11 -3
  114. package/dist/{manifest-iaoBXHKc.js → manifest-BngWKryL.js} +5 -18
  115. package/dist/{map-claims-Z4QZOiFF.js → map-claims-AVlBaJoa.js} +7 -16
  116. package/dist/{map-error-pgUWNNtG.js → map-error-BE27PYkE.js} +5 -5
  117. package/dist/{markers-B0hYLvMD.js → markers-CiwAOZtO.js} +6 -2
  118. package/dist/{may-use-DndQ5tQ-.js → may-use-BOn_dR_w.js} +4 -3
  119. package/dist/mcp/index.d.ts +26 -9
  120. package/dist/mcp/index.js +456 -446
  121. package/dist/{rls-migrate-CN4TlJTO.js → migrate-BwlB5-Wk.js} +75 -15
  122. package/dist/nest/index.d.ts +4 -4
  123. package/dist/nest/index.js +11 -12
  124. package/dist/next/index.d.ts +31 -8
  125. package/dist/next/index.js +29 -33
  126. package/dist/next/plugin.d.ts +1 -1
  127. package/dist/next/plugin.js +1 -1
  128. package/dist/node/index.d.ts +4 -4
  129. package/dist/node/index.js +4 -4
  130. package/dist/ocsf-uYFXGVw2.js +115 -0
  131. package/dist/openai/index.d.ts +5 -5
  132. package/dist/openai/index.js +4 -4
  133. package/dist/openapi/index.d.ts +3 -3
  134. package/dist/openapi/index.js +1 -1
  135. package/dist/{openapi-CqqEbHsL.js → openapi-BJdBmYDG.js} +19 -23
  136. package/dist/{openapi-BqRBvAng.js → openapi-DBzHQbov.js} +2 -5
  137. package/dist/{openapi-l0xYHkcv.js → openapi-DcQ1Kg40.js} +3 -3
  138. package/dist/orpc/index.d.ts +5 -5
  139. package/dist/orpc/index.js +9 -11
  140. package/dist/otel/index.d.ts +2 -2
  141. package/dist/otel/index.js +26 -23
  142. package/dist/output-files-CgIsvdSa.js +140 -0
  143. package/dist/{rls-ownership-RuFqaqGz.js → ownership-BgnbOJFT.js} +387 -379
  144. package/dist/{package-root-zGkxO3oN.js → package-root-DtNnpmUd.js} +3 -2
  145. package/dist/{parse-BuyjxhZV.js → parse-CVFQHk6c.js} +3 -3
  146. package/dist/{parse-local-manifest-BrMozJCo.js → parse-local-manifest-C-q02Pal.js} +2 -4
  147. package/dist/{parse-local-manifest-JLnaBH0S.d.ts → parse-local-manifest-DvYUR0QL.d.ts} +1 -1
  148. package/dist/pdp/index.d.ts +2 -2
  149. package/dist/pdp/index.js +8 -9
  150. package/dist/{permdock-CbgvLnuo.js → permdock-L26udHSk.js} +1387 -1220
  151. package/dist/{rls-fields-74oZPXWL.js → permission-keys-B26jeyUv.js} +1289 -2066
  152. package/dist/permission-registry-BsblpB-z.js +385 -0
  153. package/dist/{permissions-DttnqqxC.d.ts → permission-types-Dg39z9Kv.d.ts} +59 -31
  154. package/dist/{permissions-RJrovw98.js → permissions-CCJ6lmxB.js} +3 -3
  155. package/dist/{permissions-CDgvKG5L.d.ts → permissions-COH-KRgT.d.ts} +2 -2
  156. package/dist/{policy-IB6yxpC3.d.ts → policy-types-sp9P1iIV.d.ts} +661 -582
  157. package/dist/{policy-D2W7uv19.d.ts → policy-ur0BBK_e.d.ts} +2 -2
  158. package/dist/{powersync-DliZK_-y.js → powersync-BFSbSElQ.js} +2 -2
  159. package/dist/powersync-DCDgZgfZ.js +2 -0
  160. package/dist/{powersync-BylawD_U.js → powersync-cZe4kzhL.js} +26 -27
  161. package/dist/prisma/index.d.ts +1 -1
  162. package/dist/prisma/index.js +6 -12
  163. package/dist/{problem-B43ztKIm.js → problem-CnWraVhC.js} +8 -7
  164. package/dist/{problem-details-_AMOYz-w.js → problem-details-DECUnXAn.js} +2 -2
  165. package/dist/{problem-details-DX075l9V.d.ts → problem-details-rIIo8B2C.d.ts} +1 -1
  166. package/dist/{protected-BdnIEFkY.d.ts → protected-B3_P7xuw.d.ts} +9 -6
  167. package/dist/{protected-utU-SLuy.js → protected-BN7BUdY1.js} +20 -8
  168. package/dist/{provider-CSQd7m92.js → provider-Bi-0HNL3.js} +23 -10
  169. package/dist/{provider-DZY281jO.d.ts → provider-kwHC9CZD.d.ts} +1 -1
  170. package/dist/{provider-store-Cfbvo4DE.js → provider-store-Ctt-81Ni.js} +6 -3
  171. package/dist/react/index.d.ts +7 -7
  172. package/dist/react/index.js +5 -5
  173. package/dist/react/provider-client.d.ts +1 -1
  174. package/dist/react/provider-client.js +1 -1
  175. package/dist/react-native/index.d.ts +20 -11
  176. package/dist/react-native/index.js +33 -17
  177. package/dist/{refs-KYb4ntaz.js → refs-f3imMjNW.js} +1 -1
  178. package/dist/relation-walk-BXnlLtg2.js +186 -0
  179. package/dist/relations-CvmSpG67.js +163 -0
  180. package/dist/{replay-CYyiLiwO.d.ts → replay-COpmZUfx.d.ts} +1 -1
  181. package/dist/request-context-BVM7aWNs.js +71 -0
  182. package/dist/request-context-C2_1lchh.d.ts +5 -0
  183. package/dist/resource-relations-D1Un3pcz.js +243 -0
  184. package/dist/retire-BFcxL6un.js +240 -0
  185. package/dist/{rls-B4ur8nKQ.js → rls-55DQTuf5.js} +14 -2
  186. package/dist/{rls-DQtdgTHB.js → rls-BEktUaqg.js} +884 -484
  187. package/dist/{policy-xyWg7QdR.js → role-builder-B4GbKM-i.js} +235 -541
  188. package/dist/{rpc-DL9Sqvb1.js → rpc-nYC3cR_u.js} +15 -5
  189. package/dist/{run-DKDbM4Du.js → run-DMcNW_8T.js} +3 -3
  190. package/dist/{runtime-CB8gQFvS.js → runtime-D_tMXnsq.js} +1 -1
  191. package/dist/{saas-DhpJjnBA.js → saas-DtaA4JuW.js} +9 -8
  192. package/dist/{openapi-schema--ARjyfQr.js → schema-Bol6gqXA.js} +3 -5
  193. package/dist/{schema-D3MnDMxa.js → schema-DjQBcAP9.js} +4 -2
  194. package/dist/scim/index.d.ts +1 -1
  195. package/dist/scim/index.js +1 -1
  196. package/dist/{scim-BFGBBAqR.js → scim-vFR1O5oG.js} +6 -12
  197. package/dist/{scopes-CVdPrWN-.js → scopes-tvpa34ep.js} +10 -2
  198. package/dist/server/index.d.ts +18 -8
  199. package/dist/server/index.js +8 -8
  200. package/dist/{server-DlZ28Oz5.js → server-ZYEHtNHS.js} +4 -4
  201. package/dist/{create-B1d519XK.d.ts → server-types-DdqBwZN_.d.ts} +69 -33
  202. package/dist/shared-1uhI-e-b.js +294 -0
  203. package/dist/{shared-DRu8VFVM.js → shared-JhMeOsDF.js} +1 -1
  204. package/dist/{sink-Bd9PSyfq.js → sink-BTtmfPnE.js} +1 -1
  205. package/dist/{sink-B1fZzIMf.d.ts → sink-CPN4zLfs.d.ts} +1 -1
  206. package/dist/{skills-Biq5uup3.js → skills-BZdRQkxs.js} +4 -3
  207. package/dist/{skills-Bx-U0irG.js → skills-Dle4ZoLF.js} +2 -2
  208. package/dist/{snapshot-Enxd0n-s.js → snapshot-Dc9CHPME.js} +116 -13
  209. package/dist/{snapshot-cache-D6jLelln.js → snapshot-cache-Cod40D-X.js} +1 -1
  210. package/dist/{snapshot-cache-B-LxUahj.d.ts → snapshot-cache-J5T7t_vD.d.ts} +1 -1
  211. package/dist/solid/index.d.ts +22 -22
  212. package/dist/solid/index.js +40 -10
  213. package/dist/{sources-4p0-4xQm.js → sources-B1-b-R0t.js} +25 -26
  214. package/dist/{sources-BdOYLw9j.d.ts → sources-Dljy06zL.d.ts} +6 -2
  215. package/dist/{sql-xdg5f4Fi.js → sql-t8teWOfo.js} +19 -3
  216. package/dist/{src-BDwEZWrZ.js → src-Bb7no-hS.js} +194 -123
  217. package/dist/ssf/index.d.ts +3 -3
  218. package/dist/ssf/index.js +58 -61
  219. package/dist/store-9KO4BlkB.d.ts +147 -0
  220. package/dist/{store-DMAWwAJV.js → store-ILkLUj_o.js} +4 -4
  221. package/dist/{store-options-ByhZq1jV.js → store-options-CbUHDoSe.js} +16 -7
  222. package/dist/{stores-BT2pSCub.js → stores-BHXdSbw9.js} +7 -3
  223. package/dist/stores-Cxz_80g-.d.ts +31 -0
  224. package/dist/{stream-DDpvynSB.js → stream-BMui98KK.js} +2 -1
  225. package/dist/{stream-D1RXubw2.d.ts → stream-Dwsg6WwE.d.ts} +2 -2
  226. package/dist/{subject-settings-BwBmCdTR.js → subject-settings-CkEwrw3W.js} +23 -5
  227. package/dist/supabase/index.d.ts +4 -4
  228. package/dist/supabase/index.js +3 -3
  229. package/dist/supabase/middleware.d.ts +11 -5
  230. package/dist/supabase/middleware.js +10 -7
  231. package/dist/{supabase-C0qESOa-.js → supabase-C1TWlnYt.js} +36 -52
  232. package/dist/{supabase-Boqb9a_Y.js → supabase-Dbqr141s.js} +2 -2
  233. package/dist/supabase-hook-BULg7Ut_.js +2 -0
  234. package/dist/{supabase-hook-CSLQ4zJ3.js → supabase-hook-Cva3ikXz.js} +731 -782
  235. package/dist/{supautils-Cn4R4cJ4.js → supautils-B6HYL9eL.js} +2 -2
  236. package/dist/svelte/Protected.svelte +9 -2
  237. package/dist/svelte/index.d.ts +6 -6
  238. package/dist/svelte/index.js +25 -11
  239. package/dist/svelte/runtime.d.ts +10 -3
  240. package/dist/svelte/runtime.js +4 -3
  241. package/dist/svelte/source.d.ts +6 -6
  242. package/dist/svelte/source.js +4 -4
  243. package/dist/{validity-uOp8UpYn.js → tenancy-DshjqY0n.js} +3 -39
  244. package/dist/terminal/index.d.ts +5 -5
  245. package/dist/terminal/index.js +18 -34
  246. package/dist/testing/index.d.ts +89 -77
  247. package/dist/testing/index.js +1276 -1262
  248. package/dist/testing/saas/index.d.ts +4 -4
  249. package/dist/testing/saas/index.js +2 -2
  250. package/dist/testing/saas/permissions.d.ts +1 -1
  251. package/dist/testing/saas/permissions.js +1 -1
  252. package/dist/thenable-QSmvt-vZ.js +65 -0
  253. package/dist/{token-CIWxJOCh.js → token-Bx9qy30p.js} +1 -1
  254. package/dist/tool-refusal-CQ7OEia9.js +41 -0
  255. package/dist/trpc/index.d.ts +5 -5
  256. package/dist/trpc/index.js +7 -8
  257. package/dist/{types-DbjRN55U.d.ts → types-7rJVLWe5.d.ts} +82 -4
  258. package/dist/{types-aqOHTHcp.d.ts → types-Br9IXUBG.d.ts} +1 -1
  259. package/dist/types-ByUo56un.d.ts +88 -0
  260. package/dist/{types-Cq_H8N_X.d.ts → types-C0dee0Qf.d.ts} +2 -2
  261. package/dist/{types-DxiCGmmd.d.ts → types-CIlTojhq.d.ts} +2 -2
  262. package/dist/{types-QCuYJh4q.d.ts → types-CUcFZfpU.d.ts} +1 -1
  263. package/dist/{types-C97IskBw.d.ts → types-CqrjB9o6.d.ts} +1 -1
  264. package/dist/{types-BnIEz1sU.d.ts → types-DHrmBJLH.d.ts} +24 -6
  265. package/dist/{types-Dnemwd77.d.ts → types-DpWfQdSh.d.ts} +5 -1
  266. package/dist/{types-Bvc4oWT6.d.ts → types-DvupZE0w.d.ts} +1 -1
  267. package/dist/unplugin/index.d.ts +1 -1
  268. package/dist/unplugin/index.js +1 -1
  269. package/dist/{usage-GTixvDDU.js → usage-4G6t643F.js} +2 -2
  270. package/dist/{usage-ItS7nLcl.js → usage-CG9nOYZw.js} +7 -7
  271. package/dist/usage-iFLJ0-rr.js +2 -0
  272. package/dist/{validation-error-Ba264OaJ.d.ts → validation-error-BSSw0l_8.d.ts} +1 -1
  273. package/dist/{validation-error-CnjZ4t92.js → validation-error-ZfUHbKvf.js} +1 -1
  274. package/dist/validity-dVrUEPJt.js +62 -0
  275. package/dist/{verifier-BxBo6I44.js → verifier-DMr_Zmb_.js} +51 -15
  276. package/dist/{rls-verify-CVQTHTh5.js → verify-BztUB3GX.js} +668 -239
  277. package/dist/{version-BvacVTZR.js → version-BEogC-rB.js} +1 -1
  278. package/dist/{views-Soe7bGSC.js → views-CJsrBS1f.js} +23 -1
  279. package/dist/{vocabulary-DA8a8zif.d.ts → vocabulary-hhEFLFoL.d.ts} +15 -6
  280. package/dist/vue/index.d.ts +24 -19
  281. package/dist/vue/index.js +24 -8
  282. package/dist/watch-C8TpsAl4.js +2 -0
  283. package/dist/{watch-DVBJ9cBq.js → watch-zeucB7eF.js} +6 -6
  284. package/dist/webmcp/index.d.ts +2 -2
  285. package/dist/webmcp/index.js +13 -37
  286. package/dist/wrap-Cr93qqdP.d.ts +14 -0
  287. package/dist/wrap-DWsU_5Bd.js +26 -0
  288. package/package.json +8 -8
  289. package/schemas/catalog-v1.json +6 -0
  290. package/skills/permdock-credentials/SKILL.md +1 -1
  291. package/skills/permdock-credentials/references/tokens-keys-links.md +7 -2
  292. package/skills/permdock-data/references/queries-and-rls.md +4 -0
  293. package/skills/permdock-tenancy/references/ownership-and-custom-roles.md +1 -0
  294. package/skills/permdock-wire/SKILL.md +2 -2
  295. package/skills/permdock-wire/references/adapters.md +9 -1
  296. package/skills/permdock-wire/references/policy-options.md +10 -1
  297. package/dist/catalog-CRW5Mx_B.js +0 -2
  298. package/dist/collect-DSWOk19R.js +0 -2
  299. package/dist/create-CMwIl-w2.js +0 -253
  300. package/dist/delegation-D8pUEuce.js +0 -103
  301. package/dist/doctor-collect-CHk6XWOA.js +0 -665
  302. package/dist/doctor-igIiM_Hl.js +0 -1194
  303. package/dist/evaluation-items-CfCCejQd.js +0 -40
  304. package/dist/fields-BMl1RxoX.js +0 -26
  305. package/dist/grantee-Cv5Sogfv.js +0 -602
  306. package/dist/hosted-DJQw46hn.js +0 -266
  307. package/dist/instance-options-Dhhcnm3y.js +0 -22
  308. package/dist/load-DwJUafYN.js +0 -2
  309. package/dist/map-AcxK9o_D.js +0 -147
  310. package/dist/permissions-DVoF6dMt.js +0 -662
  311. package/dist/powersync-e_AZrKbg.js +0 -2
  312. package/dist/protected-xAr24FEC.d.ts +0 -40
  313. package/dist/relations-cjOL01hZ.js +0 -505
  314. package/dist/rls-graph-CHwx0V8q.js +0 -435
  315. package/dist/rls-shared-Cewd_-zI.js +0 -495
  316. package/dist/store-jOBYpiXC.d.ts +0 -36
  317. package/dist/stores-C0IMQrGI.d.ts +0 -52
  318. package/dist/supabase-config-BpPXt3x1.js +0 -472
  319. package/dist/supabase-hook-6sYLXg_u.js +0 -2
  320. package/dist/thenable-okc2xDsj.js +0 -10
  321. package/dist/types-CKNSyIf_.d.ts +0 -52
  322. package/dist/usage-DorAJiU_.js +0 -2
  323. package/dist/watch-BwxLTYMZ.js +0 -2
package/dist/index.d.ts CHANGED
@@ -1,16 +1,18 @@
1
- import { $ as AccessEvent, $n as ExplainedDecision, $t as CredentialPrincipal, A as RoleOptions, An as RoleChangeOptions, Ar as GnapAccess, At as SnapshotSource, B as normalizeApproval, Bn as simulateArazzo, Br as MemberOfParent, Bt as memoryMembershipSource, C as Policy, Cn as mergeHostedGrants, Cr as Actor, Ct as SettingsSource, Dn as WhoCan, Dr as CustomRole, Dt as SnapshotGrant, E as PolicyScopes, En as HoldingVia, Er as Binding, Et as SnapshotAssignable, F as SupportConsent, Fn as ArazzoFinding, Fr as VerifiedClaims, Ft as TokenVerifier, G as Approver, Gn as ApprovalPolicyValidation, Gr as SqlFunctionArg, Gt as WireDenial, H as role, Hn as ApprovalPolicy, Hr as RelatedCondition, Ht as memorySettings, I as ValidateMode, In as ArazzoPlan, Ir as Condition, It as VerificationFailure, J as UserApprover, Jn as ApprovalRequiredDecision, Jr as isCondition, Jt as CredentialKind, K as ApproverInput, Kn as memoryApprovalPolicies, Kr as SqlFunctionCondition, Kt as Credential, L as allow, Ln as ArazzoSimulateInput, Lr as ConditionRef, Lt as VerifiedToken, M as SeparationConflict, Mn as ActivateInput, Mr as Membership, Mt as TenantSettings, N as SubjectOf, Nn as breakGlass, Nr as Principal, Nt as TokenFailureCause, O as PrincipalOf, On as RoleChange, Or as CustomRoleGrant, Ot as SnapshotNotEntitled, P as SupportAccessOptions, Pn as supportAccess, Pr as Subject, Pt as TokenSigner, Q as user, Qn as DeniedDecision, Qt as CredentialPolicyViolation, R as definePolicy, Rn as ArazzoStepResult, Rr as ConditionValue, Rt as WhereCompiler, S as MembershipFixture, Sn as memoryPolicySource, Sr as ScopeNames, St as RoleSourceFactory, T as PolicyOAuthScope, Tn as Holder, Tr as AuthorizationDetail, Tt as Snapshot, U as separationConflicts, Un as ApprovalPolicyProblem, Ur as RelatedHop, Ut as memorySnapshotSource, V as normalizeAssurance, Vn as APPROVAL_POLICY_UNAVAILABLE, Vt as memoryRoleSource, W as AnyOfApprover, Wn as ApprovalPolicySource, Wr as RestrictedAncestors, Wt as WireDecision, X as anyOf, Xn as Denial, Xr as isConditionRef, Xt as CredentialPermissionInput, Y as allOf, Yn as Decision, Yr as isConditionDate, Yt as CredentialPermission, Z as holder, Zn as DenialReason, Zr as isSqlFunctionField, Zt as CredentialPolicy, _ as GrantLimit, _n as HostedGrantDropReason, _r as plan, _t as RelationChain, a as ApprovalRequirement, an as decideCredential, ar as Trace, at as DecisionSink, b as GrantValidity, bn as PolicySource, br as Scope, bt as RelationSource, c as BreakGlassOptions, cn as DeriveOptions, cr as Grantee, d as ClosureContext, dn as RowPair, dr as RelationGrantee, dt as LimitStore, en as CredentialRequest, er as GrantedDecision, et as AuthEvent, f as ClosureGrantFn, fn as SimulateOptions, fr as actor, ft as LocalCustomRoleTable, g as GrantCondition, gn as HostedGrant, gr as inherit, gt as MembershipSource, h as Grant, hn as createPermDock, hr as authenticated, ht as MembershipEvent, i as ApprovalOption, in as credentialSubject, ir as Quota, it as DecisionProvider, j as RoleScope, jn as RoleChangeTarget, jt as SubjectResolver, k as RoleBinding, kn as RoleChangeDecision, kr as Delegation, kt as SnapshotScope, l as BreakGlassRequirements, ln as PermDock, lr as GranteeInput, lt as LimitConsumeInput, m as DelegationTarget, mn as WhereResult, mr as assurance, mt as MemberEntry, n as ApprovalEscalation, nn as credentialDelegation, nr as MatchedGrant, nt as CredentialVerifier, o as ApprovalStage, on as parseCredential, or as TraceSkip, ot as DirectoryEvent, p as DelegationInput, pn as SnapshotOptions, pr as anyone, pt as LocalSnapshotManifest, q as PermissionApprover, qn as validateApprovalPolicy, qr as hasConditionOp, qt as CredentialDecision, r as ApprovalMode, rn as credentialPolicyViolation, rr as Obligation, rt as DecisionEvent, s as AssuranceRequirement, sn as DecideOptions, sr as TraceSkipReason, st as EntitlementSource, t as ActivationOption, tn as DecideCredentialOptions, tr as LimitDetail, tt as CredentialEvent, u as BreakGlassSpec, un as PermDockOptions, ur as InheritGrantee, ut as LimitRemaining, v as GrantOptions, vn as HostedGrantDropped, vr as relation, vt as RelationGroup, w as PolicyDelegation, wn as parsePolicyDocument, wr as Assurance, wt as SinkEvent, x as HostedGrantRef, xn as isPortableCondition, xr as ScopeDeclaration, xt as RoleSource, y as GrantScope, yn as PolicyDocument, yr as PolicyScopesInput, yt as RelationHolder, z as deny, zn as arazzoFindings, zr as MemberOfCondition, zt as memoryEntitlementSource } from "./policy-IB6yxpC3.js";
2
- import { A as listPermissions, C as ResourceRelationInput, D as formerKeys, E as findPermission, M as resource, O as getResource, S as ResourceRelation, T as definePermissions, _ as ResourceLevel, a as EdgeGroup, b as ResourceOptions, c as EdgeRelation, d as MetaValue, f as Permission, g as ResourceInit, h as PrincipalRelation, i as DefinePermissionsOptions, j as mergePermissions, k as isPermission, l as FieldRelation, m as PermissionTree, n as ActionMeta, o as EdgeGroups, p as PermissionKind, r as ComputedRelation, s as EdgeMatch, v as ResourceLink, w as ResourceRestricted, x as ResourceParent, y as ResourceNode } from "./permissions-DttnqqxC.js";
3
- import { a as RoleTree, c as defineRoles, d as isRole, f as listPlans, i as RoleMeta, l as findRole, n as PlanTree, o as Vocabulary, p as listRoles, r as Role, s as definePlans, t as Plan, u as isPlan } from "./vocabulary-DA8a8zif.js";
4
- import { A as countHolders, B as MemoryEdge, C as mayAccess, D as fromStripeEntitlements, E as StripeEntitlementsClient, F as context, G as CustomRoleRename, H as memoryRelations, I as principal, J as customRoleClaim, K as CustomRoleValidation, L as emptySnapshot, M as sqlFunction, N as opaque, O as claimsFirst, P as requiresApproval, R as fromSnapshot, S as permittedIds, T as memoryLimitStore, U as CustomRoleDrop, V as MemoryRelationsData, W as CustomRoleDropReason, X as validateCustomRole, Y as resolveCustomRole, _ as CustomRoleReader, a as toCsvRow, b as PermittedIdsOptions, c as OcsfAuthorizeSession, d as parseDuration, f as crud, g as snapshotFor, h as SnapshotForOptions, i as CSV_COLUMNS, j as isExternallyManaged, k as composeMemberships, l as accessToOcsf, m as writable, n as delegatedPermissions, o as OCSF_VERSION, p as readable, q as ResolvedCustomRole, r as catalogFingerprint, s as OcsfAccountChange, t as coveredByDelegation, u as toOcsf, v as CustomRoleSourceOptions, w as localSnapshotManifest, x as mayUse, y as customRoleSource, z as parseSnapshot } from "./index-BNc7Wer_.js";
5
- import { n as PermDockValidationError } from "./validation-error-Ba264OaJ.js";
6
- import { n as requiredPlans } from "./problem-details-DX075l9V.js";
7
- import { a as ProblemDetails, i as PermDockRevokedError, n as PermDockApprovalRequiredError, o as RevokedCode, r as PermDockDeniedError } from "./errors-DPdqI50v.js";
8
- import { t as InstanceOptions } from "./instance-options-jARdwfPN.js";
1
+ import { $ as RelationGroup, $n as inherit, $t as validateApprovalPolicy, A as PolicyScopes, An as ArazzoFinding, Ar as VerifiedClaims, At as DeriveOptions, B as ValidateMode, Bn as UserApprover, Br as SqlFunctionArg, Bt as HostedGrantDropped, C as HostedGrantRef, Cn as MembershipEvent, Cr as CustomRoleGrant, Ct as DecideCredentialOptions, D as PolicyAppDataSchemas, Dn as ActivateInput, Dr as Membership, Dt as decideCredential, E as Policy, En as WireDenial, Et as credentialSubject, F as RoleScope, Fn as simulateArazzo, Fr as MemberOfParent, Ft as SnapshotOptions, G as EntitlementSource, Gn as Grantee, Gr as isConditionRef, Gt as mergeHostedGrants, H as CredentialVerifier, Hn as anyOf, Hr as hasConditionOp, Ht as PolicySource, I as SeparationConflict, In as AnyOfApprover, It as WhereResult, J as LimitRemaining, Jn as RelationGrantee, Jt as ApprovalPolicy, Kn as GranteeInput, Kr as isSqlFunctionField, Kt as parsePolicyDocument, L as SubjectOf, Ln as Approver, Lr as RelatedCondition, Lt as createPermDock, M as PrincipalOf, Mn as ArazzoSimulateInput, Mr as ConditionRef, Mt as PermDockOptions, N as RoleBinding, Nn as ArazzoStepResult, Nr as ConditionValue, Nt as RowPair, O as PolicyDelegation, On as breakGlass, Or as Principal, Ot as parseCredential, P as RoleOptions, Pn as arazzoFindings, Pr as MemberOfCondition, Pt as SimulateOptions, Q as RelationChain, Qn as authenticated, Qt as memoryApprovalPolicies, R as SupportAccessOptions, Rn as ApproverInput, Rr as RelatedHop, Rt as HostedGrant, S as GrantValidity, Sn as DirectoryEvent, Sr as CustomRole, St as CredentialRequest, T as ObligationInput, Tn as WireDecision, Tr as GnapAccess, Tt as credentialPolicyViolation, U as DecisionProvider, Un as holder, Ur as isCondition, Ut as isPortableCondition, Vn as allOf, Vr as SqlFunctionCondition, Vt as PolicyDocument, W as DecisionSink, Wn as user, Wr as isConditionDate, Wt as memoryPolicySource, X as MemberEntry, Xn as anyone, Xt as ApprovalPolicySource, Y as LimitStore, Yn as actor, Yt as ApprovalPolicyProblem, Z as MembershipSource, Zn as assurance, Zt as ApprovalPolicyValidation, _ as GrantCondition, _n as ScopeNames, _r as TraceSkipReason, _t as CredentialPermission, a as ApprovalRequirement, an as Snapshot, ar as Denial, at as SnapshotSource, b as GrantOptions, bn as CredentialEvent, br as AuthorizationDetail, bt as CredentialPolicyViolation, c as BreakGlassOptions, cn as SnapshotNotEntitled, cr as DeniedDecision, ct as TokenFailureCause, d as ClosureContext, dn as RoleChangeDecision, dr as LimitDetail, dt as VerificationFailure, en as Holder, er as plan, et as RelationHolder, f as ClosureGrantFn, fn as RoleChangeOptions, fr as MatchedGrant, ft as VerifiedToken, g as Grant, gn as ScopeDeclaration, gr as TraceSkip, gt as CredentialKind, h as DelegationTarget, hn as Scope, hr as Trace, ht as CredentialDecision, i as ApprovalOption, in as LocalSnapshotManifest, ir as Decision, it as SettingsSource, jn as ArazzoPlan, jr as Condition, jt as PermDock, k as PolicyOAuthScope, kn as supportAccess, kr as Subject, kt as DecideOptions, l as BreakGlassRequirements, ln as SnapshotScope, lr as ExplainedDecision, lt as TokenSigner, m as DelegationInput, mn as PolicyScopesInput, mr as Quota, mt as Credential, n as ApprovalEscalation, nn as WhoCan, nr as AppObligation, nt as RoleSource, o as ApprovalStage, on as SnapshotAssignable, or as DenialDetails, ot as SubjectResolver, pn as RoleChangeTarget, pr as Obligation, pt as WhereCompiler, q as LimitConsumeInput, qn as InheritGrantee, qt as APPROVAL_POLICY_UNAVAILABLE, r as ApprovalMode, rn as LocalCustomRoleTable, rr as ApprovalRequiredDecision, rt as RoleSourceFactory, s as AssuranceRequirement, sn as SnapshotGrant, sr as DenialReason, st as TenantSettings, t as ActivationOption, tn as HoldingVia, tr as relation, tt as RelationSource, u as BreakGlassSpec, un as RoleChange, ur as GrantedDecision, ut as TokenVerifier, v as GrantLimit, vn as AccessEvent, vr as Actor, vt as CredentialPermissionInput, w as MembershipFixture, wn as SinkEvent, wr as Delegation, wt as credentialDelegation, x as GrantScope, xn as DecisionEvent, xr as Binding, xt as CredentialPrincipal, y as GrantMeta, yn as AuthEvent, yr as Assurance, yt as CredentialPolicy, z as SupportConsent, zn as PermissionApprover, zr as RestrictedAncestors, zt as HostedGrantDropReason } from "./policy-types-sp9P1iIV.js";
2
+ import { C as ResourceRelationInput, D as AppData, E as RESOURCE_X, O as AppDataSchema, S as ResourceRelation, T as ResourceXTree, _ as ResourceLink, a as EdgeGroup, b as ResourceOptions, c as EdgeRelation, d as Permission, f as PermissionKind, g as ResourceLevel, h as ResourceInit, i as DefinePermissionsOptions, k as MetaValue, l as FieldRelation, m as PrincipalRelation, n as ActionMeta, o as EdgeGroups, p as PermissionTree, r as ComputedRelation, s as EdgeMatch, v as ResourceMeta, w as ResourceRestricted, x as ResourceParent, y as ResourceNode } from "./permission-types-Dg39z9Kv.js";
3
+ import { a as RoleTree, c as definePlans, d as isPlan, f as isRole, i as RoleMeta, l as defineRoles, m as listRoles, n as PlanTree, o as Vocabulary, p as listPlans, r as Role, s as VocabularyOptions, t as Plan, u as findRole } from "./vocabulary-hhEFLFoL.js";
4
+ import { $ as sqlFunction, A as CustomRoleReader, B as memoryRelations, C as getResource, D as definePermissions, E as mergePermissions, F as permittedIds, G as composeMemberships, H as StripeEntitlementsClient, I as mayAccess, J as memoryEntitlementSource, K as countHolders, L as localSnapshotManifest, M as customRoleSource, N as PermittedIdsOptions, O as SnapshotForOptions, P as mayUse, Q as memorySnapshotSource, R as MemoryEdge, S as findPermission, T as listPermissions, U as fromStripeEntitlements, V as memoryLimitStore, W as claimsFirst, X as memoryRoleSource, Y as memoryMembershipSource, Z as memorySettings, _ as crud, a as toCsvRow, at as fromSnapshot, b as formerKeys, c as OcsfAuthorizeSession, ct as CustomRoleDropReason, d as parseDuration, dt as ResolvedCustomRole, et as opaque, f as normalizeApproval, ft as customRoleClaim, g as role, gt as principal, h as normalizeAssurance, ht as context, i as CSV_COLUMNS, it as emptySnapshot, j as CustomRoleSourceOptions, k as snapshotFor, l as accessToOcsf, lt as CustomRoleRename, m as deny, mt as validateCustomRole, n as delegatedPermissions, nt as separationConflicts, o as OCSF_VERSION, ot as parseSnapshot, p as allow, pt as resolveCustomRole, q as isExternallyManaged, r as catalogFingerprint, rt as requiresApproval, s as OcsfAccountChange, st as CustomRoleDrop, t as coveredByDelegation, tt as definePolicy, u as toOcsf, ut as CustomRoleValidation, v as readable, w as isPermission, x as resource, y as writable, z as MemoryRelationsData } from "./index-UdVQgq48.js";
5
+ import { n as PermDockValidationError } from "./validation-error-BSSw0l_8.js";
6
+ import { n as requiredPlans } from "./problem-details-rIIo8B2C.js";
7
+ import { a as ProblemDetails, i as PermDockRevokedError, n as PermDockApprovalRequiredError, o as RevokedCode, r as PermDockDeniedError } from "./errors-OD_4c__H.js";
8
+ import { t as InstanceOptions } from "./instance-options-plkrsAog.js";
9
+ import { t as RequestContext } from "./request-context-C2_1lchh.js";
10
+ import { n as PermDockWrap, r as wrapPermDock, t as PermDockOverrides } from "./wrap-Cr93qqdP.js";
9
11
  import { t as ClientNames } from "./clients-C7zLFuWT.js";
10
- import { a as CloudEvent, c as MemorySinkOptions, d as credentialEvent, f as membershipEvent, h as toCloudEvent, i as CatalogFindingCode, l as SignDecisionBatchOptions, m as signDecisionBatch, n as CatalogEventData, o as CloudEventType, p as memorySink, r as CatalogFinding, s as MemorySink, t as CLOUD_EVENT_TYPES, u as accessEvent } from "./sink-B1fZzIMf.js";
11
12
  import { i as memoryRevocationFeed, n as RevocationFeed, r as RevocationListener, t as RevocationEvent } from "./revocations-Cy06JNx2.js";
12
- import { i as describe, n as DescribeMessages, r as DescribeOptions, t as DecisionDescription } from "./describe-DMYiCjJV.js";
13
+ import { a as CloudEvent, c as MemorySinkOptions, d as credentialEvent, f as membershipEvent, h as toCloudEvent, i as CatalogFindingCode, l as SignDecisionBatchOptions, m as signDecisionBatch, n as CatalogEventData, o as CloudEventType, p as memorySink, r as CatalogFinding, s as MemorySink, t as CLOUD_EVENT_TYPES, u as accessEvent } from "./sink-CPN4zLfs.js";
14
+ import { i as describe, n as DescribeMessages, r as DescribeOptions, t as DecisionDescription } from "./describe-C3ldA9os.js";
13
15
  import { n as parsePermDockDigest, t as PermDockDigest } from "./digest-B3kc_PgQ.js";
14
- import { t as parseLocalSnapshotManifest } from "./parse-local-manifest-JLnaBH0S.js";
15
- import { a as LinkPolicyViolation, c as capabilitySubject, d as signCapability, i as LinkPolicy, l as linkPolicyViolation, n as CapabilityInput, o as LinkPrincipal, r as CapabilityRedeemer, s as SignCapabilityOptions, t as Capability, u as parseCapability } from "./capability-2kYTMWDv.js";
16
- export { APPROVAL_POLICY_UNAVAILABLE, type AccessEvent, type ActionMeta, type ActivateInput, type ActivationOption, type Actor, type AnyOfApprover, type ApprovalEscalation, type ApprovalMode, type ApprovalOption, type ApprovalPolicy, type ApprovalPolicyProblem, type ApprovalPolicySource, type ApprovalPolicyValidation, type ApprovalRequiredDecision, type ApprovalRequirement, type ApprovalStage, type Approver, type ApproverInput, type ArazzoFinding, type ArazzoPlan, type ArazzoSimulateInput, type ArazzoStepResult, type Assurance, type AssuranceRequirement, type AuthEvent, type AuthorizationDetail, type Binding, type BreakGlassOptions, type BreakGlassRequirements, type BreakGlassSpec, CLOUD_EVENT_TYPES, CSV_COLUMNS, type Capability, type CapabilityInput, type CapabilityRedeemer, type CatalogEventData, type CatalogFinding, type CatalogFindingCode, type ClientNames, type ClosureContext, type ClosureGrantFn, type CloudEvent, type CloudEventType, type ComputedRelation, type Condition, type ConditionRef, type ConditionValue, type Credential, type CredentialDecision, type CredentialEvent, type CredentialKind, type CredentialPermission, type CredentialPermissionInput, type CredentialPolicy, type CredentialPolicyViolation, type CredentialPrincipal, type CredentialRequest, type CredentialVerifier, type CustomRole, type CustomRoleDrop, type CustomRoleDropReason, type CustomRoleGrant, type CustomRoleReader, type CustomRoleRename, type CustomRoleSourceOptions, type CustomRoleValidation, type DecideCredentialOptions, type DecideOptions, type Decision, type DecisionDescription, type DecisionEvent, type DecisionProvider, type DecisionSink, type DefinePermissionsOptions, type Delegation, type DelegationInput, type DelegationTarget, type Denial, type DenialReason, type DeniedDecision, type DeriveOptions, type DescribeMessages, type DescribeOptions, type DirectoryEvent, type EdgeGroup, type EdgeGroups, type EdgeMatch, type EdgeRelation, type EntitlementSource, type ExplainedDecision, type FieldRelation, type GnapAccess, type Grant, type GrantCondition, type GrantLimit, type GrantOptions, type GrantScope, type GrantValidity, type GrantedDecision, type Grantee, type GranteeInput, type Holder, type HoldingVia, type HostedGrant, type HostedGrantDropReason, type HostedGrantDropped, type HostedGrantRef, type InheritGrantee, type InstanceOptions, type LimitConsumeInput, type LimitDetail, type LimitRemaining, type LimitStore, type LinkPolicy, type LinkPolicyViolation, type LinkPrincipal, type LocalCustomRoleTable, type LocalSnapshotManifest, type MatchedGrant, type MemberEntry, type MemberOfCondition, type MemberOfParent, type Membership, type MembershipEvent, type MembershipFixture, type MembershipSource, type MemoryEdge, type MemoryRelationsData, type MemorySink, type MemorySinkOptions, type MetaValue, OCSF_VERSION, type Obligation, type OcsfAccountChange, type OcsfAuthorizeSession, type PermDock, PermDockApprovalRequiredError, PermDockDeniedError, type PermDockDigest, type PermDockOptions, PermDockRevokedError, PermDockValidationError, type Permission, type PermissionApprover, type PermissionKind, type PermissionTree, type PermittedIdsOptions, type Plan, type PlanTree, type Policy, type PolicyDelegation, type PolicyDocument, type PolicyOAuthScope, type PolicyScopes, type PolicyScopesInput, type PolicySource, type Principal, type PrincipalOf, type PrincipalRelation, type ProblemDetails, type Quota, type RelatedCondition, type RelatedHop, type RelationChain, type RelationGrantee, type RelationGroup, type RelationHolder, type RelationSource, type ResolvedCustomRole, type ResourceInit, type ResourceLevel, type ResourceLink, type ResourceNode, type ResourceOptions, type ResourceParent, type ResourceRelation, type ResourceRelationInput, type ResourceRestricted, type RestrictedAncestors, type RevocationEvent, type RevocationFeed, type RevocationListener, type RevokedCode, type Role, type RoleBinding, type RoleChange, type RoleChangeDecision, type RoleChangeOptions, type RoleChangeTarget, type RoleMeta, type RoleOptions, type RoleScope, type RoleSource, type RoleSourceFactory, type RoleTree, type RowPair, type Scope, type ScopeDeclaration, type ScopeNames, type SeparationConflict, type SettingsSource, type SignCapabilityOptions, type SignDecisionBatchOptions, type SimulateOptions, type SinkEvent, type Snapshot, type SnapshotAssignable, type SnapshotForOptions, type SnapshotGrant, type SnapshotNotEntitled, type SnapshotOptions, type SnapshotScope, type SnapshotSource, type SqlFunctionArg, type SqlFunctionCondition, type StripeEntitlementsClient, type Subject, type SubjectOf, type SubjectResolver, type SupportAccessOptions, type SupportConsent, type TenantSettings, type TokenFailureCause, type TokenSigner, type TokenVerifier, type Trace, type TraceSkip, type TraceSkipReason, type UserApprover, type ValidateMode, type VerificationFailure, type VerifiedClaims, type VerifiedToken, type Vocabulary, type WhereCompiler, type WhereResult, type WhoCan, type WireDecision, type WireDenial, accessEvent, accessToOcsf, actor, allOf, allow, anyOf, anyone, arazzoFindings, assurance, authenticated, breakGlass, capabilitySubject, catalogFingerprint, claimsFirst, composeMemberships, context, countHolders, coveredByDelegation, createPermDock, credentialDelegation, credentialEvent, credentialPolicyViolation, credentialSubject, crud, customRoleClaim, customRoleSource, decideCredential, definePermissions, definePlans, definePolicy, defineRoles, delegatedPermissions, deny, describe, emptySnapshot, findPermission, findRole, formerKeys, fromSnapshot, fromStripeEntitlements, getResource, hasConditionOp, holder, inherit, isCondition, isConditionDate, isConditionRef, isExternallyManaged, isPermission, isPlan, isPortableCondition, isRole, isSqlFunctionField, linkPolicyViolation, listPermissions, listPlans, listRoles, localSnapshotManifest, mayAccess, mayUse, membershipEvent, memoryApprovalPolicies, memoryEntitlementSource, memoryLimitStore, memoryMembershipSource, memoryPolicySource, memoryRelations, memoryRevocationFeed, memoryRoleSource, memorySettings, memorySink, memorySnapshotSource, mergeHostedGrants, mergePermissions, normalizeApproval, normalizeAssurance, opaque, parseCapability, parseCredential, parseDuration, parseLocalSnapshotManifest, parsePermDockDigest, parsePolicyDocument, parseSnapshot, permittedIds, plan, principal, readable, relation, requiredPlans, requiresApproval, resolveCustomRole, resource, role, separationConflicts, signCapability, signDecisionBatch, simulateArazzo, snapshotFor, sqlFunction, supportAccess, toCloudEvent, toCsvRow, toOcsf, user, validateApprovalPolicy, validateCustomRole, writable };
16
+ import { t as parseLocalSnapshotManifest } from "./parse-local-manifest-DvYUR0QL.js";
17
+ import { a as LinkPolicyViolation, c as capabilitySubject, d as signCapability, i as LinkPolicy, l as linkPolicyViolation, n as CapabilityInput, o as LinkPrincipal, r as CapabilityRedeemer, s as SignCapabilityOptions, t as Capability, u as parseCapability } from "./capability-CksyCWDH.js";
18
+ export { APPROVAL_POLICY_UNAVAILABLE, type AccessEvent, type ActionMeta, type ActivateInput, type ActivationOption, type Actor, type AnyOfApprover, type AppData, type AppDataSchema, type AppObligation, type ApprovalEscalation, type ApprovalMode, type ApprovalOption, type ApprovalPolicy, type ApprovalPolicyProblem, type ApprovalPolicySource, type ApprovalPolicyValidation, type ApprovalRequiredDecision, type ApprovalRequirement, type ApprovalStage, type Approver, type ApproverInput, type ArazzoFinding, type ArazzoPlan, type ArazzoSimulateInput, type ArazzoStepResult, type Assurance, type AssuranceRequirement, type AuthEvent, type AuthorizationDetail, type Binding, type BreakGlassOptions, type BreakGlassRequirements, type BreakGlassSpec, CLOUD_EVENT_TYPES, CSV_COLUMNS, type Capability, type CapabilityInput, type CapabilityRedeemer, type CatalogEventData, type CatalogFinding, type CatalogFindingCode, type ClientNames, type ClosureContext, type ClosureGrantFn, type CloudEvent, type CloudEventType, type ComputedRelation, type Condition, type ConditionRef, type ConditionValue, type Credential, type CredentialDecision, type CredentialEvent, type CredentialKind, type CredentialPermission, type CredentialPermissionInput, type CredentialPolicy, type CredentialPolicyViolation, type CredentialPrincipal, type CredentialRequest, type CredentialVerifier, type CustomRole, type CustomRoleDrop, type CustomRoleDropReason, type CustomRoleGrant, type CustomRoleReader, type CustomRoleRename, type CustomRoleSourceOptions, type CustomRoleValidation, type DecideCredentialOptions, type DecideOptions, type Decision, type DecisionDescription, type DecisionEvent, type DecisionProvider, type DecisionSink, type DefinePermissionsOptions, type Delegation, type DelegationInput, type DelegationTarget, type Denial, type DenialDetails, type DenialReason, type DeniedDecision, type DeriveOptions, type DescribeMessages, type DescribeOptions, type DirectoryEvent, type EdgeGroup, type EdgeGroups, type EdgeMatch, type EdgeRelation, type EntitlementSource, type ExplainedDecision, type FieldRelation, type GnapAccess, type Grant, type GrantCondition, type GrantLimit, type GrantMeta, type GrantOptions, type GrantScope, type GrantValidity, type GrantedDecision, type Grantee, type GranteeInput, type Holder, type HoldingVia, type HostedGrant, type HostedGrantDropReason, type HostedGrantDropped, type HostedGrantRef, type InheritGrantee, type InstanceOptions, type LimitConsumeInput, type LimitDetail, type LimitRemaining, type LimitStore, type LinkPolicy, type LinkPolicyViolation, type LinkPrincipal, type LocalCustomRoleTable, type LocalSnapshotManifest, type MatchedGrant, type MemberEntry, type MemberOfCondition, type MemberOfParent, type Membership, type MembershipEvent, type MembershipFixture, type MembershipSource, type MemoryEdge, type MemoryRelationsData, type MemorySink, type MemorySinkOptions, type MetaValue, OCSF_VERSION, type Obligation, type ObligationInput, type OcsfAccountChange, type OcsfAuthorizeSession, type PermDock, PermDockApprovalRequiredError, PermDockDeniedError, type PermDockDigest, type PermDockOptions, type PermDockOverrides, PermDockRevokedError, PermDockValidationError, type PermDockWrap, type Permission, type PermissionApprover, type PermissionKind, type PermissionTree, type PermittedIdsOptions, type Plan, type PlanTree, type Policy, type PolicyAppDataSchemas, type PolicyDelegation, type PolicyDocument, type PolicyOAuthScope, type PolicyScopes, type PolicyScopesInput, type PolicySource, type Principal, type PrincipalOf, type PrincipalRelation, type ProblemDetails, type Quota, type RESOURCE_X, type RelatedCondition, type RelatedHop, type RelationChain, type RelationGrantee, type RelationGroup, type RelationHolder, type RelationSource, type RequestContext, type ResolvedCustomRole, type ResourceInit, type ResourceLevel, type ResourceLink, type ResourceMeta, type ResourceNode, type ResourceOptions, type ResourceParent, type ResourceRelation, type ResourceRelationInput, type ResourceRestricted, type ResourceXTree, type RestrictedAncestors, type RevocationEvent, type RevocationFeed, type RevocationListener, type RevokedCode, type Role, type RoleBinding, type RoleChange, type RoleChangeDecision, type RoleChangeOptions, type RoleChangeTarget, type RoleMeta, type RoleOptions, type RoleScope, type RoleSource, type RoleSourceFactory, type RoleTree, type RowPair, type Scope, type ScopeDeclaration, type ScopeNames, type SeparationConflict, type SettingsSource, type SignCapabilityOptions, type SignDecisionBatchOptions, type SimulateOptions, type SinkEvent, type Snapshot, type SnapshotAssignable, type SnapshotForOptions, type SnapshotGrant, type SnapshotNotEntitled, type SnapshotOptions, type SnapshotScope, type SnapshotSource, type SqlFunctionArg, type SqlFunctionCondition, type StripeEntitlementsClient, type Subject, type SubjectOf, type SubjectResolver, type SupportAccessOptions, type SupportConsent, type TenantSettings, type TokenFailureCause, type TokenSigner, type TokenVerifier, type Trace, type TraceSkip, type TraceSkipReason, type UserApprover, type ValidateMode, type VerificationFailure, type VerifiedClaims, type VerifiedToken, type Vocabulary, type VocabularyOptions, type WhereCompiler, type WhereResult, type WhoCan, type WireDecision, type WireDenial, accessEvent, accessToOcsf, actor, allOf, allow, anyOf, anyone, arazzoFindings, assurance, authenticated, breakGlass, capabilitySubject, catalogFingerprint, claimsFirst, composeMemberships, context, countHolders, coveredByDelegation, createPermDock, credentialDelegation, credentialEvent, credentialPolicyViolation, credentialSubject, crud, customRoleClaim, customRoleSource, decideCredential, definePermissions, definePlans, definePolicy, defineRoles, delegatedPermissions, deny, describe, emptySnapshot, findPermission, findRole, formerKeys, fromSnapshot, fromStripeEntitlements, getResource, hasConditionOp, holder, inherit, isCondition, isConditionDate, isConditionRef, isExternallyManaged, isPermission, isPlan, isPortableCondition, isRole, isSqlFunctionField, linkPolicyViolation, listPermissions, listPlans, listRoles, localSnapshotManifest, mayAccess, mayUse, membershipEvent, memoryApprovalPolicies, memoryEntitlementSource, memoryLimitStore, memoryMembershipSource, memoryPolicySource, memoryRelations, memoryRevocationFeed, memoryRoleSource, memorySettings, memorySink, memorySnapshotSource, mergeHostedGrants, mergePermissions, normalizeApproval, normalizeAssurance, opaque, parseCapability, parseCredential, parseDuration, parseLocalSnapshotManifest, parsePermDockDigest, parsePolicyDocument, parseSnapshot, permittedIds, plan, principal, readable, relation, requiredPlans, requiresApproval, resolveCustomRole, resource, role, separationConflicts, signCapability, signDecisionBatch, simulateArazzo, snapshotFor, sqlFunction, supportAccess, toCloudEvent, toCsvRow, toOcsf, user, validateApprovalPolicy, validateCustomRole, wrapPermDock, writable };
package/dist/index.js CHANGED
@@ -1,26 +1,26 @@
1
- import { _ as listPermissions, a as formerKeys, b as resource, c as getResource, i as findPermission, n as definePermissions, p as isPermission, v as mergePermissions } from "./permissions-DVoF6dMt.js";
2
- import { a as hasConditionOp, c as isConditionRef, l as isSqlFunctionField, o as isCondition, r as principal, s as isConditionDate, t as context } from "./refs-KYb4ntaz.js";
3
- import { S as opaque, _ as memoryLimitStore, a as definePolicy, d as normalizeApproval, f as normalizeAssurance, h as separationConflicts, m as role, o as deny, t as allow } from "./policy-xyWg7QdR.js";
4
- import { _ as memoryRoleSource, a as accessToOcsf, b as sqlFunction, c as readable, d as customRoleSource, f as mayAccess, g as memoryMembershipSource, h as memoryEntitlementSource, i as OCSF_VERSION, l as writable, m as fromStripeEntitlements, n as CSV_COLUMNS, o as toOcsf, p as localSnapshotManifest, r as toCsvRow, s as crud, t as catalogFingerprint, u as snapshotFor, v as memorySettings, y as memorySnapshotSource } from "./src-BDwEZWrZ.js";
5
- import { a as holder, l as user, n as anyOf, t as allOf } from "./approvers-DT4AVyIg.js";
6
- import { n as PermDockValidationError } from "./validation-error-CnjZ4t92.js";
7
- import { r as requiredPlans } from "./problem-details-_AMOYz-w.js";
8
- import { t as describe } from "./describe-B_gVZEVi.js";
1
+ import { a as hasConditionOp, c as isConditionRef, l as isSqlFunctionField, o as isCondition, r as principal, s as isConditionDate, t as context } from "./refs-f3imMjNW.js";
2
+ import { a as deny, n as role, p as normalizeApproval, r as allow, t as normalizeAssurance, u as memoryLimitStore, v as opaque } from "./role-builder-B4GbKM-i.js";
3
+ import { _ as memorySettings, a as readable, c as snapshotFor, d as localSnapshotManifest, f as memoryRelations, g as memoryRoleSource, h as memoryMembershipSource, i as crud, l as customRoleSource, m as memoryEntitlementSource, n as CSV_COLUMNS, o as writable, p as fromStripeEntitlements, r as toCsvRow, s as definePermissions, t as catalogFingerprint, u as mayAccess, v as memorySnapshotSource, y as sqlFunction } from "./src-Bb7no-hS.js";
4
+ import { a as holder, l as user, n as anyOf, t as allOf } from "./approvers-CqPOLD-o.js";
5
+ import { n as PermDockValidationError } from "./validation-error-ZfUHbKvf.js";
6
+ import { r as requiredPlans } from "./problem-details-DECUnXAn.js";
7
+ import { t as describe } from "./describe-Cgkp7eP0.js";
9
8
  import { r as parsePermDockDigest } from "./digest-BI-6aa6d.js";
10
- import { n as PermDockDeniedError, r as PermDockRevokedError, t as PermDockApprovalRequiredError } from "./errors-Cz5zn0mW.js";
9
+ import { n as PermDockDeniedError, r as PermDockRevokedError, t as PermDockApprovalRequiredError } from "./errors-drnfxYtm.js";
11
10
  import { t as memoryRevocationFeed } from "./revocations-Bhr0aMIC.js";
12
- import { f as simulateArazzo, n as parseSnapshot, u as arazzoFindings } from "./snapshot-Enxd0n-s.js";
11
+ import { g as simulateArazzo, l as delegatedPermissions, m as arazzoFindings, n as parseSnapshot, s as coveredByDelegation } from "./snapshot-Dc9CHPME.js";
13
12
  import { t as parseDuration } from "./duration-xK2jGFVc.js";
14
- import { C as isPlan, E as listRoles, S as findRole, T as listPlans, a as authenticated, b as definePlans, c as inherit, f as plan, i as assurance, n as anyone, p as relation, t as actor, w as isRole, x as defineRoles } from "./grantee-Cv5Sogfv.js";
13
+ import { _ as resource, a as getResource, c as listPermissions, h as formerKeys, l as mergePermissions, n as findPermission, o as isPermission } from "./permission-registry-BsblpB-z.js";
14
+ import { _ as listPlans, a as authenticated, c as plan, f as definePlans, g as isRole, h as isPlan, i as assurance, l as relation, m as findRole, n as anyone, p as defineRoles, s as inherit, t as actor, v as listRoles } from "./grantee-CXY-0C87.js";
15
+ import { d as separationConflicts, i as parsePolicyDocument, n as memoryPolicySource, o as definePolicy, r as mergeHostedGrants, t as isPortableCondition } from "./hosted-CBHgkzDl.js";
15
16
  import { t as requiresApproval } from "./approval-required-TzNB9oQA.js";
16
- import { i as parsePolicyDocument, n as memoryPolicySource, r as mergeHostedGrants, t as isPortableCondition } from "./hosted-DJQw46hn.js";
17
- import { C as countHolders, D as memoryApprovalPolicies, O as validateApprovalPolicy, S as composeMemberships, T as APPROVAL_POLICY_UNAVAILABLE, b as validateCustomRole, d as breakGlass, f as supportAccess, h as customRoleClaim, t as createPermDock, w as isExternallyManaged, x as claimsFirst, y as resolveCustomRole } from "./permdock-CbgvLnuo.js";
18
- import { t as memoryRelations } from "./relations-cjOL01hZ.js";
19
- import { r as delegatedPermissions, t as coveredByDelegation } from "./delegation-D8pUEuce.js";
20
- import { n as fromSnapshot, t as emptySnapshot } from "./from-snapshot-CTLijvdm.js";
21
- import { t as parseLocalSnapshotManifest } from "./parse-local-manifest-BrMozJCo.js";
22
- import { n as permittedIds, t as mayUse } from "./may-use-DndQ5tQ-.js";
23
- import { a as memorySink, i as membershipEvent, n as accessEvent, o as signDecisionBatch, r as credentialEvent, s as toCloudEvent, t as CLOUD_EVENT_TYPES } from "./sink-Bd9PSyfq.js";
24
- import { c as signCapability, i as linkPolicyViolation, o as parseCapability, t as capabilitySubject } from "./capability-4qPdO9gk.js";
25
- import { a as decideCredential, n as credentialPolicyViolation, o as parseCredential, r as credentialSubject, t as credentialDelegation } from "./credential-8P81ff4u.js";
26
- export { APPROVAL_POLICY_UNAVAILABLE, CLOUD_EVENT_TYPES, CSV_COLUMNS, OCSF_VERSION, PermDockApprovalRequiredError, PermDockDeniedError, PermDockRevokedError, PermDockValidationError, accessEvent, accessToOcsf, actor, allOf, allow, anyOf, anyone, arazzoFindings, assurance, authenticated, breakGlass, capabilitySubject, catalogFingerprint, claimsFirst, composeMemberships, context, countHolders, coveredByDelegation, createPermDock, credentialDelegation, credentialEvent, credentialPolicyViolation, credentialSubject, crud, customRoleClaim, customRoleSource, decideCredential, definePermissions, definePlans, definePolicy, defineRoles, delegatedPermissions, deny, describe, emptySnapshot, findPermission, findRole, formerKeys, fromSnapshot, fromStripeEntitlements, getResource, hasConditionOp, holder, inherit, isCondition, isConditionDate, isConditionRef, isExternallyManaged, isPermission, isPlan, isPortableCondition, isRole, isSqlFunctionField, linkPolicyViolation, listPermissions, listPlans, listRoles, localSnapshotManifest, mayAccess, mayUse, membershipEvent, memoryApprovalPolicies, memoryEntitlementSource, memoryLimitStore, memoryMembershipSource, memoryPolicySource, memoryRelations, memoryRevocationFeed, memoryRoleSource, memorySettings, memorySink, memorySnapshotSource, mergeHostedGrants, mergePermissions, normalizeApproval, normalizeAssurance, opaque, parseCapability, parseCredential, parseDuration, parseLocalSnapshotManifest, parsePermDockDigest, parsePolicyDocument, parseSnapshot, permittedIds, plan, principal, readable, relation, requiredPlans, requiresApproval, resolveCustomRole, resource, role, separationConflicts, signCapability, signDecisionBatch, simulateArazzo, snapshotFor, sqlFunction, supportAccess, toCloudEvent, toCsvRow, toOcsf, user, validateApprovalPolicy, validateCustomRole, writable };
17
+ import { C as countHolders, D as memoryApprovalPolicies, O as validateApprovalPolicy, S as composeMemberships, T as APPROVAL_POLICY_UNAVAILABLE, b as validateCustomRole, d as breakGlass, f as supportAccess, h as customRoleClaim, t as createPermDock, w as isExternallyManaged, x as claimsFirst, y as resolveCustomRole } from "./permdock-L26udHSk.js";
18
+ import { n as fromSnapshot, t as emptySnapshot } from "./from-snapshot-7REQZe0H.js";
19
+ import { t as parseLocalSnapshotManifest } from "./parse-local-manifest-C-q02Pal.js";
20
+ import { n as wrapPermDock } from "./wrap-DWsU_5Bd.js";
21
+ import { n as permittedIds, t as mayUse } from "./may-use-BOn_dR_w.js";
22
+ import { a as memorySink, i as membershipEvent, n as accessEvent, o as signDecisionBatch, r as credentialEvent, s as toCloudEvent, t as CLOUD_EVENT_TYPES } from "./sink-BTtmfPnE.js";
23
+ import { i as toOcsf, n as accessToOcsf, t as OCSF_VERSION } from "./ocsf-uYFXGVw2.js";
24
+ import { c as signCapability, i as linkPolicyViolation, o as parseCapability, t as capabilitySubject } from "./capability-txATtKV4.js";
25
+ import { a as decideCredential, n as credentialPolicyViolation, o as parseCredential, r as credentialSubject, t as credentialDelegation } from "./credential-kue0qpbm.js";
26
+ export { APPROVAL_POLICY_UNAVAILABLE, CLOUD_EVENT_TYPES, CSV_COLUMNS, OCSF_VERSION, PermDockApprovalRequiredError, PermDockDeniedError, PermDockRevokedError, PermDockValidationError, accessEvent, accessToOcsf, actor, allOf, allow, anyOf, anyone, arazzoFindings, assurance, authenticated, breakGlass, capabilitySubject, catalogFingerprint, claimsFirst, composeMemberships, context, countHolders, coveredByDelegation, createPermDock, credentialDelegation, credentialEvent, credentialPolicyViolation, credentialSubject, crud, customRoleClaim, customRoleSource, decideCredential, definePermissions, definePlans, definePolicy, defineRoles, delegatedPermissions, deny, describe, emptySnapshot, findPermission, findRole, formerKeys, fromSnapshot, fromStripeEntitlements, getResource, hasConditionOp, holder, inherit, isCondition, isConditionDate, isConditionRef, isExternallyManaged, isPermission, isPlan, isPortableCondition, isRole, isSqlFunctionField, linkPolicyViolation, listPermissions, listPlans, listRoles, localSnapshotManifest, mayAccess, mayUse, membershipEvent, memoryApprovalPolicies, memoryEntitlementSource, memoryLimitStore, memoryMembershipSource, memoryPolicySource, memoryRelations, memoryRevocationFeed, memoryRoleSource, memorySettings, memorySink, memorySnapshotSource, mergeHostedGrants, mergePermissions, normalizeApproval, normalizeAssurance, opaque, parseCapability, parseCredential, parseDuration, parseLocalSnapshotManifest, parsePermDockDigest, parsePolicyDocument, parseSnapshot, permittedIds, plan, principal, readable, relation, requiredPlans, requiresApproval, resolveCustomRole, resource, role, separationConflicts, signCapability, signDecisionBatch, simulateArazzo, snapshotFor, sqlFunction, supportAccess, toCloudEvent, toCsvRow, toOcsf, user, validateApprovalPolicy, validateCustomRole, wrapPermDock, writable };
@@ -1,4 +1,4 @@
1
- import { un as PermDockOptions } from "./policy-IB6yxpC3.js";
1
+ import { Mt as PermDockOptions } from "./policy-types-sp9P1iIV.js";
2
2
  //#region src/core/instance-options.d.ts
3
3
  type InstanceKey = "memberships" | "relations" | "entitlements" | "customRoles" | "policies" | "approvalPolicies" | "sink" | "limits";
4
4
  /**
@@ -1,3 +1,4 @@
1
+ import { r as isRecord } from "./compact-CAf557ZB.js";
1
2
  //#region src/core/json-schema.ts
2
3
  function issue(issues, path, message) {
3
4
  issues.push({
@@ -5,9 +6,6 @@ function issue(issues, path, message) {
5
6
  path: [...path]
6
7
  });
7
8
  }
8
- function isRecord(value) {
9
- return value !== null && typeof value === "object" && !Array.isArray(value);
10
- }
11
9
  /**
12
10
  * A plain-data copy built from own enumerable keys, so `__proto__` stays an
13
11
  * ordinary key and nothing the input inherits is read. Anything JSON cannot
@@ -1,7 +1,7 @@
1
- import { Ft as TokenVerifier, Nr as Principal, Nt as TokenFailureCause, Pr as Subject, Pt as TokenSigner, ct as JwtClaims, et as AuthEvent } from "../policy-IB6yxpC3.js";
2
- import { a as JsonWebKeySet, c as JwtJwks, d as MappedSubject, g as ReplayStore, i as JoseTokenVerifierOptions, l as JwtPrincipal, n as DpopProofResult, o as JwtAlgorithm, r as JoseTokenSignerOptions, s as JwtClaimPaths, t as DiscoveryInput, u as JwtSubjectOptions } from "../types-Cq_H8N_X.js";
3
- import { i as LinkPolicy, o as LinkPrincipal, t as Capability } from "../capability-2kYTMWDv.js";
4
- import { t as memoryReplayStore } from "../replay-CYyiLiwO.js";
1
+ import { K as JwtClaims, Or as Principal, ct as TokenFailureCause, kr as Subject, lt as TokenSigner, ut as TokenVerifier, yn as AuthEvent } from "../policy-types-sp9P1iIV.js";
2
+ import { a as JsonWebKeySet, c as JwtJwks, d as MappedSubject, g as ReplayStore, i as JoseTokenVerifierOptions, l as JwtPrincipal, n as DpopProofResult, o as JwtAlgorithm, r as JoseTokenSignerOptions, s as JwtClaimPaths, t as DiscoveryInput, u as JwtSubjectOptions } from "../types-C0dee0Qf.js";
3
+ import { i as LinkPolicy, o as LinkPrincipal, t as Capability } from "../capability-CksyCWDH.js";
4
+ import { t as memoryReplayStore } from "../replay-COpmZUfx.js";
5
5
  import { StandardSchemaV1 } from "@standard-schema/spec";
6
6
  //#region src/jwt/capability.d.ts
7
7
  /** `on('auth')` causes: a verification failure, or one of the three capability checks. */
package/dist/jwt/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { t as compact } from "../compact-y6vfu2_f.js";
1
+ import { r as isRecord, t as compact } from "../compact-CAf557ZB.js";
2
2
  import { n as freezeDeep } from "../freeze-CrU8nQeX.js";
3
3
  import { n as sha256, t as bytesToBase64Url } from "../sha256-BO0swRXL.js";
4
4
  import { t as anonymousSubject } from "../subject-C6dLxqHU.js";
5
- import { i as linkPolicyViolation, o as parseCapability, s as redeemerAllows, t as capabilitySubject } from "../capability-4qPdO9gk.js";
6
- import { a as decodeHeader, i as issuerFromDiscovery, n as assertSubjectConfig, o as normalizeTyp, r as fail, t as joseTokenVerifier } from "../verifier-BxBo6I44.js";
5
+ import { i as linkPolicyViolation, o as parseCapability, s as redeemerAllows, t as capabilitySubject } from "../capability-txATtKV4.js";
6
+ import { a as decodeHeader, i as issuerFromDiscovery, n as assertSubjectConfig, o as normalizeTyp, r as fail, t as joseTokenVerifier } from "../verifier-DMr_Zmb_.js";
7
7
  import { t as loadJose } from "../load-jose-BL6LH4bL.js";
8
- import { n as mapClaimsToSubject, r as validateCustomClaims, t as acceptMismatch } from "../map-claims-Z4QZOiFF.js";
8
+ import { n as mapClaimsToSubject, r as validateCustomClaims, t as acceptMismatch } from "../map-claims-AVlBaJoa.js";
9
9
  import { t as memoryReplayStore } from "../replay-BsOyTrdV.js";
10
10
  //#region src/jwt/capability.ts
11
11
  function emit(options, reason, cause, token) {
@@ -329,12 +329,9 @@ function emitAuth$1(options, cause) {
329
329
  requestId: options.requestId
330
330
  }));
331
331
  }
332
- function isRecord$1(value) {
333
- return value !== null && typeof value === "object" && !Array.isArray(value);
334
- }
335
332
  function keyToCnf(key) {
336
- if (!isRecord$1(key)) return;
337
- if (isRecord$1(key["jwk"])) return { jwk: key["jwk"] };
333
+ if (!isRecord(key)) return;
334
+ if (isRecord(key["jwk"])) return { jwk: key["jwk"] };
338
335
  return { jwk: key };
339
336
  }
340
337
  function introspectionToClaims(body) {
@@ -401,7 +398,7 @@ function boundToConfig(body, options) {
401
398
  }
402
399
  function subjectFromIntrospection(response, options = {}) {
403
400
  try {
404
- if (!isRecord$1(response) || response["active"] !== true || !boundToConfig(response, options)) return anonymousSubject();
401
+ if (!isRecord(response) || response["active"] !== true || !boundToConfig(response, options)) return anonymousSubject();
405
402
  const mapped = mapClaimsToSubject(introspectionToClaims(response), options);
406
403
  if (mapped.invalidChain) {
407
404
  emitAuth$1(options, "invalid-chain");
@@ -421,9 +418,6 @@ const SIGNING_ALGS = /* @__PURE__ */ new Set([
421
418
  "Ed25519",
422
419
  "RS256"
423
420
  ]);
424
- function isRecord(value) {
425
- return value !== null && typeof value === "object" && !Array.isArray(value);
426
- }
427
421
  function publicJwk(key) {
428
422
  const { d: _d, p: _p, q: _q, dp: _dp, dq: _dq, qi: _qi, k: _k, ...pub } = key;
429
423
  return pub;
@@ -507,6 +501,12 @@ async function extraMemberships(options, subject, tenant) {
507
501
  }
508
502
  });
509
503
  } catch {
504
+ options.onAuth?.(compact({
505
+ reason: "source-threw",
506
+ source: "memberships",
507
+ issuer: options.issuer,
508
+ requestId: options.requestId
509
+ }));
510
510
  return subject;
511
511
  }
512
512
  }
@@ -1,12 +1,27 @@
1
- import { t as compact } from "./compact-y6vfu2_f.js";
2
- import { t as describe } from "./describe-B_gVZEVi.js";
3
- import { a as deniedMessage } from "./errors-Cz5zn0mW.js";
4
- import { t as createPermDock } from "./permdock-CbgvLnuo.js";
1
+ import { t as compact } from "./compact-CAf557ZB.js";
2
+ import { t as describe } from "./describe-Cgkp7eP0.js";
3
+ import { a as deniedMessage } from "./errors-drnfxYtm.js";
5
4
  import { n as resourceRef } from "./resource-ref-CaS9yVPi.js";
6
- import { t as mayUse } from "./may-use-DndQ5tQ-.js";
7
- import { l as storedApprovalToken, s as resumeDecision } from "./helpers-H_KARDVC.js";
8
- import { t as instanceOptions } from "./instance-options-Dhhcnm3y.js";
5
+ import { t as mayUse } from "./may-use-BOn_dR_w.js";
6
+ import { l as storedApprovalToken, s as resumeDecision } from "./helpers-C9YmyBIa.js";
7
+ import { n as resolveOrNull } from "./build-instance-DIIV9DbC.js";
9
8
  import { n as tenantScope, t as actorFrom } from "./adapter-context-mlWsVGGg.js";
9
+ import { n as requestContext, t as buildReportingInstance } from "./request-context-BVM7aWNs.js";
10
+ //#region src/agent/denied-text.ts
11
+ /** The hook's text, or `event.text` when there is no hook or it throws or returns no string. */
12
+ function deniedText(hook, event, report) {
13
+ if (hook === void 0) return event.text;
14
+ try {
15
+ const text = hook(event);
16
+ if (text === void 0) return event.text;
17
+ if (typeof text !== "string" || text === "") throw new TypeError("PermDock: onDenied must return a non-empty string or undefined");
18
+ return text;
19
+ } catch (error) {
20
+ report(error);
21
+ return event.text;
22
+ }
23
+ }
24
+ //#endregion
10
25
  //#region src/agent/reason.ts
11
26
  function modelReason(decision, permission, subjectId) {
12
27
  if (decision.outcome === "denied") return deniedMessage(permission?.key ?? "unknown", subjectId, decision.denials, decision.alternatives.map((leaf) => leaf.key));
@@ -31,33 +46,40 @@ function runDecide(permdock, permission, data, how) {
31
46
  }
32
47
  function createAgentKernel(policy, options) {
33
48
  const cache = /* @__PURE__ */ new WeakMap();
49
+ const reporters = /* @__PURE__ */ new WeakMap();
50
+ const report = (permdock, error) => {
51
+ if (permdock !== void 0) reporters.get(permdock)?.(error);
52
+ };
34
53
  const instance = (context) => {
35
54
  if (typeof context === "object" && context !== null) {
36
55
  const hit = cache.get(context);
37
56
  if (hit !== void 0) return hit;
38
57
  }
39
58
  const built = (async () => {
40
- let user = null;
41
- try {
42
- user = await options.subject(context);
43
- } catch {
44
- user = null;
45
- }
59
+ const user = await resolveOrNull(() => options.subject(context));
46
60
  const actor = await actorFrom(options.actor, context);
47
- let delegation;
48
- if (options.delegation !== void 0) try {
49
- delegation = await options.delegation(context);
50
- } catch {
51
- delegation = void 0;
52
- }
61
+ const delegate = options.delegation;
62
+ const delegation = delegate === void 0 ? void 0 : await resolveOrNull(() => delegate(context)) ?? void 0;
53
63
  const { tenant } = await tenantScope(options.tenant, context);
54
- const created = await createPermDock(policy, user, compact({
55
- tenant,
56
- actor,
57
- delegation,
58
- ...instanceOptions(options)
59
- }));
60
- return options.wrap?.(created) ?? created;
64
+ const errors = [];
65
+ const requestValues = await requestContext(options.context, context, errors);
66
+ const wrap = options.wrap;
67
+ const typedWrap = (created) => wrap === void 0 ? created : wrap(created);
68
+ const { permdock, report: reportTo } = await buildReportingInstance({
69
+ policy,
70
+ user,
71
+ sources: options,
72
+ scope: {
73
+ tenant,
74
+ actor,
75
+ delegation,
76
+ context: requestValues
77
+ },
78
+ errors,
79
+ wrap: typedWrap
80
+ });
81
+ reporters.set(permdock, reportTo);
82
+ return permdock;
61
83
  })();
62
84
  if (typeof context === "object" && context !== null) {
63
85
  cache.set(context, built);
@@ -125,8 +147,7 @@ function createAgentKernel(policy, options) {
125
147
  source: checkOptions.simulate === true ? "simulate" : "adapter",
126
148
  decideOptions: checkOptions
127
149
  });
128
- const evaluate = async (binding, toolName, args, context, decideOptions = {}) => {
129
- const checked = await check(binding, args, context, decideOptions);
150
+ const verdictOf = (checked, binding, toolName) => {
130
151
  if (!checked.ok) {
131
152
  if (checked.failure !== "no-data" || checked.permdock === void 0) return {
132
153
  outcome: "denied",
@@ -171,6 +192,33 @@ function createAgentKernel(policy, options) {
171
192
  reason: modelReason(decision, binding.permission, permdock.subject.principal?.id)
172
193
  };
173
194
  };
195
+ const evaluate = async (binding, toolName, args, context, decideOptions = {}) => {
196
+ const checked = await check(binding, args, context, decideOptions);
197
+ return relabel(verdictOf(checked, binding, toolName), checked.permdock);
198
+ };
199
+ const relabel = (verdict, permdock) => {
200
+ const hook = options.onDenied;
201
+ if (hook === void 0 || verdict.outcome === "granted") return verdict;
202
+ const onError = (error) => {
203
+ report(permdock, error);
204
+ };
205
+ if (verdict.outcome === "denied") return {
206
+ ...verdict,
207
+ reason: deniedText(hook, {
208
+ decision: verdict.decision,
209
+ permission: verdict.permission,
210
+ text: verdict.reason
211
+ }, onError)
212
+ };
213
+ return {
214
+ ...verdict,
215
+ summary: deniedText(hook, {
216
+ decision: verdict.decision,
217
+ permission: verdict.permission,
218
+ text: verdict.summary
219
+ }, onError)
220
+ };
221
+ };
174
222
  const tokenFor = async (binding, args, context) => {
175
223
  const checked = await run(binding, args, context, {
176
224
  resume: false,
@@ -181,12 +229,12 @@ function createAgentKernel(policy, options) {
181
229
  };
182
230
  const decideTool = (toolName, args, context, decideOptions = {}) => {
183
231
  const binding = Object.hasOwn(tools, toolName) ? tools[toolName] : void 0;
184
- if (binding === void 0) return Promise.resolve({
232
+ if (binding === void 0) return Promise.resolve(relabel({
185
233
  outcome: "denied",
186
234
  decision: null,
187
235
  permission: void 0,
188
236
  reason: unmappedReason(toolName)
189
- });
237
+ }, void 0));
190
238
  return evaluate(binding, toolName, args, context, decideOptions);
191
239
  };
192
240
  const allowedToolNames = async (context) => {
@@ -201,8 +249,9 @@ function createAgentKernel(policy, options) {
201
249
  evaluate,
202
250
  check,
203
251
  tokenFor,
204
- allowedToolNames
252
+ allowedToolNames,
253
+ report
205
254
  };
206
255
  }
207
256
  //#endregion
208
- export { createAgentKernel as n, approvalTokenOf as t };
257
+ export { createAgentKernel as n, deniedText as r, approvalTokenOf as t };
@@ -1,6 +1,6 @@
1
- import { Ir as Condition, Pr as Subject, mn as WhereResult } from "../policy-IB6yxpC3.js";
1
+ import { It as WhereResult, jr as Condition, kr as Subject } from "../policy-types-sp9P1iIV.js";
2
2
  import { r as RelationsMapping } from "../graph-sql-B-dsAT6j.js";
3
- import { s as MembershipsMapping } from "../compile-BkRyBDBw.js";
3
+ import { s as MembershipsMapping } from "../compile-CtTP7eur.js";
4
4
  import { n as WithSubjectOptions, t as RowCheck } from "../row-check-Dt35czLy.js";
5
5
  //#region src/kysely/types.d.ts
6
6
  type KyselySelectQuery = {
@@ -1,7 +1,7 @@
1
- import { t as compact } from "../compact-y6vfu2_f.js";
2
- import { w as assertSafeKey } from "../permissions-DVoF6dMt.js";
3
- import { n as escapeLike, t as compileWhere } from "../compile-Ba4blROR.js";
4
- import { i as rowCheckFrom, r as subjectStatements, t as statementTemplate } from "../subject-settings-BwBmCdTR.js";
1
+ import { t as compact } from "../compact-CAf557ZB.js";
2
+ import { a as assertSafeKey } from "../thenable-QSmvt-vZ.js";
3
+ import { n as escapeLike, t as compileWhere } from "../compile-CcEu2ZQ1.js";
4
+ import { a as rowCheckFrom, i as templateOf, r as subjectStatements, s as loadPeer, t as statementTemplate } from "../subject-settings-CkEwrw3W.js";
5
5
  //#region src/kysely/to-where.ts
6
6
  function ident(name) {
7
7
  assertSafeKey(name, "sql identifier");
@@ -34,13 +34,7 @@ function containsExpr(eb, column, field, value, options) {
34
34
  }
35
35
  function loadSql(injected) {
36
36
  if (injected !== void 0) return injected;
37
- const loader = globalThis.process?.getBuiltinModule?.("node:module");
38
- try {
39
- if (loader === void 0) throw new Error("no module loader");
40
- return loader.createRequire(import.meta.url)("kysely").sql;
41
- } catch {
42
- throw new Error("PermDock: graph grants and withSubject in permdock/kysely need the kysely peer; pass `sql` on runtimes without require");
43
- }
37
+ return loadPeer("kysely", "PermDock: graph grants and withSubject in permdock/kysely need the kysely peer; pass `sql` on runtimes without require").sql;
44
38
  }
45
39
  function graphExpr(node, table, options) {
46
40
  const sql = loadSql(options.sql);
@@ -54,9 +48,7 @@ function graphExpr(node, table, options) {
54
48
  values.push("column" in part ? sql.ref(col(table, part.column, options.columns)) : "subject" in part ? node.subject : part.value);
55
49
  strings.push("");
56
50
  }
57
- const template = strings;
58
- Object.defineProperty(template, "raw", { value: strings });
59
- return sql(template, ...values);
51
+ return sql(templateOf(strings), ...values);
60
52
  }
61
53
  function render(eb, node, table, options) {
62
54
  switch (node.kind) {
@@ -1,6 +1,7 @@
1
1
  import { createContext, useLayoutEffect, useRef, useState } from "react";
2
2
  //#region src/react/context.ts
3
3
  const PermDockStoreContext = createContext(null);
4
+ const PermDockUiContext = createContext({});
4
5
  const PermDockSnapshotPromiseContext = createContext(null);
5
6
  //#endregion
6
7
  //#region src/react/keyed.ts
@@ -34,7 +35,8 @@ function sameHeaders(a, b) {
34
35
  * Store options whose identity survives a re-render, so an inline `headers`
35
36
  * object or `fetch` arrow does not rebuild the store and drop its snapshot.
36
37
  * `headers` compare by value, unless `headersByValue` is `false` for a store
37
- * that only reads `readHeaders`; `fetch` and `verifier` call the latest prop.
38
+ * that only reads `readHeaders`; `fetch`, `verifier`, `onSnapshot` and
39
+ * `onClear` call the latest prop.
38
40
  */
39
41
  function useLiveOptions(props, headersByValue = true) {
40
42
  const latest = useRef(props);
@@ -49,12 +51,23 @@ function useLiveOptions(props, headersByValue = true) {
49
51
  const verifier = latest.current.verifier;
50
52
  return verifier === void 0 ? Promise.reject(/* @__PURE__ */ new Error("PermDock: the verifier prop was removed.")) : verifier.verify(token, expectations);
51
53
  } }));
54
+ const [liveOnSnapshot] = useState(() => {
55
+ const call = (snapshot, tenant, raw) => {
56
+ latest.current.onSnapshot?.(snapshot, tenant, raw);
57
+ };
58
+ return call;
59
+ });
60
+ const [liveOnClear] = useState(() => () => {
61
+ latest.current.onClear?.();
62
+ });
52
63
  return {
53
64
  headers,
54
65
  readHeaders,
55
66
  fetch: liveFetch,
56
- verifier: props.verifier === void 0 ? void 0 : liveVerifier
67
+ verifier: props.verifier === void 0 ? void 0 : liveVerifier,
68
+ onSnapshot: props.onSnapshot === void 0 ? void 0 : liveOnSnapshot,
69
+ onClear: props.onClear === void 0 ? void 0 : liveOnClear
57
70
  };
58
71
  }
59
72
  //#endregion
60
- export { PermDockStoreContext as i, useKeyed as n, PermDockSnapshotPromiseContext as r, useLiveOptions as t };
73
+ export { PermDockUiContext as a, PermDockStoreContext as i, useKeyed as n, PermDockSnapshotPromiseContext as r, useLiveOptions as t };
@@ -0,0 +1,2 @@
1
+ import { a as loadModule, s as pickNamed } from "./load-C3_oTHyO.js";
2
+ export { loadModule, pickNamed };
@@ -1,4 +1,4 @@
1
- import { _ as listPermissions } from "./permissions-DVoF6dMt.js";
1
+ import { c as listPermissions } from "./permission-registry-BsblpB-z.js";
2
2
  import { dirname, resolve } from "node:path";
3
3
  import { pathToFileURL } from "node:url";
4
4
  import { createJiti } from "jiti";
@@ -62,14 +62,22 @@ function asPolicy(value) {
62
62
  function leavesOf(tree) {
63
63
  return listPermissions(tree);
64
64
  }
65
+ /** The `policy` export of the module at `path`. */
66
+ async function loadPolicyAt(cwd, path, options) {
67
+ return asPolicy(pickNamed(await loadModule(resolve(cwd, path), options), ["policy"]));
68
+ }
69
+ /** The `policy` export at `path`; without one, throws `PermDock CLI: <missing>`. */
70
+ function requirePolicy(cwd, path, missing) {
71
+ return path === void 0 ? Promise.reject(/* @__PURE__ */ new Error(`PermDock CLI: ${missing}`)) : loadPolicyAt(cwd, path);
72
+ }
65
73
  /** The configured policy export, or `undefined` when unset or unloadable. */
66
74
  async function loadConfiguredPolicy(cwd, path, options) {
67
75
  if (path === void 0) return;
68
76
  try {
69
- return asPolicy(pickNamed(await loadModule(resolve(cwd, path), options), ["policy"]));
77
+ return await loadPolicyAt(cwd, path, options);
70
78
  } catch {
71
79
  return;
72
80
  }
73
81
  }
74
82
  //#endregion
75
- export { loadModule as a, loadConfiguredPolicy as i, asPolicy as n, pickNamed as o, leavesOf as r, asPermissionTree as t };
83
+ export { loadModule as a, requirePolicy as c, loadConfiguredPolicy as i, asPolicy as n, loadPolicyAt as o, leavesOf as r, pickNamed as s, asPermissionTree as t };
@@ -1,11 +1,11 @@
1
- import { t as compact } from "./compact-y6vfu2_f.js";
1
+ import { r as isRecord, t as compact } from "./compact-CAf557ZB.js";
2
2
  import { n as freezeDeep } from "./freeze-CrU8nQeX.js";
3
- import { n as PermDockValidationError } from "./validation-error-CnjZ4t92.js";
4
- import { t as ignoreRejection } from "./thenable-okc2xDsj.js";
3
+ import { r as validateRecord } from "./thenable-QSmvt-vZ.js";
4
+ import { n as PermDockValidationError } from "./validation-error-ZfUHbKvf.js";
5
5
  import { t as anonymousSubject } from "./subject-C6dLxqHU.js";
6
6
  import { t as clientNameOf } from "./clients-DjU5ABMy.js";
7
7
  import "./budget-NbEtbJC_.js";
8
- import { n as copyJson, t as checkSchema } from "./json-schema-BsAflUGW.js";
8
+ import { n as copyJson, t as checkSchema } from "./json-schema-DBkdUuCO.js";
9
9
  //#region src/supabase/subject.ts
10
10
  const REGISTERED = /* @__PURE__ */ new Set([
11
11
  "sub",
@@ -28,9 +28,6 @@ const REGISTERED = /* @__PURE__ */ new Set([
28
28
  "client_id",
29
29
  "scope"
30
30
  ]);
31
- function isRecord(value) {
32
- return value !== null && typeof value === "object" && !Array.isArray(value);
33
- }
34
31
  /** Top-level first, then `app_metadata`. `null` counts as absent: the RBAC hook writes `null` for a user with no role row. */
35
32
  function readClaim(claims, name) {
36
33
  const top = Object.hasOwn(claims, name) ? claims[name] : void 0;
@@ -247,16 +244,6 @@ function emit(options, reason, cause) {
247
244
  });
248
245
  } catch {}
249
246
  }
250
- function validateClaims(extra, schema) {
251
- const result = schema["~standard"].validate(extra);
252
- if (result instanceof Promise) {
253
- ignoreRejection(result);
254
- return;
255
- }
256
- if ("issues" in result && result.issues !== void 0) return;
257
- const value = result.value;
258
- return isRecord(value) ? value : void 0;
259
- }
260
247
  function extraClaims(claims) {
261
248
  const extra = {};
262
249
  const meta = claims["app_metadata"];
@@ -292,7 +279,7 @@ function mapClaims(claims, options) {
292
279
  const tenantClaim = options.tenant ?? "tenant_id";
293
280
  const membershipsClaim = options.memberships ?? "memberships";
294
281
  let extra = extraClaims(claims);
295
- if (options.schema !== void 0) extra = validateClaims(extra, options.schema) ?? {};
282
+ if (options.schema !== void 0) extra = validateRecord(options.schema, extra) ?? {};
296
283
  const include = new Set(options.include ?? []);
297
284
  const tenantValue = readClaim(claims, tenantClaim);
298
285
  const version = readClaim(claims, "authz_ver");