fix(plugins): simplify bundled runtime deps staging

* fix(plugins): simplify bundled runtime deps staging

* refactor(plugins): declare bundled root runtime deps

* fix(plugins): isolate pnpm runtime dependency installs

* test(gateway): wait for deferred agent routing calls in server suite

* test(ci): follow extracted update-channel assertions

* fix(plugins): bypass pnpm age gate for bundled runtime deps

* test: drop stale rebase leftovers

* test: preserve mirrored root dependency drift guard

* test: stage mirrored deps in facade fixtures

* fix(plugin-sdk): expose provider setup metadata

* test(plugin-sdk): satisfy spread lint in facade deps fixture

* refactor(plugins): share bundled runtime deps install flow

* fix(plugins): finish runtime deps rebase cleanup

* fix(plugins): remove stale mirror import

* refactor(plugins): centralize bundled runtime root preparation

* fix(plugins): skip Windows pnpm cmd shims

* refactor(plugins): let package managers own runtime deps staging

* fix(plugins): validate staged runtime deps

* fix(plugins): preserve lazy runtime deps fallback
This commit is contained in:
Peter Steinberger
2026-04-29 17:04:56 +01:00
committed by GitHub
parent 86f473d8b9
commit 8cf724a381
25 changed files with 1778 additions and 1666 deletions

View File

@@ -213,3 +213,28 @@ export function collectBundledPluginRootRuntimeMirrorErrors(params) {
return errors.toSorted((left, right) => left.localeCompare(right));
}
export function collectDeclaredRootRuntimeDependencyMetadataErrors(rootPackageJson) {
const declaredRootRuntimeDeps = collectRuntimeDependencySpecs(rootPackageJson);
const declaredMirrorDeps =
rootPackageJson?.openclaw?.bundle?.mirroredRootRuntimeDependencies ?? [];
if (!Array.isArray(declaredMirrorDeps)) {
return ["package.json openclaw.bundle.mirroredRootRuntimeDependencies must be an array."];
}
const errors = [];
for (const dependencyName of declaredMirrorDeps) {
if (typeof dependencyName !== "string" || dependencyName.trim().length === 0) {
errors.push(
"package.json openclaw.bundle.mirroredRootRuntimeDependencies entries must be non-empty strings.",
);
continue;
}
if (!declaredRootRuntimeDeps.has(dependencyName)) {
errors.push(
`package.json openclaw.bundle.mirroredRootRuntimeDependencies declares '${dependencyName}' but package.json dependencies/optionalDependencies do not include it.`,
);
}
}
return errors.toSorted((left, right) => left.localeCompare(right));
}

View File

@@ -35,6 +35,7 @@ import {
collectBuiltBundledPluginStagedRuntimeDependencyErrors,
collectBundledPluginRootRuntimeMirrorErrors,
collectBundledPluginRuntimeDependencySpecs,
collectDeclaredRootRuntimeDependencyMetadataErrors,
collectRootDistBundledRuntimeMirrors,
} from "./lib/bundled-plugin-root-runtime-mirrors.mjs";
import { collectPackUnpackedSizeErrors as collectNpmPackUnpackedSizeErrors } from "./lib/npm-pack-budget.mjs";
@@ -52,6 +53,7 @@ export { collectBundledExtensionManifestErrors } from "./lib/bundled-extension-m
export {
collectBuiltBundledPluginStagedRuntimeDependencyErrors,
collectBundledPluginRootRuntimeMirrorErrors,
collectDeclaredRootRuntimeDependencyMetadataErrors,
collectRootDistBundledRuntimeMirrors,
packageNameFromSpecifier,
} from "./lib/bundled-plugin-root-runtime-mirrors.mjs";
@@ -162,10 +164,16 @@ function checkBundledExtensionMetadata() {
requiredRootMirrors,
rootPackageJson: rootPackage,
});
const rootMirrorMetadataErrors = collectDeclaredRootRuntimeDependencyMetadataErrors(rootPackage);
const builtArtifactErrors = collectBuiltBundledPluginStagedRuntimeDependencyErrors({
bundledPluginsDir: resolve("dist/extensions"),
});
const errors = [...manifestErrors, ...rootMirrorErrors, ...builtArtifactErrors];
const errors = [
...manifestErrors,
...rootMirrorErrors,
...rootMirrorMetadataErrors,
...builtArtifactErrors,
];
if (errors.length > 0) {
console.error("release-check: bundled extension manifest validation failed:");
for (const error of errors) {

View File

@@ -8,6 +8,7 @@ import {
collectBuiltBundledPluginStagedRuntimeDependencyErrors,
collectBundledPluginRootRuntimeMirrorErrors,
collectBundledPluginRuntimeDependencySpecs,
collectDeclaredRootRuntimeDependencyMetadataErrors,
collectRootDistBundledRuntimeMirrors,
} from "./lib/bundled-plugin-root-runtime-mirrors.mjs";
import { parsePackageRootArg } from "./lib/package-root-args.mjs";
@@ -36,6 +37,7 @@ const errors = [
requiredRootMirrors,
rootPackageJson,
}),
...collectDeclaredRootRuntimeDependencyMetadataErrors(rootPackageJson),
...collectBuiltBundledPluginStagedRuntimeDependencyErrors({
bundledPluginsDir: builtPluginsDir,
}),