scrum4me-mcp/src
Janpeter Visser 657f7a80c0
fix(presence): heartbeat self-heals when worker record disappears (#14)
Previously, if the ClaudeWorker record vanished (deleted by
prisma_workers_cleanup, manual cleanup, or a race during shutdown of a
parallel worker), the heartbeat would log a warning and stop itself
permanently. From that moment the NavBar showed 'Geen agent' for the
rest of the MCP-server process lifetime — even though the agent was
still alive and serving tools.

Fix: on result.count === 0, call registerWorker again so the record is
re-created. Heartbeat keeps ticking. Self-healing instead of self-
terminating.

startHeartbeat now also accepts userId (needed for re-registration);
caller in index.ts updated.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 20:17:07 +02:00
..
git feat: branch-per-story + worktree-defer + verify EMPTY edge-cases (#12) 2026-05-01 17:04:54 +02:00
lib feat: verify_task_against_plan MCP tool 2026-04-30 19:36:37 +02:00
presence fix(presence): heartbeat self-heals when worker record disappears (#14) 2026-05-01 20:17:07 +02:00
prompts feat(ST-709): implement_next_story prompt 2026-04-26 23:09:19 +02:00
tools feat: branch-per-story + worktree-defer + verify EMPTY edge-cases (#12) 2026-05-01 17:04:54 +02:00
verify feat: branch-per-story + worktree-defer + verify EMPTY edge-cases (#12) 2026-05-01 17:04:54 +02:00
access.ts feat(ST-706): task write tools — update_task_status and update_task_plan 2026-04-26 23:05:49 +02:00
auth.ts feat: add wait_for_job and update_job_status tools (M13 agent worker mode) 2026-04-29 20:05:09 +02:00
errors.ts fix: wrap non-object values in toolJson, add e2e smoke test 2026-04-26 23:38:39 +02:00
index.ts fix(presence): heartbeat self-heals when worker record disappears (#14) 2026-05-01 20:17:07 +02:00
prisma.ts feat(ST-705): read tools — health, list_products, get_claude_context 2026-04-26 23:04:51 +02:00
status.ts feat(ST-704): status mappers and shared error helpers 2026-04-26 23:02:05 +02:00