@openclaw/firecrawl-plugin 2026.8.2 → 2026.9.1

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.
@@ -0,0 +1,108 @@
1
+ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
2
+ import { readPositiveIntegerParam } from "openclaw/plugin-sdk/param-readers";
3
+ import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
4
+ import { createWebSearchProviderContractFields, enablePluginInConfig } from "openclaw/plugin-sdk/provider-web-search-contract";
5
+ //#region extensions/firecrawl/src/firecrawl-search-provider.ts
6
+ const FIRECRAWL_CREDENTIAL_PATH = "plugins.entries.firecrawl.config.webSearch.apiKey";
7
+ const loadFirecrawlClientModule = createLazyRuntimeModule(() => import("./firecrawl-client-BPFpIblh.js").then((n) => n.t));
8
+ const GenericFirecrawlSearchSchema = {
9
+ type: "object",
10
+ properties: {
11
+ query: {
12
+ type: "string",
13
+ description: "Search query string."
14
+ },
15
+ count: {
16
+ type: "integer",
17
+ description: "Number of results to return (1-10).",
18
+ minimum: 1,
19
+ maximum: 10
20
+ }
21
+ },
22
+ additionalProperties: false
23
+ };
24
+ function getConfiguredFirecrawlFetchCredentialFallback(config) {
25
+ const pluginConfig = asOptionalRecord(config?.plugins?.entries?.firecrawl?.config);
26
+ const value = asOptionalRecord(pluginConfig?.webFetch)?.apiKey;
27
+ return value === void 0 ? void 0 : {
28
+ path: "plugins.entries.firecrawl.config.webFetch.apiKey",
29
+ value
30
+ };
31
+ }
32
+ function createFirecrawlSearchProvider(keyless) {
33
+ const id = keyless ? "firecrawl-free" : "firecrawl";
34
+ const credentialPath = keyless ? "" : FIRECRAWL_CREDENTIAL_PATH;
35
+ return {
36
+ id,
37
+ label: keyless ? "Firecrawl Search (Free)" : "Firecrawl Search",
38
+ hint: keyless ? "Free web search via Firecrawl's hosted starter tier — no API key required" : "Structured results with optional result scraping",
39
+ onboardingScopes: ["text-inference"],
40
+ ...keyless ? {
41
+ requiresCredential: false,
42
+ envVars: [],
43
+ placeholder: "(no key needed)"
44
+ } : {
45
+ credentialLabel: "Firecrawl API key",
46
+ envVars: ["FIRECRAWL_API_KEY"],
47
+ placeholder: "fc-..."
48
+ },
49
+ signupUrl: "https://www.firecrawl.dev/",
50
+ docsUrl: "https://docs.openclaw.ai/tools/firecrawl",
51
+ ...keyless ? {} : { autoDetectOrder: 60 },
52
+ credentialPath,
53
+ ...createWebSearchProviderContractFields({
54
+ credentialPath,
55
+ searchCredential: {
56
+ type: "scoped",
57
+ scopeId: id
58
+ },
59
+ ...keyless ? { selectionPluginId: "firecrawl" } : { configuredCredential: { pluginId: "firecrawl" } }
60
+ }),
61
+ ...keyless ? {} : {
62
+ applySelectionConfig: (config) => {
63
+ const enabled = enablePluginInConfig(config, "firecrawl");
64
+ if (!enabled.enabled || enabled.config.tools?.web?.fetch?.provider) return enabled.config;
65
+ return {
66
+ ...enabled.config,
67
+ tools: {
68
+ ...enabled.config.tools,
69
+ web: {
70
+ ...enabled.config.tools?.web,
71
+ fetch: {
72
+ ...enabled.config.tools?.web?.fetch,
73
+ provider: "firecrawl"
74
+ }
75
+ }
76
+ }
77
+ };
78
+ },
79
+ getConfiguredCredentialFallback: getConfiguredFirecrawlFetchCredentialFallback
80
+ },
81
+ createTool: (ctx) => ({
82
+ description: keyless ? "Search the web using Firecrawl's free hosted starter tier (no API key required). Returns structured results with snippets. Use firecrawl_search for Firecrawl-specific knobs like sources or categories." : "Search the web using Firecrawl. Returns structured results with snippets from Firecrawl Search. Use firecrawl_search for Firecrawl-specific knobs like sources or categories.",
83
+ parameters: GenericFirecrawlSearchSchema,
84
+ execute: async (args, executionContext) => {
85
+ executionContext?.signal?.throwIfAborted();
86
+ const { runFirecrawlSearch } = await loadFirecrawlClientModule();
87
+ return await runFirecrawlSearch({
88
+ cfg: ctx.config,
89
+ query: typeof args.query === "string" ? args.query : "",
90
+ count: readPositiveIntegerParam(args, "count", {
91
+ message: "count must be an integer from 1 to 10",
92
+ max: 10
93
+ }),
94
+ ...keyless ? { access: "keyless" } : {},
95
+ ...executionContext?.signal ? { signal: executionContext.signal } : {}
96
+ });
97
+ }
98
+ })
99
+ };
100
+ }
101
+ function createFirecrawlWebSearchProvider() {
102
+ return createFirecrawlSearchProvider(false);
103
+ }
104
+ function createFirecrawlFreeWebSearchProvider() {
105
+ return createFirecrawlSearchProvider(true);
106
+ }
107
+ //#endregion
108
+ export { createFirecrawlWebSearchProvider as n, createFirecrawlFreeWebSearchProvider as t };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as runFirecrawlScrape, r as runFirecrawlSearch } from "./firecrawl-client-BPFpIblh.js";
2
2
  import { t as createFirecrawlWebFetchProvider } from "./firecrawl-fetch-provider-CIpxLKLq.js";
