@sleep2agi/agent-network 2.3.0-preview.23 → 2.3.0-preview.25

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
- const a0_0x5e1a20=a0_0x191f;(function(_0x52f11e,_0xa4f06a){const _0x26418f=a0_0x191f,_0x40b362=_0x52f11e();while(!![]){try{const _0x2b1232=parseInt(_0x26418f(0x1ba))/0x1*(-parseInt(_0x26418f(0x1ca))/0x2)+parseInt(_0x26418f(0x1af))/0x3+parseInt(_0x26418f(0x1f2))/0x4+-parseInt(_0x26418f(0x1da))/0x5*(-parseInt(_0x26418f(0x1df))/0x6)+parseInt(_0x26418f(0x1c4))/0x7*(parseInt(_0x26418f(0x1e3))/0x8)+-parseInt(_0x26418f(0x1b4))/0x9*(-parseInt(_0x26418f(0x1b0))/0xa)+-parseInt(_0x26418f(0x1e2))/0xb;if(_0x2b1232===_0xa4f06a)break;else _0x40b362['push'](_0x40b362['shift']());}catch(_0x3472f9){_0x40b362['push'](_0x40b362['shift']());}}}(a0_0x94f9,0x971f7));function a0_0x191f(_0x33e9c5,_0x27116a){_0x33e9c5=_0x33e9c5-0x19e;const _0x94f914=a0_0x94f9();let _0x191f93=_0x94f914[_0x33e9c5];return _0x191f93;}import{EventEmitter as a0_0x57a66e}from'events';import{hostname as a0_0x65b978}from'os';class T extends a0_0x57a66e{['url'];[a0_0x5e1a20(0x1a8)];[a0_0x5e1a20(0x1a6)];[a0_0x5e1a20(0x1d2)];[a0_0x5e1a20(0x1b6)];[a0_0x5e1a20(0x1db)];[a0_0x5e1a20(0x1a2)];['heartbeatTimer'];[a0_0x5e1a20(0x1a4)];[a0_0x5e1a20(0x1bc)]=!0x1;constructor(_0x1172de){const _0x3ee4dd=a0_0x5e1a20;super();if(this[_0x3ee4dd(0x1a3)]=_0x1172de[_0x3ee4dd(0x1a3)][_0x3ee4dd(0x1cf)](/\/$/,''),this[_0x3ee4dd(0x1a8)]=_0x1172de['alias'],this[_0x3ee4dd(0x1a6)]=_0x1172de[_0x3ee4dd(0x1a6)],this[_0x3ee4dd(0x1d2)]=_0x1172de[_0x3ee4dd(0x1d2)]||'sdk',this[_0x3ee4dd(0x1b6)]=_0x3ee4dd(0x1a7)+_0x1172de['alias']+'-'+Date[_0x3ee4dd(0x1f3)]()[_0x3ee4dd(0x1b5)](0x24),this[_0x3ee4dd(0x1db)]=_0x1172de[_0x3ee4dd(0x1db)]??0x2bf20,this['reconnectDelay']=_0x1172de[_0x3ee4dd(0x1a2)]??0xbb8,_0x1172de[_0x3ee4dd(0x1c0)]!==!0x1)this[_0x3ee4dd(0x1f8)]();}[a0_0x5e1a20(0x1d6)](_0x504590){const _0x205f30=a0_0x5e1a20;console[_0x205f30(0x1d6)]('['+new Date()[_0x205f30(0x1c2)]()[_0x205f30(0x1e9)](0x0,0x8)+_0x205f30(0x1d4)+this['alias']+']\x20'+_0x504590);}async[a0_0x5e1a20(0x1f7)](_0x557bc1,_0x5fa88a){const _0x2d9e86=a0_0x5e1a20;let _0x3d5ebf={'Content-Type':_0x2d9e86(0x1d0),'Accept':_0x2d9e86(0x1dd)};if(this[_0x2d9e86(0x1a6)])_0x3d5ebf[_0x2d9e86(0x1d3)]='Bearer\x20'+this[_0x2d9e86(0x1a6)];let _0x400d6b=await(await fetch(this[_0x2d9e86(0x1a3)]+'/mcp',{'method':_0x2d9e86(0x1ee),'headers':_0x3d5ebf,'body':JSON[_0x2d9e86(0x1dc)]({'jsonrpc':_0x2d9e86(0x1ac),'id':Date[_0x2d9e86(0x1f3)](),'method':_0x2d9e86(0x1aa),'params':{'name':_0x557bc1,'arguments':_0x5fa88a}})}))[_0x2d9e86(0x1b2)](),_0x4a373e=_0x400d6b[_0x2d9e86(0x1f9)](/data: (.+)/),_0x1d4a05=_0x4a373e?JSON['parse'](_0x4a373e[0x1]):JSON[_0x2d9e86(0x1e8)](_0x400d6b),_0x284e65=_0x1d4a05?.[_0x2d9e86(0x1f4)]?.[_0x2d9e86(0x1f6)]?.[0x0]?.[_0x2d9e86(0x1b2)];return _0x284e65?JSON[_0x2d9e86(0x1e8)](_0x284e65):_0x1d4a05;}async[a0_0x5e1a20(0x1f8)](){const _0x2590ba=a0_0x5e1a20;if(this[_0x2590ba(0x1bc)])return;this[_0x2590ba(0x1bc)]=!0x0,await this['status'](_0x2590ba(0x1d9)),this[_0x2590ba(0x1d6)](_0x2590ba(0x1e7)),this[_0x2590ba(0x1a0)]=setInterval(()=>{const _0x1decd9=_0x2590ba;this[_0x1decd9(0x1e6)](_0x1decd9(0x1d9))[_0x1decd9(0x1c6)](_0x7108ae=>this[_0x1decd9(0x1d6)](_0x1decd9(0x1d1)+_0x7108ae[_0x1decd9(0x1f5)]));},this[_0x2590ba(0x1db)]),this[_0x2590ba(0x1e4)]();}async[a0_0x5e1a20(0x1e0)](){const _0x556f39=a0_0x5e1a20;if(this['running']=!0x1,this[_0x556f39(0x1a4)]?.[_0x556f39(0x1d8)](),this['heartbeatTimer'])clearInterval(this[_0x556f39(0x1a0)]);await this[_0x556f39(0x1e6)](_0x556f39(0x19f))[_0x556f39(0x1c6)](()=>{}),this['log'](_0x556f39(0x1ef));}async[a0_0x5e1a20(0x1ae)](_0x53c7b7,_0x369fdb,_0x22dc50=a0_0x5e1a20(0x1c3)){const _0x211baf=a0_0x5e1a20;return this[_0x211baf(0x1f7)](_0x211baf(0x1f0),{'alias':_0x53c7b7,'task':_0x369fdb,'priority':_0x22dc50,'from_session':this[_0x211baf(0x1a8)]});}async['message'](_0x5187c3,_0x359057){const _0x17955d=a0_0x5e1a20;return this[_0x17955d(0x1f7)](_0x17955d(0x1b9),{'alias':_0x5187c3,'message':_0x359057,'from_session':this[_0x17955d(0x1a8)]});}async[a0_0x5e1a20(0x1be)](_0x39acc8,_0x1e47b0,_0x260230='completed'){const _0x16d683=a0_0x5e1a20;return this[_0x16d683(0x1f7)]('send_reply',{'in_reply_to':_0x39acc8,'text':_0x1e47b0,'status':_0x260230});}async['status'](_0x55de05,_0x350fe1){const _0x8b8c4f=a0_0x5e1a20;return this[_0x8b8c4f(0x1f7)]('report_status',{'resume_id':this[_0x8b8c4f(0x1b6)],'alias':this[_0x8b8c4f(0x1a8)],'status':_0x55de05,'server':a0_0x65b978(),'hostname':a0_0x65b978(),'agent':this[_0x8b8c4f(0x1d2)],'project_dir':process[_0x8b8c4f(0x1de)](),..._0x350fe1});}async[a0_0x5e1a20(0x1d7)](){const _0x1cabd1=a0_0x5e1a20;return this[_0x1cabd1(0x1f7)](_0x1cabd1(0x1e1),{});}async[a0_0x5e1a20(0x1bf)](_0x530af3,_0x518e62){const _0x3edcd3=a0_0x5e1a20;return this[_0x3edcd3(0x1f7)](_0x3edcd3(0x1bf),{'message':_0x530af3,'filter_server':_0x518e62?.[_0x3edcd3(0x1ec)],'filter_status':_0x518e62?.[_0x3edcd3(0x1e6)]});}async[a0_0x5e1a20(0x1e4)](){const _0x5b31d6=a0_0x5e1a20;let _0x4bdc23=encodeURIComponent(this[_0x5b31d6(0x1a8)]),_0x5a2d0b=this['url']+_0x5b31d6(0x1fa)+_0x4bdc23,_0x1e17ac=this[_0x5b31d6(0x1a2)];while(this[_0x5b31d6(0x1bc)]){try{this['sseAbort']=new AbortController();let _0x5c102f={'Accept':'text/event-stream'};if(this['token'])_0x5c102f[_0x5b31d6(0x1d3)]=_0x5b31d6(0x1b8)+this[_0x5b31d6(0x1a6)];let _0x2e01b3=await fetch(_0x5a2d0b,{'headers':_0x5c102f,'signal':this['sseAbort'][_0x5b31d6(0x1eb)]});if(!_0x2e01b3['ok']||!_0x2e01b3[_0x5b31d6(0x1c8)]){this[_0x5b31d6(0x1d6)](_0x5b31d6(0x1ab)+_0x2e01b3[_0x5b31d6(0x1e6)]),await this[_0x5b31d6(0x1a1)](_0x1e17ac),_0x1e17ac=Math[_0x5b31d6(0x1c5)](_0x1e17ac*1.5,0xea60);continue;}_0x1e17ac=this[_0x5b31d6(0x1a2)];let _0x5739e4=_0x2e01b3[_0x5b31d6(0x1c8)][_0x5b31d6(0x1c9)](),_0x33870c=new TextDecoder(),_0x582383='';while(this[_0x5b31d6(0x1bc)]){let {done:_0x39f073,value:_0x1975b1}=await _0x5739e4['read']();if(_0x39f073)break;_0x582383+=_0x33870c[_0x5b31d6(0x1ce)](_0x1975b1,{'stream':!0x0});let _0x11a30d=_0x582383['split']('\x0a');_0x582383=_0x11a30d[_0x5b31d6(0x1b1)]()||'';for(let _0x930f23 of _0x11a30d){if(!_0x930f23[_0x5b31d6(0x1bb)](_0x5b31d6(0x1cb)))continue;try{let _0x3d1616=JSON[_0x5b31d6(0x1e8)](_0x930f23[_0x5b31d6(0x1e9)](0x6));if(_0x3d1616[_0x5b31d6(0x1e5)]===_0x5b31d6(0x1ad)){this[_0x5b31d6(0x1d6)](_0x5b31d6(0x1b7)),this['emit'](_0x5b31d6(0x1ad));continue;}if(_0x3d1616['type']==='new_task'||_0x3d1616['type']===_0x5b31d6(0x1f1)||_0x3d1616['type']===_0x5b31d6(0x1bf))await this['processInbox']();}catch{}}}}catch(_0x342e1d){if(_0x342e1d[_0x5b31d6(0x1c1)]===_0x5b31d6(0x1c7))break;this[_0x5b31d6(0x1bd)](_0x5b31d6(0x19e),_0x342e1d),this['log'](_0x5b31d6(0x1a9)+_0x342e1d[_0x5b31d6(0x1f5)]);}if(this[_0x5b31d6(0x1bc)])this['emit']('disconnected'),this[_0x5b31d6(0x1d6)](_0x5b31d6(0x1a5)+_0x1e17ac/0x3e8+_0x5b31d6(0x1cc)),await this[_0x5b31d6(0x1a1)](_0x1e17ac),_0x1e17ac=Math[_0x5b31d6(0x1c5)](_0x1e17ac*1.5,0xea60);}}async[a0_0x5e1a20(0x1d5)](){const _0x347857=a0_0x5e1a20;try{let _0x3bd574=(await this[_0x347857(0x1f7)]('get_inbox',{'alias':this['alias'],'limit':0xa}))?.[_0x347857(0x1cd)]||[];for(let _0x10b1ee of _0x3bd574)await this['call']('ack_inbox',{'alias':this[_0x347857(0x1a8)],'message_id':_0x10b1ee['id']}),this[_0x347857(0x1d6)]('←\x20'+_0x10b1ee[_0x347857(0x1b3)]+':\x20'+_0x10b1ee[_0x347857(0x1f6)][_0x347857(0x1e9)](0x0,0x3c)),this[_0x347857(0x1bd)](_0x347857(0x1ed),_0x10b1ee),this[_0x347857(0x1bd)](_0x347857(0x1f5),_0x10b1ee);}catch(_0x1bad29){this['log'](_0x347857(0x1ea)+_0x1bad29[_0x347857(0x1f5)]);}}[a0_0x5e1a20(0x1a1)](_0x3ab0d9){return new Promise(_0x5c4779=>setTimeout(_0x5c4779,_0x3ab0d9));}}function a0_0x94f9(){const _0x55088d=['startsWith','running','emit','reply','broadcast','autoConnect','name','toTimeString','normal','2240833NrQqTV','min','catch','AbortError','body','getReader','98038ZYmfsW','data:\x20','s...','messages','decode','replace','application/json','heartbeat\x20failed:\x20','agent','Authorization',']\x20[commhub:','processInbox','log','getAllStatus','abort','idle','1383835aGJPuK','heartbeatInterval','stringify','application/json,\x20text/event-stream','cwd','6PaaoRp','disconnect','get_all_status','17772073LUTmjC','8kDcHrG','connectSSE','type','status','registered','parse','slice','inbox\x20error:\x20','signal','server','task','POST','disconnected','send_task','new_message','2414344ZPZklY','now','result','message','content','call','connect','match','/events/','error','offline','heartbeatTimer','sleep','reconnectDelay','url','sseAbort','SSE\x20reconnecting\x20in\x20','token','sdk-','alias','SSE\x20error:\x20','tools/call','SSE\x20failed:\x20','2.0','connected','send','1996068snBpiY','520jPzGAa','pop','text','from_session','182610ezgDQp','toString','resumeId','SSE\x20connected','Bearer\x20','send_message','14EbAcRc'];a0_0x94f9=function(){return _0x55088d;};return a0_0x94f9();}var $=T;export{$ as default,T as CommHub};
1
+ const a0_0x448275=a0_0x55d4;(function(_0x568484,_0x43ea72){const _0x4141a5=a0_0x55d4,_0xffcb0=_0x568484();while(!![]){try{const _0x83cb50=parseInt(_0x4141a5(0x188))/0x1+parseInt(_0x4141a5(0x1a4))/0x2+parseInt(_0x4141a5(0x17a))/0x3*(parseInt(_0x4141a5(0x1af))/0x4)+-parseInt(_0x4141a5(0x182))/0x5+-parseInt(_0x4141a5(0x193))/0x6*(parseInt(_0x4141a5(0x184))/0x7)+parseInt(_0x4141a5(0x179))/0x8*(parseInt(_0x4141a5(0x19a))/0x9)+-parseInt(_0x4141a5(0x16b))/0xa;if(_0x83cb50===_0x43ea72)break;else _0xffcb0['push'](_0xffcb0['shift']());}catch(_0x56bd9e){_0xffcb0['push'](_0xffcb0['shift']());}}}(a0_0x5bc7,0xc1738));import{EventEmitter as a0_0x28a8ce}from'events';import{hostname as a0_0x4a32bd}from'os';class T extends a0_0x28a8ce{['url'];[a0_0x448275(0x195)];['token'];['agent'];['resumeId'];[a0_0x448275(0x1c0)];[a0_0x448275(0x191)];[a0_0x448275(0x17b)];['sseAbort'];[a0_0x448275(0x198)]=!0x1;constructor(_0xed11ae){const _0x586990=a0_0x448275;super();if(this[_0x586990(0x1a0)]=_0xed11ae[_0x586990(0x1a0)][_0x586990(0x171)](/\/$/,''),this[_0x586990(0x195)]=_0xed11ae[_0x586990(0x195)],this[_0x586990(0x19f)]=_0xed11ae[_0x586990(0x19f)],this['agent']=_0xed11ae[_0x586990(0x1b1)]||'sdk',this[_0x586990(0x169)]='sdk-'+_0xed11ae[_0x586990(0x195)]+'-'+Date[_0x586990(0x1bc)]()[_0x586990(0x1b0)](0x24),this[_0x586990(0x1c0)]=_0xed11ae[_0x586990(0x1c0)]??0x2bf20,this['reconnectDelay']=_0xed11ae[_0x586990(0x191)]??0xbb8,_0xed11ae[_0x586990(0x17e)]!==!0x1)this[_0x586990(0x190)]();}[a0_0x448275(0x197)](_0x1e965c){const _0x67a96c=a0_0x448275;console[_0x67a96c(0x197)]('['+new Date()[_0x67a96c(0x16e)]()['slice'](0x0,0x8)+_0x67a96c(0x1ae)+this['alias']+']\x20'+_0x1e965c);}async['call'](_0x4b0b28,_0x30c3e6){const _0x95d4b5=a0_0x448275;let _0x2daf92={'Content-Type':_0x95d4b5(0x177),'Accept':_0x95d4b5(0x170)};if(this[_0x95d4b5(0x19f)])_0x2daf92[_0x95d4b5(0x18c)]=_0x95d4b5(0x194)+this['token'];let _0x26503e=await(await fetch(this[_0x95d4b5(0x1a0)]+_0x95d4b5(0x176),{'method':_0x95d4b5(0x1a1),'headers':_0x2daf92,'body':JSON[_0x95d4b5(0x1a5)]({'jsonrpc':'2.0','id':Date['now'](),'method':_0x95d4b5(0x175),'params':{'name':_0x4b0b28,'arguments':_0x30c3e6}})}))['text'](),_0x500caa=_0x26503e[_0x95d4b5(0x16a)](/data: (.+)/),_0x5acce2=_0x500caa?JSON['parse'](_0x500caa[0x1]):JSON['parse'](_0x26503e),_0x8108ce=_0x5acce2?.['result']?.[_0x95d4b5(0x1be)]?.[0x0]?.[_0x95d4b5(0x1bd)];return _0x8108ce?JSON['parse'](_0x8108ce):_0x5acce2;}async[a0_0x448275(0x190)](){const _0x1ed315=a0_0x448275;if(this[_0x1ed315(0x198)])return;this[_0x1ed315(0x198)]=!0x0,await this[_0x1ed315(0x1b2)](_0x1ed315(0x1b6)),this[_0x1ed315(0x197)](_0x1ed315(0x18b)),this[_0x1ed315(0x17b)]=setInterval(()=>{const _0x7a7612=_0x1ed315;this[_0x7a7612(0x1b2)]('idle')[_0x7a7612(0x18d)](_0x5cf99c=>this[_0x7a7612(0x197)](_0x7a7612(0x1b9)+_0x5cf99c[_0x7a7612(0x1a2)]));},this[_0x1ed315(0x1c0)]),this[_0x1ed315(0x1b7)]();}async[a0_0x448275(0x19c)](){const _0x3de916=a0_0x448275;if(this[_0x3de916(0x198)]=!0x1,this[_0x3de916(0x1a3)]?.[_0x3de916(0x18f)](),this[_0x3de916(0x17b)])clearInterval(this[_0x3de916(0x17b)]);await this[_0x3de916(0x1b2)](_0x3de916(0x1bf))[_0x3de916(0x18d)](()=>{}),this['log'](_0x3de916(0x1ab));}async['send'](_0x167a8a,_0x44a494,_0x4cc7b6=a0_0x448275(0x1aa)){const _0x5b5499=a0_0x448275;return this['call'](_0x5b5499(0x18a),{'alias':_0x167a8a,'task':_0x44a494,'priority':_0x4cc7b6,'from_session':this[_0x5b5499(0x195)]});}async[a0_0x448275(0x1a2)](_0x378dde,_0x1b9b99){const _0x3ebd8e=a0_0x448275;return this[_0x3ebd8e(0x187)]('send_message',{'alias':_0x378dde,'message':_0x1b9b99,'from_session':this[_0x3ebd8e(0x195)]});}async['reply'](_0x4e3abe,_0x45f7da,_0x36f7ec=a0_0x448275(0x1a7)){const _0x413e91=a0_0x448275;return this[_0x413e91(0x187)](_0x413e91(0x173),{'in_reply_to':_0x4e3abe,'text':_0x45f7da,'status':_0x36f7ec});}async[a0_0x448275(0x1b2)](_0x5d1e8b,_0x3719a8){const _0x52fea4=a0_0x448275;return this['call'](_0x52fea4(0x16d),{'resume_id':this[_0x52fea4(0x169)],'alias':this[_0x52fea4(0x195)],'status':_0x5d1e8b,'server':a0_0x4a32bd(),'hostname':a0_0x4a32bd(),'agent':this[_0x52fea4(0x1b1)],'project_dir':process['cwd'](),..._0x3719a8});}async[a0_0x448275(0x16f)](){const _0x43ba07=a0_0x448275;return this[_0x43ba07(0x187)](_0x43ba07(0x19b),{});}async['broadcast'](_0x50b52c,_0x91cc46){const _0x4f1674=a0_0x448275;return this[_0x4f1674(0x187)](_0x4f1674(0x17c),{'message':_0x50b52c,'filter_server':_0x91cc46?.[_0x4f1674(0x183)],'filter_status':_0x91cc46?.[_0x4f1674(0x1b2)]});}async[a0_0x448275(0x1b7)](){const _0x549abc=a0_0x448275;let _0x4738ae=encodeURIComponent(this[_0x549abc(0x195)]),_0x484faa=this[_0x549abc(0x1a0)]+_0x549abc(0x186)+_0x4738ae,_0x4e0430=this[_0x549abc(0x191)];while(this[_0x549abc(0x198)]){try{this[_0x549abc(0x1a3)]=new AbortController();let _0x1b7926={'Accept':_0x549abc(0x174)};if(this['token'])_0x1b7926[_0x549abc(0x18c)]=_0x549abc(0x194)+this[_0x549abc(0x19f)];let _0x48e1e0=await fetch(_0x484faa,{'headers':_0x1b7926,'signal':this[_0x549abc(0x1a3)][_0x549abc(0x185)]});if(!_0x48e1e0['ok']||!_0x48e1e0[_0x549abc(0x17d)]){this[_0x549abc(0x197)]('SSE\x20failed:\x20'+_0x48e1e0[_0x549abc(0x1b2)]),await this[_0x549abc(0x1b3)](_0x4e0430),_0x4e0430=Math['min'](_0x4e0430*1.5,0xea60);continue;}_0x4e0430=this['reconnectDelay'];let _0x165213=_0x48e1e0[_0x549abc(0x17d)]['getReader'](),_0x3bafc2=new TextDecoder(),_0x149af0='';while(this[_0x549abc(0x198)]){let {done:_0x930db,value:_0x43e7c1}=await _0x165213[_0x549abc(0x19e)]();if(_0x930db)break;_0x149af0+=_0x3bafc2['decode'](_0x43e7c1,{'stream':!0x0});let _0x24d42e=_0x149af0[_0x549abc(0x1b4)]('\x0a');_0x149af0=_0x24d42e[_0x549abc(0x19d)]()||'';for(let _0x8cb294 of _0x24d42e){if(!_0x8cb294[_0x549abc(0x178)](_0x549abc(0x1ba)))continue;try{let _0x1ee75d=JSON[_0x549abc(0x181)](_0x8cb294[_0x549abc(0x1a8)](0x6));if(_0x1ee75d[_0x549abc(0x180)]===_0x549abc(0x17f)){this[_0x549abc(0x197)](_0x549abc(0x18e)),this['emit']('connected');continue;}if(_0x1ee75d[_0x549abc(0x180)]===_0x549abc(0x1a6)||_0x1ee75d[_0x549abc(0x180)]===_0x549abc(0x1a9)||_0x1ee75d[_0x549abc(0x180)]==='broadcast')await this[_0x549abc(0x1b8)]();}catch{}}}}catch(_0x1f1e9f){if(_0x1f1e9f[_0x549abc(0x172)]==='AbortError')break;this['emit'](_0x549abc(0x1ad),_0x1f1e9f),this[_0x549abc(0x197)]('SSE\x20error:\x20'+_0x1f1e9f[_0x549abc(0x1a2)]);}if(this[_0x549abc(0x198)])this[_0x549abc(0x192)](_0x549abc(0x1ab)),this[_0x549abc(0x197)](_0x549abc(0x16c)+_0x4e0430/0x3e8+_0x549abc(0x1ac)),await this['sleep'](_0x4e0430),_0x4e0430=Math[_0x549abc(0x1b5)](_0x4e0430*1.5,0xea60);}}async[a0_0x448275(0x1b8)](){const _0x23c363=a0_0x448275;try{let _0x224649=(await this[_0x23c363(0x187)](_0x23c363(0x1bb),{'alias':this[_0x23c363(0x195)],'limit':0xa}))?.[_0x23c363(0x196)]||[];for(let _0x997825 of _0x224649)await this['call'](_0x23c363(0x189),{'alias':this['alias'],'message_id':_0x997825['id']}),this['log']('←\x20'+_0x997825['from_session']+':\x20'+_0x997825[_0x23c363(0x1be)]['slice'](0x0,0x3c)),this[_0x23c363(0x192)]('task',_0x997825),this[_0x23c363(0x192)](_0x23c363(0x1a2),_0x997825);}catch(_0x1cbd6d){this[_0x23c363(0x197)](_0x23c363(0x199)+_0x1cbd6d[_0x23c363(0x1a2)]);}}['sleep'](_0x1b6330){return new Promise(_0x3eb371=>setTimeout(_0x3eb371,_0x1b6330));}}function a0_0x55d4(_0x3939f2,_0x26920a){_0x3939f2=_0x3939f2-0x169;const _0x5bc74f=a0_0x5bc7();let _0x55d487=_0x5bc74f[_0x3939f2];return _0x55d487;}function a0_0x5bc7(){const _0x4539b1=['server','45157KdpdLR','signal','/events/','call','1046243jaJcOj','ack_inbox','send_task','registered','Authorization','catch','SSE\x20connected','abort','connect','reconnectDelay','emit','492IjaEMq','Bearer\x20','alias','messages','log','running','inbox\x20error:\x20','48492RvmoZK','get_all_status','disconnect','pop','read','token','url','POST','message','sseAbort','1352176QJLEaj','stringify','new_task','completed','slice','new_message','normal','disconnected','s...','error',']\x20[commhub:','8iVTFdQ','toString','agent','status','sleep','split','min','idle','connectSSE','processInbox','heartbeat\x20failed:\x20','data:\x20','get_inbox','now','text','content','offline','heartbeatInterval','resumeId','match','7560860tMgUAS','SSE\x20reconnecting\x20in\x20','report_status','toTimeString','getAllStatus','application/json,\x20text/event-stream','replace','name','send_reply','text/event-stream','tools/call','/mcp','application/json','startsWith','1384lbkaSA','797763UZvWIk','heartbeatTimer','broadcast','body','autoConnect','connected','type','parse','5544265rxaDWY'];a0_0x5bc7=function(){return _0x4539b1;};return a0_0x5bc7();}var $=T;export{$ as default,T as CommHub};