fix(agent): resolve missing imports — jose, auth config, AUTH_SECRET_KEY

- Added python-jose[cryptography] to requirements-agent.txt
- Made sqlalchemy.orm.Session and TokenBlacklist imports lazy in jwt.py
  so decode_token works without pulling ORM models into agent image
- Added src/core/auth/__init__.py, config.py, jwt.py to agent Dockerfile COPY
- Added AUTH_SECRET_KEY env var to agent compose (reads from JWT_SECRET)
This commit is contained in:
2026-07-06 12:13:26 +03:00
parent 627b75497c
commit 468bdb9000
6 changed files with 35 additions and 17 deletions

View File

@@ -45,6 +45,9 @@ COPY backend/src/core/__init__.py /app/backend/src/core/__init__.py
COPY backend/src/core/cot_logger.py /app/backend/src/core/cot_logger.py
COPY backend/src/core/logger.py /app/backend/src/core/logger.py
COPY backend/src/core/ws_log_handler.py /app/backend/src/core/ws_log_handler.py
COPY backend/src/core/auth/__init__.py /app/backend/src/core/auth/__init__.py
COPY backend/src/core/auth/config.py /app/backend/src/core/auth/config.py
COPY backend/src/core/auth/jwt.py /app/backend/src/core/auth/jwt.py
COPY backend/src/agent/ /app/backend/src/agent/
# Gradio server