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/kilo/herdr-agent-state.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/integration/assets/kilo') diff --git a/src/integration/assets/kilo/herdr-agent-state.js b/src/integration/assets/kilo/herdr-agent-state.js index fc12919c..e8600ab1 100644 --- a/src/integration/assets/kilo/herdr-agent-state.js +++ b/src/integration/assets/kilo/herdr-agent-state.js @@ -2,7 +2,7 @@ // managed by herdr; reinstalling or updating the integration overwrites this file. // add custom hooks/plugins beside this file instead of editing it. // HERDR_INTEGRATION_ID=kilo -// HERDR_INTEGRATION_VERSION=2 +// HERDR_INTEGRATION_VERSION=3 import net from "node:net"; @@ -48,6 +48,9 @@ function request(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")}`; @@ -64,7 +67,7 @@ function request(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