8795f2842b
Panels: Connection + Agents + Logs + Status Feed.
- HTTP GET /agents + POST /agents/{id}/{start,stop,restart}
- SSE streaming: /sse/agents/{id}/logs + /sse/status
- DPAPI/XOR credential storage in local_files/agents_dashboard.db
- data_table style agents table with filter + status icons
- SQLite migrations via sqlite3_exec at startup
- --self-test mode: db + secret_store round-trip + subsystem checks
- pytest mock server emulating agents_and_robots API
Registry functions: http_request_cpp_core, sse_client_cpp_core,
secret_store_cpp_infra, logger_cpp_core
App icon: robot phosphor violet-500 (#8b5cf6)
Issue: 0129
Co-Authored-By: fn-orquestador <noreply@fn-registry.local>
80 lines
2.7 KiB
Markdown
80 lines
2.7 KiB
Markdown
---
|
|
name: agents_dashboard
|
|
lang: cpp
|
|
domain: tools
|
|
description: "Frontend C++ ImGui para gestionar agentes Matrix (agents_and_robots) via HTTPS+apikey, SSE para logs/status en vivo"
|
|
icon:
|
|
phosphor: "robot"
|
|
accent: "#8b5cf6"
|
|
tags: [agents, dashboard, sse, http-client, imgui]
|
|
version: 0.1.0
|
|
uses_functions:
|
|
- http_request_cpp_core
|
|
- http_get_json_cpp_core
|
|
- sse_client_cpp_core
|
|
- secret_store_cpp_infra
|
|
- logger_cpp_core
|
|
uses_types: []
|
|
framework: "imgui"
|
|
entry_point: "main.cpp"
|
|
dir_path: "projects/element_agents/apps/agents_dashboard"
|
|
repo_url: "https://gitea.organic-machine.com/dataforge/agents_dashboard"
|
|
e2e_checks:
|
|
- id: build
|
|
cmd: "cmake --build /home/lucas/fn_registry/cpp/build/windows --target agents_dashboard -j"
|
|
timeout_s: 180
|
|
- id: self_test
|
|
cmd: "/home/lucas/fn_registry/cpp/build/windows/apps/agents_dashboard/agents_dashboard.exe --self-test"
|
|
timeout_s: 30
|
|
- id: pytest_mock
|
|
cmd: "cd /home/lucas/fn_registry/projects/element_agents/apps/agents_dashboard/tests && python3 -m pytest -x -q"
|
|
timeout_s: 60
|
|
---
|
|
|
|
# agents_dashboard
|
|
|
|
Frontend C++ ImGui para gestionar agentes Matrix de agents_and_robots via HTTPS + apikey. SSE para logs y status feed en vivo.
|
|
|
|
## Panels
|
|
|
|
- **Connection** — base_url + apikey input (masked), Test button, LED status SSE. Save credentials cifradas en `local_files/agents_dashboard.db`.
|
|
- **Agents** — tabla con id, status (icon colored), uptime, msg_24h, botones Start/Stop/Restart/Logs por fila.
|
|
- **Logs** — selector agente + tail buffer SSE (5000 lineas), autoscroll, pause.
|
|
- **Status Feed** — panel colapsable con eventos del `/sse/status` en tiempo real.
|
|
|
|
## Persistencia
|
|
|
|
- `local_files/agents_dashboard.db` (SQLite) — tabla `connections` (apikey cifrada DPAPI/XOR), `app_state`.
|
|
- Migraciones en `migrations/001_init.sql` aplicadas via sqlite3_exec al arrancar.
|
|
|
|
## Build
|
|
|
|
```bash
|
|
cmake --build cpp/build/windows --target agents_dashboard -j
|
|
```
|
|
|
|
## Deploy local (Windows)
|
|
|
|
```bash
|
|
./fn run redeploy_cpp_app_windows agents_dashboard projects/element_agents/apps/agents_dashboard --build
|
|
```
|
|
|
|
## Self-test
|
|
|
|
```bash
|
|
./cpp/build/windows/apps/agents_dashboard/agents_dashboard.exe --self-test
|
|
# exit 0: db OK, secret_store round-trip OK, subsystems OK
|
|
```
|
|
|
|
## Registry functions used
|
|
|
|
- `http_request_cpp_core` — GET/POST /agents + /agents/{id}/{action}
|
|
- `http_get_json_cpp_core` — /health check
|
|
- `sse_client_cpp_core` — /sse/agents/{id}/logs + /sse/status
|
|
- `secret_store_cpp_infra` — DPAPI Windows / XOR Linux para apikey en SQLite
|
|
- `logger_cpp_core` — logging en memoria + archivo
|
|
|
|
## Capability growth log
|
|
|
|
v0.1.0 (2026-05-22) — Paneles Connection + Agents + Logs + Status Feed. HTTPS+apikey, SSE reconnect, DPAPI credentials.
|