fix: 品牌保护+知识库全量覆盖 - 6层防御解决传销问题 + 30+产品关键词补全
This commit is contained in:
24
mcp-server-ssh/check_kb_env.cjs
Normal file
24
mcp-server-ssh/check_kb_env.cjs
Normal file
@@ -0,0 +1,24 @@
|
||||
const { Client } = require('ssh2');
|
||||
const c = new Client();
|
||||
c.on('ready', () => {
|
||||
const cmd = [
|
||||
"echo '=== ENV KB CONFIG ==='",
|
||||
"grep -E 'VOLC_ARK_ENDPOINT_ID|VOLC_ARK_KNOWLEDGE|VOLC_ARK_API_KEY|VOLC_ACCESS_KEY' /www/wwwroot/demo.tensorgrove.com.cn/server/.env | sed 's/=.\\{8\\}/=***REDACTED/g'",
|
||||
"echo ''",
|
||||
"echo '=== RECENT KB LOGS (last 500 lines) ==='",
|
||||
"tail -500 /var/log/bigwo/server-out.log | grep -E 'ToolExecutor|searchKnowledge|Ark KB|knowledge|processReply start|processReply handoff|external_rag|tts_reset|blockUpstream|unblock|barge-in|upstream assistant|upstream final|upstream partial'",
|
||||
"echo ''",
|
||||
"echo '=== RECENT ERROR LOGS ==='",
|
||||
"tail -100 /var/log/bigwo/server-error.log 2>/dev/null | grep -E 'ToolExecutor|Ark|knowledge|timeout|quota' | tail -20",
|
||||
"echo ''",
|
||||
"echo '=== PM2 STATUS ==='",
|
||||
"pm2 list 2>/dev/null || echo 'pm2 not found'",
|
||||
].join(' && ');
|
||||
c.exec(cmd, (err, s) => {
|
||||
if (err) { console.error(err); c.end(); return; }
|
||||
let o = '';
|
||||
s.on('data', (d) => (o += d));
|
||||
s.stderr.on('data', (d) => (o += d));
|
||||
s.on('close', () => { console.log(o); c.end(); });
|
||||
});
|
||||
}).connect({ host: '119.45.10.34', port: 22, username: 'root', password: '#xyzh%CS#2512@28' });
|
||||
Reference in New Issue
Block a user