@sleep2agi/agent-network 2.3.0-preview.18 → 2.3.0-preview.19

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_0x4c0c(_0x3fd69e,_0x53a316){_0x3fd69e=_0x3fd69e-0x116;const _0x58dac8=a0_0x58da();let _0x4c0cc1=_0x58dac8[_0x3fd69e];return _0x4c0cc1;}const a0_0x2657ce=a0_0x4c0c;(function(_0x19d1c7,_0x282ba7){const _0x363cea=a0_0x4c0c,_0x9a75bb=_0x19d1c7();while(!![]){try{const _0x5ad9fe=parseInt(_0x363cea(0x15e))/0x1+-parseInt(_0x363cea(0x138))/0x2+parseInt(_0x363cea(0x127))/0x3*(parseInt(_0x363cea(0x16b))/0x4)+-parseInt(_0x363cea(0x14f))/0x5+parseInt(_0x363cea(0x154))/0x6+parseInt(_0x363cea(0x152))/0x7*(parseInt(_0x363cea(0x11e))/0x8)+-parseInt(_0x363cea(0x11f))/0x9;if(_0x5ad9fe===_0x282ba7)break;else _0x9a75bb['push'](_0x9a75bb['shift']());}catch(_0x49a933){_0x9a75bb['push'](_0x9a75bb['shift']());}}}(a0_0x58da,0xd1c7d));function a0_0x58da(){const _0x1c5aa2=['sdk-','status','sseAbort','send_reply','AbortError','POST','content','368RnfkKB','send','send_task','2.0','text/event-stream','connected','registered','Authorization','slice','log','ack_inbox','/mcp','1736LUPtfb','29301174rxFoSZ','name','normal','idle','getReader','reconnectDelay','get_inbox','connectSSE','35292Rpymsd','get_all_status','report_status','autoConnect','message','new_message','split','pop','server','heartbeat\x20failed:\x20','heartbeatInterval','application/json','text','send_message','running','alias','from_session','219474tDpqJS','resumeId','cwd','completed','Bearer\x20','emit','type','toTimeString','disconnect','call','processInbox','heartbeatTimer','s...','read','connect','agent','getAllStatus','messages','url','sleep','disconnected','offline','min','309165ahOefj','data:\x20','result','29351nSnbMU','now','10112322reDtlD','token','body','parse','broadcast','new_task','SSE\x20failed:\x20','signal','match','tools/call','608961IMqZXG','abort','reply','SSE\x20connected','inbox\x20error:\x20','catch'];a0_0x58da=function(){return _0x1c5aa2;};return a0_0x58da();}import{EventEmitter as a0_0x377cd4}from'events';import{hostname as a0_0x4d5960}from'os';class T extends a0_0x377cd4{[a0_0x2657ce(0x14a)];[a0_0x2657ce(0x136)];[a0_0x2657ce(0x155)];[a0_0x2657ce(0x147)];[a0_0x2657ce(0x139)];[a0_0x2657ce(0x131)];[a0_0x2657ce(0x124)];[a0_0x2657ce(0x143)];['sseAbort'];[a0_0x2657ce(0x135)]=!0x1;constructor(_0x4a4592){const _0x22fa9b=a0_0x2657ce;super();if(this[_0x22fa9b(0x14a)]=_0x4a4592[_0x22fa9b(0x14a)]['replace'](/\/$/,''),this[_0x22fa9b(0x136)]=_0x4a4592[_0x22fa9b(0x136)],this[_0x22fa9b(0x155)]=_0x4a4592[_0x22fa9b(0x155)],this[_0x22fa9b(0x147)]=_0x4a4592[_0x22fa9b(0x147)]||'sdk',this['resumeId']=_0x22fa9b(0x164)+_0x4a4592[_0x22fa9b(0x136)]+'-'+Date['now']()['toString'](0x24),this[_0x22fa9b(0x131)]=_0x4a4592[_0x22fa9b(0x131)]??0x2bf20,this[_0x22fa9b(0x124)]=_0x4a4592[_0x22fa9b(0x124)]??0xbb8,_0x4a4592[_0x22fa9b(0x12a)]!==!0x1)this[_0x22fa9b(0x146)]();}[a0_0x2657ce(0x11b)](_0x3e98d2){const _0x6bb20e=a0_0x2657ce;console['log']('['+new Date()[_0x6bb20e(0x13f)]()['slice'](0x0,0x8)+']\x20[commhub:'+this[_0x6bb20e(0x136)]+']\x20'+_0x3e98d2);}async['call'](_0x47ca4d,_0x51caa2){const _0x4efd73=a0_0x2657ce;let _0x30c7ed={'Content-Type':_0x4efd73(0x132),'Accept':'application/json,\x20text/event-stream'};if(this['token'])_0x30c7ed['Authorization']='Bearer\x20'+this[_0x4efd73(0x155)];let _0x3a92a4=await(await fetch(this[_0x4efd73(0x14a)]+_0x4efd73(0x11d),{'method':_0x4efd73(0x169),'headers':_0x30c7ed,'body':JSON['stringify']({'jsonrpc':_0x4efd73(0x16e),'id':Date[_0x4efd73(0x153)](),'method':_0x4efd73(0x15d),'params':{'name':_0x47ca4d,'arguments':_0x51caa2}})}))[_0x4efd73(0x133)](),_0x36e225=_0x3a92a4[_0x4efd73(0x15c)](/data: (.+)/),_0x15c4cb=_0x36e225?JSON[_0x4efd73(0x157)](_0x36e225[0x1]):JSON[_0x4efd73(0x157)](_0x3a92a4),_0x42f66d=_0x15c4cb?.[_0x4efd73(0x151)]?.[_0x4efd73(0x16a)]?.[0x0]?.[_0x4efd73(0x133)];return _0x42f66d?JSON['parse'](_0x42f66d):_0x15c4cb;}async[a0_0x2657ce(0x146)](){const _0x437cba=a0_0x2657ce;if(this['running'])return;this[_0x437cba(0x135)]=!0x0,await this[_0x437cba(0x165)](_0x437cba(0x122)),this['log'](_0x437cba(0x118)),this[_0x437cba(0x143)]=setInterval(()=>{const _0x5c5c1c=_0x437cba;this[_0x5c5c1c(0x165)](_0x5c5c1c(0x122))[_0x5c5c1c(0x163)](_0x1ad2bf=>this[_0x5c5c1c(0x11b)](_0x5c5c1c(0x130)+_0x1ad2bf[_0x5c5c1c(0x12b)]));},this['heartbeatInterval']),this[_0x437cba(0x126)]();}async[a0_0x2657ce(0x140)](){const _0x44edd9=a0_0x2657ce;if(this[_0x44edd9(0x135)]=!0x1,this['sseAbort']?.[_0x44edd9(0x15f)](),this[_0x44edd9(0x143)])clearInterval(this[_0x44edd9(0x143)]);await this[_0x44edd9(0x165)](_0x44edd9(0x14d))['catch'](()=>{}),this[_0x44edd9(0x11b)](_0x44edd9(0x14c));}async[a0_0x2657ce(0x16c)](_0x8b1486,_0x24d241,_0x395ae5=a0_0x2657ce(0x121)){const _0x4c6145=a0_0x2657ce;return this['call'](_0x4c6145(0x16d),{'alias':_0x8b1486,'task':_0x24d241,'priority':_0x395ae5,'from_session':this[_0x4c6145(0x136)]});}async[a0_0x2657ce(0x12b)](_0x198bc6,_0x475701){const _0x2f95a8=a0_0x2657ce;return this[_0x2f95a8(0x141)](_0x2f95a8(0x134),{'alias':_0x198bc6,'message':_0x475701,'from_session':this[_0x2f95a8(0x136)]});}async[a0_0x2657ce(0x160)](_0x312da0,_0x5b6834,_0x5d9264=a0_0x2657ce(0x13b)){const _0x8241e2=a0_0x2657ce;return this[_0x8241e2(0x141)](_0x8241e2(0x167),{'in_reply_to':_0x312da0,'text':_0x5b6834,'status':_0x5d9264});}async['status'](_0x264d16,_0x2b7dcf){const _0x9fe182=a0_0x2657ce;return this['call'](_0x9fe182(0x129),{'resume_id':this[_0x9fe182(0x139)],'alias':this[_0x9fe182(0x136)],'status':_0x264d16,'server':a0_0x4d5960(),'hostname':a0_0x4d5960(),'agent':this[_0x9fe182(0x147)],'project_dir':process[_0x9fe182(0x13a)](),..._0x2b7dcf});}async[a0_0x2657ce(0x148)](){const _0x28039c=a0_0x2657ce;return this[_0x28039c(0x141)](_0x28039c(0x128),{});}async['broadcast'](_0x26cd49,_0x504c1a){const _0x2ec300=a0_0x2657ce;return this[_0x2ec300(0x141)]('broadcast',{'message':_0x26cd49,'filter_server':_0x504c1a?.[_0x2ec300(0x12f)],'filter_status':_0x504c1a?.['status']});}async['connectSSE'](){const _0x5c5250=a0_0x2657ce;let _0x94b820=encodeURIComponent(this[_0x5c5250(0x136)]),_0x19955d=this[_0x5c5250(0x14a)]+'/events/'+_0x94b820,_0x4b99ab=this[_0x5c5250(0x124)];while(this[_0x5c5250(0x135)]){try{this['sseAbort']=new AbortController();let _0x5d57d3={'Accept':_0x5c5250(0x116)};if(this['token'])_0x5d57d3[_0x5c5250(0x119)]=_0x5c5250(0x13c)+this[_0x5c5250(0x155)];let _0x28e212=await fetch(_0x19955d,{'headers':_0x5d57d3,'signal':this[_0x5c5250(0x166)][_0x5c5250(0x15b)]});if(!_0x28e212['ok']||!_0x28e212[_0x5c5250(0x156)]){this['log'](_0x5c5250(0x15a)+_0x28e212[_0x5c5250(0x165)]),await this[_0x5c5250(0x14b)](_0x4b99ab),_0x4b99ab=Math[_0x5c5250(0x14e)](_0x4b99ab*1.5,0xea60);continue;}_0x4b99ab=this['reconnectDelay'];let _0x4d3ab3=_0x28e212['body'][_0x5c5250(0x123)](),_0x3e6139=new TextDecoder(),_0x130a3f='';while(this['running']){let {done:_0x59c671,value:_0x1d29d1}=await _0x4d3ab3[_0x5c5250(0x145)]();if(_0x59c671)break;_0x130a3f+=_0x3e6139['decode'](_0x1d29d1,{'stream':!0x0});let _0x52bcd1=_0x130a3f[_0x5c5250(0x12d)]('\x0a');_0x130a3f=_0x52bcd1[_0x5c5250(0x12e)]()||'';for(let _0x167a31 of _0x52bcd1){if(!_0x167a31['startsWith'](_0x5c5250(0x150)))continue;try{let _0x1a5a16=JSON[_0x5c5250(0x157)](_0x167a31[_0x5c5250(0x11a)](0x6));if(_0x1a5a16[_0x5c5250(0x13e)]===_0x5c5250(0x117)){this[_0x5c5250(0x11b)](_0x5c5250(0x161)),this['emit'](_0x5c5250(0x117));continue;}if(_0x1a5a16['type']===_0x5c5250(0x159)||_0x1a5a16['type']===_0x5c5250(0x12c)||_0x1a5a16[_0x5c5250(0x13e)]===_0x5c5250(0x158))await this[_0x5c5250(0x142)]();}catch{}}}}catch(_0x42b950){if(_0x42b950[_0x5c5250(0x120)]===_0x5c5250(0x168))break;this[_0x5c5250(0x13d)]('error',_0x42b950),this[_0x5c5250(0x11b)]('SSE\x20error:\x20'+_0x42b950[_0x5c5250(0x12b)]);}if(this['running'])this[_0x5c5250(0x13d)](_0x5c5250(0x14c)),this[_0x5c5250(0x11b)]('SSE\x20reconnecting\x20in\x20'+_0x4b99ab/0x3e8+_0x5c5250(0x144)),await this['sleep'](_0x4b99ab),_0x4b99ab=Math[_0x5c5250(0x14e)](_0x4b99ab*1.5,0xea60);}}async[a0_0x2657ce(0x142)](){const _0x49e01f=a0_0x2657ce;try{let _0x58195a=(await this[_0x49e01f(0x141)](_0x49e01f(0x125),{'alias':this[_0x49e01f(0x136)],'limit':0xa}))?.[_0x49e01f(0x149)]||[];for(let _0x50eff7 of _0x58195a)await this[_0x49e01f(0x141)](_0x49e01f(0x11c),{'alias':this[_0x49e01f(0x136)],'message_id':_0x50eff7['id']}),this[_0x49e01f(0x11b)]('←\x20'+_0x50eff7[_0x49e01f(0x137)]+':\x20'+_0x50eff7[_0x49e01f(0x16a)][_0x49e01f(0x11a)](0x0,0x3c)),this[_0x49e01f(0x13d)]('task',_0x50eff7),this[_0x49e01f(0x13d)](_0x49e01f(0x12b),_0x50eff7);}catch(_0xfefe66){this[_0x49e01f(0x11b)](_0x49e01f(0x162)+_0xfefe66[_0x49e01f(0x12b)]);}}['sleep'](_0x1f723a){return new Promise(_0x4625fc=>setTimeout(_0x4625fc,_0x1f723a));}}var $=T;export{$ as default,T as CommHub};
1
+ const a0_0xf7069c=a0_0x4b2b;(function(_0x49d093,_0x11a5d3){const _0x7fc140=a0_0x4b2b,_0x37b4a6=_0x49d093();while(!![]){try{const _0x4448ef=parseInt(_0x7fc140(0x158))/0x1*(-parseInt(_0x7fc140(0x196))/0x2)+-parseInt(_0x7fc140(0x17c))/0x3+parseInt(_0x7fc140(0x19f))/0x4*(-parseInt(_0x7fc140(0x175))/0x5)+parseInt(_0x7fc140(0x19b))/0x6*(-parseInt(_0x7fc140(0x156))/0x7)+parseInt(_0x7fc140(0x1a5))/0x8*(-parseInt(_0x7fc140(0x1a6))/0x9)+parseInt(_0x7fc140(0x185))/0xa*(parseInt(_0x7fc140(0x191))/0xb)+-parseInt(_0x7fc140(0x181))/0xc*(-parseInt(_0x7fc140(0x1a2))/0xd);if(_0x4448ef===_0x11a5d3)break;else _0x37b4a6['push'](_0x37b4a6['shift']());}catch(_0x4e5220){_0x37b4a6['push'](_0x37b4a6['shift']());}}}(a0_0x3ae0,0x496d4));import{EventEmitter as a0_0x5c4e5b}from'events';function a0_0x3ae0(){const _0xe7d080=['pop','send','report_status','Authorization','text/event-stream','new_task','signal','11Uottcd','type','offline','autoConnect','registered','10LsyumB','send_task','s...','ack_inbox','SSE\x20reconnecting\x20in\x20','6oCIaGH','AbortError','getReader','abort','8TDGpUB','running','heartbeatTimer','406913uEhXet','normal',']\x20[commhub:','689672mlesXK','18ocucvP','from_session','emit','heartbeatInterval','application/json','reply','split','now','get_all_status','SSE\x20failed:\x20','resumeId','heartbeat\x20failed:\x20','2934624mTFhEf','data:\x20','89279BqZXth','replace','connect','reconnectDelay','SSE\x20error:\x20','connectSSE','body','disconnected','catch','error','send_message','alias','min','2.0','url','tools/call','log','getAllStatus','task','sseAbort','call','sleep','SSE\x20connected','idle','agent','cwd','send_reply','new_message','text','1115375NYgeHd','toString','broadcast','parse','status','POST','token','383724KLEwok','connected','messages','application/json,\x20text/event-stream','slice','732yHnYlD','decode','sdk-','message','34980vPZTtj','completed','get_inbox','startsWith','content'];a0_0x3ae0=function(){return _0xe7d080;};return a0_0x3ae0();}import{hostname as a0_0x242ee5}from'os';class T extends a0_0x5c4e5b{[a0_0xf7069c(0x166)];['alias'];[a0_0xf7069c(0x17b)];[a0_0xf7069c(0x170)];['resumeId'];[a0_0xf7069c(0x1a9)];[a0_0xf7069c(0x15b)];[a0_0xf7069c(0x1a1)];[a0_0xf7069c(0x16b)];['running']=!0x1;constructor(_0x519e2e){const _0x3251fc=a0_0xf7069c;super();if(this[_0x3251fc(0x166)]=_0x519e2e[_0x3251fc(0x166)][_0x3251fc(0x159)](/\/$/,''),this['alias']=_0x519e2e[_0x3251fc(0x163)],this['token']=_0x519e2e['token'],this['agent']=_0x519e2e[_0x3251fc(0x170)]||'sdk',this[_0x3251fc(0x1b0)]=_0x3251fc(0x183)+_0x519e2e[_0x3251fc(0x163)]+'-'+Date['now']()[_0x3251fc(0x176)](0x24),this[_0x3251fc(0x1a9)]=_0x519e2e[_0x3251fc(0x1a9)]??0x2bf20,this['reconnectDelay']=_0x519e2e[_0x3251fc(0x15b)]??0xbb8,_0x519e2e[_0x3251fc(0x194)]!==!0x1)this[_0x3251fc(0x15a)]();}['log'](_0x49a14b){const _0x2943d5=a0_0xf7069c;console['log']('['+new Date()['toTimeString']()['slice'](0x0,0x8)+_0x2943d5(0x1a4)+this[_0x2943d5(0x163)]+']\x20'+_0x49a14b);}async[a0_0xf7069c(0x16c)](_0x469f81,_0x90cc78){const _0x15609a=a0_0xf7069c;let _0x337fd4={'Content-Type':_0x15609a(0x1aa),'Accept':_0x15609a(0x17f)};if(this[_0x15609a(0x17b)])_0x337fd4[_0x15609a(0x18d)]='Bearer\x20'+this[_0x15609a(0x17b)];let _0x2744c1=await(await fetch(this[_0x15609a(0x166)]+'/mcp',{'method':_0x15609a(0x17a),'headers':_0x337fd4,'body':JSON['stringify']({'jsonrpc':_0x15609a(0x165),'id':Date[_0x15609a(0x1ad)](),'method':_0x15609a(0x167),'params':{'name':_0x469f81,'arguments':_0x90cc78}})}))[_0x15609a(0x174)](),_0x2dc017=_0x2744c1['match'](/data: (.+)/),_0x32c9ba=_0x2dc017?JSON[_0x15609a(0x178)](_0x2dc017[0x1]):JSON[_0x15609a(0x178)](_0x2744c1),_0x4ea9ce=_0x32c9ba?.['result']?.[_0x15609a(0x189)]?.[0x0]?.[_0x15609a(0x174)];return _0x4ea9ce?JSON[_0x15609a(0x178)](_0x4ea9ce):_0x32c9ba;}async[a0_0xf7069c(0x15a)](){const _0x932849=a0_0xf7069c;if(this[_0x932849(0x1a0)])return;this[_0x932849(0x1a0)]=!0x0,await this[_0x932849(0x179)](_0x932849(0x16f)),this[_0x932849(0x168)](_0x932849(0x195)),this[_0x932849(0x1a1)]=setInterval(()=>{const _0x414973=_0x932849;this[_0x414973(0x179)]('idle')[_0x414973(0x160)](_0x2b8ee6=>this[_0x414973(0x168)](_0x414973(0x155)+_0x2b8ee6['message']));},this[_0x932849(0x1a9)]),this[_0x932849(0x15d)]();}async['disconnect'](){const _0x224ba3=a0_0xf7069c;if(this[_0x224ba3(0x1a0)]=!0x1,this[_0x224ba3(0x16b)]?.[_0x224ba3(0x19e)](),this[_0x224ba3(0x1a1)])clearInterval(this['heartbeatTimer']);await this[_0x224ba3(0x179)](_0x224ba3(0x193))[_0x224ba3(0x160)](()=>{}),this['log'](_0x224ba3(0x15f));}async[a0_0xf7069c(0x18b)](_0x63ef67,_0x2de9b9,_0x22894f=a0_0xf7069c(0x1a3)){const _0x236b06=a0_0xf7069c;return this[_0x236b06(0x16c)](_0x236b06(0x197),{'alias':_0x63ef67,'task':_0x2de9b9,'priority':_0x22894f,'from_session':this[_0x236b06(0x163)]});}async[a0_0xf7069c(0x184)](_0x195ba2,_0x523c4b){const _0x16189a=a0_0xf7069c;return this[_0x16189a(0x16c)](_0x16189a(0x162),{'alias':_0x195ba2,'message':_0x523c4b,'from_session':this[_0x16189a(0x163)]});}async[a0_0xf7069c(0x1ab)](_0x1bdc71,_0x599073,_0x410624=a0_0xf7069c(0x186)){const _0x23118c=a0_0xf7069c;return this['call'](_0x23118c(0x172),{'in_reply_to':_0x1bdc71,'text':_0x599073,'status':_0x410624});}async[a0_0xf7069c(0x179)](_0x227f1e,_0x105f89){const _0x3278c1=a0_0xf7069c;return this[_0x3278c1(0x16c)](_0x3278c1(0x18c),{'resume_id':this[_0x3278c1(0x1b0)],'alias':this[_0x3278c1(0x163)],'status':_0x227f1e,'server':a0_0x242ee5(),'hostname':a0_0x242ee5(),'agent':this[_0x3278c1(0x170)],'project_dir':process[_0x3278c1(0x171)](),..._0x105f89});}async[a0_0xf7069c(0x169)](){const _0x2be074=a0_0xf7069c;return this[_0x2be074(0x16c)](_0x2be074(0x1ae),{});}async[a0_0xf7069c(0x177)](_0x2843a1,_0x7f0b97){const _0x5be3b2=a0_0xf7069c;return this[_0x5be3b2(0x16c)](_0x5be3b2(0x177),{'message':_0x2843a1,'filter_server':_0x7f0b97?.['server'],'filter_status':_0x7f0b97?.[_0x5be3b2(0x179)]});}async[a0_0xf7069c(0x15d)](){const _0x2d0c71=a0_0xf7069c;let _0x42e333=encodeURIComponent(this['alias']),_0xc34251=this[_0x2d0c71(0x166)]+'/events/'+_0x42e333,_0x3366b0=this[_0x2d0c71(0x15b)];while(this[_0x2d0c71(0x1a0)]){try{this[_0x2d0c71(0x16b)]=new AbortController();let _0x435f08={'Accept':_0x2d0c71(0x18e)};if(this[_0x2d0c71(0x17b)])_0x435f08[_0x2d0c71(0x18d)]='Bearer\x20'+this['token'];let _0x36ae19=await fetch(_0xc34251,{'headers':_0x435f08,'signal':this[_0x2d0c71(0x16b)][_0x2d0c71(0x190)]});if(!_0x36ae19['ok']||!_0x36ae19[_0x2d0c71(0x15e)]){this[_0x2d0c71(0x168)](_0x2d0c71(0x1af)+_0x36ae19[_0x2d0c71(0x179)]),await this['sleep'](_0x3366b0),_0x3366b0=Math[_0x2d0c71(0x164)](_0x3366b0*1.5,0xea60);continue;}_0x3366b0=this[_0x2d0c71(0x15b)];let _0x2093ac=_0x36ae19['body'][_0x2d0c71(0x19d)](),_0x17c1b5=new TextDecoder(),_0x1f19ef='';while(this[_0x2d0c71(0x1a0)]){let {done:_0x32d115,value:_0xce1e48}=await _0x2093ac['read']();if(_0x32d115)break;_0x1f19ef+=_0x17c1b5[_0x2d0c71(0x182)](_0xce1e48,{'stream':!0x0});let _0x197f68=_0x1f19ef[_0x2d0c71(0x1ac)]('\x0a');_0x1f19ef=_0x197f68[_0x2d0c71(0x18a)]()||'';for(let _0x53a09e of _0x197f68){if(!_0x53a09e[_0x2d0c71(0x188)](_0x2d0c71(0x157)))continue;try{let _0x5a729b=JSON[_0x2d0c71(0x178)](_0x53a09e[_0x2d0c71(0x180)](0x6));if(_0x5a729b['type']===_0x2d0c71(0x17d)){this[_0x2d0c71(0x168)](_0x2d0c71(0x16e)),this['emit'](_0x2d0c71(0x17d));continue;}if(_0x5a729b['type']===_0x2d0c71(0x18f)||_0x5a729b['type']===_0x2d0c71(0x173)||_0x5a729b[_0x2d0c71(0x192)]===_0x2d0c71(0x177))await this['processInbox']();}catch{}}}}catch(_0x219375){if(_0x219375['name']===_0x2d0c71(0x19c))break;this['emit'](_0x2d0c71(0x161),_0x219375),this[_0x2d0c71(0x168)](_0x2d0c71(0x15c)+_0x219375['message']);}if(this[_0x2d0c71(0x1a0)])this[_0x2d0c71(0x1a8)](_0x2d0c71(0x15f)),this[_0x2d0c71(0x168)](_0x2d0c71(0x19a)+_0x3366b0/0x3e8+_0x2d0c71(0x198)),await this[_0x2d0c71(0x16d)](_0x3366b0),_0x3366b0=Math[_0x2d0c71(0x164)](_0x3366b0*1.5,0xea60);}}async['processInbox'](){const _0x792ecb=a0_0xf7069c;try{let _0x404359=(await this[_0x792ecb(0x16c)](_0x792ecb(0x187),{'alias':this['alias'],'limit':0xa}))?.[_0x792ecb(0x17e)]||[];for(let _0x36e20e of _0x404359)await this['call'](_0x792ecb(0x199),{'alias':this['alias'],'message_id':_0x36e20e['id']}),this[_0x792ecb(0x168)]('←\x20'+_0x36e20e[_0x792ecb(0x1a7)]+':\x20'+_0x36e20e[_0x792ecb(0x189)][_0x792ecb(0x180)](0x0,0x3c)),this[_0x792ecb(0x1a8)](_0x792ecb(0x16a),_0x36e20e),this['emit'](_0x792ecb(0x184),_0x36e20e);}catch(_0x2ed335){this[_0x792ecb(0x168)]('inbox\x20error:\x20'+_0x2ed335['message']);}}['sleep'](_0xa49fac){return new Promise(_0x2c24b6=>setTimeout(_0x2c24b6,_0xa49fac));}}function a0_0x4b2b(_0x3cc90a,_0x43758b){_0x3cc90a=_0x3cc90a-0x155;const _0x3ae0cf=a0_0x3ae0();let _0x4b2b27=_0x3ae0cf[_0x3cc90a];return _0x4b2b27;}var $=T;export{$ as default,T as CommHub};