Skip to content

Commit 491969e

Browse files
committed
refactor: route channel activity through channel runtime
1 parent 684a156 commit 491969e

11 files changed

Lines changed: 22 additions & 11 deletions

File tree

docs/.generated/plugin-sdk-api-baseline.json

Lines changed: 10 additions & 1 deletion
Large diffs are not rendered by default.

docs/.generated/plugin-sdk-api-baseline.jsonl

Lines changed: 2 additions & 1 deletion
Large diffs are not rendered by default.

extensions/line/src/bot-message-context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import {
55
resolveInboundSessionEnvelopeContext,
66
toLocationContext,
77
} from "openclaw/plugin-sdk/channel-inbound";
8+
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-runtime";
89
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
910
import {
1011
recordInboundSession,
1112
resolvePinnedMainDmOwnerFromAllowlist,
1213
} from "openclaw/plugin-sdk/conversation-runtime";
13-
import { recordChannelActivity } from "openclaw/plugin-sdk/infra-runtime";
1414
import type { HistoryEntry } from "openclaw/plugin-sdk/reply-history";
1515
import { finalizeInboundContext } from "openclaw/plugin-sdk/reply-runtime";
1616
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";

extensions/line/src/send.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ vi.mock("./channel-access-token.js", () => ({
5959
resolveLineChannelAccessToken: resolveLineChannelAccessTokenMock,
6060
}));
6161

62-
vi.mock("openclaw/plugin-sdk/infra-runtime", () => ({
62+
vi.mock("openclaw/plugin-sdk/channel-runtime", () => ({
6363
recordChannelActivity: recordChannelActivityMock,
6464
}));
6565

extensions/line/src/send.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { messagingApi } from "@line/bot-sdk";
2+
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-runtime";
23
import { loadConfig, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
3-
import { recordChannelActivity } from "openclaw/plugin-sdk/infra-runtime";
44
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
55
import { resolveLineAccount } from "./accounts.js";
66
import { resolveLineChannelAccessToken } from "./channel-access-token.js";

extensions/telegram/src/bot-message-context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import {
55
type StatusReactionController,
66
} from "openclaw/plugin-sdk/channel-feedback";
77
import { logInboundDrop } from "openclaw/plugin-sdk/channel-inbound";
8+
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-runtime";
89
import { loadConfig } from "openclaw/plugin-sdk/config-runtime";
910
import type { TelegramDirectConfig, TelegramGroupConfig } from "openclaw/plugin-sdk/config-runtime";
1011
import { ensureConfiguredBindingRouteReady } from "openclaw/plugin-sdk/conversation-runtime";
11-
import { recordChannelActivity } from "openclaw/plugin-sdk/infra-runtime";
1212
import { deriveLastRoutePolicy } from "openclaw/plugin-sdk/routing";
1313
import { DEFAULT_ACCOUNT_ID, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
1414
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";

extensions/telegram/src/send.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import type {
66
} from "@grammyjs/types";
77
import { type ApiClientOptions, Bot, HttpError } from "grammy";
88
import * as grammy from "grammy";
9+
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-runtime";
910
import { loadConfig } from "openclaw/plugin-sdk/config-runtime";
1011
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime";
11-
import { recordChannelActivity } from "openclaw/plugin-sdk/infra-runtime";
1212
import { isDiagnosticFlagEnabled } from "openclaw/plugin-sdk/infra-runtime";
1313
import { formatUncaughtError } from "openclaw/plugin-sdk/infra-runtime";
1414
import { createTelegramRetryRunner } from "openclaw/plugin-sdk/infra-runtime";

extensions/whatsapp/src/inbound/monitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { AnyMessageContent, proto, WAMessage } from "@whiskeysockets/baileys";
22
import { DisconnectReason, isJidGroup } from "@whiskeysockets/baileys";
33
import { createInboundDebouncer, formatLocationText } from "openclaw/plugin-sdk/channel-inbound";
4-
import { recordChannelActivity } from "openclaw/plugin-sdk/infra-runtime";
4+
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-runtime";
55
import { saveMediaBuffer } from "openclaw/plugin-sdk/media-runtime";
66
import { logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
77
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";

extensions/whatsapp/src/inbound/send-api.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
33
const recordChannelActivity = vi.hoisted(() => vi.fn());
44
let createWebSendApi: typeof import("./send-api.js").createWebSendApi;
55

6-
vi.mock("openclaw/plugin-sdk/infra-runtime", async (importOriginal) => {
7-
const actual = await importOriginal<typeof import("openclaw/plugin-sdk/infra-runtime")>();
6+
vi.mock("openclaw/plugin-sdk/channel-runtime", async (importOriginal) => {
7+
const actual = await importOriginal<typeof import("openclaw/plugin-sdk/channel-runtime")>();
88
return {
99
...actual,
1010
recordChannelActivity: (...args: unknown[]) => recordChannelActivity(...args),

extensions/whatsapp/src/inbound/send-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { AnyMessageContent, WAPresence } from "@whiskeysockets/baileys";
2-
import { recordChannelActivity } from "openclaw/plugin-sdk/infra-runtime";
2+
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-runtime";
33
import { toWhatsappJid } from "openclaw/plugin-sdk/text-runtime";
44
import type { ActiveWebSendOptions } from "../active-listener.js";
55

0 commit comments

Comments
 (0)