mirror of https://github.com/openclaw/openclaw.git
fix preserve plugin-sdk web search compatibility
This commit is contained in:
parent
326c660775
commit
e691345774
|
|
@ -1,12 +1,12 @@
|
|||
// Public web-search registration helpers for provider plugins.
|
||||
|
||||
import type { WebSearchProviderPlugin } from "../plugins/types.js";
|
||||
export {
|
||||
createPluginBackedWebSearchProvider,
|
||||
getScopedCredentialValue,
|
||||
getTopLevelCredentialValue,
|
||||
setScopedCredentialValue,
|
||||
setTopLevelCredentialValue,
|
||||
} from "../agents/tools/web-search-plugin-factory.js";
|
||||
} from "../agents/tools/web-search-provider-config.js";
|
||||
export { withTrustedWebToolsEndpoint } from "../agents/tools/web-guarded-fetch.js";
|
||||
export {
|
||||
DEFAULT_CACHE_TTL_MINUTES,
|
||||
|
|
@ -16,3 +16,21 @@ export {
|
|||
resolveCacheTtlMs,
|
||||
writeCache,
|
||||
} from "../agents/tools/web-shared.js";
|
||||
|
||||
/**
|
||||
* @deprecated Implement provider-owned `createTool(...)` directly on the
|
||||
* returned WebSearchProviderPlugin instead of routing through core.
|
||||
*/
|
||||
export function createPluginBackedWebSearchProvider(
|
||||
provider: WebSearchProviderPlugin,
|
||||
): WebSearchProviderPlugin {
|
||||
return {
|
||||
...provider,
|
||||
createTool: () => {
|
||||
throw new Error(
|
||||
`createPluginBackedWebSearchProvider(${provider.id}) is no longer supported. ` +
|
||||
"Define provider-owned createTool(...) directly in the extension's WebSearchProviderPlugin.",
|
||||
);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue