@ssk_dev/pi-web-access-lean
Lean Pi version of pi-web-access: full web search, source checks and page fetching through one compact tool, plus local PDF reading.
Package details
Install @ssk_dev/pi-web-access-lean from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@ssk_dev/pi-web-access-lean- Package
@ssk_dev/pi-web-access-lean- Version
0.48.0- Published
- Nov 21, 2026
- Downloads
- 1,294/mo · 76/wk
- Author
- ssk_dev
- License
- MIT
- Types
- extension
- Size
- 21.5 KB
- Dependencies
- 1 dependency · 4 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-web-access-lean
Search, check and fetch the web from Pi, through one small tool.
简体中文 · Full setup: My Lean Pi Setup
A lean version of pi-web-access. It runs the upstream 0.48.0 engine as-is and folds its four tools into one web_access tool with a short schema.
Install
pi install npm:@ssk_dev/pi-web-access-lean
Requires Pi >=0.84.1 and Node.js >=22.19.0. Don't install it alongside upstream or another pi-web-access wrapper, or the tools get registered twice.
Compared with upstream
Kept: web search, result pagination, source checking and page fetching, all from upstream's engine.
Trimmed:
web_search,source_check,fetch_contentandget_search_contentbecome oneweb_accesstool.- Everyday calls take a plain string
input; full schemas and advanced parameters stay out of the prompt until the model asks withhelp.
Added:
- Local PDFs:
op: "fetch"reads local PDF files (R:/doc.pdf, Windows paths,file:///...and relative paths), which upstream's SSRF guard blocks. The extracted Markdown is saved locally with page and character counts. - Forgiving arguments: a missing
opis inferred from unambiguous fields (responseId,url/urls,claim,query/queries, or a bare URL/PDF path versus plain text). An objectinputis serialized, and upstream fields placed at the top level are merged intoinput; a field that disagrees withinputis rejected, never silently dropped.
Usage
The model sees one tool, web_access:
op |
Purpose | input |
|---|---|---|
search |
Search the web | Query |
check |
Check a claim or source | Claim |
fetch |
Fetch a URL or local PDF | URL or PDF path |
get |
Continue a stored result | Response ID |
help |
Show full parameters | Operation name |
{ "op": "search", "input": "Pi coding agent extensions" }
For batches or advanced parameters, pass a JSON object encoded as the input string.
Token comparison
With only this extension enabled, what the model reads on every turn:
| Variant | Breakdown | Total |
|---|---|---|
Lean @ssk_dev/pi-web-access-lean@0.48.0 |
web_access (153) |
153 |
Upstream pi-web-access@0.48.0 |
web_search (338) + source_check (225) + fetch_content (372) + get_search_content (230) |
1,165 |
Method: Pi 1.4.0, each variant measured in its own temporary process with an empty working directory and configuration. Built-in tools, skills, context files, session history, user messages, other extensions, runtime UI and slash commands are not counted; before_agent_start additions are. Tokens are estimated as ceil(characters / 4), not billed tokens.
Development
npm ci
npm run check
License
MIT. The runtime comes from pi-web-access (MIT).