@openclaw/parallel-plugin 2026.7.2-beta.5 → 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.
@@ -1,6 +1,6 @@
1
- import { n as createParallelFreeWebSearchProviderBase, t as createParallelWebSearchProviderBase } from "./parallel-web-search-provider.shared-B8yrY1oc.js";
1
+ import { n as createParallelFreeWebSearchProviderBase, t as createParallelWebSearchProviderBase } from "./parallel-web-search-provider.shared-B8yrY1oc.mjs";
2
2
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
3
- import { DEFAULT_SEARCH_COUNT, buildSearchCacheKey, readPositiveIntegerParam, resolveSiteName, wrapWebContent } from "openclaw/plugin-sdk/provider-web-search";
3
+ import { buildSearchCacheKey, resolveSiteName, wrapWebContent } from "openclaw/plugin-sdk/provider-web-search";
4
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
6
6
  //#region extensions/parallel/src/parallel-search-normalize.ts
@@ -10,11 +10,7 @@ const PARALLEL_MAX_OBJECTIVE_CHARS$1 = 5e3;
10
10
  const PARALLEL_MAX_SEARCH_QUERIES$1 = 5;
11
11
  const PARALLEL_SESSION_ID_MAX_LENGTH = 1e3;
12
12
  const PARALLEL_CLIENT_MODEL_MAX_LENGTH = 100;
