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:
@@ -33,10 +33,8 @@ vi.mock('./logger.js', () => ({
|
||||
import * as db from './db.js';
|
||||
import {
|
||||
completePairedExecutionContext,
|
||||
finalizeRoomDeployment,
|
||||
formatRoomReviewReadyMessage,
|
||||
markRoomReviewReady,
|
||||
planPairedExecutionRecovery,
|
||||
preparePairedExecutionContext,
|
||||
} from './paired-execution-context.js';
|
||||
import * as pairedWorkspaceManager from './paired-workspace-manager.js';
|
||||
@@ -130,7 +128,10 @@ async function importExecutionContextForService(serviceId: string) {
|
||||
);
|
||||
|
||||
vi.doMock('./db.js', () => dbModule);
|
||||
vi.doMock('./paired-workspace-manager.js', () => pairedWorkspaceManagerModule);
|
||||
vi.doMock(
|
||||
'./paired-workspace-manager.js',
|
||||
() => pairedWorkspaceManagerModule,
|
||||
);
|
||||
vi.doMock('./logger.js', () => ({
|
||||
logger: {
|
||||
debug: vi.fn(),
|
||||
@@ -473,7 +474,9 @@ describe('paired execution context', () => {
|
||||
created_at: '2026-03-28T00:00:00.000Z',
|
||||
updated_at: '2026-03-28T00:00:00.000Z',
|
||||
});
|
||||
pairedWorkspaceManagerModule.markPairedTaskReviewReady.mockReturnValue(null);
|
||||
pairedWorkspaceManagerModule.markPairedTaskReviewReady.mockReturnValue(
|
||||
null,
|
||||
);
|
||||
|
||||
const result = isolatedMarkRoomReviewReady({
|
||||
group,
|
||||
|
||||
Reference in New Issue
Block a user