docs(wiki): regenerate topic-contract AUTOGEN block via wiki-gen

Replaces the agent-written placeholder inside Reference-Contracts.md with
the authoritative table generated from src/commands/index.js. Both the
BEGIN and END markers are normalized to the canonical form used by
`@evolv/wiki-gen`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
znetsixe
2026-05-19 10:11:48 +02:00
parent 1a16f9c4f1
commit b0e8bbb95d

View File

@@ -13,14 +13,14 @@
The registry lives in `src/commands/index.js`. Each descriptor maps a canonical `msg.topic` to a handler; aliases emit a one-time deprecation warning the first time they fire.
<!-- BEGIN AUTOGEN: topic-contract — populate via wiki-gen tool (TODO) -->
<!-- BEGIN AUTOGEN: topic-contract -->
| Canonical topic | Aliases | Payload | Unit | Effect |
|:---|:---|:---|:---|:---|
| `set.simulator` | `simulator` | (ignored) | &mdash; | Toggles `source.toggleSimulation()` &mdash; flips `config.simulation.enabled`. |
| `set.outlier-detection` | `outlierDetection` | (ignored) | &mdash; | Toggles `source.toggleOutlierDetection()` &mdash; flips `config.outlierDetection.enabled` and propagates the new value to `analogChannel.outlierDetection.enabled`. |
| `cmd.calibrate` | `calibrate` | (ignored) | &mdash; | Calls `source.calibrate()` &mdash; if the rolling window is stable, captures the current output as the new `config.scaling.offset`. Aborts with a warn when unstable or when the calibration baseline is missing. |
| `data.measurement` | `measurement` | mode-dependent (see below) | per channel (configured) | Push a raw sensor reading into the pipeline. Mode-dispatched in `handlers.dataMeasurement`: **analog** expects a number / numeric string &rarr; `source.inputValue = parsed`; **digital** expects an object keyed by channel name &rarr; `source.handleDigitalPayload(payload)`. Wrong shape for the configured mode logs a hint suggesting the other mode. |
|---|---|---|---|---|
| `set.simulator` | `simulator` | any | — | Toggle the built-in simulator on / off. |
| `set.outlier-detection` | `outlierDetection` | any | — | Toggle / configure outlier detection on the measurement pipeline. |
| `cmd.calibrate` | `calibrate` | any | — | Trigger a one-shot calibration of the measurement. |
| `data.measurement` | `measurement` | any | — | Push a raw measurement (analog: number; digital: per-channel object). |
<!-- END AUTOGEN: topic-contract -->