permdock 0.27.2 → 0.28.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 (190) hide show
  1. package/dist/{2020-bJfT8aIA.js → 2020-DBXhfpuK.js} +2 -2
  2. package/dist/{adoption-scan-Fc-Wmidd.js → adoption-scan-BHQm3Li7.js} +1 -1
  3. package/dist/approvals/index.d.ts +1 -1
  4. package/dist/{arazzo-awjY0iuj.js → arazzo-CAQr4N7Z.js} +2 -2
  5. package/dist/{arazzo-0iMa9ZCa.js → arazzo-UwtVzma6.js} +1 -1
  6. package/dist/{args-0EWFk-4S.js → args-Bc0HLiD4.js} +1 -1
  7. package/dist/better-supabase/index.d.ts +2 -0
  8. package/dist/better-supabase/index.js +8 -6
  9. package/dist/{casbin-lyorC43j.js → casbin-CSgPeAJK.js} +1 -1
  10. package/dist/{casbin-CmCKtC7e.js → casbin-Ccbaft52.js} +1 -1
  11. package/dist/catalog/index.d.ts +1 -1
  12. package/dist/{catalog-B3MJShnZ.js → catalog-COoxFOoy.js} +1 -1
  13. package/dist/catalog-DCjJIl3n.js +1 -0
  14. package/dist/{catalog-DyC3LKc7.js → catalog-DXSP1we9.js} +1 -1
  15. package/dist/cli/bin.js +1 -1
  16. package/dist/cli/generate/watch-worker.js +1 -1
  17. package/dist/cli/index.d.ts +5 -4
  18. package/dist/cli/index.js +1 -1
  19. package/dist/cli/plugins/app.d.ts +1 -1
  20. package/dist/cli/plugins/app.js +1 -1
  21. package/dist/cli/plugins/better-supabase.d.ts +1 -1
  22. package/dist/cli/plugins/openapi.d.ts +1 -1
  23. package/dist/cli/plugins/openapi.js +1 -1
  24. package/dist/cli/plugins/powersync.d.ts +1 -1
  25. package/dist/cli/plugins/powersync.js +1 -1
  26. package/dist/cli/plugins/rls.d.ts +2 -2
  27. package/dist/cli/plugins/rls.js +1 -1
  28. package/dist/cli/plugins/schemas.d.ts +1 -1
  29. package/dist/cli/plugins/schemas.js +1 -1
  30. package/dist/cli/plugins/scim.d.ts +2 -2
  31. package/dist/cli/plugins/supabase-hook.d.ts +2 -2
  32. package/dist/cli/plugins/supabase-hook.js +1 -1
  33. package/dist/cli/plugins/supabase.d.ts +3 -3
  34. package/dist/cli/plugins/supabase.js +2 -2
  35. package/dist/cli/plugins/ui.d.ts +1 -1
  36. package/dist/cli/plugins/ui.js +1 -1
  37. package/dist/{cloud-DqV26jjx.js → cloud-CFtvELWj.js} +2 -2
  38. package/dist/{codemod-Hd9xW-Ft.js → codemod-3PFIcPag.js} +2 -2
  39. package/dist/{codemod-KrqgvHZZ.js → codemod-ClcPRv4c.js} +2 -2
  40. package/dist/{collect-BJZsuBW4.js → collect-BOh9Pxob.js} +1 -1
  41. package/dist/{collect-CpGnmGpL.js → collect-BYPq-0JU.js} +2 -2
  42. package/dist/collect-XcoQRyiA.js +1 -0
  43. package/dist/{compile-R4ZIFR-P.js → compile-mfTqcMJ5.js} +4 -4
  44. package/dist/{completion-D4umSq3h.js → completion-D4p_MQX7.js} +2 -2
  45. package/dist/{conditions-CkHgXoZB.js → conditions-VlAMOm20.js} +1 -1
  46. package/dist/{config-t947SDkG.js → config-D9bq79Yi.js} +1 -1
  47. package/dist/{config-report-D5MqxIOK.js → config-report-DZfIl6zc.js} +2 -2
  48. package/dist/{context-DmH-Eyvx.js → context-BdoA9DhS.js} +2 -2
  49. package/dist/{core-DKqrD_xW.js → core-tEfD0lwu.js} +1 -1
  50. package/dist/delivery/index.d.ts +1 -1
  51. package/dist/{diff-BIqibFnm.js → diff-CXRZ6qPa.js} +1 -1
  52. package/dist/{diff-n6LONVwL.js → diff-Cv9inVY5.js} +1 -1
  53. package/dist/{doctor-DNcxcd7g.js → doctor-CuhkBJ06.js} +3 -3
  54. package/dist/{doctor-CMEycIkk.js → doctor-FHjwjHYC.js} +21 -21
  55. package/dist/{execute-DWB89P16.js → execute-DdH84BHC.js} +4 -4
  56. package/dist/gen-BseS8XeZ.js +1 -0
  57. package/dist/{gen-D89kmqIc.js → gen-CcKymoUw.js} +3 -3
  58. package/dist/{gen-kind-B1iCluFw.js → gen-kind-Bf9jYVgn.js} +1 -1
  59. package/dist/{generate-Bajg2iM2.js → generate-BCUVV4vB.js} +13 -13
  60. package/dist/{generate-BIcB7Seb.js → generate-UMuStlLD.js} +3 -3
  61. package/dist/{generate-options-DCAC8VPe.js → generate-options-Cg5sAHhT.js} +8 -8
  62. package/dist/{grants-BzjbUCdR.js → grants-C7bGZFPa.js} +1 -1
  63. package/dist/{hook-sql-QnIzAo7X.js → hook-sql-C0aUoiOH.js} +7 -6
  64. package/dist/{import-BX3VRyEG.js → import--taRAR01.js} +1 -1
  65. package/dist/{index-Cq9N5B92.d.ts → index-BSJoxaOi.d.ts} +1 -1
  66. package/dist/{index-BXz-XXC3.d.ts → index-D1msamx_.d.ts} +1 -1
  67. package/dist/{index-CVuc3E1O.d.ts → index-eaNHkELi.d.ts} +1 -1
  68. package/dist/index.d.ts +2 -2
  69. package/dist/index.js +1 -1
  70. package/dist/{init-B7dc10G2.js → init-CP3fYFb6.js} +3 -3
  71. package/dist/{init-oLHdLm9N.js → init-Cfi7_gXO.js} +1 -1
  72. package/dist/{interactive-only-BZu9rLpa.js → interactive-only-CQsgMc1E.js} +5 -1
  73. package/dist/{json-schema-SDkWXxhu.d.ts → json-schema-DAeA-lJa.d.ts} +1 -1
  74. package/dist/{lazy-provider-CydlnKkS.d.ts → lazy-provider-C48LDq0q.d.ts} +1 -1
  75. package/dist/{lazy-provider-DG5rMeqL.js → lazy-provider-CVX534Kk.js} +1 -1
  76. package/dist/{login-Cy1tmSIU.js → login-BjkyJNGn.js} +3 -3
  77. package/dist/{login-Dtr5Dhg-.js → login-kg9Pd0C2.js} +1 -1
  78. package/dist/{manifest-D_T55LWM.js → manifest-C7dWk0k5.js} +35 -35
  79. package/dist/{migrate-CmTMk7rd.js → migrate-BwXtXUtE.js} +1 -1
  80. package/dist/{model-B4EKVHMK.js → model-BkQLENu6.js} +1 -1
  81. package/dist/next/index.d.ts +2 -2
  82. package/dist/next/plugin.d.ts +1 -1
  83. package/dist/next/plugin.js +1 -1
  84. package/dist/{openapi-dfS5EWV7.js → openapi-B5jo5ClY.js} +3 -3
  85. package/dist/{openapi-DXTd9d4R.js → openapi-dJFJTHiW.js} +1 -1
  86. package/dist/{openapi-document-DG3OLrz8.js → openapi-document-B58hIsZ4.js} +1 -1
  87. package/dist/{output-DyU0C-y4.js → output-Pne7BTXn.js} +1 -1
  88. package/dist/{output-files-DNid6TBl.js → output-files-D5D-8-4l.js} +1 -1
  89. package/dist/output-files-aPXXhV4q.js +1 -0
  90. package/dist/{ownership-CoKxJFJT.js → ownership-BPGoxz1T.js} +2 -2
  91. package/dist/{permissions-ijDw4sO1.js → permissions-Bj3DRIEi.js} +1 -1
  92. package/dist/{pipeline-CXuwijr2.js → pipeline-CGctXudd.js} +1 -1
  93. package/dist/{plugin-1XW5OfAZ.d.ts → plugin-zOs9uqQj.d.ts} +1 -1
  94. package/dist/{policy-CCEbqYf8.js → policy-G8iZ2T5P.js} +1 -1
  95. package/dist/{policy-bundle-HAEbKVWr.js → policy-bundle-nbcxlVOb.js} +3 -3
  96. package/dist/{powersync-DLCojn6h.js → powersync-B9KEEiJE.js} +1 -1
  97. package/dist/{powersync-CRjA5yaf.js → powersync-BoOMFQRl.js} +1 -1
  98. package/dist/{powersync-B3wb25Im.js → powersync-CqAj9QJt.js} +8 -8
  99. package/dist/{prompt-CSXHcJxy.js → prompt-CPlJn_4-.js} +3 -3
  100. package/dist/{protected-action-D6T3eJyW.d.ts → protected-action-CEzNNtfi.d.ts} +2 -2
  101. package/dist/{protected-action-BMb0ftEu.js → protected-action-Dco5O_Kc.js} +1 -1
  102. package/dist/{provider-ClD4rfgT.js → provider-BYcoTKuS.js} +1 -1
  103. package/dist/{provider-CydlnKkS.d.ts → provider-C48LDq0q.d.ts} +1 -1
  104. package/dist/{provider-store-atQUfsVO.js → provider-store-Dq_olUjC.js} +1 -1
  105. package/dist/{provider-with-CSw4mBDU.js → provider-with-fxHItxDh.js} +1 -1
  106. package/dist/pull-8Vce3V1e.js +1 -0
  107. package/dist/{pull-CPqDPfQF.js → pull-DXuh-rob.js} +1 -1
  108. package/dist/{push-Cb7PqXdO.js → push-DXh936bz.js} +1 -1
  109. package/dist/{pushed-policy-pH-EFWyx.d.ts → pushed-policy-APjMbYdV.d.ts} +1 -1
  110. package/dist/{rbac-B-49toAp.js → rbac-FlJv7Ba9.js} +2 -2
  111. package/dist/react/index.d.ts +4 -4
  112. package/dist/react/index.js +3 -3
  113. package/dist/react/lazy.d.ts +4 -4
  114. package/dist/react/lazy.js +3 -3
  115. package/dist/react/provider-client-lazy.d.ts +1 -1
  116. package/dist/react/provider-client-lazy.js +1 -1
  117. package/dist/react/provider-client.d.ts +1 -1
  118. package/dist/react/provider-client.js +1 -1
  119. package/dist/react-native/index.d.ts +4 -4
  120. package/dist/react-native/index.js +2 -2
  121. package/dist/{resolve-names-DcEObQXW.js → resolve-names-CROyyjVR.js} +2 -2
  122. package/dist/{resolver-kdZ4HrpC.js → resolver-4qxIIHcC.js} +1 -1
  123. package/dist/{rls-DvvFUuM1.js → rls-BL90Ec30.js} +7 -7
  124. package/dist/{rls-B7_-H9w_.js → rls-DV4MUNMb.js} +1 -1
  125. package/dist/{rls-files-BTEnbgHS.js → rls-files-BgLoAa9x.js} +2 -2
  126. package/dist/{rls-options-CEpg5nDP.d.ts → rls-options-BZxfMDFo.d.ts} +1 -1
  127. package/dist/{run-b7JC98PS.js → run-BFDAiNuS.js} +3 -3
  128. package/dist/run-mEbYi2Ow.js +1 -0
  129. package/dist/{saas-DzjKUQr5.js → saas-CUwmgUB8.js} +2 -2
  130. package/dist/{scan-B5BaNYdI.js → scan-CoyAmDAz.js} +1 -1
  131. package/dist/{schema-McSTkbY6.js → schema-9eGIiLry.js} +2 -2
  132. package/dist/{size-DF7xQ-nH.js → size-BqLd5oJ4.js} +1 -1
  133. package/dist/{skills-BY84uRix.js → skills-B8nt-KuB.js} +2 -2
  134. package/dist/{skills-zTMid__z.js → skills-BPDVfXgR.js} +2 -2
  135. package/dist/{snapshot-size-DU7CvpMt.js → snapshot-size-B_chu2c1.js} +1 -1
  136. package/dist/{snapshot-size-D-pCR8x0.js → snapshot-size-CHig-Nq_.js} +1 -1
  137. package/dist/solid/index.d.ts +24 -24
  138. package/dist/solid/index.js +2 -2
  139. package/dist/{src-D6_T4zd7.js → src-BAYcigFU.js} +1 -1
  140. package/dist/{store-core-eqG8jijs.d.ts → store-core-DyNo_BwA.d.ts} +4 -2
  141. package/dist/{store-options-C8x39AHa.js → store-options-BtHrfJUU.js} +1 -1
  142. package/dist/{stores-DoA7ACkz.js → stores-BIMyclLg.js} +1 -1
  143. package/dist/{stores-4DOaL4ZP.d.ts → stores-DyFCruRC.d.ts} +2 -2
  144. package/dist/supabase/index.d.ts +6 -0
  145. package/dist/supabase/index.js +2 -2
  146. package/dist/{supabase-BI5ZhzLl.js → supabase-Ctn_Z6xf.js} +1 -1
  147. package/dist/{supabase-3Z27QkmX.js → supabase-D5KN965n.js} +1 -1
  148. package/dist/{supabase-config-mXcggV5I.js → supabase-config-CjX-GjEp.js} +1 -1
  149. package/dist/supabase-hook-CjChM-eX.js +2 -0
  150. package/dist/{supabase-hook-O2TwhHTD.js → supabase-hook-CmW2MLWa.js} +4 -4
  151. package/dist/svelte/index.d.ts +3 -3
  152. package/dist/svelte/index.js +3 -3
  153. package/dist/svelte/runtime.d.ts +2 -2
  154. package/dist/svelte/runtime.js +1 -1
  155. package/dist/svelte/source.d.ts +3 -3
  156. package/dist/svelte/source.js +2 -2
  157. package/dist/{tables-B-rPhiI1.js → tables-Btlt_Rp-.js} +54 -9
  158. package/dist/testing/core.js +1 -1
  159. package/dist/testing/index.d.ts +3 -3
  160. package/dist/testing/index.js +5 -5
  161. package/dist/testing/saas/index.js +2 -2
  162. package/dist/testing/saas/permissions.js +1 -1
  163. package/dist/{text-diff-CsglY49A.js → text-diff-DxKRNFlx.js} +2 -2
  164. package/dist/{types-C7QtRn3n.d.ts → types-4wjWMSFM.d.ts} +2 -2
  165. package/dist/{types-CVCRFYY_.d.ts → types-CQF-oYSz.d.ts} +1 -1
  166. package/dist/{types-3pRMqcvw.d.ts → types-PS10T9UK.d.ts} +1 -1
  167. package/dist/{types-nXo_oQYk.d.ts → types-config-Cq72dArb.d.ts} +740 -782
  168. package/dist/types-run-DG1H5vrX.d.ts +44 -0
  169. package/dist/unplugin/index.d.ts +1 -1
  170. package/dist/unplugin/index.js +1 -1
  171. package/dist/{usage-SO2T77jZ.js → usage-DRReZaxQ.js} +1 -1
  172. package/dist/{usage-B2_Cv8wf.js → usage-DVjr2ZDc.js} +3 -3
  173. package/dist/usage-nVi3-z-j.js +1 -0
  174. package/dist/{verify-CYGImcQk.js → verify-BOB_Jyjx.js} +4 -4
  175. package/dist/vue/index.d.ts +1 -1
  176. package/dist/vue/index.js +2 -2
  177. package/dist/{watch-CiN6WU9k.js → watch-BNxvqCS4.js} +1 -1
  178. package/dist/watch-CGLmIdld.js +1 -0
  179. package/dist/{watch-BecZtEdU.js → watch-CnRyGEtp.js} +2 -2
  180. package/package.json +14 -14
  181. package/skills/permdock-data/references/queries-and-rls.md +1 -0
  182. package/dist/catalog-CgK_L4Qf.js +0 -1
  183. package/dist/collect-CPvCXMQ-.js +0 -1
  184. package/dist/gen-mjtVyqQd.js +0 -1
  185. package/dist/output-files-C5LFnQa4.js +0 -1
  186. package/dist/pull-D7grIUA_.js +0 -1
  187. package/dist/run-Di9cOIeR.js +0 -1
  188. package/dist/supabase-hook-D1gG6Ub-.js +0 -2
  189. package/dist/usage-BWpZJbdf.js +0 -1
  190. package/dist/watch-NAUnUXph.js +0 -1
