@openclaw/firecrawl-plugin 2026.11.2 → 2026.11.3
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/.setup/{firecrawl-client-CMLsufX8.mjs → firecrawl-client--j4MjwgU.mjs} +19 -27
- package/dist/.setup/{firecrawl-fetch-provider-uRENNKri.mjs → firecrawl-fetch-provider-Br32KRpR.mjs} +1 -1
- package/dist/.setup/{firecrawl-search-provider-CFhWH8gx.mjs → firecrawl-search-provider-D_gyroLO.mjs} +1 -1
- package/dist/api.js +1 -1
- package/dist/index.js +3 -3
- package/dist/web-fetch-contract-api.js +1 -1
- package/dist/web-fetch-provider.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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { resolveSiteName } from "openclaw/plugin-sdk/provider-web-search";
|
|
2
|
+
import { hash } from "node:crypto";
|
|
2
3
|
import { asNonNegativeFiniteNumber, asPositiveFiniteNumber, parseDateStringTimestampMs, parseFiniteNumber, resolveIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
|
3
4
|
import { ProviderHttpError, readProviderJsonObjectResponse } from "openclaw/plugin-sdk/provider-http";
|
|
4
5
|
import { DEFAULT_CACHE_TTL_MINUTES, markdownToText, normalizeCacheKey, readCache, readResponseText, resolveCacheTtlMs, resolvePositiveTimeoutSeconds, withSelfHostedWebToolsEndpoint, withStrictWebToolsEndpoint, writeCache } from "openclaw/plugin-sdk/provider-web-fetch";
|
|
@@ -39,29 +40,19 @@ function resolveConfiguredSecret(value, path, cfg) {
|
|
|
39
40
|
normalizeValue: normalizeSecretInput
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (resolved.status === "available") return resolved.value;
|
|
56
|
-
if (resolved.status === "blocked") blockedConfiguredSecret = true;
|
|
57
|
-
}
|
|
58
|
-
if (blockedConfiguredSecret) return;
|
|
59
|
-
return normalizeSecretInput(process.env[FIRECRAWL_API_KEY_ENV_VAR]) || void 0;
|
|
60
|
-
}
|
|
61
|
-
function resolveFirecrawlBaseUrl(cfg) {
|
|
62
|
-
const search = resolveFirecrawlSearchConfig(cfg);
|
|
63
|
-
const fetch = resolveFirecrawlFetchConfig(cfg);
|
|
64
|
-
return normalizeOptionalString(search?.baseUrl) || normalizeOptionalString(fetch?.baseUrl) || normalizeSecretInput(process.env.FIRECRAWL_BASE_URL) || "https://api.firecrawl.dev";
|
|
43
|
+
function resolveFirecrawlConnection(cfg, scope) {
|
|
44
|
+
const scopes = {
|
|
45
|
+
webSearch: resolveFirecrawlSearchConfig(cfg),
|
|
46
|
+
webFetch: resolveFirecrawlFetchConfig(cfg)
|
|
47
|
+
};
|
|
48
|
+
const primary = scopes[scope];
|
|
49
|
+
const selectedScope = primary?.apiKey === void 0 && !normalizeOptionalString(primary?.baseUrl) ? scope === "webSearch" ? "webFetch" : "webSearch" : scope;
|
|
50
|
+
const connection = scopes[selectedScope];
|
|
51
|
+
const resolved = resolveConfiguredSecret(connection?.apiKey, `plugins.entries.firecrawl.config.${selectedScope}.apiKey`, cfg);
|
|
52
|
+
return {
|
|
53
|
+
apiKey: resolved.status === "available" ? resolved.value : resolved.status === "blocked" ? void 0 : normalizeSecretInput(process.env[FIRECRAWL_API_KEY_ENV_VAR]) || void 0,
|
|
54
|
+
baseUrl: normalizeOptionalString(connection?.baseUrl) || normalizeSecretInput(process.env.FIRECRAWL_BASE_URL) || "https://api.firecrawl.dev"
|
|
55
|
+
};
|
|
65
56
|
}
|
|
66
57
|
function resolveFirecrawlOnlyMainContent(cfg, override) {
|
|
67
58
|
return asBoolean(override) ?? asBoolean(resolveFirecrawlFetchConfig(cfg)?.onlyMainContent) ?? true;
|
|
@@ -240,7 +231,8 @@ async function runFirecrawlSearch(params) {
|
|
|
240
231
|
params.signal?.throwIfAborted();
|
|
241
232
|
const keyless = params.access === "keyless";
|
|
242
233
|
const providerId = keyless ? "firecrawl-free" : "firecrawl";
|
|
243
|
-
const
|
|
234
|
+
const connection = resolveFirecrawlConnection(params.cfg, "webSearch");
|
|
235
|
+
const apiKey = keyless ? void 0 : connection.apiKey;
|
|
244
236
|
if (!apiKey && !keyless) throw new Error("web_search (firecrawl) needs a Firecrawl API key. Set FIRECRAWL_API_KEY in the Gateway environment, or configure plugins.entries.firecrawl.config.webSearch.apiKey.");
|
|
245
237
|
const count = resolveIntegerOption(params.count, DEFAULT_SEARCH_COUNT, {
|
|
246
238
|
min: 1,
|
|
@@ -256,10 +248,11 @@ async function runFirecrawlSearch(params) {
|
|
|
256
248
|
const tbs = normalizeOptionalString(params.tbs);
|
|
257
249
|
const location = normalizeOptionalString(params.location);
|
|
258
250
|
const country = normalizeOptionalString(params.country);
|
|
259
|
-
const baseUrl =
|
|
251
|
+
const baseUrl = connection.baseUrl;
|
|
260
252
|
const cacheKey = normalizeCacheKey(JSON.stringify({
|
|
261
253
|
type: "firecrawl-search",
|
|
262
254
|
provider: providerId,
|
|
255
|
+
credential: apiKey ? hash("sha256", apiKey, "hex") : void 0,
|
|
263
256
|
q: params.query,
|
|
264
257
|
count,
|
|
265
258
|
baseUrl,
|
|
@@ -392,9 +385,8 @@ function parseFirecrawlScrapePayload(params) {
|
|
|
392
385
|
async function runFirecrawlScrape(params) {
|
|
393
386
|
params.signal?.throwIfAborted();
|
|
394
387
|
assertFirecrawlScrapeTargetAllowed(params.url);
|
|
395
|
-
const apiKey =
|
|
388
|
+
const { apiKey, baseUrl } = resolveFirecrawlConnection(params.cfg, "webFetch");
|
|
396
389
|
if (!apiKey && params.access !== "keyless") throw new Error("firecrawl_scrape needs a Firecrawl API key. Set FIRECRAWL_API_KEY in the Gateway environment, or configure plugins.entries.firecrawl.config.webFetch.apiKey.");
|
|
397
|
-
const baseUrl = resolveFirecrawlBaseUrl(params.cfg);
|
|
398
390
|
const timeoutSeconds = resolveFirecrawlScrapeTimeoutSeconds(params.cfg, params.timeoutSeconds);
|
|
399
391
|
const onlyMainContent = resolveFirecrawlOnlyMainContent(params.cfg, params.onlyMainContent);
|
|
400
392
|
const maxAgeMs = resolveFirecrawlMaxAgeMs(params.cfg, params.maxAgeMs);
|
package/dist/.setup/{firecrawl-fetch-provider-uRENNKri.mjs → firecrawl-fetch-provider-Br32KRpR.mjs}
RENAMED
|
@@ -51,7 +51,7 @@ const FIRECRAWL_WEB_FETCH_PROVIDER_SHARED = {
|
|
|
51
51
|
};
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region extensions/firecrawl/src/firecrawl-fetch-provider.ts
|
|
54
|
-
const loadFirecrawlClientModule = createLazyRuntimeModule(() => import("./firecrawl-client
|
|
54
|
+
const loadFirecrawlClientModule = createLazyRuntimeModule(() => import("./firecrawl-client--j4MjwgU.mjs").then((n) => n.t));
|
|
55
55
|
function createFirecrawlWebFetchProvider() {
|
|
56
56
|
return {
|
|
57
57
|
...FIRECRAWL_WEB_FETCH_PROVIDER_SHARED,
|
|
@@ -4,7 +4,7 @@ import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
|
4
4
|
import { createWebSearchProviderContractFields, enablePluginInConfig } from "openclaw/plugin-sdk/provider-web-search-contract";
|
|
5
5
|
//#region extensions/firecrawl/src/firecrawl-search-provider.ts
|
|
6
6
|
const FIRECRAWL_CREDENTIAL_PATH = "plugins.entries.firecrawl.config.webSearch.apiKey";
|
|
7
|
-
const loadFirecrawlClientModule = createLazyRuntimeModule(() => import("./firecrawl-client
|
|
7
|
+
const loadFirecrawlClientModule = createLazyRuntimeModule(() => import("./firecrawl-client--j4MjwgU.mjs").then((n) => n.t));
|
|
8
8
|
const GenericFirecrawlSearchSchema = {
|
|
9
9
|
type: "object",
|
|
10
10
|
properties: {
|
package/dist/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as runFirecrawlScrape } from "./.setup/firecrawl-client
|
|
1
|
+
import { n as runFirecrawlScrape } from "./.setup/firecrawl-client--j4MjwgU.mjs";
|
|
2
2
|
//#region extensions/firecrawl/api.ts
|
|
3
3
|
async function fetchFirecrawlContent(params) {
|
|
4
4
|
const cfg = { plugins: { entries: { firecrawl: {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as runFirecrawlScrape, r as runFirecrawlSearch } from "./.setup/firecrawl-client
|
|
2
|
-
import { t as createFirecrawlWebFetchProvider } from "./.setup/firecrawl-fetch-provider-
|
|
3
|
-
import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./.setup/firecrawl-search-provider-
|
|
1
|
+
import { n as runFirecrawlScrape, r as runFirecrawlSearch } from "./.setup/firecrawl-client--j4MjwgU.mjs";
|
|
2
|
+
import { t as createFirecrawlWebFetchProvider } from "./.setup/firecrawl-fetch-provider-Br32KRpR.mjs";
|
|
3
|
+
import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./.setup/firecrawl-search-provider-D_gyroLO.mjs";
|
|
4
4
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
5
5
|
import { optionalStringEnum } from "openclaw/plugin-sdk/channel-actions";
|
|
6
6
|
import { jsonResult, readNonNegativeIntegerParam, readPositiveIntegerParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/provider-web-search";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as createFirecrawlWebFetchProvider } from "./.setup/firecrawl-fetch-provider-
|
|
1
|
+
import { t as createFirecrawlWebFetchProvider } from "./.setup/firecrawl-fetch-provider-Br32KRpR.mjs";
|
|
2
2
|
import "./web-fetch-provider.js";
|
|
3
3
|
export { createFirecrawlWebFetchProvider };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createFirecrawlWebFetchProvider } from "./.setup/firecrawl-fetch-provider-
|
|
1
|
+
import { t as createFirecrawlWebFetchProvider } from "./.setup/firecrawl-fetch-provider-Br32KRpR.mjs";
|
|
2
2
|
export { createFirecrawlWebFetchProvider };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./.setup/firecrawl-search-provider-
|
|
1
|
+
import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./.setup/firecrawl-search-provider-D_gyroLO.mjs";
|
|
2
2
|
import "./web-search-provider.js";
|
|
3
3
|
export { createFirecrawlFreeWebSearchProvider, createFirecrawlWebSearchProvider };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./.setup/firecrawl-search-provider-
|
|
1
|
+
import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./.setup/firecrawl-search-provider-D_gyroLO.mjs";
|
|
2
2
|
export { createFirecrawlFreeWebSearchProvider, createFirecrawlWebSearchProvider };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/firecrawl-plugin",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.3",
|
|
4
4
|
"description": "OpenClaw Firecrawl plugin.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"minHostVersion": ">=2026.6.8"
|
|
22
22
|
},
|
|
23
23
|
"compat": {
|
|
24
|
-
"pluginApi": ">=2026.11.
|
|
24
|
+
"pluginApi": ">=2026.11.3"
|
|
25
25
|
},
|
|
26
26
|
"build": {
|
|
27
|
-
"openclawVersion": "2026.11.
|
|
27
|
+
"openclawVersion": "2026.11.3",
|
|
28
28
|
"bundledDist": false
|
|
29
29
|
},
|
|
30
30
|
"release": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"assets/activity.svg"
|
|
44
44
|
],
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"openclaw": ">=2026.11.
|
|
46
|
+
"openclaw": ">=2026.11.3"
|
|
47
47
|
},
|
|
48
48
|
"peerDependenciesMeta": {
|
|
49
49
|
"openclaw": {
|