permdock 0.38.1 → 0.39.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 (236) hide show
  1. package/dist/a2a/index.js +2 -2
  2. package/dist/{adoption-scan-CkkOzkXs.js → adoption-scan-Cg4pyRhm.js} +1 -1
  3. package/dist/agent/index.js +1 -1
  4. package/dist/ai-sdk/index.js +3 -3
  5. package/dist/{annotate-dUrBHXWa.js → annotate-DcSH62rl.js} +2 -2
  6. package/dist/{annotate-doc-BA0betEO.js → annotate-doc-CLU0DxK7.js} +1 -1
  7. package/dist/app/index.js +1 -1
  8. package/dist/{approval-chain-BEeExHpb.js → approval-chain-e4HcSs3o.js} +2 -2
  9. package/dist/{arazzo-BKYLAE5e.js → arazzo-BcSSf6Du.js} +1 -1
  10. package/dist/{arazzo-n8as0lFp.js → arazzo-C1JA-k9F.js} +3 -3
  11. package/dist/{ast-CAOxvn9t.js → ast-BhvgF264.js} +1 -1
  12. package/dist/astro/index.js +1 -1
  13. package/dist/authzen/index.js +1 -1
  14. package/dist/better-supabase/index.js +6 -6
  15. package/dist/{bind-BNYcJ1D9.js → bind-CFwfgfp2.js} +2 -2
  16. package/dist/{bsb-access-tags-DaGRSYnv.js → bsb-access-tags-DUdAk1Jc.js} +3 -3
  17. package/dist/{bsb-action-keys-LgveZiHJ.js → bsb-action-keys-CQdOwvrl.js} +4 -4
  18. package/dist/{budgets-DFnMBpKz.js → budgets-6cfA6Ibw.js} +3 -3
  19. package/dist/{build-instance-BGpABVbM.js → build-instance-BX5yWZDz.js} +1 -1
  20. package/dist/{bundle-size-Pgm7BB5m.js → bundle-size-CeLuyWm0.js} +2 -2
  21. package/dist/bundle-size-DRu3x2lW.js +1 -0
  22. package/dist/{casbin-BmYeMFeI.js → casbin-BthXLWZo.js} +1 -1
  23. package/dist/{casbin-BlQqoRlv.js → casbin-DilG0fwi.js} +1 -1
  24. package/dist/catalog/index.js +2 -2
  25. package/dist/{catalog-DYC6wfAj.js → catalog-Beg7WzxZ.js} +1 -1
  26. package/dist/{catalog-SnaPhbZ1.js → catalog-DlVcHvH5.js} +3 -3
  27. package/dist/catalog-WP3LwPu_.js +1 -0
  28. package/dist/{catalog-operations-BqSsByIE.js → catalog-operations-DsbLxw1f.js} +1 -1
  29. package/dist/chat/index.js +1 -1
  30. package/dist/claims-size-C0kHWqou.js +1 -0
  31. package/dist/{claims-size-ZiUJBn0r.js → claims-size-Dxm9zWw5.js} +2 -2
  32. package/dist/claude-agent/index.js +2 -2
  33. package/dist/cli/bin.js +1 -1
  34. package/dist/cli/generate/watch-worker.js +2 -2
  35. package/dist/cli/index.js +3 -3
  36. package/dist/cli/plugins/app.js +1 -1
  37. package/dist/cli/plugins/openapi.js +2 -2
  38. package/dist/cli/plugins/powersync.js +1 -1
  39. package/dist/cli/plugins/rls.js +1 -1
  40. package/dist/cli/plugins/schemas.js +1 -1
  41. package/dist/cli/plugins/supabase-hook.js +1 -1
  42. package/dist/cli/plugins/supabase.js +2 -2
  43. package/dist/cli/plugins/ui.js +1 -1
  44. package/dist/{cloud-DxDQff7G.js → cloud-0zu4L55w.js} +2 -2
  45. package/dist/{codemod-DjcAtHr9.js → codemod-CtF7Vk_T.js} +6 -6
  46. package/dist/{codemod-CX9EGBJw.js → codemod-DaU2mOwl.js} +5 -5
  47. package/dist/collect-BchFfzIJ.js +1 -0
  48. package/dist/{collect-Co-w8Eg2.js → collect-BqaPdsk1.js} +4 -4
  49. package/dist/{collect-CcE8QBtZ.js → collect-CcQDJuYi.js} +2 -2
  50. package/dist/{compile-BWOrvhGt.js → compile-CeaX5VD-.js} +8 -8
  51. package/dist/{completion-9B7fZWsn.js → completion-Cyp3kn5b.js} +1 -1
  52. package/dist/{config-Dan6vcvj.js → config-C1lTq4gJ.js} +3 -3
  53. package/dist/{config-BgBDv1UW.js → config-CNloPiIn.js} +1 -1
  54. package/dist/{config-paths-CQvGng3k.js → config-paths-Cg3IXh9T.js} +3 -3
  55. package/dist/{config-report-oYAr9Opz.js → config-report-i9ujoKAl.js} +4 -4
  56. package/dist/{context-DntIOpzS.js → context-BKZmdYRf.js} +1 -1
  57. package/dist/{context-Nr3nknZX.js → context-CzHYMZr9.js} +1 -1
  58. package/dist/convex/index.js +2 -2
  59. package/dist/{core-BFR-V5CL.js → core-BEA7805j.js} +3 -3
  60. package/dist/{create-Dapy8DIK.js → create-DRiggRWE.js} +3 -3
  61. package/dist/{create-BICq9l-p.js → create-fNkkpOy5.js} +2 -2
  62. package/dist/{custom-role-rebuild-BwM6hBqt.js → custom-role-rebuild-DzbBD1cq.js} +5 -5
  63. package/dist/{define-permdock-B0q7Rg9b.js → define-permdock-CGI9pgqL.js} +2 -2
  64. package/dist/{diff-BebUlh4Z.js → diff-Bv-oDvZq.js} +1 -1
  65. package/dist/{diff-Sxca4_5q.js → diff-YsQOcb9N.js} +4 -4
  66. package/dist/{doctor-Dqh8AzIx.js → doctor-BuPSrNmh.js} +60 -47
  67. package/dist/{doctor-CDSxgnut.js → doctor-Mgbj6UO0.js} +2 -2
  68. package/dist/{edits-CqU8s2GC.js → edits-Ckbit4uD.js} +1 -1
  69. package/dist/elysia/index.js +1 -1
  70. package/dist/evaluator-C4RrXo4y.js +2 -0
  71. package/dist/{evaluator-eager-BLNVbEAC.js → evaluator-eager-B_4KdPgg.js} +1 -1
  72. package/dist/eve/index.d.ts +50 -1
  73. package/dist/eve/index.js +39 -3
  74. package/dist/{execute-CUGaCy_9.js → execute-D6FFwdwW.js} +5 -5
  75. package/dist/{explain-CgKGadRa.js → explain-CPYRj0qn.js} +3 -3
  76. package/dist/{explain-BrvY9cXX.js → explain-CvCujO8Q.js} +2 -2
  77. package/dist/express/index.js +1 -1
  78. package/dist/fastify/index.js +1 -1
  79. package/dist/{fetch-adapter-dmABnF7F.js → fetch-adapter-niRAPzNm.js} +1 -1
  80. package/dist/{fields-CKX-qjWb.js → fields-DWAwA8vX.js} +3 -3
  81. package/dist/{fixtures-3aUUP6Nx.js → fixtures-B29C2DGA.js} +1 -1
  82. package/dist/{from-snapshot-DZ4D2sLa.js → from-snapshot-O341Vdgj.js} +12 -4
  83. package/dist/{gen-D85_gUOz.js → gen-CZB21YVB.js} +6 -6
  84. package/dist/{gen-kind-Bi0dtNoV.js → gen-kind-2KPUHSs6.js} +1 -1
  85. package/dist/gen-tTRu05jZ.js +1 -0
  86. package/dist/{generate-C8kAhef2.js → generate-DFffYRB7.js} +3 -3
  87. package/dist/{generate-BnOSZLka.js → generate-DePdrbn_.js} +19 -19
  88. package/dist/{generate-options-eMjRViev.js → generate-options-Bq5qQ9H7.js} +13 -13
  89. package/dist/h3/index.js +2 -2
  90. package/dist/{helper-calls-DN1PJcNY.js → helper-calls-jStpeQ2_.js} +1 -1
  91. package/dist/hono/index.js +1 -1
  92. package/dist/{hook-sql-BQcxbOzi.js → hook-sql-Dys1kW5p.js} +13 -13
  93. package/dist/{import-BLN-HGJG.js → import-BIJM6oAh.js} +1 -1
  94. package/dist/{import-wBO24zgo.js → import-bTvN77Uj.js} +3 -3
  95. package/dist/{index-B1hyWi7O.d.ts → index-Cnrz9ChE.d.ts} +3 -2
  96. package/dist/index.d.ts +1 -1
  97. package/dist/index.js +4 -4
  98. package/dist/{init-B8bPTGMb.js → init-CfDdG_Fj.js} +3 -3
  99. package/dist/{init-BQnRbzUb.js → init-yo4GJOkM.js} +1 -1
  100. package/dist/{inspect-functions-GXdyPFwI.js → inspect-functions-Cj7kZDJt.js} +1 -1
  101. package/dist/{instance-snapshot-D03srwnf.js → instance-snapshot-BJam8gUa.js} +10 -3
  102. package/dist/{interactive-only-C9NQJXpi.js → interactive-only-ek-Kf0Kq.js} +5 -5
  103. package/dist/{kernel-yI0nUyuX.js → kernel-UOKCD3tV.js} +3 -3
  104. package/dist/{keys-QhAlAjXf.js → keys-CBblXqiu.js} +1 -1
  105. package/dist/{lazy-provider-b8UHGi8P.js → lazy-provider-BPSgEG-A.js} +1 -1
  106. package/dist/{load-m7jmit3y.js → load-D03A3tZL.js} +1 -1
  107. package/dist/load-r-TDUcRq.js +1 -0
  108. package/dist/{login-kQOIJoFN.js → login-2hkrhPGs.js} +3 -3
  109. package/dist/{login-DnVKv2ib.js → login-CsTj_pBQ.js} +1 -1
  110. package/dist/{manager-chain-CFkceFls.js → manager-chain-BbrD-s7u.js} +2 -2
  111. package/dist/{manifest-CMh8sAAH.js → manifest-CZvwWacN.js} +42 -42
  112. package/dist/mcp/index.js +2 -2
  113. package/dist/{measure-DJl28Whs.js → measure-BhjWMmvj.js} +5 -5
  114. package/dist/{memberships-DiCbNRny.js → memberships-DEW0FU2p.js} +1 -1
  115. package/dist/{memberships-CDiSsFTu.js → memberships-DaKwjhc5.js} +3 -3
  116. package/dist/{migrate-BXk_rUmb.js → migrate-BBPxqBMF.js} +2 -2
  117. package/dist/{model-DQQYg8UW.js → model-BfhDMEDf.js} +2 -2
  118. package/dist/{module-values-D-AiNhBp.js → module-values-BvR7QHTM.js} +2 -2
  119. package/dist/{names-DwGleRKB.js → names-zCkaCepO.js} +3 -3
  120. package/dist/nest/index.js +1 -1
  121. package/dist/next/index.js +3 -3
  122. package/dist/next/plugin.js +1 -1
  123. package/dist/node/index.js +1 -1
  124. package/dist/openai/index.js +3 -3
  125. package/dist/{openapi-CuyzmD9h.js → openapi-1ZydKQE3.js} +4 -4
  126. package/dist/{openapi-D7kRYqWu.js → openapi-CufQiEo8.js} +2 -2
  127. package/dist/{openapi-document-ClyLB0-z.js → openapi-document-oqfHlSZt.js} +1 -1
  128. package/dist/{optional-CaQWp9HA.js → optional-Dw7to-jw.js} +11 -1
  129. package/dist/orpc/index.js +2 -2
  130. package/dist/{output-ONUzppLo.js → output-yUW7fcAk.js} +1 -1
  131. package/dist/{ownership-CCgncSLb.js → ownership-Bx_s_E8i.js} +7 -7
  132. package/dist/pdp/index.js +1 -1
  133. package/dist/{permdock-CbavFN6u.js → permdock-B0aE5Ime.js} +1 -1
  134. package/dist/{permissions-BPYOb5OB.js → permissions-CF8Ed44S.js} +1 -1
  135. package/dist/{pipeline-DGFc6y6x.js → pipeline-BTsmCn1p.js} +2 -2
  136. package/dist/{policy-AWd-ccJJ.js → policy-CXAhfYIt.js} +2 -2
  137. package/dist/{policy-bundle-rC5_X9hX.js → policy-bundle-BZyCcphj.js} +3 -3
  138. package/dist/{policy-from-catalog-BohzTN3J.js → policy-from-catalog-hECiBs9M.js} +1 -1
  139. package/dist/{powersync-DW7seEgS.js → powersync-C6F2F_VP.js} +1 -1
  140. package/dist/{powersync-C84aHECl.js → powersync-CcXYDuyo.js} +1 -1
  141. package/dist/{powersync-C1OW6iVd.js → powersync-DVUeHJpL.js} +13 -13
  142. package/dist/{program-CvarkLMS.js → program-C2fbc9NO.js} +2 -2
  143. package/dist/{provider-NQwLSlgb.js → provider-BT8hVigf.js} +1 -1
  144. package/dist/{provider-hQFC3b98.js → provider-DRsBw6My.js} +1 -1
  145. package/dist/{provider-store-BizF6jyu.js → provider-store-fzaF1R6q.js} +1 -1
  146. package/dist/{prune-config-DeTUhG2J.js → prune-config-CPvDryuI.js} +10 -10
  147. package/dist/{pull-C851tQak.js → pull-CEv7O_zQ.js} +1 -1
  148. package/dist/pull-DeXUmRKY.js +1 -0
  149. package/dist/{push-Br0Uz5pT.js → push-Dq9qatTg.js} +3 -3
  150. package/dist/{pushed-policy-dm_hFstN.js → pushed-policy-DXA5KLo6.js} +1 -1
  151. package/dist/{quote-LNaBdCGA.js → quote-BX3DDoTX.js} +1 -1
  152. package/dist/{rbac-ByuGspKZ.js → rbac-COexzCC9.js} +5 -5
  153. package/dist/react/index.js +1 -1
  154. package/dist/react/lazy.js +1 -1
  155. package/dist/react/provider-client-lazy.js +1 -1
  156. package/dist/react/provider-client.js +1 -1
  157. package/dist/react-native/index.js +1 -1
  158. package/dist/{rename-BgfR3xB9.js → rename-CoG144pW.js} +9 -9
  159. package/dist/{report-x9GeUvjx.js → report-B7UuE4dW.js} +1 -1
  160. package/dist/{report-Dp-ApWVC.js → report-CMncWbQ-.js} +1 -1
  161. package/dist/{request-context-C9FFFpuH.js → request-context-Bi0Crsd5.js} +1 -1
  162. package/dist/{resolve-config-Cu_mE2wt.js → resolve-config-LiLfxe8X.js} +1 -1
  163. package/dist/{resolve-names-DmX503uX.js → resolve-names-ybewcnpW.js} +7 -7
  164. package/dist/{resolver-C9-dU-SZ.js → resolver-CkK3cvQc.js} +4 -4
  165. package/dist/{rls-DTN_-HX2.js → rls-C-UfcYPG.js} +5 -5
  166. package/dist/{rls-JSxuWcf-.js → rls-CTWb0XEV.js} +13 -13
  167. package/dist/{rls-files-BsJsEeJ_.js → rls-files-DFUG6y5D.js} +1 -1
  168. package/dist/{roles-BeNEhv7Q.js → roles-MVZd_RrF.js} +1 -1
  169. package/dist/{rpc-RDBrKR7N.js → rpc-C-kZGWs6.js} +1 -1
  170. package/dist/{run-BgNlYtQJ.js → run-B9MRT-5k.js} +3 -3
  171. package/dist/run-me1Fi6eQ.js +1 -0
  172. package/dist/{saas-CHviJgF2.js → saas-DDz3ivSL.js} +2 -2
  173. package/dist/{scan-pHPntFbs.js → scan-BoHmvDOe.js} +1 -1
  174. package/dist/{schema-DJd7Gq_p.js → schema-Bk0R_6ul.js} +1 -1
  175. package/dist/{schema-tables-Ba9LE_XB.js → schema-tables-CqEHokUT.js} +2 -2
  176. package/dist/server/index.js +1 -1
  177. package/dist/{shared-DnVY767H.js → shared-BRLAQqj4.js} +1 -1
  178. package/dist/{size-Dm3777Ev.js → size-CQkUXcPF.js} +4 -4
  179. package/dist/{skills-txCdqGns.js → skills-BIGdhR5i.js} +1 -1
  180. package/dist/{skills-D4ItrS0F.js → skills-DiMXWCQY.js} +1 -1
  181. package/dist/{snapshot-size-CpdksnSr.js → snapshot-size-1zICkeFb.js} +1 -1
  182. package/dist/{snapshot-size-I_-fxGry.js → snapshot-size-CFwBMDNC.js} +1 -1
  183. package/dist/solid/index.js +1 -1
  184. package/dist/solid-start/index.js +2 -2
  185. package/dist/{sources-C6Id63F8.js → sources-DNVEyJxb.js} +10 -2
  186. package/dist/{src-10d_jun2.js → src-DUWw9z1D.js} +2 -2
  187. package/dist/{stores-jgDndNHa.js → stores-qYmLHVKv.js} +1 -1
  188. package/dist/{subject-B7p94Y0s.js → subject-CMkc28eP.js} +1 -1
  189. package/dist/supabase/index.js +3 -3
  190. package/dist/supabase/middleware.js +3 -3
  191. package/dist/{supabase-D-kxyoaX.js → supabase-BBEop7q7.js} +2 -2
  192. package/dist/{supabase-hook-DDxDjlOU.js → supabase-hook-C3q-XEnu.js} +8 -8
  193. package/dist/supabase-hook-DLnH3_5Z.js +2 -0
  194. package/dist/{supabase-schemas-D6ezN5Ln.js → supabase-schemas-RPYfnE6O.js} +2 -2
  195. package/dist/{supabase-CeJAHqZp.js → supabase-zRUmN_PE.js} +3 -3
  196. package/dist/svelte/index.js +2 -2
  197. package/dist/svelte/runtime.js +1 -1
  198. package/dist/svelte/source.js +1 -1
  199. package/dist/sveltekit/index.js +1 -1
  200. package/dist/{table-reads-DHB56kFZ.js → table-reads-CegjCVHG.js} +1 -1
  201. package/dist/{table-reads-Doh_Egx2.js → table-reads-DpncF1F-.js} +3 -3
  202. package/dist/{tables-E-dIHUN_.js → tables-Dr4BUH9i.js} +12 -8
  203. package/dist/tanstack-start/index.js +1 -1
  204. package/dist/{tenant-check-DGfE7Sns.js → tenant-check-C5DAstGo.js} +3 -3
  205. package/dist/terminal/index.js +2 -2
  206. package/dist/testing/core.js +1 -1
  207. package/dist/testing/index.d.ts +1 -1
  208. package/dist/testing/index.js +7 -7
  209. package/dist/testing/saas/index.js +2 -2
  210. package/dist/testing/saas/permissions.js +1 -1
  211. package/dist/trpc/index.js +2 -2
  212. package/dist/unplugin/index.js +1 -1
  213. package/dist/{usage-DymSoYQZ.js → usage-D5Rin-a_.js} +1 -1
  214. package/dist/usage-D7eCW8yi.js +1 -0
  215. package/dist/{usage-CX_wmL5W.js → usage-DDr-iwHr.js} +6 -6
  216. package/dist/{verify-CHlmYg2d.js → verify-Df9u1-v5.js} +13 -13
  217. package/dist/vue/index.js +1 -1
  218. package/dist/{warm-BOrs0-_j.js → warm-C6Hn4J-4.js} +1 -1
  219. package/dist/{watch-BFDMb5N4.js → watch-BuQhtt25.js} +2 -2
  220. package/dist/{watch-CkL1iuKJ.js → watch-DEPXy-r0.js} +2 -2
  221. package/dist/watch-wQLoPqC-.js +1 -0
  222. package/dist/workflow/index.js +1 -1
  223. package/package.json +3 -3
  224. package/skills/permdock-agents/references/runtimes.md +1 -1
  225. package/dist/bundle-size-CGd8wVIu.js +0 -1
  226. package/dist/catalog-e6QRd1JP.js +0 -1
  227. package/dist/claims-size-B0OvYh9z.js +0 -1
  228. package/dist/collect-C2_CKZ09.js +0 -1
  229. package/dist/evaluator-zpeC7zel.js +0 -2
  230. package/dist/gen-CNYlckFE.js +0 -1
  231. package/dist/load-BCABUQZi.js +0 -1
  232. package/dist/pull-CylkuBGR.js +0 -1
  233. package/dist/run-C7nX-hkR.js +0 -1
  234. package/dist/supabase-hook-BTiZ8LTJ.js +0 -2
  235. package/dist/usage-DcVP-SFj.js +0 -1
  236. package/dist/watch-5WP3ZCcR.js +0 -1
