permdock 0.2.0 → 0.3.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 (192) hide show
  1. package/dist/a2a/index.d.ts +4 -4
  2. package/dist/a2a/index.js +2 -2
  3. package/dist/ai-sdk/index.d.ts +3 -3
  4. package/dist/ai-sdk/index.js +1 -1
  5. package/dist/approvals/index.d.ts +2 -2
  6. package/dist/{arazzo-cmvX2jDe.js → arazzo-CKwwqFWz.js} +1 -1
  7. package/dist/authzen/index.d.ts +3 -3
  8. package/dist/authzen/index.js +1 -1
  9. package/dist/better-auth/index.d.ts +1 -1
  10. package/dist/better-supabase/index.d.ts +27 -10
  11. package/dist/better-supabase/index.js +44 -16
  12. package/dist/{bind-CVy3Espv.d.ts → bind-C_ob3LKa.d.ts} +5 -5
  13. package/dist/{bind-VnYn2HKq.js → bind-CuzGytRf.js} +1 -1
  14. package/dist/{capability-Dq43tT1u.d.ts → capability-2kYTMWDv.d.ts} +1 -1
  15. package/dist/catalog-CRW5Mx_B.js +2 -0
  16. package/dist/{catalog-z8q6bi_r.js → catalog-DWF5cYqB.js} +2 -2
  17. package/dist/{catalog-h2tlKFkq.js → catalog-dFZdWCGN.js} +2 -2
  18. package/dist/{catalog-doc-Dsc9y7sd.js → catalog-doc-DdGm82XT.js} +3 -26
  19. package/dist/claude-agent/index.d.ts +3 -3
  20. package/dist/claude-agent/index.js +1 -1
  21. package/dist/clerk/index.d.ts +2 -2
  22. package/dist/cli/bin.js +1 -1
  23. package/dist/cli/index.d.ts +1 -1
  24. package/dist/cli/index.js +1 -1
  25. package/dist/cloud/index.d.ts +4 -4
  26. package/dist/{cloud-BGhHS-lY.js → cloud-CB_ELYuX.js} +2 -2
  27. package/dist/{cloud-Bo3e9Ak3.js → cloud-DWLXO2af.js} +3 -3
  28. package/dist/{collect-DLlujdHC.js → collect-DClJsheJ.js} +3 -3
  29. package/dist/{collect-DDDv_ESs.js → collect-DSTE3ml9.js} +1 -1
  30. package/dist/collect-DSWOk19R.js +2 -0
  31. package/dist/{commands-DWOrSQic.js → commands-DSxCqG9A.js} +13 -13
  32. package/dist/compile/index.d.ts +1 -1
  33. package/dist/{compile-CNnl6uIt.d.ts → compile-BkRyBDBw.d.ts} +1 -1
  34. package/dist/{config-Bn00Z3ks.js → config-Dnszbv-6.js} +2 -2
  35. package/dist/{config-report-Dw_JcUqT.js → config-report-DMvWKUxL.js} +4 -4
  36. package/dist/{context-Ttp0ekMT.js → context-Bcy85rGi.js} +2 -2
  37. package/dist/convex/index.d.ts +3 -3
  38. package/dist/convex/index.js +1 -1
  39. package/dist/{create-BWyx3jua.d.ts → create-B1d519XK.d.ts} +5 -5
  40. package/dist/{create-CPhDL6qx.js → create-CMwIl-w2.js} +1 -1
  41. package/dist/{describe-PdoqESvg.d.ts → describe-DMYiCjJV.d.ts} +1 -1
  42. package/dist/{diff-B8Tunc3o.js → diff-2VaeChzX.js} +3 -3
  43. package/dist/{diff-CzqLxZ77.js → diff-DBIhz_f2.js} +2 -2
  44. package/dist/{doctor-rOr-4ZfS.js → doctor-BwCAMLx_.js} +2 -2
  45. package/dist/{doctor-collect-ByfYlNv1.js → doctor-collect-CHk6XWOA.js} +10 -9
  46. package/dist/{doctor-WpvG6p4k.js → doctor-igIiM_Hl.js} +10 -10
  47. package/dist/drizzle/index.d.ts +2 -2
  48. package/dist/elysia/index.d.ts +3 -3
  49. package/dist/elysia/index.js +1 -1
  50. package/dist/{errors-DAqevpNk.d.ts → errors-DPdqI50v.d.ts} +2 -2
  51. package/dist/eve/index.d.ts +3 -3
  52. package/dist/eve/index.js +1 -1
  53. package/dist/express/index.d.ts +3 -3
  54. package/dist/express/index.js +1 -1
  55. package/dist/fastify/index.d.ts +3 -3
  56. package/dist/fastify/index.js +1 -1
  57. package/dist/{from-snapshot-C3sHpZNS.js → from-snapshot-CTLijvdm.js} +1 -0
  58. package/dist/hono/index.d.ts +3 -3
  59. package/dist/hono/index.js +1 -1
  60. package/dist/{index-CtE07CBF.d.ts → index-0nNqHspG.d.ts} +2 -2
  61. package/dist/{index-D3vbkoSI.d.ts → index-BNc7Wer_.d.ts} +1 -1
  62. package/dist/{index-D6_cSa1z.d.ts → index-C7Tw7MaW.d.ts} +2 -2
  63. package/dist/{index-A0YNL8jZ.d.ts → index-C8z4RjQV.d.ts} +1 -1
  64. package/dist/index.d.ts +10 -10
  65. package/dist/index.js +3 -3
  66. package/dist/{instance-options-BK_rNOSC.d.ts → instance-options-jARdwfPN.d.ts} +1 -1
  67. package/dist/jwt/index.d.ts +4 -4
  68. package/dist/{kernel-GSQnMz3O.js → kernel-_RRHmnMY.js} +1 -1
  69. package/dist/kysely/index.d.ts +2 -2
  70. package/dist/mcp/index.d.ts +6 -6
  71. package/dist/mcp/index.js +2 -2
  72. package/dist/nest/index.d.ts +3 -3
  73. package/dist/nest/index.js +1 -1
  74. package/dist/next/index.d.ts +5 -5
  75. package/dist/next/index.js +1 -1
  76. package/dist/next/plugin.d.ts +1 -1
  77. package/dist/next/plugin.js +1 -1
  78. package/dist/node/index.d.ts +3 -3
  79. package/dist/node/index.js +1 -1
  80. package/dist/openai/index.d.ts +3 -3
  81. package/dist/openai/index.js +1 -1
  82. package/dist/openapi/index.d.ts +2 -2
  83. package/dist/{openapi-Bbg4wGVL.js → openapi-l0xYHkcv.js} +1 -1
  84. package/dist/orpc/index.d.ts +4 -4
  85. package/dist/orpc/index.js +2 -2
  86. package/dist/otel/index.d.ts +2 -2
  87. package/dist/{parse-local-manifest-BkGQNzAh.d.ts → parse-local-manifest-JLnaBH0S.d.ts} +1 -1
  88. package/dist/pdp/index.d.ts +2 -2
  89. package/dist/pdp/index.js +1 -1
  90. package/dist/{permdock-CzqXjCpU.js → permdock-CbgvLnuo.js} +35 -27
  91. package/dist/{permissions-CpZrivYv.js → permissions-RJrovw98.js} +1 -1
  92. package/dist/{policy-D8UFyERw.d.ts → policy-D2W7uv19.d.ts} +1 -1
  93. package/dist/{policy-CFZAr_Al.d.ts → policy-IB6yxpC3.d.ts} +21 -5
  94. package/dist/{powersync-C7kLglqX.js → powersync-BylawD_U.js} +7 -7
  95. package/dist/{powersync-yW1UUFzp.js → powersync-DliZK_-y.js} +2 -2
  96. package/dist/powersync-e_AZrKbg.js +2 -0
  97. package/dist/prisma/index.d.ts +1 -1
  98. package/dist/{problem-details-CkL50EEf.d.ts → problem-details-DX075l9V.d.ts} +1 -1
  99. package/dist/{protected-CNsMzrVd.d.ts → protected-BdnIEFkY.d.ts} +3 -3
  100. package/dist/{protected-Cs6kTaHo.js → protected-utU-SLuy.js} +1 -1
  101. package/dist/{protected-bZs6rbT1.d.ts → protected-xAr24FEC.d.ts} +3 -3
  102. package/dist/{provider-DLzpb2Xz.js → provider-CSQd7m92.js} +2 -2
  103. package/dist/{provider-Cjr62YMV.d.ts → provider-DZY281jO.d.ts} +1 -1
  104. package/dist/{provider-store-DNyC1y48.js → provider-store-Cfbvo4DE.js} +2 -2
  105. package/dist/react/index.d.ts +6 -6
  106. package/dist/react/index.js +2 -2
  107. package/dist/react/provider-client.d.ts +1 -1
  108. package/dist/react/provider-client.js +1 -1
  109. package/dist/react-native/index.d.ts +8 -8
  110. package/dist/react-native/index.js +3 -3
  111. package/dist/{replay-sqBGMnNs.d.ts → replay-CYyiLiwO.d.ts} +1 -1
  112. package/dist/{rls-CEvs64Kj.js → rls-B4ur8nKQ.js} +2 -2
  113. package/dist/{rls-BMNydpHk.js → rls-DQtdgTHB.js} +12 -12
  114. package/dist/{rls-fields-BMasREhR.js → rls-fields-74oZPXWL.js} +84 -4
  115. package/dist/{rls-graph-pc9fuXYm.js → rls-graph-CHwx0V8q.js} +2 -2
  116. package/dist/{rls-import-D8F7j35Q.js → rls-import-BTFVk3jH.js} +2 -2
  117. package/dist/{rls-migrate-7wikfrVI.js → rls-migrate-CN4TlJTO.js} +2 -2
  118. package/dist/{rls-ownership-B5Lkq62W.js → rls-ownership-RuFqaqGz.js} +3 -3
  119. package/dist/{rls-shared-aOQ4hGTO.js → rls-shared-Cewd_-zI.js} +4 -2
  120. package/dist/{rls-verify-D8B7dOTh.js → rls-verify-CVQTHTh5.js} +8 -7
  121. package/dist/row-conditions-h2HythXQ.js +27 -0
  122. package/dist/{rpc-DOK54_CS.js → rpc-DL9Sqvb1.js} +1 -1
  123. package/dist/{run-YXCJDNYk.js → run-DKDbM4Du.js} +1 -1
  124. package/dist/{saas-Bj_FFkjN.js → saas-DhpJjnBA.js} +2 -2
  125. package/dist/scim/index.d.ts +1 -1
  126. package/dist/server/index.d.ts +6 -6
  127. package/dist/server/index.js +1 -1
  128. package/dist/{sink-Gs6TTVa-.d.ts → sink-B1fZzIMf.d.ts} +1 -1
  129. package/dist/{skills-JaymNCdK.js → skills-Bx-U0irG.js} +1 -1
  130. package/dist/{snapshot-cache-DwQH8ufx.d.ts → snapshot-cache-B-LxUahj.d.ts} +1 -1
  131. package/dist/solid/index.d.ts +4 -4
  132. package/dist/solid/index.js +2 -2
  133. package/dist/{sources-B0UvrJ21.js → sources-4p0-4xQm.js} +12 -1
  134. package/dist/{sources-BcJgw0lt.d.ts → sources-BdOYLw9j.d.ts} +2 -2
  135. package/dist/{src-CSbUiozF.js → src-BDwEZWrZ.js} +1 -1
  136. package/dist/ssf/index.d.ts +3 -3
  137. package/dist/{store-D_pjn91-.d.ts → store-jOBYpiXC.d.ts} +2 -2
  138. package/dist/{store-options-yO0V6gRn.js → store-options-ByhZq1jV.js} +1 -1
  139. package/dist/{stores-4_sqiOA1.js → stores-BT2pSCub.js} +1 -1
  140. package/dist/{stores-DVR5NHLE.d.ts → stores-C0IMQrGI.d.ts} +2 -2
  141. package/dist/{stream-DlvG2hs-.d.ts → stream-D1RXubw2.d.ts} +1 -1
  142. package/dist/supabase/index.d.ts +15 -4
  143. package/dist/supabase/index.js +2 -2
  144. package/dist/supabase/middleware.d.ts +4 -4
  145. package/dist/supabase/middleware.js +2 -2
  146. package/dist/{supabase-CwafwxxF.js → supabase-Boqb9a_Y.js} +2 -2
  147. package/dist/{supabase-DTBaC20O.js → supabase-C0qESOa-.js} +7 -5
  148. package/dist/{supabase-config-Bs44dare.js → supabase-config-BpPXt3x1.js} +1 -1
  149. package/dist/supabase-hook-6sYLXg_u.js +2 -0
  150. package/dist/{supabase-hook-BuxLQLpU.js → supabase-hook-CSLQ4zJ3.js} +55 -9
  151. package/dist/{supautils-DYZnzRWV.js → supautils-Cn4R4cJ4.js} +1 -1
  152. package/dist/svelte/index.d.ts +5 -5
  153. package/dist/svelte/index.js +2 -2
  154. package/dist/svelte/runtime.d.ts +2 -2
  155. package/dist/svelte/runtime.js +1 -1
  156. package/dist/svelte/source.d.ts +5 -5
  157. package/dist/svelte/source.js +1 -1
  158. package/dist/terminal/index.d.ts +4 -4
  159. package/dist/terminal/index.js +1 -1
  160. package/dist/testing/index.d.ts +5 -5
  161. package/dist/testing/index.js +5 -5
  162. package/dist/testing/saas/index.d.ts +2 -2
  163. package/dist/testing/saas/index.js +2 -2
  164. package/dist/testing/saas/permissions.js +1 -1
  165. package/dist/trpc/index.d.ts +4 -4
  166. package/dist/trpc/index.js +2 -2
  167. package/dist/{types-C3s9xVJG.d.ts → types-BnIEz1sU.d.ts} +1 -1
  168. package/dist/{types-yF5LmQVD.d.ts → types-C97IskBw.d.ts} +1 -1
  169. package/dist/{types-kxznc7cn.d.ts → types-CKNSyIf_.d.ts} +1 -1
  170. package/dist/{types-9AWO9EGt.d.ts → types-Cq_H8N_X.d.ts} +2 -2
  171. package/dist/{types-BPxgszlT.d.ts → types-DbjRN55U.d.ts} +15 -2
  172. package/dist/{types-BVyImy5I.d.ts → types-DxiCGmmd.d.ts} +1 -1
  173. package/dist/{types-vNSDF7Dq.d.ts → types-QCuYJh4q.d.ts} +1 -1
  174. package/dist/{types-vKyAMtcX.d.ts → types-aqOHTHcp.d.ts} +1 -1
  175. package/dist/unplugin/index.d.ts +1 -1
  176. package/dist/unplugin/index.js +1 -1
  177. package/dist/usage-DorAJiU_.js +2 -0
  178. package/dist/{usage-D07N9QJ3.js → usage-GTixvDDU.js} +2 -2
  179. package/dist/{usage-DG1oeCca.js → usage-ItS7nLcl.js} +2 -2
  180. package/dist/{validation-error-CtF23SrC.d.ts → validation-error-Ba264OaJ.d.ts} +1 -1
  181. package/dist/vue/index.d.ts +4 -4
  182. package/dist/vue/index.js +2 -2
  183. package/dist/watch-BwxLTYMZ.js +2 -0
  184. package/dist/{watch-UihESpsJ.js → watch-DVBJ9cBq.js} +1 -1
  185. package/dist/webmcp/index.d.ts +1 -1
  186. package/package.json +3 -3
  187. package/dist/catalog-BjZSovXQ.js +0 -2
  188. package/dist/collect-rG2IQ3t0.js +0 -2
  189. package/dist/powersync-A8x_Yyvh.js +0 -2
  190. package/dist/supabase-hook-D5qVd_D8.js +0 -2
  191. package/dist/usage-D82l1CwK.js +0 -2
  192. package/dist/watch-Etoa_Mvr.js +0 -2
