To provide clear and decoupled notifications about the ChromaDB process management status, this ticket focuses on enhancing the DatabaseLifecycleService singleton with eventing capabilities. This is particularly important given the hybrid strategy where ChromaDB can be managed internally by the service or run externally.
Acceptance Criteria
- The
DatabaseLifecycleService class mixes in Neo.core.Observable by setting static observable = true.
- The
startDatabase method is updated to fire a single 'processActive' event when it successfully spawns a new process or detects an externally managed process.
- This event will include
pid (if available), managedByService: true (for internally spawned) or managedByService: false (for externally detected), and a detail string.
- The
stopDatabase method is updated to fire a 'processStopped' event (with the PID and managedByService: true) when it successfully terminates a managed process.
- The
mcp-stdio.mjs entry point (or a relevant service) is updated to subscribe to these events for logging purposes, demonstrating the eventing mechanism.
- All related functionalities continue to work correctly after the changes.
To provide clear and decoupled notifications about the ChromaDB process management status, this ticket focuses on enhancing the
DatabaseLifecycleServicesingleton with eventing capabilities. This is particularly important given the hybrid strategy where ChromaDB can be managed internally by the service or run externally.Acceptance Criteria
DatabaseLifecycleServiceclass mixes inNeo.core.Observableby settingstatic observable = true.startDatabasemethod is updated to fire a single'processActive'event when it successfully spawns a new process or detects an externally managed process.pid(if available),managedByService: true(for internally spawned) ormanagedByService: false(for externally detected), and adetailstring.stopDatabasemethod is updated to fire a'processStopped'event (with the PID andmanagedByService: true) when it successfully terminates a managed process.mcp-stdio.mjsentry point (or a relevant service) is updated to subscribe to these events for logging purposes, demonstrating the eventing mechanism.