@sleep2agi/agent-network 2.1.15-preview.3 → 2.1.15-preview.5

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_0x1f9b62=a0_0x50c3;(function(_0x247e8b,_0x424e00){const _0x580d08=a0_0x50c3,_0x2a7053=_0x247e8b();while(!![]){try{const _0xedea8=parseInt(_0x580d08(0x169))/0x1*(parseInt(_0x580d08(0x162))/0x2)+-parseInt(_0x580d08(0x161))/0x3+parseInt(_0x580d08(0x183))/0x4*(parseInt(_0x580d08(0x163))/0x5)+parseInt(_0x580d08(0x156))/0x6+-parseInt(_0x580d08(0x165))/0x7+parseInt(_0x580d08(0x189))/0x8+-parseInt(_0x580d08(0x15a))/0x9;if(_0xedea8===_0x424e00)break;else _0x2a7053['push'](_0x2a7053['shift']());}catch(_0x12fff5){_0x2a7053['push'](_0x2a7053['shift']());}}}(a0_0x3f0e,0xccd98));import{EventEmitter as a0_0x5e539f}from'events';function a0_0x3f0e(){const _0x4fa657=['parse','alias','call','abort',']\x20[commhub:','2.0','SSE\x20reconnecting\x20in\x20','min','application/json,\x20text/event-stream','from_session','now','registered','4tCgLoT','match','disconnected','split','pop','/mcp','1077408NNgxUO','emit','sseAbort','messages','heartbeatTimer','running','SSE\x20failed:\x20','stringify','inbox\x20error:\x20','getReader','normal','autoConnect','reconnectDelay','data:\x20','token','getAllStatus','send_task','url','disconnect','reply','offline','report_status','catch','message','resumeId','heartbeat\x20failed:\x20','connected','replace','get_inbox','heartbeatInterval','ack_inbox','send','processInbox','type','read','idle','content','5638950IjOrwq','slice','agent','Bearer\x20','5654151narrMl','Authorization','name','sleep','result','status','toString','139143GkxbFG','2cRWXNa','1068505UlXKpz','new_message','3576524uZHTGF','new_task','startsWith','/events/','736414sOTgBz','connectSSE','text','broadcast','task','body','log','POST','decode','send_message','signal','SSE\x20connected','SSE\x20error:\x20','send_reply'];a0_0x3f0e=function(){return _0x4fa657;};return a0_0x3f0e();}import{hostname as a0_0x3a9c80}from'os';class T extends a0_0x5e539f{[a0_0x1f9b62(0x142)];['alias'];[a0_0x1f9b62(0x13f)];[a0_0x1f9b62(0x158)];['resumeId'];[a0_0x1f9b62(0x14e)];[a0_0x1f9b62(0x195)];[a0_0x1f9b62(0x18d)];[a0_0x1f9b62(0x18b)];[a0_0x1f9b62(0x18e)]=!0x1;constructor(_0x2d969e){const _0x52695c=a0_0x1f9b62;super();if(this[_0x52695c(0x142)]=_0x2d969e[_0x52695c(0x142)][_0x52695c(0x14c)](/\/$/,''),this[_0x52695c(0x178)]=_0x2d969e[_0x52695c(0x178)],this[_0x52695c(0x13f)]=_0x2d969e[_0x52695c(0x13f)],this[_0x52695c(0x158)]=_0x2d969e[_0x52695c(0x158)]||'sdk',this[_0x52695c(0x149)]='sdk-'+_0x2d969e[_0x52695c(0x178)]+'-'+Date['now']()[_0x52695c(0x160)](0x24),this['heartbeatInterval']=_0x2d969e['heartbeatInterval']??0x2bf20,this[_0x52695c(0x195)]=_0x2d969e[_0x52695c(0x195)]??0xbb8,_0x2d969e[_0x52695c(0x194)]!==!0x1)this['connect']();}[a0_0x1f9b62(0x16f)](_0x4f6aa1){const _0x11bcc3=a0_0x1f9b62;console[_0x11bcc3(0x16f)]('['+new Date()['toTimeString']()['slice'](0x0,0x8)+_0x11bcc3(0x17b)+this['alias']+']\x20'+_0x4f6aa1);}async[a0_0x1f9b62(0x179)](_0x1cbc59,_0x5c89e8){const _0x2f509b=a0_0x1f9b62;let _0x529faa={'Content-Type':'application/json','Accept':_0x2f509b(0x17f)};if(this['token'])_0x529faa[_0x2f509b(0x15b)]=_0x2f509b(0x159)+this[_0x2f509b(0x13f)];let _0x44ce1c=await(await fetch(this[_0x2f509b(0x142)]+_0x2f509b(0x188),{'method':_0x2f509b(0x170),'headers':_0x529faa,'body':JSON[_0x2f509b(0x190)]({'jsonrpc':_0x2f509b(0x17c),'id':Date[_0x2f509b(0x181)](),'method':'tools/call','params':{'name':_0x1cbc59,'arguments':_0x5c89e8}})}))['text'](),_0x415853=_0x44ce1c[_0x2f509b(0x184)](/data: (.+)/),_0x5ab620=_0x415853?JSON['parse'](_0x415853[0x1]):JSON[_0x2f509b(0x177)](_0x44ce1c),_0x21677f=_0x5ab620?.[_0x2f509b(0x15e)]?.[_0x2f509b(0x155)]?.[0x0]?.[_0x2f509b(0x16b)];return _0x21677f?JSON['parse'](_0x21677f):_0x5ab620;}async['connect'](){const _0x1db8b9=a0_0x1f9b62;if(this[_0x1db8b9(0x18e)])return;this[_0x1db8b9(0x18e)]=!0x0,await this['status'](_0x1db8b9(0x154)),this[_0x1db8b9(0x16f)](_0x1db8b9(0x182)),this[_0x1db8b9(0x18d)]=setInterval(()=>{const _0x121bf9=_0x1db8b9;this['status'](_0x121bf9(0x154))['catch'](_0xa86c2a=>this[_0x121bf9(0x16f)](_0x121bf9(0x14a)+_0xa86c2a[_0x121bf9(0x148)]));},this[_0x1db8b9(0x14e)]),this[_0x1db8b9(0x16a)]();}async[a0_0x1f9b62(0x143)](){const _0x58770e=a0_0x1f9b62;if(this[_0x58770e(0x18e)]=!0x1,this[_0x58770e(0x18b)]?.[_0x58770e(0x17a)](),this[_0x58770e(0x18d)])clearInterval(this[_0x58770e(0x18d)]);await this[_0x58770e(0x15f)](_0x58770e(0x145))[_0x58770e(0x147)](()=>{}),this[_0x58770e(0x16f)]('disconnected');}async[a0_0x1f9b62(0x150)](_0x337d1c,_0x46aa67,_0x1613a0=a0_0x1f9b62(0x193)){const _0x4748a8=a0_0x1f9b62;return this[_0x4748a8(0x179)](_0x4748a8(0x141),{'alias':_0x337d1c,'task':_0x46aa67,'priority':_0x1613a0,'from_session':this[_0x4748a8(0x178)]});}async[a0_0x1f9b62(0x148)](_0x55ba13,_0x46e712){const _0x505d06=a0_0x1f9b62;return this[_0x505d06(0x179)](_0x505d06(0x172),{'alias':_0x55ba13,'message':_0x46e712,'from_session':this[_0x505d06(0x178)]});}async[a0_0x1f9b62(0x144)](_0x1fe995,_0x3a18b0,_0x73e3e2='completed'){const _0x1f729a=a0_0x1f9b62;return this[_0x1f729a(0x179)](_0x1f729a(0x176),{'in_reply_to':_0x1fe995,'text':_0x3a18b0,'status':_0x73e3e2});}async[a0_0x1f9b62(0x15f)](_0x51f71a,_0x4cdefb){const _0x1724de=a0_0x1f9b62;return this[_0x1724de(0x179)](_0x1724de(0x146),{'resume_id':this[_0x1724de(0x149)],'alias':this[_0x1724de(0x178)],'status':_0x51f71a,'server':a0_0x3a9c80(),'hostname':a0_0x3a9c80(),'agent':this['agent'],'project_dir':process['cwd'](),..._0x4cdefb});}async[a0_0x1f9b62(0x140)](){const _0xc4ff23=a0_0x1f9b62;return this[_0xc4ff23(0x179)]('get_all_status',{});}async['broadcast'](_0x21eade,_0x4d3bbc){const _0x902c97=a0_0x1f9b62;return this[_0x902c97(0x179)]('broadcast',{'message':_0x21eade,'filter_server':_0x4d3bbc?.['server'],'filter_status':_0x4d3bbc?.[_0x902c97(0x15f)]});}async['connectSSE'](){const _0x2379c7=a0_0x1f9b62;let _0x4af5f5=encodeURIComponent(this[_0x2379c7(0x178)]),_0xbe8937=this['url']+_0x2379c7(0x168)+_0x4af5f5,_0x208af2=this[_0x2379c7(0x195)];while(this[_0x2379c7(0x18e)]){try{this['sseAbort']=new AbortController();let _0x255751={'Accept':'text/event-stream'};if(this[_0x2379c7(0x13f)])_0x255751['Authorization']='Bearer\x20'+this[_0x2379c7(0x13f)];let _0x3f0ed1=await fetch(_0xbe8937,{'headers':_0x255751,'signal':this[_0x2379c7(0x18b)][_0x2379c7(0x173)]});if(!_0x3f0ed1['ok']||!_0x3f0ed1[_0x2379c7(0x16e)]){this[_0x2379c7(0x16f)](_0x2379c7(0x18f)+_0x3f0ed1[_0x2379c7(0x15f)]),await this['sleep'](_0x208af2),_0x208af2=Math[_0x2379c7(0x17e)](_0x208af2*1.5,0xea60);continue;}_0x208af2=this[_0x2379c7(0x195)];let _0x459861=_0x3f0ed1[_0x2379c7(0x16e)][_0x2379c7(0x192)](),_0x354e23=new TextDecoder(),_0x3ff66f='';while(this[_0x2379c7(0x18e)]){let {done:_0xf203ac,value:_0x5b2847}=await _0x459861[_0x2379c7(0x153)]();if(_0xf203ac)break;_0x3ff66f+=_0x354e23[_0x2379c7(0x171)](_0x5b2847,{'stream':!0x0});let _0x13da12=_0x3ff66f[_0x2379c7(0x186)]('\x0a');_0x3ff66f=_0x13da12[_0x2379c7(0x187)]()||'';for(let _0x41b9d5 of _0x13da12){if(!_0x41b9d5[_0x2379c7(0x167)](_0x2379c7(0x13e)))continue;try{let _0x455d9f=JSON[_0x2379c7(0x177)](_0x41b9d5[_0x2379c7(0x157)](0x6));if(_0x455d9f[_0x2379c7(0x152)]===_0x2379c7(0x14b)){this[_0x2379c7(0x16f)](_0x2379c7(0x174)),this[_0x2379c7(0x18a)](_0x2379c7(0x14b));continue;}if(_0x455d9f['type']===_0x2379c7(0x166)||_0x455d9f[_0x2379c7(0x152)]===_0x2379c7(0x164)||_0x455d9f[_0x2379c7(0x152)]===_0x2379c7(0x16c))await this[_0x2379c7(0x151)]();}catch{}}}}catch(_0x3a6be3){if(_0x3a6be3[_0x2379c7(0x15c)]==='AbortError')break;this[_0x2379c7(0x18a)]('error',_0x3a6be3),this[_0x2379c7(0x16f)](_0x2379c7(0x175)+_0x3a6be3[_0x2379c7(0x148)]);}if(this[_0x2379c7(0x18e)])this[_0x2379c7(0x18a)](_0x2379c7(0x185)),this[_0x2379c7(0x16f)](_0x2379c7(0x17d)+_0x208af2/0x3e8+'s...'),await this[_0x2379c7(0x15d)](_0x208af2),_0x208af2=Math['min'](_0x208af2*1.5,0xea60);}}async[a0_0x1f9b62(0x151)](){const _0x4705cb=a0_0x1f9b62;try{let _0x53b4b9=(await this[_0x4705cb(0x179)](_0x4705cb(0x14d),{'alias':this['alias'],'limit':0xa}))?.[_0x4705cb(0x18c)]||[];for(let _0x35fe58 of _0x53b4b9)await this[_0x4705cb(0x179)](_0x4705cb(0x14f),{'alias':this[_0x4705cb(0x178)],'message_id':_0x35fe58['id']}),this[_0x4705cb(0x16f)]('←\x20'+_0x35fe58[_0x4705cb(0x180)]+':\x20'+_0x35fe58['content']['slice'](0x0,0x3c)),this['emit'](_0x4705cb(0x16d),_0x35fe58),this[_0x4705cb(0x18a)](_0x4705cb(0x148),_0x35fe58);}catch(_0x317bb7){this[_0x4705cb(0x16f)](_0x4705cb(0x191)+_0x317bb7[_0x4705cb(0x148)]);}}['sleep'](_0x4fe913){return new Promise(_0x3d5c1d=>setTimeout(_0x3d5c1d,_0x4fe913));}}var $=T;function a0_0x50c3(_0x589c6c,_0x4482c0){_0x589c6c=_0x589c6c-0x13e;const _0x3f0e01=a0_0x3f0e();let _0x50c337=_0x3f0e01[_0x589c6c];return _0x50c337;}export{$ as default,T as CommHub};
1
+ function a0_0x2f92(_0x83de4,_0x21682f){_0x83de4=_0x83de4-0xcb;const _0x5ae492=a0_0x5ae4();let _0x2f92d3=_0x5ae492[_0x83de4];return _0x2f92d3;}const a0_0x417a73=a0_0x2f92;(function(_0x3c50cb,_0x2263f0){const _0x5335eb=a0_0x2f92,_0x5386a4=_0x3c50cb();while(!![]){try{const _0x444adc=parseInt(_0x5335eb(0xef))/0x1*(-parseInt(_0x5335eb(0x10d))/0x2)+parseInt(_0x5335eb(0x11f))/0x3+-parseInt(_0x5335eb(0xd1))/0x4*(-parseInt(_0x5335eb(0x118))/0x5)+-parseInt(_0x5335eb(0x105))/0x6*(-parseInt(_0x5335eb(0xf1))/0x7)+-parseInt(_0x5335eb(0xf0))/0x8*(-parseInt(_0x5335eb(0x11b))/0x9)+-parseInt(_0x5335eb(0xd4))/0xa+parseInt(_0x5335eb(0xe1))/0xb*(-parseInt(_0x5335eb(0xf6))/0xc);if(_0x444adc===_0x2263f0)break;else _0x5386a4['push'](_0x5386a4['shift']());}catch(_0x131302){_0x5386a4['push'](_0x5386a4['shift']());}}}(a0_0x5ae4,0x42fe1));import{EventEmitter as a0_0x5baffe}from'events';function a0_0x5ae4(){const _0x507ebf=['AbortError','1092dtWjbB','send_message','error','626470JEIcoU','reply','Bearer\x20','registered','slice','call','read','decode','SSE\x20connected','task','completed','broadcast','running','751531hjirBy','message','emit','now','catch','token','getAllStatus','application/json','heartbeatInterval','offline','signal','send_task','sleep','content','186CnTcIL','2423576yIorIi','26327htUjCf','replace','report_status','s...','server','72noHejh','abort','send',']\x20[commhub:','idle','Authorization','from_session','processInbox','cwd','startsWith','split','resumeId','min','match','normal','408CjYmwP','reconnectDelay','disconnected','data:\x20','new_message','alias','status','sdk-','42JKaIBo','/mcp','send_reply','log','result','connect','connectSSE','connected','SSE\x20reconnecting\x20in\x20','type','parse','3155pOTcWu','text','sseAbort','9rHjdmH','inbox\x20error:\x20','stringify','url','59766lXaZUT','heartbeatTimer','ack_inbox','application/json,\x20text/event-stream','SSE\x20error:\x20','name','agent','text/event-stream'];a0_0x5ae4=function(){return _0x507ebf;};return a0_0x5ae4();}import{hostname as a0_0x3864dd}from'os';class T extends a0_0x5baffe{[a0_0x417a73(0x11e)];[a0_0x417a73(0x10a)];[a0_0x417a73(0xe6)];[a0_0x417a73(0xce)];['resumeId'];[a0_0x417a73(0xe9)];[a0_0x417a73(0x106)];[a0_0x417a73(0x120)];[a0_0x417a73(0x11a)];[a0_0x417a73(0xe0)]=!0x1;constructor(_0x399b6f){const _0x298687=a0_0x417a73;super();if(this[_0x298687(0x11e)]=_0x399b6f[_0x298687(0x11e)][_0x298687(0xf2)](/\/$/,''),this[_0x298687(0x10a)]=_0x399b6f[_0x298687(0x10a)],this[_0x298687(0xe6)]=_0x399b6f[_0x298687(0xe6)],this['agent']=_0x399b6f[_0x298687(0xce)]||'sdk',this[_0x298687(0x101)]=_0x298687(0x10c)+_0x399b6f['alias']+'-'+Date[_0x298687(0xe4)]()['toString'](0x24),this[_0x298687(0xe9)]=_0x399b6f['heartbeatInterval']??0x2bf20,this[_0x298687(0x106)]=_0x399b6f[_0x298687(0x106)]??0xbb8,_0x399b6f['autoConnect']!==!0x1)this['connect']();}[a0_0x417a73(0x110)](_0xa1cce6){const _0x36180a=a0_0x417a73;console['log']('['+new Date()['toTimeString']()[_0x36180a(0xd8)](0x0,0x8)+_0x36180a(0xf9)+this[_0x36180a(0x10a)]+']\x20'+_0xa1cce6);}async['call'](_0x68273c,_0x428fd3){const _0xebd738=a0_0x417a73;let _0x537ea4={'Content-Type':_0xebd738(0xe8),'Accept':_0xebd738(0xcb)};if(this[_0xebd738(0xe6)])_0x537ea4[_0xebd738(0xfb)]='Bearer\x20'+this[_0xebd738(0xe6)];let _0x3f4181=await(await fetch(this[_0xebd738(0x11e)]+_0xebd738(0x10e),{'method':'POST','headers':_0x537ea4,'body':JSON[_0xebd738(0x11d)]({'jsonrpc':'2.0','id':Date['now'](),'method':'tools/call','params':{'name':_0x68273c,'arguments':_0x428fd3}})}))[_0xebd738(0x119)](),_0x3ee1de=_0x3f4181[_0xebd738(0x103)](/data: (.+)/),_0x26a3b5=_0x3ee1de?JSON[_0xebd738(0x117)](_0x3ee1de[0x1]):JSON[_0xebd738(0x117)](_0x3f4181),_0x3671d2=_0x26a3b5?.[_0xebd738(0x111)]?.[_0xebd738(0xee)]?.[0x0]?.['text'];return _0x3671d2?JSON['parse'](_0x3671d2):_0x26a3b5;}async[a0_0x417a73(0x112)](){const _0x168fe3=a0_0x417a73;if(this[_0x168fe3(0xe0)])return;this[_0x168fe3(0xe0)]=!0x0,await this[_0x168fe3(0x10b)]('idle'),this[_0x168fe3(0x110)](_0x168fe3(0xd7)),this[_0x168fe3(0x120)]=setInterval(()=>{const _0x14d3f7=_0x168fe3;this[_0x14d3f7(0x10b)](_0x14d3f7(0xfa))[_0x14d3f7(0xe5)](_0x15a7a6=>this[_0x14d3f7(0x110)]('heartbeat\x20failed:\x20'+_0x15a7a6[_0x14d3f7(0xe2)]));},this[_0x168fe3(0xe9)]),this[_0x168fe3(0x113)]();}async['disconnect'](){const _0x2595db=a0_0x417a73;if(this[_0x2595db(0xe0)]=!0x1,this[_0x2595db(0x11a)]?.[_0x2595db(0xf7)](),this['heartbeatTimer'])clearInterval(this[_0x2595db(0x120)]);await this['status'](_0x2595db(0xea))['catch'](()=>{}),this[_0x2595db(0x110)](_0x2595db(0x107));}async[a0_0x417a73(0xf8)](_0x80f2aa,_0x1ad3de,_0x5755fe=a0_0x417a73(0x104)){const _0x2a570e=a0_0x417a73;return this[_0x2a570e(0xd9)](_0x2a570e(0xec),{'alias':_0x80f2aa,'task':_0x1ad3de,'priority':_0x5755fe,'from_session':this[_0x2a570e(0x10a)]});}async['message'](_0x176689,_0x375fe8){const _0x2736f6=a0_0x417a73;return this[_0x2736f6(0xd9)](_0x2736f6(0xd2),{'alias':_0x176689,'message':_0x375fe8,'from_session':this[_0x2736f6(0x10a)]});}async[a0_0x417a73(0xd5)](_0x4b8377,_0x4e1bb8,_0x236c19=a0_0x417a73(0xde)){const _0x218573=a0_0x417a73;return this[_0x218573(0xd9)](_0x218573(0x10f),{'in_reply_to':_0x4b8377,'text':_0x4e1bb8,'status':_0x236c19});}async['status'](_0x3e78fa,_0xfa3c57){const _0x61c30b=a0_0x417a73;return this[_0x61c30b(0xd9)](_0x61c30b(0xf3),{'resume_id':this[_0x61c30b(0x101)],'alias':this[_0x61c30b(0x10a)],'status':_0x3e78fa,'server':a0_0x3864dd(),'hostname':a0_0x3864dd(),'agent':this['agent'],'project_dir':process[_0x61c30b(0xfe)](),..._0xfa3c57});}async[a0_0x417a73(0xe7)](){const _0xc58e12=a0_0x417a73;return this[_0xc58e12(0xd9)]('get_all_status',{});}async[a0_0x417a73(0xdf)](_0x20146f,_0x451823){const _0x4c3255=a0_0x417a73;return this[_0x4c3255(0xd9)]('broadcast',{'message':_0x20146f,'filter_server':_0x451823?.[_0x4c3255(0xf5)],'filter_status':_0x451823?.[_0x4c3255(0x10b)]});}async[a0_0x417a73(0x113)](){const _0x1dc235=a0_0x417a73;let _0x56458a=encodeURIComponent(this[_0x1dc235(0x10a)]),_0x18be31=this[_0x1dc235(0x11e)]+'/events/'+_0x56458a,_0x3a43b7=this[_0x1dc235(0x106)];while(this['running']){try{this['sseAbort']=new AbortController();let _0x2c3a58={'Accept':_0x1dc235(0xcf)};if(this[_0x1dc235(0xe6)])_0x2c3a58['Authorization']=_0x1dc235(0xd6)+this[_0x1dc235(0xe6)];let _0x5da9f6=await fetch(_0x18be31,{'headers':_0x2c3a58,'signal':this[_0x1dc235(0x11a)][_0x1dc235(0xeb)]});if(!_0x5da9f6['ok']||!_0x5da9f6['body']){this[_0x1dc235(0x110)]('SSE\x20failed:\x20'+_0x5da9f6[_0x1dc235(0x10b)]),await this[_0x1dc235(0xed)](_0x3a43b7),_0x3a43b7=Math[_0x1dc235(0x102)](_0x3a43b7*1.5,0xea60);continue;}_0x3a43b7=this[_0x1dc235(0x106)];let _0x1e79a4=_0x5da9f6['body']['getReader'](),_0x598558=new TextDecoder(),_0x48afd4='';while(this[_0x1dc235(0xe0)]){let {done:_0x526b20,value:_0x3e00d9}=await _0x1e79a4[_0x1dc235(0xda)]();if(_0x526b20)break;_0x48afd4+=_0x598558[_0x1dc235(0xdb)](_0x3e00d9,{'stream':!0x0});let _0x5b0641=_0x48afd4[_0x1dc235(0x100)]('\x0a');_0x48afd4=_0x5b0641['pop']()||'';for(let _0x345308 of _0x5b0641){if(!_0x345308[_0x1dc235(0xff)](_0x1dc235(0x108)))continue;try{let _0xeadcc6=JSON['parse'](_0x345308['slice'](0x6));if(_0xeadcc6[_0x1dc235(0x116)]===_0x1dc235(0x114)){this[_0x1dc235(0x110)](_0x1dc235(0xdc)),this[_0x1dc235(0xe3)]('connected');continue;}if(_0xeadcc6[_0x1dc235(0x116)]==='new_task'||_0xeadcc6[_0x1dc235(0x116)]===_0x1dc235(0x109)||_0xeadcc6[_0x1dc235(0x116)]===_0x1dc235(0xdf))await this[_0x1dc235(0xfd)]();}catch{}}}}catch(_0x599158){if(_0x599158[_0x1dc235(0xcd)]===_0x1dc235(0xd0))break;this[_0x1dc235(0xe3)](_0x1dc235(0xd3),_0x599158),this[_0x1dc235(0x110)](_0x1dc235(0xcc)+_0x599158['message']);}if(this[_0x1dc235(0xe0)])this['emit'](_0x1dc235(0x107)),this[_0x1dc235(0x110)](_0x1dc235(0x115)+_0x3a43b7/0x3e8+_0x1dc235(0xf4)),await this[_0x1dc235(0xed)](_0x3a43b7),_0x3a43b7=Math['min'](_0x3a43b7*1.5,0xea60);}}async[a0_0x417a73(0xfd)](){const _0x5183e5=a0_0x417a73;try{let _0x13c677=(await this[_0x5183e5(0xd9)]('get_inbox',{'alias':this[_0x5183e5(0x10a)],'limit':0xa}))?.['messages']||[];for(let _0x2ccbbb of _0x13c677)await this[_0x5183e5(0xd9)](_0x5183e5(0x121),{'alias':this[_0x5183e5(0x10a)],'message_id':_0x2ccbbb['id']}),this[_0x5183e5(0x110)]('←\x20'+_0x2ccbbb[_0x5183e5(0xfc)]+':\x20'+_0x2ccbbb[_0x5183e5(0xee)][_0x5183e5(0xd8)](0x0,0x3c)),this[_0x5183e5(0xe3)](_0x5183e5(0xdd),_0x2ccbbb),this['emit']('message',_0x2ccbbb);}catch(_0x5ba342){this[_0x5183e5(0x110)](_0x5183e5(0x11c)+_0x5ba342[_0x5183e5(0xe2)]);}}[a0_0x417a73(0xed)](_0x35220e){return new Promise(_0x2ac8ff=>setTimeout(_0x2ac8ff,_0x35220e));}}var $=T;export{$ as default,T as CommHub};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env bun
2
- const a0_0x4f791c=a0_0x45ae;(function(_0x197b97,_0x32bb17){const _0x2b53ed=a0_0x45ae,_0x1c8c7b=_0x197b97();while(!![]){try{const _0x1b11fa=-parseInt(_0x2b53ed(0x244))/0x1*(parseInt(_0x2b53ed(0x272))/0x2)+parseInt(_0x2b53ed(0x220))/0x3+-parseInt(_0x2b53ed(0x25c))/0x4*(-parseInt(_0x2b53ed(0x24f))/0x5)+parseInt(_0x2b53ed(0x207))/0x6*(parseInt(_0x2b53ed(0x22a))/0x7)+-parseInt(_0x2b53ed(0x209))/0x8*(-parseInt(_0x2b53ed(0x239))/0x9)+parseInt(_0x2b53ed(0x236))/0xa+parseInt(_0x2b53ed(0x267))/0xb*(-parseInt(_0x2b53ed(0x22f))/0xc);if(_0x1b11fa===_0x32bb17)break;else _0x1c8c7b['push'](_0x1c8c7b['shift']());}catch(_0x20b875){_0x1c8c7b['push'](_0x1c8c7b['shift']());}}}(a0_0x5741,0x3d9e2));import{readFileSync as a0_0x168a55,existsSync as a0_0x3388c3}from'fs';import{randomUUID as a0_0x3cfa37}from'crypto';import{join as a0_0x9d2fc2}from'path';import{hostname as a0_0x3e041f}from'os';import{execSync as a0_0x3dc4eb}from'child_process';import{Server as a0_0x4fcfb0}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport as a0_0x100966}from'@modelcontextprotocol/sdk/server/stdio.js';import{ListToolsRequestSchema as a0_0x5dc3d1,CallToolRequestSchema as a0_0x544a38}from'@modelcontextprotocol/sdk/types.js';function p(_0x4c2e9b){const _0x3474b7=a0_0x45ae;if(!a0_0x3388c3(_0x4c2e9b))return;for(let _0x581673 of a0_0x168a55(_0x4c2e9b,_0x3474b7(0x219))[_0x3474b7(0x1fa)]('\x0a')){let _0x5b4106=_0x581673['trim']();if(!_0x5b4106||_0x5b4106[_0x3474b7(0x1f5)]('#'))continue;let _0x5ce316=_0x5b4106[_0x3474b7(0x217)]('=');if(_0x5ce316<0x0)continue;let _0x7129b6=_0x5b4106[_0x3474b7(0x251)](0x0,_0x5ce316)[_0x3474b7(0x21b)](),_0x2fbd4e=_0x5b4106[_0x3474b7(0x251)](_0x5ce316+0x1)[_0x3474b7(0x21b)]()[_0x3474b7(0x279)](/^["']|["']$/g,'');if(!process.env[_0x7129b6])process.env[_0x7129b6]=_0x2fbd4e;}}var C=process.env.HOME||'~',T=a0_0x9d2fc2(C,a0_0x4f791c(0x26c));p(a0_0x9d2fc2(T,a0_0x4f791c(0x27a)));var L=process[a0_0x4f791c(0x254)]()[a0_0x4f791c(0x279)](/\//g,'-');p(a0_0x9d2fc2(T,L,'.env'));function U(){const _0x480801=a0_0x4f791c;try{return a0_0x3dc4eb(_0x480801(0x21c),{'encoding':_0x480801(0x219),'timeout':0x7d0})[_0x480801(0x21b)]();}catch{return'';}}function a0_0x5741(){const _0x3f8a3c=['SSE\x20stream\x20ended,\x20reconnecting...','Reply\x20using\x20the\x20commhub_reply\x20tool\x20to\x20report\x20status\x20or\x20results\x20back.','claude-code','Target\x20session\x20alias','SIGTERM','2.0','get','You\x20can\x20also\x20use\x20commhub_report_status\x20to\x20update\x20your\x20session\x20status.','messages','Send\x20a\x20message\x20to\x20another\x20session\x20(no\x20task\x20lifecycle,\x20just\x20chat).\x20Use\x20for\x20replies\x20and\x20status\x20updates.','116526bihFXf','then','36968kmEjAU','\x20PROJECT_ENV=','Get\x20status\x20of\x20all\x20sessions\x20from\x20CommHub.','from_session','Reply\x20text\x20/\x20result\x20summary','hub','notifications/claude/channel','config.json','length','alias','setRequestHandler','send_reply','no\x20response','priority','indexOf','stdin','utf-8','\x22\x20(','trim','tmux\x20display-message\x20-p\x20\x27#S\x27','commhub_report_status','read','commhub-channel','1171245nKiOyb','MCP\x20stdio\x20connected','SSE\x20error:\x20',':\x20inbox_count=','connect','task','catch','new_task','Current\x20task\x20description','result','7rjSwwm','number','write','report_status','blocked','12WgQzLG','completed','commhub','application/json,\x20text/event-stream','\x20from\x20','status','commhub_send_message','2476540HbsYUB','delete','commhub_reply','558pBpGJF','message','string','find','Task\x20content','CommHub\x20init\x20failed:\x20','params','connecting\x20to\x20','SIGINT','content','text','13liDZQf','token','SSE\x20connection\x20error:\x20','warning:\x20could\x20not\x20register:\x20','idle','←\x20message\x20from\x20','Send\x20a\x20task\x20to\x20another\x20session\x20via\x20CommHub.','ack_inbox','Message\x20content','\x20priority=','commhub_get_all_status','619025zPucOY','from','slice','/events/','cancelled','cwd','send_message','data:\x20','set','decode','replied','stringify','SSE\x20fatal:\x20','8YIUCQN','Priority\x20(default:\x20normal)','commhub_send_task','body','error','Bearer\x20','working',']\x20[commhub]\x20','inbox_count','toTimeString','session\x20disconnected','9110299uvQEgL','getReader','unknown\x20tool','The\x20task_id\x20from\x20the\x20channel\x20message\x20(or\x20\x27hub\x27\x20for\x20general)','normal','.claude/channels/commhub','Authorization','0.3.0','notification','broadcast','\x20RESUME_ID=','17078XkKspR','message_id','application/json','ENV:\x20URL=','in_progress','failed','low','replace','.env','get_all_status','registered\x20as\x20\x22','parse','fatal:\x20','new_message','object','type','Progress\x200-100','http://127.0.0.1:9200','POST','none','/mcp','2025-03-26','startsWith','send_task','stderr','...\x20TMUX=','exit','split','starting\x20SSE\x20listener...','→\x20injected\x20task\x20'];a0_0x5741=function(){return _0x3f8a3c;};return a0_0x5741();}function v(){const _0x1d1ba5=a0_0x4f791c;try{let _0x48ffa6=a0_0x9d2fc2(C,'.anet',_0x1d1ba5(0x210));if(a0_0x3388c3(_0x48ffa6))return JSON[_0x1d1ba5(0x27d)](a0_0x168a55(_0x48ffa6,_0x1d1ba5(0x219)));}catch{}return{};}var H=v(),f=process.env.COMMHUB_URL||H[a0_0x4f791c(0x20e)]||a0_0x4f791c(0x283),j=process.env.COMMHUB_TMUX||U(),Z=process.env.COMMHUB_ALIAS||j||a0_0x3e041f(),w=process.env.COMMHUB_RESUME_ID||process.env.CLAUDE_RESUME_ID||a0_0x3cfa37(),X=process.env.COMMHUB_TOKEN||H[a0_0x4f791c(0x245)]||'';function Y(_0x26f9cf){const _0x161445=a0_0x4f791c;let _0x3679aa=new Date()[_0x161445(0x265)]()[_0x161445(0x251)](0x0,0x8);process[_0x161445(0x1f7)][_0x161445(0x22c)]('['+_0x3679aa+_0x161445(0x263)+_0x26f9cf+'\x0a');}function h(_0x3ac658){return new Promise(_0x36825a=>setTimeout(_0x36825a,_0x3ac658));}function a0_0x45ae(_0x36e349,_0x3dee81){_0x36e349=_0x36e349-0x1f3;const _0x574101=a0_0x5741();let _0x45ae65=_0x574101[_0x36e349];return _0x45ae65;}Y(a0_0x4f791c(0x275)+f+'\x20ALIAS='+Z+a0_0x4f791c(0x271)+w['slice'](0x0,0x8)+a0_0x4f791c(0x1f8)+(j||a0_0x4f791c(0x285))+'\x20CWD='+process[a0_0x4f791c(0x254)]()+a0_0x4f791c(0x20a)+L);var k=new Map(),K=new a0_0x4fcfb0({'name':a0_0x4f791c(0x21f),'version':'0.3.0'},{'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>','These\x20are\x20tasks\x20dispatched\x20by\x20the\x20hub\x20or\x20other\x20sessions\x20via\x20the\x20CommHub\x20Server.',a0_0x4f791c(0x1fe),a0_0x4f791c(0x204),'Session\x20alias:\x20'+Z]['join']('\x0a')});K[a0_0x4f791c(0x213)](a0_0x5dc3d1,async()=>({'tools':[{'name':a0_0x4f791c(0x238),'description':'Reply\x20to\x20a\x20CommHub\x20task\x20—\x20report\x20completion\x20or\x20send\x20a\x20message\x20back\x20to\x20the\x20hub.','inputSchema':{'type':a0_0x4f791c(0x280),'properties':{'task_id':{'type':a0_0x4f791c(0x23b),'description':a0_0x4f791c(0x26a)},'text':{'type':a0_0x4f791c(0x23b),'description':a0_0x4f791c(0x20d)},'status':{'type':a0_0x4f791c(0x23b),'enum':[a0_0x4f791c(0x230),a0_0x4f791c(0x277),a0_0x4f791c(0x253),a0_0x4f791c(0x22e),a0_0x4f791c(0x260),a0_0x4f791c(0x276)],'description':'Task\x20outcome:\x20completed/failed/cancelled\x20for\x20final\x20results,\x20blocked/error/in_progress\x20for\x20status\x20updates'}},'required':['text']}},{'name':'commhub_report_status','description':'Update\x20this\x20session\x27s\x20status\x20in\x20CommHub\x20(working/idle/blocked/error).\x20Returns\x20inbox_count.','inputSchema':{'type':a0_0x4f791c(0x280),'properties':{'status':{'type':a0_0x4f791c(0x23b),'enum':[a0_0x4f791c(0x262),a0_0x4f791c(0x248),a0_0x4f791c(0x22e),a0_0x4f791c(0x260)]},'task':{'type':a0_0x4f791c(0x23b),'description':a0_0x4f791c(0x228)},'progress':{'type':a0_0x4f791c(0x22b),'description':a0_0x4f791c(0x282)}},'required':[a0_0x4f791c(0x234)]}},{'name':a0_0x4f791c(0x25e),'description':a0_0x4f791c(0x24a),'inputSchema':{'type':a0_0x4f791c(0x280),'properties':{'alias':{'type':'string','description':'Target\x20session\x20alias'},'task':{'type':'string','description':a0_0x4f791c(0x23d)},'priority':{'type':a0_0x4f791c(0x23b),'enum':['high',a0_0x4f791c(0x26b),a0_0x4f791c(0x278)],'description':a0_0x4f791c(0x25d)}},'required':[a0_0x4f791c(0x212),a0_0x4f791c(0x225)]}},{'name':a0_0x4f791c(0x235),'description':a0_0x4f791c(0x206),'inputSchema':{'type':a0_0x4f791c(0x280),'properties':{'alias':{'type':a0_0x4f791c(0x23b),'description':a0_0x4f791c(0x200)},'message':{'type':a0_0x4f791c(0x23b),'description':a0_0x4f791c(0x24c)}},'required':[a0_0x4f791c(0x212),a0_0x4f791c(0x23a)]}},{'name':a0_0x4f791c(0x24e),'description':a0_0x4f791c(0x20b),'inputSchema':{'type':a0_0x4f791c(0x280),'properties':{}}}]}));async function P(_0x1a75aa,_0x33af56){const _0x53173b=a0_0x4f791c;let _0x31934f=await fetch(f+_0x53173b(0x1f3),{'method':_0x53173b(0x284),'headers':{'Content-Type':_0x53173b(0x274),'Accept':'application/json,\x20text/event-stream',...X?{'Authorization':'Bearer\x20'+X}:{}},'body':JSON[_0x53173b(0x25a)]({'jsonrpc':_0x53173b(0x202),'id':0x1,'method':'initialize','params':{'protocolVersion':_0x53173b(0x1f4),'capabilities':{},'clientInfo':{'name':'commhub-channel','version':_0x53173b(0x26e)}}})});if(!_0x31934f['ok']){let _0x51ba00=await _0x31934f[_0x53173b(0x243)]();return Y(_0x53173b(0x23e)+_0x31934f['status']+'\x20'+_0x51ba00[_0x53173b(0x251)](0x0,0x64)),{'ok':!0x1,'error':'init\x20failed:\x20'+_0x31934f['status']};}await _0x31934f[_0x53173b(0x243)]();let _0xeccea4=(await(await fetch(f+'/mcp',{'method':'POST','headers':{'Content-Type':_0x53173b(0x274),'Accept':_0x53173b(0x232),...X?{'Authorization':_0x53173b(0x261)+X}:{}},'body':JSON[_0x53173b(0x25a)]({'jsonrpc':_0x53173b(0x202),'id':0x2,'method':'tools/call','params':{'name':_0x1a75aa,'arguments':_0x33af56}})}))[_0x53173b(0x243)]())[_0x53173b(0x1fa)]('\x0a')[_0x53173b(0x23c)](_0x4dfae5=>_0x4dfae5[_0x53173b(0x1f5)](_0x53173b(0x256)));if(_0xeccea4){let _0xfaabf2=JSON['parse'](_0xeccea4[_0x53173b(0x251)](0x6));return _0xfaabf2?.[_0x53173b(0x229)]?.[_0x53173b(0x242)]?.[0x0]?.[_0x53173b(0x243)]?JSON[_0x53173b(0x27d)](_0xfaabf2[_0x53173b(0x229)][_0x53173b(0x242)][0x0]['text']):_0xfaabf2;}return{'ok':!0x1,'error':_0x53173b(0x215)};}K[a0_0x4f791c(0x213)](a0_0x544a38,async _0x1f175f=>{const _0x11308e=a0_0x4f791c;let {name:_0x5f30a9,arguments:_0x3ecb37}=_0x1f175f[_0x11308e(0x23f)];if(_0x5f30a9==='commhub_reply'){let {task_id:_0x1fb905,text:_0x201e81,status:_0x17730d}=_0x3ecb37;if(_0x17730d===_0x11308e(0x230)||_0x17730d===_0x11308e(0x277)||_0x17730d===_0x11308e(0x253)){let _0x896552=_0x17730d==='completed'?_0x11308e(0x259):_0x17730d,_0x196801=_0x1fb905?k[_0x11308e(0x203)](_0x1fb905)||_0x11308e(0x20e):_0x11308e(0x20e),_0x4c0e0f=await P(_0x11308e(0x214),{'alias':_0x196801,'text':_0x201e81,'in_reply_to':_0x1fb905||void 0x0,'status':_0x896552,'from_session':Z});if(_0x1fb905)k[_0x11308e(0x237)](_0x1fb905);return{'content':[{'type':'text','text':JSON[_0x11308e(0x25a)](_0x4c0e0f)}]};}let _0x619cd0=await P(_0x11308e(0x22d),{'resume_id':w,'alias':Z,'status':_0x17730d===_0x11308e(0x22e)?'blocked':_0x17730d==='error'?'error':_0x11308e(0x262),'task':_0x201e81[_0x11308e(0x251)](0x0,0xc8),'output':_0x201e81});return{'content':[{'type':_0x11308e(0x243),'text':JSON[_0x11308e(0x25a)](_0x619cd0)}]};}if(_0x5f30a9===_0x11308e(0x21d)){let {status:_0x22ec94,task:_0x3a10cf,progress:_0x577d9b}=_0x3ecb37,_0x1e8598=await P('report_status',{'resume_id':w,'alias':Z,'status':_0x22ec94,'task':_0x3a10cf,'progress':_0x577d9b});return{'content':[{'type':_0x11308e(0x243),'text':JSON[_0x11308e(0x25a)](_0x1e8598)}]};}if(_0x5f30a9===_0x11308e(0x25e)){let {alias:_0x459888,task:_0x2bd731,priority:_0x39a562}=_0x3ecb37,_0x55b792=await P(_0x11308e(0x1f6),{'alias':_0x459888,'task':_0x2bd731,'priority':_0x39a562||'normal','from_session':Z});return{'content':[{'type':_0x11308e(0x243),'text':JSON['stringify'](_0x55b792)}]};}if(_0x5f30a9==='commhub_send_message'){let {alias:_0x4e2c9d,message:_0x298fd4}=_0x3ecb37,_0x33fce9=await P(_0x11308e(0x255),{'alias':_0x4e2c9d,'message':_0x298fd4,'from_session':Z});return{'content':[{'type':_0x11308e(0x243),'text':JSON['stringify'](_0x33fce9)}]};}if(_0x5f30a9===_0x11308e(0x24e)){let _0x44bb63=await P(_0x11308e(0x27b),{});return{'content':[{'type':_0x11308e(0x243),'text':JSON[_0x11308e(0x25a)](_0x44bb63)}]};}return{'content':[{'type':'text','text':JSON['stringify']({'error':_0x11308e(0x269)})}]};});async function u(){const _0x52aedb=a0_0x4f791c;let _0xd8ac99=f+_0x52aedb(0x252)+encodeURIComponent(Z),_0x28b288={};if(X)_0x28b288[_0x52aedb(0x26d)]=_0x52aedb(0x261)+X;Y(_0x52aedb(0x240)+_0xd8ac99);while(!0x0){try{let _0x4930b0=await fetch(_0xd8ac99,{'headers':_0x28b288});if(!_0x4930b0['ok']){Y(_0x52aedb(0x222)+_0x4930b0[_0x52aedb(0x234)]+'\x20'+_0x4930b0['statusText']),await h(0x1388);continue;}let _0x49226e=_0x4930b0[_0x52aedb(0x25f)][_0x52aedb(0x268)](),_0x4b7a1f=new TextDecoder(),_0x4565ad='';while(!0x0){let {done:_0x4bcd92,value:_0x56c144}=await _0x49226e[_0x52aedb(0x21e)]();if(_0x4bcd92)break;_0x4565ad+=_0x4b7a1f[_0x52aedb(0x258)](_0x56c144,{'stream':!0x0});let _0x19971=_0x4565ad[_0x52aedb(0x1fa)]('\x0a\x0a');_0x4565ad=_0x19971['pop']()||'';for(let _0x31e5e3 of _0x19971){let _0x14e221=_0x31e5e3[_0x52aedb(0x1fa)]('\x0a')[_0x52aedb(0x23c)](_0x4f317f=>_0x4f317f['startsWith'](_0x52aedb(0x256)));if(!_0x14e221)continue;try{let _0x12d180=JSON['parse'](_0x14e221[_0x52aedb(0x251)](0x6));await S(_0x12d180);}catch(_0x8e24a5){Y('parse\x20error:\x20'+_0x8e24a5);}}}Y(_0x52aedb(0x1fd));}catch(_0x5ac016){Y(_0x52aedb(0x246)+_0x5ac016);}await h(0xbb8);}}async function S(_0x23c265){const _0x55139e=a0_0x4f791c;if(_0x23c265[_0x55139e(0x281)]==='connected'){Y('SSE\x20connected\x20as\x20\x22'+Z+'\x22');return;}if(_0x23c265[_0x55139e(0x281)]===_0x55139e(0x27f)){if(Y(_0x55139e(0x249)+_0x23c265[_0x55139e(0x250)]+':\x20'+_0x23c265[_0x55139e(0x23a)][_0x55139e(0x251)](0x0,0x3c)),await K[_0x55139e(0x26f)]({'method':_0x55139e(0x20f),'params':{'content':_0x23c265[_0x55139e(0x23a)],'meta':{'sender':_0x23c265[_0x55139e(0x250)]||_0x55139e(0x20e),'sender_id':_0x55139e(0x231),'user':_0x23c265[_0x55139e(0x250)]||_0x55139e(0x20e),'priority':_0x55139e(0x26b)}}}),_0x23c265[_0x55139e(0x273)])await P(_0x55139e(0x24b),{'alias':Z,'message_id':_0x23c265[_0x55139e(0x273)]});return;}if(_0x23c265[_0x55139e(0x281)]===_0x55139e(0x227)||_0x23c265[_0x55139e(0x281)]===_0x55139e(0x270)){Y('←\x20'+_0x23c265[_0x55139e(0x281)]+_0x55139e(0x223)+_0x23c265[_0x55139e(0x264)]+_0x55139e(0x24d)+(_0x23c265['priority']||_0x55139e(0x26b)));let _0x4ea0d8=await P('get_inbox',{'alias':Z,'limit':0x5});if(_0x4ea0d8?.['ok']&&_0x4ea0d8[_0x55139e(0x205)]?.[_0x55139e(0x211)]>0x0)for(let _0x2c9b52 of _0x4ea0d8[_0x55139e(0x205)]){let _0x1775aa={'sender':_0x2c9b52[_0x55139e(0x20c)]||'hub','sender_id':_0x55139e(0x231),'user':_0x2c9b52[_0x55139e(0x20c)]||_0x55139e(0x20e),'task_id':_0x2c9b52['id'],'priority':_0x2c9b52[_0x55139e(0x216)]||_0x55139e(0x26b)};k[_0x55139e(0x257)](_0x2c9b52['id'],_0x2c9b52['from_session']||_0x55139e(0x20e)),await K[_0x55139e(0x26f)]({'method':_0x55139e(0x20f),'params':{'content':_0x2c9b52[_0x55139e(0x242)],'meta':_0x1775aa}}),Y(_0x55139e(0x1fc)+_0x2c9b52['id'][_0x55139e(0x251)](0x0,0x8)+_0x55139e(0x233)+_0x2c9b52[_0x55139e(0x20c)]+':\x20'+_0x2c9b52[_0x55139e(0x242)][_0x55139e(0x251)](0x0,0x3c)),await P(_0x55139e(0x24b),{'alias':Z,'message_id':_0x2c9b52['id']});}}}async function A(){const _0x55b2bf=a0_0x4f791c;let _0x14cd69=new a0_0x100966();await K[_0x55b2bf(0x224)](_0x14cd69),Y(_0x55b2bf(0x221)),Y(_0x55b2bf(0x1fb)),u()[_0x55b2bf(0x226)](_0x5b68ee=>Y(_0x55b2bf(0x25b)+_0x5b68ee)),P(_0x55b2bf(0x22d),{'resume_id':w,'alias':Z,'status':_0x55b2bf(0x248),'server':a0_0x3e041f(),'hostname':a0_0x3e041f(),'agent':_0x55b2bf(0x1ff),'project_dir':process[_0x55b2bf(0x254)](),'tmux_name':j||void 0x0})[_0x55b2bf(0x208)](()=>Y(_0x55b2bf(0x27c)+Z+_0x55b2bf(0x21a)+w[_0x55b2bf(0x251)](0x0,0x8)+')'))[_0x55b2bf(0x226)](_0x507409=>Y(_0x55b2bf(0x247)+_0x507409)),setInterval(()=>{const _0x4b4103=_0x55b2bf;P('report_status',{'resume_id':w,'alias':Z,'status':'idle','server':a0_0x3e041f(),'hostname':a0_0x3e041f(),'agent':_0x4b4103(0x1ff),'project_dir':process[_0x4b4103(0x254)](),'tmux_name':j||void 0x0})['catch'](_0x1c754c=>Y('heartbeat\x20failed:\x20'+_0x1c754c));},0x2bf20),Y('ready\x20—\x20waiting\x20for\x20events');}A()['catch'](_0x2bb67f=>{const _0x3d997a=a0_0x4f791c;Y(_0x3d997a(0x27e)+_0x2bb67f),process[_0x3d997a(0x1f9)](0x1);});async function N(){const _0x267ab6=a0_0x4f791c;Y('shutting\x20down,\x20reporting\x20offline...'),await P(_0x267ab6(0x22d),{'resume_id':w,'alias':Z,'status':_0x267ab6(0x260),'task':_0x267ab6(0x266)})[_0x267ab6(0x226)](()=>{}),process['exit'](0x0);}process[a0_0x4f791c(0x218)]['on']('end',()=>N()),process['on'](a0_0x4f791c(0x201),()=>N()),process['on'](a0_0x4f791c(0x241),()=>N());
2
+ const a0_0x334e5a=a0_0x17ab;(function(_0x3742f8,_0x2b7df5){const _0x59b2e5=a0_0x17ab,_0x557dbc=_0x3742f8();while(!![]){try{const _0x1e9c44=parseInt(_0x59b2e5(0x17f))/0x1*(-parseInt(_0x59b2e5(0x1c7))/0x2)+parseInt(_0x59b2e5(0x169))/0x3+parseInt(_0x59b2e5(0x1cc))/0x4+-parseInt(_0x59b2e5(0x1d7))/0x5+-parseInt(_0x59b2e5(0x1ad))/0x6*(-parseInt(_0x59b2e5(0x1dd))/0x7)+parseInt(_0x59b2e5(0x193))/0x8*(parseInt(_0x59b2e5(0x1cd))/0x9)+parseInt(_0x59b2e5(0x1d4))/0xa*(-parseInt(_0x59b2e5(0x192))/0xb);if(_0x1e9c44===_0x2b7df5)break;else _0x557dbc['push'](_0x557dbc['shift']());}catch(_0x659563){_0x557dbc['push'](_0x557dbc['shift']());}}}(a0_0x59f8,0xb9855));import{readFileSync as a0_0x142533,existsSync as a0_0x2c131b}from'fs';import{randomUUID as a0_0x26c0bb}from'crypto';import{join as a0_0x109bdc}from'path';import{hostname as a0_0x370ff1}from'os';import{execSync as a0_0x34928d}from'child_process';import{Server as a0_0x4e07bb}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport as a0_0x8bed26}from'@modelcontextprotocol/sdk/server/stdio.js';import{ListToolsRequestSchema as a0_0x5c3967,CallToolRequestSchema as a0_0x24829c}from'@modelcontextprotocol/sdk/types.js';function p(_0x17ca4e){const _0x5156d9=a0_0x17ab;if(!a0_0x2c131b(_0x17ca4e))return;for(let _0x1e16cb of a0_0x142533(_0x17ca4e,_0x5156d9(0x1cb))[_0x5156d9(0x167)]('\x0a')){let _0xbbc5df=_0x1e16cb[_0x5156d9(0x178)]();if(!_0xbbc5df||_0xbbc5df['startsWith']('#'))continue;let _0x562e84=_0xbbc5df[_0x5156d9(0x1b2)]('=');if(_0x562e84<0x0)continue;let _0x1b95df=_0xbbc5df['slice'](0x0,_0x562e84)[_0x5156d9(0x178)](),_0x4782b0=_0xbbc5df[_0x5156d9(0x1e5)](_0x562e84+0x1)['trim']()[_0x5156d9(0x19f)](/^["']|["']$/g,'');if(!process.env[_0x1b95df])process.env[_0x1b95df]=_0x4782b0;}}var C=process.env.HOME||'~',T=a0_0x109bdc(C,a0_0x334e5a(0x15e));p(a0_0x109bdc(T,a0_0x334e5a(0x1c3)));var L=process[a0_0x334e5a(0x1b8)]()[a0_0x334e5a(0x19f)](/\//g,'-');function a0_0x17ab(_0x51ab6b,_0x5eb41f){_0x51ab6b=_0x51ab6b-0x158;const _0x59f835=a0_0x59f8();let _0x17ab8e=_0x59f835[_0x51ab6b];return _0x17ab8e;}p(a0_0x109bdc(T,L,'.env'));function U(){const _0x4a891a=a0_0x334e5a;try{return a0_0x34928d(_0x4a891a(0x172),{'encoding':_0x4a891a(0x1cb),'timeout':0x7d0})[_0x4a891a(0x178)]();}catch{return'';}}function v(){const _0x20914e=a0_0x334e5a;try{let _0x2ab8a0=a0_0x109bdc(C,_0x20914e(0x1d3),_0x20914e(0x19c));if(a0_0x2c131b(_0x2ab8a0))return JSON['parse'](a0_0x142533(_0x2ab8a0,'utf-8'));}catch{}return{};}var H=v(),f=process.env.COMMHUB_URL||H[a0_0x334e5a(0x16f)]||a0_0x334e5a(0x1d2),j=process.env.COMMHUB_TMUX||U(),Z=process.env.COMMHUB_ALIAS||j||a0_0x370ff1(),w=process.env.COMMHUB_RESUME_ID||process.env.CLAUDE_RESUME_ID||a0_0x26c0bb(),X=process.env.COMMHUB_TOKEN||H[a0_0x334e5a(0x168)]||'';function Y(_0x30d588){const _0x5b9a70=a0_0x334e5a;let _0x124c2d=new Date()[_0x5b9a70(0x1ca)]()['slice'](0x0,0x8);process[_0x5b9a70(0x19b)][_0x5b9a70(0x1c4)]('['+_0x124c2d+_0x5b9a70(0x16c)+_0x30d588+'\x0a');}function h(_0x2dfacd){return new Promise(_0x117f1b=>setTimeout(_0x117f1b,_0x2dfacd));}Y(a0_0x334e5a(0x17d)+f+a0_0x334e5a(0x162)+Z+a0_0x334e5a(0x196)+w['slice'](0x0,0x8)+a0_0x334e5a(0x158)+(j||'none')+a0_0x334e5a(0x184)+process['cwd']()+a0_0x334e5a(0x19a)+L);var k=new Map(),K=new a0_0x4e07bb({'name':a0_0x334e5a(0x15a),'version':a0_0x334e5a(0x1e0)},{'capabilities':{'experimental':{'claude/channel':{}},'tools':{}},'instructions':[a0_0x334e5a(0x1d9),a0_0x334e5a(0x1dc),a0_0x334e5a(0x1da),a0_0x334e5a(0x1a3),'Session\x20alias:\x20'+Z][a0_0x334e5a(0x190)]('\x0a')});K[a0_0x334e5a(0x1bd)](a0_0x5c3967,async()=>({'tools':[{'name':'commhub_reply','description':a0_0x334e5a(0x181),'inputSchema':{'type':a0_0x334e5a(0x1e7),'properties':{'task_id':{'type':a0_0x334e5a(0x1bc),'description':a0_0x334e5a(0x1c2)},'text':{'type':a0_0x334e5a(0x1bc),'description':a0_0x334e5a(0x1b3)},'status':{'type':a0_0x334e5a(0x1bc),'enum':['completed','failed',a0_0x334e5a(0x185),a0_0x334e5a(0x16b),a0_0x334e5a(0x1c1),'in_progress'],'description':'Task\x20outcome:\x20completed/failed/cancelled\x20for\x20final\x20results,\x20blocked/error/in_progress\x20for\x20status\x20updates'}},'required':[a0_0x334e5a(0x1ba)]}},{'name':a0_0x334e5a(0x1ae),'description':a0_0x334e5a(0x1a4),'inputSchema':{'type':'object','properties':{'status':{'type':'string','enum':[a0_0x334e5a(0x1c9),a0_0x334e5a(0x1c6),a0_0x334e5a(0x16b),'error']},'task':{'type':a0_0x334e5a(0x1bc),'description':'Current\x20task\x20description'},'progress':{'type':a0_0x334e5a(0x182),'description':a0_0x334e5a(0x170)}},'required':[a0_0x334e5a(0x161)]}},{'name':a0_0x334e5a(0x165),'description':'Send\x20a\x20task\x20to\x20another\x20session\x20via\x20CommHub.','inputSchema':{'type':'object','properties':{'alias':{'type':'string','description':a0_0x334e5a(0x1b9)},'task':{'type':a0_0x334e5a(0x1bc),'description':a0_0x334e5a(0x1a8)},'priority':{'type':'string','enum':[a0_0x334e5a(0x166),a0_0x334e5a(0x198),a0_0x334e5a(0x1b1)],'description':'Priority\x20(default:\x20normal)'}},'required':['alias','task']}},{'name':a0_0x334e5a(0x18a),'description':a0_0x334e5a(0x1e1),'inputSchema':{'type':'object','properties':{'alias':{'type':a0_0x334e5a(0x1bc),'description':a0_0x334e5a(0x1b9)},'message':{'type':a0_0x334e5a(0x1bc),'description':'Message\x20content'}},'required':[a0_0x334e5a(0x1ce),a0_0x334e5a(0x1b0)]}},{'name':a0_0x334e5a(0x18c),'description':a0_0x334e5a(0x177),'inputSchema':{'type':a0_0x334e5a(0x1e7),'properties':{}}}]}));async function P(_0x54cd37,_0x5d1f65){const _0x6bbc52=a0_0x334e5a;let _0x4da96a=await fetch(f+_0x6bbc52(0x19d),{'method':_0x6bbc52(0x163),'headers':{'Content-Type':'application/json','Accept':_0x6bbc52(0x1a7),...X?{'Authorization':_0x6bbc52(0x164)+X}:{}},'body':JSON['stringify']({'jsonrpc':_0x6bbc52(0x159),'id':0x1,'method':'initialize','params':{'protocolVersion':_0x6bbc52(0x171),'capabilities':{},'clientInfo':{'name':_0x6bbc52(0x15a),'version':_0x6bbc52(0x1e0)}}})});if(!_0x4da96a['ok']){let _0x4375f8=await _0x4da96a['text']();return Y('CommHub\x20init\x20failed:\x20'+_0x4da96a[_0x6bbc52(0x161)]+'\x20'+_0x4375f8['slice'](0x0,0x64)),{'ok':!0x1,'error':_0x6bbc52(0x16e)+_0x4da96a[_0x6bbc52(0x161)]};}await _0x4da96a['text']();let _0x44f027=(await(await fetch(f+'/mcp',{'method':_0x6bbc52(0x163),'headers':{'Content-Type':_0x6bbc52(0x1e4),'Accept':_0x6bbc52(0x1a7),...X?{'Authorization':_0x6bbc52(0x164)+X}:{}},'body':JSON['stringify']({'jsonrpc':_0x6bbc52(0x159),'id':0x2,'method':_0x6bbc52(0x175),'params':{'name':_0x54cd37,'arguments':_0x5d1f65}})}))['text']())[_0x6bbc52(0x167)]('\x0a')[_0x6bbc52(0x1d1)](_0x247601=>_0x247601[_0x6bbc52(0x1b5)](_0x6bbc52(0x183)));if(_0x44f027){let _0x240e95=JSON[_0x6bbc52(0x1d8)](_0x44f027[_0x6bbc52(0x1e5)](0x6));return _0x240e95?.['result']?.['content']?.[0x0]?.[_0x6bbc52(0x1ba)]?JSON['parse'](_0x240e95[_0x6bbc52(0x1bf)][_0x6bbc52(0x19e)][0x0][_0x6bbc52(0x1ba)]):_0x240e95;}return{'ok':!0x1,'error':_0x6bbc52(0x1de)};}K[a0_0x334e5a(0x1bd)](a0_0x24829c,async _0x2c9d3e=>{const _0x530bb9=a0_0x334e5a;let {name:_0x26f043,arguments:_0x3b7a49}=_0x2c9d3e[_0x530bb9(0x188)];if(_0x26f043==='commhub_reply'){let {task_id:_0x147aa8,text:_0x5380e5,status:_0x2abc83}=_0x3b7a49;if(_0x2abc83===_0x530bb9(0x17c)||_0x2abc83===_0x530bb9(0x17a)||_0x2abc83===_0x530bb9(0x185)){let _0xae5d41=_0x2abc83===_0x530bb9(0x17c)?_0x530bb9(0x1df):_0x2abc83,_0x1ee864=_0x147aa8?k[_0x530bb9(0x1cf)](_0x147aa8)||_0x530bb9(0x16f):_0x530bb9(0x16f),_0x546105=await P(_0x530bb9(0x1ac),{'alias':_0x1ee864,'text':_0x5380e5,'in_reply_to':_0x147aa8||void 0x0,'status':_0xae5d41,'from_session':Z});if(_0x147aa8)k[_0x530bb9(0x173)](_0x147aa8);return{'content':[{'type':_0x530bb9(0x1ba),'text':JSON[_0x530bb9(0x1db)](_0x546105)}]};}let _0x5958a9=await P('report_status',{'resume_id':w,'alias':Z,'status':_0x2abc83===_0x530bb9(0x16b)?_0x530bb9(0x16b):_0x2abc83===_0x530bb9(0x1c1)?_0x530bb9(0x1c1):_0x530bb9(0x1c9),'task':_0x5380e5['slice'](0x0,0xc8),'output':_0x5380e5});return{'content':[{'type':_0x530bb9(0x1ba),'text':JSON['stringify'](_0x5958a9)}]};}if(_0x26f043===_0x530bb9(0x1ae)){let {status:_0x1415ed,task:_0x4f67ae,progress:_0x29313a}=_0x3b7a49,_0x3cb716=await P(_0x530bb9(0x15f),{'resume_id':w,'alias':Z,'status':_0x1415ed,'task':_0x4f67ae,'progress':_0x29313a});return{'content':[{'type':_0x530bb9(0x1ba),'text':JSON[_0x530bb9(0x1db)](_0x3cb716)}]};}if(_0x26f043===_0x530bb9(0x165)){let {alias:_0x1362e6,task:_0x47cae3,priority:_0x14dfb9}=_0x3b7a49,_0x5c54b2=await P('send_task',{'alias':_0x1362e6,'task':_0x47cae3,'priority':_0x14dfb9||_0x530bb9(0x198),'from_session':Z});return{'content':[{'type':_0x530bb9(0x1ba),'text':JSON[_0x530bb9(0x1db)](_0x5c54b2)}]};}if(_0x26f043===_0x530bb9(0x18a)){let {alias:_0x25ea8a,message:_0x4524d0}=_0x3b7a49,_0xb94234=await P(_0x530bb9(0x1d0),{'alias':_0x25ea8a,'message':_0x4524d0,'from_session':Z});return{'content':[{'type':_0x530bb9(0x1ba),'text':JSON[_0x530bb9(0x1db)](_0xb94234)}]};}if(_0x26f043===_0x530bb9(0x18c)){let _0x4d2839=await P('get_all_status',{});return{'content':[{'type':_0x530bb9(0x1ba),'text':JSON[_0x530bb9(0x1db)](_0x4d2839)}]};}return{'content':[{'type':'text','text':JSON[_0x530bb9(0x1db)]({'error':_0x530bb9(0x18e)})}]};});async function u(){const _0x23dbf7=a0_0x334e5a;let _0x135987=f+_0x23dbf7(0x176)+encodeURIComponent(Z),_0x5549e9={};if(X)_0x5549e9['Authorization']=_0x23dbf7(0x164)+X;Y(_0x23dbf7(0x1a0)+_0x135987);while(!0x0){try{let _0x44aff6=await fetch(_0x135987,{'headers':_0x5549e9});if(!_0x44aff6['ok']){Y('SSE\x20error:\x20'+_0x44aff6['status']+'\x20'+_0x44aff6['statusText']),await h(0x1388);continue;}let _0x151896=_0x44aff6[_0x23dbf7(0x195)][_0x23dbf7(0x180)](),_0x40c640=new TextDecoder(),_0x14d3c5='';while(!0x0){let {done:_0x210796,value:_0x4fcb9e}=await _0x151896[_0x23dbf7(0x1a9)]();if(_0x210796)break;_0x14d3c5+=_0x40c640[_0x23dbf7(0x199)](_0x4fcb9e,{'stream':!0x0});let _0x4e5f81=_0x14d3c5[_0x23dbf7(0x167)]('\x0a\x0a');_0x14d3c5=_0x4e5f81['pop']()||'';for(let _0x3c112e of _0x4e5f81){let _0x16622e=_0x3c112e[_0x23dbf7(0x167)]('\x0a')['find'](_0x215bae=>_0x215bae[_0x23dbf7(0x1b5)](_0x23dbf7(0x183)));if(!_0x16622e)continue;try{let _0x28a54d=JSON[_0x23dbf7(0x1d8)](_0x16622e['slice'](0x6));await S(_0x28a54d);}catch(_0x4b6da0){Y(_0x23dbf7(0x186)+_0x4b6da0);}}}Y('SSE\x20stream\x20ended,\x20reconnecting...');}catch(_0x159c46){Y(_0x23dbf7(0x17e)+_0x159c46);}await h(0xbb8);}}async function S(_0x22002a){const _0xc16c91=a0_0x334e5a;if(_0x22002a[_0xc16c91(0x15c)]===_0xc16c91(0x1e6)){Y(_0xc16c91(0x1d6)+Z+'\x22');return;}if(_0x22002a['type']===_0xc16c91(0x1b7)){if(Y(_0xc16c91(0x191)+_0x22002a['from']+':\x20'+_0x22002a[_0xc16c91(0x1b0)][_0xc16c91(0x1e5)](0x0,0x3c)),await K[_0xc16c91(0x1e8)]({'method':_0xc16c91(0x1e3),'params':{'content':_0x22002a['message'],'meta':{'sender':_0x22002a[_0xc16c91(0x16d)]||_0xc16c91(0x16f),'sender_id':_0xc16c91(0x194),'user':_0x22002a[_0xc16c91(0x16d)]||_0xc16c91(0x16f),'priority':_0xc16c91(0x198)}}}),_0x22002a[_0xc16c91(0x1af)])await P(_0xc16c91(0x1b6),{'alias':Z,'message_id':_0x22002a['message_id']});return;}if(_0x22002a['type']===_0xc16c91(0x18f)||_0x22002a['type']===_0xc16c91(0x16a)){Y('←\x20'+_0x22002a['type']+_0xc16c91(0x1b4)+_0x22002a[_0xc16c91(0x18d)]+_0xc16c91(0x15d)+(_0x22002a['priority']||'normal'));let _0x513cab=await P(_0xc16c91(0x1d5),{'alias':Z,'limit':0x5});if(_0x513cab?.['ok']&&_0x513cab[_0xc16c91(0x179)]?.[_0xc16c91(0x17b)]>0x0)for(let _0x494d32 of _0x513cab[_0xc16c91(0x179)]){let _0x1be4c3={'sender':_0x494d32[_0xc16c91(0x1a2)]||_0xc16c91(0x16f),'sender_id':_0xc16c91(0x194),'user':_0x494d32[_0xc16c91(0x1a2)]||_0xc16c91(0x16f),'task_id':_0x494d32['id'],'priority':_0x494d32[_0xc16c91(0x1a6)]||_0xc16c91(0x198)};k[_0xc16c91(0x1a5)](_0x494d32['id'],_0x494d32[_0xc16c91(0x1a2)]||_0xc16c91(0x16f)),await K[_0xc16c91(0x1e8)]({'method':_0xc16c91(0x1e3),'params':{'content':_0x494d32['content'],'meta':_0x1be4c3}}),Y(_0xc16c91(0x1aa)+_0x494d32['id'][_0xc16c91(0x1e5)](0x0,0x8)+_0xc16c91(0x187)+_0x494d32[_0xc16c91(0x1a2)]+':\x20'+_0x494d32[_0xc16c91(0x19e)][_0xc16c91(0x1e5)](0x0,0x3c)),await P(_0xc16c91(0x1b6),{'alias':Z,'message_id':_0x494d32['id']});}}}async function A(){const _0x55af32=a0_0x334e5a;let _0x5b1bf7=new a0_0x8bed26();await K[_0x55af32(0x1bb)](_0x5b1bf7),Y('MCP\x20stdio\x20connected'),Y(_0x55af32(0x1c8)),u()[_0x55af32(0x189)](_0x25adfc=>Y(_0x55af32(0x1c0)+_0x25adfc)),P(_0x55af32(0x15f),{'resume_id':w,'alias':Z,'status':_0x55af32(0x1c6),'server':a0_0x370ff1(),'hostname':a0_0x370ff1(),'agent':'claude-code','project_dir':process[_0x55af32(0x1b8)](),'tmux_name':j||void 0x0})[_0x55af32(0x1e2)](()=>Y(_0x55af32(0x197)+Z+'\x22\x20('+w[_0x55af32(0x1e5)](0x0,0x8)+')'))[_0x55af32(0x189)](_0x469595=>Y(_0x55af32(0x1ab)+_0x469595)),setInterval(()=>{const _0x2f2872=_0x55af32;P(_0x2f2872(0x15f),{'resume_id':w,'alias':Z,'status':_0x2f2872(0x1c6),'server':a0_0x370ff1(),'hostname':a0_0x370ff1(),'agent':_0x2f2872(0x15b),'project_dir':process[_0x2f2872(0x1b8)](),'tmux_name':j||void 0x0})[_0x2f2872(0x189)](_0x1d4908=>Y(_0x2f2872(0x1be)+_0x1d4908));},0x2bf20),Y('ready\x20—\x20waiting\x20for\x20events');}A()[a0_0x334e5a(0x189)](_0x1097d3=>{const _0xbbf1e9=a0_0x334e5a;Y('fatal:\x20'+_0x1097d3),process[_0xbbf1e9(0x174)](0x1);});async function N(){const _0x2d0f0b=a0_0x334e5a;Y('shutting\x20down,\x20reporting\x20offline...'),await P('report_status',{'resume_id':w,'alias':Z,'status':'error','task':_0x2d0f0b(0x1c5)})[_0x2d0f0b(0x189)](()=>{}),process[_0x2d0f0b(0x174)](0x0);}function a0_0x59f8(){const _0xcab314=['text','connect','string','setRequestHandler','heartbeat\x20failed:\x20','result','SSE\x20fatal:\x20','error','The\x20task_id\x20from\x20the\x20channel\x20message\x20(or\x20\x27hub\x27\x20for\x20general)','.env','write','session\x20disconnected','idle','178138JeszEM','starting\x20SSE\x20listener...','working','toTimeString','utf-8','4576480owurRj','252QRdFfY','alias','get','send_message','find','http://127.0.0.1:9200','.anet','1227310vNxpYZ','get_inbox','SSE\x20connected\x20as\x20\x22','563595MaWEBw','parse','Messages\x20from\x20CommHub\x20arrive\x20as\x20<channel\x20source=\x22commhub\x22\x20task_id=\x22...\x22\x20priority=\x22...\x22\x20from=\x22...\x22>','Reply\x20using\x20the\x20commhub_reply\x20tool\x20to\x20report\x20status\x20or\x20results\x20back.','stringify','These\x20are\x20tasks\x20dispatched\x20by\x20the\x20hub\x20or\x20other\x20sessions\x20via\x20the\x20CommHub\x20Server.','280csKIoY','no\x20response','replied','0.3.0','Send\x20a\x20message\x20to\x20another\x20session\x20(no\x20task\x20lifecycle,\x20just\x20chat).\x20Use\x20for\x20replies\x20and\x20status\x20updates.','then','notifications/claude/channel','application/json','slice','connected','object','notification','...\x20TMUX=','2.0','commhub-channel','claude-code','type','\x20priority=','.claude/channels/commhub','report_status','stdin','status','\x20ALIAS=','POST','Bearer\x20','commhub_send_task','high','split','token','957573kbRAdr','broadcast','blocked',']\x20[commhub]\x20','from','init\x20failed:\x20','hub','Progress\x200-100','2025-03-26','tmux\x20display-message\x20-p\x20\x27#S\x27','delete','exit','tools/call','/events/','Get\x20status\x20of\x20all\x20sessions\x20from\x20CommHub.','trim','messages','failed','length','completed','ENV:\x20URL=','SSE\x20connection\x20error:\x20','14XfFLxz','getReader','Reply\x20to\x20a\x20CommHub\x20task\x20—\x20report\x20completion\x20or\x20send\x20a\x20message\x20back\x20to\x20the\x20hub.','number','data:\x20','\x20CWD=','cancelled','parse\x20error:\x20','\x20from\x20','params','catch','commhub_send_message','SIGTERM','commhub_get_all_status','inbox_count','unknown\x20tool','new_task','join','←\x20message\x20from\x20','121ZRgjLv','278888ysIcJk','commhub','body','\x20RESUME_ID=','registered\x20as\x20\x22','normal','decode','\x20PROJECT_ENV=','stderr','config.json','/mcp','content','replace','connecting\x20to\x20','end','from_session','You\x20can\x20also\x20use\x20commhub_report_status\x20to\x20update\x20your\x20session\x20status.','Update\x20this\x20session\x27s\x20status\x20in\x20CommHub\x20(working/idle/blocked/error).\x20Returns\x20inbox_count.','set','priority','application/json,\x20text/event-stream','Task\x20content','read','→\x20injected\x20task\x20','warning:\x20could\x20not\x20register:\x20','send_reply','154530nDUwAA','commhub_report_status','message_id','message','low','indexOf','Reply\x20text\x20/\x20result\x20summary',':\x20inbox_count=','startsWith','ack_inbox','new_message','cwd','Target\x20session\x20alias'];a0_0x59f8=function(){return _0xcab314;};return a0_0x59f8();}process[a0_0x334e5a(0x160)]['on'](a0_0x334e5a(0x1a1),()=>N()),process['on'](a0_0x334e5a(0x18b),()=>N()),process['on']('SIGINT',()=>N());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleep2agi/agent-network",
3
- "version": "2.1.15-preview.3",
3
+ "version": "2.1.15-preview.5",
4
4
  "description": "AI Agent Network CLI — Create multi-agent networks with user management, network isolation, and 3 AI runtimes (Claude/Codex/MiniMax). 39 commands.",
5
5
  "type": "module",
6
6
  "main": "dist/src/client.js",