permdock 0.1.0 → 0.2.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 (349) hide show
  1. package/README.md +106 -47
  2. package/dist/a2a/index.d.ts +7 -16
  3. package/dist/a2a/index.js +59 -98
  4. package/dist/adapter-context-mlWsVGGg.js +23 -0
  5. package/dist/ai-sdk/index.d.ts +37 -16
  6. package/dist/ai-sdk/index.js +30 -13
  7. package/dist/approvals/index.d.ts +3 -3
  8. package/dist/approvals/index.js +5 -4
  9. package/dist/{approvals-DaxY-Bdg.js → approvals-DbYAuNkG.js} +17 -11
  10. package/dist/approvers-DT4AVyIg.js +52 -0
  11. package/dist/{arazzo-CTeVuXr5.js → arazzo-BAgw9ap6.js} +2 -2
  12. package/dist/{arazzo-aoTkqYsJ.js → arazzo-cmvX2jDe.js} +2 -2
  13. package/dist/authzen/index.d.ts +4 -13
  14. package/dist/authzen/index.js +16 -50
  15. package/dist/better-auth/index.d.ts +20 -3
  16. package/dist/better-auth/index.js +27 -7
  17. package/dist/better-supabase/index.d.ts +206 -0
  18. package/dist/better-supabase/index.js +620 -0
  19. package/dist/bind-CVy3Espv.d.ts +25 -0
  20. package/dist/bind-VnYn2HKq.js +97 -0
  21. package/dist/boundary-BM8a_P6E.js +13 -0
  22. package/dist/boundary-BmHxVH1J.d.ts +15 -0
  23. package/dist/canonical-json-DemiK4Vp.js +26 -0
  24. package/dist/{capability-B68OFnZx.js → capability-4qPdO9gk.js} +7 -5
  25. package/dist/{capability-BDG_nkxt.d.ts → capability-Dq43tT1u.d.ts} +2 -2
  26. package/dist/catalog/index.d.ts +1 -1
  27. package/dist/catalog/index.js +1 -1
  28. package/dist/catalog-BjZSovXQ.js +2 -0
  29. package/dist/{catalog-doc-BSo_Q_-6.js → catalog-doc-Dsc9y7sd.js} +23 -12
  30. package/dist/{catalog-B0E6bggc.js → catalog-h2tlKFkq.js} +2 -2
  31. package/dist/{catalog-H-vFGwWK.js → catalog-z8q6bi_r.js} +4 -4
  32. package/dist/claude-agent/index.d.ts +5 -14
  33. package/dist/claude-agent/index.js +4 -10
  34. package/dist/clerk/index.d.ts +12 -3
  35. package/dist/clerk/index.js +26 -5
  36. package/dist/cli/bin.js +1 -1
  37. package/dist/cli/index.d.ts +3 -3
  38. package/dist/cli/index.js +2 -2
  39. package/dist/clients-C7zLFuWT.d.ts +12 -0
  40. package/dist/clients-DjU5ABMy.js +23 -0
  41. package/dist/cloud/index.d.ts +4 -5
  42. package/dist/cloud/index.js +20 -6
  43. package/dist/{cloud-BNQTrmrr.js → cloud-BGhHS-lY.js} +2 -2
  44. package/dist/{cloud-Cuxr6Czw.js → cloud-Bo3e9Ak3.js} +7 -6
  45. package/dist/{collect-O-tOtbnk.js → collect-DDDv_ESs.js} +194 -42
  46. package/dist/collect-DLlujdHC.js +83 -0
  47. package/dist/collect-rG2IQ3t0.js +2 -0
  48. package/dist/{commands-BMh_Etm2.js → commands-DWOrSQic.js} +16 -12
  49. package/dist/compile/index.d.ts +3 -0
  50. package/dist/compile/index.js +2 -0
  51. package/dist/{compile-D22iwvuV.js → compile-Ba4blROR.js} +85 -30
  52. package/dist/compile-CNnl6uIt.d.ts +94 -0
  53. package/dist/config-BJiM-xAm.js +157 -0
  54. package/dist/config-Bn00Z3ks.js +36 -0
  55. package/dist/config-report-Dw_JcUqT.js +44 -0
  56. package/dist/{connection-JvqwHODC.js → connection-CU8MQxRi.js} +1 -1
  57. package/dist/{context-CKEAabd7.js → context-Ttp0ekMT.js} +36 -27
  58. package/dist/convex/index.d.ts +9 -4
  59. package/dist/convex/index.js +14 -4
  60. package/dist/create-BWyx3jua.d.ts +245 -0
  61. package/dist/create-CPhDL6qx.js +253 -0
  62. package/dist/{credential-B_rkUNlY.js → credential-8P81ff4u.js} +26 -46
  63. package/dist/delegation-D8pUEuce.js +103 -0
  64. package/dist/{describe-Bt1YD5uS.js → describe-B_gVZEVi.js} +10 -15
  65. package/dist/{describe-DernyItf.d.ts → describe-PdoqESvg.d.ts} +9 -10
  66. package/dist/{diff-x5Il8LVa.js → diff-B8Tunc3o.js} +44 -11
  67. package/dist/{diff-BUzf5Poi.js → diff-CzqLxZ77.js} +2 -2
  68. package/dist/doctor-WpvG6p4k.js +1194 -0
  69. package/dist/doctor-collect-ByfYlNv1.js +664 -0
  70. package/dist/{doctor-Bqo6FwUa.js → doctor-rOr-4ZfS.js} +2 -2
  71. package/dist/drizzle/index.d.ts +4 -3
  72. package/dist/drizzle/index.js +3 -3
  73. package/dist/elysia/index.d.ts +6 -28
  74. package/dist/elysia/index.js +16 -60
  75. package/dist/{errors-DSMnAVNa.js → errors-CWfoNg9N.js} +8 -4
  76. package/dist/{errors-Iy71s7Oj.js → errors-Cz5zn0mW.js} +17 -71
  77. package/dist/{errors-DbZ1YOnb.d.ts → errors-DAqevpNk.d.ts} +8 -21
  78. package/dist/{errors-m3u9TmDu.js → errors-DRnGZHzF.js} +4 -1
  79. package/dist/evaluation-items-CfCCejQd.js +40 -0
  80. package/dist/{evaluations-DsAU9ppl.js → evaluations-tz6D9A2G.js} +28 -46
  81. package/dist/eve/index.d.ts +6 -15
  82. package/dist/eve/index.js +7 -12
  83. package/dist/expiry-BoBJ8Tvc.js +7 -0
  84. package/dist/express/index.d.ts +6 -29
  85. package/dist/express/index.js +28 -58
  86. package/dist/fastify/index.d.ts +6 -29
  87. package/dist/fastify/index.js +16 -65
  88. package/dist/fields-BMl1RxoX.js +26 -0
  89. package/dist/{files-B_wAGYmt.js → files-DWUN9PzI.js} +5 -1
  90. package/dist/{fixtures-Cvaw0gDG.js → fixtures-ht28Cplr.js} +5 -2
  91. package/dist/{freeze-y1_jQL4v.js → freeze-CrU8nQeX.js} +31 -2
  92. package/dist/{from-snapshot-BMGnhmgv.js → from-snapshot-C3sHpZNS.js} +65 -48
  93. package/dist/{grantee-Bv04_Vzf.js → grantee-Cv5Sogfv.js} +88 -7
  94. package/dist/graph-sql-B-dsAT6j.d.ts +29 -0
  95. package/dist/{headers-B5RRv3Xm.js → headers-BZSDieNT.js} +1 -1
  96. package/dist/{headers-C8SHQccD.d.ts → headers-Cf-zWvsO.d.ts} +1 -1
  97. package/dist/helpers-H_KARDVC.js +421 -0
  98. package/dist/hono/index.d.ts +6 -28
  99. package/dist/hono/index.js +11 -43
  100. package/dist/{hosted-BwKQ1BTA.js → hosted-DJQw46hn.js} +6 -5
  101. package/dist/{http-GgVApX1k.js → http-BIhmLfCc.js} +4 -20
  102. package/dist/http-SO7qGttf.js +44 -0
  103. package/dist/ids-DC4V4CFu.js +18 -0
  104. package/dist/{index-LF_hS-yn.d.ts → index-A0YNL8jZ.d.ts} +1 -1
  105. package/dist/index-CtE07CBF.d.ts +6 -0
  106. package/dist/{index-xIxJLwOQ.d.ts → index-D3vbkoSI.d.ts} +75 -7
  107. package/dist/{index-CltcQ4Bf.d.ts → index-D6_cSa1z.d.ts} +68 -5
  108. package/dist/index.d.ts +14 -9
  109. package/dist/index.js +22 -17
  110. package/dist/instance-options-BK_rNOSC.d.ts +11 -0
  111. package/dist/instance-options-Dhhcnm3y.js +22 -0
  112. package/dist/{parse-DPfIvFMU.js → json-schema-BsAflUGW.js} +28 -57
  113. package/dist/jwt/index.d.ts +10 -6
  114. package/dist/jwt/index.js +32 -13
  115. package/dist/kernel-GSQnMz3O.js +208 -0
  116. package/dist/kysely/index.d.ts +4 -3
  117. package/dist/kysely/index.js +3 -3
  118. package/dist/live-options-H2eG8dfJ.js +60 -0
  119. package/dist/{load-BZ24CpZP.js → load-DhWEB9P1.js} +16 -10
  120. package/dist/load-DwJUafYN.js +2 -0
  121. package/dist/manifest-iaoBXHKc.js +783 -0
  122. package/dist/manifest-uDS9y5de.d.ts +206 -0
  123. package/dist/{map-DowSO96j.js → map-AcxK9o_D.js} +4 -15
  124. package/dist/{map-claims-B_6I1Rn-.js → map-claims-Z4QZOiFF.js} +13 -4
  125. package/dist/map-error-pgUWNNtG.js +23 -0
  126. package/dist/may-use-DndQ5tQ-.js +77 -0
  127. package/dist/mcp/index.d.ts +54 -22
  128. package/dist/mcp/index.js +218 -178
  129. package/dist/nest/index.d.ts +26 -31
  130. package/dist/nest/index.js +75 -84
  131. package/dist/next/client.d.ts +7 -8
  132. package/dist/next/client.js +11 -9
  133. package/dist/next/index.d.ts +30 -47
  134. package/dist/next/index.js +45 -60
  135. package/dist/next/plugin.d.ts +1 -1
  136. package/dist/next/plugin.js +32 -1
  137. package/dist/node/index.d.ts +9 -28
  138. package/dist/node/index.js +11 -43
  139. package/dist/openai/index.d.ts +6 -15
  140. package/dist/openai/index.js +7 -20
  141. package/dist/openapi/index.d.ts +87 -4
  142. package/dist/openapi/index.js +3 -3
  143. package/dist/{openapi-CwePaF7C.js → openapi-Bbg4wGVL.js} +3 -3
  144. package/dist/{openapi-DcqM8nU7.js → openapi-BqRBvAng.js} +237 -5
  145. package/dist/{openapi-DWD0Uc_4.js → openapi-CqqEbHsL.js} +5 -5
  146. package/dist/{openapi-import-BWRUNNeW.js → openapi-import-cmwetbzw.js} +1 -1
  147. package/dist/{openapi-schema-D8j_T9tO.js → openapi-schema--ARjyfQr.js} +2 -2
  148. package/dist/orpc/index.d.ts +15 -28
  149. package/dist/orpc/index.js +74 -117
  150. package/dist/otel/index.d.ts +2 -2
  151. package/dist/parse-BuyjxhZV.js +53 -0
  152. package/dist/parse-local-manifest-BkGQNzAh.d.ts +10 -0
  153. package/dist/parse-local-manifest-BrMozJCo.js +36 -0
  154. package/dist/pdp/index.d.ts +2 -2
  155. package/dist/pdp/index.js +14 -127
  156. package/dist/{permdock-yoZ7EjxX.js → permdock-CzqXjCpU.js} +641 -126
  157. package/dist/{permissions-B8vCg_bI.d.ts → permissions-CDgvKG5L.d.ts} +2 -2
  158. package/dist/{permissions-CofRqesP.js → permissions-CpZrivYv.js} +3 -3
  159. package/dist/{permissions-DC7GROPA.js → permissions-DVoF6dMt.js} +77 -15
  160. package/dist/{permissions-B4apnahQ.d.ts → permissions-DttnqqxC.d.ts} +34 -5
  161. package/dist/{pins-CqE1jZuF.js → pins-8ILTftC9.js} +2 -2
  162. package/dist/{policy-CInmNGkM.d.ts → policy-CFZAr_Al.d.ts} +330 -37
  163. package/dist/{policy-Cq2fB8Q5.d.ts → policy-D8UFyERw.d.ts} +2 -2
  164. package/dist/{policy-ANp36PnI.js → policy-xyWg7QdR.js} +173 -22
  165. package/dist/powersync-A8x_Yyvh.js +2 -0
  166. package/dist/powersync-C7kLglqX.js +540 -0
  167. package/dist/powersync-yW1UUFzp.js +62 -0
  168. package/dist/prisma/index.d.ts +3 -2
  169. package/dist/prisma/index.js +45 -20
  170. package/dist/{problem-Cgp9-KZA.js → problem-B43ztKIm.js} +74 -109
  171. package/dist/problem-details-CkL50EEf.d.ts +7 -0
  172. package/dist/problem-details-_AMOYz-w.js +144 -0
  173. package/dist/{protected-BuPAycJT.d.ts → protected-CNsMzrVd.d.ts} +5 -4
  174. package/dist/protected-Cs6kTaHo.js +100 -0
  175. package/dist/protected-bZs6rbT1.d.ts +40 -0
  176. package/dist/{provider-wTAUda2v.d.ts → provider-Cjr62YMV.d.ts} +1 -1
  177. package/dist/provider-DLzpb2Xz.js +52 -0
  178. package/dist/provider-store-DNyC1y48.js +43 -0
  179. package/dist/react/index.d.ts +7 -5
  180. package/dist/react/index.js +5 -4
  181. package/dist/react/provider-client.d.ts +1 -1
  182. package/dist/react/provider-client.js +1 -1
  183. package/dist/react-native/index.d.ts +166 -10
  184. package/dist/react-native/index.js +607 -85
  185. package/dist/{refs-ChLSxbST.js → refs-KYb4ntaz.js} +4 -3
  186. package/dist/{relations-r4soIFZB.js → relations-cjOL01hZ.js} +110 -31
  187. package/dist/replay-BsOyTrdV.js +28 -0
  188. package/dist/replay-sqBGMnNs.d.ts +5 -0
  189. package/dist/resource-ref-CaS9yVPi.js +20 -0
  190. package/dist/revocations-Bhr0aMIC.js +27 -0
  191. package/dist/rls-BMNydpHk.js +2521 -0
  192. package/dist/{rls-BOFU3chG.js → rls-CEvs64Kj.js} +8 -3
  193. package/dist/rls-fields-BMasREhR.js +3502 -0
  194. package/dist/{rls-graph-DxQ39PJj.js → rls-graph-pc9fuXYm.js} +100 -36
  195. package/dist/{rls-import-CXV6LBlS.js → rls-import-D8F7j35Q.js} +7 -6
  196. package/dist/{rls-migrate-DrFPbf8p.js → rls-migrate-7wikfrVI.js} +6 -5
  197. package/dist/rls-ownership-B5Lkq62W.js +843 -0
  198. package/dist/rls-shared-aOQ4hGTO.js +493 -0
  199. package/dist/rls-verify-D8B7dOTh.js +745 -0
  200. package/dist/{row-check-BajTgQZ-.d.ts → row-check-Dt35czLy.d.ts} +12 -15
  201. package/dist/rpc-DOK54_CS.js +89 -0
  202. package/dist/{run-CJ6UvS3a.js → run-YXCJDNYk.js} +31 -12
  203. package/dist/runtime-CB8gQFvS.js +11 -0
  204. package/dist/{saas-BRrZzJkM.js → saas-Bj_FFkjN.js} +17 -7
  205. package/dist/{schema-P8yoma__.js → schema-D3MnDMxa.js} +8 -4
  206. package/dist/scim/index.d.ts +1 -1
  207. package/dist/scim/index.js +1 -1
  208. package/dist/{scim-9NFa0XVZ.js → scim-BFGBBAqR.js} +1 -1
  209. package/dist/{scopes-cKVp_WTw.js → scopes-CVdPrWN-.js} +35 -8
  210. package/dist/server/index.d.ts +22 -11
  211. package/dist/server/index.js +11 -8
  212. package/dist/{credentials-BgRX3WEg.js → server-DlZ28Oz5.js} +1 -1
  213. package/dist/shared-DRu8VFVM.js +123 -0
  214. package/dist/{sink-Cfr9-7YC.d.ts → sink-Gs6TTVa-.d.ts} +1 -1
  215. package/dist/skills-Biq5uup3.js +192 -0
  216. package/dist/{skills-C_lpV4Jx.js → skills-JaymNCdK.js} +10 -4
  217. package/dist/{snapshot-DE8dE_hz.js → snapshot-Enxd0n-s.js} +138 -214
  218. package/dist/snapshot-cache-D6jLelln.js +44 -0
  219. package/dist/snapshot-cache-DwQH8ufx.d.ts +45 -0
  220. package/dist/solid/index.d.ts +39 -9
  221. package/dist/solid/index.js +76 -85
  222. package/dist/sources-B0UvrJ21.js +534 -0
  223. package/dist/sources-BcJgw0lt.d.ts +192 -0
  224. package/dist/{sql-Bll1d7y0.js → sql-xdg5f4Fi.js} +6 -1
  225. package/dist/{src-CTNT-PBW.js → src-CSbUiozF.js} +149 -11
  226. package/dist/ssf/index.d.ts +3 -2
  227. package/dist/ssf/index.js +3 -29
  228. package/dist/store-DMAWwAJV.js +371 -0
  229. package/dist/{store-Bq90395i.d.ts → store-D_pjn91-.d.ts} +13 -4
  230. package/dist/store-options-yO0V6gRn.js +716 -0
  231. package/dist/{stores-CkG2HrSg.js → stores-4_sqiOA1.js} +10 -63
  232. package/dist/{stores-CvOnu_2T.d.ts → stores-DVR5NHLE.d.ts} +20 -9
  233. package/dist/{stream-Q_xlB6Ko.js → stream-DDpvynSB.js} +16 -2
  234. package/dist/{stream-BhMfZOwr.d.ts → stream-DlvG2hs-.d.ts} +2 -2
  235. package/dist/subject-settings-BwBmCdTR.js +128 -0
  236. package/dist/supabase/index.d.ts +122 -6
  237. package/dist/supabase/index.js +4 -3
  238. package/dist/supabase/middleware.d.ts +32 -27
  239. package/dist/supabase/middleware.js +56 -22
  240. package/dist/{supabase-D8UlBA7Z.js → supabase-CwafwxxF.js} +3 -3
  241. package/dist/{supabase-DTxGtYdi.js → supabase-DTBaC20O.js} +345 -367
  242. package/dist/supabase-config-Bs44dare.js +472 -0
  243. package/dist/{supabase-hook-D_OqGb_V.js → supabase-hook-BuxLQLpU.js} +994 -708
  244. package/dist/supabase-hook-D5qVd_D8.js +2 -0
  245. package/dist/supautils-DYZnzRWV.js +91 -0
  246. package/dist/svelte/PermissionBoundary.svelte +37 -0
  247. package/dist/svelte/Protected.svelte +8 -2
  248. package/dist/svelte/index.d.ts +9 -6
  249. package/dist/svelte/index.js +61 -7
  250. package/dist/svelte/runtime.d.ts +4 -3
  251. package/dist/svelte/runtime.js +4 -3
  252. package/dist/svelte/source.d.ts +9 -6
  253. package/dist/svelte/source.js +7 -4
  254. package/dist/terminal/index.d.ts +6 -14
  255. package/dist/terminal/index.js +44 -32
  256. package/dist/testing/index.d.ts +105 -16
  257. package/dist/testing/index.js +504 -40
  258. package/dist/testing/saas/index.d.ts +4 -4
  259. package/dist/testing/saas/index.js +2 -2
  260. package/dist/testing/saas/permissions.d.ts +1 -1
  261. package/dist/testing/saas/permissions.js +1 -1
  262. package/dist/token-CIWxJOCh.js +50 -0
  263. package/dist/trpc/index.d.ts +7 -26
  264. package/dist/trpc/index.js +17 -100
  265. package/dist/types-9AWO9EGt.d.ts +197 -0
  266. package/dist/{types-D6Z6-rKJ.d.ts → types-BPxgszlT.d.ts} +260 -22
  267. package/dist/{types-BvBk1wgn.d.ts → types-BVyImy5I.d.ts} +5 -3
  268. package/dist/{types-CxquUByI.d.ts → types-Bvc4oWT6.d.ts} +1 -1
  269. package/dist/types-C3s9xVJG.d.ts +48 -0
  270. package/dist/{types-BBK-exvJ.d.ts → types-Dnemwd77.d.ts} +7 -1
  271. package/dist/types-kxznc7cn.d.ts +52 -0
  272. package/dist/{types-B8w5PFtS.d.ts → types-vKyAMtcX.d.ts} +17 -1
  273. package/dist/{types-B9dmiiab.d.ts → types-vNSDF7Dq.d.ts} +1 -1
  274. package/dist/{sources-DOpW5Ila.d.ts → types-yF5LmQVD.d.ts} +86 -127
  275. package/dist/unplugin/index.d.ts +1 -1
  276. package/dist/unplugin/index.js +10 -9
  277. package/dist/{usage-1ozMubLY.js → usage-D07N9QJ3.js} +2 -2
  278. package/dist/usage-D82l1CwK.js +2 -0
  279. package/dist/{usage-CUnK6Ou9.js → usage-DG1oeCca.js} +225 -62
  280. package/dist/validation-error-CnjZ4t92.js +33 -0
  281. package/dist/validation-error-CtF23SrC.d.ts +26 -0
  282. package/dist/{validity-D0uRmJKJ.js → validity-uOp8UpYn.js} +57 -36
  283. package/dist/{verifier-B90agnhl.js → verifier-BxBo6I44.js} +10 -5
  284. package/dist/version-BvacVTZR.js +17 -0
  285. package/dist/views-Soe7bGSC.js +95 -0
  286. package/dist/{vocabulary-Dk0fs-Jk.d.ts → vocabulary-DA8a8zif.d.ts} +1 -1
  287. package/dist/vue/index.d.ts +35 -13
  288. package/dist/vue/index.js +86 -93
  289. package/dist/watch-Etoa_Mvr.js +2 -0
  290. package/dist/watch-UihESpsJ.js +128 -0
  291. package/dist/webmcp/index.d.ts +2 -2
  292. package/dist/webmcp/index.js +7 -13
  293. package/package.json +62 -36
  294. package/schemas/approval-request-v1.json +175 -0
  295. package/schemas/catalog-v1.json +29 -1
  296. package/schemas/supabase-claims-v1.json +6 -1
  297. package/schemas/supabase-manifest-v1.json +150 -6
  298. package/skills/permdock/SKILL.md +7 -7
  299. package/skills/permdock-agents/SKILL.md +5 -5
  300. package/skills/permdock-agents/references/runtimes.md +12 -10
  301. package/skills/permdock-approvals/SKILL.md +4 -4
  302. package/skills/permdock-approvals/references/stores-and-resume.md +15 -4
  303. package/skills/permdock-audit/SKILL.md +3 -3
  304. package/skills/permdock-credentials/SKILL.md +4 -4
  305. package/skills/permdock-credentials/references/tokens-keys-links.md +7 -2
  306. package/skills/permdock-data/SKILL.md +4 -4
  307. package/skills/permdock-data/references/queries-and-rls.md +14 -6
  308. package/skills/permdock-data/references/relationships.md +5 -3
  309. package/skills/permdock-tenancy/SKILL.md +9 -6
  310. package/skills/permdock-tenancy/references/ownership-and-custom-roles.md +14 -8
  311. package/skills/permdock-wire/SKILL.md +4 -4
  312. package/skills/permdock-wire/references/adapters.md +42 -30
  313. package/skills/permdock-wire/references/policy-options.md +5 -3
  314. package/dist/approvers-aH0PJkmf.js +0 -20
  315. package/dist/catalog-idsHc0vo.js +0 -2
  316. package/dist/collect-B7_TIfmg.js +0 -49
  317. package/dist/collect-fRPAQIWb.js +0 -2
  318. package/dist/compile-CQbvyIBr.d.ts +0 -30
  319. package/dist/config-BPYmjTOp.js +0 -26
  320. package/dist/context-gtAwAILx.js +0 -6
  321. package/dist/create-BKF3dgFk.d.ts +0 -162
  322. package/dist/create-CSkhDU9T.js +0 -222
  323. package/dist/doctor-BGle8Gqi.js +0 -1314
  324. package/dist/helpers-DnSOrhB9.js +0 -682
  325. package/dist/index-fG6NSXlc.d.ts +0 -9
  326. package/dist/kernel-YOGCWNLf.js +0 -211
  327. package/dist/load-QOOm1z70.js +0 -2
  328. package/dist/manifest-DDQbC6K0.d.ts +0 -118
  329. package/dist/map-error-RJ3ZsUyA.js +0 -16
  330. package/dist/may-use-CnFEjVEp.js +0 -37
  331. package/dist/pg-4GJWDUxG.js +0 -953
  332. package/dist/plugin-4gr7IxFJ.js +0 -65
  333. package/dist/protected-B4K3BKoX.js +0 -138
  334. package/dist/protected-wY7nXhY9.d.ts +0 -23
  335. package/dist/provider-_wx46HpB.js +0 -48
  336. package/dist/rls-CJVja9Ww.js +0 -2119
  337. package/dist/rls-helpers-BxRuif0l.js +0 -1346
  338. package/dist/runtime-DP9ttFh1.js +0 -27
  339. package/dist/skills-Dx3QLnMY.js +0 -110
  340. package/dist/source-DoBBYJi2.js +0 -6
  341. package/dist/sources-DVHM3Mwq.js +0 -284
  342. package/dist/store-C6hFW6ta.js +0 -508
  343. package/dist/subject-settings-xt7V845g.js +0 -82
  344. package/dist/supabase-hook-DW-xP4hU.js +0 -2
  345. package/dist/types-DbWdEfcm.d.ts +0 -87
  346. package/dist/types-bva3i4Gf.d.ts +0 -98
  347. package/dist/types-i4BAOvdb.d.ts +0 -97
  348. package/dist/usage-PyEor6GA.js +0 -2
  349. package/dist/version-CnSh33Fj.js +0 -16
