Añade launchers de macOS/Linux con un click y hace runtime_control cross-platform

Equivalentes .command (doble-clic en Finder) de los .bat de Windows:
- setup_mac.command: bootstrap con un click (detecta Python 3.10+, crea .venv,
  instala requirements + Chromium de Playwright, copia .env.example -> .env).
- start/stop/restart/start_persistent_profile.command: espejo de los .bat,
  lanzan el server con nohup usando el python del .venv.
- mp_common.sh: helper compartido (raíz, venv, banners).

runtime_control.py ahora es cross-platform (IS_WINDOWS): lsof/ps/pgrep/kill en
POSIX, netstat/PowerShell/taskkill en Windows. _kill_tree_posix mata el árbol
padre+worker de uvicorn con SIGTERM.

.venv/ añadido a .gitignore. Docs actualizadas (CLAUDE.md, AGENTS.md,
PLAYWRIGHT_SESSION.md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-30 15:02:47 -06:00
parent a35d26fac0
commit 2a37a4ffbf
11 changed files with 525 additions and 26 deletions
Executable
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# ---------------------------------------------------------------------------
# stop.command — Equivalente macOS/Linux de stop.bat.
# Delega TODO a runtime_control.py para garantizar que solo se detiene MP
# Manager (nunca otro proyecto Python que escuche en el puerto 8000).
#
# Acepta los mismos flags que el .bat, p.ej.:
# ./stop.command --force (apaga también instancias huérfanas sin server_info)
# ---------------------------------------------------------------------------
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/mp_common.sh"
banner "MP Manager - Deteniendo Servidor Monte Providencia"
PY="$(require_venv)" || { hold_window; exit 1; }
set +e
"$PY" runtime_control.py stop "$@"
RC=$?
set -e
hold_window
exit "$RC"