build(plugins): keep qa plugins source-only

This commit is contained in:
Peter Steinberger
2026-05-02 09:19:42 +01:00
parent 5e63e813b7
commit 09239a4622
2 changed files with 13 additions and 5 deletions

View File

@@ -27,11 +27,6 @@
"extensions": [
"./index.ts"
],
"install": {
"npmSpec": "@openclaw/qa-lab",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.10"
},
"compat": {
"pluginApi": ">=2026.4.25"
}

View File

@@ -31,6 +31,7 @@ const DIR_ID_EXCEPTIONS = new Map<string, string>([
// Historical directory name kept until a wider repo cleanup is worth the churn.
["kimi-coding", "kimi"],
]);
const NON_PACKAGED_BUNDLED_PLUGIN_DIRS = new Set(["qa-channel", "qa-lab", "qa-matrix"]);
const ALLOWED_PACKAGE_SUFFIXES = [
"",
"-provider",
@@ -145,6 +146,18 @@ describe("bundled plugin naming guardrails", () => {
`${dirName}: package=${packageName}, npmSpec=${installNpmSpec}`,
),
},
{
name: "keeps non-packaged bundled plugins from advertising npm installs",
message:
"Non-packaged bundled plugins are source-only/private and must not advertise openclaw.install.npmSpec.",
collectMismatches: (records: BundledPluginRecord[]) =>
records
.filter(
({ dirName, installNpmSpec }) =>
NON_PACKAGED_BUNDLED_PLUGIN_DIRS.has(dirName) && typeof installNpmSpec === "string",
)
.map(({ dirName, installNpmSpec }) => `${dirName}: npmSpec=${installNpmSpec}`),
},
{
name: "keeps bundled channel ids aligned with the canonical plugin id",
message: