35ace544d9
Anade siete issues que definen el camino para hacer graph_explorer distribuible como binario Windows autocontenido (sin WSL): - 0032 — browser_session enrichers via Playwright (login interactivo, cookies persistentes, fetch_webpage_browser, web_search_browser). - 0033 — dispatcher multi-lenguaje (lang: go|python|bash en manifest) + runtime Python embebido en <app>/runtime/. 3 fases (A=dispatcher, B=runtime, C=UI badges). - 0033b — vendoring de funciones Python por enricher (_vendored/ + .vendor.lock) para que los enrichers no dependan de registry_root en runtime. - 0033c — fn check vendored: drift detection con --fix. - 0033d — fn index lee python_runtime / python_runtime_deps de app.md. - 0033e — /compile orquesta freeze + vendor + go builds. - 0034 — port de los 5 enrichers de sistema a Go. Reusa funciones Go del registry directamente (no copias). Tests pytest existentes pasan sin cambios. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
64 lines
1.6 KiB
Markdown
64 lines
1.6 KiB
Markdown
---
|
|
id: 0033d
|
|
title: Indexer lee `python_runtime` y `python_runtime_deps` de app.md
|
|
status: pending
|
|
priority: low
|
|
created: 2026-05-02
|
|
depends_on: []
|
|
blocks: [0033]
|
|
---
|
|
|
|
## Objetivo
|
|
|
|
Que `fn index` recoja dos campos nuevos del frontmatter `app.md` y
|
|
los almacene en `apps` (registry.db). Permite consultas
|
|
"que apps necesitan runtime Python" y enable hooks de build
|
|
condicionales en `/compile`.
|
|
|
|
## Cambios
|
|
|
|
### Schema (`registry/migrations` o `registry/schema.go`)
|
|
|
|
```sql
|
|
ALTER TABLE apps ADD COLUMN python_runtime INTEGER NOT NULL DEFAULT 0;
|
|
ALTER TABLE apps ADD COLUMN python_runtime_deps TEXT NOT NULL DEFAULT '[]';
|
|
```
|
|
|
|
### Parser de `app.md`
|
|
|
|
Extender el parser de frontmatter de apps en `registry/parser.go`
|
|
para leer:
|
|
|
|
```yaml
|
|
python_runtime: true # bool, default false
|
|
python_runtime_deps: # array, default []
|
|
- requests
|
|
- certifi
|
|
```
|
|
|
|
### Frontmatter del template
|
|
|
|
Anadir los campos al template `docs/templates/app.md`:
|
|
|
|
```yaml
|
|
python_runtime: false
|
|
python_runtime_deps: []
|
|
```
|
|
|
|
Comentar que solo aplica a apps que ejecutan enrichers Python.
|
|
|
|
## Tests
|
|
|
|
- Parser test: `app.md` con los dos campos → struct correcto.
|
|
- Indexer test: tras `fn index`, query `SELECT python_runtime,
|
|
python_runtime_deps FROM apps WHERE id='graph_explorer'` devuelve
|
|
los valores esperados.
|
|
|
|
## Definicion de hecho
|
|
|
|
- `fn index` no rompe en apps sin los campos (default 0/`[]`).
|
|
- `graph_explorer/app.md` actualizado con `python_runtime: true` y
|
|
deps reales (`requests` minimo).
|
|
- Query `SELECT id FROM apps WHERE python_runtime = 1` lista las
|
|
apps que necesitan runtime embebido.
|