refactor: simplify plugin dependency handling

Simplify plugin installation and runtime loading around package-manager-owned dependencies, with Jiti reserved for local/TS fallback paths.

Also scans npm plugin install roots so hoisted transitive dependencies are covered by dependency denylist and node_modules symlink checks.
This commit is contained in:
Peter Steinberger
2026-05-01 21:32:22 +01:00
committed by GitHub
parent 2e8e9cd6ca
commit ed8f50f240
294 changed files with 2562 additions and 25454 deletions

View File

@@ -40,7 +40,7 @@ ${this.input.guestNode} ${this.input.guestOpenClawEntry} config set channels.dis
${this.input.guestNode} ${this.input.guestOpenClawEntry} config set channels.discord.enabled true
${this.input.guestNode} ${this.input.guestOpenClawEntry} config set channels.discord.groupPolicy allowlist
${this.input.guestNode} ${this.input.guestOpenClawEntry} config set channels.discord.guilds ${shellQuote(guilds)} --strict-json
${this.input.guestNode} ${this.input.guestOpenClawEntry} plugins deps --repair
${this.input.guestNode} ${this.input.guestOpenClawEntry} doctor --fix --yes --non-interactive
${this.input.guestNode} ${this.input.guestOpenClawEntry} gateway restart
${this.input.guestNode} ${this.input.guestOpenClawEntry} channels status --probe --json`);
}

View File

@@ -324,7 +324,6 @@ class MacosSmoke {
destination: this.tgzDir,
packageSpec: this.options.targetPackageSpec,
requireControlUi: true,
stageRuntimeDeps: !this.options.targetPackageSpec,
});
if (this.options.targetPackageSpec) {
this.targetExpectVersion =

View File

@@ -285,7 +285,6 @@ class NpmUpdateSmoke {
this.artifact = await packOpenClaw({
destination: this.tgzDir,
requireControlUi: true,
stageRuntimeDeps: true,
});
this.server = await startHostServer({
artifactPath: this.artifact.path,

View File

@@ -86,7 +86,6 @@ export async function packOpenClaw(input: {
destination: string;
packageSpec?: string;
requireControlUi?: boolean;
stageRuntimeDeps?: boolean;
}): Promise<PackageArtifact> {
await mkdir(input.destination, { recursive: true });
if (input.packageSpec) {
@@ -126,9 +125,6 @@ export async function packOpenClaw(input: {
"--eval",
"import { writePackageDistInventory } from './src/infra/package-dist-inventory.ts'; await writePackageDistInventory(process.cwd());",
]);
if (input.stageRuntimeDeps) {
run("node", ["scripts/stage-bundled-plugin-runtime-deps.mjs"]);
}
const shortHead = run("git", ["rev-parse", "--short", "HEAD"], { quiet: true }).stdout.trim();
const output = run(
"npm",