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

推荐订阅源

The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
The Cloudflare Blog
G
Google Developers Blog
博客园_首页
Martin Fowler
Martin Fowler
Apple Machine Learning Research
Apple Machine Learning Research
L
LangChain Blog
D
Docker
C
Check Point Blog
T
Tailwind CSS Blog
博客园 - 司徒正美
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
Microsoft Security Blog
Microsoft Security Blog
V
V2EX
博客园 - 叶小钗
T
The Blog of Author Tim Ferriss
酷 壳 – CoolShell
酷 壳 – CoolShell
IT之家
IT之家
M
MIT News - Artificial intelligence
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 【当耐特】
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(plugins): reuse scoped tool registries · openclaw/ope...
steipete · 2026-05-02 · via Recent Commits to openclaw:main

@@ -164,6 +164,154 @@ describe("getCompatibleActivePluginRegistry", () => {

164164

}),

165165

).toBeUndefined();

166166

});

167+168+

it("reuses a scoped gateway-bindable registry for an unscoped default-mode request", () => {

169+

const registry = createEmptyPluginRegistry();

170+

registry.plugins.push(

171+

{ id: "acpx" } as (typeof registry.plugins)[number],

172+

{ id: "telegram" } as (typeof registry.plugins)[number],

173+

);

174+

const startupOptions = {

175+

config: {

176+

plugins: {

177+

allow: ["acpx", "telegram"],

178+

},

179+

},

180+

workspaceDir: "/tmp/workspace-a",

181+

onlyPluginIds: ["acpx", "telegram"],

182+

runtimeOptions: {

183+

allowGatewaySubagentBinding: true,

184+

},

185+

};

186+

const { cacheKey } = __testing.resolvePluginLoadCacheContext(startupOptions);

187+

setActivePluginRegistry(registry, cacheKey, "gateway-bindable");

188+189+

expect(

190+

__testing.getCompatibleActivePluginRegistry({

191+

config: startupOptions.config,

192+

workspaceDir: "/tmp/workspace-a",

193+

}),

194+

).toBe(registry);

195+

});

196+197+

it("reuses a scoped gateway-bindable registry for an unscoped snapshot-mode request", () => {

198+

const registry = createEmptyPluginRegistry();

199+

registry.plugins.push(

200+

{ id: "acpx" } as (typeof registry.plugins)[number],

201+

{ id: "telegram" } as (typeof registry.plugins)[number],

202+

);

203+

const startupOptions = {

204+

config: {

205+

plugins: {

206+

allow: ["acpx", "telegram"],

207+

},

208+

},

209+

workspaceDir: "/tmp/workspace-a",

210+

onlyPluginIds: ["acpx", "telegram"],

211+

runtimeOptions: {

212+

allowGatewaySubagentBinding: true,

213+

},

214+

};

215+

const { cacheKey } = __testing.resolvePluginLoadCacheContext(startupOptions);

216+

setActivePluginRegistry(registry, cacheKey, "gateway-bindable");

217+218+

expect(

219+

__testing.getCompatibleActivePluginRegistry({

220+

config: startupOptions.config,

221+

workspaceDir: "/tmp/workspace-a",

222+

activate: false,

223+

}),

224+

).toBe(registry);

225+

});

226+227+

it("does not reuse a scoped registry when plugin IDs differ", () => {

228+

const registry = createEmptyPluginRegistry();

229+

registry.plugins.push({ id: "acpx" } as (typeof registry.plugins)[number]);

230+

const startupOptions = {

231+

config: {

232+

plugins: {

233+

allow: ["acpx", "telegram"],

234+

},

235+

},

236+

workspaceDir: "/tmp/workspace-a",

237+

onlyPluginIds: ["acpx", "telegram"],

238+

runtimeOptions: {

239+

allowGatewaySubagentBinding: true,

240+

},

241+

};

242+

const { cacheKey } = __testing.resolvePluginLoadCacheContext(startupOptions);

243+

setActivePluginRegistry(registry, cacheKey, "gateway-bindable");

244+245+

expect(

246+

__testing.getCompatibleActivePluginRegistry({

247+

config: startupOptions.config,

248+

workspaceDir: "/tmp/workspace-a",

249+

}),

250+

).toBeUndefined();

251+

});

252+253+

it("does not reuse a scoped gateway-bindable registry for an explicit subagent request", () => {

254+

const registry = createEmptyPluginRegistry();

255+

registry.plugins.push(

256+

{ id: "acpx" } as (typeof registry.plugins)[number],

257+

{ id: "telegram" } as (typeof registry.plugins)[number],

258+

);

259+

const startupOptions = {

260+

config: {

261+

plugins: {

262+

allow: ["acpx", "telegram"],

263+

},

264+

},

265+

workspaceDir: "/tmp/workspace-a",

266+

onlyPluginIds: ["acpx", "telegram"],

267+

runtimeOptions: {

268+

allowGatewaySubagentBinding: true,

269+

},

270+

};

271+

const { cacheKey } = __testing.resolvePluginLoadCacheContext(startupOptions);

272+

setActivePluginRegistry(registry, cacheKey, "gateway-bindable");

273+274+

expect(

275+

__testing.getCompatibleActivePluginRegistry({

276+

config: startupOptions.config,

277+

workspaceDir: "/tmp/workspace-a",

278+

runtimeOptions: {

279+

subagent: {} as CreatePluginRuntimeOptions["subagent"],

280+

},

281+

}),

282+

).toBeUndefined();

283+

});

284+285+

it("reuses a scoped startup registry when only the request omits gateway methods", () => {

286+

const registry = createEmptyPluginRegistry();

287+

registry.plugins.push(

288+

{ id: "acpx" } as (typeof registry.plugins)[number],

289+

{ id: "telegram" } as (typeof registry.plugins)[number],

290+

);

291+

registry.coreGatewayMethodNames = ["sessions.get", "sessions.list"];

292+

const startupOptions = {

293+

config: {

294+

plugins: {

295+

allow: ["acpx", "telegram"],

296+

},

297+

},

298+

workspaceDir: "/tmp/workspace-a",

299+

onlyPluginIds: ["acpx", "telegram"],

300+

coreGatewayMethodNames: ["sessions.get", "sessions.list"],

301+

runtimeOptions: {

302+

allowGatewaySubagentBinding: true,

303+

},

304+

};

305+

const { cacheKey } = __testing.resolvePluginLoadCacheContext(startupOptions);

306+

setActivePluginRegistry(registry, cacheKey, "gateway-bindable");

307+308+

expect(

309+

__testing.getCompatibleActivePluginRegistry({

310+

config: startupOptions.config,

311+

workspaceDir: "/tmp/workspace-a",

312+

}),

313+

).toBe(registry);

314+

});

167315

});

168316169317

describe("resolveRuntimePluginRegistry", () => {