feat(system): Settings → System host metrics + Stop all sessions (v0.139.0)#240
Merged
Merged
Conversation
…141.0) Add a live "Host resources" panel to Settings → System (RAM used/free/total, CPU utilization + cores + load avg, Node RSS/heap, uptimes, running-session count), backed by a new owner/admin-gated GET /api/system built on Node's os module + process.memoryUsage. Add a "Stop all sessions" button (POST /api/sessions/stop-all, owner/admin, audited sessions.stop_all) that halts every running session tenant-wide via the existing TerminalManager.stopAllRunning — a softer sibling of the kill switch that leaves the gate open. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
edde86a to
6d85a43
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two additions to Settings → System (owner/admin only).
Host resources panel
A live "Host resources" card polling
GET /api/systemevery 4s:Backed by a new owner/admin-gated
GET /api/systembuilt on Node'sosmodule +process.memoryUsage()(no new deps).Stop all sessions
A "Stop all sessions" button →
POST /api/sessions/stop-all(owner/admin, auditedsessions.stop_all). Halts every running session tenant-wide via the existingTerminalManager.stopAllRunning, so each session's inbox/audit reflect the halt. A softer sibling of the Governance kill switch: it stops the fleet but leaves the gate open, so new runs can still be launched.Testing
npm run typecheck✅ ·cd web && npm run build✅ ·npm run build✅AGENT_OS_HOME): both routes return 401 unauthenticated (route present, not 404 fall-through); as owner,GET /api/systemreturns real RAM/CPU/uptime JSON andPOST /api/sessions/stop-allreturns{ok:true, halted:N}.🤖 Generated with Claude Code