Returns the user-specific home directory, creating it if needed.
(userId: string)
| 66 | |
| 67 | /** Returns the user-specific home directory, creating it if needed. */ |
| 68 | function userHomeDir(userId: string): string { |
| 69 | const dir = path.join(USER_HOME_BASE, userId); |
| 70 | try { |
| 71 | mkdirSync(path.join(dir, ".claude"), { recursive: true }); |
| 72 | } catch { |
| 73 | // Already exists or no permission — fail silently; PTY spawn will surface any real issue. |
| 74 | } |
| 75 | return dir; |
| 76 | } |
| 77 | |
| 78 | const sessionManager = new SessionManager( |
| 79 | MAX_SESSIONS, |
no test coverage detected