@narumitw/pi-firecrawl 0.1.16 → 0.1.18
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/package.json +1 -1
- package/src/firecrawl.ts +5 -5
package/package.json
CHANGED
package/src/firecrawl.ts
CHANGED
|
@@ -73,7 +73,7 @@ const scrapeTool = defineTool({
|
|
|
73
73
|
location: Type.Optional(Type.Any({ description: "Firecrawl location options." })),
|
|
74
74
|
}),
|
|
75
75
|
async execute(_toolCallId, params, signal, _onUpdate, ctx) {
|
|
76
|
-
return withStatus(ctx, "
|
|
76
|
+
return withStatus(ctx, "🔥 scrape", async () => {
|
|
77
77
|
const payload = await firecrawlRequest("POST", "/scrape", cleanObject(params), signal);
|
|
78
78
|
return jsonResult(payload);
|
|
79
79
|
});
|
|
@@ -111,7 +111,7 @@ const crawlTool = defineTool({
|
|
|
111
111
|
webhook: Type.Optional(Type.Any({ description: "Firecrawl webhook configuration." })),
|
|
112
112
|
}),
|
|
113
113
|
async execute(_toolCallId, params, signal, _onUpdate, ctx) {
|
|
114
|
-
return withStatus(ctx, "
|
|
114
|
+
return withStatus(ctx, "🔥 crawl", async () => {
|
|
115
115
|
const payload = await firecrawlRequest("POST", "/crawl", cleanObject(params), signal);
|
|
116
116
|
return jsonResult(payload);
|
|
117
117
|
});
|
|
@@ -127,7 +127,7 @@ const crawlStatusTool = defineTool({
|
|
|
127
127
|
id: Type.String({ description: "Crawl job id returned by firecrawl_crawl." }),
|
|
128
128
|
}),
|
|
129
129
|
async execute(_toolCallId, params, signal, _onUpdate, ctx) {
|
|
130
|
-
return withStatus(ctx, "
|
|
130
|
+
return withStatus(ctx, "🔥 crawl status", async () => {
|
|
131
131
|
const payload = await firecrawlRequest(
|
|
132
132
|
"GET",
|
|
133
133
|
`/crawl/${encodeURIComponent(params.id)}`,
|
|
@@ -159,7 +159,7 @@ const mapTool = defineTool({
|
|
|
159
159
|
limit: Type.Optional(Type.Number({ description: "Maximum number of URLs to return." })),
|
|
160
160
|
}),
|
|
161
161
|
async execute(_toolCallId, params, signal, _onUpdate, ctx) {
|
|
162
|
-
return withStatus(ctx, "
|
|
162
|
+
return withStatus(ctx, "🔥 map", async () => {
|
|
163
163
|
const payload = await firecrawlRequest("POST", "/map", cleanObject(params), signal);
|
|
164
164
|
return jsonResult(payload);
|
|
165
165
|
});
|
|
@@ -183,7 +183,7 @@ const searchTool = defineTool({
|
|
|
183
183
|
),
|
|
184
184
|
}),
|
|
185
185
|
async execute(_toolCallId, params, signal, _onUpdate, ctx) {
|
|
186
|
-
return withStatus(ctx, "
|
|
186
|
+
return withStatus(ctx, "🔥 search", async () => {
|
|
187
187
|
const payload = await firecrawlRequest("POST", "/search", cleanObject(params), signal);
|
|
188
188
|
return jsonResult(payload);
|
|
189
189
|
});
|