opclawtm-cli 1.3.4 → 1.3.6

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.
Files changed (92) hide show
  1. package/dist/bin/team-manager.js +35 -1
  2. package/dist/bin/team-setup.js +65 -1
  3. package/dist/bin/team-uninstall.js +90 -1
  4. package/dist/cli/commands/agent.command.js +223 -1
  5. package/dist/cli/commands/checklist.command.js +77 -1
  6. package/dist/cli/commands/dept.command.js +92 -1
  7. package/dist/cli/commands/document.command.js +146 -1
  8. package/dist/cli/commands/domain.command.js +97 -1
  9. package/dist/cli/commands/feishu.command.js +433 -1
  10. package/dist/cli/commands/job.command.js +168 -1
  11. package/dist/cli/commands/license.command.js +68 -1
  12. package/dist/cli/commands/message-failure.command.js +137 -1
  13. package/dist/cli/commands/message.command.js +129 -1
  14. package/dist/cli/commands/node.command.js +251 -1
  15. package/dist/cli/commands/role-flow.command.js +54 -1
  16. package/dist/cli/commands/skill-pack.command.js +137 -1
  17. package/dist/cli/commands/status.command.js +61 -1
  18. package/dist/cli/commands/task.command.js +402 -1
  19. package/dist/cli/commands/user.command.js +134 -1
  20. package/dist/cli/index.js +863 -1
  21. package/dist/cli/tui/index.js +470 -1
  22. package/dist/cli/tui/menus/agent-manage.menu.js +614 -1
  23. package/dist/cli/tui/menus/dept-manage.menu.js +358 -1
  24. package/dist/cli/tui/menus/domain-manage.menu.js +208 -1
  25. package/dist/cli/tui/menus/feishu.menu.js +1686 -1
  26. package/dist/cli/tui/menus/job-manage.menu.js +734 -1
  27. package/dist/cli/tui/menus/license.menu.js +164 -1
  28. package/dist/cli/tui/menus/main.menu.js +94 -1
  29. package/dist/cli/tui/menus/reset.menu.js +767 -1
  30. package/dist/cli/tui/menus/status.menu.js +123 -1
  31. package/dist/cli/tui/menus/task-manage.menu.js +129 -1
  32. package/dist/cli/tui/menus/team-create.menu.js +353 -1
  33. package/dist/config.d.ts +1 -1
  34. package/dist/config.js +74 -1
  35. package/dist/core/auth/index.js +22 -1
  36. package/dist/core/auth/middleware.js +456 -1
  37. package/dist/core/auth/storage.js +280 -1
  38. package/dist/core/models/types.js +9 -1
  39. package/dist/core/services/agent-template.service.js +88 -1
  40. package/dist/core/services/agent.service.js +381 -1
  41. package/dist/core/services/auth-profiles.service.js +220 -1
  42. package/dist/core/services/checklist.service.js +240 -1
  43. package/dist/core/services/config-tracker.service.js +1093 -1
  44. package/dist/core/services/crypto.service.d.ts.map +1 -1
  45. package/dist/core/services/crypto.service.js +377 -1
  46. package/dist/core/services/crypto.service.js.map +1 -1
  47. package/dist/core/services/dept.service.js +260 -1
  48. package/dist/core/services/document.service.js +368 -1
  49. package/dist/core/services/domain.service.js +98 -1
  50. package/dist/core/services/feishu.service.js +165 -1
  51. package/dist/core/services/index.js +89 -1
  52. package/dist/core/services/job.service.js +190 -1
  53. package/dist/core/services/log.service.js +237 -1
  54. package/dist/core/services/message-failure.service.js +112 -1
  55. package/dist/core/services/message.service.js +374 -1
  56. package/dist/core/services/node.service.js +257 -1
  57. package/dist/core/services/openclaw-config.service.js +268 -1
  58. package/dist/core/services/preset-loader.service.js +379 -1
  59. package/dist/core/services/role-flow.service.js +47 -1
  60. package/dist/core/services/setup.service.js +336 -1
  61. package/dist/core/services/skill-pack.service.js +113 -1
  62. package/dist/core/services/task.service.js +397 -1
  63. package/dist/core/services/template.service.js +88 -1
  64. package/dist/core/services/user.service.js +111 -1
  65. package/dist/core/utils/agent-guide-generator.js +187 -1
  66. package/dist/core/utils/credentials-cleanup.js +256 -1
  67. package/dist/core/utils/index.js +462 -1
  68. package/dist/core/utils/openclaw-helper.js +1585 -1
  69. package/dist/core/utils/template-generator.js +170 -1
  70. package/dist/db/index.js +403 -1
  71. package/dist/db/repositories/agent-template.repo.js +108 -1
  72. package/dist/db/repositories/agent.repo.js +103 -1
  73. package/dist/db/repositories/base.repository.js +107 -1
  74. package/dist/db/repositories/company.repo.js +33 -1
  75. package/dist/db/repositories/config-change.repo.js +119 -1
  76. package/dist/db/repositories/dept.repo.js +66 -1
  77. package/dist/db/repositories/document.repo.js +51 -1
  78. package/dist/db/repositories/domain.repo.js +79 -1
  79. package/dist/db/repositories/index.js +81 -1
  80. package/dist/db/repositories/init-session.repo.js +112 -1
  81. package/dist/db/repositories/job.repo.js +119 -1
  82. package/dist/db/repositories/message-failure.repo.js +141 -1
  83. package/dist/db/repositories/message-log.repo.js +64 -1
  84. package/dist/db/repositories/node.repo.js +276 -1
  85. package/dist/db/repositories/role-flow.repo.js +83 -1
  86. package/dist/db/repositories/skill-pack.repo.js +149 -1
  87. package/dist/db/repositories/task.repo.js +381 -1
  88. package/dist/db/repositories/template.repo.js +66 -1
  89. package/dist/db/repositories/user.repo.js +75 -1
  90. package/package.json +1 -1
  91. package/resources/preset-data-hash.enc +1 -1
  92. package/resources/preset-data.enc +1 -1
