Skip to content

Commit e33b055

Browse files
committed
fix(firecrawl,daytona): export the search envelope consts, correct the toolbox TSDoc
The generated firecrawl doc hoisted the web item's fields onto data itself, because the docs generator matches 'properties: CONST' at any depth and hit the nested items. Splitting the envelope into an exported *_OUTPUT_PROPERTIES const matches the pattern the rest of the file already uses. Daytona's daytonaToolboxUrl now records why every call site omits baseUrl: the request carries the bearer token, so the host must never come from a caller, and a real fix needs a server-side lookup.
1 parent 202416a commit e33b055

2 files changed

Lines changed: 56 additions & 24 deletions

File tree

apps/docs/content/docs/en/integrations/firecrawl.mdx

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,38 @@ Search for information on the web using Firecrawl
176176
| Parameter | Type | Description |
177177
| --------- | ---- | ----------- |
178178
| `data` | object | Search results, grouped by the sources requested |
179-
|`title` | string | Title from the search result |
180-
|`description` | string | Description from the search result |
181-
|`url` | string | URL of the search result |
179+
|`web` | array | Web results \(returned by default, or when "web" is in sources\) |
180+
|`markdown` | string | Page content in markdown \(when scrapeOptions.formats includes "markdown"\) |
181+
|`html` | string | Processed HTML content \(when scrapeOptions.formats includes "html"\) |
182+
|`rawHtml` | string | Unprocessed raw HTML \(when scrapeOptions.formats includes "rawHtml"\) |
183+
|`links` | array | Links found on the page \(when scrapeOptions.formats includes "links"\) |
184+
|`screenshot` | string | Screenshot URL \(expires after 24 hours, when scrapeOptions.formats includes "screenshot"\) |
185+
|`audio` | string | Signed URL to the extracted MP3 \(when scrapeOptions.formats includes "audio"\); expires after 1 hour |
186+
|`video` | string | Signed URL to the extracted video \(when scrapeOptions.formats includes "video"\); expires after 1 hour |
187+
|`title` | string | Title from the search result |
188+
|`description` | string | Description from the search result |
189+
|`url` | string | URL of the search result |
190+
|`news` | array | News results \(only when "news" is in sources\) |
191+
|`markdown` | string | Page content in markdown \(when scrapeOptions.formats includes "markdown"\) |
192+
|`html` | string | Processed HTML content \(when scrapeOptions.formats includes "html"\) |
193+
|`rawHtml` | string | Unprocessed raw HTML \(when scrapeOptions.formats includes "rawHtml"\) |
194+
|`links` | array | Links found on the page \(when scrapeOptions.formats includes "links"\) |
195+
|`screenshot` | string | Screenshot URL \(expires after 24 hours, when scrapeOptions.formats includes "screenshot"\) |
196+
|`audio` | string | Signed URL to the extracted MP3 \(when scrapeOptions.formats includes "audio"\); expires after 1 hour |
197+
|`video` | string | Signed URL to the extracted video \(when scrapeOptions.formats includes "video"\); expires after 1 hour |
198+
|`title` | string | Title of the article |
199+
|`snippet` | string | Snippet from the article |
200+
|`url` | string | URL of the article |
201+
|`date` | string | Date of the article |
202+
|`imageUrl` | string | URL of the article's image |
203+
|`position` | number | Rank of the article within the news results \(1-based\) |
204+
|`images` | array | Image results \(only when "images" is in sources\) |
205+
|`title` | string | Title from the search result |
206+
|`imageUrl` | string | URL of the image itself |
207+
|`imageWidth` | number | Width of the image in pixels |
208+
|`imageHeight` | number | Height of the image in pixels |
209+
|`url` | string | URL of the page containing the image |
210+
|`position` | number | Rank of the result within the image results \(1-based\) |
182211
| `warning` | string | Warning message if any issues occurred during the search |
183212
| `id` | string | ID of the search job |
184213
| `creditsUsed` | number | Number of credits the search consumed |

apps/sim/tools/firecrawl/types.ts

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export const CRAWLED_PAGE_OUTPUT_PROPERTIES = {
149149
*
150150
* Based on the `data.web[]` / `data.news[]` items of POST /v2/search.
151151
*/
152-
const SEARCH_SCRAPED_OUTPUT_PROPERTIES = {
152+
export const SEARCH_SCRAPED_OUTPUT_PROPERTIES = {
153153
markdown: {
154154
type: 'string',
155155
description: 'Page content in markdown (when scrapeOptions.formats includes "markdown")',
@@ -252,29 +252,32 @@ export const SEARCH_IMAGE_RESULT_OUTPUT_PROPERTIES = {
252252
* an image `imageUrl` have no equivalent on a web result and would be lost if
253253
* the sources were merged.
254254
*/
255+
export const SEARCH_DATA_OUTPUT_PROPERTIES = {
256+
web: {
257+
type: 'array',
258+
description: 'Web results (returned by default, or when "web" is in sources)',
259+
optional: true,
260+
items: { type: 'object', properties: SEARCH_WEB_RESULT_OUTPUT_PROPERTIES },
261+
},
262+
news: {
263+
type: 'array',
264+
description: 'News results (only when "news" is in sources)',
265+
optional: true,
266+
items: { type: 'object', properties: SEARCH_NEWS_RESULT_OUTPUT_PROPERTIES },
267+
},
268+
images: {
269+
type: 'array',
270+
description: 'Image results (only when "images" is in sources)',
271+
optional: true,
272+
items: { type: 'object', properties: SEARCH_IMAGE_RESULT_OUTPUT_PROPERTIES },
273+
},
274+
} as const satisfies Record<string, OutputProperty>
275+
276+
/** The declared `data` output of POST /v2/search. */
255277
export const SEARCH_DATA_OUTPUT: OutputProperty = {
256278
type: 'object',
257279
description: 'Search results, grouped by the sources requested',
258-
properties: {
259-
web: {
260-
type: 'array',
261-
description: 'Web results (returned by default, or when "web" is in sources)',
262-
optional: true,
263-
items: { type: 'object', properties: SEARCH_WEB_RESULT_OUTPUT_PROPERTIES },
264-
},
265-
news: {
266-
type: 'array',
267-
description: 'News results (only when "news" is in sources)',
268-
optional: true,
269-
items: { type: 'object', properties: SEARCH_NEWS_RESULT_OUTPUT_PROPERTIES },
270-
},
271-
images: {
272-
type: 'array',
273-
description: 'Image results (only when "images" is in sources)',
274-
optional: true,
275-
items: { type: 'object', properties: SEARCH_IMAGE_RESULT_OUTPUT_PROPERTIES },
276-
},
277-
},
280+
properties: SEARCH_DATA_OUTPUT_PROPERTIES,
278281
}
279282

280283
/** Declared shape of one `MapDocument` entry in a map result. */

0 commit comments

Comments
 (0)