refactor: centralize EJClaw runtime env names (#192)

This commit is contained in:
Eyejoker
2026-05-29 22:00:15 +09:00
committed by GitHub
parent e876a509a5
commit fb87e94c5a
11 changed files with 100 additions and 70 deletions

View File

@@ -0,0 +1,16 @@
export const EJCLAW_ENV = {
agentType: 'EJCLAW_AGENT_TYPE',
chatJid: 'EJCLAW_CHAT_JID',
globalDir: 'EJCLAW_GLOBAL_DIR',
groupDir: 'EJCLAW_GROUP_DIR',
groupFolder: 'EJCLAW_GROUP_FOLDER',
hostIpcDir: 'EJCLAW_HOST_IPC_DIR',
ipcDir: 'EJCLAW_IPC_DIR',
isMain: 'EJCLAW_IS_MAIN',
roomRole: 'EJCLAW_ROOM_ROLE',
runId: 'EJCLAW_RUN_ID',
runtimeTaskId: 'EJCLAW_RUNTIME_TASK_ID',
workDir: 'EJCLAW_WORK_DIR',
} as const;
export type EjclawEnvName = (typeof EJCLAW_ENV)[keyof typeof EJCLAW_ENV];

View File

@@ -2,6 +2,7 @@ export {
prependRoomRoleHeader,
type RoomRoleContext,
} from './room-role-context.js';
export { EJCLAW_ENV, type EjclawEnvName } from './ejclaw-env.js';
export {
extractMarkdownImageAttachments,
extractMediaAttachments,