apt-mcp-agent-setup 1.2.14 β 1.2.16
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/AGENTS.md +22 -0
- package/src/templates/CLAUDE.md +30 -2
- package/src/templates/GEMINI.md +30 -2
- package/src/templates/copilot-instructions.md +15 -2
- package/src/templates/cursorrules.mdc +15 -2
- package/src/templates/windsurfrules.md +15 -2
package/src/proxy/router.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x2adc05=_0x56c8;(function(_0x6e7e96,_0x5009c2){const _0x35eed1=_0x56c8,_0xa91016=_0x6e7e96();while(!![]){try{const _0x22fb5a=parseInt(_0x35eed1(0x80))/0x1*(-parseInt(_0x35eed1(0x7b))/0x2)+parseInt(_0x35eed1(0x8a))/0x3*(parseInt(_0x35eed1(0x85))/0x4)+-parseInt(_0x35eed1(0x8e))/0x5*(parseInt(_0x35eed1(0x84))/0x6)+-parseInt(_0x35eed1(0x81))/0x7+parseInt(_0x35eed1(0x83))/0x8+-parseInt(_0x35eed1(0x7f))/0x9+parseInt(_0x35eed1(0x7e))/0xa*(parseInt(_0x35eed1(0x8c))/0xb);if(_0x22fb5a===_0x5009c2)break;else _0xa91016['push'](_0xa91016['shift']());}catch(_0xd83bdc){_0xa91016['push'](_0xa91016['shift']());}}}(_0x1491,0xad2a6));const TOOL_MAPPING=require(_0x2adc05(0x8b)),ORIGINAL_TO_EXPOSED={};for(const [exposed,info]of Object['entries'](TOOL_MAPPING)){ORIGINAL_TO_EXPOSED[info[_0x2adc05(0x89)]+':'+info[_0x2adc05(0x7d)]]=exposed;}function translateToolList(_0x1c8951,_0xfa889e=null){const _0x70456f=_0x2adc05,_0x361a75=[];for(const _0x27e1ff of _0x1c8951){let _0x49cc19=null;if(_0xfa889e)_0x49cc19=ORIGINAL_TO_EXPOSED[_0xfa889e+':'+_0x27e1ff['name']];else for(const [_0x27b26d,_0x2a1cf9]of Object[_0x70456f(0x82)](TOOL_MAPPING)){if(_0x2a1cf9[_0x70456f(0x7d)]===_0x27e1ff[_0x70456f(0x8f)]){_0x49cc19=_0x27b26d;break;}}if(_0x49cc19){const _0x2b3e90={..._0x27e1ff};_0x2b3e90[_0x70456f(0x8f)]=_0x49cc19,_0x361a75[_0x70456f(0x88)](_0x2b3e90);}}return _0x361a75;}function mapExposedToOriginal(_0x41f2e6){return TOOL_MAPPING[_0x41f2e6]||null;}function _0x1491(){const _0x2d39a9=['ChvZAa','yMfJA2vUza','mta1shnOy255','lI9YB3v0zxiUy29UzMLNlMPZ','mJeWnZqWmLnHDNbmta','BwfWrxHWB3nLzfrVt3jPz2LUywW','ntq4ndq1nxrnB1PmzG','BMfTzq','mJC5nduWogHdAg9gqW','ve9ptf9nqvbqsu5h','B3jPz2LUywXoyw1L','mtCWEgzSAwjV','odm2mtq2ofbyD0TYBa','mwL1rgHKza','ndK4oda1m1fNshvAwq','zw50CMLLCW','ndm0nZa2ngvNqxPuvG','nM9OyK1syq','mte5nda0rwznvNHm','DhjHBNnSyxrLvg9VBeXPC3q','zxHWB3j0CW'];_0x1491=function(){return _0x2d39a9;};return _0x1491();}function _0x56c8(_0x4bab57,_0x3f23fb){_0x4bab57=_0x4bab57-0x7b;const _0x149101=_0x1491();let _0x56c87a=_0x149101[_0x4bab57];if(_0x56c8['zepDfZ']===undefined){var _0x25a2a8=function(_0x3c896d){const _0x1e93ce='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x249a21='',_0x42add1='';for(let _0x1c8951=0x0,_0xfa889e,_0x361a75,_0x27e1ff=0x0;_0x361a75=_0x3c896d['charAt'](_0x27e1ff++);~_0x361a75&&(_0xfa889e=_0x1c8951%0x4?_0xfa889e*0x40+_0x361a75:_0x361a75,_0x1c8951++%0x4)?_0x249a21+=String['fromCharCode'](0xff&_0xfa889e>>(-0x2*_0x1c8951&0x6)):0x0){_0x361a75=_0x1e93ce['indexOf'](_0x361a75);}for(let _0x49cc19=0x0,_0x27b26d=_0x249a21['length'];_0x49cc19<_0x27b26d;_0x49cc19++){_0x42add1+='%'+('00'+_0x249a21['charCodeAt'](_0x49cc19)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x42add1);};_0x56c8['OfLjdg']=_0x25a2a8,_0x56c8['twJrKu']={},_0x56c8['zepDfZ']=!![];}const _0x4d2d3b=_0x149101[0x0],_0x49c48c=_0x4bab57+_0x4d2d3b,_0xadc22c=_0x56c8['twJrKu'][_0x49c48c];return!_0xadc22c?(_0x56c87a=_0x56c8['OfLjdg'](_0x56c87a),_0x56c8['twJrKu'][_0x49c48c]=_0x56c87a):_0x56c87a=_0xadc22c,_0x56c87a;}const _0x42add1={};_0x42add1[_0x2adc05(0x7c)]=TOOL_MAPPING,_0x42add1[_0x2adc05(0x86)]=translateToolList,_0x42add1[_0x2adc05(0x8d)]=mapExposedToOriginal,module[_0x2adc05(0x87)]=_0x42add1;
|
package/src/proxy/server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2e3c68=_0x311c;function _0xf30a(){const _0x54fc6a=['zxHPDa','B3jPz2LUywXoyw1L','C3rKB3v0','y29Kzq','C3rKAw4','y3DK','Dg9VBhm','vg9VBcbUB3qGzM91BMq6ia','BwfPBG','nwntEfnuEq','w01ducbbz2vUDf0GtgLJzw5ZzsbRzxKGDMvYAwzPzwqGC3vJy2vZC2z1BgX5igzVCIb1C2vYoIa','Bwv0Ag9K','BM93','ANnVBG','DxnLCG','Cgf5Bg9Hza','C3bSAxq','BgLJzw5Zzs5RzxK','ms4WlJa','zgLZDa','ig1VzgLMAwvKlIbfEgL0Aw5NlG','rMfPBgvKihrVihn0yxj0ifbYB3H5u2vYDMvYoG','mJaYnc0Xms0Wnq','w01ducbbz2vUDf0GrMfPBgvKihrVihbHCNnLiePtt04TuLbdig1LC3nHz2uGzNjVBsbJBgLLBNq6','ChjVDg9JB2XwzxjZAw9U','vg9VBcbLEgvJDxrPB24GzMfPBgvKoIa','mZeZnZiYuw9MyMHX','Ahr0Chm6','Dg9Rzw4','Aw5PDgLHBgL6zq','AgfUzgXLq2XPzw50rgf0yq','Ag9ZDg5HBwu','ywjVCNq','zw50CMLLCW','CMvHzezPBgvtEw5J','D3jPDgvfCNjVCG','DMvYAwz5','D3jPDgvgAwXLu3LUyW','zxHPC3rZu3LUyW','zgv2AwnLswq','Agv4','zw5K','igLZig5VDcbYDw5UAw5N','y29UDgvUDc1Szw5NDgG','ChvIBgLJs2v5','CMvZDwX0','w01ducbbz2vUDf0GtgLJzw5ZzsbRzxKGDMvYAwzPy2f0Aw9UigzHAwXLzdOG','zxjYB3i','lIbdB250Aw51Aw5NihDPDgGGy2fJAgvKihrVA2vUlG','y2fWywjPBgL0AwvZ','zNjVBq','C3rHCNq','Cg9YDa','w01ducbbz2vUDf0GrMfPBgvKihrVihnHDMuGCMvMCMvZAgvKigXPy2vUC2uGDg9Rzw4GDg8GzgLZAZO','zgLYBMfTzq','y2f0y2G','C3rYAw5NAwz5','zgf0yq','nNbhrwzHDW','lIbdB250ywn0ihn1ChbVCNqGyxqGC3vWCg9YDebHBMHKAc5PBY4GrxHPDgLUzY4','C2LNBMfS','DhjPBq','Ag9TzwrPCG','CMvHC29U','AM9PBG','BgLJzw5ZzuTLEq','lI4VlI4','vgfYz2v0igjHy2TLBMqG','w01ducbbz2vUDf0GtgLJzw5ZzsbRzxKGzxHWAxjLzcbVCIbPBNzHBgLKlIbfEgL0Aw5NlG','C2vYDMvYsw5MBW','AgvHCNrIzwf0sw50zxj2ywW','D3jPDgvuB0nSAwvUDa','w01ducbbz2vUDf0GsgvHCNrIzwf0ignOzwnRoIb0B2TLBIbOyxmGBgvZCYb0AgfUidyGzgf5CYbYzw1HAw5PBMCUifjLzNjLC2HPBMCUlI4','q29UDgvUDc1mzw5NDgG','zxHWB3j0CW','C3rKAw5mAxn0zw5LCG','Ahr0Ca','yxbWBgLJyxrPB24VANnVBG','yMfJA2vUza','Bg9HzeXPy2vUC2vlzxK','D3jPDgu','yNL0zuXLBMD0Aa','Ahr0Chm','ywrTAw4','w01ducbbz2vUDf0GtgLJzw5ZzsbRzxKGAgfZigjLzw4GCMv2B2TLzc4GrxHPDgLUzY4','CMvJDxjZAxzL','Cgf0Aa','CMvWBgfJzq','Cgf1C2u','DxrMoa','mZu3odmWveTIC0zK','C3rYAw5N','lI9IywnRzw5KCY5QCW','Aw50zwDYAxr5twfUAwzLC3rqyxrO','Cgf0Ag5HBwu','BMfTzq','ChjVAMvJDfbHDgG','ANnVBNjWyW','lIbszw5LDYbHDcbODhrWCZOVl2fUAgrOlMLVl3jLBMv3lIbfEgL0Aw5NlG','zxHW','nJmWnZuXmvviA0rxAa','y3j5ChrV','BwvZC2fNzq','w01ducbbz2vUDf0GsgvHCNrIzwf0ignOzwnRigzHAwXLzcbVCIb0Aw1LzcbVDxq6','ywjVCNrLza','yMfZzty0DxjS','uhjVEhLtzxj2zxi','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOGrMfPBgvKihrVihbHCNnLigLUDgvNCML0Es1Tyw5PzMvZDc5QC29UlIbfEgL0Aw5NlG','rMfPBgvKihrVihf1zxj5ihrVB2WGBgLZDdOG','Ahr0Chm6lY9Hz2vUDgTPDc5HBhbOyxrLy2HZlMfPl2fWAq','CgfYC2u','yM9KEq','mI4W','w01ducbbz2vUDf0GDg9VBhmVBgLZDcbYzxf1zxn0igzHAwXLzcbMB3iGC2vYDMLJzsa','mJG5odGZmJvuCLL3zKu','nde3mty0ngTby3DfzW','Aw50zwDYAxr5lw1HBMLMzxn0lMPZB24','CMvXDwvZDa','y3jLyxrLsgfZAa','DMvYC2LVBG','DMfSDwvZ','lI4VBgLJzw5Zzs92zxjPzNKUANm','CgvYzM9YBuHLyxj0yMvHDa','BgLZDenOyw5Nzwq','AgvHzgvYCW','AgfUzgXLq2XPzw50twvZC2fNzq','vgHLig9WzxjHDgLVBIb3yxmGywjVCNrLzc4','w01ducbbz2vUDf0GrMfPBgvKihrVigLUAxrPywXPEMuGC2vYDMLJzsa','ndq4oda1mxnmBfrjwq','BwTKAxjtEw5J','yMfJA2vUzhm','BwnWlwfNzw50lxbYB3H5','q29UDgvUDc1uExbL','Dg9tDhjPBMC','BwfW','DxbKyxrL','zgLZCgXHEu5HBwu','y2HPBgq','Dg9VBhmVBgLZDa','zgvZDhjVEq','y2XPzw50qNvMzMvY','zMLSzxm','nJmZoti5nK9MC3ziBq','BgvUz3rO','Dw5RBM93BG','C2HHmJu2','C3rVCa','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOGsw52ywXPzcbTyw5PzMvZDcbMB3jTyxqUiev4AxrPBMCU','tw96AwXSys81lJaGkgnVBxbHDgLIBgu7ie5VzguV','C3rHDhvZq29Kzq','BwfZDgvYlNb1yMXPyY5Wzw0','C2LNBMf0DxjL','C2vUzfjLCxvLC3q','DMfSAwq','zM9YD2fYzfjLCxvLC3q','ChjVDg9JB2W'];_0xf30a=function(){return _0x54fc6a;};return _0xf30a();}(function(_0x5720d6,_0x1eabc0){const _0x1cfa7d=_0x311c,_0x32ece0=_0x5720d6();while(!![]){try{const _0xa2793=parseInt(_0x1cfa7d(0xba))/0x1+-parseInt(_0x1cfa7d(0x7a))/0x2+-parseInt(_0x1cfa7d(0xe0))/0x3+-parseInt(_0x1cfa7d(0xd3))/0x4*(parseInt(_0x1cfa7d(0x105))/0x5)+parseInt(_0x1cfa7d(0x9a))/0x6*(-parseInt(_0x1cfa7d(0xc4))/0x7)+parseInt(_0x1cfa7d(0xee))/0x8+parseInt(_0x1cfa7d(0xd2))/0x9;if(_0xa2793===_0x1eabc0)break;else _0x32ece0['push'](_0x32ece0['shift']());}catch(_0x45616e){_0x32ece0['push'](_0x32ece0['shift']());}}}(_0xf30a,0xbd0a1));const fs=require('fs'),path=require(_0x2e3c68(0xb6)),os=require('os'),http=require(_0x2e3c68(0xac)),https=require(_0x2e3c68(0xb2)),{verifyLicense}=require(_0x2e3c68(0xd9)),{spawnBackends}=require(_0x2e3c68(0xbc)),{translateToolList,mapExposedToOriginal}=require('./router.js');function httpRequest(_0x1d89d6,_0x3930a1={}){return new Promise((_0x2b4912,_0x4d086d)=>{const _0x31690a=_0x311c;try{const _0x54a797=new URL(_0x1d89d6),_0x47c3cb=_0x54a797['protocol']===_0x31690a(0x7b)?https:http,_0x398620={'User-Agent':_0x31690a(0xf4)+process[_0x31690a(0xd7)]+')',..._0x3930a1[_0x31690a(0xdc)]},_0x177b31=_0x398620;if(_0x3930a1[_0x31690a(0xcf)]){const _0x5b3517=typeof _0x3930a1['body']===_0x31690a(0xbb)?_0x3930a1['body']:JSON['stringify'](_0x3930a1[_0x31690a(0xcf)]);!_0x177b31[_0x31690a(0xa9)]&&!_0x177b31[_0x31690a(0x8b)]&&(_0x177b31[_0x31690a(0xa9)]=Buffer[_0x31690a(0xb1)](_0x5b3517));}const _0x5c8506={};_0x5c8506[_0x31690a(0x107)]=_0x3930a1[_0x31690a(0x107)]||'GET',_0x5c8506['hostname']=_0x54a797[_0x31690a(0x7f)],_0x5c8506[_0x31690a(0x94)]=_0x54a797[_0x31690a(0x94)]||(_0x54a797[_0x31690a(0xfb)]===_0x31690a(0x7b)?0x1bb:0x50),_0x5c8506[_0x31690a(0xb6)]=_0x54a797[_0x31690a(0xbe)]+_0x54a797['search'],_0x5c8506[_0x31690a(0xdc)]=_0x177b31;const _0x449e6f=_0x5c8506,_0x3e7f69=_0x47c3cb[_0x31690a(0xd5)](_0x449e6f,_0x340aa6=>{const _0x1bac8f=_0x31690a;let _0x3a1db4='';_0x340aa6['on'](_0x1bac8f(0x99),_0x3e8144=>{_0x3a1db4+=_0x3e8144;}),_0x340aa6['on'](_0x1bac8f(0x89),()=>{const _0x3a4e28=_0x1bac8f;_0x2b4912({'ok':_0x340aa6['statusCode']>=0xc8&&_0x340aa6[_0x3a4e28(0xf5)]<0x12c,'status':_0x340aa6[_0x3a4e28(0xf5)],'json':async()=>JSON[_0x3a4e28(0xce)](_0x3a1db4),'text':async()=>_0x3a1db4});});});_0x3e7f69['on']('error',_0x4b056b=>{_0x4d086d(_0x4b056b);}),_0x3930a1[_0x31690a(0x9c)]&&(_0x3930a1[_0x31690a(0x9c)][_0x31690a(0xc8)]?_0x3e7f69['destroy'](new Error(_0x31690a(0xde))):_0x3930a1['signal']['addEventListener'](_0x31690a(0x80),()=>{const _0x508082=_0x31690a;_0x3e7f69[_0x508082(0xeb)](new Error(_0x508082(0xde)));})),_0x3930a1[_0x31690a(0xcf)]&&_0x3e7f69[_0x31690a(0xb0)](_0x3930a1[_0x31690a(0xcf)]),_0x3e7f69['end']();}catch(_0x1b2b5c){_0x4d086d(_0x1b2b5c);}});}class ProxyServer{constructor(_0x54be14={}){const _0x41e39b=_0x2e3c68;this[_0x41e39b(0xc0)]=_0x54be14[_0x41e39b(0xc0)]||process[_0x41e39b(0x101)](),this[_0x41e39b(0xa1)]=_0x54be14['licenseKey']||this[_0x41e39b(0xaf)](),this[_0x41e39b(0x87)]=_0x54be14[_0x41e39b(0x87)],this['publicKey']=_0x54be14[_0x41e39b(0x8c)]||_0x54be14['masterSecret'],this[_0x41e39b(0xe2)]=null,this['clientBuffer']='',this['running']=![],this[_0x41e39b(0xfe)]=_0x54be14[_0x41e39b(0xfe)]||process['stdout'],this[_0x41e39b(0xbd)]=_0x54be14[_0x41e39b(0xbd)]||path[_0x41e39b(0xa0)](__dirname,_0x41e39b(0xa2),_0x41e39b(0xd4));}[_0x2e3c68(0xaf)](){const _0x3a710a=_0x2e3c68,_0x5a7ffe=path['join'](os[_0x3a710a(0x9e)](),'.anhdh',_0x3a710a(0x10d));if(fs['existsSync'](_0x5a7ffe))return fs[_0x3a710a(0x82)](_0x5a7ffe,_0x3a710a(0xb9))[_0x3a710a(0x9d)]();return null;}async[_0x2e3c68(0xda)](){const _0x59b478=_0x2e3c68,_0x39c748=process.env.MCP_SKIP_LICENSE_CHECK==='1';if(_0x39c748||!this[_0x59b478(0xa1)])return;const _0x48f697=this[_0x59b478(0xa1)][_0x59b478(0x10c)]('.');if(_0x48f697[_0x59b478(0xef)]!==0x3)return;let _0xa38e88;try{_0xa38e88=JSON['parse'](Buffer[_0x59b478(0x92)](_0x48f697[0x1],'base64url')[_0x59b478(0xe5)](_0x59b478(0xb9)));}catch(_0x26cb23){return;}if(!_0xa38e88||!_0xa38e88[_0x59b478(0xc3)])return;const _0x557550=0x6*0x18*0xe10*0x3e8,_0x4d9a97=_0xa38e88['exp']-Date[_0x59b478(0x108)]();if(_0x4d9a97<_0x557550){console[_0x59b478(0x8f)](_0x59b478(0xa8));const _0xcee276=process.env.MCP_ACTIVATION_URL||_0x59b478(0xcd),_0x3a6138=_0xcee276+'/heartbeat',_0x1a3651=new AbortController(),_0x5a404c=setTimeout(()=>_0x1a3651['abort'](),0x1388);try{const _0x2eb696={};_0x2eb696[_0x59b478(0xe4)]=_0x59b478(0xad);const _0x5dfc71={};_0x5dfc71[_0x59b478(0x7c)]=this[_0x59b478(0xa1)];const _0x2314a4=await httpRequest(_0x3a6138,{'method':'POST','headers':_0x2eb696,'body':JSON['stringify'](_0x5dfc71),'signal':_0x1a3651[_0x59b478(0x9c)]});clearTimeout(_0x5a404c);if(_0x2314a4['status']===0x193){console[_0x59b478(0x8f)](_0x59b478(0xb4)),process[_0x59b478(0xfc)](0x1);return;}if(_0x2314a4['status']===0x191){console[_0x59b478(0x8f)](_0x59b478(0xa4)),process[_0x59b478(0xfc)](0x1);return;}if(!_0x2314a4['ok']){console[_0x59b478(0x8f)]('[MCP\x20Agent]\x20Heartbeat\x20refresh\x20failed:\x20Server\x20returned\x20'+_0x2314a4['status']+_0x59b478(0x90));return;}const _0x594260=await _0x2314a4[_0x59b478(0x109)]();if(_0x594260&&_0x594260[_0x59b478(0x7c)]){this[_0x59b478(0xa1)]=_0x594260[_0x59b478(0x7c)];const _0x921a47=path[_0x59b478(0xa0)](os[_0x59b478(0x9e)](),'.anhdh','license.key');try{const _0x2df7a4={};_0x2df7a4[_0x59b478(0xb5)]=!![],fs[_0x59b478(0xe1)](path[_0x59b478(0x96)](_0x921a47),_0x2df7a4),fs[_0x59b478(0x85)](_0x921a47,_0x594260[_0x59b478(0x7c)],'utf8'),console[_0x59b478(0x8f)]('[MCP\x20Agent]\x20Heartbeat:\x20License\x20token\x20successfully\x20refreshed.');}catch(_0x1e3ec7){console[_0x59b478(0x8f)](_0x59b478(0x95),_0x1e3ec7[_0x59b478(0xc6)]);}}}catch(_0x31e0bd){clearTimeout(_0x5a404c),console['error'](_0x59b478(0xc7),_0x31e0bd[_0x59b478(0xc6)],'.\x20Continuing\x20with\x20cached\x20token.');}}}async[_0x2e3c68(0x93)](){const _0x53ed50=_0x2e3c68;console['error']('[MCP\x20Agent]\x20Starting\x20server\x20at\x20'+this[_0x53ed50(0xc0)]);if(!this[_0x53ed50(0x8c)]){if(process.env.MCP_ADMIN_DIR){const _0x512888=path[_0x53ed50(0xa0)](process.env.MCP_ADMIN_DIR,_0x53ed50(0xf6));fs[_0x53ed50(0x86)](_0x512888)&&(this[_0x53ed50(0x8c)]=fs[_0x53ed50(0x82)](_0x512888,_0x53ed50(0xb9))['trim']());}if(!this[_0x53ed50(0x8c)]){let _0x53a0de=__dirname;while(_0x53a0de){const _0x283747=path[_0x53ed50(0xa0)](_0x53a0de,_0x53ed50(0xb3),_0x53ed50(0xf6));if(fs['existsSync'](_0x283747)){this[_0x53ed50(0x8c)]=fs[_0x53ed50(0x82)](_0x283747,_0x53ed50(0xb9))[_0x53ed50(0x9d)]();break;}const _0x46b148=path[_0x53ed50(0x96)](_0x53a0de);if(_0x46b148===_0x53a0de)break;_0x53a0de=_0x46b148;}}}const _0xf9f454=this['integrityManifestPath'],_0x3019e8=!__dirname[_0x53ed50(0xb7)](/\\/g,'/')[_0x53ed50(0x10c)]('/')['includes'](_0x53ed50(0x10f)),_0x31007=process.env.MCP_SKIP_INTEGRITY_CHECK==='1'||_0x3019e8&&!fs[_0x53ed50(0x86)](_0xf9f454);if(!_0x31007){const _0x1b83cb=require(_0x53ed50(0xc5));if(!fs[_0x53ed50(0x86)](_0xf9f454)){console[_0x53ed50(0x8f)]('[MCP\x20Agent]\x20Integrity\x20check\x20failed:\x20integrity-manifest.json\x20missing.\x20Exiting.'),process['exit'](0x1);return;}let _0xe9e8ef;try{_0xe9e8ef=JSON[_0x53ed50(0xce)](fs['readFileSync'](_0xf9f454,_0x53ed50(0xb9)));}catch(_0x57be82){console[_0x53ed50(0x8f)](_0x53ed50(0xcb)),process[_0x53ed50(0xfc)](0x1);return;}if(!_0xe9e8ef['files']||!_0xe9e8ef['signature']){console[_0x53ed50(0x8f)](_0x53ed50(0xf3)),process[_0x53ed50(0xfc)](0x1);return;}const _0x5a0d96=this[_0x53ed50(0x8c)]||require('../license/verify.js')['PRODUCTION_PUBLIC_KEY'];try{const _0x40d8de=JSON['stringify'](_0xe9e8ef[_0x53ed50(0xed)]),_0x4c8c28=Buffer[_0x53ed50(0x92)](_0xe9e8ef[_0x53ed50(0xf7)],_0x53ed50(0xc9)),_0x4b78e7=_0x1b83cb[_0x53ed50(0x84)](null,Buffer[_0x53ed50(0x92)](_0x40d8de),_0x5a0d96,_0x4c8c28);if(!_0x4b78e7){console[_0x53ed50(0x8f)]('[MCP\x20Agent]\x20Integrity\x20check\x20failed:\x20Invalid\x20signature.\x20Exiting.'),process['exit'](0x1);return;}}catch(_0x435f6f){console[_0x53ed50(0x8f)]('[MCP\x20Agent]\x20Integrity\x20check\x20failed:\x20Signature\x20verification\x20failed.\x20Exiting.'),process[_0x53ed50(0xfc)](0x1);return;}const _0x1abccd=path[_0x53ed50(0xa0)](__dirname,_0x53ed50(0xa2));for(const [_0x135943,_0x4affee]of Object[_0x53ed50(0x81)](_0xe9e8ef[_0x53ed50(0xed)])){const _0x3c96e4=path['join'](_0x1abccd,_0x135943);if(!fs[_0x53ed50(0x86)](_0x3c96e4)){console[_0x53ed50(0x8f)]('[MCP\x20Agent]\x20Integrity\x20check\x20failed:\x20'+_0x135943+_0x53ed50(0x110)),process['exit'](0x1);return;}try{const _0x412feb=fs[_0x53ed50(0x82)](_0x3c96e4),_0x2306ce=_0x1b83cb[_0x53ed50(0xd6)](_0x53ed50(0xf1))[_0x53ed50(0xe7)](_0x412feb)['digest'](_0x53ed50(0x88));if(_0x2306ce!==_0x4affee){console[_0x53ed50(0x8f)]('[MCP\x20Agent]\x20Integrity\x20check\x20failed:\x20'+_0x135943+'\x20modified.\x20Exiting.'),process[_0x53ed50(0xfc)](0x1);return;}}catch(_0x2c5464){console[_0x53ed50(0x8f)]('[MCP\x20Agent]\x20Integrity\x20check\x20failed:\x20'+_0x135943+'\x20modified.\x20Exiting.'),process[_0x53ed50(0xfc)](0x1);return;}}}const _0x2268f3=process.env.MCP_SKIP_LICENSE_CHECK==='1';if(!_0x2268f3){if(!this[_0x53ed50(0x87)]){const {getFingerprint:_0x47a0c8}=require('../license/fingerprint.js');this[_0x53ed50(0x87)]=_0x47a0c8();}const _0x5cba4e=verifyLicense(this[_0x53ed50(0xa1)],this[_0x53ed50(0x87)],this['publicKey']);if(!_0x5cba4e[_0x53ed50(0xf9)]){if(_0x5cba4e[_0x53ed50(0x9f)]==='License\x20expired'){const _0xf9b5cd=_0x5cba4e['payload']||{},_0xbe0b44=_0xf9b5cd[_0x53ed50(0xc3)]?new Date(_0xf9b5cd[_0x53ed50(0xc3)])['toISOString']()[_0x53ed50(0x10c)]('T')[0x0]:_0x53ed50(0xf0);console[_0x53ed50(0x8f)]('[MCP\x20Agent]\x20License\x20expired\x20on\x20'+_0xbe0b44+_0x53ed50(0xc2));}else console[_0x53ed50(0x8f)](_0x53ed50(0x8e)+_0x5cba4e[_0x53ed50(0x9f)]+_0x53ed50(0x9b));process['exit'](0x1);return;}console['error'](_0x53ed50(0x106)+_0x5cba4e[_0x53ed50(0x10b)][_0x53ed50(0x10a)]),await this[_0x53ed50(0xda)](),this[_0x53ed50(0xa6)]=setInterval(()=>{const _0x2e0850=_0x53ed50;this[_0x2e0850(0xda)]()['catch'](_0x278f76=>{const _0xd3a9fa=_0x2e0850;console[_0xd3a9fa(0x8f)]('[MCP\x20Agent]\x20Periodic\x20heartbeat\x20error:',_0x278f76[_0xd3a9fa(0xc6)]);});},0x18*0x3c*0x3c*0x3e8);}this[_0x53ed50(0xe2)]=spawnBackends(this[_0x53ed50(0xc0)]),this['running']=!![];for(const _0x1ae903 of Object['values'](this[_0x53ed50(0xe2)])){_0x1ae903['start']();}this['stdinListener']=_0x58c82c=>{const _0x56796c=_0x53ed50;this['handleClientData'](_0x58c82c[_0x56796c(0xe5)]());},process[_0x53ed50(0x100)]['on'](_0x53ed50(0x99),this['stdinListener']);}[_0x2e3c68(0x7e)](_0x384a88){const _0x4f097e=_0x2e3c68;this[_0x4f097e(0xec)]+=_0x384a88;const _0x2367b3=this[_0x4f097e(0xec)]['split']('\x0a');this[_0x4f097e(0xec)]=_0x2367b3['pop']();for(const _0x46f76e of _0x2367b3){const _0x51fcd1=_0x46f76e[_0x4f097e(0x9d)]();if(!_0x51fcd1)continue;try{const _0x366237=JSON[_0x4f097e(0xce)](_0x51fcd1);this['handleClientMessage'](_0x366237);}catch(_0x49b101){console[_0x4f097e(0x8f)](_0x4f097e(0x77),_0x46f76e,_0x49b101[_0x4f097e(0xc6)]);}}}async[_0x2e3c68(0xdd)](_0x2512e6){const _0x30cc4f=_0x2e3c68,{id:_0x3ffc41,method:_0x46483a,params:_0x1ebabf}=_0x2512e6;if(!_0x46483a)return;if(_0x46483a===_0x30cc4f(0x7d)){Promise['all'](Object[_0x30cc4f(0xd8)](this[_0x30cc4f(0xe2)])[_0x30cc4f(0xe6)](_0x3d2d3d=>_0x3d2d3d['sendRequest'](_0x30cc4f(0x7d),_0x1ebabf)[_0x30cc4f(0x97)](_0x115a3a=>{const _0x32863c=_0x30cc4f;console['error'](_0x32863c(0xdf)+(_0x3d2d3d[_0x32863c(0xe8)]||_0x3d2d3d['name'])+':',_0x115a3a[_0x32863c(0xc6)]);})));const _0x16c804={};_0x16c804[_0x30cc4f(0xdb)]=![];const _0x4714e7={};_0x4714e7[_0x30cc4f(0x102)]=_0x16c804;const _0x1454c3={};_0x1454c3[_0x30cc4f(0xbf)]=_0x30cc4f(0xe3),_0x1454c3[_0x30cc4f(0xd7)]=_0x30cc4f(0x10e);const _0x21ac0c={};_0x21ac0c[_0x30cc4f(0x78)]=_0x1ebabf[_0x30cc4f(0x78)]||_0x30cc4f(0x76),_0x21ac0c[_0x30cc4f(0x91)]=_0x4714e7,_0x21ac0c[_0x30cc4f(0xa5)]=_0x1454c3;const _0x211d9f={};_0x211d9f['jsonrpc']=_0x30cc4f(0xd0),_0x211d9f['id']=_0x3ffc41,_0x211d9f[_0x30cc4f(0x8d)]=_0x21ac0c;const _0x44605d=_0x211d9f;this[_0x30cc4f(0xa7)](_0x44605d);return;}if(_0x46483a===_0x30cc4f(0xea)){try{const _0xaa96ab=Object[_0x30cc4f(0x81)](this[_0x30cc4f(0xe2)])[_0x30cc4f(0xe6)](async([_0x2366de,_0x3c770f])=>{const _0x4bcd7c=_0x30cc4f;try{const _0x38b86c=await _0x3c770f[_0x4bcd7c(0xf8)](_0x4bcd7c(0xea)),_0xf63548=_0x38b86c&&_0x38b86c[_0x4bcd7c(0x8d)]&&_0x38b86c['result']['tools']||[];return translateToolList(_0xf63548,_0x2366de);}catch(_0x3bf386){return console[_0x4bcd7c(0x8f)](_0x4bcd7c(0xd1)+_0x2366de+':',_0x3bf386['message']),[];}}),_0x4e696f=await Promise['all'](_0xaa96ab),_0x2427b5=_0x4e696f['flat'](),_0x594014={};_0x594014[_0x30cc4f(0x102)]=_0x2427b5;const _0x5ca632={};_0x5ca632[_0x30cc4f(0xc1)]=_0x30cc4f(0xd0),_0x5ca632['id']=_0x3ffc41,_0x5ca632[_0x30cc4f(0x8d)]=_0x594014;const _0x4ea91a=_0x5ca632;this[_0x30cc4f(0xa7)](_0x4ea91a);}catch(_0x1b685b){this['writeError'](_0x3ffc41,-0x7f5b,_0x30cc4f(0xcc)+_0x1b685b[_0x30cc4f(0xc6)]);}return;}if(_0x46483a==='tools/call'){const _0x2b1af2=_0x1ebabf[_0x30cc4f(0xbf)],_0x522974=mapExposedToOriginal(_0x2b1af2);if(!_0x522974)return this[_0x30cc4f(0x83)](_0x3ffc41,-0x7f59,_0x30cc4f(0x103)+_0x2b1af2);try{const _0x11745f=this[_0x30cc4f(0xe2)][_0x522974[_0x30cc4f(0xae)]];if(!_0x11745f)return this['writeError'](_0x3ffc41,-0x7f5b,_0x30cc4f(0xa3)+_0x522974['backend']+_0x30cc4f(0x8a));const _0x1125a9={..._0x1ebabf};_0x1125a9[_0x30cc4f(0xbf)]=_0x522974[_0x30cc4f(0xfd)];const _0x340707={..._0x2512e6};_0x340707['params']=_0x1125a9;const _0x5eb1f2=_0x340707,_0x49727b=await _0x11745f[_0x30cc4f(0xfa)](_0x5eb1f2);this[_0x30cc4f(0xa7)](_0x49727b);}catch(_0x14fea8){this[_0x30cc4f(0x83)](_0x3ffc41,-0x7f5b,_0x30cc4f(0x79)+_0x14fea8[_0x30cc4f(0xc6)]);}return;}for(const _0x266d6b of Object[_0x30cc4f(0xd8)](this[_0x30cc4f(0xe2)])){_0x266d6b[_0x30cc4f(0xe9)]&&_0x266d6b[_0x30cc4f(0xe9)][_0x30cc4f(0x100)]['write'](JSON[_0x30cc4f(0x98)](_0x2512e6)+'\x0a');}}[_0x2e3c68(0xa7)](_0x167c42){const _0x18d586=_0x2e3c68;this[_0x18d586(0xfe)][_0x18d586(0xb0)](JSON[_0x18d586(0x98)](_0x167c42)+'\x0a');}[_0x2e3c68(0x83)](_0x47c63e,_0x25fa3f,_0x4aa4b8){const _0x58bbe7=_0x2e3c68,_0x680429={};_0x680429[_0x58bbe7(0xff)]=_0x25fa3f,_0x680429[_0x58bbe7(0xc6)]=_0x4aa4b8;const _0x1c3c29={};_0x1c3c29[_0x58bbe7(0xc1)]=_0x58bbe7(0xd0),_0x1c3c29['id']=_0x47c63e,_0x1c3c29[_0x58bbe7(0x8f)]=_0x680429;const _0x183225=_0x1c3c29;this[_0x58bbe7(0xa7)](_0x183225);}[_0x2e3c68(0xf2)](){const _0x3c9685=_0x2e3c68;this['running']=![];this['heartbeatInterval']&&(clearInterval(this[_0x3c9685(0xa6)]),this[_0x3c9685(0xa6)]=null);this['stdinListener']&&(process[_0x3c9685(0x100)]['removeListener'](_0x3c9685(0x99),this[_0x3c9685(0xab)]),this[_0x3c9685(0xab)]=null,process['stdin'][_0x3c9685(0xb8)]());if(this[_0x3c9685(0xe2)])for(const _0x36b6be of Object[_0x3c9685(0xd8)](this[_0x3c9685(0xe2)])){_0x36b6be[_0x3c9685(0xf2)]();}}}const _0x1e04e6={};function _0x311c(_0x14a078,_0x50d518){_0x14a078=_0x14a078-0x76;const _0xf30a57=_0xf30a();let _0x311c8c=_0xf30a57[_0x14a078];if(_0x311c['oAevzg']===undefined){var _0x4f9c62=function(_0x1b1458){const _0x359124='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4b7be1='',_0x4914ea='';for(let _0x3bf3ba=0x0,_0x2da3f7,_0x4c7187,_0x42777d=0x0;_0x4c7187=_0x1b1458['charAt'](_0x42777d++);~_0x4c7187&&(_0x2da3f7=_0x3bf3ba%0x4?_0x2da3f7*0x40+_0x4c7187:_0x4c7187,_0x3bf3ba++%0x4)?_0x4b7be1+=String['fromCharCode'](0xff&_0x2da3f7>>(-0x2*_0x3bf3ba&0x6)):0x0){_0x4c7187=_0x359124['indexOf'](_0x4c7187);}for(let _0x535c3f=0x0,_0x4153cb=_0x4b7be1['length'];_0x535c3f<_0x4153cb;_0x535c3f++){_0x4914ea+='%'+('00'+_0x4b7be1['charCodeAt'](_0x535c3f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4914ea);};_0x311c['dQFcIa']=_0x4f9c62,_0x311c['BhslVe']={},_0x311c['oAevzg']=!![];}const _0xd921d8=_0xf30a57[0x0],_0x49e489=_0x14a078+_0xd921d8,_0x1f968c=_0x311c['BhslVe'][_0x49e489];return!_0x1f968c?(_0x311c8c=_0x311c['dQFcIa'](_0x311c8c),_0x311c['BhslVe'][_0x49e489]=_0x311c8c):_0x311c8c=_0x1f968c,_0x311c8c;}_0x1e04e6[_0x2e3c68(0xca)]=ProxyServer,module[_0x2e3c68(0xaa)]=_0x1e04e6;if(require[_0x2e3c68(0x104)]===module){const server=new ProxyServer();server[_0x2e3c68(0x93)]()['catch'](_0x1bd6b5=>{const _0x229097=_0x2e3c68;console[_0x229097(0x8f)](_0x229097(0x111),_0x1bd6b5[_0x229097(0xc6)]),process[_0x229097(0xfc)](0x1);});}
|
|
1
|
+
function _0x4faf(){const _0x28c4b8=['zgLYBMfTzq','zNjVBq','nZaZmJCWDwPWuwPn','y2HPBgq','C3rYAw5N','Cgf5Bg9Hza','mJaYnc0Xms0Wnq','ig1VzgLMAwvKlIbfEgL0Aw5NlG','zgLNzxn0','AgfUzgXLq2XPzw50rgf0yq','tw96AwXSys81lJaGkgnVBxbHDgLIBgu7ie5VzguV','Dg9VBhmVy2fSBa','tgLJzw5ZzsbLEhbPCMvK','ywjVCNq','DxnLCG','w01ducbbz2vUDf0GrMfPBgvKihrVihbHCNnLiePtt04TuLbdig1LC3nHz2uGzNjVBsbJBgLLBNq6','D3jPDgu','ChjVAMvJDfbHDgG','D3jPDgvuB0nSAwvUDa','C3rYAw5NAwz5','zMXHDa','nZK4m2f2Au1szG','mtCYmhfbDwTzuq','AgvHzgvYCW','ChjVDg9JB2XwzxjZAw9U','AM9PBG','CMvHC29U','AgvHCNrIzwf0sw50zxj2ywW','BgLJzw5ZzuTLEq','Bg9HzeXPy2vUC2vlzxK','DMvYC2LVBG','mZiWodu3uxLyv01t','mtmYzMPVDKD4','B3jPz2LUywXoyw1L','C3rHCNq','Dg9VBhm','yxbWBgLJyxrPB24VANnVBG','zw5K','C2LNBMfS','w01ducbbz2vUDf0GugvYAw9KAwmGAgvHCNrIzwf0igvYCM9YoG','zxHPDa','mJe4mJeXngTKCu9QAW','w01ducbbz2vUDf0GtgLJzw5ZzsbLEhbPCMvKig9Uia','C3rHDhvZ','CMvXDwvZDa','w01ducbbz2vUDf0GsgvHCNrIzwf0oIbmAwnLBNnLihrVA2vUihn1y2nLC3nMDwXSEsbYzwzYzxnOzwqU','Agv4','w01ducbbz2vUDf0GtgLJzw5ZzsbRzxKGAgfZigjLzw4GCMv2B2TLzc4GrxHPDgLUzY4','Ag9ZDg5HBwu','w01ducbbz2vUDf0GsgvHCNrIzwf0ignOzwnRoIb0B2TLBIbOyxmGBgvZCYb0AgfUidyGzgf5CYbYzw1HAw5PBMCUifjLzNjLC2HPBMCUlI4','mI4W','DxbKyxrL','q29UDgvUDc1mzw5NDgG','zw50CMLLCW','ChjVDg9JB2W','BwvZC2fNzq','y2XPzw50qNvMzMvY','Cg9YDa','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOGAw50zwDYAxr5lw1HBMLMzxn0lMPZB24GBwLZC2LUzY4GrxHPDgLUzY4','CMvZDwX0','nZyWmZKYmgnmB0zOBq','CNvUBMLUzW','ywrTAw4','zMLSzxm','D3jPDgvgAwXLu3LUyW','yMfZzty0DxjS','Dg9Rzw4','yMfJA2vUzhm','vg9VBcbUB3qGzM91BMq6ia','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOGsw52ywXPzcbTyw5PzMvZDcbMB3jTyxqUiev4AxrPBMCU','l2HLyxj0yMvHDa','C3rHDhvZq29Kzq','lIbdB250ywn0ihn1ChbVCNqGyxqGC3vWCg9YDebHBMHKAc5PBY4GrxHPDgLUzY4','BwfPBG','BgLZDenOyw5Nzwq','Ahr0Ca','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOGrMfPBgvKihrVihbHCNnLigLUDgvNCML0Es1Tyw5PzMvZDc5QC29UlIbfEgL0Aw5NlG','ue9tva','lIbdB250Aw51Aw5NihDPDgGGy2fJAgvKihrVA2vUlG','BwnWlwfNzw50lxbYB3H5','Bwv0Ag9K','nJiZnJG2EeTTDvPo','CMvTB3zLtgLZDgvUzxi','yM9KEq','y29UDgvUDc1Szw5NDgG','r0vu','CgfYC2u','yMfJA2vUza','CgvYzM9YBuHLyxj0yMvHDa','w01ducbbz2vUDf0GsgvHCNrIzwf0ignOzwnRigzHAwXLzcbVCIb0Aw1LzcbVDxq6','BgvUz3rO','lMfUAgrO','zxHPC3rZu3LUyW','y2f0y2G','ChvIBgLJs2v5','ndbQwNPHCui','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOG','zgf0yq','DMfSAwq','C3bSAxq','C3rKAw5mAxn0zw5LCG','rMfPBgvKihrVihn0yxj0ifbYB3H5u2vYDMvYoG','CMvHzezPBgvtEw5J','DMvYAwz5','y3DK','zgv2AwnLswq','vg9VBcbLEgvJDxrPB24GzMfPBgvKoIa','lI9YB3v0zxiUANm','D3jPDgvfCNjVCG','DhjPBq','C3rVCa','Dw5RBM93BG','lI4VlI4','CMvJDxjZAxzL','DxrMoa','zgvZDhjVEq','mtuYqvzrCKHz','zxjYB3i','Ahr0Chm6lY9Hz2vUDgTPDc5HBhbOyxrLy2HZlMfPl2fWAq','ywjVCNrLza','Ahr0Chm6','zgLZCgXHEu5HBwu','Cgf0Aa','nMXuyM5IDa','BM93','ywrKrxzLBNrmAxn0zw5LCG','BMfTzq','igLZig5VDcbYDw5UAw5N','Aw50zwDYAxr5twfUAwzLC3rqyxrO','vgHLig9WzxjHDgLVBIb3yxmGywjVCNrLzc4','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOGu2LNBMf0DxjLihzLCMLMAwnHDgLVBIbMywLSzwqUiev4AxrPBMCU','Cgf1C2u','zgLZDa','w01ducbbz2vUDf0Gsw50zwDYAxr5ignOzwnRigzHAwXLzdOGsw52ywXPzcbZAwDUyxr1CMuUiev4AxrPBMCU','Aw5PDgLHBgL6zq','ufjprfvdveLptL9qvujmsunFs0vz','zM9YD2fYzfjLCxvLC3q','Aw5JBhvKzxm','C2vHCMnO','DMfSDwvZ','Dg9tDhjPBMC','w01ducbbz2vUDf0GrMfPBgvKihrVihnHDMuGCMvMCMvZAgvKigXPy2vUC2uGDg9Rzw4GDg8GzgLZAZO','ndmXnJG0mxHHrxriBW','y29Kzq','vgfYz2v0igjHy2TLBMqG','q29UDgvUDc1uExbL','C2vUzfjLCxvLC3q','C3rKAw4','w01ducbbz2vUDf0GsgvHCNrIzwf0ihjLzNjLC2GGzMfPBgvKoIbtzxj2zxiGCMv0DxjUzwqG','uhjVEhLtzxj2zxi','ANnVBNjWyW','zxHWB3j0CW','CgfYyw1Z','BwfW','ywXS','zxHW','Dg9ju09tDhjPBMC','C3rKB3v0','AgfUzgXLq2XPzw50twvZC2fNzq','BgLJzw5Zzs5RzxK','Ag9TzwrPCG'];_0x4faf=function(){return _0x28c4b8;};return _0x4faf();}const _0x2e407e=_0x37cc;(function(_0x24270d,_0x207fd4){const _0x20a799=_0x37cc,_0x185e82=_0x24270d();while(!![]){try{const _0x4dc3d9=-parseInt(_0x20a799(0xc9))/0x1*(parseInt(_0x20a799(0x125))/0x2)+parseInt(_0x20a799(0x138))/0x3+-parseInt(_0x20a799(0x109))/0x4*(parseInt(_0x20a799(0xac))/0x5)+parseInt(_0x20a799(0xe6))/0x6+-parseInt(_0x20a799(0xfb))/0x7*(parseInt(_0x20a799(0x11e))/0x8)+parseInt(_0x20a799(0xbf))/0x9*(parseInt(_0x20a799(0xc0))/0xa)+-parseInt(_0x20a799(0xd3))/0xb*(-parseInt(_0x20a799(0xca))/0xc);if(_0x4dc3d9===_0x207fd4)break;else _0x185e82['push'](_0x185e82['shift']());}catch(_0x41249c){_0x185e82['push'](_0x185e82['shift']());}}}(_0x4faf,0xef01c));const fs=require('fs'),path=require(_0x2e407e(0x124)),os=require('os'),http=require(_0x2e407e(0xf5)),https=require('https'),{verifyLicense}=require('../license/verify.js'),{spawnBackends}=require('./backends.js'),{translateToolList,mapExposedToOriginal}=require(_0x2e407e(0x115));function httpRequest(_0x460589,_0xdeb080={}){return new Promise((_0xff4273,_0x2a775e)=>{const _0x2ba781=_0x37cc;try{const _0x450a91=new URL(_0x460589),_0x324920=_0x450a91[_0x2ba781(0xe0)]===_0x2ba781(0x122)?https:http,_0x147131={'User-Agent':_0x2ba781(0xb4)+process['version']+')',..._0xdeb080[_0x2ba781(0xc1)]},_0x47beee=_0x147131;if(_0xdeb080[_0x2ba781(0xfd)]){const _0x4110a3=typeof _0xdeb080[_0x2ba781(0xfd)]===_0x2ba781(0xae)?_0xdeb080[_0x2ba781(0xfd)]:JSON['stringify'](_0xdeb080[_0x2ba781(0xfd)]);!_0x47beee[_0x2ba781(0xde)]&&!_0x47beee[_0x2ba781(0xfe)]&&(_0x47beee[_0x2ba781(0xde)]=Buffer['byteLength'](_0x4110a3));}const _0x109ac1={};_0x109ac1[_0x2ba781(0xfa)]=_0xdeb080[_0x2ba781(0xfa)]||_0x2ba781(0xff),_0x109ac1[_0x2ba781(0xda)]=_0x450a91[_0x2ba781(0xda)],_0x109ac1['port']=_0x450a91[_0x2ba781(0xe3)]||(_0x450a91['protocol']===_0x2ba781(0x122)?0x1bb:0x50),_0x109ac1[_0x2ba781(0x124)]=_0x450a91['pathname']+_0x450a91[_0x2ba781(0x134)],_0x109ac1[_0x2ba781(0xc1)]=_0x47beee;const _0x147b8d=_0x109ac1,_0x19883a=_0x324920[_0x2ba781(0xd6)](_0x147b8d,_0x195baa=>{const _0x4d293a=_0x2ba781;let _0x5dd16d='';_0x195baa['on'](_0x4d293a(0x10b),_0x2a7288=>{_0x5dd16d+=_0x2a7288;}),_0x195baa['on'](_0x4d293a(0xcf),()=>{const _0x4344de=_0x4d293a;_0xff4273({'ok':_0x195baa[_0x4344de(0xf1)]>=0xc8&&_0x195baa['statusCode']<0x12c,'status':_0x195baa['statusCode'],'json':async()=>JSON[_0x4344de(0x100)](_0x5dd16d),'text':async()=>_0x5dd16d});});});_0x19883a['on'](_0x2ba781(0x11f),_0x239440=>{_0x2a775e(_0x239440);}),_0xdeb080['signal']&&(_0xdeb080['signal'][_0x2ba781(0x121)]?_0x19883a[_0x2ba781(0x11d)](new Error(_0x2ba781(0x12b))):_0xdeb080[_0x2ba781(0xd0)][_0x2ba781(0x127)](_0x2ba781(0xb7),()=>{_0x19883a['destroy'](new Error('The\x20operation\x20was\x20aborted.'));})),_0xdeb080[_0x2ba781(0xfd)]&&_0x19883a['write'](_0xdeb080['body']),_0x19883a[_0x2ba781(0xcf)]();}catch(_0x243a35){_0x2a775e(_0x243a35);}});}class ProxyServer{constructor(_0x2467a8={}){const _0x2b7bf4=_0x2e407e;this[_0x2b7bf4(0xbb)]=_0x2467a8[_0x2b7bf4(0xbb)]||process[_0x2b7bf4(0x112)](),this[_0x2b7bf4(0xc6)]=_0x2467a8[_0x2b7bf4(0xc6)]||this[_0x2b7bf4(0xc7)](),this[_0x2b7bf4(0x113)]=_0x2467a8[_0x2b7bf4(0x113)],this[_0x2b7bf4(0x108)]=_0x2467a8[_0x2b7bf4(0x108)]||_0x2467a8['masterSecret'],this['backends']=null,this[_0x2b7bf4(0xe2)]='',this['running']=![],this[_0x2b7bf4(0xa6)]=_0x2467a8[_0x2b7bf4(0xa6)]||process[_0x2b7bf4(0xa6)],this[_0x2b7bf4(0x12a)]=_0x2467a8['integrityManifestPath']||path[_0x2b7bf4(0xc3)](__dirname,_0x2b7bf4(0x11a),'integrity-manifest.json');}[_0x2e407e(0xc7)](){const _0x4679f7=_0x2e407e,_0x1e7906=path['join'](os[_0x4679f7(0xa9)](),_0x4679f7(0x105),_0x4679f7(0xa8));if(fs[_0x4679f7(0x106)](_0x1e7906))return fs[_0x4679f7(0x110)](_0x1e7906,'utf8')[_0x4679f7(0x117)]();return null;}async[_0x2e407e(0x102)](){const _0x3c96f5=_0x2e407e,_0x461c32=process.env.MCP_SKIP_LICENSE_CHECK==='1';if(_0x461c32||!this[_0x3c96f5(0xc6)])return;const _0x2a391e=this[_0x3c96f5(0xc6)][_0x3c96f5(0x10d)]('.');if(_0x2a391e[_0x3c96f5(0x104)]!==0x3)return;let _0x41993a;try{_0x41993a=JSON['parse'](Buffer[_0x3c96f5(0xab)](_0x2a391e[0x1],_0x3c96f5(0xeb))[_0x3c96f5(0x136)]('utf8'));}catch(_0x30eb47){return;}if(!_0x41993a||!_0x41993a[_0x3c96f5(0xa4)])return;const _0x52681f=0x6*0x18*0xe10*0x3e8,_0x350690=_0x41993a['exp']-Date[_0x3c96f5(0x126)]();if(_0x350690<_0x52681f){console[_0x3c96f5(0x11f)](_0x3c96f5(0xdb));const _0x265f52=process.env.MCP_ACTIVATION_URL||_0x3c96f5(0x120),_0x3f71f6=_0x265f52+_0x3c96f5(0xf0),_0x1457af=new AbortController(),_0x50d9cf=setTimeout(()=>_0x1457af[_0x3c96f5(0xb7)](),0x1388);try{const _0x45d684={};_0x45d684[_0x3c96f5(0x13b)]=_0x3c96f5(0xce);const _0x21eb70={};_0x21eb70[_0x3c96f5(0xec)]=this[_0x3c96f5(0xc6)];const _0xd9858=await httpRequest(_0x3f71f6,{'method':_0x3c96f5(0xf7),'headers':_0x45d684,'body':JSON[_0x3c96f5(0xbd)](_0x21eb70),'signal':_0x1457af[_0x3c96f5(0xd0)]});clearTimeout(_0x50d9cf);if(_0xd9858['status']===0x193){console[_0x3c96f5(0x11f)](_0x3c96f5(0xd9)),process[_0x3c96f5(0xd2)](0x1);return;}if(_0xd9858[_0x3c96f5(0xd5)]===0x191){console[_0x3c96f5(0x11f)]('[MCP\x20Agent]\x20License\x20key\x20expired\x20or\x20invalid.\x20Exiting.'),process[_0x3c96f5(0xd2)](0x1);return;}if(!_0xd9858['ok']){console[_0x3c96f5(0x11f)](_0x3c96f5(0x13e)+_0xd9858[_0x3c96f5(0xd5)]+_0x3c96f5(0xf8));return;}const _0x5c5a3e=await _0xd9858['json']();if(_0x5c5a3e&&_0x5c5a3e[_0x3c96f5(0xec)]){this[_0x3c96f5(0xc6)]=_0x5c5a3e[_0x3c96f5(0xec)];const _0x7abb22=path[_0x3c96f5(0xc3)](os[_0x3c96f5(0xa9)](),_0x3c96f5(0x105),_0x3c96f5(0xa8));try{const _0x38c2ca={};_0x38c2ca[_0x3c96f5(0x11b)]=!![],fs['mkdirSync'](path[_0x3c96f5(0xaa)](_0x7abb22),_0x38c2ca),fs[_0x3c96f5(0xea)](_0x7abb22,_0x5c5a3e[_0x3c96f5(0xec)],_0x3c96f5(0x11c)),console[_0x3c96f5(0x11f)](_0x3c96f5(0xd7));}catch(_0x1d9907){console[_0x3c96f5(0x11f)](_0x3c96f5(0x137),_0x1d9907[_0x3c96f5(0xe1)]);}}}catch(_0x2d374c){clearTimeout(_0x50d9cf),console[_0x3c96f5(0x11f)](_0x3c96f5(0x103),_0x2d374c['message'],'.\x20Continuing\x20with\x20cached\x20token.');}}}async['start'](){const _0x23d059=_0x2e407e;console[_0x23d059(0x11f)]('[MCP\x20Agent]\x20Starting\x20server\x20at\x20'+this[_0x23d059(0xbb)]);if(!this['publicKey']){if(process.env.MCP_ADMIN_DIR){const _0xf67a5=path[_0x23d059(0xc3)](process.env.MCP_ADMIN_DIR,'master.public.pem');fs['existsSync'](_0xf67a5)&&(this[_0x23d059(0x108)]=fs[_0x23d059(0x110)](_0xf67a5,_0x23d059(0x11c))['trim']());}if(!this[_0x23d059(0x108)]){let _0x322b0b=__dirname;while(_0x322b0b){const _0x5741cc=path[_0x23d059(0xc3)](_0x322b0b,_0x23d059(0xe8),'master.public.pem');if(fs[_0x23d059(0x106)](_0x5741cc)){this[_0x23d059(0x108)]=fs[_0x23d059(0x110)](_0x5741cc,_0x23d059(0x11c))['trim']();break;}const _0x582d18=path[_0x23d059(0xaa)](_0x322b0b);if(_0x582d18===_0x322b0b)break;_0x322b0b=_0x582d18;}}}const _0x39a811=this[_0x23d059(0x12a)],_0x192617=!__dirname['replace'](/\\/g,'/')[_0x23d059(0x10d)]('/')[_0x23d059(0x133)](_0x23d059(0x12e)),_0x2df6d8=process.env.MCP_SKIP_INTEGRITY_CHECK==='1'||_0x192617&&!fs[_0x23d059(0x106)](_0x39a811);if(!_0x2df6d8){const _0x4829a4=require('crypto');if(!fs[_0x23d059(0x106)](_0x39a811)){console[_0x23d059(0x11f)](_0x23d059(0xe4)),process[_0x23d059(0xd2)](0x1);return;}let _0xc77f9;try{_0xc77f9=JSON['parse'](fs[_0x23d059(0x110)](_0x39a811,_0x23d059(0x11c)));}catch(_0x35a8a3){console[_0x23d059(0x11f)](_0x23d059(0xf6)),process[_0x23d059(0xd2)](0x1);return;}if(!_0xc77f9[_0x23d059(0xe9)]||!_0xc77f9['signature']){console['error'](_0x23d059(0xef)),process[_0x23d059(0xd2)](0x1);return;}const _0xc4726f=this[_0x23d059(0x108)]||require('../license/verify.js')[_0x23d059(0x131)];try{const _0x39ce53=JSON[_0x23d059(0xbd)](_0xc77f9['files']),_0x5f4761=Buffer[_0x23d059(0xab)](_0xc77f9['signature'],'base64url'),_0x5719e6=_0x4829a4[_0x23d059(0x111)](null,Buffer[_0x23d059(0xab)](_0x39ce53),_0xc4726f,_0x5f4761);if(!_0x5719e6){console[_0x23d059(0x11f)](_0x23d059(0x12f)),process[_0x23d059(0xd2)](0x1);return;}}catch(_0x20e1ba){console[_0x23d059(0x11f)](_0x23d059(0x12c)),process[_0x23d059(0xd2)](0x1);return;}const _0x6cc4f1=path['join'](__dirname,_0x23d059(0x11a));for(const [_0x17dc75,_0x25f8f3]of Object[_0x23d059(0xdf)](_0xc77f9[_0x23d059(0xe9)])){const _0x4fcb99=path['join'](_0x6cc4f1,_0x17dc75);if(!fs[_0x23d059(0x106)](_0x4fcb99)){console[_0x23d059(0x11f)](_0x23d059(0x10a)+_0x17dc75+'\x20modified.\x20Exiting.'),process[_0x23d059(0xd2)](0x1);return;}try{const _0x3bba89=fs[_0x23d059(0x110)](_0x4fcb99),_0x3a6fc8=_0x4829a4['createHash']('sha256')[_0x23d059(0xdd)](_0x3bba89)[_0x23d059(0xb2)](_0x23d059(0xd8));if(_0x3a6fc8!==_0x25f8f3){console[_0x23d059(0x11f)](_0x23d059(0x10a)+_0x17dc75+'\x20modified.\x20Exiting.'),process[_0x23d059(0xd2)](0x1);return;}}catch(_0x450078){console['error'](_0x23d059(0x10a)+_0x17dc75+_0x23d059(0xb1)),process[_0x23d059(0xd2)](0x1);return;}}}const _0x29cf9e=process.env.MCP_SKIP_LICENSE_CHECK==='1';if(!_0x29cf9e){if(!this[_0x23d059(0x113)]){const {getFingerprint:_0x334e9d}=require('../license/fingerprint.js');this['deviceId']=_0x334e9d();}const _0x2cec23=verifyLicense(this[_0x23d059(0xc6)],this[_0x23d059(0x113)],this[_0x23d059(0x108)]);if(!_0x2cec23[_0x23d059(0x10c)]){if(_0x2cec23['reason']===_0x23d059(0xb6)){const _0x4a484c=_0x2cec23[_0x23d059(0xaf)]||{},_0x1d9f84=_0x4a484c[_0x23d059(0xa4)]?new Date(_0x4a484c[_0x23d059(0xa4)])[_0x23d059(0xa5)]()['split']('T')[0x0]:_0x23d059(0x119);console['error'](_0x23d059(0xd4)+_0x1d9f84+'.\x20Renew\x20at\x20https://anhdh.io/renew.\x20Exiting.');}else console[_0x23d059(0x11f)]('[MCP\x20Agent]\x20License\x20key\x20verification\x20failed:\x20'+_0x2cec23[_0x23d059(0xc4)]+_0x23d059(0xf2));process[_0x23d059(0xd2)](0x1);return;}console[_0x23d059(0x11f)]('[MCP\x20Agent]\x20License\x20key\x20verified\x20successfully\x20for\x20user:\x20'+_0x2cec23[_0x23d059(0xaf)][_0x23d059(0xb8)]),await this[_0x23d059(0x102)](),this[_0x23d059(0xc5)]=setInterval(()=>{const _0x3bd291=_0x23d059;this[_0x3bd291(0x102)]()[_0x3bd291(0x107)](_0x4039bc=>{const _0xa09195=_0x3bd291;console['error'](_0xa09195(0xd1),_0x4039bc[_0xa09195(0xe1)]);});},0x18*0x3c*0x3c*0x3e8);}this['backends']=spawnBackends(this['projectPath']),this[_0x23d059(0xe7)]=!![];for(const _0x48650b of Object[_0x23d059(0x135)](this[_0x23d059(0xed)])){_0x48650b[_0x23d059(0xcc)]();}this['stdinListener']=_0x5a52b2=>{const _0x5d403c=_0x23d059;this[_0x5d403c(0xb3)](_0x5a52b2[_0x5d403c(0x136)]());},process[_0x23d059(0x13d)]['on'](_0x23d059(0x10b),this[_0x23d059(0x10e)]);}[_0x2e407e(0xb3)](_0x1cfa95){const _0x812119=_0x2e407e;this[_0x812119(0xe2)]+=_0x1cfa95;const _0x3ece76=this[_0x812119(0xe2)]['split']('\x0a');this['clientBuffer']=_0x3ece76['pop']();for(const _0x1faeed of _0x3ece76){const _0x15151e=_0x1faeed['trim']();if(!_0x15151e)continue;try{const _0xadee81=JSON[_0x812119(0x100)](_0x15151e);this[_0x812119(0xa7)](_0xadee81);}catch(_0x2fb4db){console['error'](_0x812119(0xb9),_0x1faeed,_0x2fb4db[_0x812119(0xe1)]);}}}async[_0x2e407e(0xa7)](_0x156c7b){const _0x1b00f2=_0x2e407e,{id:_0x2b6e84,method:_0x33bb13,params:_0x4de455}=_0x156c7b;if(!_0x33bb13)return;if(_0x33bb13===_0x1b00f2(0x130)){Promise[_0x1b00f2(0xa3)](Object['values'](this['backends'])[_0x1b00f2(0xa2)](_0xaab0cb=>_0xaab0cb[_0x1b00f2(0x13c)](_0x1b00f2(0x130),_0x4de455)[_0x1b00f2(0x107)](_0x48783e=>{const _0x3692f9=_0x1b00f2;console[_0x3692f9(0x11f)]('[MCP\x20Agent]\x20Failed\x20to\x20initialize\x20service\x20'+(_0xaab0cb[_0x3692f9(0x123)]||_0xaab0cb['name'])+':',_0x48783e[_0x3692f9(0xe1)]);})));const _0x2a604e={};_0x2a604e[_0x1b00f2(0xf4)]=![];const _0x318560={};_0x318560[_0x1b00f2(0xcd)]=_0x2a604e;const _0x460cf6={};_0x460cf6[_0x1b00f2(0x128)]=_0x1b00f2(0xf9),_0x460cf6[_0x1b00f2(0xc8)]='1.0.0';const _0x2bd66d={};_0x2bd66d['protocolVersion']=_0x4de455[_0x1b00f2(0xc2)]||_0x1b00f2(0xb0),_0x2bd66d['capabilities']=_0x318560,_0x2bd66d['serverInfo']=_0x460cf6;const _0x3e50ee={};_0x3e50ee[_0x1b00f2(0x140)]=_0x1b00f2(0xdc),_0x3e50ee['id']=_0x2b6e84,_0x3e50ee[_0x1b00f2(0xe5)]=_0x2bd66d;const _0x1d7f12=_0x3e50ee;this[_0x1b00f2(0xbc)](_0x1d7f12);return;}if(_0x33bb13==='tools/list'){try{const _0x2d7cce=Object[_0x1b00f2(0xdf)](this[_0x1b00f2(0xed)])['map'](async([_0x51738b,_0x5763e8])=>{const _0x39f704=_0x1b00f2;try{const _0x1e3794=await _0x5763e8[_0x39f704(0x13c)]('tools/list'),_0x30bbb4=_0x1e3794&&_0x1e3794[_0x39f704(0xe5)]&&_0x1e3794[_0x39f704(0xe5)]['tools']||[];return translateToolList(_0x30bbb4,_0x51738b);}catch(_0x230a7b){return console[_0x39f704(0x11f)]('[MCP\x20Agent]\x20tools/list\x20request\x20failed\x20for\x20service\x20'+_0x51738b+':',_0x230a7b[_0x39f704(0xe1)]),[];}}),_0x31b4fa=await Promise[_0x1b00f2(0xa3)](_0x2d7cce),_0x5b8449=_0x31b4fa[_0x1b00f2(0xbe)](),_0x4a1579={};_0x4a1579[_0x1b00f2(0xcd)]=_0x5b8449;const _0x130359={};_0x130359['jsonrpc']=_0x1b00f2(0xdc),_0x130359['id']=_0x2b6e84,_0x130359[_0x1b00f2(0xe5)]=_0x4a1579;const _0x4f692f=_0x130359;this[_0x1b00f2(0xbc)](_0x4f692f);}catch(_0x4f2a68){this[_0x1b00f2(0x116)](_0x2b6e84,-0x7f5b,'Failed\x20to\x20query\x20tool\x20list:\x20'+_0x4f2a68[_0x1b00f2(0xe1)]);}return;}if(_0x33bb13===_0x1b00f2(0xb5)){const _0x51391b=_0x4de455[_0x1b00f2(0x128)],_0x28c93b=mapExposedToOriginal(_0x51391b);if(!_0x28c93b)return this[_0x1b00f2(0x116)](_0x2b6e84,-0x7f59,_0x1b00f2(0xee)+_0x51391b);try{const _0x35f34e=this[_0x1b00f2(0xed)][_0x28c93b['backend']];if(!_0x35f34e)return this[_0x1b00f2(0x116)](_0x2b6e84,-0x7f5b,_0x1b00f2(0x13a)+_0x28c93b[_0x1b00f2(0x101)]+_0x1b00f2(0x129));const _0x2ecb31={..._0x4de455};_0x2ecb31[_0x1b00f2(0x128)]=_0x28c93b[_0x1b00f2(0xcb)];const _0x59fce2={..._0x156c7b};_0x59fce2[_0x1b00f2(0xa1)]=_0x2ecb31;const _0x2edbfe=_0x59fce2,_0x32d292=await _0x35f34e[_0x1b00f2(0x132)](_0x2edbfe);this[_0x1b00f2(0xbc)](_0x32d292);}catch(_0x5ae046){this[_0x1b00f2(0x116)](_0x2b6e84,-0x7f5b,_0x1b00f2(0x114)+_0x5ae046[_0x1b00f2(0xe1)]);}return;}for(const _0xdbf249 of Object['values'](this[_0x1b00f2(0xed)])){_0xdbf249[_0x1b00f2(0xad)]&&_0xdbf249[_0x1b00f2(0xad)][_0x1b00f2(0x13d)]['write'](JSON[_0x1b00f2(0xbd)](_0x156c7b)+'\x0a');}}['writeToClient'](_0x4a7e82){const _0x2e2031=_0x2e407e;this[_0x2e2031(0xa6)][_0x2e2031(0xba)](JSON['stringify'](_0x4a7e82)+'\x0a');}[_0x2e407e(0x116)](_0x26e398,_0x1e99db,_0x51c59f){const _0xd6cd25=_0x2e407e,_0x3370d7={};_0x3370d7[_0xd6cd25(0x139)]=_0x1e99db,_0x3370d7['message']=_0x51c59f;const _0x250279={};_0x250279[_0xd6cd25(0x140)]=_0xd6cd25(0xdc),_0x250279['id']=_0x26e398,_0x250279[_0xd6cd25(0x11f)]=_0x3370d7;const _0x395cff=_0x250279;this[_0xd6cd25(0xbc)](_0x395cff);}['stop'](){const _0x32bc5a=_0x2e407e;this[_0x32bc5a(0xe7)]=![];this[_0x32bc5a(0xc5)]&&(clearInterval(this[_0x32bc5a(0xc5)]),this[_0x32bc5a(0xc5)]=null);this[_0x32bc5a(0x10e)]&&(process[_0x32bc5a(0x13d)][_0x32bc5a(0xfc)](_0x32bc5a(0x10b),this[_0x32bc5a(0x10e)]),this['stdinListener']=null,process['stdin'][_0x32bc5a(0x12d)]());if(this['backends'])for(const _0x43cc66 of Object[_0x32bc5a(0x135)](this[_0x32bc5a(0xed)])){_0x43cc66[_0x32bc5a(0x118)]();}}}const _0x57e060={};_0x57e060[_0x2e407e(0x13f)]=ProxyServer,module[_0x2e407e(0xa0)]=_0x57e060;function _0x37cc(_0x2a68b9,_0x2c4c39){_0x2a68b9=_0x2a68b9-0xa0;const _0x4faf2f=_0x4faf();let _0x37ccc5=_0x4faf2f[_0x2a68b9];if(_0x37cc['vdFCKv']===undefined){var _0x3b10d2=function(_0x1644a){const _0x24a4b2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1dfedd='',_0x280036='';for(let _0x14f319=0x0,_0x3fd273,_0x4f1ccb,_0x4290c6=0x0;_0x4f1ccb=_0x1644a['charAt'](_0x4290c6++);~_0x4f1ccb&&(_0x3fd273=_0x14f319%0x4?_0x3fd273*0x40+_0x4f1ccb:_0x4f1ccb,_0x14f319++%0x4)?_0x1dfedd+=String['fromCharCode'](0xff&_0x3fd273>>(-0x2*_0x14f319&0x6)):0x0){_0x4f1ccb=_0x24a4b2['indexOf'](_0x4f1ccb);}for(let _0xb23c8=0x0,_0x14ab4b=_0x1dfedd['length'];_0xb23c8<_0x14ab4b;_0xb23c8++){_0x280036+='%'+('00'+_0x1dfedd['charCodeAt'](_0xb23c8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x280036);};_0x37cc['uyVbrp']=_0x3b10d2,_0x37cc['OoZoBj']={},_0x37cc['vdFCKv']=!![];}const _0x3c13c4=_0x4faf2f[0x0],_0x4e4c17=_0x2a68b9+_0x3c13c4,_0x4624e1=_0x37cc['OoZoBj'][_0x4e4c17];return!_0x4624e1?(_0x37ccc5=_0x37cc['uyVbrp'](_0x37ccc5),_0x37cc['OoZoBj'][_0x4e4c17]=_0x37ccc5):_0x37ccc5=_0x4624e1,_0x37ccc5;}if(require[_0x2e407e(0xf3)]===module){const server=new ProxyServer();server[_0x2e407e(0xcc)]()[_0x2e407e(0x107)](_0x4b2c6c=>{const _0x5f72b7=_0x2e407e;console['error'](_0x5f72b7(0x10f),_0x4b2c6c['message']),process[_0x5f72b7(0xd2)](0x1);});}
|
package/src/templates/AGENTS.md
CHANGED
|
@@ -34,6 +34,28 @@ Skills for Flutter architecture, testing, layout, routing, localization, and ser
|
|
|
34
34
|
|
|
35
35
|
Skills: `flutter-add-integration-test`, `flutter-add-widget-preview`, `flutter-add-widget-test`, `flutter-apply-architecture-best-practices`, `flutter-build-responsive-layout`, `flutter-fix-layout-issues`, `flutter-implement-json-serialization`, `flutter-setup-declarative-routing`, `flutter-setup-localization`, `flutter-use-http-package`.
|
|
36
36
|
|
|
37
|
+
### Productivity & development utilities
|
|
38
|
+
|
|
39
|
+
Various utility skills for local environment setup, stress testing, refactoring, and code generation.
|
|
40
|
+
|
|
41
|
+
- `stress-test-plan` β interview the user relentlessly to stress-test their plan or design.
|
|
42
|
+
- `skill-generator` β create new agent skills with proper directory structures.
|
|
43
|
+
- `git-safety-guardrails` β set up Claude Code hooks to block dangerous git commands.
|
|
44
|
+
- `git-hook-setup` β set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests.
|
|
45
|
+
- `test-type-migration` β migrate test files from type assertions to clean TypeScript types.
|
|
46
|
+
- `exercise-scaffold` β create exercise directory structures with problems, solutions, and tests.
|
|
47
|
+
- `interactive-teaching` β teach the user a new skill or concept statefully within this workspace.
|
|
48
|
+
- `writing-flow` β shape an article as a journey of narrative beats.
|
|
49
|
+
- `raw-idea-collector` β collect ideas and fragments for a future article.
|
|
50
|
+
- `draft-shaper` β shape a rough draft into a publishable article.
|
|
51
|
+
- `workflow-navigator` β ask which skill or flow fits your situation.
|
|
52
|
+
- `project-config-wizard` β configure the issue tracker, triage labels, and domain doc layout.
|
|
53
|
+
- `skill-writing-guide` β guidelines and principles for writing great custom agent skills.
|
|
54
|
+
- `architecture-rules` β principles and boundaries for codebase modular design.
|
|
55
|
+
- `solution-decision-map` β capture key design decisions and manage fog of war.
|
|
56
|
+
- `task-implementation` β implement features cleanly using pre-agreed seams.
|
|
57
|
+
- `git-conflict-resolver` β resolve git conflicts statefully and systematically.
|
|
58
|
+
|
|
37
59
|
### MCP tools
|
|
38
60
|
|
|
39
61
|
Tool selection rules, index policies, memory conventions, and auto-skill activation. See `docs/agents/mcp-tools.md`.
|
package/src/templates/CLAUDE.md
CHANGED
|
@@ -49,10 +49,23 @@ Tool selection rules, index policies, memory conventions, and auto-skill activat
|
|
|
49
49
|
|
|
50
50
|
At the start of every session:
|
|
51
51
|
1. Read `.agents/ARCHITECTURE.md` to understand Agents, Skills, and Scripts.
|
|
52
|
-
2. Read `.agents/memory/MEMORY.md` to load persistent project conventions.
|
|
52
|
+
2. Read `.agents/memory/MEMORY.md` to load persistent project conventions, user preferences, and tech decisions.
|
|
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
|
+
### π οΈ DEVELOPER WORKFLOW PROTOCOL (MANDATORY 4-PHASE WORKFLOW)
|
|
57
|
+
|
|
58
|
+
Before writing any non-trivial code or implementing features, you MUST follow the closed-loop 4-Phase Agentic Workflow:
|
|
59
|
+
|
|
60
|
+
1. **Phase 01: Analysis**: Analyze requirements and specs. Run `/brainstorm`, `/grill-with-docs` (which routes to `spec-clarification`), or `/plan` first to clarify specs, identify edge cases, ask Socratic questions, and challenge requirements. **Once specs are clarified, you MUST run `/to-prd` (which routes to `prd-gen`) to extract and compile the Product Requirements Document (PRD) from context.**
|
|
61
|
+
2. **Phase 02: Planning**: Perform a task breakdown. Run `/to-issues` (which routes to `task-breakdown`) based on the generated PRD to slice the work into tracer-bullet tasks and automatically create the `{task-slug}.md` file to track execution progress.
|
|
62
|
+
3. **Phase 03: Solutioning**: Design the architecture and document decisions. Synchronize terms/definitions in the project glossary (`CONTEXT.md`) and write ADRs in `docs/adr/`.
|
|
63
|
+
- *CRITICAL CONSTRAINT*: **Strictly NO CODE logic** must be written during this phase (purely design and specification alignment).
|
|
64
|
+
- *MEMORY PERSISTENCE*: Whenever design or architectural decisions are finalized (across Dev, BA, QC, or PM), you MUST call `/remember` to persist these choices in `.agents/memory/MEMORY.md` and related topic files.
|
|
65
|
+
4. **Phase 04: Verification**: Implement test-first code and perform security/quality audits.
|
|
66
|
+
- Run `/tdd` (which routes to `tdd-loop`) to write tests and implement minimal code to pass under a RED-GREEN-REFACTOR cycle.
|
|
67
|
+
- Run `/verify` to execute quality and security scans (security scan, unit tests, linting, type-safety checks) before committing.
|
|
68
|
+
|
|
56
69
|
---
|
|
57
70
|
|
|
58
71
|
## Auto-Trigger Skills (MANDATORY)
|
|
@@ -78,6 +91,21 @@ At the start of every session:
|
|
|
78
91
|
| `mobile-rules` | Any mobile UI implementation: Flutter widget, screen, touch interaction | Load SKILL.md β Apply platform conventions, touch patterns |
|
|
79
92
|
| `flutter-*` | Flutter-specific tasks: layout fix, routing, serialization, testing | Auto-select matching flutter skill based on task type |
|
|
80
93
|
|
|
94
|
+
### Productivity & Utility Skills β auto-trigger based on task context:
|
|
95
|
+
|
|
96
|
+
| Skill | Trigger Conditions | Agent Action |
|
|
97
|
+
|---|---|---|
|
|
98
|
+
| `stress-test-plan` | "grill me", "challenge my plan", stress testing proposed plan | Load SKILL.md β Start interactive plan stress-testing session |
|
|
99
|
+
| `skill-generator` | "write skill", "create skill", building a new custom agent skill | Load SKILL.md β Generate new skill stub/directory |
|
|
100
|
+
| `git-safety-guardrails` | "git guardrails", "block dangerous git", protect git hooks | Load SKILL.md β Deploy Claude Code hooks to block push/hard-reset |
|
|
101
|
+
| `git-hook-setup` | "setup pre-commit", "configure husky", install pre-commit hooks | Load SKILL.md β Install Husky, lint-staged, Prettier hooks |
|
|
102
|
+
| `test-type-migration` | "migrate as in tests", "replace as assertions", shoehorn refactoring | Load SKILL.md β Refactor tests to remove unsafe type assertions |
|
|
103
|
+
| `exercise-scaffold` | "scaffold exercises", "exercise stubs", coding course setup | Load SKILL.md β Create problems, solutions, and tests stubs |
|
|
104
|
+
| `interactive-teaching` | "teach me", "tutorial", "learn Y", stateful workspace learning | Load SKILL.md β Create mission, lessons, and learning records |
|
|
105
|
+
| `writing-flow` | "writing beats", "narrative journey", write article step-by-step | Load SKILL.md β Guide user through choice of narrative beats |
|
|
106
|
+
| `raw-idea-collector` | "collect ideas", "writing fragments", ideate outline | Load SKILL.md β Collect heterogeneous claims, vignettes, and thoughts |
|
|
107
|
+
| `draft-shaper` | "shape draft", "edit notes", clean draft to publishable quality | Load SKILL.md β Iterate paragraph by paragraph to edit draft |
|
|
108
|
+
|
|
81
109
|
**Failure Conditions:**
|
|
82
110
|
- β Writing UI code without loading design skill = **SLOP RISK**
|
|
83
111
|
- β Creating mobile screen without `mobile-rules` = **PLATFORM VIOLATION**
|
|
@@ -105,4 +133,4 @@ Every user request must pass through the Socratic Gate before ANY implementation
|
|
|
105
133
|
|
|
106
134
|
### Quick Reference
|
|
107
135
|
- **Masters**: `orchestrator`, `project-planner`, `security-auditor`, `backend-specialist`, `frontend-specialist`, `mobile-developer`, `debugger`
|
|
108
|
-
- **Key Skills**: `clean-code`, `brainstorming`, `ui-style-rules`, `mobile-rules`, `web-mockup-gen`, `mobile-mockup-gen`, `bug-diagnostics`, `tdd-loop`, `spec-clarification`, `prd-gen`, `task-breakdown`, `prototype`
|
|
136
|
+
- **Key Skills**: `clean-code`, `brainstorming`, `ui-style-rules`, `mobile-rules`, `web-mockup-gen`, `mobile-mockup-gen`, `bug-diagnostics`, `tdd-loop`, `spec-clarification`, `prd-gen`, `task-breakdown`, `prototype`, `stress-test-plan`, `skill-generator`, `git-safety-guardrails`, `git-hook-setup`, `test-type-migration`, `exercise-scaffold`, `interactive-teaching`, `writing-flow`, `raw-idea-collector`, `draft-shaper`, `project-config-wizard`, `skill-writing-guide`, `architecture-rules`, `solution-decision-map`, `task-implementation`, `git-conflict-resolver`, `workflow-navigator`, `terse-communication`, `session-handoff`
|
package/src/templates/GEMINI.md
CHANGED
|
@@ -34,10 +34,23 @@ Single-context layout β one `CONTEXT.md` + `docs/adr/` at the repo root. See `
|
|
|
34
34
|
|
|
35
35
|
### πΊοΈ System Map & Memory Read (MANDATORY at session start)
|
|
36
36
|
1. Read `.agents/ARCHITECTURE.md` to understand Agents, Skills, and Scripts.
|
|
37
|
-
2. Read `.agents/memory/MEMORY.md` to load persistent project conventions.
|
|
37
|
+
2. Read `.agents/memory/MEMORY.md` to load persistent project conventions, user preferences, and tech decisions.
|
|
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
|
+
### π οΈ DEVELOPER WORKFLOW PROTOCOL (MANDATORY 4-PHASE WORKFLOW)
|
|
42
|
+
|
|
43
|
+
Before writing any non-trivial code or implementing features, you MUST follow the closed-loop 4-Phase Agentic Workflow:
|
|
44
|
+
|
|
45
|
+
1. **Phase 01: Analysis**: Analyze requirements and specs. Run `/brainstorm`, `/grill-with-docs` (which routes to `spec-clarification`), or `/plan` first to clarify specs, identify edge cases, ask Socratic questions, and challenge requirements. **Once specs are clarified, you MUST run `/to-prd` (which routes to `prd-gen`) to extract and compile the Product Requirements Document (PRD) from context.**
|
|
46
|
+
2. **Phase 02: Planning**: Perform a task breakdown. Run `/to-issues` (which routes to `task-breakdown`) based on the generated PRD to slice the work into tracer-bullet tasks and automatically create the `{task-slug}.md` file to track execution progress.
|
|
47
|
+
3. **Phase 03: Solutioning**: Design the architecture and document decisions. Synchronize terms/definitions in the project glossary (`CONTEXT.md`) and write ADRs in `docs/adr/`.
|
|
48
|
+
- *CRITICAL CONSTRAINT*: **Strictly NO CODE logic** must be written during this phase (purely design and specification alignment).
|
|
49
|
+
- *MEMORY PERSISTENCE*: Whenever design or architectural decisions are finalized (across Dev, BA, QC, or PM), you MUST call `/remember` to persist these choices in `.agents/memory/MEMORY.md` and related topic files.
|
|
50
|
+
4. **Phase 04: Verification**: Implement test-first code and perform security/quality audits.
|
|
51
|
+
- Run `/tdd` (which routes to `tdd-loop`) to write tests and implement minimal code to pass under a RED-GREEN-REFACTOR cycle.
|
|
52
|
+
- Run `/verify` to execute quality and security scans (security scan, unit tests, linting, type-safety checks) before committing.
|
|
53
|
+
|
|
41
54
|
---
|
|
42
55
|
|
|
43
56
|
## π€ INTELLIGENT AGENT ROUTING
|
|
@@ -77,6 +90,21 @@ UI/UX Design Skills β tα»± trigger khi touch UI/design:
|
|
|
77
90
|
| `mobile-rules` | Any mobile UI implementation: Flutter widget, screen, touch interaction | Load SKILL.md β Apply platform conventions, touch patterns, performance |
|
|
78
91
|
| `flutter-*` | Flutter-specific tasks: layout fix, routing, serialization, testing, etc. | Auto-select matching flutter skill based on task type |
|
|
79
92
|
|
|
93
|
+
Productivity & Utility Skills β tα»± trigger theo task context:
|
|
94
|
+
|
|
95
|
+
| Skill | Trigger Conditions | Agent Action |
|
|
96
|
+
|---|---|---|
|
|
97
|
+
| `stress-test-plan` | "grill me", "challenge my plan", stress testing proposed plan | Load SKILL.md β Start interactive plan stress-testing session |
|
|
98
|
+
| `skill-generator` | "write skill", "create skill", building a new custom agent skill | Load SKILL.md β Generate new skill stub/directory |
|
|
99
|
+
| `git-safety-guardrails` | "git guardrails", "block dangerous git", protect git hooks | Load SKILL.md β Deploy Claude Code hooks to block push/hard-reset |
|
|
100
|
+
| `git-hook-setup` | "setup pre-commit", "configure husky", install pre-commit hooks | Load SKILL.md β Install Husky, lint-staged, Prettier hooks |
|
|
101
|
+
| `test-type-migration` | "migrate as in tests", "replace as assertions", shoehorn refactoring | Load SKILL.md β Refactor tests to remove unsafe type assertions |
|
|
102
|
+
| `exercise-scaffold` | "scaffold exercises", "exercise stubs", coding course setup | Load SKILL.md β Create problems, solutions, and tests stubs |
|
|
103
|
+
| `interactive-teaching` | "teach me", "tutorial", "learn Y", stateful workspace learning | Load SKILL.md β Create mission, lessons, and learning records |
|
|
104
|
+
| `writing-flow` | "writing beats", "narrative journey", write article step-by-step | Load SKILL.md β Guide user through choice of narrative beats |
|
|
105
|
+
| `raw-idea-collector` | "collect ideas", "writing fragments", ideate outline | Load SKILL.md β Collect heterogeneous claims, vignettes, and thoughts |
|
|
106
|
+
| `draft-shaper` | "shape draft", "edit notes", clean draft to publishable quality | Load SKILL.md β Iterate paragraph by paragraph to edit draft |
|
|
107
|
+
|
|
80
108
|
### UI/UX Auto-Detection Rules
|
|
81
109
|
- **mobile-flutter preset**: Load `mobile-rules` + `ui-style-rules` (adapted) + `mobile-mockup-gen` + matching `flutter-*`
|
|
82
110
|
- **fe-react / fe-angular / fe-vue presets**: Load `ui-style-rules` + `web-mockup-gen`
|
|
@@ -113,4 +141,4 @@ Every user request must pass through the Socratic Gate before ANY tool use or im
|
|
|
113
141
|
|
|
114
142
|
### πΊοΈ Quick Reference
|
|
115
143
|
- **Masters**: `orchestrator`, `project-planner`, `security-auditor`, `backend-specialist`, `frontend-specialist`, `mobile-developer`, `aso-specialist`, `debugger`
|
|
116
|
-
- **Key Skills**: `clean-code`, `brainstorming`, `ui-style-rules`, `mobile-rules`, `web-mockup-gen`, `mobile-mockup-gen`, `bug-diagnostics`, `tdd-loop`, `spec-clarification`, `prd-gen`, `task-breakdown`, `prototype`, `aso-router`
|
|
144
|
+
- **Key Skills**: `clean-code`, `brainstorming`, `ui-style-rules`, `mobile-rules`, `web-mockup-gen`, `mobile-mockup-gen`, `bug-diagnostics`, `tdd-loop`, `spec-clarification`, `prd-gen`, `task-breakdown`, `prototype`, `aso-router`, `stress-test-plan`, `skill-generator`, `git-safety-guardrails`, `git-hook-setup`, `test-type-migration`, `exercise-scaffold`, `interactive-teaching`, `writing-flow`, `raw-idea-collector`, `draft-shaper`, `project-config-wizard`, `skill-writing-guide`, `architecture-rules`, `solution-decision-map`, `task-implementation`, `git-conflict-resolver`, `workflow-navigator`, `terse-communication`, `session-handoff`
|
|
@@ -25,10 +25,23 @@ Single-context layout β one `CONTEXT.md` + `docs/adr/` at the repo root. See `
|
|
|
25
25
|
## Session Start Protocol (MANDATORY)
|
|
26
26
|
|
|
27
27
|
1. Read `.agents/ARCHITECTURE.md` to understand Agents, Skills, and Scripts.
|
|
28
|
-
2. Read `.agents/memory/MEMORY.md` to load persistent project conventions.
|
|
28
|
+
2. Read `.agents/memory/MEMORY.md` to load persistent project conventions, user preferences, and tech decisions.
|
|
29
29
|
3. Read `docs/agents/mcp-tools.md` to load MCP tool selection rules & memory conventions.
|
|
30
30
|
4. Call `read_knowledge` to load dynamic knowledge graph from memory.
|
|
31
31
|
|
|
32
|
+
### π οΈ DEVELOPER WORKFLOW PROTOCOL (MANDATORY 4-PHASE WORKFLOW)
|
|
33
|
+
|
|
34
|
+
Before writing any non-trivial code or implementing features, you MUST follow the closed-loop 4-Phase Agentic Workflow:
|
|
35
|
+
|
|
36
|
+
1. **Phase 01: Analysis**: Analyze requirements and specs. Run `/brainstorm`, `/grill-with-docs` (which routes to `spec-clarification`), or `/plan` first to clarify specs, identify edge cases, ask Socratic questions, and challenge requirements. **Once specs are clarified, you MUST run `/to-prd` (which routes to `prd-gen`) to extract and compile the Product Requirements Document (PRD) from context.**
|
|
37
|
+
2. **Phase 02: Planning**: Perform a task breakdown. Run `/to-issues` (which routes to `task-breakdown`) based on the generated PRD to slice the work into tracer-bullet tasks and automatically create the `{task-slug}.md` file to track execution progress.
|
|
38
|
+
3. **Phase 03: Solutioning**: Design the architecture and document decisions. Synchronize terms/definitions in the project glossary (`CONTEXT.md`) and write ADRs in `docs/adr/`.
|
|
39
|
+
- *CRITICAL CONSTRAINT*: **Strictly NO CODE logic** must be written during this phase (purely design and specification alignment).
|
|
40
|
+
- *MEMORY PERSISTENCE*: Whenever design or architectural decisions are finalized (across Dev, BA, QC, or PM), you MUST call `/remember` to persist these choices in `.agents/memory/MEMORY.md` and related topic files.
|
|
41
|
+
4. **Phase 04: Verification**: Implement test-first code and perform security/quality audits.
|
|
42
|
+
- Run `/tdd` (which routes to `tdd-loop`) to write tests and implement minimal code to pass under a RED-GREEN-REFACTOR cycle.
|
|
43
|
+
- Run `/verify` to execute quality and security scans (security scan, unit tests, linting, type-safety checks) before committing.
|
|
44
|
+
|
|
32
45
|
---
|
|
33
46
|
|
|
34
47
|
## MCP Tool Selection
|
|
@@ -95,4 +108,4 @@ Every user request must pass through the Socratic Gate before ANY implementation
|
|
|
95
108
|
|
|
96
109
|
### Quick Reference
|
|
97
110
|
- **Masters**: `orchestrator`, `project-planner`, `security-auditor`, `backend-specialist`, `frontend-specialist`, `mobile-developer`, `debugger`
|
|
98
|
-
- **Key Skills**: `clean-code`, `brainstorming`, `ui-style-rules`, `mobile-rules`, `web-mockup-gen`, `mobile-mockup-gen`, `bug-diagnostics`, `tdd-loop`, `spec-clarification`, `prd-gen`, `task-breakdown`, `prototype`
|
|
111
|
+
- **Key Skills**: `clean-code`, `brainstorming`, `ui-style-rules`, `mobile-rules`, `web-mockup-gen`, `mobile-mockup-gen`, `bug-diagnostics`, `tdd-loop`, `spec-clarification`, `prd-gen`, `task-breakdown`, `prototype`, `stress-test-plan`, `skill-generator`, `git-safety-guardrails`, `git-hook-setup`, `test-type-migration`, `exercise-scaffold`, `interactive-teaching`, `writing-flow`, `raw-idea-collector`, `draft-shaper`, `project-config-wizard`, `skill-writing-guide`, `architecture-rules`, `solution-decision-map`, `task-implementation`, `git-conflict-resolver`, `workflow-navigator`, `terse-communication`, `session-handoff`
|
|
@@ -31,10 +31,23 @@ Single-context layout β one `CONTEXT.md` + `docs/adr/` at the repo root. See `
|
|
|
31
31
|
## πΊοΈ Session Start Protocol (MANDATORY)
|
|
32
32
|
|
|
33
33
|
1. Read `.agents/ARCHITECTURE.md` to understand Agents, Skills, and Scripts.
|
|
34
|
-
2. Read `.agents/memory/MEMORY.md` to load persistent project conventions.
|
|
34
|
+
2. Read `.agents/memory/MEMORY.md` to load persistent project conventions, user preferences, and tech decisions.
|
|
35
35
|
3. Read `docs/agents/mcp-tools.md` to load MCP tool selection rules & memory conventions.
|
|
36
36
|
4. Call `read_knowledge` to load dynamic knowledge graph from memory.
|
|
37
37
|
|
|
38
|
+
### π οΈ DEVELOPER WORKFLOW PROTOCOL (MANDATORY 4-PHASE WORKFLOW)
|
|
39
|
+
|
|
40
|
+
Before writing any non-trivial code or implementing features, you MUST follow the closed-loop 4-Phase Agentic Workflow:
|
|
41
|
+
|
|
42
|
+
1. **Phase 01: Analysis**: Analyze requirements and specs. Run `/brainstorm`, `/grill-with-docs` (which routes to `spec-clarification`), or `/plan` first to clarify specs, identify edge cases, ask Socratic questions, and challenge requirements. **Once specs are clarified, you MUST run `/to-prd` (which routes to `prd-gen`) to extract and compile the Product Requirements Document (PRD) from context.**
|
|
43
|
+
2. **Phase 02: Planning**: Perform a task breakdown. Run `/to-issues` (which routes to `task-breakdown`) based on the generated PRD to slice the work into tracer-bullet tasks and automatically create the `{task-slug}.md` file to track execution progress.
|
|
44
|
+
3. **Phase 03: Solutioning**: Design the architecture and document decisions. Synchronize terms/definitions in the project glossary (`CONTEXT.md`) and write ADRs in `docs/adr/`.
|
|
45
|
+
- *CRITICAL CONSTRAINT*: **Strictly NO CODE logic** must be written during this phase (purely design and specification alignment).
|
|
46
|
+
- *MEMORY PERSISTENCE*: Whenever design or architectural decisions are finalized (across Dev, BA, QC, or PM), you MUST call `/remember` to persist these choices in `.agents/memory/MEMORY.md` and related topic files.
|
|
47
|
+
4. **Phase 04: Verification**: Implement test-first code and perform security/quality audits.
|
|
48
|
+
- Run `/tdd` (which routes to `tdd-loop`) to write tests and implement minimal code to pass under a RED-GREEN-REFACTOR cycle.
|
|
49
|
+
- Run `/verify` to execute quality and security scans (security scan, unit tests, linting, type-safety checks) before committing.
|
|
50
|
+
|
|
38
51
|
---
|
|
39
52
|
|
|
40
53
|
## π MCP Tool Selection
|
|
@@ -105,4 +118,4 @@ Every user request must pass through the Socratic Gate before ANY implementation
|
|
|
105
118
|
|
|
106
119
|
### Quick Reference
|
|
107
120
|
- **Masters**: `orchestrator`, `project-planner`, `security-auditor`, `backend-specialist`, `frontend-specialist`, `mobile-developer`, `debugger`
|
|
108
|
-
- **Key Skills**: `clean-code`, `brainstorming`, `ui-style-rules`, `mobile-rules`, `web-mockup-gen`, `mobile-mockup-gen`, `bug-diagnostics`, `tdd-loop`, `spec-clarification`, `prd-gen`, `task-breakdown`, `prototype`
|
|
121
|
+
- **Key Skills**: `clean-code`, `brainstorming`, `ui-style-rules`, `mobile-rules`, `web-mockup-gen`, `mobile-mockup-gen`, `bug-diagnostics`, `tdd-loop`, `spec-clarification`, `prd-gen`, `task-breakdown`, `prototype`, `stress-test-plan`, `skill-generator`, `git-safety-guardrails`, `git-hook-setup`, `test-type-migration`, `exercise-scaffold`, `interactive-teaching`, `writing-flow`, `raw-idea-collector`, `draft-shaper`, `project-config-wizard`, `skill-writing-guide`, `architecture-rules`, `solution-decision-map`, `task-implementation`, `git-conflict-resolver`, `workflow-navigator`, `terse-communication`, `session-handoff`
|
|
@@ -25,10 +25,23 @@ Single-context layout β one `CONTEXT.md` + `docs/adr/` at the repo root. See `
|
|
|
25
25
|
## Session Start Protocol (MANDATORY)
|
|
26
26
|
|
|
27
27
|
1. Read `.agents/ARCHITECTURE.md` to understand Agents, Skills, and Scripts.
|
|
28
|
-
2. Read `.agents/memory/MEMORY.md` to load persistent project conventions.
|
|
28
|
+
2. Read `.agents/memory/MEMORY.md` to load persistent project conventions, user preferences, and tech decisions.
|
|
29
29
|
3. Read `docs/agents/mcp-tools.md` to load MCP tool selection rules & memory conventions.
|
|
30
30
|
4. Call `read_knowledge` to load dynamic knowledge graph from memory.
|
|
31
31
|
|
|
32
|
+
### π οΈ DEVELOPER WORKFLOW PROTOCOL (MANDATORY 4-PHASE WORKFLOW)
|
|
33
|
+
|
|
34
|
+
Before writing any non-trivial code or implementing features, you MUST follow the closed-loop 4-Phase Agentic Workflow:
|
|
35
|
+
|
|
36
|
+
1. **Phase 01: Analysis**: Analyze requirements and specs. Run `/brainstorm`, `/grill-with-docs` (which routes to `spec-clarification`), or `/plan` first to clarify specs, identify edge cases, ask Socratic questions, and challenge requirements. **Once specs are clarified, you MUST run `/to-prd` (which routes to `prd-gen`) to extract and compile the Product Requirements Document (PRD) from context.**
|
|
37
|
+
2. **Phase 02: Planning**: Perform a task breakdown. Run `/to-issues` (which routes to `task-breakdown`) based on the generated PRD to slice the work into tracer-bullet tasks and automatically create the `{task-slug}.md` file to track execution progress.
|
|
38
|
+
3. **Phase 03: Solutioning**: Design the architecture and document decisions. Synchronize terms/definitions in the project glossary (`CONTEXT.md`) and write ADRs in `docs/adr/`.
|
|
39
|
+
- *CRITICAL CONSTRAINT*: **Strictly NO CODE logic** must be written during this phase (purely design and specification alignment).
|
|
40
|
+
- *MEMORY PERSISTENCE*: Whenever design or architectural decisions are finalized (across Dev, BA, QC, or PM), you MUST call `/remember` to persist these choices in `.agents/memory/MEMORY.md` and related topic files.
|
|
41
|
+
4. **Phase 04: Verification**: Implement test-first code and perform security/quality audits.
|
|
42
|
+
- Run `/tdd` (which routes to `tdd-loop`) to write tests and implement minimal code to pass under a RED-GREEN-REFACTOR cycle.
|
|
43
|
+
- Run `/verify` to execute quality and security scans (security scan, unit tests, linting, type-safety checks) before committing.
|
|
44
|
+
|
|
32
45
|
---
|
|
33
46
|
|
|
34
47
|
## MCP Tool Selection
|
|
@@ -95,4 +108,4 @@ Every user request must pass through the Socratic Gate before ANY implementation
|
|
|
95
108
|
|
|
96
109
|
### Quick Reference
|
|
97
110
|
- **Masters**: `orchestrator`, `project-planner`, `security-auditor`, `backend-specialist`, `frontend-specialist`, `mobile-developer`, `debugger`
|
|
98
|
-
- **Key Skills**: `clean-code`, `brainstorming`, `ui-style-rules`, `mobile-rules`, `web-mockup-gen`, `mobile-mockup-gen`, `bug-diagnostics`, `tdd-loop`, `spec-clarification`, `prd-gen`, `task-breakdown`, `prototype`
|
|
111
|
+
- **Key Skills**: `clean-code`, `brainstorming`, `ui-style-rules`, `mobile-rules`, `web-mockup-gen`, `mobile-mockup-gen`, `bug-diagnostics`, `tdd-loop`, `spec-clarification`, `prd-gen`, `task-breakdown`, `prototype`, `stress-test-plan`, `skill-generator`, `git-safety-guardrails`, `git-hook-setup`, `test-type-migration`, `exercise-scaffold`, `interactive-teaching`, `writing-flow`, `raw-idea-collector`, `draft-shaper`, `project-config-wizard`, `skill-writing-guide`, `architecture-rules`, `solution-decision-map`, `task-implementation`, `git-conflict-resolver`, `workflow-navigator`, `terse-communication`, `session-handoff`
|