From 91f98414d11c142a5cfb5efeb4154cc154720e10 Mon Sep 17 00:00:00 2001 From: znetsixe Date: Tue, 19 May 2026 16:05:40 +0200 Subject: [PATCH] fix(commands): point set.mode description at the schema enum Old description said "auto / manual" but the schema declares four modes (auto, virtualControl, fysicalControl, maintenance). New description enumerates the allowed values and refers readers to the schema as the source of truth. wiki-gen regenerated Reference-Contracts.md to match. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/commands/index.js | 2 +- wiki/Reference-Contracts.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/index.js b/src/commands/index.js index c94a6ec..d6f244a 100644 --- a/src/commands/index.js +++ b/src/commands/index.js @@ -12,7 +12,7 @@ module.exports = [ topic: 'set.mode', aliases: ['setMode'], payloadSchema: { type: 'string' }, - description: 'Switch the valve group between auto / manual control modes.', + description: 'Switch the operating mode. Allowed: `auto`, `virtualControl`, `fysicalControl`, `maintenance` (schema-validated in `valveGroupControl.json` → `mode.current`).', handler: handlers.setMode, }, { diff --git a/wiki/Reference-Contracts.md b/wiki/Reference-Contracts.md index 36311c1..fc0a8bc 100644 --- a/wiki/Reference-Contracts.md +++ b/wiki/Reference-Contracts.md @@ -19,7 +19,7 @@ The registry lives in `src/commands/index.js`. Each descriptor maps a canonical | Canonical topic | Aliases | Payload | Unit | Effect | |---|---|---|---|---| -| `set.mode` | `setMode` | `string` | — | Switch the valve group between auto / manual control modes. | +| `set.mode` | `setMode` | `string` | — | Switch the operating mode. Allowed: `auto`, `virtualControl`, `fysicalControl`, `maintenance` (schema-validated in `valveGroupControl.json` → `mode.current`). | | `set.position` | `setpoint` | any | — | Set the group-level valve position (currently a no-op pending Phase 7). | | `child.register` | `registerChild` | `string` | — | Register a child valve with this group. | | `cmd.execSequence` | `execSequence` | `object` | — | Run a group-wide sequence (startup / shutdown / emergencystop). |