pi-web-providers 3.0.0 โ†’ 3.1.0

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.
Files changed (3) hide show
  1. package/README.md +29 -24
  2. package/dist/index.js +1164 -300
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -27,13 +27,13 @@ not as a replacement for source inspection or deeper research.
27
27
  extraction from `web_search` results in the background and reuse the cached
28
28
  pages later for faster follow-up reads
29
29
 
30
- ## ๐Ÿ“ฆ Install
30
+ ## ๐Ÿš€ Installation
31
31
 
32
- ```bash
32
+ ```sh
33
33
  pi install npm:pi-web-providers
34
34
  ```
35
35
 
36
- ## โš™๏ธ Configure
36
+ ## โš™๏ธ Configuration
37
37
 
38
38
  Run:
39
39
 
@@ -46,6 +46,12 @@ settings UI mirrors the three sections below: tools, providers, and settings.
46
46
 
47
47
  Each tool can be routed to any compatible provider:
48
48
 
49
+ Provider credentials can be literal values, environment variable names, or
50
+ `!command` references. pi-web-providers resolves those secrets lazily on the
51
+ first matching tool use, not when a session starts. This avoids startup delays
52
+ from password-manager commands such as `op`; missing or failing secrets are
53
+ reported when the tool is actually called.
54
+
49
55
  **Built-in local providers**
50
56
 
51
57
  | Provider | search | contents | answer | research | Auth |
@@ -143,6 +149,8 @@ investigations.
143
149
  When you ask more than one question, the response is grouped into per-question
144
150
  sections. Batch related questions when the answers belong together; split them
145
151
  into sibling calls when earlier independent answers can unblock the next step.
152
+ Collapsed results show a short answer preview; expand the tool result to read the
153
+ full answer.
146
154
 
147
155
  <details>
148
156
  <summary><strong>Parameters and behavior</strong></summary>
@@ -194,6 +202,8 @@ The built-in providers below integrate with official SDKs or documented APIs.
194
202
  - API: Brave Search API and Brave Answers API
195
203
  - Supports `web_search` via Web Search, plus optional `llm_context`, `news`, `videos`, `images`, and `places` search modes
196
204
  - Supports `web_answer` and `web_research` via Brave Answers streaming chat completions
205
+ - Uses the Answers API replacement for Brave's deprecated Summarizer API; answer and research search controls are sent through `web_search_options`
206
+ - Exposes the Answers `model` option (`brave` or `brave-pro`) for answer and research calls
197
207
  - `web_contents` stays routed to URL-fetch providers; Brave LLM Context is query-based retrieval and is exposed as a search mode instead
198
208
  - Brave Answers may require a different key or plan than Brave Search
199
209
 
@@ -312,6 +322,10 @@ scope, or account ID is usually wrong.
312
322
  `location`, `timeout`, and `scrapeOptions`
313
323
  - Exposes contents options such as `formats`, `onlyMainContent`, `includeTags`,
314
324
  `excludeTags`, `waitFor`, `headers`, `location`, `mobile`, and `proxy`
325
+ - Optional `baseUrl` overrides are supported for self-hosted Firecrawl
326
+ instances, proxies, and testing. API keys are required for Firecrawl Cloud,
327
+ but can be omitted for self-hosted endpoints that do not enforce
328
+ authentication.
315
329
 
316
330
  </details>
317
331
 
@@ -465,9 +479,15 @@ call.
465
479
  <summary><strong>Serper</strong></summary>
466
480
 
467
481
  - API: Serper HTTP API
468
- - Supports `web_search` via Serper's Google search endpoint
469
- - Good fit for fast, straightforward Google-style organic search results
470
- - Exposes search options `gl`, `hl`, `location`, `page`, and `autocorrect`
482
+ - Supports `web_search` via Serper's Google endpoints for web, image, video,
483
+ places, maps, reviews, news, shopping, product reviews, Lens, Scholar,
484
+ patents, autocomplete, and webpage results
485
+ - Good fit for fast, straightforward Google-style search results
486
+ - Exposes search options `mode`, `gl`, `hl`, `location`, `page`, `tbs`,
487
+ `autocorrect`, and mode-specific fields such as `url`, `ll`, `placeId`,
488
+ `cid`, `fid`, `productId`, `nextPageToken`, and webpage include flags.
489
+ Reviews mode uses the top-level query when no place identifier is provided.
490
+ `includeMarkdown` defaults to `true` for webpage scraping
471
491
  - Preserves rich metadata from Serper responses, including ranking position,
472
492
  sitelinks, attributes, and top-level response context such as
473
493
  `knowledgeGraph`, `answerBox`, `peopleAlsoAsk`, and `relatedSearches`
@@ -620,27 +640,12 @@ providers unless overridden in a provider's own `settings` block:
620
640
  | `retryDelayMs` | `2000` | Initial delay before retrying |
621
641
  | `researchTimeoutMs` | `1800000` | Maximum total time for an async `web_research` job (30 min) |
622
642
 
623
- ## ๐Ÿ”Ž Live smoke tests
624
-
625
- Use the opt-in live smoke runner to validate the configured providers with the
626
- same config-resolution and execution path the extension uses at runtime:
627
-
628
- ```bash
629
- npm run smoke:live
630
- ```
631
-
632
- Optional filters:
643
+ ## ๐Ÿงน Uninstall
633
644
 
634
- ```bash
635
- npm run smoke:live -- --provider gemini
636
- npm run smoke:live -- --tool contents
637
- npm run smoke:live -- --include-research
645
+ ```sh
646
+ pi remove npm:pi-web-providers
638
647
  ```
639
648
 
640
- The default run exercises `search`, `contents`, and `answer`. Research probes
641
- are excluded unless you pass `--include-research`, because they are slower and
642
- may incur higher provider cost.
643
-
644
649
  ## ๐Ÿ“„ License
645
650
 
646
651
  [MIT](LICENSE)