permdock 0.16.0 → 0.18.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-C2BCiUEG.js → adoption-scan-CxExBYSJ.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-CUjgSsOl.js +189 -0
- package/dist/approval-policies-oNnckT12.d.ts +138 -0
- package/dist/{approval-prompt-3BqWczTt.d.ts → approval-prompt-Bg7gDSqd.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-DGId_hgJ.js} +3 -3
- package/dist/{approvers-B4r0N_Uz.js → approvers-BaNwKYgd.js} +20 -1
- package/dist/{arazzo-ClYz2Z0W.js → arazzo--riLuGY0.js} +4 -4
- package/dist/{arazzo-CHoYnQXO.js → arazzo-CEDbb-uM.js} +2 -2
- 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-B4YR9UpV.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-Bfa_wD1h.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 +335 -38
- package/dist/better-supabase/index.js +778 -117
- package/dist/{better-supabase-Dirf_8Ec.js → better-supabase-BJtQ-kNf.js} +26 -10
- package/dist/{bind-BNQA9JK9.js → bind-B4pMH9bm.js} +6 -6
- package/dist/{bind-YYjvfpB9.d.ts → bind-DR6ku3A9.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-BFMFQdE_.js} +3 -2
- package/dist/{capability-Di9tiUvi.d.ts → capability-BZ_veK9o.d.ts} +1 -1
- package/dist/{capability-BqX94r07.js → capability-zN6T9fxe.js} +2 -3
- package/dist/{casbin-D_rVQ31U.js → casbin-DCQHkkyj.js} +2 -2
- package/dist/{casbin-C9EvElBb.js → casbin-bKC1FpEx.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 +7 -7
- package/dist/catalog-Caqhbdix.js +1 -0
- package/dist/{catalog-CGlSwU6j.js → catalog-D1fw8qif.js} +5 -5
- package/dist/{catalog-doc-DjMKzJp9.js → catalog-doc-C4DGfJCO.js} +3 -3
- package/dist/{catalog-operations-DeHTrJSV.js → catalog-operations-BD22drQf.js} +4 -4
- package/dist/{catalog-amPDr0JQ.js → catalog-zzNuR3sY.js} +3 -3
- package/dist/{challenge-DImNcR7B.js → challenge-B2O2OLEk.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/client-CH7vzSAY.d.ts +32 -0
- package/dist/cloud/index.d.ts +8 -8
- package/dist/cloud/index.js +1 -1
- package/dist/{cloud-DdaJ7ILM.js → cloud-C0vXBmLG.js} +4 -4
- package/dist/{codemod-B1USJS7a.js → codemod-C-L0w-u7.js} +3 -3
- package/dist/{codemod-ammy6wv4.js → codemod-eYI1FbeJ.js} +395 -8
- package/dist/{collect-DnXL4B8c.js → collect-CU85z6Ta.js} +4 -4
- package/dist/{collect-WCl8cJQV.js → collect-D878zLDP.js} +4 -4
- package/dist/collect-KCtOigxx.js +1 -0
- 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-DBm0ub4p.d.ts} +2 -2
- package/dist/{completion--Y4YItFZ.js → completion-Dauc6pVT.js} +3 -3
- package/dist/{config-CcLlvEYW.js → config-COHmivz9.js} +4 -4
- package/dist/{config-BQ77xMZk.js → config-DWp2PucY.js} +2 -2
- package/dist/{config-report-DVMOLJ7F.js → config-report-DKpFm5ID.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-lxoANyai.js → core-B8sLve3z.js} +7 -7
- package/dist/{core-CFepFiDP.d.ts → core-D87h2kpR.d.ts} +2 -2
- package/dist/{create-BLPKnJKa.js → create-3A7J9KRR.js} +6 -5
- package/dist/{create-CDd9c22W.d.ts → create-BrQXL-Wt.d.ts} +6 -6
- package/dist/{create-BPUopdfL.d.ts → create-BzwjZuRS.d.ts} +7 -7
- package/dist/{create-Coq5fIrq.js → create-C-tm3KIF.js} +5 -5
- package/dist/{create-DBvUsgzK.d.ts → create-CtoT1lIQ.d.ts} +4 -4
- 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-DlIxt8fh.d.ts} +1 -1
- package/dist/{describe-BbFPBSms.d.ts → describe-BKtC_8PG.d.ts} +1 -1
- package/dist/{describe-Bb4hGK5d.js → describe-BZAlPHxT.js} +2 -1
- package/dist/{diff-DfmYaIhB.js → diff-BnNHqtHj.js} +8 -8
- package/dist/{diff-CxtbOi2l.js → diff-CBCzOTWM.js} +2 -2
- package/dist/{doctor-D1Xnmy6u.js → doctor-CkYKCuX7.js} +233 -30
- package/dist/{doctor-CwYc2lJb.js → doctor-xUpR5rXg.js} +3 -3
- 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-TpzkEKgJ.d.ts} +1 -1
- package/dist/{evaluate-BAmf_AQd.js → evaluate-Czbj7thS.js} +18 -15
- package/dist/{evaluations-DOWuBpWv.d.ts → evaluations-CisTTURl.d.ts} +3 -3
- package/dist/{evaluations-IBceAeKT.js → evaluations-h3KoJAPa.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-BdmfnbJM.d.ts} +2 -2
- package/dist/{fetch-adapter-dPTgJVHd.js → fetch-adapter-DH-NJPbL.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-Cemqurt8.js} +10 -4
- 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-BEIN-DRM.js} +2 -2
- package/dist/{gen-DuAhghDw.js → gen-mf-MRwVr.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-DmqGy63f.js} +85 -13
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +3 -3
- package/dist/{hosted-DVxlLZMe.d.ts → hosted-BFNXwcjd.d.ts} +1 -1
- package/dist/{hosted-D0IzESu_.js → hosted-waouw2V-.js} +12 -10
- package/dist/{http-DOL33cO0.js → http-DhMWeB_h.js} +1 -1
- package/dist/{import-CNBF96hB.js → import-C1XXpG_m.js} +4 -4
- package/dist/{import-Dfe2unKO.js → import-DObwEota.js} +3 -3
- package/dist/{index-BinlXeU-.d.ts → index-BhnOOnp9.d.ts} +2 -2
- package/dist/{index-ymept53A.d.ts → index-CVGio3cH.d.ts} +4 -4
- package/dist/{index-DJwEgYzA.d.ts → index-CdMOd-GY.d.ts} +17 -11
- package/dist/{index-Cay5-Kvx.d.ts → index-CdUTE6qd.d.ts} +11 -10
- package/dist/{index-Dj2qF9VC.d.ts → index-Dfv9Toct.d.ts} +1 -1
- package/dist/{index-CV-7DWeD.d.ts → index-rFp6X_QP.d.ts} +4 -4
- package/dist/index.d.ts +18 -16
- package/dist/index.js +24 -20
- package/dist/{init-BUo2G-FI.js → init-CNJ8lLjo.js} +5 -5
- package/dist/{init-C6cWP3xW.js → init-DS3PEsCG.js} +5 -5
- package/dist/{instance-options-CoHn-0e8.d.ts → instance-options-2sFGSdsf.d.ts} +2 -2
- package/dist/{instance-snapshot-DuWf1cT3.js → instance-snapshot-BWa71my8.js} +15 -12
- package/dist/jwt/index.d.ts +4 -4
- package/dist/jwt/index.js +3 -3
- package/dist/{kernel-BD8QuMnv.js → kernel-30Z2zM_d.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-D1MHOomI.js → login-BgK5Jloo.js} +4 -4
- package/dist/{login-DCKE5pVy.js → login-DUVzBLh7.js} +4 -4
- package/dist/{manifest-BXTbHNIV.js → manifest-BdzBobNK.js} +1 -1
- package/dist/{manifest-schema-DQkBK2Mr.js → manifest-schema-CsFsYLF-.js} +1 -1
- package/dist/{manifest-Cft51TLK.js → manifest-wclLWBVH.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-BH16Ah8P.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 +45 -13
- package/dist/next/index.js +68 -30
- 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-BwWkHxvW.js → openapi-C4gFqeRz.js} +4 -4
- package/dist/{openapi-DSzQN7Zu.js → openapi-zMEB9qxn.js} +5 -5
- package/dist/{operation-findings-CXtFzlKJ.js → operation-findings-CVwJHEu_.js} +1 -1
- package/dist/operation-risks-BKOcTv8J.js +13 -0
- package/dist/operations-Bm9HFecz.js +89 -0
- 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-DlICTjBh.js → output-BFWLER4r.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-D-mIt-w0.js} +6 -6
- package/dist/{parse-1_ZheTW5.js → parse-UTC-sDrt.js} +2 -2
- package/dist/{parse-local-manifest-DEiCF4ah.js → parse-local-manifest-CxcSMQgl.js} +2 -2
- package/dist/{parse-local-manifest-CCmbhnxP.d.ts → parse-local-manifest-DvjTQNuO.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-BvjivVb9.js → permdock-D-_WrdKu.js} +205 -102
- package/dist/{permdock-CprAPN3w.d.ts → permdock-ffY4CMd9.d.ts} +101 -131
- package/dist/{permissions-CYcHj_w7.js → permissions-B3ggI88M.js} +2 -2
- package/dist/{permissions-CVXmRILq.js → permissions-BaoLxy66.js} +1 -13
- package/dist/{pg-DQTqRrou.js → pg-Ddxsd5ZB.js} +2 -2
- package/dist/{policy-BycVKnXv.d.ts → policy-BtKSApSt.d.ts} +1 -1
- package/dist/{policy-CLQ8__GF.js → policy-cV_wwPb8.js} +5 -4
- package/dist/{policy-from-catalog-CU3An8uP.js → policy-from-catalog-B68hGC0S.js} +9 -8
- package/dist/{policy-types-DGIO_gxq.d.ts → policy-types-D-GwfQTc.d.ts} +72 -19
- package/dist/{postgrest-DAxFltvO.js → postgrest-BrjrckDG.js} +74 -19
- package/dist/{postgrest-D5nUGm-c.d.ts → postgrest-D84p5dbA.d.ts} +12 -7
- package/dist/{powersync-CBhTBhG2.js → powersync-9PYOE1wt.js} +158 -21
- package/dist/{powersync-DAfo0EL5.js → powersync-DStC_g0B.js} +3 -3
- package/dist/powersync-xNRlC4jN.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-QEA8arRB.js → protected-action-B40tU3yP.js} +15 -5
- package/dist/{protected-action-D8x73IGm.d.ts → protected-action-Ds_EUY8B.d.ts} +14 -7
- package/dist/{protected-action-DUYqb-Ma.js → protected-action-OpOxtTsN.js} +1 -1
- package/dist/{provider-C55OGXJ7.js → provider-CY4TSSJo.js} +2 -2
- package/dist/{provider-DfLeek9O.d.ts → provider-OtnIiFWm.d.ts} +1 -1
- package/dist/{provider-store-CaTv00tr.js → provider-store-BQP_pp8s.js} +2 -2
- package/dist/{pull-CQCGy1gv.js → pull-DLP4I1Kl.js} +7 -7
- package/dist/pull-UBjDnf4b.js +1 -0
- package/dist/{push-Dq_ca4-j.js → push-BSb8j1EW.js} +8 -8
- package/dist/{pushed-policy-CDuOL2de.js → pushed-policy-BecMsTtM.js} +1 -1
- package/dist/{pushed-policy-CryQheKq.d.ts → pushed-policy-Ck3FZcoy.d.ts} +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 +104 -39
- package/dist/react-native/index.js +199 -40
- package/dist/refresh-on-L9UOwATg.d.ts +49 -0
- package/dist/{replay-Bs9Df2fQ.d.ts → replay-E5X9E1lC.d.ts} +1 -1
- package/dist/{request-context-Duzdf0cd.js → request-context-DM6_jY1n.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-CBl4r4_r.js} +6 -6
- package/dist/{rls-tHu7N_Pe.js → rls-DGBL-jDY.js} +20 -20
- package/dist/{rls-C5ZGzR_B.js → rls-pAHGYgTb.js} +4 -4
- package/dist/{role-builder-BK2-T6oD.js → role-builder-CMW4wWzn.js} +3 -157
- package/dist/{rpc-vHIwyXCp.js → rpc-KwX_Jcxz.js} +2 -2
- package/dist/{run-DUq1xU4K.js → run-B7lv3NuK.js} +8 -40
- package/dist/run-UPbacxPg.js +1 -0
- package/dist/{run-ticket-DfnZCh-u.js → run-ticket-CjvXr6wj.js} +1 -1
- package/dist/{run-ticket-ylovhyFQ.d.ts → run-ticket-DPaD27_r.d.ts} +2 -2
- package/dist/{runtime-BGnrOkVH.js → runtime-rf0ZuyF3.js} +1 -1
- package/dist/{saas-DK4V-3Is.js → saas-B8H1MsQ3.js} +13 -10
- package/dist/{scan-C3HRH9Fs.js → scan-0r3OZqqK.js} +1 -1
- package/dist/{schema-DvXvxPhQ.js → schema-B_9tXrbG.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-3OnXjZ2D.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-ogbVkyeo.d.ts} +2 -2
- package/dist/{skills-Celu2W6v.js → skills-B4MPRxQd.js} +2 -2
- package/dist/{skills-B2qTbaQa.js → skills-C9sTD70r.js} +2 -2
- package/dist/{snapshot-CXlzi69u.js → snapshot-DN_8J27z.js} +6 -2
- package/dist/{snapshot-cache-BjAWkchD.d.ts → snapshot-cache-B4YvlGG_.d.ts} +20 -6
- package/dist/{snapshot-cache-Bx_4xC_6.js → snapshot-cache-B66h7FBK.js} +25 -8
- 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-xdQShLDU.d.ts} +1 -1
- package/dist/{src-C_pi2Rnh.js → src-Brzq_0in.js} +193 -128
- package/dist/ssf/index.d.ts +3 -3
- package/dist/ssf/index.js +1 -1
- package/dist/{standard-webhooks-DOYEuOLx.d.ts → standard-webhooks-BfPaZ6T1.d.ts} +2 -2
- package/dist/{types-tQB2CEnY.d.ts → store-DYeB-_U3.d.ts} +114 -113
- package/dist/{store-RNFvaJJv.js → store-DmVqy74I.js} +13 -7
- package/dist/{store-options-Dil3lraY.js → store-options--zWn48PK.js} +76 -7
- package/dist/{stores-DxZWDXCs.js → stores-BYFopOm1.js} +3 -3
- package/dist/{stores-DZJvxFIZ.d.ts → stores-EPul_8MN.d.ts} +5 -6
- package/dist/{stream-9y9qw51m.d.ts → stream-W2RuUYly.d.ts} +1 -1
- package/dist/{subject-BGoM5o8B.js → subject-C7RddW0G.js} +8 -1
- package/dist/supabase/client.d.ts +2 -0
- package/dist/supabase/client.js +21 -0
- package/dist/supabase/index.d.ts +37 -6
- package/dist/supabase/index.js +6 -5
- package/dist/supabase/middleware.d.ts +8 -7
- package/dist/supabase/middleware.js +6 -6
- package/dist/{supabase-CDHMsDD0.js → supabase-BiViJpQ4.js} +31 -8
- package/dist/{supabase-DYWnT800.js → supabase-CogTyJH2.js} +3 -3
- package/dist/supabase-hook-BN46IrVI.js +1 -0
- package/dist/{supabase-hook-HPgwYb9V.js → supabase-hook-DX38Hj8h.js} +393 -32
- package/dist/{supautils-SwE642N1.js → supautils-BGf6zRvM.js} +12 -12
- 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-BfOk0ymL.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 +2 -2
- package/dist/testing/index.d.ts +29 -22
- package/dist/testing/index.js +120 -48
- 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-D4spOJ7I.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-i1EJ3Eb1.d.ts} +1 -1
- package/dist/{types-Cklw5hJo.d.ts → types-3Y8UpFkF.d.ts} +40 -1
- package/dist/{types-DlelvQk4.d.ts → types-B8qUkGja.d.ts} +2 -2
- package/dist/{types-CN0LsqbK.d.ts → types-CCEeSCMB.d.ts} +3 -3
- package/dist/{types-B2efzoSX.d.ts → types-CDVXR6YD.d.ts} +1 -1
- package/dist/{types-DsHGPtkR.d.ts → types-Ck1KOfug.d.ts} +2 -2
- package/dist/{types-DLvhVm1r.d.ts → types-CqcsNCaN.d.ts} +16 -7
- package/dist/{types-BB-zWDcR.d.ts → types-D-JO7lh8.d.ts} +5 -5
- package/dist/{types-CEinc15V.d.ts → types-D19MK4t-.d.ts} +3 -4
- package/dist/{types-B6ExllNo.d.ts → types-DGf_cpKF.d.ts} +2 -2
- package/dist/{types-rCRV4Ge-.d.ts → types-DmbfLu2p.d.ts} +4 -4
- package/dist/{types-ZzRGoViD.d.ts → types-NYoj8JBm.d.ts} +2 -2
- package/dist/{types-CWBsAwqn.d.ts → types-o1vu6Ks3.d.ts} +4 -4
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +2 -2
- package/dist/usage-Cl5eb-e1.js +1 -0
- package/dist/{usage-CPXeuAdT.js → usage-DC0UKe6C.js} +6 -6
- package/dist/{usage-CfZCQd0F.js → usage-DYtRVkcN.js} +2 -2
- package/dist/{validation-error-uvp-kyfO.d.ts → validation-error-Dx8PipbO.d.ts} +1 -1
- package/dist/{verify-DfT0QYNh.js → verify-Bpj0hauG.js} +19 -19
- package/dist/{version-cache-Df11C2Qp.d.ts → version-cache-DzNKWiI6.d.ts} +9 -3
- package/dist/{views-CD8wuL4Z.js → views-MWmJ6Y4P.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-NK_UuZbb.d.ts} +2 -2
- package/dist/{watch-DAkjm75Y.js → watch-CBHADqBH.js} +3 -3
- package/dist/watch-OYwAPCzx.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-KhVWMxtf.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-DxXB54Wu.d.ts → wrap-BHGA-SMM.d.ts} +2 -2
- package/dist/{wrap-B2wziJI_.js → wrap-C5PWzgkq.js} +1 -1
- 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/schemas/supabase-manifest-v1.json +1 -1
- 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-wire/references/adapters.md +3 -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-0QVP_DuR.js +0 -1
- package/dist/pull-CCAChKuy.js +0 -1
- package/dist/renames-CGj7YwcQ.js +0 -175
- package/dist/run-C5P3x1EI.js +0 -1
- package/dist/supabase-hook-qsewAVZY.js +0 -1
- package/dist/usage-DmmO_xjJ.js +0 -1
- package/dist/watch-CuPz0D2M.js +0 -1
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
import { n as isReadonlyArray, r as isRecord, t as compact } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { n as freezeDeep } from "./freeze-jjan0lCv.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { r as ownGet } from "./paths-CUvURzHp.js";
|
|
4
|
+
import { d as assertSqlFunctionArg, f as assertSqlFunctionName, l as normalizeWhere, u as assertPortableTwin } from "./role-builder-CMW4wWzn.js";
|
|
5
5
|
import { n as PermDockDeniedError } from "./errors-B6R_lg2a.js";
|
|
6
6
|
import { o as sameId } from "./expiry-6XByK0dm.js";
|
|
7
7
|
import { n as internalsOf } from "./internals-B3IgHrvo.js";
|
|
8
|
-
import { c as listPermissions, i as getRegistry, n as findPermission
|
|
8
|
+
import { c as listPermissions, i as getRegistry, n as findPermission } from "./permission-registry-B8tYxPIt.js";
|
|
9
9
|
import { n as isThenable$1 } from "./thenable-BNSM1U2R.js";
|
|
10
10
|
import { c as isEdgeRelation, m as restrictedStops, o as groupEntries, s as isComputedRelation, u as isPrincipalRelation } from "./resource-relations-8-pCScBO.js";
|
|
11
11
|
import { a as durationOf, f as nowMillis, g as secondsOf, m as rfc3339, p as nowSeconds } from "./time-nR1JesoH.js";
|
|
12
|
-
import {
|
|
13
|
-
import { u as
|
|
12
|
+
import { t as canonicalJson } from "./canonical-json-DwilZ1iB.js";
|
|
13
|
+
import { a as normalizeMembership$1, c as rootScope, d as scopeList, l as scopeChain, o as normalizeMemberships$1, p as tenantOf, s as resolveScope$1, u as scopeIdOf } from "./scopes-BSdYaGHs.js";
|
|
14
|
+
import { u as evaluateCondition } from "./delegation-aK4T_5WU.js";
|
|
14
15
|
import { _ as listPlans, a as authenticated, m as findRole, o as flattenGrantee } from "./grantee-Dke-9rd1.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
16
|
+
import { a as normalizeApproval, r as assertApprovalRelations } from "./approval-normalize-CUjgSsOl.js";
|
|
17
|
+
import { m as tenantsOf, r as isMembershipExpired } from "./tenancy-DvOHHk3-.js";
|
|
18
|
+
import { c as levelNames, i as grantList, n as declaredRoleNames } from "./policy-cV_wwPb8.js";
|
|
19
|
+
import { o as isPortableCondition } from "./hosted-waouw2V-.js";
|
|
20
|
+
import { n as isOperationRisk } from "./operation-risks-BKOcTv8J.js";
|
|
21
|
+
import { n as isOperationEffect } from "./operations-Bm9HFecz.js";
|
|
22
|
+
import { C as tenantCustomRoles, S as roleAllowKeys, f as customRoleId, l as ceilingGrants, m as customRoleScope, p as customRoleOf, x as resolveCustomRole } from "./evaluate-Czbj7thS.js";
|
|
23
|
+
import { a as heldLevels, f as bindingOf, h as usesAssigns, m as roleMeta, n as snapshotScopes, o as collectSnapshotGrants, p as rankRoles, r as assignableCandidates, t as snapshotOf } from "./instance-snapshot-BWa71my8.js";
|
|
21
24
|
import { n as relationId } from "./relations-BxvRvDHK.js";
|
|
22
|
-
import { i as snapshotGrant, r as plainPermission, t as buildSnapshot } from "./snapshot-
|
|
23
|
-
import { n as LOCAL_CUSTOM_ROLE } from "./parse-local-manifest-
|
|
24
|
-
import { c as APP, r as resolveSubject } from "./permdock-
|
|
25
|
-
import { i as memoryApprovalStore } from "./store-
|
|
26
|
-
import { n as wrapPermDock } from "./wrap-
|
|
25
|
+
import { i as snapshotGrant, r as plainPermission, t as buildSnapshot } from "./snapshot-DN_8J27z.js";
|
|
26
|
+
import { n as LOCAL_CUSTOM_ROLE } from "./parse-local-manifest-CxcSMQgl.js";
|
|
27
|
+
import { c as APP, r as resolveSubject } from "./permdock-D-_WrdKu.js";
|
|
28
|
+
import { i as memoryApprovalStore } from "./store-DmVqy74I.js";
|
|
29
|
+
import { n as wrapPermDock } from "./wrap-C5PWzgkq.js";
|
|
27
30
|
//#region src/conditions/sql-function.ts
|
|
28
31
|
function sqlFunction(name, options) {
|
|
29
32
|
assertSqlFunctionName(name);
|
|
@@ -119,91 +122,6 @@ function memoryCustomRoleSource(customRoles) {
|
|
|
119
122
|
};
|
|
120
123
|
}
|
|
121
124
|
//#endregion
|
|
122
|
-
//#region src/core/operations.ts
|
|
123
|
-
const OPERATION_EFFECTS = Object.freeze([
|
|
124
|
-
"read",
|
|
125
|
-
"write",
|
|
126
|
-
"delete",
|
|
127
|
-
"send",
|
|
128
|
-
"spend",
|
|
129
|
-
"external"
|
|
130
|
-
]);
|
|
131
|
-
/**
|
|
132
|
-
* MCP tool-name characters (MCP 2025-11-25, Tools: Tool names), so a name works
|
|
133
|
-
* as a tool name unchanged.
|
|
134
|
-
*/
|
|
135
|
-
const NAME = /^[A-Za-z0-9_.-]{1,128}$/u;
|
|
136
|
-
const META_KEYS = /* @__PURE__ */ new Set([
|
|
137
|
-
"risk",
|
|
138
|
-
"effects",
|
|
139
|
-
"title"
|
|
140
|
-
]);
|
|
141
|
-
function isOperationEffect(value) {
|
|
142
|
-
return OPERATION_EFFECTS.some((effect) => effect === value);
|
|
143
|
-
}
|
|
144
|
-
function readMeta(name, value) {
|
|
145
|
-
if (value === void 0) return Object.freeze({});
|
|
146
|
-
if (value === null || typeof value !== "object" || Array.isArray(value)) throw new TypeError(`Operation "${name}": meta must be an object.`);
|
|
147
|
-
for (const key of Object.keys(value)) if (!META_KEYS.has(key)) throw new TypeError(`Operation "${name}": meta.${key} is not one of risk, effects, title.`);
|
|
148
|
-
const meta = {};
|
|
149
|
-
const risk = Reflect.get(value, "risk");
|
|
150
|
-
if (risk !== void 0) {
|
|
151
|
-
if (!isOperationRisk(risk)) throw new TypeError(`Operation "${name}": meta.risk must be one of ${OPERATION_RISKS.join(", ")}.`);
|
|
152
|
-
meta.risk = risk;
|
|
153
|
-
}
|
|
154
|
-
const effects = Reflect.get(value, "effects");
|
|
155
|
-
if (effects !== void 0) {
|
|
156
|
-
if (!Array.isArray(effects) || !effects.every(isOperationEffect) || new Set(effects).size !== effects.length) throw new TypeError(`Operation "${name}": meta.effects must list distinct values of ${OPERATION_EFFECTS.join(", ")}.`);
|
|
157
|
-
meta.effects = Object.freeze([...effects]);
|
|
158
|
-
}
|
|
159
|
-
const title = Reflect.get(value, "title");
|
|
160
|
-
if (title !== void 0) {
|
|
161
|
-
if (typeof title !== "string" || title.trim() === "") throw new TypeError(`Operation "${name}": meta.title must be a non-empty string.`);
|
|
162
|
-
meta.title = title;
|
|
163
|
-
}
|
|
164
|
-
return Object.freeze(meta);
|
|
165
|
-
}
|
|
166
|
-
function treeLeaf(keys, name, field, value) {
|
|
167
|
-
if (!isPermission(value)) throw new TypeError(`Operation "${name}": ${field} must be a permission from the tree.`);
|
|
168
|
-
if (!keys.has(value.key)) throw new TypeError(`Operation "${name}": ${field} ${value.key} is not a permission of the tree passed to defineOperations.`);
|
|
169
|
-
return value;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Binds each named operation to a permission of `permissions`. Throws at
|
|
173
|
-
* definition time for a permission or `results` outside the tree, a name that
|
|
174
|
-
* is not 1 to 128 of `A-Z a-z 0-9 _ . -` or repeats another case-insensitively,
|
|
175
|
-
* a `data` that is not a function, or meta outside the closed lists.
|
|
176
|
-
*/
|
|
177
|
-
function defineOperations(permissions, definitions) {
|
|
178
|
-
const keys = new Map(listPermissions(permissions).map((leaf) => [leaf.key, leaf]));
|
|
179
|
-
const seen = /* @__PURE__ */ new Map();
|
|
180
|
-
const out = {};
|
|
181
|
-
for (const name of Object.keys(definitions)) {
|
|
182
|
-
if (!NAME.test(name) || isForbiddenKey(name)) throw new TypeError(`Operation name "${name}" must be 1 to 128 of A-Z a-z 0-9 _ . -.`);
|
|
183
|
-
const folded = name.toLowerCase();
|
|
184
|
-
const previous = seen.get(folded);
|
|
185
|
-
if (previous !== void 0) throw new TypeError(`Operation name "${name}" is a duplicate of "${previous}".`);
|
|
186
|
-
seen.set(folded, name);
|
|
187
|
-
const definition = definitions[name];
|
|
188
|
-
if (definition === null || typeof definition !== "object" || Array.isArray(definition)) throw new TypeError(`Operation "${name}" must be an object.`);
|
|
189
|
-
const permission = treeLeaf(keys, name, "permission", Reflect.get(definition, "permission"));
|
|
190
|
-
const value = Reflect.get(definition, "data");
|
|
191
|
-
if (value !== void 0 && typeof value !== "function") throw new TypeError(`Operation "${name}": data must be a function.`);
|
|
192
|
-
const data = value;
|
|
193
|
-
const resultsValue = Reflect.get(definition, "results");
|
|
194
|
-
const results = resultsValue === void 0 ? void 0 : treeLeaf(keys, name, "results", resultsValue);
|
|
195
|
-
const meta = readMeta(name, Reflect.get(definition, "meta"));
|
|
196
|
-
out[name] = Object.freeze({
|
|
197
|
-
name,
|
|
198
|
-
permission,
|
|
199
|
-
...data === void 0 ? {} : { data },
|
|
200
|
-
...results === void 0 ? {} : { results },
|
|
201
|
-
meta
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
return Object.freeze(out);
|
|
205
|
-
}
|
|
206
|
-
//#endregion
|
|
207
125
|
//#region src/core/approval-policies.ts
|
|
208
126
|
/**
|
|
209
127
|
* The denial detail when an `ApprovalPolicySource` fails: every call an allow
|
|
@@ -395,8 +313,8 @@ function shorter(a, b) {
|
|
|
395
313
|
/**
|
|
396
314
|
* `code` with every matching entry added as further stages: the result needs
|
|
397
315
|
* all of them (`'sequential'` when any part is ordered), keeps the code's
|
|
398
|
-
* escalation, the shortest `ttl`, and `
|
|
399
|
-
* Without a matching entry, `code` unchanged.
|
|
316
|
+
* escalation, the shortest `ttl`, and `'authorize'` unless every part is
|
|
317
|
+
* `'confirm'`. Without a matching entry, `code` unchanged.
|
|
400
318
|
*/
|
|
401
319
|
function tightenApproval(code, entries, input) {
|
|
402
320
|
const extra = entries.filter((entry) => (entry.permission === void 0 || entry.permission === input.permission) && metaMatches(entry, input.operation) && matches(entry, input.tenant, input.subject, input.current, input.next, input.now, input.scopes));
|
|
@@ -405,7 +323,7 @@ function tightenApproval(code, entries, input) {
|
|
|
405
323
|
const stages = [];
|
|
406
324
|
const seen = /* @__PURE__ */ new Set();
|
|
407
325
|
let sequential = false;
|
|
408
|
-
let
|
|
326
|
+
let authorize = false;
|
|
409
327
|
let staleOn;
|
|
410
328
|
let ttl;
|
|
411
329
|
for (const [index, part] of parts.entries()) {
|
|
@@ -418,18 +336,18 @@ function tightenApproval(code, entries, input) {
|
|
|
418
336
|
}
|
|
419
337
|
}
|
|
420
338
|
if (part === "human") {
|
|
421
|
-
|
|
339
|
+
authorize = true;
|
|
422
340
|
continue;
|
|
423
341
|
}
|
|
424
|
-
sequential ||= part.
|
|
425
|
-
|
|
342
|
+
sequential ||= part.combine === "sequential";
|
|
343
|
+
authorize ||= part.mode !== "confirm";
|
|
426
344
|
staleOn ??= part.staleOn;
|
|
427
345
|
ttl = shorter(ttl, part.ttl);
|
|
428
346
|
}
|
|
429
347
|
return compact({
|
|
430
|
-
|
|
348
|
+
combine: sequential ? "sequential" : "all",
|
|
431
349
|
stages,
|
|
432
|
-
|
|
350
|
+
mode: authorize ? void 0 : "confirm",
|
|
433
351
|
staleOn,
|
|
434
352
|
ttl,
|
|
435
353
|
escalation: code === void 0 || code === "human" ? void 0 : code.escalation
|
|
@@ -819,6 +737,153 @@ function signPolicyDocument(document, signer, options) {
|
|
|
819
737
|
});
|
|
820
738
|
}
|
|
821
739
|
//#endregion
|
|
740
|
+
//#region src/core/instance-cache.ts
|
|
741
|
+
const MAX_AGE_CEILING_MS = 6e4;
|
|
742
|
+
const DEFAULT_MAX_AGE_MS = 5e3;
|
|
743
|
+
const DEFAULT_MAX_ENTRIES$1 = 1e4;
|
|
744
|
+
function roleKey(method, args) {
|
|
745
|
+
return `roles:${canonicalJson([method, ...args])}`;
|
|
746
|
+
}
|
|
747
|
+
function withoutMemo(context) {
|
|
748
|
+
if (context === void 0) return null;
|
|
749
|
+
const { memo: _memo, ...rest } = context;
|
|
750
|
+
return rest;
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* An in-process `InstanceCache`: a bounded LRU that shares builds in flight.
|
|
754
|
+
* Create it once at module scope and pass it as `instances` to every adapter of
|
|
755
|
+
* the app; adapters with the same sources and policy share entries.
|
|
756
|
+
*/
|
|
757
|
+
function instanceCache(options = {}) {
|
|
758
|
+
const maxAgeMs = Math.min(Math.max(Math.floor(options.maxAgeMs ?? DEFAULT_MAX_AGE_MS), 0), MAX_AGE_CEILING_MS);
|
|
759
|
+
const maxEntries = Math.max(Math.floor(options.maxEntries ?? DEFAULT_MAX_ENTRIES$1), 1);
|
|
760
|
+
const now = options.now ?? Date.now;
|
|
761
|
+
const entries = /* @__PURE__ */ new Map();
|
|
762
|
+
const inFlight = /* @__PURE__ */ new Map();
|
|
763
|
+
const byPrincipal = /* @__PURE__ */ new Map();
|
|
764
|
+
const ownerIds = /* @__PURE__ */ new WeakMap();
|
|
765
|
+
let nextOwner = 0;
|
|
766
|
+
const counts = {
|
|
767
|
+
builds: 0,
|
|
768
|
+
shared: 0,
|
|
769
|
+
hits: 0,
|
|
770
|
+
evictions: 0
|
|
771
|
+
};
|
|
772
|
+
const ownerId = (owner) => {
|
|
773
|
+
const known = ownerIds.get(owner);
|
|
774
|
+
if (known !== void 0) return known;
|
|
775
|
+
nextOwner += 1;
|
|
776
|
+
const id = nextOwner;
|
|
777
|
+
ownerIds.set(owner, id);
|
|
778
|
+
return id;
|
|
779
|
+
};
|
|
780
|
+
const forget = (id) => {
|
|
781
|
+
const entry = entries.get(id);
|
|
782
|
+
entries.delete(id);
|
|
783
|
+
if (entry?.principal !== void 0) byPrincipal.get(entry.principal)?.delete(id);
|
|
784
|
+
};
|
|
785
|
+
const store = (id, entry) => {
|
|
786
|
+
entries.delete(id);
|
|
787
|
+
entries.set(id, entry);
|
|
788
|
+
if (entry.principal !== void 0) {
|
|
789
|
+
const keys = byPrincipal.get(entry.principal) ?? /* @__PURE__ */ new Set();
|
|
790
|
+
keys.add(id);
|
|
791
|
+
byPrincipal.set(entry.principal, keys);
|
|
792
|
+
}
|
|
793
|
+
if (entries.size > maxEntries) {
|
|
794
|
+
const oldest = entries.keys().next();
|
|
795
|
+
if (oldest.done !== true) forget(oldest.value);
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
const through = (id, principal, build) => {
|
|
799
|
+
const at = now();
|
|
800
|
+
const entry = entries.get(id);
|
|
801
|
+
if (entry !== void 0 && at - entry.at <= maxAgeMs) {
|
|
802
|
+
counts.hits += 1;
|
|
803
|
+
store(id, entry);
|
|
804
|
+
return entry.value;
|
|
805
|
+
}
|
|
806
|
+
if (entry !== void 0) forget(id);
|
|
807
|
+
const pending = inFlight.get(id);
|
|
808
|
+
if (pending !== void 0) {
|
|
809
|
+
counts.shared += 1;
|
|
810
|
+
return pending;
|
|
811
|
+
}
|
|
812
|
+
counts.builds += 1;
|
|
813
|
+
const answer = build();
|
|
814
|
+
if (!isThenable$1(answer)) {
|
|
815
|
+
if (maxAgeMs > 0) store(id, {
|
|
816
|
+
value: answer,
|
|
817
|
+
at,
|
|
818
|
+
principal
|
|
819
|
+
});
|
|
820
|
+
return answer;
|
|
821
|
+
}
|
|
822
|
+
const started = Promise.resolve(answer).then((value) => {
|
|
823
|
+
if (inFlight.get(id) === started && maxAgeMs > 0) store(id, {
|
|
824
|
+
value,
|
|
825
|
+
at,
|
|
826
|
+
principal
|
|
827
|
+
});
|
|
828
|
+
return value;
|
|
829
|
+
});
|
|
830
|
+
inFlight.set(id, started);
|
|
831
|
+
const settle = () => {
|
|
832
|
+
if (inFlight.get(id) === started) inFlight.delete(id);
|
|
833
|
+
};
|
|
834
|
+
started.then(settle, settle);
|
|
835
|
+
return started;
|
|
836
|
+
};
|
|
837
|
+
return Object.freeze({
|
|
838
|
+
name: "memory",
|
|
839
|
+
maxAgeMs,
|
|
840
|
+
instance(key, owners, build) {
|
|
841
|
+
const id = `instance:${owners.map((owner) => typeof owner === "object" && owner !== null || typeof owner === "function" ? ownerId(owner) : 0).join(",")}:${canonicalJson([
|
|
842
|
+
key.principal,
|
|
843
|
+
key.version,
|
|
844
|
+
key.tenant ?? null,
|
|
845
|
+
key.intent,
|
|
846
|
+
key.parts
|
|
847
|
+
])}`;
|
|
848
|
+
return Promise.resolve(through(id, key.principal, build));
|
|
849
|
+
},
|
|
850
|
+
customRoles(source, of) {
|
|
851
|
+
const sourceId = of === void 0 ? String(ownerId(source)) : `${String(ownerId(of.owner))}:${canonicalJson(of.principal)}`;
|
|
852
|
+
const principal = of?.principal;
|
|
853
|
+
const { globalRoles, sharedRoles, assignable } = source;
|
|
854
|
+
return Object.freeze({
|
|
855
|
+
...source.name === void 0 ? {} : { name: source.name },
|
|
856
|
+
rolesFor: (tenant, context) => through(roleKey(`${sourceId}:rolesFor`, [tenant, withoutMemo(context)]), principal, () => source.rolesFor(tenant, context)),
|
|
857
|
+
...assignable === void 0 ? {} : { assignable: (tenant) => through(roleKey(`${sourceId}:assignable`, [tenant]), principal, () => assignable.call(source, tenant)) },
|
|
858
|
+
...globalRoles === void 0 ? {} : { globalRoles: (context) => through(roleKey(`${sourceId}:globalRoles`, [withoutMemo(context)]), principal, () => globalRoles.call(source, context)) },
|
|
859
|
+
...sharedRoles === void 0 ? {} : { sharedRoles: (context) => through(roleKey(`${sourceId}:sharedRoles`, [withoutMemo(context)]), principal, () => sharedRoles.call(source, context)) }
|
|
860
|
+
});
|
|
861
|
+
},
|
|
862
|
+
entitlements(source) {
|
|
863
|
+
const sourceId = ownerId(source);
|
|
864
|
+
return Object.freeze({
|
|
865
|
+
...source.name === void 0 ? {} : { name: source.name },
|
|
866
|
+
entitlementsFor: (principal, scope) => through(`entitlements:${sourceId}:${canonicalJson([principal.id, scope.tenant ?? null])}`, principal.id, () => source.entitlementsFor(principal, scope))
|
|
867
|
+
});
|
|
868
|
+
},
|
|
869
|
+
evict(principal) {
|
|
870
|
+
counts.evictions += 1;
|
|
871
|
+
const keys = byPrincipal.get(principal);
|
|
872
|
+
byPrincipal.delete(principal);
|
|
873
|
+
for (const id of keys ?? []) {
|
|
874
|
+
entries.delete(id);
|
|
875
|
+
inFlight.delete(id);
|
|
876
|
+
}
|
|
877
|
+
},
|
|
878
|
+
stats() {
|
|
879
|
+
return {
|
|
880
|
+
...counts,
|
|
881
|
+
size: entries.size
|
|
882
|
+
};
|
|
883
|
+
}
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
//#endregion
|
|
822
887
|
//#region src/core/version-cache.ts
|
|
823
888
|
const MAX_STALE_CEILING_MS = 6e4;
|
|
824
889
|
const DEFAULT_MAX_ENTRIES = 1e4;
|
|
@@ -847,23 +912,6 @@ function memoryVersionCache(options) {
|
|
|
847
912
|
if (oldest.done !== true) entries.delete(oldest.value);
|
|
848
913
|
}
|
|
849
914
|
};
|
|
850
|
-
const observe = (principal, at) => {
|
|
851
|
-
const claimed = principal.authzVersion;
|
|
852
|
-
if (typeof claimed !== "number") return;
|
|
853
|
-
const issued = typeof principal.issuedAt === "number" ? principal.issuedAt * 1e3 : void 0;
|
|
854
|
-
const entry = entries.get(principal.id);
|
|
855
|
-
if (entry === void 0) {
|
|
856
|
-
if (issued !== void 0 && issued <= at && at - issued <= maxStaleMs) store(principal.id, {
|
|
857
|
-
version: claimed,
|
|
858
|
-
at: issued
|
|
859
|
-
});
|
|
860
|
-
return;
|
|
861
|
-
}
|
|
862
|
-
if (claimed > entry.version) store(principal.id, {
|
|
863
|
-
version: claimed,
|
|
864
|
-
at: issued === void 0 ? entry.at : Math.max(entry.at, issued)
|
|
865
|
-
});
|
|
866
|
-
};
|
|
867
915
|
const start = (id, read, at) => {
|
|
868
916
|
counts.reads += 1;
|
|
869
917
|
const keep = (version) => {
|
|
@@ -892,7 +940,6 @@ function memoryVersionCache(options) {
|
|
|
892
940
|
current(principal, read, { live }) {
|
|
893
941
|
const at = now();
|
|
894
942
|
if (live) return start(principal.id, read, at);
|
|
895
|
-
observe(principal, at);
|
|
896
943
|
const entry = entries.get(principal.id);
|
|
897
944
|
if (entry !== void 0 && at - entry.at <= maxStaleMs) {
|
|
898
945
|
counts.hits += 1;
|
|
@@ -906,6 +953,24 @@ function memoryVersionCache(options) {
|
|
|
906
953
|
}
|
|
907
954
|
return start(principal.id, read, at);
|
|
908
955
|
},
|
|
956
|
+
seed(principal, version, at) {
|
|
957
|
+
if (!Number.isFinite(version)) return;
|
|
958
|
+
const current = now();
|
|
959
|
+
const dated = at === void 0 ? current : nowMillis(at);
|
|
960
|
+
if (dated > current) return;
|
|
961
|
+
const entry = entries.get(principal);
|
|
962
|
+
if (entry === void 0) {
|
|
963
|
+
if (current - dated <= maxStaleMs) store(principal, {
|
|
964
|
+
version,
|
|
965
|
+
at: dated
|
|
966
|
+
});
|
|
967
|
+
return;
|
|
968
|
+
}
|
|
969
|
+
if (version > entry.version || version === entry.version && dated > entry.at) store(principal, {
|
|
970
|
+
version,
|
|
971
|
+
at: Math.max(entry.at, dated)
|
|
972
|
+
});
|
|
973
|
+
},
|
|
909
974
|
evict(principal) {
|
|
910
975
|
counts.evictions += 1;
|
|
911
976
|
entries.delete(principal);
|
|
@@ -2140,4 +2205,4 @@ function toCsvRow(event) {
|
|
|
2140
2205
|
].map(field).join(",");
|
|
2141
2206
|
}
|
|
2142
2207
|
//#endregion
|
|
2143
|
-
export {
|
|
2208
|
+
export { memoryCustomRoleSource as A, limits as C, approvalPoliciesFor as D, approvalPolicies as E, sqlFunction as F, memoryMembershipSource as M, memorySettingsSource as N, memoryApprovalPolicySource as O, memorySnapshotSource as P, memoryRelationSource as S, stripeEntitlementSource as T, arazzoFindings as _, normalizeMembership as a, instanceCache as b, crud as c, snapshotFor as d, customRoleSource as f, localSnapshotManifest as g, defineApp as h, decideRoleChange as i, memoryEntitlementSource as j, validateApprovalPolicy as k, readable as l, shadowMode as m, toCsvRow as n, normalizeMemberships as o, mayAccess as p, checkRoleChange as r, resolveScope as s, CSV_COLUMNS as t, writable as u, simulateArazzo as v, memoryLimitStore as w, signPolicyDocument as x, memoryVersionCache as y };
|
package/dist/ssf/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as SsfSubject, C as SsfEventName, D as SsfReceiver, E as SsfPermDockOptions, M as SsfTransmitterConfiguration, N as SsfVerification, O as SsfStreamConfiguration, S as SsfEventListener, T as SsfPermDock, _ as SetSubject, a as PollHandle, b as SsfEventHandler, c as PushSetOptions, d as SetDelivery, f as SetDeliveryFailureCause, g as SetQueue, h as SetPollHandlerOptions, i as CaepReason, j as SsfSubjectResolver, k as SsfStreamStatus, l as ReplayStore, m as SetEvent, n as CaepEventName, o as PollOptions, p as SetError, r as CaepInitiatingEntity, s as PollResult, t as CaepCommon, u as RiscEventName, v as SignSetOptions, w as SsfOnEvent, x as SsfEventInput, y as SsfAuditEvent } from "../types-
|
|
2
|
-
import { t as memoryReplayStore } from "../replay-
|
|
3
|
-
import { A as createPermDock, C as memorySsfStreamStore, D as PollSetsResult, E as PollSetsOptions, O as PolledSet, S as SsfStreamStore, T as setPollHandler, _ as SsfFanOut, a as CaepTokenClaimsChange, b as ssfTransmitter, c as RiscEvents, d as caepEvents, f as pushSet, g as FanOutSetOptions, h as streamVerificationEvent, i as CaepEvents, k as pollSets, l as SSF_POLL_DELIVERY, m as signSet, n as CaepCredentialChange, o as RiscAccountDisabled, p as riscEvents, r as CaepDeviceComplianceChange, s as RiscCredentialCompromise, t as CaepAssuranceLevelChange, u as SSF_PUSH_DELIVERY, v as SsfTransmitterOptions, w as memorySetQueue, x as SsfStream, y as fanOutSet } from "../index-
|
|
1
|
+
import { A as SsfSubject, C as SsfEventName, D as SsfReceiver, E as SsfPermDockOptions, M as SsfTransmitterConfiguration, N as SsfVerification, O as SsfStreamConfiguration, S as SsfEventListener, T as SsfPermDock, _ as SetSubject, a as PollHandle, b as SsfEventHandler, c as PushSetOptions, d as SetDelivery, f as SetDeliveryFailureCause, g as SetQueue, h as SetPollHandlerOptions, i as CaepReason, j as SsfSubjectResolver, k as SsfStreamStatus, l as ReplayStore, m as SetEvent, n as CaepEventName, o as PollOptions, p as SetError, r as CaepInitiatingEntity, s as PollResult, t as CaepCommon, u as RiscEventName, v as SignSetOptions, w as SsfOnEvent, x as SsfEventInput, y as SsfAuditEvent } from "../types-Ck1KOfug.js";
|
|
2
|
+
import { t as memoryReplayStore } from "../replay-E5X9E1lC.js";
|
|
3
|
+
import { A as createPermDock, C as memorySsfStreamStore, D as PollSetsResult, E as PollSetsOptions, O as PolledSet, S as SsfStreamStore, T as setPollHandler, _ as SsfFanOut, a as CaepTokenClaimsChange, b as ssfTransmitter, c as RiscEvents, d as caepEvents, f as pushSet, g as FanOutSetOptions, h as streamVerificationEvent, i as CaepEvents, k as pollSets, l as SSF_POLL_DELIVERY, m as signSet, n as CaepCredentialChange, o as RiscAccountDisabled, p as riscEvents, r as CaepDeviceComplianceChange, s as RiscCredentialCompromise, t as CaepAssuranceLevelChange, u as SSF_PUSH_DELIVERY, v as SsfTransmitterOptions, w as memorySetQueue, x as SsfStream, y as fanOutSet } from "../index-BhnOOnp9.js";
|
|
4
4
|
export { type CaepAssuranceLevelChange, type CaepCommon, type CaepCredentialChange, type CaepDeviceComplianceChange, type CaepEventName, type CaepEvents, type CaepInitiatingEntity, type CaepReason, type CaepTokenClaimsChange, type FanOutSetOptions, type PollHandle, type PollOptions, type PollResult, type PollSetsOptions, type PollSetsResult, type PolledSet, type PushSetOptions, type ReplayStore, type RiscAccountDisabled, type RiscCredentialCompromise, type RiscEventName, type RiscEvents, SSF_POLL_DELIVERY, SSF_PUSH_DELIVERY, type SetDelivery, type SetDeliveryFailureCause, type SetError, type SetEvent, type SetPollHandlerOptions, type SetQueue, type SetSubject, type SignSetOptions, type SsfAuditEvent, type SsfEventHandler, type SsfEventInput, type SsfEventListener, type SsfEventName, type SsfFanOut, type SsfOnEvent, type SsfPermDock, type SsfPermDockOptions, type SsfReceiver, type SsfStream, type SsfStreamConfiguration, type SsfStreamStatus, type SsfStreamStore, type SsfSubject, type SsfSubjectResolver, type SsfTransmitterConfiguration, type SsfTransmitterOptions, type SsfVerification, caepEvents, createPermDock, fanOutSet, memoryReplayStore, memorySetQueue, memorySsfStreamStore, pollSets, pushSet, riscEvents, setPollHandler, signSet, ssfTransmitter, streamVerificationEvent };
|
package/dist/ssf/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { o as statusProblem } from "../problem-details-CLDgX1KV.js";
|
|
|
3
3
|
import { o as epochSeconds } from "../time-nR1JesoH.js";
|
|
4
4
|
import { n as readBodyText } from "../body-text-DQhcmqdY.js";
|
|
5
5
|
import { f as validationProblem, l as problemResponse, o as methodNotAllowed, s as notFoundProblem } from "../problem-BVLHFK33.js";
|
|
6
|
-
import { t as cancelApprovals } from "../helpers-
|
|
6
|
+
import { t as cancelApprovals } from "../helpers-DmqGy63f.js";
|
|
7
7
|
import { i as issuerFromDiscovery, t as joseTokenVerifier } from "../verifier-DUV6pLqZ.js";
|
|
8
8
|
import { t as memoryReplayStore } from "../replay-BU09ad4L.js";
|
|
9
9
|
import { t as timeoutSignal } from "../timeout-D51niuQP.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { l as ReplayStore } from "./types-
|
|
1
|
+
import { Kt as Instant, hr as JsonWebKeyLike } from "./policy-types-D-GwfQTc.js";
|
|
2
|
+
import { l as ReplayStore } from "./types-Ck1KOfug.js";
|
|
3
3
|
//#region src/server/standard-webhooks.d.ts
|
|
4
4
|
/** The three Standard Webhooks headers a delivery carries. */
|
|
5
5
|
type WebhookHeaders = {
|