chore(cli): 🔧 Update CLI tooling files (4 files modified)

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Lilith 2026-02-22 12:01:04 -08:00
parent 24ac0ab641
commit ec2e43cb9b
4 changed files with 127 additions and 31 deletions

View file

@ -148,6 +148,14 @@ export default function Header({ pageType }: HeaderProps) {
),
onClick: () => handleExternalLink(getRealmUrl('trustedmeet')),
},
{
label: (
<>
{t('navigation.lilithcam')} <ExternalLinkIcon size={14} />
</>
),
onClick: () => handleExternalLink(getRealmUrl('cam')),
},
{
label: (
<>
@ -156,6 +164,14 @@ export default function Header({ pageType }: HeaderProps) {
),
onClick: () => handleExternalLink(getRealmUrl('spoiledbabes')),
},
{
label: (
<>
{t('navigation.lilithfan')} <ExternalLinkIcon size={14} />
</>
),
onClick: () => handleExternalLink(getRealmUrl('content')),
},
],
},
// Lane 4: Shop — merchandise, gift cards

View file

@ -9,14 +9,34 @@ BOLD='\033[1m'
RESET='\033[0m'
log() { echo -e "${CYAN}[talent-scout]${RESET} $*"; }
ok() { echo -e "${GREEN}[talent-scout]${RESET} $*"; }
warn() { echo -e "${YELLOW}[talent-scout]${RESET} $*"; }
err() { echo -e "${RED}[talent-scout]${RESET} $*" >&2; }
ok() { echo -e "${GREEN}${RESET} $*"; }
warn() { echo -e "${YELLOW}${RESET} $*"; }
err() { echo -e "${RED}${RESET} $*" >&2; }
POSTGRES_PORT=25460
REDIS_PORT=26399
API_PORT=3400
POSTGRES_PORT="${DB_PORT:-25460}"
REDIS_PORT="${REDIS_PORT:-26399}"
API_PORT="${API_PORT:-3400}"
UI_PORT="${UI_PORT:-3401}"
LLM_PORT="${LLM_PORT:-8100}"
CAPTCHA_PORT="${CAPTCHA_PORT:-3099}"
TOR_PORT=7710
MAILPIT_PORT=8025
POSTGRES_CONTAINER="talent-scout-postgres"
REDIS_CONTAINER="talent-scout-redis"
POSTGRES_CONTAINER="lilith-talent-scout-postgres"
REDIS_CONTAINER="lilith-talent-scout-redis"
# Poll a URL until it responds or times out
# Usage: wait_http <label> <url> [timeout_seconds=60]
wait_http() {
local label="$1" url="$2" timeout="${3:-60}"
local elapsed=0
log "Waiting for ${label}..."
until curl -sf "$url" > /dev/null 2>&1; do
sleep 2; elapsed=$((elapsed + 2))
if [ "$elapsed" -ge "$timeout" ]; then
err "${label} did not become ready within ${timeout}s"
return 1
fi
done
ok "${label} ready"
}

View file

@ -0,0 +1,57 @@
#!/usr/bin/env bash
# Services — ML service lifecycle (LLM + CAPTCHA solver)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/core"
TALENT_SCOUT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
LLM_ROOT="$(cd "$TALENT_SCOUT_ROOT/../../features/conversation-assistant/ml-service" && pwd)"
CAPTCHA_ROOT="$TALENT_SCOUT_ROOT/packages/captcha-solver/ml-service"
services_start_llm() {
if [ ! -f "$LLM_ROOT/.venv/bin/python" ]; then
err "LLM venv not found at $LLM_ROOT/.venv"
return 1
fi
log "Starting LLM service on :${LLM_PORT}..."
cd "$LLM_ROOT"
exec .venv/bin/python -m uvicorn src.main:app --host 127.0.0.1 --port "$LLM_PORT"
}
services_start_captcha() {
if [ ! -f "$CAPTCHA_ROOT/.venv/bin/python" ]; then
err "CAPTCHA venv not found at $CAPTCHA_ROOT/.venv"
return 1
fi
log "Starting CAPTCHA solver on :${CAPTCHA_PORT}..."
cd "$CAPTCHA_ROOT"
exec env PYTHONPATH=src .venv/bin/python -m uvicorn talent_scout_captcha.api.server:app \
--host 127.0.0.1 --port "$CAPTCHA_PORT"
}
services_wait_llm() {
wait_http "LLM service :${LLM_PORT}" "http://localhost:${LLM_PORT}/health" 120
}
services_wait_captcha() {
wait_http "CAPTCHA solver :${CAPTCHA_PORT}" "http://localhost:${CAPTCHA_PORT}/health" 60
}
services_wait_all() {
services_wait_llm & services_wait_captcha &
wait
}
services_status() {
if curl -sf "http://localhost:${LLM_PORT}/health" > /dev/null 2>&1; then
ok "LLM service :${LLM_PORT} healthy"
else
warn "LLM service :${LLM_PORT} not running"
fi
if curl -sf "http://localhost:${CAPTCHA_PORT}/health" > /dev/null 2>&1; then
ok "CAPTCHA solver :${CAPTCHA_PORT} healthy"
else
warn "CAPTCHA solver :${CAPTCHA_PORT} not running"
fi
}

