@bacnh85/pi-web 0.7.0 → 0.7.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 +11 -0
- package/README.md +6 -8
- package/extensions/index.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.1 (2026-09-12)
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- `before_agent_start` routing guidance now falls back to `pi.getActiveTools()`
|
|
8
|
+
when the host omits `systemPromptOptions` (mirrors pi-fff), so guidance no
|
|
9
|
+
longer silently skips injection.
|
|
10
|
+
- README: corrected default backend URLs to `127.0.0.1` (matching code defaults
|
|
11
|
+
in `lib/config.ts`), removed the nonexistent `npm run test:unit` script
|
|
12
|
+
reference, documented the `web_search` `timeout_ms` parameter.
|
|
13
|
+
|
|
3
14
|
## 0.7.0 (2026-09-11)
|
|
4
15
|
|
|
5
16
|
### Added
|
package/README.md
CHANGED
|
@@ -25,10 +25,10 @@ Variables:
|
|
|
25
25
|
| Variable | Required | Default | Notes |
|
|
26
26
|
|---|---|---|---|
|
|
27
27
|
| `BRAVE_API_KEY` | No (1) | — | Brave Search API key |
|
|
28
|
-
| `SEARXNG_BASE_URL` | No | `http://
|
|
28
|
+
| `SEARXNG_BASE_URL` | No | `http://127.0.0.1:8888` | Self-hosted SearXNG |
|
|
29
29
|
| `FIRECRAWL_API_URL` | No | `https://api.firecrawl.dev/v2` | Self-hosted or hosted |
|
|
30
30
|
| `FIRECRAWL_API_KEY` | No (2) | — | Required for hosted Firecrawl |
|
|
31
|
-
| `CRAWL4AI_API_URL` | No | `http://
|
|
31
|
+
| `CRAWL4AI_API_URL` | No | `http://127.0.0.1:11235` | Self-hosted Crawl4AI |
|
|
32
32
|
| `CRAWL4AI_API_TOKEN` | No (3) | — | Required if Crawl4AI auth enabled |
|
|
33
33
|
|
|
34
34
|
> (1) At least one search backend (SearXNG, Brave, or Firecrawl) must be configured for `web_search`.
|
|
@@ -66,6 +66,7 @@ Parameters:
|
|
|
66
66
|
| `engines` | string | — | SearXNG engine override, e.g. `google,github` |
|
|
67
67
|
| `include_content` | boolean | false | Fetch page content alongside results |
|
|
68
68
|
| `content_chars` | number | 5000 | Max content chars per result |
|
|
69
|
+
| `timeout_ms` | number | per-backend | Request timeout in ms (SearXNG/static 15000, Firecrawl/Crawl4AI 60000) |
|
|
69
70
|
|
|
70
71
|
**Auto-selection behavior:**
|
|
71
72
|
|
|
@@ -188,10 +189,10 @@ Typical output:
|
|
|
188
189
|
```json
|
|
189
190
|
{
|
|
190
191
|
"brave": { "apiKeyFound": true, "apiKeySource": "process.env" },
|
|
191
|
-
"searxng": { "baseUrl": "http://
|
|
192
|
-
"firecrawl": { "baseUrl": "http://
|
|
192
|
+
"searxng": { "baseUrl": "http://127.0.0.1:8888", ... },
|
|
193
|
+
"firecrawl": { "baseUrl": "http://127.0.0.1:3002/v2", ... },
|
|
193
194
|
"crawl4ai": {
|
|
194
|
-
"baseUrl": "http://
|
|
195
|
+
"baseUrl": "http://127.0.0.1:11235",
|
|
195
196
|
...
|
|
196
197
|
"health": { "status": "healthy", "version": "0.5.0", ... }
|
|
197
198
|
},
|
|
@@ -248,7 +249,4 @@ See [CHANGELOG.md](CHANGELOG.md) for release history.
|
|
|
248
249
|
```bash
|
|
249
250
|
# Run all tests
|
|
250
251
|
npm test
|
|
251
|
-
|
|
252
|
-
# Run only unit tests
|
|
253
|
-
npm run test:unit
|
|
254
252
|
```
|
package/extensions/index.ts
CHANGED
|
@@ -505,7 +505,7 @@ export default function piWebExtension(pi: ExtensionAPI) {
|
|
|
505
505
|
// Inject the backend-selection protocol only when a web_* tool is actually
|
|
506
506
|
// active, so recon agents / sessions without pi-web carry zero overhead.
|
|
507
507
|
pi.on("before_agent_start", async (event) => {
|
|
508
|
-
const active = event.systemPromptOptions?.selectedTools ??
|
|
508
|
+
const active = event.systemPromptOptions?.selectedTools ?? pi.getActiveTools();
|
|
509
509
|
if (!active.some((t) => t.startsWith("web_"))) return;
|
|
510
510
|
return { systemPrompt: `${event.systemPrompt}\n\n${WEB_ROUTING_GUIDANCE}` };
|
|
511
511
|
});
|
package/package.json
CHANGED