webfox 4.7.0 → 4.8.0
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/{adapter-IDKJASTU.js → adapter-QU2G7O25.js} +1 -1
- package/dist/{adapter-NEXSOHGT.js → adapter-SLTIAAML.js} +13 -1
- package/dist/{chunk-MLRWLHC2.js → chunk-G7LMBPW4.js} +2 -2
- package/dist/{chunk-3LK52VNJ.js → chunk-IRKSK34I.js} +2 -2
- package/dist/{chunk-NOBEWI5W.js → chunk-QERSNL3J.js} +2 -2
- package/dist/cli.js +3 -3
- package/dist/durable.js +3 -3
- package/dist/index.js +3 -3
- package/dist/pi.js +3 -3
- package/package.json +1 -1
|
@@ -130,9 +130,21 @@ function createClient(config) {
|
|
|
130
130
|
return new PerplexityClient({
|
|
131
131
|
maxRetries: 0,
|
|
132
132
|
apiKey,
|
|
133
|
-
baseURL: config.baseUrl
|
|
133
|
+
baseURL: config.baseUrl,
|
|
134
|
+
...shouldSendIntegrationHeader(config.baseUrl) ? { defaultHeaders: { "X-Pplx-Integration": "webfox" } } : {}
|
|
134
135
|
});
|
|
135
136
|
}
|
|
137
|
+
function shouldSendIntegrationHeader(baseUrl) {
|
|
138
|
+
const customHeaders = process.env.PERPLEXITY_CUSTOM_HEADERS ?? "";
|
|
139
|
+
if (/^\s*x-pplx-integration\s*:/im.test(customHeaders)) return false;
|
|
140
|
+
const url = baseUrl ?? process.env.PERPLEXITY_BASE_URL?.trim();
|
|
141
|
+
if (!url) return true;
|
|
142
|
+
try {
|
|
143
|
+
return new URL(url).hostname === "api.perplexity.ai";
|
|
144
|
+
} catch {
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
136
148
|
function resolveModel(optionModel, fallbackModel) {
|
|
137
149
|
if (typeof optionModel === "string" && optionModel.trim().length > 0) {
|
|
138
150
|
return optionModel;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
optionSchema,
|
|
3
3
|
providers
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QERSNL3J.js";
|
|
5
5
|
import {
|
|
6
6
|
CAPABILITIES
|
|
7
7
|
} from "./chunk-GPACLYNT.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
// package.json
|
|
10
10
|
var package_default = {
|
|
11
11
|
name: "webfox",
|
|
12
|
-
version: "4.
|
|
12
|
+
version: "4.8.0",
|
|
13
13
|
description: "Search the web, extract pages, get grounded answers, and run deep research with the web CLI, a TypeScript library, and a pi extension. Bring your own providers and API keys.",
|
|
14
14
|
type: "module",
|
|
15
15
|
files: [
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
} from "./chunk-WCTOYZVB.js";
|
|
7
7
|
import {
|
|
8
8
|
configurationSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-G7LMBPW4.js";
|
|
10
10
|
import {
|
|
11
11
|
effectiveOptions,
|
|
12
12
|
optionSchema,
|
|
13
13
|
providers,
|
|
14
14
|
selectProvider,
|
|
15
15
|
validateConfiguredOptions
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-QERSNL3J.js";
|
|
17
17
|
import {
|
|
18
18
|
cancelProcessGroup,
|
|
19
19
|
killProcessGroup
|
|
@@ -1890,7 +1890,7 @@ var perplexityProvider = defineProvider({
|
|
|
1890
1890
|
answer: { options: chatOptions, retrySafe: false },
|
|
1891
1891
|
research: { options: chatOptions, retrySafe: false }
|
|
1892
1892
|
},
|
|
1893
|
-
load: async () => (await import("./adapter-
|
|
1893
|
+
load: async () => (await import("./adapter-SLTIAAML.js")).adapter
|
|
1894
1894
|
});
|
|
1895
1895
|
|
|
1896
1896
|
// src/providers/serpbase/definition.ts
|
|
@@ -1991,7 +1991,7 @@ var serpbaseProvider = defineProvider({
|
|
|
1991
1991
|
retrySafe: true
|
|
1992
1992
|
}
|
|
1993
1993
|
},
|
|
1994
|
-
load: async () => (await import("./adapter-
|
|
1994
|
+
load: async () => (await import("./adapter-QU2G7O25.js")).adapter
|
|
1995
1995
|
});
|
|
1996
1996
|
|
|
1997
1997
|
// src/providers/serper/definition.ts
|
package/dist/cli.js
CHANGED
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
redactConfig,
|
|
12
12
|
resolveConfigPath,
|
|
13
13
|
setCapabilityDefault
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IRKSK34I.js";
|
|
15
15
|
import "./chunk-WCTOYZVB.js";
|
|
16
16
|
import {
|
|
17
17
|
PACKAGE_VERSION
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-G7LMBPW4.js";
|
|
19
19
|
import {
|
|
20
20
|
validateConfiguredOptions
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QERSNL3J.js";
|
|
22
22
|
import "./chunk-ZVTVERW5.js";
|
|
23
23
|
import {
|
|
24
24
|
CAPABILITIES,
|
package/dist/durable.js
CHANGED
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
} from "./chunk-BTWECET5.js";
|
|
9
9
|
import {
|
|
10
10
|
createWebfox
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IRKSK34I.js";
|
|
12
12
|
import "./chunk-WCTOYZVB.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-G7LMBPW4.js";
|
|
14
|
+
import "./chunk-QERSNL3J.js";
|
|
15
15
|
import "./chunk-ZVTVERW5.js";
|
|
16
16
|
import {
|
|
17
17
|
CAPABILITIES
|
package/dist/index.js
CHANGED
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
resolveConfigPath,
|
|
7
7
|
setCapabilityDefault,
|
|
8
8
|
validateConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IRKSK34I.js";
|
|
10
10
|
import "./chunk-WCTOYZVB.js";
|
|
11
11
|
import {
|
|
12
12
|
CONFIG_SCHEMA_URL
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-G7LMBPW4.js";
|
|
14
14
|
import {
|
|
15
15
|
validateConfiguredOptions
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-QERSNL3J.js";
|
|
17
17
|
import "./chunk-ZVTVERW5.js";
|
|
18
18
|
import {
|
|
19
19
|
CAPABILITIES,
|
package/dist/pi.js
CHANGED
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
createWebfox,
|
|
11
11
|
resolveConfigPath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IRKSK34I.js";
|
|
13
13
|
import "./chunk-WCTOYZVB.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-G7LMBPW4.js";
|
|
15
|
+
import "./chunk-QERSNL3J.js";
|
|
16
16
|
import "./chunk-ZVTVERW5.js";
|
|
17
17
|
import {
|
|
18
18
|
CAPABILITIES,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webfox",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0",
|
|
4
4
|
"description": "Search the web, extract pages, get grounded answers, and run deep research with the web CLI, a TypeScript library, and a pi extension. Bring your own providers and API keys.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|