pi-webfind 0.5.0 → 0.5.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/lib/adapters.ts +1 -1
- package/lib/engine.ts +1 -1
- package/lib/fetcher.ts +1 -1
- package/lib/version.ts +4 -0
- package/package.json +1 -1
package/lib/adapters.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { getJson } from "./apis.ts";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
import { TOOL_UA as UA } from "./version.ts";
|
|
11
11
|
|
|
12
12
|
async function getText(url: string, signal?: AbortSignal, headers?: Record<string, string>): Promise<string> {
|
|
13
13
|
const timeout = AbortSignal.timeout(20_000);
|
package/lib/engine.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { createDiskBackedCache } from "./cache.ts";
|
|
|
16
16
|
const UA =
|
|
17
17
|
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36";
|
|
18
18
|
// r.jina.ai blocks fake browser UAs but allows honest tool UAs (opposite of most sites)
|
|
19
|
-
|
|
19
|
+
import { TOOL_UA } from "./version.ts";
|
|
20
20
|
const TIMEOUT_MS = 15_000;
|
|
21
21
|
|
|
22
22
|
export interface SearchResult {
|
package/lib/fetcher.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { extractPdf, extractPdfViaPoppler } from "./pdf.ts";
|
|
|
11
11
|
export const UA =
|
|
12
12
|
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36";
|
|
13
13
|
// r.jina.ai blocks fake browser UAs but allows honest tool UAs (opposite of most sites)
|
|
14
|
-
|
|
14
|
+
import { TOOL_UA } from "./version.ts";
|
|
15
15
|
|
|
16
16
|
const FETCH_CACHE = createDiskBackedCache({ name: "fetch", maxEntries: 256, ttlMs: 60 * 60 * 1000 }); // 1h, survives restarts
|
|
17
17
|
const lastHitByHost = new Map<string, number>();
|
package/lib/version.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// Single source of truth for the tool's version, used in UA strings.
|
|
2
|
+
// Kept in sync with package.json manually on release (release checklist item).
|
|
3
|
+
export const VERSION = "0.5.1";
|
|
4
|
+
export const TOOL_UA = `pi-webfind/${VERSION} (free web research toolkit for pi coding agent; +https://github.com/jawwadzafar/pi-webfind)`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-webfind",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Claude Code-style web research for the pi coding agent \u2014 WebSearch, query-aware fetch (PDFs, Wayback, site adapters, markdown extraction), Stack Overflow, GitHub, HN, Wikipedia, npm. 100% free, no API keys.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|