Skip to content

feat(system): Settings → System host metrics + Stop all sessions (v0.139.0)#240

Merged
vikasprogrammer merged 1 commit into
mainfrom
feat/system-metrics-stop-all
Jul 13, 2026
Merged

feat(system): Settings → System host metrics + Stop all sessions (v0.139.0)#240
vikasprogrammer merged 1 commit into
mainfrom
feat/system-metrics-stop-all

Conversation

@vikasprogrammer

Copy link
Copy Markdown
Owner

What

Two additions to Settings → System (owner/admin only).

Host resources panel

A live "Host resources" card polling GET /api/system every 4s:

  • Memory — used / free / total with a usage bar (amber ≥75%, red ≥90%)
  • CPU — utilization % (sampled ~120ms server-side), core count, model, load average
  • Node process RSS + heap, process & host uptime, running-session count, host platform/arch/hostname

Backed by a new owner/admin-gated GET /api/system built on Node's os module + process.memoryUsage() (no new deps).

Stop all sessions

A "Stop all sessions" button → POST /api/sessions/stop-all (owner/admin, audited sessions.stop_all). Halts every running session tenant-wide via the existing TerminalManager.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
  • In-process smoke test (isolated AGENT_OS_HOME): both routes return 401 unauthenticated (route present, not 404 fall-through); as owner, GET /api/system returns real RAM/CPU/uptime JSON and POST /api/sessions/stop-all returns {ok:true, halted:N}.

🤖 Generated with Claude Code

…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>
@vikasprogrammer vikasprogrammer force-pushed the feat/system-metrics-stop-all branch from edde86a to 6d85a43 Compare July 13, 2026 09:01
@vikasprogrammer vikasprogrammer merged commit 4d30981 into main Jul 13, 2026
@vikasprogrammer vikasprogrammer deleted the feat/system-metrics-stop-all branch July 13, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant