fix(ai): preload provider modules at process startup

Upgrading a global install rotates the hashed bundle chunk files under a still-running process. Provider adapters load lazily via dynamic import, so the first request for a not-yet-loaded adapter after an upgrade resolves against the mutated install and fails with "Cannot find module". preloadApiProviderModules() warms every provider module at boot in every process that enters main() (interactive client, daemon worker, daemon supervisor), so a running process never resolves provider chunks from disk again. Load failures still surface per-stream through the lazy wrappers.

d9c54e19 parent c718bf3c +35 −1
browse files