@sleep2agi/agent-network 2.0.0-preview.8 → 2.0.0-preview.9

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_0x1325(){const _0x1a60b8=['completed','resumeId','SSE\x20connected','disconnect','type','inbox\x20error:\x20','normal','match',']\x20[commhub:','heartbeatTimer','from_session','signal','Authorization','result','emit','/events/','POST','url','processInbox','new_message','stringify','text','disconnected','application/json,\x20text/event-stream','SSE\x20reconnecting\x20in\x20','reply','alias','pop','tools/call','content','call','4125530mnRwUV','get_inbox','connect','44IWBMaF','AbortError','text/event-stream','idle','application/json','read','connectSSE','sleep','token','agent','running','report_status','ack_inbox','data:\x20','catch','40xBpTLf','connected','log','11NOlJkG','83319KcqxLD','cwd','1930424ZzJpcT','parse','registered','offline','/mcp','abort','server','70458qfzFUq','autoConnect','decode','1068561CFOTLI','218748FSmpGu','status','getReader','min','send','send_task','error','broadcast','task','get_all_status','heartbeatInterval','818677saDdgw','reconnectDelay','body','SSE\x20error:\x20','message','messages','now','Bearer\x20','266JmlQmH','2.0','sseAbort','slice'];a0_0x1325=function(){return _0x1a60b8;};return a0_0x1325();}const a0_0x595caf=a0_0x5ddf;(function(_0x2db923,_0x3045f8){const _0x13f157=a0_0x5ddf,_0x3d1e5d=_0x2db923();while(!![]){try{const _0x20e1d2=-parseInt(_0x13f157(0x16e))/0x1+parseInt(_0x13f157(0x19c))/0x2*(parseInt(_0x13f157(0x156))/0x3)+parseInt(_0x13f157(0x163))/0x4*(parseInt(_0x13f157(0x152))/0x5)+parseInt(_0x13f157(0x15f))/0x6*(parseInt(_0x13f157(0x176))/0x7)+-parseInt(_0x13f157(0x158))/0x8+-parseInt(_0x13f157(0x162))/0x9+-parseInt(_0x13f157(0x199))/0xa*(-parseInt(_0x13f157(0x155))/0xb);if(_0x20e1d2===_0x3045f8)break;else _0x3d1e5d['push'](_0x3d1e5d['shift']());}catch(_0x2e4c1b){_0x3d1e5d['push'](_0x3d1e5d['shift']());}}}(a0_0x1325,0xb1e04));import{EventEmitter as a0_0x5cf71b}from'events';import{hostname as a0_0xc15a09}from'os';class T extends a0_0x5cf71b{[a0_0x595caf(0x18b)];['alias'];['token'];['agent'];[a0_0x595caf(0x17b)];[a0_0x595caf(0x16d)];[a0_0x595caf(0x16f)];[a0_0x595caf(0x183)];[a0_0x595caf(0x178)];[a0_0x595caf(0x14d)]=!0x1;constructor(_0x45ade1){const _0x1bdb32=a0_0x595caf;super();if(this[_0x1bdb32(0x18b)]=_0x45ade1[_0x1bdb32(0x18b)]['replace'](/\/$/,''),this[_0x1bdb32(0x194)]=_0x45ade1[_0x1bdb32(0x194)],this[_0x1bdb32(0x14b)]=_0x45ade1['token'],this[_0x1bdb32(0x14c)]=_0x45ade1[_0x1bdb32(0x14c)]||'sdk',this[_0x1bdb32(0x17b)]='sdk-'+_0x45ade1[_0x1bdb32(0x194)]+'-'+Date[_0x1bdb32(0x174)]()['toString'](0x24),this[_0x1bdb32(0x16d)]=_0x45ade1['heartbeatInterval']??0x2bf20,this[_0x1bdb32(0x16f)]=_0x45ade1[_0x1bdb32(0x16f)]??0xbb8,_0x45ade1[_0x1bdb32(0x160)]!==!0x1)this['connect']();}[a0_0x595caf(0x154)](_0x15b479){const _0x1b36ff=a0_0x595caf;console[_0x1b36ff(0x154)]('['+new Date()['toTimeString']()[_0x1b36ff(0x179)](0x0,0x8)+_0x1b36ff(0x182)+this[_0x1b36ff(0x194)]+']\x20'+_0x15b479);}async[a0_0x595caf(0x198)](_0x280711,_0x22a635){const _0x484070=a0_0x595caf;let _0x4e8059={'Content-Type':_0x484070(0x1a0),'Accept':_0x484070(0x191)};if(this[_0x484070(0x14b)])_0x4e8059[_0x484070(0x186)]=_0x484070(0x175)+this[_0x484070(0x14b)];let _0x45cded=await(await fetch(this[_0x484070(0x18b)]+_0x484070(0x15c),{'method':_0x484070(0x18a),'headers':_0x4e8059,'body':JSON[_0x484070(0x18e)]({'jsonrpc':_0x484070(0x177),'id':Date[_0x484070(0x174)](),'method':_0x484070(0x196),'params':{'name':_0x280711,'arguments':_0x22a635}})}))[_0x484070(0x18f)](),_0x384642=_0x45cded[_0x484070(0x181)](/data: (.+)/),_0x23f1cf=_0x384642?JSON['parse'](_0x384642[0x1]):JSON['parse'](_0x45cded),_0x4e6d06=_0x23f1cf?.[_0x484070(0x187)]?.[_0x484070(0x197)]?.[0x0]?.[_0x484070(0x18f)];return _0x4e6d06?JSON[_0x484070(0x159)](_0x4e6d06):_0x23f1cf;}async[a0_0x595caf(0x19b)](){const _0x15a34=a0_0x595caf;if(this[_0x15a34(0x14d)])return;this['running']=!0x0,await this[_0x15a34(0x164)](_0x15a34(0x19f)),this['log'](_0x15a34(0x15a)),this[_0x15a34(0x183)]=setInterval(()=>{const _0x20421e=_0x15a34;this[_0x20421e(0x164)](_0x20421e(0x19f))[_0x20421e(0x151)](_0x5d4be0=>this[_0x20421e(0x154)]('heartbeat\x20failed:\x20'+_0x5d4be0[_0x20421e(0x172)]));},this['heartbeatInterval']),this[_0x15a34(0x149)]();}async[a0_0x595caf(0x17d)](){const _0x2e0a23=a0_0x595caf;if(this[_0x2e0a23(0x14d)]=!0x1,this[_0x2e0a23(0x178)]?.[_0x2e0a23(0x15d)](),this['heartbeatTimer'])clearInterval(this[_0x2e0a23(0x183)]);await this['status'](_0x2e0a23(0x15b))[_0x2e0a23(0x151)](()=>{}),this[_0x2e0a23(0x154)](_0x2e0a23(0x190));}async[a0_0x595caf(0x167)](_0x30e150,_0x13412a,_0x52c831=a0_0x595caf(0x180)){const _0x4c33a3=a0_0x595caf;return this['call'](_0x4c33a3(0x168),{'alias':_0x30e150,'task':_0x13412a,'priority':_0x52c831,'from_session':this[_0x4c33a3(0x194)]});}async[a0_0x595caf(0x172)](_0x484d13,_0x102352){const _0x3dcc32=a0_0x595caf;return this[_0x3dcc32(0x198)]('send_message',{'alias':_0x484d13,'message':_0x102352,'from_session':this[_0x3dcc32(0x194)]});}async['reply'](_0x334a6f,_0x2d3159,_0x195589=a0_0x595caf(0x17a)){const _0x3d206f=a0_0x595caf;return this[_0x3d206f(0x198)](_0x3d206f(0x193),{'task_id':_0x334a6f,'text':_0x2d3159,'status':_0x195589});}async[a0_0x595caf(0x164)](_0x21ebd6,_0x5cf39a){const _0x4a1478=a0_0x595caf;return this[_0x4a1478(0x198)](_0x4a1478(0x14e),{'resume_id':this['resumeId'],'alias':this[_0x4a1478(0x194)],'status':_0x21ebd6,'server':a0_0xc15a09(),'hostname':a0_0xc15a09(),'agent':this[_0x4a1478(0x14c)],'project_dir':process[_0x4a1478(0x157)](),..._0x5cf39a});}async['getAllStatus'](){const _0x45d687=a0_0x595caf;return this['call'](_0x45d687(0x16c),{});}async['broadcast'](_0x12404c,_0x143cf3){const _0x29742b=a0_0x595caf;return this[_0x29742b(0x198)](_0x29742b(0x16a),{'message':_0x12404c,'filter_server':_0x143cf3?.[_0x29742b(0x15e)],'filter_status':_0x143cf3?.['status']});}async[a0_0x595caf(0x149)](){const _0x394438=a0_0x595caf;let _0x13d542=encodeURIComponent(this['alias']),_0x980aa8=this[_0x394438(0x18b)]+_0x394438(0x189)+_0x13d542,_0x553865=this[_0x394438(0x16f)];while(this['running']){try{this['sseAbort']=new AbortController();let _0x52fcc6={'Accept':_0x394438(0x19e)};if(this[_0x394438(0x14b)])_0x52fcc6[_0x394438(0x186)]=_0x394438(0x175)+this['token'];let _0x105e98=await fetch(_0x980aa8,{'headers':_0x52fcc6,'signal':this[_0x394438(0x178)][_0x394438(0x185)]});if(!_0x105e98['ok']||!_0x105e98[_0x394438(0x170)]){this[_0x394438(0x154)]('SSE\x20failed:\x20'+_0x105e98[_0x394438(0x164)]),await this[_0x394438(0x14a)](_0x553865),_0x553865=Math['min'](_0x553865*1.5,0xea60);continue;}_0x553865=this['reconnectDelay'];let _0x307ded=_0x105e98[_0x394438(0x170)][_0x394438(0x165)](),_0x5d84de=new TextDecoder(),_0x7d608='';while(this[_0x394438(0x14d)]){let {done:_0x4a64e2,value:_0x245a67}=await _0x307ded[_0x394438(0x148)]();if(_0x4a64e2)break;_0x7d608+=_0x5d84de[_0x394438(0x161)](_0x245a67,{'stream':!0x0});let _0x3c90c0=_0x7d608['split']('\x0a');_0x7d608=_0x3c90c0[_0x394438(0x195)]()||'';for(let _0x480272 of _0x3c90c0){if(!_0x480272['startsWith'](_0x394438(0x150)))continue;try{let _0x2e4a3f=JSON['parse'](_0x480272[_0x394438(0x179)](0x6));if(_0x2e4a3f[_0x394438(0x17e)]==='connected'){this[_0x394438(0x154)](_0x394438(0x17c)),this['emit'](_0x394438(0x153));continue;}if(_0x2e4a3f[_0x394438(0x17e)]==='new_task'||_0x2e4a3f[_0x394438(0x17e)]===_0x394438(0x18d)||_0x2e4a3f[_0x394438(0x17e)]===_0x394438(0x16a))await this[_0x394438(0x18c)]();}catch{}}}}catch(_0x25fc11){if(_0x25fc11['name']===_0x394438(0x19d))break;this[_0x394438(0x188)](_0x394438(0x169),_0x25fc11),this[_0x394438(0x154)](_0x394438(0x171)+_0x25fc11['message']);}if(this['running'])this['emit'](_0x394438(0x190)),this[_0x394438(0x154)](_0x394438(0x192)+_0x553865/0x3e8+'s...'),await this['sleep'](_0x553865),_0x553865=Math[_0x394438(0x166)](_0x553865*1.5,0xea60);}}async[a0_0x595caf(0x18c)](){const _0x17d599=a0_0x595caf;try{let _0x306b8f=(await this['call'](_0x17d599(0x19a),{'alias':this['alias'],'limit':0xa}))?.[_0x17d599(0x173)]||[];for(let _0x22b25a of _0x306b8f)await this[_0x17d599(0x198)](_0x17d599(0x14f),{'alias':this['alias'],'message_id':_0x22b25a['id']}),this[_0x17d599(0x154)]('←\x20'+_0x22b25a[_0x17d599(0x184)]+':\x20'+_0x22b25a[_0x17d599(0x197)][_0x17d599(0x179)](0x0,0x3c)),this[_0x17d599(0x188)](_0x17d599(0x16b),_0x22b25a),this[_0x17d599(0x188)](_0x17d599(0x172),_0x22b25a);}catch(_0x1b6ae7){this['log'](_0x17d599(0x17f)+_0x1b6ae7['message']);}}[a0_0x595caf(0x14a)](_0xad95b5){return new Promise(_0x2b8c22=>setTimeout(_0x2b8c22,_0xad95b5));}}var $=T;function a0_0x5ddf(_0x2a411a,_0x4dc889){_0x2a411a=_0x2a411a-0x148;const _0x1325e6=a0_0x1325();let _0x5ddf6e=_0x1325e6[_0x2a411a];return _0x5ddf6e;}export{$ as default,T as CommHub};
1
+ const a0_0x43a56d=a0_0x1ad7;(function(_0x14ce48,_0x5505c1){const _0x4cf93d=a0_0x1ad7,_0x6c4936=_0x14ce48();while(!![]){try{const _0x536f10=-parseInt(_0x4cf93d(0x181))/0x1*(-parseInt(_0x4cf93d(0x13b))/0x2)+-parseInt(_0x4cf93d(0x143))/0x3+-parseInt(_0x4cf93d(0x163))/0x4+parseInt(_0x4cf93d(0x16c))/0x5+parseInt(_0x4cf93d(0x175))/0x6+-parseInt(_0x4cf93d(0x156))/0x7*(-parseInt(_0x4cf93d(0x166))/0x8)+-parseInt(_0x4cf93d(0x149))/0x9;if(_0x536f10===_0x5505c1)break;else _0x6c4936['push'](_0x6c4936['shift']());}catch(_0xa7b277){_0x6c4936['push'](_0x6c4936['shift']());}}}(a0_0x1e3b,0xe5e52));import{EventEmitter as a0_0x55480e}from'events';function a0_0x1ad7(_0x59f56c,_0x3cf57d){_0x59f56c=_0x59f56c-0x138;const _0x1e3b01=a0_0x1e3b();let _0x1ad791=_0x1e3b01[_0x59f56c];return _0x1ad791;}import{hostname as a0_0x2bd85f}from'os';function a0_0x1e3b(){const _0x1a8867=['3728730QxnHqZ','getReader','emit','cwd','decode','alias','running','sleep','AbortError','10028364VaRtuP','connect','new_task','Authorization','message','offline','new_message','application/json','2.0','replace','body','application/json,\x20text/event-stream','17CAdSPJ','abort','data:\x20','registered','202318dTffTo','toTimeString','name','type','idle','s...','reply','disconnect','3051834UlACDd','sdk-','heartbeatTimer','server','stringify','resumeId','22674258xyeaFs','Bearer\x20','SSE\x20failed:\x20','slice','/events/','text','call','messages','url','heartbeatInterval','processInbox','POST','reconnectDelay','216881OtgHqU','token','parse','agent','match','normal','status','SSE\x20error:\x20','pop','connected','task','catch','now','5202608ZsqvQg','log','sseAbort','424IoWZfM','send_task','connectSSE','tools/call','SSE\x20reconnecting\x20in\x20','SSE\x20connected'];a0_0x1e3b=function(){return _0x1a8867;};return a0_0x1e3b();}class T extends a0_0x55480e{['url'];[a0_0x43a56d(0x171)];['token'];[a0_0x43a56d(0x159)];[a0_0x43a56d(0x148)];['heartbeatInterval'];[a0_0x43a56d(0x155)];[a0_0x43a56d(0x145)];[a0_0x43a56d(0x165)];['running']=!0x1;constructor(_0x1d9604){const _0x37e094=a0_0x43a56d;super();if(this[_0x37e094(0x151)]=_0x1d9604[_0x37e094(0x151)][_0x37e094(0x17e)](/\/$/,''),this['alias']=_0x1d9604['alias'],this[_0x37e094(0x157)]=_0x1d9604[_0x37e094(0x157)],this[_0x37e094(0x159)]=_0x1d9604[_0x37e094(0x159)]||'sdk',this[_0x37e094(0x148)]=_0x37e094(0x144)+_0x1d9604[_0x37e094(0x171)]+'-'+Date[_0x37e094(0x162)]()['toString'](0x24),this[_0x37e094(0x152)]=_0x1d9604['heartbeatInterval']??0x2bf20,this[_0x37e094(0x155)]=_0x1d9604[_0x37e094(0x155)]??0xbb8,_0x1d9604['autoConnect']!==!0x1)this['connect']();}[a0_0x43a56d(0x164)](_0x673cc1){const _0x52f9a3=a0_0x43a56d;console[_0x52f9a3(0x164)]('['+new Date()[_0x52f9a3(0x13c)]()[_0x52f9a3(0x14c)](0x0,0x8)+']\x20[commhub:'+this[_0x52f9a3(0x171)]+']\x20'+_0x673cc1);}async[a0_0x43a56d(0x14f)](_0x87fa8b,_0x3e8174){const _0x432354=a0_0x43a56d;let _0x3476ed={'Content-Type':_0x432354(0x17c),'Accept':_0x432354(0x180)};if(this[_0x432354(0x157)])_0x3476ed[_0x432354(0x178)]=_0x432354(0x14a)+this[_0x432354(0x157)];let _0x59f47a=await(await fetch(this[_0x432354(0x151)]+'/mcp',{'method':_0x432354(0x154),'headers':_0x3476ed,'body':JSON[_0x432354(0x147)]({'jsonrpc':_0x432354(0x17d),'id':Date[_0x432354(0x162)](),'method':_0x432354(0x169),'params':{'name':_0x87fa8b,'arguments':_0x3e8174}})}))['text'](),_0x1805d7=_0x59f47a[_0x432354(0x15a)](/data: (.+)/),_0x4baf2e=_0x1805d7?JSON[_0x432354(0x158)](_0x1805d7[0x1]):JSON[_0x432354(0x158)](_0x59f47a),_0x264f3c=_0x4baf2e?.['result']?.['content']?.[0x0]?.[_0x432354(0x14e)];return _0x264f3c?JSON['parse'](_0x264f3c):_0x4baf2e;}async[a0_0x43a56d(0x176)](){const _0x10fe40=a0_0x43a56d;if(this[_0x10fe40(0x172)])return;this[_0x10fe40(0x172)]=!0x0,await this[_0x10fe40(0x15c)](_0x10fe40(0x13f)),this[_0x10fe40(0x164)](_0x10fe40(0x13a)),this['heartbeatTimer']=setInterval(()=>{const _0x5eea76=_0x10fe40;this[_0x5eea76(0x15c)]('idle')['catch'](_0x5a1349=>this['log']('heartbeat\x20failed:\x20'+_0x5a1349[_0x5eea76(0x179)]));},this[_0x10fe40(0x152)]),this[_0x10fe40(0x168)]();}async[a0_0x43a56d(0x142)](){const _0x1e23a3=a0_0x43a56d;if(this[_0x1e23a3(0x172)]=!0x1,this['sseAbort']?.[_0x1e23a3(0x138)](),this[_0x1e23a3(0x145)])clearInterval(this[_0x1e23a3(0x145)]);await this[_0x1e23a3(0x15c)](_0x1e23a3(0x17a))[_0x1e23a3(0x161)](()=>{}),this[_0x1e23a3(0x164)]('disconnected');}async['send'](_0x599130,_0x5dcaed,_0x4ebac7=a0_0x43a56d(0x15b)){const _0x26b342=a0_0x43a56d;return this[_0x26b342(0x14f)](_0x26b342(0x167),{'alias':_0x599130,'task':_0x5dcaed,'priority':_0x4ebac7,'from_session':this['alias']});}async[a0_0x43a56d(0x179)](_0x4960ff,_0x21fc76){const _0x1841cb=a0_0x43a56d;return this[_0x1841cb(0x14f)]('send_message',{'alias':_0x4960ff,'message':_0x21fc76,'from_session':this['alias']});}async['reply'](_0x4ba2f8,_0x5155a9,_0x40573e='completed'){const _0x4a7def=a0_0x43a56d;return this['call'](_0x4a7def(0x141),{'task_id':_0x4ba2f8,'text':_0x5155a9,'status':_0x40573e});}async[a0_0x43a56d(0x15c)](_0x217468,_0x31530b){const _0x537d59=a0_0x43a56d;return this[_0x537d59(0x14f)]('report_status',{'resume_id':this['resumeId'],'alias':this[_0x537d59(0x171)],'status':_0x217468,'server':a0_0x2bd85f(),'hostname':a0_0x2bd85f(),'agent':this['agent'],'project_dir':process[_0x537d59(0x16f)](),..._0x31530b});}async['getAllStatus'](){const _0x6df08d=a0_0x43a56d;return this[_0x6df08d(0x14f)]('get_all_status',{});}async['broadcast'](_0x15326a,_0x4505d8){const _0x4cb16f=a0_0x43a56d;return this[_0x4cb16f(0x14f)]('broadcast',{'message':_0x15326a,'filter_server':_0x4505d8?.[_0x4cb16f(0x146)],'filter_status':_0x4505d8?.['status']});}async[a0_0x43a56d(0x168)](){const _0x15e1d7=a0_0x43a56d;let _0x57c697=encodeURIComponent(this[_0x15e1d7(0x171)]),_0x103880=this[_0x15e1d7(0x151)]+_0x15e1d7(0x14d)+_0x57c697,_0x5a342f=this[_0x15e1d7(0x155)];while(this[_0x15e1d7(0x172)]){try{this[_0x15e1d7(0x165)]=new AbortController();let _0x116dc6={'Accept':'text/event-stream'};if(this[_0x15e1d7(0x157)])_0x116dc6['Authorization']=_0x15e1d7(0x14a)+this[_0x15e1d7(0x157)];let _0x1fd56d=await fetch(_0x103880,{'headers':_0x116dc6,'signal':this[_0x15e1d7(0x165)]['signal']});if(!_0x1fd56d['ok']||!_0x1fd56d[_0x15e1d7(0x17f)]){this['log'](_0x15e1d7(0x14b)+_0x1fd56d['status']),await this['sleep'](_0x5a342f),_0x5a342f=Math['min'](_0x5a342f*1.5,0xea60);continue;}_0x5a342f=this[_0x15e1d7(0x155)];let _0x4cb329=_0x1fd56d[_0x15e1d7(0x17f)][_0x15e1d7(0x16d)](),_0x507d9f=new TextDecoder(),_0xa0627b='';while(this['running']){let {done:_0x2d24c7,value:_0x4b493c}=await _0x4cb329['read']();if(_0x2d24c7)break;_0xa0627b+=_0x507d9f[_0x15e1d7(0x170)](_0x4b493c,{'stream':!0x0});let _0x5a65cd=_0xa0627b['split']('\x0a');_0xa0627b=_0x5a65cd[_0x15e1d7(0x15e)]()||'';for(let _0x4a4cd9 of _0x5a65cd){if(!_0x4a4cd9['startsWith'](_0x15e1d7(0x139)))continue;try{let _0x3d56d3=JSON['parse'](_0x4a4cd9['slice'](0x6));if(_0x3d56d3[_0x15e1d7(0x13e)]===_0x15e1d7(0x15f)){this['log'](_0x15e1d7(0x16b)),this['emit'](_0x15e1d7(0x15f));continue;}if(_0x3d56d3['type']===_0x15e1d7(0x177)||_0x3d56d3[_0x15e1d7(0x13e)]===_0x15e1d7(0x17b)||_0x3d56d3['type']==='broadcast')await this[_0x15e1d7(0x153)]();}catch{}}}}catch(_0x4d72a8){if(_0x4d72a8[_0x15e1d7(0x13d)]===_0x15e1d7(0x174))break;this[_0x15e1d7(0x16e)]('error',_0x4d72a8),this[_0x15e1d7(0x164)](_0x15e1d7(0x15d)+_0x4d72a8[_0x15e1d7(0x179)]);}if(this[_0x15e1d7(0x172)])this[_0x15e1d7(0x16e)]('disconnected'),this[_0x15e1d7(0x164)](_0x15e1d7(0x16a)+_0x5a342f/0x3e8+_0x15e1d7(0x140)),await this['sleep'](_0x5a342f),_0x5a342f=Math['min'](_0x5a342f*1.5,0xea60);}}async[a0_0x43a56d(0x153)](){const _0xeae61b=a0_0x43a56d;try{let _0x4a07d0=(await this[_0xeae61b(0x14f)]('get_inbox',{'alias':this[_0xeae61b(0x171)],'limit':0xa}))?.[_0xeae61b(0x150)]||[];for(let _0x549bcc of _0x4a07d0)await this[_0xeae61b(0x14f)]('ack_inbox',{'alias':this[_0xeae61b(0x171)],'message_id':_0x549bcc['id']}),this[_0xeae61b(0x164)]('←\x20'+_0x549bcc['from_session']+':\x20'+_0x549bcc['content'][_0xeae61b(0x14c)](0x0,0x3c)),this[_0xeae61b(0x16e)](_0xeae61b(0x160),_0x549bcc),this[_0xeae61b(0x16e)](_0xeae61b(0x179),_0x549bcc);}catch(_0x2815ad){this['log']('inbox\x20error:\x20'+_0x2815ad[_0xeae61b(0x179)]);}}[a0_0x43a56d(0x173)](_0x19b19d){return new Promise(_0x8fb3aa=>setTimeout(_0x8fb3aa,_0x19b19d));}}var $=T;export{$ as default,T as CommHub};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env bun
2
- const a0_0x18a035=a0_0x36a0;(function(_0x2e111d,_0x41560a){const _0x34c27c=a0_0x36a0,_0x4f2c76=_0x2e111d();while(!![]){try{const _0x599c0c=-parseInt(_0x34c27c(0x217))/0x1*(-parseInt(_0x34c27c(0x1da))/0x2)+-parseInt(_0x34c27c(0x1db))/0x3*(parseInt(_0x34c27c(0x1b6))/0x4)+parseInt(_0x34c27c(0x1c7))/0x5*(-parseInt(_0x34c27c(0x1f2))/0x6)+-parseInt(_0x34c27c(0x1d5))/0x7*(-parseInt(_0x34c27c(0x224))/0x8)+-parseInt(_0x34c27c(0x1c2))/0x9+parseInt(_0x34c27c(0x203))/0xa+parseInt(_0x34c27c(0x1ea))/0xb;if(_0x599c0c===_0x41560a)break;else _0x4f2c76['push'](_0x4f2c76['shift']());}catch(_0x574f4a){_0x4f2c76['push'](_0x4f2c76['shift']());}}}(a0_0x54db,0xbcb28));import{readFileSync as a0_0x4a776f,existsSync as a0_0x1e3c45}from'fs';import{join as a0_0x27c2ed}from'path';function a0_0x54db(){const _0x221944=['failed','/mcp','get','Reply\x20using\x20the\x20commhub_reply\x20tool\x20to\x20report\x20status\x20or\x20results\x20back.','2195Mdpcgn','idle','delete','report_status','0.3.0','trim','slice','notification','\x20ALIAS=','get_inbox','→\x20injected\x20task\x20','2.0','SSE\x20connection\x20error:\x20','message_id','4767595kRpvQN','object','SIGINT','cancelled','exit','2957336EhBFuS','1071951KmGbHN','type','These\x20are\x20tasks\x20dispatched\x20by\x20the\x20hub\x20or\x20other\x20sessions\x20via\x20the\x20CommHub\x20Server.','stderr','/events/','error','http://127.0.0.1:9200','parse','\x22\x20(','read','from_session','getReader','parse\x20error:\x20','length','messages','7262849Gqkklr','application/json','Reply\x20to\x20a\x20CommHub\x20task\x20—\x20report\x20completion\x20or\x20send\x20a\x20message\x20back\x20to\x20the\x20hub.','SSE\x20stream\x20ended,\x20reconnecting...','Bearer\x20','status','stringify','\x20priority=','17358YsTkIV','application/json,\x20text/event-stream','completed','toTimeString','startsWith','fatal:\x20','Authorization','MCP\x20stdio\x20connected','ready\x20—\x20waiting\x20for\x20events','find','pop','shutting\x20down,\x20reporting\x20offline...','string','send_reply','cwd','body','ack_inbox','10688580wYpJmP','POST','\x20from\x20','starting\x20SSE\x20listener...','commhub','\x20PROJECT_ENV=','initialize','normal','commhub_reply','notifications/claude/channel','from','data:\x20','utf-8','\x20RESUME_ID=','message',']\x20[commhub]\x20','unknown\x20tool','config.json','split','Send\x20a\x20task\x20to\x20another\x20session\x20via\x20CommHub.','1uMFtQc','hub','setRequestHandler','in_progress','\x20CWD=','commhub_report_status','You\x20can\x20also\x20use\x20commhub_report_status\x20to\x20update\x20your\x20session\x20status.','commhub_send_task','alias','claude-code','init\x20failed:\x20','result','params','8zgmJpe','number','Send\x20a\x20message\x20to\x20another\x20session\x20(no\x20task\x20lifecycle,\x20just\x20chat).\x20Use\x20for\x20replies\x20and\x20status\x20updates.','decode','high','catch','...\x20TMUX=','text','SSE\x20fatal:\x20','.env','Reply\x20text\x20/\x20result\x20summary','ENV:\x20URL=','get_all_status','token','end','blocked','send_message','indexOf','write','replace','Task\x20content','Get\x20status\x20of\x20all\x20sessions\x20from\x20CommHub.','task','commhub-channel','12MgYurQ','The\x20task_id\x20from\x20the\x20channel\x20message\x20(or\x20\x27hub\x27\x20for\x20general)','Current\x20task\x20description','commhub_send_message','tmux\x20display-message\x20-p\x20\x27#S\x27','commhub_get_all_status','content','Update\x20this\x20session\x27s\x20status\x20in\x20CommHub\x20(working/idle/blocked/error).\x20Returns\x20inbox_count.','connecting\x20to\x20','priority','connected','Target\x20session\x20alias','6965892hGHNMN'];a0_0x54db=function(){return _0x221944;};return a0_0x54db();}import{hostname as a0_0x3a7455}from'os';import{execSync as a0_0x185ef0}from'child_process';import{Server as a0_0x3cd0e6}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport as a0_0xa58a50}from'@modelcontextprotocol/sdk/server/stdio.js';import{ListToolsRequestSchema as a0_0x1a8297,CallToolRequestSchema as a0_0x19d0b1}from'@modelcontextprotocol/sdk/types.js';function p(_0x1066f6){const _0x5d5aeb=a0_0x36a0;if(!a0_0x1e3c45(_0x1066f6))return;for(let _0x2c89a1 of a0_0x4a776f(_0x1066f6,_0x5d5aeb(0x20f))['split']('\x0a')){let _0x70a9d8=_0x2c89a1['trim']();if(!_0x70a9d8||_0x70a9d8[_0x5d5aeb(0x1f6)]('#'))continue;let _0x3ff821=_0x70a9d8[_0x5d5aeb(0x1af)]('=');if(_0x3ff821<0x0)continue;let _0x4719c4=_0x70a9d8[_0x5d5aeb(0x1cd)](0x0,_0x3ff821)[_0x5d5aeb(0x1cc)](),_0x25a674=_0x70a9d8[_0x5d5aeb(0x1cd)](_0x3ff821+0x1)['trim']()[_0x5d5aeb(0x1b1)](/^["']|["']$/g,'');if(!process.env[_0x4719c4])process.env[_0x4719c4]=_0x25a674;}}var C=process.env.HOME||'~',T=a0_0x27c2ed(C,'.claude/channels/commhub');p(a0_0x27c2ed(T,'.env'));var L=process[a0_0x18a035(0x200)]()[a0_0x18a035(0x1b1)](/\//g,'-');p(a0_0x27c2ed(T,L,a0_0x18a035(0x22d)));function U(){const _0x4b52f4=a0_0x18a035;try{return a0_0x185ef0(_0x4b52f4(0x1ba),{'encoding':_0x4b52f4(0x20f),'timeout':0x7d0})['trim']();}catch{return'';}}function a0_0x36a0(_0x57c965,_0x4e7ba7){_0x57c965=_0x57c965-0x1ab;const _0x54dbac=a0_0x54db();let _0x36a0d3=_0x54dbac[_0x57c965];return _0x36a0d3;}function c(){const _0x25f22a=a0_0x18a035;try{let _0x3dc012=a0_0x27c2ed(C,'.anet',_0x25f22a(0x214));if(a0_0x1e3c45(_0x3dc012))return JSON[_0x25f22a(0x1e2)](a0_0x4a776f(_0x3dc012,_0x25f22a(0x20f)));}catch{}return{};}var H=c(),D=process.env.COMMHUB_URL||H['hub']||a0_0x18a035(0x1e1),f=process.env.COMMHUB_TMUX||U(),Z=process.env.COMMHUB_ALIAS||f||a0_0x3a7455(),w=process.env.COMMHUB_RESUME_ID||process.env.CLAUDE_RESUME_ID||crypto['randomUUID'](),X=process.env.COMMHUB_TOKEN||H[a0_0x18a035(0x1ab)]||'';function Y(_0x3e95d1){const _0xda851e=a0_0x18a035;let _0x2aec32=new Date()[_0xda851e(0x1f5)]()['slice'](0x0,0x8);process[_0xda851e(0x1de)][_0xda851e(0x1b0)]('['+_0x2aec32+_0xda851e(0x212)+_0x3e95d1+'\x0a');}function h(_0x307788){return new Promise(_0x21c724=>setTimeout(_0x21c724,_0x307788));}Y(a0_0x18a035(0x22f)+D+a0_0x18a035(0x1cf)+Z+a0_0x18a035(0x210)+w[a0_0x18a035(0x1cd)](0x0,0x8)+a0_0x18a035(0x22a)+(f||'none')+a0_0x18a035(0x21b)+process[a0_0x18a035(0x200)]()+a0_0x18a035(0x208)+L);var k=new Map(),K=new a0_0x3cd0e6({'name':a0_0x18a035(0x1b5),'version':a0_0x18a035(0x1cb)},{'capabilities':{'experimental':{'claude/channel':{}},'tools':{}},'instructions':['Messages\x20from\x20CommHub\x20arrive\x20as\x20<channel\x20source=\x22commhub\x22\x20task_id=\x22...\x22\x20priority=\x22...\x22\x20from=\x22...\x22>',a0_0x18a035(0x1dd),a0_0x18a035(0x1c6),a0_0x18a035(0x21d),'Session\x20alias:\x20'+Z]['join']('\x0a')});K[a0_0x18a035(0x219)](a0_0x1a8297,async()=>({'tools':[{'name':'commhub_reply','description':a0_0x18a035(0x1ec),'inputSchema':{'type':a0_0x18a035(0x1d6),'properties':{'task_id':{'type':a0_0x18a035(0x1fe),'description':a0_0x18a035(0x1b7)},'text':{'type':a0_0x18a035(0x1fe),'description':a0_0x18a035(0x22e)},'status':{'type':a0_0x18a035(0x1fe),'enum':['completed',a0_0x18a035(0x1c3),a0_0x18a035(0x1d8),a0_0x18a035(0x1ad),a0_0x18a035(0x1e0),a0_0x18a035(0x21a)],'description':'Task\x20outcome:\x20completed/failed/cancelled\x20for\x20final\x20results,\x20blocked/error/in_progress\x20for\x20status\x20updates'}},'required':[a0_0x18a035(0x22b)]}},{'name':a0_0x18a035(0x21c),'description':a0_0x18a035(0x1bd),'inputSchema':{'type':a0_0x18a035(0x1d6),'properties':{'status':{'type':a0_0x18a035(0x1fe),'enum':['working',a0_0x18a035(0x1c8),a0_0x18a035(0x1ad),a0_0x18a035(0x1e0)]},'task':{'type':a0_0x18a035(0x1fe),'description':a0_0x18a035(0x1b8)},'progress':{'type':a0_0x18a035(0x225),'description':'Progress\x200-100'}},'required':[a0_0x18a035(0x1ef)]}},{'name':a0_0x18a035(0x21e),'description':a0_0x18a035(0x216),'inputSchema':{'type':a0_0x18a035(0x1d6),'properties':{'alias':{'type':a0_0x18a035(0x1fe),'description':'Target\x20session\x20alias'},'task':{'type':a0_0x18a035(0x1fe),'description':a0_0x18a035(0x1b2)},'priority':{'type':'string','enum':[a0_0x18a035(0x228),a0_0x18a035(0x20a),'low'],'description':'Priority\x20(default:\x20normal)'}},'required':[a0_0x18a035(0x21f),a0_0x18a035(0x1b4)]}},{'name':a0_0x18a035(0x1b9),'description':a0_0x18a035(0x226),'inputSchema':{'type':a0_0x18a035(0x1d6),'properties':{'alias':{'type':a0_0x18a035(0x1fe),'description':a0_0x18a035(0x1c1)},'message':{'type':'string','description':'Message\x20content'}},'required':[a0_0x18a035(0x21f),a0_0x18a035(0x211)]}},{'name':a0_0x18a035(0x1bb),'description':a0_0x18a035(0x1b3),'inputSchema':{'type':'object','properties':{}}}]}));async function P(_0x3a2b17,_0x3bd07b){const _0x4158f0=a0_0x18a035;let _0x5dcdff=await fetch(D+_0x4158f0(0x1c4),{'method':_0x4158f0(0x204),'headers':{'Content-Type':'application/json','Accept':_0x4158f0(0x1f3),...X?{'Authorization':_0x4158f0(0x1ee)+X}:{}},'body':JSON[_0x4158f0(0x1f0)]({'jsonrpc':_0x4158f0(0x1d2),'id':0x1,'method':_0x4158f0(0x209),'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x4158f0(0x1b5),'version':'0.3.0'}}})});if(!_0x5dcdff['ok']){let _0x537939=await _0x5dcdff[_0x4158f0(0x22b)]();return Y('CommHub\x20init\x20failed:\x20'+_0x5dcdff[_0x4158f0(0x1ef)]+'\x20'+_0x537939[_0x4158f0(0x1cd)](0x0,0x64)),{'ok':!0x1,'error':_0x4158f0(0x221)+_0x5dcdff['status']};}await _0x5dcdff[_0x4158f0(0x22b)]();let _0x216c3c=(await(await fetch(D+_0x4158f0(0x1c4),{'method':_0x4158f0(0x204),'headers':{'Content-Type':_0x4158f0(0x1eb),'Accept':_0x4158f0(0x1f3),...X?{'Authorization':'Bearer\x20'+X}:{}},'body':JSON[_0x4158f0(0x1f0)]({'jsonrpc':_0x4158f0(0x1d2),'id':0x2,'method':'tools/call','params':{'name':_0x3a2b17,'arguments':_0x3bd07b}})}))[_0x4158f0(0x22b)]())['split']('\x0a')[_0x4158f0(0x1fb)](_0x1bd3ee=>_0x1bd3ee[_0x4158f0(0x1f6)](_0x4158f0(0x20e)));if(_0x216c3c){let _0x4eb342=JSON[_0x4158f0(0x1e2)](_0x216c3c[_0x4158f0(0x1cd)](0x6));return _0x4eb342?.[_0x4158f0(0x222)]?.[_0x4158f0(0x1bc)]?.[0x0]?.[_0x4158f0(0x22b)]?JSON[_0x4158f0(0x1e2)](_0x4eb342[_0x4158f0(0x222)][_0x4158f0(0x1bc)][0x0][_0x4158f0(0x22b)]):_0x4eb342;}return{'ok':!0x1,'error':'no\x20response'};}K['setRequestHandler'](a0_0x19d0b1,async _0x51fa76=>{const _0x3d4ffd=a0_0x18a035;let {name:_0x325614,arguments:_0x3ec18c}=_0x51fa76[_0x3d4ffd(0x223)];if(_0x325614===_0x3d4ffd(0x20b)){let {task_id:_0x9f0145,text:_0x517b54,status:_0x255707}=_0x3ec18c;if(_0x255707===_0x3d4ffd(0x1f4)||_0x255707===_0x3d4ffd(0x1c3)||_0x255707==='cancelled'){let _0x35e5b9=_0x255707===_0x3d4ffd(0x1f4)?'replied':_0x255707,_0x1c4143=_0x9f0145?k[_0x3d4ffd(0x1c5)](_0x9f0145)||_0x3d4ffd(0x218):_0x3d4ffd(0x218),_0x2c2652=await P(_0x3d4ffd(0x1ff),{'alias':_0x1c4143,'text':_0x517b54,'in_reply_to':_0x9f0145||void 0x0,'status':_0x35e5b9,'from_session':Z});if(_0x9f0145)k[_0x3d4ffd(0x1c9)](_0x9f0145);return{'content':[{'type':_0x3d4ffd(0x22b),'text':JSON[_0x3d4ffd(0x1f0)](_0x2c2652)}]};}let _0x465006=await P(_0x3d4ffd(0x1ca),{'resume_id':w,'alias':Z,'status':_0x255707===_0x3d4ffd(0x1ad)?_0x3d4ffd(0x1ad):_0x255707===_0x3d4ffd(0x1e0)?'error':'working','task':_0x517b54['slice'](0x0,0xc8),'output':_0x517b54});return{'content':[{'type':'text','text':JSON[_0x3d4ffd(0x1f0)](_0x465006)}]};}if(_0x325614===_0x3d4ffd(0x21c)){let {status:_0x429ad8,task:_0x79c73d,progress:_0xeee2fd}=_0x3ec18c,_0x123478=await P(_0x3d4ffd(0x1ca),{'resume_id':w,'alias':Z,'status':_0x429ad8,'task':_0x79c73d,'progress':_0xeee2fd});return{'content':[{'type':_0x3d4ffd(0x22b),'text':JSON[_0x3d4ffd(0x1f0)](_0x123478)}]};}if(_0x325614===_0x3d4ffd(0x21e)){let {alias:_0x10b5c1,task:_0x165ce8,priority:_0x45aeb3}=_0x3ec18c,_0x1bc630=await P('send_task',{'alias':_0x10b5c1,'task':_0x165ce8,'priority':_0x45aeb3||_0x3d4ffd(0x20a),'from_session':Z});return{'content':[{'type':'text','text':JSON[_0x3d4ffd(0x1f0)](_0x1bc630)}]};}if(_0x325614==='commhub_send_message'){let {alias:_0x381430,message:_0x4528c3}=_0x3ec18c,_0x58e563=await P(_0x3d4ffd(0x1ae),{'alias':_0x381430,'message':_0x4528c3,'from_session':Z});return{'content':[{'type':_0x3d4ffd(0x22b),'text':JSON[_0x3d4ffd(0x1f0)](_0x58e563)}]};}if(_0x325614===_0x3d4ffd(0x1bb)){let _0x2b1975=await P(_0x3d4ffd(0x230),{});return{'content':[{'type':'text','text':JSON['stringify'](_0x2b1975)}]};}return{'content':[{'type':_0x3d4ffd(0x22b),'text':JSON[_0x3d4ffd(0x1f0)]({'error':_0x3d4ffd(0x213)})}]};});async function v(){const _0x5c7a78=a0_0x18a035;let _0x44fc4f=D+_0x5c7a78(0x1df)+encodeURIComponent(Z),_0xe3fb8={};if(X)_0xe3fb8[_0x5c7a78(0x1f8)]=_0x5c7a78(0x1ee)+X;Y(_0x5c7a78(0x1be)+_0x44fc4f);while(!0x0){try{let _0x4e8a11=await fetch(_0x44fc4f,{'headers':_0xe3fb8});if(!_0x4e8a11['ok']){Y('SSE\x20error:\x20'+_0x4e8a11['status']+'\x20'+_0x4e8a11['statusText']),await h(0x1388);continue;}let _0xfbb1b8=_0x4e8a11[_0x5c7a78(0x201)][_0x5c7a78(0x1e6)](),_0x31ea69=new TextDecoder(),_0x155946='';while(!0x0){let {done:_0x2ea5ed,value:_0x53eac0}=await _0xfbb1b8[_0x5c7a78(0x1e4)]();if(_0x2ea5ed)break;_0x155946+=_0x31ea69[_0x5c7a78(0x227)](_0x53eac0,{'stream':!0x0});let _0x10ba2a=_0x155946[_0x5c7a78(0x215)]('\x0a\x0a');_0x155946=_0x10ba2a[_0x5c7a78(0x1fc)]()||'';for(let _0x1871bc of _0x10ba2a){let _0x56c9cc=_0x1871bc[_0x5c7a78(0x215)]('\x0a')[_0x5c7a78(0x1fb)](_0x12457e=>_0x12457e[_0x5c7a78(0x1f6)]('data:\x20'));if(!_0x56c9cc)continue;try{let _0x4c6810=JSON[_0x5c7a78(0x1e2)](_0x56c9cc[_0x5c7a78(0x1cd)](0x6));await u(_0x4c6810);}catch(_0x668828){Y(_0x5c7a78(0x1e7)+_0x668828);}}}Y(_0x5c7a78(0x1ed));}catch(_0x433a42){Y(_0x5c7a78(0x1d3)+_0x433a42);}await h(0xbb8);}}async function u(_0x1d4379){const _0x2bddcd=a0_0x18a035;if(_0x1d4379[_0x2bddcd(0x1dc)]===_0x2bddcd(0x1c0)){Y('SSE\x20connected\x20as\x20\x22'+Z+'\x22');return;}if(_0x1d4379['type']==='new_message'){if(Y('←\x20message\x20from\x20'+_0x1d4379[_0x2bddcd(0x20d)]+':\x20'+_0x1d4379['message']['slice'](0x0,0x3c)),await K[_0x2bddcd(0x1ce)]({'method':_0x2bddcd(0x20c),'params':{'content':_0x1d4379['message'],'meta':{'sender':_0x1d4379[_0x2bddcd(0x20d)]||_0x2bddcd(0x218),'sender_id':_0x2bddcd(0x207),'user':_0x1d4379[_0x2bddcd(0x20d)]||_0x2bddcd(0x218),'priority':_0x2bddcd(0x20a)}}}),_0x1d4379['message_id'])await P(_0x2bddcd(0x202),{'alias':Z,'message_id':_0x1d4379[_0x2bddcd(0x1d4)]});return;}if(_0x1d4379[_0x2bddcd(0x1dc)]==='new_task'||_0x1d4379['type']==='broadcast'){Y('←\x20'+_0x1d4379[_0x2bddcd(0x1dc)]+':\x20inbox_count='+_0x1d4379['inbox_count']+_0x2bddcd(0x1f1)+(_0x1d4379['priority']||_0x2bddcd(0x20a)));let _0x5ab10f=await P(_0x2bddcd(0x1d0),{'alias':Z,'limit':0x5});if(_0x5ab10f?.['ok']&&_0x5ab10f[_0x2bddcd(0x1e9)]?.[_0x2bddcd(0x1e8)]>0x0)for(let _0x1fbb23 of _0x5ab10f[_0x2bddcd(0x1e9)]){let _0x304032={'sender':_0x1fbb23[_0x2bddcd(0x1e5)]||_0x2bddcd(0x218),'sender_id':_0x2bddcd(0x207),'user':_0x1fbb23[_0x2bddcd(0x1e5)]||_0x2bddcd(0x218),'task_id':_0x1fbb23['id'],'priority':_0x1fbb23[_0x2bddcd(0x1bf)]||_0x2bddcd(0x20a)};k['set'](_0x1fbb23['id'],_0x1fbb23[_0x2bddcd(0x1e5)]||'hub'),await K[_0x2bddcd(0x1ce)]({'method':_0x2bddcd(0x20c),'params':{'content':_0x1fbb23[_0x2bddcd(0x1bc)],'meta':_0x304032}}),Y(_0x2bddcd(0x1d1)+_0x1fbb23['id'][_0x2bddcd(0x1cd)](0x0,0x8)+_0x2bddcd(0x205)+_0x1fbb23['from_session']+':\x20'+_0x1fbb23[_0x2bddcd(0x1bc)]['slice'](0x0,0x3c)),await P(_0x2bddcd(0x202),{'alias':Z,'message_id':_0x1fbb23['id']});}}}async function S(){const _0x15e45c=a0_0x18a035;let _0x2afd6e=new a0_0xa58a50();await K['connect'](_0x2afd6e),Y(_0x15e45c(0x1f9)),Y(_0x15e45c(0x206)),v()[_0x15e45c(0x229)](_0x37364c=>Y(_0x15e45c(0x22c)+_0x37364c)),P(_0x15e45c(0x1ca),{'resume_id':w,'alias':Z,'status':_0x15e45c(0x1c8),'server':a0_0x3a7455(),'hostname':a0_0x3a7455(),'agent':'claude-code','project_dir':process[_0x15e45c(0x200)](),'tmux_name':f||void 0x0})['then'](()=>Y('registered\x20as\x20\x22'+Z+_0x15e45c(0x1e3)+w[_0x15e45c(0x1cd)](0x0,0x8)+')'))[_0x15e45c(0x229)](_0x102584=>Y('warning:\x20could\x20not\x20register:\x20'+_0x102584)),setInterval(()=>{const _0x118c13=_0x15e45c;P('report_status',{'resume_id':w,'alias':Z,'status':_0x118c13(0x1c8),'server':a0_0x3a7455(),'hostname':a0_0x3a7455(),'agent':_0x118c13(0x220),'project_dir':process[_0x118c13(0x200)](),'tmux_name':f||void 0x0})['catch'](_0x514764=>Y('heartbeat\x20failed:\x20'+_0x514764));},0x2bf20),Y(_0x15e45c(0x1fa));}S()[a0_0x18a035(0x229)](_0x1d11c4=>{const _0x196f7e=a0_0x18a035;Y(_0x196f7e(0x1f7)+_0x1d11c4),process['exit'](0x1);});async function N(){const _0x23e496=a0_0x18a035;Y(_0x23e496(0x1fd)),await P('report_status',{'resume_id':w,'alias':Z,'status':_0x23e496(0x1e0),'task':'session\x20disconnected'})['catch'](()=>{}),process[_0x23e496(0x1d9)](0x0);}process['stdin']['on'](a0_0x18a035(0x1ac),()=>N()),process['on']('SIGTERM',()=>N()),process['on'](a0_0x18a035(0x1d7),()=>N());
2
+ const a0_0x344305=a0_0x57e0;(function(_0x3a5e4a,_0x5d6927){const _0x4065c5=a0_0x57e0,_0x8bad6a=_0x3a5e4a();while(!![]){try{const _0x3a2071=parseInt(_0x4065c5(0x17b))/0x1*(parseInt(_0x4065c5(0x129))/0x2)+parseInt(_0x4065c5(0x12b))/0x3*(-parseInt(_0x4065c5(0x158))/0x4)+parseInt(_0x4065c5(0x15e))/0x5+-parseInt(_0x4065c5(0x184))/0x6*(parseInt(_0x4065c5(0x139))/0x7)+parseInt(_0x4065c5(0x186))/0x8*(parseInt(_0x4065c5(0x16c))/0x9)+parseInt(_0x4065c5(0x173))/0xa*(-parseInt(_0x4065c5(0x183))/0xb)+parseInt(_0x4065c5(0x127))/0xc;if(_0x3a2071===_0x5d6927)break;else _0x8bad6a['push'](_0x8bad6a['shift']());}catch(_0x3234ba){_0x8bad6a['push'](_0x8bad6a['shift']());}}}(a0_0x2ac8,0x33ea3));import{readFileSync as a0_0x50af8b,existsSync as a0_0x31c8b9}from'fs';import{join as a0_0x470b38}from'path';import{hostname as a0_0x4ded6d}from'os';import{execSync as a0_0x102278}from'child_process';import{Server as a0_0x48847b}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport as a0_0x103f7b}from'@modelcontextprotocol/sdk/server/stdio.js';import{ListToolsRequestSchema as a0_0x523fbe,CallToolRequestSchema as a0_0x1975f7}from'@modelcontextprotocol/sdk/types.js';function p(_0x5435e1){const _0x26ef96=a0_0x57e0;if(!a0_0x31c8b9(_0x5435e1))return;for(let _0x294ccd of a0_0x50af8b(_0x5435e1,_0x26ef96(0x193))['split']('\x0a')){let _0x5a3728=_0x294ccd['trim']();if(!_0x5a3728||_0x5a3728[_0x26ef96(0x1a3)]('#'))continue;let _0x127bce=_0x5a3728[_0x26ef96(0x14b)]('=');if(_0x127bce<0x0)continue;let _0x465756=_0x5a3728[_0x26ef96(0x159)](0x0,_0x127bce)[_0x26ef96(0x176)](),_0x54903c=_0x5a3728[_0x26ef96(0x159)](_0x127bce+0x1)[_0x26ef96(0x176)]()[_0x26ef96(0x155)](/^["']|["']$/g,'');if(!process.env[_0x465756])process.env[_0x465756]=_0x54903c;}}var C=process.env.HOME||'~',T=a0_0x470b38(C,a0_0x344305(0x195));p(a0_0x470b38(T,a0_0x344305(0x1a5)));var L=process[a0_0x344305(0x135)]()['replace'](/\//g,'-');p(a0_0x470b38(T,L,'.env'));function U(){const _0x195b68=a0_0x344305;try{return a0_0x102278(_0x195b68(0x172),{'encoding':_0x195b68(0x193),'timeout':0x7d0})['trim']();}catch{return'';}}function c(){const _0x2650a6=a0_0x344305;try{let _0x319fb8=a0_0x470b38(C,_0x2650a6(0x17e),_0x2650a6(0x13c));if(a0_0x31c8b9(_0x319fb8))return JSON[_0x2650a6(0x128)](a0_0x50af8b(_0x319fb8,_0x2650a6(0x193)));}catch{}return{};}var H=c(),D=process.env.COMMHUB_URL||H[a0_0x344305(0x182)]||a0_0x344305(0x19e),f=process.env.COMMHUB_TMUX||U(),Z=process.env.COMMHUB_ALIAS||f||a0_0x4ded6d(),w=process.env.COMMHUB_RESUME_ID||process.env.CLAUDE_RESUME_ID||crypto[a0_0x344305(0x194)](),X=process.env.COMMHUB_TOKEN||H['token']||'';function Y(_0x2e5899){const _0x2e6d19=a0_0x344305;let _0x32810f=new Date()['toTimeString']()[_0x2e6d19(0x159)](0x0,0x8);process['stderr']['write']('['+_0x32810f+_0x2e6d19(0x177)+_0x2e5899+'\x0a');}function h(_0x12a626){return new Promise(_0x272652=>setTimeout(_0x272652,_0x12a626));}function a0_0x57e0(_0x2e8cdf,_0x3d6fe8){_0x2e8cdf=_0x2e8cdf-0x11f;const _0x2ac8c0=a0_0x2ac8();let _0x57e08c=_0x2ac8c0[_0x2e8cdf];return _0x57e08c;}Y(a0_0x344305(0x198)+D+a0_0x344305(0x138)+Z+a0_0x344305(0x12a)+w['slice'](0x0,0x8)+a0_0x344305(0x192)+(f||'none')+a0_0x344305(0x19c)+process['cwd']()+'\x20PROJECT_ENV='+L);var k=new Map(),K=new a0_0x48847b({'name':a0_0x344305(0x1a4),'version':a0_0x344305(0x160)},{'capabilities':{'experimental':{'claude/channel':{}},'tools':{}},'instructions':[a0_0x344305(0x14e),a0_0x344305(0x17a),a0_0x344305(0x1ac),'You\x20can\x20also\x20use\x20commhub_report_status\x20to\x20update\x20your\x20session\x20status.','Session\x20alias:\x20'+Z][a0_0x344305(0x161)]('\x0a')});K[a0_0x344305(0x134)](a0_0x523fbe,async()=>({'tools':[{'name':'commhub_reply','description':'Reply\x20to\x20a\x20CommHub\x20task\x20—\x20report\x20completion\x20or\x20send\x20a\x20message\x20back\x20to\x20the\x20hub.','inputSchema':{'type':'object','properties':{'task_id':{'type':a0_0x344305(0x140),'description':a0_0x344305(0x14c)},'text':{'type':a0_0x344305(0x140),'description':a0_0x344305(0x199)},'status':{'type':a0_0x344305(0x140),'enum':[a0_0x344305(0x146),'failed',a0_0x344305(0x16d),a0_0x344305(0x151),a0_0x344305(0x1ad),a0_0x344305(0x170)],'description':'Task\x20outcome:\x20completed/failed/cancelled\x20for\x20final\x20results,\x20blocked/error/in_progress\x20for\x20status\x20updates'}},'required':[a0_0x344305(0x174)]}},{'name':a0_0x344305(0x14d),'description':a0_0x344305(0x1a1),'inputSchema':{'type':'object','properties':{'status':{'type':'string','enum':[a0_0x344305(0x143),'idle',a0_0x344305(0x151),'error']},'task':{'type':a0_0x344305(0x140),'description':a0_0x344305(0x1a2)},'progress':{'type':'number','description':a0_0x344305(0x188)}},'required':[a0_0x344305(0x181)]}},{'name':'commhub_send_task','description':a0_0x344305(0x1a8),'inputSchema':{'type':'object','properties':{'alias':{'type':a0_0x344305(0x140),'description':a0_0x344305(0x11f)},'task':{'type':a0_0x344305(0x140),'description':a0_0x344305(0x157)},'priority':{'type':'string','enum':[a0_0x344305(0x15b),a0_0x344305(0x124),a0_0x344305(0x125)],'description':'Priority\x20(default:\x20normal)'}},'required':[a0_0x344305(0x149),a0_0x344305(0x19d)]}},{'name':a0_0x344305(0x122),'description':a0_0x344305(0x15d),'inputSchema':{'type':a0_0x344305(0x163),'properties':{'alias':{'type':a0_0x344305(0x140),'description':a0_0x344305(0x11f)},'message':{'type':'string','description':a0_0x344305(0x14a)}},'required':[a0_0x344305(0x149),'message']}},{'name':a0_0x344305(0x13b),'description':'Get\x20status\x20of\x20all\x20sessions\x20from\x20CommHub.','inputSchema':{'type':a0_0x344305(0x163),'properties':{}}}]}));async function P(_0x500f15,_0x16bd77){const _0xd2758f=a0_0x344305;let _0x5bd512=await fetch(D+_0xd2758f(0x196),{'method':_0xd2758f(0x191),'headers':{'Content-Type':_0xd2758f(0x12f),'Accept':'application/json,\x20text/event-stream',...X?{'Authorization':_0xd2758f(0x137)+X}:{}},'body':JSON['stringify']({'jsonrpc':_0xd2758f(0x130),'id':0x1,'method':_0xd2758f(0x16e),'params':{'protocolVersion':_0xd2758f(0x15a),'capabilities':{},'clientInfo':{'name':_0xd2758f(0x1a4),'version':_0xd2758f(0x160)}}})});if(!_0x5bd512['ok']){let _0x1ef240=await _0x5bd512[_0xd2758f(0x174)]();return Y(_0xd2758f(0x18f)+_0x5bd512[_0xd2758f(0x181)]+'\x20'+_0x1ef240[_0xd2758f(0x159)](0x0,0x64)),{'ok':!0x1,'error':_0xd2758f(0x1a9)+_0x5bd512[_0xd2758f(0x181)]};}await _0x5bd512[_0xd2758f(0x174)]();let _0x4041a5=(await(await fetch(D+_0xd2758f(0x196),{'method':_0xd2758f(0x191),'headers':{'Content-Type':_0xd2758f(0x12f),'Accept':'application/json,\x20text/event-stream',...X?{'Authorization':'Bearer\x20'+X}:{}},'body':JSON[_0xd2758f(0x13a)]({'jsonrpc':_0xd2758f(0x130),'id':0x2,'method':_0xd2758f(0x190),'params':{'name':_0x500f15,'arguments':_0x16bd77}})}))[_0xd2758f(0x174)]())[_0xd2758f(0x15f)]('\x0a')[_0xd2758f(0x1aa)](_0x1a4ae8=>_0x1a4ae8[_0xd2758f(0x1a3)]('data:\x20'));if(_0x4041a5){let _0x13974e=JSON[_0xd2758f(0x128)](_0x4041a5[_0xd2758f(0x159)](0x6));return _0x13974e?.[_0xd2758f(0x18b)]?.[_0xd2758f(0x142)]?.[0x0]?.[_0xd2758f(0x174)]?JSON[_0xd2758f(0x128)](_0x13974e[_0xd2758f(0x18b)][_0xd2758f(0x142)][0x0][_0xd2758f(0x174)]):_0x13974e;}return{'ok':!0x1,'error':_0xd2758f(0x1a6)};}K[a0_0x344305(0x134)](a0_0x1975f7,async _0x1457f9=>{const _0x45725e=a0_0x344305;let {name:_0x16e683,arguments:_0x344eb4}=_0x1457f9['params'];if(_0x16e683===_0x45725e(0x18e)){let {task_id:_0x3d6518,text:_0x5aa32f,status:_0x27bffa}=_0x344eb4;if(_0x27bffa===_0x45725e(0x146)||_0x27bffa===_0x45725e(0x189)||_0x27bffa==='cancelled'){let _0xfafdac=_0x27bffa==='completed'?_0x45725e(0x156):_0x27bffa,_0x4c5784=_0x3d6518?k[_0x45725e(0x17d)](_0x3d6518)||_0x45725e(0x182):'hub',_0x34d504=await P(_0x45725e(0x147),{'alias':_0x4c5784,'text':_0x5aa32f,'in_reply_to':_0x3d6518||void 0x0,'status':_0xfafdac,'from_session':Z});if(_0x3d6518)k[_0x45725e(0x18c)](_0x3d6518);return{'content':[{'type':'text','text':JSON[_0x45725e(0x13a)](_0x34d504)}]};}let _0x544a7e=await P('report_status',{'resume_id':w,'alias':Z,'status':_0x27bffa===_0x45725e(0x151)?'blocked':_0x27bffa===_0x45725e(0x1ad)?'error':_0x45725e(0x143),'task':_0x5aa32f[_0x45725e(0x159)](0x0,0xc8),'output':_0x5aa32f});return{'content':[{'type':_0x45725e(0x174),'text':JSON[_0x45725e(0x13a)](_0x544a7e)}]};}if(_0x16e683===_0x45725e(0x14d)){let {status:_0x3dd17e,task:_0x49c30e,progress:_0x750c5e}=_0x344eb4,_0x2bb5bd=await P(_0x45725e(0x13f),{'resume_id':w,'alias':Z,'status':_0x3dd17e,'task':_0x49c30e,'progress':_0x750c5e});return{'content':[{'type':'text','text':JSON[_0x45725e(0x13a)](_0x2bb5bd)}]};}if(_0x16e683==='commhub_send_task'){let {alias:_0x13ad6a,task:_0x5c5554,priority:_0x495756}=_0x344eb4,_0x539af7=await P(_0x45725e(0x153),{'alias':_0x13ad6a,'task':_0x5c5554,'priority':_0x495756||'normal','from_session':Z});return{'content':[{'type':_0x45725e(0x174),'text':JSON[_0x45725e(0x13a)](_0x539af7)}]};}if(_0x16e683==='commhub_send_message'){let {alias:_0x560867,message:_0x353bc3}=_0x344eb4,_0xebe8b6=await P('send_message',{'alias':_0x560867,'message':_0x353bc3,'from_session':Z});return{'content':[{'type':_0x45725e(0x174),'text':JSON[_0x45725e(0x13a)](_0xebe8b6)}]};}if(_0x16e683===_0x45725e(0x13b)){let _0x502dda=await P(_0x45725e(0x178),{});return{'content':[{'type':'text','text':JSON[_0x45725e(0x13a)](_0x502dda)}]};}return{'content':[{'type':_0x45725e(0x174),'text':JSON[_0x45725e(0x13a)]({'error':_0x45725e(0x16f)})}]};});async function v(){const _0xc862cf=a0_0x344305;let _0x2985fe=D+'/events/'+encodeURIComponent(Z),_0x520e89={};if(X)_0x520e89['Authorization']=_0xc862cf(0x137)+X;Y(_0xc862cf(0x185)+_0x2985fe);while(!0x0){try{let _0x52a8da=await fetch(_0x2985fe,{'headers':_0x520e89});if(!_0x52a8da['ok']){Y('SSE\x20error:\x20'+_0x52a8da[_0xc862cf(0x181)]+'\x20'+_0x52a8da[_0xc862cf(0x133)]),await h(0x1388);continue;}let _0x3b9816=_0x52a8da[_0xc862cf(0x19a)][_0xc862cf(0x164)](),_0x111078=new TextDecoder(),_0x46f64a='';while(!0x0){let {done:_0x3abbe9,value:_0x53d8c7}=await _0x3b9816[_0xc862cf(0x126)]();if(_0x3abbe9)break;_0x46f64a+=_0x111078[_0xc862cf(0x17c)](_0x53d8c7,{'stream':!0x0});let _0x2ed715=_0x46f64a[_0xc862cf(0x15f)]('\x0a\x0a');_0x46f64a=_0x2ed715[_0xc862cf(0x175)]()||'';for(let _0x27468e of _0x2ed715){let _0x55429d=_0x27468e[_0xc862cf(0x15f)]('\x0a')[_0xc862cf(0x1aa)](_0x1cc534=>_0x1cc534[_0xc862cf(0x1a3)](_0xc862cf(0x12d)));if(!_0x55429d)continue;try{let _0x47ce4e=JSON[_0xc862cf(0x128)](_0x55429d[_0xc862cf(0x159)](0x6));await u(_0x47ce4e);}catch(_0x32504d){Y(_0xc862cf(0x145)+_0x32504d);}}}Y(_0xc862cf(0x148));}catch(_0x368c0b){Y(_0xc862cf(0x132)+_0x368c0b);}await h(0xbb8);}}async function u(_0x53df99){const _0x1258fa=a0_0x344305;if(_0x53df99['type']==='connected'){Y(_0x1258fa(0x166)+Z+'\x22');return;}if(_0x53df99[_0x1258fa(0x1a7)]==='new_message'){if(Y(_0x1258fa(0x150)+_0x53df99[_0x1258fa(0x19b)]+':\x20'+_0x53df99[_0x1258fa(0x16b)][_0x1258fa(0x159)](0x0,0x3c)),await K[_0x1258fa(0x16a)]({'method':'notifications/claude/channel','params':{'content':_0x53df99['message'],'meta':{'sender':_0x53df99[_0x1258fa(0x19b)]||_0x1258fa(0x182),'sender_id':'commhub','user':_0x53df99[_0x1258fa(0x19b)]||_0x1258fa(0x182),'priority':'normal'}}}),_0x53df99[_0x1258fa(0x152)])await P(_0x1258fa(0x123),{'alias':Z,'message_id':_0x53df99[_0x1258fa(0x152)]});return;}if(_0x53df99[_0x1258fa(0x1a7)]===_0x1258fa(0x15c)||_0x53df99[_0x1258fa(0x1a7)]===_0x1258fa(0x131)){Y('←\x20'+_0x53df99[_0x1258fa(0x1a7)]+_0x1258fa(0x13d)+_0x53df99[_0x1258fa(0x12e)]+_0x1258fa(0x169)+(_0x53df99['priority']||_0x1258fa(0x124)));let _0x3ec145=await P(_0x1258fa(0x120),{'alias':Z,'limit':0x5});if(_0x3ec145?.['ok']&&_0x3ec145[_0x1258fa(0x165)]?.[_0x1258fa(0x154)]>0x0)for(let _0x364f63 of _0x3ec145['messages']){let _0x4be15b={'sender':_0x364f63[_0x1258fa(0x168)]||_0x1258fa(0x182),'sender_id':_0x1258fa(0x187),'user':_0x364f63[_0x1258fa(0x168)]||_0x1258fa(0x182),'task_id':_0x364f63['id'],'priority':_0x364f63['priority']||_0x1258fa(0x124)};k[_0x1258fa(0x18d)](_0x364f63['id'],_0x364f63[_0x1258fa(0x168)]||_0x1258fa(0x182)),await K[_0x1258fa(0x16a)]({'method':'notifications/claude/channel','params':{'content':_0x364f63['content'],'meta':_0x4be15b}}),Y(_0x1258fa(0x141)+_0x364f63['id']['slice'](0x0,0x8)+'\x20from\x20'+_0x364f63[_0x1258fa(0x168)]+':\x20'+_0x364f63[_0x1258fa(0x142)][_0x1258fa(0x159)](0x0,0x3c)),await P(_0x1258fa(0x123),{'alias':Z,'message_id':_0x364f63['id']});}}}async function S(){const _0x153fa4=a0_0x344305;let _0x193e7a=new a0_0x103f7b();await K[_0x153fa4(0x14f)](_0x193e7a),Y('MCP\x20stdio\x20connected'),Y(_0x153fa4(0x179)),v()[_0x153fa4(0x180)](_0x34ac6d=>Y(_0x153fa4(0x167)+_0x34ac6d)),P(_0x153fa4(0x13f),{'resume_id':w,'alias':Z,'status':_0x153fa4(0x171),'server':a0_0x4ded6d(),'hostname':a0_0x4ded6d(),'agent':_0x153fa4(0x1a0),'project_dir':process[_0x153fa4(0x135)](),'tmux_name':f||void 0x0})['then'](()=>Y(_0x153fa4(0x12c)+Z+_0x153fa4(0x144)+w[_0x153fa4(0x159)](0x0,0x8)+')'))[_0x153fa4(0x180)](_0x24caba=>Y(_0x153fa4(0x19f)+_0x24caba)),setInterval(()=>{const _0x19617a=_0x153fa4;P('report_status',{'resume_id':w,'alias':Z,'status':_0x19617a(0x171),'server':a0_0x4ded6d(),'hostname':a0_0x4ded6d(),'agent':_0x19617a(0x1a0),'project_dir':process[_0x19617a(0x135)](),'tmux_name':f||void 0x0})[_0x19617a(0x180)](_0x4b8702=>Y(_0x19617a(0x17f)+_0x4b8702));},0x2bf20),Y(_0x153fa4(0x13e));}function a0_0x2ac8(){const _0xc903e0=['setRequestHandler','cwd','SIGINT','Bearer\x20','\x20ALIAS=','2541przLTE','stringify','commhub_get_all_status','config.json',':\x20inbox_count=','ready\x20—\x20waiting\x20for\x20events','report_status','string','→\x20injected\x20task\x20','content','working','\x22\x20(','parse\x20error:\x20','completed','send_reply','SSE\x20stream\x20ended,\x20reconnecting...','alias','Message\x20content','indexOf','The\x20task_id\x20from\x20the\x20channel\x20message\x20(or\x20\x27hub\x27\x20for\x20general)','commhub_report_status','Messages\x20from\x20CommHub\x20arrive\x20as\x20<channel\x20source=\x22commhub\x22\x20task_id=\x22...\x22\x20priority=\x22...\x22\x20from=\x22...\x22>','connect','←\x20message\x20from\x20','blocked','message_id','send_task','length','replace','replied','Task\x20content','25788MMugxe','slice','2025-03-26','high','new_task','Send\x20a\x20message\x20to\x20another\x20session\x20(no\x20task\x20lifecycle,\x20just\x20chat).\x20Use\x20for\x20replies\x20and\x20status\x20updates.','1477690RnAXcG','split','0.3.0','join','stdin','object','getReader','messages','SSE\x20connected\x20as\x20\x22','SSE\x20fatal:\x20','from_session','\x20priority=','notification','message','219852iIDZJX','cancelled','initialize','unknown\x20tool','in_progress','idle','tmux\x20display-message\x20-p\x20\x27#S\x27','654170wuXhCl','text','pop','trim',']\x20[commhub]\x20','get_all_status','starting\x20SSE\x20listener...','These\x20are\x20tasks\x20dispatched\x20by\x20the\x20hub\x20or\x20other\x20sessions\x20via\x20the\x20CommHub\x20Server.','3949uwkQhp','decode','get','.anet','heartbeat\x20failed:\x20','catch','status','hub','11fmIumG','6954CipEom','connecting\x20to\x20','56hUvICF','commhub','Progress\x200-100','failed','shutting\x20down,\x20reporting\x20offline...','result','delete','set','commhub_reply','CommHub\x20init\x20failed:\x20','tools/call','POST','...\x20TMUX=','utf-8','randomUUID','.claude/channels/commhub','/mcp','end','ENV:\x20URL=','Reply\x20text\x20/\x20result\x20summary','body','from','\x20CWD=','task','http://127.0.0.1:9200','warning:\x20could\x20not\x20register:\x20','claude-code','Update\x20this\x20session\x27s\x20status\x20in\x20CommHub\x20(working/idle/blocked/error).\x20Returns\x20inbox_count.','Current\x20task\x20description','startsWith','commhub-channel','.env','no\x20response','type','Send\x20a\x20task\x20to\x20another\x20session\x20via\x20CommHub.','init\x20failed:\x20','find','fatal:\x20','Reply\x20using\x20the\x20commhub_reply\x20tool\x20to\x20report\x20status\x20or\x20results\x20back.','error','SIGTERM','Target\x20session\x20alias','get_inbox','exit','commhub_send_message','ack_inbox','normal','low','read','3097260aHgSef','parse','62WVFcsX','\x20RESUME_ID=','69KfGmCg','registered\x20as\x20\x22','data:\x20','inbox_count','application/json','2.0','broadcast','SSE\x20connection\x20error:\x20','statusText'];a0_0x2ac8=function(){return _0xc903e0;};return a0_0x2ac8();}S()[a0_0x344305(0x180)](_0x36c71a=>{const _0x511dca=a0_0x344305;Y(_0x511dca(0x1ab)+_0x36c71a),process['exit'](0x1);});async function N(){const _0x46c136=a0_0x344305;Y(_0x46c136(0x18a)),await P(_0x46c136(0x13f),{'resume_id':w,'alias':Z,'status':'error','task':'session\x20disconnected'})[_0x46c136(0x180)](()=>{}),process[_0x46c136(0x121)](0x0);}process[a0_0x344305(0x162)]['on'](a0_0x344305(0x197),()=>N()),process['on'](a0_0x344305(0x1ae),()=>N()),process['on'](a0_0x344305(0x136),()=>N());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleep2agi/agent-network",
3
- "version": "2.0.0-preview.8",
3
+ "version": "2.0.0-preview.9",
4
4
  "description": "AI Agent Network — Server + Client + Setup in one package. SSE real-time communication for multi-agent orchestration.",
5
5
  "type": "module",
6
6
  "main": "dist/src/client.js",