{"_id":"@agent404/next","name":"@agent404/next","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@agent404/next","version":"0.1.0","description":"agent-404 Next.js middleware — self-healing 404 pages for AI agents and crawlers","keywords":["404","nextjs","middleware","ai-agents","seo","crawlers"],"author":{"name":"Bharath"},"license":"MIT","homepage":"https://www.agent404.dev","repository":{"type":"git","url":"git+https://github.com/bharath31/agent-404.git","directory":"packages/next"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"peerDependencies":{"next":">=13"},"peerDependenciesMeta":{"next":{"optional":true}},"scripts":{"build":"tsx ../../script/build-packages.ts next","prepublishOnly":"npm run build"},"publishConfig":{"access":"public"},"_id":"@agent404/next@0.1.0","gitHead":"b936a2872d51d155cf0db067a782b446055cb223","bugs":{"url":"https://github.com/bharath31/agent-404/issues"},"_nodeVersion":"22.23.2","_npmVersion":"10.9.8","dist":{"integrity":"sha512-+5hjNxL5ZuhYRE4p1s8xMNGO/tAkQusaCnooGStEKQvd/MeiFxXimq0p+fCzPHuWAULQdmQBJtZZ3Kp32X8Qpg==","shasum":"eb3ebbe263a8a738bac25a9635f57562396f4f32","tarball":"https://registry.npmjs.org/@agent404/next/-/next-0.1.0.tgz","fileCount":5,"unpackedSize":13297,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEoMERRG8E18iMcLDPdH3AbT00ePN3G4KSZGNpkWgo9TAiEAk0S1f2upDGsRsk0pje2rqlUuzbjA0P7TKcw7X8lgfC8="}]},"_npmUser":{"name":"brth31","email":"lnbharath94@gmail.com"},"directories":{},"maintainers":[{"name":"brth31","email":"lnbharath94@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/next_0.1.0_1786965996983_0.7547731053461166"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T11:26:36.715Z","0.1.0":"2026-08-17T11:26:37.129Z","modified":"2026-08-17T11:26:38.440Z"},"maintainers":[{"name":"brth31","email":"lnbharath94@gmail.com"}],"description":"agent-404 Next.js middleware — self-healing 404 pages for AI agents and crawlers","homepage":"https://www.agent404.dev","keywords":["404","nextjs","middleware","ai-agents","seo","crawlers"],"repository":{"type":"git","url":"git+https://github.com/bharath31/agent-404.git","directory":"packages/next"},"author":{"name":"Bharath"},"bugs":{"url":"https://github.com/bharath31/agent-404/issues"},"license":"MIT","readme":"# @agent404/next\n\nNext.js middleware that intercepts your app's 404s and injects [agent-404](https://www.agent404.dev) recovery suggestions (`Link` headers, `schema.org` JSON-LD, and a rendered suggestion list) so AI crawlers and coding agents recover in one hop instead of hallucinating.\n\n## Install\n\n```bash\nnpm install @agent404/next\n```\n\n## Usage\n\n```ts\n// middleware.ts\nimport { agent404 } from \"@agent404/next\";\n\nexport const middleware = agent404({\n  apiKey: process.env.AGENT404_PUBLIC_KEY!,\n});\n\nexport const config = {\n  matcher: [\"/((?!api|_next/static|_next/image|favicon.ico).*)\"],\n};\n```\n\nGet `apiKey` (the read-only public key) by registering your domain at [agent404.dev](https://www.agent404.dev).\n\nFor `app/not-found.tsx`, use `notFoundSuggestions(request, config)` to fetch the ranked suggestion list and render it as JSX — see the JSDoc on `notFoundSuggestions` in `dist/index.d.ts` for a full example.\n","readmeFilename":"README.md","_rev":"1-7933290fd1b39d3ccc1cce0aa5fffb0c"}