From 6b8ae5cfc326d1cba6fa2d423ee9bacbd036f33e Mon Sep 17 00:00:00 2001 From: znetsixe Date: Tue, 19 May 2026 10:11:49 +0200 Subject: [PATCH] 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) --- wiki/Reference-Contracts.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/wiki/Reference-Contracts.md b/wiki/Reference-Contracts.md index 62bca57..0554731 100644 --- a/wiki/Reference-Contracts.md +++ b/wiki/Reference-Contracts.md @@ -15,16 +15,16 @@ The registry lives in `src/commands/index.js`. Each descriptor maps a canonical `msg.topic` to its handler; aliases emit a one-time deprecation warning the first time they fire. - + | Canonical topic | Aliases | Payload | Unit | Effect | -|:---|:---|:---|:---|:---| -| `data.clock` | `clock` | `{timestamp: number}` (ms since epoch). If absent, handler falls back to `Date.now()`. | ms | Calls `source.updateState(timestamp)` — advances the ASM kinetics integrator by `n_iter = floor(speedUpFactor × Δt / timeStep_days)` steps that fit between `currentTime` and the supplied timestamp. Emits `stateChange` on completion. | -| `data.fluent` | `Fluent` | `{inlet: number, F: number, C: number[13]}` | F in m³/d (canonical); C in mg/L (S_HCO in mmol/L) | Writes the per-inlet flow rate into `engine.Fs[inlet]` and concentration vector into `engine.Cs_in[inlet]`. Registry-level unit normalisation is skipped; the handler stores values as supplied. | -| `data.otr` | `OTR` | numeric (`msg.payload` is the OTR scalar) | mg O₂ / L / d | Sets the externally-supplied oxygen transfer rate. Used by the kinetics engine **only when `kla` is `NaN`**; if `kla` is a finite number the internal mass-transfer formula `kla × (sat(T) − S_O)` is used and `data.otr` is ignored. | -| `data.temperature` | `Temperature` | numeric or `{value: number}` | °C | Sets `engine.temperature`. Non-numeric / non-finite payloads log a warn (`Invalid temperature input: `) and are dropped. | -| `data.dispersion` | `Dispersion` | numeric | m²/d | **PFR only.** Sets axial dispersion coefficient `D`. The next `updateState` warns if local Peclet ≥ 2 or Courant ≥ 0.5. On CSTR the setter is a no-op (`if (this.engine instanceof Reactor_PFR)` guard in `specificClass`). | -| `child.register` | `registerChild` | child node id (string) | — | Looks up the sibling via `RED.nodes.getNode(id)` and delegates to `source.childRegistrationUtils.registerChild` with `msg.positionVsParent`. Missing child / source logs a warn and short-circuits. | +|---|---|---|---|---| +| `data.clock` | `clock` | any | — | Push the simulation clock tick (timestamp / dt) to the ASM solver. | +| `data.fluent` | `Fluent` | `object` | — | Push the influent stream (payload: {F: flow m3/h, C: [concentrations mg/L]}). | +| `data.otr` | `OTR` | any | — | Push the current oxygen-transfer rate into the reactor. | +| `data.temperature` | `Temperature` | any | — | Push the current reactor temperature. | +| `data.dispersion` | `Dispersion` | any | — | Push a dispersion/mixing parameter update. | +| `child.register` | `registerChild` | any | — | Register a child node (settler / measurement) with this reactor. |