opclawtm-cli 1.3.5 → 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.
- 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 +1686 -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
package/dist/core/utils/index.js
CHANGED
|
@@ -1 +1,462 @@
|
|
|
1
|
-
'use strict';(function(_0x2f9163,_0x1d6fbf){const _0x1352b4={_0x2f1652:0x305,_0x1ff638:'Qzp6',_0x11071c:0x2e5,_0x2ea396:0x376,_0x335e75:0xf1,_0x55e229:0x73,_0xd95056:'sdUQ',_0x3c339d:'krgL',_0x15ce4b:0x395,_0x15ced0:0xf1,_0x59d8b:0x39,_0x1a84d8:'H*CO',_0x3bcd91:0xc4,_0x3ea059:'sLcW',_0x356ad3:0x96,_0x4c4eb2:0x13b,_0xcba3ad:'nq37',_0x5baa82:'IM@T',_0xfd1bcb:0xd2},_0x40ead6={_0x49f622:0x18c},_0x362dcb={_0x3c69c3:0x228};function _0xe48d74(_0x44578e,_0x45a99a,_0x480665,_0x8f64a5){return _0x47e4(_0x480665- -_0x362dcb._0x3c69c3,_0x8f64a5);}function _0xdb69aa(_0x5ccd1f,_0x8ea2bd,_0x35f939,_0x20ca9c){return _0x47e4(_0x35f939-_0x40ead6._0x49f622,_0x5ccd1f);}const _0x41879e=_0x2f9163();while(!![]){try{const _0x75c783=-parseInt(_0xdb69aa('Qzp6',0x27b,_0x1352b4._0x2f1652,0x31b))/(-0x825+-0x349*-0x7+0x4f3*-0x3)+-parseInt(_0xdb69aa('3]Qm',0x392,0x382,0x42d))/(0x1d0e*-0x1+-0x1226+0x1*0x2f36)*(-parseInt(_0xdb69aa(_0x1352b4._0x1ff638,_0x1352b4._0x11071c,_0x1352b4._0x2ea396,0x314))/(0x1*-0x1e07+-0x151e+0x3328))+-parseInt(_0xe48d74(-_0x1352b4._0x335e75,-0x93,-_0x1352b4._0x55e229,_0x1352b4._0xd95056))/(0x15*-0xb2+-0x3*-0x98b+-0xe03)+parseInt(_0xdb69aa(_0x1352b4._0x3c339d,0x426,_0x1352b4._0x15ce4b,0x415))/(-0x2aa*-0x9+-0x1*0xc0a+0x1b*-0x71)+parseInt(_0xe48d74(-0x57,-_0x1352b4._0x15ced0,-_0x1352b4._0x59d8b,_0x1352b4._0x1a84d8))/(0x8ad+-0x2278+0x19d1)*(-parseInt(_0xe48d74(-0x107,-_0x1352b4._0x3bcd91,-0xc6,_0x1352b4._0x3ea059))/(-0xbf*0x2e+-0xa50+-0xee3*-0x3))+parseInt(_0xe48d74(-_0x1352b4._0x356ad3,-_0x1352b4._0x4c4eb2,-0xd8,_0x1352b4._0xcba3ad))/(-0xa61+-0x19f5+0x245e)+-parseInt(_0xe48d74(-0x17d,-0xd5,-0xe2,_0x1352b4._0x5baa82))/(0x815+0x23e3*-0x1+0x1bd7)*(parseInt(_0xe48d74(-0x1ea,-_0x1352b4._0xfd1bcb,-0x138,'IM@T'))/(-0x6*-0x2f5+0x1937+0x2aeb*-0x1));if(_0x75c783===_0x1d6fbf)break;else _0x41879e['push'](_0x41879e['shift']());}catch(_0x1cb789){_0x41879e['push'](_0x41879e['shift']());}}}(_0x1e27,-0x2*0x32237+0x58539+0x514d4));function _0x2eb0d7(_0x1e12c9,_0x34b764,_0x17255b,_0x5997cf){return _0x47e4(_0x34b764- -0x12b,_0x5997cf);}var __createBinding=this&&this[_0x2eb0d7(-0x6b,0x50,-0x5c,'!v14')+_0x1458f5(-0x19b,'IM@T',-0x184,-0xf0)]||(Object[_0x2eb0d7(0x12f,0x106,0x108,'ZT4A')]?function(_0x5eee65,_0x2be048,_0x1ced37,_0x147345){const _0x23431d={_0x3e3271:'gGjW',_0x2313b8:0x5ee,_0x354b8e:0x508,_0x162e31:0x539,_0xb5f381:0x513,_0x5912fd:0xf5,_0x1a72c1:'gEVZ',_0x4026e6:0x164,_0x1179d2:0x519,_0x4e1d1c:'G#jE',_0x2b65d3:0x154,_0x1578b0:0xd0,_0x13e93e:'!I6k',_0x4f31de:0x5e,_0x28b060:0x48d,_0x1931c4:0x4dc,_0x270682:0x59c,_0xd6b340:'txLZ',_0x84c2dd:0x582,_0x1d870c:0x4a7,_0x124cc0:0x4a8,_0x127255:'uAi9',_0x4f9cc8:0x17d,_0x8e435d:0x1cf,_0x4688e6:'sgPd',_0x1fbb79:0x15c},_0x2964cd={_0x178319:0x476,_0x3ba364:0xb1},_0x4bf92e={_0x583368:0x18e,_0x5d3fe8:0x155,_0x2b5fad:0x2d},_0x52dc3e={};function _0x9cceb(_0x53e113,_0x3ad634,_0x4aa877,_0x59a211){return _0x1458f5(_0x53e113-_0x4bf92e._0x583368,_0x53e113,_0x4aa877-_0x4bf92e._0x5d3fe8,_0x4aa877- -_0x4bf92e._0x2b5fad);}_0x52dc3e[_0x399a4f(0x551,0x4b5,_0x23431d._0x3e3271,_0x23431d._0x2313b8)]=function(_0x2f1691,_0x4d3f72){return _0x2f1691===_0x4d3f72;};function _0x399a4f(_0x969e9f,_0x29efe9,_0x39a8e0,_0x15ad47){return _0x2eb0d7(_0x969e9f-0x1ea,_0x969e9f-_0x2964cd._0x178319,_0x39a8e0-_0x2964cd._0x3ba364,_0x39a8e0);}_0x52dc3e[_0x399a4f(_0x23431d._0x354b8e,_0x23431d._0x162e31,'Qzp6',_0x23431d._0xb5f381)]=function(_0xe18e03,_0x54caa6){return _0xe18e03 in _0x54caa6;},_0x52dc3e[_0x9cceb('4Ur1',-0x15a,-_0x23431d._0x5912fd,-0xc2)]=_0x9cceb(_0x23431d._0x1a72c1,-0x183,-0x1d7,-_0x23431d._0x4026e6);const _0x377c73=_0x52dc3e;if(_0x377c73[_0x399a4f(0x556,_0x23431d._0x1179d2,'GH1b',0x53e)](_0x147345,undefined))_0x147345=_0x1ced37;var _0x309b60=Object['getOwnProp'+_0x399a4f(0x591,0x5af,_0x23431d._0x4e1d1c,0x608)+_0x9cceb('krgL',-_0x23431d._0x2b65d3,-_0x23431d._0x1578b0,-0x18a)](_0x2be048,_0x1ced37);if(!_0x309b60||(_0x377c73[_0x9cceb(_0x23431d._0x13e93e,-0x4b,-_0x23431d._0x4f31de,-0x9f)](_0x377c73[_0x399a4f(_0x23431d._0x28b060,_0x23431d._0x1931c4,'Ev1O',0x447)],_0x309b60)?!_0x2be048[_0x399a4f(0x496,0x4be,'sdUQ',0x4f4)]:_0x309b60[_0x399a4f(_0x23431d._0x270682,0x5f7,_0x23431d._0xd6b340,_0x23431d._0x84c2dd)]||_0x309b60[_0x399a4f(0x4e5,_0x23431d._0x1d870c,'4GP9',_0x23431d._0x124cc0)+'le'])){const _0x2c5e1f={};_0x2c5e1f['enumerable']=!![],_0x2c5e1f[_0x9cceb(_0x23431d._0x127255,-_0x23431d._0x4f9cc8,-_0x23431d._0x8e435d,-0x24d)]=function(){return _0x2be048[_0x1ced37];},_0x309b60=_0x2c5e1f;}Object[_0x9cceb(_0x23431d._0x4688e6,-0x114,-_0x23431d._0x1fbb79,-0x1ab)+'erty'](_0x5eee65,_0x147345,_0x309b60);}:function(_0x4f0ec1,_0x4d8751,_0xfa0f9,_0x13bb40){const _0x59ad1d={_0x4cc3db:0x2c6,_0x7e2ea0:0x2f1,_0x37ce61:'4GP9',_0x17e513:0x151,_0x2239bf:0x9b},_0x1f2fe8={_0x243a22:0xc,_0xdedf1:0x2d0},_0xae5446={_0x1744cc:0x198,_0x15500e:0x6f},_0x473928={};_0x473928[_0x442548(_0x59ad1d._0x4cc3db,_0x59ad1d._0x7e2ea0,0x39b,_0x59ad1d._0x37ce61)]=function(_0x4d21f4,_0x447616){return _0x4d21f4===_0x447616;};function _0x5aed47(_0xae6476,_0x42e9bc,_0x1ba5ee,_0x27c7a3){return _0x2eb0d7(_0xae6476-_0xae5446._0x1744cc,_0x1ba5ee-0x14d,_0x1ba5ee-_0xae5446._0x15500e,_0x42e9bc);}const _0x24bcfb=_0x473928;if(_0x24bcfb[_0x5aed47(0x12b,'g(5s',_0x59ad1d._0x17e513,_0x59ad1d._0x2239bf)](_0x13bb40,undefined))_0x13bb40=_0xfa0f9;function _0x442548(_0x5e3937,_0x57fd7f,_0x55d29f,_0x487dc8){return _0x2eb0d7(_0x5e3937-_0x1f2fe8._0x243a22,_0x57fd7f-_0x1f2fe8._0xdedf1,_0x55d29f-0x14,_0x487dc8);}_0x4f0ec1[_0x13bb40]=_0x4d8751[_0xfa0f9];}),__setModuleDefault=this&&this[_0x2eb0d7(0x5f,-0x7,-0xa9,'3]Qm')+_0x1458f5(-0x6f,'^elY',-0x1f,-0x7a)]||(Object[_0x2eb0d7(0x141,0x8d,0xa3,'Ev1O')]?function(_0x23306f,_0x4ed566){const _0x1a8166={_0x10a153:0x2d0,_0x1e85eb:'ytlF',_0x2d74cf:0x371,_0x14a56c:0x2ff,_0x4724de:0x2ac,_0xaef9b1:0x2a9,_0x4b0f27:0x2ae,_0x173d99:'uAi9',_0x451228:0x18e,_0x65c127:0x408,_0x939882:0x486,_0x5d4263:0x300,_0x141743:0x341,_0x1cedf7:0x28c,_0x1e7fbe:0x2aa,_0x59b289:0x35e,_0x1100c6:0x305,_0x9513ea:0x36a},_0x1befc0={_0x573d8b:0x142,_0x39e5c6:0x436},_0x2b6a84={_0x3920d3:0x1bb,_0x972a74:0x1ad},_0x1ab854={};function _0x14db3c(_0x1f83bf,_0x5486cf,_0x1900e7,_0x425964){return _0x1458f5(_0x1f83bf-_0x2b6a84._0x3920d3,_0x1900e7,_0x1900e7-_0x2b6a84._0x972a74,_0x1f83bf-0x372);}_0x1ab854[_0x197b81(_0x1a8166._0x10a153,_0x1a8166._0x1e85eb,_0x1a8166._0x2d74cf,_0x1a8166._0x14a56c)]=_0x197b81(_0x1a8166._0x4724de,'!v14',0x2b5,_0x1a8166._0xaef9b1);const _0x1c0b69=_0x1ab854,_0x250fb7={};_0x250fb7[_0x14db3c(0x233,_0x1a8166._0x4b0f27,_0x1a8166._0x173d99,_0x1a8166._0x451228)]=!![],_0x250fb7[_0x197b81(0x3aa,'HHP9',_0x1a8166._0x65c127,_0x1a8166._0x939882)]=_0x4ed566;function _0x197b81(_0x1651f4,_0x3cb041,_0x5f4570,_0x3c09ab){return _0x1458f5(_0x1651f4-0xf4,_0x3cb041,_0x5f4570-_0x1befc0._0x573d8b,_0x5f4570-_0x1befc0._0x39e5c6);}Object[_0x197b81(_0x1a8166._0x5d4263,'9bPZ',_0x1a8166._0x141743,_0x1a8166._0x1cedf7)+_0x197b81(_0x1a8166._0x1e7fbe,'p&Hb',0x29f,_0x1a8166._0x59b289)](_0x23306f,_0x1c0b69[_0x14db3c(0x30d,_0x1a8166._0x1100c6,'%Bc*',_0x1a8166._0x9513ea)],_0x250fb7);}:function(_0x25104c,_0x13a932){const _0x1a788d={_0x3e6ef1:'Qzp6',_0x308f99:0x192,_0x5ab4b4:0x137,_0x208f3f:0x1ea,_0xce4c5f:0x227,_0x59036b:'0N]u',_0x450ed3:0x24},_0x26ab6b={_0x5aaf2f:0x148,_0x28acbb:0x16},_0x2fa2ab={};_0x2fa2ab[_0x24232a(_0x1a788d._0x3e6ef1,-_0x1a788d._0x308f99,-0x150,-_0x1a788d._0x5ab4b4)]=_0x4ab4f(-_0x1a788d._0x208f3f,'m9)7',-0x17d,-_0x1a788d._0xce4c5f);function _0x4ab4f(_0x1a567a,_0x47014a,_0x9ea7f0,_0x2d1e2b){return _0x1458f5(_0x1a567a-0x1c5,_0x47014a,_0x9ea7f0-0xc8,_0x1a567a- -0x134);}function _0x24232a(_0x663db4,_0x189bd5,_0x136b6d,_0x2376ee){return _0x1458f5(_0x663db4-_0x26ab6b._0x5aaf2f,_0x663db4,_0x136b6d-0x1c8,_0x136b6d- -_0x26ab6b._0x28acbb);}const _0x473dce=_0x2fa2ab;_0x25104c[_0x473dce[_0x24232a(_0x1a788d._0x59036b,_0x1a788d._0x450ed3,-0x5f,-0x74)]]=_0x13a932;}),__importStar=this&&this[_0x1458f5(-0x155,'m9)7',-0x14e,-0x145)+'ar']||(function(){const _0x5d629e={_0x4310c1:0x54a,_0x27ebf9:0x4fd,_0x5616e6:'Qzp6',_0x48fb16:0x522},_0x4feaa6={_0x14d3c4:0x266,_0x32ae33:'sdUQ',_0x42dda1:0x3bd,_0x4ff169:0x373,_0xed0f17:0x334,_0x255483:'CxvU',_0x27efa7:'nq37',_0x3ed6b4:0x2b8,_0x428821:0x2b5,_0x20e0bd:0x2cb,_0x2c0ff2:0x147,_0x12df1e:'HHP9',_0x1957af:0xa1,_0x213653:0x121,_0x50da34:'XPYp',_0x562f9c:'gEVZ',_0x11a7ce:0x2da,_0x3da4b1:0x267,_0x71b0a6:'GH1b',_0x3eaef2:'%Bc*',_0x52dd51:0x36f,_0x15ade7:0x37f,_0x11c2f0:'CxvU',_0x1c844e:0x396,_0x353e02:0x388,_0x1cbff8:0x32f},_0x37bb4d={_0x1ba934:0x176},_0x578dd7={_0x39fb88:0x50,_0x486bbf:0x83},_0x4b8b3c={_0x5d689d:0x1b8,_0x1c3792:'XPYp',_0x40f482:0x191,_0x4ba364:0x1e1,_0x9660d8:0x37e,_0x57269b:0x366,_0x394014:0x3cf,_0x321ffe:'ytlF',_0x3b14a6:0x37f,_0x35f04e:'Hj5I',_0x1a1a6a:0x91,_0x585709:0x1ee,_0x942684:0x15a,_0x2fd5c4:0x194,_0x19ce81:0x3b3,_0x2e614e:0x8e},_0x27c57c={_0x3a0690:'!v14',_0x4d9a5b:0x160,_0x20bc1e:'%Bc*',_0x301554:0x4e4,_0x5d6df3:0x423,_0x1cc77a:'9bPZ',_0x2a369d:0x72,_0x5271c0:0x142,_0x2dfc53:0xa9,_0x7b8eb8:'nq37',_0x34d87c:0x540,_0x3c22ce:'L)hD',_0x3ea45c:0x495,_0x5b873e:0x4de},_0x3e85cb={_0x13f59a:0x74,_0x5cb087:0x624};function _0x26824e(_0x5dfdda,_0x8b5cf8,_0x4411bb,_0x59ba69){return _0x1458f5(_0x5dfdda-_0x3e85cb._0x13f59a,_0x5dfdda,_0x4411bb-0x183,_0x59ba69-_0x3e85cb._0x5cb087);}const _0x56d9b6={'uDTzI':function(_0x464130,_0xf66556){return _0x464130!==_0xf66556;},'hykes':_0x26824e('krgL',_0x5d629e._0x4310c1,0x5a6,_0x5d629e._0x27ebf9),'rjsKB':function(_0x18a99f,_0x17e0b8){return _0x18a99f(_0x17e0b8);},'MFEMb':_0x26824e(_0x5d629e._0x5616e6,0x4c1,_0x5d629e._0x48fb16,0x515),'NRoSI':function(_0x2a8581,_0x3be166,_0xff5c45){return _0x2a8581(_0x3be166,_0xff5c45);},'hAhKB':function(_0x169d0f,_0x3566ba){return _0x169d0f(_0x3566ba);},'QKZZM':function(_0x14c695,_0x5597a1){return _0x14c695<_0x5597a1;},'KKZgq':function(_0x1c8450,_0x55609e){return _0x1c8450!==_0x55609e;},'TeggF':function(_0x3299bf,_0x9de5bd,_0x3e9e72,_0x144fbc){return _0x3299bf(_0x9de5bd,_0x3e9e72,_0x144fbc);}};var _0x33a919=function(_0x3b6d84){const _0x181164={_0x24bd37:0x150},_0x2c7228={_0x97e13:0x9},_0x22324b={_0x399631:0x13f},_0xaa6cd1={_0x316c0e:0x12e,_0x3f572d:0xaa};function _0x11f9f3(_0x2dd725,_0x348425,_0x177646,_0x9a918a){return _0x45ce5b(_0x2dd725- -_0xaa6cd1._0x316c0e,_0x348425,_0x177646-_0xaa6cd1._0x3f572d,_0x9a918a-0x115);}function _0x31a0dc(_0x3729b3,_0x53f0d1,_0x4f26c4,_0x2d4955){return _0x45ce5b(_0x3729b3-0x3d9,_0x53f0d1,_0x4f26c4-0x9b,_0x2d4955-_0x22324b._0x399631);}return _0x56d9b6[_0x11f9f3(-_0x4b8b3c._0x5d689d,_0x4b8b3c._0x1c3792,-_0x4b8b3c._0x40f482,-_0x4b8b3c._0x4ba364)](_0x31a0dc(_0x4b8b3c._0x9660d8,'hQPv',_0x4b8b3c._0x57269b,0x2ee),_0x56d9b6[_0x31a0dc(_0x4b8b3c._0x394014,_0x4b8b3c._0x321ffe,_0x4b8b3c._0x3b14a6,0x3ad)])?_0x11f9f3(-0x145,_0x4b8b3c._0x35f04e,-_0x4b8b3c._0x1a1a6a,-_0x4b8b3c._0x585709)+(-0x227f+0x1909+-0x15a*-0x7,_0x15da22['v4'])()['slice'](0xe36+-0x1c52+0x2b*0x54,-0x2088+-0x1d3b+0x3dcf):(_0x33a919=Object[_0x11f9f3(-_0x4b8b3c._0x942684,'0N]u',-_0x4b8b3c._0x2fd5c4,-0xbb)+_0x31a0dc(_0x4b8b3c._0x19ce81,'5Di6',0x440,0x3fd)]||function(_0x41c36e){var _0x3ae801=[];function _0x482fb2(_0x5c6837,_0x312804,_0xf8b872,_0x286cda){return _0x11f9f3(_0x286cda-0x26e,_0x5c6837,_0xf8b872-_0x2c7228._0x97e13,_0x286cda-0x101);}function _0x39e829(_0x5f3524,_0xf999e5,_0xda9211,_0x5c7d2e){return _0x11f9f3(_0x5c7d2e-0x677,_0x5f3524,_0xda9211-0x50,_0x5c7d2e-_0x181164._0x24bd37);}for(var _0x27fe15 in _0x41c36e)if(Object[_0x482fb2(_0x27c57c._0x3a0690,0x178,_0x27c57c._0x4d9a5b,0x190)][_0x39e829(_0x27c57c._0x20bc1e,_0x27c57c._0x301554,_0x27c57c._0x5d6df3,0x493)+_0x482fb2(_0x27c57c._0x1cc77a,_0x27c57c._0x2a369d,_0x27c57c._0x5271c0,_0x27c57c._0x2dfc53)][_0x39e829(_0x27c57c._0x7b8eb8,0x53e,_0x27c57c._0x34d87c,0x4a3)](_0x41c36e,_0x27fe15))_0x3ae801[_0x3ae801[_0x39e829(_0x27c57c._0x3c22ce,_0x27c57c._0x3ea45c,0x508,_0x27c57c._0x5b873e)]]=_0x27fe15;return _0x3ae801;},_0x56d9b6[_0x11f9f3(-0x146,'kt(H',-_0x4b8b3c._0x2e614e,-0x1b6)](_0x33a919,_0x3b6d84));};function _0x45ce5b(_0x12b7e1,_0x3a62d2,_0x1d33f5,_0x33aa97){return _0x1458f5(_0x12b7e1-0x1a8,_0x3a62d2,_0x1d33f5-_0x578dd7._0x39fb88,_0x12b7e1-_0x578dd7._0x486bbf);}return function(_0x33f5ec){const _0x5993c4={_0x329a0a:0xf2},_0x2019ae=_0x56d9b6[_0x34d5c5(-0x27a,-_0x4feaa6._0x14d3c4,-0x1df,'9dc8')][_0x4a308a(_0x4feaa6._0x32ae33,_0x4feaa6._0x42dda1,_0x4feaa6._0x4ff169,_0x4feaa6._0xed0f17)]('|');function _0x4a308a(_0x1ec42a,_0x4bfc83,_0xdd1c88,_0x536ce9){return _0x45ce5b(_0xdd1c88-0x35d,_0x1ec42a,_0xdd1c88-_0x5993c4._0x329a0a,_0x536ce9-0x16f);}function _0x34d5c5(_0x48cb3a,_0x526a33,_0x3f7fe3,_0x4fc495){return _0x26824e(_0x4fc495,_0x526a33-0x12e,_0x3f7fe3-_0x37bb4d._0x1ba934,_0x526a33- -0x6e1);}let _0x31ce63=0x268f*-0x1+0x1*-0x1573+-0x1e01*-0x2;while(!![]){switch(_0x2019ae[_0x31ce63++]){case'0':if(_0x33f5ec&&_0x33f5ec[_0x34d5c5(-0x1bf,-0x241,-0x1cb,_0x4feaa6._0x255483)])return _0x33f5ec;continue;case'1':_0x56d9b6[_0x4a308a(_0x4feaa6._0x27efa7,_0x4feaa6._0x3ed6b4,_0x4feaa6._0x428821,_0x4feaa6._0x20e0bd)](__setModuleDefault,_0x176bfa,_0x33f5ec);continue;case'2':var _0x176bfa={};continue;case'3':if(_0x33f5ec!=null){for(var _0x25057a=_0x56d9b6[_0x34d5c5(-0x161,-0x1d4,-_0x4feaa6._0x2c0ff2,_0x4feaa6._0x12df1e)](_0x33a919,_0x33f5ec),_0x5e7729=-0x71*-0x43+-0x1*0x2513+0x780;_0x56d9b6[_0x34d5c5(-_0x4feaa6._0x1957af,-_0x4feaa6._0x213653,-0x125,_0x4feaa6._0x50da34)](_0x5e7729,_0x25057a[_0x4a308a(_0x4feaa6._0x562f9c,0x2a6,_0x4feaa6._0x11a7ce,_0x4feaa6._0x3da4b1)]);_0x5e7729++)if(_0x56d9b6[_0x4a308a(_0x4feaa6._0x71b0a6,0x338,0x2e1,0x28f)](_0x25057a[_0x5e7729],_0x4a308a(_0x4feaa6._0x3eaef2,0x3e3,_0x4feaa6._0x52dd51,_0x4feaa6._0x15ade7)))_0x56d9b6[_0x4a308a(_0x4feaa6._0x11c2f0,_0x4feaa6._0x1c844e,_0x4feaa6._0x353e02,_0x4feaa6._0x1cbff8)](__createBinding,_0x176bfa,_0x33f5ec,_0x25057a[_0x5e7729]);}continue;case'4':return _0x176bfa;}break;}};}()),__exportStar=this&&this[_0x2eb0d7(0x55,-0x3e,0x7d,'sgPd')+'ar']||function(_0x48b995,_0x468579){const _0x53e5ab={_0x1f13a8:'uAi9',_0x9d0898:0x65,_0x56f2d9:0x21,_0x36fa24:0x2e4,_0x12969:0x2a5,_0x1d3c3e:0x6d,_0x5b5af4:'XPYp',_0x5514a4:0x72,_0x1c1ec9:0x0,_0x8a1e4a:0x16a,_0x37f1f2:0x1e6,_0x50380b:'FV3M',_0x2e8f66:0x224},_0x3c03fa={_0xf4c6de:0x15d,_0xe06138:0xb6};function _0x3c82b0(_0x392f6c,_0x1812ff,_0x2ac0f4,_0x505b43){return _0x2eb0d7(_0x392f6c-_0x3c03fa._0xf4c6de,_0x1812ff-0x1c3,_0x2ac0f4-_0x3c03fa._0xe06138,_0x2ac0f4);}const _0xb13344={'hAizy':function(_0x3b8309,_0x3e2836){return _0x3b8309!==_0x3e2836;},'WoFfp':_0x3c82b0(0x195,0x23e,'ZT4A',0x2ae),'RvAix':function(_0x19103c,_0x480ed6,_0x33aacd,_0x43c394){return _0x19103c(_0x480ed6,_0x33aacd,_0x43c394);}};function _0x26e02a(_0x2b44e1,_0x6b3e39,_0x240752,_0x40b368){return _0x1458f5(_0x2b44e1-0x1ec,_0x6b3e39,_0x240752-0xb9,_0x40b368-0xaa);}for(var _0x831dd8 in _0x48b995)if(_0xb13344[_0x3c82b0(0x213,0x1a9,'m9)7',0x1ae)](_0x831dd8,_0xb13344[_0x26e02a(0x95,_0x53e5ab._0x1f13a8,_0x53e5ab._0x9d0898,-_0x53e5ab._0x56f2d9)])&&!Object[_0x3c82b0(_0x53e5ab._0x36fa24,0x289,'sLcW',_0x53e5ab._0x12969)][_0x26e02a(_0x53e5ab._0x1d3c3e,_0x53e5ab._0x5b5af4,-_0x53e5ab._0x5514a4,-0x2a)+_0x26e02a(_0x53e5ab._0x1c1ec9,'hQPv',0x36,0x5b)][_0x3c82b0(_0x53e5ab._0x8a1e4a,0x221,'krgL',_0x53e5ab._0x37f1f2)](_0x468579,_0x831dd8))_0xb13344[_0x3c82b0(0x106,0x1c0,_0x53e5ab._0x50380b,_0x53e5ab._0x2e8f66)](__createBinding,_0x468579,_0x48b995,_0x831dd8);};const _0x15178e={};_0x15178e[_0x2eb0d7(0x1d9,0x11f,0x148,'IM@T')]=!![],Object[_0x1458f5(-0xd4,'sgPd',-0x10f,-0x12f)+_0x2eb0d7(0xc8,0x10e,0x13d,'CxvU')](exports,_0x2eb0d7(-0x4e,0x55,-0x2e,'nJBR'),_0x15178e),exports[_0x2eb0d7(0x98,0x129,0x7c,'m9)7')]=void(0x564+-0xdeb+0x887),exports[_0x1458f5(-0x189,'0N]u',-0x170,-0x19d)+_0x1458f5(-0x58,'ytlF',0x3b,-0x32)]=generateTaskId,exports[_0x1458f5(-0x1a3,'^elY',-0x13a,-0x154)+_0x1458f5(-0x79,'!I6k',-0x10f,-0xb8)+_0x2eb0d7(0x29,-0xf,-0x35,'Qzp6')]=generateIncrementTaskId,exports[_0x2eb0d7(-0xa9,-0x6,0x78,'GH1b')+_0x1458f5(-0x1f6,'4Ur1',-0x16a,-0x162)]=generateStageId,exports[_0x2eb0d7(0x11,0x10,0xf,'gGjW')+'d']=parseTaskId,exports[_0x2eb0d7(-0x37,0x80,0x0,'KmuR')+'tTask']=isIncrementTask,exports[_0x1458f5(-0x173,'KmuR',-0xfc,-0xc2)+_0x2eb0d7(0x88,-0x36,0x2a,'m9)7')]=getBaseTaskId,exports[_0x1458f5(-0x149,'ytlF',-0x93,-0x125)+'deId']=generateNodeId,exports[_0x2eb0d7(0x193,0xe6,0xbc,'PXR5')+_0x2eb0d7(0x19,0xa,0x44,'!I6k')]=generateAgentId,exports[_0x1458f5(-0x153,'SgAX',-0x2b,-0xcf)+_0x1458f5(0x27,'tu]z',-0x77,-0x42)]=generateDocId,exports[_0x1458f5(-0x14b,'nq37',-0x12b,-0x93)+_0x2eb0d7(0xd4,0x9a,0x131,'tu]z')]=generateDeptId,exports['generateJo'+_0x1458f5(-0x17e,'nJBR',-0x85,-0xc3)]=generateJobId,exports['generateSk'+_0x1458f5(-0x3b,'tu]z',-0xe6,-0x73)]=generateSkillPackId,exports[_0x2eb0d7(0x68,-0x10,-0xab,'FV3M')+_0x1458f5(-0x1c9,'0N]u',-0x11d,-0x194)]=generateMessageId;function _0x1458f5(_0xa4222d,_0x5cdf3e,_0x387c03,_0x12a699){const _0x1b99a7={_0x55fa98:0x28e};return _0x47e4(_0x12a699- -_0x1b99a7._0x55fa98,_0x5cdf3e);}exports[_0x1458f5(-0x8e,'5Di6',-0x15b,-0x11c)+_0x2eb0d7(0x11,-0x16,0x39,'uAi9')]=getCurrentTimestamp,exports[_0x2eb0d7(0x11f,0xbc,0xa6,'18Yt')]=formatDate,exports[_0x1458f5(-0xf5,'!I6k',-0x16a,-0xce)+_0x1458f5(-0xa0,'!v14',-0xdc,-0xfc)]=formatDateTime,exports[_0x2eb0d7(0x4f,0x1d,-0x3c,'Hj5I')+_0x2eb0d7(0x111,0x7c,0x68,'18Yt')]=safeJsonParse,exports[_0x2eb0d7(0x10d,0xa2,0x15e,'G#jE')+_0x2eb0d7(-0x42,-0xa,-0x52,'Hj5I')]=safeJsonStringify,exports[_0x2eb0d7(0xcc,0x81,0x43,'G#jE')+'nClawRoot']=isValidOpenClawRoot,exports[_0x2eb0d7(0xa2,0x119,0x105,'sLcW')+_0x1458f5(0x3e,'*nWF',-0xb4,-0x63)]=setOpenClawRoot,exports[_0x1458f5(-0x97,'nq37',-0x143,-0xab)+_0x1458f5(-0x164,'GH1b',-0x76,-0x100)]=getOpenClawRoot,exports[_0x1458f5(0x1a,'HHP9',0x53,-0x3b)+_0x1458f5(-0x1e3,'ZT4A',-0xcb,-0x158)+'t']=hasCustomOpenClawRoot,exports[_0x1458f5(-0x13d,'L)hD',-0x154,-0x192)+_0x2eb0d7(0xed,0xbd,0x125,'tu]z')]=resetOpenClawRoot,exports[_0x2eb0d7(0x6d,0x87,0x68,'^elY')+'t']=getTeamRoot,exports[_0x1458f5(-0x97,'9dc8',-0x6e,-0x5b)+_0x2eb0d7(0x1bc,0x10d,0x16f,'5Di6')]=getDatabasePath,exports[_0x2eb0d7(0x3a,0xa5,-0x1b,'nJBR')]=getTaskDir,exports[_0x1458f5(-0x8d,'hQPv',-0x66,-0xa1)+'r']=getFlowsDir,exports[_0x1458f5(-0x1b1,'gEVZ',-0xc6,-0x103)+_0x2eb0d7(0xe3,0xb2,0x149,'nq37')]=getAgentWorkspace,exports[_0x2eb0d7(0x4f,0xda,0xa1,'m9)7')+'r']=getAgentDir,exports[_0x2eb0d7(0x6c,0xe4,0x2e,'hQPv')+_0x2eb0d7(-0x4,0x46,-0x74,'sgPd')]=getAgentSessionsDir,exports[_0x2eb0d7(0x11,0x2d,0xac,'KmuR')+_0x1458f5(-0x12e,'XPYp',-0x5b,-0x10b)]=getOpenClawJsonPath,exports[_0x1458f5(-0xc3,'0N]u',-0x1a6,-0x160)+_0x2eb0d7(0x70,0x116,0x7d,'G#jE')]=getCredentialsDir,exports[_0x1458f5(-0xb6,'uAi9',-0x75,-0x9c)+_0x2eb0d7(0xb3,0x110,0x10d,'18Yt')+_0x2eb0d7(-0xe7,-0x27,-0x39,'gEVZ')]=getFeishuCredentialsDir,exports[_0x2eb0d7(0x151,0xdf,0xb6,'PXR5')+_0x1458f5(-0x163,'sdUQ',-0x1fd,-0x156)]=getAuthProfilesPath,exports[_0x1458f5(-0x97,'hQPv',-0x87,-0x57)+_0x1458f5(-0x8,'SgAX',-0x129,-0xb2)]=getModelsJsonPath,exports[_0x1458f5(-0x14e,'PXR5',-0x153,-0x13b)]=isValidId,exports[_0x1458f5(-0x183,'H*CO',-0x168,-0xf3)+'e']=isValidRole,exports[_0x2eb0d7(0x91,0xd9,0x3d,'5Di6')+_0x1458f5(-0x9a,'GH1b',-0x131,-0xd3)]=isValidTaskStatus,exports[_0x2eb0d7(-0x71,0x26,0xb6,'txLZ')+_0x2eb0d7(-0x7c,0x22,-0x56,'uAi9')]=isValidNodeStatus,exports[_0x1458f5(-0x39,'nJBR',-0x37,-0xe9)]=log;const uuid_1=require(_0x2eb0d7(0x35,0x66,0xd6,'HHP9'));function generateTaskId(){const _0x2890ac={_0x34dfcf:'p&Hb',_0x18ef58:0x331,_0xfd711e:0x34f,_0x54bc8f:0x304,_0x2af2d8:0x203,_0x128f66:0x140,_0xd82292:0x3c4,_0x3c7a02:0x345},_0x108e58={_0x218064:0xe3,_0x46f2e2:0x141};function _0x8623(_0xae459a,_0x212f28,_0x1738fc,_0x3c1feb){return _0x2eb0d7(_0xae459a-_0x108e58._0x218064,_0x3c1feb- -_0x108e58._0x46f2e2,_0x1738fc-0x122,_0x212f28);}function _0x36973b(_0x452d0e,_0x2efcaa,_0x1956c7,_0x4081cf){return _0x2eb0d7(_0x452d0e-0x175,_0x2efcaa-0x279,_0x1956c7-0xca,_0x1956c7);}const _0x4c5f01=new Date(),_0x49149b=_0x4c5f01[_0x36973b(0x3a9,0x39e,_0x2890ac._0x34dfcf,_0x2890ac._0x18ef58)+'g']()[_0x8623(-0xca,'Qzp6',-0x102,-0x101)](-0x13cf*-0x1+-0xacb*0x1+-0x904,-0x682*0x3+0xb5*-0x1d+0x2811)[_0x36973b(_0x2890ac._0xfd711e,_0x2890ac._0x54bc8f,'18Yt',0x31f)](/-/g,''),_0x39372e=(-0x3b3*0x4+-0x17cd+0x2699,uuid_1['v4'])()[_0x8623(-_0x2890ac._0x2af2d8,'sLcW',-_0x2890ac._0x128f66,-0x189)](-0x46*-0xa+0xa8a+-0xd46,-0x6c3+0x1*0x26ef+-0x2024);return _0x36973b(_0x2890ac._0xd82292,_0x2890ac._0x3c7a02,'sgPd',0x299)+_0x49149b+'_'+_0x39372e;}function generateIncrementTaskId(_0x3d3527,_0x13b0c8){const _0x25b1fb={_0x1606c9:'!I6k',_0x42f626:0x1f7,_0x2c3110:0x143,_0x417709:0x474,_0x4bdba8:0x4b1,_0x2b863a:0x4b0},_0xefd104={_0x1663ab:0x51},_0xe98d39={_0x1415c5:0x83,_0x476f3f:0x9f};function _0x4b2a0d(_0x152f24,_0x4385d0,_0x801810,_0x2e9185){return _0x2eb0d7(_0x152f24-_0xe98d39._0x1415c5,_0x4385d0-0x3a3,_0x801810-_0xe98d39._0x476f3f,_0x152f24);}function _0x54ba11(_0x1338cc,_0x10c778,_0xccfa49,_0x14a05e){return _0x2eb0d7(_0x1338cc-_0xefd104._0x1663ab,_0x14a05e-0x6b,_0xccfa49-0x12c,_0x1338cc);}const _0x54fc9b={'rMCeq':function(_0x2ee21f,_0x11f344){return _0x2ee21f(_0x11f344);}},_0xc36f4d=_0x54fc9b[_0x54ba11(_0x25b1fb._0x1606c9,0xb6,_0x25b1fb._0x42f626,_0x25b1fb._0x2c3110)](String,_0x13b0c8)[_0x4b2a0d('GH1b',_0x25b1fb._0x417709,_0x25b1fb._0x4bdba8,_0x25b1fb._0x2b863a)](-0x7*-0x295+0x146*0xc+-0x2*0x10ac,'0');return _0x3d3527+'_'+_0xc36f4d;}function generateStageId(_0xbefb0c,_0x5cadec){const _0xf481d5={_0x3cd109:'sdUQ',_0x34812f:0x226},_0x4eacc4={_0x4ddff8:0x1ca};function _0x2043cc(_0x53768e,_0x1c4a8a,_0x4bf2bd,_0x594cf5){return _0x2eb0d7(_0x53768e-0x7e,_0x1c4a8a-_0x4eacc4._0x4ddff8,_0x4bf2bd-0x1a1,_0x53768e);}return _0x2043cc(_0xf481d5._0x3cd109,0x1e4,0x274,_0xf481d5._0x34812f)+_0xbefb0c+'_'+_0x5cadec;}function parseTaskId(_0x413358){const _0x4b02fa={_0x83d9ca:0x88,_0x129a90:0x41a,_0x1b0fcc:0xbb},_0x2499e0={'lGDfR':function(_0x1da105,_0x1b0b4e,_0x36c9d2){return _0x1da105(_0x1b0b4e,_0x36c9d2);}};function _0x39a778(_0x533f57,_0x44bdc0,_0x3bedf7,_0x3ca543){return _0x2eb0d7(_0x533f57-_0x4b02fa._0x83d9ca,_0x44bdc0-_0x4b02fa._0x129a90,_0x3bedf7-_0x4b02fa._0x1b0fcc,_0x3ca543);}const _0x14e092=_0x413358[_0x39a778(0x3ac,0x42f,0x3a4,'FV3M')](/^(task_\d{8}_[a-f0-9]{8})_(\d{3})$/);if(_0x14e092)return{'baseTaskId':_0x14e092[-0x67*-0x55+0x18d2+-0x4eb*0xc],'incrementIndex':_0x2499e0['lGDfR'](parseInt,_0x14e092[0x337+-0x1*0x1db1+0x1a7c],-0x52*-0x2a+-0x15ef+0x885)};return null;}function isIncrementTask(_0x5b71f8){const _0x1ff12b={_0x58a4db:0x503},_0x472291={_0x1757b1:0x164,_0x35e8ef:0x4d6};function _0x5b12a4(_0x2af117,_0x67169,_0x4dc407,_0x7bcee2){return _0x1458f5(_0x2af117-_0x472291._0x1757b1,_0x4dc407,_0x4dc407-0x149,_0x67169-_0x472291._0x35e8ef);}const _0x1762ad={'DYBYj':function(_0x5c33c2,_0x2119a1){return _0x5c33c2!==_0x2119a1;},'TrHPs':function(_0x3c4fe5,_0x2f7979){return _0x3c4fe5(_0x2f7979);}};return _0x1762ad['DYBYj'](_0x1762ad[_0x5b12a4(0x46b,0x46e,'*nWF',_0x1ff12b._0x58a4db)](parseTaskId,_0x5b71f8),null);}function getBaseTaskId(_0xe474a2){const _0x352a00={_0x5773d5:0x5da,_0x3e9486:'4GP9',_0x4f00e9:0x57e},_0x44c573={_0x2bc6fa:0xda},_0x4ed6ae={_0x464289:0xf2,_0x3f7194:0x51};function _0x4511ca(_0x58df7a,_0x58f73b,_0x276eac,_0x508813){return _0x2eb0d7(_0x58df7a-0xdc,_0x276eac- -_0x4ed6ae._0x464289,_0x276eac-_0x4ed6ae._0x3f7194,_0x508813);}const _0x7a9301={'fADZt':function(_0x331d8c,_0x1bf64a){return _0x331d8c(_0x1bf64a);}},_0x1d5385=_0x7a9301[_0xf668c4(0x54f,_0x352a00._0x5773d5,0x51d,_0x352a00._0x3e9486)](parseTaskId,_0xe474a2);function _0xf668c4(_0x48c51d,_0x35ff08,_0x114516,_0x2862e5){return _0x1458f5(_0x48c51d-_0x44c573._0x2bc6fa,_0x2862e5,_0x114516-0xa7,_0x114516-0x599);}return _0x1d5385?_0x1d5385[_0xf668c4(_0x352a00._0x4f00e9,0x4c6,0x50a,'sdUQ')]:null;}function generateNodeId(){const _0x420299={_0x2d1c33:0x187,_0x37fafa:0x242,_0x4ce350:'m9)7'},_0x179990={_0x518964:0x5};function _0x331663(_0x12704f,_0x16865a,_0x7e9694,_0x5927ed){return _0x2eb0d7(_0x12704f-_0x179990._0x518964,_0x5927ed-0x16d,_0x7e9694-0x16,_0x12704f);}function _0x262e2d(_0x15cf28,_0x416b8b,_0x5d9973,_0x58edda){return _0x2eb0d7(_0x15cf28-0x116,_0x58edda- -0x271,_0x5d9973-0xe8,_0x5d9973);}return _0x331663('9bPZ',0x11b,_0x420299._0x2d1c33,0x198)+(0x8*0x3a3+0x8*0x208+-0xb56*0x4,uuid_1['v4'])()[_0x262e2d(-_0x420299._0x37fafa,-0x217,_0x420299._0x4ce350,-0x1ac)](0x163*-0x9+-0x61*0x3b+0x22d6,-0x104a+-0x2c6+0x131c);}function generateAgentId(){const _0x46313c={_0x49382f:0x11b,_0x436f2f:0x1b9,_0x2e809e:'9bPZ',_0x2d794a:0x80},_0x4bdda4={_0x5639ed:0x16d},_0x409bf1={_0x4bbe7e:0x1a,_0x316de9:0x14e,_0x51b43b:0x1ea};function _0x4a4ffd(_0x13deb3,_0x3104bc,_0x245105,_0x288749){return _0x2eb0d7(_0x13deb3-_0x409bf1._0x4bbe7e,_0x288749-_0x409bf1._0x316de9,_0x245105-_0x409bf1._0x51b43b,_0x13deb3);}function _0x2c6f88(_0xe686eb,_0x5e2dc,_0x5a1ea6,_0x494ade){return _0x2eb0d7(_0xe686eb-_0x4bdda4._0x5639ed,_0x5e2dc- -0x207,_0x5a1ea6-0x1b8,_0x494ade);}return _0x2c6f88(-0x1bf,-_0x46313c._0x49382f,-_0x46313c._0x436f2f,'Hj5I')+(-0x3fb+-0x1*0x1859+-0xe2a*-0x2,uuid_1['v4'])()[_0x4a4ffd(_0x46313c._0x2e809e,_0x46313c._0x2d794a,0x19e,0x124)](-0x482+0xded+-0x96b,0x1*0x1703+0x4*-0x87+-0x13*0x119);}function generateDocId(){const _0x184bfd={_0xf27bf8:0xa0,_0x311b8d:0x28e},_0x34a52e={_0x50cdaf:0x131,_0xc6dce8:0x5b,_0xa6f20a:0x10},_0x59de53={_0x51c7e4:0x63};function _0x45929d(_0x129391,_0x27f08c,_0x2474c2,_0x51b020){return _0x2eb0d7(_0x129391-0x18c,_0x51b020-0x2be,_0x2474c2-_0x59de53._0x51c7e4,_0x129391);}function _0x5de68c(_0xb2f654,_0x4267c7,_0xcd090,_0x21508a){return _0x2eb0d7(_0xb2f654-_0x34a52e._0x50cdaf,_0xb2f654- -_0x34a52e._0xc6dce8,_0xcd090-_0x34a52e._0xa6f20a,_0xcd090);}return _0x5de68c(-0x55,0xd,'IM@T',-_0x184bfd._0xf27bf8)+(0x12*0xc+0x7*0x2fb+-0x15b5*0x1,uuid_1['v4'])()[_0x45929d('HHP9',0x232,0x279,_0x184bfd._0x311b8d)](-0x1*0xa05+-0x1817+0x25*0xec,-0x8c6*0x1+-0x1e24+0x26f6*0x1);}function generateDeptId(){const _0x407fae={_0x4df130:0x1ca,_0x423afa:0x2dc,_0x5cfae6:0x238,_0x54ed97:0x1d6,_0x3ea0a7:'IM@T',_0xd08e3b:0x21d};function _0x1212a1(_0x4cf8a1,_0xcf39ae,_0x47edb8,_0x31e557){return _0x1458f5(_0x4cf8a1-0x62,_0xcf39ae,_0x47edb8-0x98,_0x31e557-0x2c9);}function _0x1ec084(_0x555d0b,_0x2717be,_0x143df4,_0x744b63){return _0x1458f5(_0x555d0b-0x86,_0x744b63,_0x143df4-0x122,_0x143df4- -0x26);}return _0x1212a1(_0x407fae._0x4df130,'m9)7',_0x407fae._0x423afa,_0x407fae._0x5cfae6)+(-0x1*-0x1463+-0x10ba+-0x1*0x3a9,uuid_1['v4'])()[_0x1212a1(_0x407fae._0x54ed97,_0x407fae._0x3ea0a7,0x23d,_0x407fae._0xd08e3b)](0x9*-0x30b+0x110*0x24+-0xadd*0x1,-0xbcb*0x1+-0x1*-0x11+0x12d*0xa);}function generateJobId(){const _0xd328cd={_0x1dc35f:0x1e,_0x33988d:0x5,_0x2e4b41:0x382,_0x18a713:'HHP9'},_0x51970e={_0x215fdb:0x9a};function _0x4e5b09(_0x2c6568,_0x49ed25,_0x7fcc9,_0x104ed9){return _0x1458f5(_0x2c6568-0x193,_0x49ed25,_0x7fcc9-0x143,_0x7fcc9-0x14b);}function _0x33920f(_0x1e8431,_0xca5e8f,_0x4aa92a,_0x4648d1){return _0x1458f5(_0x1e8431-_0x51970e._0x215fdb,_0x4648d1,_0x4aa92a-0x3c,_0x4aa92a-0x515);}return _0x4e5b09(_0xd328cd._0x1dc35f,'m9)7',-_0xd328cd._0x33988d,0x28)+(0x105e+-0xbcb*0x1+-0x1*0x493,uuid_1['v4'])()[_0x33920f(0x2c5,_0xd328cd._0x2e4b41,0x382,_0xd328cd._0x18a713)](0x2f*0x29+-0x13*0x67+0x1e,0x1*0xa4f+0x1ba4+-0x25eb);}function generateSkillPackId(){const _0x495bc7={_0xb70a72:0xe4,_0x548bed:0x14a,_0x5189f9:0x1e3,_0x47f867:'tu]z',_0x181af3:0x217},_0x27c46b={_0x38dfde:0xd7},_0x1504a5={_0x160205:0x1a6,_0x521329:0xb3,_0x2d56bc:0x270};function _0x12f3d4(_0x324733,_0x59489e,_0x333f04,_0x3da0bd){return _0x1458f5(_0x324733-_0x1504a5._0x160205,_0x3da0bd,_0x333f04-_0x1504a5._0x521329,_0x59489e-_0x1504a5._0x2d56bc);}function _0x4313c9(_0x5647a6,_0x34a5c4,_0x3d8057,_0x11be0f){return _0x1458f5(_0x5647a6-_0x27c46b._0x38dfde,_0x3d8057,_0x3d8057-0xc1,_0x5647a6-0x43a);}return _0x12f3d4(_0x495bc7._0xb70a72,_0x495bc7._0x548bed,_0x495bc7._0x5189f9,_0x495bc7._0x47f867)+(-0x7*-0x328+-0x2145+0x1*0xb2d,uuid_1['v4'])()[_0x12f3d4(0x20e,0x1b3,_0x495bc7._0x181af3,'!I6k')](-0x1ffc+-0x3e1*0x8+-0x3f04*-0x1,0x1a0f+0xe99+0x208*-0x14);}function generateMessageId(){const _0x41e8ed={_0x4d2052:0x31f,_0x10b957:0x2ba,_0x156674:'FV3M',_0x164ec3:0x17f,_0xbfd0b7:0x233,_0x1281fc:'4GP9'},_0x623c13={_0x32cbec:0x77},_0x27300b={_0x4628b2:0x154};function _0xbcaab6(_0x39f5c5,_0x9733cd,_0x3bfa80,_0x54d340){return _0x1458f5(_0x39f5c5-0x1c1,_0x54d340,_0x3bfa80-_0x27300b._0x4628b2,_0x9733cd-0x353);}function _0x4ab15e(_0x233417,_0x4dc0d9,_0x2f9794,_0x359893){return _0x1458f5(_0x233417-_0x623c13._0x32cbec,_0x233417,_0x2f9794-0x2b,_0x2f9794-0x324);}return _0xbcaab6(0x32d,_0x41e8ed._0x4d2052,_0x41e8ed._0x10b957,_0x41e8ed._0x156674)+(0x3*-0xc77+0x970*-0x3+-0x321*-0x15,uuid_1['v4'])()[_0xbcaab6(_0x41e8ed._0x164ec3,0x1d0,_0x41e8ed._0xbfd0b7,_0x41e8ed._0x1281fc)](0x2*0x69b+0x17dc+0x76a*-0x5,-0xbe2+-0x15f1+0x17*0x179);}function getCurrentTimestamp(){const _0x34c8fa={_0x4dbf8c:0x385,_0x1d4803:0x389},_0x53f65e={_0x151955:0x2e8};function _0x16e8e0(_0x454284,_0xecb2ed,_0x1e98bd,_0x4626e2){return _0x2eb0d7(_0x454284-0x15b,_0x1e98bd-_0x53f65e._0x151955,_0x1e98bd-0x32,_0x454284);}return new Date()[_0x16e8e0('L)hD',_0x34c8fa._0x4dbf8c,0x374,_0x34c8fa._0x1d4803)+'g']();}function formatDate(_0x4de03c){const _0x4329e4={_0x2c66bf:'sgPd',_0xc56cb1:0xb2,_0x4d9c82:'CxvU',_0x2eb5cd:0xd8},_0x37e4f4={_0x4cf96d:0x3b,_0x36c746:0x43,_0x4b6e05:0xf2},_0x4e03e5={_0x295564:0x95,_0x33a40c:0xde};function _0x2de318(_0x4c48f8,_0x44822f,_0xf91c4e,_0x1d5470){return _0x2eb0d7(_0x4c48f8-_0x4e03e5._0x295564,_0x1d5470-0x251,_0xf91c4e-_0x4e03e5._0x33a40c,_0xf91c4e);}function _0x318d53(_0x19e0c4,_0x164f64,_0x48eb53,_0x30e8b1){return _0x1458f5(_0x19e0c4-_0x37e4f4._0x4cf96d,_0x164f64,_0x48eb53-_0x37e4f4._0x36c746,_0x19e0c4-_0x37e4f4._0x4b6e05);}return _0x4de03c[_0x2de318(0x27c,0x2b5,_0x4329e4._0x2c66bf,0x248)+'g']()[_0x318d53(-_0x4329e4._0xc56cb1,_0x4329e4._0x4d9c82,-0xe7,-_0x4329e4._0x2eb5cd)](0x149b+0x1*0x26f3+-0x63*0x9a,-0x1cbd+0x3af+-0x49*-0x58);}function formatDateTime(_0x4651c1){const _0xad0d8f={_0x4a7ab7:0xc1,_0x474124:0x152,_0x1174b9:0x198,_0x5df3ab:0x465,_0x4660e2:0x508},_0x4820a1={_0x18298d:0x1ac},_0xc0b499={_0x4f7671:0x11a};function _0x57e906(_0x4f55a5,_0x20c566,_0x6d1a3,_0x1a7c39){return _0x2eb0d7(_0x4f55a5-_0xc0b499._0x4f7671,_0x1a7c39-0x4a3,_0x6d1a3-0x28,_0x20c566);}function _0x36e77e(_0x3d9646,_0x1b0048,_0xc859,_0x4e8f85){return _0x2eb0d7(_0x3d9646-0x26,_0x1b0048- -_0x4820a1._0x18298d,_0xc859-0x18a,_0x4e8f85);}return _0x4651c1[_0x36e77e(-_0xad0d8f._0x4a7ab7,-_0xad0d8f._0x474124,-_0xad0d8f._0x1174b9,'txLZ')+'g']()['replace']('T','\x20')[_0x57e906(_0xad0d8f._0x5df3ab,'sdUQ',0x480,_0xad0d8f._0x4660e2)](-0xaec+-0x7*0x503+-0x2e01*-0x1,-0x1*0x18b5+-0x239d+-0x3c65*-0x1);}function safeJsonParse(_0x52c068,_0x1e091d){const _0x38db10={_0x142228:0x4bd,_0x356ba1:'g(5s',_0x12c482:0x521,_0x221844:'Ev1O',_0x8749a5:0x449,_0x31c1a8:0x417,_0x144df2:0x381,_0x5c977a:0x449,_0x5de75a:'uAi9',_0x27e2e1:0x35e,_0x2c9c77:0x304,_0x23cbcc:'GH1b',_0xda1d9e:'kt(H',_0x380fd6:0x4a2,_0x3fd320:0x421,_0x48cd27:0x470,_0x33abe1:0x43e,_0x32d8a6:'0N]u',_0x1a155b:0x497,_0x35a1d6:'YMhe',_0x2e052e:'gEVZ',_0x5c337c:0x3f2,_0x22025f:'3]Qm',_0x1a1e2f:0x377,_0x289129:0x447,_0x2cf71f:0x496,_0x2efd25:0x402,_0x51baa0:0x357,_0x45c1ed:'nNc9',_0x25487b:0x445,_0x289aab:'sdUQ',_0x2bf72c:0x3bf,_0x407298:0x3c1,_0x30a81b:0x46e,_0x17d344:0x485,_0x24a1db:0x3fc,_0x328519:0x383,_0x32693d:0x3a6,_0x169527:0x42a,_0x491fab:'ZT4A',_0x349bfa:0x489,_0x148656:0x443,_0x2b3bc3:0x3c5,_0x1f0f3c:0x30e,_0xa60334:0x312,_0x288376:0x3da,_0x412a40:0x4a7,_0x231c48:0x4aa,_0x5e4b91:'IM@T',_0x1beb21:0x3b8,_0x1da1d2:0x3e2,_0x3fa4a2:0x410,_0x24e2d5:0x3f1,_0x21be53:0x406,_0x2cd061:'18Yt',_0xb0e616:0x462,_0x3b6b69:0x423,_0xe0f693:0x3f0,_0x44d9f9:0x349,_0x5ea518:0x2eb},_0x3398df={_0x11ce21:0x1d8,_0x41eafa:0x19f},_0x1d0201={_0x2b9dbe:0x17f,_0x59d4bb:0x393},_0x1d1e55={};_0x1d1e55[_0x120eb8(_0x38db10._0x142228,_0x38db10._0x356ba1,_0x38db10._0x12c482,0x48b)]=function(_0x37d810,_0x3a30f1){return _0x37d810||_0x3a30f1;},_0x1d1e55[_0x120eb8(0x453,_0x38db10._0x221844,0x4e9,_0x38db10._0x8749a5)]=_0x120eb8(_0x38db10._0x31c1a8,'CxvU',_0x38db10._0x144df2,0x37f),_0x1d1e55['KEVWD']=_0x2d1300(0x4ae,_0x38db10._0x5c977a,_0x38db10._0x5de75a,0x39e),_0x1d1e55[_0x2d1300(_0x38db10._0x27e2e1,_0x38db10._0x2c9c77,_0x38db10._0x23cbcc,0x270)]='executor',_0x1d1e55[_0x120eb8(0x540,_0x38db10._0xda1d9e,0x423,_0x38db10._0x380fd6)]=_0x120eb8(0x52b,'L)hD',_0x38db10._0x3fd320,_0x38db10._0x48cd27),_0x1d1e55[_0x120eb8(_0x38db10._0x33abe1,_0x38db10._0x32d8a6,0x4b6,_0x38db10._0x1a155b)]=function(_0x368064,_0x4a7e7a){return _0x368064!==_0x4a7e7a;},_0x1d1e55[_0x2d1300(0x3ca,0x33b,_0x38db10._0x35a1d6,0x3a9)]=_0x120eb8(0x340,_0x38db10._0x2e052e,0x467,_0x38db10._0x5c337c);function _0x120eb8(_0x8ffd1,_0x1ff67a,_0x1e9ba5,_0x3bb226){return _0x2eb0d7(_0x8ffd1-_0x1d0201._0x2b9dbe,_0x3bb226-_0x1d0201._0x59d4bb,_0x1e9ba5-0x183,_0x1ff67a);}_0x1d1e55[_0x120eb8(0x338,_0x38db10._0x22025f,0x32e,_0x38db10._0x1a1e2f)]=_0x2d1300(0x404,_0x38db10._0x289129,'nNc9',_0x38db10._0x2cf71f),_0x1d1e55[_0x2d1300(_0x38db10._0x2efd25,_0x38db10._0x51baa0,_0x38db10._0x45c1ed,0x2e5)]=function(_0x17b7fb,_0x1725b1){return _0x17b7fb!==_0x1725b1;},_0x1d1e55[_0x120eb8(_0x38db10._0x25487b,_0x38db10._0x289aab,_0x38db10._0x2bf72c,_0x38db10._0x407298)]=_0x2d1300(_0x38db10._0x30a81b,0x42c,'H*CO',_0x38db10._0x17d344),_0x1d1e55[_0x120eb8(0x3f6,'PXR5',0x492,_0x38db10._0x24a1db)]=_0x2d1300(0x2cb,_0x38db10._0x328519,'nq37',0x439);const _0x1354e0=_0x1d1e55;function _0x2d1300(_0x393601,_0x5de460,_0x1cb024,_0x51c11e){return _0x2eb0d7(_0x393601-_0x3398df._0x11ce21,_0x5de460-0x327,_0x1cb024-_0x3398df._0x41eafa,_0x1cb024);}if(!_0x52c068)return _0x1e091d;try{return _0x1354e0[_0x2d1300(_0x38db10._0x32693d,_0x38db10._0x169527,'p&Hb',0x3ff)](_0x1354e0[_0x120eb8(0x3bb,_0x38db10._0x491fab,_0x38db10._0x349bfa,_0x38db10._0x148656)],_0x1354e0[_0x2d1300(_0x38db10._0x2b3bc3,0x445,'!I6k',0x484)])?JSON[_0x2d1300(0x31a,_0x38db10._0x1f0f3c,'9bPZ',_0x38db10._0xa60334)](_0x52c068):_0x1354e0[_0x120eb8(0x418,'L)hD',_0x38db10._0x288376,0x415)](_0x392594,_0x4b99f0);}catch{return _0x1354e0[_0x120eb8(0x459,'*nWF',_0x38db10._0x412a40,_0x38db10._0x231c48)](_0x1354e0[_0x120eb8(0x4bc,_0x38db10._0x5e4b91,_0x38db10._0x1beb21,0x3fe)],_0x1354e0[_0x120eb8(0x340,'gGjW',0x458,_0x38db10._0x1da1d2)])?_0x1e091d:[_0x1354e0[_0x120eb8(_0x38db10._0x3fa4a2,'SgAX',_0x38db10._0x24e2d5,0x35b)],_0x1354e0['KEVWD'],_0x1354e0[_0x120eb8(_0x38db10._0x21be53,_0x38db10._0x2cd061,0x4af,_0x38db10._0xb0e616)],_0x1354e0[_0x2d1300(0x3e0,_0x38db10._0x3b6b69,'sdUQ',_0x38db10._0xe0f693)]][_0x120eb8(_0x38db10._0x44d9f9,'gEVZ',_0x38db10._0x5ea518,0x34a)](_0x1825db);}}function safeJsonStringify(_0x32c88b){const _0x4f7363={_0x1984a4:0x580};function _0x482cd1(_0x55ffaa,_0x3811e1,_0x46f431,_0xdd425){return _0x1458f5(_0x55ffaa-0x16f,_0x55ffaa,_0x46f431-0x22,_0xdd425-_0x4f7363._0x1984a4);}return JSON[_0x482cd1('!v14',0x46e,0x422,0x460)](_0x32c88b);}const path=__importStar(require(_0x2eb0d7(0x36,0x79,0x90,'Qzp6'))),os=__importStar(require('os')),fs=__importStar(require('fs'));let currentOpenClawRoot=null;const DEFAULT_OPENCLAW_ROOT=path[_0x2eb0d7(0x1ad,0x111,0x11c,'tu]z')](os[_0x2eb0d7(0x40,0xb3,0x94,'nJBR')](),'.openclaw');function isValidOpenClawRoot(_0x14e575){const _0x310f78={_0x1d9f4b:0x4ee,_0x24cca0:0x51c,_0xa5af07:0x519,_0x29b3ba:'18Yt',_0x4a82ea:0x2f1,_0x4e9c07:'gEVZ',_0x143013:0x258,_0x3d4608:0x13a,_0x44beb9:'4GP9',_0x44a6f5:0x1c8,_0x1ad77f:0x166,_0x2af359:0x16e,_0x5e613d:0x277,_0x1568b6:0x200,_0x552225:'5Di6',_0x485a77:0x3ec,_0x1db109:0x45b,_0x252412:0x1f0,_0x1bc708:'*&yp',_0x585894:0x33c,_0x14b07a:0x3ce,_0x13b5d7:'nNc9',_0x4858d0:0x50e,_0x5ce290:0x12f,_0x210202:'9bPZ',_0x29ed88:0x18d,_0x183041:0x46b,_0x1a1f9c:0x51b,_0x50ae98:'tu]z',_0x163974:0x4fc,_0x4f84a7:0x566,_0x3d75c5:0x520,_0x29e612:'*nWF',_0x5c42e6:0x3c5,_0x1ed106:0xac,_0x2da156:'4GP9',_0x5b3b38:0x413,_0x85a58f:0x3bb,_0x451dd0:0x4d2,_0x564d6b:0x43f,_0x3832d1:0x165,_0x9c1765:'4GP9',_0x4012dd:0x4e8,_0x59a7fb:0x4dd,_0x50e852:'!v14',_0x2a574e:0x182,_0x599c42:0x1b4,_0x486d94:0x16f,_0x33faf0:0x177,_0x50d3a6:'5Di6',_0x34db28:0x22a,_0x1431cb:0x30f,_0x3c16bd:'PXR5',_0x1e4745:0x251,_0x5e87a2:0x441,_0x187622:0x3c7,_0x33f053:'tu]z',_0x2126cb:0x130,_0x11ee79:0x13c,_0x2618c5:'FV3M',_0x11b0f5:0x432,_0x13ae70:'sgPd',_0x1db55d:0x431,_0x5bf779:0x40a,_0x2fe280:0x3ed,_0x17997c:'9bPZ',_0x3f269c:0x1b1,_0x38e715:0x20c,_0x111d86:'YMhe',_0x33331c:0x3f2,_0x311063:0x3e6,_0x19676e:'ZT4A',_0xa25a2a:0x4c0,_0x44ef7d:0x495,_0xbeecbf:'9dc8',_0x5d4f71:0x505,_0x548e8a:0x4d3,_0x178b5a:0x247,_0x6ac6ea:'9dc8',_0x51d6cb:0x285,_0x3de412:'5Di6',_0x4acb40:0x51f,_0x54198a:0x45e,_0x36e88d:0x144,_0x56c46a:'CxvU',_0x1fda64:0x12e,_0x5a4468:0x260,_0x46a30e:'18Yt',_0x4c1985:0xee,_0x452050:0x1a4,_0x5462fd:0x13d,_0x2c698a:0x1e2,_0x554d7b:'gGjW',_0x3a4567:0x27a,_0x497298:0x217,_0x59b060:0x257,_0x1718a6:0x515,_0x592e60:0x425,_0x3b756d:'nq37',_0x193c39:0x3a0,_0x33a092:'hQPv',_0x384e77:0x472,_0x1949a6:0x380,_0x535c6f:0x40b,_0x48ce78:0x19c,_0x2ccffd:0x11b,_0x36ff45:0x124,_0x26f04e:0x332,_0x4d37f3:0x4f7,_0xa236a2:0x483,_0x4c62f9:0x3ca,_0x437e67:0x3df},_0x1b3500={_0x3545a8:0x2d2},_0x4c84cc={_0xce2c22:0x19a},_0x22d8d5={'atRDQ':function(_0x559f95){return _0x559f95();},'IxyQC':_0x5e1f0e('nNc9',_0x310f78._0x1d9f4b,_0x310f78._0x24cca0,_0x310f78._0xa5af07),'LBfyI':function(_0x2810cf,_0x1316c4){return _0x2810cf===_0x1316c4;},'qcGYH':_0x2e09e4(0x293,_0x310f78._0x29b3ba,0x2ef,0x287),'riRQw':_0x2e09e4(_0x310f78._0x4a82ea,_0x310f78._0x4e9c07,_0x310f78._0x143013,0x262),'VTGeq':_0x2e09e4(_0x310f78._0x3d4608,_0x310f78._0x44beb9,0x234,_0x310f78._0x44a6f5),'MehdQ':_0x5e1f0e('%Bc*',0x4ed,0x45d,0x4ce)+_0x2e09e4(0x1d0,'!v14',_0x310f78._0x1ad77f,_0x310f78._0x2af359),'ExIWQ':_0x2e09e4(0x29f,'9bPZ',_0x310f78._0x5e613d,_0x310f78._0x1568b6)+_0x5e1f0e(_0x310f78._0x552225,_0x310f78._0x485a77,_0x310f78._0x1db109,0x480)+_0x2e09e4(_0x310f78._0x252412,_0x310f78._0x1bc708,0x21a,0x21b)+_0x2e09e4(0x1a5,'!I6k',_0x310f78._0x4a82ea,0x23d)+_0x5e1f0e('m9)7',_0x310f78._0x585894,0x3ef,_0x310f78._0x14b07a),'XmBSy':_0x5e1f0e(_0x310f78._0x13b5d7,0x467,0x4a0,_0x310f78._0x4858d0),'JRifM':function(_0x324762,_0x4b96db){return _0x324762===_0x4b96db;},'WtXRt':function(_0x6bd82a,_0x5b4ee7){return _0x6bd82a!==_0x5b4ee7;},'GmVAk':'JUPXT','hNsmQ':function(_0x2b28cd,_0x58f66d){return _0x2b28cd===_0x58f66d;},'UMhXR':_0x2e09e4(_0x310f78._0x5ce290,_0x310f78._0x210202,_0x310f78._0x29ed88,0x1b7),'oreXO':function(_0x2ec823,_0x531bb8){return _0x2ec823 instanceof _0x531bb8;},'BHeTF':function(_0x397c04,_0x1bf4e5){return _0x397c04(_0x1bf4e5);}};function _0x5e1f0e(_0x51be09,_0x2b0bf9,_0x30f8f9,_0x2ebe86){return _0x1458f5(_0x51be09-0x70,_0x51be09,_0x30f8f9-_0x4c84cc._0xce2c22,_0x2ebe86-0x555);}function _0x2e09e4(_0x6ccd56,_0x29f521,_0x5d42c1,_0x5688d1){return _0x1458f5(_0x6ccd56-0x19c,_0x29f521,_0x5d42c1-0x17,_0x5688d1-_0x1b3500._0x3545a8);}if(!fs[_0x5e1f0e('*&yp',_0x310f78._0x183041,_0x310f78._0x1a1f9c,0x495)](_0x14e575)){if(_0x22d8d5['LBfyI'](_0x22d8d5[_0x5e1f0e('%Bc*',0x42b,0x47e,0x47a)],_0x22d8d5[_0x5e1f0e(_0x310f78._0x50ae98,_0x310f78._0x163974,_0x310f78._0x4f84a7,_0x310f78._0x3d75c5)]))return _0x5e1f0e(_0x310f78._0x29e612,0x372,0x444,_0x310f78._0x5c42e6)+(-0x124+-0x1b34+0x1c58,_0x5e00c5['v4'])()[_0x2e09e4(_0x310f78._0x1ed106,_0x310f78._0x2da156,0x110,0x14f)](0x1*-0x676+0xe26*0x1+0x18*-0x52,0x13a9+-0x60a+-0xd93);else{const _0x5a12dc={};return _0x5a12dc[_0x5e1f0e('YMhe',_0x310f78._0x5b3b38,0x336,_0x310f78._0x85a58f)]=![],_0x5a12dc[_0x5e1f0e('H*CO',0x391,_0x310f78._0x451dd0,_0x310f78._0x564d6b)]=_0x2e09e4(_0x310f78._0x3832d1,_0x310f78._0x9c1765,0x122,0x185),_0x5a12dc;}}const _0x5400bf=fs[_0x5e1f0e('*&yp',_0x310f78._0x4012dd,0x514,_0x310f78._0x59a7fb)](_0x14e575);if(!_0x5400bf[_0x2e09e4(0x131,_0x310f78._0x50e852,_0x310f78._0x2a574e,0x157)+'y']()){const _0x451c86={};return _0x451c86[_0x2e09e4(_0x310f78._0x599c42,'nJBR',_0x310f78._0x486d94,_0x310f78._0x33faf0)]=![],_0x451c86[_0x2e09e4(0x1d9,_0x310f78._0x50d3a6,_0x310f78._0x34db28,0x239)]=_0x22d8d5[_0x2e09e4(_0x310f78._0x1431cb,_0x310f78._0x3c16bd,0x20c,_0x310f78._0x1e4745)],_0x451c86;}const _0x2fa1b6=path['join'](_0x14e575,_0x22d8d5[_0x5e1f0e('krgL',_0x310f78._0x5e87a2,0x39f,_0x310f78._0x187622)]);if(!fs[_0x2e09e4(0xce,_0x310f78._0x33f053,_0x310f78._0x2126cb,_0x310f78._0x11ee79)](_0x2fa1b6)){const _0x4dba16={};return _0x4dba16[_0x5e1f0e(_0x310f78._0x2618c5,0x38b,_0x310f78._0x11b0f5,0x3ad)]=![],_0x4dba16[_0x5e1f0e(_0x310f78._0x13ae70,_0x310f78._0x1db55d,_0x310f78._0x5bf779,_0x310f78._0x2fe280)]=_0x22d8d5[_0x2e09e4(0x258,'Qzp6',0x122,0x1e1)],_0x4dba16;}try{const _0x17a760=fs[_0x2e09e4(0x1e8,_0x310f78._0x17997c,_0x310f78._0x3f269c,_0x310f78._0x38e715)+'nc'](_0x2fa1b6,_0x22d8d5['XmBSy']);let _0x5b4b30=_0x17a760;if(_0x22d8d5['JRifM'](_0x5b4b30[_0x5e1f0e(_0x310f78._0x111d86,0x389,_0x310f78._0x33331c,_0x310f78._0x311063)](-0x861+0x602*-0x5+0x266b),-0x148f+-0x1*-0x2774+0xec1a)){if(_0x22d8d5[_0x2e09e4(0x23f,_0x310f78._0x19676e,0x2b8,0x292)](_0x22d8d5[_0x5e1f0e('p&Hb',_0x310f78._0xa25a2a,_0x310f78._0x44ef7d,0x46f)],_0x5e1f0e(_0x310f78._0xbeecbf,_0x310f78._0x5d4f71,0x41a,_0x310f78._0x548e8a)))return _0x45dcfc[_0x2e09e4(_0x310f78._0x178b5a,_0x310f78._0x6ac6ea,_0x310f78._0x51d6cb,0x1d9)](_0x22d8d5[_0x5e1f0e(_0x310f78._0x3de412,_0x310f78._0x4acb40,0x51e,_0x310f78._0x54198a)](_0x39ac61),'team.db');else _0x5b4b30=_0x5b4b30[_0x2e09e4(_0x310f78._0x36e88d,_0x310f78._0x56c46a,0x9f,_0x310f78._0x1fda64)](-0xd61+-0x1*0x569+0x12cb);}JSON[_0x2e09e4(_0x310f78._0x5a4468,_0x310f78._0x46a30e,_0x310f78._0x4c1985,_0x310f78._0x452050)](_0x5b4b30);const _0x5f3e01={};return _0x5f3e01[_0x2e09e4(0xbe,'sgPd',0x16b,_0x310f78._0x5462fd)]=!![],_0x5f3e01;}catch(_0x4fad97){if(_0x22d8d5[_0x2e09e4(_0x310f78._0x2c698a,_0x310f78._0x554d7b,_0x310f78._0x3a4567,0x2a2)](_0x22d8d5[_0x2e09e4(_0x310f78._0x497298,'!v14',_0x310f78._0x59b060,0x268)],_0x22d8d5[_0x5e1f0e('^elY',0x42f,_0x310f78._0x1718a6,0x466)])){const _0x54aecd=_0x22d8d5[_0x5e1f0e('gGjW',0x35d,_0x310f78._0x592e60,0x3c6)](_0x4fad97,Error)?_0x4fad97[_0x5e1f0e(_0x310f78._0x3b756d,0x426,_0x310f78._0x193c39,0x434)]:_0x22d8d5[_0x5e1f0e(_0x310f78._0x33a092,_0x310f78._0x384e77,_0x310f78._0x1949a6,_0x310f78._0x535c6f)](String,_0x4fad97),_0x3d8db8={};return _0x3d8db8['valid']=![],_0x3d8db8[_0x2e09e4(_0x310f78._0x48ce78,'0N]u',_0x310f78._0x2ccffd,_0x310f78._0x36ff45)]=_0x5e1f0e('tu]z',_0x310f78._0x26f04e,0x3b3,0x3a6)+_0x5e1f0e(_0x310f78._0x17997c,_0x310f78._0x4d37f3,_0x310f78._0xa236a2,0x445)+':\x20'+_0x54aecd,_0x3d8db8;}else return _0x3c0dc7['join'](_0x22d8d5[_0x5e1f0e('g(5s',_0x310f78._0x4c62f9,0x3aa,_0x310f78._0x437e67)](_0x500cc2),_0x22d8d5[_0x5e1f0e(_0x310f78._0x3de412,0x3cf,0x38d,0x3d0)],_0x269e0b);}}function setOpenClawRoot(_0xfef5fd){const _0x1b72b7={_0x2aaf1e:0xea,_0x3188ca:0x17e,_0x131d62:0x1da,_0x5ddf12:0x1d5,_0x85bfab:0x292,_0x49f373:0x14a,_0x7b30df:'4Ur1',_0x2dd69e:0xa7,_0x142fdc:'G#jE',_0x829599:0x64},_0x5be658={_0x1fe48b:0xc7},_0x5c8bfb={_0x5e061e:0x103},_0x5310b9=isValidOpenClawRoot(_0xfef5fd);function _0x2378d9(_0x3cb718,_0x3ab56e,_0x41a002,_0x20ec3b){return _0x1458f5(_0x3cb718-0x109,_0x3cb718,_0x41a002-_0x5c8bfb._0x5e061e,_0x3ab56e- -0xa4);}function _0x3aead4(_0x39e9f3,_0x4c0525,_0x1abd2d,_0x194fd2){return _0x2eb0d7(_0x39e9f3-0x1e5,_0x39e9f3-0x56,_0x1abd2d-_0x5be658._0x1fe48b,_0x4c0525);}if(!_0x5310b9[_0x3aead4(0x5d,'9bPZ',_0x1b72b7._0x2aaf1e,0xe7)]){const _0x401c9b={};return _0x401c9b[_0x2378d9('sdUQ',-_0x1b72b7._0x3188ca,-0x22b,-_0x1b72b7._0x131d62)]=![],_0x401c9b[_0x2378d9('YMhe',-_0x1b72b7._0x5ddf12,-_0x1b72b7._0x85bfab,-_0x1b72b7._0x49f373)]=_0x5310b9[_0x3aead4(0x39,_0x1b72b7._0x7b30df,-0x6a,-0x18)],_0x401c9b;}currentOpenClawRoot=_0xfef5fd;const _0x74c390={};return _0x74c390[_0x3aead4(_0x1b72b7._0x2dd69e,_0x1b72b7._0x142fdc,_0x1b72b7._0x829599,0x93)]=!![],_0x74c390;}function getOpenClawRoot(){const _0x4c9dd2={_0x15036c:0x4e0,_0x4ea011:0x5d6,_0x4285af:'tu]z',_0x4efe56:0x53e},_0x12d8fe={_0x22d6a1:0xe1,_0x2a194c:0x16};function _0x49e0fd(_0x3199f8,_0x17d5e4,_0x3c242a,_0x440e20){return _0x1458f5(_0x3199f8-0xd1,_0x440e20,_0x3c242a-0x31,_0x3c242a-0x1af);}const _0x121604={};_0x121604[_0xc0db(_0x4c9dd2._0x15036c,0x4ce,'0N]u',0x4f4)]=function(_0x3753c3,_0x1b48ce){return _0x3753c3||_0x1b48ce;};function _0xc0db(_0x1e0804,_0x54204c,_0x4e34a3,_0x5dbd56){return _0x1458f5(_0x1e0804-_0x12d8fe._0x22d6a1,_0x4e34a3,_0x4e34a3-_0x12d8fe._0x2a194c,_0x1e0804-0x5ff);}const _0x592ff9=_0x121604;return _0x592ff9[_0xc0db(0x520,_0x4c9dd2._0x4ea011,_0x4c9dd2._0x4285af,_0x4c9dd2._0x4efe56)](currentOpenClawRoot,DEFAULT_OPENCLAW_ROOT);}function hasCustomOpenClawRoot(){const _0x13164d={_0x178eb5:0x28d},_0x337396={_0x54f12e:0x376},_0x59b096={_0x385d10:0x199,_0x3fafd4:0x191,_0x4f3e70:0x14c};function _0xd8e974(_0x46d2f5,_0x2b96f2,_0x2a9bdd,_0xab1b44){return _0x2eb0d7(_0x46d2f5-_0x59b096._0x385d10,_0x46d2f5- -_0x59b096._0x3fafd4,_0x2a9bdd-_0x59b096._0x4f3e70,_0x2b96f2);}const _0x385451={};_0x385451[_0x52ab3f('18Yt',0x35b,0x272,0x2f6)]=function(_0x14054f,_0x572d6a){return _0x14054f!==_0x572d6a;};const _0x457340=_0x385451;function _0x52ab3f(_0x16438a,_0xbd1135,_0x34f637,_0x252852){return _0x1458f5(_0x16438a-0x18c,_0x16438a,_0x34f637-0xbd,_0x252852-_0x337396._0x54f12e);}return _0x457340[_0x52ab3f('!v14',0x255,_0x13164d._0x178eb5,0x2e6)](currentOpenClawRoot,null);}function resetOpenClawRoot(){currentOpenClawRoot=null;}function getTeamRoot(){const _0x5893a6={_0x15c04b:0x448,_0x25679a:0x393},_0x2eb221={_0x227689:0x1bb,_0x26c6b5:0x44e};function _0x342c1c(_0xbf8b3d,_0x2c5c26,_0x3d12a6,_0x2cc107){return _0x1458f5(_0xbf8b3d-0x7f,_0x2c5c26,_0x3d12a6-0xf3,_0xbf8b3d- -0xe3);}const _0xb2c82={'YAeBA':function(_0x2e2ddf){return _0x2e2ddf();},'jSaPK':_0x34e423(0x253,0x214,0x2d4,'!v14')};function _0x34e423(_0x35bc95,_0x4b59d7,_0x46e140,_0x547bd9){return _0x1458f5(_0x35bc95-_0x2eb221._0x227689,_0x547bd9,_0x46e140-0x11d,_0x46e140-_0x2eb221._0x26c6b5);}return path['join'](_0xb2c82[_0x34e423(0x39d,_0x5893a6._0x15c04b,_0x5893a6._0x25679a,'4GP9')](getOpenClawRoot),_0xb2c82['jSaPK']);}function getDatabasePath(){const _0x565b96={_0x5ae51b:'g(5s',_0x26482d:0x8,_0x2d7534:'XPYp',_0x4c3669:0x1c4},_0x2aa661={_0x4220f2:0xaf},_0x391cb4={_0x3e07da:0x153};function _0x5a8e1f(_0x54c315,_0x52faf3,_0xb0a774,_0x1a3a39){return _0x1458f5(_0x54c315-_0x391cb4._0x3e07da,_0x52faf3,_0xb0a774-0x81,_0x1a3a39-0x1c7);}const _0x49999f={'XMVYy':function(_0x685449){return _0x685449();},'UKgqJ':'team.db'};function _0x8c3bf9(_0x4ccd2d,_0x16ee4e,_0x306276,_0x3dc3db){return _0x1458f5(_0x4ccd2d-0xb2,_0x16ee4e,_0x306276-0xd7,_0x4ccd2d- -_0x2aa661._0x4220f2);}return path[_0x5a8e1f(0x128,_0x565b96._0x5ae51b,0x1de,0x127)](_0x49999f[_0x5a8e1f(_0x565b96._0x26482d,'!v14',0x117,0x59)](getTeamRoot),_0x49999f[_0x8c3bf9(-0x227,_0x565b96._0x2d7534,-_0x565b96._0x4c3669,-0x277)]);}function getTaskDir(_0x2d8c1e){const _0x520cc2={_0x445de5:0x11d},_0x4fe2cf={_0x34dbb8:0xa6,_0x51d4ac:0x437};function _0x4e7925(_0x355cae,_0xe92112,_0x5d541b,_0x5250d0){return _0x1458f5(_0x355cae-0x1e,_0x355cae,_0x5d541b-_0x4fe2cf._0x34dbb8,_0xe92112-_0x4fe2cf._0x51d4ac);}const _0x2c907d={'gZLWv':function(_0x2b68bb){return _0x2b68bb();},'AxudY':_0x4e7925('sLcW',0x32b,0x31a,0x3d8)};function _0x50b083(_0x39131e,_0x370dd9,_0x471981,_0x296d69){return _0x2eb0d7(_0x39131e-0xfd,_0x39131e-0x26,_0x471981-0x5a,_0x296d69);}return path['join'](_0x2c907d['gZLWv'](getTeamRoot),_0x2c907d[_0x50b083(0x114,0x12b,_0x520cc2._0x445de5,'XPYp')],_0x2d8c1e);}function getFlowsDir(){const _0xdcef2a={_0x54c020:'SgAX',_0x27ba47:0x33a,_0x15c152:0x20c,_0x21e084:0x28a,_0x54f54c:0x1f4,_0x120ea5:'ytlF'},_0x2509d9={_0x4bd6af:0x34c},_0x516634={_0x45dad7:0x127},_0x103691={'zIbQm':function(_0x45904f){return _0x45904f();},'vLlPv':_0x429cb7(-0x350,_0xdcef2a._0x54c020,-_0xdcef2a._0x27ba47,-0x29c)};function _0x429cb7(_0x27ee73,_0x4cacbf,_0x5c8f1a,_0x58c6f8){return _0x1458f5(_0x27ee73-0xf1,_0x4cacbf,_0x5c8f1a-0x3f,_0x58c6f8- -_0x516634._0x45dad7);}function _0x151a2f(_0x27791b,_0x3a0b14,_0x26d07c,_0x294b18){return _0x2eb0d7(_0x27791b-0x124,_0x26d07c-_0x2509d9._0x4bd6af,_0x26d07c-0x102,_0x27791b);}return path['join'](_0x103691[_0x429cb7(-_0xdcef2a._0x15c152,'nq37',-_0xdcef2a._0x21e084,-_0xdcef2a._0x54f54c)](getTeamRoot),_0x103691[_0x151a2f(_0xdcef2a._0x120ea5,0x495,0x3df,0x336)]);}function getAgentWorkspace(_0x38d768){const _0x2b422f={_0x15d6ad:0x1d5},_0x29311d={_0x16cf75:0x5b,_0x26eb4d:0x124},_0x678998={'MyaQU':function(_0x1696bd){return _0x1696bd();}};function _0x842484(_0x424d3e,_0x255e3b,_0x273c95,_0x2f06f5){return _0x2eb0d7(_0x424d3e-0x75,_0x424d3e-_0x29311d._0x16cf75,_0x273c95-_0x29311d._0x26eb4d,_0x255e3b);}return path[_0x842484(0x140,'0N]u',0xbb,_0x2b422f._0x15d6ad)](_0x678998['MyaQU'](getOpenClawRoot),'workspace-'+_0x38d768);}function _0x1e27(){const _0x4eea2f=['s0Ta','jSoXW5hcOLe','qtfwWQmN','W50xt8kCBW','WQBcJ8oaihq','WRHlW43dVGtdMxmXpSopoZ4','g8ojzLPa','BqqMW6/cKG','pCoksG','qxxcS0VdKmkaWQJdUtddGa','l8kkxNxdRhxcOgy','W6erWPNcQvpcMW','WRCiW5pdV8oaW6vyWPe','W73dSCobCWjbo8o1uCkb','W7iwBmkbW6i','WRmJk0FdQW','W5qjp8o9W6m','owH9','W53cGbFdV8kx','bHNdKaO','W5GOq8kIW7qEimoyWQZcTG','AeVcULRdHa','W6NdP8ooCrvPkW','WQektCobpW','W5KWAmkPtaHdgw7dIW','BSo9D2dcPa','zSk1ymkFW7i','AtZdTCoVW6C','sI57W65E','DMdcI0hdMq','WQbcsw7cLMRcGcOsWO/cLq','kSkNFeNdQW','AeDg','WPVdV8oQWQ3cMG','WP8eBSouaW','5BA35l2955U35B6B','W4NdRJddTCkv','W4qgWOFcN3u','n8o6AKPOWQTawmoiuq','WO3dJuD2W5u','WRBcMe5MW4K','p8o6fCkjnSoEnq','kCkDxg7dVW','W5r7WRJcUuW','c8okyKLjWQfqsmoa','oMbWWRtdMG','Dw3cKfhdMq','mSoSn8kbmCoxiNBdLmox','l8o6eSkf','dSogu8kPWPJdVCkyW49v','eZL3ASkK','cCowFfbwWRbfq8oq','WRtcTmkfpN8','WQaGcuxdLq','W7NdU8oczHXfo8o1yq','udvuWQ8XuJqUsCk4','WPlcV1i','WRiPfuy','WRuxD8oVE8o2','W4eamSoMW4tcGCkCW6NdSCkH','a8osjCkXoG','W6OEeZVdI17cJG','AKxcN2ddR8k8WQ7dVWRdMG','AgpcHKFdKftdSMC4W4m','W418WRRcN2GvWOtcVxVdPq','W6NdUsFdM8kocSozo2xcUa','E1JcPfZdKG','vgXNWQZdGa','zsz7WQm7','W5S5rmkWW6WecCoeWQy','kmoWhq','aSokzLC','lCkis0JdQq','rmkvFSkoW6O','W73dSCoBvqjfk8o1A8ku','WPBcH8kLa14','W5zLWQ/cU18','W6bxW73dMa','C23cJKVdMa','WQeGdIKH','WQ/dUSo5oW','WRVdSgv8qq','bJP7WPRcK8o3WQeaWP7dOW','xSoBCK/cLa','WRuFCSoMBCocW7qfCq','xelcMKxdQG','WQCiemoKeX/dJblcHf4','DI/dOSoeW41+WRK7WP3dVW','WRFcRxZcJmknj8o7pu/cRW','WR3cOCkFk8kL','oe57WPe','W489o8oyW7C','wJfoWQKR','55Iq5B+05lIJ5A2n5z6y','aCoez8kmWRi','WOFcTsdcOwWZWONcNG','WPfYWPrWyG','WQacF8oKE8on','WRWjWQRcSSkNWP9gWRpcLYGbWRu','aSozW4VcN0eHf2/cOg8','W6SwgZNdQeVcMd00WR0','dx5WWQpdK17dLGddTSo+','W6zmWPZcIMW9WPNcMM/dUG','WOWPE8oWu8o9W7eeDxC','WR3dPLXSW4a','p8o8sSkTWP/dVmkk','WRiidCoKfq','p8obs8kHWO7dU8kyW4bjW5m','WQhdL1JcNSoRWQqzoK5nfGvH','WRlcImkqemkQWOtcOXJdQ2m','WQ86j8ovfG','DwFcOuiCh8kjW4BcSG','WR/cNxnXW7i','u8oVDK3cIvSgtCo0fG','A2pcHKFdOW','rubsWQK','W7KsWORdN8oHW7dcIZFcHhq','WRKow8otrW','b8oIESkSWQq','WQ3dUSoDWOJcQW','WPX8WRD0rG','W4CAiCo7W7u','WRhdUSoI','EK/cSfRdJSkkWORdVWZdHa','WRxdTmoIjSkC','W78BWO3cQ0i','W7pdGSkOo8k5eXrdW48','W5ZcVaddVSkx','W6v5uG8GeCoZW5KN','W7hcJWpdGq','BSkQu8klW64','zcrIW41Q','W447q8k9W6WY','WOBcUmoycgJdG3RdOgOD','W4WAuI0','WORcML9xW6u','W6ldLSo8FcC','W7/cIXZdNSk/W7bk','kmoRaCkblCovkgtdGG','W7/dHCoGrGG','WRqPefVdG8koW4hdUW','BvNcV1ZdJSkCWP7dPbe','W6OBWORcJupcM3mGfCo5','qgRcR2pdVG','yh7cLLS','W6fkW6ZdQmoK','rSkkBeTaWQbbq8oqxq','WRONtmoPga','W4tcO8k1tti','W4ddHWmgW7hdKSkUg8oWpW','CdRdQmoZW7S','bmoaemkAjSotnwFdUCom','p8kyumolhaJdPq','WQaGec4','DMpcJalMLlVKU5hMO6dLVilMLQVML6q','W4NcIGriWRpdOSojbmk9','WOGEbZmipCo0W6mBWPG','mZzeyCkN','WRxcM8oRh8kV','mtHJDmkaDmkwW7qs','6lsr5BYL5lIJ5PI655ME5BYY','WQ/cLmkpiSkjWR7cSYtdRwK','kSoyW7FcTuq','W5hcOJZdPCkq','qeTAWQhdO2q','zcP/W6y','q3D2WQddLa','s0TaWOFdSgNcLg/dRCk0','hZPxWOpcMW','agycW7j3AG88tSkwqG','W7NdJIBdKCki','W4xdLXpdMCkn','WQaAD8oGEW','WQCttCog','d8o2hSkn','WPJcTmoGe8kk','AMdcJ2CJ','aCoyW73cGq','W65aW5VdL8op','W6WkWQZcIMC','W6ZdLSo7rIC','ywNcHeVdKKlcJh8KW5W','WP3dJKbZW5KaW7NcI1xdIq','W4JcOSkrqYZcLSkSx8ocbG','W5mpwCkbAG','WRZcJN9JW5e','W6PCW7FdQCoX','WPuGfSozmW','W4CWDCkRtc8','WR4VasWWnSo1W6u','hrxcO8kgW4u','WQylgCoJW60','WONcL0jC','WRSUbq','eJPZWRJcISo6WQi','WRFdPSo1','jaBdSJlcLa','WPRcQHNcVfCbWO7cLe3cSa','W77dUsFdMSkvbCokavFcRW','W7CeWRFdVSoYW6FcGbNcJxS','jCkEzCojfrldSSkLW7NdQW','W4uBtmk0uW','WQ4PgcC3','W5GbzCkbW7G','WRbvWObJqq','WQNdIerbCG','WQCicSovbb/dLsxcOL8','sSoTqLVcTG','WQadFCoGE8oHW6y','W6TdkSkXkSoaW6iiB0e5','WRFdSmoGoCkyW7/cGG','W586uSkFDXrhdMNdPG','bSoguCkQWOeR','W6mDWPlcR0hdH2S2fmoJ','lHnJvmkzsSkNW7ivW6q','W6xdJZ3dN8kihSoE','55UR5B2z5lUP5lIV5A+K5zYpW7XIo8oj','WRVcRLrZW6G','WPFcKCoApwW','WQePcfFdLmkyW5ddRmoehG','WRJdSwnyrmkRhmo6hqu','W6JcPW3dVmkZ','naFdVblcKG','dCoaEmkQWPS','yY5XW79O','W40Ky8k1','kmkFFuBdIG','F03cS13dLmkC','D2NcG0BdUK7cSgGyW5u','WOZcUSoAdhq','WRaSbtqw','WRuibG','W7KsWORdKSoWW6BcGcdcIwy','p8kmvConmWJdUCkeW5RdUG','pCoZWRu+WQxcTxiyCWy','h2D6WRJdKq','WRaKfHqKiCo7W5iEWO8','WQ3dSNHwqa','WQ7cISo9gSk/pbz7WRhdNW','WQFdOeTxW7e','WPNdOGJcT18dWOpcGvBcPW','W69WvNv0ASoLW58cWRldMdC','WR3dRhryqmkXlmopcbm','EoAuJos4QU+9GEISPUEIQoIUHEAzJUwqU+s5NW','nKr/WQ/dLL3dKa','W7GTWQFdISoY','g8oZW5pcG1C','gWP9WPxcJW','WRuJcgldH8knW4W','W6dcHrZdNCk/W7rk','WR8UdYuHo8oI','W73dSCoBwqDoh8oIASkq','DNVcNK0','emoBECk+WRG','W7DuW7FdPmoZ','W7xcIXVdOSkUW7jbavvz','a8orxCk4WP07','W6GmWORcT3JcIgWGca','tuLrWQJdO38','WQpdUSoIomkyW6JcO8otW6tdPa','W5eXxCkdW68cbW','frygW7dcRZ7cRxJdK8kZWPtcOa','W4RcNhbsW7ldHSko','DZ98W7G','WQxcN8o6aCk7','WRrFWOvIsmkAxCkBxcq','WR/cR8k+fa','WPBdP8o/gNtcPSkhESoNium','iu1WWQ3dHG','WRhcImo3amkZja58W7O','pCoksSkkWO7dOmkkW4PqW7u','W4BdRX7cKNG','W7WyhGm','W6GmWOZcOuq','WQSBW7VdJcrQWRZcUMFdOtnk','AKVcPvJdVW','WOJdOmkm','W77dKwfqs8kCnmo6hKa','WOldP8oPhSkq','W7xcIWhdImkSW7zBj31D','W77dVs3dRCkicSoFkG','nKrPWRRdVa','h8oThSkjfW','WRexBCoMsSoZW6yAuhy','W7BdSCoCobPtimo+','WONcPmoDcgK','W5xcLHZdLCkq','WQZdK1jqva','W6qnWQJcR1RcGgurgSo+','nurTWO/dHftdIGddOCoJ','zqhdM8ouW54','vmo+ygZcNvK3smk1da','W5KWBCkLxtbwdG','mN4GWRO9W6qfoCo5W5pcMYq','E3hcG2ifaSkfW5/cPfm','W63dKWldNCkk','iCoIW4tcT2C','sKdcSeyb','WOhdP8o9nmkT','WRrFWOvLq8kqrmkCsYG','W7ddU8ogEa','E3hcMuycf8kzW6RcL1S','WPJdOgPpW4q','W6qqWP3cOKpcJwq2','WQuPg8oNaaVdLam','W77dUsFdMSkvbCok','k8o/WR05WOlcV08c','W7KqgdldLMC','W7pcNrZdHmkTW6nole0','bWPLF8k3','aGZdGr3cIW','W5q8rSkbW6eogmoOWQy','W78BWO3cVCoYW7NcGbxcHMa','x8oRy2pcI1KI','zuD9WQNdSW','bCoeyvHcWQfw','WQetBCoMAG','WQagCSoQAG','xJrFW6CKvI4UDSk8','WRVcJSkaaKu','dSosg8kWeq','WRmtumokD8oohSkHo8oD','xmkOtmkQW54','WPOJsmoKra','DexcV10','vSoPAwpcKa','fZLkqCkJ','F8kiA8kvW5K','yCk0ySkv','WRZcRSkicLZdUbDmW7BdHq','mcxdLJtcTW','W4NdMSoDutG','W4dcVSknzcu','fs1WWRJcI8oZ','jCkbtw3dUh/cPNa','dmosW6dcQ1i6ex/cPg8','WQqigmoGfbldJa','rKfDWQG','pmoaAf5J','WRrFWOvPs8krt8keAWC','W6GUWP/cUL4','dCoxE0a','W73dKdVcVMa','WRFdSmo0mmkxW6JcJSotW7ZdSG','W5C/q8k/','ELZcPwSw','xqyjWOVcPW','WRziWOvD','ytTeW7Tm','jCkmx8oBprldPa','A8kSqCk9W4y','WPhdH8oBpmkU','WRlcN8oSo8kSnrLpW7pdLa','W5ZdV8oQuWi','kCkFr8orpr7dPCkjW7VdPW','WRVdUmo+W6ldUa','qbLLW4DH','WPJdHMb2Dq','W7jzW7ldSSoZ','WQ3dQSo8WO7cRW','W54ztG','n8ooumkTWOZdRmkl','isTnWOVcIW','s8oRA2BcL1SX','fWtdRsdcSmogW6zxW7nP','WQZcICkVbCkNWO/cQZm','WQJdQCoXWRZcQfu','WROhv8oHl8ongmkHmmo7','pK5+WQNdHKm','W6dcO8o5WQJcPu4cgSkTkq','WQNdV2nB','v8k0htldOa','W4ldRaJcRG','W485EmkaW7C','wInDWPu','k8oThmkClmogohldNG','WPlcTSo/cq','WPZdHNnYtq','BGddO8oAW7K','nbD6FSknumksW6q','WQqhsmoxpW','dCoDALPqWRblxW','W5iGt8k/W6mbeSowW6ZcVW','W7/dPSoDEqi','WPVdTfLyW5O','rubxWQRdOMJcN2G','WRlcLSoXf8k5'];_0x1e27=function(){return _0x4eea2f;};return _0x1e27();}function getAgentDir(_0x429922){const _0x26b6ac={_0x42df10:0x35,_0x3b3a3c:0x1a6,_0x4b73c9:'p&Hb',_0x39c146:0x1f4,_0x27f80c:0x257,_0x2f8dba:0x2b1,_0x56d2ce:0x2cc,_0x366d5f:0xd8,_0xfc021c:0x23,_0xe2cdd0:0x200,_0x5f030f:'nh7H',_0x4be690:0x335,_0x21400c:0x27b,_0x3fa845:0x1e8,_0x5b269b:0x189},_0x2f4b67={_0x1bd344:0x67,_0x48879e:0x6d},_0x586957={_0x1cdef6:0x91,_0x4b8165:0x1a3},_0xaa8368={'WlXam':function(_0x25608b){return _0x25608b();},'RYgnl':_0x3abb7b(0x5e,_0x26b6ac._0x42df10,-0x60,'sgPd'),'MbJvY':_0x2664bf(_0x26b6ac._0x3b3a3c,_0x26b6ac._0x4b73c9,_0x26b6ac._0x39c146,_0x26b6ac._0x27f80c)};function _0x2664bf(_0x598925,_0x46ddc9,_0x19a2d2,_0x4f0505){return _0x1458f5(_0x598925-_0x586957._0x1cdef6,_0x46ddc9,_0x19a2d2-_0x586957._0x4b8165,_0x4f0505-0x2cb);}function _0x3abb7b(_0x37b194,_0x5e1c4d,_0x55faf1,_0x332e66){return _0x2eb0d7(_0x37b194-0x58,_0x5e1c4d- -_0x2f4b67._0x1bd344,_0x55faf1-_0x2f4b67._0x48879e,_0x332e66);}return path[_0x2664bf(_0x26b6ac._0x2f8dba,'PXR5',_0x26b6ac._0x56d2ce,0x21d)](_0xaa8368[_0x3abb7b(_0x26b6ac._0x366d5f,0x30,-_0x26b6ac._0xfc021c,'p&Hb')](getOpenClawRoot),_0xaa8368[_0x2664bf(_0x26b6ac._0xe2cdd0,_0x26b6ac._0x5f030f,_0x26b6ac._0x4be690,_0x26b6ac._0x21400c)],_0x429922,_0xaa8368[_0x2664bf(_0x26b6ac._0x3fa845,'HHP9',_0x26b6ac._0x5b269b,0x143)]);}function getAgentSessionsDir(_0x58d3d0){const _0x5e7a95={_0x2380e0:0x2a9,_0x3b51c9:'gEVZ',_0x95009d:0x21a,_0x1431e8:0x201,_0x65c0fd:0x218,_0x44726c:0x2d2,_0x420670:0x197,_0x37a4c7:0x204,_0x4fb2af:0x174,_0x37ee1b:0x209},_0x52ba20={_0xcde06e:0x40},_0x2bdcaf={_0xd58dfb:0x145};function _0xeba13e(_0x24f009,_0x2179d3,_0xd955d4,_0x2edac4){return _0x1458f5(_0x24f009-0x44,_0xd955d4,_0xd955d4-0xa0,_0x2edac4- -_0x2bdcaf._0xd58dfb);}const _0xed8bd0={'oWYTw':function(_0x1db200){return _0x1db200();},'MFcvr':_0xeba13e(-_0x5e7a95._0x2380e0,-0x272,_0x5e7a95._0x3b51c9,-0x1ed),'gmgtS':'sessions'};function _0x5df6ee(_0x45f345,_0xb67fdd,_0x120208,_0x49c139){return _0x1458f5(_0x45f345-0xaf,_0x45f345,_0x120208-_0x52ba20._0xcde06e,_0x49c139-0x9c);}return path[_0xeba13e(-_0x5e7a95._0x95009d,-_0x5e7a95._0x1431e8,'sgPd',-0x1ab)](_0xed8bd0[_0xeba13e(-_0x5e7a95._0x65c0fd,-_0x5e7a95._0x44726c,'^elY',-0x281)](getOpenClawRoot),_0xed8bd0[_0xeba13e(-0x147,-_0x5e7a95._0x420670,'m9)7',-_0x5e7a95._0x37a4c7)],_0x58d3d0,_0xed8bd0[_0xeba13e(-_0x5e7a95._0x4fb2af,-0x249,'nJBR',-_0x5e7a95._0x37ee1b)]);}function getOpenClawJsonPath(){const _0x113ea6={_0x221c33:0x1ec,_0x51a6af:'gEVZ',_0x349849:0x5c2,_0x30c9df:'sLcW',_0x1d4001:'!v14',_0x1ddc2f:0x528},_0x8e4347={_0x16f9bc:0x22,_0x2f2f45:0x666},_0x5bf780={_0x1491d5:0x98},_0x4befe7={'ieBZd':function(_0x1318de){return _0x1318de();}};function _0x1af96d(_0x350f5c,_0x4d4e8f,_0x15f887,_0x3875f3){return _0x2eb0d7(_0x350f5c-0xe5,_0x350f5c-_0x5bf780._0x1491d5,_0x15f887-0x121,_0x3875f3);}function _0x1862a2(_0x287c18,_0x282b3c,_0x32d5b0,_0x3ed80e){return _0x1458f5(_0x287c18-_0x8e4347._0x16f9bc,_0x282b3c,_0x32d5b0-0xc4,_0x3ed80e-_0x8e4347._0x2f2f45);}return path[_0x1af96d(0x1a2,_0x113ea6._0x221c33,0x18e,_0x113ea6._0x51a6af)](_0x4befe7[_0x1862a2(_0x113ea6._0x349849,'ZT4A',0x53e,0x564)](getOpenClawRoot),_0x1862a2(0x5c0,_0x113ea6._0x30c9df,0x627,0x5aa)+_0x1862a2(0x47d,_0x113ea6._0x1d4001,_0x113ea6._0x1ddc2f,0x502));}function getCredentialsDir(){const _0x5e16={_0x35e4b4:0x105,_0x112d36:0x17c,_0x1ce8a8:0xda},_0x6dbf20={_0x3063e2:0x1a2,_0x27db5e:0x5e0},_0x1b74ef={_0x554b10:0xfd},_0x1920f3={'LOztG':function(_0x16c791){return _0x16c791();}};function _0x279ad2(_0x32a8f4,_0x3ee0df,_0x3b8013,_0x2d452f){return _0x2eb0d7(_0x32a8f4-0x6c,_0x2d452f- -_0x1b74ef._0x554b10,_0x3b8013-0x147,_0x32a8f4);}function _0x48dbae(_0x50b2c6,_0x38e2d9,_0x432c57,_0x4f3325){return _0x1458f5(_0x50b2c6-_0x6dbf20._0x3063e2,_0x50b2c6,_0x432c57-0xf9,_0x4f3325-_0x6dbf20._0x27db5e);}return path[_0x279ad2('CxvU',-_0x5e16._0x35e4b4,-_0x5e16._0x112d36,-0xfd)](_0x1920f3[_0x279ad2('*nWF',-_0x5e16._0x1ce8a8,-0x141,-0xfb)](getOpenClawRoot),'credential'+'s');}function getFeishuCredentialsDir(_0x90e5d2=_0x1458f5(0x5e,'^elY',-0xe5,-0x5a)){const _0x400346={_0x55593c:0x100,_0x33cfa4:'Ev1O',_0x48bd6e:0x70,_0x24d550:'sgPd',_0x1df859:0x12,_0x1fac46:0x4a,_0x27d2c5:0x6c,_0x3ac188:0xda,_0x341fc1:'nq37',_0x17711d:'9dc8',_0x2d9ed6:0x90,_0x4afe90:0xe6},_0x3c872d={_0x51ea1f:0x76,_0x5745d2:0x182,_0x4831e0:0x56},_0x3ab693={_0x617193:0x159};function _0x1a60cc(_0x40e026,_0x118de6,_0x217d94,_0x190c62){return _0x2eb0d7(_0x40e026-0x6b,_0x118de6- -0xeb,_0x217d94-_0x3ab693._0x617193,_0x40e026);}function _0x151e4f(_0x1d5dae,_0x4086cd,_0x19c976,_0x476ea2){return _0x1458f5(_0x1d5dae-_0x3c872d._0x51ea1f,_0x19c976,_0x19c976-_0x3c872d._0x5745d2,_0x4086cd- -_0x3c872d._0x4831e0);}const _0x16bbac={'GxsxN':function(_0xf39058){return _0xf39058();},'AocZw':_0x151e4f(-0xd2,-_0x400346._0x55593c,_0x400346._0x33cfa4,-_0x400346._0x48bd6e)};return path[_0x1a60cc(_0x400346._0x24d550,_0x400346._0x1df859,_0x400346._0x1fac46,_0x400346._0x27d2c5)](_0x16bbac[_0x151e4f(-_0x400346._0x3ac188,-0xe2,_0x400346._0x341fc1,-0x147)](getCredentialsDir),_0x16bbac[_0x1a60cc(_0x400346._0x17711d,-_0x400346._0x2d9ed6,0x23,-_0x400346._0x4afe90)],_0x90e5d2);}function getAuthProfilesPath(_0x50e576){const _0x1efc56={_0x340490:0x23d,_0x553a10:'ytlF',_0x1d5f8e:0x17d,_0x5d9093:0xf2,_0x3e7521:'HHP9',_0x3e60bc:0x17c,_0x453da5:0x17a,_0x475624:'sgPd',_0x12c78c:0xa9,_0x2ff8f0:0x123},_0x54ac9f={_0x44f9c2:0x114},_0x3feaa4={_0x44eca2:0xf8},_0x5dd5fc={};function _0x1ed912(_0xc9d342,_0x44b5d4,_0x37f512,_0x23b6ab){return _0x1458f5(_0xc9d342-0x10c,_0x23b6ab,_0x37f512-_0x3feaa4._0x44eca2,_0x44b5d4-0x5c9);}function _0x528f73(_0x1a3848,_0x204764,_0x2c5d2b,_0x96819c){return _0x1458f5(_0x1a3848-0x1,_0x96819c,_0x2c5d2b-0x7f,_0x1a3848- -_0x54ac9f._0x44f9c2);}_0x5dd5fc[_0x528f73(-0x2ba,-0x21b,-_0x1efc56._0x340490,_0x1efc56._0x553a10)]=_0x528f73(-_0x1efc56._0x1d5f8e,-0x13c,-_0x1efc56._0x5d9093,_0x1efc56._0x3e7521)+_0x528f73(-0x1a2,-_0x1efc56._0x3e60bc,-0xfe,'0N]u');const _0x124425=_0x5dd5fc;return path[_0x528f73(-_0x1efc56._0x453da5,-0xde,-0x130,_0x1efc56._0x475624)](getAgentDir(_0x50e576),_0x124425[_0x528f73(-0x15a,-_0x1efc56._0x12c78c,-_0x1efc56._0x2ff8f0,'krgL')]);}function getModelsJsonPath(_0x5e21e7){const _0x4d2037={_0x4f55c8:0x2f0,_0x4c20e6:0x3be,_0xd90b71:'18Yt',_0x43bff9:0x4af,_0x13b754:0x3f1,_0x5eafa0:'!I6k',_0x4c4a47:0x41a,_0x2babca:0x207,_0x47f5fd:'L)hD',_0x564946:0x203},_0x3596af={_0x4c5f1c:0x4f7},_0x2304fe={_0x226f47:0x34,_0x36c810:0xaf},_0xfdb5d4={'wVUtW':function(_0x56bf06,_0x1ec716){return _0x56bf06(_0x1ec716);},'xZBMR':_0x305214(_0x4d2037._0x4f55c8,_0x4d2037._0x4c20e6,'9bPZ',0x38c)+'n'};function _0x3b5a00(_0x24c62a,_0x4d2680,_0x5d7269,_0x94007a){return _0x1458f5(_0x24c62a-_0x2304fe._0x226f47,_0x4d2680,_0x5d7269-_0x2304fe._0x36c810,_0x94007a- -0x111);}function _0x305214(_0x59c0ce,_0x259423,_0x4a316a,_0x5bad75){return _0x1458f5(_0x59c0ce-0xe8,_0x4a316a,_0x4a316a-0x69,_0x5bad75-_0x3596af._0x4c5f1c);}return path[_0x3b5a00(-0x26b,_0x4d2037._0xd90b71,-0x2d8,-0x26b)](_0xfdb5d4[_0x305214(_0x4d2037._0x43bff9,_0x4d2037._0x13b754,_0x4d2037._0x5eafa0,_0x4d2037._0x4c4a47)](getAgentDir,_0x5e21e7),_0xfdb5d4[_0x3b5a00(-_0x4d2037._0x2babca,_0x4d2037._0x47f5fd,-0x27d,-_0x4d2037._0x564946)]);}function isValidId(_0x1e2b77){const _0x4e42a2={_0x22b995:0x215,_0x58a92f:0x2ba},_0x2434d6={_0x502fda:0x2ac,_0x36577c:0x2b};function _0x1776b8(_0x2b51f3,_0x435689,_0x4789f9,_0x21d4e3){return _0x2eb0d7(_0x2b51f3-0x1aa,_0x21d4e3- -_0x2434d6._0x502fda,_0x4789f9-_0x2434d6._0x36577c,_0x2b51f3);}return/^[a-z]+_[a-z0-9]+$/[_0x1776b8('SgAX',-0x2c2,-_0x4e42a2._0x22b995,-_0x4e42a2._0x58a92f)](_0x1e2b77);}function isValidRole(_0x39f534){const _0x1f101e={_0x32ec3c:0x3ad,_0x2c0c04:0x391,_0x7a7efb:0x445,_0x20dff9:0x3ae,_0x218086:'nNc9',_0x27ff0a:0x294,_0xe0ea79:0x36c,_0xdcae5f:'CxvU',_0x1b9a08:0x491,_0x50a41e:0x4d5,_0x508f1e:'4GP9',_0x3973cb:0x259,_0x422363:0x272,_0x33327e:0x2e8,_0x286b6a:0x2de,_0x472659:'0N]u',_0xeb94a2:0x310,_0x1d9bca:0x389,_0x4f717b:0x397,_0x4d244d:0x32a,_0x8fa45d:'4Ur1'},_0x13d464={_0x244c35:0x46,_0x57711f:0xe7},_0x1cb8d6={_0x1fc978:0x118};function _0x323350(_0x3d9700,_0x4e26cd,_0x21641e,_0x2dd8ed){return _0x1458f5(_0x3d9700-_0x1cb8d6._0x1fc978,_0x3d9700,_0x21641e-0x4a,_0x4e26cd-0x406);}const _0x4b34c2={};function _0x150751(_0x41111c,_0x4d2a98,_0x44db0a,_0x32c0d3){return _0x2eb0d7(_0x41111c-_0x13d464._0x244c35,_0x41111c-0x358,_0x44db0a-_0x13d464._0x57711f,_0x4d2a98);}_0x4b34c2[_0x150751(0x314,'L)hD',_0x1f101e._0x32ec3c,_0x1f101e._0x2c0c04)]=_0x150751(_0x1f101e._0x7a7efb,'nq37',_0x1f101e._0x20dff9,0x3d5),_0x4b34c2[_0x150751(0x332,_0x1f101e._0x218086,_0x1f101e._0x27ff0a,_0x1f101e._0xe0ea79)]=_0x150751(0x48e,_0x1f101e._0xdcae5f,_0x1f101e._0x1b9a08,_0x1f101e._0x50a41e),_0x4b34c2[_0x323350(_0x1f101e._0x508f1e,_0x1f101e._0x3973cb,0x2cb,_0x1f101e._0x422363)]=_0x323350('SgAX',_0x1f101e._0x33327e,_0x1f101e._0x286b6a,0x227);const _0x421623=_0x4b34c2;return[_0x421623[_0x323350(_0x1f101e._0x472659,_0x1f101e._0xeb94a2,0x2fa,_0x1f101e._0x1d9bca)],_0x323350(_0x1f101e._0xdcae5f,_0x1f101e._0x4f717b,0x2ea,0x375),_0x421623[_0x150751(_0x1f101e._0x4d244d,'%Bc*',0x397,0x39a)],_0x421623[_0x323350('%Bc*',0x2af,0x2f2,0x32b)]][_0x150751(0x45f,_0x1f101e._0x8fa45d,0x403,0x41f)](_0x39f534);}function _0x47e4(_0x25f9b8,_0x44b9f0){_0x25f9b8=_0x25f9b8-(0x15eb+0x1b*0x23+0x3*-0x83f);const _0x4857f3=_0x1e27();let _0xf9e86e=_0x4857f3[_0x25f9b8];if(_0x47e4['BgnfvM']===undefined){var _0x23692e=function(_0x349fc4){const _0xf894c9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x49d72e='',_0x218b64='';for(let _0x3421b0=0x108f*0x2+-0x4*0x98f+0x51e,_0x5b0481,_0x1f6290,_0x44b5a1=0x1a6+0x1f56+-0x20fc;_0x1f6290=_0x349fc4['charAt'](_0x44b5a1++);~_0x1f6290&&(_0x5b0481=_0x3421b0%(0xc83*-0x1+-0x24ce+0x3155)?_0x5b0481*(-0x239e+-0xe37*0x1+0x3215)+_0x1f6290:_0x1f6290,_0x3421b0++%(-0x2154+0x21*-0x35+0x282d))?_0x49d72e+=String['fromCharCode'](-0xa66+0x1*-0x86f+-0x8d*-0x24&_0x5b0481>>(-(-0x1078+0x3a6+-0xcd4*-0x1)*_0x3421b0&0x467+0x2580+-0x29e1)):-0x1410+0x2595+0x5d7*-0x3){_0x1f6290=_0xf894c9['indexOf'](_0x1f6290);}for(let _0x2bdadd=-0x16*-0x10+0x1*0x107e+-0x11de,_0x297e6e=_0x49d72e['length'];_0x2bdadd<_0x297e6e;_0x2bdadd++){_0x218b64+='%'+('00'+_0x49d72e['charCodeAt'](_0x2bdadd)['toString'](0x154*-0x5+0x6*0x67f+-0x1e6*0x11))['slice'](-(-0x2218+-0xce4+-0x4b3*-0xa));}return decodeURIComponent(_0x218b64);};const _0xf241a3=function(_0x3fba31,_0x43754b){let _0x375b55=[],_0x2549c4=-0x1*-0x14c6+-0x6*0x670+0x11da,_0x5e00c5,_0x35db5f='';_0x3fba31=_0x23692e(_0x3fba31);let _0x4e6349;for(_0x4e6349=0x3*0x484+0x134c+0x2*-0x106c;_0x4e6349<0x268d+0x24ae*0x1+0x265*-0x1f;_0x4e6349++){_0x375b55[_0x4e6349]=_0x4e6349;}for(_0x4e6349=0x1*0x70+-0x65a+-0x2*-0x2f5;_0x4e6349<-0x229*-0xe+0x19b2*-0x1+-0x38c;_0x4e6349++){_0x2549c4=(_0x2549c4+_0x375b55[_0x4e6349]+_0x43754b['charCodeAt'](_0x4e6349%_0x43754b['length']))%(-0x1f9a*0x1+0x1566+0xb34),_0x5e00c5=_0x375b55[_0x4e6349],_0x375b55[_0x4e6349]=_0x375b55[_0x2549c4],_0x375b55[_0x2549c4]=_0x5e00c5;}_0x4e6349=0x1*0x1cdd+-0x234f+0xb*0x96,_0x2549c4=0x15f9+-0x1840+0x247;for(let _0x5c6f42=0x14ff*-0x1+0xc9a*0x1+-0x133*-0x7;_0x5c6f42<_0x3fba31['length'];_0x5c6f42++){_0x4e6349=(_0x4e6349+(-0x11*0x125+0x1089+0x2ed))%(0x19bf+-0x21*0x52+-0xe2d),_0x2549c4=(_0x2549c4+_0x375b55[_0x4e6349])%(-0x143*0x1+0x138e+0x13*-0xe9),_0x5e00c5=_0x375b55[_0x4e6349],_0x375b55[_0x4e6349]=_0x375b55[_0x2549c4],_0x375b55[_0x2549c4]=_0x5e00c5,_0x35db5f+=String['fromCharCode'](_0x3fba31['charCodeAt'](_0x5c6f42)^_0x375b55[(_0x375b55[_0x4e6349]+_0x375b55[_0x2549c4])%(0x25d7*0x1+-0x75f*-0x5+0x24d9*-0x2)]);}return _0x35db5f;};_0x47e4['vXVkVE']=_0xf241a3,_0x47e4['GvcwqE']={},_0x47e4['BgnfvM']=!![];}const _0x4f2621=_0x4857f3[0x15a3*0x1+0x834+-0x1dd7],_0x22dba8=_0x25f9b8+_0x4f2621,_0x587f3c=_0x47e4['GvcwqE'][_0x22dba8];return!_0x587f3c?(_0x47e4['sDzOLk']===undefined&&(_0x47e4['sDzOLk']=!![]),_0xf9e86e=_0x47e4['vXVkVE'](_0xf9e86e,_0x44b9f0),_0x47e4['GvcwqE'][_0x22dba8]=_0xf9e86e):_0xf9e86e=_0x587f3c,_0xf9e86e;}function isValidTaskStatus(_0x13a56f){const _0x3e043b={_0x1950ad:0x66,_0x3d1764:'hQPv',_0xb638c0:0xa0,_0x1d6c69:'g(5s',_0x13423d:0x44,_0x206092:'Qzp6',_0x438888:0x2ec,_0x4d2a1e:0x18,_0x1b96a0:'4Ur1',_0x45ffb6:0x45,_0x4cb5a8:0x9b,_0x31b8e5:'gEVZ',_0x2882a8:0xd7,_0x2e79f8:0x230,_0xd504e8:'CxvU',_0x5ebf6e:0x1aa,_0x2501c1:0xf9,_0xf80a6d:'PXR5',_0x33f42a:0x93,_0x4823a1:0x189,_0x2fb57d:0xbf,_0x2fc947:0x119,_0xe41eff:0xcc,_0x29b100:'nq37',_0x11d41c:0x15,_0x4091c9:0x56,_0x3b539a:0x86,_0x6350a1:0x233,_0x20cde4:0x1b7,_0x381843:0x123,_0x1a2a6e:0x14c},_0x4a7b65={_0xa61220:0xcc},_0x3a31ed={_0x43f169:0xfd,_0x5e4661:0xa8},_0x2c77c1={};function _0x457e7a(_0x1d6c72,_0x311127,_0xbe9af,_0x149b45){return _0x1458f5(_0x1d6c72-_0x3a31ed._0x43f169,_0x311127,_0xbe9af-0x130,_0x1d6c72- -_0x3a31ed._0x5e4661);}_0x2c77c1[_0x1404c4(-0x9d,-_0x3e043b._0x1950ad,_0x3e043b._0x3d1764,-_0x3e043b._0xb638c0)]=_0x1404c4(-0x3c,0x6b,_0x3e043b._0x1d6c69,-_0x3e043b._0x13423d)+'s';function _0x1404c4(_0x18cb9d,_0x4a4a89,_0x477b0f,_0x4562e0){return _0x1458f5(_0x18cb9d-0x190,_0x477b0f,_0x477b0f-0x35,_0x4a4a89-_0x4a7b65._0xa61220);}_0x2c77c1[_0x457e7a(-0x22a,_0x3e043b._0x206092,-0x288,-_0x3e043b._0x438888)]=_0x1404c4(_0x3e043b._0x4d2a1e,-0x18,'GH1b',0xa6)+_0x1404c4(-0x3f,-0xd4,_0x3e043b._0x1b96a0,-_0x3e043b._0x45ffb6),_0x2c77c1[_0x1404c4(-0x23,-_0x3e043b._0x4cb5a8,_0x3e043b._0x31b8e5,-0x82)]=_0x457e7a(-_0x3e043b._0x2882a8,'XPYp',-0x112,-0x128),_0x2c77c1[_0x457e7a(-0x188,'nJBR',-_0x3e043b._0x2e79f8,-0x1a3)]=_0x457e7a(-0x226,_0x3e043b._0xd504e8,-_0x3e043b._0x5ebf6e,-0x1f5),_0x2c77c1[_0x457e7a(-_0x3e043b._0x2501c1,_0x3e043b._0xf80a6d,-_0x3e043b._0x33f42a,-0x54)]=_0x1404c4(0x1f,-0x99,'tu]z',-0xe9);const _0x31813a=_0x2c77c1;return[_0x457e7a(-0xe7,'%Bc*',-_0x3e043b._0x4823a1,-_0x3e043b._0x2fb57d),_0x31813a[_0x1404c4(-0x2d,-0xd0,'tu]z',-0x92)],_0x31813a[_0x1404c4(-_0x3e043b._0x2fc947,-_0x3e043b._0xe41eff,_0x3e043b._0x29b100,-0xb5)],_0x31813a[_0x1404c4(-_0x3e043b._0x11d41c,-_0x3e043b._0x4091c9,'0N]u',-_0x3e043b._0x3b539a)],_0x31813a['yhzgr'],_0x31813a[_0x457e7a(-_0x3e043b._0x6350a1,'4Ur1',-_0x3e043b._0x20cde4,-0x26b)]][_0x457e7a(-_0x3e043b._0x381843,'5Di6',-0x148,-_0x3e043b._0x1a2a6e)](_0x13a56f);}function isValidNodeStatus(_0x1b335c){const _0x556f65={_0x5e94b4:0x87,_0xd157c6:'txLZ',_0x300a5f:0xf3,_0x11f433:0x162,_0x485e0b:0x10b,_0x2a8db7:0x1cb,_0x4379b1:0x229,_0x3774ea:0x15b,_0x17df71:'sLcW',_0x4c50a2:0x202,_0x50ea91:'9dc8',_0x5443de:0x11a,_0xc34bb9:0x20b,_0x3c635e:0x190,_0x1dad42:0x199,_0x24afca:0x34a,_0x58d86a:'kt(H',_0x2ca8d4:0x3d,_0x5dace1:0xd0,_0x2ef780:0x6b,_0x18999b:0x99,_0x17c9b8:'*nWF',_0x377b36:0x140,_0x250f72:'sdUQ',_0x43f9ff:0xd4,_0x407dfa:0x1b4,_0x29dfca:'KmuR',_0x69f3c0:0x31b,_0x3b8d67:'9bPZ',_0x169d1b:0x2da,_0x2f1378:0x244,_0xe4c765:0x167,_0x11e122:'nJBR'},_0x589c73={_0x284d7c:0xe1,_0x5945b8:0x142},_0x19877d={_0x5d643f:0x1b5,_0x8a0ad2:0x2d5},_0x56dfad={};_0x56dfad[_0x45eca9(_0x556f65._0x5e94b4,_0x556f65._0xd157c6,_0x556f65._0x300a5f,_0x556f65._0x11f433)]=_0x45eca9(_0x556f65._0x485e0b,'GH1b',_0x556f65._0x2a8db7,_0x556f65._0x4379b1),_0x56dfad[_0x45eca9(_0x556f65._0x3774ea,_0x556f65._0x17df71,0x149,_0x556f65._0x4c50a2)]=_0x45eca9(0xa2,_0x556f65._0x50ea91,0xfd,_0x556f65._0x5443de)+'s',_0x56dfad[_0x45eca9(_0x556f65._0xc34bb9,_0x556f65._0x50ea91,_0x556f65._0x3c635e,_0x556f65._0x1dad42)]='pending_re'+_0x1e1ee2(_0x556f65._0x24afca,0x40f,_0x556f65._0x58d86a,0x402);function _0x1e1ee2(_0x110c4f,_0x561f9d,_0x216832,_0x121142){return _0x2eb0d7(_0x110c4f-_0x19877d._0x5d643f,_0x121142-_0x19877d._0x8a0ad2,_0x216832-0x14a,_0x216832);}_0x56dfad['DFfAC']=_0x45eca9(_0x556f65._0x2ca8d4,'0N]u',_0x556f65._0x5dace1,_0x556f65._0x2ef780);function _0x45eca9(_0x3f1291,_0x9959d3,_0x55db9a,_0x8ee3d7){return _0x2eb0d7(_0x3f1291-0x1c0,_0x55db9a-_0x589c73._0x284d7c,_0x55db9a-_0x589c73._0x5945b8,_0x9959d3);}_0x56dfad[_0x45eca9(_0x556f65._0x18999b,_0x556f65._0x17c9b8,0x11c,0x148)]=_0x45eca9(_0x556f65._0x377b36,_0x556f65._0x250f72,_0x556f65._0x43f9ff,0xbf);const _0x3276a7=_0x56dfad;return[_0x3276a7[_0x45eca9(_0x556f65._0x407dfa,_0x556f65._0x29dfca,0x18f,0x178)],_0x3276a7[_0x1e1ee2(0x33f,_0x556f65._0x69f3c0,_0x556f65._0x3b8d67,0x2e3)],_0x3276a7['pDGld'],_0x3276a7[_0x1e1ee2(0x256,0x2e9,'3]Qm',_0x556f65._0x169d1b)],_0x3276a7[_0x45eca9(_0x556f65._0x2f1378,'krgL',0x1f6,0x208)]][_0x45eca9(_0x556f65._0xe4c765,_0x556f65._0x11e122,0x157,0x162)](_0x1b335c);}const _0x3a1450={};_0x3a1450[_0x1458f5(-0x9c,'krgL',-0x11b,-0xca)]=_0x2eb0d7(-0x4b,-0x40,-0x9a,'ZT4A'),_0x3a1450[_0x2eb0d7(0x183,0x101,0x4d,'*nWF')]=_0x1458f5(-0xb3,'tu]z',-0x56,-0xeb),_0x3a1450[_0x1458f5(-0x30,'!I6k',-0x5b,-0x38)]=_0x1458f5(-0xa4,'4Ur1',0x3c,-0x37),_0x3a1450[_0x1458f5(-0xe9,'4Ur1',-0x185,-0x180)]=_0x2eb0d7(0x66,0x77,0x11c,'gGjW'),_0x3a1450[_0x2eb0d7(0x68,0xf5,0x47,'sdUQ')]=_0x2eb0d7(0xf5,0x3f,0x8,'nJBR');const LOG_COLORS=_0x3a1450;function log(_0x5a6457,_0x3bc6a3,..._0x171dfb){const _0x3a6ad5={_0x871bdf:0x116,_0x9afd75:'Ev1O',_0xc6831a:'5Di6',_0x578d6a:0x234,_0x4eaffb:0xa2,_0x2b5d4b:0x13c,_0x736833:0x14c,_0xe4309e:0x143},_0x373bb8={_0x1ca0d6:0x5a,_0x329c33:0x1fe},_0x4a104e={_0xf10570:0x136};function _0x287fc1(_0x338e1a,_0x22a094,_0xe31f17,_0x56decf){return _0x2eb0d7(_0x338e1a-0x100,_0x338e1a-0x7f,_0xe31f17-_0x4a104e._0xf10570,_0x56decf);}const _0x8039c2={'bVNgQ':function(_0x388a52,_0x376992){return _0x388a52(_0x376992);}},_0xf5c734=_0x8039c2[_0x287fc1(0xae,0x58,_0x3a6ad5._0x871bdf,_0x3a6ad5._0x9afd75)](formatDateTime,new Date());function _0x4ad0f3(_0x3ac4be,_0x2f0239,_0xe765e6,_0x5c58c0){return _0x2eb0d7(_0x3ac4be-_0x373bb8._0x1ca0d6,_0x5c58c0-_0x373bb8._0x329c33,_0xe765e6-0x119,_0xe765e6);}const _0x361d0e=LOG_COLORS[_0x5a6457]||LOG_COLORS[_0x4ad0f3(0x297,0x2b6,_0x3a6ad5._0xc6831a,_0x3a6ad5._0x578d6a)],_0x435161=LOG_COLORS[_0x287fc1(_0x3a6ad5._0x4eaffb,0x11d,_0x3a6ad5._0x2b5d4b,'^elY')];console['log'](_0x361d0e+'['+_0xf5c734+_0x287fc1(_0x3a6ad5._0x736833,0xbb,_0x3a6ad5._0xe4309e,'g(5s')+_0x5a6457[_0x4ad0f3(0x1f1,0x261,'3]Qm',0x21d)+'e']()+']'+_0x435161+'\x20'+_0x3bc6a3,..._0x171dfb);}exports[_0x2eb0d7(-0x59,-0x3c,0x71,'5Di6')]={'debug':(_0xee032,..._0x263a28)=>log(_0x2eb0d7(0x4,0xc1,0x14b,'sLcW'),_0xee032,..._0x263a28),'info':(_0x1f6965,..._0x3cc3a1)=>log(_0x2eb0d7(0x2a,0x2c,0x93,'gEVZ'),_0x1f6965,..._0x3cc3a1),'warn':(_0x22b816,..._0x2db201)=>log(_0x2eb0d7(0xda,0x52,-0x28,'nJBR'),_0x22b816,..._0x2db201),'error':(_0x16443c,..._0x3580f8)=>log(_0x1458f5(-0x6a,'IM@T',-0x5a,-0x119),_0x16443c,..._0x3580f8)},__exportStar(require(_0x2eb0d7(0xa0,0x7e,-0x39,'kt(H')+_0x1458f5(-0x49,'kt(H',-0xd5,-0xba)),exports),__exportStar(require(_0x1458f5(-0x16,'nNc9',-0x5a,-0x39)+_0x2eb0d7(0xe4,0xf7,0x164,'FV3M')+_0x2eb0d7(-0x55,0x33,0xac,'18Yt')),exports),__exportStar(require(_0x1458f5(-0x103,'CxvU',-0x151,-0x118)+_0x1458f5(-0xec,'KmuR',-0xf9,-0x72)+'p'),exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Utility Functions Module
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
39
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.logger = void 0;
|
|
43
|
+
exports.generateTaskId = generateTaskId;
|
|
44
|
+
exports.generateIncrementTaskId = generateIncrementTaskId;
|
|
45
|
+
exports.generateStageId = generateStageId;
|
|
46
|
+
exports.parseTaskId = parseTaskId;
|
|
47
|
+
exports.isIncrementTask = isIncrementTask;
|
|
48
|
+
exports.getBaseTaskId = getBaseTaskId;
|
|
49
|
+
exports.generateNodeId = generateNodeId;
|
|
50
|
+
exports.generateAgentId = generateAgentId;
|
|
51
|
+
exports.generateDocId = generateDocId;
|
|
52
|
+
exports.generateDeptId = generateDeptId;
|
|
53
|
+
exports.generateJobId = generateJobId;
|
|
54
|
+
exports.generateSkillPackId = generateSkillPackId;
|
|
55
|
+
exports.generateMessageId = generateMessageId;
|
|
56
|
+
exports.getCurrentTimestamp = getCurrentTimestamp;
|
|
57
|
+
exports.formatDate = formatDate;
|
|
58
|
+
exports.formatDateTime = formatDateTime;
|
|
59
|
+
exports.safeJsonParse = safeJsonParse;
|
|
60
|
+
exports.safeJsonStringify = safeJsonStringify;
|
|
61
|
+
exports.isValidOpenClawRoot = isValidOpenClawRoot;
|
|
62
|
+
exports.setOpenClawRoot = setOpenClawRoot;
|
|
63
|
+
exports.getOpenClawRoot = getOpenClawRoot;
|
|
64
|
+
exports.hasCustomOpenClawRoot = hasCustomOpenClawRoot;
|
|
65
|
+
exports.resetOpenClawRoot = resetOpenClawRoot;
|
|
66
|
+
exports.getTeamRoot = getTeamRoot;
|
|
67
|
+
exports.getDatabasePath = getDatabasePath;
|
|
68
|
+
exports.getTaskDir = getTaskDir;
|
|
69
|
+
exports.getFlowsDir = getFlowsDir;
|
|
70
|
+
exports.getAgentWorkspace = getAgentWorkspace;
|
|
71
|
+
exports.getAgentDir = getAgentDir;
|
|
72
|
+
exports.getAgentSessionsDir = getAgentSessionsDir;
|
|
73
|
+
exports.getOpenClawJsonPath = getOpenClawJsonPath;
|
|
74
|
+
exports.getCredentialsDir = getCredentialsDir;
|
|
75
|
+
exports.getFeishuCredentialsDir = getFeishuCredentialsDir;
|
|
76
|
+
exports.getAuthProfilesPath = getAuthProfilesPath;
|
|
77
|
+
exports.getModelsJsonPath = getModelsJsonPath;
|
|
78
|
+
exports.isValidId = isValidId;
|
|
79
|
+
exports.isValidRole = isValidRole;
|
|
80
|
+
exports.isValidTaskStatus = isValidTaskStatus;
|
|
81
|
+
exports.isValidNodeStatus = isValidNodeStatus;
|
|
82
|
+
exports.log = log;
|
|
83
|
+
const uuid_1 = require("uuid");
|
|
84
|
+
// ============================================
|
|
85
|
+
// ID Generators
|
|
86
|
+
// ============================================
|
|
87
|
+
/**
|
|
88
|
+
* Generate task ID
|
|
89
|
+
* Format: task_YYYYMMDD_random_string
|
|
90
|
+
*/
|
|
91
|
+
function generateTaskId() {
|
|
92
|
+
const date = new Date();
|
|
93
|
+
const dateStr = date.toISOString().slice(0, 10).replace(/-/g, '');
|
|
94
|
+
const random = (0, uuid_1.v4)().slice(0, 8);
|
|
95
|
+
return `task_${dateStr}_${random}`;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Generate increment task ID (v1.1.3)
|
|
99
|
+
* Format: {base_task_id}_{increment_index}
|
|
100
|
+
* Example: task_20260321_abc12345_001
|
|
101
|
+
*
|
|
102
|
+
* @param baseTaskId - The base task ID
|
|
103
|
+
* @param incrementIndex - The increment index (1, 2, 3...)
|
|
104
|
+
*/
|
|
105
|
+
function generateIncrementTaskId(baseTaskId, incrementIndex) {
|
|
106
|
+
const indexStr = String(incrementIndex).padStart(3, '0');
|
|
107
|
+
return `${baseTaskId}_${indexStr}`;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Generate stage ID (v1.1.7)
|
|
111
|
+
* Format: stage_{task_id}_{sequence}
|
|
112
|
+
* Example: stage_task_20260321_abc12345_1
|
|
113
|
+
*
|
|
114
|
+
* @param taskId - The task ID
|
|
115
|
+
* @param sequence - The stage sequence (1, 2, 3...)
|
|
116
|
+
*/
|
|
117
|
+
function generateStageId(taskId, sequence) {
|
|
118
|
+
return `stage_${taskId}_${sequence}`;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Parse task ID to get base task ID and increment index (v1.1.3)
|
|
122
|
+
*
|
|
123
|
+
* @param taskId - The task ID to parse
|
|
124
|
+
* @returns { baseTaskId, incrementIndex } or null if not an increment task
|
|
125
|
+
*/
|
|
126
|
+
function parseTaskId(taskId) {
|
|
127
|
+
// Match pattern: task_YYYYMMDD_randomstring_NNN
|
|
128
|
+
const match = taskId.match(/^(task_\d{8}_[a-f0-9]{8})_(\d{3})$/);
|
|
129
|
+
if (match) {
|
|
130
|
+
return {
|
|
131
|
+
baseTaskId: match[1],
|
|
132
|
+
incrementIndex: parseInt(match[2], 10)
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Check if task is an increment task (v1.1.3)
|
|
139
|
+
*/
|
|
140
|
+
function isIncrementTask(taskId) {
|
|
141
|
+
return parseTaskId(taskId) !== null;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Get base task ID from increment task ID (v1.1.3)
|
|
145
|
+
*/
|
|
146
|
+
function getBaseTaskId(taskId) {
|
|
147
|
+
const parsed = parseTaskId(taskId);
|
|
148
|
+
return parsed ? parsed.baseTaskId : null;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Generate node ID
|
|
152
|
+
* Format: node_random_string
|
|
153
|
+
*/
|
|
154
|
+
function generateNodeId() {
|
|
155
|
+
return `node_${(0, uuid_1.v4)().slice(0, 12)}`;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Generate Agent ID
|
|
159
|
+
* Format: agent_random_string
|
|
160
|
+
*/
|
|
161
|
+
function generateAgentId() {
|
|
162
|
+
return `agent_${(0, uuid_1.v4)().slice(0, 12)}`;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Generate document ID
|
|
166
|
+
* Format: doc_random_string
|
|
167
|
+
*/
|
|
168
|
+
function generateDocId() {
|
|
169
|
+
return `doc_${(0, uuid_1.v4)().slice(0, 12)}`;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Generate department ID
|
|
173
|
+
* Format: dept_random_string
|
|
174
|
+
*/
|
|
175
|
+
function generateDeptId() {
|
|
176
|
+
return `dept_${(0, uuid_1.v4)().slice(0, 8)}`;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Generate job ID
|
|
180
|
+
* Format: job_random_string
|
|
181
|
+
*/
|
|
182
|
+
function generateJobId() {
|
|
183
|
+
return `job_${(0, uuid_1.v4)().slice(0, 8)}`;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Generate skill pack ID
|
|
187
|
+
* Format: skill_random_string
|
|
188
|
+
*/
|
|
189
|
+
function generateSkillPackId() {
|
|
190
|
+
return `skill_${(0, uuid_1.v4)().slice(0, 8)}`;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Generate message ID
|
|
194
|
+
* Format: msg_random_string
|
|
195
|
+
*/
|
|
196
|
+
function generateMessageId() {
|
|
197
|
+
return `msg_${(0, uuid_1.v4)().slice(0, 12)}`;
|
|
198
|
+
}
|
|
199
|
+
// ============================================
|
|
200
|
+
// Time Utilities
|
|
201
|
+
// ============================================
|
|
202
|
+
/**
|
|
203
|
+
* Get current ISO timestamp string
|
|
204
|
+
*/
|
|
205
|
+
function getCurrentTimestamp() {
|
|
206
|
+
return new Date().toISOString();
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Format date to YYYY-MM-DD format
|
|
210
|
+
*/
|
|
211
|
+
function formatDate(date) {
|
|
212
|
+
return date.toISOString().slice(0, 10);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Format datetime to YYYY-MM-DD HH:mm:ss format
|
|
216
|
+
*/
|
|
217
|
+
function formatDateTime(date) {
|
|
218
|
+
return date.toISOString().replace('T', ' ').slice(0, 19);
|
|
219
|
+
}
|
|
220
|
+
// ============================================
|
|
221
|
+
// JSON Utilities
|
|
222
|
+
// ============================================
|
|
223
|
+
/**
|
|
224
|
+
* Safe parse JSON, return default value on failure
|
|
225
|
+
*/
|
|
226
|
+
function safeJsonParse(json, defaultValue) {
|
|
227
|
+
if (!json)
|
|
228
|
+
return defaultValue;
|
|
229
|
+
try {
|
|
230
|
+
return JSON.parse(json);
|
|
231
|
+
}
|
|
232
|
+
catch {
|
|
233
|
+
return defaultValue;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Safe stringify JSON
|
|
238
|
+
*/
|
|
239
|
+
function safeJsonStringify(obj) {
|
|
240
|
+
return JSON.stringify(obj);
|
|
241
|
+
}
|
|
242
|
+
// ============================================
|
|
243
|
+
// Path Utilities (Follow OpenClaw Official Standard)
|
|
244
|
+
// ============================================
|
|
245
|
+
const path = __importStar(require("path"));
|
|
246
|
+
const os = __importStar(require("os"));
|
|
247
|
+
const fs = __importStar(require("fs"));
|
|
248
|
+
/**
|
|
249
|
+
* Current OpenClaw root directory
|
|
250
|
+
* Must be set via setOpenClawRoot() or TUI selection
|
|
251
|
+
*/
|
|
252
|
+
let currentOpenClawRoot = null;
|
|
253
|
+
/**
|
|
254
|
+
* Default OpenClaw root directory
|
|
255
|
+
* Official standard: ~/.openclaw
|
|
256
|
+
*/
|
|
257
|
+
const DEFAULT_OPENCLAW_ROOT = path.join(os.homedir(), '.openclaw');
|
|
258
|
+
/**
|
|
259
|
+
* Validate if directory is a valid OpenClaw root
|
|
260
|
+
* Must have openclaw.json file
|
|
261
|
+
*/
|
|
262
|
+
function isValidOpenClawRoot(dirPath) {
|
|
263
|
+
// Check if path exists
|
|
264
|
+
if (!fs.existsSync(dirPath)) {
|
|
265
|
+
return { valid: false, error: '目录不存在' };
|
|
266
|
+
}
|
|
267
|
+
// Check if it's a directory
|
|
268
|
+
const stat = fs.statSync(dirPath);
|
|
269
|
+
if (!stat.isDirectory()) {
|
|
270
|
+
return { valid: false, error: '路径不是目录' };
|
|
271
|
+
}
|
|
272
|
+
// Check if openclaw.json exists
|
|
273
|
+
const openclawJsonPath = path.join(dirPath, 'openclaw.json');
|
|
274
|
+
if (!fs.existsSync(openclawJsonPath)) {
|
|
275
|
+
return { valid: false, error: '目录下不存在 openclaw.json 文件,请确认是否为 OpenClaw 工作目录' };
|
|
276
|
+
}
|
|
277
|
+
// Validate openclaw.json is valid JSON
|
|
278
|
+
try {
|
|
279
|
+
const content = fs.readFileSync(openclawJsonPath, 'utf-8');
|
|
280
|
+
// Remove BOM if present
|
|
281
|
+
let cleanContent = content;
|
|
282
|
+
if (cleanContent.charCodeAt(0) === 0xFEFF) {
|
|
283
|
+
cleanContent = cleanContent.slice(1);
|
|
284
|
+
}
|
|
285
|
+
// Standard JSON doesn't support comments, parse directly
|
|
286
|
+
JSON.parse(cleanContent);
|
|
287
|
+
return { valid: true };
|
|
288
|
+
}
|
|
289
|
+
catch (parseError) {
|
|
290
|
+
const errorMsg = parseError instanceof Error ? parseError.message : String(parseError);
|
|
291
|
+
return { valid: false, error: `openclaw.json 文件格式无效: ${errorMsg}` };
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Set OpenClaw root directory
|
|
296
|
+
* Will validate if directory is valid
|
|
297
|
+
*/
|
|
298
|
+
function setOpenClawRoot(dirPath) {
|
|
299
|
+
const validation = isValidOpenClawRoot(dirPath);
|
|
300
|
+
if (!validation.valid) {
|
|
301
|
+
return { success: false, error: validation.error };
|
|
302
|
+
}
|
|
303
|
+
currentOpenClawRoot = dirPath;
|
|
304
|
+
return { success: true };
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Get current OpenClaw root directory
|
|
308
|
+
*/
|
|
309
|
+
function getOpenClawRoot() {
|
|
310
|
+
return currentOpenClawRoot || DEFAULT_OPENCLAW_ROOT;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Check if custom OpenClaw root is set
|
|
314
|
+
*/
|
|
315
|
+
function hasCustomOpenClawRoot() {
|
|
316
|
+
return currentOpenClawRoot !== null;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Reset to default OpenClaw root directory
|
|
320
|
+
*/
|
|
321
|
+
function resetOpenClawRoot() {
|
|
322
|
+
currentOpenClawRoot = null;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Get team directory (business data storage)
|
|
326
|
+
*/
|
|
327
|
+
function getTeamRoot() {
|
|
328
|
+
return path.join(getOpenClawRoot(), 'team');
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Get database path
|
|
332
|
+
*/
|
|
333
|
+
function getDatabasePath() {
|
|
334
|
+
return path.join(getTeamRoot(), 'team.db');
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Get task directory
|
|
338
|
+
*/
|
|
339
|
+
function getTaskDir(taskId) {
|
|
340
|
+
return path.join(getTeamRoot(), 'tasks', taskId);
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Get role flow template directory
|
|
344
|
+
*/
|
|
345
|
+
function getFlowsDir() {
|
|
346
|
+
return path.join(getTeamRoot(), 'flows');
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Get agent workspace directory
|
|
350
|
+
* Official standard: ~/.openclaw/workspace-<agentId>
|
|
351
|
+
*/
|
|
352
|
+
function getAgentWorkspace(agentId) {
|
|
353
|
+
return path.join(getOpenClawRoot(), `workspace-${agentId}`);
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Get agent directory
|
|
357
|
+
* Official standard: ~/.openclaw/agents/<agentId>/agent
|
|
358
|
+
* Used for storing auth-profiles.json, models.json, etc.
|
|
359
|
+
*/
|
|
360
|
+
function getAgentDir(agentId) {
|
|
361
|
+
return path.join(getOpenClawRoot(), 'agents', agentId, 'agent');
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Get agent sessions storage directory
|
|
365
|
+
* Official standard: ~/.openclaw/agents/<agentId>/sessions
|
|
366
|
+
*/
|
|
367
|
+
function getAgentSessionsDir(agentId) {
|
|
368
|
+
return path.join(getOpenClawRoot(), 'agents', agentId, 'sessions');
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Get openclaw.json config file path
|
|
372
|
+
*/
|
|
373
|
+
function getOpenClawJsonPath() {
|
|
374
|
+
return path.join(getOpenClawRoot(), 'openclaw.json');
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Get credentials directory
|
|
378
|
+
* Official standard: ~/.openclaw/credentials
|
|
379
|
+
* Used for storing channel authentication info
|
|
380
|
+
*/
|
|
381
|
+
function getCredentialsDir() {
|
|
382
|
+
return path.join(getOpenClawRoot(), 'credentials');
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Get Feishu credentials directory
|
|
386
|
+
* Official standard: ~/.openclaw/credentials/feishu/<accountId>
|
|
387
|
+
*/
|
|
388
|
+
function getFeishuCredentialsDir(accountId = 'default') {
|
|
389
|
+
return path.join(getCredentialsDir(), 'feishu', accountId);
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Get agent's auth-profiles.json path
|
|
393
|
+
* Official standard: ~/.openclaw/agents/<agentId>/agent/auth-profiles.json
|
|
394
|
+
*/
|
|
395
|
+
function getAuthProfilesPath(agentId) {
|
|
396
|
+
return path.join(getAgentDir(agentId), 'auth-profiles.json');
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Get agent's models.json path
|
|
400
|
+
* Official standard: ~/.openclaw/agents/<agentId>/agent/models.json
|
|
401
|
+
*/
|
|
402
|
+
function getModelsJsonPath(agentId) {
|
|
403
|
+
return path.join(getAgentDir(agentId), 'models.json');
|
|
404
|
+
}
|
|
405
|
+
// ============================================
|
|
406
|
+
// Validation Utilities
|
|
407
|
+
// ============================================
|
|
408
|
+
/**
|
|
409
|
+
* Validate ID format
|
|
410
|
+
*/
|
|
411
|
+
function isValidId(id) {
|
|
412
|
+
return /^[a-z]+_[a-z0-9]+$/.test(id);
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Validate role type
|
|
416
|
+
*/
|
|
417
|
+
function isValidRole(role) {
|
|
418
|
+
return ['assistant', 'manager', 'executor', 'reviewer'].includes(role);
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Validate task status
|
|
422
|
+
*/
|
|
423
|
+
function isValidTaskStatus(status) {
|
|
424
|
+
return ['pending', 'in_progress', 'pending_acceptance', 'rejected', 'completed', 'finalized'].includes(status);
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Validate node status
|
|
428
|
+
*/
|
|
429
|
+
function isValidNodeStatus(status) {
|
|
430
|
+
return ['pending', 'in_progress', 'pending_review', 'completed', 'failed'].includes(status);
|
|
431
|
+
}
|
|
432
|
+
const LOG_COLORS = {
|
|
433
|
+
debug: '\x1b[36m', // cyan
|
|
434
|
+
info: '\x1b[32m', // green
|
|
435
|
+
warn: '\x1b[33m', // yellow
|
|
436
|
+
error: '\x1b[31m', // red
|
|
437
|
+
reset: '\x1b[0m'
|
|
438
|
+
};
|
|
439
|
+
/**
|
|
440
|
+
* Simple log output
|
|
441
|
+
*/
|
|
442
|
+
function log(level, message, ...args) {
|
|
443
|
+
const timestamp = formatDateTime(new Date());
|
|
444
|
+
const color = LOG_COLORS[level] || LOG_COLORS.reset;
|
|
445
|
+
const reset = LOG_COLORS.reset;
|
|
446
|
+
console.log(`${color}[${timestamp}] [${level.toUpperCase()}]${reset} ${message}`, ...args);
|
|
447
|
+
}
|
|
448
|
+
exports.logger = {
|
|
449
|
+
debug: (message, ...args) => log('debug', message, ...args),
|
|
450
|
+
info: (message, ...args) => log('info', message, ...args),
|
|
451
|
+
warn: (message, ...args) => log('warn', message, ...args),
|
|
452
|
+
error: (message, ...args) => log('error', message, ...args)
|
|
453
|
+
};
|
|
454
|
+
// Export template generator
|
|
455
|
+
__exportStar(require("./template-generator"), exports);
|
|
456
|
+
// Export agent guide generator
|
|
457
|
+
__exportStar(require("./agent-guide-generator"), exports);
|
|
458
|
+
// Export credentials cleanup utility
|
|
459
|
+
__exportStar(require("./credentials-cleanup"), exports);
|
|
460
|
+
// Note: Don't export openclaw-helper to avoid circular dependency
|
|
461
|
+
// Modules that need openclaw-helper should import directly
|
|
462
|
+
//# sourceMappingURL=index.js.map
|