Add connectivity tests and fix Hermes handle + venv setup

- test_connectivity.py: connectivity tests for all four endpoint types
  (anthropic, openai, lm_studio, hermes, agent0) — treats no-credits as success
- test_hermes.py: raw WebSocket frame logger used to reverse-engineer protocol
- Fix handle_hermes: skip prompt.submit ack frame, read full text from
  message.complete payload.text, always raise on status==error
- Fix requirements.txt: use >= pins (fastapi/uvicorn versions didn't exist)
- Fix dev.sh: prefer python3.12 for venv (mcp>=1.9.0 requires 3.10+)
- Remove ANTHROPIC_KEY env var dependency from server.py (keys come from DB)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 19:00:51 +02:00
parent 604df52247
commit 9814d18e8c
5 changed files with 521 additions and 4 deletions
+2 -1
View File
@@ -55,7 +55,8 @@ git -C "$SCRIPT_DIR" pull --ff-only >> "$LOG_FILE" 2>&1 \
if [ ! -d "$SCRIPT_DIR/.venv" ]; then
log "$YELLOW" "Creating virtual environment..."
python3 -m venv "$SCRIPT_DIR/.venv" >> "$LOG_FILE" 2>&1
PYTHON=$(which python3.12 || which python3.11 || which python3.10 || which python3)
$PYTHON -m venv "$SCRIPT_DIR/.venv" >> "$LOG_FILE" 2>&1
fi
source "$SCRIPT_DIR/.venv/bin/activate"