verbose live UI + tool-level SSE events + Groq default + regression tests

This commit is contained in:
2026-06-03 05:04:29 -03:00
parent 131f4d9b86
commit e124a8a7d9
69 changed files with 3030 additions and 137 deletions

23
api/datasets/README.md Normal file
View File

@@ -0,0 +1,23 @@
# Datasets
One subdirectory per dataset. The folder name is the dataset's identity —
used as:
- the `NVI_DATASET` env var value that selects it,
- the Postgres schema where its tables live,
- the SQLite filename in `ctrl/seed/data/<name>.sqlite` that the loader
reads from.
## Adding a new dataset
1. Place the source SQLite at `ctrl/seed/data/<name>.sqlite` (or adapt
`ctrl/seed/download.sh` to fetch it).
2. Create `api/datasets/<name>/`:
- `schema_docs.yaml` — table and column descriptions.
- `metrics.yaml` — canonical SQL for business terms.
3. Set `NVI_DATASET=<name>` and restart the api.
4. `make seed` will load `<name>.sqlite` into Postgres schema `<name>`.
The Plan/Analyses/Tools/Runtime code references no dataset name; only the
loader (`api.tools.schema.load_schema`) and the engine (`api.tools.db`)
consult the active-dataset setting.