{"_id":"@absolutejs/health","_rev":"6-f3e6d234f5ce317036f3ccec150ab44b","name":"@absolutejs/health","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"@absolutejs/health","version":"0.1.0","keywords":["absolutejs","health","liveness","readiness","healthz","readyz","elysia"],"author":"Alex Kahn","license":"BSL-1.1","_id":"@absolutejs/health@0.1.0","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"dist":{"shasum":"b737313f08de32664085a2c51243fbdabb134431","tarball":"https://registry.npmjs.org/@absolutejs/health/-/health-0.1.0.tgz","fileCount":6,"integrity":"sha512-R+Qask86+bznXY+9S+Okvi1l3oYwzwUsRHP/1+zUAg+HNeaKfPQyzAF2Bga5xFsKrUFS1tktIC/eyTSZ9j16YA==","signatures":[{"sig":"MEYCIQCm2f/wFcYyk+7h8BItRnQPZ5dMkJMtIPE83daX3ETPqQIhAIm08nHTn/o6VLnzJbrHZ7vcgYx7ISxGkk7wHn3qp3AC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31821},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"b737313f08de32664085a2c51243fbdabb134431","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"test":"bun test tests/","build":"rm -rf dist && bun build src/index.ts --outdir dist --sourcemap --target=bun --external elysia && tsc --project tsconfig.build.json","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run check:package && bun publish","typecheck":"tsc --noEmit","check:package":"bun run typecheck && bun run build && bun run test"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-R+Qask86+bznXY+9S+Okvi1l3oYwzwUsRHP/1+zUAg+HNeaKfPQyzAF2Bga5xFsKrUFS1tktIC/eyTSZ9j16YA==","repository":{"url":"git+https://github.com/absolutejs/health.git","type":"git"},"_npmVersion":"10.8.3","description":"Liveness + readiness probes for the AbsoluteJS substrate. createHealthChecker composes named checks; healthPlugin exposes /healthz (process alive?) + /readyz (can serve traffic?) with a standard JSON envelope. Per-check timeout, aggregate worst-of-any sta","directories":{},"_nodeVersion":"24.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"elysia":"latest","prettier":"^3.8.3","@types/bun":"^1.3.14","typescript":"^5.9.0"},"peerDependencies":{"elysia":">= 1.4.0","bun-types":"^1.3.14"},"peerDependenciesMeta":{"elysia":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/health_0.1.0_1780223991811_0.5212512669072698","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@absolutejs/health","version":"0.1.1","keywords":["absolutejs","health","liveness","readiness","healthz","readyz","elysia"],"author":"Alex Kahn","license":"BSL-1.1","_id":"@absolutejs/health@0.1.1","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/health","bugs":{"url":"https://github.com/absolutejs/health/issues"},"dist":{"shasum":"c42bf96fd6788fce27031f36f6590b93dedce110","tarball":"https://registry.npmjs.org/@absolutejs/health/-/health-0.1.1.tgz","fileCount":10,"integrity":"sha512-86+ro8V3yVERKQkZEGs0q0tgx7KNrLlgyOVJUESm1INyX8Flhou2Pt90o+ALuoz9nN6s/Znrx8gQ6Yn9+veXfQ==","signatures":[{"sig":"MEUCIQD43MvExotrv0+UVKmcHzhs6HSkFqBDQLxYJ0I/5y3KFwIgG6KRjN4PNi+QHdxuktioM7Yw0deUGxi7YCHB6NWx5qs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1121175},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"c42bf96fd6788fce27031f36f6590b93dedce110","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"scripts":{"test":"bun test tests/","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external elysia && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run check:package && bun publish","typecheck":"tsc --noEmit","check:package":"bun run typecheck && bun run build && bun run test"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-86+ro8V3yVERKQkZEGs0q0tgx7KNrLlgyOVJUESm1INyX8Flhou2Pt90o+ALuoz9nN6s/Znrx8gQ6Yn9+veXfQ==","absolutejs":{"manifestContract":1},"repository":{"url":"git+https://github.com/absolutejs/health.git","type":"git"},"_npmVersion":"10.8.3","description":"Liveness + readiness probes for the AbsoluteJS substrate. createHealthChecker composes named checks; healthPlugin exposes /healthz (process alive?) + /readyz (can serve traffic?) with a standard JSON envelope. Per-check timeout, aggregate worst-of-any sta","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"elysia":"latest","prettier":"^3.8.3","@types/bun":"^1.3.14","typescript":"^5.9.0"},"peerDependencies":{"elysia":">= 1.4.0","bun-types":"^1.3.14"},"peerDependenciesMeta":{"elysia":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/health_0.1.1_1783964086927_0.3837674702450484","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@absolutejs/health","version":"0.2.0","keywords":["absolutejs","health","liveness","readiness","healthz","readyz","elysia"],"author":{"name":"Alex Kahn"},"license":"BSL-1.1","_id":"@absolutejs/health@0.2.0","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/health","bugs":{"url":"https://github.com/absolutejs/health/issues"},"dist":{"shasum":"bf70e63e7d8e846c7787e73869ee6888fd5ed383","tarball":"https://registry.npmjs.org/@absolutejs/health/-/health-0.2.0.tgz","fileCount":10,"integrity":"sha512-/LnWECQ/mk8U6OfrGjBeL/s6RaxghGZ7VNKKZXkeayEQgz2ru2VE/nQQveJCBbAYqVw7u7uGnkJRuL6Foc28vA==","signatures":[{"sig":"MEQCIBzWTFPxrOlNyBWWwwHJ7/JTCsY4TOQkmiPMwKQXaduJAiBF/CGhE8tTcuLwV4ihoEuC4/rXRGS6n5odDhkN8r065Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1142972},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"a8404acd0fffababf72a12b2b1c0f650c420ddcb","scripts":{"test":"bun test tests/","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external elysia && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run check:package && bun publish","typecheck":"tsc --noEmit","check:package":"bun run typecheck && bun run build && bun run test"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/health.git","type":"git"},"_npmVersion":"10.9.2","description":"Liveness + readiness probes for the AbsoluteJS substrate. createHealthChecker composes named checks; healthPlugin exposes /healthz (process alive?) + /readyz (can serve traffic?) with a standard JSON envelope. Per-check timeout, aggregate worst-of-any sta","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"elysia":"latest","prettier":"^3.8.3","@types/bun":"^1.3.14","typescript":"^5.9.0"},"peerDependencies":{"elysia":">= 1.4.0","bun-types":"^1.3.14"},"peerDependenciesMeta":{"elysia":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/health_0.2.0_1784807902744_0.7787387668627952","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@absolutejs/health","version":"0.2.1","keywords":["absolutejs","health","liveness","readiness","healthz","readyz","elysia"],"author":"Alex Kahn","license":"BSL-1.1","_id":"@absolutejs/health@0.2.1","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/health","bugs":{"url":"https://github.com/absolutejs/health/issues"},"dist":{"shasum":"38613b86c9b9f98cfddea266f38d380bd89479cc","tarball":"https://registry.npmjs.org/@absolutejs/health/-/health-0.2.1.tgz","fileCount":10,"integrity":"sha512-vBY2y520Jcqlb+n0oxIa+YUVGFGfaQj0F94lzYm09vFq+OjqemhaZaExGULOmpqa2EFwXCSy4LtYuWhF2q2+NA==","signatures":[{"sig":"MEUCIHdouCGe/WCYTa4q2yLwPN4dz/UwrrLpW5CRHGxfmVhjAiEA/OuJYaoTVfu6UU/jSMPrZPdsNpSZiaC1CEiFWFUw5Zc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":485575},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"38613b86c9b9f98cfddea266f38d380bd89479cc","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"scripts":{"test":"bun test tests/","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external elysia && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run check:package && bun publish","typecheck":"tsc --noEmit","check:package":"bun run typecheck && bun run build && bun run test"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-vBY2y520Jcqlb+n0oxIa+YUVGFGfaQj0F94lzYm09vFq+OjqemhaZaExGULOmpqa2EFwXCSy4LtYuWhF2q2+NA==","absolutejs":{"runtimePeers":{"elysia":{"range":">=1.4.29 <2","tested":"1.4.29","optional":true,"buildExternals":["elysia"],"artifactImports":["elysia"]}},"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/health.git","type":"git"},"_npmVersion":"10.8.3","description":"Liveness + readiness probes for the AbsoluteJS substrate. createHealthChecker composes named checks; healthPlugin exposes /healthz (process alive?) + /readyz (can serve traffic?) with a standard JSON envelope. Per-check timeout, aggregate worst-of-any sta","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.7.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"elysia":"1.4.29","prettier":"^3.8.3","@types/bun":"^1.3.14","typescript":"^5.9.0"},"peerDependencies":{"elysia":">=1.4.29 <2"},"peerDependenciesMeta":{"elysia":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/health_0.2.1_1784915104763_0.24394588957972196","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@absolutejs/health","version":"0.3.0","keywords":["absolutejs","health","liveness","readiness","healthz","readyz","elysia"],"author":{"name":"Alex Kahn"},"license":"BSL-1.1","_id":"@absolutejs/health@0.3.0","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/health","bugs":{"url":"https://github.com/absolutejs/health/issues"},"dist":{"shasum":"21e9af0fee28576d9ae15fa73da8de4ef784cb2e","tarball":"https://registry.npmjs.org/@absolutejs/health/-/health-0.3.0.tgz","fileCount":10,"integrity":"sha512-4WBFvQknpz7DVAwbJzS4Ximq3i8RcGkvv4d/j/NcdwX2L8Qwb4omf2ddetyw2ui4nD12gkf4vI88m116RM/bXw==","signatures":[{"sig":"MEQCIGioZKYNvK+1f++4NS57u1BWqWwoKYsSs4cz3KIAcG2PAiA8vZ4J8MyebQyzmsG6J1jmkt4CjsXxs48LY/WgGYoXug==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":502077},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"18e09c867bcb19ea89b24daebda85886c31996d4","scripts":{"test":"bun test tests/","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external elysia && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run check:package && bun publish","typecheck":"tsc --noEmit","check:package":"bun run typecheck && bun run build && bun run test"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"runtimePeers":{"elysia":{"range":">=1.4.29 <2","tested":"1.4.29","optional":true,"buildExternals":["elysia"],"artifactImports":["elysia"]}},"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/health.git","type":"git"},"_npmVersion":"10.9.2","description":"Liveness + readiness probes for the AbsoluteJS substrate. createHealthChecker composes named checks; healthPlugin exposes /healthz (process alive?) + /readyz (can serve traffic?) with a standard JSON envelope. Per-check timeout, aggregate worst-of-any sta","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"elysia":"1.4.29","prettier":"^3.8.3","@types/bun":"^1.3.14","typescript":"^5.9.0"},"peerDependencies":{"elysia":">=1.4.29 <2"},"peerDependenciesMeta":{"elysia":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/health_0.3.0_1785112675702_0.00950365974482903","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@absolutejs/health","version":"0.4.0","description":"Liveness + readiness probes for the AbsoluteJS substrate. createHealthChecker composes named checks; healthPlugin exposes /healthz (process alive?) + /readyz (can serve traffic?) with a standard JSON envelope. Per-check timeout, aggregate worst-of-any sta","repository":{"type":"git","url":"git+https://github.com/absolutejs/health.git"},"homepage":"https://github.com/absolutejs/health","bugs":{"url":"https://github.com/absolutejs/health/issues"},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","type":"module","license":"BSL-1.1","author":{"name":"Alex Kahn"},"absolutejs":{"manifestContract":2},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"publishConfig":{"access":"public"},"scripts":{"build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external elysia && tsc --project tsconfig.build.json && absolute-manifest emit","test":"bun test tests/","typecheck":"tsc --noEmit","format":"prettier --write \"./**/*.{ts,json,md}\"","check:package":"bun run typecheck && bun run build && bun run test","release":"bun run format && bun run check:package && bun publish"},"keywords":["absolutejs","health","liveness","readiness","healthz","readyz","elysia"],"peerDependencies":{"elysia":"^2.0.0-beta.6"},"peerDependenciesMeta":{"elysia":{"optional":true}},"devDependencies":{"@types/bun":"^1.3.14","elysia":"2.0.0-beta.6","exact-mirror":"1.2.4","prettier":"^3.8.3","typebox":"1.3.16","typescript":"^5.9.0"},"dependencies":{"@absolutejs/manifest":"^0.9.0","@sinclair/typebox":"^0.34.0"},"_id":"@absolutejs/health@0.4.0","gitHead":"220d757dd359814676db88b179e1d69fb985f65d","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-5An0eDBSM1slYERar43AN8V5UqbKH4f9GU3o/ySi7dTtjETmT6bF7nfHYtzxpHwYbUxTpCCUzgYTJ2S2EYLbvA==","shasum":"8592372be2c6da5b773e7ab811fe489c1b95f4a5","tarball":"https://registry.npmjs.org/@absolutejs/health/-/health-0.4.0.tgz","fileCount":10,"unpackedSize":496459,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHU9G2ZW21frlsqyohx4WDojbjxQKe69zwbzmIOHm+gyAiEAq2PGKhc1sgpGLG5lZKrcKSLcDmpS8VGXPHPlD0XPdOU="}]},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"directories":{},"maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/health_0.4.0_1787188183620_0.1470994458141095"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-31T10:39:51.709Z","modified":"2026-08-20T01:09:44.947Z","0.1.0":"2026-05-31T10:39:51.943Z","0.1.1":"2026-07-13T17:34:47.090Z","0.2.0":"2026-07-23T11:58:22.889Z","0.2.1":"2026-07-24T17:45:04.943Z","0.3.0":"2026-07-27T00:37:55.942Z","0.4.0":"2026-08-20T01:09:43.762Z"},"bugs":{"url":"https://github.com/absolutejs/health/issues"},"author":{"name":"Alex Kahn"},"license":"BSL-1.1","homepage":"https://github.com/absolutejs/health","keywords":["absolutejs","health","liveness","readiness","healthz","readyz","elysia"],"repository":{"type":"git","url":"git+https://github.com/absolutejs/health.git"},"description":"Liveness + readiness probes for the AbsoluteJS substrate. createHealthChecker composes named checks; healthPlugin exposes /healthz (process alive?) + /readyz (can serve traffic?) with a standard JSON envelope. Per-check timeout, aggregate worst-of-any sta","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"readme":"# @absolutejs/health\n\nLiveness + readiness probes for the AbsoluteJS substrate. One Elysia\nplugin, two endpoints, a standard JSON envelope that load balancers\nand Kubernetes-style orchestrators understand out of the box.\n\n```ts\nimport { Elysia } from 'elysia';\nimport {\n  createHealthChecker,\n  healthPlugin,\n  metricsCheck,\n  probeCheck,\n  httpCheck,\n} from '@absolutejs/health';\n\nconst checker = createHealthChecker({\n  checks: [\n    // Synthesis from a substrate package's metrics() snapshot.\n    metricsCheck('queue', () => worker.metrics(), (m) => ({\n      status: m.failed > 100 ? 'warn' : 'pass',\n      observed: { runs: m.runs, failed: m.failed },\n    })),\n\n    // Wrap an arbitrary probe.\n    probeCheck('postgres', () => pg.query('SELECT 1')),\n\n    // Downstream HTTP dependency.\n    httpCheck('otlp-collector', 'http://collector:4318/healthz', {\n      kind: 'readiness',  // run only under /readyz\n    }),\n  ],\n});\n\nconst app = new Elysia().use(await healthPlugin({ checker }));\n// GET /healthz → liveness:  200 / 503 with { status, checks, at }\n// GET /readyz  → readiness: same shape, filtered to readiness + both\n```\n\n## Two endpoints, two semantics\n\n| Endpoint | Purpose | Used by |\n| --- | --- | --- |\n| `/healthz` | \"Is this process alive?\" If `fail`, the orchestrator restarts the container. | Kubernetes liveness probe, systemd `WatchdogSec`, `@absolutejs/runtime` |\n| `/readyz` | \"Can this instance serve traffic right now?\" If `fail`, the LB stops routing to it (but doesn't kill it). | Load balancer health checks, drain workflows |\n\nThe distinction matters: a draining instance returns `readyz: fail`\n+ `healthz: pass`. The LB stops sending new traffic while in-flight\nrequests finish.\n\n## Body shape\n\n```json\n{\n  \"status\": \"pass\",\n  \"at\": 1717161600000,\n  \"checks\": {\n    \"queue\": {\n      \"status\": \"pass\",\n      \"latencyMs\": 1,\n      \"observed\": { \"runs\": 1057, \"failed\": 0 }\n    },\n    \"postgres\": { \"status\": \"pass\", \"latencyMs\": 12 }\n  }\n}\n```\n\nCompatible with the [IETF health-check JSON\ndraft](https://datatracker.ietf.org/doc/html/draft-inadarei-api-health-check-06)\nand the [Kubernetes `livez` /\n`readyz`](https://kubernetes.io/docs/reference/using-api/health-checks/)\nconventions. `content-type: application/health+json`.\n\n## Status codes\n\n- `pass` → `200 OK`\n- `warn` → `200 OK` (don't reroute traffic; surface in your dashboard)\n- `fail` → `503 Service Unavailable`\n\nLBs route on status code; humans + dashboards read the body.\n\n## Aggregation\n\nStatus is the WORST of any check: `fail > warn > pass`. A single\nfailing dependency fails the whole envelope — same as Kubernetes\n`/healthz` rollup behavior.\n\n## Check factories\n\n- **`probeCheck(name, () => promise)`** — wrap any\n  `() => Promise<unknown>`. Resolves → `pass`; throws → `fail` with\n  the error message.\n- **`metricsCheck(name, () => metrics(), evaluator)`** — read a\n  substrate package's `metrics()` and decide pass/warn/fail. Snapshot\n  values can land in `observed` for dashboards.\n- **`httpCheck(name, url, options?)`** — `GET url` and grade by HTTP\n  status. 2xx → `pass`, anything else → `fail`.\n- **Roll your own** — any `{ name, check: () => CheckResult |\n  Promise<CheckResult> }` works.\n\n## Kind filtering\n\n```ts\n{ name: 'shutting-down', kind: 'readiness', check: () => ({\n  status: draining ? 'fail' : 'pass'\n})}\n```\n\nA check's `kind` (`'liveness'` / `'readiness'` / `'both'`, default\n`'both'`) controls which endpoint runs it. Run heavy downstream\nchecks under readiness only; keep liveness limited to \"the JS\nprocess is responsive.\"\n\n## License\n\nBSL-1.1 with named carveout against hosted uptime / synthetic-\nmonitoring services. Change date: 2030-05-31 (Apache 2.0).\n","readmeFilename":"README.md"}