feat: per-session working directory tracking via X-Session-Id header

Replace the process-global os.chdir() with an in-memory dictionary
keyed by session ID (passed via X-Session-Id header). Multiple
concurrent chat sessions now maintain independent working directories.

- GET/POST /files/cwd read X-Session-Id to resolve per-session cwd
- POST /execute falls back to session cwd when no cwd param provided
- POST /api/terminals spawns PTY in the session's cwd
- 7-day sliding TTL for session entries
- Fully backward compatible: no header = fs.home default
This commit is contained in:
Timothy Jaeryang Baek committed 2026-03-29 20:59:47 -05:00
1 parent 004ee891e6
commit fbaf2e8e69
4 files changed
+74 -16

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "open-terminal"
version = "0.11.30"
version = "0.11.31"
description = "A remote terminal API."
readme = "README.md"
authors = [