opclawtm-cli 1.3.5 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +358 -1
- package/dist/cli/tui/menus/domain-manage.menu.js +208 -1
- package/dist/cli/tui/menus/feishu.menu.js +1704 -1
- package/dist/cli/tui/menus/feishu.menu.js.map +1 -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.d.ts +1 -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 +1585 -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(_0x10a70a,_0x2380dc){const _0x2f90b8={_0x151035:'CCJ^',_0x35a149:0x6,_0x4d7e0d:0x35,_0x4fab1d:'!bJQ',_0x595363:0x2b,_0x43ee1f:0x2f,_0x476476:0x1a,_0x17cc09:')#Tv',_0x47afc8:0x2a,_0x232e8e:'qQJe',_0x267073:0x3ff,_0x3765ed:0x3ea,_0x4ceb03:0x46,_0x38bd1f:0x32,_0xfdc3e5:0x3d1},_0xe0056a=_0x10a70a();function _0x546edb(_0x40919b,_0x2d3a70,_0x198337,_0x3a0074){return _0x1d3e(_0x198337-0x2d7,_0x2d3a70);}function _0x40d322(_0x13af0f,_0x5b9195,_0x1ba5d7,_0x35f78a){return _0x1d3e(_0x5b9195- -0x107,_0x1ba5d7);}while(!![]){try{const _0x197c76=parseInt(_0x40d322(-0x20,0x6,_0x2f90b8._0x151035,-_0x2f90b8._0x35a149))/(-0x2689*0x1+-0x5cf*0x1+-0x2c59*-0x1)+parseInt(_0x40d322(0x19,_0x2f90b8._0x4d7e0d,_0x2f90b8._0x4fab1d,_0x2f90b8._0x595363))/(-0x1*0x1151+0x2279+-0x1126)+parseInt(_0x40d322(0x33,_0x2f90b8._0x43ee1f,'XRWs',_0x2f90b8._0x476476))/(0x21ec+-0x2081+-0x1e*0xc)+-parseInt(_0x40d322(0x0,0x5,_0x2f90b8._0x17cc09,_0x2f90b8._0x47afc8))/(0xd22+0x255f+-0x327d)*(-parseInt(_0x546edb(0x427,_0x2f90b8._0x232e8e,_0x2f90b8._0x267073,_0x2f90b8._0x3765ed))/(0x1bf4+0xd*-0x1c3+0x142*-0x4))+parseInt(_0x546edb(0x3c1,'KTFA',0x3e2,0x3eb))/(0xc9f*-0x1+-0x19df+0x2684)+parseInt(_0x40d322(_0x2f90b8._0x4ceb03,0x49,'bgZ!',0x57))/(-0x1c90*0x1+0x1*-0x16cd+0x3364)*(parseInt(_0x40d322(0x4d,_0x2f90b8._0x38bd1f,'QdhV',0x6))/(0x3*0xbb9+-0x1*0x22d8+-0x4b))+-parseInt(_0x546edb(_0x2f90b8._0xfdc3e5,'YIh)',0x3f6,0x400))/(-0x47*0x2b+0x1*0x4a3+0x753);if(_0x197c76===_0x2380dc)break;else _0xe0056a['push'](_0xe0056a['shift']());}catch(_0x394595){_0xe0056a['push'](_0xe0056a['shift']());}}}(_0x111d,0x1953*0x35+0x161ef*-0x4+0x3c847*0x1));function _0x1d3e(_0x136c15,_0x270ae6){_0x136c15=_0x136c15-(-0xe12+-0x34d+0x1268);const _0x3708b0=_0x111d();let _0x4f9b79=_0x3708b0[_0x136c15];if(_0x1d3e['prijyb']===undefined){var _0xd48274=function(_0x30688c){const _0x240f65='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xf36196='',_0x39195d='';for(let _0x571aba=-0x24a5+-0x9d*0x1+-0x1*-0x2542,_0x3cba43,_0x471a96,_0x5d5449=-0x23*-0x31+0x1099*-0x1+0x9e6;_0x471a96=_0x30688c['charAt'](_0x5d5449++);~_0x471a96&&(_0x3cba43=_0x571aba%(-0x1aea+0x1221+0x2ef*0x3)?_0x3cba43*(-0x1b*-0xdc+-0x8bf*-0x1+-0x657*0x5)+_0x471a96:_0x471a96,_0x571aba++%(-0x1*0x13cf+0x926+0x1*0xaad))?_0xf36196+=String['fromCharCode'](-0xe5c+-0xe73+0x1dce&_0x3cba43>>(-(-0x449+0x2125+-0x6*0x4cf)*_0x571aba&-0xc6e+0xb*0x282+0x1*-0xf22)):0xf22+0x2*-0x633+-0xa*0x46){_0x471a96=_0x240f65['indexOf'](_0x471a96);}for(let _0x24b15e=0x1*-0x1e9e+0xe8f*-0x1+0x2d2d,_0x1a5d25=_0xf36196['length'];_0x24b15e<_0x1a5d25;_0x24b15e++){_0x39195d+='%'+('00'+_0xf36196['charCodeAt'](_0x24b15e)['toString'](-0x5*0x295+0x2a3*-0x1+0xf9c))['slice'](-(0x4*-0x5f1+-0x163c+0x2e02));}return decodeURIComponent(_0x39195d);};const _0x1c19d3=function(_0x1b0322,_0x4a0c3b){let _0x29fc3a=[],_0x22c22d=-0x1cf9+0x19ea+0x30f,_0x4cbc20,_0x371bf9='';_0x1b0322=_0xd48274(_0x1b0322);let _0x512e60;for(_0x512e60=0x1e*-0x1+0xa2c+-0xa0e;_0x512e60<0x3*0xae8+-0x1e1b+-0x19d;_0x512e60++){_0x29fc3a[_0x512e60]=_0x512e60;}for(_0x512e60=-0x1*-0x1ea5+-0x899+0xa6*-0x22;_0x512e60<-0x19d1+-0xa0*0xd+0x22f1;_0x512e60++){_0x22c22d=(_0x22c22d+_0x29fc3a[_0x512e60]+_0x4a0c3b['charCodeAt'](_0x512e60%_0x4a0c3b['length']))%(-0x1c18+0xae3*0x1+0x1235),_0x4cbc20=_0x29fc3a[_0x512e60],_0x29fc3a[_0x512e60]=_0x29fc3a[_0x22c22d],_0x29fc3a[_0x22c22d]=_0x4cbc20;}_0x512e60=-0xd0b+-0x3f5+0x80*0x22,_0x22c22d=0x190c+0x935*-0x1+-0xfd7;for(let _0x19f4d1=0x117*-0x1f+0x6*0x79+-0x1*-0x1ef3;_0x19f4d1<_0x1b0322['length'];_0x19f4d1++){_0x512e60=(_0x512e60+(-0xc9b*0x3+0xa55+0x1*0x1b7d))%(-0x29*-0x17+-0x6*0x392+0x7b*0x27),_0x22c22d=(_0x22c22d+_0x29fc3a[_0x512e60])%(0xb*-0x120+-0xf5+-0x1*-0xe55),_0x4cbc20=_0x29fc3a[_0x512e60],_0x29fc3a[_0x512e60]=_0x29fc3a[_0x22c22d],_0x29fc3a[_0x22c22d]=_0x4cbc20,_0x371bf9+=String['fromCharCode'](_0x1b0322['charCodeAt'](_0x19f4d1)^_0x29fc3a[(_0x29fc3a[_0x512e60]+_0x29fc3a[_0x22c22d])%(-0x1345*-0x2+-0xa03+-0x1b87)]);}return _0x371bf9;};_0x1d3e['hKpSNh']=_0x1c19d3,_0x1d3e['lfySqg']={},_0x1d3e['prijyb']=!![];}const _0x3c473d=_0x3708b0[-0x33d+0xaa7+-0x1*0x76a],_0x28c38d=_0x136c15+_0x3c473d,_0x4ed6d5=_0x1d3e['lfySqg'][_0x28c38d];return!_0x4ed6d5?(_0x1d3e['LTeSNP']===undefined&&(_0x1d3e['LTeSNP']=!![]),_0x4f9b79=_0x1d3e['hKpSNh'](_0x4f9b79,_0x270ae6),_0x1d3e['lfySqg'][_0x28c38d]=_0x4f9b79):_0x4f9b79=_0x4ed6d5,_0x4f9b79;}const _0x3f4c8e={};_0x3f4c8e[_0x128977('BoLd',0x333,0x34f,0x329)]=!![],Object[_0x46f976(0x391,0x394,0x36a,'nAfc')+_0x46f976(0x2fc,0x348,0x31e,'T*dy')](exports,_0x128977('lzaj',0x373,0x365,0x356),_0x3f4c8e),exports[_0x46f976(0x341,0x34e,0x332,'Q!kh')+_0x128977('&nYE',0x35f,0x339,0x336)]=exports[_0x46f976(0x30e,0x356,0x32e,'gmQG')+_0x46f976(0x337,0x306,0x31d,'T*dy')]=void(-0x224+0x831+-0x60d);function _0x111d(){const _0x391511=['W63cJmo9iCkufmkMW4iIW7G','W63dMaLiyG','W7VdSKpcM8oTWQpdMq7cTSkE','WRRcOSkCW7rnW5NdTq','W5X2z8kdWQNcJ8kxW5fgW7W','W4JcVCovW5ddSG','mKu2iSkJgWldICoRkq','fNa/DrVdSuZdNdPUWPVdT38','W6ldNCkQaSoOWRHT','WOFcVSkOWOXw','hmkEW5dcIMv4pG','e8kyW43cIKf6jG','W5VdSKpcM8oTWQpdMq7cTSkE','WRTTlXeEkJK','WQX+hSo8WQW','W7xcM2hcP8oS','WRr/j8kpxfhdQM0','WOfJc3Of','n1ddGSocWRe','mw7dMCocWRpdLSoPj8kr','WPapqczg','WPj7lu0YWODpW7i','W4DohWqH','sSk7x8ojxa','kvKfn8kxeH7dM8om','W71Vtmo7ygr0m8k0bG','vmoqbCoYdCoTbMW','WQLNevOrWPHfW7ezra','bCkZWQhdQSoSW7mhAa','W4S8DSkEWRZcMSooW6rtW70','jSoCffyuzG0jWRZcSSkpW48','W6NdLHnIFq','W6TeF8kaW4NcGmokWRnCeW','fGvrivRdHmkdWQhdLG','b8oAW6tcGde','W4PqxCkqWRS','W6mJwSkoW4X6W75iWOPfEW','W4hcISohjSkc','W5CPomo8WRRcMHNcPLpcUG','W6yLhSkYveNdPa','WPHNe0SYWPPE','uc3dPLhcP1S','W4tcNqr4vCkmvhrZW7i','WOFdUYVdPCkujSouW4/dI8oMW6DBkq','eCocWOmrhq','pSoNWQeRcsTyvLVcMa','uSoVWPJdH8oaW6Kr','fwVdJ8oQWQy','qCodWPVdIHaSbYhdQetcSeu','WOLNevOrWPHfW7eyra','WOX7lxOe','W5pcUmo5W53dTmoEW5ZcLmk2oG','W7FdLtZcJ8ogA8kvW5akWPa','aSoxWQOSisPi','W5eYfmkeyG','W7PeFCkrW6RcGSor','WOddVsVdPCktsCkIW57dQmoqW4W','fSoFWPy7kq','W5lcQN3cKmoiDCkjW7hdSa','xSozWOZdKaO7nG7cGu8','W6pdNYZcLmolDmktW7O','BZD3aK4','W5lcLW50FCkfA3foW6C','jSokW7JcMZ3dNsqmtSkR','W4TlbIyGtdD4W4JcRa','W4ldJLv8WOe','W7ZdGq5FySonsW','dmkpWP1ar1BcQfFdKSkR','W5vYDa','odv0xctcKCkP','W6WYEu1RhHDIrbXI','W6LeymkmW7VcG8oxWR0','WQVcU8kBW6nn','WRZcV8kgW7K','WRRdHdLbW7n2WQamDLxcI8oG','AsJcTmkcW7pcI8oGmSkbDCkQgq','jc1NnmkFW77dVw9DtCkTW4y','b8orWQO8bJ1UtfVcMa','WRJcGCoWtSk6W6rBzColqgWl','cmolWOe2jZzfu0pcMa','sSktW69WWPu','o3ldQmogWQtdNCoU','uI9Rkg7cQHFdSYP+','WRjZsmoYbHddT3pcKxOCea','W6BcLL7cRmoeWOC','W5NcVYXTyW','r8oqgmoVhmoSaa'];_0x111d=function(){return _0x391511;};return _0x111d();}function _0x128977(_0x5006d6,_0x1004d1,_0x2c83ba,_0x23d5ad){const _0x43a8e1={_0x528de1:0x220};return _0x1d3e(_0x2c83ba-_0x43a8e1._0x528de1,_0x5006d6);}const role_flow_repo_1=require(_0x46f976(0x34a,0x38a,0x367,'2a93')+_0x128977('IX[$',0x35d,0x378,0x374)+_0x128977('Vf*b',0x329,0x355,0x347)+_0x128977('aBvn',0x38b,0x361,0x33d)),crypto_service_1=require('./crypto.s'+_0x128977('KvlR',0x32e,0x335,0x31a));class RoleFlowService{[_0x46f976(0x336,0x37c,0x352,'9AwM')+'w'](_0xc6829c){const _0x3151d9={_0x156c96:0x1e6,_0x2e5f62:0x21a,_0x46bde4:0x242,_0x530210:'I%Lj',_0xac853b:0x41f,_0x5e5355:'lzaj',_0x226b33:0x46e,_0x3f1d88:0x442,_0x50b0f5:0x42c,_0x547d61:']BOP',_0x404bc1:0x409,_0x20641e:')#Tv'},_0x22e358={_0xcea457:0x4f,_0x2493ec:0xfd},_0x1ef3cd={_0x516cc0:0x4a},_0x4cd188={};function _0x3a6519(_0x3d979c,_0x1fb16c,_0x3536e0,_0x5cdaec){return _0x46f976(_0x3d979c-0x70,_0x1fb16c-_0x1ef3cd._0x516cc0,_0x1fb16c- -0x53c,_0x3d979c);}_0x4cd188[_0x5de423(0x43f,0x45b,'IX[$',0x44d)]=function(_0x30b7ac,_0x484886){return _0x30b7ac===_0x484886;};const _0x1b2fb1=_0x4cd188,_0x57b043=role_flow_repo_1[_0x3a6519('nAfc',-_0x3151d9._0x156c96,-0x1cf,-0x1c4)+_0x3a6519(')^%j',-0x1d4,-0x1c4,-0x1d8)][_0x3a6519('lzaj',-_0x3151d9._0x2e5f62,-_0x3151d9._0x46bde4,-0x1fa)](_0xc6829c);if(!_0x57b043)return null;if(_0x1b2fb1[_0x5de423(0x422,0x445,_0x3151d9._0x530210,_0x3151d9._0xac853b)](_0x57b043['is_preset'],-0x1603+0x9a2+0x1*0xc62)&&(0x2*0x1f5+0x34*-0xb5+0x20da,crypto_service_1[_0x3a6519(_0x3151d9._0x5e5355,-0x218,-0x22c,-0x20a)+'d'])(_0x57b043[_0x5de423(_0x3151d9._0x226b33,0x45a,'9ELj',0x47f)])){const _0x2af0ac=(-0x13b+-0x18b*0x9+-0x2b*-0x5a,crypto_service_1[_0x5de423(_0x3151d9._0x3f1d88,_0x3151d9._0x50b0f5,_0x3151d9._0x547d61,0x420)+'c'])(_0x57b043[_0x5de423(0x423,_0x3151d9._0x404bc1,_0x3151d9._0x20641e,0x43f)]),_0x197c79={..._0x57b043};return _0x197c79[_0x5de423(0x451,0x46d,'XiUT',0x46f)]=_0x2af0ac,_0x197c79;}function _0x5de423(_0x2c3b7c,_0x7507ab,_0xfc7e24,_0x57b0bb){return _0x46f976(_0x2c3b7c-0x159,_0x7507ab-_0x22e358._0xcea457,_0x2c3b7c-_0x22e358._0x2493ec,_0xfc7e24);}return _0x57b043;}[_0x128977('2a93',0x32f,0x342,0x33f)](){const _0x17ab42={_0x236165:0x3e0,_0x368c7f:'lwHn',_0x38067d:'XiUT',_0x4d6db0:0x3e6,_0x41d02:0x158,_0x58f58d:0x401,_0x37146d:0x3b2,_0x9ed81b:'[pxD',_0x12f0b9:0x13e,_0x4029b0:0x159,_0x13624d:'Vf*b',_0xeb6d3d:0x11c,_0x5e5bbf:0x3ef,_0x2cdb54:'3oy5',_0x43023c:0x3ce,_0x17192c:0x3fc,_0x370991:0x3e0,_0x172098:0x121,_0x1cc05c:0x141,_0x28e58f:0x12b},_0x34b47a={_0x503814:0x365,_0x47e2b1:0x38a,_0x57ac25:0x23e,_0x51d372:')#Tv',_0x56ccf4:0x24e,_0x506413:'qQJe',_0x34fbd0:0x3cd,_0x4b76d2:0x3ab,_0x30f6c0:0x22e,_0x1b72e0:0x23f,_0x319892:0x1d8,_0x1b93b6:0x1ff,_0x228dce:0x230,_0x272802:'lzaj',_0x15845a:0x3b9,_0x6f6262:0x250,_0x328a15:0x233,_0x217649:'Hnw]',_0x253a08:0x22f,_0x32437f:0x204,_0x4a345a:0x237,_0x191812:0x20e,_0x421e5a:0x235,_0xbef573:0x216,_0x4a7eae:0x1f7,_0x55bca5:'&[aa',_0x53c8db:0x3c9,_0x550ec9:0x39e,_0x45e812:0x382,_0xd5f83d:0x39a,_0x16b3b9:0x36f,_0x1accdd:0x375,_0x4272cc:'3oy5',_0x79046a:0x1d5,_0x4815f3:0x1fb,_0x9c491d:0x220},_0xc3c5f5={_0x41d973:0x61,_0x439dde:0x3f},_0x151015={_0xa88586:0x10b},_0x45f39e={};_0x45f39e[_0x39412b('XiUT',0x102,0x10e,0xec)]=function(_0xb252d4,_0xe123a2){return _0xb252d4===_0xe123a2;},_0x45f39e[_0x35c3b1(_0x17ab42._0x236165,0x3af,_0x17ab42._0x368c7f,0x3d9)]=function(_0x17a104,_0x1bac24){return _0x17a104===_0x1bac24;},_0x45f39e[_0x35c3b1(0x3cd,0x408,_0x17ab42._0x38067d,_0x17ab42._0x4d6db0)]=function(_0x413b22,_0x39d65d){return _0x413b22===_0x39d65d;},_0x45f39e['MvIXg']=_0x39412b('lzaj',0x11d,0x136,_0x17ab42._0x41d02),_0x45f39e[_0x35c3b1(0x3fc,0x3e2,'YIh)',0x3f1)]=_0x35c3b1(_0x17ab42._0x58f58d,0x405,'lzaj',0x3e0);function _0x39412b(_0x58cf75,_0x281226,_0x18ee94,_0x157a8d){return _0x46f976(_0x58cf75-0x63,_0x281226-0xde,_0x18ee94- -0x22f,_0x58cf75);}_0x45f39e[_0x35c3b1(0x3be,0x3d2,'nAfc',_0x17ab42._0x37146d)]=function(_0x2efb11,_0x2420de){return _0x2efb11!==_0x2420de;};function _0x35c3b1(_0x41ba22,_0x4488df,_0xf1e48e,_0x31cfe5){return _0x46f976(_0x41ba22-0xf5,_0x4488df-_0x151015._0xa88586,_0x31cfe5-0x88,_0xf1e48e);}_0x45f39e[_0x39412b(_0x17ab42._0x9ed81b,0x122,_0x17ab42._0x12f0b9,_0x17ab42._0x4029b0)]=_0x39412b(_0x17ab42._0x13624d,0x103,0x120,_0x17ab42._0xeb6d3d);const _0x25f336=_0x45f39e,_0x1a4fb1=role_flow_repo_1[_0x35c3b1(0x3d3,_0x17ab42._0x5e5bbf,_0x17ab42._0x38067d,0x3e5)+_0x35c3b1(0x3d1,0x3f4,_0x17ab42._0x2cdb54,_0x17ab42._0x43023c)][_0x35c3b1(_0x17ab42._0x17192c,_0x17ab42._0x370991,'fz^u',0x3e2)]();return _0x1a4fb1[_0x39412b('Vf*b',_0x17ab42._0x172098,_0x17ab42._0x1cc05c,_0x17ab42._0x28e58f)](_0x27ccf4=>{const _0x3b8a36={_0x366c56:'gJ3y',_0x4f94dc:0x1ef,_0x39de1e:0x208},_0x326f70={_0x2dbbff:0x122};function _0x437f5b(_0x220ac6,_0x2761e0,_0x161b86,_0x1bbe12){return _0x35c3b1(_0x220ac6-_0xc3c5f5._0x41d973,_0x2761e0-0xdf,_0x2761e0,_0x1bbe12- -_0xc3c5f5._0x439dde);}function _0x66efe5(_0x3bf5bf,_0x3fbe61,_0x2cd5f8,_0x5e0a84){return _0x39412b(_0x3fbe61,_0x3fbe61-_0x326f70._0x2dbbff,_0x5e0a84-0xff,_0x5e0a84-0x164);}const _0x419563={'TxdBS':function(_0x122faf,_0x5842ed){function _0x42bd94(_0x4abe83,_0x4ced33,_0x1253b7,_0x47f159){return _0x1d3e(_0x1253b7-0xce,_0x4abe83);}return _0x25f336[_0x42bd94(_0x3b8a36._0x366c56,_0x3b8a36._0x4f94dc,_0x3b8a36._0x39de1e,0x200)](_0x122faf,_0x5842ed);}};if(_0x25f336[_0x437f5b(_0x34b47a._0x503814,'AFgg',_0x34b47a._0x47e2b1,0x389)](_0x25f336[_0x66efe5(_0x34b47a._0x57ac25,_0x34b47a._0x51d372,_0x34b47a._0x56ccf4,0x22b)],_0x25f336['OwpOf'])){if(_0x419563[_0x437f5b(0x3bd,_0x34b47a._0x506413,_0x34b47a._0x34fbd0,_0x34b47a._0x4b76d2)](_0x6d95['is_preset'],0x3*-0xbf1+-0x1dc8*0x1+0x419c)&&(-0x1*0x147b+-0x162b+0x6a*0x67,_0x6afb57[_0x66efe5(_0x34b47a._0x30f6c0,'n5e8',0x244,_0x34b47a._0x1b72e0)+'d'])(_0x34db18[_0x66efe5(_0x34b47a._0x319892,'T*dy',0x1ea,_0x34b47a._0x1b93b6)])){const _0x376fd7=(-0x2673+-0x1c*-0x25+0x2267,_0x36066e[_0x66efe5(0x234,')^%j',0x21e,_0x34b47a._0x228dce)+'c'])(_0x3caa10[_0x437f5b(0x393,_0x34b47a._0x272802,_0x34b47a._0x15845a,0x3aa)]),_0x2efe21={..._0x3564fa};return _0x2efe21[_0x66efe5(_0x34b47a._0x6f6262,'&[aa',0x25b,_0x34b47a._0x328a15)]=_0x376fd7,_0x2efe21;}return _0x2e87f1;}else{if(_0x27ccf4[_0x66efe5(0x227,'Q!kh',0x23c,0x214)]===0x1161+-0x1*-0x1b7c+-0x2cdc&&(0x3d*0x13+0x227*0x2+-0x8d5,crypto_service_1[_0x66efe5(0x204,_0x34b47a._0x217649,0x233,_0x34b47a._0x253a08)+'d'])(_0x27ccf4[_0x66efe5(0x200,'7Gxs',0x20d,_0x34b47a._0x32437f)])){if(_0x25f336[_0x66efe5(_0x34b47a._0x4a345a,_0x34b47a._0x51d372,0x1fd,_0x34b47a._0x191812)](_0x25f336[_0x66efe5(0x216,'&nYE',_0x34b47a._0x421e5a,0x21b)],_0x25f336['vxsIz'])){const _0x32a136={_0x3fd88a:'bgZ!',_0x4f925c:0x22e,_0x268df9:'gJ3y',_0x3d948d:0x3b7,_0x1fcd74:0x397,_0x12b812:0x383,_0x241139:0x369,_0x4c5f16:0x262,_0x353373:0x24a,_0x478e2d:0x39f,_0x3e2fc7:0x39a,_0x4bb00d:0x3bf},_0x409076={_0xa47e59:0x18a},_0x2425e0={_0x37f2d4:0x116,_0x106c08:0x4},_0x57d9c3={_0x18b5db:0x40d},_0x2f838f={_0x23dd2a:0x12e,_0x4ca5be:0x104,_0x33db52:0xab},_0x357a85={'DPrzK':function(_0x57107b,_0x477299){function _0x597b7c(_0x2a21be,_0x3925e9,_0x21d6af,_0x1b9e8a){return _0x437f5b(_0x2a21be-_0x2f838f._0x23dd2a,_0x3925e9,_0x21d6af-_0x2f838f._0x4ca5be,_0x21d6af-_0x2f838f._0x33db52);}return _0x25f336[_0x597b7c(0x42d,'!bJQ',0x42e,_0x57d9c3._0x18b5db)](_0x57107b,_0x477299);}},_0x548fb8=_0x5903ca[_0x66efe5(_0x34b47a._0xbef573,'YIh)',0x219,_0x34b47a._0x4a7eae)+_0x437f5b(0x3d5,_0x34b47a._0x55bca5,_0x34b47a._0x53c8db,0x3bc)][_0x437f5b(_0x34b47a._0x550ec9,'0EVL',0x38d,_0x34b47a._0x45e812)]();return _0x548fb8['map'](_0x358e69=>{if(_0x357a85[_0x384829(-0x278,_0x32a136._0x3fd88a,-0x257,-0x282)](_0x358e69[_0x384829(-_0x32a136._0x4f925c,')#Tv',-0x253,-0x270)],0xfc+-0x1a*-0xa1+0x105*-0x11)&&(0xe3*0x2b+-0x3a6+-0x61*0x5b,_0x3adadb[_0x3d7e28(_0x32a136._0x268df9,0x38e,_0x32a136._0x3d948d,_0x32a136._0x1fcd74)+'d'])(_0x358e69[_0x3d7e28('2a93',0x36e,_0x32a136._0x12b812,_0x32a136._0x241139)])){const _0xd709ad=(0x17c7+-0xcf9+-0x567*0x2,_0x2d847b[_0x384829(-0x288,'Vf*b',-_0x32a136._0x4c5f16,-_0x32a136._0x353373)+'c'])(_0x358e69[_0x3d7e28('qQJe',0x3b0,_0x32a136._0x478e2d,0x3c7)]),_0x3ffec7={..._0x358e69};return _0x3ffec7[_0x3d7e28('&[aa',_0x32a136._0x3e2fc7,0x3af,_0x32a136._0x4bb00d)]=_0xd709ad,_0x3ffec7;}function _0x3d7e28(_0x4e1dc0,_0x45a82f,_0x3c13c2,_0xe152ab){return _0x66efe5(_0x4e1dc0-_0x2425e0._0x37f2d4,_0x4e1dc0,_0x3c13c2-_0x2425e0._0x106c08,_0x3c13c2-0x17c);}function _0x384829(_0x43c574,_0x3e7e93,_0x47a9ec,_0x575c3e){return _0x66efe5(_0x43c574-0x138,_0x3e7e93,_0x47a9ec-_0x409076._0xa47e59,_0x47a9ec- -0x462);}return _0x358e69;});}else{const _0x427056=(0x251d*0x1+0xf1e+0x343b*-0x1,crypto_service_1[_0x437f5b(_0x34b47a._0xd5f83d,'lwHn',_0x34b47a._0x16b3b9,_0x34b47a._0x1accdd)+'c'])(_0x27ccf4[_0x66efe5(0x20c,_0x34b47a._0x4272cc,_0x34b47a._0x79046a,_0x34b47a._0x4815f3)]),_0x251639={..._0x27ccf4};return _0x251639[_0x66efe5(0x218,'&nYE',_0x34b47a._0x9c491d,0x23e)]=_0x427056,_0x251639;}}return _0x27ccf4;}});}[_0x128977('bgZ!',0x387,0x372,0x39e)](_0x4cb028){const _0x5ca548={_0x19bbf6:'&[aa',_0x314560:'XiUT',_0x344620:0x41},_0x336374={_0x1ee146:0x65},_0xbb055c={_0x298357:0x38};function _0x465fb5(_0x4a09cd,_0x2e5e70,_0xedfb5c,_0x402cf0){return _0x128977(_0x2e5e70,_0x2e5e70-0x11d,_0x402cf0- -0x135,_0x402cf0-_0xbb055c._0x298357);}function _0x5299fe(_0x16129c,_0x437510,_0x10eeea,_0x2531a0){return _0x128977(_0x16129c,_0x437510-0x94,_0x10eeea- -0x32b,_0x2531a0-_0x336374._0x1ee146);}return!role_flow_repo_1[_0x5299fe(_0x5ca548._0x19bbf6,0xd,0x2d,0x1a)+'pository'][_0x5299fe(_0x5ca548._0x314560,0xd,0x22,_0x5ca548._0x344620)](_0x4cb028);}}function _0x46f976(_0x586143,_0x46b8fc,_0x3652aa,_0x1bae6f){const _0x32bc51={_0x2262f1:0x214};return _0x1d3e(_0x3652aa-_0x32bc51._0x2262f1,_0x1bae6f);}exports[_0x128977('XiUT',0x348,0x353,0x348)+_0x128977('Hnw]',0x324,0x33d,0x351)]=RoleFlowService,exports[_0x46f976(0x318,0x316,0x338,'gmQG')+_0x128977('uGBq',0x339,0x341,0x367)]=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
|