feat: Phase 4 多平台接入 — Platform Bridge + 6平台适配器 + 身份权限系统 (22文件, 2129行)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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'),
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user