@keystrokehq/platform 0.1.6 → 0.1.9
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/{awk2-LA3USKJP-CWyXAnm3.cjs → awk2-LA3USKJP-C8TQfH53.cjs} +2 -2
- package/dist/{awk2-LA3USKJP-CWyXAnm3.cjs.map → awk2-LA3USKJP-C8TQfH53.cjs.map} +1 -1
- package/dist/{awk2-LA3USKJP-BhFGxIs7.mjs → awk2-LA3USKJP-iKo516lo.mjs} +2 -2
- package/dist/{awk2-LA3USKJP-BhFGxIs7.mjs.map → awk2-LA3USKJP-iKo516lo.mjs.map} +1 -1
- package/dist/{base64-C2AIWVNC-JXy8vwLH.cjs → base64-C2AIWVNC-BvnbraSd.cjs} +2 -2
- package/dist/{base64-C2AIWVNC-JXy8vwLH.cjs.map → base64-C2AIWVNC-BvnbraSd.cjs.map} +1 -1
- package/dist/{base64-C2AIWVNC-bTzuSsmR.mjs → base64-C2AIWVNC-DFlEIYu8.mjs} +2 -2
- package/dist/{base64-C2AIWVNC-bTzuSsmR.mjs.map → base64-C2AIWVNC-DFlEIYu8.mjs.map} +1 -1
- package/dist/{bash-YZ33HQZQ-BHybPYlT.mjs → bash-YZ33HQZQ-C5bTiiJp.mjs} +2 -2
- package/dist/{bash-YZ33HQZQ-BHybPYlT.mjs.map → bash-YZ33HQZQ-C5bTiiJp.mjs.map} +1 -1
- package/dist/{bash-YZ33HQZQ-5WKdWyaB.cjs → bash-YZ33HQZQ-CTEFZdqT.cjs} +2 -2
- package/dist/{bash-YZ33HQZQ-5WKdWyaB.cjs.map → bash-YZ33HQZQ-CTEFZdqT.cjs.map} +1 -1
- package/dist/{cat-TSFMZVYS-T80cqhDV.cjs → cat-TSFMZVYS-B2K0uDKN.cjs} +3 -3
- package/dist/{cat-TSFMZVYS-T80cqhDV.cjs.map → cat-TSFMZVYS-B2K0uDKN.cjs.map} +1 -1
- package/dist/{cat-TSFMZVYS-Ceu5HL0Q.mjs → cat-TSFMZVYS-D32dnWp3.mjs} +3 -3
- package/dist/{cat-TSFMZVYS-Ceu5HL0Q.mjs.map → cat-TSFMZVYS-D32dnWp3.mjs.map} +1 -1
- package/dist/{chunk-5H5SCKJM-BFKvZTj1.mjs → chunk-5H5SCKJM-BlgR0V3A.mjs} +2 -2
- package/dist/{chunk-5H5SCKJM-BFKvZTj1.mjs.map → chunk-5H5SCKJM-BlgR0V3A.mjs.map} +1 -1
- package/dist/{chunk-5H5SCKJM-CGwO8LN_.cjs → chunk-5H5SCKJM-CL3A9kMI.cjs} +2 -2
- package/dist/{chunk-5H5SCKJM-CGwO8LN_.cjs.map → chunk-5H5SCKJM-CL3A9kMI.cjs.map} +1 -1
- package/dist/{chunk-AQ6FYS2X-CJjPwzf4.mjs → chunk-AQ6FYS2X-AzmRUg3D.mjs} +2 -2
- package/dist/{chunk-AQ6FYS2X-CJjPwzf4.mjs.map → chunk-AQ6FYS2X-AzmRUg3D.mjs.map} +1 -1
- package/dist/{chunk-AQ6FYS2X-zV3Coc0j.cjs → chunk-AQ6FYS2X-CPSSDKT0.cjs} +2 -2
- package/dist/{chunk-AQ6FYS2X-zV3Coc0j.cjs.map → chunk-AQ6FYS2X-CPSSDKT0.cjs.map} +1 -1
- package/dist/{chunk-CHFEPBH4-BJfBf11C.mjs → chunk-CHFEPBH4-B59ZOlVh.mjs} +2 -2
- package/dist/{chunk-CHFEPBH4-BJfBf11C.mjs.map → chunk-CHFEPBH4-B59ZOlVh.mjs.map} +1 -1
- package/dist/{chunk-CHFEPBH4-C7fwqALc.cjs → chunk-CHFEPBH4-DndUvPEz.cjs} +2 -2
- package/dist/{chunk-CHFEPBH4-C7fwqALc.cjs.map → chunk-CHFEPBH4-DndUvPEz.cjs.map} +1 -1
- package/dist/{chunk-EBAPSGAO-CZPAmSX8.cjs → chunk-EBAPSGAO-BCq1VEUF.cjs} +2 -2
- package/dist/{chunk-EBAPSGAO-CZPAmSX8.cjs.map → chunk-EBAPSGAO-BCq1VEUF.cjs.map} +1 -1
- package/dist/{chunk-EBAPSGAO-eG42tA2r.mjs → chunk-EBAPSGAO-Bq-JthJ5.mjs} +2 -2
- package/dist/{chunk-EBAPSGAO-eG42tA2r.mjs.map → chunk-EBAPSGAO-Bq-JthJ5.mjs.map} +1 -1
- package/dist/{chunk-LEKBROJD-Bnp-la65.mjs → chunk-LEKBROJD-BljEVlAX.mjs} +2 -2
- package/dist/{chunk-LEKBROJD-Bnp-la65.mjs.map → chunk-LEKBROJD-BljEVlAX.mjs.map} +1 -1
- package/dist/{chunk-LEKBROJD-CFSlDKEu.cjs → chunk-LEKBROJD-CYjJVRHn.cjs} +2 -2
- package/dist/{chunk-LEKBROJD-CFSlDKEu.cjs.map → chunk-LEKBROJD-CYjJVRHn.cjs.map} +1 -1
- package/dist/{chunk-VPADYNBD-Un2OQeml.mjs → chunk-VPADYNBD-22xWuTBB.mjs} +2 -2
- package/dist/{chunk-VPADYNBD-Un2OQeml.mjs.map → chunk-VPADYNBD-22xWuTBB.mjs.map} +1 -1
- package/dist/{chunk-VPADYNBD-BGC-BkW2.cjs → chunk-VPADYNBD-BB4ObtpU.cjs} +2 -2
- package/dist/{chunk-VPADYNBD-BGC-BkW2.cjs.map → chunk-VPADYNBD-BB4ObtpU.cjs.map} +1 -1
- package/dist/{chunk-YCLFEX4T-C2ffdKTI.mjs → chunk-YCLFEX4T-BYCz1ce9.mjs} +2 -2
- package/dist/{chunk-YCLFEX4T-C2ffdKTI.mjs.map → chunk-YCLFEX4T-BYCz1ce9.mjs.map} +1 -1
- package/dist/{chunk-YCLFEX4T-DiUi4t4Y.cjs → chunk-YCLFEX4T-BvTNX2Vz.cjs} +2 -2
- package/dist/{chunk-YCLFEX4T-DiUi4t4Y.cjs.map → chunk-YCLFEX4T-BvTNX2Vz.cjs.map} +1 -1
- package/dist/{column-XT6UFXNQ-BOensfuu.mjs → column-XT6UFXNQ-2JxGKnhQ.mjs} +2 -2
- package/dist/{column-XT6UFXNQ-BOensfuu.mjs.map → column-XT6UFXNQ-2JxGKnhQ.mjs.map} +1 -1
- package/dist/{column-XT6UFXNQ-BeOUDpIf.cjs → column-XT6UFXNQ-Dt66NYBA.cjs} +2 -2
- package/dist/{column-XT6UFXNQ-BeOUDpIf.cjs.map → column-XT6UFXNQ-Dt66NYBA.cjs.map} +1 -1
- package/dist/{comm-VV2LDX2J-C7VcIq-K.mjs → comm-VV2LDX2J-BQ4xi5L9.mjs} +2 -2
- package/dist/{comm-VV2LDX2J-C7VcIq-K.mjs.map → comm-VV2LDX2J-BQ4xi5L9.mjs.map} +1 -1
- package/dist/{comm-VV2LDX2J-Ca7AKON3.cjs → comm-VV2LDX2J-C8sq4a_X.cjs} +2 -2
- package/dist/{comm-VV2LDX2J-Ca7AKON3.cjs.map → comm-VV2LDX2J-C8sq4a_X.cjs.map} +1 -1
- package/dist/{config-m9Z87E2p.d.mts → config-4tlyrD1h.d.mts} +28 -2
- package/dist/{config-DmqhoHPA.d.cts → config-DCMtEjGV.d.cts} +28 -2
- package/dist/config.cjs +1 -1
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/{cp-BISAAS7A-HMB8w9Qk.mjs → cp-BISAAS7A-CcMwaVYs.mjs} +2 -2
- package/dist/{cp-BISAAS7A-HMB8w9Qk.mjs.map → cp-BISAAS7A-CcMwaVYs.mjs.map} +1 -1
- package/dist/{cp-BISAAS7A-B9yK_zET.cjs → cp-BISAAS7A-DmZV5f27.cjs} +2 -2
- package/dist/{cp-BISAAS7A-B9yK_zET.cjs.map → cp-BISAAS7A-DmZV5f27.cjs.map} +1 -1
- package/dist/{cut-OKARJCCV-NXtL8aUb.mjs → cut-OKARJCCV-Co4UXF7Y.mjs} +3 -3
- package/dist/{cut-OKARJCCV-NXtL8aUb.mjs.map → cut-OKARJCCV-Co4UXF7Y.mjs.map} +1 -1
- package/dist/{cut-OKARJCCV-qUXIktVO.cjs → cut-OKARJCCV-DwtHdU58.cjs} +3 -3
- package/dist/{cut-OKARJCCV-qUXIktVO.cjs.map → cut-OKARJCCV-DwtHdU58.cjs.map} +1 -1
- package/dist/{diff-MWJFIG7X-BpMQR3bl.cjs → diff-MWJFIG7X-DX6SkQWo.cjs} +2 -2
- package/dist/{diff-MWJFIG7X-BpMQR3bl.cjs.map → diff-MWJFIG7X-DX6SkQWo.cjs.map} +1 -1
- package/dist/{diff-MWJFIG7X-DVUdRi3i.mjs → diff-MWJFIG7X-RORXFtQw.mjs} +2 -2
- package/dist/{diff-MWJFIG7X-DVUdRi3i.mjs.map → diff-MWJFIG7X-RORXFtQw.mjs.map} +1 -1
- package/dist/{dist-BB6Y_75v.mjs → dist-DQZABv1_.mjs} +525 -64
- package/dist/dist-DQZABv1_.mjs.map +1 -0
- package/dist/{dist-BtAOWi5K.cjs → dist-KeJkUQxy.cjs} +542 -63
- package/dist/dist-KeJkUQxy.cjs.map +1 -0
- package/dist/{du-572XNP42-B7Daeoyh.cjs → du-572XNP42-ByLXb5YF.cjs} +2 -2
- package/dist/{du-572XNP42-B7Daeoyh.cjs.map → du-572XNP42-ByLXb5YF.cjs.map} +1 -1
- package/dist/{du-572XNP42-DganHTrH.mjs → du-572XNP42-DJxtt8pO.mjs} +2 -2
- package/dist/{du-572XNP42-DganHTrH.mjs.map → du-572XNP42-DJxtt8pO.mjs.map} +1 -1
- package/dist/{env-36M5BO7M-Dg1z4ZQ3.cjs → env-36M5BO7M-7mpjgw1V.cjs} +2 -2
- package/dist/{env-36M5BO7M-Dg1z4ZQ3.cjs.map → env-36M5BO7M-7mpjgw1V.cjs.map} +1 -1
- package/dist/{env-36M5BO7M-D_E39yfu.mjs → env-36M5BO7M-ZlUW3Sl0.mjs} +2 -2
- package/dist/{env-36M5BO7M-D_E39yfu.mjs.map → env-36M5BO7M-ZlUW3Sl0.mjs.map} +1 -1
- package/dist/{expand-JSPG6VOP-sHoECND6.mjs → expand-JSPG6VOP-B2YxeegL.mjs} +2 -2
- package/dist/{expand-JSPG6VOP-sHoECND6.mjs.map → expand-JSPG6VOP-B2YxeegL.mjs.map} +1 -1
- package/dist/{expand-JSPG6VOP-D2xi4Y-n.cjs → expand-JSPG6VOP-MOAUsgSe.cjs} +2 -2
- package/dist/{expand-JSPG6VOP-D2xi4Y-n.cjs.map → expand-JSPG6VOP-MOAUsgSe.cjs.map} +1 -1
- package/dist/{expr-5JAACS4X-DrJ47AJL.cjs → expr-5JAACS4X-C-wWI5Y2.cjs} +2 -2
- package/dist/{expr-5JAACS4X-DrJ47AJL.cjs.map → expr-5JAACS4X-C-wWI5Y2.cjs.map} +1 -1
- package/dist/{expr-5JAACS4X-gYMEvPyP.mjs → expr-5JAACS4X-DGhrcLeU.mjs} +2 -2
- package/dist/{expr-5JAACS4X-gYMEvPyP.mjs.map → expr-5JAACS4X-DGhrcLeU.mjs.map} +1 -1
- package/dist/{find-INTH3OLC-NNFVNc1H.cjs → find-INTH3OLC-ErDLi_Ak.cjs} +3 -3
- package/dist/{find-INTH3OLC-NNFVNc1H.cjs.map → find-INTH3OLC-ErDLi_Ak.cjs.map} +1 -1
- package/dist/{find-INTH3OLC-dBBPukw9.mjs → find-INTH3OLC-Vzv3utqz.mjs} +3 -3
- package/dist/{find-INTH3OLC-dBBPukw9.mjs.map → find-INTH3OLC-Vzv3utqz.mjs.map} +1 -1
- package/dist/{fold-4TQNYMSW-N0_1Z6_j.mjs → fold-4TQNYMSW-BWKs2Ew0.mjs} +2 -2
- package/dist/{fold-4TQNYMSW-N0_1Z6_j.mjs.map → fold-4TQNYMSW-BWKs2Ew0.mjs.map} +1 -1
- package/dist/{fold-4TQNYMSW-C7ArceGr.cjs → fold-4TQNYMSW-DoBCXtmy.cjs} +2 -2
- package/dist/{fold-4TQNYMSW-C7ArceGr.cjs.map → fold-4TQNYMSW-DoBCXtmy.cjs.map} +1 -1
- package/dist/{grep-V3LQVMRQ-D_s5HB2b.cjs → grep-V3LQVMRQ-BU066j1r.cjs} +4 -4
- package/dist/{grep-V3LQVMRQ-D_s5HB2b.cjs.map → grep-V3LQVMRQ-BU066j1r.cjs.map} +1 -1
- package/dist/{grep-V3LQVMRQ-CN7esn9_.mjs → grep-V3LQVMRQ-Okt1supZ.mjs} +4 -4
- package/dist/{grep-V3LQVMRQ-CN7esn9_.mjs.map → grep-V3LQVMRQ-Okt1supZ.mjs.map} +1 -1
- package/dist/{gzip-O5ASJAFY-BYavGtyV.cjs → gzip-O5ASJAFY-B1FTMMFq.cjs} +2 -2
- package/dist/{gzip-O5ASJAFY-BYavGtyV.cjs.map → gzip-O5ASJAFY-B1FTMMFq.cjs.map} +1 -1
- package/dist/{gzip-O5ASJAFY-tQxmEpj_.mjs → gzip-O5ASJAFY-BUU_FNGK.mjs} +2 -2
- package/dist/{gzip-O5ASJAFY-tQxmEpj_.mjs.map → gzip-O5ASJAFY-BUU_FNGK.mjs.map} +1 -1
- package/dist/{head-442HYESI-Bzlad8f3.mjs → head-442HYESI-CPQWywtB.mjs} +2 -2
- package/dist/{head-442HYESI-Bzlad8f3.mjs.map → head-442HYESI-CPQWywtB.mjs.map} +1 -1
- package/dist/{head-442HYESI-Du4OHag6.cjs → head-442HYESI-DeLkuG8l.cjs} +2 -2
- package/dist/{head-442HYESI-Du4OHag6.cjs.map → head-442HYESI-DeLkuG8l.cjs.map} +1 -1
- package/dist/{help-HZ6M2CKN-DxQhQLup.cjs → help-HZ6M2CKN-CACYSgeV.cjs} +2 -2
- package/dist/{help-HZ6M2CKN-DxQhQLup.cjs.map → help-HZ6M2CKN-CACYSgeV.cjs.map} +1 -1
- package/dist/{help-HZ6M2CKN-DMr18xJE.mjs → help-HZ6M2CKN-Si2t7kXA.mjs} +2 -2
- package/dist/{help-HZ6M2CKN-DMr18xJE.mjs.map → help-HZ6M2CKN-Si2t7kXA.mjs.map} +1 -1
- package/dist/{html-to-markdown-JW4MSQZO-BZFKTpVV.cjs → html-to-markdown-JW4MSQZO-BnrGqsni.cjs} +3 -3
- package/dist/{html-to-markdown-JW4MSQZO-BZFKTpVV.cjs.map → html-to-markdown-JW4MSQZO-BnrGqsni.cjs.map} +1 -1
- package/dist/{html-to-markdown-JW4MSQZO-ByplyNhg.mjs → html-to-markdown-JW4MSQZO-yPkAOM4T.mjs} +3 -3
- package/dist/{html-to-markdown-JW4MSQZO-ByplyNhg.mjs.map → html-to-markdown-JW4MSQZO-yPkAOM4T.mjs.map} +1 -1
- package/dist/internal.cjs +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/{join-TBRGI3LQ-BJnYqeRE.cjs → join-TBRGI3LQ-BK0v7LDZ.cjs} +2 -2
- package/dist/{join-TBRGI3LQ-BJnYqeRE.cjs.map → join-TBRGI3LQ-BK0v7LDZ.cjs.map} +1 -1
- package/dist/{join-TBRGI3LQ-zQYqJlyJ.mjs → join-TBRGI3LQ-C3eqxR8J.mjs} +2 -2
- package/dist/{join-TBRGI3LQ-zQYqJlyJ.mjs.map → join-TBRGI3LQ-C3eqxR8J.mjs.map} +1 -1
- package/dist/{jq-4XLYLOS5-DyYnnhSj.cjs → jq-4XLYLOS5-BPgpTkTX.cjs} +4 -4
- package/dist/{jq-4XLYLOS5-DyYnnhSj.cjs.map → jq-4XLYLOS5-BPgpTkTX.cjs.map} +1 -1
- package/dist/{jq-4XLYLOS5-rVnHaS8d.mjs → jq-4XLYLOS5-DOiIyV4r.mjs} +4 -4
- package/dist/{jq-4XLYLOS5-rVnHaS8d.mjs.map → jq-4XLYLOS5-DOiIyV4r.mjs.map} +1 -1
- package/dist/{js-exec-N5KEZBH7-BS33g5Vz.cjs → js-exec-N5KEZBH7-6a2l4HY0.cjs} +3 -3
- package/dist/{js-exec-N5KEZBH7-BS33g5Vz.cjs.map → js-exec-N5KEZBH7-6a2l4HY0.cjs.map} +1 -1
- package/dist/{js-exec-N5KEZBH7-CelGB_A8.mjs → js-exec-N5KEZBH7-BB3hczF6.mjs} +3 -3
- package/dist/{js-exec-N5KEZBH7-CelGB_A8.mjs.map → js-exec-N5KEZBH7-BB3hczF6.mjs.map} +1 -1
- package/dist/{lib-BtuXCD2W.cjs → lib-CYQ_gA3u.cjs} +2 -2
- package/dist/{lib-BtuXCD2W.cjs.map → lib-CYQ_gA3u.cjs.map} +1 -1
- package/dist/{lib-_5zrQvIo.mjs → lib-CcVWhxFS.mjs} +2 -2
- package/dist/{lib-_5zrQvIo.mjs.map → lib-CcVWhxFS.mjs.map} +1 -1
- package/dist/{ln-4LGSXXGD-DCuMyx3a.mjs → ln-4LGSXXGD-BGCw3j2u.mjs} +2 -2
- package/dist/{ln-4LGSXXGD-DCuMyx3a.mjs.map → ln-4LGSXXGD-BGCw3j2u.mjs.map} +1 -1
- package/dist/{ln-4LGSXXGD-BjitMbox.cjs → ln-4LGSXXGD-Cq6RmKEo.cjs} +2 -2
- package/dist/{ln-4LGSXXGD-BjitMbox.cjs.map → ln-4LGSXXGD-Cq6RmKEo.cjs.map} +1 -1
- package/dist/{ls-ZJGQER7M-CsKopKVX.cjs → ls-ZJGQER7M-CJuMmb9p.cjs} +2 -2
- package/dist/{ls-ZJGQER7M-CsKopKVX.cjs.map → ls-ZJGQER7M-CJuMmb9p.cjs.map} +1 -1
- package/dist/{ls-ZJGQER7M-ByYf3Vxj.mjs → ls-ZJGQER7M-CSzmMPVo.mjs} +2 -2
- package/dist/{ls-ZJGQER7M-ByYf3Vxj.mjs.map → ls-ZJGQER7M-CSzmMPVo.mjs.map} +1 -1
- package/dist/{lzma-_kmNWjFB.cjs → lzma-BaLt2cZv.cjs} +3 -3
- package/dist/{lzma-_kmNWjFB.cjs.map → lzma-BaLt2cZv.cjs.map} +1 -1
- package/dist/{lzma-DtV0zx4R.mjs → lzma-d7Yy7VcZ.mjs} +2 -2
- package/dist/{lzma-DtV0zx4R.mjs.map → lzma-d7Yy7VcZ.mjs.map} +1 -1
- package/dist/{md5sum-SPU24VSG-jewPBR38.cjs → md5sum-SPU24VSG-BL6W95eE.cjs} +3 -3
- package/dist/{md5sum-SPU24VSG-jewPBR38.cjs.map → md5sum-SPU24VSG-BL6W95eE.cjs.map} +1 -1
- package/dist/{md5sum-SPU24VSG-R7dHHfV4.mjs → md5sum-SPU24VSG-CIeUFHdK.mjs} +3 -3
- package/dist/{md5sum-SPU24VSG-R7dHHfV4.mjs.map → md5sum-SPU24VSG-CIeUFHdK.mjs.map} +1 -1
- package/dist/{mkdir-MEPGZOB6-DNmJhnvS.cjs → mkdir-MEPGZOB6-BZyyoaAf.cjs} +2 -2
- package/dist/{mkdir-MEPGZOB6-DNmJhnvS.cjs.map → mkdir-MEPGZOB6-BZyyoaAf.cjs.map} +1 -1
- package/dist/{mkdir-MEPGZOB6-BQe4XS_e.mjs → mkdir-MEPGZOB6-MgHictKj.mjs} +2 -2
- package/dist/{mkdir-MEPGZOB6-BQe4XS_e.mjs.map → mkdir-MEPGZOB6-MgHictKj.mjs.map} +1 -1
- package/dist/{mv-W5BIQ646-BorqaWWj.mjs → mv-W5BIQ646-CP9-vF4_.mjs} +2 -2
- package/dist/{mv-W5BIQ646-BorqaWWj.mjs.map → mv-W5BIQ646-CP9-vF4_.mjs.map} +1 -1
- package/dist/{mv-W5BIQ646-BsbfENE0.cjs → mv-W5BIQ646-dwb25lDI.cjs} +2 -2
- package/dist/{mv-W5BIQ646-BsbfENE0.cjs.map → mv-W5BIQ646-dwb25lDI.cjs.map} +1 -1
- package/dist/{nl-WSDW7I4O-DMfjYou-.cjs → nl-WSDW7I4O-C7rZxzPm.cjs} +2 -2
- package/dist/{nl-WSDW7I4O-DMfjYou-.cjs.map → nl-WSDW7I4O-C7rZxzPm.cjs.map} +1 -1
- package/dist/{nl-WSDW7I4O-uNIqSVeW.mjs → nl-WSDW7I4O-SXX_wp28.mjs} +2 -2
- package/dist/{nl-WSDW7I4O-uNIqSVeW.mjs.map → nl-WSDW7I4O-SXX_wp28.mjs.map} +1 -1
- package/dist/{od-WOKFDJTP-DOW6faUi.cjs → od-WOKFDJTP-CDFKqUJg.cjs} +2 -2
- package/dist/{od-WOKFDJTP-DOW6faUi.cjs.map → od-WOKFDJTP-CDFKqUJg.cjs.map} +1 -1
- package/dist/{od-WOKFDJTP-KhZEaBTC.mjs → od-WOKFDJTP-DyqUJY9V.mjs} +2 -2
- package/dist/{od-WOKFDJTP-KhZEaBTC.mjs.map → od-WOKFDJTP-DyqUJY9V.mjs.map} +1 -1
- package/dist/{paste-7JC6S4DX-B7D3kyRf.cjs → paste-7JC6S4DX-4vBMkbXu.cjs} +2 -2
- package/dist/{paste-7JC6S4DX-B7D3kyRf.cjs.map → paste-7JC6S4DX-4vBMkbXu.cjs.map} +1 -1
- package/dist/{paste-7JC6S4DX-DOEPGmaJ.mjs → paste-7JC6S4DX-yV2mN3Xi.mjs} +2 -2
- package/dist/{paste-7JC6S4DX-DOEPGmaJ.mjs.map → paste-7JC6S4DX-yV2mN3Xi.mjs.map} +1 -1
- package/dist/{printf-TWGXF445-BgY14UrZ.mjs → printf-TWGXF445-AG6ZxuUM.mjs} +3 -3
- package/dist/{printf-TWGXF445-BgY14UrZ.mjs.map → printf-TWGXF445-AG6ZxuUM.mjs.map} +1 -1
- package/dist/{printf-TWGXF445-MddJu1yx.cjs → printf-TWGXF445-BGeZYMde.cjs} +3 -3
- package/dist/{printf-TWGXF445-MddJu1yx.cjs.map → printf-TWGXF445-BGeZYMde.cjs.map} +1 -1
- package/dist/{python3-POMOR4OA-BwDdQ_I-.mjs → python3-POMOR4OA-BClYVovb.mjs} +3 -3
- package/dist/{python3-POMOR4OA-BwDdQ_I-.mjs.map → python3-POMOR4OA-BClYVovb.mjs.map} +1 -1
- package/dist/{python3-POMOR4OA-DXoihZl6.cjs → python3-POMOR4OA-CXiSd1gN.cjs} +3 -3
- package/dist/{python3-POMOR4OA-DXoihZl6.cjs.map → python3-POMOR4OA-CXiSd1gN.cjs.map} +1 -1
- package/dist/{rev-5EHFX4EJ-CMoRCR7l.mjs → rev-5EHFX4EJ-B82WG1Lv.mjs} +2 -2
- package/dist/{rev-5EHFX4EJ-CMoRCR7l.mjs.map → rev-5EHFX4EJ-B82WG1Lv.mjs.map} +1 -1
- package/dist/{rev-5EHFX4EJ-C0tEUAtq.cjs → rev-5EHFX4EJ-DIjd9v_Q.cjs} +2 -2
- package/dist/{rev-5EHFX4EJ-C0tEUAtq.cjs.map → rev-5EHFX4EJ-DIjd9v_Q.cjs.map} +1 -1
- package/dist/{rg-S4FXYXWB-BnlBncIg.cjs → rg-S4FXYXWB-ApQWE_EG.cjs} +3 -3
- package/dist/{rg-S4FXYXWB-BnlBncIg.cjs.map → rg-S4FXYXWB-ApQWE_EG.cjs.map} +1 -1
- package/dist/{rg-S4FXYXWB-CIJXVbGY.mjs → rg-S4FXYXWB-CyeQeN6m.mjs} +3 -3
- package/dist/{rg-S4FXYXWB-CIJXVbGY.mjs.map → rg-S4FXYXWB-CyeQeN6m.mjs.map} +1 -1
- package/dist/{rm-SSGETQVQ-ZisaZPqB.cjs → rm-SSGETQVQ-C9JTViwB.cjs} +2 -2
- package/dist/{rm-SSGETQVQ-ZisaZPqB.cjs.map → rm-SSGETQVQ-C9JTViwB.cjs.map} +1 -1
- package/dist/{rm-SSGETQVQ-Ba0g_xkF.mjs → rm-SSGETQVQ-LQ0RrYWT.mjs} +2 -2
- package/dist/{rm-SSGETQVQ-Ba0g_xkF.mjs.map → rm-SSGETQVQ-LQ0RrYWT.mjs.map} +1 -1
- package/dist/{rmdir-OC4ZLPYA-CaFxfYPV.cjs → rmdir-OC4ZLPYA-BjJEGyWy.cjs} +2 -2
- package/dist/{rmdir-OC4ZLPYA-CaFxfYPV.cjs.map → rmdir-OC4ZLPYA-BjJEGyWy.cjs.map} +1 -1
- package/dist/{rmdir-OC4ZLPYA-DhtkbSLr.mjs → rmdir-OC4ZLPYA-j7rpYv9w.mjs} +2 -2
- package/dist/{rmdir-OC4ZLPYA-DhtkbSLr.mjs.map → rmdir-OC4ZLPYA-j7rpYv9w.mjs.map} +1 -1
- package/dist/run.cjs +1 -1
- package/dist/run.mjs +1 -1
- package/dist/{sed-S5UIK574-Dg9RxQ3I.cjs → sed-S5UIK574-BKjIhqZC.cjs} +2 -2
- package/dist/{sed-S5UIK574-Dg9RxQ3I.cjs.map → sed-S5UIK574-BKjIhqZC.cjs.map} +1 -1
- package/dist/{sed-S5UIK574-BYyLDVp9.mjs → sed-S5UIK574-J74NTjfC.mjs} +2 -2
- package/dist/{sed-S5UIK574-BYyLDVp9.mjs.map → sed-S5UIK574-J74NTjfC.mjs.map} +1 -1
- package/dist/{sha1sum-2PTOAFR6-1lWZQvKU.mjs → sha1sum-2PTOAFR6-IP0cr9Nk.mjs} +3 -3
- package/dist/{sha1sum-2PTOAFR6-1lWZQvKU.mjs.map → sha1sum-2PTOAFR6-IP0cr9Nk.mjs.map} +1 -1
- package/dist/{sha1sum-2PTOAFR6-BPmv6rQj.cjs → sha1sum-2PTOAFR6-MSflYn0r.cjs} +3 -3
- package/dist/{sha1sum-2PTOAFR6-BPmv6rQj.cjs.map → sha1sum-2PTOAFR6-MSflYn0r.cjs.map} +1 -1
- package/dist/{sha256sum-NS7D3IXX-DtuuyUn8.cjs → sha256sum-NS7D3IXX-8-O3yDRg.cjs} +3 -3
- package/dist/{sha256sum-NS7D3IXX-DtuuyUn8.cjs.map → sha256sum-NS7D3IXX-8-O3yDRg.cjs.map} +1 -1
- package/dist/{sha256sum-NS7D3IXX-wQgC_9TD.mjs → sha256sum-NS7D3IXX-B83KYuY_.mjs} +3 -3
- package/dist/{sha256sum-NS7D3IXX-wQgC_9TD.mjs.map → sha256sum-NS7D3IXX-B83KYuY_.mjs.map} +1 -1
- package/dist/{sleep-X22JJINO-CpWhcnde.cjs → sleep-X22JJINO-CdKETYgR.cjs} +2 -2
- package/dist/{sleep-X22JJINO-CpWhcnde.cjs.map → sleep-X22JJINO-CdKETYgR.cjs.map} +1 -1
- package/dist/{sleep-X22JJINO-DAN0H6x8.mjs → sleep-X22JJINO-YTG2e9mJ.mjs} +2 -2
- package/dist/{sleep-X22JJINO-DAN0H6x8.mjs.map → sleep-X22JJINO-YTG2e9mJ.mjs.map} +1 -1
- package/dist/{sort-SW2YEO5B-BrAbgeh7.mjs → sort-SW2YEO5B-CbPi6K24.mjs} +3 -3
- package/dist/{sort-SW2YEO5B-BrAbgeh7.mjs.map → sort-SW2YEO5B-CbPi6K24.mjs.map} +1 -1
- package/dist/{sort-SW2YEO5B-rDpnVZhF.cjs → sort-SW2YEO5B-Cum9z2a8.cjs} +3 -3
- package/dist/{sort-SW2YEO5B-rDpnVZhF.cjs.map → sort-SW2YEO5B-Cum9z2a8.cjs.map} +1 -1
- package/dist/{split-4KKZZXXE-BPiXrXbG.mjs → split-4KKZZXXE-CKGhHIFM.mjs} +2 -2
- package/dist/{split-4KKZZXXE-BPiXrXbG.mjs.map → split-4KKZZXXE-CKGhHIFM.mjs.map} +1 -1
- package/dist/{split-4KKZZXXE-DWMRSG1h.cjs → split-4KKZZXXE-fz33ycN2.cjs} +2 -2
- package/dist/{split-4KKZZXXE-DWMRSG1h.cjs.map → split-4KKZZXXE-fz33ycN2.cjs.map} +1 -1
- package/dist/{sqlite3-CGOEFJAO-Dw3Z8yEh.mjs → sqlite3-CGOEFJAO-CZRp6vSh.mjs} +3 -3
- package/dist/{sqlite3-CGOEFJAO-Dw3Z8yEh.mjs.map → sqlite3-CGOEFJAO-CZRp6vSh.mjs.map} +1 -1
- package/dist/{sqlite3-CGOEFJAO-CoAwi92j.cjs → sqlite3-CGOEFJAO-GnOOhzcu.cjs} +3 -3
- package/dist/{sqlite3-CGOEFJAO-CoAwi92j.cjs.map → sqlite3-CGOEFJAO-GnOOhzcu.cjs.map} +1 -1
- package/dist/{start-CXfv1wyL.cjs → start-BDCUU_Ry.cjs} +232 -233
- package/dist/start-BDCUU_Ry.cjs.map +1 -0
- package/dist/{start-Dyqmdghh.mjs → start-CJs5Jmpv.mjs} +233 -234
- package/dist/start-CJs5Jmpv.mjs.map +1 -0
- package/dist/start.cjs +1 -1
- package/dist/start.d.cts +1 -1
- package/dist/start.d.mts +1 -1
- package/dist/start.mjs +1 -1
- package/dist/{strings-6WDHLGMX-CxvuK0mi.mjs → strings-6WDHLGMX-CRYfEQoM.mjs} +2 -2
- package/dist/{strings-6WDHLGMX-CxvuK0mi.mjs.map → strings-6WDHLGMX-CRYfEQoM.mjs.map} +1 -1
- package/dist/{strings-6WDHLGMX-Dhb8yDLC.cjs → strings-6WDHLGMX-_709peER.cjs} +2 -2
- package/dist/{strings-6WDHLGMX-Dhb8yDLC.cjs.map → strings-6WDHLGMX-_709peER.cjs.map} +1 -1
- package/dist/{tac-2STMMJYW-BFmTtfPi.cjs → tac-2STMMJYW-DaTzHJTH.cjs} +2 -2
- package/dist/{tac-2STMMJYW-BFmTtfPi.cjs.map → tac-2STMMJYW-DaTzHJTH.cjs.map} +1 -1
- package/dist/{tac-2STMMJYW-D98V7DHS.mjs → tac-2STMMJYW-Dfi2Vjmr.mjs} +2 -2
- package/dist/{tac-2STMMJYW-D98V7DHS.mjs.map → tac-2STMMJYW-Dfi2Vjmr.mjs.map} +1 -1
- package/dist/{tail-R4PCA2C4-4wnLsL5b.cjs → tail-R4PCA2C4-C4F7cpls.cjs} +2 -2
- package/dist/{tail-R4PCA2C4-4wnLsL5b.cjs.map → tail-R4PCA2C4-C4F7cpls.cjs.map} +1 -1
- package/dist/{tail-R4PCA2C4-Bu6_miEK.mjs → tail-R4PCA2C4-kxwztnN6.mjs} +2 -2
- package/dist/{tail-R4PCA2C4-Bu6_miEK.mjs.map → tail-R4PCA2C4-kxwztnN6.mjs.map} +1 -1
- package/dist/{tar-STHHZTZ6-CI536ZUL.mjs → tar-STHHZTZ6-ClyyrPcY.mjs} +5 -5
- package/dist/{tar-STHHZTZ6-CI536ZUL.mjs.map → tar-STHHZTZ6-ClyyrPcY.mjs.map} +1 -1
- package/dist/{tar-STHHZTZ6-B7s0JAEv.cjs → tar-STHHZTZ6-D5iu_ftt.cjs} +5 -5
- package/dist/{tar-STHHZTZ6-B7s0JAEv.cjs.map → tar-STHHZTZ6-D5iu_ftt.cjs.map} +1 -1
- package/dist/{tee-YUZ2FKCJ-gBEgGJ5c.cjs → tee-YUZ2FKCJ-Cwpyu4z6.cjs} +2 -2
- package/dist/{tee-YUZ2FKCJ-gBEgGJ5c.cjs.map → tee-YUZ2FKCJ-Cwpyu4z6.cjs.map} +1 -1
- package/dist/{tee-YUZ2FKCJ-CSJtUwl1.mjs → tee-YUZ2FKCJ-DwiX9lOR.mjs} +2 -2
- package/dist/{tee-YUZ2FKCJ-CSJtUwl1.mjs.map → tee-YUZ2FKCJ-DwiX9lOR.mjs.map} +1 -1
- package/dist/{time-D4LNBSWX-BXweubfY.cjs → time-D4LNBSWX-Crz6IS_Y.cjs} +2 -2
- package/dist/{time-D4LNBSWX-BXweubfY.cjs.map → time-D4LNBSWX-Crz6IS_Y.cjs.map} +1 -1
- package/dist/{time-D4LNBSWX-CmK5D5j8.mjs → time-D4LNBSWX-DCUHnjK8.mjs} +2 -2
- package/dist/{time-D4LNBSWX-CmK5D5j8.mjs.map → time-D4LNBSWX-DCUHnjK8.mjs.map} +1 -1
- package/dist/{timeout-YDCRSLPQ-B5hVfG7d.cjs → timeout-YDCRSLPQ-DDd3NRW_.cjs} +2 -2
- package/dist/{timeout-YDCRSLPQ-B5hVfG7d.cjs.map → timeout-YDCRSLPQ-DDd3NRW_.cjs.map} +1 -1
- package/dist/{timeout-YDCRSLPQ-p3LY8vYu.mjs → timeout-YDCRSLPQ-DcWnNYBb.mjs} +2 -2
- package/dist/{timeout-YDCRSLPQ-p3LY8vYu.mjs.map → timeout-YDCRSLPQ-DcWnNYBb.mjs.map} +1 -1
- package/dist/{touch-UA33VN3N-XzfqX6Xj.mjs → touch-UA33VN3N-B2XLBEia.mjs} +2 -2
- package/dist/{touch-UA33VN3N-XzfqX6Xj.mjs.map → touch-UA33VN3N-B2XLBEia.mjs.map} +1 -1
- package/dist/{touch-UA33VN3N-Cxjf6mOi.cjs → touch-UA33VN3N-qa2uKr61.cjs} +2 -2
- package/dist/{touch-UA33VN3N-Cxjf6mOi.cjs.map → touch-UA33VN3N-qa2uKr61.cjs.map} +1 -1
- package/dist/{tr-36LHWFRQ-Bj7MhSYO.cjs → tr-36LHWFRQ-CGKncf0e.cjs} +2 -2
- package/dist/{tr-36LHWFRQ-Bj7MhSYO.cjs.map → tr-36LHWFRQ-CGKncf0e.cjs.map} +1 -1
- package/dist/{tr-36LHWFRQ-BeW3mxZ0.mjs → tr-36LHWFRQ-qB7RaGkH.mjs} +2 -2
- package/dist/{tr-36LHWFRQ-BeW3mxZ0.mjs.map → tr-36LHWFRQ-qB7RaGkH.mjs.map} +1 -1
- package/dist/{tree-YLD52CNT-Bw83zmWP.mjs → tree-YLD52CNT-CSDgMp-S.mjs} +2 -2
- package/dist/{tree-YLD52CNT-Bw83zmWP.mjs.map → tree-YLD52CNT-CSDgMp-S.mjs.map} +1 -1
- package/dist/{tree-YLD52CNT-BifusHMT.cjs → tree-YLD52CNT-DCaIk200.cjs} +2 -2
- package/dist/{tree-YLD52CNT-BifusHMT.cjs.map → tree-YLD52CNT-DCaIk200.cjs.map} +1 -1
- package/dist/{unexpand-CADSA4VO-DCxmAQHt.mjs → unexpand-CADSA4VO-OXSW5LXB.mjs} +2 -2
- package/dist/{unexpand-CADSA4VO-DCxmAQHt.mjs.map → unexpand-CADSA4VO-OXSW5LXB.mjs.map} +1 -1
- package/dist/{unexpand-CADSA4VO-CJANgVRy.cjs → unexpand-CADSA4VO-Y0YxuYnQ.cjs} +2 -2
- package/dist/{unexpand-CADSA4VO-CJANgVRy.cjs.map → unexpand-CADSA4VO-Y0YxuYnQ.cjs.map} +1 -1
- package/dist/{uniq-XSIZR6PB-0UT5akN_.cjs → uniq-XSIZR6PB-CUquOIDK.cjs} +3 -3
- package/dist/{uniq-XSIZR6PB-0UT5akN_.cjs.map → uniq-XSIZR6PB-CUquOIDK.cjs.map} +1 -1
- package/dist/{uniq-XSIZR6PB-KlGH94Ga.mjs → uniq-XSIZR6PB-CddB2OBC.mjs} +3 -3
- package/dist/{uniq-XSIZR6PB-KlGH94Ga.mjs.map → uniq-XSIZR6PB-CddB2OBC.mjs.map} +1 -1
- package/dist/{wc-LF7NU4LA-QvPk1zKo.cjs → wc-LF7NU4LA-CpWeSthu.cjs} +3 -3
- package/dist/{wc-LF7NU4LA-QvPk1zKo.cjs.map → wc-LF7NU4LA-CpWeSthu.cjs.map} +1 -1
- package/dist/{wc-LF7NU4LA-B_-ng-Qd.mjs → wc-LF7NU4LA-wLql_W1c.mjs} +3 -3
- package/dist/{wc-LF7NU4LA-B_-ng-Qd.mjs.map → wc-LF7NU4LA-wLql_W1c.mjs.map} +1 -1
- package/dist/{with-project-scope-BSsArVUs.cjs → with-project-scope-Cz_Tmvau.cjs} +3 -6
- package/dist/with-project-scope-Cz_Tmvau.cjs.map +1 -0
- package/dist/{with-project-scope-C6gaaB04.mjs → with-project-scope-DWwbN8Qs.mjs} +4 -7
- package/dist/with-project-scope-DWwbN8Qs.mjs.map +1 -0
- package/dist/{xan-Y6WF3IRG-DHhphzLb.cjs → xan-Y6WF3IRG-BTAFHcaS.cjs} +6 -6
- package/dist/{xan-Y6WF3IRG-DHhphzLb.cjs.map → xan-Y6WF3IRG-BTAFHcaS.cjs.map} +1 -1
- package/dist/{xan-Y6WF3IRG-BXWEZVur.mjs → xan-Y6WF3IRG-DN5T5LS5.mjs} +6 -6
- package/dist/{xan-Y6WF3IRG-BXWEZVur.mjs.map → xan-Y6WF3IRG-DN5T5LS5.mjs.map} +1 -1
- package/dist/{xan-view-HDVKHFC2-WPJFqBbO.mjs → xan-view-HDVKHFC2-BQQBGxmS.mjs} +3 -3
- package/dist/{xan-view-HDVKHFC2-WPJFqBbO.mjs.map → xan-view-HDVKHFC2-BQQBGxmS.mjs.map} +1 -1
- package/dist/{xan-view-HDVKHFC2-C1H88LhM.cjs → xan-view-HDVKHFC2-CgL1WiSa.cjs} +3 -3
- package/dist/{xan-view-HDVKHFC2-C1H88LhM.cjs.map → xan-view-HDVKHFC2-CgL1WiSa.cjs.map} +1 -1
- package/dist/{xargs-MGZPH7AX-C_1kQIIR.mjs → xargs-MGZPH7AX-B1z5_213.mjs} +2 -2
- package/dist/{xargs-MGZPH7AX-C_1kQIIR.mjs.map → xargs-MGZPH7AX-B1z5_213.mjs.map} +1 -1
- package/dist/{xargs-MGZPH7AX-D0x1uJ2C.cjs → xargs-MGZPH7AX-D7LS1Gf3.cjs} +2 -2
- package/dist/{xargs-MGZPH7AX-D0x1uJ2C.cjs.map → xargs-MGZPH7AX-D7LS1Gf3.cjs.map} +1 -1
- package/dist/{yq-4QJW3EQG-CVOgQbCg.cjs → yq-4QJW3EQG-CiIzl_ob.cjs} +3 -3
- package/dist/{yq-4QJW3EQG-CVOgQbCg.cjs.map → yq-4QJW3EQG-CiIzl_ob.cjs.map} +1 -1
- package/dist/{yq-4QJW3EQG-BGn4IxWd.mjs → yq-4QJW3EQG-D6NJ7PX1.mjs} +3 -3
- package/dist/{yq-4QJW3EQG-BGn4IxWd.mjs.map → yq-4QJW3EQG-D6NJ7PX1.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/dist-BB6Y_75v.mjs.map +0 -1
- package/dist/dist-BtAOWi5K.cjs.map +0 -1
- package/dist/start-CXfv1wyL.cjs.map +0 -1
- package/dist/start-Dyqmdghh.mjs.map +0 -1
- package/dist/with-project-scope-BSsArVUs.cjs.map +0 -1
- package/dist/with-project-scope-C6gaaB04.mjs.map +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import Docker from "dockerode";
|
|
3
3
|
import { mkdir } from "node:fs/promises";
|
|
4
|
-
import { DEFAULT_DATABASE_URL, claimNextJob, clearCredentialInstanceDefaults, createPostgresCancelChannel, decryptCredentialPayload, encryptCredentialPayload, enqueueJob, ensureOAuthCredentialInstance, failWorkflowRun, getProjectScopeId, inferDialect, markJobComplete, markJobFailed, requeueExpiredLeases, resolvePostgresUrlFromEnv, resolveProjectDatabaseUrlFromEnv, scheduleJobRetry, selectCredentialInstancesForScope, upsertCredentialInstance } from "@keystrokehq/database";
|
|
4
|
+
import { DEFAULT_DATABASE_URL, claimDueTriggers, claimDueTriggersForOrg, claimNextJob, clearCredentialInstanceDefaults, createPostgresCancelChannel, decryptCredentialPayload, disableAllTriggerSchedules, disableTriggerSchedulesNotInSlugs, encryptCredentialPayload, enqueueJob, ensureOAuthCredentialInstance, failWorkflowRun, getProjectScopeId, inferDialect, listEnabledScheduledTriggers, listExecutableAttachmentsByTriggerIds, markJobComplete, markJobFailed, requeueExpiredLeases, resolvePostgresUrlFromEnv, resolveProjectDatabaseUrlFromEnv, scheduleJobRetry, selectActiveEphemeralScheduledTriggerSlugs, selectCredentialInstancesForScope, selectTriggerBySlug, setTriggerScheduleEnabled, upsertCredentialInstance, upsertTriggerScheduleFields } from "@keystrokehq/database";
|
|
5
|
+
import EventEmitter$1, { EventEmitter } from "node:events";
|
|
5
6
|
import { z } from "zod";
|
|
6
7
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
8
|
import { deleteSecretValuesForRef, ensureOAuthApp, getOrganizationScopeId, saveOAuthConnection, selectSecretValue, upsertSecretValue } from "@keystrokehq/platform-database";
|
|
@@ -10,7 +11,6 @@ import "zod/v3";
|
|
|
10
11
|
import * as z4mini from "zod/v4-mini";
|
|
11
12
|
import * as z$1 from "zod/v4";
|
|
12
13
|
import process$1 from "node:process";
|
|
13
|
-
import EventEmitter$1, { EventEmitter } from "node:events";
|
|
14
14
|
import assert, { notStrictEqual } from "node:assert";
|
|
15
15
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
16
16
|
import pg from "pg";
|
|
@@ -5270,18 +5270,19 @@ object({
|
|
|
5270
5270
|
source: _enum([
|
|
5271
5271
|
"custom",
|
|
5272
5272
|
"mcp",
|
|
5273
|
-
"openapi"
|
|
5273
|
+
"openapi",
|
|
5274
|
+
"graphql"
|
|
5274
5275
|
]).default("custom"),
|
|
5275
|
-
|
|
5276
|
+
url: string().url().optional(),
|
|
5276
5277
|
authKind: AppAuthKindSchema$1.optional(),
|
|
5277
5278
|
fields: optionalCredentialFieldsSchema$1.optional(),
|
|
5278
5279
|
credentialScheme: AppCredentialSchemeSchema$1.optional(),
|
|
5279
5280
|
oauthScopes: array(OAuthScopeOptionSchema$1).optional()
|
|
5280
5281
|
}).superRefine((data, ctx) => {
|
|
5281
|
-
if (data.source === "mcp" && !data.
|
|
5282
|
+
if ((data.source === "mcp" || data.source === "openapi" || data.source === "graphql") && !data.url) ctx.addIssue({
|
|
5282
5283
|
code: "custom",
|
|
5283
|
-
message: "
|
|
5284
|
-
path: ["
|
|
5284
|
+
message: "url is required for this app source",
|
|
5285
|
+
path: ["url"]
|
|
5285
5286
|
});
|
|
5286
5287
|
if (!(data.authKind ?? (data.source === "custom" ? "api_key" : void 0))) {
|
|
5287
5288
|
ctx.addIssue({
|
|
@@ -5307,7 +5308,7 @@ object({
|
|
|
5307
5308
|
category: string().min(1),
|
|
5308
5309
|
authKind: AppAuthKindSchema$1,
|
|
5309
5310
|
source: AppSourceSchema$1,
|
|
5310
|
-
|
|
5311
|
+
url: string().url().nullable().optional(),
|
|
5311
5312
|
credentialFields: optionalCredentialFieldsSchema$1.optional(),
|
|
5312
5313
|
credentialScheme: AppCredentialSchemeSchema$1.optional(),
|
|
5313
5314
|
oauthScopes: array(OAuthScopeOptionSchema$1).optional(),
|
|
@@ -5327,7 +5328,7 @@ object({
|
|
|
5327
5328
|
source: AppSourceSchema$1,
|
|
5328
5329
|
credentialFields: AppCredentialFieldsSchema$1.optional(),
|
|
5329
5330
|
credentialScheme: AppCredentialSchemeSchema$1.optional(),
|
|
5330
|
-
|
|
5331
|
+
url: string().url().nullable().optional(),
|
|
5331
5332
|
createdAt: string().min(1),
|
|
5332
5333
|
updatedAt: string().min(1)
|
|
5333
5334
|
});
|
|
@@ -5346,8 +5347,8 @@ object({
|
|
|
5346
5347
|
credentialFields: AppCredentialFieldsSchema$1.optional(),
|
|
5347
5348
|
/** Composio auth scheme when credentialFields are present. */
|
|
5348
5349
|
credentialScheme: AppCredentialSchemeSchema$1.optional(),
|
|
5349
|
-
/**
|
|
5350
|
-
|
|
5350
|
+
/** Endpoint URL for MCP, OpenAPI, or GraphQL custom apps. */
|
|
5351
|
+
url: string().url().nullable().optional(),
|
|
5351
5352
|
/** When present, the app supports agent gateway bindings (external channels). */
|
|
5352
5353
|
gateway: AppGatewaySchema$1.optional()
|
|
5353
5354
|
});
|
|
@@ -5381,7 +5382,7 @@ object({
|
|
|
5381
5382
|
credentialFields: record(string(), AppCredentialFieldSchema$1).optional(),
|
|
5382
5383
|
credentialScheme: AppCredentialSchemeSchema$1.optional(),
|
|
5383
5384
|
oauthScopes: array(OAuthScopeOptionSchema$1),
|
|
5384
|
-
|
|
5385
|
+
url: string().url(),
|
|
5385
5386
|
oauth: McpAuthProbeOAuthSchema$1.optional(),
|
|
5386
5387
|
serverName: string().optional(),
|
|
5387
5388
|
serverDescription: string().optional()
|
|
@@ -5405,7 +5406,21 @@ object({
|
|
|
5405
5406
|
credentialFields: record(string(), AppCredentialFieldSchema$1).optional(),
|
|
5406
5407
|
credentialScheme: AppCredentialSchemeSchema$1.optional(),
|
|
5407
5408
|
oauthScopes: array(OAuthScopeOptionSchema$1),
|
|
5408
|
-
|
|
5409
|
+
url: string().url(),
|
|
5410
|
+
name: string().optional(),
|
|
5411
|
+
description: string().optional(),
|
|
5412
|
+
homepageUrl: string().optional()
|
|
5413
|
+
})
|
|
5414
|
+
});
|
|
5415
|
+
object({ url: string().url() });
|
|
5416
|
+
object({
|
|
5417
|
+
detected: boolean(),
|
|
5418
|
+
template: object({
|
|
5419
|
+
authKind: AppAuthKindSchema$1,
|
|
5420
|
+
credentialFields: record(string(), AppCredentialFieldSchema$1).optional(),
|
|
5421
|
+
credentialScheme: AppCredentialSchemeSchema$1.optional(),
|
|
5422
|
+
oauthScopes: array(OAuthScopeOptionSchema$1),
|
|
5423
|
+
url: string().url(),
|
|
5409
5424
|
name: string().optional(),
|
|
5410
5425
|
description: string().optional(),
|
|
5411
5426
|
homepageUrl: string().optional()
|
|
@@ -6969,11 +6984,11 @@ async function waitForHealth(baseUrl, options = {}) {
|
|
|
6969
6984
|
try {
|
|
6970
6985
|
if ((await fetchImpl(url, { signal: AbortSignal.timeout(2e3) })).ok) return;
|
|
6971
6986
|
} catch {}
|
|
6972
|
-
await sleep$
|
|
6987
|
+
await sleep$2(intervalMs);
|
|
6973
6988
|
}
|
|
6974
6989
|
throw new Error(`Project server health check timed out after ${timeoutMs}ms (${url})`);
|
|
6975
6990
|
}
|
|
6976
|
-
function sleep$
|
|
6991
|
+
function sleep$2(ms) {
|
|
6977
6992
|
return new Promise((resolve) => {
|
|
6978
6993
|
setTimeout(resolve, ms);
|
|
6979
6994
|
});
|
|
@@ -8707,18 +8722,19 @@ const CreateCustomAppRequestSchema = z.object({
|
|
|
8707
8722
|
source: z.enum([
|
|
8708
8723
|
"custom",
|
|
8709
8724
|
"mcp",
|
|
8710
|
-
"openapi"
|
|
8725
|
+
"openapi",
|
|
8726
|
+
"graphql"
|
|
8711
8727
|
]).default("custom"),
|
|
8712
|
-
|
|
8728
|
+
url: z.string().url().optional(),
|
|
8713
8729
|
authKind: AppAuthKindSchema.optional(),
|
|
8714
8730
|
fields: optionalCredentialFieldsSchema.optional(),
|
|
8715
8731
|
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
8716
8732
|
oauthScopes: z.array(OAuthScopeOptionSchema).optional()
|
|
8717
8733
|
}).superRefine((data, ctx) => {
|
|
8718
|
-
if (data.source === "mcp" && !data.
|
|
8734
|
+
if ((data.source === "mcp" || data.source === "openapi" || data.source === "graphql") && !data.url) ctx.addIssue({
|
|
8719
8735
|
code: "custom",
|
|
8720
|
-
message: "
|
|
8721
|
-
path: ["
|
|
8736
|
+
message: "url is required for this app source",
|
|
8737
|
+
path: ["url"]
|
|
8722
8738
|
});
|
|
8723
8739
|
if (!(data.authKind ?? (data.source === "custom" ? "api_key" : void 0))) {
|
|
8724
8740
|
ctx.addIssue({
|
|
@@ -8745,7 +8761,7 @@ const CustomAppDetailSchema = z.object({
|
|
|
8745
8761
|
category: z.string().min(1),
|
|
8746
8762
|
authKind: AppAuthKindSchema,
|
|
8747
8763
|
source: AppSourceSchema,
|
|
8748
|
-
|
|
8764
|
+
url: z.string().url().nullable().optional(),
|
|
8749
8765
|
credentialFields: optionalCredentialFieldsSchema.optional(),
|
|
8750
8766
|
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
8751
8767
|
oauthScopes: z.array(OAuthScopeOptionSchema).optional(),
|
|
@@ -8767,7 +8783,7 @@ z.object({
|
|
|
8767
8783
|
source: AppSourceSchema,
|
|
8768
8784
|
credentialFields: AppCredentialFieldsSchema.optional(),
|
|
8769
8785
|
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
8770
|
-
|
|
8786
|
+
url: z.string().url().nullable().optional(),
|
|
8771
8787
|
createdAt: z.string().min(1),
|
|
8772
8788
|
updatedAt: z.string().min(1)
|
|
8773
8789
|
});
|
|
@@ -8790,8 +8806,8 @@ const AppCatalogEntrySchema = z.object({
|
|
|
8790
8806
|
credentialFields: AppCredentialFieldsSchema.optional(),
|
|
8791
8807
|
/** Composio auth scheme when credentialFields are present. */
|
|
8792
8808
|
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
8793
|
-
/**
|
|
8794
|
-
|
|
8809
|
+
/** Endpoint URL for MCP, OpenAPI, or GraphQL custom apps. */
|
|
8810
|
+
url: z.string().url().nullable().optional(),
|
|
8795
8811
|
/** When present, the app supports agent gateway bindings (external channels). */
|
|
8796
8812
|
gateway: AppGatewaySchema.optional()
|
|
8797
8813
|
});
|
|
@@ -8826,7 +8842,7 @@ const McpDiscoverResponseSchema = z.object({
|
|
|
8826
8842
|
credentialFields: z.record(z.string(), AppCredentialFieldSchema).optional(),
|
|
8827
8843
|
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
8828
8844
|
oauthScopes: z.array(OAuthScopeOptionSchema),
|
|
8829
|
-
|
|
8845
|
+
url: z.string().url(),
|
|
8830
8846
|
oauth: McpAuthProbeOAuthSchema.optional(),
|
|
8831
8847
|
serverName: z.string().optional(),
|
|
8832
8848
|
serverDescription: z.string().optional()
|
|
@@ -8843,7 +8859,7 @@ const StartMcpOAuthConnectionInputSchema = z.object({
|
|
|
8843
8859
|
});
|
|
8844
8860
|
const StartMcpOAuthConnectionResultSchema = z.object({ authorizeUrl: z.string().url() });
|
|
8845
8861
|
function mcpProbeToAppTemplate(probe) {
|
|
8846
|
-
const
|
|
8862
|
+
const url = probe.url;
|
|
8847
8863
|
if (probe.mode === "oauth" && probe.oauth) return {
|
|
8848
8864
|
authKind: "oauth",
|
|
8849
8865
|
oauthScopes: probe.oauth.scopes.map((name) => ({
|
|
@@ -8851,7 +8867,7 @@ function mcpProbeToAppTemplate(probe) {
|
|
|
8851
8867
|
description: name,
|
|
8852
8868
|
defaultSelected: true
|
|
8853
8869
|
})),
|
|
8854
|
-
|
|
8870
|
+
url,
|
|
8855
8871
|
oauth: probe.oauth
|
|
8856
8872
|
};
|
|
8857
8873
|
if (probe.mode === "token") return {
|
|
@@ -8862,32 +8878,32 @@ function mcpProbeToAppTemplate(probe) {
|
|
|
8862
8878
|
label: "Token"
|
|
8863
8879
|
} },
|
|
8864
8880
|
oauthScopes: [],
|
|
8865
|
-
|
|
8881
|
+
url
|
|
8866
8882
|
};
|
|
8867
8883
|
return {
|
|
8868
8884
|
authKind: "api_key",
|
|
8869
8885
|
credentialFields: {},
|
|
8870
8886
|
oauthScopes: [],
|
|
8871
|
-
|
|
8887
|
+
url
|
|
8872
8888
|
};
|
|
8873
8889
|
}
|
|
8874
|
-
function isRecord$1(value) {
|
|
8890
|
+
function isRecord$1$1(value) {
|
|
8875
8891
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8876
8892
|
}
|
|
8877
|
-
function trimString(value) {
|
|
8893
|
+
function trimString$1(value) {
|
|
8878
8894
|
if (typeof value !== "string") return;
|
|
8879
8895
|
const trimmed = value.trim();
|
|
8880
8896
|
return trimmed.length > 0 ? trimmed : void 0;
|
|
8881
8897
|
}
|
|
8882
8898
|
function securitySchemesFromSpec(spec) {
|
|
8883
|
-
if (isRecord$1(spec.components) && isRecord$1(spec.components.securitySchemes)) return spec.components.securitySchemes;
|
|
8884
|
-
if (isRecord$1(spec.securityDefinitions)) return spec.securityDefinitions;
|
|
8899
|
+
if (isRecord$1$1(spec.components) && isRecord$1$1(spec.components.securitySchemes)) return spec.components.securitySchemes;
|
|
8900
|
+
if (isRecord$1$1(spec.securityDefinitions)) return spec.securityDefinitions;
|
|
8885
8901
|
}
|
|
8886
8902
|
function primarySecuritySchemeName(spec) {
|
|
8887
8903
|
const security = spec.security;
|
|
8888
8904
|
if (Array.isArray(security) && security.length > 0) {
|
|
8889
8905
|
const first = security[0];
|
|
8890
|
-
if (isRecord$1(first)) {
|
|
8906
|
+
if (isRecord$1$1(first)) {
|
|
8891
8907
|
const keys = Object.keys(first);
|
|
8892
8908
|
if (keys.length > 0) return keys[0];
|
|
8893
8909
|
}
|
|
@@ -8902,28 +8918,28 @@ function homepageUrlFromSpec(spec) {
|
|
|
8902
8918
|
const servers = spec.servers;
|
|
8903
8919
|
if (Array.isArray(servers) && servers.length > 0) {
|
|
8904
8920
|
const first = servers[0];
|
|
8905
|
-
if (isRecord$1(first)) {
|
|
8906
|
-
const url = trimString(first.url);
|
|
8921
|
+
if (isRecord$1$1(first)) {
|
|
8922
|
+
const url = trimString$1(first.url);
|
|
8907
8923
|
if (url) return url.replace(/\/+$/, "");
|
|
8908
8924
|
}
|
|
8909
8925
|
}
|
|
8910
8926
|
if (typeof spec.swagger === "string") {
|
|
8911
8927
|
const schemes = spec.schemes;
|
|
8912
8928
|
const scheme = Array.isArray(schemes) && typeof schemes[0] === "string" ? schemes[0] : "https";
|
|
8913
|
-
const host = trimString(spec.host);
|
|
8929
|
+
const host = trimString$1(spec.host);
|
|
8914
8930
|
const basePath = typeof spec.basePath === "string" ? spec.basePath : "";
|
|
8915
8931
|
if (host) return `${scheme}://${host}${basePath}`.replace(/\/+$/, "");
|
|
8916
8932
|
}
|
|
8917
8933
|
}
|
|
8918
8934
|
function oauthScopesFromOas3Scheme(scheme) {
|
|
8919
8935
|
const flows = scheme.flows;
|
|
8920
|
-
if (!isRecord$1(flows)) return [];
|
|
8936
|
+
if (!isRecord$1$1(flows)) return [];
|
|
8921
8937
|
const scopes = [];
|
|
8922
|
-
for (const flow of Object.values(flows)) if (isRecord$1(flow) && isRecord$1(flow.scopes)) scopes.push(...Object.keys(flow.scopes));
|
|
8938
|
+
for (const flow of Object.values(flows)) if (isRecord$1$1(flow) && isRecord$1$1(flow.scopes)) scopes.push(...Object.keys(flow.scopes));
|
|
8923
8939
|
return scopes;
|
|
8924
8940
|
}
|
|
8925
8941
|
function oauthScopesFromSwagger2Scheme(scheme) {
|
|
8926
|
-
if (!isRecord$1(scheme.scopes)) return [];
|
|
8942
|
+
if (!isRecord$1$1(scheme.scopes)) return [];
|
|
8927
8943
|
return Object.keys(scheme.scopes);
|
|
8928
8944
|
}
|
|
8929
8945
|
function oauthScopeOptions(scopeNames) {
|
|
@@ -8934,7 +8950,7 @@ function oauthScopeOptions(scopeNames) {
|
|
|
8934
8950
|
}));
|
|
8935
8951
|
}
|
|
8936
8952
|
function apiKeyPlacement(scheme) {
|
|
8937
|
-
const name = trimString(scheme.name) ?? "api_key";
|
|
8953
|
+
const name = trimString$1(scheme.name) ?? "api_key";
|
|
8938
8954
|
if ((typeof scheme.in === "string" ? scheme.in.toLowerCase() : "header") === "query") return {
|
|
8939
8955
|
kind: "query",
|
|
8940
8956
|
name
|
|
@@ -8976,7 +8992,7 @@ function mapSecurityScheme(scheme) {
|
|
|
8976
8992
|
credentialScheme: "API_KEY",
|
|
8977
8993
|
credentialFields: { token: {
|
|
8978
8994
|
secret: true,
|
|
8979
|
-
label: trimString(scheme.name) ?? "API Key",
|
|
8995
|
+
label: trimString$1(scheme.name) ?? "API Key",
|
|
8980
8996
|
placement: apiKeyPlacement(scheme)
|
|
8981
8997
|
} },
|
|
8982
8998
|
oauthScopes: []
|
|
@@ -9008,18 +9024,18 @@ function mapSecurityScheme(scheme) {
|
|
|
9008
9024
|
};
|
|
9009
9025
|
}
|
|
9010
9026
|
/** Map a parsed OpenAPI/Swagger document to a custom app template. */
|
|
9011
|
-
function openApiSpecToAppTemplate(spec,
|
|
9012
|
-
if (!isRecord$1(spec)) throw new Error("Invalid OpenAPI spec");
|
|
9013
|
-
const info = isRecord$1(spec.info) ? spec.info : {};
|
|
9014
|
-
const name = trimString(info.title);
|
|
9015
|
-
const description = trimString(info.description);
|
|
9027
|
+
function openApiSpecToAppTemplate(spec, url) {
|
|
9028
|
+
if (!isRecord$1$1(spec)) throw new Error("Invalid OpenAPI spec");
|
|
9029
|
+
const info = isRecord$1$1(spec.info) ? spec.info : {};
|
|
9030
|
+
const name = trimString$1(info.title);
|
|
9031
|
+
const description = trimString$1(info.description);
|
|
9016
9032
|
const homepageUrl = homepageUrlFromSpec(spec);
|
|
9017
9033
|
const schemes = securitySchemesFromSpec(spec);
|
|
9018
9034
|
const schemeName = primarySecuritySchemeName(spec);
|
|
9019
9035
|
let authPart = mapSecurityScheme({ type: "none" });
|
|
9020
|
-
if (schemeName && schemes && isRecord$1(schemes[schemeName])) authPart = mapSecurityScheme(schemes[schemeName]);
|
|
9036
|
+
if (schemeName && schemes && isRecord$1$1(schemes[schemeName])) authPart = mapSecurityScheme(schemes[schemeName]);
|
|
9021
9037
|
return {
|
|
9022
|
-
|
|
9038
|
+
url,
|
|
9023
9039
|
name,
|
|
9024
9040
|
description,
|
|
9025
9041
|
homepageUrl,
|
|
@@ -9037,7 +9053,125 @@ const OpenApiDiscoverResponseSchema = z.object({
|
|
|
9037
9053
|
credentialFields: z.record(z.string(), AppCredentialFieldSchema).optional(),
|
|
9038
9054
|
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
9039
9055
|
oauthScopes: z.array(OAuthScopeOptionSchema),
|
|
9040
|
-
|
|
9056
|
+
url: z.string().url(),
|
|
9057
|
+
name: z.string().optional(),
|
|
9058
|
+
description: z.string().optional(),
|
|
9059
|
+
homepageUrl: z.string().optional()
|
|
9060
|
+
})
|
|
9061
|
+
});
|
|
9062
|
+
function isRecord(value) {
|
|
9063
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
9064
|
+
}
|
|
9065
|
+
function trimString(value) {
|
|
9066
|
+
if (typeof value !== "string") return;
|
|
9067
|
+
const trimmed = value.trim();
|
|
9068
|
+
return trimmed.length > 0 ? trimmed : void 0;
|
|
9069
|
+
}
|
|
9070
|
+
function displayNameFromUrl(value) {
|
|
9071
|
+
try {
|
|
9072
|
+
const hostname = new URL(value).hostname.replace(/^www\./, "");
|
|
9073
|
+
const parts = hostname.split(".").filter(Boolean);
|
|
9074
|
+
let label = parts[0] ?? hostname;
|
|
9075
|
+
if ((label === "mcp" || label === "api" || label === "graphql") && parts.length > 1) label = parts[1] ?? label;
|
|
9076
|
+
if (!label) return;
|
|
9077
|
+
return label.charAt(0).toUpperCase() + label.slice(1);
|
|
9078
|
+
} catch {
|
|
9079
|
+
return;
|
|
9080
|
+
}
|
|
9081
|
+
}
|
|
9082
|
+
function homepageUrlFromEndpoint(endpointUrl) {
|
|
9083
|
+
try {
|
|
9084
|
+
return new URL(endpointUrl).origin;
|
|
9085
|
+
} catch {
|
|
9086
|
+
return;
|
|
9087
|
+
}
|
|
9088
|
+
}
|
|
9089
|
+
function typeDescription(schema) {
|
|
9090
|
+
if (!schema) return;
|
|
9091
|
+
return trimString(schema.description);
|
|
9092
|
+
}
|
|
9093
|
+
function authFromProbe(authProbe) {
|
|
9094
|
+
if (authProbe === "basic") return {
|
|
9095
|
+
authKind: "api_key",
|
|
9096
|
+
credentialScheme: "BASIC",
|
|
9097
|
+
credentialFields: {
|
|
9098
|
+
username: { label: "Username" },
|
|
9099
|
+
password: {
|
|
9100
|
+
secret: true,
|
|
9101
|
+
label: "Password"
|
|
9102
|
+
}
|
|
9103
|
+
},
|
|
9104
|
+
oauthScopes: []
|
|
9105
|
+
};
|
|
9106
|
+
if (authProbe === "none") return {
|
|
9107
|
+
authKind: "api_key",
|
|
9108
|
+
credentialFields: {},
|
|
9109
|
+
oauthScopes: []
|
|
9110
|
+
};
|
|
9111
|
+
return {
|
|
9112
|
+
authKind: "api_key",
|
|
9113
|
+
credentialScheme: "BEARER_TOKEN",
|
|
9114
|
+
credentialFields: { token: {
|
|
9115
|
+
secret: true,
|
|
9116
|
+
label: "Token",
|
|
9117
|
+
placement: DEFAULT_MCP_API_KEY_PLACEMENT
|
|
9118
|
+
} },
|
|
9119
|
+
oauthScopes: []
|
|
9120
|
+
};
|
|
9121
|
+
}
|
|
9122
|
+
/** Infer auth requirements from an unauthenticated probe response. */
|
|
9123
|
+
function inferGraphqlAuthFromProbe(status, wwwAuthenticate, body) {
|
|
9124
|
+
if (status === 401) {
|
|
9125
|
+
if ((wwwAuthenticate?.toLowerCase() ?? "").includes("basic")) return "basic";
|
|
9126
|
+
return "bearer";
|
|
9127
|
+
}
|
|
9128
|
+
if (status === 403) return "bearer";
|
|
9129
|
+
if (isGraphqlAuthError(body)) return "bearer";
|
|
9130
|
+
return "none";
|
|
9131
|
+
}
|
|
9132
|
+
const AUTH_ERROR_PATTERN = /auth|unauthorized|unauthenticated|access token|credentials|not authenticated/i;
|
|
9133
|
+
function isGraphqlAuthError(body) {
|
|
9134
|
+
if (!isRecord(body) || !Array.isArray(body.errors)) return false;
|
|
9135
|
+
return body.errors.some((error) => {
|
|
9136
|
+
if (!isRecord(error)) return false;
|
|
9137
|
+
const message = typeof error.message === "string" ? error.message : "";
|
|
9138
|
+
const extensions = isRecord(error.extensions) ? error.extensions : void 0;
|
|
9139
|
+
const extensionHint = extensions ? `${extensions.code ?? ""} ${extensions.type ?? ""}` : "";
|
|
9140
|
+
return AUTH_ERROR_PATTERN.test(message) || /AUTH/i.test(extensionHint);
|
|
9141
|
+
});
|
|
9142
|
+
}
|
|
9143
|
+
/** Map a GraphQL introspection result to a custom app template. */
|
|
9144
|
+
function graphqlIntrospectionToAppTemplate(introspection, endpointUrl, authProbe = "bearer") {
|
|
9145
|
+
const root = isRecord(introspection) ? introspection : {};
|
|
9146
|
+
const data = isRecord(root.data) ? root.data : root;
|
|
9147
|
+
const schema = isRecord(data.__schema) ? data.__schema : void 0;
|
|
9148
|
+
const queryType = schema && isRecord(schema.queryType) ? schema.queryType : void 0;
|
|
9149
|
+
const mutationType = schema && isRecord(schema.mutationType) ? schema.mutationType : void 0;
|
|
9150
|
+
const queryName = trimString(queryType?.name);
|
|
9151
|
+
const name = queryName === "Query" ? displayNameFromUrl(endpointUrl) : queryName;
|
|
9152
|
+
const description = typeDescription(queryType) || typeDescription(mutationType) || (name ? `GraphQL API for ${name}.` : void 0);
|
|
9153
|
+
const homepageUrl = homepageUrlFromEndpoint(endpointUrl);
|
|
9154
|
+
const authPart = authFromProbe(authProbe);
|
|
9155
|
+
return {
|
|
9156
|
+
url: endpointUrl,
|
|
9157
|
+
name,
|
|
9158
|
+
description,
|
|
9159
|
+
homepageUrl,
|
|
9160
|
+
authKind: authPart.authKind,
|
|
9161
|
+
credentialFields: authPart.credentialFields,
|
|
9162
|
+
credentialScheme: authPart.credentialScheme,
|
|
9163
|
+
oauthScopes: authPart.oauthScopes
|
|
9164
|
+
};
|
|
9165
|
+
}
|
|
9166
|
+
const GraphqlDiscoverRequestSchema = z.object({ url: z.string().url() });
|
|
9167
|
+
const GraphqlDiscoverResponseSchema = z.object({
|
|
9168
|
+
detected: z.boolean(),
|
|
9169
|
+
template: z.object({
|
|
9170
|
+
authKind: AppAuthKindSchema,
|
|
9171
|
+
credentialFields: z.record(z.string(), AppCredentialFieldSchema).optional(),
|
|
9172
|
+
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
9173
|
+
oauthScopes: z.array(OAuthScopeOptionSchema),
|
|
9174
|
+
url: z.string().url(),
|
|
9041
9175
|
name: z.string().optional(),
|
|
9042
9176
|
description: z.string().optional(),
|
|
9043
9177
|
homepageUrl: z.string().optional()
|
|
@@ -29693,9 +29827,9 @@ async function discoverMcpApp(url) {
|
|
|
29693
29827
|
};
|
|
29694
29828
|
}
|
|
29695
29829
|
async function beginMcpOAuthConnect(options) {
|
|
29696
|
-
const
|
|
29697
|
-
if (!
|
|
29698
|
-
const discovered = await discoverOAuthServerInfo(new URL(
|
|
29830
|
+
const appUrl = options.app.url?.trim();
|
|
29831
|
+
if (!appUrl || options.app.source !== "mcp" || options.app.authKind !== "oauth") throw new Error("App is not a direct MCP OAuth app");
|
|
29832
|
+
const discovered = await discoverOAuthServerInfo(new URL(appUrl), {});
|
|
29699
29833
|
const metadata = discovered.authorizationServerMetadata;
|
|
29700
29834
|
if (!metadata?.authorization_endpoint || !metadata.token_endpoint) throw new Error("MCP server does not expose OAuth authorization metadata");
|
|
29701
29835
|
const oauth = {
|
|
@@ -29726,9 +29860,9 @@ async function beginMcpOAuthConnect(options) {
|
|
|
29726
29860
|
tokenStrategy: "refresh",
|
|
29727
29861
|
clientId: clientInformation.client_id,
|
|
29728
29862
|
clientSecret: oauthClientSecretForStorage(clientInformation.client_secret),
|
|
29729
|
-
metadata: oauthAppMetadata(oauth,
|
|
29863
|
+
metadata: oauthAppMetadata(oauth, appUrl, { tokenEndpointAuthMethod: clientInformation.token_endpoint_auth_method })
|
|
29730
29864
|
});
|
|
29731
|
-
const resourceUrl = oauth.resource ? new URL(oauth.resource) : new URL(
|
|
29865
|
+
const resourceUrl = oauth.resource ? new URL(oauth.resource) : new URL(appUrl);
|
|
29732
29866
|
const statePayload = {
|
|
29733
29867
|
codeVerifier: "",
|
|
29734
29868
|
appSlug: options.app.slug,
|
|
@@ -29741,7 +29875,7 @@ async function beginMcpOAuthConnect(options) {
|
|
|
29741
29875
|
authorizationServerUrl: discovered.authorizationServerUrl,
|
|
29742
29876
|
resource: oauth.resource,
|
|
29743
29877
|
oauthMetadata: oauth,
|
|
29744
|
-
mcpUrl,
|
|
29878
|
+
mcpUrl: appUrl,
|
|
29745
29879
|
redirectUri: options.redirectUri,
|
|
29746
29880
|
clientId: clientInformation.client_id,
|
|
29747
29881
|
clientSecret: clientInformation.client_secret,
|
|
@@ -29818,11 +29952,11 @@ async function completeMcpOAuthConnect(options) {
|
|
|
29818
29952
|
};
|
|
29819
29953
|
}
|
|
29820
29954
|
const MAX_SPEC_BYTES = 5 * 1024 * 1024;
|
|
29821
|
-
function isRecord(value) {
|
|
29955
|
+
function isRecord$1(value) {
|
|
29822
29956
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
29823
29957
|
}
|
|
29824
29958
|
function isOpenApiSpec(value) {
|
|
29825
|
-
return isRecord(value) && (typeof value.openapi === "string" || typeof value.swagger === "string");
|
|
29959
|
+
return isRecord$1(value) && (typeof value.openapi === "string" || typeof value.swagger === "string");
|
|
29826
29960
|
}
|
|
29827
29961
|
async function discoverOpenApiApp(url) {
|
|
29828
29962
|
const response = await fetch(url, { redirect: "follow" });
|
|
@@ -29843,6 +29977,76 @@ async function discoverOpenApiApp(url) {
|
|
|
29843
29977
|
template: openApiSpecToAppTemplate(parsed, url)
|
|
29844
29978
|
};
|
|
29845
29979
|
}
|
|
29980
|
+
const MAX_RESPONSE_BYTES = 5 * 1024 * 1024;
|
|
29981
|
+
const INTROSPECTION_QUERY = `query IntrospectionQuery {
|
|
29982
|
+
__schema {
|
|
29983
|
+
queryType { name description }
|
|
29984
|
+
mutationType { name description }
|
|
29985
|
+
}
|
|
29986
|
+
}`;
|
|
29987
|
+
const USAGE_AUTH_PROBE_QUERY = "query { __typename }";
|
|
29988
|
+
async function postGraphql(endpointUrl, query) {
|
|
29989
|
+
const response = await fetch(endpointUrl, {
|
|
29990
|
+
method: "POST",
|
|
29991
|
+
redirect: "follow",
|
|
29992
|
+
headers: {
|
|
29993
|
+
"content-type": "application/json",
|
|
29994
|
+
accept: "application/json"
|
|
29995
|
+
},
|
|
29996
|
+
body: JSON.stringify({ query })
|
|
29997
|
+
});
|
|
29998
|
+
const contentLength = response.headers.get("content-length");
|
|
29999
|
+
if (contentLength && Number(contentLength) > MAX_RESPONSE_BYTES) throw new Error("GraphQL introspection response is too large");
|
|
30000
|
+
const text = await response.text();
|
|
30001
|
+
if (text.length > MAX_RESPONSE_BYTES) throw new Error("GraphQL introspection response is too large");
|
|
30002
|
+
let body;
|
|
30003
|
+
try {
|
|
30004
|
+
body = JSON.parse(text);
|
|
30005
|
+
} catch {
|
|
30006
|
+
throw new Error("GraphQL endpoint did not return JSON");
|
|
30007
|
+
}
|
|
30008
|
+
return {
|
|
30009
|
+
response,
|
|
30010
|
+
body,
|
|
30011
|
+
text
|
|
30012
|
+
};
|
|
30013
|
+
}
|
|
30014
|
+
function introspectionDisabled(body) {
|
|
30015
|
+
if (!isRecord(body) || !Array.isArray(body.errors)) return false;
|
|
30016
|
+
return body.errors.some((error) => {
|
|
30017
|
+
if (!isRecord(error)) return false;
|
|
30018
|
+
return (typeof error.message === "string" ? error.message.toLowerCase() : "").includes("introspection");
|
|
30019
|
+
});
|
|
30020
|
+
}
|
|
30021
|
+
function parseEndpointUrl(url) {
|
|
30022
|
+
const trimmed = url.trim();
|
|
30023
|
+
const parsed = new URL(trimmed);
|
|
30024
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") throw new Error("GraphQL endpoint must use http or https");
|
|
30025
|
+
return parsed;
|
|
30026
|
+
}
|
|
30027
|
+
async function discoverGraphqlApp(url) {
|
|
30028
|
+
const endpointUrl = parseEndpointUrl(url).toString();
|
|
30029
|
+
const { response, body } = await postGraphql(endpointUrl, INTROSPECTION_QUERY);
|
|
30030
|
+
const authProbe = inferGraphqlAuthFromProbe(response.status, response.headers.get("www-authenticate"), body);
|
|
30031
|
+
if (!(isRecord(body) && isRecord(body.data) && isRecord(body.data.__schema))) {
|
|
30032
|
+
if (response.status === 401 || response.status === 403) return {
|
|
30033
|
+
detected: true,
|
|
30034
|
+
template: graphqlIntrospectionToAppTemplate({ data: {} }, endpointUrl, authProbe)
|
|
30035
|
+
};
|
|
30036
|
+
if (response.ok && introspectionDisabled(body)) throw new Error("Introspection is disabled on this endpoint");
|
|
30037
|
+
throw new Error(`Failed to introspect GraphQL endpoint (${response.status})`);
|
|
30038
|
+
}
|
|
30039
|
+
let resolvedAuthProbe = authProbe;
|
|
30040
|
+
if (resolvedAuthProbe === "none") {
|
|
30041
|
+
const usageProbe = await postGraphql(endpointUrl, USAGE_AUTH_PROBE_QUERY);
|
|
30042
|
+
const usageAuth = inferGraphqlAuthFromProbe(usageProbe.response.status, usageProbe.response.headers.get("www-authenticate"), usageProbe.body);
|
|
30043
|
+
if (usageAuth !== "none") resolvedAuthProbe = usageAuth;
|
|
30044
|
+
}
|
|
30045
|
+
return {
|
|
30046
|
+
detected: true,
|
|
30047
|
+
template: graphqlIntrospectionToAppTemplate(body, endpointUrl, resolvedAuthProbe)
|
|
30048
|
+
};
|
|
30049
|
+
}
|
|
29846
30050
|
//#endregion
|
|
29847
30051
|
//#region ../../packages/workflow/dist/index.mjs
|
|
29848
30052
|
const zodSchema$1 = z.custom((v) => v instanceof z.ZodType, "must be a Zod schema");
|
|
@@ -29887,6 +30091,18 @@ registerWorkflowRunGetter(() => {
|
|
|
29887
30091
|
*/
|
|
29888
30092
|
const cronScheduleSchema = z.string().trim().min(1, "cron schedule must be a non-empty string").refine(isParseableCron, "must be a valid cron expression").brand();
|
|
29889
30093
|
/**
|
|
30094
|
+
* Resolves the effective schedule for an attachment, applying overrides by
|
|
30095
|
+
* precedence: per-attachment override → global override → the authored
|
|
30096
|
+
* schedule. Pure string precedence — no cron parsing.
|
|
30097
|
+
*/
|
|
30098
|
+
function resolveCronSchedule(attachmentId, schedule, options) {
|
|
30099
|
+
return options.attachmentScheduleOverrides?.[attachmentId] ?? options.cronScheduleOverride ?? schedule;
|
|
30100
|
+
}
|
|
30101
|
+
/** The next time the schedule fires at or after `from`. */
|
|
30102
|
+
function nextTriggerRunAt(schedule, from = /* @__PURE__ */ new Date()) {
|
|
30103
|
+
return toCron(schedule).getNextDate(from);
|
|
30104
|
+
}
|
|
30105
|
+
/**
|
|
29890
30106
|
* Single touchpoint for the `cron-schedule` library — every parse, validation,
|
|
29891
30107
|
* and next-run calculation in this package goes through here.
|
|
29892
30108
|
*/
|
|
@@ -42756,7 +42972,7 @@ function createDatabaseJobQueue() {
|
|
|
42756
42972
|
while (running) try {
|
|
42757
42973
|
const job = await claimNextJob(workerId);
|
|
42758
42974
|
if (!job) {
|
|
42759
|
-
await sleep(pollIntervalMs);
|
|
42975
|
+
await sleep$1(pollIntervalMs);
|
|
42760
42976
|
continue;
|
|
42761
42977
|
}
|
|
42762
42978
|
try {
|
|
@@ -42770,7 +42986,7 @@ function createDatabaseJobQueue() {
|
|
|
42770
42986
|
}
|
|
42771
42987
|
}
|
|
42772
42988
|
} catch {
|
|
42773
|
-
await sleep(pollIntervalMs);
|
|
42989
|
+
await sleep$1(pollIntervalMs);
|
|
42774
42990
|
}
|
|
42775
42991
|
};
|
|
42776
42992
|
loop();
|
|
@@ -42783,9 +42999,126 @@ function createDatabaseJobQueue() {
|
|
|
42783
42999
|
subscribeCancel: (handler) => cancelChannel.subscribeCancel(handler)
|
|
42784
43000
|
};
|
|
42785
43001
|
}
|
|
43002
|
+
function sleep$1(ms) {
|
|
43003
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
43004
|
+
}
|
|
43005
|
+
function enqueueTriggerJob(jobQueue, row, scheduledAt) {
|
|
43006
|
+
const input = {
|
|
43007
|
+
kind: "trigger",
|
|
43008
|
+
targetId: row.slug,
|
|
43009
|
+
runId: crypto.randomUUID(),
|
|
43010
|
+
trigger: row.kind,
|
|
43011
|
+
payload: {},
|
|
43012
|
+
projectId: row.projectId
|
|
43013
|
+
};
|
|
43014
|
+
if (scheduledAt) input.scheduledAt = scheduledAt;
|
|
43015
|
+
return jobQueue.enqueue(input);
|
|
43016
|
+
}
|
|
43017
|
+
async function claimDue(scope, asOf, resolveNextRunAt, limit) {
|
|
43018
|
+
if (scope === "organization") return claimDueTriggersForOrg(asOf, resolveNextRunAt, limit);
|
|
43019
|
+
return claimDueTriggers(asOf, resolveNextRunAt, limit).then((rows) => rows.map((row) => ({
|
|
43020
|
+
...row,
|
|
43021
|
+
projectId: getProjectScopeId()
|
|
43022
|
+
})));
|
|
43023
|
+
}
|
|
43024
|
+
function createScheduleTicker(ctx) {
|
|
43025
|
+
const pollIntervalMs = ctx.pollIntervalMs ?? 1e3;
|
|
43026
|
+
const batchSize = ctx.batchSize ?? 10;
|
|
43027
|
+
async function fireDueSchedules(asOf = /* @__PURE__ */ new Date()) {
|
|
43028
|
+
const claimed = await claimDue(ctx.scope ?? "project", asOf, (schedule) => nextTriggerRunAt(schedule, asOf), batchSize);
|
|
43029
|
+
for (const row of claimed) {
|
|
43030
|
+
if (row.kind !== "cron" && row.kind !== "poll") continue;
|
|
43031
|
+
await enqueueTriggerJob(ctx.jobQueue, {
|
|
43032
|
+
slug: row.slug,
|
|
43033
|
+
kind: row.kind,
|
|
43034
|
+
projectId: row.projectId
|
|
43035
|
+
}, asOf);
|
|
43036
|
+
}
|
|
43037
|
+
return claimed.length;
|
|
43038
|
+
}
|
|
43039
|
+
async function startScheduleTicker(options = {}) {
|
|
43040
|
+
const intervalMs = options.pollIntervalMs ?? pollIntervalMs;
|
|
43041
|
+
const limit = options.batchSize ?? batchSize;
|
|
43042
|
+
const scope = options.scope ?? ctx.scope ?? "project";
|
|
43043
|
+
let running = true;
|
|
43044
|
+
const loop = async () => {
|
|
43045
|
+
while (running) {
|
|
43046
|
+
try {
|
|
43047
|
+
const claimed = await claimDue(scope, /* @__PURE__ */ new Date(), (schedule) => nextTriggerRunAt(schedule, /* @__PURE__ */ new Date()), limit);
|
|
43048
|
+
for (const row of claimed) {
|
|
43049
|
+
if (row.kind !== "cron" && row.kind !== "poll") continue;
|
|
43050
|
+
await enqueueTriggerJob(ctx.jobQueue, {
|
|
43051
|
+
slug: row.slug,
|
|
43052
|
+
kind: row.kind,
|
|
43053
|
+
projectId: row.projectId
|
|
43054
|
+
});
|
|
43055
|
+
}
|
|
43056
|
+
} catch {}
|
|
43057
|
+
await sleep(intervalMs);
|
|
43058
|
+
}
|
|
43059
|
+
};
|
|
43060
|
+
loop();
|
|
43061
|
+
return async () => {
|
|
43062
|
+
running = false;
|
|
43063
|
+
};
|
|
43064
|
+
}
|
|
43065
|
+
return {
|
|
43066
|
+
fireDueSchedules,
|
|
43067
|
+
startScheduleTicker
|
|
43068
|
+
};
|
|
43069
|
+
}
|
|
42786
43070
|
function sleep(ms) {
|
|
42787
43071
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
42788
43072
|
}
|
|
43073
|
+
function resolveTriggerSchedule(triggerSlug, schedule, overrides) {
|
|
43074
|
+
return resolveCronSchedule(triggerSlug, schedule, {
|
|
43075
|
+
cronScheduleOverride: overrides?.global,
|
|
43076
|
+
attachmentScheduleOverrides: overrides?.byTrigger
|
|
43077
|
+
});
|
|
43078
|
+
}
|
|
43079
|
+
async function syncTriggerSchedules(options) {
|
|
43080
|
+
const now = /* @__PURE__ */ new Date();
|
|
43081
|
+
const projectSlugs = options.schedules.map((schedule) => schedule.triggerSlug);
|
|
43082
|
+
const ephemeralSlugs = await selectActiveEphemeralScheduledTriggerSlugs();
|
|
43083
|
+
const slugs = [...projectSlugs, ...ephemeralSlugs];
|
|
43084
|
+
if (slugs.length === 0) {
|
|
43085
|
+
await disableAllTriggerSchedules(now);
|
|
43086
|
+
return;
|
|
43087
|
+
}
|
|
43088
|
+
await disableTriggerSchedulesNotInSlugs(slugs, now);
|
|
43089
|
+
for (const spec of options.schedules) {
|
|
43090
|
+
const schedule = resolveTriggerSchedule(spec.triggerSlug, spec.schedule, options.scheduleOverrides);
|
|
43091
|
+
const existing = await selectTriggerBySlug(spec.triggerSlug);
|
|
43092
|
+
if (!existing) continue;
|
|
43093
|
+
const nextRunAt = !(existing.schedule !== schedule) && existing.enabled === 1 ? existing.nextRunAt : nextTriggerRunAt(schedule, now);
|
|
43094
|
+
const enabled = (await listExecutableAttachmentsByTriggerIds([existing.id])).length > 0;
|
|
43095
|
+
await upsertTriggerScheduleFields({
|
|
43096
|
+
triggerSlug: spec.triggerSlug,
|
|
43097
|
+
schedule,
|
|
43098
|
+
nextRunAt: nextRunAt ?? now,
|
|
43099
|
+
enabled,
|
|
43100
|
+
updatedAt: now
|
|
43101
|
+
});
|
|
43102
|
+
}
|
|
43103
|
+
}
|
|
43104
|
+
/** Postgres poll loop — default trigger scheduler for pg-boss, polling, and memory paths. */
|
|
43105
|
+
function createDatabaseTriggerScheduler(options) {
|
|
43106
|
+
const ticker = createScheduleTicker({
|
|
43107
|
+
jobQueue: options.jobQueue,
|
|
43108
|
+
scope: options.scope,
|
|
43109
|
+
pollIntervalMs: options.pollIntervalMs,
|
|
43110
|
+
batchSize: options.batchSize
|
|
43111
|
+
});
|
|
43112
|
+
return {
|
|
43113
|
+
sync: (syncOptions) => syncTriggerSchedules(syncOptions),
|
|
43114
|
+
start: (startOptions) => ticker.startScheduleTicker(startOptions),
|
|
43115
|
+
fireDue: (asOf) => ticker.fireDueSchedules(asOf),
|
|
43116
|
+
async remove(triggerSlug) {
|
|
43117
|
+
await setTriggerScheduleEnabled(triggerSlug, false, /* @__PURE__ */ new Date());
|
|
43118
|
+
},
|
|
43119
|
+
async upsert(_spec) {}
|
|
43120
|
+
};
|
|
43121
|
+
}
|
|
42789
43122
|
let boss;
|
|
42790
43123
|
function resolveDatabaseUrl(url) {
|
|
42791
43124
|
const resolved = url ?? resolvePostgresUrlFromEnv(process.env);
|
|
@@ -42838,6 +43171,8 @@ function buildPgBossJobQueue(boss, options) {
|
|
|
42838
43171
|
const queueName = options.queueName ?? "keystroke";
|
|
42839
43172
|
const cancelChannel = createPostgresCancelChannel(options.connectionString, pgCancelChannelName(options.cancelScope ?? "platform", options.cancelScope === "organization" ? options.organizationId : options.projectId));
|
|
42840
43173
|
return {
|
|
43174
|
+
boss,
|
|
43175
|
+
queueName,
|
|
42841
43176
|
async enqueue(input) {
|
|
42842
43177
|
const jobId = await boss.send(queueName, {
|
|
42843
43178
|
...input,
|
|
@@ -42919,9 +43254,129 @@ async function createSharedPgBossJobQueue(boss, options) {
|
|
|
42919
43254
|
cancelScope: "platform"
|
|
42920
43255
|
});
|
|
42921
43256
|
}
|
|
43257
|
+
/**
|
|
43258
|
+
* pg-boss schedule key for one trigger. Mirrors {@link bullmqTriggerSchedulerId}
|
|
43259
|
+
* so the firing backend is interchangeable: `trigger-<projectId>-<slug>`. pg-boss
|
|
43260
|
+
* keys allow hyphens, so colons (legal in ids) are swapped for `-`.
|
|
43261
|
+
*/
|
|
43262
|
+
function pgBossTriggerScheduleKey(spec) {
|
|
43263
|
+
return `trigger-${(spec.projectId ?? getProjectScopeId()).replaceAll(":", "-")}-${spec.triggerSlug.replaceAll(":", "-")}`;
|
|
43264
|
+
}
|
|
43265
|
+
/** Key prefix scoping reconcile cleanup to the active project (org queues are shared). */
|
|
43266
|
+
function pgBossTriggerScheduleKeyPrefix(projectId) {
|
|
43267
|
+
return `trigger-${(projectId ?? getProjectScopeId()).replaceAll(":", "-")}-`;
|
|
43268
|
+
}
|
|
43269
|
+
function triggerJobData(spec) {
|
|
43270
|
+
return {
|
|
43271
|
+
kind: "trigger",
|
|
43272
|
+
targetId: spec.triggerSlug,
|
|
43273
|
+
runId: "",
|
|
43274
|
+
trigger: spec.kind,
|
|
43275
|
+
payload: {},
|
|
43276
|
+
projectId: spec.projectId ?? getProjectScopeId()
|
|
43277
|
+
};
|
|
43278
|
+
}
|
|
43279
|
+
function rowToSpec(row) {
|
|
43280
|
+
if (row.kind !== "cron" && row.kind !== "poll") return;
|
|
43281
|
+
if (!row.schedule) return;
|
|
43282
|
+
return {
|
|
43283
|
+
triggerSlug: row.slug,
|
|
43284
|
+
kind: row.kind,
|
|
43285
|
+
schedule: row.schedule,
|
|
43286
|
+
projectId: row.projectId
|
|
43287
|
+
};
|
|
43288
|
+
}
|
|
43289
|
+
/**
|
|
43290
|
+
* Trigger scheduler backed by pg-boss native cron scheduling. Mirrors
|
|
43291
|
+
* {@link createBullmqTriggerScheduler}: `boss.schedule` registers a recurring job
|
|
43292
|
+
* onto the project/org queue (no per-second DB poll), and reconcile keeps the
|
|
43293
|
+
* `pgboss.schedule` table in sync with the `triggers` table (source of truth).
|
|
43294
|
+
*
|
|
43295
|
+
* Granularity: pg-boss cron is minute-level (it checks schedules every ~30s and
|
|
43296
|
+
* dedupes per minute), so sub-minute schedules effectively fire at most once per
|
|
43297
|
+
* minute — unlike the DB ticker's 1s loop.
|
|
43298
|
+
*/
|
|
43299
|
+
function createPgBossTriggerScheduler(_ctx, queue) {
|
|
43300
|
+
async function upsertScheduler(spec, overrides) {
|
|
43301
|
+
const schedule = resolveTriggerSchedule(spec.triggerSlug, spec.schedule, overrides);
|
|
43302
|
+
const key = pgBossTriggerScheduleKey(spec);
|
|
43303
|
+
await queue.boss.schedule(queue.queueName, schedule, triggerJobData({
|
|
43304
|
+
...spec,
|
|
43305
|
+
schedule
|
|
43306
|
+
}), { key });
|
|
43307
|
+
}
|
|
43308
|
+
async function reconcileFromDatabase(overrides) {
|
|
43309
|
+
const projectPrefix = pgBossTriggerScheduleKeyPrefix();
|
|
43310
|
+
const rows = await listEnabledScheduledTriggers();
|
|
43311
|
+
const expectedKeys = /* @__PURE__ */ new Set();
|
|
43312
|
+
const failures = [];
|
|
43313
|
+
for (const row of rows) {
|
|
43314
|
+
const spec = rowToSpec(row);
|
|
43315
|
+
if (!spec) continue;
|
|
43316
|
+
expectedKeys.add(pgBossTriggerScheduleKey(spec));
|
|
43317
|
+
try {
|
|
43318
|
+
await upsertScheduler(spec, overrides);
|
|
43319
|
+
} catch (error) {
|
|
43320
|
+
failures.push({
|
|
43321
|
+
triggerSlug: spec.triggerSlug,
|
|
43322
|
+
error
|
|
43323
|
+
});
|
|
43324
|
+
console.error(`[pg-boss-trigger-scheduler] failed to schedule ${spec.triggerSlug}`, error);
|
|
43325
|
+
}
|
|
43326
|
+
}
|
|
43327
|
+
const schedules = await queue.boss.getSchedules(queue.queueName);
|
|
43328
|
+
for (const schedule of schedules) {
|
|
43329
|
+
const key = schedule.key;
|
|
43330
|
+
if (!key || !key.startsWith(projectPrefix)) continue;
|
|
43331
|
+
if (!expectedKeys.has(key)) try {
|
|
43332
|
+
await queue.boss.unschedule(queue.queueName, key);
|
|
43333
|
+
} catch (error) {
|
|
43334
|
+
failures.push({
|
|
43335
|
+
triggerSlug: key,
|
|
43336
|
+
error
|
|
43337
|
+
});
|
|
43338
|
+
console.error(`[pg-boss-trigger-scheduler] failed to unschedule stale ${key}`, error);
|
|
43339
|
+
}
|
|
43340
|
+
}
|
|
43341
|
+
if (failures.length > 0) throw new Error(`pg-boss trigger scheduler reconcile failed for ${failures.length} trigger(s)`);
|
|
43342
|
+
}
|
|
43343
|
+
return {
|
|
43344
|
+
async sync(syncOptions) {
|
|
43345
|
+
await syncTriggerSchedules(syncOptions);
|
|
43346
|
+
await reconcileFromDatabase(syncOptions.scheduleOverrides);
|
|
43347
|
+
},
|
|
43348
|
+
async start(_options) {
|
|
43349
|
+
return async () => void 0;
|
|
43350
|
+
},
|
|
43351
|
+
fireDue: async () => 0,
|
|
43352
|
+
upsert: upsertScheduler,
|
|
43353
|
+
async remove(triggerSlug, projectId) {
|
|
43354
|
+
await queue.boss.unschedule(queue.queueName, pgBossTriggerScheduleKey({
|
|
43355
|
+
triggerSlug,
|
|
43356
|
+
projectId
|
|
43357
|
+
}));
|
|
43358
|
+
}
|
|
43359
|
+
};
|
|
43360
|
+
}
|
|
42922
43361
|
function resolveUrl(ctx) {
|
|
42923
43362
|
return ctx.url ?? resolveProjectDatabaseUrlFromEnv(process.env) ?? DEFAULT_DATABASE_URL;
|
|
42924
43363
|
}
|
|
43364
|
+
/** DB poll-loop trigger scheduler — used by the SQLite/self-host polling backend. */
|
|
43365
|
+
function createPollingTriggerScheduler(ctx, queue) {
|
|
43366
|
+
const scope = ctx.scope === "organization" ? "organization" : "project";
|
|
43367
|
+
return Promise.resolve(createDatabaseTriggerScheduler({
|
|
43368
|
+
jobQueue: queue,
|
|
43369
|
+
scope
|
|
43370
|
+
}));
|
|
43371
|
+
}
|
|
43372
|
+
function isPgBossJobQueue(queue) {
|
|
43373
|
+
return "boss" in queue && "queueName" in queue;
|
|
43374
|
+
}
|
|
43375
|
+
/** Native pg-boss cron scheduler; falls back to the DB ticker if the queue isn't pg-boss. */
|
|
43376
|
+
function createPgBossTriggerSchedulerForPlugin(ctx, queue) {
|
|
43377
|
+
if (!isPgBossJobQueue(queue)) return createPollingTriggerScheduler(ctx, queue);
|
|
43378
|
+
return Promise.resolve(createPgBossTriggerScheduler(ctx, queue));
|
|
43379
|
+
}
|
|
42925
43380
|
/** Postgres pg-boss backend. Platform scope shares one queue; org scope gets one queue per org. */
|
|
42926
43381
|
function pgBossSchedulerPlugin() {
|
|
42927
43382
|
return defineSchedulerPlugin({
|
|
@@ -42948,7 +43403,8 @@ function pgBossSchedulerPlugin() {
|
|
|
42948
43403
|
queueName: pgBossProjectQueueName(projectId),
|
|
42949
43404
|
projectId
|
|
42950
43405
|
});
|
|
42951
|
-
}
|
|
43406
|
+
},
|
|
43407
|
+
createTriggerScheduler: createPgBossTriggerSchedulerForPlugin
|
|
42952
43408
|
});
|
|
42953
43409
|
}
|
|
42954
43410
|
/** DB-table queue (Drizzle `jobs`), for SQLite / self-host. */
|
|
@@ -42957,7 +43413,8 @@ function pollingSchedulerPlugin() {
|
|
|
42957
43413
|
name: "polling",
|
|
42958
43414
|
async createJobQueue() {
|
|
42959
43415
|
return createDatabaseJobQueue();
|
|
42960
|
-
}
|
|
43416
|
+
},
|
|
43417
|
+
createTriggerScheduler: createPollingTriggerScheduler
|
|
42961
43418
|
});
|
|
42962
43419
|
}
|
|
42963
43420
|
/** Auto-selects pg-boss (postgres) or polling (sqlite) by dialect. */
|
|
@@ -42967,6 +43424,10 @@ function defaultSchedulerPlugin() {
|
|
|
42967
43424
|
async createJobQueue(ctx) {
|
|
42968
43425
|
if (inferDialect(resolveUrl(ctx), ctx.dialect) === "postgres") return pgBossSchedulerPlugin().createJobQueue(ctx);
|
|
42969
43426
|
return pollingSchedulerPlugin().createJobQueue(ctx);
|
|
43427
|
+
},
|
|
43428
|
+
async createTriggerScheduler(ctx, queue) {
|
|
43429
|
+
if (inferDialect(resolveUrl(ctx), ctx.dialect) === "postgres") return pgBossSchedulerPlugin().createTriggerScheduler(ctx, queue);
|
|
43430
|
+
return pollingSchedulerPlugin().createTriggerScheduler(ctx, queue);
|
|
42970
43431
|
}
|
|
42971
43432
|
});
|
|
42972
43433
|
}
|
|
@@ -43371,6 +43832,6 @@ function minioStoragePlugin(options = {}) {
|
|
|
43371
43832
|
};
|
|
43372
43833
|
}
|
|
43373
43834
|
//#endregion
|
|
43374
|
-
export {
|
|
43835
|
+
export { DEFAULT_TRIGGER_OVERVIEW_MODEL as $, resolveExternalPlatformOrigin as $n, SlugAvailabilityQuerySchema as $t, setCredentialInstanceSecret as A, WorkspaceTriggerOverviewSchema as An, OpenApiDiscoverRequestSchema as At, AppSlugAvailabilityResponseSchema as B, mapProject as Bn, PresignUserAvatarRequestSchema as Bt, decodeOAuthState as C, UserPreferencesSchema as Cn, ListProjectDeploymentsResponseSchema as Ct, PublicHttpUrlError as D, WorkspaceTriggerDetailSchema as Dn, ListProjectsResponseSchema as Dt, discoverOpenApiApp as E, WorkflowSummarySchema as En, ListProjectMetricsResponseSchema as Et, AgentSummaryDetailResponseSchema as F, deriveCredentialInstanceSlug as Fn, PROJECT_SLUG_TAKEN_MESSAGE as Ft, CreateCredentialsResponseSchema as G, mapUserOrganization as Gn, ProjectSlugAvailabilityQuerySchema as Gt, CreateApiKeyRequestSchema as H, mapProjectDeployment as Hn, ProjectReachabilityResponseSchema as Ht, AgentSummaryListResponseSchema as I, displayCredentialAppName as In, PresignOrgLogoRequestSchema as It, CreateOrganizationRequestSchema as J, organizationInvitationAcceptPath as Jn, RecentResourceListResponseSchema as Jt, CreateCustomAppRequestSchema as K, mergeUserPreferences as Kn, ProjectSlugAvailabilityResponseSchema as Kt, AgentSummarySchema as L, listenPortFromPublicUrl as Ln, PresignOrgLogoResponseSchema as Lt, AcceptOrganizationInvitationResponseSchema as M, agentMemoryFileId as Mn, OrganizationSidebarBrandingPatchSchema as Mt, ActiveOrganizationResponseSchema as N, agentWorkspaceFileId as Nn, OrganizationSidebarBrandingSchema as Nt, deleteCredentialInstanceSecret as O, WorkspaceTriggerFileSchema as On, McpDiscoverRequestSchema as Ot, AgentMemoryFileSummarySchema as P, buildCredentialInstanceLabel as Pn, PLATFORM_RESOURCE_UNSUPPORTED_TEXT as Pt, CreateProjectResponseSchema as Q, projectFileId as Qn, SkillSummarySchema as Qt, AgentWorkspaceFileSummarySchema as R, mapOrganizationInvitation as Rn, PresignProjectSourceRequestSchema as Rt, completeMcpOAuthConnect as S, UserPreferencesPatchSchema as Sn, ListOrganizationsResponseSchema as St, discoverMcpApp as T, WorkflowSummaryListResponseSchema as Tn, ListProjectMembersResponseSchema as Tt, CreateApiKeyResponseSchema as U, mapProjectMember as Un, ProjectResponseSchema as Ut, CompleteProjectArtifactResponseSchema as V, mapProjectArtifact as Vn, PresignUserAvatarResponseSchema as Vt, CreateCredentialsRequestSchema as W, mapProjectSettings as Wn, ProjectSettingsResponseSchema as Wt, CreateProjectArtifactResponseSchema as X, parseAppSlug as Xn, SkillSummaryDetailResponseSchema as Xt, CreateOrganizationResponseSchema as Y, organizationSlugErrorCodeFromMessage as Yn, RecentResourceSchema as Yt, CreateProjectRequestSchema as Z, parseStoredRouteManifest as Zn, SkillSummaryListResponseSchema as Zt, publicKeystrokeAssetsObjectUrl as _, UpdateProjectSettingsRequestSchema as _n, ListApiKeysResponseSchema as _t, isKeystrokeAssetsAvatarPublicUrl as a, SubmitMarketingContactResponseSchema as an, __commonJSMin as ar, GraphqlDiscoverRequestSchema as at, defaultSchedulerPlugin as b, UserAvatarPatchSchema as bn, ListOrganizationInvitationsResponseSchema as bt, isStorageBucketNotFoundError as c, TriggerAttachmentUpdateRequestSchema as cn, HistoryRunDetailResponseSchema as ct, keystrokeAssetsAvatarKeyFromPublicUrl as d, UpdateOrganizationMemberRequestSchema as dn, InviteOrganizationMembersRequestSchema as dt, SlugAvailabilityResponseSchema as en, resolveUniqueCredentialInstanceLabel as er, DeclineOrganizationInvitationResponseSchema as et, keystrokeAssetsOrgLogoKeyFromPublicUrl as f, UpdateOrganizationMemberResponseSchema as fn, InviteOrganizationMembersResponseSchema as ft, projectSourceBlobKey as g, UpdateProjectRequestSchema as gn, ListAgentWorkspaceFilesResponseSchema as gt, projectArtifactKey as h, UpdateProjectMemberResponseSchema as hn, ListAgentMemoryFilesResponseSchema as ht, extractRouteManifestFromArtifact as i, SubmitMarketingContactRequestSchema as in, pingProjectTarget as ir, GetCustomAppResponseSchema as it, ACTIVE_ORG_HEADER as j, WorkspaceTriggerRunListResponseSchema as jn, OpenApiDiscoverResponseSchema as jt, readCredentialInstanceSecret as k, WorkspaceTriggerListResponseSchema as kn, McpDiscoverResponseSchema as kt, isStorageNotFoundError as l, TriggerRunListQuerySchema as ln, HistoryRunListQuerySchema as lt, orgLogoStorageKey as m, UpdateProjectMemberRequestSchema as mn, InviteProjectMembersResponseSchema as mt, createAssetsStorageClient as n, StartMcpOAuthConnectionResultSchema as nn, validationErrorResponse as nr, ErrorResponseSchema as nt, isKeystrokeAssetsOrgLogoPublicUrl as o, SubmitTeamRequestRequestSchema as on, __require as or, GraphqlDiscoverResponseSchema as ot, minioStoragePlugin as p, UpdateOrganizationRequestSchema as pn, InviteProjectMembersRequestSchema as pt, CreateCustomAppResponseSchema as q, normalizeUserPreferences as qn, ProjectSourceResourcesSchema as qt, ensureKeystrokeAssetsBucket as r, StoredProjectSourceManifestSchema as rn, defaultHostingPlugin as rr, GetCredentialResponseSchema as rt, isOrgLogoStorageKey as s, SubmitTeamRequestResponseSchema as sn, __toESM as sr, HistoryRunCancelResponseSchema as st, RouteManifestNotFoundError as t, StartMcpOAuthConnectionInputSchema as tn, validateCredentialValueAgainstFields as tr, DownloadActiveProjectArtifactResponseSchema as tt, isUserAvatarStorageKey as u, UpdateCredentialRequestSchema as un, HistoryRunListResponseSchema as ut, userAvatarStorageKey as v, UploadProjectSourceManifestRequestSchema as vn, ListAppsResponseSchema as vt, discoverGraphqlApp as w, WorkflowSummaryDetailResponseSchema as wn, ListProjectFilesResponseSchema as wt, beginMcpOAuthConnect as x, UserAvatarSchema as xn, ListOrganizationMembersResponseSchema as xt, createJobQueue as y, UploadProjectSourceResponseSchema as yn, ListCredentialsResponseSchema as yt, AppSlugAvailabilityQuerySchema as z, mapOrganizationMember as zn, PresignProjectSourceResponseSchema as zt };
|
|
43375
43836
|
|
|
43376
|
-
//# sourceMappingURL=dist-
|
|
43837
|
+
//# sourceMappingURL=dist-DQZABv1_.mjs.map
|