LearnNewsExamplesServices
Frontmatter
id7553
titleRefactor HealthService to Match Superior Memory Core Pattern
stateClosed
labels
enhancementai
assigneestobiu
createdAtOct 19, 2025, 11:54 PM
updatedAtOct 20, 2025, 12:07 AM
githubUrlhttps://github.com/neomjs/neo/issues/7553
authortobiu
commentsCount0
parentIssue7536
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 20, 2025, 12:07 AM

Refactor HealthService to Match Superior Memory Core Pattern

tobiu
tobiu commented on Oct 19, 2025, 11:54 PM

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

  1. The file ai/mcp/server/knowledge-base/services/healthService.mjs is renamed to HealthService.mjs.
  2. The content is replaced with a HealthService class that extends Neo.core.Base and is configured as a singleton.
  3. The healthcheck function is converted into a class method (e.g., buildHealthResponse).
  4. The new class uses the DatabaseLifecycleService and ChromaManager to get the database status, instead of creating its own Chroma client.
  5. The health check response is enhanced to include more details, such as uptime and version, mirroring the memory-core service.
  6. The ai/mcp/server/knowledge-base/services/toolService.mjs is updated to use the new HealthService class and its method.
  7. The healthcheck tool continues to function correctly with the improved response structure.