mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-15 11:11:09 +00:00
fix(plugin-sdk): add web-search contract subpath
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
08615a28ed3deb20a96c9cd8fd7237a4cbb209ceec93dca03b543979304459e4 plugin-sdk-api-baseline.json
|
||||
683c1249dc15529d8e79bc75e9c00484551cb74126befee507fffcf786e01833 plugin-sdk-api-baseline.jsonl
|
||||
1aafbd4e24b950c3386f5f1641e498a0060590ea6279ec5628ef0c9d62a62169 plugin-sdk-api-baseline.json
|
||||
479743ab748836a98e53797328d1831d6698ceff513a52a2dbb47a3ec183a085 plugin-sdk-api-baseline.jsonl
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
getScopedCredentialValue,
|
||||
setScopedCredentialValue,
|
||||
type WebSearchProviderPlugin,
|
||||
} from "openclaw/plugin-sdk/provider-web-search";
|
||||
} from "openclaw/plugin-sdk/provider-web-search-contract";
|
||||
|
||||
export function createDuckDuckGoWebSearchProvider(): WebSearchProviderPlugin {
|
||||
return {
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
setProviderWebSearchPluginConfigValue,
|
||||
setScopedCredentialValue,
|
||||
type WebSearchProviderPlugin,
|
||||
} from "openclaw/plugin-sdk/provider-web-search";
|
||||
} from "openclaw/plugin-sdk/provider-web-search-contract";
|
||||
|
||||
export function createFirecrawlWebSearchProvider(): WebSearchProviderPlugin {
|
||||
return {
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
setProviderWebSearchPluginConfigValue,
|
||||
setScopedCredentialValue,
|
||||
type WebSearchProviderPlugin,
|
||||
} from "openclaw/plugin-sdk/provider-web-search";
|
||||
} from "openclaw/plugin-sdk/provider-web-search-contract";
|
||||
|
||||
export function createGeminiWebSearchProvider(): WebSearchProviderPlugin {
|
||||
return {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
enablePluginInConfig,
|
||||
type WebSearchProviderPlugin,
|
||||
} from "openclaw/plugin-sdk/provider-web-search";
|
||||
} from "openclaw/plugin-sdk/provider-web-search-contract";
|
||||
|
||||
export function createOllamaWebSearchProvider(): WebSearchProviderPlugin {
|
||||
return {
|
||||
|
||||
@@ -896,6 +896,10 @@
|
||||
"types": "./dist/plugin-sdk/provider-web-fetch.d.ts",
|
||||
"default": "./dist/plugin-sdk/provider-web-fetch.js"
|
||||
},
|
||||
"./plugin-sdk/provider-web-search-contract": {
|
||||
"types": "./dist/plugin-sdk/provider-web-search-contract.d.ts",
|
||||
"default": "./dist/plugin-sdk/provider-web-search-contract.js"
|
||||
},
|
||||
"./plugin-sdk/provider-web-search": {
|
||||
"types": "./dist/plugin-sdk/provider-web-search.d.ts",
|
||||
"default": "./dist/plugin-sdk/provider-web-search.js"
|
||||
|
||||
@@ -213,6 +213,7 @@
|
||||
"provider-tools",
|
||||
"provider-usage",
|
||||
"provider-web-fetch",
|
||||
"provider-web-search-contract",
|
||||
"provider-web-search",
|
||||
"retry-runtime",
|
||||
"run-command",
|
||||
|
||||
12
src/plugin-sdk/provider-web-search-contract.ts
Normal file
12
src/plugin-sdk/provider-web-search-contract.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// Narrow shared exports for web-search contract surfaces.
|
||||
|
||||
import type { WebSearchProviderPlugin } from "../plugins/types.js";
|
||||
|
||||
export {
|
||||
getScopedCredentialValue,
|
||||
resolveProviderWebSearchPluginConfig,
|
||||
setScopedCredentialValue,
|
||||
setProviderWebSearchPluginConfigValue,
|
||||
} from "../agents/tools/web-search-provider-config.js";
|
||||
export { enablePluginInConfig } from "../plugins/enable.js";
|
||||
export type { WebSearchProviderPlugin };
|
||||
@@ -328,6 +328,22 @@ describe("plugin-sdk subpath exports", () => {
|
||||
"safeMatchRegex",
|
||||
],
|
||||
});
|
||||
expectSourceContract("provider-web-search-contract", {
|
||||
mentions: [
|
||||
"enablePluginInConfig",
|
||||
"getScopedCredentialValue",
|
||||
"resolveProviderWebSearchPluginConfig",
|
||||
"setScopedCredentialValue",
|
||||
"setProviderWebSearchPluginConfigValue",
|
||||
"WebSearchProviderPlugin",
|
||||
],
|
||||
omits: [
|
||||
"buildSearchCacheKey",
|
||||
"withTrustedWebSearchEndpoint",
|
||||
"writeCachedSearchPayload",
|
||||
"resolveCitationRedirectUrl",
|
||||
],
|
||||
});
|
||||
expectSourceMentions("compat", [
|
||||
"createPluginRuntimeStore",
|
||||
"createScopedChannelConfigAdapter",
|
||||
|
||||
Reference in New Issue
Block a user