The deployment has a single Claude OAuth credential and a single Codex ChatGPT account, so the N-account rotation machinery only added state files, cooldown bookkeeping and code paths that never ran. Removed: - Claude token rotation (token-rotation.ts, token-rotation-base.ts): rotate-on-limit, per-token cooldowns, token-rotation-state.json. CLAUDE_CODE_OAUTH_TOKENS is still read, but only its first entry. - Codex account rotation (codex-token-rotation.ts): account pool, rotate-on-429/auth, dead-auth/cooldown tracking, round-robin advance, d7 auto-rotate, codex-rotation-state.json, manual account switch. - Account index plumbing in token-refresh, claude-credentials-path (CLAUDE_ACCOUNTS_DIR / ~/.claude-accounts/<n>), Claude/Codex usage collectors, the dashboard rows and the Codex warm-up. - provider-retry.ts rotation loops and the Codex retry path. Kept: - Codex exclusive auth lease (one Codex run at a time), the 15-minute waitForCodexAuthLease, and a usage-poll lease that skips while a run holds the account (codex-auth.ts). - Session auth copy and write-back of refreshed tokens (syncCodexSessionAuthBack, syncClaudeSessionAuthBack). - Codex auth path: ~/.codex-accounts/0/auth.json, else ~/.codex/auth.json (now resolved per run, so a re-login needs no restart). - Claude token refresh loop, CLAUDE_CREDENTIALS_PATH and the CLAUDE_TOKEN_REFRESH_* / CLAUDE_USAGE_USE_HOME_CREDENTIALS flags; an auth-expired run still force-refreshes the token and retries once. - Error classification (classifyClaudeTrigger, classifyCodexTrigger). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
72 lines
3.3 KiB
Plaintext
72 lines
3.3 KiB
Plaintext
# ===== EJClaw Environment Configuration =====
|
|
# Copy this file to .env and fill in the values.
|
|
# Single unified service manages all three Discord bots in one process.
|
|
|
|
# --- Discord bots (canonical role-fixed names) ---
|
|
DISCORD_OWNER_BOT_TOKEN= # Owner bot
|
|
DISCORD_REVIEWER_BOT_TOKEN= # Reviewer bot
|
|
DISCORD_ARBITER_BOT_TOKEN= # Arbiter bot
|
|
|
|
# Old service-based token names are no longer accepted.
|
|
# Rename any existing values to the three canonical role-based keys above.
|
|
|
|
# --- Agent type configuration ---
|
|
OWNER_AGENT_TYPE=codex # codex | claude-code
|
|
REVIEWER_AGENT_TYPE=claude-code # claude-code | codex
|
|
# ARBITER_AGENT_TYPE=codex # optional: codex | claude-code
|
|
|
|
# --- API keys ---
|
|
CLAUDE_CODE_OAUTH_TOKEN= # Claude Code OAuth token (single account)
|
|
GROQ_API_KEY= # Voice transcription (Groq Whisper, free: console.groq.com)
|
|
|
|
# --- Bot identity ---
|
|
ASSISTANT_NAME=claude # Trigger name (@claude)
|
|
|
|
# --- Claude model ---
|
|
CLAUDE_MODEL=claude-opus-5-5 # Claude model
|
|
CLAUDE_EFFORT=high # Claude effort level
|
|
CLAUDE_THINKING=adaptive # Claude thinking mode
|
|
|
|
# --- Codex model ---
|
|
CODEX_MODEL=gpt-5.5 # Codex model
|
|
CODEX_EFFORT=xhigh # Codex reasoning effort
|
|
# Codex fast mode / goals: ~/.codex/config.toml:
|
|
# [features]
|
|
# fast_mode = true
|
|
# goals = true # /goal — opt-in, default OFF on Codex 0.133+
|
|
|
|
# --- Usage dashboard ---
|
|
STATUS_CHANNEL_ID= # Discord channel ID for live status updates
|
|
# STATUS_SHOW_ROOMS=true # Show room status in dashboard
|
|
# STATUS_SHOW_ROOM_DETAILS=false # Show detailed room info
|
|
|
|
# --- Discord image attachments ---
|
|
# Extra local directories that agents may attach from. Keep this narrow:
|
|
# prefer screenshot/output folders over /home. Comma or path-delimiter separated.
|
|
# EJCLAW_ATTACHMENT_ALLOWED_DIRS=~/Pictures/Screenshots,~/Downloads/ejclaw-images
|
|
|
|
# --- Codex usage primer ---
|
|
# The usage primer sends a tiny real Codex prompt at fixed KST slots
|
|
# (08/13/18/23). These keys override its prompt, model and timeout.
|
|
# CODEX_WARMUP_PROMPT=Reply exactly OK. Do not run tools.
|
|
# CODEX_WARMUP_MODEL= # Defaults to CODEX_MODEL
|
|
# CODEX_WARMUP_COMMAND_TIMEOUT_MS=120000
|
|
|
|
# --- Per-role model overrides (paired rooms) ---
|
|
# Override global CLAUDE_MODEL/CODEX_MODEL per role.
|
|
# Model is injected based on each role's agent type (claude-code → CLAUDE_MODEL, codex → CODEX_MODEL).
|
|
# OWNER_MODEL=gpt-5.5 # Owner model override
|
|
# OWNER_EFFORT=xhigh # Owner effort override
|
|
# OWNER_FALLBACK_ENABLED=true # Fall back to codex on Claude failure (default: true)
|
|
#
|
|
# REVIEWER_MODEL=claude-opus-5-5 # Reviewer model override
|
|
# REVIEWER_EFFORT=high # Reviewer effort override
|
|
# REVIEWER_FALLBACK_ENABLED=true # Fall back to codex on Claude failure (default: true)
|
|
#
|
|
# ARBITER_MODEL=gpt-5.5 # Arbiter model override when ARBITER_AGENT_TYPE=codex
|
|
# ARBITER_EFFORT=xhigh # Arbiter effort override
|
|
# ARBITER_FALLBACK_ENABLED=true # Fall back to codex on Claude failure (default: true)
|
|
|
|
# --- Advanced ---
|
|
# MAX_CONCURRENT_AGENTS=5 # Max parallel agent processes
|