mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:10:44 +00:00
fix: stabilize release validation
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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]) {
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user