Files
graph_explorer/app.md
T
egutierrez 30f6f3758f feat(jobs): runtime Python embebido + cadena de fallback (issue 0033 fase B)
Permite distribuir graph_explorer.exe Windows sin dependencia de WSL
ni del .venv del registry. Tambien funciona en Linux como bundle
autocontenido portable.

Cambios:

1. tools/freeze_python_runtime.sh
   - Linux: copia python-build-standalone (uv) ~87 MB,
     elimina marker EXTERNALLY-MANAGED, instala wheels.
   - Windows: descarga python-3.12.7-embed-amd64.zip oficial
     (~12 MB), habilita site-packages, instala wheels via
     pip install --target --platform win_amd64.
   - Idempotente via runtime/.lock con SHA256 del estado.
   - Lee python_runtime_deps del frontmatter de app.md.

2. jobs.cpp::cached_python_runtime() — resolver con cadena:
     1. <exe_dir>/runtime/python/{python.exe|bin/python3}  (embedded)
     2. $FN_PYTHON                                         (env)
     3. <registry_root>/python/.venv/bin/python3           (registry_venv)
     4. python3 del PATH                                   (system)
   Loggea procedencia al iniciar jobs_init.

3. POSIX run_subprocess: usa el runtime resuelto en lugar del
   path hardcodeado.

4. Windows run_subprocess: ramifica por needs_wsl. Si embedded
   o env, lanza Python Windows nativo via CreateProcessW
   directamente (run_path tambien Windows nativo). Solo el
   legacy registry_venv sigue por wsl.exe.

5. app.md: nuevos campos python_runtime: true y
   python_runtime_deps: [requests, certifi, urllib3].

6. .gitignore extendido con runtime/, projects/, _vendored/,
   .vendor.lock, binarios Go de enrichers.

Tests: 26/26 verde — 16 originales + 6 dispatcher fase A + 4
nuevos del resolver fase B (con/sin embed, FN_PYTHON, idempotencia
del freeze script).

Smoke E2E manual: runtime/python/bin/python3 ejecuta web_search
con cwd /tmp y registry_root pasado en ctx, sin tocar el .venv del
registry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 16:51:02 +02:00

3.0 KiB

name, lang, domain, description, tags, uses_functions, uses_types, framework, entry_point, dir_path, repo_url, python_runtime, python_runtime_deps
name lang domain description tags uses_functions uses_types framework entry_point dir_path repo_url python_runtime python_runtime_deps
graph_explorer cpp viz Visor de grafos GPU-accelerated agnostico del backend. Lee operations.db de cualquier app del registry y permite explorar entidades/relaciones con shapes/iconos/layouts/filtros.
imgui
graph
osint
visualization
gpu
graph_renderer_cpp_viz
graph_force_layout_cpp_viz
graph_force_layout_gpu_cpp_viz
graph_layouts_cpp_viz
graph_viewport_cpp_viz
graph_labels_cpp_viz
graph_icons_cpp_viz
graph_sources_cpp_viz
toolbar_cpp_core
modal_dialog_cpp_core
select_cpp_core
text_input_cpp_core
tree_view_cpp_core
page_header_cpp_core
fullscreen_window_cpp_core
imgui main.cpp projects/osint_graph/apps/graph_explorer https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/dataforge/graph_explorer true
requests
certifi
urllib3

Arquitectura

App C++ ImGui para explorar cualquier operations.db del registry como un grafo de entidades y relaciones. Agnostica del backend — el dispatcher en data.{h,cpp} selecciona el GraphLoadFn segun --input (hoy solo operations, manana json/jsonl/graphml).

Capas:

  • data.{h,cpp} — dispatcher de sources. Hoy unica implementacion: graph_load_from_operations (issue 0049g).
  • types_registry.{h,cpp} — parser minimo de YAML para sobrescribir color/shape/icon/style por nombre de tipo. Construye el IconAtlas con los codepoints Tabler resueltos por tabler_codepoint_by_name.
  • views.{h,cpp} — paneles Toolbar, Legend, Inspector, Stats. Toggle via AppConfig::panels.
  • main.cpp — CLI + fn::run_app + bucle de force layout (CPU/GPU) + glue.
  • graph_explorer.db — SQLite junto al exe. Tabla layouts(graph_hash, node_id, x, y, pinned, updated_at). Persistencia de posiciones por grafo.

CLI

graph_explorer [<operations.db>]
graph_explorer --input operations <path>
graph_explorer --types <yaml>
graph_explorer --layout force|grid|circular|radial|hierarchical|fixed
graph_explorer apps/registry_dashboard/operations.db
graph_explorer --types projects/osint_graph/apps/graph_explorer/examples/types.yaml \
               apps/element_agents/operations.db

Build

cd cpp
cmake -B build/linux -S .
cmake --build build/linux --target graph_explorer -j$(nproc)
./build/linux/apps/graph_explorer/graph_explorer apps/registry_dashboard/operations.db

Notas

  • Usa GPU layout si el contexto soporta compute 4.3; toggle CPU/GPU desde la toolbar. Fallback transparente a CPU si GPU no esta disponible.
  • 50k nodos a 60fps con layout GPU (medido en demos/graph en primitives_gallery).
  • operations.db se abre con mode=ro cuando el path no apunta al filesystem propio para evitar lock con otras apps que esten escribiendo.
  • El graph_hash se calcula a partir del path canonico del input. Mismo path = mismo grafo a efectos de layout guardado.