@skilder-ai/runtime 0.8.10 → 0.8.12

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.
package/README.md CHANGED
@@ -34,4 +34,36 @@ RUNTIME_KEY=<RUNTIME_API_KEY> npx @skilder-ai/runtime
34
34
  ```bash
35
35
  SYSTEM_KEY=<SYSTEM_API_KEY> RUNTIME_NAME=<NAME_OF_RUNTIME> npx @skilder-ai/runtime
36
36
 
37
- This will start a long-living node process with the ability to host MCP Servers and execute their tools from this runtime.
37
+ This will start a long-living node process with the ability to host MCP Servers and execute their tools from this runtime.
38
+
39
+ ## Running in Docker / Health check
40
+
41
+ ### Health endpoint
42
+
43
+ When `REMOTE_PORT` is set, the runtime exposes `GET /health`:
44
+
45
+ - **`200 { status: 'ok' }`** — NATS connected, an active round-trip probe (`flush`, 2s timeout) succeeded, and the runtime is authenticated
46
+ - **`503 { status: 'error', message: '...' }`** — NATS disconnected, NATS unreachable (flush timed out), not authenticated, or an unexpected error occurred
47
+
48
+ > **Note:** The health endpoint is only available when `REMOTE_PORT` is set. CLI/standalone mode (no `REMOTE_PORT`) does not start an HTTP server — this is intentional.
49
+
50
+ ### Docker Compose setup
51
+
52
+ ```yaml
53
+ services:
54
+ runtime:
55
+ image: your-runtime-image
56
+ environment:
57
+ REMOTE_PORT: "3001"
58
+ RUNTIME_KEY: "<RUNTIME_API_KEY>"
59
+ NATS_SERVERS: "nats:4222"
60
+ healthcheck:
61
+ test: ["CMD", "curl", "-f", "http://localhost:3001/health"]
62
+ interval: 10s
63
+ timeout: 5s
64
+ retries: 5
65
+ start_period: 60s # Allow time for NATS connect + auth
66
+ restart: unless-stopped
67
+ ```
68
+
69
+ > **`start_period`**: Set this to at least 60s to allow enough time for the initial NATS connection and authentication handshake before Docker starts counting health check failures.