Function
sendCommand
(socket: net.Socket | null, command: HarnessCommand)
Source from the content-addressed store, hash-verified
| 540 | } |
| 541 | |
| 542 | function sendCommand(socket: net.Socket | null, command: HarnessCommand): void { |
| 543 | if (socket === null || socket.destroyed || !socket.writable) return; |
| 544 | try { |
| 545 | socket.write(`${JSON.stringify(command)}\n`); |
| 546 | } catch { |
| 547 | // best-effort control channel |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | async function waitForHarnessExit( |
| 552 | harness: Awaited<ReturnType<typeof startPtyHarness>>, |
Tested by
no test coverage detected