@rjshrjndrn/pi-fetch 0.1.0 → 0.1.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/README.md +3 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Powered by [Defuddle](https://github.com/kepano/defuddle) by [Steph Ango](https:
|
|
|
8
8
|
|
|
9
9
|
Registers a `web_fetch` tool that the LLM can call with any URL. Under the hood:
|
|
10
10
|
|
|
11
|
-
1. **
|
|
11
|
+
1. **Native `fetch`** retrieves the HTML (lightweight, no browser engine)
|
|
12
12
|
2. **[Defuddle](https://github.com/kepano/defuddle)** extracts the main content, stripping navigation, ads, sidebars, cookie banners, and clutter
|
|
13
13
|
3. Returns clean **Markdown** with metadata (title, author, description, word count)
|
|
14
14
|
|
|
@@ -32,7 +32,7 @@ Output is automatically truncated to stay within pi's context limits.
|
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
34
|
# As a pi package
|
|
35
|
-
pi install npm
|
|
35
|
+
pi install npm:@rjshrjndrn/pi-fetch
|
|
36
36
|
|
|
37
37
|
# Or test locally
|
|
38
38
|
pi -e ./extensions/index.ts
|
|
@@ -50,7 +50,7 @@ Or the LLM will use `web_fetch` automatically when it needs to read a webpage.
|
|
|
50
50
|
|
|
51
51
|
## Limitations
|
|
52
52
|
|
|
53
|
-
- **No JavaScript rendering** —
|
|
53
|
+
- **No JavaScript rendering** — uses native `fetch`, not a browser. SPAs that require JS to render content will return empty or minimal results. For those, you'll still need a headless browser.
|
|
54
54
|
- **Some sites block non-browser requests** — sites with aggressive bot detection may reject the request.
|
|
55
55
|
- **Output truncation** — very large pages are truncated to 50KB / 2000 lines to protect context window.
|
|
56
56
|
|
|
@@ -65,7 +65,6 @@ npm test
|
|
|
65
65
|
## Credits
|
|
66
66
|
|
|
67
67
|
- **[Defuddle](https://github.com/kepano/defuddle)** by [Steph Ango (kepano)](https://github.com/kepano) — content extraction engine
|
|
68
|
-
- **[JSDOM](https://github.com/jsdom/jsdom)** — HTML parsing without a browser
|
|
69
68
|
- **[pi](https://github.com/badlogic/pi-mono)** by [Mario Zechner (badlogic)](https://github.com/badlogic) — agent framework
|
|
70
69
|
|
|
71
70
|
## License
|