fix(plugin): preserve sdk alias fallback for native loads

This commit is contained in:
Vincent Koc
2026-05-03 23:24:57 -07:00
parent 6e8cdd7d59
commit baecb6b4d6
6 changed files with 33 additions and 12 deletions

View File

@@ -1037,7 +1037,8 @@ describe("loadOpenClawPlugins", () => {
},
});
expect(registry.plugins.find((entry) => entry.id === "discord")?.status).toBe("loaded");
const record = registry.plugins.find((entry) => entry.id === "discord");
expect(record?.status, record?.error).toBe("loaded");
});
it("registers standalone text transforms", () => {
useNoBundledPlugins();
@@ -6591,7 +6592,7 @@ module.exports = {
}),
);
const record = registry.plugins.find((entry) => entry.id === "legacy-root-import");
expect(record?.status).toBe("loaded");
expect(record?.status, record?.error).toBe("loaded");
});
it("supports legacy plugins subscribing to diagnostic events from the root sdk", async () => {
@@ -6639,7 +6640,7 @@ module.exports = {
const record = registry.plugins.find(
(entry) => entry.id === "legacy-root-diagnostic-listener",
);
expect(record?.status).toBe("loaded");
expect(record?.status, record?.error).toBe("loaded");
emitDiagnosticEvent({
type: "model.usage",