惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
I
InfoQ
Engineering at Meta
Engineering at Meta
Jina AI
Jina AI
Recent Announcements
Recent Announcements
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
D
Docker
Microsoft Security Blog
Microsoft Security Blog
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
博客园 - Franky
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 叶小钗
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog RSS Feed
WordPress大学
WordPress大学
MyScale Blog
MyScale Blog
月光博客
月光博客
罗磊的独立博客

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
refactor(plugins): drop unused web-channel facade wrapper...
vincentkoc · 2026-06-19 · via Recent Commits to openclaw:main
11

// Runtime web-channel plugin helpers expose web-channel tools through activated plugin runtimes.

2-

import type { AgentToolResult } from "../../agents/runtime/index.js";

3-

import type { ChannelAgentTool } from "../../channels/plugins/types.core.js";

42

import type { OpenClawConfig } from "../../config/types.openclaw.js";

53

import {

64

getDefaultLocalRoots as getDefaultLocalRootsImpl,

75

loadWebMedia as loadWebMediaImpl,

86

loadWebMediaRaw as loadWebMediaRawImpl,

97

optimizeImageToJpeg as optimizeImageToJpegImpl,

108

} from "../../media/web-media.js";

11-

import type { PollInput } from "../../polls.js";

129

import {

1310

createPluginModuleLoaderCache,

1411

type PluginModuleLoaderCache,

@@ -49,7 +46,6 @@ type WebChannelLightRuntimeModule = {

4946

lid: string | null;

5047

};

5148

webAuthExists: (authDir?: string) => Promise<boolean>;

52-

createWhatsAppLoginTool: () => ChannelAgentTool;

5349

formatError: (error: unknown) => string;

5450

getStatusCode: (error: unknown) => number | undefined;

5551

pickWebChannel: (pref: string, authDir?: string) => Promise<string>;

@@ -81,31 +77,6 @@ type WebChannelHeavyRuntimeModule = {

8177

accountId?: string;

8278

},

8379

) => Promise<{ messageId: string; toJid: string }>;

84-

sendPollWhatsApp: (

85-

to: string,

86-

poll: PollInput,

87-

options: { verbose: boolean; accountId?: string; cfg?: OpenClawConfig },

88-

) => Promise<{ messageId: string; toJid: string }>;

89-

sendReactionWhatsApp: (

90-

chatJid: string,

91-

messageId: string,

92-

emoji: string,

93-

options: {

94-

verbose: boolean;

95-

fromMe?: boolean;

96-

participant?: string;

97-

accountId?: string;

98-

},

99-

) => Promise<void>;

100-

createWaSocket: (

101-

printQr: boolean,

102-

verbose: boolean,

103-

opts?: { authDir?: string; onQr?: (qr: string) => void },

104-

) => Promise<unknown>;

105-

handleWhatsAppAction: (

106-

params: Record<string, unknown>,

107-

cfg: OpenClawConfig,

108-

) => Promise<AgentToolResult<unknown>>;

10980

monitorWebChannel: (...args: unknown[]) => Promise<unknown>;

11081

monitorWebInbox: (...args: unknown[]) => Promise<unknown>;

11182

startWebLoginWithQr: (...args: unknown[]) => Promise<unknown>;

@@ -270,34 +241,6 @@ export function sendWebChannelMessage(

270241

return loadWebChannelHeavyModule().then((loaded) => loaded.sendMessageWhatsApp(...args));

271242

}

272243273-

/** Sends a web-channel poll through the heavy runtime API. */

274-

export function sendWebChannelPoll(

275-

...args: Parameters<WebChannelHeavyRuntimeModule["sendPollWhatsApp"]>

276-

): ReturnType<WebChannelHeavyRuntimeModule["sendPollWhatsApp"]> {

277-

return loadWebChannelHeavyModule().then((loaded) => loaded.sendPollWhatsApp(...args));

278-

}

279-280-

/** Sends a web-channel reaction through the heavy runtime API. */

281-

export function sendWebChannelReaction(

282-

...args: Parameters<WebChannelHeavyRuntimeModule["sendReactionWhatsApp"]>

283-

): ReturnType<WebChannelHeavyRuntimeModule["sendReactionWhatsApp"]> {

284-

return loadWebChannelHeavyModule().then((loaded) => loaded.sendReactionWhatsApp(...args));

285-

}

286-287-

/** Creates the web-channel login tool from the light runtime API. */

288-

export function createRuntimeWebChannelLoginTool(

289-

...args: Parameters<WebChannelLightRuntimeModule["createWhatsAppLoginTool"]>

290-

): ReturnType<WebChannelLightRuntimeModule["createWhatsAppLoginTool"]> {

291-

return getLightExport("createWhatsAppLoginTool")(...args);

292-

}

293-294-

/** Creates a web-channel socket through the heavy runtime API. */

295-

export function createWebChannelSocket(

296-

...args: Parameters<WebChannelHeavyRuntimeModule["createWaSocket"]>

297-

): ReturnType<WebChannelHeavyRuntimeModule["createWaSocket"]> {

298-

return loadWebChannelHeavyModule().then((loaded) => loaded.createWaSocket(...args));

299-

}

300-301244

/** Formats a web-channel runtime error through the light runtime API. */

302245

export function formatError(

303246

...args: Parameters<WebChannelLightRuntimeModule["formatError"]>

@@ -336,13 +279,6 @@ export function resolveWebChannelAuthDir(): ReturnType<

336279

throw new Error("web channel plugin runtime is missing export 'resolveDefaultWebAuthDir'");

337280

}

338281339-

/** Handles a web-channel action through the heavy runtime API. */

340-

export async function handleWebChannelAction(

341-

...args: Parameters<WebChannelHeavyRuntimeModule["handleWhatsAppAction"]>

342-

): ReturnType<WebChannelHeavyRuntimeModule["handleWhatsAppAction"]> {

343-

return (await getHeavyExport("handleWhatsAppAction"))(...args);

344-

}

345-346282

/** Loads web media through the core media helper. */

347283

export async function loadWebMedia(

348284

...args: Parameters<typeof loadWebMediaImpl>