permdock 0.8.0 → 0.9.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/{action-result-CL-QCITA.d.ts → action-result-BcudBQOF.d.ts} +1 -1
- package/dist/{adoption-scan-BLs67P1l.js → adoption-scan-Ch07MdxN.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-prompt-PYagyQUj.d.ts → approval-prompt-3BqWczTt.d.ts} +1 -1
- package/dist/approvals/index.d.ts +3 -3
- package/dist/{arazzo-3RhGfkAK.js → arazzo-BpS7LnV0.js} +1 -1
- package/dist/{arazzo-B5-ulWif.js → arazzo-CmQaGPkM.js} +2 -2
- package/dist/astro/index.d.ts +4 -4
- package/dist/astro/index.js +1 -1
- package/dist/{audience-BAkBDMqn.js → audience-DTjR8xet.js} +1 -1
- package/dist/authzen/index.d.ts +5 -5
- package/dist/authzen/index.js +1 -1
- package/dist/{automation-DqEoWHBc.d.ts → automation-C6Jg75xq.d.ts} +1 -1
- package/dist/better-auth/index.d.ts +1 -1
- package/dist/better-supabase/index.d.ts +6 -6
- package/dist/better-supabase/index.js +3 -3
- package/dist/{bind-D_sZSVA3.js → bind-BNQA9JK9.js} +7 -3
- package/dist/{bind-Cp2hBHzP.d.ts → bind-YYjvfpB9.d.ts} +12 -7
- package/dist/{build-instance-CNWaYJyr.js → build-instance-BWXqwQYU.js} +1 -1
- package/dist/{capability-ChuiONQU.d.ts → capability-Di9tiUvi.d.ts} +1 -1
- package/dist/{casbin-cbSbhT_k.js → casbin-B7_yS-oo.js} +1 -1
- package/dist/{casbin-H0rKxBx2.js → casbin-bHyIxTNQ.js} +1 -1
- package/dist/catalog/index.d.ts +4 -4
- package/dist/catalog/index.js +2 -2
- package/dist/{catalog-BFpz2EmT.js → catalog-CGlSwU6j.js} +2 -2
- package/dist/catalog-D3oS2GH3.js +1 -0
- package/dist/{catalog-DCspHDc8.js → catalog-amPDr0JQ.js} +1 -1
- package/dist/{catalog-operations-Dadrl7Z-.js → catalog-operations-DeHTrJSV.js} +1 -1
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/chat-sdk/index.d.ts +3 -3
- package/dist/claude-agent/index.d.ts +3 -3
- package/dist/claude-agent/index.js +2 -2
- package/dist/clerk/index.d.ts +2 -2
- package/dist/cli/bin.js +1 -1
- package/dist/cli/index.d.ts +4 -4
- package/dist/cli/index.js +2 -2
- package/dist/cloud/index.d.ts +8 -8
- package/dist/{cloud-BFlGMaak.js → cloud-3kWfjnYy.js} +2 -2
- package/dist/{codemod-DWSN2erG.js → codemod-Bv5i-Mzo.js} +1 -1
- package/dist/{codemod-DLQ9Zpo4.js → codemod-D9Aiii1r.js} +2 -2
- package/dist/{collect-Bzv3le0A.js → collect-B80GYEot.js} +2 -2
- package/dist/collect-D-eroIfV.js +1 -0
- package/dist/{collect-B7ZFAJU3.js → collect-WCl8cJQV.js} +1 -1
- package/dist/compile/index.d.ts +1 -1
- package/dist/{compile-BFzysW3o.d.ts → compile-BEklRUYo.d.ts} +2 -2
- package/dist/{completion-saoYiRFO.js → completion-_bc0OUQ-.js} +1 -1
- package/dist/{config-DBeXXmBF.js → config-D5XrLWpk.js} +1 -1
- package/dist/{config-report-BipSWA6V.js → config-report-BmWIskD7.js} +2 -2
- package/dist/convex/index.d.ts +4 -4
- package/dist/convex/index.js +2 -2
- package/dist/{core-hWIARPDz.d.ts → core-CFepFiDP.d.ts} +2 -2
- package/dist/{core-H-mbhpZc.js → core-DzVINFbU.js} +3 -3
- package/dist/{create-Cq4Uox0f.js → create-6EwRQlig.js} +3 -3
- package/dist/{create-_noSrY1T.js → create-BLPKnJKa.js} +23 -7
- package/dist/{create-BSNrVuxh.d.ts → create-BPUopdfL.d.ts} +7 -7
- package/dist/{create-CM1FciYG.d.ts → create-BamXmeob.d.ts} +6 -6
- package/dist/{create-BVq1lNQE.d.ts → create-DBvUsgzK.d.ts} +4 -4
- package/dist/delivery/index.d.ts +4 -4
- package/dist/delivery/index.js +1 -1
- package/dist/{denied-text-CHNlVInN.d.ts → denied-text-DHldhVUv.d.ts} +1 -1
- package/dist/{describe-ByS9LgHK.d.ts → describe-BbFPBSms.d.ts} +1 -1
- package/dist/{diff-CN8IYhC_.js → diff-BwR1JdP2.js} +1 -1
- package/dist/{diff-iZWV65nC.js → diff-CQegtBAo.js} +2 -2
- package/dist/{doctor-CHD1M9R5.js → doctor-ClRVAtXQ.js} +13 -13
- package/dist/{doctor-D3wo-yuz.js → doctor-LPMYjSqO.js} +2 -2
- package/dist/drizzle/index.d.ts +3 -3
- package/dist/elysia/index.d.ts +4 -4
- package/dist/elysia/index.js +1 -1
- package/dist/{errors-zi_4T-rx.d.ts → errors-BIM4MFsJ.d.ts} +1 -1
- package/dist/{evaluate-Dd8Ta0Ie.js → evaluate-BAmf_AQd.js} +13 -4
- package/dist/{evaluations-z8dQFDaN.d.ts → evaluations-DOWuBpWv.d.ts} +3 -3
- package/dist/eve/index.d.ts +4 -4
- package/dist/eve/index.js +2 -2
- package/dist/express/index.d.ts +4 -4
- package/dist/express/index.js +1 -1
- package/dist/fastify/index.d.ts +4 -4
- package/dist/fastify/index.js +1 -1
- package/dist/{fetch-adapter-C1DCvpqV.d.ts → fetch-adapter-BIbBAtPZ.d.ts} +2 -2
- package/dist/{fetch-adapter-JL43jD3E.js → fetch-adapter-dPTgJVHd.js} +1 -1
- package/dist/{gen-B5kvbAoZ.js → gen-BFfzZSLH.js} +1 -1
- package/dist/{gen-DWCYcMQM.js → gen-BtfFWGbz.js} +2 -2
- package/dist/h3/index.d.ts +4 -4
- package/dist/h3/index.js +2 -2
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +1 -1
- package/dist/{hosted-Cmtxogd0.d.ts → hosted-DVxlLZMe.d.ts} +1 -1
- package/dist/{import-_YqhhwvX.js → import-ACkOrv6g.js} +1 -1
- package/dist/{index-BhxEUY9J.d.ts → index-BinlXeU-.d.ts} +2 -2
- package/dist/{index-B8s204GL.d.ts → index-CV-7DWeD.d.ts} +4 -4
- package/dist/{index-_9UiQIkt.d.ts → index-DJwEgYzA.d.ts} +4 -4
- package/dist/{index-BT5-1VsX.d.ts → index-Dj2qF9VC.d.ts} +1 -1
- package/dist/{index-BW_0MZOS.d.ts → index-vYjMrXyK.d.ts} +62 -9
- package/dist/{index-Bv5iXPqU.d.ts → index-ymept53A.d.ts} +4 -4
- package/dist/index.d.ts +15 -15
- package/dist/index.js +6 -6
- package/dist/{init-cE3A8aXq.js → init-BjuFDYT1.js} +1 -1
- package/dist/{init-Dz_PsHdv.js → init-txYTuW9u.js} +3 -3
- package/dist/{instance-options-B0KXqTrJ.d.ts → instance-options-CoHn-0e8.d.ts} +1 -1
- package/dist/{instance-snapshot--JWiTrvO.js → instance-snapshot-DuWf1cT3.js} +13 -8
- package/dist/jwt/index.d.ts +4 -4
- package/dist/jwt/index.js +1 -1
- package/dist/{kernel-C-fYydV2.js → kernel-qv4cr9w8.js} +4 -4
- package/dist/kysely/index.d.ts +3 -3
- package/dist/{login-D-8tMqzo.js → login-CfImTJGb.js} +3 -3
- package/dist/{login-DplQ0s84.js → login-CgfCTO3F.js} +1 -1
- package/dist/{manifest-Cgiq5oqc.js → manifest-B2QPh19C.js} +35 -35
- package/dist/{map-claims-BNWCJtmP.js → map-claims-C-nv08_n.js} +2 -1
- package/dist/mcp/index.d.ts +8 -8
- package/dist/mcp/index.js +4 -4
- package/dist/nest/index.d.ts +4 -4
- package/dist/nest/index.js +1 -1
- package/dist/next/index.d.ts +16 -9
- package/dist/next/index.js +14 -7
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +1 -1
- package/dist/node/index.d.ts +4 -4
- package/dist/node/index.js +1 -1
- package/dist/openai/index.d.ts +4 -4
- package/dist/openai/index.js +3 -3
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{openapi-VeHHU2l9.js → openapi-BGeuunWC.js} +1 -1
- package/dist/{openapi-CBZUhA3l.js → openapi-BIpw3Mb7.js} +2 -2
- package/dist/orpc/index.d.ts +5 -5
- package/dist/orpc/index.js +2 -2
- package/dist/otel/index.d.ts +3 -3
- package/dist/{output-tkju6U7R.js → output-DV5dwOTs.js} +1 -1
- package/dist/{ownership-B4L59T9u.js → ownership-DA5YdYTm.js} +9 -4
- package/dist/{parse-local-manifest-BQhTlLQS.d.ts → parse-local-manifest-CCmbhnxP.d.ts} +1 -1
- package/dist/pdp/index.d.ts +3 -3
- package/dist/pdp/index.js +1 -1
- package/dist/{permdock-L-_I_3zP.js → permdock-BvjivVb9.js} +143 -107
- package/dist/{permdock-B6Sf4T_S.d.ts → permdock-CprAPN3w.d.ts} +9 -2
- package/dist/{permissions-mDcTWoBs.js → permissions-CYcHj_w7.js} +1 -1
- package/dist/{policy-Ba4bDhaj.d.ts → policy-BycVKnXv.d.ts} +1 -1
- package/dist/{policy-from-catalog-CJgOm6aq.js → policy-from-catalog-CU3An8uP.js} +1 -1
- package/dist/{policy-types-CCiDRZBH.d.ts → policy-types-DGIO_gxq.d.ts} +54 -18
- package/dist/{postgrest-D4nuPXIQ.js → postgrest-5Dr3W64L.js} +34 -55
- package/dist/{postgrest-DicQyqm-.d.ts → postgrest-D5nUGm-c.d.ts} +4 -3
- package/dist/powersync-B701tvhE.js +1 -0
- package/dist/{powersync-DXqGuq9A.js → powersync-Bg8u-JcR.js} +2 -2
- package/dist/{powersync-DHNQX06W.js → powersync-CJrT1DSc.js} +5 -5
- package/dist/prisma/index.d.ts +2 -2
- package/dist/{protected-action-BE7N_Luo.d.ts → protected-action-D8x73IGm.d.ts} +6 -6
- package/dist/{provider-DXfq5c2d.d.ts → provider-DfLeek9O.d.ts} +1 -1
- package/dist/{pull-CwpGaQSi.js → pull-2nJr0qg_.js} +1 -1
- package/dist/pull-C3EEGzSw.js +1 -0
- package/dist/{push-DgssgzkK.js → push-Bn-lMEmI.js} +2 -2
- package/dist/{pushed-policy-ITwYKvvH.js → pushed-policy-CDuOL2de.js} +1 -1
- package/dist/{pushed-policy-D1Eoi6NM.d.ts → pushed-policy-CryQheKq.d.ts} +1 -1
- package/dist/react/index.d.ts +7 -7
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react-native/index.d.ts +9 -9
- package/dist/{replay-DNftIb_R.d.ts → replay-Bs9Df2fQ.d.ts} +1 -1
- package/dist/{request-context-C25ilqiJ.js → request-context-Duzdf0cd.js} +1 -1
- package/dist/resend/index.d.ts +4 -4
- package/dist/{resolve-names-CF7xXLSG.js → resolve-names-ConCSj1y.js} +1 -1
- package/dist/{rls-Ca8Jz9b5.js → rls-Ba9wN0SP.js} +1 -1
- package/dist/{rls-CNEH2_BG.js → rls-Cx0dtsB7.js} +20 -13
- package/dist/{rpc-fNqAIqQk.js → rpc-vHIwyXCp.js} +1 -1
- package/dist/run-Ck22anC2.js +1 -0
- package/dist/{run-Bz26OTfO.js → run-PbRlXTfh.js} +2 -2
- package/dist/{run-ticket-DbWI9f99.d.ts → run-ticket-B2o2Kxz8.d.ts} +2 -2
- package/dist/{saas-iWnUdwCt.js → saas-DK4V-3Is.js} +2 -2
- package/dist/{scan-DCj1KQfn.js → scan-CRTj6fke.js} +1 -1
- package/dist/{schema-Dst9I9Gs.js → schema-BTsE1WRT.js} +1 -1
- package/dist/scim/index.d.ts +1 -1
- package/dist/server/index.d.ts +10 -10
- package/dist/server/index.js +1 -1
- package/dist/{server-types-CIlpSA2G.d.ts → server-types-CyRN0-Cd.d.ts} +15 -8
- package/dist/{sink-Dvi7YZG_.d.ts → sink-B5zoUW_O.d.ts} +2 -2
- package/dist/{skills-OuoMR49L.js → skills-C9uKfSF5.js} +1 -1
- package/dist/{skills-Bjj7BNEQ.js → skills-CQQcuGBi.js} +1 -1
- package/dist/{snapshot-cache-BAXZ0KOp.d.ts → snapshot-cache-BjAWkchD.d.ts} +1 -1
- package/dist/solid/index.d.ts +6 -6
- package/dist/solid-start/index.d.ts +4 -4
- package/dist/solid-start/index.js +2 -2
- package/dist/{sources-B1Os_YUu.d.ts → sources-CWG32C0G.d.ts} +2 -2
- package/dist/{src-DZ0l9UAg.js → src-C_pi2Rnh.js} +106 -5
- package/dist/ssf/index.d.ts +3 -3
- package/dist/{standard-webhooks-C-qX4mJW.d.ts → standard-webhooks-DOYEuOLx.d.ts} +2 -2
- package/dist/{stores-C0Kta5Ft.d.ts → stores-DZJvxFIZ.d.ts} +6 -6
- package/dist/{stream-ltuLdtTG.d.ts → stream-9y9qw51m.d.ts} +1 -1
- package/dist/supabase/index.d.ts +5 -5
- package/dist/supabase/index.js +2 -2
- package/dist/supabase/middleware.d.ts +5 -5
- package/dist/supabase/middleware.js +4 -4
- package/dist/{supabase-BL1qJzzY.js → supabase-DnMMg5Fn.js} +1 -1
- package/dist/{supabase-D39cuGPt.js → supabase-SBs3MYUE.js} +2 -2
- package/dist/supabase-hook-C0FyEACZ.js +1 -0
- package/dist/{supabase-hook-B-yXnzUl.js → supabase-hook-CrgU06WH.js} +5 -5
- package/dist/{supautils-BU-pAEpf.js → supautils-ByezN3b8.js} +244 -197
- package/dist/svelte/index.d.ts +6 -6
- package/dist/svelte/runtime.d.ts +3 -3
- package/dist/svelte/source.d.ts +6 -6
- package/dist/sveltekit/index.d.ts +4 -4
- package/dist/sveltekit/index.js +1 -1
- package/dist/{tables-DeMNEy6V.js → tables-BqrxBCir.js} +1 -1
- package/dist/tanstack-start/index.d.ts +4 -4
- package/dist/tanstack-start/index.js +1 -1
- package/dist/terminal/index.d.ts +5 -5
- package/dist/terminal/index.js +2 -2
- package/dist/testing/core.d.ts +1 -1
- package/dist/testing/core.js +1 -1
- package/dist/testing/index.d.ts +21 -20
- package/dist/testing/index.js +61 -8
- package/dist/testing/saas/index.d.ts +3 -3
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/trpc/index.d.ts +5 -5
- package/dist/trpc/index.js +2 -2
- package/dist/{type-helpers-BIPIDa6a.d.ts → type-helpers-c7Xo_2Cu.d.ts} +1 -1
- package/dist/{types-B2mlGuhW.d.ts → types-B2efzoSX.d.ts} +1 -1
- package/dist/{types-DHKPcqzr.d.ts → types-B6ExllNo.d.ts} +2 -2
- package/dist/{types-AMJ5qoU_.d.ts → types-BB-zWDcR.d.ts} +4 -4
- package/dist/{types-ah9NlU6j.d.ts → types-BMVDHvI0.d.ts} +1 -1
- package/dist/{types-djVzLlIV.d.ts → types-CEinc15V.d.ts} +4 -4
- package/dist/{types-yUuPR5Hy.d.ts → types-CN0LsqbK.d.ts} +3 -3
- package/dist/{types-HzqOtvsJ.d.ts → types-CWBsAwqn.d.ts} +4 -4
- package/dist/{types-DC1Loeh3.d.ts → types-CzOeVvcC.d.ts} +5 -3
- package/dist/{types-B_tiYvk8.d.ts → types-DLvhVm1r.d.ts} +1 -1
- package/dist/{types-B4uqKDnp.d.ts → types-DlelvQk4.d.ts} +2 -2
- package/dist/{types-DjuMBNF9.d.ts → types-DsHGPtkR.d.ts} +2 -2
- package/dist/{types-BJk0BKRX.d.ts → types-rCRV4Ge-.d.ts} +4 -4
- package/dist/{types-B_d_g7T3.d.ts → types-tQB2CEnY.d.ts} +4 -4
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +1 -1
- package/dist/usage-0hjZPIRX.js +1 -0
- package/dist/{usage-CxEzS4ey.js → usage-B9EtHWLa.js} +3 -3
- package/dist/{usage-ab0PdusX.js → usage-CBzgwfIs.js} +1 -1
- package/dist/{validation-error-YGg2mXyH.d.ts → validation-error-uvp-kyfO.d.ts} +1 -1
- package/dist/{verify-DZeqoWu5.js → verify-DlUcTDBz.js} +6 -6
- package/dist/vue/index.d.ts +6 -6
- package/dist/{waiter-Bu9zAlE0.d.ts → waiter-CqUKX6CY.d.ts} +2 -2
- package/dist/{watch-Cx_WciLE.js → watch-BFDKqmUa.js} +1 -1
- package/dist/watch-ClLuO2TL.js +1 -0
- package/dist/webmcp/index.d.ts +1 -1
- package/dist/{who-can-rI7dCR9Q.js → who-can-BoDJm0Nc.js} +1 -1
- package/dist/workflow/index.d.ts +3 -3
- package/dist/workflow/index.js +1 -1
- package/dist/workflow-sdk/index.d.ts +4 -4
- package/dist/{wrap-DlJE3gS_.d.ts → wrap-DxXB54Wu.d.ts} +2 -2
- package/package.json +2 -2
- package/skills/permdock-data/references/queries-and-rls.md +1 -1
- package/skills/permdock-wire/references/adapters.md +2 -1
- package/dist/catalog-mRQQQhNK.js +0 -1
- package/dist/collect-B5BL3klN.js +0 -1
- package/dist/powersync-Djf-zCpB.js +0 -1
- package/dist/pull-B65ndFNZ.js +0 -1
- package/dist/run-D-JE8QWb.js +0 -1
- package/dist/supabase-hook-H-MtE9Wd.js +0 -1
- package/dist/usage-CYeXek0p.js +0 -1
- package/dist/watch-DB42U1ib.js +0 -1
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-C6Jg75xq.js";
|
|
2
|
+
import { i as pollingApprovalWaiter, n as ApprovalWaiter, r as PollingApprovalWaiterOptions, t as ApprovalWaitOptions } from "../waiter-CqUKX6CY.js";
|
|
3
|
+
import { a as WorkflowPermDockOptions, i as WorkflowPermDock, n as AwaitApprovalOptions, o as createPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-BamXmeob.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
|
@@ -3,7 +3,7 @@ import { n as freezeDeep } from "../freeze-jjan0lCv.js";
|
|
|
3
3
|
import { n as findPermission } from "../permission-registry-B8tYxPIt.js";
|
|
4
4
|
import { n as isThenable } from "../thenable-BNSM1U2R.js";
|
|
5
5
|
import { n as memoryAutomationSource, r as parseAutomation } from "../automation-x3KEUusw.js";
|
|
6
|
-
import { l as withApp, t as getPermDock } from "../permdock-
|
|
6
|
+
import { l as withApp, t as getPermDock } from "../permdock-BvjivVb9.js";
|
|
7
7
|
import { o as automationEvent } from "../sink-D9_vh372.js";
|
|
8
8
|
import { a as requestApproval, s as resumeDecision } from "../helpers-DJicaG6f.js";
|
|
9
9
|
import { i as subjectFromRunTicket, r as signRunTicket } from "../run-ticket-Dv7aF7Dk.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Un as Decision } from "../policy-types-DGIO_gxq.js";
|
|
2
2
|
import { u as Permission } from "../permission-types-CAY-GU7e.js";
|
|
3
|
-
import { a as PermDock } from "../permdock-
|
|
4
|
-
import { n as ApprovalWaiter } from "../waiter-
|
|
5
|
-
import { i as WorkflowPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-
|
|
3
|
+
import { a as PermDock } from "../permdock-CprAPN3w.js";
|
|
4
|
+
import { n as ApprovalWaiter } from "../waiter-CqUKX6CY.js";
|
|
5
|
+
import { i as WorkflowPermDock, r as StartAutomationResult, t as AutomationOptions } from "../create-BamXmeob.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 { j as PolicyVocabulary } from "./policy-types-
|
|
2
|
-
import { a as PermDock } from "./permdock-
|
|
1
|
+
import { j as PolicyVocabulary } from "./policy-types-DGIO_gxq.js";
|
|
2
|
+
import { a as PermDock } from "./permdock-CprAPN3w.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.9.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",
|
|
@@ -364,7 +364,7 @@
|
|
|
364
364
|
"fastest-levenshtein": "1.0.16",
|
|
365
365
|
"fastify": "5.12.7",
|
|
366
366
|
"h3": "2.0.2",
|
|
367
|
-
"happy-dom": "
|
|
367
|
+
"happy-dom": "21.0.4",
|
|
368
368
|
"hono": "4.13.13",
|
|
369
369
|
"jose": "6.2.12",
|
|
370
370
|
"kysely": "0.29.6",
|
|
@@ -36,7 +36,7 @@ pnpm exec permdock rls verify --introspect
|
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
- List the scope instances a permission reaches in process with `permdock.permittedIds(permission, scope, { within })`, never a loop of `can` over memberships with a made-up row.
|
|
39
|
-
- Generated policies call `permdock_has('<key>')` and one `permitted_<scope>_ids('<key>')` per declared scope, which Postgres runs once per statement. Hand-written policies that only need membership (an organization switcher) call `member_<scope>_ids()` instead of inventing a permission key. A policy that passes a user id, such as better-supabase's team sharing, calls `member_team_ids_of(<user>)` on Supabase: it answers only when the id is the caller's. Trusted SQL that acts for a stored user (a job, a trigger, a deferred approval) calls `permdock_has_for(p_user, '<key>')` and `permitted_<scope>_ids_for(p_user, '<key>')` in `database` mode, or the generated `permitted_<resource>_rows_for`, never a hand-written function that rewrites `request.jwt.claims`. With `rls.rowHelpers`, a hand-written policy or function that needs the rows a permission reaches through the graph calls `permitted_<resource>_rows('<permission key>')` instead of restating closure walks, link hops and `includes`. A table's own `select` or `insert` policy calls the row-valued `permitted_<resource>_row(<table>, '<permission key>')` instead, so `insert ... returning` sees the new row. Hand-written policies and functions that apply no row condition call `permitted_<scope>_ids_by_permission('<permission key>')` or `permdock_has_permission('<permission key>')` instead of spelling a positional `#n` grant key. A screen or RPC that checks many permissions on one organization calls `permitted_<scope>_permission_keys(<id>)` once (or `(<id>, array['<key>', ...])` for a few keys) instead of one helper call per key. A role editor or admin screen lists a role's keys with `permdock_role_permissions(p_role, p_scope, p_tenant, p_scope_id)` (declared roles, and custom roles of the caller's tenant in `database` mode) and the catalog with `permdock_permission_keys()` (`permdock_permission_keys('<scope>')` for the keys a role on that scope can hold), instead of joining `role_permissions` and the custom-role tables by hand; server code reads any tenant's roles with `permdock_trusted_role_permissions`, granted through `rls.trustedReaders`. Set `--tenant-type` (or `rls.scopeTypes`, keyed by scope name or `tenant` and `team`) to the scope columns' types.
|
|
39
|
+
- Generated policies call `permdock_has('<key>')` and one `permitted_<scope>_ids('<key>')` per declared scope, which Postgres runs once per statement. Hand-written policies that only need membership (an organization switcher) call `member_<scope>_ids()` instead of inventing a permission key. A policy that passes a user id, such as better-supabase's team sharing, calls `member_team_ids_of(<user>)` on Supabase: it answers only when the id is the caller's. Trusted SQL that acts for a stored user (a job, a trigger, a deferred approval) calls `permdock_has_for(p_user, '<key>')` and `permitted_<scope>_ids_for(p_user, '<key>')` in `database` mode, or the generated `permitted_<resource>_rows_for`, never a hand-written function that rewrites `request.jwt.claims`. With `rls.rowHelpers`, a hand-written policy or function that needs the rows a permission reaches through the graph calls `permitted_<resource>_rows('<permission key>')` instead of restating closure walks, link hops and `includes`. A table's own `select` or `insert` policy calls the row-valued `permitted_<resource>_row(<table>, '<permission key>')` instead, so `insert ... returning` sees the new row. A function that checks a known set of rows (one tenant's, a page, a batch) calls `permitted_<resource>_rows('<permission key>', <text[] of ids>)`, which reads only those ids, instead of the one-argument form, which reads the whole table, or a `permitted_<resource>_row` call per row. Hand-written policies and functions that apply no row condition call `permitted_<scope>_ids_by_permission('<permission key>')` or `permdock_has_permission('<permission key>')` instead of spelling a positional `#n` grant key. A screen or RPC that checks many permissions on one organization calls `permitted_<scope>_permission_keys(<id>)` once (or `(<id>, array['<key>', ...])` for a few keys) instead of one helper call per key. A role editor or admin screen lists a role's keys with `permdock_role_permissions(p_role, p_scope, p_tenant, p_scope_id)` (declared roles, and custom roles of the caller's tenant in `database` mode) and the catalog with `permdock_permission_keys()` (`permdock_permission_keys('<scope>')` for the keys a role on that scope can hold), instead of joining `role_permissions` and the custom-role tables by hand; server code reads any tenant's roles with `permdock_trusted_role_permissions`, granted through `rls.trustedReaders`. Set `--tenant-type` (or `rls.scopeTypes`, keyed by scope name or `tenant` and `team`) to the scope columns' types.
|
|
40
40
|
- `--authorize database` (default) reads the membership tables per statement; map each under `rls.memberships.scopes.<scope>` with `columns` for its id and its ancestors', and `via` so roles with `for` apply: a column name, or `{ value: 'staff' }` when every row has that kind (never add a generated column for it). `--authorize jwt` reads token claims and stays stale until the token refreshes; keep the token lifetime at 3600 seconds or less (PD019).
|
|
41
41
|
- When the role column holds values that are not role keys, give the membership source `role: { column, map: { value: 'role' } }`; a value mapped to `null` grants nothing. `permdock rls explain` prints the tables, membership sources, custom roles table and triggers a generate run binds to, without writing a file. `rls.seeds: 'function'` writes the `role_permissions` rows as `<schema>.seed()` instead of inserts; run `select <schema>.seed();` after each deploy, and PD054 checks the function body.
|
|
42
42
|
- `rls verify --introspect` checks each `security definer` helper by its full signature, so every overload is checked on its own. A helper finding id names the signature (`helper-definer:permdock.permdock_has(text):helper`); write `rls.verify.ignore` entries with it.
|
|
@@ -517,7 +517,8 @@ Supabase specifics for generated RLS (the generic flags and parity checks are in
|
|
|
517
517
|
- Under `migra`, generate `--split helpers,seeds,policies,hook --out supabase/schemas/identity/056_permdock_{part}.sql --seeds-out supabase/migrations/` and write the schema and function privileges and the `security_invoker` view option with `--grants-out` into a migration created by `supabase migration new` after the first `db diff`; `db diff` drops those, so never append them to a migration by hand. Table grants and policies stay in the schema files, where `db diff` keeps them. Keep the helpers part ahead of every file that calls the helpers in `schema_paths` (`permdock doctor` PD042, PD043).
|
|
518
518
|
- `--authorize jwt` reads the hook's claims: enable the printed `[auth.hook.custom_access_token]` stanza in `supabase/config.toml`. The generated hook writes the canonical `memberships` claim from the `rls.memberships.scopes` tables, so do not hand-write one.
|
|
519
519
|
- For more than one membership table, declare `tableMembershipSource` / `junctionMembershipSource` sources once (from `permdock/supabase`, with a `query` on the server), pass the array as `memberships` (wrapped in `claimsFirst(sources, { version: authzVersion({ query }) })` to trust the token until it is truncated or stale), put the same sources under `supabase.hook.memberships` in `permdock.config.ts`, and run `permdock supabase hook generate`; add the printed `config.toml` block (`jwt_expiry = 900`). List member-removal and payout permissions in `definePolicy({ fresh })`.
|
|
520
|
-
- When the server has only supabase-js (no `SqlQuery`), never re-read memberships, global roles or custom roles with the admin client: grant `subject_for(p_user)` and `authz_version_for(p_user)` (written next to the hook) to the backend role, expose them through `public` wrappers when `permdock` is not an exposed schema, and use `postgrestSources(admin, { schema, fn, versionFn, policy })`: `claimsFirst(sources.memberships)` (with `onStale: 'reread'` a fresh token costs one version call, and with `policy` a token that claims a custom role costs one `subject_for` call), `customRoles: sources.customRoles(principal)`, and `await sources.subject(userId)` for a job acting for a stored user.
|
|
520
|
+
- When the server has only supabase-js (no `SqlQuery`), never re-read memberships, global roles or custom roles with the admin client: grant `subject_for(p_user)` and `authz_version_for(p_user)` (written next to the hook) to the backend role, expose them through `public` wrappers when `permdock` is not an exposed schema, and use `postgrestSources(admin, { schema, fn, versionFn, policy })`: `claimsFirst(sources.memberships)` (with `onStale: 'reread'` a fresh token costs one version call, and with `policy` a token that claims a custom role costs one `subject_for` call), `customRoles: sources.customRoles(principal)`, and `await sources.subject(userId)` for a job acting for a stored user. Create `postgrestSources` and the `claimsFirst` source once at module scope, never per request or per cache scope: they keep no answers, and `getPermDock` shares each read within one instance.
|
|
521
|
+
- When a page builds many instances (Next.js `'use cache: private'` islands, PPR) or an API serves many `GET`s per user, add `versions: memoryVersionCache({ maxStaleMs: 5_000 })` to `claimsFirst(sources.memberships, { onStale: 'reread' })` at module scope. Rendering and `GET` / `HEAD` / `OPTIONS` use intent `read` and share one version call per `maxStaleMs`; `protectAction`, other HTTP methods and core `getPermDock` use `write` and read live. Before a mutation outside `protectAction` in Next.js, call `getPermDock({ intent: 'write' })`. After a role change call `versions.evict(userId)` ([freshness and the version cache](https://permdock.com/docs/adapters/supabase#freshness-and-the-version-cache)).
|
|
521
522
|
- When a role table stores a role id (`user_roles.role_id`, `organization_users.role_id` referencing `roles`), read the key through it with `{ through: 'roles', on: { role_id: 'id' }, column: 'key' }`: in `rls.roles`, in `tableMembershipSource` `columns.role` or `junctionMembershipSource` `roles`, and in an `rls.memberships` table's `role`. Never copy keys into the membership table. Keep tenant custom-role keys apart from declared role names.
|
|
522
523
|
- When one membership row holds roles in several columns (a `tier` and a `role_id`), list them instead of building a union view: `role: ['tier', { through: 'roles', on: { role_id: 'id' }, column: 'key' }]` in `rls.memberships` and `tableMembershipSource` `columns.role`, `roles: { sources: [...] }` in `junctionMembershipSource`. The row holds every non-null key, and the holder-count triggers stay on the real table.
|
|
523
524
|
- When a membership table names a profile instead of a login (`customer_contacts.contact_profile_id` referencing `contact_profiles`, whose `user_id` is the login), read the user through it with `junctionMembershipSource` `user` or `tableMembershipSource` `columns.user`: `{ through: 'contact_profiles', on: { contact_profile_id: 'id' }, column: 'user_id' }`. Never copy `user_id` onto the membership rows. Keep `contact_profiles.user_id` server-owned (PD028).
|
package/dist/catalog-mRQQQhNK.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as catalogFile, n as runCatalog } from "./catalog-BFpz2EmT.js";
|
package/dist/collect-B5BL3klN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { r as runCollect } from "./collect-B7ZFAJU3.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { n as runPowerSync } from "./powersync-DHNQX06W.js";
|
package/dist/pull-B65ndFNZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { n as runCloudPull } from "./pull-CwpGaQSi.js";
|
package/dist/run-D-JE8QWb.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as run } from "./run-Bz26OTfO.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { i as runSupabase } from "./supabase-hook-B-yXnzUl.js";
|
package/dist/usage-CYeXek0p.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as runUsage } from "./usage-CxEzS4ey.js";
|
package/dist/watch-DB42U1ib.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { i as watchCollect } from "./watch-Cx_WciLE.js";
|