From abeb465f46803ab2e46a79ad8932f5117997dced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A9=98?= Date: Fri, 5 Jun 2026 07:50:03 +0000 Subject: [PATCH] fix: acp-client reports own package version, not util VERSION MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address review nit from PR #97: clientInfo.version should be agent-hermes's own version for correct identification under independent versioning. 小橘 🍊(NEKO Team) --- packages/agent-hermes/src/acp-client.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/agent-hermes/src/acp-client.ts b/packages/agent-hermes/src/acp-client.ts index 60303ba..fa29b4d 100644 --- a/packages/agent-hermes/src/acp-client.ts +++ b/packages/agent-hermes/src/acp-client.ts @@ -1,7 +1,16 @@ import type { ChildProcess } from "node:child_process"; import { spawn } from "node:child_process"; +import { readFileSync } from "node:fs"; +import { dirname, join } from "node:path"; import { createInterface } from "node:readline"; -import { VERSION } from "@united-workforce/util"; +import { fileURLToPath } from "node:url"; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const OWN_VERSION = ( + JSON.parse(readFileSync(join(__dirname, "..", "package.json"), "utf-8")) as { + version: string; + } +).version; const HERMES_COMMAND = "hermes"; const PROTOCOL_VERSION = 1; @@ -300,7 +309,7 @@ export class HermesAcpClient { private async initialize(): Promise { const initResponse = await this.sendRequest("initialize", { protocolVersion: PROTOCOL_VERSION, - clientInfo: { name: "uwf", version: VERSION }, + clientInfo: { name: "uwf-hermes", version: OWN_VERSION }, capabilities: {}, }); -- 2.43.0