docs: params/output semántico en 506 funciones para composabilidad
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.
This commit is contained in:
@@ -14,6 +14,12 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [fmt, strconv, strings]
|
||||
params:
|
||||
- name: c
|
||||
desc: "conexión CDP activa"
|
||||
- name: selector
|
||||
desc: "selector CSS del elemento a hacer click"
|
||||
output: "error si el selector no coincide o falla la acción"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
@@ -14,6 +14,12 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [fmt, os]
|
||||
params:
|
||||
- name: c
|
||||
desc: "conexión CDP (puede ser nil)"
|
||||
- name: pid
|
||||
desc: "PID del proceso Chrome (0 para no matar)"
|
||||
output: "error si falla la desconexión o el cierre del proceso"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
@@ -14,6 +14,10 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [fmt, net, net/url, strings]
|
||||
params:
|
||||
- name: port
|
||||
desc: "puerto del servidor CDP (localhost:{port})"
|
||||
output: "(*CDPConn, error): conexión WebSocket lista para usar"
|
||||
tested: true
|
||||
tests: ["TestChromeLaunchAndConnect"]
|
||||
test_file_path: "functions/browser/chrome_launch_test.go"
|
||||
|
||||
@@ -14,6 +14,12 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [fmt]
|
||||
params:
|
||||
- name: c
|
||||
desc: "conexión CDP activa"
|
||||
- name: expression
|
||||
desc: "expresión JavaScript a evaluar"
|
||||
output: "string: resultado serializado, o error si falla"
|
||||
tested: true
|
||||
tests: ["TestCdpEvaluate"]
|
||||
test_file_path: "functions/browser/chrome_launch_test.go"
|
||||
|
||||
@@ -14,6 +14,10 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [fmt]
|
||||
params:
|
||||
- name: c
|
||||
desc: "conexión CDP activa"
|
||||
output: "string: HTML completo de la página (post-JavaScript)"
|
||||
tested: true
|
||||
tests: ["TestCdpGetHTML"]
|
||||
test_file_path: "functions/browser/chrome_launch_test.go"
|
||||
|
||||
@@ -14,6 +14,12 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [fmt]
|
||||
params:
|
||||
- name: c
|
||||
desc: "conexión CDP activa"
|
||||
- name: targetURL
|
||||
desc: "URL a navegar"
|
||||
output: "error si la navegación falla"
|
||||
tested: true
|
||||
tests: ["TestChromeLaunchAndConnect"]
|
||||
test_file_path: "functions/browser/chrome_launch_test.go"
|
||||
|
||||
@@ -14,6 +14,14 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [encoding/base64, fmt, os, path/filepath]
|
||||
params:
|
||||
- name: c
|
||||
desc: "conexión CDP activa"
|
||||
- name: outputPath
|
||||
desc: "ruta del archivo PNG/JPEG de salida"
|
||||
- name: opts
|
||||
desc: "opciones de captura (FullPage, Quality, Format)"
|
||||
output: "error si falla la captura o la escritura del archivo"
|
||||
tested: true
|
||||
tests: ["TestCdpScreenshot"]
|
||||
test_file_path: "functions/browser/chrome_launch_test.go"
|
||||
|
||||
@@ -14,6 +14,12 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [fmt, time]
|
||||
params:
|
||||
- name: c
|
||||
desc: "conexión CDP activa"
|
||||
- name: text
|
||||
desc: "texto a escribir en el elemento enfocado"
|
||||
output: "error si falla la escritura"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
@@ -14,6 +14,14 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [fmt, time]
|
||||
params:
|
||||
- name: c
|
||||
desc: "conexión CDP activa"
|
||||
- name: selector
|
||||
desc: "selector CSS del elemento a esperar"
|
||||
- name: timeout
|
||||
desc: "duración máxima de espera"
|
||||
output: "error si el elemento no aparece antes del timeout"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
@@ -14,6 +14,12 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [fmt, time]
|
||||
params:
|
||||
- name: c
|
||||
desc: "conexión CDP activa"
|
||||
- name: timeout
|
||||
desc: "duración máxima de espera por carga completa"
|
||||
output: "error si document.readyState no llega a complete"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
@@ -14,6 +14,10 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [fmt, net, os, os/exec, time]
|
||||
params:
|
||||
- name: opts
|
||||
desc: "opciones de lanzamiento: Port, UserDataDir, Headless"
|
||||
output: "int: PID del proceso Chrome lanzado"
|
||||
tested: true
|
||||
tests: ["TestFindChrome", "TestChromeLaunchAndConnect"]
|
||||
test_file_path: "functions/browser/chrome_launch_test.go"
|
||||
|
||||
Reference in New Issue
Block a user