web_fetch from @eleith-pi/web-fetch@0.1.1 consistently returns:
Source: https://example.com
Error (unavailable): Native fetch dependencies are unavailable; check the package installation and supported platform.
The dependencies are installed and the native transport works. Investigation isolated a package-name resolution failure inside the compiled Pi runtime. An absolute-path dependency load allowed the fetch to succeed in an isolated Pi diagnostic.
The exact failing exception from the original live tool's lazy import has not been captured. The resolver failure below was captured independently inside an isolated Pi extension; it is strong evidence for the integration issue, not proof of its ultimate upstream cause.
Running under nono. Successful control tests ran within the same outer sandbox. This investigation did not establish a sandbox denial for the dependency load.
Live web_fetch failed for both the PageSpeed report below and https://example.com, including format: "raw".
Under shell Node, imports of wreq-js, defuddle/node, and linkedom all succeeded.
A direct wreq-js.fetch("https://example.com", { browser: "chrome_147", os: "windows", timeout: 8000 }) returned HTTP 200 under shell Node.
The installed bundle's fetch core, evaluated without Pi-specific imports, fetched example.com successfully under both shell Node and standalone Bun.
In an isolated compiled-Pi diagnostic, the dependency's package.json was readable and an absolute import of its CJS entry succeeded, but package-name resolution failed:
In the isolated Pi diagnostic, evaluating the cached tool module with host Pi exports and a dependency-import shim reproduced unavailable when the shim used package-name resolution. Changing only the shim's wreq-js lookup to the installed absolute CJS entry produced HTTP 200 and a valid tool result. This was a diagnostic control, not a production patch.
Minimal resolver comparison
Run this inside a temporary Pi extension's session_start handler, with errors caught separately so both branches run:
import{createRequire}from'node:module';constrequire=createRequire('/home/eleith/.pi/agent/npm/node_modules/@eleith-pi/web-fetch/package.json');// Fails in the compiled-Pi diagnostic, succeeds in shell Node:
require.resolve('wreq-js');// Succeeds in the compiled-Pi diagnostic:
awaitimport('/home/eleith/.pi/agent/npm/node_modules/@eleith-pi/web-fetch/node_modules/wreq-js/dist/wreq-js.cjs');
The isolated diagnostic was started without model requests:
That local scratch file contains the fuller diagnostic, including evaluation of the cached transformed bundle and the successful absolute-path control. It is a temporary local artifact, not committed source, and may be cleaned up later.
Error reporting hides the useful cause
In the installed dist/index.js:
Around line 394: lazy import("wreq-js") catches and discards the original exception.
Around lines 1853–1859: fetchTool broadly catches unexpected failures and reports unavailable.
Around lines 1911–1921: boundedItem replaces error messages with messages[item.code], hiding even more specific internal messages.
Consequently, the visible tool error cannot distinguish a missing native binding, package-resolution failure, or another unexpected exception.
Suggested investigation / fixes
Capture the original lazy-import exception through a bounded, sanitized diagnostic channel; preserve useful error codes/causes without exposing credentials.
Reproduce using the compiled Pi executable, not only Node tests or a different standalone Bun version.
Investigate the interaction between Pi's extension/Jiti loading, embedded Bun resolution, and wreq-js package exports (bun/require point to CJS; import points to ESM).
Evaluate static dependency imports or bundling the JS wrapper while leaving native bindings external. These are candidates to test, not verified fixes.
Add a compiled-Pi smoke test for an actual raw fetch, then separately verify markdown extraction and batch fetching.
Avoid hardcoding the local absolute path as a production fix.
No installed plugin files were modified during this investigation. Only a scratch diagnostic extension was created.
curl could retrieve that report; example.com reproduced the tool failure independently of PageSpeed.
## Summary
`web_fetch` from `@eleith-pi/web-fetch@0.1.1` consistently returns:
```text
Source: https://example.com
Error (unavailable): Native fetch dependencies are unavailable; check the package installation and supported platform.
```
The dependencies are installed and the native transport works. Investigation isolated a package-name resolution failure inside the compiled Pi runtime. An absolute-path dependency load allowed the fetch to succeed in an isolated Pi diagnostic.
The exact failing exception from the original live tool's lazy import has **not** been captured. The resolver failure below was captured independently inside an isolated Pi extension; it is strong evidence for the integration issue, not proof of its ultimate upstream cause.
## Environment
- Linux x86_64
- Pi 1.5.0, installed as a compiled executable
- Runtime reported **inside Pi**: `process.version = v26.3.0`, `process.versions.bun = 1.4.4`
- Shell Node: v26.5.0
- Standalone Bun: 1.3.13 (different from Pi's embedded Bun)
- `@eleith-pi/web-fetch`: 0.1.1
- Dependencies: `wreq-js` 3.2.0, `defuddle` 0.19.4, `linkedom` 0.18.13
- Running under nono. Successful control tests ran within the same outer sandbox. This investigation did not establish a sandbox denial for the dependency load.
Installed package:
```text
/home/eleith/.pi/agent/npm/node_modules/@eleith-pi/web-fetch
```
## Confirmed observations
1. Live `web_fetch` failed for both the PageSpeed report below and `https://example.com`, including `format: "raw"`.
2. Under shell Node, imports of `wreq-js`, `defuddle/node`, and `linkedom` all succeeded.
3. A direct `wreq-js.fetch("https://example.com", { browser: "chrome_147", os: "windows", timeout: 8000 })` returned HTTP 200 under shell Node.
4. The installed bundle's fetch core, evaluated without Pi-specific imports, fetched `example.com` successfully under both shell Node and standalone Bun.
5. In an isolated compiled-Pi diagnostic, the dependency's `package.json` was readable and an absolute import of its CJS entry succeeded, but package-name resolution failed:
```js
const require = createRequire(
'/home/eleith/.pi/agent/npm/node_modules/@eleith-pi/web-fetch/package.json'
);
require.resolve('wreq-js');
```
```text
ResolveMessage: Cannot find module 'wreq-js'
Require stack:
- /home/eleith/.pi/agent/npm/node_modules/@eleith-pi/web-fetch/package.json
```
The same `createRequire(...).resolve('wreq-js')` succeeds under shell Node and returns:
```text
/home/eleith/.pi/agent/npm/node_modules/@eleith-pi/web-fetch/node_modules/wreq-js/dist/wreq-js.cjs
```
6. In the isolated Pi diagnostic, evaluating the cached tool module with host Pi exports and a dependency-import shim reproduced `unavailable` when the shim used package-name resolution. Changing **only the shim's `wreq-js` lookup** to the installed absolute CJS entry produced HTTP 200 and a valid tool result. This was a diagnostic control, not a production patch.
## Minimal resolver comparison
Run this inside a temporary Pi extension's `session_start` handler, with errors caught separately so both branches run:
```ts
import { createRequire } from 'node:module';
const require = createRequire(
'/home/eleith/.pi/agent/npm/node_modules/@eleith-pi/web-fetch/package.json'
);
// Fails in the compiled-Pi diagnostic, succeeds in shell Node:
require.resolve('wreq-js');
// Succeeds in the compiled-Pi diagnostic:
await import(
'/home/eleith/.pi/agent/npm/node_modules/@eleith-pi/web-fetch/node_modules/wreq-js/dist/wreq-js.cjs'
);
```
The isolated diagnostic was started without model requests:
```sh
pi --offline --mode rpc --no-session --no-extensions --no-mcp \
--no-skills --no-prompt-templates --no-themes --no-context-files \
-e /home/eleith/.local/state/nono-scratch/web-fetch-diagnostic.ts
```
That local scratch file contains the fuller diagnostic, including evaluation of the cached transformed bundle and the successful absolute-path control. It is a temporary local artifact, not committed source, and may be cleaned up later.
## Error reporting hides the useful cause
In the installed `dist/index.js`:
- Around line 394: lazy `import("wreq-js")` catches and discards the original exception.
- Around lines 1853–1859: `fetchTool` broadly catches unexpected failures and reports `unavailable`.
- Around lines 1911–1921: `boundedItem` replaces error messages with `messages[item.code]`, hiding even more specific internal messages.
Consequently, the visible tool error cannot distinguish a missing native binding, package-resolution failure, or another unexpected exception.
## Suggested investigation / fixes
- Capture the original lazy-import exception through a bounded, sanitized diagnostic channel; preserve useful error codes/causes without exposing credentials.
- Reproduce using the **compiled Pi executable**, not only Node tests or a different standalone Bun version.
- Investigate the interaction between Pi's extension/Jiti loading, embedded Bun resolution, and `wreq-js` package exports (`bun`/`require` point to CJS; `import` points to ESM).
- Evaluate static dependency imports or bundling the JS wrapper while leaving native bindings external. These are candidates to test, **not verified fixes**.
- Add a compiled-Pi smoke test for an actual raw fetch, then separately verify markdown extraction and batch fetching.
- Avoid hardcoding the local absolute path as a production fix.
No installed plugin files were modified during this investigation. Only a scratch diagnostic extension was created.
## Original context
Discovered while investigating:
https://pagespeed.web.dev/analysis/https-when-eleith-com-schedule-walk/9tc5ob8nsx?form_factor=mobile
`curl` could retrieve that report; `example.com` reproduced the tool failure independently of PageSpeed.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
web_fetchfrom@eleith-pi/web-fetch@0.1.1consistently returns:The dependencies are installed and the native transport works. Investigation isolated a package-name resolution failure inside the compiled Pi runtime. An absolute-path dependency load allowed the fetch to succeed in an isolated Pi diagnostic.
The exact failing exception from the original live tool's lazy import has not been captured. The resolver failure below was captured independently inside an isolated Pi extension; it is strong evidence for the integration issue, not proof of its ultimate upstream cause.
Environment
process.version = v26.3.0,process.versions.bun = 1.4.4@eleith-pi/web-fetch: 0.1.1wreq-js3.2.0,defuddle0.19.4,linkedom0.18.13Installed package:
Confirmed observations
web_fetchfailed for both the PageSpeed report below andhttps://example.com, includingformat: "raw".wreq-js,defuddle/node, andlinkedomall succeeded.wreq-js.fetch("https://example.com", { browser: "chrome_147", os: "windows", timeout: 8000 })returned HTTP 200 under shell Node.example.comsuccessfully under both shell Node and standalone Bun.package.jsonwas readable and an absolute import of its CJS entry succeeded, but package-name resolution failed:The same
createRequire(...).resolve('wreq-js')succeeds under shell Node and returns:unavailablewhen the shim used package-name resolution. Changing only the shim'swreq-jslookup to the installed absolute CJS entry produced HTTP 200 and a valid tool result. This was a diagnostic control, not a production patch.Minimal resolver comparison
Run this inside a temporary Pi extension's
session_starthandler, with errors caught separately so both branches run:The isolated diagnostic was started without model requests:
That local scratch file contains the fuller diagnostic, including evaluation of the cached transformed bundle and the successful absolute-path control. It is a temporary local artifact, not committed source, and may be cleaned up later.
Error reporting hides the useful cause
In the installed
dist/index.js:import("wreq-js")catches and discards the original exception.fetchToolbroadly catches unexpected failures and reportsunavailable.boundedItemreplaces error messages withmessages[item.code], hiding even more specific internal messages.Consequently, the visible tool error cannot distinguish a missing native binding, package-resolution failure, or another unexpected exception.
Suggested investigation / fixes
wreq-jspackage exports (bun/requirepoint to CJS;importpoints to ESM).No installed plugin files were modified during this investigation. Only a scratch diagnostic extension was created.
Original context
Discovered while investigating:
https://pagespeed.web.dev/analysis/https-when-eleith-com-schedule-walk/9tc5ob8nsx?form_factor=mobile
curlcould retrieve that report;example.comreproduced the tool failure independently of PageSpeed.