story-kit: done 286_story_server_self_rebuild_and_restart_via_mcp_tool

This commit is contained in:
Dave
2026-03-18 14:09:13 +00:00
parent baa8bdcfda
commit 17f6bae573

View File

@@ -0,0 +1,22 @@
---
name: "Server self-rebuild and restart via MCP tool"
---
# Story 286: Server self-rebuild and restart via MCP tool
## User Story
As a project owner away from my terminal, I want to tell the bot to restart the server so that it picks up new code changes, without needing physical access to the machine.
## Acceptance Criteria
- [ ] MCP tool `rebuild_and_restart` triggers a cargo build of the server
- [ ] If the build fails, server stays up and returns the build error
- [ ] If the build succeeds, server re-execs itself with the new binary using std::os::unix::process::CommandExt::exec()
- [ ] Server logs the restart so it's traceable
- [ ] Matrix bot reconnects automatically after the server comes back up
- [ ] Running agents are gracefully stopped before re-exec
## Out of Scope
- TBD