Files
system-plan/ARCHITECTURE.md

258 lines
9.1 KiB
Markdown
Raw Permalink Normal View History

# TZZR - Estado Real del Ecosistema
**Fecha de auditoria:** 2025-12-24
**Ultima actualizacion:** 2025-12-24 (post FASE 0, 1, 3)
**Auditor:** Orchestrator (Architect Agent)
---
## 1. INVENTARIO DE REPOS (23 repos)
### Estado por Categoria
| Estado | Cantidad | Repos |
|--------|----------|-------|
| **IMPLEMENTADO** | 7 | clara, margaret, hst, packet, orchestrator, context, system-plan |
| **PARCIAL** | 4 | grace, penny, the-factory, deck |
| **SOLO DOCS** | 12 | alfred, architect, contratos-comunes, corp, credentials, feldman, jared, locker, mason, sentinel, system, vision-builder |
| **ARCHIVADO** | 1 | mind-link |
---
## 2. ESTADO DETALLADO POR REPO
### IMPLEMENTADOS (codigo funcional y desplegado)
| Repo | Lenguaje | Descripcion Real | Desplegado |
|------|----------|------------------|------------|
| **clara** | Python/Flask | API de ingesta para DECK. Recibe contenedores de PACKET, sube a R2, registra en PostgreSQL | SI (72.62.1.113:5051) |
| **margaret** | Python/Flask | API de ingesta para CORP. Variante de CLARA para servidor empresarial | SI (92.112.181.188:5051) |
| **hst** | Python/Flask | Image server para tags semanticos. Sirve imagenes por subdominios .tzrtech.org | SI (72.62.2.84) |
| **packet** | Flutter/Dart | App movil completa. Captura multimedia, etiqueta con HST, envia a backends | NO (codigo listo) |
| **orchestrator** | Python | Framework multi-agente LLM. Soporta Claude, GPT-4, Gemini | Local only |
| **context** | SQL/Docs | Sistema de bloques de contexto para agentes. 35 bloques en PostgreSQL | SI (architect DB) |
| **system-plan** | Docs | Plan de implementacion y arquitectura del ecosistema | SI (Gitea) |
### PARCIALMENTE IMPLEMENTADOS
| Repo | Contenido Real | Falta |
|------|----------------|-------|
| **grace** | Handler RunPod con 6 modulos (ASR, OCR, TTS, Face, Embeddings, Avatar) | Desplegar en RunPod |
| **penny** | Estructura RunPod para generacion de texto (config, engine, server) | Completar engine, desplegar |
| **the-factory** | Handler RunPod para generacion iterativa | Implementar Director/Evaluator |
| **deck** | Configuracion de servidor (docker, scripts, nginx) + CLARA desplegado | Integrar alfred |
### ARCHIVADOS
| Repo | Razon |
|------|-------|
| **mind-link** | Pausado hasta completar pipeline principal (FASE 4) |
### SOLO DOCUMENTACION (pendientes de implementar)
| Repo | Proposito Documentado | Dependencia |
|------|----------------------|-------------|
| **mason** | Espacio de enriquecimiento | GRACE (RunPod) |
| **feldman** | Consolidacion en bloques | MASON |
| **alfred** | Flujos predefinidos DECK | CLARA (completado) |
| **jared** | Flujos predefinidos CORP | MARGARET (completado) |
| **sentinel** | Auditoria del sistema | Todo el pipeline |
| **vision-builder** | Diseno de visiones | THE FACTORY |
| **locker** | Gateway almacenamiento | R2 (listo) |
---
## 3. MAPA DE DEPENDENCIAS
### Flujo de Datos Principal
```
+-------------------+
| PACKET |
| (App movil) |
+--------+----------+
|
+--------------------+--------------------+
v v v
+--------------+ +--------------+ +--------------+
| CLARA | | MARGARET | |ALFRED/JARED |
| (DECK log) | | (CORP log) | | (flujos) |
| IMPLEMENTADO | | IMPLEMENTADO | | SOLO DOC |
+------+-------+ +------+-------+ +------+-------+
| | |
+--------------------+--------------------+
v
+--------------+
| GRACE |
| (RunPod) |
| PARCIAL |
+------+-------+
v
+--------------+
| MASON |
| SOLO DOC |
+------+-------+
v
+--------------+
| FELDMAN |
| SOLO DOC |
+--------------+
```
### Matriz de Dependencias
| Componente | Depende de | Es dependido por | Estado |
|------------|------------|------------------|--------|
| PACKET | HST, CLARA/MARGARET | Ninguno | LISTO |
| CLARA | PostgreSQL, R2, HST | MASON, FELDMAN | IMPLEMENTADO |
| MARGARET | PostgreSQL, R2, HST | MASON, FELDMAN | IMPLEMENTADO |
| MASON | CLARA/MARGARET, GRACE | FELDMAN | BLOQUEADO (GRACE) |
| FELDMAN | MASON | SENTINEL | BLOQUEADO (MASON) |
| HST | PostgreSQL | PACKET, CLARA, MARGARET | IMPLEMENTADO |
| GRACE | RunPod GPU | PENNY, FACTORY, MASON | PARCIAL |
| LOCKER | Cloudflare R2 | CLARA, MARGARET, FACTORY | LISTO |
---
## 4. INFRAESTRUCTURA ACTUAL
### Servidores
| Servidor | IP | Servicios Activos | Estado |
|----------|-----|-------------------|--------|
| ARCHITECT | 69.62.126.110 | Gitea, Directus, PostgreSQL, Infisical | OK |
| DECK | 72.62.1.113 | Directus, PostgreSQL, Mailcow, CLARA | OK |
| CORP | 92.112.181.188 | Directus, Nextcloud, Odoo, MARGARET, ntfy | OK |
| HST | 72.62.2.84 | Nginx (imagenes), Directus, PostgreSQL | OK |
### Bases de Datos
| Servidor | DB | Tablas de Pipeline |
|----------|-----|-------------------|
| ARCHITECT | architect | context_blocks, agent_context_index |
| DECK | tzzr | clara_log |
| CORP | corp | margaret_log |
| HST | hst_images | 5 tablas de tags (973 registros) |
### Cloudflare R2
| Bucket | Estado | Uso |
|--------|--------|-----|
| architect | Configurado | Backups |
| deck | Activo | Archivos CLARA |
| corp | Activo | Archivos MARGARET |
| hst | Configurado | Imagenes |
| locker | Configurado | Almacenamiento general |
---
## 5. INCONSISTENCIAS RESUELTAS
### Resueltas en FASE 0-3
| ID | Descripcion | Resolucion |
|----|-------------|------------|
| I01 | CLARA no desplegada en DECK | RESUELTO - Docker en 72.62.1.113:5051 |
| I02 | MARGARET solo documentada | RESUELTO - Docker en 92.112.181.188:5051 |
| I03 | PostgreSQL sin tablas de flujo | RESUELTO - clara_log, margaret_log creadas |
| I10 | architect tiene carpetas obsoletas | RESUELTO - Eliminadas app-v2, orchestrator-v3 |
| I11 | mind-link tiene src/ vacio | RESUELTO - Repo archivado |
| I12 | NocoDB referenciado | RESUELTO - Actualizado a Directus |
### Pendientes
| ID | Descripcion | Bloqueador |
|----|-------------|------------|
| I04 | GRACE no desplegado en RunPod | Requiere cuenta RunPod |
| I05 | R2 buckets sin uso intensivo | Pendiente flujo completo |
| I09 | PACKET no publicada | Pendiente priorizar |
---
## 6. SERVICIOS REALES vs DOCUMENTADOS
### DECK (72.62.1.113)
| Servicio | Documentado | Real | Puerto |
|----------|-------------|------|--------|
| PostgreSQL | SI | SI | 5432 |
| Directus | SI | SI | 8055 |
| Mailcow | SI | SI | 443 |
| CLARA | SI | SI | 5051 |
| ALFRED | SI | NO | - |
### CORP (92.112.181.188)
| Servicio | Documentado | Real | Puerto |
|----------|-------------|------|--------|
| PostgreSQL | SI | SI | 5432 |
| Directus | SI | SI | 8055 |
| Nextcloud | SI | SI | 8080 |
| Odoo | SI | SI | 8069 |
| MARGARET | SI | SI | 5051 |
| ntfy | SI | SI | 8880 |
| JARED | SI | NO | - |
### HST (72.62.2.84)
| Servicio | Documentado | Real | Puerto |
|----------|-------------|------|--------|
| Nginx (imagenes) | SI | SI | 80/443 |
| Directus | SI | SI | 8055 |
| PostgreSQL | SI | SI | 5432 |
| API /biblioteca | SI | SI | - |
---
## 7. RESUMEN EJECUTIVO
### Lo que FUNCIONA
1. **HST** - Sistema de tags semanticos operativo
2. **CLARA** - Ingesta DECK funcionando (72.62.1.113:5051)
3. **MARGARET** - Ingesta CORP funcionando (92.112.181.188:5051)
4. **Gitea** - Control de versiones funcional
5. **Directus** - CMS en todos los servidores
6. **PostgreSQL** - Bases de datos con tablas de pipeline
7. **R2** - Buckets activos para CLARA y MARGARET
8. **context** - Sistema de contexto para agentes
### Lo que esta LISTO pero NO DESPLEGADO
1. **PACKET** - App Flutter completa (falta publicar)
2. **GRACE** - Handler RunPod con 6 modulos (falta cuenta RunPod)
### Lo que es SOLO DOCUMENTACION
1. **MASON/FELDMAN** - Bloqueados por GRACE
2. **ALFRED/JARED** - Pueden implementarse ahora
3. **SENTINEL** - Fase final
4. **VISION BUILDER** - Depende de THE FACTORY
### Porcentaje de Implementacion Real
| Area | Antes | Ahora | Cambio |
|------|-------|-------|--------|
| Infraestructura base | 80% | 90% | +10% |
| Servicios de soporte | 60% | 70% | +10% |
| Pipeline de datos | 10% | 40% | +30% |
| Procesamiento IA | 0% | 0% | - |
| Apps de usuario | 0% | 0% | - |
### Siguiente Paso Critico
**GRACE en RunPod** - Desbloquea MASON, FELDMAN y todo el procesamiento IA.
---
## 8. CREDENCIALES DE INSTANCIA
| Servidor | h_instancia | Servicio |
|----------|-------------|----------|
| DECK | f25e44ac3c075f57b9a198c880cb1fc05cf3af56f6466828b405d8c062374179 | CLARA |
| CORP | ea9e99d5f95bcc23749d5f25b71a5b520ae7917438912fc6e29564534484a514 | MARGARET |
---
*Documento actualizado automaticamente - 2025-12-24*