@@ -1,4 +1,4 @@
1
- import { a as heldLevels } from "./instance-snapshot-D03srwnf.js";
1
+ import { a as heldLevels } from "./instance-snapshot-BJam8gUa.js";
2
2
  import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
3
3
  import { a as sole } from "./compact-C4LFuqbW.js";
4
4
  import { S as leveled } from "./evaluate-DNz6wMYv.js";
@@ -11,14 +11,14 @@ import { l as isConditionRef, o as hasConditionOp } from "./refs-Cix9Zjis.js";
11
11
  import { t as requiresApproval } from "./approval-required-B-R4Yw3J.js";
12
12
  import { c as jsonSchemaOf } from "./catalog-doc-BX97oFAn.js";
13
13
  import { i as configError } from "./errors-DgLOqc6j.js";
14
- import { A as tokenScopeAllowsCall, L as capabilityAccessSql, S as accessSql, f as requiresSql, z as apiKeyAllowsCall } from "./tables-E-dIHUN_.js";
14
+ import { A as tokenScopeAllowsCall, L as capabilityAccessSql, S as accessSql, f as requiresSql, z as apiKeyAllowsCall } from "./tables-Dr4BUH9i.js";
15
15
  import { t as connectPgPool } from "./pg-DmS5ITHu.js";
