From a51a15914a5b29155022a1fd589d2bcc6409cadf Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sat, 18 Jul 2026 23:46:34 +0300 Subject: fix: support javascript integrations on windows refs #1531 --- src/integration/assets/opencode/herdr-agent-state.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/integration/assets/opencode') diff --git a/src/integration/assets/opencode/herdr-agent-state.js b/src/integration/assets/opencode/herdr-agent-state.js index 4d59f9ec..27ea7ee5 100644 --- a/src/integration/assets/opencode/herdr-agent-state.js +++ b/src/integration/assets/opencode/herdr-agent-state.js @@ -62,6 +62,9 @@ function requestOnce(method, params) { return Promise.resolve(); } + const socketEndpoint = + process.platform === "win32" ? `\\\\.\\pipe\\${socketPath}` : socketPath; + const requestId = `${SOURCE}:${Date.now()}:${Math.floor(Math.random() * 1_000_000) .toString() .padStart(6, "0")}`; @@ -78,7 +81,7 @@ function requestOnce(method, params) { }; return new Promise((resolve) => { - const client = net.createConnection(socketPath, () => { + const client = net.createConnection(socketEndpoint, () => { client.write(`${JSON.stringify(request)}\n`); }); -- cgit v1.2.3