{"_id":"@agent-sh/harness-webfetch","_rev":"2-131207e2ffacc2138a6d8a2311ba1370","name":"@agent-sh/harness-webfetch","dist-tags":{"latest":"0.7.1"},"versions":{"0.2.0":{"name":"@agent-sh/harness-webfetch","version":"0.2.0","keywords":["ai","agent","llm","tool-use","webfetch","http","fetch","url","readability","bedrock","openai"],"author":{"name":"Avi Fenesh"},"license":"MIT","_id":"@agent-sh/harness-webfetch@0.2.0","maintainers":[{"name":"avifenesh","email":"aviarchi1994@gmail.com"}],"homepage":"https://github.com/avifenesh/tools/tree/main/packages/webfetch#readme","bugs":{"url":"https://github.com/avifenesh/tools/issues"},"dist":{"shasum":"ffdfd8470aa4d62c42747cbf465398973af39cdf","tarball":"https://registry.npmjs.org/@agent-sh/harness-webfetch/-/harness-webfetch-0.2.0.tgz","fileCount":9,"integrity":"sha512-VzFwAHUMaOOUi1TNhIp9SmlNedH6yZRZV96Zls2UUgb1F107/U2hab8ggQBY89ZVGntqdtUrLl4M7SR4QYmVwg==","signatures":[{"sig":"MEQCIFp9iDVEWQ3MP2w1utDOaMJtmQPdK7aKumAvi5lZV7pkAiAFn+ciukbEFT/aUjQhkYZvrRggQpKQZ54zMsNA0REcGA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":274710},"main":"./dist/index.cjs","type":"module","_from":"file:agent-sh-harness-webfetch-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"test":"vitest run","build":"tsup","clean":"rm -rf dist .turbo","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"avifenesh","email":"aviarchi1994@gmail.com"},"_resolved":"/tmp/571780ea20980b94a800dbd8e8ed12bf/agent-sh-harness-webfetch-0.2.0.tgz","_integrity":"sha512-VzFwAHUMaOOUi1TNhIp9SmlNedH6yZRZV96Zls2UUgb1F107/U2hab8ggQBY89ZVGntqdtUrLl4M7SR4QYmVwg==","repository":{"url":"git+https://github.com/avifenesh/tools.git","type":"git","directory":"packages/webfetch"},"_npmVersion":"10.8.2","description":"WebFetch tool for AI agent harnesses — HTTP GET/POST with SSRF defense, readability+markdown extraction, redirect-chain reporting, size caps, and per-session cache","directories":{},"_nodeVersion":"20.20.2","dependencies":{"jsdom":"^25.0.1","undici":"^7.0.0","valibot":"^0.42.1","turndown":"^7.2.0","@mozilla/readability":"^0.5.0","@agent-sh/harness-core":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","vitest":"^2.1.4","typescript":"^5.6.3","@types/node":"^22.9.0","@types/jsdom":"^21.1.7","@types/turndown":"^5.0.5"},"_npmOperationalInternal":{"tmp":"tmp/harness-webfetch_0.2.0_1776853081049_0.3224861007075799","host":"s3://npm-registry-packages-npm-production"}},"0.7.1":{"name":"@agent-sh/harness-webfetch","version":"0.7.1","description":"WebFetch tool for AI agent harnesses — HTTP GET/POST with SSRF defense, readability+markdown extraction, redirect-chain reporting, size caps, and per-session cache","keywords":["ai","agent","llm","tool-use","webfetch","http","fetch","url","readability","bedrock","openai"],"license":"MIT","author":{"name":"Avi Fenesh"},"homepage":"https://github.com/avifenesh/tools/tree/main/packages/webfetch#readme","bugs":{"url":"https://github.com/avifenesh/tools/issues"},"repository":{"type":"git","url":"git+https://github.com/avifenesh/tools.git","directory":"packages/webfetch"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"publishConfig":{"access":"public"},"engines":{"node":">=20"},"dependencies":{"@mozilla/readability":"^0.6.0","jsdom":"^25.0.1","turndown":"^7.2.0","undici":"^7.0.0","valibot":"^1.2.0","@agent-sh/harness-core":"0.2.0"},"devDependencies":{"@types/jsdom":"^21.1.7","@types/node":"^22.9.0","@types/turndown":"^5.0.5","tsup":"^8.3.5","typescript":"^5.6.3","vitest":"^3.2.6"},"scripts":{"build":"tsup","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","clean":"rm -rf dist .turbo"},"_id":"@agent-sh/harness-webfetch@0.7.1","_integrity":"sha512-r585/TUv9AtVAvebfJZ2Z8HCmWdeL0jF0eO1sk+nJBuWGmZHPiCUt5poaiR9yUbRQYGUxe3enPgLdKy7sV50gA==","_resolved":"/tmp/ec04bcfc7155b7a7e2e368bcafa1268a/agent-sh-harness-webfetch-0.7.1.tgz","_from":"file:agent-sh-harness-webfetch-0.7.1.tgz","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-r585/TUv9AtVAvebfJZ2Z8HCmWdeL0jF0eO1sk+nJBuWGmZHPiCUt5poaiR9yUbRQYGUxe3enPgLdKy7sV50gA==","shasum":"23805c42eb82df5bbdb6017c39e6e6152edc16eb","tarball":"https://registry.npmjs.org/@agent-sh/harness-webfetch/-/harness-webfetch-0.7.1.tgz","fileCount":9,"unpackedSize":297417,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFXNPiJEUO756CYyibJ1vrX/5OBnDWn2BcTHRyybu1PSAiA64oniQB9jy9Sfo6A/XN7appR/2/jIlqjfmwhVVe61qw=="}]},"_npmUser":{"name":"avifenesh","email":"aviarchi1994@gmail.com"},"directories":{},"maintainers":[{"name":"avifenesh","email":"aviarchi1994@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/harness-webfetch_0.7.1_1781647633545_0.264153256870308"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-22T10:18:00.961Z","modified":"2026-06-16T22:07:13.821Z","0.2.0":"2026-04-22T10:18:01.227Z","0.7.1":"2026-06-16T22:07:13.696Z"},"bugs":{"url":"https://github.com/avifenesh/tools/issues"},"author":{"name":"Avi Fenesh"},"license":"MIT","homepage":"https://github.com/avifenesh/tools/tree/main/packages/webfetch#readme","keywords":["ai","agent","llm","tool-use","webfetch","http","fetch","url","readability","bedrock","openai"],"repository":{"type":"git","url":"git+https://github.com/avifenesh/tools.git","directory":"packages/webfetch"},"description":"WebFetch tool for AI agent harnesses — HTTP GET/POST with SSRF defense, readability+markdown extraction, redirect-chain reporting, size caps, and per-session cache","maintainers":[{"name":"avifenesh","email":"aviarchi1994@gmail.com"}],"readme":"# @agent-sh/harness-webfetch\n\nHTTP GET/POST with tool-layer SSRF defense, readability+markdown extraction, redirect-chain reporting, and per-session cache.\n\nPart of the [`@agent-sh/harness-*`](https://github.com/avifenesh/tools) monorepo — see the top-level README for architectural context and the full tool surface.\n\n## Install\n\n```sh\nnpm install @agent-sh/harness-webfetch\n```\n\nRequires Node ≥ 20.\n\n## Usage\n\n```ts\nimport { webfetch, makeSessionCache } from \"@agent-sh/harness-webfetch\";\n\nconst session = {\n  permissions: { roots: [], sensitivePatterns: [], unsafeAllowFetchWithoutHook: true },\n  cache: makeSessionCache(),\n};\n\nconst r = await webfetch({ url: \"https://example.com\", extract: \"markdown\" }, session);\n```\n\n## Contract\n\nThe full contract — input shape, output discriminated-union, error codes, permission model, and acceptance tests — lives in [`agent-knowledge/design/webfetch.md`](https://github.com/avifenesh/tools/blob/main/agent-knowledge/design/webfetch.md). Changes to this package must stay in sync with that spec.\n\n## License\n\nMIT © Avi Fenesh\n","readmeFilename":"README.md"}