fix(boundary): restore bluebubbles and matrix type seams

This commit is contained in:
Peter Steinberger
2026-04-07 14:16:54 +01:00
parent f3d105b5e8
commit 1409d5a160
2 changed files with 17 additions and 8 deletions

View File

@@ -6,10 +6,6 @@ import {
resolveServicePrefixedAllowTarget,
resolveServicePrefixedTarget,
} from "openclaw/plugin-sdk/channel-targets";
import {
normalizeLowercaseStringOrEmpty,
normalizeOptionalString,
} from "openclaw/plugin-sdk/text-runtime";
export type BlueBubblesService = "imessage" | "sms" | "auto";
@@ -32,6 +28,18 @@ const SERVICE_PREFIXES: Array<{ prefix: string; service: BlueBubblesService }> =
const CHAT_IDENTIFIER_UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
const CHAT_IDENTIFIER_HEX_RE = /^[0-9a-f]{24,64}$/i;
function normalizeOptionalString(value: unknown): string | undefined {
if (typeof value !== "string") {
return undefined;
}
const trimmed = value.trim();
return trimmed ? trimmed : undefined;
}
function normalizeLowercaseStringOrEmpty(value: unknown): string {
return normalizeOptionalString(value)?.toLowerCase() ?? "";
}
function parseRawChatGuid(value: string): string | null {
const trimmed = normalizeOptionalString(value);
if (!trimmed) {

View File

@@ -1,5 +1,6 @@
import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
import type { PinnedDispatcherPolicy, SsrFPolicy } from "openclaw/plugin-sdk/infra-runtime";
import { formatMatrixErrorMessage } from "./matrix/errors.js";
import type { MatrixProbe } from "./matrix/probe.js";
import type { CoreConfig } from "./types.js";
@@ -10,8 +11,8 @@ type ResolveMatrixAuth = (params: { cfg: CoreConfig; accountId?: string }) => Pr
userId: string;
deviceId?: string;
allowPrivateNetwork?: boolean;
ssrfPolicy?: unknown;
dispatcherPolicy?: unknown;
ssrfPolicy?: SsrFPolicy;
dispatcherPolicy?: PinnedDispatcherPolicy;
}>;
type ProbeMatrix = (params: {
@@ -22,8 +23,8 @@ type ProbeMatrix = (params: {
timeoutMs?: number;
accountId?: string;
allowPrivateNetwork?: boolean;
ssrfPolicy?: unknown;
dispatcherPolicy?: unknown;
ssrfPolicy?: SsrFPolicy;
dispatcherPolicy?: PinnedDispatcherPolicy;
}) => Promise<MatrixProbe>;
type SendMessageMatrix = (