@sleep2agi/agent-network 2.0.0-preview.57 → 2.0.0-preview.59

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_0x49d020=a0_0x3194;function a0_0x3194(_0x49d784,_0xa413df){_0x49d784=_0x49d784-0x147;const _0xfd949b=a0_0xfd94();let _0x319488=_0xfd949b[_0x49d784];return _0x319488;}function a0_0xfd94(){const _0x31406a=['AbortError','name','toString','application/json','POST','SSE\x20reconnecting\x20in\x20','5262984CPcyjg','connectSSE','1zzTKmv','cwd','1640880qXaekf','report_status','now','heartbeatTimer','autoConnect','data:\x20','from_session','SSE\x20failed:\x20','normal','stringify','sleep','connected','disconnect','min','/events/','match','/mcp','5794285RypInt','sdk-','get_all_status','message','sdk','4304124YjEqhO','registered','signal','disconnected','token','connect','get_inbox','alias','processInbox','split','replace','read','call','pop','sseAbort','s...','url','content','send_task','4586260WrvCBt','getReader','new_task','send','20037KzsGMq',']\x20[commhub:','type','Authorization','running','slice','catch','heartbeat\x20failed:\x20','body','2.0','reconnectDelay','getAllStatus','broadcast','Bearer\x20','messages','idle','result','reply','text/event-stream','SSE\x20error:\x20','parse','heartbeatInterval','task','toTimeString','8lZlaYe','log','agent','emit','status','resumeId','1334258roKLgv'];a0_0xfd94=function(){return _0x31406a;};return a0_0xfd94();}(function(_0x29eb2c,_0x258117){const _0x4d392d=a0_0x3194,_0x162bb4=_0x29eb2c();while(!![]){try{const _0x228981=parseInt(_0x4d392d(0x194))/0x1*(parseInt(_0x4d392d(0x18b))/0x2)+-parseInt(_0x4d392d(0x16d))/0x3+-parseInt(_0x4d392d(0x156))/0x4+-parseInt(_0x4d392d(0x169))/0x5+parseInt(_0x4d392d(0x192))/0x6+parseInt(_0x4d392d(0x151))/0x7*(parseInt(_0x4d392d(0x185))/0x8)+parseInt(_0x4d392d(0x196))/0x9;if(_0x228981===_0x258117)break;else _0x162bb4['push'](_0x162bb4['shift']());}catch(_0x4c4909){_0x162bb4['push'](_0x162bb4['shift']());}}}(a0_0xfd94,0x875a6));import{EventEmitter as a0_0x377555}from'events';import{hostname as a0_0x1fd2da}from'os';class T extends a0_0x377555{[a0_0x49d020(0x166)];[a0_0x49d020(0x15d)];[a0_0x49d020(0x15a)];[a0_0x49d020(0x187)];[a0_0x49d020(0x18a)];['heartbeatInterval'];[a0_0x49d020(0x177)];[a0_0x49d020(0x199)];[a0_0x49d020(0x164)];[a0_0x49d020(0x171)]=!0x1;constructor(_0x33ab87){const _0x41cd21=a0_0x49d020;super();if(this['url']=_0x33ab87['url'][_0x41cd21(0x160)](/\/$/,''),this[_0x41cd21(0x15d)]=_0x33ab87['alias'],this[_0x41cd21(0x15a)]=_0x33ab87[_0x41cd21(0x15a)],this['agent']=_0x33ab87[_0x41cd21(0x187)]||_0x41cd21(0x155),this[_0x41cd21(0x18a)]=_0x41cd21(0x152)+_0x33ab87['alias']+'-'+Date[_0x41cd21(0x198)]()[_0x41cd21(0x18e)](0x24),this['heartbeatInterval']=_0x33ab87['heartbeatInterval']??0x2bf20,this[_0x41cd21(0x177)]=_0x33ab87[_0x41cd21(0x177)]??0xbb8,_0x33ab87[_0x41cd21(0x19a)]!==!0x1)this['connect']();}[a0_0x49d020(0x186)](_0x29933e){const _0xe0705c=a0_0x49d020;console[_0xe0705c(0x186)]('['+new Date()[_0xe0705c(0x184)]()[_0xe0705c(0x172)](0x0,0x8)+_0xe0705c(0x16e)+this['alias']+']\x20'+_0x29933e);}async['call'](_0x33c44f,_0x3bf56b){const _0x3f76a3=a0_0x49d020;let _0x5299bb={'Content-Type':_0x3f76a3(0x18f),'Accept':'application/json,\x20text/event-stream'};if(this[_0x3f76a3(0x15a)])_0x5299bb['Authorization']=_0x3f76a3(0x17a)+this[_0x3f76a3(0x15a)];let _0x56d05a=await(await fetch(this['url']+_0x3f76a3(0x150),{'method':_0x3f76a3(0x190),'headers':_0x5299bb,'body':JSON[_0x3f76a3(0x149)]({'jsonrpc':_0x3f76a3(0x176),'id':Date[_0x3f76a3(0x198)](),'method':'tools/call','params':{'name':_0x33c44f,'arguments':_0x3bf56b}})}))['text'](),_0x1dec8d=_0x56d05a[_0x3f76a3(0x14f)](/data: (.+)/),_0x141451=_0x1dec8d?JSON[_0x3f76a3(0x181)](_0x1dec8d[0x1]):JSON['parse'](_0x56d05a),_0x513b91=_0x141451?.[_0x3f76a3(0x17d)]?.[_0x3f76a3(0x167)]?.[0x0]?.['text'];return _0x513b91?JSON[_0x3f76a3(0x181)](_0x513b91):_0x141451;}async[a0_0x49d020(0x15b)](){const _0x42c55f=a0_0x49d020;if(this[_0x42c55f(0x171)])return;this[_0x42c55f(0x171)]=!0x0,await this['status'](_0x42c55f(0x17c)),this[_0x42c55f(0x186)](_0x42c55f(0x157)),this[_0x42c55f(0x199)]=setInterval(()=>{const _0x262aab=_0x42c55f;this[_0x262aab(0x189)](_0x262aab(0x17c))[_0x262aab(0x173)](_0x36e2b3=>this[_0x262aab(0x186)](_0x262aab(0x174)+_0x36e2b3[_0x262aab(0x154)]));},this[_0x42c55f(0x182)]),this['connectSSE']();}async[a0_0x49d020(0x14c)](){const _0x11e7e9=a0_0x49d020;if(this[_0x11e7e9(0x171)]=!0x1,this[_0x11e7e9(0x164)]?.['abort'](),this['heartbeatTimer'])clearInterval(this[_0x11e7e9(0x199)]);await this['status']('offline')['catch'](()=>{}),this[_0x11e7e9(0x186)](_0x11e7e9(0x159));}async[a0_0x49d020(0x16c)](_0x389712,_0x233a7d,_0x4eaccd=a0_0x49d020(0x148)){const _0x5282b2=a0_0x49d020;return this['call'](_0x5282b2(0x168),{'alias':_0x389712,'task':_0x233a7d,'priority':_0x4eaccd,'from_session':this[_0x5282b2(0x15d)]});}async['message'](_0x288ff0,_0x27630e){const _0x44ee67=a0_0x49d020;return this[_0x44ee67(0x162)]('send_message',{'alias':_0x288ff0,'message':_0x27630e,'from_session':this[_0x44ee67(0x15d)]});}async[a0_0x49d020(0x17e)](_0x307d81,_0x38a95d,_0x19351b='completed'){return this['call']('reply',{'task_id':_0x307d81,'text':_0x38a95d,'status':_0x19351b});}async[a0_0x49d020(0x189)](_0x4a1391,_0x1628f5){const _0x2ffbd7=a0_0x49d020;return this['call'](_0x2ffbd7(0x197),{'resume_id':this[_0x2ffbd7(0x18a)],'alias':this[_0x2ffbd7(0x15d)],'status':_0x4a1391,'server':a0_0x1fd2da(),'hostname':a0_0x1fd2da(),'agent':this[_0x2ffbd7(0x187)],'project_dir':process[_0x2ffbd7(0x195)](),..._0x1628f5});}async[a0_0x49d020(0x178)](){const _0x515b77=a0_0x49d020;return this['call'](_0x515b77(0x153),{});}async[a0_0x49d020(0x179)](_0x803774,_0x4e08e7){const _0x58c446=a0_0x49d020;return this[_0x58c446(0x162)](_0x58c446(0x179),{'message':_0x803774,'filter_server':_0x4e08e7?.['server'],'filter_status':_0x4e08e7?.[_0x58c446(0x189)]});}async[a0_0x49d020(0x193)](){const _0x3aa5cc=a0_0x49d020;let _0x3271be=encodeURIComponent(this[_0x3aa5cc(0x15d)]),_0x4d8f0d=this[_0x3aa5cc(0x166)]+_0x3aa5cc(0x14e)+_0x3271be,_0x5d9c4d=this[_0x3aa5cc(0x177)];while(this[_0x3aa5cc(0x171)]){try{this['sseAbort']=new AbortController();let _0x17b518={'Accept':_0x3aa5cc(0x17f)};if(this[_0x3aa5cc(0x15a)])_0x17b518[_0x3aa5cc(0x170)]='Bearer\x20'+this['token'];let _0xdea271=await fetch(_0x4d8f0d,{'headers':_0x17b518,'signal':this['sseAbort'][_0x3aa5cc(0x158)]});if(!_0xdea271['ok']||!_0xdea271[_0x3aa5cc(0x175)]){this[_0x3aa5cc(0x186)](_0x3aa5cc(0x147)+_0xdea271[_0x3aa5cc(0x189)]),await this['sleep'](_0x5d9c4d),_0x5d9c4d=Math[_0x3aa5cc(0x14d)](_0x5d9c4d*1.5,0xea60);continue;}_0x5d9c4d=this[_0x3aa5cc(0x177)];let _0x366450=_0xdea271['body'][_0x3aa5cc(0x16a)](),_0x35562b=new TextDecoder(),_0x144076='';while(this['running']){let {done:_0x1bb4b4,value:_0x140ecc}=await _0x366450[_0x3aa5cc(0x161)]();if(_0x1bb4b4)break;_0x144076+=_0x35562b['decode'](_0x140ecc,{'stream':!0x0});let _0x187203=_0x144076[_0x3aa5cc(0x15f)]('\x0a');_0x144076=_0x187203[_0x3aa5cc(0x163)]()||'';for(let _0x2b2585 of _0x187203){if(!_0x2b2585['startsWith'](_0x3aa5cc(0x19b)))continue;try{let _0x3797f6=JSON['parse'](_0x2b2585[_0x3aa5cc(0x172)](0x6));if(_0x3797f6[_0x3aa5cc(0x16f)]===_0x3aa5cc(0x14b)){this['log']('SSE\x20connected'),this['emit'](_0x3aa5cc(0x14b));continue;}if(_0x3797f6[_0x3aa5cc(0x16f)]===_0x3aa5cc(0x16b)||_0x3797f6[_0x3aa5cc(0x16f)]==='new_message'||_0x3797f6[_0x3aa5cc(0x16f)]===_0x3aa5cc(0x179))await this[_0x3aa5cc(0x15e)]();}catch{}}}}catch(_0x535429){if(_0x535429[_0x3aa5cc(0x18d)]===_0x3aa5cc(0x18c))break;this[_0x3aa5cc(0x188)]('error',_0x535429),this[_0x3aa5cc(0x186)](_0x3aa5cc(0x180)+_0x535429[_0x3aa5cc(0x154)]);}if(this[_0x3aa5cc(0x171)])this[_0x3aa5cc(0x188)](_0x3aa5cc(0x159)),this[_0x3aa5cc(0x186)](_0x3aa5cc(0x191)+_0x5d9c4d/0x3e8+_0x3aa5cc(0x165)),await this[_0x3aa5cc(0x14a)](_0x5d9c4d),_0x5d9c4d=Math[_0x3aa5cc(0x14d)](_0x5d9c4d*1.5,0xea60);}}async[a0_0x49d020(0x15e)](){const _0xf52d2e=a0_0x49d020;try{let _0x5cbde8=(await this[_0xf52d2e(0x162)](_0xf52d2e(0x15c),{'alias':this[_0xf52d2e(0x15d)],'limit':0xa}))?.[_0xf52d2e(0x17b)]||[];for(let _0x4996aa of _0x5cbde8)await this[_0xf52d2e(0x162)]('ack_inbox',{'alias':this[_0xf52d2e(0x15d)],'message_id':_0x4996aa['id']}),this[_0xf52d2e(0x186)]('←\x20'+_0x4996aa[_0xf52d2e(0x19c)]+':\x20'+_0x4996aa[_0xf52d2e(0x167)]['slice'](0x0,0x3c)),this[_0xf52d2e(0x188)](_0xf52d2e(0x183),_0x4996aa),this['emit'](_0xf52d2e(0x154),_0x4996aa);}catch(_0x3be932){this['log']('inbox\x20error:\x20'+_0x3be932[_0xf52d2e(0x154)]);}}[a0_0x49d020(0x14a)](_0x5e8f59){return new Promise(_0x149264=>setTimeout(_0x149264,_0x5e8f59));}}var $=T;export{$ as default,T as CommHub};
1
+ const a0_0x2ddb81=a0_0x7640;(function(_0x4fa161,_0x571ea0){const _0x3dde95=a0_0x7640,_0x2279ac=_0x4fa161();while(!![]){try{const _0x27f354=parseInt(_0x3dde95(0x16f))/0x1+-parseInt(_0x3dde95(0x17d))/0x2*(parseInt(_0x3dde95(0x16a))/0x3)+-parseInt(_0x3dde95(0x158))/0x4+parseInt(_0x3dde95(0x181))/0x5*(parseInt(_0x3dde95(0x162))/0x6)+-parseInt(_0x3dde95(0x197))/0x7*(parseInt(_0x3dde95(0x191))/0x8)+-parseInt(_0x3dde95(0x19a))/0x9+parseInt(_0x3dde95(0x16e))/0xa;if(_0x27f354===_0x571ea0)break;else _0x2279ac['push'](_0x2279ac['shift']());}catch(_0x28ed93){_0x2279ac['push'](_0x2279ac['shift']());}}}(a0_0x553b,0xa4d4b));import{EventEmitter as a0_0xa68ba1}from'events';import{hostname as a0_0x1bf696}from'os';function a0_0x7640(_0x2f518a,_0x572292){_0x2f518a=_0x2f518a-0x151;const _0x553b2a=a0_0x553b();let _0x76401e=_0x553b2a[_0x2f518a];return _0x76401e;}class T extends a0_0xa68ba1{[a0_0x2ddb81(0x1a3)];[a0_0x2ddb81(0x189)];[a0_0x2ddb81(0x168)];['agent'];['resumeId'];[a0_0x2ddb81(0x16c)];[a0_0x2ddb81(0x15d)];[a0_0x2ddb81(0x188)];[a0_0x2ddb81(0x17a)];['running']=!0x1;constructor(_0x4b8ce8){const _0xf516a7=a0_0x2ddb81;super();if(this[_0xf516a7(0x1a3)]=_0x4b8ce8[_0xf516a7(0x1a3)][_0xf516a7(0x157)](/\/$/,''),this[_0xf516a7(0x189)]=_0x4b8ce8[_0xf516a7(0x189)],this[_0xf516a7(0x168)]=_0x4b8ce8['token'],this['agent']=_0x4b8ce8['agent']||'sdk',this[_0xf516a7(0x1a5)]=_0xf516a7(0x17c)+_0x4b8ce8[_0xf516a7(0x189)]+'-'+Date[_0xf516a7(0x172)]()['toString'](0x24),this[_0xf516a7(0x16c)]=_0x4b8ce8[_0xf516a7(0x16c)]??0x2bf20,this[_0xf516a7(0x15d)]=_0x4b8ce8[_0xf516a7(0x15d)]??0xbb8,_0x4b8ce8[_0xf516a7(0x156)]!==!0x1)this[_0xf516a7(0x196)]();}[a0_0x2ddb81(0x19e)](_0x5beccc){const _0x3a960a=a0_0x2ddb81;console[_0x3a960a(0x19e)]('['+new Date()[_0x3a960a(0x19b)]()[_0x3a960a(0x167)](0x0,0x8)+']\x20[commhub:'+this[_0x3a960a(0x189)]+']\x20'+_0x5beccc);}async[a0_0x2ddb81(0x18f)](_0x3d1633,_0x5555ee){const _0x1c2321=a0_0x2ddb81;let _0x34311b={'Content-Type':_0x1c2321(0x19c),'Accept':_0x1c2321(0x163)};if(this[_0x1c2321(0x168)])_0x34311b[_0x1c2321(0x154)]=_0x1c2321(0x19f)+this['token'];let _0x2241c0=await(await fetch(this[_0x1c2321(0x1a3)]+'/mcp',{'method':_0x1c2321(0x175),'headers':_0x34311b,'body':JSON[_0x1c2321(0x15f)]({'jsonrpc':'2.0','id':Date[_0x1c2321(0x172)](),'method':_0x1c2321(0x18b),'params':{'name':_0x3d1633,'arguments':_0x5555ee}})}))[_0x1c2321(0x1a4)](),_0x3bf8f5=_0x2241c0['match'](/data: (.+)/),_0x485a77=_0x3bf8f5?JSON[_0x1c2321(0x195)](_0x3bf8f5[0x1]):JSON[_0x1c2321(0x195)](_0x2241c0),_0x23fdcf=_0x485a77?.[_0x1c2321(0x198)]?.[_0x1c2321(0x170)]?.[0x0]?.[_0x1c2321(0x1a4)];return _0x23fdcf?JSON[_0x1c2321(0x195)](_0x23fdcf):_0x485a77;}async[a0_0x2ddb81(0x196)](){const _0x390bf0=a0_0x2ddb81;if(this[_0x390bf0(0x1a0)])return;this['running']=!0x0,await this[_0x390bf0(0x176)](_0x390bf0(0x192)),this[_0x390bf0(0x19e)](_0x390bf0(0x185)),this[_0x390bf0(0x188)]=setInterval(()=>{const _0xfa9799=_0x390bf0;this[_0xfa9799(0x176)](_0xfa9799(0x192))[_0xfa9799(0x17b)](_0x466905=>this['log'](_0xfa9799(0x15e)+_0x466905[_0xfa9799(0x19d)]));},this[_0x390bf0(0x16c)]),this[_0x390bf0(0x16b)]();}async[a0_0x2ddb81(0x174)](){const _0x49ad01=a0_0x2ddb81;if(this[_0x49ad01(0x1a0)]=!0x1,this['sseAbort']?.[_0x49ad01(0x15a)](),this['heartbeatTimer'])clearInterval(this['heartbeatTimer']);await this[_0x49ad01(0x176)](_0x49ad01(0x169))['catch'](()=>{}),this[_0x49ad01(0x19e)](_0x49ad01(0x193));}async['send'](_0x391804,_0x5b7311,_0x47d6bd=a0_0x2ddb81(0x184)){const _0x4a3f1e=a0_0x2ddb81;return this['call']('send_task',{'alias':_0x391804,'task':_0x5b7311,'priority':_0x47d6bd,'from_session':this[_0x4a3f1e(0x189)]});}async[a0_0x2ddb81(0x19d)](_0x4b0906,_0x19af9b){const _0x179b41=a0_0x2ddb81;return this[_0x179b41(0x18f)](_0x179b41(0x153),{'alias':_0x4b0906,'message':_0x19af9b,'from_session':this[_0x179b41(0x189)]});}async[a0_0x2ddb81(0x190)](_0x2ed97a,_0x13bf75,_0x1f5902=a0_0x2ddb81(0x18e)){const _0x107b6c=a0_0x2ddb81;return this[_0x107b6c(0x18f)]('reply',{'task_id':_0x2ed97a,'text':_0x13bf75,'status':_0x1f5902});}async[a0_0x2ddb81(0x176)](_0xb17690,_0xa363cb){const _0xfa863e=a0_0x2ddb81;return this[_0xfa863e(0x18f)]('report_status',{'resume_id':this[_0xfa863e(0x1a5)],'alias':this[_0xfa863e(0x189)],'status':_0xb17690,'server':a0_0x1bf696(),'hostname':a0_0x1bf696(),'agent':this['agent'],'project_dir':process[_0xfa863e(0x152)](),..._0xa363cb});}async[a0_0x2ddb81(0x180)](){const _0x32cb66=a0_0x2ddb81;return this[_0x32cb66(0x18f)](_0x32cb66(0x171),{});}async[a0_0x2ddb81(0x15b)](_0x1ee427,_0x547b75){const _0x218233=a0_0x2ddb81;return this[_0x218233(0x18f)]('broadcast',{'message':_0x1ee427,'filter_server':_0x547b75?.['server'],'filter_status':_0x547b75?.[_0x218233(0x176)]});}async[a0_0x2ddb81(0x16b)](){const _0x3297b1=a0_0x2ddb81;let _0x1dd5f2=encodeURIComponent(this['alias']),_0x21d3d9=this[_0x3297b1(0x1a3)]+_0x3297b1(0x161)+_0x1dd5f2,_0x724779=this[_0x3297b1(0x15d)];while(this[_0x3297b1(0x1a0)]){try{this['sseAbort']=new AbortController();let _0x5ee5d0={'Accept':_0x3297b1(0x187)};if(this[_0x3297b1(0x168)])_0x5ee5d0['Authorization']=_0x3297b1(0x19f)+this[_0x3297b1(0x168)];let _0x569538=await fetch(_0x21d3d9,{'headers':_0x5ee5d0,'signal':this[_0x3297b1(0x17a)][_0x3297b1(0x165)]});if(!_0x569538['ok']||!_0x569538[_0x3297b1(0x159)]){this['log']('SSE\x20failed:\x20'+_0x569538['status']),await this[_0x3297b1(0x164)](_0x724779),_0x724779=Math[_0x3297b1(0x183)](_0x724779*1.5,0xea60);continue;}_0x724779=this[_0x3297b1(0x15d)];let _0x3eddb3=_0x569538[_0x3297b1(0x159)]['getReader'](),_0x1fc491=new TextDecoder(),_0x12d758='';while(this[_0x3297b1(0x1a0)]){let {done:_0x59e188,value:_0xbbc878}=await _0x3eddb3[_0x3297b1(0x17f)]();if(_0x59e188)break;_0x12d758+=_0x1fc491[_0x3297b1(0x178)](_0xbbc878,{'stream':!0x0});let _0x48b551=_0x12d758[_0x3297b1(0x199)]('\x0a');_0x12d758=_0x48b551[_0x3297b1(0x17e)]()||'';for(let _0x2257e3 of _0x48b551){if(!_0x2257e3['startsWith'](_0x3297b1(0x1a1)))continue;try{let _0x9542a2=JSON[_0x3297b1(0x195)](_0x2257e3[_0x3297b1(0x167)](0x6));if(_0x9542a2[_0x3297b1(0x155)]==='connected'){this['log'](_0x3297b1(0x177)),this[_0x3297b1(0x15c)](_0x3297b1(0x179));continue;}if(_0x9542a2[_0x3297b1(0x155)]==='new_task'||_0x9542a2[_0x3297b1(0x155)]===_0x3297b1(0x182)||_0x9542a2[_0x3297b1(0x155)]===_0x3297b1(0x15b))await this[_0x3297b1(0x18a)]();}catch{}}}}catch(_0x301d6a){if(_0x301d6a['name']===_0x3297b1(0x186))break;this[_0x3297b1(0x15c)]('error',_0x301d6a),this[_0x3297b1(0x19e)](_0x3297b1(0x18c)+_0x301d6a['message']);}if(this['running'])this[_0x3297b1(0x15c)]('disconnected'),this['log'](_0x3297b1(0x173)+_0x724779/0x3e8+_0x3297b1(0x16d)),await this[_0x3297b1(0x164)](_0x724779),_0x724779=Math[_0x3297b1(0x183)](_0x724779*1.5,0xea60);}}async[a0_0x2ddb81(0x18a)](){const _0x1a1d60=a0_0x2ddb81;try{let _0x1a2b56=(await this[_0x1a1d60(0x18f)](_0x1a1d60(0x166),{'alias':this['alias'],'limit':0xa}))?.[_0x1a1d60(0x151)]||[];for(let _0x44a4df of _0x1a2b56)await this[_0x1a1d60(0x18f)](_0x1a1d60(0x1a2),{'alias':this[_0x1a1d60(0x189)],'message_id':_0x44a4df['id']}),this[_0x1a1d60(0x19e)]('←\x20'+_0x44a4df[_0x1a1d60(0x18d)]+':\x20'+_0x44a4df['content']['slice'](0x0,0x3c)),this[_0x1a1d60(0x15c)](_0x1a1d60(0x194),_0x44a4df),this['emit'](_0x1a1d60(0x19d),_0x44a4df);}catch(_0x365d44){this['log'](_0x1a1d60(0x160)+_0x365d44[_0x1a1d60(0x19d)]);}}['sleep'](_0x4adac9){return new Promise(_0x489ebe=>setTimeout(_0x489ebe,_0x4adac9));}}var $=T;function a0_0x553b(){const _0x58c3f3=['9083781sRzQbP','toTimeString','application/json','message','log','Bearer\x20','running','data:\x20','ack_inbox','url','text','resumeId','messages','cwd','send_message','Authorization','type','autoConnect','replace','3530584ZDAbAm','body','abort','broadcast','emit','reconnectDelay','heartbeat\x20failed:\x20','stringify','inbox\x20error:\x20','/events/','3414084wYWpuz','application/json,\x20text/event-stream','sleep','signal','get_inbox','slice','token','offline','1137687TPzkfl','connectSSE','heartbeatInterval','s...','19776980dJyOau','293874sttZbd','content','get_all_status','now','SSE\x20reconnecting\x20in\x20','disconnect','POST','status','SSE\x20connected','decode','connected','sseAbort','catch','sdk-','2EPQdEu','pop','read','getAllStatus','10jbMYmL','new_message','min','normal','registered','AbortError','text/event-stream','heartbeatTimer','alias','processInbox','tools/call','SSE\x20error:\x20','from_session','completed','call','reply','8CwpoYC','idle','disconnected','task','parse','connect','3242883ENFsQG','result','split'];a0_0x553b=function(){return _0x58c3f3;};return a0_0x553b();}export{$ as default,T as CommHub};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env bun
2
- const a0_0x228451=a0_0x1c54;(function(_0x469c9e,_0x553d62){const _0xe50625=a0_0x1c54,_0x4a8570=_0x469c9e();while(!![]){try{const _0x4c07ee=parseInt(_0xe50625(0xc3))/0x1+parseInt(_0xe50625(0x128))/0x2+-parseInt(_0xe50625(0x11c))/0x3*(-parseInt(_0xe50625(0xca))/0x4)+-parseInt(_0xe50625(0xd2))/0x5+-parseInt(_0xe50625(0xbe))/0x6*(-parseInt(_0xe50625(0x10a))/0x7)+-parseInt(_0xe50625(0xd5))/0x8+-parseInt(_0xe50625(0x133))/0x9;if(_0x4c07ee===_0x553d62)break;else _0x4a8570['push'](_0x4a8570['shift']());}catch(_0x4d45ed){_0x4a8570['push'](_0x4a8570['shift']());}}}(a0_0x5dcc,0x3ce16));import{readFileSync as a0_0x5b0992,existsSync as a0_0x2c993e}from'fs';import{join as a0_0x488e97}from'path';import{hostname as a0_0x26275b}from'os';import{execSync as a0_0x1da7d7}from'child_process';function a0_0x1c54(_0x2d91a7,_0x2527cb){_0x2d91a7=_0x2d91a7-0xb7;const _0x5dccfc=a0_0x5dcc();let _0x1c54e2=_0x5dccfc[_0x2d91a7];return _0x1c54e2;}import{Server as a0_0x1b1a21}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport as a0_0x5b9916}from'@modelcontextprotocol/sdk/server/stdio.js';import{ListToolsRequestSchema as a0_0x1bf1e5,CallToolRequestSchema as a0_0x2fa435}from'@modelcontextprotocol/sdk/types.js';function p(_0xc4a36d){const _0xcbe3e0=a0_0x1c54;if(!a0_0x2c993e(_0xc4a36d))return;for(let _0x43d664 of a0_0x5b0992(_0xc4a36d,_0xcbe3e0(0xe8))[_0xcbe3e0(0x11b)]('\x0a')){let _0x44a654=_0x43d664[_0xcbe3e0(0xfb)]();if(!_0x44a654||_0x44a654[_0xcbe3e0(0x13d)]('#'))continue;let _0x1e4c7a=_0x44a654[_0xcbe3e0(0xbb)]('=');if(_0x1e4c7a<0x0)continue;let _0x251ead=_0x44a654[_0xcbe3e0(0xc4)](0x0,_0x1e4c7a)[_0xcbe3e0(0xfb)](),_0x424198=_0x44a654[_0xcbe3e0(0xc4)](_0x1e4c7a+0x1)['trim']()['replace'](/^["']|["']$/g,'');if(!process.env[_0x251ead])process.env[_0x251ead]=_0x424198;}}var C=process.env.HOME||'~',T=a0_0x488e97(C,a0_0x228451(0x11e));p(a0_0x488e97(T,a0_0x228451(0x136)));var L=process['cwd']()['replace'](/\//g,'-');p(a0_0x488e97(T,L,'.env'));function U(){const _0x19a9e0=a0_0x228451;try{return a0_0x1da7d7(_0x19a9e0(0xf2),{'encoding':'utf-8','timeout':0x7d0})[_0x19a9e0(0xfb)]();}catch{return'';}}function c(){const _0x30b9a2=a0_0x228451;try{let _0x14f60f=a0_0x488e97(C,_0x30b9a2(0xcf),_0x30b9a2(0xda));if(a0_0x2c993e(_0x14f60f))return JSON[_0x30b9a2(0xbf)](a0_0x5b0992(_0x14f60f,'utf-8'));}catch{}return{};}var H=c(),D=process.env.COMMHUB_URL||H[a0_0x228451(0x12c)]||a0_0x228451(0xfe),f=process.env.COMMHUB_TMUX||U(),Z=process.env.COMMHUB_ALIAS||f||a0_0x26275b(),w=process.env.COMMHUB_RESUME_ID||process.env.CLAUDE_RESUME_ID||crypto[a0_0x228451(0xe6)](),X=process.env.COMMHUB_TOKEN||H['token']||'';function Y(_0x904410){const _0x1793e4=a0_0x228451;let _0x53d587=new Date()['toTimeString']()[_0x1793e4(0xc4)](0x0,0x8);process['stderr'][_0x1793e4(0xc9)]('['+_0x53d587+_0x1793e4(0x12d)+_0x904410+'\x0a');}function a0_0x5dcc(){const _0x185cdb=['connecting\x20to\x20','getReader','Task\x20content','2025-03-26','The\x20task_id\x20from\x20the\x20channel\x20message\x20(or\x20\x27hub\x27\x20for\x20general)','/events/','randomUUID','failed','utf-8','commhub_reply','warning:\x20could\x20not\x20register:\x20','commhub-channel','no\x20response','send_task','number','exit','0.3.0','Reply\x20text\x20/\x20result\x20summary','tmux\x20display-message\x20-p\x20\x27#S\x27','connected','status','catch','tools/call','2.0','commhub_get_all_status',':\x20inbox_count=','new_message','trim','These\x20are\x20tasks\x20dispatched\x20by\x20the\x20hub\x20or\x20other\x20sessions\x20via\x20the\x20CommHub\x20Server.','stdin','http://127.0.0.1:9200','SSE\x20stream\x20ended,\x20reconnecting...','message_id','/mcp','body','commhub','data:\x20','session\x20disconnected','decode','normal','string','ack_inbox','3197516mlLgDb','pop','message','You\x20can\x20also\x20use\x20commhub_report_status\x20to\x20update\x20your\x20session\x20status.','\x20PROJECT_ENV=','get','cwd','ready\x20—\x20waiting\x20for\x20events','Current\x20task\x20description','SSE\x20error:\x20','new_task','blocked','\x22\x20(','working','result','read','←\x20message\x20from\x20','split','39yBgliR','SSE\x20connected\x20as\x20\x22','.claude/channels/commhub','object','parse\x20error:\x20','Send\x20a\x20message\x20to\x20another\x20session\x20(no\x20task\x20lifecycle,\x20just\x20chat).\x20Use\x20for\x20replies\x20and\x20status\x20updates.','then','completed','commhub_send_task','report_status','SIGINT','idle','758244KIUbYC','type','notification','\x20CWD=','hub',']\x20[commhub]\x20','\x20ALIAS=','→\x20injected\x20task\x20','Bearer\x20','from','SIGTERM','5769270pJPjWP','Target\x20session\x20alias','set','.env','replied','in_progress','params','commhub_report_status','low','CommHub\x20init\x20failed:\x20','startsWith','Messages\x20from\x20CommHub\x20arrive\x20as\x20<channel\x20source=\x22commhub\x22\x20task_id=\x22...\x22\x20priority=\x22...\x22\x20from=\x22...\x22>','from_session','send_reply','task','cancelled','find','MCP\x20stdio\x20connected','stringify','error','indexOf','inbox_count','application/json,\x20text/event-stream','6yzovoE','parse','text','SSE\x20connection\x20error:\x20','starting\x20SSE\x20listener...','230248SFZopd','slice','end','SSE\x20fatal:\x20','messages','broadcast','write','130844rdXZhW','Update\x20this\x20session\x27s\x20status\x20in\x20CommHub\x20(working/idle/blocked/error).\x20Returns\x20inbox_count.','Get\x20status\x20of\x20all\x20sessions\x20from\x20CommHub.','commhub_send_message','application/json','.anet','priority','fatal:\x20','2327785gAEiMz','\x20priority=','content','1083584xYPHhw','claude-code','...\x20TMUX=','delete','shutting\x20down,\x20reporting\x20offline...','config.json','POST','setRequestHandler','alias','Progress\x200-100','Send\x20a\x20task\x20to\x20another\x20session\x20via\x20CommHub.'];a0_0x5dcc=function(){return _0x185cdb;};return a0_0x5dcc();}function h(_0x3882b8){return new Promise(_0x23aef6=>setTimeout(_0x23aef6,_0x3882b8));}Y('ENV:\x20URL='+D+a0_0x228451(0x12e)+Z+'\x20RESUME_ID='+w[a0_0x228451(0xc4)](0x0,0x8)+a0_0x228451(0xd7)+(f||'none')+a0_0x228451(0x12b)+process['cwd']()+a0_0x228451(0x10e)+L);var k=new Map(),K=new a0_0x1b1a21({'name':a0_0x228451(0xeb),'version':a0_0x228451(0xf0)},{'capabilities':{'experimental':{'claude/channel':{}},'tools':{}},'instructions':[a0_0x228451(0x13e),a0_0x228451(0xfc),'Reply\x20using\x20the\x20commhub_reply\x20tool\x20to\x20report\x20status\x20or\x20results\x20back.',a0_0x228451(0x10d),'Session\x20alias:\x20'+Z]['join']('\x0a')});K[a0_0x228451(0xdc)](a0_0x1bf1e5,async()=>({'tools':[{'name':a0_0x228451(0xe9),'description':'Reply\x20to\x20a\x20CommHub\x20task\x20—\x20report\x20completion\x20or\x20send\x20a\x20message\x20back\x20to\x20the\x20hub.','inputSchema':{'type':'object','properties':{'task_id':{'type':a0_0x228451(0x108),'description':a0_0x228451(0xe4)},'text':{'type':a0_0x228451(0x108),'description':a0_0x228451(0xf1)},'status':{'type':'string','enum':[a0_0x228451(0x123),'failed',a0_0x228451(0x142),a0_0x228451(0x115),'error',a0_0x228451(0x138)],'description':'Task\x20outcome:\x20completed/failed/cancelled\x20for\x20final\x20results,\x20blocked/error/in_progress\x20for\x20status\x20updates'}},'required':[a0_0x228451(0xc0)]}},{'name':'commhub_report_status','description':a0_0x228451(0xcb),'inputSchema':{'type':'object','properties':{'status':{'type':a0_0x228451(0x108),'enum':[a0_0x228451(0x117),'idle',a0_0x228451(0x115),a0_0x228451(0xba)]},'task':{'type':a0_0x228451(0x108),'description':a0_0x228451(0x112)},'progress':{'type':a0_0x228451(0xee),'description':a0_0x228451(0xde)}},'required':[a0_0x228451(0xf4)]}},{'name':a0_0x228451(0x124),'description':a0_0x228451(0xdf),'inputSchema':{'type':a0_0x228451(0x11f),'properties':{'alias':{'type':'string','description':a0_0x228451(0x134)},'task':{'type':'string','description':a0_0x228451(0xe2)},'priority':{'type':a0_0x228451(0x108),'enum':['high',a0_0x228451(0x107),a0_0x228451(0x13b)],'description':'Priority\x20(default:\x20normal)'}},'required':[a0_0x228451(0xdd),a0_0x228451(0x141)]}},{'name':'commhub_send_message','description':a0_0x228451(0x121),'inputSchema':{'type':a0_0x228451(0x11f),'properties':{'alias':{'type':'string','description':'Target\x20session\x20alias'},'message':{'type':'string','description':'Message\x20content'}},'required':['alias',a0_0x228451(0x10c)]}},{'name':'commhub_get_all_status','description':a0_0x228451(0xcc),'inputSchema':{'type':a0_0x228451(0x11f),'properties':{}}}]}));async function P(_0x41347b,_0x57409c){const _0x67dfdc=a0_0x228451;let _0x35c8b4=await fetch(D+'/mcp',{'method':_0x67dfdc(0xdb),'headers':{'Content-Type':_0x67dfdc(0xce),'Accept':_0x67dfdc(0xbd),...X?{'Authorization':_0x67dfdc(0x130)+X}:{}},'body':JSON['stringify']({'jsonrpc':_0x67dfdc(0xf7),'id':0x1,'method':'initialize','params':{'protocolVersion':_0x67dfdc(0xe3),'capabilities':{},'clientInfo':{'name':_0x67dfdc(0xeb),'version':_0x67dfdc(0xf0)}}})});if(!_0x35c8b4['ok']){let _0x2bfa52=await _0x35c8b4[_0x67dfdc(0xc0)]();return Y(_0x67dfdc(0x13c)+_0x35c8b4['status']+'\x20'+_0x2bfa52['slice'](0x0,0x64)),{'ok':!0x1,'error':'init\x20failed:\x20'+_0x35c8b4[_0x67dfdc(0xf4)]};}await _0x35c8b4[_0x67dfdc(0xc0)]();let _0x35c592=(await(await fetch(D+_0x67dfdc(0x101),{'method':_0x67dfdc(0xdb),'headers':{'Content-Type':_0x67dfdc(0xce),'Accept':'application/json,\x20text/event-stream',...X?{'Authorization':'Bearer\x20'+X}:{}},'body':JSON[_0x67dfdc(0xb9)]({'jsonrpc':_0x67dfdc(0xf7),'id':0x2,'method':_0x67dfdc(0xf6),'params':{'name':_0x41347b,'arguments':_0x57409c}})}))['text']())[_0x67dfdc(0x11b)]('\x0a')[_0x67dfdc(0xb7)](_0x4d49f5=>_0x4d49f5[_0x67dfdc(0x13d)](_0x67dfdc(0x104)));if(_0x35c592){let _0x5d57c1=JSON[_0x67dfdc(0xbf)](_0x35c592['slice'](0x6));return _0x5d57c1?.[_0x67dfdc(0x118)]?.[_0x67dfdc(0xd4)]?.[0x0]?.[_0x67dfdc(0xc0)]?JSON[_0x67dfdc(0xbf)](_0x5d57c1[_0x67dfdc(0x118)][_0x67dfdc(0xd4)][0x0][_0x67dfdc(0xc0)]):_0x5d57c1;}return{'ok':!0x1,'error':_0x67dfdc(0xec)};}K[a0_0x228451(0xdc)](a0_0x2fa435,async _0x9e2fcb=>{const _0x5574d1=a0_0x228451;let {name:_0x4a1f56,arguments:_0xa635b1}=_0x9e2fcb[_0x5574d1(0x139)];if(_0x4a1f56==='commhub_reply'){let {task_id:_0x65002e,text:_0x2a01d9,status:_0x8cbff9}=_0xa635b1;if(_0x8cbff9===_0x5574d1(0x123)||_0x8cbff9===_0x5574d1(0xe7)||_0x8cbff9===_0x5574d1(0x142)){let _0x1a01fb=_0x8cbff9===_0x5574d1(0x123)?_0x5574d1(0x137):_0x8cbff9,_0x356819=_0x65002e?k[_0x5574d1(0x10f)](_0x65002e)||'hub':_0x5574d1(0x12c),_0x229eec=await P(_0x5574d1(0x140),{'alias':_0x356819,'text':_0x2a01d9,'in_reply_to':_0x65002e||void 0x0,'status':_0x1a01fb,'from_session':Z});if(_0x65002e)k[_0x5574d1(0xd8)](_0x65002e);return{'content':[{'type':_0x5574d1(0xc0),'text':JSON[_0x5574d1(0xb9)](_0x229eec)}]};}let _0x3bf592=await P(_0x5574d1(0x125),{'resume_id':w,'alias':Z,'status':_0x8cbff9===_0x5574d1(0x115)?_0x5574d1(0x115):_0x8cbff9===_0x5574d1(0xba)?_0x5574d1(0xba):_0x5574d1(0x117),'task':_0x2a01d9[_0x5574d1(0xc4)](0x0,0xc8),'output':_0x2a01d9});return{'content':[{'type':'text','text':JSON[_0x5574d1(0xb9)](_0x3bf592)}]};}if(_0x4a1f56===_0x5574d1(0x13a)){let {status:_0x3165d5,task:_0x310500,progress:_0x44ca2c}=_0xa635b1,_0x1457bc=await P(_0x5574d1(0x125),{'resume_id':w,'alias':Z,'status':_0x3165d5,'task':_0x310500,'progress':_0x44ca2c});return{'content':[{'type':_0x5574d1(0xc0),'text':JSON[_0x5574d1(0xb9)](_0x1457bc)}]};}if(_0x4a1f56===_0x5574d1(0x124)){let {alias:_0x2c8a19,task:_0x3a9e34,priority:_0x4f0c4c}=_0xa635b1,_0x739988=await P(_0x5574d1(0xed),{'alias':_0x2c8a19,'task':_0x3a9e34,'priority':_0x4f0c4c||_0x5574d1(0x107),'from_session':Z});return{'content':[{'type':_0x5574d1(0xc0),'text':JSON[_0x5574d1(0xb9)](_0x739988)}]};}if(_0x4a1f56===_0x5574d1(0xcd)){let {alias:_0x52da60,message:_0x210758}=_0xa635b1,_0x2b8d9d=await P('send_message',{'alias':_0x52da60,'message':_0x210758,'from_session':Z});return{'content':[{'type':_0x5574d1(0xc0),'text':JSON[_0x5574d1(0xb9)](_0x2b8d9d)}]};}if(_0x4a1f56===_0x5574d1(0xf8)){let _0x2f1f72=await P('get_all_status',{});return{'content':[{'type':'text','text':JSON[_0x5574d1(0xb9)](_0x2f1f72)}]};}return{'content':[{'type':_0x5574d1(0xc0),'text':JSON[_0x5574d1(0xb9)]({'error':'unknown\x20tool'})}]};});async function v(){const _0xf0ef66=a0_0x228451;let _0x1db948=D+_0xf0ef66(0xe5)+encodeURIComponent(Z),_0x3a7775={};if(X)_0x3a7775['Authorization']='Bearer\x20'+X;Y(_0xf0ef66(0xe0)+_0x1db948);while(!0x0){try{let _0xadc057=await fetch(_0x1db948,{'headers':_0x3a7775});if(!_0xadc057['ok']){Y(_0xf0ef66(0x113)+_0xadc057[_0xf0ef66(0xf4)]+'\x20'+_0xadc057['statusText']),await h(0x1388);continue;}let _0x4fc10d=_0xadc057[_0xf0ef66(0x102)][_0xf0ef66(0xe1)](),_0x5a7ddc=new TextDecoder(),_0x4f0837='';while(!0x0){let {done:_0x5fa881,value:_0x105f6e}=await _0x4fc10d[_0xf0ef66(0x119)]();if(_0x5fa881)break;_0x4f0837+=_0x5a7ddc[_0xf0ef66(0x106)](_0x105f6e,{'stream':!0x0});let _0x2987db=_0x4f0837['split']('\x0a\x0a');_0x4f0837=_0x2987db[_0xf0ef66(0x10b)]()||'';for(let _0x491cc8 of _0x2987db){let _0x3755b6=_0x491cc8[_0xf0ef66(0x11b)]('\x0a')[_0xf0ef66(0xb7)](_0x2f1f0a=>_0x2f1f0a[_0xf0ef66(0x13d)](_0xf0ef66(0x104)));if(!_0x3755b6)continue;try{let _0x2c7e5b=JSON[_0xf0ef66(0xbf)](_0x3755b6[_0xf0ef66(0xc4)](0x6));await u(_0x2c7e5b);}catch(_0x4b3eff){Y(_0xf0ef66(0x120)+_0x4b3eff);}}}Y(_0xf0ef66(0xff));}catch(_0x3ce75f){Y(_0xf0ef66(0xc1)+_0x3ce75f);}await h(0xbb8);}}async function u(_0x33c0b8){const _0x4f9ced=a0_0x228451;if(_0x33c0b8[_0x4f9ced(0x129)]===_0x4f9ced(0xf3)){Y(_0x4f9ced(0x11d)+Z+'\x22');return;}if(_0x33c0b8[_0x4f9ced(0x129)]===_0x4f9ced(0xfa)){if(Y(_0x4f9ced(0x11a)+_0x33c0b8['from']+':\x20'+_0x33c0b8[_0x4f9ced(0x10c)][_0x4f9ced(0xc4)](0x0,0x3c)),await K[_0x4f9ced(0x12a)]({'method':'notifications/claude/channel','params':{'content':_0x33c0b8['message'],'meta':{'sender':_0x33c0b8[_0x4f9ced(0x131)]||_0x4f9ced(0x12c),'sender_id':_0x4f9ced(0x103),'user':_0x33c0b8[_0x4f9ced(0x131)]||'hub','priority':_0x4f9ced(0x107)}}}),_0x33c0b8['message_id'])await P(_0x4f9ced(0x109),{'alias':Z,'message_id':_0x33c0b8[_0x4f9ced(0x100)]});return;}if(_0x33c0b8['type']===_0x4f9ced(0x114)||_0x33c0b8['type']===_0x4f9ced(0xc8)){Y('←\x20'+_0x33c0b8[_0x4f9ced(0x129)]+_0x4f9ced(0xf9)+_0x33c0b8[_0x4f9ced(0xbc)]+_0x4f9ced(0xd3)+(_0x33c0b8[_0x4f9ced(0xd0)]||_0x4f9ced(0x107)));let _0x415c2a=await P('get_inbox',{'alias':Z,'limit':0x5});if(_0x415c2a?.['ok']&&_0x415c2a[_0x4f9ced(0xc7)]?.['length']>0x0)for(let _0x4646e8 of _0x415c2a[_0x4f9ced(0xc7)]){let _0x3e1500={'sender':_0x4646e8[_0x4f9ced(0x13f)]||_0x4f9ced(0x12c),'sender_id':'commhub','user':_0x4646e8[_0x4f9ced(0x13f)]||_0x4f9ced(0x12c),'task_id':_0x4646e8['id'],'priority':_0x4646e8[_0x4f9ced(0xd0)]||_0x4f9ced(0x107)};k[_0x4f9ced(0x135)](_0x4646e8['id'],_0x4646e8[_0x4f9ced(0x13f)]||_0x4f9ced(0x12c)),await K['notification']({'method':'notifications/claude/channel','params':{'content':_0x4646e8[_0x4f9ced(0xd4)],'meta':_0x3e1500}}),Y(_0x4f9ced(0x12f)+_0x4646e8['id'][_0x4f9ced(0xc4)](0x0,0x8)+'\x20from\x20'+_0x4646e8[_0x4f9ced(0x13f)]+':\x20'+_0x4646e8[_0x4f9ced(0xd4)][_0x4f9ced(0xc4)](0x0,0x3c)),await P(_0x4f9ced(0x109),{'alias':Z,'message_id':_0x4646e8['id']});}}}async function S(){const _0x5e4deb=a0_0x228451;let _0x34dc46=new a0_0x5b9916();await K['connect'](_0x34dc46),Y(_0x5e4deb(0xb8)),Y(_0x5e4deb(0xc2)),v()['catch'](_0x32f411=>Y(_0x5e4deb(0xc6)+_0x32f411)),P(_0x5e4deb(0x125),{'resume_id':w,'alias':Z,'status':_0x5e4deb(0x127),'server':a0_0x26275b(),'hostname':a0_0x26275b(),'agent':_0x5e4deb(0xd6),'project_dir':process[_0x5e4deb(0x110)](),'tmux_name':f||void 0x0})[_0x5e4deb(0x122)](()=>Y('registered\x20as\x20\x22'+Z+_0x5e4deb(0x116)+w[_0x5e4deb(0xc4)](0x0,0x8)+')'))[_0x5e4deb(0xf5)](_0x165945=>Y(_0x5e4deb(0xea)+_0x165945)),setInterval(()=>{const _0x2d10bf=_0x5e4deb;P(_0x2d10bf(0x125),{'resume_id':w,'alias':Z,'status':'idle','server':a0_0x26275b(),'hostname':a0_0x26275b(),'agent':'claude-code','project_dir':process[_0x2d10bf(0x110)](),'tmux_name':f||void 0x0})[_0x2d10bf(0xf5)](_0x3b4920=>Y('heartbeat\x20failed:\x20'+_0x3b4920));},0x2bf20),Y(_0x5e4deb(0x111));}S()[a0_0x228451(0xf5)](_0x10716e=>{const _0x4b9f48=a0_0x228451;Y(_0x4b9f48(0xd1)+_0x10716e),process[_0x4b9f48(0xef)](0x1);});async function N(){const _0x568277=a0_0x228451;Y(_0x568277(0xd9)),await P(_0x568277(0x125),{'resume_id':w,'alias':Z,'status':_0x568277(0xba),'task':_0x568277(0x105)})[_0x568277(0xf5)](()=>{}),process[_0x568277(0xef)](0x0);}process[a0_0x228451(0xfd)]['on'](a0_0x228451(0xc5),()=>N()),process['on'](a0_0x228451(0x132),()=>N()),process['on'](a0_0x228451(0x126),()=>N());
2
+ const a0_0x16766a=a0_0x2dc8;(function(_0x4193fb,_0x2e981a){const _0x52a6c2=a0_0x2dc8,_0x17fcbd=_0x4193fb();while(!![]){try{const _0x23ceb8=parseInt(_0x52a6c2(0x19a))/0x1+parseInt(_0x52a6c2(0x182))/0x2*(-parseInt(_0x52a6c2(0x1c4))/0x3)+parseInt(_0x52a6c2(0x181))/0x4*(-parseInt(_0x52a6c2(0x162))/0x5)+parseInt(_0x52a6c2(0x1ac))/0x6*(parseInt(_0x52a6c2(0x1a4))/0x7)+-parseInt(_0x52a6c2(0x177))/0x8*(parseInt(_0x52a6c2(0x1eb))/0x9)+parseInt(_0x52a6c2(0x1ad))/0xa+-parseInt(_0x52a6c2(0x195))/0xb;if(_0x23ceb8===_0x2e981a)break;else _0x17fcbd['push'](_0x17fcbd['shift']());}catch(_0x341097){_0x17fcbd['push'](_0x17fcbd['shift']());}}}(a0_0x4247,0x74434));import{readFileSync as a0_0x43b0d8,existsSync as a0_0x4e3f2f}from'fs';import{join as a0_0x2e8ef5}from'path';import{hostname as a0_0x4e00a0}from'os';import{execSync as a0_0x39a5e2}from'child_process';import{Server as a0_0x2d2b60}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport as a0_0x5c0542}from'@modelcontextprotocol/sdk/server/stdio.js';import{ListToolsRequestSchema as a0_0x224a39,CallToolRequestSchema as a0_0x175ca4}from'@modelcontextprotocol/sdk/types.js';function p(_0x4c819f){const _0x26b5b6=a0_0x2dc8;if(!a0_0x4e3f2f(_0x4c819f))return;for(let _0x237c30 of a0_0x43b0d8(_0x4c819f,_0x26b5b6(0x1a2))[_0x26b5b6(0x174)]('\x0a')){let _0x2f81ef=_0x237c30[_0x26b5b6(0x1d3)]();if(!_0x2f81ef||_0x2f81ef[_0x26b5b6(0x1e1)]('#'))continue;let _0x8e6bc6=_0x2f81ef[_0x26b5b6(0x1ab)]('=');if(_0x8e6bc6<0x0)continue;let _0x2379b5=_0x2f81ef[_0x26b5b6(0x197)](0x0,_0x8e6bc6)[_0x26b5b6(0x1d3)](),_0x52166b=_0x2f81ef[_0x26b5b6(0x197)](_0x8e6bc6+0x1)[_0x26b5b6(0x1d3)]()[_0x26b5b6(0x169)](/^["']|["']$/g,'');if(!process.env[_0x2379b5])process.env[_0x2379b5]=_0x52166b;}}var C=process.env.HOME||'~',T=a0_0x2e8ef5(C,a0_0x16766a(0x1e0));p(a0_0x2e8ef5(T,a0_0x16766a(0x184)));var L=process['cwd']()['replace'](/\//g,'-');p(a0_0x2e8ef5(T,L,a0_0x16766a(0x184)));function U(){const _0x2329f7=a0_0x16766a;try{return a0_0x39a5e2(_0x2329f7(0x164),{'encoding':_0x2329f7(0x1a2),'timeout':0x7d0})[_0x2329f7(0x1d3)]();}catch{return'';}}function c(){const _0x3875d5=a0_0x16766a;try{let _0x2c98bb=a0_0x2e8ef5(C,_0x3875d5(0x17f),_0x3875d5(0x18c));if(a0_0x4e3f2f(_0x2c98bb))return JSON[_0x3875d5(0x167)](a0_0x43b0d8(_0x2c98bb,_0x3875d5(0x1a2)));}catch{}return{};}var H=c(),D=process.env.COMMHUB_URL||H[a0_0x16766a(0x1cd)]||a0_0x16766a(0x1ba),f=process.env.COMMHUB_TMUX||U(),Z=process.env.COMMHUB_ALIAS||f||a0_0x4e00a0(),w=process.env.COMMHUB_RESUME_ID||process.env.CLAUDE_RESUME_ID||crypto['randomUUID'](),X=process.env.COMMHUB_TOKEN||H[a0_0x16766a(0x1c6)]||'';function Y(_0x3ba904){const _0x1d0991=a0_0x16766a;let _0x432937=new Date()[_0x1d0991(0x16d)]()['slice'](0x0,0x8);process[_0x1d0991(0x1a6)][_0x1d0991(0x1ce)]('['+_0x432937+_0x1d0991(0x18d)+_0x3ba904+'\x0a');}function h(_0x2642e1){return new Promise(_0x2baa43=>setTimeout(_0x2baa43,_0x2642e1));}Y(a0_0x16766a(0x198)+D+'\x20ALIAS='+Z+a0_0x16766a(0x1cb)+w[a0_0x16766a(0x197)](0x0,0x8)+a0_0x16766a(0x1b0)+(f||a0_0x16766a(0x1a1))+a0_0x16766a(0x168)+process[a0_0x16766a(0x190)]()+a0_0x16766a(0x173)+L);var k=new Map(),K=new a0_0x2d2b60({'name':a0_0x16766a(0x172),'version':'0.3.0'},{'capabilities':{'experimental':{'claude/channel':{}},'tools':{}},'instructions':[a0_0x16766a(0x1b6),'These\x20are\x20tasks\x20dispatched\x20by\x20the\x20hub\x20or\x20other\x20sessions\x20via\x20the\x20CommHub\x20Server.',a0_0x16766a(0x1c3),a0_0x16766a(0x1bc),a0_0x16766a(0x1c5)+Z][a0_0x16766a(0x165)]('\x0a')});K[a0_0x16766a(0x18f)](a0_0x224a39,async()=>({'tools':[{'name':'commhub_reply','description':a0_0x16766a(0x16a),'inputSchema':{'type':a0_0x16766a(0x1b7),'properties':{'task_id':{'type':a0_0x16766a(0x16e),'description':a0_0x16766a(0x1d7)},'text':{'type':'string','description':a0_0x16766a(0x1cc)},'status':{'type':a0_0x16766a(0x16e),'enum':['completed',a0_0x16766a(0x1bd),a0_0x16766a(0x175),a0_0x16766a(0x160),'error','in_progress'],'description':a0_0x16766a(0x1a8)}},'required':[a0_0x16766a(0x15e)]}},{'name':a0_0x16766a(0x1e9),'description':'Update\x20this\x20session\x27s\x20status\x20in\x20CommHub\x20(working/idle/blocked/error).\x20Returns\x20inbox_count.','inputSchema':{'type':'object','properties':{'status':{'type':a0_0x16766a(0x16e),'enum':[a0_0x16766a(0x1e5),a0_0x16766a(0x1bb),a0_0x16766a(0x160),a0_0x16766a(0x179)]},'task':{'type':a0_0x16766a(0x16e),'description':a0_0x16766a(0x1be)},'progress':{'type':a0_0x16766a(0x15f),'description':'Progress\x200-100'}},'required':[a0_0x16766a(0x171)]}},{'name':a0_0x16766a(0x1d9),'description':a0_0x16766a(0x1a0),'inputSchema':{'type':'object','properties':{'alias':{'type':a0_0x16766a(0x16e),'description':a0_0x16766a(0x17c)},'task':{'type':a0_0x16766a(0x16e),'description':a0_0x16766a(0x1d8)},'priority':{'type':a0_0x16766a(0x16e),'enum':['high',a0_0x16766a(0x17a),a0_0x16766a(0x1d2)],'description':a0_0x16766a(0x1df)}},'required':[a0_0x16766a(0x1db),'task']}},{'name':'commhub_send_message','description':a0_0x16766a(0x1bf),'inputSchema':{'type':a0_0x16766a(0x1b7),'properties':{'alias':{'type':a0_0x16766a(0x16e),'description':a0_0x16766a(0x17c)},'message':{'type':a0_0x16766a(0x16e),'description':a0_0x16766a(0x19e)}},'required':[a0_0x16766a(0x1db),a0_0x16766a(0x185)]}},{'name':'commhub_get_all_status','description':a0_0x16766a(0x176),'inputSchema':{'type':a0_0x16766a(0x1b7),'properties':{}}}]}));async function P(_0x278c70,_0x4c07f2){const _0x96a6fc=a0_0x16766a;let _0x4d215a=await fetch(D+_0x96a6fc(0x1d6),{'method':_0x96a6fc(0x189),'headers':{'Content-Type':_0x96a6fc(0x1ec),'Accept':'application/json,\x20text/event-stream',...X?{'Authorization':_0x96a6fc(0x199)+X}:{}},'body':JSON[_0x96a6fc(0x1b5)]({'jsonrpc':_0x96a6fc(0x1a9),'id':0x1,'method':_0x96a6fc(0x1ca),'params':{'protocolVersion':_0x96a6fc(0x18a),'capabilities':{},'clientInfo':{'name':_0x96a6fc(0x172),'version':_0x96a6fc(0x16b)}}})});if(!_0x4d215a['ok']){let _0x39a413=await _0x4d215a['text']();return Y(_0x96a6fc(0x1b9)+_0x4d215a[_0x96a6fc(0x171)]+'\x20'+_0x39a413[_0x96a6fc(0x197)](0x0,0x64)),{'ok':!0x1,'error':_0x96a6fc(0x1e2)+_0x4d215a[_0x96a6fc(0x171)]};}await _0x4d215a[_0x96a6fc(0x15e)]();let _0x2fa06e=(await(await fetch(D+_0x96a6fc(0x1d6),{'method':_0x96a6fc(0x189),'headers':{'Content-Type':_0x96a6fc(0x1ec),'Accept':_0x96a6fc(0x170),...X?{'Authorization':_0x96a6fc(0x199)+X}:{}},'body':JSON[_0x96a6fc(0x1b5)]({'jsonrpc':_0x96a6fc(0x1a9),'id':0x2,'method':_0x96a6fc(0x18b),'params':{'name':_0x278c70,'arguments':_0x4c07f2}})}))[_0x96a6fc(0x15e)]())['split']('\x0a')['find'](_0xec12cd=>_0xec12cd[_0x96a6fc(0x1e1)](_0x96a6fc(0x187)));if(_0x2fa06e){let _0x38a12b=JSON[_0x96a6fc(0x167)](_0x2fa06e[_0x96a6fc(0x197)](0x6));return _0x38a12b?.[_0x96a6fc(0x1d5)]?.['content']?.[0x0]?.[_0x96a6fc(0x15e)]?JSON[_0x96a6fc(0x167)](_0x38a12b[_0x96a6fc(0x1d5)][_0x96a6fc(0x1cf)][0x0][_0x96a6fc(0x15e)]):_0x38a12b;}return{'ok':!0x1,'error':_0x96a6fc(0x163)};}K[a0_0x16766a(0x18f)](a0_0x175ca4,async _0x4ba7fe=>{const _0x224045=a0_0x16766a;let {name:_0x2122b0,arguments:_0x295005}=_0x4ba7fe['params'];if(_0x2122b0==='commhub_reply'){let {task_id:_0x233c82,text:_0x3b4d94,status:_0x5255ae}=_0x295005;if(_0x5255ae==='completed'||_0x5255ae===_0x224045(0x1bd)||_0x5255ae===_0x224045(0x175)){let _0x5237bf=_0x5255ae===_0x224045(0x1b1)?_0x224045(0x1da):_0x5255ae,_0x66aee0=_0x233c82?k[_0x224045(0x1e3)](_0x233c82)||_0x224045(0x1cd):_0x224045(0x1cd),_0x51b20f=await P('send_reply',{'alias':_0x66aee0,'text':_0x3b4d94,'in_reply_to':_0x233c82||void 0x0,'status':_0x5237bf,'from_session':Z});if(_0x233c82)k[_0x224045(0x196)](_0x233c82);return{'content':[{'type':'text','text':JSON['stringify'](_0x51b20f)}]};}let _0x673633=await P(_0x224045(0x19b),{'resume_id':w,'alias':Z,'status':_0x5255ae===_0x224045(0x160)?_0x224045(0x160):_0x5255ae===_0x224045(0x179)?_0x224045(0x179):_0x224045(0x1e5),'task':_0x3b4d94['slice'](0x0,0xc8),'output':_0x3b4d94});return{'content':[{'type':_0x224045(0x15e),'text':JSON[_0x224045(0x1b5)](_0x673633)}]};}if(_0x2122b0===_0x224045(0x1e9)){let {status:_0x32e47a,task:_0x62aaf6,progress:_0x417eaf}=_0x295005,_0x4be021=await P(_0x224045(0x19b),{'resume_id':w,'alias':Z,'status':_0x32e47a,'task':_0x62aaf6,'progress':_0x417eaf});return{'content':[{'type':_0x224045(0x15e),'text':JSON[_0x224045(0x1b5)](_0x4be021)}]};}if(_0x2122b0==='commhub_send_task'){let {alias:_0x49b030,task:_0xf94fc7,priority:_0x528679}=_0x295005,_0x4580d2=await P('send_task',{'alias':_0x49b030,'task':_0xf94fc7,'priority':_0x528679||_0x224045(0x17a),'from_session':Z});return{'content':[{'type':_0x224045(0x15e),'text':JSON[_0x224045(0x1b5)](_0x4580d2)}]};}if(_0x2122b0==='commhub_send_message'){let {alias:_0x3b0572,message:_0x4df721}=_0x295005,_0x566a2c=await P('send_message',{'alias':_0x3b0572,'message':_0x4df721,'from_session':Z});return{'content':[{'type':_0x224045(0x15e),'text':JSON[_0x224045(0x1b5)](_0x566a2c)}]};}if(_0x2122b0===_0x224045(0x194)){let _0x2e32f2=await P(_0x224045(0x16f),{});return{'content':[{'type':_0x224045(0x15e),'text':JSON[_0x224045(0x1b5)](_0x2e32f2)}]};}return{'content':[{'type':'text','text':JSON[_0x224045(0x1b5)]({'error':'unknown\x20tool'})}]};});async function v(){const _0xd360b4=a0_0x16766a;let _0x2e54ae=D+_0xd360b4(0x1e7)+encodeURIComponent(Z),_0x20e2be={};if(X)_0x20e2be[_0xd360b4(0x1c0)]='Bearer\x20'+X;Y(_0xd360b4(0x1a5)+_0x2e54ae);while(!0x0){try{let _0x2f3db3=await fetch(_0x2e54ae,{'headers':_0x20e2be});if(!_0x2f3db3['ok']){Y(_0xd360b4(0x19f)+_0x2f3db3[_0xd360b4(0x171)]+'\x20'+_0x2f3db3[_0xd360b4(0x1d4)]),await h(0x1388);continue;}let _0x39bad8=_0x2f3db3[_0xd360b4(0x1a3)][_0xd360b4(0x1e8)](),_0x1f7a57=new TextDecoder(),_0x4a57f3='';while(!0x0){let {done:_0x2affe5,value:_0x532c8c}=await _0x39bad8[_0xd360b4(0x1d1)]();if(_0x2affe5)break;_0x4a57f3+=_0x1f7a57['decode'](_0x532c8c,{'stream':!0x0});let _0x120c8a=_0x4a57f3[_0xd360b4(0x174)]('\x0a\x0a');_0x4a57f3=_0x120c8a['pop']()||'';for(let _0x2f2a84 of _0x120c8a){let _0x21a3e4=_0x2f2a84[_0xd360b4(0x174)]('\x0a')['find'](_0x54bc1a=>_0x54bc1a['startsWith'](_0xd360b4(0x187)));if(!_0x21a3e4)continue;try{let _0x5958d9=JSON[_0xd360b4(0x167)](_0x21a3e4['slice'](0x6));await u(_0x5958d9);}catch(_0x30d7a0){Y(_0xd360b4(0x1af)+_0x30d7a0);}}}Y(_0xd360b4(0x1e4));}catch(_0x28bb77){Y(_0xd360b4(0x1e6)+_0x28bb77);}await h(0xbb8);}}async function u(_0x262405){const _0x3bc459=a0_0x16766a;if(_0x262405[_0x3bc459(0x1d0)]===_0x3bc459(0x180)){Y(_0x3bc459(0x188)+Z+'\x22');return;}if(_0x262405[_0x3bc459(0x1d0)]==='new_message'){if(Y(_0x3bc459(0x1b3)+_0x262405[_0x3bc459(0x178)]+':\x20'+_0x262405[_0x3bc459(0x185)]['slice'](0x0,0x3c)),await K[_0x3bc459(0x183)]({'method':'notifications/claude/channel','params':{'content':_0x262405['message'],'meta':{'sender':_0x262405[_0x3bc459(0x178)]||_0x3bc459(0x1cd),'sender_id':_0x3bc459(0x161),'user':_0x262405[_0x3bc459(0x178)]||_0x3bc459(0x1cd),'priority':_0x3bc459(0x17a)}}}),_0x262405['message_id'])await P(_0x3bc459(0x1a7),{'alias':Z,'message_id':_0x262405[_0x3bc459(0x1ae)]});return;}if(_0x262405['type']===_0x3bc459(0x1b4)||_0x262405['type']===_0x3bc459(0x17e)){Y('←\x20'+_0x262405[_0x3bc459(0x1d0)]+':\x20inbox_count='+_0x262405[_0x3bc459(0x1c1)]+_0x3bc459(0x17b)+(_0x262405[_0x3bc459(0x191)]||'normal'));let _0xdf945f=await P(_0x3bc459(0x192),{'alias':Z,'limit':0x5});if(_0xdf945f?.['ok']&&_0xdf945f[_0x3bc459(0x16c)]?.[_0x3bc459(0x1c7)]>0x0)for(let _0xaf4364 of _0xdf945f['messages']){let _0x343b83={'sender':_0xaf4364['from_session']||_0x3bc459(0x1cd),'sender_id':_0x3bc459(0x161),'user':_0xaf4364[_0x3bc459(0x186)]||_0x3bc459(0x1cd),'task_id':_0xaf4364['id'],'priority':_0xaf4364[_0x3bc459(0x191)]||_0x3bc459(0x17a)};k['set'](_0xaf4364['id'],_0xaf4364[_0x3bc459(0x186)]||'hub'),await K[_0x3bc459(0x183)]({'method':'notifications/claude/channel','params':{'content':_0xaf4364['content'],'meta':_0x343b83}}),Y('→\x20injected\x20task\x20'+_0xaf4364['id'][_0x3bc459(0x197)](0x0,0x8)+_0x3bc459(0x1b2)+_0xaf4364[_0x3bc459(0x186)]+':\x20'+_0xaf4364[_0x3bc459(0x1cf)][_0x3bc459(0x197)](0x0,0x3c)),await P(_0x3bc459(0x1a7),{'alias':Z,'message_id':_0xaf4364['id']});}}}async function S(){const _0x5667c7=a0_0x16766a;let _0x1c2891=new a0_0x5c0542();await K[_0x5667c7(0x1c8)](_0x1c2891),Y(_0x5667c7(0x1b8)),Y(_0x5667c7(0x1de)),v()[_0x5667c7(0x1dc)](_0x498696=>Y(_0x5667c7(0x19d)+_0x498696)),P(_0x5667c7(0x19b),{'resume_id':w,'alias':Z,'status':_0x5667c7(0x1bb),'server':a0_0x4e00a0(),'hostname':a0_0x4e00a0(),'agent':_0x5667c7(0x1aa),'project_dir':process[_0x5667c7(0x190)](),'tmux_name':f||void 0x0})['then'](()=>Y(_0x5667c7(0x1c2)+Z+'\x22\x20('+w['slice'](0x0,0x8)+')'))[_0x5667c7(0x1dc)](_0x552172=>Y(_0x5667c7(0x1dd)+_0x552172)),setInterval(()=>{const _0x3199c9=_0x5667c7;P(_0x3199c9(0x19b),{'resume_id':w,'alias':Z,'status':_0x3199c9(0x1bb),'server':a0_0x4e00a0(),'hostname':a0_0x4e00a0(),'agent':_0x3199c9(0x1aa),'project_dir':process[_0x3199c9(0x190)](),'tmux_name':f||void 0x0})[_0x3199c9(0x1dc)](_0x180d4e=>Y(_0x3199c9(0x19c)+_0x180d4e));},0x2bf20),Y(_0x5667c7(0x1ea));}S()['catch'](_0x589c69=>{Y('fatal:\x20'+_0x589c69),process['exit'](0x1);});function a0_0x2dc8(_0x4fcb7c,_0x378d52){_0x4fcb7c=_0x4fcb7c-0x15e;const _0x424793=a0_0x4247();let _0x2dc8eb=_0x424793[_0x4fcb7c];return _0x2dc8eb;}async function N(){const _0x3eec82=a0_0x16766a;Y(_0x3eec82(0x166)),await P(_0x3eec82(0x19b),{'resume_id':w,'alias':Z,'status':_0x3eec82(0x179),'task':_0x3eec82(0x193)})[_0x3eec82(0x1dc)](()=>{}),process[_0x3eec82(0x1c9)](0x0);}process['stdin']['on']('end',()=>N()),process['on'](a0_0x16766a(0x18e),()=>N()),process['on'](a0_0x16766a(0x17d),()=>N());function a0_0x4247(){const _0x5637f8=['result','/mcp','The\x20task_id\x20from\x20the\x20channel\x20message\x20(or\x20\x27hub\x27\x20for\x20general)','Task\x20content','commhub_send_task','replied','alias','catch','warning:\x20could\x20not\x20register:\x20','starting\x20SSE\x20listener...','Priority\x20(default:\x20normal)','.claude/channels/commhub','startsWith','init\x20failed:\x20','get','SSE\x20stream\x20ended,\x20reconnecting...','working','SSE\x20connection\x20error:\x20','/events/','getReader','commhub_report_status','ready\x20—\x20waiting\x20for\x20events','392760NdVqIY','application/json','text','number','blocked','commhub','734935LpsINA','no\x20response','tmux\x20display-message\x20-p\x20\x27#S\x27','join','shutting\x20down,\x20reporting\x20offline...','parse','\x20CWD=','replace','Reply\x20to\x20a\x20CommHub\x20task\x20—\x20report\x20completion\x20or\x20send\x20a\x20message\x20back\x20to\x20the\x20hub.','0.3.0','messages','toTimeString','string','get_all_status','application/json,\x20text/event-stream','status','commhub-channel','\x20PROJECT_ENV=','split','cancelled','Get\x20status\x20of\x20all\x20sessions\x20from\x20CommHub.','96IixvJT','from','error','normal','\x20priority=','Target\x20session\x20alias','SIGINT','broadcast','.anet','connected','20XeaWJA','2LztPEp','notification','.env','message','from_session','data:\x20','SSE\x20connected\x20as\x20\x22','POST','2025-03-26','tools/call','config.json',']\x20[commhub]\x20','SIGTERM','setRequestHandler','cwd','priority','get_inbox','session\x20disconnected','commhub_get_all_status','3644322sqDRWE','delete','slice','ENV:\x20URL=','Bearer\x20','941249tqCGyW','report_status','heartbeat\x20failed:\x20','SSE\x20fatal:\x20','Message\x20content','SSE\x20error:\x20','Send\x20a\x20task\x20to\x20another\x20session\x20via\x20CommHub.','none','utf-8','body','6422591wGNayJ','connecting\x20to\x20','stderr','ack_inbox','Task\x20outcome:\x20completed/failed/cancelled\x20for\x20final\x20results,\x20blocked/error/in_progress\x20for\x20status\x20updates','2.0','claude-code','indexOf','6TCqaEi','6101560heQssY','message_id','parse\x20error:\x20','...\x20TMUX=','completed','\x20from\x20','←\x20message\x20from\x20','new_task','stringify','Messages\x20from\x20CommHub\x20arrive\x20as\x20<channel\x20source=\x22commhub\x22\x20task_id=\x22...\x22\x20priority=\x22...\x22\x20from=\x22...\x22>','object','MCP\x20stdio\x20connected','CommHub\x20init\x20failed:\x20','http://127.0.0.1:9200','idle','You\x20can\x20also\x20use\x20commhub_report_status\x20to\x20update\x20your\x20session\x20status.','failed','Current\x20task\x20description','Send\x20a\x20message\x20to\x20another\x20session\x20(no\x20task\x20lifecycle,\x20just\x20chat).\x20Use\x20for\x20replies\x20and\x20status\x20updates.','Authorization','inbox_count','registered\x20as\x20\x22','Reply\x20using\x20the\x20commhub_reply\x20tool\x20to\x20report\x20status\x20or\x20results\x20back.','1208367lhKsLu','Session\x20alias:\x20','token','length','connect','exit','initialize','\x20RESUME_ID=','Reply\x20text\x20/\x20result\x20summary','hub','write','content','type','read','low','trim','statusText'];a0_0x4247=function(){return _0x5637f8;};return a0_0x4247();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleep2agi/agent-network",
3
- "version": "2.0.0-preview.57",
3
+ "version": "2.0.0-preview.59",
4
4
  "description": "AI Agent Network CLI \u2014 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",