permdock 0.15.0 → 0.17.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.
- package/dist/a2a/index.d.ts +4 -4
- package/dist/a2a/index.js +3 -3
- package/dist/{adapter-context-CIQpQxbE.js → adapter-context-OHikyRqV.js} +1 -1
- package/dist/{adoption-scan-DLel53Oa.js → adoption-scan-Ci0xiJ3T.js} +1 -1
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/ai-sdk/index.d.ts +3 -3
- package/dist/ai-sdk/index.js +3 -3
- package/dist/approval-normalize-4KxMRdJC.js +189 -0
- package/dist/approval-policies-9VagPixq.d.ts +138 -0
- package/dist/{approval-prompt-3BqWczTt.d.ts → approval-prompt-BSh-yxbH.d.ts} +1 -1
- package/dist/approvals/index.d.ts +5 -4
- package/dist/approvals/index.js +7 -6
- package/dist/{approvals-DnIBTuXE.js → approvals-DdFcTncq.js} +3 -3
- package/dist/{approvers-B4r0N_Uz.js → approvers-CNtl4Vc5.js} +22 -1
- package/dist/{arazzo-CL8CZnpL.js → arazzo-7kbeh1yi.js} +2 -2
- package/dist/{arazzo-CHK9NT6u.js → arazzo-_zUmT8ZT.js} +4 -4
- package/dist/{args-0FrVs5EH.js → args-iafbHiXn.js} +2 -5
- package/dist/astro/index.d.ts +4 -4
- package/dist/astro/index.js +2 -2
- package/dist/{audience-DTjR8xet.js → audience-jRO819i3.js} +1 -1
- package/dist/{auth--yPyZNgr.js → auth-j3Eu-j4h.js} +1 -1
- package/dist/authz-topic-Dbc-HDOS.js +15 -0
- package/dist/authzen/index.d.ts +5 -5
- package/dist/authzen/index.js +2 -2
- package/dist/{automation-C6Jg75xq.d.ts → automation-DCWuVKtd.d.ts} +1 -1
- package/dist/better-auth/index.d.ts +1 -1
- package/dist/better-auth/index.js +10 -8
- package/dist/better-supabase/index.d.ts +273 -38
- package/dist/better-supabase/index.js +493 -102
- package/dist/{better-supabase-Dirf_8Ec.js → better-supabase-BJtQ-kNf.js} +26 -10
- package/dist/{bind-BNQA9JK9.js → bind-BJFeLX1V.js} +6 -6
- package/dist/{bind-YYjvfpB9.d.ts → bind-DjFNX0Pq.d.ts} +7 -7
- package/dist/{budget-BELja5A9.js → budget-BBCPDOGP.js} +1 -1
- package/dist/{budget-hYsPz_yE.d.ts → budget-CNLsV2SL.d.ts} +1 -1
- package/dist/{build-instance-BWXqwQYU.js → build-instance-lye7oEqf.js} +3 -2
- package/dist/{capability-Di9tiUvi.d.ts → capability-BzjWdKmP.d.ts} +1 -1
- package/dist/{capability-BqX94r07.js → capability-zN6T9fxe.js} +2 -3
- package/dist/{casbin-iAEXjmca.js → casbin-C3O_O9nu.js} +2 -2
- package/dist/{casbin-DRFwgVIP.js → casbin-DFzk_so3.js} +2 -2
- package/dist/{casl-C4OINZHI.js → casl-CjBVJj8R.js} +2 -2
- package/dist/{casl-CHHoCldP.js → casl-CkBssiB1.js} +1 -1
- package/dist/catalog/index.d.ts +5 -5
- package/dist/catalog/index.js +6 -6
- package/dist/catalog-BpnjesqX.js +1 -0
- package/dist/{catalog-CGlSwU6j.js → catalog-DGDd_ww1.js} +5 -5
- package/dist/{catalog-amPDr0JQ.js → catalog-DJJIkR9P.js} +3 -3
- package/dist/{catalog-doc-DjMKzJp9.js → catalog-doc-C4DGfJCO.js} +3 -3
- package/dist/{catalog-operations-DeHTrJSV.js → catalog-operations-DVI5QO5R.js} +3 -3
- package/dist/{challenge-DImNcR7B.js → challenge-M_ghKJnT.js} +2 -2
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +2 -2
- package/dist/chat-sdk/index.d.ts +3 -3
- package/dist/{checks-CGkP3Z7A.js → checks-fyDOhcz0.js} +33 -1
- package/dist/claude-agent/index.d.ts +3 -3
- package/dist/claude-agent/index.js +2 -2
- package/dist/clerk/index.d.ts +2 -2
- package/dist/clerk/index.js +10 -7
- package/dist/cli/bin.js +1 -1
- package/dist/cli/index.d.ts +5 -5
- package/dist/cli/index.js +3 -3
- package/dist/cloud/index.d.ts +8 -8
- package/dist/cloud/index.js +1 -1
- package/dist/{cloud-eOtmuonF.js → cloud-DYqzmh5i.js} +4 -4
- package/dist/{codemod-KEDj_3zl.js → codemod-DNGMGqBS.js} +395 -8
- package/dist/{codemod-D6NYu4AK.js → codemod-DqB9klYI.js} +3 -3
- package/dist/{collect-DnXL4B8c.js → collect-C44RrKCI.js} +4 -4
- package/dist/collect-CAibhmCi.js +1 -0
- package/dist/{collect-WCl8cJQV.js → collect-HfJXl8Tr.js} +4 -4
- package/dist/compile/index.d.ts +1 -1
- package/dist/compile/index.js +1 -1
- package/dist/{compile-EzEMB-7v.js → compile-B_oJqmIg.js} +4 -4
- package/dist/{compile-BEklRUYo.d.ts → compile-BxiwRotu.d.ts} +2 -2
- package/dist/{completion-DCza8aQY.js → completion-pwVjJlek.js} +3 -3
- package/dist/{config-CcLlvEYW.js → config-COHmivz9.js} +4 -4
- package/dist/{config-BAM3a3z8.js → config-DnfH6_eT.js} +2 -2
- package/dist/{config-report-VZcQ0ZpS.js → config-report-C1jl7Na-.js} +2 -2
- package/dist/{context-BnIzxTNE.js → context-DeammvFl.js} +2 -2
- package/dist/convex/index.d.ts +4 -4
- package/dist/convex/index.js +3 -3
- package/dist/{core-CFepFiDP.d.ts → core-0iYZ5HUx.d.ts} +2 -2
- package/dist/{core-lxoANyai.js → core-W5f4Rjt0.js} +7 -7
- package/dist/{create-DBvUsgzK.d.ts → create-DNN3OtsO.d.ts} +4 -4
- package/dist/{create-CDd9c22W.d.ts → create-DrHUmKvG.d.ts} +6 -6
- package/dist/{create-BPUopdfL.d.ts → create-bzQlBzG4.d.ts} +7 -7
- package/dist/{create-Coq5fIrq.js → create-gqtDb1nU.js} +5 -5
- package/dist/{create-BLPKnJKa.js → create-jCPwPWXf.js} +6 -5
- package/dist/{credential-CyyyvCsL.js → credential-B3Hj4puZ.js} +4 -3
- package/dist/{credentials-CdDxp7jN.js → credentials-dkycUsY3.js} +1 -1
- package/dist/decision-CaG5_eNJ.js +21 -0
- package/dist/{delegation-CDB6_keF.js → delegation-aK4T_5WU.js} +3 -3
- package/dist/delivery/index.d.ts +4 -4
- package/dist/delivery/index.js +1 -1
- package/dist/{denied-text-DHldhVUv.d.ts → denied-text-DyzWwxEB.d.ts} +1 -1
- package/dist/{describe-Bb4hGK5d.js → describe-CogP1loh.js} +2 -1
- package/dist/{describe-BbFPBSms.d.ts → describe-nalX_HHE.d.ts} +1 -1
- package/dist/{diff-DfmYaIhB.js → diff-BTsLiW59.js} +7 -7
- package/dist/{diff-CxtbOi2l.js → diff-CcxYooMu.js} +2 -2
- package/dist/{doctor-gIO9WTYo.js → doctor-BNRhJegR.js} +3 -3
- package/dist/{doctor-CMqPKuN_.js → doctor-DS-9ApID.js} +195 -30
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/drizzle/index.js +1 -1
- package/dist/elysia/index.d.ts +4 -4
- package/dist/elysia/index.js +3 -3
- package/dist/{errors-Vpu6rKHl.js → errors-BhRkoNS7.js} +0 -2
- package/dist/{errors-BIM4MFsJ.d.ts → errors-Dc9FdamT.d.ts} +1 -1
- package/dist/{evaluate-BAmf_AQd.js → evaluate-CsjXeLRo.js} +18 -15
- package/dist/{evaluations-DOWuBpWv.d.ts → evaluations-BasA9zXp.d.ts} +3 -3
- package/dist/{evaluations-IBceAeKT.js → evaluations-DG40eSJa.js} +3 -22
- package/dist/eve/index.d.ts +4 -4
- package/dist/eve/index.js +3 -3
- package/dist/express/index.d.ts +4 -4
- package/dist/express/index.js +3 -3
- package/dist/fastify/index.d.ts +4 -4
- package/dist/fastify/index.js +3 -3
- package/dist/{fetch-adapter-BIbBAtPZ.d.ts → fetch-adapter-BgqpOOpd.d.ts} +2 -2
- package/dist/{fetch-adapter-dPTgJVHd.js → fetch-adapter-UZOW0PRC.js} +2 -2
- package/dist/{fields-DI8s3cPl.js → fields-CrjL6A49.js} +3 -3
- package/dist/{files-B3AA05f1.js → files-CfiRtQ-m.js} +1 -1
- package/dist/{fixtures-Bm4_K1ke.js → fixtures-0VTW5oNq.js} +2 -2
- package/dist/{flags-DXjoTVbS.js → flags-BlmpmXoY.js} +2 -2
- package/dist/{from-snapshot-DCakWRsr.js → from-snapshot-DMlSSo9b.js} +14 -12
- package/dist/{gen-DwgCSC6V.js → gen-CNCzG4sB.js} +2 -2
- package/dist/{gen-DuAhghDw.js → gen-DnpZwQPo.js} +9 -9
- package/dist/{generate-CRVV5V7l.js → generate-BqkZq8Dr.js} +2 -2
- package/dist/{grantee-conditions-BrYPe-w0.js → grantee-conditions-DX4K_gGI.js} +1 -1
- package/dist/{grantee-match-7RZZvoT_.js → grantee-match-BP-k4vRJ.js} +2 -2
- package/dist/h3/index.d.ts +4 -4
- package/dist/h3/index.js +3 -3
- package/dist/{helpers-DJicaG6f.js → helpers-DNnZffrI.js} +76 -12
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +3 -3
- package/dist/{hosted-DVxlLZMe.d.ts → hosted-DxRLLiFU.d.ts} +1 -1
- package/dist/{hosted-D0IzESu_.js → hosted-tPZnyjQS.js} +12 -10
- package/dist/{http-DOL33cO0.js → http-DhMWeB_h.js} +1 -1
- package/dist/{import-DK_J8tVE.js → import-BYVbSKx0.js} +3 -3
- package/dist/{import-CNBF96hB.js → import-C1XXpG_m.js} +4 -4
- package/dist/{index-Cay5-Kvx.d.ts → index-Bt-UoBWu.d.ts} +11 -10
- package/dist/{index-DJwEgYzA.d.ts → index-CXXUFWtG.d.ts} +17 -11
- package/dist/{index-Dj2qF9VC.d.ts → index-CZ5mixHO.d.ts} +1 -1
- package/dist/{index-ymept53A.d.ts → index-DFwUOkvt.d.ts} +4 -4
- package/dist/{index-CV-7DWeD.d.ts → index-DtGtDzjb.d.ts} +4 -4
- package/dist/{index-BinlXeU-.d.ts → index-z44pfWar.d.ts} +2 -2
- package/dist/index.d.ts +18 -16
- package/dist/index.js +20 -18
- package/dist/{init-Buibrl9h.js → init-Dr1qAStu.js} +5 -5
- package/dist/{init-jLSyPMM7.js → init-YSDySeMy.js} +5 -5
- package/dist/{instance-options-CoHn-0e8.d.ts → instance-options-BOCRxEFb.d.ts} +2 -2
- package/dist/{instance-snapshot-DuWf1cT3.js → instance-snapshot-BgOGtyCy.js} +15 -12
- package/dist/jwt/index.d.ts +4 -4
- package/dist/jwt/index.js +3 -3
- package/dist/{kernel-BD8QuMnv.js → kernel-CDDU93dI.js} +10 -10
- package/dist/kysely/index.d.ts +3 -3
- package/dist/kysely/index.js +1 -1
- package/dist/{load-DjSU5KXO.js → load-BaEamml-.js} +1 -1
- package/dist/load-CjnlPxpL.js +1 -0
- package/dist/{login-CB55O4Gv.js → login-CXgEKLaW.js} +4 -4
- package/dist/{login-VVpkkund.js → login-DEVXDTX8.js} +4 -4
- package/dist/{manifest-CbEyvPN2.js → manifest-Dij1U0hx.js} +37 -37
- package/dist/{map-claims-C-nv08_n.js → map-claims-PQwHynxV.js} +25 -11
- package/dist/{map-error-pasIGqMT.js → map-error-B_f3C5cs.js} +1 -1
- package/dist/mcp/index.d.ts +8 -8
- package/dist/mcp/index.js +9 -9
- package/dist/{migrate-BJHxQqT5.js → migrate-BbY5-Khy.js} +4 -4
- package/dist/{module-values-B1EVTkHP.js → module-values-B8tNIxdd.js} +2 -2
- package/dist/nest/index.d.ts +4 -4
- package/dist/nest/index.js +3 -3
- package/dist/next/index.d.ts +32 -13
- package/dist/next/index.js +43 -25
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +2 -2
- package/dist/node/index.d.ts +4 -4
- package/dist/node/index.js +2 -2
- package/dist/openai/index.d.ts +4 -4
- package/dist/openai/index.js +3 -3
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{openapi-eHZ5hwUJ.js → openapi-D3wkvOoU.js} +4 -4
- package/dist/{openapi-CleDZYVf.js → openapi-GM-kTdkq.js} +5 -5
- package/dist/orpc/index.d.ts +5 -5
- package/dist/orpc/index.js +3 -3
- package/dist/otel/index.d.ts +3 -3
- package/dist/otel/index.js +1 -1
- package/dist/{output-BVZpQDad.js → output-DhTpe8v1.js} +1 -1
- package/dist/output-files-BYscrQl-.js +1 -0
- package/dist/{output-files-BIQ_9pIs.js → output-files-CM0BnH05.js} +1 -1
- package/dist/{ownership-qqBuGJXr.js → ownership-moSRhxl_.js} +6 -6
- package/dist/{parse-1_ZheTW5.js → parse-UTC-sDrt.js} +2 -2
- package/dist/{parse-local-manifest-CCmbhnxP.d.ts → parse-local-manifest-BgTYdR3q.d.ts} +1 -1
- package/dist/{parse-request-CwCZpyjV.js → parse-request-DOBVaeiQ.js} +1 -1
- package/dist/pdp/index.d.ts +3 -3
- package/dist/pdp/index.js +3 -3
- package/dist/{peer-Q0fuZ6hx.js → peer-BuK9F53f.js} +1 -1
- package/dist/{peer-C9LvBCcb.js → peer-n-swIV4H.js} +1 -1
- package/dist/{permdock-CprAPN3w.d.ts → permdock-DUWZEOLR.d.ts} +88 -131
- package/dist/{permdock-BvjivVb9.js → permdock-DdzMv5-F.js} +195 -102
- package/dist/{permissions-CYcHj_w7.js → permissions-CvpPtz5O.js} +1 -1
- package/dist/{pg-DQTqRrou.js → pg-Ddxsd5ZB.js} +2 -2
- package/dist/{policy-BycVKnXv.d.ts → policy-CTNl7pvN.d.ts} +1 -1
- package/dist/{policy-CLQ8__GF.js → policy-DxQyHKPB.js} +5 -4
- package/dist/{policy-from-catalog-CU3An8uP.js → policy-from-catalog-DVa1faOr.js} +8 -7
- package/dist/{policy-types-DGIO_gxq.d.ts → policy-types-IRJVABmm.d.ts} +63 -19
- package/dist/{postgrest-D5nUGm-c.d.ts → postgrest-B_cEDd4e.d.ts} +12 -7
- package/dist/{postgrest-DAxFltvO.js → postgrest-BrjrckDG.js} +74 -19
- package/dist/{powersync-CFWILHjb.js → powersync-BZxw_v-A.js} +3 -3
- package/dist/{powersync-uqYWxTjq.js → powersync-C0nsyULQ.js} +15 -15
- package/dist/powersync-Cqzx25dI.js +1 -0
- package/dist/preset/index.js +1 -1
- package/dist/{preset-BjLzeFpp.js → preset-pPrVyGU5.js} +74 -7
- package/dist/prisma/index.d.ts +2 -2
- package/dist/prisma/index.js +1 -1
- package/dist/{protected-action-DUYqb-Ma.js → protected-action-B6n6w7Rl.js} +1 -1
- package/dist/{protected-action-D8x73IGm.d.ts → protected-action-D3S9U4nc.d.ts} +14 -7
- package/dist/{protected-action-QEA8arRB.js → protected-action-qowj6nxN.js} +15 -5
- package/dist/{provider-C55OGXJ7.js → provider-CY4TSSJo.js} +2 -2
- package/dist/{provider-DfLeek9O.d.ts → provider-CjAu39fJ.d.ts} +1 -1
- package/dist/{provider-store-CaTv00tr.js → provider-store-BQP_pp8s.js} +2 -2
- package/dist/pull-CUVdB04v.js +1 -0
- package/dist/{pull-BBmCxnqX.js → pull-DVoZ0V9_.js} +6 -6
- package/dist/{push-Dq_ca4-j.js → push-eJl1Tvqm.js} +7 -7
- package/dist/{pushed-policy-CryQheKq.d.ts → pushed-policy-CUQuvlS3.d.ts} +1 -1
- package/dist/{pushed-policy-CDuOL2de.js → pushed-policy-DMXAOmEW.js} +1 -1
- package/dist/react/index.d.ts +8 -8
- package/dist/react/index.js +6 -6
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react/provider-client.js +1 -1
- package/dist/react-native/index.d.ts +10 -10
- package/dist/react-native/index.js +9 -9
- package/dist/refresh-on-L9UOwATg.d.ts +49 -0
- package/dist/{replay-Bs9Df2fQ.d.ts → replay-Dc3d8LhG.d.ts} +1 -1
- package/dist/{request-context-Duzdf0cd.js → request-context-Ch052blg.js} +2 -2
- package/dist/{request-schema-DhX7UbfQ.js → request-schema-CMP8Cmxd.js} +5 -0
- package/dist/resend/index.d.ts +4 -4
- package/dist/{resolve-names-Y1Cb22cp.js → resolve-names-1nCei24V.js} +6 -6
- package/dist/{rls-yK2nZUcm.js → rls-BVzoZCn3.js} +4 -4
- package/dist/{rls-BwKXdVEW.js → rls-ClJRblnR.js} +19 -19
- package/dist/{role-builder-BK2-T6oD.js → role-builder-BrmOcXch.js} +3 -157
- package/dist/{rpc-vHIwyXCp.js → rpc-BOu3FD6X.js} +2 -2
- package/dist/{run-D5WIJfs7.js → run-CnCaTjWX.js} +8 -40
- package/dist/run-D9N6V5WQ.js +1 -0
- package/dist/{run-ticket-ylovhyFQ.d.ts → run-ticket-C6lXvHM_.d.ts} +2 -2
- package/dist/{run-ticket-DfnZCh-u.js → run-ticket-CjvXr6wj.js} +1 -1
- package/dist/{runtime-BGnrOkVH.js → runtime-CBXkOcg9.js} +1 -1
- package/dist/{saas-DK4V-3Is.js → saas-BqM9mJkk.js} +13 -10
- package/dist/{scan-CzdMtHnq.js → scan-CepUXrFt.js} +1 -1
- package/dist/{schema-BDGEVO4g.js → schema-9_NDz8fx.js} +1 -1
- package/dist/{schema-BOJjqlWL.js → schema-CuX70xgH.js} +15 -2
- package/dist/scim/index.d.ts +1 -1
- package/dist/scim/index.js +1 -1
- package/dist/{scim-jJBJ7g1Z.js → scim-C30QBBoF.js} +2 -1
- package/dist/{scim-D8YupzX1.js → scim-CovliQUg.js} +2 -2
- package/dist/{scopes-0Up_UA2t.js → scopes-BSdYaGHs.js} +9 -40
- package/dist/server/index.d.ts +11 -11
- package/dist/server/index.js +8 -8
- package/dist/{server-3cVlTLde.js → server-D0PW6ZCw.js} +2 -2
- package/dist/{server-types-CyRN0-Cd.d.ts → server-types-Bw-lWqzR.d.ts} +8 -8
- package/dist/{shared-l0oGGetg.js → shared-BRmCJxDK.js} +2 -2
- package/dist/{shared-DrGLwM3s.js → shared-DyYVEjKC.js} +2 -2
- package/dist/{sink-B5zoUW_O.d.ts → sink-DUzt0e4B.d.ts} +2 -2
- package/dist/{skills-BZxPQ_09.js → skills-BUuH-QFt.js} +2 -2
- package/dist/{skills-BIsm1n26.js → skills-a4N6Y2Xm.js} +2 -2
- package/dist/{snapshot-CXlzi69u.js → snapshot-DN_8J27z.js} +6 -2
- package/dist/{snapshot-cache-Bx_4xC_6.js → snapshot-cache-B66h7FBK.js} +25 -8
- package/dist/{snapshot-cache-BjAWkchD.d.ts → snapshot-cache-Dbk-Gnij.d.ts} +20 -6
- package/dist/solid/index.d.ts +7 -7
- package/dist/solid/index.js +6 -6
- package/dist/solid-start/index.d.ts +4 -4
- package/dist/solid-start/index.js +3 -3
- package/dist/{sources-oB1Hg1Fm.d.ts → sources-CXY05xtB.d.ts} +1 -1
- package/dist/{src-C_pi2Rnh.js → src-nYNBfmgq.js} +187 -39
- package/dist/ssf/index.d.ts +3 -3
- package/dist/ssf/index.js +1 -1
- package/dist/{standard-webhooks-DOYEuOLx.d.ts → standard-webhooks-BFeEpjxy.d.ts} +2 -2
- package/dist/{store-RNFvaJJv.js → store-XgBMbfDy.js} +13 -7
- package/dist/{types-tQB2CEnY.d.ts → store-g5ctUrOI.d.ts} +114 -113
- package/dist/{store-options-Dil3lraY.js → store-options--zWn48PK.js} +76 -7
- package/dist/{stores-DxZWDXCs.js → stores-53_kOwPi.js} +3 -3
- package/dist/{stores-DZJvxFIZ.d.ts → stores-BtdN3eDO.d.ts} +5 -6
- package/dist/{stream-9y9qw51m.d.ts → stream-BMJg56jU.d.ts} +1 -1
- package/dist/{subject-BGoM5o8B.js → subject-C7RddW0G.js} +8 -1
- package/dist/supabase/client.d.ts +31 -0
- package/dist/supabase/client.js +21 -0
- package/dist/supabase/index.d.ts +37 -6
- package/dist/supabase/index.js +5 -4
- package/dist/supabase/middleware.d.ts +8 -7
- package/dist/supabase/middleware.js +6 -6
- package/dist/{supabase-DYWnT800.js → supabase-C6FyUeSh.js} +3 -3
- package/dist/{supabase-CDHMsDD0.js → supabase-C8cNzp4i.js} +31 -8
- package/dist/supabase-hook-CPBX4dy5.js +1 -0
- package/dist/{supabase-hook-HPgwYb9V.js → supabase-hook-Cj85nccs.js} +167 -21
- package/dist/{supautils-CGk4YpvC.js → supautils-BP_5WAIc.js} +20 -18
- package/dist/svelte/index.d.ts +7 -7
- package/dist/svelte/index.js +8 -8
- package/dist/svelte/runtime.d.ts +3 -3
- package/dist/svelte/runtime.js +3 -3
- package/dist/svelte/source.d.ts +7 -7
- package/dist/svelte/source.js +5 -5
- package/dist/sveltekit/index.d.ts +4 -4
- package/dist/sveltekit/index.js +2 -2
- package/dist/{tables-DimBcVWY.js → tables-BsGE6HBR.js} +7 -7
- package/dist/tanstack-start/index.d.ts +4 -4
- package/dist/tanstack-start/index.js +2 -2
- package/dist/{tenancy-5d1zVBvK.js → tenancy-DvOHHk3-.js} +1 -1
- package/dist/terminal/index.d.ts +5 -5
- package/dist/terminal/index.js +6 -6
- package/dist/testing/core.d.ts +1 -1
- package/dist/testing/core.js +1 -1
- package/dist/testing/fixtures/index.d.ts +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/testing/index.d.ts +29 -22
- package/dist/testing/index.js +118 -46
- package/dist/testing/saas/index.d.ts +3 -3
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/token-D6pWn8Uj.d.ts +11 -0
- package/dist/{token-DC9EQiet.js → token-DaMnIU9O.js} +24 -8
- package/dist/{tool-refusal-Qpjs_W6M.js → tool-refusal-C1UlhU0V.js} +1 -1
- package/dist/trpc/index.d.ts +5 -5
- package/dist/trpc/index.js +3 -3
- package/dist/{type-helpers-c7Xo_2Cu.d.ts → type-helpers-C_OnZW8c.d.ts} +1 -1
- package/dist/{types-B2efzoSX.d.ts → types-AOP5HQku.d.ts} +1 -1
- package/dist/{types-DlelvQk4.d.ts → types-B3BOcI0J.d.ts} +2 -2
- package/dist/{types-DLvhVm1r.d.ts → types-BvBbkAu1.d.ts} +16 -7
- package/dist/{types-BB-zWDcR.d.ts → types-CA-A33Q5.d.ts} +5 -5
- package/dist/{types-Cklw5hJo.d.ts → types-CAAN7evk.d.ts} +24 -1
- package/dist/{types-DsHGPtkR.d.ts → types-CJC1aaoJ.d.ts} +2 -2
- package/dist/{types-CWBsAwqn.d.ts → types-D29K5ZNP.d.ts} +4 -4
- package/dist/{types-CEinc15V.d.ts → types-DVZNTkU0.d.ts} +3 -4
- package/dist/{types-ZzRGoViD.d.ts → types-NYoj8JBm.d.ts} +2 -2
- package/dist/{types-B6ExllNo.d.ts → types-Sj1U8HMm.d.ts} +2 -2
- package/dist/{types-CN0LsqbK.d.ts → types-UfpcY575.d.ts} +3 -3
- package/dist/{types-rCRV4Ge-.d.ts → types-e82uzrTn.d.ts} +4 -4
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +2 -2
- package/dist/{usage-e6M1Mls1.js → usage-COsGLht5.js} +6 -6
- package/dist/{usage-DBNrpwoT.js → usage-CqcMeQgX.js} +2 -2
- package/dist/usage-D1cpHO7p.js +1 -0
- package/dist/{validation-error-uvp-kyfO.d.ts → validation-error-DpvsBwZJ.d.ts} +1 -1
- package/dist/{verify-CgIpJRcG.js → verify-C8G8D5mk.js} +19 -19
- package/dist/{version-cache-Df11C2Qp.d.ts → version-cache-9Vq5QVFC.d.ts} +9 -3
- package/dist/{views-CD8wuL4Z.js → views-TrZYlDnM.js} +1 -1
- package/dist/vue/index.d.ts +7 -7
- package/dist/vue/index.js +6 -6
- package/dist/{waiter-CqUKX6CY.d.ts → waiter-C2cXXLFZ.d.ts} +2 -2
- package/dist/{watch-DAkjm75Y.js → watch-DXRDBSCu.js} +3 -3
- package/dist/watch-DnymTAfe.js +1 -0
- package/dist/webmcp/index.d.ts +1 -1
- package/dist/webmcp/index.js +1 -1
- package/dist/{where-scope-DlCdCM_8.js → where-scope-BKrqUDVk.js} +5 -5
- package/dist/{who-can-BoDJm0Nc.js → who-can-BY5d3HPw.js} +4 -4
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.js +5 -4
- package/dist/workflow-sdk/index.d.ts +4 -4
- package/dist/{wrap-B2wziJI_.js → wrap-C5PWzgkq.js} +1 -1
- package/dist/{wrap-DxXB54Wu.d.ts → wrap-DpZAbxuD.d.ts} +2 -2
- package/package.json +8 -5
- package/schemas/approval-request-v1.json +5 -0
- package/schemas/catalog-v1.json +18 -2
- package/schemas/cli-result-v1.json +0 -2
- package/schemas/snapshot-v1.json +9 -0
- package/skills/permdock-approvals/SKILL.md +8 -8
- package/skills/permdock-approvals/references/stores-and-resume.md +7 -3
- package/skills/permdock-audit/SKILL.md +1 -1
- package/skills/permdock-data/references/queries-and-rls.md +1 -1
- package/dist/action-result-BcudBQOF.d.ts +0 -19
- package/dist/catalog-D3oS2GH3.js +0 -1
- package/dist/collect-D-eroIfV.js +0 -1
- package/dist/load-Dm0pSYH3.js +0 -1
- package/dist/output-files-BHOIlrfD.js +0 -1
- package/dist/powersync-CnGzxvEl.js +0 -1
- package/dist/pull-D6dloyrc.js +0 -1
- package/dist/renames-CGj7YwcQ.js +0 -175
- package/dist/run-DlQYPtPv.js +0 -1
- package/dist/supabase-hook-qsewAVZY.js +0 -1
- package/dist/usage-D3KJyaNS.js +0 -1
- package/dist/watch-CuPz0D2M.js +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/supabase/authz-topic.ts
|
|
2
|
+
/**
|
|
3
|
+
* The server topic the generated version trigger broadcasts on without
|
|
4
|
+
* better-supabase; no user may join it. With better-supabase it is
|
|
5
|
+
* `better_supabase:authz`.
|
|
6
|
+
*/
|
|
7
|
+
const AUTHZ_TOPIC = "permdock:authz";
|
|
8
|
+
/** The broadcast event of a version bump, as better-supabase names it. */
|
|
9
|
+
const AUTHZ_EVENT = "changed";
|
|
10
|
+
/** The private topic one user receives their own version bumps on. */
|
|
11
|
+
function authzUserTopic(userId) {
|
|
12
|
+
return `authz:${userId}`;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { AUTHZ_TOPIC as n, authzUserTopic as r, AUTHZ_EVENT as t };
|
package/dist/authzen/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as ApprovalStore } from "../types-
|
|
3
|
-
import { a as ProblemDetails } from "../errors-
|
|
4
|
-
import { t as InstanceOptions } from "../instance-options-
|
|
5
|
-
import { a as evaluationsSemantic, n as EvaluationsSemantic, r as evaluateBatch, t as EVALUATIONS_SEMANTICS } from "../evaluations-
|
|
1
|
+
import { E as Policy, _r as Principal, pr as Delegation, sr as Actor } from "../policy-types-IRJVABmm.js";
|
|
2
|
+
import { m as ApprovalStore } from "../types-BvBbkAu1.js";
|
|
3
|
+
import { a as ProblemDetails } from "../errors-Dc9FdamT.js";
|
|
4
|
+
import { t as InstanceOptions } from "../instance-options-BOCRxEFb.js";
|
|
5
|
+
import { a as evaluationsSemantic, n as EvaluationsSemantic, r as evaluateBatch, t as EVALUATIONS_SEMANTICS } from "../evaluations-BasA9zXp.js";
|
|
6
6
|
//#region src/authzen/map.d.ts
|
|
7
7
|
type AuthzenEntity = {
|
|
8
8
|
readonly type?: unknown;
|
package/dist/authzen/index.js
CHANGED
|
@@ -7,8 +7,8 @@ import { n as resourceRef } from "../resource-ref-CaS9yVPi.js";
|
|
|
7
7
|
import { n as readBodyText, t as MAX_BODY_BYTES } from "../body-text-DQhcmqdY.js";
|
|
8
8
|
import { r as hasCredentials } from "../http-DKLXrFGk.js";
|
|
9
9
|
import { d as unauthenticatedProblem, l as problemResponse, o as methodNotAllowed } from "../problem-BVLHFK33.js";
|
|
10
|
-
import { n as resolveOrNull, t as buildInstance } from "../build-instance-
|
|
11
|
-
import { a as evaluationReasons, c as withRequestId, g as wireResourceId, h as permissionLookup, i as evaluateBatch, m as itemResourceData, n as applyApprovalResume, r as authzenMetadata, s as evaluationsSemantic, t as EVALUATIONS_SEMANTICS } from "../evaluations-
|
|
10
|
+
import { n as resolveOrNull, t as buildInstance } from "../build-instance-lye7oEqf.js";
|
|
11
|
+
import { a as evaluationReasons, c as withRequestId, g as wireResourceId, h as permissionLookup, i as evaluateBatch, m as itemResourceData, n as applyApprovalResume, r as authzenMetadata, s as evaluationsSemantic, t as EVALUATIONS_SEMANTICS } from "../evaluations-DG40eSJa.js";
|
|
12
12
|
//#region src/authzen/map.ts
|
|
13
13
|
const UNKNOWN = {
|
|
14
14
|
outcome: "denied",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Gt as InstanceHandle, Jn as Denial, Kt as Instant } from "./policy-types-IRJVABmm.js";
|
|
2
2
|
import { u as Permission } from "./permission-types-CAY-GU7e.js";
|
|
3
3
|
import { t as Operation } from "./operations-Ci_rT6Uo.js";
|
|
4
4
|
//#region src/core/automation.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as CustomRoleSource, P as RoleBinding, Y as DecisionSink, _r as Principal, yr as Subject } from "../policy-types-IRJVABmm.js";
|
|
2
2
|
import { f as PermissionTree } from "../permission-types-CAY-GU7e.js";
|
|
3
3
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
4
4
|
//#region src/better-auth/types.d.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as isReadonlyArray, r as isRecord, t as compact } from "../compact-CAf557ZB.js";
|
|
2
2
|
import { n as freezeDeep } from "../freeze-jjan0lCv.js";
|
|
3
|
-
import { n as role, r as allow } from "../role-builder-
|
|
3
|
+
import { n as role, r as allow } from "../role-builder-BrmOcXch.js";
|
|
4
4
|
import { c as listPermissions } from "../permission-registry-B8tYxPIt.js";
|
|
5
5
|
import { r as validateRecord } from "../thenable-BNSM1U2R.js";
|
|
6
|
-
import { t as anonymousSubject } from "../subject-
|
|
6
|
+
import { i as rootMembershipId, t as anonymousSubject } from "../subject-C7RddW0G.js";
|
|
7
7
|
import { d as membershipEvent } from "../sink-D9_vh372.js";
|
|
8
8
|
//#region src/better-auth/parse.ts
|
|
9
9
|
function asRoles(value) {
|
|
@@ -62,7 +62,8 @@ function parseMemberRows(value, userId, requireUserId = true) {
|
|
|
62
62
|
const roles = asRoles(item["role"] ?? item["roles"]);
|
|
63
63
|
if (tenant === void 0 || roles.length === 0) continue;
|
|
64
64
|
out.push(compact({
|
|
65
|
-
tenant,
|
|
65
|
+
scope: "tenant",
|
|
66
|
+
id: tenant,
|
|
66
67
|
roles
|
|
67
68
|
}));
|
|
68
69
|
}
|
|
@@ -79,8 +80,9 @@ function parseTeamRows(value, userId) {
|
|
|
79
80
|
const roles = asRoles(item["role"] ?? item["roles"]);
|
|
80
81
|
if (team === void 0 || roles.length === 0) continue;
|
|
81
82
|
out.push(compact({
|
|
82
|
-
tenant,
|
|
83
|
-
team,
|
|
83
|
+
within: tenant === void 0 ? void 0 : { tenant },
|
|
84
|
+
scope: "team",
|
|
85
|
+
id: team,
|
|
84
86
|
roles,
|
|
85
87
|
via: `team:${team}`
|
|
86
88
|
}));
|
|
@@ -279,7 +281,7 @@ function memberIn(auth, userId, organizationId, tenant, headers) {
|
|
|
279
281
|
filterValue: userId
|
|
280
282
|
},
|
|
281
283
|
headers
|
|
282
|
-
}), userId).filter((item) => item
|
|
284
|
+
}), userId).filter((item) => rootMembershipId(item) === organizationId), []);
|
|
283
285
|
}
|
|
284
286
|
async function loadMemberships(auth, session, user, userId, tenant, options) {
|
|
285
287
|
let members = parseMemberRows(session["members"] ?? session["member"] ?? user["members"], userId, false);
|
|
@@ -295,8 +297,8 @@ async function loadMemberships(auth, session, user, userId, tenant, options) {
|
|
|
295
297
|
const listUserTeams = auth.api?.listUserTeams;
|
|
296
298
|
if (teams.length === 0 && listUserTeams !== void 0) teams = await settle(async () => parseTeamRows(await listUserTeams({ headers }), userId), []);
|
|
297
299
|
if (options.memberships === "active" && tenant !== void 0) {
|
|
298
|
-
members = members.filter((item) => item
|
|
299
|
-
teams = teams.filter((item) => item.tenant === tenant);
|
|
300
|
+
members = members.filter((item) => rootMembershipId(item) === tenant);
|
|
301
|
+
teams = teams.filter((item) => item.within?.["tenant"] === tenant);
|
|
300
302
|
}
|
|
301
303
|
return [...members, ...teams];
|
|
302
304
|
}
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as ApiKeyPrincipal, E as Policy, Kt as Instant, Tn as ApproverInput, W as CredentialVerifier, Z as Intent, Zn as DeniedDecision, _r as Principal, an as AuthEvent, rt as MembershipSource, wt as SupportSession, yr as Subject } from "../policy-types-IRJVABmm.js";
|
|
2
2
|
import { f as PermissionTree, u as Permission } from "../permission-types-CAY-GU7e.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { i as ApprovalPolicySource } from "../approval-policies-9VagPixq.js";
|
|
4
|
+
import { C as InstanceCache, O as PermissionCheck, _ as PrincipalSource, a as PermDock, h as PrincipalIdentity, k as PermissionState, o as PermDockOptions } from "../permdock-DUWZEOLR.js";
|
|
5
|
+
import { m as ApprovalStore } from "../types-BvBbkAu1.js";
|
|
6
|
+
import { c as AccessReviewStore } from "../types-AOP5HQku.js";
|
|
7
|
+
import { i as SupabaseRpcCaller } from "../postgrest-B_cEDd4e.js";
|
|
8
|
+
import { a as CatalogDocument } from "../types-NYoj8JBm.js";
|
|
9
|
+
import { A as SupabaseSubjectOptions, C as SupabasePrincipal, N as SupabaseSuspension, O as SupabaseSessionLike, s as SqlMembershipSource } from "../sources-CXY05xtB.js";
|
|
10
|
+
import { n as VersionCache } from "../version-cache-9Vq5QVFC.js";
|
|
9
11
|
import { t as SqlQuery } from "../sql-B80DFdpG.js";
|
|
10
|
-
import { c as LinkPolicy, o as CapabilityPrincipal, t as Capability } from "../capability-
|
|
11
|
-
import { AuthorizationProvider } from "better-supabase/
|
|
12
|
-
import { AuthSession, AuthorizationHooks, AuthorizationRequest, Authorizer, SupportAuthorize, SupportAuthorizeInput } from "better-supabase/server";
|
|
12
|
+
import { c as LinkPolicy, o as CapabilityPrincipal, t as Capability } from "../capability-BzjWdKmP.js";
|
|
13
|
+
import { AccessBucketPolicy, AccessTopicPolicy, AuthorizationHooks, AuthorizationProvider, AuthorizationRequest, Authorizer, BlockTables, CredentialProvider, SupportAuthorize, SupportAuthorizeInput, ToolDecision, ToolRef } from "better-supabase/contract";
|
|
13
14
|
import { EntitlementClaimOptions } from "better-supabase/blocks/entitlements";
|
|
15
|
+
import { AuthSession } from "better-supabase/server";
|
|
14
16
|
import { ApiKey, ApiKeyClaimsOptions, ApiKeys } from "better-supabase/blocks/api-keys";
|
|
15
|
-
import { AccessTopicPolicy } from "better-supabase/realtime";
|
|
16
|
-
import { AccessBucketPolicy } from "better-supabase/storage";
|
|
17
|
-
import { CredentialProvider } from "better-supabase/credentials";
|
|
18
|
-
import { ToolDecision, ToolRef } from "better-supabase/mcp";
|
|
19
17
|
import { AuthorizeHookOptions, ProtectWebHandlerOptions } from "better-supabase/workflow-sdk";
|
|
20
18
|
//#region src/better-supabase/access-reviews.d.ts
|
|
21
19
|
type AccessReviewApplierOptions = {
|
|
@@ -82,6 +80,111 @@ type AccessReviewApplyResult = {
|
|
|
82
80
|
*/
|
|
83
81
|
export declare function accessReviewApplier(options: AccessReviewApplierOptions): (reviewId: string) => Promise<AccessReviewApplyResult>;
|
|
84
82
|
//#endregion
|
|
83
|
+
//#region src/better-supabase/approvals-block.d.ts
|
|
84
|
+
/** better-supabase's `AsyncResult`: awaiting it gives `{ ok, data, error }`. */
|
|
85
|
+
type BlockResult<T> = PromiseLike<{
|
|
86
|
+
readonly ok: true;
|
|
87
|
+
readonly data: T;
|
|
88
|
+
} | {
|
|
89
|
+
readonly ok: false;
|
|
90
|
+
readonly error: unknown;
|
|
91
|
+
}>;
|
|
92
|
+
/** A `Temporal.Instant`, as far as the bridge reads it. */
|
|
93
|
+
type BlockInstant = {
|
|
94
|
+
readonly toJSON: () => string;
|
|
95
|
+
};
|
|
96
|
+
type BlockStatus = "pending" | "approved" | "rejected" | "cancelled" | "expired";
|
|
97
|
+
/** The approvals block's request; instants are `Temporal.Instant`. */
|
|
98
|
+
type BlockApprovalRecord<I extends BlockInstant> = {
|
|
99
|
+
readonly id: string;
|
|
100
|
+
readonly status: BlockStatus;
|
|
101
|
+
readonly payload: Readonly<Record<string, unknown>>;
|
|
102
|
+
readonly fingerprint?: string;
|
|
103
|
+
readonly expiresAt?: I;
|
|
104
|
+
readonly decidedAt?: I;
|
|
105
|
+
readonly consumedAt?: I;
|
|
106
|
+
readonly createdAt: I;
|
|
107
|
+
};
|
|
108
|
+
type BlockApprovalApprovers = {
|
|
109
|
+
readonly permission?: string;
|
|
110
|
+
readonly role?: string;
|
|
111
|
+
readonly team?: string;
|
|
112
|
+
readonly users?: readonly string[];
|
|
113
|
+
readonly manager?: boolean;
|
|
114
|
+
};
|
|
115
|
+
/** The approvals block's tenant policy (`options.tenantPolicies`). */
|
|
116
|
+
type BlockApprovalTenantPolicy = {
|
|
117
|
+
readonly organizationId: string;
|
|
118
|
+
readonly subjectType: string;
|
|
119
|
+
readonly action: string;
|
|
120
|
+
readonly conditions?: unknown;
|
|
121
|
+
readonly mode: "confirm" | "authorize";
|
|
122
|
+
readonly steps: readonly {
|
|
123
|
+
readonly approvers: BlockApprovalApprovers;
|
|
124
|
+
readonly required: number;
|
|
125
|
+
}[];
|
|
126
|
+
readonly selfApproval: boolean;
|
|
127
|
+
readonly expiresIn?: string;
|
|
128
|
+
readonly enabled: boolean;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* The calls `blockApprovalStore` makes on `createApprovals(...)` from
|
|
132
|
+
* `better-supabase/blocks/approvals`.
|
|
133
|
+
*/
|
|
134
|
+
type BlockApprovalsClient<I extends BlockInstant> = {
|
|
135
|
+
readonly request: (subject: {
|
|
136
|
+
readonly type: string;
|
|
137
|
+
readonly id: string;
|
|
138
|
+
}, input: {
|
|
139
|
+
readonly action: string;
|
|
140
|
+
readonly reason?: string;
|
|
141
|
+
readonly payload?: Readonly<Record<string, unknown>>;
|
|
142
|
+
readonly fingerprint?: string;
|
|
143
|
+
}) => BlockResult<BlockApprovalRecord<I>>;
|
|
144
|
+
readonly list: (options?: {
|
|
145
|
+
readonly status?: BlockStatus | null;
|
|
146
|
+
readonly pageSize?: number;
|
|
147
|
+
readonly before?: I;
|
|
148
|
+
}) => BlockResult<readonly BlockApprovalRecord<I>[]>;
|
|
149
|
+
readonly consume: (id: string, fingerprint?: string) => BlockResult<BlockApprovalRecord<I>>;
|
|
150
|
+
};
|
|
151
|
+
/** The call `blockApprovalPolicySource` makes on the approvals block. */
|
|
152
|
+
type BlockApprovalPoliciesClient = {
|
|
153
|
+
readonly listPolicies: (options?: {
|
|
154
|
+
readonly subjectType?: string;
|
|
155
|
+
readonly pageSize?: number;
|
|
156
|
+
}) => BlockResult<readonly BlockApprovalTenantPolicy[]>;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* An `ApprovalStore` over better-supabase's approvals block, so a PermDock
|
|
160
|
+
* `approval-required` decision files a block request and is decided in the
|
|
161
|
+
* block's own approve and reject flow. `create` files the request on the
|
|
162
|
+
* resource under the permission's action, with the PermDock request in
|
|
163
|
+
* `payload.permdock` and its `fingerprint`. `get`, `getById` and `list` read
|
|
164
|
+
* the block's latest 2,000 requests in the block's tenant. `consume` calls the
|
|
165
|
+
* block's `consume`, which refuses a second use and another fingerprint.
|
|
166
|
+
* `resolve` throws: approvers decide through the block, never through
|
|
167
|
+
* `approvalsHandler`. `expire` answers 0, since the block expires requests
|
|
168
|
+
* itself.
|
|
169
|
+
*/
|
|
170
|
+
export declare function blockApprovalStore<I extends BlockInstant>(approvals: BlockApprovalsClient<I>): ApprovalStore;
|
|
171
|
+
type BlockApprovalPolicySourceOptions = {
|
|
172
|
+
/** The scope a step's `role` is held in. Default `tenant`. */
|
|
173
|
+
readonly roleScope?: string;
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* An `ApprovalPolicySource` over the approvals block's tenant policies, so a
|
|
177
|
+
* PermDock decision asks for approval wherever the block would. A policy keys
|
|
178
|
+
* the permission `<subjectType>.<action>`; its steps become sequential stages
|
|
179
|
+
* whose approvers are any of the step's permission, role, users and manager;
|
|
180
|
+
* `confirm` with `selfApproval` lets the principal approve; `expiresIn` caps
|
|
181
|
+
* the request's `ttl`. `conditions` are not read, so a conditional policy
|
|
182
|
+
* applies to every call: stricter, never looser. A step with only a `team`
|
|
183
|
+
* approver, an interval it cannot read or a failed read makes the source fail,
|
|
184
|
+
* and every call an allow would grant denies.
|
|
185
|
+
*/
|
|
186
|
+
export declare function blockApprovalPolicySource(approvals: BlockApprovalPoliciesClient, options?: BlockApprovalPolicySourceOptions): ApprovalPolicySource;
|
|
187
|
+
//#endregion
|
|
85
188
|
//#region src/better-supabase/approvers.d.ts
|
|
86
189
|
/**
|
|
87
190
|
* Who may approve each better-supabase request kind: `'ai-tool'` (a tool call),
|
|
@@ -163,9 +266,9 @@ type ApiKeySessionOptions = {
|
|
|
163
266
|
};
|
|
164
267
|
/**
|
|
165
268
|
* The fields of better-supabase's `SessionSnapshot` a subject reads: one
|
|
166
|
-
* verified token, from `bsb.
|
|
167
|
-
*
|
|
168
|
-
*
|
|
269
|
+
* verified token, from `bsb.getClaims()`, that `'use cache: private'` scopes
|
|
270
|
+
* share. Its `issuedAt` and `authzVersion` come from the `iat` and `authz_ver`
|
|
271
|
+
* claims.
|
|
169
272
|
*/
|
|
170
273
|
type SessionSnapshotLike = {
|
|
171
274
|
readonly accessToken: string;
|
|
@@ -234,6 +337,11 @@ type SubscriberPolicyOptions<E extends SubscriberPolicyEvent = SubscriberPolicyE
|
|
|
234
337
|
readonly sender?: (event: E) => string | null | undefined;
|
|
235
338
|
/** Sources for the sender's and subscribers' instances. */
|
|
236
339
|
readonly options?: Omit<PermDockOptions, "tenant" | "actor" | "delegation" | "session" | "expiresAt" | "principals">;
|
|
340
|
+
/**
|
|
341
|
+
* The process-wide instance cache: an instance is reused while the subject's
|
|
342
|
+
* authorization version is unchanged.
|
|
343
|
+
*/
|
|
344
|
+
readonly instances?: InstanceCache;
|
|
237
345
|
};
|
|
238
346
|
/**
|
|
239
347
|
* The per-subscriber check for better-supabase's webhooks-out, outbox and
|
|
@@ -267,6 +375,11 @@ type SupportPolicyOptions = {
|
|
|
267
375
|
* tenant's `supportSessions` rules.
|
|
268
376
|
*/
|
|
269
377
|
readonly options?: Omit<PermDockOptions, "tenant" | "actor" | "delegation" | "session" | "expiresAt">;
|
|
378
|
+
/**
|
|
379
|
+
* The process-wide instance cache: an instance is reused while the subject's
|
|
380
|
+
* authorization version is unchanged.
|
|
381
|
+
*/
|
|
382
|
+
readonly instances?: InstanceCache;
|
|
270
383
|
/**
|
|
271
384
|
* The session's permissions when a start asks for `readOnly: false`. Without
|
|
272
385
|
* it such a start is refused; a read-only start gets every `readOnlyHint`
|
|
@@ -316,6 +429,11 @@ type AuthorizationHooksOptions = {
|
|
|
316
429
|
* `subjectFromBetterSupabase`.
|
|
317
430
|
*/
|
|
318
431
|
readonly subject?: Omit<BetterSupabaseSubjectOptions, "apiKeys">;
|
|
432
|
+
/**
|
|
433
|
+
* The process-wide instance cache: an instance is reused while the subject's
|
|
434
|
+
* authorization version is unchanged.
|
|
435
|
+
*/
|
|
436
|
+
readonly instances?: InstanceCache;
|
|
319
437
|
/** Sources for every instance the hooks build. */
|
|
320
438
|
readonly options?: Omit<PermDockOptions, "tenant" | "actor" | "delegation" | "session" | "expiresAt">;
|
|
321
439
|
/**
|
|
@@ -358,11 +476,12 @@ type AuthorizationHooksOptions = {
|
|
|
358
476
|
* authorization })`), decided by `policy`. Every hook builds the principal's
|
|
359
477
|
* instance from the claims `claims` loads now, never from the request, and
|
|
360
478
|
* fails closed: a throw, an unknown key and `approval-required` refuse.
|
|
361
|
-
* `automation` and `
|
|
362
|
-
* `
|
|
363
|
-
* `
|
|
364
|
-
*
|
|
365
|
-
* `
|
|
479
|
+
* `automation`, `delegation` and `sessionTags` (`snapshotTag(userId)`, so
|
|
480
|
+
* `evictSession` and sign-out clear PermDock snapshots) are always set;
|
|
481
|
+
* `identities`, `delivery`, `approverOf`, `support` and `tickets` only with the
|
|
482
|
+
* options they read. `delegation.permissions` maps each scope to the keys whose
|
|
483
|
+
* `.scope` it is, was renamed from, or that a policy `oauthScopes` entry
|
|
484
|
+
* covers, and reads no `authorization_details`.
|
|
366
485
|
*/
|
|
367
486
|
export declare function authorizationHooks(options: AuthorizationHooksOptions): AuthorizationHooks;
|
|
368
487
|
//#endregion
|
|
@@ -494,12 +613,25 @@ type AuthorizerOptions = {
|
|
|
494
613
|
*/
|
|
495
614
|
readonly versions?: VersionCache;
|
|
496
615
|
/**
|
|
497
|
-
* The intent of one check. By default
|
|
498
|
-
*
|
|
499
|
-
* `
|
|
500
|
-
* `write` and reads the version
|
|
616
|
+
* The intent of one check. By default better-supabase's `context.intent`;
|
|
617
|
+
* without it a batch (`evaluations`, list and row filtering) and an action
|
|
618
|
+
* named `read`, `list` or `view` are `read`, so `claimsFirst` may answer from
|
|
619
|
+
* the version cache, and every other check is `write` and reads the version
|
|
620
|
+
* live.
|
|
501
621
|
*/
|
|
502
622
|
readonly intent?: (request: AuthorizationRequest<Permission>) => Intent;
|
|
623
|
+
/**
|
|
624
|
+
* The approval store an `approval-required` decision files its request in and
|
|
625
|
+
* resumes from. The approval id the client sends (better-supabase's
|
|
626
|
+
* `approval: { header }`) resumes one `evaluate` call; `evaluations` never
|
|
627
|
+
* consumes it. Without a store, `approval-required` is returned as is.
|
|
628
|
+
*/
|
|
629
|
+
readonly store?: ApprovalStore;
|
|
630
|
+
/**
|
|
631
|
+
* Shares instances across requests while the caller's authorization version
|
|
632
|
+
* is unchanged: the `instanceCache()` the app's other adapters use.
|
|
633
|
+
*/
|
|
634
|
+
readonly instances?: InstanceCache;
|
|
503
635
|
/** Receives every error a check threw; the check still denies. */
|
|
504
636
|
readonly onError?: BetterSupabaseOnError;
|
|
505
637
|
/**
|
|
@@ -517,7 +649,7 @@ type AuthorizerOptions = {
|
|
|
517
649
|
* throw denies. With better-supabase's runtime `memo`, the checks of one
|
|
518
650
|
* request scope share an instance per claims, tenant and intent.
|
|
519
651
|
*/
|
|
520
|
-
export declare function authorizer(options: AuthorizerOptions): Authorizer<Permission>;
|
|
652
|
+
export declare function authorizer(options: AuthorizerOptions): Authorizer<Permission, VersionCache>;
|
|
521
653
|
//#endregion
|
|
522
654
|
//#region src/better-supabase/block-memberships.d.ts
|
|
523
655
|
/**
|
|
@@ -545,14 +677,23 @@ type BlockRoleJunction = {
|
|
|
545
677
|
readonly id?: string;
|
|
546
678
|
};
|
|
547
679
|
type BlockMembershipSourceOptions = {
|
|
548
|
-
/**
|
|
680
|
+
/**
|
|
681
|
+
* `blockTables(config)` from `better-supabase/sql`: the memberships and
|
|
682
|
+
* `membership_roles` tables with the app's `blocks.memberships.tables` and
|
|
683
|
+
* `columns` renames. `table` and `columns` win over it.
|
|
684
|
+
*/
|
|
685
|
+
readonly tables?: BlockTables;
|
|
686
|
+
/**
|
|
687
|
+
* The memberships block's table. Default the `tables` entry, else
|
|
688
|
+
* `better_supabase.memberships`.
|
|
689
|
+
*/
|
|
549
690
|
readonly table?: string;
|
|
550
691
|
/** The declared scope a row is a membership of. Default `organization`. */
|
|
551
692
|
readonly scope?: string;
|
|
552
693
|
/**
|
|
553
694
|
* Physical column names, keyed like better-supabase's
|
|
554
|
-
* `blocks.memberships.columns.memberships`. Defaults `
|
|
555
|
-
* `user_id`, `role` and `disabled_at`.
|
|
695
|
+
* `blocks.memberships.columns.memberships`. Defaults the `tables` entry's
|
|
696
|
+
* columns, else `organization_id`, `user_id`, `role` and `disabled_at`.
|
|
556
697
|
*/
|
|
557
698
|
readonly columns?: {
|
|
558
699
|
readonly tenant?: string;
|
|
@@ -566,10 +707,10 @@ type BlockMembershipSourceOptions = {
|
|
|
566
707
|
*/
|
|
567
708
|
readonly roleThrough?: BlockRoleThrough;
|
|
568
709
|
/**
|
|
569
|
-
* A role junction read instead of the role column. `"many"` reads
|
|
570
|
-
* `
|
|
571
|
-
* `blocks.memberships.options.roles.many` keeps,
|
|
572
|
-
* columns.
|
|
710
|
+
* A role junction read instead of the role column. `"many"` reads the
|
|
711
|
+
* `tables` entry for `membership_roles`, else `membership_roles` in the
|
|
712
|
+
* table's schema: the role set `blocks.memberships.options.roles.many` keeps,
|
|
713
|
+
* keyed by the tenant and user columns.
|
|
573
714
|
*/
|
|
574
715
|
readonly roles?: BlockRoleJunction | "many";
|
|
575
716
|
readonly query?: SqlQuery;
|
|
@@ -703,9 +844,10 @@ type ToolPolicy<C> = {
|
|
|
703
844
|
* The `authorize` and `visible` hooks of better-supabase's `createMcp`, for
|
|
704
845
|
* tools whose `meta` is a PermDock permission. A tool without a permission is
|
|
705
846
|
* hidden and refused. `authorize` grants only a `granted` decision: an
|
|
706
|
-
* approval-required call is refused, because `
|
|
707
|
-
* A
|
|
708
|
-
*
|
|
847
|
+
* approval-required call is refused, because `authorize` has no approval
|
|
848
|
+
* outcome. A tool whose `permission` goes through `authorizer` with a `store`
|
|
849
|
+
* returns the approval id and resumes it instead. A denial's text names the
|
|
850
|
+
* first denial reason. A throw anywhere refuses and reaches `onError`.
|
|
709
851
|
*/
|
|
710
852
|
export declare function toolPolicy<C>(options: ToolPolicyOptions<C>): ToolPolicy<C>;
|
|
711
853
|
//#endregion
|
|
@@ -741,6 +883,67 @@ type PrincipalFromMembershipsOptions = {
|
|
|
741
883
|
*/
|
|
742
884
|
export declare function principalFromMemberships(userId: string, rows: readonly BetterSupabaseMembershipRow[], options?: PrincipalFromMembershipsOptions): Principal;
|
|
743
885
|
//#endregion
|
|
886
|
+
//#region src/better-supabase/permdock-for.d.ts
|
|
887
|
+
/**
|
|
888
|
+
* What `bsb.bootstrap()` and `bsb.getAccess()` return: a session with the
|
|
889
|
+
* tenant and the authorization version read in the same request.
|
|
890
|
+
*/
|
|
891
|
+
type PermDockForResult = {
|
|
892
|
+
readonly session: SupabaseSessionLike | ApiKeySession | null;
|
|
893
|
+
readonly tenant: string | null;
|
|
894
|
+
readonly authzVersion: number | null;
|
|
895
|
+
/** `bsb.bootstrap()`'s `session_active()`; `false` is signed out. */
|
|
896
|
+
readonly sessionActive?: boolean;
|
|
897
|
+
};
|
|
898
|
+
/** Who an instance is for. */
|
|
899
|
+
type PermDockForInput = SupabaseSessionLike | ApiKeySession | SessionSnapshotLike | PermDockForResult | Subject | null | undefined;
|
|
900
|
+
type PermDockForQuery = {
|
|
901
|
+
/** Default the source's tenant (`bootstrap`, `getAccess`). */
|
|
902
|
+
readonly tenant?: string | null;
|
|
903
|
+
/** Default `read`. */
|
|
904
|
+
readonly intent?: Intent;
|
|
905
|
+
};
|
|
906
|
+
/**
|
|
907
|
+
* The instance for a session, a `bsb.bootstrap()` result, a `bsb.getAccess()`
|
|
908
|
+
* result or a subject. The second argument is a query or a tenant, so it also
|
|
909
|
+
* serves as an approvals handler's or access-review handler's `permdockFor`.
|
|
910
|
+
*/
|
|
911
|
+
type PermDockFor = (source: PermDockForInput, query?: PermDockForQuery | string | null) => Promise<PermDock>;
|
|
912
|
+
type PermDockForOptions = {
|
|
913
|
+
readonly policy: Policy;
|
|
914
|
+
/** How the verified claims map to a subject. */
|
|
915
|
+
readonly subject?: BetterSupabaseSubjectOptions;
|
|
916
|
+
/**
|
|
917
|
+
* The membership source a stale token is re-read from, wrapped in
|
|
918
|
+
* `claimsFirst(source, { onStale: 'reread', versions })`.
|
|
919
|
+
*/
|
|
920
|
+
readonly memberships?: MembershipSource | readonly MembershipSource[];
|
|
921
|
+
/** The version `claimsFirst` compares with `authz_ver`; default the source's. */
|
|
922
|
+
readonly version?: MembershipSource["version"];
|
|
923
|
+
/** The process-wide version cache (`createNext({ versions })`). */
|
|
924
|
+
readonly versions?: VersionCache;
|
|
925
|
+
/** The process-wide instance cache, shared with the app's other adapters. */
|
|
926
|
+
readonly instances?: InstanceCache;
|
|
927
|
+
/** Sources and sinks for each instance. */
|
|
928
|
+
readonly options?: Omit<PermDockOptions, "tenant" | "intent" | "version">;
|
|
929
|
+
};
|
|
930
|
+
/**
|
|
931
|
+
* One resolver for every instance of the app: `permdockFor(await
|
|
932
|
+
* bsb.claims())`, `permdockFor(await bsb.bootstrap(...))` or `permdockFor(await
|
|
933
|
+
* bsb.getAccess(...))`. A bootstrap or access result passes its `authzVersion`
|
|
934
|
+
* as `version.known`, so the instance reads no version, and a `sessionActive:
|
|
935
|
+
* false` bootstrap is anonymous. With `instances`, a subject at an unchanged
|
|
936
|
+
* version reuses its instance across requests.
|
|
937
|
+
*/
|
|
938
|
+
export declare function permdockFor(options: PermDockForOptions): PermDockFor;
|
|
939
|
+
/**
|
|
940
|
+
* One `{ allowed, outcome, reason? }` per named check for `input`, from one
|
|
941
|
+
* `permdockFor` instance: frozen plain JSON an island returns from `'use cache:
|
|
942
|
+
* private'`. A check that throws denies its entry; an instance that cannot be
|
|
943
|
+
* built denies them all.
|
|
944
|
+
*/
|
|
945
|
+
export declare function getPermissions<K extends string>(resolve: PermDockFor, input: PermDockForInput, checks: Readonly<Record<K, PermissionCheck>>, query?: PermDockForQuery | string | null): Promise<Readonly<Record<K, PermissionState>>>;
|
|
946
|
+
//#endregion
|
|
744
947
|
//#region src/better-supabase/principals.d.ts
|
|
745
948
|
/**
|
|
746
949
|
* Where an identity link points: an app user, whose claims `principal` loads,
|
|
@@ -915,4 +1118,36 @@ export declare function hookCan(permdock: PermDock, options?: HookCanOptions): N
|
|
|
915
1118
|
*/
|
|
916
1119
|
export declare function handlerCan(source: HandlerPermDockSource, options?: HandlerCanOptions): ProtectWebHandlerOptions["can"];
|
|
917
1120
|
//#endregion
|
|
918
|
-
|
|
1121
|
+
//#region src/better-supabase/workflow-resource.d.ts
|
|
1122
|
+
/**
|
|
1123
|
+
* better-supabase's `RecordRef`: the record a workflow run belongs to, a
|
|
1124
|
+
* subject type from `config.subjects` and its id. Structural, so the
|
|
1125
|
+
* better-supabase type satisfies it without an import.
|
|
1126
|
+
*/
|
|
1127
|
+
type WorkflowRecordRef = {
|
|
1128
|
+
readonly type: string;
|
|
1129
|
+
readonly id: string;
|
|
1130
|
+
};
|
|
1131
|
+
/** A subject type from `config.subjects` to the PermDock resource name it is. */
|
|
1132
|
+
type WorkflowSubjectTypes = Readonly<Record<string, string>>;
|
|
1133
|
+
type WorkflowResourceResult = {
|
|
1134
|
+
readonly ok: true;
|
|
1135
|
+
readonly resource: {
|
|
1136
|
+
readonly type: string;
|
|
1137
|
+
readonly id: string;
|
|
1138
|
+
};
|
|
1139
|
+
} | {
|
|
1140
|
+
readonly ok: false;
|
|
1141
|
+
readonly cause: "validation";
|
|
1142
|
+
readonly decision: DeniedDecision;
|
|
1143
|
+
};
|
|
1144
|
+
/**
|
|
1145
|
+
* The resource a `workflow.start` check decides on for a run started on
|
|
1146
|
+
* `subject`: `{ type, id }`, with the type `types` maps the subject type to. A
|
|
1147
|
+
* subject type `types` does not name, a missing or empty id, or an id over 256
|
|
1148
|
+
* characters is `{ ok: false, cause: 'validation' }` with the denial to
|
|
1149
|
+
* return.
|
|
1150
|
+
*/
|
|
1151
|
+
export declare function workflowResource(subject: unknown, types: WorkflowSubjectTypes): WorkflowResourceResult;
|
|
1152
|
+
//#endregion
|
|
1153
|
+
export type { AccessPolicyOptions, AccessReviewApplierOptions, AccessReviewApplyFailure, AccessReviewApplyResult, ApiKeySession, ApiKeySessionOptions, ApiKeyVerifierOptions, AuthorizationHooksOptions, AuthorizationProviderOptions, AuthorizerOperation, AuthorizerOptions, BetterSupabaseActiveTenant, BetterSupabaseErrorContext, BetterSupabaseIdentityLink, BetterSupabaseMembershipRow, BetterSupabaseOnError, BetterSupabaseSubjectOptions, BlockApprovalApprovers, BlockApprovalPoliciesClient, BlockApprovalPolicySourceOptions, BlockApprovalRecord, BlockApprovalTenantPolicy, BlockApprovalsClient, BlockInstant, BlockMembershipSourceOptions, BlockRoleJunction, BlockRoleThrough, BucketAccess, CredentialGuardOptions, HandlerCanOptions, HandlerPermDockSource, HookCanOptions, McpToolDecision, McpToolRef, PendingSupportSession, PermDockFor, PermDockForInput, PermDockForOptions, PermDockForQuery, PermDockForResult, PrincipalFromMembershipsOptions, PrincipalSourceOptions, ProviderApprovers, RoleOrderOptions, ServiceRoles, SessionSnapshotLike, ShareLinkResolver, ShareLinkRow, ShareLinkSubjectOptions, ShareLinkTarget, SubscriberPolicyEvent, SubscriberPolicyOptions, SupabasePrincipal, SupportPolicyOptions, ToolPolicy, ToolPolicyOptions, TopicAccess, WorkflowRecordRef, WorkflowResourceResult, WorkflowSubjectTypes };
|