Rebrand NanoClaw to EJClaw
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Agent Process Runner for NanoClaw
|
||||
* Agent Process Runner for EJClaw
|
||||
* Spawns agent execution as direct host processes and handles IPC
|
||||
*/
|
||||
import { ChildProcess, spawn } from 'child_process';
|
||||
@@ -200,15 +200,27 @@ function prepareGroupEnvironment(
|
||||
TZ: TIMEZONE,
|
||||
HOME: os.homedir(),
|
||||
// Path configuration for the runner
|
||||
EJCLAW_GROUP_DIR: groupDir,
|
||||
NANOCLAW_GROUP_DIR: groupDir,
|
||||
EJCLAW_IPC_DIR: groupIpcDir,
|
||||
NANOCLAW_IPC_DIR: groupIpcDir,
|
||||
EJCLAW_GLOBAL_DIR: globalDir,
|
||||
NANOCLAW_GLOBAL_DIR: globalDir,
|
||||
EJCLAW_EXTRA_DIR: extraDirs.length > 0 ? extraDirs[0] : '',
|
||||
NANOCLAW_EXTRA_DIR: extraDirs.length > 0 ? extraDirs[0] : '',
|
||||
// Working directory override (agent uses this as cwd instead of group dir)
|
||||
...(group.workDir ? { NANOCLAW_WORK_DIR: group.workDir } : {}),
|
||||
...(group.workDir
|
||||
? {
|
||||
EJCLAW_WORK_DIR: group.workDir,
|
||||
NANOCLAW_WORK_DIR: group.workDir,
|
||||
}
|
||||
: {}),
|
||||
// MCP server context
|
||||
EJCLAW_CHAT_JID: group.folder,
|
||||
NANOCLAW_CHAT_JID: group.folder,
|
||||
EJCLAW_GROUP_FOLDER: group.folder,
|
||||
NANOCLAW_GROUP_FOLDER: group.folder,
|
||||
EJCLAW_IS_MAIN: isMain ? '1' : '0',
|
||||
NANOCLAW_IS_MAIN: isMain ? '1' : '0',
|
||||
// Claude sessions directory — set CLAUDE_CONFIG_DIR so SDK uses per-group sessions
|
||||
CLAUDE_CONFIG_DIR: groupSessionsDir,
|
||||
@@ -373,12 +385,13 @@ export async function runAgentProcess(
|
||||
input.chatJid,
|
||||
);
|
||||
if (input.runId) {
|
||||
env.EJCLAW_RUN_ID = input.runId;
|
||||
env.NANOCLAW_RUN_ID = input.runId;
|
||||
}
|
||||
|
||||
const safeName = group.folder.replace(/[^a-zA-Z0-9-]/g, '-');
|
||||
const processSuffix = input.runId || `${Date.now()}`;
|
||||
const processName = `nanoclaw-${safeName}-${processSuffix}`;
|
||||
const processName = `ejclaw-${safeName}-${processSuffix}`;
|
||||
|
||||
// Check if runner is built
|
||||
const distEntry = path.join(runnerDir, 'dist', 'index.js');
|
||||
|
||||
Reference in New Issue
Block a user