mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-15 03:01:02 +00:00
fix(extensions): bypass stale helper runtime exports
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user