session manager login and logout implemented - untested, may contain bugs

This commit is contained in:
2026-07-29 14:42:07 +02:00
parent 6bbaaf60e6
commit 5d197b4513
4 changed files with 100 additions and 22 deletions
+12
View File
@@ -21,6 +21,18 @@ export function createInitialShellState(
});
}
export function createShellState(
filesystem: FileSystem,
users: ReadonlyMap<number, UserInfo>,
sessionStack: ReadonlyArray<SessionState>,
): ShellState {
return Object.freeze({
filesystem,
users,
sessionStack: Object.freeze(sessionStack),
});
}
export function withCwd(state: ShellState, inode: number): ShellState {
const session = getCurrentSession(state);