mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-03 22:19:42 +02:00
feat: add GNU screen wrapping with process monitor
Add screen session management infrastructure: - ScreenManager class to create, track, and kill GNU screen sessions - Persistence of screen sessions to ~/.claudeman/screens.json - Process stats collection (memory, CPU, child count) - Reconciliation to detect dead/orphan screens New API endpoints: - GET /api/screens - list screens with stats - DELETE /api/screens/:sessionId - kill screen - POST /api/screens/reconcile - find dead screens - POST /api/screens/stats/start|stop - control stats polling New Process Monitor panel: - Slide-up panel with real-time stats (2s updates) - Shows memory, CPU, child processes per screen - Kill button for each screen session - Reconcile button to clean up dead screens Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -205,6 +205,28 @@ export interface CaseInfo {
|
||||
hasClaudeMd?: boolean;
|
||||
}
|
||||
|
||||
// Screen session types for GNU screen wrapping
|
||||
export interface ScreenSession {
|
||||
sessionId: string; // Claudeman session ID
|
||||
screenName: string; // GNU screen session name
|
||||
pid: number; // Screen process PID
|
||||
createdAt: number;
|
||||
workingDir: string;
|
||||
mode: 'claude' | 'shell';
|
||||
attached: boolean; // Whether webserver is attached
|
||||
}
|
||||
|
||||
export interface ProcessStats {
|
||||
memoryMB: number; // Memory usage in MB
|
||||
cpuPercent: number; // CPU usage percentage
|
||||
childCount: number; // Number of child processes
|
||||
updatedAt: number;
|
||||
}
|
||||
|
||||
export interface ScreenSessionWithStats extends ScreenSession {
|
||||
stats?: ProcessStats;
|
||||
}
|
||||
|
||||
export const DEFAULT_CONFIG: AppConfig = {
|
||||
pollIntervalMs: 1000,
|
||||
defaultTimeoutMs: 300000, // 5 minutes
|
||||
|
||||
Reference in New Issue
Block a user