# Changelog del SDK

Las últimas versiones de los dos paquetes, con lo que trae cada una. Cada paquete lleva su changelog (`CHANGELOG.md`) desde capture 0.36.0 y capture-server 0.14.0; las versiones anteriores salen de una copia del changelog anterior que guarda DevLab. Las notas se citan como las escribió el paquete, así que algunas pueden estar en inglés o en español. Esta página se genera con `npm run docs:gen`; no se edita a mano.

## `@neurologyca/capture`

### 0.45.0 · 2026-11-16

A proxy on another origin. Sin cambios incompatibles.

- Added: Option `credentials` (`'omit'`, `'same-origin'` or `'include'`) on `createProtocolClient` and `createRecordingClient`: the `credentials` mode of the client's requests to the Engine or your proxy, including the Engine's event stream and the streamed interpretation (not the startup report, which always carries cookies).
- Added: `urlTokenProvider(tokenUrl, { credentials })`: the same option for the token request.
- Fixed: At the close of a capture, a `POST /analyze` asked again after a `202 ANALYSIS_IN_PROGRESS` now gets as its own timeout what is left of the in-progress wait (`analyzeTimeoutMs` counted from the first `202`), never less than 10 000 ms.
- Fixed: The `interpretation.sse-timeout` and `analysis.regenerated` warnings that follow a `202 ANALYSIS_IN_PROGRESS` now count the in-progress wait in the time they say the Engine's announcement did not arrive within.

### 0.44.0 · 2026-11-16

An analysis in progress is said, not lost. Sin cambios incompatibles.

- Added: `client.analyze()` (on `createProtocolClient` and `createRecordingClient`) resolves to the new `AnalyzeAnswer` type, which adds `inProgress` and `retryAfterMs` to `interpretation`, `fromCache` and `raw`.
- Added: Warning `analysis.in-progress`: at the close of a capture, `POST /analyze` answered `202 ANALYSIS_IN_PROGRESS`.
- Added: Error `E_ANALYSIS_IN_PROGRESS` (`recoverable: true`): at the close of a capture, the Engine was still generating the interpretation when the wait ran out.
- Changed: At the close of a capture, a `202 ANALYSIS_IN_PROGRESS` from `POST /analyze` is waited out: the capture waits what the Engine asks (30 000 ms when it does not say, never less than 1 000 ms), still listening for the Engine's end-of-interpretation event on the stream with `interpretation: 'engine'`, and asks again, within `analyzeTimeoutMs` counted from the first `202`.

### 0.43.0 · 2026-11-13

Models kept between captures. **Breaking**

- Added: `keepPrepared` option of `createProtocolClient` (off by default; live only).
- Added: With `keepPrepared`, a `prepare()` that asks only for what is already kept (the same parts or fewer) resolves without loading anything: its result is a new one (a new `report.startupId`, its own `cache`, `totalMs` and device diagnosis), its stages arrive already closed, one per part, and its `StartupReport` carries `kept: true` (`schema: 2`).
- Added: With `keepPrepared`, the `prepared` block of the `StartupReport` of a capture or a baseline that was lent models kept from an earlier baseline or capture carries `prepared.origin` (`{ face, speech }`, each `'prepare'`, `'previous-session'` or `null`; type `PreparedOrigin`), whether it used them or not, and the report is `schema: 2`.
- Added: With `keepPrepared`, a kept part that kodec leaves unusable while it waits for the next capture (its engine died, its engine kept failing, it did not settle in time, it stopped producing frames, it lost its GPU context, or it failed to load again) raises a `prepare.released` warning with the new reason `'unusable'` and its `part`, and only that part is released; with nothing left alive, everything kept is released with one such warning: its `part` is the first dead part (the face before the speech) and its message names every dead part with its reason.
- Added: `prepare.face-lost` warning (with `part: 'face'` and `fields: null`): the prepared face models rejected their first frames, or lost their GPU context (the message says which), and kodec loads them again, once.
- Added: `face.context-lost` warning (with `part: 'face'` and `fields: null`): the face analysis a capture or a baseline loaded itself (not a prepared one) lost its GPU context (a driver reset, resuming from sleep, a GPU process crash) and kodec loads it again, once; there are no frames while it reloads.
- Added: kodec reloads the face on the main thread, so its `capture-stalled` with `cause: 'main-thread-blocked'` for a gap that falls within that reload is the reload itself: it is not a `codec.error` and is not counted in `SessionReport.codecErrors`, in a capture or a baseline.
- Added: A bound on that reload once the capture has its first frame: if the face analysis is not back within `startup.timeouts.vision.totalMs` (120 000 ms when that cap is `null`), the capture fails exactly as when kodec cannot reload the face: a `codec.error` warning with `capture-failed`, counted in `codecErrors`, and kodec stopped.
- Added: `PreparedBlock.faceReloaded`: `true` when kodec had to load the prepared face again, otherwise absent; the face still reads `'adopted'`, and the report is `schema: 2`.
- Added: Startup message key `first-frame.face-reload-failed` (es/en text in `STARTUP_MESSAGES`): the face analysis stopped working as the capture started and could not be set up again (after `prepare.face-lost` or `face.context-lost`).
- Changed: kodec `5.0.0-rc.14`
- Fixed: Without a transcription worker (a Content-Security-Policy that blocks workers, or a browser where the worker does not start), stopping a capture or releasing the models now frees the speech model's GPU memory, after any inference in progress finishes; before, it was never freed, and GPU memory grew with every capture (kodec `5.0.0-rc.14`).
- Fixed: `SessionReport.transcription.workerBlockedByCsp` now reads `true` when the page's Content-Security-Policy blocks the transcription worker in browsers that report the block only after the worker is created; before, it read `false` there (kodec `5.0.0-rc.12`).
- Fixed: When a capture stops and stopping its frame pump throws, the camera and the analysis engine are still stopped; before, they could keep running.
- Fixed: A webcam whose video track ends later in the startup now fails the startup at once with the error of a webcam that stops before the models load (`CaptureStartError`, `stage: 'source'`, `reason: 'error'`, «the camera stopped sending video while the capture was starting: check that no other app is using it and try again»), with no `E_CAPTURE_LOST`, no `invalidated` status and no first-frame timeout.
- Breaking (types): `StartupReport.schema` is now `1 | 2`.
- Breaking (types): `PreparedBlock.prepareId` is now `string | null`, and `PreparedBlock` gains the optional `origin`.
- Breaking (types): `ProtocolWarningEvent.reason` gains `'unusable'` (on `prepare.released`).
- Breaking (types): `SessionReport.transcriptionLoad.reason` gains `'needs-worker'` (with `stage: 'stt-session'`): transcription was allowed only by `allowWasmWorker` and its Worker did not start, so it was not enabled.
- Breaking (types): `StartupMessageKey` gains `'first-frame.face-reload-failed'`, and `STARTUP_MESSAGE_KEYS` lists twenty keys: a `Record<StartupMessageKey, string>` of your own needs its text.

