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

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
Vercel News
Vercel News
aimingoo的专栏
aimingoo的专栏
T
Tailwind CSS Blog
罗磊的独立博客
B
Blog
博客园_首页
A
About on SuperTechFans
有赞技术团队
有赞技术团队
V
V2EX
U
Unit 42
I
InfoQ
IT之家
IT之家
博客园 - 司徒正美
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
H
Help Net Security

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(channels): remove stale discovery helpers · open...
vincentkoc · 2026-06-19 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -247,24 +247,6 @@ export function resolveMessageActionDiscoveryForPlugin(params: {

247247

};

248248

}

249249
250-

/**

251-

* Lists message actions available across registered channel plugins.

252-

*/

253-

export function listChannelMessageActions(cfg: OpenClawConfig): ChannelMessageActionName[] {

254-

const actions = new Set<ChannelMessageActionName>(["send", "broadcast"]);

255-

for (const plugin of listChannelPlugins()) {

256-

for (const action of resolveMessageActionDiscoveryForPlugin({

257-

pluginId: plugin.id,

258-

actions: plugin.actions,

259-

context: { cfg },

260-

includeActions: true,

261-

}).actions) {

262-

actions.add(action);

263-

}

264-

}

265-

return Array.from(actions);

266-

}

267-
268250

/**

269251

* Lists actions whose schemas do not block cross-channel tool usage.

270252

*/

Original file line numberDiff line numberDiff line change

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

1313

channelSupportsMessageCapability,

1414

channelSupportsMessageCapabilityForChannel,

1515

listCrossChannelSchemaSupportedMessageActions,

16-

listChannelMessageActions,

1716

listChannelMessageCapabilities,

1817

listChannelMessageCapabilitiesForChannel,

1918

resolveChannelMessageToolMediaSourceParamKeys,

