auto(0129): agents_dashboard — secret_store_cpp_infra + CMakeLists register #4
@@ -34,6 +34,11 @@ echo $PORT > .jupyter-port
|
||||
|
||||
source .venv/bin/activate 2>/dev/null || true
|
||||
|
||||
# IPython startup: cargar .ipython/ local (FN_REGISTRY_ROOT, helpers, sys.path)
|
||||
if [ -d "$(pwd)/.ipython" ]; then
|
||||
export IPYTHONDIR="$(pwd)/.ipython"
|
||||
fi
|
||||
|
||||
if ! python -c "import jupyter_collaboration" 2>/dev/null; then
|
||||
echo "ERROR: jupyter-collaboration no esta instalado"
|
||||
echo "Instala con: uv add jupyter-collaboration"
|
||||
|
||||
@@ -33,7 +33,24 @@ import sqlite3
|
||||
from pathlib import Path
|
||||
|
||||
# ── FN_REGISTRY_ROOT ────────────────────────────────────────
|
||||
FN_REGISTRY_ROOT = Path("${registry_root}")
|
||||
# Prioridad: env var > path hardcoded > descubrimiento automatico
|
||||
def _discover_registry_root():
|
||||
if os.environ.get("FN_REGISTRY_ROOT"):
|
||||
return Path(os.environ["FN_REGISTRY_ROOT"]).resolve()
|
||||
hardcoded = Path("${registry_root}")
|
||||
if (hardcoded / "registry.db").exists():
|
||||
return hardcoded
|
||||
# Subir desde CWD hasta encontrar registry.db
|
||||
p = Path.cwd()
|
||||
for _ in range(10):
|
||||
if (p / "registry.db").exists():
|
||||
return p
|
||||
if p.parent == p:
|
||||
break
|
||||
p = p.parent
|
||||
return hardcoded
|
||||
|
||||
FN_REGISTRY_ROOT = _discover_registry_root()
|
||||
os.environ["FN_REGISTRY_ROOT"] = str(FN_REGISTRY_ROOT)
|
||||
|
||||
# ── sys.path: importar funciones Python del registry ────────
|
||||
|
||||
Reference in New Issue
Block a user