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

推荐订阅源

V
Visual Studio Blog
N
Netflix TechBlog - Medium
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog
IT之家
IT之家
博客园 - Franky
雷峰网
雷峰网
博客园 - 聂微东
腾讯CDC
M
MIT News - Artificial intelligence
B
Blog RSS Feed
博客园_首页
罗磊的独立博客
S
SegmentFault 最新的问题
I
InfoQ
博客园 - 叶小钗
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
D
Docker
宝玉的分享
宝玉的分享
B
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(cli): avoid plugin preload for agent bindings · openc...
steipete · 2026-04-26 · via Recent Commits to openclaw:main

@@ -9,6 +9,11 @@ import {

99

} from "./agents.bind.test-support.js";

1010

import { baseConfigSnapshot } from "./test-runtime-config-helpers.js";

111112+

const pluginRegistryMocks = vi.hoisted(() => ({

13+

loadPluginRegistrySnapshot: vi.fn(() => ({})),

14+

listPluginContributionIds: vi.fn(() => ["external-chat"]),

15+

}));

16+1217

vi.mock("../agents/agent-scope.js", () => ({

1318

listAgentEntries: (

1419

cfg: {

@@ -28,6 +33,11 @@ vi.mock("../config/bindings.js", () => ({

2833

(cfg.bindings ?? []).filter((binding) => Boolean(binding.match)),

2934

}));

303536+

vi.mock("../plugins/plugin-registry.js", () => ({

37+

loadPluginRegistrySnapshot: pluginRegistryMocks.loadPluginRegistrySnapshot,

38+

listPluginContributionIds: pluginRegistryMocks.listPluginContributionIds,

39+

}));

40+3141

type BindingResolverTestPlugin = Pick<ChannelPlugin, "id" | "meta" | "capabilities" | "config"> & {

3242

setup?: Pick<NonNullable<ChannelPlugin["setup"]>, "resolveBindingAccountId">;

3343

};

@@ -59,6 +69,12 @@ function createBindingResolverTestPlugin(params: {

5969

}

60706171

vi.mock("../channels/plugins/index.js", () => {

72+

return {

73+

getLoadedChannelPlugin: () => undefined,

74+

};

75+

});

76+77+

vi.mock("../channels/plugins/bundled.js", () => {

6278

const knownChannels = new Map([

6379

[

6480

"discord",

@@ -78,17 +94,10 @@ vi.mock("../channels/plugins/index.js", () => {

7894

],

7995

]);

8096

return {

81-

getChannelPlugin: (channel: string) => {

97+

getBundledChannelSetupPlugin: (channel: string) => {

8298

const normalized = channel.trim().toLowerCase();

8399

return knownChannels.get(normalized);

84100

},

85-

normalizeChannelId: (channel: string) => {

86-

const normalized = channel.trim().toLowerCase();

87-

if (knownChannels.has(normalized)) {

88-

return normalized;

89-

}

90-

return undefined;

91-

},

92101

};

93102

});

94103

@@ -104,6 +113,8 @@ describe("agents bind/unbind commands", () => {

104113105114

beforeEach(() => {

106115

resetAgentsBindTestHarness();

116+

pluginRegistryMocks.loadPluginRegistrySnapshot.mockClear();

117+

pluginRegistryMocks.listPluginContributionIds.mockClear();

107118

});

108119109120

it("lists all bindings by default", async () => {

@@ -141,6 +152,29 @@ describe("agents bind/unbind commands", () => {

141152

expect(runtime.exit).not.toHaveBeenCalled();

142153

});

143154155+

it("binds manifest-known external channels without loading plugin runtime", async () => {

156+

readConfigFileSnapshotMock.mockResolvedValue({

157+

...baseConfigSnapshot,

158+

config: {},

159+

});

160+161+

await agentsBindCommand({ bind: ["external-chat:work"] }, runtime);

162+163+

expect(writeConfigFileMock).toHaveBeenCalledWith(

164+

expect.objectContaining({

165+

bindings: [

166+

{

167+

type: "route",

168+

agentId: "main",

169+

match: { channel: "external-chat", accountId: "work" },

170+

},

171+

],

172+

}),

173+

);

174+

expect(pluginRegistryMocks.loadPluginRegistrySnapshot).toHaveBeenCalled();

175+

expect(runtime.exit).not.toHaveBeenCalled();

176+

});

177+144178

it("unbinds all routes for an agent", async () => {

145179

readConfigFileSnapshotMock.mockResolvedValue({

146180

...baseConfigSnapshot,