16
- import { S as scopeTable } from "./names-DwGleRKB.js";
17
- import { a as quoteIdent, c as quoteTable, o as quoteLiteral } from "./quote-LNaBdCGA.js";
18
- import { r as interactiveAllowsCall } from "./interactive-only-C9NQJXpi.js";
19
- import { _ as validitySql, h as andSql, v as wrapSql } from "./fields-CKX-qjWb.js";
20
- import { _ as arrayColumnsOf, d as subjectClaimSql, u as subjectClaimJsonSql, v as columnTypesOf } from "./subject-B7p94Y0s.js";
21
- import { c as breakGlassKey, f as compileConditionSql, l as collectGrants, m as sqlFunctionNames, p as contextRefs, s as breakGlassHolder } from "./rbac-ByuGspKZ.js";
16
+ import { S as scopeTable } from "./names-zCkaCepO.js";
17
+ import { a as quoteIdent, c as quoteTable, o as quoteLiteral } from "./quote-BX3DDoTX.js";
18
+ import { r as interactiveAllowsCall } from "./interactive-only-ek-Kf0Kq.js";
19
+ import { _ as validitySql, h as andSql, v as wrapSql } from "./fields-DWAwA8vX.js";
20
+ import { _ as arrayColumnsOf, d as subjectClaimSql, u as subjectClaimJsonSql, v as columnTypesOf } from "./subject-CMkc28eP.js";
21
+ import { c as breakGlassKey, f as compileConditionSql, l as collectGrants, m as sqlFunctionNames, p as contextRefs, s as breakGlassHolder } from "./rbac-COexzCC9.js";
22
22
  import { createHash } from "node:crypto";
23
23
  // src/cli/rls/indexes.ts
24
24
  /** Postgres truncates identifiers longer than this, in bytes. */
@@ -1,6 +1,6 @@
1
1
  import { a as suggestion, o as GLOBAL_FLAGS } from "./args-BSpXxMnb.js";
2
2
  import { t as defineLeaf } from "./command-9GAzSI7E.js";
3
- import { a as resolve } from "./manifest-CMh8sAAH.js";
3
+ import { a as resolve } from "./manifest-CZvwWacN.js";
4
4
  import { n as CliError } from "./errors-DgLOqc6j.js";
