permdock 0.32.0 → 0.35.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 +2 -2
- package/dist/{adoption-scan-BJMEEu7V.js → adoption-scan-oaPsvHSN.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/app/index.d.ts +1 -1
- package/dist/app/index.js +1 -1
- package/dist/{approval-chain-D97rgMoA.js → approval-chain-BEeExHpb.js} +15 -10
- package/dist/{approval-prompt-yNyhQqn8.d.ts → approval-prompt-BKxaKtby.d.ts} +1 -1
- package/dist/approvals/index.d.ts +3 -3
- package/dist/{arazzo-BAgh0PT6.js → arazzo-1oDMApA_.js} +2 -2
- package/dist/{arazzo-C_xK2Kaa.js → arazzo-B2PszcDL.js} +1 -1
- package/dist/astro/index.d.ts +4 -4
- package/dist/astro/index.js +1 -1
- package/dist/{audience-CARf-b-R.js → audience-B6DQ5wQu.js} +1 -1
- package/dist/authzen/index.d.ts +6 -6
- package/dist/authzen/index.js +1 -1
- package/dist/{automation-0VF1xe4o.d.ts → automation-C7WH5XcZ.d.ts} +1 -1
- package/dist/better-auth/index.d.ts +1 -1
- package/dist/better-supabase/index.d.ts +34 -13
- package/dist/better-supabase/index.js +21 -21
- package/dist/{bind-zQacwAOg.d.ts → bind-BnrOLyJq.d.ts} +7 -7
- package/dist/{bind-BYeoLJgN.js → bind-DPptdk31.js} +2 -2
- package/dist/{bsb-access-tags-CjeR7v7-.js → bsb-access-tags-uDuwPUbT.js} +12 -3
- package/dist/{bsb-action-keys-CYEREFMg.js → bsb-action-keys-BfZAwg-9.js} +1 -1
- package/dist/{budgets-Dpumu_Dt.js → budgets-hi-ecgEd.js} +3 -3
- package/dist/{build-instance-CFiegi_w.js → build-instance-DZEWYO-A.js} +1 -1
- package/dist/bundle-size-BRFeBvuv.js +1 -0
- package/dist/{bundle-size-Ddhv_H_v.js → bundle-size-DbXV65Ix.js} +2 -2
- package/dist/{capability-BPzseilU.d.ts → capability-BW-vAxJi.d.ts} +1 -1
- package/dist/{casbin-BErdqy1J.js → casbin-DrdS0vLy.js} +1 -1
- package/dist/{casbin-EwdKipQs.js → casbin-vtIUd-6L.js} +1 -1
- package/dist/catalog/index.d.ts +4 -4
- package/dist/catalog/index.js +4 -4
- package/dist/{challenge-CRB1X3Ry.js → challenge-E9sicsCA.js} +1 -1
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/chat-sdk/index.d.ts +3 -3
- package/dist/{claims-size-BsSDVD5u.js → claims-size-BUhCWS88.js} +18 -3
- package/dist/claims-size-C6oKGuOM.js +1 -0
- 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/cli/bin.js +1 -1
- package/dist/cli/generate/watch-worker.js +2 -2
- package/dist/cli/index.d.ts +6 -6
- package/dist/cli/index.js +3 -3
- package/dist/cli/plugins/app.d.ts +1 -1
- package/dist/cli/plugins/app.js +1 -1
- package/dist/cli/plugins/better-supabase.d.ts +1 -1
- package/dist/cli/plugins/openapi.d.ts +1 -1
- package/dist/cli/plugins/openapi.js +1 -1
- package/dist/cli/plugins/powersync.d.ts +1 -1
- package/dist/cli/plugins/powersync.js +1 -1
- package/dist/cli/plugins/rls.d.ts +2 -2
- package/dist/cli/plugins/rls.js +1 -1
- package/dist/cli/plugins/schemas.d.ts +1 -1
- package/dist/cli/plugins/schemas.js +1 -1
- package/dist/cli/plugins/scim.d.ts +2 -2
- package/dist/cli/plugins/supabase-hook.d.ts +2 -2
- package/dist/cli/plugins/supabase-hook.js +1 -1
- package/dist/cli/plugins/supabase.d.ts +3 -3
- package/dist/cli/plugins/supabase.js +2 -2
- package/dist/cli/plugins/ui.d.ts +1 -1
- package/dist/cli/plugins/ui.js +1 -1
- package/dist/{client-subject-xCSkKD1C.d.ts → client-subject-YAGMzRa-.d.ts} +2 -2
- package/dist/cloud/index.d.ts +8 -8
- package/dist/cloud/index.js +1 -1
- package/dist/{cloud-DW3q3qnp.js → cloud-BQnIR-SS.js} +2 -2
- package/dist/{codemod-DVDMFsTX.js → codemod-C0OHCnaj.js} +6 -6
- package/dist/{codemod-CF7NNDzA.js → codemod-rv5XSBNw.js} +1 -1
- package/dist/{collect-CE5wK0AX.js → collect-Ba7ccZ23.js} +1 -1
- package/dist/compile/index.d.ts +1 -1
- package/dist/{compile-BXKYYmT1.js → compile-BRDpja_Y.js} +10 -9
- package/dist/{compile-tG1zkSgX.d.ts → compile-CoUadQXF.d.ts} +2 -2
- package/dist/{completion-B59uPAnZ.js → completion-Dgjdte2-.js} +1 -1
- package/dist/{config-7QvEq57a.js → config-Dan6vcvj.js} +2 -2
- package/dist/{config-VCa1RLUe.js → config-anQ9E37F.js} +1 -1
- package/dist/{config-report-CjvA6lGI.js → config-report-C43BSFHY.js} +3 -3
- package/dist/{config-shape-BTojaD-H.js → config-shape-BODqM-rG.js} +1 -1
- package/dist/{context-BQHKgT1m.js → context-Nr3nknZX.js} +2 -2
- package/dist/{context-CAFddgb9.js → context-rioF4fQl.js} +1 -1
- package/dist/convex/index.d.ts +4 -4
- package/dist/convex/index.js +2 -2
- package/dist/{core-bf8qgaZf.d.ts → core-DCMIztx1.d.ts} +2 -2
- package/dist/{core-C5yCD-Ls.js → core-DIUrkFNL.js} +5 -5
- package/dist/{create-COQVXK6C.js → create-BMRnaZel.js} +3 -3
- package/dist/{create-nOWD3Joc.js → create-BRY0OtFV.js} +3 -3
- package/dist/{create-Cn5EpEez.d.ts → create-BYL8xCJB.d.ts} +4 -4
- package/dist/{create-B7Xa4jSQ.d.ts → create-T_NqxU31.d.ts} +7 -7
- package/dist/{create-DHA0fhmi.d.ts → create-iCwrnaFE.d.ts} +6 -6
- package/dist/{credentials-COT-cjnP.d.ts → credentials-DzNrCNZY.d.ts} +2 -2
- package/dist/{custom-role-rebuild-BK73tPib.js → custom-role-rebuild-wzN8pqDk.js} +5 -5
- package/dist/{define-permdock-DBgwTFi1.d.ts → define-permdock-Bhye7WSY.d.ts} +6 -6
- package/dist/{define-permdock-D7aKxIax.js → define-permdock-CO7YNrOF.js} +2 -2
- package/dist/{definition-options-9o8Hdww3.js → definition-options-DLBlRrPO.js} +8 -9
- package/dist/delivery/index.d.ts +4 -4
- package/dist/delivery/index.js +1 -1
- package/dist/{denied-text-C_AWc0f0.d.ts → denied-text-DgNqDAPH.d.ts} +1 -1
- package/dist/{describe-AdETpWsn.d.ts → describe-DEoWvk00.d.ts} +1 -1
- package/dist/{diff-CW9eZy9X.js → diff-CS8ks9h3.js} +1 -1
- package/dist/{diff-COdwpP31.js → diff-CkSZF7LO.js} +2 -2
- package/dist/{doctor-ervtBRzG.js → doctor-GnMgqGO8.js} +102 -42
- package/dist/{doctor-ELj5hrVv.js → doctor-sAqU02Fx.js} +2 -2
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/elysia/index.d.ts +4 -4
- package/dist/elysia/index.js +1 -1
- package/dist/{errors-COoiWqIs.d.ts → errors-BliKrfmP.d.ts} +1 -1
- package/dist/{evaluate-Dmd0bShm.js → evaluate-DNz6wMYv.js} +1 -1
- package/dist/{evaluations-GW9j_ARq.d.ts → evaluations-CUkSKioS.d.ts} +3 -3
- package/dist/{evaluator-eager-CpVYslzY.js → evaluator-eager-BLNVbEAC.js} +1 -1
- package/dist/evaluator-zpeC7zel.js +2 -0
- package/dist/eve/index.d.ts +4 -4
- package/dist/eve/index.js +2 -2
- package/dist/{execute-ix7AAdWg.js → execute-xF5fwAel.js} +4 -4
- package/dist/{explain-DRC9V5Qb.js → explain-D4ipf8IH.js} +1 -1
- package/dist/{explain-jg0KLCVt.js → explain-DISCeeYS.js} +2 -2
- package/dist/express/index.d.ts +4 -4
- package/dist/express/index.js +1 -1
- package/dist/fastify/index.d.ts +4 -4
- package/dist/fastify/index.js +1 -1
- package/dist/{fetch-adapter-CU1DIkXu.js → fetch-adapter-BXQc4NoV.js} +1 -1
- package/dist/{fetch-adapter-CJncmsPg.d.ts → fetch-adapter-Ds2-fUUi.d.ts} +2 -2
- package/dist/{fields-y_PSRCyJ.js → fields-CwFej4gp.js} +3 -3
- package/dist/{from-snapshot-DGc9W4QU.js → from-snapshot-DZ4D2sLa.js} +14 -9
- package/dist/gen-BPYFr_tZ.js +1 -0
- package/dist/{gen-8rW_AUG5.js → gen-djPw1RS-.js} +3 -3
- package/dist/{gen-kind-C9ikF8nb.js → gen-kind-Vhq_ZIZm.js} +1 -1
- package/dist/{generate-CW7gNfLr.js → generate-BcH-uL0z.js} +18 -17
- package/dist/{generate-BmpCt5oi.js → generate-CYHeuPq8.js} +3 -3
- package/dist/{generate-options-DiR4r_sk.js → generate-options-DDSeUTFU.js} +15 -14
- package/dist/h3/index.d.ts +4 -4
- package/dist/h3/index.js +2 -2
- package/dist/{helper-calls-DHvgN9tr.js → helper-calls-B5MOl99d.js} +1 -1
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +1 -1
- package/dist/{hook-sql-D-abRHut.js → hook-sql-EksAnz-T.js} +269 -225
- package/dist/{hosted-DZwCFrcy.js → hosted-D3USbpS6.js} +1 -1
- package/dist/{hosted-Bkw3Oyh-.d.ts → hosted-DZgmEG4b.d.ts} +1 -1
- package/dist/identity-scopes-CRVAV0HU.js +11 -0
- package/dist/{import-D_8tLF9g.js → import-Bz6IKoMM.js} +3 -3
- package/dist/{import-BAhoTYTk.js → import-C45gc74U.js} +1 -1
- package/dist/{index-DPVeDtAO.d.ts → index-BOJPdIBk.d.ts} +4 -4
- package/dist/{index-xShPsK8G.d.ts → index-CAE_Z53Y.d.ts} +1 -1
- package/dist/{index-Kj5S3IWE.d.ts → index-CWBCzwOp.d.ts} +4 -4
- package/dist/{index-DT3hOxA7.d.ts → index-Cjr8Q-uq.d.ts} +34 -11
- package/dist/{index-WOx7TBbj.d.ts → index-DBBRSw6r.d.ts} +2 -2
- package/dist/{index-DWmIuQLz.d.ts → index-ktQ7E4qB.d.ts} +4 -4
- package/dist/index.d.ts +16 -16
- package/dist/index.js +13 -13
- package/dist/{init-zxb0BVDJ.js → init-B6aZxzd7.js} +1 -1
- package/dist/{init-DkRHIe8-.js → init-CCBVeyW8.js} +3 -3
- package/dist/inspect-functions-BUACOlgS.js +34 -0
- package/dist/{instance-options-DQCiBBuz.d.ts → instance-options-DDERlopm.d.ts} +1 -1
- package/dist/{instance-snapshot-D9kjL37B.js → instance-snapshot-D03srwnf.js} +9 -8
- package/dist/{interactive-only-Dqww0ABO.js → interactive-only-Bbq9e61G.js} +10 -182
- package/dist/jwt/index.d.ts +4 -4
- package/dist/{kernel-C5akxw5n.js → kernel-DSnWVZ0O.js} +5 -5
- package/dist/{keys-DQsHrgBM.js → keys-BWhAnANj.js} +1 -1
- package/dist/kysely/index.d.ts +3 -3
- package/dist/{lazy-provider-CMgFAGf8.d.ts → lazy-provider-Clt2095H.d.ts} +1 -1
- package/dist/{lazy-provider-DNVjY4n3.js → lazy-provider-b8UHGi8P.js} +2 -2
- package/dist/{login-C1p3gmj8.js → login-BnE2iUUA.js} +1 -1
- package/dist/{login-DOEZveP6.js → login-d631Tpa9.js} +3 -3
- package/dist/{manager-chain-DdkiCw5q.js → manager-chain-CFkceFls.js} +2 -2
- package/dist/{manifest-31igzVGQ.js → manifest-1w67doim.js} +45 -38
- package/dist/{manifest-DgsxeAsM.d.ts → manifest-BwhZ1s5b.d.ts} +35 -3
- package/dist/{manifest-B487A3po.js → manifest-CIWOmdlP.js} +1 -1
- package/dist/{manifest-schema-D7RQbnGY.js → manifest-schema-N3v2RVL-.js} +24 -0
- package/dist/{may-use-4HzzgYJ3.js → may-use-ikNCnNgZ.js} +1 -1
- package/dist/mcp/index.d.ts +8 -8
- package/dist/mcp/index.js +2 -2
- package/dist/measure-BKsYdwKd.js +272 -0
- package/dist/membership-claim-sql-DGfhIn__.js +33 -0
- package/dist/{membership-filter-C7ZuhAqJ.js → membership-filter-Bz9QX6E9.js} +1 -1
- package/dist/memberships-4e6qi8Uv.js +1 -0
- package/dist/memberships-CNoAlsma.js +180 -0
- package/dist/{migrate-pg-lkbDu.js → migrate-BXk_rUmb.js} +2 -2
- package/dist/{model-BXhr8gUI.js → model-BYCtXS_g.js} +3 -3
- package/dist/{module-values-B09BBJIj.js → module-values-D-AiNhBp.js} +1 -1
- package/dist/names-DBxKx2bz.js +182 -0
- package/dist/nest/index.d.ts +4 -4
- package/dist/nest/index.js +1 -1
- package/dist/next/index.d.ts +11 -11
- package/dist/next/index.js +3 -3
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +1 -1
- package/dist/node/index.d.ts +4 -4
- package/dist/node/index.js +1 -1
- 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-BeMVHVY4.js → openapi-BnKSxOrh.js} +2 -2
- package/dist/{openapi-DEGesHWH.js → openapi-CN2Oq9zN.js} +1 -1
- package/dist/{openapi-document-CEQ6jqqR.js → openapi-document-XnGRbWBb.js} +1 -1
- package/dist/orpc/index.d.ts +5 -5
- package/dist/orpc/index.js +2 -2
- package/dist/otel/index.d.ts +3 -3
- package/dist/{output-C7EPeSZj.js → output-dO4bArCS.js} +1 -1
- package/dist/{ownership-Csk9C3Js.js → ownership-CSdLGGfW.js} +7 -6
- package/dist/{parse-local-manifest-B92rFWnk.d.ts → parse-local-manifest-DoLQFkRb.d.ts} +1 -1
- package/dist/pdp/index.d.ts +3 -3
- package/dist/pdp/index.js +1 -1
- package/dist/{permdock-BShHM8OJ.d.ts → permdock-DkvkGVF0.d.ts} +2 -2
- package/dist/{permdock-CJPIwU1T.js → permdock-JM9TKevZ.js} +14 -14
- package/dist/{permissions-wEkTVr_I.js → permissions-xPyAmuXi.js} +1 -1
- package/dist/{pipeline-Bbu7uw28.js → pipeline-BAGSNnct.js} +2 -2
- package/dist/{plugin-L3G7jPGE.d.ts → plugin-DDPXES4k.d.ts} +2 -2
- package/dist/{policy-BUtwixSN.d.ts → policy-BoUbJ2c0.d.ts} +1 -1
- package/dist/{policy-CSOOQ3rR.js → policy-CTn-9VQm.js} +1 -1
- package/dist/{policy-BBvhhH9X.js → policy-CZBJDcTx.js} +2 -1
- package/dist/{policy-bundle-KYI0EnrM.js → policy-bundle-BHd1dqU9.js} +3 -3
- package/dist/{policy-from-catalog-_zwn1sNj.js → policy-from-catalog-BohzTN3J.js} +3 -3
- package/dist/{policy-types-CfW4X_yX.d.ts → policy-types-DuM3k5Ao.d.ts} +51 -2
- package/dist/{postgrest-PQ3zAOD2.d.ts → postgrest-B1bTbVE4.d.ts} +9 -2
- package/dist/{powersync-C1ix7CEY.js → powersync-CZkZgVyi.js} +1 -1
- package/dist/{powersync-CM6Vg4RH.js → powersync-DJ7dY-Vf.js} +12 -12
- package/dist/{powersync-CGvu6j5U.js → powersync-Jj57J-X8.js} +1 -1
- package/dist/prisma/index.d.ts +2 -2
- package/dist/{protected-action-BPN0NaRb.js → protected-action-DDYvU-9Z.js} +1 -1
- package/dist/{protected-action-DhCQ4bSe.d.ts → protected-action-gBxeetqY.d.ts} +5 -5
- package/dist/{provider-BV_v0JAY.js → provider-BwqzED5h.js} +83 -50
- package/dist/{provider-CMgFAGf8.d.ts → provider-Clt2095H.d.ts} +1 -1
- package/dist/{provider-1xqxLVEz.js → provider-NQwLSlgb.js} +2 -2
- package/dist/{provider-store-Cf8HRNtb.js → provider-store-BizF6jyu.js} +2 -2
- package/dist/{provider-with-cpL9vRjC.js → provider-with-DtBgCCV_.js} +1 -1
- package/dist/{prune-config-CdoPJIGz.js → prune-config-Bwz4wNQA.js} +6 -6
- package/dist/pull-BOC-0kJV.js +1 -0
- package/dist/{pull-BaB401Bk.js → pull-Cj_ngsuu.js} +2 -2
- package/dist/{push-DcjvEj0m.js → push-D5so0ptb.js} +2 -2
- package/dist/{pushed-policy-DcvO8NXy.d.ts → pushed-policy-C65TbLtU.d.ts} +1 -1
- package/dist/{pushed-policy-DSjSWEAl.js → pushed-policy-dm_hFstN.js} +1 -1
- package/dist/{quote-BKrTBbcH.js → quote-LNaBdCGA.js} +1 -1
- package/dist/{rbac-mblGDx-Z.js → rbac-DbyaaNLa.js} +5 -4
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +3 -3
- package/dist/react/lazy.d.ts +6 -6
- package/dist/react/lazy.js +3 -3
- package/dist/react/provider-client-lazy.d.ts +1 -1
- package/dist/react/provider-client-lazy.js +1 -1
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react/provider-client.js +1 -1
- package/dist/react-native/index.d.ts +15 -15
- package/dist/react-native/index.js +6 -6
- package/dist/read-memberships-DVBitJZG.js +164 -0
- package/dist/{rename-BZNOV8H9.js → rename-CI6NIF9t.js} +5 -5
- package/dist/replay-B__gzUx3.d.ts +3 -0
- package/dist/{report-DCAiUc5U.js → report-DF0zUNut.js} +1 -1
- package/dist/{report-DievqWhf.js → report-XdCm1y_J.js} +1 -1
- package/dist/{request-context-BNVY3kZ1.js → request-context-CqqdiVp4.js} +1 -1
- package/dist/resend/index.d.ts +4 -4
- package/dist/{resolve-config-9NYYVc30.js → resolve-config-Cu_mE2wt.js} +1 -1
- package/dist/{resolve-names-Cth1UQ-8.js → resolve-names-CuEhEQyB.js} +7 -6
- package/dist/{resolver-CuIY8aFD.js → resolver-D2c1CcoZ.js} +99 -15
- package/dist/{rls-DUYok5e9.js → rls-BDtyip5c.js} +13 -13
- package/dist/{rls-BtkZgaZp.js → rls-DcqSn7b2.js} +51 -4
- package/dist/{rls-files-ucAI0J5j.js → rls-files-CRRtjXxG.js} +1 -1
- package/dist/{rls-options-BFGRmdcH.d.ts → rls-options-DCLdZaTZ.d.ts} +1 -1
- package/dist/{rpc-D7G7IJDa.js → rpc-BQPa7tLP.js} +1 -1
- package/dist/{rpc-COnquydd.d.ts → rpc-BYFB37KV.d.ts} +1 -1
- package/dist/run-DOP1UKWw.js +1 -0
- package/dist/{run-WIqPbnjD.js → run-DvbrPkgt.js} +3 -3
- package/dist/{run-ticket-Mmor5sYW.d.ts → run-ticket-CRldclc7.d.ts} +2 -2
- package/dist/{saas-DcqUkynn.js → saas-DSeazNrN.js} +3 -3
- package/dist/{scan-Badcllgg.js → scan-CmfWbAbz.js} +1 -1
- package/dist/{schema-DBRKgQb4.js → schema-CO3btX_O.js} +1 -1
- package/dist/scim/index.d.ts +1 -1
- package/dist/seeds/index.d.ts +1 -1
- package/dist/{seeds-Cih1ztkf.d.ts → seeds-BZMPfWcC.d.ts} +1 -1
- package/dist/server/index.d.ts +11 -11
- package/dist/server/index.js +1 -1
- package/dist/{server-types-C2XX60aF.d.ts → server-types-FkdDSB9h.d.ts} +8 -8
- package/dist/share-key-claims-CZGAeVqa.js +28 -0
- package/dist/{shared-C6_T7QUo.js → shared-DnVY767H.js} +2 -1
- package/dist/{sink-BQ_6K81r.d.ts → sink-CoMI_OVw.d.ts} +2 -2
- package/dist/{size-l1pDHE2z.js → size-CY6rK6l9.js} +3 -3
- package/dist/{skills-CTKq3o8D.js → skills-C28GUaJC.js} +1 -1
- package/dist/{skills-Ba9hHGO6.js → skills-CA8GfQxQ.js} +1 -1
- package/dist/{snapshot-Ty0uk9wZ.js → snapshot-Dzi4LR6n.js} +8 -1
- package/dist/{snapshot-cache-DGvLQW0-.d.ts → snapshot-cache-R1lJjYmI.d.ts} +1 -1
- package/dist/{snapshot-compact-yXFxZLPo.js → snapshot-compact-BWMLnIXK.js} +35 -4
- package/dist/{snapshot-evaluate-DSNj2rhV.js → snapshot-evaluate-C382Z1mQ.js} +1 -1
- package/dist/{snapshot-reads-BnAHiuoa.js → snapshot-reads-JxcUSUfW.js} +2 -2
- package/dist/{snapshot-size-DNY1MTsV.js → snapshot-size-D6ixbYvH.js} +1 -1
- package/dist/{snapshot-size-2fkXbCkP.js → snapshot-size-NklqBKcV.js} +1 -1
- package/dist/solid/index.d.ts +5 -5
- package/dist/solid/index.js +2 -2
- package/dist/solid-start/index.d.ts +4 -4
- package/dist/solid-start/index.js +2 -2
- package/dist/{sources-DnjJPGfb.js → sources-C6Id63F8.js} +2 -1
- package/dist/{sources-CjgZns7t.d.ts → sources-Dp6FQ8np.d.ts} +7 -2
- package/dist/{src-HRYn4UFj.js → src-BXDohWNO.js} +154 -11
- package/dist/ssf/index.d.ts +3 -3
- package/dist/{standard-webhooks-Bnnrqa6d.d.ts → standard-webhooks-D2FwHtMX.d.ts} +2 -2
- package/dist/{store-core-BdFcruPm.d.ts → store-core-aluQ3R1M.d.ts} +4 -4
- package/dist/{store-options-DpCQo0vB.js → store-options-DgOuhUSn.js} +4 -4
- package/dist/{stores-D6MIjN_-.d.ts → stores-hHICuiQl.d.ts} +5 -5
- package/dist/{stores-KpBCaY6c.js → stores-jgDndNHa.js} +1 -1
- package/dist/{subject-CrldGifz.js → subject-B7p94Y0s.js} +1 -1
- package/dist/{subject-cache-CnJcz2K_.d.ts → subject-cache-Bn4oJY_R.d.ts} +3 -1
- package/dist/supabase/index.d.ts +36 -9
- package/dist/supabase/index.js +8 -7
- package/dist/supabase/middleware.d.ts +5 -5
- package/dist/supabase/middleware.js +4 -4
- package/dist/{supabase-kWQlkrHw.js → supabase-ByhSqBDB.js} +14 -7
- package/dist/{supabase-CGiB83XQ.js → supabase-DXEcFJGM.js} +15 -1
- package/dist/supabase-hook-C_ViYz3g.js +2 -0
- package/dist/{supabase-hook-CqO_0Koh.js → supabase-hook-D-ybV98H.js} +7 -7
- package/dist/{supabase-schemas-BglbAG2Z.js → supabase-schemas-CVhpyYB6.js} +2 -2
- package/dist/svelte/index.d.ts +5 -5
- package/dist/svelte/index.js +5 -3
- package/dist/svelte/runtime.d.ts +3 -3
- package/dist/svelte/runtime.js +1 -1
- package/dist/svelte/source.d.ts +5 -5
- package/dist/svelte/source.js +2 -2
- package/dist/sveltekit/index.d.ts +4 -4
- package/dist/sveltekit/index.js +1 -1
- package/dist/{table-reads-BviGc0L_.js → table-reads-BcceuV7h.js} +1 -1
- package/dist/{table-reads-AnHPrBp8.js → table-reads-BoF_58yh.js} +297 -48
- package/dist/{tables-CDq0HVVq.js → tables-BTXmioCH.js} +187 -20
- package/dist/tanstack-start/index.d.ts +4 -4
- package/dist/tanstack-start/index.js +1 -1
- package/dist/{tenant-check-D7g9oNVH.js → tenant-check-DNbm8OiV.js} +4 -4
- package/dist/terminal/index.d.ts +5 -5
- package/dist/terminal/index.js +3 -3
- package/dist/testing/core.d.ts +1 -1
- package/dist/testing/core.js +1 -1
- package/dist/testing/fixtures/index.d.ts +4 -4
- package/dist/testing/fixtures/index.js +29 -11
- package/dist/testing/index.d.ts +23 -23
- package/dist/testing/index.js +13 -13
- 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/trpc/index.d.ts +5 -5
- package/dist/trpc/index.js +2 -2
- package/dist/{type-helpers-CUmJFGV6.d.ts → type-helpers-CsWH9z8p.d.ts} +1 -1
- package/dist/{types-vKKndyxx.d.ts → types-BGN3coSe.d.ts} +1 -1
- package/dist/{types-h9W3CNC_.d.ts → types-BwjOhlgx.d.ts} +4 -4
- package/dist/{types-BKnUwgvx.d.ts → types-BzsplNgO.d.ts} +4 -4
- package/dist/{types-BsRf5rKk.d.ts → types-CBUYbPwl.d.ts} +2 -2
- package/dist/{types-euUv1wsO.d.ts → types-CKwI6AT4.d.ts} +1 -1
- package/dist/{types-CIzXPPV-.d.ts → types-Cvfe-G_N.d.ts} +2 -2
- package/dist/{types-BhBfMdQ5.d.ts → types-D3GI2B9O.d.ts} +3 -3
- package/dist/{types-BRECeQ2n.d.ts → types-D417woMp.d.ts} +3 -3
- package/dist/{types-DwoRXDvN.d.ts → types-DRMoZjJm.d.ts} +2 -2
- package/dist/{types-config-DNIw_Gt5.d.ts → types-config-DYRoZ8Iw.d.ts} +11 -5
- package/dist/{types-CjZscT16.d.ts → types-dtDg4goh.d.ts} +4 -4
- package/dist/{types-run-Bwn1MuW0.d.ts → types-run-CeCrWO0v.d.ts} +1 -1
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +1 -1
- package/dist/{usage-CW6xhRcV.js → usage-BGuSrwiW.js} +2 -2
- package/dist/usage-CW6PfRfC.js +1 -0
- package/dist/{usage-n4V2k_a6.js → usage-D5QwWiNp.js} +1 -1
- package/dist/{validation-error-P4Z9HUuP.d.ts → validation-error-MZ7KLNHt.d.ts} +1 -1
- package/dist/{verify-CKzngsUH.js → verify-GWeopgxU.js} +12 -12
- package/dist/{version-cache-BzK8dwJy.js → version-cache-Ccrfu2A4.js} +6 -1
- package/dist/vue/index.d.ts +5 -5
- package/dist/vue/index.js +2 -2
- package/dist/{waiter-BqUxSRxq.d.ts → waiter-DdwtUSzB.d.ts} +2 -2
- package/dist/{warm-5yxlUmBh.js → warm-BZ0ZwSmO.js} +1 -1
- package/dist/{warm-BR-mrnY-.d.ts → warm-znYuJoUZ.d.ts} +1 -1
- package/dist/{watch-D-5ztqN8.js → watch-14vng0pg.js} +1 -1
- package/dist/watch-Be7ja4dL.js +1 -0
- package/dist/{watch-C12Ub7x4.js → watch-DuIAsqFR.js} +2 -2
- package/dist/webmcp/index.d.ts +1 -1
- package/dist/webmcp/index.js +1 -1
- package/dist/{who-can-CGVpM3fZ.js → who-can-CIgYpEvy.js} +1 -1
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.js +1 -1
- package/dist/workflow-sdk/index.d.ts +4 -4
- package/dist/{wrap-D8WtzrB7.d.ts → wrap-C36-eV-C.d.ts} +2 -2
- package/package.json +11 -11
- package/schemas/snapshot-v2.json +20 -0
- package/schemas/supabase-claims-v1.json +48 -2
- package/schemas/supabase-manifest-v1.json +28 -0
- package/skills/permdock-data/references/queries-and-rls.md +1 -1
- package/dist/bundle-size-DwZ4e1gu.js +0 -1
- package/dist/claims-size-B6j0Ff4Q.js +0 -1
- package/dist/evaluator-COmATWCr.js +0 -2
- package/dist/gen-BtiGMiuH.js +0 -1
- package/dist/pull-Bp63vtgu.js +0 -1
- package/dist/read-memberships-BkePIa1F.js +0 -63
- package/dist/replay-BCOZifwx.d.ts +0 -3
- package/dist/run-BjMxYYTe.js +0 -1
- package/dist/supabase-hook-CluYxKee.js +0 -2
- package/dist/usage-Ci7Glu-H.js +0 -1
- package/dist/watch-J1PfGMfb.js +0 -1
|
@@ -5,15 +5,18 @@ import { c as rootScope, d as scopeList } from "./scopes-B-KX9EI8.js";
|
|
|
5
5
|
import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
|
|
6
6
|
import { r as relationCondition, t as inheritCondition } from "./grantee-conditions-Dob6QQAc.js";
|
|
7
7
|
import { l as partitionsOf, p as scopeField } from "./tenancy-B5Xxt9Sc.js";
|
|
8
|
-
import { a as delegatedScopeMap } from "./permdock-
|
|
8
|
+
import { a as delegatedScopeMap } from "./permdock-JM9TKevZ.js";
|
|
9
9
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
10
10
|
import { d as sqlTextArray, i as qualifySqlTable, t as SQL_IDENT } from "./sql-T4GaBh9X.js";
|
|
11
11
|
import { d as restrictedRowsSql, i as scopeColumn, l as relationArmSql } from "./compile-BUKXrueE.js";
|
|
12
|
-
import { t as AUTHZ_VERSION_TABLE } from "./sources-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
12
|
+
import { t as AUTHZ_VERSION_TABLE } from "./sources-C6Id63F8.js";
|
|
13
|
+
import { t as compactMembershipsSql } from "./membership-claim-sql-DGfhIn__.js";
|
|
14
|
+
import { t as IDENTITY_SCOPES } from "./identity-scopes-CRVAV0HU.js";
|
|
15
|
+
import { a as quoteIdent, c as quoteTable, i as qualified, o as quoteLiteral, r as helperSchema, s as quoteQualified } from "./quote-LNaBdCGA.js";
|
|
16
|
+
import { C as tenantTypeOf, a as kindFilterSql, b as idTypeOf, c as roleKindSql, d as subjectClaimSql, f as subjectIdSql, i as keyTenantSql, m as userIdHelperSql, s as memberVia, u as subjectClaimJsonSql, x as scopeTypeOf } from "./subject-B7p94Y0s.js";
|
|
17
|
+
import { i as allowEntry, n as GLOBAL_ROLES, o as rootName, r as HELPERS, s as signedIn, t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
|
|
18
|
+
import { B as rolesTableScope, C as sourceRows, E as sqlBody, F as customRolesSql, G as activeRowSql, H as trustedReaderGrants, I as hasCustomRoleChecksFor, J as grantPermissionSql, K as activeUserSql, L as perScope, M as userActive, N as globalRoleSource, O as instancesActive, P as currentKeyExpr, R as raiseSql, S as sourceIdOf, T as sourcesKeep, U as activeInstancesSql, V as storedTenant, W as activeMembershipSql, _ as memoWriteSql, b as scopedBody, c as memoUserSql, d as disabledColumn, f as functionBody, g as memoHitList, h as memberColumn, i as interactiveAllowsSql, k as keyTenantLine, l as claimKeptLines, n as delegatedGlobalSql, o as interactiveSessionSql, p as hasBody, r as interactiveAllowsCall, s as memoGlobalUserSql, u as claimTenant, v as memoizedSetofSql, w as sourcesBodyOf, x as sourceFilters, y as memoizes, z as roleReadersSql } from "./interactive-only-Bbq9e61G.js";
|
|
19
|
+
import { S as scopeTable, _ as memberRoleOf, a as graphSqlText, b as restrictedHelper, d as linkHelper, f as memberForHelper, g as memberOfHelper, h as memberIdsHelper, i as graphSqlName, n as CLOSURE, o as hasMemberFor, p as memberForSources, r as graphHelper, s as hasMemberOf, u as isTeamScope, v as permittedForHelper, x as scopeSources, y as permittedIdsHelper } from "./names-DBxKx2bz.js";
|
|
17
20
|
import { n as byKey, t as byCodeUnit } from "./compare-8SNJN-9U.js";
|
|
18
21
|
import { createHash } from "node:crypto";
|
|
19
22
|
// src/cli/rls/graph.ts
|
|
@@ -1273,6 +1276,54 @@ drop trigger if exists "permdock_custom_role_name_guard" on ${target};
|
|
|
1273
1276
|
create trigger "permdock_custom_role_name_guard"
|
|
1274
1277
|
before insert or update on ${target}
|
|
1275
1278
|
for each row execute function ${fn}();
|
|
1279
|
+
${systemGuardSql(ctx, target, key)}`;
|
|
1280
|
+
}
|
|
1281
|
+
/** Postgres roles a client request runs as; any other role is trusted SQL. */
|
|
1282
|
+
const CLIENT_ROLES = [
|
|
1283
|
+
"anon",
|
|
1284
|
+
"anonymous",
|
|
1285
|
+
"authenticated"
|
|
1286
|
+
];
|
|
1287
|
+
/**
|
|
1288
|
+
* The name guard lets a row the `skip` column marks through, so only trusted
|
|
1289
|
+
* SQL may mark one: a security invoker trigger refuses a client role that sets
|
|
1290
|
+
* the column, or renames or moves a row that has it. A row created by trusted
|
|
1291
|
+
* SQL, such as an organization's seeded system roles, keeps it.
|
|
1292
|
+
*/
|
|
1293
|
+
function systemGuardSql(ctx, target, key) {
|
|
1294
|
+
const table = ctx.customRoles?.table;
|
|
1295
|
+
if (table?.skip === void 0 || table.tenant === void 0) return "";
|
|
1296
|
+
const fn = qualified(ctx, CUSTOM_ROLES.systemGuard);
|
|
1297
|
+
const skip = quoteIdent(table.skip);
|
|
1298
|
+
const tenant = quoteIdent(table.tenant);
|
|
1299
|
+
return `
|
|
1300
|
+
-- the application's roles table: only trusted SQL marks a role as a system role, or renames or moves one
|
|
1301
|
+
create or replace function ${fn}()
|
|
1302
|
+
returns trigger
|
|
1303
|
+
language plpgsql
|
|
1304
|
+
volatile
|
|
1305
|
+
security invoker
|
|
1306
|
+
set search_path = ''
|
|
1307
|
+
as $$
|
|
1308
|
+
begin
|
|
1309
|
+
if not ${`current_user::text = any(array[${CLIENT_ROLES.map(quoteLiteral).join(", ")}])`} then
|
|
1310
|
+
return new;
|
|
1311
|
+
end if;
|
|
1312
|
+
if (tg_op = 'INSERT' and coalesce(new.${skip}, false))
|
|
1313
|
+
or (tg_op = 'UPDATE' and (
|
|
1314
|
+
coalesce(new.${skip}, false) is distinct from coalesce(old.${skip}, false)
|
|
1315
|
+
or (coalesce(old.${skip}, false) and (${key} is distinct from old.${quoteIdent(table.key)}::text or new.${tenant} is distinct from old.${tenant}))
|
|
1316
|
+
)) then
|
|
1317
|
+
${raiseSql(" ", "42501", "'permdock: only trusted SQL writes a system role'", "system-role")}
|
|
1318
|
+
end if;
|
|
1319
|
+
return new;
|
|
1320
|
+
end;
|
|
1321
|
+
$$;
|
|
1322
|
+
revoke execute on function ${fn}() from public, anon, authenticated;
|
|
1323
|
+
drop trigger if exists "permdock_custom_role_system_guard" on ${target};
|
|
1324
|
+
create trigger "permdock_custom_role_system_guard"
|
|
1325
|
+
before insert or update on ${target}
|
|
1326
|
+
for each row execute function ${fn}();
|
|
1276
1327
|
`;
|
|
1277
1328
|
}
|
|
1278
1329
|
// src/cli/rls/custom-role-writes.ts
|
|
@@ -1721,7 +1772,7 @@ function memberBody(ctx, scope, type, roles) {
|
|
|
1721
1772
|
if (ctx.authorize !== "database") return sqlBody(` select distinct (m ->> 'id')::${type}
|
|
1722
1773
|
from (select ${membershipClaim(ctx)} as v) pdk_c
|
|
1723
1774
|
cross join lateral jsonb_array_elements(
|
|
1724
|
-
case jsonb_typeof(pdk_c.v) when 'array' then pdk_c.v else '[]'::jsonb end
|
|
1775
|
+
case jsonb_typeof(pdk_c.v) when 'array' then pdk_c.v when 'object' then ${compactMembershipsSql("pdk_c.v")} else '[]'::jsonb end
|
|
1725
1776
|
) m
|
|
1726
1777
|
where ${signedIn(ctx)}
|
|
1727
1778
|
and m ->> 'scope' = ${quoteLiteral(scope)}
|
|
@@ -2054,6 +2105,21 @@ function scopeHasHelper(scope) {
|
|
|
2054
2105
|
return permittedIdsHelper(scope).replace(/^permitted_/u, "permdock_").replace(/_ids$/u, "_has");
|
|
2055
2106
|
}
|
|
2056
2107
|
/**
|
|
2108
|
+
* `permdock_<root>_has_active(p_grant)`: the same test as
|
|
2109
|
+
* `permdock_<root>_has`, with the tenant read from the token. The answer
|
|
2110
|
+
* depends only on the caller's grants of that key in the active tenant.
|
|
2111
|
+
*/
|
|
2112
|
+
function scopeHasActiveHelper(scope) {
|
|
2113
|
+
return `${scopeHasHelper(scope)}_active`;
|
|
2114
|
+
}
|
|
2115
|
+
/**
|
|
2116
|
+
* The active tenant, or null when the claim is absent. An empty string is not
|
|
2117
|
+
* cast: `''::uuid` throws, and no tenant must answer false.
|
|
2118
|
+
*/
|
|
2119
|
+
function activeTenantSql(ctx, type) {
|
|
2120
|
+
return `nullif(${subjectClaimSql(ctx, ctx.tenantClaim)}, '')::${type}`;
|
|
2121
|
+
}
|
|
2122
|
+
/**
|
|
2057
2123
|
* `permitted_<scope>_id_array(p_grant)` for one scope: a policy writes
|
|
2058
2124
|
* `<column> = any(<array>)`, which an index on the column serves. The root
|
|
2059
2125
|
* scope also gets `permdock_<scope>_has(p_grant, p_tenant)`, one membership
|
|
@@ -2090,25 +2156,79 @@ as $$
|
|
|
2090
2156
|
select p_tenant = any(${array}(p_grant))
|
|
2091
2157
|
$$;
|
|
2092
2158
|
${grants(fn, `text, ${type}`)}`);
|
|
2159
|
+
const active = qualified(ctx, scopeHasActiveHelper(scope));
|
|
2160
|
+
chunks.push(`-- the same test for the tenant the token names; a shared function calls it with a literal key
|
|
2161
|
+
create or replace function ${active}(p_grant text)
|
|
2162
|
+
returns boolean
|
|
2163
|
+
language sql
|
|
2164
|
+
stable
|
|
2165
|
+
security invoker
|
|
2166
|
+
cost 1000${parallel}
|
|
2167
|
+
set search_path = ''
|
|
2168
|
+
as $$
|
|
2169
|
+
select ${fn}(p_grant, ${activeTenantSql(ctx, type)})
|
|
2170
|
+
$$;
|
|
2171
|
+
${grants(active, "text")}`);
|
|
2093
2172
|
}
|
|
2094
2173
|
return chunks.join("\n");
|
|
2095
2174
|
}
|
|
2096
2175
|
// src/cli/rls/token-scopes.ts
|
|
2097
2176
|
const TOKEN_SCOPE_ALLOWS = "permdock_token_scope_allows";
|
|
2098
2177
|
const TOKEN_SCOPE_MAP = "permdock_token_scope_map";
|
|
2178
|
+
const TOKEN_DELEGATION_MAP = "permdock_token_delegation_map";
|
|
2179
|
+
function isTokenScopesSetting(value) {
|
|
2180
|
+
if (value === void 0 || typeof value === "boolean") return true;
|
|
2181
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
2182
|
+
return Object.entries(value).every(([key, flag]) => key === "delegations" && (flag === void 0 || typeof flag === "boolean"));
|
|
2183
|
+
}
|
|
2184
|
+
/** Whether `rls.tokenScopes` turns the helpers' token narrowing on. */
|
|
2185
|
+
function tokenScopesOn(setting) {
|
|
2186
|
+
return setting === true || typeof setting === "object" && setting !== null;
|
|
2187
|
+
}
|
|
2188
|
+
/**
|
|
2189
|
+
* Delegations Postgres can decide from the token alone: to `oauth-client`, from
|
|
2190
|
+
* `authenticated()` only, without a validity window. Others hand over nothing
|
|
2191
|
+
* in SQL, so the token stays capped by its scopes.
|
|
2192
|
+
*/
|
|
2193
|
+
function delegatedKeys(delegations) {
|
|
2194
|
+
const all = /* @__PURE__ */ new Set();
|
|
2195
|
+
const clients = /* @__PURE__ */ new Map();
|
|
2196
|
+
let everyClient = false;
|
|
2197
|
+
for (const delegation of delegations ?? []) {
|
|
2198
|
+
const from = Array.isArray(delegation.from) ? delegation.from : [delegation.from];
|
|
2199
|
+
if (delegation.to.kind !== "oauth-client" || delegation.to.client !== void 0 || delegation.validity !== void 0 || from.length === 0 || !from.every((grantee) => grantee.kind === "authenticated")) continue;
|
|
2200
|
+
const id = delegation.to.id;
|
|
2201
|
+
let target = all;
|
|
2202
|
+
if (id === void 0) everyClient = true;
|
|
2203
|
+
else {
|
|
2204
|
+
target = clients.get(id) ?? /* @__PURE__ */ new Set();
|
|
2205
|
+
clients.set(id, target);
|
|
2206
|
+
}
|
|
2207
|
+
for (const key of delegation.permissions) target.add(key);
|
|
2208
|
+
}
|
|
2209
|
+
return {
|
|
2210
|
+
...everyClient ? { all: [...all].toSorted() } : {},
|
|
2211
|
+
clients: Object.fromEntries([...clients].map(([id, set]) => [id, [...set].toSorted()]))
|
|
2212
|
+
};
|
|
2213
|
+
}
|
|
2099
2214
|
/**
|
|
2100
2215
|
* `rls.tokenScopes` as the SQL generator needs it, or `undefined` when it is
|
|
2101
2216
|
* off.
|
|
2102
2217
|
*/
|
|
2103
2218
|
function tokenScopesPlan(setting, policy) {
|
|
2104
|
-
if (setting
|
|
2219
|
+
if (!tokenScopesOn(setting)) return;
|
|
2105
2220
|
const permissions = listPermissions(policy.permissions).map((leaf) => ({
|
|
2106
2221
|
key: leaf.key,
|
|
2107
2222
|
scope: leaf.scope,
|
|
2108
2223
|
renamedFrom: formerKeys(leaf),
|
|
2109
2224
|
meta: leaf.meta
|
|
2110
2225
|
}));
|
|
2111
|
-
|
|
2226
|
+
const scopes = delegatedScopeMap(permissions, policy.oauthScopes);
|
|
2227
|
+
if (typeof setting !== "object" || setting.delegations !== true) return { scopes };
|
|
2228
|
+
return {
|
|
2229
|
+
scopes,
|
|
2230
|
+
delegated: delegatedKeys(policy.delegations)
|
|
2231
|
+
};
|
|
2112
2232
|
}
|
|
2113
2233
|
function tokenScopeUnlimitedSql(ctx) {
|
|
2114
2234
|
const act = subjectClaimJsonSql(ctx, "act");
|
|
@@ -2146,6 +2266,43 @@ function tokenScopeAllowsSql(ctx, plan, anonExecute) {
|
|
|
2146
2266
|
const grants = anonExecute ? `revoke execute on function ${fn}(text) from public;
|
|
2147
2267
|
grant execute on function ${fn}(text) to anon, authenticated;` : `revoke execute on function ${fn}(text) from public, anon;
|
|
2148
2268
|
grant execute on function ${fn}(text) to authenticated;`;
|
|
2269
|
+
const delegationMap = qualified(ctx, TOKEN_DELEGATION_MAP);
|
|
2270
|
+
const client = subjectClaimSql(ctx, "client_id");
|
|
2271
|
+
const act = subjectClaimJsonSql(ctx, "act");
|
|
2272
|
+
const key = "split_part(split_part(p_grant, '#', 1), '@', 1)";
|
|
2273
|
+
const covered = `exists (
|
|
2274
|
+
select 1
|
|
2275
|
+
from ${tokenScopeRows(ctx)}
|
|
2276
|
+
where s.scope <> ''
|
|
2277
|
+
and coalesce(${map}() -> s.scope, '[]'::jsonb)
|
|
2278
|
+
? ${key}
|
|
2279
|
+
)`;
|
|
2280
|
+
const identity = [...IDENTITY_SCOPES].map(quoteLiteral).join(", ");
|
|
2281
|
+
const delegated = plan.delegated === void 0 ? "" : `
|
|
2282
|
+
when coalesce(${client}, '') <> ''
|
|
2283
|
+
and (${act} is null or ${act} = 'null'::jsonb)
|
|
2284
|
+
and (${delegationMap}() ? 'all'
|
|
2285
|
+
or ${delegationMap}() -> 'clients' ? ${client})
|
|
2286
|
+
then (coalesce(${delegationMap}() -> 'all', '[]'::jsonb)
|
|
2287
|
+
|| coalesce(${delegationMap}() -> 'clients' -> ${client}, '[]'::jsonb))
|
|
2288
|
+
? ${key}
|
|
2289
|
+
and (not exists (
|
|
2290
|
+
select 1
|
|
2291
|
+
from ${tokenScopeRows(ctx)}
|
|
2292
|
+
where s.scope <> '' and s.scope <> all (array[${identity}])
|
|
2293
|
+
)
|
|
2294
|
+
or ${covered})`;
|
|
2295
|
+
const delegationFunction = plan.delegated === void 0 ? "" : `
|
|
2296
|
+
create or replace function ${delegationMap}()
|
|
2297
|
+
returns jsonb
|
|
2298
|
+
language sql
|
|
2299
|
+
immutable
|
|
2300
|
+
set search_path = ''
|
|
2301
|
+
as $$
|
|
2302
|
+
select ${quoteLiteral(JSON.stringify(plan.delegated))}::jsonb
|
|
2303
|
+
$$;
|
|
2304
|
+
revoke execute on function ${delegationMap}() from public, anon, authenticated;
|
|
2305
|
+
`;
|
|
2149
2306
|
return `create or replace function ${map}()
|
|
2150
2307
|
returns jsonb
|
|
2151
2308
|
language sql
|
|
@@ -2155,7 +2312,7 @@ as $$
|
|
|
2155
2312
|
select ${quoteLiteral(JSON.stringify(plan.scopes))}::jsonb
|
|
2156
2313
|
$$;
|
|
2157
2314
|
revoke execute on function ${map}() from public, anon, authenticated;
|
|
2158
|
-
|
|
2315
|
+
${delegationFunction}
|
|
2159
2316
|
-- Token scopes: a delegated token holds only the permissions its scope claim maps to; denies always apply, and a token without client_id or an agent act is not limited
|
|
2160
2317
|
create or replace function ${fn}(p_grant text)
|
|
2161
2318
|
returns boolean
|
|
@@ -2171,14 +2328,8 @@ begin
|
|
|
2171
2328
|
when exists (
|
|
2172
2329
|
select 1 from ${qualified(ctx, "role_permissions")} rp
|
|
2173
2330
|
where rp.grant_key = p_grant and rp.effect = 'deny'
|
|
2174
|
-
) then true
|
|
2175
|
-
else
|
|
2176
|
-
select 1
|
|
2177
|
-
from ${tokenScopeRows(ctx)}
|
|
2178
|
-
where s.scope <> ''
|
|
2179
|
-
and coalesce(${map}() -> s.scope, '[]'::jsonb)
|
|
2180
|
-
? split_part(split_part(p_grant, '#', 1), '@', 1)
|
|
2181
|
-
)
|
|
2331
|
+
) then true${delegated}
|
|
2332
|
+
else ${covered}
|
|
2182
2333
|
end
|
|
2183
2334
|
);
|
|
2184
2335
|
end;
|
|
@@ -2254,7 +2405,7 @@ begin
|
|
|
2254
2405
|
return coalesce((
|
|
2255
2406
|
select to_jsonb(v.version) = (c.j -> 'authz_ver')
|
|
2256
2407
|
and coalesce(c.j -> 'memberships_truncated', 'false'::jsonb) <> 'true'::jsonb
|
|
2257
|
-
and jsonb_typeof(c.j -> 'memberships')
|
|
2408
|
+
and jsonb_typeof(c.j -> 'memberships') in ('array', 'object')
|
|
2258
2409
|
from ${version} v
|
|
2259
2410
|
cross join (select auth.jwt() as j) c
|
|
2260
2411
|
where v.user_id = ${subjectIdSql(ctx)}
|
|
@@ -3244,6 +3395,22 @@ ${grantsSql(fn, "text", anonExecute)}`);
|
|
|
3244
3395
|
chunks.push(`-- the permission keys the caller holds on one ${scope.name}: what permdock_has_permission or permitted_${scope.name}_ids_by_permission answers for each key, in one call
|
|
3245
3396
|
${keysFunction(keysFn, `p_id ${type}`, keysBody(scope.name, caller, false), grantsSql(keysFn, type, anonExecute), parallel)}
|
|
3246
3397
|
${keysFunction(keysFn, `p_id ${type}, p_keys text[]`, keysBody(scope.name, caller, true), grantsSql(keysFn, `${type}, text[]`, anonExecute), parallel)}`);
|
|
3398
|
+
if (rootScope(ctx.scopes) === scope.name) {
|
|
3399
|
+
const activeName = checkName(`${permissionKeysHelper(scope.name)}_active`);
|
|
3400
|
+
const active = qualified(ctx, activeName);
|
|
3401
|
+
chunks.push(`-- which of p_keys the caller holds on the tenant the token names
|
|
3402
|
+
create or replace function ${active}(p_keys text[])
|
|
3403
|
+
returns setof text
|
|
3404
|
+
language sql
|
|
3405
|
+
stable
|
|
3406
|
+
security invoker
|
|
3407
|
+
cost 1000${parallel ? "\nparallel safe" : ""}
|
|
3408
|
+
set search_path = ''
|
|
3409
|
+
as $$
|
|
3410
|
+
select ${keysFn}(${activeTenantSql(ctx, type)}, p_keys)
|
|
3411
|
+
$$;
|
|
3412
|
+
${grantsSql(active, "text[]", anonExecute)}`);
|
|
3413
|
+
}
|
|
3247
3414
|
chunks.push(`-- with p_conditioned true, also the instances a conditioned allow reaches, minus only unconditional denies: the caller applies the row condition
|
|
3248
3415
|
${byPermission(fn, "p_permission text, p_conditioned boolean", scope.name, "", true)}
|
|
3249
3416
|
${grantsSql(fn, "text, boolean", anonExecute)}`);
|
|
@@ -3352,4 +3519,4 @@ function resolveVias(tables, scopes, dialect) {
|
|
|
3352
3519
|
}
|
|
3353
3520
|
return Object.keys(out).length === 0 ? void 0 : out;
|
|
3354
3521
|
}
|
|
3355
|
-
export {
|
|
3522
|
+
export { graphIdsSql as $, tokenScopeAllowsCall as A, apiKeyClaimSql as B, forUserContext as C, seedSql as D, memoReadsSql as E, guardAuthAdminGrants as F, hookTeamReader as G, apiKeyUnlimitedSql as H, unguardAuthAdminGrants as I, POLICY_BUNDLE_TABLE as J, hookTeamsHelper as K, capabilityAccessSql as L, tokenScopesOn as M, tokenScopesPlan as N, TOKEN_SCOPE_ALLOWS as O, memoReadTriggersSql as P, closureDepths as Q, API_KEY_ALLOWS as R, accessSql as S, helpersSql as T, apiKeysPlan as U, apiKeyFields as V, HOOK_TEAM_READER as W, policyBundle as X, bundleLoaderSql as Y, closureBackfillSql as Z, sourceTransferTriggerSql as _, tablelessResources as a, ASSIGNMENTS as b, permissionHelpersSql as c, permittedByPermissionHelper as d, graphPlan as et, requiresSql as f, sourceRowsSql as g, sourceHoldersTriggerSql as h, tableNames as i, tokenScopeUnlimitedSql as j, isTokenScopesSetting as k, permissionKeysForHelper as l, pairsSql as m, resolveVias as n, PERMISSION_HELPERS as o, holderSources as p, POLICY_BUNDLE_FORMAT as q, tableNameOf as r, checkName as s, checkSharedTables as t, graphSql as tt, permissionKeysHelper as u, holdersTriggerSql as v, grantBodies as w, OWNERSHIP as x, transferTriggerSql as y, apiKeyAllowsCall as z };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, u as SnapshotQuery, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-
|
|
1
|
+
import { D as ConnectionOptions, T as Connection, f as InvalidSignatureError, i as OpenApiHooks, o as ProtectOptions, u as SnapshotQuery, v as discoverViaSignatureAgent, x as webBotAuthVerifier } from "../server-types-FkdDSB9h.js";
|
|
2
2
|
import { a as OperationInput, t as Operation } from "../operations-DaEoGpMV.js";
|
|
3
|
-
import { a as PermDock } from "../permdock-
|
|
3
|
+
import { a as PermDock } from "../permdock-DkvkGVF0.js";
|
|
4
4
|
import { w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
5
|
-
import { D as Policy,
|
|
6
|
-
import { a as ProtectTarget, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-
|
|
5
|
+
import { D as Policy, N as PolicyVocabulary, Or as Principal, rn as Snapshot } from "../policy-types-DuM3k5Ao.js";
|
|
6
|
+
import { a as ProtectTarget, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-Ds2-fUUi.js";
|
|
7
7
|
import { RequestMiddleware, RequestMiddlewareAfterServer, createMiddleware } from "@tanstack/react-start";
|
|
8
8
|
type TanStackStartPermDockOptions<TUser = unknown> = FetchAdapterOptions<Request, TUser>;
|
|
9
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSignatureAgent } from "../evaluations-DPEAu_jM.js";
|
|
2
|
-
import { t as fetchAdapter } from "../fetch-adapter-
|
|
2
|
+
import { t as fetchAdapter } from "../fetch-adapter-BXQc4NoV.js";
|
|
3
3
|
import { createMiddleware } from "@tanstack/react-start";
|
|
4
4
|
// src/tanstack-start/create.ts
|
|
5
5
|
function createPermDock(policy, options) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
2
2
|
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
3
|
-
import { i as tableNames } from "./tables-
|
|
4
|
-
import { r as compileGrants } from "./compile-
|
|
5
|
-
import { i as buildContext, n as isRefusal, t as generateOptions } from "./generate-options-
|
|
3
|
+
import { i as tableNames } from "./tables-BTXmioCH.js";
|
|
4
|
+
import { r as compileGrants } from "./compile-BRDpja_Y.js";
|
|
5
|
+
import { i as buildContext, n as isRefusal, t as generateOptions } from "./generate-options-DDSeUTFU.js";
|
|
6
6
|
// src/cli/rls/key-reasons.ts
|
|
7
7
|
/** A grant key written as a condition group (`k#1`) or a level (`k@own`). */
|
|
8
8
|
function isConditionKey(permission, grantKey) {
|
|
@@ -62,7 +62,7 @@ function keyReasons(config, policy, cwd) {
|
|
|
62
62
|
}
|
|
63
63
|
/** The sentence for `key`, which `reasons` may not know. */
|
|
64
64
|
function keyReason(reasons, key) {
|
|
65
|
-
return reasons.reasons.get(key) ?? (reasons.swappable.has(key) ? "every grant of it is unconditional
|
|
65
|
+
return reasons.reasons.get(key) ?? (reasons.swappable.has(key) ? "every grant of it is unconditional" : "the policy declares no grant of it");
|
|
66
66
|
}
|
|
67
67
|
/** `keyReasons`, or `undefined` for a policy or config the generator refuses. */
|
|
68
68
|
function tryKeyReasons(config, policy, cwd) {
|
package/dist/terminal/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as ApprovalStore } from "../types-
|
|
3
|
-
import { a as ProblemDetails, t as ApprovalHint } from "../errors-
|
|
4
|
-
import { t as InstanceOptions } from "../instance-options-
|
|
5
|
-
import { a as PermDock } from "../permdock-
|
|
1
|
+
import { Ar as Subject, D as Policy, N as PolicyVocabulary, Or as Principal, ir as Decision, qt as Instant } from "../policy-types-DuM3k5Ao.js";
|
|
2
|
+
import { m as ApprovalStore } from "../types-BGN3coSe.js";
|
|
3
|
+
import { a as ProblemDetails, t as ApprovalHint } from "../errors-BliKrfmP.js";
|
|
4
|
+
import { t as InstanceOptions } from "../instance-options-DDERlopm.js";
|
|
5
|
+
import { a as PermDock } from "../permdock-DkvkGVF0.js";
|
|
6
6
|
import { w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
7
7
|
type TokenSourceName = "device" | "keychain" | "env" | "ci-oidc";
|
|
8
8
|
type TokenSource = TokenSourceName | {
|
package/dist/terminal/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { l as storedApprovalToken, s as resumeDecision } from "../helpers-COh0lLc1.js";
|
|
2
|
-
import { u as withApp } from "../permdock-
|
|
3
|
-
import { n as resolveOrNull, t as buildInstance } from "../build-instance-
|
|
2
|
+
import { u as withApp } from "../permdock-JM9TKevZ.js";
|
|
3
|
+
import { n as resolveOrNull, t as buildInstance } from "../build-instance-DZEWYO-A.js";
|
|
4
4
|
import { t as compact } from "../compact-C4LFuqbW.js";
|
|
5
5
|
import { n as resourceRef } from "../resource-ref-BiQtFK-I.js";
|
|
6
6
|
import { r as isSubject } from "../subject-DkxY-AhF.js";
|
|
7
7
|
import { a as refreshCredential, o as revokeCredential, s as runDeviceFlow, t as TERMINAL_TIMEOUT_MS } from "../device-f3JEnqa0.js";
|
|
8
|
-
import { i as expandSnapshot } from "../snapshot-compact-
|
|
8
|
+
import { i as expandSnapshot } from "../snapshot-compact-BWMLnIXK.js";
|
|
9
9
|
import { a as deniedMessage, i as approvalMessage, n as PermDockDeniedError, t as PermDockApprovalRequiredError } from "../errors-DOSkVeTC.js";
|
|
10
10
|
import { i as writeCredentials, n as deleteCredentials, r as readCredentials } from "../storage-BhGDhsXm.js";
|
|
11
11
|
import { h as secondsAt } from "../time-r0CKBm57.js";
|
package/dist/testing/core.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as policyMatrix, _ as DescribePolicyConfig, a as OrmParityScenario, b as PolicyMatrixCell, c as RlsFieldsOutcome, d as RlsParityOptions, f as RlsParityReport, g as testRlsParity, h as RlsQueryResult, i as OrmParityRunInput, l as RlsParityCase, m as RlsQueryFn, n as OrmParityOptions, o as testOrmParity, p as RlsParitySubject, r as OrmParityReport, s as RlsDbOutcome, t as OrmParityCase, u as RlsParityFixture, v as MatrixCell, x as PolicyMatrixReport, y as MatrixOutcome } from "../core-
|
|
1
|
+
import { S as policyMatrix, _ as DescribePolicyConfig, a as OrmParityScenario, b as PolicyMatrixCell, c as RlsFieldsOutcome, d as RlsParityOptions, f as RlsParityReport, g as testRlsParity, h as RlsQueryResult, i as OrmParityRunInput, l as RlsParityCase, m as RlsQueryFn, n as OrmParityOptions, o as testOrmParity, p as RlsParitySubject, r as OrmParityReport, s as RlsDbOutcome, t as OrmParityCase, u as RlsParityFixture, v as MatrixCell, x as PolicyMatrixReport, y as MatrixOutcome } from "../core-DCMIztx1.js";
|
|
2
2
|
export { type DescribePolicyConfig, type MatrixCell, type MatrixOutcome, type OrmParityCase, type OrmParityOptions, type OrmParityReport, type OrmParityRunInput, type OrmParityScenario, type PolicyMatrixCell, type PolicyMatrixReport, type RlsDbOutcome, type RlsFieldsOutcome, type RlsParityCase, type RlsParityFixture, type RlsParityOptions, type RlsParityReport, type RlsParitySubject, type RlsQueryFn, type RlsQueryResult, policyMatrix, testOrmParity, testRlsParity };
|
package/dist/testing/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as policyMatrix, t as testOrmParity, n as testRlsParity } from "../core-
|
|
1
|
+
export { r as policyMatrix, t as testOrmParity, n as testRlsParity } from "../core-DIUrkFNL.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as CatalogDocument } from "../../types-CbJ5mxXv.js";
|
|
2
|
-
import { i as SupabaseManifest } from "../../manifest-
|
|
3
|
-
import { rt as MemberEntry } from "../../policy-types-
|
|
4
|
-
import { r as SubjectRecord } from "../../subject-cache-
|
|
5
|
-
import { i as SupabaseRpcClient } from "../../postgrest-
|
|
2
|
+
import { i as SupabaseManifest } from "../../manifest-BwhZ1s5b.js";
|
|
3
|
+
import { rt as MemberEntry } from "../../policy-types-DuM3k5Ao.js";
|
|
4
|
+
import { r as SubjectRecord } from "../../subject-cache-Bn4oJY_R.js";
|
|
5
|
+
import { i as SupabaseRpcClient } from "../../postgrest-B1bTbVE4.js";
|
|
6
6
|
type PostgrestFixtureOptions = {
|
|
7
7
|
/** The users `subject_for` knows, by id. An unknown user answers `null`. */
|
|
8
8
|
readonly subjects: Readonly<Record<string, SubjectRecord>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as parseCatalog } from "../../parse-CUqZ_lLC.js";
|
|
2
|
-
import { n as parseSupabaseManifest } from "../../manifest-
|
|
2
|
+
import { n as parseSupabaseManifest } from "../../manifest-CIWOmdlP.js";
|
|
3
3
|
// src/testing/fixtures/better-supabase.catalog.json
|
|
4
4
|
var better_supabase_catalog_default = {
|
|
5
5
|
$schema: "https://permdock.com/schemas/catalog-v2.json",
|
|
@@ -786,65 +786,83 @@ var better_supabase_manifest_default = {
|
|
|
786
786
|
{
|
|
787
787
|
"table": "public.contacts",
|
|
788
788
|
"share": "row",
|
|
789
|
-
"rules": ["unknown"]
|
|
789
|
+
"rules": ["unknown"],
|
|
790
|
+
"reason": "row level security is on and no permissive select policy applies to authenticated or public, so the table is not read through PostgREST by a signed-in role; inspect does not read grants, so a table grant is not checked"
|
|
790
791
|
},
|
|
791
792
|
{
|
|
792
793
|
"table": "public.customers",
|
|
793
794
|
"share": "row",
|
|
794
|
-
"rules": ["unknown"]
|
|
795
|
+
"rules": ["unknown"],
|
|
796
|
+
"reason": "row level security is on and no permissive select policy applies to authenticated or public, so the table is not read through PostgREST by a signed-in role; inspect does not read grants, so a table grant is not checked"
|
|
795
797
|
},
|
|
796
798
|
{
|
|
797
799
|
"table": "public.datetime_preferences",
|
|
798
800
|
"share": "row",
|
|
799
|
-
"rules": ["owner"]
|
|
801
|
+
"rules": ["owner"],
|
|
802
|
+
"reason": "policy datetime_preferences_own_read in supabase/schemas/public/tables/datetime_preferences.sql is an owner rule: it calls auth.uid() and reads column user_id, so a row is read by the user it names, not by a tenant grant"
|
|
800
803
|
},
|
|
801
804
|
{
|
|
802
805
|
"table": "public.organization_features",
|
|
803
806
|
"share": "row",
|
|
804
|
-
"rules": ["unknown"]
|
|
807
|
+
"rules": ["unknown"],
|
|
808
|
+
"reason": "row level security is on and no permissive select policy applies to authenticated or public (policies: organization_features_auth_admin_read), so the table is not read through PostgREST by a signed-in role; inspect does not read grants, so a table grant is not checked"
|
|
805
809
|
},
|
|
806
810
|
{
|
|
807
811
|
"table": "public.organization_memberships",
|
|
808
812
|
"share": "row",
|
|
809
|
-
"rules": ["owner", "restrictive"]
|
|
813
|
+
"rules": ["owner", "restrictive"],
|
|
814
|
+
"reason": "policy organization_memberships_read in supabase/schemas/public/tables/organization_memberships.sql is an owner rule: it calls auth.uid(), better_supabase.member_organization_ids() and reads column user_id, organization_id, so a row is read by the user it names, not by a tenant grant; restrictive policy bsb_tenant_scope_select in supabase/schemas/900_better_supabase_004_memberships.sql reads column organization_id, user_id, so the rows it hides differ per row, not per tenant"
|
|
810
815
|
},
|
|
811
816
|
{
|
|
812
817
|
"table": "public.organizations",
|
|
813
818
|
"share": "row",
|
|
814
|
-
"rules": ["condition"]
|
|
819
|
+
"rules": ["condition"],
|
|
820
|
+
"reason": "policy organizations_public_read in supabase/schemas/public/tables/organizations.sql is a row condition: it calls none and reads no column, which no tenant check of permdock.permitted_organization_ids_by_permission covers"
|
|
815
821
|
},
|
|
816
822
|
{
|
|
817
823
|
"table": "public.quotes",
|
|
818
824
|
"share": "row",
|
|
819
|
-
"rules": ["condition"]
|
|
825
|
+
"rules": ["condition"],
|
|
826
|
+
"reason": "policy quotes_select in supabase/schemas/public/policies/permdock.sql is a row condition: it calls permdock.permitted_organization_ids(), permdock.permitted_customer_ids() and reads column organization_id, customer_id, which no tenant check of permdock.permitted_organization_ids_by_permission covers"
|
|
820
827
|
},
|
|
821
828
|
{
|
|
822
829
|
"table": "public.role_permissions",
|
|
823
830
|
"share": "row",
|
|
824
831
|
"permissions": ["roles.manage"],
|
|
825
|
-
"rules": ["condition"]
|
|
832
|
+
"rules": ["condition"],
|
|
833
|
+
"reason": "policy role_permissions_manage in supabase/schemas/public/tables/role_permissions.sql is a row condition: it calls permdock.permitted_organization_ids_by_permission() and reads column r.id, role_id, r.organization_id, which no tenant check of permdock.permitted_organization_ids_by_permission covers"
|
|
826
834
|
},
|
|
827
835
|
{
|
|
828
836
|
"table": "public.roles",
|
|
829
837
|
"share": "row",
|
|
830
|
-
"rules": ["condition"]
|
|
838
|
+
"rules": ["condition"],
|
|
839
|
+
"reason": "policy roles_read_members in supabase/schemas/public/tables/roles.sql is a row condition: it calls permdock.member_organization_ids() and reads column organization_id, which no tenant check of permdock.permitted_organization_ids_by_permission covers"
|
|
831
840
|
},
|
|
832
841
|
{
|
|
833
842
|
"table": "public.staff",
|
|
834
843
|
"share": "row",
|
|
835
844
|
"rules": ["form"],
|
|
836
|
-
"reason": "
|
|
845
|
+
"reason": "policy staff_select in supabase/schemas/public/policies/permdock.sql uses permdock.permitted_organization_ids inside a larger expression, not as \"<column> in (select permdock.permitted_organization_ids('<key>'))\"; key staff.list: every grant of it is unconditional; key staff.read: every grant of it is unconditional"
|
|
837
846
|
}
|
|
838
847
|
],
|
|
839
848
|
"sharedFunctions": [],
|
|
840
849
|
"tenantPureHelpers": [{
|
|
841
850
|
"name": "permdock.permdock_organization_has",
|
|
842
851
|
"keyArgument": "p_grant",
|
|
852
|
+
"keyPosition": 0,
|
|
843
853
|
"tenantArgument": "p_tenant"
|
|
844
854
|
}, {
|
|
845
855
|
"name": "permdock.permitted_organization_permission_keys",
|
|
846
856
|
"keyArgument": "p_keys",
|
|
857
|
+
"keyPosition": 1,
|
|
847
858
|
"tenantArgument": "p_id"
|
|
859
|
+
}],
|
|
860
|
+
"permissionFilters": [{
|
|
861
|
+
"name": "permdock.permdock_organization_has_active",
|
|
862
|
+
"keyPosition": 0
|
|
863
|
+
}, {
|
|
864
|
+
"name": "permdock.permitted_organization_permission_keys_active",
|
|
865
|
+
"keyPosition": 0
|
|
848
866
|
}]
|
|
849
867
|
},
|
|
850
868
|
decidingColumns: [
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { Ct as WhereCompiler, D as Policy,
|
|
2
|
-
import { S as policyMatrix, _ as DescribePolicyConfig, a as OrmParityScenario, b as PolicyMatrixCell, c as RlsFieldsOutcome, d as RlsParityOptions, f as RlsParityReport, g as testRlsParity, h as RlsQueryResult, i as OrmParityRunInput, l as RlsParityCase, m as RlsQueryFn, n as OrmParityOptions, o as testOrmParity, p as RlsParitySubject, r as OrmParityReport, s as RlsDbOutcome, t as OrmParityCase, u as RlsParityFixture, v as MatrixCell, x as PolicyMatrixReport, y as MatrixOutcome } from "../core-
|
|
1
|
+
import { Ar as Subject, Ct as WhereCompiler, D as Policy, Dr as Membership, G as CredentialVerifier, Or as Principal, X as DecisionSink, Y as DecisionProvider, Z as EntitlementSource, _t as TokenSigner, bn as DeliveryChannel, ct as RelationSource, it as MembershipSource, lt as SettingsSource, mt as SubjectResolver, nt as LimitStore, q as CustomRoleSource, rn as Snapshot, ut as SnapshotSource, vt as TokenVerifier } from "../policy-types-DuM3k5Ao.js";
|
|
2
|
+
import { S as policyMatrix, _ as DescribePolicyConfig, a as OrmParityScenario, b as PolicyMatrixCell, c as RlsFieldsOutcome, d as RlsParityOptions, f as RlsParityReport, g as testRlsParity, h as RlsQueryResult, i as OrmParityRunInput, l as RlsParityCase, m as RlsQueryFn, n as OrmParityOptions, o as testOrmParity, p as RlsParitySubject, r as OrmParityReport, s as RlsDbOutcome, t as OrmParityCase, u as RlsParityFixture, v as MatrixCell, x as PolicyMatrixReport, y as MatrixOutcome } from "../core-DCMIztx1.js";
|
|
3
3
|
import { A as ResourceInit, C as InferPermissionTree, r as Role, w as Permission } from "../vocabulary-DHfKPIC5.js";
|
|
4
4
|
import { l as OperationLookup, n as OperationCoverageOptions } from "../coverage-AOeWiQ7Z.js";
|
|
5
|
-
import { dt as LegacyCheck } from "../index-
|
|
6
|
-
import { C as Limits, D as InstanceCache, a as PermDock, g as PrincipalIdentity, u as SnapshotOptions, v as PrincipalSource, z as ApprovalPolicySource } from "../permdock-
|
|
7
|
-
import { i as Seeds } from "../seeds-
|
|
5
|
+
import { dt as LegacyCheck } from "../index-Cjr8Q-uq.js";
|
|
6
|
+
import { C as Limits, D as InstanceCache, a as PermDock, g as PrincipalIdentity, u as SnapshotOptions, v as PrincipalSource, z as ApprovalPolicySource } from "../permdock-DkvkGVF0.js";
|
|
7
|
+
import { i as Seeds } from "../seeds-BZMPfWcC.js";
|
|
8
8
|
import { t as SqlQuery } from "../sql-BYYNi1lu.js";
|
|
9
|
-
import { a as ApprovalDelegationSource, m as ApprovalStore } from "../types-
|
|
9
|
+
import { a as ApprovalDelegationSource, m as ApprovalStore } from "../types-BGN3coSe.js";
|
|
10
10
|
import { n as RevocationFeed } from "../revocations-ku_f2d2y.js";
|
|
11
11
|
import { a as SaasProject } from "../permissions-UyQD5nRN.js";
|
|
12
|
-
import { n as saasPolicy } from "../policy-
|
|
13
|
-
import { c as ModelMap, t as AgentPermDock, u as ToolMap } from "../create-
|
|
14
|
-
import { t as CloudApproverOptions } from "../types-
|
|
15
|
-
import { c as AccessReviewStore } from "../types-
|
|
12
|
+
import { n as saasPolicy } from "../policy-BoUbJ2c0.js";
|
|
13
|
+
import { c as ModelMap, t as AgentPermDock, u as ToolMap } from "../create-T_NqxU31.js";
|
|
14
|
+
import { t as CloudApproverOptions } from "../types-BwjOhlgx.js";
|
|
15
|
+
import { c as AccessReviewStore } from "../types-CKwI6AT4.js";
|
|
16
16
|
import { t as supabaseMembershipsBudget } from "../budget-5LJ8kfZk.js";
|
|
17
|
-
import { R as IdempotencyStore } from "../index-
|
|
18
|
-
import { g as SetQueue, l as ReplayStore } from "../types-
|
|
19
|
-
import { S as SsfStreamStore } from "../index-
|
|
20
|
-
import { s as PolicySource } from "../hosted-
|
|
21
|
-
import { l as VersionStore, n as SubjectCache, s as VersionCache } from "../subject-cache-
|
|
22
|
-
import { r as SnapshotStorage } from "../types-
|
|
23
|
-
import { a as AutomationSource, t as Automation } from "../automation-
|
|
24
|
-
import { s as SupportSessionSource } from "../index-
|
|
25
|
-
import { n as ApprovalWaiter } from "../waiter-
|
|
26
|
-
import { c as DeliveryTransport, g as TransportMessages } from "../types-
|
|
27
|
-
import { x as DirectoryStore } from "../index-
|
|
28
|
-
import { r as SupabaseHookManifest } from "../manifest-
|
|
29
|
-
import { a as ProblemDetails } from "../errors-
|
|
17
|
+
import { R as IdempotencyStore } from "../index-BOJPdIBk.js";
|
|
18
|
+
import { g as SetQueue, l as ReplayStore } from "../types-Cvfe-G_N.js";
|
|
19
|
+
import { S as SsfStreamStore } from "../index-DBBRSw6r.js";
|
|
20
|
+
import { s as PolicySource } from "../hosted-DZgmEG4b.js";
|
|
21
|
+
import { l as VersionStore, n as SubjectCache, s as VersionCache } from "../subject-cache-Bn4oJY_R.js";
|
|
22
|
+
import { r as SnapshotStorage } from "../types-dtDg4goh.js";
|
|
23
|
+
import { a as AutomationSource, t as Automation } from "../automation-C7WH5XcZ.js";
|
|
24
|
+
import { s as SupportSessionSource } from "../index-ktQ7E4qB.js";
|
|
25
|
+
import { n as ApprovalWaiter } from "../waiter-DdwtUSzB.js";
|
|
26
|
+
import { c as DeliveryTransport, g as TransportMessages } from "../types-D3GI2B9O.js";
|
|
27
|
+
import { x as DirectoryStore } from "../index-CAE_Z53Y.js";
|
|
28
|
+
import { r as SupabaseHookManifest } from "../manifest-BwhZ1s5b.js";
|
|
29
|
+
import { a as ProblemDetails } from "../errors-BliKrfmP.js";
|
|
30
30
|
import { expectTypeOf } from "vitest";
|
|
31
31
|
/** `policyMatrix` under Vitest: one test per cell, plus the exhaustive check. */
|
|
32
32
|
export declare function describePolicy<TSubject>(policy: Policy, config: DescribePolicyConfig<TSubject>): void;
|