(line: string)
| 275 | // initialize already answered locally; notifications (initialized) need no reply. |
| 276 | }; |
| 277 | const routeToDaemon = (line: string): void => { |
| 278 | if (daemonStatus === 'ready' && daemonSocket) { |
| 279 | trackInflight(line); |
| 280 | try { daemonSocket.write(line.endsWith('\n') ? line : line + '\n'); } catch { /* close path */ } |
| 281 | } else if (daemonStatus === 'failed') { |
| 282 | void handleLocally(line); |
| 283 | } else { |
| 284 | pending.push(line); |
| 285 | } |
| 286 | }; |
| 287 | |
| 288 | // ---- client (stdin) ---- |
| 289 | let stdinBuf = ''; |
no test coverage detected