mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 05:00:25 +00:00
fix: tighten gateway startup plugin loading
This commit is contained in:
@@ -133,30 +133,31 @@ describe("resolveGatewayStartupPluginIds", () => {
|
||||
|
||||
it.each([
|
||||
[
|
||||
"includes configured channels, explicit bundled sidecars, and enabled non-bundled sidecars",
|
||||
"includes configured channels and explicitly enabled bundled sidecars",
|
||||
createStartupConfig({
|
||||
enabledPluginIds: ["demo-bundled-sidecar"],
|
||||
modelId: "demo-cli/demo-model",
|
||||
}),
|
||||
[
|
||||
"demo-channel",
|
||||
"demo-default-on-sidecar",
|
||||
"demo-provider-plugin",
|
||||
"demo-bundled-sidecar",
|
||||
"demo-global-sidecar",
|
||||
],
|
||||
["demo-channel", "demo-provider-plugin", "demo-bundled-sidecar"],
|
||||
],
|
||||
[
|
||||
"includes bundled plugins with enabledByDefault: true",
|
||||
"skips bundled plugins with enabledByDefault: true until something references them",
|
||||
{} as OpenClawConfig,
|
||||
["demo-channel", "demo-default-on-sidecar", "demo-global-sidecar"],
|
||||
["demo-channel"],
|
||||
],
|
||||
[
|
||||
"auto-loads bundled plugins referenced by configured provider ids",
|
||||
createStartupConfig({
|
||||
providerIds: ["demo-provider"],
|
||||
}),
|
||||
["demo-channel", "demo-default-on-sidecar", "demo-provider-plugin", "demo-global-sidecar"],
|
||||
["demo-channel", "demo-provider-plugin"],
|
||||
],
|
||||
[
|
||||
"keeps non-bundled sidecars out of startup unless explicitly enabled",
|
||||
createStartupConfig({
|
||||
enabledPluginIds: ["demo-global-sidecar"],
|
||||
}),
|
||||
["demo-channel", "demo-global-sidecar"],
|
||||
],
|
||||
] as const)("%s", (_name, config, expected) => {
|
||||
expectStartupPluginIdsCase({ config, expected });
|
||||
|
||||
Reference in New Issue
Block a user