3
- import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./firecrawl-free-search-provider-BEyEhOfR.js";
3
+ import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./firecrawl-search-provider-80szkO8A.js";
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 { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./firecrawl-free-search-provider-BEyEhOfR.js";
1
+ import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./firecrawl-search-provider-80szkO8A.js";
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 "./firecrawl-free-search-provider-BEyEhOfR.js";
1
+ import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./firecrawl-search-provider-80szkO8A.js";
2
2
  export { createFirecrawlFreeWebSearchProvider, createFirecrawlWebSearchProvider };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/firecrawl-plugin",
3
- "version": "2026.8.2",
3
+ "version": "2026.9.1",
4
4
  "description": "OpenClaw Firecrawl plugin.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,10 +22,10 @@
22
22
  "minHostVersion": ">=2026.6.8"
23
23
  },
24
24
  "compat": {
25
- "pluginApi": ">=2026.8.2"
25
+ "pluginApi": ">=2026.9.1"
26
26
  },
27
27
  "build": {
28
- "openclawVersion": "2026.8.2",
28
+ "openclawVersion": "2026.9.1",
29
29
  "bundledDist": false
30
30
  },
31
31
  "release": {
@@ -42,7 +42,7 @@
42
42
  "README.md"
43
43
  ],
44
44
  "peerDependencies": {
45
- "openclaw": ">=2026.8.2"
45
+ "openclaw": ">=2026.9.1"
46
46
  },
