()
| 249 | process.exit(0); |
| 250 | }; |
| 251 | const ensureEngine = (): Promise<void> => { |
| 252 | if (!engine) engine = deps.makeEngine(); |
| 253 | if (!engineReady) engineReady = engine.ensureInitialized(deps.root).catch(() => { /* degraded */ }); |
| 254 | return engineReady; |
| 255 | }; |
| 256 | // Daemon-unavailable fallback: serve a client message in-process. |
| 257 | const handleLocally = async (line: string): Promise<void> => { |
| 258 | let msg: JsonRpc; try { msg = JSON.parse(line) as JsonRpc; } catch { return; } |
no test coverage detected