@openclaw/perplexity-plugin 2026.9.6 → 2026.9.8
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/assets/icon.png +0 -0
- package/dist/.setup/{perplexity-web-search-provider-COgLtQqY.mjs → perplexity-web-search-provider-S1ncBqEC.mjs} +5 -8
- package/dist/.setup/{perplexity-web-search-provider.runtime-B8x05PSB.mjs → perplexity-web-search-provider.runtime-BeEgweF9.mjs} +1 -1
- package/dist/index.js +1 -1
- package/dist/web-search-contract-api.js +1 -1
- package/dist/web-search-provider.js +1 -1
- package/package.json +4 -4
package/assets/icon.png
CHANGED
|
Binary file
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
2
2
|
import { createWebSearchProviderContractFields, mergeScopedSearchConfig, resolveProviderWebSearchPluginConfig } from "openclaw/plugin-sdk/provider-web-search-config-contract";
|
|
3
|
-
import {
|
|
3
|
+
import { asNonArrayRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
//#region extensions/perplexity/src/perplexity-web-search-provider.shared.ts
|
|
5
5
|
const DEFAULT_PERPLEXITY_BASE_URL = "https://openrouter.ai/api/v1";
|
|
6
6
|
const PERPLEXITY_DIRECT_BASE_URL = "https://api.perplexity.ai";
|
|
7
7
|
const DEFAULT_PERPLEXITY_MODEL = "perplexity/sonar-pro";
|
|
8
8
|
const PERPLEXITY_CREDENTIAL_PATH = "plugins.entries.perplexity.config.webSearch.apiKey";
|
|
9
9
|
const PERPLEXITY_ONBOARDING_SCOPES = ["text-inference"];
|
|
10
|
-
const PERPLEXITY_KEY_PREFIXES = ["pplx-"];
|
|
11
|
-
const OPENROUTER_KEY_PREFIXES = ["sk-or-"];
|
|
12
10
|
function createPerplexityWebSearchProviderBase() {
|
|
13
11
|
return {
|
|
14
12
|
id: "perplexity",
|
|
@@ -43,8 +41,8 @@ function resolvePerplexityWebSearchRuntimeMetadata(ctx) {
|
|
|
43
41
|
function inferPerplexityBaseUrlFromApiKey(apiKey) {
|
|
44
42
|
if (!apiKey) return;
|
|
45
43
|
const normalized = normalizeLowercaseStringOrEmpty(apiKey);
|
|
46
|
-
if (
|
|
47
|
-
if (
|
|
44
|
+
if (normalized.startsWith("pplx-")) return "direct";
|
|
45
|
+
if (normalized.startsWith("sk-or-")) return "openrouter";
|
|
48
46
|
}
|
|
49
47
|
function isDirectPerplexityBaseUrl(baseUrl) {
|
|
50
48
|
try {
|
|
@@ -54,8 +52,7 @@ function isDirectPerplexityBaseUrl(baseUrl) {
|
|
|
54
52
|
}
|
|
55
53
|
}
|
|
56
54
|
function resolvePerplexityConfig(searchConfig) {
|
|
57
|
-
|
|
58
|
-
return isRecord(perplexity) ? perplexity : {};
|
|
55
|
+
return asNonArrayRecord(searchConfig?.perplexity);
|
|
59
56
|
}
|
|
60
57
|
function hasPerplexityLegacyOverride(perplexity) {
|
|
61
58
|
return Boolean(normalizeOptionalString(perplexity?.baseUrl) || normalizeOptionalString(perplexity?.model));
|
|
@@ -72,7 +69,7 @@ function resolvePerplexityRuntime(perplexity, auth) {
|
|
|
72
69
|
}
|
|
73
70
|
//#endregion
|
|
74
71
|
//#region extensions/perplexity/src/perplexity-web-search-provider.ts
|
|
75
|
-
const loadPerplexityWebSearchRuntime = createLazyRuntimeModule(() => import("./perplexity-web-search-provider.runtime-
|
|
72
|
+
const loadPerplexityWebSearchRuntime = createLazyRuntimeModule(() => import("./perplexity-web-search-provider.runtime-BeEgweF9.mjs"));
|
|
76
73
|
function createPerplexityParameters(transport) {
|
|
77
74
|
const properties = {
|
|
78
75
|
query: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as resolvePerplexityRuntime, n as isDirectPerplexityBaseUrl, r as resolvePerplexityConfig } from "./perplexity-web-search-provider-
|
|
1
|
+
import { i as resolvePerplexityRuntime, n as isDirectPerplexityBaseUrl, r as resolvePerplexityConfig } from "./perplexity-web-search-provider-S1ncBqEC.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, parseWebSearchTimeFilters, readCachedSearchPayload, readConfiguredSecretString, readPositiveIntegerParam, readProviderEnvValue, readStringArrayParam, readStringParam, resolveSearchCacheTtlMs, resolveSearchCount, resolveSearchTimeoutSeconds, resolveSiteName, throwWebSearchApiError, withTrustedWebSearchEndpoint, wrapWebContent, writeCachedSearchPayload } from "openclaw/plugin-sdk/provider-web-search";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createPerplexityWebSearchProvider } from "./.setup/perplexity-web-search-provider-
|
|
1
|
+
import { t as createPerplexityWebSearchProvider } from "./.setup/perplexity-web-search-provider-S1ncBqEC.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,3 +1,3 @@
|
|
|
1
|
-
import { t as createPerplexityWebSearchProvider } from "./.setup/perplexity-web-search-provider-
|
|
1
|
+
import { t as createPerplexityWebSearchProvider } from "./.setup/perplexity-web-search-provider-S1ncBqEC.mjs";
|
|
2
2
|
import "./web-search-provider.js";
|
|
3
3
|
export { createPerplexityWebSearchProvider };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createPerplexityWebSearchProvider } from "./.setup/perplexity-web-search-provider-
|
|
1
|
+
import { t as createPerplexityWebSearchProvider } from "./.setup/perplexity-web-search-provider-S1ncBqEC.mjs";
|
|
2
2
|
export { createPerplexityWebSearchProvider };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/perplexity-plugin",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.8",
|
|
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.9.
|
|
21
|
+
"pluginApi": ">=2026.9.8"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.9.
|
|
24
|
+
"openclawVersion": "2026.9.8",
|
|
25
25
|
"bundledDist": false
|
|
26
26
|
},
|
|
27
27
|
"release": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"assets/activity.svg"
|
|
41
41
|
],
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"openclaw": ">=2026.9.
|
|
43
|
+
"openclaw": ">=2026.9.8"
|
|
44
44
|
},
|
|
45
45
|
"peerDependenciesMeta": {
|
|
46
46
|
"openclaw": {
|