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
122
AUTOMATIZACION/02_OPCION_A_cron_simple.txt
Normal file
122
AUTOMATIZACION/02_OPCION_A_cron_simple.txt
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
===============================================================
|
||||
OPCIÓN A — CRON + CLAUDE HEADLESS
|
||||
===============================================================
|
||||
|
||||
ARQUITECTURA
|
||||
------------
|
||||
cron (lunes 03:00) → bash script → claude -p "..." → APK lista
|
||||
|
||||
|
||||
REQUISITOS EN EL VPS DEBIAN
|
||||
---------------------------
|
||||
- Claude Code instalado y autenticado (claude login)
|
||||
- Git CLI
|
||||
- Android SDK build-tools (zipalign, apksigner)
|
||||
- Keystore copiado: /home/sito/oasis-release-key.jks
|
||||
- Clon del repo oasis_mobile en /opt/oasis_mobile
|
||||
- Acceso al upstream: git remote add upstream
|
||||
https://github.com/epsylon/oasis.git
|
||||
- ANTHROPIC_API_KEY exportada en .bashrc del usuario
|
||||
|
||||
|
||||
ESTRUCTURA DE ARCHIVOS
|
||||
----------------------
|
||||
/opt/oasis_mobile/
|
||||
.git/
|
||||
nodejs-project/...
|
||||
CONTEXT/
|
||||
AUTOMATIZACION/
|
||||
|
||||
/opt/scripts/
|
||||
oasis-auto-update.sh <- script principal
|
||||
oasis-build-apk.sh <- build/sign APK
|
||||
oasis-notify-telegram.sh <- enviar APK por bot
|
||||
|
||||
/var/log/oasis-auto/
|
||||
YYYY-MM-DD.log <- logs por ejecución
|
||||
|
||||
|
||||
CRON ENTRY
|
||||
----------
|
||||
0 3 * * 1 /opt/scripts/oasis-auto-update.sh \
|
||||
> /var/log/oasis-auto/$(date +\%Y-\%m-\%d).log 2>&1
|
||||
|
||||
|
||||
ESQUELETO DEL SCRIPT (oasis-auto-update.sh)
|
||||
-------------------------------------------
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
cd /opt/oasis_mobile
|
||||
|
||||
git fetch upstream
|
||||
HEAD_OLD=$(git rev-parse HEAD)
|
||||
UPSTREAM_HEAD=$(git rev-parse upstream/main)
|
||||
|
||||
if [ "$HEAD_OLD" = "$UPSTREAM_HEAD" ]; then
|
||||
echo "No hay cambios upstream. Salgo."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Crear branch para el intento
|
||||
BRANCH="auto-merge-$(date +%Y%m%d)"
|
||||
git checkout -b "$BRANCH"
|
||||
|
||||
# Invocar claude con el prompt
|
||||
claude -p "$(cat /opt/scripts/prompts/auto-merge.md)" \
|
||||
--allowed-tools "Read,Write,Edit,Bash"
|
||||
|
||||
# Build APK si no hay conflictos
|
||||
if ! git diff --name-only --diff-filter=U | grep -q .; then
|
||||
bash /opt/scripts/oasis-build-apk.sh
|
||||
bash /opt/scripts/oasis-notify-telegram.sh \
|
||||
"APK $(date +%Y-%m-%d) lista en /opt/oasis_mobile/apk/"
|
||||
else
|
||||
bash /opt/scripts/oasis-notify-telegram.sh \
|
||||
"Conflictos en merge automático. Revisa $BRANCH."
|
||||
fi
|
||||
|
||||
|
||||
PROMPT BASE PARA CLAUDE
|
||||
-----------------------
|
||||
Lee CONTEXT/cambio_apk_repack.txt y CONTEXT/tareas_usabilidad.txt
|
||||
para entender el proyecto.
|
||||
|
||||
Tu tarea:
|
||||
1. Compara HEAD con upstream/main.
|
||||
2. Aplica SOLO cambios safe a la rama actual:
|
||||
- views nuevos (graphos_view, markdown.js, etc)
|
||||
- models nuevos (preservando inviteLog en tribes_model)
|
||||
- translations (todos los idiomas)
|
||||
- peers_view, stats_view (visuales)
|
||||
3. NO toques:
|
||||
- main_views.js
|
||||
- assets/themes/OasisMobile.css
|
||||
- assets/styles/mobile.css
|
||||
- server/package.json (deps: @xenova/transformers, node-llama-cpp)
|
||||
4. Si encuentras conflictos en archivos críticos, NO los resuelvas
|
||||
automáticamente. Deja el conflicto marker y termina.
|
||||
5. Commit con mensaje "feat: merge upstream vX.Y.Z (auto)"
|
||||
y co-author Claude.
|
||||
|
||||
Reporta qué archivos copiaste, cuáles dejaste, y cualquier
|
||||
conflicto encontrado.
|
||||
|
||||
|
||||
PROS DE ESTA OPCIÓN
|
||||
-------------------
|
||||
- Setup en 1 hora
|
||||
- Sin orquestación compleja
|
||||
- Cron + log = simple de debuggear
|
||||
|
||||
CONTRAS
|
||||
-------
|
||||
- Un único prompt grande puede fallar parcialmente
|
||||
- Si claude se queda sin context, no se entera de ello
|
||||
- Difícil intervenir a mitad
|
||||
|
||||
|
||||
CUÁNDO MIGRAR A OTRA OPCIÓN
|
||||
---------------------------
|
||||
Si al 3er intento sale algo mal automatizado, pasar a opción B
|
||||
(multi-agente). El coste extra de setup vale la pena para tener
|
||||
fallos aislados y reportes parciales.
|
||||
Loading…
Add table
Add a link
Reference in a new issue