@sleep2agi/agent-network 2.0.0-preview.62 → 2.0.0-preview.63

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_0x7185bd=a0_0x2e94;(function(_0x541c11,_0x256b5f){const _0x471a35=a0_0x2e94,_0x15285a=_0x541c11();while(!![]){try{const _0xa5656a=-parseInt(_0x471a35(0x226))/0x1*(parseInt(_0x471a35(0x20a))/0x2)+parseInt(_0x471a35(0x1f2))/0x3*(-parseInt(_0x471a35(0x228))/0x4)+parseInt(_0x471a35(0x238))/0x5+-parseInt(_0x471a35(0x1ec))/0x6+-parseInt(_0x471a35(0x229))/0x7*(-parseInt(_0x471a35(0x1f1))/0x8)+parseInt(_0x471a35(0x21e))/0x9*(-parseInt(_0x471a35(0x223))/0xa)+parseInt(_0x471a35(0x215))/0xb*(parseInt(_0x471a35(0x212))/0xc);if(_0xa5656a===_0x256b5f)break;else _0x15285a['push'](_0x15285a['shift']());}catch(_0xf93b79){_0x15285a['push'](_0x15285a['shift']());}}}(a0_0x409a,0x689ba));function a0_0x409a(){const _0x2b402b=['call','stringify','reconnectDelay','startsWith','137230FxaBFU','normal','body','109dcGQHf','registered','2740sCVXUR','7609uEyRSu','SSE\x20failed:\x20','/mcp','get_all_status','url','status','tools/call','inbox\x20error:\x20','running','idle','error','sdk','content','cwd','Authorization','3520150rFjWoe','reply','broadcast',']\x20[commhub:','offline','connect','processInbox','type','now','AbortError','task','catch','split','replace','log','send','sleep','959244ZfKSKZ','getReader','slice','disconnect','SSE\x20reconnecting\x20in\x20','5216raWBsT','1605JTOlIX','connectSSE','Bearer\x20','messages','sdk-','data:\x20','heartbeatTimer','send_task','heartbeatInterval','disconnected','autoConnect','emit','parse','pop','token','ack_inbox','min','SSE\x20connected','s...','match','new_task','text/event-stream','application/json','agent','15622VhgsMW','resumeId','2.0','from_session','new_message','connected','report_status','message','12VjGWrJ','get_inbox','decode','12328657CkwPhR','getAllStatus','alias','SSE\x20error:\x20','sseAbort','send_message','server','text','/events/','477sKcxdl'];a0_0x409a=function(){return _0x2b402b;};return a0_0x409a();}import{EventEmitter as a0_0x307851}from'events';import{hostname as a0_0x244e1f}from'os';class T extends a0_0x307851{[a0_0x7185bd(0x22d)];['alias'];['token'];[a0_0x7185bd(0x209)];[a0_0x7185bd(0x20b)];[a0_0x7185bd(0x1fa)];[a0_0x7185bd(0x221)];[a0_0x7185bd(0x1f8)];[a0_0x7185bd(0x219)];[a0_0x7185bd(0x231)]=!0x1;constructor(_0x4f8c31){const _0x26b35e=a0_0x7185bd;super();if(this['url']=_0x4f8c31[_0x26b35e(0x22d)][_0x26b35e(0x1e8)](/\/$/,''),this[_0x26b35e(0x217)]=_0x4f8c31['alias'],this[_0x26b35e(0x200)]=_0x4f8c31[_0x26b35e(0x200)],this[_0x26b35e(0x209)]=_0x4f8c31['agent']||_0x26b35e(0x234),this[_0x26b35e(0x20b)]=_0x26b35e(0x1f6)+_0x4f8c31[_0x26b35e(0x217)]+'-'+Date['now']()['toString'](0x24),this[_0x26b35e(0x1fa)]=_0x4f8c31[_0x26b35e(0x1fa)]??0x2bf20,this[_0x26b35e(0x221)]=_0x4f8c31['reconnectDelay']??0xbb8,_0x4f8c31[_0x26b35e(0x1fc)]!==!0x1)this[_0x26b35e(0x1e0)]();}[a0_0x7185bd(0x1e9)](_0x5a79ba){const _0x5de1fc=a0_0x7185bd;console[_0x5de1fc(0x1e9)]('['+new Date()['toTimeString']()['slice'](0x0,0x8)+_0x5de1fc(0x1de)+this['alias']+']\x20'+_0x5a79ba);}async[a0_0x7185bd(0x21f)](_0x54adb8,_0x2b6e88){const _0x5a09d0=a0_0x7185bd;let _0x38dba2={'Content-Type':_0x5a09d0(0x208),'Accept':'application/json,\x20text/event-stream'};if(this[_0x5a09d0(0x200)])_0x38dba2[_0x5a09d0(0x237)]=_0x5a09d0(0x1f4)+this[_0x5a09d0(0x200)];let _0x237707=await(await fetch(this[_0x5a09d0(0x22d)]+_0x5a09d0(0x22b),{'method':'POST','headers':_0x38dba2,'body':JSON[_0x5a09d0(0x220)]({'jsonrpc':_0x5a09d0(0x20c),'id':Date[_0x5a09d0(0x1e3)](),'method':_0x5a09d0(0x22f),'params':{'name':_0x54adb8,'arguments':_0x2b6e88}})}))[_0x5a09d0(0x21c)](),_0x3aca3d=_0x237707[_0x5a09d0(0x205)](/data: (.+)/),_0x5892b2=_0x3aca3d?JSON['parse'](_0x3aca3d[0x1]):JSON['parse'](_0x237707),_0x241400=_0x5892b2?.['result']?.[_0x5a09d0(0x235)]?.[0x0]?.[_0x5a09d0(0x21c)];return _0x241400?JSON[_0x5a09d0(0x1fe)](_0x241400):_0x5892b2;}async[a0_0x7185bd(0x1e0)](){const _0x263d78=a0_0x7185bd;if(this['running'])return;this['running']=!0x0,await this[_0x263d78(0x22e)](_0x263d78(0x232)),this[_0x263d78(0x1e9)](_0x263d78(0x227)),this[_0x263d78(0x1f8)]=setInterval(()=>{const _0x1884e2=_0x263d78;this[_0x1884e2(0x22e)]('idle')['catch'](_0x3528f3=>this[_0x1884e2(0x1e9)]('heartbeat\x20failed:\x20'+_0x3528f3[_0x1884e2(0x211)]));},this[_0x263d78(0x1fa)]),this[_0x263d78(0x1f3)]();}async[a0_0x7185bd(0x1ef)](){const _0x3588d1=a0_0x7185bd;if(this[_0x3588d1(0x231)]=!0x1,this[_0x3588d1(0x219)]?.['abort'](),this[_0x3588d1(0x1f8)])clearInterval(this[_0x3588d1(0x1f8)]);await this[_0x3588d1(0x22e)](_0x3588d1(0x1df))[_0x3588d1(0x1e6)](()=>{}),this[_0x3588d1(0x1e9)](_0x3588d1(0x1fb));}async[a0_0x7185bd(0x1ea)](_0x3a57d0,_0x350b5a,_0x1aef45=a0_0x7185bd(0x224)){const _0x17cb9b=a0_0x7185bd;return this[_0x17cb9b(0x21f)](_0x17cb9b(0x1f9),{'alias':_0x3a57d0,'task':_0x350b5a,'priority':_0x1aef45,'from_session':this['alias']});}async[a0_0x7185bd(0x211)](_0x411a43,_0x47a3f4){const _0x1d2f2b=a0_0x7185bd;return this[_0x1d2f2b(0x21f)](_0x1d2f2b(0x21a),{'alias':_0x411a43,'message':_0x47a3f4,'from_session':this[_0x1d2f2b(0x217)]});}async['reply'](_0x115d49,_0x2124b3,_0x584561='completed'){const _0x3cc383=a0_0x7185bd;return this[_0x3cc383(0x21f)](_0x3cc383(0x239),{'task_id':_0x115d49,'text':_0x2124b3,'status':_0x584561});}async['status'](_0x397830,_0x4ff097){const _0x3df559=a0_0x7185bd;return this[_0x3df559(0x21f)](_0x3df559(0x210),{'resume_id':this[_0x3df559(0x20b)],'alias':this['alias'],'status':_0x397830,'server':a0_0x244e1f(),'hostname':a0_0x244e1f(),'agent':this[_0x3df559(0x209)],'project_dir':process[_0x3df559(0x236)](),..._0x4ff097});}async[a0_0x7185bd(0x216)](){const _0x30c3cb=a0_0x7185bd;return this['call'](_0x30c3cb(0x22c),{});}async[a0_0x7185bd(0x23a)](_0x240284,_0x3a0d64){const _0x3861af=a0_0x7185bd;return this[_0x3861af(0x21f)](_0x3861af(0x23a),{'message':_0x240284,'filter_server':_0x3a0d64?.[_0x3861af(0x21b)],'filter_status':_0x3a0d64?.[_0x3861af(0x22e)]});}async[a0_0x7185bd(0x1f3)](){const _0x33f16e=a0_0x7185bd;let _0x13c127=encodeURIComponent(this[_0x33f16e(0x217)]),_0x16841f=this[_0x33f16e(0x22d)]+_0x33f16e(0x21d)+_0x13c127,_0x3ba610=this[_0x33f16e(0x221)];while(this[_0x33f16e(0x231)]){try{this[_0x33f16e(0x219)]=new AbortController();let _0x54d029={'Accept':_0x33f16e(0x207)};if(this[_0x33f16e(0x200)])_0x54d029[_0x33f16e(0x237)]=_0x33f16e(0x1f4)+this['token'];let _0xc7f9d6=await fetch(_0x16841f,{'headers':_0x54d029,'signal':this[_0x33f16e(0x219)]['signal']});if(!_0xc7f9d6['ok']||!_0xc7f9d6['body']){this[_0x33f16e(0x1e9)](_0x33f16e(0x22a)+_0xc7f9d6[_0x33f16e(0x22e)]),await this['sleep'](_0x3ba610),_0x3ba610=Math[_0x33f16e(0x202)](_0x3ba610*1.5,0xea60);continue;}_0x3ba610=this[_0x33f16e(0x221)];let _0x4578d8=_0xc7f9d6[_0x33f16e(0x225)][_0x33f16e(0x1ed)](),_0x23d66b=new TextDecoder(),_0x53f87e='';while(this[_0x33f16e(0x231)]){let {done:_0x5c8c9b,value:_0x4008ab}=await _0x4578d8['read']();if(_0x5c8c9b)break;_0x53f87e+=_0x23d66b[_0x33f16e(0x214)](_0x4008ab,{'stream':!0x0});let _0x58e19e=_0x53f87e[_0x33f16e(0x1e7)]('\x0a');_0x53f87e=_0x58e19e[_0x33f16e(0x1ff)]()||'';for(let _0x6c8948 of _0x58e19e){if(!_0x6c8948[_0x33f16e(0x222)](_0x33f16e(0x1f7)))continue;try{let _0x582815=JSON[_0x33f16e(0x1fe)](_0x6c8948[_0x33f16e(0x1ee)](0x6));if(_0x582815[_0x33f16e(0x1e2)]===_0x33f16e(0x20f)){this['log'](_0x33f16e(0x203)),this['emit']('connected');continue;}if(_0x582815[_0x33f16e(0x1e2)]===_0x33f16e(0x206)||_0x582815[_0x33f16e(0x1e2)]===_0x33f16e(0x20e)||_0x582815['type']===_0x33f16e(0x23a))await this[_0x33f16e(0x1e1)]();}catch{}}}}catch(_0x4a832a){if(_0x4a832a['name']===_0x33f16e(0x1e4))break;this['emit'](_0x33f16e(0x233),_0x4a832a),this[_0x33f16e(0x1e9)](_0x33f16e(0x218)+_0x4a832a[_0x33f16e(0x211)]);}if(this[_0x33f16e(0x231)])this[_0x33f16e(0x1fd)](_0x33f16e(0x1fb)),this['log'](_0x33f16e(0x1f0)+_0x3ba610/0x3e8+_0x33f16e(0x204)),await this[_0x33f16e(0x1eb)](_0x3ba610),_0x3ba610=Math[_0x33f16e(0x202)](_0x3ba610*1.5,0xea60);}}async['processInbox'](){const _0x382aa8=a0_0x7185bd;try{let _0x4d3fdf=(await this[_0x382aa8(0x21f)](_0x382aa8(0x213),{'alias':this[_0x382aa8(0x217)],'limit':0xa}))?.[_0x382aa8(0x1f5)]||[];for(let _0x2397c0 of _0x4d3fdf)await this[_0x382aa8(0x21f)](_0x382aa8(0x201),{'alias':this[_0x382aa8(0x217)],'message_id':_0x2397c0['id']}),this[_0x382aa8(0x1e9)]('←\x20'+_0x2397c0[_0x382aa8(0x20d)]+':\x20'+_0x2397c0[_0x382aa8(0x235)][_0x382aa8(0x1ee)](0x0,0x3c)),this[_0x382aa8(0x1fd)](_0x382aa8(0x1e5),_0x2397c0),this[_0x382aa8(0x1fd)]('message',_0x2397c0);}catch(_0x57c473){this[_0x382aa8(0x1e9)](_0x382aa8(0x230)+_0x57c473[_0x382aa8(0x211)]);}}['sleep'](_0x636795){return new Promise(_0x1a25d5=>setTimeout(_0x1a25d5,_0x636795));}}var $=T;function a0_0x2e94(_0x2fe8c4,_0x4f387a){_0x2fe8c4=_0x2fe8c4-0x1de;const _0x409a00=a0_0x409a();let _0x2e94c5=_0x409a00[_0x2fe8c4];return _0x2e94c5;}export{$ as default,T as CommHub};
1
+ const a0_0x10bdb3=a0_0x5a11;(function(_0x2d1f4c,_0x36f762){const _0x37e09e=a0_0x5a11,_0x1c013e=_0x2d1f4c();while(!![]){try{const _0x5783e8=-parseInt(_0x37e09e(0x112))/0x1+-parseInt(_0x37e09e(0x10d))/0x2*(parseInt(_0x37e09e(0x11a))/0x3)+parseInt(_0x37e09e(0xcd))/0x4*(-parseInt(_0x37e09e(0xff))/0x5)+-parseInt(_0x37e09e(0x118))/0x6*(parseInt(_0x37e09e(0xed))/0x7)+parseInt(_0x37e09e(0xd3))/0x8*(parseInt(_0x37e09e(0x119))/0x9)+-parseInt(_0x37e09e(0xea))/0xa+-parseInt(_0x37e09e(0xfd))/0xb*(-parseInt(_0x37e09e(0x121))/0xc);if(_0x5783e8===_0x36f762)break;else _0x1c013e['push'](_0x1c013e['shift']());}catch(_0x2653ad){_0x1c013e['push'](_0x1c013e['shift']());}}}(a0_0x42ae,0x2bfa6));function a0_0x42ae(){const _0x39bb1f=['split','application/json,\x20text/event-stream','call','getReader','toString','24TBcWhY','completed','match','send','Authorization','from_session','24PIpdRN','connectSSE','POST','AbortError','processInbox','disconnect','1942024XwKpCQ','Bearer\x20','new_task','messages','alias','registered','agent','token','report_status','heartbeatInterval','log','connected','send_task','emit','text','catch','autoConnect','s...','toTimeString','sleep','now','url','task','2006960aOjmUl','broadcast','message','301azrJlv','signal','sdk','offline','heartbeatTimer','slice','decode','2.0','tools/call','status','reconnectDelay','parse','content','get_all_status','SSE\x20connected','reply','5272971eGFDDJ','getAllStatus','124580xbrEpy','name','type','connect','sseAbort','pop','SSE\x20reconnecting\x20in\x20','send_message','normal','stringify','error','min','body','running','5146GyTUhD','data:\x20','abort','ack_inbox','resumeId','235792JTeZnI','new_message','inbox\x20error:\x20','disconnected','startsWith','get_inbox','22332KlDkjr','9YPsIap','321tIkFhi','/mcp'];a0_0x42ae=function(){return _0x39bb1f;};return a0_0x42ae();}function a0_0x5a11(_0x36450e,_0xd8f647){_0x36450e=_0x36450e-0xcd;const _0x42ae8f=a0_0x42ae();let _0x5a1101=_0x42ae8f[_0x36450e];return _0x5a1101;}import{EventEmitter as a0_0x69ad93}from'events';import{hostname as a0_0x243104}from'os';class T extends a0_0x69ad93{['url'];[a0_0x10bdb3(0xd7)];['token'];[a0_0x10bdb3(0xd9)];[a0_0x10bdb3(0x111)];[a0_0x10bdb3(0xdc)];[a0_0x10bdb3(0xf7)];[a0_0x10bdb3(0xf1)];[a0_0x10bdb3(0x103)];[a0_0x10bdb3(0x10c)]=!0x1;constructor(_0x58ca18){const _0x1a9a01=a0_0x10bdb3;super();if(this[_0x1a9a01(0xe8)]=_0x58ca18['url']['replace'](/\/$/,''),this[_0x1a9a01(0xd7)]=_0x58ca18['alias'],this[_0x1a9a01(0xda)]=_0x58ca18[_0x1a9a01(0xda)],this[_0x1a9a01(0xd9)]=_0x58ca18[_0x1a9a01(0xd9)]||_0x1a9a01(0xef),this[_0x1a9a01(0x111)]='sdk-'+_0x58ca18[_0x1a9a01(0xd7)]+'-'+Date[_0x1a9a01(0xe7)]()[_0x1a9a01(0x120)](0x24),this[_0x1a9a01(0xdc)]=_0x58ca18[_0x1a9a01(0xdc)]??0x2bf20,this[_0x1a9a01(0xf7)]=_0x58ca18[_0x1a9a01(0xf7)]??0xbb8,_0x58ca18[_0x1a9a01(0xe3)]!==!0x1)this['connect']();}[a0_0x10bdb3(0xdd)](_0x5a2164){const _0x4bc641=a0_0x10bdb3;console[_0x4bc641(0xdd)]('['+new Date()[_0x4bc641(0xe5)]()[_0x4bc641(0xf2)](0x0,0x8)+']\x20[commhub:'+this['alias']+']\x20'+_0x5a2164);}async['call'](_0x4f33b8,_0x1799ae){const _0x337d85=a0_0x10bdb3;let _0x28d2bf={'Content-Type':'application/json','Accept':_0x337d85(0x11d)};if(this[_0x337d85(0xda)])_0x28d2bf['Authorization']=_0x337d85(0xd4)+this[_0x337d85(0xda)];let _0x5dbc7d=await(await fetch(this['url']+_0x337d85(0x11b),{'method':_0x337d85(0xcf),'headers':_0x28d2bf,'body':JSON[_0x337d85(0x108)]({'jsonrpc':_0x337d85(0xf4),'id':Date[_0x337d85(0xe7)](),'method':_0x337d85(0xf5),'params':{'name':_0x4f33b8,'arguments':_0x1799ae}})}))[_0x337d85(0xe1)](),_0x3b7426=_0x5dbc7d[_0x337d85(0x123)](/data: (.+)/),_0x5423ea=_0x3b7426?JSON[_0x337d85(0xf8)](_0x3b7426[0x1]):JSON[_0x337d85(0xf8)](_0x5dbc7d),_0x2f4947=_0x5423ea?.['result']?.['content']?.[0x0]?.['text'];return _0x2f4947?JSON[_0x337d85(0xf8)](_0x2f4947):_0x5423ea;}async[a0_0x10bdb3(0x102)](){const _0x1e9ae2=a0_0x10bdb3;if(this[_0x1e9ae2(0x10c)])return;this['running']=!0x0,await this[_0x1e9ae2(0xf6)]('idle'),this[_0x1e9ae2(0xdd)](_0x1e9ae2(0xd8)),this[_0x1e9ae2(0xf1)]=setInterval(()=>{const _0x4471eb=_0x1e9ae2;this[_0x4471eb(0xf6)]('idle')[_0x4471eb(0xe2)](_0x10dde8=>this['log']('heartbeat\x20failed:\x20'+_0x10dde8[_0x4471eb(0xec)]));},this[_0x1e9ae2(0xdc)]),this['connectSSE']();}async[a0_0x10bdb3(0xd2)](){const _0x3c6a35=a0_0x10bdb3;if(this[_0x3c6a35(0x10c)]=!0x1,this['sseAbort']?.[_0x3c6a35(0x10f)](),this[_0x3c6a35(0xf1)])clearInterval(this[_0x3c6a35(0xf1)]);await this[_0x3c6a35(0xf6)](_0x3c6a35(0xf0))[_0x3c6a35(0xe2)](()=>{}),this[_0x3c6a35(0xdd)]('disconnected');}async[a0_0x10bdb3(0x124)](_0x5568f3,_0x4e7f67,_0x1dabcb=a0_0x10bdb3(0x107)){const _0x52eff4=a0_0x10bdb3;return this['call'](_0x52eff4(0xdf),{'alias':_0x5568f3,'task':_0x4e7f67,'priority':_0x1dabcb,'from_session':this[_0x52eff4(0xd7)]});}async['message'](_0xf52396,_0x152aae){const _0x4876d1=a0_0x10bdb3;return this[_0x4876d1(0x11e)](_0x4876d1(0x106),{'alias':_0xf52396,'message':_0x152aae,'from_session':this[_0x4876d1(0xd7)]});}async['reply'](_0x2eddd4,_0x317363,_0xf88781=a0_0x10bdb3(0x122)){const _0x410bee=a0_0x10bdb3;return this[_0x410bee(0x11e)](_0x410bee(0xfc),{'task_id':_0x2eddd4,'text':_0x317363,'status':_0xf88781});}async[a0_0x10bdb3(0xf6)](_0x144f04,_0x4d43e5){const _0x3b0f02=a0_0x10bdb3;return this[_0x3b0f02(0x11e)](_0x3b0f02(0xdb),{'resume_id':this[_0x3b0f02(0x111)],'alias':this['alias'],'status':_0x144f04,'server':a0_0x243104(),'hostname':a0_0x243104(),'agent':this['agent'],'project_dir':process['cwd'](),..._0x4d43e5});}async[a0_0x10bdb3(0xfe)](){const _0x2ae955=a0_0x10bdb3;return this['call'](_0x2ae955(0xfa),{});}async['broadcast'](_0xbf95bc,_0x56bc69){const _0x359586=a0_0x10bdb3;return this[_0x359586(0x11e)](_0x359586(0xeb),{'message':_0xbf95bc,'filter_server':_0x56bc69?.['server'],'filter_status':_0x56bc69?.['status']});}async[a0_0x10bdb3(0xce)](){const _0x43e86a=a0_0x10bdb3;let _0x3f3f41=encodeURIComponent(this['alias']),_0x1e3a05=this['url']+'/events/'+_0x3f3f41,_0x25668d=this[_0x43e86a(0xf7)];while(this[_0x43e86a(0x10c)]){try{this[_0x43e86a(0x103)]=new AbortController();let _0x39e9a7={'Accept':'text/event-stream'};if(this['token'])_0x39e9a7[_0x43e86a(0x125)]=_0x43e86a(0xd4)+this[_0x43e86a(0xda)];let _0x29e65f=await fetch(_0x1e3a05,{'headers':_0x39e9a7,'signal':this[_0x43e86a(0x103)][_0x43e86a(0xee)]});if(!_0x29e65f['ok']||!_0x29e65f[_0x43e86a(0x10b)]){this[_0x43e86a(0xdd)]('SSE\x20failed:\x20'+_0x29e65f['status']),await this[_0x43e86a(0xe6)](_0x25668d),_0x25668d=Math[_0x43e86a(0x10a)](_0x25668d*1.5,0xea60);continue;}_0x25668d=this[_0x43e86a(0xf7)];let _0x144a08=_0x29e65f[_0x43e86a(0x10b)][_0x43e86a(0x11f)](),_0x265b33=new TextDecoder(),_0x429d91='';while(this[_0x43e86a(0x10c)]){let {done:_0x280d2e,value:_0x2bb401}=await _0x144a08['read']();if(_0x280d2e)break;_0x429d91+=_0x265b33[_0x43e86a(0xf3)](_0x2bb401,{'stream':!0x0});let _0x44d41d=_0x429d91[_0x43e86a(0x11c)]('\x0a');_0x429d91=_0x44d41d[_0x43e86a(0x104)]()||'';for(let _0x5452ae of _0x44d41d){if(!_0x5452ae[_0x43e86a(0x116)](_0x43e86a(0x10e)))continue;try{let _0x2da01a=JSON[_0x43e86a(0xf8)](_0x5452ae['slice'](0x6));if(_0x2da01a[_0x43e86a(0x101)]===_0x43e86a(0xde)){this[_0x43e86a(0xdd)](_0x43e86a(0xfb)),this[_0x43e86a(0xe0)](_0x43e86a(0xde));continue;}if(_0x2da01a[_0x43e86a(0x101)]===_0x43e86a(0xd5)||_0x2da01a[_0x43e86a(0x101)]===_0x43e86a(0x113)||_0x2da01a['type']===_0x43e86a(0xeb))await this[_0x43e86a(0xd1)]();}catch{}}}}catch(_0x36d3c9){if(_0x36d3c9[_0x43e86a(0x100)]===_0x43e86a(0xd0))break;this[_0x43e86a(0xe0)](_0x43e86a(0x109),_0x36d3c9),this[_0x43e86a(0xdd)]('SSE\x20error:\x20'+_0x36d3c9['message']);}if(this['running'])this['emit'](_0x43e86a(0x115)),this['log'](_0x43e86a(0x105)+_0x25668d/0x3e8+_0x43e86a(0xe4)),await this[_0x43e86a(0xe6)](_0x25668d),_0x25668d=Math[_0x43e86a(0x10a)](_0x25668d*1.5,0xea60);}}async[a0_0x10bdb3(0xd1)](){const _0x3882eb=a0_0x10bdb3;try{let _0x4deb4e=(await this[_0x3882eb(0x11e)](_0x3882eb(0x117),{'alias':this[_0x3882eb(0xd7)],'limit':0xa}))?.[_0x3882eb(0xd6)]||[];for(let _0x1483e7 of _0x4deb4e)await this['call'](_0x3882eb(0x110),{'alias':this[_0x3882eb(0xd7)],'message_id':_0x1483e7['id']}),this[_0x3882eb(0xdd)]('←\x20'+_0x1483e7[_0x3882eb(0x126)]+':\x20'+_0x1483e7[_0x3882eb(0xf9)]['slice'](0x0,0x3c)),this[_0x3882eb(0xe0)](_0x3882eb(0xe9),_0x1483e7),this['emit'](_0x3882eb(0xec),_0x1483e7);}catch(_0x34d320){this[_0x3882eb(0xdd)](_0x3882eb(0x114)+_0x34d320[_0x3882eb(0xec)]);}}['sleep'](_0x49d4f6){return new Promise(_0x5080f3=>setTimeout(_0x5080f3,_0x49d4f6));}}var $=T;export{$ as default,T as CommHub};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env bun
2
- const a0_0x8f5148=a0_0x4b72;(function(_0x410aac,_0x5c7db5){const _0xd4b7b8=a0_0x4b72,_0x44cb21=_0x410aac();while(!![]){try{const _0x1edbb6=parseInt(_0xd4b7b8(0x17d))/0x1+parseInt(_0xd4b7b8(0x142))/0x2*(-parseInt(_0xd4b7b8(0x116))/0x3)+-parseInt(_0xd4b7b8(0x11f))/0x4+parseInt(_0xd4b7b8(0x118))/0x5*(parseInt(_0xd4b7b8(0x149))/0x6)+-parseInt(_0xd4b7b8(0x128))/0x7*(parseInt(_0xd4b7b8(0x161))/0x8)+-parseInt(_0xd4b7b8(0x158))/0x9*(-parseInt(_0xd4b7b8(0x12c))/0xa)+parseInt(_0xd4b7b8(0x159))/0xb;if(_0x1edbb6===_0x5c7db5)break;else _0x44cb21['push'](_0x44cb21['shift']());}catch(_0x4e07be){_0x44cb21['push'](_0x44cb21['shift']());}}}(a0_0x2617,0xbc72a));import{readFileSync as a0_0x379490,existsSync as a0_0x22d452}from'fs';import{join as a0_0x6acbd1}from'path';import{hostname as a0_0x5a5035}from'os';import{execSync as a0_0xf25e4}from'child_process';import{Server as a0_0xc142c6}from'@modelcontextprotocol/sdk/server/index.js';function a0_0x4b72(_0x2fa39b,_0x2c6f08){_0x2fa39b=_0x2fa39b-0x101;const _0x261724=a0_0x2617();let _0x4b72ab=_0x261724[_0x2fa39b];return _0x4b72ab;}import{StdioServerTransport as a0_0x31bc95}from'@modelcontextprotocol/sdk/server/stdio.js';import{ListToolsRequestSchema as a0_0x2bee81,CallToolRequestSchema as a0_0x560778}from'@modelcontextprotocol/sdk/types.js';function p(_0x12245f){const _0x4db61e=a0_0x4b72;if(!a0_0x22d452(_0x12245f))return;for(let _0x1d5bc5 of a0_0x379490(_0x12245f,'utf-8')[_0x4db61e(0x134)]('\x0a')){let _0x13db54=_0x1d5bc5[_0x4db61e(0x17f)]();if(!_0x13db54||_0x13db54[_0x4db61e(0x160)]('#'))continue;let _0x5a0081=_0x13db54[_0x4db61e(0x16c)]('=');if(_0x5a0081<0x0)continue;let _0x4205a9=_0x13db54[_0x4db61e(0x173)](0x0,_0x5a0081)['trim'](),_0x2b9ef8=_0x13db54[_0x4db61e(0x173)](_0x5a0081+0x1)['trim']()['replace'](/^["']|["']$/g,'');if(!process.env[_0x4205a9])process.env[_0x4205a9]=_0x2b9ef8;}}var C=process.env.HOME||'~',T=a0_0x6acbd1(C,a0_0x8f5148(0x16e));p(a0_0x6acbd1(T,a0_0x8f5148(0x185)));var L=process['cwd']()[a0_0x8f5148(0x169)](/\//g,'-');p(a0_0x6acbd1(T,L,a0_0x8f5148(0x185)));function U(){const _0x14e771=a0_0x8f5148;try{return a0_0xf25e4(_0x14e771(0x11e),{'encoding':_0x14e771(0x171),'timeout':0x7d0})[_0x14e771(0x17f)]();}catch{return'';}}function c(){const _0x333dc2=a0_0x8f5148;try{let _0x32f5fb=a0_0x6acbd1(C,'.anet',_0x333dc2(0x176));if(a0_0x22d452(_0x32f5fb))return JSON['parse'](a0_0x379490(_0x32f5fb,_0x333dc2(0x171)));}catch{}return{};}var H=c(),D=process.env.COMMHUB_URL||H[a0_0x8f5148(0x172)]||'http://127.0.0.1:9200',f=process.env.COMMHUB_TMUX||U(),Z=process.env.COMMHUB_ALIAS||f||a0_0x5a5035(),w=process.env.COMMHUB_RESUME_ID||process.env.CLAUDE_RESUME_ID||crypto[a0_0x8f5148(0x10d)](),X=process.env.COMMHUB_TOKEN||H[a0_0x8f5148(0x110)]||'';function Y(_0x15c34c){const _0x529256=a0_0x8f5148;let _0x245644=new Date()[_0x529256(0x146)]()['slice'](0x0,0x8);process[_0x529256(0x147)]['write']('['+_0x245644+']\x20[commhub]\x20'+_0x15c34c+'\x0a');}function h(_0x42ec53){return new Promise(_0x2d0228=>setTimeout(_0x2d0228,_0x42ec53));}Y('ENV:\x20URL='+D+'\x20ALIAS='+Z+a0_0x8f5148(0x109)+w[a0_0x8f5148(0x173)](0x0,0x8)+'...\x20TMUX='+(f||'none')+a0_0x8f5148(0x127)+process['cwd']()+a0_0x8f5148(0x17a)+L);var k=new Map(),K=new a0_0xc142c6({'name':a0_0x8f5148(0x113),'version':'0.3.0'},{'capabilities':{'experimental':{'claude/channel':{}},'tools':{}},'instructions':['Messages\x20from\x20CommHub\x20arrive\x20as\x20<channel\x20source=\x22commhub\x22\x20task_id=\x22...\x22\x20priority=\x22...\x22\x20from=\x22...\x22>','These\x20are\x20tasks\x20dispatched\x20by\x20the\x20hub\x20or\x20other\x20sessions\x20via\x20the\x20CommHub\x20Server.',a0_0x8f5148(0x181),a0_0x8f5148(0x108),a0_0x8f5148(0x140)+Z]['join']('\x0a')});K[a0_0x8f5148(0x13c)](a0_0x2bee81,async()=>({'tools':[{'name':a0_0x8f5148(0x141),'description':a0_0x8f5148(0x178),'inputSchema':{'type':a0_0x8f5148(0x179),'properties':{'task_id':{'type':'string','description':'The\x20task_id\x20from\x20the\x20channel\x20message\x20(or\x20\x27hub\x27\x20for\x20general)'},'text':{'type':a0_0x8f5148(0x11c),'description':'Reply\x20text\x20/\x20result\x20summary'},'status':{'type':a0_0x8f5148(0x11c),'enum':['completed',a0_0x8f5148(0x17b),'cancelled',a0_0x8f5148(0x180),a0_0x8f5148(0x12d),'in_progress'],'description':a0_0x8f5148(0x104)}},'required':[a0_0x8f5148(0x151)]}},{'name':a0_0x8f5148(0x105),'description':a0_0x8f5148(0x15f),'inputSchema':{'type':a0_0x8f5148(0x179),'properties':{'status':{'type':a0_0x8f5148(0x11c),'enum':[a0_0x8f5148(0x13d),a0_0x8f5148(0x162),a0_0x8f5148(0x180),a0_0x8f5148(0x12d)]},'task':{'type':'string','description':'Current\x20task\x20description'},'progress':{'type':a0_0x8f5148(0x14d),'description':a0_0x8f5148(0x102)}},'required':[a0_0x8f5148(0x124)]}},{'name':'commhub_send_task','description':a0_0x8f5148(0x119),'inputSchema':{'type':a0_0x8f5148(0x179),'properties':{'alias':{'type':a0_0x8f5148(0x11c),'description':a0_0x8f5148(0x117)},'task':{'type':'string','description':'Task\x20content'},'priority':{'type':'string','enum':[a0_0x8f5148(0x12e),a0_0x8f5148(0x13e),'low'],'description':a0_0x8f5148(0x12b)}},'required':['alias','task']}},{'name':a0_0x8f5148(0x10c),'description':'Send\x20a\x20message\x20to\x20another\x20session\x20(no\x20task\x20lifecycle,\x20just\x20chat).\x20Use\x20for\x20replies\x20and\x20status\x20updates.','inputSchema':{'type':a0_0x8f5148(0x179),'properties':{'alias':{'type':'string','description':a0_0x8f5148(0x117)},'message':{'type':a0_0x8f5148(0x11c),'description':a0_0x8f5148(0x175)}},'required':[a0_0x8f5148(0x137),'message']}},{'name':a0_0x8f5148(0x154),'description':a0_0x8f5148(0x15a),'inputSchema':{'type':a0_0x8f5148(0x179),'properties':{}}}]}));function a0_0x2617(){const _0x528bee=['split','pop','parse','alias','POST','Authorization','SSE\x20connection\x20error:\x20','←\x20message\x20from\x20','setRequestHandler','working','normal','stringify','Session\x20alias:\x20','commhub_reply','524OFnJqH','body','warning:\x20could\x20not\x20register:\x20','init\x20failed:\x20','toTimeString','stderr',':\x20inbox_count=','1781922aXwBLv','notification','/mcp','from_session','number','\x20priority=','get','SIGTERM','text','send_task','shutting\x20down,\x20reporting\x20offline...','commhub_get_all_status','SIGINT','cancelled','parse\x20error:\x20','441hRhbfQ','1944679FSkmpX','Get\x20status\x20of\x20all\x20sessions\x20from\x20CommHub.','result','message','connect','params','Update\x20this\x20session\x27s\x20status\x20in\x20CommHub\x20(working/idle/blocked/error).\x20Returns\x20inbox_count.','startsWith','896lfiNfW','idle','cwd','decode','heartbeat\x20failed:\x20','application/json,\x20text/event-stream','priority','SSE\x20error:\x20','replace','length','Bearer\x20','indexOf','statusText','.claude/channels/commhub','SSE\x20fatal:\x20','connecting\x20to\x20','utf-8','hub','slice','find','Message\x20content','config.json','2025-03-26','Reply\x20to\x20a\x20CommHub\x20task\x20—\x20report\x20completion\x20or\x20send\x20a\x20message\x20back\x20to\x20the\x20hub.','object','\x20PROJECT_ENV=','failed','/events/','631669DvsJNr','completed','trim','blocked','Reply\x20using\x20the\x20commhub_reply\x20tool\x20to\x20report\x20status\x20or\x20results\x20back.','fatal:\x20','ack_inbox','\x20from\x20','.env','messages','Progress\x200-100','get_all_status','Task\x20outcome:\x20completed/failed/cancelled\x20for\x20final\x20results,\x20blocked/error/in_progress\x20for\x20status\x20updates','commhub_report_status','connected','data:\x20','You\x20can\x20also\x20use\x20commhub_report_status\x20to\x20update\x20your\x20session\x20status.','\x20RESUME_ID=','from','end','commhub_send_message','randomUUID','delete','\x22\x20(','token','SSE\x20stream\x20ended,\x20reconnecting...','report_status','commhub-channel','session\x20disconnected','claude-code','13077SbeSTk','Target\x20session\x20alias','10EvMYmO','Send\x20a\x20task\x20to\x20another\x20session\x20via\x20CommHub.','new_task','application/json','string','get_inbox','tmux\x20display-message\x20-p\x20\x27#S\x27','2422376FiirQP','registered\x20as\x20\x22','catch','unknown\x20tool','commhub','status','SSE\x20connected\x20as\x20\x22','message_id','\x20CWD=','9947UUvIrh','exit','content','Priority\x20(default:\x20normal)','260460VvUxmi','error','high','getReader','type','0.3.0','initialize','→\x20injected\x20task\x20'];a0_0x2617=function(){return _0x528bee;};return a0_0x2617();}async function P(_0x553794,_0xb39268){const _0x1b9134=a0_0x8f5148;let _0x129c28=await fetch(D+'/mcp',{'method':_0x1b9134(0x138),'headers':{'Content-Type':_0x1b9134(0x11b),'Accept':_0x1b9134(0x166),...X?{'Authorization':_0x1b9134(0x16b)+X}:{}},'body':JSON[_0x1b9134(0x13f)]({'jsonrpc':'2.0','id':0x1,'method':_0x1b9134(0x132),'params':{'protocolVersion':_0x1b9134(0x177),'capabilities':{},'clientInfo':{'name':'commhub-channel','version':_0x1b9134(0x131)}}})});if(!_0x129c28['ok']){let _0x5d67ea=await _0x129c28['text']();return Y('CommHub\x20init\x20failed:\x20'+_0x129c28['status']+'\x20'+_0x5d67ea[_0x1b9134(0x173)](0x0,0x64)),{'ok':!0x1,'error':_0x1b9134(0x145)+_0x129c28[_0x1b9134(0x124)]};}await _0x129c28['text']();let _0x25eb11=(await(await fetch(D+_0x1b9134(0x14b),{'method':_0x1b9134(0x138),'headers':{'Content-Type':'application/json','Accept':'application/json,\x20text/event-stream',...X?{'Authorization':_0x1b9134(0x16b)+X}:{}},'body':JSON['stringify']({'jsonrpc':'2.0','id':0x2,'method':'tools/call','params':{'name':_0x553794,'arguments':_0xb39268}})}))['text']())[_0x1b9134(0x134)]('\x0a')[_0x1b9134(0x174)](_0x10a2ba=>_0x10a2ba[_0x1b9134(0x160)](_0x1b9134(0x107)));if(_0x25eb11){let _0x74ef94=JSON['parse'](_0x25eb11[_0x1b9134(0x173)](0x6));return _0x74ef94?.[_0x1b9134(0x15b)]?.['content']?.[0x0]?.[_0x1b9134(0x151)]?JSON[_0x1b9134(0x136)](_0x74ef94[_0x1b9134(0x15b)][_0x1b9134(0x12a)][0x0][_0x1b9134(0x151)]):_0x74ef94;}return{'ok':!0x1,'error':'no\x20response'};}K[a0_0x8f5148(0x13c)](a0_0x560778,async _0x43cbac=>{const _0x42a343=a0_0x8f5148;let {name:_0x2da5f8,arguments:_0x46f44d}=_0x43cbac[_0x42a343(0x15e)];if(_0x2da5f8===_0x42a343(0x141)){let {task_id:_0x50b4a6,text:_0x3e980e,status:_0xbec38c}=_0x46f44d;if(_0xbec38c===_0x42a343(0x17e)||_0xbec38c===_0x42a343(0x17b)||_0xbec38c===_0x42a343(0x156)){let _0x58c305=_0xbec38c===_0x42a343(0x17e)?'replied':_0xbec38c,_0x443479=_0x50b4a6?k[_0x42a343(0x14f)](_0x50b4a6)||_0x42a343(0x172):_0x42a343(0x172),_0x14b40b=await P('send_reply',{'alias':_0x443479,'text':_0x3e980e,'in_reply_to':_0x50b4a6||void 0x0,'status':_0x58c305,'from_session':Z});if(_0x50b4a6)k[_0x42a343(0x10e)](_0x50b4a6);return{'content':[{'type':_0x42a343(0x151),'text':JSON[_0x42a343(0x13f)](_0x14b40b)}]};}let _0xea060a=await P(_0x42a343(0x112),{'resume_id':w,'alias':Z,'status':_0xbec38c===_0x42a343(0x180)?_0x42a343(0x180):_0xbec38c===_0x42a343(0x12d)?_0x42a343(0x12d):_0x42a343(0x13d),'task':_0x3e980e[_0x42a343(0x173)](0x0,0xc8),'output':_0x3e980e});return{'content':[{'type':'text','text':JSON[_0x42a343(0x13f)](_0xea060a)}]};}if(_0x2da5f8==='commhub_report_status'){let {status:_0x47fac5,task:_0x3f6529,progress:_0x24c30c}=_0x46f44d,_0x400597=await P(_0x42a343(0x112),{'resume_id':w,'alias':Z,'status':_0x47fac5,'task':_0x3f6529,'progress':_0x24c30c});return{'content':[{'type':_0x42a343(0x151),'text':JSON['stringify'](_0x400597)}]};}if(_0x2da5f8==='commhub_send_task'){let {alias:_0x1ffbc1,task:_0x23c88a,priority:_0x4af3d2}=_0x46f44d,_0x303055=await P(_0x42a343(0x152),{'alias':_0x1ffbc1,'task':_0x23c88a,'priority':_0x4af3d2||_0x42a343(0x13e),'from_session':Z});return{'content':[{'type':_0x42a343(0x151),'text':JSON[_0x42a343(0x13f)](_0x303055)}]};}if(_0x2da5f8===_0x42a343(0x10c)){let {alias:_0xa67442,message:_0x41c79d}=_0x46f44d,_0x1544be=await P('send_message',{'alias':_0xa67442,'message':_0x41c79d,'from_session':Z});return{'content':[{'type':_0x42a343(0x151),'text':JSON[_0x42a343(0x13f)](_0x1544be)}]};}if(_0x2da5f8==='commhub_get_all_status'){let _0x544f9d=await P(_0x42a343(0x103),{});return{'content':[{'type':_0x42a343(0x151),'text':JSON['stringify'](_0x544f9d)}]};}return{'content':[{'type':_0x42a343(0x151),'text':JSON[_0x42a343(0x13f)]({'error':_0x42a343(0x122)})}]};});async function v(){const _0x8ff8d8=a0_0x8f5148;let _0x2e684a=D+_0x8ff8d8(0x17c)+encodeURIComponent(Z),_0x19d823={};if(X)_0x19d823[_0x8ff8d8(0x139)]=_0x8ff8d8(0x16b)+X;Y(_0x8ff8d8(0x170)+_0x2e684a);while(!0x0){try{let _0x5bbe46=await fetch(_0x2e684a,{'headers':_0x19d823});if(!_0x5bbe46['ok']){Y(_0x8ff8d8(0x168)+_0x5bbe46[_0x8ff8d8(0x124)]+'\x20'+_0x5bbe46[_0x8ff8d8(0x16d)]),await h(0x1388);continue;}let _0x11b1b0=_0x5bbe46[_0x8ff8d8(0x143)][_0x8ff8d8(0x12f)](),_0xbe5f7f=new TextDecoder(),_0x361922='';while(!0x0){let {done:_0x33f4d7,value:_0x5d6d7b}=await _0x11b1b0['read']();if(_0x33f4d7)break;_0x361922+=_0xbe5f7f[_0x8ff8d8(0x164)](_0x5d6d7b,{'stream':!0x0});let _0x4ce829=_0x361922[_0x8ff8d8(0x134)]('\x0a\x0a');_0x361922=_0x4ce829[_0x8ff8d8(0x135)]()||'';for(let _0x56ac56 of _0x4ce829){let _0x4fdd73=_0x56ac56['split']('\x0a')[_0x8ff8d8(0x174)](_0x5db761=>_0x5db761['startsWith'](_0x8ff8d8(0x107)));if(!_0x4fdd73)continue;try{let _0x31d00e=JSON[_0x8ff8d8(0x136)](_0x4fdd73[_0x8ff8d8(0x173)](0x6));await u(_0x31d00e);}catch(_0x51b953){Y(_0x8ff8d8(0x157)+_0x51b953);}}}Y(_0x8ff8d8(0x111));}catch(_0x51034f){Y(_0x8ff8d8(0x13a)+_0x51034f);}await h(0xbb8);}}async function u(_0x22e2a6){const _0x36ec29=a0_0x8f5148;if(_0x22e2a6[_0x36ec29(0x130)]===_0x36ec29(0x106)){Y(_0x36ec29(0x125)+Z+'\x22');return;}if(_0x22e2a6[_0x36ec29(0x130)]==='new_message'){if(Y(_0x36ec29(0x13b)+_0x22e2a6['from']+':\x20'+_0x22e2a6[_0x36ec29(0x15c)][_0x36ec29(0x173)](0x0,0x3c)),await K[_0x36ec29(0x14a)]({'method':'notifications/claude/channel','params':{'content':_0x22e2a6['message'],'meta':{'sender':_0x22e2a6[_0x36ec29(0x10a)]||_0x36ec29(0x172),'sender_id':_0x36ec29(0x123),'user':_0x22e2a6['from']||'hub','priority':_0x36ec29(0x13e)}}}),_0x22e2a6[_0x36ec29(0x126)])await P(_0x36ec29(0x183),{'alias':Z,'message_id':_0x22e2a6['message_id']});return;}if(_0x22e2a6[_0x36ec29(0x130)]===_0x36ec29(0x11a)||_0x22e2a6[_0x36ec29(0x130)]==='broadcast'){Y('←\x20'+_0x22e2a6[_0x36ec29(0x130)]+_0x36ec29(0x148)+_0x22e2a6['inbox_count']+_0x36ec29(0x14e)+(_0x22e2a6[_0x36ec29(0x167)]||_0x36ec29(0x13e)));let _0x3ff92e=await P(_0x36ec29(0x11d),{'alias':Z,'limit':0x5});if(_0x3ff92e?.['ok']&&_0x3ff92e['messages']?.[_0x36ec29(0x16a)]>0x0)for(let _0x318742 of _0x3ff92e[_0x36ec29(0x101)]){let _0x18ee95={'sender':_0x318742['from_session']||_0x36ec29(0x172),'sender_id':_0x36ec29(0x123),'user':_0x318742[_0x36ec29(0x14c)]||'hub','task_id':_0x318742['id'],'priority':_0x318742[_0x36ec29(0x167)]||_0x36ec29(0x13e)};k['set'](_0x318742['id'],_0x318742[_0x36ec29(0x14c)]||'hub'),await K['notification']({'method':'notifications/claude/channel','params':{'content':_0x318742[_0x36ec29(0x12a)],'meta':_0x18ee95}}),Y(_0x36ec29(0x133)+_0x318742['id'][_0x36ec29(0x173)](0x0,0x8)+_0x36ec29(0x184)+_0x318742[_0x36ec29(0x14c)]+':\x20'+_0x318742[_0x36ec29(0x12a)][_0x36ec29(0x173)](0x0,0x3c)),await P(_0x36ec29(0x183),{'alias':Z,'message_id':_0x318742['id']});}}}async function S(){const _0x2e29e2=a0_0x8f5148;let _0x1ff477=new a0_0x31bc95();await K[_0x2e29e2(0x15d)](_0x1ff477),Y('MCP\x20stdio\x20connected'),Y('starting\x20SSE\x20listener...'),v()[_0x2e29e2(0x121)](_0xb7d3ee=>Y(_0x2e29e2(0x16f)+_0xb7d3ee)),P(_0x2e29e2(0x112),{'resume_id':w,'alias':Z,'status':_0x2e29e2(0x162),'server':a0_0x5a5035(),'hostname':a0_0x5a5035(),'agent':_0x2e29e2(0x115),'project_dir':process['cwd'](),'tmux_name':f||void 0x0})['then'](()=>Y(_0x2e29e2(0x120)+Z+_0x2e29e2(0x10f)+w[_0x2e29e2(0x173)](0x0,0x8)+')'))[_0x2e29e2(0x121)](_0x5edfe7=>Y(_0x2e29e2(0x144)+_0x5edfe7)),setInterval(()=>{const _0x2f0fc4=_0x2e29e2;P(_0x2f0fc4(0x112),{'resume_id':w,'alias':Z,'status':_0x2f0fc4(0x162),'server':a0_0x5a5035(),'hostname':a0_0x5a5035(),'agent':_0x2f0fc4(0x115),'project_dir':process[_0x2f0fc4(0x163)](),'tmux_name':f||void 0x0})[_0x2f0fc4(0x121)](_0x551feb=>Y(_0x2f0fc4(0x165)+_0x551feb));},0x2bf20),Y('ready\x20—\x20waiting\x20for\x20events');}S()[a0_0x8f5148(0x121)](_0x23a8c0=>{const _0x50c420=a0_0x8f5148;Y(_0x50c420(0x182)+_0x23a8c0),process['exit'](0x1);});async function N(){const _0x5f35a5=a0_0x8f5148;Y(_0x5f35a5(0x153)),await P(_0x5f35a5(0x112),{'resume_id':w,'alias':Z,'status':_0x5f35a5(0x12d),'task':_0x5f35a5(0x114)})['catch'](()=>{}),process[_0x5f35a5(0x129)](0x0);}process['stdin']['on'](a0_0x8f5148(0x10b),()=>N()),process['on'](a0_0x8f5148(0x150),()=>N()),process['on'](a0_0x8f5148(0x155),()=>N());
2
+ const a0_0x54f95f=a0_0x5af3;(function(_0x425861,_0x1ac91b){const _0x2d5160=a0_0x5af3,_0x11631b=_0x425861();while(!![]){try{const _0x5b1d02=-parseInt(_0x2d5160(0x18c))/0x1*(parseInt(_0x2d5160(0x197))/0x2)+-parseInt(_0x2d5160(0x1a2))/0x3+-parseInt(_0x2d5160(0x14b))/0x4*(-parseInt(_0x2d5160(0x151))/0x5)+-parseInt(_0x2d5160(0x115))/0x6+parseInt(_0x2d5160(0x15b))/0x7*(-parseInt(_0x2d5160(0x14f))/0x8)+parseInt(_0x2d5160(0x179))/0x9+parseInt(_0x2d5160(0x18b))/0xa;if(_0x5b1d02===_0x1ac91b)break;else _0x11631b['push'](_0x11631b['shift']());}catch(_0x331a89){_0x11631b['push'](_0x11631b['shift']());}}}(a0_0x271b,0x9163c));function a0_0x271b(){const _0x625567=['priority','3695178hoOOKy','\x20CWD=','from','Message\x20content','Bearer\x20','Messages\x20from\x20CommHub\x20arrive\x20as\x20<channel\x20source=\x22commhub\x22\x20task_id=\x22...\x22\x20priority=\x22...\x22\x20from=\x22...\x22>','0.3.0','Target\x20session\x20alias','parse\x20error:\x20','stderr','connect','\x20priority=','string','Session\x20alias:\x20','none','startsWith','utf-8','/mcp','The\x20task_id\x20from\x20the\x20channel\x20message\x20(or\x20\x27hub\x27\x20for\x20general)','parse',']\x20[commhub]\x20','hub','\x22\x20(','\x20PROJECT_ENV=','failed','getReader','join','error','cwd','\x20RESUME_ID=','Reply\x20text\x20/\x20result\x20summary','SSE\x20fatal:\x20','stringify','\x20ALIAS=','Send\x20a\x20task\x20to\x20another\x20session\x20via\x20CommHub.','cancelled','messages','alias','low','Update\x20this\x20session\x27s\x20status\x20in\x20CommHub\x20(working/idle/blocked/error).\x20Returns\x20inbox_count.','params','commhub-channel','application/json,\x20text/event-stream','idle','starting\x20SSE\x20listener...','exit','stdin','Authorization','tools/call','application/json','Get\x20status\x20of\x20all\x20sessions\x20from\x20CommHub.','content','.anet','initialize','8MowhWp','high','randomUUID','registered\x20as\x20\x22','184tuyrTC','CommHub\x20init\x20failed:\x20','779605xJKgUD','pop','ack_inbox','send_reply','result','send_task','split','completed','Reply\x20using\x20the\x20commhub_reply\x20tool\x20to\x20report\x20status\x20or\x20results\x20back.','notifications/claude/channel','254667sKHsxX','...\x20TMUX=','commhub_send_message','commhub_report_status','/events/','task','slice','broadcast','status','message','type','unknown\x20tool','.env','set','data:\x20','commhub','2.0','read','tmux\x20display-message\x20-p\x20\x27#S\x27','get_inbox','blocked','Priority\x20(default:\x20normal)','http://127.0.0.1:9200','object','length','delete','working','MCP\x20stdio\x20connected','text','POST','986598qqLdyS','commhub_get_all_status','trim','replied','claude-code','message_id','←\x20message\x20from\x20','end','init\x20failed:\x20','send_message','session\x20disconnected','SIGTERM','Current\x20task\x20description','Task\x20content','connecting\x20to\x20','Task\x20outcome:\x20completed/failed/cancelled\x20for\x20final\x20results,\x20blocked/error/in_progress\x20for\x20status\x20updates','new_message','shutting\x20down,\x20reporting\x20offline...','35473560NrDfch','53637WSWXMM','then','find','config.json','report_status','from_session','notification','no\x20response',':\x20inbox_count=','statusText','2025-03-26','38eJOous','commhub_send_task','catch','get','ready\x20—\x20waiting\x20for\x20events','You\x20can\x20also\x20use\x20commhub_report_status\x20to\x20update\x20your\x20session\x20status.','indexOf','replace','get_all_status','normal','Send\x20a\x20message\x20to\x20another\x20session\x20(no\x20task\x20lifecycle,\x20just\x20chat).\x20Use\x20for\x20replies\x20and\x20status\x20updates.','2704725sisXVE'];a0_0x271b=function(){return _0x625567;};return a0_0x271b();}import{readFileSync as a0_0xe313af,existsSync as a0_0x25cc30}from'fs';import{join as a0_0x367a9a}from'path';import{hostname as a0_0x5709eb}from'os';import{execSync as a0_0x192a50}from'child_process';import{Server as a0_0x4669a4}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport as a0_0x2beaa6}from'@modelcontextprotocol/sdk/server/stdio.js';import{ListToolsRequestSchema as a0_0x399dbc,CallToolRequestSchema as a0_0x48b151}from'@modelcontextprotocol/sdk/types.js';function p(_0x1f5c31){const _0x1dcd1f=a0_0x5af3;if(!a0_0x25cc30(_0x1f5c31))return;for(let _0x56beaa of a0_0xe313af(_0x1f5c31,_0x1dcd1f(0x125))[_0x1dcd1f(0x157)]('\x0a')){let _0x15b0bf=_0x56beaa['trim']();if(!_0x15b0bf||_0x15b0bf['startsWith']('#'))continue;let _0x340e83=_0x15b0bf[_0x1dcd1f(0x19d)]('=');if(_0x340e83<0x0)continue;let _0x489fd8=_0x15b0bf['slice'](0x0,_0x340e83)[_0x1dcd1f(0x17b)](),_0x35e71e=_0x15b0bf[_0x1dcd1f(0x161)](_0x340e83+0x1)[_0x1dcd1f(0x17b)]()[_0x1dcd1f(0x19e)](/^["']|["']$/g,'');if(!process.env[_0x489fd8])process.env[_0x489fd8]=_0x35e71e;}}var C=process.env.HOME||'~',T=a0_0x367a9a(C,'.claude/channels/commhub');p(a0_0x367a9a(T,a0_0x54f95f(0x167)));var L=process[a0_0x54f95f(0x131)]()['replace'](/\//g,'-');p(a0_0x367a9a(T,L,a0_0x54f95f(0x167)));function U(){const _0x236a55=a0_0x54f95f;try{return a0_0x192a50(_0x236a55(0x16d),{'encoding':'utf-8','timeout':0x7d0})[_0x236a55(0x17b)]();}catch{return'';}}function c(){const _0x4ff9ee=a0_0x54f95f;try{let _0x4bd9b3=a0_0x367a9a(C,_0x4ff9ee(0x149),_0x4ff9ee(0x18f));if(a0_0x25cc30(_0x4bd9b3))return JSON[_0x4ff9ee(0x128)](a0_0xe313af(_0x4bd9b3,'utf-8'));}catch{}return{};}var H=c(),D=process.env.COMMHUB_URL||H[a0_0x54f95f(0x12a)]||a0_0x54f95f(0x171),f=process.env.COMMHUB_TMUX||U(),Z=process.env.COMMHUB_ALIAS||f||a0_0x5709eb(),w=process.env.COMMHUB_RESUME_ID||process.env.CLAUDE_RESUME_ID||crypto[a0_0x54f95f(0x14d)](),X=process.env.COMMHUB_TOKEN||H['token']||'';function Y(_0x2b4e3f){const _0x220ca7=a0_0x54f95f;let _0x1aa7d8=new Date()['toTimeString']()['slice'](0x0,0x8);process[_0x220ca7(0x11e)]['write']('['+_0x1aa7d8+_0x220ca7(0x129)+_0x2b4e3f+'\x0a');}function h(_0x29a988){return new Promise(_0x32952f=>setTimeout(_0x32952f,_0x29a988));}Y('ENV:\x20URL='+D+a0_0x54f95f(0x136)+Z+a0_0x54f95f(0x132)+w[a0_0x54f95f(0x161)](0x0,0x8)+a0_0x54f95f(0x15c)+(f||a0_0x54f95f(0x123))+a0_0x54f95f(0x116)+process[a0_0x54f95f(0x131)]()+a0_0x54f95f(0x12c)+L);var k=new Map(),K=new a0_0x4669a4({'name':a0_0x54f95f(0x13e),'version':a0_0x54f95f(0x11b)},{'capabilities':{'experimental':{'claude/channel':{}},'tools':{}},'instructions':[a0_0x54f95f(0x11a),'These\x20are\x20tasks\x20dispatched\x20by\x20the\x20hub\x20or\x20other\x20sessions\x20via\x20the\x20CommHub\x20Server.',a0_0x54f95f(0x159),a0_0x54f95f(0x19c),a0_0x54f95f(0x122)+Z][a0_0x54f95f(0x12f)]('\x0a')});K['setRequestHandler'](a0_0x399dbc,async()=>({'tools':[{'name':'commhub_reply','description':'Reply\x20to\x20a\x20CommHub\x20task\x20—\x20report\x20completion\x20or\x20send\x20a\x20message\x20back\x20to\x20the\x20hub.','inputSchema':{'type':a0_0x54f95f(0x172),'properties':{'task_id':{'type':'string','description':a0_0x54f95f(0x127)},'text':{'type':a0_0x54f95f(0x121),'description':a0_0x54f95f(0x133)},'status':{'type':a0_0x54f95f(0x121),'enum':[a0_0x54f95f(0x158),'failed',a0_0x54f95f(0x138),'blocked','error','in_progress'],'description':a0_0x54f95f(0x188)}},'required':[a0_0x54f95f(0x177)]}},{'name':'commhub_report_status','description':a0_0x54f95f(0x13c),'inputSchema':{'type':a0_0x54f95f(0x172),'properties':{'status':{'type':a0_0x54f95f(0x121),'enum':['working','idle',a0_0x54f95f(0x16f),'error']},'task':{'type':'string','description':a0_0x54f95f(0x185)},'progress':{'type':'number','description':'Progress\x200-100'}},'required':['status']}},{'name':'commhub_send_task','description':a0_0x54f95f(0x137),'inputSchema':{'type':a0_0x54f95f(0x172),'properties':{'alias':{'type':'string','description':a0_0x54f95f(0x11c)},'task':{'type':a0_0x54f95f(0x121),'description':a0_0x54f95f(0x186)},'priority':{'type':a0_0x54f95f(0x121),'enum':[a0_0x54f95f(0x14c),'normal',a0_0x54f95f(0x13b)],'description':a0_0x54f95f(0x170)}},'required':[a0_0x54f95f(0x13a),a0_0x54f95f(0x160)]}},{'name':'commhub_send_message','description':a0_0x54f95f(0x1a1),'inputSchema':{'type':'object','properties':{'alias':{'type':'string','description':a0_0x54f95f(0x11c)},'message':{'type':'string','description':a0_0x54f95f(0x118)}},'required':[a0_0x54f95f(0x13a),'message']}},{'name':a0_0x54f95f(0x17a),'description':a0_0x54f95f(0x147),'inputSchema':{'type':a0_0x54f95f(0x172),'properties':{}}}]}));async function P(_0x47753d,_0x4e6d2d){const _0x33dabe=a0_0x54f95f;let _0x20a4d6=await fetch(D+_0x33dabe(0x126),{'method':_0x33dabe(0x178),'headers':{'Content-Type':_0x33dabe(0x146),'Accept':_0x33dabe(0x13f),...X?{'Authorization':_0x33dabe(0x119)+X}:{}},'body':JSON[_0x33dabe(0x135)]({'jsonrpc':_0x33dabe(0x16b),'id':0x1,'method':_0x33dabe(0x14a),'params':{'protocolVersion':_0x33dabe(0x196),'capabilities':{},'clientInfo':{'name':_0x33dabe(0x13e),'version':_0x33dabe(0x11b)}}})});if(!_0x20a4d6['ok']){let _0x176c96=await _0x20a4d6[_0x33dabe(0x177)]();return Y(_0x33dabe(0x150)+_0x20a4d6[_0x33dabe(0x163)]+'\x20'+_0x176c96[_0x33dabe(0x161)](0x0,0x64)),{'ok':!0x1,'error':_0x33dabe(0x181)+_0x20a4d6['status']};}await _0x20a4d6['text']();let _0x40c4d3=(await(await fetch(D+_0x33dabe(0x126),{'method':_0x33dabe(0x178),'headers':{'Content-Type':'application/json','Accept':_0x33dabe(0x13f),...X?{'Authorization':_0x33dabe(0x119)+X}:{}},'body':JSON[_0x33dabe(0x135)]({'jsonrpc':_0x33dabe(0x16b),'id':0x2,'method':_0x33dabe(0x145),'params':{'name':_0x47753d,'arguments':_0x4e6d2d}})}))[_0x33dabe(0x177)]())[_0x33dabe(0x157)]('\x0a')['find'](_0x20145a=>_0x20145a[_0x33dabe(0x124)](_0x33dabe(0x169)));if(_0x40c4d3){let _0x1dbbe1=JSON[_0x33dabe(0x128)](_0x40c4d3['slice'](0x6));return _0x1dbbe1?.[_0x33dabe(0x155)]?.[_0x33dabe(0x148)]?.[0x0]?.[_0x33dabe(0x177)]?JSON[_0x33dabe(0x128)](_0x1dbbe1['result'][_0x33dabe(0x148)][0x0][_0x33dabe(0x177)]):_0x1dbbe1;}return{'ok':!0x1,'error':_0x33dabe(0x193)};}K['setRequestHandler'](a0_0x48b151,async _0x58eb4c=>{const _0x568439=a0_0x54f95f;let {name:_0x28fb7d,arguments:_0x40f39b}=_0x58eb4c[_0x568439(0x13d)];if(_0x28fb7d==='commhub_reply'){let {task_id:_0x2d0664,text:_0x2b3eb3,status:_0xbce3a2}=_0x40f39b;if(_0xbce3a2===_0x568439(0x158)||_0xbce3a2===_0x568439(0x12d)||_0xbce3a2==='cancelled'){let _0x3d97a9=_0xbce3a2==='completed'?_0x568439(0x17c):_0xbce3a2,_0x3116f0=_0x2d0664?k[_0x568439(0x19a)](_0x2d0664)||_0x568439(0x12a):_0x568439(0x12a),_0x2ab890=await P(_0x568439(0x154),{'alias':_0x3116f0,'text':_0x2b3eb3,'in_reply_to':_0x2d0664||void 0x0,'status':_0x3d97a9,'from_session':Z});if(_0x2d0664)k[_0x568439(0x174)](_0x2d0664);return{'content':[{'type':_0x568439(0x177),'text':JSON['stringify'](_0x2ab890)}]};}let _0x26961c=await P(_0x568439(0x190),{'resume_id':w,'alias':Z,'status':_0xbce3a2===_0x568439(0x16f)?_0x568439(0x16f):_0xbce3a2===_0x568439(0x130)?_0x568439(0x130):_0x568439(0x175),'task':_0x2b3eb3[_0x568439(0x161)](0x0,0xc8),'output':_0x2b3eb3});return{'content':[{'type':_0x568439(0x177),'text':JSON[_0x568439(0x135)](_0x26961c)}]};}if(_0x28fb7d===_0x568439(0x15e)){let {status:_0x277eae,task:_0x267834,progress:_0x4db7e2}=_0x40f39b,_0x26d756=await P(_0x568439(0x190),{'resume_id':w,'alias':Z,'status':_0x277eae,'task':_0x267834,'progress':_0x4db7e2});return{'content':[{'type':_0x568439(0x177),'text':JSON[_0x568439(0x135)](_0x26d756)}]};}if(_0x28fb7d===_0x568439(0x198)){let {alias:_0x4f4c26,task:_0x1a6fa9,priority:_0x267121}=_0x40f39b,_0x202249=await P(_0x568439(0x156),{'alias':_0x4f4c26,'task':_0x1a6fa9,'priority':_0x267121||'normal','from_session':Z});return{'content':[{'type':_0x568439(0x177),'text':JSON[_0x568439(0x135)](_0x202249)}]};}if(_0x28fb7d===_0x568439(0x15d)){let {alias:_0x397ea8,message:_0x56b5b1}=_0x40f39b,_0x253a3f=await P(_0x568439(0x182),{'alias':_0x397ea8,'message':_0x56b5b1,'from_session':Z});return{'content':[{'type':'text','text':JSON[_0x568439(0x135)](_0x253a3f)}]};}if(_0x28fb7d===_0x568439(0x17a)){let _0x2bf94d=await P(_0x568439(0x19f),{});return{'content':[{'type':'text','text':JSON['stringify'](_0x2bf94d)}]};}return{'content':[{'type':_0x568439(0x177),'text':JSON['stringify']({'error':_0x568439(0x166)})}]};});function a0_0x5af3(_0x200c5f,_0x11040c){_0x200c5f=_0x200c5f-0x115;const _0x271b34=a0_0x271b();let _0x5af3a1=_0x271b34[_0x200c5f];return _0x5af3a1;}async function v(){const _0x1f3f6e=a0_0x54f95f;let _0xd0b38d=D+_0x1f3f6e(0x15f)+encodeURIComponent(Z),_0x3d2a8f={};if(X)_0x3d2a8f[_0x1f3f6e(0x144)]=_0x1f3f6e(0x119)+X;Y(_0x1f3f6e(0x187)+_0xd0b38d);while(!0x0){try{let _0x333af8=await fetch(_0xd0b38d,{'headers':_0x3d2a8f});if(!_0x333af8['ok']){Y('SSE\x20error:\x20'+_0x333af8[_0x1f3f6e(0x163)]+'\x20'+_0x333af8[_0x1f3f6e(0x195)]),await h(0x1388);continue;}let _0x4347a2=_0x333af8['body'][_0x1f3f6e(0x12e)](),_0x5d0da7=new TextDecoder(),_0x10cee2='';while(!0x0){let {done:_0x392c5d,value:_0x26845f}=await _0x4347a2[_0x1f3f6e(0x16c)]();if(_0x392c5d)break;_0x10cee2+=_0x5d0da7['decode'](_0x26845f,{'stream':!0x0});let _0x4badc5=_0x10cee2[_0x1f3f6e(0x157)]('\x0a\x0a');_0x10cee2=_0x4badc5[_0x1f3f6e(0x152)]()||'';for(let _0x149d31 of _0x4badc5){let _0x3b21e4=_0x149d31['split']('\x0a')[_0x1f3f6e(0x18e)](_0x2878d5=>_0x2878d5[_0x1f3f6e(0x124)](_0x1f3f6e(0x169)));if(!_0x3b21e4)continue;try{let _0x5c2dae=JSON['parse'](_0x3b21e4[_0x1f3f6e(0x161)](0x6));await u(_0x5c2dae);}catch(_0x533e0f){Y(_0x1f3f6e(0x11d)+_0x533e0f);}}}Y('SSE\x20stream\x20ended,\x20reconnecting...');}catch(_0x2bc6a6){Y('SSE\x20connection\x20error:\x20'+_0x2bc6a6);}await h(0xbb8);}}async function u(_0x393fbf){const _0xc2091f=a0_0x54f95f;if(_0x393fbf[_0xc2091f(0x165)]==='connected'){Y('SSE\x20connected\x20as\x20\x22'+Z+'\x22');return;}if(_0x393fbf[_0xc2091f(0x165)]===_0xc2091f(0x189)){if(Y(_0xc2091f(0x17f)+_0x393fbf['from']+':\x20'+_0x393fbf[_0xc2091f(0x164)][_0xc2091f(0x161)](0x0,0x3c)),await K[_0xc2091f(0x192)]({'method':_0xc2091f(0x15a),'params':{'content':_0x393fbf[_0xc2091f(0x164)],'meta':{'sender':_0x393fbf[_0xc2091f(0x117)]||_0xc2091f(0x12a),'sender_id':'commhub','user':_0x393fbf[_0xc2091f(0x117)]||_0xc2091f(0x12a),'priority':_0xc2091f(0x1a0)}}}),_0x393fbf[_0xc2091f(0x17e)])await P(_0xc2091f(0x153),{'alias':Z,'message_id':_0x393fbf[_0xc2091f(0x17e)]});return;}if(_0x393fbf[_0xc2091f(0x165)]==='new_task'||_0x393fbf[_0xc2091f(0x165)]===_0xc2091f(0x162)){Y('←\x20'+_0x393fbf['type']+_0xc2091f(0x194)+_0x393fbf['inbox_count']+_0xc2091f(0x120)+(_0x393fbf['priority']||'normal'));let _0x2d3cb1=await P(_0xc2091f(0x16e),{'alias':Z,'limit':0x5});if(_0x2d3cb1?.['ok']&&_0x2d3cb1[_0xc2091f(0x139)]?.[_0xc2091f(0x173)]>0x0)for(let _0x2308f2 of _0x2d3cb1[_0xc2091f(0x139)]){let _0x387626={'sender':_0x2308f2[_0xc2091f(0x191)]||_0xc2091f(0x12a),'sender_id':_0xc2091f(0x16a),'user':_0x2308f2[_0xc2091f(0x191)]||_0xc2091f(0x12a),'task_id':_0x2308f2['id'],'priority':_0x2308f2[_0xc2091f(0x1a3)]||_0xc2091f(0x1a0)};k[_0xc2091f(0x168)](_0x2308f2['id'],_0x2308f2[_0xc2091f(0x191)]||_0xc2091f(0x12a)),await K[_0xc2091f(0x192)]({'method':_0xc2091f(0x15a),'params':{'content':_0x2308f2[_0xc2091f(0x148)],'meta':_0x387626}}),Y('→\x20injected\x20task\x20'+_0x2308f2['id']['slice'](0x0,0x8)+'\x20from\x20'+_0x2308f2[_0xc2091f(0x191)]+':\x20'+_0x2308f2['content'][_0xc2091f(0x161)](0x0,0x3c)),await P(_0xc2091f(0x153),{'alias':Z,'message_id':_0x2308f2['id']});}}}async function S(){const _0x550231=a0_0x54f95f;let _0x58c6bb=new a0_0x2beaa6();await K[_0x550231(0x11f)](_0x58c6bb),Y(_0x550231(0x176)),Y(_0x550231(0x141)),v()[_0x550231(0x199)](_0x34c594=>Y(_0x550231(0x134)+_0x34c594)),P('report_status',{'resume_id':w,'alias':Z,'status':'idle','server':a0_0x5709eb(),'hostname':a0_0x5709eb(),'agent':_0x550231(0x17d),'project_dir':process['cwd'](),'tmux_name':f||void 0x0})[_0x550231(0x18d)](()=>Y(_0x550231(0x14e)+Z+_0x550231(0x12b)+w[_0x550231(0x161)](0x0,0x8)+')'))[_0x550231(0x199)](_0x2eca98=>Y('warning:\x20could\x20not\x20register:\x20'+_0x2eca98)),setInterval(()=>{const _0x1366ca=_0x550231;P('report_status',{'resume_id':w,'alias':Z,'status':_0x1366ca(0x140),'server':a0_0x5709eb(),'hostname':a0_0x5709eb(),'agent':'claude-code','project_dir':process['cwd'](),'tmux_name':f||void 0x0})['catch'](_0x14c5a3=>Y('heartbeat\x20failed:\x20'+_0x14c5a3));},0x2bf20),Y(_0x550231(0x19b));}S()[a0_0x54f95f(0x199)](_0x450ea0=>{const _0x1e74f1=a0_0x54f95f;Y('fatal:\x20'+_0x450ea0),process[_0x1e74f1(0x142)](0x1);});async function N(){const _0x307e52=a0_0x54f95f;Y(_0x307e52(0x18a)),await P(_0x307e52(0x190),{'resume_id':w,'alias':Z,'status':_0x307e52(0x130),'task':_0x307e52(0x183)})[_0x307e52(0x199)](()=>{}),process[_0x307e52(0x142)](0x0);}process[a0_0x54f95f(0x143)]['on'](a0_0x54f95f(0x180),()=>N()),process['on'](a0_0x54f95f(0x184),()=>N()),process['on']('SIGINT',()=>N());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleep2agi/agent-network",
3
- "version": "2.0.0-preview.62",
3
+ "version": "2.0.0-preview.63",
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",