@sleep2agi/agent-network 2.3.0-preview.10 → 2.3.0-preview.11

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.
@@ -1 +1 @@
1
- function a0_0x9087(_0x3f18eb,_0x38a974){_0x3f18eb=_0x3f18eb-0x1b0;const _0x527323=a0_0x5273();let _0x90874=_0x527323[_0x3f18eb];return _0x90874;}const a0_0x4139e8=a0_0x9087;(function(_0x26215d,_0x2c9eed){const _0x471321=a0_0x9087,_0x39fce5=_0x26215d();while(!![]){try{const _0x239ad1=-parseInt(_0x471321(0x1c8))/0x1*(parseInt(_0x471321(0x1b5))/0x2)+-parseInt(_0x471321(0x1fe))/0x3*(parseInt(_0x471321(0x1c2))/0x4)+-parseInt(_0x471321(0x1d3))/0x5*(parseInt(_0x471321(0x1c5))/0x6)+parseInt(_0x471321(0x200))/0x7+parseInt(_0x471321(0x1c1))/0x8+-parseInt(_0x471321(0x1e4))/0x9*(parseInt(_0x471321(0x1df))/0xa)+parseInt(_0x471321(0x1c9))/0xb;if(_0x239ad1===_0x2c9eed)break;else _0x39fce5['push'](_0x39fce5['shift']());}catch(_0x397d1a){_0x39fce5['push'](_0x39fce5['shift']());}}}(a0_0x5273,0x7bdd8));import{EventEmitter as a0_0x452b00}from'events';import{hostname as a0_0x156699}from'os';class T extends a0_0x452b00{['url'];[a0_0x4139e8(0x1b8)];[a0_0x4139e8(0x1f7)];[a0_0x4139e8(0x1e1)];[a0_0x4139e8(0x1f3)];['heartbeatInterval'];['reconnectDelay'];[a0_0x4139e8(0x1d6)];[a0_0x4139e8(0x1de)];[a0_0x4139e8(0x1be)]=!0x1;constructor(_0x1ec7b6){const _0x2dcdac=a0_0x4139e8;super();if(this[_0x2dcdac(0x1d0)]=_0x1ec7b6[_0x2dcdac(0x1d0)][_0x2dcdac(0x1ec)](/\/$/,''),this[_0x2dcdac(0x1b8)]=_0x1ec7b6[_0x2dcdac(0x1b8)],this[_0x2dcdac(0x1f7)]=_0x1ec7b6['token'],this[_0x2dcdac(0x1e1)]=_0x1ec7b6['agent']||_0x2dcdac(0x1cb),this[_0x2dcdac(0x1f3)]=_0x2dcdac(0x1dc)+_0x1ec7b6['alias']+'-'+Date[_0x2dcdac(0x1e0)]()['toString'](0x24),this[_0x2dcdac(0x201)]=_0x1ec7b6[_0x2dcdac(0x201)]??0x2bf20,this[_0x2dcdac(0x1b1)]=_0x1ec7b6[_0x2dcdac(0x1b1)]??0xbb8,_0x1ec7b6['autoConnect']!==!0x1)this[_0x2dcdac(0x1db)]();}[a0_0x4139e8(0x1ba)](_0xce487a){const _0x4d0746=a0_0x4139e8;console[_0x4d0746(0x1ba)]('['+new Date()[_0x4d0746(0x1d7)]()[_0x4d0746(0x1e6)](0x0,0x8)+_0x4d0746(0x1e2)+this['alias']+']\x20'+_0xce487a);}async['call'](_0x4fc4e6,_0x1bb33c){const _0x36dfd7=a0_0x4139e8;let _0x422b0b={'Content-Type':'application/json','Accept':'application/json,\x20text/event-stream'};if(this[_0x36dfd7(0x1f7)])_0x422b0b[_0x36dfd7(0x1c0)]=_0x36dfd7(0x1d4)+this[_0x36dfd7(0x1f7)];let _0x3e62a7=await(await fetch(this[_0x36dfd7(0x1d0)]+_0x36dfd7(0x1c3),{'method':_0x36dfd7(0x1bf),'headers':_0x422b0b,'body':JSON[_0x36dfd7(0x1ee)]({'jsonrpc':_0x36dfd7(0x1cc),'id':Date['now'](),'method':'tools/call','params':{'name':_0x4fc4e6,'arguments':_0x1bb33c}})}))[_0x36dfd7(0x1b7)](),_0x8e24e9=_0x3e62a7[_0x36dfd7(0x1ff)](/data: (.+)/),_0xe8f3df=_0x8e24e9?JSON['parse'](_0x8e24e9[0x1]):JSON['parse'](_0x3e62a7),_0x11d61f=_0xe8f3df?.['result']?.['content']?.[0x0]?.[_0x36dfd7(0x1b7)];return _0x11d61f?JSON[_0x36dfd7(0x203)](_0x11d61f):_0xe8f3df;}async['connect'](){const _0xf3262e=a0_0x4139e8;if(this[_0xf3262e(0x1be)])return;this['running']=!0x0,await this[_0xf3262e(0x1b0)]('idle'),this[_0xf3262e(0x1ba)]('registered'),this[_0xf3262e(0x1d6)]=setInterval(()=>{const _0x203fef=_0xf3262e;this['status']('idle')[_0x203fef(0x1e5)](_0x595d29=>this[_0x203fef(0x1ba)](_0x203fef(0x1f9)+_0x595d29[_0x203fef(0x1c7)]));},this[_0xf3262e(0x201)]),this[_0xf3262e(0x1b9)]();}async[a0_0x4139e8(0x1eb)](){const _0x23a6fc=a0_0x4139e8;if(this['running']=!0x1,this[_0x23a6fc(0x1de)]?.['abort'](),this[_0x23a6fc(0x1d6)])clearInterval(this[_0x23a6fc(0x1d6)]);await this[_0x23a6fc(0x1b0)](_0x23a6fc(0x1cf))['catch'](()=>{}),this[_0x23a6fc(0x1ba)](_0x23a6fc(0x1da));}async[a0_0x4139e8(0x1d9)](_0xfa460,_0x5397f3,_0x20e1ec=a0_0x4139e8(0x1ca)){const _0x22f39b=a0_0x4139e8;return this['call'](_0x22f39b(0x1f8),{'alias':_0xfa460,'task':_0x5397f3,'priority':_0x20e1ec,'from_session':this[_0x22f39b(0x1b8)]});}async[a0_0x4139e8(0x1c7)](_0xc25c42,_0x2b8571){const _0x41af61=a0_0x4139e8;return this[_0x41af61(0x1ea)]('send_message',{'alias':_0xc25c42,'message':_0x2b8571,'from_session':this['alias']});}async[a0_0x4139e8(0x1f2)](_0x2b5258,_0x514191,_0x4a53d1=a0_0x4139e8(0x1e8)){const _0x830a3c=a0_0x4139e8;return this['call'](_0x830a3c(0x1f1),{'in_reply_to':_0x2b5258,'text':_0x514191,'status':_0x4a53d1});}async['status'](_0x33e015,_0x5df1d9){const _0x1e6150=a0_0x4139e8;return this[_0x1e6150(0x1ea)]('report_status',{'resume_id':this[_0x1e6150(0x1f3)],'alias':this[_0x1e6150(0x1b8)],'status':_0x33e015,'server':a0_0x156699(),'hostname':a0_0x156699(),'agent':this[_0x1e6150(0x1e1)],'project_dir':process[_0x1e6150(0x1c4)](),..._0x5df1d9});}async[a0_0x4139e8(0x1b4)](){const _0x3f230e=a0_0x4139e8;return this[_0x3f230e(0x1ea)]('get_all_status',{});}async[a0_0x4139e8(0x1fc)](_0x4bfac2,_0x13aff5){const _0xf19557=a0_0x4139e8;return this['call'](_0xf19557(0x1fc),{'message':_0x4bfac2,'filter_server':_0x13aff5?.[_0xf19557(0x1bc)],'filter_status':_0x13aff5?.['status']});}async['connectSSE'](){const _0x3c6e5f=a0_0x4139e8;let _0x246124=encodeURIComponent(this[_0x3c6e5f(0x1b8)]),_0x321a3c=this['url']+_0x3c6e5f(0x1bd)+_0x246124,_0x49da31=this[_0x3c6e5f(0x1b1)];while(this[_0x3c6e5f(0x1be)]){try{this[_0x3c6e5f(0x1de)]=new AbortController();let _0x507414={'Accept':'text/event-stream'};if(this['token'])_0x507414['Authorization']=_0x3c6e5f(0x1d4)+this[_0x3c6e5f(0x1f7)];let _0x18bcfc=await fetch(_0x321a3c,{'headers':_0x507414,'signal':this[_0x3c6e5f(0x1de)][_0x3c6e5f(0x1ce)]});if(!_0x18bcfc['ok']||!_0x18bcfc[_0x3c6e5f(0x1fa)]){this[_0x3c6e5f(0x1ba)](_0x3c6e5f(0x1d2)+_0x18bcfc[_0x3c6e5f(0x1b0)]),await this[_0x3c6e5f(0x1d1)](_0x49da31),_0x49da31=Math[_0x3c6e5f(0x1fb)](_0x49da31*1.5,0xea60);continue;}_0x49da31=this[_0x3c6e5f(0x1b1)];let _0x1c0825=_0x18bcfc[_0x3c6e5f(0x1fa)][_0x3c6e5f(0x1d8)](),_0x45bd49=new TextDecoder(),_0x5f245d='';while(this[_0x3c6e5f(0x1be)]){let {done:_0x32689d,value:_0x5ea000}=await _0x1c0825[_0x3c6e5f(0x202)]();if(_0x32689d)break;_0x5f245d+=_0x45bd49[_0x3c6e5f(0x1cd)](_0x5ea000,{'stream':!0x0});let _0x4f5482=_0x5f245d[_0x3c6e5f(0x1e7)]('\x0a');_0x5f245d=_0x4f5482[_0x3c6e5f(0x1ed)]()||'';for(let _0x5f404f of _0x4f5482){if(!_0x5f404f['startsWith'](_0x3c6e5f(0x1c6)))continue;try{let _0x1414a2=JSON['parse'](_0x5f404f[_0x3c6e5f(0x1e6)](0x6));if(_0x1414a2[_0x3c6e5f(0x1f6)]===_0x3c6e5f(0x1bb)){this[_0x3c6e5f(0x1ba)](_0x3c6e5f(0x1fd)),this['emit'](_0x3c6e5f(0x1bb));continue;}if(_0x1414a2[_0x3c6e5f(0x1f6)]==='new_task'||_0x1414a2[_0x3c6e5f(0x1f6)]===_0x3c6e5f(0x1f0)||_0x1414a2['type']===_0x3c6e5f(0x1fc))await this['processInbox']();}catch{}}}}catch(_0x53f1fb){if(_0x53f1fb[_0x3c6e5f(0x1f5)]===_0x3c6e5f(0x1b6))break;this[_0x3c6e5f(0x1e3)]('error',_0x53f1fb),this[_0x3c6e5f(0x1ba)](_0x3c6e5f(0x1b3)+_0x53f1fb['message']);}if(this['running'])this['emit']('disconnected'),this[_0x3c6e5f(0x1ba)]('SSE\x20reconnecting\x20in\x20'+_0x49da31/0x3e8+_0x3c6e5f(0x1ef)),await this[_0x3c6e5f(0x1d1)](_0x49da31),_0x49da31=Math[_0x3c6e5f(0x1fb)](_0x49da31*1.5,0xea60);}}async[a0_0x4139e8(0x1e9)](){const _0x12fd99=a0_0x4139e8;try{let _0x289ab6=(await this[_0x12fd99(0x1ea)]('get_inbox',{'alias':this[_0x12fd99(0x1b8)],'limit':0xa}))?.['messages']||[];for(let _0x182191 of _0x289ab6)await this[_0x12fd99(0x1ea)](_0x12fd99(0x1f4),{'alias':this['alias'],'message_id':_0x182191['id']}),this[_0x12fd99(0x1ba)]('←\x20'+_0x182191['from_session']+':\x20'+_0x182191[_0x12fd99(0x1d5)]['slice'](0x0,0x3c)),this[_0x12fd99(0x1e3)](_0x12fd99(0x1dd),_0x182191),this[_0x12fd99(0x1e3)](_0x12fd99(0x1c7),_0x182191);}catch(_0x230955){this[_0x12fd99(0x1ba)](_0x12fd99(0x1b2)+_0x230955[_0x12fd99(0x1c7)]);}}['sleep'](_0x46b019){return new Promise(_0x4c2373=>setTimeout(_0x4c2373,_0x46b019));}}var $=T;function a0_0x5273(){const _0xb9b414=['resumeId','ack_inbox','name','type','token','send_task','heartbeat\x20failed:\x20','body','min','broadcast','SSE\x20connected','3kklzGc','match','4742297otxDVy','heartbeatInterval','read','parse','status','reconnectDelay','inbox\x20error:\x20','SSE\x20error:\x20','getAllStatus','120182PaDwYY','AbortError','text','alias','connectSSE','log','connected','server','/events/','running','POST','Authorization','1452400lsEPNt','325960iLhYqe','/mcp','cwd','60bWTvwm','data:\x20','message','7NFflPt','5911345IkiVmS','normal','sdk','2.0','decode','signal','offline','url','sleep','SSE\x20failed:\x20','26140bCTUFF','Bearer\x20','content','heartbeatTimer','toTimeString','getReader','send','disconnected','connect','sdk-','task','sseAbort','3346570mWRYOy','now','agent',']\x20[commhub:','emit','9fOYvkA','catch','slice','split','completed','processInbox','call','disconnect','replace','pop','stringify','s...','new_message','send_reply','reply'];a0_0x5273=function(){return _0xb9b414;};return a0_0x5273();}export{$ as default,T as CommHub};
1
+ const a0_0x4059a6=a0_0x27f5;(function(_0x15cdca,_0x33c5b4){const _0x478268=a0_0x27f5,_0x51f030=_0x15cdca();while(!![]){try{const _0x2214d1=parseInt(_0x478268(0x1ee))/0x1+-parseInt(_0x478268(0x1d6))/0x2*(-parseInt(_0x478268(0x1db))/0x3)+parseInt(_0x478268(0x210))/0x4*(parseInt(_0x478268(0x1d4))/0x5)+parseInt(_0x478268(0x206))/0x6+-parseInt(_0x478268(0x1d2))/0x7+parseInt(_0x478268(0x1e9))/0x8*(parseInt(_0x478268(0x1dd))/0x9)+-parseInt(_0x478268(0x1da))/0xa;if(_0x2214d1===_0x33c5b4)break;else _0x51f030['push'](_0x51f030['shift']());}catch(_0x241b90){_0x51f030['push'](_0x51f030['shift']());}}}(a0_0x59e0,0x3f187));import{EventEmitter as a0_0x535c0e}from'events';import{hostname as a0_0x8960f3}from'os';class T extends a0_0x535c0e{[a0_0x4059a6(0x1f2)];[a0_0x4059a6(0x1e1)];[a0_0x4059a6(0x1f9)];[a0_0x4059a6(0x1ff)];['resumeId'];[a0_0x4059a6(0x1f1)];[a0_0x4059a6(0x209)];[a0_0x4059a6(0x211)];['sseAbort'];[a0_0x4059a6(0x1ce)]=!0x1;constructor(_0x332b50){const _0x1d936b=a0_0x4059a6;super();if(this[_0x1d936b(0x1f2)]=_0x332b50['url'][_0x1d936b(0x200)](/\/$/,''),this[_0x1d936b(0x1e1)]=_0x332b50['alias'],this[_0x1d936b(0x1f9)]=_0x332b50[_0x1d936b(0x1f9)],this[_0x1d936b(0x1ff)]=_0x332b50['agent']||_0x1d936b(0x1de),this[_0x1d936b(0x203)]=_0x1d936b(0x1d9)+_0x332b50[_0x1d936b(0x1e1)]+'-'+Date['now']()[_0x1d936b(0x1ca)](0x24),this['heartbeatInterval']=_0x332b50[_0x1d936b(0x1f1)]??0x2bf20,this[_0x1d936b(0x209)]=_0x332b50[_0x1d936b(0x209)]??0xbb8,_0x332b50[_0x1d936b(0x1eb)]!==!0x1)this[_0x1d936b(0x1d7)]();}[a0_0x4059a6(0x1e0)](_0x295217){const _0x5d9e3c=a0_0x4059a6;console[_0x5d9e3c(0x1e0)]('['+new Date()[_0x5d9e3c(0x20b)]()[_0x5d9e3c(0x1fd)](0x0,0x8)+_0x5d9e3c(0x1f0)+this[_0x5d9e3c(0x1e1)]+']\x20'+_0x295217);}async['call'](_0x311ad1,_0x4838d7){const _0x52ef0a=a0_0x4059a6;let _0x248b99={'Content-Type':_0x52ef0a(0x1f8),'Accept':_0x52ef0a(0x208)};if(this[_0x52ef0a(0x1f9)])_0x248b99[_0x52ef0a(0x1df)]=_0x52ef0a(0x204)+this[_0x52ef0a(0x1f9)];let _0x2059d2=await(await fetch(this[_0x52ef0a(0x1f2)]+_0x52ef0a(0x1e5),{'method':'POST','headers':_0x248b99,'body':JSON[_0x52ef0a(0x20a)]({'jsonrpc':'2.0','id':Date[_0x52ef0a(0x1e6)](),'method':_0x52ef0a(0x1c4),'params':{'name':_0x311ad1,'arguments':_0x4838d7}})}))[_0x52ef0a(0x1c9)](),_0x26c4a1=_0x2059d2[_0x52ef0a(0x1d1)](/data: (.+)/),_0x5a1078=_0x26c4a1?JSON[_0x52ef0a(0x1ef)](_0x26c4a1[0x1]):JSON['parse'](_0x2059d2),_0x38fd28=_0x5a1078?.[_0x52ef0a(0x1e4)]?.[_0x52ef0a(0x1cc)]?.[0x0]?.[_0x52ef0a(0x1c9)];return _0x38fd28?JSON[_0x52ef0a(0x1ef)](_0x38fd28):_0x5a1078;}async['connect'](){const _0x480e05=a0_0x4059a6;if(this['running'])return;this[_0x480e05(0x1ce)]=!0x0,await this[_0x480e05(0x1cd)](_0x480e05(0x1c2)),this[_0x480e05(0x1e0)]('registered'),this['heartbeatTimer']=setInterval(()=>{const _0x93e01c=_0x480e05;this[_0x93e01c(0x1cd)](_0x93e01c(0x1c2))[_0x93e01c(0x202)](_0x46ccbd=>this[_0x93e01c(0x1e0)]('heartbeat\x20failed:\x20'+_0x46ccbd[_0x93e01c(0x20f)]));},this[_0x480e05(0x1f1)]),this['connectSSE']();}async[a0_0x4059a6(0x1c1)](){const _0x1691e2=a0_0x4059a6;if(this['running']=!0x1,this['sseAbort']?.[_0x1691e2(0x1fe)](),this[_0x1691e2(0x211)])clearInterval(this[_0x1691e2(0x211)]);await this[_0x1691e2(0x1cd)]('offline')['catch'](()=>{}),this[_0x1691e2(0x1e0)](_0x1691e2(0x1fa));}async[a0_0x4059a6(0x1f6)](_0x27993b,_0x26abfd,_0xb43d11=a0_0x4059a6(0x1dc)){const _0x81460d=a0_0x4059a6;return this[_0x81460d(0x207)](_0x81460d(0x1cf),{'alias':_0x27993b,'task':_0x26abfd,'priority':_0xb43d11,'from_session':this[_0x81460d(0x1e1)]});}async['message'](_0x1c53a4,_0x2689bc){const _0xa4a523=a0_0x4059a6;return this[_0xa4a523(0x207)]('send_message',{'alias':_0x1c53a4,'message':_0x2689bc,'from_session':this['alias']});}async[a0_0x4059a6(0x1e2)](_0x50f553,_0x14ad02,_0x2a5143='completed'){const _0x36edf1=a0_0x4059a6;return this[_0x36edf1(0x207)]('send_reply',{'in_reply_to':_0x50f553,'text':_0x14ad02,'status':_0x2a5143});}async[a0_0x4059a6(0x1cd)](_0x80a390,_0x451e24){const _0x3c7df5=a0_0x4059a6;return this['call']('report_status',{'resume_id':this[_0x3c7df5(0x203)],'alias':this[_0x3c7df5(0x1e1)],'status':_0x80a390,'server':a0_0x8960f3(),'hostname':a0_0x8960f3(),'agent':this['agent'],'project_dir':process[_0x3c7df5(0x1c6)](),..._0x451e24});}async[a0_0x4059a6(0x1d5)](){const _0x1737ef=a0_0x4059a6;return this[_0x1737ef(0x207)](_0x1737ef(0x1f3),{});}async[a0_0x4059a6(0x20d)](_0x4b87de,_0x68abd2){const _0x18faab=a0_0x4059a6;return this['call'](_0x18faab(0x20d),{'message':_0x4b87de,'filter_server':_0x68abd2?.['server'],'filter_status':_0x68abd2?.[_0x18faab(0x1cd)]});}async['connectSSE'](){const _0x49128a=a0_0x4059a6;let _0x1575e4=encodeURIComponent(this['alias']),_0xc8d3ba=this[_0x49128a(0x1f2)]+'/events/'+_0x1575e4,_0x5e1288=this[_0x49128a(0x209)];while(this['running']){try{this['sseAbort']=new AbortController();let _0x19f575={'Accept':_0x49128a(0x1ea)};if(this['token'])_0x19f575[_0x49128a(0x1df)]='Bearer\x20'+this['token'];let _0x24d6f5=await fetch(_0xc8d3ba,{'headers':_0x19f575,'signal':this[_0x49128a(0x1fb)][_0x49128a(0x205)]});if(!_0x24d6f5['ok']||!_0x24d6f5['body']){this[_0x49128a(0x1e0)](_0x49128a(0x201)+_0x24d6f5[_0x49128a(0x1cd)]),await this[_0x49128a(0x1fc)](_0x5e1288),_0x5e1288=Math[_0x49128a(0x1c5)](_0x5e1288*1.5,0xea60);continue;}_0x5e1288=this[_0x49128a(0x209)];let _0x5c3cf4=_0x24d6f5['body'][_0x49128a(0x1d0)](),_0x1caacd=new TextDecoder(),_0x486e6e='';while(this['running']){let {done:_0x1d8055,value:_0x4606df}=await _0x5c3cf4[_0x49128a(0x1c3)]();if(_0x1d8055)break;_0x486e6e+=_0x1caacd['decode'](_0x4606df,{'stream':!0x0});let _0xad8b1=_0x486e6e['split']('\x0a');_0x486e6e=_0xad8b1[_0x49128a(0x1d8)]()||'';for(let _0x5cc51a of _0xad8b1){if(!_0x5cc51a[_0x49128a(0x20e)](_0x49128a(0x1f7)))continue;try{let _0x5081d2=JSON['parse'](_0x5cc51a[_0x49128a(0x1fd)](0x6));if(_0x5081d2[_0x49128a(0x1ec)]===_0x49128a(0x1cb)){this[_0x49128a(0x1e0)](_0x49128a(0x1c8)),this[_0x49128a(0x1d3)](_0x49128a(0x1cb));continue;}if(_0x5081d2[_0x49128a(0x1ec)]==='new_task'||_0x5081d2['type']===_0x49128a(0x1e3)||_0x5081d2[_0x49128a(0x1ec)]===_0x49128a(0x20d))await this[_0x49128a(0x1f4)]();}catch{}}}}catch(_0x9f64eb){if(_0x9f64eb['name']==='AbortError')break;this[_0x49128a(0x1d3)]('error',_0x9f64eb),this[_0x49128a(0x1e0)](_0x49128a(0x1e7)+_0x9f64eb[_0x49128a(0x20f)]);}if(this['running'])this[_0x49128a(0x1d3)](_0x49128a(0x1fa)),this[_0x49128a(0x1e0)](_0x49128a(0x1ed)+_0x5e1288/0x3e8+_0x49128a(0x1f5)),await this[_0x49128a(0x1fc)](_0x5e1288),_0x5e1288=Math['min'](_0x5e1288*1.5,0xea60);}}async['processInbox'](){const _0x3f58b6=a0_0x4059a6;try{let _0x565345=(await this[_0x3f58b6(0x207)](_0x3f58b6(0x1c7),{'alias':this[_0x3f58b6(0x1e1)],'limit':0xa}))?.['messages']||[];for(let _0x2ec321 of _0x565345)await this['call'](_0x3f58b6(0x20c),{'alias':this[_0x3f58b6(0x1e1)],'message_id':_0x2ec321['id']}),this['log']('←\x20'+_0x2ec321['from_session']+':\x20'+_0x2ec321[_0x3f58b6(0x1cc)]['slice'](0x0,0x3c)),this[_0x3f58b6(0x1d3)]('task',_0x2ec321),this[_0x3f58b6(0x1d3)]('message',_0x2ec321);}catch(_0x54eb28){this[_0x3f58b6(0x1e0)](_0x3f58b6(0x1e8)+_0x54eb28[_0x3f58b6(0x20f)]);}}[a0_0x4059a6(0x1fc)](_0x59d1f3){return new Promise(_0x175e80=>setTimeout(_0x175e80,_0x59d1f3));}}function a0_0x27f5(_0x46f7fb,_0x5cfedd){_0x46f7fb=_0x46f7fb-0x1c1;const _0x59e05e=a0_0x59e0();let _0x27f5cf=_0x59e05e[_0x46f7fb];return _0x27f5cf;}var $=T;export{$ as default,T as CommHub};function a0_0x59e0(){const _0x18b957=['12MZNXgz','heartbeatTimer','disconnect','idle','read','tools/call','min','cwd','get_inbox','SSE\x20connected','text','toString','connected','content','status','running','send_task','getReader','match','1724037tyLDEM','emit','87585gvKJbd','getAllStatus','42892KhZtrm','connect','pop','sdk-','6010190EZalRW','21nTlVZe','normal','9xUexcv','sdk','Authorization','log','alias','reply','new_message','result','/mcp','now','SSE\x20error:\x20','inbox\x20error:\x20','1390168FnahBL','text/event-stream','autoConnect','type','SSE\x20reconnecting\x20in\x20','427813GXMJxk','parse',']\x20[commhub:','heartbeatInterval','url','get_all_status','processInbox','s...','send','data:\x20','application/json','token','disconnected','sseAbort','sleep','slice','abort','agent','replace','SSE\x20failed:\x20','catch','resumeId','Bearer\x20','signal','1808952fKTtBp','call','application/json,\x20text/event-stream','reconnectDelay','stringify','toTimeString','ack_inbox','broadcast','startsWith','message'];a0_0x59e0=function(){return _0x18b957;};return a0_0x59e0();}