permdock 0.20.1 → 0.22.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/README.md +2 -1
- package/dist/a2a/index.d.ts +5 -5
- package/dist/a2a/index.js +5 -4
- package/dist/{adoption-scan-BTG9Noyy.js → adoption-scan-_bHLMnVQ.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 +4 -4
- package/dist/ai-sdk/index.js +3 -3
- package/dist/app/index.d.ts +85 -0
- package/dist/app/index.js +91 -0
- package/dist/app-DIvM65Mv.js +24 -0
- package/dist/{approval-policies-CKlByf5o.d.ts → approval-policies-UnDSxT__.d.ts} +2 -2
- package/dist/{approval-prompt-CQFiO1KE.d.ts → approval-prompt-2hTqo6IM.d.ts} +2 -2
- package/dist/approvals/index.d.ts +3 -3
- package/dist/approvals/index.js +3 -3
- package/dist/{approvals-CuXILe52.js → approvals-B_sn4Wrn.js} +6 -6
- package/dist/{arazzo-CDXfX4u0.js → arazzo-BXD-VJU_.js} +1 -1
- package/dist/{arazzo-D4mKdaWI.js → arazzo-Ct0PGblq.js} +3 -3
- package/dist/astro/index.d.ts +6 -6
- package/dist/astro/index.js +2 -2
- package/dist/{audience-BUonniPx.js → audience-5Xx1hdIv.js} +1 -1
- package/dist/{auth-j3Eu-j4h.js → auth-BxXHxWRy.js} +1 -1
- package/dist/authzen/index.d.ts +5 -5
- package/dist/authzen/index.js +4 -4
- package/dist/{automation-CpOk7Tlu.d.ts → automation-B20_8UoT.d.ts} +3 -3
- package/dist/{automation-x3KEUusw.js → automation-BueW05db.js} +2 -2
- package/dist/better-auth/index.d.ts +2 -2
- package/dist/better-auth/index.js +1 -1
- package/dist/better-supabase/index.d.ts +113 -56
- package/dist/better-supabase/index.js +200 -62
- package/dist/better-supabase-DF8f8oly.js +194 -0
- package/dist/{bind-gwEbe9hL.js → bind-B4Z0U2Gr.js} +5 -5
- package/dist/{bind-CW7nsZ86.d.ts → bind-CnOMjazH.d.ts} +7 -7
- package/dist/{build-instance-DaBdCRiz.js → build-instance-B0vsViF5.js} +3 -25
- package/dist/{capability-zN6T9fxe.js → capability-CenWwTMR.js} +1 -1
- package/dist/{capability-v2xZB7us.d.ts → capability-YkRMUAsF.d.ts} +2 -2
- package/dist/{casbin-COUi09Ti.js → casbin-D5evU3lX.js} +1 -1
- package/dist/{casbin-BXlRcCdU.js → casbin-imBS3UIf.js} +1 -1
- package/dist/catalog/index.d.ts +5 -5
- package/dist/catalog/index.js +5 -5
- package/dist/catalog-C462QC3A.js +1 -0
- package/dist/{catalog-DjDc87R2.js → catalog-CoyKnU5c.js} +1 -1
- package/dist/{catalog-s0waIrfY.js → catalog-Y4CjN8NA.js} +4 -4
- package/dist/{catalog-operations-BD22drQf.js → catalog-operations-Do1eD-Rt.js} +1 -1
- package/dist/{challenge-DbkpCx_v.js → challenge-B__LcNve.js} +3 -3
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +3 -2
- package/dist/chat-sdk/index.d.ts +3 -3
- package/dist/claude-agent/index.d.ts +3 -3
- package/dist/claude-agent/index.js +2 -2
- package/dist/clerk/index.d.ts +3 -3
- package/dist/cli/bin.js +1 -1
- package/dist/cli/index.d.ts +8 -7
- package/dist/cli/index.js +3 -3
- package/dist/cloud/index.d.ts +8 -8
- package/dist/cloud/index.js +3 -3
- package/dist/{cloud-BW7JKfrF.js → cloud-DWCeStPH.js} +2 -2
- package/dist/{codemod-6CBQaT0x.js → codemod-B7QKJ_ak.js} +2 -2
- package/dist/{codemod-CR9EQBVd.js → codemod-BaPmaCYQ.js} +13 -6
- package/dist/{collect-DN_x7hvV.js → collect-Cr71JA7z.js} +8 -7
- package/dist/{collect-DMQ6Sxr6.js → collect-ScSG05VJ.js} +2 -2
- package/dist/collect-W9i7REKT.js +1 -0
- package/dist/compile/index.d.ts +1 -1
- package/dist/compile/index.js +1 -1
- package/dist/{compile-B_oJqmIg.js → compile-Cvru58id.js} +2 -2
- package/dist/{compile-DZftFfXc.d.ts → compile-DC-BrhH1.d.ts} +3 -3
- package/dist/{completion-CYRlOJzv.js → completion-DOUMyCwa.js} +1 -1
- package/dist/{delegation-aK4T_5WU.js → condition-evaluate-bVVRSdzq.js} +159 -159
- package/dist/{config-6iLK155o.js → config-DRp-E8Ly.js} +1 -1
- package/dist/{config-D2oXUwos.js → config-DyNanTjZ.js} +10 -8
- package/dist/{config-report-BLroaWCe.js → config-report-Bh_nLdAE.js} +2 -2
- package/dist/{config-shape-D9paLhEX.js → config-shape-C4zqzG2K.js} +9 -2
- package/dist/{context-YhyXyqBI.js → context-Cem4QafV.js} +2 -2
- package/dist/convex/index.d.ts +5 -5
- package/dist/convex/index.js +2 -2
- package/dist/{core-BwVkrpsi.js → core-CUjhfz0W.js} +6 -6
- package/dist/{core-BOeGWbcR.d.ts → core-D2JNg5jA.d.ts} +3 -3
- package/dist/coverage-D8jBJdgD.d.ts +114 -0
- package/dist/coverage-Dh2W_DmF.js +211 -0
- package/dist/{create-BezeYFcT.d.ts → create-B2tdOygC.d.ts} +7 -7
- package/dist/{create-C0R8omeF.js → create-BJ2_8NDO.js} +5 -5
- package/dist/{create-DDUFG1ul.js → create-BsL5lCWR.js} +10 -8
- package/dist/{create-DYSYYiLr.d.ts → create-CPDSbK1a.d.ts} +5 -5
- package/dist/{create-DMCC5ZOi.d.ts → create-oMCcZV4X.d.ts} +9 -9
- package/dist/{credential-B3Hj4puZ.js → credential-Bap3HClV.js} +4 -4
- package/dist/{server-D0PW6ZCw.js → credentials-BXV0oz56.js} +3 -146
- package/dist/credentials-DPX140fN.d.ts +125 -0
- package/dist/delivery/index.d.ts +4 -4
- package/dist/delivery/index.js +1 -1
- package/dist/{denied-text-De8cw3MW.d.ts → denied-text-BXQkWU7d.d.ts} +2 -2
- package/dist/{describe-DibQM6g-.d.ts → describe-DVobr5FX.d.ts} +2 -2
- package/dist/{diff-Bd1-VCe5.js → diff-BR9JArxz.js} +6 -6
- package/dist/{diff-DXRNcjpg.js → diff-Jc_kbDz-.js} +1 -1
- package/dist/{doctor-CJcS0Mrq.js → doctor-BBMW5ZT_.js} +310 -36
- package/dist/{doctor-DYTgibLC.js → doctor-DhqSiPkq.js} +3 -3
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/drizzle/index.js +1 -1
- package/dist/elysia/index.d.ts +5 -5
- package/dist/elysia/index.js +3 -3
- package/dist/{errors-OTE9u4Wk.d.ts → errors-D_JIQJYb.d.ts} +1 -1
- package/dist/{evaluate-Dcq_U2TV.js → evaluate-B5yZHmts.js} +16 -16
- package/dist/{evaluations-CNMVJVD6.js → evaluations-BzTDWO4m.js} +57 -57
- package/dist/{evaluations-BgxEfPL7.d.ts → evaluations-DQYfh4Jh.d.ts} +3 -3
- package/dist/eve/index.d.ts +5 -5
- package/dist/eve/index.js +3 -3
- package/dist/express/index.d.ts +5 -5
- package/dist/express/index.js +3 -3
- package/dist/fastify/index.d.ts +5 -5
- package/dist/fastify/index.js +3 -3
- package/dist/{fetch-adapter-DCQ4pZxf.d.ts → fetch-adapter-DxqsIXSO.d.ts} +4 -4
- package/dist/{fetch-adapter-acq4dPX3.js → fetch-adapter-MoYZ-vF5.js} +5 -4
- package/dist/{fields-D_TfExiI.js → fields-CVyOk-f1.js} +2 -2
- package/dist/{fixtures-Cemqurt8.js → fixtures-BVZc7OCF.js} +1 -1
- package/dist/{from-snapshot-DHnb8Fh4.js → from-snapshot-oR_N97dM.js} +346 -14
- package/dist/{gen-gv_WHBIG.js → gen-DXXoFjyf.js} +1 -1
- package/dist/{gen-CH50v9VI.js → gen-WdycZ_-b.js} +5 -5
- package/dist/{grantee-conditions-DX4K_gGI.js → grantee-conditions-Dzprappv.js} +1 -1
- package/dist/{grantee-match-BP-k4vRJ.js → grantee-match-8J2y60MF.js} +3 -3
- package/dist/h3/index.d.ts +4 -4
- package/dist/h3/index.js +3 -3
- package/dist/{helpers-D-MXwkOF.js → helpers-DzBIfL1N.js} +25 -25
- package/dist/hono/index.d.ts +5 -5
- package/dist/hono/index.js +3 -3
- package/dist/{hosted-C2Pmhy2x.js → hosted-C5I2TSXm.js} +4 -4
- package/dist/{hosted-yhyAuQkL.d.ts → hosted-DXq1plaP.d.ts} +1 -1
- package/dist/{http-DhMWeB_h.js → http-dptLQzPP.js} +1 -1
- package/dist/{expiry-6XByK0dm.js → ids-DzhJaCUj.js} +23 -23
- package/dist/{import-BlwuuZkr.js → import-BE5sDazm.js} +2 -2
- package/dist/{import-C2ExjVvv.js → import-CvXswHDy.js} +2 -2
- package/dist/index-BcS8c_2S.d.ts +101 -0
- package/dist/{index--AwSBzJC.d.ts → index-BdZpqhJK.d.ts} +2 -2
- package/dist/{index-CLbGOPBr.d.ts → index-C-R8lBPb.d.ts} +3 -3
- package/dist/{index-CruReRkB.d.ts → index-C_8uxAlv.d.ts} +5 -5
- package/dist/{index-D7xGi1LS.d.ts → index-Cjfa1Uwr.d.ts} +22 -40
- package/dist/{index-Bt37QovT.d.ts → index-iIsqXFVu.d.ts} +6 -6
- package/dist/index.d.ts +19 -20
- package/dist/index.js +25 -24
- package/dist/{init-CalppFAI.js → init-B_S8Xdz1.js} +4 -4
- package/dist/{init-B62H9Kyx.js → init-CqGHcvyR.js} +2 -2
- package/dist/{instance-options-VPsNQsTH.d.ts → instance-options-C6gEDOts.d.ts} +1 -1
- package/dist/instance-options-URVwqpMW.js +24 -0
- package/dist/{instance-snapshot-SX8zH_1t.js → instance-snapshot-D_dGTq--.js} +10 -10
- package/dist/jwt/index.d.ts +4 -4
- package/dist/jwt/index.js +2 -2
- package/dist/{kernel-_QEUOSU0.js → kernel-NmxiWII2.js} +8 -8
- package/dist/kysely/index.d.ts +3 -3
- package/dist/kysely/index.js +1 -1
- package/dist/limits-CAhpRrhk.js +167 -0
- package/dist/{load-BaEamml-.js → load-C4p4VgwR.js} +2 -2
- package/dist/load-DiBUJx77.js +1 -0
- package/dist/{login-dDb_8muO.js → login-CzwlsBEO.js} +4 -4
- package/dist/{login-MxQV1BLh.js → login-DoLxv1s5.js} +3 -3
- package/dist/{manifest-DvDzxhy6.js → manifest-BAf7cgRx.js} +35 -35
- package/dist/{map-claims-PQwHynxV.js → map-claims-CAa_bQt9.js} +1 -1
- package/dist/{map-error-EOhahOVA.js → map-error-p4ROJ_26.js} +1 -1
- package/dist/mcp/index.d.ts +9 -9
- package/dist/mcp/index.js +9 -8
- package/dist/{migrate-CkLHdwuH.js → migrate-DVsxeE0y.js} +1 -1
- package/dist/{module-values-BYuNtdK5.js → module-values-BLiVlO1X.js} +3 -3
- package/dist/nest/index.d.ts +5 -5
- package/dist/nest/index.js +3 -3
- package/dist/next/index.d.ts +46 -17
- package/dist/next/index.js +58 -23
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +1 -1
- package/dist/node/index.d.ts +5 -5
- package/dist/node/index.js +2 -2
- package/dist/openai/index.d.ts +5 -5
- package/dist/openai/index.js +3 -3
- package/dist/openapi/index.d.ts +5 -59
- package/dist/openapi/index.js +3 -2
- package/dist/{openapi-BOsx0xn9.js → openapi-Cc-aS9xC.js} +6 -135
- package/dist/{openapi-BkGtE5kX.js → openapi-DroBcLJZ.js} +2 -2
- package/dist/{openapi-DKePsnln.js → openapi-EmvKwuWj.js} +4 -4
- package/dist/{operations-Ci_rT6Uo.d.ts → operations-BMPx7HyO.d.ts} +1 -1
- package/dist/optional-8TKc-0j4.js +47 -0
- package/dist/orpc/index.d.ts +7 -7
- package/dist/orpc/index.js +4 -4
- package/dist/otel/index.d.ts +3 -3
- package/dist/otel/index.js +1 -1
- package/dist/{output-B2h-2g3F.js → output-CYgfpT6o.js} +1 -1
- package/dist/{ownership-MGHa5vfX.js → ownership-adPAsUwY.js} +15 -13
- package/dist/{parse-CXTT7hBq.js → parse-CORUNcCo.js} +1 -1
- package/dist/{parse-local-manifest-CE4tgFsj.d.ts → parse-local-manifest-BaCqsqwC.d.ts} +1 -1
- package/dist/pdp/index.d.ts +3 -3
- package/dist/pdp/index.js +4 -3
- package/dist/{permdock-C1DN_7a-.js → permdock-B5LyNVgn.js} +71 -34
- package/dist/{permdock-D4F2p5J8.d.ts → permdock-BaB-KQqn.d.ts} +51 -9
- package/dist/{permissions-8N2yFsUM.js → permissions-COpRGKt7.js} +1 -1
- package/dist/{permissions-Bx6UI8n1.d.ts → permissions-DriWkV7q.d.ts} +1 -2
- package/dist/{policy-from-catalog-CUNlpgz0.js → policy-from-catalog-Cy103lsm.js} +8 -8
- package/dist/{policy-types-BI9C5Sp5.d.ts → policy-types-rNfz7t0M.d.ts} +9 -3
- package/dist/{policy-CaAME-Rh.js → policy-wGzbAPQF.js} +7 -7
- package/dist/{policy-Dh9WVSVz.d.ts → policy-x8RBKW8d.d.ts} +2 -2
- package/dist/{postgrest-CWCCbaxm.d.ts → postgrest-Cn0Res25.d.ts} +9 -21
- package/dist/powersync-BdoR7nwS.js +1 -0
- package/dist/{powersync-Deim9O47.js → powersync-BeI0VmEK.js} +2 -2
- package/dist/{powersync-CB8RwcB4.js → powersync-Dpa5AnnN.js} +11 -11
- package/dist/preset/index.js +1 -1
- package/dist/{preset-pPrVyGU5.js → preset-Bn5Z54cH.js} +5 -6
- package/dist/prisma/index.d.ts +2 -2
- package/dist/prisma/index.js +1 -1
- package/dist/{protected-action-ua0cx5cW.d.ts → protected-action-C4aj1KjO.d.ts} +6 -7
- package/dist/{protected-action-CD1HXwQK.js → protected-action-E7Sdt_Dt.js} +1 -1
- package/dist/{provider-D_hgjZRa.d.ts → provider-B-1DlOGM.d.ts} +1 -1
- package/dist/{provider-qESIf_C0.js → provider-DKO9KHua.js} +2 -2
- package/dist/{provider-store-BTHGJH9j.js → provider-store-D4PU1my_.js} +2 -2
- package/dist/{pull-BxqVL4Es.js → pull-3tkn25ll.js} +5 -5
- package/dist/pull-D90HqWNP.js +1 -0
- package/dist/{push-D2SsRW0U.js → push-dMyKdlEm.js} +6 -6
- package/dist/{pushed-policy-BERO0x9O.js → pushed-policy-Bi5-il4C.js} +2 -2
- package/dist/{pushed-policy-P0hgyLBh.d.ts → pushed-policy-P55cJNx5.d.ts} +1 -1
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +3 -3
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react/provider-client.js +1 -1
- package/dist/react-native/index.d.ts +9 -9
- package/dist/react-native/index.js +7 -7
- package/dist/{relation-walk-DK_gkgL7.js → relation-walk-BDTaTKTM.js} +1 -1
- package/dist/{relations-BxvRvDHK.js → relations-CMsJ1ARY.js} +1 -1
- package/dist/{replay-DYXI4gRN.d.ts → replay-DKhFvt0L.d.ts} +1 -1
- package/dist/{request-context-BPTi68z5.js → request-context-5gl_oxO1.js} +2 -2
- package/dist/resend/index.d.ts +4 -4
- package/dist/resend/index.js +2 -2
- package/dist/{resolve-names-BZQZRnMH.js → resolve-names-BnGJU88N.js} +4 -4
- package/dist/{rls-DpoJ5gCg.js → rls-DIYSRnDZ.js} +1 -1
- package/dist/{rls-OPorg_2G.js → rls-qrehUPf_.js} +45 -18
- package/dist/{role-builder-C5AgaC1x.js → role-builder-boQiUvfo.js} +3 -3
- package/dist/{rpc-D2LnFELm.d.ts → rpc-BqRiVpbP.d.ts} +2 -2
- package/dist/{rpc-DdkbQVlT.js → rpc-Dhi55Whd.js} +2 -2
- package/dist/run-elFdnSZx.js +1 -0
- package/dist/{run-YCpANf1B.js → run-oNqBe0gc.js} +3 -3
- package/dist/{run-ticket-CjvXr6wj.js → run-ticket-Ddxt9OuU.js} +2 -2
- package/dist/{run-ticket-94DOS9Cd.d.ts → run-ticket-Dulj4RQk.d.ts} +2 -2
- package/dist/{saas-BEXnrH9H.js → saas-DABv6vjy.js} +6 -5
- package/dist/{scan-COvn7ZjN.js → scan-BYXqcgON.js} +1 -1
- package/dist/{schema-BfSDo7Xj.js → schema-Wf-SvlHG.js} +1 -1
- package/dist/scim/index.d.ts +1 -1
- package/dist/scim/index.js +1 -1
- package/dist/{scopes-BSdYaGHs.js → scopes-gdH__vDZ.js} +1 -1
- package/dist/server/index.d.ts +11 -10
- package/dist/server/index.js +7 -6
- package/dist/server-CKjFooaJ.js +147 -0
- package/dist/{server-types-ChzXWU4Y.d.ts → server-types--_Hann81.d.ts} +10 -9
- package/dist/{shared-sW3VYchq.js → shared-DfaIWvIJ.js} +11 -2
- package/dist/{sink-RwmP7ZHs.d.ts → sink-Cs6z34AX.d.ts} +4 -4
- package/dist/{skills-N2Hd8KN8.js → skills-417bOj4o.js} +1 -1
- package/dist/{skills-Ce4C2dq1.js → skills-B9U465B7.js} +2 -2
- package/dist/{snapshot-DHPih65J.js → snapshot-C2j96x97.js} +4 -4
- package/dist/{snapshot-cache-MPinwwgZ.d.ts → snapshot-cache-Cc7VNabe.d.ts} +1 -1
- package/dist/solid/index.d.ts +6 -7
- package/dist/solid/index.js +2 -2
- package/dist/solid-start/index.d.ts +6 -6
- package/dist/solid-start/index.js +3 -3
- package/dist/{sources-sgQlMfmz.d.ts → sources-BfTza0zT.d.ts} +1 -1
- package/dist/{src-B8SQNsvw.js → src-BG9YJM3Q.js} +97 -247
- package/dist/ssf/index.d.ts +3 -3
- package/dist/ssf/index.js +3 -3
- package/dist/{standard-webhooks-CFZIYtBF.d.ts → standard-webhooks-CJBgfl7y.d.ts} +2 -2
- package/dist/{store-CSOsXd5s.js → store-BpKH-pLm.js} +2 -2
- package/dist/{store-Dpg_fSNQ.d.ts → store-DSyjHD5-.d.ts} +5 -5
- package/dist/{store-options-CDvoX52-.js → store-options-CXv6BHH6.js} +5 -6
- package/dist/{stores-PpYVQ5yF.js → stores-BuqAHjp_.js} +1 -1
- package/dist/{stores-C2A6KsxE.d.ts → stores-C6-7TPTV.d.ts} +6 -7
- package/dist/{postgrest-BrjrckDG.js → subject-BqFwS6l3.js} +214 -319
- package/dist/subject-cache-BT1fGuea.js +193 -0
- package/dist/subject-cache-d_Z4KAnm.d.ts +144 -0
- package/dist/supabase/index.d.ts +6 -5
- package/dist/supabase/index.js +3 -2
- package/dist/supabase/middleware.d.ts +6 -6
- package/dist/supabase/middleware.js +6 -6
- package/dist/{supabase-zL7PC3RG.js → supabase-D0J99yqL.js} +2 -2
- package/dist/{supabase-CVZuytCC.js → supabase-DnazO6W4.js} +3 -3
- package/dist/{supabase-hook-BCSwK5x-.js → supabase-hook-Bh5syR9N.js} +174 -62
- package/dist/supabase-hook-CVAenq-w.js +1 -0
- package/dist/{supautils-7UES0i4a.js → supautils-ChXR-4Or.js} +302 -43
- package/dist/{support-session-BsmPCbz8.js → support-session-BGeEYDSq.js} +2 -2
- package/dist/svelte/index.d.ts +5 -5
- package/dist/svelte/index.js +3 -3
- package/dist/svelte/runtime.d.ts +3 -3
- package/dist/svelte/runtime.js +1 -1
- package/dist/svelte/source.d.ts +5 -5
- package/dist/svelte/source.js +2 -2
- package/dist/sveltekit/index.d.ts +6 -6
- package/dist/sveltekit/index.js +2 -2
- package/dist/{tables-DSX_Ma_n.js → tables-CbEOy2Ma.js} +137 -55
- package/dist/tanstack-start/index.d.ts +6 -6
- package/dist/tanstack-start/index.js +2 -2
- package/dist/{tenancy-DvOHHk3-.js → tenancy-BlxY5T0q.js} +2 -2
- package/dist/terminal/index.d.ts +6 -6
- 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 +35 -2
- package/dist/testing/fixtures/index.js +39 -2
- package/dist/testing/index.d.ts +41 -25
- package/dist/testing/index.js +114 -26
- package/dist/testing/saas/index.d.ts +5 -5
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.d.ts +1 -1
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/trpc/index.d.ts +6 -6
- package/dist/trpc/index.js +4 -4
- package/dist/{type-helpers-BjOLGVy1.d.ts → type-helpers-iXJEIDe7.d.ts} +3 -4
- package/dist/{types-p8mhWTcR.d.ts → types-B9F0EZAF.d.ts} +3 -3
- package/dist/{types-DZwEOsK1.d.ts → types-BSNZMp5b.d.ts} +1 -1
- package/dist/{types-DnzRZjEu.d.ts → types-BpxdxaRD.d.ts} +5 -5
- package/dist/{types-C5p2hoBR.d.ts → types-CD1qmxdx.d.ts} +4 -4
- package/dist/{types-D1NjjwI4.d.ts → types-CS1DI_Ke.d.ts} +40 -9
- package/dist/{types-CMclYgSk.d.ts → types-C_a44wSr.d.ts} +3 -3
- package/dist/{types-DBVSljAx.d.ts → types-Cq2rvv-C.d.ts} +3 -3
- package/dist/{types--_lpWUGV.d.ts → types-CuDXvyIT.d.ts} +5 -5
- package/dist/{types-7Vlz1Wi2.d.ts → types-DAyp592k.d.ts} +2 -2
- package/dist/{types-Drs3OOAy.d.ts → types-NikV1pND.d.ts} +4 -4
- package/dist/{types-BzxA2OAD.d.ts → types-ZfjQB0KC.d.ts} +2 -2
- package/dist/{types-D8JVDWOr.d.ts → types-_pi9kxS2.d.ts} +2 -2
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +1 -1
- package/dist/{usage-CUnw73Y-.js → usage-0wsl83uw.js} +10 -10
- package/dist/{usage-BcAqmjkj.js → usage-Bl-BkXEq.js} +1 -1
- package/dist/usage-CmyGbo4e.js +1 -0
- package/dist/{validation-error-DkOK9zUE.d.ts → validation-error-DLAYFlkr.d.ts} +1 -1
- package/dist/{verify-V08pirDB.js → verify-BSLotSa0.js} +41 -24
- package/dist/version-sources-BC3hf2ME.js +34 -0
- package/dist/{permission-types-CAY-GU7e.d.ts → vocabulary-DeZvUaTw.d.ts} +69 -1
- package/dist/vue/index.d.ts +6 -7
- package/dist/vue/index.js +2 -2
- package/dist/{waiter-BjVI_Byg.d.ts → waiter-cbK1CBhT.d.ts} +2 -2
- package/dist/{watch-Dz2LNM1R.js → watch-BigZ260i.js} +2 -2
- package/dist/watch-CHURMgrv.js +1 -0
- package/dist/webmcp/index.d.ts +2 -2
- package/dist/{who-can-CZeAwQZD.js → who-can-CjfMP9a4.js} +8 -8
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.js +6 -5
- package/dist/workflow-sdk/index.d.ts +5 -5
- package/dist/{wrap-CE5lxje7.d.ts → wrap-B-k2qHJx.d.ts} +2 -2
- package/package.json +16 -4
- package/skills/permdock-wire/references/presets-and-recipes.md +2 -2
- package/dist/better-supabase-ayun1IKE.js +0 -122
- package/dist/catalog-BTPySmbp.js +0 -1
- package/dist/collect-eSTXOZDC.js +0 -1
- package/dist/index-B_I6N8Ju.d.ts +0 -222
- package/dist/load-CjnlPxpL.js +0 -1
- package/dist/powersync-Cs1E04s6.js +0 -1
- package/dist/pull-BLT25Y5C.js +0 -1
- package/dist/run-CW0QsyA9.js +0 -1
- package/dist/supabase-hook-7XxWGHQF.js +0 -1
- package/dist/usage-BdIS9NfN.js +0 -1
- package/dist/version-cache-q5cpaDSt.d.ts +0 -57
- package/dist/vocabulary-DEJ5j4mR.d.ts +0 -70
- package/dist/watch-CS69ftMP.js +0 -1
- package/dist/where-scope-BAyOsPQW.js +0 -332
- package/dist/{approval-normalize-hlfO9BJv.js → approval-normalize-DNLW0zOM.js} +1 -1
- package/dist/{body-C9JbIoqb.js → body-B3ylkmmE.js} +1 -1
- package/dist/{catalog-doc-nrgfbh8I.js → catalog-doc-Zi0jRpyH.js} +2 -2
- package/dist/{device-BwbJNmb2.js → device-BkSynWdg.js} +1 -1
- package/dist/{prompt-BYc6drYW.js → prompt-D1Gj1W4Y.js} +1 -1
- package/dist/{scim-C30QBBoF.js → scim-BG6uPUeW.js} +1 -1
- package/dist/{wrap-C5PWzgkq.js → wrap-BKU5Arsu.js} +1 -1
|
@@ -2,17 +2,16 @@ import { a as getResource } from "./permission-registry-B8tYxPIt.js";
|
|
|
2
2
|
import { u as usageResult } from "./errors-BhRkoNS7.js";
|
|
3
3
|
import { a as rel, r as listSourceFiles } from "./files-BSjrtIHw.js";
|
|
4
4
|
import { o as USAGE_REPORT_SCHEMA } from "./version-DMQ0dnN5.js";
|
|
5
|
-
import { c as jsonSchemaOf } from "./catalog-doc-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { c as jsonSchemaOf } from "./catalog-doc-Zi0jRpyH.js";
|
|
6
|
+
import { n as jiti, r as parseSync, t as createVisitor } from "./optional-8TKc-0j4.js";
|
|
7
|
+
import { a as loadModule, n as asPolicy, s as pickNamed } from "./load-C4p4VgwR.js";
|
|
8
|
+
import { r as runCollect } from "./collect-Cr71JA7z.js";
|
|
8
9
|
import { t as beforeFirst } from "./text-BMFRfBqc.js";
|
|
9
|
-
import { t as DOCS_BASE } from "./manifest-
|
|
10
|
-
import { r as findingOf } from "./output-
|
|
10
|
+
import { t as DOCS_BASE } from "./manifest-BAf7cgRx.js";
|
|
11
|
+
import { r as findingOf } from "./output-CYgfpT6o.js";
|
|
11
12
|
import { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
12
13
|
import { dirname, resolve } from "node:path";
|
|
13
14
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
14
|
-
import { createJiti } from "jiti";
|
|
15
|
-
import { Visitor, parseSync } from "oxc-parser";
|
|
16
15
|
import { isBuiltin } from "node:module";
|
|
17
16
|
//#region src/cli/doctor/source.ts
|
|
18
17
|
/**
|
|
@@ -23,6 +22,7 @@ const SERVER_SPECIFIERS = [
|
|
|
23
22
|
"permdock/a2a",
|
|
24
23
|
"permdock/agent",
|
|
25
24
|
"permdock/ai-sdk",
|
|
25
|
+
"permdock/app",
|
|
26
26
|
"permdock/approvals",
|
|
27
27
|
"permdock/astro",
|
|
28
28
|
"permdock/authzen",
|
|
@@ -144,12 +144,12 @@ function realFile(path) {
|
|
|
144
144
|
* `exports`. An unresolvable specifier gives `undefined`.
|
|
145
145
|
*/
|
|
146
146
|
function resolverFor(file) {
|
|
147
|
-
const
|
|
147
|
+
const resolver = jiti().createJiti(file, { tsconfigPaths: dirname(file) });
|
|
148
148
|
const parentURL = pathToFileURL(file);
|
|
149
149
|
return (specifier) => {
|
|
150
150
|
if (specifier === "" || isBuiltin(specifier)) return;
|
|
151
151
|
try {
|
|
152
|
-
const url =
|
|
152
|
+
const url = resolver.esmResolve(specifier, {
|
|
153
153
|
parentURL,
|
|
154
154
|
try: true
|
|
155
155
|
});
|
|
@@ -285,7 +285,7 @@ function permdockOptionObjects(source) {
|
|
|
285
285
|
const namespaces = /* @__PURE__ */ new Set();
|
|
286
286
|
const constants = /* @__PURE__ */ new Map();
|
|
287
287
|
const calls = [];
|
|
288
|
-
|
|
288
|
+
createVisitor({
|
|
289
289
|
ImportDeclaration(node) {
|
|
290
290
|
if (node.importKind === "type" || !isPermDockSpecifier(node.source.value)) return;
|
|
291
291
|
for (const specifier of node.specifiers) if (specifier.type === "ImportNamespaceSpecifier") namespaces.add(specifier.local.name);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as runUsage } from "./usage-0wsl83uw.js";
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { a as sole, r as isRecord } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { l as isConditionRef, o as hasConditionOp } from "./refs-C8BKxc_e.js";
|
|
3
|
-
import {
|
|
3
|
+
import { D as memoryCustomRoleSource, x as memoryRelationSource } from "./src-BG9YJM3Q.js";
|
|
4
4
|
import { c as listPermissions, h as formerKeys, n as findPermission } from "./permission-registry-B8tYxPIt.js";
|
|
5
5
|
import { c as isEdgeRelation, l as isFieldRelation, u as isPrincipalRelation } from "./resource-relations-8-pCScBO.js";
|
|
6
6
|
import { f as nowMillis, u as isoAt } from "./time-nR1JesoH.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { p as scopeField } from "./tenancy-DvOHHk3-.js";
|
|
11
|
-
import { l as policyLevels, t as coveredLevels } from "./policy-CaAME-Rh.js";
|
|
7
|
+
import { c as rootScope, d as scopeList, o as normalizeMemberships } from "./scopes-gdH__vDZ.js";
|
|
8
|
+
import { u as requiresStandIn } from "./condition-evaluate-bVVRSdzq.js";
|
|
9
|
+
import { p as scopeField } from "./tenancy-BlxY5T0q.js";
|
|
12
10
|
import { t as requiresApproval } from "./approval-required-TzNB9oQA.js";
|
|
13
|
-
import {
|
|
14
|
-
import { t as getPermDock } from "./permdock-
|
|
11
|
+
import { t as canonicalJson } from "./canonical-json-DwilZ1iB.js";
|
|
12
|
+
import { t as getPermDock } from "./permdock-B5LyNVgn.js";
|
|
13
|
+
import { l as policyLevels, t as coveredLevels } from "./policy-wGzbAPQF.js";
|
|
14
|
+
import { c as andWhere, m as customRoleScope, v as leveled, y as membershipsClaim } from "./evaluate-B5yZHmts.js";
|
|
15
15
|
import { a as describeError, i as configError, u as usageResult } from "./errors-BhRkoNS7.js";
|
|
16
16
|
import { t as policyRowConditionKeys } from "./row-conditions-BAGHOmVq.js";
|
|
17
17
|
import { s as writeFileEnsuringDir } from "./files-BSjrtIHw.js";
|
|
18
|
-
import { c as jsonSchemaOf } from "./catalog-doc-
|
|
19
|
-
import { o as loadPolicyAt } from "./load-
|
|
18
|
+
import { c as jsonSchemaOf } from "./catalog-doc-Zi0jRpyH.js";
|
|
19
|
+
import { o as loadPolicyAt } from "./load-C4p4VgwR.js";
|
|
20
20
|
import "./budget-BBCPDOGP.js";
|
|
21
21
|
import { i as qualifySqlTable, n as defaultSqlCommand, t as SQL_IDENT } from "./sql-0WjxIp9g.js";
|
|
22
|
-
import { a as scopeMembershipTable, i as scopeColumn } from "./compile-
|
|
22
|
+
import { a as scopeMembershipTable, i as scopeColumn } from "./compile-Cvru58id.js";
|
|
23
23
|
import "./sources-C4vkzZJV.js";
|
|
24
24
|
import { t as beforeFirst } from "./text-BMFRfBqc.js";
|
|
25
|
-
import { t as DOCS_BASE } from "./manifest-
|
|
26
|
-
import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-
|
|
25
|
+
import { t as DOCS_BASE } from "./manifest-BAf7cgRx.js";
|
|
26
|
+
import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-BVZc7OCF.js";
|
|
27
27
|
import { n as pgConnector, t as connectPgPool } from "./pg-Ddxsd5ZB.js";
|
|
28
|
-
import { A as quoteQualified, N as arrayColumnsOf, O as quoteIdent, P as columnTypesOf, _ as subjectClaimJsonSql, a as customRolesOn, j as quoteTable, k as quoteLiteral, r as HELPERS, v as subjectClaimSql } from "./shared-
|
|
29
|
-
import {
|
|
30
|
-
import { c as breakGlassKey, f as compileConditionSql, l as collectGrants, m as sqlFunctionNames, p as contextRefs, s as breakGlassHolder } from "./ownership-
|
|
28
|
+
import { A as quoteQualified, N as arrayColumnsOf, O as quoteIdent, P as columnTypesOf, _ as subjectClaimJsonSql, a as customRolesOn, j as quoteTable, k as quoteLiteral, r as HELPERS, v as subjectClaimSql } from "./shared-DfaIWvIJ.js";
|
|
29
|
+
import { A as tokenScopeAllowsCall, Ct as scopeTable, N as capabilityAccessSql, T as accessSql, c as graphPlan, i as tableNames, r as tableNameOf, tt as apiKeyAllowsCall, w as requiresSql } from "./tables-CbEOy2Ma.js";
|
|
30
|
+
import { c as breakGlassKey, f as compileConditionSql, l as collectGrants, m as sqlFunctionNames, p as contextRefs, s as breakGlassHolder } from "./ownership-adPAsUwY.js";
|
|
31
31
|
import { t as membershipSourcesOf } from "./sources-qoIJQrJv.js";
|
|
32
|
-
import { _ as wrapSql, g as validitySql, m as andSql, s as viewName, t as FIELD_VIEWS } from "./fields-
|
|
32
|
+
import { _ as wrapSql, g as validitySql, m as andSql, s as viewName, t as FIELD_VIEWS } from "./fields-CVyOk-f1.js";
|
|
33
33
|
import { resolve } from "node:path";
|
|
34
34
|
import { createHash, randomUUID } from "node:crypto";
|
|
35
35
|
//#region src/cli/core/ignores.ts
|
|
@@ -269,16 +269,33 @@ function levelReachOf(policy, keys) {
|
|
|
269
269
|
return out.toSorted(([a, x], [b, y]) => a === b ? x < y ? -1 : 1 : a < b ? -1 : 1);
|
|
270
270
|
}
|
|
271
271
|
/**
|
|
272
|
+
* The first word of a camelCase, snake_case or kebab-case compound that is one
|
|
273
|
+
* of the six default verbs: `updateStatus` and `list_archived`. The prefix list
|
|
274
|
+
* is closed; any other verb needs an `rls.actions` entry.
|
|
275
|
+
*/
|
|
276
|
+
const VERB_PREFIX = /^(read|list|get|create|update|delete)(?=[A-Z0-9_-])/u;
|
|
277
|
+
/**
|
|
278
|
+
* The SQL command a compound action name implies through its default-verb
|
|
279
|
+
* prefix, or `undefined` for an exact verb, a configured action or any other
|
|
280
|
+
* name.
|
|
281
|
+
*/
|
|
282
|
+
function inferredCommand(action, actions) {
|
|
283
|
+
if (actions !== void 0 && Object.hasOwn(actions, action) || defaultSqlCommand(action) !== void 0) return;
|
|
284
|
+
const verb = VERB_PREFIX.exec(action)?.[1];
|
|
285
|
+
return verb === void 0 ? void 0 : defaultSqlCommand(verb);
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
272
288
|
* The SQL command `action` compiles to: `rls.actions` first, then the six
|
|
273
|
-
* default verbs
|
|
274
|
-
*
|
|
289
|
+
* default verbs, then a compound whose prefix is one of them ({@link
|
|
290
|
+
* inferredCommand}). Any other verb is `undefined`, as `'none'` is: no policy,
|
|
291
|
+
* and its grants are still seeded.
|
|
275
292
|
*/
|
|
276
293
|
function commandFor(action, actions) {
|
|
277
294
|
if (actions !== void 0 && Object.hasOwn(actions, action)) {
|
|
278
295
|
const configured = actions[action];
|
|
279
296
|
return configured === "none" ? void 0 : configured;
|
|
280
297
|
}
|
|
281
|
-
return defaultSqlCommand(action);
|
|
298
|
+
return defaultSqlCommand(action) ?? inferredCommand(action, actions);
|
|
282
299
|
}
|
|
283
300
|
function tableFor(resource, tables) {
|
|
284
301
|
return tables?.[resource] ?? resource;
|
|
@@ -375,7 +392,7 @@ function prepare(item, tables, warnings, skipClosures, sql, rowActions = false)
|
|
|
375
392
|
const table = tableFor(grant.permission.resource, tables);
|
|
376
393
|
if (command === void 0) {
|
|
377
394
|
if (tableless && item.access.kind !== "role") {
|
|
378
|
-
warnings.push(`skipped ${label}/${grant.permission.key}: rls.tables.${grant.permission.resource} is false, so the resource
|
|
395
|
+
warnings.push(`skipped ${label}/${grant.permission.key}: rls.tables.${grant.permission.resource} is false or a tableOf, so the resource writes no policies of its own, and only role grants are seeded`);
|
|
379
396
|
return;
|
|
380
397
|
}
|
|
381
398
|
if (item.access.kind !== "role" && rowActions) return {
|
|
@@ -1139,7 +1156,7 @@ function emitPgtap(input) {
|
|
|
1139
1156
|
continue;
|
|
1140
1157
|
}
|
|
1141
1158
|
const outcome = status.granted ? "granted" : "denied";
|
|
1142
|
-
const table = tableNameOf(input.config.rls?.tables?.[permission.resource], permission.resource);
|
|
1159
|
+
const table = tableNameOf(input.config.rls?.tables?.[permission.resource], permission.resource, input.config.rls?.tables);
|
|
1143
1160
|
const statement = inlineStatement(statementFor(fixture, permission.action, table));
|
|
1144
1161
|
lines.push(`-- ${label}`, "savepoint permdock_fixture;", ...databaseMode(input.config) ? fixtureMembershipSql(input.config, scopes, fixture, sources) : [], "set local role \"authenticated\";", ...subjectSettings(fixture, subject).map(([name, value]) => `select set_config(${quoteLiteral(name)}, ${quoteLiteral(value)}, true);`), `select is(${PGTAP_DECISION}(${quoteLiteral(statement)}), ${quoteLiteral(outcome)}, ${quoteLiteral(`${label} ${outcome}`)});`, "rollback to savepoint permdock_fixture;");
|
|
1145
1162
|
}
|
|
@@ -1541,7 +1558,7 @@ async function verifyAgainstDatabase(input) {
|
|
|
1541
1558
|
notes.push(`${fixture.action}: rls.tables.${permission.resource} is false, so there is no table`);
|
|
1542
1559
|
continue;
|
|
1543
1560
|
}
|
|
1544
|
-
const table = tableNameOf(input.config.rls?.tables?.[permission.resource], permission.resource);
|
|
1561
|
+
const table = tableNameOf(input.config.rls?.tables?.[permission.resource], permission.resource, input.config.rls?.tables);
|
|
1545
1562
|
await query("begin");
|
|
1546
1563
|
try {
|
|
1547
1564
|
if (seedsTables) await seedCustomRoles(query, schema, input.customRoles, scopes);
|
|
@@ -1716,4 +1733,4 @@ async function runRlsVerify(input) {
|
|
|
1716
1733
|
});
|
|
1717
1734
|
}
|
|
1718
1735
|
//#endregion
|
|
1719
|
-
export { splitIgnored as S,
|
|
1736
|
+
export { splitIgnored as C, parseIgnores as S, INDEX_COLUMNS_SQL as _, verifyResult as a, pruneIndexTargets as b, callsHelper as c, rowConditionMessage as d, commandFor as f, COLUMNS_SQL as g, tableFor as h, verifyIgnores as i, helperCallKeys as l, inferredCommand as m, runRlsVerify as n, HELPER_TABLES as o, compileGrants as p, rlsFinding as r, ROW_CONDITION_FIX as s, canFixture as t, helperTablePolicies as u, indexTargets as v, readTableIndexFacts as x, indexesSql as y };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { _ as claimsFirst } from "./instance-snapshot-D_dGTq--.js";
|
|
2
|
+
//#region src/core/version-sources.ts
|
|
3
|
+
/**
|
|
4
|
+
* The instance options for one version cache: `memberships` wrapped in
|
|
5
|
+
* `claimsFirst(source, { onStale: 'reread', versions })`. One object per cache,
|
|
6
|
+
* so every instance of a subject at one version shares an `instances` entry.
|
|
7
|
+
*/
|
|
8
|
+
function versionSources(input) {
|
|
9
|
+
const byCache = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
let uncached;
|
|
11
|
+
const build = (versions) => ({
|
|
12
|
+
...input.options,
|
|
13
|
+
...input.instances === void 0 ? {} : { instances: input.instances },
|
|
14
|
+
...input.memberships === void 0 ? {} : { memberships: claimsFirst(input.memberships, {
|
|
15
|
+
onStale: "reread",
|
|
16
|
+
...input.version === void 0 ? {} : { version: input.version },
|
|
17
|
+
...versions === void 0 ? {} : { versions }
|
|
18
|
+
}) }
|
|
19
|
+
});
|
|
20
|
+
return (given) => {
|
|
21
|
+
const versions = given ?? input.versions;
|
|
22
|
+
if (versions === void 0) {
|
|
23
|
+
uncached ??= build(void 0);
|
|
24
|
+
return uncached;
|
|
25
|
+
}
|
|
26
|
+
const known = byCache.get(versions);
|
|
27
|
+
if (known !== void 0) return known;
|
|
28
|
+
const created = build(versions);
|
|
29
|
+
byCache.set(versions, created);
|
|
30
|
+
return created;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { versionSources as t };
|
|
@@ -330,4 +330,72 @@ type InferPermissionTree<Input, Prefix extends string = "", X = never> = Input e
|
|
|
330
330
|
*/
|
|
331
331
|
type PermissionsOf<Input, PX = never, RX = never> = InferPermissionTree<Input, "", PX> & ResourceXTree<RX>;
|
|
332
332
|
//#endregion
|
|
333
|
-
|
|
333
|
+
//#region src/core/vocabulary.d.ts
|
|
334
|
+
declare const ROLE_KIND: "role";
|
|
335
|
+
declare const PLAN_KIND: "plan";
|
|
336
|
+
/** `defineRoles` and `definePlans` options. */
|
|
337
|
+
type VocabularyOptions<X = never> = {
|
|
338
|
+
/**
|
|
339
|
+
* A Standard Schema for every leaf's `meta.x`, validated synchronously at
|
|
340
|
+
* definition time. On a role tree it also checks the `meta.x` of custom roles
|
|
341
|
+
* a `CustomRoleSource` returns; an invalid one is dropped, not the role.
|
|
342
|
+
*/
|
|
343
|
+
readonly x?: AppDataSchema<X>;
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* A role's metadata. `audience` names the surface its holders use (`'staff'`,
|
|
347
|
+
* `'portal'`, `'platform'`); `permdock.audiences()` lists the distinct
|
|
348
|
+
* audiences of the roles held in the active scope.
|
|
349
|
+
*/
|
|
350
|
+
type RoleMeta = ActionMeta & {
|
|
351
|
+
readonly audience?: string;
|
|
352
|
+
};
|
|
353
|
+
type Role<K extends string = string> = {
|
|
354
|
+
readonly key: K;
|
|
355
|
+
/** A declared scope name, or the `tenant` / `team` alias. */
|
|
356
|
+
readonly on?: string;
|
|
357
|
+
readonly assignable: boolean;
|
|
358
|
+
readonly meta: RoleMeta;
|
|
359
|
+
/**
|
|
360
|
+
* A shared custom role: the platform defines it for every tenant, and a
|
|
361
|
+
* tenant admin cannot edit it.
|
|
362
|
+
*/
|
|
363
|
+
readonly shared?: true;
|
|
364
|
+
readonly kind: typeof ROLE_KIND;
|
|
365
|
+
};
|
|
366
|
+
type Plan<K extends string = string> = {
|
|
367
|
+
readonly key: K;
|
|
368
|
+
readonly meta: ActionMeta;
|
|
369
|
+
readonly kind: typeof PLAN_KIND;
|
|
370
|
+
};
|
|
371
|
+
type RoleInit = {
|
|
372
|
+
/** A declared scope name, or the `tenant` / `team` alias. */
|
|
373
|
+
readonly on?: string;
|
|
374
|
+
readonly assignable?: boolean;
|
|
375
|
+
readonly meta?: RoleMeta;
|
|
376
|
+
};
|
|
377
|
+
type PlanInit = {
|
|
378
|
+
readonly meta?: ActionMeta;
|
|
379
|
+
};
|
|
380
|
+
type RoleTree = {
|
|
381
|
+
readonly [key: string]: Role;
|
|
382
|
+
};
|
|
383
|
+
type PlanTree = {
|
|
384
|
+
readonly [key: string]: Plan;
|
|
385
|
+
};
|
|
386
|
+
type Vocabulary = {
|
|
387
|
+
readonly permissions?: unknown;
|
|
388
|
+
readonly roles?: RoleTree;
|
|
389
|
+
readonly plans?: PlanTree;
|
|
390
|
+
};
|
|
391
|
+
type InferRoleTree<Input, X = never> = { readonly [K in keyof Input & string]: WithX<Role<K>, X>; };
|
|
392
|
+
type InferPlanTree<Input, X = never> = { readonly [K in keyof Input & string]: WithX<Plan<K>, X>; };
|
|
393
|
+
declare function isRole(value: unknown): value is Role;
|
|
394
|
+
declare function isPlan(value: unknown): value is Plan;
|
|
395
|
+
declare function defineRoles<const Input extends Record<string, RoleInit>, X = never>(input: Input, options?: VocabularyOptions<X>): InferRoleTree<Input, X>;
|
|
396
|
+
declare function definePlans<const Input extends Record<string, PlanInit>, X = never>(input: Input, options?: VocabularyOptions<X>): InferPlanTree<Input, X>;
|
|
397
|
+
declare function listRoles(tree: RoleTree | undefined): readonly Role[];
|
|
398
|
+
declare function listPlans(tree: PlanTree | undefined): readonly Plan[];
|
|
399
|
+
declare function findRole(tree: RoleTree | undefined, key: string): Role | undefined;
|
|
400
|
+
//#endregion
|
|
401
|
+
export { ResourceInit as A, ResourceXTree as B, InferPermissionTree as C, PermissionsOf as D, PermissionTree as E, ResourceOptions as F, RESOURCE_X as G, PERMISSION_ROW as H, ResourceParent as I, MetaValue as J, AppData as K, ResourceRelation as L, ResourceLink as M, ResourceMeta as N, PermissionsOptions as O, ResourceNode as P, ResourceRelationInput as R, FieldRelation as S, PermissionKind as T, POLICY_SCOPES as U, RowOf as V, RESOURCE_NAME as W, ComputedRelation as _, RoleTree as a, EdgeMatch as b, definePlans as c, isPlan as d, isRole as f, ActionMeta as g, ActionList as h, RoleMeta as i, ResourceLevel as j, PrincipalRelation as k, defineRoles as l, listRoles as m, PlanTree as n, Vocabulary as o, listPlans as p, AppDataSchema as q, Role as r, VocabularyOptions as s, Plan as t, findRole as u, EdgeGroup as v, Permission as w, EdgeRelation as x, EdgeGroups as y, ResourceRestricted as z };
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Jn as ApprovalRequiredDecision, N as PolicyVocabulary, Yn as Decision, en as Snapshot, vr as Membership, vt as TokenVerifier } from "../policy-types-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { i as describe, r as DescribeOptions, t as DecisionDescription } from "../describe-DibQM6g-.js";
|
|
1
|
+
import { Jn as ApprovalRequiredDecision, N as PolicyVocabulary, Yn as Decision, en as Snapshot, vr as Membership, vt as TokenVerifier } from "../policy-types-rNfz7t0M.js";
|
|
2
|
+
import { r as Role, w as Permission } from "../vocabulary-DeZvUaTw.js";
|
|
3
|
+
import { d as UncheckedData, s as RowData } from "../permdock-BaB-KQqn.js";
|
|
4
|
+
import { c as requiredPlans } from "../errors-D_JIQJYb.js";
|
|
5
|
+
import { i as describe, r as DescribeOptions, t as DecisionDescription } from "../describe-DVobr5FX.js";
|
|
7
6
|
import { t as PermissionBoundaryState } from "../boundary-C9ck-3uK.js";
|
|
8
|
-
import { _ as TenantView, a as ClientPermDock, c as GateMode, d as PermissionState, g as SubjectView, h as RolesOptions, i as ApprovalState, l as GateView, m as ProviderOptionsBase, o as ClientStatus, p as ProtectedActionView, r as ApprovalHandle, s as FilterResult, u as PermissionSet, v as ActionResult, y as ProtectedAction } from "../store-
|
|
7
|
+
import { _ as TenantView, a as ClientPermDock, c as GateMode, d as PermissionState, g as SubjectView, h as RolesOptions, i as ApprovalState, l as GateView, m as ProviderOptionsBase, o as ClientStatus, p as ProtectedActionView, r as ApprovalHandle, s as FilterResult, u as PermissionSet, v as ActionResult, y as ProtectedAction } from "../store-DSyjHD5-.js";
|
|
9
8
|
import { a as broadcastChannelRefresh, c as visibilityRefresh, i as authzChangeRefresh, n as EventSourceRefreshOptions, o as eventSourceRefresh, r as RefreshTrigger, s as focusRefresh, t as AuthzChangeRefresh } from "../refresh-on-L9UOwATg.js";
|
|
10
9
|
import { t as approvalHeaders } from "../headers-B9jQxjtW.js";
|
|
11
10
|
import { ComputedRef, DefineComponent, MaybeRefOrGetter, Plugin, VNode } from "vue";
|
package/dist/vue/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { n as describe } from "../describe-BZAlPHxT.js";
|
|
|
3
3
|
import { n as boundaryFallback, t as boundaryDigest } from "../boundary-BV3O1eud.js";
|
|
4
4
|
import { n as actionRunner, r as approvalHeaders, t as actionApproval } from "../protected-action-OpOxtTsN.js";
|
|
5
5
|
import { a as livePermDock, c as rolesView, d as subjectView, f as tenantView, i as gateView, l as scopedTenant, n as describeWith, o as permissionSet, r as filterResult, s as protectedView, t as approvalHandle, u as slotContent } from "../views-MWmJ6Y4P.js";
|
|
6
|
-
import { a as eventSourceRefresh, i as broadcastChannelRefresh, l as isPromiseLike, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-
|
|
7
|
-
import { n as switchTenant, t as providerStore } from "../provider-store-
|
|
6
|
+
import { a as eventSourceRefresh, i as broadcastChannelRefresh, l as isPromiseLike, o as focusRefresh, r as authzChangeRefresh, s as visibilityRefresh } from "../store-options-CXv6BHH6.js";
|
|
7
|
+
import { n as switchTenant, t as providerStore } from "../provider-store-D4PU1my_.js";
|
|
8
8
|
import { computed, defineComponent, effectScope, getCurrentScope, inject, isRef, onErrorCaptured, onScopeDispose, provide, shallowRef, toValue, watch } from "vue";
|
|
9
9
|
//#region src/vue/context.ts
|
|
10
10
|
const permDockKey = Symbol("permdock");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { qt as Instant } from "./policy-types-
|
|
2
|
-
import { m as ApprovalStore } from "./types-
|
|
1
|
+
import { qt as Instant } from "./policy-types-rNfz7t0M.js";
|
|
2
|
+
import { m as ApprovalStore } from "./types-ZfjQB0KC.js";
|
|
3
3
|
//#region src/workflow/waiter.d.ts
|
|
4
4
|
type ApprovalWaitOptions = {
|
|
5
5
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as dateAt } from "./time-nR1JesoH.js";
|
|
2
2
|
import { a as describeError } from "./errors-BhRkoNS7.js";
|
|
3
3
|
import { t as defaultSrcPath } from "./files-BSjrtIHw.js";
|
|
4
|
-
import { r as runCollect } from "./collect-
|
|
5
|
-
import { n as isConfigFile, r as loadConfig } from "./config-
|
|
4
|
+
import { r as runCollect } from "./collect-Cr71JA7z.js";
|
|
5
|
+
import { n as isConfigFile, r as loadConfig } from "./config-DyNanTjZ.js";
|
|
6
6
|
import { watch } from "node:fs";
|
|
7
7
|
import { basename, dirname, relative, resolve, sep } from "node:path";
|
|
8
8
|
//#region src/cli/watch.ts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { i as watchCollect } from "./watch-BigZ260i.js";
|
package/dist/webmcp/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Yn as Decision, en as Snapshot } from "../policy-types-
|
|
2
|
-
import {
|
|
1
|
+
import { Yn as Decision, en as Snapshot } from "../policy-types-rNfz7t0M.js";
|
|
2
|
+
import { E as PermissionTree, w as Permission } from "../vocabulary-DeZvUaTw.js";
|
|
3
3
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
4
4
|
//#region src/webmcp/types.d.ts
|
|
5
5
|
type WebMcpClientStatus = "ready" | "pending" | "stale" | "server-only";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as compact } from "./compact-CAf557ZB.js";
|
|
2
2
|
import { n as freezeDeep } from "./freeze-jjan0lCv.js";
|
|
3
3
|
import { r as ownGet } from "./paths-CUvURzHp.js";
|
|
4
|
-
import { n as internalsOf } from "./internals-B3IgHrvo.js";
|
|
5
4
|
import { a as getResource } from "./permission-registry-B8tYxPIt.js";
|
|
6
5
|
import { a as expandRelation, c as isEdgeRelation, l as isFieldRelation, u as isPrincipalRelation } from "./resource-relations-8-pCScBO.js";
|
|
7
|
-
import { s as instantAt } from "./time-nR1JesoH.js";
|
|
8
|
-
import { c as rootScope, d as scopeList, o as normalizeMemberships, s as resolveScope } from "./scopes-BSdYaGHs.js";
|
|
9
6
|
import { o as flattenGrantee } from "./grantee-Dke-9rd1.js";
|
|
7
|
+
import { s as instantAt } from "./time-nR1JesoH.js";
|
|
8
|
+
import { c as rootScope, d as scopeList, o as normalizeMemberships, s as resolveScope } from "./scopes-gdH__vDZ.js";
|
|
9
|
+
import { r as relationCondition } from "./grantee-conditions-Dzprappv.js";
|
|
10
|
+
import { c as nowSeconds, p as scopeField } from "./tenancy-BlxY5T0q.js";
|
|
11
|
+
import { n as internalsOf } from "./internals-B3IgHrvo.js";
|
|
10
12
|
import { t as byCodePoint } from "./compare-DTfyUunF.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { n as relationId, t as pendingRelations } from "./relations-BxvRvDHK.js";
|
|
15
|
-
import { t as relationWalk } from "./relation-walk-DK_gkgL7.js";
|
|
13
|
+
import { D as emptyListeners, t as evaluate } from "./evaluate-B5yZHmts.js";
|
|
14
|
+
import { n as relationId, t as pendingRelations } from "./relations-CMsJ1ARY.js";
|
|
15
|
+
import { t as relationWalk } from "./relation-walk-BDTaTKTM.js";
|
|
16
16
|
//#region src/core/who-can.ts
|
|
17
17
|
const MAX_ROUNDS = 48;
|
|
18
18
|
async function settle(cache) {
|
package/dist/workflow/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as AutomationSource, i as AutomationRequest, l as memoryAutomationSource, n as AutomationDecision, r as AutomationMode, s as MemoryAutomationSource, t as Automation, u as parseAutomation } from "../automation-
|
|
2
|
-
import { i as pollingApprovalWaiter, n as ApprovalWaiter, r as PollingApprovalWaiterOptions, t as ApprovalWaitOptions } from "../waiter-
|
|
3
|
-
import { a as WorkflowPermDockOptions, i as WorkflowPermDock, n as AwaitApprovalOptions, o as createPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-
|
|
1
|
+
import { a as AutomationSource, i as AutomationRequest, l as memoryAutomationSource, n as AutomationDecision, r as AutomationMode, s as MemoryAutomationSource, t as Automation, u as parseAutomation } from "../automation-B20_8UoT.js";
|
|
2
|
+
import { i as pollingApprovalWaiter, n as ApprovalWaiter, r as PollingApprovalWaiterOptions, t as ApprovalWaitOptions } from "../waiter-cbK1CBhT.js";
|
|
3
|
+
import { a as WorkflowPermDockOptions, i as WorkflowPermDock, n as AwaitApprovalOptions, o as createPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-B2tdOygC.js";
|
|
4
4
|
import "../index-CaxrMD1A.js";
|
|
5
5
|
export { type ApprovalWaitOptions, type ApprovalWaiter, type Automation, type AutomationDecision, type AutomationMode, type AutomationOptions, type AutomationRequest, type AutomationSource, type AwaitApprovalOptions, type MemoryAutomationSource, type PollingApprovalWaiterOptions, type StartAutomationResult, type WorkflowPermDock, type WorkflowPermDockOptions, createPermDock, memoryAutomationSource, parseAutomation, pollingApprovalWaiter };
|
package/dist/workflow/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { t as compact } from "../compact-CAf557ZB.js";
|
|
2
2
|
import { n as freezeDeep } from "../freeze-jjan0lCv.js";
|
|
3
|
-
import { a as isId } from "../expiry-6XByK0dm.js";
|
|
4
3
|
import { n as findPermission } from "../permission-registry-B8tYxPIt.js";
|
|
5
4
|
import { n as isThenable } from "../thenable-BNSM1U2R.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { r as isId } from "../ids-DzhJaCUj.js";
|
|
6
|
+
import { t as getPermDock } from "../permdock-B5LyNVgn.js";
|
|
7
|
+
import { n as memoryAutomationSource, r as parseAutomation } from "../automation-BueW05db.js";
|
|
8
|
+
import { r as withApp } from "../app-DIvM65Mv.js";
|
|
8
9
|
import { o as automationEvent } from "../sink-D9_vh372.js";
|
|
9
|
-
import { a as requestApproval, s as resumeDecision } from "../helpers-
|
|
10
|
-
import { i as subjectFromRunTicket, r as signRunTicket } from "../run-ticket-
|
|
10
|
+
import { a as requestApproval, s as resumeDecision } from "../helpers-DzBIfL1N.js";
|
|
11
|
+
import { i as subjectFromRunTicket, r as signRunTicket } from "../run-ticket-Ddxt9OuU.js";
|
|
11
12
|
import { t as pollingApprovalWaiter } from "../waiter-aBLM63_f.js";
|
|
12
13
|
//#region src/workflow/create.ts
|
|
13
14
|
function writeQuietly(sink, event) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Yn as Decision } from "../policy-types-
|
|
2
|
-
import {
|
|
3
|
-
import { a as PermDock } from "../permdock-
|
|
4
|
-
import { n as ApprovalWaiter } from "../waiter-
|
|
5
|
-
import { i as WorkflowPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-
|
|
1
|
+
import { Yn as Decision } from "../policy-types-rNfz7t0M.js";
|
|
2
|
+
import { w as Permission } from "../vocabulary-DeZvUaTw.js";
|
|
3
|
+
import { a as PermDock } from "../permdock-BaB-KQqn.js";
|
|
4
|
+
import { n as ApprovalWaiter } from "../waiter-cbK1CBhT.js";
|
|
5
|
+
import { i as WorkflowPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-B2tdOygC.js";
|
|
6
6
|
//#region src/workflow-sdk/index.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* The part of a Workflow SDK `Hook` the waiter reads: awaiting it suspends the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as PolicyVocabulary } from "./policy-types-
|
|
2
|
-
import { a as PermDock } from "./permdock-
|
|
1
|
+
import { N as PolicyVocabulary } from "./policy-types-rNfz7t0M.js";
|
|
2
|
+
import { a as PermDock } from "./permdock-BaB-KQqn.js";
|
|
3
3
|
//#region src/core/wrap.d.ts
|
|
4
4
|
/** A wrapper an adapter applies to each instance it builds, as `withOtel` does. */
|
|
5
5
|
type PermDockWrap = <V extends PolicyVocabulary>(permdock: PermDock<V>) => PermDock<V>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "permdock",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Typed permissions for TypeScript apps, APIs, databases, and AI agents, with the permdock CLI and test runners.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
@@ -46,6 +46,10 @@
|
|
|
46
46
|
"types": "./dist/index.d.ts",
|
|
47
47
|
"default": "./dist/index.js"
|
|
48
48
|
},
|
|
49
|
+
"./app": {
|
|
50
|
+
"types": "./dist/app/index.d.ts",
|
|
51
|
+
"default": "./dist/app/index.js"
|
|
52
|
+
},
|
|
49
53
|
"./approvals": {
|
|
50
54
|
"types": "./dist/approvals/index.d.ts",
|
|
51
55
|
"default": "./dist/approvals/index.js"
|
|
@@ -319,9 +323,7 @@
|
|
|
319
323
|
"provenance": true
|
|
320
324
|
},
|
|
321
325
|
"dependencies": {
|
|
322
|
-
"@standard-schema/spec": "1.1.0"
|
|
323
|
-
"jiti": "2.7.0",
|
|
324
|
-
"oxc-parser": "0.154.0"
|
|
326
|
+
"@standard-schema/spec": "1.1.0"
|
|
325
327
|
},
|
|
326
328
|
"devDependencies": {
|
|
327
329
|
"@anthropic-ai/claude-agent-sdk": "0.3.303",
|
|
@@ -369,9 +371,11 @@
|
|
|
369
371
|
"h3": "2.0.5",
|
|
370
372
|
"happy-dom": "21.0.4",
|
|
371
373
|
"hono": "4.13.13",
|
|
374
|
+
"jiti": "2.7.0",
|
|
372
375
|
"jose": "6.2.12",
|
|
373
376
|
"kysely": "0.29.7",
|
|
374
377
|
"next": "16.4.2",
|
|
378
|
+
"oxc-parser": "0.154.0",
|
|
375
379
|
"oxlint": "1.89.0",
|
|
376
380
|
"oxlint-tsgolint": "7.0.2004",
|
|
377
381
|
"package-manager-detector": "1.9.0",
|
|
@@ -423,9 +427,11 @@
|
|
|
423
427
|
"fastify": ">=5",
|
|
424
428
|
"h3": ">=2",
|
|
425
429
|
"hono": ">=4",
|
|
430
|
+
"jiti": ">=2",
|
|
426
431
|
"jose": ">=6",
|
|
427
432
|
"kysely": ">=0.27",
|
|
428
433
|
"next": ">=16.3",
|
|
434
|
+
"oxc-parser": ">=0.154",
|
|
429
435
|
"pg": ">=8",
|
|
430
436
|
"pgsql-parser": ">=18",
|
|
431
437
|
"react": ">=19",
|
|
@@ -515,6 +521,9 @@
|
|
|
515
521
|
"hono": {
|
|
516
522
|
"optional": true
|
|
517
523
|
},
|
|
524
|
+
"jiti": {
|
|
525
|
+
"optional": true
|
|
526
|
+
},
|
|
518
527
|
"jose": {
|
|
519
528
|
"optional": true
|
|
520
529
|
},
|
|
@@ -524,6 +533,9 @@
|
|
|
524
533
|
"next": {
|
|
525
534
|
"optional": true
|
|
526
535
|
},
|
|
536
|
+
"oxc-parser": {
|
|
537
|
+
"optional": true
|
|
538
|
+
},
|
|
527
539
|
"pg": {
|
|
528
540
|
"optional": true
|
|
529
541
|
},
|
|
@@ -24,12 +24,12 @@ npx permdock preset decode <code>
|
|
|
24
24
|
|
|
25
25
|
`init` keeps every file that exists unless `--force` is passed, installs nothing and calls no network. It prints the `npm install` line, the `npx shadcn add` line for the recipes and the docs pages to read. Run what it prints, then `permdock doctor`.
|
|
26
26
|
|
|
27
|
-
What `init` writes is the app's own code: `src/permissions.ts`, `src/policy.ts`, `src/permdock.ts` (`
|
|
27
|
+
What `init` writes is the app's own code: `src/permissions.ts`, `src/policy.ts`, `src/permdock.ts` (`definePermDock` with a `profile` from `NODE_ENV`), `src/session.ts`, `src/data.ts`, the framework file and `permdock.config.ts` ([what each choice writes](https://permdock.com/docs/cli/init#generated-files)). With `--auth custom` the session returns `null` until it is wired, so every check denies; a provider's session calls its `subjectFrom*`. With `--backend memory` the loaders return demo rows: replace them, and do not add rules to them.
|
|
28
28
|
|
|
29
29
|
### Who owns what
|
|
30
30
|
|
|
31
31
|
- The `permdock` package owns every rule: evaluation, role ceilings, approval binding, limits, token checks. `npm update` reaches it.
|
|
32
|
-
- The app owns declarations (`definePermissions`, `definePolicy` data, `
|
|
32
|
+
- The app owns declarations (`definePermissions`, `definePolicy` data, `definePermDock` options) and presentation (recipes).
|
|
33
33
|
- Never copy evaluation logic out of the package into the app, and never change a recipe so it decides on its own; it renders what `useGate` returns.
|
|
34
34
|
|
|
35
35
|
`profile: "prod"` throws at startup when a store or limits a feature needs are missing ([apps and profiles](https://permdock.com/docs/concepts/apps)). Do not switch the profile to silence it; pass the store.
|