@@ -4,7 +4,7 @@ import { r as isRecord } from "./compact-C4LFuqbW.js";
4
4
  import { n as PermDockValidationError } from "./validation-error-CgDOA6VS.js";
5
5
  import { t as catalogFingerprint } from "./catalog-fingerprint-DAWZARy6.js";
6
6
  import { n as parseSupabaseManifest } from "./manifest-B-8d2lhG.js";
7
- import { n as runCatalog } from "./catalog-DyC3LKc7.js";
7
+ import { n as runCatalog } from "./catalog-DXSP1we9.js";
8
8
  import { a as describeError, n as CliError } from "./errors-DgLOqc6j.js";
9
9
  import { n as httpRequest, t as authFailure } from "./http-BbX_Ou3_.js";
10
10
  import { s as cliVersion } from "./version-D-jWyJb9.js";
@@ -1,5 +1,5 @@
1
1
  import { D as Policy, W as WireValidity, Xn as AppObligation, b as GrantMeta, f as BreakGlassSpec, kr as Condition, on as SnapshotScope, s as ApprovalRequirement, y as GrantLimit, zn as Grantee } from "./policy-types-93NwI8iI.js";
2
- import { t as JsonSchemaNode } from "./json-schema-SDkWXxhu.js";
2
+ import { t as JsonSchemaNode } from "./json-schema-DAeA-lJa.js";
3
3
  /**
4
4
  * One code grant as `permdock cloud push` sends it. `portable: false` marks a
5
5
  * grant a snapshot cannot evaluate; `closure: true` marks one whose condition
@@ -1,6 +1,6 @@
1
- import { n as authorizeSql } from "./supabase-BI5ZhzLl.js";
1
+ import { n as authorizeSql } from "./supabase-Ctn_Z6xf.js";
2
2
  import { i as configError } from "./errors-DgLOqc6j.js";
3
- import { a as roleNames } from "./grants-BzjbUCdR.js";
3
+ import { a as roleNames } from "./grants-C7bGZFPa.js";
4
4
  import { a as quoteIdent, c as quoteTable, o as quoteLiteral, s as quoteQualified } from "./quote-BKrTBbcH.js";
5
5
  // src/cli/rls/rbac.ts
6
6
  /**
@@ -2,9 +2,9 @@ import { i as describe } from "../describe-lAafaRQQ.js";
2
2
  import { c as requiredPlans } from "../errors-DUJ7wLlE.js";
3
3
  import { t as approvalHeaders } from "../headers-D1oRr-js.js";
4
4
  import { a as broadcastChannelRefresh, c as visibilityRefresh, i as authzChangeRefresh, n as EventSourceRefreshOptions, o as eventSourceRefresh, r as RefreshTrigger, s as focusRefresh, t as AuthzChangeRefresh } from "../refresh-on-C1zIMtJr.js";
5
- import { _ as useTenant, a as useAssignableRoles, c as useFilter, d as usePermDock, f as usePermission, g as useSubject, h as useRoles, i as useAssignablePermissions, l as useGate, m as useRefreshOn, n as Protected, o as useDecision, p as usePermissions, r as useApproval, s as useDescribe, t as useProtectedAction, u as useMemberships } from "../protected-action-D6T3eJyW.js";
5
+ import { _ as useTenant, a as useAssignableRoles, c as useFilter, d as usePermDock, f as usePermission, g as useSubject, h as useRoles, i as useAssignablePermissions, l as useGate, m as useRefreshOn, n as Protected, o as useDecision, p as usePermissions, r as useApproval, s as useDescribe, t as useProtectedAction, u as useMemberships } from "../protected-action-CEzNNtfi.js";
6
6
  import { t as onlineRefresh } from "../refresh-online-vtUfV6dk.js";
7
- import { t as PermDockProvider } from "../provider-CydlnKkS.js";
8
- import { n as PermDockProviderProps, r as ProtectedProps, t as PermDockDefaults } from "../types-3pRMqcvw.js";
9
- import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, i as ApprovalState, l as GateView, m as ProtectedActionView, o as ClientStatus, p as ProtectedActionHandle, r as ApprovalHandle, s as FilterResult, u as PermissionOutcome, v as TenantView, y as ActionResult } from "../store-core-eqG8jijs.js";
7
+ import { t as PermDockProvider } from "../provider-C48LDq0q.js";
8
+ import { n as PermDockProviderProps, r as ProtectedProps, t as PermDockDefaults } from "../types-PS10T9UK.js";
9
+ import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, i as ApprovalState, l as GateView, m as ProtectedActionView, o as ClientStatus, p as ProtectedActionHandle, r as ApprovalHandle, s as FilterResult, u as PermissionOutcome, v as TenantView, y as ActionResult } from "../store-core-DyNo_BwA.js";
10
10
  export { type ActionResult, type ApprovalHandle, type ApprovalState, type AuthzChangeRefresh, type ClientPermDock, type ClientStatus, type EventSourceRefreshOptions, type FilterResult, type GateMode, type GateView, type PermDockDefaults, PermDockProvider, type PermDockProviderProps, type PermissionOutcome, type PermissionSet, type PermissionState, Protected, type ProtectedAction, type ProtectedActionHandle, type ProtectedActionView, type ProtectedProps, type RefreshTrigger, type RolesOptions, type SubjectView, type TenantView, approvalHeaders, authzChangeRefresh, broadcastChannelRefresh, describe, eventSourceRefresh, focusRefresh, onlineRefresh, requiredPlans, useApproval, useAssignablePermissions, useAssignableRoles, useDecision, useDescribe, useFilter, useGate, useMemberships, usePermDock, usePermission, usePermissions, useProtectedAction, useRefreshOn, useRoles, useSubject, useTenant, visibilityRefresh };
@@ -2,8 +2,8 @@
2
2
  import { n as describe } from "../describe-B7EosIKA.js";
3
3
  import { r as requiredPlans } from "../problem-details-EJHcvYCz.js";
4
4
  import { r as approvalHeaders } from "../protected-action-DiXulRVj.js";
5
- import { a as eventSourceRefresh, i as broadcastChannelRefresh, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-C8x39AHa.js";
6
- import { _ as useTenant, a as useAssignableRoles, c as useFilter, d as usePermDock, f as usePermission, g as useSubject, h as useRoles, i as useAssignablePermissions, l as useGate, m as useRefreshOn, n as Protected, o as useDecision, p as usePermissions, r as useApproval, s as useDescribe, t as useProtectedAction, u as useMemberships } from "../protected-action-BMb0ftEu.js";
5
+ import { a as eventSourceRefresh, i as broadcastChannelRefresh, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-BtHrfJUU.js";
6
+ import { _ as useTenant, a as useAssignableRoles, c as useFilter, d as usePermDock, f as usePermission, g as useSubject, h as useRoles, i as useAssignablePermissions, l as useGate, m as useRefreshOn, n as Protected, o as useDecision, p as usePermissions, r as useApproval, s as useDescribe, t as useProtectedAction, u as useMemberships } from "../protected-action-Dco5O_Kc.js";
7
7
  import { t as onlineRefresh } from "../refresh-online-CYGZNo6V.js";
8
- import { t as PermDockProvider } from "../provider-ClD4rfgT.js";
8
+ import { t as PermDockProvider } from "../provider-BYcoTKuS.js";
9
9
  export { PermDockProvider, Protected, approvalHeaders, authzChangeRefresh, broadcastChannelRefresh, describe, eventSourceRefresh, focusRefresh, onlineRefresh, requiredPlans, useApproval, useAssignablePermissions, useAssignableRoles, useDecision, useDescribe, useFilter, useGate, useMemberships, usePermDock, usePermission, usePermissions, useProtectedAction, useRefreshOn, useRoles, useSubject, useTenant, visibilityRefresh };
@@ -2,9 +2,9 @@ import { i as describe } from "../describe-lAafaRQQ.js";
2
2
  import { c as requiredPlans } from "../errors-DUJ7wLlE.js";
3
3
  import { t as approvalHeaders } from "../headers-D1oRr-js.js";
4
4
  import { a as broadcastChannelRefresh, c as visibilityRefresh, i as authzChangeRefresh, n as EventSourceRefreshOptions, o as eventSourceRefresh, r as RefreshTrigger, s as focusRefresh, t as AuthzChangeRefresh } from "../refresh-on-C1zIMtJr.js";
5
- import { _ as useTenant, a as useAssignableRoles, c as useFilter, d as usePermDock, f as usePermission, g as useSubject, h as useRoles, i as useAssignablePermissions, l as useGate, m as useRefreshOn, n as Protected, o as useDecision, p as usePermissions, r as useApproval, s as useDescribe, t as useProtectedAction, u as useMemberships } from "../protected-action-D6T3eJyW.js";
5
+ import { _ as useTenant, a as useAssignableRoles, c as useFilter, d as usePermDock, f as usePermission, g as useSubject, h as useRoles, i as useAssignablePermissions, l as useGate, m as useRefreshOn, n as Protected, o as useDecision, p as usePermissions, r as useApproval, s as useDescribe, t as useProtectedAction, u as useMemberships } from "../protected-action-CEzNNtfi.js";
6
6
  import { t as onlineRefresh } from "../refresh-online-vtUfV6dk.js";
7
- import { t as PermDockProvider } from "../lazy-provider-CydlnKkS.js";
8
- import { n as PermDockProviderProps, r as ProtectedProps, t as PermDockDefaults } from "../types-3pRMqcvw.js";
9
- import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, i as ApprovalState, l as GateView, m as ProtectedActionView, o as ClientStatus, p as ProtectedActionHandle, r as ApprovalHandle, s as FilterResult, u as PermissionOutcome, v as TenantView, y as ActionResult } from "../store-core-eqG8jijs.js";
7
+ import { t as PermDockProvider } from "../lazy-provider-C48LDq0q.js";
8
+ import { n as PermDockProviderProps, r as ProtectedProps, t as PermDockDefaults } from "../types-PS10T9UK.js";
9
+ import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, i as ApprovalState, l as GateView, m as ProtectedActionView, o as ClientStatus, p as ProtectedActionHandle, r as ApprovalHandle, s as FilterResult, u as PermissionOutcome, v as TenantView, y as ActionResult } from "../store-core-DyNo_BwA.js";
10
10
  export { type ActionResult, type ApprovalHandle, type ApprovalState, type AuthzChangeRefresh, type ClientPermDock, type ClientStatus, type EventSourceRefreshOptions, type FilterResult, type GateMode, type GateView, type PermDockDefaults, PermDockProvider, type PermDockProviderProps, type PermissionOutcome, type PermissionSet, type PermissionState, Protected, type ProtectedAction, type ProtectedActionHandle, type ProtectedActionView, type ProtectedProps, type RefreshTrigger, type RolesOptions, type SubjectView, type TenantView, approvalHeaders, authzChangeRefresh, broadcastChannelRefresh, describe, eventSourceRefresh, focusRefresh, onlineRefresh, requiredPlans, useApproval, useAssignablePermissions, useAssignableRoles, useDecision, useDescribe, useFilter, useGate, useMemberships, usePermDock, usePermission, usePermissions, useProtectedAction, useRefreshOn, useRoles, useSubject, useTenant, visibilityRefresh };
@@ -2,8 +2,8 @@
2
2
  import { n as describe } from "../describe-B7EosIKA.js";
3
3
  import { r as requiredPlans } from "../problem-details-EJHcvYCz.js";
4
4
  import { r as approvalHeaders } from "../protected-action-DiXulRVj.js";
5
- import { a as eventSourceRefresh, i as broadcastChannelRefresh, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-C8x39AHa.js";
6
- import { _ as useTenant, a as useAssignableRoles, c as useFilter, d as usePermDock, f as usePermission, g as useSubject, h as useRoles, i as useAssignablePermissions, l as useGate, m as useRefreshOn, n as Protected, o as useDecision, p as usePermissions, r as useApproval, s as useDescribe, t as useProtectedAction, u as useMemberships } from "../protected-action-BMb0ftEu.js";
5
+ import { a as eventSourceRefresh, i as broadcastChannelRefresh, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-BtHrfJUU.js";
6
+ import { _ as useTenant, a as useAssignableRoles, c as useFilter, d as usePermDock, f as usePermission, g as useSubject, h as useRoles, i as useAssignablePermissions, l as useGate, m as useRefreshOn, n as Protected, o as useDecision, p as usePermissions, r as useApproval, s as useDescribe, t as useProtectedAction, u as useMemberships } from "../protected-action-Dco5O_Kc.js";
7
7
  import { t as onlineRefresh } from "../refresh-online-CYGZNo6V.js";
8
- import { t as PermDockProvider } from "../lazy-provider-DG5rMeqL.js";
8
+ import { t as PermDockProvider } from "../lazy-provider-CVX534Kk.js";
9
9
  export { PermDockProvider, Protected, approvalHeaders, authzChangeRefresh, broadcastChannelRefresh, describe, eventSourceRefresh, focusRefresh, onlineRefresh, requiredPlans, useApproval, useAssignablePermissions, useAssignableRoles, useDecision, useDescribe, useFilter, useGate, useMemberships, usePermDock, usePermission, usePermissions, useProtectedAction, useRefreshOn, useRoles, useSubject, useTenant, visibilityRefresh };
@@ -1,2 +1,2 @@
1
- import { t as PermDockProvider } from "../lazy-provider-CydlnKkS.js";
1
+ import { t as PermDockProvider } from "../lazy-provider-C48LDq0q.js";
2
2
  export { PermDockProvider };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export { t as PermDockProvider } from "../lazy-provider-DG5rMeqL.js";
2
+ export { t as PermDockProvider } from "../lazy-provider-CVX534Kk.js";
@@ -1,2 +1,2 @@
1
- import { t as PermDockProvider } from "../provider-CydlnKkS.js";
1
+ import { t as PermDockProvider } from "../provider-C48LDq0q.js";
2
2
  export { PermDockProvider };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export { t as PermDockProvider } from "../provider-ClD4rfgT.js";
2
+ export { t as PermDockProvider } from "../provider-BYcoTKuS.js";
@@ -2,14 +2,14 @@ import { i as describe } from "../describe-lAafaRQQ.js";
2
2
  import { t as approvalHeaders } from "../headers-D1oRr-js.js";
3
3
  import { c as requiredPlans } from "../errors-DUJ7wLlE.js";
4
4
  import { i as authzChangeRefresh, n as EventSourceRefreshOptions, o as eventSourceRefresh, r as RefreshTrigger, t as AuthzChangeRefresh } from "../refresh-on-C1zIMtJr.js";
5
- import { _ as useTenant, a as useAssignableRoles, c as useFilter, d as usePermDock, f as usePermission, g as useSubject, h as useRoles, i as useAssignablePermissions, l as useGate, n as Protected, p as usePermissions, r as useApproval, s as useDescribe, t as useProtectedAction, u as useMemberships } from "../protected-action-D6T3eJyW.js";
6
- import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, i as ApprovalState, l as GateView, m as ProtectedActionView, o as ClientStatus, p as ProtectedActionHandle, r as ApprovalHandle, s as FilterResult, t as ClientStore, v as TenantView, y as ActionResult } from "../store-core-eqG8jijs.js";
7
- import { r as ProtectedProps, t as PermDockDefaults } from "../types-3pRMqcvw.js";
5
+ import { _ as useTenant, a as useAssignableRoles, c as useFilter, d as usePermDock, f as usePermission, g as useSubject, h as useRoles, i as useAssignablePermissions, l as useGate, n as Protected, p as usePermissions, r as useApproval, s as useDescribe, t as useProtectedAction, u as useMemberships } from "../protected-action-CEzNNtfi.js";
6
+ import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, i as ApprovalState, l as GateView, m as ProtectedActionView, o as ClientStatus, p as ProtectedActionHandle, r as ApprovalHandle, s as FilterResult, t as ClientStore, v as TenantView, y as ActionResult } from "../store-core-DyNo_BwA.js";
7
+ import { r as ProtectedProps, t as PermDockDefaults } from "../types-PS10T9UK.js";
8
8
  import { t as parseLocalSnapshotManifest } from "../parse-local-manifest-BGLWVchi.js";
9
9
  import { w as Permission } from "../vocabulary-FYgI_NoI.js";
10
10
  import { $t as LocalSnapshotManifest, Qt as LocalRowValue, Xt as LocalMembershipRows, Zt as LocalRowColumn, en as LocalSnapshotRows, gr as CustomRole, qt as Instant, tn as Snapshot, ut as SnapshotSource, xr as Membership } from "../policy-types-93NwI8iI.js";
11
11
  import { n as RealtimeRefreshClient, t as RealtimeRefreshChannel } from "../client-V95IvZsF.js";
12
- import { a as SubscribeOnline, i as SubscribeForeground, n as ReactNativePermDockProviderProps, r as SnapshotStorage, t as NativeRevalidate } from "../types-C7QtRn3n.js";
12
+ import { a as SubscribeOnline, i as SubscribeForeground, n as ReactNativePermDockProviderProps, r as SnapshotStorage, t as NativeRevalidate } from "../types-4wjWMSFM.js";
13
13
  import { ReactElement } from "react";
14
14
  /**
15
15
  * `true` once the provider has a snapshot to answer from: storage was read or a
@@ -2,8 +2,8 @@
2
2
  import { n as describe } from "../describe-B7EosIKA.js";
3
3
  import { r as requiredPlans } from "../problem-details-EJHcvYCz.js";
4
4
  import { r as approvalHeaders } from "../protected-action-DiXulRVj.js";
5
- import { a as eventSourceRefresh, c as isJws, n as storeOf, r as authzChangeRefresh, t as adapterStore } from "../store-options-C8x39AHa.js";
6
- import { _ as useTenant, a as useAssignableRoles, c as useFilter, d as usePermDock, f as usePermission, g as useSubject, h as useRoles, i as useAssignablePermissions, l as useGate, n as Protected, p as usePermissions, r as useApproval, s as useDescribe, t as useProtectedAction, u as useMemberships } from "../protected-action-BMb0ftEu.js";
5
+ import { a as eventSourceRefresh, c as isJws, n as storeOf, r as authzChangeRefresh, t as adapterStore } from "../store-options-BtHrfJUU.js";
6
+ import { _ as useTenant, a as useAssignableRoles, c as useFilter, d as usePermDock, f as usePermission, g as useSubject, h as useRoles, i as useAssignablePermissions, l as useGate, n as Protected, p as usePermissions, r as useApproval, s as useDescribe, t as useProtectedAction, u as useMemberships } from "../protected-action-Dco5O_Kc.js";
7
7
  import { t as parseLocalSnapshotManifest } from "../parse-local-manifest-CfMjZAFi.js";
8
8
  import { a as heldRoleNames, n as parseSnapshot, s as bindConditionRefs } from "../snapshot-DckMnHk8.js";
9
9
  import { r as isRecord, t as compact } from "../compact-C4LFuqbW.js";
@@ -5,9 +5,9 @@ import "./budget-BH81q2cj.js";
5
5
  import "./sources-DnjJPGfb.js";
6
6
  import { i as configError } from "./errors-DgLOqc6j.js";
7
7
  import { t as FIELD_VIEWS } from "./fields-6d1j-q3c.js";
8
- import { C as forUserContext, Z as graphPlan, d as permittedByPermissionHelper, i as tableNames, o as PERMISSION_HELPERS, p as holderSources, s as checkName, w as grantBodies } from "./tables-B-rPhiI1.js";
8
+ import { C as forUserContext, Z as graphPlan, d as permittedByPermissionHelper, i as tableNames, o as PERMISSION_HELPERS, p as holderSources, s as checkName, w as grantBodies } from "./tables-Btlt_Rp-.js";
9
9
  import { D as idTypeOf, O as scopeTypeOf } from "./shared-BdF5DJDQ.js";
10
- import { G as graphHelper, K as graphSqlName, Q as isTeamScope, T as globalRoleRows, X as hasPermittedUsers, Z as inheritedRowsHelper, ct as restrictedHelper, et as memberForHelper, f as holderBody, it as memberOfHelper, ot as permittedForHelper, rt as memberIdsHelper, st as permittedIdsHelper, ut as scopeTable } from "./interactive-only-BZu9rLpa.js";
10
+ import { G as graphHelper, K as graphSqlName, Q as isTeamScope, T as globalRoleRows, X as hasPermittedUsers, Z as inheritedRowsHelper, ct as restrictedHelper, et as memberForHelper, f as holderBody, it as memberOfHelper, ot as permittedForHelper, rt as memberIdsHelper, st as permittedIdsHelper, ut as scopeTable } from "./interactive-only-CQsgMc1E.js";
11
11
  import { a as quoteIdent, i as qualified, o as quoteLiteral, s as quoteQualified } from "./quote-BKrTBbcH.js";
12
12
  // src/cli/rls/permission-holders.ts
13
13
  /**
@@ -366,7 +366,7 @@ function createResolver(given) {
366
366
  if (options.subjects !== void 0 && id !== void 0 && known !== void 0) try {
367
367
  await options.subjects.record(id, known);
368
368
  const record = result?.subject === void 0 ? void 0 : readSubjectRecord(result.subject);
369
- if (record?.active === true && record.id === id && record.authzVersion === known) await options.subjects.seed(record);
369
+ if (record?.active === true && (result?.subjectTenant ?? tenant ?? null) === (tenant ?? null) && record.id === id && record.authzVersion === known) await options.subjects.seed(record);
370
370
  } catch {}
371
371
  const { permdock } = await buildInstance({
372
372
  policy: options.policy,
@@ -2,15 +2,15 @@ import "./sources-DnjJPGfb.js";
2
2
  import { a as describeError, f as usageResult, o as exitCodeOfError } from "./errors-DgLOqc6j.js";
3
3
  import { i as requirePeer, n as packageManagerOf, t as addLine } from "./peer-D77JpXe-.js";
4
4
  import { n as pgConnector, t as connectPgPool } from "./pg-CA651850.js";
5
- import { f as isSupabaseSchemas, m as schemasRefusal } from "./hook-sql-QnIzAo7X.js";
6
- import { a as nonEmptyOr } from "./output-DyU0C-y4.js";
7
- import { n as describeExplain, t as runRlsGenerate } from "./generate-Bajg2iM2.js";
8
- import { a as COLUMNS_SQL, o as INDEX_COLUMNS_SQL, u as readTableIndexFacts } from "./compile-R4ZIFR-P.js";
5
+ import { f as isSupabaseSchemas, m as schemasRefusal } from "./hook-sql-C0aUoiOH.js";
6
+ import { a as nonEmptyOr } from "./output-Pne7BTXn.js";
7
+ import { n as describeExplain, t as runRlsGenerate } from "./generate-BCUVV4vB.js";
8
+ import { a as COLUMNS_SQL, o as INDEX_COLUMNS_SQL, u as readTableIndexFacts } from "./compile-mfTqcMJ5.js";
9
9
  import { r as escapeSqlIdent } from "./sql-T4GaBh9X.js";
10
10
  import { t as beforeFirst } from "./text-D704xHVl.js";
11
- import { a as verifyResult, c as callsHelper, i as verifyIgnores, l as helperCallKeys, n as runRlsVerify, o as HELPER_TABLES, r as rlsFinding } from "./verify-CYGImcQk.js";
11
+ import { a as verifyResult, c as callsHelper, i as verifyIgnores, l as helperCallKeys, n as runRlsVerify, o as HELPER_TABLES, r as rlsFinding } from "./verify-BOB_Jyjx.js";
12
12
  import { c as ACTOR_MAY_WRITE, p as readOnlyActorKinds } from "./fields-6d1j-q3c.js";
13
- import { r as parseRbacAuthorize } from "./rbac-B-49toAp.js";
13
+ import { r as parseRbacAuthorize } from "./rbac-FlJv7Ba9.js";
14
14
  import { delimiter, join } from "node:path";
15
15
  import { spawn } from "node:child_process";
16
16
  // src/cli/rls/grant-calls.ts
@@ -770,7 +770,7 @@ async function migrate(input) {
770
770
  output: generated.output
771
771
  };
772
772
  await requirePeer(() => import("pgsql-parser"), "pgsql-parser", "permdock rls migrate", input.cwd, PGSQL_PARSER_MAJOR);
773
- const { migrateTarget, runRlsMigrate } = await import("./migrate-CmTMk7rd.js");
773
+ const { migrateTarget, runRlsMigrate } = await import("./migrate-BwXtXUtE.js");
774
774
  return runRlsMigrate({
775
775
  cwd: input.cwd,
776
776
  sql: input.sql,
@@ -192,7 +192,7 @@ async function rlsInput(ctx, verb, shape, options) {
192
192
  };
193
193
  }
194
194
  async function runRls(input) {
195
- return (await import("./rls-DvvFUuM1.js")).runRls(input);
195
+ return (await import("./rls-BL90Ec30.js")).runRls(input);
196
196
  }
197
197
  ({
198
198
  ...shapeFlags,
@@ -1,9 +1,9 @@
1
1
  import { n as isSeeds } from "./seeds-BDTG7xl-.js";
2
2
  import { i as dateAt } from "./time-r0CKBm57.js";
3
3
  import { n as CliError } from "./errors-DgLOqc6j.js";
4
- import { m as seedsMigration, p as seedDeltaNote } from "./output-files-DNid6TBl.js";
4
+ import { m as seedsMigration, p as seedDeltaNote } from "./output-files-D5D-8-4l.js";
5
5
  import { a as fixturesPresent, i as defaultsSeedSql, o as fixturesSeedSql, r as FIXTURES_PATH, t as DEFAULTS_MARKER } from "./seed-sql-CjF7u0aX.js";
6
- import { t as runRlsGenerate } from "./generate-Bajg2iM2.js";
6
+ import { t as runRlsGenerate } from "./generate-BCUVV4vB.js";
7
7
  import { a as quietIo, r as noted } from "./plugin-MQVfUBUS.js";
8
8
  // src/cli/generate/plugins/rls-options.ts
9
9
  function seedMode(seeds) {
@@ -1,4 +1,4 @@
1
- import { b as SupabaseSchemas, u as RlsConfig, v as RlsTarget } from "./types-nXo_oQYk.js";
1
+ import { c as RlsConfig, g as RlsTarget, o as SupabaseSchemas } from "./types-config-Cq72dArb.js";
2
2
  /**
3
3
  * `rls.seeds` as a mode, or `false` to skip the rows, or where they are
4
4
  * written.
@@ -2,10 +2,10 @@ import { i as dateAt } from "./time-r0CKBm57.js";
2
2
  import { a as resolveCwd, i as readConfig, o as withPluginOutputs } from "./config-iyy90IOU.js";
3
3
  import { t as beforeFirst } from "./text-D704xHVl.js";
4
4
  import { a as describeError, n as CliError, r as cliFailure, s as failureOf, u as kindOfCode } from "./errors-DgLOqc6j.js";
5
- import { a as suggestion, i as parseLeaf, o as GLOBAL_FLAGS, r as parseFlags } from "./args-0EWFk-4S.js";
6
- import { c as confirmationRequired, d as quote, f as replayArgv, i as githubAnnotations, l as consentDigest, n as errorDocument, o as resultDocument, s as sarifLog, t as dataOf, u as consentReasons } from "./output-DyU0C-y4.js";
5
+ import { a as suggestion, i as parseLeaf, o as GLOBAL_FLAGS, r as parseFlags } from "./args-Bc0HLiD4.js";
6
+ import { c as confirmationRequired, d as quote, f as replayArgv, i as githubAnnotations, l as consentDigest, n as errorDocument, o as resultDocument, s as sarifLog, t as dataOf, u as consentReasons } from "./output-Pne7BTXn.js";
7
7
  import { r as progressReporter, t as redact } from "./credentials-6ZWbJ-Re.js";
8
- import { a as resolve, i as leaves, n as ROOT, r as SECTIONS, t as DOCS_BASE } from "./manifest-D_T55LWM.js";
8
+ import { a as resolve, i as leaves, n as ROOT, r as SECTIONS, t as DOCS_BASE } from "./manifest-C7dWk0k5.js";
9
9
  import { t as createStyle } from "./style-CQDaLJtP.js";
10
10
  import { s as cliVersion } from "./version-D-jWyJb9.js";
11
11
  import { n as isPermDockPlugin } from "./plugin-MQVfUBUS.js";
@@ -0,0 +1 @@
1
+ export { t as run } from "./run-BFDAiNuS.js";
@@ -1,9 +1,9 @@
1
- import { a as saasPlans, i as saasPermissions, o as saasRoles } from "./permissions-ijDw4sO1.js";
1
+ import { a as saasPlans, i as saasPermissions, o as saasRoles } from "./permissions-Bj3DRIEi.js";
2
2
  import { a as deny, n as role, r as allow } from "./role-builder-DhsGEVq-.js";
3
3
  import { l as relation, n as anyone } from "./grantee-BPUG6f0r.js";
4
4
  import { r as definePolicy } from "./policy-DFD2J5o_.js";
5
5
  import { i as principal } from "./refs-Cix9Zjis.js";
6
- import { E as memoryCustomRoleSource, b as memoryRelationSource } from "./src-D6_T4zd7.js";
6
+ import { E as memoryCustomRoleSource, b as memoryRelationSource } from "./src-BAYcigFU.js";
7
7
  import { s as quoteSqlLiteral } from "./sql-T4GaBh9X.js";
8
8
  import { r as isRecord } from "./compact-C4LFuqbW.js";
9
9
  import { h as secondsAt } from "./time-r0CKBm57.js";
@@ -16,7 +16,7 @@ const scan = defineLeaf({
16
16
  }
17
17
  },
18
18
  async run(ctx, { flags }) {
19
- const { runAdoptionScan } = await import("./adoption-scan-Fc-Wmidd.js");
19
+ const { runAdoptionScan } = await import("./adoption-scan-BHQm3Li7.js");
20
20
  return runAdoptionScan({
21
21
  cwd: ctx.cwd,
22
22
  srcPath: flags.src.length > 0 ? flags.src : ctx.config.collect?.srcPath ?? ["src"],
@@ -1,7 +1,7 @@
1
- import { t as require__2020 } from "./2020-bJfT8aIA.js";
1
+ import { t as require__2020 } from "./2020-DBXhfpuK.js";
2
2
  import { r as isRecord } from "./compact-C4LFuqbW.js";
3
3
  import { t as DRAFT_PINS } from "./pins-CXXkVEiD.js";
4
- import { a as nonEmptyOr } from "./output-DyU0C-y4.js";
4
+ import { a as nonEmptyOr } from "./output-Pne7BTXn.js";
5
5
  import { l as packageRoot } from "./version-D-jWyJb9.js";
6
6
  import { readFileSync } from "node:fs";
7
7
  import { join } from "node:path";
@@ -38,7 +38,7 @@ const snapshotSize = defineLeaf({
38
38
  },
39
39
  async run(ctx, { flags }) {
40
40
  try {
41
- const { runSnapshotSize, SNAPSHOT_BUDGET_BYTES } = await import("./snapshot-size-DU7CvpMt.js");
41
+ const { runSnapshotSize, SNAPSHOT_BUDGET_BYTES } = await import("./snapshot-size-B_chu2c1.js");
42
42
  const path = given(flags.policy) ?? ctx.config.policy;
43
43
  return runSnapshotSize({
44
44
  policy: await requirePolicy(ctx.cwd, path, "set policy in permdock.config.ts or pass --policy"),
@@ -1,6 +1,6 @@
1
1
  import { t as byCodePoint } from "./compare-dfHDj8kT.js";
2
- import { t as didYouMean } from "./args-0EWFk-4S.js";
3
- import { a as nonEmptyOr } from "./output-DyU0C-y4.js";
2
+ import { t as didYouMean } from "./args-Bc0HLiD4.js";
3
+ import { a as nonEmptyOr } from "./output-Pne7BTXn.js";
4
4
  import { i as readJsonFile, s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
5
5
  import { l as packageRoot } from "./version-D-jWyJb9.js";
6
6
  import { cpSync, existsSync, lstatSync, readFileSync, readdirSync, readlinkSync, realpathSync } from "node:fs";
@@ -1,7 +1,7 @@
1
1
  import { t as defineLeaf } from "./command-9GAzSI7E.js";
2
2
  import { t as checkFlag } from "./flags-C0e-BzGW.js";
3
- import { r as pick, t as CANCELLED } from "./prompt-CSXHcJxy.js";
4
- import { n as detectedAgents, r as runSkills, t as SKILL_AGENTS } from "./skills-BY84uRix.js";
3
+ import { r as pick, t as CANCELLED } from "./prompt-CPlJn_4-.js";
4
+ import { n as detectedAgents, r as runSkills, t as SKILL_AGENTS } from "./skills-B8nt-KuB.js";
5
5
  // src/cli/commands/skills.ts
6
6
  const forFlag = { for: {
7
7
  type: "string",
@@ -1 +1 @@
1
- export { t as SNAPSHOT_BUDGET_BYTES, r as runSnapshotSize } from "./snapshot-size-D-pCR8x0.js";
1
+ export { t as SNAPSHOT_BUDGET_BYTES, r as runSnapshotSize } from "./snapshot-size-CHig-Nq_.js";
@@ -1,5 +1,5 @@
1
1
  import { d as scopeList } from "./scopes-B-KX9EI8.js";
2
- import { d as snapshotFor } from "./src-D6_T4zd7.js";
2
+ import { d as snapshotFor } from "./src-BAYcigFU.js";
3
3
  import { gzipSync } from "node:zlib";
4
4
  // src/cli/snapshot-size.ts
5
5
  /** The default budget of the PD112 doctor rule, in bytes of JSON. */
@@ -2,7 +2,7 @@ import { i as describe, r as DescribeOptions, t as DecisionDescription } from ".
2
2
  import { c as requiredPlans } from "../errors-DUJ7wLlE.js";
3
3
  import { t as approvalHeaders } from "../headers-D1oRr-js.js";
4
4
  import { a as broadcastChannelRefresh, c as visibilityRefresh, i as authzChangeRefresh, n as EventSourceRefreshOptions, o as eventSourceRefresh, r as RefreshTrigger, s as focusRefresh, t as AuthzChangeRefresh } from "../refresh-on-C1zIMtJr.js";
5
- import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, h as ProviderOptionsBase, i as ApprovalState, l as GateView, m as ProtectedActionView, o as ClientStatus, r as ApprovalHandle, s as FilterResult, v as TenantView, y as ActionResult } from "../store-core-eqG8jijs.js";
5
+ import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, h as ProviderOptionsBase, i as ApprovalState, l as GateView, m as ProtectedActionView, o as ClientStatus, r as ApprovalHandle, s as FilterResult, v as TenantView, y as ActionResult } from "../store-core-DyNo_BwA.js";
6
6
  import { Jt as ClientBundle, N as PolicyVocabulary, Qn as Decision, Zn as ApprovalRequiredDecision, ir as GrantedDecision, tn as Snapshot, vt as TokenVerifier, xr as Membership } from "../policy-types-93NwI8iI.js";
7
7
  import { d as UncheckedData, s as RowData } from "../permdock-Dz3yzWrp.js";
8
8
  import { r as Role, w as Permission } from "../vocabulary-FYgI_NoI.js";
@@ -18,7 +18,7 @@ type PermDockProviderProps = ProviderOptionsBase & {
18
18
  * while it returns `undefined` (a loading `createResource`); a promise keeps
19
19
  * the store `pending` until it settles.
20
20
  */
21
- readonly snapshot: Snapshot | string | Accessor$1<Snapshot | string | undefined> | PromiseLike<Snapshot | string>;
21
+ readonly snapshot: Snapshot | string | Accessor<Snapshot | string | undefined> | PromiseLike<Snapshot | string>;
22
22
  /** A change switches the active tenant (`refresh({ tenant })`). */
23
23
  readonly tenant?: string;
24
24
  /**
@@ -64,44 +64,44 @@ type ProtectedProps = {
64
64
  * accessors.
65
65
  */
66
66
  type ProtectedActionAccessors<T> = {
67
- readonly gate: Accessor$1<GateView>;
68
- readonly result: Accessor$1<ActionResult<T> | undefined>;
69
- readonly pending: Accessor$1<boolean>;
70
- readonly approval: Accessor$1<ApprovalHandle | undefined>;
67
+ readonly gate: Accessor<GateView>;
68
+ readonly result: Accessor<ActionResult<T> | undefined>;
69
+ readonly pending: Accessor<boolean>;
70
+ readonly approval: Accessor<ApprovalHandle | undefined>;
71
71
  readonly run: (input: unknown) => Promise<ActionResult<T>>;
72
72
  readonly retry: () => Promise<ActionResult<T> | undefined>;
73
73
  };
74
74
  export declare function usePermDock<V extends PolicyVocabulary = PolicyVocabulary>(): ClientPermDock<V>;
75
- export declare function usePermission<D>(permission: Permission | Accessor<Permission>, data?: Accessor<UncheckedData<D>>): Accessor<PermissionState>;
76
- export declare function usePermission<P extends Permission>(permission: P | Accessor<P>, data?: Accessor<RowData<P>>): Accessor<PermissionState>;
75
+ export declare function usePermission<D>(permission: Permission | Accessor$1<Permission>, data?: Accessor$1<UncheckedData<D>>): Accessor$1<PermissionState>;
76
+ export declare function usePermission<P extends Permission>(permission: P | Accessor$1<P>, data?: Accessor$1<RowData<P>>): Accessor$1<PermissionState>;
77
77
  /**
78
78
  * What a permission-gated control renders, as `useGate` in React: `hidden`,
79
79
  * `disabled`, `needsApproval`, `upgrade` and a localised `reason`.
80
80
  */
81
- export declare function useGate<D>(permission: Permission | Accessor<Permission>, data?: Accessor<UncheckedData<D>>, options?: {
81
+ export declare function useGate<D>(permission: Permission | Accessor$1<Permission>, data?: Accessor$1<UncheckedData<D>>, options?: {
82
82
  readonly mode?: GateMode;
83
- }): Accessor<GateView>;
84
- export declare function useGate<P extends Permission>(permission: P | Accessor<P>, data?: Accessor<RowData<P>>, options?: {
83
+ }): Accessor$1<GateView>;
84
+ export declare function useGate<P extends Permission>(permission: P | Accessor$1<P>, data?: Accessor$1<RowData<P>>, options?: {
85
85
  readonly mode?: GateMode;
86
- }): Accessor<GateView>;
87
- export declare function usePermissions(permissions: Accessor<readonly Permission[]>, data?: Accessor<unknown>): Accessor<PermissionSet>;
88
- export declare function useFilter<T>(permission: Permission<string, NoInfer<T>, "instance">, rows: Accessor<readonly T[]>): Accessor<FilterResult<T>>;
89
- export declare function useTenant(): Accessor<TenantView>;
90
- export declare function useMemberships(): Accessor<readonly Membership[]>;
91
- export declare function useRoles(options?: Accessor<RolesOptions>): Accessor<{
86
+ }): Accessor$1<GateView>;
87
+ export declare function usePermissions(permissions: Accessor$1<readonly Permission[]>, data?: Accessor$1<unknown>): Accessor$1<PermissionSet>;
88
+ export declare function useFilter<T>(permission: Permission<string, NoInfer<T>, "instance">, rows: Accessor$1<readonly T[]>): Accessor$1<FilterResult<T>>;
89
+ export declare function useTenant(): Accessor$1<TenantView>;
90
+ export declare function useMemberships(): Accessor$1<readonly Membership[]>;
91
+ export declare function useRoles(options?: Accessor$1<RolesOptions>): Accessor$1<{
92
92
  readonly roles: readonly Role[];
93
93
  }>;
94
- export declare function useAssignableRoles(): Accessor<readonly Role[]>;
94
+ export declare function useAssignableRoles(): Accessor$1<readonly Role[]>;
95
95
  export declare function useAssignablePermissions(options?: {
96
96
  readonly tenant?: string;
97
- } | Accessor<{
97
+ } | Accessor$1<{
98
98
  readonly tenant?: string;
99
- }>): Accessor<{
99
+ }>): Accessor$1<{
100
100
  readonly permissions: readonly Permission[];
101
101
  readonly status: "ready" | "server-only";
102
102
  }>;
103
- export declare function useSubject(): Accessor<SubjectView>;
104
- export declare function useApproval(decision: Accessor<Decision>): Accessor<ApprovalHandle>;
103
+ export declare function useSubject(): Accessor$1<SubjectView>;
104
+ export declare function useApproval(decision: Accessor$1<Decision>): Accessor$1<ApprovalHandle>;
105
105
  /** `describe` with the provider's `messages`; a call's own `messages` win. */
106
106
  export declare function useDescribe(): (decision: Decision, options?: DescribeOptions) => DecisionDescription;
107
107
  /**
@@ -109,10 +109,10 @@ export declare function useDescribe(): (decision: Decision, options?: DescribeOp
109
109
  * in React: accessors for `gate`, `result`, `pending` and `approval`, plus
110
110
  * `run` and `retry`.
111
111
  */
112
- export declare function useProtectedAction<T, D>(action: ProtectedAction<T>, permission: Permission | Accessor<Permission>, data?: Accessor<UncheckedData<D>>, options?: {
112
+ export declare function useProtectedAction<T, D>(action: ProtectedAction<T>, permission: Permission | Accessor$1<Permission>, data?: Accessor$1<UncheckedData<D>>, options?: {
113
113
  readonly mode?: GateMode;
114
114
  }): ProtectedActionAccessors<T>;
115
- export declare function useProtectedAction<T, P extends Permission>(action: ProtectedAction<T>, permission: P | Accessor<P>, data?: Accessor<RowData<P>>, options?: {
115
+ export declare function useProtectedAction<T, P extends Permission>(action: ProtectedAction<T>, permission: P | Accessor$1<P>, data?: Accessor$1<RowData<P>>, options?: {
116
116
  readonly mode?: GateMode;
117
117
  }): ProtectedActionAccessors<T>;
118
118
  /**
@@ -1,10 +1,10 @@
1
1
  import { n as describe } from "../describe-B7EosIKA.js";
2
2
  import { r as requiredPlans } from "../problem-details-EJHcvYCz.js";
3
3
  import { n as actionRunner, r as approvalHeaders, t as actionApproval } from "../protected-action-DiXulRVj.js";
4
- import { a as eventSourceRefresh, i as broadcastChannelRefresh, l as isPromiseLike, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-C8x39AHa.js";
4
+ import { a as eventSourceRefresh, i as broadcastChannelRefresh, l as isPromiseLike, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-BtHrfJUU.js";
5
5
  import { a as gateView, c as protectedView, d as slotContent, f as subjectView, i as filterResult, l as rolesView, n as assignablePermissionsView, o as livePermDock, p as tenantView, r as describeWith, s as permissionSet, t as approvalHandle, u as scopedTenant } from "../views-Dpr1uB16.js";
6
6
  import { n as boundaryFallback, t as boundaryDigest } from "../boundary--5Swp7sN.js";
7
- import { n as switchTenant, t as providerStore } from "../provider-store-atQUfsVO.js";
7
+ import { n as switchTenant, t as providerStore } from "../provider-store-Dq_olUjC.js";
8
8
  import { t as compact } from "../compact-C4LFuqbW.js";
9
9
  import { ErrorBoundary, createComponent, createComputed, createContext, createMemo, createSignal, getOwner, on, onCleanup, useContext } from "solid-js";
10
10
  // src/solid/context.ts
@@ -338,7 +338,7 @@ function entryStages(approval) {
338
338
  function shorter(a, b) {
339
339
  if (a === void 0) return b;
340
340
  if (b === void 0) return a;
341
- return (durationOf(b) ?? Infinity) < (durationOf(a) ?? Infinity) ? b : a;
341
+ return (durationOf(b) ?? 1e400) < (durationOf(a) ?? 1e400) ? b : a;
342
342
  }
343
343
  /**
344
344
  * `code` with every matching entry added as further stages: the result needs
@@ -248,8 +248,10 @@ type ClientStore = {
248
248
  */
249
249
  quick: (permission: Permission) => PermissionOutcome | undefined;
250
250
  /**
251
- * `undefined` once the evaluator has loaded; otherwise the load in flight,
252
- * which a render reads with `use()`.
251
+ * The evaluator load, which a render reads with `use()`. After it settles the
252
+ * same promise comes back, so a replayed render sees the thenable it
253
+ * suspended on; `undefined` when the evaluator was loaded before the store
254
+ * existed.
253
255
  */
254
256
  loading: () => PromiseLike<void> | undefined;
255
257
  requestApproval: (decision: Decision, note?: string) => Promise<void>;
@@ -704,7 +704,7 @@ function createStore(options, evaluator) {
704
704
  let evaluated = evaluator.build() !== void 0;
705
705
  let loadingNow;
706
706
  const loading = () => {
707
- if (evaluated) return;
707
+ if (evaluated) return loadingNow;
708
708
  loadingNow ??= (async () => {
709
709
  try {
710
710
  await evaluator.load();
@@ -1,6 +1,6 @@
1
1
  import { n as actionRunner, t as actionApproval } from "./protected-action-DiXulRVj.js";
2
2
  import { a as gateView, f as subjectView, i as filterResult, l as rolesView, n as assignablePermissionsView, o as livePermDock, p as tenantView, r as describeWith, s as permissionSet, t as approvalHandle } from "./views-Dpr1uB16.js";
3
- import { n as getUi, r as providePermDock, t as getStore } from "./context-DmH-Eyvx.js";
3
+ import { n as getUi, r as providePermDock, t as getStore } from "./context-BdoA9DhS.js";
4
4
  import { derived, readable, toStore, writable } from "svelte/store";
5
5
  // src/svelte/stores.ts
6
6
  function fromStore(store, compute) {
@@ -1,9 +1,9 @@
1
- import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, l as GateView, r as ApprovalHandle, s as FilterResult, v as TenantView } from "./store-core-eqG8jijs.js";
1
+ import { _ as SubjectView, a as ClientPermDock, b as ProtectedAction, c as GateMode, d as PermissionSet, f as PermissionState, g as RolesOptions, l as GateView, r as ApprovalHandle, s as FilterResult, v as TenantView } from "./store-core-DyNo_BwA.js";
2
2
  import { N as PolicyVocabulary, Qn as Decision, xr as Membership } from "./policy-types-93NwI8iI.js";
3
3
  import { r as DescribeOptions, t as DecisionDescription } from "./describe-lAafaRQQ.js";
4
4
  import { d as UncheckedData, s as RowData } from "./permdock-Dz3yzWrp.js";
5
5
  import { r as Role, w as Permission } from "./vocabulary-FYgI_NoI.js";
6
- import { n as ProtectedActionReadable, r as SveltePermDockOptions } from "./types-CVCRFYY_.js";
6
+ import { n as ProtectedActionReadable, r as SveltePermDockOptions } from "./types-CQF-oYSz.js";
7
7
  import { Readable } from "svelte/store";
8
8
  declare function setPermDock(options: SveltePermDockOptions): ClientPermDock;
9
9
  declare function getPermDock<V extends PolicyVocabulary = PolicyVocabulary>(): ClientPermDock<V>;
@@ -167,6 +167,12 @@ type SupabaseAccessResult = {
167
167
  * `authzVersion`, so the instance reads no `subject_for`.
168
168
  */
169
169
  readonly subject?: unknown;
170
+ /**
171
+ * The tenant `subject` is restricted to; `null` or absent when it covers
172
+ * every tenant. A subject for another tenant than the one checked is not
173
+ * seeded.
174
+ */
175
+ readonly subjectTenant?: string | null;
170
176
  };
171
177
  type ResolverQuery = {
172
178
  readonly tenant?: string | null;
@@ -1,9 +1,9 @@
1
1
  import { r as readSubjectRecord } from "../version-cache-BXkl7-Fz.js";
2
2
  import { n as AUTHZ_TOPIC, r as authzUserTopic, t as AUTHZ_EVENT } from "../authz-topic-D8x24Jv-.js";
3
3
  import { n as supabaseMembershipsBudget, r as supabaseTenantClaim } from "../budget-BH81q2cj.js";
4
- import { a as tableApprovalPolicySource, c as exchangeCapability, i as tableApprovalDelegationSource, n as authorizeSql, o as supabaseApprovalStore, r as supabaseRls, s as supabaseClaims, t as definePermDock } from "../supabase-BI5ZhzLl.js";
4
+ import { a as tableApprovalPolicySource, c as exchangeCapability, i as tableApprovalDelegationSource, n as authorizeSql, o as supabaseApprovalStore, r as supabaseRls, s as supabaseClaims, t as definePermDock } from "../supabase-Ctn_Z6xf.js";
5
5
  import { c as tableMembershipSource, i as authzVersion, o as junctionMembershipSource, s as supabasePostgresQuery, t as AUTHZ_VERSION_TABLE } from "../sources-DnjJPGfb.js";
6
- import { r as subjectFromSupabaseClient, s as postgrestSources } from "../resolver-kdZ4HrpC.js";
6
+ import { r as subjectFromSupabaseClient, s as postgrestSources } from "../resolver-4qxIIHcC.js";
7
7
  import { a as delegationOf, i as actorOf, o as subjectFromSupabase, s as subjectFromSupabaseSession } from "../definition-options-9o8Hdww3.js";
8
8
  import { n as parseSupabaseManifest, t as hasTokenHook } from "../manifest-B-8d2lhG.js";
9
9
  export { AUTHZ_EVENT, AUTHZ_TOPIC, AUTHZ_VERSION_TABLE, actorOf, authorizeSql, authzUserTopic, authzVersion, definePermDock, delegationOf, exchangeCapability, hasTokenHook, junctionMembershipSource, parseSupabaseManifest, postgrestSources, readSubjectRecord, subjectFromSupabase, subjectFromSupabaseClient, subjectFromSupabaseSession, supabaseApprovalStore, supabaseClaims, supabaseMembershipsBudget, supabasePostgresQuery, supabaseRls, supabaseTenantClaim, tableApprovalDelegationSource, tableApprovalPolicySource, tableMembershipSource };
@@ -7,7 +7,7 @@ import { t as CUSTOM_ROLES_VERSION_CLAIM } from "./budget-BH81q2cj.js";
7
7
  import { s as ApprovalError } from "./types-DFZKovb3.js";
8
8
  import { c as decodeApprovalCursor, l as encodeApprovalCursor, s as approvalPageSize, t as applyApprovalVerdict } from "./store-AH8bmaxW.js";
9
9
  import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
10
- import { a as withMembers, i as ownedCaches, n as getPermissions, o as callRpc, r as subjectFromSupabaseClient, s as postgrestSources, t as createResolver } from "./resolver-kdZ4HrpC.js";
10
+ import { a as withMembers, i as ownedCaches, n as getPermissions, o as callRpc, r as subjectFromSupabaseClient, s as postgrestSources, t as createResolver } from "./resolver-4qxIIHcC.js";
11
11
  import { d as keptKeys, l as roleColumn } from "./sources-DnjJPGfb.js";
12
12
  import { a as quoteQualifiedTable, c as quoteSqlTable, d as sqlTextArray, i as qualifySqlTable, o as quoteSqlIdent, s as quoteSqlLiteral } from "./sql-T4GaBh9X.js";
13
13
  import { o as subjectFromSupabase, t as SUPABASE_OPTIONS } from "./definition-options-9o8Hdww3.js";
@@ -15,7 +15,7 @@ const inspect = defineLeaf({
15
15
  },
16
16
  async run(ctx, { flags }) {
17
17
  const out = flags.out === "" ? true : flags.out === "-" ? void 0 : flags.out;
18
- const { runSupabase } = await import("./supabase-hook-D1gG6Ub-.js");
18
+ const { runSupabase } = await import("./supabase-hook-CjChM-eX.js");
19
19
  return runSupabase({
20
20
  cwd: ctx.cwd,
21
21
  config: ctx.config,
@@ -1,6 +1,6 @@
1
1
  import "./sources-DnjJPGfb.js";
2
2
  import { a as describeError } from "./errors-DgLOqc6j.js";
3
- import { n as hookUri } from "./rbac-B-49toAp.js";
3
+ import { n as hookUri } from "./rbac-FlJv7Ba9.js";
4
4
  import { existsSync, readFileSync } from "node:fs";
5
5
  import { join, posix } from "node:path";
6
6
  // ../../node_modules/.pnpm/smol-toml@1.9.1/node_modules/smol-toml/dist/error.js
@@ -0,0 +1,2 @@
1
+ import "./hook-sql-C0aUoiOH.js";
2
+ export { r as runSupabase } from "./supabase-hook-CmW2MLWa.js";