[kimi] Add /api/matrix/health endpoint (#685) #745

Merged
kimi merged 1 commits from kimi/issue-685 into main 2026-03-21 15:51:30 +00:00
Collaborator

Fixes #685

Summary

Added a dedicated health endpoint for the Matrix frontend to check backend capabilities and availability.

Changes

  • src/dashboard/routes/world.py: Added GET /api/matrix/health endpoint

    • Returns JSON with: status (ok/degraded), version, capabilities
    • Capabilities dict includes: thinking, memory, bark, familiar, lightning
    • Each capability performs lightweight check to determine if module is available
    • Response time <100ms (no heavy checks)
    • Returns HTTP 200 even if some capabilities are degraded
  • tests/dashboard/test_world_api.py: Added comprehensive tests

    • Test for endpoint structure and response format
    • Tests for status field (ok when core capabilities available, degraded otherwise)
    • Tests for all capability check functions
    • Test for response time

Testing

  • tox -e unit passes (2589 passed, 1 skipped)
  • tox -e lint passes
  • tox -e format applied

API Response Example

{
  "status": "ok",
  "version": "1.0.0",
  "capabilities": {
    "thinking": true,
    "memory": true,
    "bark": true,
    "familiar": false,
    "lightning": false
  }
}
Fixes #685 ## Summary Added a dedicated health endpoint for the Matrix frontend to check backend capabilities and availability. ## Changes - **src/dashboard/routes/world.py**: Added `GET /api/matrix/health` endpoint - Returns JSON with: `status` (ok/degraded), `version`, `capabilities` - Capabilities dict includes: `thinking`, `memory`, `bark`, `familiar`, `lightning` - Each capability performs lightweight check to determine if module is available - Response time <100ms (no heavy checks) - Returns HTTP 200 even if some capabilities are degraded - **tests/dashboard/test_world_api.py**: Added comprehensive tests - Test for endpoint structure and response format - Tests for status field (ok when core capabilities available, degraded otherwise) - Tests for all capability check functions - Test for response time ## Testing - `tox -e unit` passes (2589 passed, 1 skipped) - `tox -e lint` passes - `tox -e format` applied ## API Response Example ```json { "status": "ok", "version": "1.0.0", "capabilities": { "thinking": true, "memory": true, "bark": true, "familiar": false, "lightning": false } } ```
kimi added 1 commit 2026-03-21 15:51:00 +00:00
feat: Add /api/matrix/health endpoint
Some checks failed
Tests / lint (pull_request) Has been cancelled
Tests / test (pull_request) Has been cancelled
e51fe3caee
Add a dedicated health endpoint for the Matrix frontend to check backend
capabilities and availability.

Changes:
- Added GET /api/matrix/health endpoint in src/dashboard/routes/world.py
- Returns status (ok/degraded), version, and capabilities dict
- Capabilities: thinking, memory, bark, familiar, lightning
- Each capability checks if the relevant module is available
- Response time <100ms (lightweight checks)
- Returns 200 even if some capabilities are degraded
- Added comprehensive tests in tests/dashboard/test_world_api.py

Fixes #685
kimi merged commit d54493a87b into main 2026-03-21 15:51:30 +00:00
kimi deleted branch kimi/issue-685 2026-03-21 15:51:30 +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/Timmy-time-dashboard#745