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

推荐订阅源

OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
L
LangChain Blog
WordPress大学
WordPress大学
MyScale Blog
MyScale Blog
The Cloudflare Blog
J
Java Code Geeks
Google DeepMind News
Google DeepMind News
Recent Announcements
Recent Announcements
Microsoft Azure Blog
Microsoft Azure Blog
Y
Y Combinator Blog
有赞技术团队
有赞技术团队
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
Martin Fowler
Martin Fowler
小众软件
小众软件
量子位
月光博客
月光博客
P
Proofpoint News Feed
IT之家
IT之家
腾讯CDC
博客园 - 三生石上(FineUI控件)
博客园 - 司徒正美
雷峰网
雷峰网
V
Visual Studio 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
fix(plugins): preserve gateway hook runner · openclaw/ope...
steipete · 2026-04-25 · via Recent Commits to openclaw:main

@@ -23,7 +23,11 @@ import {

2323

} from "../tasks/detached-task-runtime-state.js";

2424

import { withEnv } from "../test-utils/env.js";

2525

import { clearPluginCommands, getPluginCommandSpecs } from "./command-registry-state.js";

26-

import { getGlobalHookRunner, resetGlobalHookRunner } from "./hook-runner-global.js";

26+

import {

27+

getGlobalHookRunner,

28+

getGlobalPluginRegistry,

29+

resetGlobalHookRunner,

30+

} from "./hook-runner-global.js";

2731

import { createHookRunner } from "./hooks.js";

2832

import {

2933

clearPluginInteractiveHandlerRegistrations,

@@ -3594,6 +3598,66 @@ module.exports = { id: "throws-after-import", register() {} };`,

35943598

resetGlobalHookRunner();

35953599

});

359636003601+

it("preserves the gateway-bindable hook runner across later default-mode activating loads", () => {

3602+

useNoBundledPlugins();

3603+

const gatewayPlugin = writePlugin({

3604+

id: "gateway-hook-surface",

3605+

filename: "gateway-hook-surface.cjs",

3606+

body: `module.exports = { id: "gateway-hook-surface", register(api) {

3607+

api.on("subagent_ended", () => undefined);

3608+

} };`,

3609+

});

3610+

const defaultPlugin = writePlugin({

3611+

id: "default-hook-surface",

3612+

filename: "default-hook-surface.cjs",

3613+

body: `module.exports = { id: "default-hook-surface", register(api) {

3614+

api.on("message_sent", () => undefined);

3615+

} };`,

3616+

});

3617+3618+

const gatewayRegistry = loadOpenClawPlugins({

3619+

workspaceDir: gatewayPlugin.dir,

3620+

config: {

3621+

plugins: {

3622+

load: { paths: [gatewayPlugin.file] },

3623+

allow: ["gateway-hook-surface"],

3624+

entries: {

3625+

"gateway-hook-surface": {

3626+

enabled: true,

3627+

hooks: { allowConversationAccess: true },

3628+

},

3629+

},

3630+

},

3631+

},

3632+

runtimeOptions: {

3633+

allowGatewaySubagentBinding: true,

3634+

},

3635+

});

3636+

expect(getGlobalPluginRegistry()).toBe(gatewayRegistry);

3637+

expect(getGlobalHookRunner()?.hasHooks("subagent_ended")).toBe(true);

3638+3639+

const defaultRegistry = loadOpenClawPlugins({

3640+

workspaceDir: defaultPlugin.dir,

3641+

config: {

3642+

plugins: {

3643+

load: { paths: [defaultPlugin.file] },

3644+

allow: ["default-hook-surface"],

3645+

entries: {

3646+

"default-hook-surface": {

3647+

enabled: true,

3648+

hooks: { allowConversationAccess: true },

3649+

},

3650+

},

3651+

},

3652+

},

3653+

});

3654+3655+

expect(getActivePluginRegistry()).toBe(defaultRegistry);

3656+

expect(getGlobalPluginRegistry()).toBe(gatewayRegistry);

3657+

expect(getGlobalHookRunner()?.hasHooks("subagent_ended")).toBe(true);

3658+

expect(getGlobalHookRunner()?.hasHooks("message_sent")).toBe(false);

3659+

});

3660+35973661

it.each([

35983662

{

35993663

name: "does not reuse cached bundled plugin registries across env changes",