This ticket covers refactoring ai/mcp/server/knowledge-base/services/healthService.mjs into a singleton HealthService class. The current implementation is a simple function; it should be upgraded to match the more robust and informative pattern established in the memory-core server's HealthService (ai/mcp/server/memory-core/services/HealthService.mjs).
Acceptance Criteria
- The file
ai/mcp/server/knowledge-base/services/healthService.mjs is renamed to HealthService.mjs.
- The content is replaced with a
HealthService class that extends Neo.core.Base and is configured as a singleton.
- The
healthcheck function is converted into a class method (e.g., buildHealthResponse).
- The new class uses the
DatabaseLifecycleService and ChromaManager to get the database status, instead of creating its own Chroma client.
- The health check response is enhanced to include more details, such as uptime and version, mirroring the
memory-core service.
- The
ai/mcp/server/knowledge-base/services/toolService.mjs is updated to use the new HealthService class and its method.
- The
healthcheck tool continues to function correctly with the improved response structure.
This ticket covers refactoring
ai/mcp/server/knowledge-base/services/healthService.mjsinto a singletonHealthServiceclass. The current implementation is a simple function; it should be upgraded to match the more robust and informative pattern established in thememory-coreserver'sHealthService(ai/mcp/server/memory-core/services/HealthService.mjs).Acceptance Criteria
ai/mcp/server/knowledge-base/services/healthService.mjsis renamed toHealthService.mjs.HealthServiceclass that extendsNeo.core.Baseand is configured as a singleton.healthcheckfunction is converted into a class method (e.g.,buildHealthResponse).DatabaseLifecycleServiceandChromaManagerto get the database status, instead of creating its own Chroma client.memory-coreservice.ai/mcp/server/knowledge-base/services/toolService.mjsis updated to use the newHealthServiceclass and its method.healthchecktool continues to function correctly with the improved response structure.