- Wrap onPrompt in try/catch in connection handler; on rejection send
empty reply ("\n") so the git/ssh helper exits promptly instead of
hanging indefinitely.
- Reject the start() promise on server 'error' events (e.g. EADDRINUSE)
so callers get a fast failure rather than an eternal hang.
- stop() now unlinks the socket file and helper script to prevent stale-
socket errors on subsequent start() calls with the same dir.
- start() best-effort unlinks a pre-existing stale socket before listen().
- Tests: added onPrompt-rejection (with 3s timeout guard) and restart
(stop then start on same dir) test cases.
Co-Authored-By: Claude <noreply@anthropic.com>
formatValue now detects YAML-special tokens (true/false/null/yes/no/on/off/y/n/~)
and numeric-looking strings, quoting them via JSON.stringify so YAML parsers
cannot misread them as booleans or numbers. ISO date strings (YYYY-MM-DD) are
exempt and remain bare for readability. Adds four covering tests.
Co-Authored-By: Claude <noreply@anthropic.com>