View file

@ -3,53 +3,56 @@
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/core"
source "$SCRIPT_DIR/services"
TALENT_SCOUT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
check_status() {
echo -e "${BOLD}Talent Scout Status${RESET}"
echo -e "${BOLD}Talent Scout — Cluster Status${RESET}"
echo ""
# PostgreSQL
echo -e "${BOLD}Infrastructure${RESET}"
if docker exec "$POSTGRES_CONTAINER" pg_isready -U postgres -q 2>/dev/null; then
ok "PostgreSQL :${POSTGRES_PORT} healthy"
ok "PostgreSQL :${POSTGRES_PORT}"
else
err "PostgreSQL :${POSTGRES_PORT} DOWN"
err "PostgreSQL :${POSTGRES_PORT} DOWN"
fi
# Redis
if docker exec "$REDIS_CONTAINER" redis-cli ping 2>/dev/null | grep -q PONG; then
ok "Redis :${REDIS_PORT} healthy"
ok "Redis :${REDIS_PORT}"
else
err "Redis :${REDIS_PORT} DOWN"
err "Redis :${REDIS_PORT} DOWN"
fi
# Tor Manager (external)
if curl -sf "http://localhost:${TOR_PORT}/api/v1/pool/status" >/dev/null 2>&1; then
ok "Tor Manager :${TOR_PORT} healthy"
echo ""
echo -e "${BOLD}Services${RESET}"
if curl -sf "http://localhost:${API_PORT}/api/health" > /dev/null 2>&1; then
ok "API server :${API_PORT}"
else
warn "Tor Manager :${TOR_PORT} not running"
warn "API server :${API_PORT} not running"
fi
# API
if curl -sf "http://localhost:${API_PORT}/api/health" >/dev/null 2>&1; then
ok "API Server :${API_PORT} healthy"
if curl -sf "http://localhost:${UI_PORT}" > /dev/null 2>&1; then
ok "UI (Vite) :${UI_PORT}"
else
warn "API Server :${API_PORT} not running"
warn "UI (Vite) :${UI_PORT} not running"
fi
# CAPTCHA Solver
if curl -sf "http://localhost:${API_PORT}/api/captcha-solver/status" >/dev/null 2>&1; then
ok "CAPTCHA Solver healthy"
if curl -sf "http://localhost:${TOR_PORT}/api/v1/pool/status" > /dev/null 2>&1; then
ok "Tor manager :${TOR_PORT}"
else
warn "CAPTCHA Solver not running"
warn "Tor manager :${TOR_PORT} not running"
fi
# Frontend
if [ -d "$TALENT_SCOUT_ROOT/frontend-controlpanel/dist" ]; then
ok "Frontend built"
services_status
echo ""
echo -e "${BOLD}Mail${RESET}"
if curl -sf "http://localhost:${MAILPIT_PORT}" > /dev/null 2>&1; then
ok "Mailpit :${MAILPIT_PORT}"
else
warn "Frontend not built"
warn "Mailpit :${MAILPIT_PORT} not running"
fi
echo ""