{"_id":"@capotej/pi-zsearch","_rev":"2-1fc0bb135a501ca78f23f631ff8e3e65","name":"@capotej/pi-zsearch","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@capotej/pi-zsearch","version":"1.0.0","keywords":["pi-package","zai","zsearch"],"author":{"name":"Julio Capote","email":"6135+capotej@users.noreply.github.com"},"license":"MIT","_id":"@capotej/pi-zsearch@1.0.0","maintainers":[{"name":"capotej","email":"jcapote@gmail.com"}],"homepage":"https://github.com/capotej/pi-zsearch#readme","bugs":{"url":"https://github.com/capotej/pi-zsearch/issues"},"pi":{"extensions":["./dist/index.js"]},"dist":{"shasum":"caf057c249a8f3c2e6c5ae71f178eaf6c34ec1be","tarball":"https://registry.npmjs.org/@capotej/pi-zsearch/-/pi-zsearch-1.0.0.tgz","fileCount":5,"integrity":"sha512-EzfXnhM0b/kiYYpNbxbPdbwVClbNLa17qg1MO504u5NwnBNI0G2MOaMNIp1gNCtvLnwlejhFdy3E19X8lfJTpA==","signatures":[{"sig":"MEYCIQCOL8MQBt7UZ2iir/wIFh00UwDpfec2l/T3V1VGppzE4gIhAOP4lDPmhFwKnGoXtWZm4FdNNk/M5Mpa/pnqJBo7nGU6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13779},"type":"module","gitHead":"179d14f1b5807b3979b1aae52706bcbb3d7c6a2b","scripts":{"lint":"biome check .","build":"tsc","format":"biome format --write .","prepare":"tsc","lint:fix":"biome check --write ."},"_npmUser":{"name":"capotej","email":"jcapote@gmail.com"},"repository":{"url":"git+https://github.com/capotej/pi-zsearch.git","type":"git"},"_npmVersion":"11.12.1","description":"Adds web_search and web_read tools powered by the Z.AI API.","directories":{},"_nodeVersion":"26.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.33.2","devDependencies":{"typescript":"^6.0.2","@types/node":"^22.0.0","@biomejs/biome":"1.9.4","@mariozechner/pi-coding-agent":"^0.73.1"},"peerDependencies":{"@mariozechner/pi-coding-agent":"^0.73.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-zsearch_1.0.0_1780844230583_0.9467427819711569","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@capotej/pi-zsearch","version":"1.1.0","type":"module","description":"Adds web_search and web_read tools powered by the Z.AI API.","keywords":["pi-package","zai","zsearch"],"license":"MIT","author":{"name":"Julio Capote","email":"6135+capotej@users.noreply.github.com"},"repository":{"type":"git","url":"git+https://github.com/capotej/pi-zsearch.git"},"pi":{"extensions":["./dist/index.js"]},"peerDependencies":{"@mariozechner/pi-coding-agent":"^0.73.0"},"devDependencies":{"@biomejs/biome":"1.9.4","@mariozechner/pi-coding-agent":"^0.73.1","@types/node":"^22.0.0","typescript":"^6.0.2"},"scripts":{"build":"tsc","prepare":"tsc","lint":"biome check .","lint:fix":"biome check --write .","format":"biome format --write ."},"packageManager":"pnpm@10.33.2","publishConfig":{"access":"public"},"gitHead":"e772d4bb524a36cabafc30c8cd10f10ed5f59d2a","_id":"@capotej/pi-zsearch@1.1.0","bugs":{"url":"https://github.com/capotej/pi-zsearch/issues"},"homepage":"https://github.com/capotej/pi-zsearch#readme","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-78A7bLrK9lXwACn/5hmVtZNn/UIxg7UFsCYWYw5xtnJ2Rj+Xsk+ZXviFvCEsNbUGQr8BnYUZqWKPIEU8PwZF/Q==","shasum":"bac526cc1846e536295b697e34b2cebdfb4ab2fe","tarball":"https://registry.npmjs.org/@capotej/pi-zsearch/-/pi-zsearch-1.1.0.tgz","fileCount":5,"unpackedSize":19161,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCuQ7Rk6ahyTXnQ1VEF436j6yUgclvSZfdAepHYMjRviQIhAKBImvsnld4gVYX92LKfTVr+eMH3L5P2a9VvODDvRh13"}]},"_npmUser":{"name":"capotej","email":"jcapote@gmail.com"},"directories":{},"maintainers":[{"name":"capotej","email":"jcapote@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-zsearch_1.1.0_1783131213475_0.1332647641814637"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-07T14:57:10.400Z","modified":"2026-07-04T02:13:33.698Z","1.0.0":"2026-06-07T14:57:10.712Z","1.1.0":"2026-07-04T02:13:33.606Z"},"bugs":{"url":"https://github.com/capotej/pi-zsearch/issues"},"author":{"name":"Julio Capote","email":"6135+capotej@users.noreply.github.com"},"license":"MIT","homepage":"https://github.com/capotej/pi-zsearch#readme","keywords":["pi-package","zai","zsearch"],"repository":{"type":"git","url":"git+https://github.com/capotej/pi-zsearch.git"},"description":"Adds web_search and web_read tools powered by the Z.AI API.","maintainers":[{"name":"capotej","email":"jcapote@gmail.com"}],"readme":"# @capotej/pi-zsearch\n\nA [pi](https://github.com/badlogic/pi-mono) extension that adds web search and web page reading capabilities via the [Z.AI API](https://z.ai).\n\n## Tools\n\n### `web_search`\n\nSearch the web using the [Z.AI Web Search API](https://docs.z.ai/guides/tools/web-search). Returns structured results with titles, summaries, URLs, source names, and publication dates.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `query` | string | ✅ | — | The search query |\n| `domain` | string | ❌ | — | Limit to a specific domain (e.g. `github.com`) |\n| `recency` | enum | ❌ | `noLimit` | Time filter: `oneDay`, `oneWeek`, `oneMonth`, `oneYear`, `noLimit` |\n| `content_size` | enum | ❌ | `medium` | Summary length: `medium` (~400–600 words) or `high` (~2500 words, higher cost) |\n| `location` | enum | ❌ | `cn` | Region bias: `cn` (Chinese region) or `us` (non-Chinese region) |\n\n### `web_read`\n\nRead and parse a web page using the [Z.AI Web Reader API](https://docs.z.ai/api-reference/tools/web-reader). Returns page content as markdown or plain text.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `url` | string | ✅ | — | The URL to read |\n| `return_format` | enum | ❌ | `markdown` | Output format: `markdown` or `text` |\n| `no_cache` | boolean | ❌ | `false` | Disable caching |\n| `retain_images` | boolean | ❌ | `true` | Keep images in output |\n| `no_gfm` | boolean | ❌ | `false` | Disable GitHub Flavored Markdown |\n| `keep_img_data_url` | boolean | ❌ | `false` | Keep image data URLs |\n| `with_images_summary` | boolean | ❌ | `false` | Include image summary |\n| `with_links_summary` | boolean | ❌ | `false` | Include links summary |\n| `timeout` | number | ❌ | `20` | Request timeout in seconds |\n\n## Installation\n\n```bash\npi install npm:@capotej/pi-zsearch\n```\n\n## Setup\n\nSet the `ZAI_API_KEY` environment variable. Get your API key at [z.ai/manage-apikey](https://z.ai/manage-apikey/apikey-list).\n\n```bash\nexport ZAI_API_KEY=\"your-api-key\"\n```\n\n## Development\n\n```bash\nnpm install\nnpm run build\n```\n\n## License\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"}