permdock 0.21.0 → 0.22.1

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 (363) hide show
  1. package/README.md +2 -1
  2. package/dist/a2a/index.d.ts +5 -5
  3. package/dist/a2a/index.js +5 -4
  4. package/dist/{adoption-scan-UkQisAqe.js → adoption-scan-DzX5Gqcg.js} +1 -1
  5. package/dist/agent/index.d.ts +2 -2
  6. package/dist/agent/index.js +1 -1
  7. package/dist/ai-sdk/index.d.ts +4 -4
  8. package/dist/ai-sdk/index.js +3 -3
  9. package/dist/app/index.d.ts +85 -0
  10. package/dist/app/index.js +91 -0
  11. package/dist/app-DIvM65Mv.js +24 -0
  12. package/dist/{approval-policies-CKlByf5o.d.ts → approval-policies-UnDSxT__.d.ts} +2 -2
  13. package/dist/{approval-prompt-CQFiO1KE.d.ts → approval-prompt-2hTqo6IM.d.ts} +2 -2
  14. package/dist/approvals/index.d.ts +3 -3
  15. package/dist/approvals/index.js +3 -3
  16. package/dist/{approvals-CuXILe52.js → approvals-B_sn4Wrn.js} +6 -6
  17. package/dist/{arazzo-CUthH61H.js → arazzo-BkjyGVF0.js} +1 -1
  18. package/dist/{arazzo-BC3uLIZy.js → arazzo-CTx11zFc.js} +3 -3
  19. package/dist/astro/index.d.ts +6 -6
  20. package/dist/astro/index.js +2 -2
  21. package/dist/{audience-BUonniPx.js → audience-5Xx1hdIv.js} +1 -1
  22. package/dist/{auth-j3Eu-j4h.js → auth-BxXHxWRy.js} +1 -1
  23. package/dist/authzen/index.d.ts +5 -5
  24. package/dist/authzen/index.js +4 -4
  25. package/dist/{automation-CpOk7Tlu.d.ts → automation-B20_8UoT.d.ts} +3 -3
  26. package/dist/{automation-x3KEUusw.js → automation-BueW05db.js} +2 -2
  27. package/dist/better-auth/index.d.ts +2 -2
  28. package/dist/better-auth/index.js +1 -1
  29. package/dist/better-supabase/index.d.ts +113 -56
  30. package/dist/better-supabase/index.js +213 -69
  31. package/dist/better-supabase-DF8f8oly.js +194 -0
  32. package/dist/{bind-CJf7S-Jd.js → bind-B4Z0U2Gr.js} +5 -5
  33. package/dist/{bind-XvnD_SUz.d.ts → bind-CnOMjazH.d.ts} +7 -7
  34. package/dist/{build-instance-CkRKgjSj.js → build-instance-B0vsViF5.js} +3 -25
  35. package/dist/{capability-zN6T9fxe.js → capability-CenWwTMR.js} +1 -1
  36. package/dist/{capability-v2xZB7us.d.ts → capability-YkRMUAsF.d.ts} +2 -2
  37. package/dist/{casbin-v9Xo_XPa.js → casbin-BFOuRptJ.js} +1 -1
  38. package/dist/{casbin-BOZN1P2Y.js → casbin-BpS9ABSO.js} +1 -1
  39. package/dist/catalog/index.d.ts +5 -5
  40. package/dist/catalog/index.js +5 -5
  41. package/dist/catalog-C462QC3A.js +1 -0
  42. package/dist/{catalog-DjDc87R2.js → catalog-CoyKnU5c.js} +1 -1
  43. package/dist/{catalog-s0waIrfY.js → catalog-Y4CjN8NA.js} +4 -4
  44. package/dist/{catalog-operations-BD22drQf.js → catalog-operations-Do1eD-Rt.js} +1 -1
  45. package/dist/{challenge-DbkpCx_v.js → challenge-B__LcNve.js} +3 -3
  46. package/dist/chat/index.d.ts +1 -1
  47. package/dist/chat/index.js +3 -2
  48. package/dist/chat-sdk/index.d.ts +3 -3
  49. package/dist/claude-agent/index.d.ts +3 -3
  50. package/dist/claude-agent/index.js +2 -2
  51. package/dist/clerk/index.d.ts +3 -3
  52. package/dist/cli/bin.js +1 -1
  53. package/dist/cli/index.d.ts +8 -7
  54. package/dist/cli/index.js +3 -3
  55. package/dist/cloud/index.d.ts +8 -8
  56. package/dist/cloud/index.js +3 -3
  57. package/dist/{cloud-CB0btByh.js → cloud-DXcQXWDi.js} +2 -2
  58. package/dist/{codemod-B-duJDFD.js → codemod-CxyKuniX.js} +13 -6
  59. package/dist/{codemod-C3a3Iz_w.js → codemod-DJ0WqXWk.js} +2 -2
  60. package/dist/{collect-DN_x7hvV.js → collect-Cr71JA7z.js} +8 -7
  61. package/dist/{collect-DMQ6Sxr6.js → collect-ScSG05VJ.js} +2 -2
  62. package/dist/collect-W9i7REKT.js +1 -0
  63. package/dist/compile/index.d.ts +1 -1
  64. package/dist/compile/index.js +1 -1
  65. package/dist/{compile-B_oJqmIg.js → compile-Cvru58id.js} +2 -2
  66. package/dist/{compile-DonvwG9x.d.ts → compile-DC-BrhH1.d.ts} +3 -3
  67. package/dist/{completion-6IshPaPd.js → completion-BHVvAJ6Q.js} +1 -1
  68. package/dist/{delegation-aK4T_5WU.js → condition-evaluate-bVVRSdzq.js} +159 -159
  69. package/dist/{config-C45X7mpm.js → config-2grt3oll.js} +1 -1
  70. package/dist/{config-D2oXUwos.js → config-DyNanTjZ.js} +10 -8
  71. package/dist/{config-report-Bmo62RRr.js → config-report-Cg5Y5j0h.js} +2 -2
  72. package/dist/{config-shape-D9paLhEX.js → config-shape-C4zqzG2K.js} +9 -2
  73. package/dist/{context-YhyXyqBI.js → context-Cem4QafV.js} +2 -2
  74. package/dist/convex/index.d.ts +5 -5
  75. package/dist/convex/index.js +2 -2
  76. package/dist/{core-Dxkwz4xR.js → core-CUjhfz0W.js} +6 -6
  77. package/dist/{core-9KbhurkH.d.ts → core-D2JNg5jA.d.ts} +3 -3
  78. package/dist/coverage-D8jBJdgD.d.ts +114 -0
  79. package/dist/coverage-Dh2W_DmF.js +211 -0
  80. package/dist/{create-DH4ZD0A7.d.ts → create-B2tdOygC.d.ts} +7 -7
  81. package/dist/{create-Q0wF9Elt.js → create-BJ2_8NDO.js} +5 -5
  82. package/dist/{create-BRiRVNUO.js → create-BsL5lCWR.js} +8 -7
  83. package/dist/{create-BzgDDamI.d.ts → create-CPDSbK1a.d.ts} +5 -5
  84. package/dist/{create-BQOQkYYg.d.ts → create-oMCcZV4X.d.ts} +9 -9
  85. package/dist/{credential-B3Hj4puZ.js → credential-Bap3HClV.js} +4 -4
  86. package/dist/{server-D0PW6ZCw.js → credentials-BXV0oz56.js} +3 -146
  87. package/dist/credentials-DPX140fN.d.ts +125 -0
  88. package/dist/delivery/index.d.ts +4 -4
  89. package/dist/delivery/index.js +1 -1
  90. package/dist/{denied-text-De8cw3MW.d.ts → denied-text-BXQkWU7d.d.ts} +2 -2
  91. package/dist/{describe-DibQM6g-.d.ts → describe-DVobr5FX.d.ts} +2 -2
  92. package/dist/{diff-BJv7I3GR.js → diff-BR9JArxz.js} +6 -6
  93. package/dist/{diff-3fpwo3UD.js → diff-Jc_kbDz-.js} +1 -1
  94. package/dist/{doctor-Bz7s3JYD.js → doctor-DaRoSPT0.js} +310 -36
  95. package/dist/{doctor-keoa9DpH.js → doctor-iIbdUK8F.js} +3 -3
  96. package/dist/drizzle/index.d.ts +3 -3
  97. package/dist/drizzle/index.js +1 -1
  98. package/dist/elysia/index.d.ts +5 -5
  99. package/dist/elysia/index.js +3 -3
  100. package/dist/{errors-OTE9u4Wk.d.ts → errors-D_JIQJYb.d.ts} +1 -1
  101. package/dist/{evaluate-Dcq_U2TV.js → evaluate-B5yZHmts.js} +16 -16
  102. package/dist/{evaluations-CNMVJVD6.js → evaluations-BzTDWO4m.js} +57 -57
  103. package/dist/{evaluations-OCm_Z-8V.d.ts → evaluations-DQYfh4Jh.d.ts} +3 -3
  104. package/dist/eve/index.d.ts +5 -5
  105. package/dist/eve/index.js +3 -3
  106. package/dist/express/index.d.ts +5 -5
  107. package/dist/express/index.js +3 -3
  108. package/dist/fastify/index.d.ts +5 -5
  109. package/dist/fastify/index.js +3 -3
  110. package/dist/{fetch-adapter-BlL-ZhHq.d.ts → fetch-adapter-DxqsIXSO.d.ts} +4 -4
  111. package/dist/{fetch-adapter-4EB3cLgB.js → fetch-adapter-MoYZ-vF5.js} +3 -3
  112. package/dist/{fields-D_TfExiI.js → fields-CVyOk-f1.js} +2 -2
  113. package/dist/{fixtures-Cemqurt8.js → fixtures-BVZc7OCF.js} +1 -1
  114. package/dist/{from-snapshot-DHnb8Fh4.js → from-snapshot-oR_N97dM.js} +346 -14
  115. package/dist/{gen-Cf7nQsOb.js → gen-Cw8goef4.js} +5 -5
  116. package/dist/{gen-DYF4LKUP.js → gen-DFpWGJWF.js} +1 -1
  117. package/dist/{grantee-conditions-DX4K_gGI.js → grantee-conditions-Dzprappv.js} +1 -1
  118. package/dist/{grantee-match-BP-k4vRJ.js → grantee-match-8J2y60MF.js} +3 -3
  119. package/dist/h3/index.d.ts +4 -4
  120. package/dist/h3/index.js +3 -3
  121. package/dist/{helpers-D-MXwkOF.js → helpers-DzBIfL1N.js} +25 -25
  122. package/dist/hono/index.d.ts +5 -5
  123. package/dist/hono/index.js +3 -3
  124. package/dist/{hosted-C2Pmhy2x.js → hosted-C5I2TSXm.js} +4 -4
  125. package/dist/{hosted-yhyAuQkL.d.ts → hosted-DXq1plaP.d.ts} +1 -1
  126. package/dist/{http-DhMWeB_h.js → http-dptLQzPP.js} +1 -1
  127. package/dist/{expiry-6XByK0dm.js → ids-DzhJaCUj.js} +23 -23
  128. package/dist/{import-C2ExjVvv.js → import-CvXswHDy.js} +2 -2
  129. package/dist/{import-CQ_kH_Ny.js → import-DDegvwDI.js} +2 -2
  130. package/dist/index-BcS8c_2S.d.ts +101 -0
  131. package/dist/{index--AwSBzJC.d.ts → index-BdZpqhJK.d.ts} +2 -2
  132. package/dist/{index-CLbGOPBr.d.ts → index-C-R8lBPb.d.ts} +3 -3
  133. package/dist/{index-Do7FqHEr.d.ts → index-C_8uxAlv.d.ts} +5 -5
  134. package/dist/{index-tuR-kZoJ.d.ts → index-Cjfa1Uwr.d.ts} +21 -40
  135. package/dist/{index-BqzpT-90.d.ts → index-iIsqXFVu.d.ts} +6 -6
  136. package/dist/index.d.ts +19 -20
  137. package/dist/index.js +25 -24
  138. package/dist/{init-DvkvbvZ_.js → init-D_T_zgFg.js} +2 -2
  139. package/dist/{init-kTFkEu8S.js → init-Dz552ZPp.js} +4 -4
  140. package/dist/{instance-options-Cq66kEeR.d.ts → instance-options-C6gEDOts.d.ts} +1 -1
  141. package/dist/instance-options-URVwqpMW.js +24 -0
  142. package/dist/{instance-snapshot-Bi4-dJk0.js → instance-snapshot-D_dGTq--.js} +9 -9
  143. package/dist/jwt/index.d.ts +4 -4
  144. package/dist/jwt/index.js +2 -2
  145. package/dist/{kernel-CLEzDmbv.js → kernel-NmxiWII2.js} +8 -8
  146. package/dist/kysely/index.d.ts +3 -3
  147. package/dist/kysely/index.js +1 -1
  148. package/dist/limits-CAhpRrhk.js +167 -0
  149. package/dist/{load-BaEamml-.js → load-C4p4VgwR.js} +2 -2
  150. package/dist/load-DiBUJx77.js +1 -0
  151. package/dist/{login-9ycIcJZH.js → login-B2usNw0X.js} +4 -4
  152. package/dist/{login-CM_etiLM.js → login-DIVe6QdP.js} +3 -3
  153. package/dist/{manifest-B5yF3CIq.d.ts → manifest-C6eFl3Vo.d.ts} +1 -0
  154. package/dist/{manifest-CCd-xrM3.js → manifest-CbHnl4I_.js} +35 -35
  155. package/dist/{manifest-BdzBobNK.js → manifest-D44OkoLk.js} +1 -1
  156. package/dist/{manifest-schema-CsFsYLF-.js → manifest-schema-DUheHWcp.js} +4 -0
  157. package/dist/{map-claims-PQwHynxV.js → map-claims-CAa_bQt9.js} +1 -1
  158. package/dist/{map-error-EOhahOVA.js → map-error-p4ROJ_26.js} +1 -1
  159. package/dist/mcp/index.d.ts +9 -9
  160. package/dist/mcp/index.js +9 -8
  161. package/dist/{migrate-CkLHdwuH.js → migrate-DVsxeE0y.js} +1 -1
  162. package/dist/{module-values-BYuNtdK5.js → module-values-BLiVlO1X.js} +3 -3
  163. package/dist/nest/index.d.ts +5 -5
  164. package/dist/nest/index.js +3 -3
  165. package/dist/next/index.d.ts +43 -17
  166. package/dist/next/index.js +54 -21
  167. package/dist/next/plugin.d.ts +1 -1
  168. package/dist/next/plugin.js +1 -1
  169. package/dist/node/index.d.ts +5 -5
  170. package/dist/node/index.js +2 -2
  171. package/dist/openai/index.d.ts +5 -5
  172. package/dist/openai/index.js +3 -3
  173. package/dist/openapi/index.d.ts +5 -59
  174. package/dist/openapi/index.js +3 -2
  175. package/dist/{openapi-DA7FVG2F.js → openapi-5moP9sTG.js} +4 -4
  176. package/dist/{openapi-BOsx0xn9.js → openapi-Cc-aS9xC.js} +6 -135
  177. package/dist/{openapi-QnnU2A1c.js → openapi-DcvNnLFa.js} +2 -2
  178. package/dist/{operations-Ci_rT6Uo.d.ts → operations-BMPx7HyO.d.ts} +1 -1
  179. package/dist/optional-8TKc-0j4.js +47 -0
  180. package/dist/orpc/index.d.ts +7 -7
  181. package/dist/orpc/index.js +4 -4
  182. package/dist/otel/index.d.ts +3 -3
  183. package/dist/otel/index.js +1 -1
  184. package/dist/{output-KT0a3B3H.js → output-RIUEs3_S.js} +1 -1
  185. package/dist/{ownership-CeNOtQMV.js → ownership-adPAsUwY.js} +15 -13
  186. package/dist/{parse-CXTT7hBq.js → parse-CORUNcCo.js} +1 -1
  187. package/dist/{parse-local-manifest-CE4tgFsj.d.ts → parse-local-manifest-BaCqsqwC.d.ts} +1 -1
  188. package/dist/pdp/index.d.ts +3 -3
  189. package/dist/pdp/index.js +4 -3
  190. package/dist/{permdock-DbAq8_Fp.js → permdock-B5LyNVgn.js} +70 -34
  191. package/dist/{permdock-CsrvbzHk.d.ts → permdock-BaB-KQqn.d.ts} +46 -9
  192. package/dist/{permissions-Dz79qsFw.js → permissions-COpRGKt7.js} +1 -1
  193. package/dist/{permissions-Bx6UI8n1.d.ts → permissions-DriWkV7q.d.ts} +1 -2
  194. package/dist/{policy-from-catalog-BtqfxytV.js → policy-from-catalog-Cy103lsm.js} +8 -8
  195. package/dist/{policy-types-BI9C5Sp5.d.ts → policy-types-rNfz7t0M.d.ts} +9 -3
  196. package/dist/{policy-CaAME-Rh.js → policy-wGzbAPQF.js} +7 -7
  197. package/dist/{policy-Dh9WVSVz.d.ts → policy-x8RBKW8d.d.ts} +2 -2
  198. package/dist/{postgrest-CWCCbaxm.d.ts → postgrest-Cn0Res25.d.ts} +9 -21
  199. package/dist/{powersync-DiqY3VBG.js → powersync-BUO5uQve.js} +11 -11
  200. package/dist/{powersync-CWsN-QaK.js → powersync-C5_aFFaU.js} +2 -2
  201. package/dist/powersync-DhspazC8.js +1 -0
  202. package/dist/preset/index.js +1 -1
  203. package/dist/{preset-pPrVyGU5.js → preset-Bn5Z54cH.js} +5 -6
  204. package/dist/prisma/index.d.ts +2 -2
  205. package/dist/prisma/index.js +1 -1
  206. package/dist/{protected-action-CuG0xz4P.d.ts → protected-action-C4aj1KjO.d.ts} +6 -7
  207. package/dist/{protected-action-CD1HXwQK.js → protected-action-E7Sdt_Dt.js} +1 -1
  208. package/dist/{provider-ihxuJbMi.d.ts → provider-B-1DlOGM.d.ts} +1 -1
  209. package/dist/{provider-qESIf_C0.js → provider-DKO9KHua.js} +2 -2
  210. package/dist/{provider-store-BTHGJH9j.js → provider-store-D4PU1my_.js} +2 -2
  211. package/dist/{pull-B4EhSqOG.js → pull-BkT7tTKb.js} +6 -6
  212. package/dist/pull-COPm1W-l.js +1 -0
  213. package/dist/{push-DYOI4bPf.js → push-CEPcWdTJ.js} +7 -7
  214. package/dist/{pushed-policy-Dszouliu.js → pushed-policy-Bi5-il4C.js} +2 -2
  215. package/dist/{pushed-policy-P0hgyLBh.d.ts → pushed-policy-P55cJNx5.d.ts} +1 -1
  216. package/dist/react/index.d.ts +6 -6
  217. package/dist/react/index.js +3 -3
  218. package/dist/react/provider-client.d.ts +1 -1
  219. package/dist/react/provider-client.js +1 -1
  220. package/dist/react-native/index.d.ts +9 -9
  221. package/dist/react-native/index.js +7 -7
  222. package/dist/{relation-walk-DK_gkgL7.js → relation-walk-BDTaTKTM.js} +1 -1
  223. package/dist/{relations-BxvRvDHK.js → relations-CMsJ1ARY.js} +1 -1
  224. package/dist/{replay-DYXI4gRN.d.ts → replay-DKhFvt0L.d.ts} +1 -1
  225. package/dist/{request-context-VjeXst1z.js → request-context-5gl_oxO1.js} +2 -2
  226. package/dist/resend/index.d.ts +4 -4
  227. package/dist/resend/index.js +2 -2
  228. package/dist/{resolve-names-BIHnWL_L.js → resolve-names-bzYlAXRt.js} +11 -6
  229. package/dist/{rls-CMFZWosz.js → rls-DTf8X__h.js} +45 -18
  230. package/dist/{rls-C7qXye9M.js → rls-v6V75yf_.js} +1 -1
  231. package/dist/{role-builder-C5AgaC1x.js → role-builder-boQiUvfo.js} +3 -3
  232. package/dist/{rpc-CYXICjM1.d.ts → rpc-BqRiVpbP.d.ts} +2 -2
  233. package/dist/{rpc-BNIQwEB6.js → rpc-Dhi55Whd.js} +2 -2
  234. package/dist/{run-CMJX9x7b.js → run-CgSQS9RF.js} +3 -3
  235. package/dist/run-ItR_bQGz.js +1 -0
  236. package/dist/{run-ticket-CjvXr6wj.js → run-ticket-Ddxt9OuU.js} +2 -2
  237. package/dist/{run-ticket-BXYqQ9dy.d.ts → run-ticket-Dulj4RQk.d.ts} +2 -2
  238. package/dist/{saas-DHFfthXv.js → saas-DABv6vjy.js} +6 -5
  239. package/dist/{scan-CSOkcNdl.js → scan-BY3Pp1PS.js} +1 -1
  240. package/dist/{schema-7pXCaRYB.js → schema-B_HsJKm2.js} +1 -1
  241. package/dist/scim/index.d.ts +1 -1
  242. package/dist/scim/index.js +1 -1
  243. package/dist/{scopes-BSdYaGHs.js → scopes-gdH__vDZ.js} +1 -1
  244. package/dist/server/index.d.ts +11 -10
  245. package/dist/server/index.js +7 -6
  246. package/dist/server-CKjFooaJ.js +147 -0
  247. package/dist/{server-types-Bfl-IrzZ.d.ts → server-types--_Hann81.d.ts} +9 -9
  248. package/dist/{shared-sW3VYchq.js → shared-DfaIWvIJ.js} +11 -2
  249. package/dist/{sink-RwmP7ZHs.d.ts → sink-Cs6z34AX.d.ts} +4 -4
  250. package/dist/{skills-DrX83QBK.js → skills-Bj2wk38p.js} +2 -2
  251. package/dist/{skills-DAjg-rgF.js → skills-Clo4qYLn.js} +1 -1
  252. package/dist/{snapshot-DHPih65J.js → snapshot-C2j96x97.js} +4 -4
  253. package/dist/{snapshot-cache-MPinwwgZ.d.ts → snapshot-cache-Cc7VNabe.d.ts} +1 -1
  254. package/dist/solid/index.d.ts +6 -7
  255. package/dist/solid/index.js +2 -2
  256. package/dist/solid-start/index.d.ts +6 -6
  257. package/dist/solid-start/index.js +3 -3
  258. package/dist/{sources-sgQlMfmz.d.ts → sources-CdYZBVcW.d.ts} +2 -2
  259. package/dist/{src-Cop53_X1.js → src-BG9YJM3Q.js} +96 -247
  260. package/dist/ssf/index.d.ts +3 -3
  261. package/dist/ssf/index.js +3 -3
  262. package/dist/{standard-webhooks-CFZIYtBF.d.ts → standard-webhooks-CJBgfl7y.d.ts} +2 -2
  263. package/dist/{store-CSOsXd5s.js → store-BpKH-pLm.js} +2 -2
  264. package/dist/{store-CRQ5VrWR.d.ts → store-DSyjHD5-.d.ts} +5 -5
  265. package/dist/{store-options-CDvoX52-.js → store-options-CXv6BHH6.js} +5 -6
  266. package/dist/{stores-PpYVQ5yF.js → stores-BuqAHjp_.js} +1 -1
  267. package/dist/{stores-pEBMy94l.d.ts → stores-C6-7TPTV.d.ts} +6 -7
  268. package/dist/{postgrest-BrjrckDG.js → subject-BqFwS6l3.js} +214 -319
  269. package/dist/subject-cache-BT1fGuea.js +193 -0
  270. package/dist/subject-cache-d_Z4KAnm.d.ts +144 -0
  271. package/dist/supabase/index.d.ts +7 -6
  272. package/dist/supabase/index.js +4 -3
  273. package/dist/supabase/middleware.d.ts +6 -6
  274. package/dist/supabase/middleware.js +6 -6
  275. package/dist/{supabase-Cbl2orB2.js → supabase-CJv6K3iz.js} +2 -2
  276. package/dist/{supabase-CVZuytCC.js → supabase-DnazO6W4.js} +3 -3
  277. package/dist/{supabase-hook-BUcu3vPM.js → supabase-hook-DLQMugW8.js} +174 -62
  278. package/dist/supabase-hook-vZADjjfN.js +1 -0
  279. package/dist/{supautils-a_253u1X.js → supautils-BHKsP7l-.js} +302 -43
  280. package/dist/{support-session-BsmPCbz8.js → support-session-BGeEYDSq.js} +2 -2
  281. package/dist/svelte/index.d.ts +5 -5
  282. package/dist/svelte/index.js +3 -3
  283. package/dist/svelte/runtime.d.ts +3 -3
  284. package/dist/svelte/runtime.js +1 -1
  285. package/dist/svelte/source.d.ts +5 -5
  286. package/dist/svelte/source.js +2 -2
  287. package/dist/sveltekit/index.d.ts +6 -6
  288. package/dist/sveltekit/index.js +2 -2
  289. package/dist/{tables-XrvffTMj.js → tables-CbEOy2Ma.js} +137 -55
  290. package/dist/tanstack-start/index.d.ts +6 -6
  291. package/dist/tanstack-start/index.js +2 -2
  292. package/dist/{tenancy-DvOHHk3-.js → tenancy-BlxY5T0q.js} +2 -2
  293. package/dist/terminal/index.d.ts +6 -6
  294. package/dist/terminal/index.js +6 -6
  295. package/dist/testing/core.d.ts +1 -1
  296. package/dist/testing/core.js +1 -1
  297. package/dist/testing/fixtures/index.d.ts +36 -3
  298. package/dist/testing/fixtures/index.js +40 -3
  299. package/dist/testing/index.d.ts +42 -26
  300. package/dist/testing/index.js +115 -27
  301. package/dist/testing/saas/index.d.ts +5 -5
  302. package/dist/testing/saas/index.js +2 -2
  303. package/dist/testing/saas/permissions.d.ts +1 -1
  304. package/dist/testing/saas/permissions.js +1 -1
  305. package/dist/trpc/index.d.ts +6 -6
  306. package/dist/trpc/index.js +4 -4
  307. package/dist/{type-helpers-BjOLGVy1.d.ts → type-helpers-iXJEIDe7.d.ts} +3 -4
  308. package/dist/{types-p8mhWTcR.d.ts → types-B9F0EZAF.d.ts} +3 -3
  309. package/dist/{types-DZwEOsK1.d.ts → types-BSNZMp5b.d.ts} +1 -1
  310. package/dist/{types-MixnvXQ5.d.ts → types-BpxdxaRD.d.ts} +5 -5
  311. package/dist/{types-C3C9ien9.d.ts → types-CD1qmxdx.d.ts} +4 -4
  312. package/dist/{types-zh4WGQcP.d.ts → types-C_a44wSr.d.ts} +3 -3
  313. package/dist/{types-DBVSljAx.d.ts → types-Cq2rvv-C.d.ts} +3 -3
  314. package/dist/{types--_lpWUGV.d.ts → types-CuDXvyIT.d.ts} +5 -5
  315. package/dist/{types-7Vlz1Wi2.d.ts → types-DAyp592k.d.ts} +2 -2
  316. package/dist/{types-DjGZAU64.d.ts → types-NikV1pND.d.ts} +4 -4
  317. package/dist/{types-BzxA2OAD.d.ts → types-ZfjQB0KC.d.ts} +2 -2
  318. package/dist/{types-DotXrris.d.ts → types-_pi9kxS2.d.ts} +2 -2
  319. package/dist/{types-D1NjjwI4.d.ts → types-cNZhj0UF.d.ts} +40 -9
  320. package/dist/unplugin/index.d.ts +1 -1
  321. package/dist/unplugin/index.js +1 -1
  322. package/dist/{usage-DHsqp4lN.js → usage-BUUXeKwk.js} +1 -1
  323. package/dist/{usage-DPbdI3Vi.js → usage-DlOllyPi.js} +10 -10
  324. package/dist/usage-NmH5QXKC.js +1 -0
  325. package/dist/{validation-error-DkOK9zUE.d.ts → validation-error-DLAYFlkr.d.ts} +1 -1
  326. package/dist/{verify-C0jGJrmb.js → verify-CfmvQjVw.js} +41 -24
  327. package/dist/version-sources-BC3hf2ME.js +34 -0
  328. package/dist/{permission-types-CAY-GU7e.d.ts → vocabulary-DeZvUaTw.d.ts} +69 -1
  329. package/dist/vue/index.d.ts +6 -7
  330. package/dist/vue/index.js +2 -2
  331. package/dist/{waiter-BjVI_Byg.d.ts → waiter-cbK1CBhT.d.ts} +2 -2
  332. package/dist/{watch-Dz2LNM1R.js → watch-BigZ260i.js} +2 -2
  333. package/dist/watch-CHURMgrv.js +1 -0
  334. package/dist/webmcp/index.d.ts +2 -2
  335. package/dist/{who-can-CZeAwQZD.js → who-can-CjfMP9a4.js} +8 -8
  336. package/dist/workflow/index.d.ts +3 -3
  337. package/dist/workflow/index.js +6 -5
  338. package/dist/workflow-sdk/index.d.ts +5 -5
  339. package/dist/{wrap-EQ6Or2Hi.d.ts → wrap-B-k2qHJx.d.ts} +2 -2
  340. package/package.json +16 -4
  341. package/schemas/supabase-manifest-v1.json +6 -0
  342. package/skills/permdock-wire/references/presets-and-recipes.md +2 -2
  343. package/dist/better-supabase-ayun1IKE.js +0 -122
  344. package/dist/catalog-BTPySmbp.js +0 -1
  345. package/dist/collect-eSTXOZDC.js +0 -1
  346. package/dist/index-DuOF7OqS.d.ts +0 -222
  347. package/dist/load-CjnlPxpL.js +0 -1
  348. package/dist/powersync-CWCirKAJ.js +0 -1
  349. package/dist/pull-VzcECZ-R.js +0 -1
  350. package/dist/run-D2e1tybu.js +0 -1
  351. package/dist/supabase-hook-QWphWBnG.js +0 -1
  352. package/dist/usage-dmSjKx-Z.js +0 -1
  353. package/dist/version-cache-q5cpaDSt.d.ts +0 -57
  354. package/dist/vocabulary-DEJ5j4mR.d.ts +0 -70
  355. package/dist/watch-CS69ftMP.js +0 -1
  356. package/dist/where-scope-BAyOsPQW.js +0 -332
  357. package/dist/{approval-normalize-hlfO9BJv.js → approval-normalize-DNLW0zOM.js} +1 -1
  358. package/dist/{body-C9JbIoqb.js → body-B3ylkmmE.js} +1 -1
  359. package/dist/{catalog-doc-nrgfbh8I.js → catalog-doc-Zi0jRpyH.js} +2 -2
  360. package/dist/{device-BwbJNmb2.js → device-BkSynWdg.js} +1 -1
  361. package/dist/{prompt-BYc6drYW.js → prompt-D1Gj1W4Y.js} +1 -1
  362. package/dist/{scim-C30QBBoF.js → scim-BG6uPUeW.js} +1 -1
  363. package/dist/{wrap-C5PWzgkq.js → wrap-BKU5Arsu.js} +1 -1
