feat: Phase 4 多平台接入 — Platform Bridge + 6平台适配器 + 身份权限系统 (22文件, 2129行)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 16:19:57 +08:00
parent 717ad65b05
commit 965cce7192
22 changed files with 2129 additions and 2 deletions
+33
View File
@@ -155,6 +155,39 @@ export const SERVICES = {
buildArgs: ['build', '-o', isWin ? 'main.exe' : 'main', './cmd/main.go'],
goBin: GO_BIN,
},
'plugin-manager': {
name: '插件管理器',
cwd: path.join(ROOT, 'backend/plugin-manager'),
command: './main',
env: {
PLUGIN_MANAGER_PORT: '8094',
IOT_SERVICE_URL: process.env.IOT_SERVICE_URL || process.env.IOT_DEBUG_SERVICE_URL || 'http://localhost:8083',
},
healthUrl: 'http://localhost:8094/api/v1/health',
port: 8094,
buildCommand: 'go',
buildArgs: ['build', '-o', isWin ? 'main.exe' : 'main', './cmd/main.go'],
goBin: GO_BIN,
},
'platform-bridge': {
name: '多平台桥接',
cwd: path.join(ROOT, 'backend/platform-bridge'),
command: './main',
env: {
PORT: '8095',
AI_CORE_URL: 'http://localhost:8081',
QQ_BOT_PORT: process.env.QQ_BOT_PORT || '8096',
TELEGRAM_BOT_TOKEN: process.env.TELEGRAM_BOT_TOKEN || '',
TELEGRAM_WEBHOOK_URL: process.env.TELEGRAM_WEBHOOK_URL || '',
QQ_ADMIN_UID: process.env.QQ_ADMIN_UID || '',
TELEGRAM_ADMIN_UID: process.env.TELEGRAM_ADMIN_UID || '',
},
healthUrl: 'http://localhost:8095/health',
port: 8095,
buildCommand: 'go',
buildArgs: ['build', '-o', isWin ? 'main.exe' : 'main', './cmd/main.go'],
goBin: GO_BIN,
},
frontend: {
name: 'Frontend',
cwd: path.join(ROOT, 'frontend/web'),
+2 -2
View File
@@ -134,7 +134,7 @@ class ProcessManager extends EventEmitter {
}
// 对需要数据库的服务做前置检查
if (['gateway', 'ai-core', 'memory-service', 'tool-engine'].includes(serviceId)) {
if (['gateway', 'ai-core', 'memory-service', 'tool-engine', 'plugin-manager', 'platform-bridge'].includes(serviceId)) {
this.emit('log', serviceId, 'system', '检查数据库连接状态...');
await ensureDBOnline(serviceId, this);
}
@@ -454,7 +454,7 @@ class ProcessManager extends EventEmitter {
* 每步等待健康检查通过后再启动下一个
*/
async startAllSequential() {
const order = ['memory-service', 'tool-engine', 'iot-debug-service', 'voice-service', 'ai-core', 'gateway', 'frontend'];
const order = ['memory-service', 'tool-engine', 'plugin-manager', 'iot-debug-service', 'voice-service', 'ai-core', 'platform-bridge', 'gateway', 'frontend'];
const results = [];
for (const id of order) {