5
5
  // src/cli/core/completion.ts
6
6
  const SHELLS = [
@@ -222,7 +222,7 @@ async function loadBetterSupabaseConfig(input) {
222
222
  const path = betterSupabaseConfigPath(input);
223
223
  if (path === void 0) return {};
224
224
  try {
225
- const { loadModule } = await import("./load-BCABUQZi.js");
225
+ const { loadModule } = await import("./load-r-TDUcRq.js");
226
226
  const loaded = (await loadModule(path))["default"];
227
227
  return isRecord(loaded) ? { config: loaded } : {};
228
228
  } catch (error) {
@@ -462,7 +462,7 @@ async function readConfig(cwd, fromFlag, options) {
462
462
  }
463
463
  /** The config file at `path` as written, before any default is applied. */
464
464
  async function readParsedConfig(cwd, path, options) {
465
- const { loadModule, pickNamed } = await import("./load-BCABUQZi.js");
465
+ const { loadModule, pickNamed } = await import("./load-r-TDUcRq.js");
466
466
  const mod = await loadModule(path, options);
467
467
  const display = relative(cwd, path).replaceAll("\\", "/");
468
468
  const raw = pickNamed(mod, ["default"]);
@@ -503,7 +503,7 @@ function hasModuleValue(raw) {
503
503
  return isRecord(raw) && Object.keys(MODULE_KEYS).some((key) => isRecord(raw[key]));
504
504
  }
505
505
  async function traceValues(cwd, file, display, config, options) {
506
- const { traceModuleValues } = await import("./module-values-D-AiNhBp.js");
506
+ const { traceModuleValues } = await import("./module-values-BvR7QHTM.js");
507
507
  return traceModuleValues({
508
508
  cwd,
509
509
  file,
@@ -10,7 +10,7 @@ const config = defineLeaf({
10
10
  ...failOnFlag
11
11
  },
12
12
  async run(ctx, { flags }) {
13
- const { runConfig } = await import("./config-report-oYAr9Opz.js");
13
+ const { runConfig } = await import("./config-report-i9ujoKAl.js");
14
14
  return runConfig({
15
15
  cwd: ctx.cwd,
16
16
  config: ctx.config,
@@ -1,6 +1,6 @@
1
- import { a as nameOf, o as nodes, r as child, u as walk } from "./ast-CAOxvn9t.js";
2
- import { r as parseSync } from "./optional-CaQWp9HA.js";
3
- import { n as propertyKey } from "./edits-CqU8s2GC.js";
1
+ import { a as nameOf, o as nodes, r as child, u as walk } from "./ast-BhvgF264.js";
2
+ import { r as parseSync } from "./optional-Dw7to-jw.js";
3
+ import { n as propertyKey } from "./edits-Ckbit4uD.js";
4
4
  import { basename } from "node:path";
5
5
  // src/cli/source/config-root.ts
6
6
  const PERMDOCK = /^permdock(?:\/|$)/u;
@@ -1,10 +1,10 @@
1
- import "./sources-C6Id63F8.js";
1
+ import "./sources-DNVEyJxb.js";
2
2
  import { t as catalogPath } from "./catalog-path-bG0XxHMu.js";
3
- import { n as guessPermissions, t as barrelFile } from "./collect-Co-w8Eg2.js";
4
- import { t as DOCS_BASE } from "./manifest-CMh8sAAH.js";
3
+ import { n as guessPermissions, t as barrelFile } from "./collect-BqaPdsk1.js";
4
+ import { t as DOCS_BASE } from "./manifest-CZvwWacN.js";
5
5
  import { r as CONFIG_REPORT_SCHEMA } from "./version-D-jWyJb9.js";
6
6
  import { a as rel, t as defaultSrcPath } from "./files-DAR51W3J.js";
7
- import { n as restatedDefaults, t as resolveConfig } from "./resolve-config-Cu_mE2wt.js";
7
+ import { n as restatedDefaults, t as resolveConfig } from "./resolve-config-LiLfxe8X.js";
8
8
  import { n as MIGRATION_DIRS, t as DEFAULT_SENSITIVE_ACTIONS } from "./constants-PCJiir_3.js";
9
9
  // src/cli/config-report.ts
10
10
  function configReport(input) {
@@ -1,5 +1,5 @@
1
1
  import { n as packageManagerOf } from "./peer-D77JpXe-.js";
2
- import { c as readSupabaseConfig } from "./supabase-schemas-D6ezN5Ln.js";
2
+ import { c as readSupabaseConfig } from "./supabase-schemas-RPYfnE6O.js";
3
3
  import { existsSync, readdirSync } from "node:fs";
4
4
  import { join, relative } from "node:path";
5
5
  // src/cli/generate/context.ts
@@ -1,4 +1,4 @@
1
- import { n as switchTenant, t as providerStore } from "./provider-store-BizF6jyu.js";
1
+ import { n as switchTenant, t as providerStore } from "./provider-store-fzaF1R6q.js";
2
2
  import { l as isPromiseLike } from "./store-options-DgOuhUSn.js";
3
3
  import { t as compact } from "./compact-C4LFuqbW.js";
4
4
  import { getContext, onDestroy, setContext } from "svelte";
@@ -1,7 +1,7 @@
1
1
  import { n as tenantScope, t as actorFrom } from "../adapter-context-lHq_i_77.js";
2
2
  import { n as PermDockValidationError } from "../validation-error-CgDOA6VS.js";
3
- import { u as withApp } from "../permdock-CbavFN6u.js";
4
- import { n as resolveOrNull, t as buildInstance } from "../build-instance-BGpABVbM.js";
3
+ import { u as withApp } from "../permdock-B0aE5Ime.js";
4
+ import { n as resolveOrNull, t as buildInstance } from "../build-instance-BX5yWZDz.js";
5
5
  import { t as compact } from "../compact-C4LFuqbW.js";
6
6
  import { n as PermDockDeniedError, t as PermDockApprovalRequiredError } from "../errors-DOSkVeTC.js";
7
7
  // src/convex/create.ts
@@ -1,10 +1,10 @@
1
- import { t as fromSnapshot } from "./from-snapshot-DZ4D2sLa.js";
1
+ import { t as fromSnapshot } from "./from-snapshot-O341Vdgj.js";
2
2
  import { c as listPermissions } from "./permission-registry-DstT40VS.js";
3
- import { t as getPermDock } from "./permdock-CbavFN6u.js";
3
+ import { t as getPermDock } from "./permdock-B0aE5Ime.js";
4
4
  import { C as membershipsClaim } from "./evaluate-DNz6wMYv.js";
5
5
  import { d as scopeList } from "./scopes-B-KX9EI8.js";
6
6
  import { c as quoteSqlTable, n as defaultSqlCommand, o as quoteSqlIdent, t as SQL_IDENT } from "./sql-T4GaBh9X.js";
7
- import { A as memoryCustomRoleSource } from "./src-10d_jun2.js";
7
+ import { A as memoryCustomRoleSource } from "./src-DUWw9z1D.js";
8
8
  import { n as parseSnapshot } from "./snapshot-Dzi4LR6n.js";
9
9
  import "./budget-BH81q2cj.js";
10
10
  // src/testing/policy-matrix.ts
@@ -1,5 +1,5 @@
1
1
  import { n as tenantScope, t as actorFrom } from "./adapter-context-lHq_i_77.js";
2
- import { n as resolveOrNull } from "./build-instance-BGpABVbM.js";
2
+ import { n as resolveOrNull } from "./build-instance-BX5yWZDz.js";
3
3
  import { c as listPermissions } from "./permission-registry-DstT40VS.js";
4
4
  import { t as compact } from "./compact-C4LFuqbW.js";
5
5
  import { t as LOAD_FAILED } from "./decision-hHv4UZgy.js";
@@ -7,9 +7,9 @@ import { n as freezeDeep } from "./freeze-DGfJq_j2.js";
7
7
  import { n as problemDetails } from "./problem-details-EJHcvYCz.js";
8
8
  import { a as decisionResponse, c as problemFromDecision, d as unauthenticatedProblem, s as notFoundProblem, t as ANONYMOUS } from "./problem-BZB7zPC7.js";
9
9
  import { f as InvalidSignatureError, n as applyApprovalResume, o as evaluationsHandler } from "./evaluations-DPEAu_jM.js";
10
- import { i as challengeScope, u as withApp } from "./permdock-CbavFN6u.js";
10
+ import { i as challengeScope, u as withApp } from "./permdock-B0aE5Ime.js";
11
11
  import { t as deferredSink } from "./deferred-sink-BZahJ8sO.js";
12
- import { n as requestContext, t as buildReportingInstance } from "./request-context-C9FFFpuH.js";
12
+ import { n as requestContext, t as buildReportingInstance } from "./request-context-Bi0Crsd5.js";
13
13
  import { n as decideSet, r as permissionList } from "./decide-set-CgNcE6pP.js";
14
14
  import { n as resourceRef } from "./resource-ref-BiQtFK-I.js";
15
15
  import { r as hasCredentials } from "./http-C9jDw_bZ.js";
@@ -1,10 +1,10 @@
1
- import { u as withApp } from "./permdock-CbavFN6u.js";
1
+ import { u as withApp } from "./permdock-B0aE5Ime.js";
2
2
  import { t as compact } from "./compact-C4LFuqbW.js";
3
3
  import { c as deniedFor } from "./may-use-ikNCnNgZ.js";
4
4
  import { n as freezeDeep } from "./freeze-DGfJq_j2.js";
5
5
  import { t as instanceOptions } from "./instance-options-CLErhA76.js";
6
6
  import { t as composeWraps } from "./wrap-CsfsaJhd.js";
7
- import { n as createAgentKernel } from "./kernel-yI0nUyuX.js";
7
+ import { n as createAgentKernel } from "./kernel-UOKCD3tV.js";
8
8
  // src/agent/create.ts
9
9
  function modelRow(modelId) {
10
10
  return { id: modelId };
@@ -1,12 +1,12 @@
1
1
  import { d as sqlTextArray, i as qualifySqlTable } from "./sql-T4GaBh9X.js";
2
- import { l as roleColumn } from "./sources-C6Id63F8.js";
2
+ import { l as roleColumn } from "./sources-DNVEyJxb.js";
3
3
  import { i as configError } from "./errors-DgLOqc6j.js";
4
4
  import { n as byKey, t as byCodeUnit } from "./compare-8SNJN-9U.js";
5
5
  import { t as beforeFirst } from "./text-D704xHVl.js";
6
- import { C as tenantTypeOf } from "./subject-B7p94Y0s.js";
7
- import { a as quoteIdent, c as quoteTable, i as qualified, o as quoteLiteral, s as quoteQualified } from "./quote-LNaBdCGA.js";
8
- import { t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
9
- import { B as rolesTableScope, P as currentKeyExpr } from "./interactive-only-C9NQJXpi.js";
6
+ import { C as tenantTypeOf } from "./subject-CMkc28eP.js";
7
+ import { a as quoteIdent, c as quoteTable, i as qualified, o as quoteLiteral, s as quoteQualified } from "./quote-BX3DDoTX.js";
8
+ import { t as CUSTOM_ROLES } from "./shared-BRLAQqj4.js";
9
+ import { B as rolesTableScope, P as currentKeyExpr } from "./interactive-only-ek-Kf0Kq.js";
10
10
  // src/cli/rls/custom-role-rebuild.ts
11
11
  const PREFIX = "PermDock CLI";
12
12
  /** A column of the roles-table row `r`. */
@@ -1,9 +1,9 @@
1
1
  import { i as memoryApprovalStore } from "./store-n3yEN7dt.js";
2
- import { c as APP, t as getPermDock } from "./permdock-CbavFN6u.js";
2
+ import { c as APP, t as getPermDock } from "./permdock-B0aE5Ime.js";
3
3
  import { r as isRecord, t as compact } from "./compact-C4LFuqbW.js";
4
4
  import { t as instanceOptions } from "./instance-options-CLErhA76.js";
5
5
  import { n as memoryLimitStore, t as limits } from "./limits-DpTxX6N4.js";
6
- import { _ as claimsFirst } from "./instance-snapshot-D03srwnf.js";
6
+ import { _ as claimsFirst } from "./instance-snapshot-BJam8gUa.js";
7
7
  import { r as mapClaimsToSubject } from "./map-claims-BKdnPwep.js";
8
8
  import { c as subjectFromApiKey } from "./credentials-B-hsgB4W.js";
9
9
  // src/core/version-sources.ts
@@ -21,7 +21,7 @@ const diff = defineLeaf({
21
21
  }
22
22
  },
23
23
  async run(ctx, { flags, args }) {
24
- return (await import("./diff-Sxca4_5q.js")).runDiff({
24
+ return (await import("./diff-YsQOcb9N.js")).runDiff({
25
25
  cwd: ctx.cwd,
26
26
  config: ctx.config,
27
27
  sources: [args["before"], args["after"]].filter((value) => value !== void 0),
@@ -3,12 +3,12 @@ import { t as parseCatalog } from "./parse-CUqZ_lLC.js";
3
3
  import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
4
4
  import { g as secondsOf } from "./time-r0CKBm57.js";
5
5
  import { n as findPermission } from "./permission-registry-DstT40VS.js";
6
- import { t as getPermDock } from "./permdock-CbavFN6u.js";
7
- import { A as memoryCustomRoleSource } from "./src-10d_jun2.js";
6
+ import { t as getPermDock } from "./permdock-B0aE5Ime.js";
7
+ import { A as memoryCustomRoleSource } from "./src-DUWw9z1D.js";
8
8
  import { t as buildCatalog } from "./catalog-doc-BX97oFAn.js";
9
9
  import { f as usageResult, i as configError } from "./errors-DgLOqc6j.js";
10
- import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-3aUUP6Nx.js";
11
- import { a as loadModule, n as asPolicy, s as pickNamed } from "./load-m7jmit3y.js";
10
+ import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-B29C2DGA.js";
11
+ import { a as loadModule, n as asPolicy, s as pickNamed } from "./load-D03A3tZL.js";
12
12
  import { existsSync, readFileSync } from "node:fs";
13
13
  import { resolve } from "node:path";
14
14
  // src/cli/diff/format.ts
@@ -1,84 +1,84 @@
1
1
  import { c as rootScope, d as scopeList, o as normalizeMemberships, s as resolveScope } from "./scopes-B-KX9EI8.js";
2
2
  import { r as supabaseTenantClaim } from "./budget-BH81q2cj.js";
3
- import { r as runCollect } from "./collect-Co-w8Eg2.js";
3
+ import { r as runCollect } from "./collect-BqaPdsk1.js";
4
4
  import { t as didYouMean } from "./args-BSpXxMnb.js";
5
- import { t as DOCS_BASE } from "./manifest-CMh8sAAH.js";
6
- import { o as nonEmptyOr, r as findingOf } from "./output-ONUzppLo.js";
5
+ import { t as DOCS_BASE } from "./manifest-CZvwWacN.js";
6
+ import { o as nonEmptyOr, r as findingOf } from "./output-yUW7fcAk.js";
7
7
  import { t as createStyle } from "./style-CQDaLJtP.js";
8
8
  import { i as DOCTOR_REPORT_SCHEMA } from "./version-D-jWyJb9.js";
9
9
  import { a as rel, n as doctorSrcPath, o as sqlFiles$1, r as listSourceFiles } from "./files-DAR51W3J.js";
10
10
  import { r as pgConnector } from "./pg-DmS5ITHu.js";
11
11
  import { a as describeError, n as CliError } from "./errors-DgLOqc6j.js";
12
- import { S as restatedFacts, _ as workspaceDirs, b as readJson, d as betterSupabaseAuthzVersions, f as betterSupabaseConfig, g as betterSupabaseTenantClaim, h as betterSupabaseInstalled, m as betterSupabaseDefaults, o as readParsedConfig, p as betterSupabaseConfigPath, t as configFileIn, u as BETTER_SUPABASE_AUTHZ_TOPIC, v as filesOf, x as membershipDisagreements, y as nodeFiles } from "./config-Dan6vcvj.js";
13
- import { a as loadModule, i as loadConfiguredPolicy, n as asPolicy, s as pickNamed } from "./load-m7jmit3y.js";
14
- import { i as runSkillsInstall } from "./skills-D4ItrS0F.js";
15
- import { i as withSchemaDefaults, n as schemaDefaults, r as schemaTables } from "./schema-tables-Ba9LE_XB.js";
16
- import { a as pd074, c as readSupabaseConfig, i as pd045, l as supabaseConfig, n as resolveSchemas, o as pd127, s as pd136, u as supabaseConfigName } from "./supabase-schemas-D6ezN5Ln.js";
17
- import { f as attrsPlan, i as supabaseHookManifest, n as hooklessDatabase, r as supabaseDatabaseManifest } from "./hook-sql-BQcxbOzi.js";
18
- import { i as pd039, t as hookOut } from "./supabase-hook-DDxDjlOU.js";
12
+ import { r as manifestTableReads, s as sharedFunctionsOf, t as committedManifest } from "./table-reads-DpncF1F-.js";
13
+ import { S as restatedFacts, _ as workspaceDirs, b as readJson, d as betterSupabaseAuthzVersions, f as betterSupabaseConfig, g as betterSupabaseTenantClaim, h as betterSupabaseInstalled, m as betterSupabaseDefaults, o as readParsedConfig, p as betterSupabaseConfigPath, t as configFileIn, u as BETTER_SUPABASE_AUTHZ_TOPIC, v as filesOf, x as membershipDisagreements, y as nodeFiles } from "./config-C1lTq4gJ.js";
14
+ import { i as withSchemaDefaults, n as schemaDefaults, r as schemaTables } from "./schema-tables-CqEHokUT.js";
15
+ import { a as loadModule, i as loadConfiguredPolicy, n as asPolicy, s as pickNamed } from "./load-D03A3tZL.js";
16
+ import { i as runSkillsInstall } from "./skills-DiMXWCQY.js";
17
+ import { a as pd074, c as readSupabaseConfig, i as pd045, l as supabaseConfig, n as resolveSchemas, o as pd127, s as pd136, u as supabaseConfigName } from "./supabase-schemas-RPYfnE6O.js";
18
+ import { f as attrsPlan, i as supabaseHookManifest, n as hooklessDatabase, r as supabaseDatabaseManifest } from "./hook-sql-Dys1kW5p.js";
19
+ import { i as pd039, t as hookOut } from "./supabase-hook-C3q-XEnu.js";
19
20
  import { t as parseCatalog } from "./parse-CUqZ_lLC.js";
20
21
  import { t as catalogPath } from "./catalog-path-bG0XxHMu.js";
21
22
  import { n as bsbActions, t as answerOf } from "./bsb-actions-DcDxQ_Ku.js";
22
23
  import { c as outFiles } from "./output-files-8lfALMSU.js";
23
- import { a as guardedTables, r as unsatisfiedKinds, t as ownershipRules } from "./ownership-CCgncSLb.js";
24
+ import { a as guardedTables, r as unsatisfiedKinds, t as ownershipRules } from "./ownership-Bx_s_E8i.js";
24
25
  import { n as MIGRATION_DIRS, t as DEFAULT_SENSITIVE_ACTIONS } from "./constants-PCJiir_3.js";
25
26
  import { n as membershipColumns, r as tableKey } from "./deciding-columns-DBZsrpdD.js";
26
27
  import { a as parseSqlFile, c as readPolicy$1, d as sqlCalls, f as stringValues, h as sqlStatements, l as readRelation, o as parseSqlLenient, p as group, r as functionArgTypes, s as parseSqlStatements, t as SqlSyntaxError } from "./ast-Dnm2TOHN.js";
27
28
  import { t as applyFiles } from "./files-DuV7wRim.js";
28
- import { o as splitIgnored } from "./verify-CHlmYg2d.js";
29
+ import { o as splitIgnored } from "./verify-Df9u1-v5.js";
29
30
  import { a as updatedBaseline, i as readBaseline, n as baselineText, t as applyBaseline } from "./baseline-file-BQoki1O_.js";
30
- import { n as activeTenantMismatch, t as authorizationProvider } from "./provider-hQFC3b98.js";
31
+ import { n as activeTenantMismatch, t as authorizationProvider } from "./provider-DRsBw6My.js";
31
32
  import { r as isRecord } from "./compact-C4LFuqbW.js";
32
33
  import "./authz-topic-D8x24Jv-.js";
33
- import { n as activeSource } from "./memberships-CDiSsFTu.js";
34
- import { n as budgetBreaches, r as snapshotProbeOptions, t as breachText } from "./budgets-DFnMBpKz.js";
35
- import { a as nameOf, i as lineIndex, o as nodes, r as child, u as walk } from "./ast-CAOxvn9t.js";
36
- import { r as parseSync, t as createVisitor } from "./optional-CaQWp9HA.js";
34
+ import { n as activeSource } from "./memberships-DaKwjhc5.js";
35
+ import { n as budgetBreaches, r as snapshotProbeOptions, t as breachText } from "./budgets-6cfA6Ibw.js";
36
+ import { a as nameOf, i as lineIndex, o as nodes, r as child, u as walk } from "./ast-BhvgF264.js";
37
+ import { i as parseTree, t as createVisitor } from "./optional-Dw7to-jw.js";
37
38
  import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
38
39
  import { c as jsonSchemaOf, i as catalogOAuthScopes } from "./catalog-doc-BX97oFAn.js";
39
- import { a as pd015, i as pd014, n as ADAPTER_SPECIFIERS, o as runtimeSpecifiers, r as pd001, t as runUsage } from "./usage-CX_wmL5W.js";
40
+ import { a as pd015, i as pd014, n as ADAPTER_SPECIFIERS, o as runtimeSpecifiers, r as pd001, t as runUsage } from "./usage-DDr-iwHr.js";
40
41
  import { c as listPermissions, h as formerKeys } from "./permission-registry-DstT40VS.js";
41
- import { t as resolveNames } from "./resolve-names-DmX503uX.js";
42
+ import { t as resolveNames } from "./resolve-names-ybewcnpW.js";
42
43
  import "./markers-C-kThnKN.js";
43
44
  import { i as qualifySqlTable, s as quoteSqlLiteral } from "./sql-T4GaBh9X.js";
44
45
  import { s as parseCredential } from "./credential-D9in5keC.js";
45
46
  import { u as separationConflicts } from "./policy-CZBJDcTx.js";
46
47
  import { O as validateCustomRole } from "./evaluate-DNz6wMYv.js";
47
- import { d as keptKeys, r as PERMDOCK_SCHEMA } from "./sources-C6Id63F8.js";
48
- import { a as quoteIdent } from "./quote-LNaBdCGA.js";
49
- import { t as configProperty } from "./config-paths-CQvGng3k.js";
48
+ import { d as keptKeys, r as PERMDOCK_SCHEMA } from "./sources-DNVEyJxb.js";
49
+ import { a as quoteIdent } from "./quote-BX3DDoTX.js";
50
+ import { t as configProperty } from "./config-paths-Cg3IXh9T.js";
50
51
  import { o as hasConditionOp, u as isSqlFunctionField } from "./refs-Cix9Zjis.js";
51
52
  import { o as flattenGrantee } from "./grantee-BSCdpIF3.js";
52
53
  import { u as isPrincipalRelation } from "./resource-relations-Ck5sjYQR.js";
53
54
  import { t as operationCoverage } from "./coverage-C3jVYC9Y.js";
54
- import { a as snapshotSize, r as mostPrivilegedRole, t as SNAPSHOT_BUDGET_BYTES } from "./snapshot-size-CpdksnSr.js";
55
+ import { a as snapshotSize, r as mostPrivilegedRole, t as SNAPSHOT_BUDGET_BYTES } from "./snapshot-size-1zICkeFb.js";
55
56
  import { a as taggedPolicyId, o as taggedPolicyIds } from "./bsb-access-Bcw6GrQm.js";
56
57
  import { t as membershipSourcesOf } from "./sources-BbSUNmFX.js";
57
- import { a as ownedObjects, i as inReservedDir, o as shownKey, r as generatedByPermdock, s as withoutOwned, t as policyModel } from "./model-DQQYg8UW.js";
58
- import { a as pd114, i as pd110, r as pd109 } from "./claims-size-ZiUJBn0r.js";
58
+ import { a as ownedObjects, i as inReservedDir, o as shownKey, r as generatedByPermdock, s as withoutOwned, t as policyModel } from "./model-BfhDMEDf.js";
59
+ import { a as pd114, i as pd110, r as pd109 } from "./claims-size-Dxm9zWw5.js";
59
60
  import { t as importFromApp } from "./app-peer-BnMh5lqz.js";
60
- import { c as rlsReport, o as policiesFor } from "./report-x9GeUvjx.js";
61
+ import { c as rlsReport, o as policiesFor } from "./report-B7UuE4dW.js";
61
62
  import { a as scopeMembershipTable } from "./compile-BUKXrueE.js";
62
- import { a as powersyncOut, c as streamOf, i as powersyncFiles, n as staleFiles, o as roleSources, r as publicationPath, s as scopeSourcesOf } from "./powersync-C1OW6iVd.js";
63
- import { t as parseProgram } from "./program-CvarkLMS.js";
64
- import { t as FIELD_VIEWS } from "./fields-CKX-qjWb.js";
65
- import { n as restatedDefaults } from "./resolve-config-Cu_mE2wt.js";
63
+ import { a as powersyncOut, c as streamOf, i as powersyncFiles, n as staleFiles, o as roleSources, r as publicationPath, s as scopeSourcesOf } from "./powersync-DVUeHJpL.js";
64
+ import { t as parseProgram } from "./program-C2fbc9NO.js";
65
+ import { t as FIELD_VIEWS } from "./fields-DWAwA8vX.js";
66
+ import { n as restatedDefaults } from "./resolve-config-LiLfxe8X.js";
66
67
  import { n as policyRowConditionKeys } from "./row-conditions-BjARoFLU.js";
67
- import { X as policyBundle, et as graphPlan, i as tableNames, r as tableNameOf } from "./tables-E-dIHUN_.js";
68
+ import { X as policyBundle, et as graphPlan, i as tableNames, r as tableNameOf } from "./tables-Dr4BUH9i.js";
68
69
  import { n as byKey } from "./compare-8SNJN-9U.js";
69
- import { a as tableFor, n as commandFor, o as unmappedActions, r as compileGrants, t as INFERRED_VERBS } from "./compile-BWOrvhGt.js";
70
- import { p as contextRefs } from "./rbac-ByuGspKZ.js";
71
- import { l as rowConditionMessage, r as ROW_CONDITION_FIX, s as helperTablePolicies } from "./helper-calls-DN1PJcNY.js";
72
- import { i as graphSqlName } from "./names-DwGleRKB.js";
73
- import { t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
70
+ import { a as tableFor, n as commandFor, o as unmappedActions, r as compileGrants, t as INFERRED_VERBS } from "./compile-CeaX5VD-.js";
71
+ import { p as contextRefs } from "./rbac-COexzCC9.js";
72
+ import { l as rowConditionMessage, r as ROW_CONDITION_FIX, s as helperTablePolicies } from "./helper-calls-jStpeQ2_.js";
73
+ import { i as graphSqlName } from "./names-zCkaCepO.js";
74
+ import { t as CUSTOM_ROLES } from "./shared-BRLAQqj4.js";
74
75
  import { n as isSeeds } from "./seeds-Bs44UDS3.js";
75
76
  import { r as FIXTURES_PATH, s as seedPathsLine } from "./seed-sql-CjF7u0aX.js";
76
- import { i as buildContext, n as isRefusal, o as inheritTargets, t as generateOptions } from "./generate-options-eMjRViev.js";
77
- import { n as propertyKey } from "./edits-CqU8s2GC.js";
77
+ import { i as buildContext, n as isRefusal, o as inheritTargets, t as generateOptions } from "./generate-options-Bq5qQ9H7.js";
78
+ import { n as propertyKey } from "./edits-Ckbit4uD.js";
78
79
  import { n as legacyHelperNames, r as retirePlan, t as legacyHelperCalls } from "./retire-FN4aY6-n.js";
79
80
  import { t as supautilsRejections } from "./supautils-ym4X20ig.js";
80
81
  import { t as MANIFEST_FILE } from "./manifest-json-DMaBWmcG.js";
81
- import { r as manifestTableReads, s as sharedFunctionsOf, t as committedManifest } from "./table-reads-Doh_Egx2.js";
82
82
  import { isDeepStrictEqual } from "node:util";
83
83
  import { readFileSync } from "node:fs";
84
84
  import { dirname, join, resolve } from "node:path";
@@ -91,6 +91,8 @@ function loadProject(input) {
91
91
  let sources;
92
92
  let policyLoad;
93
93
  let collected;
94
+ let tables;
95
+ let tableReads;
94
96
  const loadPolicy = () => {
95
97
  policyLoad ??= readPolicy(cwd, config.policy);
96
98
  return policyLoad;
@@ -127,6 +129,17 @@ function loadProject(input) {
127
129
  loadPolicy: policy
128
130
  });
129
131
  return collected;
132
+ },
133
+ schemaTables: () => {
134
+ tables ??= schemaTables(cwd);
135
+ return tables;
136
+ },
137
+ manifestTableReads: () => {
138
+ if (tableReads === void 0) {
139
+ const manifest = committedManifest(cwd);
140
+ tableReads = manifest === void 0 ? Promise.resolve([]) : manifestTableReads(cwd, config, manifest);
141
+ }
142
+ return tableReads;
130
143
  }
131
144
  };
132
145
  }
@@ -566,7 +579,7 @@ async function providerOf(input) {
566
579
  const path = catalogPath(input.config, input.cwd);
567
580
  try {
568
581
  const scopes = scopeList(policy.scopes);
569
- const config = await withSchemaDefaults(input.cwd, input.config, policy);
582
+ const config = await withSchemaDefaults(input.cwd, input.config, policy, input.schemaTables?.());
570
583
  const manifest = hooklessDatabase(input.config) ? supabaseDatabaseManifest(scopes, config, {}, policy) : supabaseHookManifest(scopes, config, {}, policy);
571
584
  return authorizationProvider({
572
585
  manifest,
@@ -714,7 +727,7 @@ function jsxAttribute(node) {
714
727
  };
715
728
  }
716
729
  function passedBundles(source) {
717
- const parsed = parseSync(source.file, source.text);
730
+ const parsed = parseTree(source.file, source.text);
718
731
  if (parsed.errors.some((error) => {
719
732
  return error.severity === "Error";
720
733
  })) return [];
@@ -1723,7 +1736,7 @@ function isPermDockSpecifier(value) {
1723
1736
  * each builds the object once.
1724
1737
  */
1725
1738
  function callsInFunctions(source, cacheHelpers) {
1726
- const { program } = parseSync(source.file, source.text);
1739
+ const { program } = parseTree(source.file, source.text);
1727
1740
  const names = /* @__PURE__ */ new Map();
1728
1741
  const namespaces = /* @__PURE__ */ new Set();
1729
1742
  const lazy = [];
@@ -3525,7 +3538,7 @@ const OWN_OPTIONS = /* @__PURE__ */ new Set([
3525
3538
  ]);
3526
3539
  const BUILDERS = /* @__PURE__ */ new Set(["createPermDock", "getPermDock"]);
3527
3540
  function sitesOf(source) {
3528
- const parsed = parseSync(source.file, source.text);
3541
+ const parsed = parseTree(source.file, source.text);
3529
3542
  if (parsed.errors.some((error) => {
3530
3543
  return error.severity === "Error";
3531
3544
  })) return {
@@ -4064,7 +4077,7 @@ async function pd075(input) {
4064
4077
  */
4065
4078
  async function pd134(input) {
4066
4079
  if (input.config.rls === void 0) return [];
4067
- const tables = await schemaTables(input.cwd);
4080
+ const tables = await (input.schemaTables?.() ?? schemaTables(input.cwd));
4068
4081
  if (tables.size === 0) return [];
4069
4082
  const policy = await policyOf(input);
4070
4083
  if (policy === void 0) return [];
@@ -5372,7 +5385,7 @@ async function pd128(input) {
5372
5385
  const manifest = committedManifest(input.cwd);
5373
5386
  const recorded = manifest?.rls.tableReads;
5374
5387
  if (manifest === void 0 || recorded === void 0) return [];
5375
- const current = await manifestTableReads(input.cwd, input.config, manifest);
5388
+ const current = await (input.manifestTableReads?.() ?? manifestTableReads(input.cwd, input.config, manifest));
5376
5389
  const now = new Map(current.map((read) => [read.table, read]));
5377
5390
  return recorded.flatMap((read) => {
5378
5391
  if (read.share !== "tenant") return [];
@@ -5409,7 +5422,7 @@ async function pd137(input) {
5409
5422
  });
5410
5423
  const recorded = manifest.rls.sharedFunctions;
5411
5424
  if (recorded === void 0 || recorded.length === 0) return twoArgument;
5412
- const reads = await manifestTableReads(input.cwd, input.config, manifest);
5425
+ const reads = await (input.manifestTableReads?.() ?? manifestTableReads(input.cwd, input.config, manifest));
5413
5426
  const now = new Map(reads.map((read) => [read.table, read]));
5414
5427
  const valid = new Set((await sharedFunctionsOf({
5415
5428
  cwd: input.cwd,
@@ -6313,7 +6326,7 @@ async function supabaseSetup(input) {
6313
6326
  if (policy === void 0) return [];
6314
6327
  let manifest;
6315
6328
  try {
6316
- manifest = supabaseHookManifest(scopeList(policy.scopes), await withSchemaDefaults(input.cwd, input.config, policy), { out: hookOut(input.cwd, input.config) }, policy);
6329
+ manifest = supabaseHookManifest(scopeList(policy.scopes), await withSchemaDefaults(input.cwd, input.config, policy, input.schemaTables()), { out: hookOut(input.cwd, input.config) }, policy);
6317
6330
  } catch {
6318
6331
  return [];
6319
6332
  }
@@ -11,7 +11,7 @@ const doctor = defineLeaf({
11
11
  description: "Check codes or groups to run",
12
12
  valueHint: "code",
13
13
  async complete() {
14
- const { DOCTOR_CHECKS } = await import("./doctor-Dqh8AzIx.js");
14
+ const { DOCTOR_CHECKS } = await import("./doctor-BuPSrNmh.js");
15
15
  return [.../* @__PURE__ */ new Set([...DOCTOR_CHECKS.map(({ code }) => code), ...DOCTOR_CHECKS.flatMap(({ groups }) => groups)])];
16
16
  }
17
17
  },
@@ -46,7 +46,7 @@ const doctor = defineLeaf({
46
46
  if (answer === void 0) return CANCELLED;
47
47
  fix = answer;
48
48
  }
49
- return (await import("./doctor-Dqh8AzIx.js")).runDoctor({
49
+ return (await import("./doctor-BuPSrNmh.js")).runDoctor({
50
50
  cwd: ctx.cwd,
51
51
  config: ctx.config,
52
52
  only: flags.only,
@@ -1,4 +1,4 @@
1
- import { a as nameOf, o as nodes } from "./ast-CAOxvn9t.js";
1
+ import { a as nameOf, o as nodes } from "./ast-BhvgF264.js";
2
2
  // src/cli/source/edits.ts
3
3
  /**
4
4
  * Applies `edits` to `text`. Two edits that overlap would corrupt the file, so
@@ -1,5 +1,5 @@
1
1
  import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
2
- import { a as socketConnection, i as decorate, r as bindKernel } from "../bind-BNYcJ1D9.js";
2
+ import { a as socketConnection, i as decorate, r as bindKernel } from "../bind-CFwfgfp2.js";
3
3
  import { a as parsedBody, r as hasCredentials } from "../http-C9jDw_bZ.js";
4
4
  import { t as problemFromError } from "../map-error-DYQbf-3Q.js";
5
5
  import { a as onRevoked, n as closeReason, t as POLICY_VIOLATION } from "../stream-DdF94h7T.js";
@@ -0,0 +1,2 @@
1
+ export { t as buildInstance } from "./from-snapshot-O341Vdgj.js";
2
+ import "./evaluator-BvRk9kiK.js";
@@ -1,4 +1,4 @@
1
- import { t as fromSnapshot } from "./from-snapshot-DZ4D2sLa.js";
1
+ import { t as fromSnapshot } from "./from-snapshot-O341Vdgj.js";
2
2
  // src/client/evaluator-eager.ts
3
3
  /** The evaluator in the entry itself, for adapters that render without Suspense. */
4
4
  const eagerEvaluator = {
@@ -65,6 +65,49 @@ type EvePermDockOptions<TUser = unknown> = Omit<AgentAdapterOptions<EveContext,
65
65
  readonly subject?: (context: EveContext) => TUser | Promise<TUser>;
66
66
  readonly approvers?: EveApprovers;
67
67
  };
68
+ /** Structural `SessionAuthContext` of the session that is subscribed. */
69
+ type EveSubscriber = {
70
+ readonly auth: EvePrincipal | null;
71
+ readonly sessionId: string;
72
+ };
73
+ /** What a session asked `eve__subscribe` for, as `onSubscribe` sees it. */
74
+ type EveSubscriptionRequest = {
75
+ readonly channelName: string;
76
+ readonly event: string;
77
+ readonly input: Readonly<Record<string, unknown>>;
78
+ };
79
+ /** One delivery, as eve's `onEvent` sees it. */
80
+ type EveChannelEvent = {
81
+ readonly id: string;
82
+ readonly name: string;
83
+ readonly data: Readonly<Record<string, unknown>>;
84
+ };
85
+ /** The subscription a delivery belongs to. */
86
+ type EveSubscription = EveSubscriptionRequest & {
87
+ readonly id: string;
88
+ };
89
+ type EveSubscriptionOptions = {
90
+ /** Loads the row the permission is checked on from the subscription's `input`. */
91
+ readonly data?: (input: Readonly<Record<string, unknown>>) => unknown;
92
+ /**
93
+ * Formats a delivery for a subscriber that still holds the grant; `null`
94
+ * drops it.
95
+ */
96
+ readonly onEvent: (context: EveSubscriber & {
97
+ readonly event: EveChannelEvent;
98
+ readonly subscription: EveSubscription;
99
+ }) => string | null | Promise<string | null>;
100
+ };
101
+ /** `onSubscribe` and `onEvent` for a channel's `experimental.subscriptions`. */
102
+ type EveSubscriptionPair = {
103
+ readonly onSubscribe: (context: EveSubscriber & {
104
+ readonly subscription: EveSubscriptionRequest;
105
+ }) => Promise<void>;
106
+ readonly onEvent: (context: EveSubscriber & {
107
+ readonly event: EveChannelEvent;
108
+ readonly subscription: EveSubscription;
109
+ }) => Promise<string | null>;
110
+ };
68
111
  type EveRequestResult = "not-applicable" | "user-approval" | {
69
112
  readonly type: "denied";
70
113
  readonly reason: string;
@@ -83,6 +126,12 @@ type EveApprovalPair = {
83
126
  type EvePermDock<V extends PolicyVocabulary = PolicyVocabulary> = AgentPermDock<EveContext, V> & {
84
127
  readonly approval: EveApprovalPair;
85
128
  readonly approvalFor: (permission: Permission, data?: (input: unknown) => unknown) => EveApprovalPair;
129
+ /**
130
+ * Gates an eve channel's subscriptions on `permission`: `onSubscribe`
131
+ * throws unless the subscriber is granted, and `onEvent` drops a delivery
132
+ * once the grant is gone. eve captures `auth` when the session subscribes.
133
+ */
134
+ readonly subscriptionFor: (permission: Permission, options: EveSubscriptionOptions) => EveSubscriptionPair;
86
135
  readonly getPermDock: (ctx: EveContext) => Promise<PermDock<V>>;
87
136
  };
88
137
  export declare function rolesOf(principal: EvePrincipal | null | undefined): string[];
@@ -93,4 +142,4 @@ export declare function rolesOf(principal: EvePrincipal | null | undefined): str
93
142
  export declare function subjectFromEve(context: EveContext): unknown;
94
143
  export declare function actorFromEve(_context: EveContext): unknown;
95
144
  export declare function createPermDock<TUser, TPrincipal extends Principal = Principal, V extends PolicyVocabulary = PolicyVocabulary>(policy: Policy<TUser, TPrincipal, V>, given: EvePermDockOptions<TUser>): EvePermDock<V>;
96
- export type { EveApprovalContext, EveApprovalPair, EveApprovers, EveContext, EvePermDock, EvePermDockOptions, EvePrincipal, EveRequestResult, EveResponseContext, EveResponseResult };
145
+ export type { EveApprovalContext, EveApprovalPair, EveApprovers, EveChannelEvent, EveContext, EvePermDock, EvePermDockOptions, EvePrincipal, EveRequestResult, EveResponseContext, EveResponseResult, EveSubscriber, EveSubscription, EveSubscriptionOptions, EveSubscriptionPair, EveSubscriptionRequest };