fix(stt): embarquer le HUD dans le package (404 après pipx install)

Le HUD était à la racine du projet (stt/hud/) donc absent du package installé
par pipx → HTTP 404 sur /. Déplacé dans le package (stt/stt/hud/) + package-data,
HUD_DIR ajusté. Vérifié : le wheel contient bien stt/hud/index.html.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013FmcxGsyXZXogiAHQLjnZT
This commit is contained in:
Claude 2026-06-17 09:21:28 +00:00
parent 6c680c4f8b
commit 1ff3fd9bed
No known key found for this signature in database
6 changed files with 14 additions and 7 deletions

View file

@ -30,12 +30,14 @@ stt # lance le backend + ouvre le HUD
```
stt/
├── pyproject.toml # définit la commande `stt` (entrypoint pipx)
├── stt/ # package Python — backend (à implémenter, phases 1-4)
├── stt/ # package Python — backend
│ ├── cli.py # entrypoint `stt`
│ ├── config.py # défauts + ~/.config/stt/stt.toml
│ ├── voice/ # wake word, STT (faster-whisper), TTS (Piper)
│ ├── brain/ # routeur 3 modes : hermes / local-direct / claude-direct
│ ├── memory/ # gestionnaire mémoire 3 tiers (local/s01/GitHub)
└── server/ # serveur websocket vers le HUD
├── hud/ # front web (HTML/JS/canvas) — phase 3
│ ├── memory/ # mémoire 3 tiers (local SQLite ✅, s01/GitHub phase 4)
├── server/ # HTTP statique (HUD) + websocket (états → HUD)
│ └── hud/ # front web embarqué dans le package (livré par pipx)
├── config/ # stt.example.toml + thèmes / avatars / voix
├── memory/ # distilled/ (versionné) + raw local (gitignoré)
└── install-service.sh # systemd --user (démarrage auto) — phase 6

View file

@ -28,3 +28,7 @@ build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."]
include = ["stt*"]
# Le HUD (assets web) est livré comme données du package stt/
[tool.setuptools.package-data]
stt = ["hud/*", "hud/**/*"]

View file

@ -14,7 +14,8 @@ from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from typing import Any
HUD_DIR = Path(__file__).resolve().parent.parent.parent / "hud"
# Le HUD est embarqué DANS le package (stt/hud) pour être livré par pipx.
HUD_DIR = Path(__file__).resolve().parent.parent / "hud"
def _start_http(host: str, port: int) -> ThreadingHTTPServer: