* fix(embed): clear stale daemon on port before starting new one (#843) When `uvx hindsight-embed@latest` resolves to a new version, the old daemon may still be bound to the port, causing EADDRINUSE. Before starting a daemon, check if the port is occupied, verify it's a hindsight process via /health, and SIGTERM it if so. * chore: remove unused signal import from test * refactor: use cross-platform port check instead of lsof-only Use socket for port check (works on all platforms), extract PID lookup into a helper with Windows (netstat) and Unix (lsof) paths, and extract kill logic into a testable static method. * refactor: reuse cross-platform helpers in stop() and stop_ui() |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| cli.py | ||
| daemon_client.py | ||
| daemon_embed_manager.py | ||
| embed_manager.py | ||
| profile_manager.py | ||