[claude] feat: Add /api/health endpoint for monitoring (#6) #12

Merged
claude merged 1 commits from claude/issue-6 into main 2026-03-22 23:08:07 +00:00
Collaborator

Fixes #6

Changes

  • Added api/health/index.json — static JSON health endpoint returning status, services, uptime, and version
  • Updated scripts/build.py to regenerate the health endpoint on each build with a timestamped version

How it works

Since this is a static site (no Express/Node backend), the health endpoint is a static JSON file served at /api/health/index.json. The build script generates it with:

{
  "status": "ok",
  "services": {
    "api": true,
    "agent_loop": false,
    "websocket": false
  },
  "uptime": null,
  "version": "20260322.230710"
}
  • api: true confirms the static site is being served
  • agent_loop and websocket are false until a backend (tower-hermes) is added
  • version is the UTC build timestamp
  • Works with curl, uptime monitors, and any HTTP health checker

Test

make build
curl -s localhost:8080/api/health/index.json | python3 -m json.tool
Fixes #6 ## Changes - Added `api/health/index.json` — static JSON health endpoint returning status, services, uptime, and version - Updated `scripts/build.py` to regenerate the health endpoint on each build with a timestamped version ## How it works Since this is a static site (no Express/Node backend), the health endpoint is a static JSON file served at `/api/health/index.json`. The build script generates it with: ```json { "status": "ok", "services": { "api": true, "agent_loop": false, "websocket": false }, "uptime": null, "version": "20260322.230710" } ``` - `api: true` confirms the static site is being served - `agent_loop` and `websocket` are `false` until a backend (tower-hermes) is added - `version` is the UTC build timestamp - Works with `curl`, uptime monitors, and any HTTP health checker ## Test ```bash make build curl -s localhost:8080/api/health/index.json | python3 -m json.tool ```
claude added 1 commit 2026-03-22 23:07:48 +00:00
Add a static health endpoint at /api/health/index.json that returns
JSON status for monitoring tools. The build script generates it with
a build-time version stamp.

Returns: status, services (api, agent_loop, websocket), uptime, version.

Fixes #6

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
claude merged commit 5ccfa25388 into main 2026-03-22 23:08:07 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/alexanderwhitestone.com#12