@@ -1,5 +1,5 @@
1
- import { _ as ResourceNode, d as Permission, f as PermissionKind, p as PermissionTree } from "./permissions-B4apnahQ.js";
2
- import { a as RoleTree, i as RoleMeta, n as PlanTree, r as Role, t as Plan } from "./vocabulary-Dk0fs-Jk.js";
1
+ import { f as Permission, m as PermissionTree, p as PermissionKind, y as ResourceNode } from "./permissions-DttnqqxC.js";
2
+ import { a as RoleTree, i as RoleMeta, n as PlanTree, r as Role, t as Plan } from "./vocabulary-DA8a8zif.js";
3
3
  import { StandardSchemaV1 } from "@standard-schema/spec";
4
4
  //#region src/conditions/ast.d.ts
5
5
  type ConditionRef = {
@@ -82,11 +82,21 @@ type RelatedCondition = {
82
82
  * the `relation` lookup (`relation` is then empty).
83
83
  */
84
84
  readonly ids?: readonly string[];
85
+ readonly permission?: string;
85
86
  /**
86
87
  * The row's boolean column that keeps ancestor grants out: with `parent` or
87
88
  * `hops`, a restricted row matches nothing; without, the walk stops at the row.
88
89
  */
89
90
  readonly restricted?: string;
91
+ readonly restrictedAncestors?: RestrictedAncestors;
92
+ readonly passRestricted?: true;
93
+ };
94
+ type RestrictedAncestors = {
95
+ readonly resource: string;
96
+ readonly id: string;
97
+ readonly parent: string;
98
+ readonly depth: number;
99
+ readonly field: string;
90
100
  };
91
101
  type RelatedHop = {
92
102
  readonly link: string;
@@ -107,7 +117,16 @@ type SqlFunctionCondition = {
107
117
  readonly args: readonly SqlFunctionArg[];
108
118
  readonly twin: Condition;
109
119
  };
110
- type Condition = ComparisonCondition | InCondition | IsNullCondition | AndCondition | OrCondition | NotCondition | MemberOfCondition | RelatedCondition | OpaqueCondition | SqlFunctionCondition;
120
+ /**
121
+ * The request's session was checked against the Auth server while the
122
+ * subject was resolved (`liveSession: true`), not only verified from the
123
+ * token: a revoked session still verifies until `exp`. Written
124
+ * `{ subject: { session: { live: true } } }`.
125
+ */
126
+ type LiveSessionCondition = {
127
+ readonly op: "liveSession";
128
+ };
129
+ type Condition = ComparisonCondition | InCondition | IsNullCondition | AndCondition | OrCondition | NotCondition | MemberOfCondition | RelatedCondition | OpaqueCondition | SqlFunctionCondition | LiveSessionCondition;
111
130
  declare function isConditionRef(value: unknown): value is ConditionRef;
112
131
  declare function isConditionDate(value: unknown): value is ConditionDate;
113
132
  declare function isCondition(value: unknown): value is Condition;
@@ -172,6 +191,12 @@ type Membership = {
172
191
  readonly managedBy?: "idp";
173
192
  /** Seats this membership holds (`dev-mode`, `editor`); `plan()` grantees match them inside the active tenant. */
174
193
  readonly entitlements?: readonly string[];
194
+ /**
195
+ * Set when the instance or an ancestor instance is suspended: the
196
+ * permission keys the membership still grants (`suspension.scopes.<scope>.keep`).
197
+ * Every other grant, allow or deny, ignores it, and so do role listings.
198
+ */
199
+ readonly keep?: readonly string[];
175
200
  /** Input only: an instance of the first scope. */
176
201
  readonly tenant?: string;
177
202
  /** Input only: an instance of the second scope, inside `tenant`. */
@@ -184,6 +209,8 @@ type Membership = {
184
209
  type CustomRoleGrant = {
185
210
  readonly permission: string;
186
211
  readonly effect?: "allow" | "deny";
212
+ /** A level the permission's resource declares (`resource(…, { levels })`); allows only. */
213
+ readonly level?: string;
187
214
  };
188
215
  type CustomRoleBody = {
189
216
  readonly name: string;
@@ -236,6 +263,8 @@ type Actor = {
236
263
  readonly binding?: Binding;
237
264
  /** `true` narrows every policy delegation to this actor to its read-only permissions (`readOnlyHint`). */
238
265
  readonly readOnly?: boolean;
266
+ /** The stable name the application gives this OAuth client (`ClientNames`), set by the subject resolver from the verified client id; policy delegations match it with `to: { kind, client }`. */
267
+ readonly client?: string;
239
268
  readonly [key: string]: unknown;
240
269
  };
241
270
  type AuthorizationDetail = {
@@ -259,6 +288,12 @@ type Subject<TPrincipal extends Principal = Principal> = {
259
288
  readonly expiresAt?: number;
260
289
  /** The token's memberships are behind the source's authorization version: `fresh` permissions deny. */
261
290
  readonly stale?: true;
291
+ /**
292
+ * The resolver checked the session against the Auth server for this request
293
+ * (`liveSession: true`), so `{ subject: { session: { live: true } } }` holds.
294
+ * Never read from claims.
295
+ */
296
+ readonly liveSession?: true;
262
297
  };
263
298
  //#endregion
264
299
  //#region src/core/scopes.d.ts
@@ -322,7 +357,13 @@ type AssuranceGrantee = {
322
357
  readonly amr?: readonly string[];
323
358
  readonly maxAge?: number;
324
359
  };
325
- type Grantee = RoleGrantee | AnyoneGrantee | AuthenticatedGrantee | RelationGrantee | PlanGrantee | ActorGrantee | AssuranceGrantee;
360
+ type InheritGrantee = {
361
+ readonly kind: "inherit";
362
+ readonly permission: string;
363
+ readonly resource: string;
364
+ readonly through: "parent" | readonly string[];
365
+ };
366
+ type Grantee = RoleGrantee | InheritGrantee | AnyoneGrantee | AuthenticatedGrantee | RelationGrantee | PlanGrantee | ActorGrantee | AssuranceGrantee;
326
367
  type GranteeInput = Grantee | Role | Plan | string | readonly GranteeInput[];
327
368
  declare function anyone(): AnyoneGrantee;
328
369
  declare function authenticated(): AuthenticatedGrantee;
@@ -330,6 +371,9 @@ declare function relation(resource: Permission | PermissionTree, name: string, o
330
371
  readonly through?: "parent" | readonly string[];
331
372
  readonly depth?: number;
332
373
  }): RelationGrantee;
374
+ declare function inherit(permission: Permission, options: {
375
+ readonly through: "parent" | readonly string[];
376
+ }): InheritGrantee;
333
377
  declare function plan(name: Plan | string): PlanGrantee;
334
378
  declare function actor(kind: string): ActorGrantee;
335
379
  declare function assurance(options: {
@@ -466,11 +510,14 @@ type ApprovalPolicy = {
466
510
  readonly tenant?: string;
467
511
  /** Actor kinds it applies to (`['agent']`); absent: every call. A call without an actor never matches a list. */
468
512
  readonly actors?: readonly string[];
469
- /** A portable condition over the row. */
513
+ /** A portable condition over the row; instance permissions only, since a collection action has no row. */
470
514
  readonly where?: Condition;
471
515
  /** A portable condition over the call's input (the proposed row). */
472
516
  readonly check?: Condition;
473
- /** The same shape as `allow(..., { approval })`, without `escalation`. */
517
+ /**
518
+ * The same shape as `allow(..., { approval })`. An `escalation` here widens
519
+ * only this entry's stages, never the code's.
520
+ */
474
521
  readonly approval: ApprovalOption;
475
522
  };
476
523
  /**
@@ -484,7 +531,31 @@ type ApprovalPolicySource = {
484
531
  readonly tenants: readonly string[];
485
532
  }): readonly ApprovalPolicy[] | Promise<readonly ApprovalPolicy[]>;
486
533
  };
534
+ /** The denial detail when an `ApprovalPolicySource` fails: every call an allow would grant denies with reason `approval`. */
535
+ declare const APPROVAL_POLICY_UNAVAILABLE = "approval-policy-unavailable";
487
536
  declare function memoryApprovalPolicies(policies: readonly ApprovalPolicy[]): ApprovalPolicySource;
537
+ /**
538
+ * Why an `ApprovalPolicy` entry does not load. `unknown-permission`: the
539
+ * policy declares no such key (the entry applies to nothing). `invalid`: a
540
+ * field has the wrong shape or the approval option does not normalise.
541
+ * `where-on-collection`: `where` reads a row, which a collection action
542
+ * never has, so the entry could never match; use `check` over the input.
543
+ * `stale-on-without-version`: `staleOn` needs an instance permission whose
544
+ * resource declares `version`.
545
+ */
546
+ type ApprovalPolicyProblem = "unknown-permission" | "invalid" | "where-on-collection" | "stale-on-without-version";
547
+ type ApprovalPolicyValidation = {
548
+ readonly ok: true;
549
+ } | {
550
+ readonly ok: false;
551
+ readonly problem: ApprovalPolicyProblem;
552
+ };
553
+ /**
554
+ * Checks one entry against the policy the way `approvalPoliciesFor` loads
555
+ * it, for an application to refuse a bad entry when it is saved instead of
556
+ * finding every call denied. Never throws.
557
+ */
558
+ declare function validateApprovalPolicy(policy: Policy, entry: unknown): ApprovalPolicyValidation;
488
559
  //#endregion
489
560
  //#region src/core/arazzo.d.ts
490
561
  type ArazzoSimulateInput = {
@@ -712,6 +783,13 @@ type DecideOptions = {
712
783
  readonly field?: string;
713
784
  /** `true` attaches a `trace` to the decision: the grants evaluated, matched and skipped. Off by default and free when off. */
714
785
  readonly explain?: boolean;
786
+ /**
787
+ * A declared scope name: only memberships of that scope answer the check.
788
+ * Naming the first scope keeps nested memberships out of a tenant-level
789
+ * guard on a collection action. Global roles still apply; resource roles
790
+ * and memberships of other scopes are skipped with reason `scope`.
791
+ */
792
+ readonly scope?: string;
715
793
  };
716
794
  type SimulateOptions = {
717
795
  /** Decision clock in Unix seconds for the whole batch: grant validity, membership expiry and limits are read as of this instant. Defaults to the current time. */
@@ -738,14 +816,34 @@ type WhereResult = {
738
816
  /** The policy's resource graph, for `related`; not enumerable either. */
739
817
  readonly resources?: ReadonlyMap<string, ResourceNode>;
740
818
  };
819
+ type SnapshotOptions = {
820
+ readonly include?: readonly (Permission | {
821
+ readonly [key: string]: unknown;
822
+ })[];
823
+ readonly tenants?: "all";
824
+ readonly signer?: TokenSigner;
825
+ readonly audience?: string | readonly string[];
826
+ };
741
827
  type PermDock<V extends PolicyVocabulary = PolicyVocabulary> = {
742
828
  readonly can: {
743
829
  (permission: Permission<string, unknown, "instance">, data: unknown, options?: DecideOptions): boolean;
744
830
  (permission: Permission<string, unknown, "collection">, data?: unknown, options?: DecideOptions): boolean;
831
+ /**
832
+ * A permission held as `Permission` at run time (from a list, a catalog
833
+ * or `findPermission`), whose kind the type does not say: pass `data`,
834
+ * or `undefined` for a check without a row.
835
+ */
836
+ (permission: Permission, data: unknown, options?: DecideOptions): boolean;
745
837
  };
746
838
  readonly decide: {
747
839
  (permission: Permission<string, unknown, "instance">, data: unknown, options?: DecideOptions): Decision;
748
840
  (permission: Permission<string, unknown, "collection">, data?: unknown, options?: DecideOptions): Decision;
841
+ /**
842
+ * A permission held as `Permission` at run time (from a list, a catalog
843
+ * or `findPermission`), whose kind the type does not say: pass `data`,
844
+ * or `undefined` for a check without a row.
845
+ */
846
+ (permission: Permission, data: unknown, options?: DecideOptions): Decision;
749
847
  };
750
848
  readonly assert: {
751
849
  (permission: Permission<string, unknown, "instance">, data: unknown, options?: DecideOptions): Extract<Decision, {
@@ -754,6 +852,14 @@ type PermDock<V extends PolicyVocabulary = PolicyVocabulary> = {
754
852
  (permission: Permission<string, unknown, "collection">, data?: unknown, options?: DecideOptions): Extract<Decision, {
755
853
  readonly outcome: "granted";
756
854
  }>;
855
+ /**
856
+ * A permission held as `Permission` at run time (from a list, a catalog
857
+ * or `findPermission`), whose kind the type does not say: pass `data`,
858
+ * or `undefined` for a check without a row.
859
+ */
860
+ (permission: Permission, data: unknown, options?: DecideOptions): Extract<Decision, {
861
+ readonly outcome: "granted";
862
+ }>;
757
863
  };
758
864
  /**
759
865
  * `decide` with `explain: true`: the same decision, with a `trace` that
@@ -764,6 +870,7 @@ type PermDock<V extends PolicyVocabulary = PolicyVocabulary> = {
764
870
  readonly explain: {
765
871
  (permission: Permission<string, unknown, "instance">, data: unknown, options?: Omit<DecideOptions, "explain">): ExplainedDecision;
766
872
  (permission: Permission<string, unknown, "collection">, data?: unknown, options?: Omit<DecideOptions, "explain">): ExplainedDecision;
873
+ (permission: Permission, data: unknown, options?: Omit<DecideOptions, "explain">): ExplainedDecision;
767
874
  };
768
875
  readonly filter: <T>(permission: Permission<string, T, "instance">, rows: readonly T[], options?: DecideOptions) => T[];
769
876
  readonly pick: <T>(permission: Permission<string, T, "instance">, row: T, options?: DecideOptions) => Partial<T>;
@@ -780,14 +887,15 @@ type PermDock<V extends PolicyVocabulary = PolicyVocabulary> = {
780
887
  }): PermDock<V>;
781
888
  (plan: ArazzoSimulateInput): ArazzoPlan;
782
889
  };
783
- readonly snapshot: (options?: {
784
- readonly include?: readonly (Permission | {
785
- readonly [key: string]: unknown;
786
- })[];
787
- readonly tenants?: "all";
788
- readonly signer?: TokenSigner;
789
- readonly audience?: string | readonly string[];
790
- }) => Snapshot | Promise<string>;
890
+ readonly snapshot: {
891
+ (options?: SnapshotOptions & {
892
+ readonly signer?: undefined;
893
+ }): Snapshot;
894
+ (options: SnapshotOptions & {
895
+ readonly signer: TokenSigner;
896
+ }): Promise<string>;
897
+ (options?: SnapshotOptions): Snapshot | Promise<string>;
898
+ };
791
899
  readonly on: (event: "decision" | "denied" | "approval" | "auth" | "error", handler: (payload: unknown) => void) => () => void;
792
900
  readonly tenant: (id: string) => PermDock<V>;
793
901
  readonly team: (id: string) => PermDock<V>;
@@ -818,6 +926,15 @@ type PermDock<V extends PolicyVocabulary = PolicyVocabulary> = {
818
926
  readonly tenant?: string;
819
927
  readonly scope?: "global";
820
928
  }) => readonly Permission[];
929
+ /**
930
+ * The levels of `permission` (`resource(…, { levels })`) the subject may
931
+ * hand out in a custom role: those it holds, or every level with
932
+ * `meta.manageRoles`. Empty when the permission is not assignable.
933
+ */
934
+ readonly assignableLevels: (permission: Permission, options?: {
935
+ readonly tenant?: string;
936
+ readonly scope?: "global";
937
+ }) => readonly string[];
821
938
  /**
822
939
  * Whether the subject may assign, revoke or transfer a role in one scope
823
940
  * instance: `assigns`, the ceiling, `for`, `exclusiveWith`, `min`, `max`
@@ -851,12 +968,22 @@ type PermDock<V extends PolicyVocabulary = PolicyVocabulary> = {
851
968
  readonly plans: V["plans"] extends PlanTree ? V["plans"] : PlanTree;
852
969
  readonly permissions: V["permissions"] extends Policy["permissions"] ? V["permissions"] : Policy["permissions"];
853
970
  readonly subject: Subject;
971
+ /**
972
+ * The same subject, tenant, team, actor, delegation, sink and limits with
973
+ * other sources: `customRoles`, `approvalPolicies` or `relations`. The
974
+ * sources it names are read again for the subject's tenants; the others
975
+ * keep what this instance loaded. Returns a promise when a source it names
976
+ * answers asynchronously.
977
+ */
978
+ readonly derive: (options: DeriveOptions) => PermDock<V> | Promise<PermDock<V>>;
854
979
  };
980
+ /** What `permdock.derive` may replace: the sources read after the subject is resolved. */
981
+ type DeriveOptions = Pick<PermDockOptions, "customRoles" | "approvalPolicies" | "relations">;
855
982
  type PermDockOptions = {
856
983
  readonly tenant?: string;
857
984
  /** One source, or several composed with `composeMemberships`. */
858
985
  readonly memberships?: MembershipSource | readonly MembershipSource[];
859
- readonly customRoles?: RoleSource;
986
+ readonly customRoles?: RoleSource | RoleSourceFactory;
860
987
  /** Plans and seats from billing, merged into `principal.plans` for the active tenant. */
861
988
  readonly entitlements?: EntitlementSource;
862
989
  readonly actor?: Actor;
@@ -884,8 +1011,9 @@ type CredentialPermission = {
884
1011
  /**
885
1012
  * Credential v1: what a verified API key stands for, never the secret. A
886
1013
  * `user` credential acts as its owner (`principal`) narrowed to
887
- * `permissions`; a `service` credential is its own `service` principal
888
- * holding `roles` in `tenant`, narrowed the same way.
1014
+ * `permissions`, and to the memberships inside `tenant` when it names one;
1015
+ * a `service` credential is its own `service` principal holding `roles` in
1016
+ * `tenant`, narrowed the same way.
889
1017
  */
890
1018
  type Credential = {
891
1019
  readonly v: 1;
@@ -893,7 +1021,11 @@ type Credential = {
893
1021
  readonly kind: CredentialKind;
894
1022
  /** The owner of a `user` credential, or the id of the service principal. */
895
1023
  readonly principal: string;
896
- /** Service only: the instance of the first scope its roles are held in. */
1024
+ /**
1025
+ * The instance of the first scope the key is held to. Required on a
1026
+ * service credential, where its roles are held; optional on a user
1027
+ * credential, where it keeps only the owner's memberships inside it.
1028
+ */
897
1029
  readonly tenant?: string;
898
1030
  /** Service only: the roles it holds in `tenant`. */
899
1031
  readonly roles?: readonly string[];
@@ -935,6 +1067,8 @@ type CredentialRequestBase = {
935
1067
  };
936
1068
  type CredentialRequest = (CredentialRequestBase & {
937
1069
  readonly kind: "user";
1070
+ /** Holds the key to the creator's memberships inside this tenant. */
1071
+ readonly tenant?: string;
938
1072
  }) | (CredentialRequestBase & {
939
1073
  readonly kind: "service";
940
1074
  /** The service principal's id; defaults to the credential id. */
@@ -972,7 +1106,7 @@ declare function credentialPolicyViolation(credential: Credential, policy: Crede
972
1106
  * Validates an untrusted credential record and returns a frozen copy with
973
1107
  * only the v1 fields, or `undefined`. Unknown fields are dropped; a wrong
974
1108
  * type in a known field, a service credential without `tenant` and `roles`,
975
- * or a user credential with either, rejects the whole record.
1109
+ * or a user credential with `roles`, rejects the whole record.
976
1110
  */
977
1111
  declare function parseCredential(input: unknown): Credential | undefined;
978
1112
  /**
@@ -986,7 +1120,9 @@ declare function credentialDelegation(credential: Credential, permissions: Permi
986
1120
  * The subject a verified credential acts as. A `user` credential is its
987
1121
  * owner, passed live as `owner` (roles and memberships as of this request),
988
1122
  * with the credential's delegation: every check is the owner's rights
989
- * intersected with the key's. A `service` credential is a `service`
1123
+ * intersected with the key's. One that names a `tenant` makes it the active
1124
+ * tenant, and `createPermDock` then keeps only the owner's memberships
1125
+ * inside it and no global role. A `service` credential is a `service`
990
1126
  * principal whose only membership is `roles` in `tenant`. An owner whose id
991
1127
  * is not the credential's `principal`, or who is not a user, is anonymous.
992
1128
  */
@@ -998,11 +1134,11 @@ declare function credentialSubject(credential: Credential, options: {
998
1134
  * Decides whether the subject of `permdock` may create the credential in
999
1135
  * `request`. The creator must be a signed-in user or service that is not
1000
1136
  * itself a link or a credential; a delegated creator hands out only what its
1001
- * delegation covers. A service key's tenant must be one the creator is a
1002
- * member of, its roles among the creator's `assignableRoles` there and its
1137
+ * delegation covers. A key's tenant must be one the creator is a member of;
1138
+ * a service key's roles among the creator's `assignableRoles` there and its
1003
1139
  * permissions within `assignablePermissions` there (`exceeds-creator`). The
1004
- * `credentials` policy of the key's tenant (a service key's own, a user
1005
- * key's the creator's active tenant) then applies (`credential-policy`; a
1140
+ * `credentials` policy of the key's tenant (its own, or for a user key
1141
+ * without one the creator's active tenant) then applies (`credential-policy`; a
1006
1142
  * settings source that throws denies with `rule: 'unavailable'`), and
1007
1143
  * `approval` makes the result `approval-required` until `approved` carries
1008
1144
  * its token. PermDock never stores the credential; the application does,
@@ -1049,11 +1185,31 @@ type DecisionProvider = {
1049
1185
  }): Promise<readonly string[] | null | undefined>;
1050
1186
  };
1051
1187
  type RoleSource = {
1052
- rolesFor(tenant: string): CustomRole[] | Promise<CustomRole[]>;
1188
+ /**
1189
+ * The custom roles of one tenant. `createPermDock` passes `held`, the role
1190
+ * names the subject's live memberships hold there, declared or not, so a
1191
+ * source can skip its read when none of them is a custom role.
1192
+ */
1193
+ rolesFor(tenant: string, context?: {
1194
+ readonly held: readonly string[];
1195
+ }): CustomRole[] | Promise<CustomRole[]>;
1053
1196
  assignable?(tenant: string): string[] | Promise<string[]>;
1054
- /** Platform custom roles (`scope: 'global'`), read once per signed-in subject. A role here with a tenant is ignored. */
1055
- globalRoles?(): CustomRole[] | Promise<CustomRole[]>;
1197
+ /**
1198
+ * Platform custom roles (`scope: 'global'`), read once per signed-in
1199
+ * subject, with `held`, the global role names the subject holds. A role
1200
+ * here with a tenant is ignored.
1201
+ */
1202
+ globalRoles?(context?: {
1203
+ readonly held: readonly string[];
1204
+ }): CustomRole[] | Promise<CustomRole[]>;
1056
1205
  };
1206
+ /**
1207
+ * A `RoleSource` built for the subject the instance serves, for an adapter
1208
+ * option shared by every request: it gets the resolved subject (principal,
1209
+ * actor and delegation) and returns that subject's source, or `undefined`
1210
+ * for none. A throw reads no custom roles and reports `source-threw`.
1211
+ */
1212
+ type RoleSourceFactory = (subject: Subject) => RoleSource | undefined;
1057
1213
  /** One member of a scope instance, as `MembershipSource.list` returns it. */
1058
1214
  type MemberEntry = {
1059
1215
  readonly principal: {
@@ -1076,16 +1232,21 @@ type MembershipSource = {
1076
1232
  /**
1077
1233
  * The principal's current authorization version, bumped on every membership
1078
1234
  * change. A token whose `authzVersion` is behind it is stale for the
1079
- * policy's `fresh` permissions.
1235
+ * policy's `fresh` permissions. `roles` and `memberships` are what the
1236
+ * token claims, so a source can read more than the version in the same
1237
+ * call when the claims show it will be needed.
1080
1238
  */
1081
1239
  version?(principal: {
1082
1240
  readonly id: string;
1241
+ readonly roles?: readonly string[];
1242
+ readonly memberships?: readonly Membership[];
1083
1243
  }): number | undefined | Promise<number | undefined>;
1084
1244
  /**
1085
1245
  * Keep the memberships the verified token carries and read this source only
1086
1246
  * when the token says they were truncated (`claimsFirst`).
1087
1247
  */
1088
1248
  readonly claimsFirst?: boolean;
1249
+ readonly onStale?: "deny" | "reread";
1089
1250
  };
1090
1251
  /** An object's parent chain, as `RelationSource.ancestors` returns it. */
1091
1252
  type RelationChain = {
@@ -1144,6 +1305,10 @@ type RelationSource = {
1144
1305
  readonly id: string;
1145
1306
  readonly relation: string;
1146
1307
  }): RelationHolder[] | Promise<RelationHolder[]>;
1308
+ row?(query: {
1309
+ readonly resource: string;
1310
+ readonly id: string;
1311
+ }): Readonly<Record<string, unknown>> | null | undefined | Promise<Readonly<Record<string, unknown>> | null | undefined>;
1147
1312
  };
1148
1313
  /** Plan and seat names a principal holds in a tenant, from billing (Stripe Entitlements, a table). */
1149
1314
  type EntitlementSource = {
@@ -1236,6 +1401,11 @@ type Snapshot = {
1236
1401
  * from applying; they grant nothing and name the plan a denial asks for.
1237
1402
  */
1238
1403
  readonly notEntitled?: readonly SnapshotNotEntitled[];
1404
+ /**
1405
+ * The row id field per resource whose `id` option is not `id`, for the
1406
+ * grants in `grants`. Absent when every one reads `id`.
1407
+ */
1408
+ readonly ids?: Readonly<Record<string, string>>;
1239
1409
  /**
1240
1410
  * The permission keys the policy's delegations let the actor use for the
1241
1411
  * principal, sorted; present only when one applies. Outside it a check is
@@ -1257,12 +1427,16 @@ type SnapshotScope = {
1257
1427
  readonly within?: string;
1258
1428
  /** Resources whose rows this scope's key partitions, from their `memberOf` relations. */
1259
1429
  readonly resources?: readonly string[];
1430
+ /** Resource name to the field holding this scope's id, for a resource whose field is not `key` (its own `id`). */
1431
+ readonly fields?: Readonly<Record<string, string>>;
1260
1432
  };
1261
1433
  /** The declared roles and the custom-role ceiling the subject may assign in one tenant. */
1262
1434
  type SnapshotAssignable = {
1263
1435
  readonly tenant: string;
1264
1436
  readonly roles: readonly string[];
1265
1437
  readonly permissions: readonly Permission[];
1438
+ /** Permission key to the levels the subject may hand out; only permissions whose resource declares levels. */
1439
+ readonly levels?: Readonly<Record<string, readonly string[]>>;
1266
1440
  };
1267
1441
  type SnapshotGrant = {
1268
1442
  readonly permission: string;
@@ -1282,6 +1456,34 @@ type SnapshotGrant = {
1282
1456
  /** When the grant applies (Unix seconds, `from` inclusive, `until` exclusive); absent means always. */
1283
1457
  readonly validity?: GrantValidity;
1284
1458
  };
1459
+ /**
1460
+ * What a policy grants, as JSON a client builds snapshots from without the
1461
+ * policy: `localSnapshotManifest(policy)` writes it, `localSnapshot` in
1462
+ * `permdock/react-native` reads it.
1463
+ */
1464
+ type LocalSnapshotManifest = {
1465
+ readonly v: 1;
1466
+ readonly scopes?: readonly SnapshotScope[];
1467
+ readonly vocabulary?: Snapshot["vocabulary"];
1468
+ /** Declared role names; a custom role cannot take one. */
1469
+ readonly roles: readonly string[];
1470
+ /** Declared role names in rank order, when an `assigns` graph ranks them. */
1471
+ readonly rank?: readonly string[];
1472
+ /** Every declared grant, without a membership. */
1473
+ readonly grants: readonly SnapshotGrant[];
1474
+ /** Per custom-role scope (`global` for platform roles): the grants each entry resolves to. */
1475
+ readonly custom: Readonly<Record<string, LocalCustomRoleTable>>;
1476
+ };
1477
+ /** Grants a custom role entry resolves to, held by a placeholder role the client renames. */
1478
+ type LocalCustomRoleTable = {
1479
+ /** `{ permission }` per permission key, and `{ permission, level }` per declared level. */
1480
+ readonly permissions: Readonly<Record<string, {
1481
+ readonly all: readonly SnapshotGrant[];
1482
+ readonly levels?: Readonly<Record<string, readonly SnapshotGrant[]>>;
1483
+ }>>;
1484
+ /** `includes: [role]` per declared role. */
1485
+ readonly includes: Readonly<Record<string, readonly SnapshotGrant[]>>;
1486
+ };
1285
1487
  type SnapshotSource = {
1286
1488
  get(): Promise<Snapshot | string> | Snapshot | string;
1287
1489
  subscribe?(listener: () => void): () => void;
@@ -1502,6 +1704,12 @@ type SettingsSource = {
1502
1704
  settingsFor(tenant: string): TenantSettings | undefined | Promise<TenantSettings | undefined>;
1503
1705
  };
1504
1706
  declare function memorySettings(settings: Readonly<Record<string, TenantSettings>>): SettingsSource;
1707
+ /** Memberships keyed by principal id; `tenant` is not a filter, as for a database source. */
1708
+ declare function memoryMembershipSource(entries: Readonly<Record<string, readonly Membership[]>>): MembershipSource;
1709
+ /** A snapshot held in memory; `set` replaces it and notifies every subscriber. */
1710
+ declare function memorySnapshotSource(initial: Snapshot | string): SnapshotSource & {
1711
+ set(snapshot: Snapshot | string): void;
1712
+ };
1505
1713
  declare function memoryRoleSource(customRoles: readonly CustomRole[]): RoleSource;
1506
1714
  //#endregion
1507
1715
  //#region src/conditions/normalize.d.ts
@@ -1521,9 +1729,20 @@ type WhereShorthand<T = Record<string, unknown>> = {
1521
1729
  readonly and?: readonly WhereShorthand<T>[];
1522
1730
  readonly or?: readonly WhereShorthand<T>[];
1523
1731
  readonly not?: WhereShorthand<T>;
1524
- } & { readonly [K in keyof T]?: T[K] | FieldOperator | {
1732
+ } & ("subject" extends keyof T ? { readonly [K in keyof T as Exclude<K, "subject">]?: FieldWhere<T[K]>; } & {
1733
+ readonly subject?: SubjectWhere | FieldWhere<T["subject"]>;
1734
+ } : { readonly [K in keyof T]?: FieldWhere<T[K]>; } & {
1735
+ /** Holds only when the resolver checked the session live (`liveSession: true`). */
1736
+ readonly subject?: SubjectWhere;
1737
+ });
1738
+ type SubjectWhere = {
1739
+ readonly session: {
1740
+ readonly live: true;
1741
+ };
1742
+ };
1743
+ type FieldWhere<V> = V | FieldOperator | {
1525
1744
  readonly ref: string;
1526
- }; };
1745
+ };
1527
1746
  //#endregion
1528
1747
  //#region src/core/approvers.d.ts
1529
1748
  /** One named approver, by principal id. */
@@ -1531,13 +1750,41 @@ type UserApprover = {
1531
1750
  readonly kind: "user";
1532
1751
  readonly id: string;
1533
1752
  };
1753
+ /**
1754
+ * Whoever holds `permission` in the request's tenant, through any role,
1755
+ * custom roles included. Checked only through verdict facts
1756
+ * (`ApprovalVerdict.permissions`) that the handler computes from the
1757
+ * approver's own instance.
1758
+ */
1759
+ type PermissionApprover = {
1760
+ readonly kind: "permission";
1761
+ readonly permission: string;
1762
+ };
1763
+ /** An approver who matches at least one item; an item that is a list matches when every entry does. */
1764
+ type AnyOfApprover = {
1765
+ readonly kind: "any-of";
1766
+ readonly of: readonly (Approver | readonly Approver[])[];
1767
+ };
1534
1768
  /**
1535
1769
  * Who may approve: a subject-only grantee, a `relation()` the approver holds
1536
- * on the requested row (checked when the verdict is given), or `user(id)`.
1537
- * A list matches an approver who satisfies every item.
1770
+ * on the requested row (checked when the verdict is given), `user(id)`,
1771
+ * `holder(permission)`, or `anyOf(...)`. A list (or `allOf(...)`) matches an
1772
+ * approver who satisfies every item.
1538
1773
  */
1539
- type Approver = Grantee | UserApprover;
1540
- type ApproverInput = GranteeInput | UserApprover | readonly ApproverInput[];
1774
+ type Approver = Grantee | UserApprover | PermissionApprover | AnyOfApprover;
1775
+ type ApproverInput = GranteeInput | UserApprover | PermissionApprover | {
1776
+ readonly kind: "any-of";
1777
+ readonly of: readonly ApproverInput[];
1778
+ } | readonly ApproverInput[];
1779
+ /** Approves when the approver holds `permission` in the request's tenant (any role, custom roles included). */
1780
+ declare function holder(permission: Permission): PermissionApprover;
1781
+ /** Approves when the approver matches any one of `items`. */
1782
+ declare function anyOf(...items: readonly ApproverInput[]): {
1783
+ readonly kind: "any-of";
1784
+ readonly of: readonly ApproverInput[];
1785
+ };
1786
+ /** Approves when the approver matches every one of `items`; the same as a list. */
1787
+ declare function allOf(...items: readonly ApproverInput[]): readonly ApproverInput[];
1541
1788
  /** A named approver for `approval.by`, matched on the approver's principal id. */
1542
1789
  declare function user(id: string): UserApprover;
1543
1790
  //#endregion
@@ -1565,6 +1812,8 @@ type ApprovalStage = {
1565
1812
  readonly by: Approver | readonly Approver[];
1566
1813
  /** Absent means 1. */
1567
1814
  readonly quorum?: number;
1815
+ /** After `after`, `to` may approve this stage as well as `by`; other stages are unaffected. */
1816
+ readonly escalation?: ApprovalEscalation;
1568
1817
  };
1569
1818
  /**
1570
1819
  * `'any'`: `quorum` approvers from `by`. `'all'`: every stage completes, in
@@ -1596,6 +1845,11 @@ type ApprovalOption = "human" | {
1596
1845
  readonly stages?: readonly {
1597
1846
  readonly by: ApproverInput;
1598
1847
  readonly quorum?: number;
1848
+ /** After `after`, `to` may approve this stage as well as `by`. */
1849
+ readonly escalation?: {
1850
+ readonly after: string;
1851
+ readonly to: ApproverInput;
1852
+ };
1599
1853
  }[];
1600
1854
  /** `false` lets the request's principal approve it; absent means `true`. */
1601
1855
  readonly distinct?: boolean;
@@ -1720,12 +1974,19 @@ type GrantOptions<T = Record<string, unknown>> = {
1720
1974
  readonly fields?: readonly (keyof T & string)[];
1721
1975
  /** A name a `breakGlass` override may lift; only meaningful on a deny. */
1722
1976
  readonly name?: string;
1977
+ readonly group?: string;
1723
1978
  /** Purposes of use (`context.purpose`) that make the grant apply; non-portable. */
1724
1979
  readonly purpose?: readonly string[];
1725
1980
  /** The grant applies from this instant on (RFC 3339 string or Unix seconds); before it an allow denies with `inactive-grant` and a deny does not apply. */
1726
1981
  readonly validFrom?: string | number;
1727
1982
  /** The grant stops applying at this instant (exclusive; RFC 3339 string or Unix seconds). */
1728
1983
  readonly validUntil?: string | number;
1984
+ /**
1985
+ * An allow on an instance action counts only on rows whose scope instance
1986
+ * (or the whole app, globally) is one where the subject also holds this
1987
+ * permission through a role grant without a row condition.
1988
+ */
1989
+ readonly requires?: Permission | readonly Permission[];
1729
1990
  };
1730
1991
  /**
1731
1992
  * When a grant applies, in Unix seconds. `from` is inclusive, `until`
@@ -1736,10 +1997,15 @@ type GrantValidity = {
1736
1997
  readonly from?: number;
1737
1998
  readonly until?: number;
1738
1999
  };
1739
- /** The actor a policy delegation is for: an actor kind, narrowed to one id when `id` is set. */
2000
+ /**
2001
+ * The actor a policy delegation is for: an actor kind, narrowed to one id
2002
+ * when `id` is set, or to one named client when `client` is set (the name
2003
+ * the subject resolver gives a verified client id through `clients`).
2004
+ */
1740
2005
  type DelegationTarget = {
1741
2006
  readonly kind: string;
1742
2007
  readonly id?: string;
2008
+ readonly client?: string;
1743
2009
  };
1744
2010
  /**
1745
2011
  * A normalised policy delegation: holders of `from` let actors matching `to`
@@ -1757,7 +2023,7 @@ type PolicyDelegation = {
1757
2023
  type DelegationInput = {
1758
2024
  /** Who hands over: the same subject-only selectors as `approval.by` (a role, `authenticated()`, a plan, `assurance()`); not `relation()`. */
1759
2025
  readonly from: GranteeInput;
1760
- /** Which actor may act: `actor('eve')`, an actor kind, or `{ kind, id }` for one agent. */
2026
+ /** Which actor may act: `actor('eve')`, an actor kind, `{ kind, id }` for one agent, or `{ kind, client }` for one named OAuth client. */
1761
2027
  readonly to: ActorGrantee | string | DelegationTarget;
1762
2028
  /** The leaves or subtrees the actor may use; a deny grant still applies. */
1763
2029
  readonly permissions: readonly (Permission | PermissionTree)[];
@@ -1811,6 +2077,7 @@ type Grant = {
1811
2077
  readonly scope: GrantScope;
1812
2078
  /** A name a `breakGlass` override may lift; only meaningful on a deny. */
1813
2079
  readonly name?: string;
2080
+ readonly group?: string;
1814
2081
  /** Purposes of use that make the grant apply (`context.purpose`); non-portable. */
1815
2082
  readonly purpose?: readonly string[];
1816
2083
  /** Set on a break-glass allow: it overrides named denies and carries obligations. */
@@ -1821,6 +2088,10 @@ type Grant = {
1821
2088
  readonly hosted?: HostedGrantRef;
1822
2089
  /** When the grant applies; absent means always. */
1823
2090
  readonly validity?: GrantValidity;
2091
+ /** Set on a custom-role grant narrowed by a resource level (`CustomRoleGrant.level`). */
2092
+ readonly level?: string;
2093
+ /** The permission key the subject must also hold, through a role, on the row's scope instance or globally. */
2094
+ readonly requires?: readonly string[];
1824
2095
  };
1825
2096
  /** Which hosted policy document and grant a merged grant came from. */
1826
2097
  type HostedGrantRef = {
@@ -1878,8 +2149,21 @@ type Policy<TUser = unknown, TPrincipal extends Principal = Principal, V extends
1878
2149
  readonly fresh?: readonly string[];
1879
2150
  /** Policy delegations in declaration order; absent or empty when the policy declares none. */
1880
2151
  readonly delegations?: readonly PolicyDelegation[];
2152
+ /** Grant levels by resource (`resource(…, { levels })`), normalised; absent when none are declared. */
2153
+ readonly levels?: PolicyLevels;
2154
+ /** Coarse OAuth scopes in declaration order; absent when the policy declares none. */
2155
+ readonly oauthScopes?: readonly PolicyOAuthScope[];
1881
2156
  readonly index: PolicyIndex;
1882
2157
  };
2158
+ /**
2159
+ * A coarse OAuth scope an authorization server issues (`mcp:read`) and the
2160
+ * permission keys it covers, with their own scopes (`task:read`).
2161
+ */
2162
+ type PolicyOAuthScope = {
2163
+ readonly scope: string;
2164
+ readonly permissions: readonly string[];
2165
+ readonly scopes: readonly string[];
2166
+ };
1883
2167
  /** Lookups built once per policy, so a decision does not rescan every role and grant. */
1884
2168
  type PolicyIndex = {
1885
2169
  readonly declaredRoles: ReadonlySet<string>;
@@ -1901,6 +2185,8 @@ declare function role(name: string | Role, grants: RoleGrants, options?: RoleOpt
1901
2185
  /** Options built at runtime: the scope name is only checked by `definePolicy`. */
1902
2186
  declare function role(name: string | Role, grants: RoleGrants, options?: RoleOptions): RoleBinding;
1903
2187
  declare function normalizeAssurance(input: AssuranceRequirement | undefined): AssuranceRequirement | undefined;
2188
+ /** Resource name to level name to its normalised condition. */
2189
+ type PolicyLevels = Readonly<Record<string, Readonly<Record<string, Condition>>>>;
1904
2190
  type DefinePolicyOptions<TUser, TPrincipal extends Principal, S extends PolicyScopesInput = PolicyScopesInput> = {
1905
2191
  readonly roles?: readonly RoleBinding<ScopeNames<S>>[];
1906
2192
  readonly grants?: readonly (Omit<Grant, "role" | "scope"> | readonly Omit<Grant, "role" | "scope">[] | Grant)[];
@@ -1933,6 +2219,13 @@ type DefinePolicyOptions<TUser, TPrincipal extends Principal, S extends PolicySc
1933
2219
  * the call still applies as well; both must cover.
1934
2220
  */
1935
2221
  readonly delegations?: readonly DelegationInput[];
2222
+ /**
2223
+ * Coarse OAuth scopes the authorization server issues, each covering
2224
+ * permissions: a token holding `mcp:read` is delegated every permission
2225
+ * listed under it, as if it held each permission's own scope. Scope
2226
+ * challenges name the first coarse scope that covers the permission.
2227
+ */
2228
+ readonly oauthScopes?: Readonly<Record<string, readonly (Permission | PermissionTree)[]>>;
1936
2229
  };
1937
2230
  declare function definePolicy<TUser, TPrincipal extends Principal, const Input extends PermissionTree | PolicyVocabulary, const S extends PolicyScopesInput = PolicyScopesInput>(permissions: Input, options: DefinePolicyOptions<TUser, TPrincipal, S>): Policy<TUser, TPrincipal, VocabularyFromInput<Input>>;
1938
2231
  type MembershipFixture = {
@@ -1956,4 +2249,4 @@ type SubjectOf<P> = {
1956
2249
  readonly expiresAt?: number;
1957
2250
  };
1958
2251
  //#endregion
1959
- export { DecisionSink as $, relation as $n, RowPair as $t, RoleScope as A, memoryApprovalPolicies as An, isConditionRef as Ar, memoryEntitlementSource as At, normalizeAssurance as B, Obligation as Bn, CredentialPolicy as Bt, Policy as C, ArazzoPlan as Cn, RelatedCondition as Cr, TenantSettings as Ct, PrincipalOf as D, simulateArazzo as Dn, hasConditionOp as Dr, VerificationFailure as Dt, PolicyVocabulary as E, arazzoFindings as En, SqlFunctionCondition as Er, TokenVerifier as Et, ValidateMode as F, DeniedDecision as Fn, Credential as Ft, UserApprover as G, Grantee as Gn, credentialDelegation as Gt, separationConflicts as H, Trace as Hn, CredentialPrincipal as Ht, allow as I, ExplainedDecision as In, CredentialDecision as It, AuthEvent as J, actor as Jn, decideCredential as Jt, user as K, GranteeInput as Kn, credentialPolicyViolation as Kt, definePolicy as L, GrantedDecision as Ln, CredentialKind as Lt, SubjectOf as M, Decision as Mn, memorySettings as Mt, SupportAccessOptions as N, Denial as Nn, WireDecision as Nt, RoleBinding as O, ApprovalPolicy as On, isCondition as Or, VerifiedToken as Ot, SupportConsent as P, DenialReason as Pn, WireDenial as Pt, DecisionProvider as Q, plan as Qn, PermDockOptions as Qt, deny as R, LimitDetail as Rn, CredentialPermission as Rt, MembershipFixture as S, ArazzoFinding as Sn, OpaqueCondition as Sr, SubjectResolver as St, PolicyScopes as T, ArazzoStepResult as Tn, SqlFunctionArg as Tr, TokenSigner as Tt, Approver as U, TraceSkip as Un, CredentialRequest as Ut, role as V, Quota as Vn, CredentialPolicyViolation as Vt, ApproverInput as W, TraceSkipReason as Wn, DecideCredentialOptions as Wt, CredentialVerifier as X, assurance as Xn, DecideOptions as Xt, CredentialEvent as Y, anyone as Yn, parseCredential as Yt, DecisionEvent as Z, authenticated as Zn, PermDock as Zt, GrantLimit as _, RoleChangeOptions as _n, Condition as _r, SnapshotAssignable as _t, ApprovalRequirement as a, HostedGrantDropped as an, Assurance as ar, LimitStore as at, GrantValidity as b, breakGlass as bn, MemberOfCondition as br, SnapshotScope as bt, BreakGlassOptions as c, isPortableCondition as cn, CustomRole as cr, MembershipSource as ct, ClosureContext as d, parsePolicyDocument as dn, GnapAccess as dr, RelationHolder as dt, SimulateOptions as en, PolicyScopesInput as er, DirectoryEvent as et, ClosureGrantFn as f, Holder as fn, JsonWebKeyLike as fr, RelationSource as ft, GrantCondition as g, RoleChangeDecision as gn, VerifiedClaims as gr, Snapshot as gt, Grant as h, RoleChange as hn, Subject as hr, SinkEvent as ht, ApprovalOption as i, HostedGrantDropReason as in, Actor as ir, LimitRemaining as it, SeparationConflict as j, ApprovalRequiredDecision as jn, isSqlFunctionField as jr, memoryRoleSource as jt, RoleOptions as k, ApprovalPolicySource as kn, isConditionDate as kr, WhereCompiler as kt, BreakGlassRequirements as l, memoryPolicySource as ln, CustomRoleGrant as lr, RelationChain as lt, DelegationTarget as m, WhoCan as mn, Principal as mr, SettingsSource as mt, ApprovalEscalation as n, createPermDock as nn, ScopeDeclaration as nr, JwtClaims as nt, ApprovalStage as o, PolicyDocument as on, AuthorizationDetail as or, MemberEntry as ot, DelegationInput as p, HoldingVia as pn, Membership as pr, RoleSource as pt, AccessEvent as q, RelationGrantee as qn, credentialSubject as qt, ApprovalMode as r, HostedGrant as rn, ScopeNames as rr, LimitConsumeInput as rt, AssuranceRequirement as s, PolicySource as sn, Binding as sr, MembershipEvent as st, ActivationOption as t, WhereResult as tn, Scope as tr, EntitlementSource as tt, BreakGlassSpec as u, mergeHostedGrants as un, Delegation as ur, RelationGroup as ut, GrantOptions as v, RoleChangeTarget as vn, ConditionRef as vr, SnapshotGrant as vt, PolicyDelegation as w, ArazzoSimulateInput as wn, RelatedHop as wr, TokenFailureCause as wt, HostedGrantRef as x, supportAccess as xn, MemberOfParent as xr, SnapshotSource as xt, GrantScope as y, ActivateInput as yn, ConditionValue as yr, SnapshotNotEntitled as yt, normalizeApproval as z, MatchedGrant as zn, CredentialPermissionInput as zt };
2252
+ export { AccessEvent as $, ExplainedDecision as $n, CredentialPrincipal as $t, RoleOptions as A, RoleChangeOptions as An, GnapAccess as Ar, SnapshotSource as At, normalizeApproval as B, simulateArazzo as Bn, MemberOfParent as Br, memoryMembershipSource as Bt, Policy as C, mergeHostedGrants as Cn, Actor as Cr, SettingsSource as Ct, PolicyVocabulary as D, WhoCan as Dn, CustomRole as Dr, SnapshotGrant as Dt, PolicyScopes as E, HoldingVia as En, Binding as Er, SnapshotAssignable as Et, SupportConsent as F, ArazzoFinding as Fn, VerifiedClaims as Fr, TokenVerifier as Ft, Approver as G, ApprovalPolicyValidation as Gn, SqlFunctionArg as Gr, WireDenial as Gt, role as H, ApprovalPolicy as Hn, RelatedCondition as Hr, memorySettings as Ht, ValidateMode as I, ArazzoPlan as In, Condition as Ir, VerificationFailure as It, UserApprover as J, ApprovalRequiredDecision as Jn, isCondition as Jr, CredentialKind as Jt, ApproverInput as K, memoryApprovalPolicies as Kn, SqlFunctionCondition as Kr, Credential as Kt, allow as L, ArazzoSimulateInput as Ln, ConditionRef as Lr, VerifiedToken as Lt, SeparationConflict as M, ActivateInput as Mn, Membership as Mr, TenantSettings as Mt, SubjectOf as N, breakGlass as Nn, Principal as Nr, TokenFailureCause as Nt, PrincipalOf as O, RoleChange as On, CustomRoleGrant as Or, SnapshotNotEntitled as Ot, SupportAccessOptions as P, supportAccess as Pn, Subject as Pr, TokenSigner as Pt, user as Q, DeniedDecision as Qn, CredentialPolicyViolation as Qt, definePolicy as R, ArazzoStepResult as Rn, ConditionValue as Rr, WhereCompiler as Rt, MembershipFixture as S, memoryPolicySource as Sn, ScopeNames as Sr, RoleSourceFactory as St, PolicyOAuthScope as T, Holder as Tn, AuthorizationDetail as Tr, Snapshot as Tt, separationConflicts as U, ApprovalPolicyProblem as Un, RelatedHop as Ur, memorySnapshotSource as Ut, normalizeAssurance as V, APPROVAL_POLICY_UNAVAILABLE as Vn, OpaqueCondition as Vr, memoryRoleSource as Vt, AnyOfApprover as W, ApprovalPolicySource as Wn, RestrictedAncestors as Wr, WireDecision as Wt, anyOf as X, Denial as Xn, isConditionRef as Xr, CredentialPermissionInput as Xt, allOf as Y, Decision as Yn, isConditionDate as Yr, CredentialPermission as Yt, holder as Z, DenialReason as Zn, isSqlFunctionField as Zr, CredentialPolicy as Zt, GrantLimit as _, HostedGrantDropReason as _n, plan as _r, RelationChain as _t, ApprovalRequirement as a, decideCredential as an, Trace as ar, DecisionSink as at, GrantValidity as b, PolicySource as bn, Scope as br, RelationSource as bt, BreakGlassOptions as c, DeriveOptions as cn, Grantee as cr, JwtClaims as ct, ClosureContext as d, RowPair as dn, RelationGrantee as dr, LimitStore as dt, CredentialRequest as en, GrantedDecision as er, AuthEvent as et, ClosureGrantFn as f, SimulateOptions as fn, actor as fr, LocalCustomRoleTable as ft, GrantCondition as g, HostedGrant as gn, inherit as gr, MembershipSource as gt, Grant as h, createPermDock as hn, authenticated as hr, MembershipEvent as ht, ApprovalOption as i, credentialSubject as in, Quota as ir, DecisionProvider as it, RoleScope as j, RoleChangeTarget as jn, JsonWebKeyLike as jr, SubjectResolver as jt, RoleBinding as k, RoleChangeDecision as kn, Delegation as kr, SnapshotScope as kt, BreakGlassRequirements as l, PermDock as ln, GranteeInput as lr, LimitConsumeInput as lt, DelegationTarget as m, WhereResult as mn, assurance as mr, MemberEntry as mt, ApprovalEscalation as n, credentialDelegation as nn, MatchedGrant as nr, CredentialVerifier as nt, ApprovalStage as o, parseCredential as on, TraceSkip as or, DirectoryEvent as ot, DelegationInput as p, SnapshotOptions as pn, anyone as pr, LocalSnapshotManifest as pt, PermissionApprover as q, validateApprovalPolicy as qn, hasConditionOp as qr, CredentialDecision as qt, ApprovalMode as r, credentialPolicyViolation as rn, Obligation as rr, DecisionEvent as rt, AssuranceRequirement as s, DecideOptions as sn, TraceSkipReason as sr, EntitlementSource as st, ActivationOption as t, DecideCredentialOptions as tn, LimitDetail as tr, CredentialEvent as tt, BreakGlassSpec as u, PermDockOptions as un, InheritGrantee as ur, LimitRemaining as ut, GrantOptions as v, HostedGrantDropped as vn, relation as vr, RelationGroup as vt, PolicyDelegation as w, parsePolicyDocument as wn, Assurance as wr, SinkEvent as wt, HostedGrantRef as x, isPortableCondition as xn, ScopeDeclaration as xr, RoleSource as xt, GrantScope as y, PolicyDocument as yn, PolicyScopesInput as yr, RelationHolder as yt, deny as z, arazzoFindings as zn, MemberOfCondition as zr, memoryEntitlementSource as zt };