主要修复: 1. 使用飞书 SDK im.messageResource.get API 下载文件(和 OpenClaw 一致) 2. 修复 sendMessage 方法,自动判断 receive_id_type(oc_=chat_id, ou_=open_id) 3. 修复 sendCard 方法,传递正确的 receive_id_type 参数 4. 修复事件类型识别,支持飞书 v2 schema(header.event_type) 5. 添加临时文件清理机制(每小时清理 1 小时前的文件) 6. 完善卡片交互(确认上传/取消按钮) 7. 完善错误处理和日志记录 功能: - ✅ 飞书文件接收和卡片回复 - ✅ 卡片交互(确认/取消) - ✅ 七牛云上传(支持多存储桶) - ✅ CDN 自动刷新 - ✅ 临时文件自动清理 - ✅ 配置管理命令(/config) 配置文件: - config/qiniu-config.json - 七牛云配置 - .env - 飞书应用配置
19 lines
380 B
JavaScript
19 lines
380 B
JavaScript
module.exports = {
|
|
apps: [{
|
|
name: 'qiniu-bot',
|
|
script: './src/index.js',
|
|
instances: 1,
|
|
autorestart: true,
|
|
watch: false,
|
|
max_memory_restart: '500M',
|
|
env: {
|
|
NODE_ENV: 'production',
|
|
PORT: 3030
|
|
},
|
|
error_file: './logs/error.log',
|
|
out_file: './logs/out.log',
|
|
log_date_format: 'YYYY-MM-DD HH:mm:ss',
|
|
merge_logs: true
|
|
}]
|
|
};
|