From d9aa88dd6cd640eccf965126bb588e6106bab4d2 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Fri, 3 Apr 2026 20:46:31 +0900 Subject: [PATCH] test(bluebubbles): split channel status seam --- extensions/bluebubbles/src/channel.ts | 12 ++++++------ extensions/bluebubbles/src/status-issues.test.ts | 2 +- src/plugin-sdk/channel-status.ts | 2 ++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/extensions/bluebubbles/src/channel.ts b/extensions/bluebubbles/src/channel.ts index fe66637ec11..7e3331fe21f 100644 --- a/extensions/bluebubbles/src/channel.ts +++ b/extensions/bluebubbles/src/channel.ts @@ -1,3 +1,4 @@ +import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id"; import { createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers"; import { createAccountStatusSink } from "openclaw/plugin-sdk/channel-lifecycle"; import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing"; @@ -6,6 +7,11 @@ import { projectAccountWarningCollector, } from "openclaw/plugin-sdk/channel-policy"; import { createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result"; +import { + buildProbeChannelStatusSummary, + collectBlueBubblesStatusIssues, + PAIRING_APPROVED_MESSAGE, +} from "openclaw/plugin-sdk/channel-status"; import { createChatChannelPlugin } from "openclaw/plugin-sdk/core"; import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime"; import { @@ -39,12 +45,6 @@ import { resolveBlueBubblesGroupToolPolicy, } from "./group-policy.js"; import type { ChannelAccountSnapshot, ChannelPlugin } from "./runtime-api.js"; -import { - buildProbeChannelStatusSummary, - collectBlueBubblesStatusIssues, - DEFAULT_ACCOUNT_ID, - PAIRING_APPROVED_MESSAGE, -} from "./runtime-api.js"; import { resolveBlueBubblesOutboundSessionRoute } from "./session-route.js"; import { blueBubblesSetupAdapter } from "./setup-core.js"; import { blueBubblesSetupWizard } from "./setup-surface.js"; diff --git a/extensions/bluebubbles/src/status-issues.test.ts b/extensions/bluebubbles/src/status-issues.test.ts index 5becb5568d7..8ece6dff77f 100644 --- a/extensions/bluebubbles/src/status-issues.test.ts +++ b/extensions/bluebubbles/src/status-issues.test.ts @@ -1,5 +1,5 @@ +import { collectBlueBubblesStatusIssues } from "openclaw/plugin-sdk/channel-status"; import { describe, expect, it } from "vitest"; -import { collectBlueBubblesStatusIssues } from "./runtime-api.js"; describe("collectBlueBubblesStatusIssues", () => { it("reports unconfigured enabled accounts", () => { diff --git a/src/plugin-sdk/channel-status.ts b/src/plugin-sdk/channel-status.ts index a816f715d53..59ac40768ff 100644 --- a/src/plugin-sdk/channel-status.ts +++ b/src/plugin-sdk/channel-status.ts @@ -1,10 +1,12 @@ export { PAIRING_APPROVED_MESSAGE } from "../channels/plugins/pairing-message.js"; +export { collectBlueBubblesStatusIssues } from "../channels/plugins/status-issues/bluebubbles.js"; export { projectCredentialSnapshotFields, resolveConfiguredFromCredentialStatuses, resolveConfiguredFromRequiredCredentialStatuses, } from "../channels/account-snapshot-fields.js"; export { + buildProbeChannelStatusSummary, buildComputedAccountStatusSnapshot, buildTokenChannelStatusSummary, } from "./status-helpers.js";