docs: sync memory, docs and skills with the current runtime

Global memory (groups/global/CLAUDE.md):
- add a model/runtime section: current versions (Opus 5.5, SDK 0.3.286,
  Codex 0.159.3), the model upgrade checklist, the stale nested
  node_modules and single-Codex-account gotchas, and the 09-19..10-01 fixes
- fix the garbled credentials paragraph and list every stored credential key
- correct the reviewer description (reviewer is codex, arbiter claude-code)
- the tmpfs/RAM watchdog it described no longer existed; point to the
  restored /home/claude/tmpfs-ram-watchdog.sh
- refresh stale host facts (tmpfs/disk sizes, nvidia-smi version-mismatch
  after driver auto-updates means "reboot pending", not "GPU broken")
- include the Windows CI runner section written on 2026-09-23 that was
  already live but never committed

Docs and skills:
- README / configuration.md / .env.example: current SDK and model
  versions, per-room reviewer/arbiter override, real attachment types,
  existing OpenAI Whisper fallback, src-based service and detached restart
- architecture.md: registered_groups is gone; RestartPreventExitStatus only
  applies to setup-rendered units
- setup/debug/customize skills: canonical DISCORD_*_BOT_TOKEN keys (the old
  alias now aborts startup), Bun instead of Node, Codex OAuth login instead
  of OPENAI_API_KEY, drop ignored register flags, journald instead of
  logs/*.log, room_settings query instead of registered_groups, bun run test
- CONTRIBUTING: drop the reference to the nonexistent /add-telegram skill
- legacy-compat-removal-spec: mark as implemented/historical
- CHANGELOG: add an Unreleased section for the recent fixes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codex
2026-10-01 14:35:53 +09:00
parent a7f2e02699
commit e4828896f6
11 changed files with 196 additions and 56 deletions

View File

@@ -59,7 +59,7 @@ description: Customize Discord-only EJClaw behavior, routing, integrations, prom
```bash
bun run typecheck
bun test
bun run test
```
러너나 실행 경로를 건드렸으면 추가로 확인합니다.

View File

@@ -12,7 +12,7 @@ description: Debug EJClaw runtime issues on the current Discord-only, host-proce
1. 타입과 테스트부터 확인
```bash
bun run typecheck
bun test
bun run test
```
2. 서비스 상태 확인
```bash
@@ -20,8 +20,7 @@ description: Debug EJClaw runtime issues on the current Discord-only, host-proce
```
3. 런타임 로그 확인
```bash
tail -f logs/ejclaw.log
tail -f logs/ejclaw.error.log
journalctl --user -u ejclaw -f
ls -t groups/*/logs/agent-*.log | head
```
4. 러너 빌드 확인
@@ -45,12 +44,12 @@ description: Debug EJClaw runtime issues on the current Discord-only, host-proce
### 봇이 아예 말이 없음
```bash
grep -n '^DISCORD_BOT_TOKEN=' .env
grep -nE '^DISCORD_(OWNER|REVIEWER|ARBITER)_BOT_TOKEN=' .env
bun run setup -- --step verify
```
- `DISCORD_BOT_TOKEN`이 없으면 채널이 안 붙습니다.
- `REGISTERED_GROUPS=0`이면 채널 등록이 안 된 상태입니다.
- `DISCORD_OWNER_BOT_TOKEN` / `DISCORD_REVIEWER_BOT_TOKEN` / `DISCORD_ARBITER_BOT_TOKEN`이 없으면 채널이 안 붙습니다. 구 이름(`DISCORD_BOT_TOKEN` 등)이 남아 있으면 시작 시 오류로 종료됩니다.
- `ASSIGNED_ROOMS=0`이면 채널 등록이 안 된 상태입니다.
- 메인 채널이 아니면 디스코드 멘션이나 트리거 조건을 먼저 확인합니다.
### 에이전트가 실행 직후 죽음
@@ -61,14 +60,14 @@ ls -t groups/*/logs/agent-*.log | head -3
```
- Claude 계열은 `CLAUDE_CODE_OAUTH_TOKEN` 또는 `ANTHROPIC_API_KEY`가 필요합니다.
- Codex 계열은 `OPENAI_API_KEY` 또는 `CODEX_OPENAI_API_KEY`가 필요합니다.
- Codex는 API 키가 아니라 OAuth 인증 파일(`~/.codex-accounts/0/auth.json`)을 씁니다. 만료됐으면 `CODEX_HOME=$HOME/.codex-accounts/0 ./node_modules/.bin/codex login --device-auth`로 다시 로그인합니다. 실패 원인은 `paired_turn_attempts.last_error`에서 확인합니다.
- 러너 로그에 인증 실패나 CLI 실행 오류가 바로 찍힙니다.
### 음성 전사가 안 됨
```bash
grep -nE '^(GROQ_API_KEY|OPENAI_API_KEY)=' .env
tail -f logs/ejclaw.log | grep -iE 'transcri|audio|whisper|groq'
journalctl --user -u ejclaw -f | grep -iE 'transcri|audio|whisper|groq'
```
- 기본 우선순위는 Groq Whisper, 없으면 OpenAI Whisper fallback입니다.
@@ -77,10 +76,10 @@ tail -f logs/ejclaw.log | grep -iE 'transcri|audio|whisper|groq'
### 등록은 되어 있는데 응답이 이상함
```bash
sqlite3 store/messages.db "select jid, folder, requires_trigger, is_main, agent_type from registered_groups;"
bun -e "import {Database} from 'bun:sqlite'; const db=new Database('store/messages.db',{readonly:true}); console.table(db.query('select chat_jid, folder, room_mode, requires_trigger, is_main, owner_agent_type, work_dir from room_settings').all())"
```
- `jid`는 `dc:<channel_id>` 형식이어야 합니다.
- `chat_jid`는 `dc:<channel_id>` 형식이어야 합니다. tribunal 방인데 `work_dir`가 비어 있으면 첫 턴에 자동 복구됩니다.
- `folder`는 `discord_main` 또는 `discord_<name>` 형태를 유지합니다.
- 세션 명령 문제면 `src/session-commands.ts`와 `src/index.ts` 호출부를 같이 봅니다.

