fix(test): align plugin gauntlet with built runtime

This commit is contained in:
Vincent Koc
2026-05-03 13:17:14 -07:00
parent b726214cf3
commit 53cc52981b
4 changed files with 82 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
import fs from "node:fs";
import path from "node:path";
import JSON5 from "json5";
import { collectBundledPluginBuildEntries } from "./bundled-plugin-build-entries.mjs";
const MANIFEST_NAMES = ["openclaw.plugin.json", "openclaw.plugin.json5"];
@@ -142,9 +143,13 @@ function buildPluginMatrixEntry(params) {
function discoverBundledPluginManifests(repoRoot) {
const extensionsDir = path.join(repoRoot, "extensions");
const buildEntryDirs = new Set(
collectBundledPluginBuildEntries({ cwd: repoRoot }).map((entry) => entry.id),
);
const entries = fs
.readdirSync(extensionsDir, { withFileTypes: true })
.filter((entry) => entry.isDirectory())
.filter((entry) => buildEntryDirs.has(entry.name))
.flatMap((entry) => {
const pluginDir = path.join(extensionsDir, entry.name);
const manifestName = MANIFEST_NAMES.find((name) => fs.existsSync(path.join(pluginDir, name)));