diff --git a/packages/core/src/plugin/websearch/exa.ts b/packages/core/src/plugin/websearch/exa.ts index af99fd49c2..7aff04f725 100644 --- a/packages/core/src/plugin/websearch/exa.ts +++ b/packages/core/src/plugin/websearch/exa.ts @@ -30,7 +30,7 @@ export const Plugin = define({ draft.update("exa", (integration) => (integration.name = "Exa")) draft.method.update({ integrationID: "exa", - method: { type: "key", label: "API key (optional)" }, + method: { type: "key" }, }) draft.method.update({ integrationID: "exa", diff --git a/packages/core/src/plugin/websearch/firecrawl.ts b/packages/core/src/plugin/websearch/firecrawl.ts index 77bb298085..d4285b035c 100644 --- a/packages/core/src/plugin/websearch/firecrawl.ts +++ b/packages/core/src/plugin/websearch/firecrawl.ts @@ -41,7 +41,7 @@ export const Plugin = define({ draft.update("firecrawl", (integration) => (integration.name = "Firecrawl")) draft.method.update({ integrationID: "firecrawl", - method: { type: "key", label: "API key (optional)" }, + method: { type: "key" }, }) draft.method.update({ integrationID: "firecrawl", diff --git a/packages/core/src/plugin/websearch/parallel.ts b/packages/core/src/plugin/websearch/parallel.ts index 05379652de..9ed747c47d 100644 --- a/packages/core/src/plugin/websearch/parallel.ts +++ b/packages/core/src/plugin/websearch/parallel.ts @@ -56,7 +56,7 @@ export const Plugin = define({ draft.update("parallel", (integration) => (integration.name = "Parallel")) draft.method.update({ integrationID: "parallel", - method: { type: "key", label: "API key (optional)" }, + method: { type: "key" }, }) draft.method.update({ integrationID: "parallel", diff --git a/packages/core/test/plugin/websearch.test.ts b/packages/core/test/plugin/websearch.test.ts index 9f43a066fe..06cd5e57a9 100644 --- a/packages/core/test/plugin/websearch.test.ts +++ b/packages/core/test/plugin/websearch.test.ts @@ -3,6 +3,7 @@ import { Effect } from "effect" import { Integration } from "@opencode-ai/core/integration" import { WebSearch } from "@opencode-ai/core/websearch" import { WebSearchExa } from "@opencode-ai/core/plugin/websearch/exa" +import { WebSearchFirecrawl } from "@opencode-ai/core/plugin/websearch/firecrawl" import { WebSearchParallel } from "@opencode-ai/core/plugin/websearch/parallel" import { host, integrationHost, webSearchHost } from "./host" import { requests, resetWebSearchFixture, webSearchIntegrationTest } from "./websearch-fixture" @@ -53,6 +54,22 @@ describe("built-in web search providers", () => { }), ) + it.effect("registers Firecrawl with the standard key method", () => + Effect.gen(function* () { + const integrations = yield* Integration.Service + const websearch = yield* WebSearch.Service + yield* WebSearchFirecrawl.Plugin.effect( + host({ integration: integrationHost(integrations), websearch: webSearchHost(websearch) }), + ) + + expect(yield* integrations.get(Integration.ID.make("firecrawl"))).toMatchObject({ + id: "firecrawl", + name: "Firecrawl", + methods: [{ type: "key" }, { type: "env", names: ["FIRECRAWL_API_KEY"] }], + }) + }), + ) + it.effect("registers Exa with its MCP schema", () => Effect.gen(function* () { const integrations = yield* Integration.Service @@ -129,6 +146,9 @@ describe("built-in web search providers", () => { yield* WebSearchParallel.Plugin.effect( host({ integration: integrationHost(integrations), websearch: webSearchHost(websearch) }), ) + expect(yield* integrations.get(Integration.ID.make("parallel"))).toMatchObject({ + methods: [{ type: "key" }, { type: "env", names: ["PARALLEL_API_KEY"] }], + }) yield* integrations.connection.key({ integrationID: Integration.ID.make("parallel"), key: "parallel-secret",