@sleep2agi/agent-network 2.3.0-preview.40 → 2.3.0-preview.42
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.
- package/dist/bin/cli.js +2 -2
- package/dist/src/client.js +1 -1
- package/dist/src/codex-copresence-preflight.d.ts +65 -0
- package/dist/src/codex-copresence-profile.d.ts +68 -0
- package/dist/src/copresence-deps.d.ts +20 -0
- package/dist/src/im/feishu/worker.js +1 -1
- package/dist/src/node-server.js +7 -7
- package/dist/src/opencode-agent-node-pair.d.ts +1 -1
- package/package.json +1 -1
package/dist/src/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a0_0x48272b=a0_0x4270;(function(_0x518421,_0x24257a){const _0x28eaa4=a0_0x4270,_0x3c9de8=_0x518421();while(!![]){try{const _0x586398=-parseInt(_0x28eaa4(0x242))/0x1+parseInt(_0x28eaa4(0x240))/0x2+parseInt(_0x28eaa4(0x229))/0x3*(parseInt(_0x28eaa4(0x24f))/0x4)+parseInt(_0x28eaa4(0x1ff))/0x5*(-parseInt(_0x28eaa4(0x263))/0x6)+parseInt(_0x28eaa4(0x22c))/0x7+parseInt(_0x28eaa4(0x214))/0x8*(parseInt(_0x28eaa4(0x262))/0x9)+-parseInt(_0x28eaa4(0x225))/0xa;if(_0x586398===_0x24257a)break;else _0x3c9de8['push'](_0x3c9de8['shift']());}catch(_0x51d780){_0x3c9de8['push'](_0x3c9de8['shift']());}}}(a0_0x4f75,0xd5184));import{EventEmitter as a0_0x5582f2}from'events';import{hostname as a0_0x56836f}from'os';var K=/(?:atok|ntok|utok|ghp|github_pat)_[A-Za-z0-9_-]+|Bearer\s+\S+/gi,L=(_0x552101,_0x16b042)=>(_0x552101??_0x16b042)[a0_0x48272b(0x230)](/[\r\n\x00-\x1f\x7f]/g,'\x20')['slice'](0x0,0xf0);function N(_0x53dcd9){const _0x2d194a=a0_0x48272b;return(_0x53dcd9 instanceof Error?_0x53dcd9['message']:String(_0x53dcd9??_0x2d194a(0x236)))[_0x2d194a(0x230)](K,_0x2d194a(0x258))[_0x2d194a(0x230)](/[\r\n\x00-\x1f\x7f]/g,'\x20')[_0x2d194a(0x260)](0x0,0xf0);}function O(_0x430111,_0x3b7071=process.env.ANET_TASK_TRACE_FORMAT===a0_0x48272b(0x23b)){const _0x37ee88=a0_0x48272b;if(_0x3b7071)return JSON[_0x37ee88(0x245)](_0x430111);let _0x4acdff=L(_0x430111['parent_task_id'],_0x37ee88(0x1ef)),_0x3add72=L(_0x430111[_0x37ee88(0x22e)],_0x37ee88(0x251)),_0x414faf=_0x430111['error_code']?_0x37ee88(0x219)+_0x430111['error_code']+':'+(_0x430111['error_message']??''):'';return _0x37ee88(0x228)+_0x430111[_0x37ee88(0x1fa)]+_0x37ee88(0x246)+L(_0x430111[_0x37ee88(0x22a)],_0x37ee88(0x244))+_0x37ee88(0x20b)+L(_0x430111[_0x37ee88(0x1f7)],_0x37ee88(0x244))+_0x37ee88(0x220)+_0x3add72+_0x37ee88(0x232)+_0x4acdff+_0x37ee88(0x1f5)+L(_0x430111['network_id'],_0x37ee88(0x244))+'\x20transport='+_0x430111[_0x37ee88(0x267)]+_0x37ee88(0x239)+_0x430111['duration_ms']+_0x37ee88(0x211)+_0x430111[_0x37ee88(0x204)]+_0x414faf;}function U(_0x1745a2){const _0x59ecd6=a0_0x48272b;return{'event':{'sending':_0x59ecd6(0x206),'delivered':_0x59ecd6(0x1f9),'failed':_0x59ecd6(0x1f2),'acked':_0x59ecd6(0x250),'started':_0x59ecd6(0x24e),'replied':'task.replied','expired':_0x59ecd6(0x1ee)}[_0x1745a2[_0x59ecd6(0x1fa)]],..._0x1745a2};}function a0_0x4f75(){const _0x3c7394=['name','heartbeatInterval','task.started','88qkXYlc','task.ack','<pending>','min','connectSSE','2.0','toString','getAllStatus','now','[REDACTED]','split','send_message','autoConnect','tools/call','catch','fromAlias','send','slice','application/json,\x20text/event-stream','27DpQXWL','541110YVYbgL','getReader','call','startsWith','transport','error','send_reply','result','task.expired','<missing>','idle','/mcp','task.send.failed','failed','completed','\x20network_id=','running','to_alias','log','task.send.delivered','status','type','resumeId','ack_inbox',']\x20[commhub:','80dPvtXV','task','sseAbort','read','lifecycleTracking','lifecycle_tracking','normal','task.send.start','alias','offline','message_id','report_status','\x20to=','send_rejected','CommHub\x20response\x20omitted\x20task_id','agent','broadcast','mcp_http','\x20lifecycle=','heartbeat\x20failed:\x20','Authorization','3354704AKYsOD','content','data:\x20','processInbox','toTimeString','\x20error=','send_task','new_message','connected','decode','SSE\x20failed:\x20','parentTaskId','\x20task_id=','disconnected','body','url','SSE\x20connected','1383540mYhJmK','connect','Bearer\x20','[commhub:task]\x20','41589tbyqgw','from_alias','token','5114235OYgWUU','signal','task_id','reconnectDelay','replace','get_inbox','\x20parent_task_id=','pop','heartbeatTimer','application/json','unknown\x20error','server','emit','\x20duration_ms=','delivered','json','networkId','sleep','inbox\x20error:\x20','get_all_status','518624iOrovF','text','98767TaVubW','/events/','<unknown>','stringify','\x20from=','parse','message','text/event-stream','sdk','toAlias'];a0_0x4f75=function(){return _0x3c7394;};return a0_0x4f75();}function j(_0xef2634){const _0xc62a7d=a0_0x48272b;let _0xcd4873=_0xef2634?.[_0xc62a7d(0x22e)]||_0xef2634?.[_0xc62a7d(0x209)]||_0xef2634?.['id'];if(_0xcd4873)return String(_0xcd4873);let _0x5cd0b5=_0xef2634?.[_0xc62a7d(0x215)]?.[0x0]?.['text'];if(typeof _0x5cd0b5!=='string')return null;try{let _0x36edf7=JSON['parse'](_0x5cd0b5);return _0x36edf7?.[_0xc62a7d(0x22e)]||_0x36edf7?.[_0xc62a7d(0x209)]||_0x36edf7?.['id']||null;}catch{return null;}}async function X(_0xfad233,_0x4feb00){const _0x4f15f1=a0_0x48272b;let _0x4f3335=_0x4feb00['now']??Date[_0x4f15f1(0x257)],_0x13b6c2=_0x4f3335(),_0x45e6fd=(_0xc4ef21,_0x5491ad,_0x9e9b6d,_0x10b7d8)=>{const _0x142824=_0x4f15f1;_0x4feb00[_0x142824(0x1f8)](O(U({'from_alias':_0xfad233[_0x142824(0x25e)],'to_alias':_0xfad233[_0x142824(0x24b)],'task_id':_0x5491ad,'parent_task_id':_0xfad233[_0x142824(0x21f)],'network_id':_0xfad233[_0x142824(0x23c)],'transport':_0xfad233[_0x142824(0x267)],'status':_0xc4ef21,'duration_ms':_0x4f3335()-_0x13b6c2,'lifecycle_tracking':_0xfad233[_0x142824(0x203)],..._0x9e9b6d!==void 0x0?{'error_code':_0x10b7d8||'send_failed','error_message':N(_0x9e9b6d)}:{}})));};_0x45e6fd('sending',null);try{let _0x26e393=await _0x4feb00[_0x4f15f1(0x25f)](),_0xc48db5=j(_0x26e393);if(_0xc48db5)_0x45e6fd(_0x4f15f1(0x23a),_0xc48db5);else{if(_0x26e393?.['ok']===!0x1||_0x26e393?.[_0x4f15f1(0x268)])_0x45e6fd(_0x4f15f1(0x1f3),_0xc48db5,_0x26e393?.[_0x4f15f1(0x268)]||'CommHub\x20rejected\x20task',_0x4f15f1(0x20c));else _0x45e6fd('failed',null,_0x4f15f1(0x20d),'missing_task_id');}return _0x26e393;}catch(_0x5e4fa3){throw _0x45e6fd(_0x4f15f1(0x1f3),null,_0x5e4fa3,'send_failed'),_0x5e4fa3;}}async function Y(_0x130bf6,_0x45cf15){const _0x8fe689=a0_0x48272b;return X({'fromAlias':_0x130bf6[_0x8fe689(0x25e)],'toAlias':_0x130bf6[_0x8fe689(0x207)],'parentTaskId':_0x130bf6[_0x8fe689(0x21f)]||null,'networkId':_0x130bf6[_0x8fe689(0x23c)]||null,'transport':_0x8fe689(0x210),'lifecycleTracking':'not_tracked'},_0x45cf15);}class $ extends a0_0x5582f2{['url'];[a0_0x48272b(0x207)];['token'];[a0_0x48272b(0x20e)];['resumeId'];[a0_0x48272b(0x24d)];[a0_0x48272b(0x22f)];[a0_0x48272b(0x234)];[a0_0x48272b(0x201)];[a0_0x48272b(0x1f6)]=!0x1;constructor(_0x9168e9){const _0x3cee55=a0_0x48272b;super();if(this['url']=_0x9168e9[_0x3cee55(0x223)][_0x3cee55(0x230)](/\/$/,''),this[_0x3cee55(0x207)]=_0x9168e9[_0x3cee55(0x207)],this[_0x3cee55(0x22b)]=_0x9168e9[_0x3cee55(0x22b)],this[_0x3cee55(0x20e)]=_0x9168e9[_0x3cee55(0x20e)]||_0x3cee55(0x24a),this[_0x3cee55(0x1fc)]='sdk-'+_0x9168e9[_0x3cee55(0x207)]+'-'+Date[_0x3cee55(0x257)]()[_0x3cee55(0x255)](0x24),this[_0x3cee55(0x24d)]=_0x9168e9[_0x3cee55(0x24d)]??0x2bf20,this[_0x3cee55(0x22f)]=_0x9168e9[_0x3cee55(0x22f)]??0xbb8,_0x9168e9[_0x3cee55(0x25b)]!==!0x1)this[_0x3cee55(0x226)]();}[a0_0x48272b(0x1f8)](_0x16c4a2){const _0x3f1fd5=a0_0x48272b;console[_0x3f1fd5(0x1f8)]('['+new Date()[_0x3f1fd5(0x218)]()['slice'](0x0,0x8)+_0x3f1fd5(0x1fe)+this['alias']+']\x20'+_0x16c4a2);}async[a0_0x48272b(0x265)](_0x3e61ec,_0x213d75){const _0x3a5cb0=a0_0x48272b;let _0x2fd48e={'Content-Type':_0x3a5cb0(0x235),'Accept':_0x3a5cb0(0x261)};if(this[_0x3a5cb0(0x22b)])_0x2fd48e['Authorization']=_0x3a5cb0(0x227)+this[_0x3a5cb0(0x22b)];let _0x103818=await(await fetch(this[_0x3a5cb0(0x223)]+_0x3a5cb0(0x1f1),{'method':'POST','headers':_0x2fd48e,'body':JSON[_0x3a5cb0(0x245)]({'jsonrpc':_0x3a5cb0(0x254),'id':Date[_0x3a5cb0(0x257)](),'method':_0x3a5cb0(0x25c),'params':{'name':_0x3e61ec,'arguments':_0x213d75}})}))[_0x3a5cb0(0x241)](),_0x5c0b84=_0x103818['match'](/data: (.+)/),_0x1831f2=_0x5c0b84?JSON[_0x3a5cb0(0x247)](_0x5c0b84[0x1]):JSON[_0x3a5cb0(0x247)](_0x103818),_0x2be163=_0x1831f2?.[_0x3a5cb0(0x1ed)]?.[_0x3a5cb0(0x215)]?.[0x0]?.[_0x3a5cb0(0x241)];return _0x2be163?JSON[_0x3a5cb0(0x247)](_0x2be163):_0x1831f2;}async[a0_0x48272b(0x226)](){const _0x4f17af=a0_0x48272b;if(this[_0x4f17af(0x1f6)])return;this[_0x4f17af(0x1f6)]=!0x0,await this[_0x4f17af(0x1fa)](_0x4f17af(0x1f0)),this['log']('registered'),this[_0x4f17af(0x234)]=setInterval(()=>{const _0x37bccc=_0x4f17af;this['status']('idle')['catch'](_0x52e170=>this[_0x37bccc(0x1f8)](_0x37bccc(0x212)+_0x52e170['message']));},this[_0x4f17af(0x24d)]),this[_0x4f17af(0x253)]();}async['disconnect'](){const _0x3164cc=a0_0x48272b;if(this[_0x3164cc(0x1f6)]=!0x1,this['sseAbort']?.['abort'](),this[_0x3164cc(0x234)])clearInterval(this['heartbeatTimer']);await this[_0x3164cc(0x1fa)](_0x3164cc(0x208))[_0x3164cc(0x25d)](()=>{}),this['log']('disconnected');}async[a0_0x48272b(0x25f)](_0x19d492,_0x51f329,_0x332591=a0_0x48272b(0x205)){const _0x6db59b=a0_0x48272b;return Y({'alias':_0x19d492,'fromAlias':this['alias']},{'log':_0x427ec5=>console[_0x6db59b(0x1f8)](_0x427ec5),'send':()=>this[_0x6db59b(0x265)](_0x6db59b(0x21a),{'alias':_0x19d492,'task':_0x51f329,'priority':_0x332591,'from_session':this[_0x6db59b(0x207)]})});}async['message'](_0x11f237,_0x527b95){const _0x4c312b=a0_0x48272b;return this['call'](_0x4c312b(0x25a),{'alias':_0x11f237,'message':_0x527b95,'from_session':this[_0x4c312b(0x207)]});}async['reply'](_0xb6822d,_0x4032f4,_0x55a2e0=a0_0x48272b(0x1f4)){const _0x20f505=a0_0x48272b;return this['call'](_0x20f505(0x269),{'in_reply_to':_0xb6822d,'text':_0x4032f4,'status':_0x55a2e0});}async[a0_0x48272b(0x1fa)](_0xdcd44d,_0xd200e7){const _0x16ca54=a0_0x48272b;return this[_0x16ca54(0x265)](_0x16ca54(0x20a),{'resume_id':this['resumeId'],'alias':this['alias'],'status':_0xdcd44d,'server':a0_0x56836f(),'hostname':a0_0x56836f(),'agent':this[_0x16ca54(0x20e)],'project_dir':process['cwd'](),..._0xd200e7});}async[a0_0x48272b(0x256)](){const _0x27abd0=a0_0x48272b;return this['call'](_0x27abd0(0x23f),{});}async[a0_0x48272b(0x20f)](_0x2f8faf,_0xd49d11){const _0x2136d8=a0_0x48272b;return this[_0x2136d8(0x265)]('broadcast',{'message':_0x2f8faf,'filter_server':_0xd49d11?.[_0x2136d8(0x237)],'filter_status':_0xd49d11?.[_0x2136d8(0x1fa)]});}async[a0_0x48272b(0x253)](){const _0x497fbb=a0_0x48272b;let _0x5f3279=encodeURIComponent(this[_0x497fbb(0x207)]),_0x19cb7d=this[_0x497fbb(0x223)]+_0x497fbb(0x243)+_0x5f3279,_0x3e2421=this[_0x497fbb(0x22f)];while(this[_0x497fbb(0x1f6)]){try{this[_0x497fbb(0x201)]=new AbortController();let _0x352782={'Accept':_0x497fbb(0x249)};if(this[_0x497fbb(0x22b)])_0x352782[_0x497fbb(0x213)]=_0x497fbb(0x227)+this['token'];let _0x30033=await fetch(_0x19cb7d,{'headers':_0x352782,'signal':this['sseAbort'][_0x497fbb(0x22d)]});if(!_0x30033['ok']||!_0x30033[_0x497fbb(0x222)]){this[_0x497fbb(0x1f8)](_0x497fbb(0x21e)+_0x30033['status']),await this[_0x497fbb(0x23d)](_0x3e2421),_0x3e2421=Math[_0x497fbb(0x252)](_0x3e2421*1.5,0xea60);continue;}_0x3e2421=this[_0x497fbb(0x22f)];let _0x2a0e20=_0x30033['body'][_0x497fbb(0x264)](),_0x189b3d=new TextDecoder(),_0x3f75e3='';while(this[_0x497fbb(0x1f6)]){let {done:_0x1a583b,value:_0x119e48}=await _0x2a0e20[_0x497fbb(0x202)]();if(_0x1a583b)break;_0x3f75e3+=_0x189b3d[_0x497fbb(0x21d)](_0x119e48,{'stream':!0x0});let _0x144efc=_0x3f75e3[_0x497fbb(0x259)]('\x0a');_0x3f75e3=_0x144efc[_0x497fbb(0x233)]()||'';for(let _0x5c2778 of _0x144efc){if(!_0x5c2778[_0x497fbb(0x266)](_0x497fbb(0x216)))continue;try{let _0x2d5dd3=JSON['parse'](_0x5c2778[_0x497fbb(0x260)](0x6));if(_0x2d5dd3['type']===_0x497fbb(0x21c)){this[_0x497fbb(0x1f8)](_0x497fbb(0x224)),this[_0x497fbb(0x238)](_0x497fbb(0x21c));continue;}if(_0x2d5dd3[_0x497fbb(0x1fb)]==='new_task'||_0x2d5dd3[_0x497fbb(0x1fb)]===_0x497fbb(0x21b)||_0x2d5dd3[_0x497fbb(0x1fb)]===_0x497fbb(0x20f))await this[_0x497fbb(0x217)]();}catch{}}}}catch(_0x234b32){if(_0x234b32[_0x497fbb(0x24c)]==='AbortError')break;this[_0x497fbb(0x238)](_0x497fbb(0x268),_0x234b32),this['log']('SSE\x20error:\x20'+_0x234b32[_0x497fbb(0x248)]);}if(this[_0x497fbb(0x1f6)])this[_0x497fbb(0x238)](_0x497fbb(0x221)),this[_0x497fbb(0x1f8)]('SSE\x20reconnecting\x20in\x20'+_0x3e2421/0x3e8+'s...'),await this[_0x497fbb(0x23d)](_0x3e2421),_0x3e2421=Math['min'](_0x3e2421*1.5,0xea60);}}async['processInbox'](){const _0x5473b0=a0_0x48272b;try{let _0x49d8ca=(await this[_0x5473b0(0x265)](_0x5473b0(0x231),{'alias':this[_0x5473b0(0x207)],'limit':0xa}))?.['messages']||[];for(let _0x5554a2 of _0x49d8ca)await this['call'](_0x5473b0(0x1fd),{'alias':this[_0x5473b0(0x207)],'message_id':_0x5554a2['id']}),this['log']('←\x20'+_0x5554a2['from_session']+':\x20'+_0x5554a2[_0x5473b0(0x215)][_0x5473b0(0x260)](0x0,0x3c)),this['emit'](_0x5473b0(0x200),_0x5554a2),this[_0x5473b0(0x238)](_0x5473b0(0x248),_0x5554a2);}catch(_0x2729c7){this['log'](_0x5473b0(0x23e)+_0x2729c7[_0x5473b0(0x248)]);}}['sleep'](_0x235230){return new Promise(_0x47d8e1=>setTimeout(_0x47d8e1,_0x235230));}}function a0_0x4270(_0x32b12a,_0x15415d){_0x32b12a=_0x32b12a-0x1ed;const _0x4f750b=a0_0x4f75();let _0x427085=_0x4f750b[_0x32b12a];return _0x427085;}var F=$;export{F as default,$ as CommHub};
|
|
1
|
+
const a0_0x56022d=a0_0x38ca;(function(_0x4629b9,_0x118604){const _0x54356c=a0_0x38ca,_0x36e29d=_0x4629b9();while(!![]){try{const _0x782cb0=-parseInt(_0x54356c(0xc7))/0x1+parseInt(_0x54356c(0xe0))/0x2+-parseInt(_0x54356c(0x130))/0x3+parseInt(_0x54356c(0xf4))/0x4+parseInt(_0x54356c(0x12a))/0x5+-parseInt(_0x54356c(0x10a))/0x6+parseInt(_0x54356c(0x12b))/0x7*(parseInt(_0x54356c(0xe9))/0x8);if(_0x782cb0===_0x118604)break;else _0x36e29d['push'](_0x36e29d['shift']());}catch(_0x5f59e6){_0x36e29d['push'](_0x36e29d['shift']());}}}(a0_0x5110,0x9ffa8));import{EventEmitter as a0_0x502e16}from'events';import{hostname as a0_0xc59dae}from'os';var K=/(?:atok|ntok|utok|ghp|github_pat)_[A-Za-z0-9_-]+|Bearer\s+\S+/gi,L=(_0x45714e,_0x17e0c8)=>(_0x45714e??_0x17e0c8)[a0_0x56022d(0xf3)](/[\r\n\x00-\x1f\x7f]/g,'\x20')[a0_0x56022d(0x110)](0x0,0xf0);function a0_0x38ca(_0x31ae90,_0x4ae8da){_0x31ae90=_0x31ae90-0xc1;const _0x51105e=a0_0x5110();let _0x38cab4=_0x51105e[_0x31ae90];return _0x38cab4;}function N(_0x50c6fb){const _0x482290=a0_0x56022d;return(_0x50c6fb instanceof Error?_0x50c6fb['message']:String(_0x50c6fb??_0x482290(0x104)))[_0x482290(0xf3)](K,_0x482290(0x11d))[_0x482290(0xf3)](/[\r\n\x00-\x1f\x7f]/g,'\x20')[_0x482290(0x110)](0x0,0xf0);}function O(_0x248b50,_0x4e3665=process.env.ANET_TASK_TRACE_FORMAT==='json'){const _0x3c39a6=a0_0x56022d;if(_0x4e3665)return JSON[_0x3c39a6(0x111)](_0x248b50);let _0x5aa6b1=L(_0x248b50[_0x3c39a6(0x107)],_0x3c39a6(0xf7)),_0x1fb156=L(_0x248b50[_0x3c39a6(0xee)],_0x3c39a6(0x109)),_0x201c3c=_0x248b50[_0x3c39a6(0xcc)]?_0x3c39a6(0xca)+_0x248b50[_0x3c39a6(0xcc)]+':'+(_0x248b50[_0x3c39a6(0xe1)]??''):'';return _0x3c39a6(0x10b)+_0x248b50['status']+_0x3c39a6(0xc5)+L(_0x248b50[_0x3c39a6(0xc6)],_0x3c39a6(0x125))+_0x3c39a6(0xde)+L(_0x248b50[_0x3c39a6(0x106)],_0x3c39a6(0x125))+'\x20task_id='+_0x1fb156+'\x20parent_task_id='+_0x5aa6b1+_0x3c39a6(0x10d)+L(_0x248b50[_0x3c39a6(0xf2)],_0x3c39a6(0x125))+'\x20transport='+_0x248b50[_0x3c39a6(0x118)]+_0x3c39a6(0x123)+_0x248b50[_0x3c39a6(0x128)]+'\x20lifecycle='+_0x248b50[_0x3c39a6(0x103)]+_0x201c3c;}function U(_0x32fb4b){const _0x2370fd=a0_0x56022d;return{'event':{'sending':_0x2370fd(0xf1),'delivered':_0x2370fd(0xd0),'failed':_0x2370fd(0xd2),'acked':'task.ack','started':_0x2370fd(0xf5),'replied':_0x2370fd(0x11e),'expired':_0x2370fd(0xfb)}[_0x32fb4b['status']],..._0x32fb4b};}function j(_0x1ca6b9){const _0x3df28b=a0_0x56022d;let _0xb824c1=_0x1ca6b9?.['task_id']||_0x1ca6b9?.['message_id']||_0x1ca6b9?.['id'];if(_0xb824c1)return String(_0xb824c1);let _0x597186=_0x1ca6b9?.['content']?.[0x0]?.['text'];if(typeof _0x597186!==_0x3df28b(0x134))return null;try{let _0x1f56e9=JSON[_0x3df28b(0xd1)](_0x597186);return _0x1f56e9?.[_0x3df28b(0xee)]||_0x1f56e9?.[_0x3df28b(0x131)]||_0x1f56e9?.['id']||null;}catch{return null;}}function a0_0x5110(){const _0x3c43a6=['string','/mcp',']\x20[commhub:','content','alias','match','networkId','Bearer\x20','from_session','offline','AbortError','\x20from=','from_alias','878024YsqjrC','completed','call','\x20error=','broadcast','error_code','log','fromAlias','running','task.send.delivered','parse','task.send.failed','CommHub\x20response\x20omitted\x20task_id','task','Authorization','send_task','SSE\x20reconnecting\x20in\x20','report_status','message','missing_task_id','startsWith','error','type','\x20to=','send','1564238VlandM','error_message','token','data:\x20','getReader','get_all_status','abort','reconnectDelay','disconnected','56nmolUy','application/json','disconnect','body','connect','task_id','get_inbox','parentTaskId','task.send.start','network_id','replace','3959424kusEGz','task.started','send_message','<missing>','toTimeString','sseAbort','sleep','task.expired','/events/','resumeId','ack_inbox','read','send_reply','SSE\x20failed:\x20','emit','lifecycle_tracking','unknown\x20error','url','to_alias','parent_task_id','lifecycleTracking','<pending>','7692030ohOZYw','[commhub:task]\x20','application/json,\x20text/event-stream','\x20network_id=','connected','status','slice','stringify','sdk','failed','signal','new_message','min','pop','transport','toString','inbox\x20error:\x20','send_failed','split','[REDACTED]','task.replied','processInbox','heartbeatTimer','new_task','not_tracked','\x20duration_ms=','getAllStatus','<unknown>','connectSSE','SSE\x20error:\x20','duration_ms','CommHub\x20rejected\x20task','597455IvAFON','1911049kIcoyr','now','agent','text/event-stream','text','2961642WGhxWk','message_id','idle','heartbeatInterval'];a0_0x5110=function(){return _0x3c43a6;};return a0_0x5110();}async function X(_0x338711,_0x1fb0ca){const _0xba4b11=a0_0x56022d;let _0x4f3d70=_0x1fb0ca[_0xba4b11(0x12c)]??Date[_0xba4b11(0x12c)],_0x519117=_0x4f3d70(),_0x5af6d0=(_0x28b8fa,_0x523415,_0x3ab226,_0x319dca)=>{const _0x11a92a=_0xba4b11;_0x1fb0ca[_0x11a92a(0xcd)](O(U({'from_alias':_0x338711[_0x11a92a(0xce)],'to_alias':_0x338711['toAlias'],'task_id':_0x523415,'parent_task_id':_0x338711[_0x11a92a(0xf0)],'network_id':_0x338711[_0x11a92a(0x13a)],'transport':_0x338711[_0x11a92a(0x118)],'status':_0x28b8fa,'duration_ms':_0x4f3d70()-_0x519117,'lifecycle_tracking':_0x338711[_0x11a92a(0x108)],..._0x3ab226!==void 0x0?{'error_code':_0x319dca||_0x11a92a(0x11b),'error_message':N(_0x3ab226)}:{}})));};_0x5af6d0('sending',null);try{let _0x2c1b27=await _0x1fb0ca[_0xba4b11(0xdf)](),_0x3063e5=j(_0x2c1b27);if(_0x3063e5)_0x5af6d0('delivered',_0x3063e5);else{if(_0x2c1b27?.['ok']===!0x1||_0x2c1b27?.[_0xba4b11(0xdc)])_0x5af6d0(_0xba4b11(0x113),_0x3063e5,_0x2c1b27?.['error']||_0xba4b11(0x129),'send_rejected');else _0x5af6d0(_0xba4b11(0x113),null,_0xba4b11(0xd3),_0xba4b11(0xda));}return _0x2c1b27;}catch(_0x31ed0b){throw _0x5af6d0(_0xba4b11(0x113),null,_0x31ed0b,_0xba4b11(0x11b)),_0x31ed0b;}}async function Y(_0x5787d1,_0x42af13){const _0x138607=a0_0x56022d;return X({'fromAlias':_0x5787d1[_0x138607(0xce)],'toAlias':_0x5787d1[_0x138607(0x138)],'parentTaskId':_0x5787d1[_0x138607(0xf0)]||null,'networkId':_0x5787d1['networkId']||null,'transport':'mcp_http','lifecycleTracking':_0x138607(0x122)},_0x42af13);}class $ extends a0_0x502e16{[a0_0x56022d(0x105)];[a0_0x56022d(0x138)];[a0_0x56022d(0xe2)];[a0_0x56022d(0x12d)];['resumeId'];['heartbeatInterval'];[a0_0x56022d(0xe7)];[a0_0x56022d(0x120)];['sseAbort'];[a0_0x56022d(0xcf)]=!0x1;constructor(_0x39fa05){const _0x4cb79e=a0_0x56022d;super();if(this[_0x4cb79e(0x105)]=_0x39fa05['url'][_0x4cb79e(0xf3)](/\/$/,''),this[_0x4cb79e(0x138)]=_0x39fa05[_0x4cb79e(0x138)],this[_0x4cb79e(0xe2)]=_0x39fa05[_0x4cb79e(0xe2)],this['agent']=_0x39fa05[_0x4cb79e(0x12d)]||_0x4cb79e(0x112),this['resumeId']='sdk-'+_0x39fa05['alias']+'-'+Date[_0x4cb79e(0x12c)]()[_0x4cb79e(0x119)](0x24),this[_0x4cb79e(0x133)]=_0x39fa05[_0x4cb79e(0x133)]??0x2bf20,this[_0x4cb79e(0xe7)]=_0x39fa05[_0x4cb79e(0xe7)]??0xbb8,_0x39fa05['autoConnect']!==!0x1)this[_0x4cb79e(0xed)]();}[a0_0x56022d(0xcd)](_0x5dd81b){const _0x3348fa=a0_0x56022d;console[_0x3348fa(0xcd)]('['+new Date()[_0x3348fa(0xf8)]()[_0x3348fa(0x110)](0x0,0x8)+_0x3348fa(0x136)+this['alias']+']\x20'+_0x5dd81b);}async[a0_0x56022d(0xc9)](_0x12a68b,_0x16dabd){const _0x38ffce=a0_0x56022d;let _0x19f458={'Content-Type':_0x38ffce(0xea),'Accept':_0x38ffce(0x10c)};if(this[_0x38ffce(0xe2)])_0x19f458['Authorization']=_0x38ffce(0xc1)+this[_0x38ffce(0xe2)];let _0x42185f=await(await fetch(this[_0x38ffce(0x105)]+_0x38ffce(0x135),{'method':'POST','headers':_0x19f458,'body':JSON['stringify']({'jsonrpc':'2.0','id':Date[_0x38ffce(0x12c)](),'method':'tools/call','params':{'name':_0x12a68b,'arguments':_0x16dabd}})}))[_0x38ffce(0x12f)](),_0x129c6d=_0x42185f[_0x38ffce(0x139)](/data: (.+)/),_0x497efb=_0x129c6d?JSON[_0x38ffce(0xd1)](_0x129c6d[0x1]):JSON[_0x38ffce(0xd1)](_0x42185f),_0x2ec0d2=_0x497efb?.['result']?.['content']?.[0x0]?.['text'];return _0x2ec0d2?JSON[_0x38ffce(0xd1)](_0x2ec0d2):_0x497efb;}async['connect'](){const _0x38c1c9=a0_0x56022d;if(this[_0x38c1c9(0xcf)])return;this[_0x38c1c9(0xcf)]=!0x0,await this[_0x38c1c9(0x10f)](_0x38c1c9(0x132)),this['log']('registered'),this[_0x38c1c9(0x120)]=setInterval(()=>{const _0x29d8a9=_0x38c1c9;this['status'](_0x29d8a9(0x132))['catch'](_0x1a627d=>this[_0x29d8a9(0xcd)]('heartbeat\x20failed:\x20'+_0x1a627d[_0x29d8a9(0xd9)]));},this[_0x38c1c9(0x133)]),this[_0x38c1c9(0x126)]();}async[a0_0x56022d(0xeb)](){const _0x49bb77=a0_0x56022d;if(this[_0x49bb77(0xcf)]=!0x1,this[_0x49bb77(0xf9)]?.[_0x49bb77(0xe6)](),this[_0x49bb77(0x120)])clearInterval(this[_0x49bb77(0x120)]);await this['status'](_0x49bb77(0xc3))['catch'](()=>{}),this[_0x49bb77(0xcd)](_0x49bb77(0xe8));}async[a0_0x56022d(0xdf)](_0x252a70,_0x3ede2f,_0x2230c9='normal'){const _0x94cc9f=a0_0x56022d;return Y({'alias':_0x252a70,'fromAlias':this[_0x94cc9f(0x138)]},{'log':_0x29e682=>console['log'](_0x29e682),'send':()=>this['call'](_0x94cc9f(0xd6),{'alias':_0x252a70,'task':_0x3ede2f,'priority':_0x2230c9,'from_session':this['alias']})});}async[a0_0x56022d(0xd9)](_0x27aca7,_0x23e956){const _0x2811e8=a0_0x56022d;return this['call'](_0x2811e8(0xf6),{'alias':_0x27aca7,'message':_0x23e956,'from_session':this[_0x2811e8(0x138)]});}async['reply'](_0x44016b,_0xa7499d,_0x31ecda=a0_0x56022d(0xc8)){const _0x22e65e=a0_0x56022d;return this[_0x22e65e(0xc9)](_0x22e65e(0x100),{'in_reply_to':_0x44016b,'text':_0xa7499d,'status':_0x31ecda});}async[a0_0x56022d(0x10f)](_0x534b44,_0x1c7802){const _0x20727f=a0_0x56022d;return this[_0x20727f(0xc9)](_0x20727f(0xd8),{'resume_id':this[_0x20727f(0xfd)],'alias':this[_0x20727f(0x138)],'status':_0x534b44,'server':a0_0xc59dae(),'hostname':a0_0xc59dae(),'agent':this['agent'],'project_dir':process['cwd'](),..._0x1c7802});}async[a0_0x56022d(0x124)](){const _0x221e9b=a0_0x56022d;return this[_0x221e9b(0xc9)](_0x221e9b(0xe5),{});}async[a0_0x56022d(0xcb)](_0x47b586,_0x290357){const _0x57f305=a0_0x56022d;return this[_0x57f305(0xc9)](_0x57f305(0xcb),{'message':_0x47b586,'filter_server':_0x290357?.['server'],'filter_status':_0x290357?.['status']});}async[a0_0x56022d(0x126)](){const _0x456e9d=a0_0x56022d;let _0x3843d0=encodeURIComponent(this['alias']),_0x11a7b0=this[_0x456e9d(0x105)]+_0x456e9d(0xfc)+_0x3843d0,_0x21597e=this[_0x456e9d(0xe7)];while(this[_0x456e9d(0xcf)]){try{this[_0x456e9d(0xf9)]=new AbortController();let _0x5796d7={'Accept':_0x456e9d(0x12e)};if(this[_0x456e9d(0xe2)])_0x5796d7[_0x456e9d(0xd5)]=_0x456e9d(0xc1)+this['token'];let _0x1206e3=await fetch(_0x11a7b0,{'headers':_0x5796d7,'signal':this[_0x456e9d(0xf9)][_0x456e9d(0x114)]});if(!_0x1206e3['ok']||!_0x1206e3[_0x456e9d(0xec)]){this[_0x456e9d(0xcd)](_0x456e9d(0x101)+_0x1206e3['status']),await this['sleep'](_0x21597e),_0x21597e=Math[_0x456e9d(0x116)](_0x21597e*1.5,0xea60);continue;}_0x21597e=this[_0x456e9d(0xe7)];let _0x3954c0=_0x1206e3['body'][_0x456e9d(0xe4)](),_0x1cac02=new TextDecoder(),_0x4ca4fd='';while(this[_0x456e9d(0xcf)]){let {done:_0x2752df,value:_0x729eea}=await _0x3954c0[_0x456e9d(0xff)]();if(_0x2752df)break;_0x4ca4fd+=_0x1cac02['decode'](_0x729eea,{'stream':!0x0});let _0x103e41=_0x4ca4fd[_0x456e9d(0x11c)]('\x0a');_0x4ca4fd=_0x103e41[_0x456e9d(0x117)]()||'';for(let _0x6f0720 of _0x103e41){if(!_0x6f0720[_0x456e9d(0xdb)](_0x456e9d(0xe3)))continue;try{let _0x24c24e=JSON['parse'](_0x6f0720[_0x456e9d(0x110)](0x6));if(_0x24c24e['type']===_0x456e9d(0x10e)){this[_0x456e9d(0xcd)]('SSE\x20connected'),this[_0x456e9d(0x102)](_0x456e9d(0x10e));continue;}if(_0x24c24e['type']===_0x456e9d(0x121)||_0x24c24e[_0x456e9d(0xdd)]===_0x456e9d(0x115)||_0x24c24e[_0x456e9d(0xdd)]===_0x456e9d(0xcb))await this[_0x456e9d(0x11f)]();}catch{}}}}catch(_0x323866){if(_0x323866['name']===_0x456e9d(0xc4))break;this['emit']('error',_0x323866),this[_0x456e9d(0xcd)](_0x456e9d(0x127)+_0x323866[_0x456e9d(0xd9)]);}if(this[_0x456e9d(0xcf)])this[_0x456e9d(0x102)](_0x456e9d(0xe8)),this[_0x456e9d(0xcd)](_0x456e9d(0xd7)+_0x21597e/0x3e8+'s...'),await this['sleep'](_0x21597e),_0x21597e=Math[_0x456e9d(0x116)](_0x21597e*1.5,0xea60);}}async[a0_0x56022d(0x11f)](){const _0x5a817e=a0_0x56022d;try{let _0x18f7ab=(await this['call'](_0x5a817e(0xef),{'alias':this[_0x5a817e(0x138)],'limit':0xa}))?.['messages']||[];for(let _0x483526 of _0x18f7ab)await this[_0x5a817e(0xc9)](_0x5a817e(0xfe),{'alias':this[_0x5a817e(0x138)],'message_id':_0x483526['id']}),this[_0x5a817e(0xcd)]('←\x20'+_0x483526[_0x5a817e(0xc2)]+':\x20'+_0x483526[_0x5a817e(0x137)][_0x5a817e(0x110)](0x0,0x3c)),this[_0x5a817e(0x102)](_0x5a817e(0xd4),_0x483526),this['emit']('message',_0x483526);}catch(_0x1ee5d9){this[_0x5a817e(0xcd)](_0x5a817e(0x11a)+_0x1ee5d9[_0x5a817e(0xd9)]);}}[a0_0x56022d(0xfa)](_0x36e69f){return new Promise(_0x5dded4=>setTimeout(_0x5dded4,_0x36e69f));}}var F=$;export{F as default,$ as CommHub};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export interface CodexHomeInheritedFile {
|
|
2
|
+
readonly name: string;
|
|
3
|
+
readonly mode: number;
|
|
4
|
+
/** Why a node needs it — printed when staged, so the action is legible. */
|
|
5
|
+
readonly because: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const CODEX_HOME_INHERITED_FILES: readonly CodexHomeInheritedFile[];
|
|
8
|
+
export interface StatLike {
|
|
9
|
+
readonly mtimeMs: number;
|
|
10
|
+
}
|
|
11
|
+
export type StatFn = (path: string) => StatLike | null;
|
|
12
|
+
export interface CodexHomeStageStep {
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly src: string;
|
|
15
|
+
readonly dst: string;
|
|
16
|
+
readonly mode: number;
|
|
17
|
+
readonly reason: "missing" | "host-newer";
|
|
18
|
+
readonly because: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* What to copy from the host CODEX_HOME into the node's, right now.
|
|
22
|
+
*
|
|
23
|
+
* Pure: takes the stat function so the ordering rules are testable without a
|
|
24
|
+
* filesystem. A node file that is NEWER than the host's is left alone — codex
|
|
25
|
+
* refreshes its own copy in place, and clobbering it would throw away a fresher
|
|
26
|
+
* token than the one we hold.
|
|
27
|
+
*/
|
|
28
|
+
export declare function codexHomeStagePlan(hostHome: string, nodeHome: string, stat: StatFn, join: (a: string, b: string) => string, files?: readonly CodexHomeInheritedFile[]): CodexHomeStageStep[];
|
|
29
|
+
export type CodexTuiBlocker = "sign-in" | "update-prompt" | "trust-prompt";
|
|
30
|
+
export type CodexTuiPaneState = CodexTuiBlocker | "not-painted" | "usable";
|
|
31
|
+
/**
|
|
32
|
+
* Classify the TUI, from two different reads of the same pane.
|
|
33
|
+
*
|
|
34
|
+
* They answer different questions and need different tmux flags — the same
|
|
35
|
+
* distinction `waitForTmuxPaneText` documents one screenful up:
|
|
36
|
+
*
|
|
37
|
+
* onScreen (capture-pane, no -S) → "is it sitting on a prompt right now"
|
|
38
|
+
* A prompt that was already answered stays in scrollback forever,
|
|
39
|
+
* so reading history here would report a fixed node as blocked.
|
|
40
|
+
*
|
|
41
|
+
* everSeen (capture-pane -S -N) → "did the TUI ever paint"
|
|
42
|
+
* The banner is printed once and scrolls away — an MCP error burst
|
|
43
|
+
* was enough to push it off screen in under a minute — so reading
|
|
44
|
+
* only the current screen here would report a working node as dead.
|
|
45
|
+
*
|
|
46
|
+
* 🔴 And "the pane has text" answers neither. An earlier version of this used
|
|
47
|
+
* "≥3 non-empty lines ⇒ ready" and passed a node parked on the sign-in page.
|
|
48
|
+
* Measured timeline for that start:
|
|
49
|
+
*
|
|
50
|
+
* t≈3s 22 non-empty lines ← launcher output, TUI not up yet
|
|
51
|
+
* t≈6s 0 non-empty lines ← codex clears the screen and takes over
|
|
52
|
+
* t≈9s 10 non-empty lines ← the sign-in page finally paints
|
|
53
|
+
*
|
|
54
|
+
* The rule fired at t≈3s, six seconds before the thing it was meant to catch
|
|
55
|
+
* existed.
|
|
56
|
+
*/
|
|
57
|
+
export declare function codexTuiPaneState(onScreen: string, everSeen?: string): CodexTuiPaneState;
|
|
58
|
+
/**
|
|
59
|
+
* What the operator should read when a node came up but cannot work. Names the
|
|
60
|
+
* blocker AND where to look — a launcher that only says "not ready" sends
|
|
61
|
+
* someone hunting through three tmux sessions.
|
|
62
|
+
*/
|
|
63
|
+
export declare function describeCodexTuiBlocker(blocker: CodexTuiBlocker, displayName: string, tuiSession: string): string;
|
|
64
|
+
/** The TUI never painted at all — a distinct failure from being blocked. */
|
|
65
|
+
export declare function describeCodexTuiNotPainted(displayName: string, tuiSession: string, waitedMs: number): string;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export interface CodexCopresenceProfileFields {
|
|
2
|
+
readonly runtime?: string;
|
|
3
|
+
readonly codexCopresence?: boolean;
|
|
4
|
+
readonly codexCopresenceFullAccess?: boolean;
|
|
5
|
+
readonly flags?: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
export declare const CODEX_COPRESENCE_RUNTIME = "codex-app-server";
|
|
8
|
+
/**
|
|
9
|
+
* Should this `anet node start` bring up the co-presence stack?
|
|
10
|
+
*
|
|
11
|
+
* The flag still works for a one-off; the profile field is what makes the
|
|
12
|
+
* second start a single command.
|
|
13
|
+
*/
|
|
14
|
+
export declare function codexCopresenceRequested(flagPassed: boolean, profile: CodexCopresenceProfileFields): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* True when a plain `anet node start` just became enough for this node — i.e.
|
|
17
|
+
* the flag was passed and the profile had not recorded it yet. Callers persist
|
|
18
|
+
* `codexCopresence: true` and tell the user they can drop the flag.
|
|
19
|
+
*/
|
|
20
|
+
export declare function shouldPersistCodexCopresence(flagPassed: boolean, profile: CodexCopresenceProfileFields): boolean;
|
|
21
|
+
export interface CodexCopresencePosture {
|
|
22
|
+
readonly sandboxMode: "danger-full-access" | "read-only";
|
|
23
|
+
readonly approvalPolicy: "never" | "on-request";
|
|
24
|
+
/** Set when the node asked for full access and is NOT getting it. */
|
|
25
|
+
readonly downgradeNotice?: string;
|
|
26
|
+
/** Set when a remembered grant (not this invocation's flag) opened it up. */
|
|
27
|
+
readonly grantedFromProfile: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Resolve the sandbox the co-presence app-server runs under.
|
|
31
|
+
*
|
|
32
|
+
* Precedence: this invocation's flag → a grant already recorded on the profile
|
|
33
|
+
* → read-only. `flags.sandboxMode` alone never opens the sandbox; it only
|
|
34
|
+
* decides whether staying closed is worth telling the user about.
|
|
35
|
+
*/
|
|
36
|
+
export declare function codexCopresencePosture(dangerFlagPassed: boolean, profile: CodexCopresenceProfileFields, displayName?: string): CodexCopresencePosture;
|
|
37
|
+
/** True when an explicit grant should be written to the profile for next time. */
|
|
38
|
+
export declare function shouldPersistCodexFullAccess(dangerFlagPassed: boolean, profile: CodexCopresenceProfileFields): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* What `anet node create --runtime codex-app-server` should record, so that a
|
|
41
|
+
* later `anet node start <name>` is a single command with no flag.
|
|
42
|
+
*
|
|
43
|
+
* Shape copied from opencode, which already does exactly this at create time:
|
|
44
|
+
*
|
|
45
|
+
* ...(runtime === "opencode-cli"
|
|
46
|
+
* ? { opencodeMode: opts.mode === "copresence" || opts.copresence === "true"
|
|
47
|
+
* ? "copresence" : "headless" }
|
|
48
|
+
* : {}),
|
|
49
|
+
*
|
|
50
|
+
* Deliberately NOT keyed on which alias the operator typed. `codex-tui`,
|
|
51
|
+
* `codex-appserver` and `codex-app-server` are documented as aliases of one
|
|
52
|
+
* runtime (agent-node/src/cli.ts); giving one of them a different default would
|
|
53
|
+
* quietly break that contract, and "I typed the short name" is not a reliable
|
|
54
|
+
* statement of intent. Opting in stays explicit, exactly as it is for opencode.
|
|
55
|
+
*/
|
|
56
|
+
export declare function codexCopresenceCreateFields(normalizedRuntime: string | undefined, copresenceOpt: string | boolean | undefined): {
|
|
57
|
+
codexCopresence?: true;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* One line at create time for a node that will start headless.
|
|
61
|
+
*
|
|
62
|
+
* NOT keyed on which alias the operator typed: by the time create builds the
|
|
63
|
+
* profile, `opts.runtime` has already been normalized to `codex-app-server`, so
|
|
64
|
+
* `codex-tui` is simply not recoverable here — a hint that tried to read it
|
|
65
|
+
* would never fire. (It didn't; that is how this was found.) Keying on the
|
|
66
|
+
* runtime instead also keeps the aliases true synonyms.
|
|
67
|
+
*/
|
|
68
|
+
export declare function codexCopresenceCreateHint(normalizedRuntime: string | undefined, copresenceOpt: string | boolean | undefined, displayName: string): string | undefined;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface CopresenceDep {
|
|
2
|
+
readonly name: string;
|
|
3
|
+
readonly present: boolean;
|
|
4
|
+
/** Exact command for this platform, or null when we cannot name one. */
|
|
5
|
+
readonly install: string | null;
|
|
6
|
+
readonly why: string;
|
|
7
|
+
}
|
|
8
|
+
export type CommandProbe = (cmd: string) => boolean;
|
|
9
|
+
export declare function copresenceDeps(probe: CommandProbe, platform?: NodeJS.Platform): CopresenceDep[];
|
|
10
|
+
export declare function missingCopresenceDeps(probe: CommandProbe, platform?: NodeJS.Platform): CopresenceDep[];
|
|
11
|
+
/** One block naming every gap and how to close it — never one gap at a time. */
|
|
12
|
+
export declare function describeMissingDeps(missing: readonly CopresenceDep[], displayName: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* May we start this hub ourselves?
|
|
15
|
+
*
|
|
16
|
+
* Only a loopback hub. A remote URL that refuses the connection is somebody
|
|
17
|
+
* else's service — spawning a local one would silently point the node at a
|
|
18
|
+
* DIFFERENT hub than its profile names, which is worse than failing.
|
|
19
|
+
*/
|
|
20
|
+
export declare function isLoopbackHub(hubUrl: string): boolean;
|