perf(startup): build the local tool environment in the background and gate its consumers

Runtime creation, MCP launches, Obsidian, native clients and the tool-environment IPC await the initialization promise instead of startup awaiting it before the window path. A failure still fails startup with the same diagnostic.
This commit is contained in:
mesalogo
2026-10-03 16:56:13 +08:00
parent b28ddd4ba8
commit 68cc0792e1
11 changed files with 149 additions and 19 deletions
@@ -3,3 +3,9 @@
* tool launches. Consumers must only copy the values they explicitly support.
*/
export type LaunchEnvironmentProvider = () => Readonly<NodeJS.ProcessEnv>
/**
* Settles once the launch environment has been built at startup. Consumers that
* can run before startup finishes await it before reading the provider.
*/
export type LaunchEnvironmentReady = () => Promise<void>