@@ -1,122 +0,0 @@
1
- import { r as isRecord } from "./compact-CAf557ZB.js";
2
- import "./budget-BBCPDOGP.js";
3
- import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
4
- import { dirname, join, resolve } from "node:path";
5
- //#region src/cli/shared/doctor-files.ts
6
- const nodeFiles = Object.freeze({
7
- exists: (path) => existsSync(path),
8
- read: (path) => readFileSync(path, "utf8"),
9
- list: (path) => readdirSync(path),
10
- isDirectory: (path) => statSync(path, { throwIfNoEntry: false })?.isDirectory() === true
11
- });
12
- function filesOf(input) {
13
- return input.files ?? nodeFiles;
14
- }
15
- /** Parses the JSON file at `path`; throws when it is missing or invalid. */
16
- function readJson(files, path) {
17
- return JSON.parse(files.read(path));
18
- }
19
- //#endregion
20
- //#region src/cli/shared/workspace.ts
21
- /**
22
- * The directories from `cwd` up to the workspace root: the first one with a
23
- * `pnpm-workspace.yaml`, a `package.json` that declares `workspaces`, or a
24
- * `.git`. Skills are often installed once at a monorepo's root.
25
- */
26
- function workspaceDirs(files, cwd) {
27
- const dirs = [];
28
- let dir = resolve(cwd);
29
- for (;;) {
30
- dirs.push(dir);
31
- if (isWorkspaceRoot(files, dir)) return dirs;
32
- const parent = dirname(dir);
33
- if (parent === dir) return [resolve(cwd)];
34
- dir = parent;
35
- }
36
- }
37
- function isWorkspaceRoot(files, dir) {
38
- if (files.exists(join(dir, "pnpm-workspace.yaml")) || files.exists(join(dir, ".git"))) return true;
39
- const manifest = join(dir, "package.json");
40
- if (!files.exists(manifest)) return false;
41
- try {
42
- const parsed = readJson(files, manifest);
43
- return parsed !== null && typeof parsed === "object" && Object.hasOwn(parsed, "workspaces");
44
- } catch {
45
- return false;
46
- }
47
- }
48
- //#endregion
49
- //#region src/cli/project/better-supabase.ts
50
- const CONFIG_FILES = [
51
- "better-supabase.config.ts",
52
- "better-supabase.config.mts",
53
- "better-supabase.config.js",
54
- "better-supabase.config.mjs"
55
- ];
56
- /**
57
- * The default export of the nearest `better-supabase.config.*`, if it loads.
58
- * The search starts in `from` (default `cwd`), the directory of
59
- * `permdock.config.ts`, and goes up to the workspace root, so an app inside a
60
- * monorepo finds the root's config.
61
- */
62
- async function betterSupabaseConfig(input) {
63
- const files = filesOf(input);
64
- const path = workspaceDirs(files, input.from ?? input.cwd).flatMap((dir) => CONFIG_FILES.map((name) => resolve(dir, name))).find((file) => files.exists(file));
65
- if (path === void 0) return;
66
- try {
67
- const { loadModule } = await import("./load-CjnlPxpL.js");
68
- const loaded = (await loadModule(path))["default"];
69
- return isRecord(loaded) ? loaded : void 0;
70
- } catch {
71
- return;
72
- }
73
- }
74
- function stringAt(value, ...path) {
75
- let at = value;
76
- for (const key of path) {
77
- if (!isRecord(at)) return void 0;
78
- at = at[key];
79
- }
80
- return typeof at === "string" && at !== "" ? at : void 0;
81
- }
82
- /**
83
- * The claim better-supabase writes the active tenant to: `auth.tenant.claim` in
84
- * a grouped config, `claims.tenant` in a flat one, then `rls.tenantClaim` and
85
- * `tenant_id`.
86
- */
87
- function betterSupabaseTenantClaim(config, betterSupabase) {
88
- return stringAt(betterSupabase, "auth", "tenant", "claim") ?? stringAt(betterSupabase, "claims", "tenant") ?? config.rls?.tenantClaim ?? "tenant_id";
89
- }
90
- /**
91
- * Whether better-supabase's sessions block writes its own version table and the
92
- * `authz:<uid>` receive policy (`blocks.sessions.authzVersions`).
93
- */
94
- function betterSupabaseAuthzVersions(betterSupabase) {
95
- const blocks = betterSupabase["blocks"];
96
- const sessions = isRecord(blocks) ? blocks["sessions"] : void 0;
97
- if (!isRecord(sessions)) return false;
98
- const options = sessions["options"];
99
- return sessions["authzVersions"] === true || isRecord(options) && options["authzVersions"] === true;
100
- }
101
- /** Resolve the hook defaults once for generation, inspection and doctor. */
102
- function betterSupabaseDefaults(config, betterSupabase) {
103
- const hook = config.supabase?.hook;
104
- if (betterSupabase === void 0 || hook === void 0) return config;
105
- const broadcast = hook.broadcast === false ? false : {
106
- topic: hook.broadcast?.topic ?? "better_supabase:authz",
107
- receivePolicy: hook.broadcast?.receivePolicy ?? !betterSupabaseAuthzVersions(betterSupabase)
108
- };
109
- return {
110
- ...config,
111
- supabase: {
112
- ...config.supabase,
113
- hook: {
114
- ...hook,
115
- activeFrom: hook.activeFrom ?? `app_metadata.${betterSupabaseTenantClaim(config, betterSupabase)}`,
116
- broadcast
117
- }
118
- }
119
- };
120
- }
121
- //#endregion
122
- export { workspaceDirs as a, readJson as c, betterSupabaseTenantClaim as i, betterSupabaseConfig as n, filesOf as o, betterSupabaseDefaults as r, nodeFiles as s, betterSupabaseAuthzVersions as t };
@@ -1 +0,0 @@
1
- export { t as catalogFile, n as runCatalog } from "./catalog-s0waIrfY.js";
@@ -1 +0,0 @@
1
- export { r as runCollect } from "./collect-DN_x7hvV.js";
@@ -1,222 +0,0 @@
1
- import { D as Policy, G as CredentialVerifier, Mt as Credential, N as PolicyVocabulary, Pt as CredentialKind, Tt as SupportSession, X as DecisionSink, Yn as Decision, _t as TokenSigner, gt as TokenFailureCause, jt as ApiKeyPrincipal, lt as SettingsSource, sn as AuthEvent, vt as TokenVerifier, xr as Subject, yr as Principal } from "./policy-types-BI9C5Sp5.js";
2
- import { f as PermissionTree, u as Permission } from "./permission-types-CAY-GU7e.js";
3
- import { _ as PrincipalSource } from "./permdock-CsrvbzHk.js";
4
- import { a as ProblemDetails, s as Disclosure, t as ApprovalHint } from "./errors-OTE9u4Wk.js";
5
- import { c as ServerPermDock, l as ServerPermDockOptions } from "./server-types-Bfl-IrzZ.js";
6
- //#region src/server/create.d.ts
7
- /**
8
- * The Fetch factory behind every HTTP adapter. The subject and actor are
9
- * resolved once per `Request`; one instance is cached per `(Request, tenant)`,
10
- * so a global middleware and a later tenant-scoped `protect` never share a
11
- * tenant.
12
- */
13
- declare function createPermDock<TUser, TPrincipal extends Principal = Principal, V extends PolicyVocabulary = PolicyVocabulary>(policy: Policy<TUser, TPrincipal, V>, given: ServerPermDockOptions<TUser>): ServerPermDock<V>;
14
- //#endregion
15
- //#region src/server/map-error.d.ts
16
- type ProblemFromErrorOptions = {
17
- readonly instance?: string;
18
- /** Whether the request carried credentials, which picks the `401` challenge. */
19
- readonly credentials?: boolean;
20
- };
21
- /**
22
- * Turns a thrown PermDock error into its Problem Details response, with the
23
- * status, `WWW-Authenticate` and rate-limit fields `protect` sends for the same
24
- * decision. Returns `undefined` for anything else so the framework's own error
25
- * path takes over.
26
- */
27
- declare function problemFromError(error: unknown, options?: ProblemFromErrorOptions): Response | undefined;
28
- //#endregion
29
- //#region src/server/credentials.d.ts
30
- /** `on('auth')` causes for an API key that resolves to the anonymous subject. */
31
- type ApiKeyFailureCause = "malformed" | "unknown-credential" | "invalid-claims" | "expired" | "credential-policy" | "credential-revoked" | "owner-unavailable";
32
- /** An opaque key split at its last `_`: `pdk_<id>_<secret><checksum>`. */
33
- type ApiKeyParts = {
34
- readonly id: string;
35
- readonly secret: string;
36
- };
37
- /**
38
- * What an application stores per key: the credential and the key's hash, never
39
- * the key.
40
- */
41
- type StoredCredential = {
42
- readonly credential: Credential;
43
- readonly hash: string;
44
- };
45
- /**
46
- * Splits `pdk_<id>_<secret><checksum>`: `id` is 1 to 128 of `A-Z a-z 0-9 _ -`,
47
- * the secret 43 base62 characters and the checksum the 6 base62 characters of
48
- * the CRC-32 of everything before it. Anything else, including a checksum that
49
- * does not match, is `undefined`.
50
- */
51
- declare function parseApiKey(key: unknown): ApiKeyParts | undefined;
52
- /**
53
- * Splits `pdfeed_<id>_<secret><checksum>`. `id` is `isFeedId`, the secret is 26
54
- * lowercase base32 characters and the checksum is 6 more. A checksum that does
55
- * not match is `undefined`.
56
- */
57
- declare function parseFeedKey(key: unknown): ApiKeyParts | undefined;
58
- /**
59
- * A fresh `pdfeed_<id>_<secret><checksum>`: 26 lowercase base32 characters (130
60
- * bits) and a 6-character CRC-32 checksum. The whole key is lowercase.
61
- */
62
- declare function generateFeedKey(id: string): string;
63
- /**
64
- * A fresh `pdk_<id>_<secret><checksum>`: a 43-character base62 secret (about
65
- * 256 bits) and a 6-character CRC-32 checksum, so a secret scanner can tell a
66
- * real key from a lookalike without calling the issuer.
67
- */
68
- declare function generateApiKey(id: string): string;
69
- /** base64url SHA-256 of the whole key, the value to store and compare. */
70
- declare function hashApiKey(key: string): Promise<string>;
71
- /**
72
- * A `CredentialVerifier` over the application's own table: `find` looks a key
73
- * up by the id in it, and the key's hash is compared in constant time. A record
74
- * that is not a valid v1 credential, or whose id is not the key's, verifies to
75
- * `null`. A throwing `find` propagates, so the resolver denies with
76
- * `source-threw`.
77
- */
78
- declare function apiKeyVerifier(options: {
79
- readonly find: (id: string) => StoredCredential | null | undefined | Promise<StoredCredential | null | undefined>;
80
- /** Passed through as the verifier's `touch`, for a `lastUsedAt` column. */
81
- readonly touch?: CredentialVerifier["touch"];
82
- }): CredentialVerifier;
83
- type MemoryCredentialStore = CredentialVerifier & {
84
- /** Stores `credential` and returns its key; the key is never stored. */
85
- issue: (credential: Credential) => Promise<string>;
86
- /** A new secret for the same id; the old key stops verifying at once. */
87
- rotate: (id: string) => Promise<string | undefined>;
88
- /** `true` when a credential was removed. */
89
- revoke: (id: string) => boolean;
90
- list: () => readonly Credential[];
91
- /** When `touch` last recorded a use of `id`, as RFC 3339. */
92
- lastUsedAt: (id: string) => string | undefined;
93
- };
94
- /**
95
- * In-process credentials for tests and single-replica apps. `issue`, `rotate`
96
- * and `revoke` write `credential` events to `sink` when one is given.
97
- */
98
- declare function memoryCredentialStore(options?: {
99
- readonly sink?: DecisionSink;
100
- readonly source?: string;
101
- }): MemoryCredentialStore;
102
- type ApiKeySubjectOptions = {
103
- readonly verifier: CredentialVerifier;
104
- /**
105
- * The definitions, to turn the credential's permission keys into its
106
- * delegation.
107
- */
108
- readonly permissions: PermissionTree;
109
- /**
110
- * Loads the live owner of a user-bound key: roles and memberships as of this
111
- * request, asked with the key's tenant. `null` (a deleted or suspended user)
112
- * is anonymous with `owner-unavailable`, and a throw is `source-threw`.
113
- * Without it the owner is `{ id, kind: 'user' }` and its rights come from the
114
- * `memberships` source passed to `createPermDock`.
115
- */
116
- readonly principals?: PrincipalSource;
117
- /**
118
- * The tenant the request acts in: a user key is held to its owner's
119
- * memberships there.
120
- */
121
- readonly tenant?: string;
122
- /** `true` when the application revoked the credential id; a throw denies. */
123
- readonly revoked?: (id: string) => boolean | Promise<boolean>;
124
- /**
125
- * The tenant `credentials` policy, checked on every use so a tightened policy
126
- * reaches existing keys: a service key's own tenant, a user key's the
127
- * `tenant` the resolver is called with. A throw denies.
128
- */
129
- readonly settings?: SettingsSource;
130
- /** Receives a `credential` event with operation `used` for sampled uses. */
131
- readonly sink?: DecisionSink;
132
- /** Fraction of uses reported to `sink`, in `(0, 1]`; defaults to 1. */
133
- readonly sample?: number;
134
- /** The `source` of `used` events; defaults to `permdock`. */
135
- readonly source?: string;
136
- readonly onAuth?: (event: AuthEvent) => void;
137
- readonly requestId?: string;
138
- /** Accept only these credential kinds. A key of another kind is anonymous. */
139
- readonly kinds?: readonly CredentialKind[];
140
- };
141
- /**
142
- * Resolves an opaque API key (`pdk_<id>_<secret>`) into the subject its
143
- * credential acts as. Every failure (a malformed or unknown key, a record that
144
- * is not a valid credential, expiry, a tenant policy the key breaks, a revoked
145
- * id, a missing owner, a throwing verifier, source or callback) is the
146
- * anonymous subject, never a throw.
147
- */
148
- declare function subjectFromApiKey(key: string | undefined | null, options: ApiKeySubjectOptions): Promise<Subject<ApiKeyPrincipal>>;
149
- //#endregion
150
- //#region src/server/support-session.d.ts
151
- /** `on('auth')` causes: a verification failure, or one of the session checks. */
152
- type SupportSessionFailureCause = TokenFailureCause | "invalid-claims" | "session-ended" | "principal-unavailable" | "actor-unavailable";
153
- /** The live state of each support session, so one can end before it expires. */
154
- type SupportSessionSource = {
155
- /** The session as of now, or `null` for an unknown one. A throw ends it. */
156
- session: (id: string) => {
157
- readonly id: string;
158
- readonly ended?: boolean;
159
- } | null | Promise<{
160
- readonly id: string;
161
- readonly ended?: boolean;
162
- } | null>;
163
- };
164
- type SupportSessionSubjectOptions = {
165
- readonly verifier: TokenVerifier;
166
- /** Loads the viewed principal and the support actor, live, on every request. */
167
- readonly principals: PrincipalSource;
168
- /** The permission tree the session's keys name. */
169
- readonly permissions: PermissionTree;
170
- /** Checked on every request when set; an unknown or ended session denies. */
171
- readonly sessions?: SupportSessionSource;
172
- readonly audience?: string | readonly string[];
173
- readonly issuer?: string;
174
- readonly clockTolerance?: number;
175
- readonly onAuth?: (event: AuthEvent) => void;
176
- readonly requestId?: string;
177
- };
178
- /** `subject.context.supportSession` of a subject resolved from a session token. */
179
- type SupportSessionContext = {
180
- readonly id: string;
181
- readonly reason: string;
182
- readonly approvedBy?: string;
183
- readonly reference?: string;
184
- };
185
- /**
186
- * Signs a granted `SupportSession` as a `vnd.permdock.support-session+jwt`
187
- * (`sub` the viewed principal, `act` the support actor, `jti` the session id)
188
- * that expires with the session. Throws a `TypeError` for a record
189
- * `parseSupportSession` refuses.
190
- */
191
- declare function signSupportSession(session: SupportSession, signer: TokenSigner, options?: {
192
- readonly audience?: string | readonly string[];
193
- }): Promise<string>;
194
- /**
195
- * Resolves a `vnd.permdock.support-session+jwt` into the subject each request
196
- * of the session acts as: the viewed principal loaded live, a `support` actor,
197
- * the session's permissions as the delegation and `context.supportSession`. The
198
- * actor must still exist. Every failure is the anonymous subject, never a
199
- * throw.
200
- */
201
- declare function subjectFromSupportSession(token: string | undefined | null, options: SupportSessionSubjectOptions): Promise<Subject>;
202
- //#endregion
203
- //#region src/server/problem.d.ts
204
- declare function wwwAuthenticate(decision: Decision, permission: Permission | undefined, credentials?: boolean): string | undefined;
205
- declare function problemResponse(details: ProblemDetails, permission?: Permission, decision?: Decision, extra?: Readonly<Record<string, string>>, credentials?: boolean): Response;
206
- declare function validationProblem(detail: string): Response;
207
- type DecisionProblemOptions = {
208
- readonly instance?: string;
209
- readonly approval?: ApprovalHint;
210
- /** `'hide'` on a loaded row: a denial answers as `404` `/not-found`. */
211
- readonly disclosure?: Disclosure;
212
- /** Whether the request carried credentials, which picks the `401` challenge. */
213
- readonly credentials?: boolean;
214
- /**
215
- * The scope an `insufficient_scope` challenge names; the permission's own
216
- * scope when absent.
217
- */
218
- readonly scope?: string;
219
- };
220
- declare function problemFromDecision(decision: Decision, permission: Permission, _subject: Subject | undefined, options?: DecisionProblemOptions): Response;
221
- //#endregion
222
- export { subjectFromApiKey as C, createPermDock as E, parseFeedKey as S, problemFromError as T, generateApiKey as _, SupportSessionContext as a, memoryCredentialStore as b, SupportSessionSubjectOptions as c, ApiKeyFailureCause as d, ApiKeyParts as f, apiKeyVerifier as g, StoredCredential as h, wwwAuthenticate as i, signSupportSession as l, MemoryCredentialStore as m, problemResponse as n, SupportSessionFailureCause as o, ApiKeySubjectOptions as p, validationProblem as r, SupportSessionSource as s, problemFromDecision as t, subjectFromSupportSession as u, generateFeedKey as v, ProblemFromErrorOptions as w, parseApiKey as x, hashApiKey as y };
@@ -1 +0,0 @@
1
- export { a as loadModule, s as pickNamed } from "./load-BaEamml-.js";
@@ -1 +0,0 @@
1
- export { n as runPowerSync } from "./powersync-DiqY3VBG.js";
@@ -1 +0,0 @@
1
- export { n as runCloudPull } from "./pull-B4EhSqOG.js";
@@ -1 +0,0 @@
1
- export { t as run } from "./run-CMJX9x7b.js";
@@ -1 +0,0 @@
1
- export { i as runSupabase } from "./supabase-hook-BUcu3vPM.js";
@@ -1 +0,0 @@
1
- export { t as runUsage } from "./usage-DPbdI3Vi.js";
@@ -1,57 +0,0 @@
1
- import { St as VersionQuery, qt as Instant } from "./policy-types-BI9C5Sp5.js";
2
- //#region src/core/version-cache.d.ts
3
- type VersionCacheStats = {
4
- /** Version reads the cache started. */
5
- readonly reads: number;
6
- /** Calls answered by a read already in flight. */
7
- readonly shared: number;
8
- /** Calls answered from an entry or a token claim, with no read. */
9
- readonly hits: number;
10
- readonly evictions: number;
11
- readonly size: number;
12
- };
13
- /**
14
- * Current authorization versions shared by every instance in a process:
15
- * `claimsFirst(source, { versions })` reads through it.
16
- */
17
- type VersionCache = {
18
- readonly name?: string;
19
- /** How old an entry may be when an instance with intent `read` uses it. */
20
- readonly maxStaleMs: number;
21
- /**
22
- * The current version of `principal`. With `live: false`, an entry at most
23
- * `maxStaleMs` old answers and a read in flight is shared; with `live: true`,
24
- * `read` runs.
25
- */
26
- current: (principal: VersionQuery, read: () => number | undefined | Promise<number | undefined>, options: {
27
- readonly live: boolean;
28
- }) => number | undefined | Promise<number | undefined>;
29
- /**
30
- * Stores a version read at `at` (default now): `bsb.bootstrap()`'s
31
- * `authz_ver`, or a token claim dated by its `iat`. A seed never lowers a
32
- * cached version, and one dated in the future is ignored.
33
- */
34
- seed: (principal: string, version: number, at?: Instant) => void;
35
- /** Drops `principal`'s entry, so the next instance reads the version. */
36
- evict: (principal: string) => void;
37
- stats: () => VersionCacheStats;
38
- };
39
- type MemoryVersionCacheOptions = {
40
- /**
41
- * How stale a read may be, in milliseconds: the entry lifetime and the
42
- * longest a removed member keeps read access. Clamped to 0 to 60,000.
43
- */
44
- readonly maxStaleMs: number;
45
- /** Principals kept; the least recently used goes first. Default 10,000. */
46
- readonly maxEntries?: number;
47
- /** The clock, read only when an instance asks for a version. */
48
- readonly now?: () => Instant;
49
- };
50
- /**
51
- * An in-process `VersionCache`: a bounded LRU keyed by principal id that keeps
52
- * resolved versions and shares reads in flight. Create it once at module
53
- * scope.
54
- */
55
- declare function memoryVersionCache(options: MemoryVersionCacheOptions): VersionCache;
56
- //#endregion
57
- export { memoryVersionCache as i, VersionCache as n, VersionCacheStats as r, MemoryVersionCacheOptions as t };
@@ -1,70 +0,0 @@
1
- import { F as WithX, N as AppDataSchema, n as ActionMeta } from "./permission-types-CAY-GU7e.js";
2
- //#region src/core/vocabulary.d.ts
3
- declare const ROLE_KIND: "role";
4
- declare const PLAN_KIND: "plan";
5
- /** `defineRoles` and `definePlans` options. */
6
- type VocabularyOptions<X = never> = {
7
- /**
8
- * A Standard Schema for every leaf's `meta.x`, validated synchronously at
9
- * definition time. On a role tree it also checks the `meta.x` of custom roles
10
- * a `CustomRoleSource` returns; an invalid one is dropped, not the role.
11
- */
12
- readonly x?: AppDataSchema<X>;
13
- };
14
- /**
15
- * A role's metadata. `audience` names the surface its holders use (`'staff'`,
16
- * `'portal'`, `'platform'`); `permdock.audiences()` lists the distinct
17
- * audiences of the roles held in the active scope.
18
- */
19
- type RoleMeta = ActionMeta & {
20
- readonly audience?: string;
21
- };
22
- type Role<K extends string = string> = {
23
- readonly key: K;
24
- /** A declared scope name, or the `tenant` / `team` alias. */
25
- readonly on?: string;
26
- readonly assignable: boolean;
27
- readonly meta: RoleMeta;
28
- /**
29
- * A shared custom role: the platform defines it for every tenant, and a
30
- * tenant admin cannot edit it.
31
- */
32
- readonly shared?: true;
33
- readonly kind: typeof ROLE_KIND;
34
- };
35
- type Plan<K extends string = string> = {
36
- readonly key: K;
37
- readonly meta: ActionMeta;
38
- readonly kind: typeof PLAN_KIND;
39
- };
40
- type RoleInit = {
41
- /** A declared scope name, or the `tenant` / `team` alias. */
42
- readonly on?: string;
43
- readonly assignable?: boolean;
44
- readonly meta?: RoleMeta;
45
- };
46
- type PlanInit = {
47
- readonly meta?: ActionMeta;
48
- };
49
- type RoleTree = {
50
- readonly [key: string]: Role;
51
- };
52
- type PlanTree = {
53
- readonly [key: string]: Plan;
54
- };
55
- type Vocabulary = {
56
- readonly permissions?: unknown;
57
- readonly roles?: RoleTree;
58
- readonly plans?: PlanTree;
59
- };
60
- type InferRoleTree<Input, X = never> = { readonly [K in keyof Input & string]: WithX<Role<K>, X>; };
61
- type InferPlanTree<Input, X = never> = { readonly [K in keyof Input & string]: WithX<Plan<K>, X>; };
62
- declare function isRole(value: unknown): value is Role;
63
- declare function isPlan(value: unknown): value is Plan;
64
- declare function defineRoles<const Input extends Record<string, RoleInit>, X = never>(input: Input, options?: VocabularyOptions<X>): InferRoleTree<Input, X>;
65
- declare function definePlans<const Input extends Record<string, PlanInit>, X = never>(input: Input, options?: VocabularyOptions<X>): InferPlanTree<Input, X>;
66
- declare function listRoles(tree: RoleTree | undefined): readonly Role[];
67
- declare function listPlans(tree: PlanTree | undefined): readonly Plan[];
68
- declare function findRole(tree: RoleTree | undefined, key: string): Role | undefined;
69
- //#endregion
70
- export { RoleTree as a, definePlans as c, isPlan as d, isRole as f, RoleMeta as i, defineRoles as l, listRoles as m, PlanTree as n, Vocabulary as o, listPlans as p, Role as r, VocabularyOptions as s, Plan as t, findRole as u };
@@ -1 +0,0 @@
1
- export { i as watchCollect } from "./watch-Dz2LNM1R.js";