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:
@@ -215,11 +215,7 @@ export async function runReviewerContainer(args: {
|
||||
const containerName = `ejclaw-reviewer-${group.folder}-${Date.now()}`;
|
||||
|
||||
const mounts = buildReviewerMounts(group, ownerWorkspaceDir);
|
||||
const containerArgs = buildContainerArgs(
|
||||
mounts,
|
||||
containerName,
|
||||
envOverrides,
|
||||
);
|
||||
const containerArgs = buildContainerArgs(mounts, containerName, envOverrides);
|
||||
|
||||
logger.info(
|
||||
{
|
||||
@@ -275,9 +271,7 @@ export async function runReviewerContainer(args: {
|
||||
|
||||
// Parse streamed output markers
|
||||
let startIdx: number;
|
||||
while (
|
||||
(startIdx = parseBuffer.indexOf(OUTPUT_START_MARKER)) !== -1
|
||||
) {
|
||||
while ((startIdx = parseBuffer.indexOf(OUTPUT_START_MARKER)) !== -1) {
|
||||
const endIdx = parseBuffer.indexOf(OUTPUT_END_MARKER, startIdx);
|
||||
if (endIdx === -1) break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user