Content
# EJClaw v2 — A Thin Wrapper on Top of NanoClaw
EJClaw is no longer a standalone app. It's now a carry repository for the EYEJOKER stack,
operated with **upstream NanoClaw + minimal customizations**.
The old Tribunal stack (v0.x) has been retired since 2026-07-14
(preserved in `retire/nanoclaw-migration` branch and `~/archive/ejclaw-retired-20260714/`,
for those who need it).
## Structure
```text
upstream nanoclaw (github.com/nanocoai/nanoclaw, main)
└─ eyejoker/carry-* branches ← This repo mirrors the carry commit series
├─ feat(channels): Discord adapter
├─ feat(providers): gpt-proxy (CLIProxyAPI Anthropic-compat, 16 lines)
├─ feat(container-runner): OneCLI CA env / git deploy key activation / nested-claude auth sentinel
└─ docs: EYEJOKER_STACK.md (carry inventory)
eyejoker/ (additional payload for this repo — custom outside nanoclaw tree)
├─ host-executor/ container-to-host execution MCP (Unix socket + audit log + op token injection)
│ ├─ server.py / client.py / test_server.py
│ ├─ nanoclaw-host-executor.service
│ └─ op.dropin.conf (systemd drop-in — only references EnvironmentFile, no token values)
├─ shared-claude-common.md shared guidelines for all groups (deployed to ~/.config/nanoclaw/shared-claude/)
└─ mount-allowlist.json mount allowlist snapshot (deployed to ~/.config/nanoclaw/)
```
## Operating Principles
- **Minimal customizations.** When new features are needed, follow this order:
① Check if it's possible with default NanoClaw settings →
② Check if it's available as an official extension point (provider registry, skills, MCP registration) →
③ If not, apply carry patches.
Always follow this order.
- Carry patches should be independent commits in `eyejoker/carry-<date>` branches.
Rebase when upstream updates are available.
- Secrets should never be committed to this repo (use 1Password + .env, with only reference paths here).
- Live installations use `~/NanoClaw` (upstream clone + carry branch).
This repo serves as a backup/history for the carry branch.
## Live System (algo host)
| Service | Role |
|---|---|
| `nanoclaw-v2-*.service` | Main body (Discord 4-way + scheduler) |
| `nanoclaw-host-executor.service` | Host execution MCP (audit: `~/.local/share/nanoclaw-host-executor/audit.jsonl`) |
| `cliproxyapi.service` | Codex OAuth pool → Anthropic-compat endpoint |
Knowledge layer: AgentMemory MCP (shared with Hermes) + LLM Wiki (ro mount) + group-specific CLAUDE.local.md.
## Rebuilding Procedure (Summary)
1. `git clone https://github.com/nanocoai/nanoclaw ~/NanoClaw && cd ~/NanoClaw`
2. Add this repo's carry branch as a remote and cherry-pick (or apply diff from `nanoclaw-src/` mirror)
3. Copy `eyejoker/host-executor/` → `~/nanoclaw-host-executor/`, install systemd unit + drop-in
4. Place `eyejoker/mount-allowlist.json`, `shared-claude-common.md` in `~/.config/nanoclaw/`
5. Configure `.env` (Discord token, CLIPROXY_BASE_URL, etc. — refer to 1Password)
6. Run `pnpm install && pnpm build`, regenerate group/wiring with `ncl` CLI (see EYEJOKER_STACK.md)
## Remaining v0 Legacy
- `src/codex-usage-collector.ts` — Read-only Codex usage collector.
Can be reused when usage dashboard is revived.