auto-sync: 2026-04-05 17:32:06

This commit is contained in:
cfdaily
2026-04-05 17:32:06 +08:00
parent f2fe17a075
commit 5031c36ef0
82 changed files with 2238 additions and 57 deletions
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env node
/**
* Sanguo Mail 系统健康检查脚本
* 定期检查系统状态,确保邮件功能正常
*/
import { SanguoMailbox } from '../sanguo_mail/src/index.js';
import { join } from 'path';
const CONFIG = {
rootPath: '/Users/chufeng/.openclaw/sanguo_projects/sanguo_quant_live',
teamName: 'sanguo-quant',
};
async function checkSystem() {
console.log('[Health Check] 开始系统健康检查...');
try {
const mail = new SanguoMailbox(CONFIG);
// 检查团队配置
const team = await mail.initTeam();
console.log(`[Health Check] 团队配置正常: ${team.teamName}`);
// 检查成员列表
if (team.members.length === 0) {
console.error('[Health Check] 错误: 团队成员为空');
return 1;
}
console.log(`[Health Check] 成员数量: ${team.members.length}`);
// 检查邮件功能
const myInbox = await mail.listUnread('jiangwei');
console.log(`[Health Check] 收件箱: ${myInbox.length} 条未读消息`);
console.log('[Health Check] 系统健康检查完成');
return 0;
} catch (error) {
console.error('[Health Check] 系统健康检查失败:', error.message);
return 1;
}
}
checkSystem().then(process.exit);