| 131 | }); |
| 132 | this.#child = child; |
| 133 | this.#stdin = child.stdin; |
| 134 | child.stderr.on("data", () => {}); |
| 135 | child.on("exit", () => this.#failAll(new ConnectionError("cmdop-core exited", "transport"))); |
| 136 | child.on("error", (error) => |
| 137 | this.#failAll(new ConnectionError(`cmdop-core spawn failed: ${error.message}`, "transport")), |
| 138 | ); |
| 139 | this.#startReader(child.stdout); |
| 140 | } |
| 141 | |
| 142 | #startReader(stdout: Readable): void { |
| 143 | void (async () => { |
| 144 | try { |
| 145 | for await (const envelope of sizeDelimitedDecodeStream(EnvelopeSchema, stdout)) { |