{"_id":"@anvaya/core","name":"@anvaya/core","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@anvaya/core","version":"1.0.0","description":"Shared domain vocabulary for Anvaya: types, failure taxonomy, errors, logging, redaction","license":"Apache-2.0","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit"},"repository":{"type":"git","url":"git+https://github.com/siddhashutosh/anvaya.git","directory":"packages/core"},"author":{"name":"Ashutosh Siddh"},"homepage":"https://github.com/siddhashutosh/anvaya#readme","bugs":{"url":"https://github.com/siddhashutosh/anvaya/issues"},"engines":{"node":">=20"},"publishConfig":{"access":"public"},"keywords":["ai","llm","observability","failure-taxonomy","mast","rag","types"],"dependencies":{"zod":"^3.24.1"},"gitHead":"4602680a39422703faf1ac2d6661765943fc5bab","_id":"@anvaya/core@1.0.0","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-UqzuYH73hqg55/dinnjMk4GWIhIkysG4UgMtxGs68GiL5ZcwqmC0omXKRdazHd1kT/53Cb/5AGPWTwmZH/yXew==","shasum":"1d474999a203b4ce1b6292d2f9fe697567d44868","tarball":"https://registry.npmjs.org/@anvaya/core/-/core-1.0.0.tgz","fileCount":95,"unpackedSize":282753,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDDOxUw27F6SYJme/pO9BxlRkohV5IneJaUtJG8Fgk5rgIgffOCtdBOMnWM1cuJ+pxdJS/7Aa3JVMx1QR3WkQHNbBU="}]},"_npmUser":{"name":"siddhashutosh","email":"siddhashutosh@gmail.com"},"directories":{},"maintainers":[{"name":"siddhashutosh","email":"siddhashutosh@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_1.0.0_1785628696203_0.10800009134665522"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-01T23:58:16.014Z","1.0.0":"2026-08-01T23:58:16.339Z","modified":"2026-08-01T23:58:16.598Z"},"maintainers":[{"name":"siddhashutosh","email":"siddhashutosh@gmail.com"}],"description":"Shared domain vocabulary for Anvaya: types, failure taxonomy, errors, logging, redaction","homepage":"https://github.com/siddhashutosh/anvaya#readme","keywords":["ai","llm","observability","failure-taxonomy","mast","rag","types"],"repository":{"type":"git","url":"git+https://github.com/siddhashutosh/anvaya.git","directory":"packages/core"},"author":{"name":"Ashutosh Siddh"},"bugs":{"url":"https://github.com/siddhashutosh/anvaya/issues"},"license":"Apache-2.0","readme":"# @anvaya/core\n\nShared domain vocabulary for **[Anvaya](https://github.com/siddhashutosh/anvaya)** — AI\nfailure observability. Types, the failure taxonomy, error classes, logging and redaction.\n\n```bash\nnpm install @anvaya/core\n```\n\nRequires Node.js ≥ 20.\n\nMost users do not install this directly — it arrives as a dependency of\n[`@anvaya/sdk`](https://www.npmjs.com/package/@anvaya/sdk). Install it on its own if you\nwant the taxonomy as data, or if you are building your own producer against the ingest\ncontract.\n\n## The failure taxonomy\n\n**56 named failure modes across 8 families**, covering all 14\n[MAST](https://arxiv.org/abs/2503.13657) modes, all 7\n[Barnett et al.](https://arxiv.org/pdf/2401.05856) RAG failure points, and 6\n[OWASP LLM Top 10 (2025)](https://genai.owasp.org/llm-top-10/) entries.\n\n```ts\nimport { CATALOG, getMode, requireMode, byFamily, isCausedBy } from '@anvaya/core';\n\nrequireMode('RET-002');\n// { code: 'RET-002', name: 'Retrieval quality collapse', family: 'RET',\n//   tier: 'L2', causes: ['GEN-004', 'GEN-008', ...], ... }\n\nisCausedBy('GEN-004', 'RET-002');   // true — the hallucination is a symptom\n```\n\n| Family | Modes | Concern |\n|---|---|---|\n| `INF` | 6 | The plumbing broke |\n| `CTX` | 5 | What went into the model was wrong |\n| `RET` | 7 | The facts never arrived |\n| `GEN` | 8 | The model produced a bad answer |\n| `AGT` | 12 | The control flow went wrong |\n| `TOL` | 6 | The action layer failed |\n| `SEC` | 6 | Somebody is being harmed or attacked |\n| `ECO` | 6 | It is getting worse or more expensive |\n\nThe `causes` edges are what make causal attribution possible: a bad answer points at the\nretrieval step that caused it rather than at itself.\n\n## Licence\n\nApache-2.0 — see [LICENSE](./LICENSE).\n","readmeFilename":"README.md","_rev":"1-dd1c3209803541d03df82b3f7e1d1f3f"}