@openclaw/searxng-plugin 2026.7.2-beta.7 → 2026.7.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -57,8 +57,7 @@ function normalizeSearxngResult(value) {
|
|
|
57
57
|
}
|
|
58
58
|
function buildSearxngSearchUrl(params) {
|
|
59
59
|
const url = new URL(params.baseUrl);
|
|
60
|
-
|
|
61
|
-
url.pathname = basePathname.endsWith("/search") ? basePathname : `${basePathname}/search`;
|
|
60
|
+
url.pathname = url.pathname.endsWith("/") ? `${url.pathname}search` : `${url.pathname}/search`;
|
|
62
61
|
url.search = "";
|
|
63
62
|
url.searchParams.set("q", params.query);
|
|
64
63
|
url.searchParams.set("format", "json");
|
|
@@ -131,7 +130,6 @@ async function fetchSearxngResults(params) {
|
|
|
131
130
|
return await (params.endpointMode === "selfHosted" ? withSelfHostedWebSearchEndpoint : withTrustedWebSearchEndpoint)({
|
|
132
131
|
url,
|
|
133
132
|
timeoutSeconds: params.timeoutSeconds,
|
|
134
|
-
signal: params.signal,
|
|
135
133
|
init: {
|
|
136
134
|
method: "GET",
|
|
137
135
|
headers: { Accept: "application/json" }
|
|
@@ -147,7 +145,6 @@ async function fetchSearxngResults(params) {
|
|
|
147
145
|
});
|
|
148
146
|
}
|
|
149
147
|
async function runSearxngSearch(params) {
|
|
150
|
-
params.signal?.throwIfAborted();
|
|
151
148
|
const count = resolveSearchCount(params.count, DEFAULT_SEARCH_COUNT);
|
|
152
149
|
const categories = params.categories ?? resolveSearxngCategories(params.config);
|
|
153
150
|
const language = params.language ?? resolveSearxngLanguage(params.config);
|
|
@@ -156,7 +153,6 @@ async function runSearxngSearch(params) {
|
|
|
156
153
|
const cacheTtlMs = resolveCacheTtlMs(params.cacheTtlMinutes, DEFAULT_CACHE_TTL_MINUTES);
|
|
157
154
|
if (!baseUrl) throw new Error("SearXNG base URL is not configured. Set SEARXNG_BASE_URL or configure plugins.entries.searxng.config.webSearch.baseUrl.");
|
|
158
155
|
const endpointMode = await validateSearxngBaseUrl(baseUrl);
|
|
159
|
-
params.signal?.throwIfAborted();
|
|
160
156
|
const cacheKey = normalizeCacheKey(JSON.stringify({
|
|
161
157
|
provider: "searxng",
|
|
162
158
|
query: params.query,
|
|
@@ -178,23 +174,17 @@ async function runSearxngSearch(params) {
|
|
|
178
174
|
language,
|
|
179
175
|
timeoutSeconds,
|
|
180
176
|
count,
|
|
181
|
-
endpointMode
|
|
182
|
-
|
|
177
|
+
endpointMode
|
|
178
|
+
});
|
|
179
|
+
if (results.length === 0 && shouldRetryEmptyCategorySearchWithGeneral(categories)) results = await fetchSearxngResults({
|
|
180
|
+
baseUrl,
|
|
181
|
+
query: params.query,
|
|
182
|
+
categories: "general",
|
|
183
|
+
language,
|
|
184
|
+
timeoutSeconds,
|
|
185
|
+
count,
|
|
186
|
+
endpointMode
|
|
183
187
|
});
|
|
184
|
-
params.signal?.throwIfAborted();
|
|
185
|
-
if (results.length === 0 && shouldRetryEmptyCategorySearchWithGeneral(categories)) {
|
|
186
|
-
results = await fetchSearxngResults({
|
|
187
|
-
baseUrl,
|
|
188
|
-
query: params.query,
|
|
189
|
-
categories: "general",
|
|
190
|
-
language,
|
|
191
|
-
timeoutSeconds,
|
|
192
|
-
count,
|
|
193
|
-
endpointMode,
|
|
194
|
-
signal: params.signal
|
|
195
|
-
});
|
|
196
|
-
params.signal?.throwIfAborted();
|
|
197
|
-
}
|
|
198
188
|
const payload = {
|
|
199
189
|
query: params.query,
|
|
200
190
|
provider: "searxng",
|
package/dist/{searxng-search-provider-B47sPRhS.js → .setup/searxng-search-provider-79wmEWLI.mjs}
RENAMED
|
@@ -3,7 +3,7 @@ import { readPositiveIntegerParam, readStringParam } from "openclaw/plugin-sdk/p
|
|
|
3
3
|
import { createWebSearchProviderContractFields } from "openclaw/plugin-sdk/provider-web-search-contract";
|
|
4
4
|
//#region extensions/searxng/src/searxng-search-provider.ts
|
|
5
5
|
const SEARXNG_CREDENTIAL_PATH = "plugins.entries.searxng.config.webSearch.baseUrl";
|
|
6
|
-
const loadSearxngClientModule = createLazyRuntimeModule(() => import("./searxng-client-
|
|
6
|
+
const loadSearxngClientModule = createLazyRuntimeModule(() => import("./searxng-client-BE684iP6.mjs"));
|
|
7
7
|
const SearxngSearchSchema = {
|
|
8
8
|
type: "object",
|
|
9
9
|
properties: {
|
|
@@ -57,7 +57,7 @@ function createSearxngWebSearchProvider() {
|
|
|
57
57
|
createTool: (ctx) => ({
|
|
58
58
|
description: "Search the web using a self-hosted SearXNG instance. Returns titles, URLs, and snippets.",
|
|
59
59
|
parameters: SearxngSearchSchema,
|
|
60
|
-
execute: async (args
|
|
60
|
+
execute: async (args) => {
|
|
61
61
|
const { runSearxngSearch } = await loadSearxngClientModule();
|
|
62
62
|
return await runSearxngSearch({
|
|
63
63
|
config: ctx.config,
|
|
@@ -67,8 +67,7 @@ function createSearxngWebSearchProvider() {
|
|
|
67
67
|
message: "count must be an integer from 1 to 10."
|
|
68
68
|
}),
|
|
69
69
|
categories: readStringParam(args, "categories"),
|
|
70
|
-
language: readStringParam(args, "language")
|
|
71
|
-
signal: context?.signal
|
|
70
|
+
language: readStringParam(args, "language")
|
|
72
71
|
});
|
|
73
72
|
}
|
|
74
73
|
})
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createSearxngWebSearchProvider } from "
|
|
1
|
+
import { t as createSearxngWebSearchProvider } from "./.setup/searxng-search-provider-79wmEWLI.mjs";
|
|
2
2
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
3
3
|
//#region extensions/searxng/index.ts
|
|
4
4
|
var searxng_default = definePluginEntry({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createSearxngWebSearchProvider } from "
|
|
1
|
+
import { t as createSearxngWebSearchProvider } from "./.setup/searxng-search-provider-79wmEWLI.mjs";
|
|
2
2
|
export { createSearxngWebSearchProvider };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/searxng-plugin",
|
|
3
|
-
"version": "2026.7.
|
|
3
|
+
"version": "2026.7.33",
|
|
4
4
|
"description": "OpenClaw SearXNG plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"openclaw": {
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"allowInvalidConfigRecovery": true
|
|
16
16
|
},
|
|
17
17
|
"compat": {
|
|
18
|
-
"pluginApi": ">=2026.7.
|
|
18
|
+
"pluginApi": ">=2026.7.33"
|
|
19
19
|
},
|
|
20
20
|
"build": {
|
|
21
|
-
"openclawVersion": "2026.7.
|
|
21
|
+
"openclawVersion": "2026.7.33",
|
|
22
22
|
"bundledDist": false
|
|
23
23
|
},
|
|
24
24
|
"release": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"README.md"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"openclaw": ">=2026.7.
|
|
42
|
+
"openclaw": ">=2026.7.33"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"openclaw": {
|