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,10 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: ""
|
||||
imports: [re]
|
||||
params:
|
||||
- name: input_str
|
||||
desc: "string a analizar en busca de patrones de SQL injection"
|
||||
output: "tupla (is_threat, pattern) indicando si se detectó amenaza y el nombre del patrón"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
@@ -14,6 +14,10 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: ""
|
||||
imports: [math, collections]
|
||||
params:
|
||||
- name: data
|
||||
desc: "bytes cuya entropia de Shannon se desea calcular"
|
||||
output: "valor float de entropia entre 0 y 8 bits por byte"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
@@ -14,6 +14,12 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [cryptography, struct]
|
||||
params:
|
||||
- name: ciphertext
|
||||
desc: "datos cifrados con envelope_encrypt o datos sin cifrar (passthrough si no comienzan con magic OVE1)"
|
||||
- name: master_key
|
||||
desc: "clave maestra KEK de 32 bytes para descifrar la file key"
|
||||
output: "bytes desencriptados, o bytes sin modificar si el magic no es OVE1"
|
||||
tested: true
|
||||
tests:
|
||||
- "decrypt de datos cifrados"
|
||||
|
||||
@@ -14,6 +14,12 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [cryptography, secrets, struct]
|
||||
params:
|
||||
- name: plaintext
|
||||
desc: "datos a cifrar con AES-256-GCM"
|
||||
- name: master_key
|
||||
desc: "clave maestra KEK de 32 bytes para cifrar la file key"
|
||||
output: "envelope binario con magic b'OVE1' conteniendo datos cifrados"
|
||||
tested: true
|
||||
tests:
|
||||
- "encrypt → decrypt roundtrip"
|
||||
|
||||
@@ -14,6 +14,10 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: ""
|
||||
imports: [re]
|
||||
params:
|
||||
- name: text
|
||||
desc: "string de texto del cual extraer URLs HTTP/HTTPS"
|
||||
output: "lista de strings con todas las URLs encontradas"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
@@ -14,6 +14,10 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: ""
|
||||
imports: [hashlib]
|
||||
params:
|
||||
- name: data
|
||||
desc: "bytes a ser hasheado"
|
||||
output: "string hexadecimal del hash MD5 (32 caracteres)"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
@@ -14,6 +14,10 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: ""
|
||||
imports: [hashlib]
|
||||
params:
|
||||
- name: data
|
||||
desc: "bytes a ser hasheado"
|
||||
output: "string hexadecimal del hash SHA-256 (64 caracteres)"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
@@ -14,6 +14,10 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: ""
|
||||
imports: [re, base64]
|
||||
params:
|
||||
- name: s
|
||||
desc: "string a validar como base64"
|
||||
output: "booleano indicando si el string es base64 valido (minimo 4 caracteres)"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
@@ -14,6 +14,10 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: ""
|
||||
imports: [re]
|
||||
params:
|
||||
- name: s
|
||||
desc: "string a validar como hexadecimal"
|
||||
output: "booleano indicando si el string es hexadecimal valido con o sin prefijo 0x (minimo 2 caracteres)"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
@@ -14,6 +14,12 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: ""
|
||||
imports: []
|
||||
params:
|
||||
- name: a
|
||||
desc: "primera lista para comparacion"
|
||||
- name: b
|
||||
desc: "segunda lista para comparacion"
|
||||
output: "coeficiente float de similitud de Jaccard entre 0.0 y 1.0"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
@@ -14,6 +14,12 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: ""
|
||||
imports: []
|
||||
params:
|
||||
- name: a
|
||||
desc: "primer string para comparacion de distancia de edicion"
|
||||
- name: b
|
||||
desc: "segundo string para comparacion de distancia de edicion"
|
||||
output: "entero con la distancia de Levenshtein (minimo numero de ediciones)"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
@@ -14,6 +14,10 @@ returns: []
|
||||
returns_optional: false
|
||||
error_type: ""
|
||||
imports: [urllib.parse]
|
||||
params:
|
||||
- name: raw_url
|
||||
desc: "URL en formato string a normalizar"
|
||||
output: "URL normalizada con host en minusculas, fragmentos eliminados y parametros ordenados"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
|
||||
Reference in New Issue
Block a user