# Tareas programadas — optimización y migración a 192.168.1.16

**Host EQUIPITELLO:** desarrollo, XAMPP, bridge :8095  
**Servidor IA:** `192.168.1.16` — Ollama :11434, Supervisor :8787, Qdrant, Docker

---

## Inventario actual (ArranqueProcesos.txt)

| Tarea / Startup | Qué hace | RAM/CPU | ¿Migrar a .16? |
|-----------------|----------|---------|----------------|
| **RoyalBrokerStartup.cmd** | Arranca RoyalBroker + PM2 tray | Media | **No** — negocio local + puerto :8086 |
| **AnyDesk** | Remoto escritorio | Baja | **No** — acceso a EQUIPITELLO |
| **Tailscale** | VPN mesh | ~260 MB | **En ambos** — ya en .16 si está instalado |
| **ALimpiezasAtLogon** | Stack ALimpiezas (Apache + OCR) | Media | **No** — sirve `:80/ALimpiezas` local |
| **ALimpiezasTrayWatchdog** | Bandeja systray ALimpiezas | Baja | **No** — UI Windows local |
| **CursorBridgeAtLogon** | `cursor-bridge-manager.ps1 -Restart` | Media | **Parcial** — ver abajo |
| **CursorBridgeTray** | Icono bandeja System Manager | Baja | **No** — UI Windows |
| **CursorBridgeWatchdog** | Health `/health` cada 5 min | Baja | **Sí** — mover a cron en .16 |
| **PM2Tray** | Bandeja captajaus | Baja | **No** — duplica CaptaJaus; **deshabilitar** |
| **Avira_Security_Systray** | AV systray | Baja | **No** |

---

## Matriz de decisión

### Quedan en EQUIPITELLO (obligatorio local)

- XAMPP Apache/MySQL (lab :9080, prod local)
- Bridge Express **:8095** (Mission Control, mock, manager) — el operador accede desde PC/móvil Tailscale
- PM2 apps: captajaus :3000, royalbroker :8086, ALimpiezas OCR :8090
- Bandejas systray (UX operador Windows)
- AnyDesk + Tailscale cliente

### Migrar / centralizar en 192.168.1.16

| Carga | Servicio destino | Implementación |
|-------|------------------|----------------|
| **RAG / ingest conversaciones** | Qdrant + pipeline supervisor | Cron HTTP supervisor `:8787/api/ingest` |
| **Watchdog bridge** | Supervisor health job | GET `http://100.78.198.98:8095/health` cada 5 min desde .16 |
| **Sync prod→lab BD** | Tarea en .16 o supervisor | Ya documentado `XZonas-Lab-Sync-Prod`; puede ejecutarse desde .16 vía SSH SiteGround |
| **F6 mirror htdocs** | `F6-MirrorHtdocsToServer` en .16 | Ya existe en EQUIPITELLO-LAB-IA.md — **mover tarea a .16** |
| **Ollama inferencia pesada** | `:11434` en .16 | EQUIPITELLO usa `OLLAMA_HOST=http://192.168.1.16:11434` (no cargar modelos locales) |
| **BERT/ML/Puppeteer NSSM** | Servicios Disabled | **Reactivar solo en .16** dentro de Docker, no en EQUIPITELLO |

### Optimizar en EQUIPITELLO (sin migrar)

| Acción | Ahorro estimado |
|--------|-----------------|
| Deshabilitar **PM2Tray** (duplicado) | 1 proceso PowerShell |
| Unificar **CursorBridgeAtLogon** delay 25s → 60s | Menos contención al login |
| **Watchdog bridge** 5 min → 15 min (si no se migra a .16) | −66% ejecuciones PS |
| Reducir Chrome tabs / extensiones IDE | **4–6 GB RAM** |
| `WSearch` Manual si no buscas en Windows | CPU en idle |
| Servicios Auto detenidos → Manual (informe System Manager) | Menos intentos de arranque |

---

## Plan de implementación (3 oleadas)

### Oleada A — Ya (scripts locales)

```powershell
# 1. Reparar MCP + deshabilitar agentes redundantes Cursor
.\tools\fix-ide-mcp-equipitello.ps1

# 2. Deshabilitar PM2Tray duplicado
Disable-ScheduledTask -TaskName 'PM2Tray' -ErrorAction SilentlyContinue

# 3. Bridge watchdog menos agresivo (opcional)
# Editar install-bridge-autostart.ps1 RepetitionInterval 15 min
```

### Oleada B — Servidor .16 (operador en el host)

1. Instalar tarea `Equipitello-Bridge-Watchdog` en .16 que llame `:8095/health`.
2. Mover `F6-MirrorHtdocsToServer` a .16 (libera CPU/RAM en login EQUIPITELLO).
3. Configurar ingest RAG: export chats bridge → POST supervisor.

### Oleada C — Panel LAB PREMIUM

URL: `http://127.0.0.1:8095/lab-premium/` — unifica estado, tareas, seguridad, aprendizaje.

---

## Puertos — quién escucha dónde

| Puerto | EQUIPITELLO | 192.168.1.16 |
|--------|-------------|--------------|
| 8095 | cursor-mobile-bridge | — |
| 8787 | — | multiagent-supervisor |
| 11434 | (opcional local) | **Ollama principal** |
| 6333 | — | Qdrant |
| 9080 | XAMPP lab | — |
| 3306 | MySQL XAMPP | — (bind 127.0.0.1 recomendado) |

---

## Verificación

```powershell
# Estado stacks EQUIPITELLO
C:\xampp\htdocs\cursor-mobile-bridge\tools\equipitello\status.ps1 -Pretty

# Supervisor IA remoto
Invoke-RestMethod http://192.168.1.16:8787/health -TimeoutSec 5
```
