mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 20:10:42 +00:00
feat(plugins): warn on ignored setup runtime (#71253)
* feat(plugins): warn on ignored setup runtime * fix(plugins): avoid fallback setup runtime diagnostics * refactor(plugins): clarify setup runtime lookup
This commit is contained in:
@@ -373,6 +373,42 @@ describe("setup-registry getJiti", () => {
|
||||
|
||||
expect(resolvePluginSetupProvider({ provider: "openai", env: {} })).toBeUndefined();
|
||||
expect(resolvePluginSetupCliBackend({ backend: "codex-cli", env: {} })).toBeUndefined();
|
||||
expect(resolvePluginSetupRegistry({ env: {} })).toEqual({
|
||||
providers: [],
|
||||
cliBackends: [],
|
||||
configMigrations: [],
|
||||
autoEnableProbes: [],
|
||||
diagnostics: [
|
||||
expect.objectContaining({
|
||||
pluginId: "openai",
|
||||
code: "setup-descriptor-runtime-disabled",
|
||||
}),
|
||||
],
|
||||
});
|
||||
expect(mocks.createJiti).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("does not report descriptor-only diagnostics for bundled setup-api fallback paths", () => {
|
||||
const parentDir = makeTempDir();
|
||||
const pluginRoot = path.join(parentDir, "openai");
|
||||
fs.mkdirSync(pluginRoot);
|
||||
expect(fs.existsSync(path.join(process.cwd(), "extensions", "openai", "setup-api.ts"))).toBe(
|
||||
true,
|
||||
);
|
||||
mocks.loadPluginManifestRegistry.mockReturnValue({
|
||||
plugins: [
|
||||
{
|
||||
id: "workspace-openai",
|
||||
rootDir: pluginRoot,
|
||||
setup: {
|
||||
providers: [{ id: "workspace-openai" }],
|
||||
requiresRuntime: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
diagnostics: [],
|
||||
});
|
||||
|
||||
expect(resolvePluginSetupRegistry({ env: {} })).toEqual({
|
||||
providers: [],
|
||||
cliBackends: [],
|
||||
|
||||
Reference in New Issue
Block a user