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:
@@ -234,23 +234,6 @@ describe('handleSessionCommand', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('handles authorized /deploy-complete without invoking the agent', async () => {
|
||||
const deps = makeDeps();
|
||||
const result = await handleSessionCommand({
|
||||
missedMessages: [makeMsg('/deploy-complete')],
|
||||
isMainGroup: true,
|
||||
groupName: 'test',
|
||||
triggerPattern: trigger,
|
||||
timezone: 'UTC',
|
||||
deps,
|
||||
});
|
||||
expect(result).toEqual({ handled: true, success: true });
|
||||
expect(deps.finalizeDeployment).toHaveBeenCalledTimes(1);
|
||||
expect(deps.runAgent).not.toHaveBeenCalled();
|
||||
expect(deps.advanceCursor).toHaveBeenCalledWith('100');
|
||||
expect(deps.sendMessage).toHaveBeenCalledWith('Deployment finalized.');
|
||||
});
|
||||
|
||||
it('handles authorized /review without invoking the agent', async () => {
|
||||
const deps = makeDeps({
|
||||
markReviewReady: vi
|
||||
|
||||
Reference in New Issue
Block a user