@sleep2agi/agent-network 2.2.7-preview.3 → 2.2.7-preview.4

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_0x1ee0(_0x34e0fc,_0x128736){_0x34e0fc=_0x34e0fc-0x188;const _0x1c9e79=a0_0x1c9e();let _0x1ee00f=_0x1c9e79[_0x34e0fc];return _0x1ee00f;}const a0_0x1108f5=a0_0x1ee0;(function(_0x2976a5,_0x2e6190){const _0x204abb=a0_0x1ee0,_0x850ae=_0x2976a5();while(!![]){try{const _0x2f1cf7=-parseInt(_0x204abb(0x1d5))/0x1*(parseInt(_0x204abb(0x1cd))/0x2)+parseInt(_0x204abb(0x1d2))/0x3*(-parseInt(_0x204abb(0x1bf))/0x4)+-parseInt(_0x204abb(0x1dd))/0x5+-parseInt(_0x204abb(0x1b5))/0x6*(-parseInt(_0x204abb(0x1be))/0x7)+-parseInt(_0x204abb(0x190))/0x8+-parseInt(_0x204abb(0x1a7))/0x9*(-parseInt(_0x204abb(0x1a6))/0xa)+-parseInt(_0x204abb(0x1c3))/0xb*(-parseInt(_0x204abb(0x188))/0xc);if(_0x2f1cf7===_0x2e6190)break;else _0x850ae['push'](_0x850ae['shift']());}catch(_0x28e2fb){_0x850ae['push'](_0x850ae['shift']());}}}(a0_0x1c9e,0x8722c));import{EventEmitter as a0_0x99f645}from'events';function a0_0x1c9e(){const _0x410c89=['Authorization','alias','normal','text/event-stream','log','url','10rZndIR','777429bcOoaE','SSE\x20connected','replace','token','get_inbox','/events/','emit','result','heartbeatTimer','min','message','match','sdk-','cwd','6zpazWq','connected','send','sseAbort','registered','task','offline','content','autoConnect','636545MHFiwU','100IGhiYu','messages','signal','server','55oyfiYK','startsWith','toTimeString','now','broadcast','SSE\x20error:\x20','ack_inbox','text','connect','call','1925246RnvCpt','processInbox','body','slice','reconnectDelay','108522eQLqIj','SSE\x20reconnecting\x20in\x20','split','1hHMBkZ','pop','heartbeatInterval','type','completed','stringify','disconnected','new_task','1468280TNQBJJ','error','catch','Bearer\x20','s...','reply','disconnect','8110236sDqXhe','application/json','from_session','connectSSE',']\x20[commhub:','send_message','read','getReader','6739488WGAoNf','heartbeat\x20failed:\x20','parse','status','running','/mcp','sdk','send_task','resumeId','sleep','agent','idle','decode','2.0','new_message','application/json,\x20text/event-stream'];a0_0x1c9e=function(){return _0x410c89;};return a0_0x1c9e();}import{hostname as a0_0x49496f}from'os';class T extends a0_0x99f645{['url'];[a0_0x1108f5(0x1a1)];[a0_0x1108f5(0x1aa)];[a0_0x1108f5(0x19a)];[a0_0x1108f5(0x198)];[a0_0x1108f5(0x1d7)];[a0_0x1108f5(0x1d1)];[a0_0x1108f5(0x1af)];[a0_0x1108f5(0x1b8)];[a0_0x1108f5(0x194)]=!0x1;constructor(_0x559d8c){const _0x54cf5f=a0_0x1108f5;super();if(this[_0x54cf5f(0x1a5)]=_0x559d8c['url'][_0x54cf5f(0x1a9)](/\/$/,''),this['alias']=_0x559d8c['alias'],this['token']=_0x559d8c[_0x54cf5f(0x1aa)],this['agent']=_0x559d8c['agent']||_0x54cf5f(0x196),this[_0x54cf5f(0x198)]=_0x54cf5f(0x1b3)+_0x559d8c[_0x54cf5f(0x1a1)]+'-'+Date[_0x54cf5f(0x1c6)]()['toString'](0x24),this[_0x54cf5f(0x1d7)]=_0x559d8c['heartbeatInterval']??0x2bf20,this['reconnectDelay']=_0x559d8c[_0x54cf5f(0x1d1)]??0xbb8,_0x559d8c[_0x54cf5f(0x1bd)]!==!0x1)this[_0x54cf5f(0x1cb)]();}[a0_0x1108f5(0x1a4)](_0x1c6de1){const _0x3df66d=a0_0x1108f5;console['log']('['+new Date()[_0x3df66d(0x1c5)]()[_0x3df66d(0x1d0)](0x0,0x8)+_0x3df66d(0x18c)+this[_0x3df66d(0x1a1)]+']\x20'+_0x1c6de1);}async[a0_0x1108f5(0x1cc)](_0x32c042,_0x10cec5){const _0x4a1fc8=a0_0x1108f5;let _0x483fd7={'Content-Type':_0x4a1fc8(0x189),'Accept':_0x4a1fc8(0x19f)};if(this[_0x4a1fc8(0x1aa)])_0x483fd7[_0x4a1fc8(0x1a0)]=_0x4a1fc8(0x1e0)+this[_0x4a1fc8(0x1aa)];let _0xfebd21=await(await fetch(this[_0x4a1fc8(0x1a5)]+_0x4a1fc8(0x195),{'method':'POST','headers':_0x483fd7,'body':JSON[_0x4a1fc8(0x1da)]({'jsonrpc':_0x4a1fc8(0x19d),'id':Date[_0x4a1fc8(0x1c6)](),'method':'tools/call','params':{'name':_0x32c042,'arguments':_0x10cec5}})}))[_0x4a1fc8(0x1ca)](),_0x561e97=_0xfebd21[_0x4a1fc8(0x1b2)](/data: (.+)/),_0x56b284=_0x561e97?JSON[_0x4a1fc8(0x192)](_0x561e97[0x1]):JSON[_0x4a1fc8(0x192)](_0xfebd21),_0x333306=_0x56b284?.[_0x4a1fc8(0x1ae)]?.['content']?.[0x0]?.[_0x4a1fc8(0x1ca)];return _0x333306?JSON[_0x4a1fc8(0x192)](_0x333306):_0x56b284;}async[a0_0x1108f5(0x1cb)](){const _0x5333fe=a0_0x1108f5;if(this['running'])return;this[_0x5333fe(0x194)]=!0x0,await this['status'](_0x5333fe(0x19b)),this[_0x5333fe(0x1a4)](_0x5333fe(0x1b9)),this['heartbeatTimer']=setInterval(()=>{const _0x2b3326=_0x5333fe;this[_0x2b3326(0x193)](_0x2b3326(0x19b))[_0x2b3326(0x1df)](_0x1be803=>this[_0x2b3326(0x1a4)](_0x2b3326(0x191)+_0x1be803[_0x2b3326(0x1b1)]));},this[_0x5333fe(0x1d7)]),this[_0x5333fe(0x18b)]();}async[a0_0x1108f5(0x1e3)](){const _0x1dc7d5=a0_0x1108f5;if(this[_0x1dc7d5(0x194)]=!0x1,this['sseAbort']?.['abort'](),this[_0x1dc7d5(0x1af)])clearInterval(this[_0x1dc7d5(0x1af)]);await this[_0x1dc7d5(0x193)](_0x1dc7d5(0x1bb))[_0x1dc7d5(0x1df)](()=>{}),this[_0x1dc7d5(0x1a4)](_0x1dc7d5(0x1db));}async[a0_0x1108f5(0x1b7)](_0x45fc72,_0x360e15,_0x4c7bcd=a0_0x1108f5(0x1a2)){const _0x1ec537=a0_0x1108f5;return this[_0x1ec537(0x1cc)](_0x1ec537(0x197),{'alias':_0x45fc72,'task':_0x360e15,'priority':_0x4c7bcd,'from_session':this[_0x1ec537(0x1a1)]});}async[a0_0x1108f5(0x1b1)](_0x28dd43,_0x3e67cb){const _0x549832=a0_0x1108f5;return this[_0x549832(0x1cc)](_0x549832(0x18d),{'alias':_0x28dd43,'message':_0x3e67cb,'from_session':this['alias']});}async[a0_0x1108f5(0x1e2)](_0x3ab6c5,_0x4428ac,_0x2397fb=a0_0x1108f5(0x1d9)){const _0x5c07db=a0_0x1108f5;return this[_0x5c07db(0x1cc)]('send_reply',{'in_reply_to':_0x3ab6c5,'text':_0x4428ac,'status':_0x2397fb});}async[a0_0x1108f5(0x193)](_0x753d0d,_0x430167){const _0x31a5c2=a0_0x1108f5;return this[_0x31a5c2(0x1cc)]('report_status',{'resume_id':this[_0x31a5c2(0x198)],'alias':this[_0x31a5c2(0x1a1)],'status':_0x753d0d,'server':a0_0x49496f(),'hostname':a0_0x49496f(),'agent':this['agent'],'project_dir':process[_0x31a5c2(0x1b4)](),..._0x430167});}async['getAllStatus'](){const _0x57c6ed=a0_0x1108f5;return this[_0x57c6ed(0x1cc)]('get_all_status',{});}async[a0_0x1108f5(0x1c7)](_0x141f32,_0x133ecf){const _0x4a44a6=a0_0x1108f5;return this[_0x4a44a6(0x1cc)](_0x4a44a6(0x1c7),{'message':_0x141f32,'filter_server':_0x133ecf?.[_0x4a44a6(0x1c2)],'filter_status':_0x133ecf?.[_0x4a44a6(0x193)]});}async['connectSSE'](){const _0x17dd77=a0_0x1108f5;let _0x14da93=encodeURIComponent(this[_0x17dd77(0x1a1)]),_0x28f3d8=this[_0x17dd77(0x1a5)]+_0x17dd77(0x1ac)+_0x14da93,_0xe557b1=this[_0x17dd77(0x1d1)];while(this['running']){try{this[_0x17dd77(0x1b8)]=new AbortController();let _0x592cb9={'Accept':_0x17dd77(0x1a3)};if(this['token'])_0x592cb9[_0x17dd77(0x1a0)]=_0x17dd77(0x1e0)+this[_0x17dd77(0x1aa)];let _0x1e9b93=await fetch(_0x28f3d8,{'headers':_0x592cb9,'signal':this[_0x17dd77(0x1b8)][_0x17dd77(0x1c1)]});if(!_0x1e9b93['ok']||!_0x1e9b93[_0x17dd77(0x1cf)]){this[_0x17dd77(0x1a4)]('SSE\x20failed:\x20'+_0x1e9b93[_0x17dd77(0x193)]),await this[_0x17dd77(0x199)](_0xe557b1),_0xe557b1=Math[_0x17dd77(0x1b0)](_0xe557b1*1.5,0xea60);continue;}_0xe557b1=this[_0x17dd77(0x1d1)];let _0x1d6248=_0x1e9b93['body'][_0x17dd77(0x18f)](),_0x45c4df=new TextDecoder(),_0x5163a2='';while(this['running']){let {done:_0x1d7bbd,value:_0x1f5037}=await _0x1d6248[_0x17dd77(0x18e)]();if(_0x1d7bbd)break;_0x5163a2+=_0x45c4df[_0x17dd77(0x19c)](_0x1f5037,{'stream':!0x0});let _0x1c43ae=_0x5163a2[_0x17dd77(0x1d4)]('\x0a');_0x5163a2=_0x1c43ae[_0x17dd77(0x1d6)]()||'';for(let _0x5688d2 of _0x1c43ae){if(!_0x5688d2[_0x17dd77(0x1c4)]('data:\x20'))continue;try{let _0x2cfc97=JSON[_0x17dd77(0x192)](_0x5688d2[_0x17dd77(0x1d0)](0x6));if(_0x2cfc97['type']==='connected'){this['log'](_0x17dd77(0x1a8)),this[_0x17dd77(0x1ad)](_0x17dd77(0x1b6));continue;}if(_0x2cfc97[_0x17dd77(0x1d8)]===_0x17dd77(0x1dc)||_0x2cfc97[_0x17dd77(0x1d8)]===_0x17dd77(0x19e)||_0x2cfc97[_0x17dd77(0x1d8)]==='broadcast')await this[_0x17dd77(0x1ce)]();}catch{}}}}catch(_0x1cf7a6){if(_0x1cf7a6['name']==='AbortError')break;this[_0x17dd77(0x1ad)](_0x17dd77(0x1de),_0x1cf7a6),this[_0x17dd77(0x1a4)](_0x17dd77(0x1c8)+_0x1cf7a6['message']);}if(this[_0x17dd77(0x194)])this[_0x17dd77(0x1ad)]('disconnected'),this[_0x17dd77(0x1a4)](_0x17dd77(0x1d3)+_0xe557b1/0x3e8+_0x17dd77(0x1e1)),await this[_0x17dd77(0x199)](_0xe557b1),_0xe557b1=Math['min'](_0xe557b1*1.5,0xea60);}}async['processInbox'](){const _0x312255=a0_0x1108f5;try{let _0x3d3b70=(await this[_0x312255(0x1cc)](_0x312255(0x1ab),{'alias':this['alias'],'limit':0xa}))?.[_0x312255(0x1c0)]||[];for(let _0x1a5dcc of _0x3d3b70)await this[_0x312255(0x1cc)](_0x312255(0x1c9),{'alias':this['alias'],'message_id':_0x1a5dcc['id']}),this[_0x312255(0x1a4)]('←\x20'+_0x1a5dcc[_0x312255(0x18a)]+':\x20'+_0x1a5dcc[_0x312255(0x1bc)]['slice'](0x0,0x3c)),this[_0x312255(0x1ad)](_0x312255(0x1ba),_0x1a5dcc),this[_0x312255(0x1ad)]('message',_0x1a5dcc);}catch(_0x4ff953){this[_0x312255(0x1a4)]('inbox\x20error:\x20'+_0x4ff953[_0x312255(0x1b1)]);}}[a0_0x1108f5(0x199)](_0x537190){return new Promise(_0x377a72=>setTimeout(_0x377a72,_0x537190));}}var $=T;export{$ as default,T as CommHub};
1
+ function a0_0x7831(){const _0x25c5bc=['tools/call','toString','disconnected','call','now','Authorization','resumeId','content','ack_inbox','offline','33126IEYhzM','running','registered','idle','pop','slice','sdk','parse','completed','917950KHbPwk','broadcast','name','emit','16meHRaA','application/json,\x20text/event-stream','agent','task','484860ThKuqk','toTimeString','autoConnect','read','AbortError','/mcp','151098rMRJrU','POST','error','message','heartbeatTimer',']\x20[commhub:','send','startsWith','2YPoneq','Bearer\x20','/events/','heartbeatInterval','data:\x20','log','sseAbort','2.0','url','SSE\x20reconnecting\x20in\x20','token','765tbkNVn','min','10EzFURY','catch','processInbox','50032QzzOdr','cwd','replace','SSE\x20connected','sleep','from_session','new_task','heartbeat\x20failed:\x20','get_inbox','decode','25sluWcw','report_status','reconnectDelay','result','connectSSE','sdk-','server','type','status','getReader','match','alias','get_all_status','17264CivwWo','stringify','961590vTRvss','connected'];a0_0x7831=function(){return _0x25c5bc;};return a0_0x7831();}const a0_0x2e63f6=a0_0x1b7c;(function(_0x486bb7,_0x3a6487){const _0x2a5939=a0_0x1b7c,_0x416018=_0x486bb7();while(!![]){try{const _0x51195d=-parseInt(_0x2a5939(0x1b6))/0x1*(-parseInt(_0x2a5939(0x1c6))/0x2)+parseInt(_0x2a5939(0x1ae))/0x3*(parseInt(_0x2a5939(0x1a4))/0x4)+-parseInt(_0x2a5939(0x1d0))/0x5*(parseInt(_0x2a5939(0x197))/0x6)+parseInt(_0x2a5939(0x1df))/0x7+parseInt(_0x2a5939(0x1dd))/0x8*(-parseInt(_0x2a5939(0x1c1))/0x9)+-parseInt(_0x2a5939(0x1c3))/0xa*(-parseInt(_0x2a5939(0x1a0))/0xb)+parseInt(_0x2a5939(0x1a8))/0xc;if(_0x51195d===_0x3a6487)break;else _0x416018['push'](_0x416018['shift']());}catch(_0x3ddfe1){_0x416018['push'](_0x416018['shift']());}}}(a0_0x7831,0x49a76));import{EventEmitter as a0_0x573ff1}from'events';import{hostname as a0_0x17078d}from'os';class T extends a0_0x573ff1{[a0_0x2e63f6(0x1be)];[a0_0x2e63f6(0x1db)];[a0_0x2e63f6(0x1c0)];[a0_0x2e63f6(0x1a6)];[a0_0x2e63f6(0x1e7)];['heartbeatInterval'];['reconnectDelay'];[a0_0x2e63f6(0x1b2)];[a0_0x2e63f6(0x1bc)];[a0_0x2e63f6(0x198)]=!0x1;constructor(_0x57b157){const _0x4f2479=a0_0x2e63f6;super();if(this[_0x4f2479(0x1be)]=_0x57b157[_0x4f2479(0x1be)][_0x4f2479(0x1c8)](/\/$/,''),this['alias']=_0x57b157[_0x4f2479(0x1db)],this[_0x4f2479(0x1c0)]=_0x57b157['token'],this[_0x4f2479(0x1a6)]=_0x57b157[_0x4f2479(0x1a6)]||_0x4f2479(0x19d),this[_0x4f2479(0x1e7)]=_0x4f2479(0x1d5)+_0x57b157[_0x4f2479(0x1db)]+'-'+Date[_0x4f2479(0x1e5)]()[_0x4f2479(0x1e2)](0x24),this[_0x4f2479(0x1b9)]=_0x57b157[_0x4f2479(0x1b9)]??0x2bf20,this[_0x4f2479(0x1d2)]=_0x57b157[_0x4f2479(0x1d2)]??0xbb8,_0x57b157[_0x4f2479(0x1aa)]!==!0x1)this['connect']();}[a0_0x2e63f6(0x1bb)](_0x5ea25b){const _0x64f592=a0_0x2e63f6;console[_0x64f592(0x1bb)]('['+new Date()[_0x64f592(0x1a9)]()[_0x64f592(0x19c)](0x0,0x8)+_0x64f592(0x1b3)+this[_0x64f592(0x1db)]+']\x20'+_0x5ea25b);}async['call'](_0x12c398,_0x2b395e){const _0x1337e7=a0_0x2e63f6;let _0x582fb7={'Content-Type':'application/json','Accept':_0x1337e7(0x1a5)};if(this['token'])_0x582fb7['Authorization']=_0x1337e7(0x1b7)+this[_0x1337e7(0x1c0)];let _0x3588a2=await(await fetch(this[_0x1337e7(0x1be)]+_0x1337e7(0x1ad),{'method':_0x1337e7(0x1af),'headers':_0x582fb7,'body':JSON[_0x1337e7(0x1de)]({'jsonrpc':_0x1337e7(0x1bd),'id':Date[_0x1337e7(0x1e5)](),'method':_0x1337e7(0x1e1),'params':{'name':_0x12c398,'arguments':_0x2b395e}})}))['text'](),_0x4f5902=_0x3588a2[_0x1337e7(0x1da)](/data: (.+)/),_0x57afd8=_0x4f5902?JSON['parse'](_0x4f5902[0x1]):JSON[_0x1337e7(0x19e)](_0x3588a2),_0x468be2=_0x57afd8?.[_0x1337e7(0x1d3)]?.[_0x1337e7(0x1e8)]?.[0x0]?.['text'];return _0x468be2?JSON[_0x1337e7(0x19e)](_0x468be2):_0x57afd8;}async['connect'](){const _0x546bad=a0_0x2e63f6;if(this[_0x546bad(0x198)])return;this['running']=!0x0,await this[_0x546bad(0x1d8)]('idle'),this[_0x546bad(0x1bb)](_0x546bad(0x199)),this[_0x546bad(0x1b2)]=setInterval(()=>{const _0x45cce8=_0x546bad;this[_0x45cce8(0x1d8)](_0x45cce8(0x19a))[_0x45cce8(0x1c4)](_0x49755d=>this[_0x45cce8(0x1bb)](_0x45cce8(0x1cd)+_0x49755d[_0x45cce8(0x1b1)]));},this[_0x546bad(0x1b9)]),this[_0x546bad(0x1d4)]();}async['disconnect'](){const _0xece111=a0_0x2e63f6;if(this['running']=!0x1,this['sseAbort']?.['abort'](),this[_0xece111(0x1b2)])clearInterval(this[_0xece111(0x1b2)]);await this[_0xece111(0x1d8)](_0xece111(0x196))[_0xece111(0x1c4)](()=>{}),this[_0xece111(0x1bb)](_0xece111(0x1e3));}async[a0_0x2e63f6(0x1b4)](_0x3ec4e1,_0x51f5e6,_0x5baa7a='normal'){const _0x1b3ebc=a0_0x2e63f6;return this[_0x1b3ebc(0x1e4)]('send_task',{'alias':_0x3ec4e1,'task':_0x51f5e6,'priority':_0x5baa7a,'from_session':this[_0x1b3ebc(0x1db)]});}async['message'](_0x3a1a7c,_0x48f6fe){const _0x44628b=a0_0x2e63f6;return this[_0x44628b(0x1e4)]('send_message',{'alias':_0x3a1a7c,'message':_0x48f6fe,'from_session':this[_0x44628b(0x1db)]});}async['reply'](_0x37fcc4,_0x1f754e,_0x246faf=a0_0x2e63f6(0x19f)){const _0x2a5762=a0_0x2e63f6;return this[_0x2a5762(0x1e4)]('send_reply',{'in_reply_to':_0x37fcc4,'text':_0x1f754e,'status':_0x246faf});}async[a0_0x2e63f6(0x1d8)](_0x3879dc,_0x248e66){const _0x1c31aa=a0_0x2e63f6;return this[_0x1c31aa(0x1e4)](_0x1c31aa(0x1d1),{'resume_id':this[_0x1c31aa(0x1e7)],'alias':this[_0x1c31aa(0x1db)],'status':_0x3879dc,'server':a0_0x17078d(),'hostname':a0_0x17078d(),'agent':this[_0x1c31aa(0x1a6)],'project_dir':process[_0x1c31aa(0x1c7)](),..._0x248e66});}async['getAllStatus'](){const _0x5c7ae9=a0_0x2e63f6;return this[_0x5c7ae9(0x1e4)](_0x5c7ae9(0x1dc),{});}async[a0_0x2e63f6(0x1a1)](_0x424313,_0x347593){const _0x4db524=a0_0x2e63f6;return this['call'](_0x4db524(0x1a1),{'message':_0x424313,'filter_server':_0x347593?.[_0x4db524(0x1d6)],'filter_status':_0x347593?.[_0x4db524(0x1d8)]});}async[a0_0x2e63f6(0x1d4)](){const _0x5949a7=a0_0x2e63f6;let _0x2f06cf=encodeURIComponent(this['alias']),_0x200be1=this[_0x5949a7(0x1be)]+_0x5949a7(0x1b8)+_0x2f06cf,_0x2d67e4=this['reconnectDelay'];while(this[_0x5949a7(0x198)]){try{this['sseAbort']=new AbortController();let _0x3fe7d2={'Accept':'text/event-stream'};if(this['token'])_0x3fe7d2[_0x5949a7(0x1e6)]='Bearer\x20'+this[_0x5949a7(0x1c0)];let _0x75b917=await fetch(_0x200be1,{'headers':_0x3fe7d2,'signal':this[_0x5949a7(0x1bc)]['signal']});if(!_0x75b917['ok']||!_0x75b917['body']){this[_0x5949a7(0x1bb)]('SSE\x20failed:\x20'+_0x75b917['status']),await this[_0x5949a7(0x1ca)](_0x2d67e4),_0x2d67e4=Math[_0x5949a7(0x1c2)](_0x2d67e4*1.5,0xea60);continue;}_0x2d67e4=this['reconnectDelay'];let _0x45ff2c=_0x75b917['body'][_0x5949a7(0x1d9)](),_0x5e917b=new TextDecoder(),_0x53b05d='';while(this[_0x5949a7(0x198)]){let {done:_0xefac3,value:_0x1ed711}=await _0x45ff2c[_0x5949a7(0x1ab)]();if(_0xefac3)break;_0x53b05d+=_0x5e917b[_0x5949a7(0x1cf)](_0x1ed711,{'stream':!0x0});let _0x48c305=_0x53b05d['split']('\x0a');_0x53b05d=_0x48c305[_0x5949a7(0x19b)]()||'';for(let _0x401312 of _0x48c305){if(!_0x401312[_0x5949a7(0x1b5)](_0x5949a7(0x1ba)))continue;try{let _0x4f18d8=JSON[_0x5949a7(0x19e)](_0x401312[_0x5949a7(0x19c)](0x6));if(_0x4f18d8[_0x5949a7(0x1d7)]===_0x5949a7(0x1e0)){this[_0x5949a7(0x1bb)](_0x5949a7(0x1c9)),this[_0x5949a7(0x1a3)]('connected');continue;}if(_0x4f18d8[_0x5949a7(0x1d7)]===_0x5949a7(0x1cc)||_0x4f18d8[_0x5949a7(0x1d7)]==='new_message'||_0x4f18d8[_0x5949a7(0x1d7)]===_0x5949a7(0x1a1))await this['processInbox']();}catch{}}}}catch(_0xb6e71d){if(_0xb6e71d[_0x5949a7(0x1a2)]===_0x5949a7(0x1ac))break;this['emit'](_0x5949a7(0x1b0),_0xb6e71d),this[_0x5949a7(0x1bb)]('SSE\x20error:\x20'+_0xb6e71d[_0x5949a7(0x1b1)]);}if(this[_0x5949a7(0x198)])this['emit'](_0x5949a7(0x1e3)),this[_0x5949a7(0x1bb)](_0x5949a7(0x1bf)+_0x2d67e4/0x3e8+'s...'),await this[_0x5949a7(0x1ca)](_0x2d67e4),_0x2d67e4=Math[_0x5949a7(0x1c2)](_0x2d67e4*1.5,0xea60);}}async[a0_0x2e63f6(0x1c5)](){const _0x1ae90a=a0_0x2e63f6;try{let _0x5ce2d5=(await this[_0x1ae90a(0x1e4)](_0x1ae90a(0x1ce),{'alias':this[_0x1ae90a(0x1db)],'limit':0xa}))?.['messages']||[];for(let _0x330480 of _0x5ce2d5)await this[_0x1ae90a(0x1e4)](_0x1ae90a(0x1e9),{'alias':this[_0x1ae90a(0x1db)],'message_id':_0x330480['id']}),this[_0x1ae90a(0x1bb)]('←\x20'+_0x330480[_0x1ae90a(0x1cb)]+':\x20'+_0x330480[_0x1ae90a(0x1e8)]['slice'](0x0,0x3c)),this[_0x1ae90a(0x1a3)](_0x1ae90a(0x1a7),_0x330480),this[_0x1ae90a(0x1a3)](_0x1ae90a(0x1b1),_0x330480);}catch(_0x15a26c){this[_0x1ae90a(0x1bb)]('inbox\x20error:\x20'+_0x15a26c[_0x1ae90a(0x1b1)]);}}[a0_0x2e63f6(0x1ca)](_0x50e3c5){return new Promise(_0xdba331=>setTimeout(_0xdba331,_0x50e3c5));}}function a0_0x1b7c(_0x450420,_0x5dfbd4){_0x450420=_0x450420-0x196;const _0x78314a=a0_0x7831();let _0x1b7c72=_0x78314a[_0x450420];return _0x1b7c72;}var $=T;export{$ as default,T as CommHub};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env bun
2
- const a0_0x25dfde=a0_0x3fd2;(function(_0x4498cc,_0x3a4f7b){const _0x5678fa=a0_0x3fd2,_0x1d73c1=_0x4498cc();while(!![]){try{const _0x36a927=-parseInt(_0x5678fa(0x202))/0x1+-parseInt(_0x5678fa(0x21d))/0x2+-parseInt(_0x5678fa(0x1fc))/0x3*(-parseInt(_0x5678fa(0x1ab))/0x4)+parseInt(_0x5678fa(0x1c9))/0x5+parseInt(_0x5678fa(0x1d8))/0x6*(-parseInt(_0x5678fa(0x1fb))/0x7)+parseInt(_0x5678fa(0x1e3))/0x8*(-parseInt(_0x5678fa(0x1f0))/0x9)+-parseInt(_0x5678fa(0x1e4))/0xa*(-parseInt(_0x5678fa(0x206))/0xb);if(_0x36a927===_0x3a4f7b)break;else _0x1d73c1['push'](_0x1d73c1['shift']());}catch(_0xea83b6){_0x1d73c1['push'](_0x1d73c1['shift']());}}}(a0_0x1e82,0x41d34));import{readFileSync as a0_0x203088,existsSync as a0_0x1513b2}from'fs';import{randomUUID as a0_0x570c79}from'crypto';import{join as a0_0x38a70a}from'path';import{hostname as a0_0x3c71c3}from'os';import{execSync as a0_0x254f69}from'child_process';import{Server as a0_0x75a7d3}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport as a0_0x518a86}from'@modelcontextprotocol/sdk/server/stdio.js';import{ListToolsRequestSchema as a0_0x3b60c6,CallToolRequestSchema as a0_0x1e6d82}from'@modelcontextprotocol/sdk/types.js';function p(_0x1a4792){const _0x4677ae=a0_0x3fd2;if(!a0_0x1513b2(_0x1a4792))return;for(let _0x54b877 of a0_0x203088(_0x1a4792,'utf-8')['split']('\x0a')){let _0x11ec3e=_0x54b877['trim']();if(!_0x11ec3e||_0x11ec3e[_0x4677ae(0x219)]('#'))continue;let _0x39589e=_0x11ec3e[_0x4677ae(0x1c4)]('=');if(_0x39589e<0x0)continue;let _0x459bf7=_0x11ec3e[_0x4677ae(0x209)](0x0,_0x39589e)[_0x4677ae(0x1b9)](),_0x3163a=_0x11ec3e[_0x4677ae(0x209)](_0x39589e+0x1)[_0x4677ae(0x1b9)]()[_0x4677ae(0x1f1)](/^["']|["']$/g,'');if(!process.env[_0x459bf7])process.env[_0x459bf7]=_0x3163a;}}var C=process.env.HOME||'~',T=a0_0x38a70a(C,a0_0x25dfde(0x1e7));p(a0_0x38a70a(T,a0_0x25dfde(0x1eb)));var L=process['cwd']()[a0_0x25dfde(0x1f1)](/\//g,'-');p(a0_0x38a70a(T,L,a0_0x25dfde(0x1eb)));function U(){const _0x358a3e=a0_0x25dfde;try{return a0_0x254f69('tmux\x20display-message\x20-p\x20\x27#S\x27',{'encoding':_0x358a3e(0x20a),'timeout':0x7d0})[_0x358a3e(0x1b9)]();}catch{return'';}}function v(){const _0x106490=a0_0x25dfde;try{let _0x51a9c1=a0_0x38a70a(C,_0x106490(0x208),_0x106490(0x217));if(a0_0x1513b2(_0x51a9c1))return JSON[_0x106490(0x1be)](a0_0x203088(_0x51a9c1,_0x106490(0x20a)));}catch{}return{};}var H=v(),f=process.env.COMMHUB_URL||H[a0_0x25dfde(0x22a)]||a0_0x25dfde(0x1f5),j=process.env.COMMHUB_TMUX||U(),Z=process.env.COMMHUB_ALIAS||j||a0_0x3c71c3(),w=process.env.COMMHUB_RESUME_ID||process.env.CLAUDE_RESUME_ID||a0_0x570c79(),X=process.env.COMMHUB_TOKEN||H[a0_0x25dfde(0x1f6)]||'';function Y(_0x54d82b){const _0x3e6fb4=a0_0x25dfde;let _0x3c3fc1=new Date()[_0x3e6fb4(0x1bc)]()['slice'](0x0,0x8);process[_0x3e6fb4(0x1dd)][_0x3e6fb4(0x1bf)]('['+_0x3c3fc1+']\x20[commhub]\x20'+_0x54d82b+'\x0a');}function h(_0x580c47){return new Promise(_0x1a2743=>setTimeout(_0x1a2743,_0x580c47));}Y('ENV:\x20URL='+f+a0_0x25dfde(0x1d0)+Z+a0_0x25dfde(0x210)+w['slice'](0x0,0x8)+'...\x20TMUX='+(j||a0_0x25dfde(0x1ae))+'\x20CWD='+process[a0_0x25dfde(0x1bd)]()+'\x20PROJECT_ENV='+L);var k=new Map(),K=new a0_0x75a7d3({'name':'commhub-channel','version':a0_0x25dfde(0x1e0)},{'capabilities':{'experimental':{'claude/channel':{}},'tools':{}},'instructions':[a0_0x25dfde(0x22b),a0_0x25dfde(0x1c1),'Reply\x20using\x20the\x20commhub_reply\x20tool\x20to\x20report\x20status\x20or\x20results\x20back.',a0_0x25dfde(0x213),a0_0x25dfde(0x224)+Z][a0_0x25dfde(0x1ec)]('\x0a')});function a0_0x3fd2(_0x1d98b4,_0x57e953){_0x1d98b4=_0x1d98b4-0x1a6;const _0x1e82d5=a0_0x1e82();let _0x3fd218=_0x1e82d5[_0x1d98b4];return _0x3fd218;}K['setRequestHandler'](a0_0x3b60c6,async()=>({'tools':[{'name':a0_0x25dfde(0x228),'description':a0_0x25dfde(0x1f3),'inputSchema':{'type':'object','properties':{'task_id':{'type':a0_0x25dfde(0x1ee),'description':'The\x20task_id\x20from\x20the\x20channel\x20message\x20(or\x20\x27hub\x27\x20for\x20general)'},'text':{'type':a0_0x25dfde(0x1ee),'description':a0_0x25dfde(0x1ed)},'status':{'type':a0_0x25dfde(0x1ee),'enum':[a0_0x25dfde(0x21c),a0_0x25dfde(0x205),a0_0x25dfde(0x22f),'blocked',a0_0x25dfde(0x1b0),'in_progress'],'description':a0_0x25dfde(0x225)}},'required':['text']}},{'name':a0_0x25dfde(0x1cf),'description':a0_0x25dfde(0x1c0),'inputSchema':{'type':a0_0x25dfde(0x1c6),'properties':{'status':{'type':a0_0x25dfde(0x1ee),'enum':['working',a0_0x25dfde(0x1d2),a0_0x25dfde(0x1fa),a0_0x25dfde(0x1b0)]},'task':{'type':'string','description':'Current\x20task\x20description'},'progress':{'type':a0_0x25dfde(0x1b3),'description':a0_0x25dfde(0x21a)}},'required':[a0_0x25dfde(0x1ea)]}},{'name':a0_0x25dfde(0x1d6),'description':'Send\x20a\x20task\x20to\x20another\x20session\x20via\x20CommHub.','inputSchema':{'type':a0_0x25dfde(0x1c6),'properties':{'alias':{'type':a0_0x25dfde(0x1ee),'description':a0_0x25dfde(0x1af)},'task':{'type':a0_0x25dfde(0x1ee),'description':'Task\x20content'},'priority':{'type':a0_0x25dfde(0x1ee),'enum':[a0_0x25dfde(0x1ca),a0_0x25dfde(0x201),a0_0x25dfde(0x221)],'description':a0_0x25dfde(0x1d3)}},'required':[a0_0x25dfde(0x1de),a0_0x25dfde(0x226)]}},{'name':'commhub_send_message','description':'Send\x20a\x20message\x20to\x20another\x20session\x20(no\x20task\x20lifecycle,\x20just\x20chat).\x20Use\x20for\x20replies\x20and\x20status\x20updates.','inputSchema':{'type':a0_0x25dfde(0x1c6),'properties':{'alias':{'type':'string','description':a0_0x25dfde(0x1af)},'message':{'type':a0_0x25dfde(0x1ee),'description':a0_0x25dfde(0x1a6)}},'required':[a0_0x25dfde(0x1de),a0_0x25dfde(0x1f7)]}},{'name':a0_0x25dfde(0x215),'description':a0_0x25dfde(0x1d7),'inputSchema':{'type':'object','properties':{}}}]}));async function P(_0x38088f,_0x4467c0){const _0x384c2e=a0_0x25dfde;let _0xdffd1b=await fetch(f+_0x384c2e(0x1ad),{'method':_0x384c2e(0x1d1),'headers':{'Content-Type':_0x384c2e(0x207),'Accept':_0x384c2e(0x1e9),...X?{'Authorization':_0x384c2e(0x1ff)+X}:{}},'body':JSON['stringify']({'jsonrpc':_0x384c2e(0x1d5),'id':0x1,'method':_0x384c2e(0x223),'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x384c2e(0x1f4),'version':_0x384c2e(0x1e0)}}})});if(!_0xdffd1b['ok']){let _0x4f3b73=await _0xdffd1b[_0x384c2e(0x21b)]();return Y('CommHub\x20init\x20failed:\x20'+_0xdffd1b[_0x384c2e(0x1ea)]+'\x20'+_0x4f3b73[_0x384c2e(0x209)](0x0,0x64)),{'ok':!0x1,'error':_0x384c2e(0x1c8)+_0xdffd1b[_0x384c2e(0x1ea)]};}await _0xdffd1b[_0x384c2e(0x21b)]();let _0x52f353=(await(await fetch(f+_0x384c2e(0x1ad),{'method':_0x384c2e(0x1d1),'headers':{'Content-Type':'application/json','Accept':'application/json,\x20text/event-stream',...X?{'Authorization':'Bearer\x20'+X}:{}},'body':JSON[_0x384c2e(0x21f)]({'jsonrpc':_0x384c2e(0x1d5),'id':0x2,'method':_0x384c2e(0x203),'params':{'name':_0x38088f,'arguments':_0x4467c0}})}))[_0x384c2e(0x21b)]())['split']('\x0a')[_0x384c2e(0x1db)](_0x3a3b2d=>_0x3a3b2d[_0x384c2e(0x219)]('data:\x20'));if(_0x52f353){let _0x10542d=JSON['parse'](_0x52f353[_0x384c2e(0x209)](0x6));return _0x10542d?.[_0x384c2e(0x1f2)]?.['content']?.[0x0]?.[_0x384c2e(0x21b)]?JSON[_0x384c2e(0x1be)](_0x10542d[_0x384c2e(0x1f2)][_0x384c2e(0x1b4)][0x0][_0x384c2e(0x21b)]):_0x10542d;}return{'ok':!0x1,'error':_0x384c2e(0x1ef)};}K[a0_0x25dfde(0x1e8)](a0_0x1e6d82,async _0xd68c57=>{const _0x2416a8=a0_0x25dfde;let {name:_0x37ce67,arguments:_0x22538b}=_0xd68c57['params'];if(_0x37ce67===_0x2416a8(0x228)){let {task_id:_0x26fd5e,text:_0x5f3fbd,status:_0x509a61}=_0x22538b;if(_0x509a61===_0x2416a8(0x21c)||_0x509a61==='failed'||_0x509a61===_0x2416a8(0x22f)){let _0xb1c103=_0x509a61===_0x2416a8(0x21c)?'replied':_0x509a61,_0x310d99=_0x26fd5e?k[_0x2416a8(0x218)](_0x26fd5e)||_0x2416a8(0x22a):_0x2416a8(0x22a),_0x214bdc=await P(_0x2416a8(0x1c3),{'alias':_0x310d99,'text':_0x5f3fbd,'in_reply_to':_0x26fd5e||void 0x0,'status':_0xb1c103,'from_session':Z});if(_0x26fd5e)k[_0x2416a8(0x20d)](_0x26fd5e);return{'content':[{'type':_0x2416a8(0x21b),'text':JSON[_0x2416a8(0x21f)](_0x214bdc)}]};}let _0x42a78c=await P(_0x2416a8(0x21e),{'resume_id':w,'alias':Z,'status':_0x509a61===_0x2416a8(0x1fa)?_0x2416a8(0x1fa):_0x509a61===_0x2416a8(0x1b0)?_0x2416a8(0x1b0):_0x2416a8(0x1e6),'task':_0x5f3fbd[_0x2416a8(0x209)](0x0,0xc8),'output':_0x5f3fbd});return{'content':[{'type':_0x2416a8(0x21b),'text':JSON['stringify'](_0x42a78c)}]};}if(_0x37ce67===_0x2416a8(0x1cf)){let {status:_0x208716,task:_0x4e394b,progress:_0x44724b}=_0x22538b,_0x3b2c20=await P('report_status',{'resume_id':w,'alias':Z,'status':_0x208716,'task':_0x4e394b,'progress':_0x44724b});return{'content':[{'type':_0x2416a8(0x21b),'text':JSON[_0x2416a8(0x21f)](_0x3b2c20)}]};}if(_0x37ce67===_0x2416a8(0x1d6)){let {alias:_0x3d6fa0,task:_0x56daa0,priority:_0x399ff4}=_0x22538b,_0x16cfc6=await P('send_task',{'alias':_0x3d6fa0,'task':_0x56daa0,'priority':_0x399ff4||_0x2416a8(0x201),'from_session':Z});return{'content':[{'type':'text','text':JSON[_0x2416a8(0x21f)](_0x16cfc6)}]};}if(_0x37ce67==='commhub_send_message'){let {alias:_0x49f59b,message:_0x15c1cd}=_0x22538b,_0x4e55ff=await P(_0x2416a8(0x222),{'alias':_0x49f59b,'message':_0x15c1cd,'from_session':Z});return{'content':[{'type':_0x2416a8(0x21b),'text':JSON[_0x2416a8(0x21f)](_0x4e55ff)}]};}if(_0x37ce67===_0x2416a8(0x215)){let _0x1b5f33=await P(_0x2416a8(0x1ce),{});return{'content':[{'type':_0x2416a8(0x21b),'text':JSON[_0x2416a8(0x21f)](_0x1b5f33)}]};}return{'content':[{'type':_0x2416a8(0x21b),'text':JSON[_0x2416a8(0x21f)]({'error':_0x2416a8(0x1c7)})}]};});async function u(){const _0x4afda8=a0_0x25dfde;let _0x3e025f=f+_0x4afda8(0x214)+encodeURIComponent(Z),_0xd7066f={};if(X)_0xd7066f[_0x4afda8(0x1cc)]=_0x4afda8(0x1ff)+X;Y('connecting\x20to\x20'+_0x3e025f);while(!0x0){try{let _0x227286=await fetch(_0x3e025f,{'headers':_0xd7066f});if(!_0x227286['ok']){Y(_0x4afda8(0x1b5)+_0x227286[_0x4afda8(0x1ea)]+'\x20'+_0x227286[_0x4afda8(0x20e)]),await h(0x1388);continue;}let _0xf8a7b=_0x227286[_0x4afda8(0x20c)][_0x4afda8(0x1f8)](),_0x5429c4=new TextDecoder(),_0x514f7d='';while(!0x0){let {done:_0x2ef86c,value:_0x33a48a}=await _0xf8a7b[_0x4afda8(0x22e)]();if(_0x2ef86c)break;_0x514f7d+=_0x5429c4['decode'](_0x33a48a,{'stream':!0x0});let _0x3a4dea=_0x514f7d['split']('\x0a\x0a');_0x514f7d=_0x3a4dea[_0x4afda8(0x216)]()||'';for(let _0x3a5f5a of _0x3a4dea){let _0x32f715=_0x3a5f5a[_0x4afda8(0x1e2)]('\x0a')[_0x4afda8(0x1db)](_0x7e990a=>_0x7e990a['startsWith'](_0x4afda8(0x220)));if(!_0x32f715)continue;try{let _0x177972=JSON[_0x4afda8(0x1be)](_0x32f715[_0x4afda8(0x209)](0x6));await S(_0x177972);}catch(_0x19250c){Y(_0x4afda8(0x1a7)+_0x19250c);}}}Y('SSE\x20stream\x20ended,\x20reconnecting...');}catch(_0x543d55){Y('SSE\x20connection\x20error:\x20'+_0x543d55);}await h(0xbb8);}}async function S(_0x4660d6){const _0x319077=a0_0x25dfde;if(_0x4660d6[_0x319077(0x1f9)]===_0x319077(0x1ba)){Y(_0x319077(0x227)+Z+'\x22');return;}if(_0x4660d6[_0x319077(0x1f9)]===_0x319077(0x1fe)){if(Y('←\x20message\x20from\x20'+_0x4660d6[_0x319077(0x1b1)]+':\x20'+_0x4660d6['message'][_0x319077(0x209)](0x0,0x3c)),await K[_0x319077(0x20f)]({'method':_0x319077(0x1c5),'params':{'content':_0x4660d6[_0x319077(0x1f7)],'meta':{'sender':_0x4660d6[_0x319077(0x1b1)]||_0x319077(0x22a),'sender_id':_0x319077(0x1aa),'user':_0x4660d6[_0x319077(0x1b1)]||_0x319077(0x22a),'priority':'normal'}}}),_0x4660d6[_0x319077(0x1b8)])await P(_0x319077(0x22c),{'alias':Z,'message_id':_0x4660d6['message_id']});return;}if(_0x4660d6[_0x319077(0x1f9)]===_0x319077(0x1a8)||_0x4660d6[_0x319077(0x1f9)]==='broadcast'){Y('←\x20'+_0x4660d6[_0x319077(0x1f9)]+_0x319077(0x1ac)+_0x4660d6[_0x319077(0x200)]+'\x20priority='+(_0x4660d6[_0x319077(0x1d9)]||_0x319077(0x201)));let _0x41af7e=await P('get_inbox',{'alias':Z,'limit':0x5});if(_0x41af7e?.['ok']&&_0x41af7e[_0x319077(0x1df)]?.[_0x319077(0x204)]>0x0)for(let _0x3dabee of _0x41af7e[_0x319077(0x1df)]){let _0x2012dd={'sender':_0x3dabee[_0x319077(0x20b)]||_0x319077(0x22a),'sender_id':_0x319077(0x1aa),'user':_0x3dabee[_0x319077(0x20b)]||_0x319077(0x22a),'task_id':_0x3dabee['id'],'priority':_0x3dabee[_0x319077(0x1d9)]||_0x319077(0x201)};k[_0x319077(0x1a9)](_0x3dabee['id'],_0x3dabee['from_session']||_0x319077(0x22a)),await K['notification']({'method':_0x319077(0x1c5),'params':{'content':_0x3dabee[_0x319077(0x1b4)],'meta':_0x2012dd}}),Y('→\x20injected\x20task\x20'+_0x3dabee['id']['slice'](0x0,0x8)+_0x319077(0x1b2)+_0x3dabee[_0x319077(0x20b)]+':\x20'+_0x3dabee[_0x319077(0x1b4)]['slice'](0x0,0x3c)),await P('ack_inbox',{'alias':Z,'message_id':_0x3dabee['id']});}}}function a0_0x1e82(){const _0xd9294b=['Authorization','shutting\x20down,\x20reporting\x20offline...','get_all_status','commhub_report_status','\x20ALIAS=','POST','idle','Priority\x20(default:\x20normal)','claude-code','2.0','commhub_send_task','Get\x20status\x20of\x20all\x20sessions\x20from\x20CommHub.','6lqiIRY','priority','fatal:\x20','find','starting\x20SSE\x20listener...','stderr','alias','messages','0.3.0','registered\x20as\x20\x22','split','14104EJNLvm','3070OIVJbn','\x22\x20(','working','.claude/channels/commhub','setRequestHandler','application/json,\x20text/event-stream','status','.env','join','Reply\x20text\x20/\x20result\x20summary','string','no\x20response','207FmaUXT','replace','result','Reply\x20to\x20a\x20CommHub\x20task\x20—\x20report\x20completion\x20or\x20send\x20a\x20message\x20back\x20to\x20the\x20hub.','commhub-channel','http://127.0.0.1:9200','token','message','getReader','type','blocked','1278956UPugtK','3UWAlbe','end','new_message','Bearer\x20','inbox_count','normal','287949abrPDg','tools/call','length','failed','38511XukqnD','application/json','.anet','slice','utf-8','from_session','body','delete','statusText','notification','\x20RESUME_ID=','offline','exit','You\x20can\x20also\x20use\x20commhub_report_status\x20to\x20update\x20your\x20session\x20status.','/events/','commhub_get_all_status','pop','config.json','get','startsWith','Progress\x200-100','text','completed','850936gyKaeP','report_status','stringify','data:\x20','low','send_message','initialize','Session\x20alias:\x20','Task\x20outcome:\x20completed/failed/cancelled\x20for\x20final\x20results,\x20blocked/error/in_progress\x20for\x20status\x20updates','task','SSE\x20connected\x20as\x20\x22','commhub_reply','heartbeat\x20failed:\x20','hub','Messages\x20from\x20CommHub\x20arrive\x20as\x20<channel\x20source=\x22commhub\x22\x20task_id=\x22...\x22\x20priority=\x22...\x22\x20from=\x22...\x22>','ack_inbox','warning:\x20could\x20not\x20register:\x20','read','cancelled','Message\x20content','parse\x20error:\x20','new_task','set','commhub','75524CBrNww',':\x20inbox_count=','/mcp','none','Target\x20session\x20alias','error','from','\x20from\x20','number','content','SSE\x20error:\x20','SIGINT','catch','message_id','trim','connected','connect','toTimeString','cwd','parse','write','Update\x20this\x20session\x27s\x20status\x20in\x20CommHub\x20(working/idle/blocked/error).\x20Returns\x20inbox_count.','These\x20are\x20tasks\x20dispatched\x20by\x20the\x20hub\x20or\x20other\x20sessions\x20via\x20the\x20CommHub\x20Server.','then','send_reply','indexOf','notifications/claude/channel','object','unknown\x20tool','init\x20failed:\x20','563030GPVrnz','high','ready\x20—\x20waiting\x20for\x20events'];a0_0x1e82=function(){return _0xd9294b;};return a0_0x1e82();}async function A(){const _0x1eeb74=a0_0x25dfde;let _0xf1112f=new a0_0x518a86();await K[_0x1eeb74(0x1bb)](_0xf1112f),Y('MCP\x20stdio\x20connected'),Y(_0x1eeb74(0x1dc)),u()[_0x1eeb74(0x1b7)](_0x450905=>Y('SSE\x20fatal:\x20'+_0x450905)),P(_0x1eeb74(0x21e),{'resume_id':w,'alias':Z,'status':'idle','server':a0_0x3c71c3(),'hostname':a0_0x3c71c3(),'agent':_0x1eeb74(0x1d4),'project_dir':process['cwd'](),'tmux_name':j||void 0x0})[_0x1eeb74(0x1c2)](()=>Y(_0x1eeb74(0x1e1)+Z+_0x1eeb74(0x1e5)+w[_0x1eeb74(0x209)](0x0,0x8)+')'))[_0x1eeb74(0x1b7)](_0x42eacb=>Y(_0x1eeb74(0x22d)+_0x42eacb)),setInterval(()=>{const _0x1a9ccc=_0x1eeb74;P(_0x1a9ccc(0x21e),{'resume_id':w,'alias':Z,'status':_0x1a9ccc(0x1d2),'server':a0_0x3c71c3(),'hostname':a0_0x3c71c3(),'agent':'claude-code','project_dir':process[_0x1a9ccc(0x1bd)](),'tmux_name':j||void 0x0})['catch'](_0x478a48=>Y(_0x1a9ccc(0x229)+_0x478a48));},0x2bf20),Y(_0x1eeb74(0x1cb));}A()['catch'](_0x44df27=>{const _0x29b611=a0_0x25dfde;Y(_0x29b611(0x1da)+_0x44df27),process[_0x29b611(0x212)](0x1);});async function N(){const _0x25c2d0=a0_0x25dfde;Y(_0x25c2d0(0x1cd)),await P('report_status',{'resume_id':w,'alias':Z,'status':_0x25c2d0(0x211),'task':'session\x20disconnected'})['catch'](()=>{}),process[_0x25c2d0(0x212)](0x0);}process['stdin']['on'](a0_0x25dfde(0x1fd),()=>N()),process['on']('SIGTERM',()=>N()),process['on'](a0_0x25dfde(0x1b6),()=>N());
2
+ const a0_0x1fabc4=a0_0x1165;(function(_0x5ad2dd,_0x3b8619){const _0x12e74a=a0_0x1165,_0x3e49f3=_0x5ad2dd();while(!![]){try{const _0x291d18=parseInt(_0x12e74a(0x165))/0x1+parseInt(_0x12e74a(0x160))/0x2+-parseInt(_0x12e74a(0x140))/0x3+parseInt(_0x12e74a(0x14c))/0x4+-parseInt(_0x12e74a(0x199))/0x5+parseInt(_0x12e74a(0x16f))/0x6*(parseInt(_0x12e74a(0x15b))/0x7)+parseInt(_0x12e74a(0x1a2))/0x8;if(_0x291d18===_0x3b8619)break;else _0x3e49f3['push'](_0x3e49f3['shift']());}catch(_0x4d31ce){_0x3e49f3['push'](_0x3e49f3['shift']());}}}(a0_0x9dca,0xae20f));import{readFileSync as a0_0x2380ea,existsSync as a0_0x1cdaa4}from'fs';import{randomUUID as a0_0x36c588}from'crypto';import{join as a0_0x539ff7}from'path';import{hostname as a0_0xa9dc9e}from'os';import{execSync as a0_0x3cca45}from'child_process';import{Server as a0_0x40a1fe}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport as a0_0x2dd04e}from'@modelcontextprotocol/sdk/server/stdio.js';import{ListToolsRequestSchema as a0_0x5ba4a7,CallToolRequestSchema as a0_0x2343d8}from'@modelcontextprotocol/sdk/types.js';function p(_0x4f3780){const _0x38831b=a0_0x1165;if(!a0_0x1cdaa4(_0x4f3780))return;for(let _0x4b102e of a0_0x2380ea(_0x4f3780,_0x38831b(0x16b))[_0x38831b(0x1a7)]('\x0a')){let _0x477935=_0x4b102e[_0x38831b(0x173)]();if(!_0x477935||_0x477935[_0x38831b(0x162)]('#'))continue;let _0x187209=_0x477935[_0x38831b(0x198)]('=');if(_0x187209<0x0)continue;let _0x2aad62=_0x477935['slice'](0x0,_0x187209)[_0x38831b(0x173)](),_0x48dbb7=_0x477935[_0x38831b(0x13c)](_0x187209+0x1)[_0x38831b(0x173)]()[_0x38831b(0x19b)](/^["']|["']$/g,'');if(!process.env[_0x2aad62])process.env[_0x2aad62]=_0x48dbb7;}}var C=process.env.HOME||'~',T=a0_0x539ff7(C,a0_0x1fabc4(0x16c));p(a0_0x539ff7(T,a0_0x1fabc4(0x193)));var L=process[a0_0x1fabc4(0x13f)]()[a0_0x1fabc4(0x19b)](/\//g,'-');function a0_0x1165(_0x1b96b3,_0x1a6933){_0x1b96b3=_0x1b96b3-0x131;const _0x9dcafa=a0_0x9dca();let _0x1165a9=_0x9dcafa[_0x1b96b3];return _0x1165a9;}p(a0_0x539ff7(T,L,a0_0x1fabc4(0x193)));function U(){const _0x5c2a43=a0_0x1fabc4;try{return a0_0x3cca45(_0x5c2a43(0x1af),{'encoding':'utf-8','timeout':0x7d0})[_0x5c2a43(0x173)]();}catch{return'';}}function v(){const _0x5b7cb6=a0_0x1fabc4;try{let _0x4f715f=a0_0x539ff7(C,'.anet','config.json');if(a0_0x1cdaa4(_0x4f715f))return JSON[_0x5b7cb6(0x178)](a0_0x2380ea(_0x4f715f,'utf-8'));}catch{}return{};}var H=v(),f=process.env.COMMHUB_URL||H[a0_0x1fabc4(0x16d)]||a0_0x1fabc4(0x13e),j=process.env.COMMHUB_TMUX||U(),Z=process.env.COMMHUB_ALIAS||j||a0_0xa9dc9e(),w=process.env.COMMHUB_RESUME_ID||process.env.CLAUDE_RESUME_ID||a0_0x36c588(),X=process.env.COMMHUB_TOKEN||H[a0_0x1fabc4(0x15f)]||'';function Y(_0xd0e01f){const _0x1974bd=a0_0x1fabc4;let _0x285440=new Date()[_0x1974bd(0x142)]()[_0x1974bd(0x13c)](0x0,0x8);process[_0x1974bd(0x1a1)][_0x1974bd(0x139)]('['+_0x285440+']\x20[commhub]\x20'+_0xd0e01f+'\x0a');}function h(_0x2d9a6d){return new Promise(_0x243324=>setTimeout(_0x243324,_0x2d9a6d));}Y(a0_0x1fabc4(0x18d)+f+'\x20ALIAS='+Z+a0_0x1fabc4(0x167)+w[a0_0x1fabc4(0x13c)](0x0,0x8)+'...\x20TMUX='+(j||a0_0x1fabc4(0x13b))+a0_0x1fabc4(0x1a9)+process['cwd']()+a0_0x1fabc4(0x135)+L);var k=new Map(),K=new a0_0x40a1fe({'name':a0_0x1fabc4(0x180),'version':a0_0x1fabc4(0x149)},{'capabilities':{'experimental':{'claude/channel':{}},'tools':{}},'instructions':[a0_0x1fabc4(0x137),a0_0x1fabc4(0x164),a0_0x1fabc4(0x153),a0_0x1fabc4(0x13a),a0_0x1fabc4(0x18b)+Z][a0_0x1fabc4(0x197)]('\x0a')});K['setRequestHandler'](a0_0x5ba4a7,async()=>({'tools':[{'name':a0_0x1fabc4(0x18a),'description':a0_0x1fabc4(0x1aa),'inputSchema':{'type':a0_0x1fabc4(0x15e),'properties':{'task_id':{'type':a0_0x1fabc4(0x1b0),'description':a0_0x1fabc4(0x19f)},'text':{'type':'string','description':'Reply\x20text\x20/\x20result\x20summary'},'status':{'type':'string','enum':[a0_0x1fabc4(0x184),a0_0x1fabc4(0x18c),a0_0x1fabc4(0x157),a0_0x1fabc4(0x1ba),a0_0x1fabc4(0x196),a0_0x1fabc4(0x146)],'description':a0_0x1fabc4(0x147)}},'required':[a0_0x1fabc4(0x1b8)]}},{'name':a0_0x1fabc4(0x1b3),'description':a0_0x1fabc4(0x143),'inputSchema':{'type':a0_0x1fabc4(0x15e),'properties':{'status':{'type':'string','enum':[a0_0x1fabc4(0x161),a0_0x1fabc4(0x151),a0_0x1fabc4(0x1ba),a0_0x1fabc4(0x196)]},'task':{'type':a0_0x1fabc4(0x1b0),'description':a0_0x1fabc4(0x187)},'progress':{'type':a0_0x1fabc4(0x176),'description':'Progress\x200-100'}},'required':[a0_0x1fabc4(0x152)]}},{'name':'commhub_send_task','description':a0_0x1fabc4(0x185),'inputSchema':{'type':a0_0x1fabc4(0x15e),'properties':{'alias':{'type':a0_0x1fabc4(0x1b0),'description':a0_0x1fabc4(0x14d)},'task':{'type':a0_0x1fabc4(0x1b0),'description':a0_0x1fabc4(0x1a5)},'priority':{'type':a0_0x1fabc4(0x1b0),'enum':['high',a0_0x1fabc4(0x136),a0_0x1fabc4(0x179)],'description':a0_0x1fabc4(0x145)}},'required':['alias',a0_0x1fabc4(0x15c)]}},{'name':a0_0x1fabc4(0x194),'description':a0_0x1fabc4(0x14a),'inputSchema':{'type':a0_0x1fabc4(0x15e),'properties':{'alias':{'type':a0_0x1fabc4(0x1b0),'description':a0_0x1fabc4(0x14d)},'message':{'type':a0_0x1fabc4(0x1b0),'description':'Message\x20content'}},'required':['alias',a0_0x1fabc4(0x15a)]}},{'name':a0_0x1fabc4(0x141),'description':a0_0x1fabc4(0x14e),'inputSchema':{'type':a0_0x1fabc4(0x15e),'properties':{}}}]}));async function P(_0x39c981,_0x19c939){const _0x5d2948=a0_0x1fabc4;let _0x36aaa9=await fetch(f+_0x5d2948(0x13d),{'method':_0x5d2948(0x134),'headers':{'Content-Type':_0x5d2948(0x16e),'Accept':_0x5d2948(0x1b9),...X?{'Authorization':'Bearer\x20'+X}:{}},'body':JSON[_0x5d2948(0x148)]({'jsonrpc':_0x5d2948(0x1a4),'id':0x1,'method':_0x5d2948(0x133),'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x5d2948(0x180),'version':_0x5d2948(0x149)}}})});if(!_0x36aaa9['ok']){let _0x2e4b39=await _0x36aaa9[_0x5d2948(0x1b8)]();return Y('CommHub\x20init\x20failed:\x20'+_0x36aaa9['status']+'\x20'+_0x2e4b39[_0x5d2948(0x13c)](0x0,0x64)),{'ok':!0x1,'error':'init\x20failed:\x20'+_0x36aaa9[_0x5d2948(0x152)]};}await _0x36aaa9[_0x5d2948(0x1b8)]();let _0x144a91=(await(await fetch(f+'/mcp',{'method':_0x5d2948(0x134),'headers':{'Content-Type':_0x5d2948(0x16e),'Accept':_0x5d2948(0x1b9),...X?{'Authorization':_0x5d2948(0x1b2)+X}:{}},'body':JSON[_0x5d2948(0x148)]({'jsonrpc':_0x5d2948(0x1a4),'id':0x2,'method':_0x5d2948(0x182),'params':{'name':_0x39c981,'arguments':_0x19c939}})}))[_0x5d2948(0x1b8)]())[_0x5d2948(0x1a7)]('\x0a')[_0x5d2948(0x18f)](_0x547f0a=>_0x547f0a[_0x5d2948(0x162)](_0x5d2948(0x1a6)));if(_0x144a91){let _0x3d3294=JSON[_0x5d2948(0x178)](_0x144a91['slice'](0x6));return _0x3d3294?.[_0x5d2948(0x186)]?.[_0x5d2948(0x191)]?.[0x0]?.[_0x5d2948(0x1b8)]?JSON[_0x5d2948(0x178)](_0x3d3294[_0x5d2948(0x186)][_0x5d2948(0x191)][0x0][_0x5d2948(0x1b8)]):_0x3d3294;}return{'ok':!0x1,'error':'no\x20response'};}K['setRequestHandler'](a0_0x2343d8,async _0x2af7bc=>{const _0x4c3bf4=a0_0x1fabc4;let {name:_0x215e7b,arguments:_0xc42a2}=_0x2af7bc[_0x4c3bf4(0x174)];if(_0x215e7b===_0x4c3bf4(0x18a)){let {task_id:_0x30128e,text:_0x3c2935,status:_0x57ba70}=_0xc42a2;if(_0x57ba70===_0x4c3bf4(0x184)||_0x57ba70===_0x4c3bf4(0x18c)||_0x57ba70===_0x4c3bf4(0x157)){let _0x5a3926=_0x57ba70===_0x4c3bf4(0x184)?_0x4c3bf4(0x166):_0x57ba70,_0x165ba4=_0x30128e?k[_0x4c3bf4(0x189)](_0x30128e)||_0x4c3bf4(0x16d):_0x4c3bf4(0x16d),_0x90b66c=await P(_0x4c3bf4(0x14b),{'alias':_0x165ba4,'text':_0x3c2935,'in_reply_to':_0x30128e||void 0x0,'status':_0x5a3926,'from_session':Z});if(_0x30128e)k[_0x4c3bf4(0x19e)](_0x30128e);return{'content':[{'type':_0x4c3bf4(0x1b8),'text':JSON[_0x4c3bf4(0x148)](_0x90b66c)}]};}let _0x3790d9=await P(_0x4c3bf4(0x181),{'resume_id':w,'alias':Z,'status':_0x57ba70===_0x4c3bf4(0x1ba)?_0x4c3bf4(0x1ba):_0x57ba70===_0x4c3bf4(0x196)?_0x4c3bf4(0x196):_0x4c3bf4(0x161),'task':_0x3c2935[_0x4c3bf4(0x13c)](0x0,0xc8),'output':_0x3c2935});return{'content':[{'type':_0x4c3bf4(0x1b8),'text':JSON[_0x4c3bf4(0x148)](_0x3790d9)}]};}if(_0x215e7b===_0x4c3bf4(0x1b3)){let {status:_0x12778c,task:_0x103550,progress:_0x2a9436}=_0xc42a2,_0x378a20=await P(_0x4c3bf4(0x181),{'resume_id':w,'alias':Z,'status':_0x12778c,'task':_0x103550,'progress':_0x2a9436});return{'content':[{'type':'text','text':JSON['stringify'](_0x378a20)}]};}if(_0x215e7b===_0x4c3bf4(0x1b4)){let {alias:_0x21b475,task:_0x151d5c,priority:_0x58afab}=_0xc42a2,_0x199cec=await P(_0x4c3bf4(0x171),{'alias':_0x21b475,'task':_0x151d5c,'priority':_0x58afab||_0x4c3bf4(0x136),'from_session':Z});return{'content':[{'type':_0x4c3bf4(0x1b8),'text':JSON[_0x4c3bf4(0x148)](_0x199cec)}]};}if(_0x215e7b===_0x4c3bf4(0x194)){let {alias:_0x23475b,message:_0x949a6b}=_0xc42a2,_0x23389f=await P('send_message',{'alias':_0x23475b,'message':_0x949a6b,'from_session':Z});return{'content':[{'type':_0x4c3bf4(0x1b8),'text':JSON[_0x4c3bf4(0x148)](_0x23389f)}]};}if(_0x215e7b===_0x4c3bf4(0x141)){let _0x345a46=await P(_0x4c3bf4(0x19d),{});return{'content':[{'type':_0x4c3bf4(0x1b8),'text':JSON[_0x4c3bf4(0x148)](_0x345a46)}]};}return{'content':[{'type':_0x4c3bf4(0x1b8),'text':JSON[_0x4c3bf4(0x148)]({'error':_0x4c3bf4(0x17e)})}]};});async function u(){const _0x235360=a0_0x1fabc4;let _0x447d5e=f+_0x235360(0x18e)+encodeURIComponent(Z),_0xcb173b={};if(X)_0xcb173b[_0x235360(0x150)]=_0x235360(0x1b2)+X;Y(_0x235360(0x1a0)+_0x447d5e);while(!0x0){try{let _0x34a786=await fetch(_0x447d5e,{'headers':_0xcb173b});if(!_0x34a786['ok']){Y(_0x235360(0x183)+_0x34a786[_0x235360(0x152)]+'\x20'+_0x34a786[_0x235360(0x159)]),await h(0x1388);continue;}let _0x5ea4e7=_0x34a786[_0x235360(0x155)][_0x235360(0x188)](),_0x4f8c50=new TextDecoder(),_0x14c861='';while(!0x0){let {done:_0x3d28d5,value:_0x57c9bf}=await _0x5ea4e7[_0x235360(0x17f)]();if(_0x3d28d5)break;_0x14c861+=_0x4f8c50[_0x235360(0x1ac)](_0x57c9bf,{'stream':!0x0});let _0xe09af9=_0x14c861[_0x235360(0x1a7)]('\x0a\x0a');_0x14c861=_0xe09af9[_0x235360(0x1bb)]()||'';for(let _0x1ac03a of _0xe09af9){let _0x1a7b7d=_0x1ac03a[_0x235360(0x1a7)]('\x0a')[_0x235360(0x18f)](_0x15da82=>_0x15da82[_0x235360(0x162)]('data:\x20'));if(!_0x1a7b7d)continue;try{let _0x5f4fdb=JSON['parse'](_0x1a7b7d['slice'](0x6));await S(_0x5f4fdb);}catch(_0x1e9462){Y(_0x235360(0x156)+_0x1e9462);}}}Y('SSE\x20stream\x20ended,\x20reconnecting...');}catch(_0x5ca4d1){Y(_0x235360(0x132)+_0x5ca4d1);}await h(0xbb8);}}async function S(_0x192be4){const _0x591721=a0_0x1fabc4;if(_0x192be4[_0x591721(0x131)]===_0x591721(0x175)){Y('SSE\x20connected\x20as\x20\x22'+Z+'\x22');return;}if(_0x192be4[_0x591721(0x131)]===_0x591721(0x1b1)){if(Y('←\x20message\x20from\x20'+_0x192be4[_0x591721(0x14f)]+':\x20'+_0x192be4['message'][_0x591721(0x13c)](0x0,0x3c)),await K[_0x591721(0x168)]({'method':_0x591721(0x154),'params':{'content':_0x192be4[_0x591721(0x15a)],'meta':{'sender':_0x192be4[_0x591721(0x14f)]||_0x591721(0x16d),'sender_id':_0x591721(0x163),'user':_0x192be4[_0x591721(0x14f)]||'hub','priority':'normal'}}}),_0x192be4['message_id'])await P('ack_inbox',{'alias':Z,'message_id':_0x192be4[_0x591721(0x1ae)]});return;}if(_0x192be4['type']===_0x591721(0x1ad)||_0x192be4[_0x591721(0x131)]===_0x591721(0x138)){Y('←\x20'+_0x192be4[_0x591721(0x131)]+_0x591721(0x158)+_0x192be4[_0x591721(0x1bc)]+_0x591721(0x1b5)+(_0x192be4['priority']||_0x591721(0x136)));let _0x1ac831=await P(_0x591721(0x1a3),{'alias':Z,'limit':0x5});if(_0x1ac831?.['ok']&&_0x1ac831[_0x591721(0x19a)]?.['length']>0x0)for(let _0x5493d6 of _0x1ac831[_0x591721(0x19a)]){let _0x4c2fd4={'sender':_0x5493d6[_0x591721(0x192)]||_0x591721(0x16d),'sender_id':_0x591721(0x163),'user':_0x5493d6[_0x591721(0x192)]||_0x591721(0x16d),'task_id':_0x5493d6['id'],'priority':_0x5493d6[_0x591721(0x144)]||_0x591721(0x136)};k[_0x591721(0x170)](_0x5493d6['id'],_0x5493d6[_0x591721(0x192)]||'hub'),await K[_0x591721(0x168)]({'method':_0x591721(0x154),'params':{'content':_0x5493d6[_0x591721(0x191)],'meta':_0x4c2fd4}}),Y('→\x20injected\x20task\x20'+_0x5493d6['id'][_0x591721(0x13c)](0x0,0x8)+_0x591721(0x1b6)+_0x5493d6[_0x591721(0x192)]+':\x20'+_0x5493d6[_0x591721(0x191)][_0x591721(0x13c)](0x0,0x3c)),await P('ack_inbox',{'alias':Z,'message_id':_0x5493d6['id']});}}}async function A(){const _0x5d943b=a0_0x1fabc4;let _0x3b523a=new a0_0x2dd04e();await K[_0x5d943b(0x17b)](_0x3b523a),Y(_0x5d943b(0x1a8)),Y('starting\x20SSE\x20listener...'),u()[_0x5d943b(0x16a)](_0x3c265a=>Y(_0x5d943b(0x17c)+_0x3c265a)),P('report_status',{'resume_id':w,'alias':Z,'status':_0x5d943b(0x151),'server':a0_0xa9dc9e(),'hostname':a0_0xa9dc9e(),'agent':_0x5d943b(0x190),'project_dir':process[_0x5d943b(0x13f)](),'tmux_name':j||void 0x0})[_0x5d943b(0x195)](()=>Y(_0x5d943b(0x1ab)+Z+'\x22\x20('+w[_0x5d943b(0x13c)](0x0,0x8)+')'))[_0x5d943b(0x16a)](_0x15e6b8=>Y(_0x5d943b(0x169)+_0x15e6b8)),setInterval(()=>{const _0x39f7ce=_0x5d943b;P('report_status',{'resume_id':w,'alias':Z,'status':'idle','server':a0_0xa9dc9e(),'hostname':a0_0xa9dc9e(),'agent':'claude-code','project_dir':process[_0x39f7ce(0x13f)](),'tmux_name':j||void 0x0})[_0x39f7ce(0x16a)](_0x25f139=>Y(_0x39f7ce(0x15d)+_0x25f139));},0x2bf20),Y(_0x5d943b(0x19c));}A()[a0_0x1fabc4(0x16a)](_0x37ee6b=>{const _0x252ae9=a0_0x1fabc4;Y(_0x252ae9(0x177)+_0x37ee6b),process[_0x252ae9(0x172)](0x1);});async function N(){const _0x467838=a0_0x1fabc4;Y('shutting\x20down,\x20reporting\x20offline...'),await P('report_status',{'resume_id':w,'alias':Z,'status':'offline','task':'session\x20disconnected'})[_0x467838(0x16a)](()=>{}),process[_0x467838(0x172)](0x0);}function a0_0x9dca(){const _0x2e0d58=['fatal:\x20','parse','low','stdin','connect','SSE\x20fatal:\x20','SIGTERM','unknown\x20tool','read','commhub-channel','report_status','tools/call','SSE\x20error:\x20','completed','Send\x20a\x20task\x20to\x20another\x20session\x20via\x20CommHub.','result','Current\x20task\x20description','getReader','get','commhub_reply','Session\x20alias:\x20','failed','ENV:\x20URL=','/events/','find','claude-code','content','from_session','.env','commhub_send_message','then','error','join','indexOf','5251230TRrriX','messages','replace','ready\x20—\x20waiting\x20for\x20events','get_all_status','delete','The\x20task_id\x20from\x20the\x20channel\x20message\x20(or\x20\x27hub\x27\x20for\x20general)','connecting\x20to\x20','stderr','6232448mTHjrg','get_inbox','2.0','Task\x20content','data:\x20','split','MCP\x20stdio\x20connected','\x20CWD=','Reply\x20to\x20a\x20CommHub\x20task\x20—\x20report\x20completion\x20or\x20send\x20a\x20message\x20back\x20to\x20the\x20hub.','registered\x20as\x20\x22','decode','new_task','message_id','tmux\x20display-message\x20-p\x20\x27#S\x27','string','new_message','Bearer\x20','commhub_report_status','commhub_send_task','\x20priority=','\x20from\x20','SIGINT','text','application/json,\x20text/event-stream','blocked','pop','inbox_count','type','SSE\x20connection\x20error:\x20','initialize','POST','\x20PROJECT_ENV=','normal','Messages\x20from\x20CommHub\x20arrive\x20as\x20<channel\x20source=\x22commhub\x22\x20task_id=\x22...\x22\x20priority=\x22...\x22\x20from=\x22...\x22>','broadcast','write','You\x20can\x20also\x20use\x20commhub_report_status\x20to\x20update\x20your\x20session\x20status.','none','slice','/mcp','http://127.0.0.1:9200','cwd','3632538ZDysmG','commhub_get_all_status','toTimeString','Update\x20this\x20session\x27s\x20status\x20in\x20CommHub\x20(working/idle/blocked/error).\x20Returns\x20inbox_count.','priority','Priority\x20(default:\x20normal)','in_progress','Task\x20outcome:\x20completed/failed/cancelled\x20for\x20final\x20results,\x20blocked/error/in_progress\x20for\x20status\x20updates','stringify','0.3.0','Send\x20a\x20message\x20to\x20another\x20session\x20(no\x20task\x20lifecycle,\x20just\x20chat).\x20Use\x20for\x20replies\x20and\x20status\x20updates.','send_reply','121108NBcbbD','Target\x20session\x20alias','Get\x20status\x20of\x20all\x20sessions\x20from\x20CommHub.','from','Authorization','idle','status','Reply\x20using\x20the\x20commhub_reply\x20tool\x20to\x20report\x20status\x20or\x20results\x20back.','notifications/claude/channel','body','parse\x20error:\x20','cancelled',':\x20inbox_count=','statusText','message','91ZCcVvO','task','heartbeat\x20failed:\x20','object','token','1762358DXalbZ','working','startsWith','commhub','These\x20are\x20tasks\x20dispatched\x20by\x20the\x20hub\x20or\x20other\x20sessions\x20via\x20the\x20CommHub\x20Server.','453423CWuLcc','replied','\x20RESUME_ID=','notification','warning:\x20could\x20not\x20register:\x20','catch','utf-8','.claude/channels/commhub','hub','application/json','383256pKMoPX','set','send_task','exit','trim','params','connected','number'];a0_0x9dca=function(){return _0x2e0d58;};return a0_0x9dca();}process[a0_0x1fabc4(0x17a)]['on']('end',()=>N()),process['on'](a0_0x1fabc4(0x17d),()=>N()),process['on'](a0_0x1fabc4(0x1b7),()=>N());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleep2agi/agent-network",
3
- "version": "2.2.7-preview.3",
3
+ "version": "2.2.7-preview.4",
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",