13
- function resolveParallelSearchCount(args, configuredCount) {
14
- const value = readPositiveIntegerParam(args, "count", {
15
- max: PARALLEL_MAX_SEARCH_COUNT$1,
16
- message: `count must be an integer from 1 to ${PARALLEL_MAX_SEARCH_COUNT$1}.`
17
- }) ?? (typeof configuredCount === "number" ? configuredCount : DEFAULT_SEARCH_COUNT);
13
+ function resolveParallelSearchCount(value) {
18
14
  return Math.max(1, Math.min(PARALLEL_MAX_SEARCH_COUNT$1, Math.floor(value)));
19
15
  }
20
16
  function normalizeParallelSessionId(value, maxLength) {
@@ -105,7 +101,7 @@ const PARALLEL_MAX_SEARCH_QUERY_CHARS = 200;
105
101
  const PARALLEL_MAX_OBJECTIVE_CHARS = 5e3;
106
102
  const PARALLEL_MAX_SESSION_ID_CHARS = 1e3;
107
103
  const PARALLEL_MAX_CLIENT_MODEL_CHARS = 100;
108
- const loadParallelWebSearchRuntime = createLazyRuntimeModule(() => import("./parallel-web-search-provider.runtime-lA9XS7D9.js"));
104
+ const loadParallelWebSearchRuntime = createLazyRuntimeModule(() => import("./parallel-web-search-provider.runtime-zHthgIv8.mjs"));
109
105
  const ParallelSearchSchema = {
110
106
  type: "object",
111
107
  properties: {
@@ -137,7 +133,7 @@ const ParallelSearchSchema = {
137
133
  },
138
134
  client_model: {
139
135
  type: "string",
140
- description: "The identifier of the LLM model making this tool call (e.g. 'claude-opus-4-7', 'gpt-5.6-sol', 'gemini-3.1-pro'). Pass the exact active model slug verbatim; never shorten or substitute a family alias like 'gpt-5'. Lets Parallel tailor default settings for your model's capabilities.",
136
+ description: "The identifier of the LLM model making this tool call (e.g. 'claude-opus-4-7', 'gpt-5.5', 'gemini-3.1-pro'). Pass the exact active model slug verbatim; never shorten or substitute a family alias like 'gpt-5'. Lets Parallel tailor default settings for your model's capabilities.",
141
137
  maxLength: PARALLEL_MAX_CLIENT_MODEL_CHARS
142
138
  }
143
139
  },
@@ -169,7 +165,7 @@ const ParallelFreeSearchSchema = {
169
165
  }
170
166
  }
171
167
  };
172
- const loadParallelFreeWebSearchRuntime = createLazyRuntimeModule(() => import("./parallel-free-web-search-provider.runtime-CVhm6WMR.js"));
168
+ const loadParallelFreeWebSearchRuntime = createLazyRuntimeModule(() => import("./parallel-free-web-search-provider.runtime-C7FjiSos.mjs"));
173
169
  function createParallelFreeWebSearchProvider() {
174
170
  return {
175
171
  ...createParallelFreeWebSearchProviderBase(),
@@ -1,8 +1,7 @@
1
- import { a as invalidSearchQueriesPayload, c as normalizeParallelObjective, d as normalizeParallelSessionId, f as resolveParallelSearchCount, i as buildParallelCacheKey, o as mapParallelResults, p as stripParallelGeneratedSessionId, s as normalizeParallelClientModel, u as normalizeParallelSearchQueries } from "./parallel-free-web-search-provider-vqD5LBwp.js";
1
+ import { a as invalidSearchQueriesPayload, c as normalizeParallelObjective, d as normalizeParallelSessionId, f as resolveParallelSearchCount, i as buildParallelCacheKey, o as mapParallelResults, p as stripParallelGeneratedSessionId, s as normalizeParallelClientModel, u as normalizeParallelSearchQueries } from "./parallel-free-web-search-provider-C1DCAJe7.mjs";
2
2
  import { createRequire } from "node:module";
3
- import { mergeScopedSearchConfig, readCachedSearchPayload, readStringArrayParam, readStringParam, resolveProviderWebSearchPluginConfig, resolveSearchCacheTtlMs, resolveSearchTimeoutSeconds, withTrustedWebSearchEndpoint, writeCachedSearchPayload } from "openclaw/plugin-sdk/provider-web-search";
3
+ import { DEFAULT_SEARCH_COUNT, mergeScopedSearchConfig, readCachedSearchPayload, readNumberParam, readStringArrayParam, readStringParam, resolveProviderWebSearchPluginConfig, resolveSearchCacheTtlMs, resolveSearchTimeoutSeconds, withTrustedWebSearchEndpoint, writeCachedSearchPayload } from "openclaw/plugin-sdk/provider-web-search";
4
4
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
5
- import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
6
5
  import { randomUUID } from "node:crypto";
7
6
  import { readPluginPackageVersion } from "openclaw/plugin-sdk/extension-shared";
8
7
  import { readProviderTextResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
@@ -10,8 +9,9 @@ import { readProviderTextResponse, readResponseTextLimited } from "openclaw/plug
10
9
  const PARALLEL_MCP_SEARCH_URL = "https://search.parallel.ai/mcp";
11
10
  const MCP_PROTOCOL_VERSION = "2025-06-18";
12
11
  const MCP_TIMEOUT_SECONDS = 30;
13
- const PARALLEL_MCP_ERROR_BODY_LIMIT_BYTES = 8 * 1024;
14
- const PLUGIN_VERSION = readPluginPackageVersion({ require: createRequire(import.meta.url) });
12
+ const PARALLEL_MCP_ERROR_BODY_LIMIT_BYTES = 8192;
13
+ const require = createRequire(import.meta.url);
14
+ const PLUGIN_VERSION = readPluginPackageVersion({ require });
15
15
  const USER_AGENT = `openclaw-parallel/${PLUGIN_VERSION} (${process.platform})`;
16
16
  function mcpHeaders(params) {
17
17
  const headers = {
@@ -88,16 +88,16 @@ function selectMcpEnvelope(text, requestId) {
88
88
  * error or a tool-level `isError`.
89
89
  */
90
90
  function extractMcpToolPayload(envelope) {
91
- if ("error" in envelope) throw new Error(`Parallel MCP error: ${truncateUtf16Safe(JSON.stringify(envelope.error), 500)}`);
91
+ if ("error" in envelope) throw new Error(`Parallel MCP error: ${JSON.stringify(envelope.error).slice(0, 500)}`);
92
92
  const result = isRecord(envelope.result) ? envelope.result : {};
93
- if (result.isError) throw new Error(`Parallel MCP tool error: ${truncateUtf16Safe(JSON.stringify(result), 500)}`);
93
+ if (result.isError) throw new Error(`Parallel MCP tool error: ${JSON.stringify(result).slice(0, 500)}`);
94
94
  if (isRecord(result.structuredContent)) return result.structuredContent;
95
95
  const content = Array.isArray(result.content) ? result.content : [];
96
96
  for (const block of content) if (isRecord(block) && block.type === "text" && typeof block.text === "string" && block.text) try {
97
97
  const parsed = JSON.parse(block.text);
98
98
  if (isRecord(parsed)) return parsed;
99
99
  } catch {}
100
- throw new Error(`Parallel MCP returned no parseable content: ${truncateUtf16Safe(JSON.stringify(result), 500)}`);
100
+ throw new Error(`Parallel MCP returned no parseable content: ${JSON.stringify(result).slice(0, 500)}`);
101
101
  }
102
102
  async function postMcp(params) {
103
103
  return withTrustedWebSearchEndpoint({
@@ -149,7 +149,7 @@ async function mcpCall(toolName, args, timeoutSeconds, signal) {
149
149
  const sessionId = init.sessionIdHeader ?? void 0;
150
150
  const initEnvelope = selectMcpEnvelope(init.text, initId);
151
151
  const negotiatedVersion = (isRecord(initEnvelope.result) && typeof initEnvelope.result.protocolVersion === "string" ? initEnvelope.result.protocolVersion : void 0) ?? MCP_PROTOCOL_VERSION;
152
- const initialized = await postMcp({
152
+ await postMcp({
153
153
  body: {
154
154
  jsonrpc: "2.0",
155
155
  method: "notifications/initialized"
@@ -159,7 +159,6 @@ async function mcpCall(toolName, args, timeoutSeconds, signal) {
159
159
  timeoutSeconds,
160
160
  signal
161
161
  });
162
- if (!initialized.ok) throw new Error(`Parallel MCP notifications/initialized failed (${initialized.status}): ${initialized.text || initialized.statusText}`);
163
162
  const callId = randomUUID();
164
163
  const call = await postMcp({
165
164
  body: {
@@ -214,7 +213,8 @@ async function executeParallelFreeWebSearchProviderTool(ctx, args, signal) {
214
213
  let searchQueries = normalizeParallelSearchQueries(readStringArrayParam(args, "search_queries"));
215
214
  if (searchQueries.length === 0 && cliQuery) searchQueries = normalizeParallelSearchQueries([cliQuery]);
216
215
  if (searchQueries.length === 0) return invalidSearchQueriesPayload();
217
- const count = resolveParallelSearchCount(args, searchConfig?.maxResults);
216
+ const requestedCount = readNumberParam(args, "count", { integer: true }) ?? (typeof searchConfig?.maxResults === "number" ? searchConfig.maxResults : void 0);
217
+ const count = resolveParallelSearchCount(requestedCount ?? DEFAULT_SEARCH_COUNT);
218
218
  const sessionId = normalizeParallelSessionId(readStringParam(args, "session_id"), 100);
219
219
  const clientModel = normalizeParallelClientModel(readStringParam(args, "client_model"));
220
220
  const cacheKey = buildParallelCacheKey({
@@ -256,7 +256,8 @@ async function executeParallelFreeWebSearchProviderTool(ctx, args, signal) {
256
256
  if (typeof response.session_id === "string") payload.sessionId = response.session_id;
257
257
  if (Array.isArray(response.warnings) && response.warnings.length > 0) payload.warnings = response.warnings;
258
258
  if (Array.isArray(response.usage) && response.usage.length > 0) payload.usage = response.usage;
259
- writeCachedSearchPayload(cacheKey, sessionId ? payload : stripParallelGeneratedSessionId(payload), resolveSearchCacheTtlMs(searchConfig));
259
+ const cachePayload = sessionId ? payload : stripParallelGeneratedSessionId(payload);
260
+ writeCachedSearchPayload(cacheKey, cachePayload, resolveSearchCacheTtlMs(searchConfig));
260
261
  return payload;
261
262
  }
262
263
  //#endregion
@@ -1,21 +1,22 @@
1
- import { a as invalidSearchQueriesPayload, c as normalizeParallelObjective, d as normalizeParallelSessionId, f as resolveParallelSearchCount, i as buildParallelCacheKey, l as normalizeParallelResults, o as mapParallelResults, p as stripParallelGeneratedSessionId, r as PARALLEL_SESSION_ID_MAX_LENGTH, s as normalizeParallelClientModel, u as normalizeParallelSearchQueries } from "./parallel-free-web-search-provider-vqD5LBwp.js";
1
+ import { a as invalidSearchQueriesPayload, c as normalizeParallelObjective, d as normalizeParallelSessionId, f as resolveParallelSearchCount, i as buildParallelCacheKey, l as normalizeParallelResults, o as mapParallelResults, p as stripParallelGeneratedSessionId, r as PARALLEL_SESSION_ID_MAX_LENGTH, s as normalizeParallelClientModel, u as normalizeParallelSearchQueries } from "./parallel-free-web-search-provider-C1DCAJe7.mjs";
2
2
  import { createRequire } from "node:module";
3
- import { mergeScopedSearchConfig, readCachedSearchPayload, readConfiguredSecretString, readProviderEnvValue, readStringArrayParam, readStringParam, resolveProviderWebSearchPluginConfig, resolveSearchCacheTtlMs, resolveSearchTimeoutSeconds, withTrustedWebSearchEndpoint, writeCachedSearchPayload } from "openclaw/plugin-sdk/provider-web-search";
3
+ import { DEFAULT_SEARCH_COUNT, mergeScopedSearchConfig, readCachedSearchPayload, readConfiguredSecretString, readNumberParam, readProviderEnvValue, readStringArrayParam, readStringParam, resolveProviderWebSearchPluginConfig, resolveSearchCacheTtlMs, resolveSearchTimeoutSeconds, withTrustedWebSearchEndpoint, writeCachedSearchPayload } from "openclaw/plugin-sdk/provider-web-search";
4
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { readPluginPackageVersion } from "openclaw/plugin-sdk/extension-shared";
6
6
  import { readProviderJsonResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
7
7
  //#region extensions/parallel/src/parallel-web-search-provider.runtime.ts
8
8
  const PARALLEL_BASE_URL = "https://api.parallel.ai";
9
9
  const PARALLEL_SEARCH_PATHNAME = "/v1/search";
10
- const PARALLEL_ERROR_BODY_LIMIT_BYTES = 8 * 1024;
11
- const PARALLEL_SEARCH_RESPONSE_LIMIT_BYTES = 16 * 1024 * 1024;
12
- const USER_AGENT = `openclaw-parallel/${readPluginPackageVersion({ require: createRequire(import.meta.url) })} (${process.platform})`;
10
+ const PARALLEL_ERROR_BODY_LIMIT_BYTES = 8192;
11
+ const PARALLEL_SEARCH_RESPONSE_LIMIT_BYTES = 16777216;
12
+ const require = createRequire(import.meta.url);
13
+ const USER_AGENT = `openclaw-parallel/${readPluginPackageVersion({ require })} (${process.platform})`;
13
14
  function resolveParallelConfig(searchConfig) {
14
15
  const parallel = searchConfig?.parallel;
15
16
  return parallel && typeof parallel === "object" && !Array.isArray(parallel) ? parallel : {};
16
17
  }
17
18
  function resolveParallelApiKey(parallel) {
18
- return readConfiguredSecretString(parallel?.apiKey, "plugins.entries.parallel.config.webSearch.apiKey") ?? readProviderEnvValue(["PARALLEL_API_KEY"]);
19
+ return readConfiguredSecretString(parallel?.apiKey, "tools.web.search.parallel.apiKey") ?? readProviderEnvValue(["PARALLEL_API_KEY"]);
19
20
  }
20
21
  function invalidBaseUrlPayload(value) {
21
22
  return {
@@ -90,7 +91,8 @@ async function executeParallelWebSearchProviderTool(ctx, args) {
90
91
  let searchQueries = normalizeParallelSearchQueries(readStringArrayParam(args, "search_queries"));
91
92
  if (searchQueries.length === 0 && cliQuery) searchQueries = normalizeParallelSearchQueries([cliQuery]);
92
93
  if (searchQueries.length === 0) return invalidSearchQueriesPayload();
93
- const count = resolveParallelSearchCount(args, searchConfig?.maxResults);
94
+ const requestedCount = readNumberParam(args, "count", { integer: true }) ?? (typeof searchConfig?.maxResults === "number" ? searchConfig.maxResults : void 0);
95
+ const count = resolveParallelSearchCount(requestedCount ?? DEFAULT_SEARCH_COUNT);
94
96
  const sessionId = normalizeParallelSessionId(readStringParam(args, "session_id"), PARALLEL_SESSION_ID_MAX_LENGTH);
95
97
  const clientModel = normalizeParallelClientModel(readStringParam(args, "client_model"));
96
98
  const cacheKey = buildParallelCacheKey({
@@ -133,7 +135,8 @@ async function executeParallelWebSearchProviderTool(ctx, args) {
133
135
  if (typeof response.session_id === "string") payload.sessionId = response.session_id;
134
136
  if (Array.isArray(response.warnings) && response.warnings.length > 0) payload.warnings = response.warnings;
135
137
  if (Array.isArray(response.usage) && response.usage.length > 0) payload.usage = response.usage;
136
- writeCachedSearchPayload(cacheKey, sessionId ? payload : stripParallelGeneratedSessionId(payload), resolveSearchCacheTtlMs(searchConfig));
138
+ const cachePayload = sessionId ? payload : stripParallelGeneratedSessionId(payload);
139
+ writeCachedSearchPayload(cacheKey, cachePayload, resolveSearchCacheTtlMs(searchConfig));
137
140
  return payload;
138
141
  }
139
142
  const testing = {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as createParallelWebSearchProvider, t as createParallelFreeWebSearchProvider } from "./parallel-free-web-search-provider-vqD5LBwp.js";
1
+ import { n as createParallelWebSearchProvider, t as createParallelFreeWebSearchProvider } from "./.setup/parallel-free-web-search-provider-C1DCAJe7.mjs";
2
2
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
3
3
  //#region extensions/parallel/index.ts
4
4
  var parallel_default = definePluginEntry({
@@ -1,4 +1,4 @@
1
- import { n as createParallelFreeWebSearchProviderBase, t as createParallelWebSearchProviderBase } from "./parallel-web-search-provider.shared-B8yrY1oc.js";
1
+ import { n as createParallelFreeWebSearchProviderBase, t as createParallelWebSearchProviderBase } from "./.setup/parallel-web-search-provider.shared-B8yrY1oc.mjs";
2
2
  //#region extensions/parallel/web-search-contract-api.ts
3
3
  function createParallelWebSearchProvider() {
4
4
  return {
@@ -1,2 +1,2 @@
1
- import { n as createParallelWebSearchProvider, t as createParallelFreeWebSearchProvider } from "./parallel-free-web-search-provider-vqD5LBwp.js";
1
+ import { n as createParallelWebSearchProvider, t as createParallelFreeWebSearchProvider } from "./.setup/parallel-free-web-search-provider-C1DCAJe7.mjs";
2
2
  export { createParallelFreeWebSearchProvider, createParallelWebSearchProvider };
@@ -26,6 +26,9 @@
26
26
  "contracts": {
27
27
  "webSearchProviders": ["parallel", "parallel-free"]
28
28
  },
29
+ "configContracts": {
30
+ "compatibilityRuntimePaths": ["tools.web.search.apiKey"]
31
+ },
29
32
  "configSchema": {
30
33
  "type": "object",
31
34
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/parallel-plugin",
3
- "version": "2026.7.2-beta.5",
3
+ "version": "2026.7.33",
4
4
  "description": "OpenClaw Parallel web search plugin.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,10 +18,10 @@
18
18
  "minHostVersion": ">=2026.6.8"
19
19
  },
20
20
  "compat": {
21
- "pluginApi": ">=2026.7.2-beta.5"
21
+ "pluginApi": ">=2026.7.33"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.7.2-beta.5",
24
+ "openclawVersion": "2026.7.33",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -38,7 +38,7 @@
38
38
  "README.md"
39
39
  ],
40
40
  "peerDependencies": {
41
- "openclaw": ">=2026.7.2-beta.5"
41
+ "openclaw": ">=2026.7.33"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "openclaw": {