From 875cd66d34228a38edd14414196830e275873bd9 Mon Sep 17 00:00:00 2001 From: orion Date: Thu, 26 Feb 2026 06:14:06 +0000 Subject: [PATCH] feat(installer): restart gateway and validate custom no-reply model visibility after install --- docs/INTEGRATION.md | 1 + scripts/install-whispergate-openclaw.mjs | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/docs/INTEGRATION.md b/docs/INTEGRATION.md index a79c405..9e3d239 100644 --- a/docs/INTEGRATION.md +++ b/docs/INTEGRATION.md @@ -66,6 +66,7 @@ The script: - writes via `openclaw config set ... --json` - creates config backup first - restores backup automatically if any install step fails +- restarts gateway during install, then validates `whisper-gateway/no-reply` is visible via `openclaw models list/status` - writes a change record for every install/uninstall: - directory: `~/.openclaw/whispergate-install-records/` - latest pointer: `~/.openclaw/whispergate-install-record-latest.json` diff --git a/scripts/install-whispergate-openclaw.mjs b/scripts/install-whispergate-openclaw.mjs index 111ad8f..6e479b7 100755 --- a/scripts/install-whispergate-openclaw.mjs +++ b/scripts/install-whispergate-openclaw.mjs @@ -45,6 +45,19 @@ function runOpenclaw(args, { allowFail = false } = {}) { } } +function validateNoReplyModelAvailable() { + const modelRef = `${NO_REPLY_PROVIDER_ID}/${NO_REPLY_MODEL_ID}`; + const list = runOpenclaw(["models", "list"], { allowFail: true }) || ""; + if (!list.includes(modelRef)) { + throw new Error(`post-install validation failed: model not listed: ${modelRef}`); + } + + const status = runOpenclaw(["models", "status", "--json"], { allowFail: true }) || ""; + if (!status.includes(NO_REPLY_PROVIDER_ID)) { + throw new Error(`post-install validation failed: provider not visible in models status: ${NO_REPLY_PROVIDER_ID}`); + } +} + function getJson(pathKey) { const out = runOpenclaw(["config", "get", pathKey, "--json"], { allowFail: true }); if (out == null || out === "") return { exists: false }; @@ -158,6 +171,9 @@ if (mode === "install") { ], }); + runOpenclaw(["gateway", "restart"]); + validateNoReplyModelAvailable(); + const after = { [PATH_PLUGINS_LOAD]: getJson(PATH_PLUGINS_LOAD), [PATH_PLUGIN_ENTRY]: getJson(PATH_PLUGIN_ENTRY),