@bangdao-ai/acw-tools 1.7.3-beta.4 → 1.7.3

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/manifest.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "author": "邦道科技 - 产品技术中心",
6
6
  "homepage": "https://www.npmjs.com/package/@bangdao-ai/acw-tools",
7
7
  "repository": "https://www.npmjs.com/package/@bangdao-ai/acw-tools?activeTab=readme",
8
- "capabilities": ["download_rule", "download_skill", "upload_skill", "search_skill", "check_skill_update", "init-common-admin-repo"],
8
+ "capabilities": ["download_rule", "download_skill", "upload_skill", "search_skill", "check_skill", "init-common-admin-repo"],
9
9
  "entry_point": {
10
10
  "command": "acw-tools",
11
11
  "args": [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bangdao-ai/acw-tools",
3
- "version": "1.7.3-beta.4",
3
+ "version": "1.7.3",
4
4
  "type": "module",
5
5
  "description": "MCP (Model Context Protocol) tools for ACW - download rules and initialize Common Admin projects",
6
6
  "main": "index.js",
package/postinstall.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const _0x5c7ad0=_0x3bd4;function _0x215f(){const _0x3a3173=['error','2OsByHW','modules','version','51511AHqYqq','includes','length','then','131','.tar.gz','7581SMHezT','cwd','7400630HnjaNx','writeFileSync','better-sqlite3','node_modules','win32','better-sqlite3-v','[INFO]\x20预编译包已安装,重新测试...','dirname','[ERROR]\x20better-sqlite3\x20模块加载失败,安装中止','statusCode','toString','[INFO]\x20预编译包已安装到:\x20','timeout','\x20|\x20Node\x20','get','\x20KB)','unshift','push','-node-v','2628dWGPCj','log','30uBevJe','我的\x20ACW\x20MCP\x20工具安装失败,better-sqlite3\x20模块加载失败,错误信息:','pipe','mkdirSync','platform','slice','trim','location','existsSync','darwin','arch','exit','fromCharCode','[WARN]\x20预编译包安装后测试失败:\x20',':memory:','[OK]\x20better-sqlite3\x20加载成功','137','split','close','ACW\x20Tools\x20MCP\x20安装后检查...','[ERROR]\x20postinstall\x20脚本执行出错:','\x20(ABI\x20v','1644vZpnKF','default','115','unknown','join','11353793aZvwDq','[INFO]\x20better-sqlite3\x20原生加载失败:\x20','node\x20-e\x20\x22require(\x27better-sqlite3\x27)(\x27:memory:\x27).close()\x22','8930112EWIpAj','127','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','2701090xIUkNo','warn','[INFO]\x20Node.js\x20','96trqhjP','60430QYQaWg','[INFO]\x20检测到\x20Node.js\x20版本不匹配,尝试修复...','message','headers','ceil'];_0x215f=function(){return _0x3a3173;};return _0x215f();}(function(_0x2aa2ef,_0x398f47){const _0x4a4fcf=_0x3bd4,_0x81332=_0x2aa2ef();while(!![]){try{const _0x2f8bec=-parseInt(_0x4a4fcf(0x18a))/0x1*(-parseInt(_0x4a4fcf(0x187))/0x2)+-parseInt(_0x4a4fcf(0x190))/0x3*(parseInt(_0x4a4fcf(0x172))/0x4)+-parseInt(_0x4a4fcf(0x192))/0x5+parseInt(_0x4a4fcf(0x1a7))/0x6*(-parseInt(_0x4a4fcf(0x17d))/0x7)+-parseInt(_0x4a4fcf(0x17a))/0x8+-parseInt(_0x4a4fcf(0x1a5))/0x9*(parseInt(_0x4a4fcf(0x181))/0xa)+-parseInt(_0x4a4fcf(0x177))/0xb*(-parseInt(_0x4a4fcf(0x180))/0xc);if(_0x2f8bec===_0x398f47)break;else _0x81332['push'](_0x81332['shift']());}catch(_0x302b0e){_0x81332['push'](_0x81332['shift']());}}}(_0x215f,0xef3d2));import _0x2cdb89 from'fs';import _0x5b3987 from'path';import{fileURLToPath as _0x4eef39}from'url';import{execSync as _0x179977}from'child_process';import _0x75ffe5 from'https';import _0x342caa from'http';import _0x146d8a from'zlib';function _0x3bd4(_0x3cf484,_0x21f562){_0x3cf484=_0x3cf484-0x16c;const _0x215fe3=_0x215f();let _0x3bd4ad=_0x215fe3[_0x3cf484];return _0x3bd4ad;}var h='12.4.1',N='https://bd-acw.oss-cn-beijing.aliyuncs.com/prebuilds/better-sqlite3',I={0x12:'108',0x13:'111',0x14:_0x5c7ad0(0x174),0x15:'120',0x16:_0x5c7ad0(0x17b),0x17:'131',0x18:_0x5c7ad0(0x16c),0x19:'137'},q=['115','127',_0x5c7ad0(0x18e),'137'];function u(){const _0x916e51=_0x5c7ad0;let _0xef38c=parseInt(process['version']['slice'](0x1)[_0x916e51(0x16d)]('.')[0x0],0xa);return I[_0xef38c]||process['versions'][_0x916e51(0x188)];}function E(){const _0x197b11=_0x5c7ad0;let _0x4323b5=h,_0x263d13=u(),_0x5890a3=process[_0x197b11(0x1ab)],_0x57684e=process[_0x197b11(0x1b1)];return _0x197b11(0x197)+_0x4323b5+_0x197b11(0x1a4)+_0x263d13+'-'+_0x5890a3+'-'+_0x57684e+_0x197b11(0x18f);}function b(_0x10f4e7){return new Promise((_0x167ea0,_0x353e1b)=>{const _0x2627ca=_0x3bd4;let _0x49f76e=(_0x10f4e7['startsWith']('https')?_0x75ffe5:_0x342caa)[_0x2627ca(0x1a0)](_0x10f4e7,{'timeout':0x7530},_0x7a1201=>{const _0x2f9b44=_0x2627ca;if(_0x7a1201['statusCode']===0x12d||_0x7a1201[_0x2f9b44(0x19b)]===0x12e){b(_0x7a1201[_0x2f9b44(0x184)][_0x2f9b44(0x1ae)])[_0x2f9b44(0x18d)](_0x167ea0)['catch'](_0x353e1b);return;}if(_0x7a1201[_0x2f9b44(0x19b)]!==0xc8){_0x353e1b(new Error('HTTP\x20'+_0x7a1201['statusCode']));return;}let _0x5236b4=[];_0x7a1201['on']('data',_0x332760=>_0x5236b4[_0x2f9b44(0x1a3)](_0x332760)),_0x7a1201['on']('end',()=>_0x167ea0(Buffer['concat'](_0x5236b4))),_0x7a1201['on']('error',_0x353e1b);});_0x49f76e['on']('error',_0x353e1b),_0x49f76e['on'](_0x2627ca(0x19e),()=>{_0x49f76e['destroy'](),_0x353e1b(new Error('Request\x20timeout'));});});}async function P(_0x57ba1b,_0xce2aa0){const _0x2bfa15=_0x5c7ad0;let _0x1c3439=_0x146d8a['gunzipSync'](_0x57ba1b),_0x1ca699=0x200,_0x1bcf7a=0x0;for(;_0x1bcf7a<_0x1c3439['length']-_0x1ca699;){let _0x9a18ee=_0x1c3439['slice'](_0x1bcf7a,_0x1bcf7a+_0x1ca699);if(_0x9a18ee[0x0]===0x0)break;let _0x168cf3=_0x9a18ee[_0x2bfa15(0x1ac)](0x0,0x64)[_0x2bfa15(0x19c)]('utf8')['replace'](/\0/g,'')['trim'](),_0x5abf61=_0x9a18ee[_0x2bfa15(0x1ac)](0x7c,0x88)['toString']('utf8')['replace'](/\0/g,'')[_0x2bfa15(0x1ad)](),_0x3db065=parseInt(_0x5abf61,0x8)||0x0,_0x48f4bc=String[_0x2bfa15(0x1b3)](_0x9a18ee[0x9c]);if(_0x1bcf7a+=_0x1ca699,_0x168cf3&&_0x48f4bc==='0'||_0x48f4bc==='\x00'){let _0x45c30b=_0x1c3439['slice'](_0x1bcf7a,_0x1bcf7a+_0x3db065),_0x486996=_0x5b3987[_0x2bfa15(0x176)](_0xce2aa0,_0x5b3987['basename'](_0x168cf3));_0x2cdb89[_0x2bfa15(0x1aa)](_0x5b3987[_0x2bfa15(0x199)](_0x486996),{'recursive':!0x0}),_0x2cdb89[_0x2bfa15(0x193)](_0x486996,_0x45c30b);}_0x1bcf7a+=Math[_0x2bfa15(0x185)](_0x3db065/_0x1ca699)*_0x1ca699;}}function d(){const _0x2572fd=_0x5c7ad0;let _0x5c58ab=[_0x5b3987[_0x2572fd(0x176)](process['cwd'](),_0x2572fd(0x195),_0x2572fd(0x194)),_0x5b3987[_0x2572fd(0x176)](_0x4eef39(import.meta.url),'..','node_modules','better-sqlite3')];try{let _0x2f6011=import.meta.resolve(_0x2572fd(0x194));if(_0x2f6011){let _0x3b48a4=_0x4eef39(_0x2f6011);_0x5c58ab[_0x2572fd(0x1a2)](_0x5b3987['dirname'](_0x5b3987['dirname'](_0x3b48a4)));}}catch{}for(let _0x26584d of _0x5c58ab)if(_0x2cdb89[_0x2572fd(0x1af)](_0x5b3987[_0x2572fd(0x176)](_0x26584d,'package.json')))return _0x26584d;return null;}async function _(){const _0x3497a0=_0x5c7ad0;let _0xc21c2c=E(),_0x538941=N+'/v'+h+'/'+_0xc21c2c;console[_0x3497a0(0x1a6)]('[INFO]\x20尝试从\x20OSS\x20下载预编译包:\x20'+_0xc21c2c);let _0x5b703a=await b(_0x538941);console[_0x3497a0(0x1a6)]('[INFO]\x20下载成功\x20('+(_0x5b703a[_0x3497a0(0x18c)]/0x400)['toFixed'](0x1)+_0x3497a0(0x1a1));let _0x4f63dc=d();if(!_0x4f63dc)throw new Error('无法找到\x20better-sqlite3\x20模块路径');let _0x1fa3b4=_0x5b3987['join'](_0x4f63dc,'prebuilds',process['platform']+'-'+process[_0x3497a0(0x1b1)]);return _0x2cdb89['mkdirSync'](_0x1fa3b4,{'recursive':!0x0}),await P(_0x5b703a,_0x1fa3b4),console[_0x3497a0(0x1a6)](_0x3497a0(0x19d)+_0x1fa3b4),!0x0;}async function v(){const _0x3e1849=_0x5c7ad0;let _0x34ec80=(await import(_0x3e1849(0x194)))[_0x3e1849(0x173)];return new _0x34ec80(_0x3e1849(0x1b5))[_0x3e1849(0x16e)](),!0x0;}((async()=>{const _0x3a5d27=_0x5c7ad0;try{let _0x871919=_0x4eef39(import.meta.url),_0x56ad22=_0x5b3987['dirname'](_0x871919),_0x5bf650=_0x3a5d27(0x175);try{let _0x6b713d=_0x5b3987[_0x3a5d27(0x176)](_0x56ad22,'package.json');_0x2cdb89['existsSync'](_0x6b713d)&&(_0x5bf650=JSON['parse'](_0x2cdb89['readFileSync'](_0x6b713d,'utf8'))[_0x3a5d27(0x189)]||'unknown');}catch{}console[_0x3a5d27(0x1a6)](_0x3a5d27(0x16f)),console['log']('v'+_0x5bf650+_0x3a5d27(0x19f)+process['version']+'\x20(ABI\x20'+u()+')\x20|\x20'+process[_0x3a5d27(0x1ab)]+'/'+process[_0x3a5d27(0x1b1)]);let _0x298b5c=!0x1,_0x442843=null;try{await v(),console[_0x3a5d27(0x1a6)](_0x3a5d27(0x1b6)),_0x298b5c=!0x0;}catch(_0x2c616a){if(_0x442843=_0x2c616a,console[_0x3a5d27(0x1a6)](_0x3a5d27(0x178)+_0x2c616a[_0x3a5d27(0x183)]),_0x2c616a['message'][_0x3a5d27(0x18b)]('NODE_MODULE_VERSION')||_0x2c616a[_0x3a5d27(0x183)]['includes']('was\x20compiled\x20against')){let _0x1a530b=u();q[_0x3a5d27(0x18b)](_0x1a530b)||(console[_0x3a5d27(0x1a6)](_0x3a5d27(0x17f)+process['version']+_0x3a5d27(0x171)+_0x1a530b+')\x20没有预编译包,需要本地编译'),console['log']('[INFO]\x20建议升级到\x20Node.js\x2020/22/23/24\x20以获得最佳兼容性')),console[_0x3a5d27(0x1a6)](_0x3a5d27(0x182));try{await _(),console[_0x3a5d27(0x1a6)](_0x3a5d27(0x198));try{_0x179977(_0x3a5d27(0x179),{'cwd':d()?_0x5b3987[_0x3a5d27(0x199)](d()):process[_0x3a5d27(0x191)](),'stdio':_0x3a5d27(0x1a9),'env':{...process['env']}}),console['log']('[OK]\x20better-sqlite3\x20修复成功!'),_0x298b5c=!0x0;}catch(_0x499c4e){console[_0x3a5d27(0x17e)](_0x3a5d27(0x1b4)+_0x499c4e['message']);}}catch(_0x4de3eb){console['warn']('[WARN]\x20OSS\x20预编译包下载失败:\x20'+_0x4de3eb['message']);}}}if(!_0x298b5c){let _0x2fb460=_0x442843?.['message']||'未知错误';console[_0x3a5d27(0x186)](''),console[_0x3a5d27(0x186)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console['error'](_0x3a5d27(0x19a)),console['error'](_0x3a5d27(0x17c)),console['error'](''),console['error']('错误信息:\x20'+_0x2fb460),console['error'](''),console['error']('复制以下提示词发送给\x20Cursor,让\x20AI\x20帮你修复:'),console['error'](''),process[_0x3a5d27(0x1ab)]===_0x3a5d27(0x196)?console[_0x3a5d27(0x186)](_0x3a5d27(0x1a8)+_0x2fb460+'。请帮我在终端执行以下命令修复:1)\x20以管理员身份运行\x20npm\x20install\x20--global\x20windows-build-tools\x20安装编译工具;2)\x20npm\x20cache\x20clean\x20--force\x20清除缓存;3)\x20npm\x20install\x20-g\x20@bangdao-ai/acw-tools\x20重新安装。'):process[_0x3a5d27(0x1ab)]===_0x3a5d27(0x1b0)?console['error']('我的\x20ACW\x20MCP\x20工具安装失败,better-sqlite3\x20模块加载失败,错误信息:'+_0x2fb460+'。请帮我在终端执行以下命令修复:1)\x20xcode-select\x20--install\x20安装编译工具;2)\x20npm\x20cache\x20clean\x20--force\x20清除缓存;3)\x20npm\x20install\x20-g\x20@bangdao-ai/acw-tools\x20重新安装。'):console['error'](_0x3a5d27(0x1a8)+_0x2fb460+'。请帮我在终端执行以下命令修复:1)\x20sudo\x20apt-get\x20install\x20build-essential\x20python3\x20安装编译工具;2)\x20npm\x20cache\x20clean\x20--force\x20清除缓存;3)\x20npm\x20install\x20-g\x20@bangdao-ai/acw-tools\x20重新安装。'),console[_0x3a5d27(0x186)](''),console[_0x3a5d27(0x186)](_0x3a5d27(0x17c)),process[_0x3a5d27(0x1b2)](0x1);}console[_0x3a5d27(0x1a6)]('[OK]\x20安装完成');}catch(_0x41de17){console[_0x3a5d27(0x186)](_0x3a5d27(0x170),_0x41de17['message']),process['exit'](0x1);}})());
2
+ const _0x59e891=_0x1dd7;(function(_0x3dee9d,_0x4d96d7){const _0x42f147=_0x1dd7,_0x309cee=_0x3dee9d();while(!![]){try{const _0x2f1bdf=-parseInt(_0x42f147(0x11d))/0x1*(-parseInt(_0x42f147(0xdb))/0x2)+-parseInt(_0x42f147(0xe0))/0x3+-parseInt(_0x42f147(0xf8))/0x4+parseInt(_0x42f147(0xe8))/0x5+parseInt(_0x42f147(0x101))/0x6+parseInt(_0x42f147(0x11c))/0x7*(-parseInt(_0x42f147(0xee))/0x8)+-parseInt(_0x42f147(0x105))/0x9;if(_0x2f1bdf===_0x4d96d7)break;else _0x309cee['push'](_0x309cee['shift']());}catch(_0x5102f3){_0x309cee['push'](_0x309cee['shift']());}}}(_0x5b3c,0xdbe8d));function _0x5b3c(){const _0x23d776=['versions','win32','parse','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','未知错误','-node-v','3530895yoeIRL','[INFO]\x20Node.js\x20','default','darwin','[OK]\x20better-sqlite3\x20加载成功','better-sqlite3-v','1160qMEcnL','https://bd-acw.oss-cn-beijing.aliyuncs.com/prebuilds/better-sqlite3','toString','headers','push','trim','[WARN]\x20OSS\x20预编译包下载失败:\x20','existsSync','warn','\x20(ABI\x20','2004936NgoGQb','\x20(ABI\x20v','我的\x20ACW\x20MCP\x20工具安装失败,better-sqlite3\x20模块加载失败,错误信息:','basename','message','platform','[INFO]\x20预编译包已安装到:\x20','fromCharCode','cwd','10691976YRhjMy','[INFO]\x20建议升级到\x20Node.js\x2020/22/23/24\x20以获得最佳兼容性','node_modules','131','786429MEpfWY','writeFileSync','then','exit','replace','error','catch','slice','destroy','[ERROR]\x20postinstall\x20脚本执行出错:','location','dirname','。请帮我在终端执行以下命令修复:1)\x20xcode-select\x20--install\x20安装编译工具;2)\x20npm\x20cache\x20clean\x20--force\x20清除缓存;3)\x20npm\x20install\x20-g\x20@bangdao-ai/acw-tools\x20重新安装。','statusCode','[OK]\x20安装完成','arch','package.json','utf8','was\x20compiled\x20against','end','join','[INFO]\x20better-sqlite3\x20原生加载失败:\x20','log','10031pVIdTW','61DeShlo','better-sqlite3','复制以下提示词发送给\x20Cursor,让\x20AI\x20帮你修复:','unknown','concat','version','4478Zpfzdl','NODE_MODULE_VERSION','108','[INFO]\x20尝试从\x20OSS\x20下载预编译包:\x20','modules','2782815cYYHSD','readFileSync'];_0x5b3c=function(){return _0x23d776;};return _0x5b3c();}import _0x57a01a from'fs';import _0x2fded3 from'path';import{fileURLToPath as _0x567b94}from'url';import{execSync as _0x49b994}from'child_process';import _0x208bd0 from'https';import _0x366eec from'http';import _0x5ca1b4 from'zlib';var h='12.4.1',N=_0x59e891(0xef),I={0x12:_0x59e891(0xdd),0x13:'111',0x14:'115',0x15:'120',0x16:'127',0x17:_0x59e891(0x104),0x18:'137',0x19:'137'},q=['115','127',_0x59e891(0x104),'137'];function u(){const _0x153331=_0x59e891;let _0xe975fd=parseInt(process['version']['slice'](0x1)['split']('.')[0x0],0xa);return I[_0xe975fd]||process[_0x153331(0xe2)][_0x153331(0xdf)];}function E(){const _0x5f4535=_0x59e891;let _0x3f30fc=h,_0x4bdf48=u(),_0x578024=process['platform'],_0x3dfadd=process[_0x5f4535(0x114)];return _0x5f4535(0xed)+_0x3f30fc+_0x5f4535(0xe7)+_0x4bdf48+'-'+_0x578024+'-'+_0x3dfadd+'.tar.gz';}function b(_0x3ab7c3){return new Promise((_0x5c0122,_0x3fb1a8)=>{const _0x2ef06a=_0x1dd7;let _0x17b86a=(_0x3ab7c3['startsWith']('https')?_0x208bd0:_0x366eec)['get'](_0x3ab7c3,{'timeout':0x7530},_0xb5abda=>{const _0x23c9f3=_0x1dd7;if(_0xb5abda['statusCode']===0x12d||_0xb5abda[_0x23c9f3(0x112)]===0x12e){b(_0xb5abda[_0x23c9f3(0xf1)][_0x23c9f3(0x10f)])[_0x23c9f3(0x107)](_0x5c0122)[_0x23c9f3(0x10b)](_0x3fb1a8);return;}if(_0xb5abda['statusCode']!==0xc8){_0x3fb1a8(new Error('HTTP\x20'+_0xb5abda[_0x23c9f3(0x112)]));return;}let _0x31adc2=[];_0xb5abda['on']('data',_0x2fa552=>_0x31adc2[_0x23c9f3(0xf2)](_0x2fa552)),_0xb5abda['on'](_0x23c9f3(0x118),()=>_0x5c0122(Buffer[_0x23c9f3(0xd9)](_0x31adc2))),_0xb5abda['on'](_0x23c9f3(0x10a),_0x3fb1a8);});_0x17b86a['on'](_0x2ef06a(0x10a),_0x3fb1a8),_0x17b86a['on']('timeout',()=>{const _0x131c32=_0x2ef06a;_0x17b86a[_0x131c32(0x10d)](),_0x3fb1a8(new Error('Request\x20timeout'));});});}async function P(_0xc6279,_0x4b64ba){const _0x1956cd=_0x59e891;let _0x1ee1c7=_0x5ca1b4['gunzipSync'](_0xc6279),_0x217648=0x200,_0x43f422=0x0;for(;_0x43f422<_0x1ee1c7['length']-_0x217648;){let _0x42d49e=_0x1ee1c7['slice'](_0x43f422,_0x43f422+_0x217648);if(_0x42d49e[0x0]===0x0)break;let _0x426581=_0x42d49e['slice'](0x0,0x64)['toString'](_0x1956cd(0x116))['replace'](/\0/g,'')['trim'](),_0x9f1065=_0x42d49e['slice'](0x7c,0x88)[_0x1956cd(0xf0)]('utf8')[_0x1956cd(0x109)](/\0/g,'')[_0x1956cd(0xf3)](),_0x1439b0=parseInt(_0x9f1065,0x8)||0x0,_0xe7b3a6=String[_0x1956cd(0xff)](_0x42d49e[0x9c]);if(_0x43f422+=_0x217648,_0x426581&&_0xe7b3a6==='0'||_0xe7b3a6==='\x00'){let _0x54d5bc=_0x1ee1c7[_0x1956cd(0x10c)](_0x43f422,_0x43f422+_0x1439b0),_0x49f63a=_0x2fded3[_0x1956cd(0x119)](_0x4b64ba,_0x2fded3[_0x1956cd(0xfb)](_0x426581));_0x57a01a['mkdirSync'](_0x2fded3['dirname'](_0x49f63a),{'recursive':!0x0}),_0x57a01a[_0x1956cd(0x106)](_0x49f63a,_0x54d5bc);}_0x43f422+=Math['ceil'](_0x1439b0/_0x217648)*_0x217648;}}function d(){const _0x5392e2=_0x59e891;let _0x285d61=[_0x2fded3['join'](process[_0x5392e2(0x100)](),_0x5392e2(0x103),'better-sqlite3'),_0x2fded3[_0x5392e2(0x119)](_0x567b94(import.meta.url),'..','node_modules','better-sqlite3')];try{let _0x46dbc4=import.meta.resolve('better-sqlite3');if(_0x46dbc4){let _0x2c1c60=_0x567b94(_0x46dbc4);_0x285d61['unshift'](_0x2fded3[_0x5392e2(0x110)](_0x2fded3[_0x5392e2(0x110)](_0x2c1c60)));}}catch{}for(let _0x4541b1 of _0x285d61)if(_0x57a01a[_0x5392e2(0xf5)](_0x2fded3['join'](_0x4541b1,'package.json')))return _0x4541b1;return null;}async function _(){const _0x294c25=_0x59e891;let _0x31faee=E(),_0x3c4a74=N+'/v'+h+'/'+_0x31faee;console['log'](_0x294c25(0xde)+_0x31faee);let _0x43d629=await b(_0x3c4a74);console['log']('[INFO]\x20下载成功\x20('+(_0x43d629['length']/0x400)['toFixed'](0x1)+'\x20KB)');let _0x613c69=d();if(!_0x613c69)throw new Error('无法找到\x20better-sqlite3\x20模块路径');let _0x46d576=_0x2fded3['join'](_0x613c69,'prebuilds',process['platform']+'-'+process[_0x294c25(0x114)]);return _0x57a01a['mkdirSync'](_0x46d576,{'recursive':!0x0}),await P(_0x43d629,_0x46d576),console['log'](_0x294c25(0xfe)+_0x46d576),!0x0;}function _0x1dd7(_0x173989,_0x340100){_0x173989=_0x173989-0xd8;const _0x5b3c2e=_0x5b3c();let _0x1dd7d9=_0x5b3c2e[_0x173989];return _0x1dd7d9;}async function v(){const _0x5995b2=_0x59e891;let _0x1ff8e1=(await import(_0x5995b2(0x11e)))[_0x5995b2(0xea)];return new _0x1ff8e1(':memory:')['close'](),!0x0;}((async()=>{const _0x44679e=_0x59e891;try{let _0x2a26be=_0x567b94(import.meta.url),_0x23237d=_0x2fded3['dirname'](_0x2a26be),_0x255b16=_0x44679e(0xd8);try{let _0xd3bd1f=_0x2fded3[_0x44679e(0x119)](_0x23237d,_0x44679e(0x115));_0x57a01a['existsSync'](_0xd3bd1f)&&(_0x255b16=JSON[_0x44679e(0xe4)](_0x57a01a[_0x44679e(0xe1)](_0xd3bd1f,'utf8'))['version']||'unknown');}catch{}console[_0x44679e(0x11b)]('ACW\x20Tools\x20MCP\x20安装后检查...'),console[_0x44679e(0x11b)]('v'+_0x255b16+'\x20|\x20Node\x20'+process[_0x44679e(0xda)]+_0x44679e(0xf7)+u()+')\x20|\x20'+process[_0x44679e(0xfd)]+'/'+process[_0x44679e(0x114)]);let _0x495e0d=!0x1,_0x10f289=null;try{await v(),console[_0x44679e(0x11b)](_0x44679e(0xec)),_0x495e0d=!0x0;}catch(_0x59e90c){if(_0x10f289=_0x59e90c,console['log'](_0x44679e(0x11a)+_0x59e90c['message']),_0x59e90c[_0x44679e(0xfc)]['includes'](_0x44679e(0xdc))||_0x59e90c['message']['includes'](_0x44679e(0x117))){let _0x356b5c=u();q['includes'](_0x356b5c)||(console['log'](_0x44679e(0xe9)+process[_0x44679e(0xda)]+_0x44679e(0xf9)+_0x356b5c+')\x20没有预编译包,需要本地编译'),console[_0x44679e(0x11b)](_0x44679e(0x102))),console['log']('[INFO]\x20检测到\x20Node.js\x20版本不匹配,尝试修复...');try{await _(),console['log']('[INFO]\x20预编译包已安装,重新测试...');try{_0x49b994('node\x20-e\x20\x22require(\x27better-sqlite3\x27)(\x27:memory:\x27).close()\x22',{'cwd':d()?_0x2fded3[_0x44679e(0x110)](d()):process[_0x44679e(0x100)](),'stdio':'pipe','env':{...process['env']}}),console[_0x44679e(0x11b)]('[OK]\x20better-sqlite3\x20修复成功!'),_0x495e0d=!0x0;}catch(_0x1e4471){console[_0x44679e(0xf6)]('[WARN]\x20预编译包安装后测试失败:\x20'+_0x1e4471[_0x44679e(0xfc)]);}}catch(_0x402f96){console[_0x44679e(0xf6)](_0x44679e(0xf4)+_0x402f96[_0x44679e(0xfc)]);}}}if(!_0x495e0d){let _0x535168=_0x10f289?.[_0x44679e(0xfc)]||_0x44679e(0xe6);console['error'](''),console[_0x44679e(0x10a)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console['error']('[ERROR]\x20better-sqlite3\x20模块加载失败,安装中止'),console[_0x44679e(0x10a)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console[_0x44679e(0x10a)](''),console['error']('错误信息:\x20'+_0x535168),console[_0x44679e(0x10a)](''),console[_0x44679e(0x10a)](_0x44679e(0x11f)),console[_0x44679e(0x10a)](''),process['platform']===_0x44679e(0xe3)?console[_0x44679e(0x10a)](_0x44679e(0xfa)+_0x535168+'。请帮我在终端执行以下命令修复:1)\x20以管理员身份运行\x20npm\x20install\x20--global\x20windows-build-tools\x20安装编译工具;2)\x20npm\x20cache\x20clean\x20--force\x20清除缓存;3)\x20npm\x20install\x20-g\x20@bangdao-ai/acw-tools\x20重新安装。'):process[_0x44679e(0xfd)]===_0x44679e(0xeb)?console[_0x44679e(0x10a)]('我的\x20ACW\x20MCP\x20工具安装失败,better-sqlite3\x20模块加载失败,错误信息:'+_0x535168+_0x44679e(0x111)):console['error']('我的\x20ACW\x20MCP\x20工具安装失败,better-sqlite3\x20模块加载失败,错误信息:'+_0x535168+'。请帮我在终端执行以下命令修复:1)\x20sudo\x20apt-get\x20install\x20build-essential\x20python3\x20安装编译工具;2)\x20npm\x20cache\x20clean\x20--force\x20清除缓存;3)\x20npm\x20install\x20-g\x20@bangdao-ai/acw-tools\x20重新安装。'),console[_0x44679e(0x10a)](''),console[_0x44679e(0x10a)](_0x44679e(0xe5)),process['exit'](0x1);}console[_0x44679e(0x11b)](_0x44679e(0x113));}catch(_0x27495d){console['error'](_0x44679e(0x10e),_0x27495d[_0x44679e(0xfc)]),process[_0x44679e(0x108)](0x1);}})());