clay-server 2.26.1-beta.1 → 2.27.0-beta.2

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/lib/server.js CHANGED
@@ -1124,6 +1124,36 @@ function createServer(opts) {
1124
1124
  return;
1125
1125
  }
1126
1126
 
1127
+ // Health check endpoint (no auth required, for monitoring tools)
1128
+ if (req.method === "GET" && fullUrl === "/api/health") {
1129
+ var mem = process.memoryUsage();
1130
+ var activeSessions = 0;
1131
+ projects.forEach(function (ctx) {
1132
+ if (ctx && ctx.clients) {
1133
+ activeSessions += ctx.clients.size || 0;
1134
+ }
1135
+ });
1136
+ var pkg = require("../package.json");
1137
+ var health = {
1138
+ status: "ok",
1139
+ uptime: process.uptime(),
1140
+ version: pkg.version,
1141
+ node: process.version,
1142
+ sessions: activeSessions,
1143
+ projects: projects.size,
1144
+ memory: {
1145
+ rss: mem.rss,
1146
+ heapUsed: mem.heapUsed,
1147
+ heapTotal: mem.heapTotal,
1148
+ },
1149
+ pid: process.pid,
1150
+ timestamp: new Date().toISOString(),
1151
+ };
1152
+ res.writeHead(200, { "Content-Type": "application/json" });
1153
+ res.end(JSON.stringify(health));
1154
+ return;
1155
+ }
1156
+
1127
1157
  // Theme list: bundled (lib/themes/) + user (~/.clay/themes/)
1128
1158
  if (req.method === "GET" && fullUrl === "/api/themes") {
1129
1159
  var bundled = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clay-server",
3
- "version": "2.26.1-beta.1",
3
+ "version": "2.27.0-beta.2",
4
4
  "description": "Self-hosted Claude Code in your browser. Multi-session, multi-user, push notifications.",
5
5
  "bin": {
6
6
  "clay-server": "./bin/cli.js",