### 0.42.1 · 2026-11-12

Startup messages that fit the source. **Breaking**

- Changed: The five `face-model.*` startup messages (`face-model.running`, `face-model.cached`, `face-model.stalled`, `face-model.timeout`, `face-model.error`) now speak of getting face analysis ready instead of the camera, in `es` and `en`: the face model loads the same with a webcam, a `stream`, a `<video>` or no source at all (a preparation).
- Added: `first-frame.timeout-media`: the message of a first-frame timeout when the capture or baseline source is your own `stream` or `<video>` («No face can be seen in the video…», in `es` and `en`), and in the replay of a recording.
- Changed (messages for developers): The `message` of a first-frame `CaptureStartError` says «of starting the source» instead of «of starting the camera».
- Breaking (types): `StartupMessageKey` gains `'first-frame.timeout-media'`: an exhaustive `Record<StartupMessageKey, string>` (for instance a full set of your own texts) must add it.

## `@neurologyca/capture-server`

### 0.20.1 · 2026-11-16

Retry-After readable from another origin. Sin cambios incompatibles.

- Fixed: `createEngineProxy` exposes `Retry-After` to the browser

### 0.20.0 · 2026-11-16

An analysis in progress, and a kit for Measurement. Sin cambios incompatibles.

- Added: `AnalyzeResult.inProgress` and `AnalyzeResult.retryAfterMs`
- Added: `ProtocolSummary.interpreted`
- Added: `TenantKit.kind`
- Changed: `buildTenantKit` gives a kit for Measurement.

### 0.19.0 · 2026-11-13

The startup report receiver validates schema 2. Sin cambios incompatibles.

- Changed: The startup report receiver now validates schema 2 reports.

### 0.18.0 · 2026-11-12

Startup report receiver. Sin cambios incompatibles.

- Added: `createStartupReportReceiver`
- Added: `localDiskStartupReports({ dir, maxFileBytes })`

### 0.14.3 · 2026-10-29

The protocol group's target HCI keeps the Engine's field name. **Breaking**

- Breaking: `ProtocolSummary.group.targetHciId` is now `group.targetConstellationHciId`

## DevLab

- 2026-11-16: La documentación, el kit y los starters describen `@neurologyca/capture` 0.45.0 y `@neurologyca/capture-server` 0.20.1.
- 2026-10-12: La documentación describe `@neurologyca/capture` 0.27.0 y `@neurologyca/capture-server` 0.9.0: el SDK primero, sus dos modos de procesado y la API HTTP como complemento.

## Compatibilidad y soporte

Los dos paquetes siguen semver en la línea 0.x: un cambio incompatible menor puede llegar en una versión de parche, y entonces va marcado **Breaking**. Desde 0.4.0, cada versión habla solo con Engine 2. La 1.0 se reserva para producción. Ver [Fases de lanzamiento](/docs/es/resources/release-phases/).
