@sleep2agi/agent-network 2.3.0-preview.34 → 2.3.0-preview.35

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_0x9418(){const _0x454798=['sdk-','completed','ack_inbox','processInbox','connect','heartbeatInterval','reconnectDelay','split','token','1102851pkALrK','/mcp','log','send_task','offline','agent','startsWith','call','Bearer\x20','sleep','heartbeat\x20failed:\x20','18GUttkd','POST','send_reply','sseAbort','parse','catch','send','messages','reply','url','tools/call','application/json,\x20text/event-stream','abort','slice','type','task','connected','error','read','getReader','Authorization','resumeId','SSE\x20connected','disconnected','809568YMGlFg','send_message','disconnect','1366000cyTevn','status','emit','2.0',']\x20[commhub:','getAllStatus','content','message','connectSSE','heartbeatTimer','now','5KuWHWF','184404Gpvqqb','body','5157060mOPyCN','application/json','/events/','inbox\x20error:\x20','849175IXKUxY','get_all_status','server','5056992FStvGn','broadcast','running','s...','SSE\x20failed:\x20','text/event-stream','name','SSE\x20error:\x20','alias','idle','35fvCLtW'];a0_0x9418=function(){return _0x454798;};return a0_0x9418();}const a0_0x5a1909=a0_0x4e34;(function(_0x2865f9,_0x3761fc){const _0x5ebf3d=a0_0x4e34,_0x15d8d9=_0x2865f9();while(!![]){try{const _0x3d8dfe=parseInt(_0x5ebf3d(0x106))/0x1*(-parseInt(_0x5ebf3d(0x107))/0x2)+parseInt(_0x5ebf3d(0xd5))/0x3+parseInt(_0x5ebf3d(0xfb))/0x4+-parseInt(_0x5ebf3d(0xbe))/0x5*(parseInt(_0x5ebf3d(0xe0))/0x6)+-parseInt(_0x5ebf3d(0xcb))/0x7*(-parseInt(_0x5ebf3d(0xf8))/0x8)+parseInt(_0x5ebf3d(0xc1))/0x9+-parseInt(_0x5ebf3d(0x109))/0xa;if(_0x3d8dfe===_0x3761fc)break;else _0x15d8d9['push'](_0x15d8d9['shift']());}catch(_0x3b4465){_0x15d8d9['push'](_0x15d8d9['shift']());}}}(a0_0x9418,0x46fcc));function a0_0x4e34(_0x3b0a03,_0x34118d){_0x3b0a03=_0x3b0a03-0xbb;const _0x94180e=a0_0x9418();let _0x4e3437=_0x94180e[_0x3b0a03];return _0x4e3437;}import{EventEmitter as a0_0x536da2}from'events';import{hostname as a0_0x1ffcb0}from'os';class T extends a0_0x536da2{['url'];[a0_0x5a1909(0xc9)];[a0_0x5a1909(0xd4)];[a0_0x5a1909(0xda)];[a0_0x5a1909(0xf5)];[a0_0x5a1909(0xd1)];[a0_0x5a1909(0xd2)];['heartbeatTimer'];[a0_0x5a1909(0xe3)];[a0_0x5a1909(0xc3)]=!0x1;constructor(_0x36c4fe){const _0x1bfaff=a0_0x5a1909;super();if(this['url']=_0x36c4fe[_0x1bfaff(0xe9)]['replace'](/\/$/,''),this[_0x1bfaff(0xc9)]=_0x36c4fe[_0x1bfaff(0xc9)],this[_0x1bfaff(0xd4)]=_0x36c4fe['token'],this[_0x1bfaff(0xda)]=_0x36c4fe[_0x1bfaff(0xda)]||'sdk',this[_0x1bfaff(0xf5)]=_0x1bfaff(0xcc)+_0x36c4fe[_0x1bfaff(0xc9)]+'-'+Date[_0x1bfaff(0x105)]()['toString'](0x24),this[_0x1bfaff(0xd1)]=_0x36c4fe['heartbeatInterval']??0x2bf20,this[_0x1bfaff(0xd2)]=_0x36c4fe[_0x1bfaff(0xd2)]??0xbb8,_0x36c4fe['autoConnect']!==!0x1)this[_0x1bfaff(0xd0)]();}[a0_0x5a1909(0xd7)](_0xac0e7e){const _0x1e7171=a0_0x5a1909;console['log']('['+new Date()['toTimeString']()[_0x1e7171(0xed)](0x0,0x8)+_0x1e7171(0xff)+this[_0x1e7171(0xc9)]+']\x20'+_0xac0e7e);}async[a0_0x5a1909(0xdc)](_0x94ed95,_0x215f21){const _0x5dfb3f=a0_0x5a1909;let _0x3d96f9={'Content-Type':_0x5dfb3f(0xbb),'Accept':_0x5dfb3f(0xeb)};if(this[_0x5dfb3f(0xd4)])_0x3d96f9[_0x5dfb3f(0xf4)]=_0x5dfb3f(0xdd)+this[_0x5dfb3f(0xd4)];let _0x4f4ade=await(await fetch(this[_0x5dfb3f(0xe9)]+_0x5dfb3f(0xd6),{'method':_0x5dfb3f(0xe1),'headers':_0x3d96f9,'body':JSON['stringify']({'jsonrpc':_0x5dfb3f(0xfe),'id':Date['now'](),'method':_0x5dfb3f(0xea),'params':{'name':_0x94ed95,'arguments':_0x215f21}})}))['text'](),_0x57a7a1=_0x4f4ade['match'](/data: (.+)/),_0x284fcf=_0x57a7a1?JSON[_0x5dfb3f(0xe4)](_0x57a7a1[0x1]):JSON[_0x5dfb3f(0xe4)](_0x4f4ade),_0x5b6cc3=_0x284fcf?.['result']?.[_0x5dfb3f(0x101)]?.[0x0]?.['text'];return _0x5b6cc3?JSON[_0x5dfb3f(0xe4)](_0x5b6cc3):_0x284fcf;}async[a0_0x5a1909(0xd0)](){const _0x5d92e4=a0_0x5a1909;if(this['running'])return;this['running']=!0x0,await this[_0x5d92e4(0xfc)](_0x5d92e4(0xca)),this['log']('registered'),this[_0x5d92e4(0x104)]=setInterval(()=>{const _0x13bb35=_0x5d92e4;this[_0x13bb35(0xfc)]('idle')['catch'](_0x43940e=>this[_0x13bb35(0xd7)](_0x13bb35(0xdf)+_0x43940e[_0x13bb35(0x102)]));},this[_0x5d92e4(0xd1)]),this['connectSSE']();}async[a0_0x5a1909(0xfa)](){const _0x5e789a=a0_0x5a1909;if(this[_0x5e789a(0xc3)]=!0x1,this[_0x5e789a(0xe3)]?.[_0x5e789a(0xec)](),this['heartbeatTimer'])clearInterval(this[_0x5e789a(0x104)]);await this[_0x5e789a(0xfc)](_0x5e789a(0xd9))[_0x5e789a(0xe5)](()=>{}),this[_0x5e789a(0xd7)](_0x5e789a(0xf7));}async[a0_0x5a1909(0xe6)](_0x11c606,_0x2ba2d3,_0x2b6299='normal'){const _0x573381=a0_0x5a1909;return this[_0x573381(0xdc)](_0x573381(0xd8),{'alias':_0x11c606,'task':_0x2ba2d3,'priority':_0x2b6299,'from_session':this[_0x573381(0xc9)]});}async['message'](_0x4d2249,_0x5c2fc4){const _0xfaf92f=a0_0x5a1909;return this[_0xfaf92f(0xdc)](_0xfaf92f(0xf9),{'alias':_0x4d2249,'message':_0x5c2fc4,'from_session':this[_0xfaf92f(0xc9)]});}async[a0_0x5a1909(0xe8)](_0x1e4478,_0x3c89bf,_0x403566=a0_0x5a1909(0xcd)){const _0x361e4f=a0_0x5a1909;return this[_0x361e4f(0xdc)](_0x361e4f(0xe2),{'in_reply_to':_0x1e4478,'text':_0x3c89bf,'status':_0x403566});}async[a0_0x5a1909(0xfc)](_0x3bcca2,_0xd343fa){const _0x59c013=a0_0x5a1909;return this[_0x59c013(0xdc)]('report_status',{'resume_id':this[_0x59c013(0xf5)],'alias':this[_0x59c013(0xc9)],'status':_0x3bcca2,'server':a0_0x1ffcb0(),'hostname':a0_0x1ffcb0(),'agent':this[_0x59c013(0xda)],'project_dir':process['cwd'](),..._0xd343fa});}async[a0_0x5a1909(0x100)](){const _0x1ea804=a0_0x5a1909;return this[_0x1ea804(0xdc)](_0x1ea804(0xbf),{});}async['broadcast'](_0x1b15e3,_0x13f9e1){const _0x376bad=a0_0x5a1909;return this[_0x376bad(0xdc)](_0x376bad(0xc2),{'message':_0x1b15e3,'filter_server':_0x13f9e1?.[_0x376bad(0xc0)],'filter_status':_0x13f9e1?.[_0x376bad(0xfc)]});}async[a0_0x5a1909(0x103)](){const _0x30be42=a0_0x5a1909;let _0xd3dc6d=encodeURIComponent(this['alias']),_0x1634ca=this[_0x30be42(0xe9)]+_0x30be42(0xbc)+_0xd3dc6d,_0x10ce93=this['reconnectDelay'];while(this[_0x30be42(0xc3)]){try{this[_0x30be42(0xe3)]=new AbortController();let _0x27184b={'Accept':_0x30be42(0xc6)};if(this[_0x30be42(0xd4)])_0x27184b[_0x30be42(0xf4)]='Bearer\x20'+this[_0x30be42(0xd4)];let _0x66c85b=await fetch(_0x1634ca,{'headers':_0x27184b,'signal':this[_0x30be42(0xe3)]['signal']});if(!_0x66c85b['ok']||!_0x66c85b[_0x30be42(0x108)]){this[_0x30be42(0xd7)](_0x30be42(0xc5)+_0x66c85b[_0x30be42(0xfc)]),await this[_0x30be42(0xde)](_0x10ce93),_0x10ce93=Math['min'](_0x10ce93*1.5,0xea60);continue;}_0x10ce93=this['reconnectDelay'];let _0x2a9a54=_0x66c85b['body'][_0x30be42(0xf3)](),_0x362655=new TextDecoder(),_0xb7259e='';while(this['running']){let {done:_0x589725,value:_0x4dc8ba}=await _0x2a9a54[_0x30be42(0xf2)]();if(_0x589725)break;_0xb7259e+=_0x362655['decode'](_0x4dc8ba,{'stream':!0x0});let _0x2105a0=_0xb7259e[_0x30be42(0xd3)]('\x0a');_0xb7259e=_0x2105a0['pop']()||'';for(let _0x30924a of _0x2105a0){if(!_0x30924a[_0x30be42(0xdb)]('data:\x20'))continue;try{let _0x5ef844=JSON[_0x30be42(0xe4)](_0x30924a[_0x30be42(0xed)](0x6));if(_0x5ef844[_0x30be42(0xee)]===_0x30be42(0xf0)){this['log'](_0x30be42(0xf6)),this['emit'](_0x30be42(0xf0));continue;}if(_0x5ef844['type']==='new_task'||_0x5ef844[_0x30be42(0xee)]==='new_message'||_0x5ef844[_0x30be42(0xee)]===_0x30be42(0xc2))await this[_0x30be42(0xcf)]();}catch{}}}}catch(_0x574727){if(_0x574727[_0x30be42(0xc7)]==='AbortError')break;this[_0x30be42(0xfd)](_0x30be42(0xf1),_0x574727),this['log'](_0x30be42(0xc8)+_0x574727[_0x30be42(0x102)]);}if(this['running'])this[_0x30be42(0xfd)]('disconnected'),this[_0x30be42(0xd7)]('SSE\x20reconnecting\x20in\x20'+_0x10ce93/0x3e8+_0x30be42(0xc4)),await this['sleep'](_0x10ce93),_0x10ce93=Math['min'](_0x10ce93*1.5,0xea60);}}async[a0_0x5a1909(0xcf)](){const _0x8c91ed=a0_0x5a1909;try{let _0x46203c=(await this['call']('get_inbox',{'alias':this[_0x8c91ed(0xc9)],'limit':0xa}))?.[_0x8c91ed(0xe7)]||[];for(let _0x3c15ce of _0x46203c)await this[_0x8c91ed(0xdc)](_0x8c91ed(0xce),{'alias':this['alias'],'message_id':_0x3c15ce['id']}),this[_0x8c91ed(0xd7)]('←\x20'+_0x3c15ce['from_session']+':\x20'+_0x3c15ce[_0x8c91ed(0x101)]['slice'](0x0,0x3c)),this[_0x8c91ed(0xfd)](_0x8c91ed(0xef),_0x3c15ce),this[_0x8c91ed(0xfd)](_0x8c91ed(0x102),_0x3c15ce);}catch(_0x167d4f){this[_0x8c91ed(0xd7)](_0x8c91ed(0xbd)+_0x167d4f[_0x8c91ed(0x102)]);}}[a0_0x5a1909(0xde)](_0x28f9a4){return new Promise(_0x1df5c7=>setTimeout(_0x1df5c7,_0x28f9a4));}}var $=T;export{$ as default,T as CommHub};
1
+ const a0_0x4813e6=a0_0x55db;(function(_0x11f243,_0x2ad3fb){const _0x1b0148=a0_0x55db,_0x149257=_0x11f243();while(!![]){try{const _0x2c092c=-parseInt(_0x1b0148(0x1a8))/0x1+-parseInt(_0x1b0148(0x198))/0x2*(-parseInt(_0x1b0148(0x1b5))/0x3)+-parseInt(_0x1b0148(0x185))/0x4*(-parseInt(_0x1b0148(0x1bb))/0x5)+parseInt(_0x1b0148(0x18e))/0x6*(-parseInt(_0x1b0148(0x166))/0x7)+-parseInt(_0x1b0148(0x197))/0x8*(-parseInt(_0x1b0148(0x172))/0x9)+parseInt(_0x1b0148(0x180))/0xa+parseInt(_0x1b0148(0x1b4))/0xb*(-parseInt(_0x1b0148(0x1a6))/0xc);if(_0x2c092c===_0x2ad3fb)break;else _0x149257['push'](_0x149257['shift']());}catch(_0x1328a1){_0x149257['push'](_0x149257['shift']());}}}(a0_0x38dc,0xb4e79));import{EventEmitter as a0_0x50f097}from'events';function a0_0x55db(_0x5ce4ad,_0x527a66){_0x5ce4ad=_0x5ce4ad-0x166;const _0x38dcef=a0_0x38dc();let _0x55db6c=_0x38dcef[_0x5ce4ad];return _0x55db6c;}import{hostname as a0_0x42e141}from'os';class T extends a0_0x50f097{[a0_0x4813e6(0x1ac)];[a0_0x4813e6(0x199)];[a0_0x4813e6(0x1aa)];[a0_0x4813e6(0x168)];[a0_0x4813e6(0x16f)];[a0_0x4813e6(0x179)];[a0_0x4813e6(0x1a1)];[a0_0x4813e6(0x16e)];[a0_0x4813e6(0x1b9)];[a0_0x4813e6(0x196)]=!0x1;constructor(_0x3dd536){const _0x593924=a0_0x4813e6;super();if(this[_0x593924(0x1ac)]=_0x3dd536[_0x593924(0x1ac)][_0x593924(0x186)](/\/$/,''),this[_0x593924(0x199)]=_0x3dd536[_0x593924(0x199)],this[_0x593924(0x1aa)]=_0x3dd536[_0x593924(0x1aa)],this[_0x593924(0x168)]=_0x3dd536[_0x593924(0x168)]||_0x593924(0x16a),this['resumeId']=_0x593924(0x16b)+_0x3dd536[_0x593924(0x199)]+'-'+Date[_0x593924(0x18a)]()['toString'](0x24),this[_0x593924(0x179)]=_0x3dd536['heartbeatInterval']??0x2bf20,this[_0x593924(0x1a1)]=_0x3dd536['reconnectDelay']??0xbb8,_0x3dd536[_0x593924(0x1bd)]!==!0x1)this[_0x593924(0x1be)]();}[a0_0x4813e6(0x19e)](_0x5bd9c3){const _0x16cb50=a0_0x4813e6;console[_0x16cb50(0x19e)]('['+new Date()[_0x16cb50(0x1a7)]()[_0x16cb50(0x171)](0x0,0x8)+_0x16cb50(0x17c)+this[_0x16cb50(0x199)]+']\x20'+_0x5bd9c3);}async[a0_0x4813e6(0x18b)](_0x344c4a,_0x139960){const _0x300917=a0_0x4813e6;let _0x22a8b9={'Content-Type':_0x300917(0x17a),'Accept':_0x300917(0x175)};if(this['token'])_0x22a8b9[_0x300917(0x1a5)]='Bearer\x20'+this[_0x300917(0x1aa)];let _0x269648=await(await fetch(this[_0x300917(0x1ac)]+'/mcp',{'method':_0x300917(0x19b),'headers':_0x22a8b9,'body':JSON['stringify']({'jsonrpc':_0x300917(0x195),'id':Date[_0x300917(0x18a)](),'method':_0x300917(0x1ba),'params':{'name':_0x344c4a,'arguments':_0x139960}})}))[_0x300917(0x1a0)](),_0x51ac78=_0x269648['match'](/data: (.+)/),_0x4e8d70=_0x51ac78?JSON[_0x300917(0x16c)](_0x51ac78[0x1]):JSON[_0x300917(0x16c)](_0x269648),_0x32c39f=_0x4e8d70?.[_0x300917(0x183)]?.[_0x300917(0x1b7)]?.[0x0]?.['text'];return _0x32c39f?JSON[_0x300917(0x16c)](_0x32c39f):_0x4e8d70;}async[a0_0x4813e6(0x1be)](){const _0x107f4e=a0_0x4813e6;if(this[_0x107f4e(0x196)])return;this[_0x107f4e(0x196)]=!0x0,await this[_0x107f4e(0x17d)](_0x107f4e(0x193)),this['log'](_0x107f4e(0x19d)),this[_0x107f4e(0x16e)]=setInterval(()=>{const _0x9dd776=_0x107f4e;this[_0x9dd776(0x17d)]('idle')[_0x9dd776(0x1ae)](_0x33ff0d=>this[_0x9dd776(0x19e)](_0x9dd776(0x19a)+_0x33ff0d['message']));},this[_0x107f4e(0x179)]),this['connectSSE']();}async[a0_0x4813e6(0x1af)](){const _0x2ba720=a0_0x4813e6;if(this['running']=!0x1,this[_0x2ba720(0x1b9)]?.[_0x2ba720(0x17f)](),this[_0x2ba720(0x16e)])clearInterval(this[_0x2ba720(0x16e)]);await this[_0x2ba720(0x17d)](_0x2ba720(0x174))[_0x2ba720(0x1ae)](()=>{}),this['log'](_0x2ba720(0x1ab));}async[a0_0x4813e6(0x181)](_0x4512e0,_0x3eeabb,_0x59cc4e=a0_0x4813e6(0x167)){const _0x3139c2=a0_0x4813e6;return this[_0x3139c2(0x18b)](_0x3139c2(0x1b1),{'alias':_0x4512e0,'task':_0x3eeabb,'priority':_0x59cc4e,'from_session':this[_0x3139c2(0x199)]});}async[a0_0x4813e6(0x1b0)](_0x5bbb29,_0x3c9638){const _0x2ae2c9=a0_0x4813e6;return this[_0x2ae2c9(0x18b)]('send_message',{'alias':_0x5bbb29,'message':_0x3c9638,'from_session':this['alias']});}async[a0_0x4813e6(0x177)](_0x1ad994,_0x1c68e2,_0x254e6e=a0_0x4813e6(0x188)){const _0xef0205=a0_0x4813e6;return this[_0xef0205(0x18b)]('send_reply',{'in_reply_to':_0x1ad994,'text':_0x1c68e2,'status':_0x254e6e});}async[a0_0x4813e6(0x17d)](_0x362cb6,_0x58be86){const _0x271517=a0_0x4813e6;return this[_0x271517(0x18b)](_0x271517(0x1bc),{'resume_id':this[_0x271517(0x16f)],'alias':this[_0x271517(0x199)],'status':_0x362cb6,'server':a0_0x42e141(),'hostname':a0_0x42e141(),'agent':this[_0x271517(0x168)],'project_dir':process[_0x271517(0x176)](),..._0x58be86});}async['getAllStatus'](){return this['call']('get_all_status',{});}async['broadcast'](_0x24e194,_0x10d463){const _0x55c825=a0_0x4813e6;return this[_0x55c825(0x18b)](_0x55c825(0x187),{'message':_0x24e194,'filter_server':_0x10d463?.[_0x55c825(0x1b2)],'filter_status':_0x10d463?.['status']});}async[a0_0x4813e6(0x1a2)](){const _0x339a47=a0_0x4813e6;let _0x426cc3=encodeURIComponent(this['alias']),_0x191432=this[_0x339a47(0x1ac)]+_0x339a47(0x18c)+_0x426cc3,_0x4142e6=this[_0x339a47(0x1a1)];while(this[_0x339a47(0x196)]){try{this[_0x339a47(0x1b9)]=new AbortController();let _0x28e6f8={'Accept':_0x339a47(0x1b3)};if(this[_0x339a47(0x1aa)])_0x28e6f8[_0x339a47(0x1a5)]=_0x339a47(0x173)+this['token'];let _0x191d7f=await fetch(_0x191432,{'headers':_0x28e6f8,'signal':this[_0x339a47(0x1b9)][_0x339a47(0x169)]});if(!_0x191d7f['ok']||!_0x191d7f[_0x339a47(0x18d)]){this[_0x339a47(0x19e)](_0x339a47(0x192)+_0x191d7f[_0x339a47(0x17d)]),await this[_0x339a47(0x190)](_0x4142e6),_0x4142e6=Math[_0x339a47(0x184)](_0x4142e6*1.5,0xea60);continue;}_0x4142e6=this[_0x339a47(0x1a1)];let _0x2326ee=_0x191d7f[_0x339a47(0x18d)]['getReader'](),_0x3706ab=new TextDecoder(),_0xbf2c31='';while(this[_0x339a47(0x196)]){let {done:_0x21b668,value:_0xabe6bb}=await _0x2326ee[_0x339a47(0x16d)]();if(_0x21b668)break;_0xbf2c31+=_0x3706ab[_0x339a47(0x191)](_0xabe6bb,{'stream':!0x0});let _0x3bd60f=_0xbf2c31[_0x339a47(0x17e)]('\x0a');_0xbf2c31=_0x3bd60f[_0x339a47(0x178)]()||'';for(let _0x75ebc7 of _0x3bd60f){if(!_0x75ebc7[_0x339a47(0x182)](_0x339a47(0x18f)))continue;try{let _0x55fbd6=JSON[_0x339a47(0x16c)](_0x75ebc7[_0x339a47(0x171)](0x6));if(_0x55fbd6[_0x339a47(0x1b6)]===_0x339a47(0x17b)){this[_0x339a47(0x19e)](_0x339a47(0x194)),this[_0x339a47(0x1a9)](_0x339a47(0x17b));continue;}if(_0x55fbd6[_0x339a47(0x1b6)]===_0x339a47(0x19c)||_0x55fbd6[_0x339a47(0x1b6)]===_0x339a47(0x1b8)||_0x55fbd6[_0x339a47(0x1b6)]===_0x339a47(0x187))await this['processInbox']();}catch{}}}}catch(_0x111afa){if(_0x111afa[_0x339a47(0x19f)]===_0x339a47(0x1a4))break;this[_0x339a47(0x1a9)]('error',_0x111afa),this['log']('SSE\x20error:\x20'+_0x111afa[_0x339a47(0x1b0)]);}if(this['running'])this[_0x339a47(0x1a9)](_0x339a47(0x1ab)),this[_0x339a47(0x19e)]('SSE\x20reconnecting\x20in\x20'+_0x4142e6/0x3e8+_0x339a47(0x1ad)),await this[_0x339a47(0x190)](_0x4142e6),_0x4142e6=Math[_0x339a47(0x184)](_0x4142e6*1.5,0xea60);}}async['processInbox'](){const _0x477445=a0_0x4813e6;try{let _0x51a4a6=(await this[_0x477445(0x18b)]('get_inbox',{'alias':this[_0x477445(0x199)],'limit':0xa}))?.['messages']||[];for(let _0x2edada of _0x51a4a6)await this[_0x477445(0x18b)](_0x477445(0x170),{'alias':this['alias'],'message_id':_0x2edada['id']}),this['log']('←\x20'+_0x2edada[_0x477445(0x1a3)]+':\x20'+_0x2edada['content'][_0x477445(0x171)](0x0,0x3c)),this[_0x477445(0x1a9)]('task',_0x2edada),this[_0x477445(0x1a9)](_0x477445(0x1b0),_0x2edada);}catch(_0x3058eb){this['log'](_0x477445(0x189)+_0x3058eb[_0x477445(0x1b0)]);}}[a0_0x4813e6(0x190)](_0x495293){return new Promise(_0x3eb579=>setTimeout(_0x3eb579,_0x495293));}}var $=T;export{$ as default,T as CommHub};function a0_0x38dc(){const _0xac7f80=['113572CPYRxj','replace','broadcast','completed','inbox\x20error:\x20','now','call','/events/','body','252DMEZxA','data:\x20','sleep','decode','SSE\x20failed:\x20','idle','SSE\x20connected','2.0','running','464dQkQIJ','2ohjRwe','alias','heartbeat\x20failed:\x20','POST','new_task','registered','log','name','text','reconnectDelay','connectSSE','from_session','AbortError','Authorization','1752kxYMdU','toTimeString','94409zzGhAi','emit','token','disconnected','url','s...','catch','disconnect','message','send_task','server','text/event-stream','125411hvfIEJ','4239231SvWDsO','type','content','new_message','sseAbort','tools/call','55qUCFYS','report_status','autoConnect','connect','158683LarlfJ','normal','agent','signal','sdk','sdk-','parse','read','heartbeatTimer','resumeId','ack_inbox','slice','195795gJUKpE','Bearer\x20','offline','application/json,\x20text/event-stream','cwd','reply','pop','heartbeatInterval','application/json','connected',']\x20[commhub:','status','split','abort','4648480qtZBQV','send','startsWith','result','min'];a0_0x38dc=function(){return _0xac7f80;};return a0_0x38dc();}