(raw: string)
| 153 | } |
| 154 | |
| 155 | private emit(raw: string): void { |
| 156 | // JSON.parse failures propagate to the stdin handler as a -32700 parse error. |
| 157 | // The decoded value stays untyped here; handleMcpPayload validates it at the boundary. |
| 158 | this.sink(JSON.parse(raw) as unknown); |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | function responseArray(response: JsonRpcResponse | null): JsonRpcResponse[] { |