apt-mcp-agent-setup 1.2.19 β 1.2.21
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/bin/cli.js +1 -1
- package/bundle/NOTICES.md +0 -0
- package/bundle/core.enc +0 -0
- package/bundle/mcp-rules.enc +0 -0
- package/bundle/skills-aso.enc +0 -0
- package/bundle/skills-ba.enc +0 -0
- package/bundle/skills-base.enc +0 -0
- package/bundle/skills-be.enc +0 -0
- package/bundle/skills-design.enc +0 -0
- package/bundle/skills-fe.enc +0 -0
- package/bundle/skills-mobile.enc +0 -0
- package/bundle/skills-pm.enc +0 -0
- package/integrity-manifest.json +16 -16
- package/package.json +1 -1
- package/src/installer/global-setup.js +1 -1
- package/src/installer/platform-config.js +1 -1
- package/src/installer/prerequisites.js +1 -1
- package/src/installer/project-setup.js +1 -1
- package/src/installer/setup-wizard.js +1 -1
- package/src/license/crypto.js +1 -1
- package/src/license/fingerprint.js +1 -1
- package/src/license/terms.js +1 -1
- package/src/license/verify.js +1 -1
- package/src/presets/index.js +1 -1
- package/src/proxy/backends.js +1 -1
- package/src/proxy/router.config.js +1 -1
- package/src/proxy/router.js +1 -1
- package/src/proxy/server.js +1 -1
- package/src/templates/CLAUDE.md +11 -0
- package/src/templates/GEMINI.md +11 -0
- package/src/templates/copilot-instructions.md +12 -0
- package/src/templates/cursorrules.mdc +12 -0
- package/src/templates/windsurfrules.md +12 -0
package/src/proxy/server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3597ea=_0x2a7e;(function(_0x30be9c,_0x4429f3){const _0x2feea8=_0x2a7e,_0x3997f0=_0x30be9c();while(!![]){try{const _0x4fb8e5=-parseInt(_0x2feea8(0x1ed))/0x1*(parseInt(_0x2feea8(0x1a5))/0x2)+-parseInt(_0x2feea8(0x1ba))/0x3*(-parseInt(_0x2feea8(0x166))/0x4)+-parseInt(_0x2feea8(0x17a))/0x5+parseInt(_0x2feea8(0x1ec))/0x6+-parseInt(_0x2feea8(0x15e))/0x7*(-parseInt(_0x2feea8(0x1ee))/0x8)+-parseInt(_0x2feea8(0x178))/0x9+parseInt(_0x2feea8(0x1da))/0xa*(-parseInt(_0x2feea8(0x1f8))/0xb);if(_0x4fb8e5===_0x4429f3)break;else _0x3997f0['push'](_0x3997f0['shift']());}catch(_0x1bdde3){_0x3997f0['push'](_0x3997f0['shift']());}}}(_0x228b,0xa4f1a));const fs=require('fs'),path=require(_0x3597ea(0x19d)),os=require('os'),http=require(_0x3597ea(0x1d0)),https=require(_0x3597ea(0x161)),{verifyLicense}=require(_0x3597ea(0x1e5)),{spawnBackends}=require(_0x3597ea(0x1f3)),{translateToolList,mapExposedToOriginal}=require(_0x3597ea(0x1c7));function httpRequest(_0x28bd21,_0xcca4fc={}){return new Promise((_0xf84330,_0x14a2a8)=>{const _0x3b5094=_0x2a7e;try{const _0x1a27f7=new URL(_0x28bd21),_0x3dd071=_0x1a27f7[_0x3b5094(0x17d)]===_0x3b5094(0x1ab)?https:http,_0x5815f6={'User-Agent':'Mozilla/5.0\x20(compatible;\x20Node/'+process[_0x3b5094(0x1a7)]+')',..._0xcca4fc['headers']},_0x5d02d0=_0x5815f6;if(_0xcca4fc[_0x3b5094(0x18e)]){const _0x9aa371=typeof _0xcca4fc[_0x3b5094(0x18e)]==='string'?_0xcca4fc[_0x3b5094(0x18e)]:JSON[_0x3b5094(0x193)](_0xcca4fc[_0x3b5094(0x18e)]);!_0x5d02d0[_0x3b5094(0x194)]&&!_0x5d02d0[_0x3b5094(0x18d)]&&(_0x5d02d0[_0x3b5094(0x194)]=Buffer['byteLength'](_0x9aa371));}const _0xbba521={};_0xbba521[_0x3b5094(0x16c)]=_0xcca4fc[_0x3b5094(0x16c)]||'GET',_0xbba521[_0x3b5094(0x199)]=_0x1a27f7[_0x3b5094(0x199)],_0xbba521['port']=_0x1a27f7['port']||(_0x1a27f7[_0x3b5094(0x17d)]===_0x3b5094(0x1ab)?0x1bb:0x50),_0xbba521[_0x3b5094(0x19d)]=_0x1a27f7[_0x3b5094(0x1b1)]+_0x1a27f7[_0x3b5094(0x18b)],_0xbba521[_0x3b5094(0x1c2)]=_0x5d02d0;const _0x42e8af=_0xbba521,_0x4909ee=_0x3dd071[_0x3b5094(0x1d2)](_0x42e8af,_0x29c513=>{const _0x2b8f6a=_0x3b5094;let _0x5d3a76='';_0x29c513['on'](_0x2b8f6a(0x1aa),_0x26652e=>{_0x5d3a76+=_0x26652e;}),_0x29c513['on'](_0x2b8f6a(0x1ce),()=>{const _0x4d2e24=_0x2b8f6a;_0xf84330({'ok':_0x29c513[_0x4d2e24(0x1db)]>=0xc8&&_0x29c513['statusCode']<0x12c,'status':_0x29c513[_0x4d2e24(0x1db)],'json':async()=>JSON[_0x4d2e24(0x1cf)](_0x5d3a76),'text':async()=>_0x5d3a76});});});_0x4909ee['on'](_0x3b5094(0x1b4),_0x26814b=>{_0x14a2a8(_0x26814b);}),_0xcca4fc['signal']&&(_0xcca4fc[_0x3b5094(0x1bf)][_0x3b5094(0x1af)]?_0x4909ee[_0x3b5094(0x16f)](new Error(_0x3b5094(0x1ef))):_0xcca4fc[_0x3b5094(0x1bf)][_0x3b5094(0x1cd)](_0x3b5094(0x1e8),()=>{const _0x1bd5cf=_0x3b5094;_0x4909ee['destroy'](new Error(_0x1bd5cf(0x1ef)));})),_0xcca4fc[_0x3b5094(0x18e)]&&_0x4909ee[_0x3b5094(0x1be)](_0xcca4fc[_0x3b5094(0x18e)]),_0x4909ee[_0x3b5094(0x1ce)]();}catch(_0x2a6345){_0x14a2a8(_0x2a6345);}});}class ProxyServer{constructor(_0x3eaa9b={}){const _0xc51dfc=_0x3597ea;this[_0xc51dfc(0x1a6)]=_0x3eaa9b[_0xc51dfc(0x1a6)]||process[_0xc51dfc(0x1dd)](),this[_0xc51dfc(0x1a0)]=_0x3eaa9b[_0xc51dfc(0x1a0)]||this[_0xc51dfc(0x165)](),this[_0xc51dfc(0x189)]=_0x3eaa9b[_0xc51dfc(0x189)],this[_0xc51dfc(0x1dc)]=_0x3eaa9b['publicKey']||_0x3eaa9b['masterSecret'],this[_0xc51dfc(0x1b7)]=null,this[_0xc51dfc(0x1a2)]='',this[_0xc51dfc(0x1a9)]=![],this[_0xc51dfc(0x169)]=_0x3eaa9b['stdout']||process[_0xc51dfc(0x169)],this[_0xc51dfc(0x1e2)]=_0x3eaa9b[_0xc51dfc(0x1e2)]||path[_0xc51dfc(0x19f)](__dirname,_0xc51dfc(0x1b6),_0xc51dfc(0x1e3));}['loadLicenseKey'](){const _0x11a9c3=_0x3597ea,_0x5627a0=path[_0x11a9c3(0x19f)](os[_0x11a9c3(0x1b3)](),'.anhdh',_0x11a9c3(0x1a3));if(fs['existsSync'](_0x5627a0))return fs[_0x11a9c3(0x198)](_0x5627a0,_0x11a9c3(0x17b))[_0x11a9c3(0x19c)]();return null;}async[_0x3597ea(0x157)](){const _0xb18f71=_0x3597ea,_0x57e3a9=process.env.MCP_SKIP_LICENSE_CHECK==='1';if(_0x57e3a9||!this[_0xb18f71(0x1a0)])return;const _0x26588d=this[_0xb18f71(0x1a0)][_0xb18f71(0x176)]('.');if(_0x26588d[_0xb18f71(0x1e9)]!==0x3)return;let _0x4651f6;try{_0x4651f6=JSON[_0xb18f71(0x1cf)](Buffer[_0xb18f71(0x1ac)](_0x26588d[0x1],_0xb18f71(0x1a1))[_0xb18f71(0x183)](_0xb18f71(0x17b)));}catch(_0x2694a3){return;}if(!_0x4651f6||!_0x4651f6['exp'])return;const _0x3813fa=0x6*0x18*0xe10*0x3e8,_0x127c1b=_0x4651f6[_0xb18f71(0x16a)]-Date[_0xb18f71(0x16e)]();if(_0x127c1b<_0x3813fa){console[_0xb18f71(0x1b4)](_0xb18f71(0x1f9));const _0x3fef2c=process.env.MCP_ACTIVATION_URL||'https://agentkit.alphatechs.ai/api',_0x529b8e=_0x3fef2c+'/heartbeat',_0x198f87=new AbortController(),_0x32df7b=setTimeout(()=>_0x198f87[_0xb18f71(0x1e8)](),0x1388);try{const _0x435037={};_0x435037[_0xb18f71(0x1ae)]=_0xb18f71(0x177);const _0x55df12={};_0x55df12['token']=this['licenseKey'];const _0x147f49=await httpRequest(_0x529b8e,{'method':'POST','headers':_0x435037,'body':JSON['stringify'](_0x55df12),'signal':_0x198f87[_0xb18f71(0x1bf)]});clearTimeout(_0x32df7b);if(_0x147f49[_0xb18f71(0x1bb)]===0x193){console['error'](_0xb18f71(0x191)),process['exit'](0x1);return;}if(_0x147f49['status']===0x191){console[_0xb18f71(0x1b4)](_0xb18f71(0x1d8)),process[_0xb18f71(0x1eb)](0x1);return;}if(!_0x147f49['ok']){console['error']('[MCP\x20Agent]\x20Heartbeat\x20refresh\x20failed:\x20Server\x20returned\x20'+_0x147f49[_0xb18f71(0x1bb)]+'.\x20Continuing\x20with\x20cached\x20token.');return;}const _0x5237a9=await _0x147f49[_0xb18f71(0x1e7)]();if(_0x5237a9&&_0x5237a9['token']){this[_0xb18f71(0x1a0)]=_0x5237a9[_0xb18f71(0x1b2)];const _0x304dcb=path[_0xb18f71(0x19f)](os[_0xb18f71(0x1b3)](),'.anhdh','license.key');try{const _0x4dd94e={};_0x4dd94e[_0xb18f71(0x186)]=!![],fs[_0xb18f71(0x192)](path[_0xb18f71(0x173)](_0x304dcb),_0x4dd94e),fs[_0xb18f71(0x1b0)](_0x304dcb,_0x5237a9[_0xb18f71(0x1b2)],_0xb18f71(0x17b)),console[_0xb18f71(0x1b4)](_0xb18f71(0x19e));}catch(_0x1bf3f9){console['error'](_0xb18f71(0x1e6),_0x1bf3f9[_0xb18f71(0x15d)]);}}}catch(_0x1d43ba){clearTimeout(_0x32df7b),console[_0xb18f71(0x1b4)](_0xb18f71(0x18f),_0x1d43ba[_0xb18f71(0x15d)],_0xb18f71(0x1d1));}}}async[_0x3597ea(0x1f0)](){const _0x242e1c=_0x3597ea;console[_0x242e1c(0x1b4)]('[MCP\x20Agent]\x20Starting\x20server\x20at\x20'+this[_0x242e1c(0x1a6)]);if(!this[_0x242e1c(0x1dc)]){if(process.env.MCP_ADMIN_DIR){const _0x5484c9=path['join'](process.env.MCP_ADMIN_DIR,_0x242e1c(0x1c1));fs[_0x242e1c(0x1f4)](_0x5484c9)&&(this['publicKey']=fs[_0x242e1c(0x198)](_0x5484c9,_0x242e1c(0x17b))[_0x242e1c(0x19c)]());}if(!this[_0x242e1c(0x1dc)]){let _0x5c0e91=__dirname;while(_0x5c0e91){const _0x5bbe79=path[_0x242e1c(0x19f)](_0x5c0e91,'admin',_0x242e1c(0x1c1));if(fs['existsSync'](_0x5bbe79)){this[_0x242e1c(0x1dc)]=fs['readFileSync'](_0x5bbe79,_0x242e1c(0x17b))[_0x242e1c(0x19c)]();break;}const _0xb9588b=path[_0x242e1c(0x173)](_0x5c0e91);if(_0xb9588b===_0x5c0e91)break;_0x5c0e91=_0xb9588b;}}}const _0x20c945=this[_0x242e1c(0x1e2)],_0x31bb49=!__dirname[_0x242e1c(0x175)](/\\/g,'/')['split']('/')[_0x242e1c(0x15a)](_0x242e1c(0x1c6)),_0x150b24=process.env.MCP_SKIP_INTEGRITY_CHECK==='1'||_0x31bb49&&!fs[_0x242e1c(0x1f4)](_0x20c945);if(!_0x150b24){const _0x5696e3=require(_0x242e1c(0x15f));if(!fs[_0x242e1c(0x1f4)](_0x20c945)){console[_0x242e1c(0x1b4)]('[MCP\x20Agent]\x20Integrity\x20check\x20failed:\x20integrity-manifest.json\x20missing.\x20Exiting.'),process[_0x242e1c(0x1eb)](0x1);return;}let _0x11dcdf;try{_0x11dcdf=JSON[_0x242e1c(0x1cf)](fs['readFileSync'](_0x20c945,_0x242e1c(0x17b)));}catch(_0x2f891c){console[_0x242e1c(0x1b4)](_0x242e1c(0x171)),process[_0x242e1c(0x1eb)](0x1);return;}if(!_0x11dcdf[_0x242e1c(0x18a)]||!_0x11dcdf[_0x242e1c(0x170)]){console[_0x242e1c(0x1b4)](_0x242e1c(0x180)),process[_0x242e1c(0x1eb)](0x1);return;}const _0x14d584=this[_0x242e1c(0x1dc)]||require(_0x242e1c(0x1e5))[_0x242e1c(0x1e0)];try{const _0x3649eb=JSON[_0x242e1c(0x193)](_0x11dcdf['files']),_0x5e449b=Buffer['from'](_0x11dcdf[_0x242e1c(0x170)],_0x242e1c(0x1a1)),_0x2dec27=_0x5696e3[_0x242e1c(0x1a4)](null,Buffer[_0x242e1c(0x1ac)](_0x3649eb),_0x14d584,_0x5e449b);if(!_0x2dec27){console[_0x242e1c(0x1b4)]('[MCP\x20Agent]\x20Integrity\x20check\x20failed:\x20Invalid\x20signature.\x20Exiting.'),process[_0x242e1c(0x1eb)](0x1);return;}}catch(_0x3cff1e){console[_0x242e1c(0x1b4)](_0x242e1c(0x187)),process[_0x242e1c(0x1eb)](0x1);return;}const _0x52d68e=path['join'](__dirname,'../..');for(const [_0x29782f,_0x2d78a0]of Object[_0x242e1c(0x158)](_0x11dcdf[_0x242e1c(0x18a)])){const _0x4f8eef=path[_0x242e1c(0x19f)](_0x52d68e,_0x29782f);if(!fs[_0x242e1c(0x1f4)](_0x4f8eef)){console[_0x242e1c(0x1b4)](_0x242e1c(0x181)+_0x29782f+'\x20modified.\x20Exiting.'),process[_0x242e1c(0x1eb)](0x1);return;}try{const _0x447c11=fs[_0x242e1c(0x198)](_0x4f8eef),_0x113273=_0x5696e3['createHash'](_0x242e1c(0x188))['update'](_0x447c11)[_0x242e1c(0x1f2)](_0x242e1c(0x1de));if(_0x113273!==_0x2d78a0){console[_0x242e1c(0x1b4)](_0x242e1c(0x181)+_0x29782f+_0x242e1c(0x164)),process['exit'](0x1);return;}}catch(_0x41328b){console[_0x242e1c(0x1b4)](_0x242e1c(0x181)+_0x29782f+'\x20modified.\x20Exiting.'),process['exit'](0x1);return;}}}const _0x15651c=process.env.MCP_SKIP_LICENSE_CHECK==='1';if(!_0x15651c){if(!this['deviceId']){const {getFingerprint:_0x59877c}=require(_0x242e1c(0x17f));this[_0x242e1c(0x189)]=_0x59877c();}const _0x2b6b7a=verifyLicense(this[_0x242e1c(0x1a0)],this[_0x242e1c(0x189)],this[_0x242e1c(0x1dc)]);if(!_0x2b6b7a[_0x242e1c(0x196)]){if(_0x2b6b7a[_0x242e1c(0x184)]===_0x242e1c(0x1fa)){const _0x1ea354=_0x2b6b7a[_0x242e1c(0x1d4)]||{},_0x244172=_0x1ea354[_0x242e1c(0x16a)]?new Date(_0x1ea354[_0x242e1c(0x16a)])[_0x242e1c(0x182)]()[_0x242e1c(0x176)]('T')[0x0]:'unknown';console[_0x242e1c(0x1b4)](_0x242e1c(0x1f1)+_0x244172+_0x242e1c(0x1a8));}else console[_0x242e1c(0x1b4)](_0x242e1c(0x1ad)+_0x2b6b7a[_0x242e1c(0x184)]+_0x242e1c(0x162));process[_0x242e1c(0x1eb)](0x1);return;}console[_0x242e1c(0x1b4)](_0x242e1c(0x190)+_0x2b6b7a[_0x242e1c(0x1d4)][_0x242e1c(0x16b)]),await this[_0x242e1c(0x157)](),this['heartbeatInterval']=setInterval(()=>{this['performHeartbeat']()['catch'](_0x2d6033=>{const _0x238581=_0x2a7e;console[_0x238581(0x1b4)]('[MCP\x20Agent]\x20Periodic\x20heartbeat\x20error:',_0x2d6033[_0x238581(0x15d)]);});},0x18*0x3c*0x3c*0x3e8);}this[_0x242e1c(0x1b7)]=spawnBackends(this[_0x242e1c(0x1a6)]),this[_0x242e1c(0x1a9)]=!![];for(const _0xe8aa3 of Object[_0x242e1c(0x172)](this[_0x242e1c(0x1b7)])){_0xe8aa3[_0x242e1c(0x1f0)]();}this[_0x242e1c(0x1c8)]=_0x2a2dd1=>{const _0x1df999=_0x242e1c;this[_0x1df999(0x1e4)](_0x2a2dd1[_0x1df999(0x183)]());},process[_0x242e1c(0x1b5)]['on'](_0x242e1c(0x1aa),this[_0x242e1c(0x1c8)]);}[_0x3597ea(0x1e4)](_0x608e5e){const _0x528bf6=_0x3597ea;this['clientBuffer']+=_0x608e5e;const _0x4ad9fc=this['clientBuffer'][_0x528bf6(0x176)]('\x0a');this[_0x528bf6(0x1a2)]=_0x4ad9fc['pop']();for(const _0x4a5955 of _0x4ad9fc){const _0x558ce2=_0x4a5955['trim']();if(!_0x558ce2)continue;try{const _0x3c6b76=JSON[_0x528bf6(0x1cf)](_0x558ce2);this[_0x528bf6(0x185)](_0x3c6b76);}catch(_0x3a1adc){console[_0x528bf6(0x1b4)]('[MCP\x20Agent]\x20Failed\x20to\x20parse\x20JSON-RPC\x20message\x20from\x20client:',_0x4a5955,_0x3a1adc[_0x528bf6(0x15d)]);}}}async[_0x3597ea(0x185)](_0x33f394){const _0x207d18=_0x3597ea,{id:_0x2dcfa4,method:_0x3871c8,params:_0x24409e}=_0x33f394;if(!_0x3871c8)return;if(_0x3871c8==='initialize'){Promise[_0x207d18(0x1d3)](Object[_0x207d18(0x172)](this[_0x207d18(0x1b7)])['map'](_0x1a2ca7=>_0x1a2ca7[_0x207d18(0x19a)](_0x207d18(0x1cb),_0x24409e)[_0x207d18(0x1bc)](_0x4595f1=>{const _0x158685=_0x207d18;console[_0x158685(0x1b4)](_0x158685(0x1d6)+(_0x1a2ca7['displayName']||_0x1a2ca7['name'])+':',_0x4595f1[_0x158685(0x15d)]);})));const _0xf5042e={};_0xf5042e[_0x207d18(0x179)]=![];const _0x4456e={};_0x4456e[_0x207d18(0x1c0)]=_0xf5042e;const _0x4e7530={};_0x4e7530['name']='mcp-agent-proxy',_0x4e7530[_0x207d18(0x1a7)]=_0x207d18(0x17e);const _0x23721c={};_0x23721c[_0x207d18(0x159)]=_0x24409e[_0x207d18(0x159)]||_0x207d18(0x1b9),_0x23721c[_0x207d18(0x1ca)]=_0x4456e,_0x23721c[_0x207d18(0x167)]=_0x4e7530;const _0x417592={};_0x417592[_0x207d18(0x18c)]=_0x207d18(0x17c),_0x417592['id']=_0x2dcfa4,_0x417592[_0x207d18(0x197)]=_0x23721c;const _0x16fb54=_0x417592;this['writeToClient'](_0x16fb54);return;}if(_0x3871c8===_0x207d18(0x160)){try{const _0x21f0c9=Object[_0x207d18(0x158)](this[_0x207d18(0x1b7)])[_0x207d18(0x1df)](async([_0x33479e,_0x42c223])=>{const _0x29bde3=_0x207d18;try{const _0x2e3d9f=await _0x42c223[_0x29bde3(0x19a)](_0x29bde3(0x160)),_0x2f5613=_0x2e3d9f&&_0x2e3d9f[_0x29bde3(0x197)]&&_0x2e3d9f[_0x29bde3(0x197)][_0x29bde3(0x1c0)]||[];return translateToolList(_0x2f5613,_0x33479e);}catch(_0x3a2c1f){return console['error'](_0x29bde3(0x1c4)+_0x33479e+':',_0x3a2c1f[_0x29bde3(0x15d)]),[];}}),_0x6819d6=await Promise[_0x207d18(0x1d3)](_0x21f0c9),_0x1a0063=_0x6819d6[_0x207d18(0x15b)](),_0x4ca396={};_0x4ca396[_0x207d18(0x1c0)]=_0x1a0063;const _0x550257={};_0x550257[_0x207d18(0x18c)]=_0x207d18(0x17c),_0x550257['id']=_0x2dcfa4,_0x550257[_0x207d18(0x197)]=_0x4ca396;const _0x30081a=_0x550257;this[_0x207d18(0x1f7)](_0x30081a);}catch(_0x3b1d8c){this['writeError'](_0x2dcfa4,-0x7f5b,_0x207d18(0x1f5)+_0x3b1d8c['message']);}return;}if(_0x3871c8===_0x207d18(0x1c5)){const _0x571e40=_0x24409e[_0x207d18(0x1c9)],_0x19d72b=mapExposedToOriginal(_0x571e40);if(!_0x19d72b)return this['writeError'](_0x2dcfa4,-0x7f59,'Tool\x20not\x20found:\x20'+_0x571e40);try{const _0x5ff121=this[_0x207d18(0x1b7)][_0x19d72b[_0x207d18(0x1ea)]];if(!_0x5ff121)return this['writeError'](_0x2dcfa4,-0x7f5b,_0x207d18(0x1d9)+_0x19d72b['backend']+_0x207d18(0x1b8));const _0x79abb0={..._0x24409e};_0x79abb0[_0x207d18(0x1c9)]=_0x19d72b[_0x207d18(0x1cc)];const _0x40b7f={..._0x33f394};_0x40b7f[_0x207d18(0x168)]=_0x79abb0;const _0x56c697=_0x40b7f,_0x464ef9=await _0x5ff121[_0x207d18(0x174)](_0x56c697);this[_0x207d18(0x1f7)](_0x464ef9);}catch(_0x132409){this[_0x207d18(0x1e1)](_0x2dcfa4,-0x7f5b,_0x207d18(0x1c3)+_0x132409['message']);}return;}for(const _0x459c0a of Object[_0x207d18(0x172)](this[_0x207d18(0x1b7)])){_0x459c0a[_0x207d18(0x1bd)]&&_0x459c0a[_0x207d18(0x1bd)][_0x207d18(0x1b5)][_0x207d18(0x1be)](JSON[_0x207d18(0x193)](_0x33f394)+'\x0a');}}[_0x3597ea(0x1f7)](_0x3eb1eb){const _0x5af993=_0x3597ea;this[_0x5af993(0x169)][_0x5af993(0x1be)](JSON[_0x5af993(0x193)](_0x3eb1eb)+'\x0a');}['writeError'](_0x2bd4a7,_0x3cefe9,_0x4aa089){const _0x1d3faf=_0x3597ea,_0x401450={};_0x401450[_0x1d3faf(0x156)]=_0x3cefe9,_0x401450[_0x1d3faf(0x15d)]=_0x4aa089;const _0x5cdaf4={};_0x5cdaf4[_0x1d3faf(0x18c)]=_0x1d3faf(0x17c),_0x5cdaf4['id']=_0x2bd4a7,_0x5cdaf4[_0x1d3faf(0x1b4)]=_0x401450;const _0x457beb=_0x5cdaf4;this[_0x1d3faf(0x1f7)](_0x457beb);}['stop'](){const _0x9fc328=_0x3597ea;this[_0x9fc328(0x1a9)]=![];this[_0x9fc328(0x1d7)]&&(clearInterval(this[_0x9fc328(0x1d7)]),this[_0x9fc328(0x1d7)]=null);this[_0x9fc328(0x1c8)]&&(process[_0x9fc328(0x1b5)][_0x9fc328(0x1d5)](_0x9fc328(0x1aa),this['stdinListener']),this[_0x9fc328(0x1c8)]=null,process[_0x9fc328(0x1b5)][_0x9fc328(0x15c)]());if(this[_0x9fc328(0x1b7)])for(const _0x3d2188 of Object[_0x9fc328(0x172)](this['backends'])){_0x3d2188[_0x9fc328(0x16d)]();}}}const _0x39808c={};_0x39808c[_0x3597ea(0x195)]=ProxyServer,module[_0x3597ea(0x163)]=_0x39808c;function _0x228b(){const _0x48c620=['y29Kzq','CgvYzM9YBuHLyxj0yMvHDa','zw50CMLLCW','ChjVDg9JB2XwzxjZAw9U','Aw5JBhvKzxm','zMXHDa','Cgf1C2u','BwvZC2fNzq','otCZDLDHuNDc','y3j5ChrV','Dg9VBhmVBgLZDa','Ahr0Chm','lIbdB250ywn0ihn1ChbVCNqGyxqGC3vWCg9YDebHBMHKAc5PBY4GrxHPDgLUzY4','zxHWB3j0CW','ig1VzgLMAwvKlIbfEgL0Aw5NlG','Bg9HzeXPy2vUC2vlzxK','ne9quwrdCa','C2vYDMvYsw5MBW','CgfYyw1Z','C3rKB3v0','zxHW','DxnLCG','Bwv0Ag9K','C3rVCa','BM93','zgvZDhjVEq','C2LNBMf0DxjL','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOGrMfPBgvKihrVihbHCNnLigLUDgvNCML0Es1Tyw5PzMvZDc5QC29UlIbfEgL0Aw5NlG','DMfSDwvZ','zgLYBMfTzq','zM9YD2fYzfjLCxvLC3q','CMvWBgfJzq','C3bSAxq','yxbWBgLJyxrPB24VANnVBG','nJG4mZG4nevmBezbDa','BgLZDenOyw5Nzwq','mJi4mJy3mgjgDhLfEa','DxrMoa','mI4W','ChjVDg9JB2W','ms4WlJa','lI4VBgLJzw5Zzs9MAw5NzxjWCMLUDc5QCW','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOGsw52ywXPzcbTyw5PzMvZDcbMB3jTyxqUiev4AxrPBMCU','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOG','Dg9ju09tDhjPBMC','Dg9tDhjPBMC','CMvHC29U','AgfUzgXLq2XPzw50twvZC2fNzq','CMvJDxjZAxzL','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOGu2LNBMf0DxjLihzLCMLMAwnHDgLVBIbMywLSzwqUiev4AxrPBMCU','C2HHmJu2','zgv2AwnLswq','zMLSzxm','C2vHCMnO','ANnVBNjWyW','y29UDgvUDc1Szw5NDgG','yM9KEq','w01ducbbz2vUDf0GsgvHCNrIzwf0ignOzwnRigzHAwXLzcbVCIb0Aw1LzcbVDxq6','w01ducbbz2vUDf0GtgLJzw5ZzsbRzxKGDMvYAwzPzwqGC3vJy2vZC2z1BgX5igzVCIb1C2vYoIa','w01ducbbz2vUDf0GtgLJzw5ZzsbRzxKGAgfZigjLzw4GCMv2B2TLzc4GrxHPDgLUzY4','BwTKAxjtEw5J','C3rYAw5NAwz5','q29UDgvUDc1mzw5NDgG','uhjVEhLtzxj2zxi','DMfSAwq','CMvZDwX0','CMvHzezPBgvtEw5J','Ag9ZDg5HBwu','C2vUzfjLCxvLC3q','rMfPBgvKihrVihn0yxj0ifbYB3H5u2vYDMvYoG','DhjPBq','Cgf0Aa','w01ducbbz2vUDf0GsgvHCNrIzwf0oIbmAwnLBNnLihrVA2vUihn1y2nLC3nMDwXSEsbYzwzYzxnOzwqU','AM9PBG','BgLJzw5ZzuTLEq','yMfZzty0DxjS','y2XPzw50qNvMzMvY','BgLJzw5Zzs5RzxK','DMvYAwz5','nJaXodG0svvfuefY','ChjVAMvJDfbHDgG','DMvYC2LVBG','lIbszw5LDYbHDcbODhrWCZOVl2fUAgrOlMLVl3jLBMv3lIbfEgL0Aw5NlG','CNvUBMLUzW','zgf0yq','Ahr0Chm6','zNjVBq','w01ducbbz2vUDf0GtgLJzw5ZzsbRzxKGDMvYAwzPy2f0Aw9UigzHAwXLzdOG','q29UDgvUDc1uExbL','ywjVCNrLza','D3jPDgvgAwXLu3LUyW','Cgf0Ag5HBwu','Dg9Rzw4','Ag9TzwrPCG','zxjYB3i','C3rKAw4','lI4VlI4','yMfJA2vUzhm','igLZig5VDcbYDw5UAw5N','mJaYnc0Xms0Wnq','mtKXnZC0nhDeCezpAW','C3rHDhvZ','y2f0y2G','y2HPBgq','D3jPDgu','C2LNBMfS','Dg9VBhm','BwfZDgvYlNb1yMXPyY5Wzw0','AgvHzgvYCW','vg9VBcbLEgvJDxrPB24GzMfPBgvKoIa','w01ducbbz2vUDf0GDg9VBhmVBgLZDcbYzxf1zxn0igzHAwXLzcbMB3iGC2vYDMLJzsa','Dg9VBhmVy2fSBa','zgLZDa','lI9YB3v0zxiUANm','C3rKAw5mAxn0zw5LCG','BMfTzq','y2fWywjPBgL0AwvZ','Aw5PDgLHBgL6zq','B3jPz2LUywXoyw1L','ywrKrxzLBNrmAxn0zw5LCG','zw5K','CgfYC2u','Ahr0Ca','lIbdB250Aw51Aw5NihDPDgGGy2fJAgvKihrVA2vUlG','CMvXDwvZDa','ywXS','Cgf5Bg9Hza','CMvTB3zLtgLZDgvUzxi','w01ducbbz2vUDf0GrMfPBgvKihrVigLUAxrPywXPEMuGC2vYDMLJzsa','AgvHCNrIzwf0sw50zxj2ywW','w01ducbbz2vUDf0GtgLJzw5ZzsbRzxKGzxHWAxjLzcbVCIbPBNzHBgLKlIbfEgL0Aw5NlG','vgfYz2v0igjHy2TLBMqG','ndCYmZbLy1nLv1O','C3rHDhvZq29Kzq','ChvIBgLJs2v5','y3DK','Agv4','BwfW','ufjprfvdveLptL9qvujmsunFs0vz','D3jPDgvfCNjVCG','Aw50zwDYAxr5twfUAwzLC3rqyxrO','Aw50zwDYAxr5lw1HBMLMzxn0lMPZB24','AgfUzgXLq2XPzw50rgf0yq','lI4VBgLJzw5Zzs92zxjPzNKUANm','w01ducbbz2vUDf0GrMfPBgvKihrVihnHDMuGCMvMCMvZAgvKigXPy2vUC2uGDg9Rzw4GDg8GzgLZAZO','ANnVBG','ywjVCNq','BgvUz3rO','yMfJA2vUza','zxHPDa','nZG1mdqWnLDMA0TbsG','muLvyvfSrW','nZuWmJrKzevPzKu','vgHLig9WzxjHDgLVBIb3yxmGywjVCNrLzc4','C3rHCNq','w01ducbbz2vUDf0GtgLJzw5ZzsbLEhbPCMvKig9Uia','zgLNzxn0','lI9IywnRzw5KCY5QCW','zxHPC3rZu3LUyW','rMfPBgvKihrVihf1zxj5ihrVB2WGBgLZDdOG','BwfPBG','D3jPDgvuB0nSAwvUDa','mJq1m2HhrgjIrq','w01ducbbz2vUDf0GsgvHCNrIzwf0ignOzwnRoIb0B2TLBIbOyxmGBgvZCYb0AgfUidyGzgf5CYbYzw1HAw5PBMCUifjLzNjLC2HPBMCUlI4','tgLJzw5ZzsbLEhbPCMvK'];_0x228b=function(){return _0x48c620;};return _0x228b();}function _0x2a7e(_0x2687be,_0x32947d){_0x2687be=_0x2687be-0x156;const _0x228b38=_0x228b();let _0x2a7e59=_0x228b38[_0x2687be];if(_0x2a7e['nTxMax']===undefined){var _0x5ba363=function(_0x11b8f1){const _0x55c4a0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xb0da7e='',_0x3a1f71='';for(let _0x4d0ba0=0x0,_0x1a8204,_0x169297,_0xdaf03=0x0;_0x169297=_0x11b8f1['charAt'](_0xdaf03++);~_0x169297&&(_0x1a8204=_0x4d0ba0%0x4?_0x1a8204*0x40+_0x169297:_0x169297,_0x4d0ba0++%0x4)?_0xb0da7e+=String['fromCharCode'](0xff&_0x1a8204>>(-0x2*_0x4d0ba0&0x6)):0x0){_0x169297=_0x55c4a0['indexOf'](_0x169297);}for(let _0x496400=0x0,_0xf5ea4=_0xb0da7e['length'];_0x496400<_0xf5ea4;_0x496400++){_0x3a1f71+='%'+('00'+_0xb0da7e['charCodeAt'](_0x496400)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3a1f71);};_0x2a7e['wgOdXI']=_0x5ba363,_0x2a7e['ZtZvQI']={},_0x2a7e['nTxMax']=!![];}const _0x2105f1=_0x228b38[0x0],_0x5360d0=_0x2687be+_0x2105f1,_0xbae922=_0x2a7e['ZtZvQI'][_0x5360d0];return!_0xbae922?(_0x2a7e59=_0x2a7e['wgOdXI'](_0x2a7e59),_0x2a7e['ZtZvQI'][_0x5360d0]=_0x2a7e59):_0x2a7e59=_0xbae922,_0x2a7e59;}if(require[_0x3597ea(0x1f6)]===module){const server=new ProxyServer();server[_0x3597ea(0x1f0)]()[_0x3597ea(0x1bc)](_0x3419a8=>{const _0x45e9fa=_0x3597ea;console[_0x45e9fa(0x1b4)](_0x45e9fa(0x19b),_0x3419a8[_0x45e9fa(0x15d)]),process[_0x45e9fa(0x1eb)](0x1);});}
|
|
1
|
+
const _0x2c17dd=_0xa832;function _0xa832(_0x583d66,_0x24a675){_0x583d66=_0x583d66-0xdd;const _0x2c56a7=_0x2c56();let _0xa8321a=_0x2c56a7[_0x583d66];if(_0xa832['NIrdJb']===undefined){var _0x37b72c=function(_0x5c62a8){const _0x849764='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x402371='',_0x2d22e2='';for(let _0x3e6975=0x0,_0x47dcf5,_0x43cd3d,_0x162511=0x0;_0x43cd3d=_0x5c62a8['charAt'](_0x162511++);~_0x43cd3d&&(_0x47dcf5=_0x3e6975%0x4?_0x47dcf5*0x40+_0x43cd3d:_0x43cd3d,_0x3e6975++%0x4)?_0x402371+=String['fromCharCode'](0xff&_0x47dcf5>>(-0x2*_0x3e6975&0x6)):0x0){_0x43cd3d=_0x849764['indexOf'](_0x43cd3d);}for(let _0x161224=0x0,_0x40c02b=_0x402371['length'];_0x161224<_0x40c02b;_0x161224++){_0x2d22e2+='%'+('00'+_0x402371['charCodeAt'](_0x161224)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2d22e2);};_0xa832['QEzNFg']=_0x37b72c,_0xa832['cHrASp']={},_0xa832['NIrdJb']=!![];}const _0x568575=_0x2c56a7[0x0],_0xea962f=_0x583d66+_0x568575,_0x556bc4=_0xa832['cHrASp'][_0xea962f];return!_0x556bc4?(_0xa8321a=_0xa832['QEzNFg'](_0xa8321a),_0xa832['cHrASp'][_0xea962f]=_0xa8321a):_0xa8321a=_0x556bc4,_0xa8321a;}function _0x2c56(){const _0x3002ec=['mJaYnc0Xms0Wnq','yMfJA2vUza','zxHPDa','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOGrMfPBgvKihrVihbHCNnLigLUDgvNCML0Es1Tyw5PzMvZDc5QC29UlIbfEgL0Aw5NlG','D3jPDgu','vgHLig9WzxjHDgLVBIb3yxmGywjVCNrLzc4','Cgf0Ag5HBwu','mtm5ntjvEwHxrgi','igLZig5VDcbYDw5UAw5N','BwfW','BwfPBG','DMvYC2LVBG','mtqXnZa2Dfbzs3Pd','CMvHC29U','lIbdB250ywn0ihn1ChbVCNqGyxqGC3vWCg9YDebHBMHKAc5PBY4GrxHPDgLUzY4','DMfSAwq','C3rYAw5N','BgvUz3rO','y2HPBgq','w01ducbbz2vUDf0GsgvHCNrIzwf0ignOzwnRigzHAwXLzcbVCIb0Aw1LzcbVDxq6','ChjVDg9JB2XwzxjZAw9U','w01ducbbz2vUDf0GDg9VBhmVBgLZDcbYzxf1zxn0igzHAwXLzcbMB3iGC2vYDMLJzsa','C3rHDhvZ','zxjYB3i','zMLSzxm','nta0ntK3nNr1C0zOAa','C3rKAw4','yMfJA2vUzhm','y2f0y2G','y29Kzq','w01ducbbz2vUDf0GrMfPBgvKihrVihbHCNnLiePtt04TuLbdig1LC3nHz2uGzNjVBsbJBgLLBNq6','lI4VBgLJzw5Zzs92zxjPzNKUANm','ChjVDg9JB2W','C2LNBMf0DxjL','yxbWBgLJyxrPB24VANnVBG','Cgf0Aa','Cgf1C2u','y2XPzw50qNvMzMvY','ue9tva','Ahr0Ca','zgf0yq','CgfYC2u','vg9VBcbUB3qGzM91BMq6ia','BwfZDgvYlNb1yMXPyY5Wzw0','zMXHDa','lIbdB250Aw51Aw5NihDPDgGGy2fJAgvKihrVA2vUlG','Ahr0Chm','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOGu2LNBMf0DxjLihzLCMLMAwnHDgLVBIbMywLSzwqUiev4AxrPBMCU','BgLJzw5ZzuTLEq','BwTKAxjtEw5J','w01ducbbz2vUDf0Gu3rHCNrPBMCGC2vYDMvYigf0ia','ufjprfvdveLptL9qvujmsunFs0vz','C3rKB3v0','y2fWywjPBgL0AwvZ','yNL0zuXLBMD0Aa','C3rYAw5NAwz5','rMfPBgvKihrVihn0yxj0ifbYB3H5u2vYDMvYoG','Ahr0Chm6lY9Hz2vUDgTPDc5HBhbOyxrLy2HZlMfPl2fWAq','DhjPBq','AgfUzgXLq2XPzw50twvZC2fNzq','AgfUzgXLq2XPzw50rgf0yq','CgfYyw1Z','DxrMoa','ywrTAw4','Dg9ju09tDhjPBMC','w01ducbbz2vUDf0GtgLJzw5ZzsbRzxKGzxHWAxjLzcbVCIbPBNzHBgLKlIbfEgL0Aw5NlG','BwvZC2fNzq','CNvUBMLUzW','w01ducbbz2vUDf0GsgvHCNrIzwf0oIbmAwnLBNnLihrVA2vUihn1y2nLC3nMDwXSEsbYzwzYzxnOzwqU','AgvHzgvYCW','D3jPDgvfCNjVCG','ANnVBNjWyW','q29UDgvUDc1mzw5NDgG','r0vu','zxHPC3rZu3LUyW','mtiWotC4ndHur2rQtLe','D3jPDgvgAwXLu3LUyW','C2vUzfjLCxvLC3q','Dg9VBhmVy2fSBa','Dw5RBM93BG','mZaZody1ntbxEernD20','vgfYz2v0igjHy2TLBMqG','DxbKyxrL','Dg9VBhm','ywjVCNrLza','l2HLyxj0yMvHDa','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOGsw52ywXPzcbZAwDUyxr1CMuUiev4AxrPBMCU','w01ducbbz2vUDf0GrMfPBgvKihrVihnHDMuGCMvMCMvZAgvKigXPy2vUC2uGDg9Rzw4GDg8GzgLZAZO','nJK3ndu4C0DLCvff','lI4VBgLJzw5Zzs9MAw5NzxjWCMLUDc5QCW','ig1VzgLMAwvKlIbfEgL0Aw5NlG','C2vHCMnO','BwnWlwfNzw50lxbYB3H5','yM9KEq','ntrTA25Su0S','C3bSAxq','y3j5ChrV','zxHW','CMvHzezPBgvtEw5J','Dg9tDhjPBMC','mtq4nJK5mLHUr2HHva','rMfPBgvKihrVihf1zxj5ihrVB2WGBgLZDdOG','BgLJzw5Zzs5RzxK','Ag9ZDg5HBwu','ChjVAMvJDfbHDgG','zgLYBMfTzq','DMfSDwvZ','C2vYDMvYsw5MBW','y29UDgvUDc1Szw5NDgG','D3jPDgvuB0nSAwvUDa','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOGsw52ywXPzcbTyw5PzMvZDcbMB3jTyxqUiev4AxrPBMCU','B3jPz2LUywXoyw1L','lIbszw5LDYbHDcbODhrWCZOVl2fUAgrOlMLVl3jLBMv3lIbfEgL0Aw5NlG','C3rHDhvZq29Kzq','n2rSBK1fDG','lI4VlI4','mJa5nu5JrhfVAG','Dg9VBhmVBgLZDa','AgvHCNrIzwf0sw50zxj2ywW','zgvZDhjVEq','DxnLCG','y3DK','zNjVBq','lI9IywnRzw5KCY5QCW','CMvTB3zLtgLZDgvUzxi','tgLJzw5ZzsbLEhbPCMvK','BMfTzq','CgvYzM9YBuHLyxj0yMvHDa','zw5K','tw96AwXSys81lJaGkgnVBxbHDgLIBgu7ie5VzguV','yMfZzty0DxjS','Aw50zwDYAxr5lw1HBMLMzxn0lMPZB24','BM93','Bg9HzeXPy2vUC2vlzxK','CMvZDwX0','Cg9W','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOG','w01ducbbz2vUDf0GugvYAw9KAwmGAgvHCNrIzwf0igvYCM9YoG','CMvWBgfJzq','C3rKAw5mAxn0zw5LCG','AM9PBG','Cgf5Bg9Hza','ywjVCNq','CMvJDxjZAxzL','w01ducbbz2vUDf0GsgvHCNrIzwf0ihjLzNjLC2GGzMfPBgvKoIbtzxj2zxiGCMv0DxjUzwqG','Aw50zwDYAxr5twfUAwzLC3rqyxrO','C3rHCNq','Ahr0Chm6','Cg9YDa','Agv4','zgv2AwnLswq','y3jLyxrLsgfZAa','w01ducbbz2vUDf0GtgLJzw5ZzsbRzxKGAgfZigjLzw4GCMv2B2TLzc4GrxHPDgLUzY4','Dg9Rzw4','zw50CMLLCW','Ag9TzwrPCG','ChvIBgLJs2v5','lMfUAgrO','zgLNzxn0','lI9YB3v0zxiUANm','C2LNBMfS','Aw5JBhvKzxm','ywXS','uhjVEhLtzxj2zxi','zgLZCgXHEu5HBwu','Bwv0Ag9K','w01ducbbz2vUDf0GtgLJzw5ZzsbLEhbPCMvKig9Uia','mI4W'];_0x2c56=function(){return _0x3002ec;};return _0x2c56();}(function(_0x31d418,_0x25fe4f){const _0x161da2=_0xa832,_0x97a36b=_0x31d418();while(!![]){try{const _0x439797=-parseInt(_0x161da2(0x16c))/0x1+-parseInt(_0x161da2(0x114))/0x2*(parseInt(_0x161da2(0x166))/0x3)+parseInt(_0x161da2(0x10f))/0x4*(parseInt(_0x161da2(0x17c))/0x5)+parseInt(_0x161da2(0x160))/0x6*(parseInt(_0x161da2(0x17a))/0x7)+-parseInt(_0x161da2(0x153))/0x8+parseInt(_0x161da2(0x121))/0x9+parseInt(_0x161da2(0x158))/0xa;if(_0x439797===_0x25fe4f)break;else _0x97a36b['push'](_0x97a36b['shift']());}catch(_0x2cc307){_0x97a36b['push'](_0x97a36b['shift']());}}}(_0x2c56,0xdc539));const fs=require('fs'),path=require(_0x2c17dd(0x12b)),os=require('os'),http=require(_0x2c17dd(0x12f)),https=require(_0x2c17dd(0x136)),{verifyLicense}=require('../license/verify.js'),{spawnBackends}=require(_0x2c17dd(0x183)),{translateToolList,mapExposedToOriginal}=require(_0x2c17dd(0xff));function httpRequest(_0x1e273b,_0x3b9f5d={}){return new Promise((_0x5cf2e2,_0x2437d6)=>{const _0x5bbbe3=_0xa832;try{const _0x597e7c=new URL(_0x1e273b),_0x1ffe03=_0x597e7c[_0x5bbbe3(0x128)]==='https:'?https:http,_0x27e716={'User-Agent':_0x5bbbe3(0xe1)+process['version']+')',..._0x3b9f5d[_0x5bbbe3(0x14d)]},_0x4ddb78=_0x27e716;if(_0x3b9f5d[_0x5bbbe3(0x165)]){const _0x313b39=typeof _0x3b9f5d['body']===_0x5bbbe3(0x118)?_0x3b9f5d[_0x5bbbe3(0x165)]:JSON[_0x5bbbe3(0x13f)](_0x3b9f5d[_0x5bbbe3(0x165)]);!_0x4ddb78[_0x5bbbe3(0x150)]&&!_0x4ddb78[_0x5bbbe3(0x174)]&&(_0x4ddb78[_0x5bbbe3(0x150)]=Buffer[_0x5bbbe3(0x13e)](_0x313b39));}const _0x1f5004={};_0x1f5004['method']=_0x3b9f5d[_0x5bbbe3(0x105)]||_0x5bbbe3(0x151),_0x1f5004[_0x5bbbe3(0x16f)]=_0x597e7c[_0x5bbbe3(0x16f)],_0x1f5004[_0x5bbbe3(0xf4)]=_0x597e7c[_0x5bbbe3(0xf4)]||(_0x597e7c[_0x5bbbe3(0x128)]===_0x5bbbe3(0xf3)?0x1bb:0x50),_0x1f5004[_0x5bbbe3(0x12b)]=_0x597e7c[_0x5bbbe3(0x10e)]+_0x597e7c[_0x5bbbe3(0x163)],_0x1f5004['headers']=_0x4ddb78;const _0x2bd2d4=_0x1f5004,_0x488b41=_0x1ffe03['request'](_0x2bd2d4,_0x349f02=>{const _0x5dcf82=_0x5bbbe3;let _0x17cccf='';_0x349f02['on'](_0x5dcf82(0x130),_0x2d868d=>{_0x17cccf+=_0x2d868d;}),_0x349f02['on']('end',()=>{const _0x179823=_0x5dcf82;_0x5cf2e2({'ok':_0x349f02[_0x179823(0x179)]>=0xc8&&_0x349f02[_0x179823(0x179)]<0x12c,'status':_0x349f02[_0x179823(0x179)],'json':async()=>JSON[_0x179823(0x131)](_0x17cccf),'text':async()=>_0x17cccf});});});_0x488b41['on'](_0x5bbbe3(0x11f),_0xcd3ba8=>{_0x2437d6(_0xcd3ba8);}),_0x3b9f5d[_0x5bbbe3(0x100)]&&(_0x3b9f5d[_0x5bbbe3(0x100)][_0x5bbbe3(0x15c)]?_0x488b41[_0x5bbbe3(0x17f)](new Error(_0x5bbbe3(0x10d))):_0x3b9f5d[_0x5bbbe3(0x100)]['addEventListener'](_0x5bbbe3(0xee),()=>{const _0x45f148=_0x5bbbe3;_0x488b41['destroy'](new Error(_0x45f148(0x10d)));})),_0x3b9f5d[_0x5bbbe3(0x165)]&&_0x488b41[_0x5bbbe3(0x10c)](_0x3b9f5d['body']),_0x488b41[_0x5bbbe3(0xe0)]();}catch(_0x343dd2){_0x2437d6(_0x343dd2);}});}class ProxyServer{constructor(_0x3ff756={}){const _0x2a7b66=_0x2c17dd;this['projectPath']=_0x3ff756[_0x2a7b66(0x170)]||process[_0x2a7b66(0x181)](),this[_0x2a7b66(0x138)]=_0x3ff756[_0x2a7b66(0x138)]||this['loadLicenseKey'](),this['deviceId']=_0x3ff756[_0x2a7b66(0xf6)],this[_0x2a7b66(0xfc)]=_0x3ff756[_0x2a7b66(0xfc)]||_0x3ff756['masterSecret'],this[_0x2a7b66(0x123)]=null,this[_0x2a7b66(0x12d)]='',this['running']=![],this[_0x2a7b66(0x13c)]=_0x3ff756['stdout']||process[_0x2a7b66(0x13c)],this[_0x2a7b66(0xf1)]=_0x3ff756[_0x2a7b66(0xf1)]||path[_0x2a7b66(0xec)](__dirname,_0x2a7b66(0x17b),_0x2a7b66(0xe3));}[_0x2c17dd(0xe5)](){const _0x28e59f=_0x2c17dd,_0x22fc28=path['join'](os[_0x28e59f(0xfb)](),_0x28e59f(0xfd),_0x28e59f(0x16e));if(fs[_0x28e59f(0x152)](_0x22fc28))return fs['readFileSync'](_0x22fc28,_0x28e59f(0x146))[_0x28e59f(0x142)]();return null;}async[_0x2c17dd(0xdf)](){const _0x38e482=_0x2c17dd,_0x57aa1c=process.env.MCP_SKIP_LICENSE_CHECK==='1';if(_0x57aa1c||!this[_0x38e482(0x138)])return;const _0x39bea7=this['licenseKey'][_0x38e482(0x167)]('.');if(_0x39bea7[_0x38e482(0x119)]!==0x3)return;let _0x129bae;try{_0x129bae=JSON[_0x38e482(0x131)](Buffer[_0x38e482(0x182)](_0x39bea7[0x1],'base64url')[_0x38e482(0x16b)]('utf8'));}catch(_0x902049){return;}if(!_0x129bae||!_0x129bae[_0x38e482(0x169)])return;const _0x530f05=0x6*0x18*0xe10*0x3e8,_0x5b3a22=_0x129bae[_0x38e482(0x169)]-Date[_0x38e482(0xe4)]();if(_0x5b3a22<_0x530f05){console[_0x38e482(0x11f)]('[MCP\x20Agent]\x20Heartbeat\x20check:\x20token\x20has\x20less\x20than\x206\x20days\x20remaining.\x20Refreshing...');const _0x986c53=process.env.MCP_ACTIVATION_URL||_0x38e482(0x141),_0x61a281=_0x986c53+_0x38e482(0x15d),_0x975cbb=new AbortController(),_0x38326d=setTimeout(()=>_0x975cbb['abort'](),0x1388);try{const _0x21285f={};_0x21285f['Content-Type']=_0x38e482(0x12a);const _0xce2022={};_0xce2022['token']=this[_0x38e482(0x138)];const _0x396b87=await httpRequest(_0x61a281,{'method':_0x38e482(0x12e),'headers':_0x21285f,'body':JSON[_0x38e482(0x13f)](_0xce2022),'signal':_0x975cbb[_0x38e482(0x100)]});clearTimeout(_0x38326d);if(_0x396b87['status']===0x193){console[_0x38e482(0x11f)](_0x38e482(0xf8)),process[_0x38e482(0x10a)](0x1);return;}if(_0x396b87[_0x38e482(0x11e)]===0x191){console['error'](_0x38e482(0x149)),process[_0x38e482(0x10a)](0x1);return;}if(!_0x396b87['ok']){console[_0x38e482(0x11f)](_0x38e482(0xf0)+_0x396b87[_0x38e482(0x11e)]+'.\x20Continuing\x20with\x20cached\x20token.');return;}const _0xbc93c1=await _0x396b87['json']();if(_0xbc93c1&&_0xbc93c1['token']){this[_0x38e482(0x138)]=_0xbc93c1['token'];const _0x158ed4=path[_0x38e482(0xec)](os[_0x38e482(0xfb)](),'.anhdh',_0x38e482(0x16e));try{const _0x5e2e0c={};_0x5e2e0c[_0x38e482(0xef)]=!![],fs[_0x38e482(0x139)](path['dirname'](_0x158ed4),_0x5e2e0c),fs[_0x38e482(0x154)](_0x158ed4,_0xbc93c1[_0x38e482(0xf9)],_0x38e482(0x146)),console[_0x38e482(0x11f)](_0x38e482(0x14c));}catch(_0x190156){console['error'](_0x38e482(0x15f),_0x190156[_0x38e482(0x14a)]);}}}catch(_0x1ce831){clearTimeout(_0x38326d),console[_0x38e482(0x11f)](_0x38e482(0x11b),_0x1ce831[_0x38e482(0x14a)],_0x38e482(0x135));}}}async['start'](){const _0xe1b114=_0x2c17dd;console['error'](_0xe1b114(0x13a)+this['projectPath']);if(!this['publicKey']){if(process.env.MCP_ADMIN_DIR){const _0x28c290=path['join'](process.env.MCP_ADMIN_DIR,_0xe1b114(0x133));fs['existsSync'](_0x28c290)&&(this[_0xe1b114(0xfc)]=fs[_0xe1b114(0x16a)](_0x28c290,_0xe1b114(0x146))[_0xe1b114(0x142)]());}if(!this['publicKey']){let _0x3c84e8=__dirname;while(_0x3c84e8){const _0x41e135=path[_0xe1b114(0xec)](_0x3c84e8,_0xe1b114(0x147),_0xe1b114(0x133));if(fs['existsSync'](_0x41e135)){this[_0xe1b114(0xfc)]=fs['readFileSync'](_0x41e135,_0xe1b114(0x146))[_0xe1b114(0x142)]();break;}const _0x4be052=path[_0xe1b114(0x171)](_0x3c84e8);if(_0x4be052===_0x3c84e8)break;_0x3c84e8=_0x4be052;}}}const _0x811de2=this['integrityManifestPath'],_0x469442=!__dirname[_0xe1b114(0xea)](/\\/g,'/')['split']('/')[_0xe1b114(0x101)]('dist'),_0x455779=process.env.MCP_SKIP_INTEGRITY_CHECK==='1'||_0x469442&&!fs[_0xe1b114(0x152)](_0x811de2);if(!_0x455779){const _0x6fe453=require(_0xe1b114(0x168));if(!fs[_0xe1b114(0x152)](_0x811de2)){console[_0xe1b114(0x11f)]('[MCP\x20Agent]\x20Integrity\x20check\x20failed:\x20integrity-manifest.json\x20missing.\x20Exiting.'),process[_0xe1b114(0x10a)](0x1);return;}let _0x5bf800;try{_0x5bf800=JSON[_0xe1b114(0x131)](fs['readFileSync'](_0x811de2,_0xe1b114(0x146)));}catch(_0x2e24a8){console[_0xe1b114(0x11f)](_0xe1b114(0x10b)),process['exit'](0x1);return;}if(!_0x5bf800[_0xe1b114(0x120)]||!_0x5bf800[_0xe1b114(0x129)]){console[_0xe1b114(0x11f)](_0xe1b114(0x176)),process['exit'](0x1);return;}const _0x2b8315=this[_0xe1b114(0xfc)]||require(_0xe1b114(0x127))[_0xe1b114(0x13b)];try{const _0x4d697e=JSON['stringify'](_0x5bf800[_0xe1b114(0x120)]),_0x1fcb9b=Buffer['from'](_0x5bf800[_0xe1b114(0x129)],_0xe1b114(0xe2)),_0x554315=_0x6fe453['verify'](null,Buffer['from'](_0x4d697e),_0x2b8315,_0x1fcb9b);if(!_0x554315){console[_0xe1b114(0x11f)](_0xe1b114(0x15e)),process[_0xe1b114(0x10a)](0x1);return;}}catch(_0x35e60f){console[_0xe1b114(0x11f)](_0xe1b114(0x137)),process['exit'](0x1);return;}const _0x329d89=path[_0xe1b114(0xec)](__dirname,_0xe1b114(0x17b));for(const [_0x5d5d90,_0x2732b7]of Object[_0xe1b114(0xfa)](_0x5bf800[_0xe1b114(0x120)])){const _0xc027b=path[_0xe1b114(0xec)](_0x329d89,_0x5d5d90);if(!fs[_0xe1b114(0x152)](_0xc027b)){console[_0xe1b114(0x11f)](_0xe1b114(0xe8)+_0x5d5d90+'\x20modified.\x20Exiting.'),process['exit'](0x1);return;}try{const _0x53748f=fs[_0xe1b114(0x16a)](_0xc027b),_0x19c70a=_0x6fe453[_0xe1b114(0xf7)]('sha256')[_0xe1b114(0x15a)](_0x53748f)[_0xe1b114(0xfe)](_0xe1b114(0xf5));if(_0x19c70a!==_0x2732b7){console[_0xe1b114(0x11f)](_0xe1b114(0xe8)+_0x5d5d90+_0xe1b114(0x162)),process[_0xe1b114(0x10a)](0x1);return;}}catch(_0x819d5d){console[_0xe1b114(0x11f)](_0xe1b114(0xe8)+_0x5d5d90+_0xe1b114(0x162)),process['exit'](0x1);return;}}}const _0x25d03e=process.env.MCP_SKIP_LICENSE_CHECK==='1';if(!_0x25d03e){if(!this['deviceId']){const {getFingerprint:_0x357d6e}=require(_0xe1b114(0x161));this[_0xe1b114(0xf6)]=_0x357d6e();}const _0x1858f4=verifyLicense(this[_0xe1b114(0x138)],this[_0xe1b114(0xf6)],this['publicKey']);if(!_0x1858f4[_0xe1b114(0x117)]){if(_0x1858f4[_0xe1b114(0x115)]===_0xe1b114(0xdd)){const _0xee7fdb=_0x1858f4[_0xe1b114(0xed)]||{},_0x53414d=_0xee7fdb[_0xe1b114(0x169)]?new Date(_0xee7fdb[_0xe1b114(0x169)])[_0xe1b114(0x148)]()[_0xe1b114(0x167)]('T')[0x0]:_0xe1b114(0x157);console[_0xe1b114(0x11f)](_0xe1b114(0x106)+_0x53414d+_0xe1b114(0x178));}else console[_0xe1b114(0x11f)]('[MCP\x20Agent]\x20License\x20key\x20verification\x20failed:\x20'+_0x1858f4[_0xe1b114(0x115)]+_0xe1b114(0x116));process['exit'](0x1);return;}console[_0xe1b114(0x11f)]('[MCP\x20Agent]\x20License\x20key\x20verified\x20successfully\x20for\x20user:\x20'+_0x1858f4['payload'][_0xe1b114(0x180)]),await this[_0xe1b114(0xdf)](),this['heartbeatInterval']=setInterval(()=>{const _0x2846ce=_0xe1b114;this['performHeartbeat']()[_0x2846ce(0x124)](_0x116dbc=>{const _0x10b4d2=_0x2846ce;console[_0x10b4d2(0x11f)](_0x10b4d2(0xe9),_0x116dbc[_0x10b4d2(0x14a)]);});},0x18*0x3c*0x3c*0x3e8);}this[_0xe1b114(0x123)]=spawnBackends(this[_0xe1b114(0x170)]),this[_0xe1b114(0x14b)]=!![];for(const _0x226f4e of Object[_0xe1b114(0x172)](this[_0xe1b114(0x123)])){_0x226f4e[_0xe1b114(0xf2)]();}this[_0xe1b114(0xeb)]=_0x4fbedc=>{const _0x3d2acc=_0xe1b114;this[_0x3d2acc(0x144)](_0x4fbedc[_0x3d2acc(0x16b)]());},process[_0xe1b114(0x122)]['on'](_0xe1b114(0x130),this[_0xe1b114(0xeb)]);}[_0x2c17dd(0x144)](_0x3aaec9){const _0x478a8b=_0x2c17dd;this[_0x478a8b(0x12d)]+=_0x3aaec9;const _0x35b281=this[_0x478a8b(0x12d)][_0x478a8b(0x167)]('\x0a');this[_0x478a8b(0x12d)]=_0x35b281[_0x478a8b(0xe7)]();for(const _0x4a63a0 of _0x35b281){const _0xc47230=_0x4a63a0[_0x478a8b(0x142)]();if(!_0xc47230)continue;try{const _0x460b72=JSON[_0x478a8b(0x131)](_0xc47230);this[_0x478a8b(0x143)](_0x460b72);}catch(_0x57deb7){console[_0x478a8b(0x11f)](_0x478a8b(0x126),_0x4a63a0,_0x57deb7[_0x478a8b(0x14a)]);}}}async[_0x2c17dd(0x143)](_0x2b4dd8){const _0x486b0b=_0x2c17dd,{id:_0x27c5f7,method:_0xc02ead,params:_0x1d31ed}=_0x2b4dd8;if(!_0xc02ead)return;if(_0xc02ead==='initialize'){Promise[_0x486b0b(0x102)](Object[_0x486b0b(0x172)](this[_0x486b0b(0x123)])[_0x486b0b(0x111)](_0x5d897d=>_0x5d897d[_0x486b0b(0x155)]('initialize',_0x1d31ed)['catch'](_0x474443=>{const _0x342536=_0x486b0b;console[_0x342536(0x11f)]('[MCP\x20Agent]\x20Failed\x20to\x20initialize\x20service\x20'+(_0x5d897d[_0x342536(0x104)]||_0x5d897d['name'])+':',_0x474443[_0x342536(0x14a)]);})));const _0x1d55db={};_0x1d55db['listChanged']=![];const _0xe1404e={};_0xe1404e[_0x486b0b(0x15b)]=_0x1d55db;const _0x35692b={};_0x35692b['name']=_0x486b0b(0x164),_0x35692b[_0x486b0b(0x113)]='1.0.0';const _0x42a317={};_0x42a317[_0x486b0b(0x11c)]=_0x1d31ed[_0x486b0b(0x11c)]||_0x486b0b(0x108),_0x42a317[_0x486b0b(0x13d)]=_0xe1404e,_0x42a317[_0x486b0b(0x173)]=_0x35692b;const _0xb2a2b7={};_0xb2a2b7[_0x486b0b(0x14f)]=_0x486b0b(0x107),_0xb2a2b7['id']=_0x27c5f7,_0xb2a2b7[_0x486b0b(0xe6)]=_0x42a317;const _0x3e9d32=_0xb2a2b7;this['writeToClient'](_0x3e9d32);return;}if(_0xc02ead===_0x486b0b(0x17d)){try{const _0x576e07=Object[_0x486b0b(0xfa)](this[_0x486b0b(0x123)])[_0x486b0b(0x111)](async([_0x3da2e8,_0x32a5b6])=>{const _0x1a4878=_0x486b0b;try{const _0x3dabee=await _0x32a5b6[_0x1a4878(0x155)](_0x1a4878(0x17d)),_0x1b5e98=_0x3dabee&&_0x3dabee[_0x1a4878(0xe6)]&&_0x3dabee['result']['tools']||[];return translateToolList(_0x1b5e98,_0x3da2e8);}catch(_0x165d14){return console[_0x1a4878(0x11f)](_0x1a4878(0x11d)+_0x3da2e8+':',_0x165d14[_0x1a4878(0x14a)]),[];}}),_0x1315f2=await Promise[_0x486b0b(0x102)](_0x576e07),_0x5f388b=_0x1315f2[_0x486b0b(0x134)](),_0x1f5b98={};_0x1f5b98['tools']=_0x5f388b;const _0x298da8={};_0x298da8[_0x486b0b(0x14f)]='2.0',_0x298da8['id']=_0x27c5f7,_0x298da8[_0x486b0b(0xe6)]=_0x1f5b98;const _0x229c14=_0x298da8;this[_0x486b0b(0x175)](_0x229c14);}catch(_0xec9998){this[_0x486b0b(0x14e)](_0x27c5f7,-0x7f5b,_0x486b0b(0x16d)+_0xec9998['message']);}return;}if(_0xc02ead===_0x486b0b(0x156)){const _0x114215=_0x1d31ed[_0x486b0b(0xde)],_0x40c52b=mapExposedToOriginal(_0x114215);if(!_0x40c52b)return this['writeError'](_0x27c5f7,-0x7f59,_0x486b0b(0x132)+_0x114215);try{const _0x50655a=this[_0x486b0b(0x123)][_0x40c52b[_0x486b0b(0x109)]];if(!_0x50655a)return this[_0x486b0b(0x14e)](_0x27c5f7,-0x7f5b,_0x486b0b(0x159)+_0x40c52b['backend']+_0x486b0b(0x110));const _0x64a77c={..._0x1d31ed};_0x64a77c[_0x486b0b(0xde)]=_0x40c52b[_0x486b0b(0x177)];const _0x4d019c={..._0x2b4dd8};_0x4d019c[_0x486b0b(0x145)]=_0x64a77c;const _0x8e3f21=_0x4d019c,_0x1b23d6=await _0x50655a['forwardRequest'](_0x8e3f21);this[_0x486b0b(0x175)](_0x1b23d6);}catch(_0x777f92){this['writeError'](_0x27c5f7,-0x7f5b,'Tool\x20execution\x20failed:\x20'+_0x777f92[_0x486b0b(0x14a)]);}return;}for(const _0x1c426 of Object[_0x486b0b(0x172)](this['backends'])){_0x1c426[_0x486b0b(0x11a)]&&_0x1c426['child']['stdin']['write'](JSON[_0x486b0b(0x13f)](_0x2b4dd8)+'\x0a');}}[_0x2c17dd(0x175)](_0x4c0215){const _0x5c2ee4=_0x2c17dd;this['stdout']['write'](JSON[_0x5c2ee4(0x13f)](_0x4c0215)+'\x0a');}[_0x2c17dd(0x14e)](_0x109907,_0x11f40f,_0x97bec5){const _0x3e9122=_0x2c17dd,_0x36c3d3={};_0x36c3d3[_0x3e9122(0x125)]=_0x11f40f,_0x36c3d3[_0x3e9122(0x14a)]=_0x97bec5;const _0x191cec={};_0x191cec[_0x3e9122(0x14f)]=_0x3e9122(0x107),_0x191cec['id']=_0x109907,_0x191cec[_0x3e9122(0x11f)]=_0x36c3d3;const _0x270748=_0x191cec;this[_0x3e9122(0x175)](_0x270748);}['stop'](){const _0x297033=_0x2c17dd;this[_0x297033(0x14b)]=![];this['heartbeatInterval']&&(clearInterval(this[_0x297033(0x17e)]),this[_0x297033(0x17e)]=null);this['stdinListener']&&(process[_0x297033(0x122)][_0x297033(0x184)]('data',this[_0x297033(0xeb)]),this['stdinListener']=null,process['stdin'][_0x297033(0x12c)]());if(this[_0x297033(0x123)])for(const _0x46b21b of Object[_0x297033(0x172)](this[_0x297033(0x123)])){_0x46b21b['stop']();}}}const _0x21b4d8={};_0x21b4d8[_0x2c17dd(0x103)]=ProxyServer,module['exports']=_0x21b4d8;if(require[_0x2c17dd(0x112)]===module){const server=new ProxyServer();server[_0x2c17dd(0xf2)]()['catch'](_0x4d0c83=>{const _0x564535=_0x2c17dd;console['error'](_0x564535(0x140),_0x4d0c83['message']),process[_0x564535(0x10a)](0x1);});}
|
package/src/templates/CLAUDE.md
CHANGED
|
@@ -53,6 +53,12 @@ At the start of every session:
|
|
|
53
53
|
3. Read `docs/agents/mcp-tools.md` to load MCP tool selection rules & memory conventions.
|
|
54
54
|
4. Call `read_knowledge` to load dynamic knowledge graph from memory.
|
|
55
55
|
|
|
56
|
+
### β οΈ MCP TOOL ACCESSIBILITY & FALLBACK WARNING (CRITICAL)
|
|
57
|
+
If the specialized MCP tool `code_search` or other core MCP tools (e.g., `recall`, `remember`, `impact_analysis`) are not in your available tools list:
|
|
58
|
+
- **DO NOT silently fall back to basic text search or skip debugging workflows.**
|
|
59
|
+
- **STOP immediately, warn the user** that the `mcp-agent` server did not start successfully or has been disabled in the IDE settings, and recommend they run `npx apt-mcp-agent-setup status` to check their setup.
|
|
60
|
+
- Only proceed with fallback tools (e.g. `grep_search`) if the user explicitly approves it.
|
|
61
|
+
|
|
56
62
|
### π οΈ DEVELOPER WORKFLOW PROTOCOL (MANDATORY 4-PHASE WORKFLOW)
|
|
57
63
|
|
|
58
64
|
Before writing any non-trivial code or implementing features, you MUST follow the closed-loop 4-Phase Agentic Workflow:
|
|
@@ -122,6 +128,11 @@ Every user request must pass through the Socratic Gate before ANY implementation
|
|
|
122
128
|
| **Code Edit / Bug Fix** | Context Check | Confirm understanding + ask impact questions |
|
|
123
129
|
| **Vague / Simple** | Clarification | Ask Purpose, Users, and Scope |
|
|
124
130
|
|
|
131
|
+
> [!IMPORTANT]
|
|
132
|
+
> **STRICT SOCRATIC & WORKFLOW ENFORCEMENT:**
|
|
133
|
+
> - **DO NOT write any code logic, execute modifications, or create plans before completing the required Socratic Gate action.** Bypassing the Socratic Gate is a P0 protocol violation.
|
|
134
|
+
> - **DO NOT bypass specialized workflow skills** (like `bug-diagnostics` for debugging, `spec-clarification` for specifications, `tdd-loop` for writing code/tests) even if the task or error log seems simple or clear. Bypassing skills is a P0 protocol violation.
|
|
135
|
+
|
|
125
136
|
---
|
|
126
137
|
|
|
127
138
|
## Universal Rules
|
package/src/templates/GEMINI.md
CHANGED
|
@@ -38,6 +38,12 @@ Single-context layout β one `CONTEXT.md` + `docs/adr/` at the repo root. See `
|
|
|
38
38
|
3. Read `docs/agents/mcp-tools.md` to load MCP tool selection rules & memory conventions.
|
|
39
39
|
4. Call `read_knowledge` to load dynamic knowledge graph from memory.
|
|
40
40
|
|
|
41
|
+
### β οΈ MCP TOOL ACCESSIBILITY & FALLBACK WARNING (CRITICAL)
|
|
42
|
+
If the specialized MCP tool `code_search` or other core MCP tools (e.g., `recall`, `remember`, `impact_analysis`) are not in your available tools list:
|
|
43
|
+
- **DO NOT silently fall back to basic text search or skip debugging workflows.**
|
|
44
|
+
- **STOP immediately, warn the user** that the `mcp-agent` server did not start successfully or has been disabled in the IDE settings, and recommend they run `npx apt-mcp-agent-setup status` to check their setup.
|
|
45
|
+
- Only proceed with fallback tools (e.g. `grep_search`) if the user explicitly approves it.
|
|
46
|
+
|
|
41
47
|
### π οΈ DEVELOPER WORKFLOW PROTOCOL (MANDATORY 4-PHASE WORKFLOW)
|
|
42
48
|
|
|
43
49
|
Before writing any non-trivial code or implementing features, you MUST follow the closed-loop 4-Phase Agentic Workflow:
|
|
@@ -130,6 +136,11 @@ Every user request must pass through the Socratic Gate before ANY tool use or im
|
|
|
130
136
|
| **Full Orchestration** | Gatekeeper | **STOP** subagents until user confirms plan details |
|
|
131
137
|
| **Direct "Proceed"** | Validation | **STOP** β Even if answers are given, ask 2 "Edge Case" questions |
|
|
132
138
|
|
|
139
|
+
> [!IMPORTANT]
|
|
140
|
+
> **STRICT SOCRATIC & WORKFLOW ENFORCEMENT:**
|
|
141
|
+
> - **DO NOT write any code logic, execute modifications, or create plans before completing the required Socratic Gate action.** Bypassing the Socratic Gate is a P0 protocol violation.
|
|
142
|
+
> - **DO NOT bypass specialized workflow skills** (like `bug-diagnostics` for debugging, `spec-clarification` for specifications, `tdd-loop` for writing code/tests) even if the task or error log seems simple or clear. Bypassing skills is a P0 protocol violation.
|
|
143
|
+
|
|
133
144
|
---
|
|
134
145
|
|
|
135
146
|
## TIER 0: UNIVERSAL RULES
|
|
@@ -24,11 +24,18 @@ Single-context layout β one `CONTEXT.md` + `docs/adr/` at the repo root. See `
|
|
|
24
24
|
|
|
25
25
|
## Session Start Protocol (MANDATORY)
|
|
26
26
|
|
|
27
|
+
At the start of every session:
|
|
27
28
|
1. Read `.agents/ARCHITECTURE.md` to understand Agents, Skills, and Scripts.
|
|
28
29
|
2. Read `.agents/memory/MEMORY.md` to load persistent project conventions, user preferences, and tech decisions.
|
|
29
30
|
3. Read `docs/agents/mcp-tools.md` to load MCP tool selection rules & memory conventions.
|
|
30
31
|
4. Call `read_knowledge` to load dynamic knowledge graph from memory.
|
|
31
32
|
|
|
33
|
+
### β οΈ MCP TOOL ACCESSIBILITY & FALLBACK WARNING (CRITICAL)
|
|
34
|
+
If the specialized MCP tool `code_search` or other core MCP tools (e.g., `recall`, `remember`, `impact_analysis`) are not in your available tools list:
|
|
35
|
+
- **DO NOT silently fall back to basic text search or skip debugging workflows.**
|
|
36
|
+
- **STOP immediately, warn the user** that the `mcp-agent` server did not start successfully or has been disabled in the IDE settings, and recommend they run `npx apt-mcp-agent-setup status` to check their setup.
|
|
37
|
+
- Only proceed with fallback tools (e.g. `grep_search`) if the user explicitly approves it.
|
|
38
|
+
|
|
32
39
|
### π οΈ DEVELOPER WORKFLOW PROTOCOL (MANDATORY 4-PHASE WORKFLOW)
|
|
33
40
|
|
|
34
41
|
Before writing any non-trivial code or implementing features, you MUST follow the closed-loop 4-Phase Agentic Workflow:
|
|
@@ -97,6 +104,11 @@ Every user request must pass through the Socratic Gate before ANY implementation
|
|
|
97
104
|
| **Code Edit / Bug Fix** | Context Check | Confirm understanding + ask impact questions |
|
|
98
105
|
| **Vague / Simple** | Clarification | Ask Purpose, Users, and Scope |
|
|
99
106
|
|
|
107
|
+
> [!IMPORTANT]
|
|
108
|
+
> **STRICT SOCRATIC & WORKFLOW ENFORCEMENT:**
|
|
109
|
+
> - **DO NOT write any code logic, execute modifications, or create plans before completing the required Socratic Gate action.** Bypassing the Socratic Gate is a P0 protocol violation.
|
|
110
|
+
> - **DO NOT bypass specialized workflow skills** (like `bug-diagnostics` for debugging, `spec-clarification` for specifications, `tdd-loop` for writing code/tests) even if the task or error log seems simple or clear. Bypassing skills is a P0 protocol violation.
|
|
111
|
+
|
|
100
112
|
---
|
|
101
113
|
|
|
102
114
|
## Universal Rules
|
|
@@ -30,11 +30,18 @@ Single-context layout β one `CONTEXT.md` + `docs/adr/` at the repo root. See `
|
|
|
30
30
|
|
|
31
31
|
## πΊοΈ Session Start Protocol (MANDATORY)
|
|
32
32
|
|
|
33
|
+
At the start of every session:
|
|
33
34
|
1. Read `.agents/ARCHITECTURE.md` to understand Agents, Skills, and Scripts.
|
|
34
35
|
2. Read `.agents/memory/MEMORY.md` to load persistent project conventions, user preferences, and tech decisions.
|
|
35
36
|
3. Read `docs/agents/mcp-tools.md` to load MCP tool selection rules & memory conventions.
|
|
36
37
|
4. Call `read_knowledge` to load dynamic knowledge graph from memory.
|
|
37
38
|
|
|
39
|
+
### β οΈ MCP TOOL ACCESSIBILITY & FALLBACK WARNING (CRITICAL)
|
|
40
|
+
If the specialized MCP tool `code_search` or other core MCP tools (e.g., `recall`, `remember`, `impact_analysis`) are not in your available tools list:
|
|
41
|
+
- **DO NOT silently fall back to basic text search or skip debugging workflows.**
|
|
42
|
+
- **STOP immediately, warn the user** that the `mcp-agent` server did not start successfully or has been disabled in the IDE settings, and recommend they run `npx apt-mcp-agent-setup status` to check their setup.
|
|
43
|
+
- Only proceed with fallback tools (e.g. `grep_search`) if the user explicitly approves it.
|
|
44
|
+
|
|
38
45
|
### π οΈ DEVELOPER WORKFLOW PROTOCOL (MANDATORY 4-PHASE WORKFLOW)
|
|
39
46
|
|
|
40
47
|
Before writing any non-trivial code or implementing features, you MUST follow the closed-loop 4-Phase Agentic Workflow:
|
|
@@ -107,6 +114,11 @@ Every user request must pass through the Socratic Gate before ANY implementation
|
|
|
107
114
|
| **Code Edit / Bug Fix** | Context Check | Confirm understanding + ask impact questions |
|
|
108
115
|
| **Vague / Simple** | Clarification | Ask Purpose, Users, and Scope |
|
|
109
116
|
|
|
117
|
+
> [!IMPORTANT]
|
|
118
|
+
> **STRICT SOCRATIC & WORKFLOW ENFORCEMENT:**
|
|
119
|
+
> - **DO NOT write any code logic, execute modifications, or create plans before completing the required Socratic Gate action.** Bypassing the Socratic Gate is a P0 protocol violation.
|
|
120
|
+
> - **DO NOT bypass specialized workflow skills** (like `bug-diagnostics` for debugging, `spec-clarification` for specifications, `tdd-loop` for writing code/tests) even if the task or error log seems simple or clear. Bypassing skills is a P0 protocol violation.
|
|
121
|
+
|
|
110
122
|
---
|
|
111
123
|
|
|
112
124
|
## Universal Rules
|
|
@@ -24,11 +24,18 @@ Single-context layout β one `CONTEXT.md` + `docs/adr/` at the repo root. See `
|
|
|
24
24
|
|
|
25
25
|
## Session Start Protocol (MANDATORY)
|
|
26
26
|
|
|
27
|
+
At the start of every session:
|
|
27
28
|
1. Read `.agents/ARCHITECTURE.md` to understand Agents, Skills, and Scripts.
|
|
28
29
|
2. Read `.agents/memory/MEMORY.md` to load persistent project conventions, user preferences, and tech decisions.
|
|
29
30
|
3. Read `docs/agents/mcp-tools.md` to load MCP tool selection rules & memory conventions.
|
|
30
31
|
4. Call `read_knowledge` to load dynamic knowledge graph from memory.
|
|
31
32
|
|
|
33
|
+
### β οΈ MCP TOOL ACCESSIBILITY & FALLBACK WARNING (CRITICAL)
|
|
34
|
+
If the specialized MCP tool `code_search` or other core MCP tools (e.g., `recall`, `remember`, `impact_analysis`) are not in your available tools list:
|
|
35
|
+
- **DO NOT silently fall back to basic text search or skip debugging workflows.**
|
|
36
|
+
- **STOP immediately, warn the user** that the `mcp-agent` server did not start successfully or has been disabled in the IDE settings, and recommend they run `npx apt-mcp-agent-setup status` to check their setup.
|
|
37
|
+
- Only proceed with fallback tools (e.g. `grep_search`) if the user explicitly approves it.
|
|
38
|
+
|
|
32
39
|
### π οΈ DEVELOPER WORKFLOW PROTOCOL (MANDATORY 4-PHASE WORKFLOW)
|
|
33
40
|
|
|
34
41
|
Before writing any non-trivial code or implementing features, you MUST follow the closed-loop 4-Phase Agentic Workflow:
|
|
@@ -97,6 +104,11 @@ Every user request must pass through the Socratic Gate before ANY implementation
|
|
|
97
104
|
| **Code Edit / Bug Fix** | Context Check | Confirm understanding + ask impact questions |
|
|
98
105
|
| **Vague / Simple** | Clarification | Ask Purpose, Users, and Scope |
|
|
99
106
|
|
|
107
|
+
> [!IMPORTANT]
|
|
108
|
+
> **STRICT SOCRATIC & WORKFLOW ENFORCEMENT:**
|
|
109
|
+
> - **DO NOT write any code logic, execute modifications, or create plans before completing the required Socratic Gate action.** Bypassing the Socratic Gate is a P0 protocol violation.
|
|
110
|
+
> - **DO NOT bypass specialized workflow skills** (like `bug-diagnostics` for debugging, `spec-clarification` for specifications, `tdd-loop` for writing code/tests) even if the task or error log seems simple or clear. Bypassing skills is a P0 protocol violation.
|
|
111
|
+
|
|
100
112
|
---
|
|
101
113
|
|
|
102
114
|
## Universal Rules
|