{"_id":"@021.is/agent-docs","_rev":"2-353aca7a3f096c952f6c03c07d81ad34","name":"@021.is/agent-docs","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@021.is/agent-docs","version":"0.1.1","keywords":["docs","llms.txt","agent","mcp","openapi"],"license":"MIT","_id":"@021.is/agent-docs@0.1.1","maintainers":[{"name":"edvone","email":"edvard@edvone.dev"}],"homepage":"https://github.com/021is/spine-ts#readme","bugs":{"url":"https://github.com/021is/spine-ts/issues"},"dist":{"shasum":"8a3b6efd90f3a62beb9c9dd7e770a4496faa616e","tarball":"https://registry.npmjs.org/@021.is/agent-docs/-/agent-docs-0.1.1.tgz","fileCount":8,"integrity":"sha512-i1SwALEmPXXlcDeq4MvSe30QkicMGefuBB09TojKmf63vu/oHb2iEOAR7VM0zjfP/whSsSXPZL5dmkvue387cg==","signatures":[{"sig":"MEUCICeubAE9AwKn/D0nEX+/zd0UUlCIuDlpuC7pIsDbeuCkAiEAvYFFY3BS2i2HzGAZ+2MVO8Z0rgCn6XIbUtSi76Fw4xI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13886},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./next":{"types":"./dist/next.d.ts","import":"./dist/next.js"}},"gitHead":"e4434c6f59db8f586e0f05ffdb3b88a96e68e67b","scripts":{"build":"tsup src/index.ts src/next.ts --format esm --dts --clean --external next","typecheck":"tsc --noEmit"},"_npmUser":{"name":"edvone","email":"edvard@edvone.dev"},"repository":{"url":"git+https://github.com/021is/spine-ts.git","type":"git","directory":"packages/agent-docs"},"_npmVersion":"10.9.4","description":"Single-source-of-truth docs catalog + .md route handlers + llms.txt + agent-prompt scaffolding. One library, every product gets first-class agent integration.","directories":{},"_nodeVersion":"22.22.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"next":">=15 <17"},"peerDependenciesMeta":{"next":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/agent-docs_0.1.1_1779981929556_0.29705126007335036","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@021.is/agent-docs","version":"0.1.2","description":"Single-source-of-truth docs catalog + .md route handlers + llms.txt + agent-prompt scaffolding. One library, every product gets first-class agent integration.","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./next":{"types":"./dist/next.d.ts","import":"./dist/next.js"}},"scripts":{"build":"tsup src/index.ts src/next.ts --format esm --dts --clean --external next","typecheck":"tsc --noEmit"},"peerDependencies":{"next":">=15 <17"},"peerDependenciesMeta":{"next":{"optional":true}},"publishConfig":{"access":"public"},"keywords":["docs","llms.txt","agent","mcp","openapi"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/021is/spine-ts.git","directory":"packages/agent-docs"},"_id":"@021.is/agent-docs@0.1.2","gitHead":"b9f9333776fa55686cc2feb05f851aa6000b0e05","bugs":{"url":"https://github.com/021is/spine-ts/issues"},"homepage":"https://github.com/021is/spine-ts#readme","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-3ZItNSLvH/DXwnMVhKVZqlDNwJb1jh2Nt2bLJtZgQUxHqH2mJn8Vijw1rSdCgOYOg1peUhW8rHPRtPQpu+PKXg==","shasum":"05da40551ea64cef4697b55cea6dc9d308e94c30","tarball":"https://registry.npmjs.org/@021.is/agent-docs/-/agent-docs-0.1.2.tgz","fileCount":9,"unpackedSize":15851,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDueeHuEvWT7UgL5mAdF+l3kYu0LcPvHtenJoNMXbPqRQIhAM7yHYaZPiZLSeW/F58eSWiEN7nvWTjZ1aSJg5ylH88J"}]},"_npmUser":{"name":"edvone","email":"edvard@edvone.dev"},"directories":{},"maintainers":[{"name":"edvone","email":"edvard@edvone.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-docs_0.1.2_1779995223171_0.8277651924663221"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-28T15:25:29.369Z","modified":"2026-05-28T19:07:03.466Z","0.1.1":"2026-05-28T15:25:29.715Z","0.1.2":"2026-05-28T19:07:03.317Z"},"bugs":{"url":"https://github.com/021is/spine-ts/issues"},"license":"MIT","homepage":"https://github.com/021is/spine-ts#readme","keywords":["docs","llms.txt","agent","mcp","openapi"],"repository":{"type":"git","url":"git+https://github.com/021is/spine-ts.git","directory":"packages/agent-docs"},"description":"Single-source-of-truth docs catalog + .md route handlers + llms.txt + agent-prompt scaffolding. One library, every product gets first-class agent integration.","maintainers":[{"name":"edvone","email":"edvard@edvone.dev"}],"readme":"# @021.is/agent-docs\n\nSingle-source-of-truth docs catalog. One library, every product gets first-class agent integration without copy-paste.\n\nOne `DocsCatalog` object feeds:\n\n- the JSX page (your existing `app/docs/<slug>/page.tsx`)\n- the `.md` route handler (drop in `markdownRoute(catalog)`)\n- the `/llms.txt` discovery index (`buildLlmsTxt`)\n- the `/llms-full.txt` flat dump (`buildLlmsFullTxt`)\n\nDrift between surfaces becomes physically impossible.\n\n## Install\n\n```bash\nbun add @021.is/agent-docs\n```\n\n## Quickstart\n\nDefine one catalog per page in `lib/docs/<slug>.ts`:\n\n```ts\nimport { type DocsCatalog, code, h2, p } from \"@021.is/agent-docs\";\n\nexport const installCatalog: DocsCatalog = {\n  slug: \"install\",\n  title: \"Install the SDK\",\n  description: \"One package, two minutes to working sign-in.\",\n  body: [\n    h2(\"Install\"),\n    p(\"Use your package manager.\"),\n    code(\"bash\", \"bun add @021.is/my-sdk\"),\n  ],\n};\n```\n\nDrop the matching `.md` route handler:\n\n```ts\n// app/docs/install.md/route.ts\nimport { markdownRoute } from \"@021.is/agent-docs/next\";\nimport { installCatalog } from \"@/lib/docs/install\";\n\nexport const dynamic = \"force-static\";\nexport const GET = markdownRoute(installCatalog);\n```\n\nWire `llms.txt`:\n\n```ts\n// app/llms.txt/route.ts\nimport { llmsTxtRoute } from \"@021.is/agent-docs/next\";\nimport { installCatalog } from \"@/lib/docs/install\";\n\nexport const dynamic = \"force-static\";\nexport const GET = llmsTxtRoute({\n  name: \"my-app\",\n  tagline: \"Your product tagline.\",\n  siteUrl: \"https://example.com\",\n  catalogs: [installCatalog],\n  openapi: { yamlUrl: \"https://example.com/openapi.yaml\" },\n});\n```\n\nThat is the whole integration. Every catalog you ship is automatically rendered on `/docs/<slug>.md`, listed on `/llms.txt`, and concatenated into `/llms-full.txt`.\n\n## Why\n\nStripe, Auth0, and Clerk all ship agent-consumable docs. So do we. Reuse the library and your product is on day one.\n\n## License\n\nMIT.\n","readmeFilename":"README.md"}