cwd-guardian
Protects the evolver daemon from uv_cwd ENOENT crashes by:
- Stamping the current valid cwd to a pidfile
- On restart, verifying the cwd exists before launching evolver
- Rebuilding the cwd from the stamped path if it was deleted
Usage
node skills/cwd-guardian/scripts/guardian.js start
node skills/cwd-guardian/scripts/guardian.js check
Logic
start: Records current working directory to~/.openclaw/workspace/memory/evolution/cwd_guardian.pid, then starts the evolver daemoncheck: Reads the pidfile, verifies the cwd exists, recreates it if missing, then starts the evolver daemon if not runningverify: Returns exit code 0 if cwd is valid, 1 if recreated