@parcha/pi-browser 0.1.0-beta.38 → 0.1.0-beta.39

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 CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.1.0-beta.39 (2026-11-16)
6
+
7
+ - A template eval case can fake the web: `web: unavailable` in its `case.yaml` fails every `web_search` with the words a rate-limited free search answers with and every `web_fetch` as a page that never answers, and `web: <fixture file>` answers each search from the first answer whose `query` (a regular expression) matches and each page from the answer for its exact URL, else the fixture's default. No call reaches the network, the calls show in the run's timeline and the graders' tool calls, so `tool_used` counts them, and the fixture is checked whole before any run.
8
+ - The same fake holds on pi, claude-agent and codex: on claude-agent and codex a faked case's runs are never offered the harness's own web search, so the run's `web_search` is the one that answers.
9
+ - Only the eval's own in-process server honours `web`; no package field, API field, setting or environment variable turns it on, and a case with `web` refuses to run with `--server`.
10
+ - Fix: a guarded public fetch of a 2xx answer with no body (204, 205) reads as an empty page instead of failing with "Cannot read properties of null".
11
+
5
12
  ## 0.1.0-beta.38 (2026-11-14)
6
13
 
7
14
  - web_fetch reads a site's feeds: a reply of type `application/<name>+xml` or `application/<name>+json` (`application/atom+xml`, `application/rss+xml`, `application/ld+json`) is text, read as it came.
@@ -115,6 +115,9 @@ export async function publicFetch(url, options = {}) {
115
115
  const contentType = res.headers.get("content-type") ?? "";
116
116
  if (!res.ok)
117
117
  return { url: target.href, status: res.status, contentType, body: null };
118
+ // A 2xx with no body at all (204, 205) is an empty page, whatever type it names.
119
+ if (!res.body)
120
+ return { url: target.href, status: res.status, contentType, body: "" };
118
121
  if (!TEXT_TYPE.test(contentType))
119
122
  throw refusedError(`refused: ${contentType || "an unknown content type"} is not text`);
120
123
  const chunks = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcha/pi-browser",
3
- "version": "0.1.0-beta.38",
3
+ "version": "0.1.0-beta.39",
4
4
  "description": "Your agent gets its own browser, and you can take over and hand it back.",
5
5
  "keywords": [
6
6
  "pi-durable",