{"_id":"@42a/ael","_rev":"2-a9a60fbc7251016f4f724f14a574e74f","name":"@42a/ael","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@42a/ael","version":"0.1.0","keywords":["ael","llms.txt","mcp","markdown","ai-agents","42a"],"license":"GPL-2.0-or-later","_id":"@42a/ael@0.1.0","maintainers":[{"name":"sky42a","email":"sky@42a.ai"},{"name":"alon42a","email":"alon@42a.ai"}],"homepage":"https://www.42a.ai","bin":{"42a-ael":"dist/cli/index.js"},"dist":{"shasum":"46a63cf165ab9533df7e93dc6ee63019f6a0521b","tarball":"https://registry.npmjs.org/@42a/ael/-/ael-0.1.0.tgz","fileCount":7,"integrity":"sha512-IIvg0/v/5CI4soo7LfZaKcIbkPScu3EBJQIyOpXqtVOfAhZbtSsVJ9UmdOIdI8VjVNaT1rpJv/7g91UcEebk1g==","signatures":[{"sig":"MEUCIBRe826Zd7gl5WJgFaMbVzj8kw3m+zIOTdp4DzSY2zqWAiEAw/206SFzGpd/83PbJcBrkzKF+IFgusCVAVsz7oZ06+U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":232938},"main":"./dist/index.js","type":"module","_from":"file:/tmp/claude-0/-home-user-mentiond/d63fdeb6-3136-5391-84b3-e681d884d1cb/scratchpad/pack/42a-ael-0.1.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=18.17"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"sky42a","email":"sky@42a.ai"},"_resolved":"/tmp/claude-0/-home-user-mentiond/d63fdeb6-3136-5391-84b3-e681d884d1cb/scratchpad/pack/42a-ael-0.1.0.tgz","_integrity":"sha512-IIvg0/v/5CI4soo7LfZaKcIbkPScu3EBJQIyOpXqtVOfAhZbtSsVJ9UmdOIdI8VjVNaT1rpJv/7g91UcEebk1g==","_npmVersion":"10.9.7","description":"42a Agentic Enablement Layer (AEL) core: markdown page variants, llms.txt, a stateless MCP server with .well-known discovery, and the 42a connect client — framework-agnostic fetch handlers.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","dependencies":{"unified":"^11.0.5","remark-gfm":"^4.0.1","rehype-parse":"^9.0.1","rehype-remark":"^10.0.1","hast-util-select":"^6.0.4","remark-stringify":"^11.0.0","hast-util-to-text":"^4.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/hast":"^3.0.4"},"_npmOperationalInternal":{"tmp":"tmp/ael_0.1.0_1783861423877_0.5210523993256697","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@42a/ael","version":"0.1.1","description":"42a Agentic Enablement Layer (AEL) core: markdown page variants, llms.txt, a stateless MCP server with .well-known discovery, and the 42a connect client — framework-agnostic fetch handlers.","license":"Apache-2.0","homepage":"https://www.42a.ai","sideEffects":false,"publishConfig":{"access":"public"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"bin":{"42a-ael":"dist/cli/index.js"},"scripts":{"build":"tsup","typecheck":"tsc --noEmit"},"keywords":["ael","llms.txt","mcp","markdown","ai-agents","42a"],"engines":{"node":">=18.17"},"dependencies":{"hast-util-select":"^6.0.4","hast-util-to-text":"^4.0.2","rehype-parse":"^9.0.1","rehype-remark":"^10.0.1","remark-gfm":"^4.0.1","remark-stringify":"^11.0.0","unified":"^11.0.5"},"devDependencies":{"@types/hast":"^3.0.4"},"_id":"@42a/ael@0.1.1","_integrity":"sha512-/UhVtvPjNntMDsDp805i2PvnKme24KamHBgS1P0cWPHIwMpfVarjp7lQrxXKE9IzermfesQTZtpoq7hFG/5tTg==","_resolved":"/tmp/claude-0/-home-user-mentiond/d63fdeb6-3136-5391-84b3-e681d884d1cb/scratchpad/pack/42a-ael-0.1.1.tgz","_from":"file:/tmp/claude-0/-home-user-mentiond/d63fdeb6-3136-5391-84b3-e681d884d1cb/scratchpad/pack/42a-ael-0.1.1.tgz","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-/UhVtvPjNntMDsDp805i2PvnKme24KamHBgS1P0cWPHIwMpfVarjp7lQrxXKE9IzermfesQTZtpoq7hFG/5tTg==","shasum":"742f7eac73c98c2ee88901c3e43d8917bbd1bf20","tarball":"https://registry.npmjs.org/@42a/ael/-/ael-0.1.1.tgz","fileCount":7,"unpackedSize":226450,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFbcJZZ6VjoPZ+P+Y8pwPyJ2u3zzCQ28SkDmlKRzraZDAiEAmQ6WC0dy0yaFn6TtWRoI7PirM/jDw/M9NaZOxBd0MC0="}]},"_npmUser":{"name":"sky42a","email":"sky@42a.ai"},"directories":{},"maintainers":[{"name":"sky42a","email":"sky@42a.ai"},{"name":"alon42a","email":"alon@42a.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ael_0.1.1_1783863756842_0.932267383321983"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-12T13:03:43.754Z","modified":"2026-07-12T13:42:37.138Z","0.1.0":"2026-07-12T13:03:44.034Z","0.1.1":"2026-07-12T13:42:36.990Z"},"license":"Apache-2.0","homepage":"https://www.42a.ai","keywords":["ael","llms.txt","mcp","markdown","ai-agents","42a"],"description":"42a Agentic Enablement Layer (AEL) core: markdown page variants, llms.txt, a stateless MCP server with .well-known discovery, and the 42a connect client — framework-agnostic fetch handlers.","maintainers":[{"name":"sky42a","email":"sky@42a.ai"},{"name":"alon42a","email":"alon@42a.ai"}],"readme":"# @42a/ael\n\nFramework-agnostic core of the **42a Agentic Enablement Layer (AEL)** — make any site readable and usable by AI agents:\n\n- **Markdown page variants** — every page served as a frontmatter markdown document via `?format=markdown`, `<path>.md`, or `Accept: text/markdown` negotiation.\n- **`/llms.txt` + `/llms-full.txt`** — spec-conformant agent index of your key pages.\n- **MCP server** — a stateless [Model Context Protocol](https://modelcontextprotocol.io) endpoint (JSON-RPC 2.0 over plain HTTP POST, protocol `2025-06-18`) with read-only tools: `get_site_info`, `search_content`, `get_page`, `list_recent_posts`, `list_categories` — plus all four `/.well-known/mcp*` discovery documents.\n- **42a connect** — optional pairing with [42a](https://app.42a.ai) for GEO vitals and agent-traffic analytics.\n\nEvery feature is a WHATWG `(Request) => Promise<Response>` handler, so it runs anywhere fetch-standard requests exist (Node ≥ 18.17, edge runtimes, workers).\n\n**Use a framework adapter instead of this package directly** when one exists: [`@42a/ael-next`](https://www.npmjs.com/package/@42a/ael-next) (Next.js App Router), [`@42a/ael-astro`](https://www.npmjs.com/package/@42a/ael-astro) (Astro). For WordPress, use the 42a AEL WordPress plugin.\n\n## Direct usage (any fetch-standard server)\n\n```ts\nimport { createAel } from \"@42a/ael\";\n\nconst ael = createAel({ siteUrl: \"https://example.com\" });\n\n// In your request handling:\nconst response = await ael.handle(request); // null when not an AEL path\n```\n\n### Content model\n\nBy default the **self-render provider** enumerates pages from your sitemap and converts your own rendered HTML to markdown — zero config. For higher fidelity, implement `ContentProvider` (`getSiteInfo`, `listPages`, `getPage`, `search`, optional `listCollections`) against your CMS, or compose with `mergeProviders(primary, fallback)` / `staticProvider(pages)`.\n\n### Config highlights\n\n```ts\ncreateAel({\n  siteUrl: \"https://example.com\",       // required, canonical origin\n  siteName, description, language,       // metadata (else derived from homepage)\n  provider,                              // ContentProvider (default: self-render)\n  markdown: { contentSelector: \"#main\", urlStyle: \"query\" | \"suffix\" },\n  llms: { maxFullItems: 50, maxFullBytes: 2_000_000 },\n  mcp: { endpointPath: \"/api/mcp\", tools: [/* custom McpToolDefinition */] },\n  cache,                                 // KV impl (default: in-memory per instance)\n  telemetry: false,                      // opt-in usage reporting to 42a\n});\n```\n\n## CLI\n\n```\nnpx @42a/ael doctor [url]     # probe a site's agent layer: markdown, llms.txt, MCP, robots\nnpx @42a/ael connect          # connect the site to 42a — mints FORTYTWOA_SITE_TOKEN\n```\n\n`connect` opens the 42a pairing page, exchanges the code for a site token, and prints the one env var to add (`FORTYTWOA_SITE_TOKEN`). After the next deploy your adapter serves `/.well-known/42a.json` and 42a verifies the domain automatically — no meta tags, no layout edits.\n\n## Telemetry\n\nOff by default; nothing leaves the site unless connected AND `telemetry: true`. When enabled, in-memory delta counters (markdown hits, llms.txt hits, MCP requests/tool calls) flush fire-and-forget; counts are approximate lower bounds on serverless.\n","readmeFilename":"README.md"}