diff --git a/.story_kit/work/5_done/286_story_server_self_rebuild_and_restart_via_mcp_tool.md b/.story_kit/work/5_done/286_story_server_self_rebuild_and_restart_via_mcp_tool.md new file mode 100644 index 0000000..78ef58b --- /dev/null +++ b/.story_kit/work/5_done/286_story_server_self_rebuild_and_restart_via_mcp_tool.md @@ -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