Critical frontend bugs: - Add TrackSubscribed/attach() for agent audio playback - Fix decodeToString TypeError with TextDecoder - XSS fix: innerHTML -> textContent in addMessage - Fresh token on reconnect retry Agent fixes: - GemmaLLM subclass with reasoning_content fallback wrapper - Disable Gemma 4 thinking mode via chat_template_kwargs (6.8s -> 0.5s) - Remove duplicate session-level LLM - Replace global _active_session with closure-based handler - asyncio.create_task instead of deprecated get_event_loop - Explicit silero VAD, topic filter on voice-control Infra: - supervisord: all programs log to /dev/stdout - Dockerfile: uv sync --frozen with committed uv.lock - nginx config moved to real file, token_server.py no longer served - entrypoint.sh: cert persisted, only regenerated on IP change - compose: healthcheck + cert volume - token_server: CORS removed, room pinned to voice-room UI upgrade: - Orb UI with state machine (idle/connecting/listening/thinking/speaking) - Streaming transcripts via lk.transcription text streams - Barge-in hint, thinking chip, audio visualizer - Glassmorphism, chat bubbles, settings sheet, light mode - PWA manifest, favicon, wake-lock, safe-area insets - localStorage conversation history Docs: AGENTS.md drift fixed
34 lines
1.3 KiB
Bash
34 lines
1.3 KiB
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
CERT_DIR=/etc/voice/certs
|
|
mkdir -p "$CERT_DIR"
|
|
|
|
LAN_IP=$(ip -4 route get 1.1.1.1 2>/dev/null | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}')
|
|
[ -z "$LAN_IP" ] && LAN_IP=$(hostname -I 2>/dev/null | awk '{print $1}')
|
|
[ -z "$LAN_IP" ] && LAN_IP=127.0.0.1
|
|
|
|
# Only regenerate if cert is missing or was issued for a different IP
|
|
if [ ! -f "$CERT_DIR/cert.pem" ]; then
|
|
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
|
|
-keyout "$CERT_DIR/key.pem" \
|
|
-out "$CERT_DIR/cert.pem" \
|
|
-subj "/CN=$LAN_IP" \
|
|
-addext "subjectAltName=DNS:localhost,IP:127.0.0.1,IP:$LAN_IP" 2>/dev/null
|
|
echo "voice cert generated for CN=$LAN_IP"
|
|
else
|
|
existing_cn=$(openssl x509 -in "$CERT_DIR/cert.pem" -noout -subject 2>/dev/null | grep -o 'CN = [^,]*' | cut -d' ' -f3)
|
|
if [ "$existing_cn" != "$LAN_IP" ]; then
|
|
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
|
|
-keyout "$CERT_DIR/key.pem" \
|
|
-out "$CERT_DIR/cert.pem" \
|
|
-subj "/CN=$LAN_IP" \
|
|
-addext "subjectAltName=DNS:localhost,IP:127.0.0.1,IP:$LAN_IP" 2>/dev/null
|
|
echo "voice cert regenerated for CN=$LAN_IP (was $existing_cn)"
|
|
else
|
|
echo "voice cert already valid for CN=$LAN_IP"
|
|
fi
|
|
fi
|
|
|
|
exec "$@"
|