(str)
| 2 | const assert = require('node:assert/strict'); |
| 3 | |
| 4 | function stripAnsi(str) { |
| 5 | // Strip CSI sequences so child stdout stays deterministic regardless of |
| 6 | // the parent shell's FORCE_COLOR state (see issue #430 and PRs #444/#445). |
| 7 | return String(str).replace(/\x1B\[[0-?]*[ -/]*[@-~]/g, ''); |
| 8 | } |
| 9 | |
| 10 | const savedEnv = {}; |
| 11 | const envKeys = ['EVOLVE_BRIDGE', 'OPENCLAW_WORKSPACE']; |