This ticket covers refactoring ai/mcp/server/knowledge-base/services/documentService.mjs into a singleton class that extends Neo.core.Base. The file will be renamed to DocumentService.mjs to follow project conventions. This service is responsible for listing and retrieving individual documents from the knowledge base.
Acceptance Criteria
- The file
ai/mcp/server/knowledge-base/services/documentService.mjs is renamed to DocumentService.mjs.
- The content is replaced with a
DocumentService class that extends Neo.core.Base and is configured as a singleton.
- Existing functions (
listDocuments, getDocumentById) are converted into class methods.
- The new class uses the
ChromaManager service to interact with the database.
- The
ai/mcp/server/knowledge-base/services/toolService.mjs is updated to import the DocumentService class and map its methods.
- All related tools (
list_documents, get_document_by_id) continue to function correctly after the refactoring.
This ticket covers refactoring
ai/mcp/server/knowledge-base/services/documentService.mjsinto a singleton class that extendsNeo.core.Base. The file will be renamed toDocumentService.mjsto follow project conventions. This service is responsible for listing and retrieving individual documents from the knowledge base.Acceptance Criteria
ai/mcp/server/knowledge-base/services/documentService.mjsis renamed toDocumentService.mjs.DocumentServiceclass that extendsNeo.core.Baseand is configured as a singleton.listDocuments,getDocumentById) are converted into class methods.ChromaManagerservice to interact with the database.ai/mcp/server/knowledge-base/services/toolService.mjsis updated to import theDocumentServiceclass and map its methods.list_documents,get_document_by_id) continue to function correctly after the refactoring.