mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
fix: register google vertex setup provider
This commit is contained in:
21
extensions/google/setup-api.test.ts
Normal file
21
extensions/google/setup-api.test.ts
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import { describe, expect, it } from "vitest";
|
||||||
|
import setupEntry from "./setup-api.js";
|
||||||
|
|
||||||
|
describe("google setup entry", () => {
|
||||||
|
it("registers setup runtime providers declared by the manifest", () => {
|
||||||
|
const providerIds: string[] = [];
|
||||||
|
const cliBackendIds: string[] = [];
|
||||||
|
|
||||||
|
setupEntry.register({
|
||||||
|
registerProvider(provider) {
|
||||||
|
providerIds.push(provider.id);
|
||||||
|
},
|
||||||
|
registerCliBackend(backend) {
|
||||||
|
cliBackendIds.push(backend.id);
|
||||||
|
},
|
||||||
|
} as never);
|
||||||
|
|
||||||
|
expect(providerIds).toContain("google-vertex");
|
||||||
|
expect(cliBackendIds).toContain("google-gemini-cli");
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
||||||
import { buildGoogleGeminiCliBackend } from "./cli-backend.js";
|
import { buildGoogleGeminiCliBackend } from "./cli-backend.js";
|
||||||
|
import { createGoogleVertexProvider } from "./provider-contract-api.js";
|
||||||
|
|
||||||
export default definePluginEntry({
|
export default definePluginEntry({
|
||||||
id: "google",
|
id: "google",
|
||||||
name: "Google Setup",
|
name: "Google Setup",
|
||||||
description: "Lightweight Google setup hooks",
|
description: "Lightweight Google setup hooks",
|
||||||
register(api) {
|
register(api) {
|
||||||
|
api.registerProvider(createGoogleVertexProvider());
|
||||||
api.registerCliBackend(buildGoogleGeminiCliBackend());
|
api.registerCliBackend(buildGoogleGeminiCliBackend());
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user