View File

@@ -10,7 +10,7 @@ description: Run initial EJClaw setup for the unified single-service Discord arc
EJClaw는 현재 **단일 서비스**로 동작합니다:
- **ejclaw** — 통합 런타임 서비스
Claude가 기본 봇으로 동작하고, Codex는 별도 서비스가 아니라 필요 시 내부 러너/역할 라우팅으로 사용됩니다.
owner 역할의 코드 기본값은 Codex(`OWNER_AGENT_TYPE`, reviewer 기본값은 Claude Code)이며, `.env`에서 바꿀 수 있습니다(현재 운영 배포는 owner=claude-code, reviewer=codex, arbiter=claude-code). Codex는 별도 서비스가 아니라 같은 `ejclaw` 서비스 안에서 내부 러너/역할 라우팅으로 실행됩니다.
## 1. 부트스트랩
@@ -18,7 +18,7 @@ Claude가 기본 봇으로 동작하고, Codex는 별도 서비스가 아니라
bash setup.sh
```
- Node 20 이상과 의존성이 준비되어야 합니다.
- Bun 1.3 이상과 의존성이 준비되어야 합니다(`setup.sh`가 Bun을 확인합니다).
- 실패하면 `logs/setup.log`를 먼저 봅니다.
## 2. 현재 상태 확인
@@ -40,7 +40,10 @@ bun run setup -- --step environment
`.env`에 최소한 아래 값이 있어야 합니다.
```bash
DISCORD_BOT_TOKEN=... # Claude 봇 토큰
DISCORD_OWNER_BOT_TOKEN=... # owner 봇 토큰
DISCORD_REVIEWER_BOT_TOKEN=... # reviewer 봇 토큰
DISCORD_ARBITER_BOT_TOKEN=... # arbiter 봇 토큰
# 구 이름(DISCORD_BOT_TOKEN 등)은 더 이상 지원되지 않으며, 남아 있으면 시작 시 오류로 종료됩니다
CLAUDE_CODE_OAUTH_TOKEN=... # 또는 ANTHROPIC_API_KEY=...
ASSISTANT_NAME=claude # 트리거 이름 (@claude)
```
@@ -58,7 +61,12 @@ Codex 관련 선택 설정은 **별도 서비스 파일이 아니라 같은 `.en
# 같은 .env 또는 서비스 Environment=에 추가 가능
CODEX_MODEL=gpt-5.5
CODEX_EFFORT=xhigh
OPENAI_API_KEY=...
```
Codex는 API 키가 아니라 OAuth로만 인증합니다(러너가 `OPENAI_API_KEY`를 일부러 제거함). 로그인:
```bash
CODEX_HOME=$HOME/.codex-accounts/0 ./node_modules/.bin/codex login --device-auth
```
### 선택 환경 변수
@@ -101,9 +109,7 @@ bun run setup -- --step register -- \
--jid dc:123456789012345678 \
--name "My Server #general" \
--folder discord_main \
--trigger @claude \
--is-main \
--no-trigger-required
--is-main
```
보조 채널 예시:
@@ -112,8 +118,7 @@ bun run setup -- --step register -- \
bun run setup -- --step register -- \
--jid dc:123456789012345678 \
--name "My Server #ops" \
--folder discord_ops \
--trigger @claude
--folder discord_ops
```
## 6. 서비스 시작
@@ -156,8 +161,8 @@ bun run setup -- --step verify
## 빠른 문제 해결
- 빌드 문제: `bun run typecheck`, `bun test`, `bun run build:runners`
- Claude 서비스 문제: `logs/ejclaw.error.log` 또는 `journalctl --user -u ejclaw -f`
- Codex 실행 문제: 같은 `ejclaw` 서비스 로그에서 `CODEX_MODEL`, `CODEX_EFFORT`, `OPENAI_API_KEY` 설정을 같이 확인
- 디스코드 연결 문제: `.env`의 `DISCORD_BOT_TOKEN`과 등록된 `dc:*` JID 확인
- 응답 문제: `tail -f logs/ejclaw.log`
- 빌드 문제: `bun run typecheck`, `bun run test`, `bun run build:runners`
- Claude 서비스 문제: `journalctl --user -u ejclaw -f`
- Codex 실행 문제: 같은 `ejclaw` 서비스 로그와 `CODEX_MODEL`, `CODEX_EFFORT`, Codex 인증 파일(`~/.codex-accounts/0/auth.json`)을 확인
- 디스코드 연결 문제: `.env`의 `DISCORD_OWNER_BOT_TOKEN` / `DISCORD_REVIEWER_BOT_TOKEN` / `DISCORD_ARBITER_BOT_TOKEN`과 등록된 `dc:*` JID 확인
- 응답 문제: `journalctl --user -u ejclaw -f`