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

推荐订阅源

D
Docker
I
InfoQ
L
LangChain Blog
阮一峰的网络日志
阮一峰的网络日志
Y
Y Combinator Blog
博客园_首页
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
C
Check Point Blog
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Engineering at Meta
Engineering at Meta
B
Blog
爱范儿
爱范儿
Stack Overflow Blog
Stack Overflow Blog
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
F
Fortinet All Blogs
月光博客
月光博客
GbyAI
GbyAI

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
fix(gateway): preserve webchat send guard · openclaw/open...
obviyus · 2026-06-25 · via Recent Commits to openclaw:main

File tree

  • src/gateway/server-methods

Original file line numberDiff line numberDiff line change

@@ -923,6 +923,37 @@ describe("gateway send mirroring", () => {

923923

expect(response?.[2]?.message).toContain("Use `chat.send`");

924924

});

925925
926+

it("accepts bundled channels before plugin registry normalization for message actions", async () => {

927+

const { respond } = await runMessageActionRequest({

928+

channel: "TELEGRAM",

929+

action: "send",

930+

params: { target: "123", message: "hi" },

931+

idempotencyKey: "idem-telegram-message-action",

932+

});

933+
934+

const call = lastDispatchChannelMessageActionCall();

935+

expect(call?.channel).toBe("telegram");

936+

expect(firstRespondCall(respond)[0]).toBe(true);

937+

});

938+
939+

it("rejects unknown send channels without delivering", async () => {

940+

mocks.getChannelPlugin.mockReturnValue(undefined);

941+
942+

const { respond } = await runSend({

943+

to: "x",

944+

message: "hi",

945+

channel: "definitely-not-a-real-channel-xyz",

946+

idempotencyKey: "idem-unknown-channel",

947+

});

948+
949+

expect(mocks.deliverOutboundPayloads).not.toHaveBeenCalled();

950+

const response = firstRespondCall(respond);

951+

expect(response?.[0]).toBe(false);

952+

expect(response?.[2]?.message).toContain(

953+

"unsupported channel: definitely-not-a-real-channel-xyz",

954+

);

955+

});

956+
926957

it("auto-picks the single configured channel for send", async () => {

927958

mockDeliverySuccess("m-single-send");

928959
Original file line numberDiff line numberDiff line change

@@ -15,7 +15,6 @@ import {

1515

} from "../../../packages/gateway-protocol/src/index.js";

1616

import { resolveSessionAgentId } from "../../agents/agent-scope.js";

1717

import { sendDurableMessageBatch } from "../../channels/message/runtime.js";

18-

import { normalizeMessageChannel } from "../../utils/message-channel.js";

1918

import { dispatchChannelMessageAction } from "../../channels/plugins/message-action-dispatch.js";

2019

import { createOutboundSendDeps } from "../../cli/deps.js";

2120

import {

@@ -49,6 +48,7 @@ import {

4948

normalizeSessionKeyPreservingOpaquePeerIds,

5049

parseThreadSessionSuffix,

5150

} from "../../sessions/session-key-utils.js";

51+

import { INTERNAL_MESSAGE_CHANNEL, normalizeMessageChannel } from "../../utils/message-channel.js";

5252

import { ADMIN_SCOPE } from "../operator-scopes.js";

5353

import { resolveGatewayPluginConfig } from "../runtime-plugin-config.js";

5454

import { formatForLog } from "../ws-log.js";

@@ -178,16 +178,15 @@ async function resolveRequestedChannel(params: {

178178

> {

179179

const channelInput = readStringValue(params.requestChannel);

180180

const normalizedChannel = channelInput ? normalizeMessageChannel(channelInput) : undefined;

181+

if (params.rejectWebchatAsInternalOnly && normalizedChannel === INTERNAL_MESSAGE_CHANNEL) {

182+

return {

183+

error: errorShape(

184+

ErrorCodes.INVALID_REQUEST,

185+

"unsupported channel: webchat (internal-only). Use `chat.send` for WebChat UI messages or choose a deliverable channel.",

186+

),

187+

};

188+

}

181189

if (channelInput && !normalizedChannel) {

182-

const normalizedInput = normalizeOptionalLowercaseString(channelInput) ?? "";

183-

if (params.rejectWebchatAsInternalOnly && normalizedInput === "webchat") {

184-

return {

185-

error: errorShape(

186-

ErrorCodes.INVALID_REQUEST,

187-

"unsupported channel: webchat (internal-only). Use `chat.send` for WebChat UI messages or choose a deliverable channel.",

188-

),

189-

};

190-

}

191190

return {

192191

error: errorShape(ErrorCodes.INVALID_REQUEST, params.unsupportedMessage(channelInput)),

193192

};