@sleep2agi/agent-network 2.3.0-preview.31 → 2.3.0-preview.33

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_0x7e95(){const _0x4d2592=['reconnectDelay','6852JdHPyc','startsWith','call','error','/mcp','connected','Authorization','emit','url','processInbox','send_message','get_inbox','decode','message','98QhHWpo','data:\x20','sleep','66GmwqmG','alias','SSE\x20failed:\x20','Bearer\x20','task','registered','s...','stringify','3wFSYKL','application/json,\x20text/event-stream','getAllStatus','broadcast','366490drqwLw','heartbeat\x20failed:\x20','sdk','completed','replace','disconnected','messages','from_session','normal','sseAbort','POST','offline','855434UjkjxX','body','heartbeatTimer','toString','getReader','1125930LFJltY','type','974840DXUBtU','agent','cwd','slice','read','sdk-','ack_inbox','SSE\x20connected','99uZssFK','toTimeString','idle','log','now','send','2.0','server','content','new_task','autoConnect','reply','catch','new_message','token','send_task','connect','300411dlBWOL','tools/call','result','get_all_status','AbortError','abort','65263dwizmQ','heartbeatInterval','report_status','SSE\x20reconnecting\x20in\x20','send_reply','signal','resumeId','2368068mQKAgm','status','match','min','running','connectSSE','disconnect','parse','name'];a0_0x7e95=function(){return _0x4d2592;};return a0_0x7e95();}function a0_0x4318(_0x1beb47,_0x209047){_0x1beb47=_0x1beb47-0x1e6;const _0x7e95a6=a0_0x7e95();let _0x431810=_0x7e95a6[_0x1beb47];return _0x431810;}const a0_0x1bb943=a0_0x4318;(function(_0x59835e,_0x56539a){const _0x42f87c=a0_0x4318,_0x35acaa=_0x59835e();while(!![]){try{const _0x3d0159=parseInt(_0x42f87c(0x20b))/0x1+-parseInt(_0x42f87c(0x1eb))/0x2*(-parseInt(_0x42f87c(0x23b))/0x3)+parseInt(_0x42f87c(0x218))/0x4+-parseInt(_0x42f87c(0x23f))/0x5*(parseInt(_0x42f87c(0x233))/0x6)+parseInt(_0x42f87c(0x230))/0x7*(-parseInt(_0x42f87c(0x1f2))/0x8)+parseInt(_0x42f87c(0x1fa))/0x9*(-parseInt(_0x42f87c(0x1f0))/0xa)+-parseInt(_0x42f87c(0x211))/0xb*(-parseInt(_0x42f87c(0x222))/0xc);if(_0x3d0159===_0x56539a)break;else _0x35acaa['push'](_0x35acaa['shift']());}catch(_0x3584f8){_0x35acaa['push'](_0x35acaa['shift']());}}}(a0_0x7e95,0xe9abd));import{EventEmitter as a0_0xfb8523}from'events';import{hostname as a0_0x124282}from'os';class T extends a0_0xfb8523{[a0_0x1bb943(0x22a)];['alias'];[a0_0x1bb943(0x208)];[a0_0x1bb943(0x1f3)];[a0_0x1bb943(0x217)];[a0_0x1bb943(0x212)];['reconnectDelay'];[a0_0x1bb943(0x1ed)];[a0_0x1bb943(0x1e8)];[a0_0x1bb943(0x21c)]=!0x1;constructor(_0x31258c){const _0x2757fe=a0_0x1bb943;super();if(this[_0x2757fe(0x22a)]=_0x31258c[_0x2757fe(0x22a)][_0x2757fe(0x243)](/\/$/,''),this[_0x2757fe(0x234)]=_0x31258c[_0x2757fe(0x234)],this[_0x2757fe(0x208)]=_0x31258c[_0x2757fe(0x208)],this[_0x2757fe(0x1f3)]=_0x31258c['agent']||_0x2757fe(0x241),this['resumeId']=_0x2757fe(0x1f7)+_0x31258c['alias']+'-'+Date[_0x2757fe(0x1fe)]()[_0x2757fe(0x1ee)](0x24),this['heartbeatInterval']=_0x31258c[_0x2757fe(0x212)]??0x2bf20,this['reconnectDelay']=_0x31258c[_0x2757fe(0x221)]??0xbb8,_0x31258c[_0x2757fe(0x204)]!==!0x1)this['connect']();}[a0_0x1bb943(0x1fd)](_0x52be3f){const _0x482b2d=a0_0x1bb943;console[_0x482b2d(0x1fd)]('['+new Date()[_0x482b2d(0x1fb)]()[_0x482b2d(0x1f5)](0x0,0x8)+']\x20[commhub:'+this[_0x482b2d(0x234)]+']\x20'+_0x52be3f);}async[a0_0x1bb943(0x224)](_0x3583a8,_0x2095de){const _0x4abd58=a0_0x1bb943;let _0x2f97ab={'Content-Type':'application/json','Accept':_0x4abd58(0x23c)};if(this[_0x4abd58(0x208)])_0x2f97ab[_0x4abd58(0x228)]=_0x4abd58(0x236)+this['token'];let _0x2201d7=await(await fetch(this[_0x4abd58(0x22a)]+_0x4abd58(0x226),{'method':_0x4abd58(0x1e9),'headers':_0x2f97ab,'body':JSON[_0x4abd58(0x23a)]({'jsonrpc':_0x4abd58(0x200),'id':Date[_0x4abd58(0x1fe)](),'method':_0x4abd58(0x20c),'params':{'name':_0x3583a8,'arguments':_0x2095de}})}))['text'](),_0x4c6f49=_0x2201d7[_0x4abd58(0x21a)](/data: (.+)/),_0x1340f7=_0x4c6f49?JSON[_0x4abd58(0x21f)](_0x4c6f49[0x1]):JSON[_0x4abd58(0x21f)](_0x2201d7),_0x107887=_0x1340f7?.[_0x4abd58(0x20d)]?.[_0x4abd58(0x202)]?.[0x0]?.['text'];return _0x107887?JSON[_0x4abd58(0x21f)](_0x107887):_0x1340f7;}async[a0_0x1bb943(0x20a)](){const _0x78c9dc=a0_0x1bb943;if(this[_0x78c9dc(0x21c)])return;this[_0x78c9dc(0x21c)]=!0x0,await this['status'](_0x78c9dc(0x1fc)),this['log'](_0x78c9dc(0x238)),this[_0x78c9dc(0x1ed)]=setInterval(()=>{const _0x3e1d7d=_0x78c9dc;this[_0x3e1d7d(0x219)]('idle')['catch'](_0x36e26f=>this[_0x3e1d7d(0x1fd)](_0x3e1d7d(0x240)+_0x36e26f[_0x3e1d7d(0x22f)]));},this[_0x78c9dc(0x212)]),this['connectSSE']();}async[a0_0x1bb943(0x21e)](){const _0x3bb370=a0_0x1bb943;if(this[_0x3bb370(0x21c)]=!0x1,this[_0x3bb370(0x1e8)]?.[_0x3bb370(0x210)](),this[_0x3bb370(0x1ed)])clearInterval(this[_0x3bb370(0x1ed)]);await this[_0x3bb370(0x219)](_0x3bb370(0x1ea))[_0x3bb370(0x206)](()=>{}),this[_0x3bb370(0x1fd)](_0x3bb370(0x244));}async[a0_0x1bb943(0x1ff)](_0x381e00,_0x39fb4f,_0x5920e1=a0_0x1bb943(0x1e7)){const _0x1d0828=a0_0x1bb943;return this['call'](_0x1d0828(0x209),{'alias':_0x381e00,'task':_0x39fb4f,'priority':_0x5920e1,'from_session':this['alias']});}async[a0_0x1bb943(0x22f)](_0x295324,_0x4c7b84){const _0xf07b70=a0_0x1bb943;return this[_0xf07b70(0x224)](_0xf07b70(0x22c),{'alias':_0x295324,'message':_0x4c7b84,'from_session':this['alias']});}async[a0_0x1bb943(0x205)](_0x27b3db,_0x472473,_0x43316a=a0_0x1bb943(0x242)){const _0x4472b2=a0_0x1bb943;return this[_0x4472b2(0x224)](_0x4472b2(0x215),{'in_reply_to':_0x27b3db,'text':_0x472473,'status':_0x43316a});}async[a0_0x1bb943(0x219)](_0x19d7fa,_0x50055d){const _0x2583a7=a0_0x1bb943;return this['call'](_0x2583a7(0x213),{'resume_id':this['resumeId'],'alias':this[_0x2583a7(0x234)],'status':_0x19d7fa,'server':a0_0x124282(),'hostname':a0_0x124282(),'agent':this[_0x2583a7(0x1f3)],'project_dir':process[_0x2583a7(0x1f4)](),..._0x50055d});}async[a0_0x1bb943(0x23d)](){const _0x1f7f80=a0_0x1bb943;return this['call'](_0x1f7f80(0x20e),{});}async[a0_0x1bb943(0x23e)](_0x966320,_0x314d35){const _0x151781=a0_0x1bb943;return this['call'](_0x151781(0x23e),{'message':_0x966320,'filter_server':_0x314d35?.[_0x151781(0x201)],'filter_status':_0x314d35?.[_0x151781(0x219)]});}async[a0_0x1bb943(0x21d)](){const _0x19a593=a0_0x1bb943;let _0x5002fe=encodeURIComponent(this[_0x19a593(0x234)]),_0x15a6cc=this[_0x19a593(0x22a)]+'/events/'+_0x5002fe,_0xda7a69=this[_0x19a593(0x221)];while(this[_0x19a593(0x21c)]){try{this[_0x19a593(0x1e8)]=new AbortController();let _0x4086d5={'Accept':'text/event-stream'};if(this[_0x19a593(0x208)])_0x4086d5[_0x19a593(0x228)]='Bearer\x20'+this['token'];let _0xad7953=await fetch(_0x15a6cc,{'headers':_0x4086d5,'signal':this[_0x19a593(0x1e8)][_0x19a593(0x216)]});if(!_0xad7953['ok']||!_0xad7953[_0x19a593(0x1ec)]){this[_0x19a593(0x1fd)](_0x19a593(0x235)+_0xad7953[_0x19a593(0x219)]),await this['sleep'](_0xda7a69),_0xda7a69=Math[_0x19a593(0x21b)](_0xda7a69*1.5,0xea60);continue;}_0xda7a69=this[_0x19a593(0x221)];let _0x383c47=_0xad7953[_0x19a593(0x1ec)][_0x19a593(0x1ef)](),_0x153e95=new TextDecoder(),_0x4fa465='';while(this[_0x19a593(0x21c)]){let {done:_0x274087,value:_0x4b4d43}=await _0x383c47[_0x19a593(0x1f6)]();if(_0x274087)break;_0x4fa465+=_0x153e95[_0x19a593(0x22e)](_0x4b4d43,{'stream':!0x0});let _0x4e34a6=_0x4fa465['split']('\x0a');_0x4fa465=_0x4e34a6['pop']()||'';for(let _0x2b1af7 of _0x4e34a6){if(!_0x2b1af7[_0x19a593(0x223)](_0x19a593(0x231)))continue;try{let _0x2b6f9a=JSON[_0x19a593(0x21f)](_0x2b1af7[_0x19a593(0x1f5)](0x6));if(_0x2b6f9a[_0x19a593(0x1f1)]==='connected'){this[_0x19a593(0x1fd)](_0x19a593(0x1f9)),this[_0x19a593(0x229)](_0x19a593(0x227));continue;}if(_0x2b6f9a[_0x19a593(0x1f1)]===_0x19a593(0x203)||_0x2b6f9a[_0x19a593(0x1f1)]===_0x19a593(0x207)||_0x2b6f9a[_0x19a593(0x1f1)]===_0x19a593(0x23e))await this[_0x19a593(0x22b)]();}catch{}}}}catch(_0x3a1294){if(_0x3a1294[_0x19a593(0x220)]===_0x19a593(0x20f))break;this[_0x19a593(0x229)](_0x19a593(0x225),_0x3a1294),this[_0x19a593(0x1fd)]('SSE\x20error:\x20'+_0x3a1294[_0x19a593(0x22f)]);}if(this[_0x19a593(0x21c)])this[_0x19a593(0x229)](_0x19a593(0x244)),this['log'](_0x19a593(0x214)+_0xda7a69/0x3e8+_0x19a593(0x239)),await this['sleep'](_0xda7a69),_0xda7a69=Math[_0x19a593(0x21b)](_0xda7a69*1.5,0xea60);}}async[a0_0x1bb943(0x22b)](){const _0x466762=a0_0x1bb943;try{let _0xec63c=(await this['call'](_0x466762(0x22d),{'alias':this[_0x466762(0x234)],'limit':0xa}))?.[_0x466762(0x245)]||[];for(let _0x5b8a90 of _0xec63c)await this['call'](_0x466762(0x1f8),{'alias':this[_0x466762(0x234)],'message_id':_0x5b8a90['id']}),this[_0x466762(0x1fd)]('←\x20'+_0x5b8a90[_0x466762(0x1e6)]+':\x20'+_0x5b8a90[_0x466762(0x202)]['slice'](0x0,0x3c)),this[_0x466762(0x229)](_0x466762(0x237),_0x5b8a90),this[_0x466762(0x229)](_0x466762(0x22f),_0x5b8a90);}catch(_0x2321f8){this[_0x466762(0x1fd)]('inbox\x20error:\x20'+_0x2321f8['message']);}}[a0_0x1bb943(0x232)](_0x5ac52e){return new Promise(_0x41c001=>setTimeout(_0x41c001,_0x5ac52e));}}var $=T;export{$ as default,T as CommHub};
1
+ const a0_0xabe5fa=a0_0x488d;(function(_0x31e846,_0x222515){const _0x175214=a0_0x488d,_0x1967a4=_0x31e846();while(!![]){try{const _0x98b6e7=-parseInt(_0x175214(0xa6))/0x1*(-parseInt(_0x175214(0xa2))/0x2)+-parseInt(_0x175214(0x8d))/0x3*(-parseInt(_0x175214(0x7d))/0x4)+-parseInt(_0x175214(0xa9))/0x5+parseInt(_0x175214(0xb6))/0x6+parseInt(_0x175214(0xcf))/0x7*(-parseInt(_0x175214(0xb7))/0x8)+-parseInt(_0x175214(0xce))/0x9*(-parseInt(_0x175214(0x78))/0xa)+parseInt(_0x175214(0x88))/0xb*(-parseInt(_0x175214(0x7b))/0xc);if(_0x98b6e7===_0x222515)break;else _0x1967a4['push'](_0x1967a4['shift']());}catch(_0x1caa2e){_0x1967a4['push'](_0x1967a4['shift']());}}}(a0_0x1290,0x59f6d));import{EventEmitter as a0_0x539576}from'events';function a0_0x488d(_0x4a470f,_0x4a68b2){_0x4a470f=_0x4a470f-0x78;const _0x1290f6=a0_0x1290();let _0x488d8=_0x1290f6[_0x4a470f];return _0x488d8;}import{hostname as a0_0x394ad7}from'os';class T extends a0_0x539576{['url'];[a0_0xabe5fa(0xb2)];[a0_0xabe5fa(0xbf)];[a0_0xabe5fa(0x9f)];['resumeId'];[a0_0xabe5fa(0x8b)];[a0_0xabe5fa(0x9b)];['heartbeatTimer'];[a0_0xabe5fa(0xb5)];['running']=!0x1;constructor(_0x4d5613){const _0x577477=a0_0xabe5fa;super();if(this[_0x577477(0x8e)]=_0x4d5613[_0x577477(0x8e)][_0x577477(0x9a)](/\/$/,''),this['alias']=_0x4d5613[_0x577477(0xb2)],this[_0x577477(0xbf)]=_0x4d5613[_0x577477(0xbf)],this[_0x577477(0x9f)]=_0x4d5613['agent']||'sdk',this[_0x577477(0xae)]=_0x577477(0xc2)+_0x4d5613[_0x577477(0xb2)]+'-'+Date[_0x577477(0xbb)]()[_0x577477(0xa0)](0x24),this[_0x577477(0x8b)]=_0x4d5613[_0x577477(0x8b)]??0x2bf20,this[_0x577477(0x9b)]=_0x4d5613[_0x577477(0x9b)]??0xbb8,_0x4d5613['autoConnect']!==!0x1)this['connect']();}[a0_0xabe5fa(0x99)](_0x23c816){const _0xb18d1e=a0_0xabe5fa;console['log']('['+new Date()[_0xb18d1e(0xa5)]()[_0xb18d1e(0xc9)](0x0,0x8)+_0xb18d1e(0x7a)+this['alias']+']\x20'+_0x23c816);}async['call'](_0x4f4d7b,_0x182fa3){const _0x282218=a0_0xabe5fa;let _0x2de449={'Content-Type':_0x282218(0x97),'Accept':_0x282218(0xa1)};if(this[_0x282218(0xbf)])_0x2de449[_0x282218(0x8f)]='Bearer\x20'+this['token'];let _0x30087f=await(await fetch(this[_0x282218(0x8e)]+_0x282218(0x86),{'method':_0x282218(0xa3),'headers':_0x2de449,'body':JSON[_0x282218(0xc0)]({'jsonrpc':_0x282218(0xc1),'id':Date[_0x282218(0xbb)](),'method':_0x282218(0xb9),'params':{'name':_0x4f4d7b,'arguments':_0x182fa3}})}))[_0x282218(0xad)](),_0x26ce7c=_0x30087f['match'](/data: (.+)/),_0xd1ef47=_0x26ce7c?JSON[_0x282218(0xcd)](_0x26ce7c[0x1]):JSON[_0x282218(0xcd)](_0x30087f),_0x11f951=_0xd1ef47?.[_0x282218(0xab)]?.[_0x282218(0xbd)]?.[0x0]?.['text'];return _0x11f951?JSON[_0x282218(0xcd)](_0x11f951):_0xd1ef47;}async[a0_0xabe5fa(0xb3)](){const _0x31d312=a0_0xabe5fa;if(this[_0x31d312(0x91)])return;this['running']=!0x0,await this[_0x31d312(0xc8)](_0x31d312(0x79)),this[_0x31d312(0x99)](_0x31d312(0xb8)),this['heartbeatTimer']=setInterval(()=>{const _0x331cdb=_0x31d312;this[_0x331cdb(0xc8)](_0x331cdb(0x79))[_0x331cdb(0xc4)](_0x2b2f1b=>this[_0x331cdb(0x99)]('heartbeat\x20failed:\x20'+_0x2b2f1b[_0x331cdb(0xa7)]));},this['heartbeatInterval']),this[_0x31d312(0x90)]();}async[a0_0xabe5fa(0x94)](){const _0x23d47b=a0_0xabe5fa;if(this['running']=!0x1,this[_0x23d47b(0xb5)]?.[_0x23d47b(0xa4)](),this[_0x23d47b(0x84)])clearInterval(this[_0x23d47b(0x84)]);await this[_0x23d47b(0xc8)](_0x23d47b(0xac))[_0x23d47b(0xc4)](()=>{}),this[_0x23d47b(0x99)]('disconnected');}async['send'](_0xcbbf04,_0x32ea89,_0x371feb=a0_0xabe5fa(0xc7)){const _0x6b0db1=a0_0xabe5fa;return this[_0x6b0db1(0xb0)](_0x6b0db1(0x96),{'alias':_0xcbbf04,'task':_0x32ea89,'priority':_0x371feb,'from_session':this[_0x6b0db1(0xb2)]});}async[a0_0xabe5fa(0xa7)](_0x1beb3c,_0x29110d){const _0x505808=a0_0xabe5fa;return this['call']('send_message',{'alias':_0x1beb3c,'message':_0x29110d,'from_session':this[_0x505808(0xb2)]});}async[a0_0xabe5fa(0x89)](_0x243768,_0x5cedb4,_0x24e5da='completed'){const _0x4011b9=a0_0xabe5fa;return this[_0x4011b9(0xb0)](_0x4011b9(0xb4),{'in_reply_to':_0x243768,'text':_0x5cedb4,'status':_0x24e5da});}async[a0_0xabe5fa(0xc8)](_0xc4483a,_0x126e7e){const _0x74046f=a0_0xabe5fa;return this['call']('report_status',{'resume_id':this[_0x74046f(0xae)],'alias':this[_0x74046f(0xb2)],'status':_0xc4483a,'server':a0_0x394ad7(),'hostname':a0_0x394ad7(),'agent':this[_0x74046f(0x9f)],'project_dir':process[_0x74046f(0x8c)](),..._0x126e7e});}async[a0_0xabe5fa(0x81)](){const _0x3b48c3=a0_0xabe5fa;return this[_0x3b48c3(0xb0)]('get_all_status',{});}async[a0_0xabe5fa(0xa8)](_0x2ed927,_0x1e4d53){const _0x226893=a0_0xabe5fa;return this[_0x226893(0xb0)](_0x226893(0xa8),{'message':_0x2ed927,'filter_server':_0x1e4d53?.[_0x226893(0xaf)],'filter_status':_0x1e4d53?.[_0x226893(0xc8)]});}async['connectSSE'](){const _0x5cea1f=a0_0xabe5fa;let _0xd04e5=encodeURIComponent(this[_0x5cea1f(0xb2)]),_0x2ffd1c=this['url']+_0x5cea1f(0xcb)+_0xd04e5,_0x164717=this[_0x5cea1f(0x9b)];while(this[_0x5cea1f(0x91)]){try{this[_0x5cea1f(0xb5)]=new AbortController();let _0x399b0b={'Accept':'text/event-stream'};if(this[_0x5cea1f(0xbf)])_0x399b0b[_0x5cea1f(0x8f)]=_0x5cea1f(0xbc)+this['token'];let _0x5d1e9f=await fetch(_0x2ffd1c,{'headers':_0x399b0b,'signal':this[_0x5cea1f(0xb5)][_0x5cea1f(0x7e)]});if(!_0x5d1e9f['ok']||!_0x5d1e9f[_0x5cea1f(0x82)]){this[_0x5cea1f(0x99)](_0x5cea1f(0x83)+_0x5d1e9f[_0x5cea1f(0xc8)]),await this['sleep'](_0x164717),_0x164717=Math[_0x5cea1f(0x80)](_0x164717*1.5,0xea60);continue;}_0x164717=this[_0x5cea1f(0x9b)];let _0x39ba1a=_0x5d1e9f[_0x5cea1f(0x82)][_0x5cea1f(0x98)](),_0x10655b=new TextDecoder(),_0x104c45='';while(this[_0x5cea1f(0x91)]){let {done:_0x102c94,value:_0x34d5f4}=await _0x39ba1a[_0x5cea1f(0xcc)]();if(_0x102c94)break;_0x104c45+=_0x10655b[_0x5cea1f(0x92)](_0x34d5f4,{'stream':!0x0});let _0x32474c=_0x104c45[_0x5cea1f(0x7f)]('\x0a');_0x104c45=_0x32474c[_0x5cea1f(0x9e)]()||'';for(let _0x3152ad of _0x32474c){if(!_0x3152ad[_0x5cea1f(0xba)]('data:\x20'))continue;try{let _0x4815a2=JSON[_0x5cea1f(0xcd)](_0x3152ad[_0x5cea1f(0xc9)](0x6));if(_0x4815a2[_0x5cea1f(0x95)]===_0x5cea1f(0x87)){this[_0x5cea1f(0x99)](_0x5cea1f(0x93)),this[_0x5cea1f(0x9c)](_0x5cea1f(0x87));continue;}if(_0x4815a2[_0x5cea1f(0x95)]==='new_task'||_0x4815a2[_0x5cea1f(0x95)]===_0x5cea1f(0xca)||_0x4815a2['type']===_0x5cea1f(0xa8))await this[_0x5cea1f(0x7c)]();}catch{}}}}catch(_0xeda958){if(_0xeda958['name']==='AbortError')break;this[_0x5cea1f(0x9c)](_0x5cea1f(0x85),_0xeda958),this[_0x5cea1f(0x99)](_0x5cea1f(0x8a)+_0xeda958[_0x5cea1f(0xa7)]);}if(this[_0x5cea1f(0x91)])this[_0x5cea1f(0x9c)]('disconnected'),this[_0x5cea1f(0x99)]('SSE\x20reconnecting\x20in\x20'+_0x164717/0x3e8+_0x5cea1f(0xb1)),await this[_0x5cea1f(0xc6)](_0x164717),_0x164717=Math[_0x5cea1f(0x80)](_0x164717*1.5,0xea60);}}async[a0_0xabe5fa(0x7c)](){const _0x2cf4ba=a0_0xabe5fa;try{let _0x1fdf6a=(await this['call'](_0x2cf4ba(0x9d),{'alias':this[_0x2cf4ba(0xb2)],'limit':0xa}))?.[_0x2cf4ba(0xaa)]||[];for(let _0x171ffe of _0x1fdf6a)await this['call'](_0x2cf4ba(0xc5),{'alias':this[_0x2cf4ba(0xb2)],'message_id':_0x171ffe['id']}),this[_0x2cf4ba(0x99)]('←\x20'+_0x171ffe[_0x2cf4ba(0xc3)]+':\x20'+_0x171ffe[_0x2cf4ba(0xbd)]['slice'](0x0,0x3c)),this[_0x2cf4ba(0x9c)](_0x2cf4ba(0xbe),_0x171ffe),this['emit'](_0x2cf4ba(0xa7),_0x171ffe);}catch(_0x119411){this['log']('inbox\x20error:\x20'+_0x119411[_0x2cf4ba(0xa7)]);}}[a0_0xabe5fa(0xc6)](_0x49f5f4){return new Promise(_0x280c68=>setTimeout(_0x280c68,_0x49f5f4));}}var $=T;function a0_0x1290(){const _0x5b48b2=['running','decode','SSE\x20connected','disconnect','type','send_task','application/json','getReader','log','replace','reconnectDelay','emit','get_inbox','pop','agent','toString','application/json,\x20text/event-stream','1846eddNFT','POST','abort','toTimeString','362SCwjuB','message','broadcast','1330825Xsjlgl','messages','result','offline','text','resumeId','server','call','s...','alias','connect','send_reply','sseAbort','3498084KcTNcN','2682128NKgdIG','registered','tools/call','startsWith','now','Bearer\x20','content','task','token','stringify','2.0','sdk-','from_session','catch','ack_inbox','sleep','normal','status','slice','new_message','/events/','read','parse','10503JbvgtN','7MHDLBE','30CbvovA','idle',']\x20[commhub:','137532PzBAaT','processInbox','452qPXuVf','signal','split','min','getAllStatus','body','SSE\x20failed:\x20','heartbeatTimer','error','/mcp','connected','385BBuGDz','reply','SSE\x20error:\x20','heartbeatInterval','cwd','11958uoMnzl','url','Authorization','connectSSE'];a0_0x1290=function(){return _0x5b48b2;};return a0_0x1290();}export{$ as default,T as CommHub};