@openclaw/perplexity-plugin 2026.7.2-beta.7 → 2026.7.34
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/{perplexity-web-search-provider-CWMYSpnj.js → .setup/perplexity-web-search-provider-BWdYnYXH.mjs} +2 -2
- package/dist/{perplexity-web-search-provider.runtime-CCtdE3-R.js → .setup/perplexity-web-search-provider.runtime-BVvZ2FPB.mjs} +7 -6
- package/dist/index.js +1 -1
- package/dist/web-search-contract-api.js +1 -1
- package/dist/web-search-provider.js +1 -1
- package/openclaw.plugin.json +3 -0
- package/package.json +4 -4
- /package/dist/{perplexity-web-search-provider.shared-idWXa4i8.js → .setup/perplexity-web-search-provider.shared-idWXa4i8.mjs} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { o as resolvePerplexityWebSearchRuntimeMetadata, r as createPerplexityWebSearchProviderBase } from "./perplexity-web-search-provider.shared-idWXa4i8.
|
|
1
|
+
import { o as resolvePerplexityWebSearchRuntimeMetadata, r as createPerplexityWebSearchProviderBase } from "./perplexity-web-search-provider.shared-idWXa4i8.mjs";
|
|
2
2
|
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-BVvZ2FPB.mjs"));
|
|
7
7
|
function createPerplexityParameters(transport) {
|
|
8
8
|
const properties = {
|
|
9
9
|
query: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as isDirectPerplexityBaseUrl, i as inferPerplexityBaseUrlFromApiKey, n as PERPLEXITY_DIRECT_BASE_URL, t as DEFAULT_PERPLEXITY_BASE_URL } from "./perplexity-web-search-provider.shared-idWXa4i8.
|
|
1
|
+
import { a as isDirectPerplexityBaseUrl, i as inferPerplexityBaseUrlFromApiKey, n as PERPLEXITY_DIRECT_BASE_URL, t as DEFAULT_PERPLEXITY_BASE_URL } from "./perplexity-web-search-provider.shared-idWXa4i8.mjs";
|
|
2
2
|
import { normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
|
|
4
4
|
import { DEFAULT_SEARCH_COUNT, MAX_SEARCH_COUNT, buildSearchCacheKey, isoToPerplexityDate, normalizeFreshness, normalizeToIsoDate, readCachedSearchPayload, readConfiguredSecretString, readPositiveIntegerParam, readProviderEnvValue, readStringArrayParam, readStringParam, resolveSearchCacheTtlMs, resolveSearchCount, resolveSearchTimeoutSeconds, resolveSiteName, throwWebSearchApiError, withTrustedWebSearchEndpoint, wrapWebContent, writeCachedSearchPayload } from "openclaw/plugin-sdk/provider-web-search";
|
|
@@ -10,7 +10,7 @@ function resolvePerplexityConfig(searchConfig) {
|
|
|
10
10
|
return perplexity && typeof perplexity === "object" && !Array.isArray(perplexity) ? perplexity : {};
|
|
11
11
|
}
|
|
12
12
|
function resolvePerplexityApiKey(perplexity) {
|
|
13
|
-
const fromConfig = readConfiguredSecretString(perplexity?.apiKey, "
|
|
13
|
+
const fromConfig = readConfiguredSecretString(perplexity?.apiKey, "tools.web.search.perplexity.apiKey");
|
|
14
14
|
if (fromConfig) return {
|
|
15
15
|
apiKey: fromConfig,
|
|
16
16
|
source: "config"
|
|
@@ -75,7 +75,8 @@ function extractPerplexityCitations(data) {
|
|
|
75
75
|
const citations = [];
|
|
76
76
|
for (const choice of data.choices ?? []) for (const annotation of choice.message?.annotations ?? []) {
|
|
77
77
|
if (annotation.type !== "url_citation") continue;
|
|
78
|
-
const
|
|
78
|
+
const url = typeof annotation.url_citation?.url === "string" ? annotation.url_citation.url : typeof annotation.url === "string" ? annotation.url : void 0;
|
|
79
|
+
const normalizedUrl = normalizeOptionalString(url);
|
|
79
80
|
if (normalizedUrl) citations.push(normalizedUrl);
|
|
80
81
|
}
|
|
81
82
|
return uniqueStrings(citations);
|
|
@@ -89,8 +90,8 @@ async function runPerplexitySearchApi(params) {
|
|
|
89
90
|
if (params.searchDomainFilter?.length) body.search_domain_filter = params.searchDomainFilter;
|
|
90
91
|
if (params.searchRecencyFilter) body.search_recency_filter = params.searchRecencyFilter;
|
|
91
92
|
if (params.searchLanguageFilter?.length) body.search_language_filter = params.searchLanguageFilter;
|
|
92
|
-
if (params.searchAfterDate) body.
|
|
93
|
-
if (params.searchBeforeDate) body.
|
|
93
|
+
if (params.searchAfterDate) body.search_after_date = params.searchAfterDate;
|
|
94
|
+
if (params.searchBeforeDate) body.search_before_date = params.searchBeforeDate;
|
|
94
95
|
if (params.maxTokens !== void 0) body.max_tokens = params.maxTokens;
|
|
95
96
|
if (params.maxTokensPerPage !== void 0) body.max_tokens_per_page = params.maxTokensPerPage;
|
|
96
97
|
return withTrustedWebSearchEndpoint({
|
|
@@ -143,7 +144,7 @@ async function executePerplexitySearch(args, searchConfig) {
|
|
|
143
144
|
const runtime = resolvePerplexityTransport(resolvePerplexityConfig(searchConfig));
|
|
144
145
|
if (!runtime.apiKey) return {
|
|
145
146
|
error: "missing_perplexity_api_key",
|
|
146
|
-
message: "web_search (perplexity) needs an API key. Set PERPLEXITY_API_KEY or OPENROUTER_API_KEY in the Gateway environment, or configure
|
|
147
|
+
message: "web_search (perplexity) needs an API key. Set PERPLEXITY_API_KEY or OPENROUTER_API_KEY in the Gateway environment, or configure tools.web.search.perplexity.apiKey. If you do not want to configure a search API key, use web_fetch for a specific URL or the browser tool for interactive pages.",
|
|
147
148
|
docs: "https://docs.openclaw.ai/tools/web"
|
|
148
149
|
};
|
|
149
150
|
const query = readStringParam(args, "query", { required: true });
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createPerplexityWebSearchProvider } from "
|
|
1
|
+
import { t as createPerplexityWebSearchProvider } from "./.setup/perplexity-web-search-provider-BWdYnYXH.mjs";
|
|
2
2
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
3
3
|
//#region extensions/perplexity/index.ts
|
|
4
4
|
var perplexity_default = definePluginEntry({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as resolvePerplexityWebSearchRuntimeMetadata, r as createPerplexityWebSearchProviderBase } from "
|
|
1
|
+
import { o as resolvePerplexityWebSearchRuntimeMetadata, r as createPerplexityWebSearchProviderBase } from "./.setup/perplexity-web-search-provider.shared-idWXa4i8.mjs";
|
|
2
2
|
//#region extensions/perplexity/web-search-contract-api.ts
|
|
3
3
|
function createPerplexityWebSearchProvider() {
|
|
4
4
|
return {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createPerplexityWebSearchProvider } from "
|
|
1
|
+
import { t as createPerplexityWebSearchProvider } from "./.setup/perplexity-web-search-provider-BWdYnYXH.mjs";
|
|
2
2
|
export { createPerplexityWebSearchProvider };
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/perplexity-plugin",
|
|
3
|
-
"version": "2026.7.
|
|
3
|
+
"version": "2026.7.34",
|
|
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.7.
|
|
21
|
+
"pluginApi": ">=2026.7.34"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.7.
|
|
24
|
+
"openclawVersion": "2026.7.34",
|
|
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.
|
|
41
|
+
"openclaw": ">=2026.7.34"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"openclaw": {
|