- Fix spawnAgentProcess path resolution: walk up to find package root
instead of assuming 2 levels up from apps/web (breaks in standalone
where cwd is deep inside .next/standalone/); use openclaw.mjs in
production since scripts/run-node.mjs isn't shipped in the package
- Add missing readline error handlers in active-runs.ts and
agent-runner.ts to prevent "Unhandled 'error' event" crashes when
the child process fails to start
- Pass OPENCLAW_ROOT env var from gateway to standalone server so the
web app can reliably find the CLI entry point
- Add 32 tests covering path resolution, SSE streaming, error handling,
run lifecycle, replay, and abort
Co-authored-by: Cursor <cursoragent@cursor.com>