fix(extensions): bypass stale helper runtime exports

This commit is contained in:
Peter Steinberger
2026-04-07 13:16:07 +01:00
parent 4c97582d4b
commit 6fdea7c755
2 changed files with 20 additions and 5 deletions

View File

@@ -4,7 +4,6 @@ import type {
} from "openclaw/plugin-sdk/channel-contract";
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
import {
hasLegacyAccountStreamingAliases,
normalizeLegacyDmAliases,
normalizeLegacyStreamingAliases,
} from "openclaw/plugin-sdk/runtime-doctor";
@@ -35,6 +34,17 @@ function hasLegacyDiscordStreamingAliases(value: unknown): boolean {
return typeof streaming === "string" || typeof streaming === "boolean";
}
function hasLegacyAccountStreamingAliases(
value: unknown,
match: (entry: unknown) => boolean,
): boolean {
const accounts = asObjectRecord(value);
if (!accounts) {
return false;
}
return Object.values(accounts).some((account) => match(account));
}
const LEGACY_TTS_PROVIDER_KEYS = ["openai", "elevenlabs", "microsoft", "edge"] as const;
function hasLegacyTtsProviderKeys(value: unknown): boolean {

View File

@@ -2,10 +2,15 @@ import {
buildChannelOutboundSessionRoute,
type ChannelOutboundSessionRouteParams,
} from "openclaw/plugin-sdk/core";
import {
normalizeLowercaseStringOrEmpty,
normalizeOptionalLowercaseString,
} from "openclaw/plugin-sdk/text-runtime";
function normalizeLowercaseStringOrEmpty(value: unknown): string {
return typeof value === "string" ? value.trim().toLowerCase() : "";
}
function normalizeOptionalLowercaseString(value: unknown): string | undefined {
const normalized = normalizeLowercaseStringOrEmpty(value);
return normalized || undefined;
}
export function stripZalouserTargetPrefix(raw: string): string {
return raw