From f4fa53de3f03b5184af0511502ea7fffa1eaf13a Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 4 Apr 2026 04:51:16 +0100 Subject: [PATCH] fix(ci): repair zalouser sdk path and exec timeout kill --- extensions/zalouser/src/channel-api.ts | 2 +- src/process/exec.ts | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/extensions/zalouser/src/channel-api.ts b/extensions/zalouser/src/channel-api.ts index da37d0e8544..fa2e03fd85d 100644 --- a/extensions/zalouser/src/channel-api.ts +++ b/extensions/zalouser/src/channel-api.ts @@ -5,7 +5,7 @@ export type { ChannelGroupContext, ChannelMessageActionAdapter, } from "openclaw/plugin-sdk/channel-contract"; -export { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-plugin-common"; +export { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema"; export type { ChannelPlugin } from "openclaw/plugin-sdk/core"; export { DEFAULT_ACCOUNT_ID, diff --git a/src/process/exec.ts b/src/process/exec.ts index fcbc4c24293..f2d7f116145 100644 --- a/src/process/exec.ts +++ b/src/process/exec.ts @@ -303,6 +303,14 @@ export async function runCommandWithTimeout( closeFallbackTimer = null; }; + const killChild = () => { + if (settled || typeof child?.kill !== "function") { + return; + } + killIssuedByTimeout = true; + child.kill("SIGKILL"); + }; + const armNoOutputTimer = () => { if (!shouldTrackOutputTimeout || settled) { return; @@ -313,19 +321,13 @@ export async function runCommandWithTimeout( return; } noOutputTimedOut = true; - if (typeof child.kill === "function") { - killIssuedByTimeout = true; - child.kill("SIGKILL"); - } + killChild(); }, Math.floor(noOutputTimeoutMs)); }; const timer = setTimeout(() => { timedOut = true; - if (typeof child.kill === "function") { - killIssuedByTimeout = true; - child.kill("SIGKILL"); - } + killChild(); }, timeoutMs); armNoOutputTimer();