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

推荐订阅源

博客园_首页
H
Help Net Security
腾讯CDC
宝玉的分享
宝玉的分享
H
Hackread – Cybersecurity News, Data Breaches, AI and More
L
LangChain Blog
爱范儿
爱范儿
T
The Blog of Author Tim Ferriss
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MyScale Blog
MyScale Blog
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
D
Docker
V
V2EX
Last Week in AI
Last Week in AI
G
Google Developers Blog
IT之家
IT之家
C
Check Point Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 聂微东

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(reply): deliver plugin binding replies · openclaw/ope...
MonkeyLeeT · 2026-05-31 · via Recent Commits to openclaw:main

@@ -5427,7 +5427,7 @@ describe("dispatchReplyFromConfig", () => {

54275427

expect(replyResolver).not.toHaveBeenCalled();

54285428

});

542954295430-

it("keeps unauthorized plugin-owned binding slash text routed to the bound plugin", async () => {

5430+

it("keeps unauthorized plugin-owned binding slash replies suppressed while routed to the bound plugin", async () => {

54315431

setNoAbort();

54325432

hookMocks.runner.hasHooks.mockImplementation(

54335433

((hookName?: string) =>

@@ -5436,7 +5436,7 @@ describe("dispatchReplyFromConfig", () => {

54365436

hookMocks.registry.plugins = [{ id: "openclaw-codex-app-server", status: "loaded" }];

54375437

hookMocks.runner.runInboundClaimForPluginOutcome.mockResolvedValue({

54385438

status: "handled",

5439-

result: { handled: true },

5439+

result: { handled: true, reply: { text: "do not leak slash reply" } },

54405440

});

54415441

sessionBindingMocks.resolveByConversation.mockReturnValue({

54425442

bindingId: "binding-command-escape-denied",

@@ -5467,6 +5467,7 @@ describe("dispatchReplyFromConfig", () => {

54675467

AccountId: "default",

54685468

SenderId: "user-9",

54695469

SenderUsername: "ada",

5470+

ChatType: "channel",

54705471

CommandSource: "text",

54715472

CommandAuthorized: false,

54725473

WasMentioned: false,

@@ -5480,7 +5481,11 @@ describe("dispatchReplyFromConfig", () => {

5480548154815482

const result = await dispatchReplyFromConfig({ ctx, cfg, dispatcher, replyResolver });

548254835483-

expect(result).toEqual({ queuedFinal: false, counts: { tool: 0, block: 0, final: 0 } });

5484+

expect(result).toEqual({

5485+

queuedFinal: false,

5486+

counts: { tool: 0, block: 0, final: 0 },

5487+

sourceReplyDeliveryMode: "message_tool_only",

5488+

});

54845489

expect(sessionBindingMocks.touch).toHaveBeenCalledWith("binding-command-escape-denied");

54855490

expect(hookMocks.runner.runInboundClaimForPluginOutcome).toHaveBeenCalledWith(

54865491

"openclaw-codex-app-server",

@@ -5491,6 +5496,7 @@ describe("dispatchReplyFromConfig", () => {

54915496

);

54925497

expect(hookMocks.runner.runInboundClaim).not.toHaveBeenCalled();

54935498

expect(replyResolver).not.toHaveBeenCalled();

5499+

expect(dispatcher.sendFinalReply).not.toHaveBeenCalled();

54945500

});

5495550154965502

it("delivers plugin-owned binding replies returned by the owning inbound claim hook", async () => {

@@ -7049,7 +7055,100 @@ describe("sendPolicy deny — suppress delivery, not processing (#53328)", () =>

70497055

expect(dispatcher.sendFinalReply).not.toHaveBeenCalled();

70507056

});

705170577052-

it("routes plugin-owned bindings under message-tool-only source delivery", async () => {

7058+

it.each(

7059+

[

7060+

{

7061+

name: "handled without a plugin reply",

7062+

bindingId: "binding-message-tool-only",

7063+

conversation: {

7064+

channel: "telegram",

7065+

accountId: "default",

7066+

conversationId: "-1001234567890:topic:11",

7067+

parentConversationId: "-1001234567890",

7068+

},

7069+

ctx: {

7070+

Provider: "telegram",

7071+

Surface: "telegram",

7072+

OriginatingChannel: "telegram",

7073+

OriginatingTo: "telegram:-1001234567890",

7074+

To: "telegram:-1001234567890",

7075+

AccountId: "default",

7076+

MessageThreadId: 11,

7077+

ChatType: "group",

7078+

GroupSubject: "Dev",

7079+

Body: "observed message",

7080+

},

7081+

cfg: emptyConfig,

7082+

replyOptions: {

7083+

sourceReplyDeliveryMode: "message_tool_only" as const,

7084+

},

7085+

expectedClaim: { channel: "telegram", threadId: 11 },

7086+

},

7087+

{

7088+

name: "handled with a plugin reply",

7089+

bindingId: "binding-message-tool-reply",

7090+

conversation: {

7091+

channel: "discord",

7092+

accountId: "default",

7093+

conversationId: "channel:reply-test",

7094+

},

7095+

ctx: {

7096+

Provider: "discord",

7097+

Surface: "discord",

7098+

OriginatingChannel: "discord",

7099+

OriginatingTo: "discord:channel:reply-test",

7100+

To: "discord:channel:reply-test",

7101+

AccountId: "default",

7102+

ChatType: "channel",

7103+

Body: "observed message",

7104+

SessionKey: "agent:main:discord:channel:reply-test",

7105+

},

7106+

cfg: {

7107+

messages: {

7108+

groupChat: { visibleReplies: "message_tool" },

7109+

},

7110+

} as OpenClawConfig,

7111+

expectedClaim: { channel: "discord" },

7112+

pluginReply: { text: "Codex native reply" },

7113+

expectPluginReplyDelivered: true,

7114+

},

7115+

{

7116+

name: "suppresses ambient room_event plugin reply",

7117+

bindingId: "binding-message-tool-room-event",

7118+

conversation: {

7119+

channel: "discord",

7120+

accountId: "default",

7121+

conversationId: "channel:room-event-test",

7122+

},

7123+

ctx: {

7124+

Provider: "discord",

7125+

Surface: "discord",

7126+

OriginatingChannel: "discord",

7127+

OriginatingTo: "discord:channel:room-event-test",

7128+

To: "discord:channel:room-event-test",

7129+

AccountId: "default",

7130+

ChatType: "group",

7131+

InboundEventKind: "room_event",

7132+

Body: "observed message",

7133+

SessionKey: "agent:main:discord:channel:room-event-test",

7134+

},

7135+

cfg: emptyConfig,

7136+

expectedClaim: { channel: "discord" },

7137+

pluginReply: { text: "Codex ambient room event reply" },

7138+

expectPluginReplyDelivered: false,

7139+

},

7140+

] satisfies Array<{

7141+

name: string;

7142+

bindingId: string;

7143+

conversation: SessionBindingRecord["conversation"];

7144+

ctx: Partial<MsgContext>;

7145+

cfg: OpenClawConfig;

7146+

replyOptions?: { sourceReplyDeliveryMode: "message_tool_only" };

7147+

expectedClaim: Record<string, unknown>;

7148+

pluginReply?: ReplyPayload;

7149+

expectPluginReplyDelivered?: boolean;

7150+

}>,

7151+

)("routes plugin-owned bindings under message-tool-only source delivery: $name", async (params) => {

70537152

setNoAbort();

70547153

hookMocks.runner.hasHooks.mockImplementation(

70557154

((hookName?: string) =>

@@ -7058,18 +7157,15 @@ describe("sendPolicy deny — suppress delivery, not processing (#53328)", () =>

70587157

hookMocks.registry.plugins = [{ id: "openclaw-codex-app-server", status: "loaded" }];

70597158

hookMocks.runner.runInboundClaimForPluginOutcome.mockResolvedValue({

70607159

status: "handled",

7061-

result: { handled: true },

7160+

result: params.pluginReply

7161+

? { handled: true, reply: params.pluginReply }

7162+

: { handled: true },

70627163

});

70637164

sessionBindingMocks.resolveByConversation.mockReturnValue({

7064-

bindingId: "binding-message-tool-only",

7165+

bindingId: params.bindingId,

70657166

targetSessionKey: "plugin-binding:codex:abc123",

70667167

targetKind: "session",

7067-

conversation: {

7068-

channel: "telegram",

7069-

accountId: "default",

7070-

conversationId: "-1001234567890:topic:11",

7071-

parentConversationId: "-1001234567890",

7072-

},

7168+

conversation: params.conversation,

70737169

status: "active",

70747170

boundAt: 1710000000000,

70757171

metadata: {

@@ -7085,49 +7181,37 @@ describe("sendPolicy deny — suppress delivery, not processing (#53328)", () =>

70857181

};

70867182

const dispatcher = createDispatcher();

70877183

const replyResolver = vi.fn(async () => ({ text: "agent reply" }) satisfies ReplyPayload);

7088-

const ctx = buildTestCtx({

7089-

Provider: "telegram",

7090-

Surface: "telegram",

7091-

OriginatingChannel: "telegram",

7092-

OriginatingTo: "telegram:-1001234567890",

7093-

To: "telegram:-1001234567890",

7094-

AccountId: "default",

7095-

MessageThreadId: 11,

7096-

ChatType: "group",

7097-

GroupSubject: "Dev",

7098-

Body: "observed message",

7099-

});

7100718471017185

const result = await dispatchReplyFromConfig({

7102-

ctx,

7103-

cfg: emptyConfig,

7186+

ctx: buildTestCtx(params.ctx),

7187+

cfg: params.cfg,

71047188

dispatcher,

71057189

replyResolver,

7106-

replyOptions: {

7107-

sourceReplyDeliveryMode: "message_tool_only",

7108-

},

7190+

replyOptions: params.replyOptions,

71097191

});

7110719271117193

expect(result).toEqual({

71127194

queuedFinal: false,

71137195

counts: { tool: 0, block: 0, final: 0 },

71147196

sourceReplyDeliveryMode: "message_tool_only",

71157197

});

7116-

expect(sessionBindingMocks.touch).toHaveBeenCalledWith("binding-message-tool-only");

7117-

const claimCall = firstMockCall(

7118-

hookMocks.runner.runInboundClaimForPluginOutcome,

7119-

"plugin inbound claim",

7198+

expect(sessionBindingMocks.touch).toHaveBeenCalledWith(params.bindingId);

7199+

expect(hookMocks.runner.runInboundClaimForPluginOutcome).toHaveBeenCalledWith(

7200+

"openclaw-codex-app-server",

7201+

expect.objectContaining({

7202+

content: "observed message",

7203+

...params.expectedClaim,

7204+

}),

7205+

expect.objectContaining({

7206+

pluginBinding: expect.objectContaining({ bindingId: params.bindingId }),

7207+

}),

71207208

);

7121-

expect(claimCall[0]).toBe("openclaw-codex-app-server");

7122-

expect(claimCall[1]).toMatchObject({

7123-

channel: "telegram",

7124-

content: "observed message",

7125-

threadId: 11,

7126-

});

7127-

const claimContext = claimCall[2] as { pluginBinding?: { bindingId?: string } };

7128-

expect(claimContext.pluginBinding).toMatchObject({ bindingId: "binding-message-tool-only" });

71297209

expect(replyResolver).not.toHaveBeenCalled();

7130-

expect(dispatcher.sendFinalReply).not.toHaveBeenCalled();

7210+

if (params.expectPluginReplyDelivered) {

7211+

expect(dispatcher.sendFinalReply).toHaveBeenCalledWith(params.pluginReply);

7212+

} else {

7213+

expect(dispatcher.sendFinalReply).not.toHaveBeenCalled();

7214+

}

71317215

});

7132721671337217

it("keeps unmentioned plugin-bound fallback from ordinary group agent dispatch", async () => {