fix: stabilize release validation

This commit is contained in:
Peter Steinberger
2026-05-02 07:10:33 +01:00
parent 71da5af164
commit bf6a02c6da
7 changed files with 107 additions and 25 deletions

View File

@@ -109,12 +109,14 @@ function buildPluginPlan(manifest) {
? contracts.speechProviders.filter(isNonEmptyString)
: [];
const tools = Array.isArray(contracts.tools) ? contracts.tools.filter(isNonEmptyString) : [];
const toolMetadata =
manifest.toolMetadata && typeof manifest.toolMetadata === "object" ? manifest.toolMetadata : {};
const activeInThisProbe =
manifest.activation?.onStartup === true || channels.length > 0 || speechProviders.length > 0;
return {
channels,
speechProviders,
tools,
tools: tools.filter((tool) => !toolMetadata[tool]),
activeInThisProbe,
runtimeSlashAliases: commandAliases
.filter((alias) => alias?.kind === "runtime-slash")

View File

@@ -1,8 +1,8 @@
import path from "node:path";
import { requireArg, write, writeJson } from "./common.mjs";
function writePluginManifest(file, id) {
writeJson(file, { id, configSchema: { type: "object", properties: {} } });
function writePluginManifest(file, id, extra = {}) {
writeJson(file, { id, ...extra, configSchema: { type: "object", properties: {} } });
}
function writeFakeIsNumberPackage(dir) {
@@ -19,7 +19,9 @@ function writePluginDemo([dir]) {
path.join(requireArg(dir, "dir"), "index.js"),
'module.exports = { id: "demo-plugin", name: "Demo Plugin", description: "Docker E2E demo plugin", register(api) { api.registerTool(() => null, { name: "demo_tool" }); api.registerGatewayMethod("demo.ping", async () => ({ ok: true })); api.registerCli(() => {}, { commands: ["demo"] }); api.registerService({ id: "demo-service", start: () => {} }); }, };\n',
);
writePluginManifest(path.join(dir, "openclaw.plugin.json"), "demo-plugin");
writePluginManifest(path.join(dir, "openclaw.plugin.json"), "demo-plugin", {
contracts: { tools: ["demo_tool"] },
});
}
function writePlugin([dir, id, version, method, name]) {

View File

@@ -152,6 +152,7 @@ function assertExpectedDiagnostics(surfaceMode, errorMessages) {
'channel "kitchen-sink-channel-probe" registration missing required config helpers',
"cli registration missing explicit commands metadata",
"only bundled plugins can register Codex app-server extension factories",
"only bundled plugins can register agent tool result middleware",
'compaction provider "kitchen-sink-compaction-provider" registration missing summarize',
"context engine registration missing id",
"http route registration missing or invalid auth: /kitchen-sink/http-route",