openclaw-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 CHANGED
@@ -21,6 +21,8 @@ Typical advantages:
21
21
  - **better article/document readability** for downstream agent analysis
22
22
  - **useful metadata** like title, author, published date, site, and language when available
23
23
  - **batch fan-out support** when you want to fetch multiple URLs in one tool call
24
+ - **attachment and binary download support** when a server returns `Content-Disposition: attachment` or a non-text content type
25
+ - **temp-file output** with sanitized filenames and file metadata instead of trying to render binary bytes as page text
24
26
 
25
27
  A good rule of thumb:
26
28
  - use built-in `web_fetch` for simple pages
@@ -103,6 +105,15 @@ For `batch_smart_fetch`, `requests` is an array of objects, and **each item acce
103
105
  This is the cleaned readable content extracted from the page.
104
106
  ```
105
107
 
108
+ ### `smart_fetch` attachment/binary output
109
+
110
+ ```text
111
+ > URL: https://example.com/download/report
112
+ > File size: 999999
113
+ > Mime type: application/pdf
114
+ > File path: /absolute/path/to/temp/report.pdf
115
+ ```
116
+
106
117
  ### `batch_smart_fetch`
107
118
 
108
119
  ```text
@@ -165,9 +176,12 @@ Configurable defaults include:
165
176
  - `removeImages`
166
177
  - `includeReplies`
167
178
  - `batchConcurrency`
179
+ - `tempDir`
168
180
 
169
181
  `batchConcurrency` defaults to `8` and controls how many `batch_smart_fetch` requests run concurrently.
170
182
 
183
+ `tempDir` lets the OpenClaw consumer choose where attachment/binary downloads are written before the tool returns their absolute file paths.
184
+
171
185
  ## When not to use it
172
186
 
173
187
  Do not use these tools when:
@@ -177,3 +191,10 @@ Do not use these tools when:
177
191
  - a full browser session is required
178
192
 
179
193
  In those cases, use browser automation instead.
194
+
195
+ ## Recent feature additions reflected here
196
+
197
+ Recent `feat:` work added:
198
+ - publish-ready TS/test/build packaging workflow across the monorepo
199
+ - richer animated batch progress behavior in pi-facing consumers
200
+ - attachment and binary download streaming with sanitized temp-file output
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ interface FetchToolConfig {
7
7
  removeImages?: boolean;
8
8
  includeReplies?: IncludeRepliesOption;
9
9
  batchConcurrency?: number;
10
+ tempDir?: string;
10
11
  }
11
12
  interface FetchToolDefaults {
12
13
  maxChars: number;
@@ -16,6 +17,7 @@ interface FetchToolDefaults {
16
17
  removeImages: boolean;
17
18
  includeReplies: IncludeRepliesOption;
18
19
  batchConcurrency: number;
20
+ tempDir?: string;
19
21
  }
20
22
 
21
23
  type PluginConfig = FetchToolConfig;