pi-web-access 0.4.2 → 0.4.3
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 +5 -0
- package/README.md +1 -4
- package/index.ts +2 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.4.3] - 2026-01-27
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- Google API compatibility: Use `StringEnum` for `recencyFilter` to avoid unsupported `anyOf`/`const` JSON Schema patterns
|
|
11
|
+
|
|
7
12
|
## [0.4.2] - 2026-01-27
|
|
8
13
|
|
|
9
14
|
### Fixed
|
package/README.md
CHANGED
|
@@ -14,10 +14,7 @@ fetch_content({ url: "https://docs.example.com/guide" })
|
|
|
14
14
|
## Install
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
|
|
18
|
-
git clone https://github.com/nicobailon/pi-web-access ~/.pi/agent/extensions/pi-web-access
|
|
19
|
-
cd ~/.pi/agent/extensions/pi-web-access
|
|
20
|
-
npm install
|
|
17
|
+
pi install npm:pi-web-access
|
|
21
18
|
```
|
|
22
19
|
|
|
23
20
|
Add your Perplexity API key:
|
package/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
|
|
2
2
|
import { Key, Text, truncateToWidth } from "@mariozechner/pi-tui";
|
|
3
3
|
import { Type } from "@sinclair/typebox";
|
|
4
|
+
import { StringEnum } from "@mariozechner/pi-ai";
|
|
4
5
|
import { fetchAllContent, type ExtractedContent } from "./extract.js";
|
|
5
6
|
import { searchWithPerplexity, type SearchResult } from "./perplexity.js";
|
|
6
7
|
import {
|
|
@@ -166,9 +167,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
166
167
|
numResults: Type.Optional(Type.Number({ description: "Results per query (default: 5, max: 20)" })),
|
|
167
168
|
includeContent: Type.Optional(Type.Boolean({ description: "Fetch full page content (async)" })),
|
|
168
169
|
recencyFilter: Type.Optional(
|
|
169
|
-
|
|
170
|
-
description: "Filter by recency",
|
|
171
|
-
}),
|
|
170
|
+
StringEnum(["day", "week", "month", "year"], { description: "Filter by recency" }),
|
|
172
171
|
),
|
|
173
172
|
domainFilter: Type.Optional(Type.Array(Type.String(), { description: "Limit to domains (prefix with - to exclude)" })),
|
|
174
173
|
}),
|