opclawtm 1.4.4 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of opclawtm might be problematic. Click here for more details.
- package/dist/bin/team-manager.js +35 -1
- package/dist/bin/team-setup.js +65 -1
- package/dist/bin/team-uninstall.js +90 -1
- package/dist/cli/commands/agent.command.js +223 -1
- package/dist/cli/commands/checklist.command.js +77 -1
- package/dist/cli/commands/dept.command.js +92 -1
- package/dist/cli/commands/document.command.js +146 -1
- package/dist/cli/commands/domain.command.js +97 -1
- package/dist/cli/commands/feishu.command.js +433 -1
- package/dist/cli/commands/job.command.js +168 -1
- package/dist/cli/commands/license.command.js +68 -1
- package/dist/cli/commands/message-failure.command.js +137 -1
- package/dist/cli/commands/message.command.js +129 -1
- package/dist/cli/commands/node.command.js +251 -1
- package/dist/cli/commands/role-flow.command.js +54 -1
- package/dist/cli/commands/skill-pack.command.js +137 -1
- package/dist/cli/commands/status.command.js +61 -1
- package/dist/cli/commands/task.command.js +402 -1
- package/dist/cli/commands/user.command.js +134 -1
- package/dist/cli/index.js +863 -1
- package/dist/cli/tui/index.js +470 -1
- package/dist/cli/tui/menus/agent-manage.menu.js +614 -1
- package/dist/cli/tui/menus/dept-manage.menu.js +299 -1
- package/dist/cli/tui/menus/domain-manage.menu.js +208 -1
- package/dist/cli/tui/menus/feishu.menu.js +1727 -1
- package/dist/cli/tui/menus/job-manage.menu.js +734 -1
- package/dist/cli/tui/menus/license.menu.js +164 -1
- package/dist/cli/tui/menus/main.menu.js +94 -1
- package/dist/cli/tui/menus/reset.menu.js +767 -1
- package/dist/cli/tui/menus/status.menu.js +123 -1
- package/dist/cli/tui/menus/task-manage.menu.js +129 -1
- package/dist/cli/tui/menus/team-create.menu.js +353 -1
- package/dist/config.js +74 -1
- package/dist/core/auth/index.js +22 -1
- package/dist/core/auth/middleware.js +456 -1
- package/dist/core/auth/storage.js +280 -1
- package/dist/core/models/types.js +9 -1
- package/dist/core/services/agent-template.service.js +88 -1
- package/dist/core/services/agent.service.js +381 -1
- package/dist/core/services/auth-profiles.service.js +220 -1
- package/dist/core/services/checklist.service.js +240 -1
- package/dist/core/services/config-tracker.service.js +1093 -1
- package/dist/core/services/crypto.service.js +377 -1
- package/dist/core/services/dept.service.js +260 -1
- package/dist/core/services/document.service.js +368 -1
- package/dist/core/services/domain.service.js +98 -1
- package/dist/core/services/feishu.service.js +165 -1
- package/dist/core/services/index.js +89 -1
- package/dist/core/services/job.service.js +190 -1
- package/dist/core/services/log.service.js +237 -1
- package/dist/core/services/message-failure.service.js +112 -1
- package/dist/core/services/message.service.js +374 -1
- package/dist/core/services/node.service.js +257 -1
- package/dist/core/services/openclaw-config.service.js +268 -1
- package/dist/core/services/preset-loader.service.js +379 -1
- package/dist/core/services/role-flow.service.js +47 -1
- package/dist/core/services/setup.service.js +336 -1
- package/dist/core/services/skill-pack.service.js +113 -1
- package/dist/core/services/task.service.js +397 -1
- package/dist/core/services/template.service.js +88 -1
- package/dist/core/services/user.service.js +111 -1
- package/dist/core/utils/agent-guide-generator.js +187 -1
- package/dist/core/utils/credentials-cleanup.js +256 -1
- package/dist/core/utils/index.js +462 -1
- package/dist/core/utils/openclaw-helper.js +1632 -1
- package/dist/core/utils/template-generator.js +170 -1
- package/dist/db/index.js +403 -1
- package/dist/db/repositories/agent-template.repo.js +108 -1
- package/dist/db/repositories/agent.repo.js +103 -1
- package/dist/db/repositories/base.repository.js +107 -1
- package/dist/db/repositories/company.repo.js +33 -1
- package/dist/db/repositories/config-change.repo.js +119 -1
- package/dist/db/repositories/dept.repo.js +66 -1
- package/dist/db/repositories/document.repo.js +51 -1
- package/dist/db/repositories/domain.repo.js +79 -1
- package/dist/db/repositories/index.js +81 -1
- package/dist/db/repositories/init-session.repo.js +112 -1
- package/dist/db/repositories/job.repo.js +119 -1
- package/dist/db/repositories/message-failure.repo.js +141 -1
- package/dist/db/repositories/message-log.repo.js +64 -1
- package/dist/db/repositories/node.repo.js +276 -1
- package/dist/db/repositories/role-flow.repo.js +83 -1
- package/dist/db/repositories/skill-pack.repo.js +149 -1
- package/dist/db/repositories/task.repo.js +381 -1
- package/dist/db/repositories/template.repo.js +66 -1
- package/dist/db/repositories/user.repo.js +75 -1
- package/package.json +1 -1
- package/resources/preset-data-hash.enc +1 -1
- package/resources/preset-data.enc +1 -1
|
@@ -1 +1,47 @@
|
|
|
1
|
-
'use strict';(function(_0x1a99a6,_0x11ba24){const _0x1457da={_0x107445:0x35c,_0x5f3efd:0x35d,_0x5b4b1f:'KKxA',_0x4e0a97:0x45a,_0x408c39:0x45a,_0x35794e:'f$Pt',_0x28d3e1:0x36c,_0x12374c:0x476,_0x27935d:'0s*^',_0x5e9976:0x474,_0x42620a:'z6wr',_0x321f8b:'M6wR',_0x1a39f6:0x452,_0x3d3fb1:0x46c,_0x201c91:0x43e,_0x1a0cf9:0x424},_0x4f144b={_0x3e5dcc:0x3d9},_0x2df199={_0x105f4b:0x3dc};function _0x3aa5b1(_0x1a70a6,_0x455f58,_0x121988,_0x24e3b9){return _0x3425(_0x1a70a6- -_0x2df199._0x105f4b,_0x24e3b9);}const _0x572598=_0x1a99a6();function _0x3168d1(_0x1a3fb2,_0x57a7a9,_0x45623c,_0x1982f7){return _0x3425(_0x1a3fb2-_0x4f144b._0x3e5dcc,_0x57a7a9);}while(!![]){try{const _0x278721=-parseInt(_0x3168d1(0x450,'FgsP',0x443,0x437))/(0x69f+-0xc3a+0x2ce*0x2)*(parseInt(_0x3aa5b1(-_0x1457da._0x107445,-0x347,-_0x1457da._0x5f3efd,'xvAZ'))/(0x58d*0x2+-0x6c1+0x65*-0xb))+-parseInt(_0x3168d1(0x472,_0x1457da._0x5b4b1f,_0x1457da._0x4e0a97,0x463))/(-0x1*-0x1777+-0x20e4+0x970)+-parseInt(_0x3168d1(_0x1457da._0x408c39,_0x1457da._0x35794e,0x44c,0x46c))/(-0x1280+-0x9*-0x235+-0x159)+-parseInt(_0x3aa5b1(-0x355,-_0x1457da._0x28d3e1,-0x359,'KKxA'))/(0x2*0xef4+-0x1083+-0xd60)+parseInt(_0x3168d1(_0x1457da._0x12374c,_0x1457da._0x27935d,0x46b,_0x1457da._0x5e9976))/(0x110b+-0x13dd+0x2d8)*(parseInt(_0x3168d1(0x463,_0x1457da._0x42620a,0x480,0x45f))/(-0x1c64+-0x5e1+0x224c))+-parseInt(_0x3168d1(0x448,_0x1457da._0x321f8b,_0x1457da._0x1a39f6,0x44d))/(0x86*0x24+-0x8*0x2ce+-0x1d*-0x20)*(parseInt(_0x3168d1(0x451,'@[A[',_0x1457da._0x3d3fb1,0x45c))/(-0x1a64*0x1+-0x2297+-0x47*-0xdc))+-parseInt(_0x3168d1(0x475,']kHS',0x478,0x477))/(0xd*-0x12b+0x1*0x264b+0xb89*-0x2)*(-parseInt(_0x3168d1(_0x1457da._0x201c91,'zf83',_0x1457da._0x1a0cf9,0x42d))/(-0x121*0x14+-0x39d+0x1a3c));if(_0x278721===_0x11ba24)break;else _0x572598['push'](_0x572598['shift']());}catch(_0x2e9914){_0x572598['push'](_0x572598['shift']());}}}(_0x4846,0xfd18c+-0x7*-0x571f+-0x9fdc8));function _0x531cab(_0x45f59a,_0x287852,_0x402bad,_0x534585){const _0x5d0d66={_0x4c943b:0x169};return _0x3425(_0x287852-_0x5d0d66._0x4c943b,_0x45f59a);}const _0x5d928e={};_0x5d928e[_0x3d70fb(0x1f0,0x1e1,'XlWo',0x1df)]=!![],Object[_0x531cab('Y0Uo',0x1d2,0x1d1,0x1c3)+_0x3d70fb(0x1fd,0x203,'z6wr',0x1ea)](exports,_0x3d70fb(0x217,0x21f,'tlc0',0x20a),_0x5d928e),exports[_0x531cab('ZEUn',0x200,0x1f1,0x20b)+_0x3d70fb(0x222,0x22c,'d0je',0x20c)]=exports[_0x531cab('PSP9',0x1f1,0x1f6,0x1fc)+_0x3d70fb(0x208,0x222,'5pH&',0x1ee)]=void(0x11*0x197+-0x1*0x107a+-0xa8d);function _0x3425(_0x5874f3,_0x5b2fcd){_0x5874f3=_0x5874f3-(0x1*0x3c9+0xfcb+0x665*-0x3);const _0x3b20ab=_0x4846();let _0x52cae7=_0x3b20ab[_0x5874f3];if(_0x3425['DbMGsu']===undefined){var _0x592166=function(_0x2bcfa0){const _0x367b6b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5e0858='',_0x5f1b79='';for(let _0x1d929a=0x9*0x205+-0xe4*0x16+0x3*0x79,_0x207b3f,_0x88ad6f,_0x1c0a4f=0xa1a+-0xa5a+0x40;_0x88ad6f=_0x2bcfa0['charAt'](_0x1c0a4f++);~_0x88ad6f&&(_0x207b3f=_0x1d929a%(-0x5*0xbf+-0x28*0x82+-0x3*-0x805)?_0x207b3f*(-0x1fbc+0xe*-0x15e+0x20*0x199)+_0x88ad6f:_0x88ad6f,_0x1d929a++%(-0x8f8+0x35*0x97+-0x1647))?_0x5e0858+=String['fromCharCode'](0x3d*-0x25+0x2194+-0x4*0x5f1&_0x207b3f>>(-(0x4a*0x83+-0x1afd*-0x1+-0x1*0x40d9)*_0x1d929a&-0xb*0x355+-0x7*0x140+0x2d6d)):0x1*-0x777+0x22aa+-0x1b33){_0x88ad6f=_0x367b6b['indexOf'](_0x88ad6f);}for(let _0x414060=0x1*0x152e+-0x668+-0xec6,_0x5c212a=_0x5e0858['length'];_0x414060<_0x5c212a;_0x414060++){_0x5f1b79+='%'+('00'+_0x5e0858['charCodeAt'](_0x414060)['toString'](-0x1bcb+-0xf46+0x2b21))['slice'](-(-0xf90+0x47*0x8b+-0x16fb));}return decodeURIComponent(_0x5f1b79);};const _0x5d471f=function(_0x4272ce,_0x14a71b){let _0x1923c6=[],_0x1b20ab=0xff2+0x96b*-0x4+0x15ba,_0x4138bb,_0x569849='';_0x4272ce=_0x592166(_0x4272ce);let _0x18bbab;for(_0x18bbab=-0x1*0x2202+-0x17e4+0x39e6;_0x18bbab<-0x193c+-0x3*-0x9f7+-0x1*0x3a9;_0x18bbab++){_0x1923c6[_0x18bbab]=_0x18bbab;}for(_0x18bbab=-0x2179+-0x1623*-0x1+0xb56;_0x18bbab<-0x1c2e+0x2688+-0x95a;_0x18bbab++){_0x1b20ab=(_0x1b20ab+_0x1923c6[_0x18bbab]+_0x14a71b['charCodeAt'](_0x18bbab%_0x14a71b['length']))%(-0x1a18+-0xd*0x2bb+0x6d*0x93),_0x4138bb=_0x1923c6[_0x18bbab],_0x1923c6[_0x18bbab]=_0x1923c6[_0x1b20ab],_0x1923c6[_0x1b20ab]=_0x4138bb;}_0x18bbab=0x2*0xbcb+-0xa54+-0xd42,_0x1b20ab=0x4e4*-0x5+-0x1073+0x25*0x11b;for(let _0x10deec=0x701+-0x251+-0x4b0;_0x10deec<_0x4272ce['length'];_0x10deec++){_0x18bbab=(_0x18bbab+(-0xb8f+-0x13*-0xd3+-0x419))%(-0x20b*-0xe+-0x5c9+-0x15d1),_0x1b20ab=(_0x1b20ab+_0x1923c6[_0x18bbab])%(0x1a+0x1650+-0x156a*0x1),_0x4138bb=_0x1923c6[_0x18bbab],_0x1923c6[_0x18bbab]=_0x1923c6[_0x1b20ab],_0x1923c6[_0x1b20ab]=_0x4138bb,_0x569849+=String['fromCharCode'](_0x4272ce['charCodeAt'](_0x10deec)^_0x1923c6[(_0x1923c6[_0x18bbab]+_0x1923c6[_0x1b20ab])%(-0x2361+-0xe5+0x2546)]);}return _0x569849;};_0x3425['CEGoxA']=_0x5d471f,_0x3425['kfVHGt']={},_0x3425['DbMGsu']=!![];}const _0xdcc84c=_0x3b20ab[0x1f26*-0x1+-0x337*0x7+-0x29*-0x14f],_0x2eab26=_0x5874f3+_0xdcc84c,_0x4b87f9=_0x3425['kfVHGt'][_0x2eab26];return!_0x4b87f9?(_0x3425['IRhkyd']===undefined&&(_0x3425['IRhkyd']=!![]),_0x52cae7=_0x3425['CEGoxA'](_0x52cae7,_0x5b2fcd),_0x3425['kfVHGt'][_0x2eab26]=_0x52cae7):_0x52cae7=_0x4b87f9,_0x52cae7;}const role_flow_repo_1=require(_0x3d70fb(0x228,0x21f,'FgsP',0x213)+_0x531cab('PSP9',0x208,0x20a,0x1ef)+'s/role-flo'+_0x3d70fb(0x20c,0x20a,'sMGu',0x228)),crypto_service_1=require('./crypto.s'+_0x531cab('f$Pt',0x1f5,0x1e3,0x1e6));function _0x4846(){const _0xb44b87=['WRBdRSkpaG','W7tdISo8W6BdPCoGW60','WP3dPvRdSuRcIXJcKqddPa','dc3cHeddMW9gWOG','dhCWtwddIWuxWOXOW4BcRa','gmoMvH5bWP4ZWOdcHa','W6ddTSoSWR8IWO1VE8kvW5S','hY3cMv3dIG5a','rCoSWPxdKsdcI0pdKq','Cmk0AmkWW6OlWPyzW6i','EXtdPLtcSCkwoqa9','j8kWWPpdV8ke','W5/cVCozhSo2W718WO3cUmodWP3cRmo4','rCozW4lcG27dOMu','W5ZcUadcOdRdKehcGsJdTstdOrW','WRFcVSoFW63dTmo2','d8kYW5/cImojoJNcPW','WQxdGSo9W6pdOa','WQBdUCodW6ZdHCo1W7e','WPFcH1dcO8k8DCoXW4RdMaS','W4tdLWpdICkHrLaJWQS7W6xcUsm','F8knWQjrpKddRxfhW6S','WQzYCcmFxWy','W6lcQmolm8kvC8ooW5r3','w8k8ctbPWQa6WPxcO1y','WORdUeddVw/cGG','itxdGmk/W7C8m8k+ySo0','WQtcIL/cMCouha8AWOSZ','WOzohdhcOWjf','wWeHgHdcP2LH','vJfhgJlcIs0jWPT4','bCkGW6hcT8odltxcTui','BmkxWQVcN8okemk8W7ldJ8ofW6S','ff4SbX4','hCoQW6dcMu7dT3K','aCoNWPO','W5BcLY3dGGBcQwWVxmk6','WQG4WRxdQrq','W4FdNqxdImkHqvCQWReJW7BcKGm','t8k6cZfTWRuhWO3cNvy','WRJdUmo3W7RdOq','bmkjySknkt11W7SXW6LAW50f','W7FcTmk8oMJcItCEWP7dPmks','ewWTwN/dLdaBW4bV','smksWQfhevJdRxr9W6S','s3xcOeBdHaPcWQG','W4azWP4kW48','d1Kyar7cO2S','fmoaW7mLWOq9W5hdGSoayG','oSolW7RdHSksoSkiW4VdTmod','W6T6W6ZdGJRcJCoFkCoo','rdZdR8oVW5hdJGpcO3q','sxldGrVcMLqeWPbyW49XW4NcNW','emokxmkZoCk7WOu','WPFcNLxcPCkF','xSkYW57dTYpdJCo7W5nvdb5b','W5FdMGZdS8ojl8kUW7pdUamcp8oz','WQhdQmoOEcFcTICgWRpdVa','WQ7dSmkeCmonW6RcSZvlsmocu8oc'];_0x4846=function(){return _0xb44b87;};return _0x4846();}function _0x3d70fb(_0x269a3e,_0x145d73,_0x1a2060,_0x72eba4){const _0x31fdd3={_0x134e35:0x18a};return _0x3425(_0x269a3e-_0x31fdd3._0x134e35,_0x1a2060);}class RoleFlowService{[_0x531cab('(BKb',0x1d1,0x1d2,0x1c7)+'w'](_0x367b6b){const _0x119ad7={_0x551de4:0x35b,_0x47a1a2:0x345,_0x233166:0x349,_0x34f743:0x375,_0x3e7ee7:0x268,_0x1f4a99:0x234,_0x15a9e0:0x24d,_0x3094a7:'FgsP',_0x385550:0x360,_0x3ead75:0x363,_0x3f5172:'QWP2',_0x5c7c81:0x23a,_0x3f2db6:'0s*^',_0x2d5250:0x35b,_0x336005:0x356,_0x3d4b52:0x33e,_0x288141:0x35b,_0x3f76ac:0x32c},_0x2ebf97={_0x3296d6:0x68},_0x52177d={_0x51b4ef:0x16e,_0x1ae788:0x4c,_0x2bedeb:0x6b},_0x5e0858={};_0x5e0858[_0x2f8617(_0x119ad7._0x551de4,_0x119ad7._0x47a1a2,_0x119ad7._0x233166,'sMGu')]=function(_0x207b3f,_0x88ad6f){return _0x207b3f===_0x88ad6f;};function _0x2f8617(_0xf321a3,_0x34f057,_0x469957,_0x3f312c){return _0x531cab(_0x3f312c,_0xf321a3-_0x52177d._0x51b4ef,_0x469957-_0x52177d._0x1ae788,_0x3f312c-_0x52177d._0x2bedeb);}const _0x5f1b79=_0x5e0858,_0x1d929a=role_flow_repo_1[_0x1c3582(0x24b,0x23b,0x246,'f$Pt')+'pository'][_0x2f8617(0x371,_0x119ad7._0x34f743,0x363,'@[A[')](_0x367b6b);if(!_0x1d929a)return null;if(_0x5f1b79['eRPkd'](_0x1d929a[_0x1c3582(_0x119ad7._0x3e7ee7,_0x119ad7._0x1f4a99,_0x119ad7._0x15a9e0,'@1n(')],-0x136d*0x1+-0xb*0x10d+0x1efd)&&(-0x20b*-0xe+-0x5c9+-0x16d1,crypto_service_1[_0x2f8617(0x368,0x375,0x371,_0x119ad7._0x3094a7)+'d'])(_0x1d929a[_0x2f8617(_0x119ad7._0x385550,_0x119ad7._0x3ead75,0x367,_0x119ad7._0x3f5172)])){const _0x1c0a4f=(0x1a+0x1650+-0xb35*0x2,crypto_service_1[_0x1c3582(_0x119ad7._0x5c7c81,0x23b,0x242,_0x119ad7._0x3f2db6)+'c'])(_0x1d929a[_0x2f8617(0x366,_0x119ad7._0x2d5250,_0x119ad7._0x336005,'YSgO')]),_0x414060={..._0x1d929a};return _0x414060[_0x2f8617(_0x119ad7._0x3d4b52,_0x119ad7._0x288141,_0x119ad7._0x3f76ac,'3Gxg')]=_0x1c0a4f,_0x414060;}function _0x1c3582(_0x575a2b,_0x176d7c,_0x9c97c2,_0x10db99){return _0x3d70fb(_0x9c97c2-0x47,_0x176d7c-_0x2ebf97._0x3296d6,_0x10db99,_0x10db99-0x7c);}return _0x1d929a;}[_0x531cab('xvAZ',0x1fe,0x1e3,0x1f8)](){const _0x15c1bb={_0x36df23:0x46d,_0x5a6ec7:0x59,_0x5014c6:'@[A[',_0x2798de:0x4d,_0x8762fc:0x45,_0x126821:'zf83',_0x15efac:0x63},_0x2931b9={_0x421180:'3Gxg',_0x2a3cab:0x31,_0x2a4f44:'6p%l',_0x316149:0x189,_0x4f4a19:0x191,_0x3ab175:'FgsP',_0x2a6f99:0x42,_0x840f54:0x2e,_0x48495d:0x187,_0x4fea9a:'YSgO',_0x2a5fb5:0x32,_0x49f3e8:'Gn%n',_0x2345a0:0x13,_0x10fb86:0xa,_0x52fbed:0x3},_0x16e3fc={_0x23c028:0xcd,_0xcf0daa:0x1bb,_0x5f361f:0x1f6},_0x902715={_0x279e0b:0x242,_0x52433d:0xf7},_0x5c212a={};function _0x5f0437(_0xc5ab32,_0x526d38,_0x58ff77,_0x4be924){return _0x3d70fb(_0x4be924- -0x25a,_0x526d38-0x156,_0x526d38,_0x4be924-0xd1);}_0x5c212a[_0x3e656(0x467,0x480,_0x15c1bb._0x36df23,'sMGu')]=function(_0x1923c6,_0x1b20ab){return _0x1923c6===_0x1b20ab;};const _0x4272ce=_0x5c212a;function _0x3e656(_0x2d747d,_0x53e781,_0x44edac,_0x4c4b89){return _0x3d70fb(_0x2d747d-_0x902715._0x279e0b,_0x53e781-_0x902715._0x52433d,_0x4c4b89,_0x4c4b89-0xa8);}const _0x14a71b=role_flow_repo_1[_0x5f0437(-_0x15c1bb._0x5a6ec7,_0x15c1bb._0x5014c6,-_0x15c1bb._0x2798de,-_0x15c1bb._0x8762fc)+_0x3e656(0x442,0x44e,0x436,_0x15c1bb._0x126821)][_0x5f0437(-_0x15c1bb._0x15efac,'sMGu',-0x3e,-0x4b)]();return _0x14a71b[_0x3e656(0x462,0x45b,0x470,'M6wR')](_0x4138bb=>{const _0x3bf786={_0x2186c3:0x42f,_0x3a51eb:0xb3};if(_0x4272ce[_0xe36d70(_0x2931b9._0x421180,0x2c,_0x2931b9._0x2a3cab,0x1a)](_0x4138bb[_0x3487dd(0x185,_0x2931b9._0x2a4f44,_0x2931b9._0x316149,_0x2931b9._0x4f4a19)],-0x1776+-0x1db8+0x352f)&&(-0x1f9*-0xb+-0x26*-0x106+0x3c97*-0x1,crypto_service_1[_0xe36d70(_0x2931b9._0x3ab175,_0x2931b9._0x2a6f99,_0x2931b9._0x840f54,0x29)+'d'])(_0x4138bb[_0x3487dd(0x1bc,'zf83',_0x2931b9._0x48495d,0x1a0)])){const _0x569849=(-0x95f*-0x1+0x1cc3+0x2622*-0x1,crypto_service_1['decryptSyn'+'c'])(_0x4138bb[_0xe36d70(_0x2931b9._0x4fea9a,0x21,0x2c,_0x2931b9._0x2a5fb5)]),_0x18bbab={..._0x4138bb};return _0x18bbab[_0xe36d70(_0x2931b9._0x49f3e8,-_0x2931b9._0x2345a0,_0x2931b9._0x10fb86,_0x2931b9._0x52fbed)]=_0x569849,_0x18bbab;}function _0x3487dd(_0x210eb8,_0x347c60,_0x18917d,_0x2c20f5){return _0x5f0437(_0x210eb8-_0x16e3fc._0x23c028,_0x347c60,_0x18917d-_0x16e3fc._0xcf0daa,_0x2c20f5-_0x16e3fc._0x5f361f);}function _0xe36d70(_0x554f97,_0x15a3cc,_0x23debb,_0x4906e8){return _0x3e656(_0x23debb- -_0x3bf786._0x2186c3,_0x15a3cc-_0x3bf786._0x3a51eb,_0x23debb-0x190,_0x554f97);}return _0x4138bb;});}[_0x531cab('pm#U',0x1fb,0x1ec,0x1e8)](_0x10deec){const _0x2f5161={_0x12f8b6:'kMgM',_0x1b2715:0x23b,_0x19e06d:0x234,_0x13bbf5:0x21a,_0x14cb91:0x5e,_0x51ac1a:0x2b,_0x13aa56:'pm#U',_0x47d2df:0x223},_0x426dfa={_0x5d102c:0x1c1},_0x3ca299={_0x509dbd:0x12a,_0x302cff:0x11a};function _0x20e3fb(_0x225cc2,_0x2780e0,_0x14d999,_0x3ae7fb){return _0x3d70fb(_0x14d999- -0x437,_0x2780e0-_0x3ca299._0x509dbd,_0x225cc2,_0x3ae7fb-_0x3ca299._0x302cff);}function _0x62bb8f(_0x1495e3,_0x527993,_0xb02d41,_0x50bb8b){return _0x3d70fb(_0x1495e3- -_0x426dfa._0x5d102c,_0x527993-0x1ee,_0x50bb8b,_0x50bb8b-0xf5);}return!role_flow_repo_1[_0x20e3fb(_0x2f5161._0x12f8b6,-_0x2f5161._0x1b2715,-_0x2f5161._0x19e06d,-_0x2f5161._0x13bbf5)+_0x62bb8f(0x44,_0x2f5161._0x14cb91,_0x2f5161._0x51ac1a,'fsT&')][_0x20e3fb(_0x2f5161._0x13aa56,-0x223,-0x22a,-_0x2f5161._0x47d2df)](_0x10deec);}}exports[_0x3d70fb(0x218,0x22f,'KKxA',0x22d)+_0x531cab('5pH&',0x1e7,0x1d9,0x1e0)]=RoleFlowService,exports[_0x3d70fb(0x210,0x1fd,'Fz3v',0x20e)+_0x531cab('Fz3v',0x1d7,0x1dc,0x1c6)]=new RoleFlowService();
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 角色约束流程服务
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.roleFlowService = exports.RoleFlowService = void 0;
|
|
7
|
+
const role_flow_repo_1 = require("../../db/repositories/role-flow.repo");
|
|
8
|
+
const crypto_service_1 = require("./crypto.service");
|
|
9
|
+
class RoleFlowService {
|
|
10
|
+
/**
|
|
11
|
+
* 获取角色流程(自动解密预置数据)
|
|
12
|
+
* v1.1.7: 新增 assistant 支持
|
|
13
|
+
*/
|
|
14
|
+
getRoleFlow(role) {
|
|
15
|
+
const flow = role_flow_repo_1.roleFlowRepository.findByRole(role);
|
|
16
|
+
if (!flow)
|
|
17
|
+
return null;
|
|
18
|
+
// 如果是预置数据且已加密,解密后返回
|
|
19
|
+
if (flow.is_preset === 1 && (0, crypto_service_1.isEncrypted)(flow.content)) {
|
|
20
|
+
const decryptedContent = (0, crypto_service_1.decryptSync)(flow.content);
|
|
21
|
+
return { ...flow, content: decryptedContent };
|
|
22
|
+
}
|
|
23
|
+
return flow;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 获取所有角色流程
|
|
27
|
+
*/
|
|
28
|
+
listAll() {
|
|
29
|
+
const flows = role_flow_repo_1.roleFlowRepository.findAll();
|
|
30
|
+
return flows.map(flow => {
|
|
31
|
+
if (flow.is_preset === 1 && (0, crypto_service_1.isEncrypted)(flow.content)) {
|
|
32
|
+
const decryptedContent = (0, crypto_service_1.decryptSync)(flow.content);
|
|
33
|
+
return { ...flow, content: decryptedContent };
|
|
34
|
+
}
|
|
35
|
+
return flow;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* 检查是否可以修改
|
|
40
|
+
*/
|
|
41
|
+
canModify(id) {
|
|
42
|
+
return !role_flow_repo_1.roleFlowRepository.isPreset(id);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.RoleFlowService = RoleFlowService;
|
|
46
|
+
exports.roleFlowService = new RoleFlowService();
|
|
47
|
+
//# sourceMappingURL=role-flow.service.js.map
|