permdock 0.38.0 → 0.38.2

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 (185) hide show
  1. package/dist/a2a/index.js +2 -2
  2. package/dist/{adoption-scan-D-uM3y5a.js → adoption-scan-BSVL4wIW.js} +1 -1
  3. package/dist/agent/index.js +1 -1
  4. package/dist/ai-sdk/index.js +3 -3
  5. package/dist/app/index.js +1 -1
  6. package/dist/{arazzo-CyENGJ-M.js → arazzo-C04bMN6Y.js} +2 -2
  7. package/dist/{arazzo-BdWGzdqv.js → arazzo-DbuxB5Gw.js} +1 -1
  8. package/dist/astro/index.js +1 -1
  9. package/dist/authzen/index.js +1 -1
  10. package/dist/better-supabase/index.js +5 -5
  11. package/dist/{bind-BNYcJ1D9.js → bind-CFwfgfp2.js} +2 -2
  12. package/dist/{bsb-access-tags-C4iPlzjs.js → bsb-access-tags-BfKzb3sw.js} +1 -1
  13. package/dist/{budgets-DFnMBpKz.js → budgets-BGWdTAHq.js} +2 -2
  14. package/dist/{build-instance-BGpABVbM.js → build-instance-BX5yWZDz.js} +1 -1
  15. package/dist/{bundle-size-Pgm7BB5m.js → bundle-size-CeLuyWm0.js} +2 -2
  16. package/dist/bundle-size-DRu3x2lW.js +1 -0
  17. package/dist/{casbin-DdJndgnu.js → casbin-Bp8ajVRK.js} +1 -1
  18. package/dist/{casbin-ILRPO6t9.js → casbin-DAHhk83J.js} +1 -1
  19. package/dist/catalog/index.js +2 -2
  20. package/dist/chat/index.js +1 -1
  21. package/dist/claude-agent/index.js +2 -2
  22. package/dist/cli/bin.js +1 -1
  23. package/dist/cli/generate/watch-worker.js +1 -1
  24. package/dist/cli/index.js +2 -2
  25. package/dist/cli/plugins/app.js +1 -1
  26. package/dist/cli/plugins/openapi.js +1 -1
  27. package/dist/cli/plugins/powersync.js +1 -1
  28. package/dist/cli/plugins/rls.js +1 -1
  29. package/dist/cli/plugins/schemas.js +1 -1
  30. package/dist/cli/plugins/supabase-hook.js +1 -1
  31. package/dist/cli/plugins/supabase.js +2 -2
  32. package/dist/cli/plugins/ui.js +1 -1
  33. package/dist/{cloud-C8bHMKjI.js → cloud-DnsG5KF6.js} +2 -2
  34. package/dist/{codemod-D02eYuzA.js → codemod-BpFi3dGX.js} +4 -4
  35. package/dist/{codemod-D8zh3IYV.js → codemod-DdSdwmq4.js} +1 -1
  36. package/dist/{compile-7tf8hHlu.js → compile-5QQLSNRY.js} +4 -4
  37. package/dist/{completion-BZShluF7.js → completion-j34Zp_y7.js} +1 -1
  38. package/dist/{config-ClypJwe2.js → config-DoywTd1z.js} +1 -1
  39. package/dist/{config-report-Kb-mYv9F.js → config-report-BO_DLUaK.js} +1 -1
  40. package/dist/{context-Nr3nknZX.js → context-CzHYMZr9.js} +1 -1
  41. package/dist/{context-BQQzAw83.js → context-Dew6yQqT.js} +1 -1
  42. package/dist/convex/index.js +2 -2
  43. package/dist/{core-BFR-V5CL.js → core-BEA7805j.js} +3 -3
  44. package/dist/{create-Dapy8DIK.js → create-DRiggRWE.js} +3 -3
  45. package/dist/{create-BICq9l-p.js → create-fNkkpOy5.js} +2 -2
  46. package/dist/{custom-role-rebuild-CRz6Ip6J.js → custom-role-rebuild-BwM6hBqt.js} +1 -1
  47. package/dist/{define-permdock-B0q7Rg9b.js → define-permdock-CGI9pgqL.js} +2 -2
  48. package/dist/{diff-Sxca4_5q.js → diff-CcbTG1G4.js} +2 -2
  49. package/dist/{diff-BebUlh4Z.js → diff-p217YnI5.js} +1 -1
  50. package/dist/{doctor-XSdrG1SZ.js → doctor-cPl8X1Ef.js} +20 -20
  51. package/dist/{doctor-DAx9dIEX.js → doctor-jVVYFNCd.js} +2 -2
  52. package/dist/elysia/index.js +1 -1
  53. package/dist/evaluator-C4RrXo4y.js +2 -0
  54. package/dist/{evaluator-eager-BLNVbEAC.js → evaluator-eager-B_4KdPgg.js} +1 -1
  55. package/dist/eve/index.js +2 -2
  56. package/dist/{execute-DgCH7kEE.js → execute-hsLYXuwL.js} +4 -4
  57. package/dist/{explain-CgKGadRa.js → explain-BHSgFpfd.js} +2 -2
  58. package/dist/{explain-BrvY9cXX.js → explain-DVv1Wbay.js} +1 -1
  59. package/dist/express/index.js +1 -1
  60. package/dist/fastify/index.js +1 -1
  61. package/dist/{fetch-adapter-dmABnF7F.js → fetch-adapter-niRAPzNm.js} +1 -1
  62. package/dist/{from-snapshot-DZ4D2sLa.js → from-snapshot-O341Vdgj.js} +12 -4
  63. package/dist/gen-BHsow3sw.js +1 -0
  64. package/dist/{gen-m1X9N8DZ.js → gen-BZ-03GIG.js} +3 -3
  65. package/dist/{gen-kind-DIltjpY9.js → gen-kind-BKSdYxVh.js} +1 -1
  66. package/dist/{generate-CIjPy_cH.js → generate-BrSCnqfT.js} +3 -3
  67. package/dist/{generate-DWL9aXjZ.js → generate-Ckt9pvJD.js} +12 -12
  68. package/dist/{generate-options-RvPqyMWE.js → generate-options-DudA1wrX.js} +7 -7
  69. package/dist/h3/index.js +2 -2
  70. package/dist/hono/index.js +1 -1
  71. package/dist/{hook-sql-C24FFEWr.js → hook-sql-BArV58df.js} +65 -12
  72. package/dist/{import-Dmm7N9C6.js → import-DvPcOvx4.js} +1 -1
  73. package/dist/{index-B1hyWi7O.d.ts → index-Cnrz9ChE.d.ts} +3 -2
  74. package/dist/index.d.ts +1 -1
  75. package/dist/index.js +4 -4
  76. package/dist/{init-tXmJlH7f.js → init-D50xP3eQ.js} +3 -3
  77. package/dist/{init-Cgcea11w.js → init-ukHYcnVG.js} +1 -1
  78. package/dist/{inspect-functions-DbhgRvDf.js → inspect-functions-BevsMf1c.js} +1 -1
  79. package/dist/{instance-snapshot-D03srwnf.js → instance-snapshot-BJam8gUa.js} +10 -3
  80. package/dist/{interactive-only-ad2JJYk8.js → interactive-only-C9NQJXpi.js} +33 -8
  81. package/dist/{kernel-yI0nUyuX.js → kernel-UOKCD3tV.js} +3 -3
  82. package/dist/{keys-B4JLF5VZ.js → keys-C9gcgQqN.js} +1 -1
  83. package/dist/{lazy-provider-b8UHGi8P.js → lazy-provider-BPSgEG-A.js} +1 -1
  84. package/dist/{login-fz4tUg2P.js → login-CO5_OmE5.js} +3 -3
  85. package/dist/{login-DAqoZl0F.js → login-CeyA9IUa.js} +1 -1
  86. package/dist/{manifest-DbJC_rXj.js → manifest-DWO7EC1m.js} +39 -39
  87. package/dist/mcp/index.js +2 -2
  88. package/dist/{measure-R9VWfQ2y.js → measure-CJOb4tnF.js} +1 -1
  89. package/dist/{model-8NWofaam.js → model-Cjt2WEm3.js} +1 -1
  90. package/dist/nest/index.js +1 -1
  91. package/dist/next/index.js +3 -3
  92. package/dist/node/index.js +1 -1
  93. package/dist/openai/index.js +3 -3
  94. package/dist/{openapi-BgXg8LkZ.js → openapi-BlkqnsHh.js} +2 -2
  95. package/dist/{openapi-uxD7ABpM.js → openapi-WZ7O-5gx.js} +1 -1
  96. package/dist/{openapi-document-BJcbM0-l.js → openapi-document-qHp-hW5Y.js} +1 -1
  97. package/dist/orpc/index.js +2 -2
  98. package/dist/{output-DZS9QWHI.js → output-C3gBd5Yp.js} +1 -1
  99. package/dist/{ownership-DO5EF2nr.js → ownership-BGAqnS59.js} +2 -2
  100. package/dist/pdp/index.js +1 -1
  101. package/dist/{permdock-CbavFN6u.js → permdock-B0aE5Ime.js} +1 -1
  102. package/dist/{permissions-BPYOb5OB.js → permissions-CF8Ed44S.js} +1 -1
  103. package/dist/{pipeline-IvdKfvuP.js → pipeline-BXsElIBt.js} +2 -2
  104. package/dist/{policy-V-sHH2Ku.js → policy-BOXVx6pf.js} +1 -1
  105. package/dist/{policy-bundle-DyJKT9TF.js → policy-bundle-BbXW3vec.js} +3 -3
  106. package/dist/{policy-from-catalog-BohzTN3J.js → policy-from-catalog-hECiBs9M.js} +1 -1
  107. package/dist/{powersync-BkN45DVg.js → powersync-CXTWMf2h.js} +1 -1
  108. package/dist/{powersync-BY6r-MIk.js → powersync-WHQ4bGgx.js} +1 -1
  109. package/dist/{powersync-IqzV6QHS.js → powersync-cShrvGN9.js} +8 -8
  110. package/dist/{provider-NQwLSlgb.js → provider-BT8hVigf.js} +1 -1
  111. package/dist/{provider-hQFC3b98.js → provider-DRsBw6My.js} +1 -1
  112. package/dist/{provider-store-BizF6jyu.js → provider-store-fzaF1R6q.js} +1 -1
  113. package/dist/{prune-config-BRqnw6rb.js → prune-config-CdcEIILi.js} +4 -4
  114. package/dist/pull-DTiAI52h.js +1 -0
  115. package/dist/{pull-PDxkxdGN.js → pull-b_1Jv1XY.js} +1 -1
  116. package/dist/{push-Br0Uz5pT.js → push-Dl7o5gU_.js} +1 -1
  117. package/dist/{pushed-policy-dm_hFstN.js → pushed-policy-DXA5KLo6.js} +1 -1
  118. package/dist/{rbac-BK_wp3eK.js → rbac-BlVLEzQC.js} +2 -2
  119. package/dist/react/index.js +1 -1
  120. package/dist/react/lazy.js +1 -1
  121. package/dist/react/provider-client-lazy.js +1 -1
  122. package/dist/react/provider-client.js +1 -1
  123. package/dist/react-native/index.js +1 -1
  124. package/dist/{rename-BbdlodFz.js → rename-B61GbsZQ.js} +2 -2
  125. package/dist/{request-context-C9FFFpuH.js → request-context-Bi0Crsd5.js} +1 -1
  126. package/dist/{resolve-names-B85N2-Ws.js → resolve-names-D9S1ytiK.js} +2 -2
  127. package/dist/{resolver-C9-dU-SZ.js → resolver-CDJq6Q7f.js} +3 -3
  128. package/dist/{rls-BkXnBVXx.js → rls-BKoLx_wE.js} +7 -7
  129. package/dist/{rls-DTXsf2zJ.js → rls-DUrkfLte.js} +3 -3
  130. package/dist/{rls-files-BJMmTuC9.js → rls-files-CXNRzrb-.js} +1 -1
  131. package/dist/{rpc-RDBrKR7N.js → rpc-C-kZGWs6.js} +1 -1
  132. package/dist/run-BR0E2gC_.js +1 -0
  133. package/dist/{run-dwwtRWj6.js → run-DC-N-B56.js} +2 -2
  134. package/dist/{saas-CHviJgF2.js → saas-DDz3ivSL.js} +2 -2
  135. package/dist/{scan-BGTnZXgx.js → scan-DodOeypJ.js} +1 -1
  136. package/dist/{schema-KPTMZVeK.js → schema-owUQ1gtu.js} +1 -1
  137. package/dist/server/index.js +1 -1
  138. package/dist/{size-Dm3777Ev.js → size-DNSNqUda.js} +2 -2
  139. package/dist/{skills-jPbcwqhX.js → skills-CCpuGcKP.js} +1 -1
  140. package/dist/{skills-CexZ2QfF.js → skills-s2aKsx2b.js} +1 -1
  141. package/dist/{snapshot-size-CpdksnSr.js → snapshot-size-1zICkeFb.js} +1 -1
  142. package/dist/{snapshot-size-I_-fxGry.js → snapshot-size-CFwBMDNC.js} +1 -1
  143. package/dist/solid/index.js +1 -1
  144. package/dist/solid-start/index.js +2 -2
  145. package/dist/{src-10d_jun2.js → src-DUWw9z1D.js} +2 -2
  146. package/dist/{stores-jgDndNHa.js → stores-qYmLHVKv.js} +1 -1
  147. package/dist/supabase/index.js +2 -2
  148. package/dist/supabase/middleware.js +3 -3
  149. package/dist/{supabase-DgHCnzMW.js → supabase-BTQJN5xy.js} +2 -2
  150. package/dist/{supabase-CeJAHqZp.js → supabase-DayxaRcg.js} +2 -2
  151. package/dist/supabase-hook-D6qeBhbR.js +2 -0
  152. package/dist/{supabase-hook-BIBC5Ihn.js → supabase-hook-Q7W7FeMZ.js} +5 -5
  153. package/dist/{supabase-schemas-DOc3cNnf.js → supabase-schemas-DsIQxBsk.js} +1 -1
  154. package/dist/svelte/index.js +2 -2
  155. package/dist/svelte/runtime.js +1 -1
  156. package/dist/svelte/source.js +1 -1
  157. package/dist/sveltekit/index.js +1 -1
  158. package/dist/{table-reads-CXecyZKo.js → table-reads-BnUbRW9A.js} +1 -1
  159. package/dist/{table-reads-CMP1MnPJ.js → table-reads-BqTGNTSZ.js} +1 -1
  160. package/dist/{tables-C-DzDqKb.js → tables-CKtoAAm5.js} +2 -2
  161. package/dist/tanstack-start/index.js +1 -1
  162. package/dist/{tenant-check-DoZibca6.js → tenant-check-cX7MSxRQ.js} +3 -3
  163. package/dist/terminal/index.js +2 -2
  164. package/dist/testing/core.js +1 -1
  165. package/dist/testing/index.d.ts +1 -1
  166. package/dist/testing/index.js +7 -7
  167. package/dist/testing/saas/index.js +2 -2
  168. package/dist/testing/saas/permissions.js +1 -1
  169. package/dist/trpc/index.js +2 -2
  170. package/dist/usage-CRHxOpvu.js +1 -0
  171. package/dist/{usage-BiTJQNJO.js → usage-C_gw6Dsh.js} +2 -2
  172. package/dist/{usage-ltA8iGa4.js → usage-Ct-_O647.js} +1 -1
  173. package/dist/{verify-Dj3OjNiD.js → verify-BHM21t2P.js} +5 -5
  174. package/dist/vue/index.js +1 -1
  175. package/dist/{warm-BOrs0-_j.js → warm-C6Hn4J-4.js} +1 -1
  176. package/dist/{watch--c--3aEf.js → watch-DEnagZ5d.js} +1 -1
  177. package/dist/workflow/index.js +1 -1
  178. package/package.json +2 -2
  179. package/dist/bundle-size-CGd8wVIu.js +0 -1
  180. package/dist/evaluator-zpeC7zel.js +0 -2
  181. package/dist/gen-Df-r9jpy.js +0 -1
  182. package/dist/pull-n6noMzmE.js +0 -1
  183. package/dist/run-DqqVLgh_.js +0 -1
  184. package/dist/supabase-hook-8jAi64W9.js +0 -2
  185. package/dist/usage-D7-bsLte.js +0 -1
