From ff38bc7649ec7cfb1eb7a4cc8d7a49aa8b1cdfc6 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Wed, 4 Mar 2026 01:20:02 -0500 Subject: [PATCH] Extensions: migrate bluebubbles plugin-sdk imports --- extensions/bluebubbles/src/account-resolve.ts | 2 +- extensions/bluebubbles/src/accounts.ts | 2 +- extensions/bluebubbles/src/actions.test.ts | 2 +- extensions/bluebubbles/src/actions.ts | 2 +- extensions/bluebubbles/src/attachments.test.ts | 2 +- extensions/bluebubbles/src/attachments.ts | 2 +- extensions/bluebubbles/src/channel.ts | 8 ++++++-- extensions/bluebubbles/src/chat.ts | 2 +- extensions/bluebubbles/src/config-schema.ts | 2 +- extensions/bluebubbles/src/history.ts | 2 +- extensions/bluebubbles/src/media-send.test.ts | 2 +- extensions/bluebubbles/src/media-send.ts | 2 +- extensions/bluebubbles/src/monitor-debounce.ts | 2 +- extensions/bluebubbles/src/monitor-processing.ts | 4 ++-- extensions/bluebubbles/src/monitor-shared.ts | 2 +- extensions/bluebubbles/src/monitor.test.ts | 2 +- extensions/bluebubbles/src/monitor.ts | 2 +- extensions/bluebubbles/src/monitor.webhook-auth.test.ts | 2 +- extensions/bluebubbles/src/monitor.webhook-route.test.ts | 2 +- .../bluebubbles/src/onboarding.secret-input.test.ts | 2 +- extensions/bluebubbles/src/onboarding.ts | 4 ++-- extensions/bluebubbles/src/probe.ts | 2 +- extensions/bluebubbles/src/reactions.ts | 2 +- extensions/bluebubbles/src/runtime.ts | 2 +- extensions/bluebubbles/src/secret-input.ts | 2 +- extensions/bluebubbles/src/send.test.ts | 2 +- extensions/bluebubbles/src/send.ts | 4 ++-- extensions/bluebubbles/src/targets.ts | 2 +- extensions/bluebubbles/src/types.ts | 4 ++-- 29 files changed, 38 insertions(+), 34 deletions(-) diff --git a/extensions/bluebubbles/src/account-resolve.ts b/extensions/bluebubbles/src/account-resolve.ts index ebdf7a7bc46..b69c613e548 100644 --- a/extensions/bluebubbles/src/account-resolve.ts +++ b/extensions/bluebubbles/src/account-resolve.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; import { resolveBlueBubblesAccount } from "./accounts.js"; import { normalizeResolvedSecretInputString } from "./secret-input.js"; diff --git a/extensions/bluebubbles/src/accounts.ts b/extensions/bluebubbles/src/accounts.ts index 142e2d8fef9..bbde1cf4656 100644 --- a/extensions/bluebubbles/src/accounts.ts +++ b/extensions/bluebubbles/src/accounts.ts @@ -1,9 +1,9 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk"; import { DEFAULT_ACCOUNT_ID, normalizeAccountId, normalizeOptionalAccountId, } from "openclaw/plugin-sdk/account-id"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; import { hasConfiguredSecretInput, normalizeSecretInputString } from "./secret-input.js"; import { normalizeBlueBubblesServerUrl, type BlueBubblesAccountConfig } from "./types.js"; diff --git a/extensions/bluebubbles/src/actions.test.ts b/extensions/bluebubbles/src/actions.test.ts index 5db42331207..e958035bd4b 100644 --- a/extensions/bluebubbles/src/actions.test.ts +++ b/extensions/bluebubbles/src/actions.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; import { describe, expect, it, vi, beforeEach } from "vitest"; import { bluebubblesMessageActions } from "./actions.js"; import { getCachedBlueBubblesPrivateApiStatus } from "./probe.js"; diff --git a/extensions/bluebubbles/src/actions.ts b/extensions/bluebubbles/src/actions.ts index e85400748a9..daf9dd0c872 100644 --- a/extensions/bluebubbles/src/actions.ts +++ b/extensions/bluebubbles/src/actions.ts @@ -10,7 +10,7 @@ import { readStringParam, type ChannelMessageActionAdapter, type ChannelMessageActionName, -} from "openclaw/plugin-sdk"; +} from "openclaw/plugin-sdk/compat"; import { resolveBlueBubblesAccount } from "./accounts.js"; import { sendBlueBubblesAttachment } from "./attachments.js"; import { diff --git a/extensions/bluebubbles/src/attachments.test.ts b/extensions/bluebubbles/src/attachments.test.ts index da431c7325f..169f79f6b43 100644 --- a/extensions/bluebubbles/src/attachments.test.ts +++ b/extensions/bluebubbles/src/attachments.test.ts @@ -1,4 +1,4 @@ -import type { PluginRuntime } from "openclaw/plugin-sdk"; +import type { PluginRuntime } from "openclaw/plugin-sdk/compat"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import "./test-mocks.js"; import { downloadBlueBubblesAttachment, sendBlueBubblesAttachment } from "./attachments.js"; diff --git a/extensions/bluebubbles/src/attachments.ts b/extensions/bluebubbles/src/attachments.ts index ca7ce69a89c..582c5f92abd 100644 --- a/extensions/bluebubbles/src/attachments.ts +++ b/extensions/bluebubbles/src/attachments.ts @@ -1,6 +1,6 @@ import crypto from "node:crypto"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; import { resolveBlueBubblesServerAccount } from "./account-resolve.js"; import { postMultipartFormData } from "./multipart.js"; import { diff --git a/extensions/bluebubbles/src/channel.ts b/extensions/bluebubbles/src/channel.ts index fbaa5ce39fc..7fc3b97de19 100644 --- a/extensions/bluebubbles/src/channel.ts +++ b/extensions/bluebubbles/src/channel.ts @@ -1,4 +1,8 @@ -import type { ChannelAccountSnapshot, ChannelPlugin, OpenClawConfig } from "openclaw/plugin-sdk"; +import type { + ChannelAccountSnapshot, + ChannelPlugin, + OpenClawConfig, +} from "openclaw/plugin-sdk/compat"; import { applyAccountNameToChannelSection, buildChannelConfigSchema, @@ -13,7 +17,7 @@ import { resolveBlueBubblesGroupRequireMention, resolveBlueBubblesGroupToolPolicy, setAccountEnabledInConfigSection, -} from "openclaw/plugin-sdk"; +} from "openclaw/plugin-sdk/compat"; import { listBlueBubblesAccountIds, type ResolvedBlueBubblesAccount, diff --git a/extensions/bluebubbles/src/chat.ts b/extensions/bluebubbles/src/chat.ts index f5f83b1b6ae..17a782c9312 100644 --- a/extensions/bluebubbles/src/chat.ts +++ b/extensions/bluebubbles/src/chat.ts @@ -1,6 +1,6 @@ import crypto from "node:crypto"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; import { resolveBlueBubblesServerAccount } from "./account-resolve.js"; import { postMultipartFormData } from "./multipart.js"; import { getCachedBlueBubblesPrivateApiStatus } from "./probe.js"; diff --git a/extensions/bluebubbles/src/config-schema.ts b/extensions/bluebubbles/src/config-schema.ts index f4b6991441c..54f9b175ce5 100644 --- a/extensions/bluebubbles/src/config-schema.ts +++ b/extensions/bluebubbles/src/config-schema.ts @@ -1,4 +1,4 @@ -import { MarkdownConfigSchema, ToolPolicySchema } from "openclaw/plugin-sdk"; +import { MarkdownConfigSchema, ToolPolicySchema } from "openclaw/plugin-sdk/compat"; import { z } from "zod"; import { buildSecretInputSchema, hasConfiguredSecretInput } from "./secret-input.js"; diff --git a/extensions/bluebubbles/src/history.ts b/extensions/bluebubbles/src/history.ts index 672e2c48c80..82c6de6b635 100644 --- a/extensions/bluebubbles/src/history.ts +++ b/extensions/bluebubbles/src/history.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; import { resolveBlueBubblesServerAccount } from "./account-resolve.js"; import { blueBubblesFetchWithTimeout, buildBlueBubblesApiUrl } from "./types.js"; diff --git a/extensions/bluebubbles/src/media-send.test.ts b/extensions/bluebubbles/src/media-send.test.ts index 901c90f2d4f..2129fd2c252 100644 --- a/extensions/bluebubbles/src/media-send.test.ts +++ b/extensions/bluebubbles/src/media-send.test.ts @@ -2,7 +2,7 @@ import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; import { pathToFileURL } from "node:url"; -import type { OpenClawConfig, PluginRuntime } from "openclaw/plugin-sdk"; +import type { OpenClawConfig, PluginRuntime } from "openclaw/plugin-sdk/compat"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { sendBlueBubblesMedia } from "./media-send.js"; import { setBlueBubblesRuntime } from "./runtime.js"; diff --git a/extensions/bluebubbles/src/media-send.ts b/extensions/bluebubbles/src/media-send.ts index 797b2b92fae..4b52aa6aa72 100644 --- a/extensions/bluebubbles/src/media-send.ts +++ b/extensions/bluebubbles/src/media-send.ts @@ -3,7 +3,7 @@ import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import { resolveChannelMediaMaxBytes, type OpenClawConfig } from "openclaw/plugin-sdk"; +import { resolveChannelMediaMaxBytes, type OpenClawConfig } from "openclaw/plugin-sdk/compat"; import { resolveBlueBubblesAccount } from "./accounts.js"; import { sendBlueBubblesAttachment } from "./attachments.js"; import { resolveBlueBubblesMessageId } from "./monitor.js"; diff --git a/extensions/bluebubbles/src/monitor-debounce.ts b/extensions/bluebubbles/src/monitor-debounce.ts index 952c591e847..2c4daa55028 100644 --- a/extensions/bluebubbles/src/monitor-debounce.ts +++ b/extensions/bluebubbles/src/monitor-debounce.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; import type { NormalizedWebhookMessage } from "./monitor-normalize.js"; import type { BlueBubblesCoreRuntime, WebhookTarget } from "./monitor-shared.js"; diff --git a/extensions/bluebubbles/src/monitor-processing.ts b/extensions/bluebubbles/src/monitor-processing.ts index de26a7d0c54..62a8564ae0c 100644 --- a/extensions/bluebubbles/src/monitor-processing.ts +++ b/extensions/bluebubbles/src/monitor-processing.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; import { DM_GROUP_ACCESS_REASON, createScopedPairingAccess, @@ -14,7 +14,7 @@ import { resolveControlCommandGate, stripMarkdown, type HistoryEntry, -} from "openclaw/plugin-sdk"; +} from "openclaw/plugin-sdk/compat"; import { downloadBlueBubblesAttachment } from "./attachments.js"; import { markBlueBubblesChatRead, sendBlueBubblesTyping } from "./chat.js"; import { fetchBlueBubblesHistory } from "./history.js"; diff --git a/extensions/bluebubbles/src/monitor-shared.ts b/extensions/bluebubbles/src/monitor-shared.ts index c768385e03a..00477a020c5 100644 --- a/extensions/bluebubbles/src/monitor-shared.ts +++ b/extensions/bluebubbles/src/monitor-shared.ts @@ -1,4 +1,4 @@ -import { normalizeWebhookPath, type OpenClawConfig } from "openclaw/plugin-sdk"; +import { normalizeWebhookPath, type OpenClawConfig } from "openclaw/plugin-sdk/compat"; import type { ResolvedBlueBubblesAccount } from "./accounts.js"; import { getBlueBubblesRuntime } from "./runtime.js"; import type { BlueBubblesAccountConfig } from "./types.js"; diff --git a/extensions/bluebubbles/src/monitor.test.ts b/extensions/bluebubbles/src/monitor.test.ts index c914050616d..9dc41fa26b9 100644 --- a/extensions/bluebubbles/src/monitor.test.ts +++ b/extensions/bluebubbles/src/monitor.test.ts @@ -1,6 +1,6 @@ import { EventEmitter } from "node:events"; import type { IncomingMessage, ServerResponse } from "node:http"; -import type { OpenClawConfig, PluginRuntime } from "openclaw/plugin-sdk"; +import type { OpenClawConfig, PluginRuntime } from "openclaw/plugin-sdk/compat"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { createPluginRuntimeMock } from "../../test-utils/plugin-runtime-mock.js"; import type { ResolvedBlueBubblesAccount } from "./accounts.js"; diff --git a/extensions/bluebubbles/src/monitor.ts b/extensions/bluebubbles/src/monitor.ts index a0e06bce6d8..97c47dc0118 100644 --- a/extensions/bluebubbles/src/monitor.ts +++ b/extensions/bluebubbles/src/monitor.ts @@ -7,7 +7,7 @@ import { readWebhookBodyOrReject, resolveWebhookTargetWithAuthOrRejectSync, resolveWebhookTargets, -} from "openclaw/plugin-sdk"; +} from "openclaw/plugin-sdk/compat"; import { createBlueBubblesDebounceRegistry } from "./monitor-debounce.js"; import { normalizeWebhookMessage, normalizeWebhookReaction } from "./monitor-normalize.js"; import { logVerbose, processMessage, processReaction } from "./monitor-processing.js"; diff --git a/extensions/bluebubbles/src/monitor.webhook-auth.test.ts b/extensions/bluebubbles/src/monitor.webhook-auth.test.ts index 72e765fcd57..271b9521987 100644 --- a/extensions/bluebubbles/src/monitor.webhook-auth.test.ts +++ b/extensions/bluebubbles/src/monitor.webhook-auth.test.ts @@ -1,6 +1,6 @@ import { EventEmitter } from "node:events"; import type { IncomingMessage, ServerResponse } from "node:http"; -import type { OpenClawConfig, PluginRuntime } from "openclaw/plugin-sdk"; +import type { OpenClawConfig, PluginRuntime } from "openclaw/plugin-sdk/compat"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { createPluginRuntimeMock } from "../../test-utils/plugin-runtime-mock.js"; import type { ResolvedBlueBubblesAccount } from "./accounts.js"; diff --git a/extensions/bluebubbles/src/monitor.webhook-route.test.ts b/extensions/bluebubbles/src/monitor.webhook-route.test.ts index 8499ea56b3d..322e8a76377 100644 --- a/extensions/bluebubbles/src/monitor.webhook-route.test.ts +++ b/extensions/bluebubbles/src/monitor.webhook-route.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; import { afterEach, describe, expect, it } from "vitest"; import { createEmptyPluginRegistry } from "../../../src/plugins/registry.js"; import { setActivePluginRegistry } from "../../../src/plugins/runtime.js"; diff --git a/extensions/bluebubbles/src/onboarding.secret-input.test.ts b/extensions/bluebubbles/src/onboarding.secret-input.test.ts index 7452ae3c2d4..a7ca9e1d3eb 100644 --- a/extensions/bluebubbles/src/onboarding.secret-input.test.ts +++ b/extensions/bluebubbles/src/onboarding.secret-input.test.ts @@ -1,4 +1,4 @@ -import type { WizardPrompter } from "openclaw/plugin-sdk"; +import type { WizardPrompter } from "openclaw/plugin-sdk/compat"; import { describe, expect, it, vi } from "vitest"; vi.mock("openclaw/plugin-sdk", () => ({ diff --git a/extensions/bluebubbles/src/onboarding.ts b/extensions/bluebubbles/src/onboarding.ts index 5eb0d6e4066..1e716c73b75 100644 --- a/extensions/bluebubbles/src/onboarding.ts +++ b/extensions/bluebubbles/src/onboarding.ts @@ -4,7 +4,7 @@ import type { OpenClawConfig, DmPolicy, WizardPrompter, -} from "openclaw/plugin-sdk"; +} from "openclaw/plugin-sdk/compat"; import { DEFAULT_ACCOUNT_ID, addWildcardAllowFrom, @@ -12,7 +12,7 @@ import { mergeAllowFromEntries, normalizeAccountId, promptAccountId, -} from "openclaw/plugin-sdk"; +} from "openclaw/plugin-sdk/compat"; import { listBlueBubblesAccountIds, resolveBlueBubblesAccount, diff --git a/extensions/bluebubbles/src/probe.ts b/extensions/bluebubbles/src/probe.ts index eeeba033ee2..b0af1252d06 100644 --- a/extensions/bluebubbles/src/probe.ts +++ b/extensions/bluebubbles/src/probe.ts @@ -1,4 +1,4 @@ -import type { BaseProbeResult } from "openclaw/plugin-sdk"; +import type { BaseProbeResult } from "openclaw/plugin-sdk/compat"; import { normalizeSecretInputString } from "./secret-input.js"; import { buildBlueBubblesApiUrl, blueBubblesFetchWithTimeout } from "./types.js"; diff --git a/extensions/bluebubbles/src/reactions.ts b/extensions/bluebubbles/src/reactions.ts index 69d5b2055cc..411fcc759ec 100644 --- a/extensions/bluebubbles/src/reactions.ts +++ b/extensions/bluebubbles/src/reactions.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; import { resolveBlueBubblesServerAccount } from "./account-resolve.js"; import { getCachedBlueBubblesPrivateApiStatus } from "./probe.js"; import { blueBubblesFetchWithTimeout, buildBlueBubblesApiUrl } from "./types.js"; diff --git a/extensions/bluebubbles/src/runtime.ts b/extensions/bluebubbles/src/runtime.ts index c9468234d3e..6f82c5916e3 100644 --- a/extensions/bluebubbles/src/runtime.ts +++ b/extensions/bluebubbles/src/runtime.ts @@ -1,4 +1,4 @@ -import type { PluginRuntime } from "openclaw/plugin-sdk"; +import type { PluginRuntime } from "openclaw/plugin-sdk/compat"; let runtime: PluginRuntime | null = null; type LegacyRuntimeLogShape = { log?: (message: string) => void }; diff --git a/extensions/bluebubbles/src/secret-input.ts b/extensions/bluebubbles/src/secret-input.ts index f90d41c6fb9..3fc82b3ac91 100644 --- a/extensions/bluebubbles/src/secret-input.ts +++ b/extensions/bluebubbles/src/secret-input.ts @@ -2,7 +2,7 @@ import { hasConfiguredSecretInput, normalizeResolvedSecretInputString, normalizeSecretInputString, -} from "openclaw/plugin-sdk"; +} from "openclaw/plugin-sdk/compat"; import { z } from "zod"; export { hasConfiguredSecretInput, normalizeResolvedSecretInputString, normalizeSecretInputString }; diff --git a/extensions/bluebubbles/src/send.test.ts b/extensions/bluebubbles/src/send.test.ts index 3de22b4d714..0895da0e4bb 100644 --- a/extensions/bluebubbles/src/send.test.ts +++ b/extensions/bluebubbles/src/send.test.ts @@ -1,4 +1,4 @@ -import type { PluginRuntime } from "openclaw/plugin-sdk"; +import type { PluginRuntime } from "openclaw/plugin-sdk/compat"; import { beforeEach, describe, expect, it, vi } from "vitest"; import "./test-mocks.js"; import { getCachedBlueBubblesPrivateApiStatus } from "./probe.js"; diff --git a/extensions/bluebubbles/src/send.ts b/extensions/bluebubbles/src/send.ts index ccd932f3e47..307e5e4d839 100644 --- a/extensions/bluebubbles/src/send.ts +++ b/extensions/bluebubbles/src/send.ts @@ -1,6 +1,6 @@ import crypto from "node:crypto"; -import type { OpenClawConfig } from "openclaw/plugin-sdk"; -import { stripMarkdown } from "openclaw/plugin-sdk"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/compat"; +import { stripMarkdown } from "openclaw/plugin-sdk/compat"; import { resolveBlueBubblesAccount } from "./accounts.js"; import { getCachedBlueBubblesPrivateApiStatus, diff --git a/extensions/bluebubbles/src/targets.ts b/extensions/bluebubbles/src/targets.ts index 11d8faf1f76..da62f1f8445 100644 --- a/extensions/bluebubbles/src/targets.ts +++ b/extensions/bluebubbles/src/targets.ts @@ -5,7 +5,7 @@ import { type ParsedChatTarget, resolveServicePrefixedAllowTarget, resolveServicePrefixedTarget, -} from "openclaw/plugin-sdk"; +} from "openclaw/plugin-sdk/compat"; export type BlueBubblesService = "imessage" | "sms" | "auto"; diff --git a/extensions/bluebubbles/src/types.ts b/extensions/bluebubbles/src/types.ts index d3dc46bd692..a310f02f86a 100644 --- a/extensions/bluebubbles/src/types.ts +++ b/extensions/bluebubbles/src/types.ts @@ -1,6 +1,6 @@ -import type { DmPolicy, GroupPolicy } from "openclaw/plugin-sdk"; +import type { DmPolicy, GroupPolicy } from "openclaw/plugin-sdk/compat"; -export type { DmPolicy, GroupPolicy } from "openclaw/plugin-sdk"; +export type { DmPolicy, GroupPolicy } from "openclaw/plugin-sdk/compat"; export type BlueBubblesGroupConfig = { /** If true, only respond in this group when mentioned. */