pi-smart-fetch 0.2.10 → 0.2.13
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 +24 -2
- package/dist/index.js +9934 -151
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,7 +19,10 @@ Compared with naive Node.js `fetch()`, this package gives you:
|
|
|
19
19
|
- **single and batch tools**: `web_fetch` for one URL, `batch_web_fetch` for many
|
|
20
20
|
- **pi-specific behavior** including an optional `verbose` flag and defaults from pi settings
|
|
21
21
|
- **bounded batch fan-out** with a configurable default concurrency of `8`
|
|
22
|
-
- **a richer pi TUI for batch mode** with per-item rows, truncated URLs, statuses,
|
|
22
|
+
- **a richer pi TUI for batch mode** with per-item rows, truncated URLs, statuses, small progress bars, and timer-driven spinner animation
|
|
23
|
+
- **attachment and binary download support** when a response is an attachment or non-text payload
|
|
24
|
+
- **temp-file output** with sanitized filenames plus returned file metadata (`URL`, `File size`, `Mime type`, `File path`)
|
|
25
|
+
- **publish-ready packaging/test workflow** across the monorepo for safer releases
|
|
23
26
|
- **lower overhead than browser automation** when you do not need JS execution, login, scrolling, or clicks
|
|
24
27
|
- **clear limits**: it does not execute JavaScript or solve interactive anti-bot flows
|
|
25
28
|
|
|
@@ -128,6 +131,15 @@ This is the cleaned readable content extracted from the page.
|
|
|
128
131
|
It includes the same body content, but with a richer metadata header.
|
|
129
132
|
```
|
|
130
133
|
|
|
134
|
+
### Attachment/binary `web_fetch` output
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
> URL: https://example.com/download/report
|
|
138
|
+
> File size: 999999
|
|
139
|
+
> Mime type: application/pdf
|
|
140
|
+
> File path: /absolute/path/to/temp/report.pdf
|
|
141
|
+
```
|
|
142
|
+
|
|
131
143
|
### `batch_web_fetch` output
|
|
132
144
|
|
|
133
145
|
```text
|
|
@@ -195,7 +207,8 @@ Optional custom settings in `~/.pi/agent/settings.json` or `.pi/settings.json`:
|
|
|
195
207
|
"smartFetchDefaultOs": "windows",
|
|
196
208
|
"smartFetchDefaultRemoveImages": false,
|
|
197
209
|
"smartFetchDefaultIncludeReplies": "extractors",
|
|
198
|
-
"smartFetchDefaultBatchConcurrency": 8
|
|
210
|
+
"smartFetchDefaultBatchConcurrency": 8,
|
|
211
|
+
"smartFetchTempDir": "/tmp/smart-fetch-pi"
|
|
199
212
|
}
|
|
200
213
|
```
|
|
201
214
|
|
|
@@ -208,12 +221,14 @@ Behavior:
|
|
|
208
221
|
- `smartFetchDefaultRemoveImages` sets the default for image stripping
|
|
209
222
|
- `smartFetchDefaultIncludeReplies` sets the default replies/comments behavior
|
|
210
223
|
- `smartFetchDefaultBatchConcurrency` sets the default bounded concurrency for `batch_web_fetch`
|
|
224
|
+
- `smartFetchTempDir` sets the base temp directory used for attachments and binary downloads
|
|
211
225
|
- project `.pi/settings.json` overrides global `~/.pi/agent/settings.json`
|
|
212
226
|
|
|
213
227
|
Legacy aliases still supported:
|
|
214
228
|
- `webFetchVerboseByDefault`
|
|
215
229
|
- `webFetchDefaultMaxChars`
|
|
216
230
|
- `webFetchDefaultBatchConcurrency`
|
|
231
|
+
- `webFetchTempDir`
|
|
217
232
|
|
|
218
233
|
## When not to use it
|
|
219
234
|
|
|
@@ -224,3 +239,10 @@ Do not use these tools when:
|
|
|
224
239
|
- you need a fully interactive browser session
|
|
225
240
|
|
|
226
241
|
In those cases, switch to browser automation.
|
|
242
|
+
|
|
243
|
+
## Recent feature additions reflected here
|
|
244
|
+
|
|
245
|
+
Recent `feat:` work added:
|
|
246
|
+
- publish-ready TS tooling, tests, and packaging checks
|
|
247
|
+
- timer-driven spinner animation for batch progress in the pi TUI
|
|
248
|
+
- attachment and binary streaming into temp files with sanitized output paths
|