fix: harden source checkout plugin dependency handling

This commit is contained in:
Peter Steinberger
2026-05-02 02:42:45 +01:00
parent 5bdc901601
commit 04f1fd4d1f
11 changed files with 350 additions and 179 deletions

View File

@@ -8,6 +8,7 @@ import {
} from "../shared/string-coerce.js";
import { resolveUserPath } from "../utils.js";
import { detectBundleManifestFormat, loadBundleManifest } from "./bundle-manifest.js";
import { resolveSourceCheckoutDependencyDiagnostic } from "./bundled-dir.js";
import { resolvePackagedBundledLoadPathAlias } from "./bundled-load-path-aliases.js";
import { listBundledSourceOverlayDirs } from "./bundled-source-overlays.js";
import type { PluginBundleFormat, PluginDiagnostic, PluginFormat } from "./manifest-types.js";
@@ -971,6 +972,14 @@ export function discoverOpenClawPlugins(params: {
"using bind-mounted bundled plugin source overlay; this source overrides the packaged dist bundle for the same plugin id",
});
}
const sourceCheckoutDependencyDiagnostic = resolveSourceCheckoutDependencyDiagnostic(env);
if (sourceCheckoutDependencyDiagnostic) {
result.diagnostics.push({
level: "warn",
source: sourceCheckoutDependencyDiagnostic.source,
message: sourceCheckoutDependencyDiagnostic.message,
});
}
if (roots.stock) {
discoverInDirectory({
dir: roots.stock,