@openclaw/searxng-plugin 2026.9.6 → 2026.9.8
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.
- package/assets/icon.png +0 -0
- package/dist/.setup/{searxng-client-B611pWxB.mjs → searxng-client-FNZHxETE.mjs} +7 -10
- package/dist/.setup/{searxng-search-provider-CqB5Osbj.mjs → searxng-search-provider-ChvQoG8W.mjs} +1 -1
- package/dist/index.js +1 -1
- package/dist/web-search-provider.js +1 -1
- package/package.json +4 -4
package/assets/icon.png
CHANGED
|
Binary file
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ProviderHttpError } from "openclaw/plugin-sdk/provider-http";
|
|
2
2
|
import { DEFAULT_CACHE_TTL_MINUTES, DEFAULT_SEARCH_COUNT, normalizeCacheKey, readCache, readResponseText, resolveCacheTtlMs, resolveSearchCount, resolveSiteName, resolveTimeoutSeconds, withSelfHostedWebSearchEndpoint, withTrustedWebSearchEndpoint, wrapWebContent, writeCache } from "openclaw/plugin-sdk/provider-web-search";
|
|
3
3
|
import { assertHttpUrlTargetsPrivateNetwork, isBlockedHostnameOrIp, isPrivateIpAddress, resolvePinnedHostnameWithPolicy } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
4
|
+
import { asOptionalObjectRecord, asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
5
|
import { normalizeSecretInput } from "openclaw/plugin-sdk/secret-input";
|
|
5
6
|
import { resolveReadOnlyEnvSecretRef } from "openclaw/plugin-sdk/secret-ref-readonly";
|
|
6
|
-
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
//#region extensions/searxng/src/config.ts
|
|
8
8
|
const SEARXNG_BASE_URL_ENV_VAR = "SEARXNG_BASE_URL";
|
|
9
9
|
const SEARXNG_BASE_URL_PATH = "plugins.entries.searxng.config.webSearch.baseUrl";
|
|
@@ -11,8 +11,8 @@ function normalizeBaseUrl(value) {
|
|
|
11
11
|
return normalizeSecretInput(value)?.replace(/\/+$/u, "") || void 0;
|
|
12
12
|
}
|
|
13
13
|
function resolveSearxngWebSearchConfig(config) {
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const pluginConfig = config?.plugins?.entries?.searxng?.config;
|
|
15
|
+
return asOptionalRecord(pluginConfig?.webSearch);
|
|
16
16
|
}
|
|
17
17
|
function resolveSearxngBaseUrl(config) {
|
|
18
18
|
const webSearch = resolveSearxngWebSearchConfig(config);
|
|
@@ -39,9 +39,8 @@ const DEFAULT_TIMEOUT_SECONDS = 20;
|
|
|
39
39
|
const MAX_RESPONSE_BYTES = 1e6;
|
|
40
40
|
const SEARXNG_SEARCH_CACHE = /* @__PURE__ */ new Map();
|
|
41
41
|
function normalizeSearxngResult(value) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
if (typeof candidate.url !== "string" || typeof candidate.title !== "string") return null;
|
|
42
|
+
const candidate = asOptionalObjectRecord(value);
|
|
43
|
+
if (typeof candidate?.url !== "string" || typeof candidate.title !== "string") return null;
|
|
45
44
|
return {
|
|
46
45
|
url: candidate.url,
|
|
47
46
|
title: candidate.title,
|
|
@@ -104,11 +103,9 @@ function parseSearxngResponseText(text, count) {
|
|
|
104
103
|
} catch {
|
|
105
104
|
throw new Error("SearXNG returned invalid JSON.");
|
|
106
105
|
}
|
|
107
|
-
|
|
108
|
-
const response = parsed;
|
|
109
|
-
const rawResults = Array.isArray(response.results) ? response.results : [];
|
|
106
|
+
const rawResults = asOptionalObjectRecord(parsed)?.results;
|
|
110
107
|
const results = [];
|
|
111
|
-
for (const rawResult of rawResults) {
|
|
108
|
+
for (const rawResult of Array.isArray(rawResults) ? rawResults : []) {
|
|
112
109
|
const result = normalizeSearxngResult(rawResult);
|
|
113
110
|
if (result) results.push(result);
|
|
114
111
|
if (results.length >= count) break;
|
package/dist/.setup/{searxng-search-provider-CqB5Osbj.mjs → searxng-search-provider-ChvQoG8W.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-FNZHxETE.mjs"));
|
|
7
7
|
const SearxngSearchSchema = {
|
|
8
8
|
type: "object",
|
|
9
9
|
properties: {
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createSearxngWebSearchProvider } from "./.setup/searxng-search-provider-
|
|
1
|
+
import { t as createSearxngWebSearchProvider } from "./.setup/searxng-search-provider-ChvQoG8W.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 "./.setup/searxng-search-provider-
|
|
1
|
+
import { t as createSearxngWebSearchProvider } from "./.setup/searxng-search-provider-ChvQoG8W.mjs";
|
|
2
2
|
export { createSearxngWebSearchProvider };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/searxng-plugin",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.8",
|
|
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.9.
|
|
18
|
+
"pluginApi": ">=2026.9.8"
|
|
19
19
|
},
|
|
20
20
|
"build": {
|
|
21
|
-
"openclawVersion": "2026.9.
|
|
21
|
+
"openclawVersion": "2026.9.8",
|
|
22
22
|
"bundledDist": false
|
|
23
23
|
},
|
|
24
24
|
"release": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"assets/activity.svg"
|
|
42
42
|
],
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"openclaw": ">=2026.9.
|
|
44
|
+
"openclaw": ">=2026.9.8"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
47
47
|
"openclaw": {
|