Compare commits

..
Author SHA1 Message Date
Peter Steinberger 1b96de5012 Merge branch 'main' into redesign/plugins-page 2026-03-23 03:42:52 -07:00
ImLukeF f44beaa3ab feat: redesign plugins page and skills list view
Redesigned the plugins page with a cleaner toolbar (pill search,
toggle filter buttons) and simplified card layout. Added a proper
table-style list view for skills with skill name, version, summary,
and author avatar columns. Also polished the sort dropdown with a
chevron indicator, added card shadows for better separation, and
tightened up the theme toggle and sign-in button.
2026-03-23 20:41:35 +11:00
2 changed files with 33 additions and 45 deletions
+22 -45
View File
@@ -46,7 +46,6 @@ describe("packageRegistry", () => {
expect(result.runtimeId).toBe("demo.plugin");
expect(result.compatibility?.pluginApiRange).toBe("^1.2.0");
expect(result.compatibility?.minGatewayVersion).toBe("2026.3.0");
expect(result.capabilities.executesCode).toBe(true);
expect(result.capabilities.toolNames).toContain("demoTool");
expect(result.verification.tier).toBe("source-linked");
@@ -71,60 +70,38 @@ describe("packageRegistry", () => {
).toThrow("source repo and commit");
});
it("maps legacy minHostVersion to minGatewayVersion instead of pluginApiRange", () => {
expect(() =>
extractCodePluginArtifacts({
packageName: "@openclaw/matrix",
packageJson: {
name: "@openclaw/matrix",
version: "2026.3.13",
openclaw: {
extensions: ["./index.ts"],
install: {
npmSpec: "@openclaw/matrix",
localPath: "extensions/matrix",
defaultChoice: "npm",
minHostVersion: "2026.3.13",
},
},
},
pluginManifest: {
id: "matrix",
channels: ["matrix"],
configSchema: { type: "object" },
},
source: {
kind: "github",
url: "https://github.com/openclaw/openclaw",
repo: "openclaw/openclaw",
ref: "refs/tags/v2026.3.13",
commit: "abc123",
path: "extensions/matrix",
importedAt: Date.now(),
},
}),
).toThrow("package.json openclaw.compat.pluginApi is required");
});
it("extracts legacy minHostVersion as minGatewayVersion while preserving build metadata", () => {
const result = extractBundlePluginArtifacts({
packageName: "@openclaw/matrix-bundle",
it("infers compatibility for legacy openclaw extension manifests", () => {
const result = extractCodePluginArtifacts({
packageName: "@openclaw/matrix",
packageJson: {
name: "@openclaw/matrix-bundle",
name: "@openclaw/matrix",
version: "2026.3.13",
openclaw: {
extensions: ["./index.ts"],
install: {
minHostVersion: "2026.3.13",
npmSpec: "@openclaw/matrix",
localPath: "extensions/matrix",
defaultChoice: "npm",
},
},
},
bundleManifest: {
hostTargets: ["openclaw"],
pluginManifest: {
id: "matrix",
channels: ["matrix"],
configSchema: { type: "object" },
},
source: {
kind: "github",
url: "https://github.com/openclaw/openclaw",
repo: "openclaw/openclaw",
ref: "refs/tags/v2026.3.13",
commit: "abc123",
path: "extensions/matrix",
importedAt: Date.now(),
},
});
expect(result.compatibility?.pluginApiRange).toBeUndefined();
expect(result.compatibility?.minGatewayVersion).toBe("2026.3.13");
expect(result.compatibility?.pluginApiRange).toBe(">=2026.3.13");
expect(result.compatibility?.builtWithOpenClawVersion).toBe("2026.3.13");
});
+11
View File
@@ -178,13 +178,24 @@ function extractOpenClawBlock(packageJson: JsonRecord | undefined) {
function extractCompatibility(packageJson: JsonRecord | undefined): PackageCompatibility | undefined {
const { openclaw, compat, build } = extractOpenClawBlock(packageJson);
const install = isRecord(openclaw?.install) ? openclaw.install : undefined;
const peerDependencies = isRecord(packageJson?.peerDependencies)
? packageJson.peerDependencies
: undefined;
const version =
typeof packageJson?.version === "string" ? packageJson.version.trim() : undefined;
const peerOpenClaw =
typeof peerDependencies?.openclaw === "string" ? peerDependencies.openclaw.trim() : undefined;
const minHostVersion =
typeof install?.minHostVersion === "string" ? install.minHostVersion.trim() : undefined;
const compatibility: PackageCompatibility = {};
if (typeof compat?.pluginApi === "string") {
compatibility.pluginApiRange = compat.pluginApi.trim();
} else if (peerOpenClaw) {
compatibility.pluginApiRange = peerOpenClaw;
} else if (minHostVersion) {
compatibility.pluginApiRange = minHostVersion;
} else if (version) {
compatibility.pluginApiRange = `>=${version}`;
}
if (typeof compat?.minGatewayVersion === "string") {
compatibility.minGatewayVersion = compat.minGatewayVersion.trim();