@@ -184,7 +183,6 @@ describe("message action capability checks", () => {

184183

createTestRegistry([{ pluginId: "demo-unified", source: "test", plugin: unifiedPlugin }]),

185184

);

186185
187-

expect(listChannelMessageActions({} as OpenClawConfig)).toEqual(["send", "broadcast", "react"]);

188186

expect(listChannelMessageCapabilities({} as OpenClawConfig)).toEqual(["presentation"]);

189187

expect(

190188

resolveChannelMessageToolSchemaProperties({

@@ -443,11 +441,9 @@ describe("message action capability checks", () => {

443441

createTestRegistry([{ pluginId: "demo-crashing", source: "test", plugin: crashingPlugin }]),

444442

);

445443
446-

expect(listChannelMessageActions({} as OpenClawConfig)).toEqual(["send", "broadcast"]);

447444

expect(listChannelMessageCapabilities({} as OpenClawConfig)).toStrictEqual([]);

448445

expect(errorSpy).toHaveBeenCalledTimes(1);

449446
450-

expect(listChannelMessageActions({} as OpenClawConfig)).toEqual(["send", "broadcast"]);

451447

expect(listChannelMessageCapabilities({} as OpenClawConfig)).toStrictEqual([]);

452448

expect(errorSpy).toHaveBeenCalledTimes(1);

453449

});

Original file line numberDiff line numberDiff line change

@@ -14,10 +14,7 @@ vi.mock("./registry.js", () => ({

1414

getLoadedChannelPlugin: getLoadedChannelPluginMock,

1515

}));

1616
17-

import {

18-

resolveSingleAccountKeysToMove,

19-

shouldMoveSingleAccountChannelKey,

20-

} from "./setup-promotion-helpers.js";

17+

import { resolveSingleAccountKeysToMove } from "./setup-promotion-helpers.js";

2118
2219

describe("setup promotion helpers", () => {

2320

beforeEach(() => {

@@ -76,11 +73,13 @@ describe("setup promotion helpers", () => {

7673

});

7774
7875

expect(

79-

shouldMoveSingleAccountChannelKey({

76+

resolveSingleAccountKeysToMove({

8077

channelKey: "demo",

81-

key: "customAuth",

78+

channel: {

79+

customAuth: "secret",

80+

},

8281

}),

83-

).toBe(true);

82+

).toEqual(["customAuth"]);

8483

expect(getBundledChannelPluginMock).toHaveBeenCalledWith("demo");

8584

});

8685
Original file line numberDiff line numberDiff line change

@@ -44,33 +44,6 @@ function getBundledChannelSetupPromotionSurface(

4444

return asPromotionSurface(getBundledChannelPlugin(channelKey)?.setup);

4545

}

4646
47-

/**

48-

* Returns whether one root-level channel key should move into account config.

49-

*/

50-

export function shouldMoveSingleAccountChannelKey(params: {

51-

channelKey: string;

52-

key: string;

53-

}): boolean {

54-

// Common keys move for every channel; channel-owned setup surfaces can add

55-

// plugin-specific keys without teaching core about that channel's schema.

56-

if (isCommonSingleAccountPromotionKey(params.key)) {

57-

return true;

58-

}

59-

const loadedContractKeys = getLoadedChannelSetupPromotionSurface(

60-

params.channelKey,

61-

)?.singleAccountKeysToMove;

62-

if (loadedContractKeys?.includes(params.key)) {

63-

return true;

64-

}

65-

const bundledContractKeys = getBundledChannelSetupPromotionSurface(

66-

params.channelKey,

67-

)?.singleAccountKeysToMove;

68-

if (bundledContractKeys?.includes(params.key)) {

69-

return true;

70-

}

71-

return false;

72-

}

73-
7447

/**

7548

* Resolves all root-level keys eligible for single-account promotion.

7649

*/

Original file line numberDiff line numberDiff line change

@@ -3,13 +3,10 @@ import { beforeEach, describe, expect, it } from "vitest";

33

import { setActivePluginRegistry } from "../plugins/runtime.js";

44

import { createChannelTestPluginBase, createTestRegistry } from "../test-utils/channel-plugins.js";

55

import {

6-

deliveryContextFromRoute,

76

formatConversationTarget,

8-

normalizeRoutableChannelRoute,

97

resolveConversationDeliveryTarget,

108

routeFromBindingRecord,

119

routeFromConversationRef,

12-

routeFromDeliveryContext,

1310

routeToDeliveryFields,

1411

} from "./route-projection.js";

1512

@@ -80,28 +77,6 @@ describe("channel route projection", () => {

8077

);

8178

});

8279
83-

it("round-trips delivery context through channel route metadata", () => {

84-

const route = routeFromDeliveryContext({

85-

channel: " Slack ",

86-

to: " channel:C123 ",

87-

accountId: " work ",

88-

threadId: " 177000.123 ",

89-

});

90-
91-

expect(route).toEqual({

92-

channel: "slack",

93-

accountId: "work",

94-

target: { to: "channel:C123" },

95-

thread: { id: "177000.123" },

96-

});

97-

expect(deliveryContextFromRoute(route)).toEqual({

98-

channel: "slack",

99-

to: "channel:C123",

100-

accountId: "work",

101-

threadId: "177000.123",

102-

});

103-

});

104-
10580

it("formats plugin-defined conversation targets via channel messaging hooks", () => {

10681

expect(

10782

formatConversationTarget({ channel: "room-chat", conversationId: "!room:example" }),

@@ -190,7 +165,4 @@ describe("channel route projection", () => {

190165

});

191166

});

192167
193-

it("narrows only routable routes", () => {

194-

expect(normalizeRoutableChannelRoute({ channel: "slack" })).toBeUndefined();

195-

});

196168

});

Original file line numberDiff line numberDiff line change

@@ -5,17 +5,14 @@ import type {

55

} from "../infra/outbound/session-binding-service.js";

66

import {

77

normalizeChannelRouteRef,

8-

type ChannelRouteChatType,

98

type ChannelRouteRef,

109

} from "../plugin-sdk/channel-route.js";

1110

import {

1211

normalizeConversationTargetParams,

1312

type ConversationTargetParams,

1413

} from "../utils/conversation-target.js";

1514

import {

16-

channelRouteFromDeliveryContext,

1715

deliveryContextFromChannelRoute,

18-

normalizeDeliveryContext,

1916

type DeliveryContext,

2017

} from "../utils/delivery-context.shared.js";

2118

import { getChannelPlugin, normalizeChannelId } from "./plugins/registry.js";

@@ -66,41 +63,6 @@ export function resolveConversationDeliveryTarget(params: ConversationTargetPara

6663

return { to };

6764

}

6865
69-

/** Channel route normalized enough to address an outbound delivery target. */

70-

export type RoutableChannelRouteRef = ChannelRouteRef & {

71-

channel: string;

72-

target: {

73-

to: string;

74-

rawTo?: string;

75-

chatType?: ChannelRouteChatType;

76-

};

77-

};

78-
79-

/** Normalizes a route and rejects routes that cannot address a channel target. */

80-

export function normalizeRoutableChannelRoute(

81-

route?: ChannelRouteRef | null,

82-

): RoutableChannelRouteRef | undefined {

83-

const normalized = normalizeChannelRouteRef({

84-

channel: route?.channel,

85-

accountId: route?.accountId,

86-

to: route?.target?.to,

87-

rawTo: route?.target?.rawTo,

88-

chatType: route?.target?.chatType,

89-

threadId: route?.thread?.id,

90-

threadKind: route?.thread?.kind,

91-

threadSource: route?.thread?.source,

92-

});

93-

if (!normalized?.channel || !normalized.target?.to) {

94-

return undefined;

95-

}

96-

return normalized as RoutableChannelRouteRef;

97-

}

98-
99-

/** Converts legacy delivery context metadata into a channel route. */

100-

export function routeFromDeliveryContext(context?: DeliveryContext): ChannelRouteRef | undefined {

101-

return channelRouteFromDeliveryContext(normalizeDeliveryContext(context));

102-

}

103-
10466

/** Converts a channel route back to legacy delivery context metadata. */

10567

export function deliveryContextFromRoute(route?: ChannelRouteRef): DeliveryContext | undefined {

10668

return deliveryContextFromChannelRoute(route);