Skip to content

Conversation

@smouj
Copy link
Owner

@smouj smouj commented Feb 2, 2026

Motivation

  • Corregir el wizard de instalación para que los binds nunca queden vacíos y usar loopback por defecto (evitar el fallo al pulsar Enter).
  • Reforzar la filosofía security-first: loopback-only por defecto, sanitización de inputs y allowlist de acciones para OpenClaw.
  • Convertir ClawDesk en un Control Center real para OpenClaw con gestión interactiva de agentes, skills y configuración.
  • Alinear instalador remoto y versionado, y actualizar dependencias inseguras (tar) para reducir riesgos.

Description

  • Reescritura y refactor del instalador install.sh: separación de binds (APP_BIND vs GATEWAY_BIND), defaults visibles a 127.0.0.1, normalización si el usuario pulsa Enter, validación y bloqueo de binds inseguros, búsqueda automática de puertos libres, soporte no-interactivo (INSTALL_NONINTERACTIVE) y resumen final + self-test (/api/health).
  • Mejora del instalador remoto scripts/install-remote.sh: soporte CLAWDESK_CHANNEL=nightly (instala desde main), soporte CLAWDESK_VERSION=vX.Y.Z desde Releases con verificación SHA256 estricta y errores claros si faltan assets.
  • Endurecimiento del servidor y API: nuevos módulos server/openclaw/* y rutas seguras para agents, skills, config y doctor; allowlist para comandos OpenClaw; runOpenClaw sanitiza argumentos y usa execFile sin shell; rate limiting, CORS/host allowlist y redacción de secretos en respuestas/logs.
  • UI/UX: nueva navegación y páginas (Agentes, Skills, Configuración, Seguridad, Logs), renders y store ampliados, formularios guiados (validación JSON, backups/restores), toasts y diagnósticos en español; app/js/api.js expone nuevos endpoints cliente.
  • Dependencias y docs: package.json actualizado (tar^7.5.7) y package-lock.json ajustado; README.md, docs/ y RELEASE_NOTES.md reescritos para quickstart, canales y recomendaciones de seguridad.

Testing

  • npm install ejecutado en el repo: la instalación de dependencias completó OK tras actualizar tar a ^7.5.7, con 5 moderate severity vulnerabilities reportadas (sin high severity actualmente).
  • Arranque manual del servidor con node server/index.js produjo log de disponibilidad y el endpoint respondió HTTP 200; curl -I http://127.0.0.1:4178 devolvió 200 OK.
  • Se probaron health checks mediante curl en /api/health y el self-test del instalador ahora valida accesibilidad del servicio; en caso de fallo el instalador informa dónde ver logs.
  • Intentos automáticos de captura con Playwright para validar UI fallaron con net::ERR_EMPTY_RESPONSE durante la sesión (no bloqueante para la entrega), por lo que no se incluyó una captura funcional en este PR.

Codex Task

@smouj smouj merged commit db49e4a into main Feb 2, 2026
1 check failed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7769c5fe2c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +66 to +74
const toggleSkill = (name, enabled) => {
const source = resolveSkillsList();
const skills = source.list.map((skill) => ({ ...skill }));
const target = skills.find((skill) => skill.name === name);
if (!target) {
throw new Error("Skill no encontrada");
}
target.enabled = Boolean(enabled);
writeSkillsConfig({ skills });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Persist skill toggles to the correct config source

When openclaw.json already contains a skills list, resolveSkillsList() returns that as the active source, but toggleSkill() always writes updates to skills.json. In this scenario, the UI toggle appears to succeed but the source of truth (openclaw.json) is never updated, and subsequent reads still reflect the old state. This breaks toggling for any install that defines skills in openclaw.json (the code explicitly prefers it). Consider writing back to the same source that was read or updating openclaw.json when it owns the skills list.

Useful? React with 👍 / 👎.

Comment on lines +25 to +32
const writeOpenclawConfig = (data) => {
ensureDir(OPENCLAW_DIR);
if (fs.existsSync(OPENCLAW_CONFIG_PATH)) {
const stamp = new Date().toISOString().replace(/[:.]/g, "-");
const backup = `${OPENCLAW_CONFIG_PATH}.bak-${stamp}`;
fs.copyFileSync(OPENCLAW_CONFIG_PATH, backup);
}
writeJson(OPENCLAW_CONFIG_PATH, data);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor custom OPENCLAW_CONFIG_PATH directory when writing

writeOpenclawConfig() (and similarly writeSkillsConfig()) always calls ensureDir(OPENCLAW_DIR), even when OPENCLAW_CONFIG_PATH points to a different directory. If a user sets OPENCLAW_CONFIG_PATH (or OPENCLAW_SKILLS_PATH) without also setting OPENCLAW_CONFIG_DIR, the parent directory of the target file may not exist and writeJson() will fail with ENOENT. This makes /config writes or skill toggles fail in custom-path deployments; consider ensuring path.dirname(OPENCLAW_CONFIG_PATH) (or the skills path) instead.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant