# Environment

## Server (debian-ai)
- **OS**: Debian 13, **GPU**: RTX 2080 Ti 11GB
- **llama-swap**: port :9292, serves 6 active models
- **llama.cpp**: sm75 build (b9743, 2026-06-20)
- **Active fleet**: qwen36-35b-mtp (230K, primary daily, original Q4_K_M), gemma-26b-200k (230K, deep reasoning), ornith-35b-q6-mtp (131K, APEX I-Compact), qwythos-9b-mtp-q6 (131K, fastest, v3), ornith-9b-mtp-q5 (96K, MTP Q6_K)
- **Hermes gateway**: 0.0.0.0:18789, dashboard :9119 (no-auth)

## CachyOS (192.168.1.111)
- **Shell**: fish, **Desktop**: KDE
- **SSH**: `ssh raymond@192.168.1.111 bash -c 'command'`
- **GUI tools**: OpenCode Desktop (AUR), Interpreter Desktop (AppImage), Cursor IDE

## Connectivity
- **Debian shutdown**: HARD-BLOCKED. Physical button or `ssh rurouni@192.168.1.50 sudo poweroff` only.
- **Hermes Desktop** (CachyOS): `~/.config/Hermes/connection.json` — mode=remote, authMode=token, empty token

# Conventions

## SSH
- Debian SSH: publickey auth fails from agent session. Agent runs locally — no SSH needed.
- CachyOS: `ssh raymond@192.168.1.111 bash -c 'command'`
- If SSH fails 2-3 times with timeout, stop and give user CLI commands to run manually.

## File paths
- `~/.hermes/` — Hermes home
- `~/.hermes/config.yaml` — Config
- `~/.hermes/logs/` — Logs (gateway.log, agent.log)
- `~/Unspooled/` — Main Android TV dev project
- `~/Scraper Suite/` — 8 scraper tools

# Development

## Unspooled Android TV App
- Stremio-compatible debrid streaming Android TV app (Compose)
- **45 scrapers, 82 extractors, 5 debrid providers**
- Stremio addon protocol, Trakt, Supabase auth
- `NEXSTREAM_SCRAPER_URL` must be set in `local.properties`
- **Sidebar icons**: `Color.White.copy(alpha = 0.55f)` minimum. Red left accent bar (3dp).
- **RealDebrid**: `instantAvailability` DEPRECATED (error 37). Use `addMagnet` + `check status`.

## Local Models
- All via llama-swap :9292 (OpenAI-compatible `/v1/chat/completions`)
- Hermes custom provider: `custom:local-llm-(llama-swap)`
- Context compression uses DeepSeek API, not local models

## Infrastructure
- Tailscale: 100.x.x.x, LAN: 192.168.1.0/24
- Always bind to 0.0.0.0 on trusted LAN
- Caddy reverse proxy with X-App-Token header auth for app services
