feat: merge Oasis 0.7.6 upstream — Graphos, E2E, peers/stats, AUTOMATIZACION
Cambios aplicados desde epsylon/oasis 3d46340 (0.7.6):
NUEVO MÓDULO Graphos (mapa interactivo de la red):
- src/views/graphos_view.js (nuevo)
LÓGICA:
- src/backend/nameCache.js (nuevo) — NameAuthor resolver
- src/models/chats_model.js — encriptación E2E
- src/models/calendars_model.js — E2E + calendar invites con códigos
- src/models/maps_model.js — E2E + CLOSED enforcement
- src/models/tribes_model.js — sub-tribe access control (PRESERVA nuestro inviteLog)
- src/models/tribe_crypto.js — soporte E2E
- src/models/main_models.js — refactor (PRESERVA nuestro pub-invite SSB msg)
- src/models/{activity,banking,pads,search,stats,tags,tribes_content}_model.js
- src/backend/backend.js — searchModel constructor + new helpers (errorView, safeRefererRedirect)
- src/backend/blobHandler.js, renderTextWithStyles.js
- src/views/main_views.js — añadido userLink/userLinkLabel + nameCache import (mantiene nuestro hamburger menu)
VISUAL:
- 31 views actualizadas con refactor a userLink helper
- src/views/peers_view.js — tabla con keys clicables
- src/views/stats_view.js — dashboard avanzado
- src/client/assets/styles/style.css — merge (preserva nuestras adiciones QR/mobile)
- Temas desktop: Clear, Dark, Matrix, Purple
- Translations 11 idiomas (ar, de, en, es, eu, fr, hi, it, pt, ru, zh)
- src/configs/{config-manager,oasis-config}, server/SSB_server.js, oasis_client.js
SKIPS (intencionalmente):
- OasisMobile.css del upstream (mantenemos NUESTRO mobile.css y theme)
- main_views.js menu reorganization (mantenemos hamburger nav)
- @xenova/transformers (LLM, no viable mobile)
- node-llama-cpp (build nativo no soportado en arm64 mobile)
- pdfjs-dist (pendiente probar luego)
- AI/embedder.js + AI/routes_index.js (dependen de las libs LLM)
server/package.json: version 0.7.5 → 0.7.6
AUTOMATIZACIÓN:
- Nueva carpeta AUTOMATIZACION/ con 10 archivos:
- 4 opciones (cron simple, multi-agente, GitHub Actions, webhook)
- Setup Debian completo paso a paso
- Scripts bash listos: scout, merger, builder, notify-telegram
- Prompts listos para los agentes
- Sección /testing-app para 0asis.net
- Human-in-the-loop: archivos prohibidos para auto-merge
PENDIENTE: build APK (el bash tool tuvo timeouts; usar comandos
de CONTEXT/cambio_apk_repack.txt manualmente).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
13161b2158
commit
3a3563f2a0
84 changed files with 5842 additions and 1621 deletions
136
AUTOMATIZACION/05_OPCION_D_webhook_reactivo.txt
Normal file
136
AUTOMATIZACION/05_OPCION_D_webhook_reactivo.txt
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
===============================================================
|
||||
OPCIÓN D — WEBHOOK REACTIVO
|
||||
===============================================================
|
||||
|
||||
ARQUITECTURA
|
||||
------------
|
||||
GitHub publica un release
|
||||
↓
|
||||
Webhook POST → tu VPS:5000/api/oasis-release
|
||||
↓
|
||||
El endpoint dispara el pipeline (B u otro)
|
||||
↓
|
||||
APK lista en minutos
|
||||
|
||||
|
||||
COMPONENTES NECESARIOS
|
||||
----------------------
|
||||
- VPS público con HTTPS (Let's Encrypt vale)
|
||||
- Dominio o IP fija
|
||||
- Nginx o Caddy como reverse proxy
|
||||
- Servicio webhook receiver (Python Flask / Node Express / Go)
|
||||
- Secret compartido para verificar firma de GitHub
|
||||
|
||||
|
||||
WEBHOOK CONFIG EN GITHUB (en repo oasis_mobile fork)
|
||||
-----------------------------------------------------
|
||||
Settings → Webhooks → Add webhook
|
||||
Payload URL: https://your-vps.com/api/oasis-release
|
||||
Content type: application/json
|
||||
Secret: <generar 32 bytes random>
|
||||
Events: only "Releases"
|
||||
|
||||
NOTA IMPORTANTE: GitHub solo dispara webhooks de TU repo,
|
||||
no del repo upstream de epsylon. Hay dos formas:
|
||||
|
||||
a) Hacer fork de oasis y configurar webhook ahí
|
||||
- Cada push del upstream se replica si tienes
|
||||
sync activo
|
||||
b) Poll periódico al upstream desde tu VPS y dispara
|
||||
internamente cuando detectas nuevo release
|
||||
- Más simple, no requiere fork
|
||||
- Recomendado
|
||||
|
||||
|
||||
RECEIVER ENDPOINT (Flask, en Python)
|
||||
-------------------------------------
|
||||
/opt/oasis-webhook/app.py:
|
||||
|
||||
from flask import Flask, request, abort
|
||||
import hmac, hashlib, subprocess
|
||||
|
||||
app = Flask(__name__)
|
||||
SECRET = open("/opt/oasis-webhook/secret").read().strip()
|
||||
|
||||
@app.post("/api/oasis-release")
|
||||
def release():
|
||||
sig = request.headers.get("X-Hub-Signature-256", "")
|
||||
mac = hmac.new(SECRET.encode(), request.data, hashlib.sha256)
|
||||
expected = "sha256=" + mac.hexdigest()
|
||||
if not hmac.compare_digest(sig, expected):
|
||||
abort(401)
|
||||
event = request.headers.get("X-GitHub-Event")
|
||||
if event != "release":
|
||||
return "skip", 200
|
||||
payload = request.json
|
||||
action = payload.get("action")
|
||||
if action == "published":
|
||||
tag = payload["release"]["tag_name"]
|
||||
subprocess.Popen(["/opt/scripts/oasis-scout.sh", "--tag", tag])
|
||||
return "ok", 200
|
||||
|
||||
|
||||
ALTERNATIVA POLL (sin webhook, más simple)
|
||||
-------------------------------------------
|
||||
Cada 30 min un cron consulta:
|
||||
curl -s https://api.github.com/repos/epsylon/oasis/releases/latest
|
||||
Si el tag es nuevo (no está en /var/oasis-auto/seen-tags.txt):
|
||||
1. Añadir a seen-tags
|
||||
2. Disparar scout
|
||||
|
||||
|
||||
SYSTEMD SERVICE (recomendado para uptime)
|
||||
------------------------------------------
|
||||
/etc/systemd/system/oasis-webhook.service:
|
||||
|
||||
[Unit]
|
||||
Description=Oasis webhook receiver
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=oasis
|
||||
WorkingDirectory=/opt/oasis-webhook
|
||||
ExecStart=/usr/bin/python3 -m gunicorn -b 127.0.0.1:5000 app:app
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
|
||||
CADDY CONFIG (reverse proxy)
|
||||
----------------------------
|
||||
/etc/caddy/Caddyfile:
|
||||
|
||||
your-vps.com {
|
||||
handle /api/oasis-release {
|
||||
reverse_proxy 127.0.0.1:5000
|
||||
}
|
||||
handle /testing-app/* {
|
||||
root * /var/oasis-auto/apks
|
||||
file_server browse
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PROS
|
||||
----
|
||||
- Reacción casi en tiempo real (segundos)
|
||||
- No esperas al lunes
|
||||
- Si combina con cron de respaldo, robusto
|
||||
|
||||
|
||||
CONTRAS
|
||||
-------
|
||||
- Requiere VPS público con dominio
|
||||
- Hay que gestionar HTTPS (Caddy/Let's Encrypt lo hace fácil)
|
||||
- Si el webhook falla por red, hay que tener fallback
|
||||
|
||||
|
||||
RECOMENDACIÓN: COMBINAR WEBHOOK + CRON DE RESPALDO
|
||||
---------------------------------------------------
|
||||
Webhook dispara scout inmediatamente cuando hay release.
|
||||
Cron semanal lunes 03:00 también dispara scout para no
|
||||
perder oportunidades si el webhook falló.
|
||||
|
||||
Scout debe ser idempotente: si ya procesó el commit X,
|
||||
no debe procesarlo de nuevo.
|
||||
Loading…
Add table
Add a link
Reference in a new issue