mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:50:43 +00:00
fix(onboarding): scope post-config runtime deps (#75653)
This commit is contained in:
@@ -26,6 +26,7 @@ Docs: https://docs.openclaw.ai
|
||||
- fix: block workspace CLOUDSDK_PYTHON override and always set trusted interpreter for gcloud. (#74492) Thanks @pgondhi987.
|
||||
- Providers/Z.AI: move the bundled GLM catalog and auth env metadata into the plugin manifest, so `models list --all --provider zai` shows the full known catalog without duplicated runtime seed data. Thanks @shakkernerd.
|
||||
- fix(infra): block ambient Homebrew env vars from brew resolution. (#74463) Thanks @pgondhi987.
|
||||
- Onboarding/configure: avoid staging every default plugin runtime dependency after config writes, so skipped setup flows only prepare config-selected plugin deps instead of pulling broad feature-plugin packages. Thanks @vincentkoc.
|
||||
- Thinking/providers: resolve bundled provider thinking profiles through lightweight provider policy artifacts when startup-lazy providers are not active, so OpenAI Codex GPT-5.x keeps xhigh available in Gateway session validation. Fixes #74796. Thanks @maxschachere.
|
||||
- Security/Windows: ignore workspace `.env` system-path variables and resolve stale-process `taskkill.exe` from the validated Windows install root, preventing repository-local env files from redirecting cleanup helpers. Thanks @pgondhi987.
|
||||
- CLI/plugins: scope install and enable slot selection to the selected plugin manifest/runtime fallback, so plugin installs no longer load every plugin runtime or broad status snapshot just to update memory/context slots. Thanks @vincentkoc.
|
||||
|
||||
@@ -95,6 +95,7 @@ describe("preparePostConfigBundledRuntimeDeps", () => {
|
||||
packageRoot: "/pkg",
|
||||
config,
|
||||
includeConfiguredChannels: true,
|
||||
includeEnabledByDefaultPlugins: false,
|
||||
env,
|
||||
});
|
||||
expect(mocks.repairBundledRuntimeDepsPackagePlanAsync).toHaveBeenCalledWith(
|
||||
@@ -102,6 +103,7 @@ describe("preparePostConfigBundledRuntimeDeps", () => {
|
||||
packageRoot: "/pkg",
|
||||
config,
|
||||
includeConfiguredChannels: true,
|
||||
includeEnabledByDefaultPlugins: false,
|
||||
env,
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -66,6 +66,7 @@ export async function preparePostConfigBundledRuntimeDeps(params: {
|
||||
packageRoot,
|
||||
config: params.config,
|
||||
includeConfiguredChannels: true,
|
||||
includeEnabledByDefaultPlugins: false,
|
||||
env,
|
||||
});
|
||||
if (plan.conflicts.length > 0) {
|
||||
@@ -102,6 +103,7 @@ export async function preparePostConfigBundledRuntimeDeps(params: {
|
||||
packageRoot,
|
||||
config: params.config,
|
||||
includeConfiguredChannels: true,
|
||||
includeEnabledByDefaultPlugins: false,
|
||||
env,
|
||||
...(params.installDeps
|
||||
? {
|
||||
|
||||
@@ -482,6 +482,7 @@ export function isBundledPluginConfiguredForRuntimeDeps(params: {
|
||||
pluginDir: string;
|
||||
configuredModelOwnerPluginIds?: ReadonlySet<string>;
|
||||
includeConfiguredChannels?: boolean;
|
||||
includeEnabledByDefaultPlugins?: boolean;
|
||||
manifestCache?: BundledPluginRuntimeDepsManifestCache;
|
||||
}): boolean {
|
||||
if (
|
||||
@@ -560,7 +561,11 @@ export function isBundledPluginConfiguredForRuntimeDeps(params: {
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return manifest.enabledByDefault && manifest.providers.length === 0;
|
||||
return (
|
||||
(params.includeEnabledByDefaultPlugins ?? true) &&
|
||||
manifest.enabledByDefault &&
|
||||
manifest.providers.length === 0
|
||||
);
|
||||
}
|
||||
|
||||
function isBundledPluginExplicitlyDisabledForRuntimeDeps(params: {
|
||||
@@ -600,6 +605,7 @@ function shouldIncludeBundledPluginRuntimeDeps(params: {
|
||||
pluginDir: string;
|
||||
configuredModelOwnerPluginIds?: ReadonlySet<string>;
|
||||
includeConfiguredChannels?: boolean;
|
||||
includeEnabledByDefaultPlugins?: boolean;
|
||||
manifestCache?: BundledPluginRuntimeDepsManifestCache;
|
||||
}): boolean {
|
||||
if (params.exactPluginIds) {
|
||||
@@ -650,6 +656,7 @@ function shouldIncludeBundledPluginRuntimeDeps(params: {
|
||||
pluginDir: params.pluginDir,
|
||||
configuredModelOwnerPluginIds: params.configuredModelOwnerPluginIds,
|
||||
includeConfiguredChannels: params.includeConfiguredChannels,
|
||||
includeEnabledByDefaultPlugins: params.includeEnabledByDefaultPlugins,
|
||||
manifestCache: params.manifestCache,
|
||||
});
|
||||
}
|
||||
@@ -660,6 +667,7 @@ export function collectBundledPluginRuntimeDeps(params: {
|
||||
pluginIds?: ReadonlySet<string>;
|
||||
exactPluginIds?: ReadonlySet<string>;
|
||||
includeConfiguredChannels?: boolean;
|
||||
includeEnabledByDefaultPlugins?: boolean;
|
||||
manifestCache?: BundledPluginRuntimeDepsManifestCache;
|
||||
normalizePluginId?: NormalizePluginId;
|
||||
}): {
|
||||
@@ -707,6 +715,7 @@ export function collectBundledPluginRuntimeDeps(params: {
|
||||
pluginDir,
|
||||
configuredModelOwnerPluginIds,
|
||||
includeConfiguredChannels: params.includeConfiguredChannels,
|
||||
includeEnabledByDefaultPlugins: params.includeEnabledByDefaultPlugins,
|
||||
manifestCache,
|
||||
})
|
||||
) {
|
||||
|
||||
@@ -1145,6 +1145,7 @@ describe("createBundledRuntimeDepsPackagePlan config policy", () => {
|
||||
name: string;
|
||||
config: Parameters<typeof createBundledRuntimeDepsPackagePlan>[0]["config"];
|
||||
includeConfiguredChannels: boolean;
|
||||
includeEnabledByDefaultPlugins?: boolean;
|
||||
expectedDeps: string[];
|
||||
};
|
||||
|
||||
@@ -1329,18 +1330,43 @@ describe("createBundledRuntimeDepsPackagePlan config policy", () => {
|
||||
includeConfiguredChannels: false,
|
||||
expectedDeps: ["alpha-runtime@1.0.0"],
|
||||
},
|
||||
{
|
||||
name: "can omit default-enabled bundled plugins for post-config repair",
|
||||
config: {},
|
||||
includeConfiguredChannels: true,
|
||||
includeEnabledByDefaultPlugins: false,
|
||||
expectedDeps: [],
|
||||
},
|
||||
{
|
||||
name: "includes configured channels when default-enabled plugins are omitted",
|
||||
config: { channels: { telegram: { botToken: "123:abc" } } },
|
||||
includeConfiguredChannels: true,
|
||||
includeEnabledByDefaultPlugins: false,
|
||||
expectedDeps: ["telegram-runtime@2.0.0"],
|
||||
},
|
||||
{
|
||||
name: "includes configured provider deps when default-enabled plugins are omitted",
|
||||
config: { agents: { defaults: { model: "amazon-bedrock/claude-opus-4-7" } } },
|
||||
includeConfiguredChannels: false,
|
||||
includeEnabledByDefaultPlugins: false,
|
||||
expectedDeps: ["bedrock-runtime@3.0.0"],
|
||||
},
|
||||
];
|
||||
|
||||
it.each(cases)("$name", ({ config, includeConfiguredChannels, expectedDeps }) => {
|
||||
const result = createBundledRuntimeDepsPackagePlan({
|
||||
packageRoot: setupPolicyPackageRoot(),
|
||||
config,
|
||||
includeConfiguredChannels,
|
||||
});
|
||||
it.each(cases)(
|
||||
"$name",
|
||||
({ config, includeConfiguredChannels, includeEnabledByDefaultPlugins, expectedDeps }) => {
|
||||
const result = createBundledRuntimeDepsPackagePlan({
|
||||
packageRoot: setupPolicyPackageRoot(),
|
||||
config,
|
||||
includeConfiguredChannels,
|
||||
...(includeEnabledByDefaultPlugins !== undefined ? { includeEnabledByDefaultPlugins } : {}),
|
||||
});
|
||||
|
||||
expect(result.deps.map((dep) => `${dep.name}@${dep.version}`)).toEqual(expectedDeps);
|
||||
expect(result.conflicts).toEqual([]);
|
||||
});
|
||||
expect(result.deps.map((dep) => `${dep.name}@${dep.version}`)).toEqual(expectedDeps);
|
||||
expect(result.conflicts).toEqual([]);
|
||||
},
|
||||
);
|
||||
|
||||
it("honors deny and disabled entries when scanning an explicit effective plugin set", () => {
|
||||
const packageRoot = setupPolicyPackageRoot();
|
||||
|
||||
@@ -92,6 +92,7 @@ export type BundledRuntimeDepsPackagePlanParams = {
|
||||
pluginIds?: readonly string[];
|
||||
exactPluginIds?: readonly string[];
|
||||
includeConfiguredChannels?: boolean;
|
||||
includeEnabledByDefaultPlugins?: boolean;
|
||||
env?: NodeJS.ProcessEnv;
|
||||
};
|
||||
|
||||
@@ -367,6 +368,9 @@ export function createBundledRuntimeDepsPackagePlan(
|
||||
...(!exactPluginIds && params.includeConfiguredChannels !== undefined
|
||||
? { includeConfiguredChannels: params.includeConfiguredChannels }
|
||||
: {}),
|
||||
...(!exactPluginIds && params.includeEnabledByDefaultPlugins !== undefined
|
||||
? { includeEnabledByDefaultPlugins: params.includeEnabledByDefaultPlugins }
|
||||
: {}),
|
||||
manifestCache,
|
||||
...(normalizePluginId ? { normalizePluginId } : {}),
|
||||
});
|
||||
@@ -394,6 +398,7 @@ export async function repairBundledRuntimeDepsPackagePlanAsync(params: {
|
||||
pluginIds?: readonly string[];
|
||||
exactPluginIds?: readonly string[];
|
||||
includeConfiguredChannels?: boolean;
|
||||
includeEnabledByDefaultPlugins?: boolean;
|
||||
env: NodeJS.ProcessEnv;
|
||||
installDeps?: (params: BundledRuntimeDepsInstallParams) => Promise<void> | void;
|
||||
onProgress?: (message: string) => void;
|
||||
|
||||
Reference in New Issue
Block a user