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
package/dist/a2a/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as Policy, _r as Principal, lr as AuthorizationDetail } from "../policy-types-IRJVABmm.js";
|
|
2
2
|
import { u as Permission } from "../permission-types-CAY-GU7e.js";
|
|
3
|
-
import { m as ApprovalStore } from "../types-
|
|
4
|
-
import { a as ProblemDetails } from "../errors-
|
|
5
|
-
import { t as InstanceOptions } from "../instance-options-
|
|
3
|
+
import { m as ApprovalStore } from "../types-BvBbkAu1.js";
|
|
4
|
+
import { a as ProblemDetails } from "../errors-Dc9FdamT.js";
|
|
5
|
+
import { t as InstanceOptions } from "../instance-options-BOCRxEFb.js";
|
|
6
6
|
//#region src/a2a/types.d.ts
|
|
7
7
|
type A2aAuth = {
|
|
8
8
|
readonly clientId?: string;
|
package/dist/a2a/index.js
CHANGED
|
@@ -5,10 +5,10 @@ import { n as PermDockDeniedError, t as PermDockApprovalRequiredError } from "..
|
|
|
5
5
|
import { t as canonicalJson } from "../canonical-json-DwilZ1iB.js";
|
|
6
6
|
import { t as bytesToBase64Url } from "../sha256-C-4WXKIu.js";
|
|
7
7
|
import { n as resourceRef } from "../resource-ref-CaS9yVPi.js";
|
|
8
|
-
import { i as challengeScope, l as withApp, o as hasScope, s as scopesReaching } from "../permdock-
|
|
8
|
+
import { i as challengeScope, l as withApp, o as hasScope, s as scopesReaching } from "../permdock-DdzMv5-F.js";
|
|
9
9
|
import { p as wwwAuthenticate, r as bearerChallenge } from "../problem-BVLHFK33.js";
|
|
10
|
-
import { r as instanceOptions } from "../build-instance-
|
|
11
|
-
import { n as createAgentKernel } from "../kernel-
|
|
10
|
+
import { r as instanceOptions } from "../build-instance-lye7oEqf.js";
|
|
11
|
+
import { n as createAgentKernel } from "../kernel-CDDU93dI.js";
|
|
12
12
|
import { t as delegationFrom } from "../delegation-input-FTxMK3ji.js";
|
|
13
13
|
//#region src/a2a/create.ts
|
|
14
14
|
function firstScheme(options) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as listSourceFiles } from "./files-BSjrtIHw.js";
|
|
2
|
-
import { t as DOCS_BASE } from "./manifest-
|
|
2
|
+
import { t as DOCS_BASE } from "./manifest-Dij1U0hx.js";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { relative } from "node:path";
|
|
5
5
|
//#region src/cli/adoption-scan.ts
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as DeniedTextEvent, t as DeniedText } from "../denied-text-
|
|
2
|
-
import { a as createPermDock, c as ModelMap, d as StepUp, i as OperationVerdict, l as ToolBinding, n as AgentPermDockOptions, o as AgentAdapterOptions, r as GatewayOptions, s as DecideToolOptions, t as AgentPermDock, u as ToolMap } from "../create-
|
|
1
|
+
import { n as DeniedTextEvent, t as DeniedText } from "../denied-text-DyzWwxEB.js";
|
|
2
|
+
import { a as createPermDock, c as ModelMap, d as StepUp, i as OperationVerdict, l as ToolBinding, n as AgentPermDockOptions, o as AgentAdapterOptions, r as GatewayOptions, s as DecideToolOptions, t as AgentPermDock, u as ToolMap } from "../create-bzQlBzG4.js";
|
|
3
3
|
export { type AgentAdapterOptions, type AgentPermDock, type AgentPermDockOptions, type DecideToolOptions, type DeniedText, type DeniedTextEvent, type GatewayOptions, type ModelMap, type OperationVerdict, type StepUp, type ToolBinding, type ToolMap, createPermDock };
|
package/dist/agent/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as createPermDock } from "../create-
|
|
1
|
+
export { n as createPermDock } from "../create-gqtDb1nU.js";
|
package/dist/ai-sdk/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as Policy, M as PolicyVocabulary, _r as Principal } from "../policy-types-IRJVABmm.js";
|
|
2
2
|
import { u as Permission } from "../permission-types-CAY-GU7e.js";
|
|
3
|
-
import { n as DeniedTextEvent, t as DeniedText } from "../denied-text-
|
|
4
|
-
import { d as StepUp, o as AgentAdapterOptions, t as AgentPermDock } from "../create-
|
|
3
|
+
import { n as DeniedTextEvent, t as DeniedText } from "../denied-text-DyzWwxEB.js";
|
|
4
|
+
import { d as StepUp, o as AgentAdapterOptions, t as AgentPermDock } from "../create-bzQlBzG4.js";
|
|
5
5
|
//#region src/ai-sdk/create.d.ts
|
|
6
6
|
type AiSdkContext = {
|
|
7
7
|
readonly runtimeContext?: unknown;
|
package/dist/ai-sdk/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as compact } from "../compact-CAf557ZB.js";
|
|
2
2
|
import { n as PermDockDeniedError, t as PermDockApprovalRequiredError } from "../errors-B6R_lg2a.js";
|
|
3
|
-
import { l as withApp } from "../permdock-
|
|
4
|
-
import { r as stepUpText, t as approvalTokenOf } from "../kernel-
|
|
5
|
-
import { t as agentRuntime } from "../create-
|
|
3
|
+
import { l as withApp } from "../permdock-DdzMv5-F.js";
|
|
4
|
+
import { r as stepUpText, t as approvalTokenOf } from "../kernel-CDDU93dI.js";
|
|
5
|
+
import { t as agentRuntime } from "../create-gqtDb1nU.js";
|
|
6
6
|
//#region src/ai-sdk/create.ts
|
|
7
7
|
const APPROVAL_STATUSES = /* @__PURE__ */ new Set([
|
|
8
8
|
"approved",
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { n as isReadonlyArray, t as compact } from "./compact-CAf557ZB.js";
|
|
2
|
+
import { a as flattenApprovers, c as isManagerApprover, d as manager, f as user, l as isPermissionApprover, r as approverLeaves, s as isAnyOfInput, u as isUserApprover } from "./approvers-CNtl4Vc5.js";
|
|
3
|
+
import { d as isSelfParented } from "./resource-relations-8-pCScBO.js";
|
|
4
|
+
import { r as assertDuration } from "./time-nR1JesoH.js";
|
|
5
|
+
import { a as authenticated, r as asGrantee } from "./grantee-Dke-9rd1.js";
|
|
6
|
+
//#region src/core/approval-normalize.ts
|
|
7
|
+
/**
|
|
8
|
+
* Every approver a requirement names: `by`, each stage and its escalation, and
|
|
9
|
+
* `escalation.to`, inside `anyOf` groups too.
|
|
10
|
+
*/
|
|
11
|
+
function approversOf(requirement) {
|
|
12
|
+
return [
|
|
13
|
+
...approverLeaves(requirement.by),
|
|
14
|
+
...(requirement.stages ?? []).flatMap((stage) => approverLeaves(stage.by).concat(approverLeaves(stage.escalation?.to))),
|
|
15
|
+
...approverLeaves(requirement.escalation?.to)
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
function asApprover(input) {
|
|
19
|
+
if (isPermissionApprover(input)) {
|
|
20
|
+
if (typeof input.permission !== "string" || input.permission === "") throw new Error("PermDock: a permission approver needs a permission key");
|
|
21
|
+
return Object.freeze({
|
|
22
|
+
kind: "permission",
|
|
23
|
+
permission: input.permission
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
if (isManagerApprover(input)) return manager(input.levels === void 0 ? {} : { levels: input.levels });
|
|
27
|
+
if (isAnyOfInput(input)) {
|
|
28
|
+
if (!Array.isArray(input.of) || input.of.length === 0) throw new Error("PermDock: anyOf() needs at least one approver");
|
|
29
|
+
const of = input.of.map((item) => {
|
|
30
|
+
const normalized = asApprover(item);
|
|
31
|
+
const items = flattenApprovers(normalized);
|
|
32
|
+
if (items.length === 0) throw new Error("PermDock: an anyOf() item names no approver");
|
|
33
|
+
const [first] = items;
|
|
34
|
+
return isReadonlyArray(normalized) || first === void 0 ? items : first;
|
|
35
|
+
});
|
|
36
|
+
return Object.freeze({
|
|
37
|
+
kind: "any-of",
|
|
38
|
+
of: Object.freeze(of)
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
if (isReadonlyArray(input)) {
|
|
42
|
+
const items = [];
|
|
43
|
+
for (const item of input) items.push(...flattenApprovers(asApprover(item)));
|
|
44
|
+
return items;
|
|
45
|
+
}
|
|
46
|
+
if (isUserApprover(input)) return user(input.id);
|
|
47
|
+
return asGrantee(input);
|
|
48
|
+
}
|
|
49
|
+
function normalizeApproval(approval, permission) {
|
|
50
|
+
if (approval === void 0) return;
|
|
51
|
+
if (approval === "human") return "human";
|
|
52
|
+
if (approval.staleOn !== void 0 && approval.staleOn !== "resource-change") throw new Error(`PermDock: approval staleOn must be 'resource-change', got '${String(approval.staleOn)}'`);
|
|
53
|
+
const label = permission ?? "a grant";
|
|
54
|
+
assertQuorum(approval.quorum, "approval.quorum", label);
|
|
55
|
+
if (approval.ttl !== void 0) assertDuration(approval.ttl, `approval.ttl on '${label}'`);
|
|
56
|
+
const escalation = normalizeEscalation(approval.escalation, label);
|
|
57
|
+
const mode = approvalMode(approval.mode, label);
|
|
58
|
+
const combine = approval.combine ?? "any";
|
|
59
|
+
if (combine !== "any") return compact({
|
|
60
|
+
combine,
|
|
61
|
+
stages: normalizeStages(approval, combine, label),
|
|
62
|
+
mode,
|
|
63
|
+
staleOn: approval.staleOn,
|
|
64
|
+
ttl: approval.ttl,
|
|
65
|
+
escalation
|
|
66
|
+
});
|
|
67
|
+
if (approval.stages !== void 0) throw new Error(`PermDock: approval.stages on '${label}' needs combine: 'all' or 'sequential'`);
|
|
68
|
+
const by = approval.by === void 0 ? void 0 : asApprover(approval.by);
|
|
69
|
+
if (by === void 0 && mode === void 0 && approval.staleOn === void 0 && approval.quorum === void 0 && approval.ttl === void 0 && escalation === void 0) return "human";
|
|
70
|
+
return compact({
|
|
71
|
+
by: by ?? authenticated(),
|
|
72
|
+
mode,
|
|
73
|
+
staleOn: approval.staleOn,
|
|
74
|
+
quorum: approval.quorum,
|
|
75
|
+
ttl: approval.ttl,
|
|
76
|
+
escalation
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function assertQuorum(quorum, name, label) {
|
|
80
|
+
if (quorum !== void 0 && (!Number.isInteger(quorum) || quorum < 1)) throw new Error(`PermDock: ${name} on '${label}' must be an integer of at least 1, got ${String(quorum)}`);
|
|
81
|
+
}
|
|
82
|
+
const LEGACY_COMBINE = /* @__PURE__ */ new Set([
|
|
83
|
+
"any",
|
|
84
|
+
"all",
|
|
85
|
+
"sequential"
|
|
86
|
+
]);
|
|
87
|
+
/**
|
|
88
|
+
* An approval as a v1 record holds it. Records written before 0.17 carry the
|
|
89
|
+
* combinator in `mode` and `distinct: false` for `'confirm'`; both read as the
|
|
90
|
+
* current names.
|
|
91
|
+
*/
|
|
92
|
+
function readWireApproval(value) {
|
|
93
|
+
if (typeof value !== "object" || value === null) return value;
|
|
94
|
+
const mode = Reflect.get(value, "mode");
|
|
95
|
+
const distinct = Reflect.get(value, "distinct");
|
|
96
|
+
if (!LEGACY_COMBINE.has(mode) && typeof distinct !== "boolean") return value;
|
|
97
|
+
const next = {};
|
|
98
|
+
for (const [key, item] of Object.entries(value)) if (key !== "mode" && !(key === "distinct" && typeof item === "boolean")) next[key] = item;
|
|
99
|
+
if (LEGACY_COMBINE.has(mode)) next["combine"] = mode;
|
|
100
|
+
else if (mode !== void 0) next["mode"] = mode;
|
|
101
|
+
if (distinct === false) next["mode"] = "confirm";
|
|
102
|
+
return Object.freeze(next);
|
|
103
|
+
}
|
|
104
|
+
/** `'authorize'` is the default, so it is stored as absent. */
|
|
105
|
+
function approvalMode(mode, label) {
|
|
106
|
+
if (mode === void 0 || mode === "authorize") return;
|
|
107
|
+
if (mode !== "confirm") throw new Error(`PermDock: approval.mode on '${label}' must be 'confirm' or 'authorize', got '${String(mode)}'`);
|
|
108
|
+
return mode;
|
|
109
|
+
}
|
|
110
|
+
function normalizeStages(approval, combine, label) {
|
|
111
|
+
if (combine !== "all" && combine !== "sequential") throw new Error(`PermDock: approval.combine on '${label}' must be 'any', 'all' or 'sequential', got '${combine}'`);
|
|
112
|
+
if (approval.by !== void 0 || approval.quorum !== void 0) throw new Error(`PermDock: approval on '${label}' sets combine '${combine}': put by and quorum on each stage`);
|
|
113
|
+
const stages = approval.stages ?? [];
|
|
114
|
+
if (stages.length === 0) throw new Error(`PermDock: approval combine '${combine}' on '${label}' needs at least one stage`);
|
|
115
|
+
return stages.map((stage, index) => {
|
|
116
|
+
assertQuorum(stage.quorum, `approval.stages[${index}].quorum`, label);
|
|
117
|
+
const by = asApprover(stage.by);
|
|
118
|
+
if (flattenApprovers(by).length === 0) throw new Error(`PermDock: approval.stages[${index}].by on '${label}' names no approver`);
|
|
119
|
+
return compact({
|
|
120
|
+
by,
|
|
121
|
+
quorum: stage.quorum,
|
|
122
|
+
escalation: normalizeEscalation(stage.escalation, label)
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function normalizeEscalation(escalation, label) {
|
|
127
|
+
if (escalation === void 0) return;
|
|
128
|
+
assertDuration(escalation.after, `approval.escalation.after on '${label}'`);
|
|
129
|
+
return {
|
|
130
|
+
after: escalation.after,
|
|
131
|
+
to: asApprover(escalation.to)
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* A role with `activation` is eligible-only: it needs a positive `maxDuration`
|
|
136
|
+
* (Doctor PD033 warns without one). `justification` defaults to `'optional'`.
|
|
137
|
+
*/
|
|
138
|
+
function activationApproval(option, roleName) {
|
|
139
|
+
const label = `activation of '${roleName}'`;
|
|
140
|
+
const approval = normalizeApproval(option, label);
|
|
141
|
+
if (approval !== void 0 && approval !== "human" && approversOf(approval).some((item) => item.kind === "relation")) throw new Error(`PermDock: approval on ${label} names a relation; an activation has no row to read it on`);
|
|
142
|
+
return approval;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* A stale-on-change approval needs a row to version: an instance permission
|
|
146
|
+
* whose resource declares `version`.
|
|
147
|
+
*/
|
|
148
|
+
function assertApprovalVersions(grants, resources) {
|
|
149
|
+
for (const grant of grants) {
|
|
150
|
+
const approval = grant.approval;
|
|
151
|
+
if (approval === void 0 || approval === "human" || approval.staleOn === void 0) continue;
|
|
152
|
+
if (grant.permission.kind !== "instance") throw new Error(`PermDock: approval staleOn on '${grant.permission.key}' needs an instance action; a collection action has no row to version`);
|
|
153
|
+
if (resources.get(grant.permission.resource)?.version === void 0) throw new Error(`PermDock: approval staleOn on '${grant.permission.key}' needs resource(..., { version: '<field>' }) on '${grant.permission.resource}'`);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* A relation approver is checked by id, from the requested row: the relation
|
|
158
|
+
* lives on the permission's own resource (optionally up its parent chain), or
|
|
159
|
+
* at the end of a list of links from it.
|
|
160
|
+
*/
|
|
161
|
+
function assertApprovalRelations(grants, resources) {
|
|
162
|
+
for (const grant of grants) {
|
|
163
|
+
const approval = grant.approval;
|
|
164
|
+
if (approval === void 0 || approval === "human") continue;
|
|
165
|
+
for (const item of approversOf(approval)) {
|
|
166
|
+
if (item.kind !== "relation") continue;
|
|
167
|
+
const label = `${grant.permission.key}: approver relation '${item.relation}'`;
|
|
168
|
+
if (grant.permission.kind !== "instance") throw new Error(`PermDock: ${label} needs an instance action; a collection action has no row to read it on`);
|
|
169
|
+
if (approverRelationResource(grant.permission.resource, item.through, resources) !== item.resource) throw new Error(`PermDock: ${label} must live on '${grant.permission.resource}' or at the end of its through links`);
|
|
170
|
+
if (resources.get(item.resource)?.relations[item.relation] === void 0) throw new Error(`PermDock: ${label} is not declared on '${item.resource}'`);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* The resource a relation approver's `through` reaches from `start`, or
|
|
176
|
+
* `undefined`.
|
|
177
|
+
*/
|
|
178
|
+
function approverRelationResource(start, through, resources) {
|
|
179
|
+
if (through === void 0) return start;
|
|
180
|
+
if (through === "parent") return isSelfParented(resources.get(start)) ? start : void 0;
|
|
181
|
+
let current = start;
|
|
182
|
+
for (const name of through) {
|
|
183
|
+
const node = current === void 0 ? void 0 : resources.get(current);
|
|
184
|
+
current = node !== void 0 && Object.hasOwn(node.links, name) ? node.links[name]?.resource : void 0;
|
|
185
|
+
}
|
|
186
|
+
return current;
|
|
187
|
+
}
|
|
188
|
+
//#endregion
|
|
189
|
+
export { normalizeApproval as a, assertApprovalVersions as i, asApprover as n, readWireApproval as o, assertApprovalRelations as r, activationApproval as t };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { E as Policy, a as ApprovalOption, an as AuthEvent, bn as Scope, g as Grant, wr as Condition, yr as Subject } from "./policy-types-IRJVABmm.js";
|
|
2
|
+
import { i as OperationEffect, s as OperationMeta, u as OperationRisk } from "./operations-Ci_rT6Uo.js";
|
|
3
|
+
//#region src/core/approval-policies.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* One approval requirement kept as data, for a tenant or the whole platform. It
|
|
6
|
+
* adds to what the code requires and never removes a requirement.
|
|
7
|
+
*/
|
|
8
|
+
type ApprovalPolicy = {
|
|
9
|
+
/**
|
|
10
|
+
* The permission key; a former key from `renamed` resolves. Absent: every
|
|
11
|
+
* permission, which needs `risk` or `effects`.
|
|
12
|
+
*/
|
|
13
|
+
readonly permission?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Matches an operation call whose `meta.risk` is one of these; a call that
|
|
16
|
+
* names no operation never matches.
|
|
17
|
+
*/
|
|
18
|
+
readonly risk?: readonly OperationRisk[];
|
|
19
|
+
/**
|
|
20
|
+
* Matches an operation call whose `meta.effects` includes one of these; a
|
|
21
|
+
* call that names no operation never matches.
|
|
22
|
+
*/
|
|
23
|
+
readonly effects?: readonly OperationEffect[];
|
|
24
|
+
/** Absent: every tenant. */
|
|
25
|
+
readonly tenant?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Actor kinds it applies to (`['agent']`); absent: every call. A call without
|
|
28
|
+
* an actor never matches a list.
|
|
29
|
+
*/
|
|
30
|
+
readonly actors?: readonly string[];
|
|
31
|
+
/**
|
|
32
|
+
* A portable condition over the row; instance permissions only, since a
|
|
33
|
+
* collection action has no row.
|
|
34
|
+
*/
|
|
35
|
+
readonly where?: Condition;
|
|
36
|
+
/** A portable condition over the call's input (the proposed row). */
|
|
37
|
+
readonly check?: Condition;
|
|
38
|
+
/**
|
|
39
|
+
* The same shape as `allow(..., { approval })`. An `escalation` here widens
|
|
40
|
+
* only this entry's stages, never the code's.
|
|
41
|
+
*/
|
|
42
|
+
readonly approval: ApprovalOption;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Data-driven approval requirements, a subject input like `CustomRoleSource`:
|
|
46
|
+
* read once per instance for the subject's tenants (entries without a tenant
|
|
47
|
+
* always apply). A throw, a rejected promise or an invalid entry denies every
|
|
48
|
+
* call an allow would otherwise permit.
|
|
49
|
+
*/
|
|
50
|
+
type ApprovalPolicySource = {
|
|
51
|
+
/** Names the implementation in errors and events. */
|
|
52
|
+
readonly name?: string;
|
|
53
|
+
approvalPoliciesFor: (query: {
|
|
54
|
+
readonly tenants: readonly string[];
|
|
55
|
+
}) => readonly ApprovalPolicy[] | Promise<readonly ApprovalPolicy[]>;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The denial detail when an `ApprovalPolicySource` fails: every call an allow
|
|
59
|
+
* would grant denies with reason `approval`.
|
|
60
|
+
*/
|
|
61
|
+
/**
|
|
62
|
+
* The in-process `ApprovalPolicySource`, usable directly as the
|
|
63
|
+
* `approvalPolicies` option: it is the source and its feature at once.
|
|
64
|
+
*/
|
|
65
|
+
declare function memoryApprovalPolicySource(policies: readonly ApprovalPolicy[]): ApprovalPolicySource & ApprovalPolicies;
|
|
66
|
+
/** An entry checked against the policy and ready to match. */
|
|
67
|
+
type LoadedApprovalPolicy = {
|
|
68
|
+
readonly permission?: string;
|
|
69
|
+
readonly risk?: ReadonlySet<OperationRisk>;
|
|
70
|
+
readonly effects?: ReadonlySet<OperationEffect>;
|
|
71
|
+
readonly tenant?: string;
|
|
72
|
+
readonly actors?: ReadonlySet<string>;
|
|
73
|
+
readonly where?: Condition;
|
|
74
|
+
readonly check?: Condition;
|
|
75
|
+
readonly approval: NonNullable<Grant["approval"]>;
|
|
76
|
+
};
|
|
77
|
+
/** `"failed"`: the source threw or returned something that cannot be applied. */
|
|
78
|
+
/** What `tightenApproval` reads besides the code's approval. */
|
|
79
|
+
type TightenInput = Parameters<typeof tightenApproval>[2];
|
|
80
|
+
/**
|
|
81
|
+
* Approval policies loaded for an instance: the tightening the evaluator
|
|
82
|
+
* applies to each allow, or `"failed"` when the source threw or returned an
|
|
83
|
+
* invalid entry (every allow then denies).
|
|
84
|
+
*/
|
|
85
|
+
type LoadedApprovalPolicies = {
|
|
86
|
+
readonly tighten: (code: Grant["approval"], input: TightenInput) => Grant["approval"];
|
|
87
|
+
} | "failed";
|
|
88
|
+
/**
|
|
89
|
+
* Approval policies kept as data, as an instance option: `approvalPolicies:
|
|
90
|
+
* approvalPolicies(source)`. The loading and tightening code ships only with an
|
|
91
|
+
* app that imports this function.
|
|
92
|
+
*/
|
|
93
|
+
type ApprovalPolicies = {
|
|
94
|
+
readonly feature: "approval-policies";
|
|
95
|
+
readonly load: (policy: Policy, tenants: readonly string[], auth: AuthEvent[]) => LoadedApprovalPolicies | Promise<LoadedApprovalPolicies>;
|
|
96
|
+
};
|
|
97
|
+
declare function approvalPolicies(source: ApprovalPolicySource): ApprovalPolicies;
|
|
98
|
+
/**
|
|
99
|
+
* Why an `ApprovalPolicy` entry does not load. `unknown-permission`: the policy
|
|
100
|
+
* declares no such key (the entry applies to nothing). `invalid`: a field has
|
|
101
|
+
* the wrong shape or the approval option does not normalise.
|
|
102
|
+
* `where-on-collection`: `where` reads a row, which a collection action never
|
|
103
|
+
* has, so the entry could never match; use `check` over the input.
|
|
104
|
+
* `stale-on-without-version`: `staleOn` needs an instance permission whose
|
|
105
|
+
* resource declares `version`.
|
|
106
|
+
*/
|
|
107
|
+
type ApprovalPolicyProblem = "unknown-permission" | "invalid" | "where-on-collection" | "stale-on-without-version";
|
|
108
|
+
type ApprovalPolicyValidation = {
|
|
109
|
+
readonly ok: true;
|
|
110
|
+
} | {
|
|
111
|
+
readonly ok: false;
|
|
112
|
+
readonly problem: ApprovalPolicyProblem;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Checks one entry against the policy the way `approvalPoliciesFor` loads it,
|
|
116
|
+
* for an application to refuse a bad entry when it is saved instead of finding
|
|
117
|
+
* every call denied. Never throws.
|
|
118
|
+
*/
|
|
119
|
+
declare function validateApprovalPolicy(policy: Policy, entry: unknown): ApprovalPolicyValidation;
|
|
120
|
+
/**
|
|
121
|
+
* `code` with every matching entry added as further stages: the result needs
|
|
122
|
+
* all of them (`'sequential'` when any part is ordered), keeps the code's
|
|
123
|
+
* escalation, the shortest `ttl`, and `'authorize'` unless every part is
|
|
124
|
+
* `'confirm'`. Without a matching entry, `code` unchanged.
|
|
125
|
+
*/
|
|
126
|
+
declare function tightenApproval(code: Grant["approval"], entries: readonly LoadedApprovalPolicy[], input: {
|
|
127
|
+
readonly permission: string;
|
|
128
|
+
readonly tenant: string | undefined;
|
|
129
|
+
readonly subject: Subject;
|
|
130
|
+
readonly current: unknown;
|
|
131
|
+
readonly next: unknown;
|
|
132
|
+
readonly now: number;
|
|
133
|
+
readonly scopes: readonly Scope[];
|
|
134
|
+
/** The meta of the operation the call decides, when it names one. */
|
|
135
|
+
readonly operation?: OperationMeta | undefined;
|
|
136
|
+
}): Grant["approval"];
|
|
137
|
+
//#endregion
|
|
138
|
+
export { ApprovalPolicyValidation as a, validateApprovalPolicy as c, ApprovalPolicySource as i, ApprovalPolicy as n, approvalPolicies as o, ApprovalPolicyProblem as r, memoryApprovalPolicySource as s, ApprovalPolicies as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as OperationMeta, t as Operation } from "./operations-Ci_rT6Uo.js";
|
|
2
|
-
import { u as ApprovalRequest } from "./types-
|
|
2
|
+
import { u as ApprovalRequest } from "./types-BvBbkAu1.js";
|
|
3
3
|
//#region src/delivery/approval-prompt.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* What an email or chat prompt shows an approver, wire format v1. It carries no
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { _ as DEFAULT_APPROVAL_TTL, a as ApprovalDelegationSource, b as escalationOpenAt, c as ApprovalListQuery, d as ApprovalResumeFailureCause, f as ApprovalSignature, g as ApprovalVerdict, h as ApprovalSubjectSummary, i as ApprovalDelegation, l as ApprovalPage, m as ApprovalStore, n as ApprovalApprovers, o as ApprovalInspectResult, p as ApprovalStatus, r as ApprovalCancelMeta, s as ApprovalListFilter, t as APPROVAL_HEADER, u as ApprovalRequest, v as approvalQuorum, y as approverRelationKey } from "../types-
|
|
1
|
+
import { _ as DEFAULT_APPROVAL_TTL, a as ApprovalDelegationSource, b as escalationOpenAt, c as ApprovalListQuery, d as ApprovalResumeFailureCause, f as ApprovalSignature, g as ApprovalVerdict, h as ApprovalSubjectSummary, i as ApprovalDelegation, l as ApprovalPage, m as ApprovalStore, n as ApprovalApprovers, o as ApprovalInspectResult, p as ApprovalStatus, r as ApprovalCancelMeta, s as ApprovalListFilter, t as APPROVAL_HEADER, u as ApprovalRequest, v as approvalQuorum, y as approverRelationKey } from "../types-BvBbkAu1.js";
|
|
2
2
|
import { n as ApprovalErrorCode, r as isApprovalError, t as ApprovalError } from "../errors-CHwoRRpB.js";
|
|
3
|
-
import { a as AccessReviewItemQuery, c as AccessReviewStore, i as AccessReviewItemPage, n as AccessReviewDecision, o as AccessReviewItemStatus, r as AccessReviewItem, s as AccessReviewStatus, t as AccessReview } from "../types-
|
|
4
|
-
import { $ as AccessReviewHolder, A as SignApprovalOptions, B as IdempotentResponse, C as ApproverRelationsOptions, D as approvalView, E as approvalEntityTag, F as ApprovalsHandlerOptions, G as ApprovalDelegationMatch, H as idempotencyRecordKey, I as approvalsHandler, J as memoryApprovalDelegationSource, K as MatchDelegationOptions, L as IdempotencyRecord, M as signApproval, N as APPROVAL_REQUEST_SCHEMA, O as ApprovalSignatureClaims, P as parseApprovalRequest, Q as pageAccessReviewItems, R as IdempotencyStore, S as vouchApproval, T as ApprovalView, U as matchesIdempotencyRecord, V as idempotencyRecord, W as memoryIdempotencyStore, X as MemoryAccessReviewStore, Y as parseApprovalDelegation, Z as memoryAccessReviewStore, _ as resolveApproval, a as approverPermissions, at as isAccessReviewError, b as storedApprovalToken, c as decodeApprovalCursor, ct as decideAccessReviewItem, d as pageApprovals, et as AccessReviewOptions, f as cancelApprovals, g as requestApproval, h as readApprovalHeader, i as memoryApprovalStore, it as AccessReviewErrorCode, j as approvalSignatureClaims, k as ApprovalSignatureEntry, l as encodeApprovalCursor, lt as AccessReviewsHandlerOptions, m as inspectApproval, n as applyApprovalVerdict, nt as startAccessReview, o as ApprovalCursorPosition, ot as AccessReviewVerdict, p as consumeApproval, q as matchDelegation, r as assertApprover, rt as AccessReviewError, s as approvalPageSize, st as accessReviewerEligible, t as MemoryApprovalStore, tt as StartAccessReviewInput, u as listAllApprovals, ut as accessReviewsHandler, v as resumeDecision, w as approverRelations, x as summarizeSubject, y as resumeFromHeader, z as IdempotentCall } from "../index-
|
|
5
|
-
|
|
3
|
+
import { a as AccessReviewItemQuery, c as AccessReviewStore, i as AccessReviewItemPage, n as AccessReviewDecision, o as AccessReviewItemStatus, r as AccessReviewItem, s as AccessReviewStatus, t as AccessReview } from "../types-AOP5HQku.js";
|
|
4
|
+
import { $ as AccessReviewHolder, A as SignApprovalOptions, B as IdempotentResponse, C as ApproverRelationsOptions, D as approvalView, E as approvalEntityTag, F as ApprovalsHandlerOptions, G as ApprovalDelegationMatch, H as idempotencyRecordKey, I as approvalsHandler, J as memoryApprovalDelegationSource, K as MatchDelegationOptions, L as IdempotencyRecord, M as signApproval, N as APPROVAL_REQUEST_SCHEMA, O as ApprovalSignatureClaims, P as parseApprovalRequest, Q as pageAccessReviewItems, R as IdempotencyStore, S as vouchApproval, T as ApprovalView, U as matchesIdempotencyRecord, V as idempotencyRecord, W as memoryIdempotencyStore, X as MemoryAccessReviewStore, Y as parseApprovalDelegation, Z as memoryAccessReviewStore, _ as resolveApproval, a as approverPermissions, at as isAccessReviewError, b as storedApprovalToken, c as decodeApprovalCursor, ct as decideAccessReviewItem, d as pageApprovals, et as AccessReviewOptions, f as cancelApprovals, g as requestApproval, h as readApprovalHeader, i as memoryApprovalStore, it as AccessReviewErrorCode, j as approvalSignatureClaims, k as ApprovalSignatureEntry, l as encodeApprovalCursor, lt as AccessReviewsHandlerOptions, m as inspectApproval, n as applyApprovalVerdict, nt as startAccessReview, o as ApprovalCursorPosition, ot as AccessReviewVerdict, p as consumeApproval, q as matchDelegation, r as assertApprover, rt as AccessReviewError, s as approvalPageSize, st as accessReviewerEligible, t as MemoryApprovalStore, tt as StartAccessReviewInput, u as listAllApprovals, ut as accessReviewsHandler, v as resumeDecision, w as approverRelations, x as summarizeSubject, y as resumeFromHeader, z as IdempotentCall } from "../index-CXXUFWtG.js";
|
|
5
|
+
import { t as approvalFingerprint } from "../token-D6pWn8Uj.js";
|
|
6
|
+
export { APPROVAL_HEADER, APPROVAL_REQUEST_SCHEMA, type AccessReview, type AccessReviewDecision, AccessReviewError, type AccessReviewErrorCode, type AccessReviewHolder, type AccessReviewItem, type AccessReviewItemPage, type AccessReviewItemQuery, type AccessReviewItemStatus, type AccessReviewOptions, type AccessReviewStatus, type AccessReviewStore, type AccessReviewVerdict, type AccessReviewsHandlerOptions, type ApprovalApprovers, type ApprovalCancelMeta, type ApprovalCursorPosition, type ApprovalDelegation, type ApprovalDelegationMatch, type ApprovalDelegationSource, ApprovalError, type ApprovalErrorCode, type ApprovalInspectResult, type ApprovalListFilter, type ApprovalListQuery, type ApprovalPage, type ApprovalRequest, type ApprovalResumeFailureCause, type ApprovalSignature, type ApprovalSignatureClaims, type ApprovalSignatureEntry, type ApprovalStatus, type ApprovalStore, type ApprovalSubjectSummary, type ApprovalVerdict, type ApprovalView, type ApprovalsHandlerOptions, type ApproverRelationsOptions, DEFAULT_APPROVAL_TTL, type IdempotencyRecord, type IdempotencyStore, type IdempotentCall, type IdempotentResponse, type MatchDelegationOptions, type MemoryAccessReviewStore, type MemoryApprovalStore, type SignApprovalOptions, type StartAccessReviewInput, accessReviewerEligible, accessReviewsHandler, applyApprovalVerdict, approvalEntityTag, approvalFingerprint, approvalPageSize, approvalQuorum, approvalSignatureClaims, approvalView, approvalsHandler, approverPermissions, approverRelationKey, approverRelations, assertApprover, cancelApprovals, consumeApproval, decideAccessReviewItem, decodeApprovalCursor, encodeApprovalCursor, escalationOpenAt, idempotencyRecord, idempotencyRecordKey, inspectApproval, isAccessReviewError, isApprovalError, listAllApprovals, matchDelegation, matchesIdempotencyRecord, memoryAccessReviewStore, memoryApprovalDelegationSource, memoryApprovalStore, memoryIdempotencyStore, pageAccessReviewItems, pageApprovals, parseApprovalDelegation, parseApprovalRequest, readApprovalHeader, requestApproval, resolveApproval, resumeDecision, resumeFromHeader, signApproval, startAccessReview, storedApprovalToken, summarizeSubject, vouchApproval };
|
package/dist/approvals/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { t as approvalFingerprint } from "../token-DaMnIU9O.js";
|
|
1
2
|
import { a as escalationOpenAt, c as isApprovalError, i as approverRelationKey, n as DEFAULT_APPROVAL_TTL, r as approvalQuorum, s as ApprovalError, t as APPROVAL_HEADER } from "../types-CcUXciSj.js";
|
|
2
|
-
import { c as decodeApprovalCursor, d as pageApprovals, i as memoryApprovalStore, l as encodeApprovalCursor, n as assertApprover, s as approvalPageSize, t as applyApprovalVerdict, u as listAllApprovals } from "../store-
|
|
3
|
-
import { a as requestApproval, c as resumeFromHeader, d as vouchApproval, f as approverPermissions, i as readApprovalHeader, l as storedApprovalToken, m as approverRelations, n as consumeApproval, o as resolveApproval, r as inspectApproval, s as resumeDecision, t as cancelApprovals, u as summarizeSubject } from "../helpers-
|
|
3
|
+
import { c as decodeApprovalCursor, d as pageApprovals, i as memoryApprovalStore, l as encodeApprovalCursor, n as assertApprover, s as approvalPageSize, t as applyApprovalVerdict, u as listAllApprovals } from "../store-XgBMbfDy.js";
|
|
4
|
+
import { a as requestApproval, c as resumeFromHeader, d as vouchApproval, f as approverPermissions, i as readApprovalHeader, l as storedApprovalToken, m as approverRelations, n as consumeApproval, o as resolveApproval, r as inspectApproval, s as resumeDecision, t as cancelApprovals, u as summarizeSubject } from "../helpers-DNnZffrI.js";
|
|
4
5
|
import { n as isAccessReviewError, t as AccessReviewError } from "../errors-BDUwg2qC.js";
|
|
5
|
-
import { _ as accessReviewerEligible, a as idempotencyRecordKey, c as approvalEntityTag, d as memoryApprovalDelegationSource, f as parseApprovalDelegation, g as accessReviewsHandler, h as startAccessReview, i as idempotencyRecord, l as approvalView, m as pageAccessReviewItems, n as approvalSignatureClaims, o as matchesIdempotencyRecord, p as memoryAccessReviewStore, r as signApproval, s as memoryIdempotencyStore, t as approvalsHandler, u as matchDelegation, v as decideAccessReviewItem } from "../approvals-
|
|
6
|
-
import { t as APPROVAL_REQUEST_SCHEMA } from "../request-schema-
|
|
7
|
-
import { t as parseApprovalRequest } from "../parse-request-
|
|
8
|
-
export { APPROVAL_HEADER, APPROVAL_REQUEST_SCHEMA, AccessReviewError, ApprovalError, DEFAULT_APPROVAL_TTL, accessReviewerEligible, accessReviewsHandler, applyApprovalVerdict, approvalEntityTag, approvalPageSize, approvalQuorum, approvalSignatureClaims, approvalView, approvalsHandler, approverPermissions, approverRelationKey, approverRelations, assertApprover, cancelApprovals, consumeApproval, decideAccessReviewItem, decodeApprovalCursor, encodeApprovalCursor, escalationOpenAt, idempotencyRecord, idempotencyRecordKey, inspectApproval, isAccessReviewError, isApprovalError, listAllApprovals, matchDelegation, matchesIdempotencyRecord, memoryAccessReviewStore, memoryApprovalDelegationSource, memoryApprovalStore, memoryIdempotencyStore, pageAccessReviewItems, pageApprovals, parseApprovalDelegation, parseApprovalRequest, readApprovalHeader, requestApproval, resolveApproval, resumeDecision, resumeFromHeader, signApproval, startAccessReview, storedApprovalToken, summarizeSubject, vouchApproval };
|
|
6
|
+
import { _ as accessReviewerEligible, a as idempotencyRecordKey, c as approvalEntityTag, d as memoryApprovalDelegationSource, f as parseApprovalDelegation, g as accessReviewsHandler, h as startAccessReview, i as idempotencyRecord, l as approvalView, m as pageAccessReviewItems, n as approvalSignatureClaims, o as matchesIdempotencyRecord, p as memoryAccessReviewStore, r as signApproval, s as memoryIdempotencyStore, t as approvalsHandler, u as matchDelegation, v as decideAccessReviewItem } from "../approvals-DdFcTncq.js";
|
|
7
|
+
import { t as APPROVAL_REQUEST_SCHEMA } from "../request-schema-CMP8Cmxd.js";
|
|
8
|
+
import { t as parseApprovalRequest } from "../parse-request-DOBVaeiQ.js";
|
|
9
|
+
export { APPROVAL_HEADER, APPROVAL_REQUEST_SCHEMA, AccessReviewError, ApprovalError, DEFAULT_APPROVAL_TTL, accessReviewerEligible, accessReviewsHandler, applyApprovalVerdict, approvalEntityTag, approvalFingerprint, approvalPageSize, approvalQuorum, approvalSignatureClaims, approvalView, approvalsHandler, approverPermissions, approverRelationKey, approverRelations, assertApprover, cancelApprovals, consumeApproval, decideAccessReviewItem, decodeApprovalCursor, encodeApprovalCursor, escalationOpenAt, idempotencyRecord, idempotencyRecordKey, inspectApproval, isAccessReviewError, isApprovalError, listAllApprovals, matchDelegation, matchesIdempotencyRecord, memoryAccessReviewStore, memoryApprovalDelegationSource, memoryApprovalStore, memoryIdempotencyStore, pageAccessReviewItems, pageApprovals, parseApprovalDelegation, parseApprovalRequest, readApprovalHeader, requestApproval, resolveApproval, resumeDecision, resumeFromHeader, signApproval, startAccessReview, storedApprovalToken, summarizeSubject, vouchApproval };
|
|
@@ -6,14 +6,14 @@ import { a as isId } from "./expiry-6XByK0dm.js";
|
|
|
6
6
|
import { d as isoNow, f as nowMillis, g as secondsOf, i as dateAt } from "./time-nR1JesoH.js";
|
|
7
7
|
import { t as canonicalJson } from "./canonical-json-DwilZ1iB.js";
|
|
8
8
|
import { r as sha256Digest } from "./sha256-C-4WXKIu.js";
|
|
9
|
-
import { c as rootMembershipId } from "./scopes-0Up_UA2t.js";
|
|
10
9
|
import { o as flattenGrantee } from "./grantee-Dke-9rd1.js";
|
|
10
|
+
import { i as rootMembershipId } from "./subject-C7RddW0G.js";
|
|
11
11
|
import { c as isApprovalError, s as ApprovalError } from "./types-CcUXciSj.js";
|
|
12
|
-
import { a as belongsToTenant, c as decodeApprovalCursor, n as assertApprover, o as membershipTenants, r as matchesApprovers, s as approvalPageSize, u as listAllApprovals } from "./store-
|
|
12
|
+
import { a as belongsToTenant, c as decodeApprovalCursor, n as assertApprover, o as membershipTenants, r as matchesApprovers, s as approvalPageSize, u as listAllApprovals } from "./store-XgBMbfDy.js";
|
|
13
13
|
import { n as readBodyText } from "./body-text-DQhcmqdY.js";
|
|
14
14
|
import { r as hasCredentials } from "./http-DKLXrFGk.js";
|
|
15
15
|
import { d as unauthenticatedProblem, f as validationProblem, l as problemResponse, o as methodNotAllowed } from "./problem-BVLHFK33.js";
|
|
16
|
-
import { f as approverPermissions, m as approverRelations, p as heldPermissions } from "./helpers-
|
|
16
|
+
import { f as approverPermissions, m as approverRelations, p as heldPermissions } from "./helpers-DNnZffrI.js";
|
|
17
17
|
import { n as isAccessReviewError, t as AccessReviewError } from "./errors-BDUwg2qC.js";
|
|
18
18
|
import { t as bodyTooLarge } from "./body-CJQwYVa8.js";
|
|
19
19
|
//#region src/approvals/access-reviews/decide.ts
|
|
@@ -33,6 +33,27 @@ function user(id) {
|
|
|
33
33
|
id
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
+
/** The most `manager({ levels })` walks up the chain. */
|
|
37
|
+
const MAX_MANAGER_LEVELS = 8;
|
|
38
|
+
/**
|
|
39
|
+
* Approves when the approver manages the requester, directly or within `levels`
|
|
40
|
+
* steps up the chain (1 to `MAX_MANAGER_LEVELS`, default 1).
|
|
41
|
+
*/
|
|
42
|
+
function manager(options = {}) {
|
|
43
|
+
const levels = options.levels ?? 1;
|
|
44
|
+
if (!Number.isInteger(levels) || levels < 1 || levels > MAX_MANAGER_LEVELS) throw new Error(`PermDock: manager() levels must be a whole number from 1 to ${MAX_MANAGER_LEVELS}, got ${String(options.levels)}`);
|
|
45
|
+
return Object.freeze(levels === 1 ? { kind: "manager" } : {
|
|
46
|
+
kind: "manager",
|
|
47
|
+
levels
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function isManagerApprover(value) {
|
|
51
|
+
return value !== null && typeof value === "object" && "kind" in value && value.kind === "manager";
|
|
52
|
+
}
|
|
53
|
+
/** The key a verdict's `relations` lists a manager approver under. */
|
|
54
|
+
function approverManagerKey(item) {
|
|
55
|
+
return JSON.stringify(["manager", item.levels ?? 1]);
|
|
56
|
+
}
|
|
36
57
|
function isUserApprover(value) {
|
|
37
58
|
return value !== null && typeof value === "object" && "kind" in value && value.kind === "user";
|
|
38
59
|
}
|
|
@@ -55,4 +76,4 @@ function isAnyOfInput(value) {
|
|
|
55
76
|
return value !== null && typeof value === "object" && "kind" in value && value.kind === "any-of";
|
|
56
77
|
}
|
|
57
78
|
//#endregion
|
|
58
|
-
export {
|
|
79
|
+
export { flattenApprovers as a, isManagerApprover as c, manager as d, user as f, approverManagerKey as i, isPermissionApprover as l, anyOf as n, holder as o, approverLeaves as r, isAnyOfInput as s, allOf as t, isUserApprover as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as defineLeaf } from "./command-L8EstFNm.js";
|
|
2
|
-
import { c as given, u as permissionsFlag } from "./flags-
|
|
2
|
+
import { c as given, u as permissionsFlag } from "./flags-BlmpmXoY.js";
|
|
3
3
|
//#region src/cli/commands/arazzo.ts
|
|
4
4
|
const check = defineLeaf({
|
|
5
5
|
flags: {
|
|
@@ -21,7 +21,7 @@ const check = defineLeaf({
|
|
|
21
21
|
...permissionsFlag
|
|
22
22
|
},
|
|
23
23
|
async run(ctx, { flags }) {
|
|
24
|
-
return (await import("./arazzo-
|
|
24
|
+
return (await import("./arazzo-_zUmT8ZT.js")).runArazzo({
|
|
25
25
|
cwd: ctx.cwd,
|
|
26
26
|
config: ctx.config,
|
|
27
27
|
doc: given(flags.doc),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as arazzoFindings } from "./src-
|
|
2
|
-
import { c as missingInput } from "./errors-
|
|
1
|
+
import { _ as arazzoFindings } from "./src-nYNBfmgq.js";
|
|
2
|
+
import { c as missingInput } from "./errors-BhRkoNS7.js";
|
|
3
3
|
import { i as readJsonFile } from "./files-BSjrtIHw.js";
|
|
4
4
|
import { t as ARAZZO_REPORT_SCHEMA } from "./version-DMQ0dnN5.js";
|
|
5
|
-
import { a as loadModule, s as pickNamed, t as asPermissionTree } from "./load-
|
|
6
|
-
import { t as DOCS_BASE } from "./manifest-
|
|
5
|
+
import { a as loadModule, s as pickNamed, t as asPermissionTree } from "./load-BaEamml-.js";
|
|
6
|
+
import { t as DOCS_BASE } from "./manifest-Dij1U0hx.js";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
8
|
import { resolve } from "node:path";
|
|
9
9
|
//#region src/cli/arazzo.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as CliError } from "./errors-
|
|
1
|
+
import { n as CliError } from "./errors-BhRkoNS7.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/fastest-levenshtein@1.0.16/node_modules/fastest-levenshtein/esm/mod.js
|
|
3
3
|
const peq = /* @__PURE__ */ new Uint32Array(65536);
|
|
4
4
|
const myers_32 = (a, b) => {
|
|
@@ -207,9 +207,6 @@ function lookupOf(flags) {
|
|
|
207
207
|
}
|
|
208
208
|
return lookup;
|
|
209
209
|
}
|
|
210
|
-
function flagSpellings(flags) {
|
|
211
|
-
return [...lookupOf(flags).keys()];
|
|
212
|
-
}
|
|
213
210
|
/**
|
|
214
211
|
* A value never starts with `-`, bar `-` itself: `--out --check` is a bare
|
|
215
212
|
* `--out`.
|
|
@@ -311,4 +308,4 @@ function parseLeaf(command, argv, flags, positionals = []) {
|
|
|
311
308
|
};
|
|
312
309
|
}
|
|
313
310
|
//#endregion
|
|
314
|
-
export {
|
|
311
|
+
export { GLOBAL_FLAGS as a, suggestion as i, parseFlags as n, parseLeaf as r, didYouMean as t };
|
package/dist/astro/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as Snapshot, E as Policy, M as PolicyVocabulary, _r as Principal } from "../policy-types-IRJVABmm.js";
|
|
2
2
|
import { u as Permission } from "../permission-types-CAY-GU7e.js";
|
|
3
3
|
import { a as OperationInput, t as Operation } from "../operations-Ci_rT6Uo.js";
|
|
4
|
-
import { a as PermDock } from "../permdock-
|
|
5
|
-
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-
|
|
6
|
-
import { a as ProtectTarget, i as PermDockHandlers, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-
|
|
4
|
+
import { a as PermDock } from "../permdock-DUWZEOLR.js";
|
|
5
|
+
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-Bw-lWqzR.js";
|
|
6
|
+
import { a as ProtectTarget, i as PermDockHandlers, n as FetchAdapterOptions, t as ContextReader } from "../fetch-adapter-BgqpOOpd.js";
|
|
7
7
|
import { APIContext, MiddlewareHandler } from "astro";
|
|
8
8
|
//#region src/astro/create.d.ts
|
|
9
9
|
type AstroPermDockOptions<TUser = unknown> = FetchAdapterOptions<APIContext, TUser>;
|
package/dist/astro/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as InvalidSignatureError, p as webBotAuthVerifier, u as discoverViaSignatureAgent } from "../evaluations-
|
|
2
|
-
import { n as guardedRoute, r as instanceRoute, t as fetchAdapter } from "../fetch-adapter-
|
|
1
|
+
import { l as InvalidSignatureError, p as webBotAuthVerifier, u as discoverViaSignatureAgent } from "../evaluations-DG40eSJa.js";
|
|
2
|
+
import { n as guardedRoute, r as instanceRoute, t as fetchAdapter } from "../fetch-adapter-UZOW0PRC.js";
|
|
3
3
|
//#region src/astro/create.ts
|
|
4
4
|
const route = {
|
|
5
5
|
context: (context) => context,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as whoCan } from "./who-can-
|
|
1
|
+
import { t as whoCan } from "./who-can-BY5d3HPw.js";
|
|
2
2
|
//#region src/delivery/audience.ts
|
|
3
3
|
async function granted(permdock, ids, permission, row) {
|
|
4
4
|
const unique = [...new Set(ids.filter((id) => typeof id === "string" && id !== ""))];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as isRecord } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { h as secondsAt } from "./time-nR1JesoH.js";
|
|
3
|
-
import { n as CliError } from "./errors-
|
|
3
|
+
import { n as CliError } from "./errors-BhRkoNS7.js";
|
|
4
4
|
import { a as refreshCredential, c as stringField, n as discoverAuthorizationServer } from "./device-BwbJNmb2.js";
|
|
5
5
|
import { i as writeCredentials, r as readCredentials, t as credentialsPath } from "./storage-C2bWdvJH.js";
|
|
6
6
|
import { t as CLOUD_BASE_URL } from "./base-url-BQbddZO5.js";
|