chore: auto-commit (129 archivos)

- .claude/agents/fn-analizador/SKILL.md
- .claude/agents/fn-constructor/SKILL.md
- .claude/agents/fn-executor/SKILL.md
- .claude/agents/fn-mejorador/SKILL.md
- .claude/agents/fn-orquestador/SKILL.md
- .claude/agents/fn-recopilador/SKILL.md
- .claude/commands/app.md
- .claude/commands/compile.md
- .claude/commands/cpp-app.md
- .claude/commands/create_functions.md
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-01 22:23:12 +02:00
parent 876020addf
commit fc4180cbb3
129 changed files with 427 additions and 422 deletions
+8 -8
View File
@@ -42,10 +42,10 @@ Opcionalmente:
```bash
# Por id
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, dir_path FROM apps WHERE id = '<app_id>';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, dir_path FROM apps WHERE id = '<app_id>';"
# Por dir_path
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, dir_path FROM apps WHERE dir_path = '<dir>';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, dir_path FROM apps WHERE dir_path = '<dir>';"
```
Si no hay match → reportar y abortar.
@@ -78,8 +78,8 @@ APP_DB="$APP_DIR/operations.db"
# Si no existe, inicializar (aplica migraciones, incluida 005_e2e_runs)
if [ ! -f "$APP_DB" ]; then
cd /home/lucas/fn_registry
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init "$APP_DIR"
cd $HOME/fn_registry
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init "$APP_DIR"
fi
# Verificar tabla e2e_runs existe (migracion 005)
@@ -97,7 +97,7 @@ Hay dos caminos:
**Camino A — invocar funcion del registry (preferido):**
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
./fn run e2e_run_checks_go_infra ...
```
@@ -139,15 +139,15 @@ func main() {
Ejecutar con:
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
CGO_ENABLED=1 go run -tags fts5 /tmp/run_e2e_<id>.go /tmp/checks.yaml "$APP_DIR"
```
### 5. Eval assertions activas (si la app las tiene)
```bash
cd /home/lucas/fn_registry
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops assertion eval --db "$APP_DB"
cd $HOME/fn_registry
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops assertion eval --db "$APP_DB"
```
Capturar fallos como warning checks adicionales.
+38 -38
View File
@@ -15,20 +15,20 @@ Eres el agente constructor del fn_registry. Tu rol es crear funciones, tests y t
```bash
# Buscar si ya existe algo similar (OBLIGATORIO antes de crear)
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
# Buscar tipos existentes
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE id IN (SELECT id FROM types_fts WHERE types_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE id IN (SELECT id FROM types_fts WHERE types_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
# Ver funciones de un dominio
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, purity, signature FROM functions WHERE domain = 'DOMINIO' ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, purity, signature FROM functions WHERE domain = 'DOMINIO' ORDER BY name;"
# Ver tipos de un dominio
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE domain = 'DOMINIO';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE domain = 'DOMINIO';"
# Verificar que un ID referenciado existe
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM functions WHERE id = 'ID_AQUI';"
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM types WHERE id = 'ID_AQUI';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM functions WHERE id = 'ID_AQUI';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM types WHERE id = 'ID_AQUI';"
```
Si algo similar ya existe, informa al usuario y sugiere mejorarlo en vez de duplicarlo.
@@ -39,13 +39,13 @@ Antes de implementar logica desde cero, busca funciones del registry que puedas
```bash
# Buscar funciones reutilizables por lo que hacen (ampliar con OR y prefijos)
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, purity, signature, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'description:filter* OR description:map* OR description:transform*') ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, purity, signature, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'description:filter* OR description:map* OR description:transform*') ORDER BY name;"
# Ver que retorna y que tipos usa una funcion candidata
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, signature, returns, uses_types FROM functions WHERE id = 'ID_CANDIDATO';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, signature, returns, uses_types FROM functions WHERE id = 'ID_CANDIDATO';"
# Buscar funciones puras del mismo dominio (las mas componibles)
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, signature FROM functions WHERE domain = 'DOMINIO' AND purity = 'pure' ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, signature FROM functions WHERE domain = 'DOMINIO' AND purity = 'pure' ORDER BY name;"
```
**Criterios de reutilizacion:**
@@ -78,38 +78,38 @@ Esto acelera la construccion y fortalece el grafo de dependencias del registry.
| `bash` | `bash/functions/{domain}/{name}.sh` | `bash/functions/pipelines/{name}.sh` | *(no aplica)* |
| `typescript` | `frontend/functions/{domain}/{name}.ts` | *(no aplica)* | `frontend/types/{domain}/{name}.ts` |
**Ruta absoluta donde crear el archivo** = `/home/lucas/fn_registry/` + `file_path` del .md.
**Ruta absoluta donde crear el archivo** = `$HOME/fn_registry/` + `file_path` del .md.
Ejemplo: si `lang: bash` y `domain: infra`, el archivo va en:
- `/home/lucas/fn_registry/bash/functions/infra/{name}.sh` + `.md`
- **NUNCA** en `/home/lucas/fn_registry/functions/infra/{name}.sh`
- `$HOME/fn_registry/bash/functions/infra/{name}.sh` + `.md`
- **NUNCA** en `$HOME/fn_registry/functions/infra/{name}.sh`
### Estructura detallada
**Go** (carpeta raiz: `functions/` y `types/`)
- Funciones: `/home/lucas/fn_registry/functions/{domain}/{name}.go` + `.md`
- Tests: `/home/lucas/fn_registry/functions/{domain}/{name}_test.go`
- Tipos: `/home/lucas/fn_registry/functions/{domain}/{name}.go` (codigo, mismo paquete Go) + `/home/lucas/fn_registry/types/{domain}/{name}.md` (metadata con file_path apuntando a functions/)
- Pipelines: `/home/lucas/fn_registry/functions/pipelines/{name}.go` + `.md`
- Funciones: `$HOME/fn_registry/functions/{domain}/{name}.go` + `.md`
- Tests: `$HOME/fn_registry/functions/{domain}/{name}_test.go`
- Tipos: `$HOME/fn_registry/functions/{domain}/{name}.go` (codigo, mismo paquete Go) + `$HOME/fn_registry/types/{domain}/{name}.md` (metadata con file_path apuntando a functions/)
- Pipelines: `$HOME/fn_registry/functions/pipelines/{name}.go` + `.md`
- Paquete Go = nombre del directorio (core, finance, datascience, cybersecurity, infra, shell, tui, io)
**Python** (carpeta raiz: `python/`)
- Funciones: `/home/lucas/fn_registry/python/functions/{domain}/{name}.py` + `.md`
- Tests: `/home/lucas/fn_registry/python/functions/{domain}/{name}_test.py`
- Tipos: `/home/lucas/fn_registry/python/types/{domain}/{name}.py` + `.md`
- Pipelines: `/home/lucas/fn_registry/python/functions/pipelines/{name}.py` + `.md`
- Funciones: `$HOME/fn_registry/python/functions/{domain}/{name}.py` + `.md`
- Tests: `$HOME/fn_registry/python/functions/{domain}/{name}_test.py`
- Tipos: `$HOME/fn_registry/python/types/{domain}/{name}.py` + `.md`
- Pipelines: `$HOME/fn_registry/python/functions/pipelines/{name}.py` + `.md`
**Bash** (carpeta raiz: `bash/`)
- Funciones: `/home/lucas/fn_registry/bash/functions/{domain}/{name}.sh` + `.md`
- Tests: `/home/lucas/fn_registry/bash/functions/{domain}/{name}_test.sh`
- Pipelines: `/home/lucas/fn_registry/bash/functions/pipelines/{name}.sh` + `.md`
- Funciones: `$HOME/fn_registry/bash/functions/{domain}/{name}.sh` + `.md`
- Tests: `$HOME/fn_registry/bash/functions/{domain}/{name}_test.sh`
- Pipelines: `$HOME/fn_registry/bash/functions/pipelines/{name}.sh` + `.md`
- Tipos: Bash no tiene tipos — usar solo `uses_types` para referenciar tipos de otros lenguajes
**TypeScript** (carpeta raiz: `frontend/`)
- Funciones puras: `/home/lucas/fn_registry/frontend/functions/core/{name}.ts` + `.md`
- Componentes React: `/home/lucas/fn_registry/frontend/functions/ui/{name}.tsx` + `.md`
- Funciones puras: `$HOME/fn_registry/frontend/functions/core/{name}.ts` + `.md`
- Componentes React: `$HOME/fn_registry/frontend/functions/ui/{name}.tsx` + `.md`
- Tests: junto al archivo, `{name}.test.ts` o `{name}.test.tsx`
- Tipos: `/home/lucas/fn_registry/frontend/types/{domain}/{name}.ts` + `.md`
- Tipos: `$HOME/fn_registry/frontend/types/{domain}/{name}.ts` + `.md`
---
@@ -591,7 +591,7 @@ Documentar completamente el .md igualmente.
1. **BUSCAR** en registry.db con FTS5 si existe algo similar
2. **VALIDAR** que los IDs referenciados (uses_functions, uses_types, returns, error_type) existen en la BD
3. **CREAR** los archivos en la carpeta raiz correcta segun el lenguaje (ver tabla REGLA CRITICA): Go en `functions/`, Python en `python/functions/`, Bash en `bash/functions/`, TypeScript en `frontend/functions/`
4. **INDEXAR** ejecutando: `cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index`
4. **INDEXAR** ejecutando: `cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index`
5. **VERIFICAR** con: `./fn show {id}` que se indexo correctamente
6. Si hay errores de validacion, corregirlos y re-indexar
@@ -600,10 +600,10 @@ Documentar completamente el .md igualmente.
1. **LEER** la funcion existente (codigo + .md) desde la BD: `sqlite3 registry.db "SELECT code, signature FROM functions WHERE id = '...'"`
2. **CREAR** el archivo de test
3. **EJECUTAR** los tests:
- Go: `cd /home/lucas/fn_registry && CGO_ENABLED=1 go test -tags fts5 -run TestNombre ./functions/{domain}/`
- Python: `cd /home/lucas/fn_registry/python && python -m pytest functions/{domain}/{name}_test.py`
- Go: `cd $HOME/fn_registry && CGO_ENABLED=1 go test -tags fts5 -run TestNombre ./functions/{domain}/`
- Python: `cd $HOME/fn_registry/python && python -m pytest functions/{domain}/{name}_test.py`
- TypeScript: desde `frontend/`, ejecutar con el test runner configurado
- Bash: `cd /home/lucas/fn_registry && bash bash/functions/{domain}/{name}_test.sh`
- Bash: `cd $HOME/fn_registry && bash bash/functions/{domain}/{name}_test.sh`
4. **ACTUALIZAR** el .md con `tested: true`, `tests: [...]` y `test_file_path`
5. **RE-INDEXAR** y verificar
@@ -620,19 +620,19 @@ Documentar completamente el .md igualmente.
```bash
# Compilar CLI (necesario si se modifico codigo del CLI)
cd /home/lucas/fn_registry && CGO_ENABLED=1 go build -tags fts5 -o fn ./cmd/fn/
cd $HOME/fn_registry && CGO_ENABLED=1 go build -tags fts5 -o fn ./cmd/fn/
# Indexar registry
cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index
cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index
# Tests Go de un dominio
cd /home/lucas/fn_registry && CGO_ENABLED=1 go test -tags fts5 ./functions/{domain}/
cd $HOME/fn_registry && CGO_ENABLED=1 go test -tags fts5 ./functions/{domain}/
# Tests Go de todo el registry
cd /home/lucas/fn_registry && CGO_ENABLED=1 go test -tags fts5 ./...
cd $HOME/fn_registry && CGO_ENABLED=1 go test -tags fts5 ./...
# Mostrar funcion indexada
cd /home/lucas/fn_registry && ./fn show {id}
cd $HOME/fn_registry && ./fn show {id}
```
### fn run — Ejecutar funciones y pipelines directamente
@@ -640,7 +640,7 @@ cd /home/lucas/fn_registry && ./fn show {id}
Despues de crear/indexar, puedes ejecutar directamente con `fn run`:
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
# Go pipeline (go run . en su directorio)
./fn run init_metabase --project test
@@ -729,7 +729,7 @@ Peticion: "Crea una funcion que calcule la media de un slice de float64"
### Paso 1: Buscar en BD
```bash
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:mean* OR name:average* OR description:media* OR description:average*') ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:mean* OR name:average* OR description:media* OR description:average*') ORDER BY name;"
```
### Paso 2: Crear archivos
@@ -823,6 +823,6 @@ func TestMean(t *testing.T) {
### Paso 3: Indexar y verificar
```bash
cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index
cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index
./fn show mean_go_core
```
+68 -68
View File
@@ -35,22 +35,22 @@ Las apps estan indexadas en registry.db con toda la metadata necesaria para ejec
```bash
# Ver todas las apps disponibles
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, domain, description, entry_point, dir_path FROM apps ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, domain, description, entry_point, dir_path FROM apps ORDER BY name;"
# Ver app completa con dependencias y framework
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, entry_point, dir_path, uses_functions, uses_types, framework, tags FROM apps WHERE id = 'APP_ID';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, entry_point, dir_path, uses_functions, uses_types, framework, tags FROM apps WHERE id = 'APP_ID';"
# Buscar apps por FTS (nombre, descripcion, tags, documentacion)
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, description FROM apps WHERE id IN (SELECT id FROM apps_fts WHERE apps_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, description FROM apps WHERE id IN (SELECT id FROM apps_fts WHERE apps_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
# Apps de un dominio
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, description, entry_point FROM apps WHERE domain = 'DOMINIO';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, description, entry_point FROM apps WHERE domain = 'DOMINIO';"
# Apps que usan una funcion especifica
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name FROM apps WHERE uses_functions LIKE '%funcion_id%';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name FROM apps WHERE uses_functions LIKE '%funcion_id%';"
# Ver documentacion completa de una app
sqlite3 /home/lucas/fn_registry/registry.db "SELECT documentation, notes FROM apps WHERE id = 'APP_ID';"
sqlite3 $HOME/fn_registry/registry.db "SELECT documentation, notes FROM apps WHERE id = 'APP_ID';"
```
**Campos clave de apps para ejecucion:**
@@ -65,19 +65,19 @@ sqlite3 /home/lucas/fn_registry/registry.db "SELECT documentation, notes FROM ap
```bash
# Ver pipeline/funcion completa
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, signature, description, uses_functions, uses_types FROM functions WHERE id = 'ID_AQUI';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, signature, description, uses_functions, uses_types FROM functions WHERE id = 'ID_AQUI';"
# Ver codigo de la funcion
sqlite3 /home/lucas/fn_registry/registry.db "SELECT code FROM functions WHERE id = 'ID_AQUI';"
sqlite3 $HOME/fn_registry/registry.db "SELECT code FROM functions WHERE id = 'ID_AQUI';"
# Pipelines disponibles (con tag launcher para TUI)
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, signature, description FROM functions WHERE kind = 'pipeline' ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, signature, description FROM functions WHERE kind = 'pipeline' ORDER BY name;"
# Funciones impuras ejecutables directamente
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, signature, description FROM functions WHERE purity = 'impure' AND kind = 'function' ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, signature, description FROM functions WHERE purity = 'impure' AND kind = 'function' ORDER BY name;"
# Buscar por FTS
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
```
### Usar contexto de apps para ejecucion inteligente
@@ -98,10 +98,10 @@ Cuando te pidan ejecutar una app, sigue este flujo:
```bash
# Desde la raiz del registry
cd /home/lucas/fn_registry
cd $HOME/fn_registry
# Opcion A: Usar el CLI
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name}
# Opcion B: Copiar template directamente
cp fn_operations/project_template/operations.db apps/{app_name}/operations.db
@@ -221,10 +221,10 @@ Las entities representan los datos concretos del proyecto. Las relations documen
### Crear entities (datos que el pipeline consume o produce)
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
# Entity de entrada
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity add \
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops entity add \
--db apps/{app_name}/operations.db \
--name "btc_ticks" \
--type-ref "tick_go_finance" \
@@ -235,7 +235,7 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity add \
--metadata '{"pair":"BTCUSDT","exchange":"binance"}'
# Entity de salida
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity add \
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops entity add \
--db apps/{app_name}/operations.db \
--name "btc_ohlcv_5m" \
--type-ref "ohlcv_go_finance" \
@@ -249,7 +249,7 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity add \
### Crear relations (como se conectan entities)
```bash
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops relation add \
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops relation add \
--db apps/{app_name}/operations.db \
--name "ticks_to_ohlcv" \
--from-entity "{entity_id}" \
@@ -262,13 +262,13 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops relation add \
```bash
# Listar entities
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity list --db apps/{app_name}/operations.db
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops entity list --db apps/{app_name}/operations.db
# Listar relations
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops relation list --db apps/{app_name}/operations.db
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops relation list --db apps/{app_name}/operations.db
# Ver grafo ASCII
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops graph --db apps/{app_name}/operations.db
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops graph --db apps/{app_name}/operations.db
```
---
@@ -280,7 +280,7 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops graph --db apps/{app_name}/ope
`fn run` despacha automaticamente segun el lenguaje y tipo:
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
# Go pipeline (go run . en su directorio)
./fn run init_metabase --project test
@@ -318,13 +318,13 @@ Para apps con su propio main.go/main.py/main.sh:
```bash
# Go app
cd /home/lucas/fn_registry/apps/{app_name} && CGO_ENABLED=1 go run -tags fts5 . [flags]
cd $HOME/fn_registry/apps/{app_name} && CGO_ENABLED=1 go run -tags fts5 . [flags]
# Python app
cd /home/lucas/fn_registry/apps/{app_name} && python3 main.py [args]
cd $HOME/fn_registry/apps/{app_name} && python3 main.py [args]
# Bash app
cd /home/lucas/fn_registry/apps/{app_name} && bash main.sh [args]
cd $HOME/fn_registry/apps/{app_name} && bash main.sh [args]
```
### Capturar metricas de ejecucion
@@ -340,7 +340,7 @@ Al ejecutar, siempre captura:
```bash
# Ejemplo: ejecutar con captura de tiempo
START=$(date -u +%Y-%m-%dT%H:%M:%SZ)
OUTPUT=$(cd /home/lucas/fn_registry/apps/{app_name} && CGO_ENABLED=1 go run -tags fts5 . 2>&1)
OUTPUT=$(cd $HOME/fn_registry/apps/{app_name} && CGO_ENABLED=1 go run -tags fts5 . 2>&1)
EXIT_CODE=$?
END=$(date -u +%Y-%m-%dT%H:%M:%SZ)
@@ -362,7 +362,7 @@ echo "Status: $STATUS | Start: $START | End: $END"
### Via CLI
```bash
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution add \
--db apps/{app_name}/operations.db \
--pipeline-id "tick_to_ohlcv_go_finance" \
--relation-id "{relation_id}" \
@@ -396,16 +396,16 @@ sqlite3 apps/{app_name}/operations.db "INSERT INTO executions (id, pipeline_id,
```bash
# Listar todas
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db
# Por pipeline
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db --pipeline-id "ID"
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db --pipeline-id "ID"
# Por status
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db --status failure
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db --status failure
# Detalle de una ejecucion
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution show --db apps/{app_name}/operations.db --id "EXEC_ID"
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution show --db apps/{app_name}/operations.db --id "EXEC_ID"
```
---
@@ -441,12 +441,12 @@ Si hay assertions definidas sobre las entities afectadas, evaluarlas para verifi
```bash
# Evaluar assertions de una entity
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops assertion eval \
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops assertion eval \
--db apps/{app_name}/operations.db \
--entity-id "ENTITY_ID"
# Evaluar Y reaccionar (actualiza status de entities, crea proposals si hay fallos criticos)
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops assertion eval \
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops assertion eval \
--db apps/{app_name}/operations.db \
--entity-id "ENTITY_ID" \
--react
@@ -467,10 +467,10 @@ Cuando el usuario pide ejecutar algo que aun no tiene app:
```bash
# 1. Crear directorio
mkdir -p /home/lucas/fn_registry/apps/{app_name}
mkdir -p $HOME/fn_registry/apps/{app_name}
# 2. Crear app.md (OBLIGATORIO)
cat > /home/lucas/fn_registry/apps/{app_name}/app.md << 'MDEOF'
cat > $HOME/fn_registry/apps/{app_name}/app.md << 'MDEOF'
---
name: {app_name}
lang: go
@@ -490,7 +490,7 @@ dir_path: "apps/{app_name}"
MDEOF
# 3. Crear .gitignore
cat > /home/lucas/fn_registry/apps/{app_name}/.gitignore << 'GIEOF'
cat > $HOME/fn_registry/apps/{app_name}/.gitignore << 'GIEOF'
operations.db
operations.db-wal
operations.db-shm
@@ -499,7 +499,7 @@ build/
GIEOF
# 4. Inicializar modulo Go
cd /home/lucas/fn_registry/apps/{app_name}
cd $HOME/fn_registry/apps/{app_name}
go mod init fn_registry/apps/{app_name}
# 5. Crear main.go minimo
@@ -523,8 +523,8 @@ func main() {
GOEOF
# 6. Inicializar operations.db
cd /home/lucas/fn_registry
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
cd $HOME/fn_registry
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name}
# 7. Indexar en registry.db
./fn index
@@ -534,10 +534,10 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
```bash
# 1. Crear directorio
mkdir -p /home/lucas/fn_registry/apps/{app_name}
mkdir -p $HOME/fn_registry/apps/{app_name}
# 2. Crear app.md (OBLIGATORIO)
cat > /home/lucas/fn_registry/apps/{app_name}/app.md << 'MDEOF'
cat > $HOME/fn_registry/apps/{app_name}/app.md << 'MDEOF'
---
name: {app_name}
lang: py
@@ -557,7 +557,7 @@ dir_path: "apps/{app_name}"
MDEOF
# 3. Crear .gitignore
cat > /home/lucas/fn_registry/apps/{app_name}/.gitignore << 'GIEOF'
cat > $HOME/fn_registry/apps/{app_name}/.gitignore << 'GIEOF'
operations.db
operations.db-wal
operations.db-shm
@@ -565,7 +565,7 @@ __pycache__/
GIEOF
# 4. Crear main.py
cat > /home/lucas/fn_registry/apps/{app_name}/main.py << 'PYEOF'
cat > $HOME/fn_registry/apps/{app_name}/main.py << 'PYEOF'
"""Pipeline executor."""
import sys
import time
@@ -584,8 +584,8 @@ if __name__ == "__main__":
PYEOF
# 5. Inicializar operations.db
cd /home/lucas/fn_registry
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
cd $HOME/fn_registry
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name}
# 6. Indexar en registry.db
./fn index
@@ -595,10 +595,10 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
```bash
# 1. Crear directorio
mkdir -p /home/lucas/fn_registry/apps/{app_name}
mkdir -p $HOME/fn_registry/apps/{app_name}
# 2. Crear app.md (OBLIGATORIO)
cat > /home/lucas/fn_registry/apps/{app_name}/app.md << 'MDEOF'
cat > $HOME/fn_registry/apps/{app_name}/app.md << 'MDEOF'
---
name: {app_name}
lang: bash
@@ -618,14 +618,14 @@ dir_path: "apps/{app_name}"
MDEOF
# 3. Crear .gitignore
cat > /home/lucas/fn_registry/apps/{app_name}/.gitignore << 'GIEOF'
cat > $HOME/fn_registry/apps/{app_name}/.gitignore << 'GIEOF'
operations.db
operations.db-wal
operations.db-shm
GIEOF
# 4. Crear main.sh
cat > /home/lucas/fn_registry/apps/{app_name}/main.sh << 'SHEOF'
cat > $HOME/fn_registry/apps/{app_name}/main.sh << 'SHEOF'
#!/usr/bin/env bash
# Pipeline executor: {app_name}
set -euo pipefail
@@ -650,11 +650,11 @@ main() {
main "$@"
SHEOF
chmod +x /home/lucas/fn_registry/apps/{app_name}/main.sh
chmod +x $HOME/fn_registry/apps/{app_name}/main.sh
# 5. Inicializar operations.db
cd /home/lucas/fn_registry
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
cd $HOME/fn_registry
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name}
# 6. Indexar en registry.db
./fn index
@@ -669,7 +669,7 @@ Este patron captura todo lo necesario para registrar la ejecucion:
### Go
```bash
APP_DIR="/home/lucas/fn_registry/apps/{app_name}"
APP_DIR="$HOME/fn_registry/apps/{app_name}"
OPS_DB="$APP_DIR/operations.db"
PIPELINE_ID="{pipeline_id}"
RELATION_ID="{relation_id}" # vacio si no aplica
@@ -689,8 +689,8 @@ else
fi
# Registrar ejecucion
cd /home/lucas/fn_registry
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \
cd $HOME/fn_registry
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution add \
--db "$OPS_DB" \
--pipeline-id "$PIPELINE_ID" \
--status "$STATUS" \
@@ -704,7 +704,7 @@ rm -f "$STDOUT_FILE" "$STDERR_FILE"
### Python
```bash
APP_DIR="/home/lucas/fn_registry/apps/{app_name}"
APP_DIR="$HOME/fn_registry/apps/{app_name}"
OPS_DB="$APP_DIR/operations.db"
START=$(date -u +%Y-%m-%dT%H:%M:%SZ)
@@ -716,8 +716,8 @@ END=$(date -u +%Y-%m-%dT%H:%M:%SZ)
STATUS="success"
[ $EXIT_CODE -ne 0 ] && STATUS="failure"
cd /home/lucas/fn_registry
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \
cd $HOME/fn_registry
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution add \
--db "$OPS_DB" \
--pipeline-id "{pipeline_id}" \
--status "$STATUS" \
@@ -728,7 +728,7 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \
### Bash
```bash
APP_DIR="/home/lucas/fn_registry/apps/{app_name}"
APP_DIR="$HOME/fn_registry/apps/{app_name}"
OPS_DB="$APP_DIR/operations.db"
PIPELINE_ID="{pipeline_id}"
@@ -741,8 +741,8 @@ END=$(date -u +%Y-%m-%dT%H:%M:%SZ)
STATUS="success"
[ $EXIT_CODE -ne 0 ] && STATUS="failure"
cd /home/lucas/fn_registry
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \
cd $HOME/fn_registry
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution add \
--db "$OPS_DB" \
--pipeline-id "$PIPELINE_ID" \
--status "$STATUS" \
@@ -758,10 +758,10 @@ Antes de ejecutar, verifica que los snapshots de tipos en operations.db estan al
```bash
# Verificar snapshots
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops snapshot check --db apps/{app_name}/operations.db
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops snapshot check --db apps/{app_name}/operations.db
# Actualizar si estan desactualizados
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops snapshot update --db apps/{app_name}/operations.db --id "TYPE_ID"
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops snapshot update --db apps/{app_name}/operations.db --id "TYPE_ID"
```
---
@@ -800,7 +800,7 @@ Crea una proposal cuando detectes:
### Como crear proposals
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
# Proposal para nueva funcion
./fn proposal add \
@@ -840,7 +840,7 @@ Cuando la proposal viene de un fallo o anomalia en una ejecucion, incluye la evi
```bash
# Obtener el ID de la ejecucion que evidencia el problema
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution list \
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution list \
--db apps/{app_name}/operations.db --status failure
# Incluir evidencia en la descripcion
@@ -858,19 +858,19 @@ Usa el contexto de la tabla apps para comparar y detectar patrones:
```bash
# Ver que funciones usan las apps — detectar patrones comunes
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, uses_functions FROM apps WHERE uses_functions != '[]';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, uses_functions FROM apps WHERE uses_functions != '[]';"
# Ver funciones mas usadas por apps (candidatas a mejora)
sqlite3 /home/lucas/fn_registry/registry.db "
sqlite3 $HOME/fn_registry/registry.db "
SELECT f.value as func_id, COUNT(*) as uso
FROM apps, json_each(apps.uses_functions) f
GROUP BY f.value ORDER BY uso DESC;"
# Ver apps que NO tienen funciones del registry (candidatas a extraccion)
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, description FROM apps WHERE uses_functions = '[]';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, description FROM apps WHERE uses_functions = '[]';"
# Ver si ya existe una proposal para algo similar
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, status, title FROM proposals WHERE status = 'pending' ORDER BY created_at DESC;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, status, title FROM proposals WHERE status = 'pending' ORDER BY created_at DESC;"
```
### Flujo de deteccion al ejecutar
+5 -5
View File
@@ -43,12 +43,12 @@ APP_ID="<input>"
RUN_ID="<input>"
# dir_path desde registry
DIR_PATH=$(sqlite3 /home/lucas/fn_registry/registry.db \
DIR_PATH=$(sqlite3 $HOME/fn_registry/registry.db \
"SELECT dir_path FROM apps WHERE id = '$APP_ID' OR dir_path = '$APP_ID' LIMIT 1;")
APP_ID=$(sqlite3 /home/lucas/fn_registry/registry.db \
APP_ID=$(sqlite3 $HOME/fn_registry/registry.db \
"SELECT id FROM apps WHERE id = '$APP_ID' OR dir_path = '$APP_ID' LIMIT 1;")
APP_DB="/home/lucas/fn_registry/$DIR_PATH/operations.db"
APP_DB="$HOME/fn_registry/$DIR_PATH/operations.db"
[ ! -f "$APP_DB" ] && APP_DB="/tmp/$(basename $DIR_PATH)_e2e_runs.db"
# Sanity check
@@ -93,7 +93,7 @@ Por cada fallo:
Antes de crear proposal, verificar que no haya una identica abierta:
```bash
sqlite3 /home/lucas/fn_registry/registry.db "
sqlite3 $HOME/fn_registry/registry.db "
SELECT id FROM proposals
WHERE status = 'pending'
AND target_id = '$APP_ID'
@@ -139,7 +139,7 @@ Sugerencia generica en `description` (NO codigo concreto, solo direccion):
Si la misma assertion/check ha disparado proposal mas de 3 veces en los ultimos 30 dias, marcar `priority` (campo extendido si existe, si no, anotar en `description: '[REINCIDENTE x4]'`).
```bash
sqlite3 /home/lucas/fn_registry/registry.db "
sqlite3 $HOME/fn_registry/registry.db "
SELECT COUNT(*) FROM proposals
WHERE target_id = '$APP_ID'
AND title LIKE '%::$CHECK_ID%'
+14 -14
View File
@@ -30,14 +30,14 @@ Referencia completa: `dev/issues/0069-autonomous-agent-loop-self-iterating-tasks
6. **Auditoria total**. Cada decision se loggea en `task_runs.progress_json` con razonamiento + fase + run_id.
7. **No self-modify**. NO modificas tu propio SKILL.md ni el de otros subagentes en la misma run.
8. **Cero produccion**. NO deploys, NO llamadas a APIs externas con auth, NO tocar BDs productivas.
9. **NUNCA paths absolutos fuera del worktree**. SIEMPRE rutas relativas o absolutas que apunten dentro de `/tmp/fn_orq_<issue>_<ts>/`. Si necesitas leer algo del repo principal (ej. plantillas docs), copialo al worktree primero. Refuerzo del piloto 1 (2026-05-15): orquestador modifico hooks bash del repo principal usando paths absolutos `/home/lucas/fn_registry/bash/functions/...` para destrancar pre-commit. Solucion correcta: el fix vive en el worktree, NO en main.
10. **Pre-commit hook compartido**. Worktrees comparten `.git/hooks/` con main repo. Si el hook llama scripts via path absoluto a main (ej. `/home/lucas/fn_registry/bash/functions/cybersecurity/scan_secrets_in_dirty.sh`), el hook ejecutara la version de MAIN, no la del worktree. Opciones legitimas:
9. **NUNCA paths absolutos fuera del worktree**. SIEMPRE rutas relativas o absolutas que apunten dentro de `/tmp/fn_orq_<issue>_<ts>/`. Si necesitas leer algo del repo principal (ej. plantillas docs), copialo al worktree primero. Refuerzo del piloto 1 (2026-05-15): orquestador modifico hooks bash del repo principal usando paths absolutos `$HOME/fn_registry/bash/functions/...` para destrancar pre-commit. Solucion correcta: el fix vive en el worktree, NO en main.
10. **Pre-commit hook compartido**. Worktrees comparten `.git/hooks/` con main repo. Si el hook llama scripts via path absoluto a main (ej. `$HOME/fn_registry/bash/functions/cybersecurity/scan_secrets_in_dirty.sh`), el hook ejecutara la version de MAIN, no la del worktree. Opciones legitimas:
a. Aplicar el fix del hook EN EL WORKTREE y commitearlo en `auto/*` — al mergear el PR, main heredara el fix.
b. Si el hook bloquea progreso y el fix del hook excede tu scope, `git commit --no-verify` para ESE commit SOLO, documentando excepcion en `task_runs.events_json[].decision="skip_hook"` con razon.
NO modificar archivos en main directamente.
11. **Post-iteracion sanity check**. Tras cada commit en `auto/*`, verificar:
```bash
git -C /home/lucas/fn_registry status --short
git -C $HOME/fn_registry status --short
```
Si la salida cambia respecto al baseline (capturado al inicio del piloto), HAS contaminado el repo principal. ABORT con `status=sandbox_breach` y reporta los archivos afectados en el output al humano.
@@ -49,24 +49,24 @@ Antes de arrancar el bucle, comprobar:
```bash
# 1. Migration 006_task_runs.sql existe
ls /home/lucas/fn_registry/fn_operations/migrations/006_task_runs.sql 2>/dev/null \
ls $HOME/fn_registry/fn_operations/migrations/006_task_runs.sql 2>/dev/null \
|| { echo "ABORT: migration 006_task_runs.sql ausente. Aplicar issue 0069 paso 1 antes."; exit 2; }
# 2. Subagentes fn-* presentes
for a in fn-constructor fn-executor fn-recopilador fn-analizador fn-mejorador; do
test -f /home/lucas/fn_registry/.claude/agents/$a/SKILL.md \
test -f $HOME/fn_registry/.claude/agents/$a/SKILL.md \
|| { echo "ABORT: subagente $a ausente"; exit 2; }
done
# 3. master local up-to-date con origin (worktree se creara desde master)
git -C /home/lucas/fn_registry fetch origin master --quiet
LOCAL=$(git -C /home/lucas/fn_registry rev-parse master)
REMOTE=$(git -C /home/lucas/fn_registry rev-parse origin/master)
git -C $HOME/fn_registry fetch origin master --quiet
LOCAL=$(git -C $HOME/fn_registry rev-parse master)
REMOTE=$(git -C $HOME/fn_registry rev-parse origin/master)
test "$LOCAL" = "$REMOTE" \
|| { echo "ABORT: master local desincronizado con origin. git pull antes."; exit 2; }
# 4. Branch auto/<issue> NO existe ya (ni local ni en worktrees)
git -C /home/lucas/fn_registry rev-parse --verify "auto/${ISSUE_ID}" >/dev/null 2>&1 \
git -C $HOME/fn_registry rev-parse --verify "auto/${ISSUE_ID}" >/dev/null 2>&1 \
&& { echo "ABORT: branch auto/${ISSUE_ID} ya existe. Limpiar antes (git branch -D + worktree remove)."; exit 2; }
# 5. gh CLI autenticado (necesario para PR draft al converger)
@@ -116,7 +116,7 @@ BRANCH="auto/${ISSUE_ID}"
TASK_RUN_ID="task_$(openssl rand -hex 8)"
STARTED_AT=$(date +%s)
WT_ROOT="/tmp/fn_orq_${ISSUE_ID}_${STARTED_AT}"
REPO="/home/lucas/fn_registry"
REPO="$HOME/fn_registry"
# Crear worktree aislado desde master (no toca el principal)
git -C "$REPO" worktree add -b "$BRANCH" "$WT_ROOT" master \
@@ -187,13 +187,13 @@ while iter < max_iterations and elapsed < max_minutes:
Usar `Agent` tool con `subagent_type` correcto. Prompt **autocontenido** (paths absolutos, IDs, criterio exito).
**CRITICO**: pasar `WT_ROOT` (worktree path) en cada prompt y exigir al subagente trabajar dentro de el. Subagentes NO deben tocar el repo principal `/home/lucas/fn_registry/`.
**CRITICO**: pasar `WT_ROOT` (worktree path) en cada prompt y exigir al subagente trabajar dentro de el. Subagentes NO deben tocar el repo principal `$HOME/fn_registry/`.
Patron prompt:
```
Working dir: <WT_ROOT> # NO /home/lucas/fn_registry
Working dir: <WT_ROOT> # NO $HOME/fn_registry
Branch: auto/<issue_id>
Repo principal (solo lectura para registry.db): /home/lucas/fn_registry
Repo principal (solo lectura para registry.db): $HOME/fn_registry
...
```
@@ -346,7 +346,7 @@ Cada `progress_json` entry:
|---|---|---|
| `task_runs` no existe | migration 006 no aplicada | abortar pre-condicion 1 |
| `worktree add` falla con "already exists" | branch o dir previo no limpiado | `git worktree prune` + `git branch -D auto/<id>`, reintentar |
| Subagente toca `/home/lucas/fn_registry/` en vez de worktree | prompt sin `WT_ROOT` explicito | rebriefing con working dir explicito |
| Subagente toca `$HOME/fn_registry/` en vez de worktree | prompt sin `WT_ROOT` explicito | rebriefing con working dir explicito |
| `master` desincronizado con origin | falta `git pull` | abortar pre-condicion 3 |
| Loop infinito (mismo fail siempre) | watchdog ausente o desactivado | watchdog OBLIGATORIO, no skipear |
| Subagente devuelve output ambiguo | prompt insuficiente | rebriefing con paths/IDs explicitos |
+20 -20
View File
@@ -40,10 +40,10 @@ apps/{app_name}/
```bash
# Listar todas las apps
ls -d /home/lucas/fn_registry/apps/*/
ls -d $HOME/fn_registry/apps/*/
# Verificar que cada app tiene app.md
for app in /home/lucas/fn_registry/apps/*/; do
for app in $HOME/fn_registry/apps/*/; do
name=$(basename "$app")
echo "=== $name ==="
[ -f "$app/app.md" ] && echo " app.md: OK" || echo " app.md: FALTA"
@@ -82,8 +82,8 @@ sqlite3 "$APP_DB" "SELECT * FROM schema_migrations ORDER BY version;" 2>/dev/nul
**Si faltan tablas**, aplicar migraciones:
```bash
cd /home/lucas/fn_registry
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
cd $HOME/fn_registry
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name}
```
### 3. Integridad de Entities
@@ -96,7 +96,7 @@ sqlite3 "$APP_DB" "SELECT id, name, type_ref, status, domain, source FROM entiti
# Validar que type_ref existe en registry.db
sqlite3 "$APP_DB" "SELECT DISTINCT type_ref FROM entities;" | while read ref; do
EXISTS=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM types WHERE id = '$ref';")
EXISTS=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM types WHERE id = '$ref';")
if [ -z "$EXISTS" ]; then
echo "ERROR: type_ref '$ref' no existe en registry.db"
fi
@@ -129,7 +129,7 @@ sqlite3 "$APP_DB" "SELECT r.id, r.name, r.to_entity FROM relations r WHERE r.to_
# Validar que 'via' referencia una funcion/pipeline del registry
sqlite3 "$APP_DB" "SELECT DISTINCT via FROM relations WHERE via != '';" | while read via; do
EXISTS=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$via';")
EXISTS=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$via';")
if [ -z "$EXISTS" ]; then
echo "ERROR: relation.via '$via' no existe en registry.db"
fi
@@ -156,7 +156,7 @@ sqlite3 "$APP_DB" "SELECT id, pipeline_id, status, started_at, duration_ms, reco
# Validar que pipeline_id existe en registry.db
sqlite3 "$APP_DB" "SELECT DISTINCT pipeline_id FROM executions;" | while read pid; do
EXISTS=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$pid';")
EXISTS=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$pid';")
if [ -z "$EXISTS" ]; then
echo "ERROR: pipeline_id '$pid' no existe en registry.db"
fi
@@ -230,7 +230,7 @@ sqlite3 "$APP_DB" "SELECT id, version, lang, algebraic, snapped_at FROM types_sn
# Comparar con registry.db — detectar snapshots desactualizados
sqlite3 "$APP_DB" "SELECT id, version FROM types_snapshot;" | while IFS='|' read id ver; do
REG_VER=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT version FROM types WHERE id = '$id';")
REG_VER=$(sqlite3 $HOME/fn_registry/registry.db "SELECT version FROM types WHERE id = '$id';")
if [ -z "$REG_VER" ]; then
echo "WARN: snapshot '$id' ya no existe en registry.db"
elif [ "$ver" != "$REG_VER" ]; then
@@ -252,14 +252,14 @@ done
```bash
# Verificar que la app esta en registry.db
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, domain, entry_point, dir_path FROM apps WHERE name = '{app_name}';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, domain, entry_point, dir_path FROM apps WHERE name = '{app_name}';"
# Verificar que uses_functions del app.md coincide con lo indexado
sqlite3 /home/lucas/fn_registry/registry.db "SELECT uses_functions FROM apps WHERE name = '{app_name}';"
sqlite3 $HOME/fn_registry/registry.db "SELECT uses_functions FROM apps WHERE name = '{app_name}';"
# Verificar que todas las funciones referenciadas existen
sqlite3 /home/lucas/fn_registry/registry.db "SELECT f.value FROM apps, json_each(apps.uses_functions) f WHERE apps.name = '{app_name}';" | while read fid; do
EXISTS=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$fid';")
sqlite3 $HOME/fn_registry/registry.db "SELECT f.value FROM apps, json_each(apps.uses_functions) f WHERE apps.name = '{app_name}';" | while read fid; do
EXISTS=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$fid';")
if [ -z "$EXISTS" ]; then
echo "ERROR: app usa funcion '$fid' que no existe en registry"
fi
@@ -273,7 +273,7 @@ done
Patron para auditar TODAS las apps de una vez:
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
echo "========================================="
echo "AUDITORIA DE APPS — fn-recopilador"
@@ -327,7 +327,7 @@ for app_dir in apps/*/; do
[ "$ERROR_LOGS" -gt 0 ] 2>/dev/null && echo " [WARN] $ERROR_LOGS logs de error"
# 9. App indexada en registry.db
INDEXED=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM apps WHERE name = '$APP_NAME';" 2>/dev/null)
INDEXED=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM apps WHERE name = '$APP_NAME';" 2>/dev/null)
[ -n "$INDEXED" ] && echo " [OK] Indexada en registry.db" || echo " [WARN] NO indexada en registry.db"
done
@@ -393,25 +393,25 @@ echo "========================================="
El recopilador puede sugerir o ejecutar estas reparaciones:
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
# Aplicar migraciones faltantes
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name}
# Actualizar snapshot desactualizado
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops snapshot update --db apps/{app_name}/operations.db --id "TYPE_ID"
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops snapshot update --db apps/{app_name}/operations.db --id "TYPE_ID"
# Verificar snapshots
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops snapshot check --db apps/{app_name}/operations.db
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops snapshot check --db apps/{app_name}/operations.db
# Evaluar assertions pendientes
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops assertion eval --db apps/{app_name}/operations.db --entity-id "ENTITY_ID"
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops assertion eval --db apps/{app_name}/operations.db --entity-id "ENTITY_ID"
# Re-indexar para que la app aparezca en registry.db
./fn index
# Ver grafo de la app (util para diagnostico visual)
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops graph --db apps/{app_name}/operations.db
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops graph --db apps/{app_name}/operations.db
```
---
+13 -13
View File
@@ -38,13 +38,13 @@ Antes de crear nada, recopilar contexto:
```bash
# Buscar funciones relevantes por descripcion
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, lang, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'description:TERMINO* OR name:TERMINO*') ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, lang, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'description:TERMINO* OR name:TERMINO*') ORDER BY name;"
# Buscar apps similares
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, description, uses_functions FROM apps WHERE id IN (SELECT id FROM apps_fts WHERE apps_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, description, uses_functions FROM apps WHERE id IN (SELECT id FROM apps_fts WHERE apps_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
# Verificar que el nombre no esta tomado
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM apps WHERE name = 'NOMBRE';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM apps WHERE name = 'NOMBRE';"
```
4. **Presentar plan al usuario** antes de ejecutar:
@@ -79,7 +79,7 @@ Usar el Agent tool con `subagent_type: "fn-constructor"` pasando:
Despues de que fn-constructor termine, verificar que todo se indexo:
```bash
cd /home/lucas/fn_registry && ./fn index
cd $HOME/fn_registry && ./fn index
# Verificar cada funcion creada
./fn show {id_de_cada_funcion}
```
@@ -91,7 +91,7 @@ cd /home/lucas/fn_registry && ./fn index
### Estructura base (todos los lenguajes)
```bash
mkdir -p /home/lucas/fn_registry/apps/{app_name}
mkdir -p $HOME/fn_registry/apps/{app_name}
```
### app.md (OBLIGATORIO — siempre primero)
@@ -143,7 +143,7 @@ build/
**Go (CLI/TUI):**
```bash
cd /home/lucas/fn_registry/apps/{app_name}
cd $HOME/fn_registry/apps/{app_name}
go mod init fn_registry/apps/{app_name}
# Crear main.go, app/, config/, views/ segun necesidad
```
@@ -151,7 +151,7 @@ go mod init fn_registry/apps/{app_name}
**Go (Wails — desktop con UI):**
```bash
# Usar scaffold del registry
cd /home/lucas/fn_registry
cd $HOME/fn_registry
./fn run scaffold_wails_app -- --name {app_name} --dir apps/{app_name}
```
@@ -165,20 +165,20 @@ cd /home/lucas/fn_registry
```bash
# Crear main.sh con source a funciones del registry
# Pattern: source "$REGISTRY_ROOT/bash/functions/{domain}/{func}.sh"
chmod +x /home/lucas/fn_registry/apps/{app_name}/main.sh
chmod +x $HOME/fn_registry/apps/{app_name}/main.sh
```
### Inicializar operations.db
```bash
cd /home/lucas/fn_registry
FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name}
cd $HOME/fn_registry
FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name}
```
### Indexar en registry.db
```bash
cd /home/lucas/fn_registry && ./fn index
cd $HOME/fn_registry && ./fn index
# Verificar
sqlite3 registry.db "SELECT id, name, lang, domain FROM apps WHERE name = '{app_name}';"
```
@@ -241,7 +241,7 @@ Usar el Agent tool con `subagent_type: "gitea"` pasando:
```bash
# 1. Crear repo en Gitea (via API)
# 2. Inicializar git en la app
cd /home/lucas/fn_registry/apps/{app_name}
cd $HOME/fn_registry/apps/{app_name}
git init
git add -A
git commit -m "Initial commit: {app_name} — {descripcion}"
@@ -256,7 +256,7 @@ git push -u origin master
**Despues de publicar**, actualizar el `repo_url` en app.md y re-indexar:
```bash
cd /home/lucas/fn_registry && ./fn index
cd $HOME/fn_registry && ./fn index
```
---
+1 -1
View File
@@ -14,7 +14,7 @@ Toda la logica vive en el registry (resolver app desde CWD/arg, build, deploy co
## Dispatch
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
# Detecta framework via wails.json o CMakeLists.txt en el dir del app
APP="$ARGUMENTS"
+6 -6
View File
@@ -23,8 +23,8 @@ Si `$ARGUMENTS` no empieza por `modify`, es create. Si trae `<name>`, lo usas co
### Paso 0 — verificar que no existe
```bash
test -d "/home/lucas/fn_registry/apps/<name>" \
|| ls /home/lucas/fn_registry/projects/*/apps/<name> 2>/dev/null
test -d "$HOME/fn_registry/apps/<name>" \
|| ls $HOME/fn_registry/projects/*/apps/<name> 2>/dev/null
```
Si existe en cualquier ubicacion: **abortar** y sugerir `/cpp-app modify <name>`. NO sobreescribir.
@@ -42,7 +42,7 @@ Regla dura `cpp_apps.md`: description + icon.phosphor + icon.accent SIEMPRE junt
5. **icon.phosphor** glyph name. Antes de preguntar, ofrece busqueda:
```bash
ls /home/lucas/fn_registry/sources/phosphor-core/assets/fill/ | grep -i "<keyword>"
ls $HOME/fn_registry/sources/phosphor-core/assets/fill/ | grep -i "<keyword>"
```
Sugiere 3-5 candidatos basados en `description`. Default segun domain: `gfx`->`palette`, `tui`->`terminal`, `tools`->`wrench`, `infra`->`gear`, `finance`->`chart-line-up`, `datascience`->`graph`, `cybersecurity`->`shield`.
6. **icon.accent** hex `#rrggbb` (palette select):
@@ -122,7 +122,7 @@ Mostrar bloque YAML completo del `app.md` que se va a generar + flags del scaffo
Una vez confirmado:
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
# 1. Scaffolder
./fn run init_cpp_app <name> \
@@ -178,7 +178,7 @@ cd /home/lucas/fn_registry
```bash
# Buscar apps/<name>/ o projects/*/apps/<name>/
sqlite3 /home/lucas/fn_registry/registry.db \
sqlite3 $HOME/fn_registry/registry.db \
"SELECT id, dir_path FROM apps WHERE name='<name>' AND lang='cpp';"
```
@@ -211,7 +211,7 @@ Para cada cambio: usa `Edit` sobre los archivos correspondientes. NUNCA `Write`
```bash
# Siempre
cd /home/lucas/fn_registry && ./fn index
cd $HOME/fn_registry && ./fn index
# Si toco icon.* -> regenerar appicon
./fn run generate_app_icon "<phosphor>" "<accent>" "<dir>/appicon.ico"
+12 -12
View File
@@ -38,19 +38,19 @@ Consultar `registry.db` para encontrar funciones existentes relevantes y evitar
```bash
# Buscar funciones similares por nombre y descripcion (OBLIGATORIO — usar multiples terminos)
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, lang, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO1* OR description:TERMINO1* OR name:TERMINO2* OR description:TERMINO2*') ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, lang, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO1* OR description:TERMINO1* OR name:TERMINO2* OR description:TERMINO2*') ORDER BY name;"
# Buscar tipos relacionados
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, algebraic, lang, description FROM types WHERE id IN (SELECT id FROM types_fts WHERE types_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, algebraic, lang, description FROM types WHERE id IN (SELECT id FROM types_fts WHERE types_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;"
# Funciones del dominio objetivo
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, signature, description FROM functions WHERE domain = 'DOMINIO' AND lang = 'LANG' ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, signature, description FROM functions WHERE domain = 'DOMINIO' AND lang = 'LANG' ORDER BY name;"
# Tipos del dominio objetivo
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE domain = 'DOMINIO' ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE domain = 'DOMINIO' ORDER BY name;"
# Funciones que podrian componerse (misma firma de retorno)
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, purity, signature FROM functions WHERE returns LIKE '%TIPO%' OR signature LIKE '%TIPO%' ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, purity, signature FROM functions WHERE returns LIKE '%TIPO%' OR signature LIKE '%TIPO%' ORDER BY name;"
```
**Clasificar resultados en:**
@@ -103,7 +103,7 @@ Para cada batch del plan, lanzar agentes `fn-constructor` **en paralelo** (un ag
Usar el Agent tool con `subagent_type: "fn-constructor"` pasando un prompt completo con:
```
Crea la siguiente funcion para el registry fn_registry en /home/lucas/fn_registry:
Crea la siguiente funcion para el registry fn_registry en $HOME/fn_registry:
Funcion: {nombre}
Kind: {kind}
@@ -149,7 +149,7 @@ Despues de que TODOS los fn-constructor terminen:
```bash
# Indexar todo de una vez
cd /home/lucas/fn_registry && ./fn index
cd $HOME/fn_registry && ./fn index
```
Si el indexer reporta errores, corregirlos antes de continuar. Errores comunes:
@@ -166,7 +166,7 @@ Si el indexer reporta errores, corregirlos antes de continuar. Errores comunes:
```bash
# Verificar cada funcion creada
cd /home/lucas/fn_registry
cd $HOME/fn_registry
./fn show {id_de_cada_funcion}
# Verificar que no hay funciones sin params_schema
@@ -178,7 +178,7 @@ cd /home/lucas/fn_registry
Para cada funcion con tests, ejecutar:
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
# Go
CGO_ENABLED=1 go test -tags fts5 -v -run TestNombreDelTest ./functions/{domain}/
@@ -197,13 +197,13 @@ bash bash/functions/{domain}/{nombre}_test.sh
```bash
# Verificar que todas las funciones nuevas estan en la BD
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, tested FROM functions WHERE id IN ('id1','id2','id3') ORDER BY name;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, tested FROM functions WHERE id IN ('id1','id2','id3') ORDER BY name;"
# Verificar que los tests estan indexados
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, function_id, name FROM unit_tests WHERE function_id IN ('id1','id2','id3') ORDER BY function_id;"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, function_id, name FROM unit_tests WHERE function_id IN ('id1','id2','id3') ORDER BY function_id;"
# Verificar dependencias
sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, uses_functions, uses_types FROM functions WHERE id IN ('id1','id2','id3') AND uses_functions != '[]';"
sqlite3 $HOME/fn_registry/registry.db "SELECT id, uses_functions, uses_types FROM functions WHERE id IN ('id1','id2','id3') AND uses_functions != '[]';"
```
### 6.4 Si algo fallo
+3 -3
View File
@@ -45,7 +45,7 @@ Antes de escribir nada, repasar la conversacion y juntar:
2. **Cambios concretos** desde git:
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
git status --short
git diff --stat
git log --since="6 hours ago" --oneline
@@ -70,7 +70,7 @@ Si el material es solo conversacion exploratoria sin artefactos tocados, ir dire
Para cada artefacto identificado, localizar su `.md` consultando `registry.db`:
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
# Funcion / tipo
sqlite3 registry.db "SELECT id, file_path FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:NAME* OR description:NAME*');"
@@ -180,7 +180,7 @@ Para cada `.md` identificado:
Si los cambios de la sesion incluyen creacion de funciones/tipos/apps/projects/analysis/vaults o modificacion de frontmatter:
```bash
cd /home/lucas/fn_registry && ./fn index
cd $HOME/fn_registry && ./fn index
```
Y verificar:
+1 -1
View File
@@ -17,7 +17,7 @@ Suite ya instalada en `cpp/vendor/imgui_test_engine/`. Integracion en framework:
### 1. Resolver app y directorio
```bash
ROOT=/home/lucas/fn_registry
ROOT=$HOME/fn_registry
ARGS="$ARGUMENTS"
APP_ARG="${ARGS%% *}" # primera palabra
FLOW_DESC="${ARGS#* }" # resto (puede coincidir con APP_ARG si solo hay una palabra)
+1 -1
View File
@@ -17,7 +17,7 @@ Wrapper sobre `append_diary_entry_bash_infra`. La función del registry maneja t
2. **Llamar la función del registry**:
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
source bash/functions/infra/append_diary_entry.sh
append_diary_entry "<TITULO>" "$(cat <<'EOF'
<CUERPO>
+1 -1
View File
@@ -50,7 +50,7 @@ Issue 0085 fase autocompleta. Reemplaza el flujo manual de "veo un patron, decid
### 1. AUDIT — ¿estoy siendo registrado?
```bash
ROOT="/home/lucas/fn_registry"
ROOT="$HOME/fn_registry"
MON="$ROOT/projects/fn_monitoring/apps/call_monitor/operations.db"
# Pre-condiciones
+1 -1
View File
@@ -3,7 +3,7 @@
Wrapper sobre el pipeline `full_git_pull_bash_pipelines`. Toda la lógica vive en el registry. Este comando solo ejecuta:
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
./fn run full_git_pull_bash_pipelines
```
+1 -1
View File
@@ -3,7 +3,7 @@
Wrapper sobre el pipeline `full_git_push_bash_pipelines`. Toda la lógica vive en el registry. Este comando solo ejecuta:
```bash
cd /home/lucas/fn_registry
cd "${FN_REGISTRY_ROOT:-$HOME/fn_registry}"
./fn run full_git_push_bash_pipelines "$ARGUMENTS"
```
+1 -1
View File
@@ -3,7 +3,7 @@
Wrapper sobre el pipeline `init_cpp_app_bash_pipelines`. Genera la estructura canonica que cumple `cpp/PATTERNS.md` y `.claude/rules/cpp_apps.md` (main.cpp con `cfg.about/log/panels`, sin `app_menubar` manual, dockspace via framework), registra la app en `cpp/CMakeLists.txt`, crea repo Gitea `dataforge/<name>` y ejecuta `fn index`.
```bash
cd /home/lucas/fn_registry
cd $HOME/fn_registry
./fn run init_cpp_app $ARGUMENTS
```
+1 -1
View File
@@ -17,7 +17,7 @@ Si vacio: detectar app desde `pwd` (si estas dentro de `apps/<X>/` o `projects/*
### 1. Resolver app objetivo
```bash
ROOT=/home/lucas/fn_registry
ROOT=$HOME/fn_registry
ARG="$ARGUMENTS"
if [ -z "$ARG" ]; then
+1 -1
View File
@@ -16,7 +16,7 @@
```bash
# 1. Agente trabaja en worktree del repo padre
cd /home/lucas/fn_registry/worktrees/<slug>
cd $HOME/fn_registry/worktrees/<slug>
# 2. Scaffold la app via pipeline canonico
./fn run init_cpp_app <name> # apps C++
@@ -38,7 +38,7 @@ if [[ -n "$matches" ]]; then
fi
# Escanear repo especifico
scan_secrets_in_dirty /home/lucas/fn_registry
scan_secrets_in_dirty $HOME/fn_registry
```
## Patrones detectados
@@ -22,14 +22,14 @@ params:
- name: app_name
desc: "Nombre de la app (ej: chart_demo). Se usa para localizar cpp/build/windows/apps/<app>/<app>.exe y el directorio destino Desktop/apps/<app>/."
- name: app_dir
desc: "Ruta absoluta al directorio fuente de la app (ej: /home/lucas/fn_registry/cpp/apps/chart_demo). Se usa para localizar enrichers/, runtime/ y app.md."
desc: "Ruta absoluta al directorio fuente de la app (ej: $HOME/fn_registry/cpp/apps/chart_demo). Se usa para localizar enrichers/, runtime/ y app.md."
output: "Copia archivos al escritorio de Windows. Imprime 'OK: <app> -> <dest>' en stdout. Si local_files/ existe, imprime su tamanio. Errores fatales a stderr con exit 1."
---
## Ejemplo
```bash
deploy_cpp_exe_to_windows "chart_demo" "/home/lucas/fn_registry/cpp/apps/chart_demo"
deploy_cpp_exe_to_windows "chart_demo" "$HOME/fn_registry/cpp/apps/chart_demo"
# OK: chart_demo -> /mnt/c/Users/lucas/Desktop/apps/chart_demo
# Con rutas custom via env vars
@@ -55,7 +55,7 @@ Desktop/apps/<APP>/
- `BUILD_WIN` — directorio de build Windows; default `$FN_REGISTRY_ROOT/cpp/build/windows`
- `WIN_DESKTOP_APPS` — directorio destino; default `/mnt/c/Users/lucas/Desktop/apps`
- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry`
- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry`
## Notas
@@ -12,7 +12,7 @@ deploy_cpp_exe_to_windows() {
return 1
fi
local root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}"
local root="${FN_REGISTRY_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}"
local build_win="${BUILD_WIN:-$root/cpp/build/windows}"
local win_desktop_apps="${WIN_DESKTOP_APPS:-/mnt/c/Users/lucas/Desktop/apps}"
@@ -36,7 +36,7 @@ source bash/functions/infra/deploy_wails_exe_to_windows.sh
# Desplegar matrix_client_pc tras wails build -platform windows/amd64
deploy_wails_exe_to_windows matrix_client_pc \
/home/lucas/fn_registry/projects/element_agents/apps/matrix_client_pc
$HOME/fn_registry/projects/element_agents/apps/matrix_client_pc
```
Con override de destino:
@@ -44,7 +44,7 @@ Con override de destino:
```bash
WIN_DESKTOP_APPS=/mnt/c/Users/lucas/Desktop/apps \
deploy_wails_exe_to_windows matrix_admin_panel \
/home/lucas/fn_registry/projects/element_agents/apps/matrix_admin_panel
$HOME/fn_registry/projects/element_agents/apps/matrix_admin_panel
```
## Cuando usarla
+3 -3
View File
@@ -30,15 +30,15 @@ file_path: "bash/functions/infra/discover_git_repos.sh"
source bash/functions/infra/discover_git_repos.sh
# Listar todos los repos bajo fn_registry
discover_git_repos /home/lucas/fn_registry
discover_git_repos $HOME/fn_registry
# Contar repos
discover_git_repos /home/lucas/fn_registry | wc -l
discover_git_repos $HOME/fn_registry | wc -l
# Iterar
while IFS= read -r repo; do
echo "Repo: $repo"
done < <(discover_git_repos /home/lucas/fn_registry)
done < <(discover_git_repos $HOME/fn_registry)
```
## Notas
+1 -1
View File
@@ -33,7 +33,7 @@ file_path: "bash/functions/infra/docker_cp_file.sh"
```bash
source functions/infra/docker_cp_file.sh
result=$(docker_cp_file /home/lucas/fn_registry/registry.db metabase /registry.db)
result=$(docker_cp_file $HOME/fn_registry/registry.db metabase /registry.db)
echo "$result"
# {"local_size":524288,"remote_size":524288}
@@ -32,7 +32,7 @@ file_path: "bash/functions/infra/git_auto_commit_dirty.sh"
source bash/functions/infra/git_auto_commit_dirty.sh
# Commitear con mensaje automatico
subject=$(git_auto_commit_dirty /home/lucas/fn_registry)
subject=$(git_auto_commit_dirty $HOME/fn_registry)
echo "Commit: $subject"
# Commitear con mensaje fijo
@@ -17,7 +17,7 @@ error_type: "error_go_core"
imports: []
example: |
# Manual check
bash bash/functions/infra/git_hook_audit_app_drift.sh /home/lucas/fn_registry/apps/kanban
bash bash/functions/infra/git_hook_audit_app_drift.sh $HOME/fn_registry/apps/kanban
# Used by pre_commit_hook_install_bash_infra (v2 hook chain)
file_path: bash/functions/infra/git_hook_audit_app_drift.sh
+2 -2
View File
@@ -30,7 +30,7 @@ file_path: "bash/functions/infra/git_pull_with_stash.sh"
source bash/functions/infra/git_pull_with_stash.sh
# Pullear repo con auto-stash
status=$(git_pull_with_stash /home/lucas/fn_registry)
status=$(git_pull_with_stash $HOME/fn_registry)
echo "$status"
# [pulled] fn_registry
# o:
@@ -46,7 +46,7 @@ while IFS= read -r repo; do
if [[ "$result" == "[diverged]"* || "$result" == "[stash-conflict]"* ]]; then
diverged+=("$result")
fi
done < <(discover_git_repos /home/lucas/fn_registry)
done < <(discover_git_repos $HOME/fn_registry)
if [[ ${#diverged[@]} -gt 0 ]]; then
echo "ATENCION: repos que requieren intervencion manual:"
+2 -2
View File
@@ -30,7 +30,7 @@ file_path: "bash/functions/infra/git_push_if_ahead.sh"
source bash/functions/infra/git_push_if_ahead.sh
# Pushear si hay commits locales
status=$(git_push_if_ahead /home/lucas/fn_registry)
status=$(git_push_if_ahead $HOME/fn_registry)
echo "$status"
# [push] fn_registry (master, 3 commits ahead)
# o:
@@ -39,7 +39,7 @@ echo "$status"
# Iterar sobre multiples repos
while IFS= read -r repo; do
git_push_if_ahead "$repo"
done < <(discover_git_repos /home/lucas/fn_registry)
done < <(discover_git_repos $HOME/fn_registry)
```
## Estados de salida
@@ -61,7 +61,7 @@ Mitad complementaria de `deploy_cpp_exe_to_windows_bash_infra`. El flujo complet
build_cpp_windows "registry_dashboard"
# 2. Copiar al escritorio (mata proceso si corre, copia DLLs+assets)
deploy_cpp_exe_to_windows "registry_dashboard" "/home/lucas/fn_registry/apps/registry_dashboard"
deploy_cpp_exe_to_windows "registry_dashboard" "$HOME/fn_registry/apps/registry_dashboard"
# 3. Lanzar
launch_cpp_app_windows "registry_dashboard"
@@ -32,16 +32,16 @@ file_path: "bash/functions/infra/pre_commit_hook_install.sh"
source bash/functions/infra/pre_commit_hook_install.sh
# Instalar en el repo actual
pre_commit_hook_install /home/lucas/fn_registry
# INSTALLED /home/lucas/fn_registry/.git/hooks/pre-commit
pre_commit_hook_install $HOME/fn_registry
# INSTALLED $HOME/fn_registry/.git/hooks/pre-commit
# Idempotente: segunda llamada no sobreescribe
pre_commit_hook_install /home/lucas/fn_registry
# SKIP /home/lucas/fn_registry/.git/hooks/pre-commit (already installed)
pre_commit_hook_install $HOME/fn_registry
# SKIP $HOME/fn_registry/.git/hooks/pre-commit (already installed)
# Forzar reinstalacion (hace backup del hook anterior)
pre_commit_hook_install /home/lucas/fn_registry --force
# INSTALLED /home/lucas/fn_registry/.git/hooks/pre-commit
pre_commit_hook_install $HOME/fn_registry --force
# INSTALLED $HOME/fn_registry/.git/hooks/pre-commit
```
## Notas
@@ -58,5 +58,5 @@ Si no puede localizar `fn_registry`, el hook imprime un aviso y sale con exit 0
Configurar `FN_REGISTRY_ROOT` en el perfil del shell para garantizar que el hook siempre encuentre el registry:
```bash
export FN_REGISTRY_ROOT=/home/lucas/fn_registry
export FN_REGISTRY_ROOT=$HOME/fn_registry
```
+3 -3
View File
@@ -28,13 +28,13 @@ output: "Una linea TAB-separada '<app_name>\\t<absolute_dir_path>' en stdout. En
```bash
# Desde dentro de cpp/apps/chart_demo/
cd /home/lucas/fn_registry/cpp/apps/chart_demo
cd $HOME/fn_registry/cpp/apps/chart_demo
resolve_cpp_app_dir
# -> chart_demo\t/home/lucas/fn_registry/cpp/apps/chart_demo
# -> chart_demo\t$HOME/fn_registry/cpp/apps/chart_demo
# Con argumento explicito
resolve_cpp_app_dir registry_dashboard
# -> registry_dashboard\t/home/lucas/fn_registry/cpp/apps/registry_dashboard
# -> registry_dashboard\t$HOME/fn_registry/cpp/apps/registry_dashboard
# Capturar los dos campos
resolved=$(resolve_cpp_app_dir graph_explorer)
+1 -1
View File
@@ -7,7 +7,7 @@
resolve_cpp_app_dir() {
local app_arg="${1:-}"
local root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}"
local root="${FN_REGISTRY_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}"
_list_cpp_apps() {
ls "$root/apps/" 2>/dev/null | sed 's/^/ apps\//'
+1 -1
View File
@@ -39,7 +39,7 @@ echo "$result"
# {"files_transferred": 12, "total_size": "1.23 MB", "ssh_alias": "prod-server", "remote_dir": "/opt/apps/dag_engine"}
# Deploy con ruta absoluta local
rsync_deploy "/home/lucas/fn_registry/apps/myapp/" "myserver" "/opt/myapp"
rsync_deploy "$HOME/fn_registry/apps/myapp/" "myserver" "/opt/myapp"
```
## Notas
@@ -30,7 +30,7 @@ file_path: "bash/functions/infra/write_mcp_jupyter_config.sh"
```bash
source write_mcp_jupyter_config.sh
path=$(write_mcp_jupyter_config /home/lucas/fn_registry/analysis/finanzas 8890)
path=$(write_mcp_jupyter_config $HOME/fn_registry/analysis/finanzas 8890)
echo "Config MCP en: $path"
# Genera .mcp.json con:
# "command": ".../.venv/bin/jupyter-mcp-server"
+1 -1
View File
@@ -47,7 +47,7 @@ file_path: "bash/functions/pipelines/agent_scaffold.sh"
```bash
# Crear agente basico con openai
export FN_REGISTRY_ROOT=/home/lucas/fn_registry
export FN_REGISTRY_ROOT=$HOME/fn_registry
bash bash/functions/pipelines/agent_scaffold.sh monitor-bot \
--display-name "Monitor Agent" \
--description "Monitorea servicios y reporta estado" \
+2 -2
View File
@@ -30,14 +30,14 @@ file_path: "bash/functions/pipelines/backup_all.sh"
```bash
# Backup manual a ~/backups/fn_registry
export FN_REGISTRY_ROOT=/home/lucas/fn_registry
export FN_REGISTRY_ROOT=$HOME/fn_registry
backup_all ~/backups/fn_registry
# Salida esperada:
# 2026-05-07T10:30:00+02:00 registry=4194304B ops=3 vaults=2 partial_errors=0 elapsed=12s
# Entrada en crontab (diario a las 02:00)
# 0 2 * * * FN_REGISTRY_ROOT=/home/lucas/fn_registry bash /home/lucas/fn_registry/bash/functions/pipelines/backup_all.sh ~/backups/fn_registry
# 0 2 * * * FN_REGISTRY_ROOT=$HOME/fn_registry bash $HOME/fn_registry/bash/functions/pipelines/backup_all.sh ~/backups/fn_registry
```
## Estructura de backup_root/
@@ -43,7 +43,7 @@ file_path: "bash/functions/pipelines/clone_project_subrepos.sh"
# analysis domain_coverage_gaps [cloned]
#
# Siguiente paso sugerido:
# cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index && ./fn sync
# cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index && ./fn sync
# Con owner alternativo
./fn run clone_project_subrepos aurgi --owner miorg
@@ -65,7 +65,7 @@ Cuando llegas a un PC nuevo con solo fn_registry clonado y quieres trabajar en u
## Variables de entorno
- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry`
- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry`
- `GITEA_URL` — URL base de Gitea; default `https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com`
- Auth git/ssh: el pipeline confía en la config local del usuario (SSH key, credential helper)
@@ -38,7 +38,7 @@ clone_project_subrepos() {
fi
# --- Resolver paths ---
local registry_root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}"
local registry_root="${FN_REGISTRY_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}"
local db="$registry_root/registry.db"
local gitea_url="${GITEA_URL:-https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com}"
+2 -2
View File
@@ -31,7 +31,7 @@ output: "Compila el .exe y lo despliega al escritorio de Windows. Imprime progre
```bash
# Desde dentro del directorio de la app (sin arg)
cd /home/lucas/fn_registry/cpp/apps/chart_demo
cd $HOME/fn_registry/cpp/apps/chart_demo
fn run compile_cpp_app
# Con nombre explicito desde cualquier directorio
@@ -51,7 +51,7 @@ bash bash/functions/pipelines/compile_cpp_app.sh graph_explorer
## Variables de entorno
- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry`
- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry`
- `BUILD_WIN` — directorio de build Windows; default `$FN_REGISTRY_ROOT/cpp/build/windows`
- `WIN_DESKTOP_APPS` — directorio destino; default `/mnt/c/Users/lucas/Desktop/apps`
+1 -1
View File
@@ -40,7 +40,7 @@ compile_cpp_app() {
deploy_cpp_exe_to_windows "$APP" "$APP_DIR"
# --- Resumen final ---
local root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}"
local root="${FN_REGISTRY_ROOT:-$(cd "$SCRIPT_DIR/../../.." && pwd)}"
local build_win="${BUILD_WIN:-$root/cpp/build/windows}"
local win_desktop_apps="${WIN_DESKTOP_APPS:-/mnt/c/Users/lucas/Desktop/apps}"
local final_exe="$win_desktop_apps/$APP/$APP.exe"
@@ -34,7 +34,7 @@ cd projects/element_agents/apps/matrix_client_pc
./fn run compile_wails_app
# Desde la raiz del registry, con nombre explicito
cd /home/lucas/fn_registry
cd $HOME/fn_registry
./fn run compile_wails_app matrix_admin_panel
# Directo sin fn run
+1 -1
View File
@@ -63,7 +63,7 @@ file_path: "bash/functions/pipelines/dockerize_app.sh"
```bash
# Deploy completo con basicAuth
cd /home/lucas/fn_registry
cd $HOME/fn_registry
bash bash/functions/pipelines/dockerize_app.sh kanban \
--domain kanban.organic-machine.com \
--port 8421 \
+1 -1
View File
@@ -46,7 +46,7 @@ bash bash/functions/pipelines/full_git_pull.sh
## Variables de entorno
- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry`
- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry`
- `FN_REGISTRY_API`, `REGISTRY_API_TOKEN` — se cargan de `pass registry/*`
## Notas
+3 -2
View File
@@ -12,8 +12,9 @@ source "$INFRA_DIR/git_pull_with_stash.sh"
source "$INFRA_DIR/pass_get.sh"
full_git_pull() {
# Resolver raiz del registry
local registry_root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}"
# Resolver raiz del registry. Deriva de SCRIPT_DIR (bash/functions/pipelines/)
# para funcionar en cualquier PC sin path hardcodeado.
local registry_root="${FN_REGISTRY_ROOT:-$(cd "$SCRIPT_DIR/../../.." && pwd)}"
cd "$registry_root"
echo "=== full_git_pull: inicio ===" >&2
+1 -1
View File
@@ -55,7 +55,7 @@ bash bash/functions/pipelines/full_git_push.sh "feat: nueva funcion"
## Variables de entorno
- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry`
- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry`
- `GITEA_URL`, `GITEA_TOKEN` — se cargan de `pass agentes/gitea-url` y `pass gitea/dataforge-git-token`
- `FN_REGISTRY_API`, `REGISTRY_API_TOKEN` — se cargan de `pass registry/*`
@@ -34,11 +34,11 @@ file_path: "bash/functions/pipelines/generate_capability_doc.sh"
```bash
# Regenerar tabla de notebook (ya existe, preserva Ejemplo canonico / Fronteras)
./bash/functions/pipelines/generate_capability_doc.sh notebook
# → /home/lucas/fn_registry/docs/capabilities/notebook.md updated (5 functions)
# → $HOME/fn_registry/docs/capabilities/notebook.md updated (5 functions)
# Crear pagina nueva para un grupo sin pagina todavia
./bash/functions/pipelines/generate_capability_doc.sh metabase
# → /home/lucas/fn_registry/docs/capabilities/metabase.md created (12 functions)
# → $HOME/fn_registry/docs/capabilities/metabase.md created (12 functions)
# Especificar registry y destino custom
./bash/functions/pipelines/generate_capability_doc.sh android \
@@ -49,7 +49,7 @@ file_path: "bash/functions/pipelines/generate_capability_doc.sh"
# Grupo sin funciones todavia (avisa pero no falla)
./bash/functions/pipelines/generate_capability_doc.sh nuevo_grupo
# WARN: El grupo 'nuevo_grupo' no tiene funciones con ese tag en registry.db.
# → /home/lucas/fn_registry/docs/capabilities/nuevo_grupo.md created (0 functions)
# → $HOME/fn_registry/docs/capabilities/nuevo_grupo.md created (0 functions)
```
## Comportamiento detallado
+1 -1
View File
@@ -26,7 +26,7 @@
set -euo pipefail
REGISTRY_ROOT="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}"
REGISTRY_ROOT="${FN_REGISTRY_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}"
# shellcheck disable=SC1091
source "$REGISTRY_ROOT/bash/functions/infra/keepass_dump.sh"
@@ -27,7 +27,7 @@ params:
- name: app_name
desc: "Nombre de la app C++ (ej: chart_demo, registry_dashboard). Se usa para localizar el .exe en cpp/build/windows/apps/<app>/ y el destino Desktop/apps/<app>/."
- name: app_dir
desc: "Ruta absoluta al directorio fuente de la app (ej: /home/lucas/fn_registry/cpp/apps/chart_demo). Requerido para localizar enrichers/, runtime/ y app.md."
desc: "Ruta absoluta al directorio fuente de la app (ej: $HOME/fn_registry/cpp/apps/chart_demo). Requerido para localizar enrichers/, runtime/ y app.md."
- name: "--build"
desc: "Flag opcional. Si presente, compila la app para Windows antes del deploy. Por defecto off (asume .exe ya compilado)."
output: "Imprime 'OK: <app_name> redeployed (build=yes/no, PID=N)' en stdout. Exit 1 en cualquier paso fallido con mensaje de error indicando el paso."
@@ -37,10 +37,10 @@ output: "Imprime 'OK: <app_name> redeployed (build=yes/no, PID=N)' en stdout. Ex
```bash
# Solo redeploy (asume build ya hecho)
redeploy_cpp_app_windows "registry_dashboard" "/home/lucas/fn_registry/projects/fn_monitoring/apps/registry_dashboard"
redeploy_cpp_app_windows "registry_dashboard" "$HOME/fn_registry/projects/fn_monitoring/apps/registry_dashboard"
# Con build previo
redeploy_cpp_app_windows "chart_demo" "/home/lucas/fn_registry/cpp/apps/chart_demo" --build
redeploy_cpp_app_windows "chart_demo" "$HOME/fn_registry/cpp/apps/chart_demo" --build
```
## Comportamiento
@@ -20,7 +20,7 @@ error_type: "error_go_core"
imports: []
params:
- name: registry_db_path
desc: "ruta a registry.db local (default: /home/lucas/fn_registry/registry.db)"
desc: "ruta a registry.db local (default: $HOME/fn_registry/registry.db)"
- name: container_name
desc: "nombre del contenedor Metabase (default: metabase)"
- name: dest_path
@@ -40,7 +40,7 @@ file_path: "bash/functions/pipelines/setup_metabase_volume.sh"
# Con argumentos explícitos
./functions/pipelines/setup_metabase_volume.sh \
/home/lucas/fn_registry/registry.db \
$HOME/fn_registry/registry.db \
metabase \
/registry.db
```
@@ -59,7 +59,7 @@ El pipeline usa `set -euo pipefail` — cualquier fallo en una función individu
Las funciones individuales se sourcean desde sus rutas en el registry, relativas a `REGISTRY_ROOT` detectado automáticamente desde la ubicación del script.
Defaults:
- `REGISTRY_DB_PATH`: `/home/lucas/fn_registry/registry.db`
- `REGISTRY_DB_PATH`: `$HOME/fn_registry/registry.db`
- `CONTAINER_NAME`: `metabase`
- `DEST_PATH`: `/registry.db`
@@ -67,7 +67,7 @@ Nota de persistencia: `docker cp` copia al contenedor en ejecución. Si el conte
```yaml
volumes:
- /home/lucas/fn_registry:/fn_registry:ro
- $HOME/fn_registry:/fn_registry:ro
```
Y usar `--registry-db-path /fn_registry/registry.db`.
@@ -10,7 +10,7 @@
#
# ARGUMENTOS (opcionales, con defaults):
# REGISTRY_DB_PATH Ruta local al registry.db
# Default: /home/lucas/fn_registry/registry.db
# Default: <raiz_del_registry>/registry.db
# CONTAINER_NAME Nombre del contenedor Docker de Metabase
# Default: metabase
# DEST_PATH Ruta destino dentro del contenedor
@@ -26,7 +26,7 @@ source "$REGISTRY_ROOT/bash/functions/shell/assert_command_exists.sh"
source "$REGISTRY_ROOT/bash/functions/infra/assert_docker_container_running.sh"
source "$REGISTRY_ROOT/bash/functions/infra/docker_cp_file.sh"
REGISTRY_DB_PATH="${1:-/home/lucas/fn_registry/registry.db}"
REGISTRY_DB_PATH="${1:-$REGISTRY_ROOT/registry.db}"
CONTAINER_NAME="${2:-metabase}"
DEST_PATH="${3:-/registry.db}"
+2 -2
View File
@@ -44,11 +44,11 @@ file_path: "bash/functions/pipelines/vault_audit.sh"
```bash
# Auditar un vault especifico
FN_REGISTRY_ROOT=/home/lucas/fn_registry \
FN_REGISTRY_ROOT=$HOME/fn_registry \
bash bash/functions/pipelines/vault_audit.sh turismo_spain
# Auditar todos los vaults
FN_REGISTRY_ROOT=/home/lucas/fn_registry \
FN_REGISTRY_ROOT=$HOME/fn_registry \
bash bash/functions/pipelines/vault_audit.sh --all
# Solo layout + index + aggregate (sin profilers, mas rapido)
+1 -1
View File
@@ -29,7 +29,7 @@ file_path: "bash/functions/shell/assert_file_exists.sh"
```bash
source functions/shell/assert_file_exists.sh
size=$(assert_file_exists /home/lucas/fn_registry/registry.db)
size=$(assert_file_exists $HOME/fn_registry/registry.db)
echo "Tamaño: $size bytes"
```
@@ -32,7 +32,7 @@ file_path: "bash/functions/shell/validate_registry_paths.sh"
```bash
source validate_registry_paths.sh
validate_registry_paths /home/lucas/fn_registry/registry.db functions /home/lucas/fn_registry
validate_registry_paths $HOME/fn_registry/registry.db functions $HOME/fn_registry
# Output (TSV):
# cdp_click_go_browser functions/infra/cdp_click.go browser functions
+2 -2
View File
@@ -19,7 +19,7 @@ example: |
#include <fstream>
#include <sstream>
std::ifstream f("/home/lucas/fn_registry/dev/issues/0109-skill-tree-app-roadmap.md");
std::ifstream f("$HOME/fn_registry/dev/issues/0109-skill-tree-app-roadmap.md");
std::stringstream ss; ss << f.rdbuf();
auto fm = fn_md::parse_md_frontmatter(ss.str());
auto title = std::get<std::string>(fm.fields["title"]);
@@ -65,7 +65,7 @@ Cuando una app C++ necesita leer metadata de archivos Markdown del registry (iss
#include <fstream>
#include <sstream>
std::ifstream f("/home/lucas/fn_registry/dev/issues/0109-skill-tree-app-roadmap.md");
std::ifstream f("$HOME/fn_registry/dev/issues/0109-skill-tree-app-roadmap.md");
std::stringstream ss; ss << f.rdbuf();
auto fm = fn_md::parse_md_frontmatter(ss.str());
@@ -239,7 +239,7 @@ def extract_triples_spacy_es_v2(text: str, nlp: Any, resolve_pronouns: bool = Tr
`.ipython/profile_default/startup/00_fn_registry.py` añade cada subdir de `python/functions/` al sys.path top-level. Como hay un `bigquery/datasets.py` en el registry, **shadows** el paquete `datasets` de HuggingFace que `transformers` necesita. Resultado: en cada notebook hay que aplicar un workaround:
```python
_pf = '/home/lucas/fn_registry/python/functions'
_pf = '$HOME/fn_registry/python/functions'
sys.path = [p for p in sys.path if not p.startswith(_pf + '/')]
if _pf not in sys.path: sys.path.insert(0, _pf)
```
+2 -2
View File
@@ -693,7 +693,7 @@ Eres `agent-home-wsl`, un agente operativo conectado al PC `home-wsl` del operad
por que. El operador vera la respuesta en `#home-wsl` cuando el sudo agent termine.
4. **Proyectos**: para crear un proyecto nuevo, prefiere `project.create` antes que componer
`exec mkdir + fs.write + ...`. Es mas rapido y deja entrada en `memory.projects`.
5. **Registry**: el operador mantiene un registry de funciones en /home/lucas/fn_registry. Si la tarea
5. **Registry**: el operador mantiene un registry de funciones en $HOME/fn_registry. Si la tarea
parece composicion de funciones (ETL, scraping, parsing), pregunta al operador si ya hay algo en el
registry antes de codear desde cero. (No tienes herramienta para consultar el registry directamente;
pidele al operador que ejecute `mcp__registry__fn_search` por ti).
@@ -818,7 +818,7 @@ Flujo:
3. Si operador → "delega":
- `delegate_sudo task="registrar /home/lucas/projects/scraper-precios como app en fn_registry"`.
4. sudo agent ejecuta:
- `cd /home/lucas/fn_registry && ./fn run init_some_pipeline scraper-precios ...` (o similar — depende del scaffolder).
- `cd $HOME/fn_registry && ./fn run init_some_pipeline scraper-precios ...` (o similar — depende del scaffolder).
- Cada paso = approval individual o pre-approved si operator activo `!preapprove fn-* 10m`.
Esto evita que el user agent toque `fn_registry` directamente — el registry es del operador, no del agent. El agent solo orquesta cuando le piden.
@@ -21,7 +21,7 @@ tags: []
`jupyter_discover.py` reporta el campo `analysis` incorrecto. Con Jupyter corriendo desde `analysis/estudio_mercados/`, el discover devolvió `"analysis": "estudio_embeddings"`.
El proceso real tenía `--ServerApp.root_dir=/home/lucas/fn_registry/analysis/estudio_mercados` en su cmdline, pero el discover no lo parsea.
El proceso real tenía `--ServerApp.root_dir=$HOME/fn_registry/analysis/estudio_mercados` en su cmdline, pero el discover no lo parsea.
## Solución propuesta
@@ -89,7 +89,7 @@ deferred -> Deferred
- Frontmatter mal formado (yaml invalid): card aparece con badge `parse-error` + tooltip detalle. NO crashea backend.
- Cambios concurrentes: humano edita `.md` con vim mientras agente lo PATCHea via API. Usar lock file `.md.lock` corto + retry.
- `fsnotify` no funciona bien en WSL para `/mnt/c/` paths. Backend corre en WSL, lee paths nativos (`/home/lucas/fn_registry/dev/...`). Verificar.
- `fsnotify` no funciona bien en WSL para `/mnt/c/` paths. Backend corre en WSL, lee paths nativos (`$HOME/fn_registry/dev/...`). Verificar.
- Issue / flow grandes (>500 lineas body): NO mandar full body en `/cards` (lento). Devolver solo frontmatter + primeras 5 lineas. Body completo via `/cards/<id>` on demand.
- Cards sin `status` (frontmatter incompleto): default `pendiente`.
- Reordenamiento manual: drag-and-drop en UI cambia status (cruzar columna) PERO no orden vertical persistente — no hay campo `order` en frontmatter. Decision: orden por `updated` desc dentro de cada columna.
@@ -55,7 +55,7 @@ e2e_checks:
2. Lanzar `/autonomous-task 0120 --dry-run` para audit.
3. Lanzar `/autonomous-task 0120 --max-iterations 5 --max-minutes 30`.
4. Recoger output: `task_run_id`, branch `auto/0120-*`, log de iteraciones, proposals aplicadas/skipped, URL del PR draft.
5. Verificar `git -C /home/lucas/fn_registry status --short` igual a baseline (regla 11 sandbox breach).
5. Verificar `git -C $HOME/fn_registry status --short` igual a baseline (regla 11 sandbox breach).
6. Post-mortem: si fallo en alguna iteracion, anotar en seccion `## Hallazgos` y refinar `fn-orquestador/SKILL.md` o `autonomous_loop.md` si corresponde.
## Acceptance
@@ -64,7 +64,7 @@ e2e_checks:
- [ ] `apps/chart_demo/app.md` contiene bloque `e2e_checks:` con al menos `build` + `binary_exists`.
- [ ] `fn-analizador` corrida sobre `chart_demo` reporta `checks_pass=checks_total` (todo verde).
- [ ] PR draft existe en Gitea con branch `auto/0120-*` apuntando a `master`.
- [ ] `git -C /home/lucas/fn_registry status --short` antes/despues del piloto identico (excluyendo solo este `.md` cerrado).
- [ ] `git -C $HOME/fn_registry status --short` antes/despues del piloto identico (excluyendo solo este `.md` cerrado).
- [ ] Documento de post-mortem en `## Hallazgos` con: iteraciones totales, tiempo total, proposals creadas, decisiones del orquestador.
## DoD
@@ -69,7 +69,7 @@ Acciones tomadas:
- Clonado `apps/pipeline_launcher` desde Gitea en aurgi-pc para la investigacion; `pc_locations` pasa de `missing` a `active` tras `fn sync` futuro.
Pendiente fuera de scope:
- `apps/pipeline_launcher/go.mod` tiene `replace fn-registry => /home/lucas/fn_registry` hardcoded — el build solo funciona en home-wsl. Issue aparte si se quiere cross-PC build.
- `apps/pipeline_launcher/go.mod` tiene `replace fn-registry => $HOME/fn_registry` hardcoded — el build solo funciona en home-wsl. Issue aparte si se quiere cross-PC build.
- `fn_operations/project_template/operations.db` tiene migraciones aplicadas hasta v5, falta v6. Stale template — issue aparte.
Acceptance:
@@ -65,9 +65,9 @@ e2e_checks:
# reconfiguracion).
- id: cmake_configure_linux
cmd: >
test -f /home/lucas/fn_registry/cpp/build/linux/build.ninja ||
cmake -S /home/lucas/fn_registry/cpp
-B /home/lucas/fn_registry/cpp/build/linux
test -f $HOME/fn_registry/cpp/build/linux/build.ninja ||
cmake -S $HOME/fn_registry/cpp
-B $HOME/fn_registry/cpp/build/linux
-DFN_BUILD_TESTS=OFF
-DCMAKE_BUILD_TYPE=RelWithDebInfo
timeout_s: 60
@@ -77,13 +77,13 @@ e2e_checks:
# y el linkado con fn_framework (app_base.cpp, GLFW, OpenGL) tiene exito.
# Este es el check de compilacion base que corre en cualquier entorno.
- id: build_linux
cmd: "cmake --build /home/lucas/fn_registry/cpp/build/linux --target altsnap_jitter_test -j4"
cmd: "cmake --build $HOME/fn_registry/cpp/build/linux --target altsnap_jitter_test -j4"
timeout_s: 300
severity: critical
# Verifica que el binario Linux existe tras el build.
- id: binary_exists_linux
cmd: "test -f /home/lucas/fn_registry/cpp/build/linux/apps/altsnap_jitter_test/altsnap_jitter_test"
cmd: "test -f $HOME/fn_registry/cpp/build/linux/apps/altsnap_jitter_test/altsnap_jitter_test"
timeout_s: 5
severity: critical
@@ -95,7 +95,7 @@ e2e_checks:
cmd: >
xvfb-run -a -s "-screen 0 1280x800x24"
env LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=llvmpipe
/home/lucas/fn_registry/cpp/build/linux/apps/altsnap_jitter_test/altsnap_jitter_test
$HOME/fn_registry/cpp/build/linux/apps/altsnap_jitter_test/altsnap_jitter_test
timeout_s: 60
severity: critical
@@ -103,7 +103,7 @@ e2e_checks:
# add_imgui_app genera altsnap_jitter_test_appicon.rc; si el .ico falta el build
# mingw pasa pero el .exe Windows queda sin icono embebido.
- id: icon_exists
cmd: "test -f /home/lucas/fn_registry/apps/altsnap_jitter_test/appicon.ico"
cmd: "test -f $HOME/fn_registry/apps/altsnap_jitter_test/appicon.ico"
timeout_s: 5
severity: warning
@@ -124,9 +124,9 @@ e2e_checks:
# real bajo Win32 que xvfb no puede cubrir.
- id: windows_run
cmd: >
FN_REGISTRY_ROOT=/home/lucas/fn_registry
FN_REGISTRY_ROOT=$HOME/fn_registry
bash -c '
source /home/lucas/fn_registry/bash/functions/infra/e2e_run_cpp_windows.sh
source $HOME/fn_registry/bash/functions/infra/e2e_run_cpp_windows.sh
e2e_run_cpp_windows altsnap_jitter_test
'
timeout_s: 300
@@ -35,7 +35,7 @@ e2e_checks:
# Por que: gate esencial — si el target no compila, nada mas tiene sentido.
# Corre sobre el build de Windows via mingw toolchain (cross-compile desde WSL).
- id: build
cmd: "cd /home/lucas/fn_registry/cpp && cmake --build build/windows --target app_hub_launcher -j"
cmd: "cd $HOME/fn_registry/cpp && cmake --build build/windows --target app_hub_launcher -j"
timeout_s: 300
severity: critical
@@ -44,7 +44,7 @@ e2e_checks:
# Este check verifica que el binario existe y es un archivo regular.
# Si el build cross no produjo el .exe o el cp falló, este check lo detecta.
- id: binary_exists
cmd: "test -f /home/lucas/fn_registry/cpp/build/windows/apps/app_hub_launcher/app_hub_launcher.exe"
cmd: "test -f $HOME/fn_registry/cpp/build/windows/apps/app_hub_launcher/app_hub_launcher.exe"
timeout_s: 5
severity: critical
@@ -53,7 +53,7 @@ e2e_checks:
# Si se borra el ico, el .exe no tiene icono embebido (no falla el build, pero rompe el
# contrato visual de la suite). El .ico es artefacto versionado en el sub-repo.
- id: appicon_exists
cmd: "test -f /home/lucas/fn_registry/apps/app_hub_launcher/appicon.ico"
cmd: "test -f $HOME/fn_registry/apps/app_hub_launcher/appicon.ico"
timeout_s: 5
severity: critical
@@ -36,7 +36,7 @@ e2e_checks:
# 2026-05-16 en app.md). Arreglar antes de promover a critical.
# -----------------------------------------------------------------------
- id: build_frontend
cmd: "cd /home/lucas/fn_registry/apps/dag_engine/frontend && pnpm install --frozen-lockfile && pnpm build"
cmd: "cd $HOME/fn_registry/apps/dag_engine/frontend && pnpm install --frozen-lockfile && pnpm build"
timeout_s: 180
severity: warning
# NOTA: severity warning porque pnpm build falla por API drift conocido.
@@ -51,7 +51,7 @@ e2e_checks:
# de trabajo (idempotente, no afecta al binario productivo).
# -----------------------------------------------------------------------
- id: build_backend
cmd: "cd /home/lucas/fn_registry/apps/dag_engine && CGO_ENABLED=1 go build -tags fts5 -o /tmp/dag_engine_e2e_bin ."
cmd: "cd $HOME/fn_registry/apps/dag_engine && CGO_ENABLED=1 go build -tags fts5 -o /tmp/dag_engine_e2e_bin ."
timeout_s: 120
# -----------------------------------------------------------------------
@@ -64,7 +64,7 @@ e2e_checks:
# NO hay flag --migrate-only en el binario actual.
# -----------------------------------------------------------------------
- id: migrations_apply
cmd: "rm -f /tmp/dag_engine_e2e.db /tmp/dag_engine_e2e.db-shm /tmp/dag_engine_e2e.db-wal && /tmp/dag_engine_e2e_bin list --db /tmp/dag_engine_e2e.db /home/lucas/fn_registry/apps/dag_engine/dags_migrated/"
cmd: "rm -f /tmp/dag_engine_e2e.db /tmp/dag_engine_e2e.db-shm /tmp/dag_engine_e2e.db-wal && /tmp/dag_engine_e2e_bin list --db /tmp/dag_engine_e2e.db $HOME/fn_registry/apps/dag_engine/dags_migrated/"
timeout_s: 15
expect_exit: 0
# NOTA: depende de check build_backend (usa /tmp/dag_engine_e2e_bin).
@@ -80,7 +80,7 @@ e2e_checks:
# mal referenciados, etc.).
# -----------------------------------------------------------------------
- id: dag_parse_fn_backup
cmd: "/tmp/dag_engine_e2e_bin validate /home/lucas/fn_registry/apps/dag_engine/dags_migrated/fn_backup.yaml"
cmd: "/tmp/dag_engine_e2e_bin validate $HOME/fn_registry/apps/dag_engine/dags_migrated/fn_backup.yaml"
timeout_s: 10
expect_exit: 0
expect_stdout_contains: "Validation: PASS"
@@ -93,7 +93,7 @@ e2e_checks:
# topo_sort sobre un grafo no trivial.
# -----------------------------------------------------------------------
- id: dag_parse_daily_audit
cmd: "/tmp/dag_engine_e2e_bin validate /home/lucas/fn_registry/apps/dag_engine/dags_migrated/daily-registry-audit.yaml"
cmd: "/tmp/dag_engine_e2e_bin validate $HOME/fn_registry/apps/dag_engine/dags_migrated/daily-registry-audit.yaml"
timeout_s: 10
expect_exit: 0
expect_stdout_contains: "Validation: PASS"
@@ -108,7 +108,7 @@ e2e_checks:
# health endpoint /api/dags declarado en service.health_endpoint.
# -----------------------------------------------------------------------
- id: smoke_server
cmd: "/tmp/dag_engine_e2e_bin server --port 8195 --db /tmp/dag_engine_e2e.db --dags-dir /home/lucas/fn_registry/apps/dag_engine/dags_migrated/ &"
cmd: "/tmp/dag_engine_e2e_bin server --port 8195 --db /tmp/dag_engine_e2e.db --dags-dir $HOME/fn_registry/apps/dag_engine/dags_migrated/ &"
health: "http://127.0.0.1:8195/api/dags"
timeout_s: 10
# NOTA: sin flag --scheduler para no disparar jobs reales.
@@ -132,6 +132,6 @@ e2e_checks:
# Cuando se añadan tests: descomentar y ajustar.
# -----------------------------------------------------------------------
# - id: tests
# cmd: "cd /home/lucas/fn_registry/apps/dag_engine && go test -tags fts5 -count=1 ./..."
# cmd: "cd $HOME/fn_registry/apps/dag_engine && go test -tags fts5 -count=1 ./..."
# timeout_s: 120
# OMITIDO: sin *_test.go
@@ -15,7 +15,7 @@ e2e_checks:
# build: compila el binario con CGO habilitado. Sin -tags fts5 (no lo usa el modulo).
# Valida que el modulo go-sqlite3 linkea correctamente en el entorno local.
- id: build
cmd: "cd /home/lucas/fn_registry/apps/deploy_server && CGO_ENABLED=1 go build -o /tmp/deploy_server_e2e_bin ."
cmd: "cd $HOME/fn_registry/apps/deploy_server && CGO_ENABLED=1 go build -o /tmp/deploy_server_e2e_bin ."
timeout_s: 180
# cli_help: verifica que el binario arranca y responde sin crashear ni pedir args obligatorios.
@@ -30,8 +30,8 @@ e2e_checks_suggested:
# No conecta a Metabase — solo resuelve imports.
- id: import
cmd: >
cd /home/lucas/fn_registry/apps/metabase_registry &&
/home/lucas/fn_registry/python/.venv/bin/python3 -c
cd $HOME/fn_registry/apps/metabase_registry &&
$HOME/fn_registry/python/.venv/bin/python3 -c
"import sys, os;
sys.path.insert(0, os.path.join(os.getcwd(), '..', '..', 'python', 'functions'));
from metabase import MetabaseClient, metabase_create_card, metabase_create_dashboard, metabase_update_dashboard;
@@ -49,8 +49,8 @@ e2e_checks_suggested:
# argparse imprime usage sin necesitar credenciales ni conexion.
- id: cli_help
cmd: >
cd /home/lucas/fn_registry/apps/metabase_registry &&
/home/lucas/fn_registry/python/.venv/bin/python3 main.py --help
cd $HOME/fn_registry/apps/metabase_registry &&
$HOME/fn_registry/python/.venv/bin/python3 main.py --help
expect_stdout_contains: "metabase_registry"
expect_exit: 0
timeout_s: 10
@@ -62,8 +62,8 @@ e2e_checks_suggested:
# Detecta SyntaxError y NameError de nivel modulo antes de cualquier deploy.
- id: syntax_check
cmd: >
cd /home/lucas/fn_registry/apps/metabase_registry &&
/home/lucas/fn_registry/python/.venv/bin/python3 -m py_compile
cd $HOME/fn_registry/apps/metabase_registry &&
$HOME/fn_registry/python/.venv/bin/python3 -m py_compile
main.py create_registry_dashboard.py create_apps_dashboard.py
create_script_navegador_dashboard.py &&
echo "syntax OK"
@@ -82,11 +82,11 @@ e2e_checks_suggested:
# severity: warning porque el fallo esperado viene de red, no del codigo.
- id: dry_run_parser
cmd: >
cd /home/lucas/fn_registry/apps/metabase_registry &&
cd $HOME/fn_registry/apps/metabase_registry &&
METABASE_URL=http://127.0.0.1:19999
METABASE_ADMIN_EMAIL=test@example.com
METABASE_ADMIN_PASSWORD=fake_password_for_e2e
/home/lucas/fn_registry/python/.venv/bin/python3 main.py
$HOME/fn_registry/python/.venv/bin/python3 main.py
--url http://127.0.0.1:19999
--admin-email test@example.com
--admin-password fake_password_for_e2e
@@ -48,7 +48,7 @@ e2e_checks:
# y hacer el check idempotente.
# -----------------------------------------------------------------------
- id: build
cmd: "cd /home/lucas/fn_registry/apps/pipeline_launcher && CGO_ENABLED=1 go build -tags fts5 -o /tmp/pipeline_launcher_e2e_bin ."
cmd: "cd $HOME/fn_registry/apps/pipeline_launcher && CGO_ENABLED=1 go build -tags fts5 -o /tmp/pipeline_launcher_e2e_bin ."
timeout_s: 120
# -----------------------------------------------------------------------
@@ -61,7 +61,7 @@ e2e_checks:
# config/ y views/ que el build check no ejercita separadamente.
# -----------------------------------------------------------------------
- id: vet
cmd: "cd /home/lucas/fn_registry/apps/pipeline_launcher && CGO_ENABLED=1 go vet -tags fts5 ./..."
cmd: "cd $HOME/fn_registry/apps/pipeline_launcher && CGO_ENABLED=1 go vet -tags fts5 ./..."
timeout_s: 60
# -----------------------------------------------------------------------
@@ -78,7 +78,7 @@ e2e_checks:
# -----------------------------------------------------------------------
- id: pipelines_list_loads
cmd: >
COUNT=$(sqlite3 /home/lucas/fn_registry/registry.db
COUNT=$(sqlite3 $HOME/fn_registry/registry.db
"SELECT COUNT(*) FROM functions WHERE kind='pipeline' AND tags LIKE '%launcher%';");
[ "$COUNT" -ge 1 ] && echo "launcher_pipelines=$COUNT OK" || { echo "FAIL: no launcher pipelines found in registry.db"; exit 1; }
timeout_s: 10
@@ -48,7 +48,7 @@ e2e_checks:
# rompe su API de compilacion, este check lo detecta antes de que otro app falle.
# Actua como build gate del registry de funciones C++.
- id: build
cmd: "cmake --build /home/lucas/fn_registry/cpp/build/windows --target primitives_gallery -j"
cmd: "cmake --build $HOME/fn_registry/cpp/build/windows --target primitives_gallery -j"
timeout_s: 300
severity: critical
@@ -56,7 +56,7 @@ e2e_checks:
# El build puede reportar exit 0 con -j en builds parciales sin producir binario.
# Sin este check, capture_mode fallaria con un mensaje de error menos claro.
- id: binary_exists
cmd: "test -f /home/lucas/fn_registry/cpp/build/windows/apps/primitives_gallery/primitives_gallery.exe"
cmd: "test -f $HOME/fn_registry/cpp/build/windows/apps/primitives_gallery/primitives_gallery.exe"
timeout_s: 5
severity: critical
@@ -78,7 +78,7 @@ e2e_checks:
- id: capture_mode
cmd: >
mkdir -p /tmp/primitives_gallery_e2e &&
/home/lucas/fn_registry/cpp/build/windows/apps/primitives_gallery/primitives_gallery.exe
$HOME/fn_registry/cpp/build/windows/apps/primitives_gallery/primitives_gallery.exe
--capture /tmp/primitives_gallery_e2e
timeout_s: 120
severity: warning
@@ -108,7 +108,7 @@ e2e_checks:
# como recurso (.rsrc) en el .exe. Si appicon.ico falta, el build pasa
# pero el .exe queda sin icono embebido (visible en Explorer + taskbar).
- id: icon_exists
cmd: "test -f /home/lucas/fn_registry/apps/primitives_gallery/appicon.ico"
cmd: "test -f $HOME/fn_registry/apps/primitives_gallery/appicon.ico"
timeout_s: 5
severity: warning
@@ -121,7 +121,7 @@ e2e_checks:
# Referencia esperada: 43 entradas (conteo manual de k_demos[] en main.cpp L37-84).
- id: demos_count_static
cmd: >
count=$(grep -c '^\s*{"' /home/lucas/fn_registry/apps/primitives_gallery/main.cpp);
count=$(grep -c '^\s*{"' $HOME/fn_registry/apps/primitives_gallery/main.cpp);
echo "DemoEntry count in source: $count";
test "$count" -ge 43
timeout_s: 5
@@ -32,7 +32,7 @@ e2e_checks:
# apunta a ../../ (raiz del registry), por lo que el build debe lanzarse
# desde dentro del directorio de la app.
- id: build
cmd: "cd /home/lucas/fn_registry/apps/registry_api && CGO_ENABLED=1 go build -tags fts5 -o registry_api ."
cmd: "cd $HOME/fn_registry/apps/registry_api && CGO_ENABLED=1 go build -tags fts5 -o registry_api ."
timeout_s: 120
severity: critical
# por que: sin binario el resto de checks no tiene sentido; fallo de build
@@ -43,7 +43,7 @@ e2e_checks:
# /api/status. Puerto 8521 (!=8420 prod, !=8420 dev) para no colisionar.
# El proceso en background se mata al terminar la suite por fn-analizador.
- id: smoke
cmd: "/home/lucas/fn_registry/apps/registry_api/registry_api -port 8521 -db /tmp/registry_api_e2e.db &"
cmd: "$HOME/fn_registry/apps/registry_api/registry_api -port 8521 -db /tmp/registry_api_e2e.db &"
health: "http://127.0.0.1:8521/api/status"
timeout_s: 10
severity: critical
@@ -91,7 +91,7 @@ e2e_checks:
- id: auth_check
cmd: >
REGISTRY_API_TOKEN=real-secret
/home/lucas/fn_registry/apps/registry_api/registry_api -port 8522 -db /tmp/registry_api_e2e_auth.db &
$HOME/fn_registry/apps/registry_api/registry_api -port 8522 -db /tmp/registry_api_e2e_auth.db &
sleep 1 &&
STATUS=$(curl -s -o /dev/null -w '%{http_code}'
-X POST http://127.0.0.1:8522/api/sync
@@ -44,7 +44,7 @@
# (antes del primer "##" de prosa).
# 2. El check 'build' asume que el directorio cpp/build/linux existe y cmake
# fue configurado previamente. Si no: anteponer
# "cmake -B /home/lucas/fn_registry/cpp/build/linux -S /home/lucas/fn_registry/cpp &&"
# "cmake -B $HOME/fn_registry/cpp/build/linux -S $HOME/fn_registry/cpp &&"
# al cmd o usar el check 'build_configure' (opcional, ver abajo).
# 3. El check 'integration_sqlite_direct' requiere que registry.db exista en
# la raiz del repo. En CI, puede copiarse de un fixture o generarse con
@@ -62,7 +62,7 @@ e2e_checks:
# CGO no aplica (es C++, no Go). FTS5 se compila via SQLITE_ENABLE_FTS5
# en la amalgamation vendoreada (CMakeLists.txt lo setea).
- id: build
cmd: "cmake --build /home/lucas/fn_registry/cpp/build/linux --target registry_dashboard -j$(nproc)"
cmd: "cmake --build $HOME/fn_registry/cpp/build/linux --target registry_dashboard -j$(nproc)"
timeout_s: 300
severity: critical
# por que: la app enlaza ~20 funciones del registry C++ + sqlite + ws_client.
@@ -74,7 +74,7 @@ e2e_checks:
# Confirma que el binario existe y es ejecutable tras el build.
# Tambien verifica la version de symbols minimos esperados (sin linkage roto).
- id: verify_binary
cmd: "test -x /home/lucas/fn_registry/cpp/build/linux/apps/registry_dashboard && /home/lucas/fn_registry/cpp/build/linux/apps/registry_dashboard --help 2>&1 || true"
cmd: "test -x $HOME/fn_registry/cpp/build/linux/apps/registry_dashboard && $HOME/fn_registry/cpp/build/linux/apps/registry_dashboard --help 2>&1 || true"
expect_exit: 0
timeout_s: 5
severity: critical
@@ -93,8 +93,8 @@ e2e_checks:
- id: integration_sqlite_direct
cmd: >
DISPLAY="" timeout 3
/home/lucas/fn_registry/cpp/build/linux/apps/registry_dashboard
/home/lucas/fn_registry/registry.db
$HOME/fn_registry/cpp/build/linux/apps/registry_dashboard
$HOME/fn_registry/registry.db
2>&1 | head -5
expect_exit: 1
timeout_s: 10
@@ -116,7 +116,7 @@ e2e_checks:
# Actua como pre-condicion para integration_sqlite_direct.
- id: data_schema_check
cmd: >
sqlite3 /home/lucas/fn_registry/registry.db
sqlite3 $HOME/fn_registry/registry.db
"SELECT COUNT(*) FROM sqlite_master WHERE type='table'
AND name IN ('functions','types','apps','analysis','proposals','unit_tests');"
expect_stdout_contains: "6"
@@ -133,7 +133,7 @@ e2e_checks:
# via HTTP, pero aqui queremos detectar schema drift independientemente.
- id: call_monitor_schema_check
cmd: >
sqlite3 /home/lucas/fn_registry/projects/fn_monitoring/apps/call_monitor/operations.db
sqlite3 $HOME/fn_registry/projects/fn_monitoring/apps/call_monitor/operations.db
"SELECT COUNT(*) FROM sqlite_master WHERE type='table'
AND name IN ('calls','violations','sessions');"
expect_stdout_contains: "3"
@@ -151,7 +151,7 @@ e2e_checks:
# WsClient sin actualizar todos los call sites.
- id: ws_client_compile_check
cmd: >
cmake --build /home/lucas/fn_registry/cpp/build/linux
cmake --build $HOME/fn_registry/cpp/build/linux
--target registry_dashboard -j$(nproc) -- --warn-undefined-functions
2>&1 | grep -i "ws_client" | grep -i "error" || true
expect_stdout_contains: ""
@@ -50,7 +50,7 @@ e2e_checks:
# -------------------------------------------------------------------
- id: build
cmd: >
cd /home/lucas/fn_registry/apps/registry_mcp &&
cd $HOME/fn_registry/apps/registry_mcp &&
CGO_ENABLED=1 go build -tags fts5 -o registry_mcp .
timeout_s: 120
severity: critical
@@ -64,7 +64,7 @@ e2e_checks:
# -------------------------------------------------------------------
- id: tests
cmd: >
cd /home/lucas/fn_registry/apps/registry_mcp &&
cd $HOME/fn_registry/apps/registry_mcp &&
CGO_ENABLED=1 go test -tags fts5 -count=1 -timeout 60s ./...
timeout_s: 90
severity: critical
@@ -80,7 +80,7 @@ e2e_checks:
# -------------------------------------------------------------------
- id: naming_reject
cmd: >
cd /home/lucas/fn_registry/apps/registry_mcp &&
cd $HOME/fn_registry/apps/registry_mcp &&
CGO_ENABLED=1 go test -tags fts5 -count=1 -run TestValidateName -v 2>&1 |
grep -q "PASS"
timeout_s: 30
@@ -98,10 +98,10 @@ e2e_checks:
# -------------------------------------------------------------------
- id: mcp_handshake_stdio
cmd: |
BINARY=/home/lucas/fn_registry/apps/registry_mcp/registry_mcp
BINARY=$HOME/fn_registry/apps/registry_mcp/registry_mcp
PAYLOAD='{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"e2e_probe","version":"0"}}}'
RESPONSE=$(echo "$PAYLOAD" | timeout 5 "$BINARY" \
--registry-root /home/lucas/fn_registry \
--registry-root $HOME/fn_registry \
--log-level error \
2>/dev/null | head -n1)
echo "response: $RESPONSE"
@@ -21,12 +21,12 @@ e2e_checks:
# -----------------------------------------------------------------------
# CHECK 1: build
# Por que: verifica que el modulo Go compila con CGO (go-sqlite3) y las
# dependencias del registry (replace fn-registry => /home/lucas/fn_registry).
# dependencias del registry (replace fn-registry => $HOME/fn_registry).
# Sin esto nada funciona. El binario se deja en /tmp para no contaminar el dir.
# -----------------------------------------------------------------------
- id: build
cmd: >
cd /home/lucas/fn_registry/apps/script_navegador &&
cd $HOME/fn_registry/apps/script_navegador &&
CGO_ENABLED=1 go build -tags fts5 -o /tmp/script_navegador_e2e .
timeout_s: 120
@@ -52,7 +52,7 @@ e2e_checks:
- id: syntax_yaml
cmd: >
/tmp/script_navegador_e2e
--script /home/lucas/fn_registry/apps/script_navegador/examples/busqueda_google.yaml
--script $HOME/fn_registry/apps/script_navegador/examples/busqueda_google.yaml
--port 19222
2>&1 || true
expect_stdout_contains: "busqueda_google"
@@ -84,7 +84,7 @@ e2e_checks:
# -----------------------------------------------------------------------
- id: ops_schema
cmd: >
sqlite3 /home/lucas/fn_registry/apps/script_navegador/operations.db
sqlite3 $HOME/fn_registry/apps/script_navegador/operations.db
"SELECT name FROM sqlite_master WHERE type='table'
AND name IN ('entities','relations','executions','logs','assertions','assertion_results')
ORDER BY name;" 2>/dev/null
@@ -116,6 +116,6 @@ e2e_checks:
# No hay archivos *_test.go en el directorio. Si se anaden en el futuro,
# agregar:
# - id: tests
# cmd: "cd /home/lucas/fn_registry/apps/script_navegador && go test -count=1 ./..."
# cmd: "cd $HOME/fn_registry/apps/script_navegador && go test -count=1 ./..."
# timeout_s: 60
# -----------------------------------------------------------------------
@@ -33,7 +33,7 @@ e2e_checks:
# pero el flag no rompe nada y evita confusion futura si se añade FTS).
# -----------------------------------------------------------------------
- id: build
cmd: "cd /home/lucas/fn_registry/apps/services_api && CGO_ENABLED=1 go build -o services_api ."
cmd: "cd $HOME/fn_registry/apps/services_api && CGO_ENABLED=1 go build -o services_api ."
timeout_s: 120
severity: critical
# por que: si no compila no hay nada que probar
@@ -47,11 +47,11 @@ e2e_checks:
# -----------------------------------------------------------------------
- id: smoke_once
cmd: >
cd /home/lucas/fn_registry/apps/services_api &&
FN_REGISTRY_ROOT=/home/lucas/fn_registry
cd $HOME/fn_registry/apps/services_api &&
FN_REGISTRY_ROOT=$HOME/fn_registry
./services_api
--once
--registry /home/lucas/fn_registry
--registry $HOME/fn_registry
--db /tmp/services_api_e2e.db
--bind 127.0.0.1:8585
timeout_s: 45
@@ -67,10 +67,10 @@ e2e_checks:
# -----------------------------------------------------------------------
- id: smoke_health
cmd: >
cd /home/lucas/fn_registry/apps/services_api &&
cd $HOME/fn_registry/apps/services_api &&
./services_api
--bind 127.0.0.1:8585
--registry /home/lucas/fn_registry
--registry $HOME/fn_registry
--db /tmp/services_api_e2e_http.db
--interval 300s &
health: "http://127.0.0.1:8585/api/health"
@@ -124,7 +124,7 @@ e2e_checks:
# No existen *_test.go en apps/services_api. Activar cuando se añadan.
#
# - id: tests
# cmd: "cd /home/lucas/fn_registry/apps/services_api && CGO_ENABLED=1 go test -count=1 ./..."
# cmd: "cd $HOME/fn_registry/apps/services_api && CGO_ENABLED=1 go test -count=1 ./..."
# timeout_s: 120
# severity: critical
# -----------------------------------------------------------------------
@@ -30,7 +30,7 @@ e2e_checks:
# (data_table::render, issue 0097) y ws2_32 en WIN32.
# Detecta regresiones de API en data_table o cambios de firma en http_client.h.
- id: build
cmd: "cmake --build /home/lucas/fn_registry/cpp/build/windows --target services_monitor -j"
cmd: "cmake --build $HOME/fn_registry/cpp/build/windows --target services_monitor -j"
timeout_s: 300
severity: critical
@@ -39,7 +39,7 @@ e2e_checks:
# (ha ocurrido con fn_module_data_table cuando el target es condicional via
# if(TARGET fn_module_data_table) sin hacer REQUIRED).
- id: binary_exists
cmd: "test -f /home/lucas/fn_registry/cpp/build/windows/apps/services_monitor/services_monitor.exe"
cmd: "test -f $HOME/fn_registry/cpp/build/windows/apps/services_monitor/services_monitor.exe"
timeout_s: 5
severity: critical
@@ -48,7 +48,7 @@ e2e_checks:
# si el .ico falta el build pasa pero el .exe queda sin icono (phosphor=pulse
# accent=#10b981 segun app.md). Visible al copiar a Desktop/apps/.
- id: icon_exists
cmd: "test -f /home/lucas/fn_registry/apps/services_monitor/appicon.ico"
cmd: "test -f $HOME/fn_registry/apps/services_monitor/appicon.ico"
timeout_s: 5
severity: warning
@@ -25,7 +25,7 @@ e2e_checks:
# Es el check mas valioso: detecta regresiones de API en cualquiera de las
# 19 funciones del registry que usa la app.
- id: build
cmd: "cmake --build /home/lucas/fn_registry/cpp/build/windows --target shaders_lab -j"
cmd: "cmake --build $HOME/fn_registry/cpp/build/windows --target shaders_lab -j"
timeout_s: 300
severity: critical
@@ -33,7 +33,7 @@ e2e_checks:
# Detecta casos donde cmake reporta exit 0 pero el linker no produjo binario
# (muy raro con mingw-w64 pero ha ocurrido en builds parciales con -j).
- id: binary_exists
cmd: "test -f /home/lucas/fn_registry/cpp/build/windows/apps/shaders_lab/shaders_lab.exe"
cmd: "test -f $HOME/fn_registry/cpp/build/windows/apps/shaders_lab/shaders_lab.exe"
timeout_s: 5
severity: critical
@@ -42,6 +42,6 @@ e2e_checks:
# si el .ico falta el build pasa pero el .exe queda sin icono embebido
# (visible al deploy a /mnt/c/.../Desktop/apps/).
- id: icon_exists
cmd: "test -f /home/lucas/fn_registry/apps/shaders_lab/appicon.ico"
cmd: "test -f $HOME/fn_registry/apps/shaders_lab/appicon.ico"
timeout_s: 5
severity: warning
@@ -20,7 +20,7 @@ e2e_checks:
# El binario resultante es el mismo que usa el systemd unit.
# Correr desde la raiz del repo porque go.mod vive ahi.
cmd: >
cd /home/lucas/fn_registry &&
cd $HOME/fn_registry &&
CGO_ENABLED=1 go build -tags fts5
-o projects/fn_monitoring/apps/sqlite_api/sqlite_api
./projects/fn_monitoring/apps/sqlite_api/
@@ -35,7 +35,7 @@ e2e_checks:
# DiscoverDatabases, /tables, /schema, 404 para DB inexistente.
# Usan DB en t.TempDir() — totalmente efimeros.
cmd: >
cd /home/lucas/fn_registry &&
cd $HOME/fn_registry &&
CGO_ENABLED=1 go test -tags fts5 -count=1 -v
./projects/fn_monitoring/apps/sqlite_api/
timeout_s: 60
@@ -48,8 +48,8 @@ e2e_checks:
# encuentre registry.db real (necesario para /api/databases).
# El proceso queda en background; fn-analizador lo mata al terminar.
cmd: >
FN_REGISTRY_ROOT=/home/lucas/fn_registry
/home/lucas/fn_registry/projects/fn_monitoring/apps/sqlite_api/sqlite_api
FN_REGISTRY_ROOT=$HOME/fn_registry
$HOME/fn_registry/projects/fn_monitoring/apps/sqlite_api/sqlite_api
--bind 127.0.0.1:8684
--data-factory-db /tmp/sqlite_api_e2e_df.db &
health: "http://127.0.0.1:8684/api/databases"
+6 -6
View File
@@ -57,7 +57,7 @@ e2e_checks:
# los tabs, (c) ninguna TU del modulo rompe ODR.
# Es el build gate de data_table v2.0+ para issue 0081 BeginTable migration.
- id: build
cmd: "cmake --build /home/lucas/fn_registry/cpp/build --target tables_qa -j"
cmd: "cmake --build $HOME/fn_registry/cpp/build --target tables_qa -j"
timeout_s: 300
severity: critical
# Nota: si fn_module_data_table aun no esta buildado, cmake lo buildara como
@@ -67,7 +67,7 @@ e2e_checks:
# cmake --build puede retornar exit 0 en rebuilds parciales sin producir binario
# si el target ya esta up-to-date pero el archivo fue borrado manualmente.
- id: binary_exists
cmd: "test -f /home/lucas/fn_registry/cpp/build/apps/tables_qa/tables_qa"
cmd: "test -f $HOME/fn_registry/cpp/build/apps/tables_qa/tables_qa"
timeout_s: 5
severity: critical
@@ -80,7 +80,7 @@ e2e_checks:
# implemente --self-test real con imgui_test_engine, ascender a critical y
# añadir expect_stdout_contains para verificar resultados concretos.
- id: self_test_stub
cmd: "/home/lucas/fn_registry/cpp/build/apps/tables_qa/tables_qa --self-test"
cmd: "$HOME/fn_registry/cpp/build/apps/tables_qa/tables_qa --self-test"
timeout_s: 15
expect_exit: 0
expect_stdout_contains: "SKIPPED"
@@ -94,7 +94,7 @@ e2e_checks:
# Windows queda sin icono embebido. Fallo aqui detecta borrado accidental
# del .ico antes de cross-compile.
- id: icon_exists
cmd: "test -f /home/lucas/fn_registry/apps/tables_qa/appicon.ico"
cmd: "test -f $HOME/fn_registry/apps/tables_qa/appicon.ico"
timeout_s: 5
severity: warning
@@ -107,7 +107,7 @@ e2e_checks:
# Cuenta "render_" en tabs.h como proxy del numero de tabs declarados.
- id: tabs_declared
cmd: >
count=$(grep -c 'render_' /home/lucas/fn_registry/apps/tables_qa/tabs.h 2>/dev/null);
count=$(grep -c 'render_' $HOME/fn_registry/apps/tables_qa/tabs.h 2>/dev/null);
echo "render_ declarations in tabs.h: $count";
test "$count" -ge 10
timeout_s: 5
@@ -121,7 +121,7 @@ e2e_checks:
# Este check estático es mas rapido que el build completo y da feedback antes.
- id: cmakelists_tab_srcs
cmd: >
count=$(grep -c '^ tab_' /home/lucas/fn_registry/apps/tables_qa/CMakeLists.txt 2>/dev/null);
count=$(grep -c '^ tab_' $HOME/fn_registry/apps/tables_qa/CMakeLists.txt 2>/dev/null);
echo "tab_*.cpp in CMakeLists: $count";
test "$count" -ge 10
timeout_s: 5
+3 -3
View File
@@ -26,9 +26,9 @@ import (
func main() {
cfg := infra.WorktreeLaunchConfig{
RepoRoot: "/home/lucas/fn_registry",
RepoRoot: "$HOME/fn_registry",
Branch: "auto/0115-worktree-launcher-fn",
WorktreePath: "/home/lucas/fn_registry/worktrees/0115-worktree-launcher-fn",
WorktreePath: "$HOME/fn_registry/worktrees/0115-worktree-launcher-fn",
Prompt: "Implement issue 0115 — worktree launcher Go function",
LogPath: "/tmp/claude-0115.log",
SkipPerms: true,
@@ -49,7 +49,7 @@ func main() {
}
// Validar DoD del issue antes de cerrarlo
report, _ := infra.AuditDodSchema("/home/lucas/fn_registry/dev/issues", "")
report, _ := infra.AuditDodSchema("$HOME/fn_registry/dev/issues", "")
fmt.Printf("dod: %d items, %d invalid\n", report.TotalItems, report.InvalidItems)
}
```
+3 -3
View File
@@ -26,7 +26,7 @@ source bash/functions/infra/launch_cpp_app_windows.sh
source bash/functions/infra/is_cpp_app_running_windows.sh
deploy_cpp_exe_to_windows "registry_dashboard" \
"/home/lucas/fn_registry/projects/fn_monitoring/apps/registry_dashboard"
"$HOME/fn_registry/projects/fn_monitoring/apps/registry_dashboard"
launch_cpp_app_windows "registry_dashboard"
sleep 1
if is_cpp_app_running_windows "registry_dashboard"; then
@@ -43,11 +43,11 @@ source bash/functions/pipelines/redeploy_cpp_app_windows.sh
# Sin recompilar
redeploy_cpp_app_windows "registry_dashboard" \
"/home/lucas/fn_registry/projects/fn_monitoring/apps/registry_dashboard"
"$HOME/fn_registry/projects/fn_monitoring/apps/registry_dashboard"
# Con recompilacion previa
redeploy_cpp_app_windows "chart_demo" \
"/home/lucas/fn_registry/cpp/apps/chart_demo" --build
"$HOME/fn_registry/cpp/apps/chart_demo" --build
```
### Comprobar si esta vivo antes de decidir
+1 -1
View File
@@ -25,7 +25,7 @@ Funciones de diagnostico read-only del registry y sus artefactos. Componen `fn d
// reciben registryRoot (raiz del repo) y retornan slice de resultados + error.
import "fn-registry/functions/infra"
audits, err := infra.AuditCapabilityGroups("/home/lucas/fn_registry")
audits, err := infra.AuditCapabilityGroups("$HOME/fn_registry")
if err != nil { log.Fatal(err) }
for _, a := range audits {
if !a.OK { fmt.Printf("%s: %v\n", a.Group, a.Issues) }
+1 -1
View File
@@ -41,7 +41,7 @@ Operaciones git y Gitea: descubrir repos, clonar, commit, push/pull, hooks, gest
# analysis domain_coverage_gaps [cloned]
#
# Siguiente paso sugerido:
# cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index && ./fn sync
# cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index && ./fn sync
CGO_ENABLED=1 ./fn index && ./fn sync
+2 -2
View File
@@ -26,8 +26,8 @@ Cluster de funciones para leer, escribir y vigilar los archivos `dev/issues/*.md
import "fn-registry/functions/infra"
const (
issuesDir = "/home/lucas/fn_registry/dev/issues"
flowsDir = "/home/lucas/fn_registry/dev/flows"
issuesDir = "$HOME/fn_registry/dev/issues"
flowsDir = "$HOME/fn_registry/dev/flows"
)
// 1. Carga inicial
+1 -1
View File
@@ -337,7 +337,7 @@ hooks:
```yaml
name: backup_diario
schedule: "0 2 * * *"
working_dir: /home/lucas/fn_registry/apps/mi_app
working_dir: $HOME/fn_registry/apps/mi_app
steps:
- name: backup
function: backup_db_bash_pipelines
+2 -2
View File
@@ -36,9 +36,9 @@ file_path: "functions/infra/agent_cleanup_worktree.go"
```go
err := infra.AgentCleanupWorktree(
"/home/lucas/fn_registry",
"$HOME/fn_registry",
"auto/0115-worktree-launcher-fn",
"/home/lucas/fn_registry/worktrees/0115-worktree-launcher-fn",
"$HOME/fn_registry/worktrees/0115-worktree-launcher-fn",
12345, // PID devuelto por AgentLaunchWorktree
)
if err != nil {
+3 -3
View File
@@ -31,9 +31,9 @@ file_path: "functions/infra/agent_launch_worktree.go"
```go
res := infra.AgentLaunchWorktree(infra.WorktreeLaunchConfig{
RepoRoot: "/home/lucas/fn_registry",
RepoRoot: "$HOME/fn_registry",
Branch: "auto/0115-worktree-launcher-fn",
WorktreePath: "/home/lucas/fn_registry/worktrees/0115-worktree-launcher-fn",
WorktreePath: "$HOME/fn_registry/worktrees/0115-worktree-launcher-fn",
Prompt: "Implement issue 0115 — worktree launcher Go function",
LogPath: "/tmp/claude-0115.log",
SkipPerms: true,
@@ -44,7 +44,7 @@ if res.Error != "" {
}
fmt.Printf("claude PID=%d branch=%s log=%s\n", res.PID, res.Branch, res.LogPath)
// ... agente trabaja ...
infra.AgentCleanupWorktree(res.WorktreePath, res.Branch, "/home/lucas/fn_registry", res.PID)
infra.AgentCleanupWorktree(res.WorktreePath, res.Branch, "$HOME/fn_registry", res.PID)
```
## Cuando usarla
+1 -1
View File
@@ -29,7 +29,7 @@ file_path: "functions/infra/artefact_doctor.go"
## Ejemplo
```go
checks, err := ArtefactDoctor("/home/lucas/fn_registry")
checks, err := ArtefactDoctor("$HOME/fn_registry")
if err != nil {
log.Fatal(err)
}
+2 -2
View File
@@ -26,7 +26,7 @@ test_file_path: ""
file_path: "functions/infra/audit_app_drift.go"
params:
- name: registryRoot
desc: "Ruta absoluta a la raiz del fn_registry (ej. /home/lucas/fn_registry). Se buscan modules/*/module.md, apps/*/app.md, projects/*/apps/*/app.md y cpp/build/{linux,windows}/apps/<name>/."
desc: "Ruta absoluta a la raiz del fn_registry (ej. $HOME/fn_registry). Se buscan modules/*/module.md, apps/*/app.md, projects/*/apps/*/app.md y cpp/build/{linux,windows}/apps/<name>/."
- name: windowsDeployRoot
desc: "Ruta absoluta donde se despliegan los .exe de Windows (ej. /mnt/c/Users/lucas/Desktop/apps). Si vacio, se omite la inspeccion del binario desplegado y solo se usan los artefactos bajo cpp/build."
output: "Slice de AppDriftEntry, uno por app C++ encontrada. Status: 'ok' (todas las versiones coinciden), 'drift' (al menos un modulo tiene version distinta), 'no-build' (no se encontro ningun artefacto compilado). Campo Stale lista los nombres de modulos con drift."
@@ -45,7 +45,7 @@ Detecta apps C++ cuyos binarios/artefactos enlazan una version de modulo inferio
## Ejemplo
```go
entries, err := infra.AuditAppDrift("/home/lucas/fn_registry", "/mnt/c/Users/lucas/Desktop/apps")
entries, err := infra.AuditAppDrift("$HOME/fn_registry", "/mnt/c/Users/lucas/Desktop/apps")
if err != nil {
log.Fatal(err)
}
+1 -1
View File
@@ -30,7 +30,7 @@ file_path: "functions/infra/audit_app_location.go"
## Ejemplo
```go
violations, err := AuditAppLocation("/home/lucas/fn_registry")
violations, err := AuditAppLocation("$HOME/fn_registry")
if err != nil {
log.Fatal(err)
}
+1 -1
View File
@@ -59,7 +59,7 @@ type CapabilityGroupAudit struct {
## Ejemplo
```go
audits, err := AuditCapabilityGroups("/home/lucas/fn_registry")
audits, err := AuditCapabilityGroups("$HOME/fn_registry")
if err != nil {
log.Fatal(err)
}
+1 -1
View File
@@ -28,7 +28,7 @@ imports:
example: |
import "fn-registry/functions/infra"
entries, err := infra.AuditCopiedCode("/home/lucas/fn_registry")
entries, err := infra.AuditCopiedCode("$HOME/fn_registry")
if err != nil { ... }
for _, e := range entries {
fmt.Printf("%s:%s ~ %s (%s, %.2f)\n",
+1 -1
View File
@@ -27,7 +27,7 @@ file_path: "functions/infra/audit_cpp_apps.go"
## Ejemplo
```go
audits, err := infra.AuditCppApps("/home/lucas/fn_registry")
audits, err := infra.AuditCppApps("$HOME/fn_registry")
if err != nil { log.Fatal(err) }
for _, a := range audits {
if !a.OK {
+1 -1
View File
@@ -29,7 +29,7 @@ output: "Slice de DataTableUsageEntry, uno por app C++ con uses_modules: [data_t
```go
import "fn-registry/functions/infra"
entries, err := infra.AuditDataTableUsage("/home/lucas/fn_registry")
entries, err := infra.AuditDataTableUsage("$HOME/fn_registry")
if err != nil {
panic(err)
}
+2 -2
View File
@@ -36,8 +36,8 @@ file_path: "functions/infra/audit_dod_schema.go"
```go
report, err := infra.AuditDodSchema(
"/home/lucas/fn_registry/dev/issues",
"/home/lucas/fn_registry/dev/flows",
"$HOME/fn_registry/dev/issues",
"$HOME/fn_registry/dev/flows",
)
if err != nil {
log.Fatal(err)
+1 -1
View File
@@ -47,7 +47,7 @@ output: "MlEnvReport con Gpus (puede estar vacio si no hay NVIDIA), Checks con e
## Ejemplo
```go
root := "/home/lucas/fn_registry"
root := "$HOME/fn_registry"
report, err := AuditMlEnv(root)
if err != nil {
log.Fatal(err)
+1 -1
View File
@@ -27,7 +27,7 @@ output: "Slice de ModuleDriftCheck (uno por app C++ con CMakeLists.txt). Apps si
```go
import "fn-registry/functions/infra"
checks, err := infra.AuditModulesDrift("/home/lucas/fn_registry")
checks, err := infra.AuditModulesDrift("$HOME/fn_registry")
if err != nil { panic(err) }
for _, c := range checks {
if !c.OK {
+1 -1
View File
@@ -37,7 +37,7 @@ Reporta apps con tag `service` cuya `service:` block esta incompleta.
## Ejemplo
```go
audits, err := infra.AuditServicesSpec("/home/lucas/fn_registry")
audits, err := infra.AuditServicesSpec("$HOME/fn_registry")
for _, a := range audits {
if !a.OK {
fmt.Println(a.AppID, "issues:", a.Issues)
+1 -1
View File
@@ -30,7 +30,7 @@ file_path: "functions/infra/audit_uses_functions.go"
## Ejemplo
```go
results, err := AuditUsesFunctions("/home/lucas/fn_registry")
results, err := AuditUsesFunctions("$HOME/fn_registry")
if err != nil {
log.Fatal(err)
}
+1 -1
View File
@@ -36,7 +36,7 @@ file_path: "functions/infra/find_unused_functions.go"
## Ejemplo
```go
unused, err := FindUnusedFunctions("/home/lucas/fn_registry")
unused, err := FindUnusedFunctions("$HOME/fn_registry")
if err != nil {
log.Fatal(err)
}
@@ -28,9 +28,9 @@ imports:
example: |
import "fn-registry/functions/infra"
drafts, err := infra.GenerateProposalsFromTelemetry("/home/lucas/fn_registry")
drafts, err := infra.GenerateProposalsFromTelemetry("$HOME/fn_registry")
if err != nil { ... }
inserted, total, err := infra.PersistProposalDrafts("/home/lucas/fn_registry", drafts)
inserted, total, err := infra.PersistProposalDrafts("$HOME/fn_registry", drafts)
fmt.Printf("%d/%d proposals nuevas\n", inserted, total)
file_path: "functions/infra/generate_proposals_from_telemetry.go"
tested: false
+1 -1
View File
@@ -40,7 +40,7 @@ output: "Slice de LocationDrift con todos los discrepancias encontradas. Vacio s
## Ejemplo
```go
drifts, err := PcLocationsDrift("/home/lucas/fn_registry", "")
drifts, err := PcLocationsDrift("$HOME/fn_registry", "")
if err != nil {
log.Fatal(err)
}

Some files were not shown because too many files have changed in this diff Show More