This ticket covers refactoring ai/mcp/server/knowledge-base/services/databaseService.mjs into a singleton class that extends Neo.core.Base. The file will also be renamed to DatabaseService.mjs to follow a more consistent naming convention. This service handles creating, embedding, syncing, and deleting the knowledge base.
Acceptance Criteria
- A new file
ai/mcp/server/knowledge-base/services/DatabaseService.mjs is created with the refactored DatabaseService class content.
- The
DatabaseService class extends Neo.core.Base and is configured as a singleton.
- Existing functions (
createKnowledgeBase, deleteDatabase, embedKnowledgeBase, syncDatabase) are converted into class methods.
- The old file
ai/mcp/server/knowledge-base/services/databaseService.mjs is deleted.
- The
ai/mcp/server/knowledge-base/services/toolService.mjs is updated to import the DatabaseService class and map its methods statically.
- All related tools (
sync_database, create_knowledge_base, embed_knowledge_base, delete_database) continue to function correctly after the refactoring.
This ticket covers refactoring
ai/mcp/server/knowledge-base/services/databaseService.mjsinto a singleton class that extendsNeo.core.Base. The file will also be renamed toDatabaseService.mjsto follow a more consistent naming convention. This service handles creating, embedding, syncing, and deleting the knowledge base.Acceptance Criteria
ai/mcp/server/knowledge-base/services/DatabaseService.mjsis created with the refactoredDatabaseServiceclass content.DatabaseServiceclass extendsNeo.core.Baseand is configured as a singleton.createKnowledgeBase,deleteDatabase,embedKnowledgeBase,syncDatabase) are converted into class methods.ai/mcp/server/knowledge-base/services/databaseService.mjsis deleted.ai/mcp/server/knowledge-base/services/toolService.mjsis updated to import theDatabaseServiceclass and map its methods statically.sync_database,create_knowledge_base,embed_knowledge_base,delete_database) continue to function correctly after the refactoring.