@@ -1 +1,47 @@
1
- 'use strict';function _0x5553e3(_0x5ed9cb,_0x258f95,_0x471c7d,_0x474a8a){return _0x4d72(_0x471c7d-0x2d6,_0x5ed9cb);}(function(_0x1e3ed1,_0x517bbb){const _0x56308f={_0x8497a4:0x1c2,_0x555b7c:0x1c1,_0x518e9d:'6aL5',_0x57071a:0x385,_0x1e9e32:0x365,_0x403798:0x350,_0x44e293:0x381,_0x59ee57:0x39a,_0x27af32:0x398,_0x1472a0:0x37b,_0x39052c:'TZRZ',_0x20ce5:0x1b6,_0x303dd5:0x39d,_0x5796c8:0x3ae,_0x315497:0x1ee,_0x245444:0x1d3,_0x44d13e:0x1ec,_0x188b53:'YsiQ',_0x5a5089:0x38c},_0x4ec6dc={_0x2261d3:0x58};function _0x57c82e(_0x3bf7a8,_0x1d285d,_0x3a8397,_0xac6b40){return _0x4d72(_0x1d285d-_0x4ec6dc._0x2261d3,_0x3a8397);}const _0x173192=_0x1e3ed1();function _0x4ccc05(_0x495aaf,_0x535264,_0x2333f5,_0x152c36){return _0x4d72(_0x535264-0x21a,_0x495aaf);}while(!![]){try{const _0x17a481=parseInt(_0x57c82e(_0x56308f._0x8497a4,0x1b3,'R1(V',_0x56308f._0x555b7c))/(-0x1485+0x17f1*-0x1+-0x2c77*-0x1)+parseInt(_0x4ccc05(_0x56308f._0x518e9d,0x368,0x35f,_0x56308f._0x57071a))/(0x552*-0x3+-0xe*-0x126+-0x7*0x4)+parseInt(_0x4ccc05('s7bz',_0x56308f._0x1e9e32,0x36d,_0x56308f._0x403798))/(0x1805+0x1b4b+-0x334d)*(parseInt(_0x4ccc05('(A7Z',_0x56308f._0x44e293,_0x56308f._0x59ee57,_0x56308f._0x27af32))/(-0x25d3+0x2435+0x1a2))+-parseInt(_0x4ccc05(']@l[',_0x56308f._0x1472a0,0x368,0x380))/(-0x19*-0x7f+-0x3*0x5b0+-0x257*-0x2)+parseInt(_0x57c82e(0x197,0x1a9,_0x56308f._0x39052c,_0x56308f._0x20ce5))/(-0x4db*-0x1+-0x3*0x765+0x115a)+-parseInt(_0x4ccc05('YsiQ',_0x56308f._0x303dd5,0x378,_0x56308f._0x5796c8))/(0x31f+-0x971+-0x41*-0x19)+-parseInt(_0x57c82e(_0x56308f._0x315497,_0x56308f._0x245444,'R0t5',_0x56308f._0x44d13e))/(-0x1b18+-0x2*-0x1fd+0x1726)*(parseInt(_0x4ccc05(_0x56308f._0x188b53,0x398,0x37c,_0x56308f._0x5a5089))/(-0x2*-0x745+-0x3*-0x201+-0x1484));if(_0x17a481===_0x517bbb)break;else _0x173192['push'](_0x173192['shift']());}catch(_0x2e71cd){_0x173192['push'](_0x173192['shift']());}}}(_0x2866,-0xf56c5+-0x30982+-0x3*-0x9b0bd));function _0x4d72(_0x21472d,_0x3e16f7){_0x21472d=_0x21472d-(-0xe19+0x2473+0xb*-0x1eb);const _0x217bc9=_0x2866();let _0x1f1576=_0x217bc9[_0x21472d];if(_0x4d72['lSBtSu']===undefined){var _0x3d0b11=function(_0x455bd0){const _0x1b9687='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xac6cfa='',_0x49ec3a='';for(let _0x1acce4=-0x34d*-0x2+-0x316+-0x384,_0x1a4d87,_0x1caa26,_0x6f852d=-0x2523*-0x1+0xc4b*0x1+-0x316e;_0x1caa26=_0x455bd0['charAt'](_0x6f852d++);~_0x1caa26&&(_0x1a4d87=_0x1acce4%(0x8*0x46d+0x17a5*0x1+-0x3b09)?_0x1a4d87*(0x270c+0x221e+0x1*-0x48ea)+_0x1caa26:_0x1caa26,_0x1acce4++%(0xd72+-0x21e*-0xb+-0x24b8))?_0xac6cfa+=String['fromCharCode'](0xe33*0x1+0x871+-0x15a5&_0x1a4d87>>(-(0xb54+-0x959*0x1+-0x1f9)*_0x1acce4&-0x29*0x4f+-0x1962+0x260f)):-0x15a2+0x1*0x21+-0xf*-0x16f){_0x1caa26=_0x1b9687['indexOf'](_0x1caa26);}for(let _0x28ced1=-0x19c6+-0x2*-0x647+-0x4*-0x34e,_0x2d7c52=_0xac6cfa['length'];_0x28ced1<_0x2d7c52;_0x28ced1++){_0x49ec3a+='%'+('00'+_0xac6cfa['charCodeAt'](_0x28ced1)['toString'](-0x66c+0x14a9+-0xe2d))['slice'](-(-0x1*-0x1b37+0x1*-0x17f3+0x8b*-0x6));}return decodeURIComponent(_0x49ec3a);};const _0x3edc27=function(_0x5bdf88,_0x494ed8){let _0x17bff8=[],_0x2ae9c0=0xef4+0xdf5+-0x3*0x9a3,_0x1782b5,_0x111239='';_0x5bdf88=_0x3d0b11(_0x5bdf88);let _0x297414;for(_0x297414=-0x2150+-0x1*-0xcbb+-0xb*-0x1df;_0x297414<0xa8b*0x2+0x209c+-0xbe*0x47;_0x297414++){_0x17bff8[_0x297414]=_0x297414;}for(_0x297414=0x1*0x1f1d+0x167*-0x1+-0x1db6;_0x297414<0x1c*-0x76+-0x20ad+0x2e95;_0x297414++){_0x2ae9c0=(_0x2ae9c0+_0x17bff8[_0x297414]+_0x494ed8['charCodeAt'](_0x297414%_0x494ed8['length']))%(0xa*-0x22+0xc5*-0xb+0xacb),_0x1782b5=_0x17bff8[_0x297414],_0x17bff8[_0x297414]=_0x17bff8[_0x2ae9c0],_0x17bff8[_0x2ae9c0]=_0x1782b5;}_0x297414=-0x60d+0x22c5+0xe5c*-0x2,_0x2ae9c0=0x133a+0x935*-0x2+0x1*-0xd0;for(let _0x18e3e1=-0x1*0x10ca+0x15b*0x11+0x1*-0x641;_0x18e3e1<_0x5bdf88['length'];_0x18e3e1++){_0x297414=(_0x297414+(0x2181+-0x8d*0x1b+-0x12a1))%(-0x2*-0x8fa+0x2511+-0x3605),_0x2ae9c0=(_0x2ae9c0+_0x17bff8[_0x297414])%(-0x5e3+0x1df*0x1+-0x1ac*-0x3),_0x1782b5=_0x17bff8[_0x297414],_0x17bff8[_0x297414]=_0x17bff8[_0x2ae9c0],_0x17bff8[_0x2ae9c0]=_0x1782b5,_0x111239+=String['fromCharCode'](_0x5bdf88['charCodeAt'](_0x18e3e1)^_0x17bff8[(_0x17bff8[_0x297414]+_0x17bff8[_0x2ae9c0])%(-0x282+-0x65*0xe+0x908)]);}return _0x111239;};_0x4d72['QUKcfW']=_0x3edc27,_0x4d72['pREzak']={},_0x4d72['lSBtSu']=!![];}const _0x4c2495=_0x217bc9[0x1518+-0x123a+0x2*-0x16f],_0x470842=_0x21472d+_0x4c2495,_0x46a65a=_0x4d72['pREzak'][_0x470842];return!_0x46a65a?(_0x4d72['hdjBdU']===undefined&&(_0x4d72['hdjBdU']=!![]),_0x1f1576=_0x4d72['QUKcfW'](_0x1f1576,_0x3e16f7),_0x4d72['pREzak'][_0x470842]=_0x1f1576):_0x1f1576=_0x46a65a,_0x1f1576;}function _0x51c9dc(_0x2caf6b,_0x3c7f0e,_0x13c13d,_0xc89ac9){return _0x4d72(_0x3c7f0e-0x320,_0xc89ac9);}const _0x3f1fc7={};_0x3f1fc7['value']=!![],Object[_0x51c9dc(0x45b,0x465,0x485,'iW(R')+_0x51c9dc(0x4b3,0x49c,0x481,'m[I$')](exports,_0x51c9dc(0x488,0x490,0x49b,'5H6V'),_0x3f1fc7),exports[_0x5553e3('TZRZ',0x40b,0x41f,0x424)+_0x5553e3('eVmA',0x442,0x464,0x488)]=exports[_0x5553e3('6aL5',0x45b,0x467,0x484)+_0x51c9dc(0x4c0,0x499,0x483,'TZRZ')]=void(0x19da+-0x1*-0x112b+-0x2b05*0x1);const role_flow_repo_1=require(_0x5553e3('6]O8',0x46b,0x44b,0x45b)+_0x5553e3('Y02t',0x44b,0x44e,0x461)+_0x5553e3('3#]v',0x444,0x444,0x468)+'w.repo'),crypto_service_1=require(_0x51c9dc(0x473,0x479,0x46f,'Dwlz')+_0x51c9dc(0x4a8,0x483,0x4a6,'CbIW'));function _0x2866(){const _0x5cad20=['WRlcR8knW5Hj','FbZdVSkryvpdQW','tmoUW7lcL1ZcLCorW5tcTCkdomkzoa','W4HmW6HxA8kpW50','q3tdOxxdI8oF','aY7dICoRe8kRWRi9wmkd','W6LHBZiG','W74VW4TNh8k/WPNcOSo3bxhdVSo/','W5hdP8k1WOpdTa/cLCkcqmkyW6pdVa','WPLoqG','WOBcKSkxufGPWO1uW403WRW','W7v0W5pdTmoa','WOVcTCoTW7JcOLNcJ8kwAG','WPlcRSkuW7brWRZcJq','tCo2w11yW6aKW58Apa','W7ddUSoKymkeW7/cNSozcmkQ','D8kQWR1+WRyUW5qTwmku','WQdcJCoAwCk4zJFcRKtcTG','WOZcO8o6W6ZcGW','WOPOWP4zsq','yWxcNSowfG','W4ddLmoziWi','EZOuWRGgBZDLy8oz','kdXknXitd2RcNa','BwtcJSoAWQdcRCkkBsrDW4hdTW','WOT+WR/dTfVdM8onW7VcNt8','W7z2zd8n','cJ9Xpru','hvZdNmkOf8ohW6pcHmolW54','WPhcTCkoW60','jKPmsmosbuiGW57dUG','WRDiobRdStlcHxjTDdm','WOJcPfBdM8oyF8kfhW4f','nZJdLSkyW7ZdSCkn','vgKLW5dcU0dcTWxcRhi','iSo2WQLFyJ5ScNah','WR5pmHRdV0ddL2ThuYXVba','jmkfn8ogW4pdIrlcVSo0','WP4afSojWOb6W6BdLSoqW7C','hJdcOY/cMSkoWPtcKSkQWOzmfG','WP8/W7BdSCoVhCkc','WOCFhSowWRm','wdfFx0hcH0a','a28egxZcU33dTZe7','wX9kW7bQ','nJldQSoyfa','W7rVFJuCWPfUW7G','ssHysee','pCkzg8oFW4xdGXpcOG','qMpdTg7dKCokWOVcTmkEWPK','DSoQCLz9W74YW5G9pa','lSkzbSocW5tdGHu','W48fWQClbmkRla','W6dcUSo4E8knW7tdHW','aJCKzmkjodNdHrNdJG','v2K3W6VcUKNcGJhcR20','W7DTW4NdVSorW4DyWOO','eI7dI8o6mmkPWQK','W4rZW4TAva','W7zVytKUWPjZW7yPBW','WRrUWPe1qW','mCoyoxRcJMNcNmox','ud7cQ8oraq','b8o1WOP+BG','fCk0laSdWQDTW5yTmCkwcmoB','ESk0W54joxKLa0CkW4xcGfa','W4/dKSo9cIe','WRa4pMrFW4yOW6mEFxhdPMm','lc53ksG','WOZcSCoGW4FcTe3cKSkJASkd','W4f0tmkhpM4OW7SL','WPDaxgddSXvG','WPNcU8ortSk3CahcTetcTG','W5PwnCkKC8kenMFcPdKWlMC','svBdMMxdSG','rmohW4WKWOX6WQ3cOCkPdW','W5NdOCozW7pcQ17cGCkA','C8kZW5Gcm3H+d0KtW47cOG','o8oKWRldS0pcLCoI','wN8uW6ZcT17cQZpcThG','WQ9RWQGKq8o5W4JcUG'];_0x2866=function(){return _0x5cad20;};return _0x2866();}class RoleFlowService{[_0x51c9dc(0x499,0x4a1,0x482,'iW(R')+'w'](_0x5526b9){const _0x5d4b90={_0x3978b2:0x235,_0x8d64fc:0x244,_0x45d640:0x282,_0x794ed2:0x250,_0x37ab23:0x274,_0x1926b5:0x228,_0x55566e:'m[I$',_0xffb006:0x223,_0x50b593:0x1dc,_0x14a84d:0x201,_0x1f4774:0x210,_0x554c2f:0x203,_0x4320ce:'LRyX',_0x5dcaac:0x225,_0x32749f:0x263,_0x591f8f:0x277,_0x126202:'R0t5',_0x3f9661:0x213,_0x225031:0x1f7,_0x4966cf:0x20c,_0x587ac4:0x207,_0x65add2:0x1f4,_0x1f64b2:'CbIW',_0x5e37ec:0x209,_0x2cc644:0x21b,_0x553e80:0x227,_0x31871a:0x259,_0x1f84aa:0x243,_0x50a2cd:'R1(V',_0x280cf9:0x233,_0x5f5d79:0x228,_0x4ae5b3:0x229,_0x591934:0x21c,_0x24142b:'g[yu',_0x3a66f4:'6*vl',_0x3ac962:0x20f,_0x271e85:0x204,_0x4a278d:0x21d,_0x59eacd:0x20b,_0x30d3ad:0x24d,_0x247223:0x22e,_0xf45897:0x211,_0xa8ed98:'3#]v',_0x432286:0x231,_0x5a246d:0x213},_0x2fc27e={_0x502a24:0x26f,_0x49ad56:0x1de},_0x466138={};function _0x5a29d6(_0x18ee78,_0x3b9ec4,_0x4b0475,_0x4b32ef){return _0x51c9dc(_0x18ee78-0x177,_0x4b32ef- -_0x2fc27e._0x502a24,_0x4b0475-_0x2fc27e._0x49ad56,_0x4b0475);}_0x466138[_0x228f7b(-_0x5d4b90._0x3978b2,-0x214,-_0x5d4b90._0x8d64fc,'XeFY')]=function(_0x16bc05,_0x5208ff){return _0x16bc05===_0x5208ff;},_0x466138[_0x228f7b(-0x267,-0x27a,-_0x5d4b90._0x45d640,'zQdv')]=function(_0x415bba,_0x1266af){return _0x415bba===_0x1266af;};function _0x228f7b(_0x3e57fc,_0x362545,_0x58596d,_0x25e503){return _0x51c9dc(_0x3e57fc-0x1c0,_0x3e57fc- -0x6cf,_0x58596d-0x1eb,_0x25e503);}_0x466138[_0x228f7b(-_0x5d4b90._0x794ed2,-_0x5d4b90._0x37ab23,-_0x5d4b90._0x1926b5,_0x5d4b90._0x55566e)]=_0x5a29d6(_0x5d4b90._0xffb006,_0x5d4b90._0x50b593,'LRyX',_0x5d4b90._0x14a84d),_0x466138[_0x5a29d6(_0x5d4b90._0x1f4774,_0x5d4b90._0x554c2f,_0x5d4b90._0x4320ce,_0x5d4b90._0x5dcaac)]=_0x228f7b(-_0x5d4b90._0x32749f,-_0x5d4b90._0x591f8f,-0x281,_0x5d4b90._0x126202);const _0x308181=_0x466138,_0x45826b=role_flow_repo_1[_0x5a29d6(_0x5d4b90._0x3f9661,0x228,'m1[U',0x215)+_0x5a29d6(_0x5d4b90._0x554c2f,0x216,'6*vl',_0x5d4b90._0x225031)][_0x5a29d6(0x208,_0x5d4b90._0x4966cf,'5H6V',_0x5d4b90._0x587ac4)](_0x5526b9);if(!_0x45826b)return null;if(_0x308181[_0x5a29d6(_0x5d4b90._0x65add2,0x221,_0x5d4b90._0x1f64b2,_0x5d4b90._0x5e37ec)](_0x45826b[_0x5a29d6(_0x5d4b90._0x2cc644,0x22a,'XeFY',_0x5d4b90._0x553e80)],0x5*0x3da+0x1be9*-0x1+0x8a8)&&(-0x19b+-0x8f5+0xa90,crypto_service_1[_0x5a29d6(_0x5d4b90._0x31871a,_0x5d4b90._0x1f84aa,_0x5d4b90._0x50a2cd,_0x5d4b90._0x280cf9)+'d'])(_0x45826b[_0x228f7b(-_0x5d4b90._0x5f5d79,-0x249,-0x240,'4pEs')])){if(_0x308181[_0x228f7b(-0x23c,-0x24e,-_0x5d4b90._0x4ae5b3,'R0t5')]===_0x308181['wvwBm']){const _0x364b7c={_0x17e05c:'siF6',_0x44cd35:0x96,_0x5204d0:0x55,_0x17ca4d:0x79,_0x9f453b:0x7a,_0x3dee89:0x95,_0x27b9b0:0x7d,_0x4ddec5:0x212,_0x2d54f4:'6aL5',_0x431791:0x205,_0x598fbc:0x99,_0x2a02a4:0xba,_0x5e31fd:0x1f1,_0x142195:'(A7Z',_0x2a8a7e:0x1eb,_0x56b4da:0x1f6,_0x1fe30e:'7)Ru',_0x1489ce:0x1e7},_0x35f548={_0x225c53:0x1d9},_0x2f8d7b={_0x41d514:0x1ae,_0x471615:0x18},_0x53ba7a=_0x316f87[_0x228f7b(-0x240,-0x227,-_0x5d4b90._0x591934,_0x5d4b90._0x24142b)+_0x5a29d6(0x1e2,0x1ff,_0x5d4b90._0x3a66f4,0x1f7)][_0x5a29d6(_0x5d4b90._0x3ac962,_0x5d4b90._0x271e85,'m[I$',_0x5d4b90._0x4a278d)]();return _0x53ba7a['map'](_0x56d9fd=>{if(_0x308181[_0xc0cedb(_0x364b7c._0x17e05c,-_0x364b7c._0x44cd35,-_0x364b7c._0x5204d0,-_0x364b7c._0x17ca4d)](_0x56d9fd[_0xc0cedb('7)Ru',-_0x364b7c._0x9f453b,-_0x364b7c._0x3dee89,-_0x364b7c._0x27b9b0)],0x128d+-0x11c8+-0xc4)&&(-0x8*-0x123+0x1a90+-0x23a8,_0x5cfd5a[_0x50a6d3(0x20b,_0x364b7c._0x4ddec5,_0x364b7c._0x2d54f4,_0x364b7c._0x431791)+'d'])(_0x56d9fd[_0xc0cedb('m1[U',-0xa0,-_0x364b7c._0x598fbc,-_0x364b7c._0x2a02a4)])){const _0x4e6d8a=(0x1*0x859+-0x1712*-0x1+-0x47d*0x7,_0xdd755c[_0x50a6d3(0x1ce,_0x364b7c._0x5e31fd,_0x364b7c._0x142195,_0x364b7c._0x2a8a7e)+'c'])(_0x56d9fd[_0x50a6d3(_0x364b7c._0x56b4da,0x1e2,_0x364b7c._0x1fe30e,0x1d9)]),_0x5025df={..._0x56d9fd};return _0x5025df[_0x50a6d3(_0x364b7c._0x1489ce,0x1f3,'hmCi',0x1ed)]=_0x4e6d8a,_0x5025df;}function _0xc0cedb(_0x4e6db1,_0x45e378,_0x2bf2dc,_0x8f1b95){return _0x228f7b(_0x8f1b95-_0x2f8d7b._0x41d514,_0x45e378-0x103,_0x2bf2dc-_0x2f8d7b._0x471615,_0x4e6db1);}function _0x50a6d3(_0x2f3df4,_0x281d36,_0x2f2d22,_0x41968e){return _0x5a29d6(_0x2f3df4-0xa2,_0x281d36-_0x35f548._0x225c53,_0x2f2d22,_0x41968e- -0x19);}return _0x56d9fd;});}else{const _0x23bada=(-0x1d63*0x1+0x1*0x6b+0x1cf8,crypto_service_1[_0x5a29d6(_0x5d4b90._0x59eacd,_0x5d4b90._0x30d3ad,'%mQp',_0x5d4b90._0x247223)+'c'])(_0x45826b[_0x5a29d6(0x1fc,_0x5d4b90._0xf45897,_0x5d4b90._0xa8ed98,0x1f4)]),_0x1f1060={..._0x45826b};return _0x1f1060[_0x5a29d6(_0x5d4b90._0x3ac962,_0x5d4b90._0x432286,'zQdv',_0x5d4b90._0x5a246d)]=_0x23bada,_0x1f1060;}}return _0x45826b;}[_0x5553e3('DJx)',0x457,0x436,0x41d)](){const _0x162c2e={_0x443c12:0xba,_0x48b27a:0xc9,_0x4c7c00:'R1(V',_0x29a4c1:0x233,_0x18aa3f:'(A7Z',_0x5671ed:0x238,_0x136a6a:'XeFY',_0x3c5ced:0x128,_0x2d2f8c:0x11b,_0x169aa6:'m1[U',_0x5da889:0x27b,_0x31d329:0x125,_0x5dd627:0x107,_0xe33350:0x10e,_0x3b42b4:'m[I$',_0x2380ff:0xc8,_0x1889f6:0xe4},_0x1d61f1={_0x27d27f:0x6c,_0x58adc6:0x92,_0xa3d0d7:0x4c,_0x227d67:'OhF[',_0x12aca1:0x6f,_0x100936:0x80,_0x2e9861:'TZRZ',_0x57632d:0x276,_0x4eb399:0x254,_0x5407e2:0x229,_0x47b0b0:'S)xe',_0x7cd555:0x25f,_0x117373:0x239,_0xebc9d6:0x22e,_0x48f894:0x28b,_0x3a4523:0x270,_0x212617:0x57,_0x5ead95:0x5e,_0x593501:'eVmA',_0x108f9c:0x224,_0x5590dc:0x230,_0x3645ef:'CbIW',_0x466433:0x219,_0x5b85fc:0x56,_0x2fbef5:0x37,_0x566d25:'!v(z',_0x18b370:0x277},_0x4aee0a={_0x5e4bd8:0x10a,_0x36b444:0x335},_0x3370dd={_0x332777:0x135,_0x4fa8e4:0x23a,_0xfee450:0x1a6},_0x7d401a={_0x4e76d5:0x5c};function _0xeac74f(_0x2ef1c6,_0x4c8b2a,_0x15599d,_0x59f686){return _0x51c9dc(_0x2ef1c6-_0x7d401a._0x4e76d5,_0x4c8b2a- -0x3a4,_0x15599d-0xb5,_0x59f686);}const _0x160283={};_0x160283[_0xeac74f(_0x162c2e._0x443c12,_0x162c2e._0x48b27a,0xed,_0x162c2e._0x4c7c00)]=function(_0x290adc,_0x33d258){return _0x290adc===_0x33d258;},_0x160283[_0x46a906(0x257,_0x162c2e._0x29a4c1,0x274,_0x162c2e._0x18aa3f)]='dImAn',_0x160283[_0x46a906(_0x162c2e._0x5671ed,0x25d,0x22d,_0x162c2e._0x136a6a)]=_0xeac74f(_0x162c2e._0x3c5ced,0x108,_0x162c2e._0x2d2f8c,_0x162c2e._0x169aa6);const _0x1ce947=_0x160283;function _0x46a906(_0x4cd035,_0x1d5bdb,_0x4780c1,_0x30d7f0){return _0x51c9dc(_0x4cd035-_0x3370dd._0x332777,_0x4cd035- -_0x3370dd._0x4fa8e4,_0x4780c1-_0x3370dd._0xfee450,_0x30d7f0);}const _0x2a3cf3=role_flow_repo_1[_0x46a906(0x265,0x272,_0x162c2e._0x5da889,'4NoH')+_0xeac74f(_0x162c2e._0x31d329,0x10b,_0x162c2e._0x5dd627,'7)Ru')][_0xeac74f(0xd2,0xe8,_0x162c2e._0xe33350,_0x162c2e._0x3b42b4)]();return _0x2a3cf3[_0xeac74f(_0x162c2e._0x2380ff,_0x162c2e._0x1889f6,0xed,'hmCi')](_0xf6fba3=>{const _0x2dc996={_0x29986a:0x1ec};function _0x35e9a5(_0x1d03a9,_0x53462a,_0x3b91e1,_0x1ef8ea){return _0xeac74f(_0x1d03a9-_0x4aee0a._0x5e4bd8,_0x1ef8ea- -_0x4aee0a._0x36b444,_0x3b91e1-0x1af,_0x1d03a9);}function _0x4e7044(_0x53ad4d,_0x2da1a6,_0x3f9a52,_0xa45849){return _0x46a906(_0x53ad4d- -_0x2dc996._0x29986a,_0x2da1a6-0xcb,_0x3f9a52-0x18f,_0xa45849);}if(_0x1ce947[_0x4e7044(_0x1d61f1._0x27d27f,_0x1d61f1._0x58adc6,_0x1d61f1._0xa3d0d7,_0x1d61f1._0x227d67)](_0x1ce947[_0x4e7044(0x6b,_0x1d61f1._0x12aca1,_0x1d61f1._0x100936,'(A7Z')],_0x1ce947[_0x35e9a5(_0x1d61f1._0x2e9861,-_0x1d61f1._0x57632d,-0x26a,-_0x1d61f1._0x4eb399)])){const _0x428e3d=(-0x1*-0x412+-0x2*0x8b+-0x2fc,_0x503567[_0x35e9a5('CbIW',-0x233,-0x24f,-_0x1d61f1._0x5407e2)+'c'])(_0x10fc71['content']),_0x3de33a={..._0x5f58b2};return _0x3de33a[_0x35e9a5(_0x1d61f1._0x47b0b0,-_0x1d61f1._0x7cd555,-0x255,-_0x1d61f1._0x117373)]=_0x428e3d,_0x3de33a;}else{if(_0x1ce947[_0x35e9a5('Voj#',-0x234,-0x205,-_0x1d61f1._0xebc9d6)](_0xf6fba3[_0x35e9a5('TWEG',-_0x1d61f1._0x48f894,-_0x1d61f1._0x3a4523,-0x265)],0x1fa*0x9+0xc76+-0x1e3f)&&(-0x4e*-0xa+0xe*0x277+-0x258e,crypto_service_1[_0x4e7044(_0x1d61f1._0x212617,0x4a,_0x1d61f1._0x5ead95,'iW(R')+'d'])(_0xf6fba3[_0x35e9a5(_0x1d61f1._0x593501,-0x21f,-_0x1d61f1._0x108f9c,-_0x1d61f1._0x5590dc)])){const _0x466d98=(0x2*0x94f+-0x266c+0x13ce,crypto_service_1[_0x35e9a5(_0x1d61f1._0x3645ef,-0x241,-_0x1d61f1._0x466433,-0x229)+'c'])(_0xf6fba3[_0x4e7044(_0x1d61f1._0x5b85fc,_0x1d61f1._0x2fbef5,0x68,'MNkd')]),_0x48fe55={..._0xf6fba3};return _0x48fe55[_0x35e9a5(_0x1d61f1._0x566d25,-0x259,-_0x1d61f1._0x18b370,-0x277)]=_0x466d98,_0x48fe55;}return _0xf6fba3;}});}[_0x51c9dc(0x4ac,0x48b,0x476,'(A7Z')](_0x417708){const _0x5b633c={_0x4fe624:0x4a,_0x4692c3:'TZRZ',_0x1a755c:0x59,_0x135918:'OhF[',_0x44d10a:0x88},_0x5df906={_0x2f539c:0x276,_0x35d47c:0x2b},_0x25af20={_0x1920a4:0x506};function _0x28710a(_0x8e7a5e,_0x36f073,_0x52d517,_0x2901be){return _0x51c9dc(_0x8e7a5e-0xd5,_0x2901be- -_0x25af20._0x1920a4,_0x52d517-0x181,_0x52d517);}function _0x3575bf(_0x47f69e,_0x3134c0,_0x41d53f,_0x271b01){return _0x5553e3(_0x3134c0,_0x3134c0-0x10,_0x271b01- -_0x5df906._0x2f539c,_0x271b01-_0x5df906._0x35d47c);}return!role_flow_repo_1['roleFlowRe'+_0x28710a(-0x3f,-_0x5b633c._0x4fe624,_0x5b633c._0x4692c3,-_0x5b633c._0x1a755c)][_0x28710a(-0x77,-0x9a,_0x5b633c._0x135918,-_0x5b633c._0x44d10a)](_0x417708);}}exports[_0x5553e3('siF6',0x452,0x45b,0x478)+_0x51c9dc(0x472,0x48a,0x474,'6*vl')]=RoleFlowService,exports[_0x5553e3('d0KH',0x414,0x41a,0x40b)+_0x5553e3('OhF[',0x445,0x420,0x439)]=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