@reactive-agents/health 0.7.6 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +68 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # @reactive-agents/health
2
+
3
+ Health checks and readiness probes for the [Reactive Agents](https://docs.reactiveagents.dev/) framework.
4
+
5
+ Provides an HTTP health server with registered probes, returning structured status responses. Integrates with the builder via `.withHealthCheck()` and exposes `agent.health()` for programmatic access.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ bun add @reactive-agents/health
11
+ ```
12
+
13
+ Or install everything at once:
14
+
15
+ ```bash
16
+ bun add reactive-agents
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```typescript
22
+ import { ReactiveAgents } from "reactive-agents";
23
+
24
+ const agent = await ReactiveAgents.create()
25
+ .withName("my-agent")
26
+ .withProvider("anthropic")
27
+ .withHealthCheck()
28
+ .build();
29
+
30
+ const health = await agent.health();
31
+ // {
32
+ // status: "healthy",
33
+ // uptime: 12345,
34
+ // checks: [{ name: "llm", healthy: true, durationMs: 42 }],
35
+ // timestamp: "2026-03-15T..."
36
+ // }
37
+ ```
38
+
39
+ ### Direct Service Usage
40
+
41
+ ```typescript
42
+ import { Effect } from "effect";
43
+ import { makeHealthService, Health } from "@reactive-agents/health";
44
+
45
+ const program = Effect.gen(function* () {
46
+ const health = yield* Health;
47
+ yield* health.registerCheck("db", () => Effect.succeed(true));
48
+ yield* health.start();
49
+ const status = yield* health.check();
50
+ return status;
51
+ });
52
+ ```
53
+
54
+ ## Key Features
55
+
56
+ - **HTTP endpoints** — `/health` and `/ready` with structured JSON responses
57
+ - **Registered probes** — add custom checks for LLM connectivity, database, external services
58
+ - **Aggregate status** — reports `healthy`, `degraded`, or `unhealthy` based on all probes
59
+ - **Builder integration** — single `.withHealthCheck()` call enables health probes
60
+ - **Per-check timing** — each probe reports its own `durationMs` for latency visibility
61
+
62
+ ## Documentation
63
+
64
+ Full documentation at [docs.reactiveagents.dev](https://docs.reactiveagents.dev/)
65
+
66
+ ## License
67
+
68
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactive-agents/health",
3
- "version": "0.7.6",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",