fix(memory): keep llama runtime optional (#71425)

* fix(memory): keep llama runtime optional

* fix(memory): harden optional llama runtime guard
This commit is contained in:
Vincent Koc
2026-04-25 00:09:12 -07:00
committed by GitHub
parent 4005a4f731
commit 9895ecead3
10 changed files with 69 additions and 746 deletions

View File

@@ -519,13 +519,11 @@ describe("collectReleasePackageMetadataErrors", () => {
license: "MIT",
repository: { url: "git+https://github.com/openclaw/openclaw.git" },
bin: { openclaw: "openclaw.mjs" },
peerDependencies: { "node-llama-cpp": "3.18.1" },
peerDependenciesMeta: { "node-llama-cpp": { optional: true } },
}),
).toEqual([]);
});
it("requires node-llama-cpp to stay an optional peer", () => {
it("rejects node-llama-cpp as a peer dependency", () => {
expect(
collectReleasePackageMetadataErrors({
name: "openclaw",
@@ -534,7 +532,39 @@ describe("collectReleasePackageMetadataErrors", () => {
repository: { url: "git+https://github.com/openclaw/openclaw.git" },
bin: { openclaw: "openclaw.mjs" },
peerDependencies: { "node-llama-cpp": "3.18.1" },
peerDependenciesMeta: { "node-llama-cpp": { optional: true } },
}),
).toContain('package.json peerDependenciesMeta["node-llama-cpp"].optional must be true.');
).toEqual([
'package.json peerDependencies["node-llama-cpp"] must be omitted; keep it optional.',
'package.json peerDependenciesMeta["node-llama-cpp"] must be omitted; keep it optional.',
]);
});
it("rejects node-llama-cpp as a direct runtime dependency", () => {
expect(
collectReleasePackageMetadataErrors({
name: "openclaw",
description: "Multi-channel AI gateway with extensible messaging integrations",
license: "MIT",
repository: { url: "git+https://github.com/openclaw/openclaw.git" },
bin: { openclaw: "openclaw.mjs" },
dependencies: { "node-llama-cpp": "3.18.1" },
}),
).toContain('package.json dependencies["node-llama-cpp"] must be omitted; keep it optional.');
});
it("rejects node-llama-cpp as an optional dependency", () => {
expect(
collectReleasePackageMetadataErrors({
name: "openclaw",
description: "Multi-channel AI gateway with extensible messaging integrations",
license: "MIT",
repository: { url: "git+https://github.com/openclaw/openclaw.git" },
bin: { openclaw: "openclaw.mjs" },
optionalDependencies: { "node-llama-cpp": "3.18.1" },
}),
).toContain(
'package.json optionalDependencies["node-llama-cpp"] must be omitted; keep it operator-installed.',
);
});
});