您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Introduce Plugins (#13836) Signed-off-by: yihong0618 <zouzou0208@gmail.com> Signed-off-by: -LAN- <laipz8200@outlook.com> Signed-off-by: xhe <xw897002528@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: takatost <takatost@gmail.com> Co-authored-by: kurokobo <kuro664@gmail.com> Co-authored-by: Novice Lee <novicelee@NoviPro.local> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: AkaraChen <akarachen@outlook.com> Co-authored-by: Yi <yxiaoisme@gmail.com> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: Hiroshi Fujita <fujita-h@users.noreply.github.com> Co-authored-by: AkaraChen <85140972+AkaraChen@users.noreply.github.com> Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com> Co-authored-by: 非法操作 <hjlarry@163.com> Co-authored-by: Novice <857526207@qq.com> Co-authored-by: Hiroki Nagai <82458324+nagaihiroki-git@users.noreply.github.com> Co-authored-by: Gen Sato <52241300+halogen22@users.noreply.github.com> Co-authored-by: eux <euxuuu@gmail.com> Co-authored-by: huangzhuo1949 <167434202+huangzhuo1949@users.noreply.github.com> Co-authored-by: huangzhuo <huangzhuo1@xiaomi.com> Co-authored-by: lotsik <lotsik@mail.ru> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: nite-knite <nkCoding@gmail.com> Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: gakkiyomi <gakkiyomi@aliyun.com> Co-authored-by: CN-P5 <heibai2006@gmail.com> Co-authored-by: CN-P5 <heibai2006@qq.com> Co-authored-by: Chuehnone <1897025+chuehnone@users.noreply.github.com> Co-authored-by: yihong <zouzou0208@gmail.com> Co-authored-by: Kevin9703 <51311316+Kevin9703@users.noreply.github.com> Co-authored-by: -LAN- <laipz8200@outlook.com> Co-authored-by: Boris Feld <lothiraldan@gmail.com> Co-authored-by: mbo <himabo@gmail.com> Co-authored-by: mabo <mabo@aeyes.ai> Co-authored-by: Warren Chen <warren.chen830@gmail.com> Co-authored-by: JzoNgKVO <27049666+JzoNgKVO@users.noreply.github.com> Co-authored-by: jiandanfeng <chenjh3@wangsu.com> Co-authored-by: zhu-an <70234959+xhdd123321@users.noreply.github.com> Co-authored-by: zhaoqingyu.1075 <zhaoqingyu.1075@bytedance.com> Co-authored-by: 海狸大師 <86974027+yenslife@users.noreply.github.com> Co-authored-by: Xu Song <xusong.vip@gmail.com> Co-authored-by: rayshaw001 <396301947@163.com> Co-authored-by: Ding Jiatong <dingjiatong@gmail.com> Co-authored-by: Bowen Liang <liangbowen@gf.com.cn> Co-authored-by: JasonVV <jasonwangiii@outlook.com> Co-authored-by: le0zh <newlight@qq.com> Co-authored-by: zhuxinliang <zhuxinliang@didiglobal.com> Co-authored-by: k-zaku <zaku99@outlook.jp> Co-authored-by: luckylhb90 <luckylhb90@gmail.com> Co-authored-by: hobo.l <hobo.l@binance.com> Co-authored-by: jiangbo721 <365065261@qq.com> Co-authored-by: 刘江波 <jiangbo721@163.com> Co-authored-by: Shun Miyazawa <34241526+miya@users.noreply.github.com> Co-authored-by: EricPan <30651140+Egfly@users.noreply.github.com> Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: sino <sino2322@gmail.com> Co-authored-by: Jhvcc <37662342+Jhvcc@users.noreply.github.com> Co-authored-by: lowell <lowell.hu@zkteco.in> Co-authored-by: Boris Polonsky <BorisPolonsky@users.noreply.github.com> Co-authored-by: Ademílson Tonato <ademilsonft@outlook.com> Co-authored-by: Ademílson Tonato <ademilson.tonato@refurbed.com> Co-authored-by: IWAI, Masaharu <iwaim.sub@gmail.com> Co-authored-by: Yueh-Po Peng (Yabi) <94939112+y10ab1@users.noreply.github.com> Co-authored-by: Jason <ggbbddjm@gmail.com> Co-authored-by: Xin Zhang <sjhpzx@gmail.com> Co-authored-by: yjc980121 <3898524+yjc980121@users.noreply.github.com> Co-authored-by: heyszt <36215648+hieheihei@users.noreply.github.com> Co-authored-by: Abdullah AlOsaimi <osaimiacc@gmail.com> Co-authored-by: Abdullah AlOsaimi <189027247+osaimi@users.noreply.github.com> Co-authored-by: Yingchun Lai <laiyingchun@apache.org> Co-authored-by: Hash Brown <hi@xzd.me> Co-authored-by: zuodongxu <192560071+zuodongxu@users.noreply.github.com> Co-authored-by: Masashi Tomooka <tmokmss@users.noreply.github.com> Co-authored-by: aplio <ryo.091219@gmail.com> Co-authored-by: Obada Khalili <54270856+obadakhalili@users.noreply.github.com> Co-authored-by: Nam Vu <zuzoovn@gmail.com> Co-authored-by: Kei YAMAZAKI <1715090+kei-yamazaki@users.noreply.github.com> Co-authored-by: TechnoHouse <13776377+deephbz@users.noreply.github.com> Co-authored-by: Riddhimaan-Senapati <114703025+Riddhimaan-Senapati@users.noreply.github.com> Co-authored-by: MaFee921 <31881301+2284730142@users.noreply.github.com> Co-authored-by: te-chan <t-nakanome@sakura-is.co.jp> Co-authored-by: HQidea <HQidea@users.noreply.github.com> Co-authored-by: Joshbly <36315710+Joshbly@users.noreply.github.com> Co-authored-by: xhe <xw897002528@gmail.com> Co-authored-by: weiwenyan-dev <154779315+weiwenyan-dev@users.noreply.github.com> Co-authored-by: ex_wenyan.wei <ex_wenyan.wei@tcl.com> Co-authored-by: engchina <12236799+engchina@users.noreply.github.com> Co-authored-by: engchina <atjapan2015@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: 呆萌闷油瓶 <253605712@qq.com> Co-authored-by: Kemal <kemalmeler@outlook.com> Co-authored-by: Lazy_Frog <4590648+lazyFrogLOL@users.noreply.github.com> Co-authored-by: Yi Xiao <54782454+YIXIAO0@users.noreply.github.com> Co-authored-by: Steven sun <98230804+Tuyohai@users.noreply.github.com> Co-authored-by: steven <sunzwj@digitalchina.com> Co-authored-by: Kalo Chin <91766386+fdb02983rhy@users.noreply.github.com> Co-authored-by: Katy Tao <34019945+KatyTao@users.noreply.github.com> Co-authored-by: depy <42985524+h4ckdepy@users.noreply.github.com> Co-authored-by: 胡春东 <gycm520@gmail.com> Co-authored-by: Junjie.M <118170653@qq.com> Co-authored-by: MuYu <mr.muzea@gmail.com> Co-authored-by: Naoki Takashima <39912547+takatea@users.noreply.github.com> Co-authored-by: Summer-Gu <37869445+gubinjie@users.noreply.github.com> Co-authored-by: Fei He <droxer.he@gmail.com> Co-authored-by: ybalbert001 <120714773+ybalbert001@users.noreply.github.com> Co-authored-by: Yuanbo Li <ybalbert@amazon.com> Co-authored-by: douxc <7553076+douxc@users.noreply.github.com> Co-authored-by: liuzhenghua <1090179900@qq.com> Co-authored-by: Wu Jiayang <62842862+Wu-Jiayang@users.noreply.github.com> Co-authored-by: Your Name <you@example.com> Co-authored-by: kimjion <45935338+kimjion@users.noreply.github.com> Co-authored-by: AugNSo <song.tiankai@icloud.com> Co-authored-by: llinvokerl <38915183+llinvokerl@users.noreply.github.com> Co-authored-by: liusurong.lsr <liusurong.lsr@alibaba-inc.com> Co-authored-by: Vasu Negi <vasu-negi@users.noreply.github.com> Co-authored-by: Hundredwz <1808096180@qq.com> Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com>
8 个月前
Introduce Plugins (#13836) Signed-off-by: yihong0618 <zouzou0208@gmail.com> Signed-off-by: -LAN- <laipz8200@outlook.com> Signed-off-by: xhe <xw897002528@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: takatost <takatost@gmail.com> Co-authored-by: kurokobo <kuro664@gmail.com> Co-authored-by: Novice Lee <novicelee@NoviPro.local> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: AkaraChen <akarachen@outlook.com> Co-authored-by: Yi <yxiaoisme@gmail.com> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: Hiroshi Fujita <fujita-h@users.noreply.github.com> Co-authored-by: AkaraChen <85140972+AkaraChen@users.noreply.github.com> Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com> Co-authored-by: 非法操作 <hjlarry@163.com> Co-authored-by: Novice <857526207@qq.com> Co-authored-by: Hiroki Nagai <82458324+nagaihiroki-git@users.noreply.github.com> Co-authored-by: Gen Sato <52241300+halogen22@users.noreply.github.com> Co-authored-by: eux <euxuuu@gmail.com> Co-authored-by: huangzhuo1949 <167434202+huangzhuo1949@users.noreply.github.com> Co-authored-by: huangzhuo <huangzhuo1@xiaomi.com> Co-authored-by: lotsik <lotsik@mail.ru> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: nite-knite <nkCoding@gmail.com> Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: gakkiyomi <gakkiyomi@aliyun.com> Co-authored-by: CN-P5 <heibai2006@gmail.com> Co-authored-by: CN-P5 <heibai2006@qq.com> Co-authored-by: Chuehnone <1897025+chuehnone@users.noreply.github.com> Co-authored-by: yihong <zouzou0208@gmail.com> Co-authored-by: Kevin9703 <51311316+Kevin9703@users.noreply.github.com> Co-authored-by: -LAN- <laipz8200@outlook.com> Co-authored-by: Boris Feld <lothiraldan@gmail.com> Co-authored-by: mbo <himabo@gmail.com> Co-authored-by: mabo <mabo@aeyes.ai> Co-authored-by: Warren Chen <warren.chen830@gmail.com> Co-authored-by: JzoNgKVO <27049666+JzoNgKVO@users.noreply.github.com> Co-authored-by: jiandanfeng <chenjh3@wangsu.com> Co-authored-by: zhu-an <70234959+xhdd123321@users.noreply.github.com> Co-authored-by: zhaoqingyu.1075 <zhaoqingyu.1075@bytedance.com> Co-authored-by: 海狸大師 <86974027+yenslife@users.noreply.github.com> Co-authored-by: Xu Song <xusong.vip@gmail.com> Co-authored-by: rayshaw001 <396301947@163.com> Co-authored-by: Ding Jiatong <dingjiatong@gmail.com> Co-authored-by: Bowen Liang <liangbowen@gf.com.cn> Co-authored-by: JasonVV <jasonwangiii@outlook.com> Co-authored-by: le0zh <newlight@qq.com> Co-authored-by: zhuxinliang <zhuxinliang@didiglobal.com> Co-authored-by: k-zaku <zaku99@outlook.jp> Co-authored-by: luckylhb90 <luckylhb90@gmail.com> Co-authored-by: hobo.l <hobo.l@binance.com> Co-authored-by: jiangbo721 <365065261@qq.com> Co-authored-by: 刘江波 <jiangbo721@163.com> Co-authored-by: Shun Miyazawa <34241526+miya@users.noreply.github.com> Co-authored-by: EricPan <30651140+Egfly@users.noreply.github.com> Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: sino <sino2322@gmail.com> Co-authored-by: Jhvcc <37662342+Jhvcc@users.noreply.github.com> Co-authored-by: lowell <lowell.hu@zkteco.in> Co-authored-by: Boris Polonsky <BorisPolonsky@users.noreply.github.com> Co-authored-by: Ademílson Tonato <ademilsonft@outlook.com> Co-authored-by: Ademílson Tonato <ademilson.tonato@refurbed.com> Co-authored-by: IWAI, Masaharu <iwaim.sub@gmail.com> Co-authored-by: Yueh-Po Peng (Yabi) <94939112+y10ab1@users.noreply.github.com> Co-authored-by: Jason <ggbbddjm@gmail.com> Co-authored-by: Xin Zhang <sjhpzx@gmail.com> Co-authored-by: yjc980121 <3898524+yjc980121@users.noreply.github.com> Co-authored-by: heyszt <36215648+hieheihei@users.noreply.github.com> Co-authored-by: Abdullah AlOsaimi <osaimiacc@gmail.com> Co-authored-by: Abdullah AlOsaimi <189027247+osaimi@users.noreply.github.com> Co-authored-by: Yingchun Lai <laiyingchun@apache.org> Co-authored-by: Hash Brown <hi@xzd.me> Co-authored-by: zuodongxu <192560071+zuodongxu@users.noreply.github.com> Co-authored-by: Masashi Tomooka <tmokmss@users.noreply.github.com> Co-authored-by: aplio <ryo.091219@gmail.com> Co-authored-by: Obada Khalili <54270856+obadakhalili@users.noreply.github.com> Co-authored-by: Nam Vu <zuzoovn@gmail.com> Co-authored-by: Kei YAMAZAKI <1715090+kei-yamazaki@users.noreply.github.com> Co-authored-by: TechnoHouse <13776377+deephbz@users.noreply.github.com> Co-authored-by: Riddhimaan-Senapati <114703025+Riddhimaan-Senapati@users.noreply.github.com> Co-authored-by: MaFee921 <31881301+2284730142@users.noreply.github.com> Co-authored-by: te-chan <t-nakanome@sakura-is.co.jp> Co-authored-by: HQidea <HQidea@users.noreply.github.com> Co-authored-by: Joshbly <36315710+Joshbly@users.noreply.github.com> Co-authored-by: xhe <xw897002528@gmail.com> Co-authored-by: weiwenyan-dev <154779315+weiwenyan-dev@users.noreply.github.com> Co-authored-by: ex_wenyan.wei <ex_wenyan.wei@tcl.com> Co-authored-by: engchina <12236799+engchina@users.noreply.github.com> Co-authored-by: engchina <atjapan2015@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: 呆萌闷油瓶 <253605712@qq.com> Co-authored-by: Kemal <kemalmeler@outlook.com> Co-authored-by: Lazy_Frog <4590648+lazyFrogLOL@users.noreply.github.com> Co-authored-by: Yi Xiao <54782454+YIXIAO0@users.noreply.github.com> Co-authored-by: Steven sun <98230804+Tuyohai@users.noreply.github.com> Co-authored-by: steven <sunzwj@digitalchina.com> Co-authored-by: Kalo Chin <91766386+fdb02983rhy@users.noreply.github.com> Co-authored-by: Katy Tao <34019945+KatyTao@users.noreply.github.com> Co-authored-by: depy <42985524+h4ckdepy@users.noreply.github.com> Co-authored-by: 胡春东 <gycm520@gmail.com> Co-authored-by: Junjie.M <118170653@qq.com> Co-authored-by: MuYu <mr.muzea@gmail.com> Co-authored-by: Naoki Takashima <39912547+takatea@users.noreply.github.com> Co-authored-by: Summer-Gu <37869445+gubinjie@users.noreply.github.com> Co-authored-by: Fei He <droxer.he@gmail.com> Co-authored-by: ybalbert001 <120714773+ybalbert001@users.noreply.github.com> Co-authored-by: Yuanbo Li <ybalbert@amazon.com> Co-authored-by: douxc <7553076+douxc@users.noreply.github.com> Co-authored-by: liuzhenghua <1090179900@qq.com> Co-authored-by: Wu Jiayang <62842862+Wu-Jiayang@users.noreply.github.com> Co-authored-by: Your Name <you@example.com> Co-authored-by: kimjion <45935338+kimjion@users.noreply.github.com> Co-authored-by: AugNSo <song.tiankai@icloud.com> Co-authored-by: llinvokerl <38915183+llinvokerl@users.noreply.github.com> Co-authored-by: liusurong.lsr <liusurong.lsr@alibaba-inc.com> Co-authored-by: Vasu Negi <vasu-negi@users.noreply.github.com> Co-authored-by: Hundredwz <1808096180@qq.com> Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com>
8 个月前
Introduce Plugins (#13836) Signed-off-by: yihong0618 <zouzou0208@gmail.com> Signed-off-by: -LAN- <laipz8200@outlook.com> Signed-off-by: xhe <xw897002528@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: takatost <takatost@gmail.com> Co-authored-by: kurokobo <kuro664@gmail.com> Co-authored-by: Novice Lee <novicelee@NoviPro.local> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: AkaraChen <akarachen@outlook.com> Co-authored-by: Yi <yxiaoisme@gmail.com> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: Hiroshi Fujita <fujita-h@users.noreply.github.com> Co-authored-by: AkaraChen <85140972+AkaraChen@users.noreply.github.com> Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com> Co-authored-by: 非法操作 <hjlarry@163.com> Co-authored-by: Novice <857526207@qq.com> Co-authored-by: Hiroki Nagai <82458324+nagaihiroki-git@users.noreply.github.com> Co-authored-by: Gen Sato <52241300+halogen22@users.noreply.github.com> Co-authored-by: eux <euxuuu@gmail.com> Co-authored-by: huangzhuo1949 <167434202+huangzhuo1949@users.noreply.github.com> Co-authored-by: huangzhuo <huangzhuo1@xiaomi.com> Co-authored-by: lotsik <lotsik@mail.ru> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: nite-knite <nkCoding@gmail.com> Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: gakkiyomi <gakkiyomi@aliyun.com> Co-authored-by: CN-P5 <heibai2006@gmail.com> Co-authored-by: CN-P5 <heibai2006@qq.com> Co-authored-by: Chuehnone <1897025+chuehnone@users.noreply.github.com> Co-authored-by: yihong <zouzou0208@gmail.com> Co-authored-by: Kevin9703 <51311316+Kevin9703@users.noreply.github.com> Co-authored-by: -LAN- <laipz8200@outlook.com> Co-authored-by: Boris Feld <lothiraldan@gmail.com> Co-authored-by: mbo <himabo@gmail.com> Co-authored-by: mabo <mabo@aeyes.ai> Co-authored-by: Warren Chen <warren.chen830@gmail.com> Co-authored-by: JzoNgKVO <27049666+JzoNgKVO@users.noreply.github.com> Co-authored-by: jiandanfeng <chenjh3@wangsu.com> Co-authored-by: zhu-an <70234959+xhdd123321@users.noreply.github.com> Co-authored-by: zhaoqingyu.1075 <zhaoqingyu.1075@bytedance.com> Co-authored-by: 海狸大師 <86974027+yenslife@users.noreply.github.com> Co-authored-by: Xu Song <xusong.vip@gmail.com> Co-authored-by: rayshaw001 <396301947@163.com> Co-authored-by: Ding Jiatong <dingjiatong@gmail.com> Co-authored-by: Bowen Liang <liangbowen@gf.com.cn> Co-authored-by: JasonVV <jasonwangiii@outlook.com> Co-authored-by: le0zh <newlight@qq.com> Co-authored-by: zhuxinliang <zhuxinliang@didiglobal.com> Co-authored-by: k-zaku <zaku99@outlook.jp> Co-authored-by: luckylhb90 <luckylhb90@gmail.com> Co-authored-by: hobo.l <hobo.l@binance.com> Co-authored-by: jiangbo721 <365065261@qq.com> Co-authored-by: 刘江波 <jiangbo721@163.com> Co-authored-by: Shun Miyazawa <34241526+miya@users.noreply.github.com> Co-authored-by: EricPan <30651140+Egfly@users.noreply.github.com> Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: sino <sino2322@gmail.com> Co-authored-by: Jhvcc <37662342+Jhvcc@users.noreply.github.com> Co-authored-by: lowell <lowell.hu@zkteco.in> Co-authored-by: Boris Polonsky <BorisPolonsky@users.noreply.github.com> Co-authored-by: Ademílson Tonato <ademilsonft@outlook.com> Co-authored-by: Ademílson Tonato <ademilson.tonato@refurbed.com> Co-authored-by: IWAI, Masaharu <iwaim.sub@gmail.com> Co-authored-by: Yueh-Po Peng (Yabi) <94939112+y10ab1@users.noreply.github.com> Co-authored-by: Jason <ggbbddjm@gmail.com> Co-authored-by: Xin Zhang <sjhpzx@gmail.com> Co-authored-by: yjc980121 <3898524+yjc980121@users.noreply.github.com> Co-authored-by: heyszt <36215648+hieheihei@users.noreply.github.com> Co-authored-by: Abdullah AlOsaimi <osaimiacc@gmail.com> Co-authored-by: Abdullah AlOsaimi <189027247+osaimi@users.noreply.github.com> Co-authored-by: Yingchun Lai <laiyingchun@apache.org> Co-authored-by: Hash Brown <hi@xzd.me> Co-authored-by: zuodongxu <192560071+zuodongxu@users.noreply.github.com> Co-authored-by: Masashi Tomooka <tmokmss@users.noreply.github.com> Co-authored-by: aplio <ryo.091219@gmail.com> Co-authored-by: Obada Khalili <54270856+obadakhalili@users.noreply.github.com> Co-authored-by: Nam Vu <zuzoovn@gmail.com> Co-authored-by: Kei YAMAZAKI <1715090+kei-yamazaki@users.noreply.github.com> Co-authored-by: TechnoHouse <13776377+deephbz@users.noreply.github.com> Co-authored-by: Riddhimaan-Senapati <114703025+Riddhimaan-Senapati@users.noreply.github.com> Co-authored-by: MaFee921 <31881301+2284730142@users.noreply.github.com> Co-authored-by: te-chan <t-nakanome@sakura-is.co.jp> Co-authored-by: HQidea <HQidea@users.noreply.github.com> Co-authored-by: Joshbly <36315710+Joshbly@users.noreply.github.com> Co-authored-by: xhe <xw897002528@gmail.com> Co-authored-by: weiwenyan-dev <154779315+weiwenyan-dev@users.noreply.github.com> Co-authored-by: ex_wenyan.wei <ex_wenyan.wei@tcl.com> Co-authored-by: engchina <12236799+engchina@users.noreply.github.com> Co-authored-by: engchina <atjapan2015@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: 呆萌闷油瓶 <253605712@qq.com> Co-authored-by: Kemal <kemalmeler@outlook.com> Co-authored-by: Lazy_Frog <4590648+lazyFrogLOL@users.noreply.github.com> Co-authored-by: Yi Xiao <54782454+YIXIAO0@users.noreply.github.com> Co-authored-by: Steven sun <98230804+Tuyohai@users.noreply.github.com> Co-authored-by: steven <sunzwj@digitalchina.com> Co-authored-by: Kalo Chin <91766386+fdb02983rhy@users.noreply.github.com> Co-authored-by: Katy Tao <34019945+KatyTao@users.noreply.github.com> Co-authored-by: depy <42985524+h4ckdepy@users.noreply.github.com> Co-authored-by: 胡春东 <gycm520@gmail.com> Co-authored-by: Junjie.M <118170653@qq.com> Co-authored-by: MuYu <mr.muzea@gmail.com> Co-authored-by: Naoki Takashima <39912547+takatea@users.noreply.github.com> Co-authored-by: Summer-Gu <37869445+gubinjie@users.noreply.github.com> Co-authored-by: Fei He <droxer.he@gmail.com> Co-authored-by: ybalbert001 <120714773+ybalbert001@users.noreply.github.com> Co-authored-by: Yuanbo Li <ybalbert@amazon.com> Co-authored-by: douxc <7553076+douxc@users.noreply.github.com> Co-authored-by: liuzhenghua <1090179900@qq.com> Co-authored-by: Wu Jiayang <62842862+Wu-Jiayang@users.noreply.github.com> Co-authored-by: Your Name <you@example.com> Co-authored-by: kimjion <45935338+kimjion@users.noreply.github.com> Co-authored-by: AugNSo <song.tiankai@icloud.com> Co-authored-by: llinvokerl <38915183+llinvokerl@users.noreply.github.com> Co-authored-by: liusurong.lsr <liusurong.lsr@alibaba-inc.com> Co-authored-by: Vasu Negi <vasu-negi@users.noreply.github.com> Co-authored-by: Hundredwz <1808096180@qq.com> Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com>
8 个月前
Introduce Plugins (#13836) Signed-off-by: yihong0618 <zouzou0208@gmail.com> Signed-off-by: -LAN- <laipz8200@outlook.com> Signed-off-by: xhe <xw897002528@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: takatost <takatost@gmail.com> Co-authored-by: kurokobo <kuro664@gmail.com> Co-authored-by: Novice Lee <novicelee@NoviPro.local> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: AkaraChen <akarachen@outlook.com> Co-authored-by: Yi <yxiaoisme@gmail.com> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: Hiroshi Fujita <fujita-h@users.noreply.github.com> Co-authored-by: AkaraChen <85140972+AkaraChen@users.noreply.github.com> Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com> Co-authored-by: 非法操作 <hjlarry@163.com> Co-authored-by: Novice <857526207@qq.com> Co-authored-by: Hiroki Nagai <82458324+nagaihiroki-git@users.noreply.github.com> Co-authored-by: Gen Sato <52241300+halogen22@users.noreply.github.com> Co-authored-by: eux <euxuuu@gmail.com> Co-authored-by: huangzhuo1949 <167434202+huangzhuo1949@users.noreply.github.com> Co-authored-by: huangzhuo <huangzhuo1@xiaomi.com> Co-authored-by: lotsik <lotsik@mail.ru> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: nite-knite <nkCoding@gmail.com> Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: gakkiyomi <gakkiyomi@aliyun.com> Co-authored-by: CN-P5 <heibai2006@gmail.com> Co-authored-by: CN-P5 <heibai2006@qq.com> Co-authored-by: Chuehnone <1897025+chuehnone@users.noreply.github.com> Co-authored-by: yihong <zouzou0208@gmail.com> Co-authored-by: Kevin9703 <51311316+Kevin9703@users.noreply.github.com> Co-authored-by: -LAN- <laipz8200@outlook.com> Co-authored-by: Boris Feld <lothiraldan@gmail.com> Co-authored-by: mbo <himabo@gmail.com> Co-authored-by: mabo <mabo@aeyes.ai> Co-authored-by: Warren Chen <warren.chen830@gmail.com> Co-authored-by: JzoNgKVO <27049666+JzoNgKVO@users.noreply.github.com> Co-authored-by: jiandanfeng <chenjh3@wangsu.com> Co-authored-by: zhu-an <70234959+xhdd123321@users.noreply.github.com> Co-authored-by: zhaoqingyu.1075 <zhaoqingyu.1075@bytedance.com> Co-authored-by: 海狸大師 <86974027+yenslife@users.noreply.github.com> Co-authored-by: Xu Song <xusong.vip@gmail.com> Co-authored-by: rayshaw001 <396301947@163.com> Co-authored-by: Ding Jiatong <dingjiatong@gmail.com> Co-authored-by: Bowen Liang <liangbowen@gf.com.cn> Co-authored-by: JasonVV <jasonwangiii@outlook.com> Co-authored-by: le0zh <newlight@qq.com> Co-authored-by: zhuxinliang <zhuxinliang@didiglobal.com> Co-authored-by: k-zaku <zaku99@outlook.jp> Co-authored-by: luckylhb90 <luckylhb90@gmail.com> Co-authored-by: hobo.l <hobo.l@binance.com> Co-authored-by: jiangbo721 <365065261@qq.com> Co-authored-by: 刘江波 <jiangbo721@163.com> Co-authored-by: Shun Miyazawa <34241526+miya@users.noreply.github.com> Co-authored-by: EricPan <30651140+Egfly@users.noreply.github.com> Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: sino <sino2322@gmail.com> Co-authored-by: Jhvcc <37662342+Jhvcc@users.noreply.github.com> Co-authored-by: lowell <lowell.hu@zkteco.in> Co-authored-by: Boris Polonsky <BorisPolonsky@users.noreply.github.com> Co-authored-by: Ademílson Tonato <ademilsonft@outlook.com> Co-authored-by: Ademílson Tonato <ademilson.tonato@refurbed.com> Co-authored-by: IWAI, Masaharu <iwaim.sub@gmail.com> Co-authored-by: Yueh-Po Peng (Yabi) <94939112+y10ab1@users.noreply.github.com> Co-authored-by: Jason <ggbbddjm@gmail.com> Co-authored-by: Xin Zhang <sjhpzx@gmail.com> Co-authored-by: yjc980121 <3898524+yjc980121@users.noreply.github.com> Co-authored-by: heyszt <36215648+hieheihei@users.noreply.github.com> Co-authored-by: Abdullah AlOsaimi <osaimiacc@gmail.com> Co-authored-by: Abdullah AlOsaimi <189027247+osaimi@users.noreply.github.com> Co-authored-by: Yingchun Lai <laiyingchun@apache.org> Co-authored-by: Hash Brown <hi@xzd.me> Co-authored-by: zuodongxu <192560071+zuodongxu@users.noreply.github.com> Co-authored-by: Masashi Tomooka <tmokmss@users.noreply.github.com> Co-authored-by: aplio <ryo.091219@gmail.com> Co-authored-by: Obada Khalili <54270856+obadakhalili@users.noreply.github.com> Co-authored-by: Nam Vu <zuzoovn@gmail.com> Co-authored-by: Kei YAMAZAKI <1715090+kei-yamazaki@users.noreply.github.com> Co-authored-by: TechnoHouse <13776377+deephbz@users.noreply.github.com> Co-authored-by: Riddhimaan-Senapati <114703025+Riddhimaan-Senapati@users.noreply.github.com> Co-authored-by: MaFee921 <31881301+2284730142@users.noreply.github.com> Co-authored-by: te-chan <t-nakanome@sakura-is.co.jp> Co-authored-by: HQidea <HQidea@users.noreply.github.com> Co-authored-by: Joshbly <36315710+Joshbly@users.noreply.github.com> Co-authored-by: xhe <xw897002528@gmail.com> Co-authored-by: weiwenyan-dev <154779315+weiwenyan-dev@users.noreply.github.com> Co-authored-by: ex_wenyan.wei <ex_wenyan.wei@tcl.com> Co-authored-by: engchina <12236799+engchina@users.noreply.github.com> Co-authored-by: engchina <atjapan2015@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: 呆萌闷油瓶 <253605712@qq.com> Co-authored-by: Kemal <kemalmeler@outlook.com> Co-authored-by: Lazy_Frog <4590648+lazyFrogLOL@users.noreply.github.com> Co-authored-by: Yi Xiao <54782454+YIXIAO0@users.noreply.github.com> Co-authored-by: Steven sun <98230804+Tuyohai@users.noreply.github.com> Co-authored-by: steven <sunzwj@digitalchina.com> Co-authored-by: Kalo Chin <91766386+fdb02983rhy@users.noreply.github.com> Co-authored-by: Katy Tao <34019945+KatyTao@users.noreply.github.com> Co-authored-by: depy <42985524+h4ckdepy@users.noreply.github.com> Co-authored-by: 胡春东 <gycm520@gmail.com> Co-authored-by: Junjie.M <118170653@qq.com> Co-authored-by: MuYu <mr.muzea@gmail.com> Co-authored-by: Naoki Takashima <39912547+takatea@users.noreply.github.com> Co-authored-by: Summer-Gu <37869445+gubinjie@users.noreply.github.com> Co-authored-by: Fei He <droxer.he@gmail.com> Co-authored-by: ybalbert001 <120714773+ybalbert001@users.noreply.github.com> Co-authored-by: Yuanbo Li <ybalbert@amazon.com> Co-authored-by: douxc <7553076+douxc@users.noreply.github.com> Co-authored-by: liuzhenghua <1090179900@qq.com> Co-authored-by: Wu Jiayang <62842862+Wu-Jiayang@users.noreply.github.com> Co-authored-by: Your Name <you@example.com> Co-authored-by: kimjion <45935338+kimjion@users.noreply.github.com> Co-authored-by: AugNSo <song.tiankai@icloud.com> Co-authored-by: llinvokerl <38915183+llinvokerl@users.noreply.github.com> Co-authored-by: liusurong.lsr <liusurong.lsr@alibaba-inc.com> Co-authored-by: Vasu Negi <vasu-negi@users.noreply.github.com> Co-authored-by: Hundredwz <1808096180@qq.com> Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com>
8 个月前
Introduce Plugins (#13836) Signed-off-by: yihong0618 <zouzou0208@gmail.com> Signed-off-by: -LAN- <laipz8200@outlook.com> Signed-off-by: xhe <xw897002528@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: takatost <takatost@gmail.com> Co-authored-by: kurokobo <kuro664@gmail.com> Co-authored-by: Novice Lee <novicelee@NoviPro.local> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: AkaraChen <akarachen@outlook.com> Co-authored-by: Yi <yxiaoisme@gmail.com> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: Hiroshi Fujita <fujita-h@users.noreply.github.com> Co-authored-by: AkaraChen <85140972+AkaraChen@users.noreply.github.com> Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com> Co-authored-by: 非法操作 <hjlarry@163.com> Co-authored-by: Novice <857526207@qq.com> Co-authored-by: Hiroki Nagai <82458324+nagaihiroki-git@users.noreply.github.com> Co-authored-by: Gen Sato <52241300+halogen22@users.noreply.github.com> Co-authored-by: eux <euxuuu@gmail.com> Co-authored-by: huangzhuo1949 <167434202+huangzhuo1949@users.noreply.github.com> Co-authored-by: huangzhuo <huangzhuo1@xiaomi.com> Co-authored-by: lotsik <lotsik@mail.ru> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: nite-knite <nkCoding@gmail.com> Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: gakkiyomi <gakkiyomi@aliyun.com> Co-authored-by: CN-P5 <heibai2006@gmail.com> Co-authored-by: CN-P5 <heibai2006@qq.com> Co-authored-by: Chuehnone <1897025+chuehnone@users.noreply.github.com> Co-authored-by: yihong <zouzou0208@gmail.com> Co-authored-by: Kevin9703 <51311316+Kevin9703@users.noreply.github.com> Co-authored-by: -LAN- <laipz8200@outlook.com> Co-authored-by: Boris Feld <lothiraldan@gmail.com> Co-authored-by: mbo <himabo@gmail.com> Co-authored-by: mabo <mabo@aeyes.ai> Co-authored-by: Warren Chen <warren.chen830@gmail.com> Co-authored-by: JzoNgKVO <27049666+JzoNgKVO@users.noreply.github.com> Co-authored-by: jiandanfeng <chenjh3@wangsu.com> Co-authored-by: zhu-an <70234959+xhdd123321@users.noreply.github.com> Co-authored-by: zhaoqingyu.1075 <zhaoqingyu.1075@bytedance.com> Co-authored-by: 海狸大師 <86974027+yenslife@users.noreply.github.com> Co-authored-by: Xu Song <xusong.vip@gmail.com> Co-authored-by: rayshaw001 <396301947@163.com> Co-authored-by: Ding Jiatong <dingjiatong@gmail.com> Co-authored-by: Bowen Liang <liangbowen@gf.com.cn> Co-authored-by: JasonVV <jasonwangiii@outlook.com> Co-authored-by: le0zh <newlight@qq.com> Co-authored-by: zhuxinliang <zhuxinliang@didiglobal.com> Co-authored-by: k-zaku <zaku99@outlook.jp> Co-authored-by: luckylhb90 <luckylhb90@gmail.com> Co-authored-by: hobo.l <hobo.l@binance.com> Co-authored-by: jiangbo721 <365065261@qq.com> Co-authored-by: 刘江波 <jiangbo721@163.com> Co-authored-by: Shun Miyazawa <34241526+miya@users.noreply.github.com> Co-authored-by: EricPan <30651140+Egfly@users.noreply.github.com> Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: sino <sino2322@gmail.com> Co-authored-by: Jhvcc <37662342+Jhvcc@users.noreply.github.com> Co-authored-by: lowell <lowell.hu@zkteco.in> Co-authored-by: Boris Polonsky <BorisPolonsky@users.noreply.github.com> Co-authored-by: Ademílson Tonato <ademilsonft@outlook.com> Co-authored-by: Ademílson Tonato <ademilson.tonato@refurbed.com> Co-authored-by: IWAI, Masaharu <iwaim.sub@gmail.com> Co-authored-by: Yueh-Po Peng (Yabi) <94939112+y10ab1@users.noreply.github.com> Co-authored-by: Jason <ggbbddjm@gmail.com> Co-authored-by: Xin Zhang <sjhpzx@gmail.com> Co-authored-by: yjc980121 <3898524+yjc980121@users.noreply.github.com> Co-authored-by: heyszt <36215648+hieheihei@users.noreply.github.com> Co-authored-by: Abdullah AlOsaimi <osaimiacc@gmail.com> Co-authored-by: Abdullah AlOsaimi <189027247+osaimi@users.noreply.github.com> Co-authored-by: Yingchun Lai <laiyingchun@apache.org> Co-authored-by: Hash Brown <hi@xzd.me> Co-authored-by: zuodongxu <192560071+zuodongxu@users.noreply.github.com> Co-authored-by: Masashi Tomooka <tmokmss@users.noreply.github.com> Co-authored-by: aplio <ryo.091219@gmail.com> Co-authored-by: Obada Khalili <54270856+obadakhalili@users.noreply.github.com> Co-authored-by: Nam Vu <zuzoovn@gmail.com> Co-authored-by: Kei YAMAZAKI <1715090+kei-yamazaki@users.noreply.github.com> Co-authored-by: TechnoHouse <13776377+deephbz@users.noreply.github.com> Co-authored-by: Riddhimaan-Senapati <114703025+Riddhimaan-Senapati@users.noreply.github.com> Co-authored-by: MaFee921 <31881301+2284730142@users.noreply.github.com> Co-authored-by: te-chan <t-nakanome@sakura-is.co.jp> Co-authored-by: HQidea <HQidea@users.noreply.github.com> Co-authored-by: Joshbly <36315710+Joshbly@users.noreply.github.com> Co-authored-by: xhe <xw897002528@gmail.com> Co-authored-by: weiwenyan-dev <154779315+weiwenyan-dev@users.noreply.github.com> Co-authored-by: ex_wenyan.wei <ex_wenyan.wei@tcl.com> Co-authored-by: engchina <12236799+engchina@users.noreply.github.com> Co-authored-by: engchina <atjapan2015@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: 呆萌闷油瓶 <253605712@qq.com> Co-authored-by: Kemal <kemalmeler@outlook.com> Co-authored-by: Lazy_Frog <4590648+lazyFrogLOL@users.noreply.github.com> Co-authored-by: Yi Xiao <54782454+YIXIAO0@users.noreply.github.com> Co-authored-by: Steven sun <98230804+Tuyohai@users.noreply.github.com> Co-authored-by: steven <sunzwj@digitalchina.com> Co-authored-by: Kalo Chin <91766386+fdb02983rhy@users.noreply.github.com> Co-authored-by: Katy Tao <34019945+KatyTao@users.noreply.github.com> Co-authored-by: depy <42985524+h4ckdepy@users.noreply.github.com> Co-authored-by: 胡春东 <gycm520@gmail.com> Co-authored-by: Junjie.M <118170653@qq.com> Co-authored-by: MuYu <mr.muzea@gmail.com> Co-authored-by: Naoki Takashima <39912547+takatea@users.noreply.github.com> Co-authored-by: Summer-Gu <37869445+gubinjie@users.noreply.github.com> Co-authored-by: Fei He <droxer.he@gmail.com> Co-authored-by: ybalbert001 <120714773+ybalbert001@users.noreply.github.com> Co-authored-by: Yuanbo Li <ybalbert@amazon.com> Co-authored-by: douxc <7553076+douxc@users.noreply.github.com> Co-authored-by: liuzhenghua <1090179900@qq.com> Co-authored-by: Wu Jiayang <62842862+Wu-Jiayang@users.noreply.github.com> Co-authored-by: Your Name <you@example.com> Co-authored-by: kimjion <45935338+kimjion@users.noreply.github.com> Co-authored-by: AugNSo <song.tiankai@icloud.com> Co-authored-by: llinvokerl <38915183+llinvokerl@users.noreply.github.com> Co-authored-by: liusurong.lsr <liusurong.lsr@alibaba-inc.com> Co-authored-by: Vasu Negi <vasu-negi@users.noreply.github.com> Co-authored-by: Hundredwz <1808096180@qq.com> Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com>
8 个月前
Introduce Plugins (#13836) Signed-off-by: yihong0618 <zouzou0208@gmail.com> Signed-off-by: -LAN- <laipz8200@outlook.com> Signed-off-by: xhe <xw897002528@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: takatost <takatost@gmail.com> Co-authored-by: kurokobo <kuro664@gmail.com> Co-authored-by: Novice Lee <novicelee@NoviPro.local> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: AkaraChen <akarachen@outlook.com> Co-authored-by: Yi <yxiaoisme@gmail.com> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: Hiroshi Fujita <fujita-h@users.noreply.github.com> Co-authored-by: AkaraChen <85140972+AkaraChen@users.noreply.github.com> Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com> Co-authored-by: 非法操作 <hjlarry@163.com> Co-authored-by: Novice <857526207@qq.com> Co-authored-by: Hiroki Nagai <82458324+nagaihiroki-git@users.noreply.github.com> Co-authored-by: Gen Sato <52241300+halogen22@users.noreply.github.com> Co-authored-by: eux <euxuuu@gmail.com> Co-authored-by: huangzhuo1949 <167434202+huangzhuo1949@users.noreply.github.com> Co-authored-by: huangzhuo <huangzhuo1@xiaomi.com> Co-authored-by: lotsik <lotsik@mail.ru> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: nite-knite <nkCoding@gmail.com> Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: gakkiyomi <gakkiyomi@aliyun.com> Co-authored-by: CN-P5 <heibai2006@gmail.com> Co-authored-by: CN-P5 <heibai2006@qq.com> Co-authored-by: Chuehnone <1897025+chuehnone@users.noreply.github.com> Co-authored-by: yihong <zouzou0208@gmail.com> Co-authored-by: Kevin9703 <51311316+Kevin9703@users.noreply.github.com> Co-authored-by: -LAN- <laipz8200@outlook.com> Co-authored-by: Boris Feld <lothiraldan@gmail.com> Co-authored-by: mbo <himabo@gmail.com> Co-authored-by: mabo <mabo@aeyes.ai> Co-authored-by: Warren Chen <warren.chen830@gmail.com> Co-authored-by: JzoNgKVO <27049666+JzoNgKVO@users.noreply.github.com> Co-authored-by: jiandanfeng <chenjh3@wangsu.com> Co-authored-by: zhu-an <70234959+xhdd123321@users.noreply.github.com> Co-authored-by: zhaoqingyu.1075 <zhaoqingyu.1075@bytedance.com> Co-authored-by: 海狸大師 <86974027+yenslife@users.noreply.github.com> Co-authored-by: Xu Song <xusong.vip@gmail.com> Co-authored-by: rayshaw001 <396301947@163.com> Co-authored-by: Ding Jiatong <dingjiatong@gmail.com> Co-authored-by: Bowen Liang <liangbowen@gf.com.cn> Co-authored-by: JasonVV <jasonwangiii@outlook.com> Co-authored-by: le0zh <newlight@qq.com> Co-authored-by: zhuxinliang <zhuxinliang@didiglobal.com> Co-authored-by: k-zaku <zaku99@outlook.jp> Co-authored-by: luckylhb90 <luckylhb90@gmail.com> Co-authored-by: hobo.l <hobo.l@binance.com> Co-authored-by: jiangbo721 <365065261@qq.com> Co-authored-by: 刘江波 <jiangbo721@163.com> Co-authored-by: Shun Miyazawa <34241526+miya@users.noreply.github.com> Co-authored-by: EricPan <30651140+Egfly@users.noreply.github.com> Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: sino <sino2322@gmail.com> Co-authored-by: Jhvcc <37662342+Jhvcc@users.noreply.github.com> Co-authored-by: lowell <lowell.hu@zkteco.in> Co-authored-by: Boris Polonsky <BorisPolonsky@users.noreply.github.com> Co-authored-by: Ademílson Tonato <ademilsonft@outlook.com> Co-authored-by: Ademílson Tonato <ademilson.tonato@refurbed.com> Co-authored-by: IWAI, Masaharu <iwaim.sub@gmail.com> Co-authored-by: Yueh-Po Peng (Yabi) <94939112+y10ab1@users.noreply.github.com> Co-authored-by: Jason <ggbbddjm@gmail.com> Co-authored-by: Xin Zhang <sjhpzx@gmail.com> Co-authored-by: yjc980121 <3898524+yjc980121@users.noreply.github.com> Co-authored-by: heyszt <36215648+hieheihei@users.noreply.github.com> Co-authored-by: Abdullah AlOsaimi <osaimiacc@gmail.com> Co-authored-by: Abdullah AlOsaimi <189027247+osaimi@users.noreply.github.com> Co-authored-by: Yingchun Lai <laiyingchun@apache.org> Co-authored-by: Hash Brown <hi@xzd.me> Co-authored-by: zuodongxu <192560071+zuodongxu@users.noreply.github.com> Co-authored-by: Masashi Tomooka <tmokmss@users.noreply.github.com> Co-authored-by: aplio <ryo.091219@gmail.com> Co-authored-by: Obada Khalili <54270856+obadakhalili@users.noreply.github.com> Co-authored-by: Nam Vu <zuzoovn@gmail.com> Co-authored-by: Kei YAMAZAKI <1715090+kei-yamazaki@users.noreply.github.com> Co-authored-by: TechnoHouse <13776377+deephbz@users.noreply.github.com> Co-authored-by: Riddhimaan-Senapati <114703025+Riddhimaan-Senapati@users.noreply.github.com> Co-authored-by: MaFee921 <31881301+2284730142@users.noreply.github.com> Co-authored-by: te-chan <t-nakanome@sakura-is.co.jp> Co-authored-by: HQidea <HQidea@users.noreply.github.com> Co-authored-by: Joshbly <36315710+Joshbly@users.noreply.github.com> Co-authored-by: xhe <xw897002528@gmail.com> Co-authored-by: weiwenyan-dev <154779315+weiwenyan-dev@users.noreply.github.com> Co-authored-by: ex_wenyan.wei <ex_wenyan.wei@tcl.com> Co-authored-by: engchina <12236799+engchina@users.noreply.github.com> Co-authored-by: engchina <atjapan2015@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: 呆萌闷油瓶 <253605712@qq.com> Co-authored-by: Kemal <kemalmeler@outlook.com> Co-authored-by: Lazy_Frog <4590648+lazyFrogLOL@users.noreply.github.com> Co-authored-by: Yi Xiao <54782454+YIXIAO0@users.noreply.github.com> Co-authored-by: Steven sun <98230804+Tuyohai@users.noreply.github.com> Co-authored-by: steven <sunzwj@digitalchina.com> Co-authored-by: Kalo Chin <91766386+fdb02983rhy@users.noreply.github.com> Co-authored-by: Katy Tao <34019945+KatyTao@users.noreply.github.com> Co-authored-by: depy <42985524+h4ckdepy@users.noreply.github.com> Co-authored-by: 胡春东 <gycm520@gmail.com> Co-authored-by: Junjie.M <118170653@qq.com> Co-authored-by: MuYu <mr.muzea@gmail.com> Co-authored-by: Naoki Takashima <39912547+takatea@users.noreply.github.com> Co-authored-by: Summer-Gu <37869445+gubinjie@users.noreply.github.com> Co-authored-by: Fei He <droxer.he@gmail.com> Co-authored-by: ybalbert001 <120714773+ybalbert001@users.noreply.github.com> Co-authored-by: Yuanbo Li <ybalbert@amazon.com> Co-authored-by: douxc <7553076+douxc@users.noreply.github.com> Co-authored-by: liuzhenghua <1090179900@qq.com> Co-authored-by: Wu Jiayang <62842862+Wu-Jiayang@users.noreply.github.com> Co-authored-by: Your Name <you@example.com> Co-authored-by: kimjion <45935338+kimjion@users.noreply.github.com> Co-authored-by: AugNSo <song.tiankai@icloud.com> Co-authored-by: llinvokerl <38915183+llinvokerl@users.noreply.github.com> Co-authored-by: liusurong.lsr <liusurong.lsr@alibaba-inc.com> Co-authored-by: Vasu Negi <vasu-negi@users.noreply.github.com> Co-authored-by: Hundredwz <1808096180@qq.com> Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com>
8 个月前
Introduce Plugins (#13836) Signed-off-by: yihong0618 <zouzou0208@gmail.com> Signed-off-by: -LAN- <laipz8200@outlook.com> Signed-off-by: xhe <xw897002528@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: takatost <takatost@gmail.com> Co-authored-by: kurokobo <kuro664@gmail.com> Co-authored-by: Novice Lee <novicelee@NoviPro.local> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: AkaraChen <akarachen@outlook.com> Co-authored-by: Yi <yxiaoisme@gmail.com> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: Hiroshi Fujita <fujita-h@users.noreply.github.com> Co-authored-by: AkaraChen <85140972+AkaraChen@users.noreply.github.com> Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com> Co-authored-by: 非法操作 <hjlarry@163.com> Co-authored-by: Novice <857526207@qq.com> Co-authored-by: Hiroki Nagai <82458324+nagaihiroki-git@users.noreply.github.com> Co-authored-by: Gen Sato <52241300+halogen22@users.noreply.github.com> Co-authored-by: eux <euxuuu@gmail.com> Co-authored-by: huangzhuo1949 <167434202+huangzhuo1949@users.noreply.github.com> Co-authored-by: huangzhuo <huangzhuo1@xiaomi.com> Co-authored-by: lotsik <lotsik@mail.ru> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: nite-knite <nkCoding@gmail.com> Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: gakkiyomi <gakkiyomi@aliyun.com> Co-authored-by: CN-P5 <heibai2006@gmail.com> Co-authored-by: CN-P5 <heibai2006@qq.com> Co-authored-by: Chuehnone <1897025+chuehnone@users.noreply.github.com> Co-authored-by: yihong <zouzou0208@gmail.com> Co-authored-by: Kevin9703 <51311316+Kevin9703@users.noreply.github.com> Co-authored-by: -LAN- <laipz8200@outlook.com> Co-authored-by: Boris Feld <lothiraldan@gmail.com> Co-authored-by: mbo <himabo@gmail.com> Co-authored-by: mabo <mabo@aeyes.ai> Co-authored-by: Warren Chen <warren.chen830@gmail.com> Co-authored-by: JzoNgKVO <27049666+JzoNgKVO@users.noreply.github.com> Co-authored-by: jiandanfeng <chenjh3@wangsu.com> Co-authored-by: zhu-an <70234959+xhdd123321@users.noreply.github.com> Co-authored-by: zhaoqingyu.1075 <zhaoqingyu.1075@bytedance.com> Co-authored-by: 海狸大師 <86974027+yenslife@users.noreply.github.com> Co-authored-by: Xu Song <xusong.vip@gmail.com> Co-authored-by: rayshaw001 <396301947@163.com> Co-authored-by: Ding Jiatong <dingjiatong@gmail.com> Co-authored-by: Bowen Liang <liangbowen@gf.com.cn> Co-authored-by: JasonVV <jasonwangiii@outlook.com> Co-authored-by: le0zh <newlight@qq.com> Co-authored-by: zhuxinliang <zhuxinliang@didiglobal.com> Co-authored-by: k-zaku <zaku99@outlook.jp> Co-authored-by: luckylhb90 <luckylhb90@gmail.com> Co-authored-by: hobo.l <hobo.l@binance.com> Co-authored-by: jiangbo721 <365065261@qq.com> Co-authored-by: 刘江波 <jiangbo721@163.com> Co-authored-by: Shun Miyazawa <34241526+miya@users.noreply.github.com> Co-authored-by: EricPan <30651140+Egfly@users.noreply.github.com> Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: sino <sino2322@gmail.com> Co-authored-by: Jhvcc <37662342+Jhvcc@users.noreply.github.com> Co-authored-by: lowell <lowell.hu@zkteco.in> Co-authored-by: Boris Polonsky <BorisPolonsky@users.noreply.github.com> Co-authored-by: Ademílson Tonato <ademilsonft@outlook.com> Co-authored-by: Ademílson Tonato <ademilson.tonato@refurbed.com> Co-authored-by: IWAI, Masaharu <iwaim.sub@gmail.com> Co-authored-by: Yueh-Po Peng (Yabi) <94939112+y10ab1@users.noreply.github.com> Co-authored-by: Jason <ggbbddjm@gmail.com> Co-authored-by: Xin Zhang <sjhpzx@gmail.com> Co-authored-by: yjc980121 <3898524+yjc980121@users.noreply.github.com> Co-authored-by: heyszt <36215648+hieheihei@users.noreply.github.com> Co-authored-by: Abdullah AlOsaimi <osaimiacc@gmail.com> Co-authored-by: Abdullah AlOsaimi <189027247+osaimi@users.noreply.github.com> Co-authored-by: Yingchun Lai <laiyingchun@apache.org> Co-authored-by: Hash Brown <hi@xzd.me> Co-authored-by: zuodongxu <192560071+zuodongxu@users.noreply.github.com> Co-authored-by: Masashi Tomooka <tmokmss@users.noreply.github.com> Co-authored-by: aplio <ryo.091219@gmail.com> Co-authored-by: Obada Khalili <54270856+obadakhalili@users.noreply.github.com> Co-authored-by: Nam Vu <zuzoovn@gmail.com> Co-authored-by: Kei YAMAZAKI <1715090+kei-yamazaki@users.noreply.github.com> Co-authored-by: TechnoHouse <13776377+deephbz@users.noreply.github.com> Co-authored-by: Riddhimaan-Senapati <114703025+Riddhimaan-Senapati@users.noreply.github.com> Co-authored-by: MaFee921 <31881301+2284730142@users.noreply.github.com> Co-authored-by: te-chan <t-nakanome@sakura-is.co.jp> Co-authored-by: HQidea <HQidea@users.noreply.github.com> Co-authored-by: Joshbly <36315710+Joshbly@users.noreply.github.com> Co-authored-by: xhe <xw897002528@gmail.com> Co-authored-by: weiwenyan-dev <154779315+weiwenyan-dev@users.noreply.github.com> Co-authored-by: ex_wenyan.wei <ex_wenyan.wei@tcl.com> Co-authored-by: engchina <12236799+engchina@users.noreply.github.com> Co-authored-by: engchina <atjapan2015@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: 呆萌闷油瓶 <253605712@qq.com> Co-authored-by: Kemal <kemalmeler@outlook.com> Co-authored-by: Lazy_Frog <4590648+lazyFrogLOL@users.noreply.github.com> Co-authored-by: Yi Xiao <54782454+YIXIAO0@users.noreply.github.com> Co-authored-by: Steven sun <98230804+Tuyohai@users.noreply.github.com> Co-authored-by: steven <sunzwj@digitalchina.com> Co-authored-by: Kalo Chin <91766386+fdb02983rhy@users.noreply.github.com> Co-authored-by: Katy Tao <34019945+KatyTao@users.noreply.github.com> Co-authored-by: depy <42985524+h4ckdepy@users.noreply.github.com> Co-authored-by: 胡春东 <gycm520@gmail.com> Co-authored-by: Junjie.M <118170653@qq.com> Co-authored-by: MuYu <mr.muzea@gmail.com> Co-authored-by: Naoki Takashima <39912547+takatea@users.noreply.github.com> Co-authored-by: Summer-Gu <37869445+gubinjie@users.noreply.github.com> Co-authored-by: Fei He <droxer.he@gmail.com> Co-authored-by: ybalbert001 <120714773+ybalbert001@users.noreply.github.com> Co-authored-by: Yuanbo Li <ybalbert@amazon.com> Co-authored-by: douxc <7553076+douxc@users.noreply.github.com> Co-authored-by: liuzhenghua <1090179900@qq.com> Co-authored-by: Wu Jiayang <62842862+Wu-Jiayang@users.noreply.github.com> Co-authored-by: Your Name <you@example.com> Co-authored-by: kimjion <45935338+kimjion@users.noreply.github.com> Co-authored-by: AugNSo <song.tiankai@icloud.com> Co-authored-by: llinvokerl <38915183+llinvokerl@users.noreply.github.com> Co-authored-by: liusurong.lsr <liusurong.lsr@alibaba-inc.com> Co-authored-by: Vasu Negi <vasu-negi@users.noreply.github.com> Co-authored-by: Hundredwz <1808096180@qq.com> Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com>
8 个月前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254
  1. import base64
  2. import json
  3. import logging
  4. import secrets
  5. from typing import Any, Optional
  6. import click
  7. from flask import current_app
  8. from pydantic import TypeAdapter
  9. from sqlalchemy import select
  10. from werkzeug.exceptions import NotFound
  11. from configs import dify_config
  12. from constants.languages import languages
  13. from core.plugin.entities.plugin import DatasourceProviderID, ToolProviderID
  14. from core.rag.datasource.vdb.vector_factory import Vector
  15. from core.rag.datasource.vdb.vector_type import VectorType
  16. from core.rag.index_processor.constant.built_in_field import BuiltInField
  17. from core.rag.models.document import Document
  18. from core.tools.utils.system_oauth_encryption import encrypt_system_oauth_params
  19. from events.app_event import app_was_created
  20. from extensions.ext_database import db
  21. from extensions.ext_redis import redis_client
  22. from extensions.ext_storage import storage
  23. from libs.helper import email as email_validate
  24. from libs.password import hash_password, password_pattern, valid_password
  25. from libs.rsa import generate_key_pair
  26. from models import Tenant
  27. from models.dataset import Dataset, DatasetCollectionBinding, DatasetMetadata, DatasetMetadataBinding, DocumentSegment
  28. from models.dataset import Document as DatasetDocument
  29. from models.model import Account, App, AppAnnotationSetting, AppMode, Conversation, MessageAnnotation
  30. from models.oauth import DatasourceOauthParamConfig
  31. from models.provider import Provider, ProviderModel
  32. from models.tools import ToolOAuthSystemClient
  33. from services.account_service import AccountService, RegisterService, TenantService
  34. from services.clear_free_plan_tenant_expired_logs import ClearFreePlanTenantExpiredLogs
  35. from services.plugin.data_migration import PluginDataMigration
  36. from services.plugin.plugin_migration import PluginMigration
  37. @click.command("reset-password", help="Reset the account password.")
  38. @click.option("--email", prompt=True, help="Account email to reset password for")
  39. @click.option("--new-password", prompt=True, help="New password")
  40. @click.option("--password-confirm", prompt=True, help="Confirm new password")
  41. def reset_password(email, new_password, password_confirm):
  42. """
  43. Reset password of owner account
  44. Only available in SELF_HOSTED mode
  45. """
  46. if str(new_password).strip() != str(password_confirm).strip():
  47. click.echo(click.style("Passwords do not match.", fg="red"))
  48. return
  49. account = db.session.query(Account).where(Account.email == email).one_or_none()
  50. if not account:
  51. click.echo(click.style("Account not found for email: {}".format(email), fg="red"))
  52. return
  53. try:
  54. valid_password(new_password)
  55. except:
  56. click.echo(click.style("Invalid password. Must match {}".format(password_pattern), fg="red"))
  57. return
  58. # generate password salt
  59. salt = secrets.token_bytes(16)
  60. base64_salt = base64.b64encode(salt).decode()
  61. # encrypt password with salt
  62. password_hashed = hash_password(new_password, salt)
  63. base64_password_hashed = base64.b64encode(password_hashed).decode()
  64. account.password = base64_password_hashed
  65. account.password_salt = base64_salt
  66. db.session.commit()
  67. AccountService.reset_login_error_rate_limit(email)
  68. click.echo(click.style("Password reset successfully.", fg="green"))
  69. @click.command("reset-email", help="Reset the account email.")
  70. @click.option("--email", prompt=True, help="Current account email")
  71. @click.option("--new-email", prompt=True, help="New email")
  72. @click.option("--email-confirm", prompt=True, help="Confirm new email")
  73. def reset_email(email, new_email, email_confirm):
  74. """
  75. Replace account email
  76. :return:
  77. """
  78. if str(new_email).strip() != str(email_confirm).strip():
  79. click.echo(click.style("New emails do not match.", fg="red"))
  80. return
  81. account = db.session.query(Account).where(Account.email == email).one_or_none()
  82. if not account:
  83. click.echo(click.style("Account not found for email: {}".format(email), fg="red"))
  84. return
  85. try:
  86. email_validate(new_email)
  87. except:
  88. click.echo(click.style("Invalid email: {}".format(new_email), fg="red"))
  89. return
  90. account.email = new_email
  91. db.session.commit()
  92. click.echo(click.style("Email updated successfully.", fg="green"))
  93. @click.command(
  94. "reset-encrypt-key-pair",
  95. help="Reset the asymmetric key pair of workspace for encrypt LLM credentials. "
  96. "After the reset, all LLM credentials will become invalid, "
  97. "requiring re-entry."
  98. "Only support SELF_HOSTED mode.",
  99. )
  100. @click.confirmation_option(
  101. prompt=click.style(
  102. "Are you sure you want to reset encrypt key pair? This operation cannot be rolled back!", fg="red"
  103. )
  104. )
  105. def reset_encrypt_key_pair():
  106. """
  107. Reset the encrypted key pair of workspace for encrypt LLM credentials.
  108. After the reset, all LLM credentials will become invalid, requiring re-entry.
  109. Only support SELF_HOSTED mode.
  110. """
  111. if dify_config.EDITION != "SELF_HOSTED":
  112. click.echo(click.style("This command is only for SELF_HOSTED installations.", fg="red"))
  113. return
  114. tenants = db.session.query(Tenant).all()
  115. for tenant in tenants:
  116. if not tenant:
  117. click.echo(click.style("No workspaces found. Run /install first.", fg="red"))
  118. return
  119. tenant.encrypt_public_key = generate_key_pair(tenant.id)
  120. db.session.query(Provider).where(Provider.provider_type == "custom", Provider.tenant_id == tenant.id).delete()
  121. db.session.query(ProviderModel).where(ProviderModel.tenant_id == tenant.id).delete()
  122. db.session.commit()
  123. click.echo(
  124. click.style(
  125. "Congratulations! The asymmetric key pair of workspace {} has been reset.".format(tenant.id),
  126. fg="green",
  127. )
  128. )
  129. @click.command("vdb-migrate", help="Migrate vector db.")
  130. @click.option("--scope", default="all", prompt=False, help="The scope of vector database to migrate, Default is All.")
  131. def vdb_migrate(scope: str):
  132. if scope in {"knowledge", "all"}:
  133. migrate_knowledge_vector_database()
  134. if scope in {"annotation", "all"}:
  135. migrate_annotation_vector_database()
  136. def migrate_annotation_vector_database():
  137. """
  138. Migrate annotation datas to target vector database .
  139. """
  140. click.echo(click.style("Starting annotation data migration.", fg="green"))
  141. create_count = 0
  142. skipped_count = 0
  143. total_count = 0
  144. page = 1
  145. while True:
  146. try:
  147. # get apps info
  148. per_page = 50
  149. apps = (
  150. db.session.query(App)
  151. .where(App.status == "normal")
  152. .order_by(App.created_at.desc())
  153. .limit(per_page)
  154. .offset((page - 1) * per_page)
  155. .all()
  156. )
  157. if not apps:
  158. break
  159. except NotFound:
  160. break
  161. page += 1
  162. for app in apps:
  163. total_count = total_count + 1
  164. click.echo(
  165. f"Processing the {total_count} app {app.id}. " + f"{create_count} created, {skipped_count} skipped."
  166. )
  167. try:
  168. click.echo("Creating app annotation index: {}".format(app.id))
  169. app_annotation_setting = (
  170. db.session.query(AppAnnotationSetting).where(AppAnnotationSetting.app_id == app.id).first()
  171. )
  172. if not app_annotation_setting:
  173. skipped_count = skipped_count + 1
  174. click.echo("App annotation setting disabled: {}".format(app.id))
  175. continue
  176. # get dataset_collection_binding info
  177. dataset_collection_binding = (
  178. db.session.query(DatasetCollectionBinding)
  179. .where(DatasetCollectionBinding.id == app_annotation_setting.collection_binding_id)
  180. .first()
  181. )
  182. if not dataset_collection_binding:
  183. click.echo("App annotation collection binding not found: {}".format(app.id))
  184. continue
  185. annotations = db.session.query(MessageAnnotation).where(MessageAnnotation.app_id == app.id).all()
  186. dataset = Dataset(
  187. id=app.id,
  188. tenant_id=app.tenant_id,
  189. indexing_technique="high_quality",
  190. embedding_model_provider=dataset_collection_binding.provider_name,
  191. embedding_model=dataset_collection_binding.model_name,
  192. collection_binding_id=dataset_collection_binding.id,
  193. )
  194. documents = []
  195. if annotations:
  196. for annotation in annotations:
  197. document = Document(
  198. page_content=annotation.question,
  199. metadata={"annotation_id": annotation.id, "app_id": app.id, "doc_id": annotation.id},
  200. )
  201. documents.append(document)
  202. vector = Vector(dataset, attributes=["doc_id", "annotation_id", "app_id"])
  203. click.echo(f"Migrating annotations for app: {app.id}.")
  204. try:
  205. vector.delete()
  206. click.echo(click.style(f"Deleted vector index for app {app.id}.", fg="green"))
  207. except Exception as e:
  208. click.echo(click.style(f"Failed to delete vector index for app {app.id}.", fg="red"))
  209. raise e
  210. if documents:
  211. try:
  212. click.echo(
  213. click.style(
  214. f"Creating vector index with {len(documents)} annotations for app {app.id}.",
  215. fg="green",
  216. )
  217. )
  218. vector.create(documents)
  219. click.echo(click.style(f"Created vector index for app {app.id}.", fg="green"))
  220. except Exception as e:
  221. click.echo(click.style(f"Failed to created vector index for app {app.id}.", fg="red"))
  222. raise e
  223. click.echo(f"Successfully migrated app annotation {app.id}.")
  224. create_count += 1
  225. except Exception as e:
  226. click.echo(
  227. click.style(
  228. "Error creating app annotation index: {} {}".format(e.__class__.__name__, str(e)), fg="red"
  229. )
  230. )
  231. continue
  232. click.echo(
  233. click.style(
  234. f"Migration complete. Created {create_count} app annotation indexes. Skipped {skipped_count} apps.",
  235. fg="green",
  236. )
  237. )
  238. def migrate_knowledge_vector_database():
  239. """
  240. Migrate vector database datas to target vector database .
  241. """
  242. click.echo(click.style("Starting vector database migration.", fg="green"))
  243. create_count = 0
  244. skipped_count = 0
  245. total_count = 0
  246. vector_type = dify_config.VECTOR_STORE
  247. upper_collection_vector_types = {
  248. VectorType.MILVUS,
  249. VectorType.PGVECTOR,
  250. VectorType.VASTBASE,
  251. VectorType.RELYT,
  252. VectorType.WEAVIATE,
  253. VectorType.ORACLE,
  254. VectorType.ELASTICSEARCH,
  255. VectorType.OPENGAUSS,
  256. VectorType.TABLESTORE,
  257. VectorType.MATRIXONE,
  258. }
  259. lower_collection_vector_types = {
  260. VectorType.ANALYTICDB,
  261. VectorType.CHROMA,
  262. VectorType.MYSCALE,
  263. VectorType.PGVECTO_RS,
  264. VectorType.TIDB_VECTOR,
  265. VectorType.OPENSEARCH,
  266. VectorType.TENCENT,
  267. VectorType.BAIDU,
  268. VectorType.VIKINGDB,
  269. VectorType.UPSTASH,
  270. VectorType.COUCHBASE,
  271. VectorType.OCEANBASE,
  272. }
  273. page = 1
  274. while True:
  275. try:
  276. stmt = (
  277. select(Dataset).where(Dataset.indexing_technique == "high_quality").order_by(Dataset.created_at.desc())
  278. )
  279. datasets = db.paginate(select=stmt, page=page, per_page=50, max_per_page=50, error_out=False)
  280. except NotFound:
  281. break
  282. page += 1
  283. for dataset in datasets:
  284. total_count = total_count + 1
  285. click.echo(
  286. f"Processing the {total_count} dataset {dataset.id}. {create_count} created, {skipped_count} skipped."
  287. )
  288. try:
  289. click.echo("Creating dataset vector database index: {}".format(dataset.id))
  290. if dataset.index_struct_dict:
  291. if dataset.index_struct_dict["type"] == vector_type:
  292. skipped_count = skipped_count + 1
  293. continue
  294. collection_name = ""
  295. dataset_id = dataset.id
  296. if vector_type in upper_collection_vector_types:
  297. collection_name = Dataset.gen_collection_name_by_id(dataset_id)
  298. elif vector_type == VectorType.QDRANT:
  299. if dataset.collection_binding_id:
  300. dataset_collection_binding = (
  301. db.session.query(DatasetCollectionBinding)
  302. .where(DatasetCollectionBinding.id == dataset.collection_binding_id)
  303. .one_or_none()
  304. )
  305. if dataset_collection_binding:
  306. collection_name = dataset_collection_binding.collection_name
  307. else:
  308. raise ValueError("Dataset Collection Binding not found")
  309. else:
  310. collection_name = Dataset.gen_collection_name_by_id(dataset_id)
  311. elif vector_type in lower_collection_vector_types:
  312. collection_name = Dataset.gen_collection_name_by_id(dataset_id).lower()
  313. else:
  314. raise ValueError(f"Vector store {vector_type} is not supported.")
  315. index_struct_dict = {"type": vector_type, "vector_store": {"class_prefix": collection_name}}
  316. dataset.index_struct = json.dumps(index_struct_dict)
  317. vector = Vector(dataset)
  318. click.echo(f"Migrating dataset {dataset.id}.")
  319. try:
  320. vector.delete()
  321. click.echo(
  322. click.style(f"Deleted vector index {collection_name} for dataset {dataset.id}.", fg="green")
  323. )
  324. except Exception as e:
  325. click.echo(
  326. click.style(
  327. f"Failed to delete vector index {collection_name} for dataset {dataset.id}.", fg="red"
  328. )
  329. )
  330. raise e
  331. dataset_documents = (
  332. db.session.query(DatasetDocument)
  333. .where(
  334. DatasetDocument.dataset_id == dataset.id,
  335. DatasetDocument.indexing_status == "completed",
  336. DatasetDocument.enabled == True,
  337. DatasetDocument.archived == False,
  338. )
  339. .all()
  340. )
  341. documents = []
  342. segments_count = 0
  343. for dataset_document in dataset_documents:
  344. segments = (
  345. db.session.query(DocumentSegment)
  346. .where(
  347. DocumentSegment.document_id == dataset_document.id,
  348. DocumentSegment.status == "completed",
  349. DocumentSegment.enabled == True,
  350. )
  351. .all()
  352. )
  353. for segment in segments:
  354. document = Document(
  355. page_content=segment.content,
  356. metadata={
  357. "doc_id": segment.index_node_id,
  358. "doc_hash": segment.index_node_hash,
  359. "document_id": segment.document_id,
  360. "dataset_id": segment.dataset_id,
  361. },
  362. )
  363. documents.append(document)
  364. segments_count = segments_count + 1
  365. if documents:
  366. try:
  367. click.echo(
  368. click.style(
  369. f"Creating vector index with {len(documents)} documents of {segments_count}"
  370. f" segments for dataset {dataset.id}.",
  371. fg="green",
  372. )
  373. )
  374. vector.create(documents)
  375. click.echo(click.style(f"Created vector index for dataset {dataset.id}.", fg="green"))
  376. except Exception as e:
  377. click.echo(click.style(f"Failed to created vector index for dataset {dataset.id}.", fg="red"))
  378. raise e
  379. db.session.add(dataset)
  380. db.session.commit()
  381. click.echo(f"Successfully migrated dataset {dataset.id}.")
  382. create_count += 1
  383. except Exception as e:
  384. db.session.rollback()
  385. click.echo(
  386. click.style("Error creating dataset index: {} {}".format(e.__class__.__name__, str(e)), fg="red")
  387. )
  388. continue
  389. click.echo(
  390. click.style(
  391. f"Migration complete. Created {create_count} dataset indexes. Skipped {skipped_count} datasets.", fg="green"
  392. )
  393. )
  394. @click.command("convert-to-agent-apps", help="Convert Agent Assistant to Agent App.")
  395. def convert_to_agent_apps():
  396. """
  397. Convert Agent Assistant to Agent App.
  398. """
  399. click.echo(click.style("Starting convert to agent apps.", fg="green"))
  400. proceeded_app_ids = []
  401. while True:
  402. # fetch first 1000 apps
  403. sql_query = """SELECT a.id AS id FROM apps a
  404. INNER JOIN app_model_configs am ON a.app_model_config_id=am.id
  405. WHERE a.mode = 'chat'
  406. AND am.agent_mode is not null
  407. AND (
  408. am.agent_mode like '%"strategy": "function_call"%'
  409. OR am.agent_mode like '%"strategy": "react"%'
  410. )
  411. AND (
  412. am.agent_mode like '{"enabled": true%'
  413. OR am.agent_mode like '{"max_iteration": %'
  414. ) ORDER BY a.created_at DESC LIMIT 1000
  415. """
  416. with db.engine.begin() as conn:
  417. rs = conn.execute(db.text(sql_query))
  418. apps = []
  419. for i in rs:
  420. app_id = str(i.id)
  421. if app_id not in proceeded_app_ids:
  422. proceeded_app_ids.append(app_id)
  423. app = db.session.query(App).where(App.id == app_id).first()
  424. if app is not None:
  425. apps.append(app)
  426. if len(apps) == 0:
  427. break
  428. for app in apps:
  429. click.echo("Converting app: {}".format(app.id))
  430. try:
  431. app.mode = AppMode.AGENT_CHAT.value
  432. db.session.commit()
  433. # update conversation mode to agent
  434. db.session.query(Conversation).where(Conversation.app_id == app.id).update(
  435. {Conversation.mode: AppMode.AGENT_CHAT.value}
  436. )
  437. db.session.commit()
  438. click.echo(click.style("Converted app: {}".format(app.id), fg="green"))
  439. except Exception as e:
  440. click.echo(click.style("Convert app error: {} {}".format(e.__class__.__name__, str(e)), fg="red"))
  441. click.echo(click.style("Conversion complete. Converted {} agent apps.".format(len(proceeded_app_ids)), fg="green"))
  442. @click.command("add-qdrant-index", help="Add Qdrant index.")
  443. @click.option("--field", default="metadata.doc_id", prompt=False, help="Index field , default is metadata.doc_id.")
  444. def add_qdrant_index(field: str):
  445. click.echo(click.style("Starting Qdrant index creation.", fg="green"))
  446. create_count = 0
  447. try:
  448. bindings = db.session.query(DatasetCollectionBinding).all()
  449. if not bindings:
  450. click.echo(click.style("No dataset collection bindings found.", fg="red"))
  451. return
  452. import qdrant_client
  453. from qdrant_client.http.exceptions import UnexpectedResponse
  454. from qdrant_client.http.models import PayloadSchemaType
  455. from core.rag.datasource.vdb.qdrant.qdrant_vector import QdrantConfig
  456. for binding in bindings:
  457. if dify_config.QDRANT_URL is None:
  458. raise ValueError("Qdrant URL is required.")
  459. qdrant_config = QdrantConfig(
  460. endpoint=dify_config.QDRANT_URL,
  461. api_key=dify_config.QDRANT_API_KEY,
  462. root_path=current_app.root_path,
  463. timeout=dify_config.QDRANT_CLIENT_TIMEOUT,
  464. grpc_port=dify_config.QDRANT_GRPC_PORT,
  465. prefer_grpc=dify_config.QDRANT_GRPC_ENABLED,
  466. )
  467. try:
  468. client = qdrant_client.QdrantClient(**qdrant_config.to_qdrant_params())
  469. # create payload index
  470. client.create_payload_index(binding.collection_name, field, field_schema=PayloadSchemaType.KEYWORD)
  471. create_count += 1
  472. except UnexpectedResponse as e:
  473. # Collection does not exist, so return
  474. if e.status_code == 404:
  475. click.echo(click.style(f"Collection not found: {binding.collection_name}.", fg="red"))
  476. continue
  477. # Some other error occurred, so re-raise the exception
  478. else:
  479. click.echo(
  480. click.style(
  481. f"Failed to create Qdrant index for collection: {binding.collection_name}.", fg="red"
  482. )
  483. )
  484. except Exception:
  485. click.echo(click.style("Failed to create Qdrant client.", fg="red"))
  486. click.echo(click.style(f"Index creation complete. Created {create_count} collection indexes.", fg="green"))
  487. @click.command("old-metadata-migration", help="Old metadata migration.")
  488. def old_metadata_migration():
  489. """
  490. Old metadata migration.
  491. """
  492. click.echo(click.style("Starting old metadata migration.", fg="green"))
  493. page = 1
  494. while True:
  495. try:
  496. stmt = (
  497. select(DatasetDocument)
  498. .where(DatasetDocument.doc_metadata.is_not(None))
  499. .order_by(DatasetDocument.created_at.desc())
  500. )
  501. documents = db.paginate(select=stmt, page=page, per_page=50, max_per_page=50, error_out=False)
  502. except NotFound:
  503. break
  504. if not documents:
  505. break
  506. for document in documents:
  507. if document.doc_metadata:
  508. doc_metadata = document.doc_metadata
  509. for key, value in doc_metadata.items():
  510. for field in BuiltInField:
  511. if field.value == key:
  512. break
  513. else:
  514. dataset_metadata = (
  515. db.session.query(DatasetMetadata)
  516. .where(DatasetMetadata.dataset_id == document.dataset_id, DatasetMetadata.name == key)
  517. .first()
  518. )
  519. if not dataset_metadata:
  520. dataset_metadata = DatasetMetadata(
  521. tenant_id=document.tenant_id,
  522. dataset_id=document.dataset_id,
  523. name=key,
  524. type="string",
  525. created_by=document.created_by,
  526. )
  527. db.session.add(dataset_metadata)
  528. db.session.flush()
  529. dataset_metadata_binding = DatasetMetadataBinding(
  530. tenant_id=document.tenant_id,
  531. dataset_id=document.dataset_id,
  532. metadata_id=dataset_metadata.id,
  533. document_id=document.id,
  534. created_by=document.created_by,
  535. )
  536. db.session.add(dataset_metadata_binding)
  537. else:
  538. dataset_metadata_binding = (
  539. db.session.query(DatasetMetadataBinding) # type: ignore
  540. .where(
  541. DatasetMetadataBinding.dataset_id == document.dataset_id,
  542. DatasetMetadataBinding.document_id == document.id,
  543. DatasetMetadataBinding.metadata_id == dataset_metadata.id,
  544. )
  545. .first()
  546. )
  547. if not dataset_metadata_binding:
  548. dataset_metadata_binding = DatasetMetadataBinding(
  549. tenant_id=document.tenant_id,
  550. dataset_id=document.dataset_id,
  551. metadata_id=dataset_metadata.id,
  552. document_id=document.id,
  553. created_by=document.created_by,
  554. )
  555. db.session.add(dataset_metadata_binding)
  556. db.session.commit()
  557. page += 1
  558. click.echo(click.style("Old metadata migration completed.", fg="green"))
  559. @click.command("create-tenant", help="Create account and tenant.")
  560. @click.option("--email", prompt=True, help="Tenant account email.")
  561. @click.option("--name", prompt=True, help="Workspace name.")
  562. @click.option("--language", prompt=True, help="Account language, default: en-US.")
  563. def create_tenant(email: str, language: Optional[str] = None, name: Optional[str] = None):
  564. """
  565. Create tenant account
  566. """
  567. if not email:
  568. click.echo(click.style("Email is required.", fg="red"))
  569. return
  570. # Create account
  571. email = email.strip()
  572. if "@" not in email:
  573. click.echo(click.style("Invalid email address.", fg="red"))
  574. return
  575. account_name = email.split("@")[0]
  576. if language not in languages:
  577. language = "en-US"
  578. # Validates name encoding for non-Latin characters.
  579. name = name.strip().encode("utf-8").decode("utf-8") if name else None
  580. # generate random password
  581. new_password = secrets.token_urlsafe(16)
  582. # register account
  583. account = RegisterService.register(
  584. email=email,
  585. name=account_name,
  586. password=new_password,
  587. language=language,
  588. create_workspace_required=False,
  589. )
  590. TenantService.create_owner_tenant_if_not_exist(account, name)
  591. click.echo(
  592. click.style(
  593. "Account and tenant created.\nAccount: {}\nPassword: {}".format(email, new_password),
  594. fg="green",
  595. )
  596. )
  597. @click.command("upgrade-db", help="Upgrade the database")
  598. def upgrade_db():
  599. click.echo("Preparing database migration...")
  600. lock = redis_client.lock(name="db_upgrade_lock", timeout=60)
  601. if lock.acquire(blocking=False):
  602. try:
  603. click.echo(click.style("Starting database migration.", fg="green"))
  604. # run db migration
  605. import flask_migrate
  606. flask_migrate.upgrade()
  607. click.echo(click.style("Database migration successful!", fg="green"))
  608. except Exception:
  609. logging.exception("Failed to execute database migration")
  610. finally:
  611. lock.release()
  612. else:
  613. click.echo("Database migration skipped")
  614. @click.command("fix-app-site-missing", help="Fix app related site missing issue.")
  615. def fix_app_site_missing():
  616. """
  617. Fix app related site missing issue.
  618. """
  619. click.echo(click.style("Starting fix for missing app-related sites.", fg="green"))
  620. failed_app_ids = []
  621. while True:
  622. sql = """select apps.id as id from apps left join sites on sites.app_id=apps.id
  623. where sites.id is null limit 1000"""
  624. with db.engine.begin() as conn:
  625. rs = conn.execute(db.text(sql))
  626. processed_count = 0
  627. for i in rs:
  628. processed_count += 1
  629. app_id = str(i.id)
  630. if app_id in failed_app_ids:
  631. continue
  632. try:
  633. app = db.session.query(App).where(App.id == app_id).first()
  634. if not app:
  635. print(f"App {app_id} not found")
  636. continue
  637. tenant = app.tenant
  638. if tenant:
  639. accounts = tenant.get_accounts()
  640. if not accounts:
  641. print("Fix failed for app {}".format(app.id))
  642. continue
  643. account = accounts[0]
  644. print("Fixing missing site for app {}".format(app.id))
  645. app_was_created.send(app, account=account)
  646. except Exception:
  647. failed_app_ids.append(app_id)
  648. click.echo(click.style("Failed to fix missing site for app {}".format(app_id), fg="red"))
  649. logging.exception(f"Failed to fix app related site missing issue, app_id: {app_id}")
  650. continue
  651. if not processed_count:
  652. break
  653. click.echo(click.style("Fix for missing app-related sites completed successfully!", fg="green"))
  654. @click.command("migrate-data-for-plugin", help="Migrate data for plugin.")
  655. def migrate_data_for_plugin():
  656. """
  657. Migrate data for plugin.
  658. """
  659. click.echo(click.style("Starting migrate data for plugin.", fg="white"))
  660. PluginDataMigration.migrate()
  661. click.echo(click.style("Migrate data for plugin completed.", fg="green"))
  662. @click.command("extract-plugins", help="Extract plugins.")
  663. @click.option("--output_file", prompt=True, help="The file to store the extracted plugins.", default="plugins.jsonl")
  664. @click.option("--workers", prompt=True, help="The number of workers to extract plugins.", default=10)
  665. def extract_plugins(output_file: str, workers: int):
  666. """
  667. Extract plugins.
  668. """
  669. click.echo(click.style("Starting extract plugins.", fg="white"))
  670. PluginMigration.extract_plugins(output_file, workers)
  671. click.echo(click.style("Extract plugins completed.", fg="green"))
  672. @click.command("extract-unique-identifiers", help="Extract unique identifiers.")
  673. @click.option(
  674. "--output_file",
  675. prompt=True,
  676. help="The file to store the extracted unique identifiers.",
  677. default="unique_identifiers.json",
  678. )
  679. @click.option(
  680. "--input_file", prompt=True, help="The file to store the extracted unique identifiers.", default="plugins.jsonl"
  681. )
  682. def extract_unique_plugins(output_file: str, input_file: str):
  683. """
  684. Extract unique plugins.
  685. """
  686. click.echo(click.style("Starting extract unique plugins.", fg="white"))
  687. PluginMigration.extract_unique_plugins_to_file(input_file, output_file)
  688. click.echo(click.style("Extract unique plugins completed.", fg="green"))
  689. @click.command("install-plugins", help="Install plugins.")
  690. @click.option(
  691. "--input_file", prompt=True, help="The file to store the extracted unique identifiers.", default="plugins.jsonl"
  692. )
  693. @click.option(
  694. "--output_file", prompt=True, help="The file to store the installed plugins.", default="installed_plugins.jsonl"
  695. )
  696. @click.option("--workers", prompt=True, help="The number of workers to install plugins.", default=100)
  697. def install_plugins(input_file: str, output_file: str, workers: int):
  698. """
  699. Install plugins.
  700. """
  701. click.echo(click.style("Starting install plugins.", fg="white"))
  702. PluginMigration.install_plugins(input_file, output_file, workers)
  703. click.echo(click.style("Install plugins completed.", fg="green"))
  704. @click.command("clear-free-plan-tenant-expired-logs", help="Clear free plan tenant expired logs.")
  705. @click.option("--days", prompt=True, help="The days to clear free plan tenant expired logs.", default=30)
  706. @click.option("--batch", prompt=True, help="The batch size to clear free plan tenant expired logs.", default=100)
  707. @click.option(
  708. "--tenant_ids",
  709. prompt=True,
  710. multiple=True,
  711. help="The tenant ids to clear free plan tenant expired logs.",
  712. )
  713. def clear_free_plan_tenant_expired_logs(days: int, batch: int, tenant_ids: list[str]):
  714. """
  715. Clear free plan tenant expired logs.
  716. """
  717. click.echo(click.style("Starting clear free plan tenant expired logs.", fg="white"))
  718. ClearFreePlanTenantExpiredLogs.process(days, batch, tenant_ids)
  719. click.echo(click.style("Clear free plan tenant expired logs completed.", fg="green"))
  720. @click.option("-f", "--force", is_flag=True, help="Skip user confirmation and force the command to execute.")
  721. @click.command("clear-orphaned-file-records", help="Clear orphaned file records.")
  722. def clear_orphaned_file_records(force: bool):
  723. """
  724. Clear orphaned file records in the database.
  725. """
  726. # define tables and columns to process
  727. files_tables = [
  728. {"table": "upload_files", "id_column": "id", "key_column": "key"},
  729. {"table": "tool_files", "id_column": "id", "key_column": "file_key"},
  730. ]
  731. ids_tables = [
  732. {"type": "uuid", "table": "message_files", "column": "upload_file_id"},
  733. {"type": "text", "table": "documents", "column": "data_source_info"},
  734. {"type": "text", "table": "document_segments", "column": "content"},
  735. {"type": "text", "table": "messages", "column": "answer"},
  736. {"type": "text", "table": "workflow_node_executions", "column": "inputs"},
  737. {"type": "text", "table": "workflow_node_executions", "column": "process_data"},
  738. {"type": "text", "table": "workflow_node_executions", "column": "outputs"},
  739. {"type": "text", "table": "conversations", "column": "introduction"},
  740. {"type": "text", "table": "conversations", "column": "system_instruction"},
  741. {"type": "text", "table": "accounts", "column": "avatar"},
  742. {"type": "text", "table": "apps", "column": "icon"},
  743. {"type": "text", "table": "sites", "column": "icon"},
  744. {"type": "json", "table": "messages", "column": "inputs"},
  745. {"type": "json", "table": "messages", "column": "message"},
  746. ]
  747. # notify user and ask for confirmation
  748. click.echo(
  749. click.style(
  750. "This command will first find and delete orphaned file records from the message_files table,", fg="yellow"
  751. )
  752. )
  753. click.echo(
  754. click.style(
  755. "and then it will find and delete orphaned file records in the following tables:",
  756. fg="yellow",
  757. )
  758. )
  759. for files_table in files_tables:
  760. click.echo(click.style(f"- {files_table['table']}", fg="yellow"))
  761. click.echo(
  762. click.style("The following tables and columns will be scanned to find orphaned file records:", fg="yellow")
  763. )
  764. for ids_table in ids_tables:
  765. click.echo(click.style(f"- {ids_table['table']} ({ids_table['column']})", fg="yellow"))
  766. click.echo("")
  767. click.echo(click.style("!!! USE WITH CAUTION !!!", fg="red"))
  768. click.echo(
  769. click.style(
  770. (
  771. "Since not all patterns have been fully tested, "
  772. "please note that this command may delete unintended file records."
  773. ),
  774. fg="yellow",
  775. )
  776. )
  777. click.echo(
  778. click.style("This cannot be undone. Please make sure to back up your database before proceeding.", fg="yellow")
  779. )
  780. click.echo(
  781. click.style(
  782. (
  783. "It is also recommended to run this during the maintenance window, "
  784. "as this may cause high load on your instance."
  785. ),
  786. fg="yellow",
  787. )
  788. )
  789. if not force:
  790. click.confirm("Do you want to proceed?", abort=True)
  791. # start the cleanup process
  792. click.echo(click.style("Starting orphaned file records cleanup.", fg="white"))
  793. # clean up the orphaned records in the message_files table where message_id doesn't exist in messages table
  794. try:
  795. click.echo(
  796. click.style("- Listing message_files records where message_id doesn't exist in messages table", fg="white")
  797. )
  798. query = (
  799. "SELECT mf.id, mf.message_id "
  800. "FROM message_files mf LEFT JOIN messages m ON mf.message_id = m.id "
  801. "WHERE m.id IS NULL"
  802. )
  803. orphaned_message_files = []
  804. with db.engine.begin() as conn:
  805. rs = conn.execute(db.text(query))
  806. for i in rs:
  807. orphaned_message_files.append({"id": str(i[0]), "message_id": str(i[1])})
  808. if orphaned_message_files:
  809. click.echo(click.style(f"Found {len(orphaned_message_files)} orphaned message_files records:", fg="white"))
  810. for record in orphaned_message_files:
  811. click.echo(click.style(f" - id: {record['id']}, message_id: {record['message_id']}", fg="black"))
  812. if not force:
  813. click.confirm(
  814. (
  815. f"Do you want to proceed "
  816. f"to delete all {len(orphaned_message_files)} orphaned message_files records?"
  817. ),
  818. abort=True,
  819. )
  820. click.echo(click.style("- Deleting orphaned message_files records", fg="white"))
  821. query = "DELETE FROM message_files WHERE id IN :ids"
  822. with db.engine.begin() as conn:
  823. conn.execute(db.text(query), {"ids": tuple([record["id"] for record in orphaned_message_files])})
  824. click.echo(
  825. click.style(f"Removed {len(orphaned_message_files)} orphaned message_files records.", fg="green")
  826. )
  827. else:
  828. click.echo(click.style("No orphaned message_files records found. There is nothing to delete.", fg="green"))
  829. except Exception as e:
  830. click.echo(click.style(f"Error deleting orphaned message_files records: {str(e)}", fg="red"))
  831. # clean up the orphaned records in the rest of the *_files tables
  832. try:
  833. # fetch file id and keys from each table
  834. all_files_in_tables = []
  835. for files_table in files_tables:
  836. click.echo(click.style(f"- Listing file records in table {files_table['table']}", fg="white"))
  837. query = f"SELECT {files_table['id_column']}, {files_table['key_column']} FROM {files_table['table']}"
  838. with db.engine.begin() as conn:
  839. rs = conn.execute(db.text(query))
  840. for i in rs:
  841. all_files_in_tables.append({"table": files_table["table"], "id": str(i[0]), "key": i[1]})
  842. click.echo(click.style(f"Found {len(all_files_in_tables)} files in tables.", fg="white"))
  843. # fetch referred table and columns
  844. guid_regexp = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"
  845. all_ids_in_tables = []
  846. for ids_table in ids_tables:
  847. query = ""
  848. if ids_table["type"] == "uuid":
  849. click.echo(
  850. click.style(
  851. f"- Listing file ids in column {ids_table['column']} in table {ids_table['table']}", fg="white"
  852. )
  853. )
  854. query = (
  855. f"SELECT {ids_table['column']} FROM {ids_table['table']} WHERE {ids_table['column']} IS NOT NULL"
  856. )
  857. with db.engine.begin() as conn:
  858. rs = conn.execute(db.text(query))
  859. for i in rs:
  860. all_ids_in_tables.append({"table": ids_table["table"], "id": str(i[0])})
  861. elif ids_table["type"] == "text":
  862. click.echo(
  863. click.style(
  864. f"- Listing file-id-like strings in column {ids_table['column']} in table {ids_table['table']}",
  865. fg="white",
  866. )
  867. )
  868. query = (
  869. f"SELECT regexp_matches({ids_table['column']}, '{guid_regexp}', 'g') AS extracted_id "
  870. f"FROM {ids_table['table']}"
  871. )
  872. with db.engine.begin() as conn:
  873. rs = conn.execute(db.text(query))
  874. for i in rs:
  875. for j in i[0]:
  876. all_ids_in_tables.append({"table": ids_table["table"], "id": j})
  877. elif ids_table["type"] == "json":
  878. click.echo(
  879. click.style(
  880. (
  881. f"- Listing file-id-like JSON string in column {ids_table['column']} "
  882. f"in table {ids_table['table']}"
  883. ),
  884. fg="white",
  885. )
  886. )
  887. query = (
  888. f"SELECT regexp_matches({ids_table['column']}::text, '{guid_regexp}', 'g') AS extracted_id "
  889. f"FROM {ids_table['table']}"
  890. )
  891. with db.engine.begin() as conn:
  892. rs = conn.execute(db.text(query))
  893. for i in rs:
  894. for j in i[0]:
  895. all_ids_in_tables.append({"table": ids_table["table"], "id": j})
  896. click.echo(click.style(f"Found {len(all_ids_in_tables)} file ids in tables.", fg="white"))
  897. except Exception as e:
  898. click.echo(click.style(f"Error fetching keys: {str(e)}", fg="red"))
  899. return
  900. # find orphaned files
  901. all_files = [file["id"] for file in all_files_in_tables]
  902. all_ids = [file["id"] for file in all_ids_in_tables]
  903. orphaned_files = list(set(all_files) - set(all_ids))
  904. if not orphaned_files:
  905. click.echo(click.style("No orphaned file records found. There is nothing to delete.", fg="green"))
  906. return
  907. click.echo(click.style(f"Found {len(orphaned_files)} orphaned file records.", fg="white"))
  908. for file in orphaned_files:
  909. click.echo(click.style(f"- orphaned file id: {file}", fg="black"))
  910. if not force:
  911. click.confirm(f"Do you want to proceed to delete all {len(orphaned_files)} orphaned file records?", abort=True)
  912. # delete orphaned records for each file
  913. try:
  914. for files_table in files_tables:
  915. click.echo(click.style(f"- Deleting orphaned file records in table {files_table['table']}", fg="white"))
  916. query = f"DELETE FROM {files_table['table']} WHERE {files_table['id_column']} IN :ids"
  917. with db.engine.begin() as conn:
  918. conn.execute(db.text(query), {"ids": tuple(orphaned_files)})
  919. except Exception as e:
  920. click.echo(click.style(f"Error deleting orphaned file records: {str(e)}", fg="red"))
  921. return
  922. click.echo(click.style(f"Removed {len(orphaned_files)} orphaned file records.", fg="green"))
  923. @click.option("-f", "--force", is_flag=True, help="Skip user confirmation and force the command to execute.")
  924. @click.command("remove-orphaned-files-on-storage", help="Remove orphaned files on the storage.")
  925. def remove_orphaned_files_on_storage(force: bool):
  926. """
  927. Remove orphaned files on the storage.
  928. """
  929. # define tables and columns to process
  930. files_tables = [
  931. {"table": "upload_files", "key_column": "key"},
  932. {"table": "tool_files", "key_column": "file_key"},
  933. ]
  934. storage_paths = ["image_files", "tools", "upload_files"]
  935. # notify user and ask for confirmation
  936. click.echo(click.style("This command will find and remove orphaned files on the storage,", fg="yellow"))
  937. click.echo(
  938. click.style("by comparing the files on the storage with the records in the following tables:", fg="yellow")
  939. )
  940. for files_table in files_tables:
  941. click.echo(click.style(f"- {files_table['table']}", fg="yellow"))
  942. click.echo(click.style("The following paths on the storage will be scanned to find orphaned files:", fg="yellow"))
  943. for storage_path in storage_paths:
  944. click.echo(click.style(f"- {storage_path}", fg="yellow"))
  945. click.echo("")
  946. click.echo(click.style("!!! USE WITH CAUTION !!!", fg="red"))
  947. click.echo(
  948. click.style(
  949. "Currently, this command will work only for opendal based storage (STORAGE_TYPE=opendal).", fg="yellow"
  950. )
  951. )
  952. click.echo(
  953. click.style(
  954. "Since not all patterns have been fully tested, please note that this command may delete unintended files.",
  955. fg="yellow",
  956. )
  957. )
  958. click.echo(
  959. click.style("This cannot be undone. Please make sure to back up your storage before proceeding.", fg="yellow")
  960. )
  961. click.echo(
  962. click.style(
  963. (
  964. "It is also recommended to run this during the maintenance window, "
  965. "as this may cause high load on your instance."
  966. ),
  967. fg="yellow",
  968. )
  969. )
  970. if not force:
  971. click.confirm("Do you want to proceed?", abort=True)
  972. # start the cleanup process
  973. click.echo(click.style("Starting orphaned files cleanup.", fg="white"))
  974. # fetch file id and keys from each table
  975. all_files_in_tables = []
  976. try:
  977. for files_table in files_tables:
  978. click.echo(click.style(f"- Listing files from table {files_table['table']}", fg="white"))
  979. query = f"SELECT {files_table['key_column']} FROM {files_table['table']}"
  980. with db.engine.begin() as conn:
  981. rs = conn.execute(db.text(query))
  982. for i in rs:
  983. all_files_in_tables.append(str(i[0]))
  984. click.echo(click.style(f"Found {len(all_files_in_tables)} files in tables.", fg="white"))
  985. except Exception as e:
  986. click.echo(click.style(f"Error fetching keys: {str(e)}", fg="red"))
  987. all_files_on_storage = []
  988. for storage_path in storage_paths:
  989. try:
  990. click.echo(click.style(f"- Scanning files on storage path {storage_path}", fg="white"))
  991. files = storage.scan(path=storage_path, files=True, directories=False)
  992. all_files_on_storage.extend(files)
  993. except FileNotFoundError as e:
  994. click.echo(click.style(f" -> Skipping path {storage_path} as it does not exist.", fg="yellow"))
  995. continue
  996. except Exception as e:
  997. click.echo(click.style(f" -> Error scanning files on storage path {storage_path}: {str(e)}", fg="red"))
  998. continue
  999. click.echo(click.style(f"Found {len(all_files_on_storage)} files on storage.", fg="white"))
  1000. # find orphaned files
  1001. orphaned_files = list(set(all_files_on_storage) - set(all_files_in_tables))
  1002. if not orphaned_files:
  1003. click.echo(click.style("No orphaned files found. There is nothing to remove.", fg="green"))
  1004. return
  1005. click.echo(click.style(f"Found {len(orphaned_files)} orphaned files.", fg="white"))
  1006. for file in orphaned_files:
  1007. click.echo(click.style(f"- orphaned file: {file}", fg="black"))
  1008. if not force:
  1009. click.confirm(f"Do you want to proceed to remove all {len(orphaned_files)} orphaned files?", abort=True)
  1010. # delete orphaned files
  1011. removed_files = 0
  1012. error_files = 0
  1013. for file in orphaned_files:
  1014. try:
  1015. storage.delete(file)
  1016. removed_files += 1
  1017. click.echo(click.style(f"- Removing orphaned file: {file}", fg="white"))
  1018. except Exception as e:
  1019. error_files += 1
  1020. click.echo(click.style(f"- Error deleting orphaned file {file}: {str(e)}", fg="red"))
  1021. continue
  1022. if error_files == 0:
  1023. click.echo(click.style(f"Removed {removed_files} orphaned files without errors.", fg="green"))
  1024. else:
  1025. click.echo(click.style(f"Removed {removed_files} orphaned files, with {error_files} errors.", fg="yellow"))
  1026. @click.command("setup-system-tool-oauth-client", help="Setup system tool oauth client.")
  1027. @click.option("--provider", prompt=True, help="Provider name")
  1028. @click.option("--client-params", prompt=True, help="Client Params")
  1029. def setup_system_tool_oauth_client(provider, client_params):
  1030. """
  1031. Setup system tool oauth client
  1032. """
  1033. provider_id = ToolProviderID(provider)
  1034. provider_name = provider_id.provider_name
  1035. plugin_id = provider_id.plugin_id
  1036. try:
  1037. # json validate
  1038. click.echo(click.style(f"Validating client params: {client_params}", fg="yellow"))
  1039. client_params_dict = TypeAdapter(dict[str, Any]).validate_json(client_params)
  1040. click.echo(click.style("Client params validated successfully.", fg="green"))
  1041. click.echo(click.style(f"Encrypting client params: {client_params}", fg="yellow"))
  1042. click.echo(click.style(f"Using SECRET_KEY: `{dify_config.SECRET_KEY}`", fg="yellow"))
  1043. oauth_client_params = encrypt_system_oauth_params(client_params_dict)
  1044. click.echo(click.style("Client params encrypted successfully.", fg="green"))
  1045. except Exception as e:
  1046. click.echo(click.style(f"Error parsing client params: {str(e)}", fg="red"))
  1047. return
  1048. deleted_count = (
  1049. db.session.query(ToolOAuthSystemClient)
  1050. .filter_by(
  1051. provider=provider_name,
  1052. plugin_id=plugin_id,
  1053. )
  1054. .delete()
  1055. )
  1056. if deleted_count > 0:
  1057. click.echo(click.style(f"Deleted {deleted_count} existing oauth client params.", fg="yellow"))
  1058. oauth_client = ToolOAuthSystemClient(
  1059. provider=provider_name,
  1060. plugin_id=plugin_id,
  1061. encrypted_oauth_params=oauth_client_params,
  1062. )
  1063. db.session.add(oauth_client)
  1064. db.session.commit()
  1065. click.echo(click.style(f"OAuth client params setup successfully. id: {oauth_client.id}", fg="green"))
  1066. @click.command("setup-datasource-oauth-client", help="Setup datasource oauth client.")
  1067. @click.option("--provider", prompt=True, help="Provider name")
  1068. @click.option("--client-params", prompt=True, help="Client Params")
  1069. def setup_datasource_oauth_client(provider, client_params):
  1070. """
  1071. Setup datasource oauth client
  1072. """
  1073. provider_id = DatasourceProviderID(provider)
  1074. provider_name = provider_id.provider_name
  1075. plugin_id = provider_id.plugin_id
  1076. try:
  1077. # json validate
  1078. click.echo(click.style(f"Validating client params: {client_params}", fg="yellow"))
  1079. client_params_dict = TypeAdapter(dict[str, Any]).validate_json(client_params)
  1080. click.echo(click.style("Client params validated successfully.", fg="green"))
  1081. except Exception as e:
  1082. click.echo(click.style(f"Error parsing client params: {str(e)}", fg="red"))
  1083. return
  1084. click.echo(click.style(f"Ready to delete existing oauth client params: {provider_name}", fg="yellow"))
  1085. deleted_count = (
  1086. db.session.query(DatasourceOauthParamConfig)
  1087. .filter_by(
  1088. provider=provider_name,
  1089. plugin_id=plugin_id,
  1090. )
  1091. .delete()
  1092. )
  1093. if deleted_count > 0:
  1094. click.echo(click.style(f"Deleted {deleted_count} existing oauth client params.", fg="yellow"))
  1095. click.echo(click.style(f"Ready to setup datasource oauth client: {provider_name}", fg="yellow"))
  1096. oauth_client = DatasourceOauthParamConfig(
  1097. provider=provider_name,
  1098. plugin_id=plugin_id,
  1099. system_credentials=client_params_dict,
  1100. )
  1101. db.session.add(oauth_client)
  1102. db.session.commit()
  1103. click.echo(click.style(f"provider: {provider_name}", fg="green"))
  1104. click.echo(click.style(f"plugin_id: {plugin_id}", fg="green"))
  1105. click.echo(click.style(f"params: {json.dumps(client_params_dict, indent=2, ensure_ascii=False)}", fg="green"))
  1106. click.echo(click.style(f"Datasource oauth client setup successfully. id: {oauth_client.id}", fg="green"))