Hi team,
I’ve encountered an issue when using Genkit (JS) with a dependency injection container that lazily initializes my genkit instance. Specifically, I have a DI container that creates the instance of my Genkit class on demand. As a result, the DeveloperUI is not able to see my genkit instance, nor my registered Flows, Tools, Prompts, etc.
It looks like DeveloperUI requires the Genkit instance to be initialized eagerly at startup in order to discover and display these elements.
Is there a recommended way to make DeveloperUI detect a lazily created GenKit instance? Or is there a way to manually register or expose the instance so that DeveloperUI can display the Flows, Tools, Prompts, and other Genkit components defined in my lazily initialized Genkit instance? Or, could someone explain how the Dev UI works? I've reviewed the source code on GitHub, but it's difficult to understand without documentation.
Any guidance or best practices for this use case would be greatly appreciated!
Thank you!