fix pi cwd resolution and super admin home dir for all pi endpoints

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 20:31:35 +00:00
co-authored by Claude Opus 4.6
parent 4c2e40a46b
commit 25e8aaaea6
5 changed files with 48 additions and 55 deletions
+3
View File
@@ -31,6 +31,9 @@ export const getArchivedSessionDir = (email: string, sessionId: string) =>
export const getHomeDir = (email: string) => join(DATA_PATH, email, 'home');
export const getHomeDirForRole = (email: string, role: string | null): string =>
role === 'Super Admin' && process.env.HOME_DIR ? process.env.HOME_DIR : getHomeDir(email);
export const getUserPiConfigDir = (email: string) => join(DATA_PATH, email, 'home', '.pi', 'agent');
export const getUserSettingsDir = (email: string) => join(DATA_PATH, email, 'settings');