@@ -1,8 +1,8 @@
1
- import { C as Policy, Nr as Principal, Tr as AuthorizationDetail } from "../policy-CFZAr_Al.js";
1
+ import { C as Policy, Nr as Principal, Tr as AuthorizationDetail } from "../policy-IB6yxpC3.js";
2
2
  import { f as Permission } from "../permissions-DttnqqxC.js";
3
- import { f as ApprovalStore } from "../types-vKyAMtcX.js";
4
- import { a as ProblemDetails } from "../errors-DAqevpNk.js";
5
- import { t as InstanceOptions } from "../instance-options-BK_rNOSC.js";
3
+ import { f as ApprovalStore } from "../types-aqOHTHcp.js";
4
+ import { a as ProblemDetails } from "../errors-DPdqI50v.js";
5
+ import { t as InstanceOptions } from "../instance-options-jARdwfPN.js";
6
6
  //#region src/a2a/types.d.ts
7
7
  type A2aAuth = {
8
8
  readonly clientId?: string;
package/dist/a2a/index.js CHANGED
@@ -2,12 +2,12 @@ import { t as compact } from "../compact-y6vfu2_f.js";
2
2
  import { n as PermDockDeniedError, t as PermDockApprovalRequiredError } from "../errors-Cz5zn0mW.js";
3
3
  import { t as canonicalJson } from "../canonical-json-DemiK4Vp.js";
4
4
  import { t as bytesToBase64Url } from "../sha256-BO0swRXL.js";
5
- import { i as scopesReaching, r as challengeScope } from "../permdock-CzqXjCpU.js";
5
+ import { i as scopesReaching, r as challengeScope } from "../permdock-CbgvLnuo.js";
6
6
  import { n as resourceRef } from "../resource-ref-CaS9yVPi.js";
7
7
  import { t as mayUse } from "../may-use-DndQ5tQ-.js";
8
8
  import { d as wwwAuthenticate, n as bearerChallenge } from "../problem-B43ztKIm.js";
9
9
  import { t as instanceOptions } from "../instance-options-Dhhcnm3y.js";
10
- import { n as createAgentKernel } from "../kernel-GSQnMz3O.js";
10
+ import { n as createAgentKernel } from "../kernel-_RRHmnMY.js";
11
11
  //#region src/a2a/create.ts
12
12
  function firstScheme(options) {
13
13
  return Object.keys(options.securitySchemes)[0];
@@ -1,7 +1,7 @@
1
- import { C as Policy, Nr as Principal, kr as Delegation } from "../policy-CFZAr_Al.js";
1
+ import { C as Policy, Nr as Principal, kr as Delegation } from "../policy-IB6yxpC3.js";
2
2
  import { f as Permission } from "../permissions-DttnqqxC.js";
3
- import { f as ApprovalStore } from "../types-vKyAMtcX.js";
4
- import { t as InstanceOptions } from "../instance-options-BK_rNOSC.js";
3
+ import { f as ApprovalStore } from "../types-aqOHTHcp.js";
4
+ import { t as InstanceOptions } from "../instance-options-jARdwfPN.js";
5
5
  import { t as ToolMap } from "../types-Bvc4oWT6.js";
6
6
  //#region src/ai-sdk/create.d.ts
7
7
  type AiSdkContext = {
@@ -1,7 +1,7 @@
1
1
  import { t as compact } from "../compact-y6vfu2_f.js";
2
2
  import { n as PermDockDeniedError, t as PermDockApprovalRequiredError } from "../errors-Cz5zn0mW.js";
3
3
  import { t as instanceOptions } from "../instance-options-Dhhcnm3y.js";
4
- import { n as createAgentKernel, t as approvalTokenOf } from "../kernel-GSQnMz3O.js";
4
+ import { n as createAgentKernel, t as approvalTokenOf } from "../kernel-_RRHmnMY.js";
5
5
  //#region src/ai-sdk/create.ts
6
6
  const APPROVAL_STATUSES = /* @__PURE__ */ new Set([
7
7
  "approved",
@@ -1,3 +1,3 @@
1
- import { _ as approverRelationKey, a as ApprovalListFilter, c as ApprovalRequest, d as ApprovalStatus, f as ApprovalStore, g as approvalQuorum, h as DEFAULT_APPROVAL_TTL_MS, i as ApprovalInspectResult, l as ApprovalResumeFailure, m as ApprovalVerdict, n as ApprovalApprovers, o as ApprovalListQuery, p as ApprovalSubjectSummary, r as ApprovalCancelMeta, s as ApprovalPage, t as APPROVAL_HEADER, u as ApprovalSignature, v as escalationOpenAt } from "../types-vKyAMtcX.js";
2
- import { C as ApproverRelationsOptions, D as ApprovalError, E as approvalsHandler, O as ApprovalErrorCode, S as vouchApproval, T as ApprovalsHandlerOptions, _ as resolveApproval, a as approverPermissions, b as storedApprovalToken, c as decodeApprovalCursor, d as pageApprovals, f as cancelApprovals, g as requestApproval, h as readApprovalHeader, i as memoryApprovalStore, k as isApprovalError, l as encodeApprovalCursor, m as inspectApproval, n as applyApprovalVerdict, o as ApprovalCursorPosition, p as consumeApproval, r as assertApprover, s as approvalPageSize, t as MemoryApprovalStore, u as listAllApprovals, v as resumeDecision, w as approverRelations, x as summariseSubject, y as resumeFromHeader } from "../index-D6_cSa1z.js";
1
+ import { _ as approverRelationKey, a as ApprovalListFilter, c as ApprovalRequest, d as ApprovalStatus, f as ApprovalStore, g as approvalQuorum, h as DEFAULT_APPROVAL_TTL_MS, i as ApprovalInspectResult, l as ApprovalResumeFailure, m as ApprovalVerdict, n as ApprovalApprovers, o as ApprovalListQuery, p as ApprovalSubjectSummary, r as ApprovalCancelMeta, s as ApprovalPage, t as APPROVAL_HEADER, u as ApprovalSignature, v as escalationOpenAt } from "../types-aqOHTHcp.js";
2
+ import { C as ApproverRelationsOptions, D as ApprovalError, E as approvalsHandler, O as ApprovalErrorCode, S as vouchApproval, T as ApprovalsHandlerOptions, _ as resolveApproval, a as approverPermissions, b as storedApprovalToken, c as decodeApprovalCursor, d as pageApprovals, f as cancelApprovals, g as requestApproval, h as readApprovalHeader, i as memoryApprovalStore, k as isApprovalError, l as encodeApprovalCursor, m as inspectApproval, n as applyApprovalVerdict, o as ApprovalCursorPosition, p as consumeApproval, r as assertApprover, s as approvalPageSize, t as MemoryApprovalStore, u as listAllApprovals, v as resumeDecision, w as approverRelations, x as summariseSubject, y as resumeFromHeader } from "../index-C7Tw7MaW.js";
3
3
  export { APPROVAL_HEADER, type ApprovalApprovers, type ApprovalCancelMeta, type ApprovalCursorPosition, ApprovalError, type ApprovalErrorCode, type ApprovalInspectResult, type ApprovalListFilter, type ApprovalListQuery, type ApprovalPage, type ApprovalRequest, type ApprovalResumeFailure, type ApprovalSignature, type ApprovalStatus, type ApprovalStore, type ApprovalSubjectSummary, type ApprovalVerdict, type ApprovalsHandlerOptions, type ApproverRelationsOptions, DEFAULT_APPROVAL_TTL_MS, type MemoryApprovalStore, applyApprovalVerdict, approvalPageSize, approvalQuorum, approvalsHandler, approverPermissions, approverRelationKey, approverRelations, assertApprover, cancelApprovals, consumeApproval, decodeApprovalCursor, encodeApprovalCursor, escalationOpenAt, inspectApproval, isApprovalError, listAllApprovals, memoryApprovalStore, pageApprovals, readApprovalHeader, requestApproval, resolveApproval, resumeDecision, resumeFromHeader, storedApprovalToken, summariseSubject, vouchApproval };
@@ -1,4 +1,4 @@
1
- import { a as listArg, i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-DWOrSQic.js";
1
+ import { a as listArg, i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-DSxCqG9A.js";
2
2
  import { defineCommand } from "citty";
3
3
  //#region src/cli/commands/arazzo.ts
4
4
  function arazzo(ctx) {
@@ -1,6 +1,6 @@
1
- import { C as Policy, Nr as Principal } from "../policy-CFZAr_Al.js";
2
- import { f as ApprovalStore } from "../types-vKyAMtcX.js";
3
- import { t as InstanceOptions } from "../instance-options-BK_rNOSC.js";
1
+ import { C as Policy, Nr as Principal } from "../policy-IB6yxpC3.js";
2
+ import { f as ApprovalStore } from "../types-aqOHTHcp.js";
3
+ import { t as InstanceOptions } from "../instance-options-jARdwfPN.js";
4
4
  //#region src/authzen/types.d.ts
5
5
  type AuthzenResourceAdapter = {
6
6
  readonly load?: (id: string) => unknown;
@@ -1,7 +1,7 @@
1
1
  import { t as compact } from "../compact-y6vfu2_f.js";
2
2
  import { E as ownGet, _ as listPermissions, c as getResource } from "../permissions-DVoF6dMt.js";
3
3
  import { t as PROBLEM_BASE } from "../validation-error-CnjZ4t92.js";
4
- import { t as createPermDock$1 } from "../permdock-CzqXjCpU.js";
4
+ import { t as createPermDock$1 } from "../permdock-CbgvLnuo.js";
5
5
  import { n as resourceRef } from "../resource-ref-CaS9yVPi.js";
6
6
  import { n as hasCredentials } from "../http-SO7qGttf.js";
7
7
  import { i as methodNotAllowed, l as unauthenticatedProblem, s as problemResponse, t as batchTooLarge, u as validationProblem } from "../problem-B43ztKIm.js";
@@ -1,4 +1,4 @@
1
- import { Nr as Principal, Pr as Subject, at as DecisionSink, k as RoleBinding, xt as RoleSource } from "../policy-CFZAr_Al.js";
1
+ import { Nr as Principal, Pr as Subject, at as DecisionSink, k as RoleBinding, xt as RoleSource } from "../policy-IB6yxpC3.js";
2
2
  import { m as PermissionTree } from "../permissions-DttnqqxC.js";
3
3
  import { StandardSchemaV1 } from "@standard-schema/spec";
4
4
  //#region src/better-auth/types.d.ts
@@ -1,6 +1,6 @@
1
- import { $t as CredentialPrincipal, Pr as Subject, ln as PermDock, nt as CredentialVerifier } from "../policy-CFZAr_Al.js";
1
+ import { $t as CredentialPrincipal, C as Policy, Pr as Subject, ln as PermDock, nt as CredentialVerifier } from "../policy-IB6yxpC3.js";
2
2
  import { f as Permission, m as PermissionTree } from "../permissions-DttnqqxC.js";
3
- import { g as SupabaseSubjectOptions, m as SupabaseSessionLike, u as SupabasePrincipal } from "../types-yF5LmQVD.js";
3
+ import { g as SupabaseSubjectOptions, m as SupabaseSessionLike, u as SupabasePrincipal } from "../types-C97IskBw.js";
4
4
  import { AuthorizationProvider } from "better-supabase/config";
5
5
  import { AccessTopicPolicy } from "better-supabase/realtime";
6
6
  import { AccessBucketPolicy } from "better-supabase/storage";
@@ -42,16 +42,32 @@ type AuthorizationProviderOptions = {
42
42
  export declare function authorizationProvider(options: AuthorizationProviderOptions): AuthorizationProvider;
43
43
  //#endregion
44
44
  //#region src/better-supabase/policies.d.ts
45
- type AccessPolicyOptions = {
46
- /** `permdock.manifest.json`, parsed or as JSON text: it names the helpers' schema and the scopes. */
47
- readonly manifest: unknown;
48
- /** `permissions.catalog.json`: only keys it marks `rowConditions: false` are accepted. */
49
- readonly catalog: unknown;
50
- /** A scope in the manifest's `rls.scopes`, or `platform` for permissions granted globally. */
45
+ type AccessScope = {
46
+ /** A scope in the policy's scopes (or the manifest's `rls.scopes`), or `platform` for permissions granted globally. */
51
47
  readonly scope: string;
52
48
  /** 1-based path or topic segment holding the scope id; better-supabase's default is the `{organizationId}` segment. */
53
49
  readonly segment?: number;
54
50
  };
51
+ /**
52
+ * Either the policy the app already defines, or the two files the CLI writes.
53
+ * With `policy` nothing is read at runtime: the scopes, the row conditions and
54
+ * the scopes a permission is granted at come from the definitions.
55
+ */
56
+ type AccessPolicyOptions = AccessScope & ({
57
+ /** `permdock.manifest.json`, parsed or as JSON text: it names the helpers' schema and the scopes. */
58
+ readonly manifest: unknown;
59
+ /** `permissions.catalog.json`: only keys it marks `rowConditions: false` are accepted. */
60
+ readonly catalog: unknown;
61
+ readonly policy?: undefined;
62
+ readonly schema?: undefined;
63
+ } | {
64
+ /** The `definePolicy` result: only keys with no row condition in it are accepted. */
65
+ readonly policy: Policy;
66
+ /** The schema `rls generate` put the helpers in (`rls.schema`). Default `permdock`. */
67
+ readonly schema?: string;
68
+ readonly manifest?: undefined;
69
+ readonly catalog?: undefined;
70
+ });
55
71
  type BucketAccess = {
56
72
  /** Downloads, signed URLs, renders and metadata reads. */
57
73
  readonly read: Permission;
@@ -69,8 +85,9 @@ type TopicAccess = {
69
85
  /**
70
86
  * A better-supabase bucket `policy` that checks PermDock permissions with
71
87
  * the `rls generate` helpers at `scope`. The helpers check role and scope
72
- * only, so a permission the catalog doesn't mark `rowConditions: false`, or
73
- * doesn't grant at `scope`, throws.
88
+ * only, so a permission with row conditions (`rowConditions: true` in the
89
+ * catalog, or a conditioned grant in `policy`), or one not granted at
90
+ * `scope`, throws.
74
91
  */
75
92
  export declare function bucketPolicy(access: BucketAccess, options: AccessPolicyOptions): AccessBucketPolicy;
76
93
  /** As {@link bucketPolicy}, for a better-supabase Realtime topic. */
@@ -1,9 +1,12 @@
1
1
  import { n as freezeDeep } from "../freeze-CrU8nQeX.js";
2
2
  import { _ as listPermissions, p as isPermission } from "../permissions-DVoF6dMt.js";
3
+ import { d as scopeList } from "../scopes-CVdPrWN-.js";
3
4
  import { t as anonymousSubject } from "../subject-C6dLxqHU.js";
4
5
  import { t as mayUse } from "../may-use-DndQ5tQ-.js";
5
6
  import { o as parseCredential, r as credentialSubject } from "../credential-8P81ff4u.js";
7
+ import { t as policyRowConditionKeys } from "../row-conditions-h2HythXQ.js";
6
8
  import { i as quoteSqlLiteral, o as sqlIdent } from "../sql-xdg5f4Fi.js";
9
+ import "../sources-4p0-4xQm.js";
7
10
  import { o as subjectFromSupabaseSession, t as parseSupabaseManifest } from "../manifest-iaoBXHKc.js";
8
11
  import { t as parseCatalog } from "../parse-BuyjxhZV.js";
9
12
  import { AsyncResult, dbError } from "better-supabase";
@@ -314,25 +317,49 @@ function authorizationProvider(options) {
314
317
  //#region src/better-supabase/policies.ts
315
318
  /** PermDock splits a key with row conditions into `key#1`, `key#2`, ... in the policies it generates. */
316
319
  const SPLIT_KEY = /#\d+$/u;
317
- function checkedKey(where, permission, catalog, scope) {
320
+ function checkedKey(where, permission, facts, scope) {
318
321
  const key = permission.key;
319
322
  if (SPLIT_KEY.test(key)) throw new TypeError(`PermDock: ${where} "${key}" is one part of a permission split by row condition. Use the policies \`permdock rls generate\` writes for it.`);
320
- const entry = catalog.permissions.find((candidate) => candidate.key === key);
321
- if (!entry) throw new TypeError(`PermDock: ${where} "${key}" is not in permissions.catalog.json. Run \`permdock catalog\`.`);
323
+ const entry = facts(key);
324
+ if (!entry.known) throw new TypeError(`PermDock: ${where} "${key}" is not in permissions.catalog.json. Run \`permdock catalog\`.`);
322
325
  if (entry.rowConditions) throw new TypeError(`PermDock: ${where} "${key}" has row conditions (rowConditions: true), which the SQL helpers don't check, so the policy would grant every object in the scope. Use the policies \`permdock rls generate\` writes for it.`);
323
326
  const grantScope = scope === "platform" ? "global" : scope;
324
- const scopes = (catalog.grants ?? []).flatMap((grant) => grant.permission === key && typeof grant.scope === "string" ? [grant.scope] : []);
327
+ const scopes = entry.grantScopes;
325
328
  if (scopes.length > 0 && !scopes.includes(grantScope)) throw new TypeError(`PermDock: ${where} "${key}" is granted at ${[...new Set(scopes)].join(", ")}, not at ${grantScope}. Check it at one of those scopes.`);
326
329
  return key;
327
330
  }
328
331
  function target(options) {
329
- const manifest = parseSupabaseManifest(options.manifest);
330
- const catalog = parseCatalog(options.catalog);
331
- const names = manifest.rls.scopes.map((scope) => scope.name);
332
- if (options.scope !== "platform" && !names.includes(options.scope)) throw new TypeError(`PermDock: scope "${options.scope}" is not in the manifest's rls.scopes (${names.join(", ")}) and is not "platform".`);
333
- const schema = sqlIdent(manifest.rls.schema);
332
+ const policy = options.policy;
333
+ let names;
334
+ let schemaName;
335
+ let facts;
336
+ if (policy === void 0) {
337
+ const manifest = parseSupabaseManifest(options.manifest);
338
+ const catalog = parseCatalog(options.catalog);
339
+ names = manifest.rls.scopes.map((scope) => scope.name);
340
+ schemaName = manifest.rls.schema;
341
+ facts = (key) => {
342
+ const entry = catalog.permissions.find((candidate) => candidate.key === key);
343
+ return {
344
+ known: entry !== void 0,
345
+ rowConditions: entry?.rowConditions === true,
346
+ grantScopes: (catalog.grants ?? []).flatMap((grant) => grant.permission === key && typeof grant.scope === "string" ? [grant.scope] : [])
347
+ };
348
+ };
349
+ } else {
350
+ names = scopeList(policy.scopes).map((scope) => scope.name);
351
+ schemaName = options.schema ?? "permdock";
352
+ const conditioned = policyRowConditionKeys(policy);
353
+ facts = (key) => ({
354
+ known: true,
355
+ rowConditions: conditioned.has(key),
356
+ grantScopes: policy.grants.flatMap((grant) => grant.hosted === void 0 && grant.permission.key === key && typeof grant.scope === "string" ? [grant.scope] : [])
357
+ });
358
+ }
359
+ if (options.scope !== "platform" && !names.includes(options.scope)) throw new TypeError(`PermDock: scope "${options.scope}" is not in the ${policy === void 0 ? "manifest's rls.scopes" : "policy's scopes"} (${names.join(", ")}) and is not "platform".`);
360
+ const schema = sqlIdent(schemaName);
334
361
  return {
335
- catalog,
362
+ facts,
336
363
  sql: {
337
364
  idsWith: `${schema}.permitted_{scope}_ids_by_permission({permission})`,
338
365
  isPlatform: `${schema}.permdock_has_permission({permission})`
@@ -342,12 +369,13 @@ function target(options) {
342
369
  /**
343
370
  * A better-supabase bucket `policy` that checks PermDock permissions with
344
371
  * the `rls generate` helpers at `scope`. The helpers check role and scope
345
- * only, so a permission the catalog doesn't mark `rowConditions: false`, or
346
- * doesn't grant at `scope`, throws.
372
+ * only, so a permission with row conditions (`rowConditions: true` in the
373
+ * catalog, or a conditioned grant in `policy`), or one not granted at
374
+ * `scope`, throws.
347
375
  */
348
376
  function bucketPolicy(access, options) {
349
- const { catalog, sql } = target(options);
350
- const key = (name, permission) => checkedKey(`bucket access.${name}`, permission, catalog, options.scope);
377
+ const { facts, sql } = target(options);
378
+ const key = (name, permission) => checkedKey(`bucket access.${name}`, permission, facts, options.scope);
351
379
  return freezeDeep({
352
380
  access: {
353
381
  read: key("read", access.read),
@@ -362,8 +390,8 @@ function bucketPolicy(access, options) {
362
390
  }
363
391
  /** As {@link bucketPolicy}, for a better-supabase Realtime topic. */
364
392
  function topicPolicy(access, options) {
365
- const { catalog, sql } = target(options);
366
- const key = (name, permission) => checkedKey(`topic ${name}`, permission, catalog, options.scope);
393
+ const { facts, sql } = target(options);
394
+ const key = (name, permission) => checkedKey(`topic ${name}`, permission, facts, options.scope);
367
395
  return freezeDeep({
368
396
  receive: key("receive", access.receive),
369
397
  ...access.send ? { send: key("send", access.send) } : {},
@@ -1,8 +1,8 @@
1
- import { f as ApprovalStore } from "./types-vKyAMtcX.js";
2
- import { t as InstanceOptions } from "./instance-options-BK_rNOSC.js";
3
- import { r as PdpFactory } from "./types-BVyImy5I.js";
4
- import { o as OtelWrap } from "./types-vNSDF7Dq.js";
5
- import { T as TenantOption, b as WebBotAuthVerifier } from "./create-BWyx3jua.js";
1
+ import { f as ApprovalStore } from "./types-aqOHTHcp.js";
2
+ import { t as InstanceOptions } from "./instance-options-jARdwfPN.js";
3
+ import { r as PdpFactory } from "./types-DxiCGmmd.js";
4
+ import { o as OtelWrap } from "./types-QCuYJh4q.js";
5
+ import { T as TenantOption, b as WebBotAuthVerifier } from "./create-B1d519XK.js";
6
6
  //#region src/server/bind.d.ts
7
7
  /** The options of every framework adapter; `TContext` is what its callbacks receive. */
8
8
  type ServerAdapterOptions<TContext, TUser = unknown> = InstanceOptions & ServerAdapterServices & {
@@ -2,7 +2,7 @@ import { t as compact } from "./compact-y6vfu2_f.js";
2
2
  import { o as invalidSignatureResponse } from "./evaluations-tz6D9A2G.js";
3
3
  import { t as instanceOptions } from "./instance-options-Dhhcnm3y.js";
4
4
  import { n as tenantScope } from "./adapter-context-mlWsVGGg.js";
5
- import { n as createServerKernel } from "./create-CPhDL6qx.js";
5
+ import { n as createServerKernel } from "./create-CMwIl-w2.js";
6
6
  //#region src/server/bind.ts
7
7
  /** The server kernel with the subject and actor callbacks reading the context `contextOf` maps a `Request` to. */
8
8
  function adapterKernel(policy, options, adapter, contextOf) {
@@ -1,4 +1,4 @@
1
- import { Nr as Principal, Pr as Subject, Pt as TokenSigner } from "./policy-CFZAr_Al.js";
1
+ import { Nr as Principal, Pr as Subject, Pt as TokenSigner } from "./policy-IB6yxpC3.js";
2
2
  import { f as Permission, m as PermissionTree } from "./permissions-DttnqqxC.js";
3
3
  //#region src/core/capability.d.ts
4
4
  /**
@@ -0,0 +1,2 @@
1
+ import { t as runCatalog } from "./catalog-DWF5cYqB.js";
2
+ export { runCatalog };
@@ -1,7 +1,7 @@
1
- import { a as formatCatalogMarkdown, i as formatCatalogJson, r as catalogSchemaDocument, t as buildCatalog } from "./catalog-doc-Dsc9y7sd.js";
1
+ import { a as formatCatalogMarkdown, i as formatCatalogJson, r as catalogSchemaDocument, t as buildCatalog } from "./catalog-doc-DdGm82XT.js";
2
2
  import { r as listSourceFiles, t as defaultSrcPath } from "./files-DWUN9PzI.js";
3
3
  import { a as loadModule, i as loadConfiguredPolicy, o as pickNamed, r as leavesOf, t as asPermissionTree } from "./load-DhWEB9P1.js";
4
- import { i as scanSources, r as runCollect } from "./collect-DDDv_ESs.js";
4
+ import { i as scanSources, r as runCollect } from "./collect-DSTE3ml9.js";
5
5
  import { existsSync } from "node:fs";
6
6
  import { resolve } from "node:path";
7
7
  //#region src/cli/catalog.ts
@@ -1,4 +1,4 @@
1
- import { a as listArg, i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-DWOrSQic.js";
1
+ import { a as listArg, i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-DSxCqG9A.js";
2
2
  import { defineCommand } from "citty";
3
3
  //#region src/cli/commands/catalog.ts
4
4
  function catalog(ctx) {
@@ -31,7 +31,7 @@ function catalog(ctx) {
31
31
  }
32
32
  },
33
33
  async run({ args: parsed, rawArgs }) {
34
- const result = await (await import("./catalog-BjZSovXQ.js")).runCatalog({
34
+ const result = await (await import("./catalog-CRW5Mx_B.js")).runCatalog({
35
35
  cwd: ctx.cwd,
36
36
  config: ctx.config,
37
37
  format: parsed.format,
@@ -1,35 +1,12 @@
1
1
  import { _ as listPermissions, a as formerKeys, c as getResource } from "./permissions-DVoF6dMt.js";
2
- import { t as catalogFingerprint } from "./src-CSbUiozF.js";
2
+ import { t as catalogFingerprint } from "./src-BDwEZWrZ.js";
3
3
  import { S as findRole } from "./grantee-Cv5Sogfv.js";
4
4
  import { t as canonicalJson } from "./canonical-json-DemiK4Vp.js";
5
5
  import { t as byCodePoint } from "./compare-pfyVnBjE.js";
6
6
  import { t as catalogSchema } from "./schema-D3MnDMxa.js";
7
+ import { t as policyRowConditionKeys } from "./row-conditions-h2HythXQ.js";
7
8
  import { s as generatorBanner, t as CATALOG_SCHEMA } from "./version-BvacVTZR.js";
8
9
  //#region src/cli/catalog-doc.ts
9
- const ROW_GRANTEES = /* @__PURE__ */ new Set([
10
- "relation",
11
- "plan",
12
- "actor",
13
- "assurance",
14
- "inherit"
15
- ]);
16
- /**
17
- * Whether a grant depends on more than the role and the scope: a row or body
18
- * condition, a closure, a field list, a purpose, a break-glass override, a
19
- * validity window, a `requires`, or a relation, plan, actor or assurance grantee. The SQL helpers
20
- * (`permdock_has`, `permitted_<scope>_ids`) check only role and scope, so a
21
- * policy that calls them for such a permission would widen access.
22
- */
23
- function grantHasRowConditions(grant) {
24
- const grantees = Array.isArray(grant.to) ? grant.to : [grant.to];
25
- return grant.where !== void 0 || grant.check !== void 0 || grant.closure !== void 0 || !grant.portable || grant.fields !== void 0 || grant.purpose !== void 0 || grant.breakGlass !== void 0 || grant.validity !== void 0 || grant.requires !== void 0 || grantees.some((grantee) => ROW_GRANTEES.has(grantee.kind));
26
- }
27
- /** Per permission key, whether any code grant for it has row conditions. */
28
- function policyRowConditionKeys(policy) {
29
- const keys = /* @__PURE__ */ new Set();
30
- for (const grant of [...policy.grants, ...policy.roles.flatMap((binding) => binding.grants)]) if (grant.hosted === void 0 && grantHasRowConditions(grant)) keys.add(grant.permission.key);
31
- return keys;
32
- }
33
10
  function leafLevels(tree, leaf) {
34
11
  if (leaf.kind !== "instance") return;
35
12
  const names = Object.keys({ ...getResource(tree, leaf.resource)?.levels });
@@ -306,4 +283,4 @@ function catalogSchemaDocument() {
306
283
  return catalogSchema;
307
284
  }
308
285
  //#endregion
309
- export { formatCatalogMarkdown as a, formatCatalogJson as i, catalogForCompare as n, jsonSchemaOf as o, catalogSchemaDocument as r, policyRowConditionKeys as s, buildCatalog as t };
286
+ export { formatCatalogMarkdown as a, formatCatalogJson as i, catalogForCompare as n, jsonSchemaOf as o, catalogSchemaDocument as r, buildCatalog as t };
@@ -1,6 +1,6 @@
1
- import { C as Policy, D as PolicyVocabulary, Nr as Principal, kr as Delegation, ln as PermDock } from "../policy-CFZAr_Al.js";
2
- import { f as ApprovalStore } from "../types-vKyAMtcX.js";
3
- import { t as InstanceOptions } from "../instance-options-BK_rNOSC.js";
1
+ import { C as Policy, D as PolicyVocabulary, Nr as Principal, kr as Delegation, ln as PermDock } from "../policy-IB6yxpC3.js";
2
+ import { f as ApprovalStore } from "../types-aqOHTHcp.js";
3
+ import { t as InstanceOptions } from "../instance-options-jARdwfPN.js";
4
4
  import { t as ToolMap } from "../types-Bvc4oWT6.js";
5
5
  //#region src/claude-agent/create.d.ts
6
6
  /** Structural `McpServerProvenance` from `@anthropic-ai/claude-agent-sdk`. */
@@ -1,6 +1,6 @@
1
1
  import { t as compact } from "../compact-y6vfu2_f.js";
2
2
  import { t as instanceOptions } from "../instance-options-Dhhcnm3y.js";
3
- import { n as createAgentKernel } from "../kernel-GSQnMz3O.js";
3
+ import { n as createAgentKernel } from "../kernel-_RRHmnMY.js";
4
4
  //#region src/claude-agent/create.ts
5
5
  const MCP_PREFIX = "mcp__";
6
6
  function asInput(input) {
@@ -1,6 +1,6 @@
1
- import { Nr as Principal, Pr as Subject, xt as RoleSource } from "../policy-CFZAr_Al.js";
1
+ import { Nr as Principal, Pr as Subject, xt as RoleSource } from "../policy-IB6yxpC3.js";
2
2
  import { f as Permission } from "../permissions-DttnqqxC.js";
3
- import { s as RemotePdpCache } from "../types-BVyImy5I.js";
3
+ import { s as RemotePdpCache } from "../types-DxiCGmmd.js";
4
4
  import { StandardSchemaV1 } from "@standard-schema/spec";
5
5
  //#region src/clerk/types.d.ts
6
6
  type ClerkPrincipal = Principal & {
package/dist/cli/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as run } from "../run-YXCJDNYk.js";
2
+ import { t as run } from "../run-DKDbM4Du.js";
3
3
  import { n as streamHasColors } from "../style-CTm1AXDT.js";
4
4
  //#region src/cli/bin.ts
5
5
  const result = await run(process.argv.slice(2), {
@@ -1,5 +1,5 @@
1
1
  import { a as CatalogDocument, c as CatalogResource, d as CatalogSupportAccess, f as CatalogUsage, l as CatalogRole, n as CatalogApproval, r as CatalogBreakGlass, s as CatalogPermission, t as CatalogActivation, u as CatalogScope } from "../types-Dnemwd77.js";
2
- import { _ as RunResult, c as RlsConfig, d as RlsMembershipTable, f as RlsMemberships, g as RlsTarget, h as RlsSuspension, i as PermDockConfig, l as RlsDialect, m as RlsSuspendedScope, n as CliIo, o as RlsActiveRow, p as RlsSuspendedMembership, r as CollectConfig, s as RlsApiKeys, t as CatalogConfig, u as RlsFunctionMapping } from "../types-BPxgszlT.js";
2
+ import { _ as RunResult, c as RlsConfig, d as RlsMembershipTable, f as RlsMemberships, g as RlsTarget, h as RlsSuspension, i as PermDockConfig, l as RlsDialect, m as RlsSuspendedScope, n as CliIo, o as RlsActiveRow, p as RlsSuspendedMembership, r as CollectConfig, s as RlsApiKeys, t as CatalogConfig, u as RlsFunctionMapping } from "../types-DbjRN55U.js";
3
3
  //#region src/cli/catalog-path.d.ts
4
4
  /**
5
5
  * The absolute path `permdock collect` writes the catalog to: `collect.out`,
package/dist/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as catalogPath } from "../catalog-path-CnI0XTFK.js";
2
2
  import { t as defineConfig } from "../config-BJiM-xAm.js";
3
3
  import { o as parseGrantsMarker, s as parseHookMarker } from "../markers-B0hYLvMD.js";
4
- import { t as run } from "../run-YXCJDNYk.js";
4
+ import { t as run } from "../run-DKDbM4Du.js";
5
5
  export { catalogPath, defineConfig, parseGrantsMarker, parseHookMarker, run };
@@ -1,7 +1,7 @@
1
- import { $ as AccessEvent, At as SnapshotSource, Ft as TokenVerifier, Nt as TokenFailureCause, at as DecisionSink, bn as PolicySource, ht as MembershipEvent, ot as DirectoryEvent, rt as DecisionEvent, tt as CredentialEvent } from "../policy-CFZAr_Al.js";
2
- import { f as ApprovalStore } from "../types-vKyAMtcX.js";
3
- import { n as CatalogEventData, o as CloudEventType } from "../sink-Gs6TTVa-.js";
4
- import { a as JsonWebKeySet, g as ReplayStore } from "../types-9AWO9EGt.js";
1
+ import { $ as AccessEvent, At as SnapshotSource, Ft as TokenVerifier, Nt as TokenFailureCause, at as DecisionSink, bn as PolicySource, ht as MembershipEvent, ot as DirectoryEvent, rt as DecisionEvent, tt as CredentialEvent } from "../policy-IB6yxpC3.js";
2
+ import { f as ApprovalStore } from "../types-aqOHTHcp.js";
3
+ import { n as CatalogEventData, o as CloudEventType } from "../sink-B1fZzIMf.js";
4
+ import { a as JsonWebKeySet, g as ReplayStore } from "../types-Cq_H8N_X.js";
5
5
  //#region src/cloud/types.d.ts
6
6
  type CloudEndpointOptions = {
7
7
  readonly url?: string;
@@ -1,4 +1,4 @@
1
- import { i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-DWOrSQic.js";
1
+ import { i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-DSxCqG9A.js";
2
2
  import { defineCommand } from "citty";
3
3
  //#region src/cli/commands/cloud.ts
4
4
  function cloud(ctx) {
@@ -30,7 +30,7 @@ function cloud(ctx) {
30
30
  }
31
31
  },
32
32
  async run({ args: parsed }) {
33
- const result = await (await import("./cloud-Bo3e9Ak3.js")).runCloud({
33
+ const result = await (await import("./cloud-DWLXO2af.js")).runCloud({
34
34
  cwd: ctx.cwd,
35
35
  config: ctx.config,
36
36
  rest: parsed._,
@@ -1,9 +1,9 @@
1
- import { t as catalogFingerprint } from "./src-CSbUiozF.js";
2
- import { s as snapshotScopes } from "./permdock-CzqXjCpU.js";
1
+ import { t as catalogFingerprint } from "./src-BDwEZWrZ.js";
2
+ import { s as snapshotScopes } from "./permdock-CbgvLnuo.js";
3
3
  import { i as describeError } from "./errors-CWfoNg9N.js";
4
4
  import { i as loadConfiguredPolicy } from "./load-DhWEB9P1.js";
5
5
  import { t as parseCatalog } from "./parse-BuyjxhZV.js";
6
- import { t as runCatalog } from "./catalog-z8q6bi_r.js";
6
+ import { t as runCatalog } from "./catalog-DWF5cYqB.js";
7
7
  //#region src/cli/cloud.ts
8
8
  function firstNonEmpty(...values) {
9
9
  for (const value of values) if (value !== void 0 && value !== "") return value;
@@ -1,5 +1,5 @@
1
1
  import { i as describeError } from "./errors-CWfoNg9N.js";
2
- import { a as listArg, i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-DWOrSQic.js";
2
+ import { a as listArg, i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-DSxCqG9A.js";
3
3
  import { defineCommand } from "citty";
4
4
  //#region src/cli/commands/collect.ts
5
5
  function collect(ctx) {
@@ -44,7 +44,7 @@ function collect(ctx) {
44
44
  });
45
45
  return;
46
46
  }
47
- const { createCollectScheduler } = await import("./watch-Etoa_Mvr.js");
47
+ const { createCollectScheduler } = await import("./watch-BwxLTYMZ.js");
48
48
  const scheduler = createCollectScheduler(ctx.cwd, { collect: overrides }, {
49
49
  ...ctx.configFile === void 0 ? {} : { configFile: ctx.configFile },
50
50
  report: (message) => {
@@ -64,7 +64,7 @@ function collect(ctx) {
64
64
  });
65
65
  return;
66
66
  }
67
- const result = await (await import("./collect-rG2IQ3t0.js")).runCollect({
67
+ const result = await (await import("./collect-DSWOk19R.js")).runCollect({
68
68
  cwd: ctx.cwd,
69
69
  config: ctx.config,
70
70
  collect: overrides,
@@ -1,5 +1,5 @@
1
1
  import { i as describeError } from "./errors-CWfoNg9N.js";
2
- import { i as formatCatalogJson, n as catalogForCompare, t as buildCatalog } from "./catalog-doc-Dsc9y7sd.js";
2
+ import { i as formatCatalogJson, n as catalogForCompare, t as buildCatalog } from "./catalog-doc-DdGm82XT.js";
3
3
  import { t as catalogPath } from "./catalog-path-CnI0XTFK.js";
4
4
  import { i as rel, r as listSourceFiles, t as defaultSrcPath } from "./files-DWUN9PzI.js";
5
5
  import { a as loadModule, i as loadConfiguredPolicy, o as pickNamed, r as leavesOf, t as asPermissionTree } from "./load-DhWEB9P1.js";
@@ -0,0 +1,2 @@
1
+ import { r as runCollect } from "./collect-DSTE3ml9.js";
2
+ export { runCollect };
@@ -76,19 +76,19 @@ const COMMAND_DESCRIPTIONS = {
76
76
  };
77
77
  /** Every top-level command, loaded only when it runs or its own `--help` is asked for. */
78
78
  const commands = {
79
- collect: async () => (await import("./collect-DLlujdHC.js")).collect,
80
- catalog: async () => (await import("./catalog-h2tlKFkq.js")).catalog,
81
- diff: async () => (await import("./diff-CzqLxZ77.js")).diff,
82
- usage: async () => (await import("./usage-D07N9QJ3.js")).usage,
83
- doctor: async () => (await import("./doctor-rOr-4ZfS.js")).doctor,
84
- config: async () => (await import("./config-Bn00Z3ks.js")).config,
85
- skills: async () => (await import("./skills-JaymNCdK.js")).skills,
86
- openapi: async () => (await import("./openapi-Bbg4wGVL.js")).openapi,
87
- rls: async () => (await import("./rls-CEvs64Kj.js")).rls,
88
- arazzo: async () => (await import("./arazzo-cmvX2jDe.js")).arazzo,
89
- cloud: async () => (await import("./cloud-BGhHS-lY.js")).cloud,
90
- supabase: async () => (await import("./supabase-CwafwxxF.js")).supabase,
91
- powersync: async () => (await import("./powersync-yW1UUFzp.js")).powersync
79
+ collect: async () => (await import("./collect-DClJsheJ.js")).collect,
80
+ catalog: async () => (await import("./catalog-dFZdWCGN.js")).catalog,
81
+ diff: async () => (await import("./diff-DBIhz_f2.js")).diff,
82
+ usage: async () => (await import("./usage-GTixvDDU.js")).usage,
83
+ doctor: async () => (await import("./doctor-BwCAMLx_.js")).doctor,
84
+ config: async () => (await import("./config-Dnszbv-6.js")).config,
85
+ skills: async () => (await import("./skills-Bx-U0irG.js")).skills,
86
+ openapi: async () => (await import("./openapi-l0xYHkcv.js")).openapi,
87
+ rls: async () => (await import("./rls-B4ur8nKQ.js")).rls,
88
+ arazzo: async () => (await import("./arazzo-CKwwqFWz.js")).arazzo,
89
+ cloud: async () => (await import("./cloud-CB_ELYuX.js")).cloud,
90
+ supabase: async () => (await import("./supabase-Boqb9a_Y.js")).supabase,
91
+ powersync: async () => (await import("./powersync-DliZK_-y.js")).powersync
92
92
  };
93
93
  function isCommand(name) {
94
94
  return Object.hasOwn(commands, name);
@@ -1,3 +1,3 @@
1
1
  import { n as GraphSqlPart, r as RelationsMapping, t as GraphSql } from "../graph-sql-B-dsAT6j.js";
2
- import { a as CompiledWhere, c as compileWhere, i as CompiledSql, l as escapeLike, n as CompiledCompare, o as MembershipTable, r as CompiledExists, s as MembershipsMapping, t as CompileWhereOptions } from "../compile-CNnl6uIt.js";
2
+ import { a as CompiledWhere, c as compileWhere, i as CompiledSql, l as escapeLike, n as CompiledCompare, o as MembershipTable, r as CompiledExists, s as MembershipsMapping, t as CompileWhereOptions } from "../compile-BkRyBDBw.js";
3
3
  export { type CompileWhereOptions, type CompiledCompare, type CompiledExists, type CompiledSql, type CompiledWhere, type GraphSql, type GraphSqlPart, type MembershipTable, type MembershipsMapping, type RelationsMapping, compileWhere, escapeLike };
@@ -1,4 +1,4 @@
1
- import { Ir as Condition, Pr as Subject, br as Scope, mn as WhereResult } from "./policy-CFZAr_Al.js";
1
+ import { Ir as Condition, Pr as Subject, br as Scope, mn as WhereResult } from "./policy-IB6yxpC3.js";
2
2
  import { y as ResourceNode } from "./permissions-DttnqqxC.js";
3
3
  import { r as RelationsMapping, t as GraphSql } from "./graph-sql-B-dsAT6j.js";
4
4
  //#region src/conditions/compile.d.ts
@@ -1,4 +1,4 @@
1
- import { i as globalArgs, t as COMMAND_DESCRIPTIONS } from "./commands-DWOrSQic.js";
1
+ import { i as globalArgs, t as COMMAND_DESCRIPTIONS } from "./commands-DSxCqG9A.js";
2
2
  import { defineCommand } from "citty";
3
3
  //#region src/cli/commands/config.ts
4
4
  function config(ctx) {
@@ -19,7 +19,7 @@ function config(ctx) {
19
19
  }
20
20
  },
21
21
  async run({ args: parsed }) {
22
- const { runConfig } = await import("./config-report-Dw_JcUqT.js");
22
+ const { runConfig } = await import("./config-report-DMvWKUxL.js");
23
23
  ctx.report(runConfig({
24
24
  cwd: ctx.cwd,
25
25
  config: ctx.config,
@@ -1,10 +1,10 @@
1
1
  import { n as CONFIG_REPORT_SCHEMA } from "./version-BvacVTZR.js";
2
2
  import { t as catalogPath } from "./catalog-path-CnI0XTFK.js";
3
3
  import { i as rel, t as defaultSrcPath } from "./files-DWUN9PzI.js";
4
- import { n as guessPermissions, t as barrelFile } from "./collect-DDDv_ESs.js";
5
- import "./sources-B0UvrJ21.js";
6
- import { r as MIGRATION_DIRS } from "./supabase-config-Bs44dare.js";
7
- import { t as DEFAULT_SENSITIVE_ACTIONS } from "./doctor-collect-ByfYlNv1.js";
4
+ import { n as guessPermissions, t as barrelFile } from "./collect-DSTE3ml9.js";
5
+ import "./sources-4p0-4xQm.js";
6
+ import { r as MIGRATION_DIRS } from "./supabase-config-BpPXt3x1.js";
7
+ import { t as DEFAULT_SENSITIVE_ACTIONS } from "./doctor-collect-CHk6XWOA.js";
8
8
  //#region src/cli/config-report.ts
9
9
  function configReport(input) {
10
10
  const { cwd, config } = input;
@@ -1,6 +1,6 @@
1
1
  import { t as compact } from "./compact-y6vfu2_f.js";
2
- import { i as isPromiseLike } from "./store-options-yO0V6gRn.js";
3
- import { n as switchTenant, t as providerStore } from "./provider-store-DNyC1y48.js";
2
+ import { i as isPromiseLike } from "./store-options-ByhZq1jV.js";
3
+ import { n as switchTenant, t as providerStore } from "./provider-store-Cfbvo4DE.js";
4
4
  import { getContext, onDestroy, setContext } from "svelte";
5
5
  import { toStore } from "svelte/store";
6
6
  //#region src/svelte/context.ts