fix: include setup cli backends in plugin lookup · openclaw/openclaw@b2deb74
shakkernerd
·
2026-04-27
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -94,6 +94,9 @@ function buildOwnerMaps(plugins: readonly PluginManifestRecord[]): PluginLookUpT
|
94 | 94 | for (const cliBackendId of plugin.cliBackends) { |
95 | 95 | appendOwner(cliBackends, cliBackendId, plugin.id); |
96 | 96 | } |
| 97 | +for (const cliBackendId of plugin.setup?.cliBackends ?? []) { |
| 98 | +appendOwner(cliBackends, cliBackendId, plugin.id); |
| 99 | +} |
97 | 100 | for (const setupProvider of plugin.setup?.providers ?? []) { |
98 | 101 | appendOwner(setupProviders, setupProvider.id, plugin.id); |
99 | 102 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -244,6 +244,9 @@ describe("plugin registry facade", () => {
|
244 | 244 | expect(resolveProviderOwners({ lookUpTable, providerId: "DEMO" })).toEqual(["demo"]); |
245 | 245 | expect(resolveChannelOwners({ lookUpTable, channelId: "demo-chat" })).toEqual(["demo"]); |
246 | 246 | expect(resolveCliBackendOwners({ lookUpTable, cliBackendId: "demo-cli" })).toEqual(["demo"]); |
| 247 | +expect(resolveCliBackendOwners({ lookUpTable, cliBackendId: "demo-setup-cli" })).toEqual([ |
| 248 | +"demo", |
| 249 | +]); |
247 | 250 | expect(resolveSetupProviderOwners({ lookUpTable, setupProviderId: "demo-setup" })).toEqual([ |
248 | 251 | "demo", |
249 | 252 | ]); |
@@ -254,6 +257,13 @@ describe("plugin registry facade", () => {
|
254 | 257 | matches: "demo-command", |
255 | 258 | }), |
256 | 259 | ).toEqual(["demo"]); |
| 260 | +expect( |
| 261 | +resolvePluginContributionOwners({ |
| 262 | + lookUpTable, |
| 263 | +contribution: "cliBackends", |
| 264 | +matches: "demo-setup-cli", |
| 265 | +}), |
| 266 | +).toEqual(["demo"]); |
257 | 267 | expect( |
258 | 268 | resolvePluginContributionOwners({ |
259 | 269 | lookUpTable, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。