pi-web-toolkit 0.3.0 → 0.3.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.
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.3.1] - 2026-06-23
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- UI consistency fixes for the three Firecrawl keyless tools and their fallback paths:
|
|
15
|
+
- `firecrawl_interact` renderCall: removed em-dash prose (` — prompt`), now purely tag-style (consistent with `web_browse`/`web_fetch`).
|
|
16
|
+
- `web_browse` fallback render: now displays `creditsUsed` (was filled in execute but missing in render).
|
|
17
|
+
- `firecrawl_scrape`/`firecrawl_interact` isPartial: now includes target domain (e.g. `Scraping example.com via Firecrawl...`), matching `web_fetch`/`web_browse` style.
|
|
18
|
+
|
|
10
19
|
## [0.3.0] - 2026-06-23
|
|
11
20
|
|
|
12
21
|
### Added
|
|
@@ -23,7 +23,7 @@ import { Type, type Static } from "typebox";
|
|
|
23
23
|
import { StringEnum } from "@earendil-works/pi-ai";
|
|
24
24
|
import { interactKeyless } from "./utils/firecrawl";
|
|
25
25
|
import { writeWithFallback } from "./utils/output-sink";
|
|
26
|
-
import { abbreviateUrl, getErrorText, normalizeWhitespace } from "./utils/render-helpers";
|
|
26
|
+
import { abbreviateUrl, getDomain, getErrorText, normalizeWhitespace } from "./utils/render-helpers";
|
|
27
27
|
|
|
28
28
|
export const FirecrawlInteractParamsSchema = Type.Object({
|
|
29
29
|
url: Type.String({ description: "Full URL to open and interact with" }),
|
|
@@ -90,7 +90,6 @@ const firecrawlInteractTool = defineTool({
|
|
|
90
90
|
renderCall(args, theme) {
|
|
91
91
|
let text = theme.fg("toolTitle", theme.bold("firecrawl_interact "));
|
|
92
92
|
text += theme.fg("muted", args.url);
|
|
93
|
-
if (args.prompt) text += theme.fg("dim", ` — ${args.prompt.slice(0, 60)}`);
|
|
94
93
|
return new Text(text, 0, 0);
|
|
95
94
|
},
|
|
96
95
|
|
|
@@ -98,7 +97,9 @@ const firecrawlInteractTool = defineTool({
|
|
|
98
97
|
const isError = context?.isError ?? false;
|
|
99
98
|
|
|
100
99
|
if (isPartial) {
|
|
101
|
-
|
|
100
|
+
const domain = details?.url ? getDomain(details.url) : "";
|
|
101
|
+
const label = domain ? `Interacting with ${domain} via Firecrawl...` : "Interacting via Firecrawl...";
|
|
102
|
+
return new Text(theme.fg("warning", label), 0, 0);
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
const details = result.details as {
|
|
@@ -25,7 +25,7 @@ import { Type, type Static } from "typebox";
|
|
|
25
25
|
import { scrapeKeyless } from "./utils/firecrawl";
|
|
26
26
|
import { extractPreview } from "./utils/content-preview";
|
|
27
27
|
import { writeWithFallback } from "./utils/output-sink";
|
|
28
|
-
import { abbreviateUrl, getErrorText, normalizeWhitespace, formatExtraction } from "./utils/render-helpers";
|
|
28
|
+
import { abbreviateUrl, getDomain, getErrorText, normalizeWhitespace, formatExtraction } from "./utils/render-helpers";
|
|
29
29
|
|
|
30
30
|
export const FirecrawlScrapeParamsSchema = Type.Object({
|
|
31
31
|
url: Type.String({ description: "Full URL to fetch (e.g. https://example.com/article)" }),
|
|
@@ -99,7 +99,9 @@ const firecrawlScrapeTool = defineTool({
|
|
|
99
99
|
const isError = context?.isError ?? false;
|
|
100
100
|
|
|
101
101
|
if (isPartial) {
|
|
102
|
-
|
|
102
|
+
const domain = details?.url ? getDomain(details.url) : "";
|
|
103
|
+
const label = domain ? `Scraping ${domain} via Firecrawl...` : "Scraping via Firecrawl...";
|
|
104
|
+
return new Text(theme.fg("warning", label), 0, 0);
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
const details = result.details as {
|
package/extensions/web_browse.ts
CHANGED
|
@@ -323,6 +323,9 @@ const webBrowseTool = defineTool({
|
|
|
323
323
|
if (details?.viaFirecrawl) {
|
|
324
324
|
text += theme.fg("accent", " [Firecrawl keyless]");
|
|
325
325
|
}
|
|
326
|
+
if (details?.creditsUsed !== undefined) {
|
|
327
|
+
text += theme.fg("muted", ` ${details.creditsUsed} credits`);
|
|
328
|
+
}
|
|
326
329
|
if (details?.title) {
|
|
327
330
|
text += ` ${theme.fg("toolTitle", details.title)}`;
|
|
328
331
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-web-toolkit",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Web research toolkit for the pi coding agent. Search via SearXNG, fetch pages with scrapling, browse interactively via agent-browser, batch-read sources in parallel, and optionally fall back to Firecrawl Keyless (no API key) when a local backend fails.",
|
|
5
5
|
"author": "Wade Huang <fastwade11@gmail.com>",
|
|
6
6
|
"license": "MIT",
|