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
882 B
Markdown
38 lines
882 B
Markdown
---
|
|
name: run_shell_timeout
|
|
kind: function
|
|
lang: go
|
|
domain: shell
|
|
version: "1.0.0"
|
|
purity: impure
|
|
signature: "func RunShellTimeout(command string, timeout time.Duration) core.Result[CmdResult]"
|
|
description: "Ejecuta un comando shell con timeout configurable."
|
|
tags: [shell, command, process, exec, timeout]
|
|
uses_functions: []
|
|
uses_types: [cmd_result_go_shell, result_go_core]
|
|
returns: [result_go_core]
|
|
returns_optional: false
|
|
error_type: "error_go_core"
|
|
imports: [time]
|
|
params:
|
|
- name: command
|
|
desc: "comando shell a ejecutar"
|
|
- name: timeout
|
|
desc: "duración máxima de ejecución"
|
|
output: "Result[CmdResult] con stdout, stderr, exit code"
|
|
tested: false
|
|
tests: []
|
|
test_file_path: ""
|
|
file_path: "functions/shell/run_shell_timeout.go"
|
|
---
|
|
|
|
## Ejemplo
|
|
|
|
```go
|
|
result := RunShellTimeout("long-running-cmd", 30*time.Second)
|
|
```
|
|
|
|
## Notas
|
|
|
|
Implementacion en devfactory/shell.
|