@openclaw/perplexity-plugin 2026.7.2-beta.7 → 2026.8.1-beta.2
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 +1 -1
- package/dist/{perplexity-web-search-provider-CWMYSpnj.js → perplexity-web-search-provider-BZTwy6bO.js} +4 -3
- package/dist/{perplexity-web-search-provider.runtime-CCtdE3-R.js → perplexity-web-search-provider.runtime-CMXrHVHO.js} +8 -6
- package/dist/web-search-provider.js +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createPerplexityWebSearchProvider } from "./perplexity-web-search-provider-
|
|
1
|
+
import { t as createPerplexityWebSearchProvider } from "./perplexity-web-search-provider-BZTwy6bO.js";
|
|
2
2
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
3
3
|
//#region extensions/perplexity/index.ts
|
|
4
4
|
var perplexity_default = definePluginEntry({
|
|
@@ -3,7 +3,7 @@ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
|
3
3
|
import { mergeScopedSearchConfig, resolveProviderWebSearchPluginConfig } from "openclaw/plugin-sdk/provider-web-search-config-contract";
|
|
4
4
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/perplexity/src/perplexity-web-search-provider.ts
|
|
6
|
-
const loadPerplexityWebSearchRuntime = createLazyRuntimeModule(() => import("./perplexity-web-search-provider.runtime-
|
|
6
|
+
const loadPerplexityWebSearchRuntime = createLazyRuntimeModule(() => import("./perplexity-web-search-provider.runtime-CMXrHVHO.js"));
|
|
7
7
|
function createPerplexityParameters(transport) {
|
|
8
8
|
const properties = {
|
|
9
9
|
query: {
|
|
@@ -70,9 +70,10 @@ function createPerplexityToolDefinition(searchConfig, runtimeTransport) {
|
|
|
70
70
|
return {
|
|
71
71
|
description: schemaTransport === "chat_completions" ? "Search the web using Perplexity Sonar via Perplexity/OpenRouter chat completions. Returns AI-synthesized answers with citations from web-grounded search." : "Search the web using Perplexity. Runtime routing decides between native Search API and Sonar chat-completions compatibility. Structured filters are available on the native Search API path.",
|
|
72
72
|
parameters: createPerplexityParameters(schemaTransport),
|
|
73
|
-
execute: async (args) => {
|
|
73
|
+
execute: async (args, context) => {
|
|
74
|
+
context?.signal?.throwIfAborted();
|
|
74
75
|
const { executePerplexitySearch } = await loadPerplexityWebSearchRuntime();
|
|
75
|
-
return await executePerplexitySearch(args, searchConfig);
|
|
76
|
+
return await executePerplexitySearch(args, searchConfig, context?.signal);
|
|
76
77
|
}
|
|
77
78
|
};
|
|
78
79
|
}
|
|
@@ -96,6 +96,7 @@ async function runPerplexitySearchApi(params) {
|
|
|
96
96
|
return withTrustedWebSearchEndpoint({
|
|
97
97
|
url: PERPLEXITY_SEARCH_ENDPOINT,
|
|
98
98
|
timeoutSeconds: params.timeoutSeconds,
|
|
99
|
+
signal: params.signal,
|
|
99
100
|
init: {
|
|
100
101
|
method: "POST",
|
|
101
102
|
headers: buildPerplexityRequestHeaders(params.apiKey, true),
|
|
@@ -125,6 +126,7 @@ async function runPerplexitySearch(params) {
|
|
|
125
126
|
return withTrustedWebSearchEndpoint({
|
|
126
127
|
url: endpoint,
|
|
127
128
|
timeoutSeconds: params.timeoutSeconds,
|
|
129
|
+
signal: params.signal,
|
|
128
130
|
init: {
|
|
129
131
|
method: "POST",
|
|
130
132
|
headers: buildPerplexityRequestHeaders(params.apiKey),
|
|
@@ -139,7 +141,7 @@ async function runPerplexitySearch(params) {
|
|
|
139
141
|
};
|
|
140
142
|
});
|
|
141
143
|
}
|
|
142
|
-
async function executePerplexitySearch(args, searchConfig) {
|
|
144
|
+
async function executePerplexitySearch(args, searchConfig, signal) {
|
|
143
145
|
const runtime = resolvePerplexityTransport(resolvePerplexityConfig(searchConfig));
|
|
144
146
|
if (!runtime.apiKey) return {
|
|
145
147
|
error: "missing_perplexity_api_key",
|
|
@@ -275,6 +277,7 @@ async function executePerplexitySearch(args, searchConfig) {
|
|
|
275
277
|
baseUrl: runtime.baseUrl,
|
|
276
278
|
model: runtime.model,
|
|
277
279
|
timeoutSeconds,
|
|
280
|
+
signal,
|
|
278
281
|
freshness
|
|
279
282
|
});
|
|
280
283
|
return {
|
|
@@ -298,6 +301,7 @@ async function executePerplexitySearch(args, searchConfig) {
|
|
|
298
301
|
apiKey: runtime.apiKey,
|
|
299
302
|
count: resolveSearchCount(count, DEFAULT_SEARCH_COUNT),
|
|
300
303
|
timeoutSeconds,
|
|
304
|
+
signal,
|
|
301
305
|
country: country ?? void 0,
|
|
302
306
|
searchDomainFilter: domainFilter,
|
|
303
307
|
searchRecencyFilter: freshness,
|
|
@@ -312,6 +316,7 @@ async function executePerplexitySearch(args, searchConfig) {
|
|
|
312
316
|
payload.count = payload.results.length;
|
|
313
317
|
payload.tookMs = Date.now() - start;
|
|
314
318
|
} else payload.tookMs = Date.now() - start;
|
|
319
|
+
signal?.throwIfAborted();
|
|
315
320
|
writeCachedSearchPayload(cacheKey, payload, resolveSearchCacheTtlMs(searchConfig));
|
|
316
321
|
return payload;
|
|
317
322
|
}
|
|
@@ -320,12 +325,9 @@ const testing = {
|
|
|
320
325
|
resolvePerplexityBaseUrl,
|
|
321
326
|
resolvePerplexityModel,
|
|
322
327
|
resolvePerplexityTransport,
|
|
323
|
-
isDirectPerplexityBaseUrl,
|
|
324
328
|
resolvePerplexityRequestModel,
|
|
325
329
|
resolvePerplexityApiKey,
|
|
326
|
-
readPerplexityJsonResponse
|
|
327
|
-
normalizeToIsoDate,
|
|
328
|
-
isoToPerplexityDate
|
|
330
|
+
readPerplexityJsonResponse
|
|
329
331
|
};
|
|
330
332
|
//#endregion
|
|
331
|
-
export {
|
|
333
|
+
export { executePerplexitySearch, testing };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createPerplexityWebSearchProvider } from "./perplexity-web-search-provider-
|
|
1
|
+
import { t as createPerplexityWebSearchProvider } from "./perplexity-web-search-provider-BZTwy6bO.js";
|
|
2
2
|
export { createPerplexityWebSearchProvider };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/perplexity-plugin",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.8.1-beta.2",
|
|
4
4
|
"description": "OpenClaw Perplexity 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.
|
|
21
|
+
"pluginApi": ">=2026.8.1-beta.2"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.
|
|
24
|
+
"openclawVersion": "2026.8.1-beta.2",
|
|
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.
|
|
41
|
+
"openclaw": ">=2026.8.1-beta.2"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"openclaw": {
|