5f4f1f7508
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.
38 lines
890 B
Markdown
38 lines
890 B
Markdown
---
|
|
name: pass_get
|
|
kind: function
|
|
lang: bash
|
|
domain: infra
|
|
version: "1.0.0"
|
|
purity: impure
|
|
signature: "pass_get(entry: string) -> string"
|
|
description: "Lee un secreto del password store (pass) y lo imprime a stdout."
|
|
tags: [pass, secret, credential, get]
|
|
uses_functions: []
|
|
uses_types: []
|
|
returns: []
|
|
returns_optional: false
|
|
error_type: "error_go_core"
|
|
imports: []
|
|
params:
|
|
- name: entry
|
|
desc: "ruta de entrada en el password store"
|
|
output: "valor del secreto en texto plano"
|
|
tested: true
|
|
tests: ["lee entrada existente", "falla con entrada inexistente"]
|
|
test_file_path: "bash/functions/infra/pass_test.sh"
|
|
file_path: "bash/functions/infra/pass_get.sh"
|
|
---
|
|
|
|
## Ejemplo
|
|
|
|
```bash
|
|
source pass_get.sh
|
|
token=$(pass_get agentes/dataforge-token)
|
|
export GITEA_TOKEN="$token"
|
|
```
|
|
|
|
## Notas
|
|
|
|
Usa `pass show` internamente. Requiere GPG key desbloqueada. No imprime newline final (usa printf %s).
|