pi-better-web-search 0.1.2 → 0.1.4
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 +16 -0
- package/docs/publishing.md +6 -6
- package/lib/search.ts +3 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
- Return `Failed: This tool is not available in this conversation.` when all
|
|
6
|
+
search providers fail during execution, preventing leaking internal provider
|
|
7
|
+
attempt errors to the model.
|
|
8
|
+
- Return `Failed: URL fetch is not available in this conversation.` when URL
|
|
9
|
+
fetching is requested but no URL-capable provider is available.
|
|
10
|
+
- Technical attempt errors and provider routing remain recorded in
|
|
11
|
+
`details.attempts` for logs and UI inspection.
|
|
12
|
+
|
|
13
|
+
## 0.1.3
|
|
14
|
+
|
|
15
|
+
- Simplify error message when no supported provider is available: return
|
|
16
|
+
`Failed: This tool is not available in this conversation.` instead of exposing
|
|
17
|
+
internal provider and credential configuration instructions to the model.
|
|
18
|
+
|
|
3
19
|
## 0.1.2
|
|
4
20
|
|
|
5
21
|
- Remove provider/model routing metadata from the model-facing JSON output
|
package/docs/publishing.md
CHANGED
|
@@ -30,7 +30,7 @@ local `pi-web-search` reference checkout, `.env` files, and `DESIGN.md`.
|
|
|
30
30
|
npm run build
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
This produces `dist/pi-better-web-search-0.1.
|
|
33
|
+
This produces `dist/pi-better-web-search-0.1.4.tgz`. The tarball is not
|
|
34
34
|
committed.
|
|
35
35
|
|
|
36
36
|
## Publish
|
|
@@ -42,7 +42,7 @@ npm publish --access public
|
|
|
42
42
|
Alternatively, publish the verified tarball directly:
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
npm publish dist/pi-better-web-search-0.1.
|
|
45
|
+
npm publish dist/pi-better-web-search-0.1.4.tgz --access public
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
`prepublishOnly` reruns the checks, tests, and package verification. npm may
|
|
@@ -51,10 +51,10 @@ require browser or OTP authentication.
|
|
|
51
51
|
## Tag and release
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
|
-
git tag -a v0.1.
|
|
55
|
-
git push origin v0.1.
|
|
56
|
-
gh release create v0.1.
|
|
57
|
-
--title "v0.1.
|
|
54
|
+
git tag -a v0.1.4 -m "v0.1.4"
|
|
55
|
+
git push origin v0.1.4
|
|
56
|
+
gh release create v0.1.4 dist/pi-better-web-search-0.1.4.tgz \
|
|
57
|
+
--title "v0.1.4" \
|
|
58
58
|
--notes-file /path/to/release-notes.md
|
|
59
59
|
```
|
|
60
60
|
|
package/lib/search.ts
CHANGED
|
@@ -416,26 +416,20 @@ export async function runWebSearch(
|
|
|
416
416
|
if (searchRequested) {
|
|
417
417
|
const candidates = getSearchCandidates(resolution);
|
|
418
418
|
if (candidates.length === 0) {
|
|
419
|
-
const message =
|
|
420
|
-
"No supported web search provider is available. Configure a supported model or credentials and try again.";
|
|
419
|
+
const message = "This tool is not available in this conversation.";
|
|
421
420
|
return formatError(message, { attempts, error: message });
|
|
422
421
|
}
|
|
423
422
|
|
|
424
423
|
searchSuccess = await runSearch(resolution, query, signal, onUpdate, attempts);
|
|
425
424
|
if (!searchSuccess) {
|
|
426
|
-
const
|
|
427
|
-
const message = `Web search failed. ${failure}`;
|
|
425
|
+
const message = "This tool is not available in this conversation.";
|
|
428
426
|
return formatError(message, { attempts, error: message });
|
|
429
427
|
}
|
|
430
428
|
}
|
|
431
429
|
|
|
432
430
|
const fetchCandidates = validFetchRequested ? getFetchCandidates(resolution) : [];
|
|
433
431
|
if (validFetchRequested && fetchCandidates.length === 0) {
|
|
434
|
-
const
|
|
435
|
-
...urls,
|
|
436
|
-
...urlErrors.map((entry) => `${entry.url} (${entry.error})`),
|
|
437
|
-
];
|
|
438
|
-
const message = `URL fetch failed. No URL fetch provider is available for: ${requestedUrls.join(", ")}`;
|
|
432
|
+
const message = "URL fetch is not available in this conversation.";
|
|
439
433
|
// The search half succeeded; remember it even though the URL half did not.
|
|
440
434
|
const cache = nextCache(resolution, searchSuccess?.candidate, undefined);
|
|
441
435
|
if (cache) writeCache(cache);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-better-web-search",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "A better provider-native web_search tool for pi: raw results, automatic provider fallback, URL analysis, and native DeepSeek Search/Fetch.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|