@nuvin/agent-core 0.2.0-rc.5 → 0.2.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/VERSION +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/chunk-A4CS4HLK.js +1 -1
- 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/models/index.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/types.d.ts +8 -0
- package/dist/tools/file-mutation.d.ts +15 -0
- package/dist/tools/grep-engine.d.ts +22 -0
- package/dist/tools/grep-tool.d.ts +1 -1
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.js +1 -1
- package/dist/tools/ripgrep.d.ts +1 -0
- package/package.json +2 -2
package/dist/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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};
|
|
1
|
+
(function(_0x536b2c,_0x4859dc){const _0x41e248={_0x2c377c:0x1a7,_0x594d39:0x1c4,_0x4e9ed9:0x184,_0x4d04ff:0x530,_0x1eb8cf:0x537,_0x14fcb6:0x53d,_0x322814:0x175,_0x1e297d:0x189,_0x133481:0x543,_0x1b5c1a:0x509,_0x55aaa7:0x513,_0x45c74c:0x1bf,_0x553a4b:0x1b0,_0x32bcaf:0x4fc,_0x27b125:0x4ec,_0x4d11f2:0x525,_0x468044:0x538,_0x18cd7e:0x519,_0x4d2c1f:0x19b,_0x24ca5a:0x186,_0x2ddddd:0x1be,_0x369d6b:0x50d,_0x186053:0x4e9},_0x211f82={_0x320329:0x35c};function _0x363ef2(_0x3a218b,_0x172864,_0x2ddc1b,_0x3ef68b){return _0x4dd7(_0x3a218b- -0x14,_0x2ddc1b);}const _0x4c9a85=_0x536b2c();function _0x1865f5(_0x27a4a8,_0x2520d6,_0x446e78,_0x177f89){return _0x4dd7(_0x27a4a8-_0x211f82._0x320329,_0x177f89);}while(!![]){try{const _0x3ba444=-parseInt(_0x363ef2(_0x41e248._0x2c377c,_0x41e248._0x594d39,0x1b8,_0x41e248._0x4e9ed9))/0x1*(-parseInt(_0x1865f5(_0x41e248._0x4d04ff,_0x41e248._0x1eb8cf,0x53c,_0x41e248._0x14fcb6))/0x2)+parseInt(_0x363ef2(0x18b,_0x41e248._0x322814,0x1ad,_0x41e248._0x1e297d))/0x3*(parseInt(_0x1865f5(_0x41e248._0x1eb8cf,0x54b,_0x41e248._0x133481,0x521))/0x4)+parseInt(_0x1865f5(_0x41e248._0x1b5c1a,0x51a,0x52a,_0x41e248._0x55aaa7))/0x5+parseInt(_0x363ef2(_0x41e248._0x45c74c,0x1bb,0x1db,_0x41e248._0x553a4b))/0x6+parseInt(_0x1865f5(_0x41e248._0x32bcaf,0x4fb,_0x41e248._0x27b125,0x51e))/0x7*(parseInt(_0x1865f5(_0x41e248._0x4d11f2,_0x41e248._0x468044,_0x41e248._0x133481,_0x41e248._0x18cd7e))/0x8)+-parseInt(_0x363ef2(_0x41e248._0x4d2c1f,0x1ac,_0x41e248._0x24ca5a,_0x41e248._0x2ddddd))/0x9+parseInt(_0x1865f5(_0x41e248._0x369d6b,0x52e,0x515,_0x41e248._0x186053))/0xa;if(_0x3ba444===_0x4859dc)break;else _0x4c9a85['push'](_0x4c9a85['shift']());}catch(_0x1356f5){_0x4c9a85['push'](_0x4c9a85['shift']());}}}(_0x48e8,0xaae83));import{spawn}from'child_process';function _0x4dd7(_0xf0d1e0,_0x29fd38){_0xf0d1e0=_0xf0d1e0-0x19c;const _0x48e8a1=_0x48e8();let _0x4dd752=_0x48e8a1[_0xf0d1e0];if(_0x4dd7['mqQotc']===undefined){var _0x5e5ca3=function(_0x446e07){const _0x3f911d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x36e8dc='',_0x2aac01='';for(let _0x312c49=0x0,_0x33b260,_0x4792d5,_0x4fa8a7=0x0;_0x4792d5=_0x446e07['charAt'](_0x4fa8a7++);~_0x4792d5&&(_0x33b260=_0x312c49%0x4?_0x33b260*0x40+_0x4792d5:_0x4792d5,_0x312c49++%0x4)?_0x36e8dc+=String['fromCharCode'](0xff&_0x33b260>>(-0x2*_0x312c49&0x6)):0x0){_0x4792d5=_0x3f911d['indexOf'](_0x4792d5);}for(let _0x14206a=0x0,_0x5c495c=_0x36e8dc['length'];_0x14206a<_0x5c495c;_0x14206a++){_0x2aac01+='%'+('00'+_0x36e8dc['charCodeAt'](_0x14206a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2aac01);};_0x4dd7['aAFEdZ']=_0x5e5ca3,_0x4dd7['QKYNBG']={},_0x4dd7['mqQotc']=!![];}const _0x4cec7d=_0x48e8a1[0x0],_0x9fff71=_0xf0d1e0+_0x4cec7d,_0x4ceb3a=_0x4dd7['QKYNBG'][_0x9fff71];return!_0x4ceb3a?(_0x4dd752=_0x4dd7['aAFEdZ'](_0x4dd752),_0x4dd7['QKYNBG'][_0x9fff71]=_0x4dd752):_0x4dd752=_0x4ceb3a,_0x4dd752;}var DEFAULT_TIMEOUT_S=0x3c;async function executeCommandHook(_0x36e8dc,_0x2aac01,_0x312c49=DEFAULT_TIMEOUT_S,_0x33b260){const _0x3a6b9a={_0xd6738b:0x4d0,_0x3e4642:0x4dc,_0x17a4e1:0x4d2},_0x2ff174={_0x582f89:0x426,_0xa0e480:0x41a,_0x505686:0x43c,_0x88a0e1:0x2d0,_0x5665b9:0x2c3,_0x21d157:0x2f1,_0x45f3a5:0x2d4,_0x1704c2:0x402,_0x4850e9:0x41b,_0x59c358:0x413,_0x128336:0x420,_0x5e0687:0x425,_0x5de8c3:0x2bf,_0x4bee00:0x2c5,_0x36274a:0x2e7,_0xd15c3d:0x299,_0x5ae2d3:0x2af,_0x5b635b:0x28e,_0xa9df97:0x295,_0x43e723:0x416,_0x87328b:0x40b,_0x1fd506:0x3fc,_0x52f90d:0x412,_0x5e986a:0x3e7,_0x46892a:0x3d7,_0x5ebbe9:0x3f3,_0xce4392:0x406,_0x189797:0x3f8,_0x852b8e:0x3ec,_0x1f5c18:0x430,_0x67030:0x2be},_0x2ce83e={_0x2d3046:0x1fc,_0x1745c2:0x308,_0x47e62f:0x30d,_0x3fc98b:0x31f},_0x4c4fc2={_0x5122fe:0x239},_0x2e7f4b={_0x51e095:0x23,_0x481272:0x3e,_0x51a717:0x36,_0x21b741:0x23,_0xa2df09:0x30,_0x306278:0x31},_0x1d3a98={_0x3d343e:0x10c};function _0x1bb3c8(_0x37c6ef,_0x5a1284,_0x696ead,_0x28ab9b){return _0x4dd7(_0x28ab9b-0x331,_0x37c6ef);}const _0x4792d5=Date[_0x1bb3c8(_0x3a6b9a._0xd6738b,0x4ec,_0x3a6b9a._0x3e4642,_0x3a6b9a._0x17a4e1)]();return new Promise(_0x4fa8a7=>{const _0x289191={_0x4b7fa0:0x4b5,_0x52c7bb:0x4a4,_0x521632:0x4ad,_0x1b3d81:0x493,_0x516528:0x4cd},_0x3c2484={_0xaaad9b:0x10d,_0x30f0ac:0x2d1},_0x2addb6={_0xa736e6:0xbe,_0x27a9e6:0xe8},_0x1f9078={_0x1ece15:0x454,_0x4e9305:0x16a,_0x3f6277:0x176,_0x2ae04a:0x194,_0x5e5f6e:0x187,_0x266446:0x439,_0x2df2c0:0x418,_0x201421:0x45a,_0x34510b:0x440,_0x2adf2a:0x43d,_0x46b85e:0x453,_0x241f5a:0x188,_0x4b1420:0x18e,_0x5ba6f8:0x180,_0x4f04b8:0x427},_0x3f7c49={_0x1d9cf1:0xf9,_0x10be65:0x87,_0x489aee:0x27b},_0x4ab090={_0x2ea7c5:0x51,_0x45d44c:0x41d},_0x839111={_0x4f7d85:0xfc},_0x346afa={_0x4dc1f2:0x409,_0x15d9e1:0x3f6},_0x14206a=spawn('sh',['-c',_0x36e8dc],{'stdio':['pipe',_0x5f2a15(0x430,0x409,_0x2ff174._0x582f89,_0x2ff174._0xa0e480),_0x5f2a15(_0x2ff174._0x505686,0x41c,0x423,0x41a)],'env':{...process[_0x320bf3(_0x2ff174._0x88a0e1,_0x2ff174._0x5665b9,_0x2ff174._0x21d157,_0x2ff174._0x45f3a5)],'CLAUDE_PROJECT_DIR':_0x33b260??process[_0x5f2a15(0x421,_0x2ff174._0x1704c2,_0x2ff174._0x4850e9,_0x2ff174._0x59c358)]()}});let _0x5c495c='',_0x5e6c73='';_0x14206a[_0x5f2a15(_0x2ff174._0x128336,_0x2ff174._0x5e0687,0x402,0x40c)]['on'](_0x320bf3(_0x2ff174._0x5de8c3,_0x2ff174._0x4bee00,_0x2ff174._0x36274a,0x2da),_0x3535c3=>{const _0x351840={_0x27b766:0xce};function _0x5b81f7(_0x3a3183,_0x4b9657,_0x2e7804,_0xcccaad){return _0x5f2a15(_0x3a3183-0x89,_0x4b9657,_0x2e7804-_0x351840._0x27b766,_0xcccaad- -0x2c);}_0x5c495c+=_0x3535c3[_0x5b81f7(0x3d4,_0x346afa._0x4dc1f2,0x3d4,_0x346afa._0x15d9e1)]();}),_0x14206a[_0x320bf3(_0x2ff174._0xd15c3d,_0x2ff174._0x5ae2d3,_0x2ff174._0x5b635b,_0x2ff174._0xa9df97)]['on'](_0x5f2a15(_0x2ff174._0x43e723,0x437,_0x2ff174._0x87328b,0x42b),_0x554703=>{function _0x4f8380(_0x1d38e3,_0x96a80e,_0x436358,_0x1a6ca8){return _0x5f2a15(_0x1d38e3-0x103,_0x96a80e,_0x436358-_0x839111._0x4f7d85,_0x436358- -0x54e);}_0x5e6c73+=_0x554703[_0x4f8380(-0x10d,-_0x1d3a98._0x3d343e,-0x12c,-0x140)]();}),_0x14206a['stdin']['on'](_0x5f2a15(0x3f2,_0x2ff174._0x1fd506,0x3f7,0x40f),_0x21e30c=>{const _0x5c0274={_0x1760d1:0xd4};function _0x4dfb1b(_0x50023a,_0x2965b7,_0x789f20,_0x488176){return _0x5f2a15(_0x50023a-_0x5c0274._0x1760d1,_0x789f20,_0x789f20-0x5f,_0x488176- -0x81);}function _0x482388(_0x41310b,_0x1576d1,_0x44f106,_0x8944e){return _0x5f2a15(_0x41310b-_0x4ab090._0x2ea7c5,_0x44f106,_0x44f106-0x3c,_0x8944e- -_0x4ab090._0x45d44c);}if(_0x21e30c[_0x482388(-_0x2e7f4b._0x51e095,-0x56,-_0x2e7f4b._0x481272,-_0x2e7f4b._0x51a717)]!==_0x482388(-_0x2e7f4b._0x21b741,-0x48,-_0x2e7f4b._0xa2df09,-_0x2e7f4b._0x306278))throw _0x21e30c;});function _0x320bf3(_0x5e06b2,_0x3c527a,_0x23f316,_0x5e2dd5){return _0x1bb3c8(_0x5e06b2,_0x3c527a-0x90,_0x23f316-0x8f,_0x5e2dd5- -_0x4c4fc2._0x5122fe);}_0x14206a[_0x5f2a15(_0x2ff174._0x52f90d,_0x2ff174._0x5e986a,_0x2ff174._0x46892a,_0x2ff174._0x5ebbe9)][_0x5f2a15(0x401,0x421,0x428,_0x2ff174._0xce4392)](JSON[_0x5f2a15(0x3f0,_0x2ff174._0x189797,0x414,0x3f9)](_0x2aac01)),_0x14206a[_0x320bf3(0x2b5,0x2af,0x2a0,0x2a2)][_0x5f2a15(0x3ec,_0x2ff174._0x852b8e,0x3fd,0x3eb)]();const _0x1c87db=setTimeout(()=>{function _0x4b44f8(_0x284f82,_0x30b1de,_0x2f7b16,_0x5920f3){return _0x320bf3(_0x284f82,_0x30b1de-0x108,_0x2f7b16-0x137,_0x30b1de- -0x4de);}function _0x174480(_0x37fb83,_0x3172ea,_0x5cd05b,_0x14e4bb){return _0x5f2a15(_0x37fb83-0x162,_0x3172ea,_0x5cd05b-0xe2,_0x5cd05b- -0x10a);}_0x14206a[_0x4b44f8(-0x238,-0x21e,-0x21c,-_0x2ce83e._0x2d3046)]('SIGKILL'),_0x4fa8a7({'status':'error','error':_0x174480(_0x2ce83e._0x1745c2,0x31e,_0x2ce83e._0x47e62f,_0x2ce83e._0x3fc98b)+_0x312c49+'s','duration_ms':Date['now']()-_0x4792d5});},_0x312c49*0x3e8);_0x14206a['on'](_0x5f2a15(0x401,0x3f4,_0x2ff174._0x1f5c18,0x40e),_0x4e1d9f=>{const _0x3f6876={_0x1d538f:0x91,_0x7a1ebb:0x18a};function _0x15b35b(_0x36a2fa,_0x25d84d,_0xb11411,_0x131b75){return _0x320bf3(_0xb11411,_0x25d84d-_0x3f6876._0x1d538f,_0xb11411-0xc9,_0x36a2fa-_0x3f6876._0x7a1ebb);}clearTimeout(_0x1c87db);const _0x372ae3=Date['now']()-_0x4792d5;if(_0x4e1d9f===0x2){_0x4fa8a7({'status':_0x15b35b(0x434,_0x1f9078._0x1ece15,0x44a,0x44c),'output':{'decision':'block','reason':_0x5e6c73[_0x22726d(_0x1f9078._0x4e9305,0x17f,0x185,_0x1f9078._0x3f6277)]()||'Hook\x20blocked\x20execution'},'duration_ms':_0x372ae3});return;}if(_0x4e1d9f!==0x0){_0x4fa8a7({'status':_0x22726d(0x1a3,0x1a5,_0x1f9078._0x2ae04a,0x17b),'error':_0x22726d(_0x1f9078._0x5e5f6e,0x173,0x18a,0x173)+_0x4e1d9f+(_0x5e6c73[_0x15b35b(_0x1f9078._0x266446,_0x1f9078._0x2df2c0,_0x1f9078._0x201421,0x42d)]()?':\x20'+_0x5e6c73[_0x15b35b(0x439,_0x1f9078._0x34510b,0x446,_0x1f9078._0x2adf2a)]():''),'duration_ms':_0x372ae3});return;}const _0x16b93=_0x5c495c[_0x15b35b(0x439,0x45a,0x453,_0x1f9078._0x46b85e)]();function _0x22726d(_0x2d2b12,_0x5aa156,_0x36230e,_0x3aaa3a){return _0x5f2a15(_0x2d2b12-_0x3f7c49._0x1d9cf1,_0x5aa156,_0x36230e-_0x3f7c49._0x10be65,_0x36230e- -_0x3f7c49._0x489aee);}if(_0x16b93['length']===0x0){_0x4fa8a7({'status':_0x22726d(_0x1f9078._0x241f5a,_0x1f9078._0x4b1420,0x177,_0x1f9078._0x5ba6f8),'duration_ms':_0x372ae3});return;}try{const _0x426feb=JSON[_0x15b35b(_0x1f9078._0x4f04b8,_0x1f9078._0x2adf2a,0x420,0x445)](_0x16b93);_0x4fa8a7({'status':'pass','output':_0x426feb,'duration_ms':_0x372ae3});}catch{_0x4fa8a7({'status':'pass','duration_ms':_0x372ae3});}});function _0x5f2a15(_0x1e9f6c,_0x166bd3,_0x417d2b,_0x15725e){return _0x1bb3c8(_0x166bd3,_0x166bd3-_0x2addb6._0xa736e6,_0x417d2b-0x1d6,_0x15725e- -_0x2addb6._0x27a9e6);}_0x14206a['on'](_0x320bf3(0x2b6,0x2e1,0x2ac,_0x2ff174._0x67030),_0x1bd600=>{const _0x164635={_0x536616:0x7c,_0x2c36b8:0xc3};function _0x5efed0(_0x3c877d,_0x2441f8,_0x5119f8,_0x5592d8){return _0x5f2a15(_0x3c877d-_0x3c2484._0xaaad9b,_0x3c877d,_0x5119f8-0x6b,_0x2441f8- -_0x3c2484._0x30f0ac);}function _0xb282e9(_0x40a961,_0xf6e271,_0x2d907d,_0x10902e){return _0x5f2a15(_0x40a961-_0x164635._0x536616,_0x10902e,_0x2d907d-0x3a,_0xf6e271-_0x164635._0x2c36b8);}clearTimeout(_0x1c87db),_0x4fa8a7({'status':'error','error':_0x1bd600[_0xb282e9(0x4d2,0x4bf,_0x289191._0x4b7fa0,_0x289191._0x52c7bb)],'duration_ms':Date[_0xb282e9(0x490,_0x289191._0x521632,_0x289191._0x1b3d81,_0x289191._0x516528)]()-_0x4792d5});});});}function createHookExtensions(_0x5cb608,_0x4cfa53,_0x2ed58b={}){const _0x121d65={_0x52618d:0x57e,_0x2c999b:0x58a,_0x5f16e3:0x586,_0x203b7a:0x43a,_0x2fd731:0x54b,_0x20fbf9:0x433,_0x781d8a:0x411,_0x4f25c4:0x41e,_0x9f047c:0x41d,_0x1e2700:0x445,_0x2f32d6:0x431,_0x31d27e:0x567,_0xd89962:0x568,_0xda0e5:0x421,_0x155482:0x556,_0x23e482:0x417,_0x46cf71:0x579,_0x2defe4:0x56e,_0x197e70:0x561,_0x484a57:0x565},_0x19879b={_0x4cd7c6:0x439,_0x388d7a:0x1fe,_0x24c817:0x225,_0x2857cb:0x218,_0x44ea7b:0x209,_0x266958:0x237,_0x1bfd56:0x217,_0x35074b:0x432,_0x491419:0x418},_0xc445={_0x15ac97:0x4},_0x2c4941={_0xd6b487:0x35d,_0x136a4f:0x1f2},_0x34775d={_0x5c7898:0x473,_0x2eb198:0x4ba,_0x2114ec:0x49f,_0x116e42:0x1d1,_0x525a47:0x1d2,_0x19a0c6:0x1b4,_0x2dda7d:0x484,_0x2816cd:0x498,_0x22b5e4:0x48b,_0x49b06a:0x46e},_0x21b480={_0x37ca36:0xca,_0x4b085f:0x33},_0xaa2707={_0x8b2ba6:0x1b7},_0x527c86={_0x233d9d:0x329,_0x922c77:0x337,_0x1db6b7:0x375,_0x310160:0x355,_0x16aab6:0x356,_0x5bdba9:0x2e7,_0xa3ac58:0x331,_0xcb7f3a:0x34e,_0xecbda2:0x2dd,_0x4bdee0:0x2f6,_0x237cbe:0x2e2,_0x500065:0x2ee,_0x3e9978:0x301,_0x5d9dc7:0x2ee,_0x3886b9:0x2e3,_0x49609f:0x2fc},_0x5f253d={_0x4cec68:0x277,_0x8d1ce6:0x13e},_0x5d3c68={_0x5ea20c:0x215,_0x22d044:0x5},_0x97ef85={_0x5eb876:0x252},_0x535e52=[],{sessionId:_0x496fd3,projectDir:_0x137aca}=_0x2ed58b;function _0x262647(_0x19bb1e,_0xfd64fb,_0x16f7d9,_0x3564d2){return _0x4dd7(_0x3564d2-_0x97ef85._0x5eb876,_0xfd64fb);}function _0xb6e18d(_0x1de9fb,_0x1e2f5b,_0x419b45,_0x32bbd4){return _0x4dd7(_0x1de9fb-0x3a0,_0x32bbd4);}const _0x137913=_0x3cf4c7=>_0x5cb608[_0xb6e18d(0x577,0x55e,0x58e,0x597)]?_0x5cb608[_0x262647(0x428,0x444,0x442,0x429)](_0x3cf4c7):_0x5cb608[_0x262647(0x3f9,0x3ed,0x414,0x3f9)](_0x3cf4c7)[_0x262647(0x443,0x414,0x41f,0x422)]>0x0;return _0x137913('PostToolUse')&&_0x535e52[_0xb6e18d(_0x121d65._0x52618d,0x56e,_0x121d65._0x2c999b,_0x121d65._0x5f16e3)]({'id':_0x262647(0x41c,_0x121d65._0x203b7a,0x429,0x424),'stage':_0xb6e18d(_0x121d65._0x2fd731,0x52a,0x52a,0x56c),'kind':_0x262647(_0x121d65._0x20fbf9,0x41f,_0x121d65._0x781d8a,_0x121d65._0x4f25c4),'order':0x0,'enabled':!![],'run':async(_0x4b3d16,_0x39780e)=>{function _0x5c97e9(_0xc5ba28,_0x2418e0,_0x36deca,_0x52f53f){return _0xb6e18d(_0x52f53f- -_0x5d3c68._0x5ea20c,_0x2418e0-_0x5d3c68._0x22d044,_0x36deca-0x196,_0x2418e0);}const _0x3c7ea6=_0x5cb608[_0x5c97e9(_0x527c86._0x233d9d,0x33e,0x321,0x332)]('PostToolUse',_0x4b3d16['toolName']);function _0x5dd604(_0x5f07a8,_0x3c91d8,_0x4da449,_0x18a77f){return _0xb6e18d(_0x4da449- -_0x5f253d._0x4cec68,_0x3c91d8-0x38,_0x4da449-_0x5f253d._0x8d1ce6,_0x18a77f);}for(const _0x5ee342 of _0x3c7ea6){const _0xfb966f={'tool_name':_0x4b3d16['toolName'],'tool_input':void 0x0,'tool_output':_0x4b3d16['output'],'tool_result_status':_0x4b3d16[_0x5c97e9(_0x527c86._0x922c77,_0x527c86._0x1db6b7,_0x527c86._0x310160,_0x527c86._0x16aab6)],'session_id':_0x496fd3??_0x39780e[_0x5dd604(0x2c8,0x2d4,_0x527c86._0x5bdba9,0x2d5)][_0x5c97e9(_0x527c86._0xa3ac58,0x325,_0x527c86._0xcb7f3a,0x337)]};await _0x4cfa53(_0x5ee342[_0x5dd604(_0x527c86._0xecbda2,_0x527c86._0x4bdee0,_0x527c86._0x237cbe,_0x527c86._0x500065)],_0xfb966f,_0x5ee342[_0x5dd604(_0x527c86._0x3e9978,_0x527c86._0x5d9dc7,_0x527c86._0x3886b9,_0x527c86._0x49609f)],_0x137aca);}}}),_0x137913(_0x262647(0x41e,_0x121d65._0x9f047c,_0x121d65._0x1e2700,_0x121d65._0x2f32d6))&&_0x535e52['push']({'id':_0xb6e18d(_0x121d65._0x31d27e,0x569,_0x121d65._0xd89962,0x57b),'stage':_0x262647(_0x121d65._0x20fbf9,0x42d,0x411,_0x121d65._0xda0e5),'kind':_0x262647(0x400,0x41a,0x410,_0x121d65._0x4f25c4),'order':0x0,'enabled':!![],'run':async(_0x414d8c,_0x53c37f)=>{function _0x1569ad(_0x1e442,_0x210ddd,_0x56b6a6,_0x250895){return _0x262647(_0x1e442-0x18d,_0x250895,_0x56b6a6-_0xaa2707._0x8b2ba6,_0x1e442- -0x5e1);}const _0x148b30=_0x5cb608[_0x49e58a(0x47d,0x490,0x49d,_0x34775d._0x5c7898)]('Stop');function _0x49e58a(_0x362c79,_0xc3508d,_0x410ddc,_0x48b2f5){return _0xb6e18d(_0x362c79- -_0x21b480._0x37ca36,_0xc3508d-0xf6,_0x410ddc-_0x21b480._0x4b085f,_0xc3508d);}for(const _0xb981fd of _0x148b30){const _0xc8f481={'stop_reason':_0x49e58a(0x4b0,_0x34775d._0x2eb198,_0x34775d._0x2114ec,0x4a3),'session_id':_0x496fd3??_0x53c37f[_0x1569ad(-_0x34775d._0x116e42,-_0x34775d._0x525a47,-_0x34775d._0x19a0c6,-0x1f0)]['sessionId']};await _0x4cfa53(_0xb981fd[_0x49e58a(0x48f,0x48a,_0x34775d._0x2dda7d,_0x34775d._0x2816cd)],_0xc8f481,_0xb981fd[_0x49e58a(0x490,_0x34775d._0x22b5e4,0x4a9,_0x34775d._0x49b06a)],_0x137aca);}}}),_0x137913(_0xb6e18d(0x575,0x55e,0x583,_0x121d65._0x155482))&&_0x535e52[_0x262647(0x420,0x42c,_0x121d65._0x23e482,0x430)]({'id':_0xb6e18d(0x556,_0x121d65._0x46cf71,0x563,_0x121d65._0x2defe4),'stage':_0xb6e18d(0x555,_0x121d65._0x197e70,_0x121d65._0x484a57,0x570),'kind':'observer','order':0x0,'enabled':!![],'run':async(_0x157a3e,_0x38f4d4)=>{function _0x35fb1a(_0x158257,_0x5838ab,_0x50742c,_0x4ff6f6){return _0xb6e18d(_0x4ff6f6- -_0x2c4941._0xd6b487,_0x5838ab-0x14c,_0x50742c-_0x2c4941._0x136a4f,_0x50742c);}const _0x19bd35=_0x5cb608[_0x321420(_0x19879b._0x4cd7c6,0x41f,0x429,0x41f)](_0x35fb1a(_0x19879b._0x388d7a,_0x19879b._0x24c817,0x218,_0x19879b._0x2857cb));function _0x321420(_0x416bdf,_0x50bd9f,_0x4fd645,_0x1b6f00){return _0x262647(_0x416bdf-_0xc445._0x15ac97,_0x50bd9f,_0x4fd645-0xe0,_0x1b6f00-0x26);}for(const _0x324db5 of _0x19bd35){const _0x38dd60={'message':_0x35fb1a(0x22b,_0x19879b._0x44ea7b,_0x19879b._0x266958,0x21b),'session_id':_0x496fd3??_0x157a3e['sessionId']};await _0x4cfa53(_0x324db5[_0x35fb1a(0x1e0,_0x19879b._0x1bfd56,0x1fc,0x1fc)],_0x38dd60,_0x324db5[_0x321420(_0x19879b._0x35074b,_0x19879b._0x491419,0x44a,_0x19879b._0x35074b)],_0x137aca);}}}),_0x535e52;}function _0x48e8(){const _0x44e5f9=['DhjPBq','BMfTzq','y29TBwfUza','DgLTzw91Da','mwXIDvLrDG','sg9VAYbLEgL0zwqGD2L0AcbJB2rLia','D3jPDgu','C3rHDgu','DgvZDa','CgvYBwLZC2LVBKrLy2LZAw9UuMvHC29U','Ag9VA1nWzwnPzMLJt3v0Chv0','Ag9VA3m','C3rKB3v0','CMvQzwn0','y2XVC2u','zxjYB3i','Ag9VAZPtDg9W','A2LSBa','oevivhH3tW','y3DK','C3rHDhvZ','B2jZzxj2zxi','B3v0Chv0','sg9VAYb0Aw1LzcbVDxqGywz0zxiG','yMvMB3jLrMLUywXpDxrWDxq','BgvUz3rO','CgLWzq','Ag9VAZPqB3n0vg9VBfvZzq','nti3mtKZnMXitgfquW','nZCWmZbMB3DUvu4','tM90AwzPy2f0Aw9U','Bwf0y2HLCG','AgfZsg9VA3m','qwDLBNqGzMLUAxnOzwqGCMvZCg9UzgLUzW','Dg9tDhjPBMC','zw5Kx3r1CM4','mZe5nJGZnLHOy3rMrG','zw52','qMXVy2TLzcbIEsbqCMvuB29SvxnLigHVB2SGzM9Yia','ChvZAa','u3rVCa','Aw5WDxq','zgvUEq','zgf0yq','CMvHC29U','C3rKzxjY','y29Kzq','m3DUAvPzwq','ndq5nZaXC1jPBM1I','BM93','zw5K','rvbjueu','uhjLvg9VBfvZzq','CgfYC2u','xIG/oG','z2v0sg9VA3m','ugvYBwLZC2LVBIbKzw5PzwqGzM9Yia','CgfZCW','C3rKAw4','ywz0zxjuB29SuMvZDwX0','C2vZC2LVBKLK','nty3mteWt21rzxjy','CgvYBwLZC2LVBKrLy2LZAw9U','mte5ndK5otnlEK9qsxu','C3rYAw5NAwz5','mtmZnZy3mfDHuLLHAW','yMXVy2S','BwvZC2fNzq','BwfW','ywz0zxjuDxjUq29TCgXLDgu','Ag9VAZPoB3rPzMLJyxrPB24'];_0x48e8=function(){return _0x44e5f9;};return _0x48e8();}function createHookOnToolCallMiddleware(_0x2e22ca,_0x3efcc7,_0x390f8c,_0x553ee={}){const _0x4b315d={_0x4737fa:0x123,_0x8cbf25:0x12b,_0x30b20b:0x12d,_0x305317:0x126,_0x2dcb4b:0x39b,_0x30e1d6:0x3a1,_0x292dc3:0x396,_0x7086e4:0xef,_0x19fe7c:0xcc,_0xad98a2:0xfe,_0x5a3aae:0x3b0,_0x1dd4ce:0x3b9,_0x146d0e:0x3a6,_0x38d439:0x391,_0x517e83:0x3a6,_0x1ab44b:0xee,_0x386452:0xdb,_0x343186:0xf9,_0x244287:0x3b3,_0x38094c:0x10e,_0x32fbb6:0x385,_0x37468a:0x392,_0x1cfa6a:0x127,_0x343140:0x10e,_0xf72f8a:0x110,_0x3c14fb:0x104,_0x247927:0xff,_0x3330ae:0x11e,_0x3221e7:0x3ba,_0x9c8553:0x395,_0xf530b3:0x37e,_0x570777:0x396,_0x1dbe90:0x115,_0xcb7dfd:0xf0,_0x51939b:0x133,_0x21d2d7:0x110,_0x54e04b:0x11c,_0x5a64a6:0xf2,_0x5a9c1c:0xd5,_0x50e6ca:0x113,_0x3e4f9a:0x10e,_0x1177cf:0x39b,_0xa3aa26:0x38a},_0x214c4e={_0xfee7f2:0x2cf},{sessionId:_0x395f2f,projectDir:_0x1a24a9}=_0x553ee;return async(_0x28ef5e,_0x40e8c3)=>{const _0x2bc6ea={_0x12628e:0x1e3};function _0x4dfbe6(_0x26f783,_0x50eead,_0x3f8297,_0x5779c2){return _0x4dd7(_0x26f783-_0x2bc6ea._0x12628e,_0x50eead);}const _0x487a4f=_0x2e22ca[_0x322bcd(-0x128,-_0x4b315d._0x4737fa,-0x12f,-0x118)](_0x322bcd(-_0x4b315d._0x8cbf25,-_0x4b315d._0x30b20b,-0x11e,-_0x4b315d._0x305317),_0x28ef5e['name']);function _0x322bcd(_0x18fad5,_0x45ab82,_0x2e7268,_0x250285){return _0x4dd7(_0x18fad5- -_0x214c4e._0xfee7f2,_0x250285);}for(const _0x2a0c78 of _0x487a4f){const _0x332d89={'tool_name':_0x28ef5e[_0x4dfbe6(_0x4b315d._0x2dcb4b,_0x4b315d._0x30e1d6,_0x4b315d._0x292dc3,0x3be)],'tool_input':_0x28ef5e[_0x322bcd(-_0x4b315d._0x7086e4,-_0x4b315d._0x19fe7c,-_0x4b315d._0xad98a2,-0xe1)],'session_id':_0x395f2f},_0x408c1f=await _0x3efcc7(_0x2a0c78['command'],_0x332d89,_0x2a0c78['timeout'],_0x1a24a9),_0x39c3a8=_0x408c1f[_0x4dfbe6(_0x4b315d._0x5a3aae,0x3be,_0x4b315d._0x1dd4ce,_0x4b315d._0x146d0e)]?.['hookSpecificOutput']?.[_0x4dfbe6(_0x4b315d._0x38d439,_0x4b315d._0x517e83,0x39b,0x37c)];if(_0x39c3a8==='allow')break;if(_0x39c3a8===_0x322bcd(-_0x4b315d._0x1ab44b,-_0x4b315d._0x386452,-_0x4b315d._0x343186,-0xe4))return{'action':'reject','reason':_0x408c1f[_0x4dfbe6(0x3b0,_0x4b315d._0x244287,0x3a1,0x3b7)]?.[_0x322bcd(-_0x4b315d._0x38094c,-0x122,-0x114,-0xfb)]?.[_0x4dfbe6(0x3a3,0x3b3,_0x4b315d._0x32fbb6,_0x4b315d._0x37468a)]||_0x322bcd(-_0x4b315d._0x1cfa6a,-0x11b,-_0x4b315d._0x343140,-0x143)+_0x28ef5e[_0x322bcd(-0x117,-0xfb,-_0x4b315d._0xf72f8a,-0x118)]};if(_0x408c1f[_0x322bcd(-_0x4b315d._0x3c14fb,-_0x4b315d._0x247927,-0xe2,-_0x4b315d._0x3330ae)]==='block'||_0x408c1f[_0x4dfbe6(_0x4b315d._0x5a3aae,_0x4b315d._0x3221e7,0x3a0,0x3ad)]?.['decision']===_0x4dfbe6(_0x4b315d._0x9c8553,0x390,_0x4b315d._0xf530b3,_0x4b315d._0x570777))return{'action':_0x322bcd(-0x10b,-0x113,-_0x4b315d._0x1dbe90,-_0x4b315d._0xcb7dfd),'reason':_0x408c1f['output']?.[_0x322bcd(-_0x4b315d._0x51939b,-0x127,-_0x4b315d._0x21d2d7,-_0x4b315d._0x54e04b)]||_0x322bcd(-_0x4b315d._0x5a64a6,-_0x4b315d._0x5a9c1c,-_0x4b315d._0x50e6ca,-_0x4b315d._0x3e4f9a)+_0x28ef5e[_0x4dfbe6(_0x4b315d._0x1177cf,0x39e,0x3bc,_0x4b315d._0xa3aa26)]};}return _0x390f8c(_0x28ef5e,_0x40e8c3);};}var DEFAULT_TIMEOUT_S2=0x3c;function createHookRegistry(_0x18b2d7){const _0x2a86af={_0x58783f:0x1d5,_0x5be003:0x3b4,_0x1749e3:0x3b8,_0x4e1816:0x39c,_0x498e78:0x1dc,_0x48eb65:0x1f8,_0x4d35a1:0x1d7,_0x4c734d:0x1e7,_0x16abd4:0x216,_0x1a4334:0x206,_0x530aba:0x200,_0x51e5a5:0x204,_0x10aa30:0x214,_0x3daab6:0x238,_0xec52d2:0x207,_0x4b89ba:0x1e4,_0xf0e901:0x1eb,_0x3de6d1:0x1fa,_0x1092d2:0x1d8,_0x3f219c:0x202,_0x502675:0x1fb,_0x56ec7e:0x1fd,_0x2af864:0x37a},_0x25e691={_0x24e025:0x1c6},_0x501495={_0x3e8d60:0x145,_0x512fd:0x14e};return{'hasHooks'(_0x418b26){function _0x408e5e(_0x2ceeda,_0xb58896,_0x554328,_0x45d2f3){return _0x4dd7(_0x45d2f3- -0x31f,_0x554328);}return(_0x18b2d7[_0x418b26]?.[_0x408e5e(-0x143,-_0x501495._0x3e8d60,-_0x501495._0x512fd,-0x14f)]??0x0)>0x0;},'getHooks'(_0x5b7f48,_0x36e2b4){function _0x5f27d9(_0x52ab2b,_0x508f64,_0x72077e,_0x230d1b){return _0x4dd7(_0x52ab2b- -0x3ba,_0x72077e);}const _0xf3f48=_0x18b2d7[_0x5b7f48];function _0x20fa2a(_0x204e38,_0x1db4a6,_0x21386f,_0x5e6805){return _0x4dd7(_0x21386f-_0x25e691._0x24e025,_0x5e6805);}if(!_0xf3f48)return[];const _0x21187d=[];for(const _0x5a9351 of _0xf3f48){if(!_0x5a9351[_0x5f27d9(-0x1e4,-_0x2a86af._0x58783f,-0x1ee,-0x1f3)]||_0x5a9351[_0x20fa2a(_0x2a86af._0x5be003,_0x2a86af._0x1749e3,_0x2a86af._0x4e1816,0x3a7)]==='*'){_0x21187d[_0x5f27d9(-_0x2a86af._0x498e78,-0x1d8,-0x1f6,-0x1bb)](..._0x5a9351[_0x5f27d9(-_0x2a86af._0x48eb65,-_0x2a86af._0x4d35a1,-_0x2a86af._0x4c734d,-_0x2a86af._0x16abd4)][_0x5f27d9(-_0x2a86af._0x1a4334,-_0x2a86af._0x530aba,-0x218,-_0x2a86af._0x51e5a5)](_0x3ca1d8=>({'command':_0x3ca1d8[_0x20fa2a(0x389,0x364,0x37f,0x38f)],'timeout':_0x3ca1d8[_0x20fa2a(0x36f,0x39a,0x380,0x398)]??DEFAULT_TIMEOUT_S2})));continue;}if(_0x36e2b4===void 0x0)continue;const _0x10d35e=new RegExp(_0x5f27d9(-_0x2a86af._0x10aa30,-_0x2a86af._0x3daab6,-0x227,-_0x2a86af._0xec52d2)+_0x5a9351[_0x5f27d9(-_0x2a86af._0x4b89ba,-0x1d5,-0x1ff,-_0x2a86af._0xf0e901)]+')$');_0x10d35e[_0x5f27d9(-0x1fb,-_0x2a86af._0x3de6d1,-0x1f4,-_0x2a86af._0x1092d2)](_0x36e2b4)&&_0x21187d[_0x20fa2a(0x38f,0x3c5,0x3a4,0x3c4)](..._0x5a9351[_0x5f27d9(-0x1f8,-_0x2a86af._0x3f219c,-_0x2a86af._0x502675,-_0x2a86af._0x56ec7e)][_0x20fa2a(0x364,0x38c,_0x2a86af._0x2af864,0x35d)](_0x3ef2b7=>({'command':_0x3ef2b7[_0x20fa2a(0x38c,0x39f,0x37f,0x361)],'timeout':_0x3ef2b7[_0x5f27d9(-0x200,-0x223,-0x21b,-0x209)]??DEFAULT_TIMEOUT_S2})));}return _0x21187d;}};}export{createHookExtensions,createHookOnToolCallMiddleware,createHookRegistry,executeCommandHook};
|