@openclaw/searxng-plugin 2026.7.2-beta.7 → 2026.8.1-beta.3

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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createSearxngWebSearchProvider } from "./searxng-search-provider-B47sPRhS.js";
1
+ import { t as createSearxngWebSearchProvider } from "./searxng-search-provider-DRnBkbzG.js";
2
2
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
3
3
  //#region extensions/searxng/index.ts
4
4
  var searxng_default = definePluginEntry({
@@ -1,43 +1,35 @@
1
1
  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";
2
2
  import { assertHttpUrlTargetsPrivateNetwork, isBlockedHostnameOrIp, isPrivateIpAddress, resolvePinnedHostnameWithPolicy } from "openclaw/plugin-sdk/ssrf-runtime";
3
- import { normalizeResolvedSecretInputString, normalizeSecretInput } from "openclaw/plugin-sdk/secret-input";
3
+ import { normalizeSecretInput } from "openclaw/plugin-sdk/secret-input";
4
+ import { resolveReadOnlyEnvSecretRef } from "openclaw/plugin-sdk/secret-ref-readonly";
5
+ import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
6
  //#region extensions/searxng/src/config.ts
5
- function normalizeConfiguredString(value, path) {
6
- try {
7
- return normalizeSecretInput(normalizeResolvedSecretInputString({
8
- value,
9
- path
10
- }));
11
- } catch {
12
- return;
13
- }
14
- }
15
- function readInlineEnvSecretRefValue(value, env) {
16
- if (!value || typeof value !== "object" || Array.isArray(value)) return;
17
- const record = value;
18
- if (record.source !== "env" || typeof record.id !== "string") return;
19
- return normalizeSecretInput(env[record.id]);
20
- }
21
- function normalizeTrimmedString(value) {
22
- if (typeof value !== "string") return;
23
- return value.trim() || void 0;
24
- }
7
+ const SEARXNG_BASE_URL_ENV_VAR = "SEARXNG_BASE_URL";
8
+ const SEARXNG_BASE_URL_PATH = "plugins.entries.searxng.config.webSearch.baseUrl";
25
9
  function normalizeBaseUrl(value) {
26
- return value?.replace(/\/+$/u, "") || void 0;
10
+ return normalizeSecretInput(value)?.replace(/\/+$/u, "") || void 0;
27
11
  }
28
12
  function resolveSearxngWebSearchConfig(config) {
29
13
  const webSearch = (config?.plugins?.entries?.searxng?.config)?.webSearch;
30
14
  if (webSearch && typeof webSearch === "object" && !Array.isArray(webSearch)) return webSearch;
31
15
  }
32
- function resolveSearxngBaseUrl(config, env = process.env) {
33
- const webSearch = resolveSearxngWebSearchConfig(config);
34
- return normalizeBaseUrl(normalizeConfiguredString(webSearch?.baseUrl, "plugins.entries.searxng.config.webSearch.baseUrl")) ?? normalizeBaseUrl(readInlineEnvSecretRefValue(webSearch?.baseUrl, env)) ?? normalizeBaseUrl(normalizeSecretInput(env.SEARXNG_BASE_URL));
16
+ function resolveSearxngBaseUrl(config) {
17
+ const resolved = resolveReadOnlyEnvSecretRef({
18
+ value: resolveSearxngWebSearchConfig(config)?.baseUrl,
19
+ path: SEARXNG_BASE_URL_PATH,
20
+ cfg: config,
21
+ expectedEnvId: SEARXNG_BASE_URL_ENV_VAR,
22
+ normalizeValue: normalizeBaseUrl
23
+ });
24
+ if (resolved.status === "available") return resolved.value;
25
+ if (resolved.status === "blocked") return;
26
+ return normalizeBaseUrl(process.env[SEARXNG_BASE_URL_ENV_VAR]);
35
27
  }
36
28
  function resolveSearxngCategories(config) {
37
- return normalizeTrimmedString(resolveSearxngWebSearchConfig(config)?.categories);
29
+ return normalizeOptionalString(resolveSearxngWebSearchConfig(config)?.categories);
38
30
  }
39
31
  function resolveSearxngLanguage(config) {
40
- return normalizeTrimmedString(resolveSearxngWebSearchConfig(config)?.language);
32
+ return normalizeOptionalString(resolveSearxngWebSearchConfig(config)?.language);
41
33
  }
42
34
  //#endregion
43
35
  //#region extensions/searxng/src/searxng-client.ts
@@ -226,4 +218,4 @@ const testing = {
226
218
  SEARXNG_SEARCH_CACHE
227
219
  };
228
220
  //#endregion
229
- export { testing as __testing, testing, runSearxngSearch };
221
+ export { runSearxngSearch, testing };
@@ -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-DI4F_j6f.js"));
6
+ const loadSearxngClientModule = createLazyRuntimeModule(() => import("./searxng-client-Cjsi1eHI.js"));
7
7
  const SearxngSearchSchema = {
8
8
  type: "object",
9
9
  properties: {
@@ -1,2 +1,2 @@
1
- import { t as createSearxngWebSearchProvider } from "./searxng-search-provider-B47sPRhS.js";
1
+ import { t as createSearxngWebSearchProvider } from "./searxng-search-provider-DRnBkbzG.js";
2
2
  export { createSearxngWebSearchProvider };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/searxng-plugin",
3
- "version": "2026.7.2-beta.7",
3
+ "version": "2026.8.1-beta.3",
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.2-beta.7"
18
+ "pluginApi": ">=2026.8.1-beta.3"
19
19
  },
20
20
  "build": {
21
- "openclawVersion": "2026.7.2-beta.7",
21
+ "openclawVersion": "2026.8.1-beta.3",
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.2-beta.7"
42
+ "openclaw": ">=2026.8.1-beta.3"
43
43
  },
44
44
  "peerDependenciesMeta": {
45
45
  "openclaw": {