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
|
@@ -5,12 +5,12 @@ import { n as internalsOf } from "./internals-B3IgHrvo.js";
|
|
|
5
5
|
import { a as getResource } from "./permission-registry-B8tYxPIt.js";
|
|
6
6
|
import { a as expandRelation, c as isEdgeRelation, l as isFieldRelation, u as isPrincipalRelation } from "./resource-relations-8-pCScBO.js";
|
|
7
7
|
import { s as instantAt } from "./time-nR1JesoH.js";
|
|
8
|
-
import {
|
|
8
|
+
import { c as rootScope, d as scopeList, o as normalizeMemberships, s as resolveScope } from "./scopes-BSdYaGHs.js";
|
|
9
9
|
import { o as flattenGrantee } from "./grantee-Dke-9rd1.js";
|
|
10
10
|
import { t as byCodePoint } from "./compare-DTfyUunF.js";
|
|
11
|
-
import { r as relationCondition } from "./grantee-conditions-
|
|
12
|
-
import { c as nowSeconds, p as scopeField } from "./tenancy-
|
|
13
|
-
import { D as emptyListeners, t as evaluate } from "./evaluate-
|
|
11
|
+
import { r as relationCondition } from "./grantee-conditions-DX4K_gGI.js";
|
|
12
|
+
import { c as nowSeconds, p as scopeField } from "./tenancy-DvOHHk3-.js";
|
|
13
|
+
import { D as emptyListeners, t as evaluate } from "./evaluate-CsjXeLRo.js";
|
|
14
14
|
import { n as relationId, t as pendingRelations } from "./relations-BxvRvDHK.js";
|
|
15
15
|
import { t as relationWalk } from "./relation-walk-DK_gkgL7.js";
|
|
16
16
|
//#region src/core/who-can.ts
|
package/dist/workflow/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as AutomationSource, i as AutomationRequest, l as memoryAutomationSource, n as AutomationDecision, r as AutomationMode, s as MemoryAutomationSource, t as Automation, u as parseAutomation } from "../automation-
|
|
2
|
-
import { i as pollingApprovalWaiter, n as ApprovalWaiter, r as PollingApprovalWaiterOptions, t as ApprovalWaitOptions } from "../waiter-
|
|
3
|
-
import { a as WorkflowPermDockOptions, i as WorkflowPermDock, n as AwaitApprovalOptions, o as createPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-
|
|
1
|
+
import { a as AutomationSource, i as AutomationRequest, l as memoryAutomationSource, n as AutomationDecision, r as AutomationMode, s as MemoryAutomationSource, t as Automation, u as parseAutomation } from "../automation-DCWuVKtd.js";
|
|
2
|
+
import { i as pollingApprovalWaiter, n as ApprovalWaiter, r as PollingApprovalWaiterOptions, t as ApprovalWaitOptions } from "../waiter-C2cXXLFZ.js";
|
|
3
|
+
import { a as WorkflowPermDockOptions, i as WorkflowPermDock, n as AwaitApprovalOptions, o as createPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-DrHUmKvG.js";
|
|
4
4
|
import "../index-CaxrMD1A.js";
|
|
5
5
|
export { type ApprovalWaitOptions, type ApprovalWaiter, type Automation, type AutomationDecision, type AutomationMode, type AutomationOptions, type AutomationRequest, type AutomationSource, type AwaitApprovalOptions, type MemoryAutomationSource, type PollingApprovalWaiterOptions, type StartAutomationResult, type WorkflowPermDock, type WorkflowPermDockOptions, createPermDock, memoryAutomationSource, parseAutomation, pollingApprovalWaiter };
|
package/dist/workflow/index.js
CHANGED
|
@@ -4,10 +4,10 @@ import { a as isId } from "../expiry-6XByK0dm.js";
|
|
|
4
4
|
import { n as findPermission } from "../permission-registry-B8tYxPIt.js";
|
|
5
5
|
import { n as isThenable } from "../thenable-BNSM1U2R.js";
|
|
6
6
|
import { n as memoryAutomationSource, r as parseAutomation } from "../automation-x3KEUusw.js";
|
|
7
|
-
import { l as withApp, t as getPermDock } from "../permdock-
|
|
7
|
+
import { l as withApp, t as getPermDock } from "../permdock-DdzMv5-F.js";
|
|
8
8
|
import { o as automationEvent } from "../sink-D9_vh372.js";
|
|
9
|
-
import { a as requestApproval, s as resumeDecision } from "../helpers-
|
|
10
|
-
import { i as subjectFromRunTicket, r as signRunTicket } from "../run-ticket-
|
|
9
|
+
import { a as requestApproval, s as resumeDecision } from "../helpers-DNnZffrI.js";
|
|
10
|
+
import { i as subjectFromRunTicket, r as signRunTicket } from "../run-ticket-CjvXr6wj.js";
|
|
11
11
|
import { t as pollingApprovalWaiter } from "../waiter-aBLM63_f.js";
|
|
12
12
|
//#region src/workflow/create.ts
|
|
13
13
|
function writeQuietly(sink, event) {
|
|
@@ -83,7 +83,8 @@ function createPermDock(policy, given) {
|
|
|
83
83
|
kind: "service",
|
|
84
84
|
tenant: current.tenant,
|
|
85
85
|
memberships: [{
|
|
86
|
-
|
|
86
|
+
scope: "tenant",
|
|
87
|
+
id: current.tenant,
|
|
87
88
|
roles: current.roles ?? []
|
|
88
89
|
}]
|
|
89
90
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { qn as Decision } from "../policy-types-IRJVABmm.js";
|
|
2
2
|
import { u as Permission } from "../permission-types-CAY-GU7e.js";
|
|
3
|
-
import { a as PermDock } from "../permdock-
|
|
4
|
-
import { n as ApprovalWaiter } from "../waiter-
|
|
5
|
-
import { i as WorkflowPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-
|
|
3
|
+
import { a as PermDock } from "../permdock-DUWZEOLR.js";
|
|
4
|
+
import { n as ApprovalWaiter } from "../waiter-C2cXXLFZ.js";
|
|
5
|
+
import { i as WorkflowPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-DrHUmKvG.js";
|
|
6
6
|
//#region src/workflow-sdk/index.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* The part of a Workflow SDK `Hook` the waiter reads: awaiting it suspends the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as internalsOf, t as attachInternals } from "./internals-B3IgHrvo.js";
|
|
2
|
-
import { i as decideAllWith, n as canAllWith } from "./checks-
|
|
2
|
+
import { i as decideAllWith, n as canAllWith } from "./checks-fyDOhcz0.js";
|
|
3
3
|
//#region src/core/wrap.ts
|
|
4
4
|
/**
|
|
5
5
|
* A frozen copy of `permdock` with the members `overrides` returns replaced.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as PermDock } from "./permdock-
|
|
1
|
+
import { M as PolicyVocabulary } from "./policy-types-IRJVABmm.js";
|
|
2
|
+
import { a as PermDock } from "./permdock-DUWZEOLR.js";
|
|
3
3
|
//#region src/core/wrap.d.ts
|
|
4
4
|
/** A wrapper an adapter applies to each instance it builds, as `withOtel` does. */
|
|
5
5
|
type PermDockWrap = <V extends PolicyVocabulary>(permdock: PermDock<V>) => PermDock<V>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "permdock",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Typed permissions for TypeScript apps, APIs, databases, and AI agents, with the permdock CLI and test runners.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
@@ -243,6 +243,10 @@
|
|
|
243
243
|
"types": "./dist/supabase/middleware.d.ts",
|
|
244
244
|
"default": "./dist/supabase/middleware.js"
|
|
245
245
|
},
|
|
246
|
+
"./supabase/client": {
|
|
247
|
+
"types": "./dist/supabase/client.d.ts",
|
|
248
|
+
"default": "./dist/supabase/client.js"
|
|
249
|
+
},
|
|
246
250
|
"./ssf": {
|
|
247
251
|
"types": "./dist/ssf/index.d.ts",
|
|
248
252
|
"default": "./dist/ssf/index.js"
|
|
@@ -333,7 +337,6 @@
|
|
|
333
337
|
"@orpc/contract": "2.0.0-beta.44",
|
|
334
338
|
"@orpc/openapi": "2.0.0-beta.44",
|
|
335
339
|
"@orpc/server": "2.0.0-beta.44",
|
|
336
|
-
"@permdock/ox-config": "0.0.0",
|
|
337
340
|
"@permdock/typescript-config": "0.0.0",
|
|
338
341
|
"@solidjs/start": "2.0.6",
|
|
339
342
|
"@supabase/middleware": "1.0.0",
|
|
@@ -353,8 +356,8 @@
|
|
|
353
356
|
"ajv": "8.20.0",
|
|
354
357
|
"astro": "7.4.0",
|
|
355
358
|
"babel-plugin-react-compiler": "1.0.0",
|
|
356
|
-
"better-supabase": "0.
|
|
357
|
-
"better-supabase-floor": "npm:better-supabase@0.
|
|
359
|
+
"better-supabase": "0.39.0",
|
|
360
|
+
"better-supabase-floor": "npm:better-supabase@0.39.0",
|
|
358
361
|
"chat": "4.42.0",
|
|
359
362
|
"diff": "9.0.0",
|
|
360
363
|
"drizzle-orm": "1.0.0-rc.5-5935859",
|
|
@@ -411,7 +414,7 @@
|
|
|
411
414
|
"@trpc/server": ">=11",
|
|
412
415
|
"ai": ">=5",
|
|
413
416
|
"astro": ">=5",
|
|
414
|
-
"better-supabase": ">=0.
|
|
417
|
+
"better-supabase": ">=0.39.0",
|
|
415
418
|
"chat": ">=4",
|
|
416
419
|
"drizzle-orm": ">=0.40 || >=1.0.0-rc.0",
|
|
417
420
|
"elysia": ">=1",
|
|
@@ -102,6 +102,11 @@
|
|
|
102
102
|
"consumedAt": {
|
|
103
103
|
"$ref": "#/$defs/instant"
|
|
104
104
|
},
|
|
105
|
+
"fingerprint": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
108
|
+
"description": "The approvalFingerprint the request was opened under; a resume under another one is refused."
|
|
109
|
+
},
|
|
105
110
|
"x": {
|
|
106
111
|
"type": "object",
|
|
107
112
|
"description": "The application's own data, set when the request opens: plain JSON, never read by a decision."
|
package/schemas/catalog-v1.json
CHANGED
|
@@ -294,9 +294,19 @@
|
|
|
294
294
|
"type": "object",
|
|
295
295
|
"properties": {
|
|
296
296
|
"by": {},
|
|
297
|
-
"
|
|
297
|
+
"combine": {
|
|
298
298
|
"enum": ["any", "all", "sequential"]
|
|
299
299
|
},
|
|
300
|
+
"mode": {
|
|
301
|
+
"description": "confirm or authorize; a catalog written before 0.17 holds any, all or sequential here, read as combine.",
|
|
302
|
+
"enum": [
|
|
303
|
+
"confirm",
|
|
304
|
+
"authorize",
|
|
305
|
+
"any",
|
|
306
|
+
"all",
|
|
307
|
+
"sequential"
|
|
308
|
+
]
|
|
309
|
+
},
|
|
300
310
|
"stages": {
|
|
301
311
|
"type": "array",
|
|
302
312
|
"items": {
|
|
@@ -312,6 +322,7 @@
|
|
|
312
322
|
}
|
|
313
323
|
},
|
|
314
324
|
"distinct": {
|
|
325
|
+
"description": "Written before 0.17; false reads as mode: confirm.",
|
|
315
326
|
"type": "boolean"
|
|
316
327
|
},
|
|
317
328
|
"staleOn": {
|
|
@@ -425,9 +436,13 @@
|
|
|
425
436
|
"type": "object",
|
|
426
437
|
"properties": {
|
|
427
438
|
"by": {},
|
|
428
|
-
"
|
|
439
|
+
"combine": {
|
|
429
440
|
"enum": ["any", "all", "sequential"]
|
|
430
441
|
},
|
|
442
|
+
"mode": {
|
|
443
|
+
"description": "confirm or authorize; a catalog written before 0.17 holds any, all or sequential here, read as combine.",
|
|
444
|
+
"enum": ["confirm", "authorize", "any", "all", "sequential"]
|
|
445
|
+
},
|
|
431
446
|
"stages": {
|
|
432
447
|
"type": "array",
|
|
433
448
|
"items": {
|
|
@@ -443,6 +458,7 @@
|
|
|
443
458
|
}
|
|
444
459
|
},
|
|
445
460
|
"distinct": {
|
|
461
|
+
"description": "Written before 0.17; false reads as mode: confirm.",
|
|
446
462
|
"type": "boolean"
|
|
447
463
|
},
|
|
448
464
|
"staleOn": {
|
package/schemas/snapshot-v1.json
CHANGED
|
@@ -9,6 +9,15 @@
|
|
|
9
9
|
"v": { "const": 1 },
|
|
10
10
|
"issuedAt": { "$ref": "#/$defs/instant" },
|
|
11
11
|
"expiresAt": { "$ref": "#/$defs/instant" },
|
|
12
|
+
"authzVersion": {
|
|
13
|
+
"type": "integer",
|
|
14
|
+
"minimum": 0,
|
|
15
|
+
"description": "The token's authz_ver the snapshot was built from."
|
|
16
|
+
},
|
|
17
|
+
"sessionId": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "The Auth session_id the snapshot was built for."
|
|
20
|
+
},
|
|
12
21
|
"subject": {
|
|
13
22
|
"type": "object",
|
|
14
23
|
"required": ["principal", "context"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: permdock-approvals
|
|
3
|
-
description: Requires human approval on PermDock grants, notifies approvers and resumes the approved call. Use when adding approval to a destructive or money-moving action (delete, publish, pay, refund, transfer), choosing approvers with approval by, user(), relation(),
|
|
3
|
+
description: Requires human approval on PermDock grants, notifies approvers and resumes the approved call. Use when adding approval to a destructive or money-moving action (delete, publish, pay, refund, transfer), choosing approvers with approval by, user(), relation(), manager(), mode confirm or authorize, quorum, ttl, escalation, staleOn or approvalFingerprint, ordering approvers with combine and stages, covering an approver with an ApprovalDelegation, loading approval rules as data with an ApprovalPolicySource, separating preparer and approver with exclusiveWith, labelling operations with risk and effects meta, mounting approvalsHandler with an ApprovalStore, sending approval emails (approvalEmail) or chat cards (approvalCard, approvalActions) from approvalPrompt, parking a background run on an ApprovalWaiter (pollingApprovalWaiter, workflowSdkWaiter), resuming with the PermDock-Approval header, mapping approval-required to an agent runtime, MCP elicitation or AG-UI interrupt, or fixing doctor PD017, PD018 or PD024.
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
author: ScaleDockHQ
|
|
@@ -25,12 +25,12 @@ metadata:
|
|
|
25
25
|
|
|
26
26
|
## Invariants
|
|
27
27
|
|
|
28
|
-
1. The requester never approves by default. The actor is always refused. The principal is refused unless the grant sets `
|
|
28
|
+
1. The requester never approves by default. The actor is always refused. The principal is refused unless the grant sets `mode: "confirm"`, and `requireDistinctApprover` on the handler refuses it even then. A delegate is held to the same rule, and so is the delegator. One hop, and `until` is required.
|
|
29
29
|
2. The approver comes from authentication on the approval surface, never from the request body, a tool argument or a link.
|
|
30
30
|
3. One approval resumes one call. The token binds permission, resource, subject and actor, the resume re-runs `decide`, and `consume` spends the approval once.
|
|
31
31
|
4. `can` returns `false` for `approval-required`. Only `decide`, `assert` and the adapters see the third outcome.
|
|
32
32
|
5. Quorum, ttl and escalation live on the grant, not in the store. A grant's `ttl` can shorten the store's window, never extend it.
|
|
33
|
-
6. A `relation()` approver is matched only through facts the approvals handler reads from the app's `RelationSource` at verdict time, never from a request body.
|
|
33
|
+
6. A `relation()` or `manager()` approver is matched only through facts the approvals handler reads from the app's `RelationSource` at verdict time, never from a request body.
|
|
34
34
|
7. Approval rules kept as data only add stages. A source that fails to load denies every call an allow would grant.
|
|
35
35
|
8. A link never approves. An email or chat prompt carries the request id, never the token, and links to the app's approval page where the approver signs in. Chat buttons carry the request id and are applied as the platform-verified clicking user.
|
|
36
36
|
9. A wake carries no verdict. `waiter.wake(token)` only ends a wait; the run decides again through `resumeApproval`, which reads the store.
|
|
@@ -51,9 +51,9 @@ metadata:
|
|
|
51
51
|
});
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
For sign-off in order, use `
|
|
55
|
-
Add `
|
|
56
|
-
✓ `permdock doctor` reports no PD017 (sensitive verb without approval), and every PD024 (`
|
|
54
|
+
For sign-off in order, use `combine: 'sequential'` with `stages: [{ by, quorum? }]` (or `combine: 'all'` for any order); one person signs one stage. `user('u_cfo')` names one person, and `relation(permissions.expense, 'manager')` names whoever holds the relation on the row.
|
|
55
|
+
Add `mode: "confirm"` only where the user confirms their own agent's call and no money, deletion or access change sits behind it.
|
|
56
|
+
✓ `permdock doctor` reports no PD017 (sensitive verb without approval), and every PD024 (`mode: "confirm"`) is deliberate.
|
|
57
57
|
|
|
58
58
|
2. **Bind content when it matters.** Declare `version: 'updatedAt'` (or a revision counter) on the `resource()` and add `staleOn: 'resource-change'` to the approval, so a changed row resumes as `stale-approval` and asks again.
|
|
59
59
|
✓ `definePolicy` accepts the grant (it throws when the resource has no `version` or the action is a collection action).
|
|
@@ -77,12 +77,12 @@ metadata:
|
|
|
77
77
|
## Verify before done
|
|
78
78
|
|
|
79
79
|
- [ ] Every destructive or money-moving action an agent or a user can trigger has `approval`, or a `deny` on the same leaf.
|
|
80
|
-
- [ ] Each `
|
|
80
|
+
- [ ] Each `mode: "confirm"` (PD024) is a deliberate self-confirmation with nothing irreversible behind it.
|
|
81
81
|
- [ ] Roles that must not be held together set `exclusiveWith`, and PD018 is clean.
|
|
82
82
|
- [ ] The store survives the deployment: no `memoryApprovalStore` on serverless or across replicas.
|
|
83
83
|
- [ ] No resume token is read from model output or tool arguments, and each resume re-runs `decide`.
|
|
84
84
|
- [ ] A custom `ApprovalStore` passes `testApprovalStore` from `permdock/testing`.
|
|
85
|
-
- [ ] Grants with `relation()` approvers have a handler with `relations`, and nothing fills `verdict.relations` from client input.
|
|
85
|
+
- [ ] Grants with `relation()` or `manager()` approvers have a handler with `relations`, and nothing fills `verdict.relations` from client input.
|
|
86
86
|
- [ ] No email, chat message or URL carries the approval token or an approve link; `approvalUrl` is https and opens a page behind sign-in.
|
|
87
87
|
- [ ] Approval recipients are decided by `deliver` from server-loaded principals, never from the request body, and the requester is not among them.
|
|
88
88
|
- [ ] Chat approve and reject clicks go through `approvalActions` (or `resolveAction`), never a handler that trusts the button value alone.
|
|
@@ -15,7 +15,7 @@ export const { protect } = createPermDock(policy, { subject, store });
|
|
|
15
15
|
// Routes for approvers: GET /pending, GET /mine, GET /:id, GET /:id/signature, POST /:id/approve, POST /:id/reject
|
|
16
16
|
const handler = approvalsHandler(store, {
|
|
17
17
|
subject: (request) => approverFromSession(request), // the approver, from real authentication
|
|
18
|
-
requireDistinctApprover: false, // true refuses the principal even where a grant sets
|
|
18
|
+
requireDistinctApprover: false, // true refuses the principal even where a grant sets mode: "confirm"
|
|
19
19
|
relations, // RelationSource: needed when a grant uses relation() approvers
|
|
20
20
|
permissions, // the permission tree, for relation approvers reached through links
|
|
21
21
|
});
|
|
@@ -73,7 +73,7 @@ A gate in your own code resumes the same way with `resumeDecision` from `permdoc
|
|
|
73
73
|
|
|
74
74
|
Over HTTP, the client retries the same request with the `PermDock-Approval: <token>` header. In React, `approvalHeaders(token)` builds that header and `useApproval(decision)` requests and polls an approval from the UI.
|
|
75
75
|
|
|
76
|
-
A bad resume is denied with detail `approval-not-found`, `approval-pending`, `approval-rejected`, `approval-expired`, `approval-consumed` or `approval-mismatch`; a changed row is `stale-approval`. `approvalsHandler` answers `403` for an ineligible approver (`approver-not-eligible`, the actor, or the principal without `
|
|
76
|
+
A bad resume is denied with detail `approval-not-found`, `approval-pending`, `approval-rejected`, `approval-expired`, `approval-consumed` or `approval-mismatch`; a changed row is `stale-approval`. `approvalsHandler` answers `403` for an ineligible approver (`approver-not-eligible`, the actor, or the principal without `mode: "confirm"`) and `409` for a repeated one (`approver-repeated`).
|
|
77
77
|
|
|
78
78
|
## Delegation
|
|
79
79
|
|
|
@@ -106,4 +106,8 @@ Send the prompt with `approvalPrompt` and `permdock/delivery`: `approvalEmail` f
|
|
|
106
106
|
|
|
107
107
|
## Approvers
|
|
108
108
|
|
|
109
|
-
`by` takes roles, `user(id)`, `relation()`, `holder(permission)` and `anyOf(...)`. A list is all-of; use `anyOf(user(id), holder(permissions.x.approve))` for "this person or anyone who holds the permission". `holder()` needs `approvalsHandler(store, { permdockFor: (approver, request) => createPermDock(policy, approver, { customRoles }) })`, so custom roles count. Stages may carry their own `escalation`.
|
|
109
|
+
`by` takes roles, `user(id)`, `relation()`, `manager({ levels? })` (whoever holds `manager` on the requester's `user` record, up to `levels` steps), `holder(permission)` and `anyOf(...)`. A list is all-of; use `anyOf(user(id), holder(permissions.x.approve))` for "this person or anyone who holds the permission". `holder()` needs `approvalsHandler(store, { permdockFor: (approver, request) => createPermDock(policy, approver, { customRoles }) })`, so custom roles count. Stages may carry their own `escalation`.
|
|
110
|
+
|
|
111
|
+
## Operation fingerprints
|
|
112
|
+
|
|
113
|
+
Bind an approval to the exact operation with `fingerprint`: `permdock.decide(permission, row, { fingerprint: approvalFingerprint({ id, amount, to }) })`. The token and the stored request carry it, and a resume or `consumeApproval(store, token, at, { fingerprint })` under another one fails with `approval-fingerprint-mismatch`. `approvalFingerprint` returns the same hex string as better-supabase's, synchronously.
|
|
@@ -44,7 +44,7 @@ Read the app's `permissions.ts`, `policy.ts`, factory file and every adapter gua
|
|
|
44
44
|
✓ Every policy and custom store has its runner, or a finding.
|
|
45
45
|
6. **ASI02 and ASI03.** Map the inventory onto [OWASP Agentic](https://permdock.com/docs/security/owasp-agentic); for the threat list itself, defer to the `owasp-agentic` spec skill (`npx skills add ScaleDockHQ/scaledock-skills --skill owasp-agentic`).
|
|
46
46
|
- **ASI02** (tool misuse): unmapped tools, a collection permission on a row handler, a destructive tool without `approval`, capability lists that include denied tools.
|
|
47
|
-
- **ASI03** (identity and privilege abuse): a model-supplied subject or actor, an actor used as approver, `
|
|
47
|
+
- **ASI03** (identity and privilege abuse): a model-supplied subject or actor, an actor used as approver, `mode: "confirm"` on a sensitive action, a resume token not bound to permission, resource, subject and actor, API keys stored in plain text or created outside `decideCredential`, keys without expiry (PD029), and a `memberships` source applied to service-key subjects.
|
|
48
48
|
✓ Each agent adapter in the app has an ASI02 line and an ASI03 line.
|
|
49
49
|
7. **Pull request review**, when the scope is one PR. Review only what the diff changes:
|
|
50
50
|
- Run `permdock collect --check` and `permdock usage --json` on both sides and compare. New leaves with no grant, grants for leaves nobody checks, and new `undeclared` or `outsideInclude` findings are comments.
|
|
@@ -36,7 +36,7 @@ pnpm exec permdock rls verify --introspect
|
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
- List the scope instances a permission reaches in process with `permdock.permittedIds(permission, scope, { within })`, never a loop of `can` over memberships with a made-up row.
|
|
39
|
-
- Generated policies call `permdock_has('<key>')` and one `permitted_<scope>_ids('<key>')` per declared scope, which Postgres runs once per statement. Hand-written policies that only need membership (an organization switcher) call `member_<scope>_ids()` instead of inventing a permission key. A policy that passes a user id, such as better-supabase's team sharing, calls `member_team_ids_of(<user>)` on Supabase: it answers only when the id is the caller's. Trusted SQL that acts for a stored user (a job, a trigger, a deferred approval) calls `permdock_has_for(p_user, '<key>')` and `permitted_<scope>_ids_for(p_user, '<key>')` in `database` mode, or the generated `permitted_<resource>_rows_for
|
|
39
|
+
- Generated policies call `permdock_has('<key>')` and one `permitted_<scope>_ids('<key>')` per declared scope, which Postgres runs once per statement. Hand-written policies that only need membership (an organization switcher) call `member_<scope>_ids()` instead of inventing a permission key. A policy that passes a user id, such as better-supabase's team sharing, calls `member_team_ids_of(<user>)` on Supabase: it answers only when the id is the caller's. Trusted SQL that acts for a stored user (a job, a trigger, a deferred approval) calls `permdock_has_for(p_user, '<key>')` and `permitted_<scope>_ids_for(p_user, '<key>')` in `database` mode, or the generated `permitted_<resource>_rows_for` (`permitted_<resource>_rows_for(p_user, '<key>', <text[] of ids>)` for a known set of rows, such as a share link checked against its creator's access), never a hand-written function that rewrites `request.jwt.claims`. With `rls.rowHelpers`, a hand-written policy or function that needs the rows a permission reaches through the graph calls `permitted_<resource>_rows('<permission key>')` instead of restating closure walks, link hops and `includes`. A table's own `select` or `insert` policy calls the row-valued `permitted_<resource>_row(<table>, '<permission key>')` instead, so `insert ... returning` sees the new row. A function that checks a known set of rows (one tenant's, a page, a batch) calls `permitted_<resource>_rows('<permission key>', <text[] of ids>)`, which reads only those ids, instead of the one-argument form, which reads the whole table, or a `permitted_<resource>_row` call per row. Hand-written policies and functions that apply no row condition call `permitted_<scope>_ids_by_permission('<permission key>')` or `permdock_has_permission('<permission key>')` instead of spelling a positional `#n` grant key. A screen or RPC that checks many permissions on one organization calls `permitted_<scope>_permission_keys(<id>)` once (or `(<id>, array['<key>', ...])` for a few keys) instead of one helper call per key. A role editor or admin screen lists a role's keys with `permdock_role_permissions(p_role, p_scope, p_tenant, p_scope_id)` (declared roles, and custom roles of the caller's tenant in `database` mode) and the catalog with `permdock_permission_keys()` (`permdock_permission_keys('<scope>')` for the keys a role on that scope can hold), instead of joining `role_permissions` and the custom-role tables by hand; server code reads any tenant's roles with `permdock_trusted_role_permissions`, granted through `rls.trustedReaders`. Set `--tenant-type` (or `rls.scopeTypes`, keyed by scope name or `tenant` and `team`) to the scope columns' types.
|
|
40
40
|
- `--authorize database` (default) reads the membership tables per statement; map each under `rls.memberships.scopes.<scope>` with `columns` for its id and its ancestors', and `via` so roles with `for` apply: a column name, or `{ value: 'staff' }` when every row has that kind (never add a generated column for it). `--authorize jwt` reads token claims and stays stale until the token refreshes; keep the token lifetime at 3600 seconds or less (PD019).
|
|
41
41
|
- When the role column holds values that are not role keys, give the membership source `role: { column, map: { value: 'role' } }`; a value mapped to `null` grants nothing. `permdock rls explain` prints the tables, membership sources, custom roles table and triggers a generate run binds to, without writing a file. `rls.seeds: 'function'` writes the `role_permissions` rows as `<schema>.seed()` instead of inserts; run `select <schema>.seed();` after each deploy, and PD054 checks the function body.
|
|
42
42
|
- `rls verify --introspect` checks each `security definer` helper by its full signature, so every overload is checked on its own. A helper finding id names the signature (`helper-definer:permdock.permdock_has(text):helper`); write `rls.verify.ignore` entries with it.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { a as ProblemDetails } from "./errors-BIM4MFsJ.js";
|
|
2
|
-
//#region src/core/action-result.d.ts
|
|
3
|
-
/** What a `protectAction` action resolves to; both members cross to the client. */
|
|
4
|
-
type ActionResult<T> = {
|
|
5
|
-
readonly ok: true;
|
|
6
|
-
readonly value: T;
|
|
7
|
-
} | {
|
|
8
|
-
readonly ok: false;
|
|
9
|
-
readonly problem: ProblemDetails;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* The server action: `approval` is the token of a granted approval request,
|
|
13
|
-
* which resumes an `approval-required` decision.
|
|
14
|
-
*/
|
|
15
|
-
type ProtectedAction<T> = (input: unknown, options?: {
|
|
16
|
-
readonly approval?: string;
|
|
17
|
-
}) => Promise<ActionResult<T>>;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { ProtectedAction as n, ActionResult as t };
|
package/dist/catalog-D3oS2GH3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as catalogFile, n as runCatalog } from "./catalog-CGlSwU6j.js";
|
package/dist/collect-D-eroIfV.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { r as runCollect } from "./collect-WCl8cJQV.js";
|
package/dist/load-Dm0pSYH3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { a as loadModule, s as pickNamed } from "./load-DjSU5KXO.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as SPLIT_PARTS } from "./output-files-BIQ_9pIs.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { n as runPowerSync } from "./powersync-uqYWxTjq.js";
|
package/dist/pull-D6dloyrc.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { n as runCloudPull } from "./pull-BBmCxnqX.js";
|
package/dist/renames-CGj7YwcQ.js
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
//#region src/cli/core/renames.ts
|
|
2
|
-
const DB_COMMANDS = [
|
|
3
|
-
"rls generate",
|
|
4
|
-
"rls import",
|
|
5
|
-
"rls verify",
|
|
6
|
-
"supabase hook generate",
|
|
7
|
-
"powersync verify"
|
|
8
|
-
];
|
|
9
|
-
const FLAG_RENAMES = [
|
|
10
|
-
{
|
|
11
|
-
commands: DB_COMMANDS,
|
|
12
|
-
from: "--db",
|
|
13
|
-
to: "--db-url-stdin",
|
|
14
|
-
hint: "--db-url-stdin or DATABASE_URL"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
commands: DB_COMMANDS,
|
|
18
|
-
from: "--db-url",
|
|
19
|
-
to: "--db-url-stdin",
|
|
20
|
-
hint: "--db-url-stdin or DATABASE_URL"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
commands: ["rls generate"],
|
|
24
|
-
from: "--force",
|
|
25
|
-
to: "--force-rls"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
commands: ["rls verify"],
|
|
29
|
-
from: "--format",
|
|
30
|
-
to: "--kind"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
commands: ["rls verify"],
|
|
34
|
-
from: "--emit",
|
|
35
|
-
to: "--kind"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
commands: ["catalog"],
|
|
39
|
-
from: "--format",
|
|
40
|
-
to: "--kind",
|
|
41
|
-
values: {
|
|
42
|
-
json: "catalog",
|
|
43
|
-
schema: "json-schema",
|
|
44
|
-
markdown: "markdown"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
commands: ["openapi emit"],
|
|
49
|
-
from: "--format",
|
|
50
|
-
to: "--kind"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
commands: [
|
|
54
|
-
"rls generate",
|
|
55
|
-
"rls verify",
|
|
56
|
-
"rls migrate",
|
|
57
|
-
"powersync generate",
|
|
58
|
-
"powersync verify",
|
|
59
|
-
"openapi emit"
|
|
60
|
-
],
|
|
61
|
-
from: "--from",
|
|
62
|
-
to: "--policy"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
commands: ["catalog", "arazzo check"],
|
|
66
|
-
from: "--from",
|
|
67
|
-
to: "--permissions"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
commands: ["rls import", "openapi import"],
|
|
71
|
-
from: "--schema",
|
|
72
|
-
to: "--validator"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
commands: [
|
|
76
|
-
"usage",
|
|
77
|
-
"config",
|
|
78
|
-
"doctor"
|
|
79
|
-
],
|
|
80
|
-
from: "--strict",
|
|
81
|
-
to: "--fail-on",
|
|
82
|
-
hint: "--fail-on warning",
|
|
83
|
-
rewrite: "--fail-on warning"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
commands: ["login"],
|
|
87
|
-
from: "--write",
|
|
88
|
-
to: "--scope",
|
|
89
|
-
hint: "--scope catalog:write",
|
|
90
|
-
rewrite: "--scope catalog:write"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
commands: ["skills install", "skills update"],
|
|
94
|
-
from: "--agent",
|
|
95
|
-
to: "--for"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
commands: ["skills install", "skills update"],
|
|
99
|
-
from: "--client",
|
|
100
|
-
to: "--for"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
commands: ["init"],
|
|
104
|
-
from: "--agent",
|
|
105
|
-
to: "--integration"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
commands: ["init"],
|
|
109
|
-
from: "--ui",
|
|
110
|
-
to: "--integration"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
commands: ["init"],
|
|
114
|
-
from: "--src",
|
|
115
|
-
to: "--out-dir"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
commands: [
|
|
119
|
-
"rls generate",
|
|
120
|
-
"rls verify",
|
|
121
|
-
"rls migrate"
|
|
122
|
-
],
|
|
123
|
-
from: "--rbac-scaffold",
|
|
124
|
-
to: "--rbac",
|
|
125
|
-
hint: "--rbac supabase",
|
|
126
|
-
rewrite: "--rbac supabase"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
commands: ["rls migrate"],
|
|
130
|
-
from: "--write",
|
|
131
|
-
hint: "rls migrate writes by default; --dry-run prints the plan without writing",
|
|
132
|
-
rewrite: ""
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
commands: ["cloud push"],
|
|
136
|
-
from: "--environment",
|
|
137
|
-
to: "--project",
|
|
138
|
-
hint: "--project <id>: a project id is its environment"
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
commands: ["scan"],
|
|
142
|
-
from: "--legacy",
|
|
143
|
-
hint: "permdock scan lists the checks written without PermDock; drop --legacy",
|
|
144
|
-
rewrite: ""
|
|
145
|
-
}
|
|
146
|
-
];
|
|
147
|
-
const COMMAND_MOVES = [
|
|
148
|
-
{
|
|
149
|
-
from: "openapi",
|
|
150
|
-
to: "openapi emit"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
from: "skills",
|
|
154
|
-
to: "skills install"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
from: "arazzo",
|
|
158
|
-
to: "arazzo check"
|
|
159
|
-
}
|
|
160
|
-
];
|
|
161
|
-
const DEFAULT_CHANGES = [{
|
|
162
|
-
command: "rls migrate",
|
|
163
|
-
unless: ["--write", "--retire-out"],
|
|
164
|
-
add: "--dry-run"
|
|
165
|
-
}];
|
|
166
|
-
/** The rename that matches `flag` (as typed, before any `=`) on `command`. */
|
|
167
|
-
function flagRename(command, flag) {
|
|
168
|
-
return FLAG_RENAMES.find((rename) => rename.from === flag && rename.commands.includes(command));
|
|
169
|
-
}
|
|
170
|
-
function renameMessage(command, rename) {
|
|
171
|
-
const replacement = rename.hint ?? rename.to;
|
|
172
|
-
return replacement === void 0 ? `${command}: ${rename.from} was removed in 0.5.0.` : rename.to === void 0 ? `${command}: ${rename.from} was removed in 0.5.0: ${replacement}.` : `${command}: ${rename.from} is ${replacement} since 0.5.0.`;
|
|
173
|
-
}
|
|
174
|
-
//#endregion
|
|
175
|
-
export { renameMessage as i, DEFAULT_CHANGES as n, flagRename as r, COMMAND_MOVES as t };
|
package/dist/run-DlQYPtPv.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as run } from "./run-D5WIJfs7.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { i as runSupabase } from "./supabase-hook-HPgwYb9V.js";
|
package/dist/usage-D3KJyaNS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as runUsage } from "./usage-e6M1Mls1.js";
|
package/dist/watch-CuPz0D2M.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { i as watchCollect } from "./watch-DAkjm75Y.js";
|