47
47
  "peerDependenciesMeta": {
48
48
  "openclaw": {
@@ -1,71 +0,0 @@
1
- import { buildFirecrawlFreeWebSearchProviderBase, buildFirecrawlWebSearchProviderBase } from "./web-search-shared.js";
2
- import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
3
- import { readPositiveIntegerParam } from "openclaw/plugin-sdk/param-readers";
4
- //#region extensions/firecrawl/src/firecrawl-search-provider.ts
5
- const loadFirecrawlClientModule$1 = createLazyRuntimeModule(() => import("./firecrawl-client-BPFpIblh.js").then((n) => n.t));
6
- const GenericFirecrawlSearchSchema = {
7
- type: "object",
8
- properties: {
9
- query: {
10
- type: "string",
11
- description: "Search query string."
12
- },
13
- count: {
14
- type: "integer",
15
- description: "Number of results to return (1-10).",
16
- minimum: 1,
17
- maximum: 10
18
- }
19
- },
20
- additionalProperties: false
21
- };
22
- function createFirecrawlWebSearchProvider() {
23
- return {
24
- ...buildFirecrawlWebSearchProviderBase(),
25
- createTool: (ctx) => ({
26
- description: "Search the web using Firecrawl. Returns structured results with snippets from Firecrawl Search. Use firecrawl_search for Firecrawl-specific knobs like sources or categories.",
27
- parameters: GenericFirecrawlSearchSchema,
28
- execute: async (args, executionContext) => {
29
- executionContext?.signal?.throwIfAborted();
30
- const { runFirecrawlSearch } = await loadFirecrawlClientModule$1();
31
- return await runFirecrawlSearch({
32
- cfg: ctx.config,
33
- query: typeof args.query === "string" ? args.query : "",
34
- count: readPositiveIntegerParam(args, "count", {
35
- message: "count must be an integer from 1 to 10",
36
- max: 10
37
- }),
38
- ...executionContext?.signal ? { signal: executionContext.signal } : {}
39
- });
40
- }
41
- })
42
- };
43
- }
44
- //#endregion
45
- //#region extensions/firecrawl/src/firecrawl-free-search-provider.ts
46
- const loadFirecrawlClientModule = createLazyRuntimeModule(() => import("./firecrawl-client-BPFpIblh.js").then((n) => n.t));
47
- function createFirecrawlFreeWebSearchProvider() {
48
- return {
49
- ...buildFirecrawlFreeWebSearchProviderBase(),
50
- createTool: (ctx) => ({
51
- description: "Search the web using Firecrawl's free hosted starter tier (no API key required). Returns structured results with snippets. Use firecrawl_search for Firecrawl-specific knobs like sources or categories.",
52
- parameters: GenericFirecrawlSearchSchema,
53
- execute: async (args, executionContext) => {
54
- executionContext?.signal?.throwIfAborted();
55
- const { runFirecrawlSearch } = await loadFirecrawlClientModule();
56
- return await runFirecrawlSearch({
57
- cfg: ctx.config,
58
- query: typeof args.query === "string" ? args.query : "",
59
- count: readPositiveIntegerParam(args, "count", {
60
- message: "count must be an integer from 1 to 10",
61
- max: 10
62
- }),
63
- access: "keyless",
64
- ...executionContext?.signal ? { signal: executionContext.signal } : {}
65
- });
66
- }
67
- })
68
- };
69
- }
70
- //#endregion
71
- export { createFirecrawlWebSearchProvider as n, createFirecrawlFreeWebSearchProvider as t };
@@ -1,77 +0,0 @@
1
- import { createWebSearchProviderContractFields, enablePluginInConfig } from "openclaw/plugin-sdk/provider-web-search-contract";
2
- //#region extensions/firecrawl/web-search-shared.ts
3
- const FIRECRAWL_CREDENTIAL_PATH = "plugins.entries.firecrawl.config.webSearch.apiKey";
4
- const FIRECRAWL_FETCH_CREDENTIAL_PATH = "plugins.entries.firecrawl.config.webFetch.apiKey";
5
- function getConfiguredFirecrawlFetchCredentialFallback(config) {
6
- const apiKey = (config?.plugins?.entries?.firecrawl?.config)?.webFetch?.apiKey;
7
- return apiKey === void 0 ? void 0 : {
8
- path: FIRECRAWL_FETCH_CREDENTIAL_PATH,
9
- value: apiKey
10
- };
11
- }
12
- function buildFirecrawlWebSearchProviderBase() {
13
- const contractFields = createWebSearchProviderContractFields({
14
- credentialPath: FIRECRAWL_CREDENTIAL_PATH,
15
- searchCredential: {
16
- type: "scoped",
17
- scopeId: "firecrawl"
18
- },
19
- configuredCredential: { pluginId: "firecrawl" }
20
- });
21
- return {
22
- id: "firecrawl",
23
- label: "Firecrawl Search",
24
- hint: "Structured results with optional result scraping",
25
- onboardingScopes: ["text-inference"],
26
- credentialLabel: "Firecrawl API key",
27
- envVars: ["FIRECRAWL_API_KEY"],
28
- placeholder: "fc-...",
29
- signupUrl: "https://www.firecrawl.dev/",
30
- docsUrl: "https://docs.openclaw.ai/tools/firecrawl",
31
- autoDetectOrder: 60,
32
- credentialPath: FIRECRAWL_CREDENTIAL_PATH,
33
- ...contractFields,
34
- applySelectionConfig: (config) => {
35
- const enabled = enablePluginInConfig(config, "firecrawl");
36
- if (!enabled.enabled || enabled.config.tools?.web?.fetch?.provider) return enabled.config;
37
- return {
38
- ...enabled.config,
39
- tools: {
40
- ...enabled.config.tools,
41
- web: {
42
- ...enabled.config.tools?.web,
43
- fetch: {
44
- ...enabled.config.tools?.web?.fetch,
45
- provider: "firecrawl"
46
- }
47
- }
48
- }
49
- };
50
- },
51
- getConfiguredCredentialFallback: getConfiguredFirecrawlFetchCredentialFallback
52
- };
53
- }
54
- function buildFirecrawlFreeWebSearchProviderBase() {
55
- return {
56
- id: "firecrawl-free",
57
- label: "Firecrawl Search (Free)",
58
- hint: "Free web search via Firecrawl's hosted starter tier — no API key required",
59
- onboardingScopes: ["text-inference"],
60
- requiresCredential: false,
61
- envVars: [],
62
- placeholder: "(no key needed)",
63
- signupUrl: "https://www.firecrawl.dev/",
64
- docsUrl: "https://docs.openclaw.ai/tools/firecrawl",
65
- credentialPath: "",
66
- ...createWebSearchProviderContractFields({
67
- credentialPath: "",
68
- searchCredential: {
69
- type: "scoped",
70
- scopeId: "firecrawl-free"
71
- },
72
- selectionPluginId: "firecrawl"
73
- })
74
- };
75
- }
76
- //#endregion
77
- export { buildFirecrawlFreeWebSearchProviderBase, buildFirecrawlWebSearchProviderBase };