@nuvin/agent-core 0.2.0-rc.3 → 0.2.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/VERSION +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/agent/metrics.d.ts +9 -1
- package/dist/chunk-A4CS4HLK.js +1 -0
- package/dist/chunk-D5IVWJHX.js +1 -1
- package/dist/chunk-FFIZ6TKW.js +1 -1
- package/dist/chunk-IUZALP6K.js +1 -1
- package/dist/chunk-LIE76IJA.js +1 -1
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/chunk-YNOIG4FD.js +1 -1
- package/dist/formats/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/lsp/client.d.ts +4 -0
- package/dist/models/index.js +1 -1
- package/dist/shared/abort-aware-semaphore.d.ts +5 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.js +1 -1
- package/dist/shared/types.d.ts +23 -0
- package/dist/tools/background-process-registry.d.ts +60 -8
- package/dist/tools/bash-tool.d.ts +6 -2
- package/dist/tools/index.js +1 -1
- package/dist/tools/process-tree-termination.d.ts +25 -0
- package/dist/tools/runtime-manager-tools.d.ts +11 -1
- package/dist/tools/terminal-output-normalizer.d.ts +6 -0
- package/package.json +3 -3
- package/dist/chunk-QKOKWD5Y.js +0 -1
package/dist/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2c311d,_0x13f71d){const _0x463ac7={_0x72a65f:0x46,_0x136521:0x61,_0x26097d:0x76,_0x34f733:0x48,_0x36867c:0x2ff,_0x14d8f3:0x2ee,_0x90d0e9:0x2b1,_0x13c183:0x2e3,_0x3a7d9d:0x2d5,_0xaa593f:0x2ea,_0x5cbd54:0x2b9,_0x1bc753:0x2fa,_0x49c3c8:0x2db,_0x6b496f:0x301,_0x36cbfa:0x4a,_0x49c378:0x5b,_0x55acdf:0x9f,_0x5714d9:0x85},_0x1b2809=_0x2c311d();function _0x5d0642(_0x2609db,_0x13968b,_0x22dc59,_0x54e33f){return _0x7af4(_0x54e33f-0xf5,_0x22dc59);}function _0x356918(_0x1f6d10,_0x4d448d,_0x1a7445,_0x2c7df9){return _0x7af4(_0x4d448d- -0x18d,_0x2c7df9);}while(!![]){try{const _0x54265d=-parseInt(_0x356918(_0x463ac7._0x72a65f,_0x463ac7._0x136521,_0x463ac7._0x26097d,0x73))/0x1*(-parseInt(_0x356918(0x5d,_0x463ac7._0x34f733,0x54,0x57))/0x2)+parseInt(_0x5d0642(0x2ef,_0x463ac7._0x36867c,0x2f3,_0x463ac7._0x14d8f3))/0x3+parseInt(_0x5d0642(0x31c,0x2e8,0x325,0x306))/0x4*(parseInt(_0x5d0642(_0x463ac7._0x90d0e9,0x2ef,_0x463ac7._0x13c183,_0x463ac7._0x3a7d9d))/0x5)+-parseInt(_0x5d0642(0x304,_0x463ac7._0xaa593f,0x2e9,0x308))/0x6+-parseInt(_0x5d0642(_0x463ac7._0x5cbd54,0x2cc,_0x463ac7._0x1bc753,_0x463ac7._0x49c3c8))/0x7+parseInt(_0x5d0642(0x2e9,0x2e2,0x2f8,_0x463ac7._0x6b496f))/0x8*(parseInt(_0x356918(_0x463ac7._0x36cbfa,_0x463ac7._0x49c378,0x52,0x74))/0x9)+parseInt(_0x356918(_0x463ac7._0x55acdf,_0x463ac7._0x5714d9,0x6b,0x72))/0xa;if(_0x54265d===_0x13f71d)break;else _0x1b2809['push'](_0x1b2809['shift']());}catch(_0x46f490){_0x1b2809['push'](_0x1b2809['shift']());}}}(_0x1b41,0x319cd));import{spawn}from'child_process';var DEFAULT_TIMEOUT_S=0x3c;async function executeCommandHook(_0x4412cc,_0x2d6880,_0x546ef2=DEFAULT_TIMEOUT_S,_0x291997){const _0x47c4df={_0x1c0578:0xf8,_0x570d4a:0x106,_0x245f67:0x109},_0x4e2722={_0x98dd9f:0x308,_0x50120d:0x2f9,_0x3c5c12:0x2ea,_0x24d455:0x311,_0x555b62:0x199,_0x569387:0x1a7,_0x127010:0x187,_0x771215:0x317,_0x1318a6:0x1a3,_0x17b6b1:0x189,_0x4f61e1:0x317,_0x26bd25:0x320,_0x143a74:0x306,_0x5b36a7:0x1b7,_0x15f60f:0x312,_0x318585:0x32a,_0x41d20b:0x31b,_0x50ef80:0x300,_0x47de7d:0x2bc,_0x511f27:0x2ce,_0x4abc75:0x1c7,_0x376843:0x2e9,_0x496684:0x1c9,_0xc9a5c3:0x1ec,_0x3d0659:0x1e7,_0x3cb04c:0x1e6,_0x1c8326:0x1c3,_0x12b24b:0x303,_0x54f625:0x311,_0x3f3757:0x307,_0x93603c:0x2f6,_0x12afcc:0x309,_0x2f2262:0x2f4},_0x5b2b5e={_0x279f0d:0x107,_0x4a3cbc:0x10c,_0x3e36f3:0x101,_0xae9c53:0xef,_0x2bac36:0x120,_0x1d8bd2:0x2a3,_0x20d237:0x288,_0x203858:0x291,_0xee6151:0x284,_0x57ea75:0x29f,_0x24c0a8:0x2a1},_0x5bdba1={_0x661ead:0x5b,_0xb961f0:0x102},_0x4df989={_0x2be673:0x99};function _0x2ed460(_0x1893f9,_0x2bb7c1,_0x2b78ef,_0x1ac669){return _0x7af4(_0x1893f9- -0xf5,_0x1ac669);}const _0x5c2bd2=Date[_0x2ed460(_0x47c4df._0x1c0578,_0x47c4df._0x570d4a,0xe1,_0x47c4df._0x245f67)]();return new Promise(_0x29138a=>{const _0x1443da={_0x5efda8:0x47f,_0x5380cb:0x46d,_0x126719:0x47a,_0x42d980:0x46c,_0x1e5565:0x44f},_0x31192e={_0x2f495d:0x6a,_0x25d106:0x620},_0x49a7d5={_0x16f27f:0x63a},_0x28db7b={_0x35ab48:0x407,_0x2888b6:0x424,_0x241c48:0x428,_0x22712f:0x113,_0x2c9d52:0x42d,_0x839fc0:0x440,_0x907159:0xc0,_0x45c61c:0xcb,_0x1aef2a:0x3f1,_0x1dfddd:0x3e8,_0x35bc62:0x414,_0x408172:0x10c,_0x27387e:0xf4,_0x51367a:0x10f,_0x836375:0x3f1,_0x1b1e7e:0x3ea,_0x369052:0x3e4,_0x34a8bb:0x3f2},_0x534cae={_0x49fc44:0x3f,_0x3f3721:0x28,_0x5691b9:0x2b6},_0x53463b={_0x54b9b2:0x12a},_0x3ecf9e={_0x59a289:0x6e,_0x50f9ea:0x5b,_0x2aae90:0x3f,_0xd71e17:0x142,_0x36ca52:0x155,_0x51f45c:0x160},_0x2cb4a9={_0x1e1a9d:0x80},_0x296c52={_0x3c6583:0xca},_0x578fbb={_0x4ed88a:0x166},_0x5b75a3=spawn('sh',['-c',_0x4412cc],{'stdio':[_0x4e57b5(_0x4e2722._0x98dd9f,0x320,_0x4e2722._0x50120d,0x311),'pipe',_0x4e57b5(0x308,0x322,_0x4e2722._0x3c5c12,_0x4e2722._0x24d455)],'env':{...process[_0x2829ed(-_0x4e2722._0x555b62,-0x1b5,-_0x4e2722._0x569387,-_0x4e2722._0x127010)],'CLAUDE_PROJECT_DIR':_0x291997??process[_0x4e57b5(0x30c,0x319,_0x4e2722._0x771215,0x2fe)]()}});let _0x2ae55b='',_0x3fe950='';function _0x2829ed(_0x3a3922,_0x46f796,_0x2ffb9f,_0x12b437){return _0x2ed460(_0x2ffb9f- -0x2c9,_0x46f796-0x10c,_0x2ffb9f-_0x4df989._0x2be673,_0x12b437);}_0x5b75a3[_0x2829ed(-_0x4e2722._0x1318a6,-_0x4e2722._0x17b6b1,-0x1a9,-_0x4e2722._0x555b62)]['on'](_0x4e57b5(0x312,_0x4e2722._0x4f61e1,_0x4e2722._0x26bd25,_0x4e2722._0x143a74),_0x1a4436=>{const _0x2f0f8c={_0x542cf5:0x156,_0xaf1181:0x7};function _0x2bd123(_0x3b7d5c,_0x2d644f,_0x30027f,_0x2463e5){return _0x2829ed(_0x3b7d5c-_0x2f0f8c._0x542cf5,_0x2d644f-_0x2f0f8c._0xaf1181,_0x3b7d5c-0x56,_0x2d644f);}_0x2ae55b+=_0x1a4436[_0x2bd123(-0x14d,-0x167,-_0x578fbb._0x4ed88a,-0x13e)]();});function _0x4e57b5(_0x5d394a,_0x4f57c2,_0x5a24bf,_0x19c7c4){return _0x2ed460(_0x5d394a-0x1f9,_0x4f57c2-_0x5bdba1._0x661ead,_0x5a24bf-_0x5bdba1._0xb961f0,_0x5a24bf);}_0x5b75a3[_0x2829ed(-0x1ab,-0x196,-_0x4e2722._0x5b36a7,-0x1d5)]['on'](_0x4e57b5(_0x4e2722._0x15f60f,_0x4e2722._0x318585,0x335,_0x4e2722._0x41d20b),_0xd519e0=>{_0x3fe950+=_0xd519e0['toString']();}),_0x5b75a3[_0x4e57b5(0x2dc,_0x4e2722._0x50ef80,_0x4e2722._0x47de7d,_0x4e2722._0x511f27)]['on']('error',_0x13089e=>{function _0x386e21(_0x554065,_0x271e16,_0x46b355,_0x29c135){return _0x2829ed(_0x554065-0xda,_0x271e16-_0x296c52._0x3c6583,_0x271e16-0x6a,_0x46b355);}function _0x1db344(_0x2bf2a0,_0x4d8f3f,_0xdce4fd,_0x78133d){return _0x2829ed(_0x2bf2a0-_0x2cb4a9._0x1e1a9d,_0x4d8f3f-0x1a4,_0x4d8f3f-0x160,_0xdce4fd);}if(_0x13089e[_0x1db344(-_0x3ecf9e._0x59a289,-_0x3ecf9e._0x50f9ea,-_0x3ecf9e._0x2aae90,-0x61)]!==_0x386e21(-_0x3ecf9e._0xd71e17,-_0x3ecf9e._0x36ca52,-_0x3ecf9e._0x51f45c,-0x176))throw _0x13089e;}),_0x5b75a3[_0x2829ed(-0x1eb,-0x1d8,-0x1e6,-_0x4e2722._0x4abc75)][_0x4e57b5(_0x4e2722._0x376843,0x2e7,0x2ea,0x2ed)](JSON[_0x2829ed(-_0x4e2722._0x496684,-_0x4e2722._0xc9a5c3,-0x1cf,-0x1b2)](_0x2d6880)),_0x5b75a3[_0x2829ed(-_0x4e2722._0x3d0659,-0x1ed,-_0x4e2722._0x3cb04c,-_0x4e2722._0x1c8326)][_0x4e57b5(0x2fb,0x2e7,0x30c,_0x4e2722._0x12b24b)]();const _0x53783b=setTimeout(()=>{const _0x3a8db0={_0x911cd7:0x82,_0x1f48cc:0x166};function _0x14c4e5(_0x1d7161,_0x1a082e,_0xb4139b,_0x437c50){return _0x2829ed(_0x1d7161-_0x3a8db0._0x911cd7,_0x1a082e-_0x3a8db0._0x1f48cc,_0x1d7161-0x455,_0x437c50);}_0x5b75a3[_0x183a89(0x106,0x11f,_0x5b2b5e._0x279f0d,0x110)](_0x183a89(_0x5b2b5e._0x4a3cbc,_0x5b2b5e._0x3e36f3,_0x5b2b5e._0xae9c53,_0x5b2b5e._0x2bac36));function _0x183a89(_0x33cc68,_0x4053b5,_0x5c6a65,_0x54eb83){return _0x4e57b5(_0x33cc68- -0x1d4,_0x4053b5-0x1ef,_0x5c6a65,_0x54eb83-_0x53463b._0x54b9b2);}_0x29138a({'status':_0x14c4e5(0x29c,0x292,0x2ae,_0x5b2b5e._0x1d8bd2),'error':_0x14c4e5(_0x5b2b5e._0x20d237,0x280,_0x5b2b5e._0x203858,0x26e)+_0x546ef2+'s','duration_ms':Date[_0x14c4e5(_0x5b2b5e._0xee6151,_0x5b2b5e._0x57ea75,_0x5b2b5e._0x24c0a8,0x261)]()-_0x5c2bd2});},_0x546ef2*0x3e8);_0x5b75a3['on'](_0x4e57b5(_0x4e2722._0x54f625,0x308,_0x4e2722._0x3f3757,_0x4e2722._0x93603c),_0x4f0219=>{const _0xc7010d={_0x5a5583:0x110,_0x23fcda:0x8f};function _0x58ea65(_0x2d0717,_0xf686d7,_0x21ab7d,_0x267c33){return _0x4e57b5(_0x2d0717-_0xc7010d._0x5a5583,_0xf686d7-0x170,_0x21ab7d,_0x267c33-_0xc7010d._0x23fcda);}clearTimeout(_0x53783b);const _0x34fdc9=Date['now']()-_0x5c2bd2;if(_0x4f0219===0x2){_0x29138a({'status':_0x58ea65(_0x28db7b._0x35ab48,0x413,_0x28db7b._0x2888b6,0x416),'output':{'decision':_0x58ea65(_0x28db7b._0x35ab48,0x3f0,_0x28db7b._0x241c48,0x3f6),'reason':_0x3fe950['trim']()||_0x4a6401(0x10f,0xcc,0xf0,_0x28db7b._0x22712f)},'duration_ms':_0x34fdc9});return;}if(_0x4f0219!==0x0){_0x29138a({'status':'error','error':'Hook\x20exited\x20with\x20code\x20'+_0x4f0219+(_0x3fe950['trim']()?':\x20'+_0x3fe950[_0x58ea65(_0x28db7b._0x2c9d52,0x43d,0x42c,_0x28db7b._0x839fc0)]():''),'duration_ms':_0x34fdc9});return;}function _0x4a6401(_0x38eab2,_0x1b9ead,_0x38ea3a,_0xef35b7){return _0x2829ed(_0x38eab2-_0x534cae._0x49fc44,_0x1b9ead-_0x534cae._0x3f3721,_0x38ea3a-_0x534cae._0x5691b9,_0x1b9ead);}const _0x278d1c=_0x2ae55b['trim']();if(_0x278d1c[_0x4a6401(_0x28db7b._0x907159,0xbf,0xd9,_0x28db7b._0x45c61c)]===0x0){_0x29138a({'status':_0x58ea65(_0x28db7b._0x1aef2a,_0x28db7b._0x1dfddd,_0x28db7b._0x35bc62,0x3e5),'duration_ms':_0x34fdc9});return;}try{const _0x161c53=JSON[_0x4a6401(_0x28db7b._0x408172,0x10d,_0x28db7b._0x27387e,_0x28db7b._0x51367a)](_0x278d1c);_0x29138a({'status':_0x58ea65(_0x28db7b._0x836375,_0x28db7b._0x1b1e7e,_0x28db7b._0x369052,_0x28db7b._0x34a8bb),'output':_0x161c53,'duration_ms':_0x34fdc9});}catch{_0x29138a({'status':'pass','duration_ms':_0x34fdc9});}}),_0x5b75a3['on'](_0x4e57b5(_0x4e2722._0x12afcc,_0x4e2722._0x2f2262,0x2fb,0x30a),_0xa0bad=>{function _0x216dbc(_0x9bed1,_0x16d13c,_0x2b59a1,_0x59b010){return _0x2829ed(_0x9bed1-0xa1,_0x16d13c-0x177,_0x9bed1-_0x49a7d5._0x16f27f,_0x59b010);}function _0xa9ee96(_0x212ce9,_0x478df7,_0x22c121,_0xccd2af){return _0x2829ed(_0x212ce9-0x20,_0x478df7-_0x31192e._0x2f495d,_0x212ce9-_0x31192e._0x25d106,_0x478df7);}clearTimeout(_0x53783b),_0x29138a({'status':_0xa9ee96(0x467,0x47c,_0x1443da._0x5efda8,0x444),'error':_0xa0bad[_0xa9ee96(_0x1443da._0x5380cb,0x45a,_0x1443da._0x126719,_0x1443da._0x42d980)],'duration_ms':Date[_0xa9ee96(_0x1443da._0x1e5565,0x449,0x451,0x442)]()-_0x5c2bd2});});});}function createHookExtensions(_0x2dab3a,_0x556d05,_0x19e15e={}){const _0x1e344d={_0x1145b4:0x533,_0x5f1037:0x2aa,_0x1e6555:0x559,_0x574fe3:0x546,_0x4f5527:0x26a,_0x3299c0:0x264,_0x3d24ca:0x284,_0x37850c:0x272,_0x1eeb9a:0x255,_0x27aa9f:0x262,_0x3d7ac1:0x275,_0x8b72f8:0x51f,_0x2e97d2:0x531,_0x1612ae:0x54c,_0x2c52f:0x53e,_0x274c55:0x291,_0x81a7c6:0x56e,_0x45ac92:0x574},_0x17e7b1={_0x41f2c3:0x408,_0x36353f:0x40a,_0x979668:0x427,_0x46a3a0:0x44b,_0x46dbd1:0x41f,_0x4695d7:0x3fc,_0x2af5e9:0x434,_0x744109:0x416},_0x1b2799={_0xae053c:0x1a2},_0x36de65={_0x1f21f6:0xf2},_0x11fb2b={_0x5a8b9a:0x9,_0x11db0c:0xa,_0x44ced0:0x13,_0x43a1f6:0x4,_0x3e7921:0x5c,_0x5e2be4:0x4de,_0x374078:0x4e1,_0x2aff08:0x4cd,_0x21bb31:0x4ab},_0x29811d={_0x50979a:0x1f0},_0x150c6e={_0x2223a5:0xbc,_0x18eef8:0x50,_0x3ebb4c:0x58,_0x1e56e1:0xac,_0xc0f3dc:0x85,_0x26d7f8:0x7e,_0xc42deb:0x68,_0x192ddf:0x75,_0x112d52:0x6c,_0x4ca1cb:0x9e,_0x124165:0x82,_0xdfa4dc:0xac},_0x2fcfd5={_0x196234:0x367};function _0x3b270a(_0x541a63,_0x1a9448,_0x2e4424,_0x44501f){return _0x7af4(_0x44501f-_0x2fcfd5._0x196234,_0x2e4424);}const _0x2ab4a7=[],{sessionId:_0x312e93,projectDir:_0x555ade}=_0x19e15e,_0x3e038a=_0x34be2c=>_0x2dab3a[_0x326726(0x292,0x28e,0x28e,0x289)]?_0x2dab3a[_0x326726(0x290,0x272,0x28e,0x283)](_0x34be2c):_0x2dab3a[_0x3b270a(0x58b,0x58b,0x560,0x57d)](_0x34be2c)[_0x3b270a(0x544,0x545,0x561,0x548)]>0x0;_0x3e038a(_0x3b270a(_0x1e344d._0x1145b4,0x522,0x54c,0x540))&&_0x2ab4a7[_0x326726(_0x1e344d._0x5f1037,0x2b5,0x291,0x26f)]({'id':_0x3b270a(_0x1e344d._0x1e6555,0x554,_0x1e344d._0x574fe3,0x54a),'stage':_0x326726(0x288,0x277,0x274,_0x1e344d._0x4f5527),'kind':_0x326726(_0x1e344d._0x3299c0,0x261,0x262,_0x1e344d._0x3d24ca),'order':0x0,'enabled':!![],'run':async(_0x445ff5,_0x2d3cdd)=>{const _0x57e8bb={_0x5928ea:0x18a,_0x457a8d:0x5d9},_0x3dee3b={_0x38a72d:0x1e6};function _0x4743be(_0x478c66,_0x30316f,_0x199e03,_0x50e770){return _0x326726(_0x478c66-0x75,_0x50e770,_0x30316f- -_0x3dee3b._0x38a72d,_0x50e770-0x15);}function _0x3dc455(_0x21b1b7,_0xb79b5f,_0x47e8fa,_0x1a65a0){return _0x3b270a(_0x21b1b7-0x12d,_0xb79b5f-_0x57e8bb._0x5928ea,_0x21b1b7,_0x1a65a0- -_0x57e8bb._0x457a8d);}const _0x289c7a=_0x2dab3a['getHooks'](_0x3dc455(-_0x150c6e._0x2223a5,-0xa2,-0x8e,-0x99),_0x445ff5['toolName']);for(const _0x53d892 of _0x289c7a){const _0x137404={'tool_name':_0x445ff5[_0x3dc455(-0x46,-_0x150c6e._0x18eef8,-0x6a,-_0x150c6e._0x3ebb4c)],'tool_input':void 0x0,'tool_output':_0x445ff5[_0x4743be(0x80,0x98,_0x150c6e._0x1e56e1,0x9b)],'tool_result_status':_0x445ff5[_0x3dc455(-0x9b,-0x90,-_0x150c6e._0xc0f3dc,-_0x150c6e._0x26d7f8)],'session_id':_0x312e93??_0x2d3cdd[_0x3dc455(-_0x150c6e._0xc42deb,-0x55,-0x87,-_0x150c6e._0x192ddf)][_0x3dc455(-0x75,-_0x150c6e._0x112d52,-_0x150c6e._0x4ca1cb,-_0x150c6e._0x124165)]};await _0x556d05(_0x53d892[_0x4743be(0xad,0x97,_0x150c6e._0xdfa4dc,0x9a)],_0x137404,_0x53d892['timeout'],_0x555ade);}}});_0x3e038a(_0x326726(0x24e,_0x1e344d._0x37850c,0x263,_0x1e344d._0x1eeb9a))&&_0x2ab4a7['push']({'id':'hook:Stop','stage':'beforeFinalOutput','kind':_0x326726(0x258,0x248,_0x1e344d._0x27aa9f,_0x1e344d._0x3d7ac1),'order':0x0,'enabled':!![],'run':async(_0xaf128a,_0x167605)=>{const _0x496d82={_0x366a86:0x2d,_0x13626c:0xff,_0x424523:0x8f},_0x3a86c2=_0x2dab3a['getHooks'](_0x283589(_0x11fb2b._0x5a8b9a,_0x11fb2b._0x11db0c,-_0x11fb2b._0x44ced0,_0x11fb2b._0x43a1f6));function _0x283589(_0x29c0c6,_0x35b62d,_0x145153,_0x22b1fd){return _0x3b270a(_0x29c0c6-_0x29811d._0x50979a,_0x35b62d-0x1aa,_0x35b62d,_0x22b1fd- -0x53e);}function _0x518a1b(_0x32e5e8,_0x1702b4,_0x45c688,_0x17c272){return _0x3b270a(_0x32e5e8-_0x496d82._0x366a86,_0x1702b4-_0x496d82._0x13626c,_0x1702b4,_0x17c272- -_0x496d82._0x424523);}for(const _0x5918bb of _0x3a86c2){const _0x7cfef7={'stop_reason':_0x283589(0x16,0x2f,_0x11fb2b._0x3e7921,0x39),'session_id':_0x312e93??_0x167605['state'][_0x518a1b(_0x11fb2b._0x5e2be4,0x4bc,0x4b0,0x4c8)]};await _0x556d05(_0x5918bb[_0x518a1b(0x4c5,0x4cb,_0x11fb2b._0x374078,_0x11fb2b._0x2aff08)],_0x7cfef7,_0x5918bb[_0x518a1b(_0x11fb2b._0x21bb31,0x4b1,0x4ac,0x4b7)],_0x555ade);}}});function _0x326726(_0x212966,_0x1cfb1e,_0x4da864,_0x27afb9){return _0x7af4(_0x4da864-0x88,_0x1cfb1e);}return _0x3e038a(_0x3b270a(_0x1e344d._0x8b72f8,_0x1e344d._0x2e97d2,_0x1e344d._0x1612ae,_0x1e344d._0x2c52f))&&_0x2ab4a7[_0x326726(0x2b1,0x29d,_0x1e344d._0x274c55,0x2b0)]({'id':_0x3b270a(_0x1e344d._0x81a7c6,_0x1e344d._0x45ac92,0x54f,0x571),'stage':'afterTurnComplete','kind':'observer','order':0x0,'enabled':!![],'run':async(_0x197a1c,_0x11d010)=>{function _0xb81c12(_0x49099a,_0x1f5a68,_0x16eeb3,_0x5216ee){return _0x3b270a(_0x49099a-0x1f1,_0x1f5a68-_0x36de65._0x1f21f6,_0x16eeb3,_0x49099a- -0x11e);}const _0x271769=_0x2dab3a['getHooks'](_0xca1a00(0x401,_0x17e7b1._0x41f2c3,_0x17e7b1._0x36353f,0x3e4));function _0xca1a00(_0x291196,_0x49e24b,_0x23bbe9,_0x16403a){return _0x326726(_0x291196-0x28,_0x16403a,_0x291196-_0x1b2799._0xae053c,_0x16403a-0x6a);}for(const _0x3a075f of _0x271769){const _0x1b043b={'message':_0xb81c12(_0x17e7b1._0x979668,0x44a,0x429,0x43b),'session_id':_0x312e93??_0x197a1c[_0xb81c12(0x439,0x437,_0x17e7b1._0x46a3a0,_0x17e7b1._0x46dbd1)]};await _0x556d05(_0x3a075f[_0xca1a00(0x41f,_0x17e7b1._0x4695d7,0x412,_0x17e7b1._0x2af5e9)],_0x1b043b,_0x3a075f[_0xca1a00(0x409,_0x17e7b1._0x744109,0x3fa,0x426)],_0x555ade);}}}),_0x2ab4a7;}function _0x1b41(){const _0xbb9545=['mJrSt0vyAhe','y2XVC2u','zgf0yq','CMvHC29U','zw5Kx3r1CM4','nJeZndaWCNbsuKT4','mtCWmZCXmfHXqwz3uG','odeWndy4AvD3z2zS','CMvQzwn0','C3rKB3v0','z2v0sg9VA3m','zw52','Ag9VA1nWzwnPzMLJt3v0Chv0','DhjPBq','Dg9VBe5HBwu','Dg9tDhjPBMC','nej1s2vRuG','A2LSBa','tM90AwzPy2f0Aw9U','C3rKAw4','ug9ZDfrVB2XvC2u','B2jZzxj2zxi','u3rVCa','u0Lhs0Lmta','CgfZCW','qwDLBNqGzMLUAxnOzwqGCMvZCg9UzgLUzW','DgLTzw91Da','nw5rCxPgwG','BgvUz3rO','qMXVy2TLzcbIEsbqCMvuB29SvxnLigHVB2SGzM9Yia','Ag9VAZPqB3n0vg9VBfvZzq','xIG/oG','D3jPDgu','mJqZnJi0nwTWzvfoyq','uhjLvg9VBfvZzq','mtC3nJuXDuzlugjR','Ag9VA3m','Bwf0y2HLCG','zgvUEq','ywz0zxjuB29SuMvZDwX0','BM93','ndy0ntzcs3HtCLe','C3rYAw5NAwz5','C2vZC2LVBKLK','sg9VAYb0Aw1LzcbVDxqGywz0zxiG','zgvJAxnPB24','yMXVy2S','C3rHDhvZ','y29TBwfUza','B3v0Chv0','zw5K','sg9VAYbIBg9JA2vKigv4zwn1DgLVBG','nJmXndi4A2PxwKHX','Aw5WDxq','BMfTzq','CgfYC2u','C3rHDgu','BwfW','rvbjueu','ywXSB3C','ugvYBwLZC2LVBIbKzw5PzwqGzM9Yia','CgvYBwLZC2LVBKrLy2LZAw9UuMvHC29U','y29Kzq','CgLWzq','zxjYB3i','AgfZsg9VA3m','C3rKzxjY','y3DK','ChvZAa','Ag9VAZPoB3rPzMLJyxrPB24','BwvZC2fNzq'];_0x1b41=function(){return _0xbb9545;};return _0x1b41();}function createHookOnToolCallMiddleware(_0x4a04ed,_0x538259,_0x511f01,_0x2457ef={}){const _0x41a4a6={_0x59fff7:0x425,_0xbdde80:0x403,_0x42016d:0x438,_0x364ad4:0x417,_0x51dc41:0x422,_0x2ad85f:0x405,_0x21de47:0x416,_0x4c3211:0x23,_0x24dc70:0x12,_0x4769d8:0xc,_0x193a83:0x29,_0x31b996:0x41e,_0x7418d1:0x416,_0x14d796:0x434,_0x47c9e2:0x40b,_0xadf587:0x41c,_0x46f596:0x35,_0x18bf4c:0x1e,_0x3756fd:0x3b,_0x301cad:0x443,_0xb80e7e:0x44f,_0x381827:0x8,_0x336f32:0xb,_0x980fb4:0x2c,_0x4b5066:0x5f,_0x233868:0x35,_0x3e54d9:0x15,_0x17f2d3:0x47,_0x3d7d75:0x48,_0x257fee:0x34,_0x101c28:0x1b,_0x4aab48:0x12,_0x4c75d5:0x32,_0x2eb95d:0x27,_0xa432ca:0xa,_0x60b8ef:0x1d,_0x115d5b:0x4a,_0x5cfab0:0x427,_0x3fb514:0x412,_0x23cafa:0xe,_0x5f484c:0xb,_0xecf926:0x25,_0x4a2098:0x3ef,_0x44256b:0x39,_0x51d50f:0x47,_0x5d786d:0x15},_0x165b36={_0x4c0217:0x1cd},{sessionId:_0x5d4535,projectDir:_0x9a62f1}=_0x2457ef;return async(_0x5c09f3,_0x5a08c2)=>{function _0x3addc0(_0x2a67fa,_0x221626,_0x5b468d,_0x4dfafd){return _0x7af4(_0x4dfafd-0x21c,_0x2a67fa);}function _0x3aa33d(_0xf85e2d,_0x2252e8,_0x22bf3c,_0x5909dd){return _0x7af4(_0x22bf3c- -_0x165b36._0x4c0217,_0x2252e8);}const _0x1d1b9f=_0x4a04ed['getHooks'](_0x3addc0(_0x41a4a6._0x59fff7,0x3f7,0x3ed,_0x41a4a6._0xbdde80),_0x5c09f3[_0x3addc0(0x43a,0x402,_0x41a4a6._0x42016d,_0x41a4a6._0x364ad4)]);for(const _0x459758 of _0x1d1b9f){const _0x27e6eb={'tool_name':_0x5c09f3[_0x3addc0(0x428,_0x41a4a6._0x51dc41,_0x41a4a6._0x364ad4,0x417)],'tool_input':_0x5c09f3[_0x3addc0(0x3ff,_0x41a4a6._0x2ad85f,0x42c,_0x41a4a6._0x21de47)],'session_id':_0x5d4535},_0x26213b=await _0x538259(_0x459758['command'],_0x27e6eb,_0x459758[_0x3aa33d(_0x41a4a6._0x4c3211,-0x3,_0x41a4a6._0x24dc70,0x23)],_0x9a62f1),_0x439bc2=_0x26213b[_0x3aa33d(_0x41a4a6._0x4769d8,_0x41a4a6._0x4769d8,_0x41a4a6._0x193a83,0x43)]?.[_0x3addc0(0x422,_0x41a4a6._0x31b996,_0x41a4a6._0x7418d1,_0x41a4a6._0x14d796)]?.['permissionDecision'];if(_0x439bc2===_0x3addc0(_0x41a4a6._0x47c9e2,0x40c,0x3fe,_0x41a4a6._0xadf587))break;if(_0x439bc2===_0x3aa33d(_0x41a4a6._0x46f596,0x5,_0x41a4a6._0x18bf4c,_0x41a4a6._0x3756fd))return{'action':_0x3addc0(_0x41a4a6._0x301cad,_0x41a4a6._0xb80e7e,0x41c,0x430),'reason':_0x26213b[_0x3aa33d(_0x41a4a6._0x381827,_0x41a4a6._0x336f32,0x29,0x34)]?.[_0x3aa33d(0x4c,_0x41a4a6._0x980fb4,0x4b,_0x41a4a6._0x4b5066)]?.[_0x3aa33d(0x45,0x56,_0x41a4a6._0x233868,_0x41a4a6._0x3e54d9)]||_0x3aa33d(_0x41a4a6._0x17f2d3,_0x41a4a6._0x3d7d75,_0x41a4a6._0x257fee,_0x41a4a6._0x101c28)+_0x5c09f3[_0x3aa33d(_0x41a4a6._0x4aab48,0x1e,0x2e,_0x41a4a6._0x4c75d5)]};if(_0x26213b[_0x3aa33d(0x38,0x3c,_0x41a4a6._0x2eb95d,_0x41a4a6._0xa432ca)]===_0x3aa33d(_0x41a4a6._0x60b8ef,0x43,0x26,_0x41a4a6._0x115d5b)||_0x26213b[_0x3addc0(0x40e,_0x41a4a6._0x5cfab0,0x424,_0x41a4a6._0x3fb514)]?.[_0x3aa33d(_0x41a4a6._0x23cafa,_0x41a4a6._0x5f484c,0x25,_0x41a4a6._0xecf926)]===_0x3addc0(0x3fc,0x41a,_0x41a4a6._0x4a2098,0x40f))return{'action':_0x3aa33d(0x42,_0x41a4a6._0x44256b,_0x41a4a6._0x51d50f,0x33),'reason':_0x26213b['output']?.[_0x3addc0(0x44f,0x432,0x44e,0x42b)]||_0x3aa33d(0x38,_0x41a4a6._0x5f484c,_0x41a4a6._0x5d786d,0x11)+_0x5c09f3['name']};}return _0x511f01(_0x5c09f3,_0x5a08c2);};}function _0x7af4(_0x115813,_0x231c2a){_0x115813=_0x115813-0x1d5;const _0x1b41c9=_0x1b41();let _0x7af47a=_0x1b41c9[_0x115813];if(_0x7af4['WnVRpw']===undefined){var _0x4fb706=function(_0x4e86f5){const _0x4ad5a3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4412cc='',_0x2d6880='';for(let _0x546ef2=0x0,_0x291997,_0x5c2bd2,_0x29138a=0x0;_0x5c2bd2=_0x4e86f5['charAt'](_0x29138a++);~_0x5c2bd2&&(_0x291997=_0x546ef2%0x4?_0x291997*0x40+_0x5c2bd2:_0x5c2bd2,_0x546ef2++%0x4)?_0x4412cc+=String['fromCharCode'](0xff&_0x291997>>(-0x2*_0x546ef2&0x6)):0x0){_0x5c2bd2=_0x4ad5a3['indexOf'](_0x5c2bd2);}for(let _0x5b75a3=0x0,_0x2ae55b=_0x4412cc['length'];_0x5b75a3<_0x2ae55b;_0x5b75a3++){_0x2d6880+='%'+('00'+_0x4412cc['charCodeAt'](_0x5b75a3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2d6880);};_0x7af4['pwTOZl']=_0x4fb706,_0x7af4['uwGAFv']={},_0x7af4['WnVRpw']=!![];}const _0xfaf757=_0x1b41c9[0x0],_0x425e04=_0x115813+_0xfaf757,_0x49f372=_0x7af4['uwGAFv'][_0x425e04];return!_0x49f372?(_0x7af47a=_0x7af4['pwTOZl'](_0x7af47a),_0x7af4['uwGAFv'][_0x425e04]=_0x7af47a):_0x7af47a=_0x49f372,_0x7af47a;}var DEFAULT_TIMEOUT_S2=0x3c;function createHookRegistry(_0x2f606f){const _0x467e65={_0xd920e7:0xe,_0x4fdbe2:0x60,_0x2bfbe3:0x8f,_0x3072a3:0x5c,_0x55f664:0x5e,_0x56ec5a:0x6f,_0x58c005:0x4f,_0x379d9e:0x65,_0x32dc4b:0x29,_0x2e5a3e:0x66,_0x3033d1:0x4b,_0x4f192a:0x22,_0x2889b6:0x11,_0x1ac1e4:0x8,_0x3d6f0b:0x4e,_0x3d2a56:0x63,_0x31c418:0x6c,_0x36fd54:0x5d,_0x1568ed:0x65},_0x392883={_0xbc996a:0x1f8},_0x5d3cd1={_0x5c7fdf:0x380,_0x123f46:0x39c};return{'hasHooks'(_0x1b3874){function _0xecfa50(_0x35bd97,_0xa33d16,_0x17525b,_0x5818c9){return _0x7af4(_0x5818c9-0x1bb,_0xa33d16);}return(_0x2f606f[_0x1b3874]?.[_0xecfa50(0x3ad,0x3a7,_0x5d3cd1._0x5c7fdf,_0x5d3cd1._0x123f46)]??0x0)>0x0;},'getHooks'(_0x5614f9,_0x245245){const _0x541792={_0x2107e1:0x199},_0x4a1e08=_0x2f606f[_0x5614f9];if(!_0x4a1e08)return[];const _0xc8f8f9=[];for(const _0x2017a6 of _0x4a1e08){if(!_0x2017a6['matcher']||_0x2017a6[_0x21a039(-_0x467e65._0xd920e7,0x16,0x7,-0xf)]==='*'){_0xc8f8f9[_0x4ff993(_0x467e65._0x4fdbe2,0x8d,_0x467e65._0x2bfbe3,0x70)](..._0x2017a6[_0x4ff993(_0x467e65._0x3072a3,0x4c,_0x467e65._0x55f664,0x50)][_0x4ff993(0x82,_0x467e65._0x56ec5a,_0x467e65._0x58c005,_0x467e65._0x379d9e)](_0xdd99d6=>({'command':_0xdd99d6[_0x21a039(-0x3,-0x7,0x5,-0x11)],'timeout':_0xdd99d6[_0x4ff993(0x68,0x60,0x52,0x46)]??DEFAULT_TIMEOUT_S2})));continue;}if(_0x245245===void 0x0)continue;const _0xa206ab=new RegExp(_0x4ff993(_0x467e65._0x32dc4b,0x3a,_0x467e65._0x2e5a3e,_0x467e65._0x3033d1)+_0x2017a6[_0x21a039(-0xe,-_0x467e65._0x4f192a,-0x11,0x11)]+')$');_0xa206ab['test'](_0x245245)&&_0xc8f8f9[_0x21a039(_0x467e65._0x2889b6,-_0x467e65._0x1ac1e4,-0x2,0x1b)](..._0x2017a6[_0x4ff993(_0x467e65._0x3d6f0b,_0x467e65._0x3d2a56,_0x467e65._0x31c418,0x50)][_0x4ff993(0x68,0x5f,_0x467e65._0x36fd54,_0x467e65._0x1568ed)](_0x238c3c=>({'command':_0x238c3c['command'],'timeout':_0x238c3c[_0x4ff993(0x29,0x34,0x47,0x46)]??DEFAULT_TIMEOUT_S2})));}function _0x4ff993(_0x37018e,_0x4b289,_0x22c6af,_0x34e004){return _0x7af4(_0x34e004- -_0x541792._0x2107e1,_0x22c6af);}function _0x21a039(_0x6071d8,_0x2f25a2,_0xde6e09,_0x429247){return _0x7af4(_0x6071d8- -_0x392883._0xbc996a,_0x429247);}return _0xc8f8f9;}};}export{createHookExtensions,createHookOnToolCallMiddleware,createHookRegistry,executeCommandHook};
|
|
1
|
+
(function(_0x7ab346,_0x5ca152){const _0x5a7d0d={_0x221015:0x6f,_0x29f02d:0x7d,_0x3c0ed3:0x76,_0x343ad2:0x71,_0x34e2c3:0x64,_0x4e9652:0x69,_0x1dc498:0x1e0,_0x4b102d:0x1f8,_0x24e0b7:0x1ed,_0x10b7d2:0x78,_0x18896b:0x77};function _0x266ca0(_0x1e1f02,_0x54cf3f,_0xd7e37f,_0x18cbd7){return _0x9cdb(_0x54cf3f- -0xe,_0x1e1f02);}const _0x3d45ae=_0x7ab346();function _0x5346ff(_0x3b9a5e,_0x4c0842,_0x58b626,_0x4caf68){return _0x9cdb(_0x4caf68- -0x262,_0x58b626);}while(!![]){try{const _0x3c118e=-parseInt(_0x266ca0(0x1c9,0x1d3,0x1d5,0x1b2))/0x1+parseInt(_0x5346ff(-0x98,-_0x5a7d0d._0x221015,-0x91,-0x83))/0x2+-parseInt(_0x5346ff(-_0x5a7d0d._0x29f02d,-_0x5a7d0d._0x3c0ed3,-0x78,-_0x5a7d0d._0x343ad2))/0x3*(-parseInt(_0x5346ff(-_0x5a7d0d._0x34e2c3,-_0x5a7d0d._0x4e9652,-0x75,-0x5f))/0x4)+parseInt(_0x266ca0(_0x5a7d0d._0x1dc498,0x1c4,0x1b3,0x1da))/0x5+parseInt(_0x266ca0(0x214,_0x5a7d0d._0x4b102d,0x1f7,_0x5a7d0d._0x24e0b7))/0x6+-parseInt(_0x5346ff(-0x73,-0x95,-_0x5a7d0d._0x10b7d2,-_0x5a7d0d._0x18896b))/0x7+parseInt(_0x5346ff(-0x4f,-0x7c,-0x77,-0x61))/0x8;if(_0x3c118e===_0x5ca152)break;else _0x3d45ae['push'](_0x3d45ae['shift']());}catch(_0x54dc84){_0x3d45ae['push'](_0x3d45ae['shift']());}}}(_0x27b7,0x472f7));function _0x27b7(){const _0x252884=['u0Lhs0Lmta','BgvUz3rO','CgfYC2u','C3rKAw4','CgLWzq','Dg9VBe5HBwu','yMvMB3jLrMLUywXpDxrWDxq','C3rYAw5NAwz5','ntq4otuWy3frEu1S','Ag9VAZPqB3n0vg9VBfvZzq','Bwf0y2HLCG','Ag9VAZPoB3rPzMLJyxrPB24','BMfTzq','C3rHDhvZ','B3v0Chv0','C3rKzxjY','zgvJAxnPB24','y2XVC2u','D3jPDgu','xIG/oG','Ag9VA3m','odm5mJmYAfL5txfm','ywz0zxjuB29SuMvZDwX0','mJGZota4AuXVBMzy','z2v0sg9VA3m','zxjYB3i','ywz0zxjuDxjUq29TCgXLDgu','CMvQzwn0','DgvZDa','yMXVy2S','uhjLvg9VBfvZzq','CgfZCW','sg9VAYbIBg9JA2vKigv4zwn1DgLVBG','mZqYmdGYm3nQsLz2uW','ug9ZDfrVB2XvC2u','y29Kzq','sg9VAYbLEgL0zwqGD2L0AcbJB2rLia','qwDLBNqGzMLUAxnOzwqGCMvZCg9UzgLUzW','zgf0yq','mJuYodm0rMLyDxvK','C2vZC2LVBKLK','tM90AwzPy2f0Aw9U','Ag9VA1nWzwnPzMLJt3v0Chv0','BwfW','C3rHDgu','ChvZAa','AgfZsg9VA3m','ywXSB3C','A2LSBa','BM93','zw5Kx3r1CM4','Dg9tDhjPBMC','DgLTzw91Da','DhjPBq','zw52','mtC3ndG0oevjCNHWqG','y29TBwfUza','oeP0v3LTrW','zgvUEq','y3DK','ody2mti0CxHdtu9N','C3rKB3v0','Aw5WDxq','CMvHC29U','B2jZzxj2zxi','BwvZC2fNzq'];_0x27b7=function(){return _0x252884;};return _0x27b7();}function _0x9cdb(_0x362e9f,_0x1a9138){_0x362e9f=_0x362e9f-0x1ce;const _0x27b7e8=_0x27b7();let _0x9cdb5d=_0x27b7e8[_0x362e9f];if(_0x9cdb['ZPvbaO']===undefined){var _0x3232d9=function(_0x4aea69){const _0x3a7b7f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4fb612='',_0x554abb='';for(let _0x3ef255=0x0,_0x37f700,_0x129543,_0x551921=0x0;_0x129543=_0x4aea69['charAt'](_0x551921++);~_0x129543&&(_0x37f700=_0x3ef255%0x4?_0x37f700*0x40+_0x129543:_0x129543,_0x3ef255++%0x4)?_0x4fb612+=String['fromCharCode'](0xff&_0x37f700>>(-0x2*_0x3ef255&0x6)):0x0){_0x129543=_0x3a7b7f['indexOf'](_0x129543);}for(let _0x2f7d88=0x0,_0x1384aa=_0x4fb612['length'];_0x2f7d88<_0x1384aa;_0x2f7d88++){_0x554abb+='%'+('00'+_0x4fb612['charCodeAt'](_0x2f7d88)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x554abb);};_0x9cdb['suOdQF']=_0x3232d9,_0x9cdb['fOGHWM']={},_0x9cdb['ZPvbaO']=!![];}const _0x37ca03=_0x27b7e8[0x0],_0x8df4a9=_0x362e9f+_0x37ca03,_0x5d3d1e=_0x9cdb['fOGHWM'][_0x8df4a9];return!_0x5d3d1e?(_0x9cdb5d=_0x9cdb['suOdQF'](_0x9cdb5d),_0x9cdb['fOGHWM'][_0x8df4a9]=_0x9cdb5d):_0x9cdb5d=_0x5d3d1e,_0x9cdb5d;}import{spawn}from'child_process';var DEFAULT_TIMEOUT_S=0x3c;async function executeCommandHook(_0x4fb612,_0x554abb,_0x3ef255=DEFAULT_TIMEOUT_S,_0x37f700){const _0x4f4369={_0x31afc0:0x37c,_0x1490bb:0x390,_0x5d5876:0x39c,_0x3a97a9:0x3e6,_0x338363:0x3ce,_0x34bfa2:0x91,_0x30d3cb:0x89,_0x1a39d8:0x3f6,_0x460881:0x63,_0x345849:0x5a,_0x3c0598:0x3aa,_0x55ac57:0x3bb,_0xd6a1f3:0x3be,_0x35b8ea:0x3c1,_0x536e31:0x3dd,_0x353c61:0x67,_0xa1ddff:0xa1,_0x3640aa:0x93,_0x4d8499:0x39e,_0x57f694:0x40,_0x5657c6:0xa8,_0x1e2407:0x77,_0x1bf8b4:0x61,_0x5d383b:0x3f,_0x1bab87:0x5f,_0x50dd26:0x3cf,_0x13df10:0x3a3,_0x113f14:0x3a6},_0x29c3cb={_0x32c27e:0x3b9,_0x1f3cf8:0x3c2,_0x12e2c8:0x386,_0x3b5aa5:0x3d0,_0x218b00:0x3ca,_0x5f4305:0x3d9,_0x26b4ae:0x3e6},_0x19b228={_0x50574f:0xdd,_0x1705b8:0x1eb,_0x2bf725:0x1d8,_0x4fc47a:0x1dc,_0x792a2e:0xbb,_0x26a738:0xad,_0x1f756a:0xce,_0x3f1d82:0x1f9,_0x2bfc0b:0x1e0,_0xa3436a:0xcc,_0x28819b:0xc7,_0x501117:0xcf,_0x50866b:0xbd,_0x2eeed7:0xa6,_0x52ce8b:0x1b6,_0x463206:0x1e9,_0x53f24a:0x1da,_0x4cd26d:0x1ce,_0x379cbf:0x19b,_0x2c4b5e:0x1b5,_0x4c023b:0x1bb,_0x46f40b:0x1da},_0x1dc717={_0x549b88:0x1ce},_0x1facac={_0x1bb831:0x11c,_0x4f5592:0xf7},_0x129543=Date['now']();return new Promise(_0x551921=>{const _0x1f9fbc={_0x490787:0x32,_0x6f0f50:0x591},_0x51ecaa={_0x1b6324:0x505,_0x3c06d6:0x4e8,_0x102a59:0x522,_0x1895f9:0x519,_0xa5536b:0x517,_0x51395f:0x532,_0x25c143:0x4ee,_0x1666ad:0x5da,_0x42d59d:0x5c3},_0x1984b2={_0x563431:0x13d},_0x4cf916={_0x4ea844:0x17c},_0x5d447e={_0x28d137:0xa6,_0x152de3:0xa3},_0x154775={_0x228418:0x5a},_0x6f171={_0x3a739f:0x177},_0x2f7d88=spawn('sh',['-c',_0x4fb612],{'stdio':[_0x3fbd56(_0x4f4369._0x31afc0,_0x4f4369._0x1490bb,0x3ac,_0x4f4369._0x5d5876),'pipe','pipe'],'env':{...process[_0x3fbd56(0x3ea,_0x4f4369._0x3a97a9,0x3ce,_0x4f4369._0x338363)],'CLAUDE_PROJECT_DIR':_0x37f700??process[_0x32ced6(0x88,_0x4f4369._0x34bfa2,0x99,_0x4f4369._0x30d3cb)]()}});let _0x1384aa='',_0x4090c5='';_0x2f7d88[_0x3fbd56(_0x4f4369._0x1a39d8,0x3c1,0x3c6,0x3d5)]['on']('data',_0x28d396=>{const _0x4bfbea={_0x1d461f:0x37,_0x31e1fa:0x1e6,_0xcbc0a4:0x17d};function _0x382e33(_0x32d626,_0xed1621,_0x540d8a,_0x5241d2){return _0x32ced6(_0x32d626-_0x4bfbea._0x1d461f,_0x32d626,_0x540d8a-_0x4bfbea._0x31e1fa,_0x540d8a- -_0x4bfbea._0xcbc0a4);}_0x1384aa+=_0x28d396[_0x382e33(-_0x1facac._0x1bb831,-_0x1facac._0x4f5592,-0xfc,-0xf7)]();}),_0x2f7d88[_0x32ced6(_0x4f4369._0x460881,0x5d,_0x4f4369._0x345849,0x5d)]['on'](_0x3fbd56(0x3b9,_0x4f4369._0x3c0598,_0x4f4369._0x55ac57,_0x4f4369._0xd6a1f3),_0x1f19ad=>{function _0x3f8feb(_0xcdedf4,_0x5ad728,_0x3b25e8,_0x5ae645){return _0x3fbd56(_0x3b25e8,_0x5ad728-0x1d0,_0x3b25e8-_0x6f171._0x3a739f,_0x5ad728- -0x425);}_0x4090c5+=_0x1f19ad[_0x3f8feb(-0x5e,-_0x154775._0x228418,-0x5f,-0x47)]();}),_0x2f7d88[_0x3fbd56(_0x4f4369._0x35b8ea,0x3f6,0x3f9,_0x4f4369._0x536e31)]['on'](_0x32ced6(0x5b,0x54,0x75,_0x4f4369._0x353c61),_0x2a7e5b=>{function _0x2a85cd(_0x178d7c,_0x3376ed,_0x4959e6,_0x2eee36){return _0x3fbd56(_0x4959e6,_0x3376ed-0x1da,_0x4959e6-0x7c,_0x2eee36- -0x45e);}if(_0x2a7e5b[_0x2a85cd(-0xc3,-0xb4,-_0x5d447e._0x28d137,-_0x5d447e._0x152de3)]!=='EPIPE')throw _0x2a7e5b;}),_0x2f7d88[_0x32ced6(0x76,_0x4f4369._0xa1ddff,0x91,_0x4f4369._0x3640aa)][_0x3fbd56(0x3b1,_0x4f4369._0x4d8499,0x3cb,_0x4f4369._0x3c0598)](JSON[_0x32ced6(_0x4f4369._0x57f694,0x59,0x55,0x55)](_0x554abb)),_0x2f7d88[_0x32ced6(0xad,_0x4f4369._0x5657c6,_0x4f4369._0x1e2407,0x93)]['end']();function _0x3fbd56(_0x3e0d7a,_0x13aa1f,_0x54a768,_0x198aaf){return _0x9cdb(_0x198aaf-_0x1dc717._0x549b88,_0x3e0d7a);}function _0x32ced6(_0x226766,_0x8b66aa,_0x4f16f7,_0x4d048b){return _0x9cdb(_0x4d048b- -_0x4cf916._0x4ea844,_0x8b66aa);}const _0x4f9e0b=setTimeout(()=>{const _0x3a9566={_0x37e1b3:0x150,_0xc1779d:0x55b};function _0x23639d(_0x50f107,_0x2e8ef5,_0x4f258d,_0x3d0529){return _0x3fbd56(_0x4f258d,_0x2e8ef5-0x111,_0x4f258d-0x1de,_0x2e8ef5-_0x1984b2._0x563431);}_0x2f7d88[_0x23639d(_0x51ecaa._0x1b6324,_0x51ecaa._0x1b6324,_0x51ecaa._0x3c06d6,_0x51ecaa._0x102a59)](_0x23639d(_0x51ecaa._0x1895f9,_0x51ecaa._0xa5536b,_0x51ecaa._0x51395f,0x509));function _0x5a118a(_0x3191b1,_0x4402bd,_0x3a4509,_0x2fd18b){return _0x32ced6(_0x3191b1-_0x3a9566._0x37e1b3,_0x3191b1,_0x3a4509-0xc3,_0x4402bd-_0x3a9566._0xc1779d);}_0x551921({'status':_0x23639d(0x500,_0x51ecaa._0x25c143,0x4f5,0x4fb),'error':'Hook\x20timed\x20out\x20after\x20'+_0x3ef255+'s','duration_ms':Date[_0x5a118a(0x5f8,_0x51ecaa._0x1666ad,0x5e2,_0x51ecaa._0x42d59d)]()-_0x129543});},_0x3ef255*0x3e8);_0x2f7d88['on'](_0x32ced6(_0x4f4369._0x1bf8b4,0x78,_0x4f4369._0x5d383b,_0x4f4369._0x1bab87),_0x182374=>{function _0x23d850(_0x33c0bd,_0x3c5df5,_0x3efd6d,_0x3efd08){return _0x3fbd56(_0x33c0bd,_0x3c5df5-_0x1f9fbc._0x490787,_0x3efd6d-0x28,_0x3efd08- -_0x1f9fbc._0x6f0f50);}clearTimeout(_0x4f9e0b);const _0x30f844=Date[_0x36ec13(-0xbf,-0xa6,-_0x19b228._0x50574f,-0xd0)]()-_0x129543;if(_0x182374===0x2){_0x551921({'status':_0x23d850(-_0x19b228._0x1705b8,-_0x19b228._0x2bf725,-0x1f6,-_0x19b228._0x4fc47a),'output':{'decision':_0x23d850(-0x1d9,-0x1bc,-0x1fa,-_0x19b228._0x4fc47a),'reason':_0x4090c5[_0x36ec13(-_0x19b228._0x792a2e,-_0x19b228._0x26a738,-_0x19b228._0x1f756a,-0x9e)]()||_0x36ec13(-0xd0,-0xb1,-0xda,-0xcc)},'duration_ms':_0x30f844});return;}function _0x36ec13(_0x187f10,_0x25a33b,_0xd1e939,_0x5eb46a){return _0x32ced6(_0x187f10-0x48,_0x25a33b,_0xd1e939-0x12c,_0x187f10- -0x13e);}if(_0x182374!==0x0){_0x551921({'status':_0x23d850(-0x1e6,-0x1d1,-_0x19b228._0x3f1d82,-_0x19b228._0x2bfc0b),'error':_0x36ec13(-_0x19b228._0xa3436a,-0xc9,-0xdf,-_0x19b228._0x28819b)+_0x182374+(_0x4090c5[_0x36ec13(-0xbb,-_0x19b228._0x501117,-0xb7,-_0x19b228._0x50866b)]()?':\x20'+_0x4090c5['trim']():''),'duration_ms':_0x30f844});return;}const _0x4bc16e=_0x1384aa[_0x36ec13(-0xbb,-_0x19b228._0x2eeed7,-0xcf,-0xac)]();if(_0x4bc16e[_0x23d850(-0x1cd,-0x1a9,-0x1d3,-_0x19b228._0x52ce8b)]===0x0){_0x551921({'status':_0x23d850(-0x1b9,-_0x19b228._0x463206,-0x1be,-_0x19b228._0x53f24a),'duration_ms':_0x30f844});return;}try{const _0x22b0c8=JSON[_0x23d850(-_0x19b228._0x4cd26d,-_0x19b228._0x379cbf,-0x1bf,-_0x19b228._0x2c4b5e)](_0x4bc16e);_0x551921({'status':_0x23d850(-0x1c4,-0x1d9,-_0x19b228._0x4c023b,-_0x19b228._0x46f40b),'output':_0x22b0c8,'duration_ms':_0x30f844});}catch{_0x551921({'status':'pass','duration_ms':_0x30f844});}}),_0x2f7d88['on'](_0x3fbd56(_0x4f4369._0x50dd26,_0x4f4369._0x13df10,_0x4f4369._0x113f14,0x3b1),_0x69a2bd=>{const _0x1919c1={_0x2b64b3:0x15b,_0x8fbd84:0x33b},_0x48dfc5={_0x102a04:0x17,_0x288915:0xe5,_0x2ab86f:0x389};function _0x3315f0(_0x48fc8f,_0x166be7,_0x39ec5f,_0x3adb68){return _0x32ced6(_0x48fc8f-_0x48dfc5._0x102a04,_0x3adb68,_0x39ec5f-_0x48dfc5._0x288915,_0x48fc8f-_0x48dfc5._0x2ab86f);}function _0x1c1758(_0x384001,_0x3497f9,_0x30c4bf,_0x327a57){return _0x32ced6(_0x384001-_0x1919c1._0x2b64b3,_0x327a57,_0x30c4bf-0x1d2,_0x3497f9-_0x1919c1._0x8fbd84);}clearTimeout(_0x4f9e0b),_0x551921({'status':_0x1c1758(_0x29c3cb._0x32c27e,0x3a2,_0x29c3cb._0x1f3cf8,_0x29c3cb._0x12e2c8),'error':_0x69a2bd[_0x1c1758(_0x29c3cb._0x3b5aa5,_0x29c3cb._0x218b00,_0x29c3cb._0x5f4305,_0x29c3cb._0x26b4ae)],'duration_ms':Date[_0x3315f0(0x408,0x411,0x3fa,0x414)]()-_0x129543});});});}function createHookExtensions(_0xa0f835,_0x50f5ea,_0x391d84={}){const _0x2ec8ce={_0x3eb231:0x194,_0x933f6c:0x262,_0x2a645f:0x29a,_0xbccc7b:0x1b1,_0x14c4b2:0x1b4,_0x44769a:0x19d,_0x13c4be:0x2b7,_0x1473b8:0x2a1,_0x2f522f:0x194,_0x2d321d:0x190,_0xc078a9:0x179,_0x3b7e40:0x18b,_0x32357c:0x1ac,_0x194795:0x184,_0x2103f0:0x181,_0x1f2837:0x2b9},_0x4ba8cf={_0x581615:0x53a,_0xabb838:0x53c,_0x367cd5:0x539,_0x356e31:0x515,_0x447376:0xd6,_0x386402:0xb7,_0x28b8e4:0x530,_0x6083a0:0x54f,_0x4bb37c:0x524,_0x232adf:0x544},_0x21fa03={_0x22cbf1:0x25e,_0x504872:0x16a},_0x3da403={_0x3d3765:0x19f,_0x121103:0x177,_0x901027:0x1a1,_0x645a1b:0x223},_0x38d557={_0x2b5e4f:0x326,_0x362779:0x1ea},_0x168140={_0x34d2e0:0x88,_0x5a43a7:0x196,_0xdba7ce:0x102},_0x22f804={_0x3609ec:0x576,_0x21405c:0x398,_0xcf3357:0x396,_0x3249ab:0x3b4,_0x5bccb3:0x59c,_0x167a24:0x57d,_0x37f3ee:0x573,_0x5d9f64:0x57a,_0x422f94:0x5a4,_0x2b8e0d:0x585,_0x2212d5:0x3b0,_0x97e85b:0x3a9,_0x5da358:0x3be,_0x2fbafe:0x5a1,_0x20ad9e:0x5a0},_0x4bcf5d={_0x30f0f4:0x22b};function _0x301049(_0x576376,_0x4b294b,_0x2b9190,_0x1e7530){return _0x9cdb(_0x576376-0xad,_0x4b294b);}const _0xe3466f=[],{sessionId:_0x248705,projectDir:_0x55268e}=_0x391d84,_0x1f9bd6=_0x446e40=>_0xa0f835[_0x301049(0x2a5,0x2bd,0x296,0x2b3)]?_0xa0f835[_0x14816f(0x188,0x195,0x195,0x19a)](_0x446e40):_0xa0f835['getHooks'](_0x446e40)['length']>0x0;_0x1f9bd6('PostToolUse')&&_0xe3466f[_0x14816f(0x1b5,_0x2ec8ce._0x3eb231,0x1ac,0x193)]({'id':_0x301049(0x280,0x279,_0x2ec8ce._0x933f6c,0x26c),'stage':_0x301049(0x28d,0x273,_0x2ec8ce._0x2a645f,0x27a),'kind':_0x14816f(_0x2ec8ce._0xbccc7b,0x1a7,_0x2ec8ce._0x14c4b2,_0x2ec8ce._0x44769a),'order':0x0,'enabled':!![],'run':async(_0x2fc8fa,_0x1b0c1d)=>{const _0x384139={_0x291df5:0x1d5,_0x51d10e:0x1cc},_0xb970d9=_0xa0f835[_0x3af6a2(0x585,_0x22f804._0x3609ec,0x582,0x590)](_0x1079a7(_0x22f804._0x21405c,0x3c2,_0x22f804._0xcf3357,_0x22f804._0x3249ab),_0x2fc8fa[_0x3af6a2(_0x22f804._0x5bccb3,0x59e,0x595,_0x22f804._0x167a24)]);function _0x1079a7(_0x312720,_0x3b485d,_0x2e8126,_0x45c175){return _0x14816f(_0x2e8126,_0x45c175-_0x4bcf5d._0x30f0f4,_0x2e8126-0x2d,_0x45c175-0xfa);}function _0x3af6a2(_0x13b122,_0x2ad169,_0x1e94ba,_0x414dc8){return _0x14816f(_0x1e94ba,_0x414dc8-0x411,_0x1e94ba-_0x384139._0x291df5,_0x414dc8-_0x384139._0x51d10e);}for(const _0x4b5e97 of _0xb970d9){const _0x2b8381={'tool_name':_0x2fc8fa[_0x3af6a2(0x594,_0x22f804._0x37f3ee,0x566,0x57d)],'tool_input':void 0x0,'tool_output':_0x2fc8fa[_0x3af6a2(_0x22f804._0x5d9f64,0x583,_0x22f804._0x422f94,0x586)],'tool_result_status':_0x2fc8fa[_0x3af6a2(0x586,0x59b,0x585,_0x22f804._0x2b8e0d)],'session_id':_0x248705??_0x1b0c1d[_0x1079a7(_0x22f804._0x2212d5,0x3db,_0x22f804._0x97e85b,_0x22f804._0x5da358)][_0x3af6a2(_0x22f804._0x2fbafe,0x583,0x5b2,_0x22f804._0x20ad9e)]};await _0x50f5ea(_0x4b5e97['command'],_0x2b8381,_0x4b5e97['timeout'],_0x55268e);}}});_0x1f9bd6('Stop')&&_0xe3466f['push']({'id':'hook:Stop','stage':_0x301049(0x27d,0x292,0x27a,0x272),'kind':_0x301049(_0x2ec8ce._0x13c4be,0x2c1,_0x2ec8ce._0x1473b8,0x2b5),'order':0x0,'enabled':!![],'run':async(_0x54668,_0x172788)=>{function _0x553e78(_0x42d422,_0x126fa1,_0x4b045d,_0x125688){return _0x14816f(_0x4b045d,_0x42d422-_0x168140._0x34d2e0,_0x4b045d-_0x168140._0x5a43a7,_0x125688-_0x168140._0xdba7ce);}function _0x39ed7f(_0x26d5c2,_0x3ebce3,_0x13919d,_0x26d09a){return _0x14816f(_0x13919d,_0x26d09a- -_0x38d557._0x2b5e4f,_0x13919d-0xb6,_0x26d09a-_0x38d557._0x362779);}const _0x5023da=_0xa0f835[_0x553e78(0x207,0x209,0x211,0x20e)]('Stop');for(const _0x365acf of _0x5023da){const _0x138f98={'stop_reason':_0x39ed7f(-0x19e,-_0x3da403._0x3d3765,-0x1ad,-0x18d),'session_id':_0x248705??_0x172788[_0x39ed7f(-_0x3da403._0x121103,-0x1ab,-0x19c,-0x193)][_0x39ed7f(-_0x3da403._0x901027,-0x184,-0x19f,-0x197)]};await _0x50f5ea(_0x365acf['command'],_0x138f98,_0x365acf[_0x553e78(_0x3da403._0x645a1b,0x231,0x217,0x237)],_0x55268e);}}});function _0x14816f(_0xdd28d3,_0x1603e0,_0x22e5b8,_0x3eab6a){return _0x9cdb(_0x1603e0- -0x63,_0xdd28d3);}return _0x1f9bd6(_0x14816f(_0x2ec8ce._0x2f522f,_0x2ec8ce._0x2d321d,_0x2ec8ce._0xc078a9,0x18c))&&_0xe3466f[_0x14816f(0x19d,0x194,_0x2ec8ce._0x3b7e40,_0x2ec8ce._0x32357c)]({'id':_0x14816f(0x192,0x172,0x183,_0x2ec8ce._0x194795),'stage':_0x14816f(0x18e,_0x2ec8ce._0x2103f0,0x180,0x19d),'kind':_0x301049(0x2b7,0x2ba,_0x2ec8ce._0x1f2837,0x2a9),'order':0x0,'enabled':!![],'run':async(_0x106806,_0x2ca316)=>{const _0x5b0ee1={_0x591664:0x3a9};function _0xbb4ed2(_0x16cd0a,_0xdb417b,_0x3dae9b,_0x182c6c){return _0x14816f(_0x182c6c,_0x3dae9b- -_0x21fa03._0x22cbf1,_0x3dae9b-_0x21fa03._0x504872,_0x182c6c-0x2a);}function _0x194f42(_0x16242a,_0x5bc31c,_0x2f47d9,_0xbd77f4){return _0x14816f(_0x5bc31c,_0xbd77f4-_0x5b0ee1._0x591664,_0x2f47d9-0x76,_0xbd77f4-0x112);}const _0xe90853=_0xa0f835[_0x194f42(0x537,0x535,0x52f,0x528)](_0x194f42(_0x4ba8cf._0x581615,_0x4ba8cf._0xabb838,0x540,_0x4ba8cf._0x367cd5));for(const _0x44e8b8 of _0xe90853){const _0x8d0f16={'message':_0x194f42(_0x4ba8cf._0x356e31,0x538,0x547,0x535),'session_id':_0x248705??_0x106806['sessionId']};await _0x50f5ea(_0x44e8b8[_0xbb4ed2(-0xd5,-_0x4ba8cf._0x447376,-0xbf,-_0x4ba8cf._0x386402)],_0x8d0f16,_0x44e8b8[_0x194f42(_0x4ba8cf._0x28b8e4,_0x4ba8cf._0x6083a0,_0x4ba8cf._0x4bb37c,_0x4ba8cf._0x232adf)],_0x55268e);}}}),_0xe3466f;}function createHookOnToolCallMiddleware(_0x548704,_0x56d07b,_0x6c5c5e,_0x439347={}){const _0x2730f6={_0x32f6bb:0x38,_0x6cf407:0x40,_0x5b1974:0x42,_0x42ffef:0x28f,_0x497ba6:0x27e,_0x5d2fe0:0x45,_0x16f5bc:0x36,_0x56ae9a:0x39,_0x52f187:0x2ac,_0x3e1926:0x2af,_0x48d8ec:0x291,_0x542a67:0x28e,_0x50a098:0x2a5,_0x49911f:0x2a3,_0x64eea:0x59,_0x24bd07:0x59,_0x492fff:0x28a,_0x4996eb:0x2c3,_0x53df3f:0x1a,_0x31af00:0x3d,_0x2e2aba:0x38,_0x5311af:0x27f,_0x27c0a5:0x29b,_0x4434a6:0x27b,_0xbfc7c0:0x28c,_0x4f38ee:0x278,_0x1a67ae:0x46,_0x1b1baf:0x53,_0x123b8f:0x260,_0x44478c:0x26e,_0x3dcd02:0x29d,_0x54d0a9:0x289,_0x1035a8:0x281,_0x42f3a7:0x58,_0x32e99c:0x4a,_0x374d1a:0x29e,_0x362f84:0x4b,_0x405d38:0x67,_0x52e571:0x69},{sessionId:_0x544c7e,projectDir:_0xee5d8b}=_0x439347;return async(_0x17fc7d,_0x3104be)=>{const _0x5142e9=_0x548704[_0x2ec422(0x5c,_0x2730f6._0x32f6bb,_0x2730f6._0x6cf407,_0x2730f6._0x5b1974)](_0x1c2f27(0x2ae,0x295,_0x2730f6._0x42ffef,_0x2730f6._0x497ba6),_0x17fc7d[_0x2ec422(0x30,_0x2730f6._0x5d2fe0,0x1b,_0x2730f6._0x16f5bc)]);function _0x1c2f27(_0x4ee563,_0x5bd5d6,_0x14762f,_0x1457a9){return _0x9cdb(_0x14762f-0xa7,_0x4ee563);}for(const _0x2cb5c5 of _0x5142e9){const _0x44272c={'tool_name':_0x17fc7d[_0x2ec422(_0x2730f6._0x56ae9a,0x56,0x4d,0x36)],'tool_input':_0x17fc7d[_0x1c2f27(0x2d0,_0x2730f6._0x52f187,_0x2730f6._0x3e1926,_0x2730f6._0x48d8ec)],'session_id':_0x544c7e},_0x3a9d5e=await _0x56d07b(_0x2cb5c5['command'],_0x44272c,_0x2cb5c5[_0x1c2f27(_0x2730f6._0x542a67,0x292,_0x2730f6._0x50a098,_0x2730f6._0x49911f)],_0xee5d8b),_0x209d7e=_0x3a9d5e[_0x2ec422(0x51,0x3a,0x44,_0x2730f6._0x32f6bb)]?.['hookSpecificOutput']?.['permissionDecision'];if(_0x209d7e===_0x2ec422(0x4d,_0x2730f6._0x64eea,0x65,_0x2730f6._0x24bd07))break;if(_0x209d7e===_0x1c2f27(_0x2730f6._0x492fff,_0x2730f6._0x4996eb,0x2ab,0x296))return{'action':'reject','reason':_0x3a9d5e[_0x2ec422(_0x2730f6._0x53df3f,0x48,_0x2730f6._0x31af00,_0x2730f6._0x2e2aba)]?.[_0x1c2f27(_0x2730f6._0x5311af,0x2a1,_0x2730f6._0x27c0a5,0x297)]?.['permissionDecisionReason']||'Permission\x20denied\x20for\x20'+_0x17fc7d[_0x1c2f27(_0x2730f6._0x4434a6,_0x2730f6._0xbfc7c0,0x27d,_0x2730f6._0x4f38ee)]};if(_0x3a9d5e[_0x2ec422(_0x2730f6._0x1a67ae,_0x2730f6._0x1b1baf,0x53,0x37)]===_0x2ec422(0x55,_0x2730f6._0x24bd07,0x2a,0x47)||_0x3a9d5e[_0x1c2f27(_0x2730f6._0x123b8f,_0x2730f6._0x44478c,0x27f,_0x2730f6._0x3dcd02)]?.[_0x1c2f27(_0x2730f6._0x54d0a9,0x270,_0x2730f6._0x1035a8,0x271)]===_0x2ec422(_0x2730f6._0x42f3a7,_0x2730f6._0x32e99c,0x32,0x47))return{'action':_0x1c2f27(_0x2730f6._0x374d1a,_0x2730f6._0x27c0a5,_0x2730f6._0xbfc7c0,0x28a),'reason':_0x3a9d5e['output']?.[_0x2ec422(_0x2730f6._0x362f84,_0x2730f6._0x405d38,0x76,_0x2730f6._0x52e571)]||'Blocked\x20by\x20PreToolUse\x20hook\x20for\x20'+_0x17fc7d['name']};}function _0x2ec422(_0x13501c,_0x5b2309,_0x29ca59,_0x38ad1c){return _0x9cdb(_0x38ad1c- -0x1a0,_0x5b2309);}return _0x6c5c5e(_0x17fc7d,_0x3104be);};}var DEFAULT_TIMEOUT_S2=0x3c;function createHookRegistry(_0x26268b){const _0x7372d8={_0x9b5f8d:0xca,_0x370b86:0xad,_0x11fb92:0xb1,_0x3779c9:0xc5,_0x4f35a8:0xcf,_0x313ba4:0xbe,_0x4b9f37:0x98,_0x45f873:0x466,_0x9db629:0x460,_0x4db3ff:0x46e,_0xb5a019:0x46b,_0xf181ed:0x456,_0x16deb4:0x452,_0x10ef2b:0x44d,_0x3de9e3:0x46d,_0x3db9b3:0xc6,_0x1532fb:0xa0,_0x4b4ea3:0xbf,_0x4a308a:0x482,_0x80376a:0x470,_0x10e4b3:0x47c},_0x231b63={_0x56f19f:0x127},_0x5b3c47={_0x3bdf26:0x24f};return{'hasHooks'(_0x5cae4f){function _0x571ff4(_0x42ae8e,_0x1cf59a,_0x277263,_0x29ff3e){return _0x9cdb(_0x29ff3e-0x26,_0x277263);}return(_0x26268b[_0x5cae4f]?.[_0x571ff4(0x233,0x220,_0x5b3c47._0x3bdf26,0x233)]??0x0)>0x0;},'getHooks'(_0x25dadd,_0x459017){const _0x4792d3={_0x4ea8ad:0x279};function _0x1f1373(_0x4c3dc5,_0x280a7a,_0x2b6b8c,_0x39a408){return _0x9cdb(_0x2b6b8c-_0x4792d3._0x4ea8ad,_0x280a7a);}const _0x1f21ef=_0x26268b[_0x25dadd];function _0x45420b(_0x36e2e5,_0x3e83ed,_0x491096,_0x215fd5){return _0x9cdb(_0x215fd5- -_0x231b63._0x56f19f,_0x36e2e5);}if(!_0x1f21ef)return[];const _0x100eac=[];for(const _0x47538a of _0x1f21ef){if(!_0x47538a[_0x45420b(0xbb,_0x7372d8._0x9b5f8d,0xb7,_0x7372d8._0x370b86)]||_0x47538a[_0x45420b(_0x7372d8._0x11fb92,0xab,_0x7372d8._0x3779c9,0xad)]==='*'){_0x100eac[_0x45420b(0xd0,0xf0,_0x7372d8._0x4f35a8,0xd0)](..._0x47538a[_0x45420b(_0x7372d8._0x313ba4,0xa7,_0x7372d8._0x4b9f37,0xb7)][_0x1f1373(_0x7372d8._0x45f873,_0x7372d8._0x9db629,_0x7372d8._0x4db3ff,_0x7372d8._0xb5a019)](_0x5f2b88=>({'command':_0x5f2b88['command'],'timeout':_0x5f2b88[_0x45420b(0xb6,0xef,0xd9,0xd7)]??DEFAULT_TIMEOUT_S2})));continue;}if(_0x459017===void 0x0)continue;const _0x55b9ce=new RegExp(_0x1f1373(_0x7372d8._0xb5a019,0x44d,_0x7372d8._0xf181ed,_0x7372d8._0x16deb4)+_0x47538a[_0x1f1373(0x45d,0x42f,_0x7372d8._0x10ef2b,_0x7372d8._0x3de9e3)]+')$');_0x55b9ce[_0x45420b(_0x7372d8._0x3db9b3,0xd1,_0x7372d8._0x1532fb,_0x7372d8._0x4b4ea3)](_0x459017)&&_0x100eac[_0x1f1373(_0x7372d8._0x4a308a,0x46f,_0x7372d8._0x80376a,_0x7372d8._0x10e4b3)](..._0x47538a[_0x1f1373(_0x7372d8._0x16deb4,0x436,0x457,0x43e)][_0x1f1373(0x480,0x462,0x46e,0x485)](_0x4bc4e4=>({'command':_0x4bc4e4[_0x45420b(0xbf,0xcf,0xc7,0xdb)],'timeout':_0x4bc4e4[_0x45420b(0xe8,0xc4,0xba,0xd7)]??DEFAULT_TIMEOUT_S2})));}return _0x100eac;}};}export{createHookExtensions,createHookOnToolCallMiddleware,createHookRegistry,executeCommandHook};
|
package/dist/lsp/client.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { Location } from "vscode-languageserver-types";
|
|
2
2
|
import type { LspClientInfo, LspServerHandle, LspServerInfo } from "./types.ts";
|
|
3
|
+
/** Default deadline for initialize and all LSP JSON-RPC requests. */
|
|
4
|
+
export declare const DEFAULT_LSP_REQUEST_TIMEOUT_MS = 30000;
|
|
3
5
|
type LocationResponse = Location | Location[] | null | undefined;
|
|
4
6
|
export declare function normalizeLocations(value: LocationResponse): Location[];
|
|
7
|
+
export declare function withLspTimeout<T>(promise: Promise<T>, timeoutMs: number, label: string): Promise<T>;
|
|
5
8
|
export declare function createLspClient(input: {
|
|
6
9
|
server: LspServerInfo;
|
|
7
10
|
root: string;
|
|
8
11
|
handle: LspServerHandle;
|
|
12
|
+
requestTimeoutMs?: number;
|
|
9
13
|
}): Promise<LspClientInfo>;
|
|
10
14
|
export {};
|
|
11
15
|
//# sourceMappingURL=client.d.ts.map
|