From a28ba3cb156786ae334f5b4987fc14e7a1dcdd01 Mon Sep 17 00:00:00 2001 From: dangoldbj Date: Fri, 24 Jul 2026 02:00:21 +0200 Subject: [PATCH] use plugin-local setup input type --- src/channel/setup.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/channel/setup.ts b/src/channel/setup.ts index 41203de..9d61171 100644 --- a/src/channel/setup.ts +++ b/src/channel/setup.ts @@ -7,6 +7,12 @@ import { } from "openclaw/plugin-sdk/setup"; import { SIMPLEX_CHANNEL_ID } from "../constants.js"; +type SimplexSetupInput = ChannelSetupInput & { + cliPath?: string; + httpUrl?: string; + url?: string; +}; + function resolveSetupAccountId(params: { cfg: OpenClawConfig; accountId?: string; @@ -46,11 +52,12 @@ export const simplexSetupAdapter: ChannelSetupAdapter = { }); }, validateInput: ({ input }) => { - const cliPath = input.cliPath?.trim(); + const setupInput = input as SimplexSetupInput; + const cliPath = setupInput.cliPath?.trim(); if (cliPath) { return "SimpleX CLI path is not configured in OpenClaw. Start simplex-chat separately with its WebSocket API enabled."; } - const runtimeUrl = input.url?.trim() || input.httpUrl?.trim(); + const runtimeUrl = setupInput.url?.trim() || setupInput.httpUrl?.trim(); if (runtimeUrl && !runtimeUrl.startsWith("ws://") && !runtimeUrl.startsWith("wss://")) { return "SimpleX runtime URL must be a ws:// or wss:// WebSocket URL."; }