fleet-memory/hindsight-embed/hindsight_embed
Nicolò Boschi 7d6c570a3a
fix(embed): clear stale daemon on port before starting (#843)
* 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()
2026-04-02 10:57:28 +02:00
..
__init__.py Release v0.4.22 2026-03-31 18:14:59 +02:00
cli.py feat(embed): add programmatic UI (control plane) management (#683) 2026-03-25 14:38:32 +01:00
daemon_client.py feat(embed): add programmatic UI (control plane) management (#683) 2026-03-25 14:38:32 +01:00
daemon_embed_manager.py fix(embed): clear stale daemon on port before starting (#843) 2026-04-02 10:57:28 +02:00
embed_manager.py feat: HindsightEmbedded python SDK (#293) 2026-02-04 14:41:19 +01:00
profile_manager.py feat(embed): add programmatic UI (control plane) management (#683) 2026-03-25 14:38:32 +01:00