@sleep2agi/agent-network 2.3.0-preview.25 → 2.3.0-preview.27

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,2 +1,2 @@
1
1
  #!/usr/bin/env bun
2
- const a0_0x587abe=a0_0x51e5;(function(_0x3e5928,_0x47b6eb){const _0x4b89ce=a0_0x51e5,_0x3a517f=_0x3e5928();while(!![]){try{const _0x1fbb40=-parseInt(_0x4b89ce(0x1ee))/0x1*(parseInt(_0x4b89ce(0x21d))/0x2)+parseInt(_0x4b89ce(0x236))/0x3*(-parseInt(_0x4b89ce(0x27f))/0x4)+parseInt(_0x4b89ce(0x1f8))/0x5+-parseInt(_0x4b89ce(0x20c))/0x6+parseInt(_0x4b89ce(0x287))/0x7+parseInt(_0x4b89ce(0x264))/0x8+-parseInt(_0x4b89ce(0x265))/0x9*(-parseInt(_0x4b89ce(0x270))/0xa);if(_0x1fbb40===_0x47b6eb)break;else _0x3a517f['push'](_0x3a517f['shift']());}catch(_0x4dd588){_0x3a517f['push'](_0x3a517f['shift']());}}}(a0_0x38d9,0xa3aa9));import{readFileSync as a0_0x4a71cf,existsSync as a0_0x5298bd}from'fs';import{randomUUID as a0_0x102173}from'crypto';function a0_0x51e5(_0x29aee7,_0x39e586){_0x29aee7=_0x29aee7-0x1e3;const _0x38d960=a0_0x38d9();let _0x51e569=_0x38d960[_0x29aee7];return _0x51e569;}import{join as a0_0x5b0fb5}from'path';import{hostname as a0_0x162e43}from'os';import{execSync as a0_0xc90d0}from'child_process';function B(_0x1e96b6){const _0x1327a2=a0_0x51e5;let _0x5f44f5=_0x1e96b6[_0x1327a2(0x257)](/[^a-zA-Z0-9\-_]/g,'-');return _0x5f44f5===''?_0x1327a2(0x209):_0x5f44f5;}import{Server as a0_0x4cdf5a}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport as a0_0x9ca236}from'@modelcontextprotocol/sdk/server/stdio.js';import{ListToolsRequestSchema as a0_0x466cbe,CallToolRequestSchema as a0_0x58e28e}from'@modelcontextprotocol/sdk/types.js';function T(_0x37698c){const _0x35b6d9=a0_0x51e5;if(!a0_0x5298bd(_0x37698c))return;for(let _0x5c0970 of a0_0x4a71cf(_0x37698c,_0x35b6d9(0x1fc))[_0x35b6d9(0x23d)]('\x0a')){let _0x51e593=_0x5c0970['trim']();if(!_0x51e593||_0x51e593[_0x35b6d9(0x250)]('#'))continue;let _0x3af32e=_0x51e593[_0x35b6d9(0x20e)]('=');if(_0x3af32e<0x0)continue;let _0x518ac5=_0x51e593[_0x35b6d9(0x281)](0x0,_0x3af32e)[_0x35b6d9(0x280)](),_0x2f4e5d=_0x51e593[_0x35b6d9(0x281)](_0x3af32e+0x1)[_0x35b6d9(0x280)]()[_0x35b6d9(0x257)](/^["']|["']$/g,'');if(!process.env[_0x518ac5])process.env[_0x518ac5]=_0x2f4e5d;}}var C=process.env.HOME||'~',r=a0_0x5b0fb5(C,a0_0x587abe(0x20f));T(a0_0x5b0fb5(r,a0_0x587abe(0x224)));var H=B(process[a0_0x587abe(0x222)]());T(a0_0x5b0fb5(r,H,'.env'));function a0_0x38d9(){const _0x432e86=['heartbeat\x20failed:\x20','none','SSE\x20fatal:\x20','object','Session\x20alias:\x20','offline','normal','get_inbox','Current\x20task\x20description','commhub_reply','replied','0.3.0','hub','startsWith','idle','SSE\x20connection\x20error:\x20','cancelled','send_reply','connected','blocked','replace','unknown\x20tool','notification','SSE\x20连续\x20>1h\x20连不上\x20hub\x20(','pop','warning:\x20could\x20not\x20register:\x20','Messages\x20from\x20CommHub\x20arrive\x20as\x20<channel\x20source=\x22commhub\x22\x20task_id=\x22...\x22\x20priority=\x22...\x22\x20from=\x22...\x22>','SIGTERM','parse','Reply\x20to\x20a\x20CommHub\x20task\x20—\x20report\x20completion\x20or\x20send\x20a\x20message\x20back\x20to\x20the\x20hub.','tmux\x20display-message\x20-p\x20\x27#S\x27','new_task','ready\x20—\x20waiting\x20for\x20events','2285512MbfoQA','14840361MlVvOH','\x20ALIAS=','→\x20injected\x20task\x20','Bearer\x20','re-registered\x20as\x20\x22','data:\x20','ENV:\x20URL=','task','Target\x20session\x20alias','SIGINT','re-register\x20failed:\x20','10nysabP','content','.anet','function','stringify','claude-code','length','new_message','no\x20response','params','fatal:\x20','kill','Get\x20status\x20of\x20all\x20sessions\x20from\x20CommHub.','send_message','You\x20can\x20also\x20use\x20commhub_report_status\x20to\x20update\x20your\x20session\x20status.','4184fBtlPa','trim','slice','broadcast','would\x20mis-attribute.\x20Refusing\x20to\x20guess\x20from\x20TMUX_NAME=','POST','registered\x20as\x20\x22','exit','5304012LEPUsW','ppid','session\x20disconnected','min','stderr','connect','MCP\x20stdio\x20connected','\x20priority=','inbox_count','working','CommHub\x20init\x20failed:\x20','from_session','\x22\x20after\x20SSE\x20reconnect','...\x20TMUX=','10042VDKiiN','http://127.0.0.1:9200','number','commhub_report_status','[commhub]\x20WARN:\x20COMMHUB_ALIAS\x20env\x20var\x20is\x20unset\x20—\x20outbound\x20from_session\x20',')\x20—\x20放弃自动重连。手动\x20anet\x20node\x20start\x20恢复。','string','from','error','Task\x20content','1125260QUkZvL','code','application/json,\x20text/event-stream','join','utf-8','decode','notifications/claude/channel','result','SSE\x20connected\x20as\x20\x22','/mcp','parent\x20claude\x20pid=','now','find','commhub-channel','status','SSE\x20error:\x20','The\x20task_id\x20from\x20the\x20channel\x20message\x20(or\x20\x27hub\x27\x20for\x20general)','unknown','set','2025-03-26','5083446HqOxaF','commhub','indexOf','.claude/channels/commhub','toTimeString','\x20from\x20','message','type','connecting\x20to\x20','text','priority','config.json','unattributed-','write','commhub_send_task','setRequestHandler','completed','54sKqixg','starting\x20SSE\x20listener...','in_progress','Update\x20this\x20session\x27s\x20status\x20in\x20CommHub\x20(working/idle/blocked/error).\x20Returns\x20inbox_count.','stdin','cwd','failed','.env','Message\x20content','commhub_send_message','\x20no\x20longer\x20exists\x20(kill-0\x20ESRCH)\x20—\x20self-exit\x20to\x20avoid\x20ghost\x20heart-beat','\x20PROJECT_ENV=','delete','unref','(none)','/events/','then','Task\x20outcome:\x20completed/failed/cancelled\x20for\x20final\x20results,\x20blocked/error/in_progress\x20for\x20status\x20updates','ESRCH','alias','Progress\x200-100','Send\x20a\x20task\x20to\x20another\x20session\x20via\x20CommHub.','\x20RESUME_ID=','2.0','message_id','3237tXaJZS','SSE\x20stream\x20ended,\x20reconnecting...','messages','token',':\x20inbox_count=','catch','Send\x20a\x20message\x20to\x20another\x20session\x20(no\x20task\x20lifecycle,\x20just\x20chat).\x20Use\x20for\x20replies\x20and\x20status\x20updates.','split','init\x20failed:\x20',')\x20—\x20self-exit\x20to\x20avoid\x20ghost\x20heart-beat','report_status','initialize','high'];a0_0x38d9=function(){return _0x432e86;};return a0_0x38d9();}function E(){const _0x101918=a0_0x587abe;try{return a0_0xc90d0(_0x101918(0x261),{'encoding':_0x101918(0x1fc),'timeout':0x7d0})[_0x101918(0x280)]();}catch{return'';}}function _(){const _0x1d67a3=a0_0x587abe;try{let _0x1d7740=a0_0x5b0fb5(C,_0x1d67a3(0x272),_0x1d67a3(0x217));if(a0_0x5298bd(_0x1d7740))return JSON[_0x1d67a3(0x25f)](a0_0x4a71cf(_0x1d7740,_0x1d67a3(0x1fc)));}catch{}return{};}var R=_(),Y=process.env.COMMHUB_URL||R[a0_0x587abe(0x24f)]||a0_0x587abe(0x1ef),j=process.env.COMMHUB_TMUX||E();function S(){const _0x549b1b=a0_0x587abe;if(process.env.COMMHUB_ALIAS&&process.env.COMMHUB_ALIAS[_0x549b1b(0x280)]())return process.env.COMMHUB_ALIAS[_0x549b1b(0x280)]();return process[_0x549b1b(0x1e4)][_0x549b1b(0x219)](_0x549b1b(0x1f2)+(_0x549b1b(0x283)+(j||_0x549b1b(0x22b))+'\x20/\x20hostname='+a0_0x162e43()+'.\x20Restart\x20node\x20via\x20`anet\x20node\x20start\x20<alias>`\x20so\x20the\x20env\x20is\x20set\x20explicitly\x20(#203).\x0a')),_0x549b1b(0x218)+process['pid'];}var p=S(),V=process.env.COMMHUB_RESUME_ID||process.env.CLAUDE_RESUME_ID||a0_0x102173(),k=process.env.COMMHUB_TOKEN||R[a0_0x587abe(0x239)]||'';function z(_0x137bf3){const _0x17537f=a0_0x587abe;let _0x345728=new Date()[_0x17537f(0x210)]()['slice'](0x0,0x8);process[_0x17537f(0x1e4)]['write']('['+_0x345728+']\x20[commhub]\x20'+_0x137bf3+'\x0a');}function i(_0x4ffe80){return new Promise(_0x2a7093=>setTimeout(_0x2a7093,_0x4ffe80));}z(a0_0x587abe(0x26b)+Y+a0_0x587abe(0x266)+p+a0_0x587abe(0x233)+V[a0_0x587abe(0x281)](0x0,0x8)+a0_0x587abe(0x1ed)+(j||a0_0x587abe(0x244))+'\x20CWD='+process[a0_0x587abe(0x222)]()+a0_0x587abe(0x228)+H);var G=new Map(),K=new a0_0x4cdf5a({'name':a0_0x587abe(0x205),'version':a0_0x587abe(0x24e)},{'capabilities':{'experimental':{'claude/channel':{}},'tools':{}},'instructions':[a0_0x587abe(0x25d),'These\x20are\x20tasks\x20dispatched\x20by\x20the\x20hub\x20or\x20other\x20sessions\x20via\x20the\x20CommHub\x20Server.','Reply\x20using\x20the\x20commhub_reply\x20tool\x20to\x20report\x20status\x20or\x20results\x20back.',a0_0x587abe(0x27e),a0_0x587abe(0x247)+p][a0_0x587abe(0x1fb)]('\x0a')});K['setRequestHandler'](a0_0x466cbe,async()=>({'tools':[{'name':a0_0x587abe(0x24c),'description':a0_0x587abe(0x260),'inputSchema':{'type':a0_0x587abe(0x246),'properties':{'task_id':{'type':a0_0x587abe(0x1f4),'description':a0_0x587abe(0x208)},'text':{'type':'string','description':'Reply\x20text\x20/\x20result\x20summary'},'status':{'type':a0_0x587abe(0x1f4),'enum':[a0_0x587abe(0x21c),a0_0x587abe(0x223),'cancelled',a0_0x587abe(0x256),'error',a0_0x587abe(0x21f)],'description':a0_0x587abe(0x22e)}},'required':['text']}},{'name':a0_0x587abe(0x1f1),'description':a0_0x587abe(0x220),'inputSchema':{'type':a0_0x587abe(0x246),'properties':{'status':{'type':a0_0x587abe(0x1f4),'enum':[a0_0x587abe(0x1e9),'idle','blocked',a0_0x587abe(0x1f6)]},'task':{'type':a0_0x587abe(0x1f4),'description':a0_0x587abe(0x24b)},'progress':{'type':a0_0x587abe(0x1f0),'description':a0_0x587abe(0x231)}},'required':[a0_0x587abe(0x206)]}},{'name':a0_0x587abe(0x21a),'description':a0_0x587abe(0x232),'inputSchema':{'type':'object','properties':{'alias':{'type':a0_0x587abe(0x1f4),'description':a0_0x587abe(0x26d)},'task':{'type':a0_0x587abe(0x1f4),'description':a0_0x587abe(0x1f7)},'priority':{'type':a0_0x587abe(0x1f4),'enum':[a0_0x587abe(0x242),'normal','low'],'description':'Priority\x20(default:\x20normal)'}},'required':[a0_0x587abe(0x230),a0_0x587abe(0x26c)]}},{'name':a0_0x587abe(0x226),'description':a0_0x587abe(0x23c),'inputSchema':{'type':a0_0x587abe(0x246),'properties':{'alias':{'type':'string','description':a0_0x587abe(0x26d)},'message':{'type':'string','description':a0_0x587abe(0x225)}},'required':[a0_0x587abe(0x230),'message']}},{'name':'commhub_get_all_status','description':a0_0x587abe(0x27c),'inputSchema':{'type':'object','properties':{}}}]}));async function Q(_0x4f5628,_0x274d1e){const _0x1edacd=a0_0x587abe;let _0x1769e1=await fetch(Y+_0x1edacd(0x201),{'method':_0x1edacd(0x284),'headers':{'Content-Type':'application/json','Accept':'application/json,\x20text/event-stream',...k?{'Authorization':_0x1edacd(0x268)+k}:{}},'body':JSON[_0x1edacd(0x274)]({'jsonrpc':_0x1edacd(0x234),'id':0x1,'method':_0x1edacd(0x241),'params':{'protocolVersion':_0x1edacd(0x20b),'capabilities':{},'clientInfo':{'name':_0x1edacd(0x205),'version':'0.3.0'}}})});if(!_0x1769e1['ok']){let _0xc7021=await _0x1769e1[_0x1edacd(0x215)]();return z(_0x1edacd(0x1ea)+_0x1769e1[_0x1edacd(0x206)]+'\x20'+_0xc7021[_0x1edacd(0x281)](0x0,0x64)),{'ok':!0x1,'error':_0x1edacd(0x23e)+_0x1769e1['status']};}await _0x1769e1[_0x1edacd(0x215)]();let _0x48255b=(await(await fetch(Y+_0x1edacd(0x201),{'method':_0x1edacd(0x284),'headers':{'Content-Type':'application/json','Accept':_0x1edacd(0x1fa),...k?{'Authorization':_0x1edacd(0x268)+k}:{}},'body':JSON['stringify']({'jsonrpc':_0x1edacd(0x234),'id':0x2,'method':'tools/call','params':{'name':_0x4f5628,'arguments':_0x274d1e}})}))[_0x1edacd(0x215)]())['split']('\x0a')[_0x1edacd(0x204)](_0x3c4c86=>_0x3c4c86[_0x1edacd(0x250)](_0x1edacd(0x26a)));if(_0x48255b){let _0x5916ff=JSON[_0x1edacd(0x25f)](_0x48255b[_0x1edacd(0x281)](0x6));return _0x5916ff?.[_0x1edacd(0x1ff)]?.[_0x1edacd(0x271)]?.[0x0]?.[_0x1edacd(0x215)]?JSON[_0x1edacd(0x25f)](_0x5916ff['result'][_0x1edacd(0x271)][0x0]['text']):_0x5916ff;}return{'ok':!0x1,'error':_0x1edacd(0x278)};}K[a0_0x587abe(0x21b)](a0_0x58e28e,async _0xb35a59=>{const _0x1c73e7=a0_0x587abe;let {name:_0x3c969e,arguments:_0xfdb947}=_0xb35a59[_0x1c73e7(0x279)];if(_0x3c969e===_0x1c73e7(0x24c)){let {task_id:_0x2dd6bc,text:_0x30a727,status:_0x37cd8f}=_0xfdb947;if(_0x37cd8f===_0x1c73e7(0x21c)||_0x37cd8f===_0x1c73e7(0x223)||_0x37cd8f===_0x1c73e7(0x253)){let _0x1057e0=_0x37cd8f===_0x1c73e7(0x21c)?_0x1c73e7(0x24d):_0x37cd8f,_0x5ec9f6=_0x2dd6bc?G['get'](_0x2dd6bc)||_0x1c73e7(0x24f):_0x1c73e7(0x24f),_0x376daf=await Q(_0x1c73e7(0x254),{'alias':_0x5ec9f6,'text':_0x30a727,'in_reply_to':_0x2dd6bc||void 0x0,'status':_0x1057e0,'from_session':p});if(_0x2dd6bc)G[_0x1c73e7(0x229)](_0x2dd6bc);return{'content':[{'type':'text','text':JSON[_0x1c73e7(0x274)](_0x376daf)}]};}let _0x1ded15=await Q(_0x1c73e7(0x240),{'resume_id':V,'alias':p,'status':_0x37cd8f===_0x1c73e7(0x256)?_0x1c73e7(0x256):_0x37cd8f==='error'?_0x1c73e7(0x1f6):_0x1c73e7(0x1e9),'task':_0x30a727['slice'](0x0,0xc8),'output':_0x30a727});return{'content':[{'type':_0x1c73e7(0x215),'text':JSON['stringify'](_0x1ded15)}]};}if(_0x3c969e===_0x1c73e7(0x1f1)){let {status:_0x3d9925,task:_0x240f77,progress:_0x5b2676}=_0xfdb947,_0x2f3118=await Q(_0x1c73e7(0x240),{'resume_id':V,'alias':p,'status':_0x3d9925,'task':_0x240f77,'progress':_0x5b2676});return{'content':[{'type':'text','text':JSON['stringify'](_0x2f3118)}]};}if(_0x3c969e==='commhub_send_task'){let {alias:_0x2fdb5c,task:_0x2401d8,priority:_0x47e3b7}=_0xfdb947,_0x41f6a4=await Q('send_task',{'alias':_0x2fdb5c,'task':_0x2401d8,'priority':_0x47e3b7||_0x1c73e7(0x249),'from_session':p});return{'content':[{'type':'text','text':JSON[_0x1c73e7(0x274)](_0x41f6a4)}]};}if(_0x3c969e===_0x1c73e7(0x226)){let {alias:_0x3e0f88,message:_0x560723}=_0xfdb947,_0x1929b3=await Q(_0x1c73e7(0x27d),{'alias':_0x3e0f88,'message':_0x560723,'from_session':p});return{'content':[{'type':'text','text':JSON['stringify'](_0x1929b3)}]};}if(_0x3c969e==='commhub_get_all_status'){let _0x3268a2=await Q('get_all_status',{});return{'content':[{'type':_0x1c73e7(0x215),'text':JSON[_0x1c73e7(0x274)](_0x3268a2)}]};}return{'content':[{'type':_0x1c73e7(0x215),'text':JSON[_0x1c73e7(0x274)]({'error':_0x1c73e7(0x258)})}]};});var D=0x3e8,v=0x7530,O=0x36ee80;async function m(){const _0x5f4b84=a0_0x587abe;try{await Q('report_status',{'resume_id':V,'alias':p,'status':_0x5f4b84(0x251),'server':a0_0x162e43(),'hostname':a0_0x162e43(),'agent':_0x5f4b84(0x275),'project_dir':process[_0x5f4b84(0x222)](),'tmux_name':j||void 0x0}),z(_0x5f4b84(0x269)+p+_0x5f4b84(0x1ec));}catch(_0x2a7b52){z(_0x5f4b84(0x26f)+_0x2a7b52);}}async function l(){const _0x27763e=a0_0x587abe;let _0xa6e9b6=Y+_0x27763e(0x22c)+encodeURIComponent(p),_0x4289b2={};if(k)_0x4289b2['Authorization']=_0x27763e(0x268)+k;z(_0x27763e(0x214)+_0xa6e9b6);let _0x420f43=D,_0x2c8291=!0x0,_0xc90ae3=null;while(!0x0){try{let _0x3dec73=await fetch(_0xa6e9b6,{'headers':_0x4289b2});if(!_0x3dec73['ok']){if(z(_0x27763e(0x207)+_0x3dec73[_0x27763e(0x206)]+'\x20'+_0x3dec73['statusText']),_0xc90ae3=_0xc90ae3??Date['now'](),Date[_0x27763e(0x203)]()-_0xc90ae3>O){z('SSE\x20连续\x20>1h\x20连不上\x20hub\x20('+Y+_0x27763e(0x1f3));return;}await i(_0x420f43),_0x420f43=Math[_0x27763e(0x1e3)](_0x420f43*0x2,v);continue;}let _0x5bc241=_0x3dec73['body']['getReader'](),_0xfa016d=new TextDecoder(),_0x2e3d50='';_0x420f43=D;while(!0x0){let {done:_0x4efede,value:_0x33cdb8}=await _0x5bc241['read']();if(_0x4efede)break;_0x2e3d50+=_0xfa016d[_0x27763e(0x1fd)](_0x33cdb8,{'stream':!0x0});let _0x5d9bbd=_0x2e3d50[_0x27763e(0x23d)]('\x0a\x0a');_0x2e3d50=_0x5d9bbd[_0x27763e(0x25b)]()||'';for(let _0x57dc20 of _0x5d9bbd){let _0x56eb3e=_0x57dc20[_0x27763e(0x23d)]('\x0a')['find'](_0x31f1cc=>_0x31f1cc[_0x27763e(0x250)](_0x27763e(0x26a)));if(!_0x56eb3e)continue;try{let _0x4967f7=JSON[_0x27763e(0x25f)](_0x56eb3e['slice'](0x6));if(await A(_0x4967f7),_0x4967f7[_0x27763e(0x213)]===_0x27763e(0x255)){if(_0xc90ae3=null,!_0x2c8291)await m();_0x2c8291=!0x1;}}catch(_0xb132fc){z('parse\x20error:\x20'+_0xb132fc);}}}z(_0x27763e(0x237));}catch(_0x3f5865){z(_0x27763e(0x252)+_0x3f5865);}if(_0xc90ae3=_0xc90ae3??Date[_0x27763e(0x203)](),Date[_0x27763e(0x203)]()-_0xc90ae3>O){z(_0x27763e(0x25a)+Y+_0x27763e(0x1f3));return;}await i(_0x420f43),_0x420f43=Math[_0x27763e(0x1e3)](_0x420f43*0x2,v);}}async function A(_0x348ad5){const _0x139558=a0_0x587abe;if(_0x348ad5[_0x139558(0x213)]===_0x139558(0x255)){z(_0x139558(0x200)+p+'\x22');return;}if(_0x348ad5[_0x139558(0x213)]===_0x139558(0x277)){if(z('←\x20message\x20from\x20'+_0x348ad5[_0x139558(0x1f5)]+':\x20'+_0x348ad5['message'][_0x139558(0x281)](0x0,0x3c)),await K[_0x139558(0x259)]({'method':_0x139558(0x1fe),'params':{'content':_0x348ad5[_0x139558(0x212)],'meta':{'sender':_0x348ad5[_0x139558(0x1f5)]||_0x139558(0x24f),'sender_id':_0x139558(0x20d),'user':_0x348ad5[_0x139558(0x1f5)]||_0x139558(0x24f),'priority':'normal'}}}),_0x348ad5['message_id'])await Q('ack_inbox',{'alias':p,'message_id':_0x348ad5[_0x139558(0x235)]});return;}if(_0x348ad5[_0x139558(0x213)]===_0x139558(0x262)||_0x348ad5[_0x139558(0x213)]===_0x139558(0x282)){z('←\x20'+_0x348ad5['type']+_0x139558(0x23a)+_0x348ad5[_0x139558(0x1e8)]+_0x139558(0x1e7)+(_0x348ad5[_0x139558(0x216)]||_0x139558(0x249)));let _0x415053=await Q(_0x139558(0x24a),{'alias':p,'limit':0x5});if(_0x415053?.['ok']&&_0x415053[_0x139558(0x238)]?.[_0x139558(0x276)]>0x0)for(let _0xeb97d0 of _0x415053['messages']){let _0x44b8f8={'sender':_0xeb97d0[_0x139558(0x1eb)]||_0x139558(0x24f),'sender_id':_0x139558(0x20d),'user':_0xeb97d0[_0x139558(0x1eb)]||_0x139558(0x24f),'task_id':_0xeb97d0['id'],'priority':_0xeb97d0[_0x139558(0x216)]||_0x139558(0x249)};G[_0x139558(0x20a)](_0xeb97d0['id'],_0xeb97d0[_0x139558(0x1eb)]||'hub'),await K[_0x139558(0x259)]({'method':_0x139558(0x1fe),'params':{'content':_0xeb97d0['content'],'meta':_0x44b8f8}}),z(_0x139558(0x267)+_0xeb97d0['id']['slice'](0x0,0x8)+_0x139558(0x211)+_0xeb97d0[_0x139558(0x1eb)]+':\x20'+_0xeb97d0['content'][_0x139558(0x281)](0x0,0x3c)),await Q('ack_inbox',{'alias':p,'message_id':_0xeb97d0['id']});}}}async function t(){const _0x170fe8=a0_0x587abe;let _0x5d052e=new a0_0x9ca236();await K[_0x170fe8(0x1e5)](_0x5d052e),z(_0x170fe8(0x1e6)),z(_0x170fe8(0x21e)),l()[_0x170fe8(0x23b)](_0x3514c0=>z(_0x170fe8(0x245)+_0x3514c0)),Q(_0x170fe8(0x240),{'resume_id':V,'alias':p,'status':'idle','server':a0_0x162e43(),'hostname':a0_0x162e43(),'agent':_0x170fe8(0x275),'project_dir':process[_0x170fe8(0x222)](),'tmux_name':j||void 0x0})[_0x170fe8(0x22d)](()=>z(_0x170fe8(0x285)+p+'\x22\x20('+V[_0x170fe8(0x281)](0x0,0x8)+')'))['catch'](_0x2e2888=>z(_0x170fe8(0x25c)+_0x2e2888)),setInterval(()=>{const _0x11f38b=_0x170fe8;Q(_0x11f38b(0x240),{'resume_id':V,'alias':p,'status':_0x11f38b(0x251),'server':a0_0x162e43(),'hostname':a0_0x162e43(),'agent':_0x11f38b(0x275),'project_dir':process[_0x11f38b(0x222)](),'tmux_name':j||void 0x0})[_0x11f38b(0x23b)](_0xb13bdc=>z(_0x11f38b(0x243)+_0xb13bdc));},0x2bf20),z(_0x170fe8(0x263));}t()[a0_0x587abe(0x23b)](_0x3a3995=>{const _0x5decca=a0_0x587abe;z(_0x5decca(0x27a)+_0x3a3995),process[_0x5decca(0x286)](0x1);});async function b(){const _0xd8e570=a0_0x587abe;z('shutting\x20down,\x20reporting\x20offline...'),await Q(_0xd8e570(0x240),{'resume_id':V,'alias':p,'status':_0xd8e570(0x248),'task':_0xd8e570(0x289)})['catch'](()=>{}),process[_0xd8e570(0x286)](0x0);}process[a0_0x587abe(0x221)]['on']('end',()=>b()),process['on'](a0_0x587abe(0x25e),()=>b()),process['on'](a0_0x587abe(0x26e),()=>b());var d=process['ppid'];if(d&&d>0x1){let h=setInterval(()=>{const _0x3086fd=a0_0x587abe;if(process[_0x3086fd(0x288)]===0x1&&d!==0x1){z('parent\x20claude\x20died\x20(reparented\x20to\x20PID\x201\x20from\x20'+d+_0x3086fd(0x23f)),b();return;}try{process[_0x3086fd(0x27b)](d,0x0);}catch(_0x51ca61){if(_0x51ca61?.[_0x3086fd(0x1f9)]===_0x3086fd(0x22f))z(_0x3086fd(0x202)+d+_0x3086fd(0x227)),b();}},0x7530);if(typeof h[a0_0x587abe(0x22a)]===a0_0x587abe(0x273))h[a0_0x587abe(0x22a)]();}
2
+ const a0_0x53cab8=a0_0x56c5;(function(_0x44c8c0,_0x3e595d){const _0x814fea=a0_0x56c5,_0x2e16d2=_0x44c8c0();while(!![]){try{const _0x437f8a=-parseInt(_0x814fea(0x107))/0x1*(-parseInt(_0x814fea(0x106))/0x2)+parseInt(_0x814fea(0x124))/0x3+-parseInt(_0x814fea(0x174))/0x4+parseInt(_0x814fea(0x10a))/0x5+parseInt(_0x814fea(0x142))/0x6+-parseInt(_0x814fea(0xf8))/0x7*(-parseInt(_0x814fea(0x10d))/0x8)+-parseInt(_0x814fea(0x156))/0x9;if(_0x437f8a===_0x3e595d)break;else _0x2e16d2['push'](_0x2e16d2['shift']());}catch(_0x58502f){_0x2e16d2['push'](_0x2e16d2['shift']());}}}(a0_0x2481,0xd3ae3));import{readFileSync as a0_0x4429aa,existsSync as a0_0x1cefb3}from'fs';import{randomUUID as a0_0x19a542}from'crypto';import{join as a0_0xd5ed86}from'path';import{hostname as a0_0x16a31b}from'os';import{execSync as a0_0x4cfe2a}from'child_process';function a0_0x56c5(_0xe1292f,_0x2f110f){_0xe1292f=_0xe1292f-0xeb;const _0x24819a=a0_0x2481();let _0x56c53c=_0x24819a[_0xe1292f];return _0x56c53c;}function B(_0x122956){let _0xf684e7=_0x122956['replace'](/[^a-zA-Z0-9\-_]/g,'-');return _0xf684e7===''?'unknown':_0xf684e7;}import{Server as a0_0x3a585f}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport as a0_0x52ce92}from'@modelcontextprotocol/sdk/server/stdio.js';import{ListToolsRequestSchema as a0_0xd1d407,CallToolRequestSchema as a0_0x2c9c1d}from'@modelcontextprotocol/sdk/types.js';function T(_0x56cb20){const _0x467cb9=a0_0x56c5;if(!a0_0x1cefb3(_0x56cb20))return;for(let _0x2dd8f9 of a0_0x4429aa(_0x56cb20,'utf-8')['split']('\x0a')){let _0x53f76f=_0x2dd8f9[_0x467cb9(0xed)]();if(!_0x53f76f||_0x53f76f[_0x467cb9(0x17e)]('#'))continue;let _0x343f00=_0x53f76f['indexOf']('=');if(_0x343f00<0x0)continue;let _0x1dd33c=_0x53f76f[_0x467cb9(0x182)](0x0,_0x343f00)[_0x467cb9(0xed)](),_0x328260=_0x53f76f[_0x467cb9(0x182)](_0x343f00+0x1)[_0x467cb9(0xed)]()['replace'](/^["']|["']$/g,'');if(!process.env[_0x1dd33c])process.env[_0x1dd33c]=_0x328260;}}function a0_0x2481(){const _0x5b948f=['startsWith','failed','connected','utf-8','slice','SSE\x20连续\x20>1h\x20连不上\x20hub\x20(','Reply\x20using\x20the\x20commhub_reply\x20tool\x20to\x20report\x20status\x20or\x20results\x20back.','send_reply','Update\x20this\x20session\x27s\x20status\x20in\x20CommHub\x20(working/idle/blocked/error).\x20Returns\x20inbox_count.','error','application/json','toTimeString','completed','ESRCH','parse','0.3.0','trim','warning:\x20could\x20not\x20register:\x20','length','get_all_status','\x20/\x20hostname=','type',')\x20—\x20放弃自动重连。手动\x20anet\x20node\x20start\x20恢复。','Progress\x200-100','read','broadcast','object','467397Ktrwxv','end','MCP\x20stdio\x20connected','min','/events/','ready\x20—\x20waiting\x20for\x20events','SSE\x20fatal:\x20','Messages\x20from\x20CommHub\x20arrive\x20as\x20<channel\x20source=\x22commhub\x22\x20task_id=\x22...\x22\x20priority=\x22...\x22\x20from=\x22...\x22>','messages','.env','You\x20can\x20also\x20use\x20commhub_report_status\x20to\x20update\x20your\x20session\x20status.','none','Target\x20session\x20alias','\x20CWD=','502954DGhsBO','4wWQZeV','Reply\x20text\x20/\x20result\x20summary','priority','3321965qlnBEb','from','result','192zXzMjG','commhub_reply','data:\x20','application/json,\x20text/event-stream','stringify','params','hub','in_progress','task','unknown\x20tool',':\x20inbox_count=','tools/call','status','registered\x20as\x20\x22','decode','ppid','Priority\x20(default:\x20normal)','Current\x20task\x20description','Authorization','get_inbox','SSE\x20connected\x20as\x20\x22','write','blocked','3721278yhykTc','token','message','pop','2025-03-26','unref','split','config.json','The\x20task_id\x20from\x20the\x20channel\x20message\x20(or\x20\x27hub\x27\x20for\x20general)','Send\x20a\x20task\x20to\x20another\x20session\x20via\x20CommHub.','would\x20mis-attribute.\x20Refusing\x20to\x20guess\x20from\x20TMUX_NAME=','.\x20Restart\x20node\x20via\x20`anet\x20node\x20start\x20<alias>`\x20so\x20the\x20env\x20is\x20set\x20explicitly\x20(#203).\x0a','now','Get\x20status\x20of\x20all\x20sessions\x20from\x20CommHub.','no\x20response','low','connect','function','cancelled','content','inbox_count','claude-code','working','\x20from\x20','commhub_report_status','heartbeat\x20failed:\x20','set','Task\x20content','re-register\x20failed:\x20','SSE\x20connection\x20error:\x20','8183946ZchHue','number','\x22\x20after\x20SSE\x20reconnect','idle','commhub_send_task','report_status','send_message','commhub','statusText','parent\x20claude\x20pid=','getReader','body','delete','normal','text','new_task','Message\x20content','init\x20failed:\x20','stdin','SIGINT','43684893EdnmBr','Session\x20alias:\x20','setRequestHandler','SSE\x20error:\x20','Task\x20outcome:\x20completed/failed/cancelled\x20for\x20final\x20results,\x20blocked/error/in_progress\x20for\x20status\x20updates','from_session','(none)','session\x20disconnected','commhub_send_message','new_message','then','connecting\x20to\x20','message_id','get','string','unattributed-','CommHub\x20init\x20failed:\x20','\x20priority=','commhub-channel','catch','POST','SSE\x20stream\x20ended,\x20reconnecting...','notifications/claude/channel','find','2.0','.claude/channels/commhub','cwd',']\x20[commhub]\x20','high','code','625208vByHRA','alias','exit','SIGTERM','http://127.0.0.1:9200','commhub_get_all_status','starting\x20SSE\x20listener...','←\x20message\x20from\x20','.anet','notification'];a0_0x2481=function(){return _0x5b948f;};return a0_0x2481();}var C=process.env.HOME||'~',r=a0_0xd5ed86(C,a0_0x53cab8(0x16f));T(a0_0xd5ed86(r,'.env'));var H=B(process[a0_0x53cab8(0x170)]());T(a0_0xd5ed86(r,H,a0_0x53cab8(0x101)));function E(){const _0x406752=a0_0x53cab8;try{return a0_0x4cfe2a('tmux\x20display-message\x20-p\x20\x27#S\x27',{'encoding':_0x406752(0x181),'timeout':0x7d0})['trim']();}catch{return'';}}function _(){const _0x310b2c=a0_0x53cab8;try{let _0x7eaa8e=a0_0xd5ed86(C,_0x310b2c(0x17c),_0x310b2c(0x12b));if(a0_0x1cefb3(_0x7eaa8e))return JSON[_0x310b2c(0xeb)](a0_0x4429aa(_0x7eaa8e,_0x310b2c(0x181)));}catch{}return{};}var R=_(),Y=process.env.COMMHUB_URL||R[a0_0x53cab8(0x113)]||a0_0x53cab8(0x178),j=process.env.COMMHUB_TMUX||E();function S(){const _0x321ef9=a0_0x53cab8;if(process.env.COMMHUB_ALIAS&&process.env.COMMHUB_ALIAS[_0x321ef9(0xed)]())return process.env.COMMHUB_ALIAS[_0x321ef9(0xed)]();return process['stderr']['write']('[commhub]\x20WARN:\x20COMMHUB_ALIAS\x20env\x20var\x20is\x20unset\x20—\x20outbound\x20from_session\x20'+(_0x321ef9(0x12e)+(j||_0x321ef9(0x15c))+_0x321ef9(0xf1)+a0_0x16a31b()+_0x321ef9(0x12f))),_0x321ef9(0x165)+process['pid'];}var p=S(),V=process.env.COMMHUB_RESUME_ID||process.env.CLAUDE_RESUME_ID||a0_0x19a542(),k=process.env.COMMHUB_TOKEN||R[a0_0x53cab8(0x125)]||'';function z(_0x4b3b12){const _0x55e715=a0_0x53cab8;let _0x43e8d8=new Date()[_0x55e715(0x189)]()[_0x55e715(0x182)](0x0,0x8);process['stderr'][_0x55e715(0x122)]('['+_0x43e8d8+_0x55e715(0x171)+_0x4b3b12+'\x0a');}function i(_0x5edcd1){return new Promise(_0x48cecb=>setTimeout(_0x48cecb,_0x5edcd1));}z('ENV:\x20URL='+Y+'\x20ALIAS='+p+'\x20RESUME_ID='+V['slice'](0x0,0x8)+'...\x20TMUX='+(j||a0_0x53cab8(0x103))+a0_0x53cab8(0x105)+process[a0_0x53cab8(0x170)]()+'\x20PROJECT_ENV='+H);var G=new Map(),K=new a0_0x3a585f({'name':a0_0x53cab8(0x168),'version':a0_0x53cab8(0xec)},{'capabilities':{'experimental':{'claude/channel':{}},'tools':{}},'instructions':[a0_0x53cab8(0xff),'These\x20are\x20tasks\x20dispatched\x20by\x20the\x20hub\x20or\x20other\x20sessions\x20via\x20the\x20CommHub\x20Server.',a0_0x53cab8(0x184),a0_0x53cab8(0x102),a0_0x53cab8(0x157)+p]['join']('\x0a')});K[a0_0x53cab8(0x158)](a0_0xd1d407,async()=>({'tools':[{'name':a0_0x53cab8(0x10e),'description':'Reply\x20to\x20a\x20CommHub\x20task\x20—\x20report\x20completion\x20or\x20send\x20a\x20message\x20back\x20to\x20the\x20hub.','inputSchema':{'type':a0_0x53cab8(0xf7),'properties':{'task_id':{'type':a0_0x53cab8(0x164),'description':a0_0x53cab8(0x12c)},'text':{'type':a0_0x53cab8(0x164),'description':a0_0x53cab8(0x108)},'status':{'type':a0_0x53cab8(0x164),'enum':[a0_0x53cab8(0x18a),a0_0x53cab8(0x17f),a0_0x53cab8(0x136),'blocked',a0_0x53cab8(0x187),a0_0x53cab8(0x114)],'description':a0_0x53cab8(0x15a)}},'required':[a0_0x53cab8(0x150)]}},{'name':a0_0x53cab8(0x13c),'description':a0_0x53cab8(0x186),'inputSchema':{'type':'object','properties':{'status':{'type':a0_0x53cab8(0x164),'enum':[a0_0x53cab8(0x13a),a0_0x53cab8(0x145),a0_0x53cab8(0x123),a0_0x53cab8(0x187)]},'task':{'type':'string','description':a0_0x53cab8(0x11e)},'progress':{'type':a0_0x53cab8(0x143),'description':a0_0x53cab8(0xf4)}},'required':[a0_0x53cab8(0x119)]}},{'name':a0_0x53cab8(0x146),'description':a0_0x53cab8(0x12d),'inputSchema':{'type':a0_0x53cab8(0xf7),'properties':{'alias':{'type':a0_0x53cab8(0x164),'description':a0_0x53cab8(0x104)},'task':{'type':a0_0x53cab8(0x164),'description':a0_0x53cab8(0x13f)},'priority':{'type':a0_0x53cab8(0x164),'enum':[a0_0x53cab8(0x172),a0_0x53cab8(0x14f),a0_0x53cab8(0x133)],'description':a0_0x53cab8(0x11d)}},'required':['alias',a0_0x53cab8(0x115)]}},{'name':a0_0x53cab8(0x15e),'description':'Send\x20a\x20message\x20to\x20another\x20session\x20(no\x20task\x20lifecycle,\x20just\x20chat).\x20Use\x20for\x20replies\x20and\x20status\x20updates.','inputSchema':{'type':a0_0x53cab8(0xf7),'properties':{'alias':{'type':a0_0x53cab8(0x164),'description':a0_0x53cab8(0x104)},'message':{'type':a0_0x53cab8(0x164),'description':a0_0x53cab8(0x152)}},'required':[a0_0x53cab8(0x175),a0_0x53cab8(0x126)]}},{'name':a0_0x53cab8(0x179),'description':a0_0x53cab8(0x131),'inputSchema':{'type':a0_0x53cab8(0xf7),'properties':{}}}]}));async function Q(_0x1a9e77,_0x99f2b1){const _0xc5d447=a0_0x53cab8;let _0x1be83a=await fetch(Y+'/mcp',{'method':_0xc5d447(0x16a),'headers':{'Content-Type':_0xc5d447(0x188),'Accept':_0xc5d447(0x110),...k?{'Authorization':'Bearer\x20'+k}:{}},'body':JSON[_0xc5d447(0x111)]({'jsonrpc':_0xc5d447(0x16e),'id':0x1,'method':'initialize','params':{'protocolVersion':_0xc5d447(0x128),'capabilities':{},'clientInfo':{'name':_0xc5d447(0x168),'version':'0.3.0'}}})});if(!_0x1be83a['ok']){let _0x18d8fb=await _0x1be83a[_0xc5d447(0x150)]();return z(_0xc5d447(0x166)+_0x1be83a[_0xc5d447(0x119)]+'\x20'+_0x18d8fb[_0xc5d447(0x182)](0x0,0x64)),{'ok':!0x1,'error':_0xc5d447(0x153)+_0x1be83a[_0xc5d447(0x119)]};}await _0x1be83a[_0xc5d447(0x150)]();let _0x15398c=(await(await fetch(Y+'/mcp',{'method':_0xc5d447(0x16a),'headers':{'Content-Type':_0xc5d447(0x188),'Accept':_0xc5d447(0x110),...k?{'Authorization':'Bearer\x20'+k}:{}},'body':JSON[_0xc5d447(0x111)]({'jsonrpc':_0xc5d447(0x16e),'id':0x2,'method':_0xc5d447(0x118),'params':{'name':_0x1a9e77,'arguments':_0x99f2b1}})}))[_0xc5d447(0x150)]())[_0xc5d447(0x12a)]('\x0a')[_0xc5d447(0x16d)](_0x5dd473=>_0x5dd473['startsWith'](_0xc5d447(0x10f)));if(_0x15398c){let _0x46e998=JSON[_0xc5d447(0xeb)](_0x15398c[_0xc5d447(0x182)](0x6));return _0x46e998?.[_0xc5d447(0x10c)]?.[_0xc5d447(0x137)]?.[0x0]?.[_0xc5d447(0x150)]?JSON[_0xc5d447(0xeb)](_0x46e998['result']['content'][0x0][_0xc5d447(0x150)]):_0x46e998;}return{'ok':!0x1,'error':_0xc5d447(0x132)};}K[a0_0x53cab8(0x158)](a0_0x2c9c1d,async _0x47c5ab=>{const _0x5ab68b=a0_0x53cab8;let {name:_0x3a3a4c,arguments:_0x5eff6d}=_0x47c5ab[_0x5ab68b(0x112)];if(_0x3a3a4c===_0x5ab68b(0x10e)){let {task_id:_0x25359a,text:_0x22ae0c,status:_0x422d18}=_0x5eff6d;if(_0x422d18==='completed'||_0x422d18===_0x5ab68b(0x17f)||_0x422d18==='cancelled'){let _0xf3083b=_0x422d18===_0x5ab68b(0x18a)?'replied':_0x422d18,_0x4dd758=_0x25359a?G[_0x5ab68b(0x163)](_0x25359a)||_0x5ab68b(0x113):_0x5ab68b(0x113),_0x45b097=await Q(_0x5ab68b(0x185),{'alias':_0x4dd758,'text':_0x22ae0c,'in_reply_to':_0x25359a||void 0x0,'status':_0xf3083b,'from_session':p});if(_0x25359a)G[_0x5ab68b(0x14e)](_0x25359a);return{'content':[{'type':_0x5ab68b(0x150),'text':JSON[_0x5ab68b(0x111)](_0x45b097)}]};}let _0x3a666c=await Q('report_status',{'resume_id':V,'alias':p,'status':_0x422d18==='blocked'?_0x5ab68b(0x123):_0x422d18===_0x5ab68b(0x187)?'error':_0x5ab68b(0x13a),'task':_0x22ae0c[_0x5ab68b(0x182)](0x0,0xc8),'output':_0x22ae0c});return{'content':[{'type':'text','text':JSON[_0x5ab68b(0x111)](_0x3a666c)}]};}if(_0x3a3a4c===_0x5ab68b(0x13c)){let {status:_0x4cd566,task:_0x1fb2ad,progress:_0x2f632e}=_0x5eff6d,_0xd28ba9=await Q(_0x5ab68b(0x147),{'resume_id':V,'alias':p,'status':_0x4cd566,'task':_0x1fb2ad,'progress':_0x2f632e});return{'content':[{'type':'text','text':JSON['stringify'](_0xd28ba9)}]};}if(_0x3a3a4c===_0x5ab68b(0x146)){let {alias:_0x10c417,task:_0x3ba73f,priority:_0x35dc23}=_0x5eff6d,_0x1c4c1c=await Q('send_task',{'alias':_0x10c417,'task':_0x3ba73f,'priority':_0x35dc23||'normal','from_session':p});return{'content':[{'type':_0x5ab68b(0x150),'text':JSON[_0x5ab68b(0x111)](_0x1c4c1c)}]};}if(_0x3a3a4c===_0x5ab68b(0x15e)){let {alias:_0x5a2b26,message:_0x2168ea}=_0x5eff6d,_0x414eb4=await Q(_0x5ab68b(0x148),{'alias':_0x5a2b26,'message':_0x2168ea,'from_session':p});return{'content':[{'type':_0x5ab68b(0x150),'text':JSON['stringify'](_0x414eb4)}]};}if(_0x3a3a4c==='commhub_get_all_status'){let _0x377a59=await Q(_0x5ab68b(0xf0),{});return{'content':[{'type':'text','text':JSON['stringify'](_0x377a59)}]};}return{'content':[{'type':'text','text':JSON[_0x5ab68b(0x111)]({'error':_0x5ab68b(0x116)})}]};});var D=0x3e8,v=0x7530,O=0x36ee80;async function m(){const _0xda9c05=a0_0x53cab8;try{await Q(_0xda9c05(0x147),{'resume_id':V,'alias':p,'status':_0xda9c05(0x145),'server':a0_0x16a31b(),'hostname':a0_0x16a31b(),'agent':_0xda9c05(0x139),'project_dir':process[_0xda9c05(0x170)](),'tmux_name':j||void 0x0}),z('re-registered\x20as\x20\x22'+p+_0xda9c05(0x144));}catch(_0x49c2ba){z(_0xda9c05(0x140)+_0x49c2ba);}}async function l(){const _0x2b35b5=a0_0x53cab8;let _0x5e83dd=Y+_0x2b35b5(0xfc)+encodeURIComponent(p),_0x3b8dba={};if(k)_0x3b8dba[_0x2b35b5(0x11f)]='Bearer\x20'+k;z(_0x2b35b5(0x161)+_0x5e83dd);let _0x545750=D,_0x27f339=!0x0,_0x2370d3=null;while(!0x0){try{let _0x2c5e75=await fetch(_0x5e83dd,{'headers':_0x3b8dba});if(!_0x2c5e75['ok']){if(z(_0x2b35b5(0x159)+_0x2c5e75[_0x2b35b5(0x119)]+'\x20'+_0x2c5e75[_0x2b35b5(0x14a)]),_0x2370d3=_0x2370d3??Date[_0x2b35b5(0x130)](),Date['now']()-_0x2370d3>O){z(_0x2b35b5(0x183)+Y+_0x2b35b5(0xf3));return;}await i(_0x545750),_0x545750=Math[_0x2b35b5(0xfb)](_0x545750*0x2,v);continue;}let _0x35a63d=_0x2c5e75[_0x2b35b5(0x14d)][_0x2b35b5(0x14c)](),_0x5bff21=new TextDecoder(),_0x4df713='';_0x545750=D;while(!0x0){let {done:_0xfd2f1,value:_0x57d1ae}=await _0x35a63d[_0x2b35b5(0xf5)]();if(_0xfd2f1)break;_0x4df713+=_0x5bff21[_0x2b35b5(0x11b)](_0x57d1ae,{'stream':!0x0});let _0xa8f5d9=_0x4df713[_0x2b35b5(0x12a)]('\x0a\x0a');_0x4df713=_0xa8f5d9[_0x2b35b5(0x127)]()||'';for(let _0x1d6081 of _0xa8f5d9){let _0x2d24a5=_0x1d6081['split']('\x0a')[_0x2b35b5(0x16d)](_0x18de99=>_0x18de99[_0x2b35b5(0x17e)]('data:\x20'));if(!_0x2d24a5)continue;try{let _0x1f417d=JSON['parse'](_0x2d24a5['slice'](0x6));if(await A(_0x1f417d),_0x1f417d['type']===_0x2b35b5(0x180)){if(_0x2370d3=null,!_0x27f339)await m();_0x27f339=!0x1;}}catch(_0x98112b){z('parse\x20error:\x20'+_0x98112b);}}}z(_0x2b35b5(0x16b));}catch(_0x1acf2a){z(_0x2b35b5(0x141)+_0x1acf2a);}if(_0x2370d3=_0x2370d3??Date[_0x2b35b5(0x130)](),Date[_0x2b35b5(0x130)]()-_0x2370d3>O){z(_0x2b35b5(0x183)+Y+_0x2b35b5(0xf3));return;}await i(_0x545750),_0x545750=Math[_0x2b35b5(0xfb)](_0x545750*0x2,v);}}async function A(_0x5c5f58){const _0x43d6ae=a0_0x53cab8;if(_0x5c5f58[_0x43d6ae(0xf2)]===_0x43d6ae(0x180)){z(_0x43d6ae(0x121)+p+'\x22');return;}if(_0x5c5f58[_0x43d6ae(0xf2)]===_0x43d6ae(0x15f)){if(z(_0x43d6ae(0x17b)+_0x5c5f58[_0x43d6ae(0x10b)]+':\x20'+_0x5c5f58[_0x43d6ae(0x126)][_0x43d6ae(0x182)](0x0,0x3c)),await K[_0x43d6ae(0x17d)]({'method':_0x43d6ae(0x16c),'params':{'content':_0x5c5f58[_0x43d6ae(0x126)],'meta':{'sender':_0x5c5f58[_0x43d6ae(0x10b)]||_0x43d6ae(0x113),'sender_id':'commhub','user':_0x5c5f58['from']||_0x43d6ae(0x113),'priority':_0x43d6ae(0x14f)}}}),_0x5c5f58[_0x43d6ae(0x162)])await Q('ack_inbox',{'alias':p,'message_id':_0x5c5f58[_0x43d6ae(0x162)]});return;}if(_0x5c5f58[_0x43d6ae(0xf2)]===_0x43d6ae(0x151)||_0x5c5f58[_0x43d6ae(0xf2)]===_0x43d6ae(0xf6)){z('←\x20'+_0x5c5f58[_0x43d6ae(0xf2)]+_0x43d6ae(0x117)+_0x5c5f58[_0x43d6ae(0x138)]+_0x43d6ae(0x167)+(_0x5c5f58[_0x43d6ae(0x109)]||_0x43d6ae(0x14f)));let _0x46221e=await Q(_0x43d6ae(0x120),{'alias':p,'limit':0x5});if(_0x46221e?.['ok']&&_0x46221e[_0x43d6ae(0x100)]?.[_0x43d6ae(0xef)]>0x0)for(let _0x36d79f of _0x46221e[_0x43d6ae(0x100)]){let _0x41bd13={'sender':_0x36d79f[_0x43d6ae(0x15b)]||_0x43d6ae(0x113),'sender_id':_0x43d6ae(0x149),'user':_0x36d79f['from_session']||_0x43d6ae(0x113),'task_id':_0x36d79f['id'],'priority':_0x36d79f[_0x43d6ae(0x109)]||'normal'};G[_0x43d6ae(0x13e)](_0x36d79f['id'],_0x36d79f[_0x43d6ae(0x15b)]||_0x43d6ae(0x113)),await K[_0x43d6ae(0x17d)]({'method':'notifications/claude/channel','params':{'content':_0x36d79f[_0x43d6ae(0x137)],'meta':_0x41bd13}}),z('→\x20injected\x20task\x20'+_0x36d79f['id'][_0x43d6ae(0x182)](0x0,0x8)+_0x43d6ae(0x13b)+_0x36d79f[_0x43d6ae(0x15b)]+':\x20'+_0x36d79f['content'][_0x43d6ae(0x182)](0x0,0x3c)),await Q('ack_inbox',{'alias':p,'message_id':_0x36d79f['id']});}}}async function t(){const _0x344229=a0_0x53cab8;let _0x50a8db=new a0_0x52ce92();await K[_0x344229(0x134)](_0x50a8db),z(_0x344229(0xfa)),z(_0x344229(0x17a)),l()[_0x344229(0x169)](_0x17aa74=>z(_0x344229(0xfe)+_0x17aa74)),Q(_0x344229(0x147),{'resume_id':V,'alias':p,'status':'idle','server':a0_0x16a31b(),'hostname':a0_0x16a31b(),'agent':_0x344229(0x139),'project_dir':process[_0x344229(0x170)](),'tmux_name':j||void 0x0})[_0x344229(0x160)](()=>z(_0x344229(0x11a)+p+'\x22\x20('+V[_0x344229(0x182)](0x0,0x8)+')'))[_0x344229(0x169)](_0x3e42b3=>z(_0x344229(0xee)+_0x3e42b3)),setInterval(()=>{const _0x56718e=_0x344229;Q(_0x56718e(0x147),{'resume_id':V,'alias':p,'status':'idle','server':a0_0x16a31b(),'hostname':a0_0x16a31b(),'agent':_0x56718e(0x139),'project_dir':process['cwd'](),'tmux_name':j||void 0x0})['catch'](_0x1e8e89=>z(_0x56718e(0x13d)+_0x1e8e89));},0x2bf20),z(_0x344229(0xfd));}t()[a0_0x53cab8(0x169)](_0x215b98=>{const _0x59b512=a0_0x53cab8;z('fatal:\x20'+_0x215b98),process[_0x59b512(0x176)](0x1);});async function b(){const _0x12edcd=a0_0x53cab8;z('shutting\x20down,\x20reporting\x20offline...'),await Q(_0x12edcd(0x147),{'resume_id':V,'alias':p,'status':'offline','task':_0x12edcd(0x15d)})['catch'](()=>{}),process['exit'](0x0);}process[a0_0x53cab8(0x154)]['on'](a0_0x53cab8(0xf9),()=>b()),process['on'](a0_0x53cab8(0x177),()=>b()),process['on'](a0_0x53cab8(0x155),()=>b());var d=process[a0_0x53cab8(0x11c)];if(d&&d>0x1){let h=setInterval(()=>{const _0x869c16=a0_0x53cab8;if(process[_0x869c16(0x11c)]===0x1&&d!==0x1){z('parent\x20claude\x20died\x20(reparented\x20to\x20PID\x201\x20from\x20'+d+')\x20—\x20self-exit\x20to\x20avoid\x20ghost\x20heart-beat'),b();return;}try{process['kill'](d,0x0);}catch(_0x51f5f7){if(_0x51f5f7?.[_0x869c16(0x173)]===_0x869c16(0x18b))z(_0x869c16(0x14b)+d+'\x20no\x20longer\x20exists\x20(kill-0\x20ESRCH)\x20—\x20self-exit\x20to\x20avoid\x20ghost\x20heart-beat'),b();}},0x7530);if(typeof h[a0_0x53cab8(0x129)]===a0_0x53cab8(0x135))h[a0_0x53cab8(0x129)]();}
@@ -1,14 +1,6 @@
1
- export type RuntimeName = "claude-code-cli" | "codex-sdk" | "claude-agent-sdk" | "grok-build-acp" | "opencode-cli" | "codex-app-server";
1
+ export type RuntimeName = "claude-code-cli" | "codex-sdk" | "claude-agent-sdk" | "grok-build-acp" | "grok-build-cli" | "opencode-cli" | "codex-app-server";
2
2
  /** Operator-facing default for any runtime slot that comes in empty / missing / unrecognized. */
3
3
  export declare const DEFAULT_RUNTIME: RuntimeName;
4
- /**
5
- * Runtimes launched through the agent-node supervisor rather than by spawning
6
- * the Claude Code CLI directly. Keep this predicate exhaustive so adding a
7
- * runtime cannot silently fall into the Claude launcher branch.
8
- */
9
- export declare function runtimeUsesAgentNode(runtime: RuntimeName): boolean;
10
- /** Runtimes whose explicit CLI choice must bypass the API-vendor picker. */
11
- export declare function runtimeSkipsCreateVendorPicker(runtime: RuntimeName): boolean;
12
4
  type ProfileLike = {
13
5
  runtime?: string;
14
6
  codexRuntime?: string;
@@ -0,0 +1,14 @@
1
+ export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.27";
2
+ export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.23";
3
+ export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.23";
4
+ export declare function opencodeExactPairInstallCommand(): string;
5
+ /** Runtime capability advertised by agent-node's operator-facing help. */
6
+ export declare function agentNodeHelpSupportsOpencode(help: string): boolean;
7
+ /**
8
+ * Resolve a package-owned agent-node entrypoint and verify its immutable
9
+ * release identity before it can receive `opencode-cli`. Capability text is
10
+ * not a security boundary: an older preview already advertised the runtime.
11
+ */
12
+ export declare function validateAgentNodePackageEntrypoint(rawEntrypoint: string, packageSpec: string, expectedVersion?: string, forbiddenRoots?: readonly string[]): string;
13
+ /** Skip invalid/local PATH shims and return the first exact trusted package. */
14
+ export declare function resolveAgentNodePackageEntrypointFromPath(searchPath: string, packageSpec: string, expectedVersion: string, forbiddenRoots?: readonly string[]): string;
@@ -0,0 +1,43 @@
1
+ import type { OpencodePresetId } from "./opencode-preset";
2
+ export declare const OPENCODE_AUTH_LOGIN_ROOT_PREFIX = "opencode-auth-login-";
3
+ export declare const OPENCODE_AUTH_LOGIN_OWNER_FILE = ".owner.json";
4
+ export declare const OPENCODE_AUTH_LOGIN_CLEANUP_PREFIX = ".anet-opencode-auth-cleanup-";
5
+ export interface OpencodeAuthLoginSandbox {
6
+ readonly nodeWorkDir: string;
7
+ readonly provider: OpencodePresetId;
8
+ readonly root: string;
9
+ readonly cwd: string;
10
+ readonly authPath: string;
11
+ readonly env: Readonly<NodeJS.ProcessEnv>;
12
+ }
13
+ export interface CreateOpencodeAuthLoginSandboxOptions {
14
+ nodeWorkDir: string;
15
+ provider: OpencodePresetId | string;
16
+ parentEnv?: NodeJS.ProcessEnv;
17
+ /** Internal/test-only trusted external base override. */
18
+ launchBase?: string;
19
+ }
20
+ export interface OpencodeAuthLoginCredential {
21
+ provider: OpencodePresetId;
22
+ type: "api";
23
+ key: string;
24
+ }
25
+ /** Deterministic exact-1.18.1 login argv for the selected API-key flow. */
26
+ export declare function buildOpencodeAuthLoginArgs(provider: OpencodePresetId | string): string[];
27
+ /** Prepare a fresh, node-scoped environment for one interactive login. */
28
+ export declare function createOpencodeAuthLoginSandbox(options: CreateOpencodeAuthLoginSandboxOptions): OpencodeAuthLoginSandbox;
29
+ /** Repeat external-root ancestor and inode validation immediately before the
30
+ * vetted upstream binary is spawned. */
31
+ export declare function revalidateOpencodeAuthLoginSandbox(sandbox: OpencodeAuthLoginSandbox): void;
32
+ /**
33
+ * Read only the selected provider's exact API-key shape from the fresh root.
34
+ * OAuth/browser-login records and mixed/multi-provider documents are refused.
35
+ */
36
+ export declare function readOpencodeAuthLoginCredential(sandbox: OpencodeAuthLoginSandbox): OpencodeAuthLoginCredential;
37
+ /** Safely remove a sandbox created by this process. Idempotent after removal. */
38
+ export declare function cleanupOpencodeAuthLoginSandbox(sandbox: OpencodeAuthLoginSandbox): void;
39
+ /**
40
+ * Lifecycle helper for CLI integration. Spawn/wait/read the credential inside
41
+ * `action`; the fresh tree is cleaned on success, child failure, or throw.
42
+ */
43
+ export declare function withOpencodeAuthLoginSandbox<T>(options: CreateOpencodeAuthLoginSandboxOptions, action: (sandbox: OpencodeAuthLoginSandbox) => T | Promise<T>): Promise<T>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Process-loader hooks that must never cross the opencode-cli launcher
3
+ * boundary. The exact agent-node package/entrypoint check happens before the
4
+ * node profile env is merged; allowing that profile to supply one of these
5
+ * variables would let code run before the verified entrypoint's first line.
6
+ */
7
+ export declare const OPENCODE_AGENT_NODE_LOADER_ENV_KEYS: readonly ["NODE_OPTIONS", "NODE_PATH", "NODE_V8_COVERAGE", "NODE_REDIRECT_WARNINGS", "NODE_COMPILE_CACHE", "BUN_OPTIONS", "BUN_PRELOAD", "LD_PRELOAD", "LD_LIBRARY_PATH", "LD_AUDIT", "LD_DEBUG_OUTPUT", "DYLD_INSERT_LIBRARIES", "DYLD_LIBRARY_PATH", "DYLD_FRAMEWORK_PATH", "DYLD_FALLBACK_LIBRARY_PATH", "OPENSSL_CONF", "OPENSSL_ENGINES", "OPENSSL_MODULES"];
8
+ /**
9
+ * Return a child env that preserves the launcher's original executable search
10
+ * path and removes pre-entrypoint loader/write hooks. Other operator settings
11
+ * (locale, proxy, custom CA, channel integration) remain backward-compatible.
12
+ */
13
+ export declare function hardenOpencodeAgentNodeEnv(source: NodeJS.ProcessEnv, launcherPath: string | undefined): NodeJS.ProcessEnv;
@@ -0,0 +1,6 @@
1
+ /** Linux user-private-group compatibility for ordinary umask 0002 installs. */
2
+ export declare function opencodeOwnedPathModeIsSafe(stat: {
3
+ uid: number;
4
+ gid: number;
5
+ mode: number | bigint;
6
+ }, runtimeUid?: number | undefined, runtimeGid?: number | undefined): boolean;
@@ -0,0 +1,21 @@
1
+ export interface ValidateOpencodePackageBinaryOptions {
2
+ expectedVersion: string;
3
+ /** A package payload may not be inside, or contain, the current project or
4
+ * node state tree. This rejects project-local same-version impersonators. */
5
+ forbiddenRoots?: readonly string[];
6
+ }
7
+ /** Current cwd plus every enclosing source-workspace boundary. This catches a
8
+ * monorepo root's node_modules when anet is invoked from packages/app. */
9
+ export declare function discoverOpencodeForbiddenRoots(cwd?: string): string[];
10
+ /**
11
+ * Bind an executable to the exact npm `opencode-ai` payload identity.
12
+ *
13
+ * `--version` output alone is not an identity boundary: a checkout can put a
14
+ * same-version credential-stealing shim first on PATH. Only the canonical
15
+ * package entrypoint with matching package metadata and trusted path modes is
16
+ * admitted. The returned path is the one callers must spawn verbatim.
17
+ */
18
+ export declare function validateOpencodePackageBinary(rawBinary: string, options: ValidateOpencodePackageBinaryOptions): string;
19
+ /** Resolve the first *valid package-owned* OpenCode entry on PATH. Invalid
20
+ * project-local shims are skipped so a later trusted global install can win. */
21
+ export declare function resolveOpencodePackageBinaryFromPath(searchPath: string, options: ValidateOpencodePackageBinaryOptions): string;
@@ -4,7 +4,12 @@
4
4
  * PR② e2e in a fresh checkout. `readEffectivePin()` still returns
5
5
  * this when no override file exists.
6
6
  */
7
- export declare const OPENCODE_BUILTIN_PIN = "1.17.13";
7
+ export declare const OPENCODE_BUILTIN_PIN = "1.18.1";
8
+ /** Exact upstream remediation shared by every CLI failure path. */
9
+ export declare function opencodeExactInstallCommand(version?: string): string;
10
+ /** Preserve package-identity diagnostics while always leaving a missing or
11
+ * untrusted install with an actionable exact-pin command. */
12
+ export declare function formatOpencodePackageIdentityFailure(expectedVersion: string, detail: string): string;
8
13
  /** Where the per-machine override lives. Kept under `~/.anet/` so
9
14
  * it sits next to the other anet-local state. */
10
15
  export declare function opencodePinFilePath(homeDirOverride?: string): string;
@@ -10,6 +10,16 @@ export interface OpencodePreset {
10
10
  configProviderId: "anthropic" | "openai";
11
11
  }
12
12
  export declare const OPENCODE_PRESETS: OpencodePreset[];
13
+ /**
14
+ * OpenCode tools disabled for the default `opencode-cli` profile.
15
+ *
16
+ * This policy reduces the model's ambient filesystem/shell surface. It is
17
+ * deliberately represented in the generated opencode.json so operators can
18
+ * inspect the default, but it is not an OS security boundary: a same-uid
19
+ * OpenCode process can still read files allowed by normal filesystem ACLs.
20
+ */
21
+ export declare const OPENCODE_DEFAULT_DISABLED_TOOLS: readonly ["bash", "read", "glob", "grep", "edit", "write", "list", "task", "skill", "question"];
22
+ export declare function buildOpencodeDefaultToolsPolicy(): Record<string, false>;
13
23
  export declare function findOpencodePreset(id: string): OpencodePreset | null;
14
24
  /**
15
25
  * Look up the API key for a preset from the current process env.
@@ -22,22 +32,41 @@ export declare function readPresetKeyFromEnv(preset: OpencodePreset, env?: NodeJ
22
32
  /**
23
33
  * opencode.ai's auth.json shape:
24
34
  * { "<providerId>": { "type": "api", "key": "..." } }
25
- * Same shape Phase 0b probes verified against opencode-ai@1.17.13.
35
+ * Same shape verified against the release pin opencode-ai@1.18.1.
26
36
  */
27
37
  export declare function buildAuthJsonBody(preset: OpencodePreset, apiKey: string): string;
38
+ export type OpencodePrivateProfileFilename = "config.json" | ".env";
39
+ /**
40
+ * Establish the boundary before saveProfile/rewritePlainSecrets writes the
41
+ * node token or dotenv key. The expected shape is exactly
42
+ * `<project>/.anet/nodes/<node>`. Every existing path is inspected with
43
+ * lstat + O_NOFOLLOW and inode checks; absent private directories are created
44
+ * one component at a time. A pre-planted node-root/config/.env symlink is a
45
+ * hard error before any secret-bearing write.
46
+ */
47
+ export declare function prepareOpencodeNodeForProfileWrite(nodeWorkDir: string): string;
48
+ export declare function readOpencodePrivateProfileFile(nodeWorkDir: string, filename: OpencodePrivateProfileFilename): string | undefined;
49
+ export declare function writeOpencodePrivateProfileFile(nodeWorkDir: string, filename: OpencodePrivateProfileFilename, body: string): string;
28
50
  /**
29
51
  * Write auth.json into the opencode config root that lives under
30
- * `nodeWorkDir` (which becomes the child's HOME per PR② §8 D5).
31
- * mode 0o600 keeps it operator-only. Directory is created if
32
- * missing.
52
+ * `nodeWorkDir` (the per-node OpenCode data root). mode 0o600 limits
53
+ * filesystem access to the owning OS account; it does not prevent a
54
+ * same-uid OpenCode child from opening the file directly. Directory is
55
+ * created if missing.
33
56
  *
34
57
  * Returns the absolute path we wrote for logging.
35
58
  */
36
59
  export declare function writeOpencodeAuthJson(nodeWorkDir: string, preset: OpencodePreset, apiKey: string): string;
37
60
  /**
38
- * Companion opencode.json: pins the vendor's baseUrl (defaults for
39
- * Anthropic / OpenAI are fine, so this is minimal for now). A
40
- * placeholder so later PRs can push per-node overrides without
41
- * needing to invent the file.
61
+ * New keyless nodes must not inherit a private-but-preplanted credential.
62
+ * Keep the file present as an explicit empty object so the creation log's
63
+ * "auth not configured" statement matches the state OpenCode will consume.
64
+ */
65
+ export declare function clearOpencodeAuthJson(nodeWorkDir: string): string;
66
+ /**
67
+ * Companion opencode.json: records only the selected blessed provider
68
+ * identity and safe-by-default tool policy. Pre-existing model routing and
69
+ * arbitrary OpenCode integrations are stripped; operators may explicitly set
70
+ * a model after creation, which the runtime's separate safe renderer retains.
42
71
  */
43
72
  export declare function writeOpencodeConfigJson(nodeWorkDir: string, preset: OpencodePreset): string;
@@ -0,0 +1,27 @@
1
+ /** Exact 1.18.1 project/instruction discovery surface plus project-root
2
+ * redirects. Any existing entry, including a broken symlink, is a refusal. */
3
+ export declare const OPENCODE_SAFE_ANCESTOR_CANDIDATES: readonly ["opencode.jsonc", "opencode.json", ".opencode", "AGENTS.md", "CLAUDE.md", "CONTEXT.md", ".claude", ".agents", ".git"];
4
+ interface PathIdentity {
5
+ path: string;
6
+ dev: number | bigint;
7
+ ino: number | bigint;
8
+ }
9
+ export interface OpencodeSafeExternalRoot {
10
+ readonly base: string;
11
+ readonly root: string;
12
+ readonly cwd: string;
13
+ readonly dev: number | bigint;
14
+ readonly ino: number | bigint;
15
+ readonly baseDev: number | bigint;
16
+ readonly baseIno: number | bigint;
17
+ readonly ancestors: readonly PathIdentity[];
18
+ }
19
+ export declare function resolveOpencodeTrustedRuntimeBase(explicit?: string): PathIdentity;
20
+ export declare function createOpencodeSafeExternalRoot(options: {
21
+ prefix: string;
22
+ boundaries?: readonly string[];
23
+ base?: string;
24
+ }): OpencodeSafeExternalRoot;
25
+ export declare function revalidateOpencodeSafeExternalRoot(context: OpencodeSafeExternalRoot): void;
26
+ export declare function cleanupOpencodeSafeExternalRoot(context: OpencodeSafeExternalRoot): void;
27
+ export {};
@@ -0,0 +1 @@
1
+ export declare function buildOpencodeSmokeEnv(parentEnv: NodeJS.ProcessEnv, smokeRoot: string, cwd?: string): NodeJS.ProcessEnv;
@@ -0,0 +1,15 @@
1
+ import type { RuntimeName } from "./normalize-runtime";
2
+ export interface RuntimeChoice {
3
+ value: RuntimeName;
4
+ name: string;
5
+ }
6
+ /**
7
+ * Single source of truth for every `anet node create` runtime picker.
8
+ *
9
+ * Keep this exact and ordered: the release gate imports this pure module to
10
+ * prove that the rendered seven-way preview picker has neither a missing
11
+ * OpenCode entry nor an unreviewed eighth choice.
12
+ */
13
+ export declare const RUNTIME_CHOICES: readonly RuntimeChoice[];
14
+ /** Inquirer mutates choice objects in some prompt paths; return fresh rows. */
15
+ export declare function createRuntimeChoices(): RuntimeChoice[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sleep2agi/agent-network",
3
- "version": "2.3.0-preview.25",
4
- "description": "AI Agent Network CLI — Local-first multi-agent orchestration across 4 runtimes (Claude Code CLI / Claude Agent SDK / Codex SDK / Grok Build ACP) and 8+ LLM providers (Anthropic / OpenAI / xAI Grok / MiniMax / DeepSeek / GLM / Kimi / InternLM / Xiaomi MiMo / OpenRouter). Apache 2.0.",
3
+ "version": "2.3.0-preview.27",
4
+ "description": "AI Agent Network CLI — Local-first multi-agent orchestration across Claude, Codex, Grok (ACP plus experimental co-presence TUI), and OpenCode runtimes. Apache 2.0.",
5
5
  "type": "module",
6
6
  "main": "dist/src/client.js",
7
7
  "types": "dist/client.d.ts",
@@ -36,6 +36,9 @@
36
36
  "grok",
37
37
  "xai",
38
38
  "grok-build-acp",
39
+ "grok-build-cli",
40
+ "grok-tui",
41
+ "copresence",
39
42
  "acp",
40
43
  "minimax",
41
44
  "mimo",
@@ -54,7 +57,8 @@
54
57
  "directory": "agent-network"
55
58
  },
56
59
  "publishConfig": {
57
- "access": "public"
60
+ "access": "public",
61
+ "tag": "preview"
58
62
  },
59
63
  "bugs": {
60
64
  "url": "https://github.com/sleep2agi/agent-network/issues"