@openclaw/searxng-plugin 2026.7.1-beta.6 → 2026.7.2-beta.1

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-C_TbS3nx.js";
1
+ import { t as createSearxngWebSearchProvider } from "./searxng-search-provider-XrEYonKx.js";
2
2
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
3
3
  //#region extensions/searxng/index.ts
4
4
  var searxng_default = definePluginEntry({
@@ -130,6 +130,7 @@ async function fetchSearxngResults(params) {
130
130
  return await (params.endpointMode === "selfHosted" ? withSelfHostedWebSearchEndpoint : withTrustedWebSearchEndpoint)({
131
131
  url,
132
132
  timeoutSeconds: params.timeoutSeconds,
133
+ signal: params.signal,
133
134
  init: {
134
135
  method: "GET",
135
136
  headers: { Accept: "application/json" }
@@ -140,11 +141,12 @@ async function fetchSearxngResults(params) {
140
141
  throw new Error(`SearXNG search error (${response.status}): ${detail || response.statusText}`);
141
142
  }
142
143
  const body = await readResponseText(response, { maxBytes: MAX_RESPONSE_BYTES });
143
- if (body.truncated) throw new Error("SearXNG response too large.");
144
+ if (body.truncated) throw new Error(`SearXNG response incomplete after ${body.bytesRead} bytes.`);
144
145
  return parseSearxngResponseText(body.text, params.count);
145
146
  });
146
147
  }
147
148
  async function runSearxngSearch(params) {
149
+ params.signal?.throwIfAborted();
148
150
  const count = resolveSearchCount(params.count, DEFAULT_SEARCH_COUNT);
149
151
  const categories = params.categories ?? resolveSearxngCategories(params.config);
150
152
  const language = params.language ?? resolveSearxngLanguage(params.config);
@@ -153,6 +155,7 @@ async function runSearxngSearch(params) {
153
155
  const cacheTtlMs = resolveCacheTtlMs(params.cacheTtlMinutes, DEFAULT_CACHE_TTL_MINUTES);
154
156
  if (!baseUrl) throw new Error("SearXNG base URL is not configured. Set SEARXNG_BASE_URL or configure plugins.entries.searxng.config.webSearch.baseUrl.");
155
157
  const endpointMode = await validateSearxngBaseUrl(baseUrl);
158
+ params.signal?.throwIfAborted();
156
159
  const cacheKey = normalizeCacheKey(JSON.stringify({
157
160
  provider: "searxng",
158
161
  query: params.query,
@@ -174,17 +177,23 @@ async function runSearxngSearch(params) {
174
177
  language,
175
178
  timeoutSeconds,
176
179
  count,
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
180
+ endpointMode,
181
+ signal: params.signal
187
182
  });
183
+ params.signal?.throwIfAborted();
184
+ if (results.length === 0 && shouldRetryEmptyCategorySearchWithGeneral(categories)) {
185
+ results = await fetchSearxngResults({
186
+ baseUrl,
187
+ query: params.query,
188
+ categories: "general",
189
+ language,
190
+ timeoutSeconds,
191
+ count,
192
+ endpointMode,
193
+ signal: params.signal
194
+ });
195
+ params.signal?.throwIfAborted();
196
+ }
188
197
  const payload = {
189
198
  query: params.query,
190
199
  provider: "searxng",
@@ -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-BFVWmp9D.js"));
6
+ const loadSearxngClientModule = createLazyRuntimeModule(() => import("./searxng-client-DbeBeMez.js"));
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, context) => {
61
61
  const { runSearxngSearch } = await loadSearxngClientModule();
62
62
  return await runSearxngSearch({
63
63
  config: ctx.config,
@@ -67,7 +67,8 @@ 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")
70
+ language: readStringParam(args, "language"),
71
+ signal: context?.signal
71
72
  });
72
73
  }
73
74
  })
@@ -1,2 +1,2 @@
1
- import { t as createSearxngWebSearchProvider } from "./searxng-search-provider-C_TbS3nx.js";
1
+ import { t as createSearxngWebSearchProvider } from "./searxng-search-provider-XrEYonKx.js";
2
2
  export { createSearxngWebSearchProvider };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/searxng-plugin",
3
- "version": "2026.7.1-beta.6",
3
+ "version": "2026.7.2-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/searxng-plugin",
9
- "version": "2026.7.1-beta.6"
9
+ "version": "2026.7.2-beta.1"
10
10
  }
11
11
  }
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/searxng-plugin",
3
- "version": "2026.7.1-beta.6",
3
+ "version": "2026.7.2-beta.1",
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.1-beta.6"
18
+ "pluginApi": ">=2026.7.2-beta.1"
19
19
  },
20
20
  "build": {
21
- "openclawVersion": "2026.7.1-beta.6",
21
+ "openclawVersion": "2026.7.2-beta.1",
22
22
  "bundledDist": false
23
23
  },
24
24
  "release": {
@@ -40,7 +40,7 @@
40
40
  "README.md"
41
41
  ],
42
42
  "peerDependencies": {
43
- "openclaw": ">=2026.7.1-beta.6"
43
+ "openclaw": ">=2026.7.2-beta.1"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "openclaw": {