feat: unify 3 bot services into single process
- Add UNIFIED_MODE flag (default on, disable with UNIFIED_MODE=0) - Register all 3 Discord bots in one process (claude, codex, review) - Load all registered groups regardless of agent_type (codex/owner priority) - Start credential proxy and container cleanup at unified startup - shouldServiceProcessChat returns true in unified mode - Add findChannelByName for role-based response routing - Backward compatible: UNIFIED_MODE=0 restores per-service behavior
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
CODEX_REVIEW_SERVICE_ID,
|
||||
SERVICE_AGENT_TYPE,
|
||||
SERVICE_ID,
|
||||
UNIFIED_MODE,
|
||||
normalizeServiceId,
|
||||
} from './config.js';
|
||||
import {
|
||||
@@ -142,6 +143,7 @@ export function shouldServiceProcessChat(
|
||||
chatJid: string,
|
||||
serviceId: string = SERVICE_ID,
|
||||
): boolean {
|
||||
if (UNIFIED_MODE) return true;
|
||||
const normalizedServiceId = normalizeServiceId(serviceId);
|
||||
const lease = getEffectiveChannelLease(chatJid);
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user