fix(skills): restore legacy skill metadata fallback (#71346)

This commit is contained in:
Peter Steinberger
2026-04-25 03:30:19 +01:00
parent bb5f523068
commit 996e9226e5
4 changed files with 27 additions and 0 deletions

View File

@@ -67,6 +67,7 @@ Docs: https://docs.openclaw.ai
- Dashboard/Windows: open Control UI and OAuth URLs through the system URL handler without `cmd.exe` parsing or PATH-based `rundll32` lookup, and reject non-HTTP browser-open inputs. Fixes #71098. Thanks @Sanjays2402.
- Providers/OpenAI: separate API-key and Codex sign-in onboarding groups, and avoid replaying stale OpenAI Responses reasoning blocks after a model route switch.
- Skills: honor legacy `metadata.clawdbot` requirements and installer hints when `metadata.openclaw` is absent, so older skills no longer appear ready when required binaries are missing. Fixes #71323. Thanks @chen-zhang-cs-code.
- Browser/config: expand `~` in `browser.executablePath` before Chromium launch, so home-relative custom browser paths no longer fail with `ENOENT`. Fixes #67264. Thanks @Quratulain-bilal.
- Telegram/streaming: hide tool-progress status updates by default while keeping explicit `streaming.preview.toolProgress` opt-in support for edited preview messages. Fixes #71320. Thanks @neeravmakwana.
- Gateway/sessions: copy the oversized `sessions.json` to a rotation backup before the atomic rewrite instead of renaming the live store away, so a crash during rotation keeps the existing session-to-transcript mapping authoritative. Fixes #68229. Thanks @jjjojoj.

View File

@@ -203,6 +203,11 @@ Fields under `metadata.openclaw`:
- `primaryEnv` — env var name associated with `skills.entries.<name>.apiKey`.
- `install` — optional array of installer specs used by the macOS Skills UI (brew/node/go/uv/download).
Legacy `metadata.clawdbot` blocks are still accepted when
`metadata.openclaw` is absent, so older installed skills keep their dependency
gates and installer hints. New and updated skills should use
`metadata.openclaw`.
Note on sandboxing:
- `requires.bins` is checked on the **host** at skill load time.

View File

@@ -0,0 +1,10 @@
import { describe, expect, it } from "vitest";
import { LEGACY_MANIFEST_KEYS, MANIFEST_KEY, PROJECT_NAME } from "./legacy-names.js";
describe("compat/legacy-names", () => {
it("keeps the current manifest key primary while exposing legacy fallbacks", () => {
expect(PROJECT_NAME).toBe("openclaw");
expect(MANIFEST_KEY).toBe("openclaw");
expect(LEGACY_MANIFEST_KEYS).toEqual(["clawdbot"]);
});
});

View File

@@ -59,6 +59,17 @@ describe("shared/frontmatter", () => {
).toEqual({ requires: { bins: ["op"] }, install: [] });
});
test("resolveOpenClawManifestBlock prefers current manifest keys over legacy keys", () => {
expect(
resolveOpenClawManifestBlock({
frontmatter: {
metadata:
"{ openclaw: { requires: { bins: ['current'] } }, clawdbot: { requires: { bins: ['legacy'] } } }",
},
}),
).toEqual({ requires: { bins: ["current"] } });
});
test("resolveOpenClawManifestBlock returns undefined for invalid input", () => {
expect(resolveOpenClawManifestBlock({ frontmatter: {} })).toBeUndefined();
expect(