988e901066
Añade campos params y output al frontmatter YAML de las 506 funciones del registry. Cada parámetro tiene descripción semántica (qué representa, unidades, rango típico) y cada función describe qué produce su output. Permite a agentes razonar sobre cadenas de composición (ej: prices → log_return → sharpe_ratio) sin leer código.
2.3 KiB
2.3 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| audit_registry_paths | pipeline | bash | pipelines | 1.0.0 | impure | audit_registry_paths([output_file: string]) -> void | Audita file_path de todas las functions y types en registry.db, verifica que cada ruta apunte a un archivo existente en disco, y genera un txt con las rutas rotas para que agentes puedan corregirlas. |
|
|
false | error_go_core |
|
sin salida directa; genera archivo con rutas inválidas | false | bash/functions/pipelines/audit_registry_paths.sh |
Ejemplo
# Con default (genera broken_paths.txt en la raiz)
./bash/functions/pipelines/audit_registry_paths.sh
# Con ruta personalizada
./bash/functions/pipelines/audit_registry_paths.sh /tmp/broken.txt
# Desde fn run (pipeline launcher)
fn run audit_registry_paths
Flujo
assert_command_exists— verifica quesqlite3esta disponibleassert_file_exists— verifica queregistry.dbexiste y reporta su tamanovalidate_registry_paths(functions) — itera todas las functions, verifica cada file_pathvalidate_registry_paths(types) — itera todos los types, verifica cada file_path- Genera
broken_paths.txtcon formato legible para agentes report_execution_json— imprime JSON de ejecucion a stdoutexit_with_status— exit code segun resultado
Formato de salida
# Broken file_path entries in registry.db
# Generated: 2026-04-03T10:00:00Z
# Total: 11 broken paths
#
# Format: id | file_path (in .md) | domain | table
# ---
## Functions (11)
cdp_click_go_browser | functions/infra/cdp_click.go | browser | functions
Notas
El archivo de salida es consumible por agentes: cada linea tiene el ID de la funcion/tipo y el file_path que necesita correccion. El agente puede leer el .md correspondiente, encontrar el archivo real en disco, y actualizar el campo file_path.