9f720930ea
- Remove compose-level user: 0:0 override from manifest_compiler.py so the entrypoint can start as root, fix mount ownership, and drop privileges to the container user internally. - Add get_manifest_container_user() helper to resolve the manifest-declared container user (with uid:gid fallback). - Pass container user through TerminalSession, TerminalManager, and the terminal WebSocket handler so docker exec is invoked with --user <user>. - Update and add unit tests for the manifest compiler and terminal session. - Record the additional root-user fix in the fix-pi-container-mount-permissions OpenSpec change/tasks. Quality gates: pytest tests/unit/ (226 passed), pytest tests/services/test_terminal_manager_multi.py (7 passed), ruff check on changed files (clean), mypy on changed files (clean)
629 B
629 B
apps/api/src/services/terminal (index)
dir: apps/api/src/services/terminal
role
Provides WebSocket-based terminal session management for containerized environments with PTY support, session persistence, and resource limits.
parent
index: apps/api/src/services/.pi-map.index.md map: apps/api/src/services/.pi-map.md
children
files
- __init__.py
- terminal_manager.py
- terminal_session.py
links
index: apps/api/src/services/terminal/.pi-map.index.md map: apps/api/src/services/terminal/.pi-map.md
workflows
- change terminal behavior read: __init__.py, terminal_manager.py, terminal_session.py