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.
40 lines
1.0 KiB
Markdown
40 lines
1.0 KiB
Markdown
---
|
|
name: extract_urls
|
|
kind: function
|
|
lang: py
|
|
domain: cybersecurity
|
|
version: "1.0.0"
|
|
purity: pure
|
|
signature: "def extract_urls(text: str) -> list"
|
|
description: "Extrae todas las URLs (http/https) de un texto. Util para analisis de IoCs y threat intelligence."
|
|
tags: [url, extract, parsing, ioc, python]
|
|
uses_functions: []
|
|
uses_types: []
|
|
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: ""
|
|
file_path: "python/functions/cybersecurity/cybersecurity.py"
|
|
---
|
|
|
|
## Ejemplo
|
|
|
|
```python
|
|
extract_urls("Visit https://example.com and http://test.org/path?q=1")
|
|
# ["https://example.com", "http://test.org/path?q=1"]
|
|
|
|
extract_urls("no urls here")
|
|
# []
|
|
```
|
|
|
|
## Notas
|
|
|
|
Usa regex para extraer URLs con esquema http/https. No valida que las URLs sean alcanzables. Util para extraer indicadores de compromiso (IoCs) de logs, emails o reportes de threat intelligence.
|