@@ -2,8 +2,8 @@ import { c as rootScope, d as scopeList, o as normalizeMemberships, s as resolve
2
2
  import { r as supabaseTenantClaim } from "./budget-BH81q2cj.js";
3
3
  import { r as runCollect } from "./collect-Co-w8Eg2.js";
4
4
  import { t as didYouMean } from "./args-BSpXxMnb.js";
5
- import { t as DOCS_BASE } from "./manifest-DbJC_rXj.js";
6
- import { o as nonEmptyOr, r as findingOf } from "./output-DZS9QWHI.js";
5
+ import { t as DOCS_BASE } from "./manifest-DWO7EC1m.js";
6
+ import { o as nonEmptyOr, r as findingOf } from "./output-C3gBd5Yp.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";
@@ -11,34 +11,34 @@ import { r as pgConnector } from "./pg-DmS5ITHu.js";
11
11
  import { a as describeError, n as CliError } from "./errors-DgLOqc6j.js";
12
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
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-jPbcwqhX.js";
14
+ import { i as runSkillsInstall } from "./skills-CCpuGcKP.js";
15
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-DOc3cNnf.js";
17
- import { f as attrsPlan, i as supabaseHookManifest, n as hooklessDatabase, r as supabaseDatabaseManifest } from "./hook-sql-C24FFEWr.js";
18
- import { i as pd039, t as hookOut } from "./supabase-hook-BIBC5Ihn.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-DsIQxBsk.js";
17
+ import { f as attrsPlan, i as supabaseHookManifest, n as hooklessDatabase, r as supabaseDatabaseManifest } from "./hook-sql-BArV58df.js";
18
+ import { i as pd039, t as hookOut } from "./supabase-hook-Q7W7FeMZ.js";
19
19
  import { t as parseCatalog } from "./parse-CUqZ_lLC.js";
20
20
  import { t as catalogPath } from "./catalog-path-bG0XxHMu.js";
21
21
  import { n as bsbActions, t as answerOf } from "./bsb-actions-DcDxQ_Ku.js";
22
22
  import { c as outFiles } from "./output-files-8lfALMSU.js";
23
- import { a as guardedTables, r as unsatisfiedKinds, t as ownershipRules } from "./ownership-DO5EF2nr.js";
23
+ import { a as guardedTables, r as unsatisfiedKinds, t as ownershipRules } from "./ownership-BGAqnS59.js";
24
24
  import { n as MIGRATION_DIRS, t as DEFAULT_SENSITIVE_ACTIONS } from "./constants-PCJiir_3.js";
25
25
  import { n as membershipColumns, r as tableKey } from "./deciding-columns-DBZsrpdD.js";
26
26
  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
27
  import { t as applyFiles } from "./files-DuV7wRim.js";
28
- import { o as splitIgnored } from "./verify-Dj3OjNiD.js";
28
+ import { o as splitIgnored } from "./verify-BHM21t2P.js";
29
29
  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";
30
+ import { n as activeTenantMismatch, t as authorizationProvider } from "./provider-DRsBw6My.js";
31
31
  import { r as isRecord } from "./compact-C4LFuqbW.js";
32
32
  import "./authz-topic-D8x24Jv-.js";
33
33
  import { n as activeSource } from "./memberships-CDiSsFTu.js";
34
- import { n as budgetBreaches, r as snapshotProbeOptions, t as breachText } from "./budgets-DFnMBpKz.js";
34
+ import { n as budgetBreaches, r as snapshotProbeOptions, t as breachText } from "./budgets-BGWdTAHq.js";
35
35
  import { a as nameOf, i as lineIndex, o as nodes, r as child, u as walk } from "./ast-CAOxvn9t.js";
36
36
  import { r as parseSync, t as createVisitor } from "./optional-CaQWp9HA.js";
37
37
  import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
38
38
  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-BiTJQNJO.js";
39
+ import { a as pd015, i as pd014, n as ADAPTER_SPECIFIERS, o as runtimeSpecifiers, r as pd001, t as runUsage } from "./usage-C_gw6Dsh.js";
40
40
  import { c as listPermissions, h as formerKeys } from "./permission-registry-DstT40VS.js";
41
- import { t as resolveNames } from "./resolve-names-B85N2-Ws.js";
41
+ import { t as resolveNames } from "./resolve-names-D9S1ytiK.js";
42
42
  import "./markers-C-kThnKN.js";
43
43
  import { i as qualifySqlTable, s as quoteSqlLiteral } from "./sql-T4GaBh9X.js";
44
44
  import { s as parseCredential } from "./credential-D9in5keC.js";
@@ -51,34 +51,34 @@ import { o as hasConditionOp, u as isSqlFunctionField } from "./refs-Cix9Zjis.js
51
51
  import { o as flattenGrantee } from "./grantee-BSCdpIF3.js";
52
52
  import { u as isPrincipalRelation } from "./resource-relations-Ck5sjYQR.js";
53
53
  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";
54
+ import { a as snapshotSize, r as mostPrivilegedRole, t as SNAPSHOT_BUDGET_BYTES } from "./snapshot-size-1zICkeFb.js";
55
55
  import { a as taggedPolicyId, o as taggedPolicyIds } from "./bsb-access-Bcw6GrQm.js";
56
56
  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-8NWofaam.js";
57
+ import { a as ownedObjects, i as inReservedDir, o as shownKey, r as generatedByPermdock, s as withoutOwned, t as policyModel } from "./model-Cjt2WEm3.js";
58
58
  import { a as pd114, i as pd110, r as pd109 } from "./claims-size-ZiUJBn0r.js";
59
59
  import { t as importFromApp } from "./app-peer-BnMh5lqz.js";
60
60
  import { c as rlsReport, o as policiesFor } from "./report-x9GeUvjx.js";
61
61
  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-IqzV6QHS.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-cShrvGN9.js";
63
63
  import { t as parseProgram } from "./program-CvarkLMS.js";
64
64
  import { t as FIELD_VIEWS } from "./fields-CKX-qjWb.js";
65
65
  import { n as restatedDefaults } from "./resolve-config-Cu_mE2wt.js";
66
66
  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-C-DzDqKb.js";
67
+ import { X as policyBundle, et as graphPlan, i as tableNames, r as tableNameOf } from "./tables-CKtoAAm5.js";
68
68
  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-7tf8hHlu.js";
70
- import { p as contextRefs } from "./rbac-BK_wp3eK.js";
69
+ import { a as tableFor, n as commandFor, o as unmappedActions, r as compileGrants, t as INFERRED_VERBS } from "./compile-5QQLSNRY.js";
70
+ import { p as contextRefs } from "./rbac-BlVLEzQC.js";
71
71
  import { l as rowConditionMessage, r as ROW_CONDITION_FIX, s as helperTablePolicies } from "./helper-calls-DN1PJcNY.js";
72
72
  import { i as graphSqlName } from "./names-DwGleRKB.js";
73
73
  import { t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
74
74
  import { n as isSeeds } from "./seeds-Bs44UDS3.js";
75
75
  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-RvPqyMWE.js";
76
+ import { i as buildContext, n as isRefusal, o as inheritTargets, t as generateOptions } from "./generate-options-DudA1wrX.js";
77
77
  import { n as propertyKey } from "./edits-CqU8s2GC.js";
78
78
  import { n as legacyHelperNames, r as retirePlan, t as legacyHelperCalls } from "./retire-FN4aY6-n.js";
79
79
  import { t as supautilsRejections } from "./supautils-ym4X20ig.js";
80
80
  import { t as MANIFEST_FILE } from "./manifest-json-DMaBWmcG.js";
81
- import { r as manifestTableReads, s as sharedFunctionsOf, t as committedManifest } from "./table-reads-CMP1MnPJ.js";
81
+ import { r as manifestTableReads, s as sharedFunctionsOf, t as committedManifest } from "./table-reads-BqTGNTSZ.js";
82
82
  import { isDeepStrictEqual } from "node:util";
83
83
  import { readFileSync } from "node:fs";
84
84
  import { dirname, join, resolve } from "node:path";
@@ -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-XSdrG1SZ.js");
14
+ const { DOCTOR_CHECKS } = await import("./doctor-cPl8X1Ef.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-XSdrG1SZ.js")).runDoctor({
49
+ return (await import("./doctor-cPl8X1Ef.js")).runDoctor({
50
50
  cwd: ctx.cwd,
51
51
  config: ctx.config,
52
52
  only: flags.only,
@@ -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 = {
package/dist/eve/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { t as agentRuntime } from "../create-BICq9l-p.js";
1
+ import { t as agentRuntime } from "../create-fNkkpOy5.js";
2
2
  import { t as boundedMap } from "../lru-Cp-AEvpR.js";
3
3
  import { c as isApprovalError } from "../types-DFZKovb3.js";
4
4
  import { o as resolveApproval } from "../helpers-COh0lLc1.js";
5
- import { u as withApp } from "../permdock-CbavFN6u.js";
5
+ import { u as withApp } from "../permdock-B0aE5Ime.js";
6
6
  import { t as compact } from "../compact-C4LFuqbW.js";
7
7
  // src/eve/create.ts
8
8
  const TOKENS_PER_PROCESS = 1e3;
@@ -1,10 +1,10 @@
1
- import { n as budgetBreaches, t as breachText } from "./budgets-DFnMBpKz.js";
1
+ import { n as budgetBreaches, t as breachText } from "./budgets-BGWdTAHq.js";
2
2
  import { a as suggestion } from "./args-BSpXxMnb.js";
3
3
  import { n as CliError } from "./errors-DgLOqc6j.js";
4
- import { r as runGen } from "./gen-m1X9N8DZ.js";
4
+ import { r as runGen } from "./gen-BZ-03GIG.js";
5
5
  import { c as requirePolicy } from "./load-m7jmit3y.js";
6
- import { t as projectContext } from "./context-BQQzAw83.js";
7
- import { r as runGenerate } from "./pipeline-IvdKfvuP.js";
6
+ import { t as projectContext } from "./context-Dew6yQqT.js";
7
+ import { r as runGenerate } from "./pipeline-BXsElIBt.js";
8
8
  import { n as isPermDockPlugin } from "./plugin-MQVfUBUS.js";
9
9
  import { relative, resolve } from "node:path";
10
10
  import { fileURLToPath } from "node:url";
@@ -1,6 +1,6 @@
1
1
  import { n as findPermission } from "./permission-registry-DstT40VS.js";
2
- import { t as getPermDock } from "./permdock-CbavFN6u.js";
3
- import { A as memoryCustomRoleSource } from "./src-10d_jun2.js";
2
+ import { t as getPermDock } from "./permdock-B0aE5Ime.js";
3
+ import { A as memoryCustomRoleSource } from "./src-DUWw9z1D.js";
4
4
  import { i as configError } from "./errors-DgLOqc6j.js";
5
5
  import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-3aUUP6Nx.js";
6
6
  // src/cli/explain.ts
@@ -19,7 +19,7 @@ const explain = defineLeaf({
19
19
  },
20
20
  async run(ctx, { flags, args }) {
21
21
  try {
22
- const { runExplain } = await import("./explain-CgKGadRa.js");
22
+ const { runExplain } = await import("./explain-BHSgFpfd.js");
23
23
  const policy = await requirePolicy(ctx.cwd, given(flags.policy) ?? ctx.config.policy, "set policy in permdock.config.ts or pass --policy");
24
24
  return await runExplain({
25
25
  cwd: ctx.cwd,
@@ -1,5 +1,5 @@
1
1
  import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
2
- import { i as decorate, r as bindKernel } from "../bind-BNYcJ1D9.js";
2
+ import { i as decorate, r as bindKernel } from "../bind-CFwfgfp2.js";
3
3
  import { r as hasCredentials } from "../http-C9jDw_bZ.js";
4
4
  import { t as problemFromError } from "../map-error-DYQbf-3Q.js";
5
5
  import { n as sendResponse, r as toRequest } from "../http-dNltTpC8.js";
@@ -1,5 +1,5 @@
1
1
  import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
2
- import { i as decorate, r as bindKernel } from "../bind-BNYcJ1D9.js";
2
+ import { i as decorate, r as bindKernel } from "../bind-CFwfgfp2.js";
3
3
  import { c as writeReply, i as headersFrom, n as firstHeader, r as hasCredentials, t as fetchRequest } from "../http-C9jDw_bZ.js";
4
4
  import { t as problemFromError } from "../map-error-DYQbf-3Q.js";
5
5
  // src/fastify/http.ts
@@ -1,6 +1,6 @@
1
1
  import { t as compact } from "./compact-C4LFuqbW.js";
2
2
  import { o as isPermission } from "./permission-registry-DstT40VS.js";
3
- import { i as decorate, r as bindKernel } from "./bind-BNYcJ1D9.js";
3
+ import { i as decorate, r as bindKernel } from "./bind-CFwfgfp2.js";
4
4
  import { r as hasCredentials } from "./http-C9jDw_bZ.js";
5
5
  import { t as problemFromError } from "./map-error-DYQbf-3Q.js";
6
6
  import { o as methodNotAllowed } from "./problem-BZB7zPC7.js";
@@ -22,10 +22,18 @@ function resourceRef(snapshot, permission, data) {
22
22
  }
23
23
  function fromSnapshot(input, options = {}) {
24
24
  const wire = parseSnapshot(input);
25
- const snapshot = expandSnapshot(wire, compact({
25
+ return scopedInstance(wire, expandSnapshot(wire, compact({
26
26
  bundle: options.bundle,
27
27
  customRoles: options.customRoles
28
- }));
28
+ })), options);
29
+ }
30
+ /**
31
+ * The instance of one tenant and team over a snapshot that is already parsed
32
+ * and expanded. The expanded grants are frozen and do not depend on the tenant
33
+ * or team, so `tenant()` and `team()` share them and never expand the wire
34
+ * snapshot again.
35
+ */
36
+ function scopedInstance(wire, snapshot, options) {
29
37
  const subject = subjectFromSnapshot(snapshot, options.tenant);
30
38
  const team = options.team;
31
39
  const run = (permission, data, decideOptions = {}) => evaluateSnapshot(snapshot, subject, permission, data, team, decideOptions);
@@ -129,7 +137,7 @@ function fromSnapshot(input, options = {}) {
129
137
  return () => void 0;
130
138
  },
131
139
  tenant(id) {
132
- return fromSnapshot(wire, compact({
140
+ return scopedInstance(wire, snapshot, compact({
133
141
  tenant: id,
134
142
  team,
135
143
  bundle: options.bundle,
@@ -137,7 +145,7 @@ function fromSnapshot(input, options = {}) {
137
145
  }));
138
146
  },
139
147
  team(id) {
140
- return fromSnapshot(wire, compact({
148
+ return scopedInstance(wire, snapshot, compact({
141
149
  tenant: options.tenant,
142
150
  team: id,
143
151
  bundle: options.bundle,
@@ -0,0 +1 @@
1
+ export { n as renderKinds } from "./gen-BZ-03GIG.js";
@@ -1,4 +1,4 @@
1
- import { p as clientBundle } from "./permdock-CbavFN6u.js";
1
+ import { p as clientBundle } from "./permdock-B0aE5Ime.js";
2
2
  import { t as loadConfiguredOperations } from "./catalog-operations-BqSsByIE.js";
3
3
  import { i as configError, n as CliError } from "./errors-DgLOqc6j.js";
4
4
  import { n as fileSummary, r as planFiles } from "./files-DuV7wRim.js";
@@ -13,7 +13,7 @@ import { c as listPermissions } from "./permission-registry-DstT40VS.js";
13
13
  import { d as scopeList } from "./scopes-B-KX9EI8.js";
14
14
  import { o as listPlans, s as listRoles } from "./vocabulary-CE2k7s1a.js";
15
15
  import { c as jsonSchemaOf } from "./catalog-doc-BX97oFAn.js";
16
- import { t as resolveNames } from "./resolve-names-B85N2-Ws.js";
16
+ import { t as resolveNames } from "./resolve-names-D9S1ytiK.js";
17
17
  import { t as DESCRIBE_TITLES } from "./describe-B7EosIKA.js";
18
18
  import { i as schemaExpression } from "./generate-5_kz2309.js";
19
19
  import { existsSync, readFileSync } from "node:fs";
@@ -401,7 +401,7 @@ function modelDigest(model) {
401
401
  return createHash("sha256").update(canonicalJson(model)).digest("base64url");
402
402
  }
403
403
  /**
404
- * `// @generated by permdock generate zod@0.38.0 from policy.ts sha-256:…; do
404
+ * `// @generated by permdock generate zod@0.38.2 from policy.ts sha-256:…; do
405
405
  * not edit`.
406
406
  */
407
407
  function generatedHeader(kind, info) {
@@ -47,7 +47,7 @@ function kindPlugin(kind, options = {}) {
47
47
  }],
48
48
  emit: async (_task, model, source) => {
49
49
  if (source === void 0) return [];
50
- const { renderKinds } = await import("./gen-Df-r9jpy.js");
50
+ const { renderKinds } = await import("./gen-BHsow3sw.js");
51
51
  const files = await renderKinds({
52
52
  cwd: source.cwd,
53
53
  config: source.config,
@@ -1,8 +1,8 @@
1
1
  import { t as defineLeaf } from "./command-9GAzSI7E.js";
2
2
  import { n as CliError } from "./errors-DgLOqc6j.js";
3
3
  import { c as generateFlags, f as policyFlag, i as dryRunFlag, n as dbUrl, r as dbUrlFlags, t as checkFlag } from "./flags-DQzNPxg1.js";
4
- import { t as executeGenerate } from "./execute-DgCH7kEE.js";
5
- import { n as receiptRows } from "./pipeline-IvdKfvuP.js";
4
+ import { t as executeGenerate } from "./execute-hsLYXuwL.js";
5
+ import { n as receiptRows } from "./pipeline-BXsElIBt.js";
6
6
  // src/cli/commands/generate.ts
7
7
  function concurrencyFlag(value) {
8
8
  if (value === void 0 || value === "") return;
@@ -24,7 +24,7 @@ const generate = defineLeaf({
24
24
  const db = await dbUrl(ctx, flags);
25
25
  const policy = flags.policy !== void 0 && flags.policy !== "" ? flags.policy : ctx.config.policy;
26
26
  if (flags.watch) {
27
- const { watchGenerate } = await import("./watch--c--3aEf.js");
27
+ const { watchGenerate } = await import("./watch-DEnagZ5d.js");
28
28
  return watchGenerate(ctx, {
29
29
  ...policy === void 0 ? {} : { policy },
30
30
  only: flags.only,
@@ -6,33 +6,33 @@ import { r as isRecord, t as compact } from "./compact-C4LFuqbW.js";
6
6
  import { n as supabaseDir } from "./supabase-dir-0lxKbrYu.js";
7
7
  import { a as parseSqlFile, f as stringValues, g as statementRanges, l as readRelation, m as splitUndiffed, o as parseSqlLenient, t as SqlSyntaxError } from "./ast-Dnm2TOHN.js";
8
8
  import { n as loadBsbSql, r as schemaSqlFiles } from "./bsb-access-Bcw6GrQm.js";
9
- import { D as seedSql, F as guardAuthAdminGrants, I as unguardAuthAdminGrants, S as accessSql, T as helpersSql, Z as closureBackfillSql, c as permissionHelpersSql, d as permittedByPermissionHelper, i as tableNames, o as PERMISSION_HELPERS, r as tableNameOf, s as checkName, tt as graphSql, u as permissionKeysHelper } from "./tables-C-DzDqKb.js";
9
+ import { D as seedSql, F as guardAuthAdminGrants, I as unguardAuthAdminGrants, S as accessSql, T as helpersSql, Z as closureBackfillSql, c as permissionHelpersSql, d as permittedByPermissionHelper, i as tableNames, o as PERMISSION_HELPERS, r as tableNameOf, s as checkName, tt as graphSql, u as permissionKeysHelper } from "./tables-CKtoAAm5.js";
10
10
  import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
11
- import { a as tableFor, d as pruneIndexTargets, f as readTableIndexFacts, i as inferredCommand, l as indexTargets, r as compileGrants, u as indexesSql } from "./compile-7tf8hHlu.js";
12
- import { a as CANDIDATES, c as rowHelpersSql, i as buildContext, l as rowSetSql, n as isRefusal, o as inheritTargets, r as splitsPart, s as levelKeys, t as generateOptions } from "./generate-options-RvPqyMWE.js";
13
- import { t as policyFromCatalog } from "./policy-from-catalog-BohzTN3J.js";
14
- import { t as fetchProjectPolicy } from "./pull-PDxkxdGN.js";
11
+ import { a as tableFor, d as pruneIndexTargets, f as readTableIndexFacts, i as inferredCommand, l as indexTargets, r as compileGrants, u as indexesSql } from "./compile-5QQLSNRY.js";
12
+ import { a as CANDIDATES, c as rowHelpersSql, i as buildContext, l as rowSetSql, n as isRefusal, o as inheritTargets, r as splitsPart, s as levelKeys, t as generateOptions } from "./generate-options-DudA1wrX.js";
13
+ import { t as policyFromCatalog } from "./policy-from-catalog-hECiBs9M.js";
14
+ import { t as fetchProjectPolicy } from "./pull-b_1Jv1XY.js";
15
15
  import { c as requirePolicy } from "./load-m7jmit3y.js";
16
- import { o as nonEmptyOr } from "./output-DZS9QWHI.js";
16
+ import { o as nonEmptyOr } from "./output-C3gBd5Yp.js";
17
17
  import { i as INDEXES_MARKER, n as GRANTS_MARKER, o as SEEDS_MARKER, t as BACKFILL_MARKER } from "./markers-C-kThnKN.js";
18
18
  import { S as scopeTable, h as memberIdsHelper, i as graphSqlName, r as graphHelper, t as BOOTSTRAP_PERMISSIONS, x as scopeSources, y as permittedIdsHelper } from "./names-DwGleRKB.js";
19
19
  import { a as quoteIdent, c as quoteTable, i as qualified$1, o as quoteLiteral, s as quoteQualified } from "./quote-LNaBdCGA.js";
20
20
  import { b as idTypeOf, f as subjectIdSql, l as sessionLiveHelperSql, t as SESSION_LIVE_HELPER, u as subjectClaimJsonSql, x as scopeTypeOf } from "./subject-B7p94Y0s.js";
21
- import { a as supabaseHookSql, c as asideAuthzReceive, d as declarativeSql, t as grantsLabel, u as approvalsSql } from "./hook-sql-C24FFEWr.js";
22
- import { i as assignmentSql, n as ownershipSql } from "./ownership-DO5EF2nr.js";
23
- import { r as rebuildPlan, t as DROPPED_LIST } from "./custom-role-rebuild-CRz6Ip6J.js";
21
+ import { a as supabaseHookSql, c as asideAuthzReceive, d as declarativeSql, t as grantsLabel, u as approvalsSql } from "./hook-sql-BArV58df.js";
22
+ import { i as assignmentSql, n as ownershipSql } from "./ownership-BGAqnS59.js";
23
+ import { r as rebuildPlan, t as DROPPED_LIST } from "./custom-role-rebuild-BwM6hBqt.js";
24
24
  import { p as scopeField } from "./tenancy-B5Xxt9Sc.js";
25
- import { c as breakGlassKey, i as rbacScaffold, l as collectGrants, s as breakGlassHolder } from "./rbac-BK_wp3eK.js";
25
+ import { c as breakGlassKey, i as rbacScaffold, l as collectGrants, s as breakGlassHolder } from "./rbac-BlVLEzQC.js";
26
26
  import { t as supautilsRejections } from "./supautils-ym4X20ig.js";
27
27
  import { a as fieldViewsSql, c as ACTOR_MAY_WRITE, d as assemblePolicies, i as fieldViews, l as actorMayWriteCall, m as readOnlyActorPolicies, n as columnGrantSql, o as rowBranches, p as readOnlyActorKinds, r as columnRevokeSql, u as actorMayWriteSql } from "./fields-CKX-qjWb.js";
28
28
  import { l as isFieldRelation } from "./resource-relations-Ck5sjYQR.js";
29
29
  import { c as rootScope } from "./scopes-B-KX9EI8.js";
30
30
  import { o as rootName, r as HELPERS, t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
31
- import { n as permissionHoldersSql } from "./resolve-names-B85N2-Ws.js";
31
+ import { n as permissionHoldersSql } from "./resolve-names-D9S1ytiK.js";
32
32
  import { n as byKey } from "./compare-8SNJN-9U.js";
33
33
  import { i as dateAt } from "./time-r0CKBm57.js";
34
34
  import { _ as writeOutputFiles, a as isSeedsDirectory, d as pgDeltaPath, g as underSchemaDir, h as serviceRel, l as parseSplit, m as seedsMigration, n as dataMigrationFile, p as seedDeltaNote, r as driftOf, u as partPath } from "./output-files-8lfALMSU.js";
35
- import { c as readSupabaseConfig, n as resolveSchemas } from "./supabase-schemas-DOc3cNnf.js";
35
+ import { c as readSupabaseConfig, n as resolveSchemas } from "./supabase-schemas-DsIQxBsk.js";
36
36
  import { o as sqlFiles } from "./files-DAR51W3J.js";
37
37
  import { n as MIGRATION_DIRS } from "./constants-PCJiir_3.js";
38
38
  import { readFileSync } from "node:fs";
@@ -14,14 +14,14 @@ import { l as parseSplit } from "./output-files-8lfALMSU.js";
14
14
  import { f as orSql, g as branchClauses } from "./fields-CKX-qjWb.js";
15
15
  import { b as idTypeOf, f as subjectIdSql, g as parseMembershipsFlag, n as USER_ID_HELPER, x as scopeTypeOf, y as firstScopeType } from "./subject-B7p94Y0s.js";
16
16
  import { a as customRolesOn, r as HELPERS, s as signedIn, t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
17
- import { R as raiseSql, a as interactiveOnlyKeys, c as memoUserSql, g as memoHitList, q as checkSuspension, v as memoizedSetofSql, y as memoizes } from "./interactive-only-ad2JJYk8.js";
17
+ import { R as raiseSql, a as interactiveOnlyKeys, c as memoUserSql, g as memoHitList, q as checkSuspension, v as memoizedSetofSql, y as memoizes } from "./interactive-only-C9NQJXpi.js";
18
18
  import { i as graphSqlName } from "./names-DwGleRKB.js";
19
- import { $ as graphIdsSql, B as apiKeyClaimSql, E as memoReadsSql, H as apiKeyUnlimitedSql, N as tokenScopesPlan, O as TOKEN_SCOPE_ALLOWS, P as memoReadTriggersSql, Q as closureDepths, R as API_KEY_ALLOWS, U as apiKeysPlan, a as tablelessResources, d as permittedByPermissionHelper, et as graphPlan, i as tableNames, j as tokenScopeUnlimitedSql, k as isTokenScopesSetting, n as resolveVias, o as PERMISSION_HELPERS, t as checkSharedTables } from "./tables-C-DzDqKb.js";
20
- import { t as resolveNames } from "./resolve-names-B85N2-Ws.js";
21
- import { a as resolveAuthorize, o as assignableRoles, u as roleNames } from "./rbac-BK_wp3eK.js";
22
- import { a as tableFor } from "./compile-7tf8hHlu.js";
23
- import { r as rebuildPlan, t as DROPPED_LIST } from "./custom-role-rebuild-CRz6Ip6J.js";
24
- import { r as unsatisfiedKinds, t as ownershipRules } from "./ownership-DO5EF2nr.js";
19
+ import { $ as graphIdsSql, B as apiKeyClaimSql, E as memoReadsSql, H as apiKeyUnlimitedSql, N as tokenScopesPlan, O as TOKEN_SCOPE_ALLOWS, P as memoReadTriggersSql, Q as closureDepths, R as API_KEY_ALLOWS, U as apiKeysPlan, a as tablelessResources, d as permittedByPermissionHelper, et as graphPlan, i as tableNames, j as tokenScopeUnlimitedSql, k as isTokenScopesSetting, n as resolveVias, o as PERMISSION_HELPERS, t as checkSharedTables } from "./tables-CKtoAAm5.js";
20
+ import { t as resolveNames } from "./resolve-names-D9S1ytiK.js";
21
+ import { a as resolveAuthorize, o as assignableRoles, u as roleNames } from "./rbac-BlVLEzQC.js";
22
+ import { a as tableFor } from "./compile-5QQLSNRY.js";
23
+ import { r as rebuildPlan, t as DROPPED_LIST } from "./custom-role-rebuild-BwM6hBqt.js";
24
+ import { r as unsatisfiedKinds, t as ownershipRules } from "./ownership-BGAqnS59.js";
25
25
  // src/cli/rls/custom-role-sync.ts
26
26
  /**
27
27
  * `rls.customRoles.from.sync: 'trigger'`: after-row triggers on the legacy
package/dist/h3/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
2
- import { i as decorate } from "../bind-BNYcJ1D9.js";
3
- import { t as fetchAdapter } from "../fetch-adapter-dmABnF7F.js";
2
+ import { i as decorate } from "../bind-CFwfgfp2.js";
3
+ import { t as fetchAdapter } from "../fetch-adapter-niRAPzNm.js";
4
4
  // src/h3/create.ts
5
5
  function createPermDock(policy, options) {
6
6
  const adapter = fetchAdapter(policy, options, "h3", (event) => event.req);
@@ -1,7 +1,7 @@
1
1
  import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
2
2
  import { t as compact } from "../compact-C4LFuqbW.js";
3
3
  import { r as PermDockRevokedError } from "../errors-DOSkVeTC.js";
4
- import { r as bindKernel } from "../bind-BNYcJ1D9.js";
4
+ import { r as bindKernel } from "../bind-CFwfgfp2.js";
5
5
  import { t as problemFromError } from "../map-error-DYQbf-3Q.js";
6
6
  import { a as onRevoked, n as closeReason, r as guardIterable, t as POLICY_VIOLATION } from "../stream-DdF94h7T.js";
7
7
  import { Hono } from "hono";
@@ -18,12 +18,12 @@ import { m as splitUndiffed } from "./ast-Dnm2TOHN.js";
18
18
  import { c as ACTOR_MAY_WRITE, p as readOnlyActorKinds } from "./fields-CKX-qjWb.js";
19
19
  import { C as tenantTypeOf, S as sqlType, f as subjectIdSql, n as USER_ID_HELPER, w as userTypeOf, x as scopeTypeOf, y as firstScopeType } from "./subject-B7p94Y0s.js";
20
20
  import { a as customRolesOn, r as HELPERS, t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
21
- import { G as activeRowSql, N as globalRoleSource, a as interactiveOnlyKeys, q as checkSuspension, t as INTERACTIVE_ALLOWS } from "./interactive-only-ad2JJYk8.js";
21
+ import { G as activeRowSql, N as globalRoleSource, a as interactiveOnlyKeys, q as checkSuspension, t as INTERACTIVE_ALLOWS } from "./interactive-only-C9NQJXpi.js";
22
22
  import { f as memberForHelper, g as memberOfHelper, h as memberIdsHelper, t as BOOTSTRAP_PERMISSIONS, u as isTeamScope, v as permittedForHelper, y as permittedIdsHelper } from "./names-DwGleRKB.js";
23
- import { G as hookTeamReader, K as hookTeamsHelper, M as tokenScopesOn, O as TOKEN_SCOPE_ALLOWS, R as API_KEY_ALLOWS, V as apiKeyFields, W as HOOK_TEAM_READER, b as ASSIGNMENTS, d as permittedByPermissionHelper, l as permissionKeysForHelper, o as PERMISSION_HELPERS, s as checkName, x as OWNERSHIP } from "./tables-C-DzDqKb.js";
24
- import { r as permittedUsersHelper, t as resolveNames } from "./resolve-names-B85N2-Ws.js";
25
- import { a as resolveAuthorize, n as hookUri, t as authAdminRead } from "./rbac-BK_wp3eK.js";
26
- import { a as guardedTables, t as ownershipRules } from "./ownership-DO5EF2nr.js";
23
+ import { G as hookTeamReader, K as hookTeamsHelper, M as tokenScopesOn, O as TOKEN_SCOPE_ALLOWS, R as API_KEY_ALLOWS, V as apiKeyFields, W as HOOK_TEAM_READER, b as ASSIGNMENTS, d as permittedByPermissionHelper, l as permissionKeysForHelper, o as PERMISSION_HELPERS, s as checkName, x as OWNERSHIP } from "./tables-CKtoAAm5.js";
24
+ import { r as permittedUsersHelper, t as resolveNames } from "./resolve-names-D9S1ytiK.js";
25
+ import { a as resolveAuthorize, n as hookUri, t as authAdminRead } from "./rbac-BlVLEzQC.js";
26
+ import { a as guardedTables, t as ownershipRules } from "./ownership-BGAqnS59.js";
27
27
  import { a as REQUEST_APPROVER_IDS, c as MANAGES, d as checkedManagers, l as MANAGES_FOR, o as approvalChainSql, p as managerEdges, s as APPROVES, u as approvalManagersSql } from "./approval-chain-BEeExHpb.js";
28
28
  import { a as hookMemberships, c as typedSourceUsers, i as entriesSql, l as typedUsers, n as activeSource, o as memberForPlan, r as checkSources, s as positiveInteger, t as activeFromSql } from "./memberships-CDiSsFTu.js";
29
29
  import { r as tableKey, t as decidingColumns } from "./deciding-columns-DBZsrpdD.js";
@@ -1003,8 +1003,6 @@ const APPROVER_MATCHES = "permdock_approver_matches";
1003
1003
  * `p_requests` raises `54000`, so one call never walks an unbounded array.
1004
1004
  */
1005
1005
  const MAX_APPROVER_REQUESTS = 5e3;
1006
- /** The function `rls.approvals.delegations` writes for a cover's own rights. */
1007
- const COVER_APPROVES = "permdock_cover_approves";
1008
1006
  /**
1009
1007
  * `permdock_approver_request_ids(p_requests jsonb, p_kinds jsonb, p_current
1010
1008
  * boolean default false)`: the `id` of every element of `p_requests` (`{ id,
@@ -1013,10 +1011,11 @@ const COVER_APPROVES = "permdock_cover_approves";
1013
1011
  * kind to its approvers, and `p_current` passes each element's `approvers`, as
1014
1012
  * the provider's `approvers` and `requestApprovers` options do. An element
1015
1013
  * answers as `permdock_is_approver` does for it, but the caller's `holder()`,
1016
- * manager and cover facts are read once per call, not once per request. A
1017
- * policy or a set query calls it uncorrelated, so Postgres runs it once per
1018
- * statement. More than `MAX_APPROVER_REQUESTS` elements raise `54000`, and a
1019
- * `p_kinds` entry under the empty kind matches nothing.
1014
+ * manager and cover facts, and each cover's delegator's facts, are read once
1015
+ * per call, not once per request. A policy or a set query calls it
1016
+ * uncorrelated, so Postgres runs it once per statement. More than
1017
+ * `MAX_APPROVER_REQUESTS` elements raise `54000`, and a `p_kinds` entry under
1018
+ * the empty kind matches nothing.
1020
1019
  */
1021
1020
  function approverRequestIdsSql(ctx, options) {
1022
1021
  const fn = qualified$1(ctx, APPROVER_REQUEST_IDS);
@@ -1075,6 +1074,37 @@ function approverRequestIdsSql(ctx, options) {
1075
1074
  from managers m
1076
1075
  where jsonb_typeof(m.levels) = 'number' and m.levels::text ~ '^[0-9]{1,2}$'
1077
1076
  )` : "";
1077
+ const database = ctx.authorize === "database";
1078
+ const delegatorGlobal = database ? `(
1079
+ select coalesce(jsonb_object_agg(p.permission, coalesce(${qualified$1(ctx, PERMISSION_HELPERS.hasFor)}(d.delegator::${user}, p.permission), false)), '{}'::jsonb)
1080
+ from (select distinct l.permission from cover_leaves l where l.delegator = d.delegator and l.within is null and l.permission is not null) p
1081
+ )` : "'{}'::jsonb";
1082
+ const delegatorTenant = database && root !== void 0 ? `(
1083
+ select coalesce(jsonb_object_agg(p.permission, (
1084
+ select coalesce(jsonb_agg(i.id::text), '[]'::jsonb)
1085
+ from ${qualified$1(ctx, checkName(`${permittedByPermissionHelper(root)}_for`))}(d.delegator::${user}, p.permission) i(id)
1086
+ )), '{}'::jsonb)
1087
+ from (select distinct l.permission from cover_leaves l where l.delegator = d.delegator and l.within is not null and l.permission is not null) p
1088
+ )` : "'{}'::jsonb";
1089
+ const delegatorManages = options.managers ? `,
1090
+ 'manages', (
1091
+ select coalesce(jsonb_object_agg(
1092
+ jsonb_build_array(m.requester, m.within, m.levels::text::integer)::text,
1093
+ coalesce(${qualified$1(ctx, MANAGES_FOR)}(d.delegator, m.requester, m.levels::text::integer, m.within), false)
1094
+ ), '{}'::jsonb)
1095
+ from cover_managers m
1096
+ where m.delegator = d.delegator and jsonb_typeof(m.levels) = 'number' and m.levels::text ~ '^[0-9]{1,2}$'
1097
+ )` : "";
1098
+ const coverManagerLeaves = options.managers ? `,
1099
+ cover_managers as (
1100
+ select distinct a.delegator, a.r ->> 'requester' as requester, a.r ->> 'within' as within, coalesce(l -> 'levels', '1'::jsonb) as levels
1101
+ from applicable a, jsonb_path_query(a.r -> 'approvers', 'strict $.** ? (@.kind == "manager")') l
1102
+ )` : "";
1103
+ const memberOnly = root === void 0 ? "r ->> 'within' is null" : "(r ->> 'within' is null or r ->> 'within' = any (v_member))";
1104
+ const loadMember = root === void 0 ? "" : `
1105
+ if v_member is null then
1106
+ select coalesce(array_agg(m.id::text), '{}') into v_member from ${qualified$1(ctx, memberIdsHelper(root))}() m(id);
1107
+ end if;`;
1078
1108
  const member = root === void 0 ? ` if v_request ->> 'within' is not null then
1079
1109
  continue;
1080
1110
  end if;` : ` if v_request ->> 'within' is not null then
@@ -1110,13 +1140,36 @@ ${member}
1110
1140
  and (c ->> 'within' is null or c ->> 'within' = v_request ->> 'within')
1111
1141
  and (c ->> 'resources' is null or c -> 'resources' ? (v_request ->> 'resource'))
1112
1142
  loop
1113
- if ${qualified$1(ctx, COVER_APPROVES)}(v_delegator, v_request -> 'approvers', v_request ->> 'within', v_request ->> 'requester') then
1143
+ -- Each delegator's facts are read once, over the requests a cover of theirs reaches.
1144
+ if v_cover_facts is null then${loadMember}
1145
+ with applicable as (
1146
+ select c ->> 'delegator' as delegator, r
1147
+ from jsonb_array_elements(v_covers) c, jsonb_array_elements(v_requests) r
1148
+ where coalesce(r ->> 'requester', '') <> ''
1149
+ and c ->> 'delegator' <> r ->> 'requester'
1150
+ and (c ->> 'within' is null or c ->> 'within' = r ->> 'within')
1151
+ and (c ->> 'resources' is null or c -> 'resources' ? (r ->> 'resource'))
1152
+ and ${memberOnly}
1153
+ ),
1154
+ cover_leaves as (
1155
+ select a.delegator, a.r ->> 'within' as within, l ->> 'permission' as permission
1156
+ from applicable a, jsonb_path_query(a.r -> 'approvers', 'strict $.** ? (@.kind == "permission")') l
1157
+ )${coverManagerLeaves}
1158
+ select coalesce(jsonb_object_agg(d.delegator, jsonb_build_object(
1159
+ 'global', ${delegatorGlobal},
1160
+ 'within', ${delegatorTenant}${delegatorManages}
1161
+ )), '{}'::jsonb)
1162
+ into v_cover_facts
1163
+ from (select distinct a.delegator from applicable a) d;
1164
+ end if;
1165
+ if ${matches}(v_request -> 'approvers', v_request ->> 'within', v_request ->> 'requester', v_delegator::text, coalesce(v_cover_facts -> v_delegator::text, '{}'::jsonb)) then
1114
1166
  return next v_request ->> 'id';
1115
1167
  exit;
1116
1168
  end if;
1117
1169
  end loop;` : "";
1118
1170
  const coverDeclarations = options.delegations ? `
1119
1171
  v_covers jsonb;
1172
+ v_cover_facts jsonb;
1120
1173
  v_member text[];
1121
1174
  v_delegator ${user};` : "";
1122
1175
  return `
@@ -6,7 +6,7 @@ import { t as applyFiles } from "./files-DuV7wRim.js";
6
6
  import { n as httpRequest } from "./http-BbX_Ou3_.js";
7
7
  import { i as readJsonFile } from "./files-DAR51W3J.js";
8
8
  import { i as schemaExpression, t as emitPermissionsModule } from "./generate-5_kz2309.js";
9
- import { t as validateOpenapi } from "./schema-KPTMZVeK.js";
9
+ import { t as validateOpenapi } from "./schema-owUQ1gtu.js";
10
10
  import { existsSync, readFileSync } from "node:fs";
11
11
  import { resolve } from "node:path";
12
12
  // src/cli/openapi/import.ts
@@ -111,7 +111,7 @@ declare function customRoleClaim(roles: readonly CustomRole[], policy?: Policy):
111
111
  */
112
112
  declare function parseSnapshot(json: unknown): Snapshot;
113
113
  declare function emptySnapshot(): Snapshot;
114
- declare function fromSnapshot(input: Snapshot, options?: {
114
+ interface FromSnapshotOptions {
115
115
  readonly tenant?: string;
116
116
  readonly team?: string;
117
117
  /** The `clientBundle(policy)` of a snapshot built with `omitStatic`. */
@@ -122,7 +122,8 @@ declare function fromSnapshot(input: Snapshot, options?: {
122
122
  * nothing.
123
123
  */
124
124
  readonly customRoles?: readonly CustomRoleRecord[];
125
- }): PermDock;
125
+ }
126
+ declare function fromSnapshot(input: Snapshot, options?: FromSnapshotOptions): PermDock;
126
127
  declare function requiresApproval(approval: Grant["approval"] | undefined): boolean;
127
128
  declare function definePolicy<TUser, TPrincipal extends Principal, const Input extends PermissionTree | PolicyVocabulary, const S extends PolicyScopesInput = PolicyScopesInput>(permissions: Input, options: PolicyOptions<TUser, TPrincipal, S>): Policy<TUser, TPrincipal, VocabularyFromInput<Input>, S>;
128
129
  /**
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { $n as inherit, $t as LocalRowColumn, A as PolicyOAuthScope, An as PolicyScopesInput, Ar as Subject, At as parseSupportSession, B as SupportAccessOptions, Bn as allOf, Bt as DecideCredentialOptions, C as GrantValidity, Cn as DirectoryEvent, Cr as CustomRoleGrant, Ct as WhereCompiler, D as Policy, Dn as WireDecision, Dr as Membership, Dt as SupportSessionPolicy, E as ObligationInput, En as SinkEvent, Et as SupportSessionDecision, F as RoleBinding, Fn as Approver, Fr as Condition, Ft as CredentialPermission, G as CredentialVerifier, Gn as Grantee, Gr as SqlFunctionCondition, Gt as parseCredential, H as ValidateMode, Hn as holder, Hr as RelatedHop, Ht as credentialPolicyViolation, I as RoleOptions, In as ApproverInput, Ir as ConditionRef, It as CredentialPermissionInput, J as CustomRoleSourceFactory, Jn as RelationGrantee, Jr as isConditionDate, Jt as ClientBundle, K as CustomRoleContext, Kn as GranteeInput, Kr as hasConditionOp, L as RoleScope, Ln as ManagerApprover, Lr as ConditionValue, Lt as CredentialPolicy, M as PolicyScopes, Mn as ScopeDeclaration, Mr as ActorKind, Mt as Credential, Nn as ScopeNames, Nr as AdapterId, Nt as CredentialDecision, O as PolicyAppDataSchemas, On as WireDenial, Or as Principal, Ot as SupportSessionRequest, P as PrincipalOf, Pn as AnyOfApprover, Pr as MembershipVia, Pt as CredentialKind, Q as Intent, Qn as authenticated, Qt as LocalMembershipRows, R as SeparationConflict, Rn as PermissionApprover, Rr as MemberOfCondition, Rt as CredentialPolicyViolation, S as GrantScope, Sn as DeliveryFailureCause, Sr as CustomRole, St as VersionQuery, T as MembershipFixture, Tn as MembershipEvent, Tr as GnapAccess, Tt as SupportSession, Un as manager, Ur as RestrictedAncestors, Ut as decideCredential, V as SupportConsent, Vn as anyOf, Vr as RelatedCondition, Vt as credentialDelegation, W as WireValidity, Wn as user, Wr as SqlFunctionArg, Wt as isFeedId, X as DecisionSink, Xn as anyone, Xr as isSqlFunctionField, Xt as ExpandedSnapshot, Y as DecisionProvider, Yn as actor, Yr as isConditionRef, Yt as CustomRoleRecord, Z as EntitlementSource, Zn as assurance, Zt as LocalCustomRoleTable, _ as Grant, _n as AutomationEvent, _r as TraceSkipReason, _t as TokenSigner, a as ApprovalMode, an as SnapshotCustom, ar as Denial, at as RelationChain, b as GrantMeta, bn as DeliveryChannel, br as AuthorizationDetail, bt as VerifiedToken, c as ApprovalStage, cn as SnapshotGrantTerms, cr as DeniedDecision, ct as RelationSource, d as BreakGlassRequirements, dn as SnapshotScope, dr as LimitDetail, dt as SourceCall, en as LocalRowValue, er as plan, et as LimitConsumeInput, f as BreakGlassSpec, fn as SnapshotStatic, fr as MatchedGrant, ft as SourceContext, g as DelegationTarget, gn as AuthEvent, gr as TraceSkip, gt as TokenFailureCause, h as DelegationInput, hn as AccessEvent, hr as Trace, ht as TenantSettings, i as ApprovalFallback, in as SnapshotAssignable, ir as Decision, it as MembershipSource, jn as Scope, jr as VerifiedClaims, jt as ApiKeyPrincipal, k as PolicyDelegation, kr as SharedCustomRole, kt as decideSupportSession, l as AssuranceRequirement, ln as SnapshotListRef, lr as ExplainedDecision, lt as SettingsSource, m as ClosureGrantFn, mn as SnapshotWireAssignable, mr as Quota, mt as SubjectResolver, n as ApprovalCombine, nn as LocalSnapshotRows, nr as AppObligation, nt as LimitStore, o as ApprovalOption, on as SnapshotGrant, or as DenialDetails, ot as RelationGroup, p as ClosureContext, pn as SnapshotTenants, pr as Obligation, pt as SourceMemo, q as CustomRoleSource, qn as InheritGrantee, qr as isCondition, r as ApprovalEscalation, rn as Snapshot, rr as ApprovalRequiredDecision, rt as MemberEntry, s as ApprovalRequirement, sn as SnapshotGrantRef, sr as DenialReason, st as RelationHolder, t as ActivationOption, tn as LocalSnapshotManifest, tr as relation, tt as LimitRemaining, u as BreakGlassOptions, un as SnapshotNotEntitled, ur as GrantedDecision, ut as SnapshotSource, v as GrantCondition, vn as CredentialEvent, vr as Actor, vt as TokenVerifier, w as HostedGrantRef, wn as EmailCategory, wr as Delegation, wt as DecideSupportSessionOptions, x as GrantOptions, xn as DeliveryEvent, xr as Binding, xt as VersionContext, y as GrantLimit, yn as DecisionEvent, yr as Assurance, yt as VerificationFailure, z as SubjectOf, zn as UserApprover, zr as MemberOfParent, zt as CredentialRequest } from "./policy-types-CRWqx8qf.js";
2
2
  import { A as ResourceInit, B as ResourceXTree, D as PermissionsOf, E as PermissionTree, F as ResourceOptions, G as RESOURCE_X, H as PERMISSION_ROW, I as ResourceParent, J as MetaValue, K as AppData, L as ResourceRelation, M as ResourceLink, N as ResourceMeta, O as PermissionsOptions, P as ResourceNode, R as ResourceRelationInput, S as FieldRelation, T as PermissionKind, U as POLICY_SCOPES, V as RowOf, W as RESOURCE_NAME, _ as ComputedRelation, a as RoleTree, b as EdgeMatch, c as definePlans, d as isPlan, f as isRole, g as ActionMeta, i as RoleMeta, j as ResourceLevel, k as PrincipalRelation, l as defineRoles, m as listRoles, n as PlanTree, o as Vocabulary, p as listPlans, q as AppDataSchema, r as Role, s as VocabularyOptions, t as Plan, u as findRole, v as EdgeGroup, w as Permission, x as EdgeRelation, y as EdgeGroups, z as ResourceRestricted } from "./vocabulary-DHfKPIC5.js";
3
- import { $ as resource, $t as memoryMembershipSource, A as RoleChangeCheckInput, An as validateCustomRole, At as SignSnapshotOptions, B as ActivateInput, Bt as whoCan, C as parseCatalogEventData, Cn as CustomRoleRename, Ct as arazzoFindings, D as parseSinkEvents, Dn as customRoleClaim, Dt as RuntimeCacheLike, E as parseSinkEvent, En as ValidateCustomRoleOptions, Et as QueryableLike, F as checkRoleChange, Ft as SignPolicyDocumentOptions, G as allow, Gt as stripeEntitlementSource, H as breakGlass, Ht as MemoryRelationSourceData, I as decideRoleChange, It as signPolicyDocument, J as role, Jt as countHolders, K as deny, Kt as claimsFirst, L as normalizeMembership, Lt as Holder, M as RoleChangeOptions, Mn as context, Mt as signSnapshot, N as RoleChangeTarget, Nn as principal, Nt as snapshotClaims, O as RoleChange, On as parseCustomRoleEntry, Ot as postgresCacheVersionStore, P as RoleRules, Pt as snapshotFromClaims, Q as formerKeys, Qt as memoryEntitlementSource, R as normalizeMemberships, Rt as HoldingVia, S as SINK_EVENT_SCHEMAS, Sn as CustomRoleEntry, St as ArazzoStepResult, T as parseCloudEventBatch, Tn as ResolvedCustomRole, Tt as deliveryEvent, U as supportAccess, Ut as memoryRelationSource, V as activate, Vt as MemoryEdge, W as normalizeApproval, Wt as StripeEntitlementsClient, X as readable, Xt as APPROVAL_POLICY_UNAVAILABLE, Y as crud, Yt as isExternallyManaged, Z as writable, Zt as memoryCustomRoleSource, _ as DECISION_EVENT_SCHEMA, _n as fromSnapshot, _t as customRoleRecord, a as catalogFingerprint, an as sqlFunction, at as CustomRoleReader, b as EVENT_SCHEMA_IDS, bn as CustomRoleDrop, bt as ArazzoPlan, c as OCSF_VERSION, cn as getResource, ct as CustomRoleDecision, d as accessToOcsf, dn as mergePermissions, dt as LegacyCheck, en as memorySettingsSource, et as definePermissions, f as toOcsf, fn as RoleNameOf, ft as ShadowMismatch, g as CREDENTIAL_EVENT_SCHEMA, gn as requiresApproval, gt as readSnapshot, h as CATALOG_EVENT_SCHEMA, hn as separationConflicts, ht as localSnapshotManifest, i as canonicalJson, in as accessOutcome, it as assignableFor, j as RoleChangeDecision, jn as claim, jt as SnapshotClaims, k as RoleChangeCheck, kn as resolveCustomRole, kt as runtimeCacheVersionStore, l as OcsfAuthorizeSession, ln as isPermission, lt as decideCustomRole, m as AUTOMATION_EVENT_SCHEMA, mn as isRoleName, mt as shadowMode, n as delegatedPermissions, nn as subjectMembershipSource, nt as snapshotFor, o as CSV_COLUMNS, on as opaque, ot as CustomRoleSourceOptions, p as ACCESS_EVENT_SCHEMA, pn as definePolicy, pt as ShadowOptions, q as normalizeAssurance, qt as composeMemberships, r as sha256Digest, rn as AccessOutcome, rt as AssignableForOptions, s as toCsvRow, sn as findPermission, st as customRoleSource, t as coveredByDelegation, tn as memorySnapshotSource, tt as SnapshotForOptions, u as OcsfUserManagement, un as listPermissions, ut as mayAccess, v as DELIVERY_EVENT_SCHEMA, vn as emptySnapshot, vt as clientBundle, w as parseCloudEvent, wn as CustomRoleValidation, wt as simulateArazzo, x as MEMBERSHIP_EVENT_SCHEMA, xn as CustomRoleDropReason, xt as ArazzoSimulateInput, y as DIRECTORY_EVENT_SCHEMA, yn as parseSnapshot, yt as ArazzoFinding, z as resolveScope, zt as WhoCan } from "./index-B1hyWi7O.js";
3
+ import { $ as resource, $t as memoryMembershipSource, A as RoleChangeCheckInput, An as validateCustomRole, At as SignSnapshotOptions, B as ActivateInput, Bt as whoCan, C as parseCatalogEventData, Cn as CustomRoleRename, Ct as arazzoFindings, D as parseSinkEvents, Dn as customRoleClaim, Dt as RuntimeCacheLike, E as parseSinkEvent, En as ValidateCustomRoleOptions, Et as QueryableLike, F as checkRoleChange, Ft as SignPolicyDocumentOptions, G as allow, Gt as stripeEntitlementSource, H as breakGlass, Ht as MemoryRelationSourceData, I as decideRoleChange, It as signPolicyDocument, J as role, Jt as countHolders, K as deny, Kt as claimsFirst, L as normalizeMembership, Lt as Holder, M as RoleChangeOptions, Mn as context, Mt as signSnapshot, N as RoleChangeTarget, Nn as principal, Nt as snapshotClaims, O as RoleChange, On as parseCustomRoleEntry, Ot as postgresCacheVersionStore, P as RoleRules, Pt as snapshotFromClaims, Q as formerKeys, Qt as memoryEntitlementSource, R as normalizeMemberships, Rt as HoldingVia, S as SINK_EVENT_SCHEMAS, Sn as CustomRoleEntry, St as ArazzoStepResult, T as parseCloudEventBatch, Tn as ResolvedCustomRole, Tt as deliveryEvent, U as supportAccess, Ut as memoryRelationSource, V as activate, Vt as MemoryEdge, W as normalizeApproval, Wt as StripeEntitlementsClient, X as readable, Xt as APPROVAL_POLICY_UNAVAILABLE, Y as crud, Yt as isExternallyManaged, Z as writable, Zt as memoryCustomRoleSource, _ as DECISION_EVENT_SCHEMA, _n as fromSnapshot, _t as customRoleRecord, a as catalogFingerprint, an as sqlFunction, at as CustomRoleReader, b as EVENT_SCHEMA_IDS, bn as CustomRoleDrop, bt as ArazzoPlan, c as OCSF_VERSION, cn as getResource, ct as CustomRoleDecision, d as accessToOcsf, dn as mergePermissions, dt as LegacyCheck, en as memorySettingsSource, et as definePermissions, f as toOcsf, fn as RoleNameOf, ft as ShadowMismatch, g as CREDENTIAL_EVENT_SCHEMA, gn as requiresApproval, gt as readSnapshot, h as CATALOG_EVENT_SCHEMA, hn as separationConflicts, ht as localSnapshotManifest, i as canonicalJson, in as accessOutcome, it as assignableFor, j as RoleChangeDecision, jn as claim, jt as SnapshotClaims, k as RoleChangeCheck, kn as resolveCustomRole, kt as runtimeCacheVersionStore, l as OcsfAuthorizeSession, ln as isPermission, lt as decideCustomRole, m as AUTOMATION_EVENT_SCHEMA, mn as isRoleName, mt as shadowMode, n as delegatedPermissions, nn as subjectMembershipSource, nt as snapshotFor, o as CSV_COLUMNS, on as opaque, ot as CustomRoleSourceOptions, p as ACCESS_EVENT_SCHEMA, pn as definePolicy, pt as ShadowOptions, q as normalizeAssurance, qt as composeMemberships, r as sha256Digest, rn as AccessOutcome, rt as AssignableForOptions, s as toCsvRow, sn as findPermission, st as customRoleSource, t as coveredByDelegation, tn as memorySnapshotSource, tt as SnapshotForOptions, u as OcsfUserManagement, un as listPermissions, ut as mayAccess, v as DELIVERY_EVENT_SCHEMA, vn as emptySnapshot, vt as clientBundle, w as parseCloudEvent, wn as CustomRoleValidation, wt as simulateArazzo, x as MEMBERSHIP_EVENT_SCHEMA, xn as CustomRoleDropReason, xt as ArazzoSimulateInput, y as DIRECTORY_EVENT_SCHEMA, yn as parseSnapshot, yt as ArazzoFinding, z as resolveScope, zt as WhoCan } from "./index-Cnrz9ChE.js";
4
4
  import { a as OperationInput, c as defineOperations, d as isOperationRisk, i as OperationEffect, l as OPERATION_RISKS, n as OperationData, o as OperationMap, r as OperationDefinition, s as OperationMeta, t as Operation, u as OperationRisk } from "./operations-DaEoGpMV.js";
5
5
  import { A as InstanceCacheStats, B as ApprovalPolicyValidation, C as Limits, D as InstanceCache, E as CustomRoleOwner, F as PermissionState, H as memoryApprovalPolicySource, I as ApprovalPolicies, L as ApprovalPolicy, M as GrantedPermissionsOptions, N as isGlobalPermission, O as InstanceCacheKey, P as PermissionCheck, R as ApprovalPolicyProblem, S as PermittedScopeIdsOptions, T as memoryLimitStore, U as validateApprovalPolicy, V as approvalPolicies, _ as PrincipalIdentityLink, a as PermDock, b as MembershipFilter, c as RowPair, d as UncheckedData, f as WhereOptions, g as PrincipalIdentity, h as getPermDockSync, i as LoadedRows, j as instanceCache, k as InstanceCacheOptions, l as SimulateOptions, m as getPermDock, n as DecideOptions, o as PermDockOptions, p as WhereResult, r as DeriveOptions, s as RowData, t as DecideIdsOptions, u as SnapshotOptions, v as PrincipalSource, w as limits, x as PermittedIdsOptions, y as memoryPrincipalSource, z as ApprovalPolicySource } from "./permdock-NJ4-pCZy.js";
6
6
  import { d as memoryPolicySource, f as mergeHostedGrants, i as HostedGrantDropped, l as hostedPolicies, m as policyDocumentFromClaims, o as PolicyDocument, p as parsePolicyDocument, r as HostedGrantDropReason, s as PolicySource, t as HostedGrant, u as isPortableCondition } from "